@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,57 +1,65 @@
|
|
|
1
1
|
import { d as createRegisterFunction, t as VividElement, u as defineVividComponent } from "./vivid-element.js";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { t as __decorate } from "./decorate.js";
|
|
3
|
+
import { n as delegateAria, t as DelegatesAria } from "./delegates-aria.js";
|
|
4
|
+
import { r as Elevation, t as elevationDefinition } from "./definition7.js";
|
|
5
|
+
import { attr, html } from "@microsoft/fast-element";
|
|
6
|
+
import { classNames } from "@microsoft/fast-web-utilities";
|
|
7
|
+
//#region src/lib/header/header.scss?inline
|
|
8
|
+
var header_default = ".base{z-index:1;block-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) + calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16)));font:var(--vvd-typography-heading-4);inline-size:100%}.base .header-content{align-items:center;column-gap:4px;display:inline-flex}.container{box-sizing:border-box;background-color:var(--header-bg-color,var(--vvd-color-canvas));block-size:inherit;color:var(--vvd-color-canvas-text);justify-content:space-between;column-gap:12px;padding-block:8px;padding-inline:16px;display:flex}.container[part~=vvd-theme-alternate]{color-scheme:var(--vvd-color-scheme)}.app-content{--vvd-header-block-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) + calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 16)))}";
|
|
5
9
|
//#endregion
|
|
6
|
-
//#region src/lib/
|
|
7
|
-
/** Modifier key names in aria-keyshortcuts. */
|
|
8
|
-
var MODIFIER_NAMES = new Set([
|
|
9
|
-
"Control",
|
|
10
|
-
"Alt",
|
|
11
|
-
"Shift",
|
|
12
|
-
"Meta"
|
|
13
|
-
]);
|
|
10
|
+
//#region src/lib/header/header.ts
|
|
14
11
|
/**
|
|
15
12
|
* @public
|
|
16
|
-
* @component
|
|
17
|
-
* @slot - Default slot
|
|
13
|
+
* @component header
|
|
14
|
+
* @slot - Default slot.
|
|
15
|
+
* @slot action-items - Nodes assigned to the `action-items` slot will be set at the end of the Header.
|
|
16
|
+
* @slot app-content - Content vertically aligned with the Header.
|
|
18
17
|
*/
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
*/
|
|
25
|
-
getKeyshortcutsValue() {
|
|
26
|
-
const keys = Array.from(this.children).filter((el) => typeof el._getKeyshortcutsKey === "function");
|
|
27
|
-
if (keys.length === 0) return null;
|
|
28
|
-
const names = [];
|
|
29
|
-
for (const key of keys) {
|
|
30
|
-
const name = key._getKeyshortcutsKey();
|
|
31
|
-
if (name !== null) names.push(name);
|
|
32
|
-
}
|
|
33
|
-
if (names.length === 0) return null;
|
|
34
|
-
const modifiers = names.filter((n) => MODIFIER_NAMES.has(n));
|
|
35
|
-
const nonModifiers = names.filter((n) => !MODIFIER_NAMES.has(n));
|
|
36
|
-
return [...modifiers, ...nonModifiers].join("+");
|
|
18
|
+
var Header = class extends DelegatesAria(VividElement) {
|
|
19
|
+
constructor(..._args) {
|
|
20
|
+
super(..._args);
|
|
21
|
+
this.elevationShadow = false;
|
|
22
|
+
this.alternate = false;
|
|
37
23
|
}
|
|
38
24
|
};
|
|
25
|
+
__decorate([attr({
|
|
26
|
+
attribute: "elevation-shadow",
|
|
27
|
+
mode: "boolean"
|
|
28
|
+
})], Header.prototype, "elevationShadow", void 0);
|
|
29
|
+
__decorate([attr({ mode: "boolean" })], Header.prototype, "alternate", void 0);
|
|
39
30
|
//#endregion
|
|
40
|
-
//#region src/lib/
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
31
|
+
//#region src/lib/header/header.template.ts
|
|
32
|
+
var headerTemplate = (context) => {
|
|
33
|
+
const elevationTag = context.tagFor(Elevation);
|
|
34
|
+
return html`
|
|
35
|
+
<${elevationTag} dp="4" ?no-shadow=${(x) => !x.elevationShadow}>
|
|
36
|
+
<header class="base" part="base" ${delegateAria()}>
|
|
37
|
+
<!-- a container is needed to distinguish the surface background color of the
|
|
38
|
+
element from its shadow when applying elevation with alternate -->
|
|
39
|
+
<div class="container" part="${(x) => classNames("container", ["vvd-theme-alternate", x.alternate])}">
|
|
40
|
+
<section class="header-content" part="main">
|
|
41
|
+
<slot></slot>
|
|
42
|
+
</section>
|
|
43
|
+
<section class="header-content" part="action-items">
|
|
44
|
+
<slot name="action-items"></slot>
|
|
45
|
+
</section>
|
|
46
|
+
</div>
|
|
47
|
+
</header>
|
|
48
|
+
</${elevationTag}>
|
|
49
|
+
<div class="app-content">
|
|
50
|
+
<slot name="app-content"></slot>
|
|
51
|
+
</div>
|
|
52
|
+
`;
|
|
45
53
|
};
|
|
46
54
|
//#endregion
|
|
47
|
-
//#region src/lib/
|
|
55
|
+
//#region src/lib/header/definition.ts
|
|
48
56
|
/** @internal */
|
|
49
|
-
var
|
|
57
|
+
var headerDefinition = defineVividComponent("header", Header, headerTemplate, [elevationDefinition], { styles: header_default });
|
|
50
58
|
/**
|
|
51
|
-
* Registers the
|
|
59
|
+
* Registers the header elements with the design system.
|
|
52
60
|
*
|
|
53
61
|
* @param prefix - the prefix to use for the component name
|
|
54
62
|
*/
|
|
55
|
-
var
|
|
63
|
+
var registerHeader = createRegisterFunction(headerDefinition);
|
|
56
64
|
//#endregion
|
|
57
|
-
export {
|
|
65
|
+
export { registerHeader as n, Header as r, headerDefinition as t };
|
|
@@ -1,199 +1,75 @@
|
|
|
1
1
|
require("./chunk.cjs");
|
|
2
2
|
const require_vivid_element = require("./vivid-element.cjs");
|
|
3
|
-
const require_decorate = require("./decorate.cjs");
|
|
4
|
-
const require_platform = require("./platform.cjs");
|
|
5
3
|
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var kbd_key_default = ":host{vertical-align:middle;display:inline-block}.base{--_connotation-color-primary:var(--vvd-kbd-key-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-kbd-key-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-soft:var(--vvd-kbd-key-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-contrast:var(--vvd-kbd-key-accent-contrast,var(--vvd-color-neutral-800));--_connotation-color-firm:var(--vvd-kbd-key-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-faint:var(--vvd-kbd-key-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-dim:var(--vvd-kbd-key-accent-dim,var(--vvd-color-neutral-200));--_connotation-color-pale:var(--vvd-kbd-key-accent-pale,var(--vvd-color-neutral-300));--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:transparent;--_appearance-color-outline:var(--vvd-color-neutral-300)}.base.appearance-subtle{--_appearance-color-text:var(--_connotation-color-contrast);--_appearance-color-fill:var(--_connotation-color-soft);--_appearance-color-outline:transparent}.base{box-sizing:border-box;background-color:var(--_appearance-color-fill);block-size:var(--_kbd-key-size);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);font:var(--vvd-typography-base-condensed);font-size:calc(var(--_kbd-key-size) / 2);min-inline-size:var(--_kbd-key-size);padding-inline:calc(var(--_kbd-key-size) / 4);white-space:nowrap;border:0;justify-content:center;align-items:center;display:inline-flex}.base.appearance-dropshadow{--_kbd-key-shadow-size:calc(var(--_kbd-key-size) * .0415);background-color:var(--vvd-color-canvas);box-shadow:inset 0 0 0 1px var(--vvd-color-neutral-300), var(--_kbd-key-shadow-size) var(--_kbd-key-shadow-size) 0 0 var(--vvd-color-neutral-300);color:var(--vvd-color-canvas-text)}.base.size-super-condensed{--_kbd-key-size:16px;border-radius:3px;font-size:10px}.base.size-condensed{--_kbd-key-size:24px;border-radius:6px}.base:not(.size-super-condensed,.size-condensed,.size-expanded){--_kbd-key-size:32px;border-radius:6px}.base.size-expanded{--_kbd-key-size:40px;border-radius:8px}";
|
|
4
|
+
//#region src/lib/kbd-shortcut/kbd-shortcut.scss?inline
|
|
5
|
+
var kbd_shortcut_default = ":host{display:inline-block}.base{white-space:nowrap;align-items:center;gap:.3em;display:inline-flex}";
|
|
9
6
|
//#endregion
|
|
10
|
-
//#region src/lib/kbd-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
//#region src/lib/kbd-shortcut/kbd-shortcut.ts
|
|
8
|
+
/** Modifier key names in aria-keyshortcuts. */
|
|
9
|
+
var MODIFIER_NAMES = new Set([
|
|
13
10
|
"Control",
|
|
11
|
+
"Alt",
|
|
14
12
|
"Shift",
|
|
15
|
-
"
|
|
16
|
-
"Tab",
|
|
17
|
-
"Space",
|
|
18
|
-
"Backspace",
|
|
19
|
-
"Escape",
|
|
20
|
-
"ArrowUp",
|
|
21
|
-
"ArrowDown",
|
|
22
|
-
"ArrowLeft",
|
|
23
|
-
"ArrowRight",
|
|
24
|
-
"End",
|
|
25
|
-
"Home",
|
|
26
|
-
"PageUp",
|
|
27
|
-
"PageDown",
|
|
28
|
-
"A",
|
|
29
|
-
"B",
|
|
30
|
-
"C",
|
|
31
|
-
"D",
|
|
32
|
-
"E",
|
|
33
|
-
"F",
|
|
34
|
-
"G",
|
|
35
|
-
"H",
|
|
36
|
-
"I",
|
|
37
|
-
"J",
|
|
38
|
-
"K",
|
|
39
|
-
"L",
|
|
40
|
-
"M",
|
|
41
|
-
"N",
|
|
42
|
-
"O",
|
|
43
|
-
"P",
|
|
44
|
-
"Q",
|
|
45
|
-
"R",
|
|
46
|
-
"S",
|
|
47
|
-
"T",
|
|
48
|
-
"U",
|
|
49
|
-
"V",
|
|
50
|
-
"W",
|
|
51
|
-
"X",
|
|
52
|
-
"Y",
|
|
53
|
-
"Z",
|
|
54
|
-
"0",
|
|
55
|
-
"1",
|
|
56
|
-
"2",
|
|
57
|
-
"3",
|
|
58
|
-
"4",
|
|
59
|
-
"5",
|
|
60
|
-
"6",
|
|
61
|
-
"7",
|
|
62
|
-
"8",
|
|
63
|
-
"9",
|
|
64
|
-
"Mod",
|
|
65
|
-
"Custom"
|
|
13
|
+
"Meta"
|
|
66
14
|
]);
|
|
67
15
|
/**
|
|
68
|
-
* Maps key names to their display labels on standard (non-Apple) platforms.
|
|
69
|
-
* Keys not listed here display as their key-name string.
|
|
70
|
-
*/
|
|
71
|
-
var KEY_DISPLAY_MAP = {
|
|
72
|
-
Enter: "↵",
|
|
73
|
-
Tab: "⇥",
|
|
74
|
-
Space: "␣",
|
|
75
|
-
Backspace: "⌫",
|
|
76
|
-
Escape: "Esc",
|
|
77
|
-
Shift: "⇧",
|
|
78
|
-
Control: "Ctrl",
|
|
79
|
-
Alt: "Alt",
|
|
80
|
-
ArrowUp: "↑",
|
|
81
|
-
ArrowDown: "↓",
|
|
82
|
-
ArrowLeft: "←",
|
|
83
|
-
ArrowRight: "→",
|
|
84
|
-
End: "End",
|
|
85
|
-
Home: "Home",
|
|
86
|
-
PageUp: "PgUp",
|
|
87
|
-
PageDown: "PgDn"
|
|
88
|
-
};
|
|
89
|
-
var APPLE_DISPLAY_OVERRIDES = {
|
|
90
|
-
Control: "⌃",
|
|
91
|
-
Alt: "⌥"
|
|
92
|
-
};
|
|
93
|
-
/**
|
|
94
|
-
* Aria labels for keys that display as symbols on standard platforms.
|
|
95
|
-
* Keys displaying readable text (e.g. "Ctrl", "Esc") are omitted.
|
|
96
|
-
*/
|
|
97
|
-
var KEY_ARIA_LABEL_MAP = {
|
|
98
|
-
Enter: "Enter",
|
|
99
|
-
Tab: "Tab",
|
|
100
|
-
Space: "Space",
|
|
101
|
-
Backspace: "Backspace",
|
|
102
|
-
Shift: "Shift",
|
|
103
|
-
ArrowUp: "Up Arrow",
|
|
104
|
-
ArrowDown: "Down Arrow",
|
|
105
|
-
ArrowLeft: "Left Arrow",
|
|
106
|
-
ArrowRight: "Right Arrow"
|
|
107
|
-
};
|
|
108
|
-
var APPLE_ARIA_LABEL_OVERRIDES = {
|
|
109
|
-
Control: "Control",
|
|
110
|
-
Alt: "Option"
|
|
111
|
-
};
|
|
112
|
-
/**
|
|
113
16
|
* @public
|
|
114
|
-
* @component kbd-
|
|
115
|
-
* @slot - Default slot for
|
|
17
|
+
* @component kbd-shortcut
|
|
18
|
+
* @slot - Default slot for Kbd elements.
|
|
116
19
|
*/
|
|
117
|
-
var
|
|
118
|
-
/** @internal */
|
|
119
|
-
get _isApple() {
|
|
120
|
-
if (this.keyboard === "apple") return true;
|
|
121
|
-
if (this.keyboard === "standard") return false;
|
|
122
|
-
return require_platform.isApplePlatform();
|
|
123
|
-
}
|
|
124
|
-
/** @internal */
|
|
125
|
-
get _displayLabel() {
|
|
126
|
-
/* v8 ignore if -- @preserve */
|
|
127
|
-
if (!this.name || this.name === "Custom") return "";
|
|
128
|
-
if (!SUPPORTED_KEY_NAMES_SET.has(this.name)) {
|
|
129
|
-
console.warn(`[kbd-key] Unsupported key name: "${this.name}". Nothing will be displayed.`);
|
|
130
|
-
return "";
|
|
131
|
-
}
|
|
132
|
-
if (this.name === "Mod") return this._isApple ? "⌘" : "Ctrl";
|
|
133
|
-
if (this._isApple && this.name in APPLE_DISPLAY_OVERRIDES) return APPLE_DISPLAY_OVERRIDES[this.name];
|
|
134
|
-
return KEY_DISPLAY_MAP[this.name] ?? this.name;
|
|
135
|
-
}
|
|
136
|
-
/** @internal */
|
|
137
|
-
get _ariaKeyLabel() {
|
|
138
|
-
if (!this.name || this.name === "Custom") return null;
|
|
139
|
-
if (this.name === "Mod") return this._isApple ? "Command" : null;
|
|
140
|
-
if (this._isApple && this.name in APPLE_ARIA_LABEL_OVERRIDES) return APPLE_ARIA_LABEL_OVERRIDES[this.name];
|
|
141
|
-
return KEY_ARIA_LABEL_MAP[this.name] ?? null;
|
|
142
|
-
}
|
|
20
|
+
var KbdShortcut = class extends require_vivid_element.VividElement {
|
|
143
21
|
/**
|
|
144
|
-
* Returns
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
* @internal
|
|
22
|
+
* Returns a valid aria-keyshortcuts value based on the slotted kbd-key elements.
|
|
23
|
+
* Modifiers are sorted to be first as required by the spec.
|
|
24
|
+
* Returns null if no keys are available.
|
|
148
25
|
*/
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
if (
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
26
|
+
getKeyshortcutsValue() {
|
|
27
|
+
const keys = Array.from(this.children).filter((el) => typeof el._getKeyshortcutsKey === "function");
|
|
28
|
+
if (keys.length === 0) return null;
|
|
29
|
+
const names = [];
|
|
30
|
+
for (const key of keys) {
|
|
31
|
+
const name = key._getKeyshortcutsKey();
|
|
32
|
+
if (name !== null) names.push(name);
|
|
33
|
+
}
|
|
34
|
+
if (names.length === 0) return null;
|
|
35
|
+
const modifiers = names.filter((n) => MODIFIER_NAMES.has(n));
|
|
36
|
+
const nonModifiers = names.filter((n) => !MODIFIER_NAMES.has(n));
|
|
37
|
+
return [...modifiers, ...nonModifiers].join("+");
|
|
155
38
|
}
|
|
156
39
|
};
|
|
157
|
-
require_decorate.__decorate([_microsoft_fast_element.attr], KbdKey.prototype, "name", void 0);
|
|
158
|
-
require_decorate.__decorate([_microsoft_fast_element.attr], KbdKey.prototype, "keyboard", void 0);
|
|
159
|
-
require_decorate.__decorate([_microsoft_fast_element.attr], KbdKey.prototype, "appearance", void 0);
|
|
160
|
-
require_decorate.__decorate([_microsoft_fast_element.attr], KbdKey.prototype, "size", void 0);
|
|
161
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "keyshortcuts-key" })], KbdKey.prototype, "keyshortcutsKey", void 0);
|
|
162
40
|
//#endregion
|
|
163
|
-
//#region src/lib/kbd-
|
|
164
|
-
var
|
|
165
|
-
return _microsoft_fast_element.html`<
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
>${(0, _microsoft_fast_element.when)((x) => x.name === "Custom", _microsoft_fast_element.html`<slot></slot>`)}${(0, _microsoft_fast_element.when)((x) => Boolean(x.name && x.name !== "Custom" && x._displayLabel), _microsoft_fast_element.html`${(x) => x._displayLabel}`)}</kbd
|
|
169
|
-
>`;
|
|
41
|
+
//#region src/lib/kbd-shortcut/kbd-shortcut.template.ts
|
|
42
|
+
var KbdShortcutTemplate = () => {
|
|
43
|
+
return _microsoft_fast_element.html`<span class="base" role="group"
|
|
44
|
+
><slot></slot
|
|
45
|
+
></span>`;
|
|
170
46
|
};
|
|
171
47
|
//#endregion
|
|
172
|
-
//#region src/lib/kbd-
|
|
48
|
+
//#region src/lib/kbd-shortcut/definition.ts
|
|
173
49
|
/** @internal */
|
|
174
|
-
var
|
|
50
|
+
var kbdShortcutDefinition = require_vivid_element.defineVividComponent("kbd-shortcut", KbdShortcut, KbdShortcutTemplate, [], { styles: kbd_shortcut_default });
|
|
175
51
|
/**
|
|
176
|
-
* Registers the kbd-
|
|
52
|
+
* Registers the kbd-shortcut element with the design system.
|
|
177
53
|
*
|
|
178
54
|
* @param prefix - the prefix to use for the component name
|
|
179
55
|
*/
|
|
180
|
-
var
|
|
56
|
+
var registerKbdShortcut = require_vivid_element.createRegisterFunction(kbdShortcutDefinition);
|
|
181
57
|
//#endregion
|
|
182
|
-
Object.defineProperty(exports, "
|
|
58
|
+
Object.defineProperty(exports, "KbdShortcut", {
|
|
183
59
|
enumerable: true,
|
|
184
60
|
get: function() {
|
|
185
|
-
return
|
|
61
|
+
return KbdShortcut;
|
|
186
62
|
}
|
|
187
63
|
});
|
|
188
|
-
Object.defineProperty(exports, "
|
|
64
|
+
Object.defineProperty(exports, "kbdShortcutDefinition", {
|
|
189
65
|
enumerable: true,
|
|
190
66
|
get: function() {
|
|
191
|
-
return
|
|
67
|
+
return kbdShortcutDefinition;
|
|
192
68
|
}
|
|
193
69
|
});
|
|
194
|
-
Object.defineProperty(exports, "
|
|
70
|
+
Object.defineProperty(exports, "registerKbdShortcut", {
|
|
195
71
|
enumerable: true,
|
|
196
72
|
get: function() {
|
|
197
|
-
return
|
|
73
|
+
return registerKbdShortcut;
|
|
198
74
|
}
|
|
199
75
|
});
|
|
@@ -1,181 +1,57 @@
|
|
|
1
1
|
import { d as createRegisterFunction, t as VividElement, u as defineVividComponent } from "./vivid-element.js";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { classNames } from "@microsoft/fast-web-utilities";
|
|
6
|
-
//#region src/lib/kbd-key/kbd-key.scss?inline
|
|
7
|
-
var kbd_key_default = ":host{vertical-align:middle;display:inline-block}.base{--_connotation-color-primary:var(--vvd-kbd-key-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-kbd-key-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-soft:var(--vvd-kbd-key-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-contrast:var(--vvd-kbd-key-accent-contrast,var(--vvd-color-neutral-800));--_connotation-color-firm:var(--vvd-kbd-key-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-faint:var(--vvd-kbd-key-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-dim:var(--vvd-kbd-key-accent-dim,var(--vvd-color-neutral-200));--_connotation-color-pale:var(--vvd-kbd-key-accent-pale,var(--vvd-color-neutral-300));--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:transparent;--_appearance-color-outline:var(--vvd-color-neutral-300)}.base.appearance-subtle{--_appearance-color-text:var(--_connotation-color-contrast);--_appearance-color-fill:var(--_connotation-color-soft);--_appearance-color-outline:transparent}.base{box-sizing:border-box;background-color:var(--_appearance-color-fill);block-size:var(--_kbd-key-size);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);font:var(--vvd-typography-base-condensed);font-size:calc(var(--_kbd-key-size) / 2);min-inline-size:var(--_kbd-key-size);padding-inline:calc(var(--_kbd-key-size) / 4);white-space:nowrap;border:0;justify-content:center;align-items:center;display:inline-flex}.base.appearance-dropshadow{--_kbd-key-shadow-size:calc(var(--_kbd-key-size) * .0415);background-color:var(--vvd-color-canvas);box-shadow:inset 0 0 0 1px var(--vvd-color-neutral-300), var(--_kbd-key-shadow-size) var(--_kbd-key-shadow-size) 0 0 var(--vvd-color-neutral-300);color:var(--vvd-color-canvas-text)}.base.size-super-condensed{--_kbd-key-size:16px;border-radius:3px;font-size:10px}.base.size-condensed{--_kbd-key-size:24px;border-radius:6px}.base:not(.size-super-condensed,.size-condensed,.size-expanded){--_kbd-key-size:32px;border-radius:6px}.base.size-expanded{--_kbd-key-size:40px;border-radius:8px}";
|
|
2
|
+
import { html } from "@microsoft/fast-element";
|
|
3
|
+
//#region src/lib/kbd-shortcut/kbd-shortcut.scss?inline
|
|
4
|
+
var kbd_shortcut_default = ":host{display:inline-block}.base{white-space:nowrap;align-items:center;gap:.3em;display:inline-flex}";
|
|
8
5
|
//#endregion
|
|
9
|
-
//#region src/lib/kbd-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
//#region src/lib/kbd-shortcut/kbd-shortcut.ts
|
|
7
|
+
/** Modifier key names in aria-keyshortcuts. */
|
|
8
|
+
var MODIFIER_NAMES = new Set([
|
|
12
9
|
"Control",
|
|
10
|
+
"Alt",
|
|
13
11
|
"Shift",
|
|
14
|
-
"
|
|
15
|
-
"Tab",
|
|
16
|
-
"Space",
|
|
17
|
-
"Backspace",
|
|
18
|
-
"Escape",
|
|
19
|
-
"ArrowUp",
|
|
20
|
-
"ArrowDown",
|
|
21
|
-
"ArrowLeft",
|
|
22
|
-
"ArrowRight",
|
|
23
|
-
"End",
|
|
24
|
-
"Home",
|
|
25
|
-
"PageUp",
|
|
26
|
-
"PageDown",
|
|
27
|
-
"A",
|
|
28
|
-
"B",
|
|
29
|
-
"C",
|
|
30
|
-
"D",
|
|
31
|
-
"E",
|
|
32
|
-
"F",
|
|
33
|
-
"G",
|
|
34
|
-
"H",
|
|
35
|
-
"I",
|
|
36
|
-
"J",
|
|
37
|
-
"K",
|
|
38
|
-
"L",
|
|
39
|
-
"M",
|
|
40
|
-
"N",
|
|
41
|
-
"O",
|
|
42
|
-
"P",
|
|
43
|
-
"Q",
|
|
44
|
-
"R",
|
|
45
|
-
"S",
|
|
46
|
-
"T",
|
|
47
|
-
"U",
|
|
48
|
-
"V",
|
|
49
|
-
"W",
|
|
50
|
-
"X",
|
|
51
|
-
"Y",
|
|
52
|
-
"Z",
|
|
53
|
-
"0",
|
|
54
|
-
"1",
|
|
55
|
-
"2",
|
|
56
|
-
"3",
|
|
57
|
-
"4",
|
|
58
|
-
"5",
|
|
59
|
-
"6",
|
|
60
|
-
"7",
|
|
61
|
-
"8",
|
|
62
|
-
"9",
|
|
63
|
-
"Mod",
|
|
64
|
-
"Custom"
|
|
12
|
+
"Meta"
|
|
65
13
|
]);
|
|
66
14
|
/**
|
|
67
|
-
* Maps key names to their display labels on standard (non-Apple) platforms.
|
|
68
|
-
* Keys not listed here display as their key-name string.
|
|
69
|
-
*/
|
|
70
|
-
var KEY_DISPLAY_MAP = {
|
|
71
|
-
Enter: "↵",
|
|
72
|
-
Tab: "⇥",
|
|
73
|
-
Space: "␣",
|
|
74
|
-
Backspace: "⌫",
|
|
75
|
-
Escape: "Esc",
|
|
76
|
-
Shift: "⇧",
|
|
77
|
-
Control: "Ctrl",
|
|
78
|
-
Alt: "Alt",
|
|
79
|
-
ArrowUp: "↑",
|
|
80
|
-
ArrowDown: "↓",
|
|
81
|
-
ArrowLeft: "←",
|
|
82
|
-
ArrowRight: "→",
|
|
83
|
-
End: "End",
|
|
84
|
-
Home: "Home",
|
|
85
|
-
PageUp: "PgUp",
|
|
86
|
-
PageDown: "PgDn"
|
|
87
|
-
};
|
|
88
|
-
var APPLE_DISPLAY_OVERRIDES = {
|
|
89
|
-
Control: "⌃",
|
|
90
|
-
Alt: "⌥"
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* Aria labels for keys that display as symbols on standard platforms.
|
|
94
|
-
* Keys displaying readable text (e.g. "Ctrl", "Esc") are omitted.
|
|
95
|
-
*/
|
|
96
|
-
var KEY_ARIA_LABEL_MAP = {
|
|
97
|
-
Enter: "Enter",
|
|
98
|
-
Tab: "Tab",
|
|
99
|
-
Space: "Space",
|
|
100
|
-
Backspace: "Backspace",
|
|
101
|
-
Shift: "Shift",
|
|
102
|
-
ArrowUp: "Up Arrow",
|
|
103
|
-
ArrowDown: "Down Arrow",
|
|
104
|
-
ArrowLeft: "Left Arrow",
|
|
105
|
-
ArrowRight: "Right Arrow"
|
|
106
|
-
};
|
|
107
|
-
var APPLE_ARIA_LABEL_OVERRIDES = {
|
|
108
|
-
Control: "Control",
|
|
109
|
-
Alt: "Option"
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
15
|
* @public
|
|
113
|
-
* @component kbd-
|
|
114
|
-
* @slot - Default slot for
|
|
16
|
+
* @component kbd-shortcut
|
|
17
|
+
* @slot - Default slot for Kbd elements.
|
|
115
18
|
*/
|
|
116
|
-
var
|
|
117
|
-
/** @internal */
|
|
118
|
-
get _isApple() {
|
|
119
|
-
if (this.keyboard === "apple") return true;
|
|
120
|
-
if (this.keyboard === "standard") return false;
|
|
121
|
-
return isApplePlatform();
|
|
122
|
-
}
|
|
123
|
-
/** @internal */
|
|
124
|
-
get _displayLabel() {
|
|
125
|
-
/* v8 ignore if -- @preserve */
|
|
126
|
-
if (!this.name || this.name === "Custom") return "";
|
|
127
|
-
if (!SUPPORTED_KEY_NAMES_SET.has(this.name)) {
|
|
128
|
-
console.warn(`[kbd-key] Unsupported key name: "${this.name}". Nothing will be displayed.`);
|
|
129
|
-
return "";
|
|
130
|
-
}
|
|
131
|
-
if (this.name === "Mod") return this._isApple ? "⌘" : "Ctrl";
|
|
132
|
-
if (this._isApple && this.name in APPLE_DISPLAY_OVERRIDES) return APPLE_DISPLAY_OVERRIDES[this.name];
|
|
133
|
-
return KEY_DISPLAY_MAP[this.name] ?? this.name;
|
|
134
|
-
}
|
|
135
|
-
/** @internal */
|
|
136
|
-
get _ariaKeyLabel() {
|
|
137
|
-
if (!this.name || this.name === "Custom") return null;
|
|
138
|
-
if (this.name === "Mod") return this._isApple ? "Command" : null;
|
|
139
|
-
if (this._isApple && this.name in APPLE_ARIA_LABEL_OVERRIDES) return APPLE_ARIA_LABEL_OVERRIDES[this.name];
|
|
140
|
-
return KEY_ARIA_LABEL_MAP[this.name] ?? null;
|
|
141
|
-
}
|
|
19
|
+
var KbdShortcut = class extends VividElement {
|
|
142
20
|
/**
|
|
143
|
-
* Returns
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* @internal
|
|
21
|
+
* Returns a valid aria-keyshortcuts value based on the slotted kbd-key elements.
|
|
22
|
+
* Modifiers are sorted to be first as required by the spec.
|
|
23
|
+
* Returns null if no keys are available.
|
|
147
24
|
*/
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
if (
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
25
|
+
getKeyshortcutsValue() {
|
|
26
|
+
const keys = Array.from(this.children).filter((el) => typeof el._getKeyshortcutsKey === "function");
|
|
27
|
+
if (keys.length === 0) return null;
|
|
28
|
+
const names = [];
|
|
29
|
+
for (const key of keys) {
|
|
30
|
+
const name = key._getKeyshortcutsKey();
|
|
31
|
+
if (name !== null) names.push(name);
|
|
32
|
+
}
|
|
33
|
+
if (names.length === 0) return null;
|
|
34
|
+
const modifiers = names.filter((n) => MODIFIER_NAMES.has(n));
|
|
35
|
+
const nonModifiers = names.filter((n) => !MODIFIER_NAMES.has(n));
|
|
36
|
+
return [...modifiers, ...nonModifiers].join("+");
|
|
154
37
|
}
|
|
155
38
|
};
|
|
156
|
-
__decorate([attr], KbdKey.prototype, "name", void 0);
|
|
157
|
-
__decorate([attr], KbdKey.prototype, "keyboard", void 0);
|
|
158
|
-
__decorate([attr], KbdKey.prototype, "appearance", void 0);
|
|
159
|
-
__decorate([attr], KbdKey.prototype, "size", void 0);
|
|
160
|
-
__decorate([attr({ attribute: "keyshortcuts-key" })], KbdKey.prototype, "keyshortcutsKey", void 0);
|
|
161
39
|
//#endregion
|
|
162
|
-
//#region src/lib/kbd-
|
|
163
|
-
var
|
|
164
|
-
return html`<
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
>${when((x) => x.name === "Custom", html`<slot></slot>`)}${when((x) => Boolean(x.name && x.name !== "Custom" && x._displayLabel), html`${(x) => x._displayLabel}`)}</kbd
|
|
168
|
-
>`;
|
|
40
|
+
//#region src/lib/kbd-shortcut/kbd-shortcut.template.ts
|
|
41
|
+
var KbdShortcutTemplate = () => {
|
|
42
|
+
return html`<span class="base" role="group"
|
|
43
|
+
><slot></slot
|
|
44
|
+
></span>`;
|
|
169
45
|
};
|
|
170
46
|
//#endregion
|
|
171
|
-
//#region src/lib/kbd-
|
|
47
|
+
//#region src/lib/kbd-shortcut/definition.ts
|
|
172
48
|
/** @internal */
|
|
173
|
-
var
|
|
49
|
+
var kbdShortcutDefinition = defineVividComponent("kbd-shortcut", KbdShortcut, KbdShortcutTemplate, [], { styles: kbd_shortcut_default });
|
|
174
50
|
/**
|
|
175
|
-
* Registers the kbd-
|
|
51
|
+
* Registers the kbd-shortcut element with the design system.
|
|
176
52
|
*
|
|
177
53
|
* @param prefix - the prefix to use for the component name
|
|
178
54
|
*/
|
|
179
|
-
var
|
|
55
|
+
var registerKbdShortcut = createRegisterFunction(kbdShortcutDefinition);
|
|
180
56
|
//#endregion
|
|
181
|
-
export {
|
|
57
|
+
export { registerKbdShortcut as n, KbdShortcut as r, kbdShortcutDefinition as t };
|