@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,153 +1,45 @@
|
|
|
1
1
|
require("./chunk.cjs");
|
|
2
2
|
const require_vivid_element = require("./vivid-element.cjs");
|
|
3
3
|
const require_definition = require("./definition.cjs");
|
|
4
|
-
const
|
|
5
|
-
const require_affix = require("./affix.cjs");
|
|
6
|
-
const require_delegates_aria = require("./delegates-aria.cjs");
|
|
7
|
-
const require_localized = require("./localized.cjs");
|
|
8
|
-
const require_definition$1 = require("./definition7.cjs");
|
|
9
|
-
const require_enums = require("./enums.cjs");
|
|
4
|
+
const require_breadcrumb_item = require("./breadcrumb-item.cjs");
|
|
10
5
|
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
11
6
|
let _microsoft_fast_web_utilities = require("@microsoft/fast-web-utilities");
|
|
12
|
-
//#region src/lib/
|
|
13
|
-
var
|
|
7
|
+
//#region src/lib/breadcrumb-item/breadcrumb-item.scss?inline
|
|
8
|
+
var breadcrumb_item_default = ".base{color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base);align-items:center;display:flex}.base .separator{color:var(--vvd-color-neutral-600);margin:0 16px;font-size:12px}.control{font:inherit}.control:focus-visible{outline:none;position:relative}.control:focus-visible:after{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));border-radius:var(--focus-border-radius,inherit);block-size:calc(100% + var(--focus-block-size-addition,4px));content:\"\";inline-size:calc(100% + var(--focus-block-size-addition,4px));--focus-stroke-gap-color:transparent;--focus-block-size-addition:8px;--focus-border-radius:4px;display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}.control:any-link{color:var(--vvd-color-cta-600);text-decoration:none}@media (hover:hover){.control:any-link:hover{text-decoration:underline}}";
|
|
14
9
|
//#endregion
|
|
15
|
-
//#region src/lib/
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* @public
|
|
26
|
-
* @component banner
|
|
27
|
-
* @slot action-items - Add action items to banner using this slot.
|
|
28
|
-
* @slot icon - The preferred way to add an icon to the component.
|
|
29
|
-
* @testSelector byText byText
|
|
30
|
-
* @testAction dismiss clickButton #dismissButton
|
|
31
|
-
* @testRef dismissButton shadowButton .dismiss-button
|
|
32
|
-
*/
|
|
33
|
-
var Banner = class extends require_affix.AffixIcon(require_localized.Localized(require_delegates_aria.DelegatesAria(require_vivid_element.VividElement))) {
|
|
34
|
-
constructor(..._args) {
|
|
35
|
-
super(..._args);
|
|
36
|
-
this.dismissButtonAriaLabel = null;
|
|
37
|
-
this.removable = false;
|
|
38
|
-
this.#handleRemoveEnd = () => {
|
|
39
|
-
this.$emit("removed");
|
|
40
|
-
this.parentElement?.removeChild(this);
|
|
41
|
-
};
|
|
42
|
-
this.#closeOnKeyDown = (e) => {
|
|
43
|
-
if (e.key !== "Escape" || !this.removable) return;
|
|
44
|
-
this.remove();
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
get conditionedIcon() {
|
|
48
|
-
return this.icon ?? getConnotationIcon(this.connotation);
|
|
49
|
-
}
|
|
50
|
-
connectedCallback() {
|
|
51
|
-
super.connectedCallback();
|
|
52
|
-
this.addEventListener("keydown", this.#closeOnKeyDown);
|
|
53
|
-
}
|
|
54
|
-
disconnectedCallback() {
|
|
55
|
-
super.disconnectedCallback();
|
|
56
|
-
this.removeEventListener("keydown", this.#closeOnKeyDown);
|
|
57
|
-
}
|
|
58
|
-
remove() {
|
|
59
|
-
this.$emit("removing");
|
|
60
|
-
const banner = this.shadowRoot && this.shadowRoot.querySelector(".control");
|
|
61
|
-
banner?.classList.add("removing");
|
|
62
|
-
banner?.addEventListener("transitionend", this.#handleRemoveEnd);
|
|
63
|
-
}
|
|
64
|
-
#handleRemoveEnd;
|
|
65
|
-
#closeOnKeyDown;
|
|
66
|
-
};
|
|
67
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "dismiss-aria-label" })], Banner.prototype, "dismissButtonAriaLabel", void 0);
|
|
68
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ mode: "boolean" })], Banner.prototype, "removable", void 0);
|
|
69
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)()], Banner.prototype, "text", void 0);
|
|
70
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)()], Banner.prototype, "connotation", void 0);
|
|
71
|
-
require_decorate.__decorate([_microsoft_fast_element.observable], Banner.prototype, "actionItemsSlottedContent", void 0);
|
|
72
|
-
//#endregion
|
|
73
|
-
//#region src/lib/banner/banner.template.ts
|
|
74
|
-
var getClasses = (_) => (0, _microsoft_fast_web_utilities.classNames)("control", [`connotation-${_.connotation}`, !!_.connotation]);
|
|
75
|
-
function renderDismissButton(buttonTag) {
|
|
76
|
-
return _microsoft_fast_element.html`
|
|
77
|
-
<${buttonTag}
|
|
78
|
-
aria-label="${(x) => x.dismissButtonAriaLabel || x.locale.banner.dismissButtonLabel}"
|
|
79
|
-
part="${(x) => x.connotation === "warning" ? "" : "vvd-theme-alternate"}"
|
|
80
|
-
size="condensed"
|
|
81
|
-
class="dismiss-button"
|
|
82
|
-
icon="close-line"
|
|
83
|
-
@click="${(x) => x.remove()}">
|
|
84
|
-
</${buttonTag}>`;
|
|
85
|
-
}
|
|
86
|
-
var renderIcon = (c, x) => {
|
|
87
|
-
const affixIconTemplate = require_affix.affixIconTemplateFactory(c);
|
|
88
|
-
const icon = x.conditionedIcon;
|
|
89
|
-
const announcement = !x.icon && x.connotation ? {
|
|
90
|
-
label: x.locale.connotationAnnoncement[`${x.connotation}Icon`],
|
|
91
|
-
announceOnUpdate: false
|
|
92
|
-
} : void 0;
|
|
93
|
-
return affixIconTemplate(icon, require_affix.IconWrapper.Slot, require_affix.IconAriaHidden.Hidden, announcement);
|
|
94
|
-
};
|
|
95
|
-
var BannerTemplate = (context) => {
|
|
96
|
-
const buttonTag = context.tagFor(require_definition$1.Button);
|
|
97
|
-
return _microsoft_fast_element.html`
|
|
98
|
-
<div class="${getClasses}">
|
|
99
|
-
<header class="header">
|
|
100
|
-
<div class="content">
|
|
101
|
-
${(x) => renderIcon(context, x)}
|
|
102
|
-
<div
|
|
103
|
-
class="banner-message"
|
|
104
|
-
${require_delegates_aria.delegateAria({
|
|
105
|
-
role: (x) => x.role ? x.role : "status",
|
|
106
|
-
ariaLive: (x) => x.ariaLive ? x.ariaLive : "polite"
|
|
107
|
-
})}
|
|
108
|
-
>
|
|
109
|
-
${(x) => x.text}
|
|
110
|
-
</div>
|
|
111
|
-
<slot
|
|
112
|
-
class="action-items"
|
|
113
|
-
${(0, _microsoft_fast_element.slotted)("actionItemsSlottedContent")}
|
|
114
|
-
name="action-items"
|
|
115
|
-
></slot>
|
|
116
|
-
</div>
|
|
117
|
-
|
|
118
|
-
${(0, _microsoft_fast_element.when)((x) => x.removable, renderDismissButton(buttonTag))}
|
|
119
|
-
</header>
|
|
120
|
-
</div>
|
|
121
|
-
`;
|
|
10
|
+
//#region src/lib/breadcrumb-item/breadcrumb-item.template.ts
|
|
11
|
+
var getClasses = (_) => (0, _microsoft_fast_web_utilities.classNames)("base");
|
|
12
|
+
var BreadcrumbItemTemplate = (context) => {
|
|
13
|
+
const iconTag = context.tagFor(require_definition.Icon);
|
|
14
|
+
return _microsoft_fast_element.html` <div role="listitem" class="${getClasses}">
|
|
15
|
+
${(0, _microsoft_fast_element.when)((x) => x.text && !x.href, _microsoft_fast_element.html`${(x) => x.text}`)}
|
|
16
|
+
${(0, _microsoft_fast_element.when)((x) => x.text && x.href && x.href.length > 0, _microsoft_fast_element.html`${(x) => x._renderLinkElement(_microsoft_fast_element.html`${(x) => x.text}`, "control")}`)}
|
|
17
|
+
${(0, _microsoft_fast_element.when)((x) => x.separator, _microsoft_fast_element.html`<${iconTag} class="separator" name="chevron-right-solid"></${iconTag}>`)}
|
|
18
|
+
</div>`;
|
|
122
19
|
};
|
|
123
20
|
//#endregion
|
|
124
|
-
//#region src/lib/
|
|
125
|
-
/**
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
21
|
+
//#region src/lib/breadcrumb-item/definition.ts
|
|
22
|
+
/** @internal */
|
|
23
|
+
var breadcrumbItemDefinition = require_vivid_element.defineVividComponent("breadcrumb-item", require_breadcrumb_item.BreadcrumbItem, BreadcrumbItemTemplate, [require_definition.iconDefinition], {
|
|
24
|
+
styles: breadcrumb_item_default,
|
|
25
|
+
shadowOptions: { delegatesFocus: true }
|
|
26
|
+
});
|
|
129
27
|
/**
|
|
130
|
-
* Registers the
|
|
28
|
+
* Registers the breadcrumb-item elements with the design system.
|
|
131
29
|
*
|
|
132
30
|
* @param prefix - the prefix to use for the component name
|
|
133
31
|
*/
|
|
134
|
-
var
|
|
32
|
+
var registerBreadcrumbItem = require_vivid_element.createRegisterFunction(breadcrumbItemDefinition);
|
|
135
33
|
//#endregion
|
|
136
|
-
Object.defineProperty(exports, "
|
|
137
|
-
enumerable: true,
|
|
138
|
-
get: function() {
|
|
139
|
-
return Banner;
|
|
140
|
-
}
|
|
141
|
-
});
|
|
142
|
-
Object.defineProperty(exports, "bannerDefinition", {
|
|
34
|
+
Object.defineProperty(exports, "breadcrumbItemDefinition", {
|
|
143
35
|
enumerable: true,
|
|
144
36
|
get: function() {
|
|
145
|
-
return
|
|
37
|
+
return breadcrumbItemDefinition;
|
|
146
38
|
}
|
|
147
39
|
});
|
|
148
|
-
Object.defineProperty(exports, "
|
|
40
|
+
Object.defineProperty(exports, "registerBreadcrumbItem", {
|
|
149
41
|
enumerable: true,
|
|
150
42
|
get: function() {
|
|
151
|
-
return
|
|
43
|
+
return registerBreadcrumbItem;
|
|
152
44
|
}
|
|
153
45
|
});
|
|
@@ -1,135 +1,33 @@
|
|
|
1
|
-
import { d as createRegisterFunction,
|
|
2
|
-
import { t as iconDefinition } from "./definition.js";
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { n as delegateAria, t as DelegatesAria } from "./delegates-aria.js";
|
|
6
|
-
import { t as Localized } from "./localized.js";
|
|
7
|
-
import { i as Button, t as buttonDefinition } from "./definition7.js";
|
|
8
|
-
import { r as Connotation } from "./enums.js";
|
|
9
|
-
import { attr, html, observable, slotted, when } from "@microsoft/fast-element";
|
|
1
|
+
import { d as createRegisterFunction, u as defineVividComponent } from "./vivid-element.js";
|
|
2
|
+
import { r as Icon, t as iconDefinition } from "./definition.js";
|
|
3
|
+
import { t as BreadcrumbItem } from "./breadcrumb-item.js";
|
|
4
|
+
import { html, when } from "@microsoft/fast-element";
|
|
10
5
|
import { classNames } from "@microsoft/fast-web-utilities";
|
|
11
|
-
//#region src/lib/
|
|
12
|
-
var
|
|
6
|
+
//#region src/lib/breadcrumb-item/breadcrumb-item.scss?inline
|
|
7
|
+
var breadcrumb_item_default = ".base{color:var(--vvd-color-canvas-text);font:var(--vvd-typography-base);align-items:center;display:flex}.base .separator{color:var(--vvd-color-neutral-600);margin:0 16px;font-size:12px}.control{font:inherit}.control:focus-visible{outline:none;position:relative}.control:focus-visible:after{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));border-radius:var(--focus-border-radius,inherit);block-size:calc(100% + var(--focus-block-size-addition,4px));content:\"\";inline-size:calc(100% + var(--focus-block-size-addition,4px));--focus-stroke-gap-color:transparent;--focus-block-size-addition:8px;--focus-border-radius:4px;display:block;position:absolute;inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}.control:any-link{color:var(--vvd-color-cta-600);text-decoration:none}@media (hover:hover){.control:any-link:hover{text-decoration:underline}}";
|
|
13
8
|
//#endregion
|
|
14
|
-
//#region src/lib/
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @public
|
|
25
|
-
* @component banner
|
|
26
|
-
* @slot action-items - Add action items to banner using this slot.
|
|
27
|
-
* @slot icon - The preferred way to add an icon to the component.
|
|
28
|
-
* @testSelector byText byText
|
|
29
|
-
* @testAction dismiss clickButton #dismissButton
|
|
30
|
-
* @testRef dismissButton shadowButton .dismiss-button
|
|
31
|
-
*/
|
|
32
|
-
var Banner = class extends AffixIcon(Localized(DelegatesAria(VividElement))) {
|
|
33
|
-
constructor(..._args) {
|
|
34
|
-
super(..._args);
|
|
35
|
-
this.dismissButtonAriaLabel = null;
|
|
36
|
-
this.removable = false;
|
|
37
|
-
this.#handleRemoveEnd = () => {
|
|
38
|
-
this.$emit("removed");
|
|
39
|
-
this.parentElement?.removeChild(this);
|
|
40
|
-
};
|
|
41
|
-
this.#closeOnKeyDown = (e) => {
|
|
42
|
-
if (e.key !== "Escape" || !this.removable) return;
|
|
43
|
-
this.remove();
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
get conditionedIcon() {
|
|
47
|
-
return this.icon ?? getConnotationIcon(this.connotation);
|
|
48
|
-
}
|
|
49
|
-
connectedCallback() {
|
|
50
|
-
super.connectedCallback();
|
|
51
|
-
this.addEventListener("keydown", this.#closeOnKeyDown);
|
|
52
|
-
}
|
|
53
|
-
disconnectedCallback() {
|
|
54
|
-
super.disconnectedCallback();
|
|
55
|
-
this.removeEventListener("keydown", this.#closeOnKeyDown);
|
|
56
|
-
}
|
|
57
|
-
remove() {
|
|
58
|
-
this.$emit("removing");
|
|
59
|
-
const banner = this.shadowRoot && this.shadowRoot.querySelector(".control");
|
|
60
|
-
banner?.classList.add("removing");
|
|
61
|
-
banner?.addEventListener("transitionend", this.#handleRemoveEnd);
|
|
62
|
-
}
|
|
63
|
-
#handleRemoveEnd;
|
|
64
|
-
#closeOnKeyDown;
|
|
65
|
-
};
|
|
66
|
-
__decorate([attr({ attribute: "dismiss-aria-label" })], Banner.prototype, "dismissButtonAriaLabel", void 0);
|
|
67
|
-
__decorate([attr({ mode: "boolean" })], Banner.prototype, "removable", void 0);
|
|
68
|
-
__decorate([attr()], Banner.prototype, "text", void 0);
|
|
69
|
-
__decorate([attr()], Banner.prototype, "connotation", void 0);
|
|
70
|
-
__decorate([observable], Banner.prototype, "actionItemsSlottedContent", void 0);
|
|
71
|
-
//#endregion
|
|
72
|
-
//#region src/lib/banner/banner.template.ts
|
|
73
|
-
var getClasses = (_) => classNames("control", [`connotation-${_.connotation}`, !!_.connotation]);
|
|
74
|
-
function renderDismissButton(buttonTag) {
|
|
75
|
-
return html`
|
|
76
|
-
<${buttonTag}
|
|
77
|
-
aria-label="${(x) => x.dismissButtonAriaLabel || x.locale.banner.dismissButtonLabel}"
|
|
78
|
-
part="${(x) => x.connotation === "warning" ? "" : "vvd-theme-alternate"}"
|
|
79
|
-
size="condensed"
|
|
80
|
-
class="dismiss-button"
|
|
81
|
-
icon="close-line"
|
|
82
|
-
@click="${(x) => x.remove()}">
|
|
83
|
-
</${buttonTag}>`;
|
|
84
|
-
}
|
|
85
|
-
var renderIcon = (c, x) => {
|
|
86
|
-
const affixIconTemplate = affixIconTemplateFactory(c);
|
|
87
|
-
const icon = x.conditionedIcon;
|
|
88
|
-
const announcement = !x.icon && x.connotation ? {
|
|
89
|
-
label: x.locale.connotationAnnoncement[`${x.connotation}Icon`],
|
|
90
|
-
announceOnUpdate: false
|
|
91
|
-
} : void 0;
|
|
92
|
-
return affixIconTemplate(icon, IconWrapper.Slot, IconAriaHidden.Hidden, announcement);
|
|
93
|
-
};
|
|
94
|
-
var BannerTemplate = (context) => {
|
|
95
|
-
const buttonTag = context.tagFor(Button);
|
|
96
|
-
return html`
|
|
97
|
-
<div class="${getClasses}">
|
|
98
|
-
<header class="header">
|
|
99
|
-
<div class="content">
|
|
100
|
-
${(x) => renderIcon(context, x)}
|
|
101
|
-
<div
|
|
102
|
-
class="banner-message"
|
|
103
|
-
${delegateAria({
|
|
104
|
-
role: (x) => x.role ? x.role : "status",
|
|
105
|
-
ariaLive: (x) => x.ariaLive ? x.ariaLive : "polite"
|
|
106
|
-
})}
|
|
107
|
-
>
|
|
108
|
-
${(x) => x.text}
|
|
109
|
-
</div>
|
|
110
|
-
<slot
|
|
111
|
-
class="action-items"
|
|
112
|
-
${slotted("actionItemsSlottedContent")}
|
|
113
|
-
name="action-items"
|
|
114
|
-
></slot>
|
|
115
|
-
</div>
|
|
116
|
-
|
|
117
|
-
${when((x) => x.removable, renderDismissButton(buttonTag))}
|
|
118
|
-
</header>
|
|
119
|
-
</div>
|
|
120
|
-
`;
|
|
9
|
+
//#region src/lib/breadcrumb-item/breadcrumb-item.template.ts
|
|
10
|
+
var getClasses = (_) => classNames("base");
|
|
11
|
+
var BreadcrumbItemTemplate = (context) => {
|
|
12
|
+
const iconTag = context.tagFor(Icon);
|
|
13
|
+
return html` <div role="listitem" class="${getClasses}">
|
|
14
|
+
${when((x) => x.text && !x.href, html`${(x) => x.text}`)}
|
|
15
|
+
${when((x) => x.text && x.href && x.href.length > 0, html`${(x) => x._renderLinkElement(html`${(x) => x.text}`, "control")}`)}
|
|
16
|
+
${when((x) => x.separator, html`<${iconTag} class="separator" name="chevron-right-solid"></${iconTag}>`)}
|
|
17
|
+
</div>`;
|
|
121
18
|
};
|
|
122
19
|
//#endregion
|
|
123
|
-
//#region src/lib/
|
|
124
|
-
/**
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
20
|
+
//#region src/lib/breadcrumb-item/definition.ts
|
|
21
|
+
/** @internal */
|
|
22
|
+
var breadcrumbItemDefinition = defineVividComponent("breadcrumb-item", BreadcrumbItem, BreadcrumbItemTemplate, [iconDefinition], {
|
|
23
|
+
styles: breadcrumb_item_default,
|
|
24
|
+
shadowOptions: { delegatesFocus: true }
|
|
25
|
+
});
|
|
128
26
|
/**
|
|
129
|
-
* Registers the
|
|
27
|
+
* Registers the breadcrumb-item elements with the design system.
|
|
130
28
|
*
|
|
131
29
|
* @param prefix - the prefix to use for the component name
|
|
132
30
|
*/
|
|
133
|
-
var
|
|
31
|
+
var registerBreadcrumbItem = createRegisterFunction(breadcrumbItemDefinition);
|
|
134
32
|
//#endregion
|
|
135
|
-
export {
|
|
33
|
+
export { registerBreadcrumbItem as n, breadcrumbItemDefinition as t };
|
|
@@ -1,47 +1,95 @@
|
|
|
1
1
|
require("./chunk.cjs");
|
|
2
2
|
const require_vivid_element = require("./vivid-element.cjs");
|
|
3
|
-
const
|
|
3
|
+
const require_decorate = require("./decorate.cjs");
|
|
4
|
+
const require_delegates_aria = require("./delegates-aria.cjs");
|
|
4
5
|
const require_breadcrumb_item = require("./breadcrumb-item.cjs");
|
|
5
6
|
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
//#region src/lib/breadcrumb/breadcrumb.template.ts
|
|
8
|
+
var breadcrumbTemplate = _microsoft_fast_element.html`
|
|
9
|
+
<nav
|
|
10
|
+
class="base"
|
|
11
|
+
${require_delegates_aria.delegateAria({ ariaLabel: (x) => x.ariaLabel || "breadcrumbs" })}
|
|
12
|
+
>
|
|
13
|
+
<div role="list" class="list">
|
|
14
|
+
<slot
|
|
15
|
+
${(0, _microsoft_fast_element.slotted)({
|
|
16
|
+
property: "slottedBreadcrumbItems",
|
|
17
|
+
filter: (0, _microsoft_fast_element.elements)()
|
|
18
|
+
})}
|
|
19
|
+
></slot>
|
|
20
|
+
</div>
|
|
21
|
+
</nav>
|
|
22
|
+
`;
|
|
9
23
|
//#endregion
|
|
10
|
-
//#region src/lib/breadcrumb
|
|
11
|
-
var
|
|
12
|
-
var BreadcrumbItemTemplate = (context) => {
|
|
13
|
-
const iconTag = context.tagFor(require_definition.Icon);
|
|
14
|
-
return _microsoft_fast_element.html` <div role="listitem" class="${getClasses}">
|
|
15
|
-
${(0, _microsoft_fast_element.when)((x) => x.text && !x.href, _microsoft_fast_element.html`${(x) => x.text}`)}
|
|
16
|
-
${(0, _microsoft_fast_element.when)((x) => x.text && x.href && x.href.length > 0, _microsoft_fast_element.html`${(x) => x._renderLinkElement(_microsoft_fast_element.html`${(x) => x.text}`, "control")}`)}
|
|
17
|
-
${(0, _microsoft_fast_element.when)((x) => x.separator, _microsoft_fast_element.html`<${iconTag} class="separator" name="chevron-right-solid"></${iconTag}>`)}
|
|
18
|
-
</div>`;
|
|
19
|
-
};
|
|
24
|
+
//#region src/lib/breadcrumb/breadcrumb.scss?inline
|
|
25
|
+
var breadcrumb_default = ".list{display:flex}";
|
|
20
26
|
//#endregion
|
|
21
|
-
//#region src/lib/breadcrumb
|
|
27
|
+
//#region src/lib/breadcrumb/breadcrumb.ts
|
|
22
28
|
/**
|
|
23
|
-
* @
|
|
29
|
+
* @public
|
|
30
|
+
* @component breadcrumb
|
|
31
|
+
* @slot - Default slot.
|
|
24
32
|
*/
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
var Breadcrumb = class extends require_delegates_aria.DelegatesAria(require_vivid_element.VividElement) {
|
|
34
|
+
/** @internal */
|
|
35
|
+
slottedBreadcrumbItemsChanged(_, newItems) {
|
|
36
|
+
/* v8 ignore else -- @preserve */
|
|
37
|
+
if (newItems) newItems.forEach((item, index) => {
|
|
38
|
+
const itemIsLastNode = index === newItems.length - 1;
|
|
39
|
+
this.setItemSeparator(item, itemIsLastNode);
|
|
40
|
+
this.setAriaCurrent(item, itemIsLastNode);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
setItemSeparator(item, isLastNode) {
|
|
44
|
+
if (item instanceof require_breadcrumb_item.BreadcrumbItem) item.separator = !isLastNode;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Finds href on childnodes in the light DOM or shadow DOM.
|
|
48
|
+
* We look in the shadow DOM because we insert an anchor when breadcrumb-item has an href.
|
|
49
|
+
*/
|
|
50
|
+
findChildWithHref(node) {
|
|
51
|
+
if (node.childElementCount > 0) return node.querySelector("a[href]");
|
|
52
|
+
else if (node.shadowRoot) return node.shadowRoot.querySelector("a[href]");
|
|
53
|
+
else return null;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Sets ARIA Current for the current node
|
|
57
|
+
* If child node with an anchor tag and with href is found then set aria-current to correct value for the child node,
|
|
58
|
+
* otherwise apply aria-current to the host element, with an href
|
|
59
|
+
*/
|
|
60
|
+
setAriaCurrent(item, isLastNode) {
|
|
61
|
+
const childNodeWithHref = this.findChildWithHref(item);
|
|
62
|
+
if (childNodeWithHref !== null) if (isLastNode) childNodeWithHref.setAttribute("aria-current", "page");
|
|
63
|
+
else childNodeWithHref.removeAttribute("aria-current");
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
require_decorate.__decorate([_microsoft_fast_element.observable], Breadcrumb.prototype, "slottedBreadcrumbItems", void 0);
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/lib/breadcrumb/definition.ts
|
|
69
|
+
/** @internal */
|
|
70
|
+
var breadcrumbDefinition = require_vivid_element.defineVividComponent("breadcrumb", Breadcrumb, breadcrumbTemplate, [], { styles: breadcrumb_default });
|
|
29
71
|
/**
|
|
30
|
-
* Registers the breadcrumb
|
|
72
|
+
* Registers the breadcrumb elements with the design system.
|
|
31
73
|
*
|
|
32
74
|
* @param prefix - the prefix to use for the component name
|
|
33
75
|
*/
|
|
34
|
-
var
|
|
76
|
+
var registerBreadcrumb = require_vivid_element.createRegisterFunction(breadcrumbDefinition);
|
|
35
77
|
//#endregion
|
|
36
|
-
Object.defineProperty(exports, "
|
|
78
|
+
Object.defineProperty(exports, "Breadcrumb", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function() {
|
|
81
|
+
return Breadcrumb;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "breadcrumbDefinition", {
|
|
37
85
|
enumerable: true,
|
|
38
86
|
get: function() {
|
|
39
|
-
return
|
|
87
|
+
return breadcrumbDefinition;
|
|
40
88
|
}
|
|
41
89
|
});
|
|
42
|
-
Object.defineProperty(exports, "
|
|
90
|
+
Object.defineProperty(exports, "registerBreadcrumb", {
|
|
43
91
|
enumerable: true,
|
|
44
92
|
get: function() {
|
|
45
|
-
return
|
|
93
|
+
return registerBreadcrumb;
|
|
46
94
|
}
|
|
47
95
|
});
|
|
@@ -1,35 +1,77 @@
|
|
|
1
|
-
import { d as createRegisterFunction, u as defineVividComponent } from "./vivid-element.js";
|
|
2
|
-
import {
|
|
1
|
+
import { d as createRegisterFunction, t as VividElement, u as defineVividComponent } from "./vivid-element.js";
|
|
2
|
+
import { t as __decorate } from "./decorate.js";
|
|
3
|
+
import { n as delegateAria, t as DelegatesAria } from "./delegates-aria.js";
|
|
3
4
|
import { t as BreadcrumbItem } from "./breadcrumb-item.js";
|
|
4
|
-
import { html,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import { elements, html, observable, slotted } from "@microsoft/fast-element";
|
|
6
|
+
//#region src/lib/breadcrumb/breadcrumb.template.ts
|
|
7
|
+
var breadcrumbTemplate = html`
|
|
8
|
+
<nav
|
|
9
|
+
class="base"
|
|
10
|
+
${delegateAria({ ariaLabel: (x) => x.ariaLabel || "breadcrumbs" })}
|
|
11
|
+
>
|
|
12
|
+
<div role="list" class="list">
|
|
13
|
+
<slot
|
|
14
|
+
${slotted({
|
|
15
|
+
property: "slottedBreadcrumbItems",
|
|
16
|
+
filter: elements()
|
|
17
|
+
})}
|
|
18
|
+
></slot>
|
|
19
|
+
</div>
|
|
20
|
+
</nav>
|
|
21
|
+
`;
|
|
8
22
|
//#endregion
|
|
9
|
-
//#region src/lib/breadcrumb
|
|
10
|
-
var
|
|
11
|
-
var BreadcrumbItemTemplate = (context) => {
|
|
12
|
-
const iconTag = context.tagFor(Icon);
|
|
13
|
-
return html` <div role="listitem" class="${getClasses}">
|
|
14
|
-
${when((x) => x.text && !x.href, html`${(x) => x.text}`)}
|
|
15
|
-
${when((x) => x.text && x.href && x.href.length > 0, html`${(x) => x._renderLinkElement(html`${(x) => x.text}`, "control")}`)}
|
|
16
|
-
${when((x) => x.separator, html`<${iconTag} class="separator" name="chevron-right-solid"></${iconTag}>`)}
|
|
17
|
-
</div>`;
|
|
18
|
-
};
|
|
23
|
+
//#region src/lib/breadcrumb/breadcrumb.scss?inline
|
|
24
|
+
var breadcrumb_default = ".list{display:flex}";
|
|
19
25
|
//#endregion
|
|
20
|
-
//#region src/lib/breadcrumb
|
|
26
|
+
//#region src/lib/breadcrumb/breadcrumb.ts
|
|
21
27
|
/**
|
|
22
|
-
* @
|
|
28
|
+
* @public
|
|
29
|
+
* @component breadcrumb
|
|
30
|
+
* @slot - Default slot.
|
|
23
31
|
*/
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
var Breadcrumb = class extends DelegatesAria(VividElement) {
|
|
33
|
+
/** @internal */
|
|
34
|
+
slottedBreadcrumbItemsChanged(_, newItems) {
|
|
35
|
+
/* v8 ignore else -- @preserve */
|
|
36
|
+
if (newItems) newItems.forEach((item, index) => {
|
|
37
|
+
const itemIsLastNode = index === newItems.length - 1;
|
|
38
|
+
this.setItemSeparator(item, itemIsLastNode);
|
|
39
|
+
this.setAriaCurrent(item, itemIsLastNode);
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
setItemSeparator(item, isLastNode) {
|
|
43
|
+
if (item instanceof BreadcrumbItem) item.separator = !isLastNode;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Finds href on childnodes in the light DOM or shadow DOM.
|
|
47
|
+
* We look in the shadow DOM because we insert an anchor when breadcrumb-item has an href.
|
|
48
|
+
*/
|
|
49
|
+
findChildWithHref(node) {
|
|
50
|
+
if (node.childElementCount > 0) return node.querySelector("a[href]");
|
|
51
|
+
else if (node.shadowRoot) return node.shadowRoot.querySelector("a[href]");
|
|
52
|
+
else return null;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Sets ARIA Current for the current node
|
|
56
|
+
* If child node with an anchor tag and with href is found then set aria-current to correct value for the child node,
|
|
57
|
+
* otherwise apply aria-current to the host element, with an href
|
|
58
|
+
*/
|
|
59
|
+
setAriaCurrent(item, isLastNode) {
|
|
60
|
+
const childNodeWithHref = this.findChildWithHref(item);
|
|
61
|
+
if (childNodeWithHref !== null) if (isLastNode) childNodeWithHref.setAttribute("aria-current", "page");
|
|
62
|
+
else childNodeWithHref.removeAttribute("aria-current");
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
__decorate([observable], Breadcrumb.prototype, "slottedBreadcrumbItems", void 0);
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/lib/breadcrumb/definition.ts
|
|
68
|
+
/** @internal */
|
|
69
|
+
var breadcrumbDefinition = defineVividComponent("breadcrumb", Breadcrumb, breadcrumbTemplate, [], { styles: breadcrumb_default });
|
|
28
70
|
/**
|
|
29
|
-
* Registers the breadcrumb
|
|
71
|
+
* Registers the breadcrumb elements with the design system.
|
|
30
72
|
*
|
|
31
73
|
* @param prefix - the prefix to use for the component name
|
|
32
74
|
*/
|
|
33
|
-
var
|
|
75
|
+
var registerBreadcrumb = createRegisterFunction(breadcrumbDefinition);
|
|
34
76
|
//#endregion
|
|
35
|
-
export {
|
|
77
|
+
export { registerBreadcrumb as n, Breadcrumb as r, breadcrumbDefinition as t };
|