@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,189 @@
|
|
|
1
|
+
// The pieces every interactive component is built from. Each takes the component's own selectors and custom
|
|
2
|
+
// properties, so a component composes them with its own comp tokens (README "Building a component").
|
|
3
|
+
// shape — styles/shape.ts: `shape` (the one corner rule) and `cornerRadius()` (a box names its shape token)
|
|
4
|
+
// states — the state rules and their precedence (pressed > focused > hovered, disabled over all)
|
|
5
|
+
// press — PressController (data-pressed, press-hold, the ripple's lifecycle) and pressHold()
|
|
6
|
+
// ripple — the ripple layer's styles, and its origin from a pointer or a key
|
|
7
|
+
// focus-ring — the keyboard focus indicator (ring or glow), the glow alone (focusGlow) and syncFocusStyle()
|
|
8
|
+
// target — the minimum target (::before), and neighbourTarget(): capped toward a neighbour in a row (BGR-4, SPB-6)
|
|
9
|
+
// kept-length — KeptLengths and keptLength(): controls that stand close in a row keep a touch target's length each,
|
|
10
|
+
// the gap between two growing only by what they lack (SRC-34, TBR-16)
|
|
11
|
+
// behavior — reading a choice of kind from the cascade
|
|
12
|
+
// icon — styles/icons.ts: `iconGlyph()` (a component's own icon, drawn as icons.css draws `.tanrei-icon`)
|
|
13
|
+
// glyph — GlyphDrawnController: `data-drawn` on a component's glyph while the icon set can draw it (CHK-19, MNU-30, SNK-26)
|
|
14
|
+
// glyph-pending — PendingGlyphs: `data-glyphs="pending"` on a light-DOM component whose glyphs a stylesheet draws, while the icon set cannot (TRV-40)
|
|
15
|
+
// glyph-mirror — GlyphMirrorController: `data-tanrei-mirrored` on a component's own glyphs and on the glyphs in its slots
|
|
16
|
+
// whose name the active icon set mirrors in right-to-left (BTN-19); the styles are
|
|
17
|
+
// `iconGlyph()`'s. markGlyph() is the one rule, observeIcons() the page's bare `.tanrei-icon`
|
|
18
|
+
// axes — OpenAxesController: sizes and variants a design system adds, and a value it does not have
|
|
19
|
+
// report — `report()`: what a debug build tells the developer (BTN-7, BTN-16…)
|
|
20
|
+
// words — the product's words: WordsController (`get(key, this.prop)`: the prop, else the set of the
|
|
21
|
+
// element's language, else the document's; `missing()`: recorded, reported once per key and page),
|
|
22
|
+
// wordFor() / watchWords() for a script; setWords() and missingWords() are the product's two functions
|
|
23
|
+
// missing-value — missingValueMessage(): the browser's message of a required control left empty, else the element's own words
|
|
24
|
+
// availability — AvailabilityController: a component or variant the active system leaves out, reported
|
|
25
|
+
// arc — arcStyles: a ring of SVG circles (center, radius, stroke, circumference), ring-turn and pulse
|
|
26
|
+
// description — FORWARDED_DESCRIPTION: the host's aria-description, rendered on the native element (FORWARDED_INVALID: its aria-invalid)
|
|
27
|
+
// focus-order — OUTSIDE_FOCUS_ORDER: a control a host takes out of the focus order (a number field's steppers, NUM-25)
|
|
28
|
+
// host-aria — `hostAria()`: semantics a non-interactive component carries on its host (divider, progress…)
|
|
29
|
+
// visibility — VisibilityController: whether the host can be seen, so a running animation pauses off screen
|
|
30
|
+
// shared-choice — sharedChoice(), remembered(), remember(), keepInPlace(): what rows that share a choice have in common —
|
|
31
|
+
// one registry of groups for a document, one read of the storage for a key (TAB-36…41, TBV-21).
|
|
32
|
+
// layout-scale — layoutScale(): how much larger an element is drawn than laid out (a transformed ancestor), for what is
|
|
33
|
+
// measured on the page and written in the element's own pixels
|
|
34
|
+
// selection — SelectionController and the styles of a form-associated selection control (checkbox, radio, switch),
|
|
35
|
+
// and conditionStates(): the state rules of any component whose conditions are its state variants
|
|
36
|
+
// item-row — the row of a column of items (list, menu): its states, paints, ripple and target height
|
|
37
|
+
// places — fillPlaces(), placeFaults(), reportPlaces(): a word of the product's with places a component fills
|
|
38
|
+
// : how it is read, and what a debug build says of one that does not fit
|
|
39
|
+
// roving — RovingKeys: the arrow keys, Home, End and typeahead of a column of items that is one tab stop
|
|
40
|
+
// interactive — findInteractive() / slottedInteractive(): what an action's content must not hold (CRD-15, LST-24)
|
|
41
|
+
// answersPress(): what a hit area that reaches over other content yields a press to (TAB-5)
|
|
42
|
+
// link — a control with a destination is a link: LinkController (the link a control is now, the keys
|
|
43
|
+
// that press it, its description, the debug reports), linkAttributes() (the anchor's attributes, the
|
|
44
|
+
// disabled anchor), readDestination() / readTarget() / linkRel() (what a destination is), LINK_MARK,
|
|
45
|
+
// DISABLED and styledAsAnchorToo() (the anchor is the same styled part)
|
|
46
|
+
// after-click — afterClick(): `change` after the `click` has gone through the page, as a native checkbox (CHP-11, BTN-14)
|
|
47
|
+
// default-button — a form's default button (BTN-30): defaultButton(), pressDefaultButton() — what every control that
|
|
48
|
+
// submits its form on Enter calls in place of `form.requestSubmit()` — watchNativeInputs() for Enter in
|
|
49
|
+
// the platform's own inputs, and SUBMIT_BUTTON, by which a Button says it is a submit button
|
|
50
|
+
// composed — a composed element (README "Composed elements"): ComposedElement and ComposedControl (the
|
|
51
|
+
// members' own elements in the shadow root; focus, the passed slot, the value that is the member's, the
|
|
52
|
+
// form), forward() (a prop set on its member) and exported() (a member's parts); form-says — FormSays,
|
|
53
|
+
// what a control tells its form, said where the element composed around it hears it; `formOf()` is in
|
|
54
|
+
// default-button. Imported from their own modules, not from here.
|
|
55
|
+
// values — parseValues(): the `values` attribute of a selection of several values (list, segmented button)
|
|
56
|
+
// keyboard-convention — whose keyboard a keyboard shortcut writes (KBS-2): the ambient `data-tanrei-keyboard-convention`
|
|
57
|
+
// across shadow roots, the platform's, one page-wide watcher; the chords' attribute converter; and the
|
|
58
|
+
// internal event a keyboard shortcut tells its host with (KBS-12, a menu item's aria-keyshortcuts)
|
|
59
|
+
// item-update — notifyItemUpdate(): an item tells its container a prop it reads changed, an internal event kept out of
|
|
60
|
+
// the manifest (segment, list item, menu item, suggestion, tab)
|
|
61
|
+
// group-item — the internal channel between a button group and its Buttons and icon buttons: GroupItemController
|
|
62
|
+
// (where the item sits), groupItemStyles() (its corners, width and hit area in the group), GROUP_PLACE;
|
|
63
|
+
// a toolbar's items are `row` items of it, their hit areas capped at the measured half-gaps (TBR-9);
|
|
64
|
+
// a dialog gives its actions their variant through it (HOST_VARIANT, DLG-20)
|
|
65
|
+
// actions — ActionPlacement and actionBoxStyles(): the actions at the foot of a dialog or a side sheet, placed by
|
|
66
|
+
// their flags as a full-width Button group places its items (BGR-13…19) into three hand-assigned slots,
|
|
67
|
+
// row or column by fit, each given the host's variant (DLG-10, DLG-20, SSH-11, SSH-17); compChoice()
|
|
68
|
+
// destination — the destinations of a navigation region (bar, drawer): DestinationsController (selection, change /
|
|
69
|
+
// reselect, reports), NavigationDestination and destinationStyles() (a bar's item)
|
|
70
|
+
// native-text — NativeTextController: a component's value and its native text element kept in step around an input
|
|
71
|
+
// method (text field, search: TXF-1, TXF-4, SRC-4)
|
|
72
|
+
// calendar-date — Gregorian dates and times of day as parts, without a time zone: parsing and writing ISO 8601, adding
|
|
73
|
+
// days and months, the month's grid of 42 cells, the clock's hours and minute steps (CAL-*, DTM-8, DTM-17)
|
|
74
|
+
// locale-date — dates and times in the locale's forms: typed in its numeric form and held as ISO 8601 (formatValue(),
|
|
75
|
+
// valuePattern(), readText(), isoValue(), withinRange(), ambientLocale(), localeDirection(): TXF-28 …
|
|
76
|
+
// TXF-31), and drawn as a row of segments (valueRow(), unitName(), monthName(), yearText(): TXF-42,
|
|
77
|
+
// TXF-47); the calendar's names, digits and first day of the week (CAL-4, CAL-24); the clock's hours,
|
|
78
|
+
// separator, period names and preferred cycle (DTM-14, DTM-16, DTM-38)
|
|
79
|
+
// system-watch — SystemWatchController: renders its host again when the document's root switches the design system,
|
|
80
|
+
// for a choice of kind drawn from script (a calendar's arrows, a picker's actions)
|
|
81
|
+
// modal — modalLayer: the Tanrei modal overlays open in the window, which a snackbar waits and pauses for (SNK-9, SNK-12);
|
|
82
|
+
// deepActive(), tabbables(), trapFocus() and holdPageScroll(): what every modal overlay (dialog, drawer) does;
|
|
83
|
+
// focusWithin() and returnFocus(): focus inside a host, and given back to its opener (the sheets)
|
|
84
|
+
// sheet — what the sheets share (bottom sheet, BSH-5, BSH-9; side sheet, SSH-4): SheetDrag (slop, following,
|
|
85
|
+
// velocity), the fling and slop constants, modalSheetKeys() (Escape and the trap), closeRequestReason()
|
|
86
|
+
// (Escape or back), keyboardCover() and onBackdrop()
|
|
87
|
+
// separation — sys.behavior.separation as a component reads it: separationHost() (the attribute over the
|
|
88
|
+
// component token, as `--_separation` on the host), whenGap() (the gap form's rules: a style query, and
|
|
89
|
+
// `data-separation` where a browser has none), separationOf(), syncSeparation()
|
|
90
|
+
// follow — FollowController: an overlay placed by script follows its anchor by events (scroll, resize, sizes, a place
|
|
91
|
+
// that changed with no event, a motion beginning), frame by frame only while something moves (TIP-9,
|
|
92
|
+
// MNU-2, FBM-13, SRC-7, DTM-2)
|
|
93
|
+
// disclosure — lineArrow(): the arrow key toward the end or the start of the line, for a row that opens and closes what is
|
|
94
|
+
// under it (a navigation drawer's group, NVD-45; an accordion's header, ACC-11)
|
|
95
|
+
// placement — placeAnchored(): where a surface that opens beside a control goes (the thirteen placements, offsets,
|
|
96
|
+
// flipping, shifting, holding, the arrow's point: TIP-9, TIP-22…25, POP-2…5); anchorGone() (the anchor
|
|
97
|
+
// removed, hidden or out of sight); the attributes of `offset`, `cross-offset` and a true/false/unset choice
|
|
98
|
+
// arrow — arrowStyles(), shadowLayers() and shadeFilter(): the arrow of an anchored surface, one shape with it
|
|
99
|
+
// under one elevation (TIP-25, POP-10); arrowOutlineStyles(): its outline in forced colors (POP-32)
|
|
100
|
+
// anchored — AnchoredSurfaceController and anchoredSurfaceStyles(): a surface presented in the top layer, placed
|
|
101
|
+
// beside its anchor, limited to the room, following it, with its open and close motion (POP-1…5,
|
|
102
|
+
// POP-7, POP-8, POP-26, POP-27, POP-36); what a select, a combobox and a color field stand on
|
|
103
|
+
// dismiss — DismissController: Escape (the topmost surface alone, after everything inside heard the key), a press
|
|
104
|
+
// outside and focus leaving ask the host to close (POP-21, POP-23); registerOverlay() and
|
|
105
|
+
// logicalAncestors(): an overlay opened from inside a surface is that surface's own (POP-24)
|
|
106
|
+
// overlay-focus — focusOverlay(), tabThroughOverlay(), returnOverlayFocus(): focus into, through and back from an
|
|
107
|
+
// operated overlay that is not modal, as if it stood directly after its opener (POP-19, POP-20, POP-22)
|
|
108
|
+
// direction — DirectionController, DIRECTION_PROBE and directionProbeStyles: a script told when the layout direction it
|
|
109
|
+
// inherits changes (an ancestor's `dir`, at run time), for what it wrote physically (carousel, slider)
|
|
110
|
+
// field — a field and the control it frames, in different trees: FieldControlController (the control asks with
|
|
111
|
+
// the composed `tanrei-field-connect` event and writes the name, the description and the states it is
|
|
112
|
+
// told), FieldProviderController (the frame answers, tells of every change, and takes back),
|
|
113
|
+
// giveAttributes() / takeBack() for an element that does not ask (FLD-8, FLD-10, FLD-11, FLD-14, FLD-23,
|
|
114
|
+
// FGR-8, FGR-14). The frame's rows and styles are `primitives/field-frame.ts` (one control: a field, and
|
|
115
|
+
// every component that is a field itself) and `primitives/field-group-frame.ts` (a set: the field group
|
|
116
|
+
// and the radio group); they draw the requirement tag with the Tag component, so they are imported by
|
|
117
|
+
// path and are not part of this file
|
|
118
|
+
// form-disabled — takeFormDisabled(): a form-associated element takes the platform's word that it is disabled (a
|
|
119
|
+
// fieldset's, or its own attribute's) where it is not lost: after the update under way
|
|
120
|
+
// disabled-while-focused — waitsWhileFocused(): the `disabled` attribute of a form-associated element that holds focus
|
|
121
|
+
// waits until focus has left it, at most a frame, so focus leaves when the platform's own control's
|
|
122
|
+
// would in every engine (the Button)
|
|
123
|
+
// disabledWaitsWhileFocused(Class) gives a class the overrides; FocusedStop keeps a part's own tabindex a frame
|
|
124
|
+
// autofocus — focusedAtFirst(Class), wantsAutofocus(): `autofocus` on an element that is not focusable itself, at the
|
|
125
|
+
// page's first load
|
|
126
|
+
// natural-height — naturalHeight(): an overlay's uncapped height, measured without lifting its cap, which would drop its
|
|
127
|
+
// list's scroll offset (menu, date picker, search)
|
|
128
|
+
// layoutSize(): a box's size as laid out — fractional, untouched by a transform — which an overlay is
|
|
129
|
+
// placed by, so an edge aligned to the anchor's is not a snapped pixel off it
|
|
130
|
+
export { iconGlyph } from '../styles/icons.js';
|
|
131
|
+
export { cornerRadius, shape } from '../styles/shape.js';
|
|
132
|
+
export { OpenAxesController } from './axes.js';
|
|
133
|
+
export { BEHAVIOR, PRESSED_FEEDBACK, choice, pressedFeedback } from './behavior.js';
|
|
134
|
+
export { isDisabledControl, takeFormDisabled } from './form-disabled.js';
|
|
135
|
+
export { FocusedStop, disabledWaitsWhileFocused, endsWaiting, waitsWhileFocused } from './disabled-while-focused.js';
|
|
136
|
+
export { focusedAtFirst, wantsAutofocus } from './autofocus.js';
|
|
137
|
+
export { focusGlow, focusGlowEnds, focusRing, syncFocusStyle } from './focus-ring.js';
|
|
138
|
+
export { PressController, pressHold } from './press.js';
|
|
139
|
+
export { fadeRipple, rippleStyles, startRipple } from './ripple.js';
|
|
140
|
+
export { stateRules } from './states.js';
|
|
141
|
+
export { arcStyles } from './arc.js';
|
|
142
|
+
export { FORWARDED_DESCRIPTION, FORWARDED_INVALID } from './description.js';
|
|
143
|
+
export { OUTSIDE_FOCUS_ORDER } from './focus-order.js';
|
|
144
|
+
export { DIRECTION_PROBE, DirectionController, directionProbeStyles } from './direction.js';
|
|
145
|
+
export { lineArrow } from './disclosure.js';
|
|
146
|
+
export { PendingGlyphs, isGlyphProbe } from './glyph-pending.js';
|
|
147
|
+
export { FollowController } from './follow.js';
|
|
148
|
+
export { ANCHORED_PLACEMENTS, anchorGone, anchorOutOfSight, choiceAttribute, crossOffsetAttribute, numericAttribute, placeAnchored, usableLength, } from './placement.js';
|
|
149
|
+
export { arrowOutlineStyles, arrowStyles, shadeFilter, shadowLayers } from './arrow.js';
|
|
150
|
+
export { AnchoredSurfaceController, anchoredSurfaceStyles } from './anchored.js';
|
|
151
|
+
export { DismissController, logicalAncestors, overlayDepth, registerOverlay } from './dismiss.js';
|
|
152
|
+
export { focusOverlay, keepOverlayFocusAfterPress, quietFocus, returnOverlayFocus, tabThroughOverlay, watchInput } from './overlay-focus.js';
|
|
153
|
+
export { hostAria } from './host-aria.js';
|
|
154
|
+
export { FIELD_CONNECT, FIELD_CONTROL, FieldControlController, FieldProviderController, composedContains, giveAttributes, namesItself, takeBack, takesRequired, } from './field.js';
|
|
155
|
+
export { DRAWN_WIDTH, GlyphDrawnController } from './glyph.js';
|
|
156
|
+
export { GlyphMirrorController, activeIconSet, glyphMirrors, glyphName, markGlyph, observeIcons } from './glyph-mirror.js';
|
|
157
|
+
export { report } from './report.js';
|
|
158
|
+
export { WordsController, missingWords, setWords, watchWords, wordFor, wordMissing } from './words.js';
|
|
159
|
+
export { browserMissingMessage, missingValueMessage } from './missing-value.js';
|
|
160
|
+
export { AvailabilityController } from './availability.js';
|
|
161
|
+
export { SELECTION_STATES, SelectionController, conditionStates, conditionBlock, markConditionChange, recolorTiming, selectionContainerShape, selectionRippleOrigin, selectionLabel, selectionState, selectionStates, } from './selection.js';
|
|
162
|
+
export { minimumTarget, neighbourTarget } from './target.js';
|
|
163
|
+
export { KeptLengths, keptLength } from './kept-length.js';
|
|
164
|
+
export { itemRowStyles, rowTarget } from './item-row.js';
|
|
165
|
+
export { RovingKeys, TYPEAHEAD_WINDOW } from './roving.js';
|
|
166
|
+
export { answersPress, findInteractive, slottedInteractive } from './interactive.js';
|
|
167
|
+
export { VisibilityController } from './visibility.js';
|
|
168
|
+
export { layoutScale } from './layout-scale.js';
|
|
169
|
+
export { deepActive, focusWithin, holdPageScroll, modalLayer, returnFocus, tabbables, trapFocus } from './modal.js';
|
|
170
|
+
export { SHEET_FLING_VELOCITY, SHEET_TOUCH_SLOP, SheetDrag, closeRequestReason, keyboardCover, modalSheetKeys, onBackdrop, watchEscape, } from './sheet.js';
|
|
171
|
+
export { NativeTextController } from './native-text.js';
|
|
172
|
+
export { DATE_KINDS, FALLBACK_LOCALE, ambientLocale, asciiDigits, clockFor, formatValue, fullDateText, headerDateText, hourText, isoValue, localeDigits, localeDirection, localeFirstDay, localeHourCycle, longWeekdays, minuteText, monthName, monthYearText, narrowWeekdays, numberText, periodNames, periodPlace, readText, supportedLocale, timeSeparator, timeText, todayName, unitName, valuePattern, valueRow, withinRange, yearText, } from './locale-date.js';
|
|
173
|
+
export * from './calendar-date.js';
|
|
174
|
+
export { SystemWatchController } from './system-watch.js';
|
|
175
|
+
export { SEPARATIONS, SEPARATION_VALUES, separationHost, separationOf, styleQueries, syncSeparation, whenGap } from './separation.js';
|
|
176
|
+
export { afterClick } from './after-click.js';
|
|
177
|
+
export { SUBMIT_BUTTON, defaultButton, markPassingSubmitter, pressDefaultButton, watchNativeInputs } from './default-button.js';
|
|
178
|
+
export { DISABLED, LINK_KEYS, LINK_MARK, LinkController, linkAttributes, linkForm, linkRel, readDestination, readTarget, styledAsAnchorToo, } from './link.js';
|
|
179
|
+
export { layoutSize, naturalHeight } from './natural-height.js';
|
|
180
|
+
export { parseValues } from './values.js';
|
|
181
|
+
export { notifyItemUpdate } from './item-update.js';
|
|
182
|
+
export { fillPlaces, placeFaults, reportPlaces } from './places.js';
|
|
183
|
+
export { ACTION_COLUMN, ACTION_ROW, ActionPlacement, BUTTON_VARIANTS, actionBoxStyles, assignSlot, compChoice, giveVariant, whenChosen, } from './actions.js';
|
|
184
|
+
export { GROUP_AVAILABILITY, GROUP_ITEM, GROUP_ITEM_PROPERTIES, GROUP_PLACE, GroupItemController, HOST_VARIANT, groupItemReset, groupItemStyles, } from './group-item.js';
|
|
185
|
+
export { DESTINATION_UPDATE, DestinationsController, NavigationDestination, badgeDescription, destinationStyles, notifyDestinationUpdate, } from './destination.js';
|
|
186
|
+
export { KEYBOARD_CONVENTION, SHORTCUT_UPDATE, ambientConvention, chordsConverter, chordsOf, parseChords, platformConvention, unwatchConvention, watchConvention, } from './keyboard-convention.js';
|
|
187
|
+
export { IndicatorDragController, indicatorChoice, indicatorPlace } from './indicator-drag.js';
|
|
188
|
+
export { keepInPlace, remember, remembered, sharedChoice } from './shared-choice.js';
|
|
189
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/primitives/index.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,qGAAqG;AACrG,oHAAoH;AACpH,wGAAwG;AACxG,qGAAqG;AACrG,oFAAoF;AACpF,+GAA+G;AAC/G,0HAA0H;AAC1H,sHAAsH;AACtH,sFAAsF;AACtF,4DAA4D;AAC5D,mHAAmH;AACnH,oIAAoI;AACpI,wJAAwJ;AACxJ,4HAA4H;AAC5H,mGAAmG;AACnG,8GAA8G;AAC9G,4GAA4G;AAC5G,sFAAsF;AACtF,6GAA6G;AAC7G,mHAAmH;AACnH,uHAAuH;AACvH,gIAAgI;AAChI,yGAAyG;AACzG,gHAAgH;AAChH,2IAA2I;AAC3I,yHAAyH;AACzH,+GAA+G;AAC/G,+GAA+G;AAC/G,4HAA4H;AAC5H,iHAAiH;AACjH,0HAA0H;AAC1H,+EAA+E;AAC/E,uHAAuH;AACvH,kHAAkH;AAClH,0GAA0G;AAC1G,qHAAqH;AACrH,wFAAwF;AACxF,gHAAgH;AAChH,oHAAoH;AACpH,4GAA4G;AAC5G,8GAA8G;AAC9G,qHAAqH;AACrH,qHAAqH;AACrH,wFAAwF;AACxF,4HAA4H;AAC5H,uHAAuH;AACvH,wHAAwH;AACxH,6GAA6G;AAC7G,4GAA4G;AAC5G,wHAAwH;AACxH,uHAAuH;AACvH,sHAAsH;AACtH,kFAAkF;AAClF,kHAAkH;AAClH,2HAA2H;AAC3H,uHAAuH;AACvH,mHAAmH;AACnH,yHAAyH;AACzH,gFAAgF;AAChF,oHAAoH;AACpH,wHAAwH;AACxH,qHAAqH;AACrH,6FAA6F;AAC7F,wHAAwH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';
|
|
2
|
+
/**
|
|
3
|
+
* A drag that carries a selection indicator along a row of equals (a navigation bar's active indicator, NVB-27…29; the
|
|
4
|
+
* model is the tabs', TAB-28…30): the gesture, and the arithmetic of where the indicator is while the pointer is at a
|
|
5
|
+
* place along the row. The row keeps its own geometry and drawing — what its indicator's box is on an item, how it is
|
|
6
|
+
* painted and how it settles — and gives this the pieces that do not differ between rows.
|
|
7
|
+
*
|
|
8
|
+
* The gesture: a press with touch, a pen or a mouse becomes a drag once it has moved past the touch slop, further
|
|
9
|
+
* sideways than up or down (`SheetDrag`: 8 px, the web names no slop of its own); a press that goes up or down first is
|
|
10
|
+
* the page's for its whole length. Once taken, the pointer is captured, the click the release ends with is swallowed
|
|
11
|
+
* (it is not a tap), and Escape, a cancelled pointer or a lost capture cancel it. Nothing is selected before the
|
|
12
|
+
* release.
|
|
13
|
+
*/
|
|
14
|
+
/** An item the indicator may rest on (an enabled one), with its box along the row on the page (clientX). */
|
|
15
|
+
export interface IndicatorStop<T> {
|
|
16
|
+
item: T;
|
|
17
|
+
left: number;
|
|
18
|
+
right: number;
|
|
19
|
+
}
|
|
20
|
+
/** Where the indicator is: between `from` (toward the left) and `to` (toward the right), `p` of the way; the same item twice at an end. */
|
|
21
|
+
export interface IndicatorPlace<T> {
|
|
22
|
+
from: T;
|
|
23
|
+
to: T;
|
|
24
|
+
p: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Where the indicator is while the pointer is at `x`: on a stop while the pointer is at that stop's centre, halfway
|
|
28
|
+
* between two neighbouring stops where they meet (the middle of whatever lies between them: disabled items), at the
|
|
29
|
+
* linear interpolation in between, and on the first or last stop before or beyond its centre. Nothing changes at the
|
|
30
|
+
* place where two stops meet: it is only where `p` passes one half. `stops` are in the order they are drawn, left to
|
|
31
|
+
* right.
|
|
32
|
+
*/
|
|
33
|
+
export declare function indicatorPlace<T>(stops: readonly IndicatorStop<T>[], x: number): IndicatorPlace<T> | null;
|
|
34
|
+
/**
|
|
35
|
+
* What a release chooses: the stop the indicator is nearer to of the two it lies between (the one after it from
|
|
36
|
+
* halfway on), or the one of the two a fling is toward — a release at least `SHEET_FLING_VELOCITY` fast along the row
|
|
37
|
+
* (`velocity` in px per ms, positive toward the right).
|
|
38
|
+
*/
|
|
39
|
+
export declare function indicatorChoice<T>(place: IndicatorPlace<T>, velocity: number): T;
|
|
40
|
+
export interface IndicatorDragOptions {
|
|
41
|
+
/** Whether this press may become a drag (a selected item to carry the indicator from, a press on the row itself). */
|
|
42
|
+
accepts: (event: PointerEvent) => boolean;
|
|
43
|
+
/** The row took the drag, with the pointer at `x` (clientX): the pressed item's press ends, the indicator comes to the pointer. */
|
|
44
|
+
taken: (x: number) => void;
|
|
45
|
+
/** The pointer moved to `x` while the drag lasts. */
|
|
46
|
+
moved: (x: number) => void;
|
|
47
|
+
/** The drag was released at `x`, at `velocity` px per ms along the row (positive toward the right). */
|
|
48
|
+
released: (x: number, velocity: number) => void;
|
|
49
|
+
/** The drag was cancelled: the platform took the pointer back, the capture was lost, or Escape was pressed. */
|
|
50
|
+
cancelled: () => void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The gesture, as a Lit controller on the row's host: `pointerdown` on the host, the pointer followed on the window
|
|
54
|
+
* until it is released (before the drag is taken nothing captures it, and a mouse may leave the row), `setPointerCapture`
|
|
55
|
+
* once it is taken. The host leaves vertical drags to the page with `touch-action: pan-y` on the box that is pressed.
|
|
56
|
+
*/
|
|
57
|
+
export declare class IndicatorDragController implements ReactiveController {
|
|
58
|
+
private readonly host;
|
|
59
|
+
private readonly options;
|
|
60
|
+
private gesture;
|
|
61
|
+
/** The click that follows a drag the row took is not a tap. */
|
|
62
|
+
private swallowClick;
|
|
63
|
+
constructor(host: ReactiveControllerHost & HTMLElement, options: IndicatorDragOptions);
|
|
64
|
+
hostDisconnected(): void;
|
|
65
|
+
/** Whether the indicator follows the pointer now. */
|
|
66
|
+
get taken(): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Ends a drag the row has taken without a release (the product set the selection, or took away an item under the
|
|
69
|
+
* indicator): the pointer, still down, is ignored until it is released. `notify` calls `cancelled`.
|
|
70
|
+
*/
|
|
71
|
+
cancel(notify?: boolean): void;
|
|
72
|
+
/**
|
|
73
|
+
* Lets one activation through while the click of the release is still swallowed: a release that chooses an item
|
|
74
|
+
* activates it with the item's own click (a link is followed), and the click the browser sends after is still not a tap.
|
|
75
|
+
*/
|
|
76
|
+
activate(click: () => void): void;
|
|
77
|
+
private readonly onPointerDown;
|
|
78
|
+
private watch;
|
|
79
|
+
private readonly onPointerMove;
|
|
80
|
+
private readonly onPointerUp;
|
|
81
|
+
private readonly onPointerCancel;
|
|
82
|
+
/** A capture lost while the drag lasts (not by its own release) cancels it. */
|
|
83
|
+
private readonly onLostCapture;
|
|
84
|
+
/** Escape while a drag lasts cancels it, and nothing else hears that key. */
|
|
85
|
+
private readonly onKey;
|
|
86
|
+
private unwatch;
|
|
87
|
+
/** The pointer is up (or gone): the click that may follow is swallowed no longer than this task. */
|
|
88
|
+
private end;
|
|
89
|
+
private readonly onClickCapture;
|
|
90
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { SHEET_FLING_VELOCITY, SheetDrag } from './sheet.js';
|
|
2
|
+
/**
|
|
3
|
+
* Where the indicator is while the pointer is at `x`: on a stop while the pointer is at that stop's centre, halfway
|
|
4
|
+
* between two neighbouring stops where they meet (the middle of whatever lies between them: disabled items), at the
|
|
5
|
+
* linear interpolation in between, and on the first or last stop before or beyond its centre. Nothing changes at the
|
|
6
|
+
* place where two stops meet: it is only where `p` passes one half. `stops` are in the order they are drawn, left to
|
|
7
|
+
* right.
|
|
8
|
+
*/
|
|
9
|
+
export function indicatorPlace(stops, x) {
|
|
10
|
+
if (!stops.length)
|
|
11
|
+
return null;
|
|
12
|
+
const centre = (stop) => (stop.left + stop.right) / 2;
|
|
13
|
+
let index = 0;
|
|
14
|
+
while (index < stops.length - 1 && x >= centre(stops[index + 1]))
|
|
15
|
+
index++;
|
|
16
|
+
const [a, b] = [stops[index], stops[Math.min(index + 1, stops.length - 1)]];
|
|
17
|
+
let p = 0;
|
|
18
|
+
if (a !== b && x > centre(a)) {
|
|
19
|
+
const meet = (a.right + b.left) / 2;
|
|
20
|
+
p = x <= meet ? (0.5 * (x - centre(a))) / Math.max(meet - centre(a), 0.001) : 0.5 + (0.5 * (x - meet)) / Math.max(centre(b) - meet, 0.001);
|
|
21
|
+
p = Math.min(1, Math.max(0, p));
|
|
22
|
+
}
|
|
23
|
+
return { from: a.item, to: b.item, p };
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* What a release chooses: the stop the indicator is nearer to of the two it lies between (the one after it from
|
|
27
|
+
* halfway on), or the one of the two a fling is toward — a release at least `SHEET_FLING_VELOCITY` fast along the row
|
|
28
|
+
* (`velocity` in px per ms, positive toward the right).
|
|
29
|
+
*/
|
|
30
|
+
export function indicatorChoice(place, velocity) {
|
|
31
|
+
if (Math.abs(velocity) >= SHEET_FLING_VELOCITY)
|
|
32
|
+
return velocity > 0 ? place.to : place.from;
|
|
33
|
+
return place.p >= 0.5 ? place.to : place.from;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The gesture, as a Lit controller on the row's host: `pointerdown` on the host, the pointer followed on the window
|
|
37
|
+
* until it is released (before the drag is taken nothing captures it, and a mouse may leave the row), `setPointerCapture`
|
|
38
|
+
* once it is taken. The host leaves vertical drags to the page with `touch-action: pan-y` on the box that is pressed.
|
|
39
|
+
*/
|
|
40
|
+
export class IndicatorDragController {
|
|
41
|
+
constructor(host, options) {
|
|
42
|
+
this.host = host;
|
|
43
|
+
this.options = options;
|
|
44
|
+
this.gesture = null;
|
|
45
|
+
/** The click that follows a drag the row took is not a tap. */
|
|
46
|
+
this.swallowClick = false;
|
|
47
|
+
this.onPointerDown = (event) => {
|
|
48
|
+
this.swallowClick = false;
|
|
49
|
+
// A press whose release never came here (a mouse released outside the window) is over.
|
|
50
|
+
if (this.gesture && this.gesture.state !== 'taken')
|
|
51
|
+
this.unwatch(this.gesture);
|
|
52
|
+
if (this.gesture || !event.isPrimary || event.button !== 0)
|
|
53
|
+
return;
|
|
54
|
+
// A wheel or a trackpad moves nothing: only a pointer that presses.
|
|
55
|
+
if (!['touch', 'pen', 'mouse'].includes(event.pointerType))
|
|
56
|
+
return;
|
|
57
|
+
if (!this.options.accepts(event))
|
|
58
|
+
return;
|
|
59
|
+
this.gesture = { drag: new SheetDrag(event, 'x'), state: 'pending' };
|
|
60
|
+
this.watch(true);
|
|
61
|
+
};
|
|
62
|
+
this.onPointerMove = (event) => {
|
|
63
|
+
const gesture = this.gesture;
|
|
64
|
+
if (!gesture || event.pointerId !== gesture.drag.id || gesture.state === 'cancelled')
|
|
65
|
+
return;
|
|
66
|
+
// A mouse that comes back with no button down was released where nothing heard it.
|
|
67
|
+
if (gesture.state === 'pending' && event.pointerType === 'mouse' && event.buttons === 0) {
|
|
68
|
+
this.end(gesture);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const step = gesture.drag.move(event);
|
|
72
|
+
// Up or down first: the page's, for its whole length.
|
|
73
|
+
if (gesture.drag.rejected) {
|
|
74
|
+
this.end(gesture);
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (step === 'start') {
|
|
78
|
+
gesture.state = 'taken';
|
|
79
|
+
try {
|
|
80
|
+
this.host.setPointerCapture(event.pointerId);
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
// A pointer the browser does not know (a synthetic one) cannot be captured; its events still come here.
|
|
84
|
+
}
|
|
85
|
+
this.swallowClick = true;
|
|
86
|
+
window.addEventListener('keydown', this.onKey, { capture: true });
|
|
87
|
+
this.options.taken(event.clientX);
|
|
88
|
+
}
|
|
89
|
+
if (gesture.state !== 'taken')
|
|
90
|
+
return;
|
|
91
|
+
event.preventDefault();
|
|
92
|
+
this.options.moved(event.clientX);
|
|
93
|
+
};
|
|
94
|
+
this.onPointerUp = (event) => {
|
|
95
|
+
const gesture = this.gesture;
|
|
96
|
+
if (!gesture || event.pointerId !== gesture.drag.id)
|
|
97
|
+
return;
|
|
98
|
+
const taken = gesture.state === 'taken';
|
|
99
|
+
const velocity = taken ? gesture.drag.velocity(event) : 0;
|
|
100
|
+
this.end(gesture);
|
|
101
|
+
if (taken)
|
|
102
|
+
this.options.released(event.clientX, velocity);
|
|
103
|
+
};
|
|
104
|
+
this.onPointerCancel = (event) => {
|
|
105
|
+
const gesture = this.gesture;
|
|
106
|
+
if (!gesture || event.pointerId !== gesture.drag.id)
|
|
107
|
+
return;
|
|
108
|
+
const taken = gesture.state === 'taken';
|
|
109
|
+
this.end(gesture);
|
|
110
|
+
if (taken)
|
|
111
|
+
this.options.cancelled();
|
|
112
|
+
};
|
|
113
|
+
/** A capture lost while the drag lasts (not by its own release) cancels it. */
|
|
114
|
+
this.onLostCapture = (event) => {
|
|
115
|
+
const gesture = this.gesture;
|
|
116
|
+
if (!gesture || event.pointerId !== gesture.drag.id || gesture.state !== 'taken')
|
|
117
|
+
return;
|
|
118
|
+
this.end(gesture);
|
|
119
|
+
this.options.cancelled();
|
|
120
|
+
};
|
|
121
|
+
/** Escape while a drag lasts cancels it, and nothing else hears that key. */
|
|
122
|
+
this.onKey = (event) => {
|
|
123
|
+
if (event.key !== 'Escape' || this.gesture?.state !== 'taken')
|
|
124
|
+
return;
|
|
125
|
+
event.preventDefault();
|
|
126
|
+
event.stopPropagation();
|
|
127
|
+
this.cancel();
|
|
128
|
+
};
|
|
129
|
+
this.onClickCapture = (event) => {
|
|
130
|
+
if (!this.swallowClick)
|
|
131
|
+
return;
|
|
132
|
+
this.swallowClick = false;
|
|
133
|
+
event.preventDefault();
|
|
134
|
+
event.stopImmediatePropagation();
|
|
135
|
+
};
|
|
136
|
+
host.addController(this);
|
|
137
|
+
host.addEventListener('pointerdown', this.onPointerDown);
|
|
138
|
+
host.addEventListener('lostpointercapture', this.onLostCapture);
|
|
139
|
+
host.addEventListener('click', this.onClickCapture, { capture: true });
|
|
140
|
+
}
|
|
141
|
+
hostDisconnected() {
|
|
142
|
+
const gesture = this.gesture;
|
|
143
|
+
if (gesture)
|
|
144
|
+
this.unwatch(gesture);
|
|
145
|
+
this.swallowClick = false;
|
|
146
|
+
}
|
|
147
|
+
/** Whether the indicator follows the pointer now. */
|
|
148
|
+
get taken() {
|
|
149
|
+
return this.gesture?.state === 'taken';
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Ends a drag the row has taken without a release (the product set the selection, or took away an item under the
|
|
153
|
+
* indicator): the pointer, still down, is ignored until it is released. `notify` calls `cancelled`.
|
|
154
|
+
*/
|
|
155
|
+
cancel(notify = true) {
|
|
156
|
+
const gesture = this.gesture;
|
|
157
|
+
if (!gesture)
|
|
158
|
+
return;
|
|
159
|
+
if (gesture.state === 'pending') {
|
|
160
|
+
this.end(gesture);
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
if (gesture.state !== 'taken')
|
|
164
|
+
return;
|
|
165
|
+
gesture.state = 'cancelled';
|
|
166
|
+
window.removeEventListener('keydown', this.onKey, { capture: true });
|
|
167
|
+
if (notify)
|
|
168
|
+
this.options.cancelled();
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Lets one activation through while the click of the release is still swallowed: a release that chooses an item
|
|
172
|
+
* activates it with the item's own click (a link is followed), and the click the browser sends after is still not a tap.
|
|
173
|
+
*/
|
|
174
|
+
activate(click) {
|
|
175
|
+
const swallow = this.swallowClick;
|
|
176
|
+
this.swallowClick = false;
|
|
177
|
+
try {
|
|
178
|
+
click();
|
|
179
|
+
}
|
|
180
|
+
finally {
|
|
181
|
+
this.swallowClick = swallow;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
watch(on) {
|
|
185
|
+
const listen = on ? window.addEventListener.bind(window) : window.removeEventListener.bind(window);
|
|
186
|
+
listen('pointermove', this.onPointerMove, { capture: true });
|
|
187
|
+
listen('pointerup', this.onPointerUp, { capture: true });
|
|
188
|
+
listen('pointercancel', this.onPointerCancel, { capture: true });
|
|
189
|
+
}
|
|
190
|
+
unwatch(gesture) {
|
|
191
|
+
window.removeEventListener('keydown', this.onKey, { capture: true });
|
|
192
|
+
this.watch(false);
|
|
193
|
+
if (this.gesture === gesture)
|
|
194
|
+
this.gesture = null;
|
|
195
|
+
}
|
|
196
|
+
/** The pointer is up (or gone): the click that may follow is swallowed no longer than this task. */
|
|
197
|
+
end(gesture) {
|
|
198
|
+
const pending = gesture.state === 'pending';
|
|
199
|
+
this.unwatch(gesture);
|
|
200
|
+
if (pending)
|
|
201
|
+
return;
|
|
202
|
+
setTimeout(() => {
|
|
203
|
+
this.swallowClick = false;
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
//# sourceMappingURL=indicator-drag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indicator-drag.js","sourceRoot":"","sources":["../../src/primitives/indicator-drag.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AA6B7D;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAI,KAAkC,EAAE,CAAS;IAC7E,IAAI,CAAC,KAAK,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAC/B,MAAM,MAAM,GAAG,CAAC,IAAsB,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxE,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,OAAO,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAAE,KAAK,EAAE,CAAC;IAC1E,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,I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C9B,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QACrE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAClB,IAAI,IAAI,CAAC,OAAO,KAAK,OAAO;YAAE,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACpD,CAAC;IAED,oGAAoG;IAC5F,GAAG,CAAC,OAAgB;QAC1B,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC;QAC5C,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACtB,IAAI,OAAO;YAAE,OAAO;QACpB,UAAU,CAAC,GAAG,EAAE;YACd,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC5B,CAAC,CAAC,CAAC;IACL,CAAC;CAQF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** The first interactive element in `root` (a slotted element and its subtree, shadow trees included), if any. */
|
|
2
|
+
export declare function findInteractive(root: Element): Element | null;
|
|
3
|
+
/**
|
|
4
|
+
* The first interactive element slotted into `slot` (its assigned elements and their subtrees), after the custom
|
|
5
|
+
* elements among them have drawn their shadow trees (a `<tanrei-button>` draws its native control in its first update).
|
|
6
|
+
*/
|
|
7
|
+
export declare function slottedInteractive(slot: HTMLSlotElement | null | undefined): Promise<Element | null>;
|
|
8
|
+
/**
|
|
9
|
+
* Whether a press whose composed path is `path` lands on something that answers it itself: the element pressed, or one
|
|
10
|
+
* around it, is a control, a link, editable or a Tab stop — or the element pressed shows the pointer cursor, which is
|
|
11
|
+
* how a product's own clickable box is told from text.
|
|
12
|
+
*/
|
|
13
|
+
export declare function answersPress(path: readonly EventTarget[]): boolean;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What makes an element interactive, for the rule that an action's content holds nothing interactive (CRD-15, LST-24):
|
|
3
|
+
* natively focusable or operable elements, anything with a tabindex or editable, and the widget roles. A custom element
|
|
4
|
+
* counts when its own shadow tree holds one of these.
|
|
5
|
+
*/
|
|
6
|
+
const INTERACTIVE = [
|
|
7
|
+
'a[href]',
|
|
8
|
+
'area[href]',
|
|
9
|
+
'button',
|
|
10
|
+
'input:not([type="hidden"])',
|
|
11
|
+
'select',
|
|
12
|
+
'textarea',
|
|
13
|
+
'iframe',
|
|
14
|
+
'summary',
|
|
15
|
+
'audio[controls]',
|
|
16
|
+
'video[controls]',
|
|
17
|
+
'[contenteditable]:not([contenteditable="false"])',
|
|
18
|
+
'[tabindex]',
|
|
19
|
+
...['button', 'link', 'checkbox', 'radio', 'switch', 'textbox', 'searchbox', 'combobox', 'slider', 'spinbutton', 'menuitem', 'option', 'tab'].map((role) => `[role="${role}"]`),
|
|
20
|
+
].join(', ');
|
|
21
|
+
/** The first interactive element in `root` (a slotted element and its subtree, shadow trees included), if any. */
|
|
22
|
+
export function findInteractive(root) {
|
|
23
|
+
if (root.matches(INTERACTIVE))
|
|
24
|
+
return root;
|
|
25
|
+
if (root.shadowRoot && (root.shadowRoot.delegatesFocus || root.shadowRoot.querySelector(INTERACTIVE)))
|
|
26
|
+
return root;
|
|
27
|
+
for (const element of root.querySelectorAll('*')) {
|
|
28
|
+
if (element.matches(INTERACTIVE))
|
|
29
|
+
return element;
|
|
30
|
+
if (element.shadowRoot && (element.shadowRoot.delegatesFocus || element.shadowRoot.querySelector(INTERACTIVE)))
|
|
31
|
+
return element;
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The first interactive element slotted into `slot` (its assigned elements and their subtrees), after the custom
|
|
37
|
+
* elements among them have drawn their shadow trees (a `<tanrei-button>` draws its native control in its first update).
|
|
38
|
+
*/
|
|
39
|
+
export async function slottedInteractive(slot) {
|
|
40
|
+
const assigned = slot?.assignedElements({ flatten: true }) ?? [];
|
|
41
|
+
const elements = assigned.flatMap((element) => [element, ...element.querySelectorAll('*')]);
|
|
42
|
+
await Promise.all(elements.map((element) => element.updateComplete).filter(Boolean));
|
|
43
|
+
for (const element of assigned) {
|
|
44
|
+
const found = findInteractive(element);
|
|
45
|
+
if (found)
|
|
46
|
+
return found;
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* What takes a press itself, for a hit area that reaches over other content and must yield to it (TAB-5): what
|
|
52
|
+
* `findInteractive()` looks for, less an element that is only a place focus is sent to (`tabindex="-1"`), plus a label
|
|
53
|
+
* (a press on it is its control's) and whatever shows the pointer of a link.
|
|
54
|
+
*/
|
|
55
|
+
const ANSWERS = `${INTERACTIVE.replace('[tabindex]', '[tabindex]:not([tabindex^="-"])')}, label`;
|
|
56
|
+
/**
|
|
57
|
+
* Whether a press whose composed path is `path` lands on something that answers it itself: the element pressed, or one
|
|
58
|
+
* around it, is a control, a link, editable or a Tab stop — or the element pressed shows the pointer cursor, which is
|
|
59
|
+
* how a product's own clickable box is told from text.
|
|
60
|
+
*/
|
|
61
|
+
export function answersPress(path) {
|
|
62
|
+
const pressed = path[0];
|
|
63
|
+
if (pressed instanceof Element && getComputedStyle(pressed).cursor === 'pointer')
|
|
64
|
+
return true;
|
|
65
|
+
return path.some((node) => node instanceof Element && node.matches(ANSWERS));
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=interactive.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interactive.js","sourceRoot":"","sources":["../../src/primitives/interactive.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,GAAG;IAClB,SAAS;IACT,YAAY;IACZ,QAAQ;IACR,4BAA4B;IAC5B,QAAQ;IACR,UAAU;IACV,QAAQ;IACR,SAAS;IACT,iBAAiB;IACjB,iBAAiB;IACjB,kDAAkD;IAClD,YAAY;IACZ,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE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