@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,159 @@
|
|
|
1
|
+
import { type PropertyDeclarations, type PropertyValues } from 'lit';
|
|
2
|
+
import { ComposedControl, type ValueMember } from '../../primitives/composed.js';
|
|
3
|
+
import { type TanreiComboboxChangeDetail, type TanreiComboboxFilter, type TanreiComboboxSeparation, type TanreiComboboxSize, type TanreiComboboxStatus, type TanreiComboboxToggleDetail, type TanreiComboboxToggleReason, type TanreiComboboxVariant } from '../combobox/combobox.js';
|
|
4
|
+
import { type TanreiFieldRequiredMark, type TanreiFieldRequirement } from '../field/field.js';
|
|
5
|
+
export type { TanreiComboboxChangeDetail, TanreiComboboxFilter, TanreiComboboxSeparation, TanreiComboboxSize, TanreiComboboxStatus, TanreiComboboxToggleDetail, TanreiComboboxToggleReason, TanreiComboboxVariant, TanreiFieldRequiredMark, TanreiFieldRequirement, };
|
|
6
|
+
/**
|
|
7
|
+
* Lets people find one value by typing, as one complete field of a form. Built from a Field (`<tanrei-field>`) and
|
|
8
|
+
* the Combobox (`<tanrei-combobox>`) it frames: the box with its list of options under the Field's label — or, in the
|
|
9
|
+
* filled and the outlined look, with the label floating in it — with the Field's requirement mark, its help and its
|
|
10
|
+
* error, tied together for assistive technology and taking part in a form as one control.
|
|
11
|
+
*
|
|
12
|
+
* Contract: specs/combobox-field.spec.json.
|
|
13
|
+
*
|
|
14
|
+
* ```html
|
|
15
|
+
* <tanrei-combobox-field name="city" label="City" requirement="required" supporting-text="Where the order is sent." value="tokyo">
|
|
16
|
+
* <tanrei-option value="kyoto">Kyoto</tanrei-option>
|
|
17
|
+
* <tanrei-option value="tokyo">Tokyo</tanrei-option>
|
|
18
|
+
* </tanrei-combobox-field>
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* Composed (`src/primitives/composed.ts`): its shadow root holds the two members' own elements and nothing
|
|
22
|
+
* else, so it draws nothing of its own and has no token — every `--tanrei-comp-field-*`,
|
|
23
|
+
* `--tanrei-comp-input-box-*` and `--tanrei-comp-combobox-*` value reaches the members by inheritance, and one combobox field is set apart by setting
|
|
24
|
+
* such a property on this element. Each property is its member's, set on that member unchanged: `label`,
|
|
25
|
+
* `label-hidden`, `supporting-text`, `error-text`, `error`, `disabled`, `requirement`, `required-mark`,
|
|
26
|
+
* `required-text` and `optional-text` are the Field's, every other one the combobox's. One level down, the same by
|
|
27
|
+
* hand: `<tanrei-field label="City" requirement="required" supporting-text="Where the order is sent."><tanrei-combobox
|
|
28
|
+
* name="city" value="tokyo"><tanrei-option value="kyoto">Kyoto</tanrei-option>…</tanrei-combobox></tanrei-field>` — and
|
|
29
|
+
* the box alone, where a label stands elsewhere, is `<tanrei-combobox>` with a `label` of its own.
|
|
30
|
+
*
|
|
31
|
+
* **The options are this element's own children** — `<tanrei-option>`, optionally in `<tanrei-option-group>` — and
|
|
32
|
+
* they stay there: nothing moves, copies or reads them here. They reach the combobox through a slot, and the combobox
|
|
33
|
+
* reads them as its own, again whenever one is added, removed or changed (CBF-2).
|
|
34
|
+
*
|
|
35
|
+
* It is a block as wide as its place, and its box fills it (CBF-1): give it a narrower place for a narrower box.
|
|
36
|
+
*
|
|
37
|
+
* `value`, `inputValue` and `open` are at every moment the combobox's (CBF-3): this element keeps no copy, so each is
|
|
38
|
+
* the new one in every listener and where the combobox writes it with no event (a text given up on leaving). The four
|
|
39
|
+
* events are the combobox's own, with this element as their target; `toggle` does not bubble. It dispatches none
|
|
40
|
+
* itself.
|
|
41
|
+
*
|
|
42
|
+
* Form-associated: it submits the committed value under `name` — never the text of an edit, and nothing while
|
|
43
|
+
* disabled —, resets to its `value` attribute, is restored on navigation, follows a disabled `<fieldset>`, and reports
|
|
44
|
+
* a missing value while `requirement` is `required` and the value is empty. Enter with no option active presses the
|
|
45
|
+
* default button of this element's form.
|
|
46
|
+
*
|
|
47
|
+
* The element is not focusable itself and has no role: `focus()` goes to the input, and its name is `label` (with
|
|
48
|
+
* `label-hidden` where it is not drawn), never `aria-label`. A press on the label row or on the box focuses the input;
|
|
49
|
+
* a press on the label row while the list is open is a press outside the combobox, and closes the list; a press on
|
|
50
|
+
* the help or the error text does nothing.
|
|
51
|
+
*
|
|
52
|
+
* @tag tanrei-combobox-field
|
|
53
|
+
* @slot - => tanrei-combobox
|
|
54
|
+
* @slot label-icon - => tanrei-field
|
|
55
|
+
* @slot leading-icon - => tanrei-combobox
|
|
56
|
+
* @csspart field - The frame: the `<tanrei-field>` it is built from.
|
|
57
|
+
* @csspart combobox - The control: the `<tanrei-combobox>` it is built from.
|
|
58
|
+
* @exportparts tanrei-field label: field-label, label, requirement-label: field-requirement-label, requirement-label, -counter, -value-text
|
|
59
|
+
* @exportparts tanrei-combobox label: combobox-label, label, requirement-label: combobox-requirement-label, requirement-label
|
|
60
|
+
* @attr {string} form - The id of the form the combobox 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.
|
|
61
|
+
* @fires input - => tanrei-combobox
|
|
62
|
+
* @fires change - => tanrei-combobox
|
|
63
|
+
* @fires toggle - => tanrei-combobox
|
|
64
|
+
* @fires action - => tanrei-combobox
|
|
65
|
+
*/
|
|
66
|
+
export declare class TanreiComboboxField extends ComposedControl<string> {
|
|
67
|
+
/** CBF-4: the one control the form meets. Its members stand in its shadow root, outside every form. */
|
|
68
|
+
static formAssociated: boolean;
|
|
69
|
+
static styles: import("lit").CSSResult[];
|
|
70
|
+
/**
|
|
71
|
+
* Its parts, once: the two members and what each exports — a name both export, once.
|
|
72
|
+
*
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
static readonly parts: readonly string[];
|
|
76
|
+
static properties: PropertyDeclarations;
|
|
77
|
+
/** @from tanrei-field.label */
|
|
78
|
+
label: string;
|
|
79
|
+
/** @from tanrei-field.labelHidden */
|
|
80
|
+
labelHidden: boolean;
|
|
81
|
+
/** @from tanrei-field.supportingText */
|
|
82
|
+
supportingText: string;
|
|
83
|
+
/** @from tanrei-field.errorText */
|
|
84
|
+
errorText: string;
|
|
85
|
+
/** @from tanrei-field.error */
|
|
86
|
+
error: boolean;
|
|
87
|
+
/** @from tanrei-field.disabled */
|
|
88
|
+
disabled: boolean;
|
|
89
|
+
/** @from tanrei-field.requirement */
|
|
90
|
+
requirement: TanreiFieldRequirement;
|
|
91
|
+
/** @from tanrei-field.requiredMark */
|
|
92
|
+
requiredMark: TanreiFieldRequiredMark;
|
|
93
|
+
/** @from tanrei-field.requiredText */
|
|
94
|
+
requiredText: string;
|
|
95
|
+
/** @from tanrei-field.optionalText */
|
|
96
|
+
optionalText: string;
|
|
97
|
+
/** @from tanrei-combobox.variant */
|
|
98
|
+
variant: TanreiComboboxVariant;
|
|
99
|
+
/** @from tanrei-combobox.size */
|
|
100
|
+
size: TanreiComboboxSize;
|
|
101
|
+
/** @from tanrei-combobox.value */
|
|
102
|
+
get value(): string;
|
|
103
|
+
set value(value: string);
|
|
104
|
+
/** @from tanrei-combobox.inputValue */
|
|
105
|
+
get inputValue(): string;
|
|
106
|
+
set inputValue(text: string);
|
|
107
|
+
/** @from tanrei-combobox.placeholder */
|
|
108
|
+
placeholder: string;
|
|
109
|
+
/** @from tanrei-combobox.readOnly */
|
|
110
|
+
readOnly: boolean;
|
|
111
|
+
/** @from tanrei-combobox.open */
|
|
112
|
+
get open(): boolean;
|
|
113
|
+
set open(open: boolean);
|
|
114
|
+
/** @from tanrei-combobox.allowCustomValue */
|
|
115
|
+
allowCustomValue: boolean;
|
|
116
|
+
/** @from tanrei-combobox.filter */
|
|
117
|
+
filter: TanreiComboboxFilter;
|
|
118
|
+
/** @from tanrei-combobox.noChevron */
|
|
119
|
+
noChevron: boolean;
|
|
120
|
+
/** @from tanrei-combobox.clearable */
|
|
121
|
+
clearable: boolean;
|
|
122
|
+
/** @from tanrei-combobox.clearLabel */
|
|
123
|
+
clearLabel: string;
|
|
124
|
+
/** @from tanrei-combobox.status */
|
|
125
|
+
status: TanreiComboboxStatus;
|
|
126
|
+
/** @from tanrei-combobox.statusText */
|
|
127
|
+
statusText: string;
|
|
128
|
+
/** @from tanrei-combobox.emptyText */
|
|
129
|
+
emptyText: string;
|
|
130
|
+
/** @from tanrei-combobox.separation */
|
|
131
|
+
separation: TanreiComboboxSeparation;
|
|
132
|
+
/**
|
|
133
|
+
* Web only, for fixtures and tests: its combobox's `inline`, which draws the open list in place. No prop of the spec:
|
|
134
|
+
* a fixture and its twin are staged alike by it.
|
|
135
|
+
*
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
inline: boolean;
|
|
139
|
+
protected readonly hostNameSentence = "CBF-1";
|
|
140
|
+
/** CBF-3: what the product set on the element and the combobox has not been given yet. */
|
|
141
|
+
private readonly asked;
|
|
142
|
+
private get combobox();
|
|
143
|
+
protected get valueMember(): ValueMember<string> | null;
|
|
144
|
+
/** Selects the text in the input, as the combobox's `select()` does. */
|
|
145
|
+
select(): void;
|
|
146
|
+
protected updated(changed: PropertyValues): void;
|
|
147
|
+
/**
|
|
148
|
+
* CBF-3: `open` is reflected on the host as it is on the combobox. The combobox opens and closes its list itself, so
|
|
149
|
+
* the host's attribute follows what the combobox holds after each of its updates — which is when it tells its form,
|
|
150
|
+
* and so this element (`ComposedControl.memberUpdated`).
|
|
151
|
+
*/
|
|
152
|
+
protected memberUpdated(): void;
|
|
153
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
154
|
+
}
|
|
155
|
+
declare global {
|
|
156
|
+
interface HTMLElementTagNameMap {
|
|
157
|
+
'tanrei-combobox-field': TanreiComboboxField;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
@@ -0,0 +1,280 @@
|
|
|
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 { TanreiCombobox, } from '../combobox/combobox.js';
|
|
5
|
+
import { TanreiField } from '../field/field.js';
|
|
6
|
+
/** CBF-1: 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
|
+
/**
|
|
9
|
+
* CBF-1: the sixteen props that are the combobox's, and `inline`, its web-only attribute that draws an open list in
|
|
10
|
+
* place (a fixture and its twin are then staged alike). Its own `label`, `labelHidden`, `error` and `disabled` are
|
|
11
|
+
* never set. `value`, `inputValue` and `open` are the three the combobox writes itself: what is set here is what the
|
|
12
|
+
* combobox holds already, unless the product has just set another (CBF-3).
|
|
13
|
+
*/
|
|
14
|
+
const COMBOBOX = [
|
|
15
|
+
'variant',
|
|
16
|
+
'size',
|
|
17
|
+
'value',
|
|
18
|
+
'inputValue',
|
|
19
|
+
'placeholder',
|
|
20
|
+
'readOnly',
|
|
21
|
+
'open',
|
|
22
|
+
'allowCustomValue',
|
|
23
|
+
'filter',
|
|
24
|
+
'noChevron',
|
|
25
|
+
'clearable',
|
|
26
|
+
'clearLabel',
|
|
27
|
+
'status',
|
|
28
|
+
'statusText',
|
|
29
|
+
'emptyText',
|
|
30
|
+
'separation',
|
|
31
|
+
'inline',
|
|
32
|
+
];
|
|
33
|
+
/**
|
|
34
|
+
* W4: each member's documented parts, from the member's own list. Two names are shared — `label` and
|
|
35
|
+
* `requirement-label` — and each is exported with its member's name before it, always, and under the bare name from
|
|
36
|
+
* both: the two are one thing to a person and are never drawn at once. FLD-25 is the sentence that holds it — while
|
|
37
|
+
* its control draws the label itself the Field draws no label row and no requirement tag — and a stacked combobox
|
|
38
|
+
* draws neither (CMB-7, CMB-8). So `::part(label)` is the drawn label, whichever member draws it. The Field's
|
|
39
|
+
* `counter` is left out: a combobox keeps no count (CMB-61), so the part is never drawn in a combobox field.
|
|
40
|
+
*/
|
|
41
|
+
const FIELD_PARTS = exported(TanreiField, { label: { as: 'field-label', bare: true }, 'requirement-label': { as: 'field-requirement-label', bare: true } }, ['counter', 'value-text']);
|
|
42
|
+
const COMBOBOX_PARTS = exported(TanreiCombobox, { label: { as: 'combobox-label', bare: true }, 'requirement-label': { as: 'combobox-requirement-label', bare: true } });
|
|
43
|
+
/**
|
|
44
|
+
* Lets people find one value by typing, as one complete field of a form. Built from a Field (`<tanrei-field>`) and
|
|
45
|
+
* the Combobox (`<tanrei-combobox>`) it frames: the box with its list of options under the Field's label — or, in the
|
|
46
|
+
* filled and the outlined look, with the label floating in it — with the Field's requirement mark, its help and its
|
|
47
|
+
* error, tied together for assistive technology and taking part in a form as one control.
|
|
48
|
+
*
|
|
49
|
+
* Contract: specs/combobox-field.spec.json.
|
|
50
|
+
*
|
|
51
|
+
* ```html
|
|
52
|
+
* <tanrei-combobox-field name="city" label="City" requirement="required" supporting-text="Where the order is sent." value="tokyo">
|
|
53
|
+
* <tanrei-option value="kyoto">Kyoto</tanrei-option>
|
|
54
|
+
* <tanrei-option value="tokyo">Tokyo</tanrei-option>
|
|
55
|
+
* </tanrei-combobox-field>
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* Composed (`src/primitives/composed.ts`): its shadow root holds the two members' own elements and nothing
|
|
59
|
+
* else, so it draws nothing of its own and has no token — every `--tanrei-comp-field-*`,
|
|
60
|
+
* `--tanrei-comp-input-box-*` and `--tanrei-comp-combobox-*` value reaches the members by inheritance, and one combobox field is set apart by setting
|
|
61
|
+
* such a property on this element. Each property is its member's, set on that member unchanged: `label`,
|
|
62
|
+
* `label-hidden`, `supporting-text`, `error-text`, `error`, `disabled`, `requirement`, `required-mark`,
|
|
63
|
+
* `required-text` and `optional-text` are the Field's, every other one the combobox's. One level down, the same by
|
|
64
|
+
* hand: `<tanrei-field label="City" requirement="required" supporting-text="Where the order is sent."><tanrei-combobox
|
|
65
|
+
* name="city" value="tokyo"><tanrei-option value="kyoto">Kyoto</tanrei-option>…</tanrei-combobox></tanrei-field>` — and
|
|
66
|
+
* the box alone, where a label stands elsewhere, is `<tanrei-combobox>` with a `label` of its own.
|
|
67
|
+
*
|
|
68
|
+
* **The options are this element's own children** — `<tanrei-option>`, optionally in `<tanrei-option-group>` — and
|
|
69
|
+
* they stay there: nothing moves, copies or reads them here. They reach the combobox through a slot, and the combobox
|
|
70
|
+
* reads them as its own, again whenever one is added, removed or changed (CBF-2).
|
|
71
|
+
*
|
|
72
|
+
* It is a block as wide as its place, and its box fills it (CBF-1): give it a narrower place for a narrower box.
|
|
73
|
+
*
|
|
74
|
+
* `value`, `inputValue` and `open` are at every moment the combobox's (CBF-3): this element keeps no copy, so each is
|
|
75
|
+
* the new one in every listener and where the combobox writes it with no event (a text given up on leaving). The four
|
|
76
|
+
* events are the combobox's own, with this element as their target; `toggle` does not bubble. It dispatches none
|
|
77
|
+
* itself.
|
|
78
|
+
*
|
|
79
|
+
* Form-associated: it submits the committed value under `name` — never the text of an edit, and nothing while
|
|
80
|
+
* disabled —, resets to its `value` attribute, is restored on navigation, follows a disabled `<fieldset>`, and reports
|
|
81
|
+
* a missing value while `requirement` is `required` and the value is empty. Enter with no option active presses the
|
|
82
|
+
* default button of this element's form.
|
|
83
|
+
*
|
|
84
|
+
* The element is not focusable itself and has no role: `focus()` goes to the input, and its name is `label` (with
|
|
85
|
+
* `label-hidden` where it is not drawn), never `aria-label`. A press on the label row or on the box focuses the input;
|
|
86
|
+
* a press on the label row while the list is open is a press outside the combobox, and closes the list; a press on
|
|
87
|
+
* the help or the error text does nothing.
|
|
88
|
+
*
|
|
89
|
+
* @tag tanrei-combobox-field
|
|
90
|
+
* @slot - => tanrei-combobox
|
|
91
|
+
* @slot label-icon - => tanrei-field
|
|
92
|
+
* @slot leading-icon - => tanrei-combobox
|
|
93
|
+
* @csspart field - The frame: the `<tanrei-field>` it is built from.
|
|
94
|
+
* @csspart combobox - The control: the `<tanrei-combobox>` it is built from.
|
|
95
|
+
* @exportparts tanrei-field label: field-label, label, requirement-label: field-requirement-label, requirement-label, -counter, -value-text
|
|
96
|
+
* @exportparts tanrei-combobox label: combobox-label, label, requirement-label: combobox-requirement-label, requirement-label
|
|
97
|
+
* @attr {string} form - The id of the form the combobox 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.
|
|
98
|
+
* @fires input - => tanrei-combobox
|
|
99
|
+
* @fires change - => tanrei-combobox
|
|
100
|
+
* @fires toggle - => tanrei-combobox
|
|
101
|
+
* @fires action - => tanrei-combobox
|
|
102
|
+
*/
|
|
103
|
+
export class TanreiComboboxField extends ComposedControl {
|
|
104
|
+
constructor() {
|
|
105
|
+
super(...arguments);
|
|
106
|
+
/** @from tanrei-field.label */
|
|
107
|
+
this.label = '';
|
|
108
|
+
/** @from tanrei-field.labelHidden */
|
|
109
|
+
this.labelHidden = false;
|
|
110
|
+
/** @from tanrei-field.supportingText */
|
|
111
|
+
this.supportingText = '';
|
|
112
|
+
/** @from tanrei-field.errorText */
|
|
113
|
+
this.errorText = '';
|
|
114
|
+
/** @from tanrei-field.error */
|
|
115
|
+
this.error = false;
|
|
116
|
+
/** @from tanrei-field.disabled */
|
|
117
|
+
this.disabled = false;
|
|
118
|
+
/** @from tanrei-field.requirement */
|
|
119
|
+
this.requirement = 'none';
|
|
120
|
+
/** @from tanrei-field.requiredMark */
|
|
121
|
+
this.requiredMark = 'auto';
|
|
122
|
+
/** @from tanrei-field.requiredText */
|
|
123
|
+
this.requiredText = '';
|
|
124
|
+
/** @from tanrei-field.optionalText */
|
|
125
|
+
this.optionalText = '';
|
|
126
|
+
/** @from tanrei-combobox.variant */
|
|
127
|
+
this.variant = 'stacked';
|
|
128
|
+
/** @from tanrei-combobox.size */
|
|
129
|
+
this.size = 'medium';
|
|
130
|
+
/** @from tanrei-combobox.placeholder */
|
|
131
|
+
this.placeholder = '';
|
|
132
|
+
/** @from tanrei-combobox.readOnly */
|
|
133
|
+
this.readOnly = false;
|
|
134
|
+
/** @from tanrei-combobox.allowCustomValue */
|
|
135
|
+
this.allowCustomValue = false;
|
|
136
|
+
/** @from tanrei-combobox.filter */
|
|
137
|
+
this.filter = 'contains';
|
|
138
|
+
/** @from tanrei-combobox.noChevron */
|
|
139
|
+
this.noChevron = false;
|
|
140
|
+
/** @from tanrei-combobox.clearable */
|
|
141
|
+
this.clearable = false;
|
|
142
|
+
/** @from tanrei-combobox.clearLabel */
|
|
143
|
+
this.clearLabel = '';
|
|
144
|
+
/** @from tanrei-combobox.status */
|
|
145
|
+
this.status = 'idle';
|
|
146
|
+
/** @from tanrei-combobox.statusText */
|
|
147
|
+
this.statusText = '';
|
|
148
|
+
/** @from tanrei-combobox.emptyText */
|
|
149
|
+
this.emptyText = '';
|
|
150
|
+
/** @from tanrei-combobox.separation */
|
|
151
|
+
this.separation = 'auto';
|
|
152
|
+
/**
|
|
153
|
+
* Web only, for fixtures and tests: its combobox's `inline`, which draws the open list in place. No prop of the spec:
|
|
154
|
+
* a fixture and its twin are staged alike by it.
|
|
155
|
+
*
|
|
156
|
+
* @internal
|
|
157
|
+
*/
|
|
158
|
+
this.inline = false;
|
|
159
|
+
this.hostNameSentence = 'CBF-1';
|
|
160
|
+
/** CBF-3: what the product set on the element and the combobox has not been given yet. */
|
|
161
|
+
this.asked = {};
|
|
162
|
+
}
|
|
163
|
+
/** CBF-4: the one control the form meets. Its members stand in its shadow root, outside every form. */
|
|
164
|
+
static { this.formAssociated = true; }
|
|
165
|
+
// CBF-1: no width of its own — as an item of a row too (a horizontal field group, a product's own flex row), where a
|
|
166
|
+
// block's least width would be its native element's: the row decides, and the box fills what it is given.
|
|
167
|
+
static { this.styles = [
|
|
168
|
+
composedHost,
|
|
169
|
+
hiddenHost,
|
|
170
|
+
css `
|
|
171
|
+
:host {
|
|
172
|
+
min-inline-size: 0;
|
|
173
|
+
}
|
|
174
|
+
`,
|
|
175
|
+
]; }
|
|
176
|
+
/**
|
|
177
|
+
* Its parts, once: the two members and what each exports — a name both export, once.
|
|
178
|
+
*
|
|
179
|
+
* @internal
|
|
180
|
+
*/
|
|
181
|
+
static { this.parts = [...new Set(['field', 'combobox', ...FIELD_PARTS.names, ...COMBOBOX_PARTS.names])]; }
|
|
182
|
+
static { this.properties = {
|
|
183
|
+
label: { type: String },
|
|
184
|
+
labelHidden: { type: Boolean, attribute: 'label-hidden', reflect: true },
|
|
185
|
+
supportingText: { type: String, attribute: 'supporting-text' },
|
|
186
|
+
errorText: { type: String, attribute: 'error-text' },
|
|
187
|
+
error: { type: Boolean, reflect: true },
|
|
188
|
+
disabled: { type: Boolean, reflect: true },
|
|
189
|
+
requirement: { type: String, reflect: true },
|
|
190
|
+
requiredMark: { type: String, attribute: 'required-mark', reflect: true },
|
|
191
|
+
requiredText: { type: String, attribute: 'required-text' },
|
|
192
|
+
optionalText: { type: String, attribute: 'optional-text' },
|
|
193
|
+
variant: { type: String, reflect: true },
|
|
194
|
+
size: { type: String, reflect: true },
|
|
195
|
+
value: { type: String },
|
|
196
|
+
inputValue: { type: String, attribute: 'input-value' },
|
|
197
|
+
placeholder: { type: String },
|
|
198
|
+
readOnly: { type: Boolean, attribute: 'readonly', reflect: true },
|
|
199
|
+
open: { type: Boolean, reflect: true },
|
|
200
|
+
allowCustomValue: { type: Boolean, attribute: 'allow-custom-value', reflect: true },
|
|
201
|
+
filter: { type: String, reflect: true },
|
|
202
|
+
noChevron: { type: Boolean, attribute: 'no-chevron', reflect: true },
|
|
203
|
+
clearable: { type: Boolean, reflect: true },
|
|
204
|
+
clearLabel: { type: String, attribute: 'clear-label' },
|
|
205
|
+
status: { type: String, reflect: true },
|
|
206
|
+
statusText: { type: String, attribute: 'status-text' },
|
|
207
|
+
emptyText: { type: String, attribute: 'empty-text' },
|
|
208
|
+
separation: { type: String, reflect: true },
|
|
209
|
+
inline: { type: Boolean, reflect: true },
|
|
210
|
+
}; }
|
|
211
|
+
/** @from tanrei-combobox.value */
|
|
212
|
+
get value() {
|
|
213
|
+
return this.memberValue('');
|
|
214
|
+
}
|
|
215
|
+
set value(value) {
|
|
216
|
+
this.giveValue(value);
|
|
217
|
+
}
|
|
218
|
+
// CBF-3: the text and the open state are the combobox's at every moment too — the combobox writes both itself, the
|
|
219
|
+
// text with no event when a commit is given up (CMB-29) and `open` with none when it is taken back (CMB-57). Each
|
|
220
|
+
// is an accessor over the member's property: what the product has just set here until the element's next render
|
|
221
|
+
// has given it to the combobox, and from then on what the combobox holds. No copy is kept.
|
|
222
|
+
/** @from tanrei-combobox.inputValue */
|
|
223
|
+
get inputValue() {
|
|
224
|
+
return this.asked.inputValue ?? this.combobox?.inputValue ?? '';
|
|
225
|
+
}
|
|
226
|
+
set inputValue(text) {
|
|
227
|
+
if (this.asked.inputValue === undefined && this.combobox?.inputValue === text)
|
|
228
|
+
return;
|
|
229
|
+
this.asked.inputValue = text;
|
|
230
|
+
}
|
|
231
|
+
/** @from tanrei-combobox.open */
|
|
232
|
+
get open() {
|
|
233
|
+
return this.asked.open ?? this.combobox?.open ?? false;
|
|
234
|
+
}
|
|
235
|
+
set open(open) {
|
|
236
|
+
if (this.asked.open === undefined && this.combobox?.open === open)
|
|
237
|
+
return;
|
|
238
|
+
this.asked.open = open;
|
|
239
|
+
}
|
|
240
|
+
get combobox() {
|
|
241
|
+
return this.renderRoot?.querySelector('tanrei-combobox') ?? null;
|
|
242
|
+
}
|
|
243
|
+
get valueMember() {
|
|
244
|
+
return this.combobox;
|
|
245
|
+
}
|
|
246
|
+
/** Selects the text in the input, as the combobox's `select()` does. */
|
|
247
|
+
select() {
|
|
248
|
+
this.combobox?.select();
|
|
249
|
+
}
|
|
250
|
+
updated(changed) {
|
|
251
|
+
// CBF-3: the render that has just ended gave the combobox what was set; from here the two are the combobox's.
|
|
252
|
+
this.asked.inputValue = undefined;
|
|
253
|
+
this.asked.open = undefined;
|
|
254
|
+
super.updated(changed);
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* CBF-3: `open` is reflected on the host as it is on the combobox. The combobox opens and closes its list itself, so
|
|
258
|
+
* the host's attribute follows what the combobox holds after each of its updates — which is when it tells its form,
|
|
259
|
+
* and so this element (`ComposedControl.memberUpdated`).
|
|
260
|
+
*/
|
|
261
|
+
memberUpdated() {
|
|
262
|
+
const open = this.combobox?.open ?? false;
|
|
263
|
+
if (this.asked.open === undefined && this.hasAttribute('open') !== open)
|
|
264
|
+
this.requestUpdate('open', !open);
|
|
265
|
+
}
|
|
266
|
+
// CBF-1, CBF-2: a Field whose one control is a combobox, exactly as a product writes the two. The unnamed slot is the
|
|
267
|
+
// combobox's child and is always there — the product's options are assigned to it and the combobox reads through it
|
|
268
|
+
// (web-options.md, O2) — beside the passage of the Field's label glyph and of the combobox's leading glyph. No text
|
|
269
|
+
// stands between the tags: the Field's control is its one child without a slot.
|
|
270
|
+
render() {
|
|
271
|
+
return html `<tanrei-field part="field" exportparts=${FIELD_PARTS.attribute} ${forward(this, FIELD)} .disabled=${this.disabled || this.formDisabled}
|
|
272
|
+
>${this.pass('label-icon')}<tanrei-combobox part="combobox" exportparts=${COMBOBOX_PARTS.attribute} ${forward(this, COMBOBOX)}
|
|
273
|
+
><slot></slot>${this.pass('leading-icon')}</tanrei-combobox
|
|
274
|
+
></tanrei-field
|
|
275
|
+
>`;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
if (!customElements.get('tanrei-combobox-field'))
|
|
279
|
+
customElements.define('tanrei-combobox-field', TanreiComboboxField);
|
|
280
|
+
//# sourceMappingURL=combobox-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox-field.js","sourceRoot":"","sources":["../../../src/components/combobox-field/combobox-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkD,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChF,OAA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AI,CAAC,KAAK,CAAC,UAAU,GAAG,SAAS,CAAC;QAClC,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,SAAS,CAAC;QAC5B,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC;IAED;;;;OAIG;IACgB,aAAa;QAC9B,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,KAAK,CAAC;QAC1C,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,IAAI;YAAE,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC;IAC7G,CAAC;IAED,sHAAsH;IACtH,oHAAoH;IACpH,oHAAoH;IACpH,gFAAgF;IAC7D,MAAM;QACvB,OAAO,IAAI,CAAA,0CAA0C,WAAW,CAAC,SAAS,IAAI,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,cAAc,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,YAAY;SAC7I,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,gDAAgD,cAAc,CAAC,SAAS,IAAI,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;wBAC3G,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC;;MAE3C,CAAC;IACL,CAAC;CACF;AAED,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,uBAAuB,CAAC;IAAE,cAAc,CAAC,MAAM,CAAC,uBAAuB,EAAE,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { LitElement, type PropertyDeclarations, type PropertyValues } from 'lit';
|
|
2
|
+
import type { TanreiButtonSizeRegistry, TanreiButtonVariantRegistry } from '../../registry.js';
|
|
3
|
+
import '../button/button.js';
|
|
4
|
+
/** The Button variant it is drawn as: the Button's own values. */
|
|
5
|
+
export type TanreiCopyButtonVariant = keyof TanreiButtonVariantRegistry;
|
|
6
|
+
/** The Button size it is drawn at: the Button's own values. */
|
|
7
|
+
export type TanreiCopyButtonSize = keyof TanreiButtonSizeRegistry;
|
|
8
|
+
/** What `copied` carries: the text that is now on the clipboard. */
|
|
9
|
+
export interface TanreiCopyButtonCopiedDetail {
|
|
10
|
+
text: string;
|
|
11
|
+
}
|
|
12
|
+
/** What `copyfailed` carries: the platform's reason, where it gave one. */
|
|
13
|
+
export interface TanreiCopyButtonCopyFailedDetail {
|
|
14
|
+
reason: unknown;
|
|
15
|
+
}
|
|
16
|
+
/** The three forms (CPY-3, CPY-4) and the glyph each shows. */
|
|
17
|
+
type Form = 'rest' | 'copied' | 'failed';
|
|
18
|
+
/**
|
|
19
|
+
* Copies a given text to the clipboard with one press and confirms it — its glyph becomes a check for a moment and
|
|
20
|
+
* assistive technology is told — or says that it could not. It is drawn by Button and never moves the layout.
|
|
21
|
+
*
|
|
22
|
+
* Contract: specs/copy-button.spec.json.
|
|
23
|
+
*
|
|
24
|
+
* <tanrei-copy-button text="npm install @tanrei/web" label="Copy" copied-label="Copied" failed-label="Could not copy"></tanrei-copy-button>
|
|
25
|
+
* <tanrei-copy-button icon-only="false" variant="tonal" text="…" label="Copy link" copied-label="Link copied" failed-label="Could not copy"></tanrei-copy-button>
|
|
26
|
+
*
|
|
27
|
+
* It has no color, shape or measure of its own: its shadow root holds a `<tanrei-button>` of the `variant` and `size`
|
|
28
|
+
* you name, so every Button token, state and behaviour applies unchanged — the press and its hold, the focus
|
|
29
|
+
* indicator, the corner smoothing, the hit area, the mirrored `content_copy` in a right-to-left layout.
|
|
30
|
+
*
|
|
31
|
+
* A press asks the browser to put `text` on the clipboard (`navigator.clipboard.writeText`, which needs a secure page
|
|
32
|
+
* and the person's own press). Only when the browser has answered does the button change: the glyph `check` and the
|
|
33
|
+
* `copied` event, or — where the browser refuses or has no clipboard — the glyph `error` and `copyfailed`. It returns
|
|
34
|
+
* to rest after `--tanrei-comp-copy-button-confirmation-duration`. It tries no other way to copy, selects nothing and
|
|
35
|
+
* opens nothing: what else happens on a failure is yours, on `copyfailed`.
|
|
36
|
+
*
|
|
37
|
+
* The words are yours: `label`, `copied-label` and `failed-label` have no defaults. The icon-only form is named by
|
|
38
|
+
* `label` in every form; `copied-label` is announced politely and `failed-label` assertively, through a live region,
|
|
39
|
+
* on every activation.
|
|
40
|
+
*
|
|
41
|
+
* The events are `copied` and `copyfailed`, not `copy`: `copy` is the document's own clipboard event.
|
|
42
|
+
*
|
|
43
|
+
* @tag tanrei-copy-button
|
|
44
|
+
* @csspart button - The Button it is drawn by (a `<tanrei-button>`; its own parts are `container`, `icon` and `label`).
|
|
45
|
+
* @fires {CustomEvent<TanreiCopyButtonCopiedDetail>} copied - The browser confirmed that the text is on the clipboard; `detail.text` is the text.
|
|
46
|
+
* @fires {CustomEvent<TanreiCopyButtonCopyFailedDetail>} copyfailed - The browser refused the copy or has no clipboard to write to; `detail.reason` is its reason, where it gave one.
|
|
47
|
+
*/
|
|
48
|
+
export declare class TanreiCopyButton extends LitElement {
|
|
49
|
+
private readonly availability;
|
|
50
|
+
/** The product's words, read where the instance gives none (src/primitives/words.ts). */
|
|
51
|
+
private readonly words;
|
|
52
|
+
static styles: import("lit").CSSResult;
|
|
53
|
+
static shadowRootOptions: ShadowRootInit;
|
|
54
|
+
static properties: PropertyDeclarations;
|
|
55
|
+
/** The text to copy, exactly as it will be pasted. Plain text only. */
|
|
56
|
+
text: string;
|
|
57
|
+
/** What the button does, in your language ("Copy", "Copy link"): the accessible name of the icon-only form and the visible text of the labelled one. Required. */
|
|
58
|
+
label: string;
|
|
59
|
+
/** What is announced, and shown in the labelled form, when the text has been copied ("Copied"). Required. */
|
|
60
|
+
copiedLabel: string;
|
|
61
|
+
/** What is announced, and shown in the labelled form, when the browser refuses the copy ("Could not copy"). Required. */
|
|
62
|
+
failedLabel: string;
|
|
63
|
+
/** True draws the glyph alone, named by `label`. False (`icon-only="false"`) draws the glyph and the label as text. */
|
|
64
|
+
iconOnly: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The Button variant it is drawn as — `filled`, `tonal`, `elevated`, `outlined` or `text`. The default, text, is the
|
|
67
|
+
* quiet icon action beside what it copies; a copy that is a view's main action takes another.
|
|
68
|
+
*/
|
|
69
|
+
variant: TanreiCopyButtonVariant;
|
|
70
|
+
/** The Button size it is drawn at: `small` (32), `medium` (40) or `large` (56). */
|
|
71
|
+
size: TanreiCopyButtonSize;
|
|
72
|
+
/** Prevents the copy; the button is drawn and exposed as a disabled Button. */
|
|
73
|
+
disabled: boolean;
|
|
74
|
+
/** The form it shows now (CPY-3, CPY-4). */
|
|
75
|
+
protected form: Form;
|
|
76
|
+
/** CPY-2: the browser has been asked and has not answered; a second activation is ignored until it does. */
|
|
77
|
+
private pending;
|
|
78
|
+
/** CPY-3: the return to rest. */
|
|
79
|
+
private timer;
|
|
80
|
+
/**
|
|
81
|
+
* CPY-11: while the icon set cannot draw a glyph, nothing is drawn in its place (src/primitives/glyph.ts): the glyph
|
|
82
|
+
* is marked `data-drawn` once its ink is a ligature's and not its name spelled out. A page draws one copy button for
|
|
83
|
+
* every code block it shows: the first decision is the frame's (`firstInFrame`), one pass for them all.
|
|
84
|
+
*/
|
|
85
|
+
private readonly drawn;
|
|
86
|
+
private get button();
|
|
87
|
+
private region;
|
|
88
|
+
/** `element.click()` activates the button as a person would: through the Button, and not at all while disabled. */
|
|
89
|
+
click(): void;
|
|
90
|
+
disconnectedCallback(): void;
|
|
91
|
+
/** comp.copy-button.confirmation.duration in milliseconds, as the cascade gives it now. */
|
|
92
|
+
private get duration();
|
|
93
|
+
/** Back to rest, at once and without a word (CPY-5: nothing is announced on the return). */
|
|
94
|
+
private rest;
|
|
95
|
+
/**
|
|
96
|
+
* CPY-3, CPY-4, CPY-8: the browser's answer — the form, its event, its announcement, and the time counted from now.
|
|
97
|
+
*/
|
|
98
|
+
private answer;
|
|
99
|
+
/** CPY-2: an activation — by pointer, touch, Enter, Space or assistive technology, all of which click the Button. */
|
|
100
|
+
private onClick;
|
|
101
|
+
/** CPY-17: the Button value that is drawn — the prop's where the active design system's Button has it, else the copy button's own default. */
|
|
102
|
+
private drawnValue;
|
|
103
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
104
|
+
protected updated(changed: PropertyValues): void;
|
|
105
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
106
|
+
}
|
|
107
|
+
declare global {
|
|
108
|
+
interface HTMLElementTagNameMap {
|
|
109
|
+
'tanrei-copy-button': TanreiCopyButton;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
export {};
|