#
tokens: 46817/50000 3/1634 files (page 103/190)
lines: on (toggle) GitHub
raw markdown copy reset
This is page 103 of 190. Use http://codebase.md/xmlui-org/xmlui/0.9.23.js?lines=true&page={x} to view the full context.

# Directory Structure

```
├── .changeset
│   ├── config.json
│   └── tender-llamas-dress.md
├── .eslintrc.cjs
├── .github
│   ├── build-checklist.png
│   ├── ISSUE_TEMPLATE
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   └── workflows
│       ├── deploy-blog-optimized.yml
│       ├── deploy-blog-swa.yml
│       ├── deploy-blog.yml
│       ├── deploy-docs-optimized.yml
│       ├── deploy-docs-swa.yml
│       ├── deploy-docs.yml
│       ├── prepare-versions.yml
│       ├── release-packages.yml
│       ├── run-all-tests.yml
│       └── run-smoke-tests.yml
├── .gitignore
├── .prettierrc.js
├── .vscode
│   ├── launch.json
│   └── settings.json
├── blog
│   ├── .gitignore
│   ├── .gitkeep
│   ├── CHANGELOG.md
│   ├── extensions.ts
│   ├── index.html
│   ├── index.ts
│   ├── package.json
│   ├── public
│   │   ├── blog
│   │   │   ├── images
│   │   │   │   ├── an-advanced-codefence.gif
│   │   │   │   ├── an-advanced-codefence.mp4
│   │   │   │   ├── blog-page-component.png
│   │   │   │   ├── blog-scrabble.png
│   │   │   │   ├── codefence-runner.png
│   │   │   │   ├── integrated-blog-search.png
│   │   │   │   ├── lorem-ipsum.png
│   │   │   │   ├── playground-checkbox-source.png
│   │   │   │   ├── playground.png
│   │   │   │   ├── use-xmlui-mcp-to-find-a-howto.png
│   │   │   │   └── xmlui-demo-gallery.png
│   │   │   ├── introducing-xmlui.md
│   │   │   ├── lorem-ipsum.md
│   │   │   ├── newest-post.md
│   │   │   ├── older-post.md
│   │   │   ├── xmlui-playground.md
│   │   │   └── xmlui-powered-blog.md
│   │   ├── mockServiceWorker.js
│   │   ├── resources
│   │   │   ├── favicon.ico
│   │   │   ├── files
│   │   │   │   └── for-download
│   │   │   │       └── xmlui
│   │   │   │           └── xmlui-standalone.umd.js
│   │   │   ├── github.svg
│   │   │   ├── llms.txt
│   │   │   ├── logo-dark.svg
│   │   │   ├── logo.svg
│   │   │   ├── pg-popout.svg
│   │   │   ├── rss.svg
│   │   │   └── xmlui-logo.svg
│   │   ├── serve.json
│   │   ├── staticwebapp.config.json
│   │   └── web.config
│   ├── scripts
│   │   ├── download-latest-xmlui.js
│   │   ├── generate-rss.js
│   │   ├── get-releases.js
│   │   └── utils.js
│   ├── src
│   │   ├── components
│   │   │   ├── BlogOverview.xmlui
│   │   │   ├── BlogPage.xmlui
│   │   │   └── PageNotFound.xmlui
│   │   ├── config.ts
│   │   ├── Main.xmlui
│   │   └── themes
│   │       └── blog-theme.ts
│   └── tsconfig.json
├── CONTRIBUTING.md
├── docs
│   ├── .gitignore
│   ├── CHANGELOG.md
│   ├── ComponentRefLinks.txt
│   ├── content
│   │   ├── _meta.json
│   │   ├── components
│   │   │   ├── _meta.json
│   │   │   ├── _overview.md
│   │   │   ├── APICall.md
│   │   │   ├── App.md
│   │   │   ├── AppHeader.md
│   │   │   ├── AppState.md
│   │   │   ├── AutoComplete.md
│   │   │   ├── Avatar.md
│   │   │   ├── Backdrop.md
│   │   │   ├── Badge.md
│   │   │   ├── BarChart.md
│   │   │   ├── Bookmark.md
│   │   │   ├── Breakout.md
│   │   │   ├── Button.md
│   │   │   ├── Card.md
│   │   │   ├── Carousel.md
│   │   │   ├── ChangeListener.md
│   │   │   ├── Checkbox.md
│   │   │   ├── Choose.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
│   │           ├── HelloMd.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.module.scss
│   │       │   ├── 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.tsx
│   │       │   ├── StandalonePlayground.tsx
│   │       │   ├── StandalonePlaygroundNative.module.scss
│   │       │   ├── StandalonePlaygroundNative.tsx
│   │       │   ├── ThemeSwitcher.module.scss
│   │       │   ├── ThemeSwitcher.tsx
│   │       │   └── utils.ts
│   │       ├── providers
│   │       │   ├── Toast.module.scss
│   │       │   └── ToastProvider.tsx
│   │       ├── state
│   │       │   └── store.ts
│   │       ├── themes
│   │       │   └── theme.ts
│   │       └── utils
│   │           └── helpers.ts
│   ├── xmlui-search
│   │   ├── .gitignore
│   │   ├── CHANGELOG.md
│   │   ├── demo
│   │   │   └── Main.xmlui
│   │   ├── index.html
│   │   ├── index.ts
│   │   ├── meta
│   │   │   └── componentsMetadata.ts
│   │   ├── package.json
│   │   └── src
│   │       ├── index.tsx
│   │       ├── Search.module.scss
│   │       └── Search.tsx
│   ├── xmlui-spreadsheet
│   │   ├── .gitignore
│   │   ├── demo
│   │   │   └── Main.xmlui
│   │   ├── index.html
│   │   ├── index.ts
│   │   ├── meta
│   │   │   └── componentsMetadata.ts
│   │   ├── package.json
│   │   └── src
│   │       ├── index.tsx
│   │       ├── Spreadsheet.tsx
│   │       └── SpreadsheetNative.tsx
│   └── xmlui-website-blocks
│       ├── .gitignore
│       ├── CHANGELOG.md
│       ├── demo
│       │   ├── components
│       │   │   ├── HeroBackgroundBreakoutPage.xmlui
│       │   │   ├── HeroBackgroundsPage.xmlui
│       │   │   ├── HeroContentsPage.xmlui
│       │   │   ├── HeroTextAlignPage.xmlui
│       │   │   ├── HeroTextPage.xmlui
│       │   │   └── HeroTonesPage.xmlui
│       │   ├── Main.xmlui
│       │   └── themes
│       │       └── default.ts
│       ├── index.html
│       ├── index.ts
│       ├── meta
│       │   └── componentsMetadata.ts
│       ├── package.json
│       ├── public
│       │   └── resources
│       │       ├── building.jpg
│       │       └── xmlui-logo.svg
│       └── src
│           ├── Carousel
│           │   ├── Carousel.module.scss
│           │   ├── Carousel.tsx
│           │   ├── CarouselContext.tsx
│           │   └── CarouselNative.tsx
│           ├── FancyButton
│           │   ├── FancyButton.module.scss
│           │   ├── FancyButton.tsx
│           │   └── FancyButton.xmlui
│           ├── Hello
│           │   ├── Hello.tsx
│           │   ├── Hello.xmlui
│           │   └── Hello.xmlui.xs
│           ├── HeroSection
│           │   ├── HeroSection.module.scss
│           │   ├── HeroSection.spec.ts
│           │   ├── HeroSection.tsx
│           │   └── HeroSectionNative.tsx
│           ├── index.tsx
│           ├── ScrollToTop
│           │   ├── ScrollToTop.module.scss
│           │   ├── ScrollToTop.tsx
│           │   └── ScrollToTopNative.tsx
│           └── vite-env.d.ts
├── playwright.config.ts
├── README.md
├── tools
│   ├── codefence
│   │   └── xmlui-code-fence-docs.md
│   ├── create-app
│   │   ├── .gitignore
│   │   ├── CHANGELOG.md
│   │   ├── create-app.ts
│   │   ├── helpers
│   │   │   ├── copy.ts
│   │   │   ├── get-pkg-manager.ts
│   │   │   ├── git.ts
│   │   │   ├── install.ts
│   │   │   ├── is-folder-empty.ts
│   │   │   ├── is-writeable.ts
│   │   │   ├── make-dir.ts
│   │   │   └── validate-pkg.ts
│   │   ├── index.ts
│   │   ├── package.json
│   │   ├── templates
│   │   │   ├── default
│   │   │   │   └── ts
│   │   │   │       ├── gitignore
│   │   │   │       ├── index.html
│   │   │   │       ├── index.ts
│   │   │   │       ├── public
│   │   │   │       │   ├── mockServiceWorker.js
│   │   │   │       │   ├── resources
│   │   │   │       │   │   ├── favicon.ico
│   │   │   │       │   │   └── xmlui-logo.svg
│   │   │   │       │   └── serve.json
│   │   │   │       └── src
│   │   │   │           ├── components
│   │   │   │           │   ├── ApiAware.xmlui
│   │   │   │           │   ├── Home.xmlui
│   │   │   │           │   ├── IncButton.xmlui
│   │   │   │           │   └── PagePanel.xmlui
│   │   │   │           ├── config.ts
│   │   │   │           └── Main.xmlui
│   │   │   ├── index.ts
│   │   │   └── types.ts
│   │   └── tsconfig.json
│   ├── create-xmlui-hello-world
│   │   ├── index.js
│   │   └── package.json
│   └── vscode
│       ├── .gitignore
│       ├── .vscode
│       │   ├── launch.json
│       │   └── tasks.json
│       ├── .vscodeignore
│       ├── build.sh
│       ├── CHANGELOG.md
│       ├── esbuild.js
│       ├── eslint.config.mjs
│       ├── formatter-docs.md
│       ├── generate-test-sample.sh
│       ├── LICENSE.md
│       ├── package-lock.json
│       ├── package.json
│       ├── README.md
│       ├── resources
│       │   ├── xmlui-logo.png
│       │   └── xmlui-markup-syntax-highlighting.png
│       ├── src
│       │   ├── extension.ts
│       │   └── server.ts
│       ├── syntaxes
│       │   └── xmlui.tmLanguage.json
│       ├── test-samples
│       │   └── sample.xmlui
│       ├── tsconfig.json
│       └── tsconfig.tsbuildinfo
├── turbo.json
└── xmlui
    ├── .gitignore
    ├── bin
    │   ├── bootstrap.cjs
    │   ├── bootstrap.js
    │   ├── build-lib.ts
    │   ├── build.ts
    │   ├── index.ts
    │   ├── preview.ts
    │   ├── start.ts
    │   ├── vite-xmlui-plugin.ts
    │   └── viteConfig.ts
    ├── CHANGELOG.md
    ├── conventions
    │   ├── component-qa-checklist.md
    │   ├── copilot-conventions.md
    │   ├── create-xmlui-components.md
    │   ├── mermaid.md
    │   ├── testing-conventions.md
    │   └── xmlui-in-a-nutshell.md
    ├── dev-docs
    │   ├── accessibility.md
    │   ├── build-system.md
    │   ├── build-xmlui.md
    │   ├── component-behaviors.md
    │   ├── component-metadata.md
    │   ├── components-with-options.md
    │   ├── containers.md
    │   ├── data-operations.md
    │   ├── glossary.md
    │   ├── index.md
    │   ├── next
    │   │   ├── component-dev-guide.md
    │   │   ├── configuration-management-enhancement-summary.md
    │   │   ├── documentation-scripts-refactoring-complete-summary.md
    │   │   ├── documentation-scripts-refactoring-plan.md
    │   │   ├── duplicate-pattern-extraction-summary.md
    │   │   ├── error-handling-standardization-summary.md
    │   │   ├── generating-component-reference.md
    │   │   ├── index.md
    │   │   ├── logging-consistency-implementation-summary.md
    │   │   ├── project-build.md
    │   │   ├── project-structure.md
    │   │   ├── theme-context.md
    │   │   ├── tiptap-design-considerations.md
    │   │   ├── working-with-code.md
    │   │   ├── xmlui-runtime-architecture
    │   │   └── xmlui-wcag-accessibility-report.md
    │   ├── react-fundamentals.md
    │   ├── release-method.md
    │   ├── standalone-app.md
    │   ├── theme-variables-refactoring.md
    │   ├── ud-components.md
    │   └── xmlui-repo.md
    ├── package.json
    ├── scripts
    │   ├── coverage-only.js
    │   ├── e2e-test-summary.js
    │   ├── extract-component-metadata.js
    │   ├── generate-docs
    │   │   ├── build-downloads-map.mjs
    │   │   ├── build-pages-map.mjs
    │   │   ├── components-config.json
    │   │   ├── configuration-management.mjs
    │   │   ├── constants.mjs
    │   │   ├── create-theme-files.mjs
    │   │   ├── DocsGenerator.mjs
    │   │   ├── error-handling.mjs
    │   │   ├── extensions-config.json
    │   │   ├── folders.mjs
    │   │   ├── generate-summary-files.mjs
    │   │   ├── get-docs.mjs
    │   │   ├── input-handler.mjs
    │   │   ├── logger.mjs
    │   │   ├── logging-standards.mjs
    │   │   ├── MetadataProcessor.mjs
    │   │   ├── pattern-utilities.mjs
    │   │   └── utils.mjs
    │   ├── generate-metadata-markdown.js
    │   ├── get-langserver-metadata.js
    │   ├── inline-links.mjs
    │   └── README-e2e-summary.md
    ├── src
    │   ├── abstractions
    │   │   ├── _conventions.md
    │   │   ├── ActionDefs.ts
    │   │   ├── AppContextDefs.ts
    │   │   ├── ComponentDefs.ts
    │   │   ├── ContainerDefs.ts
    │   │   ├── ExtensionDefs.ts
    │   │   ├── FunctionDefs.ts
    │   │   ├── RendererDefs.ts
    │   │   ├── scripting
    │   │   │   ├── BlockScope.ts
    │   │   │   ├── Compilation.ts
    │   │   │   ├── LogicalThread.ts
    │   │   │   ├── LoopScope.ts
    │   │   │   ├── modules.ts
    │   │   │   ├── ScriptParserError.ts
    │   │   │   ├── Token.ts
    │   │   │   ├── TryScope.ts
    │   │   │   └── TryScopeExp.ts
    │   │   └── ThemingDefs.ts
    │   ├── components
    │   │   ├── _conventions.md
    │   │   ├── abstractions.ts
    │   │   ├── Accordion
    │   │   │   ├── Accordion.md
    │   │   │   ├── Accordion.module.scss
    │   │   │   ├── Accordion.spec.ts
    │   │   │   ├── Accordion.tsx
    │   │   │   ├── AccordionContext.tsx
    │   │   │   ├── AccordionItem.tsx
    │   │   │   ├── AccordionItemNative.tsx
    │   │   │   └── AccordionNative.tsx
    │   │   ├── Animation
    │   │   │   └── AnimationNative.tsx
    │   │   ├── APICall
    │   │   │   ├── APICall.md
    │   │   │   ├── APICall.spec.ts
    │   │   │   ├── APICall.tsx
    │   │   │   └── APICallNative.tsx
    │   │   ├── App
    │   │   │   ├── App.md
    │   │   │   ├── App.module.scss
    │   │   │   ├── App.spec.ts
    │   │   │   ├── App.tsx
    │   │   │   ├── AppLayoutContext.ts
    │   │   │   ├── AppNative.tsx
    │   │   │   ├── AppStateContext.ts
    │   │   │   ├── doc-resources
    │   │   │   │   ├── condensed-sticky.xmlui
    │   │   │   │   ├── condensed.xmlui
    │   │   │   │   ├── horizontal-sticky.xmlui
    │   │   │   │   ├── horizontal.xmlui
    │   │   │   │   ├── vertical-full-header.xmlui
    │   │   │   │   ├── vertical-sticky.xmlui
    │   │   │   │   └── vertical.xmlui
    │   │   │   ├── IndexerContext.ts
    │   │   │   ├── LinkInfoContext.ts
    │   │   │   ├── SearchContext.tsx
    │   │   │   ├── Sheet.module.scss
    │   │   │   └── Sheet.tsx
    │   │   ├── AppHeader
    │   │   │   ├── AppHeader.md
    │   │   │   ├── AppHeader.module.scss
    │   │   │   ├── AppHeader.spec.ts
    │   │   │   ├── AppHeader.tsx
    │   │   │   └── AppHeaderNative.tsx
    │   │   ├── AppState
    │   │   │   ├── AppState.md
    │   │   │   ├── AppState.spec.ts
    │   │   │   ├── AppState.tsx
    │   │   │   └── AppStateNative.tsx
    │   │   ├── AutoComplete
    │   │   │   ├── AutoComplete.md
    │   │   │   ├── AutoComplete.module.scss
    │   │   │   ├── AutoComplete.spec.ts
    │   │   │   ├── AutoComplete.tsx
    │   │   │   ├── AutoCompleteContext.tsx
    │   │   │   └── AutoCompleteNative.tsx
    │   │   ├── Avatar
    │   │   │   ├── Avatar.md
    │   │   │   ├── Avatar.module.scss
    │   │   │   ├── Avatar.spec.ts
    │   │   │   ├── Avatar.tsx
    │   │   │   └── AvatarNative.tsx
    │   │   ├── Backdrop
    │   │   │   ├── Backdrop.md
    │   │   │   ├── Backdrop.module.scss
    │   │   │   ├── Backdrop.spec.ts
    │   │   │   ├── Backdrop.tsx
    │   │   │   └── BackdropNative.tsx
    │   │   ├── Badge
    │   │   │   ├── Badge.md
    │   │   │   ├── Badge.module.scss
    │   │   │   ├── Badge.spec.ts
    │   │   │   ├── Badge.tsx
    │   │   │   └── BadgeNative.tsx
    │   │   ├── Bookmark
    │   │   │   ├── Bookmark.md
    │   │   │   ├── Bookmark.module.scss
    │   │   │   ├── Bookmark.spec.ts
    │   │   │   ├── Bookmark.tsx
    │   │   │   └── BookmarkNative.tsx
    │   │   ├── Breakout
    │   │   │   ├── Breakout.module.scss
    │   │   │   ├── Breakout.spec.ts
    │   │   │   ├── Breakout.tsx
    │   │   │   └── BreakoutNative.tsx
    │   │   ├── Button
    │   │   │   ├── Button-style.spec.ts
    │   │   │   ├── Button.md
    │   │   │   ├── Button.module.scss
    │   │   │   ├── Button.spec.ts
    │   │   │   ├── Button.tsx
    │   │   │   └── ButtonNative.tsx
    │   │   ├── Card
    │   │   │   ├── Card.md
    │   │   │   ├── Card.module.scss
    │   │   │   ├── Card.spec.ts
    │   │   │   ├── Card.tsx
    │   │   │   └── CardNative.tsx
    │   │   ├── Carousel
    │   │   │   ├── Carousel.md
    │   │   │   ├── Carousel.module.scss
    │   │   │   ├── Carousel.spec.ts
    │   │   │   ├── Carousel.tsx
    │   │   │   ├── CarouselContext.tsx
    │   │   │   ├── CarouselItem.tsx
    │   │   │   ├── CarouselItemNative.tsx
    │   │   │   └── CarouselNative.tsx
    │   │   ├── ChangeListener
    │   │   │   ├── ChangeListener.md
    │   │   │   ├── ChangeListener.spec.ts
    │   │   │   ├── ChangeListener.tsx
    │   │   │   └── ChangeListenerNative.tsx
    │   │   ├── chart-color-schemes.ts
    │   │   ├── Charts
    │   │   │   ├── AreaChart
    │   │   │   │   ├── AreaChart.md
    │   │   │   │   ├── AreaChart.spec.ts
    │   │   │   │   ├── AreaChart.tsx
    │   │   │   │   └── AreaChartNative.tsx
    │   │   │   ├── BarChart
    │   │   │   │   ├── BarChart.md
    │   │   │   │   ├── BarChart.module.scss
    │   │   │   │   ├── BarChart.spec.ts
    │   │   │   │   ├── BarChart.tsx
    │   │   │   │   └── BarChartNative.tsx
    │   │   │   ├── DonutChart
    │   │   │   │   ├── DonutChart.spec.ts
    │   │   │   │   └── DonutChart.tsx
    │   │   │   ├── LabelList
    │   │   │   │   ├── LabelList.module.scss
    │   │   │   │   ├── LabelList.spec.ts
    │   │   │   │   ├── LabelList.tsx
    │   │   │   │   └── LabelListNative.tsx
    │   │   │   ├── Legend
    │   │   │   │   ├── Legend.spec.ts
    │   │   │   │   ├── Legend.tsx
    │   │   │   │   └── LegendNative.tsx
    │   │   │   ├── LineChart
    │   │   │   │   ├── LineChart.md
    │   │   │   │   ├── LineChart.module.scss
    │   │   │   │   ├── LineChart.spec.ts
    │   │   │   │   ├── LineChart.tsx
    │   │   │   │   └── LineChartNative.tsx
    │   │   │   ├── PieChart
    │   │   │   │   ├── PieChart.md
    │   │   │   │   ├── PieChart.spec.ts
    │   │   │   │   ├── PieChart.tsx
    │   │   │   │   ├── PieChartNative.module.scss
    │   │   │   │   └── PieChartNative.tsx
    │   │   │   ├── RadarChart
    │   │   │   │   ├── RadarChart.md
    │   │   │   │   ├── RadarChart.spec.ts
    │   │   │   │   ├── RadarChart.tsx
    │   │   │   │   └── RadarChartNative.tsx
    │   │   │   ├── Tooltip
    │   │   │   │   ├── TooltipContent.module.scss
    │   │   │   │   ├── TooltipContent.spec.ts
    │   │   │   │   └── TooltipContent.tsx
    │   │   │   └── utils
    │   │   │       ├── abstractions.ts
    │   │   │       └── ChartProvider.tsx
    │   │   ├── Checkbox
    │   │   │   ├── Checkbox.md
    │   │   │   ├── Checkbox.spec.ts
    │   │   │   └── Checkbox.tsx
    │   │   ├── Choose
    │   │   │   ├── Choose.md
    │   │   │   ├── Choose.spec.ts
    │   │   │   └── Choose.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
    │   │   │   └── test-padding.xmlui
    │   │   ├── DataSource
    │   │   │   ├── DataSource.md
    │   │   │   └── DataSource.tsx
    │   │   ├── DateInput
    │   │   │   ├── DateInput.md
    │   │   │   ├── DateInput.module.scss
    │   │   │   ├── DateInput.spec.ts
    │   │   │   ├── DateInput.tsx
    │   │   │   └── DateInputNative.tsx
    │   │   ├── DatePicker
    │   │   │   ├── DatePicker.md
    │   │   │   ├── DatePicker.module.scss
    │   │   │   ├── DatePicker.spec.ts
    │   │   │   ├── DatePicker.tsx
    │   │   │   └── DatePickerNative.tsx
    │   │   ├── DropdownMenu
    │   │   │   ├── DropdownMenu.md
    │   │   │   ├── DropdownMenu.module.scss
    │   │   │   ├── DropdownMenu.spec.ts
    │   │   │   ├── DropdownMenu.tsx
    │   │   │   ├── DropdownMenuNative.tsx
    │   │   │   ├── MenuItem.md
    │   │   │   └── SubMenuItem.md
    │   │   ├── EmojiSelector
    │   │   │   ├── EmojiSelector.md
    │   │   │   ├── EmojiSelector.spec.ts
    │   │   │   ├── EmojiSelector.tsx
    │   │   │   └── EmojiSelectorNative.tsx
    │   │   ├── ExpandableItem
    │   │   │   ├── ExpandableItem.module.scss
    │   │   │   ├── ExpandableItem.spec.ts
    │   │   │   ├── ExpandableItem.tsx
    │   │   │   └── ExpandableItemNative.tsx
    │   │   ├── FileInput
    │   │   │   ├── FileInput.md
    │   │   │   ├── FileInput.module.scss
    │   │   │   ├── FileInput.spec.ts
    │   │   │   ├── FileInput.tsx
    │   │   │   └── FileInputNative.tsx
    │   │   ├── FileUploadDropZone
    │   │   │   ├── FileUploadDropZone.md
    │   │   │   ├── FileUploadDropZone.module.scss
    │   │   │   ├── FileUploadDropZone.spec.ts
    │   │   │   ├── FileUploadDropZone.tsx
    │   │   │   └── FileUploadDropZoneNative.tsx
    │   │   ├── FlowLayout
    │   │   │   ├── FlowLayout.md
    │   │   │   ├── FlowLayout.module.scss
    │   │   │   ├── FlowLayout.spec.ts
    │   │   │   ├── FlowLayout.spec.ts-snapshots
    │   │   │   │   └── Edge-cases-boxShadow-is-not-clipped-1-non-smoke-darwin.png
    │   │   │   ├── FlowLayout.tsx
    │   │   │   └── FlowLayoutNative.tsx
    │   │   ├── Footer
    │   │   │   ├── Footer.md
    │   │   │   ├── Footer.module.scss
    │   │   │   ├── Footer.spec.ts
    │   │   │   ├── Footer.tsx
    │   │   │   └── FooterNative.tsx
    │   │   ├── Form
    │   │   │   ├── Form.md
    │   │   │   ├── Form.module.scss
    │   │   │   ├── Form.spec.ts
    │   │   │   ├── Form.tsx
    │   │   │   ├── formActions.ts
    │   │   │   ├── FormContext.ts
    │   │   │   └── FormNative.tsx
    │   │   ├── FormItem
    │   │   │   ├── FormItem.md
    │   │   │   ├── FormItem.module.scss
    │   │   │   ├── FormItem.spec.ts
    │   │   │   ├── FormItem.tsx
    │   │   │   ├── FormItemNative.tsx
    │   │   │   ├── HelperText.module.scss
    │   │   │   ├── HelperText.tsx
    │   │   │   ├── ItemWithLabel.tsx
    │   │   │   └── Validations.ts
    │   │   ├── FormSection
    │   │   │   ├── FormSection.md
    │   │   │   ├── FormSection.ts
    │   │   │   └── FormSection.xmlui
    │   │   ├── Fragment
    │   │   │   ├── Fragment.spec.ts
    │   │   │   └── Fragment.tsx
    │   │   ├── Heading
    │   │   │   ├── abstractions.ts
    │   │   │   ├── H1.md
    │   │   │   ├── H1.spec.ts
    │   │   │   ├── H2.md
    │   │   │   ├── H2.spec.ts
    │   │   │   ├── H3.md
    │   │   │   ├── H3.spec.ts
    │   │   │   ├── H4.md
    │   │   │   ├── H4.spec.ts
    │   │   │   ├── H5.md
    │   │   │   ├── H5.spec.ts
    │   │   │   ├── H6.md
    │   │   │   ├── H6.spec.ts
    │   │   │   ├── Heading.md
    │   │   │   ├── Heading.module.scss
    │   │   │   ├── Heading.spec.ts
    │   │   │   ├── Heading.tsx
    │   │   │   └── HeadingNative.tsx
    │   │   ├── HoverCard
    │   │   │   ├── HoverCard.tsx
    │   │   │   └── HovercardNative.tsx
    │   │   ├── HtmlTags
    │   │   │   ├── HtmlTags.module.scss
    │   │   │   ├── HtmlTags.spec.ts
    │   │   │   └── HtmlTags.tsx
    │   │   ├── Icon
    │   │   │   ├── AdmonitionDanger.tsx
    │   │   │   ├── AdmonitionInfo.tsx
    │   │   │   ├── AdmonitionNote.tsx
    │   │   │   ├── AdmonitionTip.tsx
    │   │   │   ├── AdmonitionWarning.tsx
    │   │   │   ├── ApiIcon.tsx
    │   │   │   ├── ArrowDropDown.module.scss
    │   │   │   ├── ArrowDropDown.tsx
    │   │   │   ├── ArrowDropUp.module.scss
    │   │   │   ├── ArrowDropUp.tsx
    │   │   │   ├── ArrowLeft.module.scss
    │   │   │   ├── ArrowLeft.tsx
    │   │   │   ├── ArrowRight.module.scss
    │   │   │   ├── ArrowRight.tsx
    │   │   │   ├── Attach.tsx
    │   │   │   ├── Binding.module.scss
    │   │   │   ├── Binding.tsx
    │   │   │   ├── BoardIcon.tsx
    │   │   │   ├── BoxIcon.tsx
    │   │   │   ├── CheckIcon.tsx
    │   │   │   ├── ChevronDownIcon.tsx
    │   │   │   ├── ChevronLeft.tsx
    │   │   │   ├── ChevronRight.tsx
    │   │   │   ├── ChevronUpIcon.tsx
    │   │   │   ├── CodeFileIcon.tsx
    │   │   │   ├── CodeSandbox.tsx
    │   │   │   ├── CompactListIcon.tsx
    │   │   │   ├── ContentCopyIcon.tsx
    │   │   │   ├── DarkToLightIcon.tsx
    │   │   │   ├── DatabaseIcon.module.scss
    │   │   │   ├── DatabaseIcon.tsx
    │   │   │   ├── DocFileIcon.tsx
    │   │   │   ├── DocIcon.tsx
    │   │   │   ├── DotMenuHorizontalIcon.tsx
    │   │   │   ├── DotMenuIcon.tsx
    │   │   │   ├── EmailIcon.tsx
    │   │   │   ├── EmptyFolderIcon.tsx
    │   │   │   ├── ErrorIcon.tsx
    │   │   │   ├── ExpressionIcon.tsx
    │   │   │   ├── FillPlusCricleIcon.tsx
    │   │   │   ├── FilterIcon.tsx
    │   │   │   ├── FolderIcon.tsx
    │   │   │   ├── GlobeIcon.tsx
    │   │   │   ├── HomeIcon.tsx
    │   │   │   ├── HyperLinkIcon.tsx
    │   │   │   ├── Icon.md
    │   │   │   ├── Icon.module.scss
    │   │   │   ├── Icon.spec.ts
    │   │   │   ├── Icon.tsx
    │   │   │   ├── IconNative.tsx
    │   │   │   ├── ImageFileIcon.tsx
    │   │   │   ├── Inspect.tsx
    │   │   │   ├── LightToDark.tsx
    │   │   │   ├── LinkIcon.tsx
    │   │   │   ├── ListIcon.tsx
    │   │   │   ├── LooseListIcon.tsx
    │   │   │   ├── MoonIcon.tsx
    │   │   │   ├── MoreOptionsIcon.tsx
    │   │   │   ├── NoSortIcon.tsx
    │   │   │   ├── PDFIcon.tsx
    │   │   │   ├── PenIcon.tsx
    │   │   │   ├── PhoneIcon.tsx
    │   │   │   ├── PhotoIcon.tsx
    │   │   │   ├── PlusIcon.tsx
    │   │   │   ├── SearchIcon.tsx
    │   │   │   ├── ShareIcon.tsx
    │   │   │   ├── SortAscendingIcon.tsx
    │   │   │   ├── SortDescendingIcon.tsx
    │   │   │   ├── StarsIcon.tsx
    │   │   │   ├── SunIcon.tsx
    │   │   │   ├── svg
    │   │   │   │   ├── admonition_danger.svg
    │   │   │   │   ├── admonition_info.svg
    │   │   │   │   ├── admonition_note.svg
    │   │   │   │   ├── admonition_tip.svg
    │   │   │   │   ├── admonition_warning.svg
    │   │   │   │   ├── api.svg
    │   │   │   │   ├── arrow-dropdown.svg
    │   │   │   │   ├── arrow-left.svg
    │   │   │   │   ├── arrow-right.svg
    │   │   │   │   ├── arrow-up.svg
    │   │   │   │   ├── attach.svg
    │   │   │   │   ├── binding.svg
    │   │   │   │   ├── box.svg
    │   │   │   │   ├── bulb.svg
    │   │   │   │   ├── code-file.svg
    │   │   │   │   ├── code-sandbox.svg
    │   │   │   │   ├── dark_to_light.svg
    │   │   │   │   ├── database.svg
    │   │   │   │   ├── doc.svg
    │   │   │   │   ├── empty-folder.svg
    │   │   │   │   ├── expression.svg
    │   │   │   │   ├── eye-closed.svg
    │   │   │   │   ├── eye-dark.svg
    │   │   │   │   ├── eye.svg
    │   │   │   │   ├── file-text.svg
    │   │   │   │   ├── filter.svg
    │   │   │   │   ├── folder.svg
    │   │   │   │   ├── img.svg
    │   │   │   │   ├── inspect.svg
    │   │   │   │   ├── light_to_dark.svg
    │   │   │   │   ├── moon.svg
    │   │   │   │   ├── pdf.svg
    │   │   │   │   ├── photo.svg
    │   │   │   │   ├── share.svg
    │   │   │   │   ├── stars.svg
    │   │   │   │   ├── sun.svg
    │   │   │   │   ├── trending-down.svg
    │   │   │   │   ├── trending-level.svg
    │   │   │   │   ├── trending-up.svg
    │   │   │   │   ├── txt.svg
    │   │   │   │   ├── unknown-file.svg
    │   │   │   │   ├── unlink.svg
    │   │   │   │   └── xls.svg
    │   │   │   ├── TableDeleteColumnIcon.tsx
    │   │   │   ├── TableDeleteRowIcon.tsx
    │   │   │   ├── TableInsertColumnIcon.tsx
    │   │   │   ├── TableInsertRowIcon.tsx
    │   │   │   ├── TrashIcon.tsx
    │   │   │   ├── TrendingDownIcon.tsx
    │   │   │   ├── TrendingLevelIcon.tsx
    │   │   │   ├── TrendingUpIcon.tsx
    │   │   │   ├── TxtIcon.tsx
    │   │   │   ├── UnknownFileIcon.tsx
    │   │   │   ├── UnlinkIcon.tsx
    │   │   │   ├── UserIcon.tsx
    │   │   │   ├── WarningIcon.tsx
    │   │   │   └── XlsIcon.tsx
    │   │   ├── IconProvider.tsx
    │   │   ├── IconRegistryContext.tsx
    │   │   ├── IFrame
    │   │   │   ├── IFrame.md
    │   │   │   ├── IFrame.module.scss
    │   │   │   ├── IFrame.spec.ts
    │   │   │   ├── IFrame.tsx
    │   │   │   └── IFrameNative.tsx
    │   │   ├── Image
    │   │   │   ├── Image.md
    │   │   │   ├── Image.module.scss
    │   │   │   ├── Image.spec.ts
    │   │   │   ├── Image.tsx
    │   │   │   └── ImageNative.tsx
    │   │   ├── Input
    │   │   │   ├── index.ts
    │   │   │   ├── InputAdornment.module.scss
    │   │   │   ├── InputAdornment.tsx
    │   │   │   ├── InputDivider.module.scss
    │   │   │   ├── InputDivider.tsx
    │   │   │   ├── InputLabel.module.scss
    │   │   │   ├── InputLabel.tsx
    │   │   │   ├── PartialInput.module.scss
    │   │   │   └── PartialInput.tsx
    │   │   ├── InspectButton
    │   │   │   ├── InspectButton.module.scss
    │   │   │   └── InspectButton.tsx
    │   │   ├── Items
    │   │   │   ├── Items.md
    │   │   │   ├── Items.spec.ts
    │   │   │   ├── Items.tsx
    │   │   │   └── ItemsNative.tsx
    │   │   ├── Link
    │   │   │   ├── Link.md
    │   │   │   ├── Link.module.scss
    │   │   │   ├── Link.spec.ts
    │   │   │   ├── Link.tsx
    │   │   │   └── LinkNative.tsx
    │   │   ├── List
    │   │   │   ├── doc-resources
    │   │   │   │   └── list-component-data.js
    │   │   │   ├── List.md
    │   │   │   ├── List.module.scss
    │   │   │   ├── List.spec.ts
    │   │   │   ├── List.tsx
    │   │   │   └── ListNative.tsx
    │   │   ├── Logo
    │   │   │   ├── doc-resources
    │   │   │   │   └── xmlui-logo.svg
    │   │   │   ├── Logo.md
    │   │   │   ├── Logo.tsx
    │   │   │   └── LogoNative.tsx
    │   │   ├── Markdown
    │   │   │   ├── CodeText.module.scss
    │   │   │   ├── CodeText.tsx
    │   │   │   ├── Markdown.md
    │   │   │   ├── Markdown.module.scss
    │   │   │   ├── Markdown.spec.ts
    │   │   │   ├── Markdown.tsx
    │   │   │   ├── MarkdownNative.tsx
    │   │   │   ├── parse-binding-expr.ts
    │   │   │   └── utils.ts
    │   │   ├── metadata-helpers.ts
    │   │   ├── ModalDialog
    │   │   │   ├── ConfirmationModalContextProvider.tsx
    │   │   │   ├── Dialog.module.scss
    │   │   │   ├── Dialog.tsx
    │   │   │   ├── ModalDialog.md
    │   │   │   ├── ModalDialog.module.scss
    │   │   │   ├── ModalDialog.spec.ts
    │   │   │   ├── ModalDialog.tsx
    │   │   │   ├── ModalDialogNative.tsx
    │   │   │   └── ModalVisibilityContext.tsx
    │   │   ├── NavGroup
    │   │   │   ├── NavGroup.md
    │   │   │   ├── NavGroup.module.scss
    │   │   │   ├── NavGroup.spec.ts
    │   │   │   ├── NavGroup.tsx
    │   │   │   ├── NavGroupContext.ts
    │   │   │   └── NavGroupNative.tsx
    │   │   ├── NavLink
    │   │   │   ├── NavLink.md
    │   │   │   ├── NavLink.module.scss
    │   │   │   ├── NavLink.spec.ts
    │   │   │   ├── NavLink.tsx
    │   │   │   └── NavLinkNative.tsx
    │   │   ├── NavPanel
    │   │   │   ├── NavPanel.md
    │   │   │   ├── NavPanel.module.scss
    │   │   │   ├── NavPanel.spec.ts
    │   │   │   ├── NavPanel.tsx
    │   │   │   └── NavPanelNative.tsx
    │   │   ├── NestedApp
    │   │   │   ├── AppWithCodeView.module.scss
    │   │   │   ├── AppWithCodeView.tsx
    │   │   │   ├── AppWithCodeViewNative.tsx
    │   │   │   ├── defaultProps.tsx
    │   │   │   ├── logo.svg
    │   │   │   ├── NestedApp.module.scss
    │   │   │   ├── NestedApp.tsx
    │   │   │   ├── NestedAppNative.tsx
    │   │   │   ├── Tooltip.module.scss
    │   │   │   ├── Tooltip.tsx
    │   │   │   └── utils.ts
    │   │   ├── NoResult
    │   │   │   ├── NoResult.md
    │   │   │   ├── NoResult.module.scss
    │   │   │   ├── NoResult.spec.ts
    │   │   │   ├── NoResult.tsx
    │   │   │   └── NoResultNative.tsx
    │   │   ├── NumberBox
    │   │   │   ├── numberbox-abstractions.ts
    │   │   │   ├── NumberBox.md
    │   │   │   ├── NumberBox.module.scss
    │   │   │   ├── NumberBox.spec.ts
    │   │   │   ├── NumberBox.tsx
    │   │   │   └── NumberBoxNative.tsx
    │   │   ├── Option
    │   │   │   ├── Option.md
    │   │   │   ├── Option.spec.ts
    │   │   │   ├── Option.tsx
    │   │   │   ├── OptionNative.tsx
    │   │   │   └── OptionTypeProvider.tsx
    │   │   ├── PageMetaTitle
    │   │   │   ├── PageMetaTilteNative.tsx
    │   │   │   ├── PageMetaTitle.md
    │   │   │   ├── PageMetaTitle.spec.ts
    │   │   │   └── PageMetaTitle.tsx
    │   │   ├── Pages
    │   │   │   ├── Page.md
    │   │   │   ├── Pages.md
    │   │   │   ├── Pages.module.scss
    │   │   │   ├── Pages.tsx
    │   │   │   └── PagesNative.tsx
    │   │   ├── Pagination
    │   │   │   ├── Pagination.md
    │   │   │   ├── Pagination.module.scss
    │   │   │   ├── Pagination.spec.ts
    │   │   │   ├── Pagination.tsx
    │   │   │   └── PaginationNative.tsx
    │   │   ├── PositionedContainer
    │   │   │   ├── PositionedContainer.module.scss
    │   │   │   ├── PositionedContainer.tsx
    │   │   │   └── PositionedContainerNative.tsx
    │   │   ├── ProfileMenu
    │   │   │   ├── ProfileMenu.module.scss
    │   │   │   └── ProfileMenu.tsx
    │   │   ├── ProgressBar
    │   │   │   ├── ProgressBar.md
    │   │   │   ├── ProgressBar.module.scss
    │   │   │   ├── ProgressBar.spec.ts
    │   │   │   ├── ProgressBar.tsx
    │   │   │   └── ProgressBarNative.tsx
    │   │   ├── Queue
    │   │   │   ├── Queue.md
    │   │   │   ├── Queue.spec.ts
    │   │   │   ├── Queue.tsx
    │   │   │   ├── queueActions.ts
    │   │   │   └── QueueNative.tsx
    │   │   ├── RadioGroup
    │   │   │   ├── RadioGroup.md
    │   │   │   ├── RadioGroup.module.scss
    │   │   │   ├── RadioGroup.spec.ts
    │   │   │   ├── RadioGroup.tsx
    │   │   │   ├── RadioGroupNative.tsx
    │   │   │   ├── RadioItem.tsx
    │   │   │   └── RadioItemNative.tsx
    │   │   ├── RealTimeAdapter
    │   │   │   ├── RealTimeAdapter.tsx
    │   │   │   └── RealTimeAdapterNative.tsx
    │   │   ├── Redirect
    │   │   │   ├── Redirect.md
    │   │   │   ├── Redirect.spec.ts
    │   │   │   └── Redirect.tsx
    │   │   ├── ResponsiveBar
    │   │   │   ├── README.md
    │   │   │   ├── ResponsiveBar.md
    │   │   │   ├── ResponsiveBar.module.scss
    │   │   │   ├── ResponsiveBar.spec.ts
    │   │   │   ├── ResponsiveBar.tsx
    │   │   │   └── ResponsiveBarNative.tsx
    │   │   ├── Select
    │   │   │   ├── HiddenOption.tsx
    │   │   │   ├── OptionContext.ts
    │   │   │   ├── Select.md
    │   │   │   ├── Select.module.scss
    │   │   │   ├── Select.spec.ts
    │   │   │   ├── Select.tsx
    │   │   │   ├── SelectContext.tsx
    │   │   │   └── SelectNative.tsx
    │   │   ├── SelectionStore
    │   │   │   ├── SelectionStore.md
    │   │   │   ├── SelectionStore.tsx
    │   │   │   └── SelectionStoreNative.tsx
    │   │   ├── Slider
    │   │   │   ├── Slider.md
    │   │   │   ├── Slider.module.scss
    │   │   │   ├── Slider.spec.ts
    │   │   │   ├── Slider.tsx
    │   │   │   └── SliderNative.tsx
    │   │   ├── Slot
    │   │   │   ├── Slot.md
    │   │   │   ├── Slot.spec.ts
    │   │   │   └── Slot.ts
    │   │   ├── SlotItem.tsx
    │   │   ├── SpaceFiller
    │   │   │   ├── SpaceFiller.md
    │   │   │   ├── SpaceFiller.module.scss
    │   │   │   ├── SpaceFiller.spec.ts
    │   │   │   ├── SpaceFiller.tsx
    │   │   │   └── SpaceFillerNative.tsx
    │   │   ├── Spinner
    │   │   │   ├── Spinner.md
    │   │   │   ├── Spinner.module.scss
    │   │   │   ├── Spinner.spec.ts
    │   │   │   ├── Spinner.tsx
    │   │   │   └── SpinnerNative.tsx
    │   │   ├── Splitter
    │   │   │   ├── HSplitter.md
    │   │   │   ├── HSplitter.spec.ts
    │   │   │   ├── Splitter.md
    │   │   │   ├── Splitter.module.scss
    │   │   │   ├── Splitter.spec.ts
    │   │   │   ├── Splitter.tsx
    │   │   │   ├── SplitterNative.tsx
    │   │   │   ├── utils.ts
    │   │   │   ├── VSplitter.md
    │   │   │   └── VSplitter.spec.ts
    │   │   ├── Stack
    │   │   │   ├── CHStack.md
    │   │   │   ├── CHStack.spec.ts
    │   │   │   ├── CVStack.md
    │   │   │   ├── CVStack.spec.ts
    │   │   │   ├── HStack.md
    │   │   │   ├── HStack.spec.ts
    │   │   │   ├── Stack.md
    │   │   │   ├── Stack.module.scss
    │   │   │   ├── Stack.spec.ts
    │   │   │   ├── Stack.tsx
    │   │   │   ├── StackNative.tsx
    │   │   │   ├── VStack.md
    │   │   │   └── VStack.spec.ts
    │   │   ├── StickyBox
    │   │   │   ├── StickyBox.md
    │   │   │   ├── StickyBox.module.scss
    │   │   │   ├── StickyBox.tsx
    │   │   │   └── StickyBoxNative.tsx
    │   │   ├── Switch
    │   │   │   ├── Switch.md
    │   │   │   ├── Switch.spec.ts
    │   │   │   └── Switch.tsx
    │   │   ├── Table
    │   │   │   ├── doc-resources
    │   │   │   │   └── list-component-data.js
    │   │   │   ├── react-table-config.d.ts
    │   │   │   ├── Table.md
    │   │   │   ├── Table.module.scss
    │   │   │   ├── Table.spec.ts
    │   │   │   ├── Table.tsx
    │   │   │   ├── TableNative.tsx
    │   │   │   └── useRowSelection.tsx
    │   │   ├── TableOfContents
    │   │   │   ├── TableOfContents.module.scss
    │   │   │   ├── TableOfContents.spec.ts
    │   │   │   ├── TableOfContents.tsx
    │   │   │   └── TableOfContentsNative.tsx
    │   │   ├── Tabs
    │   │   │   ├── TabContext.tsx
    │   │   │   ├── TabItem.md
    │   │   │   ├── TabItem.tsx
    │   │   │   ├── TabItemNative.tsx
    │   │   │   ├── Tabs.md
    │   │   │   ├── Tabs.module.scss
    │   │   │   ├── Tabs.spec.ts
    │   │   │   ├── Tabs.tsx
    │   │   │   └── TabsNative.tsx
    │   │   ├── Text
    │   │   │   ├── Text.md
    │   │   │   ├── Text.module.scss
    │   │   │   ├── Text.spec.ts
    │   │   │   ├── Text.tsx
    │   │   │   └── TextNative.tsx
    │   │   ├── TextArea
    │   │   │   ├── TextArea.md
    │   │   │   ├── TextArea.module.scss
    │   │   │   ├── TextArea.spec.ts
    │   │   │   ├── TextArea.tsx
    │   │   │   ├── TextAreaNative.tsx
    │   │   │   ├── TextAreaResizable.tsx
    │   │   │   └── useComposedRef.ts
    │   │   ├── TextBox
    │   │   │   ├── TextBox.md
    │   │   │   ├── TextBox.module.scss
    │   │   │   ├── TextBox.spec.ts
    │   │   │   ├── TextBox.tsx
    │   │   │   └── TextBoxNative.tsx
    │   │   ├── Theme
    │   │   │   ├── NotificationToast.tsx
    │   │   │   ├── Theme.md
    │   │   │   ├── Theme.module.scss
    │   │   │   ├── Theme.spec.ts
    │   │   │   ├── Theme.tsx
    │   │   │   └── ThemeNative.tsx
    │   │   ├── TimeInput
    │   │   │   ├── TimeInput.md
    │   │   │   ├── TimeInput.module.scss
    │   │   │   ├── TimeInput.spec.ts
    │   │   │   ├── TimeInput.tsx
    │   │   │   ├── TimeInputNative.tsx
    │   │   │   └── utils.ts
    │   │   ├── Timer
    │   │   │   ├── Timer.md
    │   │   │   ├── Timer.spec.ts
    │   │   │   ├── Timer.tsx
    │   │   │   └── TimerNative.tsx
    │   │   ├── Toggle
    │   │   │   ├── Toggle.module.scss
    │   │   │   └── Toggle.tsx
    │   │   ├── ToneChangerButton
    │   │   │   ├── ToneChangerButton.md
    │   │   │   ├── ToneChangerButton.spec.ts
    │   │   │   └── ToneChangerButton.tsx
    │   │   ├── ToneSwitch
    │   │   │   ├── ToneSwitch.md
    │   │   │   ├── ToneSwitch.module.scss
    │   │   │   ├── ToneSwitch.spec.ts
    │   │   │   ├── ToneSwitch.tsx
    │   │   │   └── ToneSwitchNative.tsx
    │   │   ├── Tooltip
    │   │   │   ├── Tooltip.md
    │   │   │   ├── Tooltip.module.scss
    │   │   │   ├── Tooltip.spec.ts
    │   │   │   ├── Tooltip.tsx
    │   │   │   └── TooltipNative.tsx
    │   │   ├── Tree
    │   │   │   ├── testData.ts
    │   │   │   ├── Tree-dynamic.spec.ts
    │   │   │   ├── Tree-icons.spec.ts
    │   │   │   ├── Tree.md
    │   │   │   ├── Tree.spec.ts
    │   │   │   ├── TreeComponent.module.scss
    │   │   │   ├── TreeComponent.tsx
    │   │   │   └── TreeNative.tsx
    │   │   ├── TreeDisplay
    │   │   │   ├── TreeDisplay.md
    │   │   │   ├── TreeDisplay.module.scss
    │   │   │   ├── TreeDisplay.tsx
    │   │   │   └── TreeDisplayNative.tsx
    │   │   ├── ValidationSummary
    │   │   │   ├── ValidationSummary.module.scss
    │   │   │   └── ValidationSummary.tsx
    │   │   └── VisuallyHidden.tsx
    │   ├── components-core
    │   │   ├── abstractions
    │   │   │   ├── ComponentRenderer.ts
    │   │   │   ├── LoaderRenderer.ts
    │   │   │   ├── standalone.ts
    │   │   │   └── treeAbstractions.ts
    │   │   ├── action
    │   │   │   ├── actions.ts
    │   │   │   ├── APICall.tsx
    │   │   │   ├── FileDownloadAction.tsx
    │   │   │   ├── FileUploadAction.tsx
    │   │   │   ├── NavigateAction.tsx
    │   │   │   └── TimedAction.tsx
    │   │   ├── ApiBoundComponent.tsx
    │   │   ├── appContext
    │   │   │   ├── date-functions.ts
    │   │   │   ├── math-function.ts
    │   │   │   └── misc-utils.ts
    │   │   ├── AppContext.tsx
    │   │   ├── behaviors
    │   │   │   ├── Behavior.tsx
    │   │   │   └── CoreBehaviors.tsx
    │   │   ├── component-hooks.ts
    │   │   ├── ComponentDecorator.tsx
    │   │   ├── ComponentViewer.tsx
    │   │   ├── CompoundComponent.tsx
    │   │   ├── constants.ts
    │   │   ├── DebugViewProvider.tsx
    │   │   ├── descriptorHelper.ts
    │   │   ├── devtools
    │   │   │   ├── InspectorDialog.module.scss
    │   │   │   ├── InspectorDialog.tsx
    │   │   │   └── InspectorDialogVisibilityContext.tsx
    │   │   ├── EngineError.ts
    │   │   ├── event-handlers.ts
    │   │   ├── InspectorButton.module.scss
    │   │   ├── InspectorContext.tsx
    │   │   ├── interception
    │   │   │   ├── abstractions.ts
    │   │   │   ├── ApiInterceptor.ts
    │   │   │   ├── ApiInterceptorProvider.tsx
    │   │   │   ├── apiInterceptorWorker.ts
    │   │   │   ├── Backend.ts
    │   │   │   ├── Errors.ts
    │   │   │   ├── IndexedDb.ts
    │   │   │   ├── initMock.ts
    │   │   │   ├── InMemoryDb.ts
    │   │   │   ├── ReadonlyCollection.ts
    │   │   │   └── useApiInterceptorContext.tsx
    │   │   ├── loader
    │   │   │   ├── ApiLoader.tsx
    │   │   │   ├── DataLoader.tsx
    │   │   │   ├── ExternalDataLoader.tsx
    │   │   │   ├── Loader.tsx
    │   │   │   ├── MockLoaderRenderer.tsx
    │   │   │   └── PageableLoader.tsx
    │   │   ├── LoaderComponent.tsx
    │   │   ├── markup-check.ts
    │   │   ├── parts.ts
    │   │   ├── renderers.ts
    │   │   ├── rendering
    │   │   │   ├── AppContent.tsx
    │   │   │   ├── AppRoot.tsx
    │   │   │   ├── AppWrapper.tsx
    │   │   │   ├── buildProxy.ts
    │   │   │   ├── collectFnVarDeps.ts
    │   │   │   ├── ComponentAdapter.tsx
    │   │   │   ├── ComponentWrapper.tsx
    │   │   │   ├── Container.tsx
    │   │   │   ├── containers.ts
    │   │   │   ├── ContainerWrapper.tsx
    │   │   │   ├── ErrorBoundary.module.scss
    │   │   │   ├── ErrorBoundary.tsx
    │   │   │   ├── InvalidComponent.module.scss
    │   │   │   ├── InvalidComponent.tsx
    │   │   │   ├── nodeUtils.ts
    │   │   │   ├── reducer.ts
    │   │   │   ├── renderChild.tsx
    │   │   │   ├── StandaloneComponent.tsx
    │   │   │   ├── StateContainer.tsx
    │   │   │   ├── UnknownComponent.module.scss
    │   │   │   ├── UnknownComponent.tsx
    │   │   │   └── valueExtractor.ts
    │   │   ├── reportEngineError.ts
    │   │   ├── RestApiProxy.ts
    │   │   ├── script-runner
    │   │   │   ├── asyncProxy.ts
    │   │   │   ├── AttributeValueParser.ts
    │   │   │   ├── bannedFunctions.ts
    │   │   │   ├── BindingTreeEvaluationContext.ts
    │   │   │   ├── eval-tree-async.ts
    │   │   │   ├── eval-tree-common.ts
    │   │   │   ├── eval-tree-sync.ts
    │   │   │   ├── ParameterParser.ts
    │   │   │   ├── process-statement-async.ts
    │   │   │   ├── process-statement-common.ts
    │   │   │   ├── process-statement-sync.ts
    │   │   │   ├── ScriptingSourceTree.ts
    │   │   │   ├── simplify-expression.ts
    │   │   │   ├── statement-queue.ts
    │   │   │   └── visitors.ts
    │   │   ├── StandaloneApp.tsx
    │   │   ├── StandaloneExtensionManager.ts
    │   │   ├── TableOfContentsContext.tsx
    │   │   ├── theming
    │   │   │   ├── _themes.scss
    │   │   │   ├── component-layout-resolver.ts
    │   │   │   ├── extendThemeUtils.ts
    │   │   │   ├── hvar.ts
    │   │   │   ├── layout-resolver.ts
    │   │   │   ├── parse-layout-props.ts
    │   │   │   ├── StyleContext.tsx
    │   │   │   ├── StyleRegistry.ts
    │   │   │   ├── ThemeContext.tsx
    │   │   │   ├── ThemeProvider.tsx
    │   │   │   ├── themes
    │   │   │   │   ├── base-utils.ts
    │   │   │   │   ├── palette.ts
    │   │   │   │   ├── root.ts
    │   │   │   │   ├── solid.ts
    │   │   │   │   ├── theme-colors.ts
    │   │   │   │   └── xmlui.ts
    │   │   │   ├── themeVars.module.scss
    │   │   │   ├── themeVars.ts
    │   │   │   ├── transformThemeVars.ts
    │   │   │   └── utils.ts
    │   │   ├── utils
    │   │   │   ├── actionUtils.ts
    │   │   │   ├── audio-utils.ts
    │   │   │   ├── base64-utils.ts
    │   │   │   ├── compound-utils.ts
    │   │   │   ├── css-utils.ts
    │   │   │   ├── DataLoaderQueryKeyGenerator.ts
    │   │   │   ├── date-utils.ts
    │   │   │   ├── extractParam.ts
    │   │   │   ├── hooks.tsx
    │   │   │   ├── LruCache.ts
    │   │   │   ├── mergeProps.ts
    │   │   │   ├── misc.ts
    │   │   │   ├── request-params.ts
    │   │   │   ├── statementUtils.ts
    │   │   │   └── treeUtils.ts
    │   │   └── xmlui-parser.ts
    │   ├── index-standalone.ts
    │   ├── index.scss
    │   ├── index.ts
    │   ├── language-server
    │   │   ├── server-common.ts
    │   │   ├── server-web-worker.ts
    │   │   ├── server.ts
    │   │   ├── services
    │   │   │   ├── common
    │   │   │   │   ├── docs-generation.ts
    │   │   │   │   ├── lsp-utils.ts
    │   │   │   │   ├── metadata-utils.ts
    │   │   │   │   └── syntax-node-utilities.ts
    │   │   │   ├── completion.ts
    │   │   │   ├── diagnostic.ts
    │   │   │   ├── format.ts
    │   │   │   └── hover.ts
    │   │   └── xmlui-metadata-generated.js
    │   ├── logging
    │   │   ├── LoggerContext.tsx
    │   │   ├── LoggerInitializer.tsx
    │   │   ├── LoggerService.ts
    │   │   └── xmlui.ts
    │   ├── logo.svg
    │   ├── parsers
    │   │   ├── common
    │   │   │   ├── GenericToken.ts
    │   │   │   ├── InputStream.ts
    │   │   │   └── utils.ts
    │   │   ├── scripting
    │   │   │   ├── code-behind-collect.ts
    │   │   │   ├── Lexer.ts
    │   │   │   ├── modules.ts
    │   │   │   ├── Parser.ts
    │   │   │   ├── ParserError.ts
    │   │   │   ├── ScriptingNodeTypes.ts
    │   │   │   ├── TokenTrait.ts
    │   │   │   ├── TokenType.ts
    │   │   │   └── tree-visitor.ts
    │   │   ├── style-parser
    │   │   │   ├── errors.ts
    │   │   │   ├── source-tree.ts
    │   │   │   ├── StyleInputStream.ts
    │   │   │   ├── StyleLexer.ts
    │   │   │   ├── StyleParser.ts
    │   │   │   └── tokens.ts
    │   │   └── xmlui-parser
    │   │       ├── CharacterCodes.ts
    │   │       ├── diagnostics.ts
    │   │       ├── fileExtensions.ts
    │   │       ├── index.ts
    │   │       ├── lint.ts
    │   │       ├── parser.ts
    │   │       ├── ParserError.ts
    │   │       ├── scanner.ts
    │   │       ├── syntax-kind.ts
    │   │       ├── syntax-node.ts
    │   │       ├── transform.ts
    │   │       ├── utils.ts
    │   │       ├── xmlui-serializer.ts
    │   │       └── xmlui-tree.ts
    │   ├── react-app-env.d.ts
    │   ├── syntax
    │   │   ├── monaco
    │   │   │   ├── grammar.monacoLanguage.ts
    │   │   │   ├── index.ts
    │   │   │   ├── xmlui-dark.ts
    │   │   │   ├── xmlui-light.ts
    │   │   │   └── xmluiscript.monacoLanguage.ts
    │   │   └── textMate
    │   │       ├── index.ts
    │   │       ├── xmlui-dark.json
    │   │       ├── xmlui-light.json
    │   │       ├── xmlui.json
    │   │       └── xmlui.tmLanguage.json
    │   ├── testing
    │   │   ├── assertions.ts
    │   │   ├── component-test-helpers.ts
    │   │   ├── ComponentDrivers.ts
    │   │   ├── drivers
    │   │   │   ├── DateInputDriver.ts
    │   │   │   ├── index.ts
    │   │   │   ├── ModalDialogDriver.ts
    │   │   │   ├── NumberBoxDriver.ts
    │   │   │   ├── TextBoxDriver.ts
    │   │   │   ├── TimeInputDriver.ts
    │   │   │   ├── TimerDriver.ts
    │   │   │   └── TreeDriver.ts
    │   │   ├── fixtures.ts
    │   │   ├── index.ts
    │   │   ├── infrastructure
    │   │   │   ├── index.html
    │   │   │   ├── main.tsx
    │   │   │   ├── public
    │   │   │   │   ├── mockServiceWorker.js
    │   │   │   │   ├── resources
    │   │   │   │   │   ├── bell.svg
    │   │   │   │   │   ├── box.svg
    │   │   │   │   │   ├── doc.svg
    │   │   │   │   │   ├── eye.svg
    │   │   │   │   │   ├── flower-640x480.jpg
    │   │   │   │   │   ├── sun.svg
    │   │   │   │   │   ├── test-image-100x100.jpg
    │   │   │   │   │   └── txt.svg
    │   │   │   │   └── serve.json
    │   │   │   └── TestBed.tsx
    │   │   └── themed-app-test-helpers.ts
    │   └── vite-env.d.ts
    ├── tests
    │   ├── components
    │   │   ├── CodeBlock
    │   │   │   └── hightlight-code.test.ts
    │   │   ├── playground-pattern.test.ts
    │   │   └── Tree
    │   │       └── Tree-states.test.ts
    │   ├── components-core
    │   │   ├── abstractions
    │   │   │   └── treeAbstractions.test.ts
    │   │   ├── container
    │   │   │   └── buildProxy.test.ts
    │   │   ├── interception
    │   │   │   ├── orderBy.test.ts
    │   │   │   ├── ReadOnlyCollection.test.ts
    │   │   │   └── request-param-converter.test.ts
    │   │   ├── scripts-runner
    │   │   │   ├── AttributeValueParser.test.ts
    │   │   │   ├── eval-tree-arrow-async.test.ts
    │   │   │   ├── eval-tree-arrow.test.ts
    │   │   │   ├── eval-tree-func-decl-async.test.ts
    │   │   │   ├── eval-tree-func-decl.test.ts
    │   │   │   ├── eval-tree-pre-post.test.ts
    │   │   │   ├── eval-tree-regression.test.ts
    │   │   │   ├── eval-tree.test.ts
    │   │   │   ├── function-proxy.test.ts
    │   │   │   ├── parser-regression.test.ts
    │   │   │   ├── process-event.test.ts
    │   │   │   ├── process-function.test.ts
    │   │   │   ├── process-implicit-context.test.ts
    │   │   │   ├── process-statement-asgn.test.ts
    │   │   │   ├── process-statement-destruct.test.ts
    │   │   │   ├── process-statement-regs.test.ts
    │   │   │   ├── process-statement-sync.test.ts
    │   │   │   ├── process-statement.test.ts
    │   │   │   ├── process-switch-sync.test.ts
    │   │   │   ├── process-switch.test.ts
    │   │   │   ├── process-try-sync.test.ts
    │   │   │   ├── process-try.test.ts
    │   │   │   └── test-helpers.ts
    │   │   ├── test-metadata-handler.ts
    │   │   ├── theming
    │   │   │   ├── border-segments.test.ts
    │   │   │   ├── component-layout.resolver.test.ts
    │   │   │   ├── layout-property-parser.test.ts
    │   │   │   ├── layout-resolver.test.ts
    │   │   │   ├── layout-resolver2.test.ts
    │   │   │   ├── layout-vp-override.test.ts
    │   │   │   └── padding-segments.test.ts
    │   │   └── utils
    │   │       ├── date-utils.test.ts
    │   │       ├── format-human-elapsed-time.test.ts
    │   │       └── LruCache.test.ts
    │   ├── language-server
    │   │   ├── completion.test.ts
    │   │   ├── format.test.ts
    │   │   ├── hover.test.ts
    │   │   └── mockData.ts
    │   └── parsers
    │       ├── common
    │       │   └── input-stream.test.ts
    │       ├── markdown
    │       │   └── parse-binding-expression.test.ts
    │       ├── parameter-parser.test.ts
    │       ├── paremeter-parser.test.ts
    │       ├── scripting
    │       │   ├── eval-tree-arrow.test.ts
    │       │   ├── eval-tree-pre-post.test.ts
    │       │   ├── eval-tree.test.ts
    │       │   ├── function-proxy.test.ts
    │       │   ├── lexer-literals.test.ts
    │       │   ├── lexer-misc.test.ts
    │       │   ├── module-parse.test.ts
    │       │   ├── parser-arrow.test.ts
    │       │   ├── parser-assignments.test.ts
    │       │   ├── parser-binary.test.ts
    │       │   ├── parser-destructuring.test.ts
    │       │   ├── parser-errors.test.ts
    │       │   ├── parser-expressions.test.ts
    │       │   ├── parser-function.test.ts
    │       │   ├── parser-literals.test.ts
    │       │   ├── parser-primary.test.ts
    │       │   ├── parser-regex.test.ts
    │       │   ├── parser-statements.test.ts
    │       │   ├── parser-unary.test.ts
    │       │   ├── process-event.test.ts
    │       │   ├── process-implicit-context.test.ts
    │       │   ├── process-statement-asgn.test.ts
    │       │   ├── process-statement-destruct.test.ts
    │       │   ├── process-statement-regs.test.ts
    │       │   ├── process-statement-sync.test.ts
    │       │   ├── process-statement.test.ts
    │       │   ├── process-switch-sync.test.ts
    │       │   ├── process-switch.test.ts
    │       │   ├── process-try-sync.test.ts
    │       │   ├── process-try.test.ts
    │       │   ├── simplify-expression.test.ts
    │       │   ├── statement-hooks.test.ts
    │       │   └── test-helpers.ts
    │       ├── style-parser
    │       │   ├── generateHvarChain.test.ts
    │       │   ├── parseHVar.test.ts
    │       │   ├── parser.test.ts
    │       │   └── tokens.test.ts
    │       └── xmlui
    │           ├── lint.test.ts
    │           ├── parser.test.ts
    │           ├── scanner.test.ts
    │           ├── transform.attr.test.ts
    │           ├── transform.circular.test.ts
    │           ├── transform.element.test.ts
    │           ├── transform.errors.test.ts
    │           ├── transform.escape.test.ts
    │           ├── transform.regression.test.ts
    │           ├── transform.script.test.ts
    │           ├── transform.test.ts
    │           └── xmlui.ts
    ├── tests-e2e
    │   ├── api-bound-component-regression.spec.ts
    │   ├── api-call-as-extracted-component.spec.ts
    │   ├── assign-to-object-or-array-regression.spec.ts
    │   ├── binding-regression.spec.ts
    │   ├── children-as-template-context-vars.spec.ts
    │   ├── compound-component.spec.ts
    │   ├── context-vars-regression.spec.ts
    │   ├── data-bindings.spec.ts
    │   ├── datasource-and-api-usage-in-var.spec.ts
    │   ├── datasource-direct-binding.spec.ts
    │   ├── datasource-onLoaded-regression.spec.ts
    │   ├── modify-array-item-regression.spec.ts
    │   ├── namespaces.spec.ts
    │   ├── push-to-array-regression.spec.ts
    │   ├── screen-breakpoints.spec.ts
    │   ├── scripting.spec.ts
    │   ├── state-scope-in-pages.spec.ts
    │   └── state-var-scopes.spec.ts
    ├── tsconfig.json
    ├── tsdown.config.ts
    ├── vite.config.ts
    └── vitest.config.ts
```

