@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,333 @@
|
|
|
1
|
+
import { LitElement, html, nothing } from 'lit';
|
|
2
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
3
|
+
import { AvailabilityController, GROUP_ITEM, GROUP_PLACE, GlyphDrawnController, GlyphMirrorController, OpenAxesController, glyphName, report, } from '../../primitives/index.js';
|
|
4
|
+
import { ALIGNMENTS, AXES, styles } from './empty-state.styles.js';
|
|
5
|
+
/** Text as it is read: one run, its white space collapsed. */
|
|
6
|
+
const spoken = (text) => (text ?? '').replace(/\s+/gu, ' ').trim();
|
|
7
|
+
/**
|
|
8
|
+
* EMP-6, EMP-11: what an action is told through the Button's internal channel (src/primitives/group-item.ts) — the one
|
|
9
|
+
* thing a button group's standard item has that a Button alone has not: its label may wrap when its line gives it less
|
|
10
|
+
* than one line needs. First and last, so its hit area reaches as far as it would alone.
|
|
11
|
+
*/
|
|
12
|
+
const ACTION_PLACE = { variant: 'standard', first: true, last: true };
|
|
13
|
+
/**
|
|
14
|
+
* What stands in the place of content that is not there — a search with no results, a list nobody has added to, a page
|
|
15
|
+
* before its first item: what is missing, why or what to do, and the action that does it. Quiet and flat: no fill, no
|
|
16
|
+
* edge, no elevation.
|
|
17
|
+
*
|
|
18
|
+
* Contract: specs/empty-state.spec.json. `<tanrei-empty-state headline="No projects yet">…</tanrei-empty-state>`: the
|
|
19
|
+
* description is the element's own content (text, with the product's links), the title is the `headline` attribute or
|
|
20
|
+
* the `title` slot, a glyph of the icon set or a picture of the product's own goes in the `media` slot, and the
|
|
21
|
+
* product's Buttons or links in the `actions` slot. Every visual value is a `--tanrei-comp-empty-state-*` token.
|
|
22
|
+
*
|
|
23
|
+
* It is content, read where it stands: no role, no name, no focus, no state. With `live` it is announced once, politely,
|
|
24
|
+
* when it is shown after its page was presented and when its title or description changes — for an empty place that
|
|
25
|
+
* answers what the person just did (a search, a filter). It is never an alert.
|
|
26
|
+
*
|
|
27
|
+
* Every word it draws or exposes is the product's: the element has none of its own.
|
|
28
|
+
*
|
|
29
|
+
* `title` is the `headline` property and attribute, because HTML's global `title` would show a tooltip over the block.
|
|
30
|
+
* The element neither shows nor hides itself: the product puts it there and takes it away.
|
|
31
|
+
*
|
|
32
|
+
* @tag tanrei-empty-state
|
|
33
|
+
* @slot - The description: text, with the product's own links and inline content. Empty draws the title alone.
|
|
34
|
+
* @slot media - A glyph of the system's icon set (its ligature text, in an element), drawn at the media size of the element's size; or a picture or a view of the product's own (an `<img>`, an `<svg>`, any other element), which keeps its own size and colors. Decorative: hidden from assistive technology. A glyph the icon set flags is mirrored in right-to-left; `data-mirror="auto | always | never"` on the element decides for one use.
|
|
35
|
+
* @slot title - The product's own title content in place of `headline`: a heading of the level the page's outline needs, or text with inline content. It is drawn in the title's style; its role and its level are not changed.
|
|
36
|
+
* @slot actions - The product's own Buttons or links, one or two, the main one first, laid out in a row below the text.
|
|
37
|
+
* @csspart container - The block: its paddings and its column.
|
|
38
|
+
* @csspart media - The box the glyph or the picture is drawn in (hidden from assistive technology).
|
|
39
|
+
* @csspart title - The title.
|
|
40
|
+
* @csspart description - The description.
|
|
41
|
+
* @csspart actions - The row of actions.
|
|
42
|
+
*/
|
|
43
|
+
export class TanreiEmptyState extends LitElement {
|
|
44
|
+
constructor() {
|
|
45
|
+
super(...arguments);
|
|
46
|
+
this.availability = new AvailabilityController(this, 'empty-state');
|
|
47
|
+
/** What is missing, in a few words, in the product's language ("No results for tokne"): the spec's `title`. Plain text, never a heading. The `title` slot takes its place where the product needs a heading of its own level or inline content. */
|
|
48
|
+
this.headline = '';
|
|
49
|
+
/** Medium is for an empty region inside a view (a list, a table's body, a card, a panel, a search's results); large for a view that is empty as a whole. It changes the room above and below, the glyph's size and the text styles. */
|
|
50
|
+
this.size = 'medium';
|
|
51
|
+
/** Where the parts stand on the inline axis: centred, or at the region's start edge with the text aligned there. */
|
|
52
|
+
this.align = 'center';
|
|
53
|
+
/** Whether the empty state is announced: false is content, read where it stands; true is a polite live region, announced once when it is shown after its view was presented and when its text changes. It changes nothing that is drawn. */
|
|
54
|
+
this.live = false;
|
|
55
|
+
/** Whether the media slot has content. */
|
|
56
|
+
this.hasMedia = false;
|
|
57
|
+
/** Whether what the media slot holds is a glyph's name (and not a picture or a view of the product's own). */
|
|
58
|
+
this.mediaIsGlyph = false;
|
|
59
|
+
/** Whether the title slot has content. */
|
|
60
|
+
this.hasTitle = false;
|
|
61
|
+
/** Whether the default slot has content: an element, or text that is not white space. */
|
|
62
|
+
this.hasDescription = false;
|
|
63
|
+
/** Whether the actions slot has content. */
|
|
64
|
+
this.hasActions = false;
|
|
65
|
+
/** EMP-17: sizes a design system adds, and a value the active system does not have (src/primitives/axes.ts). */
|
|
66
|
+
this.axes = new OpenAxesController(this, { component: 'empty-state', behavior: 'EMP-17', axes: AXES });
|
|
67
|
+
/**
|
|
68
|
+
* EMP-15: the glyph in the media slot is marked when the icon set mirrors its name in right-to-left, or the product's
|
|
69
|
+
* `data-mirror` says so; `iconGlyph()` draws the mark. The empty state mirrors nothing itself, and a picture holds no
|
|
70
|
+
* name, so it is never marked by the list.
|
|
71
|
+
*/
|
|
72
|
+
this.mirror = new GlyphMirrorController(this, { slots: 'slot[name="media"]' });
|
|
73
|
+
/** The glyph box carries `data-drawn` while the icon set can draw its ligature; until then it draws nothing. */
|
|
74
|
+
this.glyphs = new GlyphDrawnController(this, () => this.renderRoot?.querySelectorAll('.media.glyph') ?? []);
|
|
75
|
+
/** EMP-18: the custom state the styles read to take an empty state that says nothing out of the layout. */
|
|
76
|
+
this.internals = typeof this.attachInternals === 'function' ? this.attachInternals() : null;
|
|
77
|
+
/**
|
|
78
|
+
* EMP-9: whether this element was already in the document when it was made — written in the page's markup and
|
|
79
|
+
* upgraded — which is being drawn with the page's first presentation.
|
|
80
|
+
*/
|
|
81
|
+
this.upgraded = this.isConnected;
|
|
82
|
+
/** EMP-9: whether its first render is announced: it was added by the product after the page was presented. */
|
|
83
|
+
this.announceFirst = false;
|
|
84
|
+
/** Whether it has been drawn once: what changes after that is a change. */
|
|
85
|
+
this.presented = false;
|
|
86
|
+
this.pending = 0;
|
|
87
|
+
/** EMP-10: hears what the product changes in the element's own content — which parts there are, and (live) what they say. */
|
|
88
|
+
this.content$ = null;
|
|
89
|
+
/** EMP-9: hears the block being shown after it was not laid out (the product's `hidden`, or a hidden ancestor). */
|
|
90
|
+
this.shown$ = null;
|
|
91
|
+
/** EMP-9: whether the block was laid out when last heard of; null before the first word. */
|
|
92
|
+
this.laidOut = null;
|
|
93
|
+
/** EMP-6: the actions that were told their place. */
|
|
94
|
+
this.placed = new Set();
|
|
95
|
+
/**
|
|
96
|
+
* EMP-10: a change of the element's own content. Which parts there are is read again; while it is live, a change of
|
|
97
|
+
* the title or the description is announced (EMP-9) — what changes inside the media or an action is not one.
|
|
98
|
+
*/
|
|
99
|
+
this.onContent = (records) => {
|
|
100
|
+
this.scan();
|
|
101
|
+
if (!this.live || !this.presented)
|
|
102
|
+
return;
|
|
103
|
+
const APART = '[slot="media"], [slot="actions"]';
|
|
104
|
+
const apart = (element) => {
|
|
105
|
+
const mark = element?.closest(APART);
|
|
106
|
+
return !!mark && mark !== this && this.contains(mark);
|
|
107
|
+
};
|
|
108
|
+
const touched = (record) => {
|
|
109
|
+
if (apart(record.target instanceof Element ? record.target : record.target.parentElement))
|
|
110
|
+
return false;
|
|
111
|
+
if (record.type !== 'childList' || record.target !== this)
|
|
112
|
+
return true;
|
|
113
|
+
return [...record.addedNodes, ...record.removedNodes].some((node) => !(node instanceof Element && (node.slot === 'media' || node.slot === 'actions')));
|
|
114
|
+
};
|
|
115
|
+
if (records.some(touched))
|
|
116
|
+
this.announce();
|
|
117
|
+
};
|
|
118
|
+
/** EMP-9: shown after it was not laid out — and nothing was said since — is announced; no longer laid out, it says nothing. */
|
|
119
|
+
this.onLaidOut = (entries) => {
|
|
120
|
+
const box = entries[entries.length - 1]?.contentRect;
|
|
121
|
+
const laidOut = !!box && (box.width > 0 || box.height > 0);
|
|
122
|
+
const before = this.laidOut;
|
|
123
|
+
this.laidOut = laidOut;
|
|
124
|
+
if (before === null || before === laidOut)
|
|
125
|
+
return;
|
|
126
|
+
if (!laidOut)
|
|
127
|
+
this.silence();
|
|
128
|
+
else if (!this.pending && !this.region?.hasChildNodes())
|
|
129
|
+
this.announce();
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
static { this.styles = styles; }
|
|
133
|
+
static { this.properties = {
|
|
134
|
+
headline: { type: String },
|
|
135
|
+
size: { type: String, reflect: true },
|
|
136
|
+
align: { type: String, reflect: true },
|
|
137
|
+
live: { type: Boolean, reflect: true },
|
|
138
|
+
hasMedia: { state: true },
|
|
139
|
+
mediaIsGlyph: { state: true },
|
|
140
|
+
hasTitle: { state: true },
|
|
141
|
+
hasDescription: { state: true },
|
|
142
|
+
hasActions: { state: true },
|
|
143
|
+
}; }
|
|
144
|
+
get titled() {
|
|
145
|
+
return this.hasTitle || this.headline.trim() !== '';
|
|
146
|
+
}
|
|
147
|
+
/** EMP-18: neither a title nor a description — a glyph or actions alone do not tell a person what is missing. */
|
|
148
|
+
get empty() {
|
|
149
|
+
return !this.titled && !this.hasDescription;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* @internal What a live empty state announces (EMP-9): the title, then the description — and not the names of its
|
|
153
|
+
* actions. Two runs of the product's own words; the element adds none, and no punctuation, between them.
|
|
154
|
+
*/
|
|
155
|
+
get announcement() {
|
|
156
|
+
const title = this.hasTitle ? [...this.children].filter((child) => child.slot === 'title').map((child) => child.textContent).join(' ') : this.headline;
|
|
157
|
+
const description = [...this.childNodes]
|
|
158
|
+
.filter((node) => node.nodeType === Node.TEXT_NODE || (node instanceof Element && !node.slot))
|
|
159
|
+
.map((node) => node.textContent)
|
|
160
|
+
.join(' ');
|
|
161
|
+
return [title, description].map(spoken).filter(Boolean);
|
|
162
|
+
}
|
|
163
|
+
/** @internal EMP-6: where an action stands, for the Button that asks when it connects (src/primitives/group-item.ts); null for anything else. */
|
|
164
|
+
[GROUP_PLACE](child) {
|
|
165
|
+
return child.parentElement === this && child.slot === 'actions' ? ACTION_PLACE : null;
|
|
166
|
+
}
|
|
167
|
+
/** What the light DOM holds for each slot, read from the children: they are there before a slot says so. */
|
|
168
|
+
scan() {
|
|
169
|
+
let media = null;
|
|
170
|
+
let title = false;
|
|
171
|
+
let actions = false;
|
|
172
|
+
let description = false;
|
|
173
|
+
for (const node of this.childNodes) {
|
|
174
|
+
if (node instanceof Element) {
|
|
175
|
+
if (node.slot === 'media')
|
|
176
|
+
media ??= node;
|
|
177
|
+
else if (node.slot === 'title')
|
|
178
|
+
title ||= spoken(node.textContent) !== '' || node.childElementCount > 0;
|
|
179
|
+
else if (node.slot === 'actions')
|
|
180
|
+
actions = true;
|
|
181
|
+
else if (!node.slot)
|
|
182
|
+
description = true;
|
|
183
|
+
}
|
|
184
|
+
else if (node.nodeType === Node.TEXT_NODE && spoken(node.textContent) !== '')
|
|
185
|
+
description = true;
|
|
186
|
+
}
|
|
187
|
+
this.hasMedia = !!media;
|
|
188
|
+
// EMP-3: a glyph is given by its name; anything else is a picture or a view of the product's own.
|
|
189
|
+
this.mediaIsGlyph = !!media && glyphName(media) !== null;
|
|
190
|
+
this.hasTitle = title;
|
|
191
|
+
this.hasActions = actions;
|
|
192
|
+
this.hasDescription = description;
|
|
193
|
+
this.place();
|
|
194
|
+
}
|
|
195
|
+
/** EMP-6, EMP-11: every action is told its place, and one that is an action no more is told it has none. */
|
|
196
|
+
place() {
|
|
197
|
+
const actions = new Set([...this.children].filter((child) => child.slot === 'actions'));
|
|
198
|
+
for (const gone of this.placed)
|
|
199
|
+
if (!actions.has(gone) && gone.parentElement === this)
|
|
200
|
+
gone[GROUP_ITEM]?.set(null);
|
|
201
|
+
for (const action of actions)
|
|
202
|
+
action[GROUP_ITEM]?.set(ACTION_PLACE);
|
|
203
|
+
this.placed = actions;
|
|
204
|
+
}
|
|
205
|
+
get region() {
|
|
206
|
+
return this.renderRoot?.querySelector('.announce') ?? null;
|
|
207
|
+
}
|
|
208
|
+
/** Empties the live region and forgets an announcement that was about to be made. */
|
|
209
|
+
silence() {
|
|
210
|
+
cancelAnimationFrame(this.pending);
|
|
211
|
+
this.pending = 0;
|
|
212
|
+
this.region?.replaceChildren();
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* EMP-9: announced once — through the polite region in the shadow root, a frame after it was emptied, so that a text
|
|
216
|
+
* equal to the last one is announced again. Nothing is announced while it is not live or says nothing. The host has
|
|
217
|
+
* no live role: its own content is not read a second time.
|
|
218
|
+
*/
|
|
219
|
+
announce() {
|
|
220
|
+
this.silence();
|
|
221
|
+
if (!this.live || this.empty || !this.isConnected)
|
|
222
|
+
return;
|
|
223
|
+
this.pending = requestAnimationFrame(() => {
|
|
224
|
+
this.pending = 0;
|
|
225
|
+
const region = this.region;
|
|
226
|
+
if (!region || !this.live || this.empty)
|
|
227
|
+
return;
|
|
228
|
+
region.replaceChildren(...this.announcement.map((text) => {
|
|
229
|
+
const run = document.createElement('div');
|
|
230
|
+
run.textContent = text;
|
|
231
|
+
return run;
|
|
232
|
+
}));
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
watch() {
|
|
236
|
+
if (this.isConnected && typeof MutationObserver !== 'undefined' && !this.content$) {
|
|
237
|
+
this.content$ = new MutationObserver(this.onContent);
|
|
238
|
+
this.content$.observe(this, { childList: true, characterData: true, subtree: true, attributes: true, attributeFilter: ['slot'] });
|
|
239
|
+
}
|
|
240
|
+
if (this.live && this.isConnected && typeof ResizeObserver !== 'undefined') {
|
|
241
|
+
if (this.shown$)
|
|
242
|
+
return;
|
|
243
|
+
this.laidOut = null;
|
|
244
|
+
this.shown$ = new ResizeObserver(this.onLaidOut);
|
|
245
|
+
this.shown$.observe(this);
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
this.shown$?.disconnect();
|
|
249
|
+
this.shown$ = null;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
connectedCallback() {
|
|
253
|
+
super.connectedCallback();
|
|
254
|
+
// EMP-9: one written in the page's markup, or made while the page is still being read, is part of its first
|
|
255
|
+
// presentation and is not announced then; one the product adds later is — and one it puts back, each time.
|
|
256
|
+
if (!this.presented)
|
|
257
|
+
this.announceFirst = !this.upgraded && document.readyState === 'complete';
|
|
258
|
+
else {
|
|
259
|
+
this.scan();
|
|
260
|
+
this.watch();
|
|
261
|
+
this.announce();
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
disconnectedCallback() {
|
|
265
|
+
super.disconnectedCallback();
|
|
266
|
+
this.silence();
|
|
267
|
+
this.content$?.disconnect();
|
|
268
|
+
this.content$ = null;
|
|
269
|
+
this.shown$?.disconnect();
|
|
270
|
+
this.shown$ = null;
|
|
271
|
+
}
|
|
272
|
+
willUpdate() {
|
|
273
|
+
// The first render already draws the right parts: the light-DOM children are there before a slot says so.
|
|
274
|
+
if (!this.hasUpdated)
|
|
275
|
+
this.scan();
|
|
276
|
+
// EMP-18: neither a title nor a description, no empty state.
|
|
277
|
+
try {
|
|
278
|
+
if (this.empty)
|
|
279
|
+
this.internals?.states.add('empty');
|
|
280
|
+
else
|
|
281
|
+
this.internals?.states.delete('empty');
|
|
282
|
+
}
|
|
283
|
+
catch {
|
|
284
|
+
// A browser without custom states: the empty state that says nothing is a block of no height.
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
updated(changed) {
|
|
288
|
+
const has = (name) => changed.has(name);
|
|
289
|
+
this.watch();
|
|
290
|
+
// EMP-9: shown after its first presentation, or its title or its description changed while shown.
|
|
291
|
+
if (this.live) {
|
|
292
|
+
const first = !this.presented;
|
|
293
|
+
const altered = !first && (has('headline') || has('hasTitle') || has('hasDescription') || has('live'));
|
|
294
|
+
if ((first && this.announceFirst) || altered)
|
|
295
|
+
this.announce();
|
|
296
|
+
}
|
|
297
|
+
else if (has('live'))
|
|
298
|
+
this.announce();
|
|
299
|
+
this.presented = true;
|
|
300
|
+
// EMP-17: an alignment this spec does not have is drawn as center. (An unknown size is the axes' to report.)
|
|
301
|
+
if (has('align') && !ALIGNMENTS.includes(this.align)) {
|
|
302
|
+
report(this, 'EMP-17', `align "${this.align}" is not an alignment of an empty state; it is drawn as "center"`);
|
|
303
|
+
}
|
|
304
|
+
// EMP-18: what a debug build tells the product.
|
|
305
|
+
if (has('headline') || has('hasTitle') || has('hasDescription')) {
|
|
306
|
+
if (this.empty)
|
|
307
|
+
report(this, 'EMP-18', 'the empty state has no title and no description, so it draws nothing; a glyph or actions alone do not tell a person what is missing');
|
|
308
|
+
else if (!this.titled)
|
|
309
|
+
report(this, 'EMP-18', 'the empty state has a description and no title; say what is missing in the headline attribute or the title slot');
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
render() {
|
|
313
|
+
const headline = this.headline.trim();
|
|
314
|
+
return html `
|
|
315
|
+
<div
|
|
316
|
+
part="container"
|
|
317
|
+
class="container ${classMap({ start: this.align === 'start', 'has-media': this.hasMedia, titled: this.titled, 'has-description': this.hasDescription, 'has-actions': this.hasActions })}"
|
|
318
|
+
?hidden=${this.empty}
|
|
319
|
+
>
|
|
320
|
+
<div part="media" class="media ${this.mediaIsGlyph ? 'glyph' : 'picture'}" aria-hidden="true"><slot name="media"></slot></div>
|
|
321
|
+
<div class="text">
|
|
322
|
+
<div part="title" class="title">${headline && !this.hasTitle ? html `<span class="headline">${this.headline}</span>` : nothing}<slot name="title"></slot></div>
|
|
323
|
+
<div part="description" class="description"><slot></slot></div>
|
|
324
|
+
</div>
|
|
325
|
+
<div part="actions" class="actions"><slot name="actions"></slot></div>
|
|
326
|
+
${this.live ? html `<div class="announce" role="status" aria-atomic="true"></div>` : nothing}
|
|
327
|
+
</div>
|
|
328
|
+
`;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
if (!customElements.get('tanrei-empty-state'))
|
|
332
|
+
customElements.define('tanrei-empty-state', TanreiEmptyState);
|
|
333
|
+
//# sourceMappingURL=empty-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-state.js","sourceRoot":"","sources":["../../../src/components/empty-state/empty-state.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,sBAAsB,EACtB,UAAU,EACV,WAAW,EACX,oBAAoB,EACpB,qBAAqB,EAGrB,kBAAkB,EAElB,SAAS,EACT,MAAM,GACP,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAOnE,8DAA8D;AAC9D,MAAM,MAAM,GAAG,CAAC,IAA+B,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAE9F;;;;GAIG;AACH,MAAM,YAAY,GAAe,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IAAhD;;QACmB,iBAAY,GAAG,IAAI,sBAAsB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QAehF,mPAAmP;QACnP,aAAQ,GAAG,EAAE,CAAC;QAEd,uOAAuO;QACvO,SAAI,GAAyB,QAAQ,CAAC;Q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AI,CAAC,cAAc,EAAE,aAAa,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC;kBAC7K,IAAI,CAAC,KAAK;;yCAEa,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;;4CAEpC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAA,0BAA0B,IAAI,CAAC,QAAQ,SAAS,CAAC,CAAC,CAAC,OAAO;;;;UAI7H,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA,+DAA+D,CAAC,CAAC,CAAC,OAAO;;KAE9F,CAAC;IACJ,CAAC;CACF;AAED,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,oBAAoB,CAAC;IAAE,cAAc,CAAC,MAAM,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type OpenAxis } from '../../primitives/index.js';
|
|
2
|
+
/** The values every design system has. A layer may add more; those get their styles on demand. */
|
|
3
|
+
export declare const CORE_SIZES: readonly ['medium', 'large'];
|
|
4
|
+
/** EMP-2: where the parts stand. A closed set; anything else is `center` (EMP-17). */
|
|
5
|
+
export declare const ALIGNMENTS: readonly ['center', 'start'];
|
|
6
|
+
/**
|
|
7
|
+
* The open axis (EMP-17): a size a layer added gets its block on demand, built by the same function as the
|
|
8
|
+
* core blocks and falling back to medium's tokens; a value the active system lacks is reported in debug builds.
|
|
9
|
+
*/
|
|
10
|
+
export declare const AXES: readonly OpenAxis[];
|
|
11
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { css, unsafeCSS } from 'lit';
|
|
2
|
+
import { iconGlyph } from '../../primitives/index.js';
|
|
3
|
+
import { productText } from '../../styles/product-text.js';
|
|
4
|
+
// Every visual value is a token (tokens/comp/empty-state.tokens.json). The empty state has no state (EMP-7): what
|
|
5
|
+
// changes what it draws is its size and its alignment. It draws no fill, no edge and no elevation (EMP-1), so there is
|
|
6
|
+
// no shape, no state layer, no focus indicator and no motion here.
|
|
7
|
+
/** The values every design system has. A layer may add more; those get their styles on demand. */
|
|
8
|
+
export const CORE_SIZES = ['medium', 'large'];
|
|
9
|
+
const DEFAULT_SIZE = 'medium';
|
|
10
|
+
/** EMP-2: where the parts stand. A closed set; anything else is `center` (EMP-17). */
|
|
11
|
+
export const ALIGNMENTS = ['center', 'start'];
|
|
12
|
+
const PREFIX = '--tanrei-comp-empty-state';
|
|
13
|
+
const T = (name) => `var(${PREFIX}-${name})`;
|
|
14
|
+
const t = (name) => unsafeCSS(T(name));
|
|
15
|
+
// A size the core does not have may be missing from the active design system: fall back to the default's token.
|
|
16
|
+
const ref = (name, key, fallback) => (fallback ? `var(${name(key)}, var(${name(fallback)}))` : `var(${name(key)})`);
|
|
17
|
+
// Per size (the axis' members): the room above and below, the glyph's box, and the title's and the description's text
|
|
18
|
+
// roles, each used whole — the font shorthand and the letter spacing.
|
|
19
|
+
const sizeBlock = (size, selector, fallback = null) => `${selector} {
|
|
20
|
+
--_pad-block: ${ref((v) => `${PREFIX}-container-padding-block-${v}`, size, fallback)};
|
|
21
|
+
--_media-size: ${ref((v) => `${PREFIX}-media-size-${v}`, size, fallback)};
|
|
22
|
+
${['title', 'description']
|
|
23
|
+
.flatMap((part) => {
|
|
24
|
+
const role = (member) => ref((v) => `${PREFIX}-${part}-typescale-${v}-${member}`, size, fallback);
|
|
25
|
+
return [` --_${part}-font: ${role('font')};`, ` --_${part}-tracking: ${role('letter-spacing')};`];
|
|
26
|
+
})
|
|
27
|
+
.join('\n')}
|
|
28
|
+
}`;
|
|
29
|
+
/**
|
|
30
|
+
* The open axis (EMP-17): a size a layer added gets its block on demand, built by the same function as the
|
|
31
|
+
* core blocks and falling back to medium's tokens; a value the active system lacks is reported in debug builds.
|
|
32
|
+
*/
|
|
33
|
+
export const AXES = [
|
|
34
|
+
{ name: 'size', core: CORE_SIZES, default: DEFAULT_SIZE, rules: (value, selector) => sizeBlock(value, selector, DEFAULT_SIZE), probe: (value) => `${PREFIX}-container-padding-block-${value}` },
|
|
35
|
+
];
|
|
36
|
+
export const styles = css `
|
|
37
|
+
/* EMP-1: a block that takes the whole inline size of the region it is placed in and is as tall as its content and
|
|
38
|
+
its padding — no outer space, no height of its own, nothing that scrolls. It has no role in the styles and takes
|
|
39
|
+
no input (EMP-7): nothing here answers a pointer, a press or focus. */
|
|
40
|
+
:host {
|
|
41
|
+
display: block;
|
|
42
|
+
}
|
|
43
|
+
:host([hidden]) {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
46
|
+
/* EMP-18: with no title and no description it draws nothing and takes no space. Its own rule: a browser without
|
|
47
|
+
custom states drops only this one, and the empty state is then a block of no height (.container[hidden]). */
|
|
48
|
+
:host(:state(empty)) {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
${unsafeCSS(sizeBlock(DEFAULT_SIZE, ':host'))}
|
|
52
|
+
${unsafeCSS(CORE_SIZES.filter((size) => size !== DEFAULT_SIZE).map((size) => sizeBlock(size, `:host([size='${size}'])`)).join('\n'))}
|
|
53
|
+
|
|
54
|
+
/* EMP-1: one column — the media, the title, the description, the actions, those it has — padded above the first and
|
|
55
|
+
below the last by the block padding of its size and at the start and the end by container.padding-inline. No fill,
|
|
56
|
+
no edge, no elevation: it is drawn on the surface of the region whose content is missing.
|
|
57
|
+
EMP-2: centred on the inline axis, its lines centred. (It is positioned for one thing: the live region below is
|
|
58
|
+
laid out inside it, wherever the block stands.) */
|
|
59
|
+
.container {
|
|
60
|
+
position: relative;
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
align-items: center;
|
|
65
|
+
padding-block: var(--_pad-block);
|
|
66
|
+
padding-inline: ${t('container-padding-inline')};
|
|
67
|
+
text-align: center;
|
|
68
|
+
}
|
|
69
|
+
.container[hidden] {
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
72
|
+
/* EMP-2, EMP-13: at the start edge, inside the inline padding, its lines aligned to the start — the right in a
|
|
73
|
+
right-to-left layout. Any other value of align is the centre (EMP-17). The element says so with a class: HTML
|
|
74
|
+
compares the value of an attribute called align without regard to case, and START is not a value of this one. */
|
|
75
|
+
.container.start {
|
|
76
|
+
align-items: flex-start;
|
|
77
|
+
text-align: start;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* EMP-3: the media, first, media.gap above the title. Nothing is drawn where the product gave none. */
|
|
81
|
+
.media {
|
|
82
|
+
flex: none;
|
|
83
|
+
margin-block-end: ${t('media-gap')};
|
|
84
|
+
}
|
|
85
|
+
.container:not(.has-media) .media {
|
|
86
|
+
display: none;
|
|
87
|
+
}
|
|
88
|
+
/* EMP-3: a glyph of the icon set — a box of the media size of its size, in media.color, the icon set's unselected
|
|
89
|
+
family and fill, sys.icon.weight, the optical size of its box, no transition. EMP-15: iconGlyph() mirrors the
|
|
90
|
+
slotted glyph GlyphMirrorController marked, in its own box. */
|
|
91
|
+
${iconGlyph('.media.glyph', { size: '--_media-size', selected: ':not(*)' })}
|
|
92
|
+
.media.glyph {
|
|
93
|
+
color: ${t('media-color')};
|
|
94
|
+
}
|
|
95
|
+
/* The slot is the glyph's ink for GlyphDrawnController: an inline block as wide as the name it holds. */
|
|
96
|
+
.media.glyph slot {
|
|
97
|
+
display: inline-block;
|
|
98
|
+
vertical-align: top;
|
|
99
|
+
}
|
|
100
|
+
/* Nothing in a glyph's place until the icon set can draw it (GlyphDrawnController sets data-drawn): its name is never
|
|
101
|
+
spelled out. The box keeps its size. */
|
|
102
|
+
.media.glyph:not([data-drawn]) {
|
|
103
|
+
visibility: hidden;
|
|
104
|
+
}
|
|
105
|
+
/* EMP-3: a picture or a view of the product's own — at its own size, never wider than the container less its inline
|
|
106
|
+
padding, its proportions kept (a replaced element's height follows its width); not colored, clipped or mirrored. */
|
|
107
|
+
.media.picture {
|
|
108
|
+
display: block;
|
|
109
|
+
max-inline-size: 100%;
|
|
110
|
+
}
|
|
111
|
+
.media.picture ::slotted(*) {
|
|
112
|
+
display: block;
|
|
113
|
+
max-inline-size: 100%;
|
|
114
|
+
}
|
|
115
|
+
.media.picture ::slotted(:is(img, svg, video, canvas)) {
|
|
116
|
+
block-size: auto;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* EMP-2: the text — no wider than content.measure times the description's font size (this box carries it, so the
|
|
120
|
+
measure grows with the text: EMP-11), and no wider than the container less its inline padding.
|
|
121
|
+
EMP-5: the description's text style, inherited by what the product placed there, so bare text is styled. */
|
|
122
|
+
.text {
|
|
123
|
+
min-inline-size: 0;
|
|
124
|
+
max-inline-size: min(100%, calc(${t('content-measure')} * 1em));
|
|
125
|
+
font: var(--_description-font);
|
|
126
|
+
letter-spacing: var(--_description-tracking);
|
|
127
|
+
}
|
|
128
|
+
/* EMP-4: the title, in the text style of its size and in title.color; it wraps and is never cut. A heading the
|
|
129
|
+
product gives in the slot is drawn as every other title is: its own margins and text style are taken off, its
|
|
130
|
+
role and its level are untouched. */
|
|
131
|
+
.title {
|
|
132
|
+
font: var(--_title-font);
|
|
133
|
+
letter-spacing: var(--_title-tracking);
|
|
134
|
+
color: ${t('title-color')};
|
|
135
|
+
overflow-wrap: break-word;
|
|
136
|
+
}
|
|
137
|
+
.container:not(.titled) .title {
|
|
138
|
+
display: none;
|
|
139
|
+
}
|
|
140
|
+
::slotted([slot='title']) {
|
|
141
|
+
display: block;
|
|
142
|
+
margin: 0;
|
|
143
|
+
font: inherit;
|
|
144
|
+
letter-spacing: inherit;
|
|
145
|
+
color: inherit;
|
|
146
|
+
}
|
|
147
|
+
/* EMP-16: a title given as text is text of its own direction, isolated; its lines are still centred, or — align
|
|
148
|
+
start — aligned by the layout's direction, not by the text's own. */
|
|
149
|
+
${productText('.headline')}
|
|
150
|
+
${productText('.start .headline', { align: 'start' })}
|
|
151
|
+
.headline {
|
|
152
|
+
display: block;
|
|
153
|
+
}
|
|
154
|
+
/* EMP-5: the description, title.gap below the title, in description.color; it wraps, and nothing cuts it or limits
|
|
155
|
+
its lines. A link in it is the product's own. */
|
|
156
|
+
.description {
|
|
157
|
+
color: ${t('description-color')};
|
|
158
|
+
overflow-wrap: break-word;
|
|
159
|
+
}
|
|
160
|
+
.container:not(.has-description) .description {
|
|
161
|
+
display: none;
|
|
162
|
+
}
|
|
163
|
+
.container.titled.has-description .description {
|
|
164
|
+
margin-block-start: ${t('title-gap')};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/* EMP-6: the actions — one row actions.gap below the text, in the order given from the start, item-gap apart,
|
|
168
|
+
centred or at the start as align says; a row that does not fit wraps, item-gap between its lines. Nothing of an
|
|
169
|
+
action is styled. */
|
|
170
|
+
.actions {
|
|
171
|
+
display: flex;
|
|
172
|
+
flex-wrap: wrap;
|
|
173
|
+
align-items: center;
|
|
174
|
+
justify-content: center;
|
|
175
|
+
gap: ${t('actions-item-gap')};
|
|
176
|
+
max-inline-size: 100%;
|
|
177
|
+
margin-block-start: ${t('actions-gap')};
|
|
178
|
+
}
|
|
179
|
+
.start .actions {
|
|
180
|
+
justify-content: flex-start;
|
|
181
|
+
}
|
|
182
|
+
.container:not(.has-actions) .actions {
|
|
183
|
+
display: none;
|
|
184
|
+
}
|
|
185
|
+
/* EMP-6, EMP-11: an action alone on its line is never wider than that line. One that would be is given the line's
|
|
186
|
+
width and no less: a Button then wraps its label, as it does when a button group narrows it (the element tells it
|
|
187
|
+
so), and a link wraps as text does. An action that fits is not touched. */
|
|
188
|
+
::slotted([slot='actions']) {
|
|
189
|
+
max-inline-size: 100%;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* EMP-9: the live region, read and never drawn. It lies inside the container, at its start corner, so that no box
|
|
193
|
+
that scrolls is widened by it (src/scroll-box.test.ts). */
|
|
194
|
+
.announce {
|
|
195
|
+
position: absolute;
|
|
196
|
+
inset-block-start: 0;
|
|
197
|
+
inset-inline-start: 0;
|
|
198
|
+
inline-size: 1px;
|
|
199
|
+
block-size: 1px;
|
|
200
|
+
margin: 0;
|
|
201
|
+
padding: 0;
|
|
202
|
+
overflow: hidden;
|
|
203
|
+
clip-path: inset(50%);
|
|
204
|
+
white-space: nowrap;
|
|
205
|
+
border: 0;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* EMP-12: forced colors — the glyph, the title and the description take the platform's text color; links, Buttons
|
|
209
|
+
and a picture of the product's own are left to themselves. Nothing here relies on a fill. */
|
|
210
|
+
@media (forced-colors: active) {
|
|
211
|
+
.title,
|
|
212
|
+
.description,
|
|
213
|
+
.media.glyph {
|
|
214
|
+
color: CanvasText;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
`;
|
|
218
|
+
//# sourceMappingURL=empty-state.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty-state.styles.js","sourceRoot":"","sources":["../../../src/components/empty-state/empty-state.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAiB,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,kHAAkH;AAClH,uHAAuH;AACvH,mEAAmE;AACnE,kGAAkG;AAClG,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAU,CAAC;AACvD,MAAM,YAAY,GAAG,QAAQ,CAAC;AAC9B,sFAAsF;AACtF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAU,CAAC;AAEvD,MAAM,MAAM,GAAG,2BAA2B,CAAC;AAC3C,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,MAAM,IAAI,IAAI,GAAG,CAAC;AACrD,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,SAAS,CAAC,CA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