@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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const require_option = require("./option.cjs");
|
|
2
|
+
const require_optgroup = require("./optgroup.cjs");
|
|
3
|
+
//#region src/shared/foundation/listbox/extractOptions.ts
|
|
4
|
+
/**
|
|
5
|
+
* Extracts all options from a list of slotted elements, including options nested inside optgroups.
|
|
6
|
+
*/
|
|
7
|
+
function extractOptions(elements) {
|
|
8
|
+
const options = [];
|
|
9
|
+
for (const item of elements) if (require_option.isListboxOption(item)) options.push(item);
|
|
10
|
+
else if (require_optgroup.isOptgroup(item)) {
|
|
11
|
+
for (const child of Array.from(item.children)) if (require_option.isListboxOption(child)) options.push(child);
|
|
12
|
+
}
|
|
13
|
+
return options;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
Object.defineProperty(exports, "extractOptions", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function() {
|
|
19
|
+
return extractOptions;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { n as isListboxOption } from "./option.js";
|
|
2
|
+
import { n as isOptgroup } from "./optgroup.js";
|
|
3
|
+
//#region src/shared/foundation/listbox/extractOptions.ts
|
|
4
|
+
/**
|
|
5
|
+
* Extracts all options from a list of slotted elements, including options nested inside optgroups.
|
|
6
|
+
*/
|
|
7
|
+
function extractOptions(elements) {
|
|
8
|
+
const options = [];
|
|
9
|
+
for (const item of elements) if (isListboxOption(item)) options.push(item);
|
|
10
|
+
else if (isOptgroup(item)) {
|
|
11
|
+
for (const child of Array.from(item.children)) if (isListboxOption(child)) options.push(child);
|
|
12
|
+
}
|
|
13
|
+
return options;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { extractOptions as t };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
require("./chunk.cjs");
|
|
2
|
+
const require_vivid_element = require("./vivid-element.cjs");
|
|
3
|
+
const require_numberConverter = require("./numberConverter.cjs");
|
|
4
|
+
const require_decorate = require("./decorate.cjs");
|
|
5
|
+
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
6
|
+
//#region src/lib/icon/icon.ts
|
|
7
|
+
var PLACEHOLDER_DELAY = 500;
|
|
8
|
+
var PLACEHOLDER_TIMEOUT = 2e3;
|
|
9
|
+
/**
|
|
10
|
+
* @public
|
|
11
|
+
* @component icon
|
|
12
|
+
* @slot - Default slot.
|
|
13
|
+
* @testQuery name name
|
|
14
|
+
*/
|
|
15
|
+
var Icon = class extends require_vivid_element.VividElement {
|
|
16
|
+
constructor(..._args) {
|
|
17
|
+
super(..._args);
|
|
18
|
+
this.iconLoaded = false;
|
|
19
|
+
this.#currentRequestId = 0;
|
|
20
|
+
this.#abortController = null;
|
|
21
|
+
}
|
|
22
|
+
#currentRequestId;
|
|
23
|
+
#abortController;
|
|
24
|
+
/** @internal */
|
|
25
|
+
async nameChanged() {
|
|
26
|
+
const requestId = ++this.#currentRequestId;
|
|
27
|
+
if (this.#abortController) this.#abortController.abort();
|
|
28
|
+
this.#abortController = new AbortController();
|
|
29
|
+
this._svg = void 0;
|
|
30
|
+
this.iconLoaded = false;
|
|
31
|
+
let timeout = setTimeout(() => {
|
|
32
|
+
/* v8 ignore else -- @preserve */
|
|
33
|
+
if (this.#currentRequestId === requestId) {
|
|
34
|
+
this._svg = require_numberConverter.PLACEHOLDER_ICON;
|
|
35
|
+
timeout = setTimeout(() => {
|
|
36
|
+
/* v8 ignore else -- @preserve */
|
|
37
|
+
if (this.#currentRequestId === requestId && this._svg === require_numberConverter.PLACEHOLDER_ICON) this._svg = void 0;
|
|
38
|
+
}, PLACEHOLDER_TIMEOUT);
|
|
39
|
+
}
|
|
40
|
+
}, PLACEHOLDER_DELAY);
|
|
41
|
+
try {
|
|
42
|
+
const svg = await require_numberConverter.resolveIcon(this.name, this.#abortController.signal);
|
|
43
|
+
/* v8 ignore else -- @preserve */
|
|
44
|
+
if (this.#currentRequestId === requestId) this._svg = svg;
|
|
45
|
+
} catch {
|
|
46
|
+
if (this.#currentRequestId === requestId) this._svg = void 0;
|
|
47
|
+
} finally {
|
|
48
|
+
if (this.#currentRequestId === requestId) {
|
|
49
|
+
clearTimeout(timeout);
|
|
50
|
+
this.iconLoaded = true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Icon.prototype, "connotation", void 0);
|
|
56
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ converter: require_numberConverter.numberConverter })], Icon.prototype, "size", void 0);
|
|
57
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], Icon.prototype, "_svg", void 0);
|
|
58
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], Icon.prototype, "iconLoaded", void 0);
|
|
59
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Icon.prototype, "label", void 0);
|
|
60
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Icon.prototype, "name", void 0);
|
|
61
|
+
//#endregion
|
|
62
|
+
Object.defineProperty(exports, "Icon", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function() {
|
|
65
|
+
return Icon;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { t as VividElement } from "./vivid-element.js";
|
|
2
|
+
import { n as resolveIcon, r as PLACEHOLDER_ICON, t as numberConverter } from "./numberConverter.js";
|
|
3
|
+
import { t as __decorate } from "./decorate.js";
|
|
4
|
+
import { attr, observable } from "@microsoft/fast-element";
|
|
5
|
+
//#region src/lib/icon/icon.ts
|
|
6
|
+
var PLACEHOLDER_DELAY = 500;
|
|
7
|
+
var PLACEHOLDER_TIMEOUT = 2e3;
|
|
8
|
+
/**
|
|
9
|
+
* @public
|
|
10
|
+
* @component icon
|
|
11
|
+
* @slot - Default slot.
|
|
12
|
+
* @testQuery name name
|
|
13
|
+
*/
|
|
14
|
+
var Icon = class extends VividElement {
|
|
15
|
+
constructor(..._args) {
|
|
16
|
+
super(..._args);
|
|
17
|
+
this.iconLoaded = false;
|
|
18
|
+
this.#currentRequestId = 0;
|
|
19
|
+
this.#abortController = null;
|
|
20
|
+
}
|
|
21
|
+
#currentRequestId;
|
|
22
|
+
#abortController;
|
|
23
|
+
/** @internal */
|
|
24
|
+
async nameChanged() {
|
|
25
|
+
const requestId = ++this.#currentRequestId;
|
|
26
|
+
if (this.#abortController) this.#abortController.abort();
|
|
27
|
+
this.#abortController = new AbortController();
|
|
28
|
+
this._svg = void 0;
|
|
29
|
+
this.iconLoaded = false;
|
|
30
|
+
let timeout = setTimeout(() => {
|
|
31
|
+
/* v8 ignore else -- @preserve */
|
|
32
|
+
if (this.#currentRequestId === requestId) {
|
|
33
|
+
this._svg = PLACEHOLDER_ICON;
|
|
34
|
+
timeout = setTimeout(() => {
|
|
35
|
+
/* v8 ignore else -- @preserve */
|
|
36
|
+
if (this.#currentRequestId === requestId && this._svg === PLACEHOLDER_ICON) this._svg = void 0;
|
|
37
|
+
}, PLACEHOLDER_TIMEOUT);
|
|
38
|
+
}
|
|
39
|
+
}, PLACEHOLDER_DELAY);
|
|
40
|
+
try {
|
|
41
|
+
const svg = await resolveIcon(this.name, this.#abortController.signal);
|
|
42
|
+
/* v8 ignore else -- @preserve */
|
|
43
|
+
if (this.#currentRequestId === requestId) this._svg = svg;
|
|
44
|
+
} catch {
|
|
45
|
+
if (this.#currentRequestId === requestId) this._svg = void 0;
|
|
46
|
+
} finally {
|
|
47
|
+
if (this.#currentRequestId === requestId) {
|
|
48
|
+
clearTimeout(timeout);
|
|
49
|
+
this.iconLoaded = true;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
__decorate([attr], Icon.prototype, "connotation", void 0);
|
|
55
|
+
__decorate([attr({ converter: numberConverter })], Icon.prototype, "size", void 0);
|
|
56
|
+
__decorate([observable], Icon.prototype, "_svg", void 0);
|
|
57
|
+
__decorate([observable], Icon.prototype, "iconLoaded", void 0);
|
|
58
|
+
__decorate([attr], Icon.prototype, "label", void 0);
|
|
59
|
+
__decorate([attr], Icon.prototype, "name", void 0);
|
|
60
|
+
//#endregion
|
|
61
|
+
export { Icon as t };
|
package/unbundled/linkable.cjs
CHANGED
|
@@ -3,7 +3,7 @@ const require_decorate = require("./decorate.cjs");
|
|
|
3
3
|
const require_delegates_aria = require("./delegates-aria.cjs");
|
|
4
4
|
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
5
5
|
//#region src/shared/patterns/linkable.ts
|
|
6
|
-
/** Mixin for components that can be links, inherits attributes from
|
|
6
|
+
/** Mixin for components that can be links, inherits attributes from [`<a>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a). */
|
|
7
7
|
var Linkable = (Base) => {
|
|
8
8
|
class LinkableElement extends require_delegates_aria.DelegatesAria(Base) {
|
|
9
9
|
constructor(..._args) {
|
package/unbundled/linkable.js
CHANGED
|
@@ -2,7 +2,7 @@ import { t as __decorate } from "./decorate.js";
|
|
|
2
2
|
import { n as delegateAria, t as DelegatesAria } from "./delegates-aria.js";
|
|
3
3
|
import { attr, html, ref } from "@microsoft/fast-element";
|
|
4
4
|
//#region src/shared/patterns/linkable.ts
|
|
5
|
-
/** Mixin for components that can be links, inherits attributes from
|
|
5
|
+
/** Mixin for components that can be links, inherits attributes from [`<a>` element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a). */
|
|
6
6
|
var Linkable = (Base) => {
|
|
7
7
|
class LinkableElement extends DelegatesAria(Base) {
|
|
8
8
|
constructor(..._args) {
|
package/unbundled/listbox.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
require("./chunk.cjs");
|
|
2
2
|
const require_vivid_element = require("./vivid-element.cjs");
|
|
3
3
|
const require_decorate = require("./decorate.cjs");
|
|
4
|
-
const
|
|
4
|
+
const require_option = require("./option.cjs");
|
|
5
|
+
const require_optgroup = require("./optgroup.cjs");
|
|
6
|
+
const require_extractOptions = require("./extractOptions.cjs");
|
|
5
7
|
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
6
8
|
let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
|
|
7
9
|
//#region src/shared/foundation/listbox/listbox.ts
|
|
@@ -16,6 +18,9 @@ var Listbox = class Listbox extends require_vivid_element.VividElement {
|
|
|
16
18
|
this.typeaheadExpired = true;
|
|
17
19
|
this.typeaheadTimeout = -1;
|
|
18
20
|
this._activeDescendant = null;
|
|
21
|
+
this._onOptgroupChange = () => {
|
|
22
|
+
this.slottedOptionsChanged(void 0, this.slottedOptions);
|
|
23
|
+
};
|
|
19
24
|
}
|
|
20
25
|
/**
|
|
21
26
|
* The first selected option.
|
|
@@ -44,7 +49,7 @@ var Listbox = class Listbox extends require_vivid_element.VividElement {
|
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
51
|
static {
|
|
47
|
-
this.slottedOptionFilter = (n) =>
|
|
52
|
+
this.slottedOptionFilter = (n) => require_option.isListboxOption(n) && !n.hidden || require_optgroup.isOptgroup(n);
|
|
48
53
|
}
|
|
49
54
|
static {
|
|
50
55
|
this.TYPE_AHEAD_TIMEOUT_MS = 1e3;
|
|
@@ -293,6 +298,11 @@ var Listbox = class Listbox extends require_vivid_element.VividElement {
|
|
|
293
298
|
_isDefaultSelected(option) {
|
|
294
299
|
return option.defaultSelected;
|
|
295
300
|
}
|
|
301
|
+
/** @internal */
|
|
302
|
+
_activeDescendantChanged(_prev, next) {
|
|
303
|
+
if (!this.$fastController?.isConnected) return;
|
|
304
|
+
for (const option of this.options) option._highlighted = Boolean(next && option.id === next);
|
|
305
|
+
}
|
|
296
306
|
/** Sets an option as selected and gives it focus. */
|
|
297
307
|
setSelectedOptions() {
|
|
298
308
|
this.selectedOptions = this.selectedIndex !== -1 ? [this.options[this.selectedIndex]] : [];
|
|
@@ -300,16 +310,20 @@ var Listbox = class Listbox extends require_vivid_element.VividElement {
|
|
|
300
310
|
this.focusAndScrollOptionIntoView();
|
|
301
311
|
}
|
|
302
312
|
/**
|
|
313
|
+
* Extracts all options from a list of slotted elements, including options nested inside optgroups.
|
|
314
|
+
*
|
|
315
|
+
* @internal
|
|
316
|
+
*/
|
|
317
|
+
static extractOptions(elements) {
|
|
318
|
+
return require_extractOptions.extractOptions(elements);
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
303
321
|
* Updates the list of options and resets the selected option when the slotted option content changes.
|
|
304
322
|
*
|
|
305
323
|
* @internal
|
|
306
324
|
*/
|
|
307
325
|
slottedOptionsChanged(_, next) {
|
|
308
|
-
this.options =
|
|
309
|
-
/* v8 ignore else -- @preserve */
|
|
310
|
-
if (require_definition.isListboxOption(item)) options.push(item);
|
|
311
|
-
return options;
|
|
312
|
-
}, []);
|
|
326
|
+
this.options = Listbox.extractOptions(next);
|
|
313
327
|
const setSize = `${this.options.length}`;
|
|
314
328
|
this.options.forEach((option, index) => {
|
|
315
329
|
if (!option.id) option.id = (0, _microsoft_fast_web_utilities.uniqueId)("option-");
|
|
@@ -334,6 +348,14 @@ var Listbox = class Listbox extends require_vivid_element.VividElement {
|
|
|
334
348
|
this.typeaheadExpired = false;
|
|
335
349
|
}
|
|
336
350
|
}
|
|
351
|
+
connectedCallback() {
|
|
352
|
+
super.connectedCallback();
|
|
353
|
+
this.addEventListener("optgroup-change", this._onOptgroupChange);
|
|
354
|
+
}
|
|
355
|
+
disconnectedCallback() {
|
|
356
|
+
this.removeEventListener("optgroup-change", this._onOptgroupChange);
|
|
357
|
+
super.disconnectedCallback();
|
|
358
|
+
}
|
|
337
359
|
};
|
|
338
360
|
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], Listbox.prototype, "disabled", void 0);
|
|
339
361
|
require_decorate.__decorate([_microsoft_fast_element.observable], Listbox.prototype, "selectedIndex", void 0);
|
package/unbundled/listbox.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { t as VividElement } from "./vivid-element.js";
|
|
2
2
|
import { t as __decorate } from "./decorate.js";
|
|
3
|
-
import {
|
|
3
|
+
import { n as isListboxOption } from "./option.js";
|
|
4
|
+
import { n as isOptgroup } from "./optgroup.js";
|
|
5
|
+
import { t as extractOptions } from "./extractOptions.js";
|
|
4
6
|
import { Observable, attr, observable } from "@microsoft/fast-element";
|
|
5
7
|
import { findLastIndex, keyArrowDown, keyArrowUp, keyEnd, keyEnter, keyEscape, keyHome, keySpace, keyTab, uniqueId } from "@microsoft/fast-web-utilities";
|
|
6
8
|
//#region src/shared/foundation/listbox/listbox.ts
|
|
@@ -15,6 +17,9 @@ var Listbox = class Listbox extends VividElement {
|
|
|
15
17
|
this.typeaheadExpired = true;
|
|
16
18
|
this.typeaheadTimeout = -1;
|
|
17
19
|
this._activeDescendant = null;
|
|
20
|
+
this._onOptgroupChange = () => {
|
|
21
|
+
this.slottedOptionsChanged(void 0, this.slottedOptions);
|
|
22
|
+
};
|
|
18
23
|
}
|
|
19
24
|
/**
|
|
20
25
|
* The first selected option.
|
|
@@ -43,7 +48,7 @@ var Listbox = class Listbox extends VividElement {
|
|
|
43
48
|
}
|
|
44
49
|
}
|
|
45
50
|
static {
|
|
46
|
-
this.slottedOptionFilter = (n) => isListboxOption(n) && !n.hidden;
|
|
51
|
+
this.slottedOptionFilter = (n) => isListboxOption(n) && !n.hidden || isOptgroup(n);
|
|
47
52
|
}
|
|
48
53
|
static {
|
|
49
54
|
this.TYPE_AHEAD_TIMEOUT_MS = 1e3;
|
|
@@ -292,6 +297,11 @@ var Listbox = class Listbox extends VividElement {
|
|
|
292
297
|
_isDefaultSelected(option) {
|
|
293
298
|
return option.defaultSelected;
|
|
294
299
|
}
|
|
300
|
+
/** @internal */
|
|
301
|
+
_activeDescendantChanged(_prev, next) {
|
|
302
|
+
if (!this.$fastController?.isConnected) return;
|
|
303
|
+
for (const option of this.options) option._highlighted = Boolean(next && option.id === next);
|
|
304
|
+
}
|
|
295
305
|
/** Sets an option as selected and gives it focus. */
|
|
296
306
|
setSelectedOptions() {
|
|
297
307
|
this.selectedOptions = this.selectedIndex !== -1 ? [this.options[this.selectedIndex]] : [];
|
|
@@ -299,16 +309,20 @@ var Listbox = class Listbox extends VividElement {
|
|
|
299
309
|
this.focusAndScrollOptionIntoView();
|
|
300
310
|
}
|
|
301
311
|
/**
|
|
312
|
+
* Extracts all options from a list of slotted elements, including options nested inside optgroups.
|
|
313
|
+
*
|
|
314
|
+
* @internal
|
|
315
|
+
*/
|
|
316
|
+
static extractOptions(elements) {
|
|
317
|
+
return extractOptions(elements);
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
302
320
|
* Updates the list of options and resets the selected option when the slotted option content changes.
|
|
303
321
|
*
|
|
304
322
|
* @internal
|
|
305
323
|
*/
|
|
306
324
|
slottedOptionsChanged(_, next) {
|
|
307
|
-
this.options =
|
|
308
|
-
/* v8 ignore else -- @preserve */
|
|
309
|
-
if (isListboxOption(item)) options.push(item);
|
|
310
|
-
return options;
|
|
311
|
-
}, []);
|
|
325
|
+
this.options = Listbox.extractOptions(next);
|
|
312
326
|
const setSize = `${this.options.length}`;
|
|
313
327
|
this.options.forEach((option, index) => {
|
|
314
328
|
if (!option.id) option.id = uniqueId("option-");
|
|
@@ -333,6 +347,14 @@ var Listbox = class Listbox extends VividElement {
|
|
|
333
347
|
this.typeaheadExpired = false;
|
|
334
348
|
}
|
|
335
349
|
}
|
|
350
|
+
connectedCallback() {
|
|
351
|
+
super.connectedCallback();
|
|
352
|
+
this.addEventListener("optgroup-change", this._onOptgroupChange);
|
|
353
|
+
}
|
|
354
|
+
disconnectedCallback() {
|
|
355
|
+
this.removeEventListener("optgroup-change", this._onOptgroupChange);
|
|
356
|
+
super.disconnectedCallback();
|
|
357
|
+
}
|
|
336
358
|
};
|
|
337
359
|
__decorate([attr({ mode: "boolean" })], Listbox.prototype, "disabled", void 0);
|
|
338
360
|
__decorate([observable], Listbox.prototype, "selectedIndex", void 0);
|
package/unbundled/mixins.cjs
CHANGED
|
@@ -2,6 +2,7 @@ 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 require_icon = require("./icon.cjs");
|
|
5
6
|
const require_localized = require("./localized.cjs");
|
|
6
7
|
const require_definition$1 = require("./definition22.cjs");
|
|
7
8
|
const require_randomId = require("./randomId.cjs");
|
|
@@ -20,7 +21,7 @@ var FeedbackMessage = class extends require_localized.Localized(require_vivid_el
|
|
|
20
21
|
};
|
|
21
22
|
require_decorate.__decorate([_microsoft_fast_element.attr], FeedbackMessage.prototype, "type", void 0);
|
|
22
23
|
function iconTemplate(context, icon, textI18nKey) {
|
|
23
|
-
const iconTag = context.tagFor(
|
|
24
|
+
const iconTag = context.tagFor(require_icon.Icon);
|
|
24
25
|
return _microsoft_fast_element.html`<${iconTag} class="icon" name="${icon}" label="${(x) => x.locale.feedbackMessage[textI18nKey]}"></${iconTag}>`;
|
|
25
26
|
}
|
|
26
27
|
function iconForType(context) {
|
package/unbundled/mixins.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as VividElement, u as defineVividComponent } from "./vivid-element.js";
|
|
2
|
-
import {
|
|
2
|
+
import { t as iconDefinition } from "./definition.js";
|
|
3
3
|
import { t as __decorate } from "./decorate.js";
|
|
4
|
+
import { t as Icon } from "./icon.js";
|
|
4
5
|
import { t as Localized } from "./localized.js";
|
|
5
6
|
import { n as visuallyHiddenDefinition } from "./definition22.js";
|
|
6
7
|
import { n as renderInLightDOM, t as generateRandomId } from "./randomId.js";
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
require("./chunk.cjs");
|
|
2
|
+
const require_vivid_element = require("./vivid-element.cjs");
|
|
3
|
+
const require_decorate = require("./decorate.cjs");
|
|
4
|
+
const require_host_semantics = require("./host-semantics.cjs");
|
|
5
|
+
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
6
|
+
let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
|
|
7
|
+
//#region src/lib/optgroup/optgroup.ts
|
|
8
|
+
/**
|
|
9
|
+
* Determines if the element is an {@link Optgroup}
|
|
10
|
+
*
|
|
11
|
+
* @param element - the element to test.
|
|
12
|
+
*/
|
|
13
|
+
function isOptgroup(el) {
|
|
14
|
+
return el instanceof Optgroup;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Groups options within Select, Searchable Select, or Combobox components
|
|
18
|
+
*
|
|
19
|
+
* @public
|
|
20
|
+
* @component optgroup
|
|
21
|
+
* @slot - Use the default slot to add Option elements to the group.
|
|
22
|
+
* @slot label - Use the label slot to provide a label for the Optgroup.
|
|
23
|
+
*/
|
|
24
|
+
var Optgroup = class extends require_host_semantics.HostSemantics(require_vivid_element.VividElement) {
|
|
25
|
+
constructor(..._args) {
|
|
26
|
+
super(..._args);
|
|
27
|
+
this._computedLabelledBy = null;
|
|
28
|
+
}
|
|
29
|
+
/** @internal */
|
|
30
|
+
_labelSlottedContentChanged() {
|
|
31
|
+
const elements = this._labelSlottedContent.filter((node) => node instanceof Element);
|
|
32
|
+
const ids = [];
|
|
33
|
+
for (const el of elements) {
|
|
34
|
+
if (!el.id) el.id = (0, _microsoft_fast_web_utilities.uniqueId)("vvd-optgroup-label-");
|
|
35
|
+
ids.push(el.id);
|
|
36
|
+
}
|
|
37
|
+
this._computedLabelledBy = ids.join(" ");
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Handles changes to the default slot.
|
|
41
|
+
* Dispatches a bubbling, composed event so that parent components
|
|
42
|
+
* (Select, Combobox, Searchable Select) can re-process their options.
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
_onSlotChange() {
|
|
46
|
+
this.$emit("optgroup-change", void 0, {
|
|
47
|
+
bubbles: true,
|
|
48
|
+
composed: true
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], Optgroup.prototype, "_labelSlottedContent", void 0);
|
|
53
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], Optgroup.prototype, "_computedLabelledBy", void 0);
|
|
54
|
+
//#endregion
|
|
55
|
+
Object.defineProperty(exports, "Optgroup", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function() {
|
|
58
|
+
return Optgroup;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(exports, "isOptgroup", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function() {
|
|
64
|
+
return isOptgroup;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { t as VividElement } from "./vivid-element.js";
|
|
2
|
+
import { t as __decorate } from "./decorate.js";
|
|
3
|
+
import { t as HostSemantics } from "./host-semantics.js";
|
|
4
|
+
import { observable } from "@microsoft/fast-element";
|
|
5
|
+
import { uniqueId } from "@microsoft/fast-web-utilities";
|
|
6
|
+
//#region src/lib/optgroup/optgroup.ts
|
|
7
|
+
/**
|
|
8
|
+
* Determines if the element is an {@link Optgroup}
|
|
9
|
+
*
|
|
10
|
+
* @param element - the element to test.
|
|
11
|
+
*/
|
|
12
|
+
function isOptgroup(el) {
|
|
13
|
+
return el instanceof Optgroup;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Groups options within Select, Searchable Select, or Combobox components
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
* @component optgroup
|
|
20
|
+
* @slot - Use the default slot to add Option elements to the group.
|
|
21
|
+
* @slot label - Use the label slot to provide a label for the Optgroup.
|
|
22
|
+
*/
|
|
23
|
+
var Optgroup = class extends HostSemantics(VividElement) {
|
|
24
|
+
constructor(..._args) {
|
|
25
|
+
super(..._args);
|
|
26
|
+
this._computedLabelledBy = null;
|
|
27
|
+
}
|
|
28
|
+
/** @internal */
|
|
29
|
+
_labelSlottedContentChanged() {
|
|
30
|
+
const elements = this._labelSlottedContent.filter((node) => node instanceof Element);
|
|
31
|
+
const ids = [];
|
|
32
|
+
for (const el of elements) {
|
|
33
|
+
if (!el.id) el.id = uniqueId("vvd-optgroup-label-");
|
|
34
|
+
ids.push(el.id);
|
|
35
|
+
}
|
|
36
|
+
this._computedLabelledBy = ids.join(" ");
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Handles changes to the default slot.
|
|
40
|
+
* Dispatches a bubbling, composed event so that parent components
|
|
41
|
+
* (Select, Combobox, Searchable Select) can re-process their options.
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
_onSlotChange() {
|
|
45
|
+
this.$emit("optgroup-change", void 0, {
|
|
46
|
+
bubbles: true,
|
|
47
|
+
composed: true
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
__decorate([observable], Optgroup.prototype, "_labelSlottedContent", void 0);
|
|
52
|
+
__decorate([observable], Optgroup.prototype, "_computedLabelledBy", void 0);
|
|
53
|
+
//#endregion
|
|
54
|
+
export { isOptgroup as n, Optgroup as t };
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
require("./chunk.cjs");
|
|
2
|
+
const require_vivid_element = require("./vivid-element.cjs");
|
|
3
|
+
const require_decorate = require("./decorate.cjs");
|
|
4
|
+
const require_affix = require("./affix.cjs");
|
|
5
|
+
const require_host_semantics = require("./host-semantics.cjs");
|
|
6
|
+
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
7
|
+
let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
|
|
8
|
+
//#region src/lib/option/option.ts
|
|
9
|
+
/**
|
|
10
|
+
* Determines if the element is a {@link (ListboxOption:class)}
|
|
11
|
+
*
|
|
12
|
+
* @param element - the element to test.
|
|
13
|
+
*/
|
|
14
|
+
function isListboxOption(el) {
|
|
15
|
+
return (0, _microsoft_fast_web_utilities.isHTMLElement)(el) && (el.getAttribute("role") === "option" || el instanceof HTMLOptionElement || el instanceof ListboxOption);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Implements [ARIA option](https://www.w3.org/TR/wai-aria-1.1/#option).
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
* @component option
|
|
22
|
+
* @slot icon - The preferred way to add an icon to the component.
|
|
23
|
+
* @slot tag-icon - Icon to be displayed in the tag when selected inside a Searchable Select.
|
|
24
|
+
* @slot trailing-meta - For additional elements at the end of the Option.
|
|
25
|
+
* @testAction click click #locator
|
|
26
|
+
*/
|
|
27
|
+
var ListboxOption = class extends require_host_semantics.HostSemantics(require_affix.AffixIconWithTrailing(require_vivid_element.VividElement)) {
|
|
28
|
+
defaultSelectedChanged() {
|
|
29
|
+
if (!this.dirtySelected) {
|
|
30
|
+
this.selected = this.defaultSelected;
|
|
31
|
+
if (this.proxy instanceof HTMLOptionElement) this.proxy.selected = this.defaultSelected;
|
|
32
|
+
}
|
|
33
|
+
if (this.proxy instanceof HTMLOptionElement) this.proxy.defaultSelected = this.defaultSelected;
|
|
34
|
+
}
|
|
35
|
+
disabledChanged() {
|
|
36
|
+
/* v8 ignore if -- @preserve */
|
|
37
|
+
if (this.proxy instanceof HTMLOptionElement) this.proxy.disabled = this.disabled;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Alias for `defaultSelected`, mirroring the option's initial selected state (the
|
|
41
|
+
* `selected` attribute). Distinct from `current-selected`, which reflects the
|
|
42
|
+
* option's live selected state.
|
|
43
|
+
* @deprecated Use `defaultSelected` instead.
|
|
44
|
+
*/
|
|
45
|
+
get selectedAttribute() {
|
|
46
|
+
return this.defaultSelected;
|
|
47
|
+
}
|
|
48
|
+
set selectedAttribute(value) {
|
|
49
|
+
this.defaultSelected = value;
|
|
50
|
+
}
|
|
51
|
+
selectedChanged() {
|
|
52
|
+
if (!this.dirtySelected) this.dirtySelected = true;
|
|
53
|
+
if (this.proxy instanceof HTMLOptionElement) this.proxy.selected = this.selected;
|
|
54
|
+
}
|
|
55
|
+
valueChanged() {
|
|
56
|
+
if (typeof this.value !== "string") {
|
|
57
|
+
this.value = "";
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (this.proxy instanceof HTMLOptionElement) this.proxy.value = this.value;
|
|
61
|
+
}
|
|
62
|
+
get label() {
|
|
63
|
+
return this._label ?? this.text;
|
|
64
|
+
}
|
|
65
|
+
set label(value) {
|
|
66
|
+
this._label = value;
|
|
67
|
+
}
|
|
68
|
+
set text(value) {
|
|
69
|
+
this._text = value;
|
|
70
|
+
}
|
|
71
|
+
get text() {
|
|
72
|
+
return this._text ?? "";
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Provides an accessible name for use by parent components.
|
|
76
|
+
* Note: Does not implement full accessible name computation, e.g. slotted content is missed.
|
|
77
|
+
* @internal
|
|
78
|
+
*/
|
|
79
|
+
_getAccessibleName() {
|
|
80
|
+
return this.ariaLabel || `${this.text}${this.textSecondary ? ` ${this.textSecondary}` : ""}`;
|
|
81
|
+
}
|
|
82
|
+
get form() {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
/** @internal */
|
|
86
|
+
get _hasMatchedText() {
|
|
87
|
+
return Boolean(this.matchedText ?? this._vvdSearchText);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* From is inclusive, to is exclusive.
|
|
91
|
+
* @internal
|
|
92
|
+
*/
|
|
93
|
+
get _matchedRange() {
|
|
94
|
+
const matchedText = this.matchedText ?? this._vvdSearchText;
|
|
95
|
+
if (matchedText) {
|
|
96
|
+
const matchIndex = this.text.toLowerCase().indexOf(matchedText.toLowerCase());
|
|
97
|
+
return matchIndex === -1 ? {
|
|
98
|
+
from: 0,
|
|
99
|
+
to: 0
|
|
100
|
+
} : {
|
|
101
|
+
from: matchIndex,
|
|
102
|
+
to: matchIndex + matchedText.length
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
from: 0,
|
|
107
|
+
to: 0
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
constructor(text, value, defaultSelected, selected) {
|
|
111
|
+
super();
|
|
112
|
+
this.defaultSelected = false;
|
|
113
|
+
this.dirtySelected = false;
|
|
114
|
+
this.value = "";
|
|
115
|
+
this._highlighted = false;
|
|
116
|
+
this._displayCheckmark = false;
|
|
117
|
+
this._vvdSearchText = "";
|
|
118
|
+
this._isNotMatching = false;
|
|
119
|
+
if (text) this.text = text;
|
|
120
|
+
if (value) this.value = value;
|
|
121
|
+
if (defaultSelected) this.defaultSelected = defaultSelected;
|
|
122
|
+
if (selected) this.selected = selected;
|
|
123
|
+
this.proxy = new Option(this.text, this.value, this.defaultSelected, this.selected);
|
|
124
|
+
this.proxy.disabled = this.disabled;
|
|
125
|
+
}
|
|
126
|
+
/** @internal */
|
|
127
|
+
connectedCallback() {
|
|
128
|
+
super.connectedCallback();
|
|
129
|
+
if (!this.dirtySelected) {
|
|
130
|
+
this.selected = this.defaultSelected;
|
|
131
|
+
this.dirtySelected = false;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ converter: {
|
|
136
|
+
fromView: (value) => {
|
|
137
|
+
if (value === true || value === "true") return true;
|
|
138
|
+
if (value === false || value === "false") return false;
|
|
139
|
+
},
|
|
140
|
+
toView: (value) => value
|
|
141
|
+
} })], ListboxOption.prototype, "checked", void 0);
|
|
142
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
|
|
143
|
+
attribute: "selected",
|
|
144
|
+
mode: "boolean"
|
|
145
|
+
})], ListboxOption.prototype, "defaultSelected", void 0);
|
|
146
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], ListboxOption.prototype, "disabled", void 0);
|
|
147
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
|
|
148
|
+
attribute: "current-selected",
|
|
149
|
+
mode: "boolean"
|
|
150
|
+
})], ListboxOption.prototype, "selected", void 0);
|
|
151
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "value" })], ListboxOption.prototype, "value", void 0);
|
|
152
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "label" })], ListboxOption.prototype, "_label", void 0);
|
|
153
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "text" })], ListboxOption.prototype, "_text", void 0);
|
|
154
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "text-secondary" })], ListboxOption.prototype, "textSecondary", void 0);
|
|
155
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], ListboxOption.prototype, "_highlighted", void 0);
|
|
156
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], ListboxOption.prototype, "_displayCheckmark", void 0);
|
|
157
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "matched-text" })], ListboxOption.prototype, "matchedText", void 0);
|
|
158
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], ListboxOption.prototype, "_vvdSearchText", void 0);
|
|
159
|
+
require_decorate.__decorate([_microsoft_fast_element.volatile], ListboxOption.prototype, "_hasMatchedText", null);
|
|
160
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], ListboxOption.prototype, "_isNotMatching", void 0);
|
|
161
|
+
require_decorate.__decorate([_microsoft_fast_element.volatile], ListboxOption.prototype, "_matchedRange", null);
|
|
162
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], ListboxOption.prototype, "connotation", void 0);
|
|
163
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "tag-connotation" })], ListboxOption.prototype, "tagConnotation", void 0);
|
|
164
|
+
//#endregion
|
|
165
|
+
Object.defineProperty(exports, "ListboxOption", {
|
|
166
|
+
enumerable: true,
|
|
167
|
+
get: function() {
|
|
168
|
+
return ListboxOption;
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
Object.defineProperty(exports, "isListboxOption", {
|
|
172
|
+
enumerable: true,
|
|
173
|
+
get: function() {
|
|
174
|
+
return isListboxOption;
|
|
175
|
+
}
|
|
176
|
+
});
|