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