@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,328 @@
|
|
|
1
|
+
import { css, unsafeCSS } from 'lit';
|
|
2
|
+
import { DISABLED, focusRing, groupItemStyles, iconGlyph, minimumTarget, pressHold, rippleStyles, stateRules, styledAsAnchorToo } from '../../primitives/index.js';
|
|
3
|
+
import { productText } from '../../styles/product-text.js';
|
|
4
|
+
import { cornerRadius, shape } from '../../styles/shape.js';
|
|
5
|
+
// Every visual value is a token. For each state the component reads that state's tokens — it never
|
|
6
|
+
// computes how a state looks. Whether hover is a state-layer mix, an explicit color, a dim, or
|
|
7
|
+
// nothing at all is decided by the active design system's values.
|
|
8
|
+
/** The values every design system has. A layer may add more; those get their styles on demand. */
|
|
9
|
+
export const CORE_VARIANTS = ['filled', 'tonal', 'elevated', 'outlined', 'text'];
|
|
10
|
+
export const CORE_SIZES = ['small', 'medium', 'large'];
|
|
11
|
+
const DEFAULT_VARIANT = 'filled';
|
|
12
|
+
const DEFAULT_SIZE = 'medium';
|
|
13
|
+
/**
|
|
14
|
+
* BTN-12: the widths of an icon-only Button. A closed set: `default` is the height, `wide` a width of its size, and
|
|
15
|
+
* `narrow` no width of its own: the glyph's box and an inset of its size on each side.
|
|
16
|
+
*/
|
|
17
|
+
export const WIDTHS = ['default', 'narrow', 'wide'];
|
|
18
|
+
const STATES = { '': '', hovered: '-h', focused: '-f', pressed: '-p', disabled: '-d' };
|
|
19
|
+
const PARTS = { c: 'container-color', l: 'label-color', i: 'icon-color', o: 'outline-color' };
|
|
20
|
+
/**
|
|
21
|
+
* The three looks of each variant (BTN-15): a plain button reads the variant's own parts, a toggle that is
|
|
22
|
+
* off its `unselected.` parts, a toggle that is on its `selected.` parts. Elevation is the variant's in every look.
|
|
23
|
+
*/
|
|
24
|
+
const LOOKS = { plain: '', unselected: 'unselected-', selected: 'selected-' };
|
|
25
|
+
/** The members of the size axis (tokens/comp/button.tokens.json, `dev.tanrei.axes`). */
|
|
26
|
+
const SIZE_MEMBERS = {
|
|
27
|
+
height: 'container-height',
|
|
28
|
+
'pad-start': 'container-padding-inline-start',
|
|
29
|
+
'pad-start-icon': 'container-padding-inline-start-with-icon',
|
|
30
|
+
'pad-end-icon': 'container-padding-inline-end-with-icon',
|
|
31
|
+
'pad-end': 'container-padding-inline-end',
|
|
32
|
+
'pad-block': 'container-padding-block',
|
|
33
|
+
'pad-narrow': 'container-padding-inline-narrow',
|
|
34
|
+
'width-wide': 'container-width-wide',
|
|
35
|
+
font: 'label-typescale',
|
|
36
|
+
icon: 'icon-size',
|
|
37
|
+
'icon-alone': 'icon-size-without-label',
|
|
38
|
+
gap: 'container-gap',
|
|
39
|
+
'outline-width': 'outline-width',
|
|
40
|
+
};
|
|
41
|
+
const PREFIX = '--tanrei-comp-button';
|
|
42
|
+
// A value the core does not have may be missing from the active design system: fall back to the default's token.
|
|
43
|
+
const ref = (name, key, fallback) => (fallback ? `var(${name(key)}, var(${name(fallback)}))` : `var(${name(key)})`);
|
|
44
|
+
// Per variant, every look's parts in every state, as private custom properties (`--_selected-c-h` = the selected look's
|
|
45
|
+
// container, hovered), and the elevation (`--_e-h`). The token of a state and a look is `<variant>-<state>-<look>-<part>`.
|
|
46
|
+
const variantBlock = (variant, selector, fallback = null) => `${selector} {\n${Object.entries(STATES)
|
|
47
|
+
.flatMap(([state, suffix]) => [
|
|
48
|
+
...Object.entries(LOOKS).flatMap(([look, prefix]) => Object.entries(PARTS).map(([key, part]) => ` --_${look}-${key}${suffix}: ${ref((v) => `${PREFIX}-${v}-${state ? `${state}-` : ''}${prefix}${part}`, variant, fallback)};`)),
|
|
49
|
+
` --_e${suffix}: ${ref((v) => `${PREFIX}-${v}-${state ? `${state}-` : ''}container-elevation`, variant, fallback)};`,
|
|
50
|
+
])
|
|
51
|
+
.join('\n')}\n}`;
|
|
52
|
+
/**
|
|
53
|
+
* Which look the container paints (BTN-15). It follows what assistive technology is told: `aria-pressed` is present only
|
|
54
|
+
* on a toggle (BTN-14), and "true" only when it is selected — so the look and the announced state cannot disagree.
|
|
55
|
+
*/
|
|
56
|
+
const lookBlock = (look, selector) => `${selector} {\n${Object.entries(STATES)
|
|
57
|
+
.flatMap(([, suffix]) => Object.keys(PARTS).map((key) => ` --_${key}${suffix}: var(--_${look}-${key}${suffix});`))
|
|
58
|
+
.join('\n')}\n}`;
|
|
59
|
+
const sizeBlock = (size, selector, fallback = null) => `${selector} {\n${Object.entries(SIZE_MEMBERS)
|
|
60
|
+
.flatMap(([key, member]) => member === 'label-typescale'
|
|
61
|
+
? [` --_font: ${ref((v) => `${PREFIX}-${member}-${v}-font`, size, fallback)};`, ` --_tracking: ${ref((v) => `${PREFIX}-${member}-${v}-letter-spacing`, size, fallback)};`]
|
|
62
|
+
: [` --_${key}: ${ref((v) => `${PREFIX}-${member}-${v}`, size, fallback)};`])
|
|
63
|
+
.join('\n')}\n}`;
|
|
64
|
+
/**
|
|
65
|
+
* The open axes (BTN-7): a size or variant a layer added gets its block on demand, built by the same functions
|
|
66
|
+
* as the core blocks and falling back to the default's tokens; a value the active system lacks is reported in debug builds.
|
|
67
|
+
*/
|
|
68
|
+
export const AXES = [
|
|
69
|
+
{ name: 'size', core: CORE_SIZES, default: DEFAULT_SIZE, rules: (value, selector) => sizeBlock(value, selector, DEFAULT_SIZE), probe: (value) => `${PREFIX}-container-height-${value}` },
|
|
70
|
+
{ name: 'variant', core: CORE_VARIANTS, default: DEFAULT_VARIANT, rules: (value, selector) => variantBlock(value, selector, DEFAULT_VARIANT), probe: (value) => `${PREFIX}-${value}-container-color` },
|
|
71
|
+
];
|
|
72
|
+
/**
|
|
73
|
+
* Everything a state paints except its container color. The border is an inset ring so it never changes the box size.
|
|
74
|
+
* An icon beside a label takes the label's color; an icon alone takes the icon color (BTN-13). The state's shadows —
|
|
75
|
+
* the outline's ring, then the elevation — are named (`--_shadow`) before they are drawn: joined to a neighbour in a
|
|
76
|
+
* connected group the container leaves them to its `::after`, which is cut at the seam (`--_own-shadow`,
|
|
77
|
+
* src/primitives/group-item.ts); anywhere else `--_own-shadow` is not set and the container draws them itself.
|
|
78
|
+
*/
|
|
79
|
+
const paintContent = (suffix) => `
|
|
80
|
+
color: var(--_l${suffix});
|
|
81
|
+
--_glyph-color: var(--_i${suffix});
|
|
82
|
+
--_shadow: inset 0 0 0 var(--_outline-width) var(--_o${suffix}), var(--_e${suffix});
|
|
83
|
+
box-shadow: var(--_own-shadow, var(--_shadow));`;
|
|
84
|
+
const paint = (suffix) => `
|
|
85
|
+
background: var(--_c${suffix});${paintContent(suffix)}`;
|
|
86
|
+
// The pieces every control shares (src/primitives): the state rules and their precedence, the ripple, the focus
|
|
87
|
+
// indicator (ring or glow), the minimum target and the carrier of press-hold, plus the one corner rule
|
|
88
|
+
// (styles/shape.ts). Each takes this component's selectors and custom properties; nothing here is special.
|
|
89
|
+
// BTN-25: a disabled link is an anchor, which has no :disabled of its own (DISABLED names both forms' condition).
|
|
90
|
+
const on = (state) => `button${state === ':disabled' ? DISABLED : state}`;
|
|
91
|
+
const buttonStyles = css `
|
|
92
|
+
:host {
|
|
93
|
+
display: inline-flex;
|
|
94
|
+
vertical-align: middle;
|
|
95
|
+
}
|
|
96
|
+
${unsafeCSS(sizeBlock(DEFAULT_SIZE, ':host'))}
|
|
97
|
+
${unsafeCSS(CORE_SIZES.filter((size) => size !== DEFAULT_SIZE).map((size) => sizeBlock(size, `:host([size='${size}'])`)).join('\n'))}
|
|
98
|
+
${unsafeCSS(variantBlock(DEFAULT_VARIANT, ':host'))}
|
|
99
|
+
${unsafeCSS(CORE_VARIANTS.filter((v) => v !== DEFAULT_VARIANT).map((v) => variantBlock(v, `:host([variant='${v}'])`)).join('\n'))}
|
|
100
|
+
/* DLG-20: without a variant attribute, the variant a dialog gives its action (src/primitives/group-item.ts). */
|
|
101
|
+
${unsafeCSS(CORE_VARIANTS.filter((v) => v !== DEFAULT_VARIANT).map((v) => variantBlock(v, `:host(:not([variant])) button[data-host-variant='${v}']`)).join('\n'))}
|
|
102
|
+
${unsafeCSS(lookBlock('plain', 'button'))}
|
|
103
|
+
${unsafeCSS(lookBlock('unselected', 'button[aria-pressed]'))}
|
|
104
|
+
${unsafeCSS(lookBlock('selected', "button[aria-pressed='true']"))}
|
|
105
|
+
|
|
106
|
+
button {
|
|
107
|
+
all: unset;
|
|
108
|
+
box-sizing: border-box;
|
|
109
|
+
position: relative;
|
|
110
|
+
/* Its own stacking context, so the ripple can sit above the container color and below the label. */
|
|
111
|
+
isolation: isolate;
|
|
112
|
+
display: inline-flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
gap: var(--_gap);
|
|
116
|
+
/* BTN-11: the padding of each side, which an icon on that side tightens (below). BTN-10: what a connected group adds
|
|
117
|
+
to a side — the padding at a rounded outer end (src/primitives/group-item.ts) — is --_add-*; outside a connected
|
|
118
|
+
group it is nothing. */
|
|
119
|
+
--_pad-inline-start: var(--_pad-start);
|
|
120
|
+
--_pad-inline-end: var(--_pad-end);
|
|
121
|
+
--_add-start: 0px;
|
|
122
|
+
--_add-end: 0px;
|
|
123
|
+
--_add-top: 0px;
|
|
124
|
+
--_add-bottom: 0px;
|
|
125
|
+
min-block-size: calc(max(var(--_height), var(--_min-height)) + var(--_add-top) + var(--_add-bottom));
|
|
126
|
+
padding-block: calc(var(--_pad-block) + var(--_add-top)) calc(var(--_pad-block) + var(--_add-bottom));
|
|
127
|
+
padding-inline: calc(var(--_pad-inline-start) + var(--_add-start)) calc(var(--_pad-inline-end) + var(--_add-end));
|
|
128
|
+
/* BGR-3: in a connected column an item is at least the target high; anywhere else there is no such minimum. */
|
|
129
|
+
--_min-height: 0px;
|
|
130
|
+
${unsafeCSS(cornerRadius('--tanrei-comp-button-container-shape'))}
|
|
131
|
+
${unsafeCSS(paint(''))}
|
|
132
|
+
font: var(--_font);
|
|
133
|
+
letter-spacing: var(--_tracking);
|
|
134
|
+
white-space: nowrap;
|
|
135
|
+
-webkit-user-select: none;
|
|
136
|
+
user-select: none;
|
|
137
|
+
cursor: pointer;
|
|
138
|
+
-webkit-tap-highlight-color: transparent;
|
|
139
|
+
transition-property: background-color, color, box-shadow, opacity, border-radius;
|
|
140
|
+
transition-duration: var(--tanrei-comp-button-motion-state-duration);
|
|
141
|
+
transition-timing-function: var(--tanrei-comp-button-motion-state-easing);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* BTN-11: the padding on the icon's side is its own token (a step tighter in the default system). */
|
|
145
|
+
button.with-icon {
|
|
146
|
+
--_pad-inline-start: var(--_pad-start-icon);
|
|
147
|
+
}
|
|
148
|
+
/* BTN-11: a trailing icon follows the label in the reading direction, with the mirrored padding on its side. */
|
|
149
|
+
button.with-trailing-icon {
|
|
150
|
+
--_pad-inline-end: var(--_pad-end-icon);
|
|
151
|
+
}
|
|
152
|
+
button.with-trailing-icon .icon {
|
|
153
|
+
order: 1;
|
|
154
|
+
}
|
|
155
|
+
/* BTN-12: an icon alone makes the button as wide as its width names — as wide as it is high by default, so corner.full
|
|
156
|
+
draws a circle; its glyph's box (icon.size-without-label) and container.padding-inline-narrow on each side of it
|
|
157
|
+
while narrow, or container.width-wide while wide, each of its size, which corner.full draws as a capsule (the
|
|
158
|
+
browser caps a radius at half the shorter side) — the glyph centred. The narrow width is the glyph and that inset
|
|
159
|
+
twice and nothing more: the button has no narrow width of its own, so it follows its glyph wherever a design system
|
|
160
|
+
re-sizes it, and the container, its state layer, its ripple and its outline are a capsule of that width (28 / 32 /
|
|
161
|
+
32 in the default system, whose inset is 4 at every size). The width is set, not padded: the inset is a term of
|
|
162
|
+
the width and the container's own inline padding stays 0, so the glyph is centred at every width. Each term is a
|
|
163
|
+
rem token, so the container grows with the root text size and keeps its proportion. BTN-21: the width is read here
|
|
164
|
+
alone, so a labelled Button ignores it, and the hit area still reaches the target (minimumTarget, below). A
|
|
165
|
+
connected group may widen it to the target (BGR-3) and adds its padding at an outer end (BGR-23): the glyph is then
|
|
166
|
+
centred in what is left. */
|
|
167
|
+
:host {
|
|
168
|
+
--_width: var(--_height);
|
|
169
|
+
}
|
|
170
|
+
:host([width='narrow']) {
|
|
171
|
+
--_width: calc(var(--_icon-alone) + 2 * var(--_pad-narrow));
|
|
172
|
+
}
|
|
173
|
+
:host([width='wide']) {
|
|
174
|
+
--_width: var(--_width-wide);
|
|
175
|
+
}
|
|
176
|
+
button.icon-only {
|
|
177
|
+
--_pad-inline-start: 0px;
|
|
178
|
+
--_pad-inline-end: 0px;
|
|
179
|
+
inline-size: calc(var(--_width) + var(--_add-start) + var(--_add-end));
|
|
180
|
+
min-inline-size: calc(var(--_width) + var(--_add-start) + var(--_add-end));
|
|
181
|
+
}
|
|
182
|
+
button.icon-only .label,
|
|
183
|
+
button:not(.has-icon) .icon {
|
|
184
|
+
display: none;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* BTN-5: the hit area meets the minimum target without changing the visual size. */
|
|
188
|
+
${minimumTarget('button')}
|
|
189
|
+
|
|
190
|
+
/* BTN-3, BTN-6, BTN-8, BTN-9: each state paints from that state's tokens; pressed > focused > hovered, disabled over all.
|
|
191
|
+
Pressed is data-pressed="<feedback>" (PressController): overlay paints the pressed tokens on the whole container;
|
|
192
|
+
ripple and dim paint everything else from them while the container color stays with the state under the press
|
|
193
|
+
(ripple adds the pressed color as a layer, dim adds none); none paints nothing. */
|
|
194
|
+
${stateRules(on, {
|
|
195
|
+
hovered: `${paint('-h')}
|
|
196
|
+
opacity: var(--tanrei-comp-button-hovered-opacity);${cornerRadius('--tanrei-comp-button-hovered-container-shape')}`,
|
|
197
|
+
focused: `${paint('-f')}
|
|
198
|
+
opacity: var(--tanrei-comp-button-focused-opacity);${cornerRadius('--tanrei-comp-button-focused-container-shape')}`,
|
|
199
|
+
pressed: `${paint('-p')}
|
|
200
|
+
opacity: var(--tanrei-comp-button-pressed-opacity);${cornerRadius('--tanrei-comp-button-pressed-container-shape')}`,
|
|
201
|
+
pressedContent: `${paintContent('-p')}
|
|
202
|
+
opacity: var(--tanrei-comp-button-pressed-opacity);${cornerRadius('--tanrei-comp-button-pressed-container-shape')}`,
|
|
203
|
+
disabled: `
|
|
204
|
+
cursor: default;${paint('-d')}
|
|
205
|
+
opacity: var(--tanrei-comp-button-disabled-opacity);${cornerRadius('--tanrei-comp-button-disabled-container-shape')}`,
|
|
206
|
+
})}
|
|
207
|
+
|
|
208
|
+
/* BTN-9 ripple: grows over comp.button.motion.feedback-duration and fades over motion.state-duration, both with
|
|
209
|
+
motion.state-easing, inside the outline. */
|
|
210
|
+
${rippleStyles({
|
|
211
|
+
color: '--_c-p',
|
|
212
|
+
inset: '--_outline-width',
|
|
213
|
+
grow: '--tanrei-comp-button-motion-feedback-duration',
|
|
214
|
+
fade: '--tanrei-comp-button-motion-state-duration',
|
|
215
|
+
easing: '--tanrei-comp-button-motion-state-easing',
|
|
216
|
+
})}
|
|
217
|
+
|
|
218
|
+
/* BTN-4 and BTN-10 focus-style: the ring (or the glow), never animated. */
|
|
219
|
+
${focusRing(on)}
|
|
220
|
+
|
|
221
|
+
/* BTN-10, corner smoothing: the shared rule, on the container (data-tanrei-shape) and, by inheritance, its ring. */
|
|
222
|
+
${shape}
|
|
223
|
+
|
|
224
|
+
/* BTN-10, BGR-2…4: in a button group, the corners, width and hit area the group sets (src/primitives/group-item.ts). */
|
|
225
|
+
${groupItemStyles({ on: 'button', rippleInset: '--_outline-width' })}
|
|
226
|
+
/* BGR-7: a group narrows its Buttons to fit its row, down to their longest word: the label wraps, centred. */
|
|
227
|
+
button.joined {
|
|
228
|
+
white-space: normal;
|
|
229
|
+
text-align: center;
|
|
230
|
+
}
|
|
231
|
+
/* BGR-3: joined along a column, an item is at least the target high, its content centred. */
|
|
232
|
+
button.connected {
|
|
233
|
+
--_min-height: var(--tanrei-group-min-height, 0px);
|
|
234
|
+
}
|
|
235
|
+
/* BGR-12, BGR-17: an item fills the width its group gives it — a column's, a full-width share — its content centred;
|
|
236
|
+
narrower than its content, its label wraps (down to its longest word). An icon-only item fills it around its
|
|
237
|
+
centred glyph, and is never narrower than its own width (or the group's minimum, BGR-3). */
|
|
238
|
+
button.stretch {
|
|
239
|
+
flex: 1 1 auto;
|
|
240
|
+
}
|
|
241
|
+
button.icon-only.stretch {
|
|
242
|
+
inline-size: auto;
|
|
243
|
+
}
|
|
244
|
+
button.icon-only.connected {
|
|
245
|
+
min-inline-size: calc(max(var(--_width), var(--tanrei-group-min-width, 0px)) + var(--_add-start) + var(--_add-end));
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/* BTN-8: the label carries press-hold for PressController. */
|
|
249
|
+
${pressHold('.label')}
|
|
250
|
+
|
|
251
|
+
/* BTN-20: the label is text of its own direction — its first strong character's — isolated from what is around it, and
|
|
252
|
+
still placed by the layout direction (the flex row) and centred where it wraps (BGR-7). */
|
|
253
|
+
${productText('.label')}
|
|
254
|
+
|
|
255
|
+
/* BTN-13: the icon, drawn with the system's icon set — the family and fill of its selection (selected only on a toggle
|
|
256
|
+
that is on: aria-pressed="true"), sys.icon.weight, and the optical size of its box — at icon.size beside a label and
|
|
257
|
+
icon.size-without-label alone. BTN-19: iconGlyph() mirrors the slotted glyph GlyphMirrorController marked, in
|
|
258
|
+
right-to-left, in its own box. */
|
|
259
|
+
button {
|
|
260
|
+
--_glyph: var(--_icon);
|
|
261
|
+
}
|
|
262
|
+
button.icon-only {
|
|
263
|
+
--_glyph: var(--_icon-alone);
|
|
264
|
+
}
|
|
265
|
+
button.icon-only .icon {
|
|
266
|
+
color: var(--_glyph-color);
|
|
267
|
+
}
|
|
268
|
+
${iconGlyph('.icon', {
|
|
269
|
+
size: '--_glyph',
|
|
270
|
+
selected: "button[aria-pressed='true']",
|
|
271
|
+
duration: '--tanrei-comp-button-motion-state-duration',
|
|
272
|
+
easing: '--tanrei-comp-button-motion-state-easing',
|
|
273
|
+
})}
|
|
274
|
+
.icon {
|
|
275
|
+
display: inline-flex;
|
|
276
|
+
align-items: center;
|
|
277
|
+
justify-content: center;
|
|
278
|
+
}
|
|
279
|
+
/* A .tanrei-icon (icons.css) sizes its glyph from the box; an image or an SVG fills it. */
|
|
280
|
+
::slotted([slot='icon']) {
|
|
281
|
+
inline-size: var(--_glyph);
|
|
282
|
+
block-size: var(--_glyph);
|
|
283
|
+
flex: none;
|
|
284
|
+
}
|
|
285
|
+
::slotted(svg[slot='icon']),
|
|
286
|
+
::slotted(img[slot='icon']) {
|
|
287
|
+
display: block;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/* BTN-8: an icon-only button's press-hold is carried by the icon slot (the icon box already transitions its fill). */
|
|
291
|
+
${pressHold('slot[name="icon"]')}
|
|
292
|
+
|
|
293
|
+
/* BTN-24: the mark of a link that opens a new context — the icon set's open_in_new, drawn as BTN-11 draws a trailing
|
|
294
|
+
icon: after the label (the row's gap from it), at icon.size, in the label color of the look and state (inherited),
|
|
295
|
+
with the trailing icon's padding at the end edge. iconGlyph() mirrors it in right-to-left: the icon set marks its
|
|
296
|
+
name, and GlyphMirrorController marks the box. */
|
|
297
|
+
button.with-mark {
|
|
298
|
+
--_pad-inline-end: var(--_pad-end-icon);
|
|
299
|
+
}
|
|
300
|
+
${iconGlyph('.mark', {
|
|
301
|
+
size: '--_icon',
|
|
302
|
+
selected: "button[aria-pressed='true']",
|
|
303
|
+
duration: '--tanrei-comp-button-motion-state-duration',
|
|
304
|
+
easing: '--tanrei-comp-button-motion-state-easing',
|
|
305
|
+
})}
|
|
306
|
+
|
|
307
|
+
@media (prefers-reduced-motion: reduce) {
|
|
308
|
+
button {
|
|
309
|
+
transition: none;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
@media (forced-colors: active) {
|
|
313
|
+
button {
|
|
314
|
+
border: var(--_outline-width) solid ButtonText;
|
|
315
|
+
}
|
|
316
|
+
button${unsafeCSS(DISABLED)} {
|
|
317
|
+
border-color: GrayText;
|
|
318
|
+
color: GrayText;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
`;
|
|
322
|
+
/**
|
|
323
|
+
* BTN-22: with a destination the container is an anchor, and it is the same styled part: every rule above that names
|
|
324
|
+
* the native `button` names the anchor too, at the same weight (src/primitives/link.ts). Rules are written for
|
|
325
|
+
* `button` alone, here and in what a button group adds (groupItemStyles); the link form follows them.
|
|
326
|
+
*/
|
|
327
|
+
export const styles = styledAsAnchorToo(buttonStyles, 'button');
|
|
328
|
+
//# sourceMappingURL=button.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.styles.js","sourceRoot":"","sources":["../../../src/components/button/button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAiB,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAClL,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE5D,mGAAmG;AACnG,+FAA+F;AAC/F,kEAAkE;AAClE,kGAAkG;AAClG,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,CAAU,CAAC;AAC1F,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;AAChE,MAAM,eAAe,GAAG,QAAQ,CAAC;AACjC,MAAM,YAAY,GAAG,QAAQ,CAAC;AAC9B;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,IAAI,CAAC;0DACyB,YAAY,CAAC,+CAA+C,CAAC,EAAE;CACtH,CAAC;;;;IAIA,YAAY,CAAC;IACb,KAAK,EAAE,QAAQ;IACf,KAAK,EAAE,kBAAkB;IACzB,IAAI,EAAE,+CAA+C;IACrD,IAAI,EAAE,4CAA4C;IAClD,MAAM,EAAE,0CAA0C;CACnD,CAAC;;;IAGA,SAAS,CAAC,EAAE,CAAC;;;IAGb,KAAK;;;IAGL,eAAe,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;IAwBlE,SAAS,CAAC,QAAQ,CAAC;;;;IAInB,WAAW,CAAC,QAAQ,CAAC;;;;;;;;;;;;;;;IAerB,SAAS,CAAC,OAAO,EAAE;IACnB,IAAI,EAAE,UAAU;IAChB,QAAQ,EAAE,6BAA6B;IACvC,QAAQ,EAAE,4CAA4C;IACtD,MAAM,EAAE,0CAA0C;CACnD,CAAC;;;;;;;;;;;;;;;;;;IAkBA,SAAS,CAAC,mBAAmB,CAAC;;;;;;;;;IAS9B,SAAS,CAAC,OAAO,EAAE;IACnB,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,6BAA6B;IACvC,QAAQ,EAAE,4CAA4C;IACtD,MAAM,EAAE,0CAA0C;CACnD,CAAC;;;;;;;;;;;YAWQ,SAAS,CAAC,QAAQ,CAAC;;;;;CAK9B,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,iBAAiB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { LitElement, type PropertyDeclarations, type PropertyValues } from 'lit';
|
|
2
|
+
import { GROUP_PLACE, type GroupPlace, type PlacingGroup, type SeparationProp } from '../../primitives/index.js';
|
|
3
|
+
/** How the buttons are laid out: spaced apart, or joined into one shape. A closed set (the two differ in structure). */
|
|
4
|
+
export type TanreiButtonGroupVariant = 'standard' | 'connected';
|
|
5
|
+
/** One row, or one column. */
|
|
6
|
+
export type TanreiButtonGroupOrientation = 'horizontal' | 'vertical';
|
|
7
|
+
/** How a connected group is joined: `auto` takes the design system's answer, `divider` and `gap` say it for this group. */
|
|
8
|
+
export type TanreiButtonGroupSeparation = SeparationProp;
|
|
9
|
+
/**
|
|
10
|
+
* Lays out a few related Buttons in one row or one column, spaced apart or joined into one shape, places the confirming
|
|
11
|
+
* and the dismissive ones by the orientation, and names them as a group.
|
|
12
|
+
*
|
|
13
|
+
* Contract: specs/button-group.spec.json. Every value it reads is a `--tanrei-comp-button-group-*` token: the gap of each
|
|
14
|
+
* variant, the connected corners, the divider and the padding at a joined row's outer ends. Its items are
|
|
15
|
+
* `<tanrei-button>` children, labelled or icon-only, each drawn from its own tokens, with its own states, events,
|
|
16
|
+
* semantics and Tab stop (BGR-5). The group takes no focus, handles no key and keeps no selection; a toggle Button in it
|
|
17
|
+
* stays independent. It draws nothing of its own but the dividers of a connected group.
|
|
18
|
+
*
|
|
19
|
+
* Order (BGR-13, BGR-14): a child with the `confirming` attribute (OK, Save, Next, Delete) is placed at the end of a row
|
|
20
|
+
* and at the top of a column; one with `dismissive` (Cancel, Back) at the start of a row and at the bottom of a column;
|
|
21
|
+
* the others between them, each run in the order given. The children are not moved in your DOM: each is assigned to a
|
|
22
|
+
* slot of its own, in the placed order, so focus and assistive technology follow that order (BGR-15).
|
|
23
|
+
*
|
|
24
|
+
* In a connected group the items are joined as `separation` names (BGR-21): under `divider` they touch, with square
|
|
25
|
+
* corners where they meet, and no item draws its outline or its elevation's ring along a seam; a seam carries a line
|
|
26
|
+
* only while the two items it joins rest on the same fill (BGR-24) — between a selected toggle and an unselected one the
|
|
27
|
+
* edge of the fill already marks it — in `connected.divider.color`, or `connected.divider.on-fill.color` between two
|
|
28
|
+
* emphasis fills (filled Buttons, selected toggles);
|
|
29
|
+
* under `gap` they stand `connected.gap` apart with `connected.inner-shape` corners. `auto` — the default — takes
|
|
30
|
+
* `comp.button-group.connected.separation`, which follows the design system's `sys.behavior.separation`. The group
|
|
31
|
+
* gives its items their corners, minimum size, seams and outer padding through custom properties the items read
|
|
32
|
+
* (`--tanrei-group-*`): an internal contract between Tanrei elements, not a styling API.
|
|
33
|
+
*
|
|
34
|
+
* @tag tanrei-button-group
|
|
35
|
+
* @slot - The items: `<tanrei-button>` elements, with `confirming` or `dismissive` on the ones the group should place. Anything else is still laid out, and reported in debug builds (BGR-10).
|
|
36
|
+
* @csspart divider - The line on a seam of a connected group under `divider` (decoration: not exposed, takes no press). A seam between two items that rest on different fills carries none (BGR-24).
|
|
37
|
+
*/
|
|
38
|
+
export declare class TanreiButtonGroup extends LitElement implements PlacingGroup {
|
|
39
|
+
private readonly availability;
|
|
40
|
+
static styles: import("lit").CSSResult;
|
|
41
|
+
static shadowRootOptions: ShadowRootInit;
|
|
42
|
+
static properties: PropertyDeclarations;
|
|
43
|
+
/**
|
|
44
|
+
* `standard` spaces the buttons apart; `connected` joins them into one shape with rounded outer ends, by a divider or
|
|
45
|
+
* by a narrow gap (`separation`), for a closely related set (Bold, Italic, Underline; Previous, Today, Next).
|
|
46
|
+
* Anything else is drawn as `standard` (reported in debug builds, BGR-9).
|
|
47
|
+
*/
|
|
48
|
+
variant: TanreiButtonGroupVariant;
|
|
49
|
+
/**
|
|
50
|
+
* `horizontal` lays the buttons out in one row; `vertical` stacks them in one column, every button as wide as the
|
|
51
|
+
* column. The confirming and dismissive buttons change places with it (BGR-13, BGR-14). Anything else is drawn as
|
|
52
|
+
* `horizontal` (reported in debug builds, BGR-9).
|
|
53
|
+
*/
|
|
54
|
+
orientation: TanreiButtonGroupOrientation;
|
|
55
|
+
/**
|
|
56
|
+
* How a connected group is joined. `divider`: the buttons touch, and a line is drawn on each seam. `gap`: they stand a
|
|
57
|
+
* narrow gap apart, with tighter corners where they face each other. `auto` takes
|
|
58
|
+
* `comp.button-group.connected.separation`, the design system's answer (divider in the default system). Ignored
|
|
59
|
+
* while `variant` is `standard`. Anything else is `auto` (reported in debug builds, BGR-9).
|
|
60
|
+
*/
|
|
61
|
+
separation: TanreiButtonGroupSeparation;
|
|
62
|
+
/**
|
|
63
|
+
* The group fills its container's width and its buttons share it equally (in a column, each is the container's
|
|
64
|
+
* width): the `full-width` attribute. For the actions at the foot of a dialog, a picker or a side sheet.
|
|
65
|
+
*/
|
|
66
|
+
fullWidth: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* The group's accessible name ("Text style"). When it is set the group is a `role="group"` named by it; when it is
|
|
69
|
+
* empty the group adds nothing to the accessibility tree, only its items (BGR-6).
|
|
70
|
+
*/
|
|
71
|
+
label: string;
|
|
72
|
+
/** The children in the placed order (BGR-13, BGR-14): one slot each. */
|
|
73
|
+
protected placed: Element[];
|
|
74
|
+
/** BGR-13, BGR-14, BGR-18: the children by run, as a dialog's and a side sheet's actions are read (src/primitives/actions.ts). */
|
|
75
|
+
private readonly placement;
|
|
76
|
+
/** BGR-21: where a browser has no style queries, the separation is read when the group renders — again when the system is switched. */
|
|
77
|
+
private readonly system;
|
|
78
|
+
/**
|
|
79
|
+
* BGR-11: a child that comes or goes, or whose `confirming` or `dismissive` changes, is placed again at once. BGR-24:
|
|
80
|
+
* one whose `selected`, `toggle` or `variant` changes has the lines beside it drawn again at once — in the same
|
|
81
|
+
* frame: the observer runs before the next one is drawn.
|
|
82
|
+
*/
|
|
83
|
+
private readonly children$;
|
|
84
|
+
private fit;
|
|
85
|
+
/** The variant it draws: an unknown one is standard (BGR-9). */
|
|
86
|
+
private get drawn();
|
|
87
|
+
/** Whether it is a column: an unknown orientation is horizontal (BGR-9). */
|
|
88
|
+
private get vertical();
|
|
89
|
+
/** @internal Where the group places one of its children (src/primitives/group-item.ts); null for anything else. */
|
|
90
|
+
[GROUP_PLACE](child: Element): GroupPlace | null;
|
|
91
|
+
/** BGR-13, BGR-14: the three runs in the order of the orientation, each in the order its items were given. */
|
|
92
|
+
private order;
|
|
93
|
+
connectedCallback(): void;
|
|
94
|
+
disconnectedCallback(): void;
|
|
95
|
+
/** BGR-11: the children are read into their runs and placed again — when they change, and when the orientation does. */
|
|
96
|
+
private read;
|
|
97
|
+
/** BGR-1…4, BGR-11: every item is told its place at once. */
|
|
98
|
+
private place;
|
|
99
|
+
/**
|
|
100
|
+
* BGR-24: the fill an item rests on, and whether it is an emphasis fill. The color is the one the Button renders its
|
|
101
|
+
* container from at rest — `comp.button.<variant>.container.color`, and for a toggle the selected or the unselected
|
|
102
|
+
* part of its variant (BTN-15) — read from the cascade where the item stands and resolved by the probe, so that two
|
|
103
|
+
* tokens of one color in the active scheme are the same fill and a container that draws no fill is `none`. It is the
|
|
104
|
+
* resting color whatever state the item is in, and the enabled one while it is disabled: hover, focus, press and
|
|
105
|
+
* disabling move no line. Anything that is not a Button has no fill the group knows.
|
|
106
|
+
*/
|
|
107
|
+
private restingFill;
|
|
108
|
+
/**
|
|
109
|
+
* BGR-22, BGR-24: what each seam carries. A line only while the two items it joins rest on the same fill; in the
|
|
110
|
+
* on-fill color while both rest on an emphasis fill. Written on the dividers at once (no render, no animation).
|
|
111
|
+
*/
|
|
112
|
+
private drawSeams;
|
|
113
|
+
/** BGR-10: fewer than two items, or content that is not a Tanrei Button, still renders and is reported. */
|
|
114
|
+
private checkContent;
|
|
115
|
+
private checkFit;
|
|
116
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
117
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
118
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
119
|
+
}
|
|
120
|
+
declare global {
|
|
121
|
+
interface HTMLElementTagNameMap {
|
|
122
|
+
'tanrei-button-group': TanreiButtonGroup;
|
|
123
|
+
}
|
|
124
|
+
}
|