@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,128 @@
|
|
|
1
|
+
import { type CSSResult, type ReactiveController, type ReactiveControllerHost } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Where a group places one of its items: the group's variant, whether the item is its first or its last in the placed
|
|
4
|
+
* order, the axis the items follow (`block`: a column) and whether the item fills the width it is given (`stretch`: a
|
|
5
|
+
* column's item, a full-width row's). `row` is a toolbar's item (TBR-9), with the reach of its hit area toward each
|
|
6
|
+
* neighbour — half the measured gap, in px; null where it has no neighbour — along `axis` (`block`: a vertical toolbar).
|
|
7
|
+
*/
|
|
8
|
+
export interface GroupPlace {
|
|
9
|
+
variant: 'standard' | 'connected' | 'row';
|
|
10
|
+
first: boolean;
|
|
11
|
+
last: boolean;
|
|
12
|
+
axis?: 'inline' | 'block';
|
|
13
|
+
stretch?: boolean;
|
|
14
|
+
reachStart?: number | null;
|
|
15
|
+
reachEnd?: number | null;
|
|
16
|
+
}
|
|
17
|
+
/** The item's controller, under this key on a Tanrei Button or icon button (internal between Tanrei elements). */
|
|
18
|
+
export declare const GROUP_ITEM: unique symbol;
|
|
19
|
+
/** The group's side, under this key on a button group: where it places one of its children (null: not its item). */
|
|
20
|
+
export declare const GROUP_PLACE: unique symbol;
|
|
21
|
+
/**
|
|
22
|
+
* The group's side, under this key on a group that decides which of its items a key can reach (a toolbar's one Tab
|
|
23
|
+
* stop, TBR-10): one of its items was disabled or enabled by the platform — a disabled fieldset around it (BTN-32) —
|
|
24
|
+
* which changes no attribute a group could observe.
|
|
25
|
+
*/
|
|
26
|
+
export declare const GROUP_AVAILABILITY: unique symbol;
|
|
27
|
+
/** A host's side for the variant: the one it gives one of its children whose own is not set (null: none). */
|
|
28
|
+
export declare const HOST_VARIANT: unique symbol;
|
|
29
|
+
/** An element that places its children (a button group). */
|
|
30
|
+
export interface PlacingGroup {
|
|
31
|
+
[GROUP_PLACE](child: Element): GroupPlace | null;
|
|
32
|
+
[GROUP_AVAILABILITY]?(child: Element): void;
|
|
33
|
+
}
|
|
34
|
+
/** An element that gives its children a variant (a dialog or a side sheet, to its actions: DLG-20, SSH-17). */
|
|
35
|
+
export interface VariantHost {
|
|
36
|
+
[HOST_VARIANT](child: Element): string | null;
|
|
37
|
+
}
|
|
38
|
+
/** An element that can be placed in a group (a Button, an icon button). */
|
|
39
|
+
export interface GroupItem {
|
|
40
|
+
readonly [GROUP_ITEM]: GroupItemController;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* An item's side: the place its group gave it (null outside a group), as classes on its container (`classes()`), and —
|
|
44
|
+
* while connected — the container's half height as `--_half-block`, so that its own corners are held to a round cap
|
|
45
|
+
* (a pill token is 9999 px, and a box whose corners differ scales ALL of them down together when two meet: the inner
|
|
46
|
+
* corners would vanish), and its size as `--_box-width` and `--_box-height`, which the cut of its shadows at a seam
|
|
47
|
+
* counts from (`groupItemStyles()`).
|
|
48
|
+
*/
|
|
49
|
+
export declare class GroupItemController implements ReactiveController {
|
|
50
|
+
private readonly host;
|
|
51
|
+
private readonly container;
|
|
52
|
+
place: GroupPlace | null;
|
|
53
|
+
/** The variant its host gives it while its own is not set (DLG-20, SSH-17, SSH-5); null outside such a host. */
|
|
54
|
+
variant: string | null;
|
|
55
|
+
private observer;
|
|
56
|
+
private observed;
|
|
57
|
+
constructor(host: ReactiveControllerHost & HTMLElement, container: () => HTMLElement | null);
|
|
58
|
+
hostConnected(): void;
|
|
59
|
+
/** The platform's word that the item is disabled changed (its `formDisabledCallback`): its group is told. */
|
|
60
|
+
availabilityChanged(): void;
|
|
61
|
+
hostDisconnected(): void;
|
|
62
|
+
/** The host's variant (DLG-20, SSH-17, SSH-5). */
|
|
63
|
+
give(variant: string | null): void;
|
|
64
|
+
hostUpdated(): void;
|
|
65
|
+
/** The group's word. */
|
|
66
|
+
set(place: GroupPlace | null): void;
|
|
67
|
+
/**
|
|
68
|
+
* The container's classes: `joined` in a button group (standard or connected), then its variant, `first` and `last`,
|
|
69
|
+
* `block` in a column and `stretch` where the item fills the width it is given; a toolbar's item is `row` (and
|
|
70
|
+
* `block` in a column), never `joined`.
|
|
71
|
+
*/
|
|
72
|
+
classes(): Record<string, boolean>;
|
|
73
|
+
private reached;
|
|
74
|
+
/** TBR-9: a row item's reach toward each neighbour, as the caps `neighbourTarget()` reads on the container. */
|
|
75
|
+
private reach;
|
|
76
|
+
private watch;
|
|
77
|
+
}
|
|
78
|
+
export interface GroupItemStyleOptions {
|
|
79
|
+
/** The container: the element that carries the shape (`data-tanrei-shape`), the states, the ring and the ripple. */
|
|
80
|
+
on: string;
|
|
81
|
+
/**
|
|
82
|
+
* The custom property the ripple is inset by (the outline width), as `rippleStyles({ inset })` names it: on a seam,
|
|
83
|
+
* where there is no outline, the ripple is not inset, and the border forced colors draw for the outline is left out.
|
|
84
|
+
*/
|
|
85
|
+
rippleInset?: `--${string}`;
|
|
86
|
+
}
|
|
87
|
+
/** Every custom property a group may set on an item: a component that is no group item resets them on its own boxes. */
|
|
88
|
+
export declare const GROUP_ITEM_PROPERTIES: readonly ['--tanrei-group-start-radius', '--tanrei-group-end-radius', '--tanrei-group-top-radius', '--tanrei-group-bottom-radius', '--tanrei-group-pill', '--tanrei-group-min-width', '--tanrei-group-min-height', '--tanrei-group-seam-start', '--tanrei-group-seam-end', '--tanrei-group-seam-top', '--tanrei-group-seam-bottom', '--tanrei-group-outer-start', '--tanrei-group-outer-end'];
|
|
89
|
+
/** The declarations that take a box out of whatever group is around it: every group property back to `initial`. */
|
|
90
|
+
export declare const groupItemReset: string;
|
|
91
|
+
/**
|
|
92
|
+
* The item's styles inside a group, on its container (`on`). Outside a group none of these selectors match.
|
|
93
|
+
*
|
|
94
|
+
* - Connected (BGR-2, BGR-3, BGR-11, BGR-16): in a row the start corners (inline-start, mirrored in right-to-left) take
|
|
95
|
+
* `--tanrei-group-start-radius` and the end corners `--tanrei-group-end-radius`; in a column the top corners take
|
|
96
|
+
* `--tanrei-group-top-radius` and the bottom ones `--tanrei-group-bottom-radius`; else the item's own container shape
|
|
97
|
+
* of the state. Each is held to half the container's height; the ripple and the focus ring (ring or glow) follow each
|
|
98
|
+
* corner, concentric; the container is at least `--tanrei-group-min-width` wide; a corner that changes because an
|
|
99
|
+
* item came, went or moved changes at once (no transition on the corners). `--tanrei-group-pill` says whether the
|
|
100
|
+
* box's outer corner is a pill, which the smoothing leaves round (styles/shape.ts).
|
|
101
|
+
* - A seam (BGR-22, SPB-26): on an edge whose `--tanrei-group-seam-*` is 1 the container draws neither its outline nor
|
|
102
|
+
* its elevation's ring. Both are rings around a whole box (inset shadows, or a spread shadow), and a ring cannot
|
|
103
|
+
* leave one side out — so the container does not draw them itself. Its box ends at the seam and paints the fill
|
|
104
|
+
* alone: two fills that touch are two neighbouring boxes, which every engine snaps to the same device pixel, so
|
|
105
|
+
* nothing of the page shows between them and nothing is painted twice, however translucent the fills are. The rings
|
|
106
|
+
* — everything the state's `box-shadow` holds, which the component hands over as `--_shadow` — are drawn by the
|
|
107
|
+
* container's `::after`, a box of the container's shape that reaches `--_bleed` past each seam and is cut at the seam
|
|
108
|
+
* by `clip: rect()`: the ring's seam side is outside the cut, and the rings of the other sides run straight to the
|
|
109
|
+
* seam and end there (the corners at a seam are square). The cut is a rectangle in the engine's own pixel snapping,
|
|
110
|
+
* as a box's edge is — unlike `clip-path`, which Chromium antialiases at the place layout gives it and Firefox and
|
|
111
|
+
* WebKit round on their own, so that two clip paths that meet at one seam leave a line between them or overlap by
|
|
112
|
+
* one. It leaves `--_reach` of room on every other side for the blurred layers of the elevation. `rect()` counts
|
|
113
|
+
* from the box's top left corner in lengths, so its right and bottom edges need the container's size:
|
|
114
|
+
* `GroupItemController` measures it (`--_box-width`, `--_box-height`). While the container has keyboard focus its
|
|
115
|
+
* `::after` is the focus ring, and it draws its shadows itself, whole, over its neighbours and the dividers beside it:
|
|
116
|
+
* the focus ring follows the item's own shape.
|
|
117
|
+
* - What the group adds to the container's size is `--_add-start`, `--_add-end`, `--_add-top` and `--_add-bottom` — at
|
|
118
|
+
* an outer end of a row `--tanrei-group-outer-start` / `-end` (BGR-23), nothing anywhere else. The component adds
|
|
119
|
+
* each to its padding on that side (and to a fixed width or a minimum height of its own); outside a connected group
|
|
120
|
+
* it defines them as 0.
|
|
121
|
+
* - Standard (BGR-4): the hit area (`::before`, `minimumTarget()` then `neighbourTarget()`) still reaches the target,
|
|
122
|
+
* but toward a neighbour no further than half the gap, so a press between two items goes to the nearer one and never
|
|
123
|
+
* over a neighbour's visible bounds; the first item's start and the last one's end reach as far as they would alone.
|
|
124
|
+
* Along the row, or — `block` — along the column.
|
|
125
|
+
* - Row (TBR-9, a toolbar's item): the same, with the caps the toolbar measured (`reachStart`, `reachEnd`, set on the
|
|
126
|
+
* container by the controller), along the inline axis or — in a vertical toolbar — the block axis.
|
|
127
|
+
*/
|
|
128
|
+
export declare function groupItemStyles({ on, rippleInset }: GroupItemStyleOptions): CSSResult;
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { unsafeCSS } from 'lit';
|
|
2
|
+
import { BEHAVIOR } from './behavior.js';
|
|
3
|
+
import { neighbourTarget } from './target.js';
|
|
4
|
+
/** The item's controller, under this key on a Tanrei Button or icon button (internal between Tanrei elements). */
|
|
5
|
+
export const GROUP_ITEM = Symbol.for('tanrei.group-item');
|
|
6
|
+
/** The group's side, under this key on a button group: where it places one of its children (null: not its item). */
|
|
7
|
+
export const GROUP_PLACE = Symbol.for('tanrei.group-place');
|
|
8
|
+
/**
|
|
9
|
+
* The group's side, under this key on a group that decides which of its items a key can reach (a toolbar's one Tab
|
|
10
|
+
* stop, TBR-10): one of its items was disabled or enabled by the platform — a disabled fieldset around it (BTN-32) —
|
|
11
|
+
* which changes no attribute a group could observe.
|
|
12
|
+
*/
|
|
13
|
+
export const GROUP_AVAILABILITY = Symbol.for('tanrei.group-availability');
|
|
14
|
+
/** A host's side for the variant: the one it gives one of its children whose own is not set (null: none). */
|
|
15
|
+
export const HOST_VARIANT = Symbol.for('tanrei.host-variant');
|
|
16
|
+
/**
|
|
17
|
+
* Added to a measured size before it is written as a length. A zoomed page reports a size divided by its zoom, to a
|
|
18
|
+
* thousandth of a pixel, and the engine multiplies the length back: the product can fall a hair under the layout unit
|
|
19
|
+
* the size really is, and is then cut down to the unit below (1/64 px) — enough to round the far edge of a cut to the
|
|
20
|
+
* pixel before the seam where the seam falls on half a pixel. A thousandth of a pixel is more than that error and far
|
|
21
|
+
* less than a unit.
|
|
22
|
+
*/
|
|
23
|
+
const SLACK = 0.001;
|
|
24
|
+
const same = (a, b) => a === b ||
|
|
25
|
+
(!!a &&
|
|
26
|
+
!!b &&
|
|
27
|
+
a.variant === b.variant &&
|
|
28
|
+
a.first === b.first &&
|
|
29
|
+
a.last === b.last &&
|
|
30
|
+
(a.axis ?? 'inline') === (b.axis ?? 'inline') &&
|
|
31
|
+
!!a.stretch === !!b.stretch &&
|
|
32
|
+
(a.reachStart ?? null) === (b.reachStart ?? null) &&
|
|
33
|
+
(a.reachEnd ?? null) === (b.reachEnd ?? null));
|
|
34
|
+
/**
|
|
35
|
+
* An item's side: the place its group gave it (null outside a group), as classes on its container (`classes()`), and —
|
|
36
|
+
* while connected — the container's half height as `--_half-block`, so that its own corners are held to a round cap
|
|
37
|
+
* (a pill token is 9999 px, and a box whose corners differ scales ALL of them down together when two meet: the inner
|
|
38
|
+
* corners would vanish), and its size as `--_box-width` and `--_box-height`, which the cut of its shadows at a seam
|
|
39
|
+
* counts from (`groupItemStyles()`).
|
|
40
|
+
*/
|
|
41
|
+
export class GroupItemController {
|
|
42
|
+
constructor(host, container) {
|
|
43
|
+
this.host = host;
|
|
44
|
+
this.container = container;
|
|
45
|
+
this.place = null;
|
|
46
|
+
/** The variant its host gives it while its own is not set (DLG-20, SSH-17, SSH-5); null outside such a host. */
|
|
47
|
+
this.variant = null;
|
|
48
|
+
this.observer = null;
|
|
49
|
+
this.observed = null;
|
|
50
|
+
this.reached = null;
|
|
51
|
+
host.addController(this);
|
|
52
|
+
}
|
|
53
|
+
hostConnected() {
|
|
54
|
+
// The group may have placed its children before this element was upgraded; ask it.
|
|
55
|
+
const parent = this.host.parentElement;
|
|
56
|
+
this.set(parent?.[GROUP_PLACE]?.(this.host) ?? null);
|
|
57
|
+
this.give(parent?.[HOST_VARIANT]?.(this.host) ?? null);
|
|
58
|
+
}
|
|
59
|
+
/** The platform's word that the item is disabled changed (its `formDisabledCallback`): its group is told. */
|
|
60
|
+
availabilityChanged() {
|
|
61
|
+
this.host.parentElement?.[GROUP_AVAILABILITY]?.(this.host);
|
|
62
|
+
}
|
|
63
|
+
hostDisconnected() {
|
|
64
|
+
this.set(null);
|
|
65
|
+
this.give(null);
|
|
66
|
+
this.watch(null);
|
|
67
|
+
}
|
|
68
|
+
/** The host's variant (DLG-20, SSH-17, SSH-5). */
|
|
69
|
+
give(variant) {
|
|
70
|
+
if (variant === this.variant)
|
|
71
|
+
return;
|
|
72
|
+
this.variant = variant;
|
|
73
|
+
this.host.requestUpdate();
|
|
74
|
+
}
|
|
75
|
+
hostUpdated() {
|
|
76
|
+
this.watch(this.place?.variant === 'connected' ? this.container() : null);
|
|
77
|
+
this.reach();
|
|
78
|
+
}
|
|
79
|
+
/** The group's word. */
|
|
80
|
+
set(place) {
|
|
81
|
+
if (same(place, this.place))
|
|
82
|
+
return;
|
|
83
|
+
this.place = place ? { ...place } : null;
|
|
84
|
+
this.host.requestUpdate();
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* The container's classes: `joined` in a button group (standard or connected), then its variant, `first` and `last`,
|
|
88
|
+
* `block` in a column and `stretch` where the item fills the width it is given; a toolbar's item is `row` (and
|
|
89
|
+
* `block` in a column), never `joined`.
|
|
90
|
+
*/
|
|
91
|
+
classes() {
|
|
92
|
+
const place = this.place;
|
|
93
|
+
return {
|
|
94
|
+
joined: place?.variant === 'standard' || place?.variant === 'connected',
|
|
95
|
+
standard: place?.variant === 'standard',
|
|
96
|
+
connected: place?.variant === 'connected',
|
|
97
|
+
row: place?.variant === 'row',
|
|
98
|
+
block: place?.axis === 'block',
|
|
99
|
+
stretch: !!place?.stretch,
|
|
100
|
+
first: !!place?.first,
|
|
101
|
+
last: !!place?.last,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/** TBR-9: a row item's reach toward each neighbour, as the caps `neighbourTarget()` reads on the container. */
|
|
105
|
+
reach() {
|
|
106
|
+
const place = this.place?.variant === 'row' ? this.place : null;
|
|
107
|
+
const element = place ? this.container() : null;
|
|
108
|
+
if (this.reached && this.reached !== element) {
|
|
109
|
+
this.reached.style.removeProperty('--_cap-start');
|
|
110
|
+
this.reached.style.removeProperty('--_cap-end');
|
|
111
|
+
}
|
|
112
|
+
this.reached = element;
|
|
113
|
+
if (!element || !place)
|
|
114
|
+
return;
|
|
115
|
+
for (const [side, value] of [['start', place.reachStart], ['end', place.reachEnd]]) {
|
|
116
|
+
if (value == null)
|
|
117
|
+
element.style.removeProperty(`--_cap-${side}`);
|
|
118
|
+
else
|
|
119
|
+
element.style.setProperty(`--_cap-${side}`, `${value}px`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
watch(element) {
|
|
123
|
+
if (element === this.observed)
|
|
124
|
+
return;
|
|
125
|
+
if (this.observed) {
|
|
126
|
+
this.observer?.unobserve(this.observed);
|
|
127
|
+
for (const name of ['--_half-block', '--_box-width', '--_box-height'])
|
|
128
|
+
this.observed.style.removeProperty(name);
|
|
129
|
+
}
|
|
130
|
+
this.observed = element;
|
|
131
|
+
if (!element)
|
|
132
|
+
return;
|
|
133
|
+
this.observer ??= new ResizeObserver((entries) => {
|
|
134
|
+
for (const entry of entries) {
|
|
135
|
+
const block = entry.borderBoxSize?.[0]?.blockSize ?? entry.target.getBoundingClientRect().height;
|
|
136
|
+
const style = entry.target.style;
|
|
137
|
+
style.setProperty('--_half-block', `${block / 2}px`);
|
|
138
|
+
// The cut of the shadows' box at a seam counts from its top left corner (groupItemStyles): the box's used size,
|
|
139
|
+
// which the container's computed width and height are (it is a border box). Not the observer's own numbers:
|
|
140
|
+
// on a zoomed page they are cut down to a layout unit of the unzoomed size, which is coarser than the layout.
|
|
141
|
+
const used = getComputedStyle(entry.target);
|
|
142
|
+
for (const [name, value] of [['--_box-width', used.width], ['--_box-height', used.height]]) {
|
|
143
|
+
const size = Number.parseFloat(value);
|
|
144
|
+
if (Number.isFinite(size))
|
|
145
|
+
style.setProperty(name, `${size + SLACK}px`);
|
|
146
|
+
else
|
|
147
|
+
style.removeProperty(name);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
this.observer.observe(element);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/** Every custom property a group may set on an item: a component that is no group item resets them on its own boxes. */
|
|
155
|
+
export const GROUP_ITEM_PROPERTIES = [
|
|
156
|
+
'--tanrei-group-start-radius',
|
|
157
|
+
'--tanrei-group-end-radius',
|
|
158
|
+
'--tanrei-group-top-radius',
|
|
159
|
+
'--tanrei-group-bottom-radius',
|
|
160
|
+
'--tanrei-group-pill',
|
|
161
|
+
'--tanrei-group-min-width',
|
|
162
|
+
'--tanrei-group-min-height',
|
|
163
|
+
'--tanrei-group-seam-start',
|
|
164
|
+
'--tanrei-group-seam-end',
|
|
165
|
+
'--tanrei-group-seam-top',
|
|
166
|
+
'--tanrei-group-seam-bottom',
|
|
167
|
+
'--tanrei-group-outer-start',
|
|
168
|
+
'--tanrei-group-outer-end',
|
|
169
|
+
];
|
|
170
|
+
/** The declarations that take a box out of whatever group is around it: every group property back to `initial`. */
|
|
171
|
+
export const groupItemReset = GROUP_ITEM_PROPERTIES.map((property) => `${property}: initial;`).join('\n ');
|
|
172
|
+
/**
|
|
173
|
+
* The item's styles inside a group, on its container (`on`). Outside a group none of these selectors match.
|
|
174
|
+
*
|
|
175
|
+
* - Connected (BGR-2, BGR-3, BGR-11, BGR-16): in a row the start corners (inline-start, mirrored in right-to-left) take
|
|
176
|
+
* `--tanrei-group-start-radius` and the end corners `--tanrei-group-end-radius`; in a column the top corners take
|
|
177
|
+
* `--tanrei-group-top-radius` and the bottom ones `--tanrei-group-bottom-radius`; else the item's own container shape
|
|
178
|
+
* of the state. Each is held to half the container's height; the ripple and the focus ring (ring or glow) follow each
|
|
179
|
+
* corner, concentric; the container is at least `--tanrei-group-min-width` wide; a corner that changes because an
|
|
180
|
+
* item came, went or moved changes at once (no transition on the corners). `--tanrei-group-pill` says whether the
|
|
181
|
+
* box's outer corner is a pill, which the smoothing leaves round (styles/shape.ts).
|
|
182
|
+
* - A seam (BGR-22, SPB-26): on an edge whose `--tanrei-group-seam-*` is 1 the container draws neither its outline nor
|
|
183
|
+
* its elevation's ring. Both are rings around a whole box (inset shadows, or a spread shadow), and a ring cannot
|
|
184
|
+
* leave one side out — so the container does not draw them itself. Its box ends at the seam and paints the fill
|
|
185
|
+
* alone: two fills that touch are two neighbouring boxes, which every engine snaps to the same device pixel, so
|
|
186
|
+
* nothing of the page shows between them and nothing is painted twice, however translucent the fills are. The rings
|
|
187
|
+
* — everything the state's `box-shadow` holds, which the component hands over as `--_shadow` — are drawn by the
|
|
188
|
+
* container's `::after`, a box of the container's shape that reaches `--_bleed` past each seam and is cut at the seam
|
|
189
|
+
* by `clip: rect()`: the ring's seam side is outside the cut, and the rings of the other sides run straight to the
|
|
190
|
+
* seam and end there (the corners at a seam are square). The cut is a rectangle in the engine's own pixel snapping,
|
|
191
|
+
* as a box's edge is — unlike `clip-path`, which Chromium antialiases at the place layout gives it and Firefox and
|
|
192
|
+
* WebKit round on their own, so that two clip paths that meet at one seam leave a line between them or overlap by
|
|
193
|
+
* one. It leaves `--_reach` of room on every other side for the blurred layers of the elevation. `rect()` counts
|
|
194
|
+
* from the box's top left corner in lengths, so its right and bottom edges need the container's size:
|
|
195
|
+
* `GroupItemController` measures it (`--_box-width`, `--_box-height`). While the container has keyboard focus its
|
|
196
|
+
* `::after` is the focus ring, and it draws its shadows itself, whole, over its neighbours and the dividers beside it:
|
|
197
|
+
* the focus ring follows the item's own shape.
|
|
198
|
+
* - What the group adds to the container's size is `--_add-start`, `--_add-end`, `--_add-top` and `--_add-bottom` — at
|
|
199
|
+
* an outer end of a row `--tanrei-group-outer-start` / `-end` (BGR-23), nothing anywhere else. The component adds
|
|
200
|
+
* each to its padding on that side (and to a fixed width or a minimum height of its own); outside a connected group
|
|
201
|
+
* it defines them as 0.
|
|
202
|
+
* - Standard (BGR-4): the hit area (`::before`, `minimumTarget()` then `neighbourTarget()`) still reaches the target,
|
|
203
|
+
* but toward a neighbour no further than half the gap, so a press between two items goes to the nearer one and never
|
|
204
|
+
* over a neighbour's visible bounds; the first item's start and the last one's end reach as far as they would alone.
|
|
205
|
+
* Along the row, or — `block` — along the column.
|
|
206
|
+
* - Row (TBR-9, a toolbar's item): the same, with the caps the toolbar measured (`reachStart`, `reachEnd`, set on the
|
|
207
|
+
* container by the controller), along the inline axis or — in a vertical toolbar — the block axis.
|
|
208
|
+
*/
|
|
209
|
+
export function groupItemStyles({ on, rippleInset }) {
|
|
210
|
+
const connected = `${on}.connected`;
|
|
211
|
+
// Corners by their logical name: the block side first (start = top), then the inline side.
|
|
212
|
+
const CORNERS = ['start-start', 'start-end', 'end-start', 'end-end'];
|
|
213
|
+
const radius = (corner, plus, minus) => {
|
|
214
|
+
const base = `var(--_group-${corner}) * var(--_corner-scale)`;
|
|
215
|
+
if (minus)
|
|
216
|
+
return `max(0px, calc(${base} - ${minus}))`;
|
|
217
|
+
return plus ? `calc(${base} + ${plus})` : `calc(${base})`;
|
|
218
|
+
};
|
|
219
|
+
const corners = (plus, minus) => CORNERS.map((corner) => `border-${corner}-radius: ${radius(corner, plus, minus)};`).join('\n ');
|
|
220
|
+
// A corner's radius as the group gives it: a column's top or bottom, else a row's start or end, else the item's own;
|
|
221
|
+
// held to half the container's height (a pill token is 9999 px, and a box whose corners differ scales ALL of them
|
|
222
|
+
// down together when two meet: the inner corners would vanish).
|
|
223
|
+
const given = (corner) => {
|
|
224
|
+
const [block, inline] = corner.split('-');
|
|
225
|
+
const value = `var(--tanrei-group-${block === 'start' ? 'top' : 'bottom'}-radius, var(--tanrei-group-${inline}-radius, var(--tanrei-corner-radius)))`;
|
|
226
|
+
return `--_group-${corner}: min(${value}, var(--_half-block, ${value}));`;
|
|
227
|
+
};
|
|
228
|
+
const glow = corners('var(--tanrei-sys-focus-offset)');
|
|
229
|
+
const half = 'calc(var(--tanrei-comp-button-group-standard-gap) / 2)';
|
|
230
|
+
// The shadows' box (`::after`) reaches the bleed past each seam, and is cut there: `clip: rect(top, right, bottom,
|
|
231
|
+
// left)`, each a distance from the top left corner of that box — the seam where an edge is one, `--_reach` beyond
|
|
232
|
+
// the container's edge where it is not. The cut is physical: the start is the left — mirrored below.
|
|
233
|
+
const near = (side) => `calc(var(--_seam-${side}) * (var(--_bleed) + var(--_reach)) - var(--_reach))`;
|
|
234
|
+
const far = (size, before, side) => `calc(var(--_box-${size}, 0px) + var(--_seam-${before}) * var(--_bleed) + (1 - var(--_seam-${side})) * var(--_reach))`;
|
|
235
|
+
const past = (side) => `${side}: calc(var(--_seam-${side}) * var(--_bleed) * -1);`;
|
|
236
|
+
// What stays inside the outline (the ripple) is inset by its width on the sides that have one: not on a seam.
|
|
237
|
+
const inside = (width) => ['top', 'right', 'bottom', 'left'].map((side) => `${side}: calc((1 - var(--_seam-${side})) * var(${width}));`).join('\n ');
|
|
238
|
+
return unsafeCSS(`
|
|
239
|
+
${connected} {
|
|
240
|
+
${CORNERS.map(given).join('\n ')}
|
|
241
|
+
${corners()}
|
|
242
|
+
--_seam-start: var(--tanrei-group-seam-start, 0);
|
|
243
|
+
--_seam-end: var(--tanrei-group-seam-end, 0);
|
|
244
|
+
--_seam-top: var(--tanrei-group-seam-top, 0);
|
|
245
|
+
--_seam-bottom: var(--tanrei-group-seam-bottom, 0);
|
|
246
|
+
--_bleed: var(--tanrei-sys-space-space50);
|
|
247
|
+
--_reach: var(--tanrei-sys-target-touch);
|
|
248
|
+
--_add-start: var(--tanrei-group-outer-start, 0px);
|
|
249
|
+
--_add-end: var(--tanrei-group-outer-end, 0px);
|
|
250
|
+
--_add-top: 0px;
|
|
251
|
+
--_add-bottom: 0px;
|
|
252
|
+
--_seam-left: var(--_seam-start);
|
|
253
|
+
--_seam-right: var(--_seam-end);
|
|
254
|
+
/* The container paints its fill; its shadows are its ::after's (below). Transparent, not none: a list value. */
|
|
255
|
+
--_own-shadow: 0 0 0 0 transparent;
|
|
256
|
+
min-inline-size: calc(var(--tanrei-group-min-width, 0px) + var(--_add-start) + var(--_add-end));
|
|
257
|
+
transition-property: background-color, color, opacity;
|
|
258
|
+
}
|
|
259
|
+
:host(:dir(rtl)) ${connected} {
|
|
260
|
+
--_seam-left: var(--_seam-end);
|
|
261
|
+
--_seam-right: var(--_seam-start);
|
|
262
|
+
}
|
|
263
|
+
${connected}:not(:focus-visible)::after {
|
|
264
|
+
content: '';
|
|
265
|
+
position: absolute;
|
|
266
|
+
z-index: -1;
|
|
267
|
+
${past('top')}
|
|
268
|
+
${past('right')}
|
|
269
|
+
${past('bottom')}
|
|
270
|
+
${past('left')}
|
|
271
|
+
border-radius: inherit;
|
|
272
|
+
box-shadow: var(--_shadow);
|
|
273
|
+
clip: rect(${near('top')}, ${far('width', 'left', 'right')}, ${far('height', 'top', 'bottom')}, ${near('left')});
|
|
274
|
+
pointer-events: none;
|
|
275
|
+
transition-property: box-shadow;
|
|
276
|
+
transition-duration: inherit;
|
|
277
|
+
transition-timing-function: inherit;
|
|
278
|
+
}
|
|
279
|
+
${connected}:focus-visible,
|
|
280
|
+
:host(:dir(rtl)) ${connected}:focus-visible {
|
|
281
|
+
--_seam-start: 0;
|
|
282
|
+
--_seam-end: 0;
|
|
283
|
+
--_seam-top: 0;
|
|
284
|
+
--_seam-bottom: 0;
|
|
285
|
+
--_own-shadow: initial;
|
|
286
|
+
z-index: 2;
|
|
287
|
+
}
|
|
288
|
+
@supports (corner-shape: superellipse(log(2, 2))) {
|
|
289
|
+
${connected} {
|
|
290
|
+
--_corner-smoothing: calc(var(--tanrei-sys-shape-corner-smoothing, 0) * (1 - var(--tanrei-group-pill, var(--tanrei-corner-pill, 0))));
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
${connected} .ripple {
|
|
294
|
+
${corners(undefined, rippleInset ? `var(${rippleInset})` : '0px')}
|
|
295
|
+
${rippleInset ? inside(rippleInset) : ''}
|
|
296
|
+
}
|
|
297
|
+
${rippleInset
|
|
298
|
+
? `/* Forced colors replace the outline with a border (the component's rule): none along a seam. */
|
|
299
|
+
@media (forced-colors: active) {
|
|
300
|
+
${connected} {
|
|
301
|
+
${['top', 'right', 'bottom', 'left'].map((side) => `border-${side}-width: calc((1 - var(--_seam-${side})) * var(${rippleInset}));`).join('\n ')}
|
|
302
|
+
}
|
|
303
|
+
}`
|
|
304
|
+
: ''}
|
|
305
|
+
${connected}:focus-visible::after {
|
|
306
|
+
${corners('var(--_focus-inner-edge)')}
|
|
307
|
+
}
|
|
308
|
+
@container style(${BEHAVIOR}-focus-style: glow) {
|
|
309
|
+
${connected}:focus-visible::after {
|
|
310
|
+
${glow}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
${connected}[data-focus-style='glow']:focus-visible::after {
|
|
314
|
+
${glow}
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
${neighbourTarget(`${on}.standard:not(.block)`)}
|
|
318
|
+
${neighbourTarget(`${on}.standard.block`, { axis: 'block' })}
|
|
319
|
+
${on}.standard::before {
|
|
320
|
+
--_cap-start: ${half};
|
|
321
|
+
--_cap-end: ${half};
|
|
322
|
+
}
|
|
323
|
+
${on}.standard.first::before {
|
|
324
|
+
--_cap-start: initial;
|
|
325
|
+
}
|
|
326
|
+
${on}.standard.last::before {
|
|
327
|
+
--_cap-end: initial;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
${neighbourTarget(`${on}.row:not(.block)`)}
|
|
331
|
+
${neighbourTarget(`${on}.row.block`, { axis: 'block' })}
|
|
332
|
+
`);
|
|
333
|
+
}
|
|
334
|
+
//# sourceMappingURL=group-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-item.js","sourceRoot":"","sources":["../../src/primitives/group-item.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwE,SAAS,EAAE,MAAM,KAAK,CAAC;AACtG,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAuD9C,kHAAkH;AAClH,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;AAC1D,oHAAoH;AACpH,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;AAE5D;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;AAE1E,6GAA6G;AAC7G,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;AAgB9D;;;;;;GAMG;AACH,MAAM,KAAK,GAAG,KAAK,CAAC;AAEpB,MAAM,IAAI,GAAG,CAAC,CAAoB,EAAE,CAAoB,EAAE,EAAE,CAC1D,CAAC,KAAK,CAAC;IACP,CAAC,CAAC,CAAC,CAAC;QACF,CAAC,CAAC,CAAC;QACH,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QACvB,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;QACnB,CAAC,CAAC,IAAI,KAAK,CAAC,CA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IAGN,eAAe,CAAC,GAAG,EAAE,uBAAuB,CAAC;IAC7C,eAAe,CAAC,GAAG,EAAE,iBAAiB,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IAC1D,EAAE;oBACc,IAAI;kBACN,IAAI;;IAElB,EAAE;;;IAGF,EAAE;;;;IAIF,eAAe,CAAC,GAAG,EAAE,kBAAkB,CAAC;IACxC,eAAe,CAAC,GAAG,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;CACxD,CAAC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// `hidden` on a host.
|
|
2
|
+
//
|
|
3
|
+
// The browser's rule for the `hidden` attribute is the weakest in the cascade: a shadow sheet's `:host { display: … }`
|
|
4
|
+
// is an author's rule and beats it, so an element whose host names a `display` is drawn with the attribute on it. Every
|
|
5
|
+
// element whose sheet gives its host a `display` therefore composes this ONE rule, as the LAST of its styles — after
|
|
6
|
+
// every rule of its own that names the host's `display`, whatever attribute that rule asks for:
|
|
7
|
+
//
|
|
8
|
+
// static override styles = [styles, hiddenHost];
|
|
9
|
+
//
|
|
10
|
+
// (A light-DOM element says the same in its stylesheet, as `:where(<tag>[hidden])`.) `src/hidden.test.ts` mounts every
|
|
11
|
+
// tag of the generated manifest with the attribute and reads its box, so an element that forgets this fails there.
|
|
12
|
+
//
|
|
13
|
+
// What it leaves alone: `hidden="until-found"`, which the browser hides by `content-visibility` and reveals for a find
|
|
14
|
+
// in page — the element keeps its box for that; and the product's own rule for the element's `display`, which wins
|
|
15
|
+
// over a shadow sheet's as it wins over the browser's.
|
|
16
|
+
import { css } from 'lit';
|
|
17
|
+
/** The host with the `hidden` attribute has no box. Composed last (see above). */
|
|
18
|
+
export const hiddenHost = css `
|
|
19
|
+
:host([hidden]:not([hidden='until-found' i])) {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
//# sourceMappingURL=hidden.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hidden.js","sourceRoot":"","sources":["../../src/primitives/hidden.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,EAAE;AACF,uHAAuH;AACvH,wHAAwH;AACxH,qHAAqH;AACrH,gGAAgG;AAChG,EAAE;AACF,mDAAmD;AACnD,EAAE;AACF,uHAAuH;AACvH,mHAAmH;AACnH,EAAE;AACF,uHAAuH;AACvH,mHAAmH;AACnH,uDAAuD;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,kFAAkF;AAClF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;CAI5B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantics that live on the host (a divider, a progress indicator, a loading indicator): components with no native
|
|
3
|
+
* element to carry them — nothing is interactive, so there is nothing to focus — whose spec says the host carries
|
|
4
|
+
* `role` and its `aria-*` attributes. `null` removes an attribute; an attribute is only written when it changes, so an
|
|
5
|
+
* update that changes nothing does not touch the accessibility tree. (A pressable component keeps its semantics on the
|
|
6
|
+
* native element in its shadow root instead: axe cannot see `ElementInternals`.)
|
|
7
|
+
*/
|
|
8
|
+
export declare function hostAria(host: Element, attributes: Record<string, string | null>): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantics that live on the host (a divider, a progress indicator, a loading indicator): components with no native
|
|
3
|
+
* element to carry them — nothing is interactive, so there is nothing to focus — whose spec says the host carries
|
|
4
|
+
* `role` and its `aria-*` attributes. `null` removes an attribute; an attribute is only written when it changes, so an
|
|
5
|
+
* update that changes nothing does not touch the accessibility tree. (A pressable component keeps its semantics on the
|
|
6
|
+
* native element in its shadow root instead: axe cannot see `ElementInternals`.)
|
|
7
|
+
*/
|
|
8
|
+
export function hostAria(host, attributes) {
|
|
9
|
+
for (const [name, value] of Object.entries(attributes)) {
|
|
10
|
+
if (value === null) {
|
|
11
|
+
if (host.hasAttribute(name))
|
|
12
|
+
host.removeAttribute(name);
|
|
13
|
+
}
|
|
14
|
+
else if (host.getAttribute(name) !== value)
|
|
15
|
+
host.setAttribute(name, value);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=host-aria.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-aria.js","sourceRoot":"","sources":["../../src/primitives/host-aria.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAa,EAAE,UAAyC;IAC/E,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;QACvD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;gBAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAC1D,CAAC;aAAM,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,KAAK;YAAE,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC/E,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export { iconGlyph } from '../styles/icons.js';
|
|
2
|
+
export { cornerRadius, shape } from '../styles/shape.js';
|
|
3
|
+
export { type OpenAxis, OpenAxesController, type OpenAxesOptions } from './axes.js';
|
|
4
|
+
export { BEHAVIOR, PRESSED_FEEDBACK, type PressedFeedback, choice, pressedFeedback } from './behavior.js';
|
|
5
|
+
export { isDisabledControl, takeFormDisabled } from './form-disabled.js';
|
|
6
|
+
export { type DisabledHost, FocusedStop, disabledWaitsWhileFocused, endsWaiting, waitsWhileFocused } from './disabled-while-focused.js';
|
|
7
|
+
export { focusedAtFirst, wantsAutofocus } from './autofocus.js';
|
|
8
|
+
export { type FocusRingOptions, type FocusSelector, focusGlow, focusGlowEnds, focusRing, syncFocusStyle } from './focus-ring.js';
|
|
9
|
+
export { PressController, type PressOptions, pressHold } from './press.js';
|
|
10
|
+
export { type Point, type RippleTokens, fadeRipple, rippleStyles, startRipple } from './ripple.js';
|
|
11
|
+
export { type StatePaints, type StateSelector, stateRules } from './states.js';
|
|
12
|
+
export { arcStyles } from './arc.js';
|
|
13
|
+
export { FORWARDED_DESCRIPTION, FORWARDED_INVALID } from './description.js';
|
|
14
|
+
export { OUTSIDE_FOCUS_ORDER } from './focus-order.js';
|
|
15
|
+
export { DIRECTION_PROBE, DirectionController, directionProbeStyles } from './direction.js';
|
|
16
|
+
export { lineArrow } from './disclosure.js';
|
|
17
|
+
export { PendingGlyphs, isGlyphProbe } from './glyph-pending.js';
|
|
18
|
+
export { FollowController, type FollowOptions } from './follow.js';
|
|
19
|
+
export { ANCHORED_PLACEMENTS, type AnchoredArrow, type AnchoredBox, type AnchoredInput, type AnchoredPlace, type AnchoredPlacement, type AnchoredSide, type NamedSide, anchorGone, anchorOutOfSight, choiceAttribute, crossOffsetAttribute, numericAttribute, placeAnchored, usableLength, } from './placement.js';
|
|
20
|
+
export { type ArrowStyleOptions, type ShadowLayer, arrowOutlineStyles, arrowStyles, shadeFilter, shadowLayers } from './arrow.js';
|
|
21
|
+
export { type AnchoredStyleOptions, AnchoredSurfaceController, type AnchoredSurfaceOptions, anchoredSurfaceStyles } from './anchored.js';
|
|
22
|
+
export { DismissController, type DismissOptions, type DismissReason, type OverlayEntry, logicalAncestors, overlayDepth, registerOverlay } from './dismiss.js';
|
|
23
|
+
export { type OverlayTabOptions, focusOverlay, keepOverlayFocusAfterPress, quietFocus, returnOverlayFocus, tabThroughOverlay, watchInput } from './overlay-focus.js';
|
|
24
|
+
export { hostAria } from './host-aria.js';
|
|
25
|
+
export { FIELD_CONNECT, FIELD_CONTROL, type FieldConnection, FieldControlController, type FieldControlOptions, FieldProviderController, type FieldProviderOptions, type FieldSays, type FieldState, type PlainGift, composedContains, giveAttributes, namesItself, takeBack, takesRequired, } from './field.js';
|
|
26
|
+
export { DRAWN_WIDTH, GlyphDrawnController } from './glyph.js';
|
|
27
|
+
export { type GlyphMirrorOptions, GlyphMirrorController, type GlyphMirroring, activeIconSet, glyphMirrors, glyphName, markGlyph, observeIcons } from './glyph-mirror.js';
|
|
28
|
+
export { report } from './report.js';
|
|
29
|
+
export { type MissingWord, type TanreiWords, type WordKey, WordsController, missingWords, setWords, watchWords, wordFor, wordMissing } from './words.js';
|
|
30
|
+
export { type MissingValueKind, type OwnWords, browserMissingMessage, missingValueMessage } from './missing-value.js';
|
|
31
|
+
export { AvailabilityController } from './availability.js';
|
|
32
|
+
export { SELECTION_STATES, SelectionController, conditionStates, type SelectionHost, conditionBlock, markConditionChange, recolorTiming, selectionContainerShape, selectionRippleOrigin, selectionLabel, selectionState, selectionStates, } from './selection.js';
|
|
33
|
+
export { minimumTarget, neighbourTarget } from './target.js';
|
|
34
|
+
export { KeptLengths, keptLength } from './kept-length.js';
|
|
35
|
+
export { type ItemRowOptions, itemRowStyles, rowTarget } from './item-row.js';
|
|
36
|
+
export { RovingKeys, type RovingItem, TYPEAHEAD_WINDOW } from './roving.js';
|
|
37
|
+
export { answersPress, findInteractive, slottedInteractive } from './interactive.js';
|
|
38
|
+
export { VisibilityController } from './visibility.js';
|
|
39
|
+
export { layoutScale } from './layout-scale.js';
|
|
40
|
+
export { deepActive, focusWithin, holdPageScroll, modalLayer, returnFocus, tabbables, trapFocus } from './modal.js';
|
|
41
|
+
export { SHEET_FLING_VELOCITY, SHEET_TOUCH_SLOP, SheetDrag, type SheetDragStep, closeRequestReason, keyboardCover, modalSheetKeys, onBackdrop, watchEscape, } from './sheet.js';
|
|
42
|
+
export { type NativeText, NativeTextController, type NativeTextOptions } from './native-text.js';
|
|
43
|
+
export { DATE_KINDS, type DateKind, FALLBACK_LOCALE, ambientLocale, asciiDigits, clockFor, formatValue, fullDateText, headerDateText, hourText, isoValue, localeDigits, localeDirection, localeFirstDay, localeHourCycle, longWeekdays, minuteText, monthName, monthYearText, narrowWeekdays, numberText, periodNames, periodPlace, readText, type RowPart, type SegmentUnit, supportedLocale, timeSeparator, timeText, todayName, unitName, valuePattern, valueRow, withinRange, yearText, } from './locale-date.js';
|
|
44
|
+
export * from './calendar-date.js';
|
|
45
|
+
export { SystemWatchController } from './system-watch.js';
|
|
46
|
+
export { SEPARATIONS, SEPARATION_VALUES, type Separation, type SeparationProp, separationHost, separationOf, styleQueries, syncSeparation, whenGap } from './separation.js';
|
|
47
|
+
export { afterClick } from './after-click.js';
|
|
48
|
+
export { SUBMIT_BUTTON, type SubmitButtonState, defaultButton, markPassingSubmitter, pressDefaultButton, watchNativeInputs } from './default-button.js';
|
|
49
|
+
export { DISABLED, LINK_KEYS, LINK_MARK, LinkController, type LinkForm, type LinkOptions, type LinkProps, type LinkRefusal, type TanreiLinkTarget, linkAttributes, linkForm, linkRel, readDestination, readTarget, styledAsAnchorToo, } from './link.js';
|
|
50
|
+
export { layoutSize, naturalHeight } from './natural-height.js';
|
|
51
|
+
export { parseValues } from './values.js';
|
|
52
|
+
export { notifyItemUpdate } from './item-update.js';
|
|
53
|
+
export { type FilledRun, type FilledSentence, type PlaceFaults, fillPlaces, placeFaults, reportPlaces } from './places.js';
|
|
54
|
+
export { ACTION_COLUMN, ACTION_ROW, type ActionArrangement, type ActionMeasure, ActionPlacement, type ActionRun, BUTTON_VARIANTS, actionBoxStyles, assignSlot, compChoice, giveVariant, whenChosen, } from './actions.js';
|
|
55
|
+
export { GROUP_AVAILABILITY, GROUP_ITEM, GROUP_ITEM_PROPERTIES, GROUP_PLACE, type GroupItem, GroupItemController, type GroupPlace, HOST_VARIANT, groupItemReset, groupItemStyles, type PlacingGroup, type VariantHost, } from './group-item.js';
|
|
56
|
+
export { DESTINATION_UPDATE, type Destination, type DestinationContext, DestinationsController, type DestinationsHost, NavigationDestination, type TanreiLabelVisibility, type TanreiNavigationChangeDetail, badgeDescription, destinationStyles, notifyDestinationUpdate, } from './destination.js';
|
|
57
|
+
export { type ConventionReader, KEYBOARD_CONVENTION, type KeyboardConvention, SHORTCUT_UPDATE, ambientConvention, chordsConverter, chordsOf, parseChords, platformConvention, unwatchConvention, watchConvention, } from './keyboard-convention.js';
|
|
58
|
+
export { type IndicatorDragOptions, IndicatorDragController, type IndicatorPlace, type IndicatorStop, indicatorChoice, indicatorPlace } from './indicator-drag.js';
|
|
59
|
+
export { type SharedChoice, keepInPlace, remember, remembered, sharedChoice } from './shared-choice.js';
|