@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
|
@@ -1,512 +1,38 @@
|
|
|
1
1
|
import { d as createRegisterFunction, u as defineVividComponent } from "./vivid-element.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { t as handleEscapeKeyAndStopPropogation } from "./dialog.js";
|
|
8
|
-
import { i as Popup, t as popupDefinition } from "./definition9.js";
|
|
9
|
-
import { r as feedbackMessageDefinition, t as WithFeedback } from "./mixins.js";
|
|
10
|
-
import { t as FormElement } from "./form-element.js";
|
|
11
|
-
import { t as WithErrorText } from "./with-error-text.js";
|
|
12
|
-
import { t as WithSuccessText } from "./with-success-text.js";
|
|
13
|
-
import { t as WithContextualHelp } from "./with-contextual-help.js";
|
|
14
|
-
import { t as text_field_default } from "./text-field.js";
|
|
15
|
-
import { t as listboxOptionDefinition } from "./definition29.js";
|
|
16
|
-
import { t as Listbox } from "./listbox.js";
|
|
17
|
-
import { Observable, attr, html, observable, ref, slotted, when } from "@microsoft/fast-element";
|
|
18
|
-
import { classNames, limit, uniqueId } from "@microsoft/fast-web-utilities";
|
|
19
|
-
//#region src/lib/combobox/combobox.scss?inline
|
|
20
|
-
var combobox_default = ".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)}:not(.disabled) .chevron{cursor:pointer}.disabled .chevron{color:var(--_low-ink-color);cursor:not-allowed}:host{--_low-ink-color:var(--vvd-color-neutral-600);flex-direction:column;gap:4px;display:inline-flex;position:relative}:host([disabled]){--_low-ink-color:var(--vvd-color-neutral-400);cursor:not-allowed}.base{--_text-field-gutter-end:8px;--_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-600);--_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-600);--_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:not(.shape-pill) .base{border-radius:var(--_text-field-border-radius)}.base.shape-pill .base{border-radius:var(--_text-field-pill-border-radius)}.base slot[name=icon]{z-index:1;color:var(--_low-ink-color);font-size:var(--_text-field-icon-size);pointer-events:none;line-height:1;display:inline-block;position:absolute;inset-block-start:50%;inset-inline-start:var(--_text-field-gutter-start);transform:translateY(-50%)}.base.has-meta{padding-inline-end:16px}.control{text-overflow:ellipsis;white-space:nowrap}.fieldset .leading-items-wrapper{flex-shrink:0;align-items:center;gap:8px;padding-inline-end:16px;display:flex;position:relative}.listbox{max-height:var(--combobox-height,408px);contain:paint;border-radius:8px;flex-direction:column;gap:2px;padding:4px;display:flex;overflow-y:auto}::part(popup-base){inline-size:max-content;min-inline-size:var(--_combobox-fixed-width,100%)}@supports selector(:has(*)){.base:not(.has-activedescendant) .fieldset:has(.control:focus-within):after{--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(*)){.base:not(.has-activedescendant) .fieldset:focus-within:after{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));--focus-stroke-gap-color:transparent;z-index:1;border-radius:inherit;content:\"\";pointer-events:none;display:block;position:absolute;inset:0}}::slotted([data-vvd-component=option][current-selected]){border-radius:8px}:host(.has-activedescendant) ::slotted([data-vvd-component=option][current-selected]){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));--focus-stroke-gap-color:transparent}";
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region src/lib/combobox/combobox.options.ts
|
|
23
|
-
/** Autocomplete values for combobox. */
|
|
24
|
-
var ComboboxAutocomplete = {
|
|
25
|
-
inline: "inline",
|
|
26
|
-
list: "list",
|
|
27
|
-
both: "both",
|
|
28
|
-
none: "none"
|
|
29
|
-
};
|
|
30
|
-
//#endregion
|
|
31
|
-
//#region src/lib/combobox/combobox.ts
|
|
32
|
-
/**
|
|
33
|
-
* @public
|
|
34
|
-
* @component combobox
|
|
35
|
-
* @slot - Default slot.
|
|
36
|
-
* @slot icon - The preferred way to add an icon to the combobox control.
|
|
37
|
-
* @slot meta - Slot to add meta content to the combobox control.
|
|
38
|
-
* @slot helper-text - Describes how to use the combobox. Alternative to the `helper-text` attribute.
|
|
39
|
-
* @event {CustomEvent<undefined>} change - Fires a custom 'change' event when the value updates
|
|
40
|
-
* @vueModel modelValue value change `event.currentTarget.value`
|
|
41
|
-
* @testAction fill comboboxFill
|
|
42
|
-
* @testAction clear comboboxClear
|
|
43
|
-
* @testAction selectOptionByText selectOptionByText
|
|
44
|
-
* @testAction selectOptionByValue selectOptionByValue
|
|
45
|
-
* @testRef control shadow input.control
|
|
46
|
-
*/
|
|
47
|
-
var Combobox = class extends WithContextualHelp(WithFeedback(WithErrorText(WithSuccessText(FormElement(AffixIcon(FormAssociated(Listbox))))))) {
|
|
48
|
-
constructor(..._args) {
|
|
49
|
-
super(..._args);
|
|
50
|
-
this.filteredOptions = [];
|
|
51
|
-
this.filter = "";
|
|
52
|
-
this._isNavigatingWithKeyboard = false;
|
|
53
|
-
this.fixedDropdown = false;
|
|
54
|
-
this.listboxId = uniqueId("listbox-");
|
|
55
|
-
this.maxHeight = 0;
|
|
56
|
-
this.open = false;
|
|
57
|
-
this.proxy = document.createElement("input");
|
|
58
|
-
}
|
|
59
|
-
/** @internal */
|
|
60
|
-
formResetCallback() {
|
|
61
|
-
super.formResetCallback();
|
|
62
|
-
this.selectedIndex = this._newDefaultSelectedIndex([], this.options, -1) ?? -1;
|
|
63
|
-
this.value = this.firstSelectedOption?.text || "";
|
|
64
|
-
}
|
|
65
|
-
/** {@inheritDoc (FormAssociated:interface).validate} */
|
|
66
|
-
validate() {
|
|
67
|
-
super.validate(this.control);
|
|
68
|
-
}
|
|
69
|
-
get isAutocompleteInline() {
|
|
70
|
-
return this.autocomplete === ComboboxAutocomplete.inline || this.isAutocompleteBoth;
|
|
71
|
-
}
|
|
72
|
-
get isAutocompleteList() {
|
|
73
|
-
return this.autocomplete === ComboboxAutocomplete.list || this.isAutocompleteBoth;
|
|
74
|
-
}
|
|
75
|
-
get isAutocompleteBoth() {
|
|
76
|
-
return this.autocomplete === ComboboxAutocomplete.both;
|
|
77
|
-
}
|
|
78
|
-
/** @internal */
|
|
79
|
-
openChanged() {
|
|
80
|
-
if (this.open) this.enqueueScrollSelectedOptionIntoViewIfNeeded();
|
|
81
|
-
}
|
|
82
|
-
/** A read-only list of options. */
|
|
83
|
-
get options() {
|
|
84
|
-
Observable.track(this, "options");
|
|
85
|
-
return this.filteredOptions.length ? this.filteredOptions : this._options;
|
|
86
|
-
}
|
|
87
|
-
set options(value) {
|
|
88
|
-
super.options = value;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Updates the placeholder on the proxy element.
|
|
92
|
-
* @internal
|
|
93
|
-
*/
|
|
94
|
-
placeholderChanged() {
|
|
95
|
-
/* v8 ignore if -- @preserve */
|
|
96
|
-
if (this.proxy instanceof HTMLInputElement) this.proxy.placeholder = this.placeholder;
|
|
97
|
-
}
|
|
98
|
-
/** @internal */
|
|
99
|
-
valueChanged(prev, next) {
|
|
100
|
-
if (this.$fastController.isConnected && this.options) {
|
|
101
|
-
const selectedIndex = this.options.findIndex((el) => el.text.toLowerCase() === next.toLowerCase());
|
|
102
|
-
const prevSelectedValue = this.options[this.selectedIndex]?.text;
|
|
103
|
-
const nextSelectedValue = this.options[selectedIndex]?.text;
|
|
104
|
-
this.selectedIndex = prevSelectedValue !== nextSelectedValue ? selectedIndex : this.selectedIndex;
|
|
105
|
-
}
|
|
106
|
-
super.valueChanged(prev, next);
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Handle opening and closing the listbox when the combobox is clicked.
|
|
110
|
-
*
|
|
111
|
-
* @param e - the mouse event
|
|
112
|
-
* @internal
|
|
113
|
-
*/
|
|
114
|
-
clickHandler(e) {
|
|
115
|
-
if (this.disabled || this._isFromContextualHelp(e)) return;
|
|
116
|
-
if (this.open) {
|
|
117
|
-
const capturedOption = e.target.closest(`option,[role=option],[data-vvd-component=option]`);
|
|
118
|
-
if (!capturedOption || capturedOption.disabled) return;
|
|
119
|
-
this.selectedOptions = [capturedOption];
|
|
120
|
-
this.control.value = capturedOption.text;
|
|
121
|
-
this.clearSelectionRange();
|
|
122
|
-
this.updateValue(true);
|
|
123
|
-
}
|
|
124
|
-
this.open = !this.open;
|
|
125
|
-
if (this.open) this.control.focus();
|
|
126
|
-
return true;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Handle closing the listbox when the combobox is open and the chevron icon is clicked.
|
|
130
|
-
*
|
|
131
|
-
* @param e - the mouse event
|
|
132
|
-
* @internal
|
|
133
|
-
*/
|
|
134
|
-
_chevronIconClickHandler(e) {
|
|
135
|
-
if (!this.open) return;
|
|
136
|
-
e.stopPropagation();
|
|
137
|
-
this.open = false;
|
|
138
|
-
}
|
|
139
|
-
connectedCallback() {
|
|
140
|
-
super.connectedCallback();
|
|
141
|
-
if (this.value) this.initialValue = this.value;
|
|
142
|
-
this._popup.anchor = this._anchor;
|
|
143
|
-
}
|
|
144
|
-
/** Filter available options by text value. */
|
|
145
|
-
filterOptions() {
|
|
146
|
-
if (!this.autocomplete || this.autocomplete === ComboboxAutocomplete.none) this.filter = "";
|
|
147
|
-
this.filteredOptions = this._options.filter((o) => o.text.toLowerCase().startsWith(this.filter.toLowerCase()));
|
|
148
|
-
if (this.isAutocompleteList) this._options.forEach((o) => {
|
|
149
|
-
o.hidden = !this.filteredOptions.includes(o);
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Focus the control and scroll the first selected option into view.
|
|
154
|
-
*
|
|
155
|
-
* @internal
|
|
156
|
-
*/
|
|
157
|
-
focusAndScrollOptionIntoView() {
|
|
158
|
-
if (this.contains(document.activeElement)) {
|
|
159
|
-
this.control.focus();
|
|
160
|
-
this.enqueueScrollSelectedOptionIntoViewIfNeeded();
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
/** @internal */
|
|
164
|
-
enqueueScrollSelectedOptionIntoViewIfNeeded() {
|
|
165
|
-
const firstSelectedOption = this.firstSelectedOption;
|
|
166
|
-
/* v8 ignore else -- @preserve */
|
|
167
|
-
if (firstSelectedOption) requestAnimationFrame(() => {
|
|
168
|
-
firstSelectedOption.scrollIntoView({ block: "nearest" });
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Handle focus state when the element or its children lose focus.
|
|
173
|
-
*
|
|
174
|
-
* @param e - The focus event
|
|
175
|
-
* @internal
|
|
176
|
-
*/
|
|
177
|
-
focusoutHandler(e) {
|
|
178
|
-
this.syncValue();
|
|
179
|
-
if (!this.open) return true;
|
|
180
|
-
const focusTarget = e.relatedTarget;
|
|
181
|
-
if (this.isSameNode(focusTarget)) {
|
|
182
|
-
this.focus();
|
|
183
|
-
return;
|
|
184
|
-
}
|
|
185
|
-
this.open = false;
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Handle content changes on the control input.
|
|
189
|
-
*
|
|
190
|
-
* @param e - the input event
|
|
191
|
-
* @internal
|
|
192
|
-
*/
|
|
193
|
-
inputHandler(e) {
|
|
194
|
-
this.filter = this.control.value;
|
|
195
|
-
this.filterOptions();
|
|
196
|
-
if (!this.isAutocompleteInline) this.selectedIndex = this.options.map((option) => option.text).indexOf(this.control.value);
|
|
197
|
-
if (e.inputType.includes("deleteContent") || !this.filter.length) return true;
|
|
198
|
-
if (this.isAutocompleteList && !this.open) this.open = true;
|
|
199
|
-
if (this.isAutocompleteInline) if (this.filteredOptions.length) {
|
|
200
|
-
this.selectedOptions = [this.filteredOptions[0]];
|
|
201
|
-
this.selectedIndex = this.options.indexOf(this.firstSelectedOption);
|
|
202
|
-
this.setInlineSelection();
|
|
203
|
-
} else this.selectedIndex = -1;
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Handle keydown actions for listbox navigation.
|
|
207
|
-
*
|
|
208
|
-
* @param e - the keyboard event
|
|
209
|
-
* @internal
|
|
210
|
-
*/
|
|
211
|
-
keydownHandler(e) {
|
|
212
|
-
const key = e.key;
|
|
213
|
-
if (e.ctrlKey || e.shiftKey) return true;
|
|
214
|
-
switch (key) {
|
|
215
|
-
case "Enter":
|
|
216
|
-
this.syncValue();
|
|
217
|
-
/* v8 ignore else -- @preserve */
|
|
218
|
-
if (this.isAutocompleteInline) this.filter = this.value;
|
|
219
|
-
this.open = false;
|
|
220
|
-
this.clearSelectionRange();
|
|
221
|
-
return;
|
|
222
|
-
case "Escape":
|
|
223
|
-
/* v8 ignore else -- @preserve */
|
|
224
|
-
if (!this.isAutocompleteInline) this.selectedIndex = -1;
|
|
225
|
-
if (this.open) {
|
|
226
|
-
this.open = false;
|
|
227
|
-
return;
|
|
228
|
-
}
|
|
229
|
-
this.value = "";
|
|
230
|
-
this.control.value = "";
|
|
231
|
-
this.filter = "";
|
|
232
|
-
this.filterOptions();
|
|
233
|
-
return;
|
|
234
|
-
case "Tab":
|
|
235
|
-
this.setInputToSelection();
|
|
236
|
-
if (!this.open) return true;
|
|
237
|
-
e.preventDefault();
|
|
238
|
-
this.open = false;
|
|
239
|
-
return;
|
|
240
|
-
case "ArrowUp":
|
|
241
|
-
case "ArrowDown":
|
|
242
|
-
this.filterOptions();
|
|
243
|
-
if (!this.open) {
|
|
244
|
-
this.open = true;
|
|
245
|
-
return;
|
|
246
|
-
}
|
|
247
|
-
/* v8 ignore else -- @preserve */
|
|
248
|
-
if (this.filteredOptions.length > 0) {
|
|
249
|
-
this._isNavigatingWithKeyboard = true;
|
|
250
|
-
super.keydownHandler(e);
|
|
251
|
-
this._isNavigatingWithKeyboard = false;
|
|
252
|
-
}
|
|
253
|
-
if (this.isAutocompleteInline) this.setInlineSelection();
|
|
254
|
-
return;
|
|
255
|
-
default: return true;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
/** @internal */
|
|
259
|
-
setSelectedOptions() {
|
|
260
|
-
super.setSelectedOptions();
|
|
261
|
-
if (!this._isNavigatingWithKeyboard) this._activeDescendant = "";
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Ensure that the selectedIndex is within the current allowable filtered range.
|
|
265
|
-
*
|
|
266
|
-
* @param prev - the previous selected index value
|
|
267
|
-
* @param next - the current selected index value
|
|
268
|
-
*
|
|
269
|
-
* @internal
|
|
270
|
-
*/
|
|
271
|
-
selectedIndexChanged(prev, next) {
|
|
272
|
-
if (this.$fastController.isConnected) {
|
|
273
|
-
next = limit(-1, this.options.length - 1, next);
|
|
274
|
-
if (next !== this.selectedIndex) {
|
|
275
|
-
this.selectedIndex = next;
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
super.selectedIndexChanged(prev, next);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* Move focus to the previous selectable option.
|
|
283
|
-
*
|
|
284
|
-
* @internal
|
|
285
|
-
*/
|
|
286
|
-
selectPreviousOption() {
|
|
287
|
-
if (!this.disabled && this.selectedIndex >= 0) this.selectedIndex = this.selectedIndex - 1;
|
|
288
|
-
}
|
|
289
|
-
_isDefaultSelected(option) {
|
|
290
|
-
return super._isDefaultSelected(option) || option.text !== "" && option.text === this.initialValue;
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Focus and set the content of the control based on the first selected option.
|
|
294
|
-
*
|
|
295
|
-
* @internal
|
|
296
|
-
*/
|
|
297
|
-
setInputToSelection() {
|
|
298
|
-
if (this.firstSelectedOption) {
|
|
299
|
-
this.control.value = this.firstSelectedOption.text;
|
|
300
|
-
this.control.focus();
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
304
|
-
* Focus, set and select the content of the control based on the first selected option.
|
|
305
|
-
*
|
|
306
|
-
* @internal
|
|
307
|
-
*/
|
|
308
|
-
setInlineSelection() {
|
|
309
|
-
/* v8 ignore else -- @preserve */
|
|
310
|
-
if (this.firstSelectedOption) {
|
|
311
|
-
this.setInputToSelection();
|
|
312
|
-
this.control.setSelectionRange(this.filter.length, this.control.value.length, "backward");
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
/**
|
|
316
|
-
* Determines if a value update should involve emitting a change event, then updates the value.
|
|
317
|
-
*
|
|
318
|
-
* @internal
|
|
319
|
-
*/
|
|
320
|
-
syncValue() {
|
|
321
|
-
const newValue = this.firstSelectedOption?.text ?? this.control.value;
|
|
322
|
-
this.updateValue(this.value !== newValue);
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Ensure that the entire list of options is used when setting the selected property.
|
|
326
|
-
*
|
|
327
|
-
* @param prev - the previous list of selected options
|
|
328
|
-
* @param next - the current list of selected options
|
|
329
|
-
*
|
|
330
|
-
* @internal
|
|
331
|
-
*/
|
|
332
|
-
selectedOptionsChanged(_prev, next) {
|
|
333
|
-
if (this.$fastController.isConnected) this._options.forEach((o) => {
|
|
334
|
-
o.selected = next.includes(o);
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
/**
|
|
338
|
-
* Synchronize the form-associated proxy and update the value property of the element.
|
|
339
|
-
*
|
|
340
|
-
* @param prev - the previous collection of slotted option elements
|
|
341
|
-
* @param next - the next collection of slotted option elements
|
|
342
|
-
*
|
|
343
|
-
* @internal
|
|
344
|
-
*/
|
|
345
|
-
slottedOptionsChanged(prev, next) {
|
|
346
|
-
super.slottedOptionsChanged(prev, next);
|
|
347
|
-
this.updateValue();
|
|
348
|
-
const scale = this.getAttribute("scale") || this.scale;
|
|
349
|
-
next.forEach((element) => {
|
|
350
|
-
if (scale) {
|
|
351
|
-
element.setAttribute("scale", scale);
|
|
352
|
-
element.scale = scale;
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
/**
|
|
357
|
-
* Sets the value and to match the first selected option.
|
|
358
|
-
*
|
|
359
|
-
* @param shouldEmit - if true, the change event will be emitted
|
|
360
|
-
*
|
|
361
|
-
* @internal
|
|
362
|
-
*/
|
|
363
|
-
updateValue(shouldEmit) {
|
|
364
|
-
if (this.$fastController.isConnected) this.value = this.firstSelectedOption?.text || this.control.value;
|
|
365
|
-
if (shouldEmit) this.$emit("change");
|
|
366
|
-
}
|
|
367
|
-
/** @internal */
|
|
368
|
-
clearSelectionRange() {
|
|
369
|
-
const controlValueLength = this.control.value.length;
|
|
370
|
-
this.control.setSelectionRange(controlValueLength, controlValueLength);
|
|
371
|
-
}
|
|
372
|
-
};
|
|
373
|
-
__decorate([attr({
|
|
374
|
-
attribute: "autocomplete",
|
|
375
|
-
mode: "fromView"
|
|
376
|
-
})], Combobox.prototype, "autocomplete", void 0);
|
|
377
|
-
__decorate([attr], Combobox.prototype, "appearance", void 0);
|
|
378
|
-
__decorate([attr], Combobox.prototype, "shape", void 0);
|
|
379
|
-
__decorate([attr()], Combobox.prototype, "scale", void 0);
|
|
380
|
-
__decorate([attr], Combobox.prototype, "placement", void 0);
|
|
381
|
-
__decorate([attr({
|
|
382
|
-
mode: "boolean",
|
|
383
|
-
attribute: "fixed-dropdown"
|
|
384
|
-
})], Combobox.prototype, "fixedDropdown", void 0);
|
|
385
|
-
__decorate([observable], Combobox.prototype, "metaSlottedContent", void 0);
|
|
386
|
-
__decorate([observable], Combobox.prototype, "maxHeight", void 0);
|
|
387
|
-
__decorate([attr({
|
|
388
|
-
attribute: "open",
|
|
389
|
-
mode: "boolean"
|
|
390
|
-
})], Combobox.prototype, "open", void 0);
|
|
391
|
-
__decorate([attr], Combobox.prototype, "placeholder", void 0);
|
|
392
|
-
//#endregion
|
|
393
|
-
//#region src/lib/combobox/combobox.template.ts
|
|
394
|
-
function renderLabel() {
|
|
395
|
-
return html` <label for="control" class="label">
|
|
396
|
-
${(x) => x.label}
|
|
397
|
-
</label>`;
|
|
398
|
-
}
|
|
399
|
-
function setFixedDropdownVarWidth(x) {
|
|
400
|
-
return x.open && x.fixedDropdown ? `--_combobox-fixed-width: ${Math.round(x.getBoundingClientRect().width)}px` : null;
|
|
401
|
-
}
|
|
402
|
-
function renderInput(context) {
|
|
403
|
-
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
404
|
-
const chevronTemplate = chevronTemplateFactory(context);
|
|
405
|
-
return html` <div
|
|
406
|
-
class="${(x) => classNames("base", ["disabled", x.disabled], [`shape-${x.shape}`, Boolean(x.shape)], [`size-${x.scale}`, Boolean(x.scale)], ["placeholder", Boolean(x.placeholder)], [`appearance-${x.appearance}`, Boolean(x.appearance)], ["no-label", !x.label], ["has-icon", !!x.icon || Boolean(x.iconSlottedContent?.length)], ["has-meta", Boolean(x.metaSlottedContent?.length)], ["has-activedescendant", Boolean(x._activeDescendant) && x.open], ["error", Boolean(x.errorValidationMessage)], ["success", !!x.successText])}"
|
|
407
|
-
${ref("_anchor")}
|
|
408
|
-
>
|
|
409
|
-
<div
|
|
410
|
-
class="label-wrapper"
|
|
411
|
-
?hidden=${(x) => !x.label && !x._hasContextualHelp}
|
|
412
|
-
>
|
|
413
|
-
${when((x) => x.label, renderLabel())}
|
|
414
|
-
<slot
|
|
415
|
-
name="contextual-help"
|
|
416
|
-
${slotted("_contextualHelpSlottedContent")}
|
|
417
|
-
></slot>
|
|
418
|
-
</div>
|
|
419
|
-
<div class="fieldset">
|
|
420
|
-
${(x) => affixIconTemplate(x.icon, IconWrapper.Slot)}
|
|
421
|
-
<div class="wrapper">
|
|
422
|
-
<input
|
|
423
|
-
id="control"
|
|
424
|
-
autocomplete="off"
|
|
425
|
-
class="control"
|
|
426
|
-
aria-activedescendant="${(x) => x.open ? x._activeDescendant : null}"
|
|
427
|
-
aria-autocomplete="${(x) => x.autocomplete}"
|
|
428
|
-
aria-controls="${(x) => x.listboxId}"
|
|
429
|
-
aria-expanded="${(x) => x.open}"
|
|
430
|
-
aria-haspopup="listbox"
|
|
431
|
-
aria-describedby="${(x) => x._feedbackDescribedBy}"
|
|
432
|
-
placeholder="${(x) => x.placeholder}"
|
|
433
|
-
role="combobox"
|
|
434
|
-
type="text"
|
|
435
|
-
?disabled="${(x) => x.disabled}"
|
|
436
|
-
:value="${(x) => x.value}"
|
|
437
|
-
@input="${(x, c) => x.inputHandler(c.event)}"
|
|
438
|
-
${ref("control")}
|
|
439
|
-
/>
|
|
440
|
-
</div>
|
|
441
|
-
<div class="leading-items-wrapper">
|
|
442
|
-
<slot name="meta" ${slotted("metaSlottedContent")}></slot>
|
|
443
|
-
<div
|
|
444
|
-
@click="${(x, c) => x._chevronIconClickHandler(c.event)}"
|
|
445
|
-
>
|
|
446
|
-
${chevronTemplate}
|
|
447
|
-
</div>
|
|
448
|
-
</div>
|
|
449
|
-
</div>
|
|
450
|
-
</div>`;
|
|
451
|
-
}
|
|
452
|
-
var comboboxTemplate = (context) => {
|
|
453
|
-
const popupTag = context.tagFor(Popup);
|
|
2
|
+
import { n as applyHostSemantics } from "./host-semantics.js";
|
|
3
|
+
import { t as Optgroup } from "./optgroup.js";
|
|
4
|
+
import { html, slotted } from "@microsoft/fast-element";
|
|
5
|
+
//#region src/lib/optgroup/optgroup.template.ts
|
|
6
|
+
var OptgroupTemplate = () => {
|
|
454
7
|
return html`
|
|
455
8
|
<template
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
@keydown="${(x, { event }) => {
|
|
461
|
-
if (x.open) handleEscapeKeyAndStopPropogation(event);
|
|
462
|
-
return x.keydownHandler(event);
|
|
463
|
-
}}"
|
|
9
|
+
${applyHostSemantics({
|
|
10
|
+
role: "group",
|
|
11
|
+
ariaLabelledBy: (x) => x._computedLabelledBy
|
|
12
|
+
})}
|
|
464
13
|
>
|
|
465
|
-
<div class="
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
${
|
|
473
|
-
|
|
474
|
-
class="listbox"
|
|
475
|
-
role="listbox"
|
|
476
|
-
?disabled="${(x) => x.disabled}"
|
|
477
|
-
${ref("listbox")}>
|
|
478
|
-
<slot ${slotted({
|
|
479
|
-
filter: Listbox.slottedOptionFilter,
|
|
480
|
-
flatten: true,
|
|
481
|
-
property: "slottedOptions"
|
|
482
|
-
})}>
|
|
483
|
-
</slot>
|
|
484
|
-
</div>
|
|
485
|
-
</${popupTag}>
|
|
486
|
-
</div>
|
|
487
|
-
<div class="feedback-wrapper" @click="${(_, c) => c.event.stopPropagation()}">
|
|
488
|
-
${(x) => x._getFeedbackTemplate(context)}
|
|
14
|
+
<div class="base">
|
|
15
|
+
<slot
|
|
16
|
+
name="label"
|
|
17
|
+
role="presentation"
|
|
18
|
+
${slotted("_labelSlottedContent")}
|
|
19
|
+
></slot>
|
|
20
|
+
<div class="options" role="presentation">
|
|
21
|
+
<slot @slotchange="${(x) => x._onSlotChange()}"></slot>
|
|
22
|
+
</div>
|
|
489
23
|
</div>
|
|
490
|
-
|
|
24
|
+
</template>
|
|
491
25
|
`;
|
|
492
26
|
};
|
|
493
27
|
//#endregion
|
|
494
|
-
//#region src/lib/
|
|
28
|
+
//#region src/lib/optgroup/definition.ts
|
|
495
29
|
/** @internal */
|
|
496
|
-
var
|
|
497
|
-
iconDefinition,
|
|
498
|
-
popupDefinition,
|
|
499
|
-
listboxOptionDefinition,
|
|
500
|
-
feedbackMessageDefinition
|
|
501
|
-
], {
|
|
502
|
-
styles: [text_field_default, combobox_default],
|
|
503
|
-
shadowOptions: { delegatesFocus: true }
|
|
504
|
-
});
|
|
30
|
+
var optgroupDefinition = defineVividComponent("optgroup", Optgroup, OptgroupTemplate, [], { styles: ":host{display:block}.base{flex-direction:column;display:flex}slot[name=label]{color:var(--vvd-color-neutral-600);font:var(--vvd-typography-base-condensed-bold);user-select:none;padding-block:8px 4px;padding-inline:8px;display:flex}.options{flex-direction:column;gap:2px;display:flex}" });
|
|
505
31
|
/**
|
|
506
|
-
* Registers the
|
|
32
|
+
* Registers the optgroup element with the design system.
|
|
507
33
|
*
|
|
508
34
|
* @param prefix - the prefix to use for the component name
|
|
509
35
|
*/
|
|
510
|
-
var
|
|
36
|
+
var registerOptgroup = createRegisterFunction(optgroupDefinition);
|
|
511
37
|
//#endregion
|
|
512
|
-
export {
|
|
38
|
+
export { registerOptgroup as n, optgroupDefinition as t };
|