@dialpad/dialtone-vue 4.10.0 → 4.11.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/dist/{Combobox-DP8tbe6x.js → Combobox-8vN7Njqe.js} +5 -5
- package/dist/{Combobox-DP8tbe6x.js.map → Combobox-8vN7Njqe.js.map} +1 -1
- package/dist/Combobox-CmASo310.cjs +3 -0
- package/dist/{Combobox-DdBIRmeH.cjs.map → Combobox-CmASo310.cjs.map} +1 -1
- package/dist/{Datepicker-CNFVUyyK.js → Datepicker-BeNUNF5U.js} +39 -39
- package/dist/{Datepicker-CNFVUyyK.js.map → Datepicker-BeNUNF5U.js.map} +1 -1
- package/dist/Datepicker-C-aExL3M.cjs +2 -0
- package/dist/{Datepicker-Df6uR0r_.cjs.map → Datepicker-C-aExL3M.cjs.map} +1 -1
- package/dist/{EmojiPicker-B7AKJlAM.js → EmojiPicker-Bondna8R.js} +2 -2
- package/dist/{EmojiPicker-B7AKJlAM.js.map → EmojiPicker-Bondna8R.js.map} +1 -1
- package/dist/EmojiPicker-DDtsv-Ix.cjs +2 -0
- package/dist/{EmojiPicker-KbIfc-GH.cjs.map → EmojiPicker-DDtsv-Ix.cjs.map} +1 -1
- package/dist/{FilterPill-BR7FAmMG.js → FilterPill-BUAdXhR-.js} +5 -5
- package/dist/{FilterPill-BR7FAmMG.js.map → FilterPill-BUAdXhR-.js.map} +1 -1
- package/dist/FilterPill-CgM4bCLl.cjs +2 -0
- package/dist/{FilterPill-DwapR9JK.cjs.map → FilterPill-CgM4bCLl.cjs.map} +1 -1
- package/dist/{ForceLinkify-D4FBhBxD.cjs → ForceLinkify-5mUtF-wp.cjs} +2 -2
- package/dist/{ForceLinkify-D4FBhBxD.cjs.map → ForceLinkify-5mUtF-wp.cjs.map} +1 -1
- package/dist/{ForceLinkify-wTXS_wJS.js → ForceLinkify-W4glPHzT.js} +1 -1
- package/dist/{ForceLinkify-wTXS_wJS.js.map → ForceLinkify-W4glPHzT.js.map} +1 -1
- package/dist/{MarkdownRenderer-CaBjENW6.cjs → MarkdownRenderer-DHZjuYwF.cjs} +2 -2
- package/dist/{MarkdownRenderer-CaBjENW6.cjs.map → MarkdownRenderer-DHZjuYwF.cjs.map} +1 -1
- package/dist/{MarkdownRenderer-3CVbodrq.js → MarkdownRenderer-uO19k9XV.js} +1 -1
- package/dist/{MarkdownRenderer-3CVbodrq.js.map → MarkdownRenderer-uO19k9XV.js.map} +1 -1
- package/dist/{Presence-DLM3JR-n.cjs → Presence-CgrPxxCh.cjs} +2 -2
- package/dist/{Presence-DLM3JR-n.cjs.map → Presence-CgrPxxCh.cjs.map} +1 -1
- package/dist/{Presence-CGgyodnC.js → Presence-Cvkwr3-o.js} +2 -2
- package/dist/{Presence-CGgyodnC.js.map → Presence-Cvkwr3-o.js.map} +1 -1
- package/dist/ProgressBar-B3sKagEm.cjs +2 -0
- package/dist/ProgressBar-B3sKagEm.cjs.map +1 -0
- package/dist/ProgressBar-BR6u1SYw.js +77 -0
- package/dist/ProgressBar-BR6u1SYw.js.map +1 -0
- package/dist/{Resizable-BQsHIvDC.cjs → Resizable-DNRQ89ei.cjs} +2 -2
- package/dist/{Resizable-BQsHIvDC.cjs.map → Resizable-DNRQ89ei.cjs.map} +1 -1
- package/dist/{Resizable-F6PU5oKB.js → Resizable-ZMxRRIiG.js} +3 -3
- package/dist/{Resizable-F6PU5oKB.js.map → Resizable-ZMxRRIiG.js.map} +1 -1
- package/dist/{ResizableHandle-VBoudEYy.cjs → ResizableHandle-Dj5cqVLM.cjs} +2 -2
- package/dist/{ResizableHandle-VBoudEYy.cjs.map → ResizableHandle-Dj5cqVLM.cjs.map} +1 -1
- package/dist/{ResizableHandle-CqIIQvza.js → ResizableHandle-Py6b-ZRJ.js} +3 -3
- package/dist/{ResizableHandle-CqIIQvza.js.map → ResizableHandle-Py6b-ZRJ.js.map} +1 -1
- package/dist/{ResizableUtils-CZdVSd6q.cjs → ResizableUtils-CXU7o9pL.cjs} +1 -1
- package/dist/{ResizableUtils-CZdVSd6q.cjs.map → ResizableUtils-CXU7o9pL.cjs.map} +1 -1
- package/dist/{ResizableUtils-CrBOa8js.js → ResizableUtils-D8f1CrnP.js} +1 -1
- package/dist/{ResizableUtils-CrBOa8js.js.map → ResizableUtils-D8f1CrnP.js.map} +1 -1
- package/dist/RichTextEditor-D5n9tM7A.cjs +11 -0
- package/dist/{RichTextEditor-ECmStZDK.cjs.map → RichTextEditor-D5n9tM7A.cjs.map} +1 -1
- package/dist/{RichTextEditor-DLiJCPI6.js → RichTextEditor-Dit5pXhR.js} +318 -318
- package/dist/{RichTextEditor-DLiJCPI6.js.map → RichTextEditor-Dit5pXhR.js.map} +1 -1
- package/dist/Scroller-B1jRO70r.cjs +2 -0
- package/dist/{Scroller-EIHN3a26.cjs.map → Scroller-B1jRO70r.cjs.map} +1 -1
- package/dist/{Scroller-D6f0HvIT.js → Scroller-sUpsRoYR.js} +3 -3
- package/dist/{Scroller-D6f0HvIT.js.map → Scroller-sUpsRoYR.js.map} +1 -1
- package/dist/{Slider-Bg9KspmL.js → Slider-DCHze-Pg.js} +7 -7
- package/dist/{Slider-Bg9KspmL.js.map → Slider-DCHze-Pg.js.map} +1 -1
- package/dist/Slider-DJNR095B.cjs +2 -0
- package/dist/{Slider-BDgY7gNR.cjs.map → Slider-DJNR095B.cjs.map} +1 -1
- package/dist/{Text-5MobHF6z.js → Text-B6HaId2l.js} +4 -4
- package/dist/Text-B6HaId2l.js.map +1 -0
- package/dist/Text-BosPFEHO.cjs +2 -0
- package/dist/Text-BosPFEHO.cjs.map +1 -0
- package/dist/{TextList-DIj84CPZ.js → TextList-BsE0G1zC.js} +1 -1
- package/dist/{TextList-DIj84CPZ.js.map → TextList-BsE0G1zC.js.map} +1 -1
- package/dist/{TextList-1_ZM5zE3.cjs → TextList-DvuP7qmJ.cjs} +2 -2
- package/dist/{TextList-1_ZM5zE3.cjs.map → TextList-DvuP7qmJ.cjs.map} +1 -1
- package/dist/{TextListItem-BhmijfFO.js → TextListItem-Cm_gTXMN.js} +2 -2
- package/dist/{TextListItem-BhmijfFO.js.map → TextListItem-Cm_gTXMN.js.map} +1 -1
- package/dist/TextListItem-Dd7Ht3T9.cjs +2 -0
- package/dist/{TextListItem-CVjrHr2_.cjs.map → TextListItem-Dd7Ht3T9.cjs.map} +1 -1
- package/dist/Toast-B2Pf0Xwa.cjs +2 -0
- package/dist/{Toast--W8p7jzA.cjs.map → Toast-B2Pf0Xwa.cjs.map} +1 -1
- package/dist/{Toast-4nsu1oxP.js → Toast-DtUEXL_6.js} +3 -3
- package/dist/{Toast-4nsu1oxP.js.map → Toast-DtUEXL_6.js.map} +1 -1
- package/dist/{UseResizableCalculations-B-yTU9ZI.js → UseResizableCalculations-BG_DFstC.js} +2 -2
- package/dist/{UseResizableCalculations-B-yTU9ZI.js.map → UseResizableCalculations-BG_DFstC.js.map} +1 -1
- package/dist/{UseResizableCalculations-CahDXDOn.cjs → UseResizableCalculations-D4xVxWje.cjs} +2 -2
- package/dist/{UseResizableCalculations-CahDXDOn.cjs.map → UseResizableCalculations-D4xVxWje.cjs.map} +1 -1
- package/dist/chunk-BK-Lzi7j.cjs +1 -0
- package/dist/common/composables/use-accessible-name-warning.cjs +2 -0
- package/dist/common/composables/use-accessible-name-warning.cjs.map +1 -0
- package/dist/common/composables/use-accessible-name-warning.js +11 -0
- package/dist/common/composables/use-accessible-name-warning.js.map +1 -0
- package/dist/common/composables/use-indicator-animation.cjs +1 -1
- package/dist/common/composables/use-indicator-animation.cjs.map +1 -1
- package/dist/common/composables/use-indicator-animation.js +14 -14
- package/dist/common/composables/use-indicator-animation.js.map +1 -1
- package/dist/common/composables/useAccessibleNameWarning.d.ts +2 -0
- package/dist/common/composables/useAccessibleNameWarning.d.ts.map +1 -0
- package/dist/common/composables/useIndicatorAnimation.d.ts +2 -1
- package/dist/common/composables/useIndicatorAnimation.d.ts.map +1 -1
- package/dist/common/dates/index.cjs +1 -1
- package/dist/common/dates/index.cjs.map +1 -1
- package/dist/common/dates/index.d.ts +1 -1
- package/dist/common/dates/index.d.ts.map +1 -1
- package/dist/common/dates/index.js +1 -1
- package/dist/common/dates/index.js.map +1 -1
- package/dist/common/emoji/index.cjs +1 -1
- package/dist/common/mixins/input-group.cjs +1 -1
- package/dist/common/mixins/input-group.cjs.map +1 -1
- package/dist/common/mixins/input-group.js +5 -5
- package/dist/common/mixins/input.cjs +1 -1
- package/dist/common/mixins/input.cjs.map +1 -1
- package/dist/common/mixins/input.js +1 -1
- package/dist/common/mixins/keyboard-list-navigation.cjs +1 -1
- package/dist/common/mixins/keyboard-list-navigation.cjs.map +1 -1
- package/dist/common/mixins/keyboard-list-navigation.js +1 -1
- package/dist/common/mixins/modal.cjs +1 -1
- package/dist/common/mixins/modal.cjs.map +1 -1
- package/dist/common/mixins/modal.d.ts +1 -1
- package/dist/common/mixins/modal.d.ts.map +1 -1
- package/dist/common/mixins/modal.js +1 -1
- package/dist/common/mixins/modal.js.map +1 -1
- package/dist/common/mixins/mode.cjs +1 -1
- package/dist/common/mixins/mode.js +1 -1
- package/dist/common/owned_classes.d.ts +4 -0
- package/dist/common/owned_classes.d.ts.map +1 -0
- package/dist/common/phone/index.cjs +1 -1
- package/dist/common/sr_only_close_button.vue.d.ts +6 -5
- package/dist/common/sr_only_close_button.vue.d.ts.map +1 -1
- package/dist/common/utils/index.cjs +1 -2
- package/dist/common/utils/index.d.ts +2 -2
- package/dist/common/utils/index.d.ts.map +1 -1
- package/dist/common/utils/index.js +2 -150
- package/dist/component-documentation.json +1 -1
- package/dist/components/Avatar/Avatar.vue.d.ts +4 -4
- package/dist/components/Banner/Banner.vue.d.ts +12 -16
- package/dist/components/Banner/Banner.vue.d.ts.map +1 -1
- package/dist/components/Box/Box.vue.d.ts +6 -10
- package/dist/components/Box/Box.vue.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.vue.d.ts +2 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.vue.d.ts.map +1 -1
- package/dist/components/Button/Button.vue.d.ts +4 -3
- package/dist/components/Button/Button.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.vue.d.ts +2 -6
- package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.vue.d.ts +2 -6
- package/dist/components/Chip/Chip.vue.d.ts +6 -5
- package/dist/components/Chip/Chip.vue.d.ts.map +1 -1
- package/dist/components/Collapsible/Collapsible.vue.d.ts +3 -3
- package/dist/components/Combobox/ComboboxLoadingList.vue.d.ts.map +1 -1
- package/dist/components/ComboboxWithPopover/ComboboxWithPopover.vue.d.ts +12 -11
- package/dist/components/ComboboxWithPopover/ComboboxWithPopover.vue.d.ts.map +1 -1
- package/dist/components/Datepicker/Datepicker.vue.d.ts +1 -66
- package/dist/components/Datepicker/Modules/Calendar.vue.d.ts +1 -1
- package/dist/components/Dropdown/Dropdown.vue.d.ts +12 -11
- package/dist/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.vue.d.ts +1 -904
- package/dist/components/EmojiPicker/EmojiPicker.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/Modules/EmojiDescription.vue.d.ts +1 -1
- package/dist/components/EmojiPicker/Modules/EmojiSearch.vue.d.ts +1 -810
- package/dist/components/EmojiPicker/Modules/EmojiSearch.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/Modules/EmojiSelector.vue.d.ts +1 -4
- package/dist/components/EmojiPicker/Modules/EmojiSelector.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/Modules/EmojiSkinSelector.vue.d.ts +1 -3
- package/dist/components/EmojiPicker/Modules/EmojiSkinSelector.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/Modules/EmojiTabset.vue.d.ts +1 -1
- package/dist/components/EmptyState/EmptyState.vue.d.ts +11 -3
- package/dist/components/EmptyState/EmptyState.vue.d.ts.map +1 -1
- package/dist/components/FilterPill/FilterPill.vue.d.ts +44 -52
- package/dist/components/FilterPill/FilterPill.vue.d.ts.map +1 -1
- package/dist/components/FilterPill/modules/FilterPillOptionGroup.vue.d.ts +7 -11
- package/dist/components/FilterPill/modules/FilterPillOptionGroup.vue.d.ts.map +1 -1
- package/dist/components/Hovercard/Hovercard.vue.d.ts +11 -3260
- package/dist/components/Hovercard/Hovercard.vue.d.ts.map +1 -1
- package/dist/components/ImageViewer/ImageViewer.vue.d.ts +11 -10
- package/dist/components/ImageViewer/ImageViewer.vue.d.ts.map +1 -1
- package/dist/components/Input/Input.vue.d.ts +2 -6
- package/dist/components/Input/Input.vue.d.ts.map +1 -1
- package/dist/components/InputGroup/InputGroup.vue.d.ts +2 -6
- package/dist/components/InputGroup/InputGroup.vue.d.ts.map +1 -1
- package/dist/components/KeyboardShortcut/KeyboardShortcut.vue.d.ts +2 -6
- package/dist/components/Loader/Loader.vue.d.ts +3 -2
- package/dist/components/Loader/Loader.vue.d.ts.map +1 -1
- package/dist/components/Modal/Modal.vue.d.ts +13 -16
- package/dist/components/Modal/Modal.vue.d.ts.map +1 -1
- package/dist/components/Notice/Notice.vue.d.ts +12 -16
- package/dist/components/Notice/Notice.vue.d.ts.map +1 -1
- package/dist/components/Notice/NoticeAction.vue.d.ts +11 -10
- package/dist/components/Notice/NoticeAction.vue.d.ts.map +1 -1
- package/dist/components/Notice/NoticeContent.vue.d.ts +2 -6
- package/dist/components/Notice/NoticeContent.vue.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.vue.d.ts +7 -6
- package/dist/components/Pagination/Pagination.vue.d.ts.map +1 -1
- package/dist/components/Popover/Popover.vue.d.ts +12 -11
- package/dist/components/Popover/Popover.vue.d.ts.map +1 -1
- package/dist/components/Popover/PopoverHeaderFooter.vue.d.ts +6 -5
- package/dist/components/Popover/PopoverHeaderFooter.vue.d.ts.map +1 -1
- package/dist/components/Presence/Presence.vue.d.ts +4 -4
- package/dist/components/Presence/modules/presence_active_icon.vue.d.ts +1 -1
- package/dist/components/Presence/modules/presence_active_icon.vue.d.ts.map +1 -1
- package/dist/components/Presence/modules/presence_away_icon.vue.d.ts +1 -1
- package/dist/components/Presence/modules/presence_away_icon.vue.d.ts.map +1 -1
- package/dist/components/Presence/modules/presence_busy_icon.vue.d.ts +1 -1
- package/dist/components/Presence/modules/presence_busy_icon.vue.d.ts.map +1 -1
- package/dist/components/Presence/modules/presence_dnd_icon.vue.d.ts +1 -1
- package/dist/components/Presence/modules/presence_dnd_icon.vue.d.ts.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.vue.d.ts +66 -0
- package/dist/components/ProgressBar/ProgressBar.vue.d.ts.map +1 -0
- package/dist/components/ProgressBar/ProgressBarConstants.d.ts +18 -0
- package/dist/components/ProgressBar/ProgressBarConstants.d.ts.map +1 -0
- package/dist/components/ProgressBar/index.d.ts +3 -0
- package/dist/components/ProgressBar/index.d.ts.map +1 -0
- package/dist/components/ProgressCircle/ProgressCircle.vue.d.ts +41 -9
- package/dist/components/Prose/Prose.vue.d.ts +5 -14
- package/dist/components/Prose/Prose.vue.d.ts.map +1 -1
- package/dist/components/Radio/Radio.vue.d.ts +2 -6
- package/dist/components/Radio/Radio.vue.d.ts.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.vue.d.ts +2 -6
- package/dist/components/Resizable/Resizable.vue.d.ts +16 -23
- package/dist/components/Resizable/Resizable.vue.d.ts.map +1 -1
- package/dist/components/Resizable/ResizableHandle.vue.d.ts +1 -3
- package/dist/components/Resizable/ResizablePanel.vue.d.ts +9 -14
- package/dist/components/Resizable/ResizablePanel.vue.d.ts.map +1 -1
- package/dist/components/RichTextEditor/Extensions/Channels/ChannelSuggestion.vue.d.ts.map +1 -1
- package/dist/components/RichTextEditor/Extensions/Mentions/MentionSuggestion.vue.d.ts +6 -10
- package/dist/components/RichTextEditor/Extensions/SlashCommand/SlashCommandSuggestion.vue.d.ts +2 -6
- package/dist/components/RichTextEditor/Extensions/Variable/VariableComponent.vue.d.ts +19 -21
- package/dist/components/RichTextEditor/Extensions/Variable/VariableComponent.vue.d.ts.map +1 -1
- package/dist/components/Scroller/Modules/CoreScroller.vue.d.ts +15 -27
- package/dist/components/Scroller/Modules/CoreScroller.vue.d.ts.map +1 -1
- package/dist/components/Scroller/Modules/DynamicScroller.vue.d.ts +18 -22
- package/dist/components/Scroller/Scroller.vue.d.ts +15 -772
- package/dist/components/Scroller/Scroller.vue.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts +5 -233
- package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControlItem.vue.d.ts +28 -17
- package/dist/components/SegmentedControl/SegmentedControlItem.vue.d.ts.map +1 -1
- package/dist/components/SelectMenu/SelectMenu.vue.d.ts +2 -6
- package/dist/components/SelectMenu/SelectMenu.vue.d.ts.map +1 -1
- package/dist/components/Slider/Slider.vue.d.ts +12 -23
- package/dist/components/Slider/Slider.vue.d.ts.map +1 -1
- package/dist/components/SplitButton/SplitButton.vue.d.ts +18 -17
- package/dist/components/SplitButton/SplitButton.vue.d.ts.map +1 -1
- package/dist/components/SplitButton/SplitButtonEnd.vue.d.ts +3 -3
- package/dist/components/SplitButton/SplitButtonStart.vue.d.ts +3 -3
- package/dist/components/Tab/Tab.vue.d.ts +21 -3
- package/dist/components/Tab/Tab.vue.d.ts.map +1 -1
- package/dist/components/Tab/TabGroup.vue.d.ts +3 -1
- package/dist/components/Tab/TabGroup.vue.d.ts.map +1 -1
- package/dist/components/Tab/TabPanel.vue.d.ts +1 -1
- package/dist/components/Tab/TabPanel.vue.d.ts.map +1 -1
- package/dist/components/Text/Text.vue.d.ts +2 -6
- package/dist/components/Text/modules/SlideViewport.vue.d.ts +6 -19
- package/dist/components/Text/modules/SlideViewport.vue.d.ts.map +1 -1
- package/dist/components/Text/modules/slide.d.ts.map +1 -1
- package/dist/components/TextList/TextList.vue.d.ts +6 -15
- package/dist/components/TextList/TextList.vue.d.ts.map +1 -1
- package/dist/components/TextList/TextListItem.vue.d.ts +8 -12
- package/dist/components/TextList/TextListItem.vue.d.ts.map +1 -1
- package/dist/components/Toast/Layouts/ToastLayoutAlternate.vue.d.ts +12 -16
- package/dist/components/Toast/Layouts/ToastLayoutAlternate.vue.d.ts.map +1 -1
- package/dist/components/Toast/Layouts/ToastLayoutDefault.vue.d.ts +12 -16
- package/dist/components/Toast/Layouts/ToastLayoutDefault.vue.d.ts.map +1 -1
- package/dist/components/Toast/Toast.vue.d.ts +48 -64
- package/dist/components/Toast/Toast.vue.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.vue.d.ts.map +1 -1
- package/dist/dialtone-vue.cjs +1 -1
- package/dist/dialtone-vue.js +51 -49
- package/dist/dist-3sDwkm0K.js +382 -0
- package/dist/dist-3sDwkm0K.js.map +1 -0
- package/dist/dist-DzjXnVZt.cjs +2 -0
- package/dist/dist-DzjXnVZt.cjs.map +1 -0
- package/dist/{floating-ui.dom-Cqf6X2Wc.js → floating-ui.dom-B8Mp8J0T.js} +1 -1
- package/dist/{floating-ui.dom-Cqf6X2Wc.js.map → floating-ui.dom-B8Mp8J0T.js.map} +1 -1
- package/dist/{floating-ui.dom-n1CheoWj.cjs → floating-ui.dom-C23Y4xMx.cjs} +1 -1
- package/dist/{floating-ui.dom-n1CheoWj.cjs.map → floating-ui.dom-C23Y4xMx.cjs.map} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/lib/avatar/avatar.cjs +1 -1
- package/dist/lib/avatar/avatar.cjs.map +1 -1
- package/dist/lib/avatar/avatar.js +7 -7
- package/dist/lib/avatar/index.d.ts +1 -0
- package/dist/lib/badge/badge.cjs +1 -1
- package/dist/lib/badge/badge.cjs.map +1 -1
- package/dist/lib/badge/badge.js +2 -2
- package/dist/lib/badge/index.d.ts +1 -0
- package/dist/lib/banner/banner.cjs +1 -1
- package/dist/lib/banner/banner.cjs.map +1 -1
- package/dist/lib/banner/banner.js +2 -2
- package/dist/lib/banner/index.d.ts +1 -0
- package/dist/lib/box/box.cjs +1 -1
- package/dist/lib/box/index.d.ts +1 -0
- package/dist/lib/breadcrumbs/breadcrumb-item.cjs +1 -1
- package/dist/lib/breadcrumbs/breadcrumb-item.cjs.map +1 -1
- package/dist/lib/breadcrumbs/breadcrumb-item.js +2 -2
- package/dist/lib/breadcrumbs/breadcrumbs.cjs +1 -1
- package/dist/lib/breadcrumbs/breadcrumbs.js +1 -1
- package/dist/lib/breadcrumbs/index.d.ts +1 -0
- package/dist/lib/button/button.cjs +1 -1
- package/dist/lib/button/button.cjs.map +1 -1
- package/dist/lib/button/button.js +6 -6
- package/dist/lib/button/button.js.map +1 -1
- package/dist/lib/button/index.d.ts +1 -0
- package/dist/lib/button-group/button-group.cjs +1 -1
- package/dist/lib/button-group/button-group.js +1 -1
- package/dist/lib/button-group/buttons-decorator.cjs +1 -1
- package/dist/lib/button-group/buttons-decorator.js +1 -1
- package/dist/lib/button-group/index.d.ts +1 -0
- package/dist/lib/card/card.cjs +1 -1
- package/dist/lib/card/card.cjs.map +1 -1
- package/dist/lib/card/card.js +2 -2
- package/dist/lib/card/index.d.ts +1 -0
- package/dist/lib/checkbox/checkbox.cjs +1 -1
- package/dist/lib/checkbox/checkbox.cjs.map +1 -1
- package/dist/lib/checkbox/checkbox.js +5 -5
- package/dist/lib/checkbox/index.d.ts +1 -0
- package/dist/lib/checkbox-group/checkboxes-decorator.cjs +1 -1
- package/dist/lib/checkbox-group/checkboxes-decorator.js +1 -1
- package/dist/lib/checkbox-group/index.d.ts +1 -0
- package/dist/lib/chip/chip.cjs +1 -1
- package/dist/lib/chip/chip.cjs.map +1 -1
- package/dist/lib/chip/chip.js +4 -4
- package/dist/lib/chip/index.d.ts +1 -0
- package/dist/lib/codeblock/codeblock.cjs +1 -1
- package/dist/lib/codeblock/codeblock.js +1 -1
- package/dist/lib/codeblock/index.d.ts +1 -0
- package/dist/lib/collapsible/collapsible-lazy-show.cjs +1 -1
- package/dist/lib/collapsible/collapsible-lazy-show.js +1 -1
- package/dist/lib/collapsible/collapsible.cjs +1 -1
- package/dist/lib/collapsible/collapsible.cjs.map +1 -1
- package/dist/lib/collapsible/collapsible.js +4 -4
- package/dist/lib/collapsible/index.d.ts +1 -0
- package/dist/lib/combobox/combobox-empty-list.cjs +1 -1
- package/dist/lib/combobox/combobox-empty-list.js +1 -1
- package/dist/lib/combobox/combobox-loading-list.cjs +1 -1
- package/dist/lib/combobox/combobox-loading-list.js +1 -1
- package/dist/lib/combobox/combobox.cjs +1 -1
- package/dist/lib/combobox/combobox.js +1 -1
- package/dist/lib/combobox/index.cjs +1 -1
- package/dist/lib/combobox/index.d.ts +1 -0
- package/dist/lib/combobox/index.js +1 -1
- package/dist/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
- package/dist/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
- package/dist/lib/combobox-multi-select/combobox-multi-select.js +8 -8
- package/dist/lib/combobox-multi-select/index.d.ts +1 -0
- package/dist/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
- package/dist/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
- package/dist/lib/combobox-with-popover/combobox-with-popover.js +7 -7
- package/dist/lib/combobox-with-popover/index.d.ts +1 -0
- package/dist/lib/datepicker/datepicker.cjs +1 -1
- package/dist/lib/datepicker/datepicker.js +1 -1
- package/dist/lib/datepicker/index.cjs +1 -1
- package/dist/lib/datepicker/index.d.ts +1 -0
- package/dist/lib/datepicker/index.js +1 -1
- package/dist/lib/datepicker/utils.cjs +1 -1
- package/dist/lib/description-list/description-list.cjs +1 -1
- package/dist/lib/description-list/description-list.js +1 -1
- package/dist/lib/description-list/index.d.ts +1 -0
- package/dist/lib/dropdown/dropdown-list.cjs +1 -1
- package/dist/lib/dropdown/dropdown-list.js +2 -2
- package/dist/lib/dropdown/dropdown-separator.cjs +1 -1
- package/dist/lib/dropdown/dropdown-separator.js +1 -1
- package/dist/lib/dropdown/dropdown.cjs +1 -1
- package/dist/lib/dropdown/dropdown.cjs.map +1 -1
- package/dist/lib/dropdown/dropdown.js +3 -3
- package/dist/lib/dropdown/dropdown.js.map +1 -1
- package/dist/lib/dropdown/index.d.ts +1 -0
- package/dist/lib/emoji/emoji.cjs +1 -1
- package/dist/lib/emoji/emoji.js +1 -1
- package/dist/lib/emoji/index.d.ts +1 -0
- package/dist/lib/emoji-picker/emoji-picker.cjs +1 -1
- package/dist/lib/emoji-picker/emoji-picker.js +1 -1
- package/dist/lib/emoji-picker/index.cjs +1 -1
- package/dist/lib/emoji-picker/index.d.ts +1 -0
- package/dist/lib/emoji-picker/index.js +1 -1
- package/dist/lib/emoji-text-wrapper/emoji-text-wrapper.cjs +1 -1
- package/dist/lib/emoji-text-wrapper/index.d.ts +1 -0
- package/dist/lib/empty-state/empty-state.cjs +1 -1
- package/dist/lib/empty-state/empty-state.cjs.map +1 -1
- package/dist/lib/empty-state/empty-state.js +2 -2
- package/dist/lib/empty-state/index.d.ts +1 -0
- package/dist/lib/filter-pill/filter-pill-controlled.cjs +1 -1
- package/dist/lib/filter-pill/filter-pill-controlled.cjs.map +1 -1
- package/dist/lib/filter-pill/filter-pill-controlled.js +1 -1
- package/dist/lib/filter-pill/filter-pill.cjs +1 -1
- package/dist/lib/filter-pill/filter-pill.js +1 -1
- package/dist/lib/filter-pill/index.cjs +1 -1
- package/dist/lib/filter-pill/index.d.ts +1 -0
- package/dist/lib/filter-pill/index.js +1 -1
- package/dist/lib/focusgroup-directive/index.d.ts +1 -0
- package/dist/lib/focustrap-directive/index.d.ts +1 -0
- package/dist/lib/hovercard/hovercard.cjs +1 -1
- package/dist/lib/hovercard/hovercard.cjs.map +1 -1
- package/dist/lib/hovercard/hovercard.js +2 -2
- package/dist/lib/hovercard/index.d.ts +1 -0
- package/dist/lib/icon/icon-constants.cjs +1 -1
- package/dist/lib/icon/icon.cjs +1 -1
- package/dist/lib/icon/icon.js +1 -1
- package/dist/lib/icon/index.d.ts +1 -0
- package/dist/lib/illustration/illustration-constants.cjs +1 -1
- package/dist/lib/illustration/illustration.cjs +1 -1
- package/dist/lib/illustration/index.d.ts +1 -0
- package/dist/lib/image-viewer/image-viewer.cjs +1 -1
- package/dist/lib/image-viewer/image-viewer.cjs.map +1 -1
- package/dist/lib/image-viewer/image-viewer.js +2 -2
- package/dist/lib/image-viewer/index.d.ts +1 -0
- package/dist/lib/input/index.d.ts +1 -0
- package/dist/lib/input/input.cjs +1 -1
- package/dist/lib/input/input.cjs.map +1 -1
- package/dist/lib/input/input.js +8 -8
- package/dist/lib/input-group/index.d.ts +1 -0
- package/dist/lib/input-group/input-group.cjs +1 -1
- package/dist/lib/input-group/input-group.cjs.map +1 -1
- package/dist/lib/input-group/input-group.js +5 -5
- package/dist/lib/item-layout/index.d.ts +1 -0
- package/dist/lib/item-layout/item-layout.cjs +2 -2
- package/dist/lib/item-layout/item-layout.cjs.map +1 -1
- package/dist/lib/item-layout/item-layout.js +2 -2
- package/dist/lib/keyboard-shortcut/index.d.ts +1 -0
- package/dist/lib/keyboard-shortcut/keyboard-shortcut.cjs +1 -1
- package/dist/lib/keyboard-shortcut/keyboard-shortcut.js +2 -2
- package/dist/lib/kitchen-sink/kitchen-sink-view.cjs +1 -1
- package/dist/lib/kitchen-sink/kitchen-sink-view.js +2 -2
- package/dist/lib/lazy-show/index.d.ts +1 -0
- package/dist/lib/lazy-show/lazy-show.cjs +1 -1
- package/dist/lib/lazy-show/lazy-show.js +1 -1
- package/dist/lib/link/index.d.ts +1 -0
- package/dist/lib/link/link.cjs +1 -1
- package/dist/lib/link/link.js +1 -1
- package/dist/lib/list-item/index.d.ts +1 -0
- package/dist/lib/list-item/list-item.cjs +1 -1
- package/dist/lib/list-item/list-item.cjs.map +1 -1
- package/dist/lib/list-item/list-item.js +2 -2
- package/dist/lib/list-item-group/index.d.ts +1 -0
- package/dist/lib/list-item-group/list-item-group.cjs +1 -1
- package/dist/lib/list-item-group/list-item-group.cjs.map +1 -1
- package/dist/lib/list-item-group/list-item-group.js +2 -2
- package/dist/lib/loader/index.d.ts +1 -0
- package/dist/lib/loader/loader.cjs +1 -1
- package/dist/lib/loader/loader.js +1 -1
- package/dist/lib/modal/index.d.ts +1 -0
- package/dist/lib/modal/modal.cjs +1 -1
- package/dist/lib/modal/modal.cjs.map +1 -1
- package/dist/lib/modal/modal.js +9 -9
- package/dist/lib/modal/modal.js.map +1 -1
- package/dist/lib/mode-directive/index.d.ts +1 -0
- package/dist/lib/mode-directive/mode.cjs +1 -1
- package/dist/lib/mode-directive/mode.js +1 -1
- package/dist/lib/mode-island/index.d.ts +1 -0
- package/dist/lib/mode-island/mode-island.cjs +1 -1
- package/dist/lib/mode-island/mode-island.js +1 -1
- package/dist/lib/motion-text/index.d.ts +1 -0
- package/dist/lib/motion-text/motion-text.cjs +1 -1
- package/dist/lib/motion-text/motion-text.js +1 -1
- package/dist/lib/notice/index.d.ts +1 -0
- package/dist/lib/notice/notice-action.cjs +1 -1
- package/dist/lib/notice/notice-action.js +1 -1
- package/dist/lib/notice/notice-content.cjs +1 -1
- package/dist/lib/notice/notice-content.cjs.map +1 -1
- package/dist/lib/notice/notice-content.js +3 -3
- package/dist/lib/notice/notice-icon.cjs +1 -1
- package/dist/lib/notice/notice-icon.cjs.map +1 -1
- package/dist/lib/notice/notice-icon.js +2 -2
- package/dist/lib/notice/notice.cjs +1 -1
- package/dist/lib/notice/notice.js +1 -1
- package/dist/lib/pagination/index.d.ts +1 -0
- package/dist/lib/pagination/pagination.cjs +1 -1
- package/dist/lib/pagination/pagination.js +1 -1
- package/dist/lib/popover/index.d.ts +1 -0
- package/dist/lib/popover/popover-header-footer.cjs +1 -1
- package/dist/lib/popover/popover-header-footer.cjs.map +1 -1
- package/dist/lib/popover/popover-header-footer.js +4 -4
- package/dist/lib/popover/popover.cjs +1 -1
- package/dist/lib/popover/popover.cjs.map +1 -1
- package/dist/lib/popover/popover.js +95 -82
- package/dist/lib/popover/popover.js.map +1 -1
- package/dist/lib/popover/tippy-utils.cjs +1 -1
- package/dist/lib/presence/index.cjs +1 -1
- package/dist/lib/presence/index.d.ts +1 -0
- package/dist/lib/presence/index.js +1 -1
- package/dist/lib/presence/presence.cjs +1 -1
- package/dist/lib/presence/presence.js +1 -1
- package/dist/lib/progress-bar/index.cjs +1 -0
- package/dist/lib/progress-bar/index.d.ts +1 -0
- package/dist/lib/progress-bar/index.js +2 -0
- package/dist/lib/progress-bar/progress-bar.cjs +1 -0
- package/dist/lib/progress-bar/progress-bar.js +2 -0
- package/dist/lib/progress-circle/index.d.ts +1 -0
- package/dist/lib/progress-circle/progress-circle.cjs +1 -1
- package/dist/lib/progress-circle/progress-circle.cjs.map +1 -1
- package/dist/lib/progress-circle/progress-circle.js +81 -42
- package/dist/lib/progress-circle/progress-circle.js.map +1 -1
- package/dist/lib/prose/index.d.ts +1 -0
- package/dist/lib/prose/prose.cjs +1 -1
- package/dist/lib/radio/index.d.ts +1 -0
- package/dist/lib/radio/radio.cjs +1 -1
- package/dist/lib/radio/radio.cjs.map +1 -1
- package/dist/lib/radio/radio.js +7 -7
- package/dist/lib/radio-group/index.d.ts +1 -0
- package/dist/lib/radio-group/radios-decorator.cjs +1 -1
- package/dist/lib/radio-group/radios-decorator.js +1 -1
- package/dist/lib/resizable/index.cjs +1 -1
- package/dist/lib/resizable/index.d.ts +1 -0
- package/dist/lib/resizable/index.js +3 -3
- package/dist/lib/resizable/resizable-handle.cjs +1 -1
- package/dist/lib/resizable/resizable-handle.js +1 -1
- package/dist/lib/resizable/resizable-panel.cjs +1 -1
- package/dist/lib/resizable/resizable-panel.js +1 -1
- package/dist/lib/resizable/resizable.cjs +1 -1
- package/dist/lib/resizable/resizable.js +1 -1
- package/dist/lib/rich-text-editor/force-linkify.cjs +1 -1
- package/dist/lib/rich-text-editor/force-linkify.js +1 -1
- package/dist/lib/rich-text-editor/index.cjs +1 -1
- package/dist/lib/rich-text-editor/index.d.ts +1 -0
- package/dist/lib/rich-text-editor/index.js +1 -1
- package/dist/lib/rich-text-editor/markdown-renderer.cjs +1 -1
- package/dist/lib/rich-text-editor/markdown-renderer.js +1 -1
- package/dist/lib/rich-text-editor/rich-text-editor.cjs +1 -1
- package/dist/lib/rich-text-editor/rich-text-editor.js +1 -1
- package/dist/lib/root-layout/index.d.ts +1 -0
- package/dist/lib/root-layout/root-layout.cjs +1 -1
- package/dist/lib/root-layout/root-layout.js +1 -1
- package/dist/lib/scrollbar-directive/index.d.ts +1 -0
- package/dist/lib/scrollbar-directive/scrollbar.cjs +1 -1
- package/dist/lib/scroller/index.cjs +1 -1
- package/dist/lib/scroller/index.d.ts +1 -0
- package/dist/lib/scroller/index.js +1 -1
- package/dist/lib/scroller/scroller.cjs +1 -1
- package/dist/lib/scroller/scroller.js +1 -1
- package/dist/lib/segmented-control/index.d.ts +1 -0
- package/dist/lib/segmented-control/segmented-control-item.cjs +1 -1
- package/dist/lib/segmented-control/segmented-control-item.cjs.map +1 -1
- package/dist/lib/segmented-control/segmented-control-item.js +34 -4
- package/dist/lib/segmented-control/segmented-control-item.js.map +1 -1
- package/dist/lib/segmented-control/segmented-control.cjs +1 -1
- package/dist/lib/segmented-control/segmented-control.cjs.map +1 -1
- package/dist/lib/segmented-control/segmented-control.js +1 -1
- package/dist/lib/select-menu/index.d.ts +1 -0
- package/dist/lib/select-menu/select-menu.cjs +1 -1
- package/dist/lib/select-menu/select-menu.cjs.map +1 -1
- package/dist/lib/select-menu/select-menu.js +8 -8
- package/dist/lib/skeleton/index.d.ts +1 -0
- package/dist/lib/skeleton/skeleton-list-item.cjs +1 -1
- package/dist/lib/skeleton/skeleton-list-item.js +1 -1
- package/dist/lib/skeleton/skeleton-paragraph.cjs +1 -1
- package/dist/lib/skeleton/skeleton-paragraph.js +1 -1
- package/dist/lib/skeleton/skeleton-shape.cjs +1 -1
- package/dist/lib/skeleton/skeleton-shape.js +1 -1
- package/dist/lib/skeleton/skeleton-text.cjs +1 -1
- package/dist/lib/skeleton/skeleton-text.js +1 -1
- package/dist/lib/skeleton/skeleton.cjs +1 -1
- package/dist/lib/skeleton/skeleton.js +1 -1
- package/dist/lib/slider/index.cjs +1 -1
- package/dist/lib/slider/index.d.ts +1 -0
- package/dist/lib/slider/index.js +1 -1
- package/dist/lib/slider/slider.cjs +1 -1
- package/dist/lib/slider/slider.js +1 -1
- package/dist/lib/split-button/index.d.ts +1 -0
- package/dist/lib/split-button/split-button-end.cjs +1 -1
- package/dist/lib/split-button/split-button-end.cjs.map +1 -1
- package/dist/lib/split-button/split-button-end.js +2 -2
- package/dist/lib/split-button/split-button-start.cjs +1 -1
- package/dist/lib/split-button/split-button-start.js +1 -1
- package/dist/lib/split-button/split-button.cjs +1 -1
- package/dist/lib/split-button/split-button.cjs.map +1 -1
- package/dist/lib/split-button/split-button.js +5 -5
- package/dist/lib/stack/index.d.ts +1 -0
- package/dist/lib/stack/stack.cjs +1 -1
- package/dist/lib/stack/stack.js +1 -1
- package/dist/lib/tab/index.d.ts +1 -0
- package/dist/lib/tab/tab-group.cjs +1 -1
- package/dist/lib/tab/tab-group.cjs.map +1 -1
- package/dist/lib/tab/tab-group.js +12 -4
- package/dist/lib/tab/tab-group.js.map +1 -1
- package/dist/lib/tab/tab-panel.cjs +1 -1
- package/dist/lib/tab/tab-panel.cjs.map +1 -1
- package/dist/lib/tab/tab-panel.js +2 -2
- package/dist/lib/tab/tab.cjs +1 -1
- package/dist/lib/tab/tab.cjs.map +1 -1
- package/dist/lib/tab/tab.js +36 -6
- package/dist/lib/tab/tab.js.map +1 -1
- package/dist/lib/text/index.cjs +1 -1
- package/dist/lib/text/index.d.ts +1 -0
- package/dist/lib/text/index.js +1 -1
- package/dist/lib/text/text.cjs +1 -1
- package/dist/lib/text/text.js +1 -1
- package/dist/lib/text-list/index.cjs +1 -1
- package/dist/lib/text-list/index.d.ts +1 -0
- package/dist/lib/text-list/index.js +2 -2
- package/dist/lib/text-list/text-list-item.cjs +1 -1
- package/dist/lib/text-list/text-list-item.js +1 -1
- package/dist/lib/text-list/text-list.cjs +1 -1
- package/dist/lib/text-list/text-list.js +1 -1
- package/dist/lib/toast/index.cjs +1 -1
- package/dist/lib/toast/index.d.ts +1 -0
- package/dist/lib/toast/index.js +1 -1
- package/dist/lib/toast/toast.cjs +1 -1
- package/dist/lib/toast/toast.js +1 -1
- package/dist/lib/toggle/index.d.ts +1 -0
- package/dist/lib/toggle/toggle.cjs +1 -1
- package/dist/lib/toggle/toggle.cjs.map +1 -1
- package/dist/lib/toggle/toggle.js +4 -4
- package/dist/lib/tooltip/index.d.ts +1 -0
- package/dist/lib/tooltip/tooltip.cjs +1 -1
- package/dist/lib/tooltip/tooltip.cjs.map +1 -1
- package/dist/lib/tooltip/tooltip.js +6 -6
- package/dist/lib/tooltip/tooltip.js.map +1 -1
- package/dist/lib/tooltip-directive/index.d.ts +1 -0
- package/dist/lib/tooltip-directive/tooltip.cjs +1 -1
- package/dist/lib/tooltip-directive/tooltip.cjs.map +1 -1
- package/dist/lib/tooltip-directive/tooltip.js +2 -2
- package/dist/lib/validation-messages/index.d.ts +1 -0
- package/dist/lib/validation-messages/validation-messages.cjs +1 -1
- package/dist/lib/validation-messages/validation-messages.cjs.map +1 -1
- package/dist/lib/validation-messages/validation-messages.js +4 -4
- package/dist/localization/index.cjs +1 -1
- package/dist/localization/index.cjs.map +1 -1
- package/dist/localization/index.d.ts +25 -0
- package/dist/localization/index.d.ts.map +1 -0
- package/dist/localization/index.js.map +1 -1
- package/dist/localization/sync-icons.d.ts +3 -0
- package/dist/localization/sync-icons.d.ts.map +1 -0
- package/dist/{mode_constants-tb7TL85q.js → mode_constants-CC73P7d-.js} +1 -1
- package/dist/{mode_constants-tb7TL85q.js.map → mode_constants-CC73P7d-.js.map} +1 -1
- package/dist/{mode_constants-CzYJW9ua.cjs → mode_constants-DM0SVbFM.cjs} +1 -1
- package/dist/{mode_constants-CzYJW9ua.cjs.map → mode_constants-DM0SVbFM.cjs.map} +1 -1
- package/dist/node_modules/@tiptap/vue-3.cjs +1 -1
- package/dist/node_modules/@tiptap/vue-3.cjs.map +1 -1
- package/dist/node_modules/@tiptap/vue-3.js +2 -363
- package/dist/node_modules/@tiptap/vue-3.js.map +1 -1
- package/dist/shared/sr_only_close_button.cjs +1 -1
- package/dist/shared/sr_only_close_button.js +1 -1
- package/dist/utils-CXaaZqVu.js +172 -0
- package/dist/utils-CXaaZqVu.js.map +1 -0
- package/dist/utils-Db-kV6Sr.cjs +2 -0
- package/dist/{common/utils/index.js.map → utils-Db-kV6Sr.cjs.map} +1 -1
- package/package.json +8 -7
- package/dist/Combobox-DdBIRmeH.cjs +0 -3
- package/dist/Datepicker-Df6uR0r_.cjs +0 -2
- package/dist/EmojiPicker-KbIfc-GH.cjs +0 -2
- package/dist/FilterPill-DwapR9JK.cjs +0 -2
- package/dist/RichTextEditor-ECmStZDK.cjs +0 -11
- package/dist/Scroller-EIHN3a26.cjs +0 -2
- package/dist/Slider-BDgY7gNR.cjs +0 -2
- package/dist/Text-5MobHF6z.js.map +0 -1
- package/dist/Text-DNVNZree.cjs +0 -2
- package/dist/Text-DNVNZree.cjs.map +0 -1
- package/dist/TextListItem-CVjrHr2_.cjs +0 -2
- package/dist/Toast--W8p7jzA.cjs +0 -2
- package/dist/chunk-Bmb41Sf3.cjs +0 -1
- package/dist/common/utils/index.cjs.map +0 -1
- /package/dist/{_plugin-vue_export-helper-BTgDAbhb.js → _plugin-vue_export-helper-B52Kst-M.js} +0 -0
- /package/dist/{_plugin-vue_export-helper-D8jCH6HB.cjs → _plugin-vue_export-helper-CX7YVcP6.cjs} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-viewer.cjs","names":[],"sources":["../../../components/ImageViewer/ImageViewer.vue"],"sourcesContent":["<template>\n <div>\n <dt-button\n ref=\"previewButton\"\n data-qa=\"dt-image-viewer-preview\"\n class=\"d-image-viewer__preview-button\"\n :aria-label=\"ariaLabel\"\n importance=\"clear\"\n @click=\"openModal\"\n >\n <img\n :class=\"imageButtonClass\"\n :src=\"imageSrc\"\n :alt=\"imageAlt\"\n >\n </dt-button>\n <Teleport\n v-if=\"isOpen\"\n :to=\"resolvedAppendToTarget\"\n >\n <div\n v-dt-focustrap=\"{ active: isOpen, initialFocus: false, restoreFocus: false }\"\n :aria-hidden=\"!isOpen ? 'true' : 'false'\"\n class=\"d-modal\"\n data-qa=\"dt-modal\"\n v-bind=\"modeAttrs\"\n v-on=\"modalListeners\"\n @mouseover=\"showCloseButton = true\"\n @mouseleave=\"showCloseButton = false\"\n @focusin=\" showCloseButton = true\"\n @focusout=\" showCloseButton = false\"\n >\n <div\n data-qa=\"dt-image-viewer-full\"\n class=\"d-image-viewer__full\"\n role=\"dialog\"\n aria-modal=\"true\"\n >\n <img\n class=\"d-image-viewer__full__image\"\n :src=\"imageSrc\"\n :alt=\"imageAlt\"\n >\n </div>\n <transition name=\"fade\">\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"closeImage\"\n data-qa=\"dt-image-viewer-close-btn\"\n class=\"d-modal__close\"\n circle\n :size=\"400\"\n importance=\"clear\"\n kind=\"inverted\"\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon-close\n class=\"d-image-viewer__close-button\"\n size=\"400\"\n />\n </template>\n </dt-button>\n <sr-only-close-button\n v-else\n @close=\"close\"\n />\n </transition>\n </div>\n </Teleport>\n </div>\n</template>\n\n<script>\nimport ModeMixin from '@/common/mixins/mode';\nimport { returnFirstEl } from '@/common/utils';\nimport { EVENT_KEYNAMES, HTML_ELEMENT_TYPE } from '@/common/constants';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue';\nimport { DtButton } from '@/components/Button';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\nimport { DialtoneLocalization } from '@/localization';\n\nexport default {\n name: 'DtImageViewer',\n\n components: {\n SrOnlyCloseButton,\n DtButton,\n DtIconClose,\n },\n\n mixins: [ModeMixin],\n\n props: {\n /**\n * By default the portal appends to the nearest ancestor <dialog> element when inside\n * one (keeping the image viewer in the browser's top layer), or to the body otherwise.\n * We can modify this behaviour by passing an appendTo prop that points to an id or an\n * html tag from the root of the parent. The appendTo prop expects a CSS selector string\n * or an actual DOM node.\n * type: string | HTMLElement, default: 'body'\n */\n appendTo: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'body',\n },\n\n /**\n * Controls whether the image modal is shown. When null (default), the image modal\n * triggers on click. When set to true or false, the default trigger is\n * disabled and the parent controls visibility via v-model:open.\n * @values null, true, false\n */\n open: {\n type: [Boolean, null],\n default: null,\n },\n\n /**\n * URL of the image to be shown\n */\n imageSrc: {\n type: String,\n required: true,\n },\n\n /**\n * Alt text of image\n */\n imageAlt: {\n type: String,\n required: true,\n },\n\n /**\n * Image Class\n */\n imageButtonClass: {\n type: String,\n required: false,\n default: '',\n },\n\n /**\n * Aria label\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n ],\n\n data () {\n return {\n showCloseButton: true,\n isOpen: false,\n i18n: new DialtoneLocalization(),\n // Mirrors Tooltip/Popover's dialog-detection: without this, an image viewer nested in\n // a native <dialog>-based DtModal teleports straight to document.body and renders behind\n // the ancestor dialog's top layer, hidden despite matching z-index. Resolved imperatively\n // in mounted() rather than as a computed, since $refs aren't tracked as a reactive\n // dependency and a computed reading $refs.previewButton would permanently cache the\n // pre-mount (wrong) value when isOpen is already true on initial render.\n // Initialized to the string 'body' (not document.body) so data() stays SSR-safe;\n // mounted() resolves the real DOM target on the client.\n resolvedAppendToTarget: 'body',\n };\n },\n\n computed: {\n modalListeners () {\n return {\n click: event => {\n (event.target === event.currentTarget) && this.close();\n },\n\n keydown: event => {\n // Tab focus trapping is handled by the v-dt-focustrap directive on the modal.\n switch (event.code) {\n case EVENT_KEYNAMES.esc:\n case EVENT_KEYNAMES.escape:\n this.close();\n break;\n }\n },\n };\n },\n\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n watch: {\n isOpen: {\n immediate: true,\n handler (isShowing) {\n if (isShowing && typeof document !== 'undefined') {\n // Set a reference to the previously-active element, to which we'll return focus on modal close.\n this.previousActiveElement = document.activeElement;\n } else {\n // Modal is being hidden, so return focus to the previously active element before clearing the reference.\n this.previousActiveElement?.focus();\n this.previousActiveElement = null;\n }\n },\n },\n\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n\n appendTo () {\n this.updateResolvedAppendToTarget();\n },\n },\n\n mounted () {\n this.updateResolvedAppendToTarget();\n },\n\n methods: {\n updateResolvedAppendToTarget () {\n if (this.appendTo !== 'body') {\n this.resolvedAppendToTarget = this.appendTo;\n return;\n }\n const buttonEl = returnFirstEl(this.$refs.previewButton?.$el);\n this.resolvedAppendToTarget = buttonEl?.closest('dialog') ??\n buttonEl?.getRootNode()?.querySelector('body') ?? document.body;\n },\n\n openModal () {\n // Has custom control passed in\n if (this.open !== null) {\n return;\n }\n this.isOpen = true;\n this.showCloseButton = true;\n this.$emit('opened', true);\n\n setTimeout(() => {\n this.focusAfterOpen();\n });\n },\n\n close () {\n this.isOpen = false;\n this.$emit('opened', false);\n\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n focusAfterOpen () {\n returnFirstEl(this.$refs.closeImage?.$el)?.focus();\n },\n },\n};\n</script>\n"],"mappings":"kgBAoFA,IAAK,EAAU,CACb,KAAM,gBAEN,WAAY,CACV,kBAAA,EAAA,QACA,SAAA,EAAA,QACA,YAAA,EAAA,YACD,CAED,OAAQ,CAAC,EAAA,QAAU,CAEnB,MAAO,CASL,SAAU,CACR,KAAM,CAAC,OAAQ,EAAA,kBAAkB,CACjC,QAAS,OACV,CAQD,KAAM,CACJ,KAAM,CAAC,QAAS,KAAK,CACrB,QAAS,KACV,CAKD,SAAU,CACR,KAAM,OACN,SAAU,GACX,CAKD,SAAU,C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AK,WACJ,aAAY,EAAA,iBACZ,MAAO,EAAA,iBACP,QAAO,EAAA,QAEG,MAAA,EAAA,EAAA,aAIP,EAAA,EAAA,EAAA,aAAA,EAAA,CAFA,MAAM,+BACN,KAAK,yFAOT,EAAA,OADC,QAAO,EAAA,wDA9Cc,EAAA,OAAM,aAAA,GAAA,aAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,KAAA,CAAA,GAAA,EAAA,EAAA,oBAAA,GAAA,GAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"image-viewer.cjs","names":[],"sources":["../../../components/ImageViewer/ImageViewer.vue"],"sourcesContent":["<template>\n <div>\n <dt-button\n ref=\"previewButton\"\n data-qa=\"dt-image-viewer-preview\"\n class=\"d-image-viewer__preview-button\"\n :aria-label=\"ariaLabel\"\n importance=\"clear\"\n @click=\"openModal\"\n >\n <img\n :class=\"imageButtonClass\"\n :src=\"imageSrc\"\n :alt=\"imageAlt\"\n >\n </dt-button>\n <Teleport\n v-if=\"isOpen\"\n :to=\"resolvedAppendToTarget\"\n >\n <div\n v-dt-focustrap=\"{ active: isOpen, initialFocus: false, restoreFocus: false }\"\n :aria-hidden=\"!isOpen ? 'true' : 'false'\"\n class=\"d-modal\"\n data-qa=\"dt-modal\"\n v-bind=\"modeAttrs\"\n v-on=\"modalListeners\"\n @mouseover=\"showCloseButton = true\"\n @mouseleave=\"showCloseButton = false\"\n @focusin=\" showCloseButton = true\"\n @focusout=\" showCloseButton = false\"\n >\n <div\n data-qa=\"dt-image-viewer-full\"\n class=\"d-image-viewer__full\"\n role=\"dialog\"\n aria-modal=\"true\"\n >\n <img\n class=\"d-image-viewer__full__image\"\n :src=\"imageSrc\"\n :alt=\"imageAlt\"\n >\n </div>\n <transition name=\"fade\">\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"closeImage\"\n data-qa=\"dt-image-viewer-close-btn\"\n class=\"d-modal__close\"\n circle\n :size=\"400\"\n importance=\"clear\"\n kind=\"inverted\"\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon-close\n class=\"d-image-viewer__close-button\"\n size=\"400\"\n />\n </template>\n </dt-button>\n <sr-only-close-button\n v-else\n @close=\"close\"\n />\n </transition>\n </div>\n </Teleport>\n </div>\n</template>\n\n<script>\nimport ModeMixin from '@/common/mixins/mode';\nimport { returnFirstEl } from '@/common/utils';\nimport { EVENT_KEYNAMES, HTML_ELEMENT_TYPE } from '@/common/constants';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue';\nimport { DtButton } from '@/components/Button';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\nimport { DialtoneLocalization } from '@/localization';\n\nexport default {\n name: 'DtImageViewer',\n\n components: {\n SrOnlyCloseButton,\n DtButton,\n DtIconClose,\n },\n\n mixins: [ModeMixin],\n\n props: {\n /**\n * By default the portal appends to the nearest ancestor <dialog> element when inside\n * one (keeping the image viewer in the browser's top layer), or to the body otherwise.\n * We can modify this behaviour by passing an appendTo prop that points to an id or an\n * html tag from the root of the parent. The appendTo prop expects a CSS selector string\n * or an actual DOM node.\n * type: string | HTMLElement, default: 'body'\n */\n appendTo: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'body',\n },\n\n /**\n * Controls whether the image modal is shown. When null (default), the image modal\n * triggers on click. When set to true or false, the default trigger is\n * disabled and the parent controls visibility via v-model:open.\n * @values null, true, false\n */\n open: {\n type: [Boolean, null],\n default: null,\n },\n\n /**\n * URL of the image to be shown\n */\n imageSrc: {\n type: String,\n required: true,\n },\n\n /**\n * Alt text of image\n */\n imageAlt: {\n type: String,\n required: true,\n },\n\n /**\n * Image Class\n */\n imageButtonClass: {\n type: String,\n required: false,\n default: '',\n },\n\n /**\n * Aria label\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n ],\n\n data () {\n return {\n showCloseButton: true,\n isOpen: false,\n i18n: new DialtoneLocalization(),\n // Mirrors Tooltip/Popover's dialog-detection: without this, an image viewer nested in\n // a native <dialog>-based DtModal teleports straight to document.body and renders behind\n // the ancestor dialog's top layer, hidden despite matching z-index. Resolved imperatively\n // in mounted() rather than as a computed, since $refs aren't tracked as a reactive\n // dependency and a computed reading $refs.previewButton would permanently cache the\n // pre-mount (wrong) value when isOpen is already true on initial render.\n // Initialized to the string 'body' (not document.body) so data() stays SSR-safe;\n // mounted() resolves the real DOM target on the client.\n resolvedAppendToTarget: 'body',\n };\n },\n\n computed: {\n modalListeners () {\n return {\n click: event => {\n (event.target === event.currentTarget) && this.close();\n },\n\n keydown: event => {\n // Tab focus trapping is handled by the v-dt-focustrap directive on the modal.\n switch (event.code) {\n case EVENT_KEYNAMES.esc:\n case EVENT_KEYNAMES.escape:\n this.close();\n break;\n }\n },\n };\n },\n\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n watch: {\n isOpen: {\n immediate: true,\n handler (isShowing) {\n if (isShowing && typeof document !== 'undefined') {\n // Set a reference to the previously-active element, to which we'll return focus on modal close.\n this.previousActiveElement = document.activeElement;\n } else {\n // Modal is being hidden, so return focus to the previously active element before clearing the reference.\n this.previousActiveElement?.focus();\n this.previousActiveElement = null;\n }\n },\n },\n\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n\n appendTo () {\n this.updateResolvedAppendToTarget();\n },\n },\n\n mounted () {\n this.updateResolvedAppendToTarget();\n },\n\n methods: {\n updateResolvedAppendToTarget () {\n if (this.appendTo !== 'body') {\n this.resolvedAppendToTarget = this.appendTo;\n return;\n }\n const buttonEl = returnFirstEl(this.$refs.previewButton?.$el);\n this.resolvedAppendToTarget = buttonEl?.closest('dialog') ??\n buttonEl?.getRootNode()?.querySelector('body') ?? document.body;\n },\n\n openModal () {\n // Has custom control passed in\n if (this.open !== null) {\n return;\n }\n this.isOpen = true;\n this.showCloseButton = true;\n this.$emit('opened', true);\n\n setTimeout(() => {\n this.focusAfterOpen();\n });\n },\n\n close () {\n this.isOpen = false;\n this.$emit('opened', false);\n\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n focusAfterOpen () {\n returnFirstEl(this.$refs.closeImage?.$el)?.focus();\n },\n },\n};\n</script>\n"],"mappings":"8fAoFA,IAAK,EAAU,CACb,KAAM,gBAEN,WAAY,CACV,kBAAA,EAAA,QACA,SAAA,EAAA,QACA,YAAA,EAAA,YACD,CAED,OAAQ,CAAC,EAAA,QAAU,CAEnB,MAAO,CASL,SAAU,CACR,KAAM,CAAC,OAAQ,EAAA,kBAAkB,CACjC,QAAS,OACV,CAQD,KAAM,CACJ,KAAM,CAAC,QAAS,KAAK,CACrB,QAAS,KACV,CAKD,SAAU,CACR,KAAM,OACN,SAAU,GACX,CAKD,SAAU,CACR,KAAM,OACN,SAAU,GACX,CAKD,iBAAkB,CAChB,KAAM,OACN,SAAU,GACV,QAAS,GACV,CAKD,UAAW,CACT,KAAM,OACN,SAAU,GACX,CACF,CAED,MAAO,CAOL,SAMA,cACD,CAED,MAAQ,CACN,MAAO,CACL,gBAAiB,GACjB,OAAQ,GACR,KAAM,IAAI,EAAA,qBASV,uBAAwB,OACzB,EAGH,SAAU,CACR,gBAAkB,CAChB,MAAO,CACL,MAAO,GAAS,CACb,EAAM,SAAW,EAAM,eAAkB,KAAK,OAAO,EAGxD,QAAS,GAAS,CAEhB,OAAQ,EAAM,KAAd,CACE,KAAK,EAAA,eAAe,IACpB,KAAK,EAAA,eAAe,OAClB,KAAK,OAAO,CACZ,QAGP,EAGH,kBAAoB,CAClB,OAAO,KAAK,KAAK,GAAG,wBAAwB,EAE/C,CAED,MAAO,CACL,OAAQ,CACN,UAAW,GACX,QAAS,EAAW,CACd,GAAa,OAAO,SAAa,IAEnC,KAAK,sB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A,OAAM,QAAA,OACrB,MAAM,UACN,UAAQ,YACA,EAAA,WAAA,EAAA,EAAA,YACa,EAAf,eAAc,GAAA,CAAA,CACnB,YAAS,EAAA,KAAA,EAAA,GAAA,GAAE,EAAA,gBAAe,IAC1B,aAAU,EAAA,KAAA,EAAA,GAAA,GAAE,EAAA,gBAAe,IAC3B,UAAO,EAAA,KAAA,EAAA,GAAA,GAAG,EAAA,gBAAe,IACzB,WAAQ,EAAA,KAAA,EAAA,GAAA,GAAG,EAAA,gBAAe,gCAarB,MAXN,EAWM,EAAA,EAAA,EAAA,oBADH,MAAA,CAHC,MAAM,8BACL,IAAK,EAAA,SACL,IAAK,EAAA,wCA4BG,EAAA,WAAA,CAzBD,KAAK,OAAM,CAAA,2BAoBT,CAlBJ,EAAA,kBAAA,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,aAkBI,EAAA,OAjBV,IAAI,aACJ,UAAQ,4BACR,MAAM,iBACN,OAAA,GACC,KAAM,IACP,WAAW,QACX,KAAK,WACJ,aAAY,EAAA,iBACZ,MAAO,EAAA,iBACP,QAAO,EAAA,QAEG,MAAA,EAAA,EAAA,aAIP,EAAA,EAAA,EAAA,aAAA,EAAA,CAFA,MAAM,+BACN,KAAK,yFAOT,EAAA,OADC,QAAO,EAAA,wDA9Cc,EAAA,OAAM,aAAA,GAAA,aAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,KAAA,CAAA,GAAA,EAAA,EAAA,oBAAA,GAAA,GAAA,CAAA,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EVENT_KEYNAMES as e, HTML_ELEMENT_TYPE as t } from "../../common/constants/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as r } from "../../_plugin-vue_export-helper-
|
|
2
|
+
import { O as n } from "../../utils-CXaaZqVu.js";
|
|
3
|
+
import { t as r } from "../../_plugin-vue_export-helper-B52Kst-M.js";
|
|
4
4
|
import i from "../../common/mixins/mode.js";
|
|
5
5
|
import { DialtoneLocalization as a } from "../../localization/index.js";
|
|
6
6
|
import o from "../button/button.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../components/ImageViewer/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../components/Input/index.js';
|
package/dist/lib/input/input.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/constants/index.cjs`),t=require(`../../common/validators/index.cjs`),n=require(`../../common/utils/index.cjs`),r=require(`../../common/mixins/input.cjs`),i=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),a=require(`../validation-messages/validation-messages.cjs`),o=require(`../text/text-constants.cjs`),s=require(`../../Text-DNVNZree.cjs`),c=require(`./input-constants.cjs`);let l=require(`vue`);var u=t.ordinalSizeValidator(c.INPUT_ICON_SIZES),d={name:`DtInput`,components:{DtValidationMessages:a.default,DtText:s.t},mixins:[r.MessagesMixin],inheritAttrs:!1,props:{name:{type:String,default:``},type:{type:String,default:c.INPUT_TYPES.TEXT,validator:e=>Object.values(c.INPUT_TYPES).includes(e)},modelValue:{type:[String,Number],default:``},disabled:{type:Boolean,default:!1},label:{type:String,default:``},showLabel:{type:Boolean,default:!0},description:{type:String,default:``},descriptionClass:{type:[String,Array,Object],default:``},size:{type:[String,Number],default:300,validator:u},inputClass:{type:[String,Object,Array],default:``},inputWrapperClass:{type:[String,Object,Array],default:``},currentLength:{type:Number,default:null},retainWarning:{type:Boolean,default:!1},validate:{type:Object,default:null},hidden:{type:Boolean,default:!1},labelSize:{type:[String,Number],default:null,validator:e=>o.TEXT_SIZE_MODIFIERS.label.includes(String(e))},labelStrength:{type:String,default:null,validator:e=>Object.keys(o.TEXT_STRENGTH_MODIFIERS).includes(e)},labelClass:{type:[String,Array,Object],default:``},startIconClass:{type:[String,Array,Object],default:``},endIconClass:{type:[String,Array,Object],default:``}},emits:[`blur`,`clear`,`focus`,`focusin`,`focusout`,`update:modelValue`,`update:length`,`update:invalid`],data(){return{isInputFocused:!1,isInvalid:!1,defaultLength:0,hasSlotContent:n.hasSlotContent,isComposing:!1,justEndedComposition:!1,messagesId:n.getUniqueString()}},computed:{isTextarea(){return this.type===c.INPUT_TYPES.TEXTAREA},isDefaultSize(){return String(this.size)===c.INPUT_SIZES.DEFAULT||String(this.size)===`300`},iconSize(){return c.INPUT_ICON_SIZES[String(this.size)]},isValidSize(){return u(this.size)},isValidDescriptionSize(){return Object.values(e.DESCRIPTION_SIZE_TYPES).includes(this.size)},inputComponent(){return this.isTextarea?`textarea`:`input`},inputListeners(){return{compositionstart:()=>{this.isComposing=!0},compositionend:()=>{this.isComposing=!1,this.justEndedComposition=!0;let e=this.$refs.input.value;this.$emit(`update:modelValue`,e),Promise.resolve().then(()=>{this.justEndedComposition=!1})},input:async e=>{if(this.isComposing||this.justEndedComposition)return;let t=e.target.value;this.type===c.INPUT_TYPES.FILE&&(t=Array.from(e.target.files).map(e=>e.name)),this.$emit(`update:modelValue`,t)},blur:e=>{this.isInputFocused=!1,this.onBlur(e)},focus:e=>{this.isInputFocused=!0,this.$emit(`focus`,e)},focusin:e=>this.$emit(`focusin`,e),focusout:e=>this.$emit(`focusout`,e)}},descriptionKey(){return`input-description-${n.getUniqueString()}`},inputState(){return n.getValidationState(this.validationMessages)},ariaInvalid(){return this.inputState===e.VALIDATION_MESSAGE_TYPES.CRITICAL?`true`:void 0},ariaDescribedBy(){return this.showMessages&&this.validationMessages.length>0?this.messagesId:void 0},defaultLengthCalculation(){return this.calculateLength(this.modelValue)},validationProps(){return{length:{description:this?.validate?.length?.description,max:this?.validate?.length?.max,warn:this?.validate?.length?.warn,message:this?.validate?.length?.message,limitMaxLength:this?.validate?.length?.limitMaxLength?this.validate.length.limitMaxLength:!1}}},validationMessages(){return this.showLengthLimitValidation?this.formattedMessages.concat([this.inputLengthErrorMessage()]):this.formattedMessages},showInputState(){return this.showMessages&&this.inputState},inputLength(){return this.currentLength?this.currentLength:this.defaultLengthCalculation},inputLengthState(){return this.inputLength<this.validationProps.length.warn?null:this.inputLength<=this.validationProps.length.max?this.validationProps.length.warn?e.VALIDATION_MESSAGE_TYPES.WARNING:null:e.VALIDATION_MESSAGE_TYPES.CRITICAL},shouldValidateLength(){return!!(this.validationProps.length.description&&this.validationProps.length.max)},shouldLimitMaxLength(){return this.shouldValidateLength&&this.validationProps.length.limitMaxLength},showLengthLimitValidation(){return this.shouldValidateLength&&this.inputLengthState!==null&&this.validationProps.length.message&&(this.retainWarning||this.isInputFocused||this.isInvalid)},resolvedLabelSize(){if(this.labelSize!=null)return this.labelSize;let e=String(this.size);return e===`xl`||e===`500`?e===`500`?`400`:`lg`:this.size},resolvedDescriptionSize(){return{100:`xs`,200:`xs`,300:`sm`,400:`sm`,500:`md`,xs:`xs`,sm:`xs`,md:`sm`,lg:`sm`,xl:`md`}[String(this.size)]||`sm`},resolvedDescriptionDensity(){let e=String(this.size);return e===`xl`||e===`500`?`300`:void 0},sizeModifierClass(){return this.isDefaultSize||!this.isValidSize?``:c.INPUT_SIZE_CLASSES[this.inputComponent][String(this.size)]},stateClass(){return[c.INPUT_STATE_CLASSES[this.inputState]]}},watch:{isInvalid(e){this.$emit(`update:invalid`,e)},modelValue:{immediate:!0,handler(e){this.shouldValidateLength&&this.validateLength(this.inputLength),this.currentLength??this.$emit(`update:length`,this.calculateLength(e)),this.isTextarea&&!this.isComposing&&this.$refs.input&&this.$refs.input.value!==e&&(this.$refs.input.value=e)}}},mounted(){this.isTextarea&&this.$refs.input&&(this.$refs.input.value=this.modelValue),this.runValidations()},methods:{removeClassStyleAttrs:n.removeClassStyleAttrs,inputClasses(){return[`d-input__input`,this.inputComponent===`input`?`d-input`:`d-textarea`,{[this.stateClass]:this.showInputState,"d-input-icon--left":this.$slots.startIcon||this.$slots.leftIcon,"d-input-icon--right":this.$slots.endIcon||this.$slots.rightIcon},this.sizeModifierClass,this.inputClass]},inputWrapperClasses(){return this.hidden?[]:[`d-input__wrapper`,{[this.stateClass]:this.showInputState},this.inputWrapperClass]},calculateLength(e){return typeof e==`string`?[...e].length:0},inputLengthErrorMessage(){return{message:this.validationProps.length.message,type:this.inputLengthState}},onBlur(e){this.$refs.container?.contains(e.relatedTarget)||this.$emit(`blur`,e)},emitClearEvents(){this.$emit(`clear`),this.$emit(`update:modelValue`,``)},blur(){this.$refs.input.blur()},focus(){this.$refs.input.focus()},select(){this.$refs.input.select()},getMessageKey(e,t){return`message-${e}-${t}`},validateLength(e){this.isInvalid=e>this.validationProps.length.max},clearInput(){this.$refs.input.value=``,this.$refs.input.focus(),this.emitClearEvents()},runValidations(){!this.label&&!this.$attrs[`aria-label`]&&console.info(`[Dialtone] A label is required for accessibility. Provide a label prop and use show-label="false" to hide it visually.`)}}},f=[`aria-details`],p={key:0},m={key:1,"data-qa":`dt-input-length-description`,class:`d-input__length-description`},h=[`read-only`],g=[`name`,`disabled`,`autocomplete`,`maxlength`,`aria-label`,`aria-invalid`,`aria-describedby`],_=[`value`,`name`,`type`,`disabled`,`autocomplete`,`maxlength`,`aria-label`,`aria-invalid`,`aria-describedby`];function v(e,t,n,r,i,a){let o=(0,l.resolveComponent)(`dt-text`),s=(0,l.resolveComponent)(`dt-validation-messages`);return(0,l.openBlock)(),(0,l.createElementBlock)(`div`,{ref:`container`,class:(0,l.normalizeClass)([`d-input__root`,{"d-input--hidden":n.hidden},e.$attrs.class]),style:(0,l.normalizeStyle)(e.$attrs.style),"data-qa":`dt-input`},[(0,l.createElementVNode)(`label`,{class:`d-input__label`,"aria-details":e.$slots.description||n.description?a.descriptionKey:void 0,"data-qa":`dt-input-label-wrapper`},[(0,l.renderSlot)(e.$slots,`label`,{},()=>[n.showLabel&&n.label?((0,l.openBlock)(),(0,l.createBlock)(o,{key:0,ref:`label`,"data-qa":`dt-input-label`,kind:`label`,size:a.resolvedLabelSize,strength:n.labelStrength,tone:`secondary`,class:(0,l.normalizeClass)([`d-input__label-text`,n.labelClass])},{default:(0,l.withCtx)(()=>[(0,l.createTextVNode)((0,l.toDisplayString)(n.label),1)]),_:1},8,[`size`,`strength`,`class`])):(0,l.createCommentVNode)(``,!0)]),i.hasSlotContent(e.$slots.description)||n.description||a.shouldValidateLength?((0,l.openBlock)(),(0,l.createBlock)(o,{key:0,id:a.descriptionKey,ref:`description`,kind:`body`,size:a.resolvedDescriptionSize,tone:`tertiary`,density:a.resolvedDescriptionDensity,as:`div`,class:(0,l.normalizeClass)([`d-input__description`,`d-description`,n.descriptionClass]),"data-qa":`dt-input-description`},{default:(0,l.withCtx)(()=>[i.hasSlotContent(e.$slots.description)||n.description?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,p,[(0,l.renderSlot)(e.$slots,`description`,{},()=>[(0,l.createTextVNode)((0,l.toDisplayString)(n.description),1)])])):(0,l.createCommentVNode)(``,!0),a.shouldValidateLength?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,m,(0,l.toDisplayString)(a.validationProps.length.description),1)):(0,l.createCommentVNode)(``,!0)]),_:3},8,[`id`,`size`,`density`,`class`])):(0,l.createCommentVNode)(``,!0),(0,l.createElementVNode)(`div`,{class:(0,l.normalizeClass)(a.inputWrapperClasses()),"read-only":n.disabled===!0?!0:void 0},[(0,l.createElementVNode)(`span`,{class:(0,l.normalizeClass)([`d-input-icon`,`d-input-icon--left`,n.startIconClass]),"data-qa":`dt-input-left-icon-wrapper`,onFocusout:t[0]||(t[0]=(...e)=>a.onBlur&&a.onBlur(...e))},[e.$slots.startIcon?(0,l.renderSlot)(e.$slots,`startIcon`,{key:0,iconSize:a.iconSize}):(0,l.renderSlot)(e.$slots,`leftIcon`,{key:1,iconSize:a.iconSize})],34),a.isTextarea?((0,l.openBlock)(),(0,l.createElementBlock)(`textarea`,(0,l.mergeProps)({key:0,ref:`input`,name:n.name,disabled:n.disabled,autocomplete:e.$attrs.autocomplete??`off`,class:a.inputClasses(),maxlength:a.shouldLimitMaxLength?a.validationProps.length.max:null,"aria-label":!n.showLabel&&n.label?n.label:void 0,"aria-invalid":a.ariaInvalid,"aria-describedby":a.ariaDescribedBy,"data-qa":`dt-input-input`},a.removeClassStyleAttrs(e.$attrs),(0,l.toHandlers)(a.inputListeners,!0)),null,16,g)):((0,l.openBlock)(),(0,l.createElementBlock)(`input`,(0,l.mergeProps)({key:1,ref:`input`,value:n.modelValue,name:n.name,type:n.type,disabled:n.disabled,autocomplete:e.$attrs.autocomplete??`off`,class:a.inputClasses(),maxlength:a.shouldLimitMaxLength?a.validationProps.length.max:null,"aria-label":!n.showLabel&&n.label?n.label:void 0,"aria-invalid":a.ariaInvalid,"aria-describedby":a.ariaDescribedBy,"data-qa":`dt-input-input`},a.removeClassStyleAttrs(e.$attrs),(0,l.toHandlers)(a.inputListeners,!0)),null,16,_)),(0,l.createElementVNode)(`span`,{class:(0,l.normalizeClass)([`d-input-icon`,`d-input-icon--right`,n.endIconClass]),"data-qa":`dt-input-right-icon-wrapper`,onFocusout:t[1]||(t[1]=(...e)=>a.onBlur&&a.onBlur(...e))},[e.$slots.endIcon?(0,l.renderSlot)(e.$slots,`endIcon`,{key:0,iconSize:a.iconSize,clear:a.clearInput}):(0,l.renderSlot)(e.$slots,`rightIcon`,{key:1,iconSize:a.iconSize,clear:a.clearInput})],34)],10,h)],8,f),(0,l.createVNode)(s,(0,l.mergeProps)(e.messagesChildProps,{id:i.messagesId,"validation-messages":a.validationMessages,"show-messages":e.showMessages,class:e.messagesClass,"data-qa":`dt-input-messages`}),null,16,[`id`,`validation-messages`,`show-messages`,`class`])],6)}var y=i.t(d,[[`render`,v]]);exports.default=y;
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-BK-Lzi7j.cjs`);const e=require(`../../common/constants/index.cjs`),t=require(`../../common/validators/index.cjs`),n=require(`../../utils-Db-kV6Sr.cjs`),r=require(`../../common/mixins/input.cjs`),i=require(`../../_plugin-vue_export-helper-CX7YVcP6.cjs`),a=require(`../validation-messages/validation-messages.cjs`),o=require(`../text/text-constants.cjs`),s=require(`../../Text-BosPFEHO.cjs`),c=require(`./input-constants.cjs`);let l=require(`vue`);var u=t.ordinalSizeValidator(c.INPUT_ICON_SIZES),d={name:`DtInput`,components:{DtValidationMessages:a.default,DtText:s.t},mixins:[r.MessagesMixin],inheritAttrs:!1,props:{name:{type:String,default:``},type:{type:String,default:c.INPUT_TYPES.TEXT,validator:e=>Object.values(c.INPUT_TYPES).includes(e)},modelValue:{type:[String,Number],default:``},disabled:{type:Boolean,default:!1},label:{type:String,default:``},showLabel:{type:Boolean,default:!0},description:{type:String,default:``},descriptionClass:{type:[String,Array,Object],default:``},size:{type:[String,Number],default:300,validator:u},inputClass:{type:[String,Object,Array],default:``},inputWrapperClass:{type:[String,Object,Array],default:``},currentLength:{type:Number,default:null},retainWarning:{type:Boolean,default:!1},validate:{type:Object,default:null},hidden:{type:Boolean,default:!1},labelSize:{type:[String,Number],default:null,validator:e=>o.TEXT_SIZE_MODIFIERS.label.includes(String(e))},labelStrength:{type:String,default:null,validator:e=>Object.keys(o.TEXT_STRENGTH_MODIFIERS).includes(e)},labelClass:{type:[String,Array,Object],default:``},startIconClass:{type:[String,Array,Object],default:``},endIconClass:{type:[String,Array,Object],default:``}},emits:[`blur`,`clear`,`focus`,`focusin`,`focusout`,`update:modelValue`,`update:length`,`update:invalid`],data(){return{isInputFocused:!1,isInvalid:!1,defaultLength:0,hasSlotContent:n._,isComposing:!1,justEndedComposition:!1,messagesId:n.m()}},computed:{isTextarea(){return this.type===c.INPUT_TYPES.TEXTAREA},isDefaultSize(){return String(this.size)===c.INPUT_SIZES.DEFAULT||String(this.size)===`300`},iconSize(){return c.INPUT_ICON_SIZES[String(this.size)]},isValidSize(){return u(this.size)},isValidDescriptionSize(){return Object.values(e.DESCRIPTION_SIZE_TYPES).includes(this.size)},inputComponent(){return this.isTextarea?`textarea`:`input`},inputListeners(){return{compositionstart:()=>{this.isComposing=!0},compositionend:()=>{this.isComposing=!1,this.justEndedComposition=!0;let e=this.$refs.input.value;this.$emit(`update:modelValue`,e),Promise.resolve().then(()=>{this.justEndedComposition=!1})},input:async e=>{if(this.isComposing||this.justEndedComposition)return;let t=e.target.value;this.type===c.INPUT_TYPES.FILE&&(t=Array.from(e.target.files).map(e=>e.name)),this.$emit(`update:modelValue`,t)},blur:e=>{this.isInputFocused=!1,this.onBlur(e)},focus:e=>{this.isInputFocused=!0,this.$emit(`focus`,e)},focusin:e=>this.$emit(`focusin`,e),focusout:e=>this.$emit(`focusout`,e)}},descriptionKey(){return`input-description-${n.m()}`},inputState(){return n.h(this.validationMessages)},ariaInvalid(){return this.inputState===e.VALIDATION_MESSAGE_TYPES.CRITICAL?`true`:void 0},ariaDescribedBy(){return this.showMessages&&this.validationMessages.length>0?this.messagesId:void 0},defaultLengthCalculation(){return this.calculateLength(this.modelValue)},validationProps(){return{length:{description:this?.validate?.length?.description,max:this?.validate?.length?.max,warn:this?.validate?.length?.warn,message:this?.validate?.length?.message,limitMaxLength:this?.validate?.length?.limitMaxLength?this.validate.length.limitMaxLength:!1}}},validationMessages(){return this.showLengthLimitValidation?this.formattedMessages.concat([this.inputLengthErrorMessage()]):this.formattedMessages},showInputState(){return this.showMessages&&this.inputState},inputLength(){return this.currentLength?this.currentLength:this.defaultLengthCalculation},inputLengthState(){return this.inputLength<this.validationProps.length.warn?null:this.inputLength<=this.validationProps.length.max?this.validationProps.length.warn?e.VALIDATION_MESSAGE_TYPES.WARNING:null:e.VALIDATION_MESSAGE_TYPES.CRITICAL},shouldValidateLength(){return!!(this.validationProps.length.description&&this.validationProps.length.max)},shouldLimitMaxLength(){return this.shouldValidateLength&&this.validationProps.length.limitMaxLength},showLengthLimitValidation(){return this.shouldValidateLength&&this.inputLengthState!==null&&this.validationProps.length.message&&(this.retainWarning||this.isInputFocused||this.isInvalid)},resolvedLabelSize(){if(this.labelSize!=null)return this.labelSize;let e=String(this.size);return e===`xl`||e===`500`?e===`500`?`400`:`lg`:this.size},resolvedDescriptionSize(){return{100:`xs`,200:`xs`,300:`sm`,400:`sm`,500:`md`,xs:`xs`,sm:`xs`,md:`sm`,lg:`sm`,xl:`md`}[String(this.size)]||`sm`},resolvedDescriptionDensity(){let e=String(this.size);return e===`xl`||e===`500`?`300`:void 0},sizeModifierClass(){return this.isDefaultSize||!this.isValidSize?``:c.INPUT_SIZE_CLASSES[this.inputComponent][String(this.size)]},stateClass(){return[c.INPUT_STATE_CLASSES[this.inputState]]}},watch:{isInvalid(e){this.$emit(`update:invalid`,e)},modelValue:{immediate:!0,handler(e){this.shouldValidateLength&&this.validateLength(this.inputLength),this.currentLength??this.$emit(`update:length`,this.calculateLength(e)),this.isTextarea&&!this.isComposing&&this.$refs.input&&this.$refs.input.value!==e&&(this.$refs.input.value=e)}}},mounted(){this.isTextarea&&this.$refs.input&&(this.$refs.input.value=this.modelValue),this.runValidations()},methods:{removeClassStyleAttrs:n.D,inputClasses(){return[`d-input__input`,this.inputComponent===`input`?`d-input`:`d-textarea`,{[this.stateClass]:this.showInputState,"d-input-icon--left":this.$slots.startIcon||this.$slots.leftIcon,"d-input-icon--right":this.$slots.endIcon||this.$slots.rightIcon},this.sizeModifierClass,this.inputClass]},inputWrapperClasses(){return this.hidden?[]:[`d-input__wrapper`,{[this.stateClass]:this.showInputState},this.inputWrapperClass]},calculateLength(e){return typeof e==`string`?[...e].length:0},inputLengthErrorMessage(){return{message:this.validationProps.length.message,type:this.inputLengthState}},onBlur(e){this.$refs.container?.contains(e.relatedTarget)||this.$emit(`blur`,e)},emitClearEvents(){this.$emit(`clear`),this.$emit(`update:modelValue`,``)},blur(){this.$refs.input.blur()},focus(){this.$refs.input.focus()},select(){this.$refs.input.select()},getMessageKey(e,t){return`message-${e}-${t}`},validateLength(e){this.isInvalid=e>this.validationProps.length.max},clearInput(){this.$refs.input.value=``,this.$refs.input.focus(),this.emitClearEvents()},runValidations(){!this.label&&!this.$attrs[`aria-label`]&&console.info(`[Dialtone] A label is required for accessibility. Provide a label prop and use show-label="false" to hide it visually.`)}}},f=[`aria-details`],p={key:0},m={key:1,"data-qa":`dt-input-length-description`,class:`d-input__length-description`},h=[`read-only`],g=[`name`,`disabled`,`autocomplete`,`maxlength`,`aria-label`,`aria-invalid`,`aria-describedby`],_=[`value`,`name`,`type`,`disabled`,`autocomplete`,`maxlength`,`aria-label`,`aria-invalid`,`aria-describedby`];function v(e,t,n,r,i,a){let o=(0,l.resolveComponent)(`dt-text`),s=(0,l.resolveComponent)(`dt-validation-messages`);return(0,l.openBlock)(),(0,l.createElementBlock)(`div`,{ref:`container`,class:(0,l.normalizeClass)([`d-input__root`,{"d-input--hidden":n.hidden},e.$attrs.class]),style:(0,l.normalizeStyle)(e.$attrs.style),"data-qa":`dt-input`},[(0,l.createElementVNode)(`label`,{class:`d-input__label`,"aria-details":e.$slots.description||n.description?a.descriptionKey:void 0,"data-qa":`dt-input-label-wrapper`},[(0,l.renderSlot)(e.$slots,`label`,{},()=>[n.showLabel&&n.label?((0,l.openBlock)(),(0,l.createBlock)(o,{key:0,ref:`label`,"data-qa":`dt-input-label`,kind:`label`,size:a.resolvedLabelSize,strength:n.labelStrength,tone:`secondary`,class:(0,l.normalizeClass)([`d-input__label-text`,n.labelClass])},{default:(0,l.withCtx)(()=>[(0,l.createTextVNode)((0,l.toDisplayString)(n.label),1)]),_:1},8,[`size`,`strength`,`class`])):(0,l.createCommentVNode)(``,!0)]),i.hasSlotContent(e.$slots.description)||n.description||a.shouldValidateLength?((0,l.openBlock)(),(0,l.createBlock)(o,{key:0,id:a.descriptionKey,ref:`description`,kind:`body`,size:a.resolvedDescriptionSize,tone:`tertiary`,density:a.resolvedDescriptionDensity,as:`div`,class:(0,l.normalizeClass)([`d-input__description`,`d-description`,n.descriptionClass]),"data-qa":`dt-input-description`},{default:(0,l.withCtx)(()=>[i.hasSlotContent(e.$slots.description)||n.description?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,p,[(0,l.renderSlot)(e.$slots,`description`,{},()=>[(0,l.createTextVNode)((0,l.toDisplayString)(n.description),1)])])):(0,l.createCommentVNode)(``,!0),a.shouldValidateLength?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,m,(0,l.toDisplayString)(a.validationProps.length.description),1)):(0,l.createCommentVNode)(``,!0)]),_:3},8,[`id`,`size`,`density`,`class`])):(0,l.createCommentVNode)(``,!0),(0,l.createElementVNode)(`div`,{class:(0,l.normalizeClass)(a.inputWrapperClasses()),"read-only":n.disabled===!0?!0:void 0},[(0,l.createElementVNode)(`span`,{class:(0,l.normalizeClass)([`d-input-icon`,`d-input-icon--left`,n.startIconClass]),"data-qa":`dt-input-left-icon-wrapper`,onFocusout:t[0]||(t[0]=(...e)=>a.onBlur&&a.onBlur(...e))},[e.$slots.startIcon?(0,l.renderSlot)(e.$slots,`startIcon`,{key:0,iconSize:a.iconSize}):(0,l.renderSlot)(e.$slots,`leftIcon`,{key:1,iconSize:a.iconSize})],34),a.isTextarea?((0,l.openBlock)(),(0,l.createElementBlock)(`textarea`,(0,l.mergeProps)({key:0,ref:`input`,name:n.name,disabled:n.disabled,autocomplete:e.$attrs.autocomplete??`off`,class:a.inputClasses(),maxlength:a.shouldLimitMaxLength?a.validationProps.length.max:null,"aria-label":!n.showLabel&&n.label?n.label:void 0,"aria-invalid":a.ariaInvalid,"aria-describedby":a.ariaDescribedBy,"data-qa":`dt-input-input`},a.removeClassStyleAttrs(e.$attrs),(0,l.toHandlers)(a.inputListeners,!0)),null,16,g)):((0,l.openBlock)(),(0,l.createElementBlock)(`input`,(0,l.mergeProps)({key:1,ref:`input`,value:n.modelValue,name:n.name,type:n.type,disabled:n.disabled,autocomplete:e.$attrs.autocomplete??`off`,class:a.inputClasses(),maxlength:a.shouldLimitMaxLength?a.validationProps.length.max:null,"aria-label":!n.showLabel&&n.label?n.label:void 0,"aria-invalid":a.ariaInvalid,"aria-describedby":a.ariaDescribedBy,"data-qa":`dt-input-input`},a.removeClassStyleAttrs(e.$attrs),(0,l.toHandlers)(a.inputListeners,!0)),null,16,_)),(0,l.createElementVNode)(`span`,{class:(0,l.normalizeClass)([`d-input-icon`,`d-input-icon--right`,n.endIconClass]),"data-qa":`dt-input-right-icon-wrapper`,onFocusout:t[1]||(t[1]=(...e)=>a.onBlur&&a.onBlur(...e))},[e.$slots.endIcon?(0,l.renderSlot)(e.$slots,`endIcon`,{key:0,iconSize:a.iconSize,clear:a.clearInput}):(0,l.renderSlot)(e.$slots,`rightIcon`,{key:1,iconSize:a.iconSize,clear:a.clearInput})],34)],10,h)],8,f),(0,l.createVNode)(s,(0,l.mergeProps)(e.messagesChildProps,{id:i.messagesId,"validation-messages":a.validationMessages,"show-messages":e.showMessages,class:e.messagesClass,"data-qa":`dt-input-messages`}),null,16,[`id`,`validation-messages`,`show-messages`,`class`])],6)}var y=i.t(d,[[`render`,v]]);exports.default=y;
|
|
2
2
|
//# sourceMappingURL=input.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.cjs","names":[],"sources":["../../../components/Input/Input.vue"],"sourcesContent":["<template>\n <div\n ref=\"container\"\n :class=\"['d-input__root', { 'd-input--hidden': hidden }, $attrs.class]\"\n :style=\"$attrs.style\"\n data-qa=\"dt-input\"\n >\n <label\n class=\"d-input__label\"\n :aria-details=\"$slots.description || description ? descriptionKey : undefined\"\n data-qa=\"dt-input-label-wrapper\"\n >\n <!-- @slot Slot for label, defaults to label prop -->\n <slot name=\"label\">\n <dt-text\n v-if=\"showLabel && label\"\n ref=\"label\"\n data-qa=\"dt-input-label\"\n kind=\"label\"\n :size=\"resolvedLabelSize\"\n :strength=\"labelStrength\"\n tone=\"secondary\"\n :class=\"['d-input__label-text', labelClass]\"\n >\n {{ label }}\n </dt-text>\n </slot>\n <dt-text\n v-if=\"hasSlotContent($slots.description) || description || shouldValidateLength\"\n :id=\"descriptionKey\"\n ref=\"description\"\n kind=\"body\"\n :size=\"resolvedDescriptionSize\"\n tone=\"tertiary\"\n :density=\"resolvedDescriptionDensity\"\n as=\"div\"\n :class=\"[\n 'd-input__description',\n 'd-description',\n descriptionClass,\n ]\"\n data-qa=\"dt-input-description\"\n >\n <div\n v-if=\"hasSlotContent($slots.description) || description\"\n >\n <!-- @slot Slot for description, defaults to description prop -->\n <slot name=\"description\">{{ description }}</slot>\n </div>\n <div\n v-if=\"shouldValidateLength\"\n data-qa=\"dt-input-length-description\"\n class=\"d-input__length-description\"\n >\n {{ validationProps.length.description }}\n </div>\n </dt-text>\n <div\n :class=\"inputWrapperClasses()\"\n :read-only=\"disabled === true ? true : undefined\"\n >\n <span\n :class=\"['d-input-icon', 'd-input-icon--left', startIconClass]\"\n data-qa=\"dt-input-left-icon-wrapper\"\n @focusout=\"onBlur\"\n >\n <!-- @slot Slot for start icon -->\n <slot\n v-if=\"$slots.startIcon\"\n name=\"startIcon\"\n :icon-size=\"iconSize\"\n />\n <!-- @slot @deprecated Use startIcon -->\n <slot\n v-else\n name=\"leftIcon\"\n :icon-size=\"iconSize\"\n />\n </span>\n <textarea\n v-if=\"isTextarea\"\n ref=\"input\"\n :name=\"name\"\n :disabled=\"disabled\"\n :autocomplete=\"$attrs.autocomplete ?? 'off'\"\n :class=\"inputClasses()\"\n :maxlength=\"shouldLimitMaxLength ? validationProps.length.max : null\"\n :aria-label=\"!showLabel && label ? label : undefined\"\n :aria-invalid=\"ariaInvalid\"\n :aria-describedby=\"ariaDescribedBy\"\n data-qa=\"dt-input-input\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n v-on=\"inputListeners\"\n />\n <input\n v-else\n ref=\"input\"\n :value=\"modelValue\"\n :name=\"name\"\n :type=\"type\"\n :disabled=\"disabled\"\n :autocomplete=\"$attrs.autocomplete ?? 'off'\"\n :class=\"inputClasses()\"\n :maxlength=\"shouldLimitMaxLength ? validationProps.length.max : null\"\n :aria-label=\"!showLabel && label ? label : undefined\"\n :aria-invalid=\"ariaInvalid\"\n :aria-describedby=\"ariaDescribedBy\"\n data-qa=\"dt-input-input\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n v-on=\"inputListeners\"\n >\n <span\n :class=\"['d-input-icon', 'd-input-icon--right', endIconClass]\"\n data-qa=\"dt-input-right-icon-wrapper\"\n @focusout=\"onBlur\"\n >\n <!-- @slot Slot for end icon -->\n <slot\n v-if=\"$slots.endIcon\"\n name=\"endIcon\"\n :icon-size=\"iconSize\"\n :clear=\"clearInput\"\n />\n <!-- @slot @deprecated Use endIcon -->\n <slot\n v-else\n name=\"rightIcon\"\n :icon-size=\"iconSize\"\n :clear=\"clearInput\"\n />\n </span>\n </div>\n </label>\n <dt-validation-messages\n v-bind=\"messagesChildProps\"\n :id=\"messagesId\"\n :validation-messages=\"validationMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n data-qa=\"dt-input-messages\"\n />\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { DESCRIPTION_SIZE_TYPES, VALIDATION_MESSAGE_TYPES } from '@/common/constants';\nimport {\n INPUT_TYPES,\n INPUT_SIZES,\n INPUT_SIZE_CLASSES,\n INPUT_ICON_SIZES,\n INPUT_STATE_CLASSES,\n} from './InputConstants';\nimport {\n getUniqueString,\n getValidationState,\n hasSlotContent,\n removeClassStyleAttrs,\n} from '@/common/utils';\nimport { ordinalSizeValidator } from '@/common/validators';\nimport { DtValidationMessages } from '@/components/ValidationMessages';\nimport { DtText, TEXT_SIZE_MODIFIERS, TEXT_STRENGTH_MODIFIERS } from '@/components/Text';\nimport { MessagesMixin } from '@/common/mixins/input';\n\nconst isValidInputSize = ordinalSizeValidator(INPUT_ICON_SIZES);\n\n/**\n * An input field is an input control that allows users to enter alphanumeric information.\n * It can have a range of options and supports single line and multi-line lengths,\n * as well as varying formats, including numbers, masked passwords, etc.\n * @property {Boolean} placeholder attribute\n * @see https://dialtone.dialpad.com/components/input.html\n */\nexport default {\n name: 'DtInput',\n\n components: { DtValidationMessages, DtText },\n\n mixins: [MessagesMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Name property of the input element\n */\n name: {\n type: String,\n default: '',\n },\n\n /**\n * Type of the input.\n * When `textarea` a `<textarea>` element will be rendered instead of an `<input>` element.\n * @values text, password, email, number, textarea, date, time, file, tel, search, color\n * @default 'text'\n */\n type: {\n type: String,\n default: INPUT_TYPES.TEXT,\n validator: (t) => Object.values(INPUT_TYPES).includes(t),\n },\n\n /**\n * Value of the input\n */\n modelValue: {\n type: [String, Number],\n default: '',\n },\n\n /**\n * Disables the input\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Label for the input.\n * Can also be overridden with a slot of the same name.\n */\n label: {\n type: String,\n default: '',\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n showLabel: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Used to customize the description container\n */\n descriptionClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Size of the input.\n * @values 100, 200, 300, 400, 500\n */\n size: {\n type: [String, Number],\n default: 300,\n validator: isValidInputSize,\n },\n\n /**\n * Additional class name for the input element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n inputClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the input wrapper element.\n * Can accept all of: String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n inputWrapperClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * The current character length that the user has entered into the input.\n * This will only need to be used if you are using `validate.length` and\n * the string contains abnormal characters.\n * For example, an emoji could take up many characters in the input, but should only count as 1 character.\n * If no number is provided, a built-in length calculation will be used for the length validation.\n */\n currentLength: {\n type: Number,\n default: null,\n },\n\n /**\n * Whether the input will continue to display a warning validation message even if the input has lost focus.\n */\n retainWarning: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Validation for the input. Supports maximum length validation with the structure:\n * `{ \"length\": {\"description\": string, \"max\": number, \"warn\": number, \"message\": string,\n * \"limitMaxLength\": boolean }}`\n */\n validate: {\n type: Object,\n default: null,\n },\n\n /**\n * hidden allows to use input without the element visually present in DOM\n */\n hidden: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Overrides the label text size. When not provided, the label size\n * is derived from the component size prop.\n * @values 100, 200, 300, 400\n */\n labelSize: {\n type: [String, Number],\n default: null,\n validator: (s) => TEXT_SIZE_MODIFIERS.label.includes(String(s)),\n },\n\n /**\n * Overrides the label font weight.\n * @values bold, semibold, medium, normal\n */\n labelStrength: {\n type: String,\n default: null,\n validator: (s) => Object.keys(TEXT_STRENGTH_MODIFIERS).includes(s),\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the start icon container\n */\n startIconClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the end icon container\n */\n endIconClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native input blur event\n *\n * @event blur\n * @type {FocusEvent}\n */\n 'blur',\n\n /**\n * Input clear event\n *\n * @event clear\n */\n 'clear',\n\n /**\n * Native input focus event\n *\n * @event focus\n * @type {FocusEvent}\n */\n 'focus',\n\n /**\n * Native input focusin event\n *\n * @event focusin\n * @type {FocusEvent}\n */\n 'focusin',\n\n /**\n * Native input focusout event\n *\n * @event focusout\n * @type {FocusEvent}\n */\n 'focusout',\n\n /**\n * Event fired to sync the modelValue prop with the parent component\n * @event update:modelValue\n * @type {String | Number}\n */\n 'update:modelValue',\n\n /**\n * Length of the input when currentLength prop is not passed\n *\n * @event update:length\n * @type {Number}\n */\n 'update:length',\n\n /**\n * Result of the input validation\n *\n * @event update:invalid\n * @type {Boolean}\n */\n 'update:invalid',\n ],\n\n data () {\n return {\n isInputFocused: false,\n isInvalid: false,\n defaultLength: 0,\n hasSlotContent,\n isComposing: false,\n justEndedComposition: false,\n messagesId: getUniqueString(),\n };\n },\n\n computed: {\n\n isTextarea () {\n return this.type === INPUT_TYPES.TEXTAREA;\n },\n\n isDefaultSize () {\n return String(this.size) === INPUT_SIZES.DEFAULT || String(this.size) === '300';\n },\n\n iconSize () {\n return INPUT_ICON_SIZES[String(this.size)];\n },\n\n isValidSize () {\n return isValidInputSize(this.size);\n },\n\n isValidDescriptionSize () {\n return Object.values(DESCRIPTION_SIZE_TYPES).includes(this.size);\n },\n\n inputComponent () {\n if (this.isTextarea) {\n return 'textarea';\n }\n\n return 'input';\n },\n\n inputListeners () {\n return {\n compositionstart: () => {\n this.isComposing = true;\n },\n\n compositionend: () => {\n this.isComposing = false;\n this.justEndedComposition = true;\n const val = this.$refs.input.value;\n this.$emit('update:modelValue', val);\n // Clear the flag after the current synchronous event processing so\n // Firefox's post-compositionend input event is skipped, but the\n // next real user input (a separate browser task) is not.\n Promise.resolve().then(() => { this.justEndedComposition = false; });\n },\n\n input: async event => {\n if (this.isComposing) return;\n if (this.justEndedComposition) return;\n let val = event.target.value;\n if (this.type === INPUT_TYPES.FILE) {\n const files = Array.from(event.target.files);\n val = files.map(file => file.name);\n }\n this.$emit('update:modelValue', val);\n },\n\n blur: event => {\n this.isInputFocused = false;\n this.onBlur(event);\n },\n\n focus: event => {\n this.isInputFocused = true;\n this.$emit('focus', event);\n },\n\n focusin: event => this.$emit('focusin', event),\n focusout: event => this.$emit('focusout', event),\n };\n },\n\n descriptionKey () {\n return `input-description-${getUniqueString()}`;\n },\n\n inputState () {\n return getValidationState(this.validationMessages);\n },\n\n ariaInvalid () {\n return this.inputState === VALIDATION_MESSAGE_TYPES.CRITICAL ? 'true' : undefined;\n },\n\n ariaDescribedBy () {\n return this.showMessages && this.validationMessages.length > 0 ? this.messagesId : undefined;\n },\n\n defaultLengthCalculation () {\n return this.calculateLength(this.modelValue);\n },\n\n validationProps () {\n return {\n length: {\n description: this?.validate?.length?.description,\n max: this?.validate?.length?.max,\n warn: this?.validate?.length?.warn,\n message: this?.validate?.length?.message,\n limitMaxLength: this?.validate?.length?.limitMaxLength ? this.validate.length.limitMaxLength : false,\n },\n };\n },\n\n validationMessages () {\n // Add length validation message if exists\n if (this.showLengthLimitValidation) {\n return this.formattedMessages.concat([this.inputLengthErrorMessage()]);\n }\n\n return this.formattedMessages;\n },\n\n showInputState () {\n return this.showMessages && this.inputState;\n },\n\n inputLength () {\n return this.currentLength ? this.currentLength : this.defaultLengthCalculation;\n },\n\n inputLengthState () {\n if (this.inputLength < this.validationProps.length.warn) {\n return null;\n } else if (this.inputLength <= this.validationProps.length.max) {\n return this.validationProps.length.warn ? VALIDATION_MESSAGE_TYPES.WARNING : null;\n } else {\n return VALIDATION_MESSAGE_TYPES.CRITICAL;\n }\n },\n\n shouldValidateLength () {\n return !!(\n this.validationProps.length.description &&\n this.validationProps.length.max\n );\n },\n\n shouldLimitMaxLength () {\n return this.shouldValidateLength && this.validationProps.length.limitMaxLength;\n },\n\n showLengthLimitValidation () {\n return (\n this.shouldValidateLength &&\n this.inputLengthState !== null &&\n this.validationProps.length.message &&\n (this.retainWarning || this.isInputFocused || this.isInvalid)\n );\n },\n\n resolvedLabelSize () {\n if (this.labelSize != null) return this.labelSize;\n const sizeStr = String(this.size);\n // xl/500 exceeds label's max size — cap at lg/400\n if (sizeStr === 'xl' || sizeStr === '500') return sizeStr === '500' ? '400' : 'lg';\n return this.size;\n },\n\n resolvedDescriptionSize () {\n const map = {\n 100: 'xs', 200: 'xs', 300: 'sm', 400: 'sm', 500: 'md',\n xs: 'xs', sm: 'xs', md: 'sm', lg: 'sm', xl: 'md',\n };\n return map[String(this.size)] || 'sm';\n },\n\n resolvedDescriptionDensity () {\n const sizeStr = String(this.size);\n return (sizeStr === 'xl' || sizeStr === '500') ? '300' : undefined;\n },\n\n sizeModifierClass () {\n if (this.isDefaultSize || !this.isValidSize) {\n return '';\n }\n\n return INPUT_SIZE_CLASSES[this.inputComponent][String(this.size)];\n },\n\n stateClass () {\n return [INPUT_STATE_CLASSES[this.inputState]];\n },\n },\n\n watch: {\n isInvalid (val) {\n this.$emit('update:invalid', val);\n },\n\n modelValue: {\n immediate: true,\n handler (newValue) {\n if (this.shouldValidateLength) {\n this.validateLength(this.inputLength);\n }\n\n if (this.currentLength == null) {\n this.$emit('update:length', this.calculateLength(newValue));\n }\n\n // Set textarea value programmatically to avoid attribute binding\n // Skip during IME composition to avoid interrupting in-progress input\n if (this.isTextarea && !this.isComposing && this.$refs.input && this.$refs.input.value !== newValue) {\n this.$refs.input.value = newValue;\n }\n },\n },\n },\n\n mounted () {\n // Set initial textarea value programmatically\n if (this.isTextarea && this.$refs.input) {\n this.$refs.input.value = this.modelValue;\n }\n this.runValidations();\n },\n\n methods: {\n removeClassStyleAttrs,\n inputClasses () {\n return [\n 'd-input__input',\n this.inputComponent === 'input' ? 'd-input' : 'd-textarea',\n {\n [this.stateClass]: this.showInputState,\n 'd-input-icon--left': this.$slots.startIcon || this.$slots.leftIcon,\n 'd-input-icon--right': this.$slots.endIcon || this.$slots.rightIcon,\n },\n this.sizeModifierClass,\n this.inputClass,\n ];\n },\n\n inputWrapperClasses () {\n if (this.hidden) {\n return [];\n }\n return [\n 'd-input__wrapper',\n { [this.stateClass]: this.showInputState },\n this.inputWrapperClass,\n ];\n },\n\n calculateLength (value) {\n if (typeof value !== 'string') {\n return 0;\n }\n\n return [...value].length;\n },\n\n inputLengthErrorMessage () {\n return {\n message: this.validationProps.length.message,\n type: this.inputLengthState,\n };\n },\n\n onBlur (e) {\n // Do not emit a blur event if the target element is a child of this component\n if (!this.$refs.container?.contains(e.relatedTarget)) {\n this.$emit('blur', e);\n }\n },\n\n emitClearEvents () {\n this.$emit('clear');\n this.$emit('update:modelValue', '');\n },\n\n blur () {\n this.$refs.input.blur();\n },\n\n focus () {\n this.$refs.input.focus();\n },\n\n select () {\n this.$refs.input.select();\n },\n\n getMessageKey (type, index) {\n return `message-${type}-${index}`;\n },\n\n validateLength (length) {\n this.isInvalid = (length > this.validationProps.length.max);\n },\n\n clearInput () {\n this.$refs.input.value = '';\n this.$refs.input.focus();\n this.emitClearEvents();\n },\n\n runValidations () {\n if (!this.label && !this.$attrs['aria-label']) {\n console.info(\n '[Dialtone] A label is required for accessibility. Provide a label prop and use show-label=\"false\" to hide it visually.',\n );\n }\n },\n },\n};\n</script>\n"],"mappings":"sjBAqKA,IAAM,EAAmB,EAAA,qBAAqB,EAAA,iBAAiB,CAS1D,EAAU,CACb,KAAM,UAEN,WAAY,CAAE,qBAAA,EAAA,QAAsB,OAAA,EAAA,EAAQ,CAE5C,OAAQ,CAAC,EAAA,cAAc,CAEvB,aAAc,GAEd,MAAO,CAIL,KAAM,CACJ,KAAM,OACN,QAAS,GACV,CAQD,KAAM,CACJ,KAAM,OACN,QAAS,EAAA,YAAY,KACrB,UAAY,GAAM,OAAO,OAAO,EAAA,YAAY,CAAC,SAAS,EAAE,CACzD,CAKD,WAAY,CACV,KAAM,CAAC,OAAQ,OAAO,CACtB,QAAS,GACV,CAMD,SAAU,CACR,KAAM,QACN,QAAS,GACV,CAMD,MAAO,CACL,KAAM,OACN,QAAS,GACV,CAMD,UAAW,CACT,KAAM,QACN,QAAS,GACV,CAKD,YAAa,CACX,KAAM,OACN,QAAS,GACV,CAKD,iBAAkB,CAChB,KAAM,CAAC,OAAQ,MAAO,OAAO,CAC7B,QAAS,GACV,CAMD,KAAM,CACJ,KAAM,CAAC,OAAQ,OAAO,CACtB,QAAS,IACT,UAAW,EACZ,CAOD,WAAY,CACV,KAAM,CAAC,OAAQ,OAAQ,MAAM,CAC7B,QAAS,GACV,CAOD,kBAAmB,CACjB,KAAM,CAAC,OAAQ,OAAQ,MAAM,CAC7B,QAAS,GACV,CASD,cAAe,CACb,KAAM,OACN,QAAS,KACV,CAKD,cAAe,CACb,KAAM,QACN,QAAS,GACV,CAOD,SAAU,CACR,KAAM,OACN,QAAS,KACV,CAKD,OAAQ,CACN,KAAM,QACN,QAAS,GACV,CAOD,UAAW,CACT,KAAM,CAAC,OAAQ,OAAO,CACtB,QAAS,KACT,UAAY,GAAM,EAAA,oBA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kBrB,SAAA,EAAA,EAAA,YAAA,OAdC,IAAI,QACH,MAAO,EAAA,WACP,KAAM,EAAA,KACN,KAAM,EAAA,KACN,SAAU,EAAA,SACV,aAAc,EAAA,OAAO,cAAY,MACjC,MAAO,EAAA,cAAY,CACnB,UAAW,EAAA,qBAAuB,EAAA,gBAAgB,OAAO,IAAG,KAC5D,aAAU,CAAG,EAAA,WAAa,EAAA,MAAQ,EAAA,MAAQ,IAAA,GAC1C,eAAc,EAAA,YACd,mBAAkB,EAAA,gBACnB,UAAQ,kBACA,EAAA,sBAAsB,EAAA,OAAM,EAAA,EAAA,EAAA,YACf,EAAf,eAAc,GAAA,CAAA,CAAA,KAAA,GAAA,EAAA,2BAqBf,OAAA,CAlBJ,OAAA,EAAA,EAAA,gBAAK,CAAA,eAAA,sBAA0C,EAAA,aAAY,CAAA,CAC5D,UAAQ,8BACP,WAAQ,EAAA,KAAA,EAAA,IAAA,GAAA,IAAE,EAAA,QAAA,EAAA,OAAA,GAAA,EAAM,IAIT,EAAA,OAAO,SAAA,EAAA,EAAA,YAIb,EAAA,OAAA,UAAA,OAFC,SAAW,EAAA,SACX,MAAO,EAAA,8BAQR,EAAA,OAAA,YAAA,OAFC,SAAW,EAAA,SACX,MAAO,EAAA,iDAYd,GAAA,EAAA,EAAA,YAAA,EANQ,mBAAkB,CACzB,GAAI,EAAA,WACJ,sBAAqB,EAAA,mBACrB,gBAAe,EAAA,aACf,MAAO,EAAA,cACR,UAAQ"}
|
|
1
|
+
{"version":3,"file":"input.cjs","names":[],"sources":["../../../components/Input/Input.vue"],"sourcesContent":["<template>\n <div\n ref=\"container\"\n :class=\"['d-input__root', { 'd-input--hidden': hidden }, $attrs.class]\"\n :style=\"$attrs.style\"\n data-qa=\"dt-input\"\n >\n <label\n class=\"d-input__label\"\n :aria-details=\"$slots.description || description ? descriptionKey : undefined\"\n data-qa=\"dt-input-label-wrapper\"\n >\n <!-- @slot Slot for label, defaults to label prop -->\n <slot name=\"label\">\n <dt-text\n v-if=\"showLabel && label\"\n ref=\"label\"\n data-qa=\"dt-input-label\"\n kind=\"label\"\n :size=\"resolvedLabelSize\"\n :strength=\"labelStrength\"\n tone=\"secondary\"\n :class=\"['d-input__label-text', labelClass]\"\n >\n {{ label }}\n </dt-text>\n </slot>\n <dt-text\n v-if=\"hasSlotContent($slots.description) || description || shouldValidateLength\"\n :id=\"descriptionKey\"\n ref=\"description\"\n kind=\"body\"\n :size=\"resolvedDescriptionSize\"\n tone=\"tertiary\"\n :density=\"resolvedDescriptionDensity\"\n as=\"div\"\n :class=\"[\n 'd-input__description',\n 'd-description',\n descriptionClass,\n ]\"\n data-qa=\"dt-input-description\"\n >\n <div\n v-if=\"hasSlotContent($slots.description) || description\"\n >\n <!-- @slot Slot for description, defaults to description prop -->\n <slot name=\"description\">{{ description }}</slot>\n </div>\n <div\n v-if=\"shouldValidateLength\"\n data-qa=\"dt-input-length-description\"\n class=\"d-input__length-description\"\n >\n {{ validationProps.length.description }}\n </div>\n </dt-text>\n <div\n :class=\"inputWrapperClasses()\"\n :read-only=\"disabled === true ? true : undefined\"\n >\n <span\n :class=\"['d-input-icon', 'd-input-icon--left', startIconClass]\"\n data-qa=\"dt-input-left-icon-wrapper\"\n @focusout=\"onBlur\"\n >\n <!-- @slot Slot for start icon -->\n <slot\n v-if=\"$slots.startIcon\"\n name=\"startIcon\"\n :icon-size=\"iconSize\"\n />\n <!-- @slot @deprecated Use startIcon -->\n <slot\n v-else\n name=\"leftIcon\"\n :icon-size=\"iconSize\"\n />\n </span>\n <textarea\n v-if=\"isTextarea\"\n ref=\"input\"\n :name=\"name\"\n :disabled=\"disabled\"\n :autocomplete=\"$attrs.autocomplete ?? 'off'\"\n :class=\"inputClasses()\"\n :maxlength=\"shouldLimitMaxLength ? validationProps.length.max : null\"\n :aria-label=\"!showLabel && label ? label : undefined\"\n :aria-invalid=\"ariaInvalid\"\n :aria-describedby=\"ariaDescribedBy\"\n data-qa=\"dt-input-input\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n v-on=\"inputListeners\"\n />\n <input\n v-else\n ref=\"input\"\n :value=\"modelValue\"\n :name=\"name\"\n :type=\"type\"\n :disabled=\"disabled\"\n :autocomplete=\"$attrs.autocomplete ?? 'off'\"\n :class=\"inputClasses()\"\n :maxlength=\"shouldLimitMaxLength ? validationProps.length.max : null\"\n :aria-label=\"!showLabel && label ? label : undefined\"\n :aria-invalid=\"ariaInvalid\"\n :aria-describedby=\"ariaDescribedBy\"\n data-qa=\"dt-input-input\"\n v-bind=\"removeClassStyleAttrs($attrs)\"\n v-on=\"inputListeners\"\n >\n <span\n :class=\"['d-input-icon', 'd-input-icon--right', endIconClass]\"\n data-qa=\"dt-input-right-icon-wrapper\"\n @focusout=\"onBlur\"\n >\n <!-- @slot Slot for end icon -->\n <slot\n v-if=\"$slots.endIcon\"\n name=\"endIcon\"\n :icon-size=\"iconSize\"\n :clear=\"clearInput\"\n />\n <!-- @slot @deprecated Use endIcon -->\n <slot\n v-else\n name=\"rightIcon\"\n :icon-size=\"iconSize\"\n :clear=\"clearInput\"\n />\n </span>\n </div>\n </label>\n <dt-validation-messages\n v-bind=\"messagesChildProps\"\n :id=\"messagesId\"\n :validation-messages=\"validationMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n data-qa=\"dt-input-messages\"\n />\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { DESCRIPTION_SIZE_TYPES, VALIDATION_MESSAGE_TYPES } from '@/common/constants';\nimport {\n INPUT_TYPES,\n INPUT_SIZES,\n INPUT_SIZE_CLASSES,\n INPUT_ICON_SIZES,\n INPUT_STATE_CLASSES,\n} from './InputConstants';\nimport {\n getUniqueString,\n getValidationState,\n hasSlotContent,\n removeClassStyleAttrs,\n} from '@/common/utils';\nimport { ordinalSizeValidator } from '@/common/validators';\nimport { DtValidationMessages } from '@/components/ValidationMessages';\nimport { DtText, TEXT_SIZE_MODIFIERS, TEXT_STRENGTH_MODIFIERS } from '@/components/Text';\nimport { MessagesMixin } from '@/common/mixins/input';\n\nconst isValidInputSize = ordinalSizeValidator(INPUT_ICON_SIZES);\n\n/**\n * An input field is an input control that allows users to enter alphanumeric information.\n * It can have a range of options and supports single line and multi-line lengths,\n * as well as varying formats, including numbers, masked passwords, etc.\n * @property {Boolean} placeholder attribute\n * @see https://dialtone.dialpad.com/components/input.html\n */\nexport default {\n name: 'DtInput',\n\n components: { DtValidationMessages, DtText },\n\n mixins: [MessagesMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Name property of the input element\n */\n name: {\n type: String,\n default: '',\n },\n\n /**\n * Type of the input.\n * When `textarea` a `<textarea>` element will be rendered instead of an `<input>` element.\n * @values text, password, email, number, textarea, date, time, file, tel, search, color\n * @default 'text'\n */\n type: {\n type: String,\n default: INPUT_TYPES.TEXT,\n validator: (t) => Object.values(INPUT_TYPES).includes(t),\n },\n\n /**\n * Value of the input\n */\n modelValue: {\n type: [String, Number],\n default: '',\n },\n\n /**\n * Disables the input\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Label for the input.\n * Can also be overridden with a slot of the same name.\n */\n label: {\n type: String,\n default: '',\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n showLabel: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Used to customize the description container\n */\n descriptionClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Size of the input.\n * @values 100, 200, 300, 400, 500\n */\n size: {\n type: [String, Number],\n default: 300,\n validator: isValidInputSize,\n },\n\n /**\n * Additional class name for the input element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n inputClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the input wrapper element.\n * Can accept all of: String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n inputWrapperClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * The current character length that the user has entered into the input.\n * This will only need to be used if you are using `validate.length` and\n * the string contains abnormal characters.\n * For example, an emoji could take up many characters in the input, but should only count as 1 character.\n * If no number is provided, a built-in length calculation will be used for the length validation.\n */\n currentLength: {\n type: Number,\n default: null,\n },\n\n /**\n * Whether the input will continue to display a warning validation message even if the input has lost focus.\n */\n retainWarning: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Validation for the input. Supports maximum length validation with the structure:\n * `{ \"length\": {\"description\": string, \"max\": number, \"warn\": number, \"message\": string,\n * \"limitMaxLength\": boolean }}`\n */\n validate: {\n type: Object,\n default: null,\n },\n\n /**\n * hidden allows to use input without the element visually present in DOM\n */\n hidden: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Overrides the label text size. When not provided, the label size\n * is derived from the component size prop.\n * @values 100, 200, 300, 400\n */\n labelSize: {\n type: [String, Number],\n default: null,\n validator: (s) => TEXT_SIZE_MODIFIERS.label.includes(String(s)),\n },\n\n /**\n * Overrides the label font weight.\n * @values bold, semibold, medium, normal\n */\n labelStrength: {\n type: String,\n default: null,\n validator: (s) => Object.keys(TEXT_STRENGTH_MODIFIERS).includes(s),\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the start icon container\n */\n startIconClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Used to customize the end icon container\n */\n endIconClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native input blur event\n *\n * @event blur\n * @type {FocusEvent}\n */\n 'blur',\n\n /**\n * Input clear event\n *\n * @event clear\n */\n 'clear',\n\n /**\n * Native input focus event\n *\n * @event focus\n * @type {FocusEvent}\n */\n 'focus',\n\n /**\n * Native input focusin event\n *\n * @event focusin\n * @type {FocusEvent}\n */\n 'focusin',\n\n /**\n * Native input focusout event\n *\n * @event focusout\n * @type {FocusEvent}\n */\n 'focusout',\n\n /**\n * Event fired to sync the modelValue prop with the parent component\n * @event update:modelValue\n * @type {String | Number}\n */\n 'update:modelValue',\n\n /**\n * Length of the input when currentLength prop is not passed\n *\n * @event update:length\n * @type {Number}\n */\n 'update:length',\n\n /**\n * Result of the input validation\n *\n * @event update:invalid\n * @type {Boolean}\n */\n 'update:invalid',\n ],\n\n data () {\n return {\n isInputFocused: false,\n isInvalid: false,\n defaultLength: 0,\n hasSlotContent,\n isComposing: false,\n justEndedComposition: false,\n messagesId: getUniqueString(),\n };\n },\n\n computed: {\n\n isTextarea () {\n return this.type === INPUT_TYPES.TEXTAREA;\n },\n\n isDefaultSize () {\n return String(this.size) === INPUT_SIZES.DEFAULT || String(this.size) === '300';\n },\n\n iconSize () {\n return INPUT_ICON_SIZES[String(this.size)];\n },\n\n isValidSize () {\n return isValidInputSize(this.size);\n },\n\n isValidDescriptionSize () {\n return Object.values(DESCRIPTION_SIZE_TYPES).includes(this.size);\n },\n\n inputComponent () {\n if (this.isTextarea) {\n return 'textarea';\n }\n\n return 'input';\n },\n\n inputListeners () {\n return {\n compositionstart: () => {\n this.isComposing = true;\n },\n\n compositionend: () => {\n this.isComposing = false;\n this.justEndedComposition = true;\n const val = this.$refs.input.value;\n this.$emit('update:modelValue', val);\n // Clear the flag after the current synchronous event processing so\n // Firefox's post-compositionend input event is skipped, but the\n // next real user input (a separate browser task) is not.\n Promise.resolve().then(() => { this.justEndedComposition = false; });\n },\n\n input: async event => {\n if (this.isComposing) return;\n if (this.justEndedComposition) return;\n let val = event.target.value;\n if (this.type === INPUT_TYPES.FILE) {\n const files = Array.from(event.target.files);\n val = files.map(file => file.name);\n }\n this.$emit('update:modelValue', val);\n },\n\n blur: event => {\n this.isInputFocused = false;\n this.onBlur(event);\n },\n\n focus: event => {\n this.isInputFocused = true;\n this.$emit('focus', event);\n },\n\n focusin: event => this.$emit('focusin', event),\n focusout: event => this.$emit('focusout', event),\n };\n },\n\n descriptionKey () {\n return `input-description-${getUniqueString()}`;\n },\n\n inputState () {\n return getValidationState(this.validationMessages);\n },\n\n ariaInvalid () {\n return this.inputState === VALIDATION_MESSAGE_TYPES.CRITICAL ? 'true' : undefined;\n },\n\n ariaDescribedBy () {\n return this.showMessages && this.validationMessages.length > 0 ? this.messagesId : undefined;\n },\n\n defaultLengthCalculation () {\n return this.calculateLength(this.modelValue);\n },\n\n validationProps () {\n return {\n length: {\n description: this?.validate?.length?.description,\n max: this?.validate?.length?.max,\n warn: this?.validate?.length?.warn,\n message: this?.validate?.length?.message,\n limitMaxLength: this?.validate?.length?.limitMaxLength ? this.validate.length.limitMaxLength : false,\n },\n };\n },\n\n validationMessages () {\n // Add length validation message if exists\n if (this.showLengthLimitValidation) {\n return this.formattedMessages.concat([this.inputLengthErrorMessage()]);\n }\n\n return this.formattedMessages;\n },\n\n showInputState () {\n return this.showMessages && this.inputState;\n },\n\n inputLength () {\n return this.currentLength ? this.currentLength : this.defaultLengthCalculation;\n },\n\n inputLengthState () {\n if (this.inputLength < this.validationProps.length.warn) {\n return null;\n } else if (this.inputLength <= this.validationProps.length.max) {\n return this.validationProps.length.warn ? VALIDATION_MESSAGE_TYPES.WARNING : null;\n } else {\n return VALIDATION_MESSAGE_TYPES.CRITICAL;\n }\n },\n\n shouldValidateLength () {\n return !!(\n this.validationProps.length.description &&\n this.validationProps.length.max\n );\n },\n\n shouldLimitMaxLength () {\n return this.shouldValidateLength && this.validationProps.length.limitMaxLength;\n },\n\n showLengthLimitValidation () {\n return (\n this.shouldValidateLength &&\n this.inputLengthState !== null &&\n this.validationProps.length.message &&\n (this.retainWarning || this.isInputFocused || this.isInvalid)\n );\n },\n\n resolvedLabelSize () {\n if (this.labelSize != null) return this.labelSize;\n const sizeStr = String(this.size);\n // xl/500 exceeds label's max size — cap at lg/400\n if (sizeStr === 'xl' || sizeStr === '500') return sizeStr === '500' ? '400' : 'lg';\n return this.size;\n },\n\n resolvedDescriptionSize () {\n const map = {\n 100: 'xs', 200: 'xs', 300: 'sm', 400: 'sm', 500: 'md',\n xs: 'xs', sm: 'xs', md: 'sm', lg: 'sm', xl: 'md',\n };\n return map[String(this.size)] || 'sm';\n },\n\n resolvedDescriptionDensity () {\n const sizeStr = String(this.size);\n return (sizeStr === 'xl' || sizeStr === '500') ? '300' : undefined;\n },\n\n sizeModifierClass () {\n if (this.isDefaultSize || !this.isValidSize) {\n return '';\n }\n\n return INPUT_SIZE_CLASSES[this.inputComponent][String(this.size)];\n },\n\n stateClass () {\n return [INPUT_STATE_CLASSES[this.inputState]];\n },\n },\n\n watch: {\n isInvalid (val) {\n this.$emit('update:invalid', val);\n },\n\n modelValue: {\n immediate: true,\n handler (newValue) {\n if (this.shouldValidateLength) {\n this.validateLength(this.inputLength);\n }\n\n if (this.currentLength == null) {\n this.$emit('update:length', this.calculateLength(newValue));\n }\n\n // Set textarea value programmatically to avoid attribute binding\n // Skip during IME composition to avoid interrupting in-progress input\n if (this.isTextarea && !this.isComposing && this.$refs.input && this.$refs.input.value !== newValue) {\n this.$refs.input.value = newValue;\n }\n },\n },\n },\n\n mounted () {\n // Set initial textarea value programmatically\n if (this.isTextarea && this.$refs.input) {\n this.$refs.input.value = this.modelValue;\n }\n this.runValidations();\n },\n\n methods: {\n removeClassStyleAttrs,\n inputClasses () {\n return [\n 'd-input__input',\n this.inputComponent === 'input' ? 'd-input' : 'd-textarea',\n {\n [this.stateClass]: this.showInputState,\n 'd-input-icon--left': this.$slots.startIcon || this.$slots.leftIcon,\n 'd-input-icon--right': this.$slots.endIcon || this.$slots.rightIcon,\n },\n this.sizeModifierClass,\n this.inputClass,\n ];\n },\n\n inputWrapperClasses () {\n if (this.hidden) {\n return [];\n }\n return [\n 'd-input__wrapper',\n { [this.stateClass]: this.showInputState },\n this.inputWrapperClass,\n ];\n },\n\n calculateLength (value) {\n if (typeof value !== 'string') {\n return 0;\n }\n\n return [...value].length;\n },\n\n inputLengthErrorMessage () {\n return {\n message: this.validationProps.length.message,\n type: this.inputLengthState,\n };\n },\n\n onBlur (e) {\n // Do not emit a blur event if the target element is a child of this component\n if (!this.$refs.container?.contains(e.relatedTarget)) {\n this.$emit('blur', e);\n }\n },\n\n emitClearEvents () {\n this.$emit('clear');\n this.$emit('update:modelValue', '');\n },\n\n blur () {\n this.$refs.input.blur();\n },\n\n focus () {\n this.$refs.input.focus();\n },\n\n select () {\n this.$refs.input.select();\n },\n\n getMessageKey (type, index) {\n return `message-${type}-${index}`;\n },\n\n validateLength (length) {\n this.isInvalid = (length > this.validationProps.length.max);\n },\n\n clearInput () {\n this.$refs.input.value = '';\n this.$refs.input.focus();\n this.emitClearEvents();\n },\n\n runValidations () {\n if (!this.label && !this.$attrs['aria-label']) {\n console.info(\n '[Dialtone] A label is required for accessibility. Provide a label prop and use show-label=\"false\" to hide it visually.',\n );\n }\n },\n },\n};\n</script>\n"],"mappings":"kjBAqKA,IAAM,EAAmB,EAAA,qBAAqB,EAAA,iBAAiB,CAS1D,EAAU,CACb,KAAM,UAEN,WAAY,CAAE,qBAAA,EAAA,QAAsB,OAAA,EAAA,EAAQ,CAE5C,OAAQ,CAAC,EAAA,cAAc,CAEvB,aAAc,GAEd,MAAO,CAIL,KAAM,CACJ,KAAM,OACN,QAAS,GACV,CAQD,KAAM,CACJ,KAAM,OACN,QAAS,EAAA,YAAY,KACrB,UAAY,GAAM,OAAO,OAAO,EAAA,YAAY,CAAC,SAAS,EAAE,CACzD,CAKD,WAAY,CACV,KAAM,CAAC,OAAQ,OAAO,CACtB,QAAS,GACV,CAMD,SAAU,CACR,KAAM,QACN,QAAS,GACV,CAMD,MAAO,CACL,KAAM,OACN,QAAS,GACV,CAMD,UAAW,CACT,KAAM,QACN,QAAS,GACV,CAKD,YAAa,CACX,KAAM,OACN,QAAS,GACV,CAKD,iBAAkB,CAChB,KAAM,CAAC,OAAQ,MAAO,OAAO,CAC7B,QAAS,GACV,CAMD,KAAM,CACJ,KAAM,CAAC,OAAQ,OAAO,CACtB,QAAS,IACT,UAAW,EACZ,CAOD,WAAY,CACV,KAAM,CAAC,OAAQ,OAAQ,MAAM,CAC7B,Q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lib/input/input.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { DESCRIPTION_SIZE_TYPES as e, VALIDATION_MESSAGE_TYPES as t } from "../../common/constants/index.js";
|
|
2
2
|
import { ordinalSizeValidator as n } from "../../common/validators/index.js";
|
|
3
|
-
import {
|
|
3
|
+
import { D as r, _ as i, h as a, m as o } from "../../utils-CXaaZqVu.js";
|
|
4
4
|
import { MessagesMixin as s } from "../../common/mixins/input.js";
|
|
5
|
-
import { t as c } from "../../_plugin-vue_export-helper-
|
|
5
|
+
import { t as c } from "../../_plugin-vue_export-helper-B52Kst-M.js";
|
|
6
6
|
import l from "../validation-messages/validation-messages.js";
|
|
7
7
|
import { TEXT_SIZE_MODIFIERS as u, TEXT_STRENGTH_MODIFIERS as d } from "../text/text-constants.js";
|
|
8
|
-
import { t as f } from "../../Text-
|
|
8
|
+
import { t as f } from "../../Text-B6HaId2l.js";
|
|
9
9
|
import { INPUT_ICON_SIZES as p, INPUT_SIZES as m, INPUT_SIZE_CLASSES as h, INPUT_STATE_CLASSES as g, INPUT_TYPES as _ } from "./input-constants.js";
|
|
10
10
|
import { createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, mergeProps as w, normalizeClass as T, normalizeStyle as E, openBlock as D, renderSlot as O, resolveComponent as k, toDisplayString as A, toHandlers as j, withCtx as M } from "vue";
|
|
11
11
|
//#region components/Input/Input.vue
|
|
@@ -142,10 +142,10 @@ var N = n(p), P = {
|
|
|
142
142
|
isInputFocused: !1,
|
|
143
143
|
isInvalid: !1,
|
|
144
144
|
defaultLength: 0,
|
|
145
|
-
hasSlotContent:
|
|
145
|
+
hasSlotContent: i,
|
|
146
146
|
isComposing: !1,
|
|
147
147
|
justEndedComposition: !1,
|
|
148
|
-
messagesId:
|
|
148
|
+
messagesId: o()
|
|
149
149
|
};
|
|
150
150
|
},
|
|
151
151
|
computed: {
|
|
@@ -195,10 +195,10 @@ var N = n(p), P = {
|
|
|
195
195
|
};
|
|
196
196
|
},
|
|
197
197
|
descriptionKey() {
|
|
198
|
-
return `input-description-${
|
|
198
|
+
return `input-description-${o()}`;
|
|
199
199
|
},
|
|
200
200
|
inputState() {
|
|
201
|
-
return
|
|
201
|
+
return a(this.validationMessages);
|
|
202
202
|
},
|
|
203
203
|
ariaInvalid() {
|
|
204
204
|
return this.inputState === t.CRITICAL ? "true" : void 0;
|
|
@@ -284,7 +284,7 @@ var N = n(p), P = {
|
|
|
284
284
|
this.isTextarea && this.$refs.input && (this.$refs.input.value = this.modelValue), this.runValidations();
|
|
285
285
|
},
|
|
286
286
|
methods: {
|
|
287
|
-
removeClassStyleAttrs:
|
|
287
|
+
removeClassStyleAttrs: r,
|
|
288
288
|
inputClasses() {
|
|
289
289
|
return [
|
|
290
290
|
"d-input__input",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../components/InputGroup/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-BK-Lzi7j.cjs`);const e=require(`../../common/constants/index.cjs`),t=require(`../../utils-Db-kV6Sr.cjs`),n=require(`../../_plugin-vue_export-helper-CX7YVcP6.cjs`),r=require(`../validation-messages/validation-messages.cjs`),i=require(`../../common/mixins/input-group.cjs`),a=require(`../../Text-BosPFEHO.cjs`);let o=require(`vue`);var s={name:`DtInputGroup`,components:{DtValidationMessages:r.default,DtText:a.t},mixins:[i.InputGroupMixin],props:{dataQaGroup:{type:String,default:`input-group`},dataQaGroupLegend:{type:String,default:`input-group-legend`},dataQaGroupMessages:{type:String,default:`input-group-messages`}},data(){return{internalValue:this.value,hasSlotContent:t._,messagesId:t.m()}},computed:{ariaInvalid(){return t.h(this.formattedMessages)===e.VALIDATION_MESSAGE_TYPES.CRITICAL?`true`:void 0},ariaDescribedBy(){return this.showMessages&&this.formattedMessages.length>0?this.messagesId:void 0}},watch:{value(e){this.internalValue=e},internalValue:{immediate:!0,handler(e){this.provideObj.value=e}}},methods:{getMessageKey(e,t){return`input-group-message-${e}-${t}-${this.id}`}}},c=[`data-qa`,`aria-invalid`,`aria-describedby`];function l(e,t,n,r,i,a){let s=(0,o.resolveComponent)(`dt-text`),l=(0,o.resolveComponent)(`dt-validation-messages`);return(0,o.openBlock)(),(0,o.createElementBlock)(`fieldset`,{class:`d-input-group__fieldset`,"data-qa":n.dataQaGroup,"aria-invalid":a.ariaInvalid,"aria-describedby":a.ariaDescribedBy},[i.hasSlotContent(e.$slots.legend)||e.legend?((0,o.openBlock)(),(0,o.createBlock)(s,(0,o.mergeProps)({key:0,kind:`label`,as:`legend`,tone:`secondary`,class:[`d-input-group__legend-text`,e.legendClass]},e.legendChildProps,{"data-qa":n.dataQaGroupLegend}),{default:(0,o.withCtx)(()=>[(0,o.renderSlot)(e.$slots,`legend`,{},()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.legend),1)])]),_:3},16,[`class`,`data-qa`])):(0,o.createCommentVNode)(``,!0),(0,o.renderSlot)(e.$slots,`default`),(0,o.createVNode)(l,(0,o.mergeProps)(e.messagesChildProps,{id:i.messagesId,"validation-messages":e.formattedMessages,"show-messages":e.showMessages,class:e.messagesClass,"data-qa":n.dataQaGroupMessages}),null,16,[`id`,`validation-messages`,`show-messages`,`class`,`data-qa`])],8,c)}var u=n.t(s,[[`render`,l]]);exports.default=u;
|
|
2
2
|
//# sourceMappingURL=input-group.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-group.cjs","names":[],"sources":["../../../components/InputGroup/InputGroup.vue"],"sourcesContent":["<template>\n <fieldset\n class=\"d-input-group__fieldset\"\n :data-qa=\"dataQaGroup\"\n :aria-invalid=\"ariaInvalid\"\n :aria-describedby=\"ariaDescribedBy\"\n >\n <dt-text\n v-if=\"hasSlotContent($slots.legend) || legend\"\n kind=\"label\"\n as=\"legend\"\n tone=\"secondary\"\n :class=\"['d-input-group__legend-text', legendClass]\"\n v-bind=\"legendChildProps\"\n :data-qa=\"dataQaGroupLegend\"\n >\n <!-- @slot slot for Input Group Legend -->\n <slot name=\"legend\">\n {{ legend }}\n </slot>\n </dt-text>\n <!-- @slot slot for Input Group Components -->\n <slot />\n <dt-validation-messages\n v-bind=\"messagesChildProps\"\n :id=\"messagesId\"\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n :data-qa=\"dataQaGroupMessages\"\n />\n </fieldset>\n</template>\n\n<script>\nimport { InputGroupMixin } from '@/common/mixins/input_group';\nimport { DtValidationMessages } from '../ValidationMessages';\nimport { DtText } from '@/components/Text';\nimport { hasSlotContent, getUniqueString, getValidationState } from '@/common/utils';\nimport { VALIDATION_MESSAGE_TYPES } from '@/common/constants';\n\n/**\n * Input Groups are convenience components for a grouping of related inputs.\n * While each input within the group could be independent, the `v-model` on the group\n * provides a convenient interface for determining the current state of the group.\n * @see https://dialtone.dialpad.com/components/input_group.html\n */\nexport default {\n name: 'DtInputGroup',\n\n components: { DtValidationMessages, DtText },\n\n mixins: [InputGroupMixin],\n\n props: {\n /**\n * A data qa tag for the input group\n */\n dataQaGroup: {\n type: String,\n default: 'input-group',\n },\n\n /**\n * A data qa tag for the input group legend\n */\n dataQaGroupLegend: {\n type: String,\n default: 'input-group-legend',\n },\n\n /**\n * A data qa tag for the input group messages\n */\n dataQaGroupMessages: {\n type: String,\n default: 'input-group-messages',\n },\n },\n\n data () {\n return {\n internalValue: this.value,\n hasSlotContent,\n messagesId: getUniqueString(),\n };\n },\n\n computed: {\n ariaInvalid () {\n return getValidationState(this.formattedMessages) === VALIDATION_MESSAGE_TYPES.CRITICAL ? 'true' : undefined;\n },\n\n ariaDescribedBy () {\n return this.showMessages && this.formattedMessages.length > 0 ? this.messagesId : undefined;\n },\n },\n\n watch: {\n value (newValue) {\n this.internalValue = newValue;\n },\n\n /*\n * watching value to support 2 way binding for slotted inputs.\n * need this to pass value to slotted inputs if modified outside\n * input group.\n */\n internalValue: {\n immediate: true,\n handler (newInternalValue) {\n this.provideObj.value = newInternalValue;\n },\n },\n },\n\n methods: {\n getMessageKey (type, index) {\n return `input-group-message-${type}-${index}-${this.id}`;\n },\n },\n};\n</script>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"input-group.cjs","names":[],"sources":["../../../components/InputGroup/InputGroup.vue"],"sourcesContent":["<template>\n <fieldset\n class=\"d-input-group__fieldset\"\n :data-qa=\"dataQaGroup\"\n :aria-invalid=\"ariaInvalid\"\n :aria-describedby=\"ariaDescribedBy\"\n >\n <dt-text\n v-if=\"hasSlotContent($slots.legend) || legend\"\n kind=\"label\"\n as=\"legend\"\n tone=\"secondary\"\n :class=\"['d-input-group__legend-text', legendClass]\"\n v-bind=\"legendChildProps\"\n :data-qa=\"dataQaGroupLegend\"\n >\n <!-- @slot slot for Input Group Legend -->\n <slot name=\"legend\">\n {{ legend }}\n </slot>\n </dt-text>\n <!-- @slot slot for Input Group Components -->\n <slot />\n <dt-validation-messages\n v-bind=\"messagesChildProps\"\n :id=\"messagesId\"\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n :data-qa=\"dataQaGroupMessages\"\n />\n </fieldset>\n</template>\n\n<script>\nimport { InputGroupMixin } from '@/common/mixins/input_group';\nimport { DtValidationMessages } from '../ValidationMessages';\nimport { DtText } from '@/components/Text';\nimport { hasSlotContent, getUniqueString, getValidationState } from '@/common/utils';\nimport { VALIDATION_MESSAGE_TYPES } from '@/common/constants';\n\n/**\n * Input Groups are convenience components for a grouping of related inputs.\n * While each input within the group could be independent, the `v-model` on the group\n * provides a convenient interface for determining the current state of the group.\n * @see https://dialtone.dialpad.com/components/input_group.html\n */\nexport default {\n name: 'DtInputGroup',\n\n components: { DtValidationMessages, DtText },\n\n mixins: [InputGroupMixin],\n\n props: {\n /**\n * A data qa tag for the input group\n */\n dataQaGroup: {\n type: String,\n default: 'input-group',\n },\n\n /**\n * A data qa tag for the input group legend\n */\n dataQaGroupLegend: {\n type: String,\n default: 'input-group-legend',\n },\n\n /**\n * A data qa tag for the input group messages\n */\n dataQaGroupMessages: {\n type: String,\n default: 'input-group-messages',\n },\n },\n\n data () {\n return {\n internalValue: this.value,\n hasSlotContent,\n messagesId: getUniqueString(),\n };\n },\n\n computed: {\n ariaInvalid () {\n return getValidationState(this.formattedMessages) === VALIDATION_MESSAGE_TYPES.CRITICAL ? 'true' : undefined;\n },\n\n ariaDescribedBy () {\n return this.showMessages && this.formattedMessages.length > 0 ? this.messagesId : undefined;\n },\n },\n\n watch: {\n value (newValue) {\n this.internalValue = newValue;\n },\n\n /*\n * watching value to support 2 way binding for slotted inputs.\n * need this to pass value to slotted inputs if modified outside\n * input group.\n */\n internalValue: {\n immediate: true,\n handler (newInternalValue) {\n this.provideObj.value = newInternalValue;\n },\n },\n },\n\n methods: {\n getMessageKey (type, index) {\n return `input-group-message-${type}-${index}-${this.id}`;\n },\n },\n};\n</script>\n"],"mappings":"8bA+CA,IAAK,EAAU,CACb,KAAM,eAEN,WAAY,CAAE,qBAAA,EAAA,QAAsB,OAAA,EAAA,EAAQ,CAE5C,OAAQ,CAAC,EAAA,gBAAgB,CAEzB,MAAO,CAIL,YAAa,CACX,KAAM,OACN,QAAS,cACV,CAKD,kBAAmB,CACjB,KAAM,OACN,QAAS,qBACV,CAKD,oBAAqB,CACnB,KAAM,OACN,QAAS,uBACV,CACF,CAED,MAAQ,CACN,MAAO,CACL,cAAe,KAAK,MACpB,eAAA,EAAA,EACA,WAAY,EAAA,GAAiB,CAC9B,EAGH,SAAU,CACR,aAAe,CACb,OAAO,EAAA,EAAmB,KAAK,kBAAiB,GAAM,EAAA,yBAAyB,SAAW,OAAS,IAAA,IAGrG,iBAAmB,CACjB,OAAO,KAAK,cAAgB,KAAK,kBAAkB,OAAS,EAAI,KAAK,WAAa,IAAA,IAErF,CAED,MAAO,CACL,MAAO,EAAU,CACf,KAAK,cAAgB,GAQvB,cAAe,CACb,UAAW,GACX,QAAS,EAAkB,CACzB,KAAK,WAAW,MAAQ,GAE3B,CACF,CAED,QAAS,CACP,cAAe,EAAM,EAAO,CAC1B,MAAO,uBAAuB,EAAK,GAAG,EAAM,GAAG,KAAK,MAEvD,CACF,qNA1FY,WAAA,CA7BT,MAAM,0BACL,UAAS,EAAA,YACT,eAAc,EAAA,YACd,mBAAkB,EAAA,kBAGX,EAAA,eAAe,EAAA,OAAO,OAAM,EAAK,EAAA,SAAA,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,aAY/B,GAAA,EAAA,EAAA,YAAA,OAXR,KAAK,QACL,GAAG,SACH,KAAK,YACJ,MAAK,CAAA,6BAAiC,EAAA,YAAW,EAC1C,EAAA,iBAAgB,CACvB,UAAS,EAAA,kBAAiB,CAAA,CAAA,2BAKpB,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,SAAA,EAAA,KAAA,EAAA,EAAA,EAAA,kBAAA,EAAA,EAAA,iBADF,EAAA,OAAM,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,gFAIL,EAAA,OAAA,UAAA,mBAQN,GAAA,EAAA,EAAA,YAAA,EANQ,mBAAkB,CACzB,GAAI,EAAA,WACJ,sBAAqB,EAAA,kBACrB,gBAAe,EAAA,aACf,MAAO,EAAA,cACP,UAAS,EAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { VALIDATION_MESSAGE_TYPES as e } from "../../common/constants/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as i } from "../../_plugin-vue_export-helper-
|
|
2
|
+
import { _ as t, h as n, m as r } from "../../utils-CXaaZqVu.js";
|
|
3
|
+
import { t as i } from "../../_plugin-vue_export-helper-B52Kst-M.js";
|
|
4
4
|
import a from "../validation-messages/validation-messages.js";
|
|
5
5
|
import { InputGroupMixin as o } from "../../common/mixins/input-group.js";
|
|
6
|
-
import { t as s } from "../../Text-
|
|
6
|
+
import { t as s } from "../../Text-B6HaId2l.js";
|
|
7
7
|
import { createBlock as c, createCommentVNode as l, createElementBlock as u, createTextVNode as d, createVNode as f, mergeProps as p, openBlock as m, renderSlot as h, resolveComponent as g, toDisplayString as _, withCtx as v } from "vue";
|
|
8
8
|
//#region components/InputGroup/InputGroup.vue
|
|
9
9
|
var y = {
|
|
@@ -30,8 +30,8 @@ var y = {
|
|
|
30
30
|
data() {
|
|
31
31
|
return {
|
|
32
32
|
internalValue: this.value,
|
|
33
|
-
hasSlotContent:
|
|
34
|
-
messagesId:
|
|
33
|
+
hasSlotContent: t,
|
|
34
|
+
messagesId: r()
|
|
35
35
|
};
|
|
36
36
|
},
|
|
37
37
|
computed: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../components/ItemLayout/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-BK-Lzi7j.cjs`);const e=require(`../../utils-Db-kV6Sr.cjs`),t=require(`../../_plugin-vue_export-helper-CX7YVcP6.cjs`);let n=require(`vue`);var r={name:`DtItemLayout`,props:{as:{type:String,default:`div`},unstyled:{type:Boolean,default:!1},startClass:{type:[String,Array,Object],default:``},leftClass:{type:[String,Array,Object],default:void 0},contentClass:{type:[String,Array,Object],default:``},titleClass:{type:[String,Array,Object],default:``},subtitleClass:{type:[String,Array,Object],default:``},blockEndClass:{type:[String,Array,Object],default:``},bottomClass:{type:[String,Array,Object],default:void 0},endClass:{type:[String,Array,Object],default:``},rightClass:{type:[String,Array,Object],default:void 0},selectedClass:{type:[String,Array,Object],default:``}},computed:{resolvedStartClass(){return this.leftClass??this.startClass},resolvedEndClass(){return this.rightClass??this.endClass},resolvedBlockEndClass(){return this.bottomClass??this.blockEndClass}},methods:{dynamicGridTemplateColumns(){return`
|
|
2
2
|
grid-template-columns: ${this.$slots.start||this.$slots.left?`auto`:``} 1fr ${this.$slots.end||this.$slots.right?`auto`:``} ${this.$slots.selected?`auto`:``};
|
|
3
|
-
`},hasSlotContent:e.
|
|
3
|
+
`},hasSlotContent:e._}};function i(e,t,r,i,a,o){return(0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(r.as),{class:(0,n.normalizeClass)(r.unstyled?`d-item-layout--custom`:`d-item-layout`),style:(0,n.normalizeStyle)(r.unstyled&&o.dynamicGridTemplateColumns())},{default:(0,n.withCtx)(()=>[o.hasSlotContent(e.$slots.start)||o.hasSlotContent(e.$slots.left)?((0,n.openBlock)(),(0,n.createElementBlock)(`section`,{key:0,"data-qa":`dt-item-layout-left-wrapper`,class:(0,n.normalizeClass)([o.resolvedStartClass,`d-item-layout__left`])},[e.$slots.start?(0,n.renderSlot)(e.$slots,`start`,{key:0}):(0,n.renderSlot)(e.$slots,`left`,{key:1})],2)):(0,n.createCommentVNode)(``,!0),(0,n.createElementVNode)(`section`,{"data-qa":`dt-item-layout-content-wrapper`,class:(0,n.normalizeClass)([r.contentClass,`d-item-layout__content`])},[o.hasSlotContent(e.$slots.default)?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:0,"data-qa":`dt-item-layout-title-wrapper`,class:(0,n.normalizeClass)([r.titleClass,`d-item-layout__title`])},[(0,n.renderSlot)(e.$slots,`default`)],2)):(0,n.createCommentVNode)(``,!0),o.hasSlotContent(e.$slots.subtitle)?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:1,"data-qa":`dt-item-layout-subtitle-wrapper`,class:(0,n.normalizeClass)([r.subtitleClass,`d-item-layout--subtitle`,{"d-item-layout--subtitle--with-title":o.hasSlotContent(e.$slots.default)}])},[(0,n.renderSlot)(e.$slots,`subtitle`)],2)):(0,n.createCommentVNode)(``,!0),o.hasSlotContent(e.$slots.blockEnd)||o.hasSlotContent(e.$slots.bottom)?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:2,"data-qa":`dt-item-layout-bottom-wrapper`,class:(0,n.normalizeClass)([o.resolvedBlockEndClass,`d-item-layout__bottom`])},[e.$slots.blockEnd?(0,n.renderSlot)(e.$slots,`blockEnd`,{key:0}):(0,n.renderSlot)(e.$slots,`bottom`,{key:1})],2)):(0,n.createCommentVNode)(``,!0)],2),o.hasSlotContent(e.$slots.end)||o.hasSlotContent(e.$slots.right)?((0,n.openBlock)(),(0,n.createElementBlock)(`section`,{key:1,"data-qa":`dt-item-layout-right-wrapper`,class:(0,n.normalizeClass)([o.resolvedEndClass,`d-item-layout__right`])},[e.$slots.end?(0,n.renderSlot)(e.$slots,`end`,{key:0}):(0,n.renderSlot)(e.$slots,`right`,{key:1})],2)):(0,n.createCommentVNode)(``,!0),o.hasSlotContent(e.$slots.selected)?((0,n.openBlock)(),(0,n.createElementBlock)(`section`,{key:2,"data-qa":`dt-item-layout-selected-wrapper`,class:(0,n.normalizeClass)([r.selectedClass,`d-item-layout__selected`])},[(0,n.renderSlot)(e.$slots,`selected`)],2)):(0,n.createCommentVNode)(``,!0)]),_:3},8,[`class`,`style`])}var a=t.t(r,[[`render`,i]]);exports.default=a;
|
|
4
4
|
//# sourceMappingURL=item-layout.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item-layout.cjs","names":[],"sources":["../../../components/ItemLayout/ItemLayout.vue"],"sourcesContent":["<template>\n <component\n :is=\"as\"\n :class=\"unstyled ? 'd-item-layout--custom' : 'd-item-layout'\"\n :style=\"unstyled && dynamicGridTemplateColumns()\"\n >\n <section\n v-if=\"hasSlotContent($slots.start) || hasSlotContent($slots.left)\"\n data-qa=\"dt-item-layout-left-wrapper\"\n :class=\"[resolvedStartClass, 'd-item-layout__left']\"\n >\n <!-- @slot Slot for start content -->\n <slot\n v-if=\"$slots.start\"\n name=\"start\"\n />\n <!-- @slot @deprecated Use start -->\n <slot\n v-else\n name=\"left\"\n />\n </section>\n <section\n data-qa=\"dt-item-layout-content-wrapper\"\n :class=\"[contentClass, 'd-item-layout__content']\"\n >\n <div\n v-if=\"hasSlotContent($slots.default)\"\n data-qa=\"dt-item-layout-title-wrapper\"\n :class=\"[titleClass, 'd-item-layout__title']\"\n >\n <!-- @slot Slot for main content -->\n <slot />\n </div>\n <div\n v-if=\"hasSlotContent($slots.subtitle)\"\n data-qa=\"dt-item-layout-subtitle-wrapper\"\n :class=\"[\n subtitleClass,\n 'd-item-layout--subtitle',\n { 'd-item-layout--subtitle--with-title': hasSlotContent($slots.default) },\n ]\"\n >\n <!-- @slot Slot for content below main content -->\n <slot name=\"subtitle\" />\n </div>\n <div\n v-if=\"hasSlotContent($slots.blockEnd) || hasSlotContent($slots.bottom)\"\n data-qa=\"dt-item-layout-bottom-wrapper\"\n :class=\"[resolvedBlockEndClass, 'd-item-layout__bottom']\"\n >\n <!-- @slot Slot for content below subtitle -->\n <slot\n v-if=\"$slots.blockEnd\"\n name=\"blockEnd\"\n />\n <!-- @slot @deprecated Use blockEnd -->\n <slot\n v-else\n name=\"bottom\"\n />\n </div>\n </section>\n <section\n v-if=\"hasSlotContent($slots.end) || hasSlotContent($slots.right)\"\n data-qa=\"dt-item-layout-right-wrapper\"\n :class=\"[resolvedEndClass, 'd-item-layout__right']\"\n >\n <!-- @slot Slot for end content -->\n <slot\n v-if=\"$slots.end\"\n name=\"end\"\n />\n <!-- @slot @deprecated Use end -->\n <slot\n v-else\n name=\"right\"\n />\n </section>\n <section\n v-if=\"hasSlotContent($slots.selected)\"\n data-qa=\"dt-item-layout-selected-wrapper\"\n :class=\"[selectedClass, 'd-item-layout__selected']\"\n >\n <!-- @slot Slot for selected icon -->\n <slot name=\"selected\" />\n </section>\n </component>\n</template>\n\n/**\n * Custom layout to enable developer to use list-item like stack.\n * It is used as base for `dt-list-item` component\n * @see https://dialtone.dialpad.com/components/item_layout.html\n */\n<script>\nimport { hasSlotContent } from '@/common/utils';\n\nexport default {\n name: 'DtItemLayout',\n props: {\n /**\n * Set this prop to render layout as a specific HTML element.\n */\n as: {\n type: String,\n default: 'div',\n },\n\n /**\n * Set this prop to remove the default styling.\n * @values true, false\n */\n unstyled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Set the class for the start section.\n */\n startClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Set the class for the start section.\n * @deprecated Use startClass\n */\n leftClass: {\n type: [String, Array, Object],\n default: undefined,\n },\n\n /**\n * Set the class for the content section.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Set the class for the title section.\n */\n titleClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Set the class for the subtitle section.\n */\n subtitleClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Set the class for the block-end section (aka bottom).\n */\n blockEndClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Set the class for the block-end section (aka bottom).\n * @deprecated Use blockEndClass\n */\n bottomClass: {\n type: [String, Array, Object],\n default: undefined,\n },\n\n /**\n * Set the class for the end section.\n */\n endClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Set the class for the end section.\n * @deprecated Use endClass\n */\n rightClass: {\n type: [String, Array, Object],\n default: undefined,\n },\n\n /**\n * Set the class for the selected section.\n */\n selectedClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n resolvedStartClass () {\n return this.leftClass ?? this.startClass;\n },\n\n resolvedEndClass () {\n return this.rightClass ?? this.endClass;\n },\n\n resolvedBlockEndClass () {\n return this.bottomClass ?? this.blockEndClass;\n },\n },\n\n methods: {\n /**\n * Generate dynamic grid template columns\n */\n dynamicGridTemplateColumns () {\n const leftContentColumn = (this.$slots.start || this.$slots.left) ? 'auto' : '';\n const rightContentColumn = (this.$slots.end || this.$slots.right) ? 'auto' : '';\n const selectedContentColumn = this.$slots.selected ? 'auto' : '';\n\n return `\n grid-template-columns: ${leftContentColumn} 1fr ${rightContentColumn} ${selectedContentColumn};\n `;\n },\n\n hasSlotContent,\n },\n};\n</script>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"item-layout.cjs","names":[],"sources":["../../../components/ItemLayout/ItemLayout.vue"],"sourcesContent":["<template>\n <component\n :is=\"as\"\n :class=\"unstyled ? 'd-item-layout--custom' : 'd-item-layout'\"\n :style=\"unstyled && dynamicGridTemplateColumns()\"\n >\n <section\n v-if=\"hasSlotContent($slots.start) || hasSlotContent($slots.left)\"\n data-qa=\"dt-item-layout-left-wrapper\"\n :class=\"[resolvedStartClass, 'd-item-layout__left']\"\n >\n <!-- @slot Slot for start content -->\n <slot\n v-if=\"$slots.start\"\n name=\"start\"\n />\n <!-- @slot @deprecated Use start -->\n <slot\n v-else\n name=\"left\"\n />\n </section>\n <section\n data-qa=\"dt-item-layout-content-wrapper\"\n :class=\"[contentClass, 'd-item-layout__content']\"\n >\n <div\n v-if=\"hasSlotContent($slots.default)\"\n data-qa=\"dt-item-layout-title-wrapper\"\n :class=\"[titleClass, 'd-item-layout__title']\"\n >\n <!-- @slot Slot for main content -->\n <slot />\n </div>\n <div\n v-if=\"hasSlotContent($slots.subtitle)\"\n data-qa=\"dt-item-layout-subtitle-wrapper\"\n :class=\"[\n subtitleClass,\n 'd-item-layout--subtitle',\n { 'd-item-layout--subtitle--with-title': hasSlotContent($slots.default) },\n ]\"\n >\n <!-- @slot Slot for content below main content -->\n <slot name=\"subtitle\" />\n </div>\n <div\n v-if=\"hasSlotContent($slots.blockEnd) || hasSlotContent($slots.bottom)\"\n data-qa=\"dt-item-layout-bottom-wrapper\"\n :class=\"[resolvedBlockEndClass, 'd-item-layout__bottom']\"\n >\n <!-- @slot Slot for content below subtitle -->\n <slot\n v-if=\"$slots.blockEnd\"\n name=\"blockEnd\"\n />\n <!-- @slot @deprecated Use blockEnd -->\n <slot\n v-else\n name=\"bottom\"\n />\n </div>\n </section>\n <section\n v-if=\"hasSlotContent($slots.end) || hasSlotContent($slots.right)\"\n data-qa=\"dt-item-layout-right-wrapper\"\n :class=\"[resolvedEndClass, 'd-item-layout__right']\"\n >\n <!-- @slot Slot for end content -->\n <slot\n v-if=\"$slots.end\"\n name=\"end\"\n />\n <!-- @slot @deprecated Use end -->\n <slot\n v-else\n name=\"right\"\n />\n </section>\n <section\n v-if=\"hasSlotContent($slots.selected)\"\n data-qa=\"dt-item-layout-selected-wrapper\"\n :class=\"[selectedClass, 'd-item-layout__selected']\"\n >\n <!-- @slot Slot for selected icon -->\n <slot name=\"selected\" />\n </section>\n </component>\n</template>\n\n/**\n * Custom layout to enable developer to use list-item like stack.\n * It is used as base for `dt-list-item` component\n * @see https://dialtone.dialpad.com/components/item_layout.html\n */\n<script>\nimport { hasSlotContent } from '@/common/utils';\n\nexport default {\n name: 'DtItemLayout',\n props: {\n /**\n * Set this prop to render layout as a specific HTML element.\n */\n as: {\n type: String,\n default: 'div',\n },\n\n /**\n * Set this prop to remove the default styling.\n * @values true, false\n */\n unstyled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Set the class for the start section.\n */\n startClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Set the class for the start section.\n * @deprecated Use startClass\n */\n leftClass: {\n type: [String, Array, Object],\n default: undefined,\n },\n\n /**\n * Set the class for the content section.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Set the class for the title section.\n */\n titleClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Set the class for the subtitle section.\n */\n subtitleClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Set the class for the block-end section (aka bottom).\n */\n blockEndClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Set the class for the block-end section (aka bottom).\n * @deprecated Use blockEndClass\n */\n bottomClass: {\n type: [String, Array, Object],\n default: undefined,\n },\n\n /**\n * Set the class for the end section.\n */\n endClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Set the class for the end section.\n * @deprecated Use endClass\n */\n rightClass: {\n type: [String, Array, Object],\n default: undefined,\n },\n\n /**\n * Set the class for the selected section.\n */\n selectedClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n resolvedStartClass () {\n return this.leftClass ?? this.startClass;\n },\n\n resolvedEndClass () {\n return this.rightClass ?? this.endClass;\n },\n\n resolvedBlockEndClass () {\n return this.bottomClass ?? this.blockEndClass;\n },\n },\n\n methods: {\n /**\n * Generate dynamic grid template columns\n */\n dynamicGridTemplateColumns () {\n const leftContentColumn = (this.$slots.start || this.$slots.left) ? 'auto' : '';\n const rightContentColumn = (this.$slots.end || this.$slots.right) ? 'auto' : '';\n const selectedContentColumn = this.$slots.selected ? 'auto' : '';\n\n return `\n grid-template-columns: ${leftContentColumn} 1fr ${rightContentColumn} ${selectedContentColumn};\n `;\n },\n\n hasSlotContent,\n },\n};\n</script>\n"],"mappings":"8PAkGA,IAAK,EAAU,CACb,KAAM,eACN,MAAO,CAIL,GAAI,CACF,KAAM,OACN,QAAS,MACV,CAMD,SAAU,CACR,KAAM,QACN,QAAS,GACV,CAKD,WAAY,CACV,KAAM,CAAC,OAAQ,MAAO,OAAO,CAC7B,QAAS,GACV,CAMD,UAAW,CACT,KAAM,CAAC,OAAQ,MAAO,OAAO,CAC7B,QAAS,IAAA,GACV,CAKD,aAAc,CACZ,KAAM,CAAC,OAAQ,MAAO,OAAO,CAC7B,QAAS,GACV,CAKD,WAAY,CACV,KAAM,CAAC,OAAQ,MAAO,OAAO,CAC7B,QAAS,GACV,CAKD,cAAe,CACb,KAAM,CAAC,OAAQ,MAAO,OAAO,CAC7B,QAAS,GACV,CAKD,cAAe,CACb,KAAM,CAAC,OAAQ,MAAO,OAAO,CAC7B,QAAS,GACV,CAMD,YAAa,CACX,KAAM,CAAC,OAAQ,MAAO,OAAO,CAC7B,QAAS,IAAA,GACV,CAKD,SAAU,CACR,KAAM,CAAC,OAAQ,MAAO,OAAO,CAC7B,QAAS,GACV,CAMD,WAAY,CACV,KAAM,CAAC,OAAQ,MAAO,OAAO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AA,oBAAA,GAAA,GAAA,CAGI,EAAA,eAAe,EAAA,OAAO,SAAQ,GAAA,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,oBAM5B,UAAA,OALR,UAAQ,kCACP,OAAA,EAAA,EAAA,gBAAK,CAAG,EAAA,cAAa,0BAAA,CAAA,oBAGE,EAAA,OAAA,WAAA,CAAA,CAAA,EAAA,GAAA,EAAA,EAAA,oBAAA,GAAA,GAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t } from "../../_plugin-vue_export-helper-
|
|
1
|
+
import { _ as e } from "../../utils-CXaaZqVu.js";
|
|
2
|
+
import { t } from "../../_plugin-vue_export-helper-B52Kst-M.js";
|
|
3
3
|
import { createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, normalizeClass as o, normalizeStyle as s, openBlock as c, renderSlot as l, resolveDynamicComponent as u, withCtx as d } from "vue";
|
|
4
4
|
//#region components/ItemLayout/ItemLayout.vue
|
|
5
5
|
var f = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../components/KeyboardShortcut/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-BK-Lzi7j.cjs`);const e=require(`../../_plugin-vue_export-helper-CX7YVcP6.cjs`),t=require(`../../Text-BosPFEHO.cjs`);let n=require(`vue`),r=require(`@dialpad/dialtone-icons/vue`);var i={"{win}":r.DtIconLayoutGrid,"{arrow-right}":r.DtIconArrowRight,"{arrow-left}":r.DtIconArrowLeft,"{arrow-up}":r.DtIconArrowUp,"{arrow-down}":r.DtIconArrowDown,"{cmd}":r.DtIconCommand,"{opt}":r.DtIconOption},a={"{cmd}":`Command`,"{opt}":`Option`,"{win}":`Windows`,"{arrow-right}":`Right Arrow`,"{arrow-left}":`Left Arrow`,"{arrow-up}":`Up Arrow`,"{arrow-down}":`Down Arrow`,"{plus}":`plus`},o={ctrl:`Control`,alt:`Alt`,esc:`Escape`,del:`Delete`,ins:`Insert`,pgup:`Page Up`,pgdn:`Page Down`,num:`Number`,caps:`Caps Lock`},s={name:`DtKeyboardShortcut`,components:{DtIconLayoutGrid:r.DtIconLayoutGrid,DtIconArrowRight:r.DtIconArrowRight,DtIconArrowLeft:r.DtIconArrowLeft,DtIconArrowUp:r.DtIconArrowUp,DtIconArrowDown:r.DtIconArrowDown,DtIconCommand:r.DtIconCommand,DtIconOption:r.DtIconOption,DtIconPlus:r.DtIconPlus,DtText:t.t},props:{inverted:{type:Boolean,default:!1},shortcut:{type:String,required:!0},screenReaderText:{type:String,default:null}},data(){return{separator:/\+/gi}},computed:{icons(){return{...i,"{plus}":r.DtIconPlus}},shortcutWithSeparator(){return this.shortcut.replace(this.separator,`{plus}`)},formattedShortcut(){return Object.keys(i).reduce((e,t)=>e.replace(RegExp(`{`+t+`}`,`gi`),i[t]),this.shortcutWithSeparator)},formattedShortcutSplit(){let e=Object.keys(this.icons).join(`|`),t=RegExp(`(${e})`,`gi`);return this.formattedShortcut.split(t).filter(Boolean)},generatedScreenReaderText(){return this.formattedShortcutSplit.map(e=>{let t=e.trim();if(a[t])return a[t];let n=t.toLowerCase();return o[n]?o[n]:t}).filter(e=>e).join(` `)}}},c={class:`d-keyboard-shortcut--sr-only`,"data-qa":`dt-keyboard-shortcut-sr-text`},l=[`innerHTML`];function u(e,t,r,i,a,o){let s=(0,n.resolveComponent)(`dt-text`);return(0,n.openBlock)(),(0,n.createElementBlock)(`kbd`,{"data-qa":`dt-keyboard-shortcut`,class:(0,n.normalizeClass)([`d-keyboard-shortcut`,{"d-keyboard-shortcut--inverted":r.inverted}])},[(0,n.createElementVNode)(`span`,c,(0,n.toDisplayString)(r.screenReaderText||o.generatedScreenReaderText),1),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(o.formattedShortcutSplit,(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[o.icons[e]?((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(o.icons[e]),{key:`icon-${t}-${e}`,size:`100`,"aria-hidden":`true`,class:(0,n.normalizeClass)([`d-keyboard-shortcut__icon`,{"d-keyboard-shortcut__icon--inverted":r.inverted}])},null,8,[`class`])):e.trim()?((0,n.openBlock)(),(0,n.createBlock)(s,{key:`text-${t}-${e}`,kind:`body`,size:200,numeric:``,density:400,tone:`tertiary`,"aria-hidden":`true`,class:(0,n.normalizeClass)([`d-keyboard-shortcut__item`,{"d-keyboard-shortcut__item--inverted":r.inverted}])},{default:(0,n.withCtx)(()=>[(0,n.createElementVNode)(`span`,{innerHTML:e},null,8,l)]),_:2},1032,[`class`])):(0,n.createCommentVNode)(``,!0)],64))),256))],2)}var d=e.t(s,[[`render`,u]]);exports.default=d;
|
|
2
2
|
//# sourceMappingURL=keyboard-shortcut.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "../../_plugin-vue_export-helper-
|
|
2
|
-
import { t } from "../../Text-
|
|
1
|
+
import { t as e } from "../../_plugin-vue_export-helper-B52Kst-M.js";
|
|
2
|
+
import { t } from "../../Text-B6HaId2l.js";
|
|
3
3
|
import { Fragment as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, normalizeClass as s, openBlock as c, renderList as l, resolveComponent as u, resolveDynamicComponent as d, toDisplayString as f, withCtx as p } from "vue";
|
|
4
4
|
import { DtIconArrowDown as m, DtIconArrowLeft as h, DtIconArrowRight as g, DtIconArrowUp as _, DtIconCommand as v, DtIconLayoutGrid as y, DtIconOption as b, DtIconPlus as x } from "@dialpad/dialtone-icons/vue";
|
|
5
5
|
//#region components/KeyboardShortcut/KeyboardShortcut.vue
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-BK-Lzi7j.cjs`);const e=require(`../../_plugin-vue_export-helper-CX7YVcP6.cjs`),t=require(`../../Text-BosPFEHO.cjs`),n=require(`../link/link.cjs`),r=require(`../stack/stack.cjs`);let i=require(`vue`),a=require(`@dialpad/dialtone-icons/vue`);var o={key:0,class:`d-d-flex d-ai-center d-jc-center d-h164`},s={__name:`KitchenSinkView`,props:{title:{type:String,required:!0},itemLabel:{type:String,required:!0},iframeUrl:{type:String,required:!0},loaders:{type:Object,required:!0}},setup(e){let s=e,c=(0,i.ref)([]),l=(0,i.ref)(!0);function u(e){return e.toLowerCase().replace(/[\s/_]+/g,`-`)}function d(e){document.getElementById(`ks-${e}`)?.scrollIntoView({behavior:`smooth`})}function f(e){return(0,i.markRaw)((0,i.defineComponent)({name:`ErrorBoundary-${e}`,setup(t,{slots:n}){let r=(0,i.ref)(null);return(0,i.onErrorCaptured)(e=>(r.value=e.message||String(e),!1)),()=>r.value?(0,i.h)(`div`,{class:`d-fc-critical d-fs-200 d-p-100 d-px-150 d-bgc-critical d-bar-300`},`Failed to render ${e}: ${r.value}`):n.default?.()}}))}function p(e,t,n){let r=[];for(let[a,o]of Object.entries(e)){if(a===`default`||!o?.render||typeof o.render!=`function`)continue;let e={...t.args,...o.args};try{let s=o.render(e,{argTypes:t.argTypes||{}});r.push({name:a,component:(0,i.markRaw)(s),errorBoundary:f(`${n} / ${a}`)})}catch(e){console.error(`Kitchen Sink: Failed to initialize ${n}/${a}:`,e)}}return r}return(0,i.onMounted)(async()=>{let e=await Promise.allSettled(Object.values(s.loaders).map(async e=>e())),t=[];for(let n of e){if(n.status!==`fulfilled`)continue;let e=n.value,r=e.default;if(!r?.title)continue;let i=r.title.split(`/`).pop(),a=u(i),o=u(r.title),s=p(e,r,i);s.length!==0&&t.push({id:a,name:i,storyId:o,variants:s})}c.value=t.sort((e,t)=>e.name.localeCompare(t.name)),l.value=!1}),(s,u)=>{let f=(0,i.resolveDirective)(`dt-scrollbar`);return(0,i.openBlock)(),(0,i.createElementBlock)(`div`,null,[l.value?((0,i.openBlock)(),(0,i.createElementBlock)(`div`,o,[(0,i.createVNode)((0,i.unref)(t.t),{tone:`muted`},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)(` Loading `+(0,i.toDisplayString)(e.itemLabel)+`... `,1)]),_:1})])):((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,{key:1},[(0,i.createVNode)((0,i.unref)(r.default),{class:`d-p-400 d-py-200 d-pbe-100 d-bgc-secondary d-bb d-ps-sticky d-t-0 d-zi-base1 d-mbs-n125 d-mx-n125 d-bs-card`,gap:`100`},{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(r.default),{class:`d-px-100`,gap:`100`,direction:`row`,justify:`between`,align:`baseline`},{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(t.t),{as:`h1`,kind:`headline`,size:700},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(e.title),1)]),_:1}),(0,i.createVNode)((0,i.unref)(t.t),{kind:`body`,size:200},{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(n.default),{href:e.iframeUrl,target:`_blank`,rel:`noopener noreferrer`},{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(r.default),{gap:`50`,direction:`row`},{default:(0,i.withCtx)(()=>[u[0]||(u[0]=(0,i.createTextVNode)(` Open in new window `,-1)),(0,i.createVNode)((0,i.unref)(a.DtIconExternalLink),{size:`200`})]),_:1})]),_:1},8,[`href`])]),_:1})]),_:1}),(0,i.withDirectives)(((0,i.openBlock)(),(0,i.createElementBlock)(`div`,null,[(0,i.createVNode)((0,i.unref)(r.default),{direction:`row`,gap:`100`,class:`d-pbe-100 d-px-100`},{default:(0,i.withCtx)(()=>[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(c.value,e=>((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(n.default),{key:e.id,href:`#ks-${e.id}`,onClick:(0,i.withModifiers)(t=>d(e.id),[`prevent`])},{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(t.t),{kind:`body`,size:200,class:`d-ws-nowrap`},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(e.name),1)]),_:2},1024)]),_:2},1032,[`href`,`onClick`]))),128))]),_:1})])),[[f]])]),_:1}),(0,i.createVNode)((0,i.unref)(r.default),{class:`d-px-400`},{default:(0,i.withCtx)(()=>[((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(c.value,e=>((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(r.default),{id:`ks-${e.id}`,key:e.id,as:`section`,gap:`200`,class:`d-py-400 kitchen-sink__section`},{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(r.default),{gap:`100`,direction:`row`,justify:`between`,align:`baseline`},{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(t.t),{as:`h2`,kind:`headline`,size:600},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(e.name),1)]),_:2},1024),(0,i.createVNode)((0,i.unref)(n.default),{href:`/?path=/story/${e.storyId}--default`},{default:(0,i.withCtx)(()=>[...u[1]||(u[1]=[(0,i.createTextVNode)(` View Story `,-1)])]),_:1},8,[`href`])]),_:2},1024),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(e.variants,e=>((0,i.openBlock)(),(0,i.createBlock)((0,i.unref)(r.default),{key:e.name,class:`d-ba d-bc-subtle d-p-200`,gap:`100`},{default:(0,i.withCtx)(()=>[(0,i.createVNode)((0,i.unref)(t.t),{size:100,tone:`muted`,kind:`code`},{default:(0,i.withCtx)(()=>[(0,i.createTextVNode)((0,i.toDisplayString)(e.name),1)]),_:2},1024),(0,i.createElementVNode)(`div`,null,[((0,i.openBlock)(),(0,i.createBlock)((0,i.resolveDynamicComponent)(e.errorBoundary),null,{default:(0,i.withCtx)(()=>[((0,i.openBlock)(),(0,i.createBlock)((0,i.resolveDynamicComponent)(e.component)))]),_:2},1024))])]),_:2},1024))),128))]),_:2},1032,[`id`]))),128))]),_:1})],64))])}}},c=e.t(s,[[`__scopeId`,`data-v-e54b06bf`]]);exports.default=c;
|
|
2
2
|
//# sourceMappingURL=kitchen-sink-view.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "../../_plugin-vue_export-helper-
|
|
2
|
-
import { t } from "../../Text-
|
|
1
|
+
import { t as e } from "../../_plugin-vue_export-helper-B52Kst-M.js";
|
|
2
|
+
import { t } from "../../Text-B6HaId2l.js";
|
|
3
3
|
import n from "../link/link.js";
|
|
4
4
|
import r from "../stack/stack.js";
|
|
5
5
|
import { Fragment as i, createBlock as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, h as d, markRaw as f, onErrorCaptured as p, onMounted as m, openBlock as h, ref as g, renderList as _, resolveDirective as v, resolveDynamicComponent as y, toDisplayString as b, unref as x, withCtx as S, withDirectives as C, withModifiers as w } from "vue";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../components/LazyShow/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-BK-Lzi7j.cjs`);const e=require(`../../_plugin-vue_export-helper-CX7YVcP6.cjs`);let t=require(`vue`);var n={name:`DtLazyShow`,inheritAttrs:!1,props:{show:{type:Boolean,default:!1},transition:{type:String,default:null},appear:{type:Boolean,default:!1}},data(){return{initialized:!!this.show}},computed:{isCSSEnabled(){return process.env.NODE_ENV!==`test`}},watch:{show:function(e){!e||this.initialized||(this.initialized=!0)}}};function r(e,n,r,i,a,o){return(0,t.openBlock)(),(0,t.createBlock)(t.Transition,(0,t.mergeProps)({name:r.transition,appear:r.appear},e.$attrs,{css:o.isCSSEnabled}),{default:(0,t.withCtx)(()=>[(0,t.withDirectives)((0,t.createElementVNode)(`div`,(0,t.mergeProps)({"data-qa":`dt-lazy-show`},e.$attrs),[a.initialized?(0,t.renderSlot)(e.$slots,`default`,{key:0}):(0,t.createCommentVNode)(``,!0)],16),[[t.vShow,r.show]])]),_:3},16,[`name`,`appear`,`css`])}var i=e.t(n,[[`render`,r]]);exports.default=i;
|
|
2
2
|
//# sourceMappingURL=lazy-show.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../_plugin-vue_export-helper-
|
|
1
|
+
import { t as e } from "../../_plugin-vue_export-helper-B52Kst-M.js";
|
|
2
2
|
import { Transition as t, createBlock as n, createCommentVNode as r, createElementVNode as i, mergeProps as a, openBlock as o, renderSlot as s, vShow as c, withCtx as l, withDirectives as u } from "vue";
|
|
3
3
|
//#region components/LazyShow/LazyShow.vue
|
|
4
4
|
var d = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../components/Link/index.js';
|