#
tokens: 47209/50000 3/1627 files (page 101/183)
lines: on (toggle) GitHub
raw markdown copy reset
This is page 101 of 183. Use http://codebase.md/xmlui-org/xmlui/tools/vscode/resources/assets/img/bg-iphone-14-pro.jpg?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.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
│   │   └── 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
    │   ├── 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
    │   ├── ud-components.md
    │   └── xmlui-repo.md
    ├── package.json
    ├── scripts
    │   ├── coverage-only.js
    │   ├── e2e-test-summary.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
    │   ├── 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.spec.ts
    │   │   │   │   ├── LabelList.tsx
    │   │   │   │   ├── LabelListNative.module.scss
    │   │   │   │   └── 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/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 | 
```

--------------------------------------------------------------------------------
/xmlui/src/components/Icon/Icon.spec.ts:
--------------------------------------------------------------------------------

```typescript
  1 | import { create } from "domain";
  2 | import { expect, test } from "../../testing/fixtures";
  3 | 
  4 | // =============================================================================
  5 | // BASIC FUNCTIONALITY TESTS
  6 | // =============================================================================
  7 | 
  8 | test.describe("Basic Functionality", () => {
  9 |   test("component renders with valid icon name", async ({ initTestBed, page }) => {
 10 |     await initTestBed(`<Icon name="home"/>`);
 11 |     const icon = page.getByTestId("test-id-component");
 12 |     await expect(icon).toBeVisible();
 13 |   });
 14 | 
 15 |   test("component does not render without name prop", async ({ initTestBed, page }) => {
 16 |     await initTestBed(`<Icon/>`);
 17 |     const icon = page.getByTestId("test-id-component");
 18 |     const exists = await icon.count();
 19 |     expect(exists).toBe(0); // Icon doesn't render without a valid name
 20 |   });
 21 | });
 22 | 
 23 | // =============================================================================
 24 | // NAME PROPERTY TESTS
 25 | // =============================================================================
 26 | 
 27 | test.describe("name Property", () => {
 28 |   test("displays icon when valid name is provided", async ({ initTestBed, page }) => {
 29 |     await initTestBed(`<Icon name="home"/>`);
 30 |     const icon = page.getByTestId("test-id-component");
 31 |     await expect(icon).toBeVisible();
 32 |   });
 33 | 
 34 |   test("handles non-existent icon name gracefully", async ({ initTestBed, page }) => {
 35 |     await initTestBed(`<Icon name="non-existent-icon"/>`);
 36 |     const icon = page.getByTestId("test-id-component");
 37 |     // Component doesn't render when icon name doesn't exist
 38 |     const exists = await icon.count();
 39 |     expect(exists).toBe(0);
 40 |   });
 41 | 
 42 |   test("handles empty string name", async ({ initTestBed, page }) => {
 43 |     await initTestBed(`<Icon name=""/>`);
 44 |     const icon = page.getByTestId("test-id-component");
 45 |     // Component doesn't render with empty string name
 46 |     const exists = await icon.count();
 47 |     expect(exists).toBe(0);
 48 |   });
 49 | 
 50 |   test("handles null name value", async ({ initTestBed, page }) => {
 51 |     await initTestBed(`<Icon name="{null}"/>`);
 52 |     const icon = page.getByTestId("test-id-component");
 53 |     // Component doesn't render with null name
 54 |     const exists = await icon.count();
 55 |     expect(exists).toBe(0);
 56 |   });
 57 | 
 58 |   test("handles undefined name value", async ({ initTestBed, page }) => {
 59 |     await initTestBed(`<Icon name="{undefined}"/>`);
 60 |     const icon = page.getByTestId("test-id-component");
 61 |     // Component doesn't render with undefined name
 62 |     const exists = await icon.count();
 63 |     expect(exists).toBe(0);
 64 |   });
 65 | 
 66 |   test("handles special characters in name", async ({ initTestBed, page }) => {
 67 |     await initTestBed(`<Icon name="test-icon_with$pecial@chars"/>`);
 68 |     const icon = page.getByTestId("test-id-component");
 69 |     // Component doesn't render with non-existent special character name
 70 |     const exists = await icon.count();
 71 |     expect(exists).toBe(0);
 72 |   });
 73 | 
 74 |   test("handles unicode characters in name", async ({ initTestBed, page }) => {
 75 |     await initTestBed(`<Icon name="测试图标"/>`);
 76 |     const icon = page.getByTestId("test-id-component");
 77 |     // Component doesn't render with non-existent unicode name
 78 |     const exists = await icon.count();
 79 |     expect(exists).toBe(0);
 80 |   });
 81 | 
 82 |   test("handles emoji in name", async ({ initTestBed, page }) => {
 83 |     await initTestBed(`<Icon name="🏠"/>`);
 84 |     const icon = page.getByTestId("test-id-component");
 85 |     // Component doesn't render with non-existent emoji name
 86 |     const exists = await icon.count();
 87 |     expect(exists).toBe(0);
 88 |   });
 89 | 
 90 |   test("handles component-specific icon name syntax", async ({ initTestBed, page }) => {
 91 |     await initTestBed(`<Icon name="component:specific-icon"/>`);
 92 |     const icon = page.getByTestId("test-id-component");
 93 |     // Component doesn't render with non-existent component-specific name
 94 |     const exists = await icon.count();
 95 |     expect(exists).toBe(0);
 96 |   });
 97 | 
 98 |   test("handles very long icon name", async ({ initTestBed, page }) => {
 99 |     const longName = "a".repeat(1000);
100 |     await initTestBed(`<Icon name="${longName}"/>`);
101 |     const icon = page.getByTestId("test-id-component");
102 |     // Component doesn't render with non-existent long name
103 |     const exists = await icon.count();
104 |     expect(exists).toBe(0);
105 |   });
106 | });
107 | 
108 | // =============================================================================
109 | // SIZE PROPERTY TESTS
110 | // =============================================================================
111 | 
112 | test.describe("size Property", () => {
113 |   test("renders with predefined size 'xs'", async ({ initTestBed, createIconDriver }) => {
114 |     await initTestBed(`<Icon testId="icon" name="home" size="xs"/>`);
115 |     const iconDrv = await createIconDriver("icon");
116 |     const icon = iconDrv.svgIcon;
117 |     await expect(icon).toBeVisible();
118 |     // Check computed width/height using CSS
119 |     const computedStyle = await icon.evaluate((el) => {
120 |       const style = window.getComputedStyle(el);
121 |       return { width: style.width, height: style.height };
122 |     });
123 |     expect(computedStyle.width).toBe("12px"); // 0.75em calculated
124 |   });
125 | 
126 |   test("renders with predefined size 'sm'", async ({ initTestBed, createIconDriver }) => {
127 |     await initTestBed(`<Icon testId="icon" name="home" size="sm"/>`);
128 |     const iconDrv = await createIconDriver("icon");
129 |     const icon = iconDrv.svgIcon;
130 |     await expect(icon).toBeVisible();
131 |     const computedStyle = await icon.evaluate((el) => {
132 |       const style = window.getComputedStyle(el);
133 |       return { width: style.width, height: style.height };
134 |     });
135 |     expect(computedStyle.width).toBe("16px"); // 1em calculated
136 |   });
137 | 
138 |   test("renders with predefined size 'md'", async ({ initTestBed, createIconDriver }) => {
139 |     await initTestBed(`<Icon testId="icon" name="home" size="md"/>`);
140 |     const iconDrv = await createIconDriver("icon");
141 |     const icon = iconDrv.svgIcon;
142 |     await expect(icon).toBeVisible();
143 |     const computedStyle = await icon.evaluate((el) => {
144 |       const style = window.getComputedStyle(el);
145 |       return { width: style.width, height: style.height };
146 |     });
147 |     expect(computedStyle.width).toBe("24px"); // 1.5rem calculated
148 |   });
149 | 
150 |   test("renders with predefined size 'lg'", async ({ initTestBed, createIconDriver }) => {
151 |     await initTestBed(`<Icon testId="icon" name="home" size="lg"/>`);
152 |     const iconDrv = await createIconDriver("icon");
153 |     const icon = iconDrv.svgIcon;
154 |     await expect(icon).toBeVisible();
155 |     const computedStyle = await icon.evaluate((el) => {
156 |       const style = window.getComputedStyle(el);
157 |       return { width: style.width, height: style.height };
158 |     });
159 |     expect(computedStyle.width).toBe("32px"); // 2em calculated
160 |   });
161 | 
162 |   test("renders with custom pixel size", async ({ initTestBed, createIconDriver }) => {
163 |     await initTestBed(`<Icon testId="icon" name="home" size="48px"/>`);
164 |     const iconDrv = await createIconDriver("icon");
165 |     const icon = iconDrv.svgIcon;
166 |     await expect(icon).toBeVisible();
167 |     const computedStyle = await icon.evaluate((el) => {
168 |       const style = window.getComputedStyle(el);
169 |       return { width: style.width, height: style.height };
170 |     });
171 |     expect(computedStyle.width).toBe("48px");
172 |   });
173 | 
174 |   test("renders with custom em size", async ({ initTestBed, createIconDriver }) => {
175 |     await initTestBed(`<Icon testId="icon" name="home" size="3em"/>`);
176 |     const iconDrv = await createIconDriver("icon");
177 |     const icon = iconDrv.svgIcon;
178 |     await expect(icon).toBeVisible();
179 |     const computedStyle = await icon.evaluate((el) => {
180 |       const style = window.getComputedStyle(el);
181 |       return { width: style.width, height: style.height };
182 |     });
183 |     expect(computedStyle.width).toBe("48px"); // 3em calculated at 16px base
184 |   });
185 | 
186 |   test("renders with custom rem size", async ({ initTestBed, createIconDriver }) => {
187 |     await initTestBed(`<Icon testId="icon" name="home" size="2rem"/>`);
188 |     const iconDrv = await createIconDriver("icon");
189 |     const icon = iconDrv.svgIcon;
190 |     await expect(icon).toBeVisible();
191 |     const computedStyle = await icon.evaluate((el) => {
192 |       const style = window.getComputedStyle(el);
193 |       return { width: style.width, height: style.height };
194 |     });
195 |     expect(computedStyle.width).toBe("32px"); // 2rem calculated
196 |   });
197 | 
198 |   test("handles invalid size gracefully", async ({ initTestBed, createIconDriver }) => {
199 |     await initTestBed(`<Icon testId="icon" name="home" size="invalid-size"/>`);
200 |     const iconDrv = await createIconDriver("icon");
201 |     const icon = iconDrv.svgIcon;
202 |     await expect(icon).not.toBeVisible();
203 |   });
204 | 
205 |   test("handles negative size value", async ({ initTestBed, createIconDriver }) => {
206 |     await initTestBed(`<Icon testId="icon" name="home" size="-20px"/>`);
207 |     const iconDrv = await createIconDriver("icon");
208 |     const icon = iconDrv.svgIcon;
209 | 
210 |     // With negative size, element exists but browser normalizes to 0px
211 |     const exists = await icon.count();
212 |     expect(exists).toBe(1);
213 | 
214 |     const computedStyle = await icon.evaluate((el) => {
215 |       const style = window.getComputedStyle(el);
216 |       return { width: style.width, height: style.height };
217 |     });
218 |     // Browser normalizes negative values to 0px
219 |     expect(computedStyle.width).toBe("0px");
220 |   });
221 | 
222 |   test("handles zero size value", async ({ initTestBed, createIconDriver }) => {
223 |     await initTestBed(`<Icon testId="icon" name="home" size="0px"/>`);
224 |     const iconDrv = await createIconDriver("icon");
225 |     const icon = iconDrv.svgIcon;
226 |     // Zero-size elements might not be "visible" but should exist
227 |     const exists = await icon.count();
228 |     expect(exists).toBe(1);
229 | 
230 |     const computedStyle = await icon.evaluate((el) => {
231 |       const style = window.getComputedStyle(el);
232 |       return { width: style.width, height: style.height };
233 |     });
234 |     expect(computedStyle.width).toBe("0px");
235 |   });
236 | 
237 |   test("handles null size value", async ({ initTestBed, createIconDriver }) => {
238 |     await initTestBed(`<Icon testId="icon" name="home" size="{null}"/>`);
239 |     const iconDrv = await createIconDriver("icon");
240 |     const icon = iconDrv.svgIcon;
241 |     await expect(icon).toBeVisible();
242 |   });
243 | 
244 |   test("handles undefined size value", async ({ initTestBed, createIconDriver }) => {
245 |     await initTestBed(`<Icon testId="icon" name="home" size="{undefined}"/>`);
246 |     const iconDrv = await createIconDriver("icon");
247 |     const icon = iconDrv.svgIcon;
248 |     await expect(icon).toBeVisible();
249 |   });
250 | });
251 | 
252 | // =============================================================================
253 | // FALLBACK PROPERTY TESTS
254 | // =============================================================================
255 | 
256 | test.describe("fallback Property", () => {
257 |   test("displays fallback icon when primary icon doesn't exist", async ({ initTestBed, page }) => {
258 |     await initTestBed(`<Icon name="non-existent-icon" fallback="trash"/>`);
259 |     const icon = page.getByTestId("test-id-component");
260 |     await expect(icon).toBeVisible();
261 |   });
262 | 
263 |   test("ignores fallback when primary icon exists", async ({ initTestBed, page }) => {
264 |     await initTestBed(`<Icon name="home" fallback="trash"/>`);
265 |     const icon = page.getByTestId("test-id-component");
266 |     await expect(icon).toBeVisible();
267 |   });
268 | 
269 |   test("handles empty string fallback", async ({ initTestBed, page }) => {
270 |     await initTestBed(`<Icon name="non-existent-icon" fallback=""/>`);
271 |     const icon = page.getByTestId("test-id-component");
272 |     // Empty fallback means no icon renders
273 |     const exists = await icon.count();
274 |     expect(exists).toBe(0);
275 |   });
276 | 
277 |   test("handles null fallback value", async ({ initTestBed, page }) => {
278 |     await initTestBed(`<Icon name="non-existent-icon" fallback="{null}"/>`);
279 |     const icon = page.getByTestId("test-id-component");
280 |     // Null fallback means no icon renders
281 |     const exists = await icon.count();
282 |     expect(exists).toBe(0);
283 |   });
284 | 
285 |   test("handles undefined fallback value", async ({ initTestBed, page }) => {
286 |     await initTestBed(`<Icon name="non-existent-icon" fallback="{undefined}"/>`);
287 |     const icon = page.getByTestId("test-id-component");
288 |     // Undefined fallback means no icon renders
289 |     const exists = await icon.count();
290 |     expect(exists).toBe(0);
291 |   });
292 | 
293 |   test("handles special characters in fallback", async ({ initTestBed, page }) => {
294 |     await initTestBed(`<Icon name="non-existent-icon" fallback="test-icon_with$pecial@chars"/>`);
295 |     const icon = page.getByTestId("test-id-component");
296 |     // Non-existent fallback means no icon renders
297 |     const exists = await icon.count();
298 |     expect(exists).toBe(0);
299 |   });
300 | 
301 |   test("handles non-existent fallback icon", async ({ initTestBed, page }) => {
302 |     await initTestBed(`<Icon name="non-existent-icon" fallback="also-non-existent"/>`);
303 |     const icon = page.getByTestId("test-id-component");
304 |     // Non-existent fallback means no icon renders
305 |     const exists = await icon.count();
306 |     expect(exists).toBe(0);
307 |   });
308 | });
309 | 
310 | // =============================================================================
311 | // CLICK EVENT TESTS
312 | // =============================================================================
313 | 
314 | test.describe("click Event", () => {
315 |   test("fires click event when icon is clicked", async ({ initTestBed, createIconDriver }) => {
316 |     const { testStateDriver } = await initTestBed(`
317 |       <Icon testId="icon" name="home" onClick="testState = 'clicked'"/>
318 |     `);
319 | 
320 |     const iconDrv = await createIconDriver("icon");
321 |     const icon = iconDrv.svgIcon;
322 |     await icon.click();
323 | 
324 |     await expect.poll(testStateDriver.testState).toEqual("clicked");
325 |   });
326 | 
327 |   test("applies clickable cursor when click handler is present", async ({
328 |     initTestBed,
329 |     createIconDriver,
330 |   }) => {
331 |     await initTestBed(`<Icon testId="icon" name="home" onClick="testState = 'clicked'"/>`);
332 | 
333 |     const iconDrv = await createIconDriver("icon");
334 |     const icon = iconDrv.svgIcon;
335 |     await expect(icon).toHaveCSS("cursor", "pointer");
336 |   });
337 | 
338 |   test("does not apply clickable cursor when no click handler", async ({ initTestBed, createIconDriver }) => {
339 |     await initTestBed(`<Icon testId="icon" name="home"/>`);
340 |     const iconDrv = await createIconDriver("icon");
341 |     const icon = iconDrv.svgIcon;
342 |     const cursor = await icon.evaluate((el) => window.getComputedStyle(el).cursor);
343 |     expect(cursor).not.toBe("pointer");
344 |   });
345 | 
346 |   test("click event provides event object", async ({ initTestBed, createIconDriver }) => {
347 |     const { testStateDriver } = await initTestBed(`
348 |       <Icon testId="icon" name="home" onClick="event => testState = event.type"/>
349 |     `);
350 | 
351 |     const iconDrv = await createIconDriver("icon");
352 |     const icon = iconDrv.svgIcon;
353 |     await icon.click();
354 | 
355 |     await expect.poll(testStateDriver.testState).toEqual("click");
356 |   });
357 | 
358 |   test("multiple clicks increment counter", async ({ initTestBed, createIconDriver }) => {
359 |     const { testStateDriver } = await initTestBed(`
360 |       <Icon testId="icon" name="home" onClick="testState = (testState || 0) + 1"/>
361 |     `);
362 | 
363 |     const iconDrv = await createIconDriver("icon");
364 |     const icon = iconDrv.svgIcon;
365 | 
366 |     await icon.click();
367 |     await expect.poll(testStateDriver.testState).toEqual(1);
368 | 
369 |     await icon.click();
370 |     await expect.poll(testStateDriver.testState).toEqual(2);
371 | 
372 |     await icon.click();
373 |     await expect.poll(testStateDriver.testState).toEqual(3);
374 |   });
375 | });
376 | 
377 | // =============================================================================
378 | // ACCESSIBILITY TESTS
379 | // =============================================================================
380 | 
381 | test.describe("Accessibility", () => {
382 |   test("icon renders as inline element by default", async ({ initTestBed, createIconDriver }) => {
383 |     await initTestBed(`<Icon testId="icon" name="home"/>`);
384 |     const icon = await createIconDriver("icon");
385 |     const display = await icon.svgIcon.evaluate((el) => window.getComputedStyle(el).display);
386 |     expect(display).toBe("inline-block");
387 |   });
388 | 
389 |   test("icon has correct vertical alignment", async ({ initTestBed, createIconDriver }) => {
390 |     await initTestBed(`<Icon testId="icon" name="home"/>`);
391 |     const icon = await createIconDriver("icon");
392 | 
393 |     await expect(icon.svgIcon as any).toHaveCSS("vertical-align", "text-bottom");
394 |   });
395 | 
396 |   test("icon inherits color from parent", async ({ initTestBed, createIconDriver }) => {
397 |     await initTestBed(`
398 |       <Text color="red">
399 |         <Icon testId="icon" name="home"/>
400 |       </Text>
401 |     `);
402 |     const icon = await createIconDriver("icon");
403 | 
404 |     const color = await icon.svgIcon.evaluate((el) => window.getComputedStyle(el).color);
405 |     // Should inherit red color or have some computed red value
406 |     expect(color).not.toBe(""); // Should have some color value
407 |   });
408 | 
409 |   test("icon is clickable when click handler is present", async ({ initTestBed, createIconDriver }) => {
410 |     const { testStateDriver } = await initTestBed(`
411 |       <Icon testId="icon" name="home" onClick="testState = 'activated'"/>
412 |     `);
413 | 
414 |     const icon = await createIconDriver("icon");
415 |     await icon.click();
416 | 
417 |     await expect.poll(testStateDriver.testState).toEqual("activated");
418 |   });
419 | 
420 |   test(
421 |     "icon can receive focus via tabIndex when clickable",
422 |     async ({ initTestBed, createIconDriver }) => {
423 |       await initTestBed(`<Icon testId="icon" name="home" onClick="testState = 'clicked'" />`);
424 | 
425 |       const icon = (await createIconDriver("icon")).svgIcon;
426 | 
427 |       // For SVG elements, we test focus capability by checking if it can be found after focus
428 |       await expect(icon).toBeVisible();
429 |       await icon.focus();
430 |       await expect(icon).toBeFocused();
431 |     },
432 |   );
433 | 
434 |   test(
435 |     "icon supports keyboard activation with Enter",
436 |     async ({ initTestBed, createIconDriver }) => {
437 |       const testBed = await initTestBed(`<Icon testId="icon" name="home" onClick="testState = 'clicked';" />`);
438 |       const { testStateDriver } = testBed;
439 | 
440 |       const driver = await createIconDriver("icon");
441 |       const icon = driver.svgIcon;
442 | 
443 |       // For SVG elements, we test focus capability by checking if it can be found after focus
444 |       await expect(icon).toBeVisible();
445 |       await icon.press("Enter");
446 |       expect(await testStateDriver.testState()).toBe("clicked");
447 |     },
448 |   );
449 | 
450 |   test(
451 |     "icon supports keyboard activation with Space",
452 |     async ({ initTestBed, createIconDriver }) => {
453 |       const testBed = await initTestBed(`<Icon testId="icon" name="home" onClick="testState = 'clicked';" />`);
454 |       const { testStateDriver } = testBed;
455 | 
456 |       const driver = await createIconDriver("icon");
457 |       const icon = driver.svgIcon;
458 | 
459 |       // For SVG elements, we test focus capability by checking if it can be found after focus
460 |       await expect(icon).toBeVisible();
461 |       await icon.press("Space");
462 |       expect(await testStateDriver.testState()).toBe("clicked");
463 |     },
464 |   );
465 | 
466 | });
467 | 
468 | // =============================================================================
469 | // THEME VARIABLE TESTS
470 | // =============================================================================
471 | 
472 | test.describe("Theme Variables", () => {
473 |   test("applies theme variable for size", async ({ initTestBed, createIconDriver }) => {
474 |     await initTestBed(`<Icon testId="icon" name="home"/>`, {
475 |       testThemeVars: {
476 |         "size-Icon": "3rem",
477 |       },
478 |     });
479 | 
480 |     const iconDrv = await createIconDriver("icon");
481 |     const icon = iconDrv.svgIcon;
482 |     const computedStyle = await icon.evaluate((el) => {
483 |       const style = window.getComputedStyle(el);
484 |       return { width: style.width, height: style.height };
485 |     });
486 | 
487 |     expect(computedStyle.width).toBe("48px"); // 3rem calculated
488 |     expect(computedStyle.height).toBe("48px");
489 |   });
490 | 
491 |   test("size prop overrides theme variable", async ({ initTestBed, createIconDriver }) => {
492 |     await initTestBed(`<Icon testId="icon" name="home" size="2rem"/>`, {
493 |       testThemeVars: {
494 |         "size-Icon": "4rem",
495 |       },
496 |     });
497 | 
498 |     const icon = await createIconDriver("icon");
499 |     const computedStyle = await icon.svgIcon.evaluate((el) => {
500 |       const style = window.getComputedStyle(el);
501 |       return { width: style.width, height: style.height };
502 |     });
503 | 
504 |     expect(computedStyle.width).toBe("32px"); // 2rem calculated, not 4rem from theme
505 |     expect(computedStyle.height).toBe("32px");
506 |   });
507 | 
508 |   test("applies theme variable with custom CSS variable", async ({ initTestBed, createIconDriver }) => {
509 |     await initTestBed(`<Icon testId="icon" name="home"/>`, {
510 |       testThemeVars: {
511 |         "size-Icon": "var(--custom-icon-size, 40px)",
512 |       },
513 |     });
514 | 
515 |     const icon = await createIconDriver("icon");
516 |     const computedStyle = await icon.svgIcon.evaluate((el) => {
517 |       const style = window.getComputedStyle(el);
518 |       return { width: style.width, height: style.height };
519 |     });
520 | 
521 |     expect(computedStyle.width).toBe("40px"); // Fallback value used
522 |     expect(computedStyle.height).toBe("40px");
523 |   });
524 | });
525 | 
526 | // =============================================================================
527 | // OTHER EDGE CASE TESTS
528 | // =============================================================================
529 | 
530 | test.describe("Other Edge Cases", () => {
531 |   test("handles null and undefined props gracefully", async ({ initTestBed, createIconDriver }) => {
532 |     await initTestBed(`<Icon testId="icon" name="home"/>`);
533 |     const icon = await createIconDriver("icon");
534 |     await expect(icon.svgIcon).toBeVisible();
535 |   });
536 | 
537 |   test("handles component with all invalid props gracefully", async ({ initTestBed, createIconDriver }) => {
538 |     await initTestBed(`<Icon testId="icon" invalidProp="invalid" anotherInvalid="{123}"/>`);
539 | 
540 |     // Component with invalid props may not be visible, but should not crash
541 |     const icon = await createIconDriver("icon");
542 |     const isVisible = await icon.svgIcon.isVisible();
543 | 
544 |     // Either it's visible with fallback behavior or gracefully hidden
545 |     if (isVisible) {
546 |       // If visible, it should have fallback behavior
547 |       await expect(icon.svgIcon).toBeVisible();
548 |     } else {
549 |       // It's acceptable for component to be hidden with invalid props
550 |       expect(isVisible).toBe(false);
551 |     }
552 |   });
553 | 
554 |   test("handles mixed valid and invalid props", async ({ initTestBed, createIconDriver }) => {
555 |     await initTestBed(`<Icon testId="icon" name="home" invalidProp="invalid" size="lg"/>`);
556 |     const iconDrv = await createIconDriver("icon");
557 |     const icon = iconDrv.svgIcon;
558 |     await expect(icon).toBeVisible();
559 | 
560 |     // Valid props should still work
561 |     const computedStyle = await icon.evaluate((el) => {
562 |       const style = window.getComputedStyle(el);
563 |       return { width: style.width, height: style.height };
564 |     });
565 |     expect(computedStyle.width).toBe("32px"); // lg size should apply
566 |   });
567 | 
568 |   test("handles object value for name prop", async ({ initTestBed, createIconDriver }) => {
569 |     await initTestBed(`<Icon testId="icon" name="{{}}" />`);
570 | 
571 |     const icon = await createIconDriver("icon");
572 |     const isVisible = await icon.svgIcon.isVisible();
573 | 
574 |     if (isVisible) {
575 |       await expect(icon.svgIcon).toBeVisible();
576 |     } else {
577 |       expect(isVisible).toBe(false);
578 |     }
579 |   });
580 | 
581 |   test("handles array value for size prop", async ({ initTestBed, createIconDriver }) => {
582 |     await initTestBed(`<Icon testId="icon" name="home" size="{[]}" />`);
583 | 
584 |     const icon = await createIconDriver("icon");
585 |     const isVisible = await icon.svgIcon.isVisible();
586 | 
587 |     if (isVisible) {
588 |       await expect(icon.svgIcon).toBeVisible();
589 |     } else {
590 |       expect(isVisible).toBe(false);
591 |     }
592 |   });
593 | 
594 |   test("handles very long Unicode string in fallback", async ({ initTestBed, createIconDriver }) => {
595 |     const longUnicodeString = "👨‍👩‍👧‍👦".repeat(100);
596 |     await initTestBed(`<Icon testId="icon" name="home" fallback="${longUnicodeString}"/>`);
597 |     const icon = await createIconDriver("icon");
598 |     await expect(icon.svgIcon).toBeVisible(); // Icon renders with valid primary name, fallback ignored
599 |   });
600 | 
601 |   test("handles concurrent property changes", async ({ initTestBed, createIconDriver }) => {
602 |     await initTestBed(`<Icon testId="icon" name="home" size="sm"/>`);
603 |     const icon = await createIconDriver("icon");
604 |     await expect(icon.svgIcon).toBeVisible();
605 | 
606 |     // Test that initial state is correct
607 |     let computedStyle = await icon.svgIcon.evaluate((el) => {
608 |       const style = window.getComputedStyle(el);
609 |       return { width: style.width, height: style.height };
610 |     });
611 |     expect(computedStyle.width).toBe("16px"); // sm size
612 |   });
613 | 
614 |   test("handles rapid sequential clicks", async ({ initTestBed, createIconDriver }) => {
615 |     const { testStateDriver } = await initTestBed(`
616 |       <Icon testId="icon" name="home" onClick="testState = (testState || 0) + 1"/>
617 |     `);
618 | 
619 |     const iconDrv = await createIconDriver("icon");
620 |     const icon = iconDrv.svgIcon;
621 | 
622 |     // Rapid sequential clicks
623 |     await Promise.all([icon.click(), icon.click(), icon.click(), icon.click(), icon.click()]);
624 | 
625 |     // Should eventually reach 5 (all clicks processed)
626 |     await expect.poll(testStateDriver.testState).toEqual(5);
627 |   });
628 | });
629 | 
```
Page 101/183FirstPrevNextLast