This is page 131 of 179. Use http://codebase.md/xmlui-org/xmlui/tools/vscode/resources/xmlui-markup-syntax-highlighting.png?lines=true&page={x} to view the full context. # Directory Structure ``` ├── .changeset │ ├── cold-items-taste.md │ ├── config.json │ ├── empty-spiders-dress.md │ ├── shy-windows-allow.md │ ├── sour-coins-read.md │ ├── tame-zebras-invite.md │ ├── three-ideas-invent.md │ ├── twenty-jeans-watch.md │ ├── warm-spies-melt.md │ └── whole-ways-cry.md ├── .eslintrc.cjs ├── .github │ ├── build-checklist.png │ ├── ISSUE_TEMPLATE │ │ ├── bug_report.md │ │ └── feature_request.md │ └── workflows │ ├── deploy-docs-optimized.yml │ ├── deploy-docs.yml │ ├── prepare-versions.yml │ ├── release-packages.yml │ ├── run-all-tests.yml │ └── run-smoke-tests.yml ├── .gitignore ├── .prettierrc.js ├── .vscode │ ├── launch.json │ └── settings.json ├── blog │ ├── .gitignore │ ├── .gitkeep │ ├── CHANGELOG.md │ ├── extensions.ts │ ├── index.html │ ├── index.ts │ ├── package.json │ ├── public │ │ ├── blog │ │ │ ├── images │ │ │ │ ├── blog-page-component.png │ │ │ │ ├── blog-scrabble.png │ │ │ │ ├── integrated-blog-search.png │ │ │ │ └── lorem-ipsum.png │ │ │ ├── lorem-ipsum.md │ │ │ ├── newest-post.md │ │ │ ├── older-post.md │ │ │ └── welcome-to-the-xmlui-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 │ │ │ └── xmlui-logo.svg │ │ ├── serve.json │ │ └── web.config │ ├── scripts │ │ ├── download-latest-xmlui.js │ │ ├── generate-rss.js │ │ ├── get-releases.js │ │ └── utils.js │ ├── src │ │ ├── components │ │ │ ├── BlogOverview.xmlui │ │ │ ├── BlogPage.xmlui │ │ │ └── PageNotFound.xmlui │ │ ├── config.ts │ │ ├── Main.xmlui │ │ └── themes │ │ ├── docs-theme.ts │ │ ├── earthtone.ts │ │ ├── xmlui-gray-on-default.ts │ │ ├── xmlui-green-on-default.ts │ │ └── xmlui-orange-on-default.ts │ └── tsconfig.json ├── CONTRIBUTING.md ├── docs │ ├── .gitignore │ ├── CHANGELOG.md │ ├── ComponentRefLinks.txt │ ├── content │ │ ├── _meta.json │ │ ├── components │ │ │ ├── _meta.json │ │ │ ├── _overview.md │ │ │ ├── APICall.md │ │ │ ├── App.md │ │ │ ├── AppHeader.md │ │ │ ├── AppState.md │ │ │ ├── AutoComplete.md │ │ │ ├── Avatar.md │ │ │ ├── Backdrop.md │ │ │ ├── Badge.md │ │ │ ├── BarChart.md │ │ │ ├── Bookmark.md │ │ │ ├── Breakout.md │ │ │ ├── Button.md │ │ │ ├── Card.md │ │ │ ├── Carousel.md │ │ │ ├── ChangeListener.md │ │ │ ├── Checkbox.md │ │ │ ├── CHStack.md │ │ │ ├── ColorPicker.md │ │ │ ├── Column.md │ │ │ ├── ContentSeparator.md │ │ │ ├── CVStack.md │ │ │ ├── DataSource.md │ │ │ ├── DateInput.md │ │ │ ├── DatePicker.md │ │ │ ├── DonutChart.md │ │ │ ├── DropdownMenu.md │ │ │ ├── EmojiSelector.md │ │ │ ├── ExpandableItem.md │ │ │ ├── FileInput.md │ │ │ ├── FileUploadDropZone.md │ │ │ ├── FlowLayout.md │ │ │ ├── Footer.md │ │ │ ├── Form.md │ │ │ ├── FormItem.md │ │ │ ├── FormSection.md │ │ │ ├── Fragment.md │ │ │ ├── H1.md │ │ │ ├── H2.md │ │ │ ├── H3.md │ │ │ ├── H4.md │ │ │ ├── H5.md │ │ │ ├── H6.md │ │ │ ├── Heading.md │ │ │ ├── HSplitter.md │ │ │ ├── HStack.md │ │ │ ├── Icon.md │ │ │ ├── IFrame.md │ │ │ ├── Image.md │ │ │ ├── Items.md │ │ │ ├── LabelList.md │ │ │ ├── Legend.md │ │ │ ├── LineChart.md │ │ │ ├── Link.md │ │ │ ├── List.md │ │ │ ├── Logo.md │ │ │ ├── Markdown.md │ │ │ ├── MenuItem.md │ │ │ ├── MenuSeparator.md │ │ │ ├── ModalDialog.md │ │ │ ├── NavGroup.md │ │ │ ├── NavLink.md │ │ │ ├── NavPanel.md │ │ │ ├── NoResult.md │ │ │ ├── NumberBox.md │ │ │ ├── Option.md │ │ │ ├── Page.md │ │ │ ├── PageMetaTitle.md │ │ │ ├── Pages.md │ │ │ ├── Pagination.md │ │ │ ├── PasswordInput.md │ │ │ ├── PieChart.md │ │ │ ├── ProgressBar.md │ │ │ ├── Queue.md │ │ │ ├── RadioGroup.md │ │ │ ├── RealTimeAdapter.md │ │ │ ├── Redirect.md │ │ │ ├── Select.md │ │ │ ├── Slider.md │ │ │ ├── Slot.md │ │ │ ├── SpaceFiller.md │ │ │ ├── Spinner.md │ │ │ ├── Splitter.md │ │ │ ├── Stack.md │ │ │ ├── StickyBox.md │ │ │ ├── SubMenuItem.md │ │ │ ├── Switch.md │ │ │ ├── TabItem.md │ │ │ ├── Table.md │ │ │ ├── TableOfContents.md │ │ │ ├── Tabs.md │ │ │ ├── Text.md │ │ │ ├── TextArea.md │ │ │ ├── TextBox.md │ │ │ ├── Theme.md │ │ │ ├── TimeInput.md │ │ │ ├── Timer.md │ │ │ ├── ToneChangerButton.md │ │ │ ├── ToneSwitch.md │ │ │ ├── Tooltip.md │ │ │ ├── Tree.md │ │ │ ├── VSplitter.md │ │ │ ├── VStack.md │ │ │ ├── xmlui-animations │ │ │ │ ├── _meta.json │ │ │ │ ├── _overview.md │ │ │ │ ├── Animation.md │ │ │ │ ├── FadeAnimation.md │ │ │ │ ├── FadeInAnimation.md │ │ │ │ ├── FadeOutAnimation.md │ │ │ │ ├── ScaleAnimation.md │ │ │ │ └── SlideInAnimation.md │ │ │ ├── xmlui-pdf │ │ │ │ ├── _meta.json │ │ │ │ ├── _overview.md │ │ │ │ └── Pdf.md │ │ │ ├── xmlui-spreadsheet │ │ │ │ ├── _meta.json │ │ │ │ ├── _overview.md │ │ │ │ └── Spreadsheet.md │ │ │ └── xmlui-website-blocks │ │ │ ├── _meta.json │ │ │ ├── _overview.md │ │ │ ├── Carousel.md │ │ │ ├── HelloMd.md │ │ │ ├── HeroSection.md │ │ │ └── ScrollToTop.md │ │ └── extensions │ │ ├── _meta.json │ │ ├── xmlui-animations │ │ │ ├── _meta.json │ │ │ ├── _overview.md │ │ │ ├── Animation.md │ │ │ ├── FadeAnimation.md │ │ │ ├── FadeInAnimation.md │ │ │ ├── FadeOutAnimation.md │ │ │ ├── ScaleAnimation.md │ │ │ └── SlideInAnimation.md │ │ └── xmlui-website-blocks │ │ ├── _meta.json │ │ ├── _overview.md │ │ ├── Carousel.md │ │ ├── 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 │ │ │ │ ├── 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 │ │ │ │ ├── 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 │ ├── 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 │ │ └── tsconfig.json │ ├── 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 │ │ ├── tsconfig.json │ │ └── 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 │ │ └── tsconfig.json │ ├── 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 │ │ └── tsconfig.json │ ├── 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 │ │ └── tsconfig.json │ ├── xmlui-playground │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── demo │ │ │ └── Main.xmlui │ │ ├── index.html │ │ ├── index.ts │ │ ├── meta │ │ │ └── componentsMetadata.ts │ │ ├── package.json │ │ ├── src │ │ │ ├── hooks │ │ │ │ ├── usePlayground.ts │ │ │ │ └── useToast.ts │ │ │ ├── index.tsx │ │ │ ├── playground │ │ │ │ ├── Box.module.scss │ │ │ │ ├── Box.tsx │ │ │ │ ├── CodeSelector.tsx │ │ │ │ ├── ConfirmationDialog.module.scss │ │ │ │ ├── ConfirmationDialog.tsx │ │ │ │ ├── Editor.tsx │ │ │ │ ├── Header.module.scss │ │ │ │ ├── Header.tsx │ │ │ │ ├── Playground.tsx │ │ │ │ ├── PlaygroundContent.module.scss │ │ │ │ ├── PlaygroundContent.tsx │ │ │ │ ├── PlaygroundNative.module.scss │ │ │ │ ├── PlaygroundNative.tsx │ │ │ │ ├── Preview.module.scss │ │ │ │ ├── Preview.tsx │ │ │ │ ├── Select.module.scss │ │ │ │ ├── StandalonePlayground.tsx │ │ │ │ ├── StandalonePlaygroundNative.module.scss │ │ │ │ ├── StandalonePlaygroundNative.tsx │ │ │ │ ├── ThemeSwitcher.module.scss │ │ │ │ ├── ThemeSwitcher.tsx │ │ │ │ ├── ToneSwitcher.tsx │ │ │ │ ├── Tooltip.module.scss │ │ │ │ ├── Tooltip.tsx │ │ │ │ └── utils.ts │ │ │ ├── providers │ │ │ │ ├── Toast.module.scss │ │ │ │ └── ToastProvider.tsx │ │ │ ├── state │ │ │ │ └── store.ts │ │ │ ├── themes │ │ │ │ └── theme.ts │ │ │ └── utils │ │ │ └── helpers.ts │ │ └── tsconfig.json │ ├── 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 │ │ └── tsconfig.json │ ├── xmlui-spreadsheet │ │ ├── .gitignore │ │ ├── demo │ │ │ └── Main.xmlui │ │ ├── index.html │ │ ├── index.ts │ │ ├── meta │ │ │ └── componentsMetadata.ts │ │ ├── package.json │ │ ├── src │ │ │ ├── index.tsx │ │ │ ├── Spreadsheet.tsx │ │ │ └── SpreadsheetNative.tsx │ │ └── tsconfig.json │ └── 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.tsx │ │ │ └── HeroSectionNative.tsx │ │ ├── index.tsx │ │ ├── ScrollToTop │ │ │ ├── ScrollToTop.module.scss │ │ │ ├── ScrollToTop.tsx │ │ │ └── ScrollToTopNative.tsx │ │ └── vite-env.d.ts │ └── tsconfig.json ├── 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.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 │ ├── actions.md │ ├── AppRoot.md │ ├── component-apis.md │ ├── component-rendering.md │ ├── component-review-checklist.md │ ├── containers.md │ ├── data-sources.md │ ├── e2e-summary.md │ ├── expression-evaluation.md │ ├── glossary.md │ ├── helper-components.md │ ├── index.md │ ├── loaders.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 │ ├── rendering-fundamentals.md │ ├── reusable-components.md │ ├── standalone-apps.md │ ├── state-management.md │ └── xmlui-extensibility.xlsx ├── package.json ├── playwright.config.ts ├── scripts │ ├── coverage-only.js │ ├── e2e-test-summary.js │ ├── generate-docs │ │ ├── build-downloads-map.mjs │ │ ├── build-pages-map.mjs │ │ ├── components-config.json │ │ ├── configuration-management.mjs │ │ ├── constants.mjs │ │ ├── create-theme-files.mjs │ │ ├── DocsGenerator.mjs │ │ ├── error-handling.mjs │ │ ├── extensions-config.json │ │ ├── folders.mjs │ │ ├── generate-summary-files.mjs │ │ ├── get-docs.mjs │ │ ├── input-handler.mjs │ │ ├── logger.mjs │ │ ├── logging-standards.mjs │ │ ├── MetadataProcessor.mjs │ │ ├── pattern-utilities.mjs │ │ └── utils.mjs │ ├── get-langserver-metadata.mjs │ ├── inline-links.mjs │ └── README-e2e-summary.md ├── src │ ├── abstractions │ │ ├── _conventions.md │ │ ├── ActionDefs.ts │ │ ├── AppContextDefs.ts │ │ ├── ComponentDefs.ts │ │ ├── ContainerDefs.ts │ │ ├── ExtensionDefs.ts │ │ ├── FunctionDefs.ts │ │ ├── RendererDefs.ts │ │ ├── scripting │ │ │ ├── BlockScope.ts │ │ │ ├── Compilation.ts │ │ │ ├── LogicalThread.ts │ │ │ ├── LoopScope.ts │ │ │ ├── modules.ts │ │ │ ├── ScriptParserError.ts │ │ │ ├── Token.ts │ │ │ ├── TryScope.ts │ │ │ └── TryScopeExp.ts │ │ └── ThemingDefs.ts │ ├── components │ │ ├── _conventions.md │ │ ├── abstractions.ts │ │ ├── Accordion │ │ │ ├── Accordion.md │ │ │ ├── Accordion.module.scss │ │ │ ├── Accordion.spec.ts │ │ │ ├── Accordion.tsx │ │ │ ├── AccordionContext.tsx │ │ │ ├── AccordionItem.tsx │ │ │ ├── AccordionItemNative.tsx │ │ │ └── AccordionNative.tsx │ │ ├── Animation │ │ │ └── AnimationNative.tsx │ │ ├── APICall │ │ │ ├── APICall.md │ │ │ ├── APICall.spec.ts │ │ │ ├── APICall.tsx │ │ │ └── APICallNative.tsx │ │ ├── App │ │ │ ├── App.md │ │ │ ├── App.module.scss │ │ │ ├── App.spec.ts │ │ │ ├── App.tsx │ │ │ ├── AppLayoutContext.ts │ │ │ ├── AppNative.tsx │ │ │ ├── AppStateContext.ts │ │ │ ├── doc-resources │ │ │ │ ├── condensed-sticky.xmlui │ │ │ │ ├── condensed.xmlui │ │ │ │ ├── horizontal-sticky.xmlui │ │ │ │ ├── horizontal.xmlui │ │ │ │ ├── vertical-full-header.xmlui │ │ │ │ ├── vertical-sticky.xmlui │ │ │ │ └── vertical.xmlui │ │ │ ├── IndexerContext.ts │ │ │ ├── LinkInfoContext.ts │ │ │ ├── SearchContext.tsx │ │ │ ├── Sheet.module.scss │ │ │ └── Sheet.tsx │ │ ├── AppHeader │ │ │ ├── AppHeader.md │ │ │ ├── AppHeader.module.scss │ │ │ ├── AppHeader.spec.ts │ │ │ ├── AppHeader.tsx │ │ │ └── AppHeaderNative.tsx │ │ ├── AppState │ │ │ ├── AppState.md │ │ │ ├── AppState.spec.ts │ │ │ ├── AppState.tsx │ │ │ └── AppStateNative.tsx │ │ ├── AutoComplete │ │ │ ├── AutoComplete.md │ │ │ ├── AutoComplete.module.scss │ │ │ ├── AutoComplete.spec.ts │ │ │ ├── AutoComplete.tsx │ │ │ ├── AutoCompleteContext.tsx │ │ │ └── AutoCompleteNative.tsx │ │ ├── Avatar │ │ │ ├── Avatar.md │ │ │ ├── Avatar.module.scss │ │ │ ├── Avatar.spec.ts │ │ │ ├── Avatar.tsx │ │ │ └── AvatarNative.tsx │ │ ├── Backdrop │ │ │ ├── Backdrop.md │ │ │ ├── Backdrop.module.scss │ │ │ ├── Backdrop.spec.ts │ │ │ ├── Backdrop.tsx │ │ │ └── BackdropNative.tsx │ │ ├── Badge │ │ │ ├── Badge.md │ │ │ ├── Badge.module.scss │ │ │ ├── Badge.spec.ts │ │ │ ├── Badge.tsx │ │ │ └── BadgeNative.tsx │ │ ├── Bookmark │ │ │ ├── Bookmark.md │ │ │ ├── Bookmark.module.scss │ │ │ ├── Bookmark.spec.ts │ │ │ ├── Bookmark.tsx │ │ │ └── BookmarkNative.tsx │ │ ├── Breakout │ │ │ ├── Breakout.module.scss │ │ │ ├── Breakout.spec.ts │ │ │ ├── Breakout.tsx │ │ │ └── BreakoutNative.tsx │ │ ├── Button │ │ │ ├── Button-style.spec.ts │ │ │ ├── Button.md │ │ │ ├── Button.module.scss │ │ │ ├── Button.spec.ts │ │ │ ├── Button.tsx │ │ │ └── ButtonNative.tsx │ │ ├── Card │ │ │ ├── Card.md │ │ │ ├── Card.module.scss │ │ │ ├── Card.spec.ts │ │ │ ├── Card.tsx │ │ │ └── CardNative.tsx │ │ ├── Carousel │ │ │ ├── Carousel.md │ │ │ ├── Carousel.module.scss │ │ │ ├── Carousel.spec.ts │ │ │ ├── Carousel.tsx │ │ │ ├── CarouselContext.tsx │ │ │ ├── CarouselItem.tsx │ │ │ ├── CarouselItemNative.tsx │ │ │ └── CarouselNative.tsx │ │ ├── ChangeListener │ │ │ ├── ChangeListener.md │ │ │ ├── ChangeListener.spec.ts │ │ │ ├── ChangeListener.tsx │ │ │ └── ChangeListenerNative.tsx │ │ ├── chart-color-schemes.ts │ │ ├── Charts │ │ │ ├── AreaChart │ │ │ │ ├── AreaChart.md │ │ │ │ ├── AreaChart.spec.ts │ │ │ │ ├── AreaChart.tsx │ │ │ │ └── AreaChartNative.tsx │ │ │ ├── BarChart │ │ │ │ ├── BarChart.md │ │ │ │ ├── BarChart.module.scss │ │ │ │ ├── BarChart.spec.ts │ │ │ │ ├── BarChart.tsx │ │ │ │ └── BarChartNative.tsx │ │ │ ├── DonutChart │ │ │ │ ├── DonutChart.spec.ts │ │ │ │ └── DonutChart.tsx │ │ │ ├── LabelList │ │ │ │ ├── LabelList.spec.ts │ │ │ │ ├── LabelList.tsx │ │ │ │ ├── LabelListNative.module.scss │ │ │ │ └── LabelListNative.tsx │ │ │ ├── Legend │ │ │ │ ├── Legend.spec.ts │ │ │ │ ├── Legend.tsx │ │ │ │ └── LegendNative.tsx │ │ │ ├── LineChart │ │ │ │ ├── LineChart.md │ │ │ │ ├── LineChart.module.scss │ │ │ │ ├── LineChart.spec.ts │ │ │ │ ├── LineChart.tsx │ │ │ │ └── LineChartNative.tsx │ │ │ ├── PieChart │ │ │ │ ├── PieChart.md │ │ │ │ ├── PieChart.spec.ts │ │ │ │ ├── PieChart.tsx │ │ │ │ ├── PieChartNative.module.scss │ │ │ │ └── PieChartNative.tsx │ │ │ ├── RadarChart │ │ │ │ ├── RadarChart.md │ │ │ │ ├── RadarChart.spec.ts │ │ │ │ ├── RadarChart.tsx │ │ │ │ └── RadarChartNative.tsx │ │ │ ├── Tooltip │ │ │ │ ├── TooltipContent.module.scss │ │ │ │ ├── TooltipContent.spec.ts │ │ │ │ └── TooltipContent.tsx │ │ │ └── utils │ │ │ ├── abstractions.ts │ │ │ └── ChartProvider.tsx │ │ ├── Checkbox │ │ │ ├── Checkbox.md │ │ │ ├── Checkbox.spec.ts │ │ │ └── Checkbox.tsx │ │ ├── CodeBlock │ │ │ ├── CodeBlock.module.scss │ │ │ ├── CodeBlock.spec.ts │ │ │ ├── CodeBlock.tsx │ │ │ ├── CodeBlockNative.tsx │ │ │ └── highlight-code.ts │ │ ├── collectedComponentMetadata.ts │ │ ├── ColorPicker │ │ │ ├── ColorPicker.md │ │ │ ├── ColorPicker.module.scss │ │ │ ├── ColorPicker.spec.ts │ │ │ ├── ColorPicker.tsx │ │ │ └── ColorPickerNative.tsx │ │ ├── Column │ │ │ ├── Column.md │ │ │ ├── Column.tsx │ │ │ ├── ColumnNative.tsx │ │ │ ├── doc-resources │ │ │ │ └── list-component-data.js │ │ │ └── TableContext.tsx │ │ ├── component-utils.ts │ │ ├── ComponentProvider.tsx │ │ ├── ComponentRegistryContext.tsx │ │ ├── container-helpers.tsx │ │ ├── ContentSeparator │ │ │ ├── ContentSeparator.md │ │ │ ├── ContentSeparator.module.scss │ │ │ ├── ContentSeparator.spec.ts │ │ │ ├── ContentSeparator.tsx │ │ │ └── ContentSeparatorNative.tsx │ │ ├── DataSource │ │ │ ├── DataSource.md │ │ │ └── DataSource.tsx │ │ ├── DateInput │ │ │ ├── DateInput.md │ │ │ ├── DateInput.module.scss │ │ │ ├── DateInput.spec.ts │ │ │ ├── DateInput.tsx │ │ │ └── DateInputNative.tsx │ │ ├── DatePicker │ │ │ ├── DatePicker.md │ │ │ ├── DatePicker.module.scss │ │ │ ├── DatePicker.spec.ts │ │ │ ├── DatePicker.tsx │ │ │ └── DatePickerNative.tsx │ │ ├── DropdownMenu │ │ │ ├── DropdownMenu.md │ │ │ ├── DropdownMenu.module.scss │ │ │ ├── DropdownMenu.spec.ts │ │ │ ├── DropdownMenu.tsx │ │ │ ├── DropdownMenuNative.tsx │ │ │ ├── MenuItem.md │ │ │ └── SubMenuItem.md │ │ ├── EmojiSelector │ │ │ ├── EmojiSelector.md │ │ │ ├── EmojiSelector.spec.ts │ │ │ ├── EmojiSelector.tsx │ │ │ └── EmojiSelectorNative.tsx │ │ ├── ExpandableItem │ │ │ ├── ExpandableItem.module.scss │ │ │ ├── ExpandableItem.spec.ts │ │ │ ├── ExpandableItem.tsx │ │ │ └── ExpandableItemNative.tsx │ │ ├── FileInput │ │ │ ├── FileInput.md │ │ │ ├── FileInput.module.scss │ │ │ ├── FileInput.spec.ts │ │ │ ├── FileInput.tsx │ │ │ └── FileInputNative.tsx │ │ ├── FileUploadDropZone │ │ │ ├── FileUploadDropZone.md │ │ │ ├── FileUploadDropZone.module.scss │ │ │ ├── FileUploadDropZone.spec.ts │ │ │ ├── FileUploadDropZone.tsx │ │ │ └── FileUploadDropZoneNative.tsx │ │ ├── FlowLayout │ │ │ ├── FlowLayout.md │ │ │ ├── FlowLayout.module.scss │ │ │ ├── FlowLayout.spec.ts │ │ │ ├── FlowLayout.spec.ts-snapshots │ │ │ │ └── Edge-cases-boxShadow-is-not-clipped-1-non-smoke-darwin.png │ │ │ ├── FlowLayout.tsx │ │ │ └── FlowLayoutNative.tsx │ │ ├── Footer │ │ │ ├── Footer.md │ │ │ ├── Footer.module.scss │ │ │ ├── Footer.spec.ts │ │ │ ├── Footer.tsx │ │ │ └── FooterNative.tsx │ │ ├── Form │ │ │ ├── Form.md │ │ │ ├── Form.module.scss │ │ │ ├── Form.spec.ts │ │ │ ├── Form.tsx │ │ │ ├── formActions.ts │ │ │ ├── FormContext.ts │ │ │ └── FormNative.tsx │ │ ├── FormItem │ │ │ ├── FormItem.md │ │ │ ├── FormItem.module.scss │ │ │ ├── FormItem.spec.ts │ │ │ ├── FormItem.tsx │ │ │ ├── FormItemNative.tsx │ │ │ ├── HelperText.module.scss │ │ │ ├── HelperText.tsx │ │ │ ├── ItemWithLabel.tsx │ │ │ └── Validations.ts │ │ ├── FormSection │ │ │ ├── FormSection.md │ │ │ ├── FormSection.ts │ │ │ └── FormSection.xmlui │ │ ├── Fragment │ │ │ ├── Fragment.spec.ts │ │ │ └── Fragment.tsx │ │ ├── Heading │ │ │ ├── abstractions.ts │ │ │ ├── H1.md │ │ │ ├── H1.spec.ts │ │ │ ├── H2.md │ │ │ ├── H2.spec.ts │ │ │ ├── H3.md │ │ │ ├── H3.spec.ts │ │ │ ├── H4.md │ │ │ ├── H4.spec.ts │ │ │ ├── H5.md │ │ │ ├── H5.spec.ts │ │ │ ├── H6.md │ │ │ ├── H6.spec.ts │ │ │ ├── Heading.md │ │ │ ├── Heading.module.scss │ │ │ ├── Heading.spec.ts │ │ │ ├── Heading.tsx │ │ │ └── HeadingNative.tsx │ │ ├── HoverCard │ │ │ ├── HoverCard.tsx │ │ │ └── HovercardNative.tsx │ │ ├── HtmlTags │ │ │ ├── HtmlTags.module.scss │ │ │ ├── HtmlTags.spec.ts │ │ │ └── HtmlTags.tsx │ │ ├── Icon │ │ │ ├── AdmonitionDanger.tsx │ │ │ ├── AdmonitionInfo.tsx │ │ │ ├── AdmonitionNote.tsx │ │ │ ├── AdmonitionTip.tsx │ │ │ ├── AdmonitionWarning.tsx │ │ │ ├── ApiIcon.tsx │ │ │ ├── ArrowDropDown.module.scss │ │ │ ├── ArrowDropDown.tsx │ │ │ ├── ArrowDropUp.module.scss │ │ │ ├── ArrowDropUp.tsx │ │ │ ├── ArrowLeft.module.scss │ │ │ ├── ArrowLeft.tsx │ │ │ ├── ArrowRight.module.scss │ │ │ ├── ArrowRight.tsx │ │ │ ├── Attach.tsx │ │ │ ├── Binding.module.scss │ │ │ ├── Binding.tsx │ │ │ ├── BoardIcon.tsx │ │ │ ├── BoxIcon.tsx │ │ │ ├── CheckIcon.tsx │ │ │ ├── ChevronDownIcon.tsx │ │ │ ├── ChevronLeft.tsx │ │ │ ├── ChevronRight.tsx │ │ │ ├── ChevronUpIcon.tsx │ │ │ ├── CodeFileIcon.tsx │ │ │ ├── CodeSandbox.tsx │ │ │ ├── CompactListIcon.tsx │ │ │ ├── ContentCopyIcon.tsx │ │ │ ├── DarkToLightIcon.tsx │ │ │ ├── DatabaseIcon.module.scss │ │ │ ├── DatabaseIcon.tsx │ │ │ ├── DocFileIcon.tsx │ │ │ ├── DocIcon.tsx │ │ │ ├── DotMenuHorizontalIcon.tsx │ │ │ ├── DotMenuIcon.tsx │ │ │ ├── EmailIcon.tsx │ │ │ ├── EmptyFolderIcon.tsx │ │ │ ├── ErrorIcon.tsx │ │ │ ├── ExpressionIcon.tsx │ │ │ ├── FillPlusCricleIcon.tsx │ │ │ ├── FilterIcon.tsx │ │ │ ├── FolderIcon.tsx │ │ │ ├── GlobeIcon.tsx │ │ │ ├── HomeIcon.tsx │ │ │ ├── HyperLinkIcon.tsx │ │ │ ├── Icon.md │ │ │ ├── Icon.module.scss │ │ │ ├── Icon.spec.ts │ │ │ ├── Icon.tsx │ │ │ ├── IconNative.tsx │ │ │ ├── ImageFileIcon.tsx │ │ │ ├── Inspect.tsx │ │ │ ├── LightToDark.tsx │ │ │ ├── LinkIcon.tsx │ │ │ ├── ListIcon.tsx │ │ │ ├── LooseListIcon.tsx │ │ │ ├── MoonIcon.tsx │ │ │ ├── MoreOptionsIcon.tsx │ │ │ ├── NoSortIcon.tsx │ │ │ ├── PDFIcon.tsx │ │ │ ├── PenIcon.tsx │ │ │ ├── PhoneIcon.tsx │ │ │ ├── PhotoIcon.tsx │ │ │ ├── PlusIcon.tsx │ │ │ ├── SearchIcon.tsx │ │ │ ├── ShareIcon.tsx │ │ │ ├── SortAscendingIcon.tsx │ │ │ ├── SortDescendingIcon.tsx │ │ │ ├── StarsIcon.tsx │ │ │ ├── SunIcon.tsx │ │ │ ├── svg │ │ │ │ ├── admonition_danger.svg │ │ │ │ ├── admonition_info.svg │ │ │ │ ├── admonition_note.svg │ │ │ │ ├── admonition_tip.svg │ │ │ │ ├── admonition_warning.svg │ │ │ │ ├── api.svg │ │ │ │ ├── arrow-dropdown.svg │ │ │ │ ├── arrow-left.svg │ │ │ │ ├── arrow-right.svg │ │ │ │ ├── arrow-up.svg │ │ │ │ ├── attach.svg │ │ │ │ ├── binding.svg │ │ │ │ ├── box.svg │ │ │ │ ├── bulb.svg │ │ │ │ ├── code-file.svg │ │ │ │ ├── code-sandbox.svg │ │ │ │ ├── dark_to_light.svg │ │ │ │ ├── database.svg │ │ │ │ ├── doc.svg │ │ │ │ ├── empty-folder.svg │ │ │ │ ├── expression.svg │ │ │ │ ├── eye-closed.svg │ │ │ │ ├── eye-dark.svg │ │ │ │ ├── eye.svg │ │ │ │ ├── file-text.svg │ │ │ │ ├── filter.svg │ │ │ │ ├── folder.svg │ │ │ │ ├── img.svg │ │ │ │ ├── inspect.svg │ │ │ │ ├── light_to_dark.svg │ │ │ │ ├── moon.svg │ │ │ │ ├── pdf.svg │ │ │ │ ├── photo.svg │ │ │ │ ├── share.svg │ │ │ │ ├── stars.svg │ │ │ │ ├── sun.svg │ │ │ │ ├── trending-down.svg │ │ │ │ ├── trending-level.svg │ │ │ │ ├── trending-up.svg │ │ │ │ ├── txt.svg │ │ │ │ ├── unknown-file.svg │ │ │ │ ├── unlink.svg │ │ │ │ └── xls.svg │ │ │ ├── TableDeleteColumnIcon.tsx │ │ │ ├── TableDeleteRowIcon.tsx │ │ │ ├── TableInsertColumnIcon.tsx │ │ │ ├── TableInsertRowIcon.tsx │ │ │ ├── TrashIcon.tsx │ │ │ ├── TrendingDownIcon.tsx │ │ │ ├── TrendingLevelIcon.tsx │ │ │ ├── TrendingUpIcon.tsx │ │ │ ├── TxtIcon.tsx │ │ │ ├── UnknownFileIcon.tsx │ │ │ ├── UnlinkIcon.tsx │ │ │ ├── UserIcon.tsx │ │ │ ├── WarningIcon.tsx │ │ │ └── XlsIcon.tsx │ │ ├── IconProvider.tsx │ │ ├── IconRegistryContext.tsx │ │ ├── IFrame │ │ │ ├── IFrame.md │ │ │ ├── IFrame.module.scss │ │ │ ├── IFrame.spec.ts │ │ │ ├── IFrame.tsx │ │ │ └── IFrameNative.tsx │ │ ├── Image │ │ │ ├── Image.md │ │ │ ├── Image.module.scss │ │ │ ├── Image.spec.ts │ │ │ ├── Image.tsx │ │ │ └── ImageNative.tsx │ │ ├── Input │ │ │ ├── index.ts │ │ │ ├── InputAdornment.module.scss │ │ │ ├── InputAdornment.tsx │ │ │ ├── InputDivider.module.scss │ │ │ ├── InputDivider.tsx │ │ │ ├── InputLabel.module.scss │ │ │ ├── InputLabel.tsx │ │ │ ├── PartialInput.module.scss │ │ │ └── PartialInput.tsx │ │ ├── InspectButton │ │ │ ├── InspectButton.module.scss │ │ │ └── InspectButton.tsx │ │ ├── Items │ │ │ ├── Items.md │ │ │ ├── Items.spec.ts │ │ │ ├── Items.tsx │ │ │ └── ItemsNative.tsx │ │ ├── Link │ │ │ ├── Link.md │ │ │ ├── Link.module.scss │ │ │ ├── Link.spec.ts │ │ │ ├── Link.tsx │ │ │ └── LinkNative.tsx │ │ ├── List │ │ │ ├── doc-resources │ │ │ │ └── list-component-data.js │ │ │ ├── List.md │ │ │ ├── List.module.scss │ │ │ ├── List.spec.ts │ │ │ ├── List.tsx │ │ │ └── ListNative.tsx │ │ ├── Logo │ │ │ ├── doc-resources │ │ │ │ └── xmlui-logo.svg │ │ │ ├── Logo.md │ │ │ ├── Logo.tsx │ │ │ └── LogoNative.tsx │ │ ├── Markdown │ │ │ ├── CodeText.module.scss │ │ │ ├── CodeText.tsx │ │ │ ├── Markdown.md │ │ │ ├── Markdown.module.scss │ │ │ ├── Markdown.spec.ts │ │ │ ├── Markdown.tsx │ │ │ ├── MarkdownNative.tsx │ │ │ ├── parse-binding-expr.ts │ │ │ └── utils.ts │ │ ├── metadata-helpers.ts │ │ ├── ModalDialog │ │ │ ├── ConfirmationModalContextProvider.tsx │ │ │ ├── Dialog.module.scss │ │ │ ├── Dialog.tsx │ │ │ ├── ModalDialog.md │ │ │ ├── ModalDialog.module.scss │ │ │ ├── ModalDialog.spec.ts │ │ │ ├── ModalDialog.tsx │ │ │ ├── ModalDialogNative.tsx │ │ │ └── ModalVisibilityContext.tsx │ │ ├── NavGroup │ │ │ ├── NavGroup.md │ │ │ ├── NavGroup.module.scss │ │ │ ├── NavGroup.spec.ts │ │ │ ├── NavGroup.tsx │ │ │ ├── NavGroupContext.ts │ │ │ └── NavGroupNative.tsx │ │ ├── NavLink │ │ │ ├── NavLink.md │ │ │ ├── NavLink.module.scss │ │ │ ├── NavLink.spec.ts │ │ │ ├── NavLink.tsx │ │ │ └── NavLinkNative.tsx │ │ ├── NavPanel │ │ │ ├── NavPanel.md │ │ │ ├── NavPanel.module.scss │ │ │ ├── NavPanel.spec.ts │ │ │ ├── NavPanel.tsx │ │ │ └── NavPanelNative.tsx │ │ ├── NestedApp │ │ │ ├── AppWithCodeView.module.scss │ │ │ ├── AppWithCodeView.tsx │ │ │ ├── AppWithCodeViewNative.tsx │ │ │ ├── defaultProps.tsx │ │ │ ├── logo.svg │ │ │ ├── NestedApp.module.scss │ │ │ ├── NestedApp.tsx │ │ │ ├── NestedAppNative.tsx │ │ │ ├── Tooltip.module.scss │ │ │ ├── Tooltip.tsx │ │ │ └── utils.ts │ │ ├── NoResult │ │ │ ├── NoResult.md │ │ │ ├── NoResult.module.scss │ │ │ ├── NoResult.spec.ts │ │ │ ├── NoResult.tsx │ │ │ └── NoResultNative.tsx │ │ ├── NumberBox │ │ │ ├── numberbox-abstractions.ts │ │ │ ├── NumberBox.md │ │ │ ├── NumberBox.module.scss │ │ │ ├── NumberBox.spec.ts │ │ │ ├── NumberBox.tsx │ │ │ └── NumberBoxNative.tsx │ │ ├── Option │ │ │ ├── Option.md │ │ │ ├── Option.spec.ts │ │ │ ├── Option.tsx │ │ │ ├── OptionNative.tsx │ │ │ └── OptionTypeProvider.tsx │ │ ├── PageMetaTitle │ │ │ ├── PageMetaTilteNative.tsx │ │ │ ├── PageMetaTitle.md │ │ │ ├── PageMetaTitle.spec.ts │ │ │ └── PageMetaTitle.tsx │ │ ├── Pages │ │ │ ├── Page.md │ │ │ ├── Pages.md │ │ │ ├── Pages.module.scss │ │ │ ├── Pages.tsx │ │ │ └── PagesNative.tsx │ │ ├── Pagination │ │ │ ├── Pagination.md │ │ │ ├── Pagination.module.scss │ │ │ ├── Pagination.spec.ts │ │ │ ├── Pagination.tsx │ │ │ └── PaginationNative.tsx │ │ ├── PositionedContainer │ │ │ ├── PositionedContainer.module.scss │ │ │ ├── PositionedContainer.tsx │ │ │ └── PositionedContainerNative.tsx │ │ ├── ProfileMenu │ │ │ ├── ProfileMenu.module.scss │ │ │ └── ProfileMenu.tsx │ │ ├── ProgressBar │ │ │ ├── ProgressBar.md │ │ │ ├── ProgressBar.module.scss │ │ │ ├── ProgressBar.spec.ts │ │ │ ├── ProgressBar.tsx │ │ │ └── ProgressBarNative.tsx │ │ ├── Queue │ │ │ ├── Queue.md │ │ │ ├── Queue.spec.ts │ │ │ ├── Queue.tsx │ │ │ ├── queueActions.ts │ │ │ └── QueueNative.tsx │ │ ├── RadioGroup │ │ │ ├── RadioGroup.md │ │ │ ├── RadioGroup.module.scss │ │ │ ├── RadioGroup.spec.ts │ │ │ ├── RadioGroup.tsx │ │ │ ├── RadioGroupNative.tsx │ │ │ ├── RadioItem.tsx │ │ │ └── RadioItemNative.tsx │ │ ├── RealTimeAdapter │ │ │ ├── RealTimeAdapter.tsx │ │ │ └── RealTimeAdapterNative.tsx │ │ ├── Redirect │ │ │ ├── Redirect.md │ │ │ ├── Redirect.spec.ts │ │ │ └── Redirect.tsx │ │ ├── ResponsiveBar │ │ │ ├── README.md │ │ │ ├── ResponsiveBar.md │ │ │ ├── ResponsiveBar.module.scss │ │ │ ├── ResponsiveBar.spec.ts │ │ │ ├── ResponsiveBar.tsx │ │ │ └── ResponsiveBarNative.tsx │ │ ├── Select │ │ │ ├── HiddenOption.tsx │ │ │ ├── MultiSelectOption.tsx │ │ │ ├── OptionContext.ts │ │ │ ├── Select.md │ │ │ ├── Select.module.scss │ │ │ ├── Select.spec.ts │ │ │ ├── Select.tsx │ │ │ ├── SelectContext.tsx │ │ │ ├── SelectNative.tsx │ │ │ ├── SelectOption.tsx │ │ │ └── SimpleSelect.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 │ │ │ ├── BehaviorContext.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 │ │ │ ├── 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.mjs │ ├── 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 │ │ │ ├── ModalDialogDriver.ts │ │ │ ├── NumberBoxDriver.ts │ │ │ ├── TextBoxDriver.ts │ │ │ ├── TimeInputDriver.ts │ │ │ ├── TimerDriver.ts │ │ │ └── TreeDriver.ts │ │ ├── fixtures.ts │ │ ├── infrastructure │ │ │ ├── index.html │ │ │ ├── main.tsx │ │ │ ├── public │ │ │ │ ├── mockServiceWorker.js │ │ │ │ ├── resources │ │ │ │ │ ├── bell.svg │ │ │ │ │ ├── box.svg │ │ │ │ │ ├── doc.svg │ │ │ │ │ ├── eye.svg │ │ │ │ │ ├── flower-640x480.jpg │ │ │ │ │ ├── sun.svg │ │ │ │ │ ├── test-image-100x100.jpg │ │ │ │ │ └── txt.svg │ │ │ │ └── serve.json │ │ │ └── TestBed.tsx │ │ └── themed-app-test-helpers.ts │ └── vite-env.d.ts ├── tests │ ├── components │ │ ├── CodeBlock │ │ │ └── hightlight-code.test.ts │ │ ├── playground-pattern.test.ts │ │ └── Tree │ │ └── Tree-states.test.ts │ ├── components-core │ │ ├── abstractions │ │ │ └── treeAbstractions.test.ts │ │ ├── container │ │ │ └── buildProxy.test.ts │ │ ├── interception │ │ │ ├── orderBy.test.ts │ │ │ ├── ReadOnlyCollection.test.ts │ │ │ └── request-param-converter.test.ts │ │ ├── scripts-runner │ │ │ ├── AttributeValueParser.test.ts │ │ │ ├── eval-tree-arrow-async.test.ts │ │ │ ├── eval-tree-arrow.test.ts │ │ │ ├── eval-tree-func-decl-async.test.ts │ │ │ ├── eval-tree-func-decl.test.ts │ │ │ ├── eval-tree-pre-post.test.ts │ │ │ ├── eval-tree-regression.test.ts │ │ │ ├── eval-tree.test.ts │ │ │ ├── function-proxy.test.ts │ │ │ ├── parser-regression.test.ts │ │ │ ├── process-event.test.ts │ │ │ ├── process-function.test.ts │ │ │ ├── process-implicit-context.test.ts │ │ │ ├── process-statement-asgn.test.ts │ │ │ ├── process-statement-destruct.test.ts │ │ │ ├── process-statement-regs.test.ts │ │ │ ├── process-statement-sync.test.ts │ │ │ ├── process-statement.test.ts │ │ │ ├── process-switch-sync.test.ts │ │ │ ├── process-switch.test.ts │ │ │ ├── process-try-sync.test.ts │ │ │ ├── process-try.test.ts │ │ │ └── test-helpers.ts │ │ ├── test-metadata-handler.ts │ │ ├── theming │ │ │ ├── border-segments.test.ts │ │ │ ├── component-layout.resolver.test.ts │ │ │ ├── layout-property-parser.test.ts │ │ │ ├── layout-resolver.test.ts │ │ │ ├── layout-resolver2.test.ts │ │ │ ├── layout-vp-override.test.ts │ │ │ └── padding-segments.test.ts │ │ └── utils │ │ ├── date-utils.test.ts │ │ ├── format-human-elapsed-time.test.ts │ │ └── LruCache.test.ts │ ├── language-server │ │ ├── completion.test.ts │ │ ├── format.test.ts │ │ ├── hover.test.ts │ │ └── mockData.ts │ └── parsers │ ├── common │ │ └── input-stream.test.ts │ ├── markdown │ │ └── parse-binding-expression.test.ts │ ├── parameter-parser.test.ts │ ├── paremeter-parser.test.ts │ ├── scripting │ │ ├── eval-tree-arrow.test.ts │ │ ├── eval-tree-pre-post.test.ts │ │ ├── eval-tree.test.ts │ │ ├── function-proxy.test.ts │ │ ├── lexer-literals.test.ts │ │ ├── lexer-misc.test.ts │ │ ├── module-parse.test.ts │ │ ├── parser-arrow.test.ts │ │ ├── parser-assignments.test.ts │ │ ├── parser-binary.test.ts │ │ ├── parser-destructuring.test.ts │ │ ├── parser-errors.test.ts │ │ ├── parser-expressions.test.ts │ │ ├── parser-function.test.ts │ │ ├── parser-literals.test.ts │ │ ├── parser-primary.test.ts │ │ ├── parser-regex.test.ts │ │ ├── parser-statements.test.ts │ │ ├── parser-unary.test.ts │ │ ├── process-event.test.ts │ │ ├── process-implicit-context.test.ts │ │ ├── process-statement-asgn.test.ts │ │ ├── process-statement-destruct.test.ts │ │ ├── process-statement-regs.test.ts │ │ ├── process-statement-sync.test.ts │ │ ├── process-statement.test.ts │ │ ├── process-switch-sync.test.ts │ │ ├── process-switch.test.ts │ │ ├── process-try-sync.test.ts │ │ ├── process-try.test.ts │ │ ├── simplify-expression.test.ts │ │ ├── statement-hooks.test.ts │ │ └── test-helpers.ts │ ├── style-parser │ │ ├── generateHvarChain.test.ts │ │ ├── parseHVar.test.ts │ │ ├── parser.test.ts │ │ └── tokens.test.ts │ └── xmlui │ ├── lint.test.ts │ ├── parser.test.ts │ ├── scanner.test.ts │ ├── transform.attr.test.ts │ ├── transform.circular.test.ts │ ├── transform.element.test.ts │ ├── transform.errors.test.ts │ ├── transform.escape.test.ts │ ├── transform.regression.test.ts │ ├── transform.script.test.ts │ ├── transform.test.ts │ └── xmlui.ts ├── tests-e2e │ ├── api-bound-component-regression.spec.ts │ ├── api-call-as-extracted-component.spec.ts │ ├── assign-to-object-or-array-regression.spec.ts │ ├── binding-regression.spec.ts │ ├── children-as-template-context-vars.spec.ts │ ├── compound-component.spec.ts │ ├── context-vars-regression.spec.ts │ ├── data-bindings.spec.ts │ ├── datasource-and-api-usage-in-var.spec.ts │ ├── datasource-direct-binding.spec.ts │ ├── datasource-onLoaded-regression.spec.ts │ ├── modify-array-item-regression.spec.ts │ ├── namespaces.spec.ts │ ├── push-to-array-regression.spec.ts │ ├── screen-breakpoints.spec.ts │ ├── scripting.spec.ts │ ├── state-scope-in-pages.spec.ts │ └── state-var-scopes.spec.ts ├── tsconfig.bin.json ├── tsconfig.json ├── tsconfig.node.json ├── vite.config.ts └── vitest.config.ts ``` # Files -------------------------------------------------------------------------------- /xmlui/src/components/DateInput/DateInputNative.tsx: -------------------------------------------------------------------------------- ```typescript 1 | import React, { type CSSProperties } from "react"; 2 | import { 3 | forwardRef, 4 | useCallback, 5 | useEffect, 6 | useImperativeHandle, 7 | useMemo, 8 | useRef, 9 | useState, 10 | } from "react"; 11 | import classnames from "classnames"; 12 | import styles from "./DateInput.module.scss"; 13 | import { format, parse, isValid } from "date-fns"; 14 | import { PartialInput, type BlurDirection } from "../Input/PartialInput"; 15 | import { InputDivider } from "../Input/InputDivider"; 16 | 17 | import type { RegisterComponentApiFn, UpdateStateFn } from "../../abstractions/RendererDefs"; 18 | import { useEvent } from "../../components-core/utils/misc"; 19 | import type { ValidationStatus } from "../abstractions"; 20 | import { Adornment } from "../Input/InputAdornment"; 21 | import Icon from "../Icon/IconNative"; 22 | 23 | // Component part names 24 | const PART_DAY = "day"; 25 | const PART_MONTH = "month"; 26 | const PART_YEAR = "year"; 27 | const PART_CLEAR_BUTTON = "clearButton"; 28 | 29 | // Date validation constants 30 | const MIN_YEAR = 1900; 31 | const MAX_YEAR = 2100; 32 | 33 | // Browser compatibility checks 34 | const isIEOrEdgeLegacy = 35 | typeof window !== "undefined" && /(MSIE|Trident\/|Edge\/)/.test(navigator.userAgent); 36 | 37 | // Date format types 38 | export const dateFormats = [ 39 | "MM/dd/yyyy", 40 | "MM-dd-yyyy", 41 | "yyyy/MM/dd", 42 | "yyyy-MM-dd", 43 | "dd/MM/yyyy", 44 | "dd-MM-yyyy", 45 | "yyyyMMdd", 46 | "MMddyyyy", 47 | ] as const; 48 | 49 | type DateFormat = (typeof dateFormats)[number]; 50 | 51 | export const DateInputModeValues = ["single", "range"] as const; 52 | type DateInputMode = (typeof DateInputModeValues)[number]; 53 | 54 | export const enum WeekDays { 55 | Sunday = 0, 56 | Monday = 1, 57 | Tuesday = 2, 58 | Wednesday = 3, 59 | Thursday = 4, 60 | Friday = 5, 61 | Saturday = 6, 62 | } 63 | 64 | type Props = { 65 | id?: string; 66 | initialValue?: string; 67 | value?: string; 68 | enabled?: boolean; 69 | updateState?: UpdateStateFn; 70 | style?: CSSProperties; 71 | className?: string; 72 | onDidChange?: (newValue: string | null) => void; 73 | onFocus?: (ev: React.FocusEvent<HTMLDivElement>) => void; 74 | onBlur?: (ev: React.FocusEvent<HTMLDivElement>) => void; 75 | onInvalidChange?: () => void; 76 | validationStatus?: ValidationStatus; 77 | registerComponentApi?: RegisterComponentApiFn; 78 | mode?: DateInputMode; 79 | dateFormat?: DateFormat; 80 | showWeekNumber?: boolean; 81 | weekStartsOn?: WeekDays; 82 | minValue?: string; 83 | maxValue?: string; 84 | disabledDates?: any; 85 | inline?: boolean; 86 | clearable?: boolean; 87 | clearIcon?: string; 88 | clearToInitialValue?: boolean; 89 | required?: boolean; 90 | startText?: string; 91 | startIcon?: string; 92 | endText?: string; 93 | endIcon?: string; 94 | gap?: string; 95 | readOnly?: boolean; 96 | autoFocus?: boolean; 97 | emptyCharacter?: string; 98 | }; 99 | 100 | export const defaultProps = { 101 | enabled: true, 102 | validationStatus: "none" as ValidationStatus, 103 | mode: "single" as DateInputMode, 104 | dateFormat: "MM/dd/yyyy" as DateFormat, 105 | showWeekNumber: false, 106 | weekStartsOn: WeekDays.Sunday, 107 | inline: true, 108 | clearable: false, 109 | clearToInitialValue: true, 110 | required: false, 111 | labelPosition: "top", 112 | readOnly: false, 113 | autoFocus: false, 114 | labelBreak: false, 115 | emptyCharacter: "-", 116 | }; 117 | 118 | export const DateInput = forwardRef<HTMLDivElement, Props>(function DateInputNative( 119 | { 120 | id, 121 | initialValue, 122 | value: controlledValue, 123 | enabled = defaultProps.enabled, 124 | updateState, 125 | style, 126 | className, 127 | onDidChange, 128 | onFocus, 129 | onBlur, 130 | onInvalidChange, 131 | validationStatus = defaultProps.validationStatus, 132 | registerComponentApi, 133 | mode = defaultProps.mode, 134 | dateFormat = defaultProps.dateFormat, 135 | showWeekNumber = defaultProps.showWeekNumber, 136 | weekStartsOn = defaultProps.weekStartsOn, 137 | minValue, 138 | maxValue, 139 | disabledDates, 140 | inline = defaultProps.inline, 141 | clearable = defaultProps.clearable, 142 | clearIcon, 143 | clearToInitialValue = defaultProps.clearToInitialValue, 144 | required = defaultProps.required, 145 | startText, 146 | startIcon, 147 | endText, 148 | endIcon, 149 | gap, 150 | readOnly = defaultProps.readOnly, 151 | autoFocus = defaultProps.autoFocus, 152 | emptyCharacter = defaultProps.emptyCharacter, 153 | ...rest 154 | }, 155 | ref, 156 | ) { 157 | const dateInputRef = useRef<HTMLDivElement>(null); 158 | 159 | // Refs for auto-tabbing between inputs 160 | const dayInputRef = useRef<HTMLInputElement>(null); 161 | const monthInputRef = useRef<HTMLInputElement>(null); 162 | const yearInputRef = useRef<HTMLInputElement>(null); 163 | 164 | // Process emptyCharacter according to requirements 165 | const processedEmptyCharacter = useMemo(() => { 166 | if (!emptyCharacter || emptyCharacter.length === 0) { 167 | return "-"; 168 | } 169 | if (emptyCharacter.length > 1) { 170 | // Use proper unicode-aware character extraction 171 | const firstChar = [...emptyCharacter][0]; 172 | return firstChar; 173 | } 174 | return emptyCharacter; 175 | }, [emptyCharacter]); 176 | 177 | // Stabilize initialValue to prevent unnecessary re-renders 178 | const stableInitialValue = useMemo(() => { 179 | return initialValue; 180 | }, [initialValue]); 181 | 182 | // Local state management - sync with value prop 183 | const [localValue, setLocalValue] = useState<string | null>(() => { 184 | const initial = controlledValue || stableInitialValue || null; 185 | return initial; 186 | }); 187 | 188 | // Parse current value into individual components 189 | const [day, setDay] = useState<string | null>(null); 190 | const [month, setMonth] = useState<string | null>(null); 191 | const [year, setYear] = useState<string | null>(null); 192 | 193 | // Track whether the component currently has focus 194 | const [componentHasFocus, setComponentHasFocus] = useState(false); 195 | 196 | // State to track invalid status for visual feedback 197 | const [isDayCurrentlyInvalid, setIsDayCurrentlyInvalid] = useState(false); 198 | const [isMonthCurrentlyInvalid, setIsMonthCurrentlyInvalid] = useState(false); 199 | const [isYearCurrentlyInvalid, setIsYearCurrentlyInvalid] = useState(false); 200 | 201 | useEffect(() => { 202 | // Initialize XMLUI state with initial value on first mount 203 | if (updateState && stableInitialValue !== undefined && controlledValue === undefined) { 204 | updateState({ value: stableInitialValue }, { initial: true }); 205 | return; // Don't sync on this first run, let the state update trigger a re-render 206 | } 207 | 208 | // Sync with controlled value - always sync when controlledValue changes 209 | const newLocalValue = controlledValue || null; 210 | setLocalValue(newLocalValue); 211 | }, [controlledValue, stableInitialValue, updateState]); 212 | 213 | // Get the order of date inputs based on the format 214 | const dateOrder = useMemo(() => { 215 | const format = dateFormat.toLowerCase(); 216 | 217 | // Determine the order based on the format pattern 218 | if (format.startsWith("mm") || format.startsWith("m")) { 219 | if (format.includes("/dd/yyyy") || format.includes("-dd-yyyy")) { 220 | return ["month", "day", "year"]; // MM/dd/yyyy or MM-dd-yyyy 221 | } else { 222 | return ["month", "day", "year"]; // MMddyyyy 223 | } 224 | } else if (format.startsWith("yyyy")) { 225 | return ["year", "month", "day"]; // yyyy/MM/dd or yyyy-MM-dd 226 | } else if (format.startsWith("dd")) { 227 | return ["day", "month", "year"]; // dd/MM/yyyy or dd-MM-yyyy 228 | } else { 229 | return ["month", "day", "year"]; // fallback 230 | } 231 | }, [dateFormat]); 232 | 233 | // Parse value into individual components 234 | useEffect(() => { 235 | if (localValue) { 236 | const parsedValues = parseDateString(localValue, dateFormat); 237 | if (parsedValues) { 238 | setDay(parsedValues.day); 239 | setMonth(parsedValues.month); 240 | setYear(parsedValues.year); 241 | } else { 242 | setDay(null); 243 | setMonth(null); 244 | setYear(null); 245 | } 246 | } else { 247 | setDay(null); 248 | setMonth(null); 249 | setYear(null); 250 | } 251 | }, [localValue, dateFormat]); 252 | 253 | // Event handlers 254 | const handleChange = useEvent((newValue: string | null) => { 255 | // Update local state immediately for immediate UI feedback 256 | setLocalValue(newValue); 257 | 258 | // Also update the XMLUI state 259 | if (updateState) { 260 | updateState({ value: newValue }); 261 | } 262 | onDidChange?.(newValue); 263 | }); 264 | 265 | // Helper function to format the complete date value 266 | const formatDateValue = useCallback( 267 | (d: string | null, m: string | null, y: string | null): string | null => { 268 | if (!d || !m || !y) { 269 | return null; 270 | } 271 | 272 | // Create a date object and format it according to the dateFormat 273 | const dayNum = parseInt(d, 10); 274 | const monthNum = parseInt(m, 10); 275 | const yearNum = parseInt(y, 10); 276 | 277 | if (isNaN(dayNum) || isNaN(monthNum) || isNaN(yearNum)) { 278 | return null; 279 | } 280 | 281 | try { 282 | // Create date object (month is 0-indexed in Date constructor) 283 | const date = new Date(yearNum, monthNum - 1, dayNum); 284 | 285 | // Validate the date 286 | if ( 287 | date.getFullYear() !== yearNum || 288 | date.getMonth() !== monthNum - 1 || 289 | date.getDate() !== dayNum 290 | ) { 291 | return null; 292 | } 293 | 294 | // Format using the specified format 295 | return format(date, dateFormat); 296 | } catch (error) { 297 | return null; 298 | } 299 | }, 300 | [dateFormat], 301 | ); 302 | 303 | // Generic handlers for input change and blur 304 | const createInputChangeHandler = useCallback( 305 | ( 306 | field: "day" | "month" | "year", 307 | setValue: (value: string) => void, 308 | setInvalid: (invalid: boolean) => void, 309 | validateFn: (value: string) => boolean, 310 | ) => 311 | (event: React.ChangeEvent<HTMLInputElement>) => { 312 | const newValue = event.target.value; 313 | setValue(newValue); 314 | // Update invalid state immediately for visual feedback 315 | const isInvalid = validateFn(newValue); 316 | setInvalid(isInvalid); 317 | 318 | // Clear day invalid state when any field changes, as the date combination might become valid 319 | if (!isInvalid) { 320 | setIsDayCurrentlyInvalid(false); 321 | } 322 | 323 | // Fire invalid event if the value is invalid 324 | if (isInvalid) { 325 | onInvalidChange?.(); 326 | } 327 | // Don't format/normalize during typing - only on blur 328 | }, 329 | [onInvalidChange], 330 | ); 331 | 332 | const createInputBlurHandler = useCallback( 333 | ( 334 | field: "day" | "month" | "year", 335 | setValue: (value: string) => void, 336 | setInvalid: (invalid: boolean) => void, 337 | normalizeFn: (value: string) => string | null, 338 | ) => 339 | (direction: BlurDirection, event: React.FocusEvent<HTMLInputElement>) => { 340 | const currentValue = event.target.value; 341 | const normalizedValue = normalizeFn(currentValue); 342 | 343 | // Check if the current value was invalid (needed normalization or couldn't be normalized) 344 | const wasInvalid = 345 | currentValue !== "" && (normalizedValue === null || normalizedValue !== currentValue); 346 | 347 | if (normalizedValue !== null && normalizedValue !== currentValue) { 348 | setValue(normalizedValue); 349 | setInvalid(false); // Clear invalid state after normalization 350 | 351 | // Check if the complete date would be valid 352 | const dateValues = { day, month, year }; 353 | dateValues[field] = normalizedValue; 354 | const dateString = formatDateValue(dateValues.day, dateValues.month, dateValues.year); 355 | 356 | if (dateString !== null) { 357 | // Valid complete date - update normally 358 | handleChange(dateString); 359 | } else { 360 | // Invalid date combination - mark the day as invalid if all fields are present 361 | if (dateValues.day && dateValues.month && dateValues.year) { 362 | setIsDayCurrentlyInvalid(true); 363 | onInvalidChange?.(); 364 | // Don't call handleChange with null to avoid clearing the fields 365 | } else { 366 | // Incomplete date - call handleChange as normal (will be null) 367 | handleChange(dateString); 368 | } 369 | } 370 | } else if (normalizedValue === null && currentValue !== "") { 371 | // Reset to previous valid value or clear 372 | setValue(""); 373 | setInvalid(false); // Clear invalid state 374 | // Always call handleChange to update the date value (likely to null) 375 | const dateValues = { day, month, year }; 376 | dateValues[field] = ""; 377 | const dateString = formatDateValue(dateValues.day, dateValues.month, dateValues.year); 378 | handleChange(dateString); 379 | } else if (normalizedValue !== null) { 380 | // Value didn't need normalization, but still update the complete date 381 | const dateValues = { day, month, year }; 382 | dateValues[field] = normalizedValue; 383 | const dateString = formatDateValue(dateValues.day, dateValues.month, dateValues.year); 384 | 385 | if (dateString !== null) { 386 | // Valid complete date - update normally 387 | handleChange(dateString); 388 | } else { 389 | // Invalid date combination - mark the day as invalid if all fields are present 390 | if (dateValues.day && dateValues.month && dateValues.year) { 391 | setIsDayCurrentlyInvalid(true); 392 | onInvalidChange?.(); 393 | // Don't call handleChange with null to avoid clearing the fields 394 | } else { 395 | // Incomplete date - call handleChange as normal (will be null) 396 | handleChange(dateString); 397 | } 398 | } 399 | } 400 | }, 401 | [day, month, year, handleChange, onInvalidChange], 402 | ); 403 | 404 | // Handle changes from individual inputs 405 | const handleDayChange = useMemo( 406 | () => 407 | createInputChangeHandler("day", setDay, setIsDayCurrentlyInvalid, (value) => 408 | isDayInvalid(value, month, year), 409 | ), 410 | [createInputChangeHandler, month, year], 411 | ); 412 | 413 | const handleDayBlur = useMemo( 414 | () => 415 | createInputBlurHandler("day", setDay, setIsDayCurrentlyInvalid, (value) => 416 | normalizeDay(value, month, year), 417 | ), 418 | [createInputBlurHandler, month, year], 419 | ); 420 | 421 | const handleMonthChange = useMemo( 422 | () => createInputChangeHandler("month", setMonth, setIsMonthCurrentlyInvalid, isMonthInvalid), 423 | [createInputChangeHandler], 424 | ); 425 | 426 | const handleMonthBlur = useMemo( 427 | () => createInputBlurHandler("month", setMonth, setIsMonthCurrentlyInvalid, normalizeMonth), 428 | [createInputBlurHandler], 429 | ); 430 | 431 | const handleYearChange = useMemo( 432 | () => createInputChangeHandler("year", setYear, setIsYearCurrentlyInvalid, isYearInvalid), 433 | [createInputChangeHandler], 434 | ); 435 | 436 | const handleYearBlur = useMemo( 437 | () => createInputBlurHandler("year", setYear, setIsYearCurrentlyInvalid, normalizeYear), 438 | [createInputBlurHandler], 439 | ); 440 | 441 | // Focus method 442 | const focus = useCallback(() => { 443 | const firstInput = dateInputRef.current?.querySelector("input") as HTMLInputElement; 444 | firstInput?.focus(); 445 | }, []); 446 | 447 | // Custom focus handler that fires gotFocus when component gains focus 448 | const handleComponentFocus = useCallback( 449 | (event: React.FocusEvent<HTMLDivElement>) => { 450 | // If component didn't have focus before, fire gotFocus 451 | if (!componentHasFocus) { 452 | setComponentHasFocus(true); 453 | onFocus?.(event); 454 | } 455 | }, 456 | [componentHasFocus, onFocus], 457 | ); 458 | 459 | // Custom blur handler that only fires lostFocus when focus leaves the entire component 460 | const handleComponentBlur = useCallback( 461 | (event: React.FocusEvent<HTMLDivElement>) => { 462 | // Check if the new focus target is still within this DateInput component 463 | const relatedTarget = event.relatedTarget as HTMLElement; 464 | const currentTarget = event.currentTarget; 465 | 466 | // If there's no related target, or the related target is not within this component, fire lostFocus 467 | if (!relatedTarget || !currentTarget.contains(relatedTarget)) { 468 | setComponentHasFocus(false); 469 | onBlur?.(event); 470 | } 471 | }, 472 | [onBlur], 473 | ); 474 | 475 | // Arrow key navigation handler 476 | const createArrowKeyHandler = useCallback(() => { 477 | return (event: React.KeyboardEvent<HTMLInputElement>) => { 478 | const { key } = event; 479 | 480 | if (key === "ArrowRight") { 481 | event.preventDefault(); 482 | const currentTarget = event.target as HTMLInputElement; 483 | 484 | // Determine next input based on current input 485 | if (currentTarget === monthInputRef.current && dayInputRef.current) { 486 | dayInputRef.current.focus(); 487 | dayInputRef.current.select(); 488 | } else if (currentTarget === dayInputRef.current && yearInputRef.current) { 489 | yearInputRef.current.focus(); 490 | yearInputRef.current.select(); 491 | } 492 | } else if (key === "ArrowLeft") { 493 | event.preventDefault(); 494 | const currentTarget = event.target as HTMLInputElement; 495 | 496 | // Determine previous input based on current input 497 | if (currentTarget === dayInputRef.current && monthInputRef.current) { 498 | monthInputRef.current.focus(); 499 | monthInputRef.current.select(); 500 | } else if (currentTarget === yearInputRef.current && dayInputRef.current) { 501 | dayInputRef.current.focus(); 502 | dayInputRef.current.select(); 503 | } 504 | } 505 | }; 506 | }, []); 507 | 508 | // Create the arrow key handler instance 509 | const handleArrowKeys = createArrowKeyHandler(); 510 | 511 | const clear = useCallback(() => { 512 | // Reset to initial value if provided, otherwise null 513 | let valueToReset = clearToInitialValue 514 | ? stableInitialValue !== undefined 515 | ? stableInitialValue 516 | : null 517 | : null; 518 | 519 | if (valueToReset) { 520 | const parsedValues = parseDateString(valueToReset, dateFormat); 521 | if (parsedValues) { 522 | setDay(parsedValues.day); 523 | setMonth(parsedValues.month); 524 | setYear(parsedValues.year); 525 | } else { 526 | setDay(null); 527 | setMonth(null); 528 | setYear(null); 529 | } 530 | } else { 531 | // Clear all fields 532 | setDay(null); 533 | setMonth(null); 534 | setYear(null); 535 | } 536 | 537 | handleChange(valueToReset); 538 | 539 | // Focus the component after clearing 540 | setTimeout(() => { 541 | focus(); 542 | }, 0); 543 | }, [stableInitialValue, handleChange, dateFormat, clearToInitialValue, focus]); 544 | 545 | function stopPropagation(event: React.FocusEvent) { 546 | event.stopPropagation(); 547 | } 548 | 549 | const setValue = useEvent((newValue: string | null) => { 550 | handleChange(newValue); 551 | }); 552 | 553 | // Function to get ISO formatted date value (YYYY-MM-DD) 554 | const getIsoValue = useCallback((): string | null => { 555 | if (!day || !month || !year) { 556 | return null; 557 | } 558 | 559 | // Convert to numbers 560 | const dayNum = parseInt(day, 10); 561 | const monthNum = parseInt(month, 10); 562 | const yearNum = parseInt(year, 10); 563 | 564 | if (isNaN(dayNum) || isNaN(monthNum) || isNaN(yearNum)) { 565 | return null; 566 | } 567 | 568 | try { 569 | // Create date object (month is 0-indexed in Date constructor) 570 | const date = new Date(yearNum, monthNum - 1, dayNum); 571 | 572 | // Validate the date 573 | if ( 574 | date.getFullYear() !== yearNum || 575 | date.getMonth() !== monthNum - 1 || 576 | date.getDate() !== dayNum 577 | ) { 578 | return null; 579 | } 580 | 581 | // Format as ISO date string (YYYY-MM-DD) 582 | const year4 = yearNum.toString().padStart(4, "0"); 583 | const month2 = monthNum.toString().padStart(2, "0"); 584 | const day2 = dayNum.toString().padStart(2, "0"); 585 | 586 | return `${year4}-${month2}-${day2}`; 587 | } catch (error) { 588 | return null; 589 | } 590 | }, [day, month, year]); 591 | 592 | // Component API registration 593 | useImperativeHandle(ref, () => dateInputRef.current as HTMLDivElement); 594 | 595 | useEffect(() => { 596 | if (registerComponentApi) { 597 | registerComponentApi({ 598 | focus, 599 | setValue, 600 | isoValue: getIsoValue, 601 | }); 602 | } 603 | }, [registerComponentApi, focus, setValue, getIsoValue]); 604 | 605 | // Custom clear icon 606 | const clearIconElement = useMemo(() => { 607 | if (clearIcon === null || clearIcon === "null") return null; 608 | if (clearIcon) return <Icon name={clearIcon} />; 609 | // Default clear icon 610 | return ( 611 | <svg 612 | xmlns="http://www.w3.org/2000/svg" 613 | width={19} 614 | height={19} 615 | viewBox="0 0 19 19" 616 | stroke="currentColor" 617 | strokeWidth={2} 618 | aria-hidden="true" 619 | className={classnames(styles.clearButtonIcon, styles.buttonIcon)} 620 | > 621 | <line x1="4" x2="15" y1="4" y2="15" /> 622 | <line x1="15" x2="4" y1="4" y2="15" /> 623 | </svg> 624 | ); 625 | }, [clearIcon]); 626 | 627 | // Adornments 628 | const startAdornment = useMemo(() => { 629 | if (startIcon || startText) { 630 | return <Adornment iconName={startIcon} text={startText} className={styles.adornment} />; 631 | } 632 | return null; 633 | }, [startIcon, startText]); 634 | 635 | const endAdornment = useMemo(() => { 636 | if (endIcon || endText) { 637 | return <Adornment iconName={endIcon} text={endText} className={styles.adornment} />; 638 | } 639 | return null; 640 | }, [endIcon, endText]); 641 | 642 | // Helper function to get input refs based on order 643 | const getInputRefs = useCallback(() => { 644 | const refs = { 645 | day: dayInputRef, 646 | month: monthInputRef, 647 | year: yearInputRef, 648 | }; 649 | return dateOrder.map((field) => refs[field as keyof typeof refs]); 650 | }, [dateOrder]); 651 | 652 | // Helper function to create input components in the right order 653 | const createDateInputs = () => { 654 | const inputRefs = getInputRefs(); 655 | 656 | return dateOrder.map((field, index) => { 657 | const nextRef = index < inputRefs.length - 1 ? inputRefs[index + 1] : undefined; 658 | // Pass id to the first input field only 659 | const inputId = index === 0 ? id : undefined; 660 | 661 | const getSeparator = () => { 662 | if (index === dateOrder.length - 1) return null; 663 | 664 | // Get separator based on format 665 | if (dateFormat.includes("/")) return "/"; 666 | if (dateFormat.includes("-")) return "-"; 667 | return ""; 668 | }; 669 | 670 | switch (field) { 671 | case "day": 672 | return ( 673 | <React.Fragment key="day"> 674 | <DayInput 675 | id={inputId} 676 | autoFocus={autoFocus && index === 0} 677 | disabled={!enabled} 678 | inputRef={dayInputRef} 679 | nextInputRef={nextRef} 680 | minValue={minValue} 681 | maxValue={maxValue} 682 | onChange={handleDayChange} 683 | onBlur={handleDayBlur} 684 | onKeyDown={handleArrowKeys} 685 | readOnly={readOnly} 686 | required={required} 687 | value={day} 688 | isInvalid={isDayCurrentlyInvalid} 689 | month={month} 690 | year={year} 691 | emptyCharacter={processedEmptyCharacter} 692 | /> 693 | {getSeparator() && <InputDivider separator={getSeparator()} />} 694 | </React.Fragment> 695 | ); 696 | case "month": 697 | return ( 698 | <React.Fragment key="month"> 699 | <MonthInput 700 | id={inputId} 701 | autoFocus={autoFocus && index === 0} 702 | disabled={!enabled} 703 | inputRef={monthInputRef} 704 | nextInputRef={nextRef} 705 | minValue={minValue} 706 | maxValue={maxValue} 707 | onChange={handleMonthChange} 708 | onBlur={handleMonthBlur} 709 | onKeyDown={handleArrowKeys} 710 | readOnly={readOnly} 711 | required={required} 712 | value={month} 713 | isInvalid={isMonthCurrentlyInvalid} 714 | emptyCharacter={processedEmptyCharacter} 715 | /> 716 | {getSeparator() && <InputDivider separator={getSeparator()} />} 717 | </React.Fragment> 718 | ); 719 | case "year": 720 | return ( 721 | <React.Fragment key="year"> 722 | <YearInput 723 | id={inputId} 724 | autoFocus={autoFocus && index === 0} 725 | disabled={!enabled} 726 | inputRef={yearInputRef} 727 | nextInputRef={nextRef} 728 | minValue={minValue} 729 | maxValue={maxValue} 730 | onChange={handleYearChange} 731 | onBlur={handleYearBlur} 732 | onKeyDown={handleArrowKeys} 733 | readOnly={readOnly} 734 | required={required} 735 | value={year} 736 | isInvalid={isYearCurrentlyInvalid} 737 | dateFormat={dateFormat} 738 | emptyCharacter={processedEmptyCharacter} 739 | /> 740 | {getSeparator() && <InputDivider separator={getSeparator()} />} 741 | </React.Fragment> 742 | ); 743 | default: 744 | return null; 745 | } 746 | }); 747 | }; 748 | 749 | return ( 750 | <div 751 | ref={dateInputRef} 752 | className={classnames( 753 | styles.dateInputWrapper, 754 | { 755 | [styles.error]: validationStatus === "error", 756 | [styles.warning]: validationStatus === "warning", 757 | [styles.valid]: validationStatus === "valid", 758 | [styles.disabled]: !enabled, 759 | [styles.readOnly]: readOnly, 760 | }, 761 | className, 762 | )} 763 | style={{ ...style, gap }} 764 | onFocusCapture={handleComponentFocus} 765 | onBlur={handleComponentBlur} 766 | data-validation-status={validationStatus} 767 | {...rest} 768 | > 769 | {startAdornment} 770 | <div className={styles.wrapper}> 771 | <div className={styles.inputGroup}>{createDateInputs()}</div> 772 | {clearable && ( 773 | <button 774 | data-part-id={PART_CLEAR_BUTTON} 775 | className={classnames( 776 | styles.clearButton, 777 | styles.button, 778 | )} 779 | disabled={!enabled} 780 | onClick={clear} 781 | onFocus={stopPropagation} 782 | type="button" 783 | > 784 | {clearIconElement} 785 | </button> 786 | )} 787 | </div> 788 | {endAdornment} 789 | </div> 790 | ); 791 | }); 792 | 793 | // Input component types 794 | type InputProps = { 795 | id?: string; 796 | ariaLabel?: string; 797 | autoFocus?: boolean; 798 | className?: string; 799 | disabled?: boolean; 800 | inputRef?: React.RefObject<HTMLInputElement | null>; 801 | max: number; 802 | min: number; 803 | name: string; 804 | nextInputRef?: React.RefObject<HTMLInputElement | null>; // For auto-tabbing to next input 805 | onChange?: (event: React.ChangeEvent<HTMLInputElement> & { target: HTMLInputElement }) => void; 806 | onBlur?: (event: React.FocusEvent<HTMLInputElement> & { target: HTMLInputElement }) => void; 807 | onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement> & { target: HTMLInputElement }) => void; 808 | onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement> & { target: HTMLInputElement }) => void; 809 | placeholder?: string; 810 | readOnly?: boolean; 811 | required?: boolean; 812 | step?: number; 813 | value?: string | null; 814 | maxLength?: number; 815 | isInvalid?: boolean; // To prevent auto-tabbing when value is invalid 816 | validateFn?: (value: string) => boolean; // Function to validate the current input value 817 | onBeep?: () => void; // Function to handle beep sound and event 818 | }; 819 | 820 | // Input component 821 | function Input({ 822 | id, 823 | ariaLabel, 824 | autoFocus, 825 | className, 826 | disabled, 827 | inputRef, 828 | max, 829 | min, 830 | name, 831 | nextInputRef, // For auto-tabbing to next input 832 | onChange, 833 | onBlur, 834 | onKeyDown, 835 | onKeyUp, 836 | placeholder, 837 | readOnly, 838 | required, 839 | step, 840 | value, 841 | maxLength = 2, 842 | isInvalid = false, // To prevent auto-tabbing when value is invalid 843 | validateFn, // Function to validate the current input value 844 | onBeep, // Function to handle beep sound and event 845 | }: InputProps): React.ReactElement { 846 | // Handle input changes with auto-tabbing logic 847 | const handleInputChange = useCallback( 848 | (event: React.ChangeEvent<HTMLInputElement>) => { 849 | const newValue = event.target.value; 850 | 851 | // Call the original onChange handler 852 | if (onChange) { 853 | onChange(event); 854 | } 855 | 856 | // Auto-tab to next input if we have reached max length, value is numeric, and value is valid 857 | if (newValue.length === maxLength && /^\d+$/.test(newValue)) { 858 | // Check if the new value is valid before auto-tabbing 859 | const isValueInvalid = validateFn ? validateFn(newValue) : false; 860 | 861 | if (!isValueInvalid) { 862 | // Small delay to ensure the current input is properly updated 863 | setTimeout(() => { 864 | if (nextInputRef?.current) { 865 | // Tab to next input field 866 | nextInputRef.current.focus(); 867 | nextInputRef.current.select(); 868 | } 869 | }, 0); 870 | } else { 871 | // Input is ready for auto-tab but invalid - play beep sound and fire event 872 | onBeep?.(); 873 | } 874 | } 875 | }, 876 | [onChange, nextInputRef, maxLength, validateFn, onBeep], 877 | ); 878 | 879 | return ( 880 | <> 881 | <input 882 | id={id} 883 | aria-label={ariaLabel} 884 | autoComplete="off" 885 | // biome-ignore lint/a11y/noAutofocus: This is up to developers' decision 886 | autoFocus={autoFocus} 887 | className={classnames(styles.input, className)} 888 | data-input="true" 889 | disabled={disabled} 890 | inputMode="numeric" 891 | max={max} 892 | maxLength={maxLength} 893 | min={min} 894 | name={name} 895 | onChange={handleInputChange} 896 | onBlur={onBlur} 897 | onFocus={onFocus} 898 | onKeyDown={onKeyDown} 899 | onKeyUp={onKeyUp} 900 | placeholder={placeholder || "--"} 901 | readOnly={readOnly} 902 | // Assertion is needed for React 18 compatibility 903 | ref={inputRef as React.RefObject<HTMLInputElement>} 904 | required={required} 905 | step={step} 906 | type="text" 907 | value={value !== null ? value : ""} 908 | /> 909 | </> 910 | ); 911 | } 912 | 913 | // DayInput component 914 | type DayInputProps = { 915 | minValue?: string; 916 | maxValue?: string; 917 | value?: string | null; 918 | isInvalid?: boolean; 919 | month?: string | null; 920 | year?: string | null; 921 | onBeep?: () => void; 922 | emptyCharacter?: string; 923 | } & Omit< 924 | React.ComponentProps<typeof PartialInput>, 925 | | "max" 926 | | "min" 927 | | "name" 928 | | "value" 929 | | "maxLength" 930 | | "validateFn" 931 | | "emptyCharacter" 932 | | "placeholderLength" 933 | >; 934 | 935 | function DayInput({ 936 | minValue, 937 | maxValue, 938 | value, 939 | isInvalid = false, 940 | month, 941 | year, 942 | onBeep, 943 | emptyCharacter = "-", 944 | ...otherProps 945 | }: DayInputProps): React.ReactElement { 946 | // Calculate max days for the current month/year 947 | const maxDay = useMemo(() => { 948 | if (month && year) { 949 | const monthNum = parseInt(month, 10); 950 | const yearNum = parseInt(year, 10); 951 | if (!isNaN(monthNum) && !isNaN(yearNum)) { 952 | return new Date(yearNum, monthNum, 0).getDate(); 953 | } 954 | } 955 | return 31; // Default to 31 if month/year not available 956 | }, [month, year]); 957 | 958 | return ( 959 | <PartialInput 960 | data-part-id={PART_DAY} 961 | id={otherProps.id} 962 | value={value} 963 | emptyCharacter={emptyCharacter} 964 | placeholderLength={2} 965 | max={Math.min(maxDay, 31)} 966 | min={1} 967 | maxLength={2} 968 | validateFn={(val) => isDayInvalid(val, month, year)} 969 | onBeep={onBeep} 970 | onChange={otherProps.onChange} 971 | onBlur={(direction, event) => { 972 | // PartialInput provides direction, but current onBlur expects just event 973 | if (otherProps.onBlur) { 974 | // Provide both direction and event to match the expected signature 975 | otherProps.onBlur(direction, event); 976 | } 977 | }} 978 | onKeyDown={otherProps.onKeyDown} 979 | className={classnames(styles.input, styles.day)} 980 | invalidClassName={styles.invalid} 981 | disabled={otherProps.disabled} 982 | readOnly={otherProps.readOnly} 983 | required={otherProps.required} 984 | autoFocus={otherProps.autoFocus} 985 | inputRef={otherProps.inputRef} 986 | nextInputRef={otherProps.nextInputRef} 987 | name="day" 988 | ariaLabel={otherProps.ariaLabel} 989 | isInvalid={isInvalid} 990 | /> 991 | ); 992 | } 993 | 994 | // MonthInput component 995 | type MonthInputProps = { 996 | minValue?: string; 997 | maxValue?: string; 998 | value?: string | null; 999 | isInvalid?: boolean; 1000 | onBeep?: () => void; 1001 | emptyCharacter?: string; 1002 | } & Omit<React.ComponentProps<typeof PartialInput>, "max" | "min" | "name" | "value" | "maxLength">; 1003 | 1004 | function MonthInput({ 1005 | minValue, 1006 | maxValue, 1007 | value, 1008 | isInvalid = false, 1009 | onBeep, 1010 | emptyCharacter = "-", 1011 | ...otherProps 1012 | }: MonthInputProps): React.ReactElement { 1013 | return ( 1014 | <PartialInput 1015 | data-part-id={PART_MONTH} 1016 | id={otherProps.id} 1017 | max={12} 1018 | min={1} 1019 | name="month" 1020 | value={value} 1021 | invalidClassName={styles.invalid} 1022 | isInvalid={isInvalid} 1023 | validateFn={isMonthInvalid} 1024 | onBeep={onBeep} 1025 | onChange={otherProps.onChange} 1026 | emptyCharacter={emptyCharacter} 1027 | placeholderLength={2} 1028 | className={classnames(styles.input, styles.month)} 1029 | maxLength={2} 1030 | disabled={otherProps.disabled} 1031 | required={otherProps.required} 1032 | onBlur={(direction, event) => { 1033 | // PartialInput provides direction, but current onBlur expects just event 1034 | if (otherProps.onBlur) { 1035 | // Provide both direction and event to match the expected signature 1036 | otherProps.onBlur(direction, event); 1037 | } 1038 | }} 1039 | onKeyDown={otherProps.onKeyDown} 1040 | readOnly={otherProps.readOnly} 1041 | autoFocus={otherProps.autoFocus} 1042 | inputRef={otherProps.inputRef} 1043 | nextInputRef={otherProps.nextInputRef} 1044 | ariaLabel={otherProps.ariaLabel} 1045 | /> 1046 | ); 1047 | } 1048 | 1049 | // YearInput component 1050 | type YearInputProps = { 1051 | minValue?: string; 1052 | maxValue?: string; 1053 | value?: string | null; 1054 | isInvalid?: boolean; 1055 | dateFormat?: DateFormat; 1056 | onBeep?: () => void; 1057 | emptyCharacter?: string; 1058 | } & Omit<React.ComponentProps<typeof PartialInput>, "max" | "min" | "name" | "value" | "maxLength">; 1059 | 1060 | function YearInput({ 1061 | minValue, 1062 | maxValue, 1063 | value, 1064 | isInvalid = false, 1065 | dateFormat = "MM/dd/yyyy", 1066 | onBeep, 1067 | emptyCharacter = "-", 1068 | ...otherProps 1069 | }: YearInputProps): React.ReactElement { 1070 | // Always use 4-digit year format 1071 | const maxLength = 4; 1072 | 1073 | const currentYear = new Date().getFullYear(); 1074 | const min = 1900; 1075 | const max = currentYear + 100; 1076 | 1077 | const { className: originalClassName, ...restProps } = otherProps; 1078 | 1079 | return ( 1080 | <PartialInput 1081 | data-part-id={PART_YEAR} 1082 | id={otherProps.id} 1083 | max={max} 1084 | min={min} 1085 | name="year" 1086 | value={value} 1087 | isInvalid={isInvalid} 1088 | invalidClassName={styles.invalid} 1089 | validateFn={isYearInvalid} 1090 | onBeep={onBeep} 1091 | emptyCharacter={emptyCharacter} 1092 | placeholderLength={4} 1093 | className={classnames(styles.input, styles.year, originalClassName)} 1094 | maxLength={maxLength} 1095 | onBlur={(direction, event) => { 1096 | // PartialInput provides direction, but current onBlur expects just event 1097 | if (otherProps.onBlur) { 1098 | // Provide both direction and event to match the expected signature 1099 | otherProps.onBlur(direction, event); 1100 | } 1101 | }} 1102 | {...restProps} 1103 | /> 1104 | ); 1105 | } 1106 | 1107 | // Input helper functions 1108 | function onFocus(event: React.FocusEvent<HTMLInputElement>) { 1109 | const { target } = event; 1110 | 1111 | if (isIEOrEdgeLegacy) { 1112 | requestAnimationFrame(() => target.select()); 1113 | } else { 1114 | target.select(); 1115 | } 1116 | } 1117 | 1118 | // Utility function to parse date string into components 1119 | function parseDateString(dateString: string, dateFormat: DateFormat) { 1120 | // Handle non-string values gracefully by returning null (empty fields) 1121 | if (typeof dateString !== 'string' || dateString === null || dateString === undefined) { 1122 | return null; 1123 | } 1124 | 1125 | try { 1126 | // Try to parse the date using the specified format 1127 | const parsedDate = parse(dateString, dateFormat, new Date()); 1128 | 1129 | if (isValid(parsedDate)) { 1130 | return { 1131 | day: parsedDate.getDate().toString().padStart(2, "0"), 1132 | month: (parsedDate.getMonth() + 1).toString().padStart(2, "0"), 1133 | year: parsedDate.getFullYear().toString(), 1134 | }; 1135 | } 1136 | 1137 | // Fallback: Try to parse as ISO date string 1138 | const isoDate = new Date(dateString); 1139 | if (!isNaN(isoDate.getTime())) { 1140 | return { 1141 | day: isoDate.getDate().toString().padStart(2, "0"), 1142 | month: (isoDate.getMonth() + 1).toString().padStart(2, "0"), 1143 | year: isoDate.getFullYear().toString(), 1144 | }; 1145 | } 1146 | 1147 | return null; 1148 | } catch (error) { 1149 | return null; 1150 | } 1151 | } 1152 | 1153 | // Normalize functions 1154 | function normalizeDay( 1155 | value: string | null, 1156 | month: string | null, 1157 | year: string | null, 1158 | ): string | null { 1159 | if (!value || value === "") return null; 1160 | 1161 | const num = parseInt(value, 10); 1162 | if (isNaN(num)) return null; 1163 | 1164 | // Calculate max days for the current month/year 1165 | let maxDay = 31; 1166 | if (month && year) { 1167 | const monthNum = parseInt(month, 10); 1168 | const yearNum = parseInt(year, 10); 1169 | if (!isNaN(monthNum) && !isNaN(yearNum)) { 1170 | maxDay = new Date(yearNum, monthNum, 0).getDate(); 1171 | } 1172 | } 1173 | 1174 | if (num >= 1 && num <= maxDay) { 1175 | return num.toString().padStart(2, "0"); 1176 | } else { 1177 | // Keep value % 10. In case of "0" use "01" 1178 | const normalizedValue = num % 10; 1179 | if (normalizedValue === 0) { 1180 | return "01"; 1181 | } else { 1182 | return normalizedValue.toString().padStart(2, "0"); 1183 | } 1184 | } 1185 | } 1186 | 1187 | function normalizeMonth(value: string | null): string | null { 1188 | if (!value || value === "") return null; 1189 | 1190 | const num = parseInt(value, 10); 1191 | if (isNaN(num)) return null; 1192 | 1193 | if (num >= 1 && num <= 12) { 1194 | return num.toString().padStart(2, "0"); 1195 | } else { 1196 | // Keep the last digit. Use "0" as the first digit. In case of "0" use "01" 1197 | const lastDigit = num % 10; 1198 | if (lastDigit === 0) { 1199 | return "01"; 1200 | } else { 1201 | return `0${lastDigit}`; 1202 | } 1203 | } 1204 | } 1205 | 1206 | function normalizeYear(value: string | null): string | null { 1207 | if (!value || value === "") return null; 1208 | 1209 | const num = parseInt(value, 10); 1210 | if (isNaN(num)) return null; 1211 | 1212 | if (num >= MIN_YEAR && num <= MAX_YEAR) { 1213 | return num.toString(); 1214 | } else { 1215 | // Keep the last two year digits and use "20" as the first two digits if the resulting year is not in the future; otherwise, use "19" as the first two digits 1216 | const lastTwoDigits = num % 100; 1217 | const currentYear = new Date().getFullYear(); 1218 | const candidate20 = 2000 + lastTwoDigits; 1219 | const candidate19 = 1900 + lastTwoDigits; 1220 | 1221 | // Use "20" if the resulting year is not in the future; otherwise, use "19" 1222 | if (candidate20 <= currentYear) { 1223 | return candidate20.toString(); 1224 | } else { 1225 | return candidate19.toString(); 1226 | } 1227 | } 1228 | } 1229 | 1230 | // Validation functions 1231 | function isDayInvalid(value: string | null, month: string | null, year: string | null): boolean { 1232 | if (!value || value === "") return false; 1233 | 1234 | const num = parseInt(value, 10); 1235 | if (isNaN(num)) return true; 1236 | 1237 | // Calculate max days for the current month/year 1238 | let maxDay = 31; 1239 | if (month && year) { 1240 | const monthNum = parseInt(month, 10); 1241 | const yearNum = parseInt(year, 10); 1242 | if (!isNaN(monthNum) && !isNaN(yearNum)) { 1243 | maxDay = new Date(yearNum, monthNum, 0).getDate(); 1244 | } 1245 | } 1246 | 1247 | return num < 1 || num > maxDay; 1248 | } 1249 | 1250 | function isMonthInvalid(value: string | null): boolean { 1251 | if (!value || value === "") return false; 1252 | 1253 | const num = parseInt(value, 10); 1254 | if (isNaN(num)) return true; 1255 | 1256 | return num < 1 || num > 12; 1257 | } 1258 | 1259 | function isYearInvalid(value: string | null): boolean { 1260 | if (!value || value === "") return false; 1261 | 1262 | const num = parseInt(value, 10); 1263 | if (isNaN(num)) return true; 1264 | 1265 | // Invalid if out of the minimum and maximum year range 1266 | return num < MIN_YEAR || num > MAX_YEAR; 1267 | } 1268 | ```