@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,967 @@
|
|
|
1
|
+
import { css, unsafeCSS } from 'lit';
|
|
2
|
+
import { conditionBlock, focusGlow, focusRing, iconGlyph, keptLength, minimumTarget, pressHold, rippleStyles, rowTarget, stateRules } from '../../primitives/index.js';
|
|
3
|
+
import { productText } from '../../styles/product-text.js';
|
|
4
|
+
import { cornerRadius, shape } from '../../styles/shape.js';
|
|
5
|
+
// Every visual value is a token (tokens/comp/search.tokens.json). The search has one condition, `standard`, whose state
|
|
6
|
+
// tokens color the bar's parts and a suggestion row's parts; the outline width and the opacity are the component's per
|
|
7
|
+
// state. How a state looks is the active design system's decision: the search reads that state's tokens and never
|
|
8
|
+
// computes an effect (the bar shows focus by its focused outline, not by a ring).
|
|
9
|
+
const PREFIX = '--tanrei-comp-search';
|
|
10
|
+
const T = (name) => `var(${PREFIX}-${name})`;
|
|
11
|
+
const t = (name) => unsafeCSS(T(name));
|
|
12
|
+
const MOTION = `${T('motion-state-duration')} ${T('motion-state-easing')}`;
|
|
13
|
+
/** The bar's parts every state recolors: private key → token part (`--_c-h` is the container, hovered). */
|
|
14
|
+
const BAR = {
|
|
15
|
+
c: 'container-color',
|
|
16
|
+
e: 'container-elevation',
|
|
17
|
+
o: 'outline-color',
|
|
18
|
+
g: 'leading-icon-color',
|
|
19
|
+
n: 'input-color',
|
|
20
|
+
h: 'placeholder-color',
|
|
21
|
+
r: 'caret-color',
|
|
22
|
+
};
|
|
23
|
+
/** A suggestion row's parts every state recolors (prefixed, as a navigation bar's item parts are). */
|
|
24
|
+
const ROW = {
|
|
25
|
+
sc: 'suggestion-container-color',
|
|
26
|
+
si: 'suggestion-leading-icon-color',
|
|
27
|
+
sh: 'suggestion-headline-color',
|
|
28
|
+
ss: 'suggestion-supporting-text-color',
|
|
29
|
+
};
|
|
30
|
+
/** One state's value of every part of `parts` (skipping `skip`), and the component's outline width and opacity for the bar. */
|
|
31
|
+
const paint = (parts, suffix, state, { skip, outline = false } = {}) => `${Object.keys(parts)
|
|
32
|
+
.filter((key) => key !== skip)
|
|
33
|
+
.map((key) => `\n --_${key}: var(--_${key}${suffix});`)
|
|
34
|
+
.join('')}${outline ? `\n --_ow: var(${PREFIX}-${state ? `${state}-` : ''}outline-width);` : ''}${state ? `\n opacity: var(${PREFIX}-${state}-opacity);` : ''}`;
|
|
35
|
+
/**
|
|
36
|
+
* Where the bar's states are read (SRC-18): hover is the bar's, focus is the input's — gained by pointer or by keyboard
|
|
37
|
+
* alike, since a field shows where typing will go however it was focused — pressed is `data-pressed` on the bar
|
|
38
|
+
* (PressController) and disabled is the input's. `:where()` keeps every rule at the resting rule's specificity, so the
|
|
39
|
+
* order `stateRules()` writes them in is the precedence: pressed over focused over hovered, disabled over all.
|
|
40
|
+
*/
|
|
41
|
+
const onBar = (state) => state === ':hover'
|
|
42
|
+
? '.bar:where(:hover)'
|
|
43
|
+
: state === ':focus-visible'
|
|
44
|
+
? '.bar:where(:has(.input:focus))'
|
|
45
|
+
: state === ':disabled'
|
|
46
|
+
? '.bar:where(:has(.input:disabled))'
|
|
47
|
+
: `.bar:where(${state})`;
|
|
48
|
+
/**
|
|
49
|
+
* Where a suggestion's states are read (SRC-17): hover is the row's, the active suggestion (the input's active
|
|
50
|
+
* descendant) takes the focused tokens, pressed is `data-pressed` on the row. A suggestion is never disabled.
|
|
51
|
+
*/
|
|
52
|
+
const onRow = (state) => state === ':hover' ? '.option:where(:hover)' : state === ':focus-visible' ? '.option:where([data-active])' : state === ':disabled' ? '.option:where(.never)' : `.option:where(${state})`;
|
|
53
|
+
/**
|
|
54
|
+
* Where the button trigger's states are read (SRC-36): it is a native button, so hover, keyboard focus — never focus by
|
|
55
|
+
* pointer, as for a Button — `data-pressed` (PressController) and `:disabled` are its own.
|
|
56
|
+
*/
|
|
57
|
+
const onTrigger = (state) => `.trigger:where(${state})`;
|
|
58
|
+
/**
|
|
59
|
+
* Where a result's states are read (SRC-42): the row is the result's own anchor (or button), so hover, keyboard focus —
|
|
60
|
+
* which stands where a suggestion's active state stands — and `data-pressed` (the search's PressController) are its
|
|
61
|
+
* own. A result is never disabled.
|
|
62
|
+
*/
|
|
63
|
+
const onResult = (state) => (state === ':disabled' ? '.row:where(.never)' : `.row:where(${state})`);
|
|
64
|
+
/** The input's text: the value and the placeholder in input.typescale, their colors, the caret and the selection (SRC-3). */
|
|
65
|
+
const inputStyles = `
|
|
66
|
+
.input {
|
|
67
|
+
all: unset;
|
|
68
|
+
box-sizing: border-box;
|
|
69
|
+
position: relative;
|
|
70
|
+
display: block;
|
|
71
|
+
flex: 1 1 auto;
|
|
72
|
+
min-inline-size: 0;
|
|
73
|
+
margin: 0;
|
|
74
|
+
padding: 0;
|
|
75
|
+
border: 0;
|
|
76
|
+
background: none;
|
|
77
|
+
font: ${T('input-typescale-font')};
|
|
78
|
+
letter-spacing: ${T('input-typescale-letter-spacing')};
|
|
79
|
+
line-height: ${T('input-typescale-line-height')};
|
|
80
|
+
color: var(--_n);
|
|
81
|
+
caret-color: var(--_r);
|
|
82
|
+
-webkit-text-fill-color: currentcolor;
|
|
83
|
+
text-align: start;
|
|
84
|
+
white-space: nowrap;
|
|
85
|
+
cursor: inherit;
|
|
86
|
+
transition:
|
|
87
|
+
color ${MOTION},
|
|
88
|
+
caret-color ${MOTION};
|
|
89
|
+
}
|
|
90
|
+
.input:focus {
|
|
91
|
+
outline: none;
|
|
92
|
+
}
|
|
93
|
+
.input::placeholder {
|
|
94
|
+
color: var(--_h);
|
|
95
|
+
-webkit-text-fill-color: var(--_h);
|
|
96
|
+
opacity: 1;
|
|
97
|
+
/* SRC-33: the placeholder is its own run, in the direction of its first strong character, at the field's start edge. */
|
|
98
|
+
unicode-bidi: plaintext;
|
|
99
|
+
text-align: left;
|
|
100
|
+
}
|
|
101
|
+
:host(:dir(rtl)) .input::placeholder {
|
|
102
|
+
text-align: right;
|
|
103
|
+
}
|
|
104
|
+
/* SRC-3: the product's one selection pair for text entry, the text field's: the highlight and the text on it. */
|
|
105
|
+
.input::selection {
|
|
106
|
+
background: var(--tanrei-comp-input-box-selection-color);
|
|
107
|
+
color: var(--tanrei-comp-input-box-selection-content-color);
|
|
108
|
+
-webkit-text-fill-color: var(--tanrei-comp-input-box-selection-content-color);
|
|
109
|
+
}
|
|
110
|
+
/* SRC-4: the browser's own cancel button and decoration are hidden; the search draws its own clear button. */
|
|
111
|
+
.input::-webkit-search-cancel-button,
|
|
112
|
+
.input::-webkit-search-decoration {
|
|
113
|
+
appearance: none;
|
|
114
|
+
display: none;
|
|
115
|
+
}
|
|
116
|
+
.input::-ms-clear {
|
|
117
|
+
display: none;
|
|
118
|
+
}`;
|
|
119
|
+
export const styles = css `
|
|
120
|
+
:host {
|
|
121
|
+
display: block;
|
|
122
|
+
min-inline-size: 0;
|
|
123
|
+
}
|
|
124
|
+
:host([hidden]) {
|
|
125
|
+
display: none;
|
|
126
|
+
}
|
|
127
|
+
/* SRC-35: an icon trigger is as large as its Button, as an icon button in an app bar is. */
|
|
128
|
+
:host([bar='icon']) {
|
|
129
|
+
display: inline-block;
|
|
130
|
+
}
|
|
131
|
+
/* For tests and documentation: a modal view drawn in place fills the element, which stands for the window. */
|
|
132
|
+
:host([inline]) {
|
|
133
|
+
position: relative;
|
|
134
|
+
}
|
|
135
|
+
:host([inline][expanded]) {
|
|
136
|
+
display: block;
|
|
137
|
+
}
|
|
138
|
+
/* The condition's parts in every state, for the bar and for the rows. */
|
|
139
|
+
${unsafeCSS(conditionBlock(PREFIX, 'standard', { ...BAR, ...ROW }, ':host'))}
|
|
140
|
+
|
|
141
|
+
/* SRC-1: one row as wide as the layout gives it and at least container.height high, on its color, elevation and
|
|
142
|
+
corners (eased by the smoothing); each element vertically centred and container.gap from the next — its action
|
|
143
|
+
buttons container.button-gap from one another (SRC-34, below); the search glyph
|
|
144
|
+
(or the leading slot's icon button) padding-inline (padding-inline-with-button) from the start edge, the last element
|
|
145
|
+
padding-inline-with-button from the end edge when it is an icon button and padding-inline when it is the input.
|
|
146
|
+
Logical, so right-to-left mirrors the row. */
|
|
147
|
+
.bar {
|
|
148
|
+
${unsafeCSS(paint(BAR, '-r', '', { outline: true }))}
|
|
149
|
+
--_start: ${t('container-padding-inline')};
|
|
150
|
+
--_end: ${t('container-padding-inline')};
|
|
151
|
+
--_ripple: var(--_c-p);
|
|
152
|
+
box-sizing: border-box;
|
|
153
|
+
position: relative;
|
|
154
|
+
/* Its own stacking context: the ripple sits above the fill and below the content. */
|
|
155
|
+
isolation: isolate;
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
gap: ${t('container-gap')};
|
|
159
|
+
min-block-size: ${t('container-height')};
|
|
160
|
+
padding-inline: var(--_start) var(--_end);
|
|
161
|
+
${unsafeCSS(cornerRadius(`${PREFIX}-container-shape`))}
|
|
162
|
+
background: var(--_c);
|
|
163
|
+
box-shadow: var(--_e);
|
|
164
|
+
cursor: text;
|
|
165
|
+
-webkit-tap-highlight-color: transparent;
|
|
166
|
+
transition:
|
|
167
|
+
background-color ${unsafeCSS(MOTION)},
|
|
168
|
+
box-shadow ${unsafeCSS(MOTION)},
|
|
169
|
+
opacity ${unsafeCSS(MOTION)};
|
|
170
|
+
}
|
|
171
|
+
.bar[data-leading] {
|
|
172
|
+
--_start: ${t('container-padding-inline-with-button')};
|
|
173
|
+
}
|
|
174
|
+
.bar[data-end-button] {
|
|
175
|
+
--_end: ${t('container-padding-inline-with-button')};
|
|
176
|
+
}
|
|
177
|
+
.bar[hidden] {
|
|
178
|
+
display: none;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* SRC-18, SRC-20, SRC-26: each state sets every part from that state's tokens; under ripple and dim the container
|
|
182
|
+
color stays with the state under the press. */
|
|
183
|
+
${stateRules(onBar, {
|
|
184
|
+
hovered: paint(BAR, '-h', 'hovered', { outline: true }),
|
|
185
|
+
focused: paint(BAR, '-f', 'focused', { outline: true }),
|
|
186
|
+
pressed: paint(BAR, '-p', 'pressed', { outline: true }),
|
|
187
|
+
pressedContent: paint(BAR, '-p', 'pressed', { outline: true, skip: 'c' }),
|
|
188
|
+
disabled: `\n cursor: default;${paint(BAR, '-d', 'disabled', { outline: true })}`,
|
|
189
|
+
})}
|
|
190
|
+
.bar[data-pressed]:not([data-pressed='none']) :is(.outline, .glyph, .input) {
|
|
191
|
+
transition-duration: 0s;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* SRC-18: the bar's edge — clear at rest in the default system — drawn inside the bar in the state's outline color and
|
|
195
|
+
width; it is the bar's focus indicator. */
|
|
196
|
+
.outline {
|
|
197
|
+
position: absolute;
|
|
198
|
+
inset: 0;
|
|
199
|
+
box-sizing: border-box;
|
|
200
|
+
border: var(--_ow) solid var(--_o);
|
|
201
|
+
border-radius: inherit;
|
|
202
|
+
corner-shape: inherit;
|
|
203
|
+
pointer-events: none;
|
|
204
|
+
transition:
|
|
205
|
+
border-color ${unsafeCSS(MOTION)},
|
|
206
|
+
border-width ${unsafeCSS(MOTION)};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* SRC-22: the hit area meets the minimum target vertically, without changing the visual size. The content stacks above it. */
|
|
210
|
+
${minimumTarget('.bar')}
|
|
211
|
+
.glyph,
|
|
212
|
+
.leading,
|
|
213
|
+
.trailing,
|
|
214
|
+
.clear,
|
|
215
|
+
.hint,
|
|
216
|
+
.trigger-text {
|
|
217
|
+
position: relative;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/* SRC-2: the search glyph at leading-icon.size in the unselected family and fill, hidden from assistive technology. */
|
|
221
|
+
${iconGlyph('.glyph', { size: `${PREFIX}-leading-icon-size`, selected: '.never-selected', duration: `${PREFIX}-motion-state-duration`, easing: `${PREFIX}-motion-state-easing` })}
|
|
222
|
+
.glyph {
|
|
223
|
+
color: var(--_g);
|
|
224
|
+
transition:
|
|
225
|
+
color ${unsafeCSS(MOTION)},
|
|
226
|
+
font-variation-settings ${unsafeCSS(MOTION)};
|
|
227
|
+
}
|
|
228
|
+
/* SRC-30: until the icon set can draw a glyph — the search glyph, or the close and back arrow inside the clear and back
|
|
229
|
+
Buttons — nothing is drawn in its place (GlyphDrawnController sets data-drawn); every box keeps its size, so the
|
|
230
|
+
bar's layout does not change, and the Buttons stay operable and named. The button's glyph box is the Button's icon
|
|
231
|
+
box (its ::slotted rule sizes it, and it inherits the Button's icon family, fill and size). */
|
|
232
|
+
.glyph,
|
|
233
|
+
.button-glyph {
|
|
234
|
+
visibility: hidden;
|
|
235
|
+
}
|
|
236
|
+
.glyph[data-drawn],
|
|
237
|
+
.button-glyph[data-drawn] {
|
|
238
|
+
visibility: visible;
|
|
239
|
+
}
|
|
240
|
+
.button-glyph {
|
|
241
|
+
display: inline-block;
|
|
242
|
+
overflow: hidden;
|
|
243
|
+
vertical-align: top;
|
|
244
|
+
}
|
|
245
|
+
/* The ligature's own width, which GlyphDrawnController compares with the glyph box. */
|
|
246
|
+
.ink {
|
|
247
|
+
display: inline-block;
|
|
248
|
+
vertical-align: top;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* SRC-25: the slots' icon buttons keep their own tokens; the search only places them. */
|
|
252
|
+
.leading,
|
|
253
|
+
.trailing {
|
|
254
|
+
display: flex;
|
|
255
|
+
flex: none;
|
|
256
|
+
align-items: center;
|
|
257
|
+
gap: ${t('container-gap')};
|
|
258
|
+
}
|
|
259
|
+
.leading[hidden],
|
|
260
|
+
.trailing[hidden] {
|
|
261
|
+
display: none;
|
|
262
|
+
}
|
|
263
|
+
.clear {
|
|
264
|
+
flex: none;
|
|
265
|
+
}
|
|
266
|
+
/* SRC-1, SRC-34: the bar's action buttons — the clear button, then the trailing slot's — stand container.button-gap
|
|
267
|
+
from one another between their visible bounds (0 in the default system), and two of them further apart only as far
|
|
268
|
+
as each needs to keep sys.target.touch of length along the row, centred on itself, that its neighbour's does not
|
|
269
|
+
reach into: a button at least that wide touches its neighbour, a narrower one stands half of what it lacks away
|
|
270
|
+
(src/primitives/kept-length.ts; the element measures the buttons). The space is the margin of the button that
|
|
271
|
+
follows, so the row's own gap is none between them: the trailing slot's box has no gap, and takes the bar's gap
|
|
272
|
+
back after the clear button. The first action button still stands container.gap after the input and the last
|
|
273
|
+
padding-inline-with-button from the end edge; no button is widened or restyled (SRC-25), whatever the pointer. */
|
|
274
|
+
.trailing {
|
|
275
|
+
gap: 0;
|
|
276
|
+
}
|
|
277
|
+
.clear + .trailing {
|
|
278
|
+
margin-inline-start: calc(-1 * ${t('container-gap')});
|
|
279
|
+
}
|
|
280
|
+
${keptLength('.trailing ::slotted(*)', { gap: T('container-button-gap') })}
|
|
281
|
+
|
|
282
|
+
${unsafeCSS(inputStyles)}
|
|
283
|
+
|
|
284
|
+
/* SRC-18: where the focus style is glow, the glow around the bar while its input is focused (never a ring). */
|
|
285
|
+
${focusGlow((focus) => (focus === ':focus-visible' ? '.bar:has(.input:focus)' : ".bar[data-focus-style='glow']:has(.input:focus)"))}
|
|
286
|
+
|
|
287
|
+
/* SRC-37: the shortcut hint — the keyboard shortcut component, hosted (KBS-13): in its plain form: a line of text in
|
|
288
|
+
shortcut.typescale and shortcut.color, with no cap, fill or edge. In the bar it follows the input, container.gap
|
|
289
|
+
from it, only while the value is empty (the element hides it otherwise) and the input does not have focus. A press on
|
|
290
|
+
it is a press on the bar or the trigger: it takes none itself. */
|
|
291
|
+
.hint {
|
|
292
|
+
flex: none;
|
|
293
|
+
font: ${t('shortcut-typescale-font')};
|
|
294
|
+
letter-spacing: ${t('shortcut-typescale-letter-spacing')};
|
|
295
|
+
color: ${t('shortcut-color')};
|
|
296
|
+
pointer-events: none;
|
|
297
|
+
}
|
|
298
|
+
.hint[hidden],
|
|
299
|
+
.bar:has(.input:focus) .hint {
|
|
300
|
+
display: none;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/* SRC-35: the button trigger — one button as wide as its layout and at least trigger.container.height high, filled,
|
|
304
|
+
raised and rounded as the bar is; in one row, vertically centred and trigger.container.gap apart: the search glyph at
|
|
305
|
+
trigger.leading-icon.size, trigger.container.padding-inline from the start edge, the placeholder (or the label) on
|
|
306
|
+
one line taking the remaining width, then the hint, the last ending trigger.container.padding-inline from the end
|
|
307
|
+
edge. Logical, so right-to-left mirrors the row. */
|
|
308
|
+
.trigger {
|
|
309
|
+
${unsafeCSS(paint(BAR, '-r', '', { outline: true }))}
|
|
310
|
+
--_ripple: var(--_c-p);
|
|
311
|
+
appearance: none;
|
|
312
|
+
box-sizing: border-box;
|
|
313
|
+
position: relative;
|
|
314
|
+
isolation: isolate;
|
|
315
|
+
display: flex;
|
|
316
|
+
align-items: center;
|
|
317
|
+
gap: ${t('trigger-container-gap')};
|
|
318
|
+
inline-size: 100%;
|
|
319
|
+
min-block-size: ${t('trigger-container-height')};
|
|
320
|
+
margin: 0;
|
|
321
|
+
border: 0;
|
|
322
|
+
padding-block: 0;
|
|
323
|
+
padding-inline: ${t('trigger-container-padding-inline')};
|
|
324
|
+
${unsafeCSS(cornerRadius(`${PREFIX}-container-shape`))}
|
|
325
|
+
background: var(--_c);
|
|
326
|
+
box-shadow: var(--_e);
|
|
327
|
+
color: inherit;
|
|
328
|
+
font: inherit;
|
|
329
|
+
text-align: start;
|
|
330
|
+
cursor: pointer;
|
|
331
|
+
outline: none;
|
|
332
|
+
-webkit-user-select: none;
|
|
333
|
+
user-select: none;
|
|
334
|
+
-webkit-tap-highlight-color: transparent;
|
|
335
|
+
transition:
|
|
336
|
+
background-color ${unsafeCSS(MOTION)},
|
|
337
|
+
box-shadow ${unsafeCSS(MOTION)},
|
|
338
|
+
opacity ${unsafeCSS(MOTION)};
|
|
339
|
+
}
|
|
340
|
+
.trigger[hidden],
|
|
341
|
+
.trigger-icon[hidden] {
|
|
342
|
+
display: none;
|
|
343
|
+
}
|
|
344
|
+
/* SRC-36: hovered, keyboard-focused and pressed from the bar's tokens of that state, in that precedence; disabled
|
|
345
|
+
from the disabled ones. Focus is shown by the focused outline, as the bar's (SRC-18). */
|
|
346
|
+
${stateRules(onTrigger, {
|
|
347
|
+
hovered: paint(BAR, '-h', 'hovered', { outline: true }),
|
|
348
|
+
focused: paint(BAR, '-f', 'focused', { outline: true }),
|
|
349
|
+
pressed: paint(BAR, '-p', 'pressed', { outline: true }),
|
|
350
|
+
pressedContent: paint(BAR, '-p', 'pressed', { outline: true, skip: 'c' }),
|
|
351
|
+
disabled: `\n cursor: default;${paint(BAR, '-d', 'disabled', { outline: true })}`,
|
|
352
|
+
})}
|
|
353
|
+
.trigger[data-pressed]:not([data-pressed='none']) :is(.outline, .glyph, .trigger-text) {
|
|
354
|
+
transition-duration: 0s;
|
|
355
|
+
}
|
|
356
|
+
/* SRC-36, SRC-22: its hit area meets the minimum target on both axes. */
|
|
357
|
+
${minimumTarget('.trigger')}
|
|
358
|
+
.trigger .glyph {
|
|
359
|
+
--tanrei-icon-size: ${t('trigger-leading-icon-size')};
|
|
360
|
+
}
|
|
361
|
+
/* SRC-35: the trigger's text in trigger.label.typescale and the placeholder color, on one line, cut at its own end
|
|
362
|
+
where it does not fit (SRC-33: a run of its own direction, placed by the layout's). */
|
|
363
|
+
.trigger-text {
|
|
364
|
+
flex: 1 1 auto;
|
|
365
|
+
min-inline-size: 0;
|
|
366
|
+
overflow: hidden;
|
|
367
|
+
font: ${t('trigger-label-typescale-font')};
|
|
368
|
+
letter-spacing: ${t('trigger-label-typescale-letter-spacing')};
|
|
369
|
+
color: var(--_h);
|
|
370
|
+
text-overflow: ellipsis;
|
|
371
|
+
white-space: nowrap;
|
|
372
|
+
transition: color ${unsafeCSS(MOTION)};
|
|
373
|
+
}
|
|
374
|
+
${productText('.trigger-text', { align: 'start' })}
|
|
375
|
+
/* SRC-36: where the focus style is glow, the glow around the trigger while it has keyboard focus. */
|
|
376
|
+
${focusGlow((focus) => `.trigger${focus}`)}
|
|
377
|
+
|
|
378
|
+
/* SRC-19, SRC-20: press-hold is carried by an element with no transition of its own. */
|
|
379
|
+
.hold {
|
|
380
|
+
display: none;
|
|
381
|
+
}
|
|
382
|
+
${pressHold('.hold')}
|
|
383
|
+
|
|
384
|
+
/* SRC-20: the ripple, in the pressed container color of whatever was pressed (the bar or a row). */
|
|
385
|
+
${rippleStyles({ color: '--_ripple', grow: `${PREFIX}-motion-feedback-duration`, fade: `${PREFIX}-motion-state-duration`, easing: `${PREFIX}-motion-state-easing` })}
|
|
386
|
+
|
|
387
|
+
/* SRC-7: the docked view — a popover in the top layer placed under the bar by script, or in place with inline — as wide
|
|
388
|
+
as the bar, on its color, elevation and corners (eased), its content clipped to that shape and inset by the padding. */
|
|
389
|
+
.view {
|
|
390
|
+
box-sizing: border-box;
|
|
391
|
+
position: fixed;
|
|
392
|
+
inset: auto;
|
|
393
|
+
margin: 0;
|
|
394
|
+
border: 0;
|
|
395
|
+
padding: 0;
|
|
396
|
+
color: inherit;
|
|
397
|
+
flex-direction: column;
|
|
398
|
+
overflow: hidden;
|
|
399
|
+
background: ${t('view-container-color')};
|
|
400
|
+
box-shadow: ${t('view-container-elevation')};
|
|
401
|
+
${unsafeCSS(cornerRadius(`${PREFIX}-view-container-shape`))}
|
|
402
|
+
/* The placement reads its two lengths through real properties (a custom property holds an expression). */
|
|
403
|
+
scroll-margin-block-start: ${t('view-offset')};
|
|
404
|
+
scroll-margin-block-end: ${t('view-viewport-margin')};
|
|
405
|
+
}
|
|
406
|
+
.view:popover-open,
|
|
407
|
+
.view.inline {
|
|
408
|
+
display: flex;
|
|
409
|
+
}
|
|
410
|
+
.view.inline {
|
|
411
|
+
position: relative;
|
|
412
|
+
margin-block-start: ${t('view-offset')};
|
|
413
|
+
}
|
|
414
|
+
.scroll {
|
|
415
|
+
display: flex;
|
|
416
|
+
flex: 1 1 auto;
|
|
417
|
+
flex-direction: column;
|
|
418
|
+
min-block-size: 0;
|
|
419
|
+
overflow-y: auto;
|
|
420
|
+
overscroll-behavior: contain;
|
|
421
|
+
padding-block: ${t('view-padding-block')};
|
|
422
|
+
padding-inline: ${t('view-padding-inline')};
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/* SRC-23: in, the docked view fades and grows from its edge that faces the bar; out, it fades. At once where motion is reduced. */
|
|
426
|
+
.view.entering {
|
|
427
|
+
transform-origin: top;
|
|
428
|
+
animation: view-open ${t('motion-open-duration')} ${t('motion-open-easing')} both;
|
|
429
|
+
}
|
|
430
|
+
.view.entering.side-top {
|
|
431
|
+
transform-origin: bottom;
|
|
432
|
+
}
|
|
433
|
+
.view.leaving {
|
|
434
|
+
animation: view-close ${t('motion-close-duration')} ${t('motion-close-easing')} both;
|
|
435
|
+
}
|
|
436
|
+
@keyframes view-open {
|
|
437
|
+
from {
|
|
438
|
+
opacity: 0;
|
|
439
|
+
transform: scaleY(0);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
@keyframes view-close {
|
|
443
|
+
to {
|
|
444
|
+
opacity: 0;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/* SRC-9: the full-screen view — a modal <dialog> over the whole window — filled with the view's color to every edge,
|
|
449
|
+
under every inset; its content inside the safe area and above the on-screen keyboard. With inline it is drawn in
|
|
450
|
+
place, filling the element. */
|
|
451
|
+
.full {
|
|
452
|
+
box-sizing: border-box;
|
|
453
|
+
position: fixed;
|
|
454
|
+
inset: 0;
|
|
455
|
+
margin: 0;
|
|
456
|
+
inline-size: 100%;
|
|
457
|
+
block-size: 100%;
|
|
458
|
+
max-inline-size: none;
|
|
459
|
+
max-block-size: none;
|
|
460
|
+
border: 0;
|
|
461
|
+
padding: 0;
|
|
462
|
+
overflow: hidden;
|
|
463
|
+
flex-direction: column;
|
|
464
|
+
background: ${t('view-container-color')};
|
|
465
|
+
color: inherit;
|
|
466
|
+
outline: none;
|
|
467
|
+
/* SRC-23: out, it fades over the close motion — kept in the top layer and displayed until it has. */
|
|
468
|
+
opacity: 0;
|
|
469
|
+
transition-property: opacity, display, overlay;
|
|
470
|
+
transition-duration: ${t('motion-close-duration')};
|
|
471
|
+
transition-timing-function: ${t('motion-close-easing')};
|
|
472
|
+
transition-behavior: allow-discrete;
|
|
473
|
+
}
|
|
474
|
+
.full[open] {
|
|
475
|
+
display: flex;
|
|
476
|
+
opacity: 1;
|
|
477
|
+
/* SRC-23: in, it fades in over the open motion. */
|
|
478
|
+
transition-duration: ${t('motion-open-duration')};
|
|
479
|
+
transition-timing-function: ${t('motion-open-easing')};
|
|
480
|
+
}
|
|
481
|
+
@starting-style {
|
|
482
|
+
.full[open] {
|
|
483
|
+
opacity: 0;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
.full::backdrop {
|
|
487
|
+
background: transparent;
|
|
488
|
+
}
|
|
489
|
+
.full.inline {
|
|
490
|
+
position: relative;
|
|
491
|
+
inset: auto;
|
|
492
|
+
}
|
|
493
|
+
/* SRC-9: the header — the back button, the input and the clear button — at least header.height high, header.padding-inline
|
|
494
|
+
from the window's edges (and inside the safe area), container.gap apart and vertically centred, in the resting colors. */
|
|
495
|
+
.header {
|
|
496
|
+
${unsafeCSS(paint(BAR, '-r', ''))}
|
|
497
|
+
box-sizing: border-box;
|
|
498
|
+
display: flex;
|
|
499
|
+
flex: none;
|
|
500
|
+
align-items: center;
|
|
501
|
+
gap: ${t('container-gap')};
|
|
502
|
+
min-block-size: calc(${t('header-height')} + env(safe-area-inset-top, 0px));
|
|
503
|
+
padding-block-start: env(safe-area-inset-top, 0px);
|
|
504
|
+
padding-left: calc(${t('header-padding-inline')} + env(safe-area-inset-left, 0px));
|
|
505
|
+
padding-right: calc(${t('header-padding-inline')} + env(safe-area-inset-right, 0px));
|
|
506
|
+
cursor: text;
|
|
507
|
+
}
|
|
508
|
+
.header .back,
|
|
509
|
+
.header .clear {
|
|
510
|
+
flex: none;
|
|
511
|
+
}
|
|
512
|
+
/* SRC-11: the back arrow points to the start edge in right-to-left by the icon helper's own mirroring — arrow_back is
|
|
513
|
+
flagged by the icon set, and the back Button marks and mirrors its glyph (BTN-19, SRC-32). Nothing here mirrors it. */
|
|
514
|
+
/* SRC-9: a line of divider.thickness across the window under the header. */
|
|
515
|
+
.divider {
|
|
516
|
+
flex: none;
|
|
517
|
+
block-size: ${t('divider-thickness')};
|
|
518
|
+
background: ${t('divider-color')};
|
|
519
|
+
}
|
|
520
|
+
.full .scroll {
|
|
521
|
+
padding-left: calc(${t('view-padding-inline')} + env(safe-area-inset-left, 0px));
|
|
522
|
+
padding-right: calc(${t('view-padding-inline')} + env(safe-area-inset-right, 0px));
|
|
523
|
+
padding-block-end: calc(${t('view-padding-block')} + max(env(safe-area-inset-bottom, 0px), var(--_keyboard, 0px)));
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/* SRC-40: the dialog view — the same modal <dialog>, hung from the top of the window: centred between the side
|
|
527
|
+
edges, its top view.dialog.offset below the top of the safe area, as wide as the window allows up to
|
|
528
|
+
view.dialog.max-width while keeping view.viewport-margin from each side, and as tall as its content up to the room
|
|
529
|
+
left above view.viewport-margin from the bottom of the safe area or the on-screen keyboard. Where the window is too
|
|
530
|
+
short for the offset and one row of content, the offset gives way, down to view.viewport-margin. On the view's
|
|
531
|
+
color, elevation and corners (eased), its content clipped to that shape. Its top never moves with its content.
|
|
532
|
+
Percentages are of the window (of the element, drawn in place). */
|
|
533
|
+
.full.hung {
|
|
534
|
+
--_margin: ${t('view-viewport-margin')};
|
|
535
|
+
--_room: calc(100% - max(env(safe-area-inset-bottom, 0px), var(--_keyboard, 0px)));
|
|
536
|
+
--_one-row: calc(${t('header-height')} + ${t('divider-thickness')} + 2 * ${t('view-padding-block')} + ${t('suggestion-container-height')});
|
|
537
|
+
--_top: max(var(--_margin), min(calc(${t('view-dialog-offset')} + env(safe-area-inset-top, 0px)), calc(var(--_room) - var(--_margin) - var(--_one-row))));
|
|
538
|
+
inset: auto;
|
|
539
|
+
inset-block-start: var(--_top);
|
|
540
|
+
inset-inline: 0;
|
|
541
|
+
margin-inline: auto;
|
|
542
|
+
inline-size: min(${t('view-dialog-max-width')}, calc(100% - 2 * var(--_margin)));
|
|
543
|
+
block-size: auto;
|
|
544
|
+
max-block-size: calc(var(--_room) - var(--_top) - var(--_margin));
|
|
545
|
+
box-shadow: ${t('view-container-elevation')};
|
|
546
|
+
${unsafeCSS(cornerRadius(`${PREFIX}-view-container-shape`))}
|
|
547
|
+
}
|
|
548
|
+
.full.hung.inline {
|
|
549
|
+
position: absolute;
|
|
550
|
+
inset-block-start: var(--_top);
|
|
551
|
+
inset-inline: 0;
|
|
552
|
+
}
|
|
553
|
+
/* SRC-40, SRC-41: the scrim over the whole window behind it, fading with it — the dialog's backdrop, or an element
|
|
554
|
+
of its own where the view is drawn in place. */
|
|
555
|
+
.full.hung::backdrop {
|
|
556
|
+
background: ${t('view-scrim-color')};
|
|
557
|
+
opacity: 0;
|
|
558
|
+
transition-property: opacity, display, overlay;
|
|
559
|
+
transition-duration: ${t('motion-close-duration')};
|
|
560
|
+
transition-timing-function: ${t('motion-close-easing')};
|
|
561
|
+
transition-behavior: allow-discrete;
|
|
562
|
+
}
|
|
563
|
+
.full.hung[open]::backdrop {
|
|
564
|
+
opacity: 1;
|
|
565
|
+
transition-duration: ${t('motion-open-duration')};
|
|
566
|
+
transition-timing-function: ${t('motion-open-easing')};
|
|
567
|
+
}
|
|
568
|
+
@starting-style {
|
|
569
|
+
.full.hung[open]::backdrop {
|
|
570
|
+
opacity: 0;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
.scrim {
|
|
574
|
+
position: absolute;
|
|
575
|
+
inset: 0;
|
|
576
|
+
background: ${t('view-scrim-color')};
|
|
577
|
+
}
|
|
578
|
+
/* SRC-40: its header — the back button header.padding-inline from the start edge (as the full-screen header has it,
|
|
579
|
+
in the search glyph's place), the input and the clear button, container.gap apart, the last ending
|
|
580
|
+
header.padding-inline from the end edge when it is the clear button and container.padding-inline when it is the
|
|
581
|
+
input. No search glyph. */
|
|
582
|
+
.hung .header {
|
|
583
|
+
min-block-size: ${t('header-height')};
|
|
584
|
+
padding-block-start: 0;
|
|
585
|
+
padding-inline: ${t('header-padding-inline')} ${t('container-padding-inline')};
|
|
586
|
+
}
|
|
587
|
+
.hung .header[data-end-button] {
|
|
588
|
+
padding-inline-end: ${t('header-padding-inline')};
|
|
589
|
+
}
|
|
590
|
+
.hung .scroll {
|
|
591
|
+
padding-block: ${t('view-padding-block')};
|
|
592
|
+
padding-inline: ${t('view-padding-inline')};
|
|
593
|
+
}
|
|
594
|
+
/* SRC-40: with nothing under the header the view is the header alone. */
|
|
595
|
+
.hung .scroll.empty {
|
|
596
|
+
padding-block: 0;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/* SRC-47: the status row, between the suggestions and the results — inset as a suggestion's row is, taking no input
|
|
600
|
+
and no state: statusText, wrapping, in status.typescale and status.color (status.error.color while the query
|
|
601
|
+
failed), or the loading indicator at the row's start; one line of text high whether or not the indicator shows yet.
|
|
602
|
+
SRC-48: its two live regions exist from the moment the view opens, so the row itself is always there and takes no
|
|
603
|
+
room until it has something to show. */
|
|
604
|
+
.status {
|
|
605
|
+
display: flex;
|
|
606
|
+
flex: none;
|
|
607
|
+
align-items: center;
|
|
608
|
+
font: ${t('status-typescale-font')};
|
|
609
|
+
letter-spacing: ${t('status-typescale-letter-spacing')};
|
|
610
|
+
color: ${t('status-color')};
|
|
611
|
+
}
|
|
612
|
+
.status[data-shown] {
|
|
613
|
+
padding-block: ${t('suggestion-container-padding-block')};
|
|
614
|
+
padding-inline: ${t('suggestion-container-padding-inline')};
|
|
615
|
+
}
|
|
616
|
+
/* One line of the status text, whatever the row holds. */
|
|
617
|
+
.status[data-shown]::before {
|
|
618
|
+
content: '\\200b';
|
|
619
|
+
flex: none;
|
|
620
|
+
inline-size: 0;
|
|
621
|
+
}
|
|
622
|
+
.status.error {
|
|
623
|
+
color: ${t('status-error-color')};
|
|
624
|
+
}
|
|
625
|
+
.said {
|
|
626
|
+
min-inline-size: 0;
|
|
627
|
+
overflow-wrap: anywhere;
|
|
628
|
+
}
|
|
629
|
+
.spinner {
|
|
630
|
+
flex: none;
|
|
631
|
+
}
|
|
632
|
+
${productText('.said', { align: 'start' })}
|
|
633
|
+
|
|
634
|
+
/* SRC-46, SRC-50: the results and result groups, in the product's order, after the status row: one list. */
|
|
635
|
+
.results {
|
|
636
|
+
display: flex;
|
|
637
|
+
flex: none;
|
|
638
|
+
flex-direction: column;
|
|
639
|
+
}
|
|
640
|
+
.results[hidden] {
|
|
641
|
+
display: none;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
/* SRC-16: each suggestion one row, at least suggestion.container.height tall and the minimum target for its pointer,
|
|
645
|
+
padding-inline from each edge and padding-block above and below; the leading icon column (kept in every row while
|
|
646
|
+
any suggestion has an icon), then the headline over the supporting text, gap after the icon column. Its highlight is
|
|
647
|
+
rounded by suggestion.container.shape (eased). Logical, so right-to-left mirrors the row; the whole row is the hit area. */
|
|
648
|
+
.listbox {
|
|
649
|
+
display: flex;
|
|
650
|
+
flex-direction: column;
|
|
651
|
+
}
|
|
652
|
+
.option {
|
|
653
|
+
${unsafeCSS(paint(ROW, '-r', ''))}
|
|
654
|
+
--_ripple: var(--_sc-p);
|
|
655
|
+
box-sizing: border-box;
|
|
656
|
+
position: relative;
|
|
657
|
+
isolation: isolate;
|
|
658
|
+
display: flex;
|
|
659
|
+
flex: none;
|
|
660
|
+
align-items: center;
|
|
661
|
+
gap: ${t('suggestion-container-gap')};
|
|
662
|
+
padding-block: ${t('suggestion-container-padding-block')};
|
|
663
|
+
padding-inline: ${t('suggestion-container-padding-inline')};
|
|
664
|
+
${unsafeCSS(cornerRadius(`${PREFIX}-suggestion-container-shape`))}
|
|
665
|
+
background: var(--_sc);
|
|
666
|
+
cursor: pointer;
|
|
667
|
+
-webkit-user-select: none;
|
|
668
|
+
user-select: none;
|
|
669
|
+
-webkit-tap-highlight-color: transparent;
|
|
670
|
+
transition:
|
|
671
|
+
background-color ${unsafeCSS(MOTION)},
|
|
672
|
+
opacity ${unsafeCSS(MOTION)};
|
|
673
|
+
}
|
|
674
|
+
${rowTarget('.option', T('suggestion-container-height'))}
|
|
675
|
+
/* SRC-17, SRC-20: hovered, active (the focused tokens) and pressed, in that precedence. */
|
|
676
|
+
${stateRules(onRow, {
|
|
677
|
+
hovered: paint(ROW, '-h', 'hovered'),
|
|
678
|
+
focused: paint(ROW, '-f', 'focused'),
|
|
679
|
+
pressed: paint(ROW, '-p', 'pressed'),
|
|
680
|
+
pressedContent: paint(ROW, '-p', 'pressed', { skip: 'sc' }),
|
|
681
|
+
disabled: '',
|
|
682
|
+
})}
|
|
683
|
+
.option[data-pressed]:not([data-pressed='none']) :is(.option-icon, .headline, .supporting) {
|
|
684
|
+
transition-duration: 0s;
|
|
685
|
+
}
|
|
686
|
+
/* SRC-17: the focus ring inside the active suggestion's row, never animated (ring or glow, SRC-21). */
|
|
687
|
+
${focusRing((focus) => (focus === ':focus-visible' ? '.option[data-active]' : ".option[data-active][data-focus-style='glow']"), { inside: true })}
|
|
688
|
+
|
|
689
|
+
/* SRC-32: iconGlyph() mirrors a suggestion's leading glyph that GlyphMirrorController marked, in right-to-left. */
|
|
690
|
+
${iconGlyph('.option-icon', { size: `${PREFIX}-suggestion-leading-icon-size`, selected: '.never-selected', duration: `${PREFIX}-motion-state-duration`, easing: `${PREFIX}-motion-state-easing` })}
|
|
691
|
+
.option-icon {
|
|
692
|
+
color: var(--_si);
|
|
693
|
+
transition:
|
|
694
|
+
color ${unsafeCSS(MOTION)},
|
|
695
|
+
font-variation-settings ${unsafeCSS(MOTION)};
|
|
696
|
+
}
|
|
697
|
+
.option-icon.empty {
|
|
698
|
+
visibility: hidden;
|
|
699
|
+
}
|
|
700
|
+
.text {
|
|
701
|
+
display: flex;
|
|
702
|
+
flex: 1 1 auto;
|
|
703
|
+
flex-direction: column;
|
|
704
|
+
min-inline-size: 0;
|
|
705
|
+
}
|
|
706
|
+
/* SRC-16: both texts wrap and grow the row rather than being cut. */
|
|
707
|
+
.headline {
|
|
708
|
+
font: ${t('suggestion-headline-typescale-font')};
|
|
709
|
+
letter-spacing: ${t('suggestion-headline-typescale-letter-spacing')};
|
|
710
|
+
color: var(--_sh);
|
|
711
|
+
overflow-wrap: anywhere;
|
|
712
|
+
transition: color ${unsafeCSS(MOTION)};
|
|
713
|
+
}
|
|
714
|
+
.supporting {
|
|
715
|
+
font: ${t('suggestion-supporting-text-typescale-font')};
|
|
716
|
+
letter-spacing: ${t('suggestion-supporting-text-typescale-letter-spacing')};
|
|
717
|
+
color: var(--_ss);
|
|
718
|
+
overflow-wrap: anywhere;
|
|
719
|
+
transition: color ${unsafeCSS(MOTION)};
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
/* SRC-33: a suggestion's headline and supporting text are each a run of their own, in the direction of their first
|
|
723
|
+
strong character, so a left-to-right name or a number with its unit keeps its order in a right-to-left list; their
|
|
724
|
+
lines are still aligned to the layout's start edge (src/styles/product-text.ts). */
|
|
725
|
+
${productText(':is(.headline, .supporting)', { align: 'start' })}
|
|
726
|
+
|
|
727
|
+
/* SRC-29: the product's own content in the view, after the suggestions, in the headline color as its inherited
|
|
728
|
+
foreground, inset by the suggestion padding at the sides; plain text in sys.typescale.body. */
|
|
729
|
+
.content {
|
|
730
|
+
padding-inline: ${t('suggestion-container-padding-inline')};
|
|
731
|
+
color: ${t('standard-suggestion-headline-color')};
|
|
732
|
+
font: var(--tanrei-sys-typescale-body-font);
|
|
733
|
+
letter-spacing: var(--tanrei-sys-typescale-body-letter-spacing);
|
|
734
|
+
}
|
|
735
|
+
.content[hidden] {
|
|
736
|
+
display: none;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
/* SRC-21: corner smoothing, the shared rule, on the bar, the docked view and the rows. */
|
|
740
|
+
${shape}
|
|
741
|
+
|
|
742
|
+
/* SRC-18, SRC-23: where motion is reduced, the states change and the view appears and disappears at once. */
|
|
743
|
+
@media (prefers-reduced-motion: reduce) {
|
|
744
|
+
.bar,
|
|
745
|
+
.outline,
|
|
746
|
+
.glyph,
|
|
747
|
+
.input,
|
|
748
|
+
.option,
|
|
749
|
+
.option-icon,
|
|
750
|
+
.headline,
|
|
751
|
+
.supporting,
|
|
752
|
+
.trigger,
|
|
753
|
+
.trigger-text,
|
|
754
|
+
.full,
|
|
755
|
+
.full::backdrop {
|
|
756
|
+
transition: none !important;
|
|
757
|
+
}
|
|
758
|
+
.view.entering,
|
|
759
|
+
.view.leaving {
|
|
760
|
+
animation: none;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
@media (forced-colors: active) {
|
|
764
|
+
.bar {
|
|
765
|
+
border: 1px solid FieldText;
|
|
766
|
+
}
|
|
767
|
+
.bar:has(.input:focus) {
|
|
768
|
+
outline: 2px solid Highlight;
|
|
769
|
+
}
|
|
770
|
+
.trigger {
|
|
771
|
+
border: 1px solid ButtonText;
|
|
772
|
+
}
|
|
773
|
+
.trigger:focus-visible {
|
|
774
|
+
outline: 2px solid Highlight;
|
|
775
|
+
}
|
|
776
|
+
.trigger:disabled {
|
|
777
|
+
border-color: GrayText;
|
|
778
|
+
}
|
|
779
|
+
.full.hung {
|
|
780
|
+
border: 1px solid CanvasText;
|
|
781
|
+
}
|
|
782
|
+
.status.error {
|
|
783
|
+
color: CanvasText;
|
|
784
|
+
}
|
|
785
|
+
.view {
|
|
786
|
+
border: 1px solid CanvasText;
|
|
787
|
+
}
|
|
788
|
+
.option[data-active] {
|
|
789
|
+
outline: 2px solid Highlight;
|
|
790
|
+
outline-offset: -2px;
|
|
791
|
+
}
|
|
792
|
+
.divider {
|
|
793
|
+
background: CanvasText;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
`;
|
|
797
|
+
/** A suggestion element is data, as an `<option>` in a `<datalist>`: the search draws the row. */
|
|
798
|
+
export const suggestionStyles = css `
|
|
799
|
+
:host {
|
|
800
|
+
display: none !important;
|
|
801
|
+
}
|
|
802
|
+
`;
|
|
803
|
+
/**
|
|
804
|
+
* A result's row (SRC-42): a suggestion's row, from the suggestion tokens — the same geometry, colors, states, focus
|
|
805
|
+
* ring and press answer — drawn by the result itself, because the row is its own anchor. A linked group heading is the
|
|
806
|
+
* same row (SRC-44).
|
|
807
|
+
*/
|
|
808
|
+
export const rowStyles = css `
|
|
809
|
+
:host {
|
|
810
|
+
display: block;
|
|
811
|
+
min-inline-size: 0;
|
|
812
|
+
}
|
|
813
|
+
:host([hidden]) {
|
|
814
|
+
display: none;
|
|
815
|
+
}
|
|
816
|
+
${unsafeCSS(conditionBlock(PREFIX, 'standard', ROW, ':host'))}
|
|
817
|
+
|
|
818
|
+
/* SRC-42, SRC-16: one row, at least suggestion.container.height tall and the minimum target for its pointer,
|
|
819
|
+
padding-inline from each edge and padding-block above and below; the leading icon column (kept in every row of the
|
|
820
|
+
view while any suggestion or result has an icon), then the headline over the excerpt. The whole row is the hit area. */
|
|
821
|
+
.row {
|
|
822
|
+
${unsafeCSS(paint(ROW, '-r', ''))}
|
|
823
|
+
--_ripple: var(--_sc-p);
|
|
824
|
+
appearance: none;
|
|
825
|
+
box-sizing: border-box;
|
|
826
|
+
position: relative;
|
|
827
|
+
isolation: isolate;
|
|
828
|
+
display: flex;
|
|
829
|
+
align-items: center;
|
|
830
|
+
gap: ${t('suggestion-container-gap')};
|
|
831
|
+
inline-size: 100%;
|
|
832
|
+
margin: 0;
|
|
833
|
+
border: 0;
|
|
834
|
+
padding-block: ${t('suggestion-container-padding-block')};
|
|
835
|
+
padding-inline: ${t('suggestion-container-padding-inline')};
|
|
836
|
+
${unsafeCSS(cornerRadius(`${PREFIX}-suggestion-container-shape`))}
|
|
837
|
+
background: var(--_sc);
|
|
838
|
+
color: inherit;
|
|
839
|
+
font: inherit;
|
|
840
|
+
text-align: start;
|
|
841
|
+
text-decoration: none;
|
|
842
|
+
cursor: pointer;
|
|
843
|
+
outline: none;
|
|
844
|
+
-webkit-tap-highlight-color: transparent;
|
|
845
|
+
transition:
|
|
846
|
+
background-color ${unsafeCSS(MOTION)},
|
|
847
|
+
opacity ${unsafeCSS(MOTION)};
|
|
848
|
+
}
|
|
849
|
+
${rowTarget('.row', T('suggestion-container-height'))}
|
|
850
|
+
/* SRC-42: hovered, focused (where a suggestion is active) and pressed, in that precedence (SRC-17, SRC-20). */
|
|
851
|
+
${stateRules(onResult, {
|
|
852
|
+
hovered: paint(ROW, '-h', 'hovered'),
|
|
853
|
+
focused: paint(ROW, '-f', 'focused'),
|
|
854
|
+
pressed: paint(ROW, '-p', 'pressed'),
|
|
855
|
+
pressedContent: paint(ROW, '-p', 'pressed', { skip: 'sc' }),
|
|
856
|
+
disabled: '',
|
|
857
|
+
})}
|
|
858
|
+
.row[data-pressed]:not([data-pressed='none']) :is(.icon, .headline, .excerpt) {
|
|
859
|
+
transition-duration: 0s;
|
|
860
|
+
}
|
|
861
|
+
/* SRC-42, SRC-49: the focus ring inside the focused result's row, never animated (ring or glow, SRC-21). */
|
|
862
|
+
${focusRing((focus) => `.row${focus}`, { inside: true })}
|
|
863
|
+
|
|
864
|
+
/* SRC-32: iconGlyph() mirrors a leading glyph the element marked, in right-to-left. */
|
|
865
|
+
${iconGlyph('.icon', { size: `${PREFIX}-suggestion-leading-icon-size`, selected: '.never-selected', duration: `${PREFIX}-motion-state-duration`, easing: `${PREFIX}-motion-state-easing` })}
|
|
866
|
+
.icon {
|
|
867
|
+
color: var(--_si);
|
|
868
|
+
transition:
|
|
869
|
+
color ${unsafeCSS(MOTION)},
|
|
870
|
+
font-variation-settings ${unsafeCSS(MOTION)};
|
|
871
|
+
}
|
|
872
|
+
.icon.empty {
|
|
873
|
+
visibility: hidden;
|
|
874
|
+
}
|
|
875
|
+
.text {
|
|
876
|
+
display: flex;
|
|
877
|
+
flex: 1 1 auto;
|
|
878
|
+
flex-direction: column;
|
|
879
|
+
min-inline-size: 0;
|
|
880
|
+
}
|
|
881
|
+
.headline {
|
|
882
|
+
font: ${t('suggestion-headline-typescale-font')};
|
|
883
|
+
letter-spacing: ${t('suggestion-headline-typescale-letter-spacing')};
|
|
884
|
+
color: var(--_sh);
|
|
885
|
+
overflow-wrap: anywhere;
|
|
886
|
+
transition: color ${unsafeCSS(MOTION)};
|
|
887
|
+
}
|
|
888
|
+
/* SRC-43: the excerpt — one continuous text that wraps as one, in the supporting text's style and color. */
|
|
889
|
+
.excerpt {
|
|
890
|
+
display: block;
|
|
891
|
+
font: ${t('suggestion-supporting-text-typescale-font')};
|
|
892
|
+
letter-spacing: ${t('suggestion-supporting-text-typescale-letter-spacing')};
|
|
893
|
+
color: var(--_ss);
|
|
894
|
+
overflow-wrap: anywhere;
|
|
895
|
+
transition: color ${unsafeCSS(MOTION)};
|
|
896
|
+
}
|
|
897
|
+
/* SRC-43: a match — in result.mark.color, its weight raised by result.mark.emphasis, over a fill of
|
|
898
|
+
result.mark.container.color that covers its own line boxes: square, unpadded, so it moves no text. The runs the
|
|
899
|
+
element writes are <mark>s of its own; the product's are its child content. */
|
|
900
|
+
mark,
|
|
901
|
+
::slotted(mark) {
|
|
902
|
+
margin: 0;
|
|
903
|
+
border-radius: 0;
|
|
904
|
+
padding: 0;
|
|
905
|
+
background-color: ${t('result-mark-container-color')};
|
|
906
|
+
color: ${t('result-mark-color')};
|
|
907
|
+
font-weight: calc(${t('suggestion-supporting-text-typescale-font-weight')} + ${t('result-mark-emphasis')});
|
|
908
|
+
}
|
|
909
|
+
/* SRC-43, SRC-33: the headline and the whole excerpt are each text of their own direction, aligned by the layout's. */
|
|
910
|
+
${productText(':is(.headline, .excerpt)', { align: 'start' })}
|
|
911
|
+
|
|
912
|
+
/* SRC-20: the ripple, in the pressed container color. */
|
|
913
|
+
${rippleStyles({ color: '--_ripple', grow: `${PREFIX}-motion-feedback-duration`, fade: `${PREFIX}-motion-state-duration`, easing: `${PREFIX}-motion-state-easing` })}
|
|
914
|
+
|
|
915
|
+
/* SRC-21: corner smoothing, the shared rule. */
|
|
916
|
+
${shape}
|
|
917
|
+
|
|
918
|
+
@media (prefers-reduced-motion: reduce) {
|
|
919
|
+
.row,
|
|
920
|
+
.icon,
|
|
921
|
+
.headline,
|
|
922
|
+
.excerpt {
|
|
923
|
+
transition: none !important;
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
@media (forced-colors: active) {
|
|
927
|
+
.row:focus-visible {
|
|
928
|
+
outline: 2px solid Highlight;
|
|
929
|
+
outline-offset: -2px;
|
|
930
|
+
}
|
|
931
|
+
mark,
|
|
932
|
+
::slotted(mark) {
|
|
933
|
+
background-color: Mark;
|
|
934
|
+
color: MarkText;
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
`;
|
|
938
|
+
/**
|
|
939
|
+
* A result group (SRC-44): its heading — a quiet title, or a result's row while it has a destination — then its
|
|
940
|
+
* results, group.gap from what stands above and below it in the view; under a linked heading they step in by
|
|
941
|
+
* group.indent, hit areas and highlights with them.
|
|
942
|
+
*/
|
|
943
|
+
export const groupStyles = css `
|
|
944
|
+
.group.before {
|
|
945
|
+
padding-block-start: ${t('group-gap')};
|
|
946
|
+
}
|
|
947
|
+
.group.after {
|
|
948
|
+
padding-block-end: ${t('group-gap')};
|
|
949
|
+
}
|
|
950
|
+
.title {
|
|
951
|
+
padding-block: ${t('suggestion-container-padding-block')};
|
|
952
|
+
padding-inline: ${t('suggestion-container-padding-inline')};
|
|
953
|
+
font: ${t('group-title-typescale-font')};
|
|
954
|
+
letter-spacing: ${t('group-title-typescale-letter-spacing')};
|
|
955
|
+
color: ${t('group-title-color')};
|
|
956
|
+
overflow-wrap: anywhere;
|
|
957
|
+
}
|
|
958
|
+
${productText('.title', { align: 'start' })}
|
|
959
|
+
.list {
|
|
960
|
+
display: flex;
|
|
961
|
+
flex-direction: column;
|
|
962
|
+
}
|
|
963
|
+
.group.linked .list {
|
|
964
|
+
padding-inline-start: ${t('group-indent')};
|
|
965
|
+
}
|
|
966
|
+
`;
|
|
967
|
+
//# sourceMappingURL=search.styles.js.map
|