@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,234 @@
|
|
|
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 { OPTION_GROUP_TAG, OPTION_TAG } from '../../primitives/option-list.js';
|
|
5
|
+
import { report } from '../../primitives/report.js';
|
|
6
|
+
import { TanreiField } from '../field/field.js';
|
|
7
|
+
import { TanreiSelect } from '../select/select.js';
|
|
8
|
+
/** SEF-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). */
|
|
9
|
+
const FIELD = ['label', 'labelHidden', 'supportingText', 'errorText', 'error', 'requirement', 'requiredMark', 'requiredText', 'optionalText'];
|
|
10
|
+
/**
|
|
11
|
+
* SEF-1: the seven props that are the select's. Its own `label`, `labelHidden`, `error` and `disabled` are never set:
|
|
12
|
+
* they reach the select through its Field's connection.
|
|
13
|
+
*/
|
|
14
|
+
const SELECT = ['variant', 'size', 'value', 'placeholder', 'readOnly', 'open', 'separation'];
|
|
15
|
+
/**
|
|
16
|
+
* W4: each member's documented parts, from the member's own list. Two names are shared — `label` and
|
|
17
|
+
* `requirement-label` — and each is exported with its member's name before it, always, and under the bare name from
|
|
18
|
+
* both: the two are one thing to a person and are never drawn at once. FLD-25 is the sentence that holds it — while
|
|
19
|
+
* its control draws the label itself the Field draws no label row and no requirement tag — and a stacked select draws
|
|
20
|
+
* neither (SEL-15, SEL-7). So `::part(label)` is the drawn label, whichever member draws it. The Field's `value-text` is
|
|
21
|
+
* left out: a select shows its value itself and the select field has no such prop, so the part is no part of it;
|
|
22
|
+
* `counter` is exported as the spec's note lists it, and is never drawn here.
|
|
23
|
+
*/
|
|
24
|
+
const FIELD_PARTS = exported(TanreiField, { label: { as: 'field-label', bare: true }, 'requirement-label': { as: 'field-requirement-label', bare: true } }, ['value-text']);
|
|
25
|
+
const SELECT_PARTS = exported(TanreiSelect, { label: { as: 'select-label', bare: true }, 'requirement-label': { as: 'select-requirement-label', bare: true } });
|
|
26
|
+
/** What a child of the element may be: an option, a group of options, or a child for one of its two named slots. */
|
|
27
|
+
const PASSED_SLOTS = ['label-icon', 'leading-icon'];
|
|
28
|
+
/**
|
|
29
|
+
* Lets people choose one value from a closed list as one complete field of a form. Built from a Field
|
|
30
|
+
* (`<tanrei-field>`) and the Select (`<tanrei-select>`) it frames: the trigger and its list under the Field's label —
|
|
31
|
+
* or, in the filled and the outlined look, with the label floating in the box — with the Field's help and its error,
|
|
32
|
+
* tied together for assistive technology and taking part in a form as one control.
|
|
33
|
+
*
|
|
34
|
+
* Contract: specs/select-field.spec.json.
|
|
35
|
+
*
|
|
36
|
+
* ```html
|
|
37
|
+
* <tanrei-select-field name="country" label="Country" requirement="required" supporting-text="Where your invoices are addressed.">
|
|
38
|
+
* <tanrei-option value="jp">Japan</tanrei-option>
|
|
39
|
+
* <tanrei-option value="ke">Kenya</tanrei-option>
|
|
40
|
+
* </tanrei-select-field>
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* Composed (`src/primitives/composed.ts`): its shadow root holds the two members' own elements and nothing
|
|
44
|
+
* else, so it draws nothing of its own and has no token — every `--tanrei-comp-field-*`,
|
|
45
|
+
* `--tanrei-comp-input-box-*` and `--tanrei-comp-select-*` value reaches the members by inheritance, and one select field is set apart by setting such a property on this
|
|
46
|
+
* element. Each property is its member's, set on that member unchanged: `label`, `label-hidden`, `supporting-text`,
|
|
47
|
+
* `error-text`, `error`, `disabled`, `requirement`, `required-mark`, `required-text` and `optional-text` are the
|
|
48
|
+
* Field's, every other one the select's. One level down, the same by hand: `<tanrei-field label="Country"
|
|
49
|
+
* requirement="required"><tanrei-select name="country">…options…</tanrei-select></tanrei-field>` — and the box alone,
|
|
50
|
+
* where a label stands elsewhere (a bar, a toolbar, a column of a table), is `<tanrei-select>` with a `label` of its
|
|
51
|
+
* own.
|
|
52
|
+
*
|
|
53
|
+
* The options are its `<tanrei-option>` and `<tanrei-option-group>` children, exactly as a select's: they stay the
|
|
54
|
+
* product's, are never moved or copied, and reach the select inside through the default slot, which the select reads.
|
|
55
|
+
* Replacing them by hand works as on a select.
|
|
56
|
+
*
|
|
57
|
+
* It is a block as wide as its place, and its box fills it (SEF-1): give it a narrower place for a narrower box.
|
|
58
|
+
*
|
|
59
|
+
* `value` and `open` are at every moment the select's, read through to it and never copied, and the two events are
|
|
60
|
+
* that select's own, with this element as their target: `event.target.value` and `event.target.open` are new in every
|
|
61
|
+
* listener. It dispatches none itself. `toggle` is composed and does not bubble: it is heard on this element and by no
|
|
62
|
+
* ancestor.
|
|
63
|
+
*
|
|
64
|
+
* Form-associated: it submits the value under `name` — nothing while disabled —, resets to its `value` attribute, is
|
|
65
|
+
* restored on navigation, follows a disabled `<fieldset>`, and reports a missing value while `requirement` is
|
|
66
|
+
* `required` and the value is empty.
|
|
67
|
+
*
|
|
68
|
+
* The element is not focusable itself and has no role: `focus()` goes to the select's trigger, and its name is `label`
|
|
69
|
+
* (with `label-hidden` where it is not drawn), never `aria-label`. A press on the label row focuses the trigger and
|
|
70
|
+
* opens nothing; a press on the trigger opens the list; a press on the help or the error text does nothing.
|
|
71
|
+
*
|
|
72
|
+
* @tag tanrei-select-field
|
|
73
|
+
* @slot - => tanrei-select
|
|
74
|
+
* @slot leading-icon - => tanrei-select
|
|
75
|
+
* @slot label-icon - => tanrei-field
|
|
76
|
+
* @csspart field - The frame: the `<tanrei-field>` it is built from.
|
|
77
|
+
* @csspart select - The control: the `<tanrei-select>` it is built from.
|
|
78
|
+
* @exportparts tanrei-field label: field-label, label, requirement-label: field-requirement-label, requirement-label, -value-text
|
|
79
|
+
* @exportparts tanrei-select label: select-label, label, requirement-label: select-requirement-label, requirement-label
|
|
80
|
+
* @attr {boolean} inline - For tests and fixtures: the select's own attribute of that name, passed on. It draws the open list in place below the trigger and not in the top layer, so that an open fixture and its twin are staged alike. No prop of the component.
|
|
81
|
+
* @attr {string} form - The id of the form the select 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.
|
|
82
|
+
* @fires change - => tanrei-select
|
|
83
|
+
* @fires toggle - => tanrei-select
|
|
84
|
+
*/
|
|
85
|
+
export class TanreiSelectField extends ComposedControl {
|
|
86
|
+
constructor() {
|
|
87
|
+
super(...arguments);
|
|
88
|
+
/** @from tanrei-field.label */
|
|
89
|
+
this.label = '';
|
|
90
|
+
/** @from tanrei-field.labelHidden */
|
|
91
|
+
this.labelHidden = false;
|
|
92
|
+
/** @from tanrei-field.supportingText */
|
|
93
|
+
this.supportingText = '';
|
|
94
|
+
/** @from tanrei-field.errorText */
|
|
95
|
+
this.errorText = '';
|
|
96
|
+
/** @from tanrei-field.error */
|
|
97
|
+
this.error = false;
|
|
98
|
+
/** @from tanrei-field.disabled */
|
|
99
|
+
this.disabled = false;
|
|
100
|
+
/** @from tanrei-field.requirement */
|
|
101
|
+
this.requirement = 'none';
|
|
102
|
+
/** @from tanrei-field.requiredMark */
|
|
103
|
+
this.requiredMark = 'auto';
|
|
104
|
+
/** @from tanrei-field.requiredText */
|
|
105
|
+
this.requiredText = '';
|
|
106
|
+
/** @from tanrei-field.optionalText */
|
|
107
|
+
this.optionalText = '';
|
|
108
|
+
/** @from tanrei-select.variant */
|
|
109
|
+
this.variant = 'stacked';
|
|
110
|
+
/** @from tanrei-select.size */
|
|
111
|
+
this.size = 'medium';
|
|
112
|
+
/** @from tanrei-select.placeholder */
|
|
113
|
+
this.placeholder = '';
|
|
114
|
+
/** @from tanrei-select.readOnly */
|
|
115
|
+
this.readOnly = false;
|
|
116
|
+
/** @from tanrei-select.separation */
|
|
117
|
+
this.separation = 'auto';
|
|
118
|
+
this.hostNameSentence = 'SEF-1';
|
|
119
|
+
this.strayReported = false;
|
|
120
|
+
}
|
|
121
|
+
/** SEF-2: the one control the form meets. Its members stand in its shadow root, outside every form. */
|
|
122
|
+
static { this.formAssociated = true; }
|
|
123
|
+
// SEF-1: no width of its own — as an item of a row too (a horizontal field group, a product's own flex row): the row
|
|
124
|
+
// decides, and the box fills what it is given.
|
|
125
|
+
static { this.styles = [
|
|
126
|
+
composedHost,
|
|
127
|
+
hiddenHost,
|
|
128
|
+
css `
|
|
129
|
+
:host {
|
|
130
|
+
min-inline-size: 0;
|
|
131
|
+
}
|
|
132
|
+
`,
|
|
133
|
+
]; }
|
|
134
|
+
/**
|
|
135
|
+
* Its parts, once: the two members and what each exports — a name both export, once.
|
|
136
|
+
*
|
|
137
|
+
* @internal
|
|
138
|
+
*/
|
|
139
|
+
static { this.parts = [...new Set(['field', 'select', ...FIELD_PARTS.names, ...SELECT_PARTS.names])]; }
|
|
140
|
+
static { this.properties = {
|
|
141
|
+
label: { type: String },
|
|
142
|
+
labelHidden: { type: Boolean, attribute: 'label-hidden', reflect: true },
|
|
143
|
+
supportingText: { type: String, attribute: 'supporting-text' },
|
|
144
|
+
errorText: { type: String, attribute: 'error-text' },
|
|
145
|
+
error: { type: Boolean, reflect: true },
|
|
146
|
+
disabled: { type: Boolean, reflect: true },
|
|
147
|
+
requirement: { type: String, reflect: true },
|
|
148
|
+
requiredMark: { type: String, attribute: 'required-mark', reflect: true },
|
|
149
|
+
requiredText: { type: String, attribute: 'required-text' },
|
|
150
|
+
optionalText: { type: String, attribute: 'optional-text' },
|
|
151
|
+
variant: { type: String, reflect: true },
|
|
152
|
+
size: { type: String, reflect: true },
|
|
153
|
+
value: { type: String },
|
|
154
|
+
placeholder: { type: String },
|
|
155
|
+
readOnly: { type: Boolean, attribute: 'readonly', reflect: true },
|
|
156
|
+
open: { type: Boolean, reflect: true },
|
|
157
|
+
separation: { type: String, reflect: true },
|
|
158
|
+
}; }
|
|
159
|
+
/**
|
|
160
|
+
* `inline` is the select's attribute for tests and fixtures, and no prop of the component: the element has no
|
|
161
|
+
* property for it. It watches the attribute and gives its select what the attribute says, so that an open fixture
|
|
162
|
+
* and its twin are staged alike.
|
|
163
|
+
*/
|
|
164
|
+
static get observedAttributes() {
|
|
165
|
+
return [...super.observedAttributes, 'inline'];
|
|
166
|
+
}
|
|
167
|
+
attributeChangedCallback(name, old, value) {
|
|
168
|
+
if (name === 'inline')
|
|
169
|
+
this.requestUpdate();
|
|
170
|
+
else
|
|
171
|
+
super.attributeChangedCallback(name, old, value);
|
|
172
|
+
}
|
|
173
|
+
/** @from tanrei-select.value */
|
|
174
|
+
get value() {
|
|
175
|
+
return this.memberValue('');
|
|
176
|
+
}
|
|
177
|
+
set value(value) {
|
|
178
|
+
this.giveValue(value);
|
|
179
|
+
}
|
|
180
|
+
/** @from tanrei-select.open */
|
|
181
|
+
get open() {
|
|
182
|
+
return this.openGiven ?? this.select?.open ?? false;
|
|
183
|
+
}
|
|
184
|
+
set open(open) {
|
|
185
|
+
const select = this.select;
|
|
186
|
+
if (this.openGiven === undefined && select && select.open === open)
|
|
187
|
+
return;
|
|
188
|
+
this.openGiven = open;
|
|
189
|
+
}
|
|
190
|
+
get select() {
|
|
191
|
+
return this.renderRoot?.querySelector('tanrei-select') ?? null;
|
|
192
|
+
}
|
|
193
|
+
get valueMember() {
|
|
194
|
+
return this.select;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* The reflected `open` follows the select's: the select tells its form after each of its updates, and where its
|
|
198
|
+
* `open` is no longer what this element's attribute says — the person opened or closed the list, or the select took
|
|
199
|
+
* `open` back — the element reflects it again, from the select. Nothing is copied: the property reads through.
|
|
200
|
+
*/
|
|
201
|
+
memberUpdated() {
|
|
202
|
+
const select = this.select;
|
|
203
|
+
if (select && this.hasUpdated && this.openGiven === undefined && this.hasAttribute('open') !== select.open)
|
|
204
|
+
this.requestUpdate('open', !select.open);
|
|
205
|
+
}
|
|
206
|
+
updated(changed) {
|
|
207
|
+
// W5: the render that has just ended gave the select what was set; from here `open` is the select's.
|
|
208
|
+
this.openGiven = undefined;
|
|
209
|
+
super.updated(changed);
|
|
210
|
+
// O9: a child that is neither an option, a group of options nor a child for one of the two named slots is not
|
|
211
|
+
// rendered; said once for the element.
|
|
212
|
+
if (!this.strayReported) {
|
|
213
|
+
const stray = [...this.children].find((child) => child.localName !== OPTION_TAG && child.localName !== OPTION_GROUP_TAG && !PASSED_SLOTS.includes(child.slot));
|
|
214
|
+
if (stray) {
|
|
215
|
+
this.strayReported = true;
|
|
216
|
+
report(this, 'SEF-1', `<${stray.localName}${stray.slot ? ` slot="${stray.slot}"` : ''}> is not drawn: a select field's children are its options (<${OPTION_TAG}>, <${OPTION_GROUP_TAG}>) and a glyph for the label-icon or the leading-icon slot`);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
// SEF-1: a Field whose one control is a select, exactly as a product writes the two — and nothing else but the
|
|
221
|
+
// passage of the Field's label glyph, of the select's leading glyph, and of the options: the default slot stands
|
|
222
|
+
// among the select's children, always, and the select reads the product's children through it.
|
|
223
|
+
// No text stands between the tags: the Field's control is its one child without a slot.
|
|
224
|
+
render() {
|
|
225
|
+
return html `<tanrei-field part="field" exportparts=${FIELD_PARTS.attribute} ${forward(this, FIELD)} .disabled=${this.disabled || this.formDisabled}
|
|
226
|
+
>${this.pass('label-icon')}<tanrei-select part="select" exportparts=${SELECT_PARTS.attribute} ${forward(this, SELECT)} .inline=${this.hasAttribute('inline')}
|
|
227
|
+
><slot></slot>${this.pass('leading-icon')}</tanrei-select
|
|
228
|
+
></tanrei-field
|
|
229
|
+
>`;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (!customElements.get('tanrei-select-field'))
|
|
233
|
+
customElements.define('tanrei-select-field', TanreiSelectField);
|
|
234
|
+
//# sourceMappingURL=select-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-field.js","sourceRoot":"","sources":["../../../src/components/select-field/select-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkD,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChF,OAAO,EAAE,eAAe,EAAoB,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAClH,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,WAAW,EAA6D,MAAM,mBAAmB,CAAC;AAC3G,OAAO,EAAE,YAAY,EAA8I,MAAM,qBAAqB,CAAC;AAK/L,2IAA2I;AAC3I,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,CAAU,CAAC;AACvJ;;;GAGG;AACH,MAAM,MAAM,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,CAAU,CAAC;AAEtG;;;;;;;;GAQG;AACH,MAAM,WAAW,GAAG,QAAQ,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,mBAAmB,EAAE,EAAE,EAAE,EAAE,yBAAyB,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;AAC5K,MAAM,YAAY,GAAG,QAAQ,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,E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AA+F;IAC/F,wFAAwF;IACrE,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,4CAA4C,YAAY,CAAC,SAAS,IAAI,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,YAAY,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC;wBAC1I,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC;;MAE3C,CAAC;IACL,CAAC;CACF;AAED,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,qBAAqB,CAAC;IAAE,cAAc,CAAC,MAAM,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { LitElement, type PropertyDeclarations, type PropertyValues } from 'lit';
|
|
2
|
+
import { HOST_VARIANT, type VariantHost } from '../../primitives/index.js';
|
|
3
|
+
import '../button/button.js';
|
|
4
|
+
/** The core variants (standard, modal), plus any a design system adds: only `modal` is presented as a modal overlay. */
|
|
5
|
+
export type TanreiSideSheetVariant = 'standard' | 'modal' | (string & {});
|
|
6
|
+
/** Why the sheet asks to close (SSH-4, SSH-5). The web has no back of its own; Android's back gesture arrives as `back`. */
|
|
7
|
+
export type TanreiSideSheetCloseReason = 'close' | 'scrim' | 'escape' | 'back' | 'drag';
|
|
8
|
+
/** `close`'s detail: why the sheet asks to be closed. */
|
|
9
|
+
export interface TanreiSideSheetCloseDetail {
|
|
10
|
+
reason: TanreiSideSheetCloseReason;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* SSH-4: whether a released drag asks to close — past half the sheet's width toward its end edge, or flung that way.
|
|
14
|
+
* `distance` is how far the sheet is drawn from where it rests, toward the end edge; `velocity` the pointer's speed that
|
|
15
|
+
* way at the release, in px per ms.
|
|
16
|
+
*/
|
|
17
|
+
export declare function sideSheetRelease(distance: number, velocity: number, width: number): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Shows supplementary content or a secondary task in a panel at the end edge, with a headline, an optional close button
|
|
20
|
+
* and actions: `standard`, beside the content in the layout (a layout region), where actions are optional, or
|
|
21
|
+
* `modal`, over the content with a scrim, holding focus until it closes (a modal overlay), with at least one
|
|
22
|
+
* action (SSH-16).
|
|
23
|
+
*
|
|
24
|
+
* Contract: specs/side-sheet.spec.json. The content is the default slot. The header holds `headline` (the sheet's
|
|
25
|
+
* accessible name, a heading) and, while `closable`, an icon-only `<tanrei-button>` of the medium size showing the close
|
|
26
|
+
* glyph, named by `close-label`, in the variant `comp.side-sheet.close-button.variant` names (tonal in the default
|
|
27
|
+
* system).
|
|
28
|
+
*
|
|
29
|
+
* The actions are `<tanrei-button slot="actions">` children, each marked `confirming` or `dismissive`, placed below a
|
|
30
|
+
* divider as a full-width Button group places them: dismissive at the start and confirming at the end of a row the
|
|
31
|
+
* actions share equally, confirming on top of a column when a label does not fit its share (or, where the system's
|
|
32
|
+
* `actions.arrangement` is `start`, at their own widths from the start edge). Focus and assistive technology follow that
|
|
33
|
+
* order. A Button without a `variant` attribute takes the sheet's (`comp.side-sheet.actions.variant`, tonal in the
|
|
34
|
+
* default system). Actions never close the sheet: close it from their handlers.
|
|
35
|
+
*
|
|
36
|
+
* Controlled: the sheet never closes itself. It fires `close` with a reason — its close button in either variant, and for
|
|
37
|
+
* a modal sheet a press on the scrim, Escape, the platform's back or a drag toward its end edge — and you set `open` to
|
|
38
|
+
* false. A product that does not close it after a drag sees it slide back.
|
|
39
|
+
*
|
|
40
|
+
* Standard: an `<aside>` (a complementary landmark) named by the headline; place it as the last item of a flex row (the
|
|
41
|
+
* full height of that row). Its width animates while open changes, the content beside it resizing. Opening it moves focus
|
|
42
|
+
* in, closing it with focus inside gives focus back, Tab leaves it open, and Escape and drags do nothing.
|
|
43
|
+
*
|
|
44
|
+
* Modal: a native `<dialog>` in the shadow root opened with `showModal()`, at the window's end edge in the top layer over
|
|
45
|
+
* `::backdrop` (the scrim), everything else inert, the page held from scrolling and focus kept inside. Focus goes to the
|
|
46
|
+
* slotted element marked `autofocus`, else the sheet (also when it is mounted open), and returns where it was when it
|
|
47
|
+
* closes.
|
|
48
|
+
*
|
|
49
|
+
* The content scrolls between the header and the actions; a divider appears below the header while it is scrolled from
|
|
50
|
+
* its top. While the on-screen keyboard covers the bottom of the sheet, the actions sit directly above it (the
|
|
51
|
+
* `visualViewport`).
|
|
52
|
+
*
|
|
53
|
+
* Every visual value comes from `--tanrei-comp-side-sheet-*` tokens. The color reaches under
|
|
54
|
+
* `env(safe-area-inset-*)` at the end, top and bottom.
|
|
55
|
+
*
|
|
56
|
+
* @tag tanrei-side-sheet
|
|
57
|
+
* @slot - The content: it gets `content.color` as its color, and plain text the body role; it scrolls between the header and the actions.
|
|
58
|
+
* @slot actions - Tanrei Buttons, each marked `confirming` or `dismissive`; at least one in a modal sheet. The sheet places them and gives those without a `variant` its own; it never restyles them.
|
|
59
|
+
* @csspart container - The panel: the `<aside>` of a standard sheet, the `<dialog>` of a modal one (its `::backdrop` is the scrim).
|
|
60
|
+
* @csspart outline - The start edge.
|
|
61
|
+
* @csspart header - The row that holds the headline and the close button.
|
|
62
|
+
* @csspart headline - The headline (a heading).
|
|
63
|
+
* @csspart close-button - The close button, an icon-only `<tanrei-button>`.
|
|
64
|
+
* @csspart content - The box that insets and scrolls the content.
|
|
65
|
+
* @csspart divider - A hairline: above the actions while there are actions, and below the header while the content is scrolled from its top (hidden from assistive technology).
|
|
66
|
+
* @csspart actions - The row (or column) of actions.
|
|
67
|
+
* @fires {CustomEvent<TanreiSideSheetCloseDetail>} close - The sheet asks to be closed: `detail.reason` is `close` (its close button), or for a modal sheet `scrim`, `escape`, `back` or `drag`. Set `open` to false.
|
|
68
|
+
*/
|
|
69
|
+
export declare class TanreiSideSheet extends LitElement implements VariantHost {
|
|
70
|
+
private readonly availability;
|
|
71
|
+
/** The product's words, read where the instance gives none (src/primitives/words.ts). */
|
|
72
|
+
private readonly words;
|
|
73
|
+
static styles: import("lit").CSSResult;
|
|
74
|
+
static shadowRootOptions: ShadowRootInit;
|
|
75
|
+
static properties: PropertyDeclarations;
|
|
76
|
+
/** `standard` (the default) sits beside the content; `modal` slides over it with a scrim and holds focus. A value the active system does not have is drawn as `standard`, reported (SSH-13). Reflected. */
|
|
77
|
+
variant: TanreiSideSheetVariant;
|
|
78
|
+
/** Whether the sheet is shown: a standard one takes its width in the layout, a modal one is presented. Controlled: set it to false in answer to `close`. Reflected. */
|
|
79
|
+
open: boolean;
|
|
80
|
+
/** What the sheet is about ("Filters"), drawn in its header and used as its accessible name. Required (SSH-12). */
|
|
81
|
+
headline: string;
|
|
82
|
+
/** Draws the close button at the end of the header. Give a standard sheet one unless your own control closes it. Reflected. */
|
|
83
|
+
closable: boolean;
|
|
84
|
+
/** The close button's accessible name ("Close filters"). Required while `closable` (SSH-5). */
|
|
85
|
+
closeLabel: string;
|
|
86
|
+
/** SSH-11, SSH-16: whether the sheet has at least one action. */
|
|
87
|
+
private hasActions;
|
|
88
|
+
/** SSH-10: the content children, assigned to the default slot. */
|
|
89
|
+
private content;
|
|
90
|
+
/** SSH-11, SSH-17: the actions, by run, placed and given the sheet's variant. */
|
|
91
|
+
private readonly placement;
|
|
92
|
+
private readonly mutation$;
|
|
93
|
+
/** SSH-20: how much of the sheet the on-screen keyboard covers, as last applied. */
|
|
94
|
+
private keyboard;
|
|
95
|
+
/** SSH-13: variants a design system adds, and a value the active system does not have (src/primitives/axes.ts). */
|
|
96
|
+
private readonly axes;
|
|
97
|
+
/** Where focus was when the sheet opened (SSH-3). */
|
|
98
|
+
private opener;
|
|
99
|
+
/** A modal sheet is presented (in the top layer). */
|
|
100
|
+
private shown;
|
|
101
|
+
private pressedScrim;
|
|
102
|
+
private dragged;
|
|
103
|
+
private drag;
|
|
104
|
+
/** How far the sheet was drawn from where it rests, toward its end edge, when the drag began to follow. */
|
|
105
|
+
private dragFrom;
|
|
106
|
+
/** How far it is drawn from where it rests while it follows a drag. */
|
|
107
|
+
private offset;
|
|
108
|
+
/** Whether focus was inside a standard sheet that is closing (read before the render makes it inert). */
|
|
109
|
+
private closingWithFocus;
|
|
110
|
+
private readonly resize$;
|
|
111
|
+
private get modal();
|
|
112
|
+
private get sheet();
|
|
113
|
+
private get dialog();
|
|
114
|
+
/** A choice of kind, by name, as the cascade gives it now — never cached, so a system switch is seen; unknown is the first. */
|
|
115
|
+
private choice;
|
|
116
|
+
/** @internal SSH-17: the variant it gives one of its actions whose own is not set (src/primitives/group-item.ts). */
|
|
117
|
+
[HOST_VARIANT](child: Element): string | null;
|
|
118
|
+
connectedCallback(): void;
|
|
119
|
+
disconnectedCallback(): void;
|
|
120
|
+
/** SSH-4, SSH-5: `close` with the reason, once, while open; a standard sheet answers only its close button. */
|
|
121
|
+
private requestClose;
|
|
122
|
+
private readonly onCloseClick;
|
|
123
|
+
/** SSH-4, SSH-2, SSH-15: Escape asks to close (only the topmost overlay answers it); Tab stays inside. */
|
|
124
|
+
private readonly onKeyDown;
|
|
125
|
+
/** A close request without a key the sheet saw (Android's back) arrives as the native cancel. */
|
|
126
|
+
private readonly onNativeCancel;
|
|
127
|
+
/** The browser closed the dialog itself (a close request it would not let the sheet cancel): ask, and stay unless closed. */
|
|
128
|
+
private readonly onNativeClose;
|
|
129
|
+
/**
|
|
130
|
+
* On the way down (capture): the click that ends a drag activates nothing — not the close button, the content or the
|
|
131
|
+
* actions; a press that began and ended on the scrim asks to close.
|
|
132
|
+
*/
|
|
133
|
+
private readonly onClick;
|
|
134
|
+
/** The distance `dx` (px, rightward positive) toward the end edge, whatever the direction of the text. */
|
|
135
|
+
private towardEnd;
|
|
136
|
+
/** How far the modal sheet is drawn from where it rests, toward its end edge (whatever is moving it). */
|
|
137
|
+
private drawnOffset;
|
|
138
|
+
private readonly onPointerDown;
|
|
139
|
+
private listenToDrag;
|
|
140
|
+
private readonly onPointerMove;
|
|
141
|
+
private readonly onPointerUp;
|
|
142
|
+
/** Draws the modal sheet `offset` from where it rests, toward its end edge. */
|
|
143
|
+
private place;
|
|
144
|
+
/** SSH-4: back to where it rests, over the enter motion (the open dialog's transition), at once where motion is reduced. */
|
|
145
|
+
private slideBack;
|
|
146
|
+
/** SSH-10, SSH-11: which child goes to which slot, and the actions' runs (BGR-13, BGR-14, BGR-18). */
|
|
147
|
+
private readSlots;
|
|
148
|
+
/** The slots assigned by hand: the content, and the actions in the order of the orientation (BGR-15). */
|
|
149
|
+
private assign;
|
|
150
|
+
/**
|
|
151
|
+
* SSH-5, SSH-17: the variants the sheet's tokens name, read now (a system switch is seen at the next layout): the close
|
|
152
|
+
* button's, and the one every action without its own draws.
|
|
153
|
+
*/
|
|
154
|
+
private giveVariants;
|
|
155
|
+
/**
|
|
156
|
+
* SSH-11: the actions as the system's arrangement places them — `fill` a row while every label fits its equal share,
|
|
157
|
+
* `start` while the row at their own widths fits the inner width, and a column otherwise; SSH-10: a content that
|
|
158
|
+
* scrolls is a Tab stop, so the keyboard can scroll it; SSH-19: the divider below the header.
|
|
159
|
+
*/
|
|
160
|
+
private layout;
|
|
161
|
+
/** SSH-19: a divider below the header while the content is scrolled away from its top; at once, without motion. */
|
|
162
|
+
private syncHeaderDivider;
|
|
163
|
+
private readonly onScroll;
|
|
164
|
+
/**
|
|
165
|
+
* SSH-20: while the on-screen keyboard covers the bottom of the sheet (the part of it below the visual viewport), the
|
|
166
|
+
* divider and the actions sit directly above it and the content scrolls in the room left, the focused element scrolled
|
|
167
|
+
* into it; the header stays. At once: the web moves nothing for its keyboard.
|
|
168
|
+
*/
|
|
169
|
+
private readonly onViewport;
|
|
170
|
+
/** SSH-3: focus to the slotted element marked `autofocus`, else the sheet itself, so its headline is read first. */
|
|
171
|
+
private focusInside;
|
|
172
|
+
/** SSH-3: focus back where it was when the sheet opened — or dropped, where that element is gone. */
|
|
173
|
+
private restoreFocus;
|
|
174
|
+
/** SSH-2, SSH-3: in the top layer, the page held, focus in. Mounted open, it appears in place without motion. */
|
|
175
|
+
private present;
|
|
176
|
+
/** SSH-2, SSH-3: out of the top layer (sliding from where it is drawn), the page given back, focus back where it was. */
|
|
177
|
+
private withdraw;
|
|
178
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
179
|
+
/** What changes whether the actions fit and whether the content scrolls: the content box, the content and the row. */
|
|
180
|
+
private observe;
|
|
181
|
+
protected firstUpdated(): void;
|
|
182
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
183
|
+
private body;
|
|
184
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
185
|
+
}
|
|
186
|
+
declare global {
|
|
187
|
+
interface HTMLElementTagNameMap {
|
|
188
|
+
'tanrei-side-sheet': TanreiSideSheet;
|
|
189
|
+
}
|
|
190
|
+
}
|