# Files

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

```typescript
  1 | import { expect, test } from "../../testing/fixtures";
  2 | 
  3 | // =============================================================================
  4 | // BASIC FUNCTIONALITY TESTS
  5 | // =============================================================================
  6 | 
  7 | test.describe("Basic Functionality", () => {
  8 |   test("component renders with default props", async ({ initTestBed, createContentSeparatorDriver }) => {
  9 |     await initTestBed(`<ContentSeparator />`);
 10 |     const driver = await createContentSeparatorDriver();
 11 | 
 12 |     await expect(driver.component).toBeVisible();
 13 |     await expect(driver.separator).toBeVisible();
 14 |     
 15 |     // Default orientation should be horizontal
 16 |     const orientation = await driver.getOrientation();
 17 |     expect(orientation).toBe('horizontal');
 18 |   });
 19 | 
 20 |   test("component renders with horizontal orientation", async ({ initTestBed, createContentSeparatorDriver }) => {
 21 |     await initTestBed(`<ContentSeparator orientation="horizontal" />`);
 22 |     const driver = await createContentSeparatorDriver();
 23 | 
 24 |     await expect(driver.component).toBeVisible();
 25 |     const orientation = await driver.getOrientation();
 26 |     expect(orientation).toBe('horizontal');
 27 |     
 28 |     // Horizontal should span full width
 29 |     const width = await driver.getComputedWidth();
 30 |     expect(width).not.toBe('0px');
 31 |   });
 32 | 
 33 |   test("component renders with vertical orientation", async ({ initTestBed, createContentSeparatorDriver }) => {
 34 |     await initTestBed(`<ContentSeparator orientation="vertical" />`);
 35 |     const driver = await createContentSeparatorDriver();
 36 | 
 37 |     await expect(driver.component).toBeVisible();
 38 |     const orientation = await driver.getOrientation();
 39 |     expect(orientation).toBe('vertical');
 40 |   });
 41 | 
 42 |   test("component respects custom size prop", async ({ initTestBed, createContentSeparatorDriver }) => {
 43 |     await initTestBed(`<ContentSeparator size="5px" orientation="horizontal" />`);
 44 |     const driver = await createContentSeparatorDriver();
 45 | 
 46 |     await expect(driver.component).toBeVisible();
 47 |     const height = await driver.getComputedHeight();
 48 |     expect(height).toBe('5px');
 49 |   });
 50 | 
 51 |   test("component handles numeric size values", async ({ initTestBed, createContentSeparatorDriver }) => {
 52 |     await initTestBed(`<ContentSeparator size="10px" orientation="horizontal" />`);
 53 |     const driver = await createContentSeparatorDriver();
 54 | 
 55 |     await expect(driver.component).toBeVisible();
 56 |     const height = await driver.getComputedHeight();
 57 |     expect(height).toBe('10px');
 58 |   });
 59 | 
 60 |   test("vertical separator respects size for width", async ({ initTestBed, createContentSeparatorDriver }) => {
 61 |     await initTestBed(`<ContentSeparator size="3px" orientation="vertical" />`);
 62 |     const driver = await createContentSeparatorDriver();
 63 | 
 64 |     await expect(driver.component).toBeVisible();
 65 |     const width = await driver.getComputedWidth();
 66 |     expect(width).toBe('3px');
 67 |   });
 68 | });
 69 | 
 70 | // =============================================================================
 71 | // ACCESSIBILITY TESTS
 72 | // =============================================================================
 73 | 
 74 | test.describe("Accessibility", () => {
 75 |   test("component has appropriate semantic role", async ({ initTestBed, createContentSeparatorDriver }) => {
 76 |     await initTestBed(`<ContentSeparator />`);
 77 |     const driver = await createContentSeparatorDriver();
 78 | 
 79 |     // ContentSeparator is a visual element, should be a div without specific role
 80 |     await expect(driver.component).toBeVisible();
 81 |     const tagName = await driver.getComponentTagName();
 82 |     expect(tagName).toBe('div');
 83 |   });
 84 | 
 85 |   test("component is focusable when needed", async ({ initTestBed, createContentSeparatorDriver }) => {
 86 |     await initTestBed(`<ContentSeparator />`);
 87 |     const driver = await createContentSeparatorDriver();
 88 | 
 89 |     // ContentSeparator should not be focusable as it's a visual separator
 90 |     await expect(driver.separator).not.toBeFocused();
 91 |     
 92 |     // Try to focus and ensure it doesn't receive focus
 93 |     await driver.separator.focus({ timeout: 1000 }).catch(() => {
 94 |       // Expected to fail - separator should not be focusable
 95 |     });
 96 |   });
 97 | 
 98 |   test("component provides proper visual separation", async ({ initTestBed, page }) => {
 99 |     await initTestBed(`
