#
tokens: 48153/50000 3/1633 files (page 103/186)
lines: on (toggle) GitHub
raw markdown copy reset
This is page 103 of 186. Use http://codebase.md/xmlui-org/xmlui/%7BlogoUrl%7D?lines=true&page={x} to view the full context.

# Directory Structure

```
├── .changeset
│   └── config.json
├── .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.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.bin.json
    ├── tsconfig.json
    ├── tsconfig.node.json
    ├── vite.config.ts
    └── vitest.config.ts
```

# Files

--------------------------------------------------------------------------------
/xmlui/src/components/Form/FormNative.tsx:
--------------------------------------------------------------------------------

```typescript
  1 | import {
  2 |   type CSSProperties,
  3 |   type Dispatch,
  4 |   type FormEvent,
  5 |   type ForwardedRef,
  6 |   forwardRef,
  7 |   type ReactNode,
  8 |   useEffect,
  9 |   useMemo,
 10 |   useReducer,
 11 |   useRef,
 12 |   useState,
 13 | } from "react";
 14 | import { flushSync } from "react-dom";
 15 | import produce from "immer";
 16 | 
 17 | import styles from "./Form.module.scss";
 18 | 
 19 | import type { ComponentDef } from "../../abstractions/ComponentDefs";
 20 | import type {
 21 |   LookupEventHandlerFn,
 22 |   RegisterComponentApiFn,
 23 |   RenderChildFn,
 24 |   ValueExtractor,
 25 | } from "../../abstractions/RendererDefs";
 26 | import type { ContainerAction } from "../../components-core/rendering/containers";
 27 | import { EMPTY_OBJECT } from "../../components-core/constants";
 28 | import type { GenericBackendError } from "../../components-core/EngineError";
 29 | import { useEvent } from "../../components-core/utils/misc";
 30 | import {
 31 |   backendValidationArrived,
 32 |   FormActionKind,
 33 |   formSubmitted,
 34 |   formSubmitting,
 35 |   triedToSubmit,
 36 |   UNBOUND_FIELD_SUFFIX,
 37 | } from "../../components/Form/formActions";
 38 | import { ModalDialog } from "../../components/ModalDialog/ModalDialogNative";
 39 | import { Text } from "../../components/Text/TextNative";
 40 | import { Stack } from "../../components/Stack/StackNative";
 41 | import { useModalFormClose } from "../../components/ModalDialog/ModalVisibilityContext";
 42 | import { Button } from "../Button/ButtonNative";
 43 | import { ValidationSummary } from "../ValidationSummary/ValidationSummary";
 44 | import { groupInvalidValidationResultsBySeverity } from "../FormItem/Validations";
 45 | import { type FormAction, formReset } from "../Form/formActions";
 46 | import type { FormMd } from "./Form";
 47 | import type { InteractionFlags, SingleValidationResult, ValidationResult } from "./FormContext";
 48 | import { FormContext } from "./FormContext";
 49 | import { get, set } from "lodash-es";
 50 | import classnames from "classnames";
 51 | import { Slot } from "@radix-ui/react-slot";
 52 | import { resolveLayoutProps } from "../../components-core/theming/layout-resolver";
 53 | 
 54 | const PART_CANCEL_BUTTON = "cancelButton";
 55 | const PART_SUBMIT_BUTTON = "submitButton";
 56 | 
 57 | export const getByPath = (obj: any, path: string) => {
 58 |   return get(obj, path);
 59 | };
 60 | 
 61 | const formReducer = produce((state: FormState, action: ContainerAction | FormAction) => {
 62 |   const { uid } = action.payload;
 63 |   if (uid !== undefined && !state.interactionFlags[uid]) {
 64 |     state.interactionFlags[uid] = {
 65 |       isDirty: false,
 66 |       invalidToValid: false,
 67 |       isValidOnFocus: false,
 68 |       isValidLostFocus: false,
 69 |       focused: false,
 70 |       afterFirstDirtyBlur: false,
 71 |       forceShowValidationResult: false,
 72 |     };
 73 |   }
 74 |   switch (action.type) {
 75 |     case FormActionKind.FIELD_INITIALIZED: {
 76 |       // Only set the value if initialValue is defined and field is not dirty (or force is true)
 77 |       if (action.payload.value !== undefined && (!state.interactionFlags[uid].isDirty || action.payload.force)) {
 78 |         set(state.subject, uid, action.payload.value);
 79 |       }
 80 |       // Track noSubmit flag - if multiple FormItems reference the same bindTo,
 81 |       // and any of them has noSubmit: true, the field should NOT be submitted.
 82 |       if (state.noSubmitFields[uid] === true || action.payload.noSubmit === true) {
 83 |         state.noSubmitFields[uid] = true;
 84 |       } else {
 85 |         state.noSubmitFields[uid] = false;
 86 |       }
 87 |       break;
 88 |     }
 89 |     case FormActionKind.FIELD_REMOVED: {
 90 |       delete state.validationResults[uid];
 91 |       delete state.interactionFlags[uid];
 92 |       delete state.noSubmitFields[uid];
 93 |       break;
 94 |     }
 95 |     case FormActionKind.FIELD_VALUE_CHANGED: {
 96 |       set(state.subject, uid, action.payload.value);
 97 |       state.interactionFlags[uid].isDirty = true;
 98 |       state.interactionFlags[uid].forceShowValidationResult = false;
 99 |       break;
100 |     }
101 |     case FormActionKind.FIELD_VALIDATED: {
102 |       // it means no validation happened, ignore it
103 |       if (action.payload.validationResult.validations.length === 0) {
104 |         delete state.validationResults[uid];
105 |         break;
106 |       }
107 |       const prevValid = state.validationResults[uid]?.isValid;
108 |       //if it's a partial validation (without the async stuff), we leave the previous async validations there as a stale placeholder
109 |       if (action.payload.validationResult.partial) {
110 |         const mergedValidations = [
111 |           ...action.payload.validationResult.validations,
112 |           ...(state.validationResults[uid]?.validations.filter((val) => val.async) || []).map(
113 |             (val) => ({
114 |               ...val,
115 |               stale: true,
116 |             }),
117 |           ),
118 |         ];
119 |         state.validationResults[uid] = {
120 |           ...action.payload.validationResult,
121 |           isValid: mergedValidations.find((val) => !val.isValid) === undefined,
122 |           validations: mergedValidations,
123 |         };
124 |       } else {
125 |         state.validationResults[uid] = action.payload.validationResult;
126 |       }
127 |       const currentIsInvalidToValid = !prevValid && state.validationResults[uid].isValid;
128 |       if (currentIsInvalidToValid) {
129 |         state.interactionFlags[uid].invalidToValid = true;
130 |       }
131 |       break;
132 |     }
133 |     case FormActionKind.FIELD_FOCUSED: {
134 |       state.interactionFlags[uid].isValidOnFocus = !!state.validationResults[uid]?.isValid;
135 |       state.interactionFlags[uid].focused = true;
136 |       break;
137 |     }
138 |     case FormActionKind.FIELD_LOST_FOCUS: {
139 |       state.interactionFlags[uid].isValidLostFocus = !!state.validationResults[uid]?.isValid;
140 |       state.interactionFlags[uid].focused = false;
141 |       state.interactionFlags[uid].afterFirstDirtyBlur = state.interactionFlags[uid].isDirty;
142 |       state.interactionFlags[uid].invalidToValid = false;
143 |       break;
144 |     }
145 |     case FormActionKind.TRIED_TO_SUBMIT: {
146 |       Object.keys(state.interactionFlags).forEach((key) => {
147 |         state.interactionFlags[key].forceShowValidationResult = true;
148 |       });
149 |       break;
150 |     }
151 |     case FormActionKind.SUBMITTING: {
152 |       state.submitInProgress = true;
153 |       break;
154 |     }
155 |     case FormActionKind.SUBMITTED: {
156 |       state.submitInProgress = false;
157 |       state.generalValidationResults = [];
158 |       state.interactionFlags = {};
159 |       Object.keys(state.validationResults).forEach((key) => {
160 |         state.validationResults[key].validations = state.validationResults[key].validations?.filter(
161 |           (validation) => !validation.fromBackend,
162 |         );
163 |         state.validationResults[key].isValid =
164 |           state.validationResults[key].validations.find((val) => !val.isValid) === undefined;
165 |       });
166 |       break;
167 |     }
168 |     case FormActionKind.BACKEND_VALIDATION_ARRIVED: {
169 |       state.submitInProgress = false;
170 |       state.generalValidationResults = action.payload.generalValidationResults;
171 |       Object.keys(state.validationResults).forEach((key) => {
172 |         state.validationResults[key].validations = state.validationResults[key].validations?.filter(
173 |           (validation) => !validation.fromBackend,
174 |         );
175 |       });
176 |       Object.entries(action.payload.fieldValidationResults).forEach(
177 |         ([field, singleValidationResults]) => {
178 |           if (!state.validationResults[field]) {
179 |             state.validationResults[field] = {
180 |               isValid: false,
181 |               validations: [],
182 |               partial: false,
183 |               validatedValue: state.subject[field],
184 |             };
185 |           }
186 | 
187 |           state.validationResults[field].validations = [
188 |             ...(state.validationResults[field]?.validations || []),
189 |             ...((singleValidationResults as Array<SingleValidationResult>) || []),
190 |           ];
191 |           state.validationResults[field].isValid =
192 |             state.validationResults[field].validations.find((val) => !val.isValid) === undefined;
193 |         },
194 |       );
195 |       break;
196 |     }
197 |     case FormActionKind.RESET: {
198 |       return {
199 |         ...initialState,
200 |         resetVersion: (state.resetVersion ?? 0) + 1,
201 |       };
202 |     }
203 |     default:
204 |       break;
205 |   }
206 | });
207 | 
208 | interface FormState {
209 |   subject: any;
210 |   validationResults: Record<string, ValidationResult>;
211 |   generalValidationResults: Array<SingleValidationResult>;
212 |   interactionFlags: Record<string, InteractionFlags>;
213 |   noSubmitFields: Record<string, boolean>; // Track noSubmit flag for each field
214 |   submitInProgress?: boolean;
215 |   resetVersion?: number;
216 | }
217 | 
218 | const initialState: FormState = {
219 |   subject: {},
220 |   validationResults: {},
221 |   generalValidationResults: [],
222 |   interactionFlags: {},
223 |   noSubmitFields: {},
224 |   submitInProgress: false,
225 |   resetVersion: 0,
226 | };
227 | 
228 | type OnSubmit = (
229 |   params: Record<string, any> | undefined,
230 |   options: { passAsDefaultBody: boolean },
231 | ) => Promise<void>;
232 | type OnWillSubmit = (params: Record<string, any> | undefined) => Promise<boolean | void>;
233 | type OnSuccess = (result: any) => Promise<void>;
234 | type OnCancel = () => void;
235 | type OnReset = () => void;
236 | type Props = {
237 |   formState: FormState;
238 |   dispatch: Dispatch<ContainerAction | FormAction>;
239 |   id?: string;
240 |   initialValue?: any;
241 |   children: ReactNode;
242 |   style?: CSSProperties;
243 |   className?: string;
244 |   enabled?: boolean;
245 |   cancelLabel?: string;
246 |   saveLabel?: string;
247 |   saveInProgressLabel?: string;
248 |   saveIcon?: string;
249 |   swapCancelAndSave?: boolean;
250 |   onWillSubmit?: OnWillSubmit;
251 |   onSubmit?: OnSubmit;
252 |   onCancel?: OnCancel;
253 |   onReset?: OnReset;
254 |   onSuccess?: OnSuccess;
255 |   buttonRow?: ReactNode;
256 |   registerComponentApi?: RegisterComponentApiFn;
257 |   itemLabelBreak?: boolean;
258 |   itemLabelWidth?: string;
259 |   itemLabelPosition?: string; // type LabelPosition
260 |   keepModalOpenOnSubmit?: boolean;
261 |   hideButtonRowUntilDirty?: boolean;
262 |   hideButtonRow?: boolean;
263 |   enableSubmit?: boolean;
264 | };
265 | 
266 | export const defaultProps: Pick<
267 |   Props,
268 |   | "cancelLabel"
269 |   | "saveLabel"
270 |   | "saveInProgressLabel"
271 |   | "itemLabelPosition"
272 |   | "itemLabelBreak"
273 |   | "keepModalOpenOnSubmit"
274 |   | "swapCancelAndSave"
275 |   | "hideButtonRowUntilDirty"
276 |   | "hideButtonRow"
277 |   | "enableSubmit"
278 | > = {
279 |   cancelLabel: "Cancel",
280 |   saveLabel: "Save",
281 |   saveInProgressLabel: "Saving...",
282 |   itemLabelPosition: "top",
283 |   itemLabelBreak: true,
284 |   keepModalOpenOnSubmit: false,
285 |   swapCancelAndSave: false,
286 |   hideButtonRowUntilDirty: false,
287 |   hideButtonRow: false,
288 |   enableSubmit: true,
289 | };
290 | 
291 | // --- Remove the properties from formState.subject where the property name ends with UNBOUND_FIELD_SUFFIX
292 | // --- or where the field has noSubmit set to true
293 | function cleanUpSubject(subject: any, noSubmitFields: Record<string, boolean>) {
294 |   return Object.entries(subject || {}).reduce(
295 |     (acc, [key, value]) => {
296 |       if (!key.endsWith(UNBOUND_FIELD_SUFFIX) && !noSubmitFields[key]) {
297 |         acc[key] = value;
298 |       }
299 |       return acc;
300 |     },
301 |     {} as Record<string, any>,
302 |   );
303 | }
304 | 
305 | const Form = forwardRef(function (
306 |   {
307 |     formState,
308 |     dispatch,
309 |     initialValue = EMPTY_OBJECT,
310 |     children,
311 |     style,
312 |     className,
313 |     enabled = true,
314 |     cancelLabel = defaultProps.cancelLabel,
315 |     saveLabel = defaultProps.saveLabel,
316 |     saveInProgressLabel = defaultProps.saveInProgressLabel,
317 |     swapCancelAndSave,
318 |     onWillSubmit,
319 |     onSubmit,
320 |     onCancel,
321 |     onReset,
322 |     onSuccess,
323 |     buttonRow,
324 |     id,
325 |     registerComponentApi,
326 |     itemLabelBreak = defaultProps.itemLabelBreak,
327 |     itemLabelWidth,
328 |     itemLabelPosition = defaultProps.itemLabelPosition,
329 |     keepModalOpenOnSubmit = defaultProps.keepModalOpenOnSubmit,
330 |     hideButtonRowUntilDirty,
331 |     hideButtonRow = defaultProps.hideButtonRow,
332 |     enableSubmit = defaultProps.enableSubmit,
333 |     ...rest
334 |   }: Props,
335 |   ref: ForwardedRef<HTMLFormElement>,
336 | ) {
337 |   const formRef = useRef<HTMLFormElement>(null);
338 |   const [confirmSubmitModalVisible, setConfirmSubmitModalVisible] = useState(false);
339 |   const requestModalFormClose = useModalFormClose();
340 | 
341 |   const isEnabled = enabled && !formState.submitInProgress;
342 |   const isDirty = useMemo(() => {
343 |     return Object.entries(formState.interactionFlags).some(([key, flags]) => {
344 |       if (flags.isDirty) {
345 |         return true;
346 |       }
347 |       return false;
348 |     });
349 |   }, [formState.interactionFlags]);
350 | 
351 |   const formContextValue = useMemo(() => {
352 |     return {
353 |       itemLabelBreak,
354 |       itemLabelWidth,
355 |       itemLabelPosition,
356 |       subject: formState.subject,
357 |       originalSubject: initialValue,
358 |       validationResults: formState.validationResults,
359 |       interactionFlags: formState.interactionFlags,
360 |       dispatch,
361 |       enabled: isEnabled,
362 |     };
363 |   }, [
364 |     dispatch,
365 |     formState.interactionFlags,
366 |     formState.subject,
367 |     formState.validationResults,
368 |     initialValue,
369 |     isEnabled,
370 |     itemLabelBreak,
371 |     itemLabelPosition,
372 |     itemLabelWidth,
373 |   ]);
374 | 
375 |   const doCancel = useEvent(() => {
376 |     onCancel?.();
377 |     void requestModalFormClose();
378 |   });
379 | 
380 |   const doValidate = useEvent(async () => {
381 |     // Trigger validation display on all fields
382 |     dispatch(triedToSubmit());
383 |     
384 |     // Get validation results grouped by severity
385 |     const { error, warning } = groupInvalidValidationResultsBySeverity(
386 |       Object.values(formState.validationResults),
387 |     );
388 |     
389 |     // Prepare cleaned data
390 |     const cleanedData = cleanUpSubject(formState.subject, formState.noSubmitFields);
391 |     
392 |     // Return validation result
393 |     return {
394 |       isValid: error.length === 0,
395 |       data: cleanedData,
396 |       errors: error,
397 |       warnings: warning,
398 |       validationResults: formState.validationResults,
399 |     };
400 |   });
401 | 
402 |   const doSubmit = useEvent(async (event?: FormEvent<HTMLFormElement>) => {
403 |     /* console.log(`🚀 Form submit started`);
404 |     console.log(`🔍 Initial values:`, {
405 |       initialValue,
406 |       EMPTY_OBJECT,
407 |       isEqual: initialValue === EMPTY_OBJECT,
408 |       initialValueType: typeof initialValue,
409 |       emptyObjectType: typeof EMPTY_OBJECT
410 |     }); */
411 |     event?.preventDefault();
412 |     if (!isEnabled) {
413 |       return;
414 |     }
415 |     setConfirmSubmitModalVisible(false);
416 |     
417 |     // Use the extracted validation logic
418 |     const validationResult = await doValidate();
419 |     
420 |     if (!validationResult.isValid) {
421 |       return;
422 |     }
423 |     if (validationResult.warnings.length > 0 && !confirmSubmitModalVisible) {
424 |       setConfirmSubmitModalVisible(true);
425 |       return;
426 |     }
427 |     const prevFocused = document.activeElement;
428 |     dispatch(formSubmitting());
429 |     try {
430 |       const filteredSubject = validationResult.data;
431 |       const canSubmit = await onWillSubmit?.(filteredSubject);
432 |       if (canSubmit === false) {
433 |         // --- We do not reset the form but allow the next submit.
434 |         dispatch(
435 |           backendValidationArrived({ generalValidationResults: [], fieldValidationResults: {} }),
436 |         );
437 |         return;
438 |       }
439 | 
440 |       const result = await onSubmit?.(filteredSubject, {
441 |         passAsDefaultBody: true,
442 |       });
443 |       dispatch(formSubmitted());
444 |       await onSuccess?.(result);
445 | 
446 |       if (!keepModalOpenOnSubmit) {
447 |         void requestModalFormClose();
448 |       }
449 |       // we only reset the form automatically if the initial value is empty ()
450 |       if (initialValue === EMPTY_OBJECT) {
451 |         flushSync(() => {
452 |           doReset();
453 |         });
454 |       }
455 |       if (prevFocused && typeof (prevFocused as HTMLElement).focus === "function") {
456 |         (prevFocused as HTMLElement).focus();
457 |       }
458 |     } catch (e: any) {
459 |       const generalValidationResults: Array<SingleValidationResult> = [];
460 |       const fieldValidationResults: Record<string, Array<SingleValidationResult>> = {};
461 |       if (
462 |         e instanceof Error &&
463 |         "errorCategory" in e &&
464 |         e.errorCategory === "GenericBackendError" &&
465 |         (e as GenericBackendError).details?.issues &&
466 |         Array.isArray((e as GenericBackendError).details.issues)
467 |       ) {
468 |         (e as GenericBackendError).details.issues.forEach((issue: any) => {
469 |           const validationResult = {
470 |             isValid: false,
471 |             invalidMessage: issue.message,
472 |             severity: issue.severity || "error",
473 |             fromBackend: true,
474 |           };
475 |           if (issue.field !== undefined) {
476 |             fieldValidationResults[issue.field] = fieldValidationResults[issue.field] || [];
477 |             fieldValidationResults[issue.field].push(validationResult);
478 |           } else {
479 |             generalValidationResults.push(validationResult);
480 |           }
481 |         });
482 |       } else {
483 |         generalValidationResults.push({
484 |           isValid: false,
485 |           invalidMessage: e.message || "Couldn't save the form.",
486 |           severity: "error",
487 |           fromBackend: true,
488 |         });
489 |       }
490 |       dispatch(
491 |         backendValidationArrived({
492 |           generalValidationResults,
493 |           fieldValidationResults,
494 |         }),
495 |       );
496 |     }
497 |   });
498 | 
499 |   const doReset = useEvent(() => {
500 |     dispatch(formReset());
501 |     onReset?.();
502 |   });
503 | 
504 |   const updateData = useEvent((change: any) => {
505 |     if (typeof change !== "object" || change === null || change === undefined) {
506 |       return;
507 |     }
508 |     Object.entries(change).forEach(([key, value]) => {
509 |       dispatch({
510 |         type: FormActionKind.FIELD_VALUE_CHANGED,
511 |         payload: {
512 |           uid: key,
513 |           value: value,
514 |         },
515 |       });
516 |     });
517 |   });
518 | 
519 |   const cancelButton =
520 |     cancelLabel === "" ? null : (
521 |       <Button
522 |         data-part-id={PART_CANCEL_BUTTON}
523 |         key="cancel"
524 |         type="button"
525 |         themeColor={"secondary"}
526 |         variant={"ghost"}
527 |         onClick={doCancel}
528 |       >
529 |         {cancelLabel}
530 |       </Button>
531 |     );
532 |   const submitButton = useMemo(
533 |     () => (
534 |       <Button data-part-id={PART_SUBMIT_BUTTON} key="submit" type={"submit"} disabled={!isEnabled || !enableSubmit}>
535 |         {formState.submitInProgress ? saveInProgressLabel : saveLabel}
536 |       </Button>
537 |     ),
538 |     [isEnabled, enableSubmit, formState.submitInProgress, saveInProgressLabel, saveLabel],
539 |   );
540 | 
541 |   useEffect(() => {
542 |     registerComponentApi?.({
543 |       reset: doReset,
544 |       update: updateData,
545 |       validate: doValidate,
546 |     });
547 |   }, [doReset, updateData, doValidate, registerComponentApi]);
548 | 
549 |   let safeButtonRow = (
550 |     <>
551 |       {buttonRow || (
552 |         <div className={styles.buttonRow}>
553 |           {swapCancelAndSave && [submitButton, cancelButton]}
554 |           {!swapCancelAndSave && [cancelButton, submitButton]}
555 |         </div>
556 |       )}
557 |     </>
558 |   );
559 |   return (
560 |     <>
561 |       <form
562 |         {...rest}
563 |         style={style}
564 |         className={classnames(styles.wrapper, className)}
565 |         onSubmit={doSubmit}
566 |         onReset={doReset}
567 |         id={id}
568 |         key={formState.resetVersion}
569 |         ref={formRef}
570 |       >
571 |         <ValidationSummary generalValidationResults={formState.generalValidationResults} />
572 |         <FormContext.Provider value={formContextValue}>{children}</FormContext.Provider>
573 |         {!hideButtonRow && (!hideButtonRowUntilDirty || isDirty) && safeButtonRow}
574 |       </form>
575 |       {confirmSubmitModalVisible && (
576 |         <ModalDialog
577 |           onClose={() => setConfirmSubmitModalVisible(false)}
578 |           isInitiallyOpen={true}
579 |           title={"Are you sure want to move forward?"}
580 |         >
581 |           <Stack orientation={"vertical"} style={{ gap: "0.5rem" }}>
582 |             <Text>
583 |               The following warnings were found during validation. Please make sure you are willing
584 |               to move forward despite these issues.
585 |             </Text>
586 |             <ValidationSummary
587 |               generalValidationResults={formState.generalValidationResults}
588 |               fieldValidationResults={formState.validationResults}
589 |             />
590 |             <Stack orientation={"horizontal"} horizontalAlignment={"end"} style={{ gap: "1em" }}>
591 |               <Button
592 |                 variant={"ghost"}
593 |                 themeColor={"secondary"}
594 |                 onClick={() => setConfirmSubmitModalVisible(false)}
595 |               >
596 |                 No
597 |               </Button>
598 |               <Button onClick={() => doSubmit()} autoFocus={true}>
599 |                 Yes, proceed
600 |               </Button>
601 |             </Stack>
602 |           </Stack>
603 |         </ModalDialog>
604 |       )}
605 |     </>
606 |   );
607 | });
608 | Form.displayName = "Form";
609 | 
610 | type FormComponentDef = ComponentDef<typeof FormMd>;
611 | 
612 | export const FormWithContextVar = forwardRef(function (
613 |   {
614 |     node,
615 |     renderChild,
616 |     extractValue,
617 |     style,
618 |     className,
619 |     lookupEventHandler,
620 |     registerComponentApi,
621 |   }: {
622 |     node: FormComponentDef;
623 |     renderChild: RenderChildFn;
624 |     extractValue: ValueExtractor;
625 |     style?: CSSProperties;
626 |     className?: string;
627 |     lookupEventHandler: LookupEventHandlerFn<typeof FormMd>;
628 |     registerComponentApi: RegisterComponentApiFn;
629 |   },
630 |   ref: ForwardedRef<HTMLDivElement>,
631 | ) {
632 |   const [formState, dispatch] = useReducer(formReducer, initialState);
633 | 
634 |   const $data = useMemo(() => {
635 |     const updateData = (change: any) => {
636 |       if (typeof change !== "object" || change === null || change === undefined) {
637 |         return;
638 |       }
639 |       Object.entries(change).forEach(([key, value]) => {
640 |         dispatch({
641 |           type: FormActionKind.FIELD_VALUE_CHANGED,
642 |           payload: {
643 |             uid: key,
644 |             value: value,
645 |           },
646 |         });
647 |       });
648 |     };
649 | 
650 |     return { ...cleanUpSubject(formState.subject, formState.noSubmitFields), update: updateData };
651 |   }, [formState.subject, formState.noSubmitFields]);
652 | 
653 |   const nodeWithItem = useMemo(() => {
654 |     return {
655 |       type: "Fragment",
656 |       vars: {
657 |         $data: $data,
658 |       },
659 |       children: node.children,
660 |     };
661 |   }, [$data, node.children]);
662 | 
663 |   const initialValue = extractValue(node.props.data);
664 |   const submitMethod =
665 |     extractValue.asOptionalString(node.props.submitMethod) || (initialValue ? "put" : "post");
666 |   const inProgressNotificationMessage =
667 |     extractValue.asOptionalString(node.props.inProgressNotificationMessage) || "";
668 |   const completedNotificationMessage =
669 |     extractValue.asOptionalString(node.props.completedNotificationMessage) || "";
670 |   const errorNotificationMessage =
671 |     extractValue.asOptionalString(node.props.errorNotificationMessage) || "";
672 | 
673 |   const submitUrl =
674 |     extractValue.asOptionalString(node.props.submitUrl) ||
675 |     extractValue.asOptionalString(node.props._data_url);
676 | 
677 |   const itemLabelWidth = extractValue.asOptionalString(node.props.itemLabelWidth);
678 |   const { cssProps: itemLabelWidthCssProps } = resolveLayoutProps({ width: itemLabelWidth });
679 | 
680 |   return (
681 |     <Slot ref={ref} style={style}>
682 |       <Form
683 |         keepModalOpenOnSubmit={extractValue.asOptionalBoolean(node.props.keepModalOpenOnSubmit)}
684 |         itemLabelPosition={extractValue.asOptionalString(node.props.itemLabelPosition)}
685 |         itemLabelBreak={extractValue.asOptionalBoolean(node.props.itemLabelBreak)}
686 |         itemLabelWidth={itemLabelWidthCssProps.width as string}
687 |         hideButtonRowUntilDirty={extractValue.asOptionalBoolean(node.props.hideButtonRowUntilDirty)}
688 |         hideButtonRow={extractValue.asOptionalBoolean(node.props.hideButtonRow)}
689 |         enableSubmit={extractValue.asOptionalBoolean(node.props.enableSubmit)}
690 |         formState={formState}
691 |         dispatch={dispatch}
692 |         id={node.uid}
693 |         className={className}
694 |         cancelLabel={extractValue(node.props.cancelLabel)}
695 |         saveLabel={extractValue(node.props.saveLabel)}
696 |         saveInProgressLabel={extractValue(node.props.saveInProgressLabel)}
697 |         swapCancelAndSave={extractValue.asOptionalBoolean(node.props.swapCancelAndSave, false)}
698 |         onWillSubmit={lookupEventHandler("willSubmit", {
699 |           context: {
700 |             $data,
701 |           },
702 |         })}
703 |         onSubmit={lookupEventHandler("submit", {
704 |           defaultHandler: submitUrl
705 |             ? `(eventArgs)=> Actions.callApi({ url: "${submitUrl}", method: "${submitMethod}", body: eventArgs, inProgressNotificationMessage: "${inProgressNotificationMessage}", completedNotificationMessage: "${completedNotificationMessage}", errorNotificationMessage: "${errorNotificationMessage}" })`
706 |             : undefined,
707 |           context: {
708 |             $data,
709 |           },
710 |         })}
711 |         onCancel={lookupEventHandler("cancel", {
712 |           context: {
713 |             $data,
714 |           },
715 |         })}
716 |         onReset={lookupEventHandler("reset", {
717 |           context: {
718 |             $data,
719 |           },
720 |         })}
721 |         onSuccess={lookupEventHandler("success", {
722 |           context: {
723 |             $data,
724 |           },
725 |         })}
726 |         initialValue={initialValue}
727 |         buttonRow={renderChild(node.props.buttonRowTemplate)}
728 |         registerComponentApi={registerComponentApi}
729 |         enabled={
730 |           extractValue.asOptionalBoolean(node.props.enabled, true) &&
731 |           !extractValue.asOptionalBoolean((node.props as any).loading, false)
732 |         } //the as any is there to not include this property in the docs (temporary, we disable the form until it's data is loaded)
733 |       >
734 |         {renderChild(nodeWithItem)}
735 |       </Form>
736 |     </Slot>
737 |   );
738 | });
739 | FormWithContextVar.displayName = "FormWithContextVar";
740 | 
```

