@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,287 @@
|
|
|
1
|
+
import { LitElement, html, nothing } from 'lit';
|
|
2
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
3
|
+
import { ACTION_COLUMN, ACTION_ROW, ActionPlacement, AvailabilityController, GROUP_ITEM, GROUP_PLACE, SEPARATION_VALUES, SystemWatchController, assignSlot, hostAria, report, syncSeparation, } from '../../primitives/index.js';
|
|
4
|
+
import { styles } from './button-group.styles.js';
|
|
5
|
+
const VARIANTS = ['standard', 'connected'];
|
|
6
|
+
const ORIENTATIONS = ['horizontal', 'vertical'];
|
|
7
|
+
/** The elements a group places (BGR-10): the Tanrei Button. */
|
|
8
|
+
const ITEMS = ['tanrei-button'];
|
|
9
|
+
const sameOrder = (a, b) => a.length === b.length && a.every((element, i) => element === b[i]);
|
|
10
|
+
/** BGR-24: what of an item decides the fill it rests on — the attributes a Button reflects them to. */
|
|
11
|
+
const LOOK_ATTRIBUTES = ['variant', 'toggle', 'selected'];
|
|
12
|
+
/** BGR-24: the variants whose selected toggle rests on an emphasis fill (a text toggle has no fill, selected or not). */
|
|
13
|
+
const EMPHASIS_WHEN_SELECTED = ['filled', 'tonal', 'elevated', 'outlined'];
|
|
14
|
+
/** A Button's default variant: what one without the attribute draws, and what a variant the system lacks falls back to. */
|
|
15
|
+
const DEFAULT_ITEM_VARIANT = 'filled';
|
|
16
|
+
/** A container without a fill: two of them rest on the same (BGR-24). */
|
|
17
|
+
const NO_FILL = 'none';
|
|
18
|
+
/** Whether a computed color draws nothing: its alpha is zero (`rgba(…, 0)`, or `… / 0)` in the other notations). */
|
|
19
|
+
const clear = (color) => /^rgba\(.*,\s*0(\.0+)?\s*\)$/.test(color) || /\/\s*0(\.0+)?%?\s*\)$/.test(color);
|
|
20
|
+
/**
|
|
21
|
+
* Lays out a few related Buttons in one row or one column, spaced apart or joined into one shape, places the confirming
|
|
22
|
+
* and the dismissive ones by the orientation, and names them as a group.
|
|
23
|
+
*
|
|
24
|
+
* Contract: specs/button-group.spec.json. Every value it reads is a `--tanrei-comp-button-group-*` token: the gap of each
|
|
25
|
+
* variant, the connected corners, the divider and the padding at a joined row's outer ends. Its items are
|
|
26
|
+
* `<tanrei-button>` children, labelled or icon-only, each drawn from its own tokens, with its own states, events,
|
|
27
|
+
* semantics and Tab stop (BGR-5). The group takes no focus, handles no key and keeps no selection; a toggle Button in it
|
|
28
|
+
* stays independent. It draws nothing of its own but the dividers of a connected group.
|
|
29
|
+
*
|
|
30
|
+
* Order (BGR-13, BGR-14): a child with the `confirming` attribute (OK, Save, Next, Delete) is placed at the end of a row
|
|
31
|
+
* 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;
|
|
32
|
+
* the others between them, each run in the order given. The children are not moved in your DOM: each is assigned to a
|
|
33
|
+
* slot of its own, in the placed order, so focus and assistive technology follow that order (BGR-15).
|
|
34
|
+
*
|
|
35
|
+
* In a connected group the items are joined as `separation` names (BGR-21): under `divider` they touch, with square
|
|
36
|
+
* corners where they meet, and no item draws its outline or its elevation's ring along a seam; a seam carries a line
|
|
37
|
+
* only while the two items it joins rest on the same fill (BGR-24) — between a selected toggle and an unselected one the
|
|
38
|
+
* edge of the fill already marks it — in `connected.divider.color`, or `connected.divider.on-fill.color` between two
|
|
39
|
+
* emphasis fills (filled Buttons, selected toggles);
|
|
40
|
+
* under `gap` they stand `connected.gap` apart with `connected.inner-shape` corners. `auto` — the default — takes
|
|
41
|
+
* `comp.button-group.connected.separation`, which follows the design system's `sys.behavior.separation`. The group
|
|
42
|
+
* gives its items their corners, minimum size, seams and outer padding through custom properties the items read
|
|
43
|
+
* (`--tanrei-group-*`): an internal contract between Tanrei elements, not a styling API.
|
|
44
|
+
*
|
|
45
|
+
* @tag tanrei-button-group
|
|
46
|
+
* @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).
|
|
47
|
+
* @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).
|
|
48
|
+
*/
|
|
49
|
+
export class TanreiButtonGroup extends LitElement {
|
|
50
|
+
constructor() {
|
|
51
|
+
super(...arguments);
|
|
52
|
+
this.availability = new AvailabilityController(this, 'button-group');
|
|
53
|
+
/**
|
|
54
|
+
* `standard` spaces the buttons apart; `connected` joins them into one shape with rounded outer ends, by a divider or
|
|
55
|
+
* by a narrow gap (`separation`), for a closely related set (Bold, Italic, Underline; Previous, Today, Next).
|
|
56
|
+
* Anything else is drawn as `standard` (reported in debug builds, BGR-9).
|
|
57
|
+
*/
|
|
58
|
+
this.variant = 'standard';
|
|
59
|
+
/**
|
|
60
|
+
* `horizontal` lays the buttons out in one row; `vertical` stacks them in one column, every button as wide as the
|
|
61
|
+
* column. The confirming and dismissive buttons change places with it (BGR-13, BGR-14). Anything else is drawn as
|
|
62
|
+
* `horizontal` (reported in debug builds, BGR-9).
|
|
63
|
+
*/
|
|
64
|
+
this.orientation = 'horizontal';
|
|
65
|
+
/**
|
|
66
|
+
* How a connected group is joined. `divider`: the buttons touch, and a line is drawn on each seam. `gap`: they stand a
|
|
67
|
+
* narrow gap apart, with tighter corners where they face each other. `auto` takes
|
|
68
|
+
* `comp.button-group.connected.separation`, the design system's answer (divider in the default system). Ignored
|
|
69
|
+
* while `variant` is `standard`. Anything else is `auto` (reported in debug builds, BGR-9).
|
|
70
|
+
*/
|
|
71
|
+
this.separation = 'auto';
|
|
72
|
+
/**
|
|
73
|
+
* The group fills its container's width and its buttons share it equally (in a column, each is the container's
|
|
74
|
+
* width): the `full-width` attribute. For the actions at the foot of a dialog, a picker or a side sheet.
|
|
75
|
+
*/
|
|
76
|
+
this.fullWidth = false;
|
|
77
|
+
/**
|
|
78
|
+
* The group's accessible name ("Text style"). When it is set the group is a `role="group"` named by it; when it is
|
|
79
|
+
* empty the group adds nothing to the accessibility tree, only its items (BGR-6).
|
|
80
|
+
*/
|
|
81
|
+
this.label = '';
|
|
82
|
+
/** The children in the placed order (BGR-13, BGR-14): one slot each. */
|
|
83
|
+
this.placed = [];
|
|
84
|
+
/** 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). */
|
|
85
|
+
this.placement = new ActionPlacement(this);
|
|
86
|
+
/** BGR-21: where a browser has no style queries, the separation is read when the group renders — again when the system is switched. */
|
|
87
|
+
this.system = new SystemWatchController(this);
|
|
88
|
+
/**
|
|
89
|
+
* BGR-11: a child that comes or goes, or whose `confirming` or `dismissive` changes, is placed again at once. BGR-24:
|
|
90
|
+
* one whose `selected`, `toggle` or `variant` changes has the lines beside it drawn again at once — in the same
|
|
91
|
+
* frame: the observer runs before the next one is drawn.
|
|
92
|
+
*/
|
|
93
|
+
this.children$ = new MutationObserver((records) => {
|
|
94
|
+
const own = records.filter((record) => record.target === this || (record.type === 'attributes' && record.target.parentElement === this));
|
|
95
|
+
if (own.some((record) => record.type !== 'attributes' || !LOOK_ATTRIBUTES.includes(record.attributeName ?? '')))
|
|
96
|
+
this.read();
|
|
97
|
+
else if (own.length)
|
|
98
|
+
this.drawSeams();
|
|
99
|
+
});
|
|
100
|
+
this.fit = null;
|
|
101
|
+
}
|
|
102
|
+
static { this.styles = styles; }
|
|
103
|
+
// The items are assigned by hand, each to a slot of its own in the placed order (BGR-15), with the dividers between
|
|
104
|
+
// the slots (BGR-22).
|
|
105
|
+
static { this.shadowRootOptions = { ...LitElement.shadowRootOptions, slotAssignment: 'manual' }; }
|
|
106
|
+
static { this.properties = {
|
|
107
|
+
variant: { type: String, reflect: true },
|
|
108
|
+
orientation: { type: String, reflect: true },
|
|
109
|
+
separation: { type: String, reflect: true },
|
|
110
|
+
fullWidth: { type: Boolean, reflect: true, attribute: 'full-width' },
|
|
111
|
+
label: { type: String },
|
|
112
|
+
placed: { state: true },
|
|
113
|
+
}; }
|
|
114
|
+
/** The variant it draws: an unknown one is standard (BGR-9). */
|
|
115
|
+
get drawn() {
|
|
116
|
+
return VARIANTS.includes(this.variant) ? this.variant : 'standard';
|
|
117
|
+
}
|
|
118
|
+
/** Whether it is a column: an unknown orientation is horizontal (BGR-9). */
|
|
119
|
+
get vertical() {
|
|
120
|
+
return this.orientation === 'vertical';
|
|
121
|
+
}
|
|
122
|
+
/** @internal Where the group places one of its children (src/primitives/group-item.ts); null for anything else. */
|
|
123
|
+
[GROUP_PLACE](child) {
|
|
124
|
+
if (child.parentElement !== this)
|
|
125
|
+
return null;
|
|
126
|
+
const order = this.order();
|
|
127
|
+
return {
|
|
128
|
+
variant: this.drawn,
|
|
129
|
+
first: child === order[0],
|
|
130
|
+
last: child === order[order.length - 1],
|
|
131
|
+
axis: this.vertical ? 'block' : 'inline',
|
|
132
|
+
stretch: this.vertical || this.fullWidth,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
/** BGR-13, BGR-14: the three runs in the order of the orientation, each in the order its items were given. */
|
|
136
|
+
order() {
|
|
137
|
+
return (this.vertical ? ACTION_COLUMN : ACTION_ROW).flatMap((run) => this.placement.runs[run]);
|
|
138
|
+
}
|
|
139
|
+
connectedCallback() {
|
|
140
|
+
super.connectedCallback();
|
|
141
|
+
this.children$.observe(this, { childList: true, subtree: true, attributes: true, attributeFilter: ['confirming', 'dismissive', ...LOOK_ATTRIBUTES] });
|
|
142
|
+
// A group put back in the page — or upgraded after its items — reads them and tells them where they are again.
|
|
143
|
+
this.read();
|
|
144
|
+
// BGR-7, BGR-17: a row that does not fit, or cannot be shared equally, is reported in debug builds.
|
|
145
|
+
this.fit ??= new ResizeObserver(() => this.checkFit());
|
|
146
|
+
this.fit.observe(this);
|
|
147
|
+
}
|
|
148
|
+
disconnectedCallback() {
|
|
149
|
+
super.disconnectedCallback();
|
|
150
|
+
this.children$.disconnect();
|
|
151
|
+
this.fit?.disconnect();
|
|
152
|
+
}
|
|
153
|
+
/** BGR-11: the children are read into their runs and placed again — when they change, and when the orientation does. */
|
|
154
|
+
read() {
|
|
155
|
+
this.placement.read([...this.children]);
|
|
156
|
+
const order = this.order();
|
|
157
|
+
if (!sameOrder(order, this.placed))
|
|
158
|
+
this.placed = order;
|
|
159
|
+
this.place();
|
|
160
|
+
this.checkContent();
|
|
161
|
+
requestAnimationFrame(() => this.checkFit());
|
|
162
|
+
}
|
|
163
|
+
/** BGR-1…4, BGR-11: every item is told its place at once. */
|
|
164
|
+
place() {
|
|
165
|
+
for (const child of this.children)
|
|
166
|
+
child[GROUP_ITEM]?.set(this[GROUP_PLACE](child));
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* BGR-24: the fill an item rests on, and whether it is an emphasis fill. The color is the one the Button renders its
|
|
170
|
+
* container from at rest — `comp.button.<variant>.container.color`, and for a toggle the selected or the unselected
|
|
171
|
+
* part of its variant (BTN-15) — read from the cascade where the item stands and resolved by the probe, so that two
|
|
172
|
+
* tokens of one color in the active scheme are the same fill and a container that draws no fill is `none`. It is the
|
|
173
|
+
* resting color whatever state the item is in, and the enabled one while it is disabled: hover, focus, press and
|
|
174
|
+
* disabling move no line. Anything that is not a Button has no fill the group knows.
|
|
175
|
+
*/
|
|
176
|
+
restingFill(item, probe) {
|
|
177
|
+
if (!ITEMS.includes(item.localName))
|
|
178
|
+
return { fill: NO_FILL, emphasis: false };
|
|
179
|
+
// The element's own properties once it is defined; its attributes until then (the Button reflects all three).
|
|
180
|
+
const own = item;
|
|
181
|
+
const variant = own.variant ?? item.getAttribute('variant') ?? DEFAULT_ITEM_VARIANT;
|
|
182
|
+
const toggle = own.toggle ?? item.hasAttribute('toggle');
|
|
183
|
+
const selected = toggle && (own.selected ?? item.hasAttribute('selected'));
|
|
184
|
+
const style = getComputedStyle(item);
|
|
185
|
+
const look = toggle ? (selected ? 'selected-' : 'unselected-') : '';
|
|
186
|
+
const token = (name) => style.getPropertyValue(`--tanrei-comp-button-${name}-${look}container-color`).trim();
|
|
187
|
+
// A variant the active system does not have is drawn from the default's tokens (BTN-7).
|
|
188
|
+
const value = token(variant) || token(DEFAULT_ITEM_VARIANT);
|
|
189
|
+
probe.style.color = '';
|
|
190
|
+
probe.style.color = value;
|
|
191
|
+
const color = value && probe.style.color ? getComputedStyle(probe).color : '';
|
|
192
|
+
const emphasis = toggle ? selected && EMPHASIS_WHEN_SELECTED.includes(variant) : variant === DEFAULT_ITEM_VARIANT;
|
|
193
|
+
return { fill: !color || clear(color) ? NO_FILL : color, emphasis };
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* BGR-22, BGR-24: what each seam carries. A line only while the two items it joins rest on the same fill; in the
|
|
197
|
+
* on-fill color while both rest on an emphasis fill. Written on the dividers at once (no render, no animation).
|
|
198
|
+
*/
|
|
199
|
+
drawSeams() {
|
|
200
|
+
const probe = this.renderRoot?.querySelector('.probe');
|
|
201
|
+
const dividers = this.renderRoot?.querySelectorAll('.divider');
|
|
202
|
+
if (!probe || !dividers?.length)
|
|
203
|
+
return;
|
|
204
|
+
const rests = this.placed.map((item) => this.restingFill(item, probe));
|
|
205
|
+
dividers.forEach((divider, i) => {
|
|
206
|
+
const [before, after] = [rests[i], rests[i + 1]];
|
|
207
|
+
const line = !before || !after || before.fill !== after.fill ? 'none' : before.emphasis && after.emphasis ? 'on-fill' : 'line';
|
|
208
|
+
if (divider.dataset.line !== line)
|
|
209
|
+
divider.dataset.line = line;
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
/** BGR-10: fewer than two items, or content that is not a Tanrei Button, still renders and is reported. */
|
|
213
|
+
checkContent() {
|
|
214
|
+
const children = [...this.children];
|
|
215
|
+
const foreign = children.filter((child) => !ITEMS.includes(child.localName));
|
|
216
|
+
if (children.length < 2)
|
|
217
|
+
report(this, 'BGR-10', `it holds ${children.length} item${children.length === 1 ? '' : 's'}; a button group holds two or more`);
|
|
218
|
+
for (const child of foreign) {
|
|
219
|
+
report(this, 'BGR-10', `it holds <${child.localName}>, which is not a <tanrei-button>; it is laid out, but the group cannot set its corners or width`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
checkFit() {
|
|
223
|
+
if (this.vertical || !this.isConnected)
|
|
224
|
+
return;
|
|
225
|
+
// The items' visible bounds, not the scroll width, which also counts the hit areas they extend past the row's ends.
|
|
226
|
+
const boxes = [...this.children].map((child) => child.getBoundingClientRect()).filter((box) => box.width > 0);
|
|
227
|
+
if (!boxes.length)
|
|
228
|
+
return;
|
|
229
|
+
const needed = Math.round(Math.max(...boxes.map((box) => box.right)) - Math.min(...boxes.map((box) => box.left)));
|
|
230
|
+
const has = Math.round(this.getBoundingClientRect().width);
|
|
231
|
+
if (needed > has)
|
|
232
|
+
report(this, 'BGR-7', `the row needs ${needed} px but has ${has} px, even with its Buttons as narrow as their longest word; it overflows its end`);
|
|
233
|
+
// BGR-17: an item that cannot be as narrow as its share keeps its minimum, and the others share the rest.
|
|
234
|
+
else if (this.fullWidth && boxes.some((box) => Math.abs(box.width - boxes[0].width) > 0.5)) {
|
|
235
|
+
report(this, 'BGR-17', 'the row cannot be shared equally: an item is wider than its share even at its minimum width, so it keeps that width and the others share the rest');
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
willUpdate(changed) {
|
|
239
|
+
// BGR-13, BGR-14: the runs change places with the orientation.
|
|
240
|
+
if (changed.has('orientation')) {
|
|
241
|
+
const order = this.order();
|
|
242
|
+
if (!sameOrder(order, this.placed))
|
|
243
|
+
this.placed = order;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
updated(changed) {
|
|
247
|
+
// BGR-6: a named group only when it has a label; otherwise no element of its own in the accessibility tree.
|
|
248
|
+
hostAria(this, { role: this.label ? 'group' : null, 'aria-label': this.label || null });
|
|
249
|
+
// BGR-15: each child in the slot of its place, so the flat tree — what focus and assistive technology walk — is the
|
|
250
|
+
// placed order. A child that stays in its slot is not assigned again.
|
|
251
|
+
this.renderRoot.querySelectorAll('slot').forEach((slot, i) => assignSlot(slot, this.placed[i] ? [this.placed[i]] : []));
|
|
252
|
+
// BGR-9: an unknown value is drawn as the default (the styles match the defined values alone) and reported.
|
|
253
|
+
if (changed.has('variant') && !VARIANTS.includes(this.variant))
|
|
254
|
+
report(this, 'BGR-9', `variant "${this.variant}" is not a value of the button group; it is drawn as "standard"`);
|
|
255
|
+
if (changed.has('orientation') && !ORIENTATIONS.includes(this.orientation)) {
|
|
256
|
+
report(this, 'BGR-9', `orientation "${this.orientation}" is not a value of the button group; it is drawn as "horizontal"`);
|
|
257
|
+
}
|
|
258
|
+
if (changed.has('separation') && !SEPARATION_VALUES.includes(this.separation)) {
|
|
259
|
+
report(this, 'BGR-9', `separation "${this.separation}" is not a value of the button group; it is drawn as "auto"`);
|
|
260
|
+
}
|
|
261
|
+
this.place();
|
|
262
|
+
// BGR-24: the lines follow the items as they are placed now, and the colors the cascade gives now (a system or a
|
|
263
|
+
// scheme switched on the root renders the group again: SystemWatchController).
|
|
264
|
+
this.drawSeams();
|
|
265
|
+
// BGR-21: without style queries, the name the cascade gives now is written for the styles to match.
|
|
266
|
+
syncSeparation(this, this.renderRoot.querySelector('.row'));
|
|
267
|
+
if (changed.has('orientation') || changed.has('fullWidth'))
|
|
268
|
+
requestAnimationFrame(() => this.checkFit());
|
|
269
|
+
}
|
|
270
|
+
render() {
|
|
271
|
+
// BGR-22: under a divider a connected group draws one line on each seam — an element between two items' slots that
|
|
272
|
+
// takes no space, no press and no place in the accessibility tree. Under a gap the styles draw none. BGR-24: which
|
|
273
|
+
// seams carry it, and in which of the two colors, is written on each divider as data-line (drawSeams); the probe
|
|
274
|
+
// is where a resting color is resolved, and is never drawn.
|
|
275
|
+
const divided = this.drawn === 'connected';
|
|
276
|
+
const last = this.placed.length - 1;
|
|
277
|
+
return html `
|
|
278
|
+
<div class="row">
|
|
279
|
+
${this.placed.map((_, i) => html `${i > 0 && divided ? html `<span part="divider" class="divider" aria-hidden="true"></span>` : nothing}<slot class=${classMap({ first: i === 0, last: i === last })}></slot>`)}
|
|
280
|
+
</div>
|
|
281
|
+
${divided ? html `<span class="probe" aria-hidden="true"></span>` : nothing}
|
|
282
|
+
`;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
if (!customElements.get('tanrei-button-group'))
|
|
286
|
+
customElements.define('tanrei-button-group', TanreiButtonGroup);
|
|
287
|
+
//# sourceMappingURL=button-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-group.js","sourceRoot":"","sources":["../../../src/components/button-group/button-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAkD,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChG,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EACL,aAAa,EACb,UAAU,EACV,eAAe,EACf,sBAAsB,EACtB,UAAU,EACV,WAAW,EAIX,iBAAiB,EAEjB,qBAAqB,EACrB,UAAU,EACV,QAAQ,EACR,MAAM,EACN,cAAc,GACf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AASlD,MAAM,QAAQ,GAAwC,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;AAChF,MAAM,YAAY,GAA4C,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;AACzF,+DAA+D;AAC/D,MAAM,KAAK,GAAG,CAAC,eAAe,CAAC,CAAC;AAEhC,MAAM,SAAS,GAAG,CAAC,CAAqB,EAAE,CAAqB,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,E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C,KAAK,KAAK,WAAW,CAAC;QAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QACpC,OAAO,IAAI,CAAA;;UAEL,IAAI,CAAC,MAAM,CAAC,GAAG,CACf,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAA,GAAG,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,IAAI,CAAA,iEAAiE,CAAC,CAAC,CAAC,OAAO,eAAe,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,UAAU,CAC3L;;QAED,OAAO,CAAC,CAAC,CAAC,IAAI,CAAA,gDAAgD,CAAC,CAAC,CAAC,OAAO;KAC3E,CAAC;IACJ,CAAC;CACF;AAED,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,qBAAqB,CAAC;IAAE,cAAc,CAAC,MAAM,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { css, unsafeCSS } from 'lit';
|
|
2
|
+
import { groupItemReset, separationHost, whenGap } from '../../primitives/index.js';
|
|
3
|
+
const PREFIX = '--tanrei-comp-button-group';
|
|
4
|
+
const T = (name) => `var(${PREFIX}-${name})`;
|
|
5
|
+
const CONNECTED = ":host([variant='connected'])";
|
|
6
|
+
/** A connected row: horizontal is the default, and what an unknown orientation draws (BGR-9). */
|
|
7
|
+
const ROW = ":host([variant='connected']:not([orientation='vertical']))";
|
|
8
|
+
const COLUMN = ":host([variant='connected'][orientation='vertical'])";
|
|
9
|
+
// BGR-21: the gap form of a connected group, in a row and in a column — the items connected.gap apart, nothing drawn
|
|
10
|
+
// between them, connected.inner-shape where they face each other, and no seam: each item draws its outline and its
|
|
11
|
+
// ring inside its own edge again. `row` is the group's row (the element the separation is asked on).
|
|
12
|
+
const gapForm = (row) => `
|
|
13
|
+
${CONNECTED} ${row} {
|
|
14
|
+
gap: ${T('connected-gap')};
|
|
15
|
+
}
|
|
16
|
+
${CONNECTED} ${row} .divider {
|
|
17
|
+
display: none;
|
|
18
|
+
}
|
|
19
|
+
${ROW} ${row} slot:not(.first)::slotted(*) {
|
|
20
|
+
--tanrei-group-start-radius: ${T('connected-inner-shape')};
|
|
21
|
+
--tanrei-group-seam-start: initial;
|
|
22
|
+
}
|
|
23
|
+
${ROW} ${row} slot:not(.last)::slotted(*) {
|
|
24
|
+
--tanrei-group-end-radius: ${T('connected-inner-shape')};
|
|
25
|
+
--tanrei-group-seam-end: initial;
|
|
26
|
+
}
|
|
27
|
+
${COLUMN} ${row} slot:not(.first)::slotted(*) {
|
|
28
|
+
--tanrei-group-top-radius: ${T('connected-inner-shape')};
|
|
29
|
+
--tanrei-group-seam-top: initial;
|
|
30
|
+
}
|
|
31
|
+
${COLUMN} ${row} slot:not(.last)::slotted(*) {
|
|
32
|
+
--tanrei-group-bottom-radius: ${T('connected-inner-shape')};
|
|
33
|
+
--tanrei-group-seam-bottom: initial;
|
|
34
|
+
}`;
|
|
35
|
+
// Every value is a token (tokens/comp/button-group.tokens.json): the gap of each variant, the connected corners, the
|
|
36
|
+
// divider and the padding at a joined row's outer ends. The group draws nothing of its own but the dividers — no fill,
|
|
37
|
+
// no state — and its items keep their own tokens (BGR-5).
|
|
38
|
+
export const styles = css `
|
|
39
|
+
/* BGR-1, BGR-7: at the group's natural width and never wider than its container; it never wraps or scrolls. */
|
|
40
|
+
:host {
|
|
41
|
+
display: inline-flex;
|
|
42
|
+
vertical-align: middle;
|
|
43
|
+
max-inline-size: 100%;
|
|
44
|
+
/* BGR-3: joined items cannot extend a hit area over each other, so each is at least the target along the join. */
|
|
45
|
+
--_join-target: var(--tanrei-sys-target-pointer);
|
|
46
|
+
}
|
|
47
|
+
@media (pointer: coarse) {
|
|
48
|
+
:host {
|
|
49
|
+
--_join-target: var(--tanrei-sys-target-touch);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
:host([hidden]) {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
/* BGR-17: the whole width its container gives it. */
|
|
56
|
+
:host([full-width]) {
|
|
57
|
+
display: flex;
|
|
58
|
+
inline-size: 100%;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* BGR-21: the separation this group draws — its attribute's, else comp.button-group.connected.separation's. */
|
|
62
|
+
${separationHost(`${PREFIX}-connected-separation`)}
|
|
63
|
+
|
|
64
|
+
/* BGR-1, BGR-8, BGR-13: one row, in the placed order (from the right in right-to-left, the flex row's inline
|
|
65
|
+
direction), each item at its own size, centred on the row's middle and standard.gap apart. */
|
|
66
|
+
.row {
|
|
67
|
+
display: flex;
|
|
68
|
+
flex: 1 1 auto;
|
|
69
|
+
flex-wrap: nowrap;
|
|
70
|
+
align-items: center;
|
|
71
|
+
gap: ${unsafeCSS(T('standard-gap'))};
|
|
72
|
+
min-inline-size: 0;
|
|
73
|
+
}
|
|
74
|
+
/* BGR-12, BGR-14: one column, top to bottom in the placed order in either layout direction, every item as wide as the
|
|
75
|
+
column: the widest item's width, or the container's while full-width. */
|
|
76
|
+
:host([orientation='vertical']) .row {
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
align-items: stretch;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* BGR-7: a row that does not fit narrows its Buttons in proportion to their widths (each shrinks by its share of its
|
|
82
|
+
own width), down to their longest word — their labels wrap (src/primitives/group-item.ts) — and keeps its icon-only
|
|
83
|
+
Buttons at their size (their own minimum width). A standard group sets no corner, no size, no seam and no padding
|
|
84
|
+
(BGR-2): nothing reaches its items from a group around it either. */
|
|
85
|
+
::slotted(*) {
|
|
86
|
+
flex: 0 1 auto;
|
|
87
|
+
${unsafeCSS(groupItemReset)}
|
|
88
|
+
}
|
|
89
|
+
/* BGR-17: equal shares of the row, one per item, whatever each holds; an item that cannot be as narrow as its share
|
|
90
|
+
keeps its minimum (its longest word, an icon-only Button's width) and the others share the rest. The item's
|
|
91
|
+
container fills its share (the item is a flex box whose one child grows: src/primitives/group-item.ts, \`stretch\`),
|
|
92
|
+
its content centred. */
|
|
93
|
+
:host([full-width]) ::slotted(*) {
|
|
94
|
+
display: flex;
|
|
95
|
+
flex: 1 1 0;
|
|
96
|
+
}
|
|
97
|
+
/* BGR-12: in a column every item's container is as wide as the column; a column narrower than its widest item gives
|
|
98
|
+
every item that width, and the labels wrap. */
|
|
99
|
+
:host([orientation='vertical']) ::slotted(*) {
|
|
100
|
+
display: flex;
|
|
101
|
+
flex: none;
|
|
102
|
+
}
|
|
103
|
+
/* BGR-1, BGR-21: connected — joined. This is the divider form (the first value of the choice, and so what an unknown
|
|
104
|
+
name draws): the items touch, and every item is stretched to the tallest. */
|
|
105
|
+
${unsafeCSS(CONNECTED)} .row {
|
|
106
|
+
align-items: stretch;
|
|
107
|
+
gap: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* BGR-2, BGR-3, BGR-11, BGR-22, BGR-23: a connected row. The first item's start corners and the last one's end corners
|
|
111
|
+
take connected.horizontal.outer-shape (held to half the item's height by the item), and each of those two items the
|
|
112
|
+
padding connected.horizontal.outer-inset on that side; every corner that faces a neighbour is square, and the edge
|
|
113
|
+
there is a seam, along which the item draws no outline and no ring; every item is at least the target wide. By the
|
|
114
|
+
slot's place, so an item that comes, goes or moves changes its neighbours at once. Logical sides, so right-to-left
|
|
115
|
+
mirrors them (BGR-8). A single item keeps every corner as it draws it and gets no padding (BGR-10). */
|
|
116
|
+
${unsafeCSS(ROW)} ::slotted(*) {
|
|
117
|
+
--tanrei-group-min-width: var(--_join-target);
|
|
118
|
+
--tanrei-group-pill: 0;
|
|
119
|
+
}
|
|
120
|
+
${unsafeCSS(ROW)} slot:not(.first)::slotted(*) {
|
|
121
|
+
--tanrei-group-start-radius: 0px;
|
|
122
|
+
--tanrei-group-seam-start: 1;
|
|
123
|
+
}
|
|
124
|
+
${unsafeCSS(ROW)} slot:not(.last)::slotted(*) {
|
|
125
|
+
--tanrei-group-end-radius: 0px;
|
|
126
|
+
--tanrei-group-seam-end: 1;
|
|
127
|
+
}
|
|
128
|
+
${unsafeCSS(ROW)} slot.first:not(.last)::slotted(*) {
|
|
129
|
+
--tanrei-group-start-radius: ${unsafeCSS(T('connected-horizontal-outer-shape'))};
|
|
130
|
+
--tanrei-group-pill: var(${unsafeCSS(PREFIX)}-connected-horizontal-outer-shape-pill, 0);
|
|
131
|
+
--tanrei-group-outer-start: ${unsafeCSS(T('connected-horizontal-outer-inset'))};
|
|
132
|
+
}
|
|
133
|
+
${unsafeCSS(ROW)} slot.last:not(.first)::slotted(*) {
|
|
134
|
+
--tanrei-group-end-radius: ${unsafeCSS(T('connected-horizontal-outer-shape'))};
|
|
135
|
+
--tanrei-group-pill: var(${unsafeCSS(PREFIX)}-connected-horizontal-outer-shape-pill, 0);
|
|
136
|
+
--tanrei-group-outer-end: ${unsafeCSS(T('connected-horizontal-outer-inset'))};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/* BGR-3, BGR-16: a connected column. The first item's top corners and the last one's bottom corners take
|
|
140
|
+
connected.vertical.outer-shape; every other corner is square, and the edge between two items is a seam; every item
|
|
141
|
+
is at least the target high. No padding is added: a column's ends are not full (BGR-23). */
|
|
142
|
+
${unsafeCSS(COLUMN)} ::slotted(*) {
|
|
143
|
+
--tanrei-group-min-height: var(--_join-target);
|
|
144
|
+
--tanrei-group-pill: 0;
|
|
145
|
+
}
|
|
146
|
+
${unsafeCSS(COLUMN)} slot:not(.first)::slotted(*) {
|
|
147
|
+
--tanrei-group-top-radius: 0px;
|
|
148
|
+
--tanrei-group-seam-top: 1;
|
|
149
|
+
}
|
|
150
|
+
${unsafeCSS(COLUMN)} slot:not(.last)::slotted(*) {
|
|
151
|
+
--tanrei-group-bottom-radius: 0px;
|
|
152
|
+
--tanrei-group-seam-bottom: 1;
|
|
153
|
+
}
|
|
154
|
+
${unsafeCSS(COLUMN)} slot.first:not(.last)::slotted(*) {
|
|
155
|
+
--tanrei-group-top-radius: ${unsafeCSS(T('connected-vertical-outer-shape'))};
|
|
156
|
+
--tanrei-group-pill: var(${unsafeCSS(PREFIX)}-connected-vertical-outer-shape-pill, 0);
|
|
157
|
+
}
|
|
158
|
+
${unsafeCSS(COLUMN)} slot.last:not(.first)::slotted(*) {
|
|
159
|
+
--tanrei-group-bottom-radius: ${unsafeCSS(T('connected-vertical-outer-shape'))};
|
|
160
|
+
--tanrei-group-pill: var(${unsafeCSS(PREFIX)}-connected-vertical-outer-shape-pill, 0);
|
|
161
|
+
}
|
|
162
|
+
/* BGR-10: a single item keeps every corner, and its smoothing, as it draws them. */
|
|
163
|
+
${unsafeCSS(CONNECTED)} slot.first.last::slotted(*) {
|
|
164
|
+
--tanrei-group-pill: initial;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* BGR-22: the divider — one line on each seam, connected.divider.thickness thick in connected.divider.color, centred
|
|
168
|
+
on the seam, over the items' fills and state layers, stopping connected.divider.inset short of each end. It takes
|
|
169
|
+
no space (an empty box between two items), no press and no semantics, and keeps its color whatever the states of
|
|
170
|
+
the items beside it. In a row it runs top to bottom; in a column from start to end. */
|
|
171
|
+
.divider {
|
|
172
|
+
position: relative;
|
|
173
|
+
z-index: 1;
|
|
174
|
+
flex: none;
|
|
175
|
+
align-self: stretch;
|
|
176
|
+
inline-size: 0;
|
|
177
|
+
pointer-events: none;
|
|
178
|
+
}
|
|
179
|
+
.divider::before {
|
|
180
|
+
content: '';
|
|
181
|
+
position: absolute;
|
|
182
|
+
inset-block: ${unsafeCSS(T('connected-divider-inset'))};
|
|
183
|
+
inset-inline-start: calc(${unsafeCSS(T('connected-divider-thickness'))} / -2);
|
|
184
|
+
inline-size: ${unsafeCSS(T('connected-divider-thickness'))};
|
|
185
|
+
background: ${unsafeCSS(T('connected-divider-color'))};
|
|
186
|
+
}
|
|
187
|
+
/* BGR-24: a seam carries the line only while its two items rest on the same fill (the element writes data-line): none
|
|
188
|
+
where the fills differ, and between two emphasis fills — filled Buttons, selected toggles — the line a strong fill
|
|
189
|
+
can show, connected.divider.on-fill.color. Neither follows a state. */
|
|
190
|
+
.divider[data-line='none']::before {
|
|
191
|
+
display: none;
|
|
192
|
+
}
|
|
193
|
+
.divider[data-line='on-fill']::before {
|
|
194
|
+
background: ${unsafeCSS(T('connected-divider-on-fill-color'))};
|
|
195
|
+
}
|
|
196
|
+
/* BGR-24: where a resting color is resolved; never drawn. */
|
|
197
|
+
.probe {
|
|
198
|
+
display: none;
|
|
199
|
+
}
|
|
200
|
+
:host([orientation='vertical']) .divider {
|
|
201
|
+
inline-size: auto;
|
|
202
|
+
block-size: 0;
|
|
203
|
+
}
|
|
204
|
+
:host([orientation='vertical']) .divider::before {
|
|
205
|
+
inset-block: calc(${unsafeCSS(T('connected-divider-thickness'))} / -2) auto;
|
|
206
|
+
inset-inline: ${unsafeCSS(T('connected-divider-inset'))};
|
|
207
|
+
inline-size: auto;
|
|
208
|
+
block-size: ${unsafeCSS(T('connected-divider-thickness'))};
|
|
209
|
+
}
|
|
210
|
+
/* BGR-21: the gap form, where the group's separation is gap. */
|
|
211
|
+
${whenGap('.row', gapForm)}
|
|
212
|
+
|
|
213
|
+
@media (forced-colors: active) {
|
|
214
|
+
.divider::before,
|
|
215
|
+
.divider[data-line='on-fill']::before {
|
|
216
|
+
background: ButtonText;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
`;
|
|
220
|
+
//# sourceMappingURL=button-group.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-group.styles.js","sourceRoot":"","sources":["../../../src/components/button-group/button-group.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,OAAO,EAAE,M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