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