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