@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,813 @@
|
|
|
1
|
+
import { type CSSResultGroup, LitElement, type PropertyDeclarations, type PropertyValues } from 'lit';
|
|
2
|
+
import { type LinkForm, type SeparationProp } from '../../primitives/index.js';
|
|
3
|
+
import '../keyboard-shortcut/keyboard-shortcut.js';
|
|
4
|
+
/** Where the surface goes against the anchor. A closed set; an unknown value is drawn as `bottom-start` (MNU-14). */
|
|
5
|
+
export type TanreiMenuPlacement = 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
|
|
6
|
+
/**
|
|
7
|
+
* Why the menu asks to be closed (MNU-5, MNU-6), by the spec's names. The web has no back gesture of its own: Escape is
|
|
8
|
+
* its close request, so `back` is never sent here.
|
|
9
|
+
*/
|
|
10
|
+
export type TanreiMenuCloseReason = 'escape' | 'back' | 'outside' | 'tab' | 'focus-out' | 'item';
|
|
11
|
+
export interface TanreiMenuCloseDetail {
|
|
12
|
+
reason: TanreiMenuCloseReason;
|
|
13
|
+
}
|
|
14
|
+
/** What a checkbox item's `change` carries: its new `checked`. */
|
|
15
|
+
export interface TanreiMenuCheckboxItemChangeDetail {
|
|
16
|
+
checked: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** What a group's `change` carries: its new `value`. */
|
|
19
|
+
export interface TanreiMenuGroupChangeDetail {
|
|
20
|
+
value: string | null;
|
|
21
|
+
}
|
|
22
|
+
/** What a submenu item's `toggle` carries: its new `open`. */
|
|
23
|
+
export interface TanreiSubmenuToggleDetail {
|
|
24
|
+
open: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** How the menu tells a group from what is next to it (MNU-35): `auto` takes `comp.menu.separation`. */
|
|
27
|
+
export type TanreiMenuSeparation = SeparationProp;
|
|
28
|
+
type Condition = 'unselected' | 'selected' | 'destructive' | 'expanded';
|
|
29
|
+
/** What the menu tells each item: where it is in its surface, and which columns that surface reserves. */
|
|
30
|
+
interface ItemContext {
|
|
31
|
+
position: number;
|
|
32
|
+
size: number;
|
|
33
|
+
markColumn: boolean;
|
|
34
|
+
iconColumn: boolean;
|
|
35
|
+
/** MNU-19: the surface holds an item with a trailing icon or a submenu indicator, so every row keeps that column. */
|
|
36
|
+
trailingIconColumn: boolean;
|
|
37
|
+
radioChecked: boolean;
|
|
38
|
+
/** MNU-31: the keyboard shortcut's form, as `comp.menu.shortcut.variant` names it where the menu is. */
|
|
39
|
+
shortcutVariant: string;
|
|
40
|
+
/** MNU-38: the glyph the item's group names for its marks; empty where it names none. */
|
|
41
|
+
groupMarkIcon: string;
|
|
42
|
+
}
|
|
43
|
+
export interface MenuBox {
|
|
44
|
+
x: number;
|
|
45
|
+
y: number;
|
|
46
|
+
width: number;
|
|
47
|
+
height: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Where the surface goes (MNU-2): `offset` from the anchor on the placement's side, flipped to the other side when this
|
|
51
|
+
* one has less room than the surface needs within `margin` of the viewport's edge and the other has more; aligned by its
|
|
52
|
+
* start or end edge with the anchor's (mirrored in right-to-left), then shifted along the anchor to stay `margin` inside
|
|
53
|
+
* the viewport; its height limited to the room left. Coordinates are the viewport's (`left` is physical).
|
|
54
|
+
*/
|
|
55
|
+
export declare function placeMenu(input: {
|
|
56
|
+
anchor: MenuBox;
|
|
57
|
+
surface: {
|
|
58
|
+
width: number;
|
|
59
|
+
height: number;
|
|
60
|
+
};
|
|
61
|
+
viewport: {
|
|
62
|
+
width: number;
|
|
63
|
+
height: number;
|
|
64
|
+
};
|
|
65
|
+
placement: TanreiMenuPlacement;
|
|
66
|
+
offset: number;
|
|
67
|
+
margin: number;
|
|
68
|
+
rtl: boolean;
|
|
69
|
+
}): {
|
|
70
|
+
top: number;
|
|
71
|
+
left: number;
|
|
72
|
+
maxHeight: number;
|
|
73
|
+
side: "bottom" | "top";
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Where a submenu's surface goes (MNU-46, MNU-47): beside the surface that holds its item (`parent`), `offset` from that
|
|
77
|
+
* surface's inline-end edge — or from the side `prefer` names, the side its parent surface was itself placed on — and on
|
|
78
|
+
* the other side when this one has less room than the surface needs within `margin` of the viewport's edge and the
|
|
79
|
+
* other has more. Where the side it is on has room for `minWidth` but not for the surface, the surface is narrowed to
|
|
80
|
+
* the room. Where neither side has room for `minWidth` it is laid over `parent`: on the side with more room, as far
|
|
81
|
+
* towards it as the margin allows, as wide as leaves `touch` of the parent uncovered on its other side and never
|
|
82
|
+
* narrower than `minWidth`. Its first row (`lead` below its own block-start edge) is level with the item's `row`, then
|
|
83
|
+
* it is shifted along the block axis to stay `margin` inside the viewport, its height limited to the room.
|
|
84
|
+
* Coordinates are the viewport's (`left` and `side` are physical).
|
|
85
|
+
*/
|
|
86
|
+
export declare function placeSubmenu(input: {
|
|
87
|
+
parent: MenuBox;
|
|
88
|
+
row: MenuBox;
|
|
89
|
+
surface: {
|
|
90
|
+
width: number;
|
|
91
|
+
height: number;
|
|
92
|
+
};
|
|
93
|
+
lead: number;
|
|
94
|
+
viewport: {
|
|
95
|
+
width: number;
|
|
96
|
+
height: number;
|
|
97
|
+
};
|
|
98
|
+
offset: number;
|
|
99
|
+
margin: number;
|
|
100
|
+
minWidth: number;
|
|
101
|
+
touch: number;
|
|
102
|
+
rtl: boolean;
|
|
103
|
+
prefer?: 'left' | 'right' | null;
|
|
104
|
+
}): {
|
|
105
|
+
top: number;
|
|
106
|
+
left: number;
|
|
107
|
+
width: number;
|
|
108
|
+
maxHeight: number;
|
|
109
|
+
side: "left" | "right";
|
|
110
|
+
overlap: boolean;
|
|
111
|
+
};
|
|
112
|
+
/** Whether `p` lies in the triangle `a`, `b`, `c` (its edges included). MNU-45: the pointer's path to a submenu. */
|
|
113
|
+
export declare function inTriangle(p: {
|
|
114
|
+
x: number;
|
|
115
|
+
y: number;
|
|
116
|
+
}, a: {
|
|
117
|
+
x: number;
|
|
118
|
+
y: number;
|
|
119
|
+
}, b: {
|
|
120
|
+
x: number;
|
|
121
|
+
y: number;
|
|
122
|
+
}, c: {
|
|
123
|
+
x: number;
|
|
124
|
+
y: number;
|
|
125
|
+
}): boolean;
|
|
126
|
+
/**
|
|
127
|
+
* What an element forwarded into a menu stands for, where that is not itself: a function, under this key, that returns
|
|
128
|
+
* the rows it draws for the menu in its own shadow root. A menubar's menu that is folded into the overflow item draws
|
|
129
|
+
* itself there as a submenu item (MBR-22). Internal between Tanrei elements.
|
|
130
|
+
* @internal
|
|
131
|
+
*/
|
|
132
|
+
export declare const FORWARDED_ROWS: unique symbol;
|
|
133
|
+
/**
|
|
134
|
+
* What a menubar tells a menu it shows — its own menus' and the overflow item's (MBR-9, MBR-13, MBR-14, MBR-22, MBR-29).
|
|
135
|
+
* Internal between Tanrei elements; no part of the menu's public surface.
|
|
136
|
+
* @internal
|
|
137
|
+
*/
|
|
138
|
+
export interface TanreiMenuBarChannel {
|
|
139
|
+
/** MBR-14: the bar. A press or focus inside it is not outside the menu: the bar decides what it does. */
|
|
140
|
+
ground: Element;
|
|
141
|
+
/** MBR-13: an inline arrow key the menu has no use of its own for (MNU-51) is handed to the bar, which moves to the neighbouring menu. */
|
|
142
|
+
inlineKey(towardsEnd: boolean): void;
|
|
143
|
+
/** MBR-9: where focus goes when the menu opens — its first or its last enabled item — and whether without the focus ring (the input was a pointer). */
|
|
144
|
+
entry: {
|
|
145
|
+
end: 'first' | 'last';
|
|
146
|
+
quiet: boolean;
|
|
147
|
+
};
|
|
148
|
+
/** MBR-29: the menu takes the place of another, or gives its place to one: its surfaces come and go without their motion. */
|
|
149
|
+
quick: boolean;
|
|
150
|
+
/** MBR-22: the menu's own surface is the overflow item's, whose level is not counted in the depth a debug build reports (MNU-52). */
|
|
151
|
+
fold: boolean;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* What every row of a menu is (the spec's `item`, `checkbox-item`, `radio-item` and `submenu` kinds): a label, optional
|
|
155
|
+
* supporting text, a leading icon and trailing text. The host carries the row's semantics and takes focus — except a
|
|
156
|
+
* link item (MNU-53), whose row is the browser's own link: the anchor in its shadow root carries them, and the host is
|
|
157
|
+
* nothing to assistive technology. The menu moves focus among the rows of a surface, tells each its position, the
|
|
158
|
+
* surface's size and which columns the surface reserves, and answers its activation.
|
|
159
|
+
*/
|
|
160
|
+
export declare abstract class TanreiMenuRowBase extends LitElement {
|
|
161
|
+
static styles: CSSResultGroup;
|
|
162
|
+
static properties: PropertyDeclarations;
|
|
163
|
+
/** The item's text and its accessible name. Required. */
|
|
164
|
+
label: string;
|
|
165
|
+
/** A line below the label that says more about the item; it is the item's description. */
|
|
166
|
+
supportingText: string;
|
|
167
|
+
/** The name of a glyph of the system's icon set before the label. A glyph the icon set flags as showing a direction (`arrow_forward`, `send`) is drawn mirrored in a right-to-left layout. */
|
|
168
|
+
leadingIcon: string;
|
|
169
|
+
/**
|
|
170
|
+
* Text at the end of the row that is not a keyboard shortcut, such as a count or "Beta": it is the item's description,
|
|
171
|
+
* never its keyboard shortcut. An item's shortcut goes in `shortcut`; an item that has both draws the shortcut.
|
|
172
|
+
*/
|
|
173
|
+
trailingText: string;
|
|
174
|
+
/** Prevents activation. The item stays reachable with the arrow keys. */
|
|
175
|
+
disabled: boolean;
|
|
176
|
+
/** What the menu says about this item. */
|
|
177
|
+
protected context: ItemContext;
|
|
178
|
+
/** MNU-8: focus the pointer moved here, which draws no focus ring. */
|
|
179
|
+
protected pointerFocused: boolean;
|
|
180
|
+
/**
|
|
181
|
+
* MNU-30: a glyph the menu draws — the check of a mark, the check in a checked box, a named mark, the submenu
|
|
182
|
+
* indicator — carries `data-drawn` while the icon set can draw it rather than spell its name in a fallback face. Its
|
|
183
|
+
* ink — the glyph's name at its own width — is watched for any change of size: the icon face loading or failing, the
|
|
184
|
+
* family changing with the system, the menu opening.
|
|
185
|
+
*/
|
|
186
|
+
private readonly glyphs;
|
|
187
|
+
/**
|
|
188
|
+
* MNU-33: the leading and trailing glyphs, the glyph a `mark-icon` names and the submenu indicator are marked when the
|
|
189
|
+
* icon set mirrors their names in right-to-left (`arrow_right`, `chevron_right`, `undo`), and `iconGlyph()` draws the
|
|
190
|
+
* mark. The check (MNU-22, MNU-39) is not among them: it is never mirrored.
|
|
191
|
+
*/
|
|
192
|
+
private readonly mirror;
|
|
193
|
+
/** @internal How the activation being dispatched came: a Space keeps a checkbox or radio item's menu open (MNU-6). */
|
|
194
|
+
activation: 'pointer' | 'enter' | 'space';
|
|
195
|
+
/** The ARIA role of the kind. */
|
|
196
|
+
protected abstract readonly itemRole: 'menuitem' | 'menuitemcheckbox' | 'menuitemradio';
|
|
197
|
+
/** MNU-18: the condition the item is drawn from. */
|
|
198
|
+
protected get condition(): Condition;
|
|
199
|
+
/** Whether a checkbox or radio item is checked (always false for an action). */
|
|
200
|
+
protected get isChecked(): boolean;
|
|
201
|
+
/** MNU-38: which control a checkbox or radio item is marked as, where its mark is a control look; null for a kind that has no mark. */
|
|
202
|
+
protected get markKind(): 'checkbox' | 'radio' | null;
|
|
203
|
+
/** MNU-38: the glyph the item itself names for its mark. */
|
|
204
|
+
protected get ownMarkIcon(): string;
|
|
205
|
+
/** MNU-31: the chords of the item's shortcut; a kind without one has none. */
|
|
206
|
+
protected get shortcutKeys(): string[];
|
|
207
|
+
/** MNU-21: the product's glyph at the end of the row; a kind without one has none. */
|
|
208
|
+
protected get trailingGlyph(): string;
|
|
209
|
+
/** MNU-42: whether the row ends in the submenu indicator. */
|
|
210
|
+
protected get opensSubmenu(): boolean;
|
|
211
|
+
/** MNU-24: what the kind adds to the host's semantics. */
|
|
212
|
+
protected kindAria(): Record<string, string | null>;
|
|
213
|
+
/** MNU-53: the link the item is now — its row is then an anchor that carries its semantics and takes its focus. Null for every kind but an item with a destination. */
|
|
214
|
+
protected get linkForm(): LinkForm | null;
|
|
215
|
+
/** MNU-57: what the kind is, where it takes no destination ("a checkbox item"); null for the kind that takes one. */
|
|
216
|
+
protected get holds(): string | null;
|
|
217
|
+
/**
|
|
218
|
+
* @internal Whether the row draws a link's mark in its trailing icon column (MNU-55): a link item that opens a new
|
|
219
|
+
* context and names no trailing icon of its own. The menu reserves the column for its surface then (MNU-19).
|
|
220
|
+
*/
|
|
221
|
+
get linkMarked(): boolean;
|
|
222
|
+
/** The element that takes the item's focus and carries its semantics: the anchor of a link item (MNU-53), else the host. */
|
|
223
|
+
private get focusTarget();
|
|
224
|
+
/** @internal Whether the item itself — its host, or the anchor of a link item — is where `event` came from (not something inside it, such as a submenu's surface). */
|
|
225
|
+
isTargetOf(event: Event): boolean;
|
|
226
|
+
/** Whether the item has focus: its host, or the anchor of a link item. */
|
|
227
|
+
private get focused();
|
|
228
|
+
/** Focus goes to the element that is the item: the host, or the anchor of a link item (MNU-53). */
|
|
229
|
+
focus(options?: FocusOptions): void;
|
|
230
|
+
/** MNU-15 / MNU-16: the pressed state, press-hold and the answer the system chooses (src/primitives/press.ts). */
|
|
231
|
+
private readonly press;
|
|
232
|
+
private spaceDown;
|
|
233
|
+
/** Whether the item had focus before a render that may replace the element that holds it (a row that becomes a link, or stops being one). */
|
|
234
|
+
private hadFocus;
|
|
235
|
+
constructor();
|
|
236
|
+
connectedCallback(): void;
|
|
237
|
+
/** @internal The row in the surface that holds the item. */
|
|
238
|
+
get rowElement(): HTMLElement | null;
|
|
239
|
+
/** @internal The menu's side: the item's position, its surface's size, the columns and a radio item's checked. */
|
|
240
|
+
setMenuContext(context: ItemContext): void;
|
|
241
|
+
/** @internal MNU-8: the pointer moved onto the item — focus follows it, without the focus ring. */
|
|
242
|
+
focusFromPointer(): void;
|
|
243
|
+
/**
|
|
244
|
+
* @internal MNU-45: the pointer crosses the item on its way to an open submenu — it is not drawn hovered. Written on
|
|
245
|
+
* the row at once, not in a render: the pointer is already over it.
|
|
246
|
+
*/
|
|
247
|
+
suppressHover(suppress: boolean): void;
|
|
248
|
+
/**
|
|
249
|
+
* @internal MNU-38: where a browser has no style container queries, the mark the design system chooses is read from
|
|
250
|
+
* the cascade and written on the mark column; where it has them nothing is written (an attribute could only go stale).
|
|
251
|
+
*/
|
|
252
|
+
syncMark(): void;
|
|
253
|
+
/**
|
|
254
|
+
* The click that activates the item: on the host, which the menu answers — or, for a link item, the anchor's own, so
|
|
255
|
+
* that the browser follows the link after it unless it was cancelled (MNU-54).
|
|
256
|
+
*/
|
|
257
|
+
private send;
|
|
258
|
+
/** `element.click()` activates the item as a pointer would; a disabled item does nothing (MNU-9). */
|
|
259
|
+
click(): void;
|
|
260
|
+
/** MNU-6: the activation is a click on the host, which the menu answers; `via` says how it came. */
|
|
261
|
+
private activate;
|
|
262
|
+
/** Enter activates on key-down and Space on key-up, as a native button does. */
|
|
263
|
+
private readonly onKeyDown;
|
|
264
|
+
private readonly onKeyUp;
|
|
265
|
+
/** MNU-17: where style queries are missing, the focus style is read when focus arrives. */
|
|
266
|
+
private readonly onFocusIn;
|
|
267
|
+
private readonly onFocusOut;
|
|
268
|
+
/** MNU-31: whether the item draws a keyboard shortcut (in place of its trailing text). */
|
|
269
|
+
private get hasShortcut();
|
|
270
|
+
/** MNU-38: the glyph the mark is, where the item or its group names one; empty where the design system chooses. */
|
|
271
|
+
private get markIconName();
|
|
272
|
+
/**
|
|
273
|
+
* MNU-24: named by the label; described by the supporting text and by the trailing text it draws — never read as a
|
|
274
|
+
* shortcut; its shortcut is `aria-keyshortcuts`, in the form the keyboard shortcut it draws gives (KBS-12).
|
|
275
|
+
*/
|
|
276
|
+
private semantics;
|
|
277
|
+
protected willUpdate(_changed: PropertyValues<this>): void;
|
|
278
|
+
protected firstUpdated(): void;
|
|
279
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
280
|
+
/**
|
|
281
|
+
* MNU-22, MNU-38 … MNU-40: the mark column. A glyph the item or its group names is that glyph alone; otherwise the
|
|
282
|
+
* column holds both of the design system's choices — the control look of the kind (a box with the icon set's check on
|
|
283
|
+
* it, or a ring with its fill) and the icon set's check — and the styles draw the one the choice token names.
|
|
284
|
+
*/
|
|
285
|
+
private renderMark;
|
|
286
|
+
protected renderRow(): import("lit").TemplateResult;
|
|
287
|
+
protected render(): import("lit").TemplateResult;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* What an item that is not a submenu is (the spec's `item`, `checkbox-item` and `radio-item` kinds): a row that may also
|
|
291
|
+
* end in a keyboard shortcut and a trailing icon; the mark of a checkbox or radio item is in the mark column.
|
|
292
|
+
*/
|
|
293
|
+
export declare abstract class TanreiMenuItemBase extends TanreiMenuRowBase {
|
|
294
|
+
static properties: PropertyDeclarations;
|
|
295
|
+
/** The name of a glyph at the end of the row; one the icon set flags (`arrow_right`) is mirrored in a right-to-left layout. */
|
|
296
|
+
trailingIcon: string;
|
|
297
|
+
/**
|
|
298
|
+
* The item's keyboard shortcut, in the keyboard shortcut component's key names: one chord per string, pressed in order
|
|
299
|
+
* (`["mod+c"]`; the attribute holds the chords separated by spaces, `shortcut="mod+c"`). The menu draws it at the end of
|
|
300
|
+
* the row for the keyboard the person uses and exposes it as `aria-keyshortcuts` (MNU-24, MNU-31). It does not make
|
|
301
|
+
* the keys work; the product binds them.
|
|
302
|
+
*/
|
|
303
|
+
shortcut: string[];
|
|
304
|
+
protected get shortcutKeys(): string[];
|
|
305
|
+
protected get trailingGlyph(): string;
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* An action in a menu — the spec's item kind `item`: it does something and closes the menu.
|
|
309
|
+
*
|
|
310
|
+
* With `href` it is a link item (MNU-53): the row is an `<a href role="menuitem" tabindex="-1">` in the shadow
|
|
311
|
+
* root, drawn exactly as an action is and moved to with the same keys, and the browser's own link in everything else —
|
|
312
|
+
* its context menu, a new tab by a modified or a middle click, its address shown on hover. It is exposed as a menu
|
|
313
|
+
* item, not as a link: a menu is read by its items. A plain activation — a click, a touch, Enter, and Space too, which
|
|
314
|
+
* activates every row of a menu — fires the item's `click` (the anchor's own: `preventDefault()` cancels the
|
|
315
|
+
* navigation, as a router does), then the menu's `close`, and then the browser follows the link (MNU-54). A modified
|
|
316
|
+
* or a middle click is the browser's: no `close`, and the menu stays open. `target="new"` opens a new tab, safely
|
|
317
|
+
* (`noopener`), ends the row with the icon set's `open_in_new` in the trailing icon column unless `trailing-icon` names
|
|
318
|
+
* a glyph, and is said through `targetLabel` (MNU-55). A disabled link item is the anchor without `href` (MNU-56).
|
|
319
|
+
*
|
|
320
|
+
* @tag tanrei-menu-item
|
|
321
|
+
* @csspart container - The row: its color, corners, every state, the ripple and the focus ring.
|
|
322
|
+
* @csspart mark - The mark column (reserved while the surface holds a checkbox or radio item).
|
|
323
|
+
* @csspart leading-icon - The leading glyph.
|
|
324
|
+
* @csspart label - The item's text.
|
|
325
|
+
* @csspart supporting-text - The line below the label.
|
|
326
|
+
* @csspart trailing-text - The text at the end of the row that is not a shortcut (a count, "Beta").
|
|
327
|
+
* @csspart shortcut - The `<tanrei-keyboard-shortcut>` that draws the item's shortcut in the trailing column (MNU-31).
|
|
328
|
+
* @csspart trailing-icon - The trailing glyph; for a link item that opens a new context and names none, the `open_in_new` mark.
|
|
329
|
+
* @csspart link-mark - The `open_in_new` glyph of a link item that opens a new context (the same element as `trailing-icon`; hidden from assistive technology).
|
|
330
|
+
* @fires click - The item was activated by pointer, touch, keyboard or assistive technology; the menu then emits `close` with the reason `item`. For a link item it is the anchor's own click, before the menu closes and before the link is followed: `preventDefault()` stops the navigation and not the `close`.
|
|
331
|
+
*/
|
|
332
|
+
export declare class TanreiMenuItem extends TanreiMenuItemBase {
|
|
333
|
+
static properties: PropertyDeclarations;
|
|
334
|
+
/**
|
|
335
|
+
* MBR-43: what a menubar tells the row a folded bar item draws of itself — its link item names the page the person
|
|
336
|
+
* is on, so the row's anchor says so (`aria-current="page"`); the weight is the bar item's to draw. Internal between
|
|
337
|
+
* Tanrei elements and no prop of the item.
|
|
338
|
+
* @internal
|
|
339
|
+
*/
|
|
340
|
+
barCurrent: boolean;
|
|
341
|
+
/** Marks an action that deletes or discards something; it is drawn in the destructive condition (the error color). */
|
|
342
|
+
destructive: boolean;
|
|
343
|
+
/** The address the item leads to: a URL, a path or a fragment. Not empty, the item is a link item (MNU-53): the browser's own link, exposed as a menu item; a plain activation fires `click`, closes the menu and follows it (MNU-54). White space is no address; a `javascript:` address or one that cannot be read is refused and reported (MNU-57). */
|
|
344
|
+
href: string;
|
|
345
|
+
/** Where a link item opens: `same` (here) or `new` (a new tab or window, with `noopener`), which the row marks with `open_in_new` unless `trailing-icon` names a glyph, and says through `targetLabel` (MNU-55). HTML's `_self` and `_blank` are read as those; anything else is `same` and is reported (MNU-57). Ignored without `href`. */
|
|
346
|
+
target: string;
|
|
347
|
+
/** What assistive technology reads at the end of the link item's description while `target` is `new` ("opens in a new tab"): your words, in your language. Required then; ignored otherwise. */
|
|
348
|
+
targetLabel: string;
|
|
349
|
+
/** Web only: the anchor's `rel`. `noopener` is added while `target` is `new`; `noreferrer` is yours to add. */
|
|
350
|
+
rel: string | null;
|
|
351
|
+
/** Web only: the anchor's `download`. */
|
|
352
|
+
download: string | null;
|
|
353
|
+
/**
|
|
354
|
+
* MNU-53, MNU-55 … MNU-57: the link the item is while it has an address, what its anchor carries — the menu item
|
|
355
|
+
* role in place of the link's, because a menu is read by its items — and what a debug build is told
|
|
356
|
+
* (src/primitives/link.ts). The item keeps a menu's keys: Space presses it as Enter does (MNU-54).
|
|
357
|
+
*/
|
|
358
|
+
private readonly link;
|
|
359
|
+
protected get linkForm(): LinkForm | null;
|
|
360
|
+
/** @internal Whether the item is a link item now (MNU-53). */
|
|
361
|
+
get isLink(): boolean;
|
|
362
|
+
protected readonly itemRole = "menuitem";
|
|
363
|
+
/** MBR-43: the current page is said where the link is — on the anchor, which carries a link item's semantics (MNU-53). */
|
|
364
|
+
protected kindAria(): Record<string, string | null>;
|
|
365
|
+
protected get condition(): Condition;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* An option switched on or off on its own — the spec's item kind `checkbox-item`. Its `checked` is its own: the menu
|
|
369
|
+
* switches it when the item is activated and fires the item's `change`. A checked item's row is filled, and it is
|
|
370
|
+
* marked as the design system chooses (`comp.menu.checkbox-item.mark`: the checkbox look, a box in both conditions, in
|
|
371
|
+
* the default system; the icon set's check in m3-like and cupertino) unless the item or its group names a glyph.
|
|
372
|
+
*
|
|
373
|
+
* @tag tanrei-menu-checkbox-item
|
|
374
|
+
* @csspart container - The row.
|
|
375
|
+
* @csspart mark - The mark column: the box of the checkbox look, or the glyph that marks the item while it is checked. A drawing, never a control.
|
|
376
|
+
* @csspart leading-icon - The leading glyph.
|
|
377
|
+
* @csspart label - The item's text.
|
|
378
|
+
* @csspart supporting-text - The line below the label.
|
|
379
|
+
* @csspart trailing-text - The text at the end of the row that is not a shortcut.
|
|
380
|
+
* @csspart shortcut - The `<tanrei-keyboard-shortcut>` that draws the item's shortcut in the trailing column (MNU-31).
|
|
381
|
+
* @csspart trailing-icon - The trailing glyph.
|
|
382
|
+
* @fires {CustomEvent<TanreiMenuCheckboxItemChangeDetail>} change - The item was activated: `detail.checked` (and the element's `checked`) is the new value.
|
|
383
|
+
*/
|
|
384
|
+
export declare class TanreiMenuCheckboxItem extends TanreiMenuItemBase {
|
|
385
|
+
static properties: PropertyDeclarations;
|
|
386
|
+
/** Whether the option is on. */
|
|
387
|
+
checked: boolean;
|
|
388
|
+
/**
|
|
389
|
+
* The name of a glyph of the system's icon set to mark this item with while it is checked, instead of the mark the
|
|
390
|
+
* design system chooses (`check` draws a plain check). Empty takes its group's `mark-icon`, then the system's choice.
|
|
391
|
+
*/
|
|
392
|
+
markIcon: string;
|
|
393
|
+
protected readonly itemRole = "menuitemcheckbox";
|
|
394
|
+
protected get holds(): string;
|
|
395
|
+
protected get condition(): Condition;
|
|
396
|
+
protected get isChecked(): boolean;
|
|
397
|
+
protected get markKind(): 'checkbox';
|
|
398
|
+
protected get ownMarkIcon(): string;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* One choice of several in its group — the spec's item kind `radio-item`: it is checked while its group's `value` is
|
|
402
|
+
* its own. A checked item's row is filled, and it is marked as the design system chooses (`comp.menu.radio-item.mark`:
|
|
403
|
+
* the radio look, a ring in both conditions, in the default system; the icon set's check in m3-like and cupertino)
|
|
404
|
+
* unless the item or its group names a glyph.
|
|
405
|
+
*
|
|
406
|
+
* @tag tanrei-menu-radio-item
|
|
407
|
+
* @csspart container - The row.
|
|
408
|
+
* @csspart mark - The mark column: the ring of the radio look, or the glyph that marks the item while it is checked. A drawing, never a control.
|
|
409
|
+
* @csspart leading-icon - The leading glyph.
|
|
410
|
+
* @csspart label - The item's text.
|
|
411
|
+
* @csspart supporting-text - The line below the label.
|
|
412
|
+
* @csspart trailing-text - The text at the end of the row that is not a shortcut.
|
|
413
|
+
* @csspart shortcut - The `<tanrei-keyboard-shortcut>` that draws the item's shortcut in the trailing column (MNU-31).
|
|
414
|
+
* @csspart trailing-icon - The trailing glyph.
|
|
415
|
+
*/
|
|
416
|
+
export declare class TanreiMenuRadioItem extends TanreiMenuItemBase {
|
|
417
|
+
static properties: PropertyDeclarations;
|
|
418
|
+
/** Identifies the choice: the item is checked while its group's value equals it. Unique within its group; required. */
|
|
419
|
+
value: string;
|
|
420
|
+
/**
|
|
421
|
+
* The name of a glyph of the system's icon set to mark this item with while it is checked, instead of the mark the
|
|
422
|
+
* design system chooses (`check` draws a plain check). Empty takes its group's `mark-icon`, then the system's choice.
|
|
423
|
+
*/
|
|
424
|
+
markIcon: string;
|
|
425
|
+
protected readonly itemRole = "menuitemradio";
|
|
426
|
+
protected get holds(): string;
|
|
427
|
+
protected get condition(): Condition;
|
|
428
|
+
protected get isChecked(): boolean;
|
|
429
|
+
protected get markKind(): 'radio';
|
|
430
|
+
protected get ownMarkIcon(): string;
|
|
431
|
+
}
|
|
432
|
+
/** How a submenu's surface is drawn now: not at all, in place beside its item (the menu is `inline`), or in the top layer. */
|
|
433
|
+
type Presentation = 'hidden' | 'inline' | 'overlay';
|
|
434
|
+
/**
|
|
435
|
+
* An item that opens another level of the menu beside it — the spec's item kind `submenu`. It holds that level's items
|
|
436
|
+
* as its children, of any kind, further submenus included; it draws its row, ending in the icon set's `chevron_right`,
|
|
437
|
+
* in the surface that holds it, and its own surface as a manual popover in the top layer, placed against the row
|
|
438
|
+
* (MNU-46, MNU-47). It is not an action: activating it opens its submenu and closes nothing. `open` is its own: the menu
|
|
439
|
+
* sets it when the person opens or closes the submenu and fires `toggle`; the product may also set it. The menu it is in
|
|
440
|
+
* does the rest — the keys, the pointer's path, placement, focus and closing.
|
|
441
|
+
*
|
|
442
|
+
* @tag tanrei-submenu
|
|
443
|
+
* @slot - The submenu's items: `<tanrei-menu-item>`, `<tanrei-menu-checkbox-item>`, `<tanrei-menu-radio-item>`, `<tanrei-submenu>` and `<tanrei-menu-group>` children.
|
|
444
|
+
* @csspart container - The row: its color, corners, every state, the ripple and the focus ring; filled from the expanded condition while the submenu is open.
|
|
445
|
+
* @csspart mark - The mark column, empty in a submenu item (reserved while the surface holds a checkbox or radio item).
|
|
446
|
+
* @csspart leading-icon - The leading glyph.
|
|
447
|
+
* @csspart label - The item's text.
|
|
448
|
+
* @csspart supporting-text - The line below the label.
|
|
449
|
+
* @csspart trailing-text - The text at the end of the row, before the indicator: the current value of what the submenu sets, or a count.
|
|
450
|
+
* @csspart submenu-indicator - The icon set's `chevron_right` at the end of the row, mirrored in a right-to-left layout.
|
|
451
|
+
* @csspart surface - The submenu's floating sheet, drawn from the menu's surface tokens.
|
|
452
|
+
* @csspart scroll - The padded box inside the surface that scrolls the items.
|
|
453
|
+
* @csspart divider - A line between a group and what is next to it, while the menu's separation is divider.
|
|
454
|
+
* @fires {CustomEvent<TanreiSubmenuToggleDetail>} toggle - The person opened or closed the submenu: `detail.open` (and the element's `open`) is the new value. It bubbles. A change the product makes, and the whole menu closing, fire none.
|
|
455
|
+
*/
|
|
456
|
+
export declare class TanreiSubmenu extends TanreiMenuRowBase {
|
|
457
|
+
static styles: import("lit").CSSResult[];
|
|
458
|
+
static shadowRootOptions: ShadowRootInit;
|
|
459
|
+
static properties: PropertyDeclarations;
|
|
460
|
+
/**
|
|
461
|
+
* Whether the item's submenu is shown. The menu sets it when the person opens or closes the submenu and fires
|
|
462
|
+
* `toggle`; the product may also set it. It shows nothing while the surface that holds the item is not shown, while
|
|
463
|
+
* the item is disabled and while it holds no item.
|
|
464
|
+
*/
|
|
465
|
+
open: boolean;
|
|
466
|
+
protected readonly itemRole = "menuitem";
|
|
467
|
+
protected get holds(): string;
|
|
468
|
+
/** The submenu's children, each in a slot of its own. */
|
|
469
|
+
private blocks;
|
|
470
|
+
/** Whether its surface is drawn now: the item is then in the expanded condition (MNU-50). */
|
|
471
|
+
private presented;
|
|
472
|
+
private readonly children$;
|
|
473
|
+
/** @internal How its surface is drawn now. */
|
|
474
|
+
presentation: Presentation;
|
|
475
|
+
/** @internal The side of the surface that holds its item that its own surface is placed on (MNU-46). */
|
|
476
|
+
side: 'left' | 'right';
|
|
477
|
+
/** @internal MNU-47: its surface is laid over the surface that holds its item. */
|
|
478
|
+
overlap: boolean;
|
|
479
|
+
/** @internal What it was last placed for: the menu places it again when this changes. */
|
|
480
|
+
lastLayout: string;
|
|
481
|
+
/** @internal When it was opened, among the submenus of the page. */
|
|
482
|
+
openedAt: number;
|
|
483
|
+
constructor();
|
|
484
|
+
connectedCallback(): void;
|
|
485
|
+
disconnectedCallback(): void;
|
|
486
|
+
private readChildren;
|
|
487
|
+
/** @internal The submenu's surface. */
|
|
488
|
+
get surfaceElement(): HTMLElement | null;
|
|
489
|
+
/** @internal The box of the surface that scrolls its items. */
|
|
490
|
+
get scrollElement(): HTMLElement | null;
|
|
491
|
+
protected get condition(): Condition;
|
|
492
|
+
protected get opensSubmenu(): boolean;
|
|
493
|
+
/** MNU-24: a menu item that opens a menu, and whether that menu is open. */
|
|
494
|
+
protected kindAria(): {
|
|
495
|
+
'aria-haspopup': string;
|
|
496
|
+
'aria-expanded': string;
|
|
497
|
+
};
|
|
498
|
+
/**
|
|
499
|
+
* @internal The menu's side (MNU-43, MNU-48 … MNU-50): draws the surface in place or in the top layer, or removes it —
|
|
500
|
+
* fading out, as the menu's own does (MNU-4). Returns whether the presentation changed.
|
|
501
|
+
*/
|
|
502
|
+
present(mode: Presentation, quick?: boolean): boolean;
|
|
503
|
+
/** @internal MNU-50: the open motion, growing from the edge that faces the item. Called once the surface is placed. */
|
|
504
|
+
enter(): void;
|
|
505
|
+
private leave;
|
|
506
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
507
|
+
protected firstUpdated(): void;
|
|
508
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
509
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* A run of related items — the spec's item kind `group` — optionally under a title (its `label`, as `<optgroup label>`:
|
|
513
|
+
* a `title` attribute would also draw the browser's tooltip), which names it. The menu separates a group from what is
|
|
514
|
+
* next to it, by a divider or a gap as its `separation` names; a group of radio items is one set of choices, and holds
|
|
515
|
+
* which one is checked in `value`.
|
|
516
|
+
*
|
|
517
|
+
* @tag tanrei-menu-group
|
|
518
|
+
* @slot - The group's items.
|
|
519
|
+
* @csspart title - The heading above the items.
|
|
520
|
+
* @fires {CustomEvent<TanreiMenuGroupChangeDetail>} change - A radio item of the group was chosen: `detail.value` (and the element's `value`) is the new value.
|
|
521
|
+
*/
|
|
522
|
+
export declare class TanreiMenuGroup extends LitElement {
|
|
523
|
+
static styles: import("lit").CSSResult[];
|
|
524
|
+
static properties: PropertyDeclarations;
|
|
525
|
+
/** The group's title, drawn above its items, which names the group; empty draws none. */
|
|
526
|
+
label: string;
|
|
527
|
+
/** The value of the group's checked radio item; `null` checks none. The group sets it when a radio item is chosen. */
|
|
528
|
+
value: string | null;
|
|
529
|
+
/**
|
|
530
|
+
* The name of a glyph of the system's icon set that marks the group's checked checkbox and radio items, for those that
|
|
531
|
+
* name none of their own (`check` draws a plain check). Empty takes the design system's choice (MNU-38).
|
|
532
|
+
*/
|
|
533
|
+
markIcon: string;
|
|
534
|
+
/** Whether this group sits in another (MNU-29). */
|
|
535
|
+
private nesting;
|
|
536
|
+
/** @internal The menu's side. */
|
|
537
|
+
setMenuContext(nesting: {
|
|
538
|
+
nested: boolean;
|
|
539
|
+
}): void;
|
|
540
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
541
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* Offers a short set of actions or choices on a temporary surface that opens from the element that asked for it, with
|
|
545
|
+
* further levels in submenus where the set needs them.
|
|
546
|
+
*
|
|
547
|
+
* Contract: specs/menu.spec.json. The surface is a manual popover in the top layer, placed against the anchor (the
|
|
548
|
+
* element whose id is `anchor`) by script: below or above it as `placement` says, flipping and shifting to stay inside
|
|
549
|
+
* the viewport, scrolling when it is taller than the room, following the anchor while it moves. The menu is an operated
|
|
550
|
+
* overlay that is not modal: it moves focus to its first enabled item when it opens and back to the anchor
|
|
551
|
+
* when it closes, never traps focus and draws no scrim. It never closes itself: it fires `close` with a reason — Escape,
|
|
552
|
+
* a press outside the surface and the anchor, Tab, focus leaving it, an item's activation — and you set `open` to false.
|
|
553
|
+
*
|
|
554
|
+
* A `<tanrei-submenu>` among the items opens another level beside its row (MNU-42 … MNU-52), by the WAI-ARIA menu
|
|
555
|
+
* pattern: the arrow key that points to the inline end, Enter, Space, a press or a tap open it and move focus in; the
|
|
556
|
+
* opposite arrow key and Escape close one level and return focus to its item; a pointer that rests on the item opens it
|
|
557
|
+
* after `comp.menu.motion.submenu-delay`, and may then cross other items on its way in. Every surface of the tree is
|
|
558
|
+
* inside the menu: a press in a submenu is not a press outside, and whatever closes the menu closes every level with one
|
|
559
|
+
* `close`.
|
|
560
|
+
*
|
|
561
|
+
* A group is told from what is next to it as `separation` names (MNU-35): a divider, or a gap of
|
|
562
|
+
* `comp.menu.group.gap`; `auto` takes `comp.menu.separation`, which follows the design system's choice.
|
|
563
|
+
*
|
|
564
|
+
* Every visual value comes from `--tanrei-comp-menu-*` tokens, the items' by condition (unselected, selected,
|
|
565
|
+
* destructive, expanded) and state. The `inline` attribute, for tests and documentation, draws the open surface in place
|
|
566
|
+
* instead: at its natural size, with its elevation, without an anchor, placement, open motion, focus on opening or light
|
|
567
|
+
* dismiss, each open submenu beside its item.
|
|
568
|
+
*
|
|
569
|
+
* A component that holds a menu in its shadow root may forward its own children into it: a `<slot>` child of the menu
|
|
570
|
+
* stands for the elements assigned to it, each forwarded child in a slot of its own (the split button, SPB-15).
|
|
571
|
+
*
|
|
572
|
+
* @tag tanrei-menu
|
|
573
|
+
* @slot - The items: `<tanrei-menu-item>`, `<tanrei-menu-checkbox-item>`, `<tanrei-menu-radio-item>`, `<tanrei-submenu>` and `<tanrei-menu-group>` children.
|
|
574
|
+
* @csspart surface - The floating sheet: its color, corners, elevation and width.
|
|
575
|
+
* @csspart scroll - The padded box inside the surface that scrolls the items.
|
|
576
|
+
* @csspart divider - A line between a group and what is next to it, while the separation is divider.
|
|
577
|
+
* @fires {CustomEvent<TanreiMenuCloseDetail>} close - The menu asks to be closed, every open submenu with it: `detail.reason` is `escape`, `outside`, `tab`, `focus-out` or `item`. Set `open` to false.
|
|
578
|
+
*/
|
|
579
|
+
export declare class TanreiMenu extends LitElement {
|
|
580
|
+
private readonly availability;
|
|
581
|
+
/** MNU-35, MNU-38: where a browser has no style queries, the choices are read when the menu renders — again when the system is switched. */
|
|
582
|
+
private readonly system;
|
|
583
|
+
static styles: import("lit").CSSResult[];
|
|
584
|
+
static shadowRootOptions: ShadowRootInit;
|
|
585
|
+
static properties: PropertyDeclarations;
|
|
586
|
+
/** Whether the menu is shown. Open it from its anchor; set it to false when the menu fires `close`. */
|
|
587
|
+
open: boolean;
|
|
588
|
+
/** Where the surface goes against the anchor: below or above it, with its start or end edge aligned to the anchor's. */
|
|
589
|
+
placement: TanreiMenuPlacement;
|
|
590
|
+
/**
|
|
591
|
+
* How a group is told from what is next to it: `divider` draws a line between them, `gap` leaves empty space and no
|
|
592
|
+
* line. `auto` takes `comp.menu.separation`, the design system's answer (divider in the default system). It applies to
|
|
593
|
+
* the menu and to every submenu of it.
|
|
594
|
+
*/
|
|
595
|
+
separation: TanreiMenuSeparation;
|
|
596
|
+
/** The id of the anchor element, in the menu's own document or shadow root (as the HTML `anchor` attribute). */
|
|
597
|
+
anchor: string;
|
|
598
|
+
/** For tests and documentation: draws the open surface in place (MNU-19), each open submenu beside its item, without the overlay's behaviour. */
|
|
599
|
+
inline: boolean;
|
|
600
|
+
/**
|
|
601
|
+
* The element the surface is placed against, when it is not the anchor: a split button places its menu against its
|
|
602
|
+
* whole row and returns focus to, and names the menu by, its trailing half (the anchor, SPB-15). Internal between
|
|
603
|
+
* Tanrei elements.
|
|
604
|
+
* @internal
|
|
605
|
+
*/
|
|
606
|
+
positionAnchor: Element | null;
|
|
607
|
+
/**
|
|
608
|
+
* Presents the menu without moving focus into it: no move to the first item when it opens (in place of MNU-1) and none
|
|
609
|
+
* to an item under the pointer, which still draws it hovered (in place of MNU-8); a press on an item activates it
|
|
610
|
+
* without focusing it. A split button's menu that is open from hover (SPB-22). Internal between Tanrei elements.
|
|
611
|
+
* @internal
|
|
612
|
+
*/
|
|
613
|
+
focusless: boolean;
|
|
614
|
+
/**
|
|
615
|
+
* The menubar that shows this menu, and what it tells it (MBR-9, MBR-13, MBR-14, MBR-22, MBR-29). Internal between
|
|
616
|
+
* Tanrei elements.
|
|
617
|
+
* @internal
|
|
618
|
+
*/
|
|
619
|
+
bar: TanreiMenuBarChannel | null;
|
|
620
|
+
/** The menu's children, each in a slot of its own. */
|
|
621
|
+
private blocks;
|
|
622
|
+
/** MNU-7: the arrow keys and the typeahead of each surface; each remembers what was typed in it. */
|
|
623
|
+
private readonly keys;
|
|
624
|
+
private closeRequested;
|
|
625
|
+
private shown;
|
|
626
|
+
/** The menu has been presented (in the top layer or in place) since it was last closed: closing it closes its submenus (MNU-49). */
|
|
627
|
+
private live;
|
|
628
|
+
private lastLayout;
|
|
629
|
+
/** The rows of each surface, read when first asked after a change. */
|
|
630
|
+
private levels;
|
|
631
|
+
private readonly children$;
|
|
632
|
+
private unregister;
|
|
633
|
+
/** MNU-44: where the pointer is now — the item under it. */
|
|
634
|
+
private pointerItem;
|
|
635
|
+
/** MNU-44: the submenu item a resting pointer is about to open. */
|
|
636
|
+
private resting;
|
|
637
|
+
/** MNU-45: the pointer's last position on the item of an open submenu — the corner of the triangle it may move in. */
|
|
638
|
+
private apex;
|
|
639
|
+
/** MNU-45: the items the pointer crossed on its way, which are not drawn hovered, and the pause that ends the way. */
|
|
640
|
+
private readonly crossed;
|
|
641
|
+
private pause;
|
|
642
|
+
/** MNU-47: the click of a press that closed a covering submenu activates nothing. */
|
|
643
|
+
private swallowClick;
|
|
644
|
+
/** The menu itself is placing focus (MNU-1, MNU-43): that is not the person moving it to another item (MNU-48). */
|
|
645
|
+
private placing;
|
|
646
|
+
constructor();
|
|
647
|
+
connectedCallback(): void;
|
|
648
|
+
disconnectedCallback(): void;
|
|
649
|
+
private readChildren;
|
|
650
|
+
private get surface();
|
|
651
|
+
private get scrollBox();
|
|
652
|
+
/** The menu's content: its children, a forwarding `<slot>` child standing for what is assigned to it. */
|
|
653
|
+
private get content();
|
|
654
|
+
/** The elements of the content that match `selector`, in document order, that belong to this menu (not a nested one). */
|
|
655
|
+
private find;
|
|
656
|
+
/** Whether `node` is this menu's, in the flat tree: slotted or forwarded into it or into a submenu of it, or in a shadow root of theirs. */
|
|
657
|
+
private owns;
|
|
658
|
+
/** The surface `node` is in: the submenu that holds it, through that submenu's groups, or the menu itself (MNU-52). */
|
|
659
|
+
private levelOf;
|
|
660
|
+
/** Whether `node` is inside the submenu `submenu`: an item of its surface or of a surface opened from it. */
|
|
661
|
+
private within;
|
|
662
|
+
/** Every row of the tree by its surface, in focus order (MNU-7: never across levels). */
|
|
663
|
+
private tree;
|
|
664
|
+
/** The rows of one surface. */
|
|
665
|
+
private rowsOf;
|
|
666
|
+
/** The submenus of `level` whose surface is drawn now — at most one (MNU-48). */
|
|
667
|
+
private openIn;
|
|
668
|
+
/** The chain of open submenus, from the menu's own surface inward. */
|
|
669
|
+
private openChain;
|
|
670
|
+
private get groups();
|
|
671
|
+
/** The element whose id is `anchor`. */
|
|
672
|
+
private get anchorElement();
|
|
673
|
+
/** Where the anchor's ARIA states go: the anchor, or the button a custom element anchor draws in its open shadow root. */
|
|
674
|
+
private get anchorTarget();
|
|
675
|
+
/** MNU-14: a placement the menu does not define is drawn as `bottom-start`. */
|
|
676
|
+
private get effectivePlacement();
|
|
677
|
+
/**
|
|
678
|
+
* The outermost group of the item's own surface that holds `item` (MNU-29: a group in a group is drawn as its outer
|
|
679
|
+
* group; MNU-52: a group's value reaches only the radio items of its own surface).
|
|
680
|
+
*/
|
|
681
|
+
private groupOf;
|
|
682
|
+
/**
|
|
683
|
+
* Where an event came from: the item it is on, and the surface it is in — a submenu's surface around its items is
|
|
684
|
+
* that submenu's level, its row an item of the level that holds it.
|
|
685
|
+
*/
|
|
686
|
+
private locate;
|
|
687
|
+
/** The item an event came from. */
|
|
688
|
+
private itemOf;
|
|
689
|
+
/**
|
|
690
|
+
* Tells every item and group what it is now (MNU-18, MNU-19, MNU-24, MNU-28, MNU-29, MNU-52), each surface by itself,
|
|
691
|
+
* reports what it should, and draws the submenus that are open (MNU-43, MNU-48).
|
|
692
|
+
*/
|
|
693
|
+
private sync;
|
|
694
|
+
/** Sets a submenu item's `open`; the person's own opening or closing fires its `toggle`, the product's and the menu's closing none. */
|
|
695
|
+
private setOpen;
|
|
696
|
+
/**
|
|
697
|
+
* Draws what the items' `open` say (MNU-43, MNU-48, MNU-52): in each surface that is shown, the submenu that is open —
|
|
698
|
+
* the one opened last, where the product opened two — unless it is disabled or holds no item; nothing for a submenu
|
|
699
|
+
* whose own surface is not shown. A submenu that is drawn is placed and grows in; one that no longer is fades out, and
|
|
700
|
+
* focus that was inside it moves to its item.
|
|
701
|
+
*/
|
|
702
|
+
private presentSubmenus;
|
|
703
|
+
private surfaceOf;
|
|
704
|
+
private scrollOf;
|
|
705
|
+
/**
|
|
706
|
+
* MNU-43: opens a submenu item's submenu — any other of its surface closes — and, for a key, a press or a tap, moves
|
|
707
|
+
* focus to its first enabled item (its first item where none is enabled), with the ring only for a key. One that is
|
|
708
|
+
* already open only takes focus. A disabled submenu item and one without items open nothing (MNU-51, MNU-52).
|
|
709
|
+
*/
|
|
710
|
+
private openSubmenu;
|
|
711
|
+
/** Moves focus as the menu's own doing (MNU-1, MNU-43), which closes no submenu of the surface focus lands in. */
|
|
712
|
+
private placeFocus;
|
|
713
|
+
/**
|
|
714
|
+
* MNU-48: closes a submenu and every submenu opened from it, and nothing else; focus returns to its item — always for
|
|
715
|
+
* a key (with the ring) or a press (without), and otherwise when it was inside.
|
|
716
|
+
*/
|
|
717
|
+
private closeSubmenu;
|
|
718
|
+
/** MNU-46, MNU-47: places a submenu's surface against its item, in viewport coordinates. */
|
|
719
|
+
private placeSubmenu;
|
|
720
|
+
/** MNU-44: `comp.menu.motion.submenu-delay`, read through a real property of the menu's (a duration token is an expression). */
|
|
721
|
+
private get submenuDelay();
|
|
722
|
+
/** MNU-45: the pointer is no longer on its way to a submenu — the items it crossed answer hover again. */
|
|
723
|
+
private endAim;
|
|
724
|
+
private stopResting;
|
|
725
|
+
private forgetPointer;
|
|
726
|
+
/**
|
|
727
|
+
* MNU-8, MNU-44, MNU-48: the pointer is on `item` — focus follows it without the ring, another submenu of its surface
|
|
728
|
+
* closes, and a submenu item it rests on for `submenu-delay` opens, focus staying on the item.
|
|
729
|
+
*/
|
|
730
|
+
private hover;
|
|
731
|
+
/** MNU-5: asks the product to close the menu, once, with the reason. Nothing is asked of a closed menu. */
|
|
732
|
+
private requestClose;
|
|
733
|
+
/**
|
|
734
|
+
* MNU-5, MNU-7, MNU-43, MNU-48, MNU-51: Escape closes the innermost level — the submenu that holds focus, else the
|
|
735
|
+
* innermost open one, else the menu — and Tab the whole menu; the arrow keys along the line open a submenu item's
|
|
736
|
+
* submenu and close the submenu that holds focus, and do nothing else; the vertical arrows, Home, End and typeahead
|
|
737
|
+
* move focus within the surface that holds it, wrapping.
|
|
738
|
+
*/
|
|
739
|
+
private readonly onKeyDown;
|
|
740
|
+
/**
|
|
741
|
+
* MNU-47: while a submenu covers part of the surface it opened from, a press on what is left of that surface closes
|
|
742
|
+
* the submenu — the way back for a person with no keyboard — and activates nothing.
|
|
743
|
+
*/
|
|
744
|
+
private readonly onPointerDown;
|
|
745
|
+
private readonly onClickCapture;
|
|
746
|
+
/**
|
|
747
|
+
* MNU-6, MNU-43: an item's activation — its click — does what its kind does, then asks to close (a Space keeps a
|
|
748
|
+
* checkbox or radio item's menu open); a submenu item's opens its submenu and closes nothing.
|
|
749
|
+
*/
|
|
750
|
+
private readonly onClick;
|
|
751
|
+
/**
|
|
752
|
+
* MNU-8, MNU-44, MNU-45: a pointer moving onto an item moves focus there, without the ring, so that the arrow keys
|
|
753
|
+
* continue from it — except while it is on its way to an open submenu: inside the triangle between its last position
|
|
754
|
+
* on the submenu's item and the two corners of the submenu's surface that face the item, the items it crosses take
|
|
755
|
+
* neither hover nor focus, until it leaves the triangle or pauses in it for `submenu-delay`.
|
|
756
|
+
*/
|
|
757
|
+
private readonly onPointerMove;
|
|
758
|
+
/** MNU-45: whether the pointer is inside the triangle to `submenu`'s surface, which follows the side it is placed on. */
|
|
759
|
+
private onTheWay;
|
|
760
|
+
/** MNU-44: a pointer that leaves the menu opens nothing; where it was on its way to a submenu its pause still ends the way. */
|
|
761
|
+
private readonly onPointerLeave;
|
|
762
|
+
/** A focusless menu (SPB-22): a press on an item leaves focus where it was; the item's click still activates it. */
|
|
763
|
+
private readonly onMouseDown;
|
|
764
|
+
/**
|
|
765
|
+
* MNU-1's move, when a focusless menu becomes an ordinary one while open (SPB-24): focus to the first enabled item.
|
|
766
|
+
* @internal
|
|
767
|
+
*/
|
|
768
|
+
focusFirstItem(): void;
|
|
769
|
+
/**
|
|
770
|
+
* MNU-48: focus moving to another item of a surface (MNU-7, and whatever else moves it there) closes the submenu
|
|
771
|
+
* that is open in it — not the focus the menu places itself when it opens or opens a submenu.
|
|
772
|
+
*/
|
|
773
|
+
private readonly onFocusIn;
|
|
774
|
+
/** MNU-5, MNU-49: focus moving out of the menu and all of its submenus — anywhere but the anchor, whose own press decides — asks to close. */
|
|
775
|
+
private readonly onFocusOut;
|
|
776
|
+
/** MNU-5, MNU-49: a press outside every surface and the anchor asks to close; the press also reaches what is under it. */
|
|
777
|
+
private readonly onOutsidePress;
|
|
778
|
+
/** MNU-2: places the surface against the anchor, in viewport coordinates. */
|
|
779
|
+
private place;
|
|
780
|
+
/**
|
|
781
|
+
* MNU-2, MNU-46: follows the anchor while it moves (scrolling, layout, the viewport) for as long as it is open, and
|
|
782
|
+
* each open submenu its item; a submenu whose item is scrolled out of the visible part of its surface closes. Asked
|
|
783
|
+
* by FollowController when something can have moved, frame by frame only while something does.
|
|
784
|
+
*/
|
|
785
|
+
private readonly follow;
|
|
786
|
+
/** What is followed: the anchor, and the item of each submenu open as an overlay; sized: every surface and what scrolls in it. */
|
|
787
|
+
private readonly following;
|
|
788
|
+
private overlaid;
|
|
789
|
+
private stopFollowing;
|
|
790
|
+
/** MNU-24: the anchor says it opens a menu, whether it is open, and which. */
|
|
791
|
+
private syncAnchor;
|
|
792
|
+
/** MNU-1, MNU-4: into the top layer, placed, growing in; focus to the first enabled item. */
|
|
793
|
+
private show;
|
|
794
|
+
/** MNU-1, MNU-4, MNU-49: focus back to the anchor if it was inside; every submenu closed with it; fading out, then out of the top layer. */
|
|
795
|
+
private hide;
|
|
796
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
797
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
798
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
799
|
+
}
|
|
800
|
+
declare global {
|
|
801
|
+
interface HTMLElementTagNameMap {
|
|
802
|
+
'tanrei-menu': TanreiMenu;
|
|
803
|
+
'tanrei-menu-item': TanreiMenuItem;
|
|
804
|
+
'tanrei-menu-checkbox-item': TanreiMenuCheckboxItem;
|
|
805
|
+
'tanrei-menu-radio-item': TanreiMenuRadioItem;
|
|
806
|
+
'tanrei-submenu': TanreiSubmenu;
|
|
807
|
+
'tanrei-menu-group': TanreiMenuGroup;
|
|
808
|
+
}
|
|
809
|
+
interface HTMLElementEventMap {
|
|
810
|
+
'tanrei-menu-item-update': Event;
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
export {};
|