--------------------------------------------------------------------------------
/xmlui/src/components/DatePicker/DatePicker.module.scss:
--------------------------------------------------------------------------------

```scss
  1 | @use "../../components-core/theming/themes" as t;
  2 | 
  3 | // --- This code snippet is required to collect the theme variables used in this module
  4 | $themeVars: (
  5 | );
  6 | 
  7 | @function createThemeVar($componentVariable) {
  8 |   $themeVars: t.appendThemeVar($themeVars, $componentVariable) !global;
  9 |   @return t.getThemeVar($themeVars, $componentVariable);
 10 | }
 11 | 
 12 | $componentName: "DatePicker";
 13 | $themeVars: t.composePaddingVars($themeVars, $componentName);
 14 | 
 15 | // Variables for default variant
 16 | $borderRadius-DatePicker--default: createThemeVar("Input:borderRadius-#{$componentName}--default");
 17 | $borderColor-DatePicker--default: createThemeVar("Input:borderColor-#{$componentName}--default");
 18 | $borderWidth-DatePicker--default: createThemeVar("Input:borderWidth-#{$componentName}--default");
 19 | $borderStyle-DatePicker--default: createThemeVar("Input:borderStyle-#{$componentName}--default");
 20 | $backgroundColor-DatePicker--default: createThemeVar("Input:backgroundColor-#{$componentName}--default");
 21 | $boxShadow-DatePicker--default: createThemeVar("Input:boxShadow-#{$componentName}--default");
 22 | $textColor-DatePicker--default: createThemeVar("Input:textColor-#{$componentName}--default");
 23 | $borderColor-DatePicker--default--hover: createThemeVar("Input:borderColor-#{$componentName}--default--hover");
 24 | $backgroundColor-DatePicker--default--hover: createThemeVar("Input:backgroundColor-#{$componentName}--default--hover");
 25 | $boxShadow-DatePicker--default--hover: createThemeVar("Input:boxShadow-#{$componentName}--default--hover");
 26 | $textColor-DatePicker--default--hover: createThemeVar("Input:textColor-#{$componentName}--default--hover");
 27 | $outlineWidth-DatePicker--default--focus: createThemeVar("Input:outlineWidth-#{$componentName}--default--focus");
 28 | $outlineColor-DatePicker--default--focus: createThemeVar("Input:outlineColor-#{$componentName}--default--focus");
 29 | $outlineStyle-DatePicker--default--focus: createThemeVar("Input:outlineStyle-#{$componentName}--default--focus");
 30 | $outlineOffset-DatePicker--default--focus: createThemeVar("Input:outlineOffset-#{$componentName}--default--focus");
 31 | $textColor-placeholder-DatePicker--default: createThemeVar("Input:textColor-placeholder-#{$componentName}--default");
 32 | $fontSize-placeholder-DatePicker--default: createThemeVar("Input:fontSize-placeholder-#{$componentName}--default");
 33 | $color-adornment-DatePicker--default: createThemeVar("Input:color-adornment-#{$componentName}--default");
 34 | 
 35 | // Variables for error variant
 36 | $borderRadius-DatePicker--error: createThemeVar("Input:borderRadius-#{$componentName}--error");
 37 | $borderColor-DatePicker--error: createThemeVar("Input:borderColor-#{$componentName}--error");
 38 | $borderWidth-DatePicker--error: createThemeVar("Input:borderWidth-#{$componentName}--error");
 39 | $borderStyle-DatePicker--error: createThemeVar("Input:borderStyle-#{$componentName}--error");
 40 | $backgroundColor-DatePicker--error: createThemeVar("Input:backgroundColor-#{$componentName}--error");
 41 | $boxShadow-DatePicker--error: createThemeVar("Input:boxShadow-#{$componentName}--error");
 42 | $textColor-DatePicker--error: createThemeVar("Input:textColor-#{$componentName}--error");
 43 | $borderColor-DatePicker--error--hover: createThemeVar("Input:borderColor-#{$componentName}--error--hover");
 44 | $backgroundColor-DatePicker--error--hover: createThemeVar("Input:backgroundColor-#{$componentName}--error--hover");
 45 | $boxShadow-DatePicker--error--hover: createThemeVar("Input:boxShadow-#{$componentName}--error--hover");
 46 | $textColor-DatePicker--error--hover: createThemeVar("Input:textColor-#{$componentName}--error--hover");
 47 | $outlineWidth-DatePicker--error--focus: createThemeVar("Input:outlineWidth-#{$componentName}--error--focus");
 48 | $outlineColor-DatePicker--error--focus: createThemeVar("Input:outlineColor-#{$componentName}--error--focus");
 49 | $outlineStyle-DatePicker--error--focus: createThemeVar("Input:outlineStyle-#{$componentName}--error--focus");
 50 | $outlineOffset-DatePicker--error--focus: createThemeVar("Input:outlineOffset-#{$componentName}--error--focus");
 51 | $textColor-placeholder-DatePicker--error: createThemeVar("Input:textColor-placeholder-#{$componentName}--error");
 52 | $fontSize-placeholder-DatePicker--error: createThemeVar("Input:fontSize-placeholder-#{$componentName}--error");
 53 | $color-adornment-DatePicker--error: createThemeVar("Input:color-adornment-#{$componentName}--error");
 54 | 
 55 | // Variables for warning variant
 56 | $borderRadius-DatePicker--warning: createThemeVar("Input:borderRadius-#{$componentName}--warning");
 57 | $borderColor-DatePicker--warning: createThemeVar("Input:borderColor-#{$componentName}--warning");
 58 | $borderWidth-DatePicker--warning: createThemeVar("Input:borderWidth-#{$componentName}--warning");
 59 | $borderStyle-DatePicker--warning: createThemeVar("Input:borderStyle-#{$componentName}--warning");
 60 | $backgroundColor-DatePicker--warning: createThemeVar("Input:backgroundColor-#{$componentName}--warning");
 61 | $boxShadow-DatePicker--warning: createThemeVar("Input:boxShadow-#{$componentName}--warning");
 62 | $textColor-DatePicker--warning: createThemeVar("Input:textColor-#{$componentName}--warning");
 63 | $borderColor-DatePicker--warning--hover: createThemeVar("Input:borderColor-#{$componentName}--warning--hover");
 64 | $backgroundColor-DatePicker--warning--hover: createThemeVar("Input:backgroundColor-#{$componentName}--warning--hover");
 65 | $boxShadow-DatePicker--warning--hover: createThemeVar("Input:boxShadow-#{$componentName}--warning--hover");
 66 | $textColor-DatePicker--warning--hover: createThemeVar("Input:textColor-#{$componentName}--warning--hover");
 67 | $outlineWidth-DatePicker--warning--focus: createThemeVar("Input:outlineWidth-#{$componentName}--warning--focus");
 68 | $outlineColor-DatePicker--warning--focus: createThemeVar("Input:outlineColor-#{$componentName}--warning--focus");
 69 | $outlineStyle-DatePicker--warning--focus: createThemeVar("Input:outlineStyle-#{$componentName}--warning--focus");
 70 | $outlineOffset-DatePicker--warning--focus: createThemeVar("Input:outlineOffset-#{$componentName}--warning--focus");
 71 | $textColor-placeholder-DatePicker--warning: createThemeVar("Input:textColor-placeholder-#{$componentName}--warning");
 72 | $fontSize-placeholder-DatePicker--warning: createThemeVar("Input:fontSize-placeholder-#{$componentName}--warning");
 73 | $color-adornment-DatePicker--warning: createThemeVar("Input:color-adornment-#{$componentName}--warning");
 74 | 
 75 | // Variables for success variant
 76 | $borderRadius-DatePicker--success: createThemeVar("Input:borderRadius-#{$componentName}--success");
 77 | $borderColor-DatePicker--success: createThemeVar("Input:borderColor-#{$componentName}--success");
 78 | $borderWidth-DatePicker--success: createThemeVar("Input:borderWidth-#{$componentName}--success");
 79 | $borderStyle-DatePicker--success: createThemeVar("Input:borderStyle-#{$componentName}--success");
 80 | $backgroundColor-DatePicker--success: createThemeVar("Input:backgroundColor-#{$componentName}--success");
 81 | $boxShadow-DatePicker--success: createThemeVar("Input:boxShadow-#{$componentName}--success");
 82 | $textColor-DatePicker--success: createThemeVar("Input:textColor-#{$componentName}--success");
 83 | $borderColor-DatePicker--success--hover: createThemeVar("Input:borderColor-#{$componentName}--success--hover");
 84 | $backgroundColor-DatePicker--success--hover: createThemeVar("Input:backgroundColor-#{$componentName}--success--hover");
 85 | $boxShadow-DatePicker--success--hover: createThemeVar("Input:boxShadow-#{$componentName}--success--hover");
 86 | $textColor-DatePicker--success--hover: createThemeVar("Input:textColor-#{$componentName}--success--hover");
 87 | $outlineWidth-DatePicker--success--focus: createThemeVar("Input:outlineWidth-#{$componentName}--success--focus");
 88 | $outlineColor-DatePicker--success--focus: createThemeVar("Input:outlineColor-#{$componentName}--success--focus");
 89 | $outlineStyle-DatePicker--success--focus: createThemeVar("Input:outlineStyle-#{$componentName}--success--focus");
 90 | $outlineOffset-DatePicker--success--focus: createThemeVar("Input:outlineOffset-#{$componentName}--success--focus");
 91 | $textColor-placeholder-DatePicker--success: createThemeVar("Input:textColor-placeholder-#{$componentName}--success");
 92 | $fontSize-placeholder-DatePicker--success: createThemeVar("Input:fontSize-placeholder-#{$componentName}--success");
 93 | $color-adornment-DatePicker--success: createThemeVar("Input:color-adornment-#{$componentName}--success");
 94 | 
 95 | // Variables for @layer section
 96 | $fontSize-DatePicker: createThemeVar("Input:fontSize-DatePicker");
 97 | $backgroundColor-DatePicker--disabled: createThemeVar("Input:backgroundColor-DatePicker--disabled");
 98 | $textColor-DatePicker--disabled: createThemeVar("Input:textColor-DatePicker--disabled");
 99 | $borderColor-DatePicker--disabled: createThemeVar("Input:borderColor-DatePicker--disabled");
100 | $boxShadow-menu-DatePicker: createThemeVar("Input:boxShadow-menu-DatePicker");
101 | $backgroundColor-menu-DatePicker: createThemeVar("Input:backgroundColor-menu-DatePicker");
102 | $borderRadius-menu-DatePicker: createThemeVar("Input:borderRadius-menu-DatePicker");
103 | 
104 | // --- CSS properties of a particular Select variant
105 | @mixin variant($variantName) {
106 |   border-radius: createThemeVar("Input:borderRadius-#{$componentName}--#{$variantName}");
107 |   border-color: createThemeVar("Input:borderColor-#{$componentName}--#{$variantName}");
108 |   border-width: createThemeVar("Input:borderWidth-#{$componentName}--#{$variantName}");
109 |   border-style: createThemeVar("Input:borderStyle-#{$componentName}--#{$variantName}");
110 |   background-color: createThemeVar("Input:backgroundColor-#{$componentName}--#{$variantName}");
111 |   box-shadow: createThemeVar("Input:boxShadow-#{$componentName}--#{$variantName}");
112 |   color: createThemeVar("Input:textColor-#{$componentName}--#{$variantName}");
113 | 
114 |   &:hover {
115 |     border-color: createThemeVar("Input:borderColor-#{$componentName}--#{$variantName}--hover");
116 |     background-color: createThemeVar("Input:backgroundColor-#{$componentName}--#{$variantName}--hover"
117 |     );
118 |     box-shadow: createThemeVar("Input:boxShadow-#{$componentName}--#{$variantName}--hover");
119 |     color: createThemeVar("Input:textColor-#{$componentName}--#{$variantName}--hover");
120 |   }
121 | 
122 |   &:focus {
123 |     outline-width: createThemeVar("Input:outlineWidth-#{$componentName}--#{$variantName}--focus");
124 |     outline-color: createThemeVar("Input:outlineColor-#{$componentName}--#{$variantName}--focus");
125 |     outline-style: createThemeVar("Input:outlineStyle-#{$componentName}--#{$variantName}--focus");
126 |     outline-offset: createThemeVar("Input:outlineOffset-#{$componentName}--#{$variantName}--focus");
127 |   }
128 | 
129 |   .placeholder {
130 |     color: createThemeVar("Input:textColor-placeholder-#{$componentName}--#{$variantName}");
131 |     font-size: createThemeVar("Input:fontSize-placeholder-#{$componentName}--#{$variantName}");
132 |   }
133 | 
134 |   .adornment {
135 |     color: createThemeVar("Input:color-adornment-#{$componentName}--#{$variantName}");
136 |   }
137 | }
138 | 
139 | $rdp-accent-color: createThemeVar("Input:backgroundColor-item-DatePicker--active");
140 | $backgroundColor-item-DatePicker--hover: createThemeVar("Input:backgroundColor-item-DatePicker--hover"
141 |   );
142 | $rdp-selected-color: createThemeVar("Input:textColor-value-DatePicker");
143 | $rdp-cell-size: 40px;
144 | $rdp-caption-font-size: 18px;
145 | $rdp-outline: 2px solid t.useVar($rdp-accent-color);
146 | $rdp-outline-selected: 3px solid t.useVar($rdp-accent-color);
147 | $minHeight: createThemeVar("Input:minHeight-#{$componentName}");
148 | $borderColor-selectedItem-DatePicker: createThemeVar("Input:borderColor-selectedItem-DatePicker");
149 | 
150 | @layer components {
151 |   .datePicker {
152 |     display: flex;
153 |     align-items: center;
154 |     cursor: pointer;
155 |     flex-direction: row;
156 |     width: 100%;
157 |     min-height: $minHeight;
158 |     border-width: 1px;
159 |     border-style: solid;
160 |     transition: background-color ease-in 0.1s;
161 |     overflow: hidden;
162 |     gap: t.$space-2;
163 |     font-size: $fontSize-DatePicker;
164 |     @include t.paddingVars($themeVars, $componentName);
165 | 
166 |     @include variant("default");
167 | 
168 |     &.error {
169 |       @include variant("error");
170 |     }
171 | 
172 |     &.warning {
173 |       @include variant("warning");
174 |     }
175 | 
176 |     &.valid {
177 |       @include variant("success");
178 |     }
179 | 
180 |     &.disabled {
181 |       cursor: not-allowed;
182 |       background-color: $backgroundColor-DatePicker--disabled;
183 |       color: $textColor-DatePicker--disabled;
184 |       border-color: $borderColor-DatePicker--disabled;
185 | 
186 |       .indicator,
187 |       .datePickerInput {
188 |         cursor: not-allowed;
189 |       }
190 |     }
191 |   }
192 | 
193 |   .inlinePickerMenu {
194 |     padding: 0;
195 |     overflow-y: auto;
196 |     width: 100%;
197 |     max-width: fit-content;
198 |     height: fit-content;
199 | 
200 |     @include variant("default");
201 | 
202 |     &.error {
203 |       @include variant("error");
204 |     }
205 | 
206 |     &.warning {
207 |       @include variant("warning");
208 |     }
209 | 
210 |     &.valid {
211 |       @include variant("success");
212 |     }
213 |   }
214 | 
215 |   .datePickerMenu {
216 |     padding: t.$space-4;
217 |     overflow-y: auto;
218 |     height: fit-content;
219 |     box-shadow: $boxShadow-menu-DatePicker;
220 |     background-color: $backgroundColor-menu-DatePicker;
221 |     border-radius: $borderRadius-menu-DatePicker;
222 |     border: 1px solid $rdp-accent-color;
223 |   }
224 | 
225 |   /* Variables declaration */
226 |   /* prettier-ignore */
227 |   .root {
228 |     --rdp-day-height: 44px;
229 |     /* The height of the day cells. */
230 |     --rdp-day-width: 44px;
231 |     /* The width of the day cells. */
232 | 
233 |     --rdp-day_button-border-radius: 100%;
234 |     /* The border radius of the day cells. */
235 |     --rdp-day_button-border: 2px solid transparent;
236 |     /* The border of the day cells. */
237 |     --rdp-day_button-height: 42px;
238 |     /* The height of the day cells. */
239 |     --rdp-day_button-width: 42px;
240 |     /* The width of the day cells. */
241 | 
242 |     --rdp-disabled-opacity: 0.5;
243 |     /* The opacity of the disabled days. */
244 |     --rdp-outside-opacity: 0.75;
245 |     /* The opacity of the days outside the current month. */
246 | 
247 |     --rdp-dropdown-gap: 0.5rem;
248 |     /* The gap between the dropdowns used in the month captons. */
249 | 
250 |     --rdp-months-gap: 2rem;
251 |     /* The gap between the months in the multi-month view. */
252 | 
253 |     --rdp-nav_button-disabled-opacity: 0.5;
254 |     /* The opacity of the disabled navigation buttons. */
255 |     --rdp-nav_button-height: 2.25rem;
256 |     /* The height of the navigation buttons. */
257 |     --rdp-nav_button-width: 2.25rem;
258 |     /* The width of the navigation buttons. */
259 |     --rdp-nav-height: 2.75rem;
260 |     /* The height of the navigation bar. */
261 | 
262 |     --rdp-range_middle-color: inherit;
263 |     /* The color of the range text. */
264 | 
265 |     --rdp-range_start-color: white;
266 |     /* The color of the range text. */
267 |     --rdp-range_start-background: linear-gradient(var(--rdp-gradient-direction), transparent 50%, $backgroundColor-item-DatePicker--hover 50%);
268 |     /* Used for the background of the start of the selected range. */
269 |     --rdp-range_start-date-background-color: $rdp-accent-color;
270 |     /* The background color of the date when at the start of the selected range. */
271 | 
272 |     --rdp-range_end-background: linear-gradient(var(--rdp-gradient-direction), var(--rdp-range_middle-background-color) 50%, transparent 50%);
273 |     /* Used for the background of the end of the selected range. */
274 |     --rdp-range_end-color: white;
275 |     /* The color of the range text. */
276 |     --rdp-range_end-date-background-color: $rdp-accent-color;
277 |     /* The background color of the date when at the end of the selected range. */
278 | 
279 |     --rdp-week_number-border-radius: 100%;
280 |     /* The border radius of the week number. */
281 |     --rdp-week_number-border: 2px solid transparent;
282 |     /* The border of the week number. */
283 | 
284 |     --rdp-week_number-height: var(--rdp-day-height);
285 |     /* The height of the week number cells. */
286 |     --rdp-week_number-opacity: 0.75;
287 |     /* The opacity of the week number. */
288 |     --rdp-week_number-width: var(--rdp-day-width);
289 |     /* The width of the week number cells. */
290 |     --rdp-weeknumber-text-align: center;
291 |     /* The text alignment of the weekday cells. */
292 | 
293 |     --rdp-weekday-opacity: 0.75;
294 |     /* The opacity of the weekday. */
295 |     --rdp-weekday-padding: 0.5rem 0rem;
296 |     /* The padding of the weekday. */
297 |     --rdp-weekday-text-align: center;
298 |     /* The text alignment of the weekday cells. */
299 | 
300 |     --rdp-gradient-direction: 90deg;
301 | 
302 |     --rdp-animation_duration: 0.3s;
303 |     --rdp-animation_timing: cubic-bezier(0.4, 0, 0.2, 1);
304 |   }
305 | 
306 |   .root[dir="rtl"] {
307 |     --rdp-gradient-direction: -90deg;
308 |   }
309 | 
310 |   .root[data-broadcast-calendar="true"] {
311 |     --rdp-outside-opacity: unset;
312 |   }
313 | 
314 |   /* Root of the component. */
315 |   .root {
316 |     position: relative;
317 |     /* Required to position the navigation toolbar. */
318 |     box-sizing: border-box;
319 |   }
320 | 
321 |   .root * {
322 |     box-sizing: border-box;
323 |   }
324 | 
325 |   .day {
326 |     width: var(--rdp-day-width);
327 |     height: var(--rdp-day-height);
328 |     text-align: center;
329 |   }
330 | 
331 |   .day_button {
332 |     background: none;
333 |     padding: 0;
334 |     margin: 0;
335 |     cursor: pointer;
336 |     font: inherit;
337 |     color: inherit;
338 |     justify-content: center;
339 |     align-items: center;
340 |     display: flex;
341 | 
342 |     width: var(--rdp-day_button-width);
343 |     height: var(--rdp-day_button-height);
344 |     border: var(--rdp-day_button-border);
345 |     border-radius: var(--rdp-day_button-border-radius);
346 | 
347 |     &:hover {
348 |       background-color: $backgroundColor-item-DatePicker--hover;
349 |     }
350 |   }
351 | 
352 |   .day_button:disabled {
353 |     cursor: revert;
354 |   }
355 | 
356 |   .caption_label {
357 |     z-index: 1;
358 | 
359 |     position: relative;
360 |     display: inline-flex;
361 |     align-items: center;
362 |     padding-left: t.$space-2;
363 |     padding-right: t.$space-2;
364 | 
365 |     white-space: nowrap;
366 |     border: 0;
367 |   }
368 | 
369 |   .dropdown:focus-visible~.caption_label {
370 |     outline: 5px auto t.$outlineColor--focus;
371 |   }
372 | 
373 |   .button_next,
374 |   .button_previous {
375 |     border: none;
376 |     background: none;
377 |     padding: 0;
378 |     margin: 0;
379 |     cursor: pointer;
380 |     font: inherit;
381 |     color: inherit;
382 |     -moz-appearance: none;
383 |     -webkit-appearance: none;
384 |     display: inline-flex;
385 |     align-items: center;
386 |     justify-content: center;
387 |     position: relative;
388 |     appearance: none;
389 | 
390 |     width: var(--rdp-nav_button-width);
391 |     height: var(--rdp-nav_button-height);
392 | 
393 |     &:hover {
394 |       background-color: $backgroundColor-item-DatePicker--hover;
395 |     }
396 |   }
397 | 
398 |   .button_next:disabled,
399 |   .button_next[aria-disabled="true"],
400 |   .button_previous:disabled,
401 |   .button_previous[aria-disabled="true"] {
402 |     cursor: revert;
403 | 
404 |     opacity: var(--rdp-nav_button-disabled-opacity);
405 |   }
406 | 
407 |   .chevron {
408 |     display: inline-block;
409 |     fill: currentColor;
410 |   }
411 | 
412 |   .root[dir="rtl"] .nav .chevron {
413 |     transform: rotate(180deg);
414 |     transform-origin: 50%;
415 |   }
416 | 
417 |   .dropdowns {
418 |     position: relative;
419 |     display: inline-flex;
420 |     align-items: center;
421 |     gap: 0;
422 |   }
423 | 
424 |   .dropdown {
425 |     z-index: 2;
426 | 
427 |     /* Reset */
428 |     opacity: 0;
429 |     appearance: none;
430 |     position: absolute;
431 |     inset-block-start: 0;
432 |     inset-block-end: 0;
433 |     inset-inline-start: 0;
434 |     width: 100%;
435 |     margin: 0;
436 |     padding: 0;
437 |     cursor: inherit;
438 |     border: none;
439 |     line-height: inherit;
440 |   }
441 | 
442 |   .dropdown_root {
443 |     position: relative;
444 |     display: inline-flex;
445 |     align-items: center;
446 |     padding: t.$space-1_5;
447 | 
448 |     &:hover {
449 |       background-color: $backgroundColor-item-DatePicker--hover;
450 |       cursor: pointer;
451 |     }
452 |   }
453 | 
454 |   .dropdown_root[data-disabled="true"] .chevron {
455 |     opacity: var(--rdp-disabled-opacity);
456 |   }
457 | 
458 |   .month_caption {
459 |     display: flex;
460 |     align-content: center;
461 |     padding: t.$space-3 t.$space-3 t.$space-3 t.$space-1;
462 |     height: var(--rdp-nav-height);
463 |     font-weight: bold;
464 |     font-size: large;
465 |   }
466 | 
467 |   .root[data-nav-layout="around"] .month,
468 |   .root[data-nav-layout="after"] .month {
469 |     position: relative;
470 |   }
471 | 
472 |   .root[data-nav-layout="around"] .month_caption {
473 |     justify-content: center;
474 |     margin-inline-start: var(--rdp-nav_button-width);
475 |     margin-inline-end: var(--rdp-nav_button-width);
476 |     position: relative;
477 |   }
478 | 
479 |   .root[data-nav-layout="around"] .button_previous {
480 |     position: absolute;
481 |     inset-inline-start: 0;
482 |     top: 0;
483 |     height: var(--rdp-nav-height);
484 |     display: inline-flex;
485 |   }
486 | 
487 |   .root[data-nav-layout="around"] .button_next {
488 |     position: absolute;
489 |     inset-inline-end: 0;
490 |     top: 0;
491 |     height: var(--rdp-nav-height);
492 |     display: inline-flex;
493 |     justify-content: center;
494 |   }
495 | 
496 |   .months {
497 |     position: relative;
498 |     display: flex;
499 |     flex-wrap: wrap;
500 |     gap: var(--rdp-months-gap);
501 |     max-width: fit-content;
502 |   }
503 | 
504 |   .month_grid {
505 |     border-collapse: collapse;
506 |   }
507 | 
508 |   .nav {
509 |     position: absolute;
510 |     inset-block-start: 0;
511 |     inset-inline-end: 0;
512 | 
513 |     display: flex;
514 |     align-items: center;
515 | 
516 |     height: var(--rdp-nav-height);
517 |   }
518 | 
519 |   .weekday {
520 |     opacity: var(--rdp-weekday-opacity);
521 |     padding: var(--rdp-weekday-padding);
522 |     font-weight: 500;
523 |     font-size: smaller;
524 |     color: t.$textColor-secondary;
525 |     text-align: var(--rdp-weekday-text-align);
526 |     text-transform: var(--rdp-weekday-text-transform);
527 |   }
528 | 
529 |   .week_number {
530 |     opacity: var(--rdp-week_number-opacity);
531 |     font-weight: 400;
532 |     font-size: small;
533 |     height: var(--rdp-week_number-height);
534 |     width: var(--rdp-week_number-width);
535 |     border: var(--rdp-week_number-border);
536 |     border-radius: var(--rdp-week_number-border-radius);
537 |     text-align: var(--rdp-weeknumber-text-align);
538 |   }
539 | 
540 |   /* DAY MODIFIERS */
541 |   .today:not(.outside) {
542 |     color: t.$color-primary-500;
543 |   }
544 | 
545 |   .selected {
546 |     font-weight: bold;
547 |     font-size: large;
548 |   }
549 | 
550 |   .selected .day_button {
551 |     border: 2px solid $borderColor-selectedItem-DatePicker;
552 |   }
553 | 
554 |   .outside {
555 |     opacity: var(--rdp-outside-opacity);
556 |   }
557 | 
558 |   .disabled {
559 |     opacity: var(--rdp-disabled-opacity);
560 |   }
561 | 
562 |   .hidden {
563 |     visibility: hidden;
564 |     color: var(--rdp-range_start-color);
565 |   }
566 | 
567 |   .range_start {
568 |     background: var(--rdp-range_start-background);
569 |   }
570 | 
571 |   .range_start .day_button {
572 |     background-color: var(--rdp-range_start-date-background-color);
573 |     color: var(--rdp-range_start-color);
574 |   }
575 | 
576 |   .range_middle {
577 |     background-color: var(--rdp-range_middle-background-color);
578 |   }
579 | 
580 |   .range_middle .day_button {
581 |     border-color: transparent;
582 |     border: unset;
583 |     border-radius: unset;
584 |     color: var(--rdp-range_middle-color);
585 |   }
586 | 
587 |   .range_end {
588 |     background: var(--rdp-range_end-background);
589 |     color: var(--rdp-range_end-color);
590 |   }
591 | 
592 |   .range_end .day_button {
593 |     color: var(--rdp-range_start-color);
594 |     background-color: var(--rdp-range_end-date-background-color);
595 |   }
596 | 
597 |   .range_start.range_end {
598 |     background: revert;
599 |   }
600 | 
601 |   .focusable {
602 |     cursor: pointer;
603 |   }
604 | 
605 |   .datePickerValue {
606 |     display: flex;
607 |     flex: 1;
608 |   }
609 | 
610 |   @keyframes rdp-slide_in_left {
611 |     0% {
612 |       transform: translateX(-100%);
613 |     }
614 | 
615 |     100% {
616 |       transform: translateX(0);
617 |     }
618 |   }
619 | 
620 |   @keyframes rdp-slide_in_right {
621 |     0% {
622 |       transform: translateX(100%);
623 |     }
624 | 
625 |     100% {
626 |       transform: translateX(0);
627 |     }
628 |   }
629 | 
630 |   @keyframes rdp-slide_out_left {
631 |     0% {
632 |       transform: translateX(0);
633 |     }
634 | 
635 |     100% {
636 |       transform: translateX(-100%);
637 |     }
638 |   }
639 | 
640 |   @keyframes rdp-slide_out_right {
641 |     0% {
642 |       transform: translateX(0);
643 |     }
644 | 
645 |     100% {
646 |       transform: translateX(100%);
647 |     }
648 |   }
649 | 
650 |   .weeks_before_enter {
651 |     animation: rdp-slide_in_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
652 |   }
653 | 
654 |   .weeks_before_exit {
655 |     animation: rdp-slide_out_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
656 |   }
657 | 
658 |   .weeks_after_enter {
659 |     animation: rdp-slide_in_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
660 |   }
661 | 
662 |   .weeks_after_exit {
663 |     animation: rdp-slide_out_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
664 |   }
665 | 
666 |   .root[dir="rtl"] .weeks_after_enter {
667 |     animation: rdp-slide_in_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
668 |   }
669 | 
670 |   .root[dir="rtl"] .weeks_before_exit {
671 |     animation: rdp-slide_out_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
672 |   }
673 | 
674 |   .root[dir="rtl"] .weeks_before_enter {
675 |     animation: rdp-slide_in_right var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
676 |   }
677 | 
678 |   .root[dir="rtl"] .weeks_after_exit {
679 |     animation: rdp-slide_out_left var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
680 |   }
681 | 
682 |   @keyframes rdp-fade_in {
683 |     from {
684 |       opacity: 0;
685 |     }
686 | 
687 |     to {
688 |       opacity: 1;
689 |     }
690 |   }
691 | 
692 |   @keyframes rdp-fade_out {
693 |     from {
694 |       opacity: 1;
695 |     }
696 | 
697 |     to {
698 |       opacity: 0;
699 |     }
700 |   }
701 | 
702 |   .caption_after_enter {
703 |     animation: rdp-fade_in var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
704 |   }
705 | 
706 |   .caption_after_exit {
707 |     animation: rdp-fade_out var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
708 |   }
709 | 
710 |   .caption_before_enter {
711 |     animation: rdp-fade_in var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
712 |   }
713 | 
714 |   .caption_before_exit {
715 |     animation: rdp-fade_out var(--rdp-animation_duration) var(--rdp-animation_timing) forwards;
716 |   }
717 | }
718 | 
719 | // --- We export the theme variables to add them to the component renderer
720 | :export {
721 |   themeVars: t.json-stringify($themeVars);
722 | }
```