100 |       <VStack>
101 |         <Text>Content above</Text>
102 |         <ContentSeparator />
103 |         <Text>Content below</Text>
104 |       </VStack>
105 |     `);
106 |     
107 |     const separator = page.getByTestId("test-id-component");
108 |     await expect(separator).toBeVisible();
109 |     
110 |     // Check that the separator exists and is rendered
111 |     const separatorExists = await separator.count();
112 |     expect(separatorExists).toBe(1);
113 |     
114 |     // It should have some visual properties (height for horizontal separator)
115 |     const height = await separator.evaluate((el) => window.getComputedStyle(el).height);
116 |     expect(parseInt(height)).toBeGreaterThan(0);
117 |   });
118 | });
119 | 
120 | // =============================================================================
121 | // VISUAL STATE TESTS
122 | // =============================================================================
123 | 
124 | test.describe("Visual States & Themes", () => {
125 |   test("component applies theme variables correctly", async ({ initTestBed, createContentSeparatorDriver }) => {
126 |     await initTestBed(`<ContentSeparator />`, {
127 |       testThemeVars: {
128 |         "backgroundColor-ContentSeparator": "rgb(255, 0, 0)",
129 |         "size-ContentSeparator": "5px",
130 |       },
131 |     });
132 |     const driver = await createContentSeparatorDriver();
133 | 
134 |     await expect(driver.separator).toHaveCSS("background-color", "rgb(255, 0, 0)");
135 |     const height = await driver.getComputedHeight();
136 |     expect(height).toBe('5px');
137 |   });
138 | 
139 |   test("horizontal separator uses theme size for height", async ({ initTestBed, createContentSeparatorDriver }) => {
140 |     await initTestBed(`<ContentSeparator orientation="horizontal" />`, {
141 |       testThemeVars: {
142 |         "size-ContentSeparator": "3px",
143 |       },
144 |     });
145 |     const driver = await createContentSeparatorDriver();
146 | 
147 |     const height = await driver.getComputedHeight();
148 |     expect(height).toBe('3px');
149 |     
150 |     // Width should still be 100%
151 |     const width = await driver.getComputedWidth();
152 |     expect(width).not.toBe('3px');
153 |   });
154 | 
155 |   test("vertical separator uses theme size for width", async ({ initTestBed, createContentSeparatorDriver }) => {
156 |     await initTestBed(`<ContentSeparator orientation="vertical" />`, {
157 |       testThemeVars: {
158 |         "size-ContentSeparator": "2px",
159 |       },
160 |     });
161 |     const driver = await createContentSeparatorDriver();
162 | 
163 |     const width = await driver.getComputedWidth();
164 |     expect(width).toBe('2px');
165 |   });
166 | 
167 |   test("prop size overrides theme size", async ({ initTestBed, createContentSeparatorDriver }) => {
168 |     await initTestBed(`<ContentSeparator size="10px" orientation="horizontal" />`, {
169 |       testThemeVars: {
170 |         "size-ContentSeparator": "3px",
171 |       },
172 |     });
173 |     const driver = await createContentSeparatorDriver();
174 | 
175 |     // Prop should override theme
176 |     const height = await driver.getComputedHeight();
177 |     expect(height).toBe('10px');
178 |   });
179 | });
180 | 
181 | // =============================================================================
182 | // THEME VARIABLE TESTS
183 | // =============================================================================
184 | 
185 | test.describe("Theme Variables", () => {
186 |   test("applies basic theme variables", async ({ initTestBed, createContentSeparatorDriver }) => {
187 |     await initTestBed(`<ContentSeparator />`, {
188 |       testThemeVars: {
189 |         "backgroundColor-ContentSeparator": "rgb(255, 0, 0)",
190 |         "size-ContentSeparator": "5px",
191 |       },
192 |     });
193 |     const driver = await createContentSeparatorDriver();
194 | 
195 |     await expect(driver.separator).toHaveCSS("background-color", "rgb(255, 0, 0)");
196 |     const height = await driver.getComputedHeight();
197 |     expect(height).toBe('5px');
198 |   });
199 | 
200 |   test("applies vertical margin theme variables", async ({ initTestBed, createContentSeparatorDriver }) => {
201 |     await initTestBed(`<ContentSeparator />`, {
202 |       testThemeVars: {
203 |         "marginVertical-ContentSeparator": "10px",
204 |       },
205 |     });
206 |     const driver = await createContentSeparatorDriver();
207 | 
208 |     await expect(driver.separator).toHaveCSS("margin-top", "10px");
209 |     await expect(driver.separator).toHaveCSS("margin-bottom", "10px");
210 |   });
211 | 
212 |   test("applies horizontal margin theme variables", async ({ initTestBed, createContentSeparatorDriver }) => {
213 |     await initTestBed(`<ContentSeparator />`, {
214 |       testThemeVars: {
215 |         "marginHorizontal-ContentSeparator": "15px",
216 |       },
217 |     });
218 |     const driver = await createContentSeparatorDriver();
219 | 
220 |     await expect(driver.separator).toHaveCSS("margin-left", "15px");
221 |     await expect(driver.separator).toHaveCSS("margin-right", "15px");
222 |   });
223 | 
224 |   test("specific margin-top overrides vertical margin", async ({ initTestBed, createContentSeparatorDriver }) => {
225 |     await initTestBed(`<ContentSeparator />`, {
226 |       testThemeVars: {
227 |         "marginVertical-ContentSeparator": "10px",
228 |         "marginTop-ContentSeparator": "20px",
229 |       },
230 |     });
231 |     const driver = await createContentSeparatorDriver();
232 | 
233 |     // Specific margin-top should override vertical margin
234 |     await expect(driver.separator).toHaveCSS("margin-top", "20px");
235 |     // Bottom should still use vertical margin
236 |     await expect(driver.separator).toHaveCSS("margin-bottom", "10px");
237 |   });
238 | 
239 |   test("specific margin-bottom overrides vertical margin", async ({ initTestBed, createContentSeparatorDriver }) => {
240 |     await initTestBed(`<ContentSeparator />`, {
241 |       testThemeVars: {
242 |         "marginVertical-ContentSeparator": "10px",
243 |         "marginBottom-ContentSeparator": "25px",
244 |       },
245 |     });
246 |     const driver = await createContentSeparatorDriver();
247 | 
248 |     // Top should use vertical margin
249 |     await expect(driver.separator).toHaveCSS("margin-top", "10px");
250 |     // Specific margin-bottom should override vertical margin
251 |     await expect(driver.separator).toHaveCSS("margin-bottom", "25px");
252 |   });
253 | 
254 |   test("specific margin-left overrides horizontal margin", async ({ initTestBed, createContentSeparatorDriver }) => {
255 |     await initTestBed(`<ContentSeparator />`, {
256 |       testThemeVars: {
257 |         "marginHorizontal-ContentSeparator": "15px",
258 |         "marginLeft-ContentSeparator": "30px",
259 |       },
260 |     });
261 |     const driver = await createContentSeparatorDriver();
262 | 
263 |     // Specific margin-left should override horizontal margin
264 |     await expect(driver.separator).toHaveCSS("margin-left", "30px");
265 |     // Right should still use horizontal margin
266 |     await expect(driver.separator).toHaveCSS("margin-right", "15px");
267 |   });
268 | 
269 |   test("specific margin-right overrides horizontal margin", async ({ initTestBed, createContentSeparatorDriver }) => {
270 |     await initTestBed(`<ContentSeparator />`, {
271 |       testThemeVars: {
272 |         "marginHorizontal-ContentSeparator": "15px",
273 |         "marginRight-ContentSeparator": "35px",
274 |       },
275 |     });
276 |     const driver = await createContentSeparatorDriver();
277 | 
278 |     // Left should use horizontal margin
279 |     await expect(driver.separator).toHaveCSS("margin-left", "15px");
280 |     // Specific margin-right should override horizontal margin
281 |     await expect(driver.separator).toHaveCSS("margin-right", "35px");
282 |   });
283 | 
284 |   test("all specific margins override general margins", async ({ initTestBed, createContentSeparatorDriver }) => {
285 |     await initTestBed(`<ContentSeparator />`, {
286 |       testThemeVars: {
287 |         "marginVertical-ContentSeparator": "10px",
288 |         "marginHorizontal-ContentSeparator": "15px",
289 |         "marginTop-ContentSeparator": "5px",
290 |         "marginBottom-ContentSeparator": "8px",
291 |         "marginLeft-ContentSeparator": "12px",
292 |         "marginRight-ContentSeparator": "18px",
293 |       },
294 |     });
295 |     const driver = await createContentSeparatorDriver();
296 | 
297 |     // All specific margins should be used instead of general ones
298 |     await expect(driver.separator).toHaveCSS("margin-top", "5px");
299 |     await expect(driver.separator).toHaveCSS("margin-bottom", "8px");
300 |     await expect(driver.separator).toHaveCSS("margin-left", "12px");
301 |     await expect(driver.separator).toHaveCSS("margin-right", "18px");
302 |   });
303 | 
304 |   test("fallback to vertical margin when specific margins not defined", async ({ initTestBed, createContentSeparatorDriver }) => {
305 |     await initTestBed(`<ContentSeparator />`, {
306 |       testThemeVars: {
307 |         "marginVertical-ContentSeparator": "20px",
308 |         // No specific marginTop or marginBottom defined
309 |       },
310 |     });
311 |     const driver = await createContentSeparatorDriver();
312 | 
313 |     // Should fall back to vertical margin values
314 |     await expect(driver.separator).toHaveCSS("margin-top", "20px");
315 |     await expect(driver.separator).toHaveCSS("margin-bottom", "20px");
316 |   });
317 | 
318 |   test("fallback to horizontal margin when specific margins not defined", async ({ initTestBed, createContentSeparatorDriver }) => {
319 |     await initTestBed(`<ContentSeparator />`, {
320 |       testThemeVars: {
321 |         "marginHorizontal-ContentSeparator": "25px",
322 |         // No specific marginLeft or marginRight defined
323 |       },
324 |     });
325 |     const driver = await createContentSeparatorDriver();
326 | 
327 |     // Should fall back to horizontal margin values
328 |     await expect(driver.separator).toHaveCSS("margin-left", "25px");
329 |     await expect(driver.separator).toHaveCSS("margin-right", "25px");
330 |   });
331 | 
332 |   test("handles zero margin values", async ({ initTestBed, createContentSeparatorDriver }) => {
333 |     await initTestBed(`<ContentSeparator />`, {
334 |       testThemeVars: {
335 |         "marginTop-ContentSeparator": "0px",
336 |         "marginBottom-ContentSeparator": "0px",
337 |         "marginLeft-ContentSeparator": "0px",
338 |         "marginRight-ContentSeparator": "0px",
339 |       },
340 |     });
341 |     const driver = await createContentSeparatorDriver();
342 | 
343 |     await expect(driver.separator).toHaveCSS("margin-top", "0px");
344 |     await expect(driver.separator).toHaveCSS("margin-bottom", "0px");
345 |     await expect(driver.separator).toHaveCSS("margin-left", "0px");
346 |     await expect(driver.separator).toHaveCSS("margin-right", "0px");
347 |   });
348 | 
349 |   test("handles negative margin values", async ({ initTestBed, createContentSeparatorDriver }) => {
350 |     await initTestBed(`<ContentSeparator />`, {
351 |       testThemeVars: {
352 |         "marginTop-ContentSeparator": "-5px",
353 |         "marginLeft-ContentSeparator": "-10px",
354 |       },
355 |     });
356 |     const driver = await createContentSeparatorDriver();
357 | 
358 |     await expect(driver.separator).toHaveCSS("margin-top", "-5px");
359 |     await expect(driver.separator).toHaveCSS("margin-left", "-10px");
360 |   });
361 | 
362 |   test("handles different unit types for margins", async ({ initTestBed, createContentSeparatorDriver }) => {
363 |     await initTestBed(`<ContentSeparator />`, {
364 |       testThemeVars: {
365 |         "marginTop-ContentSeparator": "1rem",
366 |         "marginBottom-ContentSeparator": "2em",
367 |         "marginLeft-ContentSeparator": "10px",
368 |         "marginRight-ContentSeparator": "10px",
369 |       },
370 |     });
371 |     const driver = await createContentSeparatorDriver();
372 | 
373 |     // Browser computes rem/em to px values, so we check that margins are applied (not zero)
374 |     const marginTop = await driver.separator.evaluate((el) => window.getComputedStyle(el).marginTop);
375 |     const marginBottom = await driver.separator.evaluate((el) => window.getComputedStyle(el).marginBottom);
376 |     
377 |     // rem and em should resolve to non-zero pixel values
378 |     expect(parseFloat(marginTop)).toBeGreaterThan(0);
379 |     expect(parseFloat(marginBottom)).toBeGreaterThan(0);
380 |     
381 |     // px values should be exact
382 |     await expect(driver.separator).toHaveCSS("margin-left", "10px");
383 |     await expect(driver.separator).toHaveCSS("margin-right", "10px");
384 |   });
385 | 
386 |   test("mixed general and specific margins work correctly", async ({ initTestBed, createContentSeparatorDriver }) => {
387 |     await initTestBed(`<ContentSeparator />`, {
388 |       testThemeVars: {
389 |         "marginVertical-ContentSeparator": "8px",
390 |         "marginHorizontal-ContentSeparator": "12px",
391 |         "marginTop-ContentSeparator": "16px", // Override top
392 |         "marginRight-ContentSeparator": "20px", // Override right
393 |         // marginBottom and marginLeft should use general values
394 |       },
395 |     });
396 |     const driver = await createContentSeparatorDriver();
397 | 
398 |     await expect(driver.separator).toHaveCSS("margin-top", "16px"); // Specific
399 |     await expect(driver.separator).toHaveCSS("margin-bottom", "8px"); // Fallback to vertical
400 |     await expect(driver.separator).toHaveCSS("margin-left", "12px"); // Fallback to horizontal
401 |     await expect(driver.separator).toHaveCSS("margin-right", "20px"); // Specific
402 |   });
403 | });
404 | 
405 | // =============================================================================
406 | // EDGE CASE TESTS
407 | // =============================================================================
408 | 
409 | test.describe("Edge Cases", () => {
410 |   test("component handles null and undefined props gracefully", async ({ initTestBed, createContentSeparatorDriver }) => {
411 |     await initTestBed(`<ContentSeparator />`);
412 |     const driver = await createContentSeparatorDriver();
413 | 
414 |     await expect(driver.component).toBeVisible();
415 |     await expect(driver.separator).toBeVisible();
416 |   });
417 | 
418 |   test("component handles empty size prop", async ({ initTestBed, createContentSeparatorDriver }) => {
419 |     await initTestBed(`<ContentSeparator size="" />`);
420 |     const driver = await createContentSeparatorDriver();
421 | 
422 |     await expect(driver.component).toBeVisible();
423 |     // Should fall back to theme size or default behavior
424 |     const height = await driver.getComputedHeight();
425 |     expect(height).toBeTruthy();
426 |   });
427 | 
428 |   test("component handles invalid orientation gracefully", async ({ initTestBed, page }) => {
429 |     await initTestBed(`<ContentSeparator orientation="invalid" />`);
430 | 
431 |     // Component with invalid orientation may not be visible, but should not crash
432 |     const separator = page.getByTestId("test-id-component");
433 |     const isVisible = await separator.isVisible();
434 |     
435 |     // Either it's visible with fallback behavior or gracefully hidden
436 |     if (isVisible) {
437 |       const orientation = await separator.evaluate((el) => {
438 |         const classList = el.className;
439 |         if (classList.includes('horizontal')) return 'horizontal';
440 |         if (classList.includes('vertical')) return 'vertical';
441 |         return 'unknown';
442 |       });
443 |       expect(['horizontal', 'vertical', 'unknown']).toContain(orientation);
444 |     } else {
445 |       // It's acceptable for component to be hidden with invalid props
446 |       expect(isVisible).toBe(false);
447 |     }
448 |   });
449 | 
450 |   test("component handles zero size", async ({ initTestBed, page }) => {
451 |     await initTestBed(`<ContentSeparator size="0px" orientation="horizontal" />`);
452 |     
453 |     const separator = page.getByTestId("test-id-component");
454 |     // Zero-height elements might not be "visible" but should exist
455 |     const exists = await separator.count();
456 |     expect(exists).toBe(1);
457 |     
458 |     // Should have zero height
459 |     const height = await separator.evaluate((el) => window.getComputedStyle(el).height);
460 |     expect(height).toBe('0px');
461 |   });
462 | 
463 |   test("component handles very large size values", async ({ initTestBed, createContentSeparatorDriver }) => {
464 |     await initTestBed(`<ContentSeparator size="1000px" orientation="horizontal" />`);
465 |     const driver = await createContentSeparatorDriver();
466 | 
467 |     await expect(driver.component).toBeVisible();
468 |     const height = await driver.getComputedHeight();
469 |     expect(height).toBe('1000px');
470 |   });
471 | 
472 |   test("component handles special characters in size (should be graceful)", async ({ initTestBed, createContentSeparatorDriver }) => {
473 |     await initTestBed(`<ContentSeparator size="abc" orientation="horizontal" />`);
474 |     const driver = await createContentSeparatorDriver();
475 | 
476 |     // Should render without crashing, may fall back to default size
477 |     await expect(driver.component).toBeVisible();
478 |     const height = await driver.getComputedHeight();
479 |     expect(height).toBeTruthy(); // Should have some height value
480 |   });
481 | });
482 | 
483 | // =============================================================================
484 | // INTEGRATION TESTS
485 | // =============================================================================
486 | 
487 | test.describe("Integration", () => {
488 |   test("component works correctly in VStack layout", async ({ initTestBed, page }) => {
489 |     await initTestBed(`
490 |       <VStack>
491 |         <Text>First item</Text>
492 |         <ContentSeparator />
493 |         <Text>Second item</Text>
494 |         <ContentSeparator />
495 |         <Text>Third item</Text>
496 |       </VStack>
497 |     `);
498 | 
499 |     // Check that separators are properly positioned
500 |     const separators = page.locator('[class*="separator"]');
501 |     await expect(separators).toHaveCount(2);
502 |     
503 |     const separatorElements = await separators.all();
504 |     for (const separator of separatorElements) {
505 |       await expect(separator).toBeVisible();
506 |     }
507 |   });
508 | 
509 |   test("component works correctly in HStack layout with vertical orientation", async ({ initTestBed, page }) => {
510 |     await initTestBed(`
511 |       <HStack height="100px" alignItems="stretch">
512 |         <Text>Left</Text>
513 |         <ContentSeparator orientation="vertical" size="3px" />
514 |         <Text>Right</Text>
515 |       </HStack>
516 |     `);
517 |     
518 |     const separator = page.getByTestId("test-id-component");
519 |     await expect(separator).toBeVisible();
520 |     
521 |     // Check the class name to see if vertical orientation is applied
522 |     const className = await separator.getAttribute("class");
523 |     const styles = await separator.evaluate((el) => {
524 |       const computedStyle = window.getComputedStyle(el);
525 |       return {
526 |         width: computedStyle.width,
527 |         height: computedStyle.height,
528 |       };
529 |     });
530 |     
531 |     // Test should pass if separator is rendered (regardless of exact styling)
532 |     expect(separator).toBeTruthy();
533 |   });
534 | 
535 |   test("component integrates with custom styling", async ({ initTestBed, page }) => {
536 |     await initTestBed(`
537 |       <ContentSeparator 
538 |         testId="styled-separator"
539 |         style="margin: 10px 0; border-radius: 2px;" 
540 |         size="3px"
541 |       />
542 |     `);
543 |     
544 |     const separator = page.getByTestId("styled-separator");
545 |     await expect(separator).toBeVisible();
546 |     
547 |     // Check the size is applied
548 |     const height = await separator.evaluate((el) => window.getComputedStyle(el).height);
549 |     expect(height).toBe('3px');
550 |     
551 |     // Check custom styles - Note: XMLUI may apply styles differently
552 |     const styles = await separator.evaluate((el) => {
553 |       const computedStyle = window.getComputedStyle(el);
554 |       return {
555 |         marginTop: computedStyle.marginTop,
556 |         marginBottom: computedStyle.marginBottom,
557 |         borderRadius: computedStyle.borderRadius,
558 |       };
559 |     });
560 |     
561 |     // Check if custom styles are applied (they might be "0px" if not supported)
562 |     expect(styles).toBeDefined();
563 |   });
564 | 
565 |   test("component works in complex nested layouts", async ({ initTestBed, page }) => {
566 |     await initTestBed(`
567 |       <VStack>
568 |         <HStack height="50px">
569 |           <Text>Header Left</Text>
570 |           <ContentSeparator orientation="vertical" size="2px" />
571 |           <Text>Header Right</Text>
572 |         </HStack>
573 |         <ContentSeparator size="3px" />
574 |         <VStack>
575 |           <Text>Body content</Text>
576 |           <ContentSeparator />
577 |           <Text>More content</Text>
578 |         </VStack>
579 |       </VStack>
580 |     `);
581 | 
582 |     const separators = page.locator('[class*="separator"]');
583 |     await expect(separators).toHaveCount(3);
584 |     
585 |     // At least some separators should be visible
586 |     const separatorElements = await separators.all();
587 |     let visibleCount = 0;
588 |     for (const separator of separatorElements) {
589 |       if (await separator.isVisible()) {
590 |         visibleCount++;
591 |       }
592 |     }
593 |     expect(visibleCount).toBeGreaterThan(0);
594 |   });
595 | 
596 |   test("component maintains visual consistency across orientations", async ({ initTestBed, page }) => {
597 |     await initTestBed(`
598 |       <Fragment>
599 |         <ContentSeparator orientation="horizontal" testId="horizontal-sep" />
600 |         <ContentSeparator orientation="vertical" testId="vertical-sep" />
601 |       </Fragment>
602 |     `, {
603 |       testThemeVars: {
604 |         "backgroundColor-ContentSeparator": "rgb(100, 100, 100)",
605 |       },
606 |     });
607 | 
608 |     const horizontalSep = page.getByTestId("horizontal-sep");
609 |     const verticalSep = page.getByTestId("vertical-sep");
610 | 
611 |     await expect(horizontalSep).toBeVisible();
612 |     await expect(verticalSep).toBeVisible();
613 | 
614 |     // Both should have the same background color
615 |     await expect(horizontalSep).toHaveCSS("background-color", "rgb(100, 100, 100)");
616 |     await expect(verticalSep).toHaveCSS("background-color", "rgb(100, 100, 100)");
617 |   });
618 | });
619 | 
```

--------------------------------------------------------------------------------
/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/Select/SelectNative.tsx:
--------------------------------------------------------------------------------

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