This is page 150 of 187. Use http://codebase.md/xmlui-org/xmlui/assets/img/main.tsx?lines=true&page={x} to view the full context.
# Directory Structure
```
├── .changeset
│ ├── config.json
│ └── itchy-cases-deny.md
├── .eslintrc.cjs
├── .github
│ ├── build-checklist.png
│ ├── ISSUE_TEMPLATE
│ │ ├── bug_report.md
│ │ └── feature_request.md
│ └── workflows
│ ├── deploy-blog-optimized.yml
│ ├── deploy-blog-swa.yml
│ ├── deploy-blog.yml
│ ├── deploy-docs-optimized.yml
│ ├── deploy-docs-swa.yml
│ ├── deploy-docs.yml
│ ├── prepare-versions.yml
│ ├── release-packages.yml
│ ├── run-all-tests.yml
│ └── run-smoke-tests.yml
├── .gitignore
├── .prettierrc.js
├── .vscode
│ ├── launch.json
│ └── settings.json
├── blog
│ ├── .gitignore
│ ├── .gitkeep
│ ├── CHANGELOG.md
│ ├── extensions.ts
│ ├── index.html
│ ├── index.ts
│ ├── package.json
│ ├── public
│ │ ├── blog
│ │ │ ├── images
│ │ │ │ ├── an-advanced-codefence.gif
│ │ │ │ ├── an-advanced-codefence.mp4
│ │ │ │ ├── blog-page-component.png
│ │ │ │ ├── blog-scrabble.png
│ │ │ │ ├── codefence-runner.png
│ │ │ │ ├── integrated-blog-search.png
│ │ │ │ ├── lorem-ipsum.png
│ │ │ │ ├── playground-checkbox-source.png
│ │ │ │ ├── playground.png
│ │ │ │ ├── use-xmlui-mcp-to-find-a-howto.png
│ │ │ │ └── xmlui-demo-gallery.png
│ │ │ ├── introducing-xmlui.md
│ │ │ ├── lorem-ipsum.md
│ │ │ ├── newest-post.md
│ │ │ ├── older-post.md
│ │ │ ├── xmlui-playground.md
│ │ │ └── xmlui-powered-blog.md
│ │ ├── mockServiceWorker.js
│ │ ├── resources
│ │ │ ├── favicon.ico
│ │ │ ├── files
│ │ │ │ └── for-download
│ │ │ │ └── xmlui
│ │ │ │ └── xmlui-standalone.umd.js
│ │ │ ├── github.svg
│ │ │ ├── llms.txt
│ │ │ ├── logo-dark.svg
│ │ │ ├── logo.svg
│ │ │ ├── pg-popout.svg
│ │ │ ├── rss.svg
│ │ │ └── xmlui-logo.svg
│ │ ├── serve.json
│ │ ├── staticwebapp.config.json
│ │ └── web.config
│ ├── scripts
│ │ ├── download-latest-xmlui.js
│ │ ├── generate-rss.js
│ │ ├── get-releases.js
│ │ └── utils.js
│ ├── src
│ │ ├── components
│ │ │ ├── BlogOverview.xmlui
│ │ │ ├── BlogPage.xmlui
│ │ │ └── PageNotFound.xmlui
│ │ ├── config.ts
│ │ ├── Main.xmlui
│ │ └── themes
│ │ └── blog-theme.ts
│ └── tsconfig.json
├── CONTRIBUTING.md
├── docs
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── ComponentRefLinks.txt
│ ├── content
│ │ ├── _meta.json
│ │ ├── components
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ ├── APICall.md
│ │ │ ├── App.md
│ │ │ ├── AppHeader.md
│ │ │ ├── AppState.md
│ │ │ ├── AutoComplete.md
│ │ │ ├── Avatar.md
│ │ │ ├── Backdrop.md
│ │ │ ├── Badge.md
│ │ │ ├── BarChart.md
│ │ │ ├── Bookmark.md
│ │ │ ├── Breakout.md
│ │ │ ├── Button.md
│ │ │ ├── Card.md
│ │ │ ├── Carousel.md
│ │ │ ├── ChangeListener.md
│ │ │ ├── Checkbox.md
│ │ │ ├── CHStack.md
│ │ │ ├── ColorPicker.md
│ │ │ ├── Column.md
│ │ │ ├── ContentSeparator.md
│ │ │ ├── CVStack.md
│ │ │ ├── DataSource.md
│ │ │ ├── DateInput.md
│ │ │ ├── DatePicker.md
│ │ │ ├── DonutChart.md
│ │ │ ├── DropdownMenu.md
│ │ │ ├── EmojiSelector.md
│ │ │ ├── ExpandableItem.md
│ │ │ ├── FileInput.md
│ │ │ ├── FileUploadDropZone.md
│ │ │ ├── FlowLayout.md
│ │ │ ├── Footer.md
│ │ │ ├── Form.md
│ │ │ ├── FormItem.md
│ │ │ ├── FormSection.md
│ │ │ ├── Fragment.md
│ │ │ ├── H1.md
│ │ │ ├── H2.md
│ │ │ ├── H3.md
│ │ │ ├── H4.md
│ │ │ ├── H5.md
│ │ │ ├── H6.md
│ │ │ ├── Heading.md
│ │ │ ├── HSplitter.md
│ │ │ ├── HStack.md
│ │ │ ├── Icon.md
│ │ │ ├── IFrame.md
│ │ │ ├── Image.md
│ │ │ ├── Items.md
│ │ │ ├── LabelList.md
│ │ │ ├── Legend.md
│ │ │ ├── LineChart.md
│ │ │ ├── Link.md
│ │ │ ├── List.md
│ │ │ ├── Logo.md
│ │ │ ├── Markdown.md
│ │ │ ├── MenuItem.md
│ │ │ ├── MenuSeparator.md
│ │ │ ├── ModalDialog.md
│ │ │ ├── NavGroup.md
│ │ │ ├── NavLink.md
│ │ │ ├── NavPanel.md
│ │ │ ├── NoResult.md
│ │ │ ├── NumberBox.md
│ │ │ ├── Option.md
│ │ │ ├── Page.md
│ │ │ ├── PageMetaTitle.md
│ │ │ ├── Pages.md
│ │ │ ├── Pagination.md
│ │ │ ├── PasswordInput.md
│ │ │ ├── PieChart.md
│ │ │ ├── ProgressBar.md
│ │ │ ├── Queue.md
│ │ │ ├── RadioGroup.md
│ │ │ ├── RealTimeAdapter.md
│ │ │ ├── Redirect.md
│ │ │ ├── Select.md
│ │ │ ├── Slider.md
│ │ │ ├── Slot.md
│ │ │ ├── SpaceFiller.md
│ │ │ ├── Spinner.md
│ │ │ ├── Splitter.md
│ │ │ ├── Stack.md
│ │ │ ├── StickyBox.md
│ │ │ ├── SubMenuItem.md
│ │ │ ├── Switch.md
│ │ │ ├── TabItem.md
│ │ │ ├── Table.md
│ │ │ ├── TableOfContents.md
│ │ │ ├── Tabs.md
│ │ │ ├── Text.md
│ │ │ ├── TextArea.md
│ │ │ ├── TextBox.md
│ │ │ ├── Theme.md
│ │ │ ├── TimeInput.md
│ │ │ ├── Timer.md
│ │ │ ├── ToneChangerButton.md
│ │ │ ├── ToneSwitch.md
│ │ │ ├── Tooltip.md
│ │ │ ├── Tree.md
│ │ │ ├── VSplitter.md
│ │ │ ├── VStack.md
│ │ │ ├── xmlui-animations
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ ├── Animation.md
│ │ │ │ ├── FadeAnimation.md
│ │ │ │ ├── FadeInAnimation.md
│ │ │ │ ├── FadeOutAnimation.md
│ │ │ │ ├── ScaleAnimation.md
│ │ │ │ └── SlideInAnimation.md
│ │ │ ├── xmlui-pdf
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ └── Pdf.md
│ │ │ ├── xmlui-spreadsheet
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ └── Spreadsheet.md
│ │ │ └── xmlui-website-blocks
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ ├── Carousel.md
│ │ │ ├── HelloMd.md
│ │ │ ├── HeroSection.md
│ │ │ └── ScrollToTop.md
│ │ └── extensions
│ │ ├── _meta.json
│ │ ├── xmlui-animations
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ ├── Animation.md
│ │ │ ├── FadeAnimation.md
│ │ │ ├── FadeInAnimation.md
│ │ │ ├── FadeOutAnimation.md
│ │ │ ├── ScaleAnimation.md
│ │ │ └── SlideInAnimation.md
│ │ └── xmlui-website-blocks
│ │ ├── _meta.json
│ │ ├── _overview.md
│ │ ├── Carousel.md
│ │ ├── FancyButton.md
│ │ ├── HeroSection.md
│ │ └── ScrollToTop.md
│ ├── extensions.ts
│ ├── index.html
│ ├── index.ts
│ ├── package.json
│ ├── public
│ │ ├── feed.rss
│ │ ├── mockServiceWorker.js
│ │ ├── pages
│ │ │ ├── _meta.json
│ │ │ ├── app-structure.md
│ │ │ ├── build-editor-component.md
│ │ │ ├── build-hello-world-component.md
│ │ │ ├── components-intro.md
│ │ │ ├── context-variables.md
│ │ │ ├── forms.md
│ │ │ ├── globals.md
│ │ │ ├── glossary.md
│ │ │ ├── helper-tags.md
│ │ │ ├── hosted-deployment.md
│ │ │ ├── howto
│ │ │ │ ├── assign-a-complex-json-literal-to-a-component-variable.md
│ │ │ │ ├── chain-a-refetch.md
│ │ │ │ ├── control-cache-invalidation.md
│ │ │ │ ├── debounce-user-input-for-api-calls.md
│ │ │ │ ├── debounce-with-changelistener.md
│ │ │ │ ├── debug-a-component.md
│ │ │ │ ├── delay-a-datasource-until-another-datasource-is-ready.md
│ │ │ │ ├── delegate-a-method.md
│ │ │ │ ├── do-custom-form-validation.md
│ │ │ │ ├── expose-a-method-from-a-component.md
│ │ │ │ ├── filter-and-transform-data-from-an-api.md
│ │ │ │ ├── group-items-in-list-by-a-property.md
│ │ │ │ ├── handle-background-operations.md
│ │ │ │ ├── hide-an-element-until-its-datasource-is-ready.md
│ │ │ │ ├── make-a-set-of-equal-width-cards.md
│ │ │ │ ├── make-a-table-responsive.md
│ │ │ │ ├── make-navpanel-width-responsive.md
│ │ │ │ ├── modify-a-value-reported-in-a-column.md
│ │ │ │ ├── paginate-a-list.md
│ │ │ │ ├── pass-data-to-a-modal-dialog.md
│ │ │ │ ├── react-to-button-click-not-keystrokes.md
│ │ │ │ ├── set-the-initial-value-of-a-select-from-fetched-data.md
│ │ │ │ ├── share-a-modaldialog-across-components.md
│ │ │ │ ├── sync-selections-between-table-and-list-views.md
│ │ │ │ ├── update-ui-optimistically.md
│ │ │ │ ├── use-built-in-form-validation.md
│ │ │ │ └── use-the-same-modaldialog-to-add-or-edit.md
│ │ │ ├── howto.md
│ │ │ ├── intro.md
│ │ │ ├── layout.md
│ │ │ ├── markup.md
│ │ │ ├── mcp.md
│ │ │ ├── modal-dialogs.md
│ │ │ ├── news-and-reviews.md
│ │ │ ├── reactive-intro.md
│ │ │ ├── refactoring.md
│ │ │ ├── routing-and-links.md
│ │ │ ├── samples
│ │ │ │ ├── color-palette.xmlui
│ │ │ │ ├── color-values.xmlui
│ │ │ │ ├── shadow-sizes.xmlui
│ │ │ │ ├── spacing-sizes.xmlui
│ │ │ │ ├── swatch.xmlui
│ │ │ │ ├── theme-gallery-brief.xmlui
│ │ │ │ └── theme-gallery.xmlui
│ │ │ ├── scoping.md
│ │ │ ├── scripting.md
│ │ │ ├── styles-and-themes
│ │ │ │ ├── common-units.md
│ │ │ │ ├── layout-props.md
│ │ │ │ ├── theme-variable-defaults.md
│ │ │ │ ├── theme-variables.md
│ │ │ │ └── themes.md
│ │ │ ├── template-properties.md
│ │ │ ├── test.md
│ │ │ ├── tutorial-01.md
│ │ │ ├── tutorial-02.md
│ │ │ ├── tutorial-03.md
│ │ │ ├── tutorial-04.md
│ │ │ ├── tutorial-05.md
│ │ │ ├── tutorial-06.md
│ │ │ ├── tutorial-07.md
│ │ │ ├── tutorial-08.md
│ │ │ ├── tutorial-09.md
│ │ │ ├── tutorial-10.md
│ │ │ ├── tutorial-11.md
│ │ │ ├── tutorial-12.md
│ │ │ ├── universal-properties.md
│ │ │ ├── user-defined-components.md
│ │ │ ├── vscode.md
│ │ │ ├── working-with-markdown.md
│ │ │ ├── working-with-text.md
│ │ │ ├── xmlui-animations
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ ├── Animation.md
│ │ │ │ ├── FadeAnimation.md
│ │ │ │ ├── FadeInAnimation.md
│ │ │ │ ├── FadeOutAnimation.md
│ │ │ │ ├── ScaleAnimation.md
│ │ │ │ └── SlideInAnimation.md
│ │ │ ├── xmlui-charts
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ ├── BarChart.md
│ │ │ │ ├── DonutChart.md
│ │ │ │ ├── LabelList.md
│ │ │ │ ├── Legend.md
│ │ │ │ ├── LineChart.md
│ │ │ │ └── PieChart.md
│ │ │ ├── xmlui-pdf
│ │ │ │ ├── _meta.json
│ │ │ │ ├── _overview.md
│ │ │ │ └── Pdf.md
│ │ │ └── xmlui-spreadsheet
│ │ │ ├── _meta.json
│ │ │ ├── _overview.md
│ │ │ └── Spreadsheet.md
│ │ ├── resources
│ │ │ ├── devdocs
│ │ │ │ ├── debug-proxy-object-2.png
│ │ │ │ ├── debug-proxy-object.png
│ │ │ │ ├── table_editor_01.png
│ │ │ │ ├── table_editor_02.png
│ │ │ │ ├── table_editor_03.png
│ │ │ │ ├── table_editor_04.png
│ │ │ │ ├── table_editor_05.png
│ │ │ │ ├── table_editor_06.png
│ │ │ │ ├── table_editor_07.png
│ │ │ │ ├── table_editor_08.png
│ │ │ │ ├── table_editor_09.png
│ │ │ │ ├── table_editor_10.png
│ │ │ │ ├── table_editor_11.png
│ │ │ │ ├── table-editor-01.png
│ │ │ │ ├── table-editor-02.png
│ │ │ │ ├── table-editor-03.png
│ │ │ │ ├── table-editor-04.png
│ │ │ │ ├── table-editor-06.png
│ │ │ │ ├── table-editor-07.png
│ │ │ │ ├── table-editor-08.png
│ │ │ │ ├── table-editor-09.png
│ │ │ │ └── xmlui-rendering-of-tiptap-markdown.png
│ │ │ ├── favicon.ico
│ │ │ ├── files
│ │ │ │ ├── clients.json
│ │ │ │ ├── daily-revenue.json
│ │ │ │ ├── dashboard-stats.json
│ │ │ │ ├── demo.xmlui
│ │ │ │ ├── demo.xmlui.xs
│ │ │ │ ├── downloads
│ │ │ │ │ └── downloads.json
│ │ │ │ ├── for-download
│ │ │ │ │ ├── index-with-api.html
│ │ │ │ │ ├── index.html
│ │ │ │ │ ├── mockApi.js
│ │ │ │ │ ├── start-darwin.sh
│ │ │ │ │ ├── start-linux.sh
│ │ │ │ │ ├── start.bat
│ │ │ │ │ └── xmlui
│ │ │ │ │ └── xmlui-standalone.umd.js
│ │ │ │ ├── getting-started
│ │ │ │ │ ├── cl-tutorial-final.zip
│ │ │ │ │ ├── cl-tutorial.zip
│ │ │ │ │ ├── cl-tutorial2.zip
│ │ │ │ │ ├── cl-tutorial3.zip
│ │ │ │ │ ├── cl-tutorial4.zip
│ │ │ │ │ ├── cl-tutorial5.zip
│ │ │ │ │ ├── cl-tutorial6.zip
│ │ │ │ │ ├── getting-started.zip
│ │ │ │ │ ├── hello-xmlui.zip
│ │ │ │ │ ├── xmlui-empty.zip
│ │ │ │ │ └── xmlui-starter.zip
│ │ │ │ ├── howto
│ │ │ │ │ └── component-icons
│ │ │ │ │ └── up-arrow.svg
│ │ │ │ ├── invoices.json
│ │ │ │ ├── monthly-status.json
│ │ │ │ ├── news-and-reviews.json
│ │ │ │ ├── products.json
│ │ │ │ ├── releases.json
│ │ │ │ ├── tutorials
│ │ │ │ │ ├── datasource
│ │ │ │ │ │ └── api.ts
│ │ │ │ │ └── p2do
│ │ │ │ │ ├── api.ts
│ │ │ │ │ └── todo-logo.svg
│ │ │ │ └── xmlui.json
│ │ │ ├── github.svg
│ │ │ ├── images
│ │ │ │ ├── apiaction-tutorial
│ │ │ │ │ ├── add-success.png
│ │ │ │ │ ├── apiaction-param.png
│ │ │ │ │ ├── change-completed.png
│ │ │ │ │ ├── change-in-progress.png
│ │ │ │ │ ├── confirm-delete.png
│ │ │ │ │ ├── data-error.png
│ │ │ │ │ ├── data-progress.png
│ │ │ │ │ ├── data-success.png
│ │ │ │ │ ├── display-1.png
│ │ │ │ │ ├── item-deleted.png
│ │ │ │ │ ├── item-updated.png
│ │ │ │ │ ├── missing-api-key.png
│ │ │ │ │ ├── new-item-added.png
│ │ │ │ │ └── test-message.png
│ │ │ │ ├── chat-api
│ │ │ │ │ └── domain-model.svg
│ │ │ │ ├── components
│ │ │ │ │ ├── image
│ │ │ │ │ │ └── breakfast.jpg
│ │ │ │ │ ├── markdown
│ │ │ │ │ │ └── colors.png
│ │ │ │ │ └── modal
│ │ │ │ │ ├── deep_link_dialog_1.jpg
│ │ │ │ │ └── deep_link_dialog_2.jpg
│ │ │ │ ├── create-apps
│ │ │ │ │ ├── collapsed-vertical.png
│ │ │ │ │ ├── using-forms-warning-dialog.png
│ │ │ │ │ └── using-forms.png
│ │ │ │ ├── datasource-tutorial
│ │ │ │ │ ├── data-with-header.png
│ │ │ │ │ ├── filtered-data.png
│ │ │ │ │ ├── filtered-items.png
│ │ │ │ │ ├── initial-page-items.png
│ │ │ │ │ ├── list-items.png
│ │ │ │ │ ├── next-page-items.png
│ │ │ │ │ ├── no-data.png
│ │ │ │ │ ├── pagination-1.jpg
│ │ │ │ │ ├── pagination-1.png
│ │ │ │ │ ├── polling-1.png
│ │ │ │ │ ├── refetch-data.png
│ │ │ │ │ ├── slow-loading.png
│ │ │ │ │ ├── test-message.png
│ │ │ │ │ ├── Thumbs.db
│ │ │ │ │ ├── unconventional-data.png
│ │ │ │ │ └── unfiltered-items.png
│ │ │ │ ├── flower.jpg
│ │ │ │ ├── get-started
│ │ │ │ │ ├── add-new-contact.png
│ │ │ │ │ ├── app-modified.png
│ │ │ │ │ ├── app-start.png
│ │ │ │ │ ├── app-with-boxes.png
│ │ │ │ │ ├── app-with-toast.png
│ │ │ │ │ ├── boilerplate-structure.png
│ │ │ │ │ ├── cl-initial.png
│ │ │ │ │ ├── cl-start.png
│ │ │ │ │ ├── contact-counts.png
│ │ │ │ │ ├── contact-dialog-title.png
│ │ │ │ │ ├── contact-dialog.png
│ │ │ │ │ ├── contact-menus.png
│ │ │ │ │ ├── contact-predicates.png
│ │ │ │ │ ├── context-menu.png
│ │ │ │ │ ├── dashboard-numbers.png
│ │ │ │ │ ├── default-contact-list.png
│ │ │ │ │ ├── delete-contact.png
│ │ │ │ │ ├── delete-task.png
│ │ │ │ │ ├── detailed-template.png
│ │ │ │ │ ├── edit-contact-details.png
│ │ │ │ │ ├── edited-contact-saved.png
│ │ │ │ │ ├── empty-sections.png
│ │ │ │ │ ├── filter-completed.png
│ │ │ │ │ ├── fullwidth-desktop.png
│ │ │ │ │ ├── fullwidth-mobile.png
│ │ │ │ │ ├── initial-table.png
│ │ │ │ │ ├── items-and-badges.png
│ │ │ │ │ ├── loading-message.png
│ │ │ │ │ ├── new-contact-button.png
│ │ │ │ │ ├── new-contact-saved.png
│ │ │ │ │ ├── no-empty-sections.png
│ │ │ │ │ ├── personal-todo-initial.png
│ │ │ │ │ ├── piechart.png
│ │ │ │ │ ├── review-today.png
│ │ │ │ │ ├── rudimentary-dashboard.png
│ │ │ │ │ ├── section-collapsed.png
│ │ │ │ │ ├── sectioned-items.png
│ │ │ │ │ ├── sections-ordered.png
│ │ │ │ │ ├── spacex-list-with-links.png
│ │ │ │ │ ├── spacex-list.png
│ │ │ │ │ ├── start-personal-todo-1.png
│ │ │ │ │ ├── submit-new-contact.png
│ │ │ │ │ ├── submit-new-task.png
│ │ │ │ │ ├── syntax-highlighting.png
│ │ │ │ │ ├── table-with-badge.png
│ │ │ │ │ ├── template-with-card.png
│ │ │ │ │ ├── test-emulated-api.png
│ │ │ │ │ ├── Thumbs.db
│ │ │ │ │ ├── todo-logo.png
│ │ │ │ │ └── xmlui-tools.png
│ │ │ │ ├── HelloApp.png
│ │ │ │ ├── HelloApp2.png
│ │ │ │ ├── logos
│ │ │ │ │ ├── xmlui1.svg
│ │ │ │ │ ├── xmlui2.svg
│ │ │ │ │ ├── xmlui3.svg
│ │ │ │ │ ├── xmlui4.svg
│ │ │ │ │ ├── xmlui5.svg
│ │ │ │ │ ├── xmlui6.svg
│ │ │ │ │ └── xmlui7.svg
│ │ │ │ ├── pdf
│ │ │ │ │ └── dummy-pdf.jpg
│ │ │ │ ├── rendering-engine
│ │ │ │ │ ├── AppEngine-flow.svg
│ │ │ │ │ ├── Component.svg
│ │ │ │ │ ├── CompoundComponent.svg
│ │ │ │ │ ├── RootComponent.svg
│ │ │ │ │ └── tree-with-containers.svg
│ │ │ │ ├── reviewers-guide
│ │ │ │ │ ├── AppEngine-flow.svg
│ │ │ │ │ └── incbutton-in-action.png
│ │ │ │ ├── tools
│ │ │ │ │ └── boilerplate-structure.png
│ │ │ │ ├── try.svg
│ │ │ │ ├── tutorial
│ │ │ │ │ ├── app-chat-history.png
│ │ │ │ │ ├── app-content-placeholder.png
│ │ │ │ │ ├── app-header-and-content.png
│ │ │ │ │ ├── app-links-channel-selected.png
│ │ │ │ │ ├── app-links-click.png
│ │ │ │ │ ├── app-navigation.png
│ │ │ │ │ ├── finished-ex01.png
│ │ │ │ │ ├── finished-ex02.png
│ │ │ │ │ ├── hello.png
│ │ │ │ │ ├── splash-screen-advanced.png
│ │ │ │ │ ├── splash-screen-after-click.png
│ │ │ │ │ ├── splash-screen-centered.png
│ │ │ │ │ ├── splash-screen-events.png
│ │ │ │ │ ├── splash-screen-expression.png
│ │ │ │ │ ├── splash-screen-reuse-after.png
│ │ │ │ │ ├── splash-screen-reuse-before.png
│ │ │ │ │ └── splash-screen.png
│ │ │ │ └── tutorial-01.png
│ │ │ ├── llms.txt
│ │ │ ├── logo-dark.svg
│ │ │ ├── logo.svg
│ │ │ ├── pg-popout.svg
│ │ │ └── xmlui-logo.svg
│ │ ├── serve.json
│ │ └── web.config
│ ├── scripts
│ │ ├── download-latest-xmlui.js
│ │ ├── generate-rss.js
│ │ ├── get-releases.js
│ │ └── utils.js
│ ├── src
│ │ ├── components
│ │ │ ├── BlogOverview.xmlui
│ │ │ ├── BlogPage.xmlui
│ │ │ ├── Boxes.xmlui
│ │ │ ├── Breadcrumb.xmlui
│ │ │ ├── ChangeLog.xmlui
│ │ │ ├── ColorPalette.xmlui
│ │ │ ├── DocumentLinks.xmlui
│ │ │ ├── DocumentPage.xmlui
│ │ │ ├── DocumentPageNoTOC.xmlui
│ │ │ ├── Icons.xmlui
│ │ │ ├── IncButton.xmlui
│ │ │ ├── IncButton2.xmlui
│ │ │ ├── NameValue.xmlui
│ │ │ ├── PageNotFound.xmlui
│ │ │ ├── PaletteItem.xmlui
│ │ │ ├── Palettes.xmlui
│ │ │ ├── SectionHeader.xmlui
│ │ │ ├── TBD.xmlui
│ │ │ ├── Test.xmlui
│ │ │ ├── ThemesIntro.xmlui
│ │ │ ├── ThousandThemes.xmlui
│ │ │ ├── TubeStops.xmlui
│ │ │ ├── TubeStops.xmlui.xs
│ │ │ └── TwoColumnCode.xmlui
│ │ ├── config.ts
│ │ ├── Main.xmlui
│ │ └── themes
│ │ ├── docs-theme.ts
│ │ ├── earthtone.ts
│ │ ├── xmlui-gray-on-default.ts
│ │ ├── xmlui-green-on-default.ts
│ │ └── xmlui-orange-on-default.ts
│ └── tsconfig.json
├── LICENSE
├── package-lock.json
├── package.json
├── packages
│ ├── tsconfig.json
│ ├── xmlui-animations
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── Animation.tsx
│ │ ├── AnimationNative.tsx
│ │ ├── FadeAnimation.tsx
│ │ ├── FadeInAnimation.tsx
│ │ ├── FadeOutAnimation.tsx
│ │ ├── index.tsx
│ │ ├── ScaleAnimation.tsx
│ │ └── SlideInAnimation.tsx
│ ├── xmlui-devtools
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ ├── src
│ │ │ ├── devtools
│ │ │ │ ├── DevTools.tsx
│ │ │ │ ├── DevToolsNative.module.scss
│ │ │ │ ├── DevToolsNative.tsx
│ │ │ │ ├── ModalDialog.module.scss
│ │ │ │ ├── ModalDialog.tsx
│ │ │ │ ├── ModalVisibilityContext.tsx
│ │ │ │ ├── Tooltip.module.scss
│ │ │ │ ├── Tooltip.tsx
│ │ │ │ └── utils.ts
│ │ │ ├── editor
│ │ │ │ └── Editor.tsx
│ │ │ └── index.tsx
│ │ └── vite.config-overrides.ts
│ ├── xmlui-hello-world
│ │ ├── .gitignore
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── HelloWorld.module.scss
│ │ ├── HelloWorld.tsx
│ │ ├── HelloWorldNative.tsx
│ │ └── index.tsx
│ ├── xmlui-os-frames
│ │ ├── .gitignore
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── index.tsx
│ │ ├── IPhoneFrame.module.scss
│ │ ├── IPhoneFrame.tsx
│ │ ├── MacOSAppFrame.module.scss
│ │ ├── MacOSAppFrame.tsx
│ │ ├── WindowsAppFrame.module.scss
│ │ └── WindowsAppFrame.tsx
│ ├── xmlui-pdf
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ ├── components
│ │ │ │ └── Pdf.xmlui
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── index.tsx
│ │ ├── LazyPdfNative.tsx
│ │ ├── Pdf.module.scss
│ │ └── Pdf.tsx
│ ├── xmlui-playground
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── hooks
│ │ │ ├── usePlayground.ts
│ │ │ └── useToast.ts
│ │ ├── index.tsx
│ │ ├── playground
│ │ │ ├── Box.module.scss
│ │ │ ├── Box.tsx
│ │ │ ├── CodeSelector.tsx
│ │ │ ├── ConfirmationDialog.module.scss
│ │ │ ├── ConfirmationDialog.tsx
│ │ │ ├── Editor.tsx
│ │ │ ├── Header.module.scss
│ │ │ ├── Header.tsx
│ │ │ ├── Playground.tsx
│ │ │ ├── PlaygroundContent.module.scss
│ │ │ ├── PlaygroundContent.tsx
│ │ │ ├── PlaygroundNative.module.scss
│ │ │ ├── PlaygroundNative.tsx
│ │ │ ├── Preview.module.scss
│ │ │ ├── Preview.tsx
│ │ │ ├── Select.module.scss
│ │ │ ├── StandalonePlayground.tsx
│ │ │ ├── StandalonePlaygroundNative.module.scss
│ │ │ ├── StandalonePlaygroundNative.tsx
│ │ │ ├── ThemeSwitcher.module.scss
│ │ │ ├── ThemeSwitcher.tsx
│ │ │ ├── ToneSwitcher.tsx
│ │ │ ├── Tooltip.module.scss
│ │ │ ├── Tooltip.tsx
│ │ │ └── utils.ts
│ │ ├── providers
│ │ │ ├── Toast.module.scss
│ │ │ └── ToastProvider.tsx
│ │ ├── state
│ │ │ └── store.ts
│ │ ├── themes
│ │ │ └── theme.ts
│ │ └── utils
│ │ └── helpers.ts
│ ├── xmlui-search
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── index.tsx
│ │ ├── Search.module.scss
│ │ └── Search.tsx
│ ├── xmlui-spreadsheet
│ │ ├── .gitignore
│ │ ├── demo
│ │ │ └── Main.xmlui
│ │ ├── index.html
│ │ ├── index.ts
│ │ ├── meta
│ │ │ └── componentsMetadata.ts
│ │ ├── package.json
│ │ └── src
│ │ ├── index.tsx
│ │ ├── Spreadsheet.tsx
│ │ └── SpreadsheetNative.tsx
│ └── xmlui-website-blocks
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── demo
│ │ ├── components
│ │ │ ├── HeroBackgroundBreakoutPage.xmlui
│ │ │ ├── HeroBackgroundsPage.xmlui
│ │ │ ├── HeroContentsPage.xmlui
│ │ │ ├── HeroTextAlignPage.xmlui
│ │ │ ├── HeroTextPage.xmlui
│ │ │ └── HeroTonesPage.xmlui
│ │ ├── Main.xmlui
│ │ └── themes
│ │ └── default.ts
│ ├── index.html
│ ├── index.ts
│ ├── meta
│ │ └── componentsMetadata.ts
│ ├── package.json
│ ├── public
│ │ └── resources
│ │ ├── building.jpg
│ │ └── xmlui-logo.svg
│ └── src
│ ├── Carousel
│ │ ├── Carousel.module.scss
│ │ ├── Carousel.tsx
│ │ ├── CarouselContext.tsx
│ │ └── CarouselNative.tsx
│ ├── FancyButton
│ │ ├── FancyButton.module.scss
│ │ ├── FancyButton.tsx
│ │ └── FancyButton.xmlui
│ ├── Hello
│ │ ├── Hello.tsx
│ │ ├── Hello.xmlui
│ │ └── Hello.xmlui.xs
│ ├── HeroSection
│ │ ├── HeroSection.module.scss
│ │ ├── HeroSection.spec.ts
│ │ ├── HeroSection.tsx
│ │ └── HeroSectionNative.tsx
│ ├── index.tsx
│ ├── ScrollToTop
│ │ ├── ScrollToTop.module.scss
│ │ ├── ScrollToTop.tsx
│ │ └── ScrollToTopNative.tsx
│ └── vite-env.d.ts
├── playwright.config.ts
├── README.md
├── tools
│ ├── codefence
│ │ └── xmlui-code-fence-docs.md
│ ├── create-app
│ │ ├── .gitignore
│ │ ├── CHANGELOG.md
│ │ ├── create-app.ts
│ │ ├── helpers
│ │ │ ├── copy.ts
│ │ │ ├── get-pkg-manager.ts
│ │ │ ├── git.ts
│ │ │ ├── install.ts
│ │ │ ├── is-folder-empty.ts
│ │ │ ├── is-writeable.ts
│ │ │ ├── make-dir.ts
│ │ │ └── validate-pkg.ts
│ │ ├── index.ts
│ │ ├── package.json
│ │ ├── templates
│ │ │ ├── default
│ │ │ │ └── ts
│ │ │ │ ├── gitignore
│ │ │ │ ├── index.html
│ │ │ │ ├── index.ts
│ │ │ │ ├── public
│ │ │ │ │ ├── mockServiceWorker.js
│ │ │ │ │ ├── resources
│ │ │ │ │ │ ├── favicon.ico
│ │ │ │ │ │ └── xmlui-logo.svg
│ │ │ │ │ └── serve.json
│ │ │ │ └── src
│ │ │ │ ├── components
│ │ │ │ │ ├── ApiAware.xmlui
│ │ │ │ │ ├── Home.xmlui
│ │ │ │ │ ├── IncButton.xmlui
│ │ │ │ │ └── PagePanel.xmlui
│ │ │ │ ├── config.ts
│ │ │ │ └── Main.xmlui
│ │ │ ├── index.ts
│ │ │ └── types.ts
│ │ └── tsconfig.json
│ ├── create-xmlui-hello-world
│ │ ├── index.js
│ │ └── package.json
│ └── vscode
│ ├── .gitignore
│ ├── .vscode
│ │ ├── launch.json
│ │ └── tasks.json
│ ├── .vscodeignore
│ ├── build.sh
│ ├── CHANGELOG.md
│ ├── esbuild.js
│ ├── eslint.config.mjs
│ ├── formatter-docs.md
│ ├── generate-test-sample.sh
│ ├── LICENSE.md
│ ├── package-lock.json
│ ├── package.json
│ ├── README.md
│ ├── resources
│ │ ├── xmlui-logo.png
│ │ └── xmlui-markup-syntax-highlighting.png
│ ├── src
│ │ ├── extension.ts
│ │ └── server.ts
│ ├── syntaxes
│ │ └── xmlui.tmLanguage.json
│ ├── test-samples
│ │ └── sample.xmlui
│ ├── tsconfig.json
│ └── tsconfig.tsbuildinfo
├── turbo.json
└── xmlui
├── .gitignore
├── bin
│ ├── bootstrap.cjs
│ ├── bootstrap.js
│ ├── build-lib.ts
│ ├── build.ts
│ ├── index.ts
│ ├── preview.ts
│ ├── start.ts
│ ├── vite-xmlui-plugin.ts
│ └── viteConfig.ts
├── CHANGELOG.md
├── conventions
│ ├── component-qa-checklist.md
│ ├── copilot-conventions.md
│ ├── create-xmlui-components.md
│ ├── mermaid.md
│ ├── testing-conventions.md
│ └── xmlui-in-a-nutshell.md
├── dev-docs
│ ├── accessibility.md
│ ├── build-system.md
│ ├── build-xmlui.md
│ ├── component-behaviors.md
│ ├── component-metadata.md
│ ├── components-with-options.md
│ ├── containers.md
│ ├── data-operations.md
│ ├── glossary.md
│ ├── index.md
│ ├── next
│ │ ├── component-dev-guide.md
│ │ ├── configuration-management-enhancement-summary.md
│ │ ├── documentation-scripts-refactoring-complete-summary.md
│ │ ├── documentation-scripts-refactoring-plan.md
│ │ ├── duplicate-pattern-extraction-summary.md
│ │ ├── error-handling-standardization-summary.md
│ │ ├── generating-component-reference.md
│ │ ├── index.md
│ │ ├── logging-consistency-implementation-summary.md
│ │ ├── project-build.md
│ │ ├── project-structure.md
│ │ ├── theme-context.md
│ │ ├── tiptap-design-considerations.md
│ │ ├── working-with-code.md
│ │ ├── xmlui-runtime-architecture
│ │ └── xmlui-wcag-accessibility-report.md
│ ├── react-fundamentals.md
│ ├── release-method.md
│ ├── standalone-app.md
│ ├── theme-variables-refactoring.md
│ ├── ud-components.md
│ └── xmlui-repo.md
├── package.json
├── scripts
│ ├── coverage-only.js
│ ├── e2e-test-summary.js
│ ├── extract-component-metadata.js
│ ├── generate-docs
│ │ ├── build-downloads-map.mjs
│ │ ├── build-pages-map.mjs
│ │ ├── components-config.json
│ │ ├── configuration-management.mjs
│ │ ├── constants.mjs
│ │ ├── create-theme-files.mjs
│ │ ├── DocsGenerator.mjs
│ │ ├── error-handling.mjs
│ │ ├── extensions-config.json
│ │ ├── folders.mjs
│ │ ├── generate-summary-files.mjs
│ │ ├── get-docs.mjs
│ │ ├── input-handler.mjs
│ │ ├── logger.mjs
│ │ ├── logging-standards.mjs
│ │ ├── MetadataProcessor.mjs
│ │ ├── pattern-utilities.mjs
│ │ └── utils.mjs
│ ├── generate-metadata-markdown.js
│ ├── get-langserver-metadata.js
│ ├── inline-links.mjs
│ └── README-e2e-summary.md
├── src
│ ├── abstractions
│ │ ├── _conventions.md
│ │ ├── ActionDefs.ts
│ │ ├── AppContextDefs.ts
│ │ ├── ComponentDefs.ts
│ │ ├── ContainerDefs.ts
│ │ ├── ExtensionDefs.ts
│ │ ├── FunctionDefs.ts
│ │ ├── RendererDefs.ts
│ │ ├── scripting
│ │ │ ├── BlockScope.ts
│ │ │ ├── Compilation.ts
│ │ │ ├── LogicalThread.ts
│ │ │ ├── LoopScope.ts
│ │ │ ├── modules.ts
│ │ │ ├── ScriptParserError.ts
│ │ │ ├── Token.ts
│ │ │ ├── TryScope.ts
│ │ │ └── TryScopeExp.ts
│ │ └── ThemingDefs.ts
│ ├── components
│ │ ├── _conventions.md
│ │ ├── abstractions.ts
│ │ ├── Accordion
│ │ │ ├── Accordion.md
│ │ │ ├── Accordion.module.scss
│ │ │ ├── Accordion.spec.ts
│ │ │ ├── Accordion.tsx
│ │ │ ├── AccordionContext.tsx
│ │ │ ├── AccordionItem.tsx
│ │ │ ├── AccordionItemNative.tsx
│ │ │ └── AccordionNative.tsx
│ │ ├── Animation
│ │ │ └── AnimationNative.tsx
│ │ ├── APICall
│ │ │ ├── APICall.md
│ │ │ ├── APICall.spec.ts
│ │ │ ├── APICall.tsx
│ │ │ └── APICallNative.tsx
│ │ ├── App
│ │ │ ├── App.md
│ │ │ ├── App.module.scss
│ │ │ ├── App.spec.ts
│ │ │ ├── App.tsx
│ │ │ ├── AppLayoutContext.ts
│ │ │ ├── AppNative.tsx
│ │ │ ├── AppStateContext.ts
│ │ │ ├── doc-resources
│ │ │ │ ├── condensed-sticky.xmlui
│ │ │ │ ├── condensed.xmlui
│ │ │ │ ├── horizontal-sticky.xmlui
│ │ │ │ ├── horizontal.xmlui
│ │ │ │ ├── vertical-full-header.xmlui
│ │ │ │ ├── vertical-sticky.xmlui
│ │ │ │ └── vertical.xmlui
│ │ │ ├── IndexerContext.ts
│ │ │ ├── LinkInfoContext.ts
│ │ │ ├── SearchContext.tsx
│ │ │ ├── Sheet.module.scss
│ │ │ └── Sheet.tsx
│ │ ├── AppHeader
│ │ │ ├── AppHeader.md
│ │ │ ├── AppHeader.module.scss
│ │ │ ├── AppHeader.spec.ts
│ │ │ ├── AppHeader.tsx
│ │ │ └── AppHeaderNative.tsx
│ │ ├── AppState
│ │ │ ├── AppState.md
│ │ │ ├── AppState.spec.ts
│ │ │ ├── AppState.tsx
│ │ │ └── AppStateNative.tsx
│ │ ├── AutoComplete
│ │ │ ├── AutoComplete.md
│ │ │ ├── AutoComplete.module.scss
│ │ │ ├── AutoComplete.spec.ts
│ │ │ ├── AutoComplete.tsx
│ │ │ ├── AutoCompleteContext.tsx
│ │ │ └── AutoCompleteNative.tsx
│ │ ├── Avatar
│ │ │ ├── Avatar.md
│ │ │ ├── Avatar.module.scss
│ │ │ ├── Avatar.spec.ts
│ │ │ ├── Avatar.tsx
│ │ │ └── AvatarNative.tsx
│ │ ├── Backdrop
│ │ │ ├── Backdrop.md
│ │ │ ├── Backdrop.module.scss
│ │ │ ├── Backdrop.spec.ts
│ │ │ ├── Backdrop.tsx
│ │ │ └── BackdropNative.tsx
│ │ ├── Badge
│ │ │ ├── Badge.md
│ │ │ ├── Badge.module.scss
│ │ │ ├── Badge.spec.ts
│ │ │ ├── Badge.tsx
│ │ │ └── BadgeNative.tsx
│ │ ├── Bookmark
│ │ │ ├── Bookmark.md
│ │ │ ├── Bookmark.module.scss
│ │ │ ├── Bookmark.spec.ts
│ │ │ ├── Bookmark.tsx
│ │ │ └── BookmarkNative.tsx
│ │ ├── Breakout
│ │ │ ├── Breakout.module.scss
│ │ │ ├── Breakout.spec.ts
│ │ │ ├── Breakout.tsx
│ │ │ └── BreakoutNative.tsx
│ │ ├── Button
│ │ │ ├── Button-style.spec.ts
│ │ │ ├── Button.md
│ │ │ ├── Button.module.scss
│ │ │ ├── Button.spec.ts
│ │ │ ├── Button.tsx
│ │ │ └── ButtonNative.tsx
│ │ ├── Card
│ │ │ ├── Card.md
│ │ │ ├── Card.module.scss
│ │ │ ├── Card.spec.ts
│ │ │ ├── Card.tsx
│ │ │ └── CardNative.tsx
│ │ ├── Carousel
│ │ │ ├── Carousel.md
│ │ │ ├── Carousel.module.scss
│ │ │ ├── Carousel.spec.ts
│ │ │ ├── Carousel.tsx
│ │ │ ├── CarouselContext.tsx
│ │ │ ├── CarouselItem.tsx
│ │ │ ├── CarouselItemNative.tsx
│ │ │ └── CarouselNative.tsx
│ │ ├── ChangeListener
│ │ │ ├── ChangeListener.md
│ │ │ ├── ChangeListener.spec.ts
│ │ │ ├── ChangeListener.tsx
│ │ │ └── ChangeListenerNative.tsx
│ │ ├── chart-color-schemes.ts
│ │ ├── Charts
│ │ │ ├── AreaChart
│ │ │ │ ├── AreaChart.md
│ │ │ │ ├── AreaChart.spec.ts
│ │ │ │ ├── AreaChart.tsx
│ │ │ │ └── AreaChartNative.tsx
│ │ │ ├── BarChart
│ │ │ │ ├── BarChart.md
│ │ │ │ ├── BarChart.module.scss
│ │ │ │ ├── BarChart.spec.ts
│ │ │ │ ├── BarChart.tsx
│ │ │ │ └── BarChartNative.tsx
│ │ │ ├── DonutChart
│ │ │ │ ├── DonutChart.spec.ts
│ │ │ │ └── DonutChart.tsx
│ │ │ ├── LabelList
│ │ │ │ ├── LabelList.module.scss
│ │ │ │ ├── LabelList.spec.ts
│ │ │ │ ├── LabelList.tsx
│ │ │ │ └── LabelListNative.tsx
│ │ │ ├── Legend
│ │ │ │ ├── Legend.spec.ts
│ │ │ │ ├── Legend.tsx
│ │ │ │ └── LegendNative.tsx
│ │ │ ├── LineChart
│ │ │ │ ├── LineChart.md
│ │ │ │ ├── LineChart.module.scss
│ │ │ │ ├── LineChart.spec.ts
│ │ │ │ ├── LineChart.tsx
│ │ │ │ └── LineChartNative.tsx
│ │ │ ├── PieChart
│ │ │ │ ├── PieChart.md
│ │ │ │ ├── PieChart.spec.ts
│ │ │ │ ├── PieChart.tsx
│ │ │ │ ├── PieChartNative.module.scss
│ │ │ │ └── PieChartNative.tsx
│ │ │ ├── RadarChart
│ │ │ │ ├── RadarChart.md
│ │ │ │ ├── RadarChart.spec.ts
│ │ │ │ ├── RadarChart.tsx
│ │ │ │ └── RadarChartNative.tsx
│ │ │ ├── Tooltip
│ │ │ │ ├── TooltipContent.module.scss
│ │ │ │ ├── TooltipContent.spec.ts
│ │ │ │ └── TooltipContent.tsx
│ │ │ └── utils
│ │ │ ├── abstractions.ts
│ │ │ └── ChartProvider.tsx
│ │ ├── Checkbox
│ │ │ ├── Checkbox.md
│ │ │ ├── Checkbox.spec.ts
│ │ │ └── Checkbox.tsx
│ │ ├── CodeBlock
│ │ │ ├── CodeBlock.module.scss
│ │ │ ├── CodeBlock.spec.ts
│ │ │ ├── CodeBlock.tsx
│ │ │ ├── CodeBlockNative.tsx
│ │ │ └── highlight-code.ts
│ │ ├── collectedComponentMetadata.ts
│ │ ├── ColorPicker
│ │ │ ├── ColorPicker.md
│ │ │ ├── ColorPicker.module.scss
│ │ │ ├── ColorPicker.spec.ts
│ │ │ ├── ColorPicker.tsx
│ │ │ └── ColorPickerNative.tsx
│ │ ├── Column
│ │ │ ├── Column.md
│ │ │ ├── Column.tsx
│ │ │ ├── ColumnNative.tsx
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ └── TableContext.tsx
│ │ ├── component-utils.ts
│ │ ├── ComponentProvider.tsx
│ │ ├── ComponentRegistryContext.tsx
│ │ ├── container-helpers.tsx
│ │ ├── ContentSeparator
│ │ │ ├── ContentSeparator.md
│ │ │ ├── ContentSeparator.module.scss
│ │ │ ├── ContentSeparator.spec.ts
│ │ │ ├── ContentSeparator.tsx
│ │ │ └── ContentSeparatorNative.tsx
│ │ ├── DataSource
│ │ │ ├── DataSource.md
│ │ │ └── DataSource.tsx
│ │ ├── DateInput
│ │ │ ├── DateInput.md
│ │ │ ├── DateInput.module.scss
│ │ │ ├── DateInput.spec.ts
│ │ │ ├── DateInput.tsx
│ │ │ └── DateInputNative.tsx
│ │ ├── DatePicker
│ │ │ ├── DatePicker.md
│ │ │ ├── DatePicker.module.scss
│ │ │ ├── DatePicker.spec.ts
│ │ │ ├── DatePicker.tsx
│ │ │ └── DatePickerNative.tsx
│ │ ├── DropdownMenu
│ │ │ ├── DropdownMenu.md
│ │ │ ├── DropdownMenu.module.scss
│ │ │ ├── DropdownMenu.spec.ts
│ │ │ ├── DropdownMenu.tsx
│ │ │ ├── DropdownMenuNative.tsx
│ │ │ ├── MenuItem.md
│ │ │ └── SubMenuItem.md
│ │ ├── EmojiSelector
│ │ │ ├── EmojiSelector.md
│ │ │ ├── EmojiSelector.spec.ts
│ │ │ ├── EmojiSelector.tsx
│ │ │ └── EmojiSelectorNative.tsx
│ │ ├── ExpandableItem
│ │ │ ├── ExpandableItem.module.scss
│ │ │ ├── ExpandableItem.spec.ts
│ │ │ ├── ExpandableItem.tsx
│ │ │ └── ExpandableItemNative.tsx
│ │ ├── FileInput
│ │ │ ├── FileInput.md
│ │ │ ├── FileInput.module.scss
│ │ │ ├── FileInput.spec.ts
│ │ │ ├── FileInput.tsx
│ │ │ └── FileInputNative.tsx
│ │ ├── FileUploadDropZone
│ │ │ ├── FileUploadDropZone.md
│ │ │ ├── FileUploadDropZone.module.scss
│ │ │ ├── FileUploadDropZone.spec.ts
│ │ │ ├── FileUploadDropZone.tsx
│ │ │ └── FileUploadDropZoneNative.tsx
│ │ ├── FlowLayout
│ │ │ ├── FlowLayout.md
│ │ │ ├── FlowLayout.module.scss
│ │ │ ├── FlowLayout.spec.ts
│ │ │ ├── FlowLayout.spec.ts-snapshots
│ │ │ │ └── Edge-cases-boxShadow-is-not-clipped-1-non-smoke-darwin.png
│ │ │ ├── FlowLayout.tsx
│ │ │ └── FlowLayoutNative.tsx
│ │ ├── Footer
│ │ │ ├── Footer.md
│ │ │ ├── Footer.module.scss
│ │ │ ├── Footer.spec.ts
│ │ │ ├── Footer.tsx
│ │ │ └── FooterNative.tsx
│ │ ├── Form
│ │ │ ├── Form.md
│ │ │ ├── Form.module.scss
│ │ │ ├── Form.spec.ts
│ │ │ ├── Form.tsx
│ │ │ ├── formActions.ts
│ │ │ ├── FormContext.ts
│ │ │ └── FormNative.tsx
│ │ ├── FormItem
│ │ │ ├── FormItem.md
│ │ │ ├── FormItem.module.scss
│ │ │ ├── FormItem.spec.ts
│ │ │ ├── FormItem.tsx
│ │ │ ├── FormItemNative.tsx
│ │ │ ├── HelperText.module.scss
│ │ │ ├── HelperText.tsx
│ │ │ ├── ItemWithLabel.tsx
│ │ │ └── Validations.ts
│ │ ├── FormSection
│ │ │ ├── FormSection.md
│ │ │ ├── FormSection.ts
│ │ │ └── FormSection.xmlui
│ │ ├── Fragment
│ │ │ ├── Fragment.spec.ts
│ │ │ └── Fragment.tsx
│ │ ├── Heading
│ │ │ ├── abstractions.ts
│ │ │ ├── H1.md
│ │ │ ├── H1.spec.ts
│ │ │ ├── H2.md
│ │ │ ├── H2.spec.ts
│ │ │ ├── H3.md
│ │ │ ├── H3.spec.ts
│ │ │ ├── H4.md
│ │ │ ├── H4.spec.ts
│ │ │ ├── H5.md
│ │ │ ├── H5.spec.ts
│ │ │ ├── H6.md
│ │ │ ├── H6.spec.ts
│ │ │ ├── Heading.md
│ │ │ ├── Heading.module.scss
│ │ │ ├── Heading.spec.ts
│ │ │ ├── Heading.tsx
│ │ │ └── HeadingNative.tsx
│ │ ├── HoverCard
│ │ │ ├── HoverCard.tsx
│ │ │ └── HovercardNative.tsx
│ │ ├── HtmlTags
│ │ │ ├── HtmlTags.module.scss
│ │ │ ├── HtmlTags.spec.ts
│ │ │ └── HtmlTags.tsx
│ │ ├── Icon
│ │ │ ├── AdmonitionDanger.tsx
│ │ │ ├── AdmonitionInfo.tsx
│ │ │ ├── AdmonitionNote.tsx
│ │ │ ├── AdmonitionTip.tsx
│ │ │ ├── AdmonitionWarning.tsx
│ │ │ ├── ApiIcon.tsx
│ │ │ ├── ArrowDropDown.module.scss
│ │ │ ├── ArrowDropDown.tsx
│ │ │ ├── ArrowDropUp.module.scss
│ │ │ ├── ArrowDropUp.tsx
│ │ │ ├── ArrowLeft.module.scss
│ │ │ ├── ArrowLeft.tsx
│ │ │ ├── ArrowRight.module.scss
│ │ │ ├── ArrowRight.tsx
│ │ │ ├── Attach.tsx
│ │ │ ├── Binding.module.scss
│ │ │ ├── Binding.tsx
│ │ │ ├── BoardIcon.tsx
│ │ │ ├── BoxIcon.tsx
│ │ │ ├── CheckIcon.tsx
│ │ │ ├── ChevronDownIcon.tsx
│ │ │ ├── ChevronLeft.tsx
│ │ │ ├── ChevronRight.tsx
│ │ │ ├── ChevronUpIcon.tsx
│ │ │ ├── CodeFileIcon.tsx
│ │ │ ├── CodeSandbox.tsx
│ │ │ ├── CompactListIcon.tsx
│ │ │ ├── ContentCopyIcon.tsx
│ │ │ ├── DarkToLightIcon.tsx
│ │ │ ├── DatabaseIcon.module.scss
│ │ │ ├── DatabaseIcon.tsx
│ │ │ ├── DocFileIcon.tsx
│ │ │ ├── DocIcon.tsx
│ │ │ ├── DotMenuHorizontalIcon.tsx
│ │ │ ├── DotMenuIcon.tsx
│ │ │ ├── EmailIcon.tsx
│ │ │ ├── EmptyFolderIcon.tsx
│ │ │ ├── ErrorIcon.tsx
│ │ │ ├── ExpressionIcon.tsx
│ │ │ ├── FillPlusCricleIcon.tsx
│ │ │ ├── FilterIcon.tsx
│ │ │ ├── FolderIcon.tsx
│ │ │ ├── GlobeIcon.tsx
│ │ │ ├── HomeIcon.tsx
│ │ │ ├── HyperLinkIcon.tsx
│ │ │ ├── Icon.md
│ │ │ ├── Icon.module.scss
│ │ │ ├── Icon.spec.ts
│ │ │ ├── Icon.tsx
│ │ │ ├── IconNative.tsx
│ │ │ ├── ImageFileIcon.tsx
│ │ │ ├── Inspect.tsx
│ │ │ ├── LightToDark.tsx
│ │ │ ├── LinkIcon.tsx
│ │ │ ├── ListIcon.tsx
│ │ │ ├── LooseListIcon.tsx
│ │ │ ├── MoonIcon.tsx
│ │ │ ├── MoreOptionsIcon.tsx
│ │ │ ├── NoSortIcon.tsx
│ │ │ ├── PDFIcon.tsx
│ │ │ ├── PenIcon.tsx
│ │ │ ├── PhoneIcon.tsx
│ │ │ ├── PhotoIcon.tsx
│ │ │ ├── PlusIcon.tsx
│ │ │ ├── SearchIcon.tsx
│ │ │ ├── ShareIcon.tsx
│ │ │ ├── SortAscendingIcon.tsx
│ │ │ ├── SortDescendingIcon.tsx
│ │ │ ├── StarsIcon.tsx
│ │ │ ├── SunIcon.tsx
│ │ │ ├── svg
│ │ │ │ ├── admonition_danger.svg
│ │ │ │ ├── admonition_info.svg
│ │ │ │ ├── admonition_note.svg
│ │ │ │ ├── admonition_tip.svg
│ │ │ │ ├── admonition_warning.svg
│ │ │ │ ├── api.svg
│ │ │ │ ├── arrow-dropdown.svg
│ │ │ │ ├── arrow-left.svg
│ │ │ │ ├── arrow-right.svg
│ │ │ │ ├── arrow-up.svg
│ │ │ │ ├── attach.svg
│ │ │ │ ├── binding.svg
│ │ │ │ ├── box.svg
│ │ │ │ ├── bulb.svg
│ │ │ │ ├── code-file.svg
│ │ │ │ ├── code-sandbox.svg
│ │ │ │ ├── dark_to_light.svg
│ │ │ │ ├── database.svg
│ │ │ │ ├── doc.svg
│ │ │ │ ├── empty-folder.svg
│ │ │ │ ├── expression.svg
│ │ │ │ ├── eye-closed.svg
│ │ │ │ ├── eye-dark.svg
│ │ │ │ ├── eye.svg
│ │ │ │ ├── file-text.svg
│ │ │ │ ├── filter.svg
│ │ │ │ ├── folder.svg
│ │ │ │ ├── img.svg
│ │ │ │ ├── inspect.svg
│ │ │ │ ├── light_to_dark.svg
│ │ │ │ ├── moon.svg
│ │ │ │ ├── pdf.svg
│ │ │ │ ├── photo.svg
│ │ │ │ ├── share.svg
│ │ │ │ ├── stars.svg
│ │ │ │ ├── sun.svg
│ │ │ │ ├── trending-down.svg
│ │ │ │ ├── trending-level.svg
│ │ │ │ ├── trending-up.svg
│ │ │ │ ├── txt.svg
│ │ │ │ ├── unknown-file.svg
│ │ │ │ ├── unlink.svg
│ │ │ │ └── xls.svg
│ │ │ ├── TableDeleteColumnIcon.tsx
│ │ │ ├── TableDeleteRowIcon.tsx
│ │ │ ├── TableInsertColumnIcon.tsx
│ │ │ ├── TableInsertRowIcon.tsx
│ │ │ ├── TrashIcon.tsx
│ │ │ ├── TrendingDownIcon.tsx
│ │ │ ├── TrendingLevelIcon.tsx
│ │ │ ├── TrendingUpIcon.tsx
│ │ │ ├── TxtIcon.tsx
│ │ │ ├── UnknownFileIcon.tsx
│ │ │ ├── UnlinkIcon.tsx
│ │ │ ├── UserIcon.tsx
│ │ │ ├── WarningIcon.tsx
│ │ │ └── XlsIcon.tsx
│ │ ├── IconProvider.tsx
│ │ ├── IconRegistryContext.tsx
│ │ ├── IFrame
│ │ │ ├── IFrame.md
│ │ │ ├── IFrame.module.scss
│ │ │ ├── IFrame.spec.ts
│ │ │ ├── IFrame.tsx
│ │ │ └── IFrameNative.tsx
│ │ ├── Image
│ │ │ ├── Image.md
│ │ │ ├── Image.module.scss
│ │ │ ├── Image.spec.ts
│ │ │ ├── Image.tsx
│ │ │ └── ImageNative.tsx
│ │ ├── Input
│ │ │ ├── index.ts
│ │ │ ├── InputAdornment.module.scss
│ │ │ ├── InputAdornment.tsx
│ │ │ ├── InputDivider.module.scss
│ │ │ ├── InputDivider.tsx
│ │ │ ├── InputLabel.module.scss
│ │ │ ├── InputLabel.tsx
│ │ │ ├── PartialInput.module.scss
│ │ │ └── PartialInput.tsx
│ │ ├── InspectButton
│ │ │ ├── InspectButton.module.scss
│ │ │ └── InspectButton.tsx
│ │ ├── Items
│ │ │ ├── Items.md
│ │ │ ├── Items.spec.ts
│ │ │ ├── Items.tsx
│ │ │ └── ItemsNative.tsx
│ │ ├── Link
│ │ │ ├── Link.md
│ │ │ ├── Link.module.scss
│ │ │ ├── Link.spec.ts
│ │ │ ├── Link.tsx
│ │ │ └── LinkNative.tsx
│ │ ├── List
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ ├── List.md
│ │ │ ├── List.module.scss
│ │ │ ├── List.spec.ts
│ │ │ ├── List.tsx
│ │ │ └── ListNative.tsx
│ │ ├── Logo
│ │ │ ├── doc-resources
│ │ │ │ └── xmlui-logo.svg
│ │ │ ├── Logo.md
│ │ │ ├── Logo.tsx
│ │ │ └── LogoNative.tsx
│ │ ├── Markdown
│ │ │ ├── CodeText.module.scss
│ │ │ ├── CodeText.tsx
│ │ │ ├── Markdown.md
│ │ │ ├── Markdown.module.scss
│ │ │ ├── Markdown.spec.ts
│ │ │ ├── Markdown.tsx
│ │ │ ├── MarkdownNative.tsx
│ │ │ ├── parse-binding-expr.ts
│ │ │ └── utils.ts
│ │ ├── metadata-helpers.ts
│ │ ├── ModalDialog
│ │ │ ├── ConfirmationModalContextProvider.tsx
│ │ │ ├── Dialog.module.scss
│ │ │ ├── Dialog.tsx
│ │ │ ├── ModalDialog.md
│ │ │ ├── ModalDialog.module.scss
│ │ │ ├── ModalDialog.spec.ts
│ │ │ ├── ModalDialog.tsx
│ │ │ ├── ModalDialogNative.tsx
│ │ │ └── ModalVisibilityContext.tsx
│ │ ├── NavGroup
│ │ │ ├── NavGroup.md
│ │ │ ├── NavGroup.module.scss
│ │ │ ├── NavGroup.spec.ts
│ │ │ ├── NavGroup.tsx
│ │ │ ├── NavGroupContext.ts
│ │ │ └── NavGroupNative.tsx
│ │ ├── NavLink
│ │ │ ├── NavLink.md
│ │ │ ├── NavLink.module.scss
│ │ │ ├── NavLink.spec.ts
│ │ │ ├── NavLink.tsx
│ │ │ └── NavLinkNative.tsx
│ │ ├── NavPanel
│ │ │ ├── NavPanel.md
│ │ │ ├── NavPanel.module.scss
│ │ │ ├── NavPanel.spec.ts
│ │ │ ├── NavPanel.tsx
│ │ │ └── NavPanelNative.tsx
│ │ ├── NestedApp
│ │ │ ├── AppWithCodeView.module.scss
│ │ │ ├── AppWithCodeView.tsx
│ │ │ ├── AppWithCodeViewNative.tsx
│ │ │ ├── defaultProps.tsx
│ │ │ ├── logo.svg
│ │ │ ├── NestedApp.module.scss
│ │ │ ├── NestedApp.tsx
│ │ │ ├── NestedAppNative.tsx
│ │ │ ├── Tooltip.module.scss
│ │ │ ├── Tooltip.tsx
│ │ │ └── utils.ts
│ │ ├── NoResult
│ │ │ ├── NoResult.md
│ │ │ ├── NoResult.module.scss
│ │ │ ├── NoResult.spec.ts
│ │ │ ├── NoResult.tsx
│ │ │ └── NoResultNative.tsx
│ │ ├── NumberBox
│ │ │ ├── numberbox-abstractions.ts
│ │ │ ├── NumberBox.md
│ │ │ ├── NumberBox.module.scss
│ │ │ ├── NumberBox.spec.ts
│ │ │ ├── NumberBox.tsx
│ │ │ └── NumberBoxNative.tsx
│ │ ├── Option
│ │ │ ├── Option.md
│ │ │ ├── Option.spec.ts
│ │ │ ├── Option.tsx
│ │ │ ├── OptionNative.tsx
│ │ │ └── OptionTypeProvider.tsx
│ │ ├── PageMetaTitle
│ │ │ ├── PageMetaTilteNative.tsx
│ │ │ ├── PageMetaTitle.md
│ │ │ ├── PageMetaTitle.spec.ts
│ │ │ └── PageMetaTitle.tsx
│ │ ├── Pages
│ │ │ ├── Page.md
│ │ │ ├── Pages.md
│ │ │ ├── Pages.module.scss
│ │ │ ├── Pages.tsx
│ │ │ └── PagesNative.tsx
│ │ ├── Pagination
│ │ │ ├── Pagination.md
│ │ │ ├── Pagination.module.scss
│ │ │ ├── Pagination.spec.ts
│ │ │ ├── Pagination.tsx
│ │ │ └── PaginationNative.tsx
│ │ ├── PositionedContainer
│ │ │ ├── PositionedContainer.module.scss
│ │ │ ├── PositionedContainer.tsx
│ │ │ └── PositionedContainerNative.tsx
│ │ ├── ProfileMenu
│ │ │ ├── ProfileMenu.module.scss
│ │ │ └── ProfileMenu.tsx
│ │ ├── ProgressBar
│ │ │ ├── ProgressBar.md
│ │ │ ├── ProgressBar.module.scss
│ │ │ ├── ProgressBar.spec.ts
│ │ │ ├── ProgressBar.tsx
│ │ │ └── ProgressBarNative.tsx
│ │ ├── Queue
│ │ │ ├── Queue.md
│ │ │ ├── Queue.spec.ts
│ │ │ ├── Queue.tsx
│ │ │ ├── queueActions.ts
│ │ │ └── QueueNative.tsx
│ │ ├── RadioGroup
│ │ │ ├── RadioGroup.md
│ │ │ ├── RadioGroup.module.scss
│ │ │ ├── RadioGroup.spec.ts
│ │ │ ├── RadioGroup.tsx
│ │ │ ├── RadioGroupNative.tsx
│ │ │ ├── RadioItem.tsx
│ │ │ └── RadioItemNative.tsx
│ │ ├── RealTimeAdapter
│ │ │ ├── RealTimeAdapter.tsx
│ │ │ └── RealTimeAdapterNative.tsx
│ │ ├── Redirect
│ │ │ ├── Redirect.md
│ │ │ ├── Redirect.spec.ts
│ │ │ └── Redirect.tsx
│ │ ├── ResponsiveBar
│ │ │ ├── README.md
│ │ │ ├── ResponsiveBar.md
│ │ │ ├── ResponsiveBar.module.scss
│ │ │ ├── ResponsiveBar.spec.ts
│ │ │ ├── ResponsiveBar.tsx
│ │ │ └── ResponsiveBarNative.tsx
│ │ ├── Select
│ │ │ ├── HiddenOption.tsx
│ │ │ ├── OptionContext.ts
│ │ │ ├── Select.md
│ │ │ ├── Select.module.scss
│ │ │ ├── Select.spec.ts
│ │ │ ├── Select.tsx
│ │ │ ├── SelectContext.tsx
│ │ │ └── SelectNative.tsx
│ │ ├── SelectionStore
│ │ │ ├── SelectionStore.md
│ │ │ ├── SelectionStore.tsx
│ │ │ └── SelectionStoreNative.tsx
│ │ ├── Slider
│ │ │ ├── Slider.md
│ │ │ ├── Slider.module.scss
│ │ │ ├── Slider.spec.ts
│ │ │ ├── Slider.tsx
│ │ │ └── SliderNative.tsx
│ │ ├── Slot
│ │ │ ├── Slot.md
│ │ │ ├── Slot.spec.ts
│ │ │ └── Slot.ts
│ │ ├── SlotItem.tsx
│ │ ├── SpaceFiller
│ │ │ ├── SpaceFiller.md
│ │ │ ├── SpaceFiller.module.scss
│ │ │ ├── SpaceFiller.spec.ts
│ │ │ ├── SpaceFiller.tsx
│ │ │ └── SpaceFillerNative.tsx
│ │ ├── Spinner
│ │ │ ├── Spinner.md
│ │ │ ├── Spinner.module.scss
│ │ │ ├── Spinner.spec.ts
│ │ │ ├── Spinner.tsx
│ │ │ └── SpinnerNative.tsx
│ │ ├── Splitter
│ │ │ ├── HSplitter.md
│ │ │ ├── HSplitter.spec.ts
│ │ │ ├── Splitter.md
│ │ │ ├── Splitter.module.scss
│ │ │ ├── Splitter.spec.ts
│ │ │ ├── Splitter.tsx
│ │ │ ├── SplitterNative.tsx
│ │ │ ├── utils.ts
│ │ │ ├── VSplitter.md
│ │ │ └── VSplitter.spec.ts
│ │ ├── Stack
│ │ │ ├── CHStack.md
│ │ │ ├── CHStack.spec.ts
│ │ │ ├── CVStack.md
│ │ │ ├── CVStack.spec.ts
│ │ │ ├── HStack.md
│ │ │ ├── HStack.spec.ts
│ │ │ ├── Stack.md
│ │ │ ├── Stack.module.scss
│ │ │ ├── Stack.spec.ts
│ │ │ ├── Stack.tsx
│ │ │ ├── StackNative.tsx
│ │ │ ├── VStack.md
│ │ │ └── VStack.spec.ts
│ │ ├── StickyBox
│ │ │ ├── StickyBox.md
│ │ │ ├── StickyBox.module.scss
│ │ │ ├── StickyBox.tsx
│ │ │ └── StickyBoxNative.tsx
│ │ ├── Switch
│ │ │ ├── Switch.md
│ │ │ ├── Switch.spec.ts
│ │ │ └── Switch.tsx
│ │ ├── Table
│ │ │ ├── doc-resources
│ │ │ │ └── list-component-data.js
│ │ │ ├── react-table-config.d.ts
│ │ │ ├── Table.md
│ │ │ ├── Table.module.scss
│ │ │ ├── Table.spec.ts
│ │ │ ├── Table.tsx
│ │ │ ├── TableNative.tsx
│ │ │ └── useRowSelection.tsx
│ │ ├── TableOfContents
│ │ │ ├── TableOfContents.module.scss
│ │ │ ├── TableOfContents.spec.ts
│ │ │ ├── TableOfContents.tsx
│ │ │ └── TableOfContentsNative.tsx
│ │ ├── Tabs
│ │ │ ├── TabContext.tsx
│ │ │ ├── TabItem.md
│ │ │ ├── TabItem.tsx
│ │ │ ├── TabItemNative.tsx
│ │ │ ├── Tabs.md
│ │ │ ├── Tabs.module.scss
│ │ │ ├── Tabs.spec.ts
│ │ │ ├── Tabs.tsx
│ │ │ └── TabsNative.tsx
│ │ ├── Text
│ │ │ ├── Text.md
│ │ │ ├── Text.module.scss
│ │ │ ├── Text.spec.ts
│ │ │ ├── Text.tsx
│ │ │ └── TextNative.tsx
│ │ ├── TextArea
│ │ │ ├── TextArea.md
│ │ │ ├── TextArea.module.scss
│ │ │ ├── TextArea.spec.ts
│ │ │ ├── TextArea.tsx
│ │ │ ├── TextAreaNative.tsx
│ │ │ ├── TextAreaResizable.tsx
│ │ │ └── useComposedRef.ts
│ │ ├── TextBox
│ │ │ ├── TextBox.md
│ │ │ ├── TextBox.module.scss
│ │ │ ├── TextBox.spec.ts
│ │ │ ├── TextBox.tsx
│ │ │ └── TextBoxNative.tsx
│ │ ├── Theme
│ │ │ ├── NotificationToast.tsx
│ │ │ ├── Theme.md
│ │ │ ├── Theme.module.scss
│ │ │ ├── Theme.spec.ts
│ │ │ ├── Theme.tsx
│ │ │ └── ThemeNative.tsx
│ │ ├── TimeInput
│ │ │ ├── TimeInput.md
│ │ │ ├── TimeInput.module.scss
│ │ │ ├── TimeInput.spec.ts
│ │ │ ├── TimeInput.tsx
│ │ │ ├── TimeInputNative.tsx
│ │ │ └── utils.ts
│ │ ├── Timer
│ │ │ ├── Timer.md
│ │ │ ├── Timer.spec.ts
│ │ │ ├── Timer.tsx
│ │ │ └── TimerNative.tsx
│ │ ├── Toggle
│ │ │ ├── Toggle.module.scss
│ │ │ └── Toggle.tsx
│ │ ├── ToneChangerButton
│ │ │ ├── ToneChangerButton.md
│ │ │ ├── ToneChangerButton.spec.ts
│ │ │ └── ToneChangerButton.tsx
│ │ ├── ToneSwitch
│ │ │ ├── ToneSwitch.md
│ │ │ ├── ToneSwitch.module.scss
│ │ │ ├── ToneSwitch.spec.ts
│ │ │ ├── ToneSwitch.tsx
│ │ │ └── ToneSwitchNative.tsx
│ │ ├── Tooltip
│ │ │ ├── Tooltip.md
│ │ │ ├── Tooltip.module.scss
│ │ │ ├── Tooltip.spec.ts
│ │ │ ├── Tooltip.tsx
│ │ │ └── TooltipNative.tsx
│ │ ├── Tree
│ │ │ ├── testData.ts
│ │ │ ├── Tree-dynamic.spec.ts
│ │ │ ├── Tree-icons.spec.ts
│ │ │ ├── Tree.md
│ │ │ ├── Tree.spec.ts
│ │ │ ├── TreeComponent.module.scss
│ │ │ ├── TreeComponent.tsx
│ │ │ └── TreeNative.tsx
│ │ ├── TreeDisplay
│ │ │ ├── TreeDisplay.md
│ │ │ ├── TreeDisplay.module.scss
│ │ │ ├── TreeDisplay.tsx
│ │ │ └── TreeDisplayNative.tsx
│ │ ├── ValidationSummary
│ │ │ ├── ValidationSummary.module.scss
│ │ │ └── ValidationSummary.tsx
│ │ └── VisuallyHidden.tsx
│ ├── components-core
│ │ ├── abstractions
│ │ │ ├── ComponentRenderer.ts
│ │ │ ├── LoaderRenderer.ts
│ │ │ ├── standalone.ts
│ │ │ └── treeAbstractions.ts
│ │ ├── action
│ │ │ ├── actions.ts
│ │ │ ├── APICall.tsx
│ │ │ ├── FileDownloadAction.tsx
│ │ │ ├── FileUploadAction.tsx
│ │ │ ├── NavigateAction.tsx
│ │ │ └── TimedAction.tsx
│ │ ├── ApiBoundComponent.tsx
│ │ ├── appContext
│ │ │ ├── date-functions.ts
│ │ │ ├── math-function.ts
│ │ │ └── misc-utils.ts
│ │ ├── AppContext.tsx
│ │ ├── behaviors
│ │ │ ├── Behavior.tsx
│ │ │ └── CoreBehaviors.tsx
│ │ ├── component-hooks.ts
│ │ ├── ComponentDecorator.tsx
│ │ ├── ComponentViewer.tsx
│ │ ├── CompoundComponent.tsx
│ │ ├── constants.ts
│ │ ├── DebugViewProvider.tsx
│ │ ├── descriptorHelper.ts
│ │ ├── devtools
│ │ │ ├── InspectorDialog.module.scss
│ │ │ ├── InspectorDialog.tsx
│ │ │ └── InspectorDialogVisibilityContext.tsx
│ │ ├── EngineError.ts
│ │ ├── event-handlers.ts
│ │ ├── InspectorButton.module.scss
│ │ ├── InspectorContext.tsx
│ │ ├── interception
│ │ │ ├── abstractions.ts
│ │ │ ├── ApiInterceptor.ts
│ │ │ ├── ApiInterceptorProvider.tsx
│ │ │ ├── apiInterceptorWorker.ts
│ │ │ ├── Backend.ts
│ │ │ ├── Errors.ts
│ │ │ ├── IndexedDb.ts
│ │ │ ├── initMock.ts
│ │ │ ├── InMemoryDb.ts
│ │ │ ├── ReadonlyCollection.ts
│ │ │ └── useApiInterceptorContext.tsx
│ │ ├── loader
│ │ │ ├── ApiLoader.tsx
│ │ │ ├── DataLoader.tsx
│ │ │ ├── ExternalDataLoader.tsx
│ │ │ ├── Loader.tsx
│ │ │ ├── MockLoaderRenderer.tsx
│ │ │ └── PageableLoader.tsx
│ │ ├── LoaderComponent.tsx
│ │ ├── markup-check.ts
│ │ ├── parts.ts
│ │ ├── renderers.ts
│ │ ├── rendering
│ │ │ ├── AppContent.tsx
│ │ │ ├── AppRoot.tsx
│ │ │ ├── AppWrapper.tsx
│ │ │ ├── buildProxy.ts
│ │ │ ├── collectFnVarDeps.ts
│ │ │ ├── ComponentAdapter.tsx
│ │ │ ├── ComponentWrapper.tsx
│ │ │ ├── Container.tsx
│ │ │ ├── containers.ts
│ │ │ ├── ContainerWrapper.tsx
│ │ │ ├── ErrorBoundary.module.scss
│ │ │ ├── ErrorBoundary.tsx
│ │ │ ├── InvalidComponent.module.scss
│ │ │ ├── InvalidComponent.tsx
│ │ │ ├── nodeUtils.ts
│ │ │ ├── reducer.ts
│ │ │ ├── renderChild.tsx
│ │ │ ├── StandaloneComponent.tsx
│ │ │ ├── StateContainer.tsx
│ │ │ ├── UnknownComponent.module.scss
│ │ │ ├── UnknownComponent.tsx
│ │ │ └── valueExtractor.ts
│ │ ├── reportEngineError.ts
│ │ ├── RestApiProxy.ts
│ │ ├── script-runner
│ │ │ ├── asyncProxy.ts
│ │ │ ├── AttributeValueParser.ts
│ │ │ ├── bannedFunctions.ts
│ │ │ ├── BindingTreeEvaluationContext.ts
│ │ │ ├── eval-tree-async.ts
│ │ │ ├── eval-tree-common.ts
│ │ │ ├── eval-tree-sync.ts
│ │ │ ├── ParameterParser.ts
│ │ │ ├── process-statement-async.ts
│ │ │ ├── process-statement-common.ts
│ │ │ ├── process-statement-sync.ts
│ │ │ ├── ScriptingSourceTree.ts
│ │ │ ├── simplify-expression.ts
│ │ │ ├── statement-queue.ts
│ │ │ └── visitors.ts
│ │ ├── StandaloneApp.tsx
│ │ ├── StandaloneExtensionManager.ts
│ │ ├── TableOfContentsContext.tsx
│ │ ├── theming
│ │ │ ├── _themes.scss
│ │ │ ├── component-layout-resolver.ts
│ │ │ ├── extendThemeUtils.ts
│ │ │ ├── hvar.ts
│ │ │ ├── layout-resolver.ts
│ │ │ ├── parse-layout-props.ts
│ │ │ ├── StyleContext.tsx
│ │ │ ├── StyleRegistry.ts
│ │ │ ├── ThemeContext.tsx
│ │ │ ├── ThemeProvider.tsx
│ │ │ ├── themes
│ │ │ │ ├── base-utils.ts
│ │ │ │ ├── palette.ts
│ │ │ │ ├── root.ts
│ │ │ │ ├── solid.ts
│ │ │ │ ├── theme-colors.ts
│ │ │ │ └── xmlui.ts
│ │ │ ├── themeVars.module.scss
│ │ │ ├── themeVars.ts
│ │ │ ├── transformThemeVars.ts
│ │ │ └── utils.ts
│ │ ├── utils
│ │ │ ├── actionUtils.ts
│ │ │ ├── audio-utils.ts
│ │ │ ├── base64-utils.ts
│ │ │ ├── compound-utils.ts
│ │ │ ├── css-utils.ts
│ │ │ ├── DataLoaderQueryKeyGenerator.ts
│ │ │ ├── date-utils.ts
│ │ │ ├── extractParam.ts
│ │ │ ├── hooks.tsx
│ │ │ ├── LruCache.ts
│ │ │ ├── mergeProps.ts
│ │ │ ├── misc.ts
│ │ │ ├── request-params.ts
│ │ │ ├── statementUtils.ts
│ │ │ └── treeUtils.ts
│ │ └── xmlui-parser.ts
│ ├── index-standalone.ts
│ ├── index.scss
│ ├── index.ts
│ ├── language-server
│ │ ├── server-common.ts
│ │ ├── server-web-worker.ts
│ │ ├── server.ts
│ │ ├── services
│ │ │ ├── common
│ │ │ │ ├── docs-generation.ts
│ │ │ │ ├── lsp-utils.ts
│ │ │ │ ├── metadata-utils.ts
│ │ │ │ └── syntax-node-utilities.ts
│ │ │ ├── completion.ts
│ │ │ ├── diagnostic.ts
│ │ │ ├── format.ts
│ │ │ └── hover.ts
│ │ └── xmlui-metadata-generated.js
│ ├── logging
│ │ ├── LoggerContext.tsx
│ │ ├── LoggerInitializer.tsx
│ │ ├── LoggerService.ts
│ │ └── xmlui.ts
│ ├── logo.svg
│ ├── parsers
│ │ ├── common
│ │ │ ├── GenericToken.ts
│ │ │ ├── InputStream.ts
│ │ │ └── utils.ts
│ │ ├── scripting
│ │ │ ├── code-behind-collect.ts
│ │ │ ├── Lexer.ts
│ │ │ ├── modules.ts
│ │ │ ├── Parser.ts
│ │ │ ├── ParserError.ts
│ │ │ ├── ScriptingNodeTypes.ts
│ │ │ ├── TokenTrait.ts
│ │ │ ├── TokenType.ts
│ │ │ └── tree-visitor.ts
│ │ ├── style-parser
│ │ │ ├── errors.ts
│ │ │ ├── source-tree.ts
│ │ │ ├── StyleInputStream.ts
│ │ │ ├── StyleLexer.ts
│ │ │ ├── StyleParser.ts
│ │ │ └── tokens.ts
│ │ └── xmlui-parser
│ │ ├── CharacterCodes.ts
│ │ ├── diagnostics.ts
│ │ ├── fileExtensions.ts
│ │ ├── index.ts
│ │ ├── lint.ts
│ │ ├── parser.ts
│ │ ├── ParserError.ts
│ │ ├── scanner.ts
│ │ ├── syntax-kind.ts
│ │ ├── syntax-node.ts
│ │ ├── transform.ts
│ │ ├── utils.ts
│ │ ├── xmlui-serializer.ts
│ │ └── xmlui-tree.ts
│ ├── react-app-env.d.ts
│ ├── syntax
│ │ ├── monaco
│ │ │ ├── grammar.monacoLanguage.ts
│ │ │ ├── index.ts
│ │ │ ├── xmlui-dark.ts
│ │ │ ├── xmlui-light.ts
│ │ │ └── xmluiscript.monacoLanguage.ts
│ │ └── textMate
│ │ ├── index.ts
│ │ ├── xmlui-dark.json
│ │ ├── xmlui-light.json
│ │ ├── xmlui.json
│ │ └── xmlui.tmLanguage.json
│ ├── testing
│ │ ├── assertions.ts
│ │ ├── component-test-helpers.ts
│ │ ├── ComponentDrivers.ts
│ │ ├── drivers
│ │ │ ├── DateInputDriver.ts
│ │ │ ├── index.ts
│ │ │ ├── ModalDialogDriver.ts
│ │ │ ├── NumberBoxDriver.ts
│ │ │ ├── TextBoxDriver.ts
│ │ │ ├── TimeInputDriver.ts
│ │ │ ├── TimerDriver.ts
│ │ │ └── TreeDriver.ts
│ │ ├── fixtures.ts
│ │ ├── index.ts
│ │ ├── infrastructure
│ │ │ ├── index.html
│ │ │ ├── main.tsx
│ │ │ ├── public
│ │ │ │ ├── mockServiceWorker.js
│ │ │ │ ├── resources
│ │ │ │ │ ├── bell.svg
│ │ │ │ │ ├── box.svg
│ │ │ │ │ ├── doc.svg
│ │ │ │ │ ├── eye.svg
│ │ │ │ │ ├── flower-640x480.jpg
│ │ │ │ │ ├── sun.svg
│ │ │ │ │ ├── test-image-100x100.jpg
│ │ │ │ │ └── txt.svg
│ │ │ │ └── serve.json
│ │ │ └── TestBed.tsx
│ │ └── themed-app-test-helpers.ts
│ └── vite-env.d.ts
├── tests
│ ├── components
│ │ ├── CodeBlock
│ │ │ └── hightlight-code.test.ts
│ │ ├── playground-pattern.test.ts
│ │ └── Tree
│ │ └── Tree-states.test.ts
│ ├── components-core
│ │ ├── abstractions
│ │ │ └── treeAbstractions.test.ts
│ │ ├── container
│ │ │ └── buildProxy.test.ts
│ │ ├── interception
│ │ │ ├── orderBy.test.ts
│ │ │ ├── ReadOnlyCollection.test.ts
│ │ │ └── request-param-converter.test.ts
│ │ ├── scripts-runner
│ │ │ ├── AttributeValueParser.test.ts
│ │ │ ├── eval-tree-arrow-async.test.ts
│ │ │ ├── eval-tree-arrow.test.ts
│ │ │ ├── eval-tree-func-decl-async.test.ts
│ │ │ ├── eval-tree-func-decl.test.ts
│ │ │ ├── eval-tree-pre-post.test.ts
│ │ │ ├── eval-tree-regression.test.ts
│ │ │ ├── eval-tree.test.ts
│ │ │ ├── function-proxy.test.ts
│ │ │ ├── parser-regression.test.ts
│ │ │ ├── process-event.test.ts
│ │ │ ├── process-function.test.ts
│ │ │ ├── process-implicit-context.test.ts
│ │ │ ├── process-statement-asgn.test.ts
│ │ │ ├── process-statement-destruct.test.ts
│ │ │ ├── process-statement-regs.test.ts
│ │ │ ├── process-statement-sync.test.ts
│ │ │ ├── process-statement.test.ts
│ │ │ ├── process-switch-sync.test.ts
│ │ │ ├── process-switch.test.ts
│ │ │ ├── process-try-sync.test.ts
│ │ │ ├── process-try.test.ts
│ │ │ └── test-helpers.ts
│ │ ├── test-metadata-handler.ts
│ │ ├── theming
│ │ │ ├── border-segments.test.ts
│ │ │ ├── component-layout.resolver.test.ts
│ │ │ ├── layout-property-parser.test.ts
│ │ │ ├── layout-resolver.test.ts
│ │ │ ├── layout-resolver2.test.ts
│ │ │ ├── layout-vp-override.test.ts
│ │ │ └── padding-segments.test.ts
│ │ └── utils
│ │ ├── date-utils.test.ts
│ │ ├── format-human-elapsed-time.test.ts
│ │ └── LruCache.test.ts
│ ├── language-server
│ │ ├── completion.test.ts
│ │ ├── format.test.ts
│ │ ├── hover.test.ts
│ │ └── mockData.ts
│ └── parsers
│ ├── common
│ │ └── input-stream.test.ts
│ ├── markdown
│ │ └── parse-binding-expression.test.ts
│ ├── parameter-parser.test.ts
│ ├── paremeter-parser.test.ts
│ ├── scripting
│ │ ├── eval-tree-arrow.test.ts
│ │ ├── eval-tree-pre-post.test.ts
│ │ ├── eval-tree.test.ts
│ │ ├── function-proxy.test.ts
│ │ ├── lexer-literals.test.ts
│ │ ├── lexer-misc.test.ts
│ │ ├── module-parse.test.ts
│ │ ├── parser-arrow.test.ts
│ │ ├── parser-assignments.test.ts
│ │ ├── parser-binary.test.ts
│ │ ├── parser-destructuring.test.ts
│ │ ├── parser-errors.test.ts
│ │ ├── parser-expressions.test.ts
│ │ ├── parser-function.test.ts
│ │ ├── parser-literals.test.ts
│ │ ├── parser-primary.test.ts
│ │ ├── parser-regex.test.ts
│ │ ├── parser-statements.test.ts
│ │ ├── parser-unary.test.ts
│ │ ├── process-event.test.ts
│ │ ├── process-implicit-context.test.ts
│ │ ├── process-statement-asgn.test.ts
│ │ ├── process-statement-destruct.test.ts
│ │ ├── process-statement-regs.test.ts
│ │ ├── process-statement-sync.test.ts
│ │ ├── process-statement.test.ts
│ │ ├── process-switch-sync.test.ts
│ │ ├── process-switch.test.ts
│ │ ├── process-try-sync.test.ts
│ │ ├── process-try.test.ts
│ │ ├── simplify-expression.test.ts
│ │ ├── statement-hooks.test.ts
│ │ └── test-helpers.ts
│ ├── style-parser
│ │ ├── generateHvarChain.test.ts
│ │ ├── parseHVar.test.ts
│ │ ├── parser.test.ts
│ │ └── tokens.test.ts
│ └── xmlui
│ ├── lint.test.ts
│ ├── parser.test.ts
│ ├── scanner.test.ts
│ ├── transform.attr.test.ts
│ ├── transform.circular.test.ts
│ ├── transform.element.test.ts
│ ├── transform.errors.test.ts
│ ├── transform.escape.test.ts
│ ├── transform.regression.test.ts
│ ├── transform.script.test.ts
│ ├── transform.test.ts
│ └── xmlui.ts
├── tests-e2e
│ ├── api-bound-component-regression.spec.ts
│ ├── api-call-as-extracted-component.spec.ts
│ ├── assign-to-object-or-array-regression.spec.ts
│ ├── binding-regression.spec.ts
│ ├── children-as-template-context-vars.spec.ts
│ ├── compound-component.spec.ts
│ ├── context-vars-regression.spec.ts
│ ├── data-bindings.spec.ts
│ ├── datasource-and-api-usage-in-var.spec.ts
│ ├── datasource-direct-binding.spec.ts
│ ├── datasource-onLoaded-regression.spec.ts
│ ├── modify-array-item-regression.spec.ts
│ ├── namespaces.spec.ts
│ ├── push-to-array-regression.spec.ts
│ ├── screen-breakpoints.spec.ts
│ ├── scripting.spec.ts
│ ├── state-scope-in-pages.spec.ts
│ └── state-var-scopes.spec.ts
├── tsconfig.json
├── tsdown.config.ts
├── vite.config.ts
└── vitest.config.ts
```
# Files
--------------------------------------------------------------------------------
/xmlui/src/components/Table/TableNative.tsx:
--------------------------------------------------------------------------------
```typescript
1 | import type { CSSProperties, ReactNode } from "react";
2 | import {
3 | forwardRef,
4 | useCallback,
5 | useEffect,
6 | useLayoutEffect,
7 | useMemo,
8 | useRef,
9 | useState,
10 | } from "react";
11 | import { flushSync } from "react-dom";
12 | import type {
13 | CellContext,
14 | Column,
15 | ColumnDef,
16 | HeaderContext,
17 | PaginationState,
18 | RowData,
19 | } from "@tanstack/react-table";
20 | import {
21 | flexRender,
22 | getCoreRowModel,
23 | getPaginationRowModel,
24 | useReactTable,
25 | } from "@tanstack/react-table";
26 | import { composeRefs } from "@radix-ui/react-compose-refs";
27 | import { useVirtualizer } from "@tanstack/react-virtual";
28 | import { orderBy } from "lodash-es";
29 | import classnames from "classnames";
30 |
31 | import styles from "./Table.module.scss";
32 |
33 | import "./react-table-config.d.ts";
34 | import type { RegisterComponentApiFn } from "../../abstractions/RendererDefs";
35 | import type { AsyncFunction } from "../../abstractions/FunctionDefs";
36 | import { EMPTY_ARRAY } from "../../components-core/constants";
37 | import { useEvent } from "../../components-core/utils/misc";
38 | import {
39 | useHasExplicitHeight,
40 | useIsomorphicLayoutEffect,
41 | usePrevious,
42 | useResizeObserver,
43 | useScrollParent,
44 | useStartMargin,
45 | } from "../../components-core/utils/hooks";
46 | import { useTheme } from "../../components-core/theming/ThemeContext";
47 | import { isThemeVarName } from "../../components-core/theming/transformThemeVars";
48 | import { Spinner } from "../Spinner/SpinnerNative";
49 | import { Toggle } from "../Toggle/Toggle";
50 | import { Icon } from "../Icon/IconNative";
51 | import { type OurColumnMetadata } from "../Column/TableContext";
52 | import useRowSelection from "./useRowSelection";
53 | import { PaginationNative, type Position } from "../Pagination/PaginationNative";
54 |
55 | // =====================================================================================================================
56 | // Helper types
57 |
58 | // --- Declaration merging, see here: https://tanstack.com/table/v8/docs/api/core/table#meta
59 | declare module "@tanstack/table-core" {
60 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
61 | interface TableMeta<TData extends RowData> {
62 | cellRenderer: (...args: any[]) => any;
63 | }
64 |
65 | // eslint-disable-next-line @typescript-eslint/no-unused-vars
66 | interface ColumnMeta<TData extends RowData, TValue> {
67 | style?: CSSProperties;
68 | starSizedWidth?: string;
69 | accessorKey?: string;
70 | pinTo?: string;
71 | cellRenderer?: (row: any, rowIdx: number, colIdx: number, value?: any) => ReactNode;
72 | }
73 | }
74 |
75 | /**
76 | * This type describes an arbitraty table row that has an integer identifier and an order index.
77 | */
78 | type RowWithOrder = {
79 | /**
80 | * Order index; we use it with paging.
81 | */
82 | order: number;
83 |
84 | [x: string | number | symbol]: unknown;
85 | };
86 |
87 | type SortingDirection = "ascending" | "descending";
88 | export const TablePaginationControlsLocationValues = ["top", "bottom", "both"] as const;
89 | export type TablePaginationControlsLocation =
90 | (typeof TablePaginationControlsLocationValues)[number];
91 |
92 | export const CheckboxToleranceValues = ["none", "compact", "comfortable", "spacious"] as const;
93 | export type CheckboxTolerance = (typeof CheckboxToleranceValues)[number];
94 |
95 | // =====================================================================================================================
96 | // React Table component implementation
97 |
98 | type CellVerticalAlign = "top" | "center" | "bottom";
99 |
100 | type TableProps = {
101 | dataIdProperty?: string;
102 | data: any[];
103 | columns?: OurColumnMetadata[];
104 | isPaginated?: boolean;
105 | loading?: boolean;
106 | headerHeight?: string | number;
107 | rowsSelectable?: boolean;
108 | enableMultiRowSelection?: boolean;
109 | initiallySelected?: string[];
110 | syncWithAppState?: any;
111 | pageSizeOptions?: number[];
112 | currentPageIndex?: number;
113 | pageSize?: number;
114 | paginationControlsLocation?: TablePaginationControlsLocation;
115 | rowDisabledPredicate?: (item: any) => boolean;
116 | sortBy?: string;
117 | sortingDirection?: SortingDirection;
118 | iconSortAsc?: string;
119 | iconSortDesc?: string;
120 | iconNoSort?: string;
121 | sortingDidChange?: AsyncFunction;
122 | onSelectionDidChange?: AsyncFunction;
123 | willSort?: AsyncFunction;
124 | style?: CSSProperties;
125 | className?: string;
126 | uid?: string;
127 | noDataRenderer?: () => ReactNode;
128 | autoFocus?: boolean;
129 | hideHeader?: boolean;
130 | hideNoDataView?: boolean;
131 | alwaysShowSelectionHeader?: boolean;
132 | registerComponentApi: RegisterComponentApiFn;
133 | noBottomBorder?: boolean;
134 | cellVerticalAlign?: CellVerticalAlign;
135 | showPageInfo?: boolean;
136 | showPageSizeSelector?: boolean;
137 | showCurrentPage?: boolean;
138 | buttonRowPosition?: Position;
139 | pageSizeSelectorPosition?: Position;
140 | pageInfoPosition?: Position;
141 | checkboxTolerance?: CheckboxTolerance;
142 | };
143 |
144 | function defaultIsRowDisabled(_: any) {
145 | return false;
146 | }
147 |
148 | const SELECT_COLUMN_WIDTH = 42;
149 |
150 | const DEFAULT_PAGE_SIZES = [10];
151 |
152 | /**
153 | * Maps checkbox tolerance values to pixel values
154 | * @param tolerance - The tolerance level
155 | * @returns The number of pixels for the tolerance
156 | */
157 | const getCheckboxTolerancePixels = (tolerance: CheckboxTolerance): number => {
158 | switch (tolerance) {
159 | case "none":
160 | return 0;
161 | case "compact":
162 | return 8;
163 | case "comfortable":
164 | return 12;
165 | case "spacious":
166 | return 16;
167 | default:
168 | return 8; // fallback to compact
169 | }
170 | };
171 |
172 | /**
173 | * Helper function to check if a point is within the checkbox boundary
174 | * @param pointX - X coordinate of the point to check
175 | * @param pointY - Y coordinate of the point to check
176 | * @param checkboxRect - Bounding rectangle of the checkbox
177 | * @param tolerancePixels - Number of pixels to extend the boundary
178 | * @returns true if the point is within the checkbox or within tolerancePixels of its boundary
179 | */
180 | const isWithinCheckboxBoundary = (
181 | pointX: number,
182 | pointY: number,
183 | checkboxRect: DOMRect,
184 | tolerancePixels: number,
185 | ): boolean => {
186 | // Calculate distance from point to checkbox boundaries
187 | const distanceToLeft = Math.abs(pointX - checkboxRect.left);
188 | const distanceToRight = Math.abs(pointX - checkboxRect.right);
189 | const distanceToTop = Math.abs(pointY - checkboxRect.top);
190 | const distanceToBottom = Math.abs(pointY - checkboxRect.bottom);
191 |
192 | // Check if point is within the checkbox bounds or within boundary pixels of any edge
193 | const withinHorizontalBounds = pointX >= checkboxRect.left && pointX <= checkboxRect.right;
194 | const withinVerticalBounds = pointY >= checkboxRect.top && pointY <= checkboxRect.bottom;
195 | const withinCheckbox = withinHorizontalBounds && withinVerticalBounds;
196 |
197 | const nearHorizontalBoundary =
198 | withinVerticalBounds &&
199 | (distanceToLeft <= tolerancePixels || distanceToRight <= tolerancePixels);
200 | const nearVerticalBoundary =
201 | withinHorizontalBounds &&
202 | (distanceToTop <= tolerancePixels || distanceToBottom <= tolerancePixels);
203 |
204 | return withinCheckbox || nearHorizontalBoundary || nearVerticalBoundary;
205 | };
206 |
207 | //These are the important styles to make sticky column pinning work!
208 | //Apply styles like this using your CSS strategy of choice with this kind of logic to head cells, data cells, footer cells, etc.
209 | //View the index.css file for more needed styles such as border-collapse: separate
210 | const getCommonPinningStyles = (column: Column<RowWithOrder>): CSSProperties => {
211 | const isPinned = column.getIsPinned();
212 | // const isLastLeftPinnedColumn = isPinned === "left" && column.getIsLastColumn("left");
213 | // const isFirstRightPinnedColumn = isPinned === "right" && column.getIsFirstColumn("right");
214 |
215 | return {
216 | // boxShadow: isLastLeftPinnedColumn
217 | // ? "-4px 0 4px -4px gray inset"
218 | // : isFirstRightPinnedColumn
219 | // ? "4px 0 4px -4px gray inset"
220 | // : undefined,
221 | left: isPinned === "left" ? `${column.getStart("left")}px` : undefined,
222 | right: isPinned === "right" ? `${column.getAfter("right")}px` : undefined,
223 | opacity: isPinned ? 0.95 : undefined,
224 | position: isPinned ? "sticky" : "relative",
225 | backgroundColor: isPinned ? "inherit" : undefined,
226 | zIndex: isPinned ? 1 : undefined,
227 | };
228 | };
229 |
230 | // eslint-disable-next-line react/display-name
231 | export const Table = forwardRef(
232 | (
233 | {
234 | dataIdProperty = defaultProps.dataIdProperty,
235 | data = defaultProps.data,
236 | columns = defaultProps.columns,
237 | isPaginated = defaultProps.isPaginated,
238 | loading = defaultProps.loading,
239 | headerHeight,
240 | rowsSelectable = defaultProps.rowsSelectable,
241 | enableMultiRowSelection = defaultProps.enableMultiRowSelection,
242 | initiallySelected = defaultProps.initiallySelected,
243 | syncWithAppState,
244 | pageSizeOptions = defaultProps.pageSizeOptions,
245 | pageSize = pageSizeOptions?.[0] || DEFAULT_PAGE_SIZES[0],
246 | currentPageIndex = 0,
247 | rowDisabledPredicate = defaultIsRowDisabled,
248 | sortBy,
249 | sortingDirection = defaultProps.sortingDirection,
250 | iconSortAsc,
251 | iconSortDesc,
252 | iconNoSort,
253 | sortingDidChange,
254 | willSort,
255 | style,
256 | className,
257 | noDataRenderer,
258 | autoFocus = defaultProps.autoFocus,
259 | hideHeader = defaultProps.hideHeader,
260 | hideNoDataView = defaultProps.hideNoDataView,
261 | alwaysShowSelectionHeader = defaultProps.alwaysShowSelectionHeader,
262 | registerComponentApi,
263 | onSelectionDidChange,
264 | noBottomBorder = defaultProps.noBottomBorder,
265 | paginationControlsLocation = defaultProps.paginationControlsLocation,
266 | cellVerticalAlign = defaultProps.cellVerticalAlign,
267 | buttonRowPosition = defaultProps.buttonRowPosition,
268 | pageSizeSelectorPosition = defaultProps.pageSizeSelectorPosition,
269 | pageInfoPosition = defaultProps.pageInfoPosition,
270 | showCurrentPage = defaultProps.showCurrentPage,
271 | showPageInfo = defaultProps.showPageInfo,
272 | showPageSizeSelector = defaultProps.showPageSizeSelector,
273 | checkboxTolerance = defaultProps.checkboxTolerance,
274 | ...rest
275 | // cols
276 | }: TableProps,
277 | forwardedRef,
278 | ) => {
279 | const { getThemeVar } = useTheme();
280 | const arrayData = Array.isArray(data) ? data : EMPTY_ARRAY;
281 | const wrapperRef = useRef<HTMLDivElement>(null);
282 | const ref = forwardedRef ? composeRefs(wrapperRef, forwardedRef) : wrapperRef;
283 | const tableRef = useRef<HTMLTableElement>(null);
284 | const estimatedHeightRef = useRef<number | null>(null);
285 |
286 | const safeData = useMemo(() => {
287 | if (arrayData.length === 0) {
288 | return arrayData;
289 | }
290 | if (dataIdProperty) {
291 | return arrayData.map((item) => ({ ...item, id: item[dataIdProperty] }));
292 | }
293 | // --- Check the first 3 items for an 'id' property
294 | const sampleSize = Math.min(3, arrayData.length);
295 | const hasIdProperty = arrayData
296 | .slice(0, sampleSize)
297 | .every((item) => item && item.hasOwnProperty("id"));
298 | if (!hasIdProperty) {
299 | return arrayData.map((item, index) => ({ ...item, id: index }));
300 | }
301 |
302 | return arrayData;
303 | }, [dataIdProperty, arrayData]);
304 |
305 | const safeColumns: OurColumnMetadata[] = useMemo(() => {
306 | if (columns) {
307 | return columns;
308 | }
309 | if (!safeData.length) {
310 | return EMPTY_ARRAY;
311 | }
312 | return Object.keys(safeData[0]).map((key: string) => ({ header: key, accessorKey: key }));
313 | }, [columns, safeData]);
314 |
315 | useEffect(() => {
316 | if (autoFocus) {
317 | wrapperRef.current!.focus();
318 | }
319 | }, [autoFocus]);
320 |
321 | // --- Keep track of visible table rows
322 | const [visibleItems, setVisibleItems] = useState<any[]>(EMPTY_ARRAY);
323 |
324 | // --- Track which row should show forced hover for checkbox
325 | const [hoveredRowId, setHoveredRowId] = useState<string | null>(null);
326 |
327 | // --- Track if the header checkbox should show forced hover
328 | const [headerCheckboxHovered, setHeaderCheckboxHovered] = useState<boolean>(false);
329 |
330 | // --- Calculate tolerance pixels from the prop
331 | const tolerancePixels = getCheckboxTolerancePixels(checkboxTolerance);
332 |
333 | // --- Get the operations to manage selected rows in a table
334 | const {
335 | toggleRow,
336 | checkAllRows,
337 | focusedIndex,
338 | onKeyDown,
339 | selectedRowIdMap,
340 | idKey,
341 | selectionApi,
342 | } = useRowSelection({
343 | items: safeData,
344 | visibleItems,
345 | rowsSelectable,
346 | enableMultiRowSelection,
347 | rowDisabledPredicate,
348 | onSelectionDidChange,
349 | initiallySelected,
350 | syncWithAppState,
351 | });
352 |
353 | // --- Create data with order information whenever the items in the table change
354 | const dataWithOrder = useMemo(() => {
355 | return safeData.map((item, index) => {
356 | return {
357 | ...item,
358 | order: index + 1,
359 | };
360 | });
361 | }, [safeData]);
362 |
363 | // --- Local or external sorting of data
364 | const [_sortBy, _setSortBy] = useState(sortBy);
365 | const [_sortingDirection, _setSortingDirection] = useState(sortingDirection);
366 |
367 | useLayoutEffect(() => {
368 | _setSortBy(sortBy);
369 | }, [sortBy]);
370 |
371 | useLayoutEffect(() => {
372 | _setSortingDirection(sortingDirection);
373 | }, [sortingDirection]);
374 |
375 | const sortedData = useMemo(() => {
376 | if (!_sortBy) {
377 | return dataWithOrder;
378 | }
379 | return orderBy(dataWithOrder, _sortBy, _sortingDirection === "ascending" ? "asc" : "desc");
380 | }, [_sortBy, _sortingDirection, dataWithOrder]);
381 |
382 | const _updateSorting = useCallback(
383 | async (accessorKey: string) => {
384 | let newDirection: SortingDirection = "ascending";
385 | let newSortBy = accessorKey;
386 | // The current key is the same as the last -> the user clicked on the same header twice
387 | if (_sortBy === accessorKey) {
388 | // The last sorting direction was ascending -> make it descending
389 | if (_sortingDirection === "ascending") {
390 | newDirection = "descending";
391 | // The last sorting direction was descending -> remove the sorting from the current key
392 | } else {
393 | newSortBy = undefined;
394 | }
395 | }
396 |
397 | // --- Check if sorting is allowed
398 | const result = await willSort?.(newSortBy, newDirection);
399 | if (result === false) {
400 | return;
401 | }
402 |
403 | _setSortingDirection(newDirection);
404 | _setSortBy(newSortBy);
405 |
406 | // External callback function is always called.
407 | // Even if sorting is internal, we can notify other components through this callback
408 | sortingDidChange?.(newSortBy, newDirection);
409 | },
410 | [_sortBy, willSort, sortingDidChange, _sortingDirection],
411 | );
412 |
413 | // --- Prepare column renderers according to columns defined in the table
414 | const columnsWithCustomCell: ColumnDef<any>[] = useMemo(() => {
415 | return safeColumns.map((col, idx) => {
416 | // --- Obtain column width information
417 | const { width, starSizedWidth } = getColumnWidth(col.width, true, "width");
418 | const { width: minWidth } = getColumnWidth(col.minWidth, false, "minWidth");
419 | const { width: maxWidth } = getColumnWidth(col.maxWidth, false, "maxWidth");
420 |
421 | const customColumn = {
422 | ...col,
423 | header: col.header ?? col.accessorKey ?? " ",
424 | id: "col_" + idx,
425 | size: width,
426 | minSize: minWidth,
427 | maxSize: maxWidth,
428 | enableResizing: col.canResize,
429 | enableSorting: col.canSort && !!col.accessorKey,
430 | enablePinning: col.pinTo !== undefined,
431 | meta: {
432 | starSizedWidth,
433 | pinTo: col.pinTo,
434 | style: col.style,
435 | className: col.className,
436 | accessorKey: col.accessorKey,
437 | cellRenderer: col.cellRenderer,
438 | },
439 | };
440 | return customColumn;
441 |
442 | function getColumnWidth(
443 | colWidth: any,
444 | allowStarSize: boolean,
445 | propName: string,
446 | ): { width?: number; starSizedWidth?: string } {
447 | let starSizedWidth: string;
448 | let width: number;
449 | const resolvedWidth = isThemeVarName(colWidth) ? getThemeVar(colWidth) : colWidth;
450 | if (typeof resolvedWidth === "number") {
451 | width = resolvedWidth;
452 | } else if (typeof resolvedWidth === "string") {
453 | const oneStarSizedWidthMatch = resolvedWidth.match(/^\s*\*\s*$/);
454 | if (allowStarSize && oneStarSizedWidthMatch) {
455 | starSizedWidth = "1*";
456 | } else {
457 | const starSizedWidthMatch = resolvedWidth.match(/^\s*(\d+)\s*\*\s*$/);
458 | if (allowStarSize && starSizedWidthMatch) {
459 | starSizedWidth = starSizedWidthMatch[1] + "*";
460 | } else {
461 | const pixelWidthMatch = resolvedWidth.match(/^\s*(\d+)\s*(px)?\s*$/);
462 | if (pixelWidthMatch) {
463 | width = Number(pixelWidthMatch[1]);
464 | } else {
465 | throw new Error(`Invalid TableColumnDef '${propName}' value: ${resolvedWidth}`);
466 | }
467 | }
468 | }
469 | }
470 | if (width === undefined && starSizedWidth === undefined && allowStarSize) {
471 | starSizedWidth = "1*";
472 | }
473 | return { width, starSizedWidth };
474 | }
475 | });
476 | }, [getThemeVar, safeColumns]);
477 |
478 | // --- Prepare column renderers according to columns defined in the table supporting optional row selection
479 | const columnsWithSelectColumn: ColumnDef<any>[] = useMemo(() => {
480 | // --- Extend the columns with a selection checkbox (indeterminate)
481 | const selectColumn = {
482 | id: "select",
483 | size: SELECT_COLUMN_WIDTH,
484 | enableResizing: false,
485 | enablePinning: true,
486 | meta: {
487 | pinTo: "left",
488 | },
489 | header: ({ table }: HeaderContext<any, unknown>) =>
490 | enableMultiRowSelection ? (
491 | <Toggle
492 | {...{
493 | className: classnames(styles.checkBoxWrapper, {
494 | [styles.showInHeader]: alwaysShowSelectionHeader,
495 | [styles.forceHoverWrapper]: headerCheckboxHovered,
496 | }),
497 | value: table.getIsAllRowsSelected(),
498 | indeterminate: table.getIsSomeRowsSelected(),
499 | forceHover: headerCheckboxHovered,
500 | onDidChange: () => {
501 | const allSelected = table
502 | .getRowModel()
503 | .rows.every((row) => rowDisabledPredicate(row.original) || row.getIsSelected());
504 | checkAllRows(!allSelected);
505 | },
506 | }}
507 | />
508 | ) : null,
509 | cell: ({ row }: CellContext<any, unknown>) => {
510 | //console.log(row)
511 | return (
512 | <Toggle
513 | {...{
514 | className: classnames(styles.checkBoxWrapper, {
515 | [styles.forceHoverWrapper]: hoveredRowId === row.id,
516 | }),
517 | value: row.getIsSelected(),
518 | indeterminate: row.getIsSomeSelected(),
519 | forceHover: hoveredRowId === row.id,
520 | onDidChange: () => {
521 | toggleRow(row.original, { metaKey: true });
522 | },
523 | }}
524 | />
525 | );
526 | },
527 | };
528 | return rowsSelectable ? [selectColumn, ...columnsWithCustomCell] : columnsWithCustomCell;
529 | }, [
530 | rowsSelectable,
531 | columnsWithCustomCell,
532 | enableMultiRowSelection,
533 | alwaysShowSelectionHeader,
534 | checkAllRows,
535 | toggleRow,
536 | rowDisabledPredicate,
537 | hoveredRowId,
538 | headerCheckboxHovered,
539 | ]);
540 |
541 | // --- Set up page information (using the first page size option)
542 | // const [pagination, setPagination] = useState<PaginationState>();
543 | const [pagination, setPagination] = useState<PaginationState>({
544 | pageSize: isPaginated ? pageSize : Number.MAX_VALUE,
545 | pageIndex: currentPageIndex,
546 | });
547 |
548 | const prevIsPaginated = usePrevious(isPaginated);
549 |
550 | useEffect(() => {
551 | if (!prevIsPaginated && isPaginated) {
552 | setPagination((prev) => {
553 | return {
554 | ...prev,
555 | pageSize: pageSize,
556 | pageIndex: 0,
557 | };
558 | });
559 | }
560 | if (prevIsPaginated && !isPaginated) {
561 | setPagination(() => {
562 | return {
563 | pageIndex: 0,
564 | pageSize: Number.MAX_VALUE,
565 | };
566 | });
567 | }
568 | }, [isPaginated, pageSizeOptions, prevIsPaginated, pageSize]);
569 |
570 | const [columnSizing, setColumnSizing] = useState<Record<string, number>>({});
571 |
572 | const columnPinning = useMemo(() => {
573 | const left: Array<string> = [];
574 | const right: Array<string> = [];
575 | columnsWithSelectColumn.forEach((col) => {
576 | if (col.meta?.pinTo === "right") {
577 | right.push(col.id!);
578 | }
579 | if (col.meta?.pinTo === "left") {
580 | left.push(col.id!);
581 | }
582 | });
583 | return {
584 | left,
585 | right,
586 | };
587 | }, [columnsWithSelectColumn]);
588 |
589 | // --- Use the @tanstack/core-table component that manages a table
590 | const table = useReactTable<RowWithOrder>({
591 | columns: columnsWithSelectColumn,
592 | data: sortedData,
593 | getCoreRowModel: getCoreRowModel(),
594 | getPaginationRowModel: isPaginated ? getPaginationRowModel() : undefined,
595 | enableRowSelection: rowsSelectable,
596 | enableMultiRowSelection,
597 | columnResizeMode: "onChange",
598 | getRowId: useCallback(
599 | (originalRow: any) => {
600 | return originalRow[idKey] + "";
601 | },
602 | [idKey],
603 | ),
604 | state: useMemo(
605 | () => ({
606 | pagination,
607 | rowSelection: selectedRowIdMap,
608 | columnSizing,
609 | columnPinning,
610 | }),
611 | [columnPinning, columnSizing, pagination, selectedRowIdMap],
612 | ),
613 | onColumnSizingChange: setColumnSizing,
614 | onPaginationChange: setPagination,
615 | });
616 |
617 | // --- Select the set of visible rows whenever the table rows change
618 | const rows = table.getRowModel().rows;
619 | useEffect(() => {
620 | setVisibleItems(rows.map((row) => row.original));
621 | }, [rows]);
622 |
623 | const scrollParent = useScrollParent(wrapperRef.current?.parentElement);
624 | const scrollRef = useRef(scrollParent);
625 | scrollRef.current = scrollParent;
626 |
627 | const hasHeight = useHasExplicitHeight(wrapperRef);
628 |
629 | const hasOutsideScroll = scrollRef.current && !hasHeight;
630 |
631 | const startMargin = useStartMargin(hasOutsideScroll, wrapperRef, scrollRef);
632 |
633 | const rowVirtualizer = useVirtualizer({
634 | count: rows.length,
635 | getScrollElement: useCallback(() => {
636 | return hasOutsideScroll && scrollRef?.current ? scrollRef?.current : wrapperRef.current;
637 | }, [scrollRef, hasOutsideScroll]),
638 | scrollMargin: startMargin,
639 | estimateSize: useCallback(() => {
640 | return estimatedHeightRef.current || 30;
641 | }, []),
642 | overscan: 5,
643 | });
644 |
645 | const paddingTop =
646 | rowVirtualizer.getVirtualItems().length > 0
647 | ? rowVirtualizer.getVirtualItems()?.[0]?.start - startMargin || 0
648 | : 0;
649 | const paddingBottom =
650 | rowVirtualizer.getVirtualItems().length > 0
651 | ? rowVirtualizer.getTotalSize() -
652 | (rowVirtualizer.getVirtualItems()?.[rowVirtualizer.getVirtualItems().length - 1]?.end -
653 | startMargin || 0)
654 | : 0;
655 |
656 | const hasData = safeData.length !== 0;
657 |
658 | const touchedSizesRef = useRef<Record<string, boolean>>({});
659 | const columnSizeTouched = useCallback((id: string) => {
660 | touchedSizesRef.current[id] = true;
661 | }, []);
662 |
663 | const recalculateStarSizes = useEvent(() => {
664 | if (!tableRef.current) {
665 | return;
666 | }
667 | let availableWidth = tableRef.current.clientWidth - 1;
668 | // -1 to prevent horizontal scroll in scaled browsers (when you zoom in)
669 | const widths: Record<string, number> = {};
670 | const columnsWithoutSize: Array<Column<RowWithOrder>> = [];
671 | const numberOfUnitsById: Record<string, number> = {};
672 |
673 | table.getAllColumns().forEach((column) => {
674 | if (column.columnDef.size !== undefined || touchedSizesRef.current[column.id]) {
675 | availableWidth -= columnSizing[column.id] || column.columnDef.size || 0;
676 | } else {
677 | columnsWithoutSize.push(column);
678 | let units: number;
679 | if (column.columnDef.meta?.starSizedWidth) {
680 | units = Number(column.columnDef.meta?.starSizedWidth.replace("*", "").trim()) || 1;
681 | } else {
682 | units = 1;
683 | }
684 | numberOfUnitsById[column.id] = units;
685 | }
686 | });
687 | const numberOfAllUnits = Object.values(numberOfUnitsById).reduce((acc, val) => acc + val, 0);
688 | columnsWithoutSize.forEach((column) => {
689 | widths[column.id] = Math.floor(
690 | availableWidth * (numberOfUnitsById[column.id] / numberOfAllUnits),
691 | );
692 | });
693 | flushSync(() => {
694 | setColumnSizing((prev) => {
695 | return {
696 | ...prev,
697 | ...widths,
698 | };
699 | });
700 | });
701 | });
702 |
703 | useResizeObserver(tableRef, recalculateStarSizes);
704 |
705 | useIsomorphicLayoutEffect(() => {
706 | queueMicrotask(() => {
707 | recalculateStarSizes();
708 | });
709 | }, [recalculateStarSizes, safeColumns]);
710 |
711 | useIsomorphicLayoutEffect(() => {
712 | registerComponentApi(selectionApi);
713 | }, [registerComponentApi, selectionApi]);
714 |
715 | const paginationControls = (
716 | <PaginationNative
717 | pageIndex={pagination.pageIndex}
718 | pageSize={pagination.pageSize}
719 | itemCount={safeData.length}
720 | pageSizeOptions={pageSizeOptions}
721 | onPageDidChange={(page) => table.setPageIndex(page)}
722 | onPageSizeDidChange={(size) => table.setPageSize(size)}
723 | showCurrentPage={showCurrentPage}
724 | showPageInfo={showPageInfo}
725 | showPageSizeSelector={showPageSizeSelector}
726 | buttonRowPosition={buttonRowPosition}
727 | pageInfoPosition={pageInfoPosition}
728 | pageSizeSelectorPosition={pageSizeSelectorPosition}
729 | />
730 | );
731 |
732 | return (
733 | <div
734 | {...rest}
735 | className={classnames(styles.wrapper, className, { [styles.noScroll]: hasOutsideScroll })}
736 | tabIndex={-1}
737 | onKeyDown={onKeyDown}
738 | ref={ref}
739 | style={style}
740 | >
741 | {isPaginated &&
742 | hasData &&
743 | rows.length > 0 &&
744 | pagination &&
745 | (paginationControlsLocation === "top" || paginationControlsLocation === "both") &&
746 | paginationControls}
747 |
748 | <table className={styles.table} ref={tableRef}>
749 | {!hideHeader && (
750 | <thead style={{ height: headerHeight }} className={styles.headerWrapper}>
751 | {table.getHeaderGroups().map((headerGroup, headerGroupIndex) => (
752 | <tr
753 | key={`${headerGroup.id}-${headerGroupIndex}`}
754 | className={classnames(styles.headerRow, {
755 | [styles.allSelected]: table.getIsAllRowsSelected(),
756 | })}
757 | onClick={(event) => {
758 | const target = event.target as HTMLElement;
759 | const headerCell = target.closest("th");
760 |
761 | // Only handle clicks for the select column header
762 | if (headerCell && rowsSelectable && enableMultiRowSelection) {
763 | const header = headerGroup.headers.find((h) => {
764 | const headerElement = headerCell;
765 | return (
766 | headerElement?.getAttribute("data-column-id") === h.id ||
767 | h.id === "select"
768 | );
769 | });
770 |
771 | if (header && header.id === "select") {
772 | const clickX = event.clientX;
773 | const clickY = event.clientY;
774 | const checkbox = headerCell.querySelector(
775 | 'input[type=\"checkbox\"]',
776 | ) as HTMLInputElement;
777 |
778 | if (checkbox) {
779 | const checkboxRect = checkbox.getBoundingClientRect();
780 |
781 | if (
782 | isWithinCheckboxBoundary(clickX, clickY, checkboxRect, tolerancePixels)
783 | ) {
784 | // Prevent the default click and manually trigger the checkbox
785 | event.preventDefault();
786 | event.stopPropagation();
787 |
788 | const allSelected = table
789 | .getRowModel()
790 | .rows.every(
791 | (row) => rowDisabledPredicate(row.original) || row.getIsSelected(),
792 | );
793 | checkAllRows(!allSelected);
794 | }
795 | }
796 | }
797 | }
798 | }}
799 | onMouseMove={(event) => {
800 | if (rowsSelectable && enableMultiRowSelection) {
801 | const target = event.target as HTMLElement;
802 | const headerCell = target.closest("th");
803 |
804 | if (headerCell) {
805 | const header = headerGroup.headers.find((h) => {
806 | const headerElement = headerCell;
807 | return (
808 | headerElement?.getAttribute("data-column-id") === h.id ||
809 | h.id === "select"
810 | );
811 | });
812 |
813 | if (header && header.id === "select") {
814 | const mouseX = event.clientX;
815 | const mouseY = event.clientY;
816 | const checkbox = headerCell.querySelector(
817 | 'input[type=\"checkbox\"]',
818 | ) as HTMLInputElement;
819 |
820 | if (checkbox) {
821 | const checkboxRect = checkbox.getBoundingClientRect();
822 | const shouldShowHover = isWithinCheckboxBoundary(
823 | mouseX,
824 | mouseY,
825 | checkboxRect,
826 | tolerancePixels,
827 | );
828 |
829 | if (shouldShowHover && !headerCheckboxHovered) {
830 | setHeaderCheckboxHovered(true);
831 | event.currentTarget.style.cursor = "pointer";
832 | } else if (!shouldShowHover && headerCheckboxHovered) {
833 | setHeaderCheckboxHovered(false);
834 | event.currentTarget.style.cursor = "";
835 | }
836 | }
837 | } else if (headerCheckboxHovered) {
838 | setHeaderCheckboxHovered(false);
839 | event.currentTarget.style.cursor = "";
840 | }
841 | }
842 | }
843 | }}
844 | onMouseLeave={(event) => {
845 | if (headerCheckboxHovered) {
846 | setHeaderCheckboxHovered(false);
847 | event.currentTarget.style.cursor = "";
848 | }
849 | }}
850 | >
851 | {headerGroup.headers.map((header, headerIndex) => {
852 | const { width, ...style } = header.column.columnDef.meta?.style || {};
853 | const size = header.getSize();
854 | const alignmentClass =
855 | cellVerticalAlign === "top"
856 | ? styles.alignTop
857 | : cellVerticalAlign === "bottom"
858 | ? styles.alignBottom
859 | : styles.alignCenter;
860 | return (
861 | <th
862 | key={`${header.id}-${headerIndex}`}
863 | data-column-id={header.id}
864 | className={classnames(styles.columnCell, alignmentClass)}
865 | colSpan={header.colSpan}
866 | style={{
867 | position: "relative",
868 | width: size,
869 | ...getCommonPinningStyles(header.column),
870 | }}
871 | >
872 | <ClickableHeader
873 | hasSorting={
874 | header.column.columnDef.enableSorting &&
875 | !!header.column.columnDef.meta?.accessorKey
876 | }
877 | updateSorting={() =>
878 | _updateSorting(header.column.columnDef.meta?.accessorKey)
879 | }
880 | >
881 | <div className={styles.headerContent} style={style}>
882 | {
883 | flexRender(
884 | header.column.columnDef.header,
885 | header.getContext(),
886 | ) as ReactNode
887 | }
888 | {header.column.columnDef.enableSorting && (
889 | <span style={{ display: "inline-flex", maxWidth: 16 }}>
890 | <ColumnOrderingIndicator
891 | iconSortAsc={iconSortAsc}
892 | iconSortDesc={iconSortDesc}
893 | iconNoSort={iconNoSort}
894 | direction={
895 | header.column.columnDef.meta?.accessorKey === _sortBy
896 | ? _sortingDirection
897 | : undefined
898 | }
899 | />
900 | </span>
901 | )}
902 | </div>
903 | </ClickableHeader>
904 | {header.column.getCanResize() && (
905 | <div
906 | {...{
907 | onDoubleClick: () => {
908 | touchedSizesRef.current[header.column.id] = false;
909 | if (header.column.columnDef.size !== undefined) {
910 | header.column.resetSize();
911 | } else {
912 | recalculateStarSizes();
913 | }
914 | },
915 | onMouseDown: (event) => {
916 | columnSizeTouched(header.column.id);
917 | header.getResizeHandler()(event);
918 | },
919 | onTouchStart: (event) => {
920 | columnSizeTouched(header.column.id);
921 | header.getResizeHandler()(event);
922 | },
923 | className: classnames(styles.resizer, {
924 | [styles.isResizing]: header.column.getIsResizing(),
925 | }),
926 | }}
927 | />
928 | )}
929 | </th>
930 | );
931 | })}
932 | </tr>
933 | ))}
934 | </thead>
935 | )}
936 | {hasData && (
937 | <tbody className={styles.tableBody}>
938 | {paddingTop > 0 && (
939 | <tr>
940 | <td style={{ height: `${paddingTop}px` }} />
941 | </tr>
942 | )}
943 | {rowVirtualizer.getVirtualItems().map((virtualRow) => {
944 | const rowIndex = virtualRow.index;
945 | const row = rows[rowIndex];
946 | return (
947 | <tr
948 | data-index={rowIndex}
949 | key={`${row.id}-${rowIndex}`}
950 | className={classnames(styles.row, {
951 | [styles.selected]: row.getIsSelected(),
952 | [styles.focused]: focusedIndex === rowIndex,
953 | [styles.disabled]: rowDisabledPredicate(row.original),
954 | [styles.noBottomBorder]: noBottomBorder,
955 | })}
956 | ref={(el) => {
957 | if (el && estimatedHeightRef.current === null) {
958 | estimatedHeightRef.current = Math.round(el.getBoundingClientRect().height);
959 | }
960 | rowVirtualizer.measureElement(el);
961 | }}
962 | onClick={(event) => {
963 | if (event?.defaultPrevented) {
964 | return;
965 | }
966 | const target = event.target as HTMLElement;
967 | if (target.tagName.toLowerCase() === "input") {
968 | return;
969 | }
970 |
971 | // Check if click is within checkbox boundary
972 | const currentRow = event.currentTarget as HTMLElement;
973 | const checkbox = currentRow.querySelector(
974 | 'input[type="checkbox"]',
975 | ) as HTMLInputElement;
976 |
977 | if (checkbox) {
978 | const checkboxRect = checkbox.getBoundingClientRect();
979 | const clickX = event.clientX;
980 | const clickY = event.clientY;
981 |
982 | if (
983 | isWithinCheckboxBoundary(clickX, clickY, checkboxRect, tolerancePixels)
984 | ) {
985 | // Toggle the checkbox when clicking within the boundary
986 | toggleRow(row.original, { metaKey: true });
987 | return;
988 | }
989 | }
990 |
991 | toggleRow(row.original, event);
992 | }}
993 | onMouseMove={(event) => {
994 | // Change cursor and hover state when within checkbox boundary
995 | const currentRow = event.currentTarget as HTMLElement;
996 | const checkbox = currentRow.querySelector(
997 | 'input[type="checkbox"]',
998 | ) as HTMLInputElement;
999 |
1000 | if (checkbox) {
1001 | const checkboxRect = checkbox.getBoundingClientRect();
1002 | const mouseX = event.clientX;
1003 | const mouseY = event.clientY;
1004 |
1005 | const shouldShowHover = isWithinCheckboxBoundary(
1006 | mouseX,
1007 | mouseY,
1008 | checkboxRect,
1009 | tolerancePixels,
1010 | );
1011 |
1012 | // Update hover state and cursor based on proximity to checkbox
1013 | if (shouldShowHover) {
1014 | setHoveredRowId(row.id);
1015 | currentRow.style.cursor = "pointer";
1016 | } else {
1017 | setHoveredRowId(null);
1018 | currentRow.style.cursor = "";
1019 | }
1020 | }
1021 | }}
1022 | onMouseLeave={(event) => {
1023 | // Reset cursor and hover state when leaving the row
1024 | const currentRow = event.currentTarget as HTMLElement;
1025 | currentRow.style.cursor = "";
1026 | setHoveredRowId(null);
1027 | }}
1028 | >
1029 | {row.getVisibleCells().map((cell, i) => {
1030 | const cellRenderer = cell.column.columnDef?.meta?.cellRenderer;
1031 | const size = cell.column.getSize();
1032 | const alignmentClass =
1033 | cellVerticalAlign === "top"
1034 | ? styles.alignTop
1035 | : cellVerticalAlign === "bottom"
1036 | ? styles.alignBottom
1037 | : styles.alignCenter;
1038 | return (
1039 | <td
1040 | className={classnames(styles.cell, alignmentClass)}
1041 | key={`${cell.id}-${i}`}
1042 | style={{
1043 | // width: size,
1044 | width: size,
1045 | ...getCommonPinningStyles(cell.column),
1046 | }}
1047 | >
1048 | {/*we have to wrap it in a div, because tables...
1049 |
1050 | The "Last Cell" Problem: Why This Happens
1051 | Even with box-sizing: border-box, the browser gives special treatment to the last column of a table.
1052 |
1053 | With table-layout: fixed, the browser calculates the widths for all columns.
1054 | It strictly enforces the widths for columns 1, 2, 3, etc.
1055 | The last column is often used as a "catch-all" to ensure the total width of all columns exactly matches the width of the <table> element itself (e.g., 100%).
1056 | When you add padding-right to this very last cell, you create a conflict. The browser tries to simultaneously:
1057 | Keep the cell's right edge perfectly aligned with the table's right edge.
1058 | Render the padding inside that right edge.
1059 |
1060 | Solution: The Inner Wrapper <div>
1061 | The most robust and common solution is to decouple the cell's width from its content's padding. You do this by adding a wrapper <div> inside the cell.
1062 | The <td> will be responsible only for setting the rigid width.
1063 | The inner <div> will be responsible only for handling the padding and content.
1064 | */}
1065 | <div className={styles.cellContent}>
1066 | {cellRenderer
1067 | ? cellRenderer(cell.row.original, rowIndex, i, cell?.getValue())
1068 | : (flexRender(
1069 | cell.column.columnDef.cell,
1070 | cell.getContext(),
1071 | ) as ReactNode)}
1072 | </div>
1073 | </td>
1074 | );
1075 | })}
1076 | </tr>
1077 | );
1078 | })}
1079 | {paddingBottom > 0 && (
1080 | <tr>
1081 | <td style={{ height: `${paddingBottom}px` }} />
1082 | </tr>
1083 | )}
1084 | </tbody>
1085 | )}
1086 | </table>
1087 | {loading && !hasData && (
1088 | <div className={styles.loadingWrapper}>
1089 | <Spinner />
1090 | </div>
1091 | )}
1092 | {!hideNoDataView &&
1093 | !loading &&
1094 | !hasData &&
1095 | (noDataRenderer ? (
1096 | noDataRenderer()
1097 | ) : (
1098 | <div className={styles.noRows}>No data available</div>
1099 | ))}
1100 |
1101 | {isPaginated &&
1102 | hasData &&
1103 | rows.length > 0 &&
1104 | pagination &&
1105 | (paginationControlsLocation === "bottom" || paginationControlsLocation === "both") &&
1106 | paginationControls}
1107 | </div>
1108 | );
1109 | },
1110 | );
1111 |
1112 | type ClickableHeaderProps = {
1113 | hasSorting?: boolean;
1114 | updateSorting?: () => void;
1115 | children?: ReactNode;
1116 | };
1117 |
1118 | function ClickableHeader({ hasSorting, updateSorting, children }: ClickableHeaderProps) {
1119 | return hasSorting ? (
1120 | <button type="button" className={styles.clickableHeader} onClick={updateSorting}>
1121 | {children}
1122 | </button>
1123 | ) : (
1124 | <>{children}</>
1125 | );
1126 | }
1127 |
1128 | type ColumnOrderingIndicatorProps = {
1129 | direction?: SortingDirection;
1130 | iconSortAsc?: string;
1131 | iconSortDesc?: string;
1132 | iconNoSort?: string;
1133 | };
1134 |
1135 | function ColumnOrderingIndicator({
1136 | direction,
1137 | iconSortAsc = "sortasc:Table",
1138 | iconSortDesc = "sortdesc:Table",
1139 | iconNoSort = "nosort:Table",
1140 | }: ColumnOrderingIndicatorProps) {
1141 | if (direction === "ascending") {
1142 | return <Icon name={iconSortAsc} fallback="sortasc" size="12" />; //sortasc
1143 | } else if (direction === "descending") {
1144 | return <Icon name={iconSortDesc} fallback="sortdesc" size="12" />; //sortdesc
1145 | }
1146 | return iconNoSort !== "-" ? (
1147 | <Icon name={iconNoSort} fallback="nosort" size="12" />
1148 | ) : (
1149 | <Icon name={iconNoSort} size="12" />
1150 | ); //nosort
1151 | }
1152 |
1153 | export const defaultProps = {
1154 | data: EMPTY_ARRAY,
1155 | dataIdProperty: "id",
1156 | columns: EMPTY_ARRAY,
1157 | isPaginated: false,
1158 | loading: false,
1159 | rowsSelectable: false,
1160 | enableMultiRowSelection: true,
1161 | initiallySelected: EMPTY_ARRAY,
1162 | pageSizeOptions: [5, 10, 15],
1163 | sortingDirection: "ascending" as SortingDirection,
1164 | autoFocus: false,
1165 | hideHeader: false,
1166 | hideNoDataView: false,
1167 | alwaysShowSelectionHeader: false,
1168 | noBottomBorder: false,
1169 | paginationControlsLocation: "bottom" as TablePaginationControlsLocation,
1170 | cellVerticalAlign: "center" as CellVerticalAlign,
1171 | showPageInfo: true,
1172 | showPageSizeSelector: true,
1173 | showCurrentPage: true,
1174 | buttonRowPosition: "center" as Position,
1175 | pageSizeSelectorPosition: "start" as Position,
1176 | pageInfoPosition: "end" as Position,
1177 | checkboxTolerance: "compact" as CheckboxTolerance,
1178 | };
1179 |
```