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