@tanrei/web 0.0.0-stage → 0.1.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/NOTICE +58 -0
- package/README.md +9743 -2
- package/custom-elements.json +86072 -0
- package/dist/THIRD_PARTY_LICENSES.md +136 -0
- package/dist/accordion.css +812 -0
- package/dist/app-shell.css +493 -0
- package/dist/avatar.css +80 -0
- package/dist/breadcrumbs.css +511 -0
- package/dist/callout.css +65 -0
- package/dist/code.css +595 -0
- package/dist/components/accordion/accordion.d.ts +197 -0
- package/dist/components/accordion/accordion.js +763 -0
- package/dist/components/accordion/accordion.js.map +1 -0
- package/dist/components/app-bar/app-bar.d.ts +107 -0
- package/dist/components/app-bar/app-bar.js +295 -0
- package/dist/components/app-bar/app-bar.js.map +1 -0
- package/dist/components/app-bar/app-bar.styles.d.ts +12 -0
- package/dist/components/app-bar/app-bar.styles.js +223 -0
- package/dist/components/app-bar/app-bar.styles.js.map +1 -0
- package/dist/components/app-shell/app-shell.d.ts +220 -0
- package/dist/components/app-shell/app-shell.js +677 -0
- package/dist/components/app-shell/app-shell.js.map +1 -0
- package/dist/components/avatar/avatar.d.ts +162 -0
- package/dist/components/avatar/avatar.js +390 -0
- package/dist/components/avatar/avatar.js.map +1 -0
- package/dist/components/avatar/avatar.styles.d.ts +9 -0
- package/dist/components/avatar/avatar.styles.js +258 -0
- package/dist/components/avatar/avatar.styles.js.map +1 -0
- package/dist/components/badge/badge.d.ts +59 -0
- package/dist/components/badge/badge.js +176 -0
- package/dist/components/badge/badge.js.map +1 -0
- package/dist/components/badge/badge.styles.d.ts +1 -0
- package/dist/components/badge/badge.styles.js +106 -0
- package/dist/components/badge/badge.styles.js.map +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +207 -0
- package/dist/components/bottom-sheet/bottom-sheet.js +724 -0
- package/dist/components/bottom-sheet/bottom-sheet.js.map +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.styles.d.ts +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.styles.js +393 -0
- package/dist/components/bottom-sheet/bottom-sheet.styles.js.map +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +176 -0
- package/dist/components/breadcrumbs/breadcrumbs.js +638 -0
- package/dist/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.styles.d.ts +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.styles.js +225 -0
- package/dist/components/breadcrumbs/breadcrumbs.styles.js.map +1 -0
- package/dist/components/button/button.d.ts +280 -0
- package/dist/components/button/button.js +530 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button/button.styles.d.ts +20 -0
- package/dist/components/button/button.styles.js +328 -0
- package/dist/components/button/button.styles.js.map +1 -0
- package/dist/components/button-group/button-group.d.ts +124 -0
- package/dist/components/button-group/button-group.js +287 -0
- package/dist/components/button-group/button-group.js.map +1 -0
- package/dist/components/button-group/button-group.styles.d.ts +1 -0
- package/dist/components/button-group/button-group.styles.js +220 -0
- package/dist/components/button-group/button-group.styles.js.map +1 -0
- package/dist/components/button-with-menu/button-with-menu.d.ts +224 -0
- package/dist/components/button-with-menu/button-with-menu.js +635 -0
- package/dist/components/button-with-menu/button-with-menu.js.map +1 -0
- package/dist/components/button-with-menu/button-with-menu.styles.d.ts +15 -0
- package/dist/components/button-with-menu/button-with-menu.styles.js +418 -0
- package/dist/components/button-with-menu/button-with-menu.styles.js.map +1 -0
- package/dist/components/calendar/calendar.d.ts +380 -0
- package/dist/components/calendar/calendar.js +1619 -0
- package/dist/components/calendar/calendar.js.map +1 -0
- package/dist/components/calendar/calendar.styles.d.ts +11 -0
- package/dist/components/calendar/calendar.styles.js +412 -0
- package/dist/components/calendar/calendar.styles.js.map +1 -0
- package/dist/components/callout/callout.d.ts +157 -0
- package/dist/components/callout/callout.js +436 -0
- package/dist/components/callout/callout.js.map +1 -0
- package/dist/components/callout/callout.styles.d.ts +13 -0
- package/dist/components/callout/callout.styles.js +383 -0
- package/dist/components/callout/callout.styles.js.map +1 -0
- package/dist/components/card/card.d.ts +108 -0
- package/dist/components/card/card.js +235 -0
- package/dist/components/card/card.js.map +1 -0
- package/dist/components/card/card.styles.d.ts +9 -0
- package/dist/components/card/card.styles.js +170 -0
- package/dist/components/card/card.styles.js.map +1 -0
- package/dist/components/carousel/carousel-geometry.d.ts +178 -0
- package/dist/components/carousel/carousel-geometry.js +356 -0
- package/dist/components/carousel/carousel-geometry.js.map +1 -0
- package/dist/components/carousel/carousel.d.ts +401 -0
- package/dist/components/carousel/carousel.js +1352 -0
- package/dist/components/carousel/carousel.js.map +1 -0
- package/dist/components/carousel/carousel.styles.d.ts +4 -0
- package/dist/components/carousel/carousel.styles.js +475 -0
- package/dist/components/carousel/carousel.styles.js.map +1 -0
- package/dist/components/chat-composer/chat-composer.d.ts +482 -0
- package/dist/components/chat-composer/chat-composer.js +1374 -0
- package/dist/components/chat-composer/chat-composer.js.map +1 -0
- package/dist/components/chat-composer/chat-composer.styles.d.ts +9 -0
- package/dist/components/chat-composer/chat-composer.styles.js +308 -0
- package/dist/components/chat-composer/chat-composer.styles.js.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +135 -0
- package/dist/components/checkbox/checkbox.js +296 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/checkbox/checkbox.styles.d.ts +13 -0
- package/dist/components/checkbox/checkbox.styles.js +226 -0
- package/dist/components/checkbox/checkbox.styles.js.map +1 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +199 -0
- package/dist/components/checkbox-group/checkbox-group.js +500 -0
- package/dist/components/checkbox-group/checkbox-group.js.map +1 -0
- package/dist/components/chip/chip.d.ts +176 -0
- package/dist/components/chip/chip.js +376 -0
- package/dist/components/chip/chip.js.map +1 -0
- package/dist/components/chip/chip.styles.d.ts +10 -0
- package/dist/components/chip/chip.styles.js +465 -0
- package/dist/components/chip/chip.styles.js.map +1 -0
- package/dist/components/chip-field/chip-field.d.ts +315 -0
- package/dist/components/chip-field/chip-field.js +887 -0
- package/dist/components/chip-field/chip-field.js.map +1 -0
- package/dist/components/code-block/code-block.before.d.ts +2 -0
- package/dist/components/code-block/code-block.before.js +193 -0
- package/dist/components/code-block/code-block.before.js.map +1 -0
- package/dist/components/code-block/code-block.d.ts +268 -0
- package/dist/components/code-block/code-block.js +1009 -0
- package/dist/components/code-block/code-block.js.map +1 -0
- package/dist/components/code-block/code-block.light.d.ts +50 -0
- package/dist/components/code-block/code-block.light.js +287 -0
- package/dist/components/code-block/code-block.light.js.map +1 -0
- package/dist/components/code-block/code-block.lines.d.ts +49 -0
- package/dist/components/code-block/code-block.lines.js +75 -0
- package/dist/components/code-block/code-block.lines.js.map +1 -0
- package/dist/components/code-block/code-block.styles.d.ts +8 -0
- package/dist/components/code-block/code-block.styles.js +212 -0
- package/dist/components/code-block/code-block.styles.js.map +1 -0
- package/dist/components/color-field/color-field.d.ts +120 -0
- package/dist/components/color-field/color-field.js +182 -0
- package/dist/components/color-field/color-field.js.map +1 -0
- package/dist/components/color-input/color-input.d.ts +302 -0
- package/dist/components/color-input/color-input.js +748 -0
- package/dist/components/color-input/color-input.js.map +1 -0
- package/dist/components/color-input/color-input.styles.d.ts +22 -0
- package/dist/components/color-input/color-input.styles.js +373 -0
- package/dist/components/color-input/color-input.styles.js.map +1 -0
- package/dist/components/color-input/color-text.d.ts +48 -0
- package/dist/components/color-input/color-text.js +77 -0
- package/dist/components/color-input/color-text.js.map +1 -0
- package/dist/components/combobox/combobox.d.ts +387 -0
- package/dist/components/combobox/combobox.js +1108 -0
- package/dist/components/combobox/combobox.js.map +1 -0
- package/dist/components/combobox/combobox.styles.d.ts +26 -0
- package/dist/components/combobox/combobox.styles.js +497 -0
- package/dist/components/combobox/combobox.styles.js.map +1 -0
- package/dist/components/combobox-field/combobox-field.d.ts +159 -0
- package/dist/components/combobox-field/combobox-field.js +280 -0
- package/dist/components/combobox-field/combobox-field.js.map +1 -0
- package/dist/components/copy-button/copy-button.d.ts +112 -0
- package/dist/components/copy-button/copy-button.js +237 -0
- package/dist/components/copy-button/copy-button.js.map +1 -0
- package/dist/components/copy-button/copy-button.styles.d.ts +1 -0
- package/dist/components/copy-button/copy-button.styles.js +62 -0
- package/dist/components/copy-button/copy-button.styles.js.map +1 -0
- package/dist/components/date-time-picker/date-time-picker.d.ts +603 -0
- package/dist/components/date-time-picker/date-time-picker.js +2537 -0
- package/dist/components/date-time-picker/date-time-picker.js.map +1 -0
- package/dist/components/date-time-picker/date-time-picker.styles.d.ts +1 -0
- package/dist/components/date-time-picker/date-time-picker.styles.js +842 -0
- package/dist/components/date-time-picker/date-time-picker.styles.js.map +1 -0
- package/dist/components/description-list/description-list.d.ts +133 -0
- package/dist/components/description-list/description-list.js +395 -0
- package/dist/components/description-list/description-list.js.map +1 -0
- package/dist/components/dialog/dialog.d.ts +140 -0
- package/dist/components/dialog/dialog.js +440 -0
- package/dist/components/dialog/dialog.js.map +1 -0
- package/dist/components/dialog/dialog.styles.d.ts +1 -0
- package/dist/components/dialog/dialog.styles.js +306 -0
- package/dist/components/dialog/dialog.styles.js.map +1 -0
- package/dist/components/divider/divider.d.ts +112 -0
- package/dist/components/divider/divider.js +331 -0
- package/dist/components/divider/divider.js.map +1 -0
- package/dist/components/divider/divider.styles.d.ts +6 -0
- package/dist/components/divider/divider.styles.js +183 -0
- package/dist/components/divider/divider.styles.js.map +1 -0
- package/dist/components/embedded-text-input/embedded-text-input.d.ts +246 -0
- package/dist/components/embedded-text-input/embedded-text-input.js +673 -0
- package/dist/components/embedded-text-input/embedded-text-input.js.map +1 -0
- package/dist/components/embedded-text-input/embedded-text-input.styles.d.ts +1 -0
- package/dist/components/embedded-text-input/embedded-text-input.styles.js +204 -0
- package/dist/components/embedded-text-input/embedded-text-input.styles.js.map +1 -0
- package/dist/components/empty-state/empty-state.d.ts +132 -0
- package/dist/components/empty-state/empty-state.js +333 -0
- package/dist/components/empty-state/empty-state.js.map +1 -0
- package/dist/components/empty-state/empty-state.styles.d.ts +11 -0
- package/dist/components/empty-state/empty-state.styles.js +218 -0
- package/dist/components/empty-state/empty-state.styles.js.map +1 -0
- package/dist/components/fab-menu/fab-menu.d.ts +240 -0
- package/dist/components/fab-menu/fab-menu.js +605 -0
- package/dist/components/fab-menu/fab-menu.js.map +1 -0
- package/dist/components/fab-menu/fab-menu.styles.d.ts +21 -0
- package/dist/components/fab-menu/fab-menu.styles.js +427 -0
- package/dist/components/fab-menu/fab-menu.styles.js.map +1 -0
- package/dist/components/field/field.d.ts +165 -0
- package/dist/components/field/field.js +399 -0
- package/dist/components/field/field.js.map +1 -0
- package/dist/components/field/field.styles.d.ts +2 -0
- package/dist/components/field/field.styles.js +177 -0
- package/dist/components/field/field.styles.js.map +1 -0
- package/dist/components/field-group/field-group.d.ts +122 -0
- package/dist/components/field-group/field-group.js +246 -0
- package/dist/components/field-group/field-group.js.map +1 -0
- package/dist/components/field-group/field-group.styles.d.ts +7 -0
- package/dist/components/field-group/field-group.styles.js +28 -0
- package/dist/components/field-group/field-group.styles.js.map +1 -0
- package/dist/components/figure/figure.d.ts +152 -0
- package/dist/components/figure/figure.js +435 -0
- package/dist/components/figure/figure.js.map +1 -0
- package/dist/components/file-item/file-item.d.ts +232 -0
- package/dist/components/file-item/file-item.js +665 -0
- package/dist/components/file-item/file-item.js.map +1 -0
- package/dist/components/file-item/file-item.styles.d.ts +2 -0
- package/dist/components/file-item/file-item.styles.js +582 -0
- package/dist/components/file-item/file-item.styles.js.map +1 -0
- package/dist/components/file-picker/file-picker.d.ts +221 -0
- package/dist/components/file-picker/file-picker.js +588 -0
- package/dist/components/file-picker/file-picker.js.map +1 -0
- package/dist/components/file-picker/file-picker.styles.d.ts +2 -0
- package/dist/components/file-picker/file-picker.styles.js +303 -0
- package/dist/components/file-picker/file-picker.styles.js.map +1 -0
- package/dist/components/file-upload/file-upload.d.ts +353 -0
- package/dist/components/file-upload/file-upload.js +939 -0
- package/dist/components/file-upload/file-upload.js.map +1 -0
- package/dist/components/file-upload/file-upload.styles.d.ts +1 -0
- package/dist/components/file-upload/file-upload.styles.js +91 -0
- package/dist/components/file-upload/file-upload.styles.js.map +1 -0
- package/dist/components/image-preview/image-preview.d.ts +336 -0
- package/dist/components/image-preview/image-preview.js +1510 -0
- package/dist/components/image-preview/image-preview.js.map +1 -0
- package/dist/components/image-preview/image-preview.styles.d.ts +1 -0
- package/dist/components/image-preview/image-preview.styles.js +418 -0
- package/dist/components/image-preview/image-preview.styles.js.map +1 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.d.ts +94 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.js +285 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.styles.d.ts +11 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.styles.js +155 -0
- package/dist/components/keyboard-shortcut/keyboard-shortcut.styles.js.map +1 -0
- package/dist/components/link-card/link-card.d.ts +156 -0
- package/dist/components/link-card/link-card.js +713 -0
- package/dist/components/link-card/link-card.js.map +1 -0
- package/dist/components/list/list.d.ts +430 -0
- package/dist/components/list/list.js +1230 -0
- package/dist/components/list/list.js.map +1 -0
- package/dist/components/list/list.styles.d.ts +3 -0
- package/dist/components/list/list.styles.js +334 -0
- package/dist/components/list/list.styles.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator.d.ts +83 -0
- package/dist/components/loading-indicator/loading-indicator.js +195 -0
- package/dist/components/loading-indicator/loading-indicator.js.map +1 -0
- package/dist/components/loading-indicator/loading-indicator.styles.d.ts +6 -0
- package/dist/components/loading-indicator/loading-indicator.styles.js +124 -0
- package/dist/components/loading-indicator/loading-indicator.styles.js.map +1 -0
- package/dist/components/main-action-button/main-action-button.d.ts +95 -0
- package/dist/components/main-action-button/main-action-button.js +202 -0
- package/dist/components/main-action-button/main-action-button.js.map +1 -0
- package/dist/components/main-action-button/main-action-button.styles.d.ts +10 -0
- package/dist/components/main-action-button/main-action-button.styles.js +285 -0
- package/dist/components/main-action-button/main-action-button.styles.js.map +1 -0
- package/dist/components/menu/menu.d.ts +813 -0
- package/dist/components/menu/menu.js +2061 -0
- package/dist/components/menu/menu.js.map +1 -0
- package/dist/components/menu/menu.styles.d.ts +18 -0
- package/dist/components/menu/menu.styles.js +587 -0
- package/dist/components/menu/menu.styles.js.map +1 -0
- package/dist/components/menubar/menubar.d.ts +477 -0
- package/dist/components/menubar/menubar.js +1677 -0
- package/dist/components/menubar/menubar.js.map +1 -0
- package/dist/components/menubar/menubar.styles.d.ts +43 -0
- package/dist/components/menubar/menubar.styles.js +379 -0
- package/dist/components/menubar/menubar.styles.js.map +1 -0
- package/dist/components/navigation-bar/navigation-bar.d.ts +239 -0
- package/dist/components/navigation-bar/navigation-bar.js +544 -0
- package/dist/components/navigation-bar/navigation-bar.js.map +1 -0
- package/dist/components/navigation-bar/navigation-bar.styles.d.ts +21 -0
- package/dist/components/navigation-bar/navigation-bar.styles.js +320 -0
- package/dist/components/navigation-bar/navigation-bar.styles.js.map +1 -0
- package/dist/components/navigation-drawer/navigation-drawer.d.ts +627 -0
- package/dist/components/navigation-drawer/navigation-drawer.js +1917 -0
- package/dist/components/navigation-drawer/navigation-drawer.js.map +1 -0
- package/dist/components/navigation-drawer/navigation-drawer.styles.d.ts +40 -0
- package/dist/components/navigation-drawer/navigation-drawer.styles.js +934 -0
- package/dist/components/navigation-drawer/navigation-drawer.styles.js.map +1 -0
- package/dist/components/number-field/number-field.d.ts +147 -0
- package/dist/components/number-field/number-field.js +252 -0
- package/dist/components/number-field/number-field.js.map +1 -0
- package/dist/components/number-input/number-input.d.ts +347 -0
- package/dist/components/number-input/number-input.js +929 -0
- package/dist/components/number-input/number-input.js.map +1 -0
- package/dist/components/number-input/number-input.styles.d.ts +22 -0
- package/dist/components/number-input/number-input.styles.js +395 -0
- package/dist/components/number-input/number-input.styles.js.map +1 -0
- package/dist/components/number-input/number-text.d.ts +74 -0
- package/dist/components/number-input/number-text.js +230 -0
- package/dist/components/number-input/number-text.js.map +1 -0
- package/dist/components/one-time-code-field/one-time-code-field.d.ts +94 -0
- package/dist/components/one-time-code-field/one-time-code-field.js +135 -0
- package/dist/components/one-time-code-field/one-time-code-field.js.map +1 -0
- package/dist/components/one-time-code-input/code-text.d.ts +51 -0
- package/dist/components/one-time-code-input/code-text.js +145 -0
- package/dist/components/one-time-code-input/code-text.js.map +1 -0
- package/dist/components/one-time-code-input/one-time-code-input.d.ts +219 -0
- package/dist/components/one-time-code-input/one-time-code-input.js +710 -0
- package/dist/components/one-time-code-input/one-time-code-input.js.map +1 -0
- package/dist/components/one-time-code-input/one-time-code-input.styles.d.ts +8 -0
- package/dist/components/one-time-code-input/one-time-code-input.styles.js +323 -0
- package/dist/components/one-time-code-input/one-time-code-input.styles.js.map +1 -0
- package/dist/components/option/option.d.ts +51 -0
- package/dist/components/option/option.js +75 -0
- package/dist/components/option/option.js.map +1 -0
- package/dist/components/page-header/page-header.d.ts +97 -0
- package/dist/components/page-header/page-header.js +258 -0
- package/dist/components/page-header/page-header.js.map +1 -0
- package/dist/components/popover/popover.d.ts +217 -0
- package/dist/components/popover/popover.js +616 -0
- package/dist/components/popover/popover.js.map +1 -0
- package/dist/components/popover/popover.styles.d.ts +8 -0
- package/dist/components/popover/popover.styles.js +299 -0
- package/dist/components/popover/popover.styles.js.map +1 -0
- package/dist/components/progress-indicator/progress-indicator.d.ts +76 -0
- package/dist/components/progress-indicator/progress-indicator.js +165 -0
- package/dist/components/progress-indicator/progress-indicator.js.map +1 -0
- package/dist/components/progress-indicator/progress-indicator.styles.d.ts +7 -0
- package/dist/components/progress-indicator/progress-indicator.styles.js +271 -0
- package/dist/components/progress-indicator/progress-indicator.styles.js.map +1 -0
- package/dist/components/radio-button/radio-button.d.ts +149 -0
- package/dist/components/radio-button/radio-button.js +370 -0
- package/dist/components/radio-button/radio-button.js.map +1 -0
- package/dist/components/radio-button/radio-button.styles.d.ts +8 -0
- package/dist/components/radio-button/radio-button.styles.js +190 -0
- package/dist/components/radio-button/radio-button.styles.js.map +1 -0
- package/dist/components/radio-group/radio-group.d.ts +188 -0
- package/dist/components/radio-group/radio-group.js +380 -0
- package/dist/components/radio-group/radio-group.js.map +1 -0
- package/dist/components/search/search.d.ts +569 -0
- package/dist/components/search/search.js +1801 -0
- package/dist/components/search/search.js.map +1 -0
- package/dist/components/search/search.styles.d.ts +15 -0
- package/dist/components/search/search.styles.js +967 -0
- package/dist/components/search/search.styles.js.map +1 -0
- package/dist/components/segmented-button/segmented-button.d.ts +183 -0
- package/dist/components/segmented-button/segmented-button.js +483 -0
- package/dist/components/segmented-button/segmented-button.js.map +1 -0
- package/dist/components/segmented-button/segmented-button.styles.d.ts +19 -0
- package/dist/components/segmented-button/segmented-button.styles.js +400 -0
- package/dist/components/segmented-button/segmented-button.styles.js.map +1 -0
- package/dist/components/select/select.d.ts +259 -0
- package/dist/components/select/select.js +702 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/select/select.styles.d.ts +27 -0
- package/dist/components/select/select.styles.js +359 -0
- package/dist/components/select/select.styles.js.map +1 -0
- package/dist/components/select-field/select-field.d.ts +141 -0
- package/dist/components/select-field/select-field.js +234 -0
- package/dist/components/select-field/select-field.js.map +1 -0
- package/dist/components/side-sheet/side-sheet.d.ts +190 -0
- package/dist/components/side-sheet/side-sheet.js +592 -0
- package/dist/components/side-sheet/side-sheet.js.map +1 -0
- package/dist/components/side-sheet/side-sheet.styles.d.ts +9 -0
- package/dist/components/side-sheet/side-sheet.styles.js +352 -0
- package/dist/components/side-sheet/side-sheet.styles.js.map +1 -0
- package/dist/components/skeleton/skeleton.d.ts +157 -0
- package/dist/components/skeleton/skeleton.js +550 -0
- package/dist/components/skeleton/skeleton.js.map +1 -0
- package/dist/components/slider/slider.d.ts +235 -0
- package/dist/components/slider/slider.js +792 -0
- package/dist/components/slider/slider.js.map +1 -0
- package/dist/components/slider/slider.styles.d.ts +6 -0
- package/dist/components/slider/slider.styles.js +492 -0
- package/dist/components/slider/slider.styles.js.map +1 -0
- package/dist/components/slider-field/slider-field.d.ts +150 -0
- package/dist/components/slider-field/slider-field.js +269 -0
- package/dist/components/slider-field/slider-field.js.map +1 -0
- package/dist/components/snackbar/snackbar.d.ts +237 -0
- package/dist/components/snackbar/snackbar.js +607 -0
- package/dist/components/snackbar/snackbar.js.map +1 -0
- package/dist/components/snackbar/snackbar.styles.d.ts +10 -0
- package/dist/components/snackbar/snackbar.styles.js +510 -0
- package/dist/components/snackbar/snackbar.styles.js.map +1 -0
- package/dist/components/switch/switch.d.ts +161 -0
- package/dist/components/switch/switch.js +470 -0
- package/dist/components/switch/switch.js.map +1 -0
- package/dist/components/switch/switch.styles.d.ts +3 -0
- package/dist/components/switch/switch.styles.js +440 -0
- package/dist/components/switch/switch.styles.js.map +1 -0
- package/dist/components/tab-view/tab-view.d.ts +303 -0
- package/dist/components/tab-view/tab-view.js +917 -0
- package/dist/components/tab-view/tab-view.js.map +1 -0
- package/dist/components/tab-view/tab-view.styles.d.ts +19 -0
- package/dist/components/tab-view/tab-view.styles.js +85 -0
- package/dist/components/tab-view/tab-view.styles.js.map +1 -0
- package/dist/components/table/table.d.ts +386 -0
- package/dist/components/table/table.js +1320 -0
- package/dist/components/table/table.js.map +1 -0
- package/dist/components/table-of-contents/table-of-contents.d.ts +227 -0
- package/dist/components/table-of-contents/table-of-contents.js +963 -0
- package/dist/components/table-of-contents/table-of-contents.js.map +1 -0
- package/dist/components/table-of-contents/table-of-contents.styles.d.ts +1 -0
- package/dist/components/table-of-contents/table-of-contents.styles.js +243 -0
- package/dist/components/table-of-contents/table-of-contents.styles.js.map +1 -0
- package/dist/components/tabs/tabs.d.ts +800 -0
- package/dist/components/tabs/tabs.js +2183 -0
- package/dist/components/tabs/tabs.js.map +1 -0
- package/dist/components/tabs/tabs.styles.d.ts +47 -0
- package/dist/components/tabs/tabs.styles.js +595 -0
- package/dist/components/tabs/tabs.styles.js.map +1 -0
- package/dist/components/tag/tag.d.ts +77 -0
- package/dist/components/tag/tag.js +143 -0
- package/dist/components/tag/tag.js.map +1 -0
- package/dist/components/tag/tag.styles.d.ts +13 -0
- package/dist/components/tag/tag.styles.js +215 -0
- package/dist/components/tag/tag.styles.js.map +1 -0
- package/dist/components/tag-group/tag-group.d.ts +110 -0
- package/dist/components/tag-group/tag-group.js +298 -0
- package/dist/components/tag-group/tag-group.js.map +1 -0
- package/dist/components/tag-group/tag-group.styles.d.ts +8 -0
- package/dist/components/tag-group/tag-group.styles.js +66 -0
- package/dist/components/tag-group/tag-group.styles.js.map +1 -0
- package/dist/components/text-field/text-field.d.ts +159 -0
- package/dist/components/text-field/text-field.js +272 -0
- package/dist/components/text-field/text-field.js.map +1 -0
- package/dist/components/text-input/text-input-segments.d.ts +93 -0
- package/dist/components/text-input/text-input-segments.js +233 -0
- package/dist/components/text-input/text-input-segments.js.map +1 -0
- package/dist/components/text-input/text-input.d.ts +683 -0
- package/dist/components/text-input/text-input.js +2120 -0
- package/dist/components/text-input/text-input.js.map +1 -0
- package/dist/components/text-input/text-input.styles.d.ts +27 -0
- package/dist/components/text-input/text-input.styles.js +1071 -0
- package/dist/components/text-input/text-input.styles.js.map +1 -0
- package/dist/components/toolbar/toolbar.d.ts +123 -0
- package/dist/components/toolbar/toolbar.js +336 -0
- package/dist/components/toolbar/toolbar.js.map +1 -0
- package/dist/components/toolbar/toolbar.styles.d.ts +10 -0
- package/dist/components/toolbar/toolbar.styles.js +156 -0
- package/dist/components/toolbar/toolbar.styles.js.map +1 -0
- package/dist/components/tooltip/tooltip-placement.d.ts +22 -0
- package/dist/components/tooltip/tooltip-placement.js +15 -0
- package/dist/components/tooltip/tooltip-placement.js.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +267 -0
- package/dist/components/tooltip/tooltip.js +902 -0
- package/dist/components/tooltip/tooltip.js.map +1 -0
- package/dist/components/tooltip/tooltip.styles.d.ts +7 -0
- package/dist/components/tooltip/tooltip.styles.js +240 -0
- package/dist/components/tooltip/tooltip.styles.js.map +1 -0
- package/dist/components/tree-view/tree-view.d.ts +264 -0
- package/dist/components/tree-view/tree-view.js +1228 -0
- package/dist/components/tree-view/tree-view.js.map +1 -0
- package/dist/description-list.css +337 -0
- package/dist/empty-state.css +70 -0
- package/dist/figure.css +381 -0
- package/dist/generated/icon-sets.d.ts +9 -0
- package/dist/generated/icon-sets.js +18 -0
- package/dist/generated/icon-sets.js.map +1 -0
- package/dist/generated/words.d.ts +161 -0
- package/dist/generated/words.js +91 -0
- package/dist/generated/words.js.map +1 -0
- package/dist/highlight/grammars/css.d.ts +3 -0
- package/dist/highlight/grammars/css.js +56 -0
- package/dist/highlight/grammars/css.js.map +1 -0
- package/dist/highlight/grammars/dart.d.ts +3 -0
- package/dist/highlight/grammars/dart.js +53 -0
- package/dist/highlight/grammars/dart.js.map +1 -0
- package/dist/highlight/grammars/javascript.d.ts +4 -0
- package/dist/highlight/grammars/javascript.js +119 -0
- package/dist/highlight/grammars/javascript.js.map +1 -0
- package/dist/highlight/grammars/json.d.ts +3 -0
- package/dist/highlight/grammars/json.js +19 -0
- package/dist/highlight/grammars/json.js.map +1 -0
- package/dist/highlight/grammars/kotlin.d.ts +3 -0
- package/dist/highlight/grammars/kotlin.js +46 -0
- package/dist/highlight/grammars/kotlin.js.map +1 -0
- package/dist/highlight/grammars/markup.d.ts +3 -0
- package/dist/highlight/grammars/markup.js +45 -0
- package/dist/highlight/grammars/markup.js.map +1 -0
- package/dist/highlight/grammars/shared.d.ts +25 -0
- package/dist/highlight/grammars/shared.js +37 -0
- package/dist/highlight/grammars/shared.js.map +1 -0
- package/dist/highlight/grammars/shell.d.ts +3 -0
- package/dist/highlight/grammars/shell.js +48 -0
- package/dist/highlight/grammars/shell.js.map +1 -0
- package/dist/highlight/grammars/swift.d.ts +3 -0
- package/dist/highlight/grammars/swift.js +46 -0
- package/dist/highlight/grammars/swift.js.map +1 -0
- package/dist/highlight/grammars/typescript.d.ts +2 -0
- package/dist/highlight/grammars/typescript.js +5 -0
- package/dist/highlight/grammars/typescript.js.map +1 -0
- package/dist/highlight/index.d.ts +104 -0
- package/dist/highlight/index.js +331 -0
- package/dist/highlight/index.js.map +1 -0
- package/dist/icons.css +107 -0
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +10 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.d.ts +85 -0
- package/dist/index.js +100 -0
- package/dist/index.js.map +1 -0
- package/dist/link-card.css +678 -0
- package/dist/link.css +728 -0
- package/dist/link.d.ts +21 -0
- package/dist/link.js +594 -0
- package/dist/link.js.map +1 -0
- package/dist/links/index.d.ts +136 -0
- package/dist/links/index.js +404 -0
- package/dist/links/index.js.map +1 -0
- package/dist/links/node/address.js +154 -0
- package/dist/links/node/cli.js +102 -0
- package/dist/links/node/fetcher.js +267 -0
- package/dist/links/node/head.js +278 -0
- package/dist/links/node/index.d.ts +164 -0
- package/dist/links/node/index.js +26 -0
- package/dist/links/node/links.js +275 -0
- package/dist/links/node/lock.js +86 -0
- package/dist/links/node/mark.js +71 -0
- package/dist/links/node/options.js +120 -0
- package/dist/links/node/pictures.js +265 -0
- package/dist/links/node/refresh.js +28 -0
- package/dist/menu.css +97 -0
- package/dist/menubar.css +69 -0
- package/dist/page-header.css +324 -0
- package/dist/pagination.css +410 -0
- package/dist/pagination.d.ts +6 -0
- package/dist/pagination.js +256 -0
- package/dist/pagination.js.map +1 -0
- package/dist/primitives/actions.d.ts +75 -0
- package/dist/primitives/actions.js +142 -0
- package/dist/primitives/actions.js.map +1 -0
- package/dist/primitives/after-click.d.ts +8 -0
- package/dist/primitives/after-click.js +21 -0
- package/dist/primitives/after-click.js.map +1 -0
- package/dist/primitives/anchored.d.ts +134 -0
- package/dist/primitives/anchored.js +425 -0
- package/dist/primitives/anchored.js.map +1 -0
- package/dist/primitives/arc.d.ts +13 -0
- package/dist/primitives/arc.js +49 -0
- package/dist/primitives/arc.js.map +1 -0
- package/dist/primitives/arrow.d.ts +47 -0
- package/dist/primitives/arrow.js +159 -0
- package/dist/primitives/arrow.js.map +1 -0
- package/dist/primitives/auto-height.d.ts +56 -0
- package/dist/primitives/auto-height.js +150 -0
- package/dist/primitives/auto-height.js.map +1 -0
- package/dist/primitives/autofocus.d.ts +11 -0
- package/dist/primitives/autofocus.js +26 -0
- package/dist/primitives/autofocus.js.map +1 -0
- package/dist/primitives/availability.d.ts +32 -0
- package/dist/primitives/availability.js +122 -0
- package/dist/primitives/availability.js.map +1 -0
- package/dist/primitives/axes.d.ts +45 -0
- package/dist/primitives/axes.js +72 -0
- package/dist/primitives/axes.js.map +1 -0
- package/dist/primitives/behavior.d.ts +14 -0
- package/dist/primitives/behavior.js +19 -0
- package/dist/primitives/behavior.js.map +1 -0
- package/dist/primitives/calendar-date.d.ts +79 -0
- package/dist/primitives/calendar-date.js +135 -0
- package/dist/primitives/calendar-date.js.map +1 -0
- package/dist/primitives/composed.d.ts +144 -0
- package/dist/primitives/composed.js +303 -0
- package/dist/primitives/composed.js.map +1 -0
- package/dist/primitives/default-button.d.ts +49 -0
- package/dist/primitives/default-button.js +270 -0
- package/dist/primitives/default-button.js.map +1 -0
- package/dist/primitives/description.d.ts +18 -0
- package/dist/primitives/description.js +18 -0
- package/dist/primitives/description.js.map +1 -0
- package/dist/primitives/destination.d.ts +259 -0
- package/dist/primitives/destination.js +651 -0
- package/dist/primitives/destination.js.map +1 -0
- package/dist/primitives/direction.d.ts +23 -0
- package/dist/primitives/direction.js +90 -0
- package/dist/primitives/direction.js.map +1 -0
- package/dist/primitives/disabled-while-focused.d.ts +46 -0
- package/dist/primitives/disabled-while-focused.js +126 -0
- package/dist/primitives/disabled-while-focused.js.map +1 -0
- package/dist/primitives/disclosure.d.ts +9 -0
- package/dist/primitives/disclosure.js +15 -0
- package/dist/primitives/disclosure.js.map +1 -0
- package/dist/primitives/dismiss.d.ts +88 -0
- package/dist/primitives/dismiss.js +232 -0
- package/dist/primitives/dismiss.js.map +1 -0
- package/dist/primitives/field-frame.d.ts +166 -0
- package/dist/primitives/field-frame.js +358 -0
- package/dist/primitives/field-frame.js.map +1 -0
- package/dist/primitives/field-group-frame.d.ts +59 -0
- package/dist/primitives/field-group-frame.js +174 -0
- package/dist/primitives/field-group-frame.js.map +1 -0
- package/dist/primitives/field-trigger.d.ts +117 -0
- package/dist/primitives/field-trigger.js +387 -0
- package/dist/primitives/field-trigger.js.map +1 -0
- package/dist/primitives/field.d.ts +186 -0
- package/dist/primitives/field.js +349 -0
- package/dist/primitives/field.js.map +1 -0
- package/dist/primitives/file-format.d.ts +23 -0
- package/dist/primitives/file-format.js +185 -0
- package/dist/primitives/file-format.js.map +1 -0
- package/dist/primitives/file-item-holder.d.ts +45 -0
- package/dist/primitives/file-item-holder.js +39 -0
- package/dist/primitives/file-item-holder.js.map +1 -0
- package/dist/primitives/focus-order.d.ts +11 -0
- package/dist/primitives/focus-order.js +11 -0
- package/dist/primitives/focus-order.js.map +1 -0
- package/dist/primitives/focus-ring.d.ts +76 -0
- package/dist/primitives/focus-ring.js +230 -0
- package/dist/primitives/focus-ring.js.map +1 -0
- package/dist/primitives/follow.d.ts +65 -0
- package/dist/primitives/follow.js +283 -0
- package/dist/primitives/follow.js.map +1 -0
- package/dist/primitives/form-disabled.d.ts +20 -0
- package/dist/primitives/form-disabled.js +46 -0
- package/dist/primitives/form-disabled.js.map +1 -0
- package/dist/primitives/form-says.d.ts +33 -0
- package/dist/primitives/form-says.js +45 -0
- package/dist/primitives/form-says.js.map +1 -0
- package/dist/primitives/forward.d.ts +13 -0
- package/dist/primitives/forward.js +28 -0
- package/dist/primitives/forward.js.map +1 -0
- package/dist/primitives/glyph-mirror.d.ts +77 -0
- package/dist/primitives/glyph-mirror.js +211 -0
- package/dist/primitives/glyph-mirror.js.map +1 -0
- package/dist/primitives/glyph-pending.d.ts +17 -0
- package/dist/primitives/glyph-pending.js +91 -0
- package/dist/primitives/glyph-pending.js.map +1 -0
- package/dist/primitives/glyph.d.ts +53 -0
- package/dist/primitives/glyph.js +161 -0
- package/dist/primitives/glyph.js.map +1 -0
- package/dist/primitives/group-item.d.ts +128 -0
- package/dist/primitives/group-item.js +334 -0
- package/dist/primitives/group-item.js.map +1 -0
- package/dist/primitives/hidden.d.ts +2 -0
- package/dist/primitives/hidden.js +23 -0
- package/dist/primitives/hidden.js.map +1 -0
- package/dist/primitives/host-aria.d.ts +8 -0
- package/dist/primitives/host-aria.js +18 -0
- package/dist/primitives/host-aria.js.map +1 -0
- package/dist/primitives/index.d.ts +59 -0
- package/dist/primitives/index.js +189 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/primitives/indicator-drag.d.ts +90 -0
- package/dist/primitives/indicator-drag.js +207 -0
- package/dist/primitives/indicator-drag.js.map +1 -0
- package/dist/primitives/interactive.d.ts +13 -0
- package/dist/primitives/interactive.js +67 -0
- package/dist/primitives/interactive.js.map +1 -0
- package/dist/primitives/item-row.d.ts +34 -0
- package/dist/primitives/item-row.js +76 -0
- package/dist/primitives/item-row.js.map +1 -0
- package/dist/primitives/item-update.d.ts +2 -0
- package/dist/primitives/item-update.js +12 -0
- package/dist/primitives/item-update.js.map +1 -0
- package/dist/primitives/kept-length.d.ts +34 -0
- package/dist/primitives/kept-length.js +154 -0
- package/dist/primitives/kept-length.js.map +1 -0
- package/dist/primitives/keyboard-convention.d.ts +30 -0
- package/dist/primitives/keyboard-convention.js +88 -0
- package/dist/primitives/keyboard-convention.js.map +1 -0
- package/dist/primitives/label-lines.d.ts +12 -0
- package/dist/primitives/label-lines.js +34 -0
- package/dist/primitives/label-lines.js.map +1 -0
- package/dist/primitives/layout-scale.d.ts +18 -0
- package/dist/primitives/layout-scale.js +35 -0
- package/dist/primitives/layout-scale.js.map +1 -0
- package/dist/primitives/link.d.ts +147 -0
- package/dist/primitives/link.js +204 -0
- package/dist/primitives/link.js.map +1 -0
- package/dist/primitives/locale-date.d.ts +132 -0
- package/dist/primitives/locale-date.js +508 -0
- package/dist/primitives/locale-date.js.map +1 -0
- package/dist/primitives/missing-value.d.ts +16 -0
- package/dist/primitives/missing-value.js +31 -0
- package/dist/primitives/missing-value.js.map +1 -0
- package/dist/primitives/modal.d.ts +38 -0
- package/dist/primitives/modal.js +175 -0
- package/dist/primitives/modal.js.map +1 -0
- package/dist/primitives/native-text.d.ts +51 -0
- package/dist/primitives/native-text.js +77 -0
- package/dist/primitives/native-text.js.map +1 -0
- package/dist/primitives/natural-height.d.ts +21 -0
- package/dist/primitives/natural-height.js +36 -0
- package/dist/primitives/natural-height.js.map +1 -0
- package/dist/primitives/option-list.d.ts +314 -0
- package/dist/primitives/option-list.js +1098 -0
- package/dist/primitives/option-list.js.map +1 -0
- package/dist/primitives/overlay-focus.d.ts +48 -0
- package/dist/primitives/overlay-focus.js +152 -0
- package/dist/primitives/overlay-focus.js.map +1 -0
- package/dist/primitives/placement.d.ts +131 -0
- package/dist/primitives/placement.js +144 -0
- package/dist/primitives/placement.js.map +1 -0
- package/dist/primitives/places.d.ts +44 -0
- package/dist/primitives/places.js +98 -0
- package/dist/primitives/places.js.map +1 -0
- package/dist/primitives/press.d.ts +90 -0
- package/dist/primitives/press.js +153 -0
- package/dist/primitives/press.js.map +1 -0
- package/dist/primitives/report.d.ts +17 -0
- package/dist/primitives/report.js +34 -0
- package/dist/primitives/report.js.map +1 -0
- package/dist/primitives/ripple.d.ts +40 -0
- package/dist/primitives/ripple.js +70 -0
- package/dist/primitives/ripple.js.map +1 -0
- package/dist/primitives/roving.d.ts +41 -0
- package/dist/primitives/roving.js +71 -0
- package/dist/primitives/roving.js.map +1 -0
- package/dist/primitives/selection.d.ts +134 -0
- package/dist/primitives/selection.js +287 -0
- package/dist/primitives/selection.js.map +1 -0
- package/dist/primitives/separation.d.ts +28 -0
- package/dist/primitives/separation.js +96 -0
- package/dist/primitives/separation.js.map +1 -0
- package/dist/primitives/shared-choice.d.ts +33 -0
- package/dist/primitives/shared-choice.js +110 -0
- package/dist/primitives/shared-choice.js.map +1 -0
- package/dist/primitives/sheet.d.ts +63 -0
- package/dist/primitives/sheet.js +139 -0
- package/dist/primitives/sheet.js.map +1 -0
- package/dist/primitives/sheets.d.ts +8 -0
- package/dist/primitives/sheets.js +96 -0
- package/dist/primitives/sheets.js.map +1 -0
- package/dist/primitives/states.d.ts +33 -0
- package/dist/primitives/states.js +30 -0
- package/dist/primitives/states.js.map +1 -0
- package/dist/primitives/system-watch.d.ts +9 -0
- package/dist/primitives/system-watch.js +29 -0
- package/dist/primitives/system-watch.js.map +1 -0
- package/dist/primitives/target.d.ts +21 -0
- package/dist/primitives/target.js +79 -0
- package/dist/primitives/target.js.map +1 -0
- package/dist/primitives/values.d.ts +6 -0
- package/dist/primitives/values.js +22 -0
- package/dist/primitives/values.js.map +1 -0
- package/dist/primitives/visibility.d.ts +12 -0
- package/dist/primitives/visibility.js +50 -0
- package/dist/primitives/visibility.js.map +1 -0
- package/dist/primitives/words.d.ts +81 -0
- package/dist/primitives/words.js +236 -0
- package/dist/primitives/words.js.map +1 -0
- package/dist/prose.css +1917 -0
- package/dist/registry.d.ts +182 -0
- package/dist/registry.js +2 -0
- package/dist/registry.js.map +1 -0
- package/dist/shape.css +21 -0
- package/dist/skeleton.css +428 -0
- package/dist/steps.css +231 -0
- package/dist/steps.d.ts +6 -0
- package/dist/steps.js +156 -0
- package/dist/steps.js.map +1 -0
- package/dist/styles/icons.d.ts +62 -0
- package/dist/styles/icons.js +237 -0
- package/dist/styles/icons.js.map +1 -0
- package/dist/styles/product-text.d.ts +66 -0
- package/dist/styles/product-text.js +114 -0
- package/dist/styles/product-text.js.map +1 -0
- package/dist/styles/registered-properties.d.ts +6 -0
- package/dist/styles/registered-properties.js +68 -0
- package/dist/styles/registered-properties.js.map +1 -0
- package/dist/styles/shape.d.ts +59 -0
- package/dist/styles/shape.js +95 -0
- package/dist/styles/shape.js.map +1 -0
- package/dist/systems/cupertino.css +8793 -0
- package/dist/systems/m3-expressive-like.css +8786 -0
- package/dist/systems/m3-like.css +8748 -0
- package/dist/table-of-contents.css +482 -0
- package/dist/table.css +902 -0
- package/dist/tanrei.bundle.js +26644 -0
- package/dist/tanrei.bundle.js.map +7 -0
- package/dist/text.css +104 -0
- package/dist/timeline.css +410 -0
- package/dist/timeline.d.ts +6 -0
- package/dist/timeline.js +176 -0
- package/dist/timeline.js.map +1 -0
- package/dist/tokens.css +8801 -0
- package/dist/tree-view.css +797 -0
- package/dist/words.d.ts +2 -0
- package/dist/words.js +6 -0
- package/dist/words.js.map +1 -0
- package/package.json +132 -3
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
import { css, html } from 'lit';
|
|
2
|
+
import { ComposedControl, composedHost, exported, forward } from '../../primitives/composed.js';
|
|
3
|
+
import { hiddenHost } from '../../primitives/hidden.js';
|
|
4
|
+
import { TanreiField } from '../field/field.js';
|
|
5
|
+
import { DISABLED_DATES, TanreiTextInput, } from '../text-input/text-input.js';
|
|
6
|
+
/** TXF-62: the props that are the Field's, given to it unchanged. `disabled` is the Field's too, joined with a disabled fieldset's (W6). */
|
|
7
|
+
const FIELD = ['label', 'labelHidden', 'supportingText', 'errorText', 'error', 'requirement', 'requiredMark', 'requiredText', 'optionalText'];
|
|
8
|
+
/** TXF-62: the twenty-seven props that are the text input's. Its own `label`, `labelHidden`, `error` and `disabled` are never set. */
|
|
9
|
+
const INPUT = [
|
|
10
|
+
'variant',
|
|
11
|
+
'size',
|
|
12
|
+
'type',
|
|
13
|
+
'value',
|
|
14
|
+
'placeholder',
|
|
15
|
+
'readOnly',
|
|
16
|
+
'multiline',
|
|
17
|
+
'minRows',
|
|
18
|
+
'maxRows',
|
|
19
|
+
'resize',
|
|
20
|
+
'resizeAxis',
|
|
21
|
+
'resizeLabel',
|
|
22
|
+
'noWrap',
|
|
23
|
+
'maxLength',
|
|
24
|
+
'counter',
|
|
25
|
+
'prefixText',
|
|
26
|
+
'suffixText',
|
|
27
|
+
'autocomplete',
|
|
28
|
+
'locale',
|
|
29
|
+
'min',
|
|
30
|
+
'max',
|
|
31
|
+
'disabledDates',
|
|
32
|
+
'invalidText',
|
|
33
|
+
'unavailableText',
|
|
34
|
+
'segmentEmptyText',
|
|
35
|
+
'picker',
|
|
36
|
+
'pickerLabel',
|
|
37
|
+
];
|
|
38
|
+
/**
|
|
39
|
+
* W4: each member's documented parts, from the member's own list. Two names are shared — `label` and
|
|
40
|
+
* `requirement-label` — and each is exported with its member's name before it, always, and under the bare name from
|
|
41
|
+
* both: the two are one thing to a person and are never drawn at once. FLD-25 is the sentence that holds it — while
|
|
42
|
+
* its control draws the label itself the Field draws no label row and no requirement tag — and a stacked input draws
|
|
43
|
+
* neither (TXI-13, TXI-50). So `::part(label)` is the drawn label, whichever member draws it. The Field's `value-text`
|
|
44
|
+
* is left out: a text field gives its Field no value text — its value is read in its box — so the part is never drawn.
|
|
45
|
+
*/
|
|
46
|
+
const FIELD_PARTS = exported(TanreiField, { label: { as: 'field-label', bare: true }, 'requirement-label': { as: 'field-requirement-label', bare: true } }, ['value-text']);
|
|
47
|
+
const INPUT_PARTS = exported(TanreiTextInput, { label: { as: 'text-input-label', bare: true }, 'requirement-label': { as: 'text-input-requirement-label', bare: true } });
|
|
48
|
+
/**
|
|
49
|
+
* Lets people enter and edit text as one complete field. Built from a Field (`<tanrei-field>`) and the Text input
|
|
50
|
+
* (`<tanrei-text-input>`) it frames: the box under the Field's label — or, in the filled and the outlined look, with
|
|
51
|
+
* the label floating in it — with the Field's help, its error and the count, tied together for assistive technology
|
|
52
|
+
* and taking part in a form as one control.
|
|
53
|
+
*
|
|
54
|
+
* Contract: specs/text-field.spec.json. `<tanrei-text-field name="email" label="Email" type="email"
|
|
55
|
+
* autocomplete="email" requirement="required" supporting-text="We never share your address."></tanrei-text-field>`.
|
|
56
|
+
*
|
|
57
|
+
* Composed (`src/primitives/composed.ts`): its shadow root holds the two members' own elements and nothing
|
|
58
|
+
* else, so it draws nothing of its own and has no token — every `--tanrei-comp-field-*`,
|
|
59
|
+
* `--tanrei-comp-input-box-*` and `--tanrei-comp-text-input-*` value reaches the members by inheritance, and one text field is set apart by setting
|
|
60
|
+
* such a property on this element. Each property is its member's, set on that member unchanged: `label`,
|
|
61
|
+
* `label-hidden`, `supporting-text`, `error-text`, `error`, `disabled`, `requirement`, `required-mark`,
|
|
62
|
+
* `required-text` and `optional-text` are the Field's, every other one the text input's. One level down, the same by
|
|
63
|
+
* hand: `<tanrei-field label="Email" requirement="required" supporting-text="We never share your address.">
|
|
64
|
+
* <tanrei-text-input name="email" type="email" autocomplete="email"></tanrei-text-input></tanrei-field>` — and the box
|
|
65
|
+
* alone, where a label stands elsewhere, is `<tanrei-text-input>` with a `label` of its own.
|
|
66
|
+
*
|
|
67
|
+
* It is a block as wide as its place, and its box fills it (TXF-62): give it a narrower place for a narrower box.
|
|
68
|
+
*
|
|
69
|
+
* `value` is at every moment the text input's, and the five events are that input's own, with this element as their
|
|
70
|
+
* target: `event.target.value` is the new value in every listener. It dispatches none itself. The one thing it does
|
|
71
|
+
* that the pair by hand does not: while `counter` is set it gives its Field the count its text input keeps, at every
|
|
72
|
+
* change (TXF-67) — by hand a product writes `field.countText = input.countText` in its `input` listener.
|
|
73
|
+
*
|
|
74
|
+
* Form-associated: it submits the value under `name` — nothing while disabled —, resets to its `value` attribute, is
|
|
75
|
+
* restored on navigation, follows a disabled `<fieldset>`, and reports what its text input reports: a missing value
|
|
76
|
+
* while `requirement` is `required` and it is empty, and a date's or a time's entry error. Enter in a single-line
|
|
77
|
+
* field presses the default button of this element's form.
|
|
78
|
+
*
|
|
79
|
+
* The element is not focusable itself and has no role: `focus()` goes to the input, and its name is `label` (with
|
|
80
|
+
* `label-hidden` where it is not drawn), never `aria-label`. A press on the label row, on the box or on a floating
|
|
81
|
+
* label focuses the input; a press on the help, the error text, the count or the gap between a row and the box does
|
|
82
|
+
* nothing.
|
|
83
|
+
*
|
|
84
|
+
* @tag tanrei-text-field
|
|
85
|
+
* @slot label-icon - => tanrei-field
|
|
86
|
+
* @slot leading-icon - => tanrei-text-input
|
|
87
|
+
* @slot trailing-icon - => tanrei-text-input
|
|
88
|
+
* @csspart field - The frame: the `<tanrei-field>` it is built from.
|
|
89
|
+
* @csspart text-input - The control: the `<tanrei-text-input>` it is built from.
|
|
90
|
+
* @exportparts tanrei-field label: field-label, label, requirement-label: field-requirement-label, requirement-label, -value-text
|
|
91
|
+
* @exportparts tanrei-text-input label: text-input-label, label, requirement-label: text-input-requirement-label, requirement-label
|
|
92
|
+
* @attr {string} form - The id of the form the text field belongs to, where it stands outside it: the platform's own attribute, which then wins over a form around it. The `form` property is read-only and returns the form element.
|
|
93
|
+
* @fires input - => tanrei-text-input
|
|
94
|
+
* @fires change - => tanrei-text-input
|
|
95
|
+
* @fires action - => tanrei-text-input
|
|
96
|
+
* @fires pickerrequest - => tanrei-text-input
|
|
97
|
+
* @fires entryerror - => tanrei-text-input
|
|
98
|
+
*/
|
|
99
|
+
export class TanreiTextField extends ComposedControl {
|
|
100
|
+
constructor() {
|
|
101
|
+
super(...arguments);
|
|
102
|
+
/** @from tanrei-field.label */
|
|
103
|
+
this.label = '';
|
|
104
|
+
/** @from tanrei-field.labelHidden */
|
|
105
|
+
this.labelHidden = false;
|
|
106
|
+
/** @from tanrei-field.supportingText */
|
|
107
|
+
this.supportingText = '';
|
|
108
|
+
/** @from tanrei-field.errorText */
|
|
109
|
+
this.errorText = '';
|
|
110
|
+
/** @from tanrei-field.error */
|
|
111
|
+
this.error = false;
|
|
112
|
+
/** @from tanrei-field.disabled */
|
|
113
|
+
this.disabled = false;
|
|
114
|
+
/** @from tanrei-field.requirement */
|
|
115
|
+
this.requirement = 'none';
|
|
116
|
+
/** @from tanrei-field.requiredMark */
|
|
117
|
+
this.requiredMark = 'auto';
|
|
118
|
+
/** @from tanrei-field.requiredText */
|
|
119
|
+
this.requiredText = '';
|
|
120
|
+
/** @from tanrei-field.optionalText */
|
|
121
|
+
this.optionalText = '';
|
|
122
|
+
/** @from tanrei-text-input.variant */
|
|
123
|
+
this.variant = 'stacked';
|
|
124
|
+
/** @from tanrei-text-input.size */
|
|
125
|
+
this.size = 'medium';
|
|
126
|
+
/** @from tanrei-text-input.type */
|
|
127
|
+
this.type = 'text';
|
|
128
|
+
/** @from tanrei-text-input.placeholder */
|
|
129
|
+
this.placeholder = '';
|
|
130
|
+
/** @from tanrei-text-input.readOnly */
|
|
131
|
+
this.readOnly = false;
|
|
132
|
+
/** @from tanrei-text-input.multiline */
|
|
133
|
+
this.multiline = false;
|
|
134
|
+
/** @from tanrei-text-input.minRows */
|
|
135
|
+
this.minRows = 2;
|
|
136
|
+
/** @from tanrei-text-input.maxRows */
|
|
137
|
+
this.maxRows = 0;
|
|
138
|
+
/** @from tanrei-text-input.resize */
|
|
139
|
+
this.resize = 'auto';
|
|
140
|
+
/** @from tanrei-text-input.resizeAxis */
|
|
141
|
+
this.resizeAxis = 'vertical';
|
|
142
|
+
/** @from tanrei-text-input.resizeLabel */
|
|
143
|
+
this.resizeLabel = '';
|
|
144
|
+
/** @from tanrei-text-input.noWrap */
|
|
145
|
+
this.noWrap = false;
|
|
146
|
+
/** @from tanrei-text-input.maxLength */
|
|
147
|
+
this.maxLength = 0;
|
|
148
|
+
/** @from tanrei-text-input.counter */
|
|
149
|
+
this.counter = false;
|
|
150
|
+
/** @from tanrei-text-input.prefixText */
|
|
151
|
+
this.prefixText = '';
|
|
152
|
+
/** @from tanrei-text-input.suffixText */
|
|
153
|
+
this.suffixText = '';
|
|
154
|
+
/** @from tanrei-text-input.autocomplete */
|
|
155
|
+
this.autocomplete = '';
|
|
156
|
+
/** @from tanrei-text-input.locale */
|
|
157
|
+
this.locale = '';
|
|
158
|
+
/** @from tanrei-text-input.min */
|
|
159
|
+
this.min = '';
|
|
160
|
+
/** @from tanrei-text-input.max */
|
|
161
|
+
this.max = '';
|
|
162
|
+
/** @from tanrei-text-input.disabledDates */
|
|
163
|
+
this.disabledDates = [];
|
|
164
|
+
/** @from tanrei-text-input.invalidText */
|
|
165
|
+
this.invalidText = '';
|
|
166
|
+
/** @from tanrei-text-input.unavailableText */
|
|
167
|
+
this.unavailableText = '';
|
|
168
|
+
/** @from tanrei-text-input.segmentEmptyText */
|
|
169
|
+
this.segmentEmptyText = '';
|
|
170
|
+
/** @from tanrei-text-input.picker */
|
|
171
|
+
this.picker = false;
|
|
172
|
+
/** @from tanrei-text-input.pickerLabel */
|
|
173
|
+
this.pickerLabel = '';
|
|
174
|
+
this.hostNameSentence = 'TXF-62';
|
|
175
|
+
}
|
|
176
|
+
/** TXF-63: the one control the form meets. Its members stand in its shadow root, outside every form. */
|
|
177
|
+
static { this.formAssociated = true; }
|
|
178
|
+
// TXF-62: no width of its own — as an item of a row too (a horizontal field group, a product's own flex row), where
|
|
179
|
+
// a block's least width would be its native element's: the row decides, and the box fills what it is given.
|
|
180
|
+
static { this.styles = [
|
|
181
|
+
composedHost,
|
|
182
|
+
hiddenHost,
|
|
183
|
+
css `
|
|
184
|
+
:host {
|
|
185
|
+
min-inline-size: 0;
|
|
186
|
+
}
|
|
187
|
+
`,
|
|
188
|
+
]; }
|
|
189
|
+
/**
|
|
190
|
+
* Its parts, once: the two members and what each exports — a name both export, once.
|
|
191
|
+
*
|
|
192
|
+
* @internal
|
|
193
|
+
*/
|
|
194
|
+
static { this.parts = [...new Set(['field', 'text-input', ...FIELD_PARTS.names, ...INPUT_PARTS.names])]; }
|
|
195
|
+
static { this.properties = {
|
|
196
|
+
label: { type: String },
|
|
197
|
+
labelHidden: { type: Boolean, attribute: 'label-hidden', reflect: true },
|
|
198
|
+
supportingText: { type: String, attribute: 'supporting-text' },
|
|
199
|
+
errorText: { type: String, attribute: 'error-text' },
|
|
200
|
+
error: { type: Boolean, reflect: true },
|
|
201
|
+
disabled: { type: Boolean, reflect: true },
|
|
202
|
+
requirement: { type: String, reflect: true },
|
|
203
|
+
requiredMark: { type: String, attribute: 'required-mark', reflect: true },
|
|
204
|
+
requiredText: { type: String, attribute: 'required-text' },
|
|
205
|
+
optionalText: { type: String, attribute: 'optional-text' },
|
|
206
|
+
variant: { type: String, reflect: true },
|
|
207
|
+
size: { type: String, reflect: true },
|
|
208
|
+
type: { type: String, reflect: true, useDefault: true },
|
|
209
|
+
value: { type: String },
|
|
210
|
+
placeholder: { type: String },
|
|
211
|
+
readOnly: { type: Boolean, attribute: 'readonly', reflect: true },
|
|
212
|
+
multiline: { type: Boolean, reflect: true },
|
|
213
|
+
minRows: { type: Number, attribute: 'min-rows' },
|
|
214
|
+
maxRows: { type: Number, attribute: 'max-rows' },
|
|
215
|
+
resize: { type: String, reflect: true },
|
|
216
|
+
resizeAxis: { type: String, attribute: 'resize-axis', reflect: true },
|
|
217
|
+
resizeLabel: { type: String, attribute: 'resize-label' },
|
|
218
|
+
noWrap: { type: Boolean, attribute: 'no-wrap', reflect: true },
|
|
219
|
+
maxLength: { type: Number, attribute: 'maxlength' },
|
|
220
|
+
counter: { type: Boolean },
|
|
221
|
+
prefixText: { type: String, attribute: 'prefix-text' },
|
|
222
|
+
suffixText: { type: String, attribute: 'suffix-text' },
|
|
223
|
+
autocomplete: { type: String },
|
|
224
|
+
locale: { type: String },
|
|
225
|
+
min: { type: String },
|
|
226
|
+
max: { type: String },
|
|
227
|
+
disabledDates: { attribute: 'disabled-dates', converter: DISABLED_DATES },
|
|
228
|
+
invalidText: { type: String, attribute: 'invalid-text' },
|
|
229
|
+
unavailableText: { type: String, attribute: 'unavailable-text' },
|
|
230
|
+
segmentEmptyText: { type: String, attribute: 'segment-empty-text' },
|
|
231
|
+
picker: { type: Boolean, reflect: true },
|
|
232
|
+
pickerLabel: { type: String, attribute: 'picker-label' },
|
|
233
|
+
}; }
|
|
234
|
+
/** @from tanrei-text-input.value */
|
|
235
|
+
get value() {
|
|
236
|
+
return this.memberValue('');
|
|
237
|
+
}
|
|
238
|
+
set value(value) {
|
|
239
|
+
this.giveValue(value);
|
|
240
|
+
}
|
|
241
|
+
get valueMember() {
|
|
242
|
+
return this.renderRoot?.querySelector('tanrei-text-input') ?? null;
|
|
243
|
+
}
|
|
244
|
+
/** Selects the whole value, as the text input's `select()` does: a date or a time field's first segment takes focus. */
|
|
245
|
+
select() {
|
|
246
|
+
this.renderRoot?.querySelector('tanrei-text-input')?.select();
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* TXF-67 (`fills`: `field.countText`): the Field is given the count its text input keeps, as the input writes it,
|
|
250
|
+
* after each of the input's updates — empty while `counter` is not set. Nothing is counted, formatted or written
|
|
251
|
+
* here.
|
|
252
|
+
*/
|
|
253
|
+
memberUpdated() {
|
|
254
|
+
const field = this.renderRoot?.querySelector('tanrei-field');
|
|
255
|
+
const input = this.renderRoot?.querySelector('tanrei-text-input');
|
|
256
|
+
if (field && input && field.countText !== input.countText)
|
|
257
|
+
field.countText = input.countText;
|
|
258
|
+
}
|
|
259
|
+
// TXF-62: a Field whose one control is a text input, exactly as a product writes the two — and nothing else but the
|
|
260
|
+
// passage of the Field's label glyph and of the input's two icons. No text stands between the tags: the Field's
|
|
261
|
+
// control is its one child without a slot.
|
|
262
|
+
render() {
|
|
263
|
+
return html `<tanrei-field part="field" exportparts=${FIELD_PARTS.attribute} ${forward(this, FIELD)} .disabled=${this.disabled || this.formDisabled}
|
|
264
|
+
>${this.pass('label-icon')}<tanrei-text-input part="text-input" exportparts=${INPUT_PARTS.attribute} ${forward(this, INPUT)}
|
|
265
|
+
>${this.pass('leading-icon')}${this.pass('trailing-icon')}</tanrei-text-input
|
|
266
|
+
></tanrei-field
|
|
267
|
+
>`;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
if (!customElements.get('tanrei-text-field'))
|
|
271
|
+
customElements.define('tanrei-text-field', TanreiTextField);
|
|
272
|
+
//# sourceMappingURL=text-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-field.js","sourceRoot":"","sources":["../../../src/components/text-field/text-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAoB,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,M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
|
|
1
|
+
import { type DateKind, type RowPart, type SegmentUnit } from '../../primitives/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* What the segments hold. A year is its digits as typed — it counts as filled only with four of them (TXF-45: a short
|
|
4
|
+
* year is never guessed into a century); an hour is the number its segment shows (1 to 12 beside a day period, 0 to 23
|
|
5
|
+
* without one); every other number is its value, and null is an empty segment.
|
|
6
|
+
*/
|
|
7
|
+
export interface Segments {
|
|
8
|
+
year: string;
|
|
9
|
+
month: number | null;
|
|
10
|
+
day: number | null;
|
|
11
|
+
hour: number | null;
|
|
12
|
+
minute: number | null;
|
|
13
|
+
period: 0 | 1 | null;
|
|
14
|
+
}
|
|
15
|
+
export declare const EMPTY_SEGMENTS: Segments;
|
|
16
|
+
/** The row of one locale and kind: its parts in order (TXF-42), its units, and whether its clock is the 12-hour one. */
|
|
17
|
+
export interface Row {
|
|
18
|
+
locale: string;
|
|
19
|
+
kind: DateKind;
|
|
20
|
+
parts: readonly RowPart[];
|
|
21
|
+
units: readonly SegmentUnit[];
|
|
22
|
+
h12: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function rowOf(locale: string, kind: DateKind): Row;
|
|
25
|
+
export declare const placeholderOf: (row: Row, unit: SegmentUnit) => string;
|
|
26
|
+
/** A segment holds something (TXF-43's "first empty segment"); a year with one digit does, though it gives no value yet. */
|
|
27
|
+
export declare const holds: (segments: Segments, unit: SegmentUnit) => boolean;
|
|
28
|
+
/** The range a segment steps and types in (TXF-44), or null for a day period (its two names). */
|
|
29
|
+
export declare function rangeOf(row: Row, segments: Segments, unit: SegmentUnit): [number, number];
|
|
30
|
+
/** The segments of an ISO value of the row's kind (TXF-31); every segment empty for an empty or malformed one. */
|
|
31
|
+
export declare function segmentsOf(row: Row, value: string): Segments;
|
|
32
|
+
/** TXF-28, TXF-46: the ISO 8601 form of what the segments give, or empty while one of the row's is empty. */
|
|
33
|
+
export declare function valueOf(row: Row, segments: Segments): string;
|
|
34
|
+
/** How many of the row's segments hold something, and how many there are (TXF-30: half-filled is some, not all). */
|
|
35
|
+
export declare function fill(row: Row, segments: Segments): {
|
|
36
|
+
held: number;
|
|
37
|
+
whole: number;
|
|
38
|
+
of: number;
|
|
39
|
+
};
|
|
40
|
+
/** What a segment shows while it holds something (TXF-42), in the locale's digits; empty for an empty one. */
|
|
41
|
+
export declare function shownOf(row: Row, segments: Segments, unit: SegmentUnit): string;
|
|
42
|
+
/**
|
|
43
|
+
* What a segment's cell is as wide as (TXF-42): the widest of these copies, none of which is drawn. Its filled form —
|
|
44
|
+
* two digits, four for a year, either name of a day period — so that it keeps that width while it is half typed and
|
|
45
|
+
* while it is empty; and, while it is empty, its placeholder, because "mm" is wider than two digits in most faces and
|
|
46
|
+
* would otherwise run into the separators beside it (so a row shifts by that difference, and by no more, when such a
|
|
47
|
+
* segment takes its first digit). An hour is written as the locale writes it, one digit or two: a filled one is as wide
|
|
48
|
+
* as itself, so the row starts where the input text starts ("2:30 PM").
|
|
49
|
+
*/
|
|
50
|
+
export declare function sizersOf(row: Row, segments: Segments, unit: SegmentUnit): string[];
|
|
51
|
+
/** TXF-29, TXF-30: the row's text as drawn — the locale's form, an empty segment's placeholder left out. */
|
|
52
|
+
export declare const rowText: (row: Row, segments: Segments) => string;
|
|
53
|
+
/** TXF-47: a segment as assistive technology hears it. */
|
|
54
|
+
export declare function spoken(row: Row, segments: Segments, unit: SegmentUnit, emptyText: string): {
|
|
55
|
+
name: string;
|
|
56
|
+
min: number;
|
|
57
|
+
max: number;
|
|
58
|
+
now: number | null;
|
|
59
|
+
text: string | null;
|
|
60
|
+
};
|
|
61
|
+
/** TXF-44: what Page Up and Page Down step by. */
|
|
62
|
+
export declare const PAGE: Readonly<Record<SegmentUnit, number>>;
|
|
63
|
+
/**
|
|
64
|
+
* TXF-44: a segment raised or lowered by `by` within its own range, wrapping from the last value to the first and
|
|
65
|
+
* back; an empty one is filled from the device's clock instead. No other segment changes, except a day beyond the last
|
|
66
|
+
* day of the month and year the row now gives.
|
|
67
|
+
*/
|
|
68
|
+
export declare function stepped(row: Row, segments: Segments, unit: SegmentUnit, by: number, now: Date): Segments;
|
|
69
|
+
/** TXF-44: Home and End set a month, day, hour or minute to the first and the last value of its range. */
|
|
70
|
+
export declare function edged(row: Row, segments: Segments, unit: SegmentUnit, edge: 'first' | 'last'): Segments;
|
|
71
|
+
/**
|
|
72
|
+
* TXF-45: a digit typed on a number segment. `typed` is the digits typed since the segment took focus: the digit is the
|
|
73
|
+
* number's next one while they still form a number in the segment's range, and starts the number again otherwise. A
|
|
74
|
+
* leading zero of a month, day or 12-hour hour waits for its second digit ("09"). `advance` says that no further digit
|
|
75
|
+
* could extend the number.
|
|
76
|
+
*/
|
|
77
|
+
export declare function typed(row: Row, segments: Segments, unit: Exclude<SegmentUnit, 'period'>, typedSoFar: string, digit: string): {
|
|
78
|
+
segments: Segments;
|
|
79
|
+
typed: string;
|
|
80
|
+
advance: boolean;
|
|
81
|
+
};
|
|
82
|
+
/** TXF-45: Backspace or Delete removes the last digit of a number segment, or the whole of a day period. */
|
|
83
|
+
export declare function erased(row: Row, segments: Segments, unit: SegmentUnit): {
|
|
84
|
+
segments: Segments;
|
|
85
|
+
typed: string;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* TXF-45: a letter typed on a day-period segment — the first letter of the locale's name for the morning or for the
|
|
89
|
+
* afternoon (where the two differ), or a or p in any case. Null for any other character.
|
|
90
|
+
*/
|
|
91
|
+
export declare function periodTyped(row: Row, character: string): 0 | 1 | null;
|
|
92
|
+
/** TXF-45: the characters that move on from a segment that is not empty: a separator's. */
|
|
93
|
+
export declare const SEPARATORS: ReadonlySet<string>;
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
// The row of segments a date, time or date-time field is entered in (TXF-42 … TXF-47): what each segment holds, shows
|
|
2
|
+
// and says, and what a step, a digit and a Backspace do to it. Everything here is pure — the element in text-field.ts
|
|
3
|
+
// owns the focus, the events and the value; the locale's order, digits and names come from src/primitives/locale-date.ts.
|
|
4
|
+
import { daysInMonth, hourOf12, hourText, isoValue, localeHourCycle, minuteText, monthName, numberText, periodNames, periodOf, shownHour12, unitName, valueRow, yearText, } from '../../primitives/index.js';
|
|
5
|
+
export const EMPTY_SEGMENTS = { year: '', month: null, day: null, hour: null, minute: null, period: null };
|
|
6
|
+
const rows = new Map();
|
|
7
|
+
export function rowOf(locale, kind) {
|
|
8
|
+
const key = `${locale}|${kind}`;
|
|
9
|
+
let row = rows.get(key);
|
|
10
|
+
if (!row) {
|
|
11
|
+
const parts = valueRow(locale, kind);
|
|
12
|
+
const units = parts.flatMap((part) => (part.unit ? [part.unit] : []));
|
|
13
|
+
row = { locale, kind, parts, units, h12: kind !== 'date' && localeHourCycle(locale) === 'h12' && units.includes('period') };
|
|
14
|
+
rows.set(key, row);
|
|
15
|
+
}
|
|
16
|
+
return row;
|
|
17
|
+
}
|
|
18
|
+
/** What an empty segment shows (TXF-42): yyyy, mm, dd, hh and mm; for the day period, the locale's name for the morning. */
|
|
19
|
+
const LETTERS = { year: 'yyyy', month: 'mm', day: 'dd', hour: 'hh', minute: 'mm' };
|
|
20
|
+
export const placeholderOf = (row, unit) => (unit === 'period' ? periodNames(row.locale)[0] : LETTERS[unit]);
|
|
21
|
+
/** The year the segments give, or null while it has fewer than four digits (or is 0000). */
|
|
22
|
+
const fullYear = (segments) => (segments.year.length === 4 && Number(segments.year) >= 1 ? Number(segments.year) : null);
|
|
23
|
+
/** A segment holds something (TXF-43's "first empty segment"); a year with one digit does, though it gives no value yet. */
|
|
24
|
+
export const holds = (segments, unit) => (unit === 'year' ? segments.year !== '' : segments[unit] !== null);
|
|
25
|
+
/** The range a segment steps and types in (TXF-44), or null for a day period (its two names). */
|
|
26
|
+
export function rangeOf(row, segments, unit) {
|
|
27
|
+
if (unit === 'year')
|
|
28
|
+
return [1, 9999];
|
|
29
|
+
if (unit === 'month')
|
|
30
|
+
return [1, 12];
|
|
31
|
+
if (unit === 'day') {
|
|
32
|
+
// 31 while the month is empty, 29 for a February whose year is empty (or not yet whole).
|
|
33
|
+
if (segments.month === null)
|
|
34
|
+
return [1, 31];
|
|
35
|
+
return [1, daysInMonth(fullYear(segments) ?? 2000, segments.month)];
|
|
36
|
+
}
|
|
37
|
+
if (unit === 'hour')
|
|
38
|
+
return row.h12 ? [1, 12] : [0, 23];
|
|
39
|
+
if (unit === 'minute')
|
|
40
|
+
return [0, 59];
|
|
41
|
+
return [0, 1];
|
|
42
|
+
}
|
|
43
|
+
/** TXF-44: a day beyond the last day of a newly chosen month or year becomes that last day. */
|
|
44
|
+
function settleDay(row, segments) {
|
|
45
|
+
if (segments.day === null)
|
|
46
|
+
return segments;
|
|
47
|
+
const last = rangeOf(row, segments, 'day')[1];
|
|
48
|
+
return segments.day > last ? { ...segments, day: last } : segments;
|
|
49
|
+
}
|
|
50
|
+
/** The segments of an ISO value of the row's kind (TXF-31); every segment empty for an empty or malformed one. */
|
|
51
|
+
export function segmentsOf(row, value) {
|
|
52
|
+
if (!value || !isoValue(row.kind, value))
|
|
53
|
+
return EMPTY_SEGMENTS;
|
|
54
|
+
const [date, time] = row.kind === 'time' ? ['', value] : value.split('T');
|
|
55
|
+
const out = { ...EMPTY_SEGMENTS };
|
|
56
|
+
if (date) {
|
|
57
|
+
const [year, month, day] = date.split('-');
|
|
58
|
+
Object.assign(out, { year, month: Number(month), day: Number(day) });
|
|
59
|
+
}
|
|
60
|
+
if (time) {
|
|
61
|
+
const [hour, minute] = time.split(':').map(Number);
|
|
62
|
+
out.minute = minute;
|
|
63
|
+
out.hour = row.h12 ? shownHour12(hour) : hour;
|
|
64
|
+
out.period = row.h12 ? periodOf(hour) : null;
|
|
65
|
+
}
|
|
66
|
+
return out;
|
|
67
|
+
}
|
|
68
|
+
/** TXF-28, TXF-46: the ISO 8601 form of what the segments give, or empty while one of the row's is empty. */
|
|
69
|
+
export function valueOf(row, segments) {
|
|
70
|
+
const two = (n) => String(n).padStart(2, '0');
|
|
71
|
+
let date = '';
|
|
72
|
+
let time = '';
|
|
73
|
+
if (row.kind !== 'time') {
|
|
74
|
+
const year = fullYear(segments);
|
|
75
|
+
if (year === null || segments.month === null || segments.day === null)
|
|
76
|
+
return '';
|
|
77
|
+
date = `${segments.year}-${two(segments.month)}-${two(segments.day)}`;
|
|
78
|
+
}
|
|
79
|
+
if (row.kind !== 'date') {
|
|
80
|
+
if (segments.hour === null || segments.minute === null || (row.h12 && segments.period === null))
|
|
81
|
+
return '';
|
|
82
|
+
time = `${two(row.h12 ? hourOf12(segments.hour, segments.period) : segments.hour)}:${two(segments.minute)}`;
|
|
83
|
+
}
|
|
84
|
+
const value = row.kind === 'date' ? date : row.kind === 'time' ? time : `${date}T${time}`;
|
|
85
|
+
return isoValue(row.kind, value) ?? '';
|
|
86
|
+
}
|
|
87
|
+
/** How many of the row's segments hold something, and how many there are (TXF-30: half-filled is some, not all). */
|
|
88
|
+
export function fill(row, segments) {
|
|
89
|
+
const whole = row.units.filter((unit) => (unit === 'year' ? fullYear(segments) !== null : segments[unit] !== null)).length;
|
|
90
|
+
return { held: row.units.filter((unit) => holds(segments, unit)).length, whole, of: row.units.length };
|
|
91
|
+
}
|
|
92
|
+
/** What a segment shows while it holds something (TXF-42), in the locale's digits; empty for an empty one. */
|
|
93
|
+
export function shownOf(row, segments, unit) {
|
|
94
|
+
const { locale } = row;
|
|
95
|
+
if (!holds(segments, unit))
|
|
96
|
+
return '';
|
|
97
|
+
if (unit === 'year')
|
|
98
|
+
return yearText(locale, Number(segments.year));
|
|
99
|
+
if (unit === 'month')
|
|
100
|
+
return numberText(locale, segments.month, 2);
|
|
101
|
+
if (unit === 'day')
|
|
102
|
+
return numberText(locale, segments.day, 2);
|
|
103
|
+
if (unit === 'minute')
|
|
104
|
+
return minuteText(locale, segments.minute);
|
|
105
|
+
if (unit === 'hour')
|
|
106
|
+
return row.h12 ? hourText(locale, 'h12', hourOf12(segments.hour, 0)) : hourText(locale, 'h23', segments.hour);
|
|
107
|
+
return periodNames(locale)[segments.period];
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* What a segment's cell is as wide as (TXF-42): the widest of these copies, none of which is drawn. Its filled form —
|
|
111
|
+
* two digits, four for a year, either name of a day period — so that it keeps that width while it is half typed and
|
|
112
|
+
* while it is empty; and, while it is empty, its placeholder, because "mm" is wider than two digits in most faces and
|
|
113
|
+
* would otherwise run into the separators beside it (so a row shifts by that difference, and by no more, when such a
|
|
114
|
+
* segment takes its first digit). An hour is written as the locale writes it, one digit or two: a filled one is as wide
|
|
115
|
+
* as itself, so the row starts where the input text starts ("2:30 PM").
|
|
116
|
+
*/
|
|
117
|
+
export function sizersOf(row, segments, unit) {
|
|
118
|
+
if (unit === 'period')
|
|
119
|
+
return [...periodNames(row.locale)];
|
|
120
|
+
if (unit === 'hour' && segments.hour !== null)
|
|
121
|
+
return [shownOf(row, segments, unit)];
|
|
122
|
+
const filled = numberText(row.locale, 0, unit === 'year' ? 4 : 2);
|
|
123
|
+
return holds(segments, unit) ? [filled] : [filled, placeholderOf(row, unit)];
|
|
124
|
+
}
|
|
125
|
+
/** TXF-29, TXF-30: the row's text as drawn — the locale's form, an empty segment's placeholder left out. */
|
|
126
|
+
export const rowText = (row, segments) => (fill(row, segments).held === 0 ? '' : row.parts.map((part) => (part.unit ? shownOf(row, segments, part.unit) : part.literal)).join(''));
|
|
127
|
+
/** TXF-47: a segment as assistive technology hears it. */
|
|
128
|
+
export function spoken(row, segments, unit, emptyText) {
|
|
129
|
+
const { locale } = row;
|
|
130
|
+
const [min, max] = rangeOf(row, segments, unit);
|
|
131
|
+
const name = unitName(locale, unit);
|
|
132
|
+
if (!holds(segments, unit))
|
|
133
|
+
return { name, min, max, now: null, text: emptyText || null };
|
|
134
|
+
if (unit === 'period')
|
|
135
|
+
return { name, min, max, now: segments.period, text: periodNames(locale)[segments.period] };
|
|
136
|
+
if (unit === 'year')
|
|
137
|
+
return { name, min, max, now: Number(segments.year), text: null };
|
|
138
|
+
const now = segments[unit];
|
|
139
|
+
if (unit === 'month')
|
|
140
|
+
return { name, min, max, now, text: `${numberText(locale, now)} – ${monthName(locale, now)}` };
|
|
141
|
+
if (unit === 'hour' && row.h12 && segments.period !== null)
|
|
142
|
+
return { name, min, max, now, text: `${numberText(locale, now)} ${periodNames(locale)[segments.period]}` };
|
|
143
|
+
return { name, min, max, now, text: null };
|
|
144
|
+
}
|
|
145
|
+
/** TXF-44: what Page Up and Page Down step by. */
|
|
146
|
+
export const PAGE = { year: 5, month: 2, day: 7, hour: 2, minute: 15, period: 1 };
|
|
147
|
+
/** The device's clock, as a segment of `unit` holds it. */
|
|
148
|
+
function current(row, unit, now) {
|
|
149
|
+
if (unit === 'year')
|
|
150
|
+
return String(now.getFullYear()).padStart(4, '0');
|
|
151
|
+
if (unit === 'month')
|
|
152
|
+
return now.getMonth() + 1;
|
|
153
|
+
if (unit === 'day')
|
|
154
|
+
return now.getDate();
|
|
155
|
+
if (unit === 'hour')
|
|
156
|
+
return row.h12 ? shownHour12(now.getHours()) : now.getHours();
|
|
157
|
+
if (unit === 'minute')
|
|
158
|
+
return now.getMinutes();
|
|
159
|
+
return periodOf(now.getHours());
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* TXF-44: a segment raised or lowered by `by` within its own range, wrapping from the last value to the first and
|
|
163
|
+
* back; an empty one is filled from the device's clock instead. No other segment changes, except a day beyond the last
|
|
164
|
+
* day of the month and year the row now gives.
|
|
165
|
+
*/
|
|
166
|
+
export function stepped(row, segments, unit, by, now) {
|
|
167
|
+
if (!holds(segments, unit)) {
|
|
168
|
+
const filled = { ...segments, [unit]: current(row, unit, now) };
|
|
169
|
+
// The clock's day may not exist in the month the row already holds.
|
|
170
|
+
return settleDay(row, filled);
|
|
171
|
+
}
|
|
172
|
+
const [min, max] = rangeOf(row, segments, unit);
|
|
173
|
+
const from = unit === 'year' ? Number(segments.year) : segments[unit];
|
|
174
|
+
const span = max - min + 1;
|
|
175
|
+
const to = min + ((((Math.min(Math.max(from, min), max) - min + by) % span) + span) % span);
|
|
176
|
+
return settleDay(row, { ...segments, [unit]: unit === 'year' ? String(to).padStart(4, '0') : to });
|
|
177
|
+
}
|
|
178
|
+
/** TXF-44: Home and End set a month, day, hour or minute to the first and the last value of its range. */
|
|
179
|
+
export function edged(row, segments, unit, edge) {
|
|
180
|
+
if (unit === 'year' || unit === 'period')
|
|
181
|
+
return segments;
|
|
182
|
+
const [min, max] = rangeOf(row, segments, unit);
|
|
183
|
+
return settleDay(row, { ...segments, [unit]: edge === 'first' ? min : max });
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* TXF-45: a digit typed on a number segment. `typed` is the digits typed since the segment took focus: the digit is the
|
|
187
|
+
* number's next one while they still form a number in the segment's range, and starts the number again otherwise. A
|
|
188
|
+
* leading zero of a month, day or 12-hour hour waits for its second digit ("09"). `advance` says that no further digit
|
|
189
|
+
* could extend the number.
|
|
190
|
+
*/
|
|
191
|
+
export function typed(row, segments, unit, typedSoFar, digit) {
|
|
192
|
+
if (unit === 'year') {
|
|
193
|
+
let text = typedSoFar.length < 4 ? typedSoFar + digit : digit;
|
|
194
|
+
if (text.length === 4 && Number(text) < 1)
|
|
195
|
+
text = digit;
|
|
196
|
+
return { segments: settleDay(row, { ...segments, year: text }), typed: text, advance: text.length === 4 };
|
|
197
|
+
}
|
|
198
|
+
const [min, max] = rangeOf(row, segments, unit);
|
|
199
|
+
const fits = (text) => text.length <= 2 && Number(text) <= max && (Number(text) >= min || text === '0');
|
|
200
|
+
const text = fits(typedSoFar + digit) ? typedSoFar + digit : digit;
|
|
201
|
+
const number = Number(text);
|
|
202
|
+
const value = number >= min && number <= max ? number : null;
|
|
203
|
+
const next = settleDay(row, { ...segments, [unit]: value });
|
|
204
|
+
return { segments: next, typed: text, advance: value !== null && (text.length === 2 || number * 10 > max) };
|
|
205
|
+
}
|
|
206
|
+
/** TXF-45: Backspace or Delete removes the last digit of a number segment, or the whole of a day period. */
|
|
207
|
+
export function erased(row, segments, unit) {
|
|
208
|
+
if (unit === 'period')
|
|
209
|
+
return { segments: { ...segments, period: null }, typed: '' };
|
|
210
|
+
if (unit === 'year') {
|
|
211
|
+
const year = segments.year.slice(0, -1);
|
|
212
|
+
return { segments: settleDay(row, { ...segments, year }), typed: year };
|
|
213
|
+
}
|
|
214
|
+
const value = segments[unit];
|
|
215
|
+
const rest = value === null ? '' : String(value).slice(0, -1);
|
|
216
|
+
return { segments: settleDay(row, { ...segments, [unit]: rest ? Number(rest) : null }), typed: rest };
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* TXF-45: a letter typed on a day-period segment — the first letter of the locale's name for the morning or for the
|
|
220
|
+
* afternoon (where the two differ), or a or p in any case. Null for any other character.
|
|
221
|
+
*/
|
|
222
|
+
export function periodTyped(row, character) {
|
|
223
|
+
const letter = character.toLocaleLowerCase();
|
|
224
|
+
const [am, pm] = periodNames(row.locale).map((name) => name.trim().toLocaleLowerCase().slice(0, 1));
|
|
225
|
+
if (am !== pm && letter === am)
|
|
226
|
+
return 0;
|
|
227
|
+
if (am !== pm && letter === pm)
|
|
228
|
+
return 1;
|
|
229
|
+
return letter === 'a' ? 0 : letter === 'p' ? 1 : null;
|
|
230
|
+
}
|
|
231
|
+
/** TXF-45: the characters that move on from a segment that is not empty: a separator's. */
|
|
232
|
+
export const SEPARATORS = new Set(['/', '.', '-', ':', ' ']);
|
|
233
|
+
//# sourceMappingURL=text-input-segments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-input-segments.js","sourceRoot":"","sources":["../../../src/components/text-input/text-input-segments.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,sHAAsH;AACtH,0HAA0H;AAC1H,OAAO,EAIL,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,UAAU,EACV,SAAS,EACT,UAAU,EACV,WAAW,EACX,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,MAAM,2BAA2B,CAAC;AAenC,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