@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,358 @@
|
|
|
1
|
+
import { html, nothing, unsafeCSS } from 'lit';
|
|
2
|
+
// The requirement tag is the Tag component, as it is (FLD-5, FGR-5): nothing of it is set here. This module is therefore not re-exported by
|
|
3
|
+
// `primitives/index.ts` (the tag's own styles import that file): a component imports it by its path.
|
|
4
|
+
import '../components/tag/tag.js';
|
|
5
|
+
import { iconGlyph } from '../styles/icons.js';
|
|
6
|
+
import { productText } from '../styles/product-text.js';
|
|
7
|
+
import { compChoice, whenChosen } from './actions.js';
|
|
8
|
+
import { report } from './report.js';
|
|
9
|
+
// The field frame: what a form gives every control — a label above it that can say the control is
|
|
10
|
+
// required or optional, a line of help, the reason a value was refused — drawn once, here, for every component that
|
|
11
|
+
// draws it:
|
|
12
|
+
//
|
|
13
|
+
// <tanrei-field> around one control of the product's (FLD-2 … FLD-13), from `--tanrei-comp-field-*`
|
|
14
|
+
// <tanrei-field-group> around a set, as a legend, a description and one error (FGR-2 … FGR-9), from
|
|
15
|
+
// `--tanrei-comp-field-group-*`; a radio group draws the same rows from the same tokens
|
|
16
|
+
// a component that is a field itself (a select, a combobox, a number field, a color field) draws these rows as part
|
|
17
|
+
// of itself, from its OWN tokens of the same names: it passes its own prefix.
|
|
18
|
+
//
|
|
19
|
+
// Nothing here knows which component it is drawn for. A component gives:
|
|
20
|
+
// - its token prefix (`--tanrei-comp-select`); every length, text style and choice is read from it by the frame's
|
|
21
|
+
// names (`label.gap`, `requirement.gap`, `supporting-text.typescale` …);
|
|
22
|
+
// - the current color of each part as a private custom property (`--_frame-label` …), which `frameColors()` writes
|
|
23
|
+
// from the tokens of the look and state the component is in;
|
|
24
|
+
// - the rows, where it wants them: `frameLabelRow()`, `frameText()`, `frameAnnouncer()`.
|
|
25
|
+
// What reaches assistive technology is the component's to wire, because it depends on where its semantics are: ids in
|
|
26
|
+
// one shadow root (`aria-labelledby` / `aria-describedby` to the rows' ids) for a component whose control is in its own
|
|
27
|
+
// root; strings through `primitives/field.ts` for a control in another tree.
|
|
28
|
+
/** What the form asks of a control (FLD-4). The first value is what an unknown one behaves as (FLD-22). */
|
|
29
|
+
export const REQUIREMENTS = ['none', 'required', 'optional'];
|
|
30
|
+
/** How a required control is marked (FLD-6). The first value is what an unknown one behaves as (FLD-22). */
|
|
31
|
+
export const REQUIRED_MARKS = ['auto', 'tag', 'asterisk', 'none'];
|
|
32
|
+
/**
|
|
33
|
+
* `comp.<name>.requirement.mark`, the design system's answer — the component's token, which follows
|
|
34
|
+
* `sys.behavior.requirement-mark` unless a layer sets it apart: the first value is what an unknown name
|
|
35
|
+
* falls back to.
|
|
36
|
+
*/
|
|
37
|
+
export const SYSTEM_MARKS = ['tag', 'asterisk', 'none'];
|
|
38
|
+
/**
|
|
39
|
+
* FLD-24 and its copies: the frame's props with its two words read — the instance's prop, else the product's words
|
|
40
|
+
* (`setWords()`), else nothing. Tanrei has no words of its own: every function of the frame takes what this returns.
|
|
41
|
+
*/
|
|
42
|
+
export function frameWithWords(props, words) {
|
|
43
|
+
return {
|
|
44
|
+
label: props.label,
|
|
45
|
+
labelHidden: props.labelHidden,
|
|
46
|
+
supportingText: props.supportingText,
|
|
47
|
+
errorText: props.errorText,
|
|
48
|
+
error: props.error,
|
|
49
|
+
requirement: props.requirement,
|
|
50
|
+
requiredMark: props.requiredMark,
|
|
51
|
+
requiredText: words.get('requiredText', props.requiredText),
|
|
52
|
+
optionalText: words.get('optionalText', props.optionalText),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/** FLD-4, FLD-22: the requirement, an unknown value behaving as none. */
|
|
56
|
+
export const frameRequirement = (props) => REQUIREMENTS.includes(props.requirement) ? props.requirement : 'none';
|
|
57
|
+
/** FLD-2: the label row is drawn. */
|
|
58
|
+
export const frameLabelled = (props) => !!props.label && !props.labelHidden;
|
|
59
|
+
/**
|
|
60
|
+
* FLD-6, FLD-22: the required mark this frame draws — `auto` leaves it to the styles, which read the design system's
|
|
61
|
+
* choice; `none` while the control is not required or the label is not drawn. An unknown value behaves as auto.
|
|
62
|
+
*/
|
|
63
|
+
export function frameMark(props) {
|
|
64
|
+
if (frameRequirement(props) !== 'required' || !frameLabelled(props))
|
|
65
|
+
return 'none';
|
|
66
|
+
return REQUIRED_MARKS.includes(props.requiredMark) ? props.requiredMark : 'auto';
|
|
67
|
+
}
|
|
68
|
+
/** FLD-7, FLD-31: the error text the supporting row shows below the help, which stays — `errorText` while the frame is in error; nothing otherwise. */
|
|
69
|
+
export const frameErrorText = (props) => (props.error ? props.errorText : '');
|
|
70
|
+
/** FLD-4, FLD-11: the optional text that joins the description (assistive technology has no state for it). */
|
|
71
|
+
export const frameOptionalText = (props) => (frameRequirement(props) === 'optional' ? props.optionalText : '');
|
|
72
|
+
/**
|
|
73
|
+
* The debug reports every frame makes about its own props (FLD-22, FLD-24 and their copies): an unknown requirement or
|
|
74
|
+
* required mark, and a requirement word that neither the instance nor the product's words gave (recorded for
|
|
75
|
+
* `missingWords()` in every build). `props` are the frame's with its words read (`frameWithWords()`); `ids` are the
|
|
76
|
+
* component's own behaviour ids for the two sentences and `prefix` its token prefix. The required word is needed only
|
|
77
|
+
* where the tag would be drawn — the mark is tag, by the frame's own prop or by the design system's answer, and the
|
|
78
|
+
* label row is drawn (`row`: false for a label that floats) — or, for a frame that says the requirement in words
|
|
79
|
+
* whichever mark is drawn (`always`: a field group, which has no required state — FGR-24), wherever it is required.
|
|
80
|
+
*/
|
|
81
|
+
export function reportFrame(host, props, changed, ids, words, { prefix, always = false, row = true, tag = 'tag' }) {
|
|
82
|
+
const has = (name) => changed.has(name);
|
|
83
|
+
if (has('requirement') && !REQUIREMENTS.includes(props.requirement)) {
|
|
84
|
+
report(host, ids.unknown, `requirement "${props.requirement}" is not none, required or optional; it behaves as "none"`);
|
|
85
|
+
}
|
|
86
|
+
if (has('requiredMark') && !REQUIRED_MARKS.includes(props.requiredMark)) {
|
|
87
|
+
report(host, ids.unknown, `requiredMark "${props.requiredMark}" is not auto, tag, asterisk or none; it behaves as "auto"`);
|
|
88
|
+
}
|
|
89
|
+
const mark = frameMark(props);
|
|
90
|
+
const asked = frameRequirement(props);
|
|
91
|
+
// The design system's answer is read from the cascade only where a word is missing.
|
|
92
|
+
const tagged = () => row && (mark === 'tag' || (mark === 'auto' && compChoice(host, `${prefix}-requirement-mark`, SYSTEM_MARKS) === 'tag'));
|
|
93
|
+
if (!props.requiredText && ((always && asked === 'required') || tagged())) {
|
|
94
|
+
words.missing('requiredText', {
|
|
95
|
+
id: ids.words,
|
|
96
|
+
effect: always
|
|
97
|
+
? `no required ${tag} is drawn, and nothing says the requirement to assistive technology, because a group has no required state`
|
|
98
|
+
: `the asterisk is drawn where the required ${tag} would be, and the required state is kept`,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
if (asked === 'optional' && !props.optionalText)
|
|
102
|
+
words.missing('optionalText', { id: ids.words, effect: `no optional ${tag} is drawn and nothing is added to the description` });
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* The label row (FLD-2, FLD-3, FLD-5, FLD-6): the glyph, the label with the asterisk as its last character, and the
|
|
106
|
+
* requirement tag — a `<tanrei-tag size="small">`, filled for required and tonal for optional, with nothing of the
|
|
107
|
+
* frame's set on it: it reads the Tag's tokens as every tag does. It stands in a box one label line high
|
|
108
|
+
* (`.requirement-box`), which is what the row's layout sees of it. `nothing` while the label is not drawn. Under `requiredMark: auto` both marks
|
|
109
|
+
* are in the row and the styles draw the one the design system names. The asterisk and the tag are kept from assistive
|
|
110
|
+
* technology: the required state, or the description, says what they say.
|
|
111
|
+
*/
|
|
112
|
+
export function frameLabelRow(row) {
|
|
113
|
+
if (!frameLabelled(row))
|
|
114
|
+
return nothing;
|
|
115
|
+
const asked = frameRequirement(row);
|
|
116
|
+
const mark = frameMark(row);
|
|
117
|
+
// FLD-24: without the word, the asterisk stands in the tag's place — as the frame's own mark (tag), or as the
|
|
118
|
+
// design system's (auto: the styles draw it unless the system marks none).
|
|
119
|
+
const wordless = (mark === 'tag' || mark === 'auto') && !row.requiredText;
|
|
120
|
+
const asterisk = mark === 'asterisk' || mark === 'auto' || wordless ? html `<span part="requirement-label" class="asterisk" aria-hidden="true">*</span>` : nothing;
|
|
121
|
+
const tag = (mark === 'tag' || mark === 'auto') && row.requiredText
|
|
122
|
+
? html `<span class="requirement-box required-box"><tanrei-tag part="requirement-label" class="requirement-tag required-tag" size="small" variant="filled" label=${row.requiredText} aria-hidden="true"></tanrei-tag></span>`
|
|
123
|
+
: asked === 'optional' && row.optionalText
|
|
124
|
+
? html `<span class="requirement-box optional-box"><tanrei-tag part="requirement-label" class="requirement-tag optional-tag" size="small" variant="tonal" label=${row.optionalText} aria-hidden="true"></tanrei-tag></span>`
|
|
125
|
+
: nothing;
|
|
126
|
+
return html `<span class="label-row" ?data-tag=${tag !== nothing} ?data-label-icon=${!!row.hasGlyph} data-mark=${mark} ?data-wordless=${wordless} aria-disabled=${row.disabled ? 'true' : nothing} @mousedown=${row.onPress ?? nothing}>
|
|
127
|
+
${row.glyph ?? nothing}<span part="label" class="label" id=${row.labelId ?? nothing} aria-hidden=${row.labelHidden_ ? 'true' : nothing}>${row.label}${asterisk}</span>${tag}
|
|
128
|
+
</span>`;
|
|
129
|
+
}
|
|
130
|
+
/** The label glyph's box around the `label-icon` slot (FLD-3): decorative, drawn by the icon helper. */
|
|
131
|
+
export const frameLabelIcon = (onSlotChange) => html `<span part="label-icon" class="label-icon" aria-hidden="true"><slot name="label-icon" @slotchange=${onSlotChange}></slot></span>`;
|
|
132
|
+
/** A row of the frame's small text (FLD-7; a group's description and its error): `nothing` while it has no text. */
|
|
133
|
+
export function frameText(text, { id, part = 'supporting-text', className = 'supporting-text', disabled = false }) {
|
|
134
|
+
return text ? html `<div part=${part} class=${className} id=${id} aria-disabled=${disabled ? 'true' : nothing}>${text}</div>` : nothing;
|
|
135
|
+
}
|
|
136
|
+
/** What is announced politely and drawn nowhere (FLD-9). */
|
|
137
|
+
export const frameAnnouncer = () => html `<span class="announcer" role="status" aria-live="polite"></span>`;
|
|
138
|
+
/**
|
|
139
|
+
* FLD-9: has assistive technology read `text` once, politely. A new text node in a cleared region is announced even
|
|
140
|
+
* when it repeats the last one. The caller decides when: an error that appeared, or changed its words, while focus is
|
|
141
|
+
* inside the frame.
|
|
142
|
+
*/
|
|
143
|
+
export function frameAnnounce(root, text) {
|
|
144
|
+
const region = root.querySelector('.announcer');
|
|
145
|
+
if (!region || !text)
|
|
146
|
+
return;
|
|
147
|
+
region.textContent = '';
|
|
148
|
+
requestAnimationFrame(() => (region.textContent = text));
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* FLD-6 for a browser without style queries: the design system's required mark, by name, on the label row
|
|
152
|
+
* (`data-required-mark`), which the styles read where the query is missing. Call it after every render.
|
|
153
|
+
*/
|
|
154
|
+
export function syncFrameMark(host, root, prefix) {
|
|
155
|
+
const row = root.querySelector('.label-row');
|
|
156
|
+
if (!row)
|
|
157
|
+
return;
|
|
158
|
+
if (row.dataset.mark === 'auto')
|
|
159
|
+
row.dataset.requiredMark = compChoice(host, `${prefix}-requirement-mark`, SYSTEM_MARKS);
|
|
160
|
+
else
|
|
161
|
+
delete row.dataset.requiredMark;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* The parts of the frame that a look and a state color, by the names their tokens have. The requirement tag is not one:
|
|
165
|
+
* it is a Tag and takes the Tag's colors (FLD-5).
|
|
166
|
+
*/
|
|
167
|
+
export const FRAME_PARTS = ['label', 'label-icon', 'supporting-text', 'required-asterisk'];
|
|
168
|
+
/**
|
|
169
|
+
* The current color of every part, as `--_frame-<part>`, from the tokens of the look (plain, or `error.`) and the state
|
|
170
|
+
* (resting, focused, disabled) the component is in: `<prefix>-<variant>-[<state>-][error-]<part>-color`. The component
|
|
171
|
+
* never computes how a state looks (FLD-8, FLD-13, FLD-14). `plain` names the parts that have no `error.` form of
|
|
172
|
+
* their own — the error text, which is drawn only in error (`<prefix>-<variant>-[<state>-]error-text-color`): they
|
|
173
|
+
* take the same token in both looks. `fallback` names the variant whose token is read where the
|
|
174
|
+
* active design system has none for `variant` — a value a layer added that another system lacks.
|
|
175
|
+
*/
|
|
176
|
+
export function frameColors(prefix, variant, on, parts = FRAME_PARTS, fallback = null, plain = []) {
|
|
177
|
+
const token = (look, state, error, part) => `${prefix}-${look}-${state ? `${state}-` : ''}${error && !plain.includes(part) ? 'error-' : ''}${part}-color`;
|
|
178
|
+
const value = (state, error, part) => (fallback ? `var(${token(variant, state, error, part)}, var(${token(fallback, state, error, part)}))` : `var(${token(variant, state, error, part)})`);
|
|
179
|
+
const block = (selector, state, error) => selector ? `${selector} {\n${parts.map((part) => ` --_frame-${part}: ${value(state, error, part)};`).join('\n')}\n }` : '';
|
|
180
|
+
return unsafeCSS([block(on.rest, '', false), block(on.error, '', true), block(on.focused, 'focused', false), block(on.focusedError, 'focused', true), block(on.disabled, 'disabled', false), block(on.disabledError, 'disabled', true)]
|
|
181
|
+
.filter(Boolean)
|
|
182
|
+
.join('\n '));
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* The frame's styles: the label row with its glyph, its asterisk and its requirement tag, the supporting text, and the
|
|
186
|
+
* announcer. Every length, text style and choice is a token of `prefix`; every color is the `--_frame-*` property
|
|
187
|
+
* `frameColors()` wrote. The private names start with `--_frame-` because a control in the default slot inherits them.
|
|
188
|
+
*/
|
|
189
|
+
export function frameStyles({ prefix, label, motion, glyph = false, disabled }) {
|
|
190
|
+
const T = (name) => `var(${prefix}-${name})`;
|
|
191
|
+
const font = label?.font ?? T('label-typescale-font');
|
|
192
|
+
const tracking = label?.letterSpacing ?? T('label-typescale-letter-spacing');
|
|
193
|
+
const line = label?.line ?? `calc(${T('label-typescale-line-height')} * ${T('label-typescale-font-size')})`;
|
|
194
|
+
const timing = motion === undefined ? { duration: T('motion-state-duration'), easing: T('motion-state-easing') } : motion;
|
|
195
|
+
const recolor = (...properties) => (timing ? `transition: ${properties.map((p) => `${p} ${timing.duration} ${timing.easing}`).join(', ')};` : '');
|
|
196
|
+
const MARK = `${prefix}-requirement-mark`;
|
|
197
|
+
return unsafeCSS(`
|
|
198
|
+
/* FLD-2: the label above the control, from the start edge, in the label's text style and color, label.gap above what
|
|
199
|
+
follows; it wraps rather than being cut and never moves. */
|
|
200
|
+
.label-row {
|
|
201
|
+
--_frame-label-line: ${line};
|
|
202
|
+
display: flex;
|
|
203
|
+
align-items: flex-start;
|
|
204
|
+
min-inline-size: 0;
|
|
205
|
+
margin-block-end: ${T('label-gap')};
|
|
206
|
+
cursor: default;
|
|
207
|
+
}
|
|
208
|
+
.label {
|
|
209
|
+
flex: 1 1 auto;
|
|
210
|
+
min-inline-size: 0;
|
|
211
|
+
overflow-wrap: break-word;
|
|
212
|
+
font: ${font};
|
|
213
|
+
letter-spacing: ${tracking};
|
|
214
|
+
color: var(--_frame-label);
|
|
215
|
+
${recolor('color')}
|
|
216
|
+
}
|
|
217
|
+
/* FLD-5: the requirement tag after the label's text, requirement.gap from it, centred on the label's line: the Tag
|
|
218
|
+
component at its small size, filled for required and tonal for optional, drawn from the Tag's own tokens — nothing
|
|
219
|
+
of the tag is set here, no token and no size, and its height is never read. What the row lays out is
|
|
220
|
+
a box one label line high around the tag, which centres it: a tag taller than the line reaches equally above and
|
|
221
|
+
below it and never makes the label's row taller. When the label and the tag do not fit on one line the label wraps
|
|
222
|
+
and the box moves, whole, to a line of its own after it. */
|
|
223
|
+
.label-row[data-tag] {
|
|
224
|
+
flex-wrap: wrap;
|
|
225
|
+
}
|
|
226
|
+
/* The gaps are the label's margins — outside its box, whose text is laid out by its own direction (FLD-21): padding
|
|
227
|
+
on that box is misplaced by WebKit for a left-to-right label in a right-to-left form. */
|
|
228
|
+
.label-row[data-tag] .label {
|
|
229
|
+
flex: 0 1 auto;
|
|
230
|
+
margin-inline-end: ${T('requirement-gap')};
|
|
231
|
+
}
|
|
232
|
+
.requirement-box {
|
|
233
|
+
display: flex;
|
|
234
|
+
flex: none;
|
|
235
|
+
align-items: center;
|
|
236
|
+
block-size: var(--_frame-label-line);
|
|
237
|
+
}
|
|
238
|
+
.requirement-tag {
|
|
239
|
+
flex: none;
|
|
240
|
+
}
|
|
241
|
+
/* FLD-6: the asterisk after the label's text, requirement.asterisk-gap from it, in the label's own text style — it is
|
|
242
|
+
part of the label. */
|
|
243
|
+
.asterisk {
|
|
244
|
+
margin-inline-start: ${T('requirement-asterisk-gap')};
|
|
245
|
+
color: var(--_frame-required-asterisk);
|
|
246
|
+
${recolor('color')}
|
|
247
|
+
}
|
|
248
|
+
/* FLD-6: a frame that does not say (requiredMark auto, data-mark="auto") draws the mark requirement.mark names — the
|
|
249
|
+
tag, the first value; the asterisk; or none. A style query where the browser has them, and the name the script
|
|
250
|
+
read (data-required-mark) where it has not. */
|
|
251
|
+
.label-row[data-mark='auto'] .asterisk {
|
|
252
|
+
display: none;
|
|
253
|
+
}
|
|
254
|
+
/* FLD-24: a frame that has no word for the tag draws the asterisk in its place — unless the system marks none, whose
|
|
255
|
+
rule follows and is as specific. */
|
|
256
|
+
.label-row[data-mark='auto']:where([data-wordless]) .asterisk {
|
|
257
|
+
display: inline;
|
|
258
|
+
}
|
|
259
|
+
${whenChosen(MARK, ".label-row[data-mark='auto']", 'required-mark', 'asterisk', (row) => `
|
|
260
|
+
${row} :is(.required-box, .required-tag) {
|
|
261
|
+
display: none;
|
|
262
|
+
}
|
|
263
|
+
${row} .asterisk {
|
|
264
|
+
display: inline;
|
|
265
|
+
}`)}
|
|
266
|
+
${whenChosen(MARK, ".label-row[data-mark='auto']", 'required-mark', 'none', (row) => `
|
|
267
|
+
${row} :is(.required-box, .required-tag, .asterisk) {
|
|
268
|
+
display: none;
|
|
269
|
+
}`)}
|
|
270
|
+
${glyph
|
|
271
|
+
? `
|
|
272
|
+
/* FLD-3: a glyph of the icon set before the label, label-icon.gap away, at label-icon.size, centred on the label's
|
|
273
|
+
first line, in the label-icon color; FLD-20: mirrored by the icon helper, in its own box. */
|
|
274
|
+
${iconGlyph('.label-icon', { size: `${prefix}-label-icon-size`, selected: '.never-selected', ...(timing ? { duration: `${prefix}-motion-state-duration`, easing: `${prefix}-motion-state-easing` } : {}) })}
|
|
275
|
+
.label-icon {
|
|
276
|
+
display: none;
|
|
277
|
+
margin-block-start: calc((var(--_frame-label-line) - ${T('label-icon-size')}) / 2);
|
|
278
|
+
color: var(--_frame-label-icon);
|
|
279
|
+
${recolor('color', 'font-variation-settings')}
|
|
280
|
+
}
|
|
281
|
+
.label-row[data-label-icon] .label-icon {
|
|
282
|
+
display: inline-block;
|
|
283
|
+
}
|
|
284
|
+
/* The gap is the row's: the glyph's box lays its glyph out left to right, whatever the frame's direction. Beside a
|
|
285
|
+
tag the row's gap would stand between the label and the tag too: there the label keeps it. */
|
|
286
|
+
.label-row[data-label-icon] {
|
|
287
|
+
column-gap: ${T('label-icon-gap')};
|
|
288
|
+
}
|
|
289
|
+
.label-row[data-label-icon][data-tag] {
|
|
290
|
+
column-gap: 0;
|
|
291
|
+
}
|
|
292
|
+
.label-row[data-label-icon][data-tag] .label {
|
|
293
|
+
margin-inline-start: ${T('label-icon-gap')};
|
|
294
|
+
}
|
|
295
|
+
.label-icon ::slotted(svg),
|
|
296
|
+
.label-icon ::slotted(img) {
|
|
297
|
+
display: block;
|
|
298
|
+
inline-size: ${T('label-icon-size')};
|
|
299
|
+
block-size: ${T('label-icon-size')};
|
|
300
|
+
}`
|
|
301
|
+
: ''}
|
|
302
|
+
|
|
303
|
+
/* FLD-7, FLD-31: a row of the frame's small text — the help, the error text — supporting-text.gap below what it
|
|
304
|
+
follows unless the component places it, in the supporting text's style and its own color, wrapping and never cut. */
|
|
305
|
+
.supporting-text {
|
|
306
|
+
margin-block-start: ${T('supporting-text-gap')};
|
|
307
|
+
min-inline-size: 0;
|
|
308
|
+
overflow-wrap: break-word;
|
|
309
|
+
font: ${T('supporting-text-typescale-font')};
|
|
310
|
+
letter-spacing: ${T('supporting-text-typescale-letter-spacing')};
|
|
311
|
+
color: var(--_frame-supporting-text);
|
|
312
|
+
${recolor('color')}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/* FLD-21: the label, the help and the error text are each a run of their own, in the direction of their first
|
|
316
|
+
strong character, their lines still aligned by the layout (src/styles/product-text.ts). The tag's text is the Tag's
|
|
317
|
+
own run (TAG-18). */
|
|
318
|
+
${productText(':is(.label, .supporting-text)', { align: 'start' })}
|
|
319
|
+
|
|
320
|
+
/* FLD-9: what is announced politely, drawn nowhere. */
|
|
321
|
+
.announcer {
|
|
322
|
+
position: absolute;
|
|
323
|
+
inline-size: 1px;
|
|
324
|
+
block-size: 1px;
|
|
325
|
+
margin: -1px;
|
|
326
|
+
padding: 0;
|
|
327
|
+
overflow: hidden;
|
|
328
|
+
clip-path: inset(50%);
|
|
329
|
+
white-space: nowrap;
|
|
330
|
+
border: 0;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/* FLD-13: where motion is reduced, the colors change at once. */
|
|
334
|
+
@media (prefers-reduced-motion: reduce) {
|
|
335
|
+
.label,
|
|
336
|
+
.label-icon,
|
|
337
|
+
.asterisk,
|
|
338
|
+
.supporting-text {
|
|
339
|
+
transition: none !important;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
/* FLD-17: forced colors — every text in the platform's text color; the tag draws itself as a tag is drawn there
|
|
343
|
+
(an edge and a label in the text color, TAG-14). An error is then told from help by its words and by the invalid
|
|
344
|
+
state alone. */
|
|
345
|
+
@media (forced-colors: active) {
|
|
346
|
+
.label,
|
|
347
|
+
.label-icon,
|
|
348
|
+
.asterisk,
|
|
349
|
+
.supporting-text {
|
|
350
|
+
color: CanvasText;
|
|
351
|
+
}
|
|
352
|
+
${disabled} :is(.label, .label-icon, .asterisk, .supporting-text) {
|
|
353
|
+
color: GrayText;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
`);
|
|
357
|
+
}
|
|
358
|
+
//# sourceMappingURL=field-frame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-frame.js","sourceRoot":"","sources":["../../src/primitives/field-frame.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACpF,4IAA4I;AAC5I,qGAAqG;AACrG,OAAO,0BAA0B,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,kGAAkG;AAClG,oHAAoH;AACpH,YAAY;AACZ,EAAE;AACF,8GAA8G;AAC9G,wGAAwG;AACxG,iHAAiH;AACjH,sHAAsH;AACtH,gFAAgF;AAChF,EAAE;AACF,yEAAyE;AACzE,oHAAoH;AACpH,6EAA6E;AAC7E,qHAAqH;AACrH,iEAAiE;AACjE,2FAA2F;AAC3F,sHAAsH;AACtH,wHAAwH;AACxH,6EAA6E;AAE7E,2GAA2G;AAC3G,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,CAAU,CAAC;AAEtE,4GAA4G;AAC5G,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,CAAU,CAAC;AAE3E;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM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zB,CAAC,CAAC,0CAA0C,CAAC;;MAE7D,OAAO,CAAC,OAAO,CAAC;;;;;;IAMlB,WAAW,CAAC,+BAA+B,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAkC9D,QAAQ;;;;CAIb,CAAC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type CSSResult, type TemplateResult, nothing } from 'lit';
|
|
2
|
+
import { type FrameProps } from './field-frame.js';
|
|
3
|
+
/** How the controls are laid out (FGR-3, FGR-13). The first value is what an unknown one is drawn as (FGR-22). */
|
|
4
|
+
export declare const GROUP_ORIENTATIONS: readonly ['vertical', 'horizontal'];
|
|
5
|
+
export type GroupOrientation = (typeof GROUP_ORIENTATIONS)[number];
|
|
6
|
+
export declare const groupOrientation: (orientation: string) => GroupOrientation;
|
|
7
|
+
/** The ids of the rows a group's description is made of, inside the shadow root that holds them. */
|
|
8
|
+
export declare const GROUP_IDS: {
|
|
9
|
+
readonly label: 'label';
|
|
10
|
+
readonly description: 'supporting';
|
|
11
|
+
readonly error: 'error';
|
|
12
|
+
readonly requirement: 'requirement';
|
|
13
|
+
};
|
|
14
|
+
/** What the element that carries the group's semantics can say by itself. */
|
|
15
|
+
export interface GroupSemantics {
|
|
16
|
+
/** Its role has a required state (a field group in its radio-group kind): the state carries "required", so requiredText is not said in words (FGR-25). */
|
|
17
|
+
requiredState?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* FGR-11: the words that carry the requirement, because a group has no required state: requiredText, or optionalText.
|
|
21
|
+
* FGR-25: a group whose role has the state says only optionalText in words.
|
|
22
|
+
*/
|
|
23
|
+
export declare function groupRequirementText(props: Pick<FrameProps, 'requirement' | 'requiredText' | 'optionalText'>, { requiredState }?: GroupSemantics): string;
|
|
24
|
+
/**
|
|
25
|
+
* FGR-11: what describes the group, in this order — the description, the error text while the group is in error, the
|
|
26
|
+
* requirement in words — as the ids of the rows `groupRows()` renders (`aria-describedby`); `undefined` while none is.
|
|
27
|
+
*/
|
|
28
|
+
export declare function groupDescribedBy(props: FrameProps, semantics?: GroupSemantics): string | undefined;
|
|
29
|
+
/** The rows of a group's frame, for the component to place around its controls. */
|
|
30
|
+
export interface GroupRows {
|
|
31
|
+
/** The label row (FGR-2, FGR-5, FGR-6): the content of the legend, or of the element the group is labelled by. `nothing` while the label is not drawn. */
|
|
32
|
+
label: TemplateResult | typeof nothing;
|
|
33
|
+
/** The description (FGR-7), which goes before the controls. */
|
|
34
|
+
description: TemplateResult | typeof nothing;
|
|
35
|
+
/** The error text (FGR-8), which goes after the controls. */
|
|
36
|
+
error: TemplateResult | typeof nothing;
|
|
37
|
+
/** The requirement in words, drawn nowhere, and the announcer (FGR-9, FGR-11). */
|
|
38
|
+
unseen: TemplateResult;
|
|
39
|
+
/** The state attributes of the group's root element, which the styles read. */
|
|
40
|
+
labelled: boolean;
|
|
41
|
+
described: boolean;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The rows. The label's text is not hidden from assistive technology: it is the group's name, as a legend's content or
|
|
45
|
+
* as the target of `aria-labelledby` (its id is `GROUP_IDS.label`); the tag and the asterisk are hidden.
|
|
46
|
+
*/
|
|
47
|
+
export declare function groupRows(props: FrameProps, semantics?: GroupSemantics): GroupRows;
|
|
48
|
+
/** The parts a group's look and state color: a field's, without a label glyph. */
|
|
49
|
+
export declare const GROUP_PARTS: ("label" | "required-asterisk" | "supporting-text")[];
|
|
50
|
+
/**
|
|
51
|
+
* The group frame's styles, from the tokens of `prefix` (`--tanrei-comp-field-group`). The component's root element —
|
|
52
|
+
* the fieldset — has the class `group` and carries `data-labelled`, `data-described`,
|
|
53
|
+
* `data-error` and `data-disabled`; its controls' box has the class `controls` and carries `data-orientation` and
|
|
54
|
+
* `data-spacing`. The distance between two members is `--_frame-gap`, which the component may set on its host (a
|
|
55
|
+
* spacing axis); it is `gap.controls` otherwise.
|
|
56
|
+
*/
|
|
57
|
+
export declare function groupFrameStyles({ prefix }: {
|
|
58
|
+
prefix: `--tanrei-comp-${string}`;
|
|
59
|
+
}): CSSResult;
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { html, nothing, unsafeCSS } from 'lit';
|
|
2
|
+
import { productText } from '../styles/product-text.js';
|
|
3
|
+
import { FRAME_PARTS, frameAnnouncer, frameColors, frameLabelRow, frameLabelled, frameRequirement, frameStyles, frameText } from './field-frame.js';
|
|
4
|
+
// The field frame for a SET (FGR-1 … FGR-9, FGR-13, FGR-16 … FGR-18, FGR-21): the label row of a field,
|
|
5
|
+
// then the description under it — before the controls, and staying while the set is in error — the controls in a column
|
|
6
|
+
// or a row that wraps, and the error in a row of its own below them. `<tanrei-field-group>` draws it around a
|
|
7
|
+
// `<fieldset>`, and is the one element that does: a radio group and a checkbox group hold that element itself.
|
|
8
|
+
// Like `field-frame.ts`, this module is imported by its path and is not part of
|
|
9
|
+
// `primitives/index.ts`.
|
|
10
|
+
/** How the controls are laid out (FGR-3, FGR-13). The first value is what an unknown one is drawn as (FGR-22). */
|
|
11
|
+
export const GROUP_ORIENTATIONS = ['vertical', 'horizontal'];
|
|
12
|
+
export const groupOrientation = (orientation) => (GROUP_ORIENTATIONS.includes(orientation) ? orientation : 'vertical');
|
|
13
|
+
/** The ids of the rows a group's description is made of, inside the shadow root that holds them. */
|
|
14
|
+
export const GROUP_IDS = { label: 'label', description: 'supporting', error: 'error', requirement: 'requirement' };
|
|
15
|
+
/**
|
|
16
|
+
* FGR-11: the words that carry the requirement, because a group has no required state: requiredText, or optionalText.
|
|
17
|
+
* FGR-25: a group whose role has the state says only optionalText in words.
|
|
18
|
+
*/
|
|
19
|
+
export function groupRequirementText(props, { requiredState = false } = {}) {
|
|
20
|
+
const asked = frameRequirement(props);
|
|
21
|
+
return asked === 'required' ? (requiredState ? '' : props.requiredText) : asked === 'optional' ? props.optionalText : '';
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* FGR-11: what describes the group, in this order — the description, the error text while the group is in error, the
|
|
25
|
+
* requirement in words — as the ids of the rows `groupRows()` renders (`aria-describedby`); `undefined` while none is.
|
|
26
|
+
*/
|
|
27
|
+
export function groupDescribedBy(props, semantics = {}) {
|
|
28
|
+
return ([props.supportingText ? GROUP_IDS.description : '', props.error && props.errorText ? GROUP_IDS.error : '', groupRequirementText(props, semantics) ? GROUP_IDS.requirement : ''].filter(Boolean).join(' ') ||
|
|
29
|
+
undefined);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The rows. The label's text is not hidden from assistive technology: it is the group's name, as a legend's content or
|
|
33
|
+
* as the target of `aria-labelledby` (its id is `GROUP_IDS.label`); the tag and the asterisk are hidden.
|
|
34
|
+
*/
|
|
35
|
+
export function groupRows(props, semantics = {}) {
|
|
36
|
+
const words = groupRequirementText(props, semantics);
|
|
37
|
+
return {
|
|
38
|
+
// Named one by one: the props are a component's accessors, which a spread would not copy.
|
|
39
|
+
label: frameLabelRow({
|
|
40
|
+
label: props.label,
|
|
41
|
+
labelHidden: props.labelHidden,
|
|
42
|
+
requirement: props.requirement,
|
|
43
|
+
requiredMark: props.requiredMark,
|
|
44
|
+
requiredText: props.requiredText,
|
|
45
|
+
optionalText: props.optionalText,
|
|
46
|
+
labelId: GROUP_IDS.label,
|
|
47
|
+
}),
|
|
48
|
+
description: frameText(props.supportingText, { id: GROUP_IDS.description }),
|
|
49
|
+
error: props.error ? frameText(props.errorText, { id: GROUP_IDS.error, part: 'error-text', className: 'error-text' }) : nothing,
|
|
50
|
+
unseen: html `${words ? html `<span id=${GROUP_IDS.requirement} hidden>${words}</span>` : nothing}${frameAnnouncer()}`,
|
|
51
|
+
labelled: frameLabelled(props),
|
|
52
|
+
described: !!props.supportingText,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/** The parts a group's look and state color: a field's, without a label glyph. */
|
|
56
|
+
export const GROUP_PARTS = FRAME_PARTS.filter((part) => part !== 'label-icon');
|
|
57
|
+
/**
|
|
58
|
+
* The group frame's styles, from the tokens of `prefix` (`--tanrei-comp-field-group`). The component's root element —
|
|
59
|
+
* the fieldset — has the class `group` and carries `data-labelled`, `data-described`,
|
|
60
|
+
* `data-error` and `data-disabled`; its controls' box has the class `controls` and carries `data-orientation` and
|
|
61
|
+
* `data-spacing`. The distance between two members is `--_frame-gap`, which the component may set on its host (a
|
|
62
|
+
* spacing axis); it is `gap.controls` otherwise.
|
|
63
|
+
*/
|
|
64
|
+
export function groupFrameStyles({ prefix }) {
|
|
65
|
+
const T = (name) => `var(${prefix}-${name})`;
|
|
66
|
+
return unsafeCSS(`
|
|
67
|
+
:host {
|
|
68
|
+
--_frame-gap: ${T('gap-controls')};
|
|
69
|
+
}
|
|
70
|
+
/* FGR-8, FGR-14: the current color of every part, from the tokens of the look and the state the group is in. A group
|
|
71
|
+
has no focused state (the control that has focus shows it). */
|
|
72
|
+
${frameColors(prefix, 'standard', { rest: '.group', error: '.group[data-error]', disabled: '.group[data-disabled]', disabledError: '.group[data-disabled][data-error]' }, GROUP_PARTS)}
|
|
73
|
+
.group {
|
|
74
|
+
--_frame-error-text: ${T('standard-error-text-color')};
|
|
75
|
+
}
|
|
76
|
+
.group[data-disabled] {
|
|
77
|
+
--_frame-error-text: ${T('standard-disabled-error-text-color')};
|
|
78
|
+
}
|
|
79
|
+
/* FGR-2, FGR-5, FGR-6, FGR-7, FGR-9, FGR-16, FGR-17, FGR-21: the field's rows, from the group's tokens; its colors
|
|
80
|
+
change at once (the group declares no motion). */
|
|
81
|
+
${frameStyles({ prefix, motion: null, disabled: '.group[data-disabled]' })}
|
|
82
|
+
|
|
83
|
+
/* FGR-1: no container, edge, fill or elevation, and no padding around the rows: the root is the positioning container
|
|
84
|
+
of the announcer and nothing else (a fieldset's own border, padding, margin and minimum width are taken off). */
|
|
85
|
+
.group {
|
|
86
|
+
position: relative;
|
|
87
|
+
box-sizing: border-box;
|
|
88
|
+
min-inline-size: 0;
|
|
89
|
+
margin: 0;
|
|
90
|
+
padding: 0;
|
|
91
|
+
border: 0;
|
|
92
|
+
}
|
|
93
|
+
/* The legend is the label row's box: it has no padding of its own and is as wide as the row needs, up to the group. */
|
|
94
|
+
.legend {
|
|
95
|
+
box-sizing: border-box;
|
|
96
|
+
max-inline-size: 100%;
|
|
97
|
+
margin: 0;
|
|
98
|
+
padding: 0;
|
|
99
|
+
}
|
|
100
|
+
/* FGR-2: labelHidden draws no label row; the legend stays the group's name, drawn nowhere. */
|
|
101
|
+
.legend[data-unseen] {
|
|
102
|
+
position: absolute;
|
|
103
|
+
inline-size: 1px;
|
|
104
|
+
block-size: 1px;
|
|
105
|
+
margin: -1px;
|
|
106
|
+
overflow: hidden;
|
|
107
|
+
clip-path: inset(50%);
|
|
108
|
+
white-space: nowrap;
|
|
109
|
+
}
|
|
110
|
+
/* FGR-1: the gaps are those of what follows — the description supporting-text.gap below the label row, the controls
|
|
111
|
+
label.gap below whichever of the two is drawn last, the error error-text.gap below the last control — so a row that
|
|
112
|
+
is not drawn keeps no room and no gap. */
|
|
113
|
+
.label-row {
|
|
114
|
+
margin-block-end: 0;
|
|
115
|
+
}
|
|
116
|
+
.supporting-text {
|
|
117
|
+
margin-block-start: 0;
|
|
118
|
+
}
|
|
119
|
+
.group[data-labelled] .supporting-text {
|
|
120
|
+
margin-block-start: ${T('supporting-text-gap')};
|
|
121
|
+
}
|
|
122
|
+
.group:is([data-labelled], [data-described]) .controls {
|
|
123
|
+
margin-block-start: ${T('label-gap')};
|
|
124
|
+
}
|
|
125
|
+
/* FGR-8: the error text below the last control, in the supporting text's style and the error-text color. */
|
|
126
|
+
.error-text {
|
|
127
|
+
margin-block-start: ${T('error-text-gap')};
|
|
128
|
+
min-inline-size: 0;
|
|
129
|
+
overflow-wrap: break-word;
|
|
130
|
+
font: ${T('supporting-text-typescale-font')};
|
|
131
|
+
letter-spacing: ${T('supporting-text-typescale-letter-spacing')};
|
|
132
|
+
color: var(--_frame-error-text);
|
|
133
|
+
}
|
|
134
|
+
${productText('.error-text', { align: 'start' })}
|
|
135
|
+
|
|
136
|
+
/* FGR-3: a column in the order given, each control from the start edge at its own size — a checkbox or a switch takes
|
|
137
|
+
what its mark and its label need — the members gap.<spacing> apart. FGR-18: a row runs from the start edge, which
|
|
138
|
+
is the right in right-to-left; a column keeps its order. */
|
|
139
|
+
.controls {
|
|
140
|
+
display: flex;
|
|
141
|
+
flex-direction: column;
|
|
142
|
+
align-items: flex-start;
|
|
143
|
+
gap: var(--_frame-gap);
|
|
144
|
+
min-inline-size: 0;
|
|
145
|
+
}
|
|
146
|
+
/* FGR-3: a field fills the group's width. */
|
|
147
|
+
.controls[data-spacing='fields'] {
|
|
148
|
+
align-items: stretch;
|
|
149
|
+
}
|
|
150
|
+
/* FGR-13: a row that wraps, gap-inline apart along it and gap.<spacing> between its lines, the controls aligned at
|
|
151
|
+
their tops so that their first lines stand on one line; no control is cut, scrolled or narrowed. */
|
|
152
|
+
.controls[data-orientation='horizontal'] {
|
|
153
|
+
flex-flow: row wrap;
|
|
154
|
+
align-items: flex-start;
|
|
155
|
+
column-gap: ${T('gap-inline')};
|
|
156
|
+
row-gap: var(--_frame-gap);
|
|
157
|
+
}
|
|
158
|
+
/* FGR-13: fields share the row equally (never below a minimum width of their own). */
|
|
159
|
+
.controls[data-orientation='horizontal'][data-spacing='fields'] ::slotted(*) {
|
|
160
|
+
flex: 1;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* FGR-17: forced colors — the error text is text like the rest; the words and the invalid state carry the error. */
|
|
164
|
+
@media (forced-colors: active) {
|
|
165
|
+
.error-text {
|
|
166
|
+
color: CanvasText;
|
|
167
|
+
}
|
|
168
|
+
.group[data-disabled] .error-text {
|
|
169
|
+
color: GrayText;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
`);
|
|
173
|
+
}
|
|
174
|
+
//# sourceMappingURL=field-group-frame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-group-frame.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