@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,176 @@
|
|
|
1
|
+
import { LitElement, type PropertyDeclarations, type PropertyValues } from 'lit';
|
|
2
|
+
import { type TanreiLinkTarget } from '../../primitives/index.js';
|
|
3
|
+
import type { TanreiChipSizeRegistry, TanreiChipVariantRegistry } from '../../registry.js';
|
|
4
|
+
/** What the chip does: a button (action), an on / off toggle (filter) or an item the user entered and can remove (input). A closed set. */
|
|
5
|
+
export type TanreiChipKind = 'action' | 'filter' | 'input';
|
|
6
|
+
/** The core variants (outlined, elevated), plus any a design system's generated `.d.ts` registers. */
|
|
7
|
+
export type TanreiChipVariant = keyof TanreiChipVariantRegistry;
|
|
8
|
+
/** The core sizes (small, medium), plus any a design system's generated `.d.ts` registers. */
|
|
9
|
+
export type TanreiChipSize = keyof TanreiChipSizeRegistry;
|
|
10
|
+
/** What `change` carries: the new value of `selected`. */
|
|
11
|
+
export interface TanreiChipChangeDetail {
|
|
12
|
+
selected: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Shows a compact choice, a suggested action or an item the user entered as a small labelled control.
|
|
16
|
+
*
|
|
17
|
+
* Contract: specs/chip.spec.json. Every visual value comes from `--tanrei-comp-chip-*` tokens, one set per variant, look
|
|
18
|
+
* (plain, or `selected.` for a filter chip that is on) and state, and the `remove.` parts of an input chip's remove
|
|
19
|
+
* action in its own states: how a state looks is the active design system's decision, not this component's. How a
|
|
20
|
+
* press is answered and how keyboard focus is drawn are the system's choices of kind (`--tanrei-sys-behavior-*`),
|
|
21
|
+
* and how far its corners ease is the system's amount (`--tanrei-sys-shape-corner-smoothing`).
|
|
22
|
+
*
|
|
23
|
+
* `kind` decides what the chip does and its parts; `variant` only how it looks. An action chip is a button. A filter chip
|
|
24
|
+
* is a button with a pressed state: activation switches `selected` and fires `change`, and when on it shows a check in
|
|
25
|
+
* its leading position. An input chip has a remove action, a second button named by `removeLabel`, reached by Tab after
|
|
26
|
+
* the chip; it and Backspace or Delete on the chip fire `remove` — the chip never removes itself (the page does, and
|
|
27
|
+
* moves focus). By default the remove action reads as destructive (`destructiveRemove`; the attribute
|
|
28
|
+
* `no-destructive-remove` turns it off): it looks the same at rest and takes the error color while it is hovered,
|
|
29
|
+
* focused or pressed — a color only, never a change of name, glyph or size. The label is the visible text and the
|
|
30
|
+
* accessible name; the icon (the `icon` slot) and the avatar (the `avatar` slot, input chips only) are decorative.
|
|
31
|
+
*
|
|
32
|
+
* An action chip with `href` is a link and not a button (CHP-33): the shadow root holds an `<a href>` in place
|
|
33
|
+
* of the `<button>`, drawn from the same tokens in every state. Enter activates it and Space does not; `click` fires
|
|
34
|
+
* first and cancelling it cancels the navigation. `target="new"` opens a new tab, safely (`noopener`), draws the icon
|
|
35
|
+
* set's `open_in_new` at the chip's inline end and reads `target-label` as the link's description. A filter chip and an
|
|
36
|
+
* input chip take no destination.
|
|
37
|
+
*
|
|
38
|
+
* @tag tanrei-chip
|
|
39
|
+
* @slot icon - The leading icon: a glyph of the system's icon set (its ligature text), or an `<svg>` or `<img>`. A glyph the icon set flags is mirrored in right-to-left; `data-mirror="auto | always | never"` on the element decides for one use.
|
|
40
|
+
* @slot avatar - The leading image of an input chip (an `<img>`), in place of the icon. Ignored for other kinds.
|
|
41
|
+
* @csspart container - The chip's native button — with `href`, the anchor in its place: its shape, colors, outline and elevation, and every state of the chip.
|
|
42
|
+
* @csspart icon - The box the leading icon is drawn in (hidden from assistive technology).
|
|
43
|
+
* @csspart check - The check a filter chip that is on shows in the leading position (hidden from assistive technology).
|
|
44
|
+
* @csspart avatar - The box that clips the avatar to comp.chip.avatar.shape.
|
|
45
|
+
* @csspart label - The label text.
|
|
46
|
+
* @csspart remove - An input chip's remove action: the native button on its round container, with its own states (the cancel glyph, filled).
|
|
47
|
+
* @fires click - The chip itself was activated by pointer, touch, keyboard or assistive technology. Never fired by the remove action. A link chip fires it before the browser follows the address; `preventDefault()` cancels the navigation.
|
|
48
|
+
* @fires {CustomEvent<TanreiChipChangeDetail>} change - A filter chip was activated; fired after its `click`, as a native checkbox does. `detail.selected` (and the element's `selected`) is the new value.
|
|
49
|
+
* @fires remove - The user asked to remove an input chip, with its remove action or with Backspace or Delete. The chip stays until the page removes it.
|
|
50
|
+
*/
|
|
51
|
+
export declare class TanreiChip extends LitElement {
|
|
52
|
+
private readonly availability;
|
|
53
|
+
static styles: import("lit").CSSResult[];
|
|
54
|
+
static shadowRootOptions: ShadowRootInit;
|
|
55
|
+
/**
|
|
56
|
+
* Its documented parts, once: what an element composed of it exports (src/primitives/composed.ts, W4).
|
|
57
|
+
*
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
static readonly parts: readonly string[];
|
|
61
|
+
static properties: PropertyDeclarations;
|
|
62
|
+
/** What the chip does: action (a button), filter (on or off) or input (an entered item the user can remove). Kind decides the role and the parts, not the look. */
|
|
63
|
+
kind: TanreiChipKind;
|
|
64
|
+
/** Look: outlined sits flat on a plain surface; elevated is raised for chips over media or a busy background. */
|
|
65
|
+
variant: TanreiChipVariant;
|
|
66
|
+
/** Visual height (small 24 / medium 32 in the default system). The hit area always meets the minimum target. */
|
|
67
|
+
size: TanreiChipSize;
|
|
68
|
+
/** Whether a filter chip is on. Ignored unless `kind` is filter. */
|
|
69
|
+
selected: boolean;
|
|
70
|
+
/** Prevents interaction and removes the chip, and its remove action, from the focus order. */
|
|
71
|
+
disabled: boolean;
|
|
72
|
+
/** The visible text and the accessible name. */
|
|
73
|
+
label: string;
|
|
74
|
+
/** The accessible name of an input chip's remove action; it should name the item ("Remove Ada Lovelace"). Required when `kind` is input. */
|
|
75
|
+
removeLabel: string;
|
|
76
|
+
/**
|
|
77
|
+
* Whether an input chip's remove action reads as destructive: the same at rest, the error color while hovered,
|
|
78
|
+
* keyboard-focused or pressed. Set `no-destructive-remove` where removing loses nothing (a filter the user can add
|
|
79
|
+
* back in one step). Color only: the name, glyph, size and behaviour are the same either way. Ignored unless `kind` is input.
|
|
80
|
+
*/
|
|
81
|
+
destructiveRemove: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Whether an input chip draws its remove action. Set `not-removable` for an entry that cannot be taken away now (a
|
|
84
|
+
* read-only field's): no remove action is drawn, so none stands there doing nothing, none is a stop, Backspace and
|
|
85
|
+
* Delete ask for nothing, and the chip is padded as one without a remove action (CHP-38). Ignored unless `kind` is input.
|
|
86
|
+
*/
|
|
87
|
+
removable: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* The destination of an action chip: a URL, a path or a fragment. Not empty, the chip is a link and not a button
|
|
90
|
+
* (CHP-33): the link role, an `<a href>` in the shadow root, activated by Enter and not by Space, drawn exactly as the
|
|
91
|
+
* action chip it would otherwise be. Ignored unless `kind` is action; white space is no destination, and a
|
|
92
|
+
* `javascript:` address or one that cannot be read is refused and reported in debug builds (CHP-37).
|
|
93
|
+
*/
|
|
94
|
+
href: string;
|
|
95
|
+
/**
|
|
96
|
+
* Where the destination opens: `same` (here) or `new` (a new tab or window, with `noopener`), which the chip marks
|
|
97
|
+
* with the glyph `open_in_new` after its label and says through `targetLabel` (CHP-35). HTML's `_self` and `_blank`
|
|
98
|
+
* are read as those two; anything else is `same` and reported. Ignored without `href`.
|
|
99
|
+
*/
|
|
100
|
+
target: TanreiLinkTarget;
|
|
101
|
+
/** What assistive technology reads after the link's name while `target` is `new` ("opens in a new tab"): your words, in your language. Required then; ignored otherwise. */
|
|
102
|
+
targetLabel: string;
|
|
103
|
+
/** Web only: forwarded to the anchor's `rel`; `target="new"` adds `noopener` to it. Ignored without `href`. */
|
|
104
|
+
rel: string | null;
|
|
105
|
+
/** Web only: forwarded to the anchor's `download` (the file name; empty for the address's own). Ignored without `href`. */
|
|
106
|
+
download: string | null;
|
|
107
|
+
/** Whether the icon slot has content. */
|
|
108
|
+
protected hasIcon: boolean;
|
|
109
|
+
/** Whether the avatar slot has content. */
|
|
110
|
+
protected hasAvatar: boolean;
|
|
111
|
+
/** CHP-7: sizes and variants a design system adds, and a value the active system does not have (src/primitives/axes.ts). */
|
|
112
|
+
private readonly axes;
|
|
113
|
+
/**
|
|
114
|
+
* CHP-30: the glyph in the icon slot is marked when the icon set mirrors its name in right-to-left, or the product's
|
|
115
|
+
* `data-mirror` says so (src/primitives/glyph-mirror.ts); `iconGlyph()` draws the mark. The check and the remove glyph
|
|
116
|
+
* the chip draws itself are not named to the controller: they are never mirrored. CHP-35: the mark of a link that
|
|
117
|
+
* opens a new context is named — the icon set mirrors `open_in_new`.
|
|
118
|
+
*/
|
|
119
|
+
private readonly mirror;
|
|
120
|
+
/**
|
|
121
|
+
* CHP-33 … CHP-37: the link an action chip is while it has a destination, what its anchor carries, and what a debug
|
|
122
|
+
* build is told (src/primitives/link.ts). A filter chip holds a state and an input chip a second action:
|
|
123
|
+
* neither takes one (CHP-37).
|
|
124
|
+
*/
|
|
125
|
+
private readonly link;
|
|
126
|
+
/**
|
|
127
|
+
* CHP-8 / CHP-9: the chip's pressed state, press-hold and the answer the system chooses (src/primitives/press.ts).
|
|
128
|
+
* CHP-34: a link chip is pressed by Enter alone; Space is the browser's.
|
|
129
|
+
*/
|
|
130
|
+
private readonly press;
|
|
131
|
+
/**
|
|
132
|
+
* CHP-20: the remove action's own press, within its round container; a press in its hit area outside the round
|
|
133
|
+
* container grows the ripple from the container's center (src/primitives/selection.ts).
|
|
134
|
+
*/
|
|
135
|
+
private readonly removePress;
|
|
136
|
+
/** The chip's native button, or the anchor of its link form: the one styled part (CHP-33). */
|
|
137
|
+
private get container();
|
|
138
|
+
private get removeButton();
|
|
139
|
+
/** A kind the chip does not know is drawn and behaves as an action chip. */
|
|
140
|
+
private get effectiveKind();
|
|
141
|
+
/** CHP-18, CHP-38: an input chip has its remove action unless it is not removable. */
|
|
142
|
+
private get removes();
|
|
143
|
+
/** CHP-11: selected counts only on a filter chip. */
|
|
144
|
+
private get on();
|
|
145
|
+
constructor();
|
|
146
|
+
/** `element.click()` activates the chip as a person would — through its native button, or its anchor, so a link is followed — and does nothing while disabled. */
|
|
147
|
+
click(): void;
|
|
148
|
+
/** CHP-10: where style queries are missing, the focus style is read when focus arrives. */
|
|
149
|
+
private onFocus;
|
|
150
|
+
/**
|
|
151
|
+
* CHP-11: a filter chip switches its own `selected`, then fires `click`, then `change` — the order and timing of a
|
|
152
|
+
* native checkbox's: the state has already switched when `click` listeners run, and `change` follows once the click
|
|
153
|
+
* has finished its way through the page. Its last stop is the window, so `change` is fired from a listener added
|
|
154
|
+
* there for this click; a listener that stops the click on its way still gets its `change`, in the next task.
|
|
155
|
+
*/
|
|
156
|
+
private onClick;
|
|
157
|
+
/** CHP-19: Backspace or Delete on a focused input chip asks for its removal. */
|
|
158
|
+
private onKeyDown;
|
|
159
|
+
/**
|
|
160
|
+
* CHP-18: the remove action fires `remove`, never `click`: its native click stops at the remove button, inside the
|
|
161
|
+
* shadow root, so it never reaches the element's listeners.
|
|
162
|
+
*/
|
|
163
|
+
private onRemoveClick;
|
|
164
|
+
/** CHP-22: the chip asks; the page removes it and moves focus. */
|
|
165
|
+
private requestRemove;
|
|
166
|
+
private onIconSlotChange;
|
|
167
|
+
private onAvatarSlotChange;
|
|
168
|
+
protected willUpdate(changed: PropertyValues): void;
|
|
169
|
+
protected updated(changed: PropertyValues): void;
|
|
170
|
+
protected render(): import("lit").TemplateResult;
|
|
171
|
+
}
|
|
172
|
+
declare global {
|
|
173
|
+
interface HTMLElementTagNameMap {
|
|
174
|
+
'tanrei-chip': TanreiChip;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
import { LitElement, nothing } from 'lit';
|
|
2
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
3
|
+
import { html, literal } from 'lit/static-html.js';
|
|
4
|
+
import { hiddenHost } from '../../primitives/hidden.js';
|
|
5
|
+
import { AvailabilityController, GlyphMirrorController, LINK_MARK, LinkController, OpenAxesController, PressController, afterClick, linkAttributes, markConditionChange, report, selectionRippleOrigin, syncFocusStyle, } from '../../primitives/index.js';
|
|
6
|
+
import { AXES, styles } from './chip.styles.js';
|
|
7
|
+
import { ownDirection } from '../../styles/product-text.js';
|
|
8
|
+
import { focusedAtFirst } from '../../primitives/autofocus.js';
|
|
9
|
+
const KINDS = ['action', 'filter', 'input'];
|
|
10
|
+
/**
|
|
11
|
+
* The glyphs of the system's icon set the chip draws itself, by the names the spec gives them (CHP-13, CHP-18): the
|
|
12
|
+
* check of a filter chip that is on, and the remove action's cancel glyph. A system that wants other marks chooses
|
|
13
|
+
* another icon set.
|
|
14
|
+
*/
|
|
15
|
+
const CHECK_GLYPH = 'check';
|
|
16
|
+
const REMOVE_GLYPH = 'cancel';
|
|
17
|
+
/**
|
|
18
|
+
* Shows a compact choice, a suggested action or an item the user entered as a small labelled control.
|
|
19
|
+
*
|
|
20
|
+
* Contract: specs/chip.spec.json. Every visual value comes from `--tanrei-comp-chip-*` tokens, one set per variant, look
|
|
21
|
+
* (plain, or `selected.` for a filter chip that is on) and state, and the `remove.` parts of an input chip's remove
|
|
22
|
+
* action in its own states: how a state looks is the active design system's decision, not this component's. How a
|
|
23
|
+
* press is answered and how keyboard focus is drawn are the system's choices of kind (`--tanrei-sys-behavior-*`),
|
|
24
|
+
* and how far its corners ease is the system's amount (`--tanrei-sys-shape-corner-smoothing`).
|
|
25
|
+
*
|
|
26
|
+
* `kind` decides what the chip does and its parts; `variant` only how it looks. An action chip is a button. A filter chip
|
|
27
|
+
* is a button with a pressed state: activation switches `selected` and fires `change`, and when on it shows a check in
|
|
28
|
+
* its leading position. An input chip has a remove action, a second button named by `removeLabel`, reached by Tab after
|
|
29
|
+
* the chip; it and Backspace or Delete on the chip fire `remove` — the chip never removes itself (the page does, and
|
|
30
|
+
* moves focus). By default the remove action reads as destructive (`destructiveRemove`; the attribute
|
|
31
|
+
* `no-destructive-remove` turns it off): it looks the same at rest and takes the error color while it is hovered,
|
|
32
|
+
* focused or pressed — a color only, never a change of name, glyph or size. The label is the visible text and the
|
|
33
|
+
* accessible name; the icon (the `icon` slot) and the avatar (the `avatar` slot, input chips only) are decorative.
|
|
34
|
+
*
|
|
35
|
+
* An action chip with `href` is a link and not a button (CHP-33): the shadow root holds an `<a href>` in place
|
|
36
|
+
* of the `<button>`, drawn from the same tokens in every state. Enter activates it and Space does not; `click` fires
|
|
37
|
+
* first and cancelling it cancels the navigation. `target="new"` opens a new tab, safely (`noopener`), draws the icon
|
|
38
|
+
* set's `open_in_new` at the chip's inline end and reads `target-label` as the link's description. A filter chip and an
|
|
39
|
+
* input chip take no destination.
|
|
40
|
+
*
|
|
41
|
+
* @tag tanrei-chip
|
|
42
|
+
* @slot icon - The leading icon: a glyph of the system's icon set (its ligature text), or an `<svg>` or `<img>`. A glyph the icon set flags is mirrored in right-to-left; `data-mirror="auto | always | never"` on the element decides for one use.
|
|
43
|
+
* @slot avatar - The leading image of an input chip (an `<img>`), in place of the icon. Ignored for other kinds.
|
|
44
|
+
* @csspart container - The chip's native button — with `href`, the anchor in its place: its shape, colors, outline and elevation, and every state of the chip.
|
|
45
|
+
* @csspart icon - The box the leading icon is drawn in (hidden from assistive technology).
|
|
46
|
+
* @csspart check - The check a filter chip that is on shows in the leading position (hidden from assistive technology).
|
|
47
|
+
* @csspart avatar - The box that clips the avatar to comp.chip.avatar.shape.
|
|
48
|
+
* @csspart label - The label text.
|
|
49
|
+
* @csspart remove - An input chip's remove action: the native button on its round container, with its own states (the cancel glyph, filled).
|
|
50
|
+
* @fires click - The chip itself was activated by pointer, touch, keyboard or assistive technology. Never fired by the remove action. A link chip fires it before the browser follows the address; `preventDefault()` cancels the navigation.
|
|
51
|
+
* @fires {CustomEvent<TanreiChipChangeDetail>} change - A filter chip was activated; fired after its `click`, as a native checkbox does. `detail.selected` (and the element's `selected`) is the new value.
|
|
52
|
+
* @fires remove - The user asked to remove an input chip, with its remove action or with Backspace or Delete. The chip stays until the page removes it.
|
|
53
|
+
*/
|
|
54
|
+
export class TanreiChip extends LitElement {
|
|
55
|
+
static { this.styles = [styles, hiddenHost]; }
|
|
56
|
+
static { this.shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true }; }
|
|
57
|
+
/**
|
|
58
|
+
* Its documented parts, once: what an element composed of it exports (src/primitives/composed.ts, W4).
|
|
59
|
+
*
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
|
+
static { this.parts = ['container', 'icon', 'check', 'avatar', 'label', 'remove']; }
|
|
63
|
+
static { this.properties = {
|
|
64
|
+
kind: { type: String, reflect: true },
|
|
65
|
+
variant: { type: String, reflect: true },
|
|
66
|
+
size: { type: String, reflect: true },
|
|
67
|
+
selected: { type: Boolean, reflect: true },
|
|
68
|
+
disabled: { type: Boolean, reflect: true },
|
|
69
|
+
label: { type: String },
|
|
70
|
+
removeLabel: { type: String, attribute: 'remove-label', reflect: true },
|
|
71
|
+
destructiveRemove: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
attribute: 'no-destructive-remove',
|
|
74
|
+
reflect: true,
|
|
75
|
+
converter: { fromAttribute: (value) => value === null, toAttribute: (value) => (value ? null : '') },
|
|
76
|
+
},
|
|
77
|
+
removable: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
attribute: 'not-removable',
|
|
80
|
+
reflect: true,
|
|
81
|
+
converter: { fromAttribute: (value) => value === null, toAttribute: (value) => (value ? null : '') },
|
|
82
|
+
},
|
|
83
|
+
href: { type: String },
|
|
84
|
+
target: { type: String },
|
|
85
|
+
targetLabel: { type: String, attribute: 'target-label' },
|
|
86
|
+
rel: { type: String },
|
|
87
|
+
download: { type: String },
|
|
88
|
+
hasIcon: { state: true },
|
|
89
|
+
hasAvatar: { state: true },
|
|
90
|
+
}; }
|
|
91
|
+
/** The chip's native button, or the anchor of its link form: the one styled part (CHP-33). */
|
|
92
|
+
get container() {
|
|
93
|
+
return this.renderRoot.querySelector('.container');
|
|
94
|
+
}
|
|
95
|
+
get removeButton() {
|
|
96
|
+
return this.renderRoot.querySelector('.remove');
|
|
97
|
+
}
|
|
98
|
+
/** A kind the chip does not know is drawn and behaves as an action chip. */
|
|
99
|
+
get effectiveKind() {
|
|
100
|
+
return KINDS.includes(this.kind) ? this.kind : 'action';
|
|
101
|
+
}
|
|
102
|
+
/** CHP-18, CHP-38: an input chip has its remove action unless it is not removable. */
|
|
103
|
+
get removes() {
|
|
104
|
+
return this.effectiveKind === 'input' && this.removable;
|
|
105
|
+
}
|
|
106
|
+
/** CHP-11: selected counts only on a filter chip. */
|
|
107
|
+
get on() {
|
|
108
|
+
return this.effectiveKind === 'filter' && this.selected;
|
|
109
|
+
}
|
|
110
|
+
constructor() {
|
|
111
|
+
super();
|
|
112
|
+
this.availability = new AvailabilityController(this, 'chip');
|
|
113
|
+
/** What the chip does: action (a button), filter (on or off) or input (an entered item the user can remove). Kind decides the role and the parts, not the look. */
|
|
114
|
+
this.kind = 'action';
|
|
115
|
+
/** Look: outlined sits flat on a plain surface; elevated is raised for chips over media or a busy background. */
|
|
116
|
+
this.variant = 'outlined';
|
|
117
|
+
/** Visual height (small 24 / medium 32 in the default system). The hit area always meets the minimum target. */
|
|
118
|
+
this.size = 'medium';
|
|
119
|
+
/** Whether a filter chip is on. Ignored unless `kind` is filter. */
|
|
120
|
+
this.selected = false;
|
|
121
|
+
/** Prevents interaction and removes the chip, and its remove action, from the focus order. */
|
|
122
|
+
this.disabled = false;
|
|
123
|
+
/** The visible text and the accessible name. */
|
|
124
|
+
this.label = '';
|
|
125
|
+
/** The accessible name of an input chip's remove action; it should name the item ("Remove Ada Lovelace"). Required when `kind` is input. */
|
|
126
|
+
this.removeLabel = '';
|
|
127
|
+
/**
|
|
128
|
+
* Whether an input chip's remove action reads as destructive: the same at rest, the error color while hovered,
|
|
129
|
+
* keyboard-focused or pressed. Set `no-destructive-remove` where removing loses nothing (a filter the user can add
|
|
130
|
+
* back in one step). Color only: the name, glyph, size and behaviour are the same either way. Ignored unless `kind` is input.
|
|
131
|
+
*/
|
|
132
|
+
this.destructiveRemove = true;
|
|
133
|
+
/**
|
|
134
|
+
* Whether an input chip draws its remove action. Set `not-removable` for an entry that cannot be taken away now (a
|
|
135
|
+
* read-only field's): no remove action is drawn, so none stands there doing nothing, none is a stop, Backspace and
|
|
136
|
+
* Delete ask for nothing, and the chip is padded as one without a remove action (CHP-38). Ignored unless `kind` is input.
|
|
137
|
+
*/
|
|
138
|
+
this.removable = true;
|
|
139
|
+
/**
|
|
140
|
+
* The destination of an action chip: a URL, a path or a fragment. Not empty, the chip is a link and not a button
|
|
141
|
+
* (CHP-33): the link role, an `<a href>` in the shadow root, activated by Enter and not by Space, drawn exactly as the
|
|
142
|
+
* action chip it would otherwise be. Ignored unless `kind` is action; white space is no destination, and a
|
|
143
|
+
* `javascript:` address or one that cannot be read is refused and reported in debug builds (CHP-37).
|
|
144
|
+
*/
|
|
145
|
+
this.href = '';
|
|
146
|
+
/**
|
|
147
|
+
* Where the destination opens: `same` (here) or `new` (a new tab or window, with `noopener`), which the chip marks
|
|
148
|
+
* with the glyph `open_in_new` after its label and says through `targetLabel` (CHP-35). HTML's `_self` and `_blank`
|
|
149
|
+
* are read as those two; anything else is `same` and reported. Ignored without `href`.
|
|
150
|
+
*/
|
|
151
|
+
this.target = 'same';
|
|
152
|
+
/** What assistive technology reads after the link's name while `target` is `new` ("opens in a new tab"): your words, in your language. Required then; ignored otherwise. */
|
|
153
|
+
this.targetLabel = '';
|
|
154
|
+
/** Web only: forwarded to the anchor's `rel`; `target="new"` adds `noopener` to it. Ignored without `href`. */
|
|
155
|
+
this.rel = null;
|
|
156
|
+
/** Web only: forwarded to the anchor's `download` (the file name; empty for the address's own). Ignored without `href`. */
|
|
157
|
+
this.download = null;
|
|
158
|
+
/** Whether the icon slot has content. */
|
|
159
|
+
this.hasIcon = false;
|
|
160
|
+
/** Whether the avatar slot has content. */
|
|
161
|
+
this.hasAvatar = false;
|
|
162
|
+
/** CHP-7: sizes and variants a design system adds, and a value the active system does not have (src/primitives/axes.ts). */
|
|
163
|
+
this.axes = new OpenAxesController(this, { component: 'chip', behavior: 'CHP-7', axes: AXES });
|
|
164
|
+
/**
|
|
165
|
+
* CHP-30: the glyph in the icon slot is marked when the icon set mirrors its name in right-to-left, or the product's
|
|
166
|
+
* `data-mirror` says so (src/primitives/glyph-mirror.ts); `iconGlyph()` draws the mark. The check and the remove glyph
|
|
167
|
+
* the chip draws itself are not named to the controller: they are never mirrored. CHP-35: the mark of a link that
|
|
168
|
+
* opens a new context is named — the icon set mirrors `open_in_new`.
|
|
169
|
+
*/
|
|
170
|
+
this.mirror = new GlyphMirrorController(this, { slots: 'slot[name="icon"]', drawn: '.mark' });
|
|
171
|
+
/**
|
|
172
|
+
* CHP-33 … CHP-37: the link an action chip is while it has a destination, what its anchor carries, and what a debug
|
|
173
|
+
* build is told (src/primitives/link.ts). A filter chip holds a state and an input chip a second action:
|
|
174
|
+
* neither takes one (CHP-37).
|
|
175
|
+
*/
|
|
176
|
+
this.link = new LinkController(this, {
|
|
177
|
+
ids: { refused: 'CHP-37', newContext: 'CHP-35' },
|
|
178
|
+
disabled: () => this.disabled,
|
|
179
|
+
holds: () => (this.effectiveKind === 'action' ? null : this.effectiveKind === 'filter' ? 'a filter chip' : 'an input chip'),
|
|
180
|
+
});
|
|
181
|
+
/**
|
|
182
|
+
* CHP-8 / CHP-9: the chip's pressed state, press-hold and the answer the system chooses (src/primitives/press.ts).
|
|
183
|
+
* CHP-34: a link chip is pressed by Enter alone; Space is the browser's.
|
|
184
|
+
*/
|
|
185
|
+
this.press = new PressController(this, {
|
|
186
|
+
container: () => this.container,
|
|
187
|
+
holdCarrier: () => this.renderRoot.querySelector('.label'),
|
|
188
|
+
disabled: () => this.disabled,
|
|
189
|
+
keys: () => this.link.pressKeys,
|
|
190
|
+
});
|
|
191
|
+
/**
|
|
192
|
+
* CHP-20: the remove action's own press, within its round container; a press in its hit area outside the round
|
|
193
|
+
* container grows the ripple from the container's center (src/primitives/selection.ts).
|
|
194
|
+
*/
|
|
195
|
+
this.removePress = new PressController(this, {
|
|
196
|
+
container: () => this.removeButton,
|
|
197
|
+
holdCarrier: () => this.renderRoot.querySelector('.remove .hold'),
|
|
198
|
+
disabled: () => this.disabled || !this.removes,
|
|
199
|
+
origin: selectionRippleOrigin(() => this.removeButton),
|
|
200
|
+
});
|
|
201
|
+
// A disabled native button already swallows its own clicks; this also covers clicks that land on the host
|
|
202
|
+
// (a click event dispatched on it), so CHP-2 holds.
|
|
203
|
+
this.addEventListener('click', (event) => {
|
|
204
|
+
if (this.disabled) {
|
|
205
|
+
event.preventDefault();
|
|
206
|
+
event.stopImmediatePropagation();
|
|
207
|
+
}
|
|
208
|
+
}, { capture: true });
|
|
209
|
+
}
|
|
210
|
+
/** `element.click()` activates the chip as a person would — through its native button, or its anchor, so a link is followed — and does nothing while disabled. */
|
|
211
|
+
click() {
|
|
212
|
+
const container = this.container;
|
|
213
|
+
if (container)
|
|
214
|
+
container.click();
|
|
215
|
+
else if (!this.disabled)
|
|
216
|
+
super.click();
|
|
217
|
+
}
|
|
218
|
+
/** CHP-10: where style queries are missing, the focus style is read when focus arrives. */
|
|
219
|
+
onFocus(event) {
|
|
220
|
+
syncFocusStyle(this, event.currentTarget);
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* CHP-11: a filter chip switches its own `selected`, then fires `click`, then `change` — the order and timing of a
|
|
224
|
+
* native checkbox's: the state has already switched when `click` listeners run, and `change` follows once the click
|
|
225
|
+
* has finished its way through the page. Its last stop is the window, so `change` is fired from a listener added
|
|
226
|
+
* there for this click; a listener that stops the click on its way still gets its `change`, in the next task.
|
|
227
|
+
*/
|
|
228
|
+
onClick() {
|
|
229
|
+
if (this.effectiveKind !== 'filter' || this.disabled)
|
|
230
|
+
return;
|
|
231
|
+
this.selected = !this.selected;
|
|
232
|
+
const detail = { selected: this.selected };
|
|
233
|
+
afterClick(() => this.dispatchEvent(new CustomEvent('change', { bubbles: true, detail })));
|
|
234
|
+
}
|
|
235
|
+
/** CHP-19: Backspace or Delete on a focused input chip asks for its removal. */
|
|
236
|
+
onKeyDown(event) {
|
|
237
|
+
this.press.onKeyDown(event);
|
|
238
|
+
if (!this.removes || this.disabled || event.repeat)
|
|
239
|
+
return;
|
|
240
|
+
if (event.key === 'Backspace' || event.key === 'Delete') {
|
|
241
|
+
event.preventDefault();
|
|
242
|
+
this.requestRemove();
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* CHP-18: the remove action fires `remove`, never `click`: its native click stops at the remove button, inside the
|
|
247
|
+
* shadow root, so it never reaches the element's listeners.
|
|
248
|
+
*/
|
|
249
|
+
onRemoveClick(event) {
|
|
250
|
+
event.stopPropagation();
|
|
251
|
+
if (this.disabled || !this.removes)
|
|
252
|
+
return;
|
|
253
|
+
this.requestRemove();
|
|
254
|
+
}
|
|
255
|
+
/** CHP-22: the chip asks; the page removes it and moves focus. */
|
|
256
|
+
requestRemove() {
|
|
257
|
+
this.dispatchEvent(new Event('remove', { bubbles: true }));
|
|
258
|
+
}
|
|
259
|
+
onIconSlotChange(event) {
|
|
260
|
+
this.hasIcon = event.target.assignedElements().length > 0;
|
|
261
|
+
}
|
|
262
|
+
onAvatarSlotChange(event) {
|
|
263
|
+
this.hasAvatar = event.target.assignedElements().length > 0;
|
|
264
|
+
}
|
|
265
|
+
willUpdate(changed) {
|
|
266
|
+
// The first render already draws the right leading element: the light-DOM children are there before the slots say so.
|
|
267
|
+
if (!this.hasUpdated) {
|
|
268
|
+
const slots = [...this.children].map((child) => child.slot);
|
|
269
|
+
this.hasIcon = slots.includes('icon');
|
|
270
|
+
this.hasAvatar = slots.includes('avatar');
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
// CHP-13: a change of condition takes the selection motion.
|
|
274
|
+
if (changed.has('selected') || changed.has('kind'))
|
|
275
|
+
markConditionChange(this.renderRoot.querySelector('.root'));
|
|
276
|
+
}
|
|
277
|
+
updated(changed) {
|
|
278
|
+
// CHP-7: a kind this spec does not have is an action chip.
|
|
279
|
+
if (changed.has('kind') && !KINDS.includes(this.kind)) {
|
|
280
|
+
report(this, 'CHP-7', `kind "${this.kind}" is not a kind of chip; it is drawn and behaves as "action"`);
|
|
281
|
+
}
|
|
282
|
+
// CHP-26: the label is the name, and an input chip's remove action is named by removeLabel. It still renders; a debug build says what is missing.
|
|
283
|
+
if (changed.has('label') && !this.label)
|
|
284
|
+
report(this, 'CHP-26', 'label is empty, so the chip has no accessible name; give it a label');
|
|
285
|
+
if ((changed.has('removeLabel') || changed.has('kind') || changed.has('removable')) && this.removes && !this.removeLabel) {
|
|
286
|
+
report(this, 'CHP-26', 'removeLabel is empty, so the remove action has no accessible name; give it one that names the item');
|
|
287
|
+
}
|
|
288
|
+
// CHP-15: only an input chip draws an avatar.
|
|
289
|
+
if ((changed.has('hasAvatar') || changed.has('kind')) && this.hasAvatar && this.effectiveKind !== 'input') {
|
|
290
|
+
report(this, 'CHP-15', `an avatar is given to a ${this.effectiveKind} chip, which ignores it; only an input chip draws one`);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
render() {
|
|
294
|
+
const kind = this.effectiveKind;
|
|
295
|
+
const avatar = kind === 'input' && this.hasAvatar;
|
|
296
|
+
const checked = this.on;
|
|
297
|
+
// The chip is a native <button> (role, focus, Enter / Space, disabled); a filter chip's is a toggle (aria-pressed).
|
|
298
|
+
// An input chip's remove action is a second, sibling <button>: nested buttons are not allowed, and a sibling's hover,
|
|
299
|
+
// focus and press stay its own (CHP-20).
|
|
300
|
+
// CHP-33: an action chip with a destination is an anchor in the button's place — the same classes, part and
|
|
301
|
+
// listeners — whose attributes are the link primitive's; a disabled one is the anchor without `href` (CHP-36).
|
|
302
|
+
const link = this.link.form;
|
|
303
|
+
const tag = link ? literal `a` : literal `button`;
|
|
304
|
+
return html `
|
|
305
|
+
<span
|
|
306
|
+
class="root ${classMap({
|
|
307
|
+
'has-lead': avatar || this.hasIcon || checked,
|
|
308
|
+
'lead-avatar': avatar,
|
|
309
|
+
checked,
|
|
310
|
+
input: this.removes,
|
|
311
|
+
destructive: this.removes && this.destructiveRemove,
|
|
312
|
+
'link-new': !!link?.opensNew,
|
|
313
|
+
})}"
|
|
314
|
+
>
|
|
315
|
+
<${tag}
|
|
316
|
+
part="container"
|
|
317
|
+
class="container"
|
|
318
|
+
type=${link ? nothing : 'button'}
|
|
319
|
+
data-tanrei-shape
|
|
320
|
+
${linkAttributes(link)}
|
|
321
|
+
aria-description=${this.link.describe() ?? nothing}
|
|
322
|
+
aria-pressed=${kind === 'filter' ? String(this.selected) : nothing}
|
|
323
|
+
?disabled=${!link && this.disabled}
|
|
324
|
+
@click=${this.onClick}
|
|
325
|
+
@pointerdown=${this.press.onPointerDown}
|
|
326
|
+
@pointerup=${this.press.release}
|
|
327
|
+
@pointercancel=${this.press.release}
|
|
328
|
+
@pointerleave=${this.press.release}
|
|
329
|
+
@keydown=${this.onKeyDown}
|
|
330
|
+
@keyup=${this.press.onKeyUp}
|
|
331
|
+
@blur=${this.press.onBlur}
|
|
332
|
+
@focus=${this.onFocus}
|
|
333
|
+
>
|
|
334
|
+
<span class="lead" aria-hidden="true">
|
|
335
|
+
<span class="lead-clip">
|
|
336
|
+
<span class="lead-item">
|
|
337
|
+
<span part="avatar" class="avatar" data-tanrei-shape><slot name="avatar" @slotchange=${this.onAvatarSlotChange}></slot></span>
|
|
338
|
+
<span class="glyphs">
|
|
339
|
+
<span part="icon" class="glyph icon"><slot name="icon" @slotchange=${this.onIconSlotChange}></slot></span>
|
|
340
|
+
<span part="check" class="glyph check">${CHECK_GLYPH}</span>
|
|
341
|
+
</span>
|
|
342
|
+
</span>
|
|
343
|
+
</span>
|
|
344
|
+
</span>
|
|
345
|
+
<span part="label" class="label" dir=${ownDirection(this.label)}>${this.label}</span>
|
|
346
|
+
<span class="trail" aria-hidden="true">${link?.opensNew ? html `<span class="glyph mark">${LINK_MARK}</span>` : nothing}</span>
|
|
347
|
+
</${tag}>
|
|
348
|
+
<button
|
|
349
|
+
part="remove"
|
|
350
|
+
class="remove"
|
|
351
|
+
type="button"
|
|
352
|
+
data-tanrei-shape
|
|
353
|
+
aria-label=${this.removeLabel || nothing}
|
|
354
|
+
?disabled=${this.disabled}
|
|
355
|
+
?hidden=${!this.removes}
|
|
356
|
+
@click=${this.onRemoveClick}
|
|
357
|
+
@pointerdown=${this.removePress.onPointerDown}
|
|
358
|
+
@pointerup=${this.removePress.release}
|
|
359
|
+
@pointercancel=${this.removePress.release}
|
|
360
|
+
@pointerleave=${this.removePress.release}
|
|
361
|
+
@keydown=${this.removePress.onKeyDown}
|
|
362
|
+
@keyup=${this.removePress.onKeyUp}
|
|
363
|
+
@blur=${this.removePress.onBlur}
|
|
364
|
+
@focus=${this.onFocus}
|
|
365
|
+
>
|
|
366
|
+
<span class="glyph" aria-hidden="true">${REMOVE_GLYPH}</span><span class="hold"></span>
|
|
367
|
+
</button>
|
|
368
|
+
</span>
|
|
369
|
+
`;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
// `autofocus` on it gives it focus when the page first loads too (src/primitives/autofocus.ts).
|
|
373
|
+
focusedAtFirst(TanreiChip);
|
|
374
|
+
if (!customElements.get('tanrei-chip'))
|
|
375
|
+
customElements.define('tanrei-chip', TanreiChip);
|
|
376
|
+
//# sourceMappingURL=chip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip.js","sourceRoot":"","sources":["../../../src/components/chip/chip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAkD,OAAO,EAAE,MAAM,KAAK,CAAC;AAC1F,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,OAAO,EA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I,CAAC,OAAO;;mDAEoB,YAAY;;;KAG1D,CAAC;IACJ,CAAC;CACF;AAED,gGAAgG;AAChG,cAAc,CAAC,UAAU,CAAC,CAAC;AAC3B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,aAAa,CAAC;IAAE,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
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_VARIANTS: readonly ['outlined', 'elevated'];
|
|
4
|
+
export declare const CORE_SIZES: readonly ['small', 'medium'];
|
|
5
|
+
/**
|
|
6
|
+
* The open axes (CHP-7): a size or variant a layer added gets its block on demand, built by the same functions
|
|
7
|
+
* as the core blocks and falling back to the default's tokens; a value the active system lacks is reported in debug builds.
|
|
8
|
+
*/
|
|
9
|
+
export declare const AXES: readonly OpenAxis[];
|
|
10
|
+
export declare const styles: import("lit").CSSResult;
|