@vonage/vivid 5.23.1-preview.0 → 5.24.0
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/accordion/index.cjs +1 -1
- package/accordion/index.js +1 -1
- package/accordion-item/index.cjs +1 -1
- package/accordion-item/index.js +1 -1
- 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 +19 -17
- package/audio-player/index.js +24 -22
- 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/badge/index.cjs +1 -1
- package/badge/index.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 +8 -7
- package/bundled/definition15.js +26 -24
- 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 +12 -83
- package/bundled/definition18.js +35 -420
- package/bundled/definition19.cjs +87 -5
- package/bundled/definition19.js +432 -14
- package/bundled/definition2.cjs +1 -13
- package/bundled/definition2.js +181 -48
- package/bundled/definition20.cjs +7 -35
- package/bundled/definition20.js +17 -170
- package/bundled/definition21.cjs +35 -27
- package/bundled/definition21.js +154 -155
- package/bundled/definition22.cjs +29 -4
- package/bundled/definition22.js +171 -17
- package/bundled/definition23.cjs +6 -12
- package/bundled/definition23.js +17 -32
- package/bundled/definition24.cjs +12 -39
- package/bundled/definition24.js +32 -67
- package/bundled/definition25.cjs +44 -0
- package/bundled/definition25.js +77 -0
- 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/extractOptions.cjs +1 -0
- package/bundled/extractOptions.js +11 -0
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +24 -11
- 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/render-in-light-dom.cjs +1 -1
- package/bundled/render-in-light-dom.js +16 -19
- 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 +9 -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/definition.cjs +1 -1
- package/combobox/definition.js +1 -1
- package/combobox/index.cjs +11 -8
- package/combobox/index.js +59 -49
- package/country/definition.cjs +1 -1
- package/country/definition.js +1 -1
- package/country/index.cjs +1 -1
- package/country/index.js +1 -1
- package/country-group/definition.cjs +1 -1
- package/country-group/definition.js +1 -1
- package/country-group/index.cjs +1 -1
- package/country-group/index.js +2 -2
- package/custom-elements.json +837 -1225
- package/data-grid/definition.cjs +1 -1
- package/data-grid/definition.js +1 -1
- package/data-grid/index.cjs +8 -6
- package/data-grid/index.js +22 -20
- package/date-picker/definition.cjs +1 -1
- package/date-picker/definition.js +1 -1
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +1 -1
- package/date-range-picker/definition.cjs +1 -1
- package/date-range-picker/definition.js +1 -1
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +1 -1
- package/date-time-picker/definition.cjs +1 -1
- package/date-time-picker/definition.js +1 -1
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +1 -1
- package/dial-pad/definition.cjs +1 -1
- package/dial-pad/definition.js +1 -1
- package/dial-pad/index.cjs +25 -23
- package/dial-pad/index.js +127 -56
- package/dialog/definition.cjs +1 -1
- package/dialog/definition.js +1 -1
- package/dialog/index.cjs +14 -14
- package/dialog/index.js +17 -18
- package/divider/definition.cjs +1 -1
- package/divider/definition.js +1 -1
- package/divider/index.cjs +1 -1
- package/divider/index.js +1 -1
- package/elevation/definition.cjs +1 -1
- package/elevation/definition.js +1 -1
- package/empty-state/definition.cjs +1 -1
- package/empty-state/definition.js +1 -1
- package/empty-state/index.cjs +4 -4
- package/empty-state/index.js +7 -11
- package/fab/definition.cjs +1 -1
- package/fab/definition.js +1 -1
- package/fab/index.cjs +4 -4
- package/fab/index.js +9 -13
- package/file-picker/definition.cjs +1 -1
- package/file-picker/definition.js +1 -1
- package/file-picker/index.cjs +8 -8
- package/file-picker/index.js +19 -19
- package/flag/definition.cjs +1 -1
- package/flag/definition.js +1 -1
- package/flag/index.cjs +5 -5
- package/flag/index.js +8 -12
- package/header/definition.cjs +1 -1
- package/header/definition.js +1 -1
- package/header/index.cjs +7 -7
- package/header/index.js +6 -10
- package/icon/index.cjs +1 -1
- package/icon/index.js +1 -1
- package/index.cjs +214 -209
- package/index.js +67 -66
- package/kbd-key/definition.cjs +1 -1
- package/kbd-key/definition.js +1 -1
- package/kbd-key/index.cjs +3 -3
- package/kbd-key/index.js +2 -6
- package/kbd-shortcut/definition.cjs +1 -1
- package/kbd-shortcut/definition.js +1 -1
- package/layout/definition.cjs +1 -1
- package/layout/definition.js +1 -1
- 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/accordion-item.d.ts +2 -1
- package/lib/accordion-item/variations.browser-spec.d.ts +1 -0
- package/lib/action-group/action-group.d.ts +1 -1
- package/lib/action-group/variations.browser-spec.d.ts +1 -0
- package/lib/alert/alert.d.ts +2 -2
- package/lib/alert/variations.browser-spec.d.ts +1 -0
- package/lib/audio-player/audio-player.d.ts +1 -1
- package/lib/audio-player/variations.browser-spec.d.ts +1 -0
- package/lib/avatar/avatar.d.ts +1 -1
- package/lib/avatar/variations.browser-spec.d.ts +1 -0
- package/lib/badge/badge.d.ts +5 -5
- package/lib/badge/badge.template.d.ts +1 -2
- package/lib/badge/variations.browser-spec.d.ts +1 -0
- package/lib/banner/banner.d.ts +3 -3
- package/lib/banner/variations.browser-spec.d.ts +1 -0
- package/lib/breadcrumb/breadcrumb.d.ts +1 -1
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/lib/breadcrumb-item/variations.browser-spec.d.ts +1 -0
- package/lib/button/button.d.ts +3 -3
- package/lib/button/variations.browser-spec.d.ts +1 -0
- package/lib/calendar/variations.browser-spec.d.ts +1 -0
- package/lib/calendar-event/calendar-event.d.ts +1 -1
- package/lib/calendar-event/variations.browser-spec.d.ts +1 -0
- package/lib/card/card.d.ts +5 -5
- package/lib/card/variations.browser-spec.d.ts +1 -0
- package/lib/checkbox/checkbox.d.ts +6 -6
- package/lib/checkbox/variations.browser-spec.d.ts +1 -0
- package/lib/color-picker/color-picker.d.ts +8 -8
- package/lib/color-picker/variations.browser-spec.d.ts +1 -0
- package/lib/combobox/combobox.d.ts +7 -7
- package/lib/combobox/variations.browser-spec.d.ts +1 -0
- package/lib/components.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/country-group/country-group.d.ts +2 -2
- package/lib/data-grid/data-grid-cell.d.ts +4 -3
- package/lib/data-grid/data-grid-row.d.ts +3 -2
- package/lib/data-grid/data-grid.options.d.ts +5 -0
- package/lib/data-grid/variations.browser-spec.d.ts +1 -0
- package/lib/date-picker/date-picker.d.ts +8 -8
- package/lib/date-picker/variations.browser-spec.d.ts +1 -0
- package/lib/date-range-picker/date-range-picker.d.ts +4 -4
- package/lib/date-range-picker/variations.browser-spec.d.ts +1 -0
- package/lib/date-time-picker/date-time-picker.d.ts +8 -8
- package/lib/date-time-picker/variations.browser-spec.d.ts +1 -0
- package/lib/dial-pad/dial-pad.d.ts +2 -1
- package/lib/dial-pad/variations.browser-spec.d.ts +1 -0
- package/lib/dialog/dialog.d.ts +2 -2
- package/lib/dialog/variations.browser-spec.d.ts +1 -0
- package/lib/divider/divider.d.ts +1 -1
- 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 +6 -6
- package/lib/fab/variations.browser-spec.d.ts +1 -0
- package/lib/file-picker/file-picker.d.ts +7 -7
- package/lib/file-picker/variations.browser-spec.d.ts +1 -0
- package/lib/flag/variations.browser-spec.d.ts +1 -0
- package/lib/header/header.d.ts +1 -1
- 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/menu.d.ts +2 -2
- package/lib/menu/variations.browser-spec.d.ts +1 -0
- package/lib/menu-item/menu-item.d.ts +3 -3
- package/lib/menu-item/variations.browser-spec.d.ts +1 -0
- package/lib/nav/nav.d.ts +1 -1
- package/lib/nav/variations.browser-spec.d.ts +1 -0
- package/lib/nav-disclosure/nav-disclosure.d.ts +2 -2
- package/lib/nav-disclosure/variations.browser-spec.d.ts +1 -0
- package/lib/nav-item/nav-item.d.ts +2 -2
- package/lib/nav-item/variations.browser-spec.d.ts +1 -0
- package/lib/note/note.d.ts +1 -1
- package/lib/note/variations.browser-spec.d.ts +1 -0
- package/lib/number-field/number-field.d.ts +9 -9
- package/lib/number-field/variations.browser-spec.d.ts +1 -0
- package/lib/optgroup/definition.d.ts +3 -0
- package/lib/optgroup/index.d.ts +1 -0
- package/lib/optgroup/optgroup.d.ts +430 -0
- package/lib/optgroup/optgroup.template.d.ts +2 -0
- package/lib/optgroup/variations.browser-spec.d.ts +1 -0
- package/lib/option/option.d.ts +2 -2
- package/lib/option/variations.browser-spec.d.ts +1 -0
- package/lib/pagination/pagination.d.ts +1 -1
- package/lib/pagination/variations.browser-spec.d.ts +1 -0
- package/lib/popover/popover.d.ts +2 -2
- package/lib/popover/variations.browser-spec.d.ts +1 -0
- package/lib/progress/progress.d.ts +1 -1
- package/lib/progress/variations.browser-spec.d.ts +1 -0
- package/lib/progress-ring/progress-ring.d.ts +1 -1
- package/lib/progress-ring/variations.browser-spec.d.ts +1 -0
- package/lib/radio/radio.d.ts +3 -3
- package/lib/radio/variations.browser-spec.d.ts +1 -0
- package/lib/radio-group/radio-group.d.ts +1 -1
- package/lib/radio-group/variations.browser-spec.d.ts +1 -0
- package/lib/range-slider/range-slider.d.ts +3 -3
- package/lib/range-slider/variations.browser-spec.d.ts +1 -0
- package/lib/rich-text-editor/rich-text-editor.d.ts +1 -1
- 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/option-tag.d.ts +1 -1
- package/lib/searchable-select/searchable-select.d.ts +47 -47
- package/lib/searchable-select/variations.browser-spec.d.ts +1 -0
- package/lib/select/select.d.ts +9 -9
- package/lib/select/variations.browser-spec.d.ts +1 -0
- package/lib/selectable-box/selectable-box.d.ts +1 -1
- 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 +4 -4
- package/lib/simple-color-picker/variations.browser-spec.d.ts +1 -0
- package/lib/slider/slider.d.ts +3 -3
- package/lib/slider/variations.browser-spec.d.ts +1 -0
- package/lib/split-button/split-button.d.ts +3 -3
- package/lib/split-button/variations.browser-spec.d.ts +1 -0
- package/lib/status/status.d.ts +1 -1
- package/lib/status/variations.browser-spec.d.ts +1 -0
- package/lib/switch/switch.d.ts +2 -2
- package/lib/switch/variations.browser-spec.d.ts +1 -0
- package/lib/tab/tab.d.ts +15 -15
- package/lib/tab-panel/tab-panel.d.ts +1 -1
- package/lib/table/table-cell.d.ts +1 -1
- package/lib/table/table-header-cell.d.ts +1 -1
- package/lib/table/table-row.d.ts +1 -1
- package/lib/table/table-sorting-button.d.ts +1 -1
- 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 +15 -15
- package/lib/tag/variations.browser-spec.d.ts +1 -0
- package/lib/tag-group/tag-group.d.ts +1 -1
- package/lib/tag-name-map.d.ts +2 -1
- package/lib/text-area/text-area.d.ts +8 -8
- 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/text-field.d.ts +9 -9
- package/lib/text-field/variations.browser-spec.d.ts +1 -0
- package/lib/time-picker/time-picker.d.ts +4 -4
- package/lib/time-picker/variations.browser-spec.d.ts +1 -0
- package/lib/toggletip/toggletip.d.ts +2 -2
- package/lib/toggletip/variations.browser-spec.d.ts +1 -0
- package/lib/tooltip/tooltip.d.ts +2 -2
- package/lib/tooltip/variations.browser-spec.d.ts +1 -0
- package/lib/tree-item/tree-item.d.ts +2 -2
- package/lib/tree-item/variations.browser-spec.d.ts +1 -0
- package/lib/tree-view/tree-view.d.ts +1 -1
- package/lib/video-player/variations.browser-spec.d.ts +1 -0
- package/lib/video-player/video-player.d.ts +1 -1
- package/menu/definition.cjs +1 -1
- package/menu/definition.js +1 -1
- package/menu/index.cjs +1 -1
- package/menu/index.js +1 -1
- package/menu-item/definition.cjs +1 -1
- package/menu-item/definition.js +1 -1
- package/menu-item/index.cjs +1 -1
- package/menu-item/index.js +1 -1
- package/nav/definition.cjs +1 -1
- package/nav/definition.js +1 -1
- package/nav-disclosure/definition.cjs +1 -1
- package/nav-disclosure/definition.js +1 -1
- package/nav-disclosure/index.cjs +6 -6
- package/nav-disclosure/index.js +11 -15
- package/nav-item/definition.cjs +1 -1
- package/nav-item/definition.js +1 -1
- package/nav-item/index.cjs +2 -2
- package/nav-item/index.js +11 -15
- package/note/definition.cjs +1 -1
- package/note/definition.js +1 -1
- package/note/index.cjs +5 -5
- package/note/index.js +10 -11
- package/number-field/definition.cjs +1 -1
- package/number-field/definition.js +1 -1
- package/number-field/index.cjs +12 -12
- package/number-field/index.js +35 -36
- package/optgroup/definition.cjs +5 -0
- package/optgroup/definition.js +2 -0
- package/optgroup/index.cjs +1 -0
- package/optgroup/index.js +4 -0
- package/package.json +15 -6
- package/pagination/definition.cjs +1 -1
- package/pagination/definition.js +1 -1
- package/platform-switch/definition.cjs +1 -1
- package/platform-switch/definition.js +1 -1
- package/popover/definition.cjs +1 -1
- package/popover/definition.js +1 -1
- 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/definition.cjs +1 -1
- package/progress/definition.js +1 -1
- package/progress/index.cjs +8 -8
- package/progress/index.js +9 -10
- package/radio/definition.cjs +1 -1
- package/radio/definition.js +1 -1
- package/radio-group/definition.cjs +1 -1
- package/radio-group/definition.js +1 -1
- package/range-slider/definition.cjs +1 -1
- package/range-slider/definition.js +1 -1
- package/range-slider/index.cjs +10 -8
- package/range-slider/index.js +26 -24
- package/rich-text-editor/definition.cjs +1 -1
- package/rich-text-editor/definition.js +1 -1
- package/rich-text-editor/index.cjs +3 -3
- package/rich-text-editor/index.js +762 -751
- package/rich-text-view/definition.cjs +1 -1
- package/rich-text-view/definition.js +1 -1
- package/searchable-select/definition.cjs +2 -1
- package/searchable-select/definition.js +2 -2
- package/searchable-select/index.cjs +30 -27
- package/searchable-select/index.js +104 -85
- package/select/definition.cjs +1 -1
- package/select/definition.js +1 -1
- package/select/index.cjs +1 -1
- package/select/index.js +1 -1
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +1 -1
- package/selectable-box/index.cjs +8 -8
- package/selectable-box/index.js +8 -9
- package/shared/aria/delegates-aria.d.ts +1 -1
- package/shared/aria/host-semantics.d.ts +1 -1
- package/shared/color-picker/base-color-picker.d.ts +1 -1
- package/shared/feedback/feedback-message.d.ts +1 -1
- package/shared/feedback/mixins.d.ts +2 -2
- package/shared/foundation/button/button.d.ts +2 -2
- package/shared/foundation/form-associated/form-associated.d.ts +2 -2
- package/shared/foundation/listbox/extractOptions.d.ts +2 -0
- package/shared/foundation/listbox/listbox.d.ts +2 -0
- package/shared/patterns/affix.d.ts +2 -2
- package/shared/patterns/anchored.d.ts +2 -2
- package/shared/patterns/char-count/char-count.d.ts +1 -1
- package/shared/patterns/form-elements/form-element.d.ts +1 -1
- package/shared/patterns/form-elements/with-contextual-help.d.ts +1 -1
- package/shared/patterns/form-elements/with-error-text.d.ts +1 -1
- package/shared/patterns/form-elements/with-success-text.d.ts +1 -1
- package/shared/patterns/kbd-shortcut.d.ts +1 -1
- package/shared/patterns/linkable.d.ts +1 -1
- package/shared/patterns/localized.d.ts +2 -2
- package/shared/patterns/trapped-focus.d.ts +1 -1
- package/shared/picker-field/mixins/calendar-picker.d.ts +2 -2
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +2 -2
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +1 -1
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +2 -2
- package/shared/picker-field/mixins/single-date-picker.d.ts +2 -2
- package/shared/picker-field/mixins/single-value-picker.d.ts +2 -2
- package/shared/picker-field/mixins/time-selection-picker.d.ts +2 -2
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +4 -4
- package/shared/picker-field/picker-field.d.ts +7 -7
- package/side-drawer/definition.cjs +1 -1
- package/side-drawer/definition.js +1 -1
- package/side-drawer/index.cjs +3 -3
- package/side-drawer/index.js +3 -3
- package/simple-color-picker/definition.cjs +1 -1
- package/simple-color-picker/definition.js +1 -1
- 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/definition.cjs +1 -1
- package/split-button/definition.js +1 -1
- package/split-button/index.cjs +5 -4
- package/split-button/index.js +10 -9
- package/status/definition.cjs +1 -1
- package/status/definition.js +1 -1
- 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/definition.cjs +1 -1
- package/switch/definition.js +1 -1
- package/switch/index.cjs +5 -4
- package/switch/index.js +14 -12
- package/tab/definition.cjs +1 -1
- package/tab/definition.js +1 -1
- package/tab-panel/definition.cjs +1 -1
- package/tab-panel/definition.js +1 -1
- package/table/definition.cjs +1 -1
- package/table/definition.js +1 -1
- package/table/index.cjs +10 -10
- package/table/index.js +12 -12
- package/tabs/definition.cjs +1 -1
- package/tabs/definition.js +1 -1
- package/tabs/index.cjs +6 -4
- package/tabs/index.js +10 -9
- package/tag/definition.cjs +1 -1
- package/tag/definition.js +1 -1
- package/tag/index.cjs +6 -6
- package/tag/index.js +8 -8
- package/tag-group/definition.cjs +1 -1
- package/tag-group/definition.js +1 -1
- package/text-area/definition.cjs +1 -1
- package/text-area/definition.js +1 -1
- package/text-area/index.cjs +8 -6
- package/text-area/index.js +20 -19
- package/time-picker/definition.cjs +1 -1
- package/time-picker/definition.js +1 -1
- package/tree-item/definition.cjs +1 -1
- package/tree-item/definition.js +1 -1
- package/tree-view/definition.cjs +1 -1
- package/tree-view/definition.js +1 -1
- 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 +11 -8
- package/unbundled/definition2.js +11 -8
- 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 +9 -17
- package/unbundled/definition23.js +10 -18
- 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 +66 -516
- package/unbundled/definition30.js +58 -514
- package/unbundled/definition31.cjs +502 -42
- package/unbundled/definition31.js +500 -40
- package/unbundled/definition32.cjs +42 -253
- package/unbundled/definition32.js +39 -250
- package/unbundled/definition33.cjs +238 -81
- package/unbundled/definition33.js +235 -78
- package/unbundled/definition34.cjs +75 -2059
- package/unbundled/definition34.js +72 -2032
- package/unbundled/definition35.cjs +1990 -25
- package/unbundled/definition35.js +1960 -24
- package/unbundled/definition36.cjs +27 -134
- package/unbundled/definition36.js +24 -126
- package/unbundled/definition37.cjs +71 -368
- package/unbundled/definition37.js +66 -363
- package/unbundled/definition38.cjs +300 -176
- package/unbundled/definition38.js +295 -171
- package/unbundled/definition39.cjs +184 -374
- package/unbundled/definition39.js +180 -370
- package/unbundled/definition4.cjs +2 -11
- package/unbundled/definition4.js +2 -7
- package/unbundled/definition40.cjs +392 -237
- package/unbundled/definition40.js +389 -234
- package/unbundled/definition41.cjs +264 -50
- package/unbundled/definition41.js +259 -45
- package/unbundled/definition42.cjs +48 -71
- package/unbundled/definition42.js +46 -69
- package/unbundled/definition43.cjs +56 -426
- package/unbundled/definition43.js +55 -425
- package/unbundled/definition44.cjs +387 -48
- package/unbundled/definition44.js +383 -44
- package/unbundled/definition45.cjs +54 -48
- package/unbundled/definition45.js +50 -44
- package/unbundled/definition46.cjs +40 -173
- package/unbundled/definition46.js +36 -169
- package/unbundled/definition47.cjs +172 -33
- package/unbundled/definition47.js +168 -28
- package/unbundled/definition48.cjs +31 -97
- package/unbundled/definition48.js +23 -95
- package/unbundled/definition49.cjs +71 -38
- package/unbundled/definition49.js +68 -35
- package/unbundled/definition5.cjs +2 -5
- package/unbundled/definition5.js +2 -5
- package/unbundled/definition50.cjs +55 -26
- package/unbundled/definition50.js +53 -21
- package/unbundled/definition51.cjs +24 -43
- package/unbundled/definition51.js +18 -40
- package/unbundled/definition52.cjs +30 -340
- package/unbundled/definition52.js +28 -338
- package/unbundled/definition53.cjs +295 -197
- package/unbundled/definition53.js +292 -194
- package/unbundled/definition54.cjs +211 -45
- package/unbundled/definition54.js +207 -41
- package/unbundled/definition55.cjs +42 -308
- package/unbundled/definition55.js +38 -304
- package/unbundled/definition56.cjs +266 -53
- package/unbundled/definition56.js +263 -49
- package/unbundled/definition57.cjs +51 -162
- package/unbundled/definition57.js +49 -160
- package/unbundled/definition58.cjs +135 -253
- package/unbundled/definition58.js +130 -251
- package/unbundled/definition59.cjs +209 -457
- package/unbundled/definition59.js +206 -454
- package/unbundled/definition6.cjs +179 -17
- package/unbundled/definition6.js +170 -14
- package/unbundled/definition60.cjs +441 -3722
- package/unbundled/definition60.js +435 -3553
- package/unbundled/definition61.cjs +3713 -761
- package/unbundled/definition61.js +3540 -751
- package/unbundled/definition62.cjs +761 -95
- package/unbundled/definition62.js +758 -92
- package/unbundled/definition63.cjs +106 -1055
- package/unbundled/definition63.js +98 -1047
- package/unbundled/definition64.cjs +991 -103
- package/unbundled/definition64.js +986 -101
- package/unbundled/definition65.cjs +111 -83
- package/unbundled/definition65.js +106 -77
- package/unbundled/definition66.cjs +71 -179
- package/unbundled/definition66.js +62 -176
- package/unbundled/definition67.cjs +154 -120
- package/unbundled/definition67.js +151 -117
- package/unbundled/definition68.cjs +126 -52
- package/unbundled/definition68.js +122 -48
- package/unbundled/definition69.cjs +52 -94
- package/unbundled/definition69.js +50 -91
- package/unbundled/definition7.cjs +31 -177
- package/unbundled/definition7.js +24 -170
- package/unbundled/definition70.cjs +92 -22
- package/unbundled/definition70.js +87 -17
- package/unbundled/definition71.cjs +21 -93
- package/unbundled/definition71.js +15 -90
- package/unbundled/definition72.cjs +77 -309
- package/unbundled/definition72.js +72 -232
- package/unbundled/definition73.cjs +288 -335
- package/unbundled/definition73.js +217 -329
- package/unbundled/definition74.cjs +327 -29
- package/unbundled/definition74.js +318 -26
- package/unbundled/definition75.cjs +28 -129
- package/unbundled/definition75.js +23 -125
- package/unbundled/definition76.cjs +107 -271
- package/unbundled/definition76.js +103 -267
- package/unbundled/definition77.cjs +258 -27
- package/unbundled/definition77.js +249 -25
- package/unbundled/definition78.cjs +30 -155
- package/unbundled/definition78.js +28 -140
- package/unbundled/definition79.cjs +117 -183
- package/unbundled/definition79.js +108 -179
- package/unbundled/definition8.cjs +152 -36
- package/unbundled/definition8.js +148 -31
- package/unbundled/definition80.cjs +180 -492
- package/unbundled/definition80.js +175 -486
- package/unbundled/definition81.cjs +517 -0
- package/unbundled/definition81.js +497 -0
- 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/extractOptions.cjs +21 -0
- package/unbundled/extractOptions.js +16 -0
- 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 +29 -26
- package/unbundled/listbox.js +29 -26
- 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 +16 -19
- package/unbundled/vivid-element.js +16 -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/definition.cjs +1 -1
- package/video-player/definition.js +1 -1
- 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/vivid.api.json +194 -0
- 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
|
@@ -2,426 +2,129 @@ require("./chunk.cjs");
|
|
|
2
2
|
const require_vivid_element = require("./vivid-element.cjs");
|
|
3
3
|
const require_decorate = require("./decorate.cjs");
|
|
4
4
|
const require_definition = require("./definition6.cjs");
|
|
5
|
-
const require_definition$1 = require("./
|
|
6
|
-
const require_definition$2 = require("./
|
|
5
|
+
const require_definition$1 = require("./definition9.cjs");
|
|
6
|
+
const require_definition$2 = require("./definition22.cjs");
|
|
7
7
|
const require_definition$3 = require("./definition26.cjs");
|
|
8
|
-
const require_definition$4 = require("./
|
|
8
|
+
const require_definition$4 = require("./definition36.cjs");
|
|
9
9
|
const require_picker_field_template = require("./picker-field.template.cjs");
|
|
10
10
|
const require_calendar_picker_template = require("./calendar-picker.template.cjs");
|
|
11
|
+
const require_single_value_picker = require("./single-value-picker.cjs");
|
|
12
|
+
const require_single_date_picker = require("./single-date-picker.cjs");
|
|
11
13
|
let _microsoft_fast_element = require("@microsoft/fast-element");
|
|
12
|
-
//#region src/
|
|
13
|
-
var formatRange = (from, to) => {
|
|
14
|
-
return `${from} – ${to}`;
|
|
15
|
-
};
|
|
16
|
-
var formatPresentationDateRange = (dateRange, locale) => {
|
|
17
|
-
return formatRange(require_calendar_picker_template.formatPresentationDate(dateRange.start, locale), require_calendar_picker_template.formatPresentationDate(dateRange.end, locale));
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Parse a presentation date range, which combines two presentation dates with a dash.
|
|
21
|
-
* Will throw if the range can't be parsed
|
|
22
|
-
*/
|
|
23
|
-
var parsePresentationDateRange = (presentationDateRange, locale) => {
|
|
24
|
-
const fragments = presentationDateRange.trim().split(/[\s—–-]+/);
|
|
25
|
-
if (fragments.length !== 2) throw new Error(`Invalid date range: ${presentationDateRange}`);
|
|
26
|
-
const [start, end] = fragments.map((fragment) => require_calendar_picker_template.parsePresentationDate(fragment, locale));
|
|
27
|
-
return {
|
|
28
|
-
start,
|
|
29
|
-
end
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/lib/date-range-picker/date-range-picker.ts
|
|
34
|
-
var isFormAssociatedTryingToSetFormValue = (value) => typeof value === "string";
|
|
35
|
-
function isDefined(value) {
|
|
36
|
-
return !!value;
|
|
37
|
-
}
|
|
14
|
+
//#region src/lib/date-picker/date-picker.ts
|
|
38
15
|
/**
|
|
16
|
+
* Single date picker component.
|
|
17
|
+
*
|
|
39
18
|
* @public
|
|
40
|
-
* @component date-
|
|
41
|
-
* @slot helper-text - Describes how to use the date-
|
|
42
|
-
* @event {CustomEvent<undefined>} input
|
|
43
|
-
* @event {CustomEvent<undefined>}
|
|
44
|
-
* @
|
|
45
|
-
* @
|
|
46
|
-
* @vueModel start start input:start `event.currentTarget.start`
|
|
47
|
-
* @vueModel end end input:end `event.currentTarget.end`
|
|
48
|
-
* @testAction selectDateRange selectDateRange
|
|
49
|
-
* @testQuery range range
|
|
19
|
+
* @component date-picker
|
|
20
|
+
* @slot helper-text - Describes how to use the date-picker. Alternative to the `helper-text` attribute.
|
|
21
|
+
* @event {CustomEvent<undefined>} input - Emitted when the date is changed by the user.
|
|
22
|
+
* @event {CustomEvent<undefined>} change - Emitted when the date is changed by the user.
|
|
23
|
+
* @vueModel modelValue value input,@lazy:change `event.currentTarget.value`
|
|
24
|
+
* @testAction selectDate selectDate
|
|
50
25
|
*/
|
|
51
|
-
var
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
this.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
this.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
*/
|
|
79
|
-
initialEndChanged() {
|
|
80
|
-
if (!this.dirtyValue) {
|
|
81
|
-
this.end = this.initialEnd;
|
|
82
|
-
this.dirtyValue = false;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
#isInternalValueUpdate;
|
|
86
|
-
/**
|
|
87
|
-
* @internal
|
|
88
|
-
*/
|
|
89
|
-
startChanged() {
|
|
90
|
-
if (this.start && !require_calendar_picker_template.isValidDateStr(this.start)) {
|
|
91
|
-
this.start = "";
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
this.currentStart = this.start;
|
|
95
|
-
this.dirtyValue = true;
|
|
96
|
-
if (!this.#isInternalValueUpdate) this.#handleChangedValues();
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* @internal
|
|
100
|
-
*/
|
|
101
|
-
endChanged() {
|
|
102
|
-
if (this.end && !require_calendar_picker_template.isValidDateStr(this.end)) {
|
|
103
|
-
this.end = "";
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
this.currentEnd = this.end;
|
|
107
|
-
this.dirtyValue = true;
|
|
108
|
-
if (!this.#isInternalValueUpdate) this.#handleChangedValues();
|
|
109
|
-
}
|
|
110
|
-
/**
|
|
111
|
-
* @internal
|
|
112
|
-
*/
|
|
113
|
-
currentStartChanged() {
|
|
114
|
-
this.start = this.currentStart;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* @internal
|
|
118
|
-
*/
|
|
119
|
-
currentEndChanged() {
|
|
120
|
-
this.end = this.currentEnd;
|
|
121
|
-
}
|
|
122
|
-
#updateValues(range) {
|
|
123
|
-
this.#isInternalValueUpdate = true;
|
|
124
|
-
if (range.start !== void 0) {
|
|
125
|
-
this.start = range.start;
|
|
126
|
-
this.$emit("input:start");
|
|
127
|
-
}
|
|
128
|
-
if (range.end !== void 0) {
|
|
129
|
-
this.end = range.end;
|
|
130
|
-
this.$emit("input:end");
|
|
131
|
-
}
|
|
132
|
-
this.#isInternalValueUpdate = false;
|
|
133
|
-
this.$emit("input");
|
|
134
|
-
this.$emit("change");
|
|
135
|
-
this.#handleChangedValues();
|
|
136
|
-
}
|
|
137
|
-
#handleChangedValues() {
|
|
138
|
-
if (this.start && this.end) {
|
|
139
|
-
if (require_calendar_picker_template.compareDateStr(this.start, this.end) > 0) {
|
|
140
|
-
this.#updateValues({
|
|
141
|
-
start: this.end,
|
|
142
|
-
end: this.start
|
|
143
|
-
});
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
this.value = formatRange(this.start, this.end);
|
|
147
|
-
} else this.value = "";
|
|
148
|
-
this._updatePresentationValue();
|
|
149
|
-
const dateToEnsureVisibilityOf = this.start || this.end;
|
|
150
|
-
if (dateToEnsureVisibilityOf) this._adjustSelectedMonthToEnsureVisibilityOf(dateToEnsureVisibilityOf);
|
|
151
|
-
this.#updateFormValue();
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* @internal
|
|
155
|
-
*/
|
|
156
|
-
_updatePresentationValue() {
|
|
157
|
-
if (this.start && this.end) this._presentationValue = formatPresentationDateRange({
|
|
158
|
-
start: this.start,
|
|
159
|
-
end: this.end
|
|
160
|
-
}, this.locale.calendarPicker);
|
|
161
|
-
else this._presentationValue = "";
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* @internal
|
|
165
|
-
*/
|
|
166
|
-
nameChanged(previous, next) {
|
|
167
|
-
super.nameChanged(previous, next);
|
|
168
|
-
this.#updateFormValue();
|
|
169
|
-
}
|
|
170
|
-
#updateFormValue() {
|
|
171
|
-
if (!this.name || !this.start || !this.end) this.setFormValue(null);
|
|
172
|
-
else {
|
|
173
|
-
const formData = new FormData();
|
|
174
|
-
formData.append(this.name, this.start);
|
|
175
|
-
formData.append(this.name, this.end);
|
|
176
|
-
this.setFormValue(formData);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* @internal
|
|
181
|
-
*/
|
|
182
|
-
connectedCallback() {
|
|
183
|
-
super.connectedCallback();
|
|
184
|
-
/* v8 ignore else -- @preserve */
|
|
185
|
-
if (!this.start) this.start = this.initialStart;
|
|
186
|
-
/* v8 ignore else -- @preserve */
|
|
187
|
-
if (!this.end) this.end = this.initialEnd;
|
|
188
|
-
}
|
|
189
|
-
#getVisibleRange() {
|
|
190
|
-
const candidates = [this.start, this.end].filter(isDefined);
|
|
191
|
-
const isPartialRange = candidates.length === 1;
|
|
192
|
-
if (this._hoverDate && isPartialRange) candidates.push(this._hoverDate);
|
|
193
|
-
const [start, end] = candidates.sort(require_calendar_picker_template.compareDateStr);
|
|
194
|
-
return {
|
|
195
|
-
start,
|
|
196
|
-
end
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* @internal
|
|
201
|
-
*/
|
|
202
|
-
_isDateAriaSelected(date) {
|
|
203
|
-
return this._isDateInSelectedRange(date);
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* @internal
|
|
207
|
-
*/
|
|
208
|
-
_isDateInSelectedRange(date) {
|
|
209
|
-
const { start, end } = this.#getVisibleRange();
|
|
210
|
-
if (start && end) return require_calendar_picker_template.compareDateStr(date, start) >= 0 && require_calendar_picker_template.compareDateStr(date, end) <= 0;
|
|
211
|
-
return false;
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* @internal
|
|
215
|
-
*/
|
|
216
|
-
_isDateRangeStart(date) {
|
|
217
|
-
return date === this.#getVisibleRange().start;
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* @internal
|
|
221
|
-
*/
|
|
222
|
-
_isDateRangeEnd(date) {
|
|
223
|
-
return date === this.#getVisibleRange().end;
|
|
224
|
-
}
|
|
225
|
-
/**
|
|
226
|
-
* @internal
|
|
227
|
-
*/
|
|
228
|
-
_getSelectedDates() {
|
|
229
|
-
const dates = [];
|
|
230
|
-
if (this.start) dates.push(this.start);
|
|
231
|
-
if (this.end) dates.push(this.end);
|
|
232
|
-
return dates;
|
|
26
|
+
var DatePicker = class extends require_single_date_picker.SingleDatePickerMixin(require_single_value_picker.SingleValuePicker(require_calendar_picker_template.MinMaxCalendarPicker(require_calendar_picker_template.CalendarPicker(require_picker_field_template.PickerField)))) {
|
|
27
|
+
/** @internal */
|
|
28
|
+
_toPresentationValue(value) {
|
|
29
|
+
return require_calendar_picker_template.formatPresentationDate(value, this.locale.calendarPicker);
|
|
30
|
+
}
|
|
31
|
+
/** @internal */
|
|
32
|
+
_parsePresentationValue(presentationValue) {
|
|
33
|
+
return require_calendar_picker_template.parsePresentationDate(presentationValue, this.locale.calendarPicker);
|
|
34
|
+
}
|
|
35
|
+
/** @internal */
|
|
36
|
+
_dateValue() {
|
|
37
|
+
return this.value;
|
|
38
|
+
}
|
|
39
|
+
/** @internal */
|
|
40
|
+
_withUpdatedDate(dateStr) {
|
|
41
|
+
return dateStr;
|
|
42
|
+
}
|
|
43
|
+
constructor() {
|
|
44
|
+
super();
|
|
45
|
+
this._isValidValue = require_calendar_picker_template.isValidDateStr;
|
|
46
|
+
this._textFieldSize = "20";
|
|
47
|
+
this.proxy.type = "date";
|
|
48
|
+
}
|
|
49
|
+
/** @internal */
|
|
50
|
+
get _pickerButtonLabel() {
|
|
51
|
+
if (this.value) return this.locale.calendarPicker.changeDateLabel(this._toPresentationValue(this.value));
|
|
52
|
+
else return this.locale.calendarPicker.chooseDateLabel;
|
|
233
53
|
}
|
|
234
|
-
/**
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
_onDateClick(date) {
|
|
238
|
-
if (this.start && this.end) this.#updateValues({
|
|
239
|
-
start: date,
|
|
240
|
-
end: ""
|
|
241
|
-
});
|
|
242
|
-
else if (this.start) {
|
|
243
|
-
this.#updateValues({ end: date });
|
|
244
|
-
this._closePopup();
|
|
245
|
-
} else if (this.end) {
|
|
246
|
-
this.#updateValues({ start: date });
|
|
247
|
-
this._closePopup();
|
|
248
|
-
} else this.#updateValues({ start: date });
|
|
54
|
+
/** @internal */
|
|
55
|
+
get _dialogLabel() {
|
|
56
|
+
return this.locale.calendarPicker.chooseDateLabel;
|
|
249
57
|
}
|
|
250
|
-
/**
|
|
251
|
-
* @internal
|
|
252
|
-
*/
|
|
58
|
+
/** @internal */
|
|
253
59
|
get _textFieldPlaceholder() {
|
|
254
|
-
return
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* @internal
|
|
258
|
-
*/
|
|
259
|
-
_onTextFieldChange() {
|
|
260
|
-
if (this._presentationValue === "") {
|
|
261
|
-
this.#updateValues({
|
|
262
|
-
start: "",
|
|
263
|
-
end: ""
|
|
264
|
-
});
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
try {
|
|
268
|
-
const { start, end } = parsePresentationDateRange(this._presentationValue, this.locale.calendarPicker);
|
|
269
|
-
this.#updateValues({
|
|
270
|
-
start,
|
|
271
|
-
end
|
|
272
|
-
});
|
|
273
|
-
} catch (_) {
|
|
274
|
-
const invalidPresentationValue = this._presentationValue;
|
|
275
|
-
this.#updateValues({
|
|
276
|
-
start: "",
|
|
277
|
-
end: ""
|
|
278
|
-
});
|
|
279
|
-
this._presentationValue = invalidPresentationValue;
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
60
|
+
return this.locale.calendarPicker.dateFormatPlaceholder;
|
|
282
61
|
}
|
|
283
62
|
/**
|
|
63
|
+
* Handle selecting a date from the calendar.
|
|
284
64
|
* @internal
|
|
285
65
|
*/
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
/**
|
|
290
|
-
* @internal
|
|
291
|
-
*/
|
|
292
|
-
_onDateMouseLeave() {
|
|
293
|
-
this._hoverDate = void 0;
|
|
66
|
+
_onDateClick(date) {
|
|
67
|
+
super._onDateClick(date);
|
|
68
|
+
this._closePopup();
|
|
294
69
|
}
|
|
295
|
-
/**
|
|
296
|
-
* @internal
|
|
297
|
-
*/
|
|
70
|
+
/** @internal */
|
|
298
71
|
_getCustomValidationError() {
|
|
299
|
-
if (this._isPresentationValueInvalid()) return this.locale.calendarPicker.
|
|
300
|
-
if (this.min && this.start && require_calendar_picker_template.compareDateStr(this.start, this.min) < 0) return this.locale.calendarPicker.startDateAfterMinDateError(require_calendar_picker_template.formatPresentationDate(this.min, this.locale.calendarPicker));
|
|
301
|
-
if (this.max && this.end && require_calendar_picker_template.compareDateStr(this.end, this.max) > 0) return this.locale.calendarPicker.endDateBeforeMaxDateError(require_calendar_picker_template.formatPresentationDate(this.max, this.locale.calendarPicker));
|
|
72
|
+
if (this._isPresentationValueInvalid()) return this.locale.calendarPicker.invalidDateError;
|
|
302
73
|
return null;
|
|
303
74
|
}
|
|
304
|
-
/**
|
|
305
|
-
* @internal
|
|
306
|
-
*/
|
|
307
|
-
_isPresentationValueInvalid() {
|
|
308
|
-
if (this._presentationValue === "") return false;
|
|
309
|
-
try {
|
|
310
|
-
parsePresentationDateRange(this._presentationValue, this.locale.calendarPicker);
|
|
311
|
-
return false;
|
|
312
|
-
} catch (_) {
|
|
313
|
-
return true;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* @internal
|
|
318
|
-
*/
|
|
319
|
-
_onClearClick() {
|
|
320
|
-
this.#updateValues({
|
|
321
|
-
start: "",
|
|
322
|
-
end: ""
|
|
323
|
-
});
|
|
324
|
-
super._onClearClick();
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* @internal
|
|
328
|
-
*/
|
|
329
|
-
formResetCallback() {
|
|
330
|
-
this.#updateValues({
|
|
331
|
-
start: this.initialStart,
|
|
332
|
-
end: this.initialEnd
|
|
333
|
-
});
|
|
334
|
-
super.formResetCallback();
|
|
335
|
-
}
|
|
336
|
-
/**
|
|
337
|
-
* @internal
|
|
338
|
-
*/
|
|
339
|
-
get _pickerButtonLabel() {
|
|
340
|
-
if (this.start && this.end) return this.locale.calendarPicker.changeDatesLabel(formatPresentationDateRange({
|
|
341
|
-
start: this.start,
|
|
342
|
-
end: this.end
|
|
343
|
-
}, this.locale.calendarPicker));
|
|
344
|
-
else return this.locale.calendarPicker.chooseDatesLabel;
|
|
345
|
-
}
|
|
346
|
-
/**
|
|
347
|
-
* @internal
|
|
348
|
-
*/
|
|
349
|
-
get _dialogLabel() {
|
|
350
|
-
return this.locale.calendarPicker.chooseDatesLabel;
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* @internal
|
|
354
|
-
*/
|
|
75
|
+
/** @internal */
|
|
355
76
|
_focusableElsWithinDialog() {
|
|
356
77
|
return this._dialogEl.querySelectorAll("button, .vwc-button");
|
|
357
78
|
}
|
|
358
|
-
/**
|
|
359
|
-
* @internal
|
|
360
|
-
*/
|
|
79
|
+
/** @internal */
|
|
361
80
|
get _pickerButtonIcon() {
|
|
362
81
|
return "calendar-line";
|
|
363
82
|
}
|
|
364
83
|
};
|
|
365
|
-
require_decorate.__decorate([
|
|
366
|
-
mode: "fromView",
|
|
367
|
-
attribute: "start"
|
|
368
|
-
})], DateRangePicker.prototype, "initialStart", void 0);
|
|
369
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({
|
|
370
|
-
mode: "fromView",
|
|
371
|
-
attribute: "end"
|
|
372
|
-
})], DateRangePicker.prototype, "initialEnd", void 0);
|
|
373
|
-
require_decorate.__decorate([_microsoft_fast_element.observable], DateRangePicker.prototype, "start", void 0);
|
|
374
|
-
require_decorate.__decorate([_microsoft_fast_element.observable], DateRangePicker.prototype, "end", void 0);
|
|
375
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "current-start" })], DateRangePicker.prototype, "currentStart", void 0);
|
|
376
|
-
require_decorate.__decorate([(0, _microsoft_fast_element.attr)({ attribute: "current-end" })], DateRangePicker.prototype, "currentEnd", void 0);
|
|
377
|
-
require_decorate.__decorate([_microsoft_fast_element.observable], DateRangePicker.prototype, "_numCalendars", void 0);
|
|
378
|
-
require_decorate.__decorate([_microsoft_fast_element.observable], DateRangePicker.prototype, "_hoverDate", void 0);
|
|
379
|
-
require_decorate.__decorate([_microsoft_fast_element.volatile], DateRangePicker.prototype, "_pickerButtonLabel", null);
|
|
84
|
+
require_decorate.__decorate([_microsoft_fast_element.volatile], DatePicker.prototype, "_pickerButtonLabel", null);
|
|
380
85
|
//#endregion
|
|
381
|
-
//#region src/lib/date-
|
|
382
|
-
var
|
|
86
|
+
//#region src/lib/date-picker/date-picker.template.ts
|
|
87
|
+
var DatePickerTemplate = (context) => {
|
|
383
88
|
return require_picker_field_template.PickerFieldTemplate(context, require_calendar_picker_template.CalendarPickerTemplate(context), {
|
|
384
89
|
withSeparator: false,
|
|
385
90
|
padded: true
|
|
386
91
|
});
|
|
387
92
|
};
|
|
388
93
|
//#endregion
|
|
389
|
-
//#region src/lib/date-
|
|
390
|
-
/**
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
require_definition$1.buttonDefinition,
|
|
395
|
-
require_definition$2.popupDefinition,
|
|
94
|
+
//#region src/lib/date-picker/definition.ts
|
|
95
|
+
/** @internal */
|
|
96
|
+
var datePickerDefinition = require_vivid_element.defineVividComponent("date-picker", DatePicker, DatePickerTemplate, [
|
|
97
|
+
require_definition.buttonDefinition,
|
|
98
|
+
require_definition$1.popupDefinition,
|
|
396
99
|
require_definition$3.textFieldDefinition,
|
|
397
100
|
require_definition$4.dividerDefinition,
|
|
398
|
-
require_definition.visuallyHiddenDefinition
|
|
101
|
+
require_definition$2.visuallyHiddenDefinition
|
|
399
102
|
], {
|
|
400
103
|
styles: [require_picker_field_template.picker_field_default, require_calendar_picker_template.calendar_picker_default],
|
|
401
104
|
shadowOptions: { delegatesFocus: true }
|
|
402
105
|
});
|
|
403
106
|
/**
|
|
404
|
-
* Registers the date-
|
|
107
|
+
* Registers the date-picker element with the design system.
|
|
405
108
|
*
|
|
406
109
|
* @param prefix - the prefix to use for the component name
|
|
407
110
|
*/
|
|
408
|
-
var
|
|
111
|
+
var registerDatePicker = require_vivid_element.createRegisterFunction(datePickerDefinition);
|
|
409
112
|
//#endregion
|
|
410
|
-
Object.defineProperty(exports, "
|
|
113
|
+
Object.defineProperty(exports, "DatePicker", {
|
|
411
114
|
enumerable: true,
|
|
412
115
|
get: function() {
|
|
413
|
-
return
|
|
116
|
+
return DatePicker;
|
|
414
117
|
}
|
|
415
118
|
});
|
|
416
|
-
Object.defineProperty(exports, "
|
|
119
|
+
Object.defineProperty(exports, "datePickerDefinition", {
|
|
417
120
|
enumerable: true,
|
|
418
121
|
get: function() {
|
|
419
|
-
return
|
|
122
|
+
return datePickerDefinition;
|
|
420
123
|
}
|
|
421
124
|
});
|
|
422
|
-
Object.defineProperty(exports, "
|
|
125
|
+
Object.defineProperty(exports, "registerDatePicker", {
|
|
423
126
|
enumerable: true,
|
|
424
127
|
get: function() {
|
|
425
|
-
return
|
|
128
|
+
return registerDatePicker;
|
|
426
129
|
}
|
|
427
130
|
});
|