@vonage/vivid 5.23.1 → 5.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/accordion-item/index.cjs +1 -1
- package/accordion-item/index.js +1 -1
- package/audio-player/index.cjs +2 -2
- package/audio-player/index.js +3 -3
- package/avatar/index.cjs +10 -10
- package/avatar/index.js +4 -3
- package/badge/index.cjs +1 -1
- package/badge/index.js +1 -1
- package/breadcrumb-item/index.cjs +9 -5
- package/breadcrumb-item/index.js +11 -6
- package/bundled/affix.cjs +1 -1
- package/bundled/affix.js +1 -1
- package/bundled/definition10.cjs +2 -1
- package/bundled/definition10.js +3 -2
- package/bundled/definition11.cjs +4 -4
- package/bundled/definition11.js +4 -3
- package/bundled/definition12.cjs +1 -1
- package/bundled/definition12.js +1 -0
- package/bundled/definition15.cjs +8 -7
- package/bundled/definition15.js +27 -24
- package/bundled/definition17.cjs +7 -7
- package/bundled/definition17.js +22 -109
- package/bundled/definition18.cjs +12 -83
- package/bundled/definition18.js +20 -426
- package/bundled/definition19.cjs +87 -7
- package/bundled/definition19.js +433 -16
- package/bundled/definition20.cjs +7 -37
- package/bundled/definition20.js +17 -172
- package/bundled/definition21.cjs +35 -27
- package/bundled/definition21.js +155 -154
- package/bundled/definition22.cjs +29 -6
- package/bundled/definition22.js +172 -20
- package/bundled/definition23.cjs +6 -12
- package/bundled/definition23.js +17 -32
- package/bundled/definition24.cjs +12 -39
- package/bundled/definition24.js +33 -67
- package/bundled/definition25.cjs +44 -0
- package/bundled/definition25.js +81 -0
- package/bundled/definition3.cjs +5 -5
- package/bundled/definition3.js +10 -40
- package/bundled/definition4.cjs +6 -6
- package/bundled/definition4.js +4 -3
- package/bundled/definition6.cjs +11 -11
- package/bundled/definition6.js +4 -3
- package/bundled/definition9.cjs +12 -6
- package/bundled/definition9.js +66 -43
- package/bundled/extractOptions.cjs +1 -0
- package/bundled/extractOptions.js +11 -0
- package/bundled/icon.cjs +1 -0
- package/bundled/icon.js +34 -0
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +28 -12
- package/bundled/mixins.cjs +8 -8
- package/bundled/mixins.js +4 -3
- package/bundled/optgroup.cjs +1 -0
- package/bundled/optgroup.js +27 -0
- package/bundled/option.cjs +1 -0
- package/bundled/option.js +93 -0
- package/bundled/render-in-light-dom.cjs +1 -1
- package/bundled/render-in-light-dom.js +16 -19
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +9 -1
- package/card/index.cjs +22 -22
- package/card/index.js +4 -3
- package/color-picker/index.cjs +18 -18
- package/color-picker/index.js +4 -3
- package/combobox/definition.cjs +1 -1
- package/combobox/definition.js +1 -1
- package/combobox/index.cjs +7 -7
- package/combobox/index.js +31 -21
- package/country/definition.cjs +1 -1
- package/country/definition.js +1 -1
- package/country/index.cjs +1 -1
- package/country/index.js +1 -1
- package/country-group/definition.cjs +1 -1
- package/country-group/definition.js +1 -1
- package/country-group/index.cjs +1 -1
- package/country-group/index.js +2 -2
- package/custom-elements.json +8438 -7866
- package/data-grid/definition.cjs +1 -1
- package/data-grid/definition.js +1 -1
- package/data-grid/index.cjs +26 -26
- package/data-grid/index.js +9 -8
- package/date-picker/definition.cjs +1 -1
- package/date-picker/definition.js +1 -1
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +1 -1
- package/date-range-picker/definition.cjs +1 -1
- package/date-range-picker/definition.js +1 -1
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +1 -1
- package/date-time-picker/definition.cjs +1 -1
- package/date-time-picker/definition.js +1 -1
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +1 -1
- package/dial-pad/definition.cjs +1 -1
- package/dial-pad/definition.js +1 -1
- package/dial-pad/index.cjs +7 -7
- package/dial-pad/index.js +124 -54
- package/dialog/definition.cjs +1 -1
- package/dialog/definition.js +1 -1
- package/dialog/index.cjs +14 -14
- package/dialog/index.js +4 -3
- package/divider/definition.cjs +1 -1
- package/divider/definition.js +1 -1
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/empty-state/definition.cjs +1 -1
- package/empty-state/definition.js +1 -1
- package/empty-state/index.cjs +3 -3
- package/empty-state/index.js +4 -3
- package/fab/definition.cjs +1 -1
- package/fab/definition.js +1 -1
- package/file-picker/definition.cjs +1 -1
- package/file-picker/definition.js +1 -1
- package/file-picker/index.cjs +7 -7
- package/file-picker/index.js +4 -3
- package/flag/definition.cjs +1 -1
- package/flag/definition.js +1 -1
- package/header/definition.cjs +1 -1
- package/header/definition.js +1 -1
- package/header/index.cjs +3 -3
- package/header/index.js +3 -3
- package/icon/definition.cjs +2 -1
- package/icon/definition.js +2 -1
- package/index.cjs +209 -198
- package/index.js +59 -54
- package/kbd-key/definition.cjs +1 -1
- package/kbd-key/definition.js +1 -1
- package/kbd-shortcut/definition.cjs +1 -1
- package/kbd-shortcut/definition.js +1 -1
- package/layout/definition.cjs +1 -1
- package/layout/definition.js +1 -1
- package/lib/accordion-item/accordion-item.d.ts +3 -1
- package/lib/action-group/action-group.d.ts +1 -1
- package/lib/alert/alert.d.ts +2 -2
- package/lib/audio-player/audio-player.d.ts +1 -1
- package/lib/avatar/avatar.d.ts +1 -1
- package/lib/badge/badge.d.ts +1 -1
- package/lib/banner/banner.d.ts +3 -3
- package/lib/breadcrumb/breadcrumb.d.ts +1 -1
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/lib/button/button.d.ts +3 -3
- package/lib/calendar-event/calendar-event.d.ts +1 -1
- package/lib/card/card.d.ts +1 -1
- package/lib/checkbox/checkbox.d.ts +6 -6
- package/lib/color-picker/color-picker.d.ts +7 -7
- package/lib/combobox/combobox.d.ts +8 -8
- package/lib/components.d.ts +2 -0
- package/lib/country-group/country-group.d.ts +2 -2
- package/lib/data-grid/data-grid-cell.d.ts +4 -3
- package/lib/data-grid/data-grid-row.d.ts +3 -2
- package/lib/data-grid/data-grid.options.d.ts +5 -0
- package/lib/date-picker/date-picker.d.ts +8 -8
- package/lib/date-range-picker/date-range-picker.d.ts +4 -4
- package/lib/date-time-picker/date-time-picker.d.ts +8 -8
- package/lib/dial-pad/dial-pad.d.ts +2 -2
- package/lib/dialog/dialog.d.ts +2 -2
- package/lib/divider/divider.d.ts +1 -1
- package/lib/fab/fab.d.ts +1 -1
- package/lib/file-picker/file-picker.d.ts +7 -7
- package/lib/header/header.d.ts +1 -1
- package/lib/listbox/definition.d.ts +3 -0
- package/lib/listbox/index.d.ts +1 -0
- package/lib/listbox/listbox.d.ts +1302 -0
- package/lib/listbox/listbox.template.d.ts +3 -0
- package/lib/listbox/variations.browser-spec.d.ts +1 -0
- package/lib/menu/menu.d.ts +2 -3
- package/lib/menu-item/menu-item.d.ts +3 -3
- package/lib/nav/nav.d.ts +1 -1
- package/lib/nav-disclosure/nav-disclosure.d.ts +2 -2
- package/lib/nav-item/nav-item.d.ts +2 -2
- package/lib/note/note.d.ts +1 -1
- package/lib/number-field/number-field.d.ts +9 -10
- package/lib/optgroup/definition.d.ts +3 -0
- package/lib/optgroup/index.d.ts +1 -0
- package/lib/optgroup/optgroup.d.ts +430 -0
- package/lib/optgroup/optgroup.template.d.ts +2 -0
- package/lib/optgroup/variations.browser-spec.d.ts +1 -0
- package/lib/option/option.d.ts +2 -2
- package/lib/pagination/pagination.d.ts +1 -1
- package/lib/popover/popover.d.ts +2 -2
- package/lib/progress/progress.d.ts +1 -1
- package/lib/progress-ring/progress-ring.d.ts +1 -1
- package/lib/radio/radio.d.ts +3 -3
- package/lib/radio-group/radio-group.d.ts +1 -1
- package/lib/range-slider/range-slider.d.ts +3 -3
- package/lib/rich-text-editor/rich-text-editor.d.ts +1 -1
- package/lib/rich-text-editor/rte/features/base.d.ts +1 -0
- package/lib/rich-text-editor/rte/utils/default-textblock.d.ts +2 -2
- package/lib/searchable-select/option-tag.d.ts +1 -1
- package/lib/searchable-select/searchable-select.d.ts +47 -47
- package/lib/select/select.d.ts +9 -9
- package/lib/selectable-box/selectable-box.d.ts +1 -1
- package/lib/simple-color-picker/simple-color-picker.d.ts +2 -2
- package/lib/slider/slider.d.ts +3 -3
- package/lib/split-button/split-button.d.ts +3 -3
- package/lib/status/status.d.ts +1 -1
- package/lib/switch/switch.d.ts +2 -2
- package/lib/tab/tab.d.ts +3 -3
- package/lib/tab-panel/tab-panel.d.ts +1 -1
- package/lib/table/table-cell.d.ts +1 -1
- package/lib/table/table-header-cell.d.ts +1 -1
- package/lib/table/table-row.d.ts +1 -1
- package/lib/table/table-sorting-button.d.ts +1 -1
- package/lib/tag/tag.d.ts +3 -3
- package/lib/tag-group/tag-group.d.ts +1 -1
- package/lib/tag-name-map.d.ts +3 -1
- package/lib/text-area/text-area.d.ts +8 -8
- package/lib/text-field/text-field.d.ts +10 -9
- package/lib/time-picker/time-picker.d.ts +4 -4
- package/lib/toggletip/toggletip.d.ts +3 -2
- package/lib/tooltip/tooltip.d.ts +3 -2
- package/lib/tree-item/tree-item.d.ts +2 -2
- package/lib/tree-view/tree-view.d.ts +1 -1
- package/lib/video-player/video-player.d.ts +1 -1
- package/listbox/definition.cjs +5 -0
- package/listbox/definition.js +2 -0
- package/listbox/index.cjs +11 -0
- package/listbox/index.js +540 -0
- package/menu/index.cjs +1 -1
- package/menu/index.js +1 -1
- package/menu-item/index.cjs +1 -1
- package/menu-item/index.js +1 -1
- package/nav/definition.cjs +1 -1
- package/nav/definition.js +1 -1
- package/nav-disclosure/definition.cjs +1 -1
- package/nav-disclosure/definition.js +1 -1
- package/nav-disclosure/index.cjs +4 -4
- package/nav-disclosure/index.js +4 -3
- package/nav-item/definition.cjs +1 -1
- package/nav-item/definition.js +1 -1
- package/note/definition.cjs +1 -1
- package/note/definition.js +1 -1
- package/number-field/definition.cjs +1 -1
- package/number-field/definition.js +1 -1
- package/number-field/index.cjs +1 -1
- package/number-field/index.js +1 -1
- package/optgroup/definition.cjs +6 -0
- package/optgroup/definition.js +3 -0
- package/optgroup/index.cjs +1 -0
- package/optgroup/index.js +4 -0
- package/option/definition.cjs +2 -1
- package/option/definition.js +2 -1
- package/package.json +9 -8
- package/pagination/definition.cjs +1 -1
- package/pagination/definition.js +1 -1
- package/platform-switch/definition.cjs +1 -1
- package/platform-switch/definition.js +1 -1
- package/popover/definition.cjs +1 -1
- package/popover/definition.js +1 -1
- package/popover/index.cjs +5 -5
- package/popover/index.js +4 -3
- package/progress/definition.cjs +1 -1
- package/progress/definition.js +1 -1
- package/radio/definition.cjs +1 -1
- package/radio/definition.js +1 -1
- package/radio-group/definition.cjs +1 -1
- package/radio-group/definition.js +1 -1
- package/range-slider/definition.cjs +1 -1
- package/range-slider/definition.js +1 -1
- package/rich-text-editor/definition.cjs +1 -1
- package/rich-text-editor/definition.js +1 -1
- package/rich-text-editor/index.cjs +13 -13
- package/rich-text-editor/index.js +26 -23
- package/rich-text-view/definition.cjs +1 -1
- package/rich-text-view/definition.js +1 -1
- package/searchable-select/definition.cjs +1 -1
- package/searchable-select/definition.js +1 -1
- package/searchable-select/index.cjs +23 -23
- package/searchable-select/index.js +67 -49
- package/select/definition.cjs +1 -1
- package/select/definition.js +1 -1
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +1 -1
- package/shared/aria/delegates-aria.d.ts +1 -1
- package/shared/aria/host-semantics.d.ts +1 -1
- package/shared/color-picker/base-color-picker.d.ts +1 -1
- package/shared/feedback/feedback-message.d.ts +1 -1
- package/shared/feedback/mixins.d.ts +2 -2
- package/shared/foundation/button/button.d.ts +2 -2
- package/shared/foundation/form-associated/form-associated.d.ts +2 -2
- package/shared/foundation/listbox/extractOptions.d.ts +2 -0
- package/shared/foundation/listbox/listbox.d.ts +2 -0
- package/shared/listbox/commands.d.ts +17 -0
- package/shared/listbox/move.d.ts +6 -0
- package/shared/listbox/options.d.ts +12 -0
- package/shared/listbox/selection.d.ts +28 -0
- package/shared/listbox/state.d.ts +26 -0
- package/shared/listbox/typeahead.d.ts +8 -0
- package/shared/listbox/with-options-filter.d.ts +440 -0
- package/shared/listbox/with-options.d.ts +862 -0
- package/shared/patterns/affix.d.ts +2 -2
- package/shared/patterns/anchored.d.ts +2 -2
- package/shared/patterns/char-count/char-count.d.ts +1 -1
- package/shared/patterns/form-elements/form-element.d.ts +1 -1
- package/shared/patterns/form-elements/with-contextual-help.d.ts +1 -1
- package/shared/patterns/form-elements/with-error-text.d.ts +1 -1
- package/shared/patterns/form-elements/with-success-text.d.ts +1 -1
- package/shared/patterns/kbd-shortcut.d.ts +1 -1
- package/shared/patterns/linkable.d.ts +1 -1
- package/shared/patterns/localized.d.ts +2 -2
- package/shared/patterns/trapped-focus.d.ts +1 -1
- package/shared/picker-field/mixins/calendar-picker.d.ts +2 -2
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +2 -2
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +1 -1
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +2 -2
- package/shared/picker-field/mixins/single-date-picker.d.ts +2 -2
- package/shared/picker-field/mixins/single-value-picker.d.ts +2 -2
- package/shared/picker-field/mixins/time-selection-picker.d.ts +2 -2
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +4 -4
- package/shared/picker-field/picker-field.d.ts +7 -7
- package/side-drawer/definition.cjs +1 -1
- package/side-drawer/definition.js +1 -1
- package/simple-color-picker/definition.cjs +1 -1
- package/simple-color-picker/definition.js +1 -1
- package/simple-color-picker/index.cjs +6 -6
- package/simple-color-picker/index.js +4 -3
- package/split-button/definition.cjs +1 -1
- package/split-button/definition.js +1 -1
- package/split-button/index.cjs +1 -0
- package/split-button/index.js +1 -0
- package/status/definition.cjs +1 -1
- package/status/definition.js +1 -1
- package/switch/definition.cjs +1 -1
- package/switch/definition.js +1 -1
- package/switch/index.cjs +6 -5
- package/switch/index.js +16 -14
- package/tab/definition.cjs +1 -1
- package/tab/definition.js +1 -1
- package/tab-panel/definition.cjs +1 -1
- package/tab-panel/definition.js +1 -1
- package/table/definition.cjs +1 -1
- package/table/definition.js +1 -1
- package/table/index.cjs +13 -13
- package/table/index.js +4 -3
- package/tabs/definition.cjs +1 -1
- package/tabs/definition.js +1 -1
- package/tag/definition.cjs +1 -1
- package/tag/definition.js +1 -1
- package/tag/index.cjs +11 -11
- package/tag/index.js +4 -3
- package/tag-group/definition.cjs +1 -1
- package/tag-group/definition.js +1 -1
- package/text-area/definition.cjs +1 -1
- package/text-area/definition.js +1 -1
- package/time-picker/definition.cjs +1 -1
- package/time-picker/definition.js +1 -1
- package/tree-item/definition.cjs +1 -1
- package/tree-item/definition.js +1 -1
- package/tree-view/definition.cjs +1 -1
- package/tree-view/definition.js +1 -1
- package/unbundled/affix.cjs +2 -2
- package/unbundled/affix.js +1 -1
- package/unbundled/base-progress.cjs +1 -1
- package/unbundled/base-progress.js +1 -1
- package/unbundled/button.cjs +2 -2
- package/unbundled/button.js +2 -2
- package/unbundled/definition.cjs +2 -65
- package/unbundled/definition.js +4 -61
- package/unbundled/definition11.cjs +4 -3
- package/unbundled/definition11.js +3 -2
- package/unbundled/definition12.cjs +3 -2
- package/unbundled/definition12.js +3 -2
- package/unbundled/definition13.cjs +1 -1
- package/unbundled/definition13.js +1 -1
- package/unbundled/definition14.cjs +2 -1
- package/unbundled/definition14.js +2 -1
- package/unbundled/definition17.cjs +9 -4
- package/unbundled/definition17.js +9 -4
- package/unbundled/definition2.cjs +14 -3
- package/unbundled/definition2.js +15 -4
- package/unbundled/definition21.cjs +2 -1
- package/unbundled/definition21.js +2 -1
- package/unbundled/definition23.cjs +3 -1
- package/unbundled/definition23.js +4 -2
- package/unbundled/definition24.cjs +6 -4
- package/unbundled/definition24.js +6 -4
- package/unbundled/definition25.cjs +2 -1
- package/unbundled/definition25.js +2 -1
- package/unbundled/definition26.cjs +7 -4
- package/unbundled/definition26.js +7 -4
- package/unbundled/definition27.cjs +39 -5
- package/unbundled/definition27.js +40 -6
- package/unbundled/definition28.cjs +4 -3
- package/unbundled/definition28.js +4 -3
- package/unbundled/definition29.cjs +5 -168
- package/unbundled/definition29.js +11 -162
- package/unbundled/definition30.cjs +26 -506
- package/unbundled/definition30.js +24 -498
- package/unbundled/definition31.cjs +503 -39
- package/unbundled/definition31.js +501 -37
- package/unbundled/definition32.cjs +39 -239
- package/unbundled/definition32.js +36 -236
- package/unbundled/definition33.cjs +236 -74
- package/unbundled/definition33.js +233 -71
- package/unbundled/definition34.cjs +74 -1968
- package/unbundled/definition34.js +70 -1940
- package/unbundled/definition35.cjs +1993 -26
- package/unbundled/definition35.js +1965 -27
- package/unbundled/definition36.cjs +26 -111
- package/unbundled/definition36.js +23 -103
- package/unbundled/definition37.cjs +53 -294
- package/unbundled/definition37.js +50 -291
- package/unbundled/definition38.cjs +282 -132
- package/unbundled/definition38.js +279 -129
- package/unbundled/definition39.cjs +165 -339
- package/unbundled/definition39.js +163 -337
- package/unbundled/definition40.cjs +395 -227
- package/unbundled/definition40.js +393 -225
- package/unbundled/definition41.cjs +269 -47
- package/unbundled/definition41.js +264 -42
- package/unbundled/definition42.cjs +48 -67
- package/unbundled/definition42.js +45 -64
- package/unbundled/definition43.cjs +56 -383
- package/unbundled/definition43.js +55 -382
- package/unbundled/definition44.cjs +387 -44
- package/unbundled/definition44.js +383 -40
- package/unbundled/definition45.cjs +53 -45
- package/unbundled/definition45.js +49 -41
- package/unbundled/definition46.cjs +40 -164
- package/unbundled/definition46.js +36 -160
- package/unbundled/definition47.cjs +171 -31
- package/unbundled/definition47.js +168 -22
- package/unbundled/definition48.cjs +30 -89
- package/unbundled/definition48.js +22 -87
- package/unbundled/definition49.cjs +589 -48
- package/unbundled/definition49.js +587 -47
- package/unbundled/definition50.cjs +90 -21
- package/unbundled/definition50.js +88 -16
- package/unbundled/definition51.cjs +47 -32
- package/unbundled/definition51.js +44 -29
- package/unbundled/definition52.cjs +22 -323
- package/unbundled/definition52.js +16 -320
- package/unbundled/definition53.cjs +33 -212
- package/unbundled/definition53.js +29 -208
- package/unbundled/definition54.cjs +318 -41
- package/unbundled/definition54.js +314 -37
- package/unbundled/definition55.cjs +199 -253
- package/unbundled/definition55.js +193 -247
- package/unbundled/definition56.cjs +45 -53
- package/unbundled/definition56.js +42 -49
- package/unbundled/definition57.cjs +255 -133
- package/unbundled/definition57.js +253 -128
- package/unbundled/definition58.cjs +49 -245
- package/unbundled/definition58.js +47 -244
- package/unbundled/definition59.cjs +127 -444
- package/unbundled/definition59.js +124 -444
- package/unbundled/definition6.cjs +2 -1
- package/unbundled/definition6.js +2 -1
- package/unbundled/definition60.cjs +230 -3746
- package/unbundled/definition60.js +223 -3576
- package/unbundled/definition61.cjs +427 -739
- package/unbundled/definition61.js +425 -737
- package/unbundled/definition62.cjs +3762 -103
- package/unbundled/definition62.js +3593 -97
- package/unbundled/definition63.cjs +678 -886
- package/unbundled/definition63.js +672 -877
- package/unbundled/definition64.cjs +104 -108
- package/unbundled/definition64.js +100 -104
- package/unbundled/definition65.cjs +999 -65
- package/unbundled/definition65.js +995 -58
- package/unbundled/definition66.cjs +105 -155
- package/unbundled/definition66.js +101 -151
- package/unbundled/definition67.cjs +71 -121
- package/unbundled/definition67.js +63 -119
- package/unbundled/definition68.cjs +162 -51
- package/unbundled/definition68.js +158 -47
- package/unbundled/definition69.cjs +117 -75
- package/unbundled/definition69.js +116 -71
- package/unbundled/definition70.cjs +59 -21
- package/unbundled/definition70.js +56 -15
- package/unbundled/definition71.cjs +80 -75
- package/unbundled/definition71.js +76 -74
- package/unbundled/definition72.cjs +20 -305
- package/unbundled/definition72.js +14 -230
- package/unbundled/definition73.cjs +75 -315
- package/unbundled/definition73.js +74 -307
- package/unbundled/definition74.cjs +308 -30
- package/unbundled/definition74.js +231 -24
- package/unbundled/definition75.cjs +314 -109
- package/unbundled/definition75.js +304 -106
- package/unbundled/definition76.cjs +26 -250
- package/unbundled/definition76.js +21 -246
- package/unbundled/definition77.cjs +133 -27
- package/unbundled/definition77.js +124 -25
- package/unbundled/definition78.cjs +230 -116
- package/unbundled/definition78.js +227 -107
- package/unbundled/definition79.cjs +28 -203
- package/unbundled/definition79.js +26 -193
- package/unbundled/definition80.cjs +126 -477
- package/unbundled/definition80.js +118 -473
- package/unbundled/definition81.cjs +221 -0
- package/unbundled/definition81.js +202 -0
- package/unbundled/definition82.cjs +517 -0
- package/unbundled/definition82.js +497 -0
- package/unbundled/extractOptions.cjs +21 -0
- package/unbundled/extractOptions.js +16 -0
- package/unbundled/icon.cjs +67 -0
- package/unbundled/icon.js +61 -0
- package/unbundled/linkable.cjs +1 -1
- package/unbundled/linkable.js +1 -1
- package/unbundled/listbox.cjs +29 -7
- package/unbundled/listbox.js +29 -7
- package/unbundled/mixins.cjs +2 -1
- package/unbundled/mixins.js +2 -1
- package/unbundled/optgroup.cjs +66 -0
- package/unbundled/optgroup.js +54 -0
- package/unbundled/option.cjs +176 -0
- package/unbundled/option.js +164 -0
- package/unbundled/time-selection-picker.template.cjs +1 -1
- package/unbundled/time-selection-picker.template.js +1 -1
- package/unbundled/vivid-element.cjs +10 -1
- package/unbundled/vivid-element.js +10 -1
- package/video-player/definition.cjs +1 -1
- package/video-player/definition.js +1 -1
- package/vivid.api.json +568 -231
|
@@ -1,330 +1,97 @@
|
|
|
1
1
|
import { d as createRegisterFunction, t as VividElement, u as defineVividComponent } from "./vivid-element.js";
|
|
2
|
+
import { t as iconDefinition } from "./definition.js";
|
|
2
3
|
import { t as __decorate } from "./decorate.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
7
|
-
import { classNames
|
|
8
|
-
//#region src/lib/
|
|
9
|
-
var
|
|
4
|
+
import { a as affixIconTemplateFactory, i as IconWrapper, n as AffixIconWithTrailing } from "./affix.js";
|
|
5
|
+
import { t as Localized } from "./localized.js";
|
|
6
|
+
import { n as applyHostSemantics, t as HostSemantics } from "./host-semantics.js";
|
|
7
|
+
import { attr, html, observable } from "@microsoft/fast-element";
|
|
8
|
+
import { classNames } from "@microsoft/fast-web-utilities";
|
|
9
|
+
//#region src/lib/tab/tab.scss?inline
|
|
10
|
+
var tab_default = ":host{--_vvd-tab-accent-firm-wrapper:var(--vvd-tab-accent-firm);--_vvd-tab-cta-firm-wrapper:var(--vvd-tab-cta-firm)}.base{--vvd-tab-accent-firm:var(--_vvd-tab-accent-firm-wrapper,var(--vvd-tab-accent-primary));--vvd-tab-cta-firm:var(--_vvd-tab-cta-firm-wrapper,var(--vvd-tab-cta-primary))}:host(.vertical){grid-column:1;justify-content:end}:host([disabled]){cursor:not-allowed}:host([removable]){position:relative}:host(:focus-visible){outline:none}.base{--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}@media (hover:hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}.base:disabled,.base.disabled{--_appearance-color-text:var(--vvd-color-neutral-300);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent}.base:active:where(:not(.disabled,:disabled)),.base.active:where(:not(.disabled,:disabled)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-soft);--_appearance-color-outline:transparent}.base.connotation-cta{--_connotation-color-primary-text:var(--vvd-tab-cta-primary-text,var(--vvd-color-canvas));--_connotation-color-firm:var(--vvd-tab-cta-firm,var(--vvd-color-cta-600));--_connotation-color-faint:var(--vvd-tab-cta-faint,var(--vvd-color-cta-50));--_connotation-color-fierce:var(--vvd-tab-cta-fierce,var(--vvd-color-cta-700));--_connotation-color-pale:var(--vvd-tab-cta-pale,var(--vvd-color-cta-300));--_connotation-color-soft:var(--vvd-tab-cta-soft,var(--vvd-color-cta-100))}.base:not(.connotation-cta){--_connotation-color-primary-text:var(--vvd-tab-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-firm:var(--vvd-tab-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-faint:var(--vvd-tab-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-fierce:var(--vvd-tab-accent-fierce,var(--vvd-color-neutral-700));--_connotation-color-pale:var(--vvd-tab-accent-pale,var(--vvd-color-neutral-300));--_connotation-color-soft:var(--vvd-tab-accent-soft,var(--vvd-color-neutral-100))}.base{box-sizing:border-box;align-items:center;justify-content:var(--_tab-justify-content);padding:var(--_tabs-tablist-gutter);background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);font:var(--vvd-typography-base-bold);gap:var(--_tabs-tablist-gutter);vertical-align:middle;white-space:nowrap;user-select:none;min-block-size:40px;display:flex;position:relative}.base:not(.shape-sharp){border-radius:8px}.base:not(.disabled){cursor:pointer}.base.disabled{pointer-events:none}.base.removable{padding-inline-end:40px}:host(:focus-visible) .base{--focus-stroke-gap-color:transparent;box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}:host(.vertical) .base{margin-inline-start:var(--_tabs-active-indicator-stroke-width)}slot[name=icon]{font-size:20px;line-height:1}.icon-trailing slot[name=icon]{order:1;margin-inline-start:auto;display:inline-block}.close{background:0 0;border:none;border-radius:4px;justify-content:center;align-items:center;block-size:24px;inline-size:24px;display:flex;position:absolute;inset-block-start:50%;inset-inline-end:4px;transform:translateY(-50%)}.close:focus-visible{--focus-stroke-gap-color:transparent;box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px))}.close vwc-icon{font-size:12px}.close .icon{justify-content:center;align-items:center;display:flex}";
|
|
10
11
|
//#endregion
|
|
11
|
-
//#region src/lib/
|
|
12
|
-
var ACTIVE_TAB_WIDTH = "--_tabs-active-tab-inline-size";
|
|
13
|
-
var TabsGutters = {
|
|
14
|
-
None: "none",
|
|
15
|
-
Small: "small"
|
|
16
|
-
};
|
|
17
|
-
var TabsOrientation = {
|
|
18
|
-
vertical: "vertical",
|
|
19
|
-
horizontal: "horizontal"
|
|
20
|
-
};
|
|
21
|
-
var oppositeOrientation = (orientation) => orientation === TabsOrientation.horizontal ? TabsOrientation.vertical : TabsOrientation.horizontal;
|
|
22
|
-
var gridProperty = (orientation) => orientation === TabsOrientation.horizontal ? "gridColumn" : "gridRow";
|
|
23
|
-
var translateProperty = (orientation) => orientation === TabsOrientation.horizontal ? "translateX" : "translateY";
|
|
24
|
-
var offsetProperty = (orientation) => orientation === TabsOrientation.horizontal ? "offsetLeft" : "offsetTop";
|
|
25
|
-
var isFocusableElement = (el) => el.getAttribute("aria-disabled") !== "true" && !el.disabled && !el.hasAttribute("hidden");
|
|
26
|
-
var arrayShallowEquals = (a, b) => a.length === b.length && a.every((v, i) => v === b[i]);
|
|
12
|
+
//#region src/lib/tab/tab.ts
|
|
27
13
|
/**
|
|
28
14
|
* @public
|
|
29
|
-
* @component
|
|
30
|
-
* @slot -
|
|
31
|
-
* @
|
|
32
|
-
* @
|
|
15
|
+
* @component tab
|
|
16
|
+
* @slot icon - The preferred way to add an icon to the component.
|
|
17
|
+
* @event {CustomEvent<undefined>} close - Fires when the removable Tab's close button is clicked, or the `Delete` key is pressed while it has focus
|
|
18
|
+
* @testSelector byLabel byLabel
|
|
19
|
+
* @testAction select click #base
|
|
20
|
+
* @testQuery active active true
|
|
21
|
+
* @testQuery inactive active false
|
|
22
|
+
* @testRef base shadow .base
|
|
33
23
|
*/
|
|
34
|
-
var
|
|
24
|
+
var Tab = class extends HostSemantics(AffixIconWithTrailing(Localized(VividElement))) {
|
|
35
25
|
constructor(..._args) {
|
|
36
26
|
super(..._args);
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
40
|
-
this.#isTabsChangeQueued = false;
|
|
41
|
-
this.#lastActiveId = void 0;
|
|
42
|
-
this.#onTabClick = (event) => {
|
|
43
|
-
const selectedTab = event.currentTarget;
|
|
44
|
-
if (this._validTabs.includes(selectedTab)) this.#setActiveTabDueToUserInteraction(selectedTab);
|
|
45
|
-
};
|
|
46
|
-
this.#onTabKeyDown = (event) => {
|
|
47
|
-
const tabs = this._validTabs;
|
|
48
|
-
const activeTab = this.activetab;
|
|
49
|
-
if (!activeTab) return;
|
|
50
|
-
const [arrowKeyPrev, arrowKeyNext] = this.orientation === TabsOrientation.horizontal ? [keyArrowLeft$1, keyArrowRight$1] : [keyArrowUp, keyArrowDown];
|
|
51
|
-
const keyToNextTab = {
|
|
52
|
-
[arrowKeyPrev]: () => tabs[(tabs.indexOf(activeTab) - 1 + tabs.length) % tabs.length],
|
|
53
|
-
[arrowKeyNext]: () => tabs[(tabs.indexOf(activeTab) + 1) % tabs.length],
|
|
54
|
-
[keyHome]: () => tabs[0],
|
|
55
|
-
[keyEnd]: () => tabs[tabs.length - 1]
|
|
56
|
-
};
|
|
57
|
-
if (keyToNextTab[event.key]) {
|
|
58
|
-
event.preventDefault();
|
|
59
|
-
this.#setActiveTabDueToUserInteraction(keyToNextTab[event.key]());
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
this.#isTransitioningTransform = false;
|
|
63
|
-
this.scrollablePanel = false;
|
|
64
|
-
this._actionItemsSlottedContent = [];
|
|
65
|
-
this.activeindicator = true;
|
|
66
|
-
}
|
|
67
|
-
/** @internal */
|
|
68
|
-
orientationChanged() {
|
|
69
|
-
this._registerTabsChange();
|
|
70
|
-
if (this.$fastController.isConnected) Updates.enqueue(() => this.#moveActiveIndicator(false));
|
|
71
|
-
}
|
|
72
|
-
/** @internal */
|
|
73
|
-
tabsChanged() {
|
|
74
|
-
for (const tab of this.tabs) {
|
|
75
|
-
if (!tab.id) tab.id = `tab-${uniqueId()}`;
|
|
76
|
-
tab.addEventListener("click", this.#onTabClick);
|
|
77
|
-
tab.addEventListener("keydown", this.#onTabKeyDown);
|
|
78
|
-
}
|
|
79
|
-
this._registerTabsChange();
|
|
27
|
+
this.removable = false;
|
|
28
|
+
this.tabIndex = "-1";
|
|
29
|
+
this.active = false;
|
|
80
30
|
}
|
|
81
31
|
/** @internal */
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
this
|
|
85
|
-
}
|
|
86
|
-
#areSlotsSynced() {
|
|
87
|
-
return arrayShallowEquals(this.tabs, this._tabsSlot.assignedNodes()) && arrayShallowEquals(this.tabpanels, this._tabPanelsSlot.assignedNodes());
|
|
88
|
-
}
|
|
89
|
-
/** Tabs that are paired with a tabpanel. Ignore any excess tabs or panels. */
|
|
90
|
-
get _pairedTabs() {
|
|
91
|
-
return this.tabs.slice(0, Math.min(this.tabs.length, this.tabpanels.length));
|
|
92
|
-
}
|
|
93
|
-
/** Tabs that are eligible to become active. */
|
|
94
|
-
get _validTabs() {
|
|
95
|
-
return this._pairedTabs.filter(isFocusableElement);
|
|
32
|
+
_handleCloseClick(e) {
|
|
33
|
+
e.stopImmediatePropagation();
|
|
34
|
+
this.$emit("close");
|
|
96
35
|
}
|
|
97
36
|
/** @internal */
|
|
98
|
-
|
|
99
|
-
this.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
return this._validTabs.find((tab) => tab.id === this.activeid) ?? null;
|
|
104
|
-
}
|
|
105
|
-
#setActiveTabDueToUserInteraction(tab) {
|
|
106
|
-
this.activeid = tab.id;
|
|
107
|
-
tab.focus();
|
|
108
|
-
this.$emit("change", tab);
|
|
109
|
-
}
|
|
110
|
-
#isTabsChangeQueued;
|
|
111
|
-
/**
|
|
112
|
-
* Defer actual processing of changes into a microtask to wait for all DOM changes to complete. E.g. when tabs and
|
|
113
|
-
* active id are updated at the same time.
|
|
114
|
-
*/
|
|
115
|
-
_registerTabsChange() {
|
|
116
|
-
if (this.#isTabsChangeQueued) return;
|
|
117
|
-
this.#isTabsChangeQueued = true;
|
|
118
|
-
window.queueMicrotask(() => {
|
|
119
|
-
if (this.$fastController.isConnected && this.#areSlotsSynced()) this.#handleTabsChange();
|
|
120
|
-
this.#isTabsChangeQueued = false;
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
#lastActiveId;
|
|
124
|
-
#handleTabsChange() {
|
|
125
|
-
const validTabs = this._validTabs;
|
|
126
|
-
let newActiveId = this.activeid;
|
|
127
|
-
if (!validTabs.length || newActiveId && !validTabs.find((t) => t.id === newActiveId)) newActiveId = void 0;
|
|
128
|
-
if (!newActiveId && validTabs.length) newActiveId = validTabs[0].id;
|
|
129
|
-
if (this.activeid !== newActiveId) {
|
|
130
|
-
this.activeid = newActiveId;
|
|
131
|
-
this.$emit("change", this.activetab);
|
|
132
|
-
}
|
|
133
|
-
this.#updateSlottedChildren();
|
|
134
|
-
if (this.activeid !== this.#lastActiveId) {
|
|
135
|
-
if (this.activetab) {
|
|
136
|
-
const shouldAnimate = this.#lastActiveId !== void 0;
|
|
137
|
-
this.#scrollToTab(this.activetab, shouldAnimate);
|
|
138
|
-
this.#moveActiveIndicator(shouldAnimate);
|
|
139
|
-
}
|
|
140
|
-
this.#lastActiveId = this.activeid;
|
|
141
|
-
} else this.#moveActiveIndicator(this.#isTransitioningTransform);
|
|
142
|
-
}
|
|
143
|
-
/** Updates the tabs and their panels according to the current state of the component. */
|
|
144
|
-
#updateSlottedChildren() {
|
|
145
|
-
for (const [index, tab] of this._pairedTabs.entries()) {
|
|
146
|
-
const panel = this.tabpanels[index];
|
|
147
|
-
const isActiveTab = tab.id === this.activeid;
|
|
148
|
-
/* v8 ignore else -- @preserve */
|
|
149
|
-
if (tab instanceof Tab) tab.active = isActiveTab;
|
|
150
|
-
tab.setAttribute("aria-controls", panel.id);
|
|
151
|
-
tab.setAttribute("tabindex", isActiveTab ? "0" : "-1");
|
|
152
|
-
if (isActiveTab && this.connotation) tab.setAttribute("connotation", this.connotation);
|
|
153
|
-
else tab.removeAttribute("connotation");
|
|
154
|
-
tab.classList.toggle("vertical", this.orientation === TabsOrientation.vertical);
|
|
155
|
-
tab.style[gridProperty(oppositeOrientation(this.orientation))] = "";
|
|
156
|
-
tab.style[gridProperty(this.orientation)] = `${index + 1}`;
|
|
157
|
-
panel.setAttribute("aria-labelledby", tab.id);
|
|
158
|
-
panel.hidden = !isActiveTab;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
#onTabClick;
|
|
162
|
-
#onTabKeyDown;
|
|
163
|
-
/**
|
|
164
|
-
* Adjusts the active index by numerical increments.
|
|
165
|
-
* Only enabled tabs are considered.
|
|
166
|
-
*/
|
|
167
|
-
adjust(adjustment) {
|
|
168
|
-
const focusableTabs = this._validTabs;
|
|
169
|
-
const currentActiveTabIndex = focusableTabs.findIndex((t) => t.id === this.activeid);
|
|
170
|
-
if (currentActiveTabIndex === -1) return;
|
|
171
|
-
const nextTabIndex = limit(0, focusableTabs.length - 1, currentActiveTabIndex + adjustment);
|
|
172
|
-
this.#setActiveTabDueToUserInteraction(focusableTabs[nextTabIndex]);
|
|
173
|
-
}
|
|
174
|
-
#isTransitioningTransform;
|
|
175
|
-
/** @internal */
|
|
176
|
-
_onActiveIndicatorTransitionend(event) {
|
|
177
|
-
/* v8 ignore else -- @preserve */
|
|
178
|
-
if (event.propertyName === "transform") this.#isTransitioningTransform = false;
|
|
179
|
-
}
|
|
180
|
-
#cancelAnimationIfNeeded() {
|
|
181
|
-
this.#isTransitioningTransform = false;
|
|
182
|
-
this.activeIndicatorRef.classList.remove("activeIndicatorTransition");
|
|
183
|
-
}
|
|
184
|
-
#moveActiveIndicator(shouldAnimate) {
|
|
185
|
-
const activeTabIndex = this._pairedTabs.findIndex((tab) => tab.id === this.activeid);
|
|
186
|
-
if (activeTabIndex === -1) return;
|
|
187
|
-
const indicatorEl = this.activeIndicatorRef;
|
|
188
|
-
const currentOffset = indicatorEl[offsetProperty(this.orientation)];
|
|
189
|
-
indicatorEl.style[gridProperty(this.orientation)] = `${activeTabIndex + 1}`;
|
|
190
|
-
const targetOffset = indicatorEl[offsetProperty(this.orientation)];
|
|
191
|
-
indicatorEl.style[gridProperty(this.orientation)] = "";
|
|
192
|
-
const relativeOffset = targetOffset - currentOffset;
|
|
193
|
-
const currentTransform = indicatorEl.style.transform;
|
|
194
|
-
const targetTransform = `${translateProperty(this.orientation)}(${relativeOffset}px)`;
|
|
195
|
-
if (shouldAnimate) {
|
|
196
|
-
indicatorEl.classList.add("activeIndicatorTransition");
|
|
197
|
-
if (currentTransform !== targetTransform) this.#isTransitioningTransform = true;
|
|
198
|
-
} else this.#cancelAnimationIfNeeded();
|
|
199
|
-
indicatorEl.style.transform = targetTransform;
|
|
200
|
-
indicatorEl.style.setProperty(ACTIVE_TAB_WIDTH, `${this.tabs[activeTabIndex].getBoundingClientRect().width}px`);
|
|
201
|
-
}
|
|
202
|
-
/** @internal */
|
|
203
|
-
connotationChanged() {
|
|
204
|
-
this._registerTabsChange();
|
|
205
|
-
}
|
|
206
|
-
#updateScrollStatus() {
|
|
207
|
-
this.#tabListScrollWrapper.dispatchEvent(new Event("scroll"));
|
|
208
|
-
}
|
|
209
|
-
#resizeObserver;
|
|
210
|
-
connectedCallback() {
|
|
211
|
-
super.connectedCallback();
|
|
212
|
-
this._registerTabsChange();
|
|
213
|
-
requestAnimationFrame(() => this.#updateScrollStatus());
|
|
214
|
-
this.#resizeObserver = new ResizeObserver(() => {
|
|
215
|
-
this.#moveActiveIndicator(this.#isTransitioningTransform);
|
|
216
|
-
this.#updateScrollStatus();
|
|
217
|
-
});
|
|
218
|
-
this.#resizeObserver.observe(this.#tabListScrollWrapper);
|
|
219
|
-
this.#resizeObserver.observe(this.tablist);
|
|
220
|
-
}
|
|
221
|
-
disconnectedCallback() {
|
|
222
|
-
super.disconnectedCallback();
|
|
223
|
-
this.#resizeObserver.disconnect();
|
|
224
|
-
}
|
|
225
|
-
get #tabListWrapper() {
|
|
226
|
-
return this.shadowRoot.querySelector(".tablist-wrapper");
|
|
227
|
-
}
|
|
228
|
-
get #tabListScrollWrapper() {
|
|
229
|
-
return this.tablist.parentElement;
|
|
230
|
-
}
|
|
231
|
-
#scrollToTab(tab, shouldAnimate = true) {
|
|
232
|
-
const index = this.tabs.findIndex((t) => t === tab);
|
|
233
|
-
let left = 0;
|
|
234
|
-
let top = 0;
|
|
235
|
-
if (this.orientation === TabsOrientation.vertical) {
|
|
236
|
-
if (index === this.tabs.length - 1) top = this.#tabListWrapper.scrollHeight;
|
|
237
|
-
if (index > 0 && index < this.tabs.length - 1) top = tab.offsetTop - this.#tabListWrapper.offsetHeight / 2 + tab.offsetHeight / 2;
|
|
238
|
-
} else {
|
|
239
|
-
if (index === this.tabs.length - 1) left = this.#tabListWrapper.scrollWidth;
|
|
240
|
-
if (index > 0 && index < this.tabs.length - 1) left = tab.offsetLeft - this.#tabListWrapper.offsetWidth / 2 + tab.offsetWidth / 2;
|
|
241
|
-
}
|
|
242
|
-
this.#tabListWrapper.scrollTo({
|
|
243
|
-
top,
|
|
244
|
-
left,
|
|
245
|
-
behavior: shouldAnimate ? "smooth" : "instant"
|
|
246
|
-
});
|
|
37
|
+
_onKeyDown(e) {
|
|
38
|
+
if (!this.removable || e.key !== "Delete") return true;
|
|
39
|
+
e.stopImmediatePropagation();
|
|
40
|
+
this.$emit("close");
|
|
41
|
+
return false;
|
|
247
42
|
}
|
|
248
43
|
};
|
|
249
|
-
__decorate([attr],
|
|
250
|
-
__decorate([
|
|
251
|
-
__decorate([
|
|
252
|
-
__decorate([attr],
|
|
253
|
-
__decorate([
|
|
254
|
-
__decorate([
|
|
255
|
-
__decorate([
|
|
256
|
-
__decorate([attr], Tabs.prototype, "gutters", void 0);
|
|
257
|
-
__decorate([attr({
|
|
258
|
-
mode: "boolean",
|
|
259
|
-
attribute: "scrollable-panel"
|
|
260
|
-
})], Tabs.prototype, "scrollablePanel", void 0);
|
|
261
|
-
__decorate([attr({ attribute: "tabs-layout" })], Tabs.prototype, "tabsLayout", void 0);
|
|
262
|
-
__decorate([observable], Tabs.prototype, "_actionItemsSlottedContent", void 0);
|
|
263
|
-
__decorate([attr({ mode: "boolean" })], Tabs.prototype, "activeindicator", void 0);
|
|
44
|
+
__decorate([attr({ mode: "boolean" })], Tab.prototype, "disabled", void 0);
|
|
45
|
+
__decorate([attr], Tab.prototype, "connotation", void 0);
|
|
46
|
+
__decorate([attr], Tab.prototype, "shape", void 0);
|
|
47
|
+
__decorate([attr], Tab.prototype, "label", void 0);
|
|
48
|
+
__decorate([attr({ mode: "boolean" })], Tab.prototype, "removable", void 0);
|
|
49
|
+
__decorate([attr({ mode: "fromView" })], Tab.prototype, "tabIndex", void 0);
|
|
50
|
+
__decorate([observable], Tab.prototype, "active", void 0);
|
|
264
51
|
//#endregion
|
|
265
|
-
//#region src/lib/
|
|
266
|
-
function
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
52
|
+
//#region src/lib/tab/tab.template.ts
|
|
53
|
+
function renderDismissButton(context) {
|
|
54
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
55
|
+
return html`<button
|
|
56
|
+
aria-label="${(x) => x.locale.tab.dismissButtonLabel}"
|
|
57
|
+
class="close"
|
|
58
|
+
id="close-btn"
|
|
59
|
+
@click="${(x, c) => x._handleCloseClick(c.event)}"
|
|
60
|
+
>
|
|
61
|
+
${() => affixIconTemplate("close-line", IconWrapper.Span)}
|
|
62
|
+
</button>`;
|
|
273
63
|
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
}
|
|
287
|
-
//#endregion
|
|
288
|
-
//#region src/lib/tabs/definition.ts
|
|
289
|
-
/** @internal */
|
|
290
|
-
var tabsDefinition = defineVividComponent("tabs", Tabs, html`
|
|
291
|
-
<template>
|
|
292
|
-
<div
|
|
293
|
-
class="${(x) => classNames("base", `layout-${x.tabsLayout ?? "align-start"}`, [`connotation-${x.connotation}`, Boolean(x.connotation)], [`orientation-${x.orientation}`, Boolean(x.orientation)], `gutters-${x.gutters ?? "small"}`, ["scroll", x.scrollablePanel], ["has-action-items", Boolean(x._actionItemsSlottedContent.length)])}"
|
|
64
|
+
var TabTemplate = (context) => {
|
|
65
|
+
const affixIconTemplate = affixIconTemplateFactory(context);
|
|
66
|
+
return html`
|
|
67
|
+
<template
|
|
68
|
+
slot="tab"
|
|
69
|
+
?active="${(x) => x.active}"
|
|
70
|
+
${applyHostSemantics({
|
|
71
|
+
role: "tab",
|
|
72
|
+
ariaDisabled: (x) => x.disabled,
|
|
73
|
+
ariaSelected: (x) => x.active
|
|
74
|
+
})}
|
|
75
|
+
@keydown="${(x, c) => x._onKeyDown(c.event)}"
|
|
294
76
|
>
|
|
295
|
-
<div
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
<div
|
|
301
|
-
${ref("activeIndicatorRef")}
|
|
302
|
-
class="active-indicator"
|
|
303
|
-
@transitionend="${(x, c) => x._onActiveIndicatorTransitionend(c.event)}"
|
|
304
|
-
></div>
|
|
305
|
-
</div>
|
|
306
|
-
</div>
|
|
307
|
-
</div>
|
|
308
|
-
<slot
|
|
309
|
-
name="action-items"
|
|
310
|
-
${slotted("_actionItemsSlottedContent")}
|
|
311
|
-
></slot>
|
|
77
|
+
<div
|
|
78
|
+
class="${(x) => classNames("base", [`connotation-${x.connotation}`, Boolean(x.connotation) && x.active], [`shape-${x.shape}`, Boolean(x.shape)], ["disabled", x.disabled], ["selected", x.active], ["icon-trailing", x.iconTrailing], ["removable", x.removable])}"
|
|
79
|
+
>
|
|
80
|
+
${(x) => affixIconTemplate(x.icon, IconWrapper.Slot)} ${(x) => x.label}
|
|
81
|
+
${(x) => x.removable ? renderDismissButton(context) : null}
|
|
312
82
|
</div>
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
</div>
|
|
321
|
-
</template>
|
|
322
|
-
`, [tabDefinition, tabPanelDefinition], { styles: tabs_default });
|
|
83
|
+
</template>
|
|
84
|
+
`;
|
|
85
|
+
};
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/lib/tab/definition.ts
|
|
88
|
+
/** @internal */
|
|
89
|
+
var tabDefinition = defineVividComponent("tab", Tab, TabTemplate, [iconDefinition], { styles: tab_default });
|
|
323
90
|
/**
|
|
324
|
-
* Registers the
|
|
91
|
+
* Registers the tab elements with the design system.
|
|
325
92
|
*
|
|
326
93
|
* @param prefix - the prefix to use for the component name
|
|
327
94
|
*/
|
|
328
|
-
var
|
|
95
|
+
var registerTab = createRegisterFunction(tabDefinition);
|
|
329
96
|
//#endregion
|
|
330
|
-
export {
|
|
97
|
+
export { tabDefinition as n, Tab as r, registerTab as t };
|