@vonage/vivid 5.23.0 → 5.23.1
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/action-group/index.cjs +1 -1
- package/action-group/index.js +1 -1
- package/alert/definition.cjs +1 -1
- package/alert/definition.js +1 -1
- package/alert/index.cjs +7 -7
- package/alert/index.js +13 -14
- package/audio-player/definition.cjs +1 -1
- package/audio-player/definition.js +1 -1
- package/audio-player/index.cjs +18 -16
- package/audio-player/index.js +21 -19
- package/avatar/definition.cjs +1 -1
- package/avatar/definition.js +1 -1
- package/avatar/index.cjs +4 -4
- package/avatar/index.js +6 -6
- package/badge/definition.cjs +1 -1
- package/badge/definition.js +1 -1
- package/banner/definition.cjs +1 -1
- package/banner/definition.js +1 -1
- package/banner/index.cjs +3 -3
- package/banner/index.js +8 -8
- package/breadcrumb/definition.cjs +1 -1
- package/breadcrumb/definition.js +1 -1
- package/breadcrumb-item/definition.cjs +1 -1
- package/breadcrumb-item/definition.js +1 -1
- package/breadcrumb-item/index.cjs +2 -2
- package/breadcrumb-item/index.js +5 -5
- package/bundled/affix.cjs +1 -1
- package/bundled/affix.js +1 -1
- package/bundled/base-color-picker.cjs +2 -2
- package/bundled/base-color-picker.js +5 -5
- package/bundled/calendar-picker.template.cjs +1 -1
- package/bundled/calendar-picker.template.js +1 -1
- package/bundled/definition11.cjs +4 -4
- package/bundled/definition11.js +5 -5
- package/bundled/definition12.cjs +9 -7
- package/bundled/definition12.js +28 -26
- package/bundled/definition13.cjs +9 -7
- package/bundled/definition13.js +16 -15
- package/bundled/definition15.cjs +6 -6
- package/bundled/definition15.js +17 -17
- package/bundled/definition16.cjs +4 -2
- package/bundled/definition16.js +8 -6
- package/bundled/definition17.cjs +8 -6
- package/bundled/definition17.js +15 -14
- package/bundled/definition18.cjs +23 -23
- package/bundled/definition18.js +51 -52
- package/bundled/definition19.cjs +3 -1
- package/bundled/definition19.js +3 -1
- package/bundled/definition2.cjs +1 -13
- package/bundled/definition2.js +181 -48
- package/bundled/definition20.cjs +11 -9
- package/bundled/definition20.js +25 -23
- package/bundled/definition21.cjs +6 -6
- package/bundled/definition21.js +7 -8
- package/bundled/definition22.cjs +5 -3
- package/bundled/definition22.js +13 -11
- package/bundled/definition23.cjs +1 -1
- package/bundled/definition23.js +2 -2
- package/bundled/definition24.cjs +10 -10
- package/bundled/definition24.js +12 -12
- package/bundled/definition3.cjs +13 -1
- package/bundled/definition3.js +48 -181
- package/bundled/definition4.cjs +9 -7
- package/bundled/definition4.js +18 -16
- package/bundled/definition5.cjs +5 -5
- package/bundled/definition5.js +9 -9
- package/bundled/definition6.cjs +3 -3
- package/bundled/definition6.js +16 -16
- package/bundled/definition7.cjs +1 -1
- package/bundled/definition7.js +1 -1
- package/bundled/definition8.cjs +7 -7
- package/bundled/definition8.js +9 -7
- package/bundled/definition9.cjs +4 -4
- package/bundled/definition9.js +12 -12
- package/bundled/mixins.cjs +3 -3
- package/bundled/mixins.js +5 -5
- package/bundled/numberConverter.cjs +1 -1
- package/bundled/numberConverter.js +36 -1
- package/bundled/picker-field.template.cjs +13 -13
- package/bundled/picker-field.template.js +16 -16
- package/bundled/slider.template.cjs +8 -8
- package/bundled/slider.template.js +9 -9
- package/bundled/text-field.cjs +1 -1
- package/bundled/text-field.js +1 -1
- package/bundled/time-selection-picker.template.cjs +3 -3
- package/bundled/time-selection-picker.template.js +9 -9
- package/bundled/vivid-element.cjs +1 -1
- package/bundled/vivid-element.js +1 -1
- package/button/definition.cjs +1 -1
- package/button/definition.js +1 -1
- package/calendar/definition.cjs +1 -1
- package/calendar/definition.js +1 -1
- package/calendar/index.cjs +9 -9
- package/calendar/index.js +7 -7
- package/calendar-event/definition.cjs +1 -1
- package/calendar-event/definition.js +1 -1
- package/calendar-event/index.cjs +2 -2
- package/calendar-event/index.js +2 -2
- package/card/definition.cjs +1 -1
- package/card/definition.js +1 -1
- package/card/index.cjs +3 -3
- package/card/index.js +6 -6
- package/color-picker/index.cjs +10 -10
- package/color-picker/index.js +52 -52
- package/combobox/index.cjs +14 -11
- package/combobox/index.js +38 -36
- package/custom-elements.json +4235 -4883
- package/data-grid/index.cjs +8 -6
- package/data-grid/index.js +20 -18
- package/dial-pad/index.cjs +22 -20
- package/dial-pad/index.js +36 -34
- package/dialog/index.cjs +14 -14
- package/dialog/index.js +17 -18
- package/elevation/definition.cjs +1 -1
- package/elevation/definition.js +1 -1
- package/empty-state/index.cjs +4 -4
- package/empty-state/index.js +7 -11
- package/fab/index.cjs +4 -4
- package/fab/index.js +9 -13
- package/file-picker/index.cjs +8 -8
- package/file-picker/index.js +19 -19
- package/flag/index.cjs +5 -5
- package/flag/index.js +8 -12
- package/header/index.cjs +5 -5
- package/header/index.js +4 -8
- package/icon/index.cjs +1 -1
- package/icon/index.js +1 -1
- package/index.cjs +15 -14
- package/index.js +16 -16
- package/kbd-key/index.cjs +3 -3
- package/kbd-key/index.js +2 -6
- package/layout/index.cjs +3 -1
- package/layout/index.js +3 -1
- package/lib/accordion/variations.browser-spec.d.ts +1 -0
- package/lib/accordion-item/variations.browser-spec.d.ts +1 -0
- package/lib/action-group/variations.browser-spec.d.ts +1 -0
- package/lib/alert/variations.browser-spec.d.ts +1 -0
- package/lib/audio-player/variations.browser-spec.d.ts +1 -0
- package/lib/avatar/variations.browser-spec.d.ts +1 -0
- package/lib/badge/badge.d.ts +4 -4
- package/lib/badge/badge.template.d.ts +1 -2
- package/lib/badge/variations.browser-spec.d.ts +1 -0
- package/lib/banner/variations.browser-spec.d.ts +1 -0
- package/lib/breadcrumb-item/variations.browser-spec.d.ts +1 -0
- package/lib/button/variations.browser-spec.d.ts +1 -0
- package/lib/calendar/variations.browser-spec.d.ts +1 -0
- package/lib/calendar-event/variations.browser-spec.d.ts +1 -0
- package/lib/card/card.d.ts +4 -4
- package/lib/card/variations.browser-spec.d.ts +1 -0
- package/lib/checkbox/variations.browser-spec.d.ts +1 -0
- package/lib/color-picker/color-picker.d.ts +1 -1
- package/lib/color-picker/variations.browser-spec.d.ts +1 -0
- package/lib/combobox/variations.browser-spec.d.ts +1 -0
- package/lib/contextual-help/variations.browser-spec.d.ts +1 -0
- package/lib/country/variations.browser-spec.d.ts +1 -0
- package/lib/data-grid/variations.browser-spec.d.ts +1 -0
- package/lib/date-picker/variations.browser-spec.d.ts +1 -0
- package/lib/date-range-picker/variations.browser-spec.d.ts +1 -0
- package/lib/date-time-picker/variations.browser-spec.d.ts +1 -0
- package/lib/dial-pad/variations.browser-spec.d.ts +1 -0
- package/lib/dialog/variations.browser-spec.d.ts +1 -0
- package/lib/divider/variations.browser-spec.d.ts +1 -0
- package/lib/empty-state/variations.browser-spec.d.ts +1 -0
- package/lib/fab/fab.d.ts +5 -5
- package/lib/fab/variations.browser-spec.d.ts +1 -0
- package/lib/file-picker/variations.browser-spec.d.ts +1 -0
- package/lib/flag/variations.browser-spec.d.ts +1 -0
- package/lib/header/variations.browser-spec.d.ts +1 -0
- package/lib/icon/variations.browser-spec.d.ts +1 -0
- package/lib/kbd-key/variations.browser-spec.d.ts +1 -0
- package/lib/kbd-shortcut/variations.browser-spec.d.ts +1 -0
- package/lib/layout/variations.browser-spec.d.ts +1 -0
- package/lib/menu/variations.browser-spec.d.ts +1 -0
- package/lib/menu-item/variations.browser-spec.d.ts +1 -0
- package/lib/nav/variations.browser-spec.d.ts +1 -0
- package/lib/nav-disclosure/variations.browser-spec.d.ts +1 -0
- package/lib/nav-item/variations.browser-spec.d.ts +1 -0
- package/lib/note/variations.browser-spec.d.ts +1 -0
- package/lib/number-field/variations.browser-spec.d.ts +1 -0
- package/lib/option/variations.browser-spec.d.ts +1 -0
- package/lib/pagination/variations.browser-spec.d.ts +1 -0
- package/lib/popover/variations.browser-spec.d.ts +1 -0
- package/lib/progress/variations.browser-spec.d.ts +1 -0
- package/lib/progress-ring/variations.browser-spec.d.ts +1 -0
- package/lib/radio/variations.browser-spec.d.ts +1 -0
- package/lib/radio-group/variations.browser-spec.d.ts +1 -0
- package/lib/range-slider/variations.browser-spec.d.ts +1 -0
- package/lib/rich-text-editor/rte/features/internal/cursor-fix.d.ts +6 -1
- package/lib/rich-text-editor/variations.browser-spec.d.ts +1 -0
- package/lib/rich-text-view/variations.browser-spec.d.ts +1 -0
- package/lib/searchable-select/variations.browser-spec.d.ts +1 -0
- package/lib/select/variations.browser-spec.d.ts +1 -0
- package/lib/selectable-box/variations.browser-spec.d.ts +1 -0
- package/lib/side-drawer/variations.browser-spec.d.ts +1 -0
- package/lib/simple-color-picker/simple-color-picker.d.ts +2 -2
- package/lib/simple-color-picker/variations.browser-spec.d.ts +1 -0
- package/lib/slider/variations.browser-spec.d.ts +1 -0
- package/lib/split-button/variations.browser-spec.d.ts +1 -0
- package/lib/status/variations.browser-spec.d.ts +1 -0
- package/lib/switch/variations.browser-spec.d.ts +1 -0
- package/lib/tab/tab.d.ts +12 -12
- package/lib/table/variations.browser-spec.d.ts +1 -0
- package/lib/tabs/variations.browser-spec.d.ts +1 -0
- package/lib/tag/tag.d.ts +12 -12
- package/lib/tag/variations.browser-spec.d.ts +1 -0
- package/lib/text-area/text-area.template.d.ts +1 -2
- package/lib/text-area/variations.browser-spec.d.ts +1 -0
- package/lib/text-field/variations.browser-spec.d.ts +1 -0
- package/lib/time-picker/variations.browser-spec.d.ts +1 -0
- package/lib/toggletip/variations.browser-spec.d.ts +1 -0
- package/lib/tooltip/variations.browser-spec.d.ts +1 -0
- package/lib/tree-item/variations.browser-spec.d.ts +1 -0
- package/lib/video-player/variations.browser-spec.d.ts +1 -0
- package/menu/definition.cjs +1 -1
- package/menu/definition.js +1 -1
- package/menu-item/definition.cjs +1 -1
- package/menu-item/definition.js +1 -1
- package/nav-disclosure/index.cjs +6 -6
- package/nav-disclosure/index.js +11 -15
- package/nav-item/index.cjs +2 -2
- package/nav-item/index.js +11 -15
- package/note/index.cjs +5 -5
- package/note/index.js +10 -11
- package/number-field/index.cjs +12 -12
- package/number-field/index.js +34 -35
- package/package.json +19 -10
- package/popover/index.cjs +8 -8
- package/popover/index.js +11 -15
- package/popup/definition.cjs +1 -1
- package/popup/definition.js +1 -1
- package/progress/index.cjs +8 -8
- package/progress/index.js +9 -10
- package/range-slider/index.cjs +10 -8
- package/range-slider/index.js +26 -24
- package/rich-text-editor/index.cjs +3 -3
- package/rich-text-editor/index.js +758 -747
- package/searchable-select/definition.cjs +1 -0
- package/searchable-select/definition.js +2 -2
- package/searchable-select/index.cjs +30 -27
- package/searchable-select/index.js +80 -76
- package/selectable-box/index.cjs +8 -8
- package/selectable-box/index.js +8 -9
- package/side-drawer/index.cjs +3 -3
- package/side-drawer/index.js +3 -3
- package/simple-color-picker/index.cjs +4 -4
- package/simple-color-picker/index.js +6 -6
- package/slider/definition.cjs +1 -1
- package/slider/definition.js +1 -1
- package/slider/index.cjs +1 -1
- package/slider/index.js +1 -1
- package/split-button/index.cjs +4 -4
- package/split-button/index.js +9 -9
- package/status/index.cjs +7 -5
- package/status/index.js +14 -12
- package/styles/core/all.css +5 -7
- package/styles/core/theme.css +5 -7
- package/styles/core/typography.css +0 -3
- package/styles/tokens/vivid-2-compat.css +1 -6
- package/switch/index.cjs +3 -3
- package/switch/index.js +5 -5
- package/table/index.cjs +10 -10
- package/table/index.js +12 -12
- package/tabs/index.cjs +6 -4
- package/tabs/index.js +10 -9
- package/tag/index.cjs +6 -6
- package/tag/index.js +8 -8
- package/text-area/index.cjs +8 -6
- package/text-area/index.js +20 -19
- package/unbundled/affix.cjs +2 -7
- package/unbundled/affix.js +2 -7
- package/unbundled/anchored.cjs +2 -6
- package/unbundled/anchored.js +2 -6
- package/unbundled/aria-binding-directive.cjs +1 -3
- package/unbundled/aria-binding-directive.js +1 -3
- package/unbundled/base-color-picker.cjs +18 -52
- package/unbundled/base-color-picker.js +18 -52
- package/unbundled/base-progress.cjs +4 -14
- package/unbundled/base-progress.js +4 -14
- package/unbundled/button.cjs +2 -8
- package/unbundled/button.js +2 -8
- package/unbundled/calendar-picker.template.cjs +31 -85
- package/unbundled/calendar-picker.template.js +30 -84
- package/unbundled/char-count.cjs +2 -4
- package/unbundled/char-count.js +2 -4
- package/unbundled/data-grid.options.cjs +3 -19
- package/unbundled/data-grid.options.js +3 -19
- package/unbundled/definition.cjs +3 -8
- package/unbundled/definition.js +3 -8
- package/unbundled/definition10.cjs +316 -211
- package/unbundled/definition10.js +313 -202
- package/unbundled/definition11.cjs +262 -356
- package/unbundled/definition11.js +248 -354
- package/unbundled/definition12.cjs +243 -274
- package/unbundled/definition12.js +241 -260
- package/unbundled/definition13.cjs +341 -255
- package/unbundled/definition13.js +338 -252
- package/unbundled/definition14.cjs +61 -371
- package/unbundled/definition14.js +57 -367
- package/unbundled/definition15.cjs +32 -77
- package/unbundled/definition15.js +28 -73
- package/unbundled/definition16.cjs +120 -32
- package/unbundled/definition16.js +117 -29
- package/unbundled/definition17.cjs +24 -132
- package/unbundled/definition17.js +24 -126
- package/unbundled/definition18.cjs +74 -26
- package/unbundled/definition18.js +67 -25
- package/unbundled/definition19.cjs +33 -79
- package/unbundled/definition19.js +32 -73
- package/unbundled/definition2.cjs +3 -6
- package/unbundled/definition2.js +3 -6
- package/unbundled/definition20.cjs +272 -29
- package/unbundled/definition20.js +264 -27
- package/unbundled/definition21.cjs +135 -263
- package/unbundled/definition21.js +133 -260
- package/unbundled/definition22.cjs +17 -155
- package/unbundled/definition22.js +13 -151
- package/unbundled/definition23.cjs +8 -17
- package/unbundled/definition23.js +8 -17
- package/unbundled/definition24.cjs +4 -10
- package/unbundled/definition24.js +4 -10
- package/unbundled/definition25.cjs +2 -10
- package/unbundled/definition25.js +2 -10
- package/unbundled/definition26.cjs +28 -70
- package/unbundled/definition26.js +28 -70
- package/unbundled/definition27.cjs +6 -13
- package/unbundled/definition27.js +6 -13
- package/unbundled/definition28.cjs +30 -77
- package/unbundled/definition28.js +30 -77
- package/unbundled/definition29.cjs +7 -14
- package/unbundled/definition29.js +7 -14
- package/unbundled/definition3.cjs +5 -16
- package/unbundled/definition3.js +5 -16
- package/unbundled/definition30.cjs +20 -51
- package/unbundled/definition30.js +20 -51
- package/unbundled/definition31.cjs +2 -4
- package/unbundled/definition31.js +2 -4
- package/unbundled/definition32.cjs +7 -17
- package/unbundled/definition32.js +7 -17
- package/unbundled/definition33.cjs +4 -9
- package/unbundled/definition33.js +4 -9
- package/unbundled/definition34.cjs +51 -141
- package/unbundled/definition34.js +51 -141
- package/unbundled/definition35.cjs +4 -5
- package/unbundled/definition35.js +4 -5
- package/unbundled/definition36.cjs +16 -38
- package/unbundled/definition36.js +14 -36
- package/unbundled/definition37.cjs +33 -89
- package/unbundled/definition37.js +31 -87
- package/unbundled/definition38.cjs +18 -44
- package/unbundled/definition38.js +16 -42
- package/unbundled/definition39.cjs +16 -32
- package/unbundled/definition39.js +13 -29
- package/unbundled/definition4.cjs +2 -11
- package/unbundled/definition4.js +2 -7
- package/unbundled/definition40.cjs +9 -20
- package/unbundled/definition40.js +9 -20
- package/unbundled/definition41.cjs +3 -6
- package/unbundled/definition41.js +3 -6
- package/unbundled/definition42.cjs +3 -6
- package/unbundled/definition42.js +3 -6
- package/unbundled/definition43.cjs +24 -67
- package/unbundled/definition43.js +24 -67
- package/unbundled/definition44.cjs +3 -6
- package/unbundled/definition44.js +3 -6
- package/unbundled/definition45.cjs +1 -3
- package/unbundled/definition45.js +1 -3
- package/unbundled/definition46.cjs +5 -14
- package/unbundled/definition46.js +5 -14
- package/unbundled/definition47.cjs +4 -5
- package/unbundled/definition47.js +5 -11
- package/unbundled/definition48.cjs +5 -12
- package/unbundled/definition48.js +5 -12
- package/unbundled/definition49.cjs +3 -7
- package/unbundled/definition49.js +3 -7
- package/unbundled/definition5.cjs +2 -5
- package/unbundled/definition5.js +2 -5
- package/unbundled/definition50.cjs +1 -3
- package/unbundled/definition50.js +1 -3
- package/unbundled/definition51.cjs +2 -5
- package/unbundled/definition51.js +2 -5
- package/unbundled/definition52.cjs +19 -44
- package/unbundled/definition52.js +16 -41
- package/unbundled/definition53.cjs +5 -13
- package/unbundled/definition53.js +5 -13
- package/unbundled/definition54.cjs +2 -6
- package/unbundled/definition54.js +2 -6
- package/unbundled/definition55.cjs +23 -65
- package/unbundled/definition55.js +23 -65
- package/unbundled/definition56.cjs +2 -5
- package/unbundled/definition56.js +2 -5
- package/unbundled/definition57.cjs +11 -24
- package/unbundled/definition57.js +11 -26
- package/unbundled/definition58.cjs +10 -30
- package/unbundled/definition58.js +10 -30
- package/unbundled/definition59.cjs +19 -48
- package/unbundled/definition59.js +19 -48
- package/unbundled/definition6.cjs +179 -17
- package/unbundled/definition6.js +170 -14
- package/unbundled/definition60.cjs +70 -54
- package/unbundled/definition60.js +70 -54
- package/unbundled/definition61.cjs +22 -54
- package/unbundled/definition61.js +22 -54
- package/unbundled/definition62.cjs +3 -9
- package/unbundled/definition62.js +3 -9
- package/unbundled/definition63.cjs +62 -130
- package/unbundled/definition63.js +60 -131
- package/unbundled/definition64.cjs +5 -12
- package/unbundled/definition64.js +5 -12
- package/unbundled/definition65.cjs +6 -14
- package/unbundled/definition65.js +6 -19
- package/unbundled/definition66.cjs +13 -35
- package/unbundled/definition66.js +13 -35
- package/unbundled/definition67.cjs +3 -5
- package/unbundled/definition67.js +3 -5
- package/unbundled/definition68.cjs +4 -5
- package/unbundled/definition68.js +4 -5
- package/unbundled/definition69.cjs +6 -15
- package/unbundled/definition69.js +6 -17
- package/unbundled/definition7.cjs +31 -177
- package/unbundled/definition7.js +24 -170
- package/unbundled/definition70.cjs +1 -3
- package/unbundled/definition70.js +1 -3
- package/unbundled/definition71.cjs +7 -12
- package/unbundled/definition71.js +7 -12
- package/unbundled/definition72.cjs +11 -25
- package/unbundled/definition72.js +11 -25
- package/unbundled/definition73.cjs +15 -39
- package/unbundled/definition73.js +15 -39
- package/unbundled/definition74.cjs +1 -3
- package/unbundled/definition74.js +1 -3
- package/unbundled/definition75.cjs +5 -11
- package/unbundled/definition75.js +5 -11
- package/unbundled/definition76.cjs +24 -59
- package/unbundled/definition76.js +24 -59
- package/unbundled/definition77.cjs +6 -8
- package/unbundled/definition77.js +4 -6
- package/unbundled/definition78.cjs +7 -13
- package/unbundled/definition78.js +7 -13
- package/unbundled/definition79.cjs +5 -15
- package/unbundled/definition79.js +5 -15
- package/unbundled/definition8.cjs +152 -36
- package/unbundled/definition8.js +148 -31
- package/unbundled/definition80.cjs +9 -25
- package/unbundled/definition80.js +9 -25
- package/unbundled/definition9.cjs +200 -135
- package/unbundled/definition9.js +189 -130
- package/unbundled/delegates-aria.cjs +1 -3
- package/unbundled/delegates-aria.js +1 -3
- package/unbundled/divider.cjs +2 -7
- package/unbundled/divider.js +2 -7
- package/unbundled/form-associated.cjs +20 -60
- package/unbundled/form-associated.js +20 -60
- package/unbundled/form-element.cjs +5 -15
- package/unbundled/form-element.js +5 -15
- package/unbundled/host-semantics.cjs +1 -3
- package/unbundled/host-semantics.js +1 -3
- package/unbundled/kbd-shortcut.cjs +1 -3
- package/unbundled/kbd-shortcut.js +1 -3
- package/unbundled/linkable.cjs +1 -3
- package/unbundled/linkable.js +1 -3
- package/unbundled/listbox.cjs +6 -20
- package/unbundled/listbox.js +6 -20
- package/unbundled/localized.cjs +3 -9
- package/unbundled/localized.js +3 -9
- package/unbundled/mixins.cjs +9 -25
- package/unbundled/mixins.js +9 -25
- package/unbundled/numberConverter.cjs +39 -9
- package/unbundled/numberConverter.js +39 -9
- package/unbundled/picker-field.template.cjs +16 -36
- package/unbundled/picker-field.template.js +16 -36
- package/unbundled/platform.cjs +1 -3
- package/unbundled/platform.js +1 -3
- package/unbundled/playbackRates.cjs +1 -3
- package/unbundled/playbackRates.js +1 -3
- package/unbundled/randomId.cjs +1 -3
- package/unbundled/randomId.js +1 -3
- package/unbundled/single-date-picker.cjs +6 -18
- package/unbundled/single-date-picker.js +6 -18
- package/unbundled/single-value-picker.cjs +7 -21
- package/unbundled/single-value-picker.js +7 -21
- package/unbundled/slider.template.cjs +6 -14
- package/unbundled/slider.template.js +6 -14
- package/unbundled/slottable-request.cjs +2 -6
- package/unbundled/slottable-request.js +2 -6
- package/unbundled/text-field.cjs +1 -1
- package/unbundled/text-field.js +1 -1
- package/unbundled/time-selection-picker.template.cjs +27 -79
- package/unbundled/time-selection-picker.template.js +27 -79
- package/unbundled/trapped-focus.cjs +1 -3
- package/unbundled/trapped-focus.js +1 -3
- package/unbundled/vivid-element.cjs +7 -19
- package/unbundled/vivid-element.js +7 -19
- package/unbundled/with-contextual-help.cjs +4 -13
- package/unbundled/with-contextual-help.js +4 -13
- package/unbundled/with-error-text.cjs +2 -6
- package/unbundled/with-error-text.js +2 -6
- package/unbundled/with-success-text.cjs +1 -3
- package/unbundled/with-success-text.js +1 -3
- package/video-player/index.cjs +3 -3
- package/video-player/index.js +5 -5
- package/visually-hidden/definition.cjs +1 -1
- package/visually-hidden/definition.js +1 -1
- package/shared/color-picker/index.d.ts +0 -3
- package/shared/foundation/button/index.d.ts +0 -2
- package/shared/patterns/char-count/index.d.ts +0 -1
- package/shared/patterns/form-elements/index.d.ts +0 -4
- package/shared/patterns/index.d.ts +0 -7
|
@@ -1,407 +1,313 @@
|
|
|
1
1
|
require("./chunk.cjs");
|
|
2
2
|
const require_vivid_element = require("./vivid-element.cjs");
|
|
3
|
+
const require_definition = require("./definition.cjs");
|
|
3
4
|
const require_decorate = require("./decorate.cjs");
|
|
4
|
-
const
|
|
5
|
-
const require_form_associated = require("./form-associated.cjs");
|
|
6
|
-
const require_localized = require("./localized.cjs");
|
|
7
|
-
const require_definition = require("./definition10.cjs");
|
|
5
|
+
const require_affix = require("./affix.cjs");
|
|
8
6
|
const require_key_codes = require("./key-codes.cjs");
|
|
9
|
-
const
|
|
7
|
+
const require_kbd_shortcut = require("./kbd-shortcut.cjs");
|
|
8
|
+
const require_host_semantics = require("./host-semantics.cjs");
|
|
10
9
|
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
11
10
|
let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
|
|
12
|
-
//#region src/lib/
|
|
13
|
-
var
|
|
11
|
+
//#region src/lib/menu-item/menu-item.scss?inline
|
|
12
|
+
var menu_item_default = ":host(:focus-visible){outline:none}:host([disabled]){pointer-events: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)),.base.selected:where(:not(.disabled,:disabled)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-soft);--_appearance-color-outline:transparent}@media (hover:hover){.base.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-dim);--_appearance-color-outline:transparent}}.base.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-dim);--_appearance-color-outline:transparent}.base.connotation-cta{--_connotation-color-primary:var(--vvd-menu-item-cta-primary,var(--vvd-color-cta-500));--_connotation-color-primary-text:var(--vvd-menu-item-cta-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-menu-item-cta-primary-increment,var(--vvd-color-cta-600));--_connotation-color-firm:var(--vvd-menu-item-cta-firm,var(--vvd-color-cta-600));--_connotation-color-faint:var(--vvd-menu-item-cta-faint,var(--vvd-color-cta-50));--_connotation-color-soft:var(--vvd-menu-item-cta-soft,var(--vvd-color-cta-100));--_connotation-color-pale:var(--vvd-menu-item-cta-pale,var(--vvd-color-cta-300));--_connotation-color-dim:var(--vvd-menu-item-cta-dim,var(--vvd-color-cta-200))}.base:not(.connotation-cta){--_connotation-color-primary:var(--vvd-menu-item-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-menu-item-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-menu-item-accent-primary-increment,var(--vvd-color-neutral-800));--_connotation-color-firm:var(--vvd-menu-item-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-faint:var(--vvd-menu-item-accent-faint,var(--vvd-color-neutral-50));--_connotation-color-soft:var(--vvd-menu-item-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-pale:var(--vvd-menu-item-accent-pale,var(--vvd-color-neutral-300));--_connotation-color-dim:var(--vvd-menu-item-accent-dim,var(--vvd-color-neutral-200))}.base{--_menu-item-padding-inline:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2.5);box-sizing:border-box;background-color:var(--_appearance-color-fill);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);border-radius:8px;align-items:center;inline-size:100%;display:flex}.base:not(.two-lines){min-block-size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)));padding-block:8px;padding-inline:var(--_menu-item-padding-inline);gap:12px}.base.two-lines{min-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)));padding-block:12px;padding-inline:var(--_menu-item-padding-inline);gap:16px}.base{user-select:none}.base:not(.disabled){cursor:pointer}:host(:not([role=presentation]):focus-visible) .base{box-shadow:0 0 0 4px color-mix(in sRGB, var(--focus-stroke-color,var(--vvd-color-cta-500)), transparent 85%), inset 0 0 0 3px var(--focus-stroke-gap-color,currentColor);outline:1px solid var(--focus-stroke-color,var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset,0px));--focus-stroke-gap-color:transparent}.icon{font-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2);flex-shrink:0;line-height:1}.action,.decorative{place-content:center;display:flex}.action{color:var(--_appearance-color-text)}.base.trailing .action,.base.has-meta .action{order:2}:host(:not([check-appearance],[checked],[disabled])) .action{color:var(--vvd-color-neutral-500)}.base:not(.disabled) .decorative{color:var(--vvd-color-neutral-600)}.base.disabled .decorative{color:var(--vvd-color-neutral-200)}.base.has-meta .decorative{order:1}.chevron{order:3}.text{flex-direction:column;gap:4px;margin-inline-end:auto;display:flex;overflow:hidden}.text-primary,.text-secondary{font:var(--vvd-typography-base);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.text-primary{font:var(--vvd-typography-base);-webkit-line-clamp:var(--text-primary-line-clamp,1)}.base:not(.disabled) .text-primary{color:var(--vvd-color-canvas-text)}.base.disabled .text-primary{color:var(--_appearance-color-text)}.base.two-lines .text-primary{font:var(--vvd-typography-base-bold)}.text-secondary{color:var(--vvd-color-neutral-800);font:var(--vvd-typography-base-condensed);-webkit-line-clamp:var(--text-secondary-line-clamp,1)}.base.two-lines .text-secondary{color:var(--vvd-color-neutral-600)}.base.disabled .text-secondary{color:var(--_appearance-color-text)}.base.selected:not(.disabled) .text-secondary{color:var(--vvd-color-neutral-800)}:host([internal-part]) .text-primary{font:var(--_text-primary-custom-size,var--vvd-typography-base)}";
|
|
14
13
|
//#endregion
|
|
15
|
-
//#region src/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var getDirection = (rootNode) => {
|
|
22
|
-
const dirNode = rootNode.closest("[dir]");
|
|
23
|
-
return dirNode !== null && dirNode.dir === "rtl" ? _microsoft_fast_web_utilities.Direction.rtl : _microsoft_fast_web_utilities.Direction.ltr;
|
|
14
|
+
//#region src/lib/menu-item/menu-item-role.ts
|
|
15
|
+
var MenuItemRole = {
|
|
16
|
+
menuitem: "menuitem",
|
|
17
|
+
menuitemcheckbox: "menuitemcheckbox",
|
|
18
|
+
menuitemradio: "menuitemradio",
|
|
19
|
+
presentation: "presentation"
|
|
24
20
|
};
|
|
25
21
|
//#endregion
|
|
26
|
-
//#region src/lib/
|
|
22
|
+
//#region src/lib/menu-item/menu-item.ts
|
|
27
23
|
/**
|
|
28
|
-
* The selection modes of a Slider.
|
|
29
24
|
* @public
|
|
25
|
+
* @component menu-item
|
|
26
|
+
* @slot meta - Assign nodes to the `meta` slot to set a badge or an additional icon.
|
|
27
|
+
* @slot trailing-meta - Assign nodes to the `meta` slot to set a badge or an additional icon.
|
|
28
|
+
* @slot submenu - Assign a Menu to the `submenu` slot to add a submenu.
|
|
29
|
+
* @event {CustomEvent<HTMLElement>} expanded-change - Fired when the expanded state changes.
|
|
30
|
+
* @event {CustomEvent<undefined>} change - Fired when the item is triggered. Does not fire when a submenu is collapsed or expanded.
|
|
31
|
+
* @vueModel modelValue checked change `event.currentTarget.checked`
|
|
32
|
+
* @testSelector byText byText
|
|
33
|
+
* @testAction click click #base
|
|
34
|
+
* @testQuery checked checked true
|
|
35
|
+
* @testQuery unchecked checked false
|
|
36
|
+
* @testQuery disabled disabled
|
|
37
|
+
* @testRef base shadow .base
|
|
30
38
|
*/
|
|
31
|
-
var
|
|
32
|
-
/**
|
|
33
|
-
|
|
34
|
-
* @component slider
|
|
35
|
-
* @event {CustomEvent<undefined>} change - Fires a custom 'change' event when the slider value changes
|
|
36
|
-
* @vueModel modelValue value change `event.currentTarget.value`
|
|
37
|
-
* @vueModel valueAsNumber valueAsNumber change `event.currentTarget.valueAsNumber`
|
|
38
|
-
* @testSelector byLabel byLabel
|
|
39
|
-
* @testAction slideTo slideTo #track #thumb
|
|
40
|
-
* @testQuery valueAsNumber valueAsNumber
|
|
41
|
-
* @testRef track shadow .control
|
|
42
|
-
* @testRef thumb shadow .thumb-container
|
|
43
|
-
*/
|
|
44
|
-
var Slider = class extends require_localized.Localized(require_delegates_aria.DelegatesAria(require_form_associated.FormAssociated(require_vivid_element.VividElement))) {
|
|
45
|
-
constructor(..._args) {
|
|
46
|
-
super(..._args);
|
|
47
|
-
this.proxy = document.createElement("input");
|
|
48
|
-
this.direction = _microsoft_fast_web_utilities.Direction.ltr;
|
|
49
|
-
this.isDragging = false;
|
|
50
|
-
this.trackWidth = 0;
|
|
51
|
-
this.trackMinWidth = 0;
|
|
52
|
-
this.trackHeight = 0;
|
|
53
|
-
this.trackLeft = 0;
|
|
54
|
-
this.trackMinHeight = 0;
|
|
55
|
-
this.valueTextFormatter = (value) => parseFloat(value).toLocaleString(this.locale.lang);
|
|
56
|
-
this.min = 0;
|
|
57
|
-
this.max = 10;
|
|
58
|
-
this.step = 1;
|
|
59
|
-
this.orientation = _microsoft_fast_web_utilities.Orientation.horizontal;
|
|
60
|
-
this.mode = SliderMode.singleValue;
|
|
61
|
-
this.keypressHandler = (e) => {
|
|
62
|
-
this._focusVisible = true;
|
|
63
|
-
if (this.readOnly) return;
|
|
64
|
-
if (e.key === _microsoft_fast_web_utilities.keyHome) {
|
|
65
|
-
e.preventDefault();
|
|
66
|
-
this.value = `${this.min}`;
|
|
67
|
-
} else if (e.key === _microsoft_fast_web_utilities.keyEnd) {
|
|
68
|
-
e.preventDefault();
|
|
69
|
-
this.value = `${this.max}`;
|
|
70
|
-
} else {
|
|
71
|
-
if (e.shiftKey) return;
|
|
72
|
-
switch (e.key) {
|
|
73
|
-
case require_key_codes.keyArrowRight:
|
|
74
|
-
case _microsoft_fast_web_utilities.keyArrowUp:
|
|
75
|
-
e.preventDefault();
|
|
76
|
-
this.increment();
|
|
77
|
-
break;
|
|
78
|
-
case require_key_codes.keyArrowLeft:
|
|
79
|
-
case _microsoft_fast_web_utilities.keyArrowDown:
|
|
80
|
-
e.preventDefault();
|
|
81
|
-
this.decrement();
|
|
82
|
-
break;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
this.setupTrackConstraints = () => {
|
|
87
|
-
const clientRect = this.track.getBoundingClientRect();
|
|
88
|
-
this.trackWidth = this.track.clientWidth;
|
|
89
|
-
this.trackMinWidth = this.track.clientLeft;
|
|
90
|
-
this.trackHeight = clientRect.bottom;
|
|
91
|
-
this.trackMinHeight = clientRect.top;
|
|
92
|
-
this.trackLeft = this.getBoundingClientRect().left;
|
|
93
|
-
if (this.trackWidth === 0) this.trackWidth = 1;
|
|
94
|
-
};
|
|
95
|
-
this.setupListeners = (remove = false) => {
|
|
96
|
-
const eventAction = remove ? "removeEventListener" : "addEventListener";
|
|
97
|
-
this[eventAction]("keydown", this.keypressHandler);
|
|
98
|
-
this[eventAction]("mousedown", this.handleMouseDown);
|
|
99
|
-
this.thumb[eventAction]("mousedown", this.handleThumbMouseDown, { passive: true });
|
|
100
|
-
this.thumb[eventAction]("touchstart", this.handleThumbMouseDown, { passive: true });
|
|
101
|
-
if (remove) {
|
|
102
|
-
this.handleMouseDown(null);
|
|
103
|
-
this.handleThumbMouseDown(null);
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
this.initialValue = "";
|
|
107
|
-
this.handleThumbMouseDown = (event) => {
|
|
108
|
-
if (event) {
|
|
109
|
-
if (this.readOnly || this.disabled || event.defaultPrevented) return;
|
|
110
|
-
this.#isNonVisibleFocus = true;
|
|
111
|
-
event.target.focus();
|
|
112
|
-
this.#isNonVisibleFocus = false;
|
|
113
|
-
}
|
|
114
|
-
const eventAction = event !== null ? "addEventListener" : "removeEventListener";
|
|
115
|
-
window[eventAction]("mouseup", this.handleWindowMouseUp);
|
|
116
|
-
window[eventAction]("mousemove", this.handleMouseMove, { passive: true });
|
|
117
|
-
window[eventAction]("touchmove", this.handleMouseMove, { passive: true });
|
|
118
|
-
window[eventAction]("touchend", this.handleWindowMouseUp);
|
|
119
|
-
this.isDragging = event !== null;
|
|
120
|
-
};
|
|
121
|
-
this.handleMouseMove = (e) => {
|
|
122
|
-
if (this.readOnly || this.disabled || e.defaultPrevented) return;
|
|
123
|
-
const sourceEvent = "TouchEvent" in window && e instanceof TouchEvent ? e.touches[0] : e;
|
|
124
|
-
const value = this.#calculateValueFromMouseEvent(sourceEvent);
|
|
125
|
-
this.value = `${this.#roundToNearestStep(value)}`;
|
|
126
|
-
};
|
|
127
|
-
this.handleWindowMouseUp = (_) => {
|
|
128
|
-
this.stopDragging();
|
|
129
|
-
};
|
|
130
|
-
this.stopDragging = () => {
|
|
131
|
-
this.isDragging = false;
|
|
132
|
-
this.handleMouseDown(null);
|
|
133
|
-
this.handleThumbMouseDown(null);
|
|
134
|
-
};
|
|
135
|
-
this.handleMouseDown = (e) => {
|
|
136
|
-
const eventAction = e !== null ? "addEventListener" : "removeEventListener";
|
|
137
|
-
if (e === null || !this.disabled && !this.readOnly) {
|
|
138
|
-
window[eventAction]("mouseup", this.handleWindowMouseUp);
|
|
139
|
-
window.document[eventAction]("mouseleave", this.handleWindowMouseUp);
|
|
140
|
-
window[eventAction]("mousemove", this.handleMouseMove);
|
|
141
|
-
if (e) {
|
|
142
|
-
e.preventDefault();
|
|
143
|
-
this.setupTrackConstraints();
|
|
144
|
-
this.#isNonVisibleFocus = true;
|
|
145
|
-
e.target.focus();
|
|
146
|
-
this.#isNonVisibleFocus = false;
|
|
147
|
-
const value = this.#calculateValueFromMouseEvent(e);
|
|
148
|
-
this.value = `${this.#roundToNearestStep(value)}`;
|
|
149
|
-
this.isDragging = true;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
this.markers = false;
|
|
154
|
-
this.pin = false;
|
|
155
|
-
this._focusVisible = false;
|
|
156
|
-
this._hoveringOnThumb = false;
|
|
157
|
-
this.#isNonVisibleFocus = false;
|
|
158
|
-
this._onFocusIn = () => {
|
|
159
|
-
if (!this.#isNonVisibleFocus) this._focusVisible = true;
|
|
160
|
-
this.#isNonVisibleFocus = false;
|
|
161
|
-
};
|
|
162
|
-
this._onFocusOut = () => {
|
|
163
|
-
this._focusVisible = false;
|
|
164
|
-
};
|
|
165
|
-
this.#onVisibilityChange = () => {
|
|
166
|
-
if (document.hidden && this.shadowRoot.activeElement !== null) this.#isNonVisibleFocus = true;
|
|
167
|
-
};
|
|
168
|
-
this.#onMouseOver = () => {
|
|
169
|
-
this._hoveringOnThumb = true;
|
|
170
|
-
};
|
|
171
|
-
this.#onMouseOut = () => {
|
|
172
|
-
this._hoveringOnThumb = false;
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* @internal
|
|
177
|
-
*/
|
|
178
|
-
readOnlyChanged() {
|
|
39
|
+
var MenuItem = class extends require_kbd_shortcut.WithKbdShortcut(require_host_semantics.HostSemantics(require_affix.AffixIcon(require_vivid_element.VividElement))) {
|
|
40
|
+
/** @internal */
|
|
41
|
+
expandedChanged() {
|
|
179
42
|
/* v8 ignore if -- @preserve */
|
|
180
|
-
if (this.proxy instanceof HTMLInputElement) this.proxy.readOnly = this.readOnly;
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* The value property, typed as a number.
|
|
184
|
-
*
|
|
185
|
-
* @public
|
|
186
|
-
*/
|
|
187
|
-
get valueAsNumber() {
|
|
188
|
-
return parseFloat(this.value);
|
|
189
|
-
}
|
|
190
|
-
set valueAsNumber(next) {
|
|
191
|
-
this.value = next.toString();
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* @internal
|
|
195
|
-
*/
|
|
196
|
-
valueChanged(previous, next) {
|
|
197
|
-
super.valueChanged(previous, next);
|
|
198
43
|
if (this.$fastController.isConnected) {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
if (value !== next) {
|
|
202
|
-
this.value = value;
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
this.setThumbPositionForOrientation(this.direction);
|
|
206
|
-
this.$emit("change");
|
|
44
|
+
if (this.submenu && !this.expanded) this.submenu.collapseExpandedItem();
|
|
45
|
+
this.$emit("expanded-change", this, { bubbles: false });
|
|
207
46
|
}
|
|
208
47
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
/* v8 ignore if -- @preserve */
|
|
214
|
-
if (this.proxy instanceof HTMLInputElement) this.proxy.min = `${this.min}`;
|
|
215
|
-
this.validate();
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* @internal
|
|
219
|
-
*/
|
|
220
|
-
maxChanged() {
|
|
221
|
-
/* v8 ignore if -- @preserve */
|
|
222
|
-
if (this.proxy instanceof HTMLInputElement) this.proxy.max = `${this.max}`;
|
|
223
|
-
this.validate();
|
|
48
|
+
#ensureRoleMatchesPresentational() {
|
|
49
|
+
if (this._isPresentational) {
|
|
50
|
+
if (this.role === "menuitem") this.role = "presentation";
|
|
51
|
+
} else if (this.role === "presentation") this.role = MenuItemRole.menuitem;
|
|
224
52
|
}
|
|
225
|
-
/**
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
stepChanged() {
|
|
229
|
-
/* v8 ignore if -- @preserve */
|
|
230
|
-
if (this.proxy instanceof HTMLInputElement) this.proxy.step = `${this.step}`;
|
|
231
|
-
this.updateStepMultiplier();
|
|
232
|
-
this.validate();
|
|
53
|
+
/** @internal */
|
|
54
|
+
_isPresentationalChanged() {
|
|
55
|
+
if (this.$fastController.isConnected) this.#ensureRoleMatchesPresentational();
|
|
233
56
|
}
|
|
234
|
-
/**
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
orientationChanged() {
|
|
238
|
-
if (this.$fastController.isConnected) this.setThumbPositionForOrientation(this.direction);
|
|
57
|
+
/** @internal */
|
|
58
|
+
checkedChanged() {
|
|
59
|
+
if (this.$fastController.isConnected) this.$emit("change");
|
|
239
60
|
}
|
|
240
|
-
/**
|
|
241
|
-
* @internal
|
|
242
|
-
*/
|
|
61
|
+
/** @internal */
|
|
243
62
|
connectedCallback() {
|
|
244
63
|
super.connectedCallback();
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
this.setupListeners();
|
|
250
|
-
this.setupDefaultValue();
|
|
251
|
-
this.setThumbPositionForOrientation(this.direction);
|
|
252
|
-
this.#registerThumbListeners();
|
|
253
|
-
document.addEventListener("visibilitychange", this.#onVisibilityChange);
|
|
254
|
-
}
|
|
255
|
-
/**
|
|
256
|
-
* @internal
|
|
257
|
-
*/
|
|
258
|
-
disconnectedCallback() {
|
|
259
|
-
this.setupListeners(true);
|
|
260
|
-
this.#unregisterThumbListeners();
|
|
261
|
-
document.removeEventListener("visibilitychange", this.#onVisibilityChange);
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Increment the value by the step
|
|
265
|
-
*
|
|
266
|
-
* @public
|
|
267
|
-
*/
|
|
268
|
-
increment() {
|
|
269
|
-
const newVal = this.direction !== _microsoft_fast_web_utilities.Direction.rtl && this.orientation !== _microsoft_fast_web_utilities.Orientation.vertical ? Number(this.value) + this.step : Number(this.value) - this.step;
|
|
270
|
-
this.value = this.#roundToNearestStep(newVal).toString();
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Decrement the value by the step
|
|
274
|
-
*
|
|
275
|
-
* @public
|
|
276
|
-
*/
|
|
277
|
-
decrement() {
|
|
278
|
-
const newVal = this.direction !== _microsoft_fast_web_utilities.Direction.rtl && this.orientation !== _microsoft_fast_web_utilities.Orientation.vertical ? Number(this.value) - this.step : Number(this.value) + this.step;
|
|
279
|
-
this.value = this.#roundToNearestStep(newVal).toString();
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* Places the thumb based on the current value
|
|
283
|
-
*
|
|
284
|
-
* @public
|
|
285
|
-
* @param direction - writing mode
|
|
286
|
-
*/
|
|
287
|
-
setThumbPositionForOrientation(_) {
|
|
288
|
-
const percentage = this.#thumbTrackEndOffset(this.valueAsNumber);
|
|
289
|
-
if (this.orientation === _microsoft_fast_web_utilities.Orientation.horizontal) this.position = this.isDragging ? `right: ${percentage}%; transition: none;` : `right: ${percentage}%; transition: right 0.2s ease;`;
|
|
290
|
-
else this.position = this.isDragging ? `bottom: ${percentage}%; transition: none;` : `bottom: ${percentage}%; transition: bottom 0.2s ease;`;
|
|
64
|
+
_microsoft_fast_element.Updates.enqueue(() => {
|
|
65
|
+
this._isPresentational = this._isPresentational ?? true;
|
|
66
|
+
this.#ensureRoleMatchesPresentational();
|
|
67
|
+
});
|
|
291
68
|
}
|
|
292
|
-
|
|
293
|
-
|
|
69
|
+
/** @internal */
|
|
70
|
+
_kbdAriaShortcutsValueChanged() {
|
|
71
|
+
_microsoft_fast_element.DOM.setAttribute(this, "aria-keyshortcuts", this._kbdAriaShortcutsValue);
|
|
294
72
|
}
|
|
295
|
-
/**
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
73
|
+
/** @internal */
|
|
74
|
+
slottedSubmenuChanged() {
|
|
75
|
+
if (this.submenu) {
|
|
76
|
+
this.submenu.anchor = this;
|
|
77
|
+
this.submenu.placement = "right-start";
|
|
78
|
+
this.submenu.collapseExpandedItem = () => this.#collapseExpandedItem();
|
|
79
|
+
this.submenu._popupOffset = 5;
|
|
80
|
+
}
|
|
303
81
|
}
|
|
304
|
-
|
|
305
|
-
|
|
82
|
+
/** @internal */
|
|
83
|
+
get submenu() {
|
|
84
|
+
if (this.slottedSubmenu?.length) return this.slottedSubmenu[0];
|
|
85
|
+
else return null;
|
|
306
86
|
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
else {
|
|
311
|
-
const value = parseFloat(this.value);
|
|
312
|
-
if (!Number.isNaN(value) && (value < this.min || value > this.max)) this.value = this.midpoint;
|
|
313
|
-
}
|
|
87
|
+
/** @internal */
|
|
88
|
+
get hasSubmenu() {
|
|
89
|
+
return this.submenu !== null;
|
|
314
90
|
}
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
91
|
+
constructor() {
|
|
92
|
+
super();
|
|
93
|
+
this.role = MenuItemRole.menuitem;
|
|
94
|
+
this.checked = false;
|
|
95
|
+
this.handleMenuItemClick = (e) => {
|
|
96
|
+
if (this._isSyntheticClickEvent(e)) return true;
|
|
97
|
+
this.invoke();
|
|
98
|
+
return Boolean(this._isPresentational);
|
|
99
|
+
};
|
|
100
|
+
this.handleMouseOver = (_) => {
|
|
101
|
+
if (this.disabled || !this.submenu || this.expanded) return false;
|
|
102
|
+
this.expanded = true;
|
|
103
|
+
return false;
|
|
104
|
+
};
|
|
105
|
+
this.handleMouseOut = (_) => {
|
|
106
|
+
if (!this.expanded || this.contains(document.activeElement)) return false;
|
|
107
|
+
this.expanded = false;
|
|
108
|
+
return false;
|
|
109
|
+
};
|
|
110
|
+
this.invoke = () => {
|
|
111
|
+
if (this.disabled || this._isPresentational) return;
|
|
112
|
+
switch (this.controlType) {
|
|
113
|
+
case "checkbox":
|
|
114
|
+
this.checked = !this.checked;
|
|
115
|
+
break;
|
|
116
|
+
case "radio":
|
|
117
|
+
if (!this.checked) this.checked = true;
|
|
118
|
+
break;
|
|
119
|
+
default:
|
|
120
|
+
if (this.submenu) this.expanded = true;
|
|
121
|
+
else this.$emit("change");
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
this.checkTrailing = false;
|
|
126
|
+
this.handleMenuItemKeyDown = (e) => {
|
|
127
|
+
if (e.defaultPrevented) return false;
|
|
128
|
+
switch (e.key) {
|
|
129
|
+
case _microsoft_fast_web_utilities.keyEnter:
|
|
130
|
+
case _microsoft_fast_web_utilities.keySpace:
|
|
131
|
+
this.invoke();
|
|
132
|
+
if (!this.disabled) this.#emitSyntheticClick();
|
|
133
|
+
return false;
|
|
134
|
+
case require_key_codes.keyArrowRight:
|
|
135
|
+
/* v8 ignore else -- @preserve */
|
|
136
|
+
if (this.submenu) {
|
|
137
|
+
this.expanded = true;
|
|
138
|
+
this.#emitSyntheticClick();
|
|
139
|
+
}
|
|
140
|
+
return false;
|
|
141
|
+
case require_key_codes.keyArrowLeft: if (this.expanded) {
|
|
142
|
+
this.#emitSyntheticClick();
|
|
143
|
+
this.expanded = false;
|
|
144
|
+
this.focus();
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return true;
|
|
149
|
+
};
|
|
150
|
+
this.#syntheticClickEvents = /* @__PURE__ */ new WeakSet();
|
|
151
|
+
this.addEventListener("expanded-change", this.#expandedChange);
|
|
327
152
|
}
|
|
328
|
-
#
|
|
329
|
-
|
|
153
|
+
#collapseExpandedItem() {
|
|
154
|
+
this.expanded = false;
|
|
330
155
|
}
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
*/
|
|
334
|
-
get _isThumbPopupOpen() {
|
|
335
|
-
return this._focusVisible || this._hoveringOnThumb || this.isDragging;
|
|
156
|
+
#expandedChange() {
|
|
157
|
+
if (this.submenu) this.submenu.open = this.expanded;
|
|
336
158
|
}
|
|
337
|
-
#
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
this.
|
|
159
|
+
#syntheticClickEvents;
|
|
160
|
+
/** @internal */
|
|
161
|
+
_isSyntheticClickEvent(event) {
|
|
162
|
+
return this.#syntheticClickEvents.has(event);
|
|
341
163
|
}
|
|
342
|
-
#
|
|
343
|
-
|
|
344
|
-
|
|
164
|
+
#emitSyntheticClick() {
|
|
165
|
+
const mouseEvent = new MouseEvent("click", {
|
|
166
|
+
bubbles: true,
|
|
167
|
+
composed: true
|
|
168
|
+
});
|
|
169
|
+
this.#syntheticClickEvents.add(mouseEvent);
|
|
170
|
+
this.dispatchEvent(mouseEvent);
|
|
345
171
|
}
|
|
346
|
-
#onVisibilityChange;
|
|
347
|
-
#onMouseOver;
|
|
348
|
-
#onMouseOut;
|
|
349
172
|
};
|
|
173
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], MenuItem.prototype, "disabled", void 0);
|
|
174
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], MenuItem.prototype, "expanded", void 0);
|
|
175
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], MenuItem.prototype, "_isPresentational", void 0);
|
|
176
|
+
require_decorate.__decorate([require_vivid_element.replaces({
|
|
177
|
+
deprecatedPropertyName: "role",
|
|
178
|
+
fromDeprecated: (role) => {
|
|
179
|
+
switch (role) {
|
|
180
|
+
case "menuitemcheckbox": return "checkbox";
|
|
181
|
+
case "menuitemradio": return "radio";
|
|
182
|
+
default: return;
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
toDeprecated: (controlType) => {
|
|
186
|
+
switch (controlType) {
|
|
187
|
+
case "checkbox": return "menuitemcheckbox";
|
|
188
|
+
case "radio": return "menuitemradio";
|
|
189
|
+
default: return "menuitem";
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}), (0, _microsoft_fast_element.attr)({ attribute: "control-type" })], MenuItem.prototype, "controlType", void 0);
|
|
193
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], MenuItem.prototype, "checked", void 0);
|
|
194
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], MenuItem.prototype, "text", void 0);
|
|
195
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "text-secondary" })], MenuItem.prototype, "textSecondary", void 0);
|
|
196
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], MenuItem.prototype, "connotation", void 0);
|
|
350
197
|
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
})],
|
|
354
|
-
require_decorate.__decorate([_microsoft_fast_element.
|
|
355
|
-
require_decorate.__decorate([_microsoft_fast_element.observable],
|
|
356
|
-
require_decorate.__decorate([_microsoft_fast_element.observable],
|
|
357
|
-
require_decorate.__decorate([_microsoft_fast_element.observable],
|
|
358
|
-
require_decorate.__decorate([_microsoft_fast_element.observable], Slider.prototype, "trackMinWidth", void 0);
|
|
359
|
-
require_decorate.__decorate([_microsoft_fast_element.observable], Slider.prototype, "trackHeight", void 0);
|
|
360
|
-
require_decorate.__decorate([_microsoft_fast_element.observable], Slider.prototype, "trackLeft", void 0);
|
|
361
|
-
require_decorate.__decorate([_microsoft_fast_element.observable], Slider.prototype, "trackMinHeight", void 0);
|
|
362
|
-
require_decorate.__decorate([_microsoft_fast_element.observable], Slider.prototype, "valueTextFormatter", void 0);
|
|
363
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ converter: _microsoft_fast_element.nullableNumberConverter })], Slider.prototype, "min", void 0);
|
|
364
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ converter: _microsoft_fast_element.nullableNumberConverter })], Slider.prototype, "max", void 0);
|
|
365
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ converter: require_slider_template.defaultToOneConverter })], Slider.prototype, "step", void 0);
|
|
366
|
-
require_decorate.__decorate([_microsoft_fast_element.attr], Slider.prototype, "orientation", void 0);
|
|
367
|
-
require_decorate.__decorate([_microsoft_fast_element.attr], Slider.prototype, "mode", void 0);
|
|
368
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], Slider.prototype, "markers", void 0);
|
|
369
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], Slider.prototype, "pin", void 0);
|
|
370
|
-
require_decorate.__decorate([_microsoft_fast_element.attr], Slider.prototype, "connotation", void 0);
|
|
371
|
-
require_decorate.__decorate([_microsoft_fast_element.observable], Slider.prototype, "_focusVisible", void 0);
|
|
372
|
-
require_decorate.__decorate([_microsoft_fast_element.observable], Slider.prototype, "_hoveringOnThumb", void 0);
|
|
373
|
-
require_decorate.__decorate([_microsoft_fast_element.volatile], Slider.prototype, "_isThumbPopupOpen", null);
|
|
198
|
+
mode: "boolean",
|
|
199
|
+
attribute: "check-trailing"
|
|
200
|
+
})], MenuItem.prototype, "checkTrailing", void 0);
|
|
201
|
+
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "check-appearance" })], MenuItem.prototype, "checkedAppearance", void 0);
|
|
202
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], MenuItem.prototype, "metaSlottedContent", void 0);
|
|
203
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], MenuItem.prototype, "trailingMetaSlottedContent", void 0);
|
|
204
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], MenuItem.prototype, "slottedSubmenu", void 0);
|
|
374
205
|
//#endregion
|
|
375
|
-
//#region src/lib/
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
var
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
}
|
|
206
|
+
//#region src/lib/menu/name.ts
|
|
207
|
+
var menuName = "menu";
|
|
208
|
+
//#endregion
|
|
209
|
+
//#region src/lib/menu-item/menu-item.template.ts
|
|
210
|
+
var getIndicatorIcon = (x) => {
|
|
211
|
+
if (x.checkedAppearance === "tick-only") return x.checked ? "check-line" : "";
|
|
212
|
+
return `${x.controlType === "checkbox" ? "checkbox" : "radio"}-${x.checked ? "checked" : "unchecked"}-2-line`;
|
|
213
|
+
};
|
|
214
|
+
function checkIndicator(context) {
|
|
215
|
+
const iconTag = context.tagFor(require_definition.Icon);
|
|
216
|
+
return _microsoft_fast_element.html`${(0, _microsoft_fast_element.when)((x) => Boolean(x.controlType), _microsoft_fast_element.html`<span class="action"><${iconTag} class="icon" name="${(x) => getIndicatorIcon(x)}"></${iconTag}></span>`)}`;
|
|
217
|
+
}
|
|
218
|
+
function text() {
|
|
219
|
+
return _microsoft_fast_element.html`${(0, _microsoft_fast_element.when)((x) => x.text || x.textSecondary, _microsoft_fast_element.html`<span class="text">
|
|
220
|
+
${(0, _microsoft_fast_element.when)((x) => x.text, _microsoft_fast_element.html`<span class="text-primary">${(x) => x.text}</span>`)}
|
|
221
|
+
${(0, _microsoft_fast_element.when)((x) => x.textSecondary, _microsoft_fast_element.html`<span class="text-secondary">${(x) => x.textSecondary}</span>`)}
|
|
222
|
+
</span>`)}`;
|
|
223
|
+
}
|
|
224
|
+
var MenuItemTemplate = (context) => {
|
|
225
|
+
const affixIconTemplate = require_affix.affixIconTemplateFactory(context);
|
|
226
|
+
const iconTag = context.tagFor(require_definition.Icon);
|
|
227
|
+
return _microsoft_fast_element.html`
|
|
228
|
+
<template
|
|
229
|
+
${require_host_semantics.applyHostSemantics({
|
|
230
|
+
ariaHasPopup: (x) => x.hasSubmenu ? "menu" : void 0,
|
|
231
|
+
ariaChecked: (x) => x.controlType ? x.checked : void 0,
|
|
232
|
+
ariaDisabled: (x) => x.disabled,
|
|
233
|
+
ariaExpanded: (x) => x.expanded
|
|
234
|
+
})}
|
|
235
|
+
@keydown="${(x, c) => x.handleMenuItemKeyDown(c.event)}"
|
|
236
|
+
@click="${(x, c) => x.handleMenuItemClick(c.event)}"
|
|
237
|
+
@mouseover="${(x, c) => x.handleMouseOver(c.event)}"
|
|
238
|
+
@mouseout="${(x, c) => x.handleMouseOut(c.event)}"
|
|
239
|
+
>
|
|
240
|
+
<div
|
|
241
|
+
class="${(x) => (0, _microsoft_fast_web_utilities.classNames)("base", [`connotation-${x.connotation}`, Boolean(x.connotation)], ["disabled", x.disabled], ["selected", Boolean(x.controlType && x.checked)], ["trailing", Boolean(x.controlType && (x.checkTrailing || Boolean(x.icon)))], ["item-checkbox", x.controlType === "checkbox"], ["item-radio", x.controlType === "radio"], ["two-lines", Boolean(x.text?.length) && Boolean(x.textSecondary?.length)], ["has-meta", Boolean(x.metaSlottedContent?.length)])}"
|
|
242
|
+
>
|
|
243
|
+
<slot name="meta" ${(0, _microsoft_fast_element.slotted)("metaSlottedContent")}></slot>
|
|
244
|
+
${checkIndicator(context)}
|
|
245
|
+
${(0, _microsoft_fast_element.when)((x) => x.icon, _microsoft_fast_element.html`<span class="decorative"
|
|
246
|
+
>${(x) => affixIconTemplate(x.icon)}</span
|
|
247
|
+
>`)}
|
|
248
|
+
${text()}
|
|
249
|
+
<slot
|
|
250
|
+
name="trailing-meta"
|
|
251
|
+
${(0, _microsoft_fast_element.slotted)("trailingMetaSlottedContent")}
|
|
252
|
+
></slot>
|
|
253
|
+
<slot
|
|
254
|
+
name="kbd-shortcut"
|
|
255
|
+
class="kbd-shortcut-slot"
|
|
256
|
+
${(0, _microsoft_fast_element.slotted)({
|
|
257
|
+
property: "_kbdShortcutSlotted",
|
|
258
|
+
filter: (0, _microsoft_fast_element.elements)()
|
|
259
|
+
})}
|
|
260
|
+
></slot>
|
|
261
|
+
${(0, _microsoft_fast_element.when)((x) => x.hasSubmenu, _microsoft_fast_element.html`<${iconTag} class="chevron" name="chevron-right-line"></${iconTag}>`)}
|
|
262
|
+
</div>
|
|
263
|
+
<slot
|
|
264
|
+
name="submenu"
|
|
265
|
+
${(0, _microsoft_fast_element.slotted)({
|
|
266
|
+
property: "slottedSubmenu",
|
|
267
|
+
filter: (0, _microsoft_fast_element.elements)(context.tagForNonDependency(menuName))
|
|
268
|
+
})}
|
|
269
|
+
></slot>
|
|
270
|
+
</template>
|
|
271
|
+
`;
|
|
272
|
+
};
|
|
273
|
+
//#endregion
|
|
274
|
+
//#region src/lib/menu-item/definition.ts
|
|
275
|
+
/** @internal */
|
|
276
|
+
var menuItemDefinition = require_vivid_element.defineVividComponent("menu-item", MenuItem, MenuItemTemplate, [require_definition.iconDefinition], { styles: menu_item_default });
|
|
383
277
|
/**
|
|
384
|
-
* Registers the
|
|
278
|
+
* Registers the menu-item elements with the design system.
|
|
385
279
|
*
|
|
386
280
|
* @param prefix - the prefix to use for the component name
|
|
387
281
|
*/
|
|
388
|
-
var
|
|
282
|
+
var registerMenuItem = require_vivid_element.createRegisterFunction(menuItemDefinition);
|
|
389
283
|
//#endregion
|
|
390
|
-
Object.defineProperty(exports, "
|
|
284
|
+
Object.defineProperty(exports, "MenuItem", {
|
|
285
|
+
enumerable: true,
|
|
286
|
+
get: function() {
|
|
287
|
+
return MenuItem;
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
Object.defineProperty(exports, "MenuItemRole", {
|
|
291
|
+
enumerable: true,
|
|
292
|
+
get: function() {
|
|
293
|
+
return MenuItemRole;
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
Object.defineProperty(exports, "menuItemDefinition", {
|
|
391
297
|
enumerable: true,
|
|
392
298
|
get: function() {
|
|
393
|
-
return
|
|
299
|
+
return menuItemDefinition;
|
|
394
300
|
}
|
|
395
301
|
});
|
|
396
|
-
Object.defineProperty(exports, "
|
|
302
|
+
Object.defineProperty(exports, "menuName", {
|
|
397
303
|
enumerable: true,
|
|
398
304
|
get: function() {
|
|
399
|
-
return
|
|
305
|
+
return menuName;
|
|
400
306
|
}
|
|
401
307
|
});
|
|
402
|
-
Object.defineProperty(exports, "
|
|
308
|
+
Object.defineProperty(exports, "registerMenuItem", {
|
|
403
309
|
enumerable: true,
|
|
404
310
|
get: function() {
|
|
405
|
-
return
|
|
311
|
+
return registerMenuItem;
|
|
406
312
|
}
|
|
407
313
|
});
|