@vonage/vivid 4.31.0 → 5.1.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/{shared/definition2.cjs → accordion/definition.cjs} +20 -20
- package/{shared/definition2.js → accordion/definition.js} +5 -7
- package/accordion/index.cjs +5 -5
- package/accordion/index.js +129 -3
- package/accordion-item/definition.cjs +145 -0
- package/accordion-item/definition.js +139 -0
- package/accordion-item/index.cjs +1 -5
- package/accordion-item/index.js +2 -3
- package/{shared/definition3.cjs → action-group/definition.cjs} +12 -9
- package/{shared/definition3.js → action-group/definition.js} +5 -4
- package/action-group/index.cjs +6 -5
- package/action-group/index.js +49 -3
- package/{shared/definition4.cjs → alert/definition.cjs} +33 -31
- package/{shared/definition4.js → alert/definition.js} +11 -11
- package/alert/index.cjs +30 -5
- package/alert/index.js +158 -3
- package/{shared/definition5.cjs → audio-player/definition.cjs} +58 -57
- package/{shared/definition5.js → audio-player/definition.js} +11 -12
- package/audio-player/index.cjs +68 -4
- package/audio-player/index.js +309 -2
- package/{shared/definition6.cjs → avatar/definition.cjs} +28 -26
- package/{shared/definition6.js → avatar/definition.js} +7 -7
- package/avatar/index.cjs +18 -5
- package/avatar/index.js +93 -3
- package/{shared/definition7.cjs → badge/definition.cjs} +18 -16
- package/{shared/definition7.js → badge/definition.js} +6 -6
- package/badge/index.cjs +4 -5
- package/badge/index.js +66 -3
- package/{shared/definition8.cjs → banner/definition.cjs} +26 -25
- package/{shared/definition8.js → banner/definition.js} +10 -11
- package/banner/index.cjs +29 -4
- package/banner/index.js +128 -2
- package/{shared/definition10.cjs → breadcrumb/definition.cjs} +11 -9
- package/{shared/definition10.js → breadcrumb/definition.js} +5 -5
- package/breadcrumb/index.cjs +12 -5
- package/breadcrumb/index.js +69 -3
- package/{shared/definition9.cjs → breadcrumb-item/definition.cjs} +18 -15
- package/{shared/definition9.js → breadcrumb-item/definition.js} +7 -7
- package/breadcrumb-item/index.cjs +5 -5
- package/breadcrumb-item/index.js +33 -3
- package/bundled/_has.cjs +1 -0
- package/bundled/_has.js +34 -0
- package/bundled/affix.cjs +13 -0
- package/bundled/affix.js +63 -0
- package/bundled/anchored.cjs +4 -0
- package/bundled/anchored.js +67 -0
- package/bundled/aria.cjs +1 -0
- package/bundled/aria.js +7 -0
- package/bundled/attribute-binding-behaviour.cjs +1 -0
- package/bundled/attribute-binding-behaviour.js +27 -0
- package/bundled/base-progress.cjs +1 -0
- package/bundled/base-progress.js +57 -0
- package/bundled/breadcrumb-item.cjs +1 -0
- package/bundled/breadcrumb-item.js +21 -0
- package/bundled/button.cjs +1 -0
- package/bundled/button.js +106 -0
- package/bundled/calendar-event.cjs +1 -0
- package/bundled/calendar-event.js +34 -0
- package/bundled/calendar-picker.template.cjs +148 -0
- package/bundled/calendar-picker.template.js +3371 -0
- package/bundled/char-count.cjs +13 -0
- package/bundled/char-count.js +54 -0
- package/bundled/children.cjs +1 -0
- package/bundled/children.js +38 -0
- package/bundled/class-names.cjs +1 -0
- package/bundled/class-names.js +9 -0
- package/bundled/definition.cjs +39 -0
- package/bundled/definition.js +122 -0
- package/bundled/definition10.cjs +19 -0
- package/bundled/definition10.js +73 -0
- package/bundled/definition11.cjs +10 -0
- package/bundled/definition11.js +44 -0
- package/bundled/definition12.cjs +1 -0
- package/bundled/definition12.js +20 -0
- package/bundled/definition13.cjs +73 -0
- package/bundled/definition13.js +359 -0
- package/bundled/definition14.cjs +5 -0
- package/bundled/definition14.js +29 -0
- package/bundled/definition15.cjs +30 -0
- package/bundled/definition15.js +80 -0
- package/bundled/definition16.cjs +19 -0
- package/bundled/definition16.js +103 -0
- package/bundled/definition17.cjs +13 -0
- package/bundled/definition17.js +137 -0
- package/bundled/definition18.cjs +12 -0
- package/bundled/definition18.js +94 -0
- package/bundled/definition19.cjs +67 -0
- package/bundled/definition19.js +666 -0
- package/bundled/definition2.cjs +20 -0
- package/bundled/definition2.js +180 -0
- package/bundled/definition20.cjs +20 -0
- package/bundled/definition20.js +106 -0
- package/bundled/definition21.cjs +5 -0
- package/bundled/definition21.js +19 -0
- package/bundled/definition22.cjs +24 -0
- package/bundled/definition22.js +151 -0
- package/bundled/definition3.cjs +29 -0
- package/bundled/definition3.js +195 -0
- package/bundled/definition4.cjs +6 -0
- package/bundled/definition4.js +42 -0
- package/bundled/definition5.cjs +1 -0
- package/bundled/definition5.js +345 -0
- package/bundled/definition6.cjs +31 -0
- package/bundled/definition6.js +265 -0
- package/bundled/definition7.cjs +30 -0
- package/bundled/definition7.js +288 -0
- package/bundled/definition8.cjs +19 -0
- package/bundled/definition8.js +145 -0
- package/bundled/definition9.cjs +14 -0
- package/bundled/definition9.js +1406 -0
- package/bundled/delegates-aria.cjs +1 -0
- package/bundled/delegates-aria.js +77 -0
- package/bundled/divider.cjs +1 -0
- package/bundled/divider.js +34 -0
- package/bundled/dom.cjs +1 -0
- package/bundled/dom.js +6 -0
- package/bundled/enums.cjs +1 -0
- package/bundled/enums.js +9 -0
- package/bundled/form-associated.cjs +1 -0
- package/bundled/form-associated.js +320 -0
- package/bundled/form-element.cjs +1 -0
- package/bundled/form-element.js +56 -0
- package/bundled/host-semantics.cjs +1 -0
- package/bundled/host-semantics.js +57 -0
- package/bundled/index.cjs +1 -0
- package/bundled/index.js +6 -0
- package/bundled/key-codes.cjs +1 -0
- package/bundled/key-codes.js +16 -0
- package/bundled/linkable.cjs +15 -0
- package/bundled/linkable.js +49 -0
- package/bundled/listbox.cjs +1 -0
- package/bundled/listbox.js +345 -0
- package/bundled/localized.cjs +1 -0
- package/bundled/localized.js +459 -0
- package/bundled/mixins.cjs +33 -0
- package/bundled/mixins.js +226 -0
- package/bundled/numbers.cjs +1 -0
- package/bundled/numbers.js +14 -0
- package/bundled/option.cjs +1 -0
- package/bundled/option.js +158 -0
- package/bundled/picker-field.template.cjs +62 -0
- package/bundled/picker-field.template.js +234 -0
- package/bundled/playbackRates.cjs +1 -0
- package/bundled/playbackRates.js +11 -0
- package/bundled/ref.cjs +1 -0
- package/bundled/ref.js +32 -0
- package/bundled/repeat.cjs +1 -0
- package/bundled/repeat.js +341 -0
- package/bundled/scrollIntoView.cjs +1 -0
- package/bundled/scrollIntoView.js +33 -0
- package/bundled/single-date-picker.cjs +1 -0
- package/bundled/single-date-picker.js +39 -0
- package/bundled/single-value-picker.cjs +1 -0
- package/bundled/single-value-picker.js +87 -0
- package/bundled/slider.template.cjs +41 -0
- package/bundled/slider.template.js +100 -0
- package/bundled/slotted.cjs +1 -0
- package/bundled/slotted.js +81 -0
- package/bundled/strings.cjs +1 -0
- package/bundled/strings.js +7 -0
- package/bundled/text-field.cjs +1 -0
- package/bundled/text-field.js +4 -0
- package/bundled/time-selection-picker.template.cjs +46 -0
- package/bundled/time-selection-picker.template.js +575 -0
- package/bundled/vivid-element.cjs +1 -0
- package/bundled/vivid-element.js +1761 -0
- package/bundled/when.cjs +1 -0
- package/bundled/when.js +11 -0
- package/bundled/with-contextual-help.cjs +1 -0
- package/bundled/with-contextual-help.js +22 -0
- package/bundled/with-error-text.cjs +1 -0
- package/bundled/with-error-text.js +39 -0
- package/bundled/with-success-text.cjs +1 -0
- package/bundled/with-success-text.js +16 -0
- package/button/definition.cjs +14 -0
- package/button/definition.js +4 -0
- package/button/index.cjs +1 -5
- package/button/index.js +2 -3
- package/{shared/definition13.cjs → calendar/definition.cjs} +27 -449
- package/{shared/definition13.js → calendar/definition.js} +7 -431
- package/calendar/index.cjs +53 -5
- package/calendar/index.js +431 -3
- package/{shared/definition12.cjs → calendar-event/definition.cjs} +12 -9
- package/{shared/definition12.js → calendar-event/definition.js} +6 -6
- package/calendar-event/index.cjs +9 -5
- package/calendar-event/index.js +43 -3
- package/card/definition.cjs +186 -0
- package/{shared/definition14.js → card/definition.js} +10 -11
- package/card/index.cjs +47 -5
- package/card/index.js +163 -3
- package/{shared/definition15.cjs → checkbox/definition.cjs} +35 -30
- package/{shared/definition15.js → checkbox/definition.js} +17 -14
- package/checkbox/index.cjs +1 -5
- package/checkbox/index.js +2 -3
- package/{shared/definition16.cjs → combobox/definition.cjs} +50 -52
- package/{shared/definition16.js → combobox/definition.js} +19 -23
- package/combobox/index.cjs +65 -5
- package/combobox/index.js +512 -3
- package/contextual-help/definition.cjs +62 -0
- package/contextual-help/definition.js +57 -0
- package/contextual-help/index.cjs +1 -0
- package/contextual-help/index.js +2 -0
- package/custom-elements.json +2735 -711
- package/{shared/definition17.cjs → data-grid/definition.cjs} +169 -196
- package/{shared/definition17.js → data-grid/definition.js} +71 -100
- package/data-grid/index.cjs +81 -5
- package/data-grid/index.js +1011 -3
- package/{shared/definition18.cjs → date-picker/definition.cjs} +20 -17
- package/{shared/definition18.js → date-picker/definition.js} +12 -11
- package/date-picker/index.cjs +1 -5
- package/date-picker/index.js +115 -3
- package/{shared/definition19.cjs → date-range-picker/definition.cjs} +26 -23
- package/{shared/definition19.js → date-range-picker/definition.js} +10 -9
- package/date-range-picker/index.cjs +1 -5
- package/date-range-picker/index.js +335 -3
- package/{shared/definition20.cjs → date-time-picker/definition.cjs} +27 -24
- package/{shared/definition20.js → date-time-picker/definition.js} +13 -12
- package/date-time-picker/index.cjs +8 -5
- package/date-time-picker/index.js +216 -3
- package/{shared/definition21.cjs → dial-pad/definition.cjs} +39 -40
- package/{shared/definition21.js → dial-pad/definition.js} +9 -12
- package/dial-pad/index.cjs +54 -5
- package/dial-pad/index.js +214 -3
- package/{shared/definition22.cjs → dialog/definition.cjs} +48 -47
- package/{shared/definition22.js → dialog/definition.js} +10 -11
- package/dialog/index.cjs +44 -5
- package/dialog/index.js +257 -3
- package/{shared/definition23.cjs → divider/definition.cjs} +10 -6
- package/{shared/definition23.js → divider/definition.js} +6 -5
- package/divider/index.cjs +1 -5
- package/divider/index.js +2 -3
- package/elevation/definition.cjs +11 -0
- package/elevation/definition.js +2 -0
- package/elevation/index.cjs +1 -5
- package/elevation/index.js +2 -3
- package/empty-state/definition.cjs +81 -0
- package/empty-state/definition.js +75 -0
- package/empty-state/index.cjs +14 -5
- package/empty-state/index.js +64 -3
- package/fab/definition.cjs +105 -0
- package/fab/definition.js +99 -0
- package/fab/index.cjs +20 -5
- package/fab/index.js +86 -3
- package/file-picker/definition.cjs +510 -0
- package/file-picker/definition.js +504 -0
- package/file-picker/index.cjs +58 -5
- package/file-picker/index.js +381 -3
- package/{shared/definition27.cjs → header/definition.cjs} +14 -11
- package/{shared/definition27.js → header/definition.js} +6 -5
- package/header/index.cjs +19 -5
- package/header/index.js +57 -3
- package/{shared/definition28.cjs → icon/definition.cjs} +25 -149
- package/{shared/definition28.js → icon/definition.js} +6 -132
- package/icon/index.cjs +1 -5
- package/icon/index.js +2 -3
- package/index.cjs +268 -264
- package/index.js +72 -71
- package/{shared/definition29.cjs → layout/definition.cjs} +13 -10
- package/{shared/definition29.js → layout/definition.js} +4 -3
- package/layout/index.cjs +3 -5
- package/layout/index.js +52 -3
- package/lib/accordion-item/accordion-item.d.ts +42 -2
- package/lib/action-group/action-group.d.ts +42 -2
- package/lib/alert/alert.d.ts +84 -4
- package/lib/audio-player/audio-player.d.ts +42 -2
- package/lib/avatar/avatar.d.ts +42 -2
- package/lib/badge/badge.d.ts +42 -2
- package/lib/banner/banner.d.ts +126 -6
- package/lib/breadcrumb/breadcrumb.d.ts +42 -2
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +42 -2
- package/lib/button/button.d.ts +127 -6
- package/lib/calendar-event/calendar-event.d.ts +42 -2
- package/lib/card/card.d.ts +42 -2
- package/lib/checkbox/checkbox.d.ts +252 -13
- package/lib/combobox/combobox.d.ts +252 -12
- package/lib/components.d.ts +1 -0
- package/lib/contextual-help/contextual-help.d.ts +5 -0
- package/lib/contextual-help/contextual-help.template.d.ts +3 -0
- package/lib/contextual-help/definition.d.ts +1 -0
- package/lib/data-grid/data-grid-cell.d.ts +418 -3
- package/lib/data-grid/data-grid-row.d.ts +379 -1
- package/lib/date-picker/date-picker.d.ts +374 -54
- package/lib/date-range-picker/date-range-picker.d.ts +188 -28
- package/lib/date-time-picker/date-time-picker.d.ts +376 -56
- package/lib/dial-pad/dial-pad.d.ts +42 -2
- package/lib/dialog/dialog.d.ts +84 -4
- package/lib/divider/divider.d.ts +42 -2
- package/lib/fab/fab.d.ts +43 -2
- package/lib/file-picker/accept.d.ts +1 -0
- package/lib/file-picker/data-transfer.d.ts +1 -0
- package/lib/file-picker/file-picker.d.ts +259 -31
- package/lib/file-picker/locale.d.ts +1 -0
- package/lib/header/header.d.ts +42 -2
- package/lib/menu/menu.d.ts +84 -4
- package/lib/menu-item/menu-item.d.ts +84 -4
- package/lib/nav/nav.d.ts +42 -2
- package/lib/nav-disclosure/nav-disclosure.d.ts +84 -4
- package/lib/nav-item/nav-item.d.ts +84 -4
- package/lib/note/note.d.ts +42 -2
- package/lib/number-field/number-field.d.ts +840 -104
- package/lib/option/option.d.ts +85 -4
- package/lib/pagination/pagination.d.ts +42 -2
- package/lib/progress/progress.d.ts +42 -2
- package/lib/progress-ring/progress-ring.d.ts +42 -2
- package/lib/radio/radio.d.ts +126 -7
- package/lib/radio-group/radio-group.d.ts +42 -2
- package/lib/range-slider/range-slider.d.ts +126 -6
- package/lib/rich-text-editor/menubar/menubar.d.ts +42 -2
- package/lib/rich-text-editor/rich-text-editor.d.ts +42 -2
- package/lib/searchable-select/option-tag.d.ts +42 -2
- package/lib/searchable-select/searchable-select.d.ts +336 -16
- package/lib/select/select.d.ts +294 -14
- package/lib/selectable-box/selectable-box.d.ts +42 -3
- package/lib/simple-color-picker/definition.d.ts +4 -0
- package/lib/simple-color-picker/locale.d.ts +4 -0
- package/lib/simple-color-picker/simple-color-picker.d.ts +1600 -0
- package/lib/simple-color-picker/simple-color-picker.template.d.ts +3 -0
- package/lib/slider/slider.d.ts +126 -6
- package/lib/split-button/split-button.d.ts +128 -6
- package/lib/switch/switch.d.ts +84 -4
- package/lib/tab/tab.d.ts +126 -6
- package/lib/tab-panel/tab-panel.d.ts +42 -2
- package/lib/tag/tag.d.ts +126 -6
- package/lib/tag-group/tag-group.d.ts +42 -2
- package/lib/tag-name-map.d.ts +2 -1
- package/lib/text-area/text-area.d.ts +787 -91
- package/lib/text-field/text-field.d.ts +840 -104
- package/lib/time-picker/time-picker.d.ts +188 -28
- package/lib/toggletip/toggletip.d.ts +84 -4
- package/lib/tooltip/tooltip.d.ts +42 -2
- package/lib/tree-item/tree-item.d.ts +84 -4
- package/lib/tree-view/tree-view.d.ts +42 -2
- package/lib/video-player/video-player.d.ts +42 -2
- package/locales/de-DE.cjs +13 -1
- package/locales/de-DE.js +13 -1
- package/locales/en-GB.cjs +13 -1
- package/locales/en-GB.js +13 -1
- package/locales/en-US.cjs +13 -1
- package/locales/en-US.js +13 -1
- package/locales/ja-JP.cjs +13 -1
- package/locales/ja-JP.js +13 -1
- package/locales/zh-CN.cjs +13 -1
- package/locales/zh-CN.js +13 -1
- package/{shared/definition31.cjs → menu/definition.cjs} +46 -46
- package/{shared/definition31.js → menu/definition.js} +16 -18
- package/menu/index.cjs +1 -5
- package/menu/index.js +2 -3
- package/menu-item/definition.cjs +14 -0
- package/menu-item/definition.js +3 -0
- package/menu-item/index.cjs +1 -5
- package/menu-item/index.js +2 -3
- package/{shared/definition34.cjs → nav/definition.cjs} +7 -4
- package/{shared/definition34.js → nav/definition.js} +4 -3
- package/nav/index.cjs +5 -5
- package/nav/index.js +13 -3
- package/nav-disclosure/definition.cjs +122 -0
- package/nav-disclosure/definition.js +116 -0
- package/nav-disclosure/index.cjs +16 -5
- package/nav-disclosure/index.js +96 -3
- package/{shared/definition33.cjs → nav-item/definition.cjs} +19 -16
- package/{shared/definition33.js → nav-item/definition.js} +9 -8
- package/nav-item/index.cjs +2 -5
- package/nav-item/index.js +59 -3
- package/{shared/definition35.cjs → note/definition.cjs} +15 -13
- package/{shared/definition35.js → note/definition.js} +6 -6
- package/note/index.cjs +9 -5
- package/note/index.js +44 -3
- package/number-field/definition.cjs +438 -0
- package/{shared/definition36.js → number-field/definition.js} +31 -27
- package/number-field/index.cjs +60 -5
- package/number-field/index.js +369 -3
- package/option/definition.cjs +84 -0
- package/option/definition.js +78 -0
- package/option/index.cjs +1 -5
- package/option/index.js +2 -3
- package/package.json +15 -4
- package/{shared/definition38.cjs → pagination/definition.cjs} +31 -33
- package/{shared/definition38.js → pagination/definition.js} +7 -11
- package/pagination/index.cjs +43 -5
- package/pagination/index.js +194 -3
- package/popup/definition.cjs +13 -0
- package/popup/definition.js +4 -0
- package/popup/index.cjs +1 -5
- package/popup/index.js +2 -3
- package/{shared/definition40.cjs → progress/definition.cjs} +17 -15
- package/{shared/definition40.js → progress/definition.js} +6 -6
- package/progress/index.cjs +17 -5
- package/progress/index.js +69 -3
- package/{shared/definition39.cjs → progress-ring/definition.cjs} +17 -15
- package/{shared/definition39.js → progress-ring/definition.js} +7 -7
- package/progress-ring/index.cjs +1 -5
- package/progress-ring/index.js +2 -3
- package/{shared/definition42.cjs → radio/definition.cjs} +20 -23
- package/{shared/definition42.js → radio/definition.js} +8 -13
- package/radio/index.cjs +1 -5
- package/radio/index.js +2 -3
- package/{shared/definition41.cjs → radio-group/definition.cjs} +31 -30
- package/{shared/definition41.js → radio-group/definition.js} +8 -9
- package/radio-group/index.cjs +23 -5
- package/radio-group/index.js +255 -3
- package/{shared/definition43.cjs → range-slider/definition.cjs} +62 -61
- package/{shared/definition43.js → range-slider/definition.js} +13 -14
- package/range-slider/index.cjs +68 -5
- package/range-slider/index.js +456 -3
- package/rich-text-editor/definition.cjs +1206 -0
- package/rich-text-editor/definition.js +1200 -0
- package/rich-text-editor/index.cjs +133 -4
- package/rich-text-editor/index.js +10386 -2
- package/{shared/definition45.cjs → searchable-select/definition.cjs} +119 -116
- package/{shared/definition45.js → searchable-select/definition.js} +25 -24
- package/searchable-select/index.cjs +164 -5
- package/searchable-select/index.js +1025 -3
- package/{shared/definition46.cjs → select/definition.cjs} +80 -83
- package/{shared/definition46.js → select/definition.js} +19 -24
- package/select/index.cjs +1 -5
- package/select/index.js +2 -3
- package/{shared/definition47.cjs → selectable-box/definition.cjs} +26 -32
- package/{shared/definition47.js → selectable-box/definition.js} +9 -17
- package/selectable-box/index.cjs +28 -5
- package/selectable-box/index.js +136 -3
- package/shared/aria/aria-mixin.d.ts +43 -3
- package/shared/aria/attribute-removal.d.ts +3 -0
- package/shared/aria/delegate-aria-behavior.d.ts +0 -3
- package/shared/aria/delegates-aria.d.ts +42 -2
- package/shared/aria/host-semantics.d.ts +42 -2
- package/shared/color-picker/index.d.ts +2 -0
- package/shared/color-picker/types.d.ts +4 -0
- package/shared/color-picker/utils.d.ts +3 -0
- package/shared/feedback/feedback-message.d.ts +42 -2
- package/shared/feedback/mixins.d.ts +84 -4
- package/shared/foundation/button/button.d.ts +84 -4
- package/shared/foundation/form-associated/form-associated.d.ts +84 -4
- package/shared/foundation/vivid-element/vivid-element.d.ts +43 -3
- package/shared/localization/Locale.d.ts +2 -0
- package/shared/patterns/affix.d.ts +84 -4
- package/shared/patterns/anchored.d.ts +84 -4
- package/shared/patterns/char-count/char-count.d.ts +42 -2
- package/shared/patterns/form-elements/form-element.d.ts +84 -4
- package/shared/patterns/form-elements/with-contextual-help.d.ts +1238 -0
- package/shared/patterns/form-elements/with-error-text.d.ts +126 -6
- package/shared/patterns/form-elements/with-success-text.d.ts +42 -2
- package/shared/patterns/linkable.d.ts +42 -2
- package/shared/patterns/localized.d.ts +42 -2
- package/shared/patterns/trapped-focus.d.ts +42 -2
- package/shared/picker-field/mixins/calendar-picker.d.ts +94 -14
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +94 -14
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +42 -2
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +188 -28
- package/shared/picker-field/mixins/single-date-picker.d.ts +280 -40
- package/shared/picker-field/mixins/single-value-picker.d.ts +92 -12
- package/shared/picker-field/mixins/time-selection-picker.d.ts +188 -28
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +188 -28
- package/shared/picker-field/picker-field.d.ts +252 -12
- package/{shared/definition48.cjs → side-drawer/definition.cjs} +16 -14
- package/{shared/definition48.js → side-drawer/definition.js} +5 -5
- package/side-drawer/index.cjs +17 -3
- package/side-drawer/index.js +100 -2
- package/simple-color-picker/definition.cjs +398 -0
- package/simple-color-picker/definition.js +392 -0
- package/simple-color-picker/index.cjs +31 -0
- package/simple-color-picker/index.js +250 -0
- package/{shared/definition49.cjs → slider/definition.cjs} +46 -53
- package/{shared/definition49.js → slider/definition.js} +11 -20
- package/slider/index.cjs +1 -5
- package/slider/index.js +2 -3
- package/split-button/definition.cjs +176 -0
- package/split-button/definition.js +170 -0
- package/split-button/index.cjs +26 -5
- package/split-button/index.js +149 -3
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/{shared/definition51.cjs → switch/definition.cjs} +20 -19
- package/{shared/definition51.js → switch/definition.js} +8 -9
- package/switch/index.cjs +16 -5
- package/switch/index.js +102 -3
- package/tab/definition.cjs +127 -0
- package/tab/definition.js +121 -0
- package/tab/index.cjs +1 -5
- package/tab/index.js +2 -3
- package/{shared/definition52.cjs → tab-panel/definition.cjs} +7 -4
- package/{shared/definition52.js → tab-panel/definition.js} +4 -3
- package/tab-panel/index.cjs +1 -5
- package/tab-panel/index.js +2 -3
- package/{shared/definition54.cjs → tabs/definition.cjs} +47 -40
- package/{shared/definition54.js → tabs/definition.js} +19 -14
- package/tabs/index.cjs +31 -5
- package/tabs/index.js +321 -3
- package/tag/definition.cjs +156 -0
- package/tag/definition.js +150 -0
- package/tag/index.cjs +19 -5
- package/tag/index.js +118 -3
- package/{shared/definition55.cjs → tag-group/definition.cjs} +9 -6
- package/{shared/definition55.js → tag-group/definition.js} +5 -4
- package/tag-group/index.cjs +8 -5
- package/tag-group/index.js +26 -3
- package/text-area/definition.cjs +355 -0
- package/text-area/definition.js +349 -0
- package/text-area/index.cjs +41 -5
- package/text-area/index.js +293 -3
- package/{shared/definition58.cjs → text-field/definition.cjs} +70 -52
- package/{shared/definition58.js → text-field/definition.js} +40 -24
- package/text-field/index.cjs +1 -5
- package/text-field/index.js +2 -3
- package/time-picker/definition.cjs +43 -0
- package/{shared/definition59.js → time-picker/definition.js} +9 -8
- package/time-picker/index.cjs +1 -5
- package/time-picker/index.js +29 -3
- package/{shared/definition60.cjs → toggletip/definition.cjs} +20 -18
- package/{shared/definition60.js → toggletip/definition.js} +8 -8
- package/toggletip/index.cjs +1 -5
- package/toggletip/index.js +2 -3
- package/{shared/definition61.cjs → tooltip/definition.cjs} +16 -13
- package/{shared/definition61.js → tooltip/definition.js} +7 -6
- package/tooltip/index.cjs +1 -5
- package/tooltip/index.js +2 -3
- package/tree-item/definition.cjs +13 -0
- package/tree-item/definition.js +3 -0
- package/tree-item/index.cjs +1 -5
- package/tree-item/index.js +2 -3
- package/{shared/definition63.cjs → tree-view/definition.cjs} +42 -44
- package/{shared/definition63.js → tree-view/definition.js} +7 -11
- package/tree-view/index.cjs +13 -5
- package/tree-view/index.js +171 -3
- package/{shared → unbundled}/affix.cjs +10 -11
- package/{shared → unbundled}/affix.js +2 -3
- package/{shared → unbundled}/anchored.cjs +7 -8
- package/{shared → unbundled}/anchored.js +1 -2
- package/{shared → unbundled}/attribute-binding-behaviour.cjs +3 -3
- package/{shared → unbundled}/attribute-binding-behaviour.js +1 -1
- package/{shared → unbundled}/base-progress.cjs +6 -5
- package/{shared → unbundled}/base-progress.js +2 -1
- package/{shared → unbundled}/breadcrumb-item.cjs +3 -2
- package/{shared → unbundled}/breadcrumb-item.js +2 -1
- package/{shared → unbundled}/button.cjs +10 -9
- package/{shared → unbundled}/button.js +2 -1
- package/{shared → unbundled}/calendar-event.cjs +8 -7
- package/{shared → unbundled}/calendar-event.js +2 -1
- package/unbundled/calendar-picker.template.cjs +917 -0
- package/unbundled/calendar-picker.template.js +906 -0
- package/{shared → unbundled}/char-count.cjs +6 -7
- package/{shared → unbundled}/char-count.js +2 -3
- package/unbundled/definition.cjs +225 -0
- package/unbundled/definition.js +220 -0
- package/{shared/definition30.cjs → unbundled/definition2.cjs} +49 -46
- package/{shared/definition30.js → unbundled/definition2.js} +14 -11
- package/unbundled/definition3.cjs +207 -0
- package/{shared/definition62.js → unbundled/definition3.js} +6 -10
- package/unbundled/definition4.cjs +298 -0
- package/unbundled/definition4.js +293 -0
- package/{shared/definition65.cjs → unbundled/definition5.cjs} +7 -6
- package/{shared/definition65.js → unbundled/definition5.js} +3 -2
- package/{shared → unbundled}/delegates-aria.cjs +8 -28
- package/{shared → unbundled}/delegates-aria.js +6 -26
- package/{shared → unbundled}/divider.cjs +13 -7
- package/{shared → unbundled}/divider.js +11 -5
- package/{shared → unbundled}/form-associated.cjs +13 -13
- package/{shared → unbundled}/form-associated.js +2 -2
- package/{shared → unbundled}/form-element.cjs +3 -3
- package/{shared → unbundled}/form-element.js +1 -1
- package/{shared → unbundled}/host-semantics.cjs +2 -1
- package/{shared → unbundled}/host-semantics.js +2 -1
- package/unbundled/key-codes.cjs +10 -0
- package/unbundled/key-codes.js +7 -0
- package/{shared → unbundled}/linkable.cjs +11 -12
- package/{shared → unbundled}/linkable.js +1 -2
- package/{shared → unbundled}/listbox.cjs +22 -38
- package/{shared → unbundled}/listbox.js +4 -20
- package/{shared → unbundled}/localized.cjs +2 -2
- package/{shared → unbundled}/localized.js +1 -1
- package/{shared → unbundled}/mixins.cjs +27 -83
- package/{shared → unbundled}/mixins.js +6 -62
- package/{shared → unbundled}/option.cjs +42 -17
- package/{shared → unbundled}/option.js +29 -4
- package/{shared → unbundled}/picker-field.template.cjs +21 -21
- package/{shared → unbundled}/picker-field.template.js +7 -7
- package/{shared → unbundled}/slider.template.cjs +15 -19
- package/{shared → unbundled}/slider.template.js +3 -7
- package/unbundled/text-field.cjs +5 -0
- package/unbundled/text-field.js +3 -0
- package/{shared → unbundled}/time-selection-picker.template.cjs +28 -30
- package/{shared → unbundled}/time-selection-picker.template.js +4 -6
- package/unbundled/vivid-element.cjs +283 -0
- package/unbundled/vivid-element.js +274 -0
- package/unbundled/with-contextual-help.cjs +29 -0
- package/unbundled/with-contextual-help.js +27 -0
- package/{shared → unbundled}/with-error-text.cjs +2 -2
- package/{shared → unbundled}/with-error-text.js +1 -1
- package/{shared → unbundled}/with-success-text.cjs +2 -2
- package/{shared → unbundled}/with-success-text.js +1 -1
- package/video-player/definition.cjs +536 -0
- package/video-player/definition.js +530 -0
- package/video-player/index.cjs +536 -3
- package/video-player/index.js +35912 -2
- package/{shared/definition66.cjs → visually-hidden/definition.cjs} +6 -3
- package/{shared/definition66.js → visually-hidden/definition.js} +3 -2
- package/visually-hidden/index.cjs +1 -5
- package/visually-hidden/index.js +2 -3
- package/vivid.api.json +716 -914
- package/shared/_has.cjs +0 -58
- package/shared/_has.js +0 -54
- package/shared/aria.cjs +0 -11
- package/shared/aria.js +0 -9
- package/shared/calendar-picker.template.cjs +0 -6377
- package/shared/calendar-picker.template.js +0 -6366
- package/shared/children.cjs +0 -61
- package/shared/children.js +0 -59
- package/shared/class-names.cjs +0 -17
- package/shared/class-names.js +0 -15
- package/shared/definition.cjs +0 -145
- package/shared/definition.js +0 -141
- package/shared/definition11.cjs +0 -220
- package/shared/definition11.js +0 -215
- package/shared/definition14.cjs +0 -185
- package/shared/definition24.cjs +0 -80
- package/shared/definition24.js +0 -76
- package/shared/definition25.cjs +0 -90
- package/shared/definition25.js +0 -86
- package/shared/definition26.cjs +0 -2514
- package/shared/definition26.js +0 -2510
- package/shared/definition32.cjs +0 -120
- package/shared/definition32.js +0 -116
- package/shared/definition36.cjs +0 -432
- package/shared/definition37.cjs +0 -71
- package/shared/definition37.js +0 -68
- package/shared/definition44.cjs +0 -14666
- package/shared/definition44.js +0 -14662
- package/shared/definition50.cjs +0 -148
- package/shared/definition50.js +0 -144
- package/shared/definition53.cjs +0 -124
- package/shared/definition53.js +0 -120
- package/shared/definition56.cjs +0 -154
- package/shared/definition56.js +0 -150
- package/shared/definition57.cjs +0 -335
- package/shared/definition57.js +0 -331
- package/shared/definition59.cjs +0 -39
- package/shared/definition62.cjs +0 -211
- package/shared/definition64.cjs +0 -69579
- package/shared/definition64.js +0 -69575
- package/shared/definition67.cjs +0 -2227
- package/shared/definition67.js +0 -2222
- package/shared/dom.cjs +0 -10
- package/shared/dom.js +0 -8
- package/shared/key-codes.cjs +0 -32
- package/shared/key-codes.js +0 -18
- package/shared/numbers.cjs +0 -38
- package/shared/numbers.js +0 -34
- package/shared/ref.cjs +0 -43
- package/shared/ref.js +0 -41
- package/shared/repeat.cjs +0 -767
- package/shared/repeat.js +0 -764
- package/shared/slotted.cjs +0 -123
- package/shared/slotted.js +0 -119
- package/shared/strings.cjs +0 -11
- package/shared/strings.js +0 -9
- package/shared/text-field.cjs +0 -5
- package/shared/text-field.js +0 -3
- package/shared/vivid-element.cjs +0 -2771
- package/shared/vivid-element.js +0 -2748
- package/shared/when.cjs +0 -31
- package/shared/when.js +0 -29
- /package/{shared → unbundled}/enums.cjs +0 -0
- /package/{shared → unbundled}/enums.js +0 -0
- /package/{shared → unbundled}/index.cjs +0 -0
- /package/{shared → unbundled}/index.js +0 -0
- /package/{shared → unbundled}/playbackRates.cjs +0 -0
- /package/{shared → unbundled}/playbackRates.js +0 -0
- /package/{shared → unbundled}/scrollIntoView.cjs +0 -0
- /package/{shared → unbundled}/scrollIntoView.js +0 -0
- /package/{shared → unbundled}/single-date-picker.cjs +0 -0
- /package/{shared → unbundled}/single-date-picker.js +0 -0
- /package/{shared → unbundled}/single-value-picker.cjs +0 -0
- /package/{shared → unbundled}/single-value-picker.js +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const l = (t) => {
|
|
2
|
+
class a extends t {
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
valueChanged(e, i) {
|
|
7
|
+
super.valueChanged(e, i), this.value && this._adjustSelectedMonthToEnsureVisibilityOf(this._dateValue());
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
_onDateClick(e) {
|
|
13
|
+
this._updateValueDueToUserInteraction(this._withUpdatedDate(e), !1);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
_isDateSelected(e) {
|
|
19
|
+
return e === this._dateValue();
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
_isDateAriaSelected(e) {
|
|
25
|
+
return this._isDateSelected(e);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
|
+
_getSelectedDates() {
|
|
31
|
+
const e = [];
|
|
32
|
+
return this.value && e.push(this._dateValue()), e;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return a;
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
l as S
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=a=>{class i extends a{constructor(){super(...arguments),this._isInternalValueUpdate=!1}valueChanged(e,t){if(super.valueChanged(e,t),this.value&&!this._isValidValue(this.value)){this.value="";return}this._isInternalValueUpdate||this._updatePresentationValue()}_updatePresentationValue(){this.value?this._presentationValue=this._toPresentationValue(this.value):this._presentationValue=""}_updateValueDueToUserInteraction(e,t){this.value!==e&&(this._isInternalValueUpdate=!0,this.value=e,this._isInternalValueUpdate=!1,this.$emit("input")),t||(this._updatePresentationValue(),this.$emit("change"))}_onTextFieldChange(){if(this._presentationValue===""){this._updateValueDueToUserInteraction("",!1);return}try{this._updateValueDueToUserInteraction(this._parsePresentationValue(this._presentationValue),!1)}catch{const t=this._presentationValue;this._updateValueDueToUserInteraction("",!1),this._presentationValue=t;return}}_onTextFieldInput(e){if(super._onTextFieldInput(e),this._presentationValue===""){this._updateValueDueToUserInteraction("",!0);return}try{this._updateValueDueToUserInteraction(this._parsePresentationValue(this._presentationValue),!0)}catch{return}}_isPresentationValueInvalid(){if(this._presentationValue==="")return!1;try{return this._parsePresentationValue(this._presentationValue),!1}catch{return!0}}_onClearClick(){this._updateValueDueToUserInteraction("",!1),super._onClearClick()}}return i};exports.SingleValuePicker=s;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
const n = (a) => {
|
|
2
|
+
class i extends a {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments), this._isInternalValueUpdate = !1;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
valueChanged(e, t) {
|
|
10
|
+
if (super.valueChanged(e, t), this.value && !this._isValidValue(this.value)) {
|
|
11
|
+
this.value = "";
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
this._isInternalValueUpdate || this._updatePresentationValue();
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
_updatePresentationValue() {
|
|
20
|
+
this.value ? this._presentationValue = this._toPresentationValue(this.value) : this._presentationValue = "";
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
_updateValueDueToUserInteraction(e, t) {
|
|
26
|
+
this.value !== e && (this._isInternalValueUpdate = !0, this.value = e, this._isInternalValueUpdate = !1, this.$emit("input")), t || (this._updatePresentationValue(), this.$emit("change"));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
_onTextFieldChange() {
|
|
32
|
+
if (this._presentationValue === "") {
|
|
33
|
+
this._updateValueDueToUserInteraction("", !1);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
try {
|
|
37
|
+
this._updateValueDueToUserInteraction(
|
|
38
|
+
this._parsePresentationValue(this._presentationValue),
|
|
39
|
+
!1
|
|
40
|
+
);
|
|
41
|
+
} catch {
|
|
42
|
+
const t = this._presentationValue;
|
|
43
|
+
this._updateValueDueToUserInteraction("", !1), this._presentationValue = t;
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
_onTextFieldInput(e) {
|
|
51
|
+
if (super._onTextFieldInput(e), this._presentationValue === "") {
|
|
52
|
+
this._updateValueDueToUserInteraction("", !0);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
try {
|
|
56
|
+
this._updateValueDueToUserInteraction(
|
|
57
|
+
this._parsePresentationValue(this._presentationValue),
|
|
58
|
+
!0
|
|
59
|
+
);
|
|
60
|
+
} catch {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
_isPresentationValueInvalid() {
|
|
68
|
+
if (this._presentationValue === "")
|
|
69
|
+
return !1;
|
|
70
|
+
try {
|
|
71
|
+
return this._parsePresentationValue(this._presentationValue), !1;
|
|
72
|
+
} catch {
|
|
73
|
+
return !0;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
_onClearClick() {
|
|
80
|
+
this._updateValueDueToUserInteraction("", !1), super._onClearClick();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return i;
|
|
84
|
+
};
|
|
85
|
+
export {
|
|
86
|
+
n as S
|
|
87
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";const d=require("./numbers.cjs"),r=require("./definition9.cjs"),m=require("./delegates-aria.cjs"),s=require("./class-names.cjs"),i=require("./ref.cjs"),p=require("./when.cjs"),l=require("./aria.cjs"),n=require("./vivid-element.cjs"),v=t=>{const a=t.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Math.max(0,(a[1]?a[1].length:0)-(a[2]?+a[2]:0))},h=(t,a)=>{const e=v(a),o=Math.pow(10,e),u=Math.round(t/a)*a;return Math.round(u*o)/o},$=t=>t>0?t:1,g={fromView(t){const a=Number(t);return $(a)},toView(t){return t.toString()}},T=(t,a,e)=>t+(a-t)*e,b=(t,a,e)=>d.limit(0,1,(e-t)/(a-t)),f=({disabled:t,connotation:a})=>s.classNames("control",["disabled",!!t],[`connotation-${a}`,!!a]),V=({_focusVisible:t})=>s.classNames("thumb-container",["focus-visible",t]),c=(t,a)=>{const e=t?["right","center","","100% repeat-x"]:["bottom","top","100%","repeat-y"];return n.html` <div
|
|
2
|
+
class="mark"
|
|
3
|
+
style="
|
|
4
|
+
background: linear-gradient(to ${e[0]}, currentcolor 1px, transparent 0px)
|
|
5
|
+
0px ${e[1]} / ${e[2]} calc((100% - 1px) / ${a}) ${e[3]}
|
|
6
|
+
"
|
|
7
|
+
></div>`},S=t=>{const a=t.tagFor(r.Popup);return n.html`<template
|
|
8
|
+
@focusin="${e=>e._onFocusIn()}"
|
|
9
|
+
@focusout="${e=>e._onFocusOut()}"
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
tabindex="${e=>e.disabled?null:0}"
|
|
13
|
+
class="${f} ${e=>e.orientation}"
|
|
14
|
+
${m.delegateAria({role:"slider",ariaValueText:e=>e.ariaValueText||e.valueTextFormatter(e.value),ariaValueNow:e=>e.value,ariaValueMin:e=>e.min,ariaValueMax:e=>e.max,ariaDisabled:e=>e.disabled?"true":null,ariaOrientation:e=>e.orientation})}
|
|
15
|
+
>
|
|
16
|
+
<div class="positioning-region">
|
|
17
|
+
<div ${i.ref("track")} class="track">
|
|
18
|
+
${e=>e.markers?c(e.orientation===l.Orientation.horizontal,Math.floor((e.max-e.min)/e.step)):void 0}
|
|
19
|
+
<div class="track-start" style="${e=>e.position}"></div>
|
|
20
|
+
</div>
|
|
21
|
+
<div
|
|
22
|
+
${i.ref("thumb")}
|
|
23
|
+
class="${e=>V(e)}"
|
|
24
|
+
style="${e=>e.position}"
|
|
25
|
+
></div>
|
|
26
|
+
${p.when(e=>e.pin,n.html`<${a}
|
|
27
|
+
class="popup"
|
|
28
|
+
arrow
|
|
29
|
+
alternate
|
|
30
|
+
:anchor="${e=>e.thumb}"
|
|
31
|
+
:open=${e=>e._isThumbPopupOpen}
|
|
32
|
+
:placementStrategy=${e=>e.orientation===l.Orientation.horizontal?r.PlacementStrategy.AutoPlacementHorizontal:r.PlacementStrategy.AutoPlacementVertical}
|
|
33
|
+
animation-frame
|
|
34
|
+
exportparts="vvd-theme-alternate"
|
|
35
|
+
aria-hidden="true"
|
|
36
|
+
>
|
|
37
|
+
<div class="tooltip">${e=>e.ariaValueText||e.valueTextFormatter(e.value)}</div>
|
|
38
|
+
</${a}>`)}
|
|
39
|
+
</div>
|
|
40
|
+
</div></template
|
|
41
|
+
>`};exports.SliderTemplate=S;exports.defaultToOneConverter=g;exports.getMarkersTemplate=c;exports.inverseLerp=b;exports.lerp=T;exports.roundToStepValue=h;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { l as m } from "./numbers.js";
|
|
2
|
+
import { P as u, a as n } from "./definition9.js";
|
|
3
|
+
import { d as p } from "./delegates-aria.js";
|
|
4
|
+
import { c as l } from "./class-names.js";
|
|
5
|
+
import { r as i } from "./ref.js";
|
|
6
|
+
import { w as d } from "./when.js";
|
|
7
|
+
import { O as s } from "./aria.js";
|
|
8
|
+
import { h as o } from "./vivid-element.js";
|
|
9
|
+
const $ = (a) => {
|
|
10
|
+
const e = a.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
|
|
11
|
+
return Math.max(
|
|
12
|
+
0,
|
|
13
|
+
// Number of digits right of decimal point.
|
|
14
|
+
(e[1] ? e[1].length : 0) - // Adjust for scientific notation.
|
|
15
|
+
(e[2] ? +e[2] : 0)
|
|
16
|
+
);
|
|
17
|
+
}, w = (a, e) => {
|
|
18
|
+
const t = $(e), r = Math.pow(10, t), c = Math.round(a / e) * e;
|
|
19
|
+
return Math.round(c * r) / r;
|
|
20
|
+
}, v = (a) => a > 0 ? a : 1, y = {
|
|
21
|
+
fromView(a) {
|
|
22
|
+
const e = Number(a);
|
|
23
|
+
return v(e);
|
|
24
|
+
},
|
|
25
|
+
toView(a) {
|
|
26
|
+
return a.toString();
|
|
27
|
+
}
|
|
28
|
+
}, O = (a, e, t) => a + (e - a) * t, F = (a, e, t) => m(0, 1, (t - a) / (e - a)), h = ({ disabled: a, connotation: e }) => l(
|
|
29
|
+
"control",
|
|
30
|
+
["disabled", !!a],
|
|
31
|
+
[`connotation-${e}`, !!e]
|
|
32
|
+
), g = ({ _focusVisible: a }) => l("thumb-container", ["focus-visible", a]), f = (a, e) => {
|
|
33
|
+
const t = a ? ["right", "center", "", "100% repeat-x"] : ["bottom", "top", "100%", "repeat-y"];
|
|
34
|
+
return o` <div
|
|
35
|
+
class="mark"
|
|
36
|
+
style="
|
|
37
|
+
background: linear-gradient(to ${t[0]}, currentcolor 1px, transparent 0px)
|
|
38
|
+
0px ${t[1]} / ${t[2]} calc((100% - 1px) / ${e}) ${t[3]}
|
|
39
|
+
"
|
|
40
|
+
></div>`;
|
|
41
|
+
}, z = (a) => {
|
|
42
|
+
const e = a.tagFor(u);
|
|
43
|
+
return o`<template
|
|
44
|
+
@focusin="${(t) => t._onFocusIn()}"
|
|
45
|
+
@focusout="${(t) => t._onFocusOut()}"
|
|
46
|
+
>
|
|
47
|
+
<div
|
|
48
|
+
tabindex="${(t) => t.disabled ? null : 0}"
|
|
49
|
+
class="${h} ${(t) => t.orientation}"
|
|
50
|
+
${p({
|
|
51
|
+
role: "slider",
|
|
52
|
+
ariaValueText: (t) => t.ariaValueText || t.valueTextFormatter(t.value),
|
|
53
|
+
ariaValueNow: (t) => t.value,
|
|
54
|
+
ariaValueMin: (t) => t.min,
|
|
55
|
+
ariaValueMax: (t) => t.max,
|
|
56
|
+
ariaDisabled: (t) => t.disabled ? "true" : null,
|
|
57
|
+
ariaOrientation: (t) => t.orientation
|
|
58
|
+
})}
|
|
59
|
+
>
|
|
60
|
+
<div class="positioning-region">
|
|
61
|
+
<div ${i("track")} class="track">
|
|
62
|
+
${(t) => t.markers ? f(
|
|
63
|
+
t.orientation === s.horizontal,
|
|
64
|
+
Math.floor((t.max - t.min) / t.step)
|
|
65
|
+
) : void 0}
|
|
66
|
+
<div class="track-start" style="${(t) => t.position}"></div>
|
|
67
|
+
</div>
|
|
68
|
+
<div
|
|
69
|
+
${i("thumb")}
|
|
70
|
+
class="${(t) => g(t)}"
|
|
71
|
+
style="${(t) => t.position}"
|
|
72
|
+
></div>
|
|
73
|
+
${d(
|
|
74
|
+
(t) => t.pin,
|
|
75
|
+
o`<${e}
|
|
76
|
+
class="popup"
|
|
77
|
+
arrow
|
|
78
|
+
alternate
|
|
79
|
+
:anchor="${(t) => t.thumb}"
|
|
80
|
+
:open=${(t) => t._isThumbPopupOpen}
|
|
81
|
+
:placementStrategy=${(t) => t.orientation === s.horizontal ? n.AutoPlacementHorizontal : n.AutoPlacementVertical}
|
|
82
|
+
animation-frame
|
|
83
|
+
exportparts="vvd-theme-alternate"
|
|
84
|
+
aria-hidden="true"
|
|
85
|
+
>
|
|
86
|
+
<div class="tooltip">${(t) => t.ariaValueText || t.valueTextFormatter(t.value)}</div>
|
|
87
|
+
</${e}>`
|
|
88
|
+
)}
|
|
89
|
+
</div>
|
|
90
|
+
</div></template
|
|
91
|
+
>`;
|
|
92
|
+
};
|
|
93
|
+
export {
|
|
94
|
+
z as S,
|
|
95
|
+
y as d,
|
|
96
|
+
f as g,
|
|
97
|
+
F as i,
|
|
98
|
+
O as l,
|
|
99
|
+
w as r
|
|
100
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("./vivid-element.cjs");function r(e){return e?function(t,s,i){return t.nodeType===1&&t.matches(e)}:function(t,s,i){return t.nodeType===1}}class n{constructor(t,s){this.target=t,this.options=s,this.source=null}bind(t){const s=this.options.property;this.shouldUpdate=o.Observable.getAccessors(t).some(i=>i.name===s),this.source=t,this.updateTarget(this.computeNodes()),this.shouldUpdate&&this.observe()}unbind(){this.updateTarget(o.emptyArray),this.source=null,this.shouldUpdate&&this.disconnect()}handleEvent(){this.updateTarget(this.computeNodes())}computeNodes(){let t=this.getNodes();return this.options.filter!==void 0&&(t=t.filter(this.options.filter)),t}updateTarget(t){this.source[this.options.property]=t}}class d extends n{constructor(t,s){super(t,s)}observe(){this.target.addEventListener("slotchange",this)}disconnect(){this.target.removeEventListener("slotchange",this)}getNodes(){return this.target.assignedNodes(this.options)}}function h(e){return typeof e=="string"&&(e={property:e}),new o.AttachedBehaviorHTMLDirective("fast-slotted",d,e)}exports.NodeObservationBehavior=n;exports.elements=r;exports.slotted=h;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { O as o, e as n, A as r } from "./vivid-element.js";
|
|
2
|
+
function u(e) {
|
|
3
|
+
return e ? function(t, s, i) {
|
|
4
|
+
return t.nodeType === 1 && t.matches(e);
|
|
5
|
+
} : function(t, s, i) {
|
|
6
|
+
return t.nodeType === 1;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
class a {
|
|
10
|
+
/**
|
|
11
|
+
* Creates an instance of NodeObservationBehavior.
|
|
12
|
+
* @param target - The target to assign the nodes property on.
|
|
13
|
+
* @param options - The options to use in configuring node observation.
|
|
14
|
+
*/
|
|
15
|
+
constructor(t, s) {
|
|
16
|
+
this.target = t, this.options = s, this.source = null;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Bind this behavior to the source.
|
|
20
|
+
* @param source - The source to bind to.
|
|
21
|
+
* @param context - The execution context that the binding is operating within.
|
|
22
|
+
*/
|
|
23
|
+
bind(t) {
|
|
24
|
+
const s = this.options.property;
|
|
25
|
+
this.shouldUpdate = o.getAccessors(t).some((i) => i.name === s), this.source = t, this.updateTarget(this.computeNodes()), this.shouldUpdate && this.observe();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Unbinds this behavior from the source.
|
|
29
|
+
* @param source - The source to unbind from.
|
|
30
|
+
*/
|
|
31
|
+
unbind() {
|
|
32
|
+
this.updateTarget(n), this.source = null, this.shouldUpdate && this.disconnect();
|
|
33
|
+
}
|
|
34
|
+
/** @internal */
|
|
35
|
+
handleEvent() {
|
|
36
|
+
this.updateTarget(this.computeNodes());
|
|
37
|
+
}
|
|
38
|
+
computeNodes() {
|
|
39
|
+
let t = this.getNodes();
|
|
40
|
+
return this.options.filter !== void 0 && (t = t.filter(this.options.filter)), t;
|
|
41
|
+
}
|
|
42
|
+
updateTarget(t) {
|
|
43
|
+
this.source[this.options.property] = t;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
class h extends a {
|
|
47
|
+
/**
|
|
48
|
+
* Creates an instance of SlottedBehavior.
|
|
49
|
+
* @param target - The slot element target to observe.
|
|
50
|
+
* @param options - The options to use when observing the slot.
|
|
51
|
+
*/
|
|
52
|
+
constructor(t, s) {
|
|
53
|
+
super(t, s);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Begins observation of the nodes.
|
|
57
|
+
*/
|
|
58
|
+
observe() {
|
|
59
|
+
this.target.addEventListener("slotchange", this);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Disconnects observation of the nodes.
|
|
63
|
+
*/
|
|
64
|
+
disconnect() {
|
|
65
|
+
this.target.removeEventListener("slotchange", this);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Retrieves the nodes that should be assigned to the target.
|
|
69
|
+
*/
|
|
70
|
+
getNodes() {
|
|
71
|
+
return this.target.assignedNodes(this.options);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function c(e) {
|
|
75
|
+
return typeof e == "string" && (e = { property: e }), new r("fast-slotted", h, e);
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
a as N,
|
|
79
|
+
u as e,
|
|
80
|
+
c as s
|
|
81
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";let e=0;function n(u=""){return`${u}${e++}`}exports.uniqueId=n;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e='.label-suffix{display:flex;align-items:center;gap:var(--label-suffix-gap, 8px);grid-column-end:-1;grid-row:1}.label-suffix[hidden]{display:none}slot[name=contextual-help]::slotted([data-vvd-component=contextual-help]){grid-column-end:-1;grid-row:1}:host{display:inline-block}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-500)}.base.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-700)}.base:hover:where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-700)}.base.hover:where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.base:disabled.appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.base.disabled.appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.readonly:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: var(--vvd-color-neutral-400)}.base.readonly:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-600);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.error:where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: var(--vvd-color-alert-500)}.base.error:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: transparent}.base.success:where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: var(--vvd-color-success-500)}.base.success:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: transparent}.base{--_connotation-color-primary: var(--vvd-text-field-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-text-field-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-field-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-intermediate: var(--vvd-text-field-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-firm: var(--vvd-text-field-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-fierce: var(--vvd-text-field-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-faint: var(--vvd-text-field-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-text-field-accent-soft, var(--vvd-color-neutral-100))}.base{--_text-field-gutter-start: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_text-field-gutter-end: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_text-field-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_text-field-border-radius: 8px;--_text-field-pill-border-radius: 24px;display:inline-grid;width:100%;align-items:center;gap:4px;grid-template-columns:min-content 1fr max-content}.base.size-condensed{--_text-field-gutter-start: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-gutter-end: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-icon-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-block-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_text-field-border-radius: 4px}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){--_low-ink-color: var(--vvd-color-neutral-600)}.base.disabled{--_low-ink-color: var(--_appearance-color-text)}.label:not(slot),.label::slotted(label){box-sizing:initial!important;padding:initial!important;margin:initial!important;color:var(--vvd-color-canvas-text)!important;contain:inline-size!important;font:var(--vvd-typography-base);grid-column:1/4;grid-row:1}.char-count+.label:not(slot),.char-count+.label::slotted(label){grid-column:1/3}.char-count{color:var(--_low-ink-color);font:var(--vvd-typography-base)}.fieldset{position:relative;display:flex;align-items:center;background-color:var(--_appearance-color-fill);font:var(--vvd-typography-base);grid-column:1/4;padding-block:0;transition:color .2s,background-color .2s}.fieldset:after{position:absolute;display:block;border-radius:inherit;block-size:100%;box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);content:"";inline-size:100%;pointer-events:none;transition:box-shadow .2s}.fieldset:focus-visible{outline:none}.base>.fieldset{block-size:var(--_text-field-block-size)}.base:not(.shape-pill) .fieldset{border-radius:var(--_text-field-border-radius)}.base.shape-pill .fieldset{border-radius:var(--_text-field-pill-border-radius)}.wrapper{border-radius:inherit;block-size:100%;inline-size:100%}.control{border-radius:inherit;text-align:start}.control:not(slot),.control::slotted(input){width:100%!important;box-sizing:border-box!important;border:0 none!important;border-radius:inherit!important;margin:initial!important;appearance:none!important;background-color:transparent!important;block-size:100%!important;color:inherit!important;font:inherit;outline:transparent;padding-block:0!important;padding-inline:var(--_text-field-gutter-start) var(--_text-field-gutter-end)!important;text-align:inherit}.control:not(slot):disabled,.control::slotted(input:disabled){cursor:not-allowed!important;opacity:1!important;-webkit-text-fill-color:var(--_appearance-color-text)!important}.control:not(slot)::placeholder{opacity:1!important;-webkit-text-fill-color:var(--_low-ink-color)!important}.control::slotted(input:-webkit-autofill),.control:not(slot):-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--_appearance-color-fill) inset;-webkit-text-fill-color:var(--_appearance-color-text)!important}.has-icon .control:not(slot),.has-icon .control::slotted(input){padding-inline-start:calc(var(--_text-field-icon-size) + var(--_text-field-gutter-start) * 2)!important}.icon{position:absolute;z-index:1;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);inset-block-start:50%;inset-inline-start:calc(100% + var(--_text-field-gutter-start));line-height:1;transform:translateY(-50%)}.leading-items-wrapper{position:relative}.base.no-leading .leading-items-wrapper{display:none}.action-items-wrapper{margin-inline-end:4px}.base:not(.action-items) .action-items-wrapper{display:none}@supports selector(:has(*)){.base:not(.has-activedescendant) .fieldset:has(.wrapper .control:focus-within):after{--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}}@supports not selector(:has(*)){.base:not(.has-activedescendant) .wrapper:focus-within:after{box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px));--focus-stroke-gap-color: transparent;position:absolute;z-index:1;display:block;border-radius:inherit;content:"";inset:0;pointer-events:none}}:host([internal-part]) .fieldset{background-color:transparent;font:var(--vvd-typography-heading-4);line-height:1.1}:host([internal-part]) .fieldset:not(:focus-within):after{block-size:1px;inset-block-end:0}@supports selector(:has(*)){:host([internal-part]) .fieldset:has(.action-items-wrapper:focus-within):after{block-size:1px;inset-block-end:0}}:host([internal-part]) .control{text-align:center}slot[name=_mirrored-helper-text]{display:none}';exports.styles=e;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const e = '.label-suffix{display:flex;align-items:center;gap:var(--label-suffix-gap, 8px);grid-column-end:-1;grid-row:1}.label-suffix[hidden]{display:none}slot[name=contextual-help]::slotted([data-vvd-component=contextual-help]){grid-column-end:-1;grid-row:1}:host{display:inline-block}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-500)}.base.appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-700)}.base:hover:where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-700)}.base.hover:where(:not(.disabled,:disabled,.readonly)).appearance-ghost{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.base:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.base:disabled.appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.base.disabled.appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.readonly:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: var(--vvd-color-neutral-400)}.base.readonly:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: var(--vvd-color-neutral-600);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.error:where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: var(--vvd-color-alert-500)}.base.error:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-alert-50);--_appearance-color-outline: transparent}.base.success:where(:not(.disabled,:disabled)){--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: var(--vvd-color-success-500)}.base.success:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text: notSet;--_appearance-color-fill: var(--vvd-color-success-50);--_appearance-color-outline: transparent}.base{--_connotation-color-primary: var(--vvd-text-field-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-text-field-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-text-field-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-intermediate: var(--vvd-text-field-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-firm: var(--vvd-text-field-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-fierce: var(--vvd-text-field-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-faint: var(--vvd-text-field-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-text-field-accent-soft, var(--vvd-color-neutral-100))}.base{--_text-field-gutter-start: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_text-field-gutter-end: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))*.4) ;--_text-field-icon-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-block-size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_text-field-border-radius: 8px;--_text-field-pill-border-radius: 24px;display:inline-grid;width:100%;align-items:center;gap:4px;grid-template-columns:min-content 1fr max-content}.base.size-condensed{--_text-field-gutter-start: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-gutter-end: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-icon-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))/2) ;--_text-field-block-size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) ;--_text-field-border-radius: 4px}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){--_low-ink-color: var(--vvd-color-neutral-600)}.base.disabled{--_low-ink-color: var(--_appearance-color-text)}.label:not(slot),.label::slotted(label){box-sizing:initial!important;padding:initial!important;margin:initial!important;color:var(--vvd-color-canvas-text)!important;contain:inline-size!important;font:var(--vvd-typography-base);grid-column:1/4;grid-row:1}.char-count+.label:not(slot),.char-count+.label::slotted(label){grid-column:1/3}.char-count{color:var(--_low-ink-color);font:var(--vvd-typography-base)}.fieldset{position:relative;display:flex;align-items:center;background-color:var(--_appearance-color-fill);font:var(--vvd-typography-base);grid-column:1/4;padding-block:0;transition:color .2s,background-color .2s}.fieldset:after{position:absolute;display:block;border-radius:inherit;block-size:100%;box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);content:"";inline-size:100%;pointer-events:none;transition:box-shadow .2s}.fieldset:focus-visible{outline:none}.base>.fieldset{block-size:var(--_text-field-block-size)}.base:not(.shape-pill) .fieldset{border-radius:var(--_text-field-border-radius)}.base.shape-pill .fieldset{border-radius:var(--_text-field-pill-border-radius)}.wrapper{border-radius:inherit;block-size:100%;inline-size:100%}.control{border-radius:inherit;text-align:start}.control:not(slot),.control::slotted(input){width:100%!important;box-sizing:border-box!important;border:0 none!important;border-radius:inherit!important;margin:initial!important;appearance:none!important;background-color:transparent!important;block-size:100%!important;color:inherit!important;font:inherit;outline:transparent;padding-block:0!important;padding-inline:var(--_text-field-gutter-start) var(--_text-field-gutter-end)!important;text-align:inherit}.control:not(slot):disabled,.control::slotted(input:disabled){cursor:not-allowed!important;opacity:1!important;-webkit-text-fill-color:var(--_appearance-color-text)!important}.control:not(slot)::placeholder{opacity:1!important;-webkit-text-fill-color:var(--_low-ink-color)!important}.control::slotted(input:-webkit-autofill),.control:not(slot):-webkit-autofill{-webkit-box-shadow:0 0 0 1000px var(--_appearance-color-fill) inset;-webkit-text-fill-color:var(--_appearance-color-text)!important}.has-icon .control:not(slot),.has-icon .control::slotted(input){padding-inline-start:calc(var(--_text-field-icon-size) + var(--_text-field-gutter-start) * 2)!important}.icon{position:absolute;z-index:1;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);inset-block-start:50%;inset-inline-start:calc(100% + var(--_text-field-gutter-start));line-height:1;transform:translateY(-50%)}.leading-items-wrapper{position:relative}.base.no-leading .leading-items-wrapper{display:none}.action-items-wrapper{margin-inline-end:4px}.base:not(.action-items) .action-items-wrapper{display:none}@supports selector(:has(*)){.base:not(.has-activedescendant) .fieldset:has(.wrapper .control:focus-within):after{--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}}@supports not selector(:has(*)){.base:not(.has-activedescendant) .wrapper:focus-within:after{box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px));--focus-stroke-gap-color: transparent;position:absolute;z-index:1;display:block;border-radius:inherit;content:"";inset:0;pointer-events:none}}:host([internal-part]) .fieldset{background-color:transparent;font:var(--vvd-typography-heading-4);line-height:1.1}:host([internal-part]) .fieldset:not(:focus-within):after{block-size:1px;inset-block-end:0}@supports selector(:has(*)){:host([internal-part]) .fieldset:has(.action-items-wrapper:focus-within):after{block-size:1px;inset-block-end:0}}:host([internal-part]) .control{text-align:center}slot[name=_mirrored-helper-text]{display:none}';
|
|
2
|
+
export {
|
|
3
|
+
e as s
|
|
4
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";const l=require("./vivid-element.cjs"),O=require("./picker-field.template.cjs"),D=require("./single-value-picker.cjs"),N=require("./scrollIntoView.cjs"),C=require("./when.cjs"),H=require("./repeat.cjs"),R=require("./class-names.cjs"),j=require("./localized.cjs"),z=require("./ref.cjs"),S=e=>{const t=e.split(":");if(t.length!==3)return!1;const[o,i,r]=t;if(o.length!==2||i.length!==2||r.length!==2)return!1;const n=parseInt(o,10),s=parseInt(i,10),a=parseInt(r,10);return!(isNaN(n)||isNaN(s)||isNaN(a)||n<0||n>23||s<0||s>59||a<0||a>59)},g=e=>Number.parseInt(e,10),m=e=>e.toString().padStart(2,"0"),c=e=>{const[t,o,i]=e.split(":"),r=g(t),n=g(o),s=g(i);return{hourStr:t,hours:r,minuteStr:o,minutes:n,secondStr:i,seconds:s,meridiem:r<12?"AM":"PM"}},B=(e,t)=>e>t?1:e<t?-1:0,V=e=>e%12||12,U=(e,t)=>e==="AM"&&t<12||e==="PM"&&t>=12,W=(e,t,o)=>{const i=[],r=e?c(e).hours:0,n=t?c(t).hours:23;for(let s=r;s<=n;s++)o&&!U(o,s)||i.push({value:m(s),label:m(o?V(s):s)});return i},K=(e,t,o,i)=>{const r=[];let n=0,s=59;if(o){const{hourStr:a,minutes:p}=c(o);t&&c(t).hourStr===a&&(n=p)}if(i){const{hourStr:a,minutes:p}=c(i);t&&c(t).hourStr===a&&(s=p)}for(let a=n;a<=s;a+=Math.max(1,e??1)){const p=m(a);r.push({value:p,label:p})}return r},G=(e,t,o,i)=>{const r=[];let n=0,s=59;if(o){const a=c(o);t&&(c(t).hourStr===a.hourStr&&c(t).minuteStr)===a.minuteStr&&(n=a.seconds)}if(i){const a=c(i);t&&(c(t).hourStr===a.hourStr&&c(t).minuteStr)===a.minuteStr&&(s=a.seconds)}for(let a=n;a<=s;a+=Math.max(1,e)){const p=m(a);r.push({value:p,label:p})}return r},J=(e,t)=>{const o=[];return(e?c(e).meridiem==="PM":!1)||o.push({value:"AM",label:"AM"}),(t?c(t).meridiem==="AM":!1)||o.push({value:"PM",label:"PM"}),o},P={id:"hours",getLabel:e=>e.locale.timePicker.hoursLabel,getOptions:e=>W(e.min,e.max,e.clock==="12h"?f.getSelectedOptionValue(e)??f.getOptions(e)[0].value:void 0),getSelectedOptionValue:e=>e.value?c(e.value).hourStr:void 0,updatedValue:(e,t)=>{if(e.value){const{minuteStr:o,secondStr:i}=c(e.value);return`${t}:${o}:${i}`}else return`${t}:00:00`}},w={id:"minutes",getLabel:e=>e.locale.timePicker.minutesLabel,getOptions:e=>K(e.minutesStep,e.value,e.min,e.max),getSelectedOptionValue:e=>e.value?c(e.value).minuteStr:void 0,updatedValue:(e,t)=>{if(e.value){const{hourStr:o,secondStr:i}=c(e.value);return`${o}:${t}:${i}`}else return`00:${t}:00`}},x={id:"seconds",getLabel:e=>e.locale.timePicker.secondsLabel,getOptions:e=>G(e.secondsStep,e.value,e.min,e.max),getSelectedOptionValue:e=>e.value?c(e.value).secondStr:void 0,updatedValue:(e,t)=>{if(e.value){const{hourStr:o,minuteStr:i}=c(e.value);return`${o}:${i}:${t}`}else return`00:00:${t}`}},f={id:"meridies",getLabel:e=>e.locale.timePicker.meridiesLabel,getOptions:e=>J(e.min,e.max),getSelectedOptionValue:e=>e.value?c(e.value).meridiem:void 0,updatedValue:(e,t)=>{if(e.value){const{hours:o,minuteStr:i,secondStr:r}=c(e.value);let n=o;return t==="AM"&&o>=12?n-=12:t==="PM"&&o<12&&(n+=12),`${m(n)}:${i}:${r}`}else return t==="AM"?"00:00:00":"12:00:00"}},M=e=>e.secondsStep!==void 0,E=e=>e.clock==="12h",Q=(e,t,o)=>{I(e,t.updatedValue(e,o)),h(e,t.id,o,"start");const n=e.shadowRoot.querySelector(`#${t.id}`)?.closest(".picker-wrapper")?.nextElementSibling?.querySelector(".picker");n?n.focus():e.$emit("last-column-selected",void 0,{bubbles:!1})},X=(e,t,o)=>{const i=t.getOptions(e),r=t.getSelectedOptionValue(e),n={ArrowUp:-1,ArrowDown:1}[o.key];if(n){o.preventDefault();const s=i.findIndex(k=>k.value===r),p=((s===-1?0:s+n)+i.length)%i.length,d=i[p].value;I(e,t.updatedValue(e,d)),h(e,t.id,d,"nearest"),e._clearFocusedClasses()}return!0},h=(e,t,o,i)=>{const r=e.shadowRoot.querySelector(`#${t}-${o}`);r&&N.scrollIntoView(r,r.parentElement,i)},Y=(e,t)=>{if(t.key==="Tab"){const o=e.shadowRoot.querySelectorAll(".picker"),i=t.shiftKey?o[0]:o[o.length-1];e.shadowRoot.activeElement!==i&&O.ignoreEventInFocusTraps(t),e._applyFocusedClass()}return!0},I=(e,t)=>{e.$emit("change",t,{bubbles:!1,composed:!1})},_=e=>l.html`<div class="picker-wrapper">
|
|
2
|
+
<ul
|
|
3
|
+
id="${e.id}"
|
|
4
|
+
class="picker"
|
|
5
|
+
role="listbox"
|
|
6
|
+
tabindex="0"
|
|
7
|
+
aria-label="${e.getLabel}"
|
|
8
|
+
aria-activedescendant="${t=>e.getSelectedOptionValue(t)?`${e.id}-${e.getSelectedOptionValue(t)}`:void 0}"
|
|
9
|
+
@keydown="${(t,o)=>X(t,e,o.event)}"
|
|
10
|
+
>
|
|
11
|
+
${H.repeat(t=>e.getOptions(t),l.html`<li
|
|
12
|
+
id="${t=>`${e.id}-${t.value}`}"
|
|
13
|
+
class="${(t,o)=>R.classNames("option",["selected",e.getSelectedOptionValue(o.parent)===t.value])}"
|
|
14
|
+
aria-selected="${(t,o)=>e.getSelectedOptionValue(o.parent)===t.value}"
|
|
15
|
+
role="option"
|
|
16
|
+
@click="${(t,o)=>Q(o.parent,e,t.value)}"
|
|
17
|
+
>
|
|
18
|
+
${t=>t.label}
|
|
19
|
+
</li>`)}
|
|
20
|
+
</ul>
|
|
21
|
+
</div>`,Z=()=>l.html`<div
|
|
22
|
+
class="time-pickers"
|
|
23
|
+
@keydown="${(e,{event:t})=>Y(e,t)}"
|
|
24
|
+
@focusout="${e=>e._onFocusOut()}"
|
|
25
|
+
@pointerdown="${e=>e._onPointerDown()}"
|
|
26
|
+
>
|
|
27
|
+
${_(P)} ${_(w)}
|
|
28
|
+
${C.when(M,_(x))}
|
|
29
|
+
${C.when(E,_(f))}
|
|
30
|
+
</div>`;var ee=Object.defineProperty,v=(e,t,o,i)=>{for(var r=void 0,n=e.length-1,s;n>=0;n--)(s=e[n])&&(r=s(t,o,r)||r);return r&&ee(t,o,r),r};class u extends j.Localized(l.VividElement){constructor(){super(...arguments),this.minutesStep=1,this.clock="24h",this.focusedPickerClass="focused",this._onFocusOut=()=>{this._clearFocusedClasses()},this._onPointerDown=()=>{this._clearFocusedClasses()}}valueChanged(t,o){o!==void 0&&!S(o)&&(this.value=void 0)}scrollSelectedOptionsToTop(){P.getSelectedOptionValue(this)&&h(this,"hours",P.getSelectedOptionValue(this),"start"),w.getSelectedOptionValue(this)&&h(this,"minutes",w.getSelectedOptionValue(this),"start"),M(this)&&x.getSelectedOptionValue(this)&&h(this,"seconds",x.getSelectedOptionValue(this),"start"),E(this)&&f.getSelectedOptionValue(this)&&h(this,"meridies",f.getSelectedOptionValue(this),"start")}focus(t){this.shadowRoot.querySelector(".picker").focus(t),this._applyFocusedClass()}_applyFocusedClass(){const t=this.shadowRoot.querySelectorAll(".picker");requestAnimationFrame(()=>{const o=this.shadowRoot.activeElement;t.forEach(i=>{i===o?i.parentElement?.classList.add(this.focusedPickerClass):i.parentElement?.classList.remove(this.focusedPickerClass)})})}_clearFocusedClasses(){this.shadowRoot.querySelectorAll(".picker").forEach(o=>{o.parentElement?.classList.remove(this.focusedPickerClass)})}}v([l.observable],u.prototype,"value");v([l.observable],u.prototype,"minutesStep");v([l.observable],u.prototype,"secondsStep");v([l.observable],u.prototype,"clock");v([l.observable],u.prototype,"min");v([l.observable],u.prototype,"max");const te=':host{display:inline-block}.time-pickers{display:flex;overflow:hidden;justify-content:center;padding:4px;block-size:calc(28px * var(--_inline-time-picker-num-options-visible) + 4px * (var(--_inline-time-picker-num-options-visible) - 1));gap:4px}.time-pickers .picker-wrapper{position:relative;display:flex;flex-direction:column;border-radius:4px}.time-pickers .picker-wrapper.focused:has(.picker:focus-visible){--focus-stroke-gap-color: transparent;--focus-inset: -2px;box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}.time-pickers .picker{position:relative;display:flex;overflow:hidden scroll;flex-direction:column;padding:0 4px;border-radius:4px;margin:0 -4px;gap:4px;inline-size:50px;list-style:none;scrollbar-width:none}@media (hover: hover){.time-pickers .picker:hover{scrollbar-width:auto}}.time-pickers .picker:after{display:block;flex-shrink:0;block-size:calc(28px * (var(--_inline-time-picker-num-options-visible) - 1) + 4px * (var(--_inline-time-picker-num-options-visible) - 1 - 1));content:""}.time-pickers .picker:focus-visible{outline:none}.time-pickers .option{--_connotation-color-primary: var(--vvd-time-picker-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-firm: var(--vvd-time-picker-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-time-picker-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-time-picker-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-time-picker-accent-dim, var(--vvd-color-neutral-200));--_connotation-color-pale: var(--vvd-time-picker-accent-pale, var(--vvd-color-neutral-300))}.time-pickers .option{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.time-pickers .option:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.time-pickers .option.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.time-pickers .option:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .option.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .option.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}@media (hover: hover){.time-pickers .option.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}}.time-pickers .option.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.time-pickers .option.selected:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}.time-pickers .option.selected.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}.time-pickers .option{display:flex;flex-shrink:0;align-items:center;justify-content:center;border-radius:4px;background-color:var(--_appearance-color-fill);block-size:28px;color:var(--_appearance-color-text);cursor:pointer;font:var(--vvd-typography-base);inline-size:50px}.time-pickers .picker-wrapper:not(.focused) .picker:focus-visible .option.selected{--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}',oe=l.defineVividComponent("inline-time-picker",u,Z,[],{styles:te,shadowOptions:{delegatesFocus:!0}}),L=(e,t,o)=>{const i=c(e);let n=`${m(o?V(i.hours):i.hours)}:${i.minuteStr}`;return t&&(n+=`:${i.secondStr}`),o&&(n+=` ${i.meridiem}`),n},T=e=>e>="0"&&e<="9",F=(e,t)=>{const o=e.toLowerCase(),i=[];let r;for(let p=0;p<o.length;p++){const d=o[p];if(d==="a"&&o[p+1]==="m"&&(p++,r="AM"),d==="p"&&o[p+1]==="m"&&(p++,r="PM"),T(d)){let k=d;for(;T(o[p+1]);)p++,k+=o[p];i.push(Number.parseInt(k,10))}}if(i.length===0||i.length>3)throw new Error("Invalid time format");if(r&&(i[0]<1||i[0]>12))throw new Error("Invalid time format");(r||t)&&i[0]===12&&(i[0]=0),r==="PM"&&(i[0]=i[0]+12);const[n,s=0,a=0]=i;if(n>23||s>59||a>59)throw new Error("Invalid value");return[n,s,a].map(m).join(":")};var ie=Object.defineProperty,re=Object.getOwnPropertyDescriptor,b=(e,t,o,i)=>{for(var r=i>1?void 0:i?re(t,o):t,n=e.length-1,s;n>=0;n--)(s=e[n])&&(r=(i?s(t,o,r):s(r))||r);return i&&r&&ie(t,o,r),r};const q=e=>{class t extends e{constructor(){super(...arguments),this.minutesStep=null,this.secondsStep=null,this.#t={handleChange:()=>{this.value&&(this._presentationValue=this._toPresentationValue(this.value))}}}get _displaySeconds(){return this.secondsStep!==null}get _use12hClock(){return this.clock?this.clock==="12h":this.locale.timePicker.defaultTo12HourClock}get _timePlaceholder(){let i="hh:mm";return this._displaySeconds&&(i+=":ss"),this._use12hClock&&(i+=" aa"),i}#t;#e;#o(){this.#e=l.Observable.binding(()=>this._use12hClock,this.#t),this.#e.observe(this,l.defaultExecutionContext)}#i(){this.#e.disconnect()}connectedCallback(){super.connectedCallback(),this.#o()}disconnectedCallback(){super.disconnectedCallback(),this.#i()}_onPickerButtonClick(){super._onPickerButtonClick(),this._popupOpen&&(l.DOM.processUpdates(),this._inlineTimePickerEl.scrollSelectedOptionsToTop())}_onInlineTimePickerChange(i){this._updateValueDueToUserInteraction(this._withUpdatedTime(i.detail),!1)}_onInlineTimePickerLastColumnSelected(){this._closePopup()}}return b([l.attr({attribute:"minutes-step",converter:l.nullableNumberConverter})],t.prototype,"minutesStep",2),b([l.attr({attribute:"seconds-step",converter:l.nullableNumberConverter})],t.prototype,"secondsStep",2),b([l.attr],t.prototype,"clock",2),b([l.volatile],t.prototype,"_use12hClock",1),t};var ne=Object.defineProperty,A=(e,t,o,i)=>{for(var r=void 0,n=e.length-1,s;n>=0;n--)(s=e[n])&&(r=s(t,o,r)||r);return r&&ne(t,o,r),r};const y={fromView:e=>e&&S(e)?e:"",toView(e){return e}};class $ extends q(D.SingleValuePicker(O.PickerField)){constructor(){super(),this._isValidValue=S,this.min="",this.max="",this.proxy.type="time",this.proxy.step="1"}_toPresentationValue(t){return L(t,this._displaySeconds,this._use12hClock)}_parsePresentationValue(t){return F(t,this._use12hClock)}get _timeValue(){return this.value}_withUpdatedTime(t){return t}get _resolvedMinTime(){return this.min||null}get _resolvedMaxTime(){return this.max||null}minChanged(t,o){this.proxy instanceof HTMLInputElement&&(this.proxy.min=o,this.validate())}maxChanged(t,o){this.proxy instanceof HTMLInputElement&&(this.proxy.max=o,this.validate())}get _textFieldPlaceholder(){return this._timePlaceholder}get _pickerButtonIcon(){return"clock-line"}get _pickerButtonLabel(){return this.value?this.locale.timePicker.changeTimeLabel(this._toPresentationValue(this.value)):this.locale.timePicker.chooseTimeLabel}_onPickerButtonClick(){super._onPickerButtonClick(),this._popupOpen&&(l.DOM.processUpdates(),this._focusableElsWithinDialog()[0]?.focus())}get _dialogLabel(){return this.locale.timePicker.chooseTimeLabel}_focusableElsWithinDialog(){return this._dialogEl.querySelectorAll("#inline-time-picker, .vwc-button")}_getCustomValidationError(){return this._isPresentationValueInvalid()?this.locale.timePicker.invalidTimeError:null}}A([l.attr({converter:y})],$.prototype,"min");A([l.attr({converter:y})],$.prototype,"max");const se=(e,t)=>{const o=e.tagFor(u);return l.html`
|
|
31
|
+
<${o}
|
|
32
|
+
id='inline-time-picker'
|
|
33
|
+
${z.ref("_inlineTimePickerEl")}
|
|
34
|
+
style="--_inline-time-picker-num-options-visible: ${()=>t}"
|
|
35
|
+
tabindex='1'
|
|
36
|
+
:value='${i=>i._timeValue||void 0}'
|
|
37
|
+
:clock='${i=>i._use12hClock?"12h":"24h"}'
|
|
38
|
+
:min='${i=>i._resolvedMinTime||void 0}'
|
|
39
|
+
:max='${i=>i._resolvedMaxTime||void 0}'
|
|
40
|
+
:minutesStep='${i=>i.minutesStep??1}'
|
|
41
|
+
:secondsStep='${i=>i.secondsStep??void 0}'
|
|
42
|
+
@change='${(i,r)=>i._onInlineTimePickerChange(r.event)}'
|
|
43
|
+
@last-column-selected='${i=>i._onInlineTimePickerLastColumnSelected()}'
|
|
44
|
+
>
|
|
45
|
+
</${o}>
|
|
46
|
+
`};exports.TimePicker=$;exports.TimeSelectionPicker=q;exports.TimeSelectionPickerTemplate=se;exports.ValidTimeFilter=y;exports.compareTimeStr=B;exports.formatPresentationTime=L;exports.inlineTimePickerDefinition=oe;exports.isValidTimeStr=S;exports.parsePresentationTime=F;
|