@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,413 +1,103 @@
|
|
|
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
|
|
6
|
-
const require_enums = require("./enums.cjs");
|
|
7
|
-
const require_definition$1 = require("./definition11.cjs");
|
|
8
|
-
const require_definition$2 = require("./definition12.cjs");
|
|
9
|
-
const require_definition$3 = require("./definition13.cjs");
|
|
10
|
-
const require_playbackRates = require("./playbackRates.cjs");
|
|
5
|
+
const require_delegates_aria = require("./delegates-aria.cjs");
|
|
6
|
+
const require_linkable = require("./linkable.cjs");
|
|
11
7
|
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
12
8
|
let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
|
|
13
|
-
//#region src/lib/
|
|
14
|
-
var
|
|
9
|
+
//#region src/lib/avatar/avatar.scss?inline
|
|
10
|
+
var avatar_default = ":host{display:inline-block}.base.connotation-cta{--_connotation-color-primary:var(--vvd-avatar-cta-primary,var(--vvd-color-cta-500));--_connotation-color-primary-text:var(--vvd-avatar-cta-primary-text,var(--vvd-color-canvas));--_connotation-color-firm:var(--vvd-avatar-cta-firm,var(--vvd-color-cta-600));--_connotation-color-firm-all:var(--vvd-avatar-cta-firm-all,var(--vvd-color-cta-600));--_connotation-color-fierce:var(--vvd-avatar-cta-fierce,var(--vvd-color-cta-700));--_connotation-color-pale:var(--vvd-avatar-cta-pale,var(--vvd-color-cta-300));--_connotation-color-soft:var(--vvd-avatar-cta-soft,var(--vvd-color-cta-100));--_connotation-color-contrast:var(--vvd-avatar-cta-contrast,var(--vvd-color-cta-800))}.base:not(.connotation-cta){--_connotation-color-primary:var(--vvd-avatar-accent-primary,var(--vvd-color-canvas-text));--_connotation-color-primary-text:var(--vvd-avatar-accent-primary-text,var(--vvd-color-canvas));--_connotation-color-firm:var(--vvd-avatar-accent-firm,var(--vvd-color-canvas-text));--_connotation-color-firm-all:var(--vvd-avatar-accent-firm-all,var(--vvd-color-neutral-600));--_connotation-color-fierce:var(--vvd-avatar-accent-fierce,var(--vvd-color-neutral-700));--_connotation-color-pale:var(--vvd-avatar-accent-pale,var(--vvd-color-neutral-300));--_connotation-color-soft:var(--vvd-avatar-accent-soft,var(--vvd-color-neutral-100));--_connotation-color-contrast:var(--vvd-avatar-accent-contrast,var(--vvd-color-neutral-800))}.base{--_appearance-color-text:var(--_connotation-color-primary-text);--_appearance-color-fill:var(--_connotation-color-primary);--_appearance-color-outline:transparent}.base.appearance-outlined{--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:transparent;--_appearance-color-outline:var(--vvd-color-neutral-300)}.base.appearance-duotone{--_appearance-color-text:var(--_connotation-color-firm-all);--_appearance-color-fill:transparent;--_appearance-color-outline:var(--_connotation-color-pale)}.base.appearance-subtle{--_appearance-color-text:var(--_connotation-color-contrast);--_appearance-color-fill:var(--_connotation-color-soft);--_appearance-color-outline:transparent}.base{border-radius:var(--_avatar-border-radius);background-color:var(--_appearance-color-fill);block-size:var(--_size);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);inline-size:var(--_size);vertical-align:middle;border:none;justify-content:center;align-items:center;display:inline-flex;overflow:hidden}.base.size-condensed{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8))}.base.size-condensed .initials{font:var(--vvd-typography-base-condensed-bold)}.base.size-condensed .icon{font-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) - 8)) / 2);line-height:1}.base.size-expanded{--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8))}.base.size-expanded .initials{font:var(--vvd-typography-heading-4)}.base.size-expanded .icon{font-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2) + 8)) / 2);line-height:1}.base:is(a,button){cursor:pointer;--focus-stroke-gap-color:transparent}.base:not(.shape-pill){--_avatar-border-radius:8px}.base:not(.shape-pill).size-condensed{--_avatar-border-radius:4px}.base:not(.size-condensed,.size-expanded){--_size:calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2)))}.base:not(.size-condensed,.size-expanded) .initials{font:var(--vvd-typography-base-extended-bold)}.base:not(.size-condensed,.size-expanded) .icon{font-size:calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density,0), 2))) / 2);line-height:1}.base:is(a,button):focus-visible{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))}.base.shape-pill{--_avatar-border-radius:50%}.base .initials{text-transform:uppercase}.base ::slotted([slot=graphic]){object-fit:cover;block-size:100%;inline-size:100%}";
|
|
15
11
|
//#endregion
|
|
16
|
-
//#region src/lib/
|
|
17
|
-
var SKIP_DIRECTIONS = {
|
|
18
|
-
FORWARD: 1,
|
|
19
|
-
BACKWARD: -1
|
|
20
|
-
};
|
|
21
|
-
function formatTime(time) {
|
|
22
|
-
if (!time || Number.isNaN(time)) return "0:00";
|
|
23
|
-
const min = Math.floor(time / 60);
|
|
24
|
-
const sec = Math.floor(time % 60);
|
|
25
|
-
return `${min}:${sec < 10 ? `0${sec}` : sec}`;
|
|
26
|
-
}
|
|
27
|
-
var PAUSE = true;
|
|
28
|
-
var PLAY = false;
|
|
29
|
-
/**
|
|
30
|
-
* Converter to filter out invalid values for the skip-by attribute.
|
|
31
|
-
*/
|
|
32
|
-
var validSkipByConverter = {
|
|
33
|
-
toView(value) {
|
|
34
|
-
return value;
|
|
35
|
-
},
|
|
36
|
-
fromView(value) {
|
|
37
|
-
return Object.values(require_enums.MediaSkipBy).includes(value) ? value : void 0;
|
|
38
|
-
}
|
|
39
|
-
};
|
|
12
|
+
//#region src/lib/avatar/avatar.ts
|
|
40
13
|
/**
|
|
41
14
|
* @public
|
|
42
|
-
* @component
|
|
43
|
-
* @
|
|
44
|
-
* @
|
|
15
|
+
* @component avatar
|
|
16
|
+
* @slot graphic - Assign nodes to the graphic slot to set a graphic media of any kind (e.g. image, illustration etc).
|
|
17
|
+
* @slot icon - The preferred way to add an icon to the component.
|
|
45
18
|
*/
|
|
46
|
-
var
|
|
19
|
+
var Avatar = class extends require_linkable.Linkable(require_vivid_element.VividElement) {
|
|
47
20
|
constructor(..._args) {
|
|
48
21
|
super(..._args);
|
|
49
|
-
this.
|
|
50
|
-
this.pauseButtonAriaLabel = null;
|
|
51
|
-
this.sliderAriaLabel = null;
|
|
52
|
-
this.skipForwardButtonAriaLabel = null;
|
|
53
|
-
this.skipBackwardButtonAriaLabel = null;
|
|
54
|
-
this.disabled = false;
|
|
55
|
-
this.notime = false;
|
|
56
|
-
this.playbackRates = null;
|
|
57
|
-
this.#playerEl = new Audio();
|
|
58
|
-
this.#isProgrammaticSliderUpdate = false;
|
|
59
|
-
this.durationFallback = false;
|
|
60
|
-
this.#onPlay = () => {
|
|
61
|
-
if (!this.#sliderEl?.isDragging) this.$emit("play", void 0, { bubbles: false });
|
|
62
|
-
};
|
|
63
|
-
this.#onPause = () => {
|
|
64
|
-
if (!this.#sliderEl?.isDragging) this.$emit("pause", void 0, { bubbles: false });
|
|
65
|
-
};
|
|
66
|
-
this.#pausedChanged = (pausing) => {
|
|
67
|
-
if (pausing === this.paused) {
|
|
68
|
-
this.#setPausedState();
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
if (!this.paused) this.#playerEl.pause();
|
|
72
|
-
else {
|
|
73
|
-
this.#updateProgress();
|
|
74
|
-
this.#playerEl.play();
|
|
75
|
-
}
|
|
76
|
-
this.#setPausedState();
|
|
77
|
-
};
|
|
78
|
-
this.#updateProgress = () => {
|
|
79
|
-
_microsoft_fast_element.Observable.notify(this, "currentTime");
|
|
80
|
-
const duration = this.duration;
|
|
81
|
-
const currentTime = this.currentTime;
|
|
82
|
-
const isValid = Number.isFinite(duration) && duration > 0 && Number.isFinite(currentTime) && currentTime >= 0;
|
|
83
|
-
const percent = isValid ? currentTime / duration * 100 : 0;
|
|
84
|
-
/* v8 ignore else -- @preserve */
|
|
85
|
-
if (this.#sliderEl) {
|
|
86
|
-
this.#isProgrammaticSliderUpdate = true;
|
|
87
|
-
this.#sliderEl.value = percent.toString();
|
|
88
|
-
this.#isProgrammaticSliderUpdate = false;
|
|
89
|
-
}
|
|
90
|
-
if (isValid && percent === 100) this.pause();
|
|
91
|
-
};
|
|
92
|
-
this.#updateTotalTime = () => {
|
|
93
|
-
_microsoft_fast_element.Observable.notify(this, "duration");
|
|
94
|
-
if (!Number.isFinite(this.#playerEl.duration) || this.#playerEl.duration <= 0) {
|
|
95
|
-
if (this.durationFallback) this.#fetchAndCacheAudioBuffer();
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
this.#updateCurrentTimeOnSliderChange = () => {
|
|
99
|
-
if (!this.paused && this.#sliderEl.isDragging) {
|
|
100
|
-
this.pause();
|
|
101
|
-
this.#dragInterval = window.setInterval(() => {
|
|
102
|
-
/* v8 ignore else -- @preserve */
|
|
103
|
-
if (!this.#sliderEl.isDragging || !this.isConnected) {
|
|
104
|
-
clearInterval(this.#dragInterval);
|
|
105
|
-
if (this.isConnected) this.play();
|
|
106
|
-
}
|
|
107
|
-
}, 0);
|
|
108
|
-
}
|
|
109
|
-
if (this.#isProgrammaticSliderUpdate) return;
|
|
110
|
-
this.currentTime = this.duration * Number(this.#sliderEl.value) / 100;
|
|
111
|
-
};
|
|
112
|
-
this.#setPausedState = () => {
|
|
113
|
-
_microsoft_fast_element.Observable.notify(this, "paused");
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* @internal
|
|
118
|
-
*/
|
|
119
|
-
srcChanged() {
|
|
120
|
-
if (this.src === void 0) this.setSrc("");
|
|
121
|
-
else this.setSrc(this.src);
|
|
122
|
-
}
|
|
123
|
-
revokeSrc() {
|
|
124
|
-
const src = this.getCurrentSrc();
|
|
125
|
-
if (src && src.startsWith("blob:")) URL.revokeObjectURL(src);
|
|
126
|
-
}
|
|
127
|
-
getCurrentSrc() {
|
|
128
|
-
return this.#playerEl.currentSrc || this.#playerEl.src || "";
|
|
129
|
-
}
|
|
130
|
-
canPlayType(type) {
|
|
131
|
-
return this.#playerEl.canPlayType(type) !== "";
|
|
132
|
-
}
|
|
133
|
-
setSrc(url, blob) {
|
|
134
|
-
const prevSrc = this.getCurrentSrc();
|
|
135
|
-
this.revokeSrc();
|
|
136
|
-
this.#audioBuffer = void 0;
|
|
137
|
-
if (this.#fetchAbortController) {
|
|
138
|
-
this.#fetchAbortController.abort();
|
|
139
|
-
this.#fetchAbortController = void 0;
|
|
140
|
-
}
|
|
141
|
-
const newSrc = blob && (this.canPlayType(blob.type) || !url) ? URL.createObjectURL(blob) : url;
|
|
142
|
-
if (prevSrc) this.#playerEl.removeAttribute("src");
|
|
143
|
-
if (newSrc || url) try {
|
|
144
|
-
this.#playerEl.src = newSrc;
|
|
145
|
-
} catch (error) {
|
|
146
|
-
console.log("Falling back to original URL due to error:", error);
|
|
147
|
-
this.#playerEl.src = url;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
get playbackRate() {
|
|
151
|
-
_microsoft_fast_element.Observable.track(this, "playbackRate");
|
|
152
|
-
return this.#playerEl.playbackRate;
|
|
153
|
-
}
|
|
154
|
-
set playbackRate(value) {
|
|
155
|
-
this.#playerEl.playbackRate = value;
|
|
156
|
-
_microsoft_fast_element.Observable.notify(this, "playbackRate");
|
|
157
|
-
}
|
|
158
|
-
get paused() {
|
|
159
|
-
_microsoft_fast_element.Observable.track(this, "paused");
|
|
160
|
-
return this.#playerEl.paused;
|
|
161
|
-
}
|
|
162
|
-
set paused(_) {}
|
|
163
|
-
#audioBuffer;
|
|
164
|
-
#fetchAbortController;
|
|
165
|
-
async #fetchAndCacheAudioBuffer() {
|
|
166
|
-
if (this.#audioBuffer || !this.src) return;
|
|
167
|
-
this.#fetchAbortController = new AbortController();
|
|
168
|
-
const signal = this.#fetchAbortController.signal;
|
|
169
|
-
try {
|
|
170
|
-
const blob = await (await fetch(this.src, { signal })).blob();
|
|
171
|
-
this.setSrc(this.src, blob);
|
|
172
|
-
const arrayBuffer = await blob.arrayBuffer();
|
|
173
|
-
const audioContext = new window.AudioContext();
|
|
174
|
-
const audioBuffer = await audioContext.decodeAudioData(arrayBuffer);
|
|
175
|
-
audioContext.close();
|
|
176
|
-
this.#audioBuffer = audioBuffer;
|
|
177
|
-
_microsoft_fast_element.Observable.notify(this, "duration");
|
|
178
|
-
} catch (e) {
|
|
179
|
-
/* v8 ignore else -- @preserve */
|
|
180
|
-
if (e instanceof Error && e.name !== "AbortError") console.error("Error loading audio:", e);
|
|
181
|
-
} finally {
|
|
182
|
-
this.#fetchAbortController = void 0;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
get duration() {
|
|
186
|
-
_microsoft_fast_element.Observable.track(this, "duration");
|
|
187
|
-
const duration = this.#playerEl.duration;
|
|
188
|
-
if (Number.isFinite(duration) && duration > 0) return duration;
|
|
189
|
-
if (this.#audioBuffer && this.#audioBuffer.duration > 0) return this.#audioBuffer.duration;
|
|
190
|
-
return duration;
|
|
191
|
-
}
|
|
192
|
-
set duration(_) {}
|
|
193
|
-
get currentTime() {
|
|
194
|
-
_microsoft_fast_element.Observable.track(this, "currentTime");
|
|
195
|
-
return this.#playerEl.currentTime;
|
|
196
|
-
}
|
|
197
|
-
set currentTime(value) {
|
|
198
|
-
this.#playerEl.currentTime = value;
|
|
199
|
-
}
|
|
200
|
-
get #sliderEl() {
|
|
201
|
-
return this.shadowRoot.querySelector(".slider");
|
|
202
|
-
}
|
|
203
|
-
#playerEl;
|
|
204
|
-
#isProgrammaticSliderUpdate;
|
|
205
|
-
connectedCallback() {
|
|
206
|
-
super.connectedCallback();
|
|
207
|
-
this.#playerEl.addEventListener("timeupdate", this.#updateProgress);
|
|
208
|
-
this.#playerEl.addEventListener("loadedmetadata", this.#updateTotalTime);
|
|
209
|
-
this.#playerEl.addEventListener("durationchange", this.#updateTotalTime);
|
|
210
|
-
this.#playerEl.addEventListener("play", this.#onPlay);
|
|
211
|
-
this.#playerEl.addEventListener("pause", this.#onPause);
|
|
212
|
-
this.#setSliderInteractionListeners();
|
|
213
|
-
this.#setPausedState();
|
|
214
|
-
this.#updateProgress();
|
|
215
|
-
}
|
|
216
|
-
disconnectedCallback() {
|
|
217
|
-
super.disconnectedCallback();
|
|
218
|
-
this.#setSliderInteractionListeners(false);
|
|
219
|
-
this.pause();
|
|
220
|
-
this.#playerEl.removeEventListener("timeupdate", this.#updateProgress);
|
|
221
|
-
this.#playerEl.removeEventListener("loadedmetadata", this.#updateTotalTime);
|
|
222
|
-
this.#playerEl.removeEventListener("durationchange", this.#updateTotalTime);
|
|
223
|
-
this.#playerEl.removeEventListener("play", this.#onPlay);
|
|
224
|
-
this.#playerEl.removeEventListener("pause", this.#onPause);
|
|
225
|
-
}
|
|
226
|
-
play() {
|
|
227
|
-
this.#pausedChanged(PLAY);
|
|
228
|
-
}
|
|
229
|
-
pause() {
|
|
230
|
-
this.#pausedChanged(PAUSE);
|
|
231
|
-
}
|
|
232
|
-
#onPlay;
|
|
233
|
-
#onPause;
|
|
234
|
-
#setSliderInteractionListeners(add = true) {
|
|
235
|
-
const action = add ? "addEventListener" : "removeEventListener";
|
|
236
|
-
/* v8 ignore else -- @preserve */
|
|
237
|
-
if (this.#sliderEl) this.#sliderEl[action]("change", this.#updateCurrentTimeOnSliderChange);
|
|
238
|
-
}
|
|
239
|
-
#pausedChanged;
|
|
240
|
-
#updateProgress;
|
|
241
|
-
#updateTotalTime;
|
|
242
|
-
#dragInterval;
|
|
243
|
-
#updateCurrentTimeOnSliderChange;
|
|
244
|
-
#setPausedState;
|
|
245
|
-
/**
|
|
246
|
-
* Skips the current time by the skipBy value
|
|
247
|
-
*
|
|
248
|
-
* @param skipDirection - the direction to skip
|
|
249
|
-
*
|
|
250
|
-
* @internal
|
|
251
|
-
*/
|
|
252
|
-
skip(skipDirection) {
|
|
253
|
-
const newTime = this.currentTime + parseInt(this.skipBy) * skipDirection;
|
|
254
|
-
this.currentTime = Math.max(0, Math.min(this.duration, newTime));
|
|
22
|
+
this.clickable = false;
|
|
255
23
|
}
|
|
256
24
|
};
|
|
257
|
-
require_decorate.__decorate([
|
|
258
|
-
require_decorate.__decorate([
|
|
259
|
-
require_decorate.__decorate([
|
|
260
|
-
require_decorate.__decorate([
|
|
261
|
-
require_decorate.__decorate([
|
|
262
|
-
require_decorate.__decorate([_microsoft_fast_element.attr],
|
|
263
|
-
require_decorate.__decorate([_microsoft_fast_element.attr], AudioPlayer.prototype, "src", void 0);
|
|
264
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], AudioPlayer.prototype, "disabled", void 0);
|
|
265
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], AudioPlayer.prototype, "notime", void 0);
|
|
266
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
|
|
267
|
-
attribute: "skip-by",
|
|
268
|
-
converter: validSkipByConverter
|
|
269
|
-
})], AudioPlayer.prototype, "skipBy", void 0);
|
|
270
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "playback-rates" })], AudioPlayer.prototype, "playbackRates", void 0);
|
|
25
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Avatar.prototype, "connotation", void 0);
|
|
26
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Avatar.prototype, "shape", void 0);
|
|
27
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Avatar.prototype, "appearance", void 0);
|
|
28
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Avatar.prototype, "size", void 0);
|
|
29
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Avatar.prototype, "icon", void 0);
|
|
30
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Avatar.prototype, "initials", void 0);
|
|
271
31
|
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
|
|
272
32
|
mode: "boolean",
|
|
273
|
-
attribute: "
|
|
274
|
-
})],
|
|
33
|
+
attribute: "clickable"
|
|
34
|
+
})], Avatar.prototype, "clickable", void 0);
|
|
275
35
|
//#endregion
|
|
276
|
-
//#region src/lib/
|
|
277
|
-
var getClasses = (
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
return _microsoft_fast_element.html`<${buttonTag} class="pause" @click="${(x) => x.paused ? x.play() : x.pause()}"
|
|
284
|
-
icon="${(x) => x.paused ? "play-solid" : "pause-solid"}"
|
|
285
|
-
aria-label="${(x) => x.paused ? x.playButtonAriaLabel || x.locale.audioPlayer.playButtonLabel : x.pauseButtonAriaLabel || x.locale.audioPlayer.pauseButtonLabel}"
|
|
286
|
-
size='condensed'
|
|
287
|
-
connotation="${(x) => x.connotation}"
|
|
288
|
-
?disabled="${(x) => x.disabled || !x.duration}"
|
|
289
|
-
></${buttonTag}>`;
|
|
290
|
-
}
|
|
291
|
-
function renderBackwardSkipButtons(context) {
|
|
292
|
-
const buttonTag = context.tagFor(require_definition.Button);
|
|
36
|
+
//#region src/lib/avatar/avatar.template.ts
|
|
37
|
+
var getClasses = (x) => (0, _microsoft_fast_web_utilities.classNames)("base", [`connotation-${x.connotation}`, Boolean(x.connotation)], [`appearance-${x.appearance}`, Boolean(x.appearance)], [`shape-${x.shape}`, Boolean(x.shape)], [`size-${x.size}`, Boolean(x.size)]);
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated To be fully replaced with icon slot
|
|
40
|
+
* Avatar icon
|
|
41
|
+
*/
|
|
42
|
+
function renderIcon(iconTag) {
|
|
293
43
|
return _microsoft_fast_element.html`
|
|
294
|
-
<${
|
|
295
|
-
@click="${(element) => element.skip(SKIP_DIRECTIONS.BACKWARD)}"
|
|
296
|
-
icon="${(x) => x.skipBy == require_enums.MediaSkipBy.Five ? "5-sec-backward-line" : x.skipBy == require_enums.MediaSkipBy.Thirty ? "30-sec-backward-line" : "10-sec-backward-line"}"
|
|
297
|
-
size='condensed'
|
|
298
|
-
aria-label="${(x) => x.skipBackwardButtonAriaLabel || x.locale.audioPlayer.skipBackwardButton}"
|
|
299
|
-
connotation="${(x) => x.connotation}"
|
|
300
|
-
?disabled="${(x) => x.disabled || !x.duration}"
|
|
301
|
-
></${buttonTag}>
|
|
44
|
+
<${iconTag} name="${(x) => x.icon ? x.icon : "user-line"}"></${iconTag}>
|
|
302
45
|
`;
|
|
303
46
|
}
|
|
304
|
-
|
|
305
|
-
|
|
47
|
+
/** Avatar initials */
|
|
48
|
+
function renderInitials() {
|
|
306
49
|
return _microsoft_fast_element.html`
|
|
307
|
-
|
|
308
|
-
@click="${(element) => element.skip(SKIP_DIRECTIONS.FORWARD)}"
|
|
309
|
-
icon="${(x) => x.skipBy == require_enums.MediaSkipBy.Five ? "5-sec-forward-line" : x.skipBy == require_enums.MediaSkipBy.Thirty ? "30-sec-forward-line" : "10-sec-forward-line"}"
|
|
310
|
-
size='condensed'
|
|
311
|
-
aria-label="${(x) => x.skipForwardButtonAriaLabel || x.locale.audioPlayer.skipForwardButton}"
|
|
312
|
-
connotation="${(x) => x.connotation}"
|
|
313
|
-
?disabled="${(x) => x.disabled || !x.duration}"
|
|
314
|
-
></${buttonTag}>
|
|
50
|
+
<span class="initials">${({ initials }) => initials.substring(0, 2)}</span>
|
|
315
51
|
`;
|
|
316
52
|
}
|
|
317
|
-
function
|
|
318
|
-
|
|
319
|
-
return _microsoft_fast_element.html
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
internal-part>
|
|
328
|
-
</${sliderTag}>`;
|
|
329
|
-
}
|
|
330
|
-
function renderTimestamp() {
|
|
331
|
-
return _microsoft_fast_element.html` <div class="time-stamp">
|
|
332
|
-
<span class="current-time">${(x) => formatTime(x.currentTime || 0)}</span>
|
|
333
|
-
${(0, _microsoft_fast_element.when)((x) => x.duration && x.duration !== Infinity, _microsoft_fast_element.html`
|
|
334
|
-
<span>/</span>
|
|
335
|
-
<span class="total-time">${(x) => formatTime(x.duration)}</span>
|
|
336
|
-
`)}
|
|
337
|
-
</div>`;
|
|
338
|
-
}
|
|
339
|
-
function handlePlaybackRateClick(playbackRate, context) {
|
|
340
|
-
context.parent.playbackRate = playbackRate;
|
|
341
|
-
return true;
|
|
53
|
+
function renderAvatarBaseElement(x, content) {
|
|
54
|
+
if (x.href) return x._renderLinkElement(content, getClasses);
|
|
55
|
+
else if (x.clickable) return _microsoft_fast_element.html`<button
|
|
56
|
+
type="button"
|
|
57
|
+
class="${getClasses}"
|
|
58
|
+
${require_delegates_aria.delegateAria()}
|
|
59
|
+
>
|
|
60
|
+
${content}
|
|
61
|
+
</button>`;
|
|
62
|
+
else return _microsoft_fast_element.html`<span class="${getClasses}">${content}</span>`;
|
|
342
63
|
}
|
|
343
|
-
var
|
|
344
|
-
const
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
${(0, _microsoft_fast_element.when)((x) => !x.notime, renderTimestamp())}
|
|
354
|
-
</div>
|
|
355
|
-
${renderSlider(context)}
|
|
356
|
-
${(0, _microsoft_fast_element.when)((x) => Boolean(x.playbackRates), _microsoft_fast_element.html`
|
|
357
|
-
<${menuTag} class="playback-rates" placement="top-start" auto-dismiss id="playback-menu" position-strategy="absolute">
|
|
358
|
-
<${buttonTag} id="playback-open-button"
|
|
359
|
-
class="playback-button"
|
|
360
|
-
slot="anchor"
|
|
361
|
-
icon="playback-speed-line"
|
|
362
|
-
aria-label="play back rates"
|
|
363
|
-
size='condensed'
|
|
364
|
-
connotation="${(x) => x.connotation}"
|
|
365
|
-
?disabled="${(x) => x.disabled || !x.duration}"
|
|
366
|
-
></${buttonTag}>
|
|
367
|
-
|
|
368
|
-
${(0, _microsoft_fast_element.repeat)((x) => require_playbackRates.getPlaybackRatesArray(x.playbackRates), _microsoft_fast_element.html`<${menuItemTag} @click="${handlePlaybackRateClick}"
|
|
369
|
-
control-type="radio"
|
|
370
|
-
class="playback-rate"
|
|
371
|
-
text="${(x) => x}"
|
|
372
|
-
check-appearance="tick-only"
|
|
373
|
-
?checked="${isMenuItemChekced}"></${menuItemTag}>`)}
|
|
374
|
-
</${menuTag}>`)}
|
|
375
|
-
</div>
|
|
376
|
-
</div>`;
|
|
64
|
+
var AvatarTemplate = (context) => {
|
|
65
|
+
const iconTag = context.tagFor(require_definition.Icon);
|
|
66
|
+
return _microsoft_fast_element.html`
|
|
67
|
+
${(x) => renderAvatarBaseElement(x, _microsoft_fast_element.html`<slot name="graphic">
|
|
68
|
+
${(0, _microsoft_fast_element.when)((x) => x.initials, renderInitials())}
|
|
69
|
+
${(0, _microsoft_fast_element.when)((x) => !x.initials, _microsoft_fast_element.html`<span class="icon"
|
|
70
|
+
><slot name="icon">${renderIcon(iconTag)}</slot></span
|
|
71
|
+
>`)}</slot
|
|
72
|
+
>`)}
|
|
73
|
+
`;
|
|
377
74
|
};
|
|
378
75
|
//#endregion
|
|
379
|
-
//#region src/lib/
|
|
380
|
-
/**
|
|
381
|
-
|
|
382
|
-
*/
|
|
383
|
-
var audioPlayerDefinition = require_vivid_element.defineVividComponent("audio-player", AudioPlayer, AudioPlayerTemplate, [
|
|
384
|
-
require_definition.buttonDefinition,
|
|
385
|
-
require_definition$1.sliderDefinition,
|
|
386
|
-
require_definition$3.menuDefinition,
|
|
387
|
-
require_definition$2.menuItemDefinition
|
|
388
|
-
], { styles: audio_player_default });
|
|
76
|
+
//#region src/lib/avatar/definition.ts
|
|
77
|
+
/** @internal */
|
|
78
|
+
var avatarDefinition = require_vivid_element.defineVividComponent("avatar", Avatar, AvatarTemplate, [require_definition.iconDefinition], { styles: avatar_default });
|
|
389
79
|
/**
|
|
390
|
-
* Registers the
|
|
80
|
+
* Registers the avatar elements with the design system.
|
|
391
81
|
*
|
|
392
82
|
* @param prefix - the prefix to use for the component name
|
|
393
83
|
*/
|
|
394
|
-
var
|
|
84
|
+
var registerAvatar = require_vivid_element.createRegisterFunction(avatarDefinition);
|
|
395
85
|
//#endregion
|
|
396
|
-
Object.defineProperty(exports, "
|
|
86
|
+
Object.defineProperty(exports, "Avatar", {
|
|
397
87
|
enumerable: true,
|
|
398
88
|
get: function() {
|
|
399
|
-
return
|
|
89
|
+
return Avatar;
|
|
400
90
|
}
|
|
401
91
|
});
|
|
402
|
-
Object.defineProperty(exports, "
|
|
92
|
+
Object.defineProperty(exports, "avatarDefinition", {
|
|
403
93
|
enumerable: true,
|
|
404
94
|
get: function() {
|
|
405
|
-
return
|
|
95
|
+
return avatarDefinition;
|
|
406
96
|
}
|
|
407
97
|
});
|
|
408
|
-
Object.defineProperty(exports, "
|
|
98
|
+
Object.defineProperty(exports, "registerAvatar", {
|
|
409
99
|
enumerable: true,
|
|
410
100
|
get: function() {
|
|
411
|
-
return
|
|
101
|
+
return registerAvatar;
|
|
412
102
|
}
|
|
413
103
|
});
|