@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,304 +1,176 @@
|
|
|
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");
|
|
5
|
+
const require_delegates_aria = require("./delegates-aria.cjs");
|
|
6
|
+
const require_linkable = require("./linkable.cjs");
|
|
4
7
|
const require_enums = require("./enums.cjs");
|
|
5
|
-
const
|
|
8
|
+
const require_definition$1 = require("./definition7.cjs");
|
|
6
9
|
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
7
10
|
let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
|
|
8
|
-
//#region src/lib/
|
|
9
|
-
var
|
|
11
|
+
//#region src/lib/card/card.scss?inline
|
|
12
|
+
var card_default = ":host{--_vvd-tinted-shadow-surface-0dp:drop-shadow(1px 0px 0px var(--card-border-color)) drop-shadow(0px 1px 0px var(--card-border-color)) drop-shadow(0px -1px 0px var(--card-border-color)) drop-shadow(-1px 0px 0px var(--card-border-color));display:flex}.base{text-align:start;border:0;border-radius:8px;outline:none;inline-size:100%;padding:0;text-decoration:none}.base:is(button,a):not(:disabled){cursor:pointer}.base:is(button,a):disabled{cursor:not-allowed}.base:is(button,a):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))}.wrapper{border-radius:inherit;block-size:100%;color:var(--vvd-color-canvas-text);--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:transparent;--_appearance-color-outline:transparent;flex-flow:column;display:flex;overflow:hidden}@media (hover:hover){.wrapper:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}}.wrapper.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-faint);--_appearance-color-outline:transparent}.wrapper:active:where(:not(.disabled,:disabled)),.wrapper.active:where(:not(.disabled,:disabled)){--_appearance-color-text:var(--_connotation-color-firm);--_appearance-color-fill:var(--_connotation-color-soft);--_appearance-color-outline:transparent}.wrapper{--_connotation-color-primary:var(--vvd-card-cta-primary,var(--vvd-color-cta-500));--_connotation-color-primary-text:var(--vvd-card-cta-primary-text,var(--vvd-color-canvas));--_connotation-color-primary-increment:var(--vvd-card-cta-primary-increment,var(--vvd-color-cta-600));--_connotation-color-faint:var(--vvd-card-cta-faint,var(--vvd-color-cta-50));--_connotation-color-soft:var(--vvd-card-cta-soft,var(--vvd-color-cta-100))}@media (hover:hover){.base:is(button,a):hover>.wrapper{background-color:var(--_appearance-color-fill)}}.main-content{flex-flow:column;padding:24px;display:flex}.body-wrapper{padding-top:16px}.hide-header .body-wrapper{padding-top:0}.hide-body .body-wrapper{display:none}.header{flex:1;align-items:flex-start;gap:8px;display:flex}.header-content{flex:1}.header-wrapper{gap:8px;display:flex}.header-headline,.header-subtitle{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.header-headline{font:var(--vvd-typography-heading-4);-webkit-line-clamp:var(--headline-line-clamp)}.header-subtitle{font:var(--vvd-typography-base);-webkit-line-clamp:var(--subtitle-line-clamp)}.hide-header .header{display:none}.header-subtitle,.text{color:var(--vvd-color-neutral-600);font:var(--vvd-typography-base)}.text{margin-top:12px;padding-right:8px}.footer{padding-bottom:24px;flex-direction:column;align-items:flex-end;margin-top:auto;padding-inline:24px;display:inline-flex}.hide-footer .footer{display:none}::slotted([slot=graphic i]),.icon{flex-shrink:0;align-self:baseline;margin-block-start:4px}.icon{font-size:20px}::slotted([slot=meta i]){flex-shrink:0;align-self:flex-start;margin-block-start:-8px;margin-inline:auto -8px}";
|
|
10
13
|
//#endregion
|
|
11
|
-
//#region src/lib/
|
|
12
|
-
var ARROW_UP = "ArrowUp";
|
|
13
|
-
var ARROW_RIGHT = "ArrowRight";
|
|
14
|
-
var ARROW_DOWN = "ArrowDown";
|
|
15
|
-
var ARROW_LEFT = "ArrowLeft";
|
|
16
|
-
function isCellOrHeader(el) {
|
|
17
|
-
return el instanceof HTMLElement && (el.matches("[role=\"gridcell\"i]") || el.matches("[role=\"columnheader\"i]"));
|
|
18
|
-
}
|
|
19
|
-
var getCellOrHeader = (f) => f.matches("[role=\"columnheader\"i]") ? "[role=\"gridcell\"i]" : "[role=\"columnheader\"i]";
|
|
20
|
-
function getNextFocusableGridElement(key, activeElement) {
|
|
21
|
-
/* v8 ignore else -- @preserve */
|
|
22
|
-
if (activeElement.parentNode instanceof HTMLElement) switch (key) {
|
|
23
|
-
case ARROW_RIGHT: return activeElement.nextElementSibling || activeElement.parentNode.firstElementChild;
|
|
24
|
-
case ARROW_LEFT: return activeElement.previousElementSibling || activeElement.parentNode.lastElementChild;
|
|
25
|
-
case ARROW_UP:
|
|
26
|
-
case ARROW_DOWN: {
|
|
27
|
-
const { children } = activeElement.parentNode;
|
|
28
|
-
const i = Array.from(children).indexOf(activeElement);
|
|
29
|
-
return this.shadowRoot.querySelector(`${getCellOrHeader(activeElement)}:nth-child(${i + 1})`);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
function getHeaderDescendantGridCell(key, activeElement) {
|
|
34
|
-
if (key !== "ArrowDown") return;
|
|
35
|
-
const header = activeElement.closest("[role=\"columnheader\"i]");
|
|
36
|
-
const columnHeaders = this.shadowRoot.querySelectorAll("[role=\"columnheader\"i]");
|
|
37
|
-
const i = Array.from(columnHeaders).indexOf(header);
|
|
38
|
-
return this.shadowRoot.querySelector(`[role="gridcell"i]:nth-child(${i + 1})`);
|
|
39
|
-
}
|
|
40
|
-
//#endregion
|
|
41
|
-
//#region src/lib/calendar/helpers/calendar.event-context.ts
|
|
42
|
-
function getDay(el) {
|
|
43
|
-
const cellOrHeader = el.closest("[role=\"gridcell\"i], [role=\"columnheader\"i]");
|
|
44
|
-
if (cellOrHeader) {
|
|
45
|
-
const { parentElement } = cellOrHeader;
|
|
46
|
-
/* v8 ignore else -- @preserve */
|
|
47
|
-
if (parentElement) return Array.from(parentElement.children).indexOf(cellOrHeader);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function getHour(e, el, hours) {
|
|
51
|
-
const rowHeaderOrCell = el.closest("[role=\"rowheader\"], [role=\"gridcell\"i]");
|
|
52
|
-
if (rowHeaderOrCell) {
|
|
53
|
-
const DOMRect = rowHeaderOrCell.getBoundingClientRect();
|
|
54
|
-
const hour = (e.clientY - DOMRect.y) / (DOMRect.height / hours);
|
|
55
|
-
return Math.round((hour + Number.EPSILON) * 100) / 100;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
var getEventContext = function(e) {
|
|
59
|
-
if (!(e instanceof KeyboardEvent || e instanceof MouseEvent)) throw new Error("Invalid event. Event must be instance of KeyboardEvent or MouseEvent");
|
|
60
|
-
const [el] = e.composedPath();
|
|
61
|
-
if (!(el instanceof HTMLElement && this.shadowRoot.contains(el))) throw new Error("Invalid event. Event must contain a target object which is a direct descendant of calendar");
|
|
62
|
-
const day = getDay(el);
|
|
63
|
-
let hour;
|
|
64
|
-
if (e instanceof MouseEvent) hour = getHour(e, el, this._hours);
|
|
65
|
-
const context = {
|
|
66
|
-
...day != void 0 && { day },
|
|
67
|
-
...hour != void 0 && { hour }
|
|
68
|
-
};
|
|
69
|
-
return Object.keys(context).length > 0 ? context : null;
|
|
70
|
-
};
|
|
71
|
-
//#endregion
|
|
72
|
-
//#region src/lib/calendar/calendar.ts
|
|
73
|
-
var isScrollable = (node) => {
|
|
74
|
-
const overflowY = window.getComputedStyle(node).overflowY;
|
|
75
|
-
const overflowX = window.getComputedStyle(node).overflowX;
|
|
76
|
-
return {
|
|
77
|
-
vertical: (overflowY === "auto" || overflowY === "scroll") && node.scrollHeight > node.clientHeight,
|
|
78
|
-
horizontal: (overflowX === "auto" || overflowX === "scroll") && node.scrollWidth > node.clientWidth
|
|
79
|
-
};
|
|
80
|
-
};
|
|
14
|
+
//#region src/lib/card/card.ts
|
|
81
15
|
/**
|
|
82
16
|
* @public
|
|
83
|
-
* @component
|
|
84
|
-
* @slot -
|
|
85
|
-
* @slot
|
|
86
|
-
* @slot
|
|
87
|
-
* @slot
|
|
88
|
-
* @slot
|
|
89
|
-
* @slot
|
|
90
|
-
* @
|
|
91
|
-
* @slot day-6 - Assign elements to corresponding day column using this slot.
|
|
17
|
+
* @component card
|
|
18
|
+
* @slot body - The body slot is for the main content of the card. Displayed between the header and footer content.
|
|
19
|
+
* @slot graphic - The graphic slot overrides the icon property.
|
|
20
|
+
* @slot media - The media slot is mainly for images or video content above the card header.
|
|
21
|
+
* @slot meta - The meta slot is for action content in the card header.
|
|
22
|
+
* @slot footer - The footer slot is for content in the card footer.
|
|
23
|
+
* @slot main - Assign nodes to main slot to fully override a card's predefined flow and style with your own.
|
|
24
|
+
* @testQuery headline headline
|
|
92
25
|
*/
|
|
93
|
-
var
|
|
26
|
+
var Card = class extends require_linkable.Linkable(require_vivid_element.VividElement) {
|
|
94
27
|
constructor(..._args) {
|
|
95
28
|
super(..._args);
|
|
96
|
-
this.
|
|
97
|
-
this.stickyMode = require_enums.Sticky.All;
|
|
98
|
-
this._hours = 24;
|
|
99
|
-
this._days = 7;
|
|
100
|
-
this.hoursAsDatetime = Array.from({ length: this._hours - 1 }).fill(new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0))).map((d, i) => new Date(d.setHours(i + 1)));
|
|
101
|
-
this._generateDaysArr = (dateArr) => {
|
|
102
|
-
if (dateArr.length == this._days) return dateArr;
|
|
103
|
-
const lastDate = new Date(dateArr[dateArr.length - 1]);
|
|
104
|
-
lastDate.setDate(lastDate.getDate() + 1);
|
|
105
|
-
return this._generateDaysArr([...dateArr, lastDate]);
|
|
106
|
-
};
|
|
107
|
-
this.getEventContext = getEventContext;
|
|
108
|
-
}
|
|
109
|
-
get #activeCalendarEvent() {
|
|
110
|
-
const { activeElement } = document;
|
|
111
|
-
return activeElement instanceof require_calendar_event.CalendarEvent ? activeElement : null;
|
|
112
|
-
}
|
|
113
|
-
getCalendarEventContainingCell(calendarEvent) {
|
|
114
|
-
const slotName = calendarEvent.getAttribute("slot");
|
|
115
|
-
return this.shadowRoot.querySelector(`slot[name="${slotName}"i]`).parentElement;
|
|
116
|
-
}
|
|
117
|
-
arrowKeysInteractions(key) {
|
|
118
|
-
const { activeElement } = this.shadowRoot;
|
|
119
|
-
let focusNext;
|
|
120
|
-
if (isCellOrHeader(activeElement)) focusNext = getNextFocusableGridElement.call(this, key, activeElement);
|
|
121
|
-
else if (this.#activeCalendarEvent) focusNext = this.getCalendarEventContainingCell(this.#activeCalendarEvent);
|
|
122
|
-
else if (activeElement?.matches("em[role=\"button\"i]")) focusNext = getHeaderDescendantGridCell.call(this, key, activeElement);
|
|
123
|
-
else focusNext = this.shadowRoot.querySelector("[role=\"columnheader\"i]");
|
|
124
|
-
this.activateElement(focusNext);
|
|
125
|
-
}
|
|
126
|
-
activateElement(el) {
|
|
127
|
-
const onBlur = ({ target }) => target.setAttribute("tabindex", "-1");
|
|
128
|
-
el?.addEventListener("blur", onBlur, { once: true });
|
|
129
|
-
el?.setAttribute("tabindex", "0");
|
|
130
|
-
el?.focus();
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* @internal
|
|
134
|
-
*/
|
|
135
|
-
onKeydown({ key }) {
|
|
136
|
-
const isArrow = [
|
|
137
|
-
ARROW_UP,
|
|
138
|
-
ARROW_RIGHT,
|
|
139
|
-
ARROW_DOWN,
|
|
140
|
-
ARROW_LEFT
|
|
141
|
-
].some((predefinedKey) => predefinedKey == key);
|
|
142
|
-
if (isArrow) this.arrowKeysInteractions(key);
|
|
143
|
-
return !isArrow;
|
|
144
|
-
}
|
|
145
|
-
connectedCallback() {
|
|
146
|
-
super.connectedCallback();
|
|
147
|
-
this.initializeScrollPosition();
|
|
148
|
-
}
|
|
149
|
-
initializeScrollPosition() {
|
|
150
|
-
if (!isScrollable(this).vertical) return;
|
|
151
|
-
const scrollPosition = this.scrollHeight / this._hours * 7;
|
|
152
|
-
_microsoft_fast_element.Updates.enqueue(() => {
|
|
153
|
-
this.scrollTo({ top: scrollPosition });
|
|
154
|
-
});
|
|
29
|
+
this.clickableCard = false;
|
|
155
30
|
}
|
|
156
31
|
};
|
|
157
|
-
require_decorate.__decorate([_microsoft_fast_element.attr],
|
|
158
|
-
require_decorate.__decorate([
|
|
159
|
-
require_decorate.__decorate([_microsoft_fast_element.attr],
|
|
160
|
-
require_decorate.__decorate([
|
|
32
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Card.prototype, "appearance", void 0);
|
|
33
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Card.prototype, "headline", void 0);
|
|
34
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Card.prototype, "subtitle", void 0);
|
|
35
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Card.prototype, "text", void 0);
|
|
36
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Card.prototype, "icon", void 0);
|
|
37
|
+
require_decorate.__decorate([_microsoft_fast_element.attr], Card.prototype, "elevation", void 0);
|
|
161
38
|
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
})],
|
|
39
|
+
mode: "boolean",
|
|
40
|
+
attribute: "clickable-card"
|
|
41
|
+
})], Card.prototype, "clickableCard", void 0);
|
|
42
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], Card.prototype, "bodySlottedContent", void 0);
|
|
43
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], Card.prototype, "footerSlottedContent", void 0);
|
|
44
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], Card.prototype, "graphicSlottedContent", void 0);
|
|
45
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], Card.prototype, "hasMetaSlottedContent", void 0);
|
|
165
46
|
//#endregion
|
|
166
|
-
//#region src/lib/
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
* This method returns valid date string to be used as html time tag datetime value
|
|
172
|
-
* @param date - js date object
|
|
173
|
-
* @returns a date as a string value in ISO format.
|
|
174
|
-
*/
|
|
175
|
-
function getValidDateString(date) {
|
|
176
|
-
const twoDigit = (num) => `0${num}`.slice(-2);
|
|
177
|
-
return `${date.getFullYear()}-${twoDigit(date.getMonth() + 1)}-${twoDigit(date.getDate())}`;
|
|
47
|
+
//#region src/lib/card/card.template.ts
|
|
48
|
+
var getClasses = (_) => (0, _microsoft_fast_web_utilities.classNames)("base", ["hide-footer", !_.footerSlottedContent || !_.footerSlottedContent.length], ["hide-header", shouldHideHeader(_)], ["hide-body", !_.bodySlottedContent || !_.bodySlottedContent.length]);
|
|
49
|
+
function renderHeaderIcon(iconTag) {
|
|
50
|
+
return _microsoft_fast_element.html`
|
|
51
|
+
<${iconTag} class="icon" inline name="${(x) => x.icon}"></${iconTag}>`;
|
|
178
52
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
return
|
|
53
|
+
function Headline() {
|
|
54
|
+
return _microsoft_fast_element.html`
|
|
55
|
+
<div class="header-headline" id="card-headline">${(x) => x.headline}</div>
|
|
56
|
+
`;
|
|
57
|
+
}
|
|
58
|
+
function Subtitle() {
|
|
59
|
+
return _microsoft_fast_element.html` <div class="header-subtitle">${(x) => x.subtitle}</div> `;
|
|
60
|
+
}
|
|
61
|
+
function headerContent() {
|
|
62
|
+
return _microsoft_fast_element.html`
|
|
63
|
+
<div class="header-content">
|
|
64
|
+
${(0, _microsoft_fast_element.when)((x) => x.headline, Headline())}
|
|
65
|
+
${(0, _microsoft_fast_element.when)((x) => x.subtitle, Subtitle())}
|
|
66
|
+
</div>
|
|
67
|
+
`;
|
|
186
68
|
}
|
|
187
|
-
//#endregion
|
|
188
|
-
//#region src/lib/calendar/calendar.template.ts
|
|
189
|
-
var getClasses = ({ stickyMode }) => (0, _microsoft_fast_web_utilities.classNames)([`sticky-${stickyMode}`, Boolean(stickyMode)]);
|
|
190
|
-
/**
|
|
191
|
-
* the html days markup
|
|
192
|
-
*
|
|
193
|
-
* @internal
|
|
194
|
-
*/
|
|
195
|
-
var HoursTemplate = () => {
|
|
196
|
-
return _microsoft_fast_element.html` <div class="row-headers" role="row">
|
|
197
|
-
${(0, _microsoft_fast_element.repeat)((x) => x.hoursAsDatetime, _microsoft_fast_element.html`<span role="rowheader">
|
|
198
|
-
<time
|
|
199
|
-
datetime="${(x, c) => new Intl.DateTimeFormat(c.parent.locales, {
|
|
200
|
-
hour: "numeric",
|
|
201
|
-
minute: "numeric",
|
|
202
|
-
hour12: false
|
|
203
|
-
}).format(x)}"
|
|
204
|
-
>
|
|
205
|
-
${(x, c) => new Intl.DateTimeFormat(c.parent.locales, {
|
|
206
|
-
hour: "numeric",
|
|
207
|
-
hour12: c.parent.hour12
|
|
208
|
-
}).format(x)}
|
|
209
|
-
</time>
|
|
210
|
-
</span>`)}
|
|
211
|
-
</div>`;
|
|
212
|
-
};
|
|
213
69
|
/**
|
|
214
|
-
|
|
215
|
-
*
|
|
216
|
-
* @internal
|
|
70
|
+
header
|
|
217
71
|
*/
|
|
218
|
-
|
|
219
|
-
return _microsoft_fast_element.html` <div class="
|
|
220
|
-
${(0, _microsoft_fast_element.
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
events and related day e.g. "3 events, Sunday, March 8" -->
|
|
225
|
-
<em
|
|
226
|
-
tabindex="0"
|
|
227
|
-
role="button"
|
|
228
|
-
aria-label=${(x, c) => new Intl.DateTimeFormat(c.parent.locales, {
|
|
229
|
-
weekday: "long",
|
|
230
|
-
month: "long",
|
|
231
|
-
day: "2-digit"
|
|
232
|
-
}).format(x)}
|
|
233
|
-
>
|
|
234
|
-
${(x, c) => new Intl.DateTimeFormat(c.parent.locales, { day: "2-digit" }).format(x)}
|
|
235
|
-
</em>
|
|
236
|
-
<small aria-hidden="true">
|
|
237
|
-
${(x, c) => new Intl.DateTimeFormat(c.parent.locales, { weekday: "short" }).format(x)}
|
|
238
|
-
</small>
|
|
239
|
-
</h2>
|
|
240
|
-
</time>
|
|
241
|
-
</div>`)}
|
|
72
|
+
function renderHeader(iconTag) {
|
|
73
|
+
return _microsoft_fast_element.html` <div class="header">
|
|
74
|
+
<slot name="graphic" ${(0, _microsoft_fast_element.slotted)("graphicSlottedContent")}
|
|
75
|
+
>${(0, _microsoft_fast_element.when)((x) => x.icon, renderHeaderIcon(iconTag))}</slot
|
|
76
|
+
>
|
|
77
|
+
${(0, _microsoft_fast_element.when)((x) => x.headline || x.subtitle, headerContent())}
|
|
242
78
|
</div>`;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
`;
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
79
|
+
}
|
|
80
|
+
function shouldHideHeader(card) {
|
|
81
|
+
return !card.headline && !card.subtitle && !card.icon && (!card.graphicSlottedContent || !card.graphicSlottedContent.length);
|
|
82
|
+
}
|
|
83
|
+
function renderMetaSlot() {
|
|
84
|
+
return _microsoft_fast_element.html` <slot name="meta" ${(0, _microsoft_fast_element.slotted)("metaSlottedContent")}></slot> `;
|
|
85
|
+
}
|
|
86
|
+
function text() {
|
|
87
|
+
return _microsoft_fast_element.html` <div class="text">${(x) => x.text}</div> `;
|
|
88
|
+
}
|
|
89
|
+
function renderButtonElement(content) {
|
|
90
|
+
return _microsoft_fast_element.html`<button
|
|
252
91
|
class="${getClasses}"
|
|
253
|
-
|
|
92
|
+
type="button"
|
|
93
|
+
${require_delegates_aria.delegateAria({ ariaLabelledBy: (x) => x.headline ? "card-headline" : null })}
|
|
254
94
|
>
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
95
|
+
${content}
|
|
96
|
+
</button>`;
|
|
97
|
+
}
|
|
98
|
+
function renderCardBaseElement(x, content) {
|
|
99
|
+
if (x.href) return x._renderLinkElement(content, getClasses);
|
|
100
|
+
else if (x.clickableCard) return renderButtonElement(content);
|
|
101
|
+
else return _microsoft_fast_element.html`<div
|
|
102
|
+
class="${getClasses}"
|
|
103
|
+
aria-labelledby="${(x) => x.headline ? "card-headline" : null}"
|
|
104
|
+
>
|
|
105
|
+
${content}
|
|
106
|
+
</div>`;
|
|
107
|
+
}
|
|
108
|
+
function renderCardContent(context) {
|
|
109
|
+
const iconTag = context.tagFor(require_definition.Icon);
|
|
110
|
+
return _microsoft_fast_element.html`
|
|
111
|
+
${(x) => renderCardBaseElement(x, _microsoft_fast_element.html`<div class="wrapper">
|
|
112
|
+
<div class="vwc-card-media">
|
|
113
|
+
<slot name="media"></slot>
|
|
114
|
+
</div>
|
|
115
|
+
<slot name="main">
|
|
116
|
+
<div class="main-content">
|
|
117
|
+
<div class="header-wrapper">
|
|
118
|
+
${renderHeader(iconTag)} ${renderMetaSlot()}
|
|
119
|
+
</div>
|
|
120
|
+
${(0, _microsoft_fast_element.when)((x) => x.text, text())}
|
|
121
|
+
<div class="body-wrapper">
|
|
122
|
+
<slot name="body" ${(0, _microsoft_fast_element.slotted)("bodySlottedContent")}></slot>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</slot>
|
|
126
|
+
<div class="footer">
|
|
127
|
+
<slot name="footer" ${(0, _microsoft_fast_element.slotted)("footerSlottedContent")}></slot>
|
|
128
|
+
</div>
|
|
129
|
+
</div> `)}
|
|
130
|
+
`;
|
|
131
|
+
}
|
|
132
|
+
var CardTemplate = (context) => {
|
|
133
|
+
const elevationTag = context.tagFor(require_definition$1.Elevation);
|
|
134
|
+
return _microsoft_fast_element.html`
|
|
135
|
+
${(0, _microsoft_fast_element.when)((x) => x.appearance !== require_enums.Appearance.Ghost && x.appearance !== require_enums.Appearance.Outlined, _microsoft_fast_element.html`
|
|
136
|
+
<${elevationTag} dp=${(x) => x.elevation ?? "4"}>
|
|
137
|
+
${renderCardContent(context)}
|
|
138
|
+
</${elevationTag}>
|
|
139
|
+
`)}
|
|
140
|
+
${(0, _microsoft_fast_element.when)((x) => x.appearance === require_enums.Appearance.Outlined, _microsoft_fast_element.html`
|
|
141
|
+
<${elevationTag} dp='0')}>
|
|
142
|
+
${renderCardContent(context)}
|
|
143
|
+
</${elevationTag}>
|
|
144
|
+
`)}
|
|
145
|
+
${(0, _microsoft_fast_element.when)((x) => x.appearance === require_enums.Appearance.Ghost, _microsoft_fast_element.html` ${renderCardContent(context)} `)}
|
|
146
|
+
`;
|
|
147
|
+
};
|
|
271
148
|
//#endregion
|
|
272
|
-
//#region src/lib/
|
|
273
|
-
/**
|
|
274
|
-
|
|
275
|
-
*/
|
|
276
|
-
var calendarDefinition = require_vivid_element.defineVividComponent("calendar", Calendar, CalendarTemplate, [], {
|
|
277
|
-
styles: calendar_default,
|
|
278
|
-
shadowOptions: { delegatesFocus: true }
|
|
279
|
-
});
|
|
149
|
+
//#region src/lib/card/definition.ts
|
|
150
|
+
/** @internal */
|
|
151
|
+
var cardDefinition = require_vivid_element.defineVividComponent("card", Card, CardTemplate, [require_definition.iconDefinition, require_definition$1.elevationDefinition], { styles: card_default });
|
|
280
152
|
/**
|
|
281
|
-
* Registers the
|
|
153
|
+
* Registers the card elements with the design system.
|
|
282
154
|
*
|
|
283
155
|
* @param prefix - the prefix to use for the component name
|
|
284
156
|
*/
|
|
285
|
-
var
|
|
157
|
+
var registerCard = require_vivid_element.createRegisterFunction(cardDefinition);
|
|
286
158
|
//#endregion
|
|
287
|
-
Object.defineProperty(exports, "
|
|
159
|
+
Object.defineProperty(exports, "Card", {
|
|
288
160
|
enumerable: true,
|
|
289
161
|
get: function() {
|
|
290
|
-
return
|
|
162
|
+
return Card;
|
|
291
163
|
}
|
|
292
164
|
});
|
|
293
|
-
Object.defineProperty(exports, "
|
|
165
|
+
Object.defineProperty(exports, "cardDefinition", {
|
|
294
166
|
enumerable: true,
|
|
295
167
|
get: function() {
|
|
296
|
-
return
|
|
168
|
+
return cardDefinition;
|
|
297
169
|
}
|
|
298
170
|
});
|
|
299
|
-
Object.defineProperty(exports, "
|
|
171
|
+
Object.defineProperty(exports, "registerCard", {
|
|
300
172
|
enumerable: true,
|
|
301
173
|
get: function() {
|
|
302
|
-
return
|
|
174
|
+
return registerCard;
|
|
303
175
|
}
|
|
304
176
|
});
|