@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,150 @@
|
|
|
1
|
+
import { type PropertyDeclarations, type PropertyValues } from 'lit';
|
|
2
|
+
import { ComposedControl, type ValueMember } from '../../primitives/composed.js';
|
|
3
|
+
import type { FormEntry } from '../../primitives/form-says.js';
|
|
4
|
+
import { type TanreiFieldRequiredMark, type TanreiFieldRequirement } from '../field/field.js';
|
|
5
|
+
import { type TanreiSliderChangeDetail, type TanreiSliderSize, type TanreiSliderValueIndicator } from '../slider/slider.js';
|
|
6
|
+
export type { TanreiFieldRequiredMark, TanreiFieldRequirement, TanreiSliderChangeDetail, TanreiSliderSize, TanreiSliderValueIndicator };
|
|
7
|
+
/**
|
|
8
|
+
* Lets people choose a value, or a range of values, on a scale as one complete field. Built from a Field
|
|
9
|
+
* (`<tanrei-field>`) and the Slider (`<tanrei-slider>`) it frames: the track under the Field's label, with the value
|
|
10
|
+
* in words at the end of the label row, the Field's help and its error, tied together for assistive technology and
|
|
11
|
+
* taking part in a form as one control.
|
|
12
|
+
*
|
|
13
|
+
* Contract: specs/slider-field.spec.json. `<tanrei-slider-field name="text-size" label="Text size"
|
|
14
|
+
* supporting-text="Applies to every page." min="50" max="200" step="10" value="120"></tanrei-slider-field>`.
|
|
15
|
+
*
|
|
16
|
+
* Composed (`src/primitives/composed.ts`): its shadow root holds the two members' own elements and nothing
|
|
17
|
+
* else, so it draws nothing of its own and has no token — every `--tanrei-comp-field-*` and `--tanrei-comp-slider-*`
|
|
18
|
+
* value reaches the members by inheritance, and one slider field is set apart by setting such a property on this
|
|
19
|
+
* element. Each property is its member's, set on that member unchanged: `label`, `label-hidden`, `supporting-text`,
|
|
20
|
+
* `error-text`, `error`, `disabled`, `requirement`, `required-mark`, `required-text` and `optional-text` are the
|
|
21
|
+
* Field's, every other one the Slider's — `end-label` is the Slider's `label`, the name of a range's end handle,
|
|
22
|
+
* because `label` is the visible name here. It has no orientation: the track runs along the line. One level down, the
|
|
23
|
+
* same by hand: `<tanrei-field label="Text size" value-text="120"><tanrei-slider name="text-size" min="50" max="200"
|
|
24
|
+
* step="10" value="120"></tanrei-slider></tanrei-field>`, with the product writing the Field's `value-text` at each
|
|
25
|
+
* `input` (`field.valueText = slider.shownValueText`).
|
|
26
|
+
*
|
|
27
|
+
* That is the one thing it does that the pair by hand does not: unless `value-hidden` is set it gives its Field, as
|
|
28
|
+
* the value text at the end of the label row, the words its Slider gives each handle — `value-text` (and
|
|
29
|
+
* `start-value-text`), or what `formatValue` writes, or the number in the page's locale — at every change, a range's
|
|
30
|
+
* two in reading order with an en dash between. `formatValue` is a property, never an attribute: a function the
|
|
31
|
+
* product gives once, from a value to its words (`field.formatValue = (value) => percent.format(value / 100)`). It
|
|
32
|
+
* writes no number, unit or word itself.
|
|
33
|
+
*
|
|
34
|
+
* It is a block as wide as its place, and its track fills it: give it a narrower place for a shorter track.
|
|
35
|
+
*
|
|
36
|
+
* `value` and `startValue` are at every moment the Slider's, and the two events are that Slider's own, with this
|
|
37
|
+
* element as their target: `event.target.value` is the new value in every listener. It dispatches none itself.
|
|
38
|
+
*
|
|
39
|
+
* Form-associated: it submits the value under `name` — a range the start value and then the value, under the one name;
|
|
40
|
+
* nothing while disabled —, resets to its `value` and `start-value` attributes, is restored on navigation and follows a
|
|
41
|
+
* disabled `<fieldset>`.
|
|
42
|
+
*
|
|
43
|
+
* The element is not focusable itself and has no role: `focus()` goes to the handle — a range's start handle — and its
|
|
44
|
+
* name is `label` (with `label-hidden` where it is not drawn), never `aria-label`. A range's two handles are named by
|
|
45
|
+
* `start-label` and `end-label`. A press on the label row focuses the handle and changes no value; a press on the
|
|
46
|
+
* help or the error text does nothing.
|
|
47
|
+
*
|
|
48
|
+
* @tag tanrei-slider-field
|
|
49
|
+
* @slot label-icon - => tanrei-field
|
|
50
|
+
* @csspart field - The frame: the `<tanrei-field>` it is built from.
|
|
51
|
+
* @csspart slider - The control: the `<tanrei-slider>` it is built from.
|
|
52
|
+
* @exportparts tanrei-field -counter
|
|
53
|
+
* @exportparts tanrei-slider
|
|
54
|
+
* @attr {string} form - The id of the form the slider field belongs to, where it stands outside it: the platform's own attribute, which then wins over a form around it. The `form` property is read-only and returns the form element.
|
|
55
|
+
* @fires input - => tanrei-slider
|
|
56
|
+
* @fires change - => tanrei-slider
|
|
57
|
+
*/
|
|
58
|
+
export declare class TanreiSliderField extends ComposedControl<number> {
|
|
59
|
+
/** SLF-6: the one control the form meets. Its members stand in its shadow root, outside every form. */
|
|
60
|
+
static formAssociated: boolean;
|
|
61
|
+
static styles: import("lit").CSSResult[];
|
|
62
|
+
/**
|
|
63
|
+
* Its parts, once: the two members and what each exports.
|
|
64
|
+
*
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
static readonly parts: readonly string[];
|
|
68
|
+
static properties: PropertyDeclarations;
|
|
69
|
+
/** @from tanrei-field.label */
|
|
70
|
+
label: string;
|
|
71
|
+
/** @from tanrei-field.labelHidden */
|
|
72
|
+
labelHidden: boolean;
|
|
73
|
+
/** @from tanrei-field.supportingText */
|
|
74
|
+
supportingText: string;
|
|
75
|
+
/** @from tanrei-field.errorText */
|
|
76
|
+
errorText: string;
|
|
77
|
+
/** @from tanrei-field.error */
|
|
78
|
+
error: boolean;
|
|
79
|
+
/** @from tanrei-field.disabled */
|
|
80
|
+
disabled: boolean;
|
|
81
|
+
/** @from tanrei-field.requirement */
|
|
82
|
+
requirement: TanreiFieldRequirement;
|
|
83
|
+
/** @from tanrei-field.requiredMark */
|
|
84
|
+
requiredMark: TanreiFieldRequiredMark;
|
|
85
|
+
/** @from tanrei-field.requiredText */
|
|
86
|
+
requiredText: string;
|
|
87
|
+
/** @from tanrei-field.optionalText */
|
|
88
|
+
optionalText: string;
|
|
89
|
+
/** @from tanrei-slider.value */
|
|
90
|
+
get value(): number;
|
|
91
|
+
set value(value: number);
|
|
92
|
+
/** @from tanrei-slider.startValue */
|
|
93
|
+
get startValue(): number;
|
|
94
|
+
set startValue(value: number);
|
|
95
|
+
/** @from tanrei-slider.range */
|
|
96
|
+
range: boolean;
|
|
97
|
+
/** @from tanrei-slider.min */
|
|
98
|
+
min: number;
|
|
99
|
+
/** @from tanrei-slider.max */
|
|
100
|
+
max: number;
|
|
101
|
+
/** @from tanrei-slider.step */
|
|
102
|
+
step: number;
|
|
103
|
+
/** @from tanrei-slider.origin */
|
|
104
|
+
origin: number | null;
|
|
105
|
+
/** @from tanrei-slider.stops */
|
|
106
|
+
stops: boolean;
|
|
107
|
+
/** @from tanrei-slider.size */
|
|
108
|
+
size: TanreiSliderSize;
|
|
109
|
+
/** @from tanrei-slider.valueIndicator */
|
|
110
|
+
valueIndicator: TanreiSliderValueIndicator;
|
|
111
|
+
/** @from tanrei-slider.valueText */
|
|
112
|
+
valueText: string;
|
|
113
|
+
/** @from tanrei-slider.startValueText */
|
|
114
|
+
startValueText: string;
|
|
115
|
+
/** @from tanrei-slider.startLabel */
|
|
116
|
+
startLabel: string;
|
|
117
|
+
/** @from tanrei-slider.label */
|
|
118
|
+
endLabel: string;
|
|
119
|
+
/** @from tanrei-slider.formatValue */
|
|
120
|
+
formatValue: ((value: number) => string) | null;
|
|
121
|
+
/** Does not draw the value at the end of the label row (`value-hidden`). For a slider set by feel, whose number means nothing to the person (a volume, a brightness). The handle still says its value to assistive technology, and `value-indicator` still shows it. */
|
|
122
|
+
valueHidden: boolean;
|
|
123
|
+
protected readonly hostNameSentence = "SLF-5";
|
|
124
|
+
/** W5, for the second value of a range: the start value last set on the element, while the Slider has not taken it. */
|
|
125
|
+
private startGiven;
|
|
126
|
+
private startPending;
|
|
127
|
+
private get slider();
|
|
128
|
+
protected get valueMember(): ValueMember<number> | null;
|
|
129
|
+
/** W6, item 4: the value a form's reset returns to — the `value` attribute, as a number; 0 without one, as the Slider's. */
|
|
130
|
+
protected firstValue(): number;
|
|
131
|
+
/** W6, item 4: a range resets its start value too, to the `start-value` attribute. */
|
|
132
|
+
formResetCallback(): void;
|
|
133
|
+
/** W6, item 5: the Slider restores both values; both are then the Slider's. */
|
|
134
|
+
formStateRestoreCallback(state: FormEntry, mode: 'restore' | 'autocomplete'): void;
|
|
135
|
+
/**
|
|
136
|
+
* SLF-3, SLF-4 (`fills`: `field.valueText`): the Field is given the words the Slider gives each handle, as the Slider
|
|
137
|
+
* writes them — after each of the Slider's updates, and after each of this element's own. A range's two are each a
|
|
138
|
+
* run of its own direction (`isolated()`), in reading order, with an en dash between. Nothing while `valueHidden` is
|
|
139
|
+
* set. No number, unit or word is written here.
|
|
140
|
+
*/
|
|
141
|
+
private fill;
|
|
142
|
+
protected memberUpdated(): void;
|
|
143
|
+
protected updated(changed: PropertyValues): void;
|
|
144
|
+
protected render(): import("lit").TemplateResult<1>;
|
|
145
|
+
}
|
|
146
|
+
declare global {
|
|
147
|
+
interface HTMLElementTagNameMap {
|
|
148
|
+
'tanrei-slider-field': TanreiSliderField;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import { css, html } from 'lit';
|
|
2
|
+
import { ComposedControl, composedHost, exported, forward } from '../../primitives/composed.js';
|
|
3
|
+
import { hiddenHost } from '../../primitives/hidden.js';
|
|
4
|
+
import { report } from '../../primitives/report.js';
|
|
5
|
+
import { TanreiField } from '../field/field.js';
|
|
6
|
+
import { TanreiSlider } from '../slider/slider.js';
|
|
7
|
+
/** SLF-2: the props that are the Field's, given to it unchanged. `disabled` is the Field's too, joined with a disabled fieldset's (W6). */
|
|
8
|
+
const FIELD = ['label', 'labelHidden', 'supportingText', 'errorText', 'error', 'requirement', 'requiredMark', 'requiredText', 'optionalText'];
|
|
9
|
+
/**
|
|
10
|
+
* SLF-2: the props that are the Slider's, and the product's function for a value's words (SLD-18). `endLabel` is the
|
|
11
|
+
* Slider's `label` and is given in the template. The Slider's own `disabled` and `orientation` are never set.
|
|
12
|
+
*/
|
|
13
|
+
const SLIDER = ['value', 'startValue', 'range', 'min', 'max', 'step', 'origin', 'stops', 'size', 'valueIndicator', 'valueText', 'startValueText', 'startLabel', 'formatValue'];
|
|
14
|
+
/**
|
|
15
|
+
* W4: each member's documented parts, from the member's own list. No name is shared by the two. The Field's `counter`
|
|
16
|
+
* is left out: a slider field gives its Field no count, so the part is never drawn in it.
|
|
17
|
+
*/
|
|
18
|
+
const FIELD_PARTS = exported(TanreiField, {}, ['counter']);
|
|
19
|
+
const SLIDER_PARTS = exported(TanreiSlider);
|
|
20
|
+
/**
|
|
21
|
+
* SLF-3: each of a range's two value texts is a run of its own direction — a first-strong isolate (U+2068 … U+2069),
|
|
22
|
+
* which is what `<bdi>` is in a text: the Field's value text is one string. A run that is a plain number is one
|
|
23
|
+
* left-to-right run in a paragraph of either direction already — digits, with a separator or a sign between two of
|
|
24
|
+
* them and a currency or percent sign against them, which the bidirectional algorithm resolves to the digits' own
|
|
25
|
+
* class (UAX #9, W4 and W5) — and is written as it is: isolating it would change nothing of its order, and the text
|
|
26
|
+
* is then, character for character, what a product writes by hand ("$100 – $300"). An en dash with a space on each
|
|
27
|
+
* side stands between the two.
|
|
28
|
+
*/
|
|
29
|
+
const PLAIN_NUMBER = /^[\p{Sc}#%]*[0-9]+(?:[.,:/+\-\u00a0\u202f][0-9]+)*[\p{Sc}#%]*$/u;
|
|
30
|
+
const isolated = (text) => (PLAIN_NUMBER.test(text) ? text : `\u2068${text}\u2069`);
|
|
31
|
+
const BETWEEN = ' – ';
|
|
32
|
+
/**
|
|
33
|
+
* Lets people choose a value, or a range of values, on a scale as one complete field. Built from a Field
|
|
34
|
+
* (`<tanrei-field>`) and the Slider (`<tanrei-slider>`) it frames: the track under the Field's label, with the value
|
|
35
|
+
* in words at the end of the label row, the Field's help and its error, tied together for assistive technology and
|
|
36
|
+
* taking part in a form as one control.
|
|
37
|
+
*
|
|
38
|
+
* Contract: specs/slider-field.spec.json. `<tanrei-slider-field name="text-size" label="Text size"
|
|
39
|
+
* supporting-text="Applies to every page." min="50" max="200" step="10" value="120"></tanrei-slider-field>`.
|
|
40
|
+
*
|
|
41
|
+
* Composed (`src/primitives/composed.ts`): its shadow root holds the two members' own elements and nothing
|
|
42
|
+
* else, so it draws nothing of its own and has no token — every `--tanrei-comp-field-*` and `--tanrei-comp-slider-*`
|
|
43
|
+
* value reaches the members by inheritance, and one slider field is set apart by setting such a property on this
|
|
44
|
+
* element. Each property is its member's, set on that member unchanged: `label`, `label-hidden`, `supporting-text`,
|
|
45
|
+
* `error-text`, `error`, `disabled`, `requirement`, `required-mark`, `required-text` and `optional-text` are the
|
|
46
|
+
* Field's, every other one the Slider's — `end-label` is the Slider's `label`, the name of a range's end handle,
|
|
47
|
+
* because `label` is the visible name here. It has no orientation: the track runs along the line. One level down, the
|
|
48
|
+
* same by hand: `<tanrei-field label="Text size" value-text="120"><tanrei-slider name="text-size" min="50" max="200"
|
|
49
|
+
* step="10" value="120"></tanrei-slider></tanrei-field>`, with the product writing the Field's `value-text` at each
|
|
50
|
+
* `input` (`field.valueText = slider.shownValueText`).
|
|
51
|
+
*
|
|
52
|
+
* That is the one thing it does that the pair by hand does not: unless `value-hidden` is set it gives its Field, as
|
|
53
|
+
* the value text at the end of the label row, the words its Slider gives each handle — `value-text` (and
|
|
54
|
+
* `start-value-text`), or what `formatValue` writes, or the number in the page's locale — at every change, a range's
|
|
55
|
+
* two in reading order with an en dash between. `formatValue` is a property, never an attribute: a function the
|
|
56
|
+
* product gives once, from a value to its words (`field.formatValue = (value) => percent.format(value / 100)`). It
|
|
57
|
+
* writes no number, unit or word itself.
|
|
58
|
+
*
|
|
59
|
+
* It is a block as wide as its place, and its track fills it: give it a narrower place for a shorter track.
|
|
60
|
+
*
|
|
61
|
+
* `value` and `startValue` are at every moment the Slider's, and the two events are that Slider's own, with this
|
|
62
|
+
* element as their target: `event.target.value` is the new value in every listener. It dispatches none itself.
|
|
63
|
+
*
|
|
64
|
+
* Form-associated: it submits the value under `name` — a range the start value and then the value, under the one name;
|
|
65
|
+
* nothing while disabled —, resets to its `value` and `start-value` attributes, is restored on navigation and follows a
|
|
66
|
+
* disabled `<fieldset>`.
|
|
67
|
+
*
|
|
68
|
+
* The element is not focusable itself and has no role: `focus()` goes to the handle — a range's start handle — and its
|
|
69
|
+
* name is `label` (with `label-hidden` where it is not drawn), never `aria-label`. A range's two handles are named by
|
|
70
|
+
* `start-label` and `end-label`. A press on the label row focuses the handle and changes no value; a press on the
|
|
71
|
+
* help or the error text does nothing.
|
|
72
|
+
*
|
|
73
|
+
* @tag tanrei-slider-field
|
|
74
|
+
* @slot label-icon - => tanrei-field
|
|
75
|
+
* @csspart field - The frame: the `<tanrei-field>` it is built from.
|
|
76
|
+
* @csspart slider - The control: the `<tanrei-slider>` it is built from.
|
|
77
|
+
* @exportparts tanrei-field -counter
|
|
78
|
+
* @exportparts tanrei-slider
|
|
79
|
+
* @attr {string} form - The id of the form the slider field belongs to, where it stands outside it: the platform's own attribute, which then wins over a form around it. The `form` property is read-only and returns the form element.
|
|
80
|
+
* @fires input - => tanrei-slider
|
|
81
|
+
* @fires change - => tanrei-slider
|
|
82
|
+
*/
|
|
83
|
+
export class TanreiSliderField extends ComposedControl {
|
|
84
|
+
constructor() {
|
|
85
|
+
super(...arguments);
|
|
86
|
+
/** @from tanrei-field.label */
|
|
87
|
+
this.label = '';
|
|
88
|
+
/** @from tanrei-field.labelHidden */
|
|
89
|
+
this.labelHidden = false;
|
|
90
|
+
/** @from tanrei-field.supportingText */
|
|
91
|
+
this.supportingText = '';
|
|
92
|
+
/** @from tanrei-field.errorText */
|
|
93
|
+
this.errorText = '';
|
|
94
|
+
/** @from tanrei-field.error */
|
|
95
|
+
this.error = false;
|
|
96
|
+
/** @from tanrei-field.disabled */
|
|
97
|
+
this.disabled = false;
|
|
98
|
+
/** @from tanrei-field.requirement */
|
|
99
|
+
this.requirement = 'none';
|
|
100
|
+
/** @from tanrei-field.requiredMark */
|
|
101
|
+
this.requiredMark = 'auto';
|
|
102
|
+
/** @from tanrei-field.requiredText */
|
|
103
|
+
this.requiredText = '';
|
|
104
|
+
/** @from tanrei-field.optionalText */
|
|
105
|
+
this.optionalText = '';
|
|
106
|
+
/** @from tanrei-slider.range */
|
|
107
|
+
this.range = false;
|
|
108
|
+
/** @from tanrei-slider.min */
|
|
109
|
+
this.min = 0;
|
|
110
|
+
/** @from tanrei-slider.max */
|
|
111
|
+
this.max = 100;
|
|
112
|
+
/** @from tanrei-slider.step */
|
|
113
|
+
this.step = 0;
|
|
114
|
+
/** @from tanrei-slider.origin */
|
|
115
|
+
this.origin = null;
|
|
116
|
+
/** @from tanrei-slider.stops */
|
|
117
|
+
this.stops = false;
|
|
118
|
+
/** @from tanrei-slider.size */
|
|
119
|
+
this.size = 'small';
|
|
120
|
+
/** @from tanrei-slider.valueIndicator */
|
|
121
|
+
this.valueIndicator = 'none';
|
|
122
|
+
/** @from tanrei-slider.valueText */
|
|
123
|
+
this.valueText = '';
|
|
124
|
+
/** @from tanrei-slider.startValueText */
|
|
125
|
+
this.startValueText = '';
|
|
126
|
+
/** @from tanrei-slider.startLabel */
|
|
127
|
+
this.startLabel = '';
|
|
128
|
+
/** @from tanrei-slider.label */
|
|
129
|
+
this.endLabel = '';
|
|
130
|
+
/** @from tanrei-slider.formatValue */
|
|
131
|
+
this.formatValue = null;
|
|
132
|
+
/** Does not draw the value at the end of the label row (`value-hidden`). For a slider set by feel, whose number means nothing to the person (a volume, a brightness). The handle still says its value to assistive technology, and `value-indicator` still shows it. */
|
|
133
|
+
this.valueHidden = false;
|
|
134
|
+
this.hostNameSentence = 'SLF-5';
|
|
135
|
+
this.startPending = false;
|
|
136
|
+
}
|
|
137
|
+
/** SLF-6: the one control the form meets. Its members stand in its shadow root, outside every form. */
|
|
138
|
+
static { this.formAssociated = true; }
|
|
139
|
+
// SLF-13: no width of its own — as an item of a row too (a product's own flex row), where a block's least width
|
|
140
|
+
// would be its content's: the row decides, and the track fills what it is given.
|
|
141
|
+
static { this.styles = [
|
|
142
|
+
composedHost,
|
|
143
|
+
hiddenHost,
|
|
144
|
+
css `
|
|
145
|
+
:host {
|
|
146
|
+
min-inline-size: 0;
|
|
147
|
+
}
|
|
148
|
+
`,
|
|
149
|
+
]; }
|
|
150
|
+
/**
|
|
151
|
+
* Its parts, once: the two members and what each exports.
|
|
152
|
+
*
|
|
153
|
+
* @internal
|
|
154
|
+
*/
|
|
155
|
+
static { this.parts = ['field', 'slider', ...FIELD_PARTS.names, ...SLIDER_PARTS.names]; }
|
|
156
|
+
static { this.properties = {
|
|
157
|
+
label: { type: String },
|
|
158
|
+
labelHidden: { type: Boolean, attribute: 'label-hidden', reflect: true },
|
|
159
|
+
supportingText: { type: String, attribute: 'supporting-text' },
|
|
160
|
+
errorText: { type: String, attribute: 'error-text' },
|
|
161
|
+
error: { type: Boolean, reflect: true },
|
|
162
|
+
disabled: { type: Boolean, reflect: true },
|
|
163
|
+
requirement: { type: String, reflect: true },
|
|
164
|
+
requiredMark: { type: String, attribute: 'required-mark', reflect: true },
|
|
165
|
+
requiredText: { type: String, attribute: 'required-text' },
|
|
166
|
+
optionalText: { type: String, attribute: 'optional-text' },
|
|
167
|
+
value: { type: Number },
|
|
168
|
+
startValue: { type: Number, attribute: 'start-value' },
|
|
169
|
+
range: { type: Boolean, reflect: true },
|
|
170
|
+
min: { type: Number },
|
|
171
|
+
max: { type: Number },
|
|
172
|
+
step: { type: Number },
|
|
173
|
+
origin: { type: Number },
|
|
174
|
+
stops: { type: Boolean, reflect: true },
|
|
175
|
+
size: { type: String, reflect: true },
|
|
176
|
+
valueIndicator: { type: String, attribute: 'value-indicator', reflect: true },
|
|
177
|
+
valueText: { type: String, attribute: 'value-text' },
|
|
178
|
+
startValueText: { type: String, attribute: 'start-value-text' },
|
|
179
|
+
startLabel: { type: String, attribute: 'start-label' },
|
|
180
|
+
endLabel: { type: String, attribute: 'end-label' },
|
|
181
|
+
formatValue: { attribute: false },
|
|
182
|
+
valueHidden: { type: Boolean, attribute: 'value-hidden', reflect: true },
|
|
183
|
+
}; }
|
|
184
|
+
/** @from tanrei-slider.value */
|
|
185
|
+
get value() {
|
|
186
|
+
return this.memberValue(0);
|
|
187
|
+
}
|
|
188
|
+
set value(value) {
|
|
189
|
+
this.giveValue(value);
|
|
190
|
+
}
|
|
191
|
+
/** @from tanrei-slider.startValue */
|
|
192
|
+
get startValue() {
|
|
193
|
+
if (this.startPending)
|
|
194
|
+
return this.startGiven;
|
|
195
|
+
return this.slider?.startValue ?? 0;
|
|
196
|
+
}
|
|
197
|
+
set startValue(value) {
|
|
198
|
+
const slider = this.slider;
|
|
199
|
+
if (!this.startPending && slider && Object.is(slider.startValue, value))
|
|
200
|
+
return;
|
|
201
|
+
this.startGiven = value;
|
|
202
|
+
this.startPending = true;
|
|
203
|
+
}
|
|
204
|
+
get slider() {
|
|
205
|
+
return this.renderRoot?.querySelector('tanrei-slider') ?? null;
|
|
206
|
+
}
|
|
207
|
+
get valueMember() {
|
|
208
|
+
return this.slider;
|
|
209
|
+
}
|
|
210
|
+
/** W6, item 4: the value a form's reset returns to — the `value` attribute, as a number; 0 without one, as the Slider's. */
|
|
211
|
+
firstValue() {
|
|
212
|
+
return this.hasAttribute('value') ? Number(this.getAttribute('value')) : 0;
|
|
213
|
+
}
|
|
214
|
+
/** W6, item 4: a range resets its start value too, to the `start-value` attribute. */
|
|
215
|
+
formResetCallback() {
|
|
216
|
+
super.formResetCallback();
|
|
217
|
+
this.startValue = this.hasAttribute('start-value') ? Number(this.getAttribute('start-value')) : 0;
|
|
218
|
+
}
|
|
219
|
+
/** W6, item 5: the Slider restores both values; both are then the Slider's. */
|
|
220
|
+
formStateRestoreCallback(state, mode) {
|
|
221
|
+
super.formStateRestoreCallback(state, mode);
|
|
222
|
+
if (!this.slider)
|
|
223
|
+
return;
|
|
224
|
+
this.startPending = false;
|
|
225
|
+
this.startGiven = undefined;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* SLF-3, SLF-4 (`fills`: `field.valueText`): the Field is given the words the Slider gives each handle, as the Slider
|
|
229
|
+
* writes them — after each of the Slider's updates, and after each of this element's own. A range's two are each a
|
|
230
|
+
* run of its own direction (`isolated()`), in reading order, with an en dash between. Nothing while `valueHidden` is
|
|
231
|
+
* set. No number, unit or word is written here.
|
|
232
|
+
*/
|
|
233
|
+
fill() {
|
|
234
|
+
const field = this.renderRoot?.querySelector('tanrei-field');
|
|
235
|
+
const slider = this.slider;
|
|
236
|
+
if (!field || !slider)
|
|
237
|
+
return;
|
|
238
|
+
const text = this.valueHidden ? '' : slider.range ? `${isolated(slider.shownStartValueText)}${BETWEEN}${isolated(slider.shownValueText)}` : slider.shownValueText;
|
|
239
|
+
if (field.valueText !== text)
|
|
240
|
+
field.valueText = text;
|
|
241
|
+
}
|
|
242
|
+
memberUpdated() {
|
|
243
|
+
this.fill();
|
|
244
|
+
}
|
|
245
|
+
updated(changed) {
|
|
246
|
+
// W5: the render that has just ended gave the Slider the start value that was set; from here it is the Slider's.
|
|
247
|
+
this.startPending = false;
|
|
248
|
+
this.startGiven = undefined;
|
|
249
|
+
super.updated(changed);
|
|
250
|
+
this.fill();
|
|
251
|
+
// SLF-5: a range's end handle with no name of its own is named by `label`, as the start handle is (which the
|
|
252
|
+
// Slider reports itself, SLD-19); a debug build says so.
|
|
253
|
+
if ((changed.has('range') || changed.has('endLabel')) && this.range && !this.endLabel.trim()) {
|
|
254
|
+
report(this, 'SLF-5', 'endLabel is empty, so the range’s end handle has no name of its own and is named by label, as the other handle may be; give it an end-label that holds the words of label');
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
// SLF-1, SLF-2: a Field whose one control is a Slider, exactly as a product writes the two — and nothing else but
|
|
258
|
+
// the passage of the Field's label glyph. No text stands between the tags: the Field's control is its one child
|
|
259
|
+
// without a slot. The Slider carries the element's `name` because a range's two entries are said under it (W6, item
|
|
260
|
+
// 2); it stands in a shadow root, outside every form, and submits nothing itself.
|
|
261
|
+
render() {
|
|
262
|
+
return html `<tanrei-field part="field" exportparts=${FIELD_PARTS.attribute} ${forward(this, FIELD)} .disabled=${this.disabled || this.formDisabled}
|
|
263
|
+
>${this.pass('label-icon')}<tanrei-slider part="slider" exportparts=${SLIDER_PARTS.attribute} ${forward(this, SLIDER)} .label=${this.range ? this.endLabel : ''} .name=${this.name}></tanrei-slider
|
|
264
|
+
></tanrei-field>`;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
if (!customElements.get('tanrei-slider-field'))
|
|
268
|
+
customElements.define('tanrei-slider-field', TanreiSliderField);
|
|
269
|
+
//# sourceMappingURL=slider-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider-field.js","sourceRoot":"","sources":["../../../src/components/slider-field/slider-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkD,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChF,OAAO,EAAE,eAAe,EAAoB,YAAY,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAElH,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,WAAW,EAA6D,MAAM,mBAAmB,CAAC;AAC3G,OAAO,EAAE,YAAY,EAAyF,MAAM,qBAAqB,CAAC;AAK1I,2IAA2I;AAC3I,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,CAAU,CAAC;AACvJ;;;GAGG;AACH,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,E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