This is page 129 of 179. Use http://codebase.md/xmlui-org/xmlui?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/TimeInput/TimeInputNative.tsx: -------------------------------------------------------------------------------- ```typescript 1 | import { 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 "./TimeInput.module.scss"; 13 | import { PartialInput } from "../Input/PartialInput"; 14 | import { InputDivider } from "../Input/InputDivider"; 15 | 16 | import type { RegisterComponentApiFn, UpdateStateFn } from "../../abstractions/RendererDefs"; 17 | import { useEvent } from "../../components-core/utils/misc"; 18 | import type { ValidationStatus } from "../abstractions"; 19 | import { Adornment } from "../Input/InputAdornment"; 20 | import Icon from "../Icon/IconNative"; 21 | 22 | // Import utilities and types from merged utils file 23 | import { 24 | getHours, 25 | getMinutes, 26 | getSeconds, 27 | convert24to12, 28 | getAmPmLabels, 29 | safeMax, 30 | safeMin, 31 | type AmPmType, 32 | } from "./utils"; 33 | 34 | // Component part names 35 | const PART_HOUR = "hour"; 36 | const PART_MINUTE = "minute"; 37 | const PART_SECOND = "second"; 38 | const PART_AMPM = "ampm"; 39 | const PART_CLEAR_BUTTON = "clearButton"; 40 | 41 | // Browser compatibility checks 42 | // Time format configuration flags 43 | export type TimeInputConfig = { 44 | hour24: boolean; 45 | seconds: boolean; 46 | }; 47 | 48 | type Props = { 49 | id?: string; 50 | initialValue?: string; 51 | value?: string; 52 | enabled?: boolean; 53 | updateState?: UpdateStateFn; 54 | style?: CSSProperties; 55 | className?: string; 56 | onDidChange?: (newValue: string | null) => void; 57 | onFocus?: (ev: React.FocusEvent<HTMLDivElement>) => void; 58 | onBlur?: (ev: React.FocusEvent<HTMLDivElement>) => void; 59 | onInvalidChange?: () => void; 60 | validationStatus?: ValidationStatus; 61 | registerComponentApi?: RegisterComponentApiFn; 62 | hour24?: boolean; 63 | seconds?: boolean; 64 | minTime?: string; 65 | maxTime?: string; 66 | clearable?: boolean; 67 | clearIcon?: string; 68 | clearToInitialValue?: boolean; 69 | required?: boolean; 70 | startText?: string; 71 | startIcon?: string; 72 | endText?: string; 73 | endIcon?: string; 74 | gap?: string; 75 | readOnly?: boolean; 76 | autoFocus?: boolean; 77 | emptyCharacter?: string; 78 | }; 79 | 80 | export const defaultProps = { 81 | enabled: true, 82 | validationStatus: "none" as ValidationStatus, 83 | hour24: true, 84 | seconds: false, 85 | clearable: false, 86 | clearToInitialValue: true, 87 | required: false, 88 | readOnly: false, 89 | autoFocus: false, 90 | emptyCharacter: "-", 91 | }; 92 | 93 | export const TimeInputNative = forwardRef<HTMLDivElement, Props>(function TimeInputNative( 94 | { 95 | id, 96 | initialValue, 97 | value: controlledValue, 98 | enabled = defaultProps.enabled, 99 | updateState, 100 | style, 101 | className, 102 | onDidChange, 103 | onFocus, 104 | onBlur, 105 | onInvalidChange, 106 | validationStatus = defaultProps.validationStatus, 107 | registerComponentApi, 108 | hour24 = defaultProps.hour24, 109 | seconds = defaultProps.seconds, 110 | minTime, 111 | maxTime, 112 | clearable = defaultProps.clearable, 113 | clearIcon, 114 | clearToInitialValue = defaultProps.clearToInitialValue, 115 | required = defaultProps.required, 116 | startText, 117 | startIcon, 118 | endText, 119 | endIcon, 120 | gap, 121 | readOnly = defaultProps.readOnly, 122 | autoFocus = defaultProps.autoFocus, 123 | emptyCharacter = defaultProps.emptyCharacter, 124 | ...rest 125 | }, 126 | ref, 127 | ) { 128 | const timeInputRef = useRef<HTMLDivElement>(null); 129 | 130 | // Refs for auto-tabbing between inputs 131 | const hourInputRef = useRef<HTMLInputElement>(null); 132 | const minuteInputRef = useRef<HTMLInputElement>(null); 133 | const secondInputRef = useRef<HTMLInputElement>(null); 134 | const amPmButtonRef = useRef<HTMLButtonElement>(null); 135 | 136 | // Process emptyCharacter according to requirements 137 | const processedEmptyCharacter = useMemo(() => { 138 | if (!emptyCharacter || emptyCharacter.length === 0) { 139 | return "-"; 140 | } 141 | if (emptyCharacter.length > 1) { 142 | return emptyCharacter.charAt(0); 143 | } 144 | return emptyCharacter; 145 | }, [emptyCharacter]); 146 | 147 | // Stabilize initialValue to prevent unnecessary re-renders 148 | const stableInitialValue = useMemo(() => { 149 | return initialValue; 150 | }, [initialValue]); 151 | 152 | // Local state management - sync with value prop (like TextBox and NumberBox) 153 | const [localValue, setLocalValue] = useState<string | null>(() => { 154 | const initial = controlledValue || stableInitialValue || null; 155 | return initial; 156 | }); 157 | 158 | // Parse current value into individual components 159 | const [amPm, setAmPm] = useState<AmPmType | null>(null); 160 | const [hour, setHour] = useState<string | null>(null); 161 | const [minute, setMinute] = useState<string | null>(null); 162 | const [second, setSecond] = useState<string | null>(null); 163 | 164 | // Track whether the component currently has focus 165 | const [componentHasFocus, setComponentHasFocus] = useState(false); 166 | 167 | // State to track invalid status for visual feedback 168 | const [isHourCurrentlyInvalid, setIsHourCurrentlyInvalid] = useState(false); 169 | const [isMinuteCurrentlyInvalid, setIsMinuteCurrentlyInvalid] = useState(false); 170 | const [isSecondCurrentlyInvalid, setIsSecondCurrentlyInvalid] = useState(false); 171 | 172 | useEffect(() => { 173 | // Initialize XMLUI state with initial value on first mount 174 | if (updateState && stableInitialValue !== undefined && controlledValue === undefined) { 175 | updateState({ value: stableInitialValue }, { initial: true }); 176 | return; // Don't sync on this first run, let the state update trigger a re-render 177 | } 178 | 179 | // Sync with controlled value - always sync when controlledValue changes 180 | const newLocalValue = controlledValue || null; 181 | setLocalValue(newLocalValue); 182 | }, [controlledValue, stableInitialValue, updateState]); 183 | 184 | // Determine what components to show based on flags 185 | const is12HourFormat = !hour24; 186 | const showSeconds = seconds; 187 | const showLeadingZeros = hour24; // Always show leading zeros in 24-hour format 188 | 189 | // Parse value into individual components 190 | useEffect(() => { 191 | if (localValue) { 192 | const { 193 | amPm: parsedAmPm, 194 | hour: hourStr, 195 | minute: minuteStr, 196 | second: secondStr, 197 | } = parseTimeString(localValue, is12HourFormat); 198 | 199 | setAmPm(parsedAmPm); 200 | setHour(hourStr); 201 | setMinute(minuteStr); 202 | setSecond(secondStr); 203 | } else { 204 | setAmPm(null); 205 | setHour(null); 206 | setMinute(null); 207 | setSecond(null); 208 | } 209 | }, [localValue, is12HourFormat]); 210 | 211 | // Event handlers 212 | const handleChange = useEvent((newValue: string | null) => { 213 | // Update local state immediately for immediate UI feedback 214 | setLocalValue(newValue); 215 | 216 | // Also update the XMLUI state 217 | if (updateState) { 218 | updateState({ value: newValue }); 219 | } 220 | onDidChange?.(newValue); 221 | }); 222 | 223 | // Helper function to format the complete time value 224 | const formatTimeValue = useCallback( 225 | ( 226 | h: string | null, 227 | m: string | null, 228 | s: string | null, 229 | ap: AmPmType | null, 230 | is12Hour: boolean, 231 | ): string | null => { 232 | if (!h || !m) { 233 | return null; 234 | } 235 | 236 | let formattedTime = ""; 237 | 238 | if (is12Hour) { 239 | // 12-hour format 240 | const hour12 = h.padStart(2, "0"); 241 | const minute12 = m.padStart(2, "0"); 242 | formattedTime = `${hour12}:${minute12}`; 243 | 244 | if (s && showSeconds) { 245 | formattedTime += `:${s.padStart(2, "0")}`; 246 | } 247 | 248 | if (ap) { 249 | formattedTime += ` ${ap}`; 250 | } 251 | } else { 252 | // 24-hour format 253 | const hour24 = h.padStart(2, "0"); 254 | const minute24 = m.padStart(2, "0"); 255 | formattedTime = `${hour24}:${minute24}`; 256 | 257 | if (s && showSeconds) { 258 | formattedTime += `:${s.padStart(2, "0")}`; 259 | } 260 | } 261 | 262 | return formattedTime; 263 | }, 264 | [showSeconds], 265 | ); 266 | 267 | // Generic handlers for input change and blur 268 | const createInputChangeHandler = useCallback( 269 | ( 270 | field: "hour" | "minute" | "second", 271 | setValue: (value: string) => void, 272 | setInvalid: (invalid: boolean) => void, 273 | validateFn: (value: string) => boolean, 274 | ) => 275 | (event: React.ChangeEvent<HTMLInputElement>) => { 276 | const newValue = event.target.value; 277 | setValue(newValue); 278 | // Update invalid state immediately for visual feedback 279 | const isInvalid = validateFn(newValue); 280 | setInvalid(isInvalid); 281 | // Fire invalidTime event if the value is invalid 282 | if (isInvalid) { 283 | onInvalidChange?.(); 284 | } 285 | // Don't format/normalize during typing - only on blur 286 | }, 287 | [onInvalidChange], 288 | ); 289 | 290 | const createInputBlurHandler = useCallback( 291 | ( 292 | field: "hour" | "minute" | "second", 293 | setValue: (value: string) => void, 294 | setInvalid: (invalid: boolean) => void, 295 | normalizeFn: (value: string) => string | null, 296 | ) => 297 | (event: React.FocusEvent<HTMLInputElement>) => { 298 | const currentValue = event.target.value; 299 | const normalizedValue = normalizeFn(currentValue); 300 | 301 | // Check if the current value was invalid (needed normalization or couldn't be normalized) 302 | const wasInvalid = 303 | currentValue !== "" && (normalizedValue === null || normalizedValue !== currentValue); 304 | 305 | if (normalizedValue !== null && normalizedValue !== currentValue) { 306 | setValue(normalizedValue); 307 | setInvalid(false); // Clear invalid state after normalization 308 | 309 | // Always call handleChange to update the time value 310 | const timeValues = { hour, minute, second }; 311 | timeValues[field] = normalizedValue; 312 | const timeString = formatTimeValue( 313 | timeValues.hour, 314 | timeValues.minute, 315 | timeValues.second, 316 | amPm, 317 | is12HourFormat, 318 | ); 319 | handleChange(timeString); 320 | } else if (normalizedValue === null && currentValue !== "") { 321 | // Reset to previous valid value or clear 322 | setValue(""); 323 | setInvalid(false); // Clear invalid state 324 | // Always call handleChange to update the time value (likely to null) 325 | const timeValues = { hour, minute, second }; 326 | timeValues[field] = ""; 327 | const timeString = formatTimeValue( 328 | timeValues.hour, 329 | timeValues.minute, 330 | timeValues.second, 331 | amPm, 332 | is12HourFormat, 333 | ); 334 | handleChange(timeString); 335 | } else if (normalizedValue !== null) { 336 | // Value didn't need normalization, but still update the complete time 337 | const timeValues = { hour, minute, second }; 338 | timeValues[field] = normalizedValue; 339 | const timeString = formatTimeValue( 340 | timeValues.hour, 341 | timeValues.minute, 342 | timeValues.second, 343 | amPm, 344 | is12HourFormat, 345 | ); 346 | handleChange(timeString); 347 | } 348 | }, 349 | [hour, minute, second, formatTimeValue, amPm, is12HourFormat, handleChange], 350 | ); 351 | 352 | // Handle changes from individual inputs 353 | const handleHourChange = useMemo( 354 | () => 355 | createInputChangeHandler("hour", setHour, setIsHourCurrentlyInvalid, (value) => 356 | isHourInvalid(value, !is12HourFormat), 357 | ), 358 | [createInputChangeHandler, is12HourFormat], 359 | ); 360 | 361 | const handleHourBlur = useMemo( 362 | () => 363 | createInputBlurHandler("hour", setHour, setIsHourCurrentlyInvalid, (value) => 364 | normalizeHour(value, !is12HourFormat), 365 | ), 366 | [createInputBlurHandler, is12HourFormat], 367 | ); 368 | 369 | const handleMinuteChange = useMemo( 370 | () => 371 | createInputChangeHandler( 372 | "minute", 373 | setMinute, 374 | setIsMinuteCurrentlyInvalid, 375 | isMinuteOrSecondInvalid, 376 | ), 377 | [createInputChangeHandler], 378 | ); 379 | 380 | const handleMinuteBlur = useMemo( 381 | () => 382 | createInputBlurHandler( 383 | "minute", 384 | setMinute, 385 | setIsMinuteCurrentlyInvalid, 386 | normalizeMinuteOrSecond, 387 | ), 388 | [createInputBlurHandler], 389 | ); 390 | 391 | const handleSecondChange = useMemo( 392 | () => 393 | createInputChangeHandler( 394 | "second", 395 | setSecond, 396 | setIsSecondCurrentlyInvalid, 397 | isMinuteOrSecondInvalid, 398 | ), 399 | [createInputChangeHandler], 400 | ); 401 | 402 | const handleSecondBlur = useMemo( 403 | () => 404 | createInputBlurHandler( 405 | "second", 406 | setSecond, 407 | setIsSecondCurrentlyInvalid, 408 | normalizeMinuteOrSecond, 409 | ), 410 | [createInputBlurHandler], 411 | ); 412 | 413 | const handleAmPmToggle = useCallback(() => { 414 | const newAmPm: AmPmType = amPm === "am" ? "pm" : "am"; 415 | setAmPm(newAmPm); 416 | 417 | // Always call handleChange to update the time value 418 | const timeString = formatTimeValue(hour, minute, second, newAmPm, is12HourFormat); 419 | handleChange(timeString); 420 | }, [amPm, formatTimeValue, hour, minute, second, is12HourFormat, handleChange]); 421 | 422 | const handleAmPmSet = useCallback( 423 | (targetAmPm: AmPmType) => { 424 | if (amPm === targetAmPm) return; // No change needed 425 | 426 | setAmPm(targetAmPm); 427 | 428 | // Always call handleChange to update the time value 429 | const timeString = formatTimeValue(hour, minute, second, targetAmPm, is12HourFormat); 430 | handleChange(timeString); 431 | }, 432 | [amPm, formatTimeValue, hour, minute, second, is12HourFormat, handleChange], 433 | ); 434 | 435 | // Focus method 436 | const focus = useCallback(() => { 437 | const input = timeInputRef.current?.querySelector( 438 | 'input[type="time"], input[name*="hour"], input[name*="minute"]', 439 | ) as HTMLInputElement; 440 | input?.focus(); 441 | }, []); 442 | 443 | // Custom focus handler that fires gotFocus when component gains focus 444 | const handleComponentFocus = useCallback( 445 | (event: React.FocusEvent<HTMLDivElement>) => { 446 | // If component didn't have focus before, fire gotFocus 447 | if (!componentHasFocus) { 448 | setComponentHasFocus(true); 449 | onFocus?.(event); 450 | } 451 | }, 452 | [componentHasFocus, onFocus], 453 | ); 454 | 455 | // Custom blur handler that only fires lostFocus when focus leaves the entire component 456 | const handleComponentBlur = useCallback( 457 | (event: React.FocusEvent<HTMLDivElement>) => { 458 | // Check if the new focus target is still within this TimeInput component 459 | const relatedTarget = event.relatedTarget as HTMLElement; 460 | const currentTarget = event.currentTarget; 461 | 462 | // If there's no related target, or the related target is not within this component, fire lostFocus 463 | if (!relatedTarget || !currentTarget.contains(relatedTarget)) { 464 | setComponentHasFocus(false); 465 | onBlur?.(event); 466 | } 467 | }, 468 | [onBlur], 469 | ); 470 | 471 | // Arrow key navigation handler 472 | const createArrowKeyHandler = useCallback(() => { 473 | return (event: React.KeyboardEvent<HTMLInputElement | HTMLButtonElement>) => { 474 | const { key } = event; 475 | 476 | if (key === "ArrowRight") { 477 | event.preventDefault(); 478 | const currentTarget = event.target as HTMLInputElement | HTMLButtonElement; 479 | 480 | // Determine next input based on current input 481 | if (currentTarget === hourInputRef.current && minuteInputRef.current) { 482 | minuteInputRef.current.focus(); 483 | minuteInputRef.current.select(); 484 | } else if (currentTarget === minuteInputRef.current) { 485 | if (showSeconds && secondInputRef.current) { 486 | secondInputRef.current.focus(); 487 | secondInputRef.current.select(); 488 | } else if (!showSeconds && is12HourFormat && amPmButtonRef.current) { 489 | amPmButtonRef.current.focus(); 490 | } 491 | } else if ( 492 | currentTarget === secondInputRef.current && 493 | is12HourFormat && 494 | amPmButtonRef.current 495 | ) { 496 | amPmButtonRef.current.focus(); 497 | } 498 | } else if (key === "ArrowLeft") { 499 | event.preventDefault(); 500 | const currentTarget = event.target as HTMLInputElement | HTMLButtonElement; 501 | 502 | // Determine previous input based on current input 503 | if (currentTarget === minuteInputRef.current && hourInputRef.current) { 504 | hourInputRef.current.focus(); 505 | hourInputRef.current.select(); 506 | } else if (currentTarget === secondInputRef.current && minuteInputRef.current) { 507 | minuteInputRef.current.focus(); 508 | minuteInputRef.current.select(); 509 | } else if (currentTarget === amPmButtonRef.current) { 510 | if (showSeconds && secondInputRef.current) { 511 | secondInputRef.current.focus(); 512 | secondInputRef.current.select(); 513 | } else if (!showSeconds && minuteInputRef.current) { 514 | minuteInputRef.current.focus(); 515 | minuteInputRef.current.select(); 516 | } 517 | } 518 | } 519 | }; 520 | }, [showSeconds, is12HourFormat]); 521 | 522 | // Create the arrow key handler instance 523 | const handleArrowKeys = createArrowKeyHandler(); 524 | 525 | const clear = useCallback(() => { 526 | // Reset to initial value if provided, otherwise null 527 | let valueToReset = clearToInitialValue 528 | ? stableInitialValue !== undefined 529 | ? stableInitialValue 530 | : null 531 | : null; 532 | 533 | if (valueToReset) { 534 | const { 535 | amPm: amPmValue, 536 | hour: hourStr, 537 | minute: minuteStr, 538 | second: secondStr, 539 | } = parseTimeString(String(valueToReset), is12HourFormat); 540 | 541 | setHour(hourStr); 542 | setMinute(minuteStr); 543 | setSecond(secondStr); 544 | setAmPm(amPmValue); 545 | } else { 546 | // Clear all fields 547 | setHour(null); 548 | setMinute(null); 549 | setSecond(null); 550 | setAmPm(null); 551 | } 552 | 553 | handleChange(valueToReset); 554 | 555 | // Focus the component after clearing 556 | setTimeout(() => { 557 | focus(); 558 | }, 0); 559 | }, [clearToInitialValue, stableInitialValue, handleChange, is12HourFormat, focus]); 560 | 561 | function stopPropagation(event: React.FocusEvent) { 562 | event.stopPropagation(); 563 | } 564 | 565 | const setValue = useEvent((newValue: string | null) => { 566 | handleChange(newValue); 567 | }); 568 | 569 | // Function to get ISO formatted time value (HH:MM:SS in 24-hour format) 570 | const getIsoValue = useCallback((): string | null => { 571 | if (!hour || !minute) { 572 | return null; 573 | } 574 | 575 | // Convert to 24-hour format if currently in 12-hour format 576 | let hour24: number; 577 | if (is12HourFormat && amPm) { 578 | const hourInt = parseInt(hour, 10); 579 | if (amPm === "am") { 580 | hour24 = hourInt === 12 ? 0 : hourInt; 581 | } else { 582 | // pm 583 | hour24 = hourInt === 12 ? 12 : hourInt + 12; 584 | } 585 | } else { 586 | hour24 = parseInt(hour, 10); 587 | } 588 | 589 | // Format as ISO time string (HH:MM:SS) 590 | const h24 = hour24.toString().padStart(2, "0"); 591 | const m24 = minute.padStart(2, "0"); 592 | const s24 = (second || "00").padStart(2, "0"); 593 | 594 | return `${h24}:${m24}:${s24}`; 595 | }, [hour, minute, second, amPm, is12HourFormat]); 596 | 597 | // Component API registration 598 | useImperativeHandle(ref, () => timeInputRef.current as HTMLDivElement); 599 | 600 | useEffect(() => { 601 | if (registerComponentApi) { 602 | registerComponentApi({ 603 | focus, 604 | setValue, 605 | isoValue: getIsoValue, 606 | }); 607 | } 608 | }, [registerComponentApi, focus, setValue, getIsoValue]); 609 | 610 | // Custom clear icon 611 | const clearIconElement = useMemo(() => { 612 | if (clearIcon === null || clearIcon === "null") return null; 613 | if (clearIcon) return <Icon name={clearIcon} />; 614 | // Default clear icon 615 | return ( 616 | <svg 617 | xmlns="http://www.w3.org/2000/svg" 618 | width={19} 619 | height={19} 620 | viewBox="0 0 19 19" 621 | stroke="currentColor" 622 | strokeWidth={2} 623 | aria-hidden="true" 624 | className={classnames(styles.clearButtonIcon, styles.buttonIcon)} 625 | > 626 | <line x1="4" x2="15" y1="4" y2="15" /> 627 | <line x1="15" x2="4" y1="4" y2="15" /> 628 | </svg> 629 | ); 630 | }, [clearIcon]); 631 | 632 | // Adornments 633 | const startAdornment = useMemo(() => { 634 | if (startIcon || startText) { 635 | return <Adornment iconName={startIcon} text={startText} className={styles.adornment} />; 636 | } 637 | return null; 638 | }, [startIcon, startText]); 639 | 640 | const endAdornment = useMemo(() => { 641 | if (endIcon || endText) { 642 | return <Adornment iconName={endIcon} text={endText} className={styles.adornment} />; 643 | } 644 | return null; 645 | }, [endIcon, endText]); 646 | 647 | const timeInputComponent = ( 648 | <div 649 | ref={timeInputRef} 650 | className={classnames( 651 | styles.timeInputWrapper, 652 | { 653 | [styles.error]: validationStatus === "error", 654 | [styles.warning]: validationStatus === "warning", 655 | [styles.valid]: validationStatus === "valid", 656 | [styles.disabled]: !enabled, 657 | [styles.readOnly]: readOnly, 658 | }, 659 | className, 660 | )} 661 | style={{ ...style, gap }} 662 | onFocusCapture={handleComponentFocus} 663 | onBlur={handleComponentBlur} 664 | data-validation-status={validationStatus} 665 | {...rest} 666 | > 667 | {startAdornment} 668 | <div className={styles.wrapper}> 669 | <div className={styles.inputGroup}> 670 | {/* Hour input */} 671 | <HourInput 672 | id={id} 673 | amPm={amPm} 674 | autoFocus={autoFocus} 675 | disabled={!enabled} 676 | inputRef={hourInputRef} 677 | nextInputRef={minuteInputRef} 678 | maxTime={maxTime} 679 | minTime={minTime} 680 | onChange={handleHourChange} 681 | onBlur={handleHourBlur} 682 | onKeyDown={handleArrowKeys} 683 | readOnly={readOnly} 684 | required={required} 685 | value={hour} 686 | isInvalid={isHourCurrentlyInvalid} 687 | is24Hour={!is12HourFormat} 688 | emptyCharacter={processedEmptyCharacter} 689 | /> 690 | 691 | <InputDivider separator=":" /> 692 | 693 | {/* Minute input */} 694 | <MinuteInput 695 | disabled={!enabled} 696 | hour={hour} 697 | inputRef={minuteInputRef} 698 | nextInputRef={showSeconds ? secondInputRef : undefined} 699 | nextButtonRef={showSeconds ? undefined : is12HourFormat ? amPmButtonRef : undefined} 700 | maxTime={maxTime} 701 | minTime={minTime} 702 | onChange={handleMinuteChange} 703 | onBlur={handleMinuteBlur} 704 | onKeyDown={handleArrowKeys} 705 | readOnly={readOnly} 706 | required={required} 707 | showLeadingZeros={showLeadingZeros} 708 | value={minute} 709 | isInvalid={isMinuteCurrentlyInvalid} 710 | emptyCharacter={processedEmptyCharacter} 711 | /> 712 | 713 | {/* Second input (if needed) */} 714 | {showSeconds && ( 715 | <> 716 | <InputDivider separator=":" className={styles.divider} /> 717 | <SecondInput 718 | disabled={!enabled} 719 | hour={hour} 720 | inputRef={secondInputRef} 721 | nextButtonRef={is12HourFormat ? amPmButtonRef : undefined} 722 | maxTime={maxTime} 723 | minTime={minTime} 724 | minute={minute} 725 | onChange={handleSecondChange} 726 | onBlur={handleSecondBlur} 727 | onKeyDown={handleArrowKeys} 728 | readOnly={readOnly} 729 | required={required} 730 | showLeadingZeros={showLeadingZeros} 731 | value={second} 732 | isInvalid={isSecondCurrentlyInvalid} 733 | emptyCharacter={processedEmptyCharacter} 734 | /> 735 | </> 736 | )} 737 | 738 | {/* AM/PM selector (if 12-hour format) */} 739 | {is12HourFormat && ( 740 | <AmPmButton 741 | className="timeinput" 742 | disabled={!enabled} 743 | buttonRef={amPmButtonRef} 744 | maxTime={maxTime} 745 | minTime={minTime} 746 | onClick={handleAmPmToggle} 747 | onAmPmSet={handleAmPmSet} 748 | onKeyDown={handleArrowKeys} 749 | value={amPm} 750 | /> 751 | )} 752 | </div> 753 | 754 | {clearable && ( 755 | <button 756 | data-part-id={PART_CLEAR_BUTTON} 757 | className={classnames(styles.clearButton, styles.button)} 758 | disabled={!enabled} 759 | onClick={clear} 760 | onFocus={stopPropagation} 761 | type="button" 762 | > 763 | {clearIconElement} 764 | </button> 765 | )} 766 | </div> 767 | {endAdornment} 768 | </div> 769 | ); 770 | 771 | return timeInputComponent; 772 | }); 773 | 774 | // AmPm component types and implementation 775 | type AmPmProps = { 776 | ariaLabel?: string; 777 | autoFocus?: boolean; 778 | className: string; 779 | disabled?: boolean; 780 | locale?: string; 781 | maxTime?: string; 782 | minTime?: string; 783 | onClick?: () => void; 784 | onAmPmSet?: (amPm: AmPmType) => void; 785 | onKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void; 786 | buttonRef?: React.RefObject<HTMLButtonElement | null>; 787 | required?: boolean; 788 | value?: string | null; 789 | }; 790 | 791 | function AmPmButton({ 792 | ariaLabel, 793 | autoFocus, 794 | className, 795 | disabled, 796 | locale, 797 | maxTime, 798 | minTime, 799 | onClick, 800 | onAmPmSet, 801 | onKeyDown, 802 | buttonRef, 803 | value, 804 | }: AmPmProps): React.ReactElement { 805 | const amDisabled = minTime ? convert24to12(getHours(minTime))[1] === "pm" : false; 806 | const pmDisabled = maxTime ? convert24to12(getHours(maxTime))[1] === "am" : false; 807 | 808 | const [amLabel, pmLabel] = getAmPmLabels(locale); 809 | 810 | // Determine if the button should be disabled based on time constraints 811 | const isDisabled = disabled || (value === "am" && pmDisabled) || (value === "pm" && amDisabled); 812 | 813 | const handleKeyDown = useCallback( 814 | (event: React.KeyboardEvent<HTMLButtonElement>) => { 815 | // First call the external key handler (for arrow navigation) 816 | if (onKeyDown) { 817 | onKeyDown(event); 818 | } 819 | 820 | // If the event was handled (preventDefault called), don't process further 821 | if (event.defaultPrevented || disabled) return; 822 | 823 | const key = event.key.toLowerCase(); 824 | 825 | // Handle 'a' or 'A' to set AM 826 | if (key === "a" && !amDisabled && value !== "am" && onAmPmSet) { 827 | event.preventDefault(); 828 | onAmPmSet("am"); 829 | } 830 | // Handle 'p' or 'P' to set PM 831 | else if (key === "p" && !pmDisabled && value !== "pm" && onAmPmSet) { 832 | event.preventDefault(); 833 | onAmPmSet("pm"); 834 | } 835 | }, 836 | [onKeyDown, disabled, onAmPmSet, value, amDisabled, pmDisabled], 837 | ); 838 | 839 | return ( 840 | <button 841 | type="button" 842 | data-part-id={PART_AMPM} 843 | aria-label={ariaLabel || "Toggle AM/PM (Press A for AM, P for PM)"} 844 | autoFocus={autoFocus} 845 | className={classnames(styles.amPmButton, styles.button, className)} 846 | disabled={isDisabled} 847 | onClick={onClick} 848 | onKeyDown={handleKeyDown} 849 | ref={buttonRef as React.RefObject<HTMLButtonElement>} 850 | > 851 | <span className={styles.amPmValue}> 852 | {value ? (value === "am" ? amLabel : pmLabel) : "--"} 853 | </span> 854 | </button> 855 | ); 856 | } 857 | 858 | // HourInput component (unified for both 12-hour and 24-hour formats) 859 | // Generic input properties used by time input components 860 | type TimeInputElementProps = { 861 | ariaLabel?: string; 862 | autoFocus?: boolean; 863 | disabled?: boolean; 864 | inputRef?: React.RefObject<HTMLInputElement | null>; 865 | nextInputRef?: React.RefObject<HTMLInputElement | null>; 866 | nextButtonRef?: React.RefObject<HTMLButtonElement | null>; 867 | onChange?: (event: React.ChangeEvent<HTMLInputElement> & { target: HTMLInputElement }) => void; 868 | onBlur?: (event: React.FocusEvent<HTMLInputElement> & { target: HTMLInputElement }) => void; 869 | onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement> & { target: HTMLInputElement }) => void; 870 | placeholder?: string; 871 | readOnly?: boolean; 872 | required?: boolean; 873 | step?: number; 874 | }; 875 | 876 | // HourInput component 877 | type HourInputProps = { 878 | id?: string; 879 | amPm?: AmPmType | null; 880 | maxTime?: string; 881 | minTime?: string; 882 | value?: string | null; 883 | isInvalid?: boolean; 884 | is24Hour?: boolean; // true for 24-hour format, false for 12-hour format 885 | emptyCharacter?: string; 886 | } & Omit<TimeInputElementProps, "max" | "min" | "name" | "nameForClass" | "value">; 887 | 888 | function HourInput({ 889 | id, 890 | amPm, 891 | maxTime, 892 | minTime, 893 | value, 894 | isInvalid = false, 895 | is24Hour = false, 896 | emptyCharacter = "-", 897 | ...otherProps 898 | }: HourInputProps): React.ReactElement { 899 | // Calculate min/max based on format 900 | const { minHour, maxHour } = (() => { 901 | if (is24Hour) { 902 | // 24-hour format: 0-23 903 | return { 904 | maxHour: safeMin(23, maxTime && getHours(maxTime)), 905 | minHour: safeMax(0, minTime && getHours(minTime)), 906 | }; 907 | } else { 908 | // 12-hour format: 1-12 909 | const maxHour = safeMin( 910 | 12, 911 | maxTime && 912 | (() => { 913 | const [maxHourResult, maxAmPm] = convert24to12(getHours(maxTime)); 914 | 915 | if (maxAmPm !== amPm) { 916 | // pm is always after am, so we should ignore validation 917 | return null; 918 | } 919 | 920 | return maxHourResult; 921 | })(), 922 | ); 923 | 924 | const minHour = safeMax( 925 | 1, 926 | minTime && 927 | (() => { 928 | const [minHourResult, minAmPm] = convert24to12(getHours(minTime)); 929 | 930 | if ( 931 | // pm is always after am, so we should ignore validation 932 | minAmPm !== amPm || 933 | // If minHour is 12 am/pm, user should be able to enter 12, 1, ..., 11. 934 | minHourResult === 12 935 | ) { 936 | return null; 937 | } 938 | 939 | return minHourResult; 940 | })(), 941 | ); 942 | 943 | return { maxHour, minHour }; 944 | } 945 | })(); 946 | 947 | // Always show the raw value during typing, no conversion 948 | // This allows users to see invalid input like "23" before it gets normalized on blur 949 | const displayValue = value || ""; 950 | 951 | return ( 952 | <PartialInput 953 | id={id} 954 | data-part-id={PART_HOUR} 955 | value={displayValue} 956 | emptyCharacter={emptyCharacter} 957 | placeholderLength={2} 958 | max={maxHour} 959 | min={minHour} 960 | maxLength={2} 961 | validateFn={(val) => isHourInvalid(val, is24Hour)} 962 | onChange={otherProps.onChange} 963 | onBlur={(direction, event) => { 964 | // PartialInput provides direction, but the current onBlur expects just the event 965 | if (otherProps.onBlur) { 966 | otherProps.onBlur(event); 967 | } 968 | }} 969 | onKeyDown={otherProps.onKeyDown} 970 | className={classnames(styles.input, styles.hour)} 971 | invalidClassName={styles.invalid} 972 | disabled={otherProps.disabled} 973 | readOnly={otherProps.readOnly} 974 | required={otherProps.required} 975 | autoFocus={otherProps.autoFocus} 976 | inputRef={otherProps.inputRef} 977 | nextInputRef={otherProps.nextInputRef} 978 | nextButtonRef={otherProps.nextButtonRef} 979 | name={is24Hour ? "hour24" : "hour12"} 980 | ariaLabel={otherProps.ariaLabel} 981 | isInvalid={isInvalid} 982 | /> 983 | ); 984 | } 985 | 986 | // MinuteInput component 987 | type MinuteInputProps = { 988 | hour?: string | null; 989 | maxTime?: string; 990 | minTime?: string; 991 | showLeadingZeros?: boolean; 992 | value?: string | null; 993 | isInvalid?: boolean; 994 | emptyCharacter?: string; 995 | } & Omit<TimeInputElementProps, "max" | "min" | "name" | "value">; 996 | 997 | function MinuteInput({ 998 | hour, 999 | maxTime, 1000 | minTime, 1001 | showLeadingZeros = true, 1002 | value, 1003 | isInvalid = false, 1004 | emptyCharacter = "-", 1005 | ...otherProps 1006 | }: MinuteInputProps): React.ReactElement { 1007 | function isSameHour(date: string | Date) { 1008 | return hour === getHours(date).toString(); 1009 | } 1010 | 1011 | const maxMinute = safeMin(59, maxTime && isSameHour(maxTime) && getMinutes(maxTime)); 1012 | const minMinute = safeMax(0, minTime && isSameHour(minTime) && getMinutes(minTime)); 1013 | 1014 | return ( 1015 | <PartialInput 1016 | data-part-id={PART_MINUTE} 1017 | max={maxMinute} 1018 | min={minMinute} 1019 | name="minute" 1020 | value={value} 1021 | validateFn={isMinuteOrSecondInvalid} 1022 | emptyCharacter={emptyCharacter} 1023 | placeholderLength={2} 1024 | maxLength={2} 1025 | onChange={otherProps.onChange} 1026 | onBlur={(direction, event) => { 1027 | // PartialInput provides direction, but the current onBlur expects just the event 1028 | if (otherProps.onBlur) { 1029 | otherProps.onBlur(event); 1030 | } 1031 | }} 1032 | onKeyDown={otherProps.onKeyDown} 1033 | className={classnames(styles.input, styles.minute)} 1034 | invalidClassName={styles.invalid} 1035 | disabled={otherProps.disabled} 1036 | readOnly={otherProps.readOnly} 1037 | required={otherProps.required} 1038 | autoFocus={otherProps.autoFocus} 1039 | inputRef={otherProps.inputRef} 1040 | nextInputRef={otherProps.nextInputRef} 1041 | nextButtonRef={otherProps.nextButtonRef} 1042 | ariaLabel={otherProps.ariaLabel} 1043 | isInvalid={isInvalid} 1044 | /> 1045 | ); 1046 | } 1047 | 1048 | // SecondInput component 1049 | type SecondInputProps = { 1050 | hour?: string | null; 1051 | maxTime?: string; 1052 | minTime?: string; 1053 | minute?: string | null; 1054 | showLeadingZeros?: boolean; 1055 | value?: string | null; 1056 | isInvalid?: boolean; 1057 | emptyCharacter?: string; 1058 | } & Omit<TimeInputElementProps, "max" | "min" | "name" | "value">; 1059 | 1060 | function SecondInput({ 1061 | hour, 1062 | maxTime, 1063 | minTime, 1064 | minute, 1065 | showLeadingZeros = true, 1066 | value, 1067 | isInvalid = false, 1068 | emptyCharacter = "-", 1069 | ...otherProps 1070 | }: SecondInputProps): React.ReactElement { 1071 | function isSameMinute(date: string | Date) { 1072 | return hour === getHours(date).toString() && minute === getMinutes(date).toString(); 1073 | } 1074 | 1075 | const maxSecond = safeMin(59, maxTime && isSameMinute(maxTime) && getSeconds(maxTime)); 1076 | const minSecond = safeMax(0, minTime && isSameMinute(minTime) && getSeconds(minTime)); 1077 | 1078 | return ( 1079 | <PartialInput 1080 | data-part-id={PART_SECOND} 1081 | max={maxSecond} 1082 | min={minSecond} 1083 | name="second" 1084 | value={value} 1085 | validateFn={isMinuteOrSecondInvalid} 1086 | emptyCharacter={emptyCharacter} 1087 | placeholderLength={2} 1088 | maxLength={2} 1089 | onChange={otherProps.onChange} 1090 | onBlur={(direction, event) => { 1091 | // PartialInput provides direction, but the current onBlur expects just the event 1092 | if (otherProps.onBlur) { 1093 | otherProps.onBlur(event); 1094 | } 1095 | }} 1096 | onKeyDown={otherProps.onKeyDown} 1097 | className={classnames(styles.input, styles.second)} 1098 | invalidClassName={styles.invalid} 1099 | disabled={otherProps.disabled} 1100 | readOnly={otherProps.readOnly} 1101 | required={otherProps.required} 1102 | autoFocus={otherProps.autoFocus} 1103 | inputRef={otherProps.inputRef} 1104 | nextInputRef={otherProps.nextInputRef} 1105 | nextButtonRef={otherProps.nextButtonRef} 1106 | ariaLabel={otherProps.ariaLabel} 1107 | isInvalid={isInvalid} 1108 | /> 1109 | ); 1110 | } 1111 | 1112 | // Utility function to parse time string into components 1113 | function parseTimeString(timeValue: any, targetIs12Hour: boolean = false) { 1114 | // Handle non-string values gracefully 1115 | if (timeValue == null || timeValue === undefined) { 1116 | return { 1117 | amPm: null, 1118 | hour: "", 1119 | minute: "", 1120 | second: "", 1121 | }; 1122 | } 1123 | 1124 | // If not a string, return empty values for type safety 1125 | if (typeof timeValue !== "string") { 1126 | return { 1127 | amPm: null, 1128 | hour: "", 1129 | minute: "", 1130 | second: "", 1131 | }; 1132 | } 1133 | 1134 | const timeString = timeValue; 1135 | const normalizedTimeString = timeString.toLowerCase(); 1136 | 1137 | // Check if the time string contains AM/PM 1138 | const hasAmPm = normalizedTimeString.includes("am") || normalizedTimeString.includes("pm"); 1139 | const isAmPmPm = normalizedTimeString.includes("pm"); 1140 | 1141 | // Extract just the time part (remove AM/PM suffix) 1142 | const timePart = normalizedTimeString.replace(/\s*(am|pm)\s*$/i, "").trim(); 1143 | 1144 | let parsedHour = getHours(timePart); 1145 | let parsedMinute = getMinutes(timePart); 1146 | let parsedSecond = getSeconds(timePart); 1147 | 1148 | // If parsing with the current format fails (all zeros), try ISO time format 1149 | if ( 1150 | parsedHour === 0 && 1151 | parsedMinute === 0 && 1152 | parsedSecond === 0 && 1153 | timePart !== "00:00:00" && 1154 | timePart !== "00:00" 1155 | ) { 1156 | try { 1157 | // Try parsing as ISO time format using Date constructor 1158 | const isoDate = new Date(`1970-01-01T${timePart}`); 1159 | if (!isNaN(isoDate.getTime())) { 1160 | parsedHour = isoDate.getHours(); 1161 | parsedMinute = isoDate.getMinutes(); 1162 | parsedSecond = isoDate.getSeconds(); 1163 | } 1164 | } catch { 1165 | // If ISO parsing fails, keep the original parsed values (zeros) 1166 | } 1167 | } 1168 | 1169 | // Set AM/PM based on the actual string content or convert from 24-hour 1170 | let amPmValue: AmPmType | null = null; 1171 | let displayHour = parsedHour; 1172 | 1173 | if (hasAmPm) { 1174 | // String already has AM/PM, use the hour as-is (should be 1-12) 1175 | amPmValue = isAmPmPm ? "pm" : "am"; 1176 | } else { 1177 | // If no AM/PM in string, derive it from 24-hour format 1178 | const [hour12, amPm12] = convert24to12(parsedHour); 1179 | amPmValue = amPm12; 1180 | 1181 | // If target format is 12-hour, convert the hour value 1182 | if (targetIs12Hour) { 1183 | displayHour = hour12; 1184 | } 1185 | } 1186 | 1187 | // Format hour value appropriately 1188 | const hourStr = displayHour.toString().padStart(2, "0"); 1189 | const minuteStr = parsedMinute.toString().padStart(2, "0"); 1190 | const secondStr = parsedSecond.toString().padStart(2, "0"); 1191 | 1192 | return { 1193 | amPm: amPmValue, 1194 | hour: hourStr, 1195 | minute: minuteStr, 1196 | second: secondStr, 1197 | }; 1198 | } 1199 | 1200 | // Normalize the hour value based on 12/24 hour format 1201 | function normalizeHour(value: string | null, is24Hour: boolean): string | null { 1202 | if (!value || value === "") return null; 1203 | 1204 | const num = parseInt(value, 10); 1205 | if (isNaN(num)) return null; 1206 | 1207 | if (is24Hour) { 1208 | // 24-hour format: 0-23 1209 | if (num >= 0 && num <= 23) { 1210 | return num.toString().padStart(2, "0"); 1211 | } else { 1212 | // For out-of-range values, use value % 10 1213 | const corrected = num % 10; 1214 | return corrected.toString().padStart(2, "0"); 1215 | } 1216 | } else { 1217 | // 12-hour format: 1-12 1218 | if (num >= 1 && num <= 12) { 1219 | return num.toString().padStart(2, "0"); 1220 | } else if (num === 0) { 1221 | return "12"; // 0 becomes 12 in 12-hour format 1222 | } else { 1223 | // For out-of-range values, use value % 10, but ensure it's 1-12 1224 | let corrected = num % 10; 1225 | if (corrected === 0) corrected = 12; // 0 becomes 12 in 12-hour format 1226 | return corrected.toString().padStart(2, "0"); 1227 | } 1228 | } 1229 | } 1230 | 1231 | // Normalize the minute or second value 1232 | function normalizeMinuteOrSecond(value: string | null): string | null { 1233 | if (!value || value === "") return null; 1234 | 1235 | const num = parseInt(value, 10); 1236 | if (isNaN(num)) return null; 1237 | 1238 | if (num >= 0 && num <= 59) { 1239 | return num.toString().padStart(2, "0"); 1240 | } else { 1241 | // For out-of-range values, use value % 10 1242 | const corrected = num % 10; 1243 | return corrected.toString().padStart(2, "0"); 1244 | } 1245 | } 1246 | 1247 | // Helper functions to check if values are currently invalid (need normalization) 1248 | function isHourInvalid(value: string | null, is24Hour: boolean): boolean { 1249 | if (!value || value === "") return false; 1250 | 1251 | const num = parseInt(value, 10); 1252 | if (isNaN(num)) { 1253 | return true; 1254 | } 1255 | 1256 | const invalid = is24Hour ? num < 0 || num > 23 : num < 1 || num > 12; 1257 | return invalid; 1258 | } 1259 | 1260 | function isMinuteOrSecondInvalid(value: string | null): boolean { 1261 | if (!value || value === "") return false; 1262 | 1263 | const num = parseInt(value, 10); 1264 | if (isNaN(num)) { 1265 | return true; 1266 | } 1267 | 1268 | const invalid = num < 0 || num > 59; 1269 | return invalid; 1270 | } 1271 | ```