@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,6 +1,6 @@
|
|
|
1
1
|
import { HTML_ELEMENT_TYPE as e } from "../../common/constants/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as o } from "../../_plugin-vue_export-helper-
|
|
2
|
+
import { M as t, O as n, _ as r, l as i, m as a } from "../../utils-CXaaZqVu.js";
|
|
3
|
+
import { t as o } from "../../_plugin-vue_export-helper-B52Kst-M.js";
|
|
4
4
|
import s from "../../common/mixins/mode.js";
|
|
5
5
|
import { createTippy as c, getAnchor as l, getPopperOptions as u } from "../popover/tippy-utils.js";
|
|
6
6
|
import { TOOLTIP_DIRECTIONS as d, TOOLTIP_KIND_MODIFIERS as f, TOOLTIP_STICKY_VALUES as p } from "./tooltip-constants.js";
|
|
@@ -14,7 +14,7 @@ var T = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><pa
|
|
|
14
14
|
id: {
|
|
15
15
|
type: String,
|
|
16
16
|
default() {
|
|
17
|
-
return
|
|
17
|
+
return a();
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
fallbackPlacements: {
|
|
@@ -165,7 +165,7 @@ var T = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><pa
|
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
167
|
async mounted() {
|
|
168
|
-
!this.enabled && this.open != null && (console.warn("Tooltip: You cannot use both the enabled and open props at the same time."), console.warn("The open prop will be ignored.")), this.tip = c(this.anchor, this.initOptions()), (this.externalAnchor || this.externalAnchorElement) && (await
|
|
168
|
+
!this.enabled && this.open != null && (console.warn("Tooltip: You cannot use both the enabled and open props at the same time."), console.warn("The open prop will be ignored.")), this.tip = c(this.anchor, this.initOptions()), (this.externalAnchor || this.externalAnchorElement) && (await i(), this.addExternalAnchorEventListeners()), t(n(this.$el), this.$options.name);
|
|
169
169
|
},
|
|
170
170
|
beforeUnmount() {
|
|
171
171
|
(this.externalAnchor || this.externalAnchorElement) && this.removeExternalAnchorEventListeners(), this.anchor?._tippy && this.tip?.destroy();
|
|
@@ -175,7 +175,7 @@ var T = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><pa
|
|
|
175
175
|
return this.anchor;
|
|
176
176
|
},
|
|
177
177
|
calculateAnchorZindex() {
|
|
178
|
-
return
|
|
178
|
+
return n(this.$el).getRootNode().querySelector(".d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"], .d-modal[open], .d-modal--transparent[open]") || n(this.$el).closest(".d-zi-drawer") ? 651 : 400;
|
|
179
179
|
},
|
|
180
180
|
hasVisibleFocus() {
|
|
181
181
|
return this.anchor.matches(":focus-visible");
|
|
@@ -205,7 +205,7 @@ var T = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><pa
|
|
|
205
205
|
this.transition && t === "onShow" || (this.$emit("shown", !0), this.open !== null && this.$emit("update:open", !0));
|
|
206
206
|
},
|
|
207
207
|
resolveAppendTo() {
|
|
208
|
-
return this.appendTo === "body" ? this.anchor?.closest("dialog") ?? this.anchor?.getRootNode()?.querySelector("body") : this.appendTo;
|
|
208
|
+
return this.appendTo === "body" ? this.anchor?.closest("dialog") ?? this.anchor?.getRootNode()?.querySelector?.("body") ?? document.body : this.appendTo;
|
|
209
209
|
},
|
|
210
210
|
setProps() {
|
|
211
211
|
!this.tip || !this.tip.setProps || !this.anchor || this.tip && this.tip.setProps && this.tip.setProps({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","names":[],"sources":["../../../components/Tooltip/Tooltip.vue"],"sourcesContent":["<template>\n <div data-qa=\"dt-tooltip-container\">\n <!-- disabling as the below events are for capturing events from interactive\n elements within the span rather than on the span itself -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <span\n v-if=\"!externalAnchor && !externalAnchorElement\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-bind=\"modeAttrs\"\n >\n <!-- In case when transitionend event doesn't work correct (for ex. tooltip component with custom trigger) -->\n <!-- after-leave event can be used instead of transitionend -->\n <!-- @slot Slot for the content, defaults to message prop -->\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n</template>\n\n<script>\nimport {\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_DIRECTIONS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_DELAY_MS,\n} from './TooltipConstants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../Popover/PopoverConstants';\nimport { flushPromises, getUniqueString, hasSlotContent, warnIfUnmounted, returnFirstEl } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/Popover/TippyUtils';\nimport ModeMixin from '@/common/mixins/mode';\n\nconst TOOLTIP_ARROW_SVG = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><path d=\"M 14.5,7 8,0 1.5,7 Z\"/></svg>';\n\n/**\n * A tooltip is a floating label that briefly explains an action, function, or an element.\n * Its content is exclusively text and shouldn't be vital information for users.\n * If richer media is desired, consider using a popover instead.\n * @see https://dialtone.dialpad.com/components/tooltip.html\n */\nexport default {\n name: 'DtTooltip',\n\n mixins: [ModeMixin],\n\n props: {\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\"\n * if defined, otherwise it will automatically position to a new location\n * as it sees best fit. See\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => ['auto'],\n },\n\n /**\n * @deprecated Use contentMode=\"invert\"\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the tooltip from its reference element\n * by the specified number of pixels. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 12],\n },\n\n /**\n * Whether to show the arrow between the tooltip and its anchor.\n * @values true, false\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The direction the popover displays relative to the anchor. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end\n */\n placement: {\n type: String,\n default: 'top',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * If the tooltip sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: true,\n validator: (sticky) => {\n return TOOLTIP_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Sets the element to which the tooltip is going to append to.\n * 'body' appends to the nearest ancestor <dialog> element when inside one\n * (keeping the tooltip in the browser's top layer), or to the nearest body otherwise.\n * To always append to body regardless of dialog context, pass document.body as an HTMLElement.\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', 'root', HTMLElement,\n */\n appendTo: {\n type: [HTML_ELEMENT_TYPE, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Additional css classes for the tooltip content 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 contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the anchor 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 anchorClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * A provided message for the tooltip content\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Controls whether hover/focus causes the tooltip to appear.\n * Cannot be combined with the open prop. open value will be ignored.\n * by default this is true, if you override with false, the tooltip will never show up.\n */\n enabled: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.\n * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.\n * @values null, true, false\n */\n open: {\n type: [Boolean, null],\n default: null,\n },\n\n /**\n * Whether the tooltip should have a transition effect (fade).\n */\n transition: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the tooltip will have a delay when being focused or moused over.\n * @values true, false\n */\n delay: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Set a custom theme on the tooltip. See https://atomiks.github.io/tippyjs/v6/themes/\n */\n theme: {\n type: String,\n default: null,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n * @deprecated Use externalAnchorElement instead for Shadow DOM compatibility.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n\n /**\n * External anchor element reference. Use this instead of externalAnchor when\n * the anchor may be inside a Shadow DOM, as querySelector cannot pierce shadow boundaries.\n */\n externalAnchorElement: {\n type: HTML_ELEMENT_TYPE,\n default: null,\n },\n },\n\n emits: [\n /**\n * Emitted when tooltip is shown or hidden\n *\n * @event shown\n * @type {Boolean}\n */\n 'shown',\n\n /**\n * Sync open value\n *\n * @event update:open\n */\n 'update:open',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n hasSlotContent,\n tip: null,\n\n inTimer: null,\n\n // Internal state for whether the tooltip is shown. Changing the prop\n // will update this.\n internalShow: false,\n\n // this is where the placement currently is, this can be different than\n // the placement prop when there is not enough available room for the tip\n // to display and it uses a fallback placement.\n currentPlacement: this.placement,\n };\n },\n\n computed: {\n\n tippyArrow () {\n return this.showArrow ? TOOLTIP_ARROW_SVG : false;\n },\n\n tippyProps () {\n return {\n arrow: this.tippyArrow,\n offset: this.offset,\n delay: this.delay ? TOOLTIP_DELAY_MS : false,\n placement: this.placement,\n sticky: this.sticky,\n theme: this.inverted ? 'inverted' : this.theme,\n animation: this.transition ? 'fade' : false,\n // onShown only triggers when transition is truthy\n onShown: (tooltipInstance) => this.onShow(tooltipInstance, 'onShown'),\n // onShown will always be called, but it will be called before the animation is complete\n onShow: (tooltipInstance) => this.onShow(tooltipInstance, 'onShow'),\n onHidden: this.onHide,\n\n popperOptions: getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n hasHideModifierEnabled: true,\n onChangePlacement: this.onChangePlacement,\n }),\n };\n },\n\n anchor () {\n if (this.externalAnchorElement) return this.externalAnchorElement;\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: 'setProps',\n\n // tippyProps only tracks the offset/fallbackPlacements array references, so in-place\n // mutations (e.g. offset[1] = 8) need their own deep watchers to trigger setProps.\n // Reference replacements are already handled by the tippyProps watcher above; skip\n // those here (newValue === oldValue only when the array was mutated in place) to\n // avoid calling setProps twice for the same change.\n offset: {\n deep: true,\n handler (newValue, oldValue) {\n if (newValue === oldValue) this.setProps();\n },\n },\n\n fallbackPlacements: {\n deep: true,\n handler (newValue, oldValue) {\n if (newValue === oldValue) this.setProps();\n },\n },\n\n open: {\n handler: function (open) {\n if (open !== null && this.enabled) {\n this.internalShow = open;\n }\n },\n\n immediate: true,\n },\n\n internalShow (value) {\n if (!this.tip || !this.anchor) return;\n\n if (value) {\n this.setProps();\n this.tip.show();\n } else {\n this.tip.hide();\n }\n },\n\n sticky (sticky) {\n this.tip.setProps({\n sticky,\n });\n },\n },\n\n async mounted () {\n if (!this.enabled && this.open != null) {\n console.warn('Tooltip: You cannot use both the enabled and open props at the same time.');\n console.warn('The open prop will be ignored.');\n }\n\n this.tip = createTippy(this.anchor, this.initOptions());\n if (this.externalAnchor || this.externalAnchorElement) {\n await flushPromises();\n this.addExternalAnchorEventListeners();\n }\n warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n },\n\n beforeUnmount () {\n (this.externalAnchor || this.externalAnchorElement) && this.removeExternalAnchorEventListeners();\n\n if (this.anchor?._tippy) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n getModeReferenceEl () {\n return this.anchor;\n },\n\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (returnFirstEl(this.$el).getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"], .d-modal[open], .d-modal--transparent[open]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 651 when\n // anchor of popover is within a drawer.\n returnFirstEl(this.$el).closest('.d-zi-drawer')) {\n return 651;\n } else {\n return 400;\n }\n },\n\n hasVisibleFocus () {\n return this.anchor.matches(':focus-visible');\n },\n\n onEnterAnchor (e) {\n if (!this.enabled) return;\n if (this.delay && this.inTimer === null) {\n this.inTimer = setTimeout(() => {\n this.triggerShow(e);\n }, TOOLTIP_DELAY_MS);\n } else {\n this.triggerShow(e);\n }\n },\n\n triggerShow (e) {\n if (e.type === 'focusin') {\n // only show tooltips on visible focus when triggered via focus.\n // when the user is using the mouse they only want tooltips to display\n // on mouseover.\n //\n // Example: anchor of a popover is a button with tooltip.\n // closing it with the mouse would trigger the tooltip to display as\n // the anchor is focused on close. Not what we want.\n if (this.open === null && this.hasVisibleFocus()) {\n this.internalShow = true;\n }\n } else {\n if (this.open === null) this.internalShow = true;\n }\n },\n\n onLeaveAnchor (e) {\n if (e.type === 'keydown' && e.code !== 'Escape') return;\n\n clearTimeout(this.inTimer);\n this.inTimer = null;\n this.triggerHide();\n },\n\n triggerHide () {\n if (this.open === null) this.internalShow = false;\n },\n\n onChangePlacement (placement) {\n this.currentPlacement = placement;\n },\n\n onHide () {\n this.tip?.unmount();\n this.$emit('shown', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n onShow (tooltipInstance, callingMethod) {\n if (!this.tooltipHasContent(tooltipInstance)) {\n return false;\n }\n if (this.transition && callingMethod === 'onShow') {\n return;\n }\n this.$emit('shown', true);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n resolveAppendTo () {\n // When inside a native <dialog>, append there to stay in the browser's top layer.\n if (this.appendTo === 'body') {\n return this.anchor?.closest('dialog') ?? this.anchor?.getRootNode()?.querySelector('body');\n }\n return this.appendTo;\n },\n\n setProps () {\n if (!this.tip || !this.tip.setProps || !this.anchor) return;\n\n if (this.tip && this.tip.setProps) {\n this.tip.setProps({\n ...this.tippyProps,\n // these need to be set here rather than in tippyProps because they are non-reactive\n appendTo: this.resolveAppendTo(),\n zIndex: this.calculateAnchorZindex(),\n });\n }\n },\n\n onMount () {\n this.setProps();\n },\n\n tooltipHasContent (tooltipInstance) {\n // don't show tooltip when no content\n if (tooltipInstance.props.content.textContent.trim().length === 0) {\n return false;\n }\n return true;\n },\n\n // Set initial options here. Reactive options belong in tippyProps, but arrow is duplicated because Tippy\n // renders its default arrow during synchronous showOnCreate mounting. setProps only runs later from\n // onMount, so omitting the initial value would leave the default arrow in the DOM until then.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: this.tippyArrow,\n // transition duration - same as our custom fade delay in dialtone-globals.less\n duration: 180,\n interactive: false,\n trigger: 'manual',\n hideOnClick: false,\n // disable tooltip from displaying on touch devices\n touch: false,\n onMount: this.onMount,\n showOnCreate: this.internalShow,\n appendTo: this.resolveAppendTo(),\n popperOptions: getPopperOptions({\n hasHideModifierEnabled: true,\n }),\n };\n },\n\n addExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n removeExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;AA+DA,IAAM,IAAoB,gHAQrB,IAAU;CACb,MAAM;CAEN,QAAQ,CAAC,EAAU;CAEnB,OAAO;EAIL,IAAI;GACF,MAAM;GACN,UAAW;AAAE,WAAO,GAAiB;;GACtC;EAeD,oBAAoB;GAClB,MAAM;GACN,eAAe,CAAC,OAAO;GACxB;EAMD,UAAU;GACR,MAAM;GACN,SAAS;GACV;EAaD,QAAQ;GACN,MAAM;GACN,eAAe,CAAC,GAAG,GAAG;GACvB;EAMD,WAAW;GACT,MAAM;GACN,SAAS;GACV;EAgBD,WAAW;GACT,MAAM;GACN,SAAS;GACT,UAAW,GAAW;AACpB,WAAO,EAAmB,SAAS,EAAU;;GAEhD;EAiBD,QAAQ;GACN,MAAM,CAAC,SAAS,OAAO;GACvB,SAAS;GACT,YAAY,MACH,EAAsB,SAAS,EAAO;GAEhD;EAUD,UAAU;GACR,MAAM,CAAC,GAAmB,OAAO;GACjC,SAAS;GACT,YAAW,MACF,EAAyB,SAAS,EAAQ,IAC5C,aAAoB;GAE5B;EAOD,cAAc;GACZ,MAAM;IAAC;IAAQ;IAAQ;IAAM;GAC7B,SAAS;GACV;EAOD,aAAa;GACX,MAAM;IAAC;IAAQ;IAAQ;IAAM;GAC7B,SAAS;GACV;EAKD,SAAS;GACP,MA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AnBN,EAmBM;EAlBH,IAAI,EAAA;EACL,KAAI;EACJ,WAAQ;EACP,OAAK;;MAA+C,EAAA,uBAAuB,WAAY,EAAA,UAAA;GAA6B,EAAA;;IAO7G,EAAA,UAAS,EAAA,CAKjB,EAEO,EAAA,QAAA,WAAA,EAAA,QAAA,CAAA,EAAA,EADF,EAAA,QAAO,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,IAAA,EAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"tooltip.js","names":[],"sources":["../../../components/Tooltip/Tooltip.vue"],"sourcesContent":["<template>\n <div data-qa=\"dt-tooltip-container\">\n <!-- disabling as the below events are for capturing events from interactive\n elements within the span rather than on the span itself -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <span\n v-if=\"!externalAnchor && !externalAnchorElement\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-bind=\"modeAttrs\"\n >\n <!-- In case when transitionend event doesn't work correct (for ex. tooltip component with custom trigger) -->\n <!-- after-leave event can be used instead of transitionend -->\n <!-- @slot Slot for the content, defaults to message prop -->\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n</template>\n\n<script>\nimport {\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_DIRECTIONS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_DELAY_MS,\n} from './TooltipConstants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../Popover/PopoverConstants';\nimport { flushPromises, getUniqueString, hasSlotContent, warnIfUnmounted, returnFirstEl } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/Popover/TippyUtils';\nimport ModeMixin from '@/common/mixins/mode';\n\nconst TOOLTIP_ARROW_SVG = '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><path d=\"M 14.5,7 8,0 1.5,7 Z\"/></svg>';\n\n/**\n * A tooltip is a floating label that briefly explains an action, function, or an element.\n * Its content is exclusively text and shouldn't be vital information for users.\n * If richer media is desired, consider using a popover instead.\n * @see https://dialtone.dialpad.com/components/tooltip.html\n */\nexport default {\n name: 'DtTooltip',\n\n mixins: [ModeMixin],\n\n props: {\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\"\n * if defined, otherwise it will automatically position to a new location\n * as it sees best fit. See\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => ['auto'],\n },\n\n /**\n * @deprecated Use contentMode=\"invert\"\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the tooltip from its reference element\n * by the specified number of pixels. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 12],\n },\n\n /**\n * Whether to show the arrow between the tooltip and its anchor.\n * @values true, false\n */\n showArrow: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The direction the popover displays relative to the anchor. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end\n */\n placement: {\n type: String,\n default: 'top',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * If the tooltip sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: true,\n validator: (sticky) => {\n return TOOLTIP_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Sets the element to which the tooltip is going to append to.\n * 'body' appends to the nearest ancestor <dialog> element when inside one\n * (keeping the tooltip in the browser's top layer), or to the nearest body otherwise.\n * To always append to body regardless of dialog context, pass document.body as an HTMLElement.\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', 'root', HTMLElement,\n */\n appendTo: {\n type: [HTML_ELEMENT_TYPE, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Additional css classes for the tooltip content 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 contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the anchor 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 anchorClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * A provided message for the tooltip content\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Controls whether hover/focus causes the tooltip to appear.\n * Cannot be combined with the open prop. open value will be ignored.\n * by default this is true, if you override with false, the tooltip will never show up.\n */\n enabled: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.\n * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.\n * @values null, true, false\n */\n open: {\n type: [Boolean, null],\n default: null,\n },\n\n /**\n * Whether the tooltip should have a transition effect (fade).\n */\n transition: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the tooltip will have a delay when being focused or moused over.\n * @values true, false\n */\n delay: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Set a custom theme on the tooltip. See https://atomiks.github.io/tippyjs/v6/themes/\n */\n theme: {\n type: String,\n default: null,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n * @deprecated Use externalAnchorElement instead for Shadow DOM compatibility.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n\n /**\n * External anchor element reference. Use this instead of externalAnchor when\n * the anchor may be inside a Shadow DOM, as querySelector cannot pierce shadow boundaries.\n */\n externalAnchorElement: {\n type: HTML_ELEMENT_TYPE,\n default: null,\n },\n },\n\n emits: [\n /**\n * Emitted when tooltip is shown or hidden\n *\n * @event shown\n * @type {Boolean}\n */\n 'shown',\n\n /**\n * Sync open value\n *\n * @event update:open\n */\n 'update:open',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n hasSlotContent,\n tip: null,\n\n inTimer: null,\n\n // Internal state for whether the tooltip is shown. Changing the prop\n // will update this.\n internalShow: false,\n\n // this is where the placement currently is, this can be different than\n // the placement prop when there is not enough available room for the tip\n // to display and it uses a fallback placement.\n currentPlacement: this.placement,\n };\n },\n\n computed: {\n\n tippyArrow () {\n return this.showArrow ? TOOLTIP_ARROW_SVG : false;\n },\n\n tippyProps () {\n return {\n arrow: this.tippyArrow,\n offset: this.offset,\n delay: this.delay ? TOOLTIP_DELAY_MS : false,\n placement: this.placement,\n sticky: this.sticky,\n theme: this.inverted ? 'inverted' : this.theme,\n animation: this.transition ? 'fade' : false,\n // onShown only triggers when transition is truthy\n onShown: (tooltipInstance) => this.onShow(tooltipInstance, 'onShown'),\n // onShown will always be called, but it will be called before the animation is complete\n onShow: (tooltipInstance) => this.onShow(tooltipInstance, 'onShow'),\n onHidden: this.onHide,\n\n popperOptions: getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n hasHideModifierEnabled: true,\n onChangePlacement: this.onChangePlacement,\n }),\n };\n },\n\n anchor () {\n if (this.externalAnchorElement) return this.externalAnchorElement;\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: 'setProps',\n\n // tippyProps only tracks the offset/fallbackPlacements array references, so in-place\n // mutations (e.g. offset[1] = 8) need their own deep watchers to trigger setProps.\n // Reference replacements are already handled by the tippyProps watcher above; skip\n // those here (newValue === oldValue only when the array was mutated in place) to\n // avoid calling setProps twice for the same change.\n offset: {\n deep: true,\n handler (newValue, oldValue) {\n if (newValue === oldValue) this.setProps();\n },\n },\n\n fallbackPlacements: {\n deep: true,\n handler (newValue, oldValue) {\n if (newValue === oldValue) this.setProps();\n },\n },\n\n open: {\n handler: function (open) {\n if (open !== null && this.enabled) {\n this.internalShow = open;\n }\n },\n\n immediate: true,\n },\n\n internalShow (value) {\n if (!this.tip || !this.anchor) return;\n\n if (value) {\n this.setProps();\n this.tip.show();\n } else {\n this.tip.hide();\n }\n },\n\n sticky (sticky) {\n this.tip.setProps({\n sticky,\n });\n },\n },\n\n async mounted () {\n if (!this.enabled && this.open != null) {\n console.warn('Tooltip: You cannot use both the enabled and open props at the same time.');\n console.warn('The open prop will be ignored.');\n }\n\n this.tip = createTippy(this.anchor, this.initOptions());\n if (this.externalAnchor || this.externalAnchorElement) {\n await flushPromises();\n this.addExternalAnchorEventListeners();\n }\n warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n },\n\n beforeUnmount () {\n (this.externalAnchor || this.externalAnchorElement) && this.removeExternalAnchorEventListeners();\n\n if (this.anchor?._tippy) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n getModeReferenceEl () {\n return this.anchor;\n },\n\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (returnFirstEl(this.$el).getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"], .d-modal[open], .d-modal--transparent[open]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 651 when\n // anchor of popover is within a drawer.\n returnFirstEl(this.$el).closest('.d-zi-drawer')) {\n return 651;\n } else {\n return 400;\n }\n },\n\n hasVisibleFocus () {\n return this.anchor.matches(':focus-visible');\n },\n\n onEnterAnchor (e) {\n if (!this.enabled) return;\n if (this.delay && this.inTimer === null) {\n this.inTimer = setTimeout(() => {\n this.triggerShow(e);\n }, TOOLTIP_DELAY_MS);\n } else {\n this.triggerShow(e);\n }\n },\n\n triggerShow (e) {\n if (e.type === 'focusin') {\n // only show tooltips on visible focus when triggered via focus.\n // when the user is using the mouse they only want tooltips to display\n // on mouseover.\n //\n // Example: anchor of a popover is a button with tooltip.\n // closing it with the mouse would trigger the tooltip to display as\n // the anchor is focused on close. Not what we want.\n if (this.open === null && this.hasVisibleFocus()) {\n this.internalShow = true;\n }\n } else {\n if (this.open === null) this.internalShow = true;\n }\n },\n\n onLeaveAnchor (e) {\n if (e.type === 'keydown' && e.code !== 'Escape') return;\n\n clearTimeout(this.inTimer);\n this.inTimer = null;\n this.triggerHide();\n },\n\n triggerHide () {\n if (this.open === null) this.internalShow = false;\n },\n\n onChangePlacement (placement) {\n this.currentPlacement = placement;\n },\n\n onHide () {\n this.tip?.unmount();\n this.$emit('shown', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n onShow (tooltipInstance, callingMethod) {\n if (!this.tooltipHasContent(tooltipInstance)) {\n return false;\n }\n if (this.transition && callingMethod === 'onShow') {\n return;\n }\n this.$emit('shown', true);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n resolveAppendTo () {\n // When inside a native <dialog>, append there to stay in the browser's top layer.\n if (this.appendTo === 'body') {\n // querySelector('body') returns null when the anchor is detached or inside a shadow root,\n // and tippy then throws on `parentNode.contains(popper)`, so fall back to document.body.\n return this.anchor?.closest('dialog') ??\n this.anchor?.getRootNode()?.querySelector?.('body') ??\n document.body;\n }\n return this.appendTo;\n },\n\n setProps () {\n if (!this.tip || !this.tip.setProps || !this.anchor) return;\n\n if (this.tip && this.tip.setProps) {\n this.tip.setProps({\n ...this.tippyProps,\n // these need to be set here rather than in tippyProps because they are non-reactive\n appendTo: this.resolveAppendTo(),\n zIndex: this.calculateAnchorZindex(),\n });\n }\n },\n\n onMount () {\n this.setProps();\n },\n\n tooltipHasContent (tooltipInstance) {\n // don't show tooltip when no content\n if (tooltipInstance.props.content.textContent.trim().length === 0) {\n return false;\n }\n return true;\n },\n\n // Set initial options here. Reactive options belong in tippyProps, but arrow is duplicated because Tippy\n // renders its default arrow during synchronous showOnCreate mounting. setProps only runs later from\n // onMount, so omitting the initial value would leave the default arrow in the DOM until then.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: this.tippyArrow,\n // transition duration - same as our custom fade delay in dialtone-globals.less\n duration: 180,\n interactive: false,\n trigger: 'manual',\n hideOnClick: false,\n // disable tooltip from displaying on touch devices\n touch: false,\n onMount: this.onMount,\n showOnCreate: this.internalShow,\n appendTo: this.resolveAppendTo(),\n popperOptions: getPopperOptions({\n hasHideModifierEnabled: true,\n }),\n };\n },\n\n addExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n removeExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;AA+DA,IAAM,IAAoB,gHAQrB,IAAU;CACb,MAAM;CAEN,QAAQ,CAAC,EAAU;CAEnB,OAAO;EAIL,IAAI;GACF,MAAM;GACN,UAAW;AAAE,WAAO,GAAiB;;GACtC;EAeD,oBAAoB;GAClB,MAAM;GACN,eAAe,CAAC,OAAO;GACxB;EAMD,UAAU;GACR,MAAM;GACN,SAAS;GACV;EAaD,QAAQ;GACN,MAAM;GACN,eAAe,CAAC,GAAG,GAAG;GACvB;EAMD,WAAW;GACT,MAAM;GACN,SAAS;GACV;EAgBD,WAAW;GACT,MAAM;GACN,SAAS;GACT,UAAW,GAAW;AACpB,WAAO,EAAmB,SAAS,EAAU;;GAEhD;EAiBD,QAAQ;GACN,MAAM,CAAC,SAAS,OAAO;GACvB,SAAS;GACT,YAAY,MACH,EAAsB,SAAS,EAAO;GAEhD;EAUD,UAAU;GACR,MAAM,CAAC,GAAmB,OAAO;GACjC,SAAS;GACT,YAAW,MACF,EAAyB,SAAS,EAAQ,IAC5C,aAAoB;GAE5B;EAOD,cAAc;GACZ,MAAM;IAAC;IAAQ;IAAQ;IAAM;GAC7B,SAAS;GACV;EAOD,aAAa;GACX,MAAM;IAAC;IAAQ;IAAQ;IAAM;GAC7B,SAAS;GACV;EAKD,SAAS;GACP,MAAM;GACN,SAAS;GACV;EAOD,SAAS;GACP,MAAM;GACN,SAAS;GACV;EAOD,MAAM;GACJ,MAAM,CAAC,SAAS,KAAK;GACrB,SAAS;GACV;EAKD,YAAY;GACV,MAAM;GACN,SAAS;GACV;EAMD,OAAO;GACL,MAAM;GACN,SAAS;GACV;EAKD,OAAO;GACL,MAAM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AA,EADF,EAAA,QAAO,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,IAAA,EAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../directives/tooltip_directive/index.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../chunk-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../chunk-BK-Lzi7j.cjs`),t=require(`../../utils-Db-kV6Sr.cjs`),n=require(`../../mode_constants-DM0SVbFM.cjs`),r=require(`../tooltip/tooltip-constants.cjs`),i=require(`../tooltip/tooltip.cjs`);let a=require(`vue`),o=require(`deep-equal`);o=e.r(o);var s={name:`dt-tooltip-directive`,install(e){if(!globalThis.__DtTooltipDirectiveApp){let e=(0,a.createApp)({name:`DtTooltipDirectiveApp`,components:{DtTooltip:i.default},data(){return{tooltips:[]}},mounted(){globalThis.__DtTooltipDirectiveApp=this},methods:{addOrUpdateTooltip(e,t){let n=this.tooltips.findIndex(t=>t.id===e);n===-1?this.tooltips.push({id:e,...t}):this.tooltips.splice(n,1,{id:e,...t})},removeTooltip(e){this.tooltips=this.tooltips.filter(t=>t.id!==e)}},render(){return(0,a.h)(`div`,this.tooltips.map(({id:e,anchorElement:t,...n})=>(0,a.h)(i.default,{key:e,...n,sticky:n.sticky===void 0?!0:n.sticky,delay:n.delay===void 0?process.env.NODE_ENV!==`test`:n.delay,externalAnchorElement:t})))}}),t=document.createElement(`div`);document.body.appendChild(t),e.mount(t)}let s=globalThis.__DtTooltipDirectiveApp;e.directive(`dt-tooltip`,{beforeMount(e,t){c(e,t)},updated(e,t){(0,o.default)(t.value,t.oldValue)||c(e,t)},unmounted(e){s.removeTooltip(e.getAttribute(`data-dt-tooltip-id`))}});function c(e,i){if(i.value===null||i.value===void 0){let t=e.getAttribute(`data-dt-tooltip-id`);t&&s.removeTooltip(t);return}let a=e.getAttribute(`data-dt-tooltip-id`)||t.m(),o;if(typeof i.value==`string`)o={message:i.value,placement:i.arg||`top`};else if(typeof i.value==`object`&&i.value!==null)o={placement:i.arg||i.value.placement||`top`,...i.value};else{console.error(`DtTooltipDirective: binding value must be string, object, null or undefined`);return}Object.keys(i.modifiers).forEach(e=>{switch(e){case`inverted`:o.inverted=!0;break;case`no-delay`:o.delay=!1;break;case`no-transition`:o.transition=!1;break;default:n.n.includes(e)?o.contentMode=e:r.TOOLTIP_DIRECTIONS.includes(e)&&(o.placement=e);break}}),o.anchorElement=e,e.setAttribute(`data-dt-tooltip-id`,a),s.addOrUpdateTooltip(a,o)}}};exports.DtTooltipDirective=s,exports.default=s;
|
|
2
2
|
//# sourceMappingURL=tooltip.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.cjs","names":["DtTooltip","getUniqueString","CONTENT_MODE_VALUES","TOOLTIP_DIRECTIONS"],"sources":["../../../directives/tooltip_directive/tooltip.js"],"sourcesContent":["import { DtTooltip, TOOLTIP_DIRECTIONS } from '@/components/Tooltip';\nimport { getUniqueString } from '@/common/utils';\nimport { createApp, h } from 'vue';\nimport deepEqual from 'deep-equal';\nimport { CONTENT_MODE_VALUES } from '@/common/mode_constants';\n\nexport const DtTooltipDirective = {\n name: 'dt-tooltip-directive',\n install (app) {\n const DEFAULT_PLACEMENT = 'top';\n if (!globalThis.__DtTooltipDirectiveApp) {\n const DtTooltipDirectiveApp = createApp({\n name: 'DtTooltipDirectiveApp',\n components: { DtTooltip },\n data () {\n return {\n tooltips: [],\n };\n },\n\n mounted () {\n globalThis.__DtTooltipDirectiveApp = this;\n },\n\n methods: {\n addOrUpdateTooltip (id, tooltipConfig) {\n const index = this.tooltips.findIndex(tooltip => tooltip.id === id);\n if (index !== -1) {\n // Update existing tooltip\n this.tooltips.splice(index, 1, { id, ...tooltipConfig });\n } else {\n // Add new tooltip\n this.tooltips.push({ id, ...tooltipConfig });\n }\n },\n\n removeTooltip (id) {\n this.tooltips = this.tooltips.filter(tooltip => tooltip.id !== id);\n },\n },\n\n render () {\n return h('div',\n this.tooltips.map(({ id, anchorElement, ...tooltipProps }) => {\n return h(DtTooltip, {\n key: id,\n ...tooltipProps,\n sticky: tooltipProps.sticky !== undefined ? tooltipProps.sticky : true,\n /**\n * Set the delay to false when running tests only.\n */\n delay: tooltipProps.delay !== undefined ? tooltipProps.delay : (process.env.NODE_ENV !== 'test'),\n externalAnchorElement: anchorElement,\n });\n }),\n );\n },\n });\n\n const mountPoint = document.createElement('div');\n document.body.appendChild(mountPoint);\n DtTooltipDirectiveApp.mount(mountPoint);\n }\n\n const tooltipApp = globalThis.__DtTooltipDirectiveApp;\n\n app.directive('dt-tooltip', {\n beforeMount (anchor, binding) {\n // Initial tooltip setup\n setupTooltip(anchor, binding);\n },\n updated (anchor, binding) {\n // Update tooltip on binding value change\n // Use deep equality check to prevent infinite loops when objects are passed\n if (!deepEqual(binding.value, binding.oldValue)) {\n setupTooltip(anchor, binding);\n }\n },\n unmounted (anchor) {\n tooltipApp.removeTooltip(anchor.getAttribute('data-dt-tooltip-id'));\n },\n });\n\n function setupTooltip (anchor, binding) {\n if (binding.value === null || binding.value === undefined) {\n const tooltipId = anchor.getAttribute('data-dt-tooltip-id');\n if (tooltipId) {\n tooltipApp.removeTooltip(tooltipId);\n }\n return;\n }\n const tooltipId = anchor.getAttribute('data-dt-tooltip-id') || getUniqueString();\n\n let tooltipConfig;\n if (typeof binding.value === 'string') {\n tooltipConfig = {\n message: binding.value,\n placement: binding.arg || DEFAULT_PLACEMENT,\n };\n } else if (typeof binding.value === 'object' && binding.value !== null) {\n tooltipConfig = {\n placement: binding.arg || binding.value.placement || DEFAULT_PLACEMENT,\n ...binding.value,\n };\n } else {\n console.error('DtTooltipDirective: binding value must be string, object, null or undefined');\n return;\n }\n\n Object.keys(binding.modifiers).forEach(modifier => {\n switch (modifier) {\n case 'inverted':\n tooltipConfig.inverted = true;\n break;\n case 'no-delay':\n tooltipConfig.delay = false;\n break;\n case 'no-transition':\n tooltipConfig.transition = false;\n break;\n default:\n if (CONTENT_MODE_VALUES.includes(modifier)) {\n tooltipConfig.contentMode = modifier;\n } else if (TOOLTIP_DIRECTIONS.includes(modifier)) {\n tooltipConfig.placement = modifier;\n }\n break;\n }\n });\n\n tooltipConfig.anchorElement = anchor;\n anchor.setAttribute('data-dt-tooltip-id', tooltipId);\n tooltipApp.addOrUpdateTooltip(tooltipId, tooltipConfig);\n }\n },\n};\n\nexport default DtTooltipDirective;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tooltip.cjs","names":["DtTooltip","getUniqueString","CONTENT_MODE_VALUES","TOOLTIP_DIRECTIONS"],"sources":["../../../directives/tooltip_directive/tooltip.js"],"sourcesContent":["import { DtTooltip, TOOLTIP_DIRECTIONS } from '@/components/Tooltip';\nimport { getUniqueString } from '@/common/utils';\nimport { createApp, h } from 'vue';\nimport deepEqual from 'deep-equal';\nimport { CONTENT_MODE_VALUES } from '@/common/mode_constants';\n\nexport const DtTooltipDirective = {\n name: 'dt-tooltip-directive',\n install (app) {\n const DEFAULT_PLACEMENT = 'top';\n if (!globalThis.__DtTooltipDirectiveApp) {\n const DtTooltipDirectiveApp = createApp({\n name: 'DtTooltipDirectiveApp',\n components: { DtTooltip },\n data () {\n return {\n tooltips: [],\n };\n },\n\n mounted () {\n globalThis.__DtTooltipDirectiveApp = this;\n },\n\n methods: {\n addOrUpdateTooltip (id, tooltipConfig) {\n const index = this.tooltips.findIndex(tooltip => tooltip.id === id);\n if (index !== -1) {\n // Update existing tooltip\n this.tooltips.splice(index, 1, { id, ...tooltipConfig });\n } else {\n // Add new tooltip\n this.tooltips.push({ id, ...tooltipConfig });\n }\n },\n\n removeTooltip (id) {\n this.tooltips = this.tooltips.filter(tooltip => tooltip.id !== id);\n },\n },\n\n render () {\n return h('div',\n this.tooltips.map(({ id, anchorElement, ...tooltipProps }) => {\n return h(DtTooltip, {\n key: id,\n ...tooltipProps,\n sticky: tooltipProps.sticky !== undefined ? tooltipProps.sticky : true,\n /**\n * Set the delay to false when running tests only.\n */\n delay: tooltipProps.delay !== undefined ? tooltipProps.delay : (process.env.NODE_ENV !== 'test'),\n externalAnchorElement: anchorElement,\n });\n }),\n );\n },\n });\n\n const mountPoint = document.createElement('div');\n document.body.appendChild(mountPoint);\n DtTooltipDirectiveApp.mount(mountPoint);\n }\n\n const tooltipApp = globalThis.__DtTooltipDirectiveApp;\n\n app.directive('dt-tooltip', {\n beforeMount (anchor, binding) {\n // Initial tooltip setup\n setupTooltip(anchor, binding);\n },\n updated (anchor, binding) {\n // Update tooltip on binding value change\n // Use deep equality check to prevent infinite loops when objects are passed\n if (!deepEqual(binding.value, binding.oldValue)) {\n setupTooltip(anchor, binding);\n }\n },\n unmounted (anchor) {\n tooltipApp.removeTooltip(anchor.getAttribute('data-dt-tooltip-id'));\n },\n });\n\n function setupTooltip (anchor, binding) {\n if (binding.value === null || binding.value === undefined) {\n const tooltipId = anchor.getAttribute('data-dt-tooltip-id');\n if (tooltipId) {\n tooltipApp.removeTooltip(tooltipId);\n }\n return;\n }\n const tooltipId = anchor.getAttribute('data-dt-tooltip-id') || getUniqueString();\n\n let tooltipConfig;\n if (typeof binding.value === 'string') {\n tooltipConfig = {\n message: binding.value,\n placement: binding.arg || DEFAULT_PLACEMENT,\n };\n } else if (typeof binding.value === 'object' && binding.value !== null) {\n tooltipConfig = {\n placement: binding.arg || binding.value.placement || DEFAULT_PLACEMENT,\n ...binding.value,\n };\n } else {\n console.error('DtTooltipDirective: binding value must be string, object, null or undefined');\n return;\n }\n\n Object.keys(binding.modifiers).forEach(modifier => {\n switch (modifier) {\n case 'inverted':\n tooltipConfig.inverted = true;\n break;\n case 'no-delay':\n tooltipConfig.delay = false;\n break;\n case 'no-transition':\n tooltipConfig.transition = false;\n break;\n default:\n if (CONTENT_MODE_VALUES.includes(modifier)) {\n tooltipConfig.contentMode = modifier;\n } else if (TOOLTIP_DIRECTIONS.includes(modifier)) {\n tooltipConfig.placement = modifier;\n }\n break;\n }\n });\n\n tooltipConfig.anchorElement = anchor;\n anchor.setAttribute('data-dt-tooltip-id', tooltipId);\n tooltipApp.addOrUpdateTooltip(tooltipId, tooltipConfig);\n }\n },\n};\n\nexport default DtTooltipDirective;\n"],"mappings":"wWAMA,IAAa,EAAqB,CAChC,KAAM,uBACN,QAAS,EAAK,CAEZ,GAAI,CAAC,WAAW,wBAAyB,CACvC,IAAM,GAAA,EAAA,EAAA,WAAkC,CACtC,KAAM,wBACN,WAAY,CAAE,UAAA,EAAA,QAAW,CACzB,MAAQ,CACN,MAAO,CACL,SAAU,EAAE,CACb,EAGH,SAAW,CACT,WAAW,wBAA0B,MAGvC,QAAS,CACP,mBAAoB,EAAI,EAAe,CACrC,IAAM,EAAQ,KAAK,SAAS,UAAU,GAAW,EAAQ,KAAO,EAAG,CAC/D,IAAU,GAKZ,KAAK,SAAS,KAAK,CAAE,KAAI,GAAG,EAAe,CAAC,CAH5C,KAAK,SAAS,OAAO,EAAO,EAAG,CAAE,KAAI,GAAG,EAAe,CAAC,EAO5D,cAAe,EAAI,CACjB,KAAK,SAAW,KAAK,SAAS,OAAO,GAAW,EAAQ,KAAO,EAAG,EAErE,CAED,QAAU,CACR,OAAA,EAAA,EAAA,GAAS,MACP,KAAK,SAAS,KAAK,CAAE,KAAI,gBAAe,GAAG,MACzC,EAAA,EAAA,GAASA,EAAAA,QAAW,CAClB,IAAK,EACL,GAAG,EACH,OAAQ,EAAa,SAAW,IAAA,GAAkC,GAAtB,EAAa,OAIzD,MAAO,EAAa,QAAU,IAAA,GAAyB,QAAA,IAAA,WAAkC,OAA/C,EAAa,MACvD,sBAAuB,EACxB,CAAC,CACF,CACH,EAEJ,CAAC,CAEI,EAAa,SAAS,cAAc,MAAM,CAChD,SAAS,KAAK,YAAY,EAAW,CACrC,EAAsB,MAAM,EAAW,CAGzC,IAAM,EAAa,WAAW,wBAE9B,EAAI,UAAU,aAAc,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Vu.js";
|
|
2
|
+
import { n as t } from "../../mode_constants-CC73P7d-.js";
|
|
3
3
|
import { TOOLTIP_DIRECTIONS as n } from "../tooltip/tooltip-constants.js";
|
|
4
4
|
import r from "../tooltip/tooltip.js";
|
|
5
5
|
import { createApp as i, h as a } from "vue";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../components/ValidationMessages/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/validators/index.cjs`),t=require(`../../utils-Db-kV6Sr.cjs`),n=require(`../../_plugin-vue_export-helper-CX7YVcP6.cjs`);let r=require(`vue`),i=require(`@dialpad/dialtone-icons/vue`);var a=Object.freeze({warning:i.DtIconAlertTriangle,critical:i.DtIconAlertCircle,positive:i.DtIconCheckCircle,info:i.DtIconInfo}),o={name:`DtValidationMessages`,components:{DtIconAlertTriangle:i.DtIconAlertTriangle,DtIconAlertCircle:i.DtIconAlertCircle,DtIconCheckCircle:i.DtIconCheckCircle,DtIconInfo:i.DtIconInfo},props:{id:{type:String,default(){return t.m()}},validationMessages:{type:Array,default:()=>[],validator:t=>e.validationMessageValidator(t)},showMessages:{type:Boolean,default:!0},iconClass:{type:[String,Array,Object],default:``}},computed:{filteredValidationMessages(){return t.s(this.validationMessages)},validationState(){return t.h(this.validationMessages)}},methods:{getMessageKey(e,t){return`validation-message-${e}-${t}-${this.id}`},iconForType(e){return a[e]??null},messageTypeClass(e){return{critical:`base-input__message--critical d-validation-message--critical`,warning:`base-input__message--warning d-validation-message--warning`,positive:`base-input__message--positive d-validation-message--positive`,info:`base-input__message--info d-validation-message--info`}[e]}}},s=[`id`],c=[`innerHTML`];function l(e,t,n,i,a,o){return(0,r.openBlock)(),(0,r.createElementBlock)(`div`,{id:n.id,"aria-live":`assertive`,class:`base-input__messages d-validation-message__container`,"data-qa":`validation-messages-container`},[n.showMessages?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:0},(0,r.renderList)(o.filteredValidationMessages,({message:t,type:i},a)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{key:o.getMessageKey(i,a),"data-qa":`validation-message`,class:(0,r.normalizeClass)([`base-input__message`,`d-validation-message`,o.messageTypeClass(i)])},[(0,r.renderSlot)(e.$slots,`icon`,{type:i},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(o.iconForType(i)),{class:(0,r.normalizeClass)([`d-validation-message__icon`,n.iconClass]),"data-qa":`validation-message-icon`,size:`300`},null,8,[`class`]))]),(0,r.createElementVNode)(`p`,{innerHTML:t},null,8,c)],2))),128)):(0,r.createCommentVNode)(``,!0)],8,s)}var u=n.t(o,[[`render`,l]]);exports.default=u;
|
|
2
2
|
//# sourceMappingURL=validation-messages.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-messages.cjs","names":[],"sources":["../../../components/ValidationMessages/ValidationMessages.vue"],"sourcesContent":["<template>\n <!-- Live region is always present so VoiceOver can detect mutations on a stable node (DLT-3430). -->\n <div\n :id=\"id\"\n aria-live=\"assertive\"\n class=\"base-input__messages d-validation-message__container\"\n data-qa=\"validation-messages-container\"\n >\n <template v-if=\"showMessages\">\n <div\n v-for=\"({ message, type }, index) in filteredValidationMessages\"\n :key=\"getMessageKey(type, index)\"\n data-qa=\"validation-message\"\n :class=\"[\n 'base-input__message',\n 'd-validation-message',\n messageTypeClass(type),\n ]\"\n >\n <!-- @slot icon — replaces the default per-type DtIcon. Slot content must be a Dialtone icon (carries\n the `d-icon` class) so the CSS pseudo-element fallback suppresses correctly. Receives { type } scope. -->\n <slot\n name=\"icon\"\n :type=\"type\"\n >\n <component\n :is=\"iconForType(type)\"\n :class=\"['d-validation-message__icon', iconClass]\"\n data-qa=\"validation-message-icon\"\n size=\"300\"\n />\n </slot>\n <p v-html=\"message\" />\n </div>\n </template>\n </div>\n</template>\n\n<script>\nimport { validationMessageValidator } from '@/common/validators';\nimport {\n getUniqueString,\n filterFormattedMessages,\n getValidationState,\n} from '@/common/utils';\nimport {\n DtIconAlertTriangle,\n DtIconAlertCircle,\n DtIconCheckCircle,\n DtIconInfo,\n} from '@dialpad/dialtone-icons/vue';\n\nconst kindToIcon = Object.freeze({\n warning: DtIconAlertTriangle,\n critical: DtIconAlertCircle,\n positive: DtIconCheckCircle,\n info: DtIconInfo,\n});\n\n/**\n * Validation messages are used to convey information to the user about the current state of the input element.\n * These messages can have a critical, warning, positive, or info type.\n * @see https://dialtone.dialpad.com/components/validation_messages.html\n */\nexport default {\n name: 'DtValidationMessages',\n\n components: { DtIconAlertTriangle, DtIconAlertCircle, DtIconCheckCircle, DtIconInfo },\n\n props: {\n /**\n * The id of the validation message\n */\n id: {\n type: String,\n default () {\n return getUniqueString();\n },\n },\n\n /**\n * Array of validation messages. Each message has the following structure:\n * `{ message: \"Some informative message\", type: \"critical|warning|positive|info\"}`\n */\n validationMessages: {\n type: Array,\n default: () => [],\n validator: messages => validationMessageValidator(messages),\n },\n\n /**\n * Show Validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n filteredValidationMessages () {\n return filterFormattedMessages(this.validationMessages);\n },\n\n validationState () {\n return getValidationState(this.validationMessages);\n },\n },\n\n methods: {\n getMessageKey (type, index) {\n return `validation-message-${type}-${index}-${this.id}`;\n },\n\n iconForType (type) {\n return kindToIcon[type] ?? null;\n },\n\n messageTypeClass (type) {\n const messageTypesClasses = {\n critical: 'base-input__message--critical d-validation-message--critical',\n warning: 'base-input__message--warning d-validation-message--warning',\n positive: 'base-input__message--positive d-validation-message--positive',\n info: 'base-input__message--info d-validation-message--info',\n };\n\n return messageTypesClasses[type];\n },\n },\n};\n</script>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"validation-messages.cjs","names":[],"sources":["../../../components/ValidationMessages/ValidationMessages.vue"],"sourcesContent":["<template>\n <!-- Live region is always present so VoiceOver can detect mutations on a stable node (DLT-3430). -->\n <div\n :id=\"id\"\n aria-live=\"assertive\"\n class=\"base-input__messages d-validation-message__container\"\n data-qa=\"validation-messages-container\"\n >\n <template v-if=\"showMessages\">\n <div\n v-for=\"({ message, type }, index) in filteredValidationMessages\"\n :key=\"getMessageKey(type, index)\"\n data-qa=\"validation-message\"\n :class=\"[\n 'base-input__message',\n 'd-validation-message',\n messageTypeClass(type),\n ]\"\n >\n <!-- @slot icon — replaces the default per-type DtIcon. Slot content must be a Dialtone icon (carries\n the `d-icon` class) so the CSS pseudo-element fallback suppresses correctly. Receives { type } scope. -->\n <slot\n name=\"icon\"\n :type=\"type\"\n >\n <component\n :is=\"iconForType(type)\"\n :class=\"['d-validation-message__icon', iconClass]\"\n data-qa=\"validation-message-icon\"\n size=\"300\"\n />\n </slot>\n <p v-html=\"message\" />\n </div>\n </template>\n </div>\n</template>\n\n<script>\nimport { validationMessageValidator } from '@/common/validators';\nimport {\n getUniqueString,\n filterFormattedMessages,\n getValidationState,\n} from '@/common/utils';\nimport {\n DtIconAlertTriangle,\n DtIconAlertCircle,\n DtIconCheckCircle,\n DtIconInfo,\n} from '@dialpad/dialtone-icons/vue';\n\nconst kindToIcon = Object.freeze({\n warning: DtIconAlertTriangle,\n critical: DtIconAlertCircle,\n positive: DtIconCheckCircle,\n info: DtIconInfo,\n});\n\n/**\n * Validation messages are used to convey information to the user about the current state of the input element.\n * These messages can have a critical, warning, positive, or info type.\n * @see https://dialtone.dialpad.com/components/validation_messages.html\n */\nexport default {\n name: 'DtValidationMessages',\n\n components: { DtIconAlertTriangle, DtIconAlertCircle, DtIconCheckCircle, DtIconInfo },\n\n props: {\n /**\n * The id of the validation message\n */\n id: {\n type: String,\n default () {\n return getUniqueString();\n },\n },\n\n /**\n * Array of validation messages. Each message has the following structure:\n * `{ message: \"Some informative message\", type: \"critical|warning|positive|info\"}`\n */\n validationMessages: {\n type: Array,\n default: () => [],\n validator: messages => validationMessageValidator(messages),\n },\n\n /**\n * Show Validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n filteredValidationMessages () {\n return filterFormattedMessages(this.validationMessages);\n },\n\n validationState () {\n return getValidationState(this.validationMessages);\n },\n },\n\n methods: {\n getMessageKey (type, index) {\n return `validation-message-${type}-${index}-${this.id}`;\n },\n\n iconForType (type) {\n return kindToIcon[type] ?? null;\n },\n\n messageTypeClass (type) {\n const messageTypesClasses = {\n critical: 'base-input__message--critical d-validation-message--critical',\n warning: 'base-input__message--warning d-validation-message--warning',\n positive: 'base-input__message--positive d-validation-message--positive',\n info: 'base-input__message--info d-validation-message--info',\n };\n\n return messageTypesClasses[type];\n },\n },\n};\n</script>\n"],"mappings":"sVAoDA,IAAM,EAAa,OAAO,OAAO,CAC/B,QAAS,EAAA,oBACT,SAAU,EAAA,kBACV,SAAU,EAAA,kBACV,KAAM,EAAA,WACP,CAAC,CAOG,EAAU,CACb,KAAM,uBAEN,WAAY,CAAE,oBAAA,EAAA,oBAAqB,kBAAA,EAAA,kBAAmB,kBAAA,EAAA,kBAAmB,WAAA,EAAA,WAAY,CAErF,MAAO,CAIL,GAAI,CACF,KAAM,OACN,SAAW,CACT,OAAO,EAAA,GAAiB,EAE3B,CAMD,mBAAoB,CAClB,KAAM,MACN,YAAe,EAAE,CACjB,UAAW,GAAY,EAAA,2BAA2B,EAAS,CAC5D,CAMD,aAAc,CACZ,KAAM,QACN,QAAS,GACV,CAKD,UAAW,CACT,KAAM,CAAC,OAAQ,MAAO,OAAO,CAC7B,QAAS,GACV,CACF,CAED,SAAU,CACR,4BAA8B,CAC5B,OAAO,EAAA,EAAwB,KAAK,mBAAmB,EAGzD,iBAAmB,CACjB,OAAO,EAAA,EAAmB,KAAK,mBAAmB,EAErD,CAED,QAAS,CACP,cAAe,EAAM,EAAO,CAC1B,MAAO,sBAAsB,EAAK,GAAG,EAAM,GAAG,KAAK,MAGrD,YAAa,EAAM,CACjB,OAAO,EAAW,IAAS,MAG7B,iBAAkB,EAAM,CAQtB,MAP4B,CAC1B,SAAU,+DACV,QAAS,6DACT,SAAU,+DACV,KAAM,uDACP,CAE0B,IAE9B,CACF,mGAvGO,MAAA,CAhCH,GAAI,EAAA,GACL,YAAU,YACV,MAAM,uDACN,UAAQ,kCAEQ,EAAA,eAAA,EAAA,EAAA,WAAA,GAAA,EAAA,EAAA,EAAA,oBAyBR,EAAA,SAAA,CAAA,IAAA,EAAA,EAAA,EAAA,EAAA,YAvBiC,EAAA,4BAA0B,CAArD,UAAS,QAAQ,gDAuBvB,MAAA,CAtBH,IAAK,EAAA,cAAc,EAAM,EAAK,CAC/B,UAAQ,qBACP,OAAA,EAAA,EAAA,gBAAK,8CAAiF,EAAA,iBAAiB,EAAI,sBAkBrG,EAAA,OAAA,OAAA,CARE,OAAI,KAQN,GAAA,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,cAAA,EAAA,EAAA,yBALE,EAAA,YAAY,EAAI,CAAA,CAAA,CACpB,OAAA,EAAA,EAAA,gBAAK,CAAA,6BAAiC,EAAA,UAAS,CAAA,CAChD,UAAQ,0BACR,KAAK,qDAGa,IAAA,CAAnB,UAAQ,EAAO,CAAA,KAAA,EAAA,EAAA,CAAA,CAAA,EAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { validationMessageValidator as e } from "../../common/validators/index.js";
|
|
2
|
-
import {
|
|
3
|
-
import { t as i } from "../../_plugin-vue_export-helper-
|
|
2
|
+
import { h as t, m as n, s as r } from "../../utils-CXaaZqVu.js";
|
|
3
|
+
import { t as i } from "../../_plugin-vue_export-helper-B52Kst-M.js";
|
|
4
4
|
import { Fragment as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, normalizeClass as u, openBlock as d, renderList as f, renderSlot as p, resolveDynamicComponent as m } from "vue";
|
|
5
5
|
import { DtIconAlertCircle as h, DtIconAlertTriangle as g, DtIconCheckCircle as _, DtIconInfo as v } from "@dialpad/dialtone-icons/vue";
|
|
6
6
|
//#region components/ValidationMessages/ValidationMessages.vue
|
|
@@ -44,10 +44,10 @@ var y = Object.freeze({
|
|
|
44
44
|
},
|
|
45
45
|
computed: {
|
|
46
46
|
filteredValidationMessages() {
|
|
47
|
-
return
|
|
47
|
+
return r(this.validationMessages);
|
|
48
48
|
},
|
|
49
49
|
validationState() {
|
|
50
|
-
return
|
|
50
|
+
return t(this.validationMessages);
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
methods: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../chunk-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../chunk-BK-Lzi7j.cjs`);const e=require(`./en-US.cjs`),t=require(`./zh-CN.cjs`),n=require(`./nl-NL.cjs`),r=require(`./fr-FR.cjs`),i=require(`./de-DE.cjs`),a=require(`./it-IT.cjs`),o=require(`./ja-JP.cjs`),s=require(`./ko-KR.cjs`),c=require(`./pt-BR.cjs`),l=require(`./ru-RU.cjs`),u=require(`./es-LA.cjs`),d=require(`./sv-SE.cjs`);let f=require(`@dialpad/i18n`);var p=`dialtone`,m={ENGLISH:`en-US`,CHINESE:`zh-CN`,DUTCH:`nl-NL`,FRENCH:`fr-FR`,GERMAN:`de-DE`,ITALIAN:`it-IT`,JAPANESE:`ja-JP`,KOREAN:`ko-KR`,PORTUGUESE:`pt-BR`,RUSSIAN:`ru-RU`,SPANISH:`es-LA`,SWEDISH:`sv-SE`},h=`en-US`,g=`user-locale`,_=class _{constructor(v=null){if(typeof _.instance==`object`)return _.instance;this._locale=v||_.getPreferredLocale();let y={bundleSource:new f.RawBundleSource({resources:f.RawBundleSource.builtResources([[`en-US`,p,e.default],[`zh-CN`,p,t.default],[`nl-NL`,p,n.default],[`fr-FR`,p,r.default],[`de-DE`,p,i.default],[`it-IT`,p,a.default],[`ja-JP`,p,o.default],[`ko-KR`,p,s.default],[`pt-BR`,p,c.default],[`ru-RU`,p,l.default],[`es-LA`,p,u.default],[`sv-SE`,p,d.default]])}),allowedLocales:Object.values(m),fallbackLocale:h,preferredLocale:this._locale,namespaces:[p]},b;try{b=new f.LocaleManager(y)}catch(e){if(e.name!==`SecurityError`)throw e;b=new f.LocaleManager({...y,storageWrapper:new f.MemoryStorageWrapper})}return _.instance=this,this.i18n=b.useI18N(p),typeof window<`u`&&window.addEventListener(`storage`,e=>{e.key===g&&(this.currentLocale=e.newValue)}),this}static getPreferredLocale(){if(typeof window>`u`)return h;let e;try{let t=window.localStorage;if(!t)return h;e=t.getItem(g)}catch{return h}let t=Object.values(m).includes(e)?e:null,n=Object.values(m).find(e=>e.startsWith(navigator.language.slice(0,2)));return t||n||h}static getAllowedLocales(){return m}$t(...e){return this.i18n.$t(...e)}$ta(...e){return this.i18n.$ta(...e)}get currentLocale(){return this._locale}set currentLocale(e){if(e!==this._locale){if(!Object.values(m).includes(e))throw Error(`Locale ${e} is not allowed, please use one of the following: ${Object.values(m).join(`, `)}`);this._locale=e,this.i18n.setI18N({preferredLocale:e},p)}}};exports.DialtoneLocalization=_;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["RawBundleSource","enUS","zhCN","nlNL","frFR","deDE","itIT","jaJP","koKR","ptBR","ruRU","esLA","svSE","LocaleManager","MemoryStorageWrapper"],"sources":["../../localization/index.js"],"sourcesContent":["import { LocaleManager, RawBundleSource, MemoryStorageWrapper } from '@dialpad/i18n';\n\nimport enUS from './en-US.ftl?raw';\nimport zhCN from './zh-CN.ftl?raw';\nimport nlNL from './nl-NL.ftl?raw';\nimport frFR from './fr-FR.ftl?raw';\nimport deDE from './de-DE.ftl?raw';\nimport itIT from './it-IT.ftl?raw';\nimport jaJP from './ja-JP.ftl?raw';\nimport koKR from './ko-KR.ftl?raw';\nimport ptBR from './pt-BR.ftl?raw';\nimport ruRU from './ru-RU.ftl?raw';\nimport esLA from './es-LA.ftl?raw';\nimport svSE from './sv-SE.ftl?raw';\n\nconst dialtoneNamespace = 'dialtone';\nconst allowedLocales = {\n ENGLISH: 'en-US',\n CHINESE: 'zh-CN',\n DUTCH: 'nl-NL',\n FRENCH: 'fr-FR',\n GERMAN: 'de-DE',\n ITALIAN: 'it-IT',\n JAPANESE: 'ja-JP',\n KOREAN: 'ko-KR',\n PORTUGUESE: 'pt-BR',\n RUSSIAN: 'ru-RU',\n SPANISH: 'es-LA',\n SWEDISH: 'sv-SE',\n};\nconst fallbackLocale = 'en-US';\n/**\n * Default key name used by the LocaleManager to store the user's preferred locale in localStorage\n */\nconst localeManagerStorageKey = 'user-locale';\n\n/**\n * Dialtone localization class, follows the singleton pattern to make sure only one instance of the class is created.\n * Initializes the localeManager and looks for changes on the browser storage to update the current locale.\n * https://github.com/dialpad/goblin-client-tools/tree/main/packages/i18n#i18n-vue-3-compatible\n */\nexport class DialtoneLocalization {\n /**\n * @
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["RawBundleSource","enUS","zhCN","nlNL","frFR","deDE","itIT","jaJP","koKR","ptBR","ruRU","esLA","svSE","LocaleManager","MemoryStorageWrapper"],"sources":["../../localization/index.js"],"sourcesContent":["import { LocaleManager, RawBundleSource, MemoryStorageWrapper } from '@dialpad/i18n';\n\nimport enUS from './en-US.ftl?raw';\nimport zhCN from './zh-CN.ftl?raw';\nimport nlNL from './nl-NL.ftl?raw';\nimport frFR from './fr-FR.ftl?raw';\nimport deDE from './de-DE.ftl?raw';\nimport itIT from './it-IT.ftl?raw';\nimport jaJP from './ja-JP.ftl?raw';\nimport koKR from './ko-KR.ftl?raw';\nimport ptBR from './pt-BR.ftl?raw';\nimport ruRU from './ru-RU.ftl?raw';\nimport esLA from './es-LA.ftl?raw';\nimport svSE from './sv-SE.ftl?raw';\n\nconst dialtoneNamespace = 'dialtone';\nconst allowedLocales = {\n ENGLISH: 'en-US',\n CHINESE: 'zh-CN',\n DUTCH: 'nl-NL',\n FRENCH: 'fr-FR',\n GERMAN: 'de-DE',\n ITALIAN: 'it-IT',\n JAPANESE: 'ja-JP',\n KOREAN: 'ko-KR',\n PORTUGUESE: 'pt-BR',\n RUSSIAN: 'ru-RU',\n SPANISH: 'es-LA',\n SWEDISH: 'sv-SE',\n};\nconst fallbackLocale = 'en-US';\n/**\n * Default key name used by the LocaleManager to store the user's preferred locale in localStorage\n */\nconst localeManagerStorageKey = 'user-locale';\n\n/**\n * Dialtone localization class, follows the singleton pattern to make sure only one instance of the class is created.\n * Initializes the localeManager and looks for changes on the browser storage to update the current locale.\n * https://github.com/dialpad/goblin-client-tools/tree/main/packages/i18n#i18n-vue-3-compatible\n */\nexport class DialtoneLocalization {\n /**\n * @param {string | null} [locale] The preferred locale, or the browser preference when omitted.\n */\n constructor (locale = null) {\n if (typeof DialtoneLocalization.instance === 'object') {\n return DialtoneLocalization.instance;\n }\n\n this._locale = locale || DialtoneLocalization.getPreferredLocale();\n\n const bundleSource = new RawBundleSource({\n resources: RawBundleSource.builtResources([\n ['en-US', dialtoneNamespace, enUS],\n ['zh-CN', dialtoneNamespace, zhCN],\n ['nl-NL', dialtoneNamespace, nlNL],\n ['fr-FR', dialtoneNamespace, frFR],\n ['de-DE', dialtoneNamespace, deDE],\n ['it-IT', dialtoneNamespace, itIT],\n ['ja-JP', dialtoneNamespace, jaJP],\n ['ko-KR', dialtoneNamespace, koKR],\n ['pt-BR', dialtoneNamespace, ptBR],\n ['ru-RU', dialtoneNamespace, ruRU],\n ['es-LA', dialtoneNamespace, esLA],\n ['sv-SE', dialtoneNamespace, svSE],\n ]),\n });\n\n const localeOptions = {\n bundleSource,\n allowedLocales: Object.values(allowedLocales),\n fallbackLocale,\n preferredLocale: this._locale,\n namespaces: [dialtoneNamespace],\n };\n let localeManager;\n try {\n localeManager = new LocaleManager(localeOptions);\n } catch (error) {\n if (error.name !== 'SecurityError') throw error;\n localeManager = new LocaleManager({ ...localeOptions, storageWrapper: new MemoryStorageWrapper() });\n }\n\n DialtoneLocalization.instance = this;\n /** @private */\n this.i18n = localeManager.useI18N(dialtoneNamespace);\n\n if (typeof window !== 'undefined') {\n /**\n * @description\n * When the browser storage changes, update the current locale\n * @param event\n */\n window.addEventListener('storage', (event) => {\n if (event.key === localeManagerStorageKey) {\n this.currentLocale = event.newValue;\n }\n });\n }\n\n return this;\n }\n\n /**\n * Gets the preferred locale from user's locale stored in localStorage or the browser language\n * @returns { string }\n */\n static getPreferredLocale () {\n /**\n * Early return if we're not in the browser or if localStorage is not available\n */\n if (typeof window === 'undefined') {\n return fallbackLocale;\n }\n\n let storedLanguage;\n try {\n const storage = window.localStorage;\n if (!storage) return fallbackLocale;\n storedLanguage = storage.getItem(localeManagerStorageKey);\n } catch {\n return fallbackLocale;\n }\n\n // Only trust the stored locale if it's one Dialtone actually ships a bundle for.\n // Callers (e.g. UC/UV) may allow locales Dialtone doesn't support, which would\n // otherwise crash the LocaleManager during render.\n const localStorageLanguage = Object.values(allowedLocales).includes(storedLanguage)\n ? storedLanguage\n : null;\n\n // Get the first two letters of the navigator language and check if it's in the allowed locales\n const navigatorLanguage = Object.values(allowedLocales)\n .find(locale => locale.startsWith(navigator.language.slice(0, 2)));\n\n return localStorageLanguage || navigatorLanguage || fallbackLocale;\n }\n\n static getAllowedLocales () {\n return allowedLocales;\n }\n\n /**\n * Passthrough function to the i18n $t function including the dialtone namespace\n * Returns a translated string based on a key and optional variables.\n * It’s used for simple text translations.\n * https://github.com/dialpad/goblin-client-tools/tree/main/packages/i18n#t\n */\n $t (...args) {\n return this.i18n.$t(...args);\n }\n\n /**\n * Passthrough function to the i18n $ta function including the dialtone namespace\n * Returns an object containing translated attributes to pass directly as props to components, it can contain\n * aria-label, title, etc, rather than just a plain text. It’s useful for handling element attributes in the UI.\n * https://github.com/dialpad/goblin-client-tools/tree/main/packages/i18n#ta\n */\n $ta (...args) {\n return this.i18n.$ta(...args);\n }\n\n get currentLocale () {\n return this._locale;\n }\n\n set currentLocale (newLocale) {\n if (newLocale === this._locale) return;\n if (!Object.values(allowedLocales).includes(newLocale)) {\n throw new Error(`Locale ${newLocale} is not allowed, please use one of the following: ${Object.values(allowedLocales).join(', ')}`);\n }\n\n this._locale = newLocale;\n this.i18n.setI18N({ preferredLocale: newLocale }, dialtoneNamespace);\n }\n}\n"],"mappings":"qbAeA,IAAM,EAAoB,WACpB,EAAiB,CACrB,QAAS,QACT,QAAS,QACT,MAAO,QACP,OAAQ,QACR,OAAQ,QACR,QAAS,QACT,SAAU,QACV,OAAQ,QACR,WAAY,QACZ,QAAS,QACT,QAAS,QACT,QAAS,QACV,CACK,EAAiB,QAIjB,EAA0B,cAOnB,EAAb,MAAa,CAAqB,CAIhC,YAAa,EAAS,KAAM,CAC1B,GAAI,OAAO,EAAqB,UAAa,SAC3C,OAAO,EAAqB,SAG9B,KAAK,QAAU,GAAU,EAAqB,oBAAoB,CAmBlE,IAAM,EAAgB,CACpB,aAlBmB,IAAIA,EAAAA,gBAAgB,CACvC,UAAWA,EAAAA,gBAAgB,eAAe,CACxC,CAAC,QAAS,EAAmBC,EAAAA,QAAK,CAClC,CAAC,QAAS,EAAmBC,EAAAA,QAAK,CAClC,CAAC,QAAS,EAAmBC,EAAAA,QAAK,CAClC,CAAC,QAAS,EAAmBC,EAAAA,QAAK,CAClC,CAAC,QAAS,EAAmBC,EAAAA,QAAK,CAClC,CAAC,QAAS,EAAmBC,EAAAA,QAAK,CAClC,CAAC,QAAS,EAAmBC,EAAAA,QAAK,CAClC,CAAC,QAAS,EAAmBC,EAAAA,QAAK,CAClC,CAAC,QAAS,EAAmBC,EAAAA,QAAK,CAClC,CAAC,QAAS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CAAC,OAAO,OAAO,EAAe,CAAC,SAAS,EAAU,CACpD,MAAU,MAAM,UAAU,EAAU,oDAAoD,OAAO,OAAO,EAAe,CAAC,KAAK,KAAK,GAAG,CAGrI,KAAK,QAAU,EACf,KAAK,KAAK,QAAQ,CAAE,gBAAiB,EAAW,CAAE,EAAkB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export class DialtoneLocalization {
|
|
2
|
+
static getPreferredLocale(): string;
|
|
3
|
+
static getAllowedLocales(): {
|
|
4
|
+
ENGLISH: string;
|
|
5
|
+
CHINESE: string;
|
|
6
|
+
DUTCH: string;
|
|
7
|
+
FRENCH: string;
|
|
8
|
+
GERMAN: string;
|
|
9
|
+
ITALIAN: string;
|
|
10
|
+
JAPANESE: string;
|
|
11
|
+
KOREAN: string;
|
|
12
|
+
PORTUGUESE: string;
|
|
13
|
+
RUSSIAN: string;
|
|
14
|
+
SPANISH: string;
|
|
15
|
+
SWEDISH: string;
|
|
16
|
+
};
|
|
17
|
+
constructor(locale?: string | null);
|
|
18
|
+
_locale: string | undefined;
|
|
19
|
+
private i18n;
|
|
20
|
+
set currentLocale(newLocale: string | undefined);
|
|
21
|
+
get currentLocale(): string | undefined;
|
|
22
|
+
$t(...args: any[]): string;
|
|
23
|
+
$ta(...args: any[]): Record<string, string>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../localization/index.js"],"names":[],"mappings":"AAyCA;IAmEE,6BAFc,MAAM,CA+BnB;IAED;;;;;;;;;;;;;MAEC;IAhGD,qBAFW,MAAM,GAAG,IAAI,EA2DvB;IApDC,4BAAkE;IAoClE,aAAoD;IAiFtD,iDAQC;IAZD,wCAEC;IAhBD,2BAEC;IAQD,4CAEC;CAeF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["enUS","zhCN","nlNL","frFR","deDE","itIT","jaJP","koKR","ptBR","ruRU","esLA","svSE"],"sources":["../../localization/index.js"],"sourcesContent":["import { LocaleManager, RawBundleSource, MemoryStorageWrapper } from '@dialpad/i18n';\n\nimport enUS from './en-US.ftl?raw';\nimport zhCN from './zh-CN.ftl?raw';\nimport nlNL from './nl-NL.ftl?raw';\nimport frFR from './fr-FR.ftl?raw';\nimport deDE from './de-DE.ftl?raw';\nimport itIT from './it-IT.ftl?raw';\nimport jaJP from './ja-JP.ftl?raw';\nimport koKR from './ko-KR.ftl?raw';\nimport ptBR from './pt-BR.ftl?raw';\nimport ruRU from './ru-RU.ftl?raw';\nimport esLA from './es-LA.ftl?raw';\nimport svSE from './sv-SE.ftl?raw';\n\nconst dialtoneNamespace = 'dialtone';\nconst allowedLocales = {\n ENGLISH: 'en-US',\n CHINESE: 'zh-CN',\n DUTCH: 'nl-NL',\n FRENCH: 'fr-FR',\n GERMAN: 'de-DE',\n ITALIAN: 'it-IT',\n JAPANESE: 'ja-JP',\n KOREAN: 'ko-KR',\n PORTUGUESE: 'pt-BR',\n RUSSIAN: 'ru-RU',\n SPANISH: 'es-LA',\n SWEDISH: 'sv-SE',\n};\nconst fallbackLocale = 'en-US';\n/**\n * Default key name used by the LocaleManager to store the user's preferred locale in localStorage\n */\nconst localeManagerStorageKey = 'user-locale';\n\n/**\n * Dialtone localization class, follows the singleton pattern to make sure only one instance of the class is created.\n * Initializes the localeManager and looks for changes on the browser storage to update the current locale.\n * https://github.com/dialpad/goblin-client-tools/tree/main/packages/i18n#i18n-vue-3-compatible\n */\nexport class DialtoneLocalization {\n /**\n * @
|
|
1
|
+
{"version":3,"file":"index.js","names":["enUS","zhCN","nlNL","frFR","deDE","itIT","jaJP","koKR","ptBR","ruRU","esLA","svSE"],"sources":["../../localization/index.js"],"sourcesContent":["import { LocaleManager, RawBundleSource, MemoryStorageWrapper } from '@dialpad/i18n';\n\nimport enUS from './en-US.ftl?raw';\nimport zhCN from './zh-CN.ftl?raw';\nimport nlNL from './nl-NL.ftl?raw';\nimport frFR from './fr-FR.ftl?raw';\nimport deDE from './de-DE.ftl?raw';\nimport itIT from './it-IT.ftl?raw';\nimport jaJP from './ja-JP.ftl?raw';\nimport koKR from './ko-KR.ftl?raw';\nimport ptBR from './pt-BR.ftl?raw';\nimport ruRU from './ru-RU.ftl?raw';\nimport esLA from './es-LA.ftl?raw';\nimport svSE from './sv-SE.ftl?raw';\n\nconst dialtoneNamespace = 'dialtone';\nconst allowedLocales = {\n ENGLISH: 'en-US',\n CHINESE: 'zh-CN',\n DUTCH: 'nl-NL',\n FRENCH: 'fr-FR',\n GERMAN: 'de-DE',\n ITALIAN: 'it-IT',\n JAPANESE: 'ja-JP',\n KOREAN: 'ko-KR',\n PORTUGUESE: 'pt-BR',\n RUSSIAN: 'ru-RU',\n SPANISH: 'es-LA',\n SWEDISH: 'sv-SE',\n};\nconst fallbackLocale = 'en-US';\n/**\n * Default key name used by the LocaleManager to store the user's preferred locale in localStorage\n */\nconst localeManagerStorageKey = 'user-locale';\n\n/**\n * Dialtone localization class, follows the singleton pattern to make sure only one instance of the class is created.\n * Initializes the localeManager and looks for changes on the browser storage to update the current locale.\n * https://github.com/dialpad/goblin-client-tools/tree/main/packages/i18n#i18n-vue-3-compatible\n */\nexport class DialtoneLocalization {\n /**\n * @param {string | null} [locale] The preferred locale, or the browser preference when omitted.\n */\n constructor (locale = null) {\n if (typeof DialtoneLocalization.instance === 'object') {\n return DialtoneLocalization.instance;\n }\n\n this._locale = locale || DialtoneLocalization.getPreferredLocale();\n\n const bundleSource = new RawBundleSource({\n resources: RawBundleSource.builtResources([\n ['en-US', dialtoneNamespace, enUS],\n ['zh-CN', dialtoneNamespace, zhCN],\n ['nl-NL', dialtoneNamespace, nlNL],\n ['fr-FR', dialtoneNamespace, frFR],\n ['de-DE', dialtoneNamespace, deDE],\n ['it-IT', dialtoneNamespace, itIT],\n ['ja-JP', dialtoneNamespace, jaJP],\n ['ko-KR', dialtoneNamespace, koKR],\n ['pt-BR', dialtoneNamespace, ptBR],\n ['ru-RU', dialtoneNamespace, ruRU],\n ['es-LA', dialtoneNamespace, esLA],\n ['sv-SE', dialtoneNamespace, svSE],\n ]),\n });\n\n const localeOptions = {\n bundleSource,\n allowedLocales: Object.values(allowedLocales),\n fallbackLocale,\n preferredLocale: this._locale,\n namespaces: [dialtoneNamespace],\n };\n let localeManager;\n try {\n localeManager = new LocaleManager(localeOptions);\n } catch (error) {\n if (error.name !== 'SecurityError') throw error;\n localeManager = new LocaleManager({ ...localeOptions, storageWrapper: new MemoryStorageWrapper() });\n }\n\n DialtoneLocalization.instance = this;\n /** @private */\n this.i18n = localeManager.useI18N(dialtoneNamespace);\n\n if (typeof window !== 'undefined') {\n /**\n * @description\n * When the browser storage changes, update the current locale\n * @param event\n */\n window.addEventListener('storage', (event) => {\n if (event.key === localeManagerStorageKey) {\n this.currentLocale = event.newValue;\n }\n });\n }\n\n return this;\n }\n\n /**\n * Gets the preferred locale from user's locale stored in localStorage or the browser language\n * @returns { string }\n */\n static getPreferredLocale () {\n /**\n * Early return if we're not in the browser or if localStorage is not available\n */\n if (typeof window === 'undefined') {\n return fallbackLocale;\n }\n\n let storedLanguage;\n try {\n const storage = window.localStorage;\n if (!storage) return fallbackLocale;\n storedLanguage = storage.getItem(localeManagerStorageKey);\n } catch {\n return fallbackLocale;\n }\n\n // Only trust the stored locale if it's one Dialtone actually ships a bundle for.\n // Callers (e.g. UC/UV) may allow locales Dialtone doesn't support, which would\n // otherwise crash the LocaleManager during render.\n const localStorageLanguage = Object.values(allowedLocales).includes(storedLanguage)\n ? storedLanguage\n : null;\n\n // Get the first two letters of the navigator language and check if it's in the allowed locales\n const navigatorLanguage = Object.values(allowedLocales)\n .find(locale => locale.startsWith(navigator.language.slice(0, 2)));\n\n return localStorageLanguage || navigatorLanguage || fallbackLocale;\n }\n\n static getAllowedLocales () {\n return allowedLocales;\n }\n\n /**\n * Passthrough function to the i18n $t function including the dialtone namespace\n * Returns a translated string based on a key and optional variables.\n * It’s used for simple text translations.\n * https://github.com/dialpad/goblin-client-tools/tree/main/packages/i18n#t\n */\n $t (...args) {\n return this.i18n.$t(...args);\n }\n\n /**\n * Passthrough function to the i18n $ta function including the dialtone namespace\n * Returns an object containing translated attributes to pass directly as props to components, it can contain\n * aria-label, title, etc, rather than just a plain text. It’s useful for handling element attributes in the UI.\n * https://github.com/dialpad/goblin-client-tools/tree/main/packages/i18n#ta\n */\n $ta (...args) {\n return this.i18n.$ta(...args);\n }\n\n get currentLocale () {\n return this._locale;\n }\n\n set currentLocale (newLocale) {\n if (newLocale === this._locale) return;\n if (!Object.values(allowedLocales).includes(newLocale)) {\n throw new Error(`Locale ${newLocale} is not allowed, please use one of the following: ${Object.values(allowedLocales).join(', ')}`);\n }\n\n this._locale = newLocale;\n this.i18n.setI18N({ preferredLocale: newLocale }, dialtoneNamespace);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAeA,IAAM,IAAoB,YACpB,IAAiB;CACrB,SAAS;CACT,SAAS;CACT,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,UAAU;CACV,QAAQ;CACR,YAAY;CACZ,SAAS;CACT,SAAS;CACT,SAAS;CACV,EACK,IAAiB,SAIjB,IAA0B,eAOnB,IAAb,MAAa,EAAqB;CAIhC,YAAa,IAAS,MAAM;AAC1B,MAAI,OAAO,EAAqB,YAAa,SAC3C,QAAO,EAAqB;AAG9B,OAAK,UAAU,KAAU,EAAqB,oBAAoB;EAmBlE,IAAM,IAAgB;GACpB,cAlBmB,IAAI,EAAgB,EACvC,WAAW,EAAgB,eAAe;IACxC;KAAC;KAAS;KAAmBA;KAAK;IAClC;KAAC;KAAS;KAAmBC;KAAK;IAClC;KAAC;KAAS;KAAmBC;KAAK;IAClC;KAAC;KAAS;KAAmBC;KAAK;IAClC;KAAC;KAAS;KAAmBC;KAAK;IAClC;KAAC;KAAS;KAAmBC;KAAK;IAClC;KAAC;KAAS;KAAmBC;KAAK;IAClC;KAAC;KAAS;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cAAe,GAAW;AACxB,YAAc,KAAK,SACvB;OAAI,CAAC,OAAO,OAAO,EAAe,CAAC,SAAS,EAAU,CACpD,OAAU,MAAM,UAAU,EAAU,oDAAoD,OAAO,OAAO,EAAe,CAAC,KAAK,KAAK,GAAG;AAIrI,GADA,KAAK,UAAU,GACf,KAAK,KAAK,QAAQ,EAAE,iBAAiB,GAAW,EAAE,EAAkB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-icons.d.ts","sourceRoot":"","sources":["../../localization/sync-icons.js"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mode_constants-
|
|
1
|
+
{"version":3,"file":"mode_constants-CC73P7d-.js","names":[],"sources":["../common/mode_constants.js"],"sourcesContent":["export const CONTENT_MODE_TYPES = {\n LIGHT: 'light',\n DARK: 'dark',\n INVERT: 'invert',\n};\n\nexport const CONTENT_MODE_VALUES = Object.values(CONTENT_MODE_TYPES);\n\n/**\n * Shared prop definition for the contentMode prop.\n * Use in pass-through components that forward to an inner component with the ModeMixin.\n */\nexport const CONTENT_MODE_PROP = {\n type: String,\n default: null,\n validator: (v) => v === null || CONTENT_MODE_VALUES.includes(v),\n};\n\n/**\n * Shared Storybook argType for the contentMode prop.\n */\nexport const CONTENT_MODE_ARG_TYPE = {\n options: [null, ...CONTENT_MODE_VALUES],\n control: {\n type: 'select',\n labels: { null: '(none)' },\n },\n table: {\n category: 'props',\n defaultValue: { summary: 'null' },\n },\n};\n\nexport default {\n CONTENT_MODE_TYPES,\n CONTENT_MODE_VALUES,\n CONTENT_MODE_PROP,\n CONTENT_MODE_ARG_TYPE,\n};\n"],"mappings":"AAMA,IAAa,IAAsB,OAAO,OANR;CAChC,OAAO;CACP,MAAM;CACN,QAAQ;CACT,CAEmE,EAMvD,IAAoB;CAC/B,MAAM;CACN,SAAS;CACT,YAAY,MAAM,MAAM,QAAQ,EAAoB,SAAS,EAAE;CAChE;AAMU,CAAO,GAAG,EAAoB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var e=Object.values({LIGHT:`light`,DARK:`dark`,INVERT:`invert`}),t={type:String,default:null,validator:t=>t===null||e.includes(t)};[...e],Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
|
|
2
|
-
//# sourceMappingURL=mode_constants-
|
|
2
|
+
//# sourceMappingURL=mode_constants-DM0SVbFM.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mode_constants-
|
|
1
|
+
{"version":3,"file":"mode_constants-DM0SVbFM.cjs","names":[],"sources":["../common/mode_constants.js"],"sourcesContent":["export const CONTENT_MODE_TYPES = {\n LIGHT: 'light',\n DARK: 'dark',\n INVERT: 'invert',\n};\n\nexport const CONTENT_MODE_VALUES = Object.values(CONTENT_MODE_TYPES);\n\n/**\n * Shared prop definition for the contentMode prop.\n * Use in pass-through components that forward to an inner component with the ModeMixin.\n */\nexport const CONTENT_MODE_PROP = {\n type: String,\n default: null,\n validator: (v) => v === null || CONTENT_MODE_VALUES.includes(v),\n};\n\n/**\n * Shared Storybook argType for the contentMode prop.\n */\nexport const CONTENT_MODE_ARG_TYPE = {\n options: [null, ...CONTENT_MODE_VALUES],\n control: {\n type: 'select',\n labels: { null: '(none)' },\n },\n table: {\n category: 'props',\n defaultValue: { summary: 'null' },\n },\n};\n\nexport default {\n CONTENT_MODE_TYPES,\n CONTENT_MODE_VALUES,\n CONTENT_MODE_PROP,\n CONTENT_MODE_ARG_TYPE,\n};\n"],"mappings":"AAMA,IAAa,EAAsB,OAAO,OANR,CAChC,MAAO,QACP,KAAM,OACN,OAAQ,SACT,CAEmE,CAMvD,EAAoB,CAC/B,KAAM,OACN,QAAS,KACT,UAAY,GAAM,IAAM,MAAQ,EAAoB,SAAS,EAAE,CAChE,CAMU,CAAO,GAAG,EAAoB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require(`../../chunk-BK-Lzi7j.cjs`);const e=require(`../../dist-DzjXnVZt.cjs`);exports.Editor=e.t,exports.EditorContent=e.n,exports.MarkViewContent=e.r,exports.NodeViewContent=e.i,exports.NodeViewWrapper=e.a,exports.VueMarkView=e.o,exports.VueMarkViewRenderer=e.s,exports.VueNodeViewRenderer=e.c,exports.VueRenderer=e.l,exports.markViewProps=e.u,exports.nodeViewProps=e.d,exports.useEditor=e.f;var t=require(`@tiptap/core`);Object.keys(t).forEach(function(e){e!==`default`&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:function(){return t[e]}})});
|
|
2
2
|
//# sourceMappingURL=vue-3.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vue-3.cjs","names":["CoreEditor","MarkView","NodeView"],"sources":["../../../../../node_modules/.pnpm/@tiptap+vue-3@3.19.0_patch_hash=65d98f737afae097542c692b176a81069e1b7b8d577d1d7e222a944_23bfa7b5fde667bfc96216774c3ce084/node_modules/@tiptap/vue-3/dist/index.js"],"sourcesContent":["// src/Editor.ts\nimport { Editor as CoreEditor } from \"@tiptap/core\";\nimport { customRef, markRaw } from \"vue\";\nfunction useDebouncedRef(value) {\n return customRef((track, trigger) => {\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n trigger();\n });\n });\n }\n };\n });\n}\nvar Editor = class extends CoreEditor {\n constructor(options = {}) {\n super(options);\n this.contentComponent = null;\n this.appContext = null;\n this.reactiveState = useDebouncedRef(this.view.state);\n this.reactiveExtensionStorage = useDebouncedRef(this.extensionStorage);\n this.on(\"beforeTransaction\", ({ nextState }) => {\n this.reactiveState.value = nextState;\n this.reactiveExtensionStorage.value = this.extensionStorage;\n });\n return markRaw(this);\n }\n get state() {\n return this.reactiveState ? this.reactiveState.value : this.view.state;\n }\n get storage() {\n return this.reactiveExtensionStorage ? this.reactiveExtensionStorage.value : super.storage;\n }\n /**\n * Register a ProseMirror plugin.\n */\n registerPlugin(plugin, handlePlugins) {\n const nextState = super.registerPlugin(plugin, handlePlugins);\n if (this.reactiveState) {\n this.reactiveState.value = nextState;\n }\n return nextState;\n }\n /**\n * Unregister a ProseMirror plugin.\n */\n unregisterPlugin(nameOrPluginKey) {\n const nextState = super.unregisterPlugin(nameOrPluginKey);\n if (this.reactiveState && nextState) {\n this.reactiveState.value = nextState;\n }\n return nextState;\n }\n};\n\n// src/EditorContent.ts\nimport { defineComponent, getCurrentInstance, h, nextTick, onBeforeUnmount, ref, unref, watchEffect } from \"vue\";\nvar EditorContent = defineComponent({\n name: \"EditorContent\",\n props: {\n editor: {\n default: null,\n type: Object\n }\n },\n setup(props) {\n const rootEl = ref();\n const instance = getCurrentInstance();\n watchEffect(() => {\n const editor = props.editor;\n if (editor && editor.options.element && rootEl.value) {\n nextTick(() => {\n var _a;\n if (!rootEl.value || !((_a = editor.view.dom) == null ? void 0 : _a.parentNode)) {\n return;\n }\n const element = unref(rootEl.value);\n rootEl.value.append(...editor.view.dom.parentNode.childNodes);\n editor.contentComponent = instance.ctx._;\n if (instance) {\n editor.appContext = {\n ...instance.appContext,\n // Vue internally uses prototype chain to forward/shadow injects across the entire component chain\n // so don't use object spread operator or 'Object.assign' and just set `provides` as is on editor's appContext\n // @ts-expect-error forward instance's 'provides' into appContext\n provides: instance.provides\n };\n }\n editor.setOptions({\n element\n });\n editor.createNodeViews();\n });\n }\n });\n onBeforeUnmount(() => {\n const editor = props.editor;\n if (!editor) {\n return;\n }\n editor.contentComponent = null;\n editor.appContext = null;\n });\n return { rootEl };\n },\n render() {\n return h(\"div\", {\n ref: (el) => {\n this.rootEl = el;\n }\n });\n }\n});\n\n// src/NodeViewContent.ts\nimport { defineComponent as defineComponent2, h as h2 } from \"vue\";\nvar NodeViewContent = defineComponent2({\n name: \"NodeViewContent\",\n props: {\n as: {\n type: String,\n default: \"div\"\n }\n },\n render() {\n return h2(this.as, {\n style: {\n whiteSpace: \"pre-wrap\"\n },\n \"data-node-view-content\": \"\"\n });\n }\n});\n\n// src/NodeViewWrapper.ts\nimport { defineComponent as defineComponent3, h as h3 } from \"vue\";\nvar NodeViewWrapper = defineComponent3({\n name: \"NodeViewWrapper\",\n props: {\n as: {\n type: String,\n default: \"div\"\n }\n },\n inject: [\"onDragStart\", \"decorationClasses\"],\n render() {\n var _a, _b;\n return h3(\n this.as,\n {\n // @ts-ignore\n class: this.decorationClasses,\n style: {\n whiteSpace: \"normal\"\n },\n \"data-node-view-wrapper\": \"\",\n // @ts-ignore (https://github.com/vuejs/vue-next/issues/3031)\n onDragstart: this.onDragStart\n },\n (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)\n );\n }\n});\n\n// src/useEditor.ts\nimport { onBeforeUnmount as onBeforeUnmount2, onMounted, shallowRef } from \"vue\";\nvar useEditor = (options = {}) => {\n const editor = shallowRef();\n onMounted(() => {\n editor.value = new Editor(options);\n });\n onBeforeUnmount2(() => {\n var _a, _b, _c, _d;\n const nodes = (_b = (_a = editor.value) == null ? void 0 : _a.view.dom) == null ? void 0 : _b.parentNode;\n const newEl = nodes == null ? void 0 : nodes.cloneNode(true);\n (_c = nodes == null ? void 0 : nodes.parentNode) == null ? void 0 : _c.replaceChild(newEl, nodes);\n (_d = editor.value) == null ? void 0 : _d.destroy();\n });\n return editor;\n};\n\n// src/VueMarkViewRenderer.ts\nimport { MarkView } from \"@tiptap/core\";\nimport { defineComponent as defineComponent4, h as h5, toRaw } from \"vue\";\n\n// src/VueRenderer.ts\nimport { h as h4, markRaw as markRaw2, reactive, render } from \"vue\";\nvar VueRenderer = class {\n constructor(component, { props = {}, editor }) {\n /**\n * Flag to track if the renderer has been destroyed, preventing queued or asynchronous renders from executing after teardown.\n */\n this.destroyed = false;\n this.editor = editor;\n this.component = markRaw2(component);\n this.el = document.createElement(\"div\");\n this.props = reactive(props);\n this.renderedComponent = this.renderComponent();\n }\n get element() {\n return this.renderedComponent.el;\n }\n get ref() {\n var _a, _b, _c, _d;\n if ((_b = (_a = this.renderedComponent.vNode) == null ? void 0 : _a.component) == null ? void 0 : _b.exposed) {\n return this.renderedComponent.vNode.component.exposed;\n }\n return (_d = (_c = this.renderedComponent.vNode) == null ? void 0 : _c.component) == null ? void 0 : _d.proxy;\n }\n renderComponent() {\n if (this.destroyed) {\n return this.renderedComponent;\n }\n let vNode = h4(this.component, this.props);\n if (this.editor.appContext) {\n vNode.appContext = this.editor.appContext;\n }\n if (typeof document !== \"undefined\" && this.el) {\n render(vNode, this.el);\n }\n const destroy = () => {\n if (this.el) {\n render(null, this.el);\n }\n this.el = null;\n vNode = null;\n };\n return { vNode, destroy, el: this.el ? this.el.firstElementChild : null };\n }\n updateProps(props = {}) {\n if (this.destroyed) {\n return;\n }\n Object.entries(props).forEach(([key, value]) => {\n this.props[key] = value;\n });\n this.renderComponent();\n }\n destroy() {\n if (this.destroyed) {\n return;\n }\n this.destroyed = true;\n this.renderedComponent.destroy();\n }\n};\n\n// src/VueMarkViewRenderer.ts\nvar markViewProps = {\n editor: {\n type: Object,\n required: true\n },\n mark: {\n type: Object,\n required: true\n },\n extension: {\n type: Object,\n required: true\n },\n inline: {\n type: Boolean,\n required: true\n },\n view: {\n type: Object,\n required: true\n },\n updateAttributes: {\n type: Function,\n required: true\n },\n HTMLAttributes: {\n type: Object,\n required: true\n }\n};\nvar MarkViewContent = defineComponent4({\n name: \"MarkViewContent\",\n props: {\n as: {\n type: String,\n default: \"span\"\n }\n },\n render() {\n return h5(this.as, {\n style: {\n whiteSpace: \"inherit\"\n },\n \"data-mark-view-content\": \"\"\n });\n }\n});\nvar VueMarkView = class extends MarkView {\n constructor(component, props, options) {\n super(component, props, options);\n const componentProps = { ...props, updateAttributes: this.updateAttributes.bind(this) };\n const extendedComponent = defineComponent4({\n extends: { ...component },\n props: Object.keys(componentProps),\n template: this.component.template,\n setup: (reactiveProps) => {\n var _a;\n return (_a = component.setup) == null ? void 0 : _a.call(component, reactiveProps, {\n expose: () => void 0\n });\n },\n // Add support for scoped styles\n __scopeId: component.__scopeId,\n __cssModules: component.__cssModules,\n __name: component.__name,\n __file: component.__file\n });\n this.renderer = new VueRenderer(extendedComponent, {\n editor: this.editor,\n props: componentProps\n });\n }\n get dom() {\n return this.renderer.element;\n }\n get contentDOM() {\n return this.dom.querySelector(\"[data-mark-view-content]\");\n }\n updateAttributes(attrs) {\n const unproxiedMark = toRaw(this.mark);\n super.updateAttributes(attrs, unproxiedMark);\n }\n destroy() {\n this.renderer.destroy();\n }\n};\nfunction VueMarkViewRenderer(component, options = {}) {\n return (props) => {\n if (!props.editor.contentComponent) {\n return {};\n }\n return new VueMarkView(component, props, options);\n };\n}\n\n// src/VueNodeViewRenderer.ts\nimport { NodeView } from \"@tiptap/core\";\nimport { defineComponent as defineComponent5, provide, ref as ref2 } from \"vue\";\nvar nodeViewProps = {\n editor: {\n type: Object,\n required: true\n },\n node: {\n type: Object,\n required: true\n },\n decorations: {\n type: Object,\n required: true\n },\n selected: {\n type: Boolean,\n required: true\n },\n extension: {\n type: Object,\n required: true\n },\n getPos: {\n type: Function,\n required: true\n },\n updateAttributes: {\n type: Function,\n required: true\n },\n deleteNode: {\n type: Function,\n required: true\n },\n view: {\n type: Object,\n required: true\n },\n innerDecorations: {\n type: Object,\n required: true\n },\n HTMLAttributes: {\n type: Object,\n required: true\n }\n};\nvar VueNodeView = class extends NodeView {\n constructor() {\n super(...arguments);\n this.cachedExtensionWithSyncedStorage = null;\n }\n /**\n * Returns a proxy of the extension that redirects storage access to the editor's mutable storage.\n * This preserves the original prototype chain (instanceof checks, methods like configure/extend work).\n * Cached to avoid proxy creation on every update.\n */\n get extensionWithSyncedStorage() {\n if (!this.cachedExtensionWithSyncedStorage) {\n const editor = this.editor;\n const extension = this.extension;\n this.cachedExtensionWithSyncedStorage = new Proxy(extension, {\n get(target, prop, receiver) {\n var _a;\n if (prop === \"storage\") {\n return (_a = editor.storage[extension.name]) != null ? _a : {};\n }\n return Reflect.get(target, prop, receiver);\n }\n });\n }\n return this.cachedExtensionWithSyncedStorage;\n }\n mount() {\n const props = {\n editor: this.editor,\n node: this.node,\n decorations: this.decorations,\n innerDecorations: this.innerDecorations,\n view: this.view,\n selected: false,\n extension: this.extensionWithSyncedStorage,\n HTMLAttributes: this.HTMLAttributes,\n getPos: () => this.getPos(),\n updateAttributes: (attributes = {}) => this.updateAttributes(attributes),\n deleteNode: () => this.deleteNode()\n };\n const onDragStart = this.onDragStart.bind(this);\n this.decorationClasses = ref2(this.getDecorationClasses());\n const extendedComponent = defineComponent5({\n extends: { ...this.component },\n props: Object.keys(props),\n template: this.component.template,\n setup: (reactiveProps) => {\n var _a, _b;\n provide(\"onDragStart\", onDragStart);\n provide(\"decorationClasses\", this.decorationClasses);\n return (_b = (_a = this.component).setup) == null ? void 0 : _b.call(_a, reactiveProps, {\n expose: () => void 0\n });\n },\n // add support for scoped styles\n // @ts-ignore\n // eslint-disable-next-line\n __scopeId: this.component.__scopeId,\n // add support for CSS Modules\n // @ts-ignore\n // eslint-disable-next-line\n __cssModules: this.component.__cssModules,\n // add support for vue devtools\n // @ts-ignore\n // eslint-disable-next-line\n __name: this.component.__name,\n // @ts-ignore\n // eslint-disable-next-line\n __file: this.component.__file\n });\n this.handleSelectionUpdate = this.handleSelectionUpdate.bind(this);\n this.editor.on(\"selectionUpdate\", this.handleSelectionUpdate);\n this.renderer = new VueRenderer(extendedComponent, {\n editor: this.editor,\n props\n });\n }\n /**\n * Return the DOM element.\n * This is the element that will be used to display the node view.\n */\n get dom() {\n if (!this.renderer.element || !this.renderer.element.hasAttribute(\"data-node-view-wrapper\")) {\n throw Error(\"Please use the NodeViewWrapper component for your node view.\");\n }\n return this.renderer.element;\n }\n /**\n * Return the content DOM element.\n * This is the element that will be used to display the rich-text content of the node.\n */\n get contentDOM() {\n if (this.node.isLeaf) {\n return null;\n }\n return this.dom.querySelector(\"[data-node-view-content]\");\n }\n /**\n * On editor selection update, check if the node is selected.\n * If it is, call `selectNode`, otherwise call `deselectNode`.\n */\n handleSelectionUpdate() {\n const { from, to } = this.editor.state.selection;\n const pos = this.getPos();\n if (typeof pos !== \"number\") {\n return;\n }\n if (from <= pos && to >= pos + this.node.nodeSize) {\n if (this.renderer.props.selected) {\n return;\n }\n this.selectNode();\n } else {\n if (!this.renderer.props.selected) {\n return;\n }\n this.deselectNode();\n }\n }\n /**\n * On update, update the React component.\n * To prevent unnecessary updates, the `update` option can be used.\n */\n update(node, decorations, innerDecorations) {\n const rerenderComponent = (props) => {\n this.decorationClasses.value = this.getDecorationClasses();\n this.renderer.updateProps(props);\n };\n if (typeof this.options.update === \"function\") {\n const oldNode = this.node;\n const oldDecorations = this.decorations;\n const oldInnerDecorations = this.innerDecorations;\n this.node = node;\n this.decorations = decorations;\n this.innerDecorations = innerDecorations;\n return this.options.update({\n oldNode,\n oldDecorations,\n newNode: node,\n newDecorations: decorations,\n oldInnerDecorations,\n innerDecorations,\n updateProps: () => rerenderComponent({ node, decorations, innerDecorations, extension: this.extensionWithSyncedStorage })\n });\n }\n if (node.type !== this.node.type) {\n return false;\n }\n if (node === this.node && this.decorations === decorations && this.innerDecorations === innerDecorations) {\n return true;\n }\n this.node = node;\n this.decorations = decorations;\n this.innerDecorations = innerDecorations;\n rerenderComponent({ node, decorations, innerDecorations, extension: this.extensionWithSyncedStorage });\n return true;\n }\n /**\n * Select the node.\n * Add the `selected` prop and the `ProseMirror-selectednode` class.\n */\n selectNode() {\n this.renderer.updateProps({\n selected: true\n });\n if (this.renderer.element) {\n this.renderer.element.classList.add(\"ProseMirror-selectednode\");\n }\n }\n /**\n * Deselect the node.\n * Remove the `selected` prop and the `ProseMirror-selectednode` class.\n */\n deselectNode() {\n this.renderer.updateProps({\n selected: false\n });\n if (this.renderer.element) {\n this.renderer.element.classList.remove(\"ProseMirror-selectednode\");\n }\n }\n getDecorationClasses() {\n return this.decorations.flatMap((item) => item.type.attrs.class).join(\" \");\n }\n destroy() {\n this.renderer.destroy();\n this.editor.off(\"selectionUpdate\", this.handleSelectionUpdate);\n }\n};\nfunction VueNodeViewRenderer(component, options) {\n return (props) => {\n if (!props.editor.contentComponent) {\n return {};\n }\n const normalizedComponent = typeof component === \"function\" && \"__vccOpts\" in component ? component.__vccOpts : component;\n return new VueNodeView(normalizedComponent, props, options);\n };\n}\n\n// src/index.ts\nexport * from \"@tiptap/core\";\nexport {\n Editor,\n EditorContent,\n MarkViewContent,\n NodeViewContent,\n NodeViewWrapper,\n VueMarkView,\n VueMarkViewRenderer,\n VueNodeViewRenderer,\n VueRenderer,\n markViewProps,\n nodeViewProps,\n useEditor\n};\n//# sourceMappingURL=index.js.map"],"x_google_ignoreList":[0],"mappings":"sJAGA,SAAS,EAAgB,EAAO,CAC9B,OAAA,EAAA,EAAA,YAAkB,EAAO,KAChB,CACL,KAAM,CAEJ,OADA,GAAO,CACA,GAET,IAAI,EAAU,CACZ,EAAQ,EACR,0BAA4B,CAC1B,0BAA4B,CAC1B,GAAS,EACT,EACF,EAEL,EACD,CAEJ,IAAI,EAAS,cAAcA,EAAAA,MAAW,CACpC,YAAY,EAAU,EAAE,CAAE,CAUxB,OATA,MAAM,EAAQ,CACd,KAAK,iBAAmB,KACxB,KAAK,WAAa,KAClB,KAAK,cAAgB,EAAgB,KAAK,KAAK,MAAM,CACrD,KAAK,yBAA2B,EAAgB,KAAK,iBAAiB,CACtE,KAAK,GAAG,qBAAsB,CAAE,eAAgB,CAC9C,KAAK,cAAc,MAAQ,EAC3B,KAAK,yBAAyB,MAAQ,KAAK,kBAC3C,EACF,EAAA,EAAA,SAAe,KAAK,CAEtB,IAAI,OAAQ,CACV,OAAO,KAAK,cAAgB,KAAK,cAAc,MAAQ,KAAK,KAAK,MAEnE,IAAI,SAAU,CACZ,OAAO,KAAK,yBAA2B,KAAK,yBAAyB,MAAQ,MAAM,QAKrF,eAAe,EAA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