--------------------------------------------------------------------------------
/xmlui/src/components/AutoComplete/AutoCompleteNative.tsx:
--------------------------------------------------------------------------------

```typescript
  1 | import {
  2 |   type CSSProperties,
  3 |   type ForwardedRef,
  4 |   forwardRef,
  5 |   type ReactNode,
  6 |   useId,
  7 |   useCallback,
  8 |   useEffect,
  9 |   useMemo,
 10 |   useRef,
 11 |   useState,
 12 | } from "react";
 13 | import classnames from "classnames";
 14 | 
 15 | import type { RegisterComponentApiFn, UpdateStateFn } from "../../abstractions/RendererDefs";
 16 | import { noop } from "../../components-core/constants";
 17 | import { useEvent } from "../../components-core/utils/misc";
 18 | import type { Option, ValidationStatus } from "../abstractions";
 19 | import styles from "../../components/AutoComplete/AutoComplete.module.scss";
 20 | import Icon from "../../components/Icon/IconNative";
 21 | import OptionTypeProvider from "../../components/Option/OptionTypeProvider";
 22 | import { AutoCompleteContext, useAutoComplete } from "./AutoCompleteContext";
 23 | import { OptionContext, useOption } from "../Select/OptionContext";
 24 | import { useTheme } from "../../components-core/theming/ThemeContext";
 25 | import { Popover, PopoverContent, PopoverTrigger, Portal } from "@radix-ui/react-popover";
 26 | import { HiddenOption } from "../Select/HiddenOption";
 27 | import { PART_INPUT } from "../../components-core/parts";
 28 | 
 29 | const PART_LIST_WRAPPER = "listWrapper";
 30 | 
 31 | type AutoCompleteProps = {
 32 |   id?: string;
 33 |   initialValue?: string | string[];
 34 |   value?: string | string[];
 35 |   enabled?: boolean;
 36 |   placeholder?: string;
 37 |   updateState?: UpdateStateFn;
 38 |   optionRenderer?: (item: Option, value: any, inTrigger: boolean) => ReactNode;
 39 |   emptyListTemplate?: ReactNode;
 40 |   style?: CSSProperties;
 41 |   className?: string;
 42 |   onDidChange?: (newValue: string | string[]) => void;
 43 |   validationStatus?: ValidationStatus;
 44 |   onFocus?: (ev: React.FocusEvent<HTMLInputElement>) => void;
 45 |   onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void;
 46 |   onItemCreated?: (item: string) => void;
 47 |   registerComponentApi?: RegisterComponentApiFn;
 48 |   children?: ReactNode;
 49 |   autoFocus?: boolean;
 50 |   dropdownHeight?: CSSProperties["height"];
 51 |   multi?: boolean;
 52 |   required?: boolean;
 53 |   readOnly?: boolean;
 54 |   creatable?: boolean;
 55 |   initiallyOpen?: boolean;
 56 | };
 57 | 
 58 | function isOptionsExist(options: Set<Option>, newOptions: Option[]) {
 59 |   return newOptions.some((option) =>
 60 |     Array.from(options).some((o) => o.value === option.value || o.label === option.label),
 61 |   );
 62 | }
 63 | 
 64 | export const defaultProps: Partial<AutoCompleteProps> = {
 65 |   enabled: true,
 66 |   readOnly: false,
 67 |   autoFocus: false,
 68 |   multi: false,
 69 |   required: false,
 70 |   validationStatus: "none",
 71 |   creatable: false,
 72 |   updateState: noop,
 73 |   onDidChange: noop,
 74 |   onFocus: noop,
 75 |   onBlur: noop,
 76 |   onItemCreated: noop,
 77 |   initiallyOpen: false,
 78 | };
 79 | 
 80 | export const AutoComplete = forwardRef(function AutoComplete(
 81 |   {
 82 |     id,
 83 |     initialValue,
 84 |     value,
 85 |     enabled = defaultProps.enabled,
 86 |     placeholder,
 87 |     updateState = defaultProps.updateState,
 88 |     validationStatus = defaultProps.validationStatus,
 89 |     onDidChange = defaultProps.onDidChange,
 90 |     onFocus = defaultProps.onFocus,
 91 |     onBlur = defaultProps.onBlur,
 92 |     onItemCreated = defaultProps.onItemCreated,
 93 |     registerComponentApi,
 94 |     emptyListTemplate,
 95 |     style,
 96 |     className,
 97 |     children,
 98 |     readOnly = defaultProps.readOnly,
 99 |     autoFocus = defaultProps.autoFocus,
100 |     dropdownHeight,
101 |     multi = defaultProps.multi,
102 |     required = defaultProps.required,
103 |     creatable = defaultProps.creatable,
104 |     optionRenderer,
105 |     initiallyOpen = defaultProps.initiallyOpen,
106 |     ...rest
107 |   }: AutoCompleteProps,
108 |   forwardedRef: ForwardedRef<HTMLDivElement>,
109 | ) {
110 |   const [referenceElement, setReferenceElement] = useState<HTMLElement | null>(null);
111 |   const inputRef = useRef<HTMLInputElement>(null);
112 |   const [open, setOpen] = useState(initiallyOpen);
113 |   const [options, setOptions] = useState(new Set<Option>());
114 |   const [inputValue, setInputValue] = useState("");
115 |   const { root } = useTheme();
116 |   const [width, setWidth] = useState(0);
117 |   const observer = useRef<ResizeObserver>();
118 |   const [searchTerm, setSearchTerm] = useState("");
119 |   const [isFocused, setIsFocused] = useState(false);
120 |   const [selectedIndex, setSelectedIndex] = useState(-1);
121 | 
122 |   // Filter options based on search term
123 |   const filteredOptions = useMemo(() => {
124 |     if (!searchTerm || searchTerm.trim() === "") {
125 |       return Array.from(options);
126 |     }
127 | 
128 |     const searchLower = searchTerm.toLowerCase();
129 |     return Array.from(options).filter((option) => {
130 |       const extendedValue =
131 |         option.value + " " + option.label + " " + (option.keywords || []).join(" ");
132 |       return extendedValue.toLowerCase().includes(searchLower);
133 |     });
134 |   }, [options, searchTerm]);
135 | 
136 |   // Check if we should show creatable item
137 |   const shouldShowCreatable = useMemo(() => {
138 |     if (!creatable || !searchTerm || searchTerm.trim() === "") return false;
139 | 
140 |     // Check if the search term already exists as an option
141 |     const searchTermExists = Array.from(options).some(
142 |       (option) => option.value === searchTerm || option.label === searchTerm,
143 |     );
144 | 
145 |     if (searchTermExists) return false;
146 | 
147 |     // Check if it's already selected
148 |     if (Array.isArray(value) && value.includes(searchTerm)) return false;
149 |     if (value === searchTerm) return false;
150 | 
151 |     // Only show creatable if there are no matching filtered options
152 |     return filteredOptions.length === 0;
153 |   }, [creatable, searchTerm, options, value, filteredOptions]);
154 | 
155 |   // Set initial state based on the initialValue prop
156 |   useEffect(() => {
157 |     if (initialValue !== undefined) {
158 |       updateState({ value: initialValue || [] }, { initial: true });
159 |     }
160 |   }, [initialValue, updateState]);
161 | 
162 |   // Observe the size of the reference element
163 |   useEffect(() => {
164 |     const current = referenceElement;
165 |     observer.current?.disconnect();
166 | 
167 |     if (current) {
168 |       observer.current = new ResizeObserver(() => setWidth(current.clientWidth));
169 |       observer.current.observe(current);
170 |     }
171 | 
172 |     return () => {
173 |       observer.current?.disconnect();
174 |     };
175 |   }, [referenceElement]);
176 | 
177 |   const selectedValue = useMemo(() => {
178 |     const optionsArray = Array.from(options);
179 | 
180 |     if (Array.isArray(value)) {
181 |       if (value.length === 0) return [];
182 |       return optionsArray.filter((o) => value.includes(`${o.value}`));
183 |     }
184 | 
185 |     return optionsArray.find((o) => `${o.value}` === `${value}`);
186 |   }, [value, options]);
187 | 
188 |   const toggleOption = useCallback(
189 |     (selectedItem: string) => {
190 |       if (selectedItem === "") return;
191 | 
192 |       // Check if the option is enabled
193 |       const option = Array.from(options).find((opt) => opt.value === selectedItem);
194 |       if (option && option.enabled === false) return;
195 | 
196 |       const newSelectedValue = multi
197 |         ? Array.isArray(value)
198 |           ? value.includes(selectedItem)
199 |             ? value.filter((v) => v !== selectedItem)
200 |             : [...value, selectedItem]
201 |           : [selectedItem]
202 |         : selectedItem === value
203 |           ? null
204 |           : selectedItem;
205 | 
206 |       updateState({ value: newSelectedValue });
207 |       onDidChange(newSelectedValue);
208 | 
209 |       if (multi) {
210 |         setInputValue("");
211 |         setSearchTerm("");
212 |         // Keep dropdown open for multi-select
213 |       } else {
214 |         // Close dropdown for single select
215 |         setOpen(false);
216 |         setSearchTerm("");
217 |       }
218 | 
219 |       inputRef.current?.focus();
220 |     },
221 |     [multi, value, updateState, onDidChange, options],
222 |   );
223 | 
224 |   useEffect(() => {
225 |     if (!Array.isArray(selectedValue)) {
226 |       setInputValue(selectedValue?.label || "");
227 |       setSearchTerm("");
228 |     }
229 |   }, [multi, selectedValue]);
230 | 
231 |   // Clear selected value
232 |   const clearValue = useCallback(() => {
233 |     const newValue = multi ? [] : "";
234 |     setInputValue("");
235 |     updateState({ value: newValue });
236 |     onDidChange(newValue);
237 |   }, [multi, updateState, onDidChange]);
238 | 
239 |   const onOptionAdd = useCallback((option: Option) => {
240 |     setOptions((prev) => {
241 |       const newSet = new Set(prev);
242 |       // Remove old version if exists, then add the new one to ensure updates
243 |       const existing = Array.from(prev).find((opt) => opt.value === option.value);
244 |       if (existing) {
245 |         newSet.delete(existing);
246 |       }
247 |       newSet.add(option);
248 |       return newSet;
249 |     });
250 |   }, []);
251 | 
252 |   const onOptionRemove = useCallback((option: Option) => {
253 |     setOptions((prev) => {
254 |       const optionsSet = new Set(prev);
255 |       optionsSet.delete(option);
256 |       return optionsSet;
257 |     });
258 |   }, []);
259 | 
260 |   // Combined list of all items (creatable + filtered options)
261 |   const allItems = useMemo(() => {
262 |     const items = [];
263 |     if (shouldShowCreatable) {
264 |       items.push({ type: "creatable", value: searchTerm, label: `Create "${searchTerm}"` });
265 |     }
266 |     filteredOptions.forEach((option) => {
267 |       items.push({ type: "option", ...option });
268 |     });
269 |     return items;
270 |   }, [shouldShowCreatable, searchTerm, filteredOptions]);
271 | 
272 |   // Helper functions to find next/previous enabled option
273 |   const findNextEnabledIndex = useCallback(
274 |     (currentIndex: number) => {
275 |       for (let i = currentIndex + 1; i < allItems.length; i++) {
276 |         const item = allItems[i];
277 |         if (item.type === "creatable" || item.enabled !== false) {
278 |           return i;
279 |         }
280 |       }
281 |       // Wrap around to beginning
282 |       for (let i = 0; i <= currentIndex; i++) {
283 |         const item = allItems[i];
284 |         if (item.type === "creatable" || item.enabled !== false) {
285 |           return i;
286 |         }
287 |       }
288 |       return -1;
289 |     },
290 |     [allItems],
291 |   );
292 | 
293 |   const findPreviousEnabledIndex = useCallback(
294 |     (currentIndex: number) => {
295 |       for (let i = currentIndex - 1; i >= 0; i--) {
296 |         const item = allItems[i];
297 |         if (item.type === "creatable" || item.enabled !== false) {
298 |           return i;
299 |         }
300 |       }
301 |       // Wrap around to end
302 |       for (let i = allItems.length - 1; i >= currentIndex; i--) {
303 |         const item = allItems[i];
304 |         if (item.type === "creatable" || item.enabled !== false) {
305 |           return i;
306 |         }
307 |       }
308 |       return -1;
309 |     },
310 |     [allItems],
311 |   );
312 | 
313 |   // Reset selected index when options change, but select matching option when dropdown opens
314 |   useEffect(() => {
315 |     if (!open) {
316 |       setSelectedIndex(-1);
317 |     } else if (!multi && open && inputValue) {
318 |       // For single-select, when dropdown opens and there's an input value, try to find and select the matching option
319 |       const matchingIndex = allItems.findIndex((item) => {
320 |         if (item.type === "creatable") return false;
321 |         return (
322 |           item.label?.toLowerCase() === inputValue.toLowerCase() ||
323 |           item.value?.toLowerCase() === inputValue.toLowerCase()
324 |         );
325 |       });
326 |       if (matchingIndex !== -1) {
327 |         setSelectedIndex(matchingIndex);
328 |       } else {
329 |         setSelectedIndex(-1);
330 |       }
331 |     } else if (!multi && open && !inputValue) {
332 |       setSelectedIndex(-1);
333 |     }
334 |     // For multi-select, don't reset selectedIndex when dropdown is open - preserve keyboard navigation
335 |   }, [allItems, multi, open, inputValue]);
336 | 
337 |   // Keyboard navigation
338 |   const handleKeyDown = useCallback(
339 |     (event: React.KeyboardEvent) => {
340 |       if (!open) return;
341 | 
342 |       switch (event.key) {
343 |         case "ArrowDown":
344 |           event.preventDefault();
345 |           setSelectedIndex((prev) => {
346 |             const nextIndex = findNextEnabledIndex(prev);
347 |             return nextIndex !== -1 ? nextIndex : prev;
348 |           });
349 |           break;
350 |         case "ArrowUp":
351 |           event.preventDefault();
352 |           setSelectedIndex((prev) => {
353 |             const prevIndex = findPreviousEnabledIndex(prev);
354 |             return prevIndex !== -1 ? prevIndex : prev;
355 |           });
356 |           break;
357 |         case "Enter":
358 |           event.preventDefault();
359 |           if (selectedIndex >= 0 && selectedIndex < allItems.length) {
360 |             const selectedItem = allItems[selectedIndex];
361 |             if (selectedItem.type === "creatable") {
362 |               const newOption = { value: searchTerm, label: searchTerm, enabled: true };
363 |               onOptionAdd(newOption);
364 |               onItemCreated(searchTerm);
365 |               toggleOption(searchTerm);
366 |             } else if (selectedItem.enabled !== false) {
367 |               // Only toggle if the option is enabled
368 |               toggleOption(selectedItem.value);
369 |             }
370 |           } else if (allItems.length === 1) {
371 |             // If there's only one item (creatable or regular) and no selection, select it
372 |             const singleItem = allItems[0];
373 |             if (singleItem.type === "creatable") {
374 |               const newOption = { value: searchTerm, label: searchTerm, enabled: true };
375 |               onOptionAdd(newOption);
376 |               onItemCreated(searchTerm);
377 |               toggleOption(searchTerm);
378 |             } else if (singleItem.enabled !== false) {
379 |               // Only toggle if the option is enabled
380 |               toggleOption(singleItem.value);
381 |             }
382 |           }
383 |           break;
384 |         case "Escape":
385 |           event.preventDefault();
386 |           setOpen(false);
387 |           break;
388 |       }
389 |     },
390 |     [
391 |       open,
392 |       selectedIndex,
393 |       allItems,
394 |       searchTerm,
395 |       onOptionAdd,
396 |       onItemCreated,
397 |       toggleOption,
398 |       setOpen,
399 |       findNextEnabledIndex,
400 |       findPreviousEnabledIndex,
401 |     ],
402 |   );
403 | 
404 |   // Render the "empty list" message
405 |   const emptyListNode = useMemo(
406 |     () =>
407 |       emptyListTemplate ?? (
408 |         <div className={styles.autoCompleteEmpty}>
409 |           <Icon name="noresult" />
410 |           <span>List is empty</span>
411 |         </div>
412 |       ),
413 |     [emptyListTemplate],
414 |   );
415 | 
416 |   // Register component API for external interactions
417 |   const focus = useCallback(() => {
418 |     inputRef?.current?.focus();
419 |   }, [inputRef]);
420 | 
421 |   const setValue = useEvent((newValue: string | string[]) => {
422 |     updateState({ value: newValue });
423 |   });
424 | 
425 |   useEffect(() => {
426 |     registerComponentApi?.({
427 |       focus,
428 |       setValue,
429 |     });
430 |   }, [focus, registerComponentApi, setValue]);
431 | 
432 |   const optionContextValue = useMemo(
433 |     () => ({
434 |       onOptionAdd,
435 |       onOptionRemove,
436 |     }),
437 |     [onOptionAdd, onOptionRemove],
438 |   );
439 | 
440 |   const autoCompleteContextValue = useMemo(() => {
441 |     return {
442 |       multi,
443 |       value,
444 |       onChange: toggleOption,
445 |       options,
446 |       inputValue,
447 |       searchTerm,
448 |       open,
449 |       setOpen,
450 |       setSelectedIndex,
451 |       optionRenderer,
452 |     };
453 |   }, [
454 |     inputValue,
455 |     searchTerm,
456 |     multi,
457 |     options,
458 |     toggleOption,
459 |     value,
460 |     open,
461 |     setOpen,
462 |     setSelectedIndex,
463 |     optionRenderer,
464 |   ]);
465 | 
466 |   return (
467 |     <AutoCompleteContext.Provider value={autoCompleteContextValue}>
468 |       <OptionContext.Provider value={optionContextValue}>
469 |         <OptionTypeProvider Component={HiddenOption}>
470 |           <Popover
471 |             open={open}
472 |             onOpenChange={(isOpen) => {
473 |               if (readOnly) return;
474 |               setOpen(isOpen);
475 |               if (!isOpen) {
476 |                 // Reset highlighted option when dropdown closes
477 |                 setSelectedIndex(-1);
478 |               }
479 |             }}
480 |             modal={false}
481 |           >
482 |             <PopoverTrigger asChild ref={setReferenceElement}>
483 |               <div
484 |                 ref={forwardedRef}
485 |                 style={style}
486 |                 data-part-id={PART_LIST_WRAPPER}
487 |                 className={classnames(
488 |                   className,
489 |                   styles.badgeListWrapper,
490 |                   styles[validationStatus],
491 |                   {
492 |                     [styles.disabled]: !enabled,
493 |                     [styles.focused]: isFocused,
494 |                   },
495 |                 )}
496 |                 aria-expanded={open}
497 |                 onClick={(event) => {
498 |                   if (readOnly) return;
499 |                   // In multi mode, only open the dropdown, don't toggle
500 |                   // In single mode, toggle as usual
501 |                   if (multi && open) {
502 |                     return; // Already open, don't close
503 |                   }
504 |                   event.stopPropagation();
505 |                   setOpen((prev) => !prev);
506 |                 }}
507 |               >
508 |                 {Array.isArray(selectedValue) && selectedValue.length > 0 && (
509 |                   <div className={styles.badgeList}>
510 |                     {selectedValue.map((v, index) => (
511 |                       <span key={index} className={styles.badge}>
512 |                         {v?.label}
513 |                         {!readOnly && (
514 |                           <Icon
515 |                             name="close"
516 |                             size="sm"
517 |                             onClick={(event) => {
518 |                               event.stopPropagation();
519 |                               toggleOption(v.value);
520 |                             }}
521 |                           />
522 |                         )}
523 |                       </span>
524 |                     ))}
525 |                   </div>
526 |                 )}
527 |                 <div className={styles.inputWrapper}>
528 |                   <input
529 |                     {...rest}
530 |                     role="combobox"
531 |                     id={id}
532 |                     ref={inputRef}
533 |                     onFocus={(ev) => {
534 |                       setIsFocused(true);
535 |                       onFocus(ev);
536 |                     }}
537 |                     onBlur={(ev) => {
538 |                       if (inputValue === "" && !multi) {
539 |                         clearValue();
540 |                       } else {
541 |                         if (!Array.isArray(selectedValue) && selectedValue) {
542 |                           setInputValue(selectedValue?.label);
543 |                         } else {
544 |                           setInputValue("");
545 |                         }
546 |                       }
547 |                       onBlur(ev);
548 |                       setIsFocused(false);
549 |                     }}
550 |                     onKeyDown={(event) => {
551 |                       if (readOnly) return;
552 | 
553 |                       // Handle opening dropdown
554 |                       if (event.key === "ArrowDown" && !open) {
555 |                         setOpen(true);
556 |                         return;
557 |                       }
558 | 
559 |                       // Handle keyboard navigation when dropdown is open
560 |                       if (open) {
561 |                         handleKeyDown(event);
562 |                       } else if (event.key === "Enter") {
563 |                         setOpen(true);
564 |                       }
565 |                     }}
566 |                     data-part-id={PART_INPUT}
567 |                     readOnly={readOnly}
568 |                     autoFocus={autoFocus}
569 |                     aria-autocomplete="list"
570 |                     value={inputValue}
571 |                     disabled={!enabled}
572 |                     onChange={(event) => {
573 |                       setOpen(true);
574 |                       setInputValue(event.target.value);
575 |                       setSearchTerm(event.target.value);
576 |                     }}
577 |                     placeholder={!readOnly ? placeholder : ""}
578 |                     className={styles.commandInput}
579 |                   />
580 |                   <div className={styles.actions}>
581 |                     {value?.length > 0 && enabled && !readOnly && (
582 |                       <span
583 |                         className={styles.action}
584 |                         onClick={(event) => {
585 |                           event.stopPropagation();
586 |                           clearValue();
587 |                         }}
588 |                       >
589 |                         <Icon name="close" />
590 |                       </span>
591 |                     )}
592 |                     <span
593 |                       className={styles.action}
594 |                       onClick={() => {
595 |                         if (readOnly) return;
596 |                         setOpen(!open);
597 |                         // Focus the input after opening dropdown
598 |                         inputRef.current?.focus();
599 |                       }}
600 |                     >
601 |                       <Icon name="chevrondown" />
602 |                     </span>
603 |                   </div>
604 |                 </div>
605 |               </div>
606 |             </PopoverTrigger>
607 |             {open && (
608 |               <Portal container={root}>
609 |                 <PopoverContent
610 |                   style={{ width, height: dropdownHeight }}
611 |                   className={styles.popoverContent}
612 |                   align="start"
613 |                   onOpenAutoFocus={(e) => e.preventDefault()}
614 |                 >
615 |                   <div
616 |                     role="listbox"
617 |                     className={styles.commandList}
618 |                     style={{ height: dropdownHeight }}
619 |                   >
620 |                     {filteredOptions.length === 0 && !shouldShowCreatable && (
621 |                       <div>{emptyListNode}</div>
622 |                     )}
623 |                     {shouldShowCreatable && (
624 |                       <CreatableItem
625 |                         onNewItem={onItemCreated}
626 |                         isHighlighted={selectedIndex === 0}
627 |                       />
628 |                     )}
629 |                     <div>
630 |                       {filteredOptions.map(({ value, label, enabled, keywords }, index) => {
631 |                         const itemIndex = shouldShowCreatable ? index + 1 : index;
632 |                         return (
633 |                           <AutoCompleteOption
634 |                             key={value}
635 |                             value={value}
636 |                             label={label}
637 |                             enabled={enabled}
638 |                             keywords={keywords}
639 |                             readOnly={readOnly}
640 |                             isHighlighted={selectedIndex === itemIndex}
641 |                             itemIndex={itemIndex}
642 |                           />
643 |                         );
644 |                       })}
645 |                     </div>
646 |                   </div>
647 |                 </PopoverContent>
648 |               </Portal>
649 |             )}
650 |           </Popover>
651 |           {children}
652 |         </OptionTypeProvider>
653 |       </OptionContext.Provider>
654 |     </AutoCompleteContext.Provider>
655 |   );
656 | });
657 | 
658 | type CreatableItemProps = {
659 |   onNewItem: (item: string) => void;
660 |   isHighlighted?: boolean;
661 | };
662 | 
663 | function CreatableItem({ onNewItem, isHighlighted = false }: CreatableItemProps) {
664 |   const { value, options, searchTerm, onChange, setOpen, setSelectedIndex, multi } =
665 |     useAutoComplete();
666 |   const { onOptionAdd } = useOption();
667 |   if (
668 |     isOptionsExist(options, [{ value: searchTerm, label: searchTerm }]) ||
669 |     (Array.isArray(value) && value?.find((s) => s === searchTerm)) ||
670 |     searchTerm === value
671 |   ) {
672 |     return <span style={{ display: "none" }} />;
673 |   }
674 | 
675 |   const handleClick = () => {
676 |     const newOption = { value: searchTerm, label: searchTerm, enabled: true };
677 |     onOptionAdd(newOption);
678 |     onNewItem?.(searchTerm);
679 |     onChange(searchTerm);
680 |     // Only close dropdown for single select mode
681 |     if (!multi) {
682 |       setOpen(false);
683 |     }
684 |   };
685 | 
686 |   const Item = (
687 |     <div
688 |       className={classnames(styles.autoCompleteOption, {
689 |         [styles.highlighted]: isHighlighted,
690 |       })}
691 |       onMouseDown={(e) => {
692 |         e.preventDefault();
693 |         e.stopPropagation();
694 |       }}
695 |       onMouseEnter={() => {
696 |         if (setSelectedIndex) {
697 |           setSelectedIndex(0); // CreatableItem is always at index 0
698 |         }
699 |       }}
700 |       onClick={handleClick}
701 |       role="option"
702 |       aria-selected={false}
703 |     >
704 |       {`Create "${searchTerm}"`}
705 |     </div>
706 |   );
707 | 
708 |   // For normal creatable
709 |   if (searchTerm.length > 0) {
710 |     return Item;
711 |   }
712 | 
713 |   return <span style={{ display: "none" }} />;
714 | }
715 | 
716 | function AutoCompleteOption(option: Option & { isHighlighted?: boolean; itemIndex?: number }) {
717 |   const {
718 |     value,
719 |     label,
720 |     enabled = true,
721 |     readOnly,
722 |     children,
723 |     isHighlighted = false,
724 |     itemIndex,
725 |   } = option;
726 |   const id = useId();
727 |   const {
728 |     value: selectedValue,
729 |     onChange,
730 |     multi,
731 |     setOpen,
732 |     setSelectedIndex,
733 |     optionRenderer,
734 |   } = useAutoComplete();
735 |   const selected = multi ? selectedValue?.includes(value) : selectedValue === value;
736 | 
737 |   const handleClick = () => {
738 |     if (!readOnly && enabled) {
739 |       onChange(value);
740 |       // Only close dropdown for single select mode
741 |       if (!multi) {
742 |         setOpen(false);
743 |       }
744 |     }
745 |   };
746 | 
747 |   return (
748 |     <div
749 |       id={id}
750 |       role="option"
751 |       aria-disabled={!enabled}
752 |       aria-selected={selected}
753 |       className={classnames(styles.autoCompleteOption, {
754 |         [styles.disabledOption]: !enabled,
755 |         [styles.highlighted]: isHighlighted,
756 |       })}
757 |       onMouseDown={(e) => {
758 |         e.preventDefault();
759 |         e.stopPropagation();
760 |       }}
761 |       onMouseEnter={() => {
762 |         if (itemIndex !== undefined && setSelectedIndex && enabled) {
763 |           setSelectedIndex(itemIndex);
764 |         }
765 |       }}
766 |       onClick={handleClick}
767 |     >
768 |       {children ? (
769 |         <>
770 |           <div className={styles.autoCompleteOptionContent}>{children}</div>
771 |           {selected && <Icon name="checkmark" />}
772 |         </>
773 |       ) : optionRenderer ? (
774 |         optionRenderer({ label, value, enabled }, selectedValue as any, false)
775 |       ) : (
776 |         <>
777 |           <div className={styles.autoCompleteOptionContent}>{label}</div>
778 |           {selected && <Icon name="checkmark" />}
779 |         </>
780 |       )}
781 |     </div>
782 |   );
783 | }
784 | 
```
Page 103/186FirstPrevNextLast