@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,2 +0,0 @@
|
|
|
1
|
-
require(`./chunk-Bmb41Sf3.cjs`);const e=require(`./common/utils/index.cjs`),t=require(`./_plugin-vue_export-helper-D8jCH6HB.cjs`);let n=require(`vue`);var r={__name:`CoreScroller`,props:{items:{type:Array,required:!0},keyField:{type:String,default:`id`},direction:{type:String,default:`vertical`,validator:e=>[`vertical`,`horizontal`].includes(e)},itemSize:{type:Number,default:null},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:`size`},buffer:{type:Number,default:200},enableHover:{type:Boolean,default:!0},listTag:{type:String,default:`div`},itemTag:{type:String,default:`div`},listClass:{type:[String,Object,Array],default:``},itemClass:{type:[String,Object,Array],default:``}},emits:[`user-position`,`scroll-start`,`scroll-end`],setup(e,{expose:t,emit:r}){let i=e,a=r,o=(0,n.reactive)(new Map),s=(0,n.reactive)(new Map),c=(0,n.ref)([]),l=(0,n.ref)(null),u=(0,n.ref)(!1),d=(0,n.ref)(null),f=(0,n.ref)(null),p=(0,n.ref)(null),m=(0,n.ref)(`blockStart`),h=0,g=0,_=!1,v=0,y=null,b=null,x=0,S=0,C=(0,n.computed)(()=>{if(i.itemSize===null){let e={"-1":{accumulator:0}},t=i.items,n=i.sizeField,r=i.minItemSize,a=1e4,o=0,s;for(let i=0,c=t.length;i<c;i++)s=t[i][n]||r,s<a&&(a=s),o+=s,e[i]={accumulator:o,size:s};return b=a,e}return[]}),w=(0,n.computed)(()=>i.items.length&&typeof i.items[0]!=`object`),T=(0,n.computed)(()=>{let e={};for(let t=0,n=i.items.length;t<n;t++)e[i.items[t][i.keyField]]=t;return e});(0,n.watch)(C,()=>{j(!1)},{deep:!0}),(0,n.onMounted)(()=>{(0,n.nextTick)(()=>{j(!0),u.value=!0})});let E=(e,t,r,i,a)=>{let o=(0,n.shallowReactive)({item:r,position:0,nr:(0,n.markRaw)({id:S++,index:t,used:!0,key:i,type:a})});return e.value.push(o),o},D=(e,t=!1)=>{let n=s,r=e.nr.type,i=n.get(r);i||(i=[],n.set(r,i)),i.push(e),t||(e.nr.used=!1,e.position=-9999)},O=()=>{let e=i.direction===`vertical`,t;return t=e?{start:d.value.scrollTop,end:d.value.scrollTop+d.value.clientHeight}:{start:d.value.scrollLeft,end:d.value.scrollLeft+d.value.clientWidth},t},k=()=>{throw setTimeout(()=>{console.error(`It seems the scroller element isn't scrolling, so it tries to render all the items at once.`,`Scroller:`,d),console.error(`Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.`)}),Error(`Rendered items limit reached`)},A=()=>{c.value.sort((e,t)=>e.nr.index-t.nr.index)},j=(e,t=!1)=>{if(!d.value)return;let n=i.itemSize,r=b,l=w.value?null:i.keyField,u=i.items,m=u.length,_=C.value,S=o,j=s,M=c,N=T,P,F,I,L,R;if(!m)P=F=L=R=I=0;else{let e=O();if(t){let t=e.start-v.value;if(t<0&&(t=-t),n===null&&t<r.value||t<n)return{continuous:!0}}v=e.start;let a=i.buffer;e.start-=a,e.end+=a;let o=i.direction===`vertical`?`scrollHeight`:`scrollWidth`;if(f.value&&(e.start-=f.value[o]),p.value&&(e.end+=p.value[o]),n===null){let t,n=0,r=m-1,i=~~(m/2),a;do a=i,t=_[i]?.accumulator,t<e.start?n=i:i<m-1&&_[i+1]?.accumulator>e.start&&(r=i),i=~~((n+r)/2);while(i!==a);for(i<0&&(i=0),P=i,I=_[m-1]?.accumulator,F=i;F<m&&_[F]?.accumulator<e.end;F++);for(F===-1?F=u.length-1:(F++,F>m&&(F=m)),L=h;L<m&&_[L]?.accumulator<e.start;L++);for(R=L;R<m&&_[R]?.accumulator<e.end;R++);}else{P=~~(e.start/n);let t=P%1;P-=t,F=Math.ceil(e.end/n),L=Math.max(0,Math.floor(e.start/n)),R=Math.floor(e.end/n),P<0&&(P=0),F>m&&(F=m),L<0&&(L=0),R>m&&(R=m),I=Math.ceil(m/1)*n}}F-P>1e3&&k(),x=I;let z,B=P<=g&&F>=P;if(B)for(let t=0,n=M.value.length;t<n;t++)z=M.value[t],z?.nr.used&&(e&&(z.nr.index=N[z.item[l]]),(z.nr.index==null||z.nr.index<P||z.nr.index>=F)&&D(z));let V=B?null:new Map,H,U,W;for(let e=P;e<F;e++){H=u[e];let t=l?H?.[l]:H;if(t==null)throw Error(`Key is ${t} on item (keyField is '${l}')`);if(z=S.get(t),!n&&!_[e]?.size){z&&D(z);continue}U=H.type;let r=j.get(U),i=!1;if(!z)B?z=r&&r.length?r.pop():E(M,e,H,t,U):(W=V.get(U)||0,(!r||W>=r.length)&&(z=E(M,e,H,t,U),D(z,!0),r=j.get(U)),z=r[W],V.set(U,W+1)),S.delete(z.nr.key),z.nr.used=!0,z.nr.index=e,z.nr.key=t,z.nr.type=U,S.set(t,z),i=!0;else if(!z.nr.used&&(z.nr.used=!0,i=!0,r)){let e=r.indexOf(z);e!==-1&&r.splice(e,1)}z.item=H,i&&(e===u.length-1&&a(`scroll-end`),e===0&&a(`scroll-start`)),n===null?(z.position=_[e-1]?.accumulator,z.offset=0):(z.position=Math.floor(e)*n,z.offset=e%1*n)}return h=P,g=F,clearTimeout(y),y=setTimeout(A,300),{continuous:B}},M=e=>{let t=i.direction===`vertical`?{scroll:`scrollTop`,start:`top`}:{scroll:`scrollLeft`,start:`left`},n=d.value,r=t.scroll;n[r]=e},N=e=>{let t;t=i.itemSize===null?e>0?C.value[e-1]?.accumulator:0:Math.floor(e)*i.itemSize,M(t)},P=()=>{let e=d.value;m.value!==`middle`&&(m.value=`middle`,a(`user-position`,`middle`)),e.scrollTop===0&&(m.value=`blockStart`,a(`user-position`,`blockStart`),a(`user-position`,`top`)),e.scrollTop+e.clientHeight===e.scrollHeight&&(m.value=`blockEnd`,a(`user-position`,`blockEnd`),a(`user-position`,`bottom`)),_||(_=!0,requestAnimationFrame(()=>{_=!1,j(!1,!0)}))};return t({scrollToItem:N,_updateVisibleItems:j}),(t,r)=>((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{ref_key:`scroller`,ref:d,class:(0,n.normalizeClass)([`vue-recycle-scroller`,{ready:u.value,[`direction-${e.direction}`]:!0}]),onScrollPassive:P},[t.$slots.before?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:0,ref_key:`before`,ref:f,"data-qa":`dt-scroller-before`,class:`vue-recycle-scroller__slot`},[(0,n.renderSlot)(t.$slots,`before`)],512)):(0,n.createCommentVNode)(``,!0),((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.listTag),{ref:`wrapper`,style:(0,n.normalizeStyle)({[e.direction===`vertical`?`minHeight`:`minWidth`]:`${(0,n.unref)(x)}px`}),"data-qa":`dt-scroller-item-wrapper`,class:(0,n.normalizeClass)([`vue-recycle-scroller__item-wrapper`,e.listClass])},{default:(0,n.withCtx)(()=>[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(c.value,r=>((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.itemTag),(0,n.mergeProps)({key:r.nr.id,"data-qa":`dt-scroller-item`,style:u.value?{transform:`translate${e.direction===`vertical`?`Y`:`X`}(${r.position}px) translate${e.direction===`vertical`?`X`:`Y`}(${r.offset}px)`,width:void 0,height:void 0}:null,class:[`vue-recycle-scroller__item-view`,[e.itemClass,{hover:i.enableHover&&l.value===r.nr.key}]]},(0,n.toHandlers)(i.enableHover?{mouseenter:()=>{l.value=r.nr.key},mouseleave:()=>{l.value=null}}:{})),{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(t.$slots,`default`,{item:r.item,index:r.nr.index,active:r.nr.used})]),_:2},1040,[`style`,`class`]))),128)),e.items.length?(0,n.createCommentVNode)(``,!0):(0,n.renderSlot)(t.$slots,`empty`,{key:0})]),_:3},8,[`style`,`class`])),t.$slots.after?((0,n.openBlock)(),(0,n.createElementBlock)(`div`,{key:1,ref_key:`after`,ref:p,"data-qa":`dt-scroller-after`,class:`vue-recycle-scroller__slot`},[(0,n.renderSlot)(t.$slots,`after`)],512)):(0,n.createCommentVNode)(``,!0)],34))}},i={name:`DynamicScroller`,components:{CoreScroller:r,DtScrollerItem:{name:`DtScrollerItem`,inject:[`vscrollData`,`vscrollParent`,`vscrollResizeObserver`],props:{item:{required:!0},watchData:{type:Boolean,default:!1},active:{type:Boolean,required:!0},index:{type:Number,default:void 0},sizeDependencies:{type:[Array,Object],default:null},tag:{type:String,default:`div`}},computed:{id(){if(this.vscrollData.simpleArray)return this.index;if(this.vscrollData.keyField in this.item)return this.item[this.vscrollData.keyField];throw Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)},size(){return this.vscrollData.sizes[this.id]||0},finalActive(){return this.active&&this.vscrollData.active}},watch:{watchData:`updateWatchData`,id(t,n){if(e.returnFirstEl(this.$el).$_vs_id=this.id,this.size||this.onDataUpdate(),this.$_sizeObserved){let e=this.vscrollData.sizes[n],r=this.vscrollData.sizes[t];e!=null&&e!==r&&this.applySize(e)}},finalActive(e){this.size||(e?this.vscrollParent.$_undefinedMap[this.id]||(this.vscrollParent.$_undefinedSizes++,this.vscrollParent.$_undefinedMap[this.id]=!0):this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=!1)),this.vscrollResizeObserver?e?this.observeSize():this.unobserveSize():e&&this.$_pendingVScrollUpdate===this.id&&this.updateSize()}},created(){if(!this.$isServer&&(this.$_forceNextVScrollUpdate=null,this.updateWatchData(),!this.vscrollResizeObserver))for(let e in this.sizeDependencies)this.$watch(()=>this.sizeDependencies[e],this.onDataUpdate)},mounted(){this.finalActive&&(this.updateSize(),this.observeSize())},beforeUnmount(){this.unobserveSize()},methods:{updateSize(){this.finalActive?this.$_pendingSizeUpdate!==this.id&&(this.$_pendingSizeUpdate=this.id,this.$_forceNextVScrollUpdate=null,this.$_pendingVScrollUpdate=null,this.computeSize(this.id)):this.$_forceNextVScrollUpdate=this.id},updateWatchData(){this.watchData&&!this.vscrollResizeObserver?this.$_watchData=this.$watch(`item`,()=>{this.onDataUpdate()},{deep:!0}):this.$_watchData&&(this.$_watchData(),this.$_watchData=null)},onVscrollUpdate({force:e}){!this.finalActive&&e&&(this.$_pendingVScrollUpdate=this.id),(this.$_forceNextVScrollUpdate===this.id||e||!this.size)&&this.updateSize()},onDataUpdate(){this.updateSize()},computeSize(t){this.$nextTick(()=>{if(this.id===t){let t=e.returnFirstEl(this.$el).offsetWidth,n=e.returnFirstEl(this.$el).offsetHeight;this.applyWidthHeight(t,n)}this.$_pendingSizeUpdate=null})},applyWidthHeight(e,t){let n=~~(this.vscrollParent.direction===`vertical`?t:e);n&&this.size!==n&&this.applySize(n)},applySize(e){this.vscrollParent.$_undefinedMap[this.id]&&(this.vscrollParent.$_undefinedSizes--,this.vscrollParent.$_undefinedMap[this.id]=void 0),this.vscrollData.sizes[this.id]=e},observeSize(){this.vscrollResizeObserver&&(this.$_sizeObserved||(this.vscrollResizeObserver.observe(e.returnFirstEl(this.$el)),this.$el.$_vs_id=this.id,this.$el.$_vs_onResize=this.onResize,this.$_sizeObserved=!0))},unobserveSize(){this.vscrollResizeObserver&&this.$_sizeObserved&&(this.vscrollResizeObserver.unobserve(e.returnFirstEl(this.$el)),this.$el.$_vs_onResize=void 0,this.$_sizeObserved=!1)},onResize(e,t,n){this.id===e&&this.applyWidthHeight(t,n)}},render(){return(0,n.h)(this.tag,this.$slots.default())}}},provide(){return typeof ResizeObserver<`u`&&(this.$_resizeObserver=new ResizeObserver(e=>{requestAnimationFrame(()=>{if(Array.isArray(e)){for(let t of e)if(t.target&&t.target.$_vs_onResize){let e,n;if(t.borderBoxSize){let r=t.borderBoxSize[0];e=r.inlineSize,n=r.blockSize}else e=t.contentRect.width,n=t.contentRect.height;t.target.$_vs_onResize(t.target.$_vs_id,e,n)}}})})),{vscrollData:this.vscrollData,vscrollParent:this,vscrollResizeObserver:this.$_resizeObserver}},inheritAttrs:!1,props:{items:{type:Array,required:!0},dynamic:{type:Boolean,default:!1},keyField:{type:String,default:`id`},direction:{type:String,default:`vertical`,validator:e=>[`vertical`,`horizontal`].includes(e)},listTag:{type:String,default:`div`},itemTag:{type:String,default:`div`},minItemSize:{type:[Number,String]}},data(){return{vscrollData:{active:!0,sizes:{},keyField:this.keyField,simpleArray:!1}}},computed:{simpleArray(){return this.items.length&&typeof this.items[0]!=`object`},itemsWithSize(){let e=[],{items:t,keyField:n,simpleArray:r}=this,i=this.vscrollData.sizes,a=t.length;for(let o=0;o<a;o++){let a=t[o],s=r?o:a[n],c=i[s];c===void 0&&!this.$_undefinedMap[s]&&(c=0),e.push({item:a,[n]:s,size:c})}return e}},watch:{simpleArray:{handler(e){this.vscrollData.simpleArray=e},immediate:!0},itemsWithSize(t,n){let r=e.returnFirstEl(this.$el).scrollTop,i=0,a=0,o=Math.min(t.length,n.length);for(let e=0;e<o&&!(i>=r);e++)i+=n[e].size||this.minItemSize,a+=t[e].size||this.minItemSize;let s=a-i;s!==0&&(e.returnFirstEl(this.$el).scrollTop+=s)}},beforeCreate(){this.$_updates=[],this.$_undefinedSizes=0,this.$_undefinedMap={}},activated(){this.vscrollData.active=!0},deactivated(){this.vscrollData.active=!1},methods:{dynamicScrollerUpdateItems(){let e=this.$refs.scroller;e&&e._updateVisibleItems(!0)},dynamicScrollerUpdateItemsFromBottom(){let e=this.$refs.scroller;e&&e._updateVisibleItems(!1,!0)},scrollToItem(e){let t=this.$refs.scroller;t&&t.scrollToItem(e)},scrollToBottom(){if(this.$_scrollingToBottom)return;this.$_scrollingToBottom=!0;let t=e.returnFirstEl(this.$el);this.$nextTick(()=>{t.scrollTop=t.scrollHeight+5e3;let e=()=>{t.scrollTop=t.scrollHeight+5e3,requestAnimationFrame(()=>{t.scrollTop=t.scrollHeight+5e3,this.$_undefinedSizes===0?this.$_scrollingToBottom=!1:requestAnimationFrame(e)})};requestAnimationFrame(e)})}}};function a(e,t,r,i,a,o){let s=(0,n.resolveComponent)(`dt-scroller-item`),c=(0,n.resolveComponent)(`core-scroller`);return(0,n.openBlock)(),(0,n.createBlock)(c,(0,n.mergeProps)({ref:`scroller`,items:o.itemsWithSize,"min-item-size":r.minItemSize,direction:r.direction,"key-field":r.keyField,"list-tag":r.listTag,"item-tag":r.itemTag},e.$attrs),(0,n.createSlots)({default:(0,n.withCtx)(({item:t,index:r,active:i})=>[(0,n.createVNode)(s,{item:t,active:i,"size-dependencies":[t.message],"data-index":r},{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`default`,(0,n.normalizeProps)((0,n.guardReactiveProps)({item:t.item,index:r,active:i,itemWithSize:t})))]),_:2},1032,[`item`,`active`,`size-dependencies`,`data-index`])]),_:2},[e.$slots.before?{name:`before`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`before`)]),key:`0`}:void 0,e.$slots.empty?{name:`empty`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`empty`)]),key:`1`}:void 0,e.$slots.after?{name:`after`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`after`)]),key:`2`}:void 0]),1040,[`items`,`min-item-size`,`direction`,`key-field`,`list-tag`,`item-tag`])}var o=t.t(i,[[`render`,a]]),s=Object.assign({name:`DtScroller`},{__name:`Scroller`,props:{buffer:{type:Number,default:200},direction:{type:String,default:`vertical`,validator:e=>[`vertical`,`horizontal`].includes(e)},dynamic:{type:Boolean,default:!1},itemSize:{type:Number,default:null},itemTag:{type:String,default:`div`},items:{type:Array,required:!0},keyField:{type:String,default:`id`},listTag:{type:String,default:`div`},minItemSize:{type:[Number,String],default:null},scrollerHeight:{type:[String,Number],default:`100%`},scrollerWidth:{type:[String,Number],default:`100%`}},emits:[`user-position`,`scroll-start`,`scroll-end`],setup(e,{expose:t,emit:i}){let a=e;(0,n.provide)(`emit`,i);let s=(0,n.ref)(null),c=(0,n.computed)(()=>({width:typeof a.scrollerWidth==`number`?`${a.scrollerWidth}px`:a.scrollerWidth,height:typeof a.scrollerHeight==`number`?`${a.scrollerHeight}px`:a.scrollerHeight}));(0,n.watch)(a,()=>{p()},{deep:!0,immediate:!0});function l(){s.value&&s.value.scrollToBottom()}function u(e){s.value&&s.value.scrollToItem(e)}function d(){s.value&&(a.dynamic?s.value.dynamicScrollerUpdateItems():s.value._updateVisibleItems(!0))}function f(){s.value&&(a.dynamic?s.value.dynamicScrollerUpdateItemsFromBottom():s.value._updateVisibleItems(!1,!0))}function p(){a.dynamic&&!a.minItemSize&&console.error(`scroller error: 'minItemSize' is required on 'dynamic' mode.`),!a.dynamic&&!a.itemSize&&console.error(`scroller error: 'itemSize' is required.`)}return t({scrollToBottom:l,scrollToItem:u,updateItems:d,updateItemsFromBottom:f}),(t,i)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(e.dynamic?o:r),{ref_key:`scroller`,ref:s,"data-qa":`dt-scroller`,items:e.items,"item-size":e.itemSize,"min-item-size":e.minItemSize,buffer:e.buffer,direction:e.direction,"key-field":e.keyField,"list-tag":e.listTag,"item-tag":e.itemTag,style:(0,n.normalizeStyle)(c.value),tabindex:`0`,onUserPosition:i[0]||(i[0]=e=>t.$emit(`user-position`,e)),onScrollStart:i[1]||(i[1]=e=>t.$emit(`scroll-start`)),onScrollEnd:i[2]||(i[2]=e=>t.$emit(`scroll-end`))},(0,n.createSlots)({default:(0,n.withCtx)(({item:e,index:r,active:i})=>[(0,n.renderSlot)(t.$slots,`default`,(0,n.normalizeProps)((0,n.guardReactiveProps)({item:e,index:r,active:i})))]),_:2},[t.$slots.before?{name:`before`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(t.$slots,`before`)]),key:`0`}:void 0,t.$slots.empty?{name:`empty`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(t.$slots,`empty`)]),key:`1`}:void 0,t.$slots.after?{name:`after`,fn:(0,n.withCtx)(()=>[(0,n.renderSlot)(t.$slots,`after`)]),key:`2`}:void 0]),1064,[`items`,`item-size`,`min-item-size`,`buffer`,`direction`,`key-field`,`list-tag`,`item-tag`,`style`]))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|
|
2
|
-
//# sourceMappingURL=Scroller-EIHN3a26.cjs.map
|
package/dist/Slider-BDgY7gNR.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
require(`./chunk-Bmb41Sf3.cjs`);const e=require(`./common/utils/index.cjs`),t=require(`./lib/text/text-constants.cjs`),n=require(`./Text-DNVNZree.cjs`),r=require(`./floating-ui.dom-n1CheoWj.cjs`),i=require(`./lib/slider/utils.cjs`);let a=require(`vue`);var o=[`horizontal`,`vertical`],s=[`always`,`never`,`tooltip`],c=[`start`,`end`],l=10,u=32,d=0;function f(e,{isRange:t,hasAccessibleName:n}){process.env.NODE_ENV!==`production`&&((0,a.watch)(()=>t.value&&!e.getValueText,e=>{e&&console.info(`[Dialtone] DtSlider in range mode: provide getValueText to give each thumb a distinct screen-reader description.`)},{immediate:!0}),(0,a.watch)(()=>n.value,e=>{e||console.info(`[Dialtone] DtSlider: provide a label prop (set showLabel to false to hide it visually) or aria-label for accessibility.`)},{immediate:!0}),(0,a.watch)(()=>e.minGapSteps!==Math.round(e.minGapSteps),t=>{t&&console.info(`[Dialtone] DtSlider: minGapSteps (${e.minGapSteps}) is not a whole number — it will be rounded to ${Math.round(e.minGapSteps)}.`)},{immediate:!0}),(0,a.watch)(()=>e.min>e.max,t=>{t&&console.info(`[Dialtone] DtSlider: min (${e.min}) is greater than max (${e.max}) — every value will collapse to max.`)},{immediate:!0}))}function p(e){let t=(0,a.ref)(!1);function n(){t.value=!!e.value&&getComputedStyle(e.value).direction===`rtl`}let r=null;return(0,a.onMounted)(()=>{if(n(),typeof MutationObserver<`u`&&e.value){r=new MutationObserver(n);let t={attributes:!0,attributeFilter:[`dir`,`style`,`class`]};for(let n=e.value;n;n=n.parentElement)r.observe(n,t);r.observe(document.documentElement,t)}}),(0,a.onBeforeUnmount)(()=>{r?.disconnect()}),{isRtl:t}}function m(e,t,{isRange:n,activeSnapValue:r}){function i(e,t){return r?.value[e]===t}function o(e){let t=String(e),n=t.search(/e/i);if(n!==-1){let e=t.slice(0,n),r=parseInt(t.slice(n+1),10),i=e.indexOf(`.`),a=i===-1?0:e.length-i-1;return Math.max(0,a-r)}let r=t.indexOf(`.`);return r===-1?0:t.length-r-1}function s(t){return Math.min(e.max,Math.max(e.min,t))}function c(t){if(e.step<=0)return Math.min(e.max,Math.max(e.min,t));let n=Math.round((t-e.min)/e.step),r=Math.max(o(e.min),o(e.step));return Math.min(e.max,Math.max(e.min,parseFloat((e.min+n*e.step).toFixed(r))))}function l(e){return e.length===2&&e[0]>e[1]?[e[1],e[0]]:e}function u(t,n=null){if(t.length!==2)return t;let r=Math.round(e.minGapSteps)*e.step;if(r<=0)return t;let[i,a]=t;if(a-i>=r)return t;n===0?a=Math.min(e.max,i+r):n===1?i=Math.max(e.min,a-r):i+r<=e.max?a=i+r:a-r>=e.min?i=a-r:(a=e.max,i=Math.max(e.min,a-r));let s=Math.max(o(e.min),o(e.max),o(e.step),n===null?0:o(t[n]));return n!==0&&(i=Math.min(e.max,Math.max(e.min,parseFloat(i.toFixed(s))))),n!==1&&(a=Math.min(e.max,Math.max(e.min,parseFloat(a.toFixed(s))))),[i,a]}function d(e,t=null){let n=e.map((e,n)=>n===t||Number.isFinite(e)?e:f());return n=n.map((e,n)=>n===t?e:s(e)),n=n.map((e,n)=>n===t?e:c(e)),n=n.length===2&&t===null?l(n):n,u(n,t)}function f(){return(e.min+e.max)/2}function p(e,t=null){let n;return n=Array.isArray(e)?e.length>=2?[e[0],e[1]]:e.length===1?[e[0]]:[f()]:e==null?[f()]:[e],d(n,t)}let m=(0,a.ref)(p(e.modelValue)),h=(0,a.ref)([...m.value]),g=(0,a.computed)(()=>n.value?[...m.value]:m.value[0]);function _(t){return e.max===e.min?0:(t-e.min)/(e.max-e.min)*100}function v(t,n){if(e.step<=0)return t;let r=(t-e.min)/e.step,i=n?Math.ceil(r-1e-9):Math.floor(r+1e-9);return e.min+i*e.step}function y(t){if(!n.value||t!==1||m.value.length<2)return e.min;let r=Math.round(e.minGapSteps)*e.step,i=Math.min(e.max,m.value[0]+r);return Math.min(e.max,v(i,!0))}function b(t){if(!n.value||t!==0||m.value.length<2)return e.max;let r=Math.round(e.minGapSteps)*e.step,i=Math.max(e.min,m.value[1]-r);return Math.max(e.min,v(i,!1))}function x(t){if(e.step<=0)return`any`;let n=m.value[t];if(n===void 0)return e.step;let r=(n-e.min)/e.step;return Math.abs(r-Math.round(r))>1e-9?`any`:e.step}let S=!1;function C(e){process.env.NODE_ENV===`production`||S||(S=!0,console.info(`[Dialtone] DtSlider: ${e}`))}function w(t,n){if(e.getValueText)try{let r=e.getValueText(t,n);if(typeof r==`string`)return r;C(`getValueText must return a string synchronously (got ${typeof r}) — falling back to the raw value.`)}catch(e){C(`getValueText threw — falling back to the raw value. ${e}`)}return`${e.prefix}${t}${e.suffix}`}return(0,a.watch)(()=>e.modelValue,e=>{if(e==null)return;let n=m.value,r=Array.isArray(e)?e:[e],a=n.findIndex((e,t)=>r[t]===e&&i(t,e)),o=p(e,a===-1?null:a);if(o.length!==n.length||o.some((e,t)=>e!==n[t])){let e=n.length!==h.value.length||n.some((e,t)=>e!==h.value[t]);m.value=o,e||(h.value=[...o])}(o.length!==r.length||o.some((e,t)=>e!==r[t]))&&t(`update:modelValue`,Array.isArray(e)?[...o]:o[0])},{deep:!0}),(0,a.watch)(()=>[e.min,e.max,e.step,e.minGapSteps],()=>{let r=m.value,a=r.length!==h.value.length||r.some((e,t)=>e!==h.value[t]),o=r.findIndex((t,n)=>i(n,t)&&t>=e.min&&t<=e.max),s=d(r,o===-1?null:o);if(s.length!==r.length||s.some((e,t)=>e!==r[t])){m.value=s;let e=n.value?[...s]:s[0];if(t(`update:modelValue`,e),a)return;h.value=[...s],t(`change`,e)}}),(0,a.onMounted)(()=>{if(e.modelValue===void 0||e.modelValue===null)return;let n=Array.isArray(e.modelValue)?e.modelValue:[e.modelValue],r=m.value;(r.length!==n.length||r.some((e,t)=>e!==n[t]))&&t(`update:modelValue`,Array.isArray(e.modelValue)?[...r]:r[0])}),{internalValues:m,lastCommittedValues:h,currentValue:g,decimalPlaces:o,snapToStep:c,thumbPercent:_,thumbNativeMin:y,thumbNativeMax:b,thumbNativeStep:x,formatValue:w}}var h=10,g=2;function _(e,{controlRef:t,isVertical:n}){let r=(0,a.computed)(()=>{if(e.snapPoints==null)return[];if(typeof e.snapPoints==`number`){let t=e.snapPoints;return!Number.isFinite(t)||t<=0?[]:i.generateInterval(e.min,e.max,t,`snapPoints`)}return Array.isArray(e.snapPoints)?e.snapPoints.filter(t=>Number.isFinite(t)&&t>=e.min&&t<=e.max):[]}),o=(0,a.ref)({});function s(i,a){let s=r.value;if(!s.length||!t.value)return delete o.value[a],null;let c=t.value.getBoundingClientRect(),l=n.value?c.height:c.width;if(!l)return null;let u=h/l*(e.max-e.min),d=o.value[a];if(d!=null&&s.includes(d)){let e=u*g;if(Math.abs(d-i)<=e)return d}let f=null,p=1/0;for(let e of s){let t=Math.abs(e-i);t<=u&&t<p&&(f=e,p=t)}return f==null?delete o.value[a]:o.value[a]=f,f}return{activeSnapValue:o,findMagneticSnapPoint:s}}var v=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`,`PageUp`,`PageDown`]);function y(e,t,{controlRef:n,thumbRefs:r,internalValues:o,isRange:s,isVertical:c,decimalPlaces:l,snapToStep:u,lastCommittedValues:d,findMagneticSnapPoint:f,activeSnapValue:p,isRtl:m}){let h=(0,a.ref)(!1),g=(0,a.ref)(null),_=(0,a.ref)(null),y=(0,a.ref)(null),b=(0,a.ref)(null),x=(0,a.ref)(null),S=!1,C=null,w=!1;(0,a.watch)(()=>e.disabled,e=>{e&&(y.value=null,b.value=null)}),(0,a.watch)(()=>o.value.length,(e,t)=>{let n=y.value===1||document.activeElement===r.value[1];e===1&&t===2&&n&&(0,a.nextTick)(()=>r.value[0]?.focus()),g.value!==null&&g.value>=e&&(g.value=null)});function T(n,i,{allowSnap:a=!1}={}){let c=Math.min(e.max,Math.max(e.min,i)),d=a?f(c,n):null;c=d??u(c);let m=[...o.value];if(s.value){let t=Math.max(0,Math.round(e.minGapSteps)*e.step);if(c=n===0?Math.min(c,(m[1]??e.max)-t):Math.max(c,(m[0]??e.min)+t),!(d!=null&&c===d)){let t=Math.max(l(e.min),l(e.step));c=parseFloat(c.toFixed(t)),c=Math.min(e.max,Math.max(e.min,c))}d!=null&&c!==d&&delete p.value[n]}if(m[n]===c){let e=r.value[n];e&&e.value!==String(c)&&(e.value=String(c));return}m[n]=c,o.value=m,t(`update:modelValue`,s.value?[...m]:m[0])}function E(){let e=o.value,n=d.value;(e.length!==n.length||e.some((e,t)=>e!==n[t]))&&(d.value=[...e],t(`change`,s.value?[...e]:e[0]))}let D=0;function O(t){let r=n.value.getBoundingClientRect(),i=c.value?r.height:r.width,a=i-2*D,o;if(c.value){let e=r.bottom-t.clientY;o=a>0?(e-D)/a:e/i}else{let e=t.clientX-r.left;o=a>0?(e-D)/a:e/i,m.value&&(o=1-o)}return o=Math.min(1,Math.max(0,o)),e.min+o*(e.max-e.min)}function k(e){if(!s.value||o.value.length<2)return 0;let[t,n]=o.value;return t===n?_.value===0?1:0:Math.abs(e-t)<=Math.abs(e-n)?0:1}function A(e,t){if(!s.value)return e;let[n,r]=o.value;return n===r?e===0&&t>n?1:e===1&&t<r?0:e:e}function j(t){if(e.disabled||t.pointerType===`mouse`&&t.button!==0||h.value&&t.pointerId!==C)return;t.preventDefault(),D=i.measureEdgeInsetPx(n.value);let a=O(t),c=k(a),[l,u]=o.value;w=s.value&&o.value.length===2&&l===u,x.value===c&&(x.value=null),g.value=c,_.value=c,h.value=!0,C=t.pointerId,n.value.setPointerCapture(t.pointerId),b.value=null,T(c,a,{allowSnap:!0});let d=r.value[c];d&&document.activeElement!==d?(S=!0,d.focus()):y.value===c&&(y.value=null)}function M(t){if(!h.value||g.value===null||t.pointerId!==C)return;if(e.disabled){P();return}if(t.buttons===0){P();return}let n=O(t),r=w?A(g.value,n):g.value;r!==g.value&&(delete p.value[g.value],x.value===r&&(x.value=null),g.value=r,_.value=r),T(r,n,{allowSnap:!0})}function N(t){if(e.step<=0)return!1;let n=(t-e.min)/e.step;return Math.abs(n-Math.round(n))>1e-9}function P(e){if(!h.value||e&&e.pointerId!==C)return;h.value=!1,C=null;let t=g.value;t!==null&&N(o.value[t])&&T(t,o.value[t]),E(),g.value=null,p.value={}}function F(e,t){T(e,Number(t.target.value))}function I(e,t,n,r){return e===`PageUp`?1:e===`PageDown`?-1:t?e===`ArrowUp`||e===n?1:e===`ArrowDown`||e===r?-1:0:0}function L(){return e.step<=0?e.largeStep:Math.max(1,Math.round(e.largeStep/e.step))*e.step}function R(e,t){y.value!==e&&(y.value=e);let n=m.value,r=n?`ArrowLeft`:`ArrowRight`,i=n?`ArrowRight`:`ArrowLeft`,a=I(t.key,t.shiftKey,r,i);a!==0&&(t.preventDefault(),T(e,o.value[e]+a*L())),t.key===`Escape`?x.value=e:v.has(t.key)&&x.value===e&&(x.value=null)}function z(e,n){S?S=!1:(x.value===e&&(x.value=null),y.value=e),t(`focus`,n)}function B(e,n){y.value=null,E(),t(`blur`,n)}function ee(e){x.value===e&&(x.value=null),b.value=e}function te(e){b.value===e&&(b.value=null)}function V(t){return e.readout===`always`?!0:x.value===t?!1:g.value===t||y.value===t||b.value===t}return{isDragging:h,activeThumbIndex:g,focusedThumbIndex:y,hoveredThumbIndex:b,updateThumbValue:T,commitIfChanged:E,onPointerDown:j,onPointerMove:M,onPointerUp:P,onThumbInput:F,onThumbKeydown:R,onThumbFocus:z,onThumbBlur:B,onThumbHitPointerEnter:ee,onThumbHitPointerLeave:te,isReadoutOpen:V}}function b(e,{isVertical:t,isRange:n,internalValues:r,thumbPercent:i,isRtl:o,markEdgeOffsetPx:s,formatValue:c}){function l(e,n){let r=t.value?{bottom:`${e}%`}:{insetInlineStart:`${e}%`};return n&&(r.transform=n),r}function u(){return o.value?`50%`:`-50%`}let d=`var(--slider-edge-inset)`,f=`calc(${d} + (100% - ${d} * 2) * `;function p(e){return`${f}${e/100})`}function m(e){return`calc((100% - ${d} * 2) * ${e/100})`}function h(e,{verticalTransform:n,horizontalTransform:r}){let a=i(e);return t.value?{bottom:p(a),transform:n}:{insetInlineStart:p(a),transform:r}}function g(e){return h(e,{verticalTransform:`translate(${u()}, 50%)`,horizontalTransform:`translate(${u()}, -50%)`})}function _(e){return h(e,{verticalTransform:`translateY(50%)`,horizontalTransform:`translateX(${u()})`})}function v(e){let t=o.value?-1:1;return e===`start`?`translateX(${t}px)`:`translateX(calc(${o.value?`100%`:`-100%`} + ${-t}px))`}function y(e,n){let r=t.value?{bottom:p(e)}:{insetInlineStart:p(e)};return n&&(r.transform=n),r}function b(e,n,r){if(r&&!t.value)return l(e,v(r));let i=t.value?0:s.value[n];return i?y(e,`translateX(calc(${u()} + ${i}px))`):y(e)}function x(e,n,r){if(r&&!t.value)return l(e,v(r));let i=t.value?0:n;return i?y(e,`translateX(calc(${u()} + ${i}px))`):y(e)}return{thumbPositionStyle:g,tickPositionStyle:_,markStyle:b,readoutStyle:x,mergedReadoutPct:(0,a.computed)(()=>{if(!n.value||r.value.length!==2)return 0;let[e,t]=r.value;return(i(e)+i(t))/2}),mergedReadoutText:(0,a.computed)(()=>{if(!n.value||r.value.length!==2)return``;let[e,t]=r.value;return`${c(e,0)}–${c(t,1)}`}),indicatorStyle:(0,a.computed)(()=>{if(n.value&&r.value.length===2){let[e,n]=r.value,a=i(e),o=i(n);return t.value?{bottom:p(a),height:m(o-a)}:{insetInlineStart:p(a),width:m(o-a)}}let a=i(r.value[0]??e.min);if(typeof e.fillOrigin==`number`){let n=i(Math.min(e.max,Math.max(e.min,e.fillOrigin))),r=Math.min(a,n),o=Math.abs(a-n);return t.value?{bottom:p(r),height:m(o)}:{insetInlineStart:p(r),width:m(o)}}let o=e.fillOrigin===`end`;return t.value?o?{top:0,height:`calc(100% - ${p(a)})`}:{bottom:0,height:p(a)}:o?{insetInlineEnd:0,width:`calc(100% - ${p(a)})`}:{insetInlineStart:0,width:p(a)}})}}function x(e,{isVertical:t,thumbPercent:n}){let r=(0,a.computed)(()=>{let t=typeof e.showTicks==`number`?e.showTicks:e.step;return!t||t<=0?[]:i.generateInterval(e.min,e.max,t,`ticks`)});function o(t){return`${e.prefix}${t}${e.suffix}`}let s=(0,a.computed)(()=>{let t=e.showMarks===!0?[e.min,e.max]:e.showMarks;return Array.isArray(t)?t.filter(i.isValidMark).map(t=>{let r=typeof t==`number`?t:t.value,i=typeof t==`number`?o(t):t.text??o(r),a=r===e.min?`start`:r===e.max?`end`:null;return{text:i,pct:n(r),edge:a}}):[]});return{computedTickValues:r,computedMarks:s,reservesAnnotationSpace:(0,a.computed)(()=>!t.value&&(s.value.length>0||e.readout===`always`))}}function S(e,{controlRef:t,isVertical:n,isRange:r,internalValues:o,thumbPercent:s,isRtl:c,isReadoutOpen:l,computedMarks:u,formatValue:d}){let f=(0,a.ref)([]),p=(0,a.ref)([]),m=(0,a.ref)(null),h=(0,a.ref)([]),g=(0,a.ref)([]),_=(0,a.ref)(!1),v=(0,a.ref)([]),y=(0,a.ref)([]),b=(0,a.ref)(0);function x(e,t,n=0){return!(e.right+n<t.left||e.left-n>t.right||e.bottom+n<t.top||e.top-n>t.bottom)}let S=0,C=0;function w(e,r){if(!r||!t.value)return null;let a=r.getBoundingClientRect(),o=t.value.getBoundingClientRect(),s=C;if(n.value){let t=a.bottom-a.top,n=s+(o.bottom-o.top-2*s)*(e/100),r=o.bottom-n;return{left:a.left,right:a.right,top:r-t/2,bottom:r+t/2}}let l=a.right-a.left,u=s+(o.right-o.left-2*s)*(i.mirrorPct(e,c.value)/100),d=o.left+u;return{left:d-l/2,right:d+l/2,top:a.top,bottom:a.bottom}}function T(e){return p.value.find(t=>t&&Number(t.dataset.readoutIndex)===e)}function E(t,n){return e.readout===`tooltip`?h.value[n]?.getBoundingClientRect()??null:w(s(t),T(n))}async function D(){let n=++S;if(await(0,a.nextTick)(),n!==S)return;t.value&&(C=i.measureEdgeInsetPx(t.value));let c=_.value;if(e.readout!==`tooltip`&&r.value&&o.value.length===2&&l(0)&&l(1)){let[e,t]=o.value,n=w(s(e),T(0)),r=w(s(t),T(1));_.value=!!(n&&r&&x(n,r,4))}else _.value=!1;_.value!==c&&(await(0,a.nextTick)(),n!==S)||(j(),O())}function O(){let r=e.readout===`always`&&!!t.value&&!n.value,a=r?t.value.getBoundingClientRect():null;function s(e,t){if(!e||!r)return 0;let n=e.getBoundingClientRect();return i.edgeClampOffset(n.left-t,n.right-t,a,0)}function c(){let e=s(m.value,b.value);e!==b.value&&(b.value=e),y.value.some(Boolean)&&(y.value=o.value.map(()=>0))}function u(){b.value&&(b.value=0);let e=o.value.map((e,t)=>l(t)?s(T(t),y.value[t]||0):0);i.sameValues(e,y.value)||(y.value=e)}_.value?c():u()}function k(){let[e,t]=o.value;return(s(e)+s(t))/2}function A(){if(_.value){let e=w(k(),m.value);return e?[e]:[]}return o.value.map((e,t)=>l(t)?E(e,t):null).filter(Boolean)}function j(){let e=f.value;if(!e.length)return;let r=A(),a=u.value.map(()=>!1),o=u.value.map(()=>0),s=!!t.value&&!n.value,c=s?t.value.getBoundingClientRect():null;e.forEach(e=>{if(!e)return;let t=Number(e.dataset.markIndex),n=v.value[t]||0,l=e.getBoundingClientRect(),u=l.left-n,d=l.right-n,f=s?i.edgeClampOffset(u,d,c,32):0;if(o[t]=f,r.length){let e={top:l.top,bottom:l.bottom,left:u+f,right:d+f};a[t]=r.some(t=>x(e,t,4))}}),i.sameValues(a,g.value)||(g.value=a),i.sameValues(o,v.value)||(v.value=o)}let M=(0,a.computed)(()=>o.value.map((e,t)=>l(t))),N=(0,a.computed)(()=>o.value.map((e,t)=>d(e,t))),P=null;return(0,a.watch)([M,u,n,c],()=>D(),{deep:!0}),(0,a.watch)([o,N,()=>e.readoutClass],()=>{e.readout!==`tooltip`&&D()},{deep:!0}),(0,a.onMounted)(()=>{(0,a.nextTick)(D),typeof ResizeObserver<`u`&&t.value&&(P=new ResizeObserver(()=>{D()}),P.observe(t.value))}),(0,a.onBeforeUnmount)(()=>{P?.disconnect()}),{markElRefs:f,readoutElRefs:p,mergedReadoutElRef:m,tooltipElRefs:h,markCollisionHidden:g,readoutMerged:_,markEdgeOffsetPx:v,readoutEdgeOffsetPx:y,mergedReadoutEdgeOffsetPx:b,readoutVisibility:M,formattedValues:N,updateCollisions:D}}var C={visibilityProperty:!0,opacityProperty:!0,checkVisibilityCSS:!0,checkOpacity:!0};function w(e){if(e.checkVisibility)return e.checkVisibility(C);if(!e.getClientRects().length||getComputedStyle(e).visibility!==`visible`)return!1;for(let t=e;t;t=t.parentElement){let e=getComputedStyle(t);if(e.opacity===`0`||e.contentVisibility===`hidden`)return!1}return!0}function T(e,t){return e.left===t.left&&e.top===t.top&&e.right===t.right&&e.bottom===t.bottom}var E=(e,t,n)=>Math.min(n,Math.max(t,e));function D(e,{thumbVisualRefs:t,tooltipElRefs:n,isVertical:o,isRtl:s,readoutVisibility:c,formattedValues:l,onPosition:u}){let d=new Map;function f(t){return e.readout===`tooltip`&&!e.disabled&&c.value[t]}function p(e){let t=d.get(e);t&&(d.delete(e),t.cleanup?.(),t.tooltip.matches(`:popover-open`)&&t.tooltip.hidePopover())}function m(e,t,n){if(typeof n.showPopover!=`function`)return;let a=0,c=!0,l=null,m=null,h,g={anchor:t,tooltip:n,update:b,cleanup:null},_=()=>d.get(e)===g;function v(){return c||!w(t)?`hidden`:`visible`}function y(){n.style.visibility=`hidden`,n.showPopover()}async function b(){if(!_())return;if(!n.matches(`:popover-open`)){if(!f(e)||!t.isConnected||!n.isConnected||!w(t)){p(e);return}y()}let d=++a,h=t.getBoundingClientRect();l=h;let g=parseFloat(getComputedStyle(n).paddingBlockStart)||0,b={boundary:[],padding:g*2},x=n.firstElementChild,S=()=>_()&&d===a,C=await r.i(t,n,{strategy:`fixed`,placement:o.value?s.value?`left`:`right`:`top`,middleware:[r.c(g),r.a(b),r.l(b),r.u({...b,apply({availableWidth:e,availableHeight:t}){S()&&(x.style.maxInlineSize=`${Math.max(0,e-g*2)}px`,x.style.maxBlockSize=`${Math.max(0,t-g*2)}px`)}}),r.o()]});if(!S())return;let T=n.offsetWidth,D=n.offsetHeight,O=C.placement;c=C.middlewareData.hide?.referenceHidden;let k=v();n.dataset.side=O,Object.assign(n.style,{left:`${C.x}px`,top:`${C.y}px`,visibility:k}),O===`top`||O===`bottom`?n.style.setProperty(`--slider-tooltip-arrow-x`,`${E(h.left+h.width/2-C.x,g,T-g)}px`):n.style.setProperty(`--slider-tooltip-arrow-y`,`${E(h.top+h.height/2-C.y,g,D-g)}px`);let A=[C.x,C.y,T,D,O,k];(!m||!i.sameValues(A,m))&&(m=A,u())}function x(){!n.matches(`:popover-open`)||!l||!T(t.getBoundingClientRect(),l)?b():n.style.visibility=v(),_()&&(h=requestAnimationFrame(x))}d.set(e,g),y();let S=r.r(t,n,b,{layoutShift:!1});x(),g.cleanup=()=>{S(),cancelAnimationFrame(h)}}function h(){for(let[e,r]of d)(!f(e)||t.value[e]!==r.anchor||n.value[e]!==r.tooltip)&&p(e);c.value.forEach((e,r)=>{let i=t.value[r],a=n.value[r];!i||!a||!f(r)||(d.has(r)?d.get(r).update():m(r,i,a))})}(0,a.watch)([()=>e.readout,()=>e.disabled,o,s,l,c],h,{flush:`post`}),(0,a.onMounted)(h),(0,a.onBeforeUnmount)(()=>{for(let e of d.keys())p(e)})}var O=[`data-disabled`,`data-orientation`,`data-dragging`],k=[`onPointerenter`,`onPointerleave`],A=[`min`,`max`,`step`,`value`,`disabled`,`name`,`aria-labelledby`,`aria-label`,`aria-describedby`,`aria-errormessage`,`aria-details`,`aria-invalid`,`aria-valuetext`,`aria-orientation`,`onInput`,`onKeydown`,`onFocus`,`onBlur`],j=[`data-mark-index`],M=[`data-readout-index`],N={class:`d-slider__tooltip-content`},P=(0,a.defineComponent)({name:`DtSlider`,inheritAttrs:!1,__name:`Slider`,props:{modelValue:{type:[Number,Array],default:void 0,validator:e=>!Array.isArray(e)||e.length===2},min:{type:Number,default:0,validator:Number.isFinite},max:{type:Number,default:100,validator:Number.isFinite},step:{type:Number,default:1,validator:Number.isFinite},snapPoints:{type:[Number,Array],default:void 0,validator:e=>Number.isFinite(e)||Array.isArray(e)&&e.every(Number.isFinite)},disabled:{type:Boolean,default:!1},orientation:{type:String,default:`horizontal`,validator:e=>o.includes(e)},fillOrigin:{type:[Number,String],default:`start`,validator:e=>typeof e==`number`||c.includes(e)},showTicks:{type:[Boolean,Number],default:!1},minGapSteps:{type:Number,default:0},label:{type:String,default:``},showLabel:{type:Boolean,default:!0},labelSize:{type:[String,Number],default:null,validator:e=>t.TEXT_SIZE_MODIFIERS.label.includes(String(e))},labelStrength:{type:String,default:null,validator:e=>Object.keys(t.TEXT_STRENGTH_MODIFIERS).includes(e)},getValueText:{type:Function,default:null},prefix:{type:String,default:``},suffix:{type:String,default:``},name:{type:String,default:``},largeStep:{type:Number,default:10},bodyClass:{type:[String,Array,Object],default:``},labelClass:{type:[String,Array,Object],default:``},startClass:{type:[String,Array,Object],default:``},endClass:{type:[String,Array,Object],default:``},readout:{type:String,default:`tooltip`,validator:e=>s.includes(e)},readoutClass:{type:[String,Array,Object],default:``},showMarks:{type:[Array,Boolean],default:!1,validator:e=>typeof e==`boolean`||Array.isArray(e)&&e.every(i.isValidMark)}},emits:[`update:modelValue`,`change`,`focus`,`blur`],setup(t,{expose:r,emit:i}){let o=t,s=i,c=(0,a.useSlots)(),l=(0,a.useAttrs)(),u=`slider-label-${e.getUniqueString()}`,d=(0,a.ref)(null),h=(0,a.ref)([]),g=(0,a.ref)([]),v=(0,a.computed)(()=>Array.isArray(o.modelValue)),C=(0,a.computed)(()=>o.orientation===`vertical`),{isRtl:w}=p(d),{activeSnapValue:T,findMagneticSnapPoint:E}=_(o,{controlRef:d,isVertical:C}),{internalValues:P,lastCommittedValues:F,currentValue:I,decimalPlaces:L,snapToStep:R,thumbPercent:z,thumbNativeMin:B,thumbNativeMax:ee,thumbNativeStep:te,formatValue:V}=m(o,s,{isRange:v,activeSnapValue:T});function H(e){return e.some(e=>{if(typeof e==`string`)return e.trim()!==``;if(e.type===a.Comment)return!1;if(typeof e.children==`string`)return e.children.trim()!==``;if(Array.isArray(e.children))return H(e.children);if(e.children&&typeof e.children.default==`function`){let t=e.children.default();return H(Array.isArray(t)?t:[t])}return!1})}let ne=(0,a.computed)(()=>c.label?H(c.label({value:I.value})):!!o.label?.trim()),U=(0,a.computed)(()=>o.showLabel&&ne.value),W=(0,a.computed)(()=>U.value?u:l[`aria-labelledby`]),G=(0,a.computed)(()=>{if(!U.value)return!o.showLabel&&o.label?o.label:l[`aria-label`]}),re=(0,a.computed)(()=>U.value||!!(String(G.value??``).trim()||String(W.value??``).trim())),ie=(0,a.computed)(()=>o.labelSize??300),ae=[`aria-label`,`aria-labelledby`,`aria-describedby`,`aria-errormessage`,`aria-details`,`aria-invalid`],oe=(0,a.computed)(()=>{let t=e.removeClassStyleAttrs(l);return Object.fromEntries(Object.entries(t).filter(([e])=>!ae.includes(e)))}),{isDragging:K,activeThumbIndex:se,focusedThumbIndex:ce,onPointerDown:q,onPointerMove:J,onPointerUp:Y,onThumbInput:le,onThumbKeydown:ue,onThumbFocus:de,onThumbBlur:fe,onThumbHitPointerEnter:pe,onThumbHitPointerLeave:me,isReadoutOpen:he}=y(o,s,{controlRef:d,thumbRefs:h,internalValues:P,isRange:v,isVertical:C,decimalPlaces:L,snapToStep:R,lastCommittedValues:F,findMagneticSnapPoint:E,activeSnapValue:T,isRtl:w}),{computedTickValues:ge,computedMarks:X,reservesAnnotationSpace:_e}=x(o,{isVertical:C,thumbPercent:z}),{markElRefs:ve,readoutElRefs:ye,mergedReadoutElRef:be,tooltipElRefs:Z,markCollisionHidden:xe,readoutMerged:Q,markEdgeOffsetPx:Se,readoutEdgeOffsetPx:Ce,mergedReadoutEdgeOffsetPx:we,readoutVisibility:Te,formattedValues:Ee,updateCollisions:De}=S(o,{controlRef:d,isVertical:C,isRange:v,internalValues:P,thumbPercent:z,isRtl:w,isReadoutOpen:he,computedMarks:X,formatValue:V}),{thumbPositionStyle:$,tickPositionStyle:Oe,markStyle:ke,readoutStyle:Ae,mergedReadoutPct:je,mergedReadoutText:Me,indicatorStyle:Ne}=b(o,{isVertical:C,isRange:v,internalValues:P,thumbPercent:z,isRtl:w,markEdgeOffsetPx:Se,formatValue:V});function Pe(e){return e===o.min?`start`:e===o.max?`end`:null}D(o,{thumbVisualRefs:g,tooltipElRefs:Z,isVertical:C,isRtl:w,readoutVisibility:Te,formattedValues:Ee,onPosition:De}),f(o,{isRange:v,hasAccessibleName:re});function Fe(){h.value[0]?.focus()}function Ie(){h.value.find(e=>e===document.activeElement)?.blur()}return r({focus:Fe,blur:Ie}),(r,i)=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,(0,a.mergeProps)(oe.value,{class:[`d-slider`,r.$attrs.class,{"d-slider--disabled":t.disabled,"d-slider--vertical":C.value,"d-slider--inverted":t.fillOrigin===`end`,"d-slider--dragging":(0,a.unref)(K)}],style:r.$attrs.style,"data-disabled":t.disabled||void 0,"data-orientation":t.orientation,"data-dragging":(0,a.unref)(K)||void 0,"data-qa":`dt-slider`}),[t.showLabel?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:0,id:u,class:(0,a.normalizeClass)([`d-slider__label`,t.labelClass]),"data-qa":`dt-slider-label`},[(0,a.renderSlot)(r.$slots,`label`,{value:(0,a.unref)(I)},()=>[t.label?((0,a.openBlock)(),(0,a.createBlock)((0,a.unref)(n.t),{key:0,kind:`label`,size:ie.value,strength:t.labelStrength,tone:t.disabled?`disabled`:`secondary`},{default:(0,a.withCtx)(()=>[(0,a.createTextVNode)((0,a.toDisplayString)(t.label),1)]),_:1},8,[`size`,`strength`,`tone`])):(0,a.createCommentVNode)(``,!0)])],2)):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`div`,{class:(0,a.normalizeClass)([`d-slider__body`,t.bodyClass,{"d-slider__body--reserve-annotation-space":(0,a.unref)(_e)}]),"data-qa":`dt-slider-body`},[(0,a.unref)(e.hasSlotContent)(r.$slots.start)?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:0,class:(0,a.normalizeClass)([`d-slider__start`,t.startClass]),"data-qa":`dt-slider-start`},[(0,a.renderSlot)(r.$slots,`start`)],2)):(0,a.createCommentVNode)(``,!0),(0,a.createElementVNode)(`div`,{ref_key:`controlRef`,ref:d,class:`d-slider__control`,style:(0,a.normalizeStyle)(C.value?{touchAction:`pan-x`}:{touchAction:`pan-y`}),"data-qa":`dt-slider-control`,onPointerdown:i[0]||(i[0]=(...e)=>(0,a.unref)(q)&&(0,a.unref)(q)(...e)),onPointermove:i[1]||(i[1]=(...e)=>(0,a.unref)(J)&&(0,a.unref)(J)(...e)),onPointerup:i[2]||(i[2]=(...e)=>(0,a.unref)(Y)&&(0,a.unref)(Y)(...e)),onPointercancel:i[3]||(i[3]=(...e)=>(0,a.unref)(Y)&&(0,a.unref)(Y)(...e))},[i[4]||(i[4]=(0,a.createElementVNode)(`div`,{class:`d-slider__track`,"data-qa":`dt-slider-track`},null,-1)),(0,a.createElementVNode)(`div`,{class:`d-slider__indicator`,style:(0,a.normalizeStyle)((0,a.unref)(Ne)),"data-qa":`dt-slider-indicator`},null,4),t.showTicks?((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,{key:0},(0,a.renderList)((0,a.unref)(ge),(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:t,class:`d-slider__tick`,style:(0,a.normalizeStyle)((0,a.unref)(Oe)(e)),"data-qa":`dt-slider-tick`},null,4))),128)):(0,a.createCommentVNode)(``,!0),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)((0,a.unref)(P),(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:`thumb-visual-${t}`,ref_for:!0,ref:e=>{g.value[t]=e},class:(0,a.normalizeClass)([`d-slider__thumb-visual`,{"d-slider__thumb-visual--focused":(0,a.unref)(ce)===t,"d-slider__thumb-visual--active":(0,a.unref)(se)===t}]),style:(0,a.normalizeStyle)((0,a.unref)($)(e)),"data-qa":`dt-slider-thumb-visual`},null,6))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)((0,a.unref)(P),(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:`thumb-hit-${t}`,class:`d-slider__thumb-hit`,style:(0,a.normalizeStyle)({...(0,a.unref)($)(e),touchAction:C.value?`pan-x`:`pan-y`}),"data-qa":`dt-slider-thumb-hit`,onPointerenter:e=>(0,a.unref)(pe)(t),onPointerleave:e=>(0,a.unref)(me)(t)},null,44,k))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)((0,a.unref)(P),(e,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`input`,{key:`thumb-input-${n}`,ref_for:!0,ref:e=>{h.value[n]=e},type:`range`,class:`d-slider__thumb`,min:(0,a.unref)(B)(n),max:(0,a.unref)(ee)(n),step:(0,a.unref)(te)(n),value:e,disabled:t.disabled,name:t.name||void 0,"aria-labelledby":W.value,"aria-label":G.value,"aria-describedby":(0,a.unref)(l)[`aria-describedby`],"aria-errormessage":(0,a.unref)(l)[`aria-errormessage`],"aria-details":(0,a.unref)(l)[`aria-details`],"aria-invalid":(0,a.unref)(l)[`aria-invalid`],"aria-valuetext":(0,a.unref)(V)(e,n),"aria-orientation":C.value?`vertical`:void 0,"data-qa":`dt-slider-thumb`,onInput:e=>(0,a.unref)(le)(n,e),onKeydown:e=>(0,a.unref)(ue)(n,e),onFocus:e=>(0,a.unref)(de)(n,e),onBlur:e=>(0,a.unref)(fe)(n,e)},null,40,A))),128)),((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)((0,a.unref)(X),(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:`mark-${t}`,ref_for:!0,ref_key:`markElRefs`,ref:ve,class:(0,a.normalizeClass)([`d-slider__mark`,{"d-slider__mark--collision-hidden":(0,a.unref)(xe)[t]}]),style:(0,a.normalizeStyle)((0,a.unref)(ke)(e.pct,t,e.edge)),"data-mark-index":t,"data-qa":`dt-slider-mark`},(0,a.toDisplayString)(e.text),15,j))),128)),t.readout===`always`?((0,a.openBlock)(),(0,a.createElementBlock)(a.Fragment,{key:1},[((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,null,(0,a.renderList)((0,a.unref)(P),(e,n)=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:`readout-${n}`,ref_for:!0,ref_key:`readoutElRefs`,ref:ye,class:(0,a.normalizeClass)([`d-slider__readout`,(0,a.unref)(Q)?`d-slider__readout--hide`:`d-slider__readout--show`,t.readoutClass]),style:(0,a.normalizeStyle)((0,a.unref)(Ae)((0,a.unref)(z)(e),(0,a.unref)(Ce)[n],Pe(e))),"data-readout-index":n,"aria-hidden":`true`,"data-qa":`dt-slider-thumb-readout`},(0,a.toDisplayString)((0,a.unref)(V)(e,n)),15,M))),128)),(0,a.unref)(Q)?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:0,ref_key:`mergedReadoutElRef`,ref:be,class:(0,a.normalizeClass)([`d-slider__readout`,`d-slider__readout--show`,t.readoutClass]),style:(0,a.normalizeStyle)((0,a.unref)(Ae)((0,a.unref)(je),(0,a.unref)(we))),"aria-hidden":`true`,"data-qa":`dt-slider-thumb-readout-merged`},(0,a.toDisplayString)((0,a.unref)(Me)),7)):(0,a.createCommentVNode)(``,!0)],64)):(0,a.createCommentVNode)(``,!0),t.readout===`tooltip`?((0,a.openBlock)(!0),(0,a.createElementBlock)(a.Fragment,{key:2},(0,a.renderList)((0,a.unref)(P),(e,t)=>((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:`readout-tooltip-${t}`,ref_for:!0,ref:e=>{(0,a.unref)(Z)[t]=e},class:`d-tooltip d-slider__readout-tooltip`,popover:`manual`,inert:``,"aria-hidden":`true`,"data-qa":`dt-slider-thumb-readout-tooltip`},[(0,a.createElementVNode)(`span`,N,(0,a.toDisplayString)((0,a.unref)(V)(e,t)),1)]))),128)):(0,a.createCommentVNode)(``,!0)],36),(0,a.unref)(e.hasSlotContent)(r.$slots.end)?((0,a.openBlock)(),(0,a.createElementBlock)(`div`,{key:1,class:(0,a.normalizeClass)([`d-slider__end`,t.endClass]),"data-qa":`dt-slider-end`},[(0,a.renderSlot)(r.$slots,`end`)],2)):(0,a.createCommentVNode)(``,!0)],2)],16,O))}});Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return P}});
|
|
2
|
-
//# sourceMappingURL=Slider-BDgY7gNR.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Text-5MobHF6z.js","names":[],"sources":["../components/Text/modules/slide.js","../components/Text/modules/SlideViewport.vue","../components/Text/modules/SlideViewport.vue","../components/Text/Text.vue"],"sourcesContent":["// Private helpers for the DtText `slide` option. Framework-free: nothing here\n// touches Vue; only modules/SlideViewport.vue calls into it, and only when `slide` is on.\n\n// The item a user points at or tabs to: a link, a button, or an element with an item\n// role. Focusable regions (a scroll area with tabindex=\"0\", popover content with\n// tabindex=\"-1\") are not items; a row that should drive the reveal takes an item role.\nconst HOST_ROLES = ['button', 'link', 'listitem', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'tab', 'treeitem', 'row', 'gridcell'];\nconst HOST_SELECTOR = ['a[href]', 'button', 'summary', ...HOST_ROLES.map((role) => `[role=\"${role}\"]`)].join(',');\n\nconst DEFAULT_SPEED = 40; // px per second\nconst DEFAULT_DELAY = 500; // ms\n// ms, longest single movement. A reveal that crawls reads as broken, so `once` is capped\n// at 3 s; a loop is read while it moves and may take up to 5 s per cycle.\nconst MAX_MOVEMENT = { once: 3000, loop: 5000 };\n// A loop pauses 5 s between cycles and stops, resting at the start, after 3 cycles, so the\n// whole sequence is bounded (about 25 s at most) as well as each movement.\nexport const LOOP_HOLD = 5000;\nexport const MAX_LOOPS = 3;\n\n/**\n * The element whose hover/focus drives the slide: the closest item around\n * the text (button, link, menu item...) or the text itself.\n */\nexport function getSlideHost (el) {\n return el.closest(HOST_SELECTOR) || el;\n}\n\n// Keyboard focus only: a menu that focuses the hovered row, or a clicked button that\n// keeps focus, must not keep the label moving after the pointer leaves.\nfunction isKeyboardFocus (target) {\n try {\n return target.matches(':focus-visible');\n } catch {\n return true;\n }\n}\n\n/**\n * Listens on the host and calls onEnter when the first of pointer or focus\n * arrives, onLeave when both have left. Returns an unbind function.\n */\nexport function bindSlide ({ el, moveEl, onEnter, onLeave, onTransitionEnd }) {\n const host = getSlideHost(el);\n const state = { pointer: false, focus: false };\n const set = (key, value) => {\n const was = state.pointer || state.focus;\n state[key] = value;\n const active = state.pointer || state.focus;\n if (active !== was) (active ? onEnter : onLeave)();\n };\n const handlers = {\n pointerenter: () => set('pointer', true),\n pointerleave: () => set('pointer', false),\n focusin: (event) => isKeyboardFocus(event.target) && set('focus', true),\n focusout: (event) => host.contains(event.relatedTarget) || set('focus', false),\n };\n const transitionEnd = (event) => {\n if (event.target === moveEl && event.propertyName === 'transform') onTransitionEnd();\n };\n\n Object.entries(handlers).forEach(([name, fn]) => host.addEventListener(name, fn));\n moveEl.addEventListener('transitionend', transitionEnd);\n\n return () => {\n Object.entries(handlers).forEach(([name, fn]) => host.removeEventListener(name, fn));\n moveEl.removeEventListener('transitionend', transitionEnd);\n };\n}\n\n/**\n * Calls onEscape when Escape is pressed anywhere on the page: a row moving under the\n * pointer may not have focus. Listens in the capture phase so a focused control that\n * stops Escape cannot hide it; the event is not stopped. Returns a remove function.\n */\nexport function listenForEscape (el, onEscape) {\n const doc = el.ownerDocument;\n const keydown = (event) => event.key === 'Escape' && onEscape();\n doc.addEventListener('keydown', keydown, true);\n return () => doc.removeEventListener('keydown', keydown, true);\n}\n\n/**\n * Calls onChange while the item is active when the label's width or the room for it\n * changes: the text is edited to a different width, or the viewport is resized. A label\n * that changes at the same width (a running timer) is left alone, and the loop copy is\n * ignored. Returns a stop function.\n */\nexport function watchSlideChanges (viewport, content, onChange) {\n const copyOf = () => content.querySelector('.d-text__slide-copy');\n const labelWidth = () => content.scrollWidth - (copyOf()?.offsetWidth ?? 0);\n let width = viewport.clientWidth;\n let label = labelWidth();\n const resize = typeof ResizeObserver === 'function' && new ResizeObserver(() => {\n // the copy can widen a shrinkable flex row; loop remeasures before each cycle anyway\n if (copyOf() || viewport.clientWidth === width) return;\n width = viewport.clientWidth;\n onChange();\n });\n // Vue swaps a comment placeholder for the copy; neither is the label changing\n const ignored = (node) => node.nodeType === Node.COMMENT_NODE ||\n Boolean((node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement)?.closest('.d-text__slide-copy'));\n const mutation = new MutationObserver((records) => {\n const changed = records.some((record) => !ignored(record.target) &&\n (record.type === 'characterData' || [...record.addedNodes, ...record.removedNodes].some((node) => !ignored(node))));\n if (!changed || labelWidth() === label) return;\n label = labelWidth();\n onChange();\n });\n resize?.observe(viewport);\n mutation.observe(content, { childList: true, characterData: true, subtree: true });\n return () => {\n resize?.disconnect();\n mutation.disconnect();\n };\n}\n\nfunction parseTime (value, fallback) {\n const match = /^\\s*(-?\\d*\\.?\\d+)\\s*(ms|s)?\\s*$/.exec(value || '');\n if (!match) return fallback;\n const number = parseFloat(match[1]);\n return match[2] === 's' ? number * 1000 : number;\n}\n\n/**\n * Reads the public tuning custom properties from the element.\n */\nexport function readSlideConfig (el) {\n const style = getComputedStyle(el);\n const speed = parseFloat(style.getPropertyValue('--dt-text-slide-speed'));\n return {\n speed: speed > 0 ? speed : DEFAULT_SPEED,\n delay: Math.max(0, parseTime(style.getPropertyValue('--dt-text-slide-delay'), DEFAULT_DELAY)),\n };\n}\n\n/**\n * Duration in ms for one movement; long text moves faster instead of slower.\n */\nexport function getSlideDuration (distance, speed, mode) {\n return Math.min((distance / speed) * 1000, MAX_MOVEMENT[mode]);\n}\n\nexport function prefersReducedMotion () {\n return typeof window.matchMedia === 'function' &&\n window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n}\n","<template>\n <span\n ref=\"viewportEl\"\n :class=\"viewportClasses\"\n :style=\"viewportStyles\"\n >\n <span\n ref=\"contentEl\"\n class=\"d-text__slide-content\"\n >\n <slot />\n <!-- loop only: filled with a static clone of the text while it moves -->\n <span\n v-if=\"hasCopy\"\n ref=\"copyEl\"\n aria-hidden=\"true\"\n inert\n class=\"d-text__slide-copy\"\n />\n </span>\n </span>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n nextTick,\n onActivated,\n onBeforeUnmount,\n onDeactivated,\n onMounted,\n ref,\n watch,\n} from 'vue';\nimport { TEXT_SLIDE_MODES } from '../TextConstants';\nimport {\n bindSlide,\n getSlideDuration,\n listenForEscape,\n prefersReducedMotion,\n readSlideConfig,\n watchSlideChanges,\n LOOP_HOLD,\n MAX_LOOPS,\n} from './slide';\n\n/** @typedef {'rest' | 'waiting' | 'moving' | 'at-end' | 'at-start'} SlidePhase */\n\n// Internal to DtText: rendered only when `slide` is on, so plain text carries no slide state.\n// The outer span clips and fades the text; only the inner span moves, with transform.\ndefineOptions({ name: 'DtTextSlideViewport' });\n\nconst props = defineProps({\n // 'once' or 'loop'\n mode: {\n type: String,\n required: true,\n validator: (value) => TEXT_SLIDE_MODES.includes(value),\n },\n});\n\nconst viewportEl = ref(null);\nconst contentEl = ref(null);\nconst copyEl = ref(null);\n\n/** @type {import('vue').Ref<SlidePhase>} */\nconst phase = ref('rest');\nconst offset = ref(0);\nconst duration = ref(0);\nconst hasCopy = ref(false);\nconst loopWrap = ref(false);\n\n/**\n * Non-reactive bookkeeping.\n * @type {{ unbind: (() => void) | null, stopActive: Array<() => void>, timers: number[],\n * distance: number, restWidth: number, loops: number }}\n */\nconst runtime = { unbind: null, stopActive: [], timers: [], distance: 0, restWidth: 0, loops: 0 };\n\nconst viewportClasses = computed(() => ['d-text__slide', {\n 'd-text__slide--moving': phase.value === 'moving',\n 'd-text__slide--end': phase.value === 'at-end',\n 'd-text__slide--loop': phase.value === 'moving' && hasCopy.value,\n 'd-text__slide--loop-wrap': loopWrap.value,\n}]);\n\nconst viewportStyles = computed(() => (phase.value === 'rest'\n ? undefined\n : { '--_slide-offset': `${offset.value}px`, '--_slide-duration': `${duration.value}ms` }));\n\nconst viewport = () => viewportEl.value;\nconst content = () => contentEl.value;\n\nfunction bind () {\n unbind();\n runtime.unbind = bindSlide({\n // the DtText root: the host is the item around it, or the text itself\n el: viewport().parentElement,\n moveEl: content(),\n onEnter: activate,\n onLeave: deactivate,\n onTransitionEnd: moveDone,\n });\n}\n\nfunction unbind () {\n runtime.unbind?.();\n runtime.unbind = null;\n deactivate();\n}\n\n// the item is hovered or keyboard-focused: watch for Escape and for changes until it is left\nfunction activate () {\n runtime.stopActive = [\n listenForEscape(viewport(), deactivate),\n // a new label width or more room: start again from rest with fresh widths\n watchSlideChanges(viewport(), content(), () => {\n reset();\n enter();\n }),\n ];\n enter();\n}\n\n// left, Escape or unmounted: stop watching and snap back\nfunction deactivate () {\n runtime.stopActive.forEach((stop) => stop());\n runtime.stopActive = [];\n reset();\n}\n\nfunction after (ms, fn) {\n runtime.timers.push(setTimeout(fn, ms));\n}\n\nfunction clearTimers () {\n runtime.timers.forEach(clearTimeout);\n runtime.timers = [];\n}\n\n// snap to rest, no reverse animation\n/** @param {SlidePhase} next */\nfunction reset (next = 'rest') {\n clearTimers();\n phase.value = next;\n offset.value = 0;\n duration.value = 0;\n hasCopy.value = false;\n loopWrap.value = false;\n}\n\n// measures the label before each cycle (it may change during a hold); false when it fits\nfunction measure () {\n const el = content();\n runtime.distance = el.scrollWidth - el.clientWidth;\n runtime.restWidth = el.scrollWidth;\n return runtime.distance > 0;\n}\n\nfunction enter () {\n if (phase.value !== 'rest' || !measure()) {\n return;\n }\n\n runtime.loops = 0;\n phase.value = 'waiting';\n after(readSlideConfig(viewport()).delay, start);\n}\n\nfunction start () {\n if (prefersReducedMotion()) {\n phase.value = 'at-end';\n offset.value = runtime.distance;\n } else if (props.mode === 'loop') {\n loop();\n } else {\n move(runtime.distance);\n }\n}\n\nfunction move (to) {\n const time = getSlideDuration(Math.abs(to - offset.value), readSlideConfig(viewport()).speed, props.mode);\n clearTimers();\n phase.value = 'moving';\n offset.value = to;\n duration.value = time;\n // in case transitionend does not fire\n after(time + 100, moveDone);\n return time;\n}\n\nasync function loop () {\n if (!measure()) {\n return;\n }\n // the copy has to be in the DOM to measure the full wrap-around distance\n hasCopy.value = true;\n await nextTick();\n const el = content();\n const copy = copyEl.value;\n if (!hasCopy.value || !copy) {\n return;\n }\n // a static clone, cleaned while detached: slot components do not mount twice, and no ids,\n // form values, radio groups, validation or tab stops repeat\n const original = [...el.childNodes].filter((node) => node !== copy);\n const clone = el.ownerDocument.createDocumentFragment();\n clone.append(...original.map((node) => node.cloneNode(true)));\n clone.querySelectorAll('[id], [name]').forEach((node) => {\n node.removeAttribute('id');\n node.removeAttribute('name');\n });\n clone.querySelectorAll('input, select, textarea, button').forEach((node) => {\n node.disabled = true;\n });\n copy.replaceChildren(clone);\n const { restWidth } = runtime;\n const distance = el.scrollWidth - restWidth;\n const time = move(distance);\n runtime.loops += 1;\n // the start edge fades while the text slides out, then clears once the gap is\n // half past it, before the copy arrives (the scroll is linear, so time = distance)\n const gap = parseFloat(getComputedStyle(copy).paddingInlineStart) || 0;\n after(time * (restWidth + gap / 2) / distance, () => { loopWrap.value = true; });\n}\n\nfunction moveDone () {\n if (phase.value !== 'moving') {\n return;\n }\n if (props.mode !== 'loop') {\n clearTimers();\n phase.value = 'at-end';\n return;\n }\n // the copy now sits exactly where the text began, so snap back unseen; stop after MAX_LOOPS\n reset('at-start');\n if (runtime.loops < MAX_LOOPS) {\n after(LOOP_HOLD, loop);\n }\n}\n\n// a sequence started in the old mode can end on the loop copy: start again from rest\nwatch(() => props.mode, async () => {\n if (!runtime.stopActive.length) {\n return;\n }\n reset();\n // measure once the loop copy has left the DOM\n await nextTick();\n if (runtime.stopActive.length) {\n enter();\n }\n});\n\nonMounted(bind);\nonBeforeUnmount(unbind);\n// inside KeepAlive the host can vanish without a pointerleave or focusout\nonActivated(bind);\nonDeactivated(unbind);\n</script>\n","<template>\n <span\n ref=\"viewportEl\"\n :class=\"viewportClasses\"\n :style=\"viewportStyles\"\n >\n <span\n ref=\"contentEl\"\n class=\"d-text__slide-content\"\n >\n <slot />\n <!-- loop only: filled with a static clone of the text while it moves -->\n <span\n v-if=\"hasCopy\"\n ref=\"copyEl\"\n aria-hidden=\"true\"\n inert\n class=\"d-text__slide-copy\"\n />\n </span>\n </span>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n nextTick,\n onActivated,\n onBeforeUnmount,\n onDeactivated,\n onMounted,\n ref,\n watch,\n} from 'vue';\nimport { TEXT_SLIDE_MODES } from '../TextConstants';\nimport {\n bindSlide,\n getSlideDuration,\n listenForEscape,\n prefersReducedMotion,\n readSlideConfig,\n watchSlideChanges,\n LOOP_HOLD,\n MAX_LOOPS,\n} from './slide';\n\n/** @typedef {'rest' | 'waiting' | 'moving' | 'at-end' | 'at-start'} SlidePhase */\n\n// Internal to DtText: rendered only when `slide` is on, so plain text carries no slide state.\n// The outer span clips and fades the text; only the inner span moves, with transform.\ndefineOptions({ name: 'DtTextSlideViewport' });\n\nconst props = defineProps({\n // 'once' or 'loop'\n mode: {\n type: String,\n required: true,\n validator: (value) => TEXT_SLIDE_MODES.includes(value),\n },\n});\n\nconst viewportEl = ref(null);\nconst contentEl = ref(null);\nconst copyEl = ref(null);\n\n/** @type {import('vue').Ref<SlidePhase>} */\nconst phase = ref('rest');\nconst offset = ref(0);\nconst duration = ref(0);\nconst hasCopy = ref(false);\nconst loopWrap = ref(false);\n\n/**\n * Non-reactive bookkeeping.\n * @type {{ unbind: (() => void) | null, stopActive: Array<() => void>, timers: number[],\n * distance: number, restWidth: number, loops: number }}\n */\nconst runtime = { unbind: null, stopActive: [], timers: [], distance: 0, restWidth: 0, loops: 0 };\n\nconst viewportClasses = computed(() => ['d-text__slide', {\n 'd-text__slide--moving': phase.value === 'moving',\n 'd-text__slide--end': phase.value === 'at-end',\n 'd-text__slide--loop': phase.value === 'moving' && hasCopy.value,\n 'd-text__slide--loop-wrap': loopWrap.value,\n}]);\n\nconst viewportStyles = computed(() => (phase.value === 'rest'\n ? undefined\n : { '--_slide-offset': `${offset.value}px`, '--_slide-duration': `${duration.value}ms` }));\n\nconst viewport = () => viewportEl.value;\nconst content = () => contentEl.value;\n\nfunction bind () {\n unbind();\n runtime.unbind = bindSlide({\n // the DtText root: the host is the item around it, or the text itself\n el: viewport().parentElement,\n moveEl: content(),\n onEnter: activate,\n onLeave: deactivate,\n onTransitionEnd: moveDone,\n });\n}\n\nfunction unbind () {\n runtime.unbind?.();\n runtime.unbind = null;\n deactivate();\n}\n\n// the item is hovered or keyboard-focused: watch for Escape and for changes until it is left\nfunction activate () {\n runtime.stopActive = [\n listenForEscape(viewport(), deactivate),\n // a new label width or more room: start again from rest with fresh widths\n watchSlideChanges(viewport(), content(), () => {\n reset();\n enter();\n }),\n ];\n enter();\n}\n\n// left, Escape or unmounted: stop watching and snap back\nfunction deactivate () {\n runtime.stopActive.forEach((stop) => stop());\n runtime.stopActive = [];\n reset();\n}\n\nfunction after (ms, fn) {\n runtime.timers.push(setTimeout(fn, ms));\n}\n\nfunction clearTimers () {\n runtime.timers.forEach(clearTimeout);\n runtime.timers = [];\n}\n\n// snap to rest, no reverse animation\n/** @param {SlidePhase} next */\nfunction reset (next = 'rest') {\n clearTimers();\n phase.value = next;\n offset.value = 0;\n duration.value = 0;\n hasCopy.value = false;\n loopWrap.value = false;\n}\n\n// measures the label before each cycle (it may change during a hold); false when it fits\nfunction measure () {\n const el = content();\n runtime.distance = el.scrollWidth - el.clientWidth;\n runtime.restWidth = el.scrollWidth;\n return runtime.distance > 0;\n}\n\nfunction enter () {\n if (phase.value !== 'rest' || !measure()) {\n return;\n }\n\n runtime.loops = 0;\n phase.value = 'waiting';\n after(readSlideConfig(viewport()).delay, start);\n}\n\nfunction start () {\n if (prefersReducedMotion()) {\n phase.value = 'at-end';\n offset.value = runtime.distance;\n } else if (props.mode === 'loop') {\n loop();\n } else {\n move(runtime.distance);\n }\n}\n\nfunction move (to) {\n const time = getSlideDuration(Math.abs(to - offset.value), readSlideConfig(viewport()).speed, props.mode);\n clearTimers();\n phase.value = 'moving';\n offset.value = to;\n duration.value = time;\n // in case transitionend does not fire\n after(time + 100, moveDone);\n return time;\n}\n\nasync function loop () {\n if (!measure()) {\n return;\n }\n // the copy has to be in the DOM to measure the full wrap-around distance\n hasCopy.value = true;\n await nextTick();\n const el = content();\n const copy = copyEl.value;\n if (!hasCopy.value || !copy) {\n return;\n }\n // a static clone, cleaned while detached: slot components do not mount twice, and no ids,\n // form values, radio groups, validation or tab stops repeat\n const original = [...el.childNodes].filter((node) => node !== copy);\n const clone = el.ownerDocument.createDocumentFragment();\n clone.append(...original.map((node) => node.cloneNode(true)));\n clone.querySelectorAll('[id], [name]').forEach((node) => {\n node.removeAttribute('id');\n node.removeAttribute('name');\n });\n clone.querySelectorAll('input, select, textarea, button').forEach((node) => {\n node.disabled = true;\n });\n copy.replaceChildren(clone);\n const { restWidth } = runtime;\n const distance = el.scrollWidth - restWidth;\n const time = move(distance);\n runtime.loops += 1;\n // the start edge fades while the text slides out, then clears once the gap is\n // half past it, before the copy arrives (the scroll is linear, so time = distance)\n const gap = parseFloat(getComputedStyle(copy).paddingInlineStart) || 0;\n after(time * (restWidth + gap / 2) / distance, () => { loopWrap.value = true; });\n}\n\nfunction moveDone () {\n if (phase.value !== 'moving') {\n return;\n }\n if (props.mode !== 'loop') {\n clearTimers();\n phase.value = 'at-end';\n return;\n }\n // the copy now sits exactly where the text began, so snap back unseen; stop after MAX_LOOPS\n reset('at-start');\n if (runtime.loops < MAX_LOOPS) {\n after(LOOP_HOLD, loop);\n }\n}\n\n// a sequence started in the old mode can end on the loop copy: start again from rest\nwatch(() => props.mode, async () => {\n if (!runtime.stopActive.length) {\n return;\n }\n reset();\n // measure once the loop copy has left the DOM\n await nextTick();\n if (runtime.stopActive.length) {\n enter();\n }\n});\n\nonMounted(bind);\nonBeforeUnmount(unbind);\n// inside KeepAlive the host can vanish without a pointerleave or focusout\nonActivated(bind);\nonDeactivated(unbind);\n</script>\n","<template>\n <component\n :is=\"as\"\n data-qa=\"dt-text\"\n :class=\"textClasses\"\n :style=\"textStyles\"\n >\n <!-- the slide state lives in this child, so plain text carries none -->\n <dt-text-slide-viewport\n v-if=\"slideMode\"\n :mode=\"slideMode\"\n >\n <!-- @slot Default slot for text content -->\n <slot />\n </dt-text-slide-viewport>\n <slot v-else />\n </component>\n</template>\n\n<script>\nimport {\n TEXT_KIND_MODIFIERS,\n TEXT_VARIANT_MODIFIERS,\n TEXT_SIZE_MODIFIERS,\n TEXT_SIZE_MAP,\n TEXT_HEADLINE_ONLY_SIZES,\n TEXT_FONT_SIZE_MODIFIERS,\n TEXT_FAMILY_MODIFIERS,\n TEXT_ITALIC_CLASS,\n TEXT_ALIGN_MODIFIERS,\n TEXT_TONE_MODIFIERS,\n TEXT_NUMERIC_CLASS,\n TEXT_TRUNCATE_CLASS,\n TEXT_LINE_CLAMP_CLASS,\n TEXT_WRAP_MODIFIERS,\n TEXT_BOX_TRIM_MODIFIERS,\n TEXT_STRENGTH_MODIFIERS,\n TEXT_DENSITY_MODIFIERS,\n TEXT_SLIDE_MODES,\n} from './TextConstants';\nimport DtTextSlideViewport from './modules/SlideViewport.vue';\n\nconst DEFAULT_SIZE = '300';\nconst SEMANTIC_HEADING_ELEMENTS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];\n\n// Module-level flag to emit info only once per session\nlet hasEmittedHeadlineSemanticInfo = false;\nlet hasWarnedSlideConflict = false;\n\n// Exported for testing purposes only\nexport const resetHeadlineSemanticInfoFlag = () => {\n hasEmittedHeadlineSemanticInfo = false;\n};\n\n/**\n * Dialtone text primitive that applies typography tokens based on semantic props.\n * @see https://dialtone.dialpad.com/components/text.html\n */\nexport default {\n name: 'DtText',\n\n components: { DtTextSlideViewport },\n\n props: {\n /**\n * HTML tag or component used for rendering.\n * @values span, p, strong, h1, h2, h3, h4, h5, h6, label, div, component\n */\n as: {\n type: String,\n default: 'span',\n },\n\n /**\n * Typography kind mapping to headline/body/label/code token sets.\n * @values headline, body, label, code\n * @deprecated Use variant instead\n */\n kind: {\n type: String,\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_KIND_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Typography variant mapping to a complete token-backed composition.\n * @values headline-3xl, headline-2xl, headline-xl, headline-lg, headline-md, headline-sm, headline-xs, body-lg, body-md, body-sm, body-xs, label-lg, label-md, label-sm, label-xs, code-lg, code-md, code-sm, code-xs\n */\n variant: {\n type: String,\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_VARIANT_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Raw font-size token. Must be paired with `variant` for overrides or legacy `kind` for composition size.\n * @values 50, 75, 100, 125, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800\n */\n size: {\n type: [String, Number],\n default: null,\n },\n\n /**\n * Overrides font-family. By default, no font-family class is emitted and text inherits naturally.\n * @values inherit, custom, sans, mono, expressive\n */\n family: {\n type: String,\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_FAMILY_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Applies italic font style when true.\n */\n italic: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Semantic foreground color.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n tone: {\n type: String,\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_TONE_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Logical text alignment. Requires block/inline-block context.\n * @values start, center, end, justify\n */\n align: {\n type: String,\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_ALIGN_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Enables single-line truncation (i.e. ellipsis) when true; requires block/inline-block context.\n */\n truncate: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Applies multi-line truncation (i.e. clamp) when greater than zero; requires block/inline-block context.\n */\n maxLines: {\n type: Number,\n default: null,\n validator: (value) => {\n return value === null || (Number.isInteger(value) && value > 0);\n },\n },\n\n /**\n * Renders numeric content with tabular figures.\n */\n numeric: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls text wrapping behavior.\n * @values wrap, nowrap, balance, pretty\n */\n wrap: {\n type: String,\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_WRAP_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Controls text-box-trim (leading space above/below text). Useful for tight component layouts.\n * @values start, end, both\n */\n textBoxTrim: {\n type: String,\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_BOX_TRIM_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Overrides font-weight. Applies to any kind/size combination.\n * @values bold, semibold, medium, normal\n */\n strength: {\n type: String,\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_STRENGTH_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Overrides line-height. Applies to any kind/size combination.\n * @values 100, 200, 300, 400, 500, 600\n */\n density: {\n type: [String, Number],\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_DENSITY_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Slides overflowing single-line text into view while the text, or the item around it\n * (button, link, menu item), is hovered or has keyboard focus. `true` is the same as `once`.\n * Renders as a block and replaces `truncate`, `maxLines` and `wrap`. Tune with the\n * `--dt-text-slide-*` CSS custom properties listed in the DtText docs.\n * @values true, false, once, loop\n */\n slide: {\n type: [Boolean, String],\n default: false,\n validator: (value) => {\n return typeof value === 'boolean' || TEXT_SLIDE_MODES.includes(value);\n },\n },\n },\n\n computed: {\n textClasses() {\n const classes = ['d-text'];\n const variantClass = this.getVariantClass();\n if (variantClass) {\n classes.push(variantClass);\n }\n\n const fontSizeClass = this.getFontSizeClass();\n if (fontSizeClass) {\n classes.push(fontSizeClass);\n }\n\n const familyClass = this.getFamilyClass();\n if (familyClass) {\n classes.push(familyClass);\n }\n\n if (this.italic) {\n classes.push(TEXT_ITALIC_CLASS);\n }\n\n const alignClass = this.getAlignClass();\n if (alignClass) {\n classes.push(alignClass);\n }\n\n const toneClass = this.getToneClass();\n if (toneClass) {\n classes.push(toneClass);\n }\n\n if (this.slideMode) {\n classes.push('d-text--slide');\n } else if (this.truncate) {\n classes.push(TEXT_TRUNCATE_CLASS);\n }\n\n if (this.numeric) {\n classes.push(TEXT_NUMERIC_CLASS);\n }\n\n if (this.maxLines && !this.slideMode) {\n classes.push(TEXT_LINE_CLAMP_CLASS);\n }\n\n const wrapClass = this.slideMode ? null : this.getWrapClass();\n if (wrapClass) {\n classes.push(wrapClass);\n }\n\n const textBoxTrimClass = this.getTextBoxTrimClass();\n if (textBoxTrimClass) {\n classes.push(textBoxTrimClass);\n }\n\n const strengthClass = this.getStrengthClass();\n if (strengthClass) {\n classes.push(strengthClass);\n }\n\n const densityClass = this.getDensityClass();\n if (densityClass) {\n classes.push(densityClass);\n }\n\n return classes;\n },\n\n textStyles() {\n if (!this.maxLines || this.slideMode) {\n return undefined;\n }\n\n return {\n '--dt-text-line-clamp': this.maxLines,\n };\n },\n\n slideMode() {\n if (TEXT_SLIDE_MODES.includes(this.slide)) {\n return this.slide;\n }\n return this.slide ? 'once' : null;\n },\n },\n\n mounted() {\n if (this.slideMode && !hasWarnedSlideConflict && (this.maxLines || this.wrap)) {\n // eslint-disable-next-line no-console\n console.warn('[DtText] slide ignores maxLines and wrap.');\n hasWarnedSlideConflict = true;\n }\n\n // Emit info once per session when headline is used without semantic heading element\n if (\n !hasEmittedHeadlineSemanticInfo &&\n this.usesHeadlineVisualStyle() &&\n !SEMANTIC_HEADING_ELEMENTS.includes(this.as)\n ) {\n console.info(\n '[DtText] A headline text style is used without a semantic heading element. ' +\n 'Consider using as=\"h1|h2|h3|h4|h5|h6\" for better accessibility.',\n );\n hasEmittedHeadlineSemanticInfo = true;\n }\n },\n\n methods: {\n usesHeadlineVisualStyle() {\n if (this.variant) {\n return this.variant.startsWith('headline-');\n }\n\n return this.kind === 'headline';\n },\n\n usesLegacyKindSize() {\n return Boolean(this.kind && !this.variant);\n },\n\n getVariantClass() {\n if (this.variant) {\n return this.getModifierClass(\n this.variant,\n TEXT_VARIANT_MODIFIERS,\n 'variant',\n );\n }\n\n if (!this.kind) {\n return null;\n }\n\n if (\n !Object.prototype.hasOwnProperty.call(TEXT_KIND_MODIFIERS, this.kind)\n ) {\n console.warn(`[DtText] Unsupported kind \"${this.kind}\".`);\n return null;\n }\n\n const allowedSizes = TEXT_SIZE_MODIFIERS[this.kind] || [];\n const rawSize = this.size != null ? String(this.size) : null;\n const requestedSize = rawSize || DEFAULT_SIZE;\n let resolvedSize = requestedSize;\n\n if (!allowedSizes.includes(requestedSize)) {\n // Headline-only sizes (3xl, 2xl, xl, 500, 600, 700) throw an error when used with incompatible kinds\n if (TEXT_HEADLINE_ONLY_SIZES.includes(requestedSize)) {\n throw new Error(\n `[DtText] size=\"${requestedSize}\" is only valid for kind=\"headline\". ` +\n `Cannot use with kind=\"${this.kind}\".`,\n );\n }\n\n // Universal sizes fall back gracefully with a warning\n const fallbackSize = allowedSizes.includes(DEFAULT_SIZE)\n ? DEFAULT_SIZE\n : allowedSizes[0];\n if (fallbackSize) {\n resolvedSize = fallbackSize;\n }\n console.warn(\n `[DtText] size=\"${requestedSize}\" is not valid for kind=\"${this.kind}\". Using \"${resolvedSize}\" instead.`,\n );\n }\n\n if (!resolvedSize) {\n return null;\n }\n\n // Map numeric sizes to t-shirt CSS class suffix\n const cssSuffix = TEXT_SIZE_MAP[resolvedSize] || resolvedSize;\n return `${TEXT_KIND_MODIFIERS[this.kind]}--${cssSuffix}`;\n },\n\n getFontSizeClass() {\n if (this.size === null || this.size === undefined) {\n return null;\n }\n\n if (!this.variant && !this.kind) {\n console.warn(\n '[DtText] size must be paired with variant or legacy kind. ' +\n 'Prefer variant for typography composition; use size only as a variant override.',\n );\n return null;\n }\n\n if (this.usesLegacyKindSize()) {\n return null;\n }\n\n const size = String(this.size);\n const className = TEXT_FONT_SIZE_MODIFIERS[size];\n if (className) {\n return className;\n }\n\n console.warn(\n `[DtText] Unsupported size \"${size}\". Use a numeric font-size token.`,\n );\n return null;\n },\n\n getModifierClass(value, modifiers, propName) {\n if (value === null || value === undefined) {\n return null;\n }\n\n const className = modifiers[value];\n if (!className) {\n console.warn(`[DtText] Unsupported ${propName} \"${value}\".`);\n return null;\n }\n\n return className;\n },\n\n getAlignClass() {\n return this.getModifierClass(this.align, TEXT_ALIGN_MODIFIERS, 'align');\n },\n\n getToneClass() {\n return this.getModifierClass(this.tone, TEXT_TONE_MODIFIERS, 'tone');\n },\n\n getWrapClass() {\n return this.getModifierClass(this.wrap, TEXT_WRAP_MODIFIERS, 'wrap');\n },\n\n getTextBoxTrimClass() {\n return this.getModifierClass(\n this.textBoxTrim,\n TEXT_BOX_TRIM_MODIFIERS,\n 'textBoxTrim',\n );\n },\n\n getStrengthClass() {\n return this.getModifierClass(\n this.strength,\n TEXT_STRENGTH_MODIFIERS,\n 'strength',\n );\n },\n\n getDensityClass() {\n return this.getModifierClass(\n this.density,\n TEXT_DENSITY_MODIFIERS,\n 'density',\n );\n },\n\n getFamilyClass() {\n return this.getModifierClass(\n this.family,\n TEXT_FAMILY_MODIFIERS,\n 'family',\n );\n },\n },\n};\n</script>\n"],"mappings":";;;;AAOA,IAAM,IAAgB;CAAC;CAAW;CAAU;CAAW,GADpC;EAAC;EAAU;EAAQ;EAAY;EAAY;EAAoB;EAAiB;EAAU;EAAO;EAA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E,EAAA,YAAW;EAClB,OAAK,EAAE,EAAA,WAAU;;mBASO,CALjB,EAAA,aAAA,GAAA,EADR,EAMyB,GAAA;;GAJtB,MAAM,EAAA;;oBAGC,CAAR,EAAQ,EAAA,QAAA,UAAA,CAAA,CAAA;;qBAEV,EAAe,EAAA,QAAA,WAAA,EAAA,KAAA,GAAA,CAAA,CAAA,CAAA"}
|
package/dist/Text-DNVNZree.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
require(`./chunk-Bmb41Sf3.cjs`);const e=require(`./_plugin-vue_export-helper-D8jCH6HB.cjs`),t=require(`./lib/text/text-constants.cjs`);let n=require(`vue`);var r=[`a[href]`,`button`,`summary`,...[`button`,`link`,`listitem`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`tab`,`treeitem`,`row`,`gridcell`].map(e=>`[role="${e}"]`)].join(`,`),i=40,a=500,o={once:3e3,loop:5e3},s=5e3;function c(e){return e.closest(r)||e}function l(e){try{return e.matches(`:focus-visible`)}catch{return!0}}function u({el:e,moveEl:t,onEnter:n,onLeave:r,onTransitionEnd:i}){let a=c(e),o={pointer:!1,focus:!1},s=(e,t)=>{let i=o.pointer||o.focus;o[e]=t;let a=o.pointer||o.focus;a!==i&&(a?n:r)()},u={pointerenter:()=>s(`pointer`,!0),pointerleave:()=>s(`pointer`,!1),focusin:e=>l(e.target)&&s(`focus`,!0),focusout:e=>a.contains(e.relatedTarget)||s(`focus`,!1)},d=e=>{e.target===t&&e.propertyName===`transform`&&i()};return Object.entries(u).forEach(([e,t])=>a.addEventListener(e,t)),t.addEventListener(`transitionend`,d),()=>{Object.entries(u).forEach(([e,t])=>a.removeEventListener(e,t)),t.removeEventListener(`transitionend`,d)}}function d(e,t){let n=e.ownerDocument,r=e=>e.key===`Escape`&&t();return n.addEventListener(`keydown`,r,!0),()=>n.removeEventListener(`keydown`,r,!0)}function f(e,t,n){let r=()=>t.querySelector(`.d-text__slide-copy`),i=()=>t.scrollWidth-(r()?.offsetWidth??0),a=e.clientWidth,o=i(),s=typeof ResizeObserver==`function`&&new ResizeObserver(()=>{r()||e.clientWidth===a||(a=e.clientWidth,n())}),c=e=>e.nodeType===Node.COMMENT_NODE||!!(e.nodeType===Node.ELEMENT_NODE?e:e.parentElement)?.closest(`.d-text__slide-copy`),l=new MutationObserver(e=>{!e.some(e=>!c(e.target)&&(e.type===`characterData`||[...e.addedNodes,...e.removedNodes].some(e=>!c(e))))||i()===o||(o=i(),n())});return s?.observe(e),l.observe(t,{childList:!0,characterData:!0,subtree:!0}),()=>{s?.disconnect(),l.disconnect()}}function p(e,t){let n=/^\s*(-?\d*\.?\d+)\s*(ms|s)?\s*$/.exec(e||``);if(!n)return t;let r=parseFloat(n[1]);return n[2]===`s`?r*1e3:r}function m(e){let t=getComputedStyle(e),n=parseFloat(t.getPropertyValue(`--dt-text-slide-speed`));return{speed:n>0?n:i,delay:Math.max(0,p(t.getPropertyValue(`--dt-text-slide-delay`),a))}}function h(e,t,n){return Math.min(e/t*1e3,o[n])}function g(){return typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}var _=(0,n.defineComponent)({name:`DtTextSlideViewport`,__name:`SlideViewport`,props:{mode:{type:String,required:!0,validator:e=>t.TEXT_SLIDE_MODES.includes(e)}},setup(e){let t=e,r=(0,n.ref)(null),i=(0,n.ref)(null),a=(0,n.ref)(null),o=(0,n.ref)(`rest`),c=(0,n.ref)(0),l=(0,n.ref)(0),p=(0,n.ref)(!1),_=(0,n.ref)(!1),v={unbind:null,stopActive:[],timers:[],distance:0,restWidth:0,loops:0},y=(0,n.computed)(()=>[`d-text__slide`,{"d-text__slide--moving":o.value===`moving`,"d-text__slide--end":o.value===`at-end`,"d-text__slide--loop":o.value===`moving`&&p.value,"d-text__slide--loop-wrap":_.value}]),b=(0,n.computed)(()=>o.value===`rest`?void 0:{"--_slide-offset":`${c.value}px`,"--_slide-duration":`${l.value}ms`}),x=()=>r.value,S=()=>i.value;function C(){w(),v.unbind=u({el:x().parentElement,moveEl:S(),onEnter:T,onLeave:E,onTransitionEnd:F})}function w(){v.unbind?.(),v.unbind=null,E()}function T(){v.stopActive=[d(x(),E),f(x(),S(),()=>{k(),j()})],j()}function E(){v.stopActive.forEach(e=>e()),v.stopActive=[],k()}function D(e,t){v.timers.push(setTimeout(t,e))}function O(){v.timers.forEach(clearTimeout),v.timers=[]}function k(e=`rest`){O(),o.value=e,c.value=0,l.value=0,p.value=!1,_.value=!1}function A(){let e=S();return v.distance=e.scrollWidth-e.clientWidth,v.restWidth=e.scrollWidth,v.distance>0}function j(){o.value!==`rest`||!A()||(v.loops=0,o.value=`waiting`,D(m(x()).delay,M))}function M(){g()?(o.value=`at-end`,c.value=v.distance):t.mode===`loop`?P():N(v.distance)}function N(e){let n=h(Math.abs(e-c.value),m(x()).speed,t.mode);return O(),o.value=`moving`,c.value=e,l.value=n,D(n+100,F),n}async function P(){if(!A())return;p.value=!0,await(0,n.nextTick)();let e=S(),t=a.value;if(!p.value||!t)return;let r=[...e.childNodes].filter(e=>e!==t),i=e.ownerDocument.createDocumentFragment();i.append(...r.map(e=>e.cloneNode(!0))),i.querySelectorAll(`[id], [name]`).forEach(e=>{e.removeAttribute(`id`),e.removeAttribute(`name`)}),i.querySelectorAll(`input, select, textarea, button`).forEach(e=>{e.disabled=!0}),t.replaceChildren(i);let{restWidth:o}=v,s=e.scrollWidth-o,c=N(s);v.loops+=1,D(c*(o+(parseFloat(getComputedStyle(t).paddingInlineStart)||0)/2)/s,()=>{_.value=!0})}function F(){if(o.value===`moving`){if(t.mode!==`loop`){O(),o.value=`at-end`;return}k(`at-start`),v.loops<3&&D(s,P)}}return(0,n.watch)(()=>t.mode,async()=>{v.stopActive.length&&(k(),await(0,n.nextTick)(),v.stopActive.length&&j())}),(0,n.onMounted)(C),(0,n.onBeforeUnmount)(w),(0,n.onActivated)(C),(0,n.onDeactivated)(w),(e,t)=>((0,n.openBlock)(),(0,n.createElementBlock)(`span`,{ref_key:`viewportEl`,ref:r,class:(0,n.normalizeClass)(y.value),style:(0,n.normalizeStyle)(b.value)},[(0,n.createElementVNode)(`span`,{ref_key:`contentEl`,ref:i,class:`d-text__slide-content`},[(0,n.renderSlot)(e.$slots,`default`),p.value?((0,n.openBlock)(),(0,n.createElementBlock)(`span`,{key:0,ref_key:`copyEl`,ref:a,"aria-hidden":`true`,inert:``,class:`d-text__slide-copy`},null,512)):(0,n.createCommentVNode)(``,!0)],512)],6))}}),v=`300`,y=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],b=!1,x=!1,S=()=>{b=!1},C={name:`DtText`,components:{DtTextSlideViewport:_},props:{as:{type:String,default:`span`},kind:{type:String,default:null,validator:e=>e===null||Object.prototype.hasOwnProperty.call(t.TEXT_KIND_MODIFIERS,e)},variant:{type:String,default:null,validator:e=>e===null||Object.prototype.hasOwnProperty.call(t.TEXT_VARIANT_MODIFIERS,e)},size:{type:[String,Number],default:null},family:{type:String,default:null,validator:e=>e===null||Object.prototype.hasOwnProperty.call(t.TEXT_FAMILY_MODIFIERS,e)},italic:{type:Boolean,default:!1},tone:{type:String,default:null,validator:e=>e===null||Object.prototype.hasOwnProperty.call(t.TEXT_TONE_MODIFIERS,e)},align:{type:String,default:null,validator:e=>e===null||Object.prototype.hasOwnProperty.call(t.TEXT_ALIGN_MODIFIERS,e)},truncate:{type:Boolean,default:!1},maxLines:{type:Number,default:null,validator:e=>e===null||Number.isInteger(e)&&e>0},numeric:{type:Boolean,default:!1},wrap:{type:String,default:null,validator:e=>e===null||Object.prototype.hasOwnProperty.call(t.TEXT_WRAP_MODIFIERS,e)},textBoxTrim:{type:String,default:null,validator:e=>e===null||Object.prototype.hasOwnProperty.call(t.TEXT_BOX_TRIM_MODIFIERS,e)},strength:{type:String,default:null,validator:e=>e===null||Object.prototype.hasOwnProperty.call(t.TEXT_STRENGTH_MODIFIERS,e)},density:{type:[String,Number],default:null,validator:e=>e===null||Object.prototype.hasOwnProperty.call(t.TEXT_DENSITY_MODIFIERS,e)},slide:{type:[Boolean,String],default:!1,validator:e=>typeof e==`boolean`||t.TEXT_SLIDE_MODES.includes(e)}},computed:{textClasses(){let e=[`d-text`],n=this.getVariantClass();n&&e.push(n);let r=this.getFontSizeClass();r&&e.push(r);let i=this.getFamilyClass();i&&e.push(i),this.italic&&e.push(t.TEXT_ITALIC_CLASS);let a=this.getAlignClass();a&&e.push(a);let o=this.getToneClass();o&&e.push(o),this.slideMode?e.push(`d-text--slide`):this.truncate&&e.push(t.TEXT_TRUNCATE_CLASS),this.numeric&&e.push(t.TEXT_NUMERIC_CLASS),this.maxLines&&!this.slideMode&&e.push(t.TEXT_LINE_CLAMP_CLASS);let s=this.slideMode?null:this.getWrapClass();s&&e.push(s);let c=this.getTextBoxTrimClass();c&&e.push(c);let l=this.getStrengthClass();l&&e.push(l);let u=this.getDensityClass();return u&&e.push(u),e},textStyles(){if(!(!this.maxLines||this.slideMode))return{"--dt-text-line-clamp":this.maxLines}},slideMode(){return t.TEXT_SLIDE_MODES.includes(this.slide)?this.slide:this.slide?`once`:null}},mounted(){this.slideMode&&!x&&(this.maxLines||this.wrap)&&(console.warn(`[DtText] slide ignores maxLines and wrap.`),x=!0),!b&&this.usesHeadlineVisualStyle()&&!y.includes(this.as)&&(console.info(`[DtText] A headline text style is used without a semantic heading element. Consider using as="h1|h2|h3|h4|h5|h6" for better accessibility.`),b=!0)},methods:{usesHeadlineVisualStyle(){return this.variant?this.variant.startsWith(`headline-`):this.kind===`headline`},usesLegacyKindSize(){return!!(this.kind&&!this.variant)},getVariantClass(){if(this.variant)return this.getModifierClass(this.variant,t.TEXT_VARIANT_MODIFIERS,`variant`);if(!this.kind)return null;if(!Object.prototype.hasOwnProperty.call(t.TEXT_KIND_MODIFIERS,this.kind))return console.warn(`[DtText] Unsupported kind "${this.kind}".`),null;let e=t.TEXT_SIZE_MODIFIERS[this.kind]||[],n=(this.size==null?null:String(this.size))||v,r=n;if(!e.includes(n)){if(t.TEXT_HEADLINE_ONLY_SIZES.includes(n))throw Error(`[DtText] size="${n}" is only valid for kind="headline". Cannot use with kind="${this.kind}".`);let i=e.includes(v)?v:e[0];i&&(r=i),console.warn(`[DtText] size="${n}" is not valid for kind="${this.kind}". Using "${r}" instead.`)}if(!r)return null;let i=t.TEXT_SIZE_MAP[r]||r;return`${t.TEXT_KIND_MODIFIERS[this.kind]}--${i}`},getFontSizeClass(){if(this.size===null||this.size===void 0)return null;if(!this.variant&&!this.kind)return console.warn(`[DtText] size must be paired with variant or legacy kind. Prefer variant for typography composition; use size only as a variant override.`),null;if(this.usesLegacyKindSize())return null;let e=String(this.size);return t.TEXT_FONT_SIZE_MODIFIERS[e]||(console.warn(`[DtText] Unsupported size "${e}". Use a numeric font-size token.`),null)},getModifierClass(e,t,n){return e==null?null:t[e]||(console.warn(`[DtText] Unsupported ${n} "${e}".`),null)},getAlignClass(){return this.getModifierClass(this.align,t.TEXT_ALIGN_MODIFIERS,`align`)},getToneClass(){return this.getModifierClass(this.tone,t.TEXT_TONE_MODIFIERS,`tone`)},getWrapClass(){return this.getModifierClass(this.wrap,t.TEXT_WRAP_MODIFIERS,`wrap`)},getTextBoxTrimClass(){return this.getModifierClass(this.textBoxTrim,t.TEXT_BOX_TRIM_MODIFIERS,`textBoxTrim`)},getStrengthClass(){return this.getModifierClass(this.strength,t.TEXT_STRENGTH_MODIFIERS,`strength`)},getDensityClass(){return this.getModifierClass(this.density,t.TEXT_DENSITY_MODIFIERS,`density`)},getFamilyClass(){return this.getModifierClass(this.family,t.TEXT_FAMILY_MODIFIERS,`family`)}}};function w(e,t,r,i,a,o){let s=(0,n.resolveComponent)(`dt-text-slide-viewport`);return(0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(r.as),{"data-qa":`dt-text`,class:(0,n.normalizeClass)(o.textClasses),style:(0,n.normalizeStyle)(o.textStyles)},{default:(0,n.withCtx)(()=>[o.slideMode?((0,n.openBlock)(),(0,n.createBlock)(s,{key:0,mode:o.slideMode},{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`default`)]),_:3},8,[`mode`])):(0,n.renderSlot)(e.$slots,`default`,{key:1})]),_:3},8,[`class`,`style`])}var T=e.t(C,[[`render`,w]]);Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return T}});
|
|
2
|
-
//# sourceMappingURL=Text-DNVNZree.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Text-DNVNZree.cjs","names":[],"sources":["../components/Text/modules/slide.js","../components/Text/modules/SlideViewport.vue","../components/Text/modules/SlideViewport.vue","../components/Text/Text.vue"],"sourcesContent":["// Private helpers for the DtText `slide` option. Framework-free: nothing here\n// touches Vue; only modules/SlideViewport.vue calls into it, and only when `slide` is on.\n\n// The item a user points at or tabs to: a link, a button, or an element with an item\n// role. Focusable regions (a scroll area with tabindex=\"0\", popover content with\n// tabindex=\"-1\") are not items; a row that should drive the reveal takes an item role.\nconst HOST_ROLES = ['button', 'link', 'listitem', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'tab', 'treeitem', 'row', 'gridcell'];\nconst HOST_SELECTOR = ['a[href]', 'button', 'summary', ...HOST_ROLES.map((role) => `[role=\"${role}\"]`)].join(',');\n\nconst DEFAULT_SPEED = 40; // px per second\nconst DEFAULT_DELAY = 500; // ms\n// ms, longest single movement. A reveal that crawls reads as broken, so `once` is capped\n// at 3 s; a loop is read while it moves and may take up to 5 s per cycle.\nconst MAX_MOVEMENT = { once: 3000, loop: 5000 };\n// A loop pauses 5 s between cycles and stops, resting at the start, after 3 cycles, so the\n// whole sequence is bounded (about 25 s at most) as well as each movement.\nexport const LOOP_HOLD = 5000;\nexport const MAX_LOOPS = 3;\n\n/**\n * The element whose hover/focus drives the slide: the closest item around\n * the text (button, link, menu item...) or the text itself.\n */\nexport function getSlideHost (el) {\n return el.closest(HOST_SELECTOR) || el;\n}\n\n// Keyboard focus only: a menu that focuses the hovered row, or a clicked button that\n// keeps focus, must not keep the label moving after the pointer leaves.\nfunction isKeyboardFocus (target) {\n try {\n return target.matches(':focus-visible');\n } catch {\n return true;\n }\n}\n\n/**\n * Listens on the host and calls onEnter when the first of pointer or focus\n * arrives, onLeave when both have left. Returns an unbind function.\n */\nexport function bindSlide ({ el, moveEl, onEnter, onLeave, onTransitionEnd }) {\n const host = getSlideHost(el);\n const state = { pointer: false, focus: false };\n const set = (key, value) => {\n const was = state.pointer || state.focus;\n state[key] = value;\n const active = state.pointer || state.focus;\n if (active !== was) (active ? onEnter : onLeave)();\n };\n const handlers = {\n pointerenter: () => set('pointer', true),\n pointerleave: () => set('pointer', false),\n focusin: (event) => isKeyboardFocus(event.target) && set('focus', true),\n focusout: (event) => host.contains(event.relatedTarget) || set('focus', false),\n };\n const transitionEnd = (event) => {\n if (event.target === moveEl && event.propertyName === 'transform') onTransitionEnd();\n };\n\n Object.entries(handlers).forEach(([name, fn]) => host.addEventListener(name, fn));\n moveEl.addEventListener('transitionend', transitionEnd);\n\n return () => {\n Object.entries(handlers).forEach(([name, fn]) => host.removeEventListener(name, fn));\n moveEl.removeEventListener('transitionend', transitionEnd);\n };\n}\n\n/**\n * Calls onEscape when Escape is pressed anywhere on the page: a row moving under the\n * pointer may not have focus. Listens in the capture phase so a focused control that\n * stops Escape cannot hide it; the event is not stopped. Returns a remove function.\n */\nexport function listenForEscape (el, onEscape) {\n const doc = el.ownerDocument;\n const keydown = (event) => event.key === 'Escape' && onEscape();\n doc.addEventListener('keydown', keydown, true);\n return () => doc.removeEventListener('keydown', keydown, true);\n}\n\n/**\n * Calls onChange while the item is active when the label's width or the room for it\n * changes: the text is edited to a different width, or the viewport is resized. A label\n * that changes at the same width (a running timer) is left alone, and the loop copy is\n * ignored. Returns a stop function.\n */\nexport function watchSlideChanges (viewport, content, onChange) {\n const copyOf = () => content.querySelector('.d-text__slide-copy');\n const labelWidth = () => content.scrollWidth - (copyOf()?.offsetWidth ?? 0);\n let width = viewport.clientWidth;\n let label = labelWidth();\n const resize = typeof ResizeObserver === 'function' && new ResizeObserver(() => {\n // the copy can widen a shrinkable flex row; loop remeasures before each cycle anyway\n if (copyOf() || viewport.clientWidth === width) return;\n width = viewport.clientWidth;\n onChange();\n });\n // Vue swaps a comment placeholder for the copy; neither is the label changing\n const ignored = (node) => node.nodeType === Node.COMMENT_NODE ||\n Boolean((node.nodeType === Node.ELEMENT_NODE ? node : node.parentElement)?.closest('.d-text__slide-copy'));\n const mutation = new MutationObserver((records) => {\n const changed = records.some((record) => !ignored(record.target) &&\n (record.type === 'characterData' || [...record.addedNodes, ...record.removedNodes].some((node) => !ignored(node))));\n if (!changed || labelWidth() === label) return;\n label = labelWidth();\n onChange();\n });\n resize?.observe(viewport);\n mutation.observe(content, { childList: true, characterData: true, subtree: true });\n return () => {\n resize?.disconnect();\n mutation.disconnect();\n };\n}\n\nfunction parseTime (value, fallback) {\n const match = /^\\s*(-?\\d*\\.?\\d+)\\s*(ms|s)?\\s*$/.exec(value || '');\n if (!match) return fallback;\n const number = parseFloat(match[1]);\n return match[2] === 's' ? number * 1000 : number;\n}\n\n/**\n * Reads the public tuning custom properties from the element.\n */\nexport function readSlideConfig (el) {\n const style = getComputedStyle(el);\n const speed = parseFloat(style.getPropertyValue('--dt-text-slide-speed'));\n return {\n speed: speed > 0 ? speed : DEFAULT_SPEED,\n delay: Math.max(0, parseTime(style.getPropertyValue('--dt-text-slide-delay'), DEFAULT_DELAY)),\n };\n}\n\n/**\n * Duration in ms for one movement; long text moves faster instead of slower.\n */\nexport function getSlideDuration (distance, speed, mode) {\n return Math.min((distance / speed) * 1000, MAX_MOVEMENT[mode]);\n}\n\nexport function prefersReducedMotion () {\n return typeof window.matchMedia === 'function' &&\n window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n}\n","<template>\n <span\n ref=\"viewportEl\"\n :class=\"viewportClasses\"\n :style=\"viewportStyles\"\n >\n <span\n ref=\"contentEl\"\n class=\"d-text__slide-content\"\n >\n <slot />\n <!-- loop only: filled with a static clone of the text while it moves -->\n <span\n v-if=\"hasCopy\"\n ref=\"copyEl\"\n aria-hidden=\"true\"\n inert\n class=\"d-text__slide-copy\"\n />\n </span>\n </span>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n nextTick,\n onActivated,\n onBeforeUnmount,\n onDeactivated,\n onMounted,\n ref,\n watch,\n} from 'vue';\nimport { TEXT_SLIDE_MODES } from '../TextConstants';\nimport {\n bindSlide,\n getSlideDuration,\n listenForEscape,\n prefersReducedMotion,\n readSlideConfig,\n watchSlideChanges,\n LOOP_HOLD,\n MAX_LOOPS,\n} from './slide';\n\n/** @typedef {'rest' | 'waiting' | 'moving' | 'at-end' | 'at-start'} SlidePhase */\n\n// Internal to DtText: rendered only when `slide` is on, so plain text carries no slide state.\n// The outer span clips and fades the text; only the inner span moves, with transform.\ndefineOptions({ name: 'DtTextSlideViewport' });\n\nconst props = defineProps({\n // 'once' or 'loop'\n mode: {\n type: String,\n required: true,\n validator: (value) => TEXT_SLIDE_MODES.includes(value),\n },\n});\n\nconst viewportEl = ref(null);\nconst contentEl = ref(null);\nconst copyEl = ref(null);\n\n/** @type {import('vue').Ref<SlidePhase>} */\nconst phase = ref('rest');\nconst offset = ref(0);\nconst duration = ref(0);\nconst hasCopy = ref(false);\nconst loopWrap = ref(false);\n\n/**\n * Non-reactive bookkeeping.\n * @type {{ unbind: (() => void) | null, stopActive: Array<() => void>, timers: number[],\n * distance: number, restWidth: number, loops: number }}\n */\nconst runtime = { unbind: null, stopActive: [], timers: [], distance: 0, restWidth: 0, loops: 0 };\n\nconst viewportClasses = computed(() => ['d-text__slide', {\n 'd-text__slide--moving': phase.value === 'moving',\n 'd-text__slide--end': phase.value === 'at-end',\n 'd-text__slide--loop': phase.value === 'moving' && hasCopy.value,\n 'd-text__slide--loop-wrap': loopWrap.value,\n}]);\n\nconst viewportStyles = computed(() => (phase.value === 'rest'\n ? undefined\n : { '--_slide-offset': `${offset.value}px`, '--_slide-duration': `${duration.value}ms` }));\n\nconst viewport = () => viewportEl.value;\nconst content = () => contentEl.value;\n\nfunction bind () {\n unbind();\n runtime.unbind = bindSlide({\n // the DtText root: the host is the item around it, or the text itself\n el: viewport().parentElement,\n moveEl: content(),\n onEnter: activate,\n onLeave: deactivate,\n onTransitionEnd: moveDone,\n });\n}\n\nfunction unbind () {\n runtime.unbind?.();\n runtime.unbind = null;\n deactivate();\n}\n\n// the item is hovered or keyboard-focused: watch for Escape and for changes until it is left\nfunction activate () {\n runtime.stopActive = [\n listenForEscape(viewport(), deactivate),\n // a new label width or more room: start again from rest with fresh widths\n watchSlideChanges(viewport(), content(), () => {\n reset();\n enter();\n }),\n ];\n enter();\n}\n\n// left, Escape or unmounted: stop watching and snap back\nfunction deactivate () {\n runtime.stopActive.forEach((stop) => stop());\n runtime.stopActive = [];\n reset();\n}\n\nfunction after (ms, fn) {\n runtime.timers.push(setTimeout(fn, ms));\n}\n\nfunction clearTimers () {\n runtime.timers.forEach(clearTimeout);\n runtime.timers = [];\n}\n\n// snap to rest, no reverse animation\n/** @param {SlidePhase} next */\nfunction reset (next = 'rest') {\n clearTimers();\n phase.value = next;\n offset.value = 0;\n duration.value = 0;\n hasCopy.value = false;\n loopWrap.value = false;\n}\n\n// measures the label before each cycle (it may change during a hold); false when it fits\nfunction measure () {\n const el = content();\n runtime.distance = el.scrollWidth - el.clientWidth;\n runtime.restWidth = el.scrollWidth;\n return runtime.distance > 0;\n}\n\nfunction enter () {\n if (phase.value !== 'rest' || !measure()) {\n return;\n }\n\n runtime.loops = 0;\n phase.value = 'waiting';\n after(readSlideConfig(viewport()).delay, start);\n}\n\nfunction start () {\n if (prefersReducedMotion()) {\n phase.value = 'at-end';\n offset.value = runtime.distance;\n } else if (props.mode === 'loop') {\n loop();\n } else {\n move(runtime.distance);\n }\n}\n\nfunction move (to) {\n const time = getSlideDuration(Math.abs(to - offset.value), readSlideConfig(viewport()).speed, props.mode);\n clearTimers();\n phase.value = 'moving';\n offset.value = to;\n duration.value = time;\n // in case transitionend does not fire\n after(time + 100, moveDone);\n return time;\n}\n\nasync function loop () {\n if (!measure()) {\n return;\n }\n // the copy has to be in the DOM to measure the full wrap-around distance\n hasCopy.value = true;\n await nextTick();\n const el = content();\n const copy = copyEl.value;\n if (!hasCopy.value || !copy) {\n return;\n }\n // a static clone, cleaned while detached: slot components do not mount twice, and no ids,\n // form values, radio groups, validation or tab stops repeat\n const original = [...el.childNodes].filter((node) => node !== copy);\n const clone = el.ownerDocument.createDocumentFragment();\n clone.append(...original.map((node) => node.cloneNode(true)));\n clone.querySelectorAll('[id], [name]').forEach((node) => {\n node.removeAttribute('id');\n node.removeAttribute('name');\n });\n clone.querySelectorAll('input, select, textarea, button').forEach((node) => {\n node.disabled = true;\n });\n copy.replaceChildren(clone);\n const { restWidth } = runtime;\n const distance = el.scrollWidth - restWidth;\n const time = move(distance);\n runtime.loops += 1;\n // the start edge fades while the text slides out, then clears once the gap is\n // half past it, before the copy arrives (the scroll is linear, so time = distance)\n const gap = parseFloat(getComputedStyle(copy).paddingInlineStart) || 0;\n after(time * (restWidth + gap / 2) / distance, () => { loopWrap.value = true; });\n}\n\nfunction moveDone () {\n if (phase.value !== 'moving') {\n return;\n }\n if (props.mode !== 'loop') {\n clearTimers();\n phase.value = 'at-end';\n return;\n }\n // the copy now sits exactly where the text began, so snap back unseen; stop after MAX_LOOPS\n reset('at-start');\n if (runtime.loops < MAX_LOOPS) {\n after(LOOP_HOLD, loop);\n }\n}\n\n// a sequence started in the old mode can end on the loop copy: start again from rest\nwatch(() => props.mode, async () => {\n if (!runtime.stopActive.length) {\n return;\n }\n reset();\n // measure once the loop copy has left the DOM\n await nextTick();\n if (runtime.stopActive.length) {\n enter();\n }\n});\n\nonMounted(bind);\nonBeforeUnmount(unbind);\n// inside KeepAlive the host can vanish without a pointerleave or focusout\nonActivated(bind);\nonDeactivated(unbind);\n</script>\n","<template>\n <span\n ref=\"viewportEl\"\n :class=\"viewportClasses\"\n :style=\"viewportStyles\"\n >\n <span\n ref=\"contentEl\"\n class=\"d-text__slide-content\"\n >\n <slot />\n <!-- loop only: filled with a static clone of the text while it moves -->\n <span\n v-if=\"hasCopy\"\n ref=\"copyEl\"\n aria-hidden=\"true\"\n inert\n class=\"d-text__slide-copy\"\n />\n </span>\n </span>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n nextTick,\n onActivated,\n onBeforeUnmount,\n onDeactivated,\n onMounted,\n ref,\n watch,\n} from 'vue';\nimport { TEXT_SLIDE_MODES } from '../TextConstants';\nimport {\n bindSlide,\n getSlideDuration,\n listenForEscape,\n prefersReducedMotion,\n readSlideConfig,\n watchSlideChanges,\n LOOP_HOLD,\n MAX_LOOPS,\n} from './slide';\n\n/** @typedef {'rest' | 'waiting' | 'moving' | 'at-end' | 'at-start'} SlidePhase */\n\n// Internal to DtText: rendered only when `slide` is on, so plain text carries no slide state.\n// The outer span clips and fades the text; only the inner span moves, with transform.\ndefineOptions({ name: 'DtTextSlideViewport' });\n\nconst props = defineProps({\n // 'once' or 'loop'\n mode: {\n type: String,\n required: true,\n validator: (value) => TEXT_SLIDE_MODES.includes(value),\n },\n});\n\nconst viewportEl = ref(null);\nconst contentEl = ref(null);\nconst copyEl = ref(null);\n\n/** @type {import('vue').Ref<SlidePhase>} */\nconst phase = ref('rest');\nconst offset = ref(0);\nconst duration = ref(0);\nconst hasCopy = ref(false);\nconst loopWrap = ref(false);\n\n/**\n * Non-reactive bookkeeping.\n * @type {{ unbind: (() => void) | null, stopActive: Array<() => void>, timers: number[],\n * distance: number, restWidth: number, loops: number }}\n */\nconst runtime = { unbind: null, stopActive: [], timers: [], distance: 0, restWidth: 0, loops: 0 };\n\nconst viewportClasses = computed(() => ['d-text__slide', {\n 'd-text__slide--moving': phase.value === 'moving',\n 'd-text__slide--end': phase.value === 'at-end',\n 'd-text__slide--loop': phase.value === 'moving' && hasCopy.value,\n 'd-text__slide--loop-wrap': loopWrap.value,\n}]);\n\nconst viewportStyles = computed(() => (phase.value === 'rest'\n ? undefined\n : { '--_slide-offset': `${offset.value}px`, '--_slide-duration': `${duration.value}ms` }));\n\nconst viewport = () => viewportEl.value;\nconst content = () => contentEl.value;\n\nfunction bind () {\n unbind();\n runtime.unbind = bindSlide({\n // the DtText root: the host is the item around it, or the text itself\n el: viewport().parentElement,\n moveEl: content(),\n onEnter: activate,\n onLeave: deactivate,\n onTransitionEnd: moveDone,\n });\n}\n\nfunction unbind () {\n runtime.unbind?.();\n runtime.unbind = null;\n deactivate();\n}\n\n// the item is hovered or keyboard-focused: watch for Escape and for changes until it is left\nfunction activate () {\n runtime.stopActive = [\n listenForEscape(viewport(), deactivate),\n // a new label width or more room: start again from rest with fresh widths\n watchSlideChanges(viewport(), content(), () => {\n reset();\n enter();\n }),\n ];\n enter();\n}\n\n// left, Escape or unmounted: stop watching and snap back\nfunction deactivate () {\n runtime.stopActive.forEach((stop) => stop());\n runtime.stopActive = [];\n reset();\n}\n\nfunction after (ms, fn) {\n runtime.timers.push(setTimeout(fn, ms));\n}\n\nfunction clearTimers () {\n runtime.timers.forEach(clearTimeout);\n runtime.timers = [];\n}\n\n// snap to rest, no reverse animation\n/** @param {SlidePhase} next */\nfunction reset (next = 'rest') {\n clearTimers();\n phase.value = next;\n offset.value = 0;\n duration.value = 0;\n hasCopy.value = false;\n loopWrap.value = false;\n}\n\n// measures the label before each cycle (it may change during a hold); false when it fits\nfunction measure () {\n const el = content();\n runtime.distance = el.scrollWidth - el.clientWidth;\n runtime.restWidth = el.scrollWidth;\n return runtime.distance > 0;\n}\n\nfunction enter () {\n if (phase.value !== 'rest' || !measure()) {\n return;\n }\n\n runtime.loops = 0;\n phase.value = 'waiting';\n after(readSlideConfig(viewport()).delay, start);\n}\n\nfunction start () {\n if (prefersReducedMotion()) {\n phase.value = 'at-end';\n offset.value = runtime.distance;\n } else if (props.mode === 'loop') {\n loop();\n } else {\n move(runtime.distance);\n }\n}\n\nfunction move (to) {\n const time = getSlideDuration(Math.abs(to - offset.value), readSlideConfig(viewport()).speed, props.mode);\n clearTimers();\n phase.value = 'moving';\n offset.value = to;\n duration.value = time;\n // in case transitionend does not fire\n after(time + 100, moveDone);\n return time;\n}\n\nasync function loop () {\n if (!measure()) {\n return;\n }\n // the copy has to be in the DOM to measure the full wrap-around distance\n hasCopy.value = true;\n await nextTick();\n const el = content();\n const copy = copyEl.value;\n if (!hasCopy.value || !copy) {\n return;\n }\n // a static clone, cleaned while detached: slot components do not mount twice, and no ids,\n // form values, radio groups, validation or tab stops repeat\n const original = [...el.childNodes].filter((node) => node !== copy);\n const clone = el.ownerDocument.createDocumentFragment();\n clone.append(...original.map((node) => node.cloneNode(true)));\n clone.querySelectorAll('[id], [name]').forEach((node) => {\n node.removeAttribute('id');\n node.removeAttribute('name');\n });\n clone.querySelectorAll('input, select, textarea, button').forEach((node) => {\n node.disabled = true;\n });\n copy.replaceChildren(clone);\n const { restWidth } = runtime;\n const distance = el.scrollWidth - restWidth;\n const time = move(distance);\n runtime.loops += 1;\n // the start edge fades while the text slides out, then clears once the gap is\n // half past it, before the copy arrives (the scroll is linear, so time = distance)\n const gap = parseFloat(getComputedStyle(copy).paddingInlineStart) || 0;\n after(time * (restWidth + gap / 2) / distance, () => { loopWrap.value = true; });\n}\n\nfunction moveDone () {\n if (phase.value !== 'moving') {\n return;\n }\n if (props.mode !== 'loop') {\n clearTimers();\n phase.value = 'at-end';\n return;\n }\n // the copy now sits exactly where the text began, so snap back unseen; stop after MAX_LOOPS\n reset('at-start');\n if (runtime.loops < MAX_LOOPS) {\n after(LOOP_HOLD, loop);\n }\n}\n\n// a sequence started in the old mode can end on the loop copy: start again from rest\nwatch(() => props.mode, async () => {\n if (!runtime.stopActive.length) {\n return;\n }\n reset();\n // measure once the loop copy has left the DOM\n await nextTick();\n if (runtime.stopActive.length) {\n enter();\n }\n});\n\nonMounted(bind);\nonBeforeUnmount(unbind);\n// inside KeepAlive the host can vanish without a pointerleave or focusout\nonActivated(bind);\nonDeactivated(unbind);\n</script>\n","<template>\n <component\n :is=\"as\"\n data-qa=\"dt-text\"\n :class=\"textClasses\"\n :style=\"textStyles\"\n >\n <!-- the slide state lives in this child, so plain text carries none -->\n <dt-text-slide-viewport\n v-if=\"slideMode\"\n :mode=\"slideMode\"\n >\n <!-- @slot Default slot for text content -->\n <slot />\n </dt-text-slide-viewport>\n <slot v-else />\n </component>\n</template>\n\n<script>\nimport {\n TEXT_KIND_MODIFIERS,\n TEXT_VARIANT_MODIFIERS,\n TEXT_SIZE_MODIFIERS,\n TEXT_SIZE_MAP,\n TEXT_HEADLINE_ONLY_SIZES,\n TEXT_FONT_SIZE_MODIFIERS,\n TEXT_FAMILY_MODIFIERS,\n TEXT_ITALIC_CLASS,\n TEXT_ALIGN_MODIFIERS,\n TEXT_TONE_MODIFIERS,\n TEXT_NUMERIC_CLASS,\n TEXT_TRUNCATE_CLASS,\n TEXT_LINE_CLAMP_CLASS,\n TEXT_WRAP_MODIFIERS,\n TEXT_BOX_TRIM_MODIFIERS,\n TEXT_STRENGTH_MODIFIERS,\n TEXT_DENSITY_MODIFIERS,\n TEXT_SLIDE_MODES,\n} from './TextConstants';\nimport DtTextSlideViewport from './modules/SlideViewport.vue';\n\nconst DEFAULT_SIZE = '300';\nconst SEMANTIC_HEADING_ELEMENTS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'];\n\n// Module-level flag to emit info only once per session\nlet hasEmittedHeadlineSemanticInfo = false;\nlet hasWarnedSlideConflict = false;\n\n// Exported for testing purposes only\nexport const resetHeadlineSemanticInfoFlag = () => {\n hasEmittedHeadlineSemanticInfo = false;\n};\n\n/**\n * Dialtone text primitive that applies typography tokens based on semantic props.\n * @see https://dialtone.dialpad.com/components/text.html\n */\nexport default {\n name: 'DtText',\n\n components: { DtTextSlideViewport },\n\n props: {\n /**\n * HTML tag or component used for rendering.\n * @values span, p, strong, h1, h2, h3, h4, h5, h6, label, div, component\n */\n as: {\n type: String,\n default: 'span',\n },\n\n /**\n * Typography kind mapping to headline/body/label/code token sets.\n * @values headline, body, label, code\n * @deprecated Use variant instead\n */\n kind: {\n type: String,\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_KIND_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Typography variant mapping to a complete token-backed composition.\n * @values headline-3xl, headline-2xl, headline-xl, headline-lg, headline-md, headline-sm, headline-xs, body-lg, body-md, body-sm, body-xs, label-lg, label-md, label-sm, label-xs, code-lg, code-md, code-sm, code-xs\n */\n variant: {\n type: String,\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_VARIANT_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Raw font-size token. Must be paired with `variant` for overrides or legacy `kind` for composition size.\n * @values 50, 75, 100, 125, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800\n */\n size: {\n type: [String, Number],\n default: null,\n },\n\n /**\n * Overrides font-family. By default, no font-family class is emitted and text inherits naturally.\n * @values inherit, custom, sans, mono, expressive\n */\n family: {\n type: String,\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_FAMILY_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Applies italic font style when true.\n */\n italic: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Semantic foreground color.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n tone: {\n type: String,\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_TONE_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Logical text alignment. Requires block/inline-block context.\n * @values start, center, end, justify\n */\n align: {\n type: String,\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_ALIGN_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Enables single-line truncation (i.e. ellipsis) when true; requires block/inline-block context.\n */\n truncate: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Applies multi-line truncation (i.e. clamp) when greater than zero; requires block/inline-block context.\n */\n maxLines: {\n type: Number,\n default: null,\n validator: (value) => {\n return value === null || (Number.isInteger(value) && value > 0);\n },\n },\n\n /**\n * Renders numeric content with tabular figures.\n */\n numeric: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls text wrapping behavior.\n * @values wrap, nowrap, balance, pretty\n */\n wrap: {\n type: String,\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_WRAP_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Controls text-box-trim (leading space above/below text). Useful for tight component layouts.\n * @values start, end, both\n */\n textBoxTrim: {\n type: String,\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_BOX_TRIM_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Overrides font-weight. Applies to any kind/size combination.\n * @values bold, semibold, medium, normal\n */\n strength: {\n type: String,\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_STRENGTH_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Overrides line-height. Applies to any kind/size combination.\n * @values 100, 200, 300, 400, 500, 600\n */\n density: {\n type: [String, Number],\n default: null,\n validator: (value) => {\n return (\n value === null ||\n Object.prototype.hasOwnProperty.call(TEXT_DENSITY_MODIFIERS, value)\n );\n },\n },\n\n /**\n * Slides overflowing single-line text into view while the text, or the item around it\n * (button, link, menu item), is hovered or has keyboard focus. `true` is the same as `once`.\n * Renders as a block and replaces `truncate`, `maxLines` and `wrap`. Tune with the\n * `--dt-text-slide-*` CSS custom properties listed in the DtText docs.\n * @values true, false, once, loop\n */\n slide: {\n type: [Boolean, String],\n default: false,\n validator: (value) => {\n return typeof value === 'boolean' || TEXT_SLIDE_MODES.includes(value);\n },\n },\n },\n\n computed: {\n textClasses() {\n const classes = ['d-text'];\n const variantClass = this.getVariantClass();\n if (variantClass) {\n classes.push(variantClass);\n }\n\n const fontSizeClass = this.getFontSizeClass();\n if (fontSizeClass) {\n classes.push(fontSizeClass);\n }\n\n const familyClass = this.getFamilyClass();\n if (familyClass) {\n classes.push(familyClass);\n }\n\n if (this.italic) {\n classes.push(TEXT_ITALIC_CLASS);\n }\n\n const alignClass = this.getAlignClass();\n if (alignClass) {\n classes.push(alignClass);\n }\n\n const toneClass = this.getToneClass();\n if (toneClass) {\n classes.push(toneClass);\n }\n\n if (this.slideMode) {\n classes.push('d-text--slide');\n } else if (this.truncate) {\n classes.push(TEXT_TRUNCATE_CLASS);\n }\n\n if (this.numeric) {\n classes.push(TEXT_NUMERIC_CLASS);\n }\n\n if (this.maxLines && !this.slideMode) {\n classes.push(TEXT_LINE_CLAMP_CLASS);\n }\n\n const wrapClass = this.slideMode ? null : this.getWrapClass();\n if (wrapClass) {\n classes.push(wrapClass);\n }\n\n const textBoxTrimClass = this.getTextBoxTrimClass();\n if (textBoxTrimClass) {\n classes.push(textBoxTrimClass);\n }\n\n const strengthClass = this.getStrengthClass();\n if (strengthClass) {\n classes.push(strengthClass);\n }\n\n const densityClass = this.getDensityClass();\n if (densityClass) {\n classes.push(densityClass);\n }\n\n return classes;\n },\n\n textStyles() {\n if (!this.maxLines || this.slideMode) {\n return undefined;\n }\n\n return {\n '--dt-text-line-clamp': this.maxLines,\n };\n },\n\n slideMode() {\n if (TEXT_SLIDE_MODES.includes(this.slide)) {\n return this.slide;\n }\n return this.slide ? 'once' : null;\n },\n },\n\n mounted() {\n if (this.slideMode && !hasWarnedSlideConflict && (this.maxLines || this.wrap)) {\n // eslint-disable-next-line no-console\n console.warn('[DtText] slide ignores maxLines and wrap.');\n hasWarnedSlideConflict = true;\n }\n\n // Emit info once per session when headline is used without semantic heading element\n if (\n !hasEmittedHeadlineSemanticInfo &&\n this.usesHeadlineVisualStyle() &&\n !SEMANTIC_HEADING_ELEMENTS.includes(this.as)\n ) {\n console.info(\n '[DtText] A headline text style is used without a semantic heading element. ' +\n 'Consider using as=\"h1|h2|h3|h4|h5|h6\" for better accessibility.',\n );\n hasEmittedHeadlineSemanticInfo = true;\n }\n },\n\n methods: {\n usesHeadlineVisualStyle() {\n if (this.variant) {\n return this.variant.startsWith('headline-');\n }\n\n return this.kind === 'headline';\n },\n\n usesLegacyKindSize() {\n return Boolean(this.kind && !this.variant);\n },\n\n getVariantClass() {\n if (this.variant) {\n return this.getModifierClass(\n this.variant,\n TEXT_VARIANT_MODIFIERS,\n 'variant',\n );\n }\n\n if (!this.kind) {\n return null;\n }\n\n if (\n !Object.prototype.hasOwnProperty.call(TEXT_KIND_MODIFIERS, this.kind)\n ) {\n console.warn(`[DtText] Unsupported kind \"${this.kind}\".`);\n return null;\n }\n\n const allowedSizes = TEXT_SIZE_MODIFIERS[this.kind] || [];\n const rawSize = this.size != null ? String(this.size) : null;\n const requestedSize = rawSize || DEFAULT_SIZE;\n let resolvedSize = requestedSize;\n\n if (!allowedSizes.includes(requestedSize)) {\n // Headline-only sizes (3xl, 2xl, xl, 500, 600, 700) throw an error when used with incompatible kinds\n if (TEXT_HEADLINE_ONLY_SIZES.includes(requestedSize)) {\n throw new Error(\n `[DtText] size=\"${requestedSize}\" is only valid for kind=\"headline\". ` +\n `Cannot use with kind=\"${this.kind}\".`,\n );\n }\n\n // Universal sizes fall back gracefully with a warning\n const fallbackSize = allowedSizes.includes(DEFAULT_SIZE)\n ? DEFAULT_SIZE\n : allowedSizes[0];\n if (fallbackSize) {\n resolvedSize = fallbackSize;\n }\n console.warn(\n `[DtText] size=\"${requestedSize}\" is not valid for kind=\"${this.kind}\". Using \"${resolvedSize}\" instead.`,\n );\n }\n\n if (!resolvedSize) {\n return null;\n }\n\n // Map numeric sizes to t-shirt CSS class suffix\n const cssSuffix = TEXT_SIZE_MAP[resolvedSize] || resolvedSize;\n return `${TEXT_KIND_MODIFIERS[this.kind]}--${cssSuffix}`;\n },\n\n getFontSizeClass() {\n if (this.size === null || this.size === undefined) {\n return null;\n }\n\n if (!this.variant && !this.kind) {\n console.warn(\n '[DtText] size must be paired with variant or legacy kind. ' +\n 'Prefer variant for typography composition; use size only as a variant override.',\n );\n return null;\n }\n\n if (this.usesLegacyKindSize()) {\n return null;\n }\n\n const size = String(this.size);\n const className = TEXT_FONT_SIZE_MODIFIERS[size];\n if (className) {\n return className;\n }\n\n console.warn(\n `[DtText] Unsupported size \"${size}\". Use a numeric font-size token.`,\n );\n return null;\n },\n\n getModifierClass(value, modifiers, propName) {\n if (value === null || value === undefined) {\n return null;\n }\n\n const className = modifiers[value];\n if (!className) {\n console.warn(`[DtText] Unsupported ${propName} \"${value}\".`);\n return null;\n }\n\n return className;\n },\n\n getAlignClass() {\n return this.getModifierClass(this.align, TEXT_ALIGN_MODIFIERS, 'align');\n },\n\n getToneClass() {\n return this.getModifierClass(this.tone, TEXT_TONE_MODIFIERS, 'tone');\n },\n\n getWrapClass() {\n return this.getModifierClass(this.wrap, TEXT_WRAP_MODIFIERS, 'wrap');\n },\n\n getTextBoxTrimClass() {\n return this.getModifierClass(\n this.textBoxTrim,\n TEXT_BOX_TRIM_MODIFIERS,\n 'textBoxTrim',\n );\n },\n\n getStrengthClass() {\n return this.getModifierClass(\n this.strength,\n TEXT_STRENGTH_MODIFIERS,\n 'strength',\n );\n },\n\n getDensityClass() {\n return this.getModifierClass(\n this.density,\n TEXT_DENSITY_MODIFIERS,\n 'density',\n );\n },\n\n getFamilyClass() {\n return this.getModifierClass(\n this.family,\n TEXT_FAMILY_MODIFIERS,\n 'family',\n );\n },\n },\n};\n</script>\n"],"mappings":"4JAOA,IAAM,EAAgB,CAAC,UAAW,SAAU,UAAW,GADpC,CAAC,SAAU,OAAQ,WAAY,WAAY,mBAAoB,gBAAiB,SAAU,MAAO,WAAY,MAAO,WAAW,CAC7E,IAAK,GAAS,UAAU,EAAK,IAAI,CAAC,CAAC,KAAK,IAAI,CAE3G,EAAgB,GAChB,EAAgB,IAGhB,EAAe,CAAE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ACD,EAEJ,CACF,wJAlhBQ,EAAA,GAAE,CAAA,CACP,UAAQ,UACP,OAAA,EAAA,EAAA,gBAAO,EAAA,YAAW,CAClB,OAAA,EAAA,EAAA,gBAAO,EAAA,WAAU,6BASO,CALjB,EAAA,YAAA,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,aAKiB,EAAA,OAJtB,KAAM,EAAA,sCAGC,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,UAAA,CAAA,CAAA,oCAEK,EAAA,OAAA,UAAA,CAAA,IAAA,EAAA,CAAA,CAAA,CAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
require(`./chunk-Bmb41Sf3.cjs`);const e=require(`./common/utils/index.cjs`),t=require(`./lib/text-list/text-list-constants.cjs`),n=require(`./lib/text-list/validators.cjs`);let r=require(`vue`);var i=[`value`],a=(0,r.defineComponent)({name:`DtTextListItem`,__name:`TextListItem`,props:{value:{type:Number,default:void 0},markerTone:{type:String,default:void 0,validator:n.textListMarkerToneValidator},markerClass:{type:[String,Array,Object],default:``},contentClass:{type:[String,Array,Object],default:``}},setup(n){let a=n,o=(0,r.useSlots)(),s=(0,r.inject)(t.DT_TEXT_LIST_CONTEXT,null),c=(0,r.computed)(()=>s?(0,r.unref)(s.type):void 0),l=(0,r.computed)(()=>e.hasSlotContent(o.marker)),u=(0,r.computed)(()=>c.value===`ordered`?a.value:void 0),d=(0,r.computed)(()=>[`d-text-list__item`,{"d-text-list__item--custom-marker":l.value},a.markerTone?`d-text-list__item--marker-tone-${a.markerTone}`:null]),f=e=>console.warn(`[DtTextListItem] ${e}`);return(0,r.onMounted)(()=>{process.env.NODE_ENV!==`production`&&(s||f(`DtTextListItem must be used inside DtTextList.`),a.value!==void 0&&c.value!==`ordered`&&f(`The value prop only applies inside a DtTextList with type="ordered".`))}),(e,t)=>((0,r.openBlock)(),(0,r.createElementBlock)(`li`,{"data-qa":`dt-text-list-item`,class:(0,r.normalizeClass)(d.value),value:u.value},[l.value?((0,r.openBlock)(),(0,r.createElementBlock)(`span`,{key:0,"data-qa":`dt-text-list-item-marker`,class:(0,r.normalizeClass)([`d-text-list__item-marker`,n.markerClass]),"aria-hidden":`true`},[(0,r.renderSlot)(e.$slots,`marker`)],2)):(0,r.createCommentVNode)(``,!0),(0,r.createElementVNode)(`div`,{"data-qa":`dt-text-list-item-content`,class:(0,r.normalizeClass)([`d-text-list__item-content`,n.contentClass])},[(0,r.renderSlot)(e.$slots,`default`)],2)],10,i))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
2
|
-
//# sourceMappingURL=TextListItem-CVjrHr2_.cjs.map
|
package/dist/Toast--W8p7jzA.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
require(`./chunk-Bmb41Sf3.cjs`);const e=require(`./common/validators/index.cjs`),t=require(`./common/utils/index.cjs`),n=require(`./_plugin-vue_export-helper-D8jCH6HB.cjs`),r=require(`./lib/icon/icon-constants.cjs`),i=require(`./lib/notice/notice-constants.cjs`),a=require(`./lib/notice/notice-icon.cjs`),o=require(`./lib/notice/notice-content.cjs`),s=require(`./lib/notice/notice-action.cjs`),c=require(`./lib/toast/toast-constants.cjs`);let l=require(`vue`),u=require(`@dialpad/dialtone-icons/vue`);var d={name:`ToastLayoutDefault`,components:{DtNoticeIcon:a.default,DtNoticeContent:o.default,DtNoticeAction:s.default},inheritAttrs:!1,props:{isShown:{type:Boolean,default:!1},headerId:{type:String,default(){return t.default.getUniqueString()}},contentId:{type:String,default(){return t.default.getUniqueString()}},headerText:{type:String,default:void 0},message:{type:String,default:``},role:{type:String,default:`status`,validator:e=>c.TOAST_ROLES.includes(e)},kind:{type:String,default:`base`,validator:e=>i.NOTICE_KINDS.includes(e)},important:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},showAction:{type:Boolean,default:!0},iconClass:{type:[String,Array,Object],default:``},headerClass:{type:[String,Array,Object],default:``},contentClass:{type:[String,Array,Object],default:``},actionClass:{type:[String,Array,Object],default:``}},emits:[`close`],computed:{kindClass(){return{critical:`d-toast--critical`,info:`d-toast--info`,positive:`d-toast--positive`,warning:`d-toast--warning`,base:`d-toast--base`}[this.kind]},toastListeners(){return t.extractVueListeners(this.$attrs)}}},f=[`aria-hidden`],p={class:`d-toast__dialog`};function m(e,t,n,r,i,a){let o=(0,l.resolveComponent)(`dt-notice-icon`),s=(0,l.resolveComponent)(`dt-notice-content`),c=(0,l.resolveComponent)(`dt-notice-action`);return n.isShown?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:0,class:(0,l.normalizeClass)([`d-toast`,a.kindClass,e.$attrs.class,{"d-toast--important":n.important}]),"data-qa":`dt-toast`,"aria-hidden":(!n.isShown).toString()},[(0,l.createElementVNode)(`div`,p,[n.showIcon?((0,l.openBlock)(),(0,l.createBlock)(o,(0,l.mergeProps)({key:0,kind:n.kind,"icon-class":n.iconClass,class:{"d-notice__icon--has-title":n.headerText||e.$slots.header}},a.toastListeners),{default:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`icon`)]),_:3},16,[`kind`,`icon-class`,`class`])):(0,l.createCommentVNode)(``,!0),(0,l.createVNode)(s,(0,l.mergeProps)({"header-id":n.headerId,"content-id":n.contentId,"header-text":n.headerText,message:n.message,"header-class":n.headerClass,"content-class":n.contentClass,role:n.role},a.toastListeners),{header:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`header`)]),default:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`default`)]),_:3},16,[`header-id`,`content-id`,`header-text`,`message`,`header-class`,`content-class`,`role`]),(0,l.createVNode)(c,(0,l.mergeProps)({"show-action":n.showAction,"show-close":n.showClose,"action-class":n.actionClass},a.toastListeners,{onClose:t[0]||(t[0]=t=>e.$emit(`close`))}),{default:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`action`)]),_:3},16,[`show-action`,`show-close`,`action-class`])])],10,f)):(0,l.createCommentVNode)(``,!0)}var h=n.t(d,[[`render`,m]]),g=new Map([[`info`,u.DtIconInfo],[`positive`,u.DtIconInfo],[`warning`,u.DtIconAlertTriangle],[`critical`,u.DtIconInfo],[`base`,u.DtIconBell],[`gradient`,u.DtIconSparkle]]),_={name:`DtToastLayoutAlternateIcon`,components:{DtIconInfo:u.DtIconInfo,DtIconAlertTriangle:u.DtIconAlertTriangle,DtIconBell:u.DtIconBell,DtIconSparkle:u.DtIconSparkle},props:{kind:{type:String,default:`base`,validator(e){return c.TOAST_ALTERNATE_KINDS.includes(e)}},size:{type:[String,Number],default:400,validator:e.ordinalSizeValidator(r.ICON_SIZE_MODIFIERS)},iconClass:{type:[String,Array,Object],default:``}},computed:{defaultIcon(){return g.get(this.kind)}}};function v(e,t,n,r,i,a){return(0,l.openBlock)(),(0,l.createElementBlock)(`div`,{"aria-hidden":`true`,class:(0,l.normalizeClass)([`d-toast-layout-alternate__icon`,n.iconClass])},[(0,l.renderSlot)(e.$slots,`default`,{},()=>[a.defaultIcon?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(a.defaultIcon),{key:0,size:n.size},null,8,[`size`])):(0,l.createCommentVNode)(``,!0)])],2)}var y=n.t(_,[[`render`,v]]),b={name:`ToastLayoutAlternate`,components:{DtNoticeAction:s.default,DtNoticeContent:o.default,DtToastLayoutAlternateIcon:y},inheritAttrs:!1,props:{isShown:{type:Boolean,default:!1},headerId:{type:String,default(){return t.default.getUniqueString()}},contentId:{type:String,default(){return t.default.getUniqueString()}},headerText:{type:String,default:void 0},message:{type:String,default:``},role:{type:String,default:`status`,validator:e=>c.TOAST_ROLES.includes(e)},kind:{type:String,default:`base`,validator:e=>c.TOAST_ALTERNATE_KINDS.includes(e)},showClose:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},iconClass:{type:[String,Array,Object],default:``},headerClass:{type:[String,Array,Object],default:``},contentClass:{type:[String,Array,Object],default:``},actionClass:{type:[String,Array,Object],default:``}},computed:{kindClass(){return{critical:`d-toast-alternate--critical`,info:`d-toast-alternate--info`,positive:`d-toast-alternate--positive`,warning:`d-toast-alternate--warning`,gradient:`d-toast-alternate--gradient`}[this.kind]},toastListeners(){return t.extractVueListeners(this.$attrs)}}},x=[`aria-hidden`],S={class:`d-toast-alternate__dialog`},C={class:`d-toast-alternate__header`},w={class:`d-toast-alternate__content`};function T(e,t,n,r,i,a){let o=(0,l.resolveComponent)(`dt-toast-layout-alternate-icon`),s=(0,l.resolveComponent)(`dt-notice-content`),c=(0,l.resolveComponent)(`dt-notice-action`);return n.isShown?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:0,class:(0,l.normalizeClass)([`d-toast-alternate`,e.$attrs.class,a.kindClass]),"data-qa":`dt-toast`,"aria-hidden":(!n.isShown).toString()},[(0,l.createElementVNode)(`div`,S,[(0,l.createElementVNode)(`div`,C,[n.showIcon?((0,l.openBlock)(),(0,l.createBlock)(o,(0,l.mergeProps)({key:0,kind:n.kind,"icon-class":n.iconClass,size:`200`},a.toastListeners),{default:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`icon`)]),_:3},16,[`kind`,`icon-class`])):(0,l.createCommentVNode)(``,!0),(0,l.createVNode)(s,(0,l.mergeProps)({"header-id":n.headerId,"content-id":n.contentId,"header-text":n.headerText,"header-class":n.headerClass,"content-class":n.contentClass,role:n.role},a.toastListeners),{header:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`header`)]),_:3},16,[`header-id`,`content-id`,`header-text`,`header-class`,`content-class`,`role`]),(0,l.createVNode)(c,(0,l.mergeProps)({"show-action":!1,"show-close":n.showClose,"action-class":n.actionClass,"button-size":100},a.toastListeners,{onClose:t[0]||(t[0]=t=>e.$emit(`close`))}),null,16,[`show-close`,`action-class`])]),(0,l.createElementVNode)(`div`,w,[(0,l.renderSlot)(e.$slots,`default`,{},()=>[(0,l.createTextVNode)((0,l.toDisplayString)(n.message),1)])])])],10,x)):(0,l.createCommentVNode)(``,!0)}var E=n.t(b,[[`render`,T]]),D={name:`DtToast`,components:{ToastLayoutDefault:h,ToastLayoutAlternate:E},inheritAttrs:!1,props:{headerId:{type:String,default:void 0},contentId:{type:String,default:void 0},headerText:{type:String,default:void 0},message:{type:String,default:void 0},role:{type:String,default:`status`},kind:{type:String,default:void 0},important:{type:Boolean,default:!1},open:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},showAction:{type:Boolean,default:!0},duration:{type:Number,default:null,validator:e=>e>=c.TOAST_MIN_DURATION},layout:{type:String,default:`default`,validator:e=>c.TOAST_LAYOUTS.includes(e)},iconClass:{type:[String,Array,Object],default:``},headerClass:{type:[String,Array,Object],default:``},contentClass:{type:[String,Array,Object],default:``},actionClass:{type:[String,Array,Object],default:``}},emits:[`close`,`update:open`],data(){return{isShown:!1,minDuration:c.TOAST_MIN_DURATION}},computed:{shouldSetTimeout(){return!!this.duration&&this.duration>=this.minDuration},selectedLayout(){return this.layout===`alternate`?E:h}},watch:{open:{handler:function(e){this.isShown=e,e?this.setTimeout():clearTimeout(this.displayTimer)},immediate:!0}},unmounted(){clearTimeout(this.displayTimer)},methods:{setTimeout(){this.shouldSetTimeout&&(this.displayTimer=setTimeout(()=>{this.isShown=!1,this.$emit(`update:open`,!1)},this.duration))},handleClose(){this.isShown=!1,this.$emit(`close`),this.$emit(`update:open`,!1)}}};function O(e,t,n,r,i,a){return(0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(a.selectedLayout),(0,l.mergeProps)({"is-shown":i.isShown,"header-id":n.headerId,"content-id":n.contentId,"header-text":n.headerText,message:n.message,role:n.role,kind:n.kind,important:n.important,"show-close":n.showClose,"show-icon":n.showIcon,"show-action":n.showAction,"icon-class":n.iconClass,"header-class":n.headerClass,"content-class":n.contentClass,"action-class":n.actionClass},e.$attrs,{onClose:a.handleClose}),{icon:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`icon`)]),header:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`header`)]),action:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`action`)]),default:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`default`)]),_:3},16,[`is-shown`,`header-id`,`content-id`,`header-text`,`message`,`role`,`kind`,`important`,`show-close`,`show-icon`,`show-action`,`icon-class`,`header-class`,`content-class`,`action-class`,`onClose`])}var k=n.t(D,[[`render`,O]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return k}});
|
|
2
|
-
//# sourceMappingURL=Toast--W8p7jzA.cjs.map
|
package/dist/chunk-Bmb41Sf3.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["DEFAULT_VALIDATION_MESSAGE_TYPE","VALIDATION_MESSAGE_TYPES","Comment","Text"],"sources":["../../../common/utils/index.js"],"sourcesContent":["import {\n DEFAULT_PREFIX,\n DEFAULT_VALIDATION_MESSAGE_TYPE,\n VALIDATION_MESSAGE_TYPES,\n} from '../constants/index.js';\nimport {\n h,\n Comment,\n Text,\n} from 'vue';\n\nlet UNIQUE_ID_COUNTER = 0;\nlet TIMER;\n\n// selector to find focusable not hidden inputs\nconst FOCUSABLE_SELECTOR_NOT_HIDDEN = 'input:not([type=hidden]):not(:disabled)';\n// selector to find focusable not disables elements\nconst FOCUSABLE_SELECTOR_NOT_DISABLED = 'select:not(:disabled),textarea:not(:disabled),button:not(:disabled)';\n// // selector to find focusable not hidden and disabled elements\nconst FOCUSABLE_SELECTOR_NOT_HIDDEN_DISABLED = `${FOCUSABLE_SELECTOR_NOT_HIDDEN},${FOCUSABLE_SELECTOR_NOT_DISABLED}`;\n// selector to find focusable elements\nconst FOCUSABLE_SELECTOR = `a,frame,iframe,${FOCUSABLE_SELECTOR_NOT_HIDDEN_DISABLED},*[tabindex]`;\n\nconst scheduler = typeof setImmediate === 'function' ? setImmediate : setTimeout;\n\nexport function getUniqueString (prefix = DEFAULT_PREFIX) {\n return `${prefix}${UNIQUE_ID_COUNTER++}`;\n}\n\n/**\n * Returns a random element from array\n * @param array - the array to return a random element from\n * @param {string} seed - use a string to seed the randomization, so it returns the same element each time\n * based on that string.\n * @returns {*} - the random element\n */\nexport function getRandomElement (array, seed) {\n if (seed) {\n const hash = javaHashCode(seed);\n return array[Math.abs(hash) % array.length];\n } else {\n return array[getRandomInt(array.length)];\n }\n}\n\n/**\n * Returns a hash code for a string.\n * (Compatible to Java's String.hashCode())\n * We use this algo to be in sync with android.\n *\n * The hash code for a string object is computed as\n * s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]\n * using number arithmetic, where s[i] is the i th character\n * of the given string, n is the length of the string,\n * and ^ indicates exponentiation.\n * (The hash value of the empty string is zero.)\n *\n * @param {string} str a string\n * @return {number} a hash code value for the given string.\n */\nexport function javaHashCode (str) {\n let h;\n for (let i = 0; i < str.length; i++) {\n h = Math.imul(31, h) + str.charCodeAt(i) | 0;\n }\n\n return h;\n}\n\n/**\n * Generate a random integer\n * @param {number} max - max range of integer to generate\n * @returns {number} randomly generated integer between 0 and max\n */\nexport function getRandomInt (max) {\n return Math.floor(Math.random() * max);\n}\n\nexport function formatMessages (messages) {\n if (!messages) {\n return [];\n }\n\n return messages.map(message => {\n if (typeof message === 'string') {\n return {\n message,\n type: DEFAULT_VALIDATION_MESSAGE_TYPE,\n };\n }\n\n return message;\n });\n}\n\nexport function filterFormattedMessages (formattedMessages) {\n const validationState = getValidationState(formattedMessages);\n\n if (!formattedMessages || !validationState) {\n return [];\n }\n\n return formattedMessages.filter(message => !!message.message && message.type === validationState);\n}\n\n/*\n * The priority order of message types is: 'critical' > 'warning' > 'positive' > 'info'.\n * If any message of type 'critical' is present in messages, the input state is considered\n * to be 'critical', then 'warning', then 'positive', and lastly 'info'.\n */\nexport function getValidationState (formattedMessages) {\n if (!formattedMessages) {\n return null;\n }\n\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.CRITICAL)) {\n return VALIDATION_MESSAGE_TYPES.CRITICAL;\n }\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.WARNING)) {\n return VALIDATION_MESSAGE_TYPES.WARNING;\n }\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.POSITIVE)) {\n return VALIDATION_MESSAGE_TYPES.POSITIVE;\n }\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.INFO)) {\n return VALIDATION_MESSAGE_TYPES.INFO;\n }\n\n return null;\n}\n\nexport function hasFormattedMessageOfType (formattedMessages, messageType) {\n if (!formattedMessages || !messageType) {\n return false;\n }\n\n return formattedMessages.some(message => message?.type === messageType);\n}\n\nexport function findFirstFocusableNode (element) {\n return element?.querySelector(FOCUSABLE_SELECTOR);\n}\n\n/* html-fragment component:\n * To render html without wrapping in another element as when using v-html.\n * props: html\n */\nexport const htmlFragment = (props) => {\n return h('div', { innerHTML: props.html });\n};\n\nexport const flushPromises = () => {\n return new Promise((resolve) => {\n scheduler(resolve);\n });\n};\n\n/*\n It is very cumbersome to check if a slot is empty in vue 3. Copied this method from the following thread\n https://github.com/vuejs/core/issues/4733. There is an RFC to fix this but not yet being worked on.\n https://github.com/vuejs/rfcs/discussions/453\n*/\nexport function hasSlotContent (slot, slotProps = {}) {\n if (!slot) return false;\n\n\n return slot(slotProps).some((vnode) => {\n if (vnode.type === Comment) return false;\n\n if (Array.isArray(vnode.children) && !vnode.children.length) return false;\n\n return (\n vnode.type !== Text ||\n (typeof vnode.children === 'string' && vnode.children.trim() !== '')\n );\n });\n}\n\n/**\n * Transform a string from kebab-case to PascalCase\n * @param string\n * @returns {string}\n */\nexport const kebabCaseToPascalCase = (string) => {\n return string?.toLowerCase()\n .split('-')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join('');\n};\n\n/**\n * Transform a string from PascalCase to kebab-case\n * @param string\n * @returns {string}\n */\nexport const pascalCaseToKebabCase = (string) => {\n return string\n .replace(/\\.?([A-Z0-9]+)/g, (x, y) => '-' + y.toLowerCase())\n .replace(/^-/, '');\n};\n\n/**\n * Extracts Vue event listeners from attributes object\n * @param {Object} attrs - The attributes object to extract listeners from\n * @returns {Object} Object containing only Vue event listeners (keys matching on[A-Z])\n */\nexport const extractVueListeners = (attrs) => {\n const listeners = Object.entries(attrs)\n .filter(([key]) => key.match(/on[A-Z]/));\n return Object.fromEntries(listeners);\n};\n\n/**\n * Extracts non-listener attributes from attributes object\n * @param {Object} attrs - The attributes object to extract non-listeners from\n * @returns {Object} Object containing only non-listener attributes (keys not matching on[A-Z])\n */\nexport const extractNonListeners = (attrs) => {\n const nonListeners = Object.entries(attrs)\n .filter(([key]) => !key.match(/on[A-Z]/));\n return Object.fromEntries(nonListeners);\n};\n\n/**\n * $el works very differently than in vue 2, if the first node in the template is a text node\n * such as a comment it will return that instead of the first actual element. This function\n * will recursively return the first element in the template instead of the first node.\n * @param el\n * @returns {HTMLElement} The first element in the template\n */\nexport const returnFirstEl = (el) => {\n if (el?.nodeType === Node.ELEMENT_NODE) {\n return el;\n } else if (!el?.nodeType) {\n return null;\n } else {\n return returnFirstEl(el?.nextSibling);\n }\n};\n\n/**\n In Vue 3, $attrs includes class and style attributes, but when using inheritAttrs: false\n and manually binding :class=\"$attrs.class\" and :style=\"$attrs.style\" to the root element,\n we need to prevent class/style from being passed to inner elements via v-bind=\"removeClassStyleAttrs($attrs)\".\n This function removes class and style attributes from the attrs object.\n*/\nexport function removeClassStyleAttrs (attrs) {\n const listeners = Object.entries(attrs)\n .filter(([key]) => !['class', 'style'].includes(key));\n return Object.fromEntries(listeners);\n}\n\n\n/*\n* Set's a global timer to debounce the execution of a function.\n* @param { object } func - the function that is going to be called after timeout\n* @param { number } [timeout=300] timeout\n* */\nexport function debounce (func, timeout = 300) {\n clearTimeout(TIMER);\n TIMER = setTimeout(func, timeout);\n}\n\n/**\n * Checks if the element is out of the viewport\n * https://gomakethings.com/how-to-check-if-any-part-of-an-element-is-out-of-the-viewport-with-vanilla-js/\n * @param {HTMLElement} element The element to check\n * @return {Object} A set of booleans for each side of the element\n */\n\nexport function isOutOfViewPort (element) {\n const bounding = element.getBoundingClientRect();\n\n const isOut = {\n top: bounding.top < 0,\n left: bounding.left < 0,\n bottom: bounding.bottom > (window.innerHeight || document.documentElement.clientHeight),\n right: bounding.right > (window.innerWidth || document.documentElement.clientWidth),\n };\n isOut.any = Object.values(isOut).some(val => val);\n isOut.all = Object.values(isOut).every(val => val);\n return isOut;\n}\n\n// match valid characters for a domain name followed by a dot, e.g. \"dialpad.\"\nconst domainNameRegex = /(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)/;\n\n// match valid TLDs for a hostname (outdated list from ~2017)\nconst tldRegerx = new RegExp(\n '(?:' +\n 'com|ru|org|net|de|jp|uk|br|it|pl|fr|in|au|ir|info|nl|cn|es|cz|kr|ca|eu|ua|co|gr|' +\n 'za|ro|biz|ch|se|tw|mx|vn|hu|be|tr|at|dk|tv|me|ar|sk|no|us|fi|id|cl|xyz|io|pt|by|' +\n 'il|ie|nz|kz|hk|lt|cc|my|sg|club|bg|edu|рф|pk|su|top|th|hr|rs|pe|pro|si|az|lv|pw|' +\n 'ae|ph|online|ng|ee|ws|ve|cat' +\n ')',\n);\n\n// match valid IPv4 addresses, e.g. \"192.158.1.38\"\nconst ipv4Regex = new RegExp(\n '(?:(?:[0-9]|[1-9]\\\\d|1\\\\d{2}|2[0-4]\\\\d|25[0-5])\\\\.){3}' +\n '(?:[0-9]|[1-9]\\\\d|1\\\\d{2}|2[0-4]\\\\d|25[0-5])',\n);\n\n// match hostnames OR IPv4 addresses, e.g. \"dialpad.com\" or \"192.158.1.38\"\nconst hostnameOrIpRegex = new RegExp(\n '(?:' +\n [\n [\n domainNameRegex.source,\n tldRegerx.source,\n ].join('+'),\n ipv4Regex.source,\n ].join('|') +\n ')',\n);\n\n// match URL paths, e.g. \"/news\"\nconst urlPathRegex = /(?:(?:[;/][^#?<>\\s]*)?)/;\n\n// match URL queries and fragments, e.g. \"?cache=1&new=true\" or \"#heading1\"\nconst urlQueryOrFragmentRegex = /(?:(?:\\?[^#<>\\s]+)?(?:#[^<>\\s]+)?)/;\n\n// match complete hostnames or IPv4 addresses without a protocol and with optional\n// URL paths, queries and fragments e.g. \"dialpad.com/news?cache=1#heading1\"\nconst urlWithoutProtocolRegex = new RegExp(\n '\\\\b' +\n [\n hostnameOrIpRegex.source,\n urlPathRegex.source,\n urlQueryOrFragmentRegex.source,\n '(?!\\\\w)',\n ].join('+'),\n);\n\n// match complete hostnames with protocols and optional URL paths, queries and fragments,\n// e.g. \"ws://localhost:9011\" or \"https://dialpad.com/news?cache=1#heading1\"\nconst urlWithProtocolRegex = /\\b[a-z\\d.-]+:\\/\\/[^<>\\s]+/;\n\n// match email addresses with an optional \"mailto:\" prefix and URL queries, e.g.\n// \"hey@dialpad.com\" or \"mailto:hey@dialpad.com?subject=Hi&body=Hey%20there\"\nconst emailAddressRegex = new RegExp(\n '(?:mailto:)?' +\n '[a-z0-9!#$%&\\'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&\\'*+/=?^_`{|}~-]+)*@' +\n [\n hostnameOrIpRegex.source,\n urlQueryOrFragmentRegex.source,\n ].join('+') +\n '(?!\\\\w)',\n);\n\n/**\n * Match phone numbers, e.g. \"765-8813\", \"(778) 765-8813\" or \"+17787658813\".\n * @param {number} minLength\n * @param {number} maxLength\n * @returns {RegExp}\n */\nexport function getPhoneNumberRegex (minLength = 7, maxLength = 15) {\n // Some older browser versions don't support lookbehind, so provide a RegExp\n // version without it. It fails just one test case, so IMO it's still good\n // enough to use. https://caniuse.com/js-regexp-lookbehind\n try {\n return new RegExp(\n '(?:^|(?<=\\\\W))' +\n '(?![\\\\s\\\\-])\\\\+?(?:[0-9()\\\\- \\\\t]' +\n `{${minLength},${maxLength}}` +\n ')(?=\\\\b)(?=\\\\W(?=\\\\W|$)|\\\\s|$)',\n );\n } catch {\n \n console.warn('This browser doesn\\'t support regex lookahead/lookbehind');\n }\n\n return new RegExp(\n '(?![\\\\s\\\\-])\\\\+?(?:[0-9()\\\\- \\\\t]' +\n `{${minLength},${maxLength}}` +\n ')(?=\\\\b)(?=\\\\W(?=\\\\W|$)|\\\\s|$)',\n );\n}\n\nconst phoneNumberRegex = getPhoneNumberRegex();\n\n// match all link types\nexport const linkRegex = new RegExp(\n [\n urlWithoutProtocolRegex.source,\n urlWithProtocolRegex.source,\n emailAddressRegex.source,\n phoneNumberRegex.source,\n ].join('|'),\n 'gi',\n);\n\n/**\n * Check if a string is a phone number. Validates only exact matches.\n * @param {string|number} input\n * @returns {boolean}\n */\nexport function isPhoneNumber (input) {\n if (!input || (!['string', 'number'].includes(typeof input))) return false;\n input = input.toString();\n return phoneNumberRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Check if a string is an URL. Validates only exact matches.\n * @param {string} input\n * @returns {boolean}\n */\nexport function isURL (input) {\n if (!input || typeof input !== 'string') return false;\n return urlWithoutProtocolRegex.exec(input)?.[0] === input ||\n urlWithProtocolRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Check if a string is an email address. Validates only exact matches.\n * @param {string} input\n * @returns {boolean}\n */\nexport function isEmailAddress (input) {\n if (!input || typeof input !== 'string') return false;\n return emailAddressRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Concatenate a string removing null or undefined elements\n * avoiding parsing them as string with template strings\n * @param {Array} elements\n * @returns {String}\n */\nexport function safeConcatStrings (elements) {\n return elements.filter(str => !!str).join(', ');\n}\n\n/**\n * Locale safe function to capitalize the first letter of a string.\n * @param {string} str the string to capitalize the first letter of\n * @param {string} locale a string representing the locale to be used. Defaults to 'en-US'\n * @returns The passed in string with the first letter capitalized\n */\nexport function capitalizeFirstLetter (str, locale = 'en-US') {\n return str.replace(/^\\p{CWU}/u, char => char.toLocaleUpperCase(locale));\n}\n\n/**\n * Warns if the component is not mounted properly. Useful for tests.\n * @param {HTMLElement} componentRef - the component reference\n * @param {string} componentName - the component name\n */\n\nexport function warnIfUnmounted (componentRef, componentName) {\n if (typeof process === 'undefined') return;\n if (process.env.NODE_ENV !== 'test') return;\n if (!componentRef || !(componentRef instanceof HTMLElement) || !document?.body) return;\n if (!document.body.contains(componentRef)) {\n console.warn(`The ${componentName} component is not attached to the document body. This may cause issues.`);\n }\n}\n\n/**\n * checks whether the dt-scrollbar is being used on the root element.\n * @param rootElement {HTMLElement}\n * @returns {boolean}\n */\nfunction isDtScrollbarInUse (rootElement = document.documentElement) {\n if (rootElement.hasAttribute('data-overlayscrollbars')) {\n return true;\n }\n return false;\n}\n\n/**\n * This will disable scrolling on the root element regardless of whether you are using dt-scrollbar or not.\n * @param rootElement {HTMLElement}\n */\nexport function disableRootScrolling (rootElement = document.documentElement) {\n if (isDtScrollbarInUse(rootElement)) {\n rootElement.classList.add('d-scrollbar-disabled');\n } else {\n rootElement.classList.add('d-of-hidden');\n }\n}\n\n/**\n * This will enable scrolling on the root element regardless of whether you are using dt-scrollbar or not.\n * @param rootElement {HTMLElement}\n */\nexport function enableRootScrolling (rootElement = document.documentElement) {\n if (isDtScrollbarInUse(rootElement)) {\n rootElement.classList.remove('d-scrollbar-disabled');\n } else {\n rootElement.classList.remove('d-of-hidden');\n }\n}\n\n/**\n * This will take a text string e.g \"accessibility-mac\"\n * and convert it to our Fluent Key standard format \"ACCESSIBILITY_MAC\"\n * @param text\n * @returns {string}\n */\nexport function toFluentKeyString (text) {\n return text\n .replaceAll(/[ -]/g, '_')\n .replaceAll(/\\W/g, '')\n .toUpperCase();\n}\n\nexport default {\n getUniqueString,\n getRandomElement,\n getRandomInt,\n formatMessages,\n filterFormattedMessages,\n hasFormattedMessageOfType,\n getValidationState,\n htmlFragment,\n flushPromises,\n kebabCaseToPascalCase,\n extractVueListeners,\n extractNonListeners,\n removeClassStyleAttrs,\n returnFirstEl,\n debounce,\n isOutOfViewPort,\n getPhoneNumberRegex,\n linkRegex,\n isEmailAddress,\n isPhoneNumber,\n isURL,\n safeConcatStrings,\n capitalizeFirstLetter,\n disableRootScrolling,\n enableRootScrolling,\n};\n\n"],"mappings":"kMAWA,IAAI,EAAoB,EACpB,EASE,EAAqB,yIAErB,EAAY,OAAO,cAAiB,WAAa,aAAe,WAEtE,SAAgB,EAAiB,EAAA,KAAyB,CACxD,MAAO,GAAG,IAAS,MAUrB,SAAgB,EAAkB,EAAO,EAAM,CAC7C,GAAI,EAAM,CACR,IAAM,EAAO,EAAa,EAAK,CAC/B,OAAO,EAAM,KAAK,IAAI,EAAK,CAAG,EAAM,aAEpC,OAAO,EAAM,EAAa,EAAM,OAAO,EAmB3C,SAAgB,EAAc,EAAK,CACjC,IAAI,EACJ,IAAK,IAAI,EAAI,EAAG,EAAI,EAAI,OAAQ,IAC9B,EAAI,KAAK,KAAK,GAAI,EAAE,CAAG,EAAI,WAAW,EAAE,CAAG,EAG7C,OAAO,EAQT,SAAgB,EAAc,EAAK,CACjC,OAAO,KAAK,MAAM,KAAK,QAAQ,CAAG,EAAI,CAGxC,SAAgB,EAAgB,EAAU,CAKxC,OAJK,EAIE,EAAS,IAAI,GACd,OAAO,GAAY,SACd,CACL,UACA,KAAMA,EAAAA,gCACP,CAGI,EACP,CAZO,EAAE,CAeb,SAAgB,EAAyB,EAAmB,CAC1D,IAAM,EAAkB,EAAmB,EAAkB,CAM7D,MAJI,C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vB,QAAA,IAAA,WAA6B,SACzB,CAAC,GAAgB,EAAE,aAAwB,cAAgB,CAAC,UAAU,MACrE,SAAS,KAAK,SAAS,EAAa,EACvC,QAAQ,KAAK,OAAO,EAAc,yEAAyE,EAS/G,SAAS,EAAoB,EAAc,SAAS,gBAAiB,CAInE,MAHA,EAAI,EAAY,aAAa,yBAAyB,CAUxD,SAAgB,EAAsB,EAAc,SAAS,gBAAiB,CACxE,EAAmB,EAAY,CACjC,EAAY,UAAU,IAAI,uBAAuB,CAEjD,EAAY,UAAU,IAAI,cAAc,CAQ5C,SAAgB,EAAqB,EAAc,SAAS,gBAAiB,CACvE,EAAmB,EAAY,CACjC,EAAY,UAAU,OAAO,uBAAuB,CAEpD,EAAY,UAAU,OAAO,cAAc,CAU/C,SAAgB,EAAmB,EAAM,CACvC,OAAO,EACJ,WAAW,QAAS,IAAI,CACxB,WAAW,MAAO,GAAG,CACrB,aAAa,CAGlB,IAAA,EAAe,CACb,kBACA,mBACA,eACA,iBACA,0BACA,4BACA,qBACA,eACA,gBACA,wBACA,sBACA,sBACA,wBACA,gBACA,WACA,kBACA,sBACA,YACA,iBACA,gBACA,QACA,oBACA,wBACA,uBACA,sBACD"}
|
/package/dist/{_plugin-vue_export-helper-BTgDAbhb.js → _plugin-vue_export-helper-B52Kst-M.js}
RENAMED
|
File without changes
|
/package/dist/{_plugin-vue_export-helper-D8jCH6HB.cjs → _plugin-vue_export-helper-CX7YVcP6.cjs}
RENAMED
|
File without changes
|