@vonage/vivid 5.23.1 → 5.25.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/README.md +1 -1
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/accordion-item/index.cjs +1 -1
- package/accordion-item/index.js +1 -1
- package/audio-player/index.cjs +2 -2
- package/audio-player/index.js +3 -3
- package/avatar/index.cjs +10 -10
- package/avatar/index.js +4 -3
- package/badge/index.cjs +1 -1
- package/badge/index.js +1 -1
- package/breadcrumb-item/index.cjs +9 -5
- package/breadcrumb-item/index.js +11 -6
- package/bundled/affix.cjs +1 -1
- package/bundled/affix.js +1 -1
- package/bundled/definition10.cjs +2 -1
- package/bundled/definition10.js +3 -2
- package/bundled/definition11.cjs +4 -4
- package/bundled/definition11.js +4 -3
- package/bundled/definition12.cjs +1 -1
- package/bundled/definition12.js +1 -0
- package/bundled/definition15.cjs +8 -7
- package/bundled/definition15.js +27 -24
- package/bundled/definition17.cjs +7 -7
- package/bundled/definition17.js +22 -109
- package/bundled/definition18.cjs +12 -83
- package/bundled/definition18.js +20 -426
- package/bundled/definition19.cjs +87 -7
- package/bundled/definition19.js +433 -16
- package/bundled/definition20.cjs +7 -37
- package/bundled/definition20.js +17 -172
- package/bundled/definition21.cjs +35 -27
- package/bundled/definition21.js +155 -154
- package/bundled/definition22.cjs +29 -6
- package/bundled/definition22.js +172 -20
- package/bundled/definition23.cjs +6 -12
- package/bundled/definition23.js +17 -32
- package/bundled/definition24.cjs +12 -39
- package/bundled/definition24.js +33 -67
- package/bundled/definition25.cjs +44 -0
- package/bundled/definition25.js +81 -0
- package/bundled/definition3.cjs +5 -5
- package/bundled/definition3.js +10 -40
- package/bundled/definition4.cjs +6 -6
- package/bundled/definition4.js +4 -3
- package/bundled/definition6.cjs +11 -11
- package/bundled/definition6.js +4 -3
- package/bundled/definition9.cjs +12 -6
- package/bundled/definition9.js +66 -43
- package/bundled/extractOptions.cjs +1 -0
- package/bundled/extractOptions.js +11 -0
- package/bundled/icon.cjs +1 -0
- package/bundled/icon.js +34 -0
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +28 -12
- package/bundled/mixins.cjs +8 -8
- package/bundled/mixins.js +4 -3
- package/bundled/optgroup.cjs +1 -0
- package/bundled/optgroup.js +27 -0
- package/bundled/option.cjs +1 -0
- package/bundled/option.js +93 -0
- package/bundled/render-in-light-dom.cjs +1 -1
- package/bundled/render-in-light-dom.js +16 -19
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +9 -1
- package/card/index.cjs +22 -22
- package/card/index.js +4 -3
- package/color-picker/index.cjs +18 -18
- package/color-picker/index.js +4 -3
- package/combobox/definition.cjs +1 -1
- package/combobox/definition.js +1 -1
- package/combobox/index.cjs +7 -7
- package/combobox/index.js +31 -21
- package/country/definition.cjs +1 -1
- package/country/definition.js +1 -1
- package/country/index.cjs +1 -1
- package/country/index.js +1 -1
- package/country-group/definition.cjs +1 -1
- package/country-group/definition.js +1 -1
- package/country-group/index.cjs +1 -1
- package/country-group/index.js +2 -2
- package/custom-elements.json +8438 -7866
- package/data-grid/definition.cjs +1 -1
- package/data-grid/definition.js +1 -1
- package/data-grid/index.cjs +26 -26
- package/data-grid/index.js +9 -8
- package/date-picker/definition.cjs +1 -1
- package/date-picker/definition.js +1 -1
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +1 -1
- package/date-range-picker/definition.cjs +1 -1
- package/date-range-picker/definition.js +1 -1
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +1 -1
- package/date-time-picker/definition.cjs +1 -1
- package/date-time-picker/definition.js +1 -1
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +1 -1
- package/dial-pad/definition.cjs +1 -1
- package/dial-pad/definition.js +1 -1
- package/dial-pad/index.cjs +7 -7
- package/dial-pad/index.js +124 -54
- package/dialog/definition.cjs +1 -1
- package/dialog/definition.js +1 -1
- package/dialog/index.cjs +14 -14
- package/dialog/index.js +4 -3
- package/divider/definition.cjs +1 -1
- package/divider/definition.js +1 -1
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/empty-state/definition.cjs +1 -1
- package/empty-state/definition.js +1 -1
- package/empty-state/index.cjs +3 -3
- package/empty-state/index.js +4 -3
- package/fab/definition.cjs +1 -1
- package/fab/definition.js +1 -1
- package/file-picker/definition.cjs +1 -1
- package/file-picker/definition.js +1 -1
- package/file-picker/index.cjs +7 -7
- package/file-picker/index.js +4 -3
- package/flag/definition.cjs +1 -1
- package/flag/definition.js +1 -1
- package/header/definition.cjs +1 -1
- package/header/definition.js +1 -1
- package/header/index.cjs +3 -3
- package/header/index.js +3 -3
- package/icon/definition.cjs +2 -1
- package/icon/definition.js +2 -1
- package/index.cjs +209 -198
- package/index.js +59 -54
- package/kbd-key/definition.cjs +1 -1
- package/kbd-key/definition.js +1 -1
- package/kbd-shortcut/definition.cjs +1 -1
- package/kbd-shortcut/definition.js +1 -1
- package/layout/definition.cjs +1 -1
- package/layout/definition.js +1 -1
- package/lib/accordion-item/accordion-item.d.ts +3 -1
- package/lib/action-group/action-group.d.ts +1 -1
- package/lib/alert/alert.d.ts +2 -2
- package/lib/audio-player/audio-player.d.ts +1 -1
- package/lib/avatar/avatar.d.ts +1 -1
- package/lib/badge/badge.d.ts +1 -1
- package/lib/banner/banner.d.ts +3 -3
- package/lib/breadcrumb/breadcrumb.d.ts +1 -1
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/lib/button/button.d.ts +3 -3
- package/lib/calendar-event/calendar-event.d.ts +1 -1
- package/lib/card/card.d.ts +1 -1
- package/lib/checkbox/checkbox.d.ts +6 -6
- package/lib/color-picker/color-picker.d.ts +7 -7
- package/lib/combobox/combobox.d.ts +8 -8
- package/lib/components.d.ts +2 -0
- package/lib/country-group/country-group.d.ts +2 -2
- package/lib/data-grid/data-grid-cell.d.ts +4 -3
- package/lib/data-grid/data-grid-row.d.ts +3 -2
- package/lib/data-grid/data-grid.options.d.ts +5 -0
- package/lib/date-picker/date-picker.d.ts +8 -8
- package/lib/date-range-picker/date-range-picker.d.ts +4 -4
- package/lib/date-time-picker/date-time-picker.d.ts +8 -8
- package/lib/dial-pad/dial-pad.d.ts +2 -2
- package/lib/dialog/dialog.d.ts +2 -2
- package/lib/divider/divider.d.ts +1 -1
- package/lib/fab/fab.d.ts +1 -1
- package/lib/file-picker/file-picker.d.ts +7 -7
- package/lib/header/header.d.ts +1 -1
- package/lib/listbox/definition.d.ts +3 -0
- package/lib/listbox/index.d.ts +1 -0
- package/lib/listbox/listbox.d.ts +1302 -0
- package/lib/listbox/listbox.template.d.ts +3 -0
- package/lib/listbox/variations.browser-spec.d.ts +1 -0
- package/lib/menu/menu.d.ts +2 -3
- package/lib/menu-item/menu-item.d.ts +3 -3
- package/lib/nav/nav.d.ts +1 -1
- package/lib/nav-disclosure/nav-disclosure.d.ts +2 -2
- package/lib/nav-item/nav-item.d.ts +2 -2
- package/lib/note/note.d.ts +1 -1
- package/lib/number-field/number-field.d.ts +9 -10
- package/lib/optgroup/definition.d.ts +3 -0
- package/lib/optgroup/index.d.ts +1 -0
- package/lib/optgroup/optgroup.d.ts +430 -0
- package/lib/optgroup/optgroup.template.d.ts +2 -0
- package/lib/optgroup/variations.browser-spec.d.ts +1 -0
- package/lib/option/option.d.ts +2 -2
- package/lib/pagination/pagination.d.ts +1 -1
- package/lib/popover/popover.d.ts +2 -2
- package/lib/progress/progress.d.ts +1 -1
- package/lib/progress-ring/progress-ring.d.ts +1 -1
- package/lib/radio/radio.d.ts +3 -3
- package/lib/radio-group/radio-group.d.ts +1 -1
- package/lib/range-slider/range-slider.d.ts +3 -3
- package/lib/rich-text-editor/rich-text-editor.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/base.d.ts +1 -0
- package/lib/rich-text-editor/rte/utils/default-textblock.d.ts +2 -2
- package/lib/searchable-select/option-tag.d.ts +1 -1
- package/lib/searchable-select/searchable-select.d.ts +47 -47
- package/lib/select/select.d.ts +9 -9
- package/lib/selectable-box/selectable-box.d.ts +1 -1
- package/lib/simple-color-picker/simple-color-picker.d.ts +2 -2
- package/lib/slider/slider.d.ts +3 -3
- package/lib/split-button/split-button.d.ts +3 -3
- package/lib/status/status.d.ts +1 -1
- package/lib/switch/switch.d.ts +2 -2
- package/lib/tab/tab.d.ts +3 -3
- package/lib/tab-panel/tab-panel.d.ts +1 -1
- package/lib/table/table-cell.d.ts +1 -1
- package/lib/table/table-header-cell.d.ts +1 -1
- package/lib/table/table-row.d.ts +1 -1
- package/lib/table/table-sorting-button.d.ts +1 -1
- package/lib/tag/tag.d.ts +3 -3
- package/lib/tag-group/tag-group.d.ts +1 -1
- package/lib/tag-name-map.d.ts +3 -1
- package/lib/text-area/text-area.d.ts +8 -8
- package/lib/text-field/text-field.d.ts +10 -9
- package/lib/time-picker/time-picker.d.ts +4 -4
- package/lib/toggletip/toggletip.d.ts +3 -2
- package/lib/tooltip/tooltip.d.ts +3 -2
- package/lib/tree-item/tree-item.d.ts +2 -2
- package/lib/tree-view/tree-view.d.ts +1 -1
- package/lib/video-player/video-player.d.ts +1 -1
- package/listbox/definition.cjs +5 -0
- package/listbox/definition.js +2 -0
- package/listbox/index.cjs +11 -0
- package/listbox/index.js +540 -0
- package/menu/index.cjs +1 -1
- package/menu/index.js +1 -1
- package/menu-item/index.cjs +1 -1
- package/menu-item/index.js +1 -1
- package/nav/definition.cjs +1 -1
- package/nav/definition.js +1 -1
- package/nav-disclosure/definition.cjs +1 -1
- package/nav-disclosure/definition.js +1 -1
- package/nav-disclosure/index.cjs +4 -4
- package/nav-disclosure/index.js +4 -3
- package/nav-item/definition.cjs +1 -1
- package/nav-item/definition.js +1 -1
- package/note/definition.cjs +1 -1
- package/note/definition.js +1 -1
- package/number-field/definition.cjs +1 -1
- package/number-field/definition.js +1 -1
- package/number-field/index.cjs +1 -1
- package/number-field/index.js +1 -1
- package/optgroup/definition.cjs +6 -0
- package/optgroup/definition.js +3 -0
- package/optgroup/index.cjs +1 -0
- package/optgroup/index.js +4 -0
- package/option/definition.cjs +2 -1
- package/option/definition.js +2 -1
- package/package.json +9 -8
- package/pagination/definition.cjs +1 -1
- package/pagination/definition.js +1 -1
- package/platform-switch/definition.cjs +1 -1
- package/platform-switch/definition.js +1 -1
- package/popover/definition.cjs +1 -1
- package/popover/definition.js +1 -1
- package/popover/index.cjs +5 -5
- package/popover/index.js +4 -3
- package/progress/definition.cjs +1 -1
- package/progress/definition.js +1 -1
- package/radio/definition.cjs +1 -1
- package/radio/definition.js +1 -1
- package/radio-group/definition.cjs +1 -1
- package/radio-group/definition.js +1 -1
- package/range-slider/definition.cjs +1 -1
- package/range-slider/definition.js +1 -1
- package/rich-text-editor/definition.cjs +1 -1
- package/rich-text-editor/definition.js +1 -1
- package/rich-text-editor/index.cjs +13 -13
- package/rich-text-editor/index.js +26 -23
- package/rich-text-view/definition.cjs +1 -1
- package/rich-text-view/definition.js +1 -1
- package/searchable-select/definition.cjs +1 -1
- package/searchable-select/definition.js +1 -1
- package/searchable-select/index.cjs +23 -23
- package/searchable-select/index.js +67 -49
- package/select/definition.cjs +1 -1
- package/select/definition.js +1 -1
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +1 -1
- package/shared/aria/delegates-aria.d.ts +1 -1
- package/shared/aria/host-semantics.d.ts +1 -1
- package/shared/color-picker/base-color-picker.d.ts +1 -1
- package/shared/feedback/feedback-message.d.ts +1 -1
- package/shared/feedback/mixins.d.ts +2 -2
- package/shared/foundation/button/button.d.ts +2 -2
- package/shared/foundation/form-associated/form-associated.d.ts +2 -2
- package/shared/foundation/listbox/extractOptions.d.ts +2 -0
- package/shared/foundation/listbox/listbox.d.ts +2 -0
- package/shared/listbox/commands.d.ts +17 -0
- package/shared/listbox/move.d.ts +6 -0
- package/shared/listbox/options.d.ts +12 -0
- package/shared/listbox/selection.d.ts +28 -0
- package/shared/listbox/state.d.ts +26 -0
- package/shared/listbox/typeahead.d.ts +8 -0
- package/shared/listbox/with-options-filter.d.ts +440 -0
- package/shared/listbox/with-options.d.ts +862 -0
- package/shared/patterns/affix.d.ts +2 -2
- package/shared/patterns/anchored.d.ts +2 -2
- package/shared/patterns/char-count/char-count.d.ts +1 -1
- package/shared/patterns/form-elements/form-element.d.ts +1 -1
- package/shared/patterns/form-elements/with-contextual-help.d.ts +1 -1
- package/shared/patterns/form-elements/with-error-text.d.ts +1 -1
- package/shared/patterns/form-elements/with-success-text.d.ts +1 -1
- package/shared/patterns/kbd-shortcut.d.ts +1 -1
- package/shared/patterns/linkable.d.ts +1 -1
- package/shared/patterns/localized.d.ts +2 -2
- package/shared/patterns/trapped-focus.d.ts +1 -1
- package/shared/picker-field/mixins/calendar-picker.d.ts +2 -2
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +2 -2
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +1 -1
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +2 -2
- package/shared/picker-field/mixins/single-date-picker.d.ts +2 -2
- package/shared/picker-field/mixins/single-value-picker.d.ts +2 -2
- package/shared/picker-field/mixins/time-selection-picker.d.ts +2 -2
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +4 -4
- package/shared/picker-field/picker-field.d.ts +7 -7
- package/side-drawer/definition.cjs +1 -1
- package/side-drawer/definition.js +1 -1
- package/simple-color-picker/definition.cjs +1 -1
- package/simple-color-picker/definition.js +1 -1
- package/simple-color-picker/index.cjs +6 -6
- package/simple-color-picker/index.js +4 -3
- package/split-button/definition.cjs +1 -1
- package/split-button/definition.js +1 -1
- package/split-button/index.cjs +1 -0
- package/split-button/index.js +1 -0
- package/status/definition.cjs +1 -1
- package/status/definition.js +1 -1
- package/switch/definition.cjs +1 -1
- package/switch/definition.js +1 -1
- package/switch/index.cjs +6 -5
- package/switch/index.js +16 -14
- package/tab/definition.cjs +1 -1
- package/tab/definition.js +1 -1
- package/tab-panel/definition.cjs +1 -1
- package/tab-panel/definition.js +1 -1
- package/table/definition.cjs +1 -1
- package/table/definition.js +1 -1
- package/table/index.cjs +13 -13
- package/table/index.js +4 -3
- package/tabs/definition.cjs +1 -1
- package/tabs/definition.js +1 -1
- package/tag/definition.cjs +1 -1
- package/tag/definition.js +1 -1
- package/tag/index.cjs +11 -11
- package/tag/index.js +4 -3
- package/tag-group/definition.cjs +1 -1
- package/tag-group/definition.js +1 -1
- package/text-area/definition.cjs +1 -1
- package/text-area/definition.js +1 -1
- package/time-picker/definition.cjs +1 -1
- package/time-picker/definition.js +1 -1
- package/tree-item/definition.cjs +1 -1
- package/tree-item/definition.js +1 -1
- package/tree-view/definition.cjs +1 -1
- package/tree-view/definition.js +1 -1
- package/unbundled/affix.cjs +2 -2
- package/unbundled/affix.js +1 -1
- package/unbundled/base-progress.cjs +1 -1
- package/unbundled/base-progress.js +1 -1
- package/unbundled/button.cjs +2 -2
- package/unbundled/button.js +2 -2
- package/unbundled/definition.cjs +2 -65
- package/unbundled/definition.js +4 -61
- package/unbundled/definition11.cjs +4 -3
- package/unbundled/definition11.js +3 -2
- package/unbundled/definition12.cjs +3 -2
- package/unbundled/definition12.js +3 -2
- package/unbundled/definition13.cjs +1 -1
- package/unbundled/definition13.js +1 -1
- package/unbundled/definition14.cjs +2 -1
- package/unbundled/definition14.js +2 -1
- package/unbundled/definition17.cjs +9 -4
- package/unbundled/definition17.js +9 -4
- package/unbundled/definition2.cjs +14 -3
- package/unbundled/definition2.js +15 -4
- package/unbundled/definition21.cjs +2 -1
- package/unbundled/definition21.js +2 -1
- package/unbundled/definition23.cjs +3 -1
- package/unbundled/definition23.js +4 -2
- package/unbundled/definition24.cjs +6 -4
- package/unbundled/definition24.js +6 -4
- package/unbundled/definition25.cjs +2 -1
- package/unbundled/definition25.js +2 -1
- package/unbundled/definition26.cjs +7 -4
- package/unbundled/definition26.js +7 -4
- package/unbundled/definition27.cjs +39 -5
- package/unbundled/definition27.js +40 -6
- package/unbundled/definition28.cjs +4 -3
- package/unbundled/definition28.js +4 -3
- package/unbundled/definition29.cjs +5 -168
- package/unbundled/definition29.js +11 -162
- package/unbundled/definition30.cjs +26 -506
- package/unbundled/definition30.js +24 -498
- package/unbundled/definition31.cjs +503 -39
- package/unbundled/definition31.js +501 -37
- package/unbundled/definition32.cjs +39 -239
- package/unbundled/definition32.js +36 -236
- package/unbundled/definition33.cjs +236 -74
- package/unbundled/definition33.js +233 -71
- package/unbundled/definition34.cjs +74 -1968
- package/unbundled/definition34.js +70 -1940
- package/unbundled/definition35.cjs +1993 -26
- package/unbundled/definition35.js +1965 -27
- package/unbundled/definition36.cjs +26 -111
- package/unbundled/definition36.js +23 -103
- package/unbundled/definition37.cjs +53 -294
- package/unbundled/definition37.js +50 -291
- package/unbundled/definition38.cjs +282 -132
- package/unbundled/definition38.js +279 -129
- package/unbundled/definition39.cjs +165 -339
- package/unbundled/definition39.js +163 -337
- package/unbundled/definition40.cjs +395 -227
- package/unbundled/definition40.js +393 -225
- package/unbundled/definition41.cjs +269 -47
- package/unbundled/definition41.js +264 -42
- package/unbundled/definition42.cjs +48 -67
- package/unbundled/definition42.js +45 -64
- package/unbundled/definition43.cjs +56 -383
- package/unbundled/definition43.js +55 -382
- package/unbundled/definition44.cjs +387 -44
- package/unbundled/definition44.js +383 -40
- package/unbundled/definition45.cjs +53 -45
- package/unbundled/definition45.js +49 -41
- package/unbundled/definition46.cjs +40 -164
- package/unbundled/definition46.js +36 -160
- package/unbundled/definition47.cjs +171 -31
- package/unbundled/definition47.js +168 -22
- package/unbundled/definition48.cjs +30 -89
- package/unbundled/definition48.js +22 -87
- package/unbundled/definition49.cjs +589 -48
- package/unbundled/definition49.js +587 -47
- package/unbundled/definition50.cjs +90 -21
- package/unbundled/definition50.js +88 -16
- package/unbundled/definition51.cjs +47 -32
- package/unbundled/definition51.js +44 -29
- package/unbundled/definition52.cjs +22 -323
- package/unbundled/definition52.js +16 -320
- package/unbundled/definition53.cjs +33 -212
- package/unbundled/definition53.js +29 -208
- package/unbundled/definition54.cjs +318 -41
- package/unbundled/definition54.js +314 -37
- package/unbundled/definition55.cjs +199 -253
- package/unbundled/definition55.js +193 -247
- package/unbundled/definition56.cjs +45 -53
- package/unbundled/definition56.js +42 -49
- package/unbundled/definition57.cjs +255 -133
- package/unbundled/definition57.js +253 -128
- package/unbundled/definition58.cjs +49 -245
- package/unbundled/definition58.js +47 -244
- package/unbundled/definition59.cjs +127 -444
- package/unbundled/definition59.js +124 -444
- package/unbundled/definition6.cjs +2 -1
- package/unbundled/definition6.js +2 -1
- package/unbundled/definition60.cjs +230 -3746
- package/unbundled/definition60.js +223 -3576
- package/unbundled/definition61.cjs +427 -739
- package/unbundled/definition61.js +425 -737
- package/unbundled/definition62.cjs +3762 -103
- package/unbundled/definition62.js +3593 -97
- package/unbundled/definition63.cjs +678 -886
- package/unbundled/definition63.js +672 -877
- package/unbundled/definition64.cjs +104 -108
- package/unbundled/definition64.js +100 -104
- package/unbundled/definition65.cjs +999 -65
- package/unbundled/definition65.js +995 -58
- package/unbundled/definition66.cjs +105 -155
- package/unbundled/definition66.js +101 -151
- package/unbundled/definition67.cjs +71 -121
- package/unbundled/definition67.js +63 -119
- package/unbundled/definition68.cjs +162 -51
- package/unbundled/definition68.js +158 -47
- package/unbundled/definition69.cjs +117 -75
- package/unbundled/definition69.js +116 -71
- package/unbundled/definition70.cjs +59 -21
- package/unbundled/definition70.js +56 -15
- package/unbundled/definition71.cjs +80 -75
- package/unbundled/definition71.js +76 -74
- package/unbundled/definition72.cjs +20 -305
- package/unbundled/definition72.js +14 -230
- package/unbundled/definition73.cjs +75 -315
- package/unbundled/definition73.js +74 -307
- package/unbundled/definition74.cjs +308 -30
- package/unbundled/definition74.js +231 -24
- package/unbundled/definition75.cjs +314 -109
- package/unbundled/definition75.js +304 -106
- package/unbundled/definition76.cjs +26 -250
- package/unbundled/definition76.js +21 -246
- package/unbundled/definition77.cjs +133 -27
- package/unbundled/definition77.js +124 -25
- package/unbundled/definition78.cjs +230 -116
- package/unbundled/definition78.js +227 -107
- package/unbundled/definition79.cjs +28 -203
- package/unbundled/definition79.js +26 -193
- package/unbundled/definition80.cjs +126 -477
- package/unbundled/definition80.js +118 -473
- package/unbundled/definition81.cjs +221 -0
- package/unbundled/definition81.js +202 -0
- package/unbundled/definition82.cjs +517 -0
- package/unbundled/definition82.js +497 -0
- package/unbundled/extractOptions.cjs +21 -0
- package/unbundled/extractOptions.js +16 -0
- package/unbundled/icon.cjs +67 -0
- package/unbundled/icon.js +61 -0
- package/unbundled/linkable.cjs +1 -1
- package/unbundled/linkable.js +1 -1
- package/unbundled/listbox.cjs +29 -7
- package/unbundled/listbox.js +29 -7
- package/unbundled/mixins.cjs +2 -1
- package/unbundled/mixins.js +2 -1
- package/unbundled/optgroup.cjs +66 -0
- package/unbundled/optgroup.js +54 -0
- package/unbundled/option.cjs +176 -0
- package/unbundled/option.js +164 -0
- package/unbundled/time-selection-picker.template.cjs +1 -1
- package/unbundled/time-selection-picker.template.js +1 -1
- package/unbundled/vivid-element.cjs +10 -1
- package/unbundled/vivid-element.js +10 -1
- package/video-player/definition.cjs +1 -1
- package/video-player/definition.js +1 -1
- package/vivid.api.json +568 -231
package/bundled/definition19.js
CHANGED
|
@@ -1,19 +1,436 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as r } from "./
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { t as e } from "./localized.js";
|
|
2
|
+
import { A as t, M as n, d as r, j as i, k as a, m as o, p as s, u as c } from "./vivid-element.js";
|
|
3
|
+
import { t as l } from "./slotted.js";
|
|
4
|
+
import { t as u } from "./ref.js";
|
|
5
|
+
import { t as d } from "./when.js";
|
|
6
|
+
import { t as f } from "./decorate.js";
|
|
7
|
+
import { t as p } from "./listbox.js";
|
|
8
|
+
import { t as m } from "./class-names.js";
|
|
9
|
+
import { a as h, i as g, o as _, s as v, t as y } from "./key-codes.js";
|
|
10
|
+
import { t as b } from "./numbers.js";
|
|
11
|
+
import { r as x } from "./aria-binding-directive.js";
|
|
12
|
+
import { t as S } from "./definition3.js";
|
|
13
|
+
import { a as C, i as w, n as T } from "./affix.js";
|
|
14
|
+
import { n as E, t as D } from "./host-semantics.js";
|
|
15
|
+
import { n as O } from "./form-associated.js";
|
|
16
|
+
import { i as k, r as A, t as j } from "./definition6.js";
|
|
17
|
+
import { i as M, t as N } from "./definition8.js";
|
|
18
|
+
import { t as P } from "./dialog.js";
|
|
19
|
+
import { n as F, r as I } from "./mixins.js";
|
|
20
|
+
import { t as ee } from "./form-element.js";
|
|
21
|
+
import { t as L } from "./with-contextual-help.js";
|
|
22
|
+
import { t as R } from "./with-error-text.js";
|
|
23
|
+
import { t as z } from "./with-success-text.js";
|
|
24
|
+
import { t as B } from "./option.js";
|
|
25
|
+
import { t as V } from "./definition17.js";
|
|
26
|
+
import { t as H } from "./definition18.js";
|
|
27
|
+
//#region src/lib/select/select.scss?inline
|
|
28
|
+
var U = ".label-wrapper{align-items:center;gap:var(--label-wrapper-gap,4px);flex-direction:row;display:flex}.label-wrapper[hidden]{display:none}.label:not(slot),.label::slotted(label){flex:0 auto}.chevron{font:var(--vvd-typography-base-extended);flex-shrink:0;display:flex;transform:rotate(0)}@media (prefers-reduced-motion:no-preference){.chevron{transition:transform .2s}}:host([data-expanded=true]) .chevron,:host([open]) .chevron{transform:rotate(180deg)}:host(:focus-visible){outline:none}:host{--_low-ink-color:var(--vvd-color-neutral-600);--focus-stroke-gap-color:transparent;flex-direction:column;gap:4px;display:inline-flex}:host([disabled]){--_low-ink-color:var(--vvd-color-neutral-600);cursor:not-allowed}.label{color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base)}.control{--_appearance-color-text:var(--vvd-color-canvas-text);--_appearance-color-fill:var(--vvd-color-canvas);--_appearance-color-outline:var(--vvd-color-neutral-500)}.control.appearance-ghost{--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}@media (hover:hover){.control: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)}.control: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}}.control.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)}.control.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}.control:disabled{--_appearance-color-text:var(--vvd-color-neutral-600);--_appearance-color-fill:var(--vvd-color-neutral-100);--_appearance-color-outline:var(--vvd-color-neutral-300)}.control:disabled.appearance-ghost{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.control.disabled{--_appearance-color-text:var(--vvd-color-neutral-600);--_appearance-color-fill:var(--vvd-color-neutral-100);--_appearance-color-outline:var(--vvd-color-neutral-300)}.control.disabled.appearance-ghost{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.control.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)}.control.readonly:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text:var(--vvd-color-neutral-600);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.control.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)}.control.error:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text:notset;--_appearance-color-fill:var(--vvd-color-alert-50);--_appearance-color-outline:transparent}.control.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)}.control.success:where(:not(.disabled,:disabled)).appearance-ghost{--_appearance-color-text:notset;--_appearance-color-fill:var(--vvd-color-success-50);--_appearance-color-outline:transparent}.control{--_connotation-color-primary:var(--vvd-select-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-select-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-select-accent-primary-increment,var(--vvd-color-neutral-800));--_connotation-color-intermediate:var(--vvd-select-accent-intermediate,var(--vvd-color-neutral-500));--_connotation-color-faint:var(--vvd-select-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-soft:var(--vvd-select-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-firm:var(--vvd-select-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-fierce:var(--vvd-select-accent-fierce,var(--vvd-color-neutral-700));border-radius:var(--_select-control-border-radius);block-size:var(--_select-block-size);padding-inline:var(--_select-padding-inline);--_select-icon-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2);--_select-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));--_select-padding-inline:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5);background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);font:var(--vvd-typography-base);justify-content:space-between;align-items:center;gap:8px;transition:box-shadow .2s,background-color .2s;display:flex}.control.size-condensed{--_select-icon-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5);--_select-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8));--_select-padding-inline:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16)) / 2)}.control.size-condensed:not(.shape-pill){--_select-control-border-radius:4px}.control-wrapper{position:relative}.control:not(.disabled){cursor:pointer}.control.disabled{pointer-events:none}.control:not(.shape-pill){--_select-control-border-radius:8px}.control.shape-pill{--_select-control-border-radius:24px}.listbox{max-height:var(--select-height,408px);flex-direction:column;gap:2px;padding:4px;display:flex;overflow-y:auto}:host([multiple]:focus-visible) .listbox{box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,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));border-radius:8px}.selected-value{white-space:nowrap;flex-grow:1;align-items:center;column-gap:12px;display:flex;overflow:hidden}.selected-value .text{text-overflow:ellipsis;max-inline-size:100%;overflow:hidden}.control.shows-placeholder .selected-value .text{color:var(--vvd-color-neutral-600)}.selected-value slot[name=icon]{flex:0 0 var(--_select-icon-size);font-size:var(--_select-icon-size);line-height:1}.control.has-meta .selected-value{padding-inline-end:8px}.feedback-wrapper{display:contents}::part(popup-base){inline-size:max-content;min-inline-size:var(--_select-fixed-width,100%)}:host([multiple]) ::part(popup-base){position:static}@supports selector(:has(*)){:host(:focus-within) .control:not(.has-activedescendant,:has(.clear-button:focus)){--focus-stroke-gap-color:transparent;box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,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(*)){:host(:focus-within) .control:not(.has-activedescendant){--focus-stroke-gap-color:transparent;box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,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))}}:host(:not(:focus-visible)){--_suppressable-focus-shadow:none;--_suppressable-focus-outline:none;--_suppressable-focus-outline-offset:0}:host([multiple]) .clear-button{margin-inline-start:auto}:host([multiple][clearable]) .label-wrapper{min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16))}", W = class extends F(L(R(z(e(ee(D(T(O(p))))))))) {
|
|
29
|
+
constructor(...e) {
|
|
30
|
+
super(...e), this.proxy = document.createElement("select"), this.activeIndex = -1, this.rangeStartIndex = -1, this.open = !1, this.listboxId = x("listbox-"), this.maxHeight = 0, this.fixedDropdown = !1, this._feedbackWrapper = null, this._isResetting = !1, this.clearable = !1, this._isClearButtonFocused = !1;
|
|
31
|
+
}
|
|
32
|
+
get activeOption() {
|
|
33
|
+
return this.options[this.activeIndex];
|
|
34
|
+
}
|
|
35
|
+
get checkedOptions() {
|
|
36
|
+
return this.options.filter((e) => e.checked);
|
|
37
|
+
}
|
|
38
|
+
get firstSelectedOptionIndex() {
|
|
39
|
+
return this.options.indexOf(this.firstSelectedOption);
|
|
40
|
+
}
|
|
41
|
+
activeIndexChanged(e, t) {
|
|
42
|
+
this._activeDescendant = this.options[t]?.id ?? "", this.focusAndScrollOptionIntoView();
|
|
43
|
+
}
|
|
44
|
+
checkActiveIndex() {
|
|
45
|
+
let e = this.activeOption;
|
|
46
|
+
/* v8 ignore else -- @preserve */
|
|
47
|
+
e && (e.checked = !0);
|
|
48
|
+
}
|
|
49
|
+
checkFirstOption(e) {
|
|
50
|
+
let t = this.getNextSelectableIndex(0);
|
|
51
|
+
t !== -1 && (e ? (this.rangeStartIndex === -1 && (this.rangeStartIndex = this.activeIndex), this.options.forEach((e, n) => {
|
|
52
|
+
e.checked = b(n, t, this.rangeStartIndex + 1) && !e.disabled;
|
|
53
|
+
})) : this.uncheckAllOptions(), this.activeIndex = t, this.checkActiveIndex());
|
|
54
|
+
}
|
|
55
|
+
checkLastOption(e) {
|
|
56
|
+
let t = this.getPreviousSelectableIndex(this.length - 1);
|
|
57
|
+
t !== -1 && (e ? (this.rangeStartIndex === -1 && (this.rangeStartIndex = this.activeIndex), this.options.forEach((e, n) => {
|
|
58
|
+
e.checked = b(n, this.rangeStartIndex, t + 1) && !e.disabled;
|
|
59
|
+
})) : this.uncheckAllOptions(), this.activeIndex = t, this.checkActiveIndex());
|
|
60
|
+
}
|
|
61
|
+
checkNextOption(e) {
|
|
62
|
+
let t = this.getNextSelectableIndex(this.activeIndex + 1);
|
|
63
|
+
t !== -1 && (e ? (this.rangeStartIndex === -1 && (this.rangeStartIndex = this.activeIndex), this.options.forEach((e, n) => {
|
|
64
|
+
e.checked = b(n, this.rangeStartIndex, t + 1) && !e.disabled;
|
|
65
|
+
})) : this.uncheckAllOptions(), this.activeIndex = t, this.checkActiveIndex());
|
|
66
|
+
}
|
|
67
|
+
checkPreviousOption(e) {
|
|
68
|
+
let t = this.getPreviousSelectableIndex(this.activeIndex - 1);
|
|
69
|
+
t !== -1 && (e ? (this.rangeStartIndex === -1 && (this.rangeStartIndex = this.activeIndex), this.checkedOptions.length === 1 && (this.rangeStartIndex += 1), this.options.forEach((e, n) => {
|
|
70
|
+
e.checked = b(n, t, this.rangeStartIndex + 1) && !e.disabled;
|
|
71
|
+
})) : this.uncheckAllOptions(), this.activeIndex = t, this.checkActiveIndex());
|
|
72
|
+
}
|
|
73
|
+
focusAndScrollOptionIntoView() {
|
|
74
|
+
super.focusAndScrollOptionIntoView(this.activeOption);
|
|
75
|
+
}
|
|
76
|
+
focusinHandler(e) {
|
|
77
|
+
if (!this.multiple) {
|
|
78
|
+
super.focusinHandler(e);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
!this.shouldSkipFocus && e.target === e.currentTarget && (this.uncheckAllOptions(), this.activeIndex === -1 && (this.activeIndex = this.firstSelectedOptionIndex === -1 ? 0 : this.firstSelectedOptionIndex), this.checkActiveIndex(), this.setSelectedOptions(), this.focusAndScrollOptionIntoView()), this.shouldSkipFocus = !1;
|
|
82
|
+
}
|
|
83
|
+
setSelectedOptions() {
|
|
84
|
+
if (!this.multiple) {
|
|
85
|
+
super.setSelectedOptions();
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
/* v8 ignore else -- @preserve */
|
|
89
|
+
this.$fastController.isConnected && this.options && (this.selectedOptions = this.options.filter((e) => e.selected), this.focusAndScrollOptionIntoView());
|
|
90
|
+
}
|
|
91
|
+
toggleSelectedForAllCheckedOptions() {
|
|
92
|
+
let e = this.checkedOptions.filter((e) => !e.disabled), t = !e.every((e) => e.selected);
|
|
93
|
+
e.forEach((e) => e.selected = t), this.selectedIndex = this.options.indexOf(e[e.length - 1]), this.setSelectedOptions(), this.updateValue(!0);
|
|
94
|
+
}
|
|
95
|
+
typeaheadBufferChanged(e, t) {
|
|
96
|
+
if (!this.multiple) {
|
|
97
|
+
super.typeaheadBufferChanged(e, t);
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
/* v8 ignore if -- @preserve */
|
|
101
|
+
if (this.$fastController.isConnected) {
|
|
102
|
+
let e = this.getTypeaheadMatches(), t = this.options.indexOf(e[0]);
|
|
103
|
+
t > -1 && (this.activeIndex = t, this.uncheckAllOptions(), this.checkActiveIndex()), this.typeaheadExpired = !1;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
uncheckAllOptions(e = !1) {
|
|
107
|
+
/* v8 ignore else -- @preserve */
|
|
108
|
+
this.options.forEach((e) => e.checked = !1), e || (this.rangeStartIndex = -1);
|
|
109
|
+
}
|
|
110
|
+
openChanged(e, t) {
|
|
111
|
+
if (!this.collapsible) return;
|
|
112
|
+
if (this.open) {
|
|
113
|
+
this.focusAndScrollOptionIntoView(), this.indexWhenOpened = this.selectedIndex, n.enqueue(() => this.focus());
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
let r = e && !t, i = this.indexWhenOpened !== this.selectedIndex;
|
|
117
|
+
r && i && this.updateValue(!0);
|
|
118
|
+
}
|
|
119
|
+
get collapsible() {
|
|
120
|
+
return !this.multiple;
|
|
121
|
+
}
|
|
122
|
+
valueChanged(e, t) {
|
|
123
|
+
let n = this.options.findIndex((e) => e.value === t), r = this._validSelectedIndex(n), i = this.options[r]?.value ?? "";
|
|
124
|
+
this.selectedIndex !== r && (this.selectedIndex = r), t === i && (super.valueChanged(e, t), this.updateDisplayValue());
|
|
125
|
+
}
|
|
126
|
+
updateValue(e) {
|
|
127
|
+
this.$fastController.isConnected && (this.value = this.firstSelectedOption?.value ?? ""), e && (this.$emit("input"), this.$emit("change", this, {
|
|
128
|
+
bubbles: !0,
|
|
129
|
+
composed: void 0
|
|
130
|
+
}));
|
|
131
|
+
}
|
|
132
|
+
selectedIndexChanged(e, t) {
|
|
133
|
+
super.selectedIndexChanged(e, t), this.updateValue();
|
|
134
|
+
}
|
|
135
|
+
clickHandler(e) {
|
|
136
|
+
if (this.disabled || this._isFromContextualHelp(e)) return;
|
|
137
|
+
let t = e.target.closest("option,[role=option],[data-vvd-component=option]");
|
|
138
|
+
if (!(t && t.disabled)) return this.multiple ? (this.uncheckAllOptions(), this.activeIndex = this.options.indexOf(t), this.checkActiveIndex(), this.toggleSelectedForAllCheckedOptions()) : super.clickHandler(e), this.collapsible && (this.open = !this.open), !0;
|
|
139
|
+
}
|
|
140
|
+
focusoutHandler(e) {
|
|
141
|
+
if (this.multiple && this.uncheckAllOptions(), !this.open) return !0;
|
|
142
|
+
let t = e.relatedTarget;
|
|
143
|
+
if (this.isSameNode(t)) {
|
|
144
|
+
this.focus();
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
/* v8 ignore else -- @preserve */
|
|
148
|
+
this.options.includes(t) || (this.open = !1, this.indexWhenOpened !== this.selectedIndex && this.updateValue(!0));
|
|
149
|
+
}
|
|
150
|
+
handleChange(e, t) {
|
|
151
|
+
super.handleChange(e, t), t === "value" && this.updateValue();
|
|
152
|
+
}
|
|
153
|
+
mousedownHandler(e) {
|
|
154
|
+
return e.offsetX >= 0 && e.offsetX <= this.listbox.scrollWidth ? super.mousedownHandler(e) : this.collapsible;
|
|
155
|
+
}
|
|
156
|
+
multipleChanged(e, t) {
|
|
157
|
+
/* v8 ignore if -- @preserve */
|
|
158
|
+
this.options.forEach((e) => {
|
|
159
|
+
e.checked = t ? !1 : void 0;
|
|
160
|
+
}), this.setSelectedOptions(), this.proxy && (this.proxy.multiple = t);
|
|
161
|
+
}
|
|
162
|
+
selectedOptionsChanged(e, t) {
|
|
163
|
+
super.selectedOptionsChanged(e, t), this.options.forEach((e, t) => {
|
|
164
|
+
let n = this.proxy.options.item(t);
|
|
165
|
+
n && (n.selected = e.selected);
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
setProxyOptions() {
|
|
169
|
+
/* v8 ignore else -- @preserve */
|
|
170
|
+
this.proxy instanceof HTMLSelectElement && this.options && (this.proxy.length = 0, this.options.forEach((e) => {
|
|
171
|
+
let t = e.proxy || (e instanceof HTMLOptionElement ? e.cloneNode() : null);
|
|
172
|
+
t && this.proxy.options.add(t);
|
|
173
|
+
}));
|
|
174
|
+
}
|
|
175
|
+
multipleKeydownHandler(e) {
|
|
176
|
+
if (this.disabled) return;
|
|
177
|
+
let { key: t, shiftKey: n } = e;
|
|
178
|
+
switch (this.shouldSkipFocus = !1, t) {
|
|
179
|
+
case v:
|
|
180
|
+
this.checkFirstOption(n);
|
|
181
|
+
return;
|
|
182
|
+
case y:
|
|
183
|
+
this.checkNextOption(n);
|
|
184
|
+
return;
|
|
185
|
+
case g:
|
|
186
|
+
this.checkPreviousOption(n);
|
|
187
|
+
return;
|
|
188
|
+
case "End":
|
|
189
|
+
this.checkLastOption(n);
|
|
190
|
+
return;
|
|
191
|
+
case "Tab":
|
|
192
|
+
this.focusAndScrollOptionIntoView();
|
|
193
|
+
return;
|
|
194
|
+
case _:
|
|
195
|
+
this.uncheckAllOptions(), this.checkActiveIndex();
|
|
196
|
+
return;
|
|
197
|
+
case " ":
|
|
198
|
+
/* v8 ignore else -- @preserve */
|
|
199
|
+
if (e.preventDefault(), this.typeaheadExpired) {
|
|
200
|
+
this.toggleSelectedForAllCheckedOptions();
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
default:
|
|
204
|
+
/* v8 ignore else -- @preserve */
|
|
205
|
+
t.length === 1 && this.handleTypeAhead(t);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
keydownHandler(e) {
|
|
210
|
+
let t = this.selectedIndex;
|
|
211
|
+
switch (this.multiple ? this.multipleKeydownHandler(e) : super.keydownHandler(e), e.key) {
|
|
212
|
+
case " ":
|
|
213
|
+
e.preventDefault(), this.collapsible && this.typeaheadExpired && (this.open = !this.open);
|
|
214
|
+
break;
|
|
215
|
+
case v:
|
|
216
|
+
case "End":
|
|
217
|
+
e.preventDefault();
|
|
218
|
+
break;
|
|
219
|
+
case h:
|
|
220
|
+
e.preventDefault(), this.open = !this.open;
|
|
221
|
+
break;
|
|
222
|
+
case _:
|
|
223
|
+
this.collapsible && this.open && (e.preventDefault(), this.open = !1);
|
|
224
|
+
break;
|
|
225
|
+
case "Tab": return this.collapsible && this.open && (e.preventDefault(), this.open = !1), !0;
|
|
226
|
+
}
|
|
227
|
+
return this.collapsible && !this.open && this.selectedIndex !== t && this.updateValue(!0), !(e.key === "ArrowDown" || e.key === "ArrowUp");
|
|
228
|
+
}
|
|
229
|
+
connectedCallback() {
|
|
230
|
+
super.connectedCallback(), this.addEventListener("focusout", this.focusoutHandler), this.addEventListener("contentchange", this.updateDisplayValue);
|
|
231
|
+
}
|
|
232
|
+
disconnectedCallback() {
|
|
233
|
+
this.removeEventListener("focusout", this.focusoutHandler), this.removeEventListener("contentchange", this.updateDisplayValue), super.disconnectedCallback();
|
|
234
|
+
}
|
|
235
|
+
updateDisplayValue() {
|
|
236
|
+
this.collapsible && a.notify(this, "displayValue");
|
|
237
|
+
}
|
|
238
|
+
get displayValue() {
|
|
239
|
+
return a.track(this, "displayValue"), this.firstSelectedOption?.getAttribute("label") ?? this.firstSelectedOption?.text ?? this.placeholder ?? "";
|
|
240
|
+
}
|
|
241
|
+
_newDefaultSelectedIndex(e, t, n) {
|
|
242
|
+
let r = super._newDefaultSelectedIndex(e, t, n);
|
|
243
|
+
if (r === null && n === -1 && !this.placeholder) {
|
|
244
|
+
let e = this.getNextSelectableIndex(0);
|
|
245
|
+
if (e !== -1) return e;
|
|
246
|
+
}
|
|
247
|
+
return r;
|
|
248
|
+
}
|
|
249
|
+
_isDefaultSelected(e) {
|
|
250
|
+
return super._isDefaultSelected(e) || e.value === this.initialValue || !this._isResetting && e.value === this.value;
|
|
251
|
+
}
|
|
252
|
+
slottedOptionsChanged(e, t) {
|
|
253
|
+
this.options.forEach((e) => {
|
|
254
|
+
a.getNotifier(e).unsubscribe(this, "value");
|
|
255
|
+
}), super.slottedOptionsChanged(e, t), this.options.forEach((e) => {
|
|
256
|
+
a.getNotifier(e).subscribe(this, "value");
|
|
257
|
+
}), this.setProxyOptions(), this.updateValue();
|
|
258
|
+
let n = this.getAttribute("scale") || this.scale;
|
|
259
|
+
t.forEach((e) => {
|
|
260
|
+
n && (e.setAttribute("scale", n), e.scale = n);
|
|
261
|
+
}), this.proxy.value = this.value, this.validate();
|
|
262
|
+
}
|
|
263
|
+
formResetCallback() {
|
|
264
|
+
this.setProxyOptions(), this._isResetting = !0, this.selectedIndex = this._newDefaultSelectedIndex([], this.options, -1) ?? -1, this._isResetting = !1;
|
|
265
|
+
}
|
|
266
|
+
get _shouldShowClearButton() {
|
|
267
|
+
return this.clearable ? this.multiple ? this.selectedOptions?.length > 0 : this.value !== "" : !1;
|
|
268
|
+
}
|
|
269
|
+
_onClearButtonFocus() {
|
|
270
|
+
this._isClearButtonFocused = !0, this.activeIndex = -1, this.uncheckAllOptions();
|
|
271
|
+
}
|
|
272
|
+
_onClearButtonBlur() {
|
|
273
|
+
this._isClearButtonFocused = !1;
|
|
274
|
+
}
|
|
275
|
+
get _shouldShowLabelWrapper() {
|
|
276
|
+
return !!(this.label || this._hasContextualHelp || this.multiple && this._shouldShowClearButton);
|
|
277
|
+
}
|
|
278
|
+
_onClearButtonClick() {
|
|
279
|
+
this.multiple ? this.selectedOptions.forEach((e) => {
|
|
280
|
+
/* v8 ignore else -- @preserve */
|
|
281
|
+
e.disabled || (e.selected = !1);
|
|
282
|
+
}) : this.selectedIndex = -1, this.updateValue(!0);
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
f([t], W.prototype, "activeIndex", void 0), f([o({ mode: "boolean" })], W.prototype, "multiple", void 0), f([o({
|
|
286
|
+
attribute: "open",
|
|
287
|
+
mode: "boolean"
|
|
288
|
+
})], W.prototype, "open", void 0), f([i], W.prototype, "collapsible", null), f([t], W.prototype, "control", void 0), f([t], W.prototype, "maxHeight", void 0), f([t], W.prototype, "_anchor", void 0), f([o()], W.prototype, "scale", void 0), f([o], W.prototype, "appearance", void 0), f([o], W.prototype, "shape", void 0), f([o({
|
|
289
|
+
mode: "boolean",
|
|
290
|
+
attribute: "fixed-dropdown"
|
|
291
|
+
})], W.prototype, "fixedDropdown", void 0), f([o], W.prototype, "placeholder", void 0), f([t], W.prototype, "_feedbackWrapper", void 0), f([t], W.prototype, "metaSlottedContent", void 0), f([o({ mode: "boolean" })], W.prototype, "clearable", void 0), f([t], W.prototype, "_isClearButtonFocused", void 0);
|
|
5
292
|
//#endregion
|
|
6
|
-
//#region src/lib/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
293
|
+
//#region src/lib/select/select.template.ts
|
|
294
|
+
function G() {
|
|
295
|
+
return s` <label
|
|
296
|
+
for="${(e) => e.multiple ? null : "control"}"
|
|
297
|
+
class="label"
|
|
298
|
+
id="label"
|
|
299
|
+
>
|
|
300
|
+
${(e) => e.label}
|
|
301
|
+
</label>`;
|
|
302
|
+
}
|
|
303
|
+
function K(e) {
|
|
304
|
+
let t = e.tagFor(B);
|
|
305
|
+
return s`
|
|
306
|
+
<${t} text="${(e) => e.placeholder}" hidden disabled>
|
|
307
|
+
</${t}>`;
|
|
308
|
+
}
|
|
309
|
+
function q(e) {
|
|
310
|
+
let t = e.tagFor(k);
|
|
311
|
+
return s`
|
|
312
|
+
<${t}
|
|
313
|
+
aria-label="${(e) => e.locale.select.clearButtonLabel}"
|
|
314
|
+
aria-hidden="${(e) => e._isClearButtonFocused ? "false" : "true"}"
|
|
315
|
+
@click="${(e, t) => {
|
|
316
|
+
e._onClearButtonClick(), t.event.stopPropagation();
|
|
317
|
+
}}"
|
|
318
|
+
@mousedown="${() => !1}"
|
|
319
|
+
@keydown="${(e, t) => (t.event.key === "Tab" && e._onClearButtonBlur(), t.event.stopPropagation(), !0)}"
|
|
320
|
+
@focusin="${(e, t) => {
|
|
321
|
+
t.event.stopPropagation(), e._onClearButtonFocus();
|
|
322
|
+
}}"
|
|
323
|
+
@focusout="${(e) => e._onClearButtonBlur()}"
|
|
324
|
+
?disabled="${(e) => e.disabled}"
|
|
325
|
+
:shape="${(e) => e.shape}"
|
|
326
|
+
size="super-condensed"
|
|
327
|
+
icon="close-line"
|
|
328
|
+
appearance="ghost-light"
|
|
329
|
+
class="clear-button"
|
|
330
|
+
tabindex="0"
|
|
331
|
+
></${t}>
|
|
332
|
+
`;
|
|
333
|
+
}
|
|
334
|
+
function J(e) {
|
|
335
|
+
let t = C(e), n = A(e);
|
|
336
|
+
return s` <div
|
|
337
|
+
class="control ${(e) => m(["has-activedescendant", !!e._activeDescendant && e.open], ["disabled", e.disabled], [`appearance-${e.appearance}`, !!e.appearance], [`shape-${e.shape}`, !!e.shape], ["has-meta", !!e.metaSlottedContent?.length], ["error", !!e.errorValidationMessage], ["success", !!e.successText], ["shows-placeholder", !!e.placeholder && !e.value], [`size-${e.scale}`, !!e.scale])}"
|
|
338
|
+
${u("_anchor")}
|
|
339
|
+
id="control"
|
|
340
|
+
?disabled="${(e) => e.disabled}"
|
|
341
|
+
>
|
|
342
|
+
<div class="selected-value">
|
|
343
|
+
${(e) => t(e.icon, w.Slot)}
|
|
344
|
+
<span class="text">${(e) => e.displayValue}</span>
|
|
345
|
+
<slot name="meta" ${l("metaSlottedContent")}></slot>
|
|
346
|
+
</div>
|
|
347
|
+
${d((e) => e._shouldShowClearButton, q(e))}
|
|
348
|
+
${n}
|
|
349
|
+
</div>`;
|
|
350
|
+
}
|
|
351
|
+
function Y(e) {
|
|
352
|
+
return e.open && e.fixedDropdown ? `--_select-fixed-width: ${Math.round(e.getBoundingClientRect().width)}px` : null;
|
|
353
|
+
}
|
|
354
|
+
function X(e) {
|
|
355
|
+
let t = e.tagFor(M);
|
|
356
|
+
return s`
|
|
357
|
+
<div class="label-wrapper" ?hidden=${(e) => !e._shouldShowLabelWrapper}>
|
|
358
|
+
${d((e) => e.label, G())}
|
|
359
|
+
${d((e) => e.multiple && e._shouldShowClearButton, q(e))}
|
|
360
|
+
<slot name="contextual-help" ${l("_contextualHelpSlottedContent")}></slot>
|
|
361
|
+
</div>
|
|
362
|
+
<div class="control-wrapper">
|
|
363
|
+
${d((e) => !e.multiple, J(e))}
|
|
364
|
+
<${t} class="popup"
|
|
365
|
+
style="${Y}"
|
|
366
|
+
?open="${(e) => e.collapsible ? e.open : !0}"
|
|
367
|
+
:anchor="${(e) => e._anchor}"
|
|
368
|
+
placement="bottom-start"
|
|
369
|
+
strategy="${(e) => e.fixedDropdown ? null : "absolute"}">
|
|
370
|
+
<div class="listbox"
|
|
371
|
+
id="${(e) => e.listboxId}"
|
|
372
|
+
role="listbox"
|
|
373
|
+
aria-multiselectable="${(e) => e.multiple}"
|
|
374
|
+
aria-label="${(e) => e.multiple && !e.label && e.ariaLabel ? e.ariaLabel : null}"
|
|
375
|
+
aria-labelledby="${(e) => e.multiple && e.label ? "label" : null}"
|
|
376
|
+
?disabled="${(e) => e.disabled}"
|
|
377
|
+
?hidden="${(e) => e.collapsible ? !e.open : !1}"
|
|
378
|
+
${u("listbox")}>
|
|
379
|
+
${d((e) => e.placeholder, K(e))}
|
|
380
|
+
<slot
|
|
381
|
+
${l({
|
|
382
|
+
filter: p.slottedOptionFilter,
|
|
383
|
+
flatten: !0,
|
|
384
|
+
property: "slottedOptions"
|
|
385
|
+
})}>
|
|
386
|
+
</slot>
|
|
387
|
+
</div>
|
|
388
|
+
</${t}>
|
|
389
|
+
</div>
|
|
390
|
+
`;
|
|
391
|
+
}
|
|
392
|
+
function Z(e) {
|
|
393
|
+
return (t, n) => {
|
|
394
|
+
if (!n.event.composedPath().includes(t._feedbackWrapper)) {
|
|
395
|
+
e(t, n.event);
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
return !0;
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
//#endregion
|
|
402
|
+
//#region src/lib/select/definition.ts
|
|
403
|
+
var Q = c("select", W, (e) => s`
|
|
404
|
+
<template
|
|
405
|
+
${E({
|
|
406
|
+
role: "combobox",
|
|
407
|
+
ariaLabel: (e) => e.ariaLabel ?? e.label,
|
|
408
|
+
ariaHasPopup: (e) => e.collapsible ? "listbox" : "false",
|
|
409
|
+
ariaExpanded: (e) => e.open,
|
|
410
|
+
ariaDisabled: (e) => e.disabled
|
|
12
411
|
})}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
412
|
+
aria-controls="${(e) => e.listboxId}"
|
|
413
|
+
aria-activedescendant="${(e) => e.open ? e._activeDescendant : null}"
|
|
414
|
+
aria-describedby="${(e) => e._feedbackDescribedBy}"
|
|
415
|
+
tabindex="${(e) => e.disabled ? null : "0"}"
|
|
416
|
+
@click="${Z((e, t) => e.clickHandler(t))}"
|
|
417
|
+
@focusin="${Z((e, t) => e.focusinHandler(t))}"
|
|
418
|
+
@focusout="${Z((e, t) => e.focusoutHandler(t))}"
|
|
419
|
+
@keydown="${Z((e, t) => (e.open && P(t), e.keydownHandler(t)))}"
|
|
420
|
+
@mousedown="${Z((e, t) => e.mousedownHandler(t))}"
|
|
421
|
+
>
|
|
422
|
+
${X(e)}
|
|
423
|
+
<div class="feedback-wrapper" ${u("_feedbackWrapper")}>
|
|
424
|
+
${(t) => t._getFeedbackTemplate(e)}
|
|
425
|
+
</div>
|
|
426
|
+
</template>
|
|
427
|
+
`, [
|
|
428
|
+
N,
|
|
429
|
+
S,
|
|
430
|
+
V,
|
|
431
|
+
H,
|
|
432
|
+
j,
|
|
433
|
+
I
|
|
434
|
+
], { styles: U }), $ = r(Q);
|
|
18
435
|
//#endregion
|
|
19
|
-
export {
|
|
436
|
+
export { Q as n, W as r, $ as t };
|
package/bundled/definition20.cjs
CHANGED
|
@@ -1,37 +1,7 @@
|
|
|
1
|
-
const e=require(`./vivid-element.cjs`),t=require(`./
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@click="${(e,t)=>e.handleMenuItemClick(t.event)}"
|
|
9
|
-
@mouseover="${(e,t)=>e.handleMouseOver(t.event)}"
|
|
10
|
-
@mouseout="${(e,t)=>e.handleMouseOut(t.event)}"
|
|
11
|
-
>
|
|
12
|
-
<div
|
|
13
|
-
class="${e=>i.t(`base`,[`connotation-${e.connotation}`,!!e.connotation],[`disabled`,e.disabled],[`selected`,!!(e.controlType&&e.checked)],[`trailing`,!!(e.controlType&&(e.checkTrailing||e.icon))],[`item-checkbox`,e.controlType===`checkbox`],[`item-radio`,e.controlType===`radio`],[`two-lines`,!!e.text?.length&&!!e.textSecondary?.length],[`has-meta`,!!e.metaSlottedContent?.length])}"
|
|
14
|
-
>
|
|
15
|
-
<slot name="meta" ${t.t(`metaSlottedContent`)}></slot>
|
|
16
|
-
${h(r)}
|
|
17
|
-
${n.t(e=>e.icon,e.p`<span class="decorative"
|
|
18
|
-
>${e=>a(e.icon)}</span
|
|
19
|
-
>`)}
|
|
20
|
-
${g()}
|
|
21
|
-
<slot
|
|
22
|
-
name="trailing-meta"
|
|
23
|
-
${t.t(`trailingMetaSlottedContent`)}
|
|
24
|
-
></slot>
|
|
25
|
-
<slot
|
|
26
|
-
name="kbd-shortcut"
|
|
27
|
-
class="kbd-shortcut-slot"
|
|
28
|
-
${t.t({property:`_kbdShortcutSlotted`,filter:t.r()})}
|
|
29
|
-
></slot>
|
|
30
|
-
${n.t(e=>e.hasSubmenu,e.p`<${l} class="chevron" name="chevron-right-line"></${l}>`)}
|
|
31
|
-
</div>
|
|
32
|
-
<slot
|
|
33
|
-
name="submenu"
|
|
34
|
-
${t.t({property:`slottedSubmenu`,filter:t.r(r.tagForNonDependency(p))})}
|
|
35
|
-
></slot>
|
|
36
|
-
</template>
|
|
37
|
-
`},[o.t],{styles:u}),v=e.d(_);Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return _}});
|
|
1
|
+
const e=require(`./vivid-element.cjs`),t=require(`./class-names.cjs`),n=require(`./host-semantics.cjs`),r=require(`./divider.cjs`);var i=`:host{display:block}.base{--_connotation-color-soft:var(--vvd-divider-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-dim:var(--vvd-divider-accent-dim,var(--vvd-color-neutral-200));display:block}.base:not(.vertical){block-size:1px;inline-size:100%}.base.vertical{block-size:100%;inline-size:1px}.base.appearance-ghost{background-color:var(--_connotation-color-dim)}.base.appearance-subtle{background-color:var(--_connotation-color-soft)}`,a=e.p`<template
|
|
2
|
+
${n.n({role:e=>e.role||r.n.separator,ariaHidden:!0,ariaOrientation:({role:e,orientation:t})=>e===r.n.presentation?null:t})}
|
|
3
|
+
>
|
|
4
|
+
<span
|
|
5
|
+
class="${e=>t.t(`base`,[e.orientation,!!e.orientation],[`appearance-${e.appearance}`,!!e.appearance])}"
|
|
6
|
+
></span
|
|
7
|
+
></template>`,o=e.u(`divider`,r.t,a,[],{styles:i}),s=e.d(o);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|