@dialpad/dialtone-vue 4.4.0 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Datepicker-CGFa1nGm.js → Datepicker-D-Lgvthq.js} +17 -5
- package/dist/Datepicker-D-Lgvthq.js.map +1 -0
- package/dist/Datepicker-DmKOuf5y.cjs +2 -0
- package/dist/Datepicker-DmKOuf5y.cjs.map +1 -0
- package/dist/EmojiPicker-CXFd-iVj.cjs +2 -0
- package/dist/EmojiPicker-CXFd-iVj.cjs.map +1 -0
- package/dist/{EmojiPicker-BllVwJf4.js → EmojiPicker-D46lLRMp.js} +75 -41
- package/dist/EmojiPicker-D46lLRMp.js.map +1 -0
- package/dist/{ForceLinkify-bO3ug94b.js → ForceLinkify-DuAo3TMB.js} +1 -1
- package/dist/{ForceLinkify-bO3ug94b.js.map → ForceLinkify-DuAo3TMB.js.map} +1 -1
- package/dist/{ForceLinkify-CI1tkUBf.cjs → ForceLinkify-kQ_kWKVm.cjs} +1 -1
- package/dist/{ForceLinkify-CI1tkUBf.cjs.map → ForceLinkify-kQ_kWKVm.cjs.map} +1 -1
- package/dist/{MarkdownRenderer-B6oyniLV.cjs → MarkdownRenderer-C5wdjC5_.cjs} +1 -1
- package/dist/{MarkdownRenderer-B6oyniLV.cjs.map → MarkdownRenderer-C5wdjC5_.cjs.map} +1 -1
- package/dist/{MarkdownRenderer-D-EV50_M.js → MarkdownRenderer-eMwmPygx.js} +1 -1
- package/dist/{MarkdownRenderer-D-EV50_M.js.map → MarkdownRenderer-eMwmPygx.js.map} +1 -1
- package/dist/RichTextEditor-7eY8gy9u.cjs +11 -0
- package/dist/RichTextEditor-7eY8gy9u.cjs.map +1 -0
- package/dist/{RichTextEditor-Cz2VXb7-.js → RichTextEditor-DaOHmXD_.js} +362 -1254
- package/dist/RichTextEditor-DaOHmXD_.js.map +1 -0
- package/dist/{Scroller-JDoDYC5V.js → Scroller-B1xwv6TG.js} +1 -1
- package/dist/{Scroller-JDoDYC5V.js.map → Scroller-B1xwv6TG.js.map} +1 -1
- package/dist/{Scroller-Du2kJsTR.cjs → Scroller-pAU8UWIH.cjs} +1 -1
- package/dist/{Scroller-Du2kJsTR.cjs.map → Scroller-pAU8UWIH.cjs.map} +1 -1
- package/dist/Slider-D2cDYZcJ.cjs +2 -0
- package/dist/Slider-D2cDYZcJ.cjs.map +1 -0
- package/dist/Slider-Du45PVLU.js +1188 -0
- package/dist/Slider-Du45PVLU.js.map +1 -0
- package/dist/{TextList-D40u4g4T.js → TextList-7RwngSie.js} +1 -1
- package/dist/{TextList-D40u4g4T.js.map → TextList-7RwngSie.js.map} +1 -1
- package/dist/{TextList-rS1MQdPB.cjs → TextList-CLUdOdlp.cjs} +1 -1
- package/dist/{TextList-rS1MQdPB.cjs.map → TextList-CLUdOdlp.cjs.map} +1 -1
- package/dist/{TextListItem-CF6DzdvT.cjs → TextListItem-B-bhrqik.cjs} +1 -1
- package/dist/{TextListItem-CF6DzdvT.cjs.map → TextListItem-B-bhrqik.cjs.map} +1 -1
- package/dist/{TextListItem-PHgDIWV1.js → TextListItem-D0UmIR_q.js} +1 -1
- package/dist/{TextListItem-PHgDIWV1.js.map → TextListItem-D0UmIR_q.js.map} +1 -1
- package/dist/{Toast-CN9x3jKH.cjs → Toast-57Ts-hX9.cjs} +1 -1
- package/dist/{Toast-CN9x3jKH.cjs.map → Toast-57Ts-hX9.cjs.map} +1 -1
- package/dist/{Toast-DVUE2_fV.js → Toast-BNhGD6l8.js} +1 -1
- package/dist/{Toast-DVUE2_fV.js.map → Toast-BNhGD6l8.js.map} +1 -1
- package/dist/component-documentation.json +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.vue.d.ts.map +1 -1
- package/dist/components/Codeblock/Codeblock.vue.d.ts.map +1 -1
- package/dist/components/Datepicker/Datepicker.vue.d.ts.map +1 -1
- package/dist/components/Datepicker/Modules/Calendar.vue.d.ts.map +1 -1
- package/dist/components/Datepicker/Modules/MonthYearPicker.vue.d.ts.map +1 -1
- package/dist/components/DescriptionList/DescriptionList.vue.d.ts.map +1 -1
- package/dist/components/Emoji/Emoji.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/EmojiPicker.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/Modules/EmojiDescription.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/Modules/EmojiSearch.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/Modules/EmojiSelector.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/Modules/EmojiSkinSelector.vue.d.ts.map +1 -1
- package/dist/components/EmojiPicker/Modules/EmojiTabset.vue.d.ts.map +1 -1
- package/dist/components/EmptyState/EmptyState.vue.d.ts.map +1 -1
- package/dist/components/KeyboardShortcut/KeyboardShortcut.vue.d.ts.map +1 -1
- package/dist/components/LazyShow/LazyShow.vue.d.ts.map +1 -1
- package/dist/components/ModeIsland/ModeIsland.vue.d.ts.map +1 -1
- package/dist/components/MotionText/MotionText.vue.d.ts.map +1 -1
- package/dist/components/MotionText/MotionTextConstants.d.ts +72 -0
- package/dist/components/MotionText/MotionTextConstants.d.ts.map +1 -1
- package/dist/components/MotionText/index.d.ts +1 -1
- package/dist/components/MotionText/utils.d.ts +9 -0
- package/dist/components/MotionText/utils.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.vue.d.ts.map +1 -1
- package/dist/components/Slider/Composables/UseSliderCollisionAvoidance.d.ts +25 -0
- package/dist/components/Slider/Composables/UseSliderCollisionAvoidance.d.ts.map +1 -0
- package/dist/components/Slider/Composables/UseSliderDevWarnings.d.ts +5 -0
- package/dist/components/Slider/Composables/UseSliderDevWarnings.d.ts.map +1 -0
- package/dist/components/Slider/Composables/UseSliderDirection.d.ts +4 -0
- package/dist/components/Slider/Composables/UseSliderDirection.d.ts.map +1 -0
- package/dist/components/Slider/Composables/UseSliderGeometry.d.ts +88 -0
- package/dist/components/Slider/Composables/UseSliderGeometry.d.ts.map +1 -0
- package/dist/components/Slider/Composables/UseSliderInteraction.d.ts +33 -0
- package/dist/components/Slider/Composables/UseSliderInteraction.d.ts.map +1 -0
- package/dist/components/Slider/Composables/UseSliderMagneticSnap.d.ts +8 -0
- package/dist/components/Slider/Composables/UseSliderMagneticSnap.d.ts.map +1 -0
- package/dist/components/Slider/Composables/UseSliderMarksAndTicks.d.ts +13 -0
- package/dist/components/Slider/Composables/UseSliderMarksAndTicks.d.ts.map +1 -0
- package/dist/components/Slider/Composables/UseSliderTooltipReadout.d.ts +10 -0
- package/dist/components/Slider/Composables/UseSliderTooltipReadout.d.ts.map +1 -0
- package/dist/components/Slider/Composables/UseSliderValue.d.ts +16 -0
- package/dist/components/Slider/Composables/UseSliderValue.d.ts.map +1 -0
- package/dist/components/Slider/Slider.vue.d.ts +304 -0
- package/dist/components/Slider/Slider.vue.d.ts.map +1 -0
- package/dist/components/Slider/SliderConstants.d.ts +7 -0
- package/dist/components/Slider/SliderConstants.d.ts.map +1 -0
- package/dist/components/Slider/index.d.ts +3 -0
- package/dist/components/Slider/index.d.ts.map +1 -0
- package/dist/components/Slider/utils.d.ts +8 -0
- package/dist/components/Slider/utils.d.ts.map +1 -0
- package/dist/dialtone-vue.cjs +1 -1
- package/dist/dialtone-vue.js +26 -24
- package/dist/floating-ui.dom-D2zQ_96p.cjs +2 -0
- package/dist/floating-ui.dom-D2zQ_96p.cjs.map +1 -0
- package/dist/floating-ui.dom-j5GI2lJG.js +963 -0
- package/dist/floating-ui.dom-j5GI2lJG.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/lib/button-group/button-group.cjs +1 -1
- package/dist/lib/button-group/button-group.cjs.map +1 -1
- package/dist/lib/button-group/button-group.js +2 -1
- package/dist/lib/button-group/button-group.js.map +1 -1
- package/dist/lib/codeblock/codeblock.cjs +1 -1
- package/dist/lib/codeblock/codeblock.cjs.map +1 -1
- package/dist/lib/codeblock/codeblock.js +7 -1
- package/dist/lib/codeblock/codeblock.js.map +1 -1
- 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.js +1 -1
- package/dist/lib/description-list/description-list.cjs +1 -1
- package/dist/lib/description-list/description-list.cjs.map +1 -1
- package/dist/lib/description-list/description-list.js +14 -5
- package/dist/lib/description-list/description-list.js.map +1 -1
- package/dist/lib/emoji/emoji.cjs +1 -1
- package/dist/lib/emoji/emoji.cjs.map +1 -1
- package/dist/lib/emoji/emoji.js +5 -1
- package/dist/lib/emoji/emoji.js.map +1 -1
- 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.js +1 -1
- 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 +6 -3
- package/dist/lib/empty-state/empty-state.js.map +1 -1
- package/dist/lib/keyboard-shortcut/keyboard-shortcut.cjs +1 -1
- package/dist/lib/keyboard-shortcut/keyboard-shortcut.cjs.map +1 -1
- package/dist/lib/keyboard-shortcut/keyboard-shortcut.js +8 -2
- package/dist/lib/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
- package/dist/lib/lazy-show/lazy-show.cjs +1 -1
- package/dist/lib/lazy-show/lazy-show.cjs.map +1 -1
- package/dist/lib/lazy-show/lazy-show.js +10 -10
- package/dist/lib/lazy-show/lazy-show.js.map +1 -1
- package/dist/lib/mode-island/mode-island.cjs +1 -1
- package/dist/lib/mode-island/mode-island.cjs.map +1 -1
- package/dist/lib/mode-island/mode-island.js +1 -0
- package/dist/lib/mode-island/mode-island.js.map +1 -1
- package/dist/lib/motion-text/index.cjs +1 -1
- package/dist/lib/motion-text/index.js +3 -3
- package/dist/lib/motion-text/motion-text-constants.cjs +1 -1
- package/dist/lib/motion-text/motion-text-constants.cjs.map +1 -1
- package/dist/lib/motion-text/motion-text-constants.js +64 -2
- package/dist/lib/motion-text/motion-text-constants.js.map +1 -1
- package/dist/lib/motion-text/motion-text.cjs +1 -1
- package/dist/lib/motion-text/motion-text.cjs.map +1 -1
- package/dist/lib/motion-text/motion-text.js +186 -146
- package/dist/lib/motion-text/motion-text.js.map +1 -1
- package/dist/lib/motion-text/utils.cjs +2 -0
- package/dist/lib/motion-text/utils.cjs.map +1 -0
- package/dist/lib/motion-text/utils.js +24 -0
- package/dist/lib/motion-text/utils.js.map +1 -0
- 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.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/scroller/index.cjs +1 -1
- 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/skeleton/skeleton.cjs +1 -1
- package/dist/lib/skeleton/skeleton.cjs.map +1 -1
- package/dist/lib/skeleton/skeleton.js +1 -0
- package/dist/lib/skeleton/skeleton.js.map +1 -1
- package/dist/lib/slider/index.cjs +1 -0
- package/dist/lib/slider/index.js +2 -0
- package/dist/lib/slider/slider.cjs +1 -0
- package/dist/lib/slider/slider.js +2 -0
- package/dist/lib/slider/utils.cjs +2 -0
- package/dist/lib/slider/utils.cjs.map +1 -0
- package/dist/lib/slider/utils.js +32 -0
- package/dist/lib/slider/utils.js.map +1 -0
- package/dist/lib/text-list/index.cjs +1 -1
- 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.js +1 -1
- package/dist/lib/toast/toast.cjs +1 -1
- package/dist/lib/toast/toast.js +1 -1
- package/package.json +4 -4
- package/dist/Datepicker-CGFa1nGm.js.map +0 -1
- package/dist/Datepicker-DkGmnVc8.cjs +0 -2
- package/dist/Datepicker-DkGmnVc8.cjs.map +0 -1
- package/dist/EmojiPicker-BllVwJf4.js.map +0 -1
- package/dist/EmojiPicker-KO1yhODv.cjs +0 -2
- package/dist/EmojiPicker-KO1yhODv.cjs.map +0 -1
- package/dist/RichTextEditor-Cz2VXb7-.js.map +0 -1
- package/dist/RichTextEditor-EHgahp8r.cjs +0 -11
- package/dist/RichTextEditor-EHgahp8r.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion-text.js","names":[],"sources":["../../../components/MotionText/MotionText.vue"],"sourcesContent":["<template>\n <span\n ref=\"contentRef\"\n :class=\"motionTextClasses\"\n :style=\"componentStyles\"\n :data-text-content=\"isStaticAnimationMode ? text : undefined\"\n :aria-live=\"isAnimating ? 'polite' : 'off'\"\n :aria-label=\"screenReaderText || undefined\"\n >\n <!-- Screen reader content -->\n <span\n v-if=\"screenReaderText\"\n class=\"d-motion-text__sr-only\"\n >\n {{ screenReaderText }}\n </span>\n\n <!-- Gradient-sweep and shimmer modes: Simple static text with gradient animation -->\n <template v-if=\"isStaticAnimationMode\">\n {{ text }}\n <slot v-if=\"!text\" />\n </template>\n\n <!-- Character-by-character animated content for other modes -->\n <span\n v-else\n :key=\"animationKey\"\n class=\"d-motion-text__content\"\n :aria-hidden=\"isAnimating\"\n >\n <template\n v-for=\"(word, wordIdx) in words\"\n :key=\"`${animationKey}-${wordIdx}`\"\n >\n <Transition\n :name=\"`d-motion-text-word-${animationMode}`\"\n >\n <span\n v-if=\"wordIdx < visibleWordCount\"\n class=\"d-motion-text__word\"\n :data-text-content=\"word.text\"\n :style=\"{ '--word-index': wordIdx }\"\n >\n <template\n v-for=\"(char, charIdx) in word.chars\"\n :key=\"`${animationKey}-${wordIdx}-${charIdx}`\"\n >\n <Transition\n :name=\"`d-motion-text-char-${animationMode}`\"\n >\n <span\n v-if=\"charIdx < visibleCharsPerWord[wordIdx]\"\n class=\"d-motion-text__char\"\n :style=\"{\n '--char-index': charIdx,\n '--char-delay': `${charIdx * timing.characterDelay}ms`,\n }\"\n >{{ char }}</span>\n </Transition>\n </template>\n </span>\n </Transition>\n </template>\n </span>\n\n <!-- Fallback slot content -->\n <span\n v-if=\"!words.length && !text && !isStaticAnimationMode\"\n class=\"d-motion-text__fallback\"\n >\n <slot />\n </span>\n </span>\n</template>\n\n<script>\nimport { MOTION_TEXT_ANIMATION_MODES, MOTION_TEXT_SPEEDS, MOTION_TEXT_TIMING_PRESETS } from './MotionTextConstants';\n\nexport default {\n name: 'DtMotionText',\n\n props: {\n /**\n * The text content to animate.\n * @type {string}\n */\n text: {\n type: String,\n default: '',\n },\n\n /**\n * The animation mode to use for the text reveal.\n * @values gradient-in, fade-in, slide-in, gradient-sweep, shimmer, none\n */\n animationMode: {\n type: String,\n default: 'gradient-in',\n validator: (value) => MOTION_TEXT_ANIMATION_MODES.includes(value),\n },\n\n /**\n * Animation speed.\n * @values 100, 200, 300, 400, 500\n */\n speed: {\n type: [String, Number],\n default: 300,\n validator: (value) => MOTION_TEXT_SPEEDS.includes(String(value)),\n },\n\n /**\n * Whether to start animation automatically when component is mounted.\n * @values true, false\n */\n autoStart: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether to loop the animation continuously.\n * @values true, false\n */\n loop: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Whether to respect the user's prefers-reduced-motion system setting.\n * @values true, false\n */\n respectsReducedMotion: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Alternative text for screen readers. If provided, this will be announced\n * instead of the animated text.\n * @type {string}\n */\n screenReaderText: {\n type: String,\n default: '',\n },\n },\n\n emits: [\n /**\n * Emitted when the animation starts.\n * @event start\n */\n 'start',\n\n /**\n * Emitted when the animation completes.\n * @event complete\n */\n 'complete',\n\n /**\n * Emitted during animation progress.\n * @event progress\n * @type {{ wordsComplete: number, totalWords: number, progress: number }}\n */\n 'progress',\n\n /**\n * Emitted when the animation is paused.\n * @event pause\n */\n 'pause',\n\n /**\n * Emitted when the animation resumes.\n * @event resume\n */\n 'resume',\n ],\n\n data () {\n return {\n words: [],\n visibleWordCount: 0,\n visibleCharsPerWord: [],\n isAnimating: false,\n isPaused: false,\n isLooped: false,\n animationTimeouts: [],\n prefersReducedMotion: false,\n animationKey: 0,\n };\n },\n\n computed: {\n /**\n * Get timing preset based on speed prop\n */\n timing () {\n return MOTION_TEXT_TIMING_PRESETS[String(this.speed)];\n },\n\n /**\n * Computed styles with timing CSS variables\n */\n componentStyles () {\n return {\n '--d-motion-text-duration': `${this.timing.duration}ms`,\n '--d-motion-text-char-duration': `${this.timing.duration}ms`,\n '--d-motion-text-word-duration': `${this.timing.duration * 2}ms`,\n };\n },\n\n /**\n * Check if current animation mode is static (gradient-sweep or shimmer)\n */\n isStaticAnimationMode () {\n return this.animationMode === 'gradient-sweep' || this.animationMode === 'shimmer';\n },\n\n /**\n * Computed classes for the motion text element\n */\n motionTextClasses () {\n return [\n 'd-motion-text',\n `d-motion-text--${this.animationMode}`,\n {\n 'd-motion-text--animating': this.isAnimating,\n 'd-motion-text--paused': this.isPaused,\n 'd-motion-text--looped': this.isLooped,\n },\n ];\n },\n },\n\n watch: {\n text () {\n this.reset();\n this.initializeContent();\n },\n\n loop: {\n handler (newVal) {\n this.isLooped = newVal;\n },\n\n immediate: true,\n },\n },\n\n mounted () {\n this.checkReducedMotion();\n this.initializeContent();\n },\n\n beforeUnmount () {\n this.clearTimeouts();\n },\n\n methods: {\n /**\n * Self-contained text processing from DOM nodes\n */\n processTextToChars (node) {\n const words = [];\n\n const processNode = (node, index = 0) => {\n if (node.nodeType === Node.TEXT_NODE) {\n const matches = node.textContent?.match(/\\S+\\s*/g) || [];\n words.push(...matches.map((text, i) => ({\n text,\n chars: text.split(''),\n index: index + i,\n })));\n return index + matches.length;\n } else if (node.nodeType === Node.ELEMENT_NODE) {\n let currentIdx = index;\n Array.from(node.childNodes).forEach(child => {\n currentIdx = processNode(child, currentIdx);\n });\n return currentIdx;\n }\n return index;\n };\n\n processNode(node);\n return words;\n },\n\n /**\n * Process direct text prop into word/character data\n */\n processDirectText (text) {\n if (!text) return [];\n\n const matches = text.match(/\\S+\\s*/g) || [];\n return matches.map((wordText, i) => ({\n text: wordText,\n chars: wordText.split(''),\n index: i,\n }));\n },\n\n /**\n * Check for reduced motion preference\n */\n checkReducedMotion () {\n if (typeof window !== 'undefined' && window.matchMedia) {\n this.prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n }\n },\n\n /**\n * Clear all animation timeouts\n */\n clearTimeouts () {\n this.animationTimeouts.forEach(timeout => clearTimeout(timeout));\n this.animationTimeouts = [];\n },\n\n /**\n * Start the animation\n * @public\n */\n start () {\n if (this.isAnimating) return;\n\n this.isAnimating = true;\n this.isPaused = false;\n this.$emit('start');\n\n // Skip animation if reduced motion is preferred and enabled\n if (this.respectsReducedMotion && this.prefersReducedMotion) {\n this.showAllContent();\n return;\n }\n\n if (this.animationMode === 'none') {\n this.showAllContent();\n return;\n }\n\n // For gradient-sweep and shimmer modes, just mark as animating (CSS handles the animation)\n if (this.isStaticAnimationMode) {\n return;\n }\n\n // Start the word-by-word animation for \"-in\" modes\n this.showNextWord();\n },\n\n /**\n * Pause the animation\n * @public\n */\n pause () {\n if (!this.isAnimating || this.isPaused) return;\n\n this.isPaused = true;\n this.clearTimeouts();\n this.$emit('pause');\n },\n\n /**\n * Resume the animation\n * @public\n */\n resume () {\n if (!this.isPaused) return;\n\n this.isPaused = false;\n this.$emit('resume');\n this.showNextWord();\n },\n\n /**\n * Reset the animation to initial state\n * @public\n */\n reset () {\n this.clearTimeouts();\n this.isAnimating = false;\n this.isPaused = false;\n this.visibleWordCount = 0;\n this.visibleCharsPerWord = Array(this.words.length).fill(0);\n this.animationKey++;\n },\n\n /**\n * Skip to the end of the animation\n * @public\n */\n skipToEnd () {\n this.showAllContent();\n },\n\n /**\n * Show all content immediately\n */\n showAllContent () {\n this.visibleWordCount = this.words.length;\n this.visibleCharsPerWord = this.words.map(word => word.chars.length);\n setTimeout(() => {\n this.isAnimating = false;\n this.$emit('complete');\n }, 0);\n },\n\n /**\n * Show next word in sequence\n */\n showNextWord () {\n if (this.isPaused || this.visibleWordCount >= this.words.length) {\n if (this.visibleWordCount >= this.words.length) {\n this.completeAnimation();\n }\n return;\n }\n\n const timeout = setTimeout(() => {\n this.visibleWordCount++;\n this.$emit('progress', {\n wordsComplete: this.visibleWordCount,\n totalWords: this.words.length,\n progress: this.visibleWordCount / this.words.length,\n });\n\n this.animateCharsForWord(this.visibleWordCount - 1);\n }, this.timing.wordDelay);\n\n this.animationTimeouts.push(timeout);\n },\n\n /**\n * Animate characters for a specific word\n */\n animateCharsForWord (wordIdx) {\n if (this.isPaused || wordIdx >= this.words.length) return;\n\n this.visibleCharsPerWord[wordIdx] = 0;\n const chars = this.words[wordIdx].chars.length;\n\n const revealChar = () => {\n if (this.isPaused || this.visibleCharsPerWord[wordIdx] >= chars) {\n if (this.visibleCharsPerWord[wordIdx] >= chars) {\n this.showNextWord();\n }\n return;\n }\n\n this.visibleCharsPerWord[wordIdx]++;\n const timeout = setTimeout(revealChar, this.timing.characterDelay);\n this.animationTimeouts.push(timeout);\n };\n\n revealChar();\n },\n\n /**\n * Complete the animation\n */\n completeAnimation () {\n this.isAnimating = false;\n this.clearTimeouts();\n\n this.$emit('complete');\n\n if (this.loop) {\n const timeout = setTimeout(() => {\n this.reset();\n this.$nextTick(() => {\n this.start();\n });\n }, 500);\n\n this.animationTimeouts.push(timeout);\n }\n },\n\n /**\n * Initialize content based on text prop or slot content\n */\n initializeContent () {\n // For gradient-sweep and shimmer modes, skip word/character processing\n if (this.isStaticAnimationMode) {\n if (this.autoStart) {\n this.$nextTick(() => this.start());\n }\n return;\n }\n\n if (this.text) {\n this.words = this.processDirectText(this.text);\n } else if (this.$refs.contentRef) {\n this.words = this.processTextToChars(this.$refs.contentRef);\n }\n\n this.visibleCharsPerWord = Array(this.words.length).fill(0);\n this.visibleWordCount = 0;\n\n if (this.autoStart && this.words.length > 0) {\n this.$nextTick(() => this.start());\n }\n },\n },\n};\n</script>\n"],"mappings":";;;;AA8EA,IAAK,IAAU;CACb,MAAM;CAEN,OAAO;EAKL,MAAM;GACJ,MAAM;GACN,SAAS;GACV;EAMD,eAAe;GACb,MAAM;GACN,SAAS;GACT,YAAY,MAAU,EAA4B,SAAS,EAAM;GAClE;EAMD,OAAO;GACL,MAAM,CAAC,QAAQ,OAAO;GACtB,SAAS;GACT,YAAY,MAAU,EAAmB,SAAS,OAAO,EAAM,CAAC;GACjE;EAMD,WAAW;GACT,MAAM;GACN,SAAS;GACV;EAMD,MAAM;GACJ,MAAM;GACN,SAAS;GACV;EAMD,uBAAuB;GACrB,MAAM;GACN,SAAS;GACV;EAOD,kBAAkB;GAChB,MAAM;GACN,SAAS;GACV;EACF;CAED,OAAO;EAKL;EAMA;EAOA;EAMA;EAMA;EACD;CAED,OAAQ;AACN,SAAO;GACL,OAAO,EAAE;GACT,kBAAkB;GAClB,qBAAqB,EAAE;GACvB,aAAa;GACb,UAAU;GACV,UAAU;GACV,mBAAmB,EAAE;GACrB,sBAAsB;GACtB,cAAc;GACf;;CAGH,UAAU;EAIR,SAAU;AACR,UAAO,EAA2B,OAAO,KAAK,MAAM;;EAMtD,kBAAmB;AACjB,UAAO;IACL,4BAA4B,GAAG,KAAK,OAAO,SAAS;IACpD,iCAAiC,GAAG,KAAK,OAAO,SAAS;IACzD,iCAAiC,GAAG,KAAK,OAAO,WAAW,EAAE;IAC9D;;EAMH,wBAAyB;AACvB,UAAO,KAAK,kBAAkB,oBAAoB,KAAK,kBAAkB;;EAM3E,oBAA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AA,IAAA,GAAA"}
|
|
1
|
+
{"version":3,"file":"motion-text.js","names":[],"sources":["../../../components/MotionText/MotionText.vue"],"sourcesContent":["<template>\n <span\n data-qa=\"dt-motion-text\"\n :class=\"motionTextClasses\"\n :style=\"componentStyles\"\n :aria-live=\"isAnimating ? 'polite' : 'off'\"\n :aria-label=\"screenReaderText || undefined\"\n >\n <!-- Screen reader content -->\n <span\n v-if=\"screenReaderText\"\n data-qa=\"dt-motion-text-sr-only\"\n class=\"d-motion-text__sr-only\"\n >\n {{ screenReaderText }}\n </span>\n\n <!-- Whole-text modes animate the root, so the text and slot render as-is and stay live -->\n <span\n v-if=\"isWholeText\"\n ref=\"slotRef\"\n data-qa=\"dt-motion-text-content\"\n class=\"d-motion-text__content\"\n :aria-hidden=\"screenReaderText ? 'true' : undefined\"\n >{{ text }}<slot v-if=\"!text\" /></span>\n\n <!-- Word-by-word animated content -->\n <span\n v-else-if=\"words.length\"\n ref=\"contentRef\"\n :key=\"animationKey\"\n data-qa=\"dt-motion-text-content\"\n class=\"d-motion-text__content\"\n :aria-hidden=\"screenReaderText ? 'true' : undefined\"\n >\n <template\n v-for=\"(word, wordIdx) in words\"\n :key=\"`${animationKey}-${wordIdx}`\"\n >\n <span\n data-qa=\"dt-motion-text-word\"\n class=\"d-motion-text__word\"\n :style=\"wordStyles[wordIdx]\"\n >{{ word.text }}</span>{{ word.space }}\n </template>\n </span>\n\n <!-- Slot content, rendered until its text has been split into words -->\n <span\n v-else\n ref=\"slotRef\"\n class=\"d-motion-text__fallback\"\n >\n <slot />\n </span>\n </span>\n</template>\n\n\n<script>\nimport {\n MOTION_TEXT_ANIMATION_MODES,\n MOTION_TEXT_MODE_SETTINGS,\n MOTION_TEXT_SPEEDS,\n MOTION_TEXT_TIMING_PRESETS,\n MOTION_TEXT_TRACKS,\n} from './MotionTextConstants';\nimport { getGradientSlices, splitWords } from './utils';\n\nconst DEFAULT_PRESET = MOTION_TEXT_TIMING_PRESETS['300'];\n// Unsupported modes render the text at rest, like 'none'\nconst RESTING_SETTINGS = { tracks: [], gradient: false, loopHold: 0 };\n\nexport default {\n name: 'DtMotionText',\n\n props: {\n /**\n * The text content to animate.\n * @type {string}\n */\n text: {\n type: String,\n default: '',\n },\n\n /**\n * The animation mode to use for the text reveal. `none` renders the text without animation.\n * @values gradient-in, fade-in, slide-in, slide-in-gradient, gradient-sweep, shimmer, none\n */\n animationMode: {\n type: String,\n default: 'gradient-in',\n validator: (value) => MOTION_TEXT_ANIMATION_MODES.includes(value),\n },\n\n /**\n * Animation speed. 300 plays the motion spec as designed; lower values are faster.\n * @values 100, 200, 300, 400, 500\n */\n speed: {\n type: [String, Number],\n default: 300,\n validator: (value) => MOTION_TEXT_SPEEDS.includes(String(value)),\n },\n\n /**\n * Whether to start animation automatically when component is mounted.\n * @values true, false\n */\n autoStart: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether to loop the animation continuously.\n * @values true, false\n */\n loop: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Whether to respect the user's prefers-reduced-motion system setting.\n * @values true, false\n */\n respectsReducedMotion: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Alternative text for screen readers. If provided, this will be announced\n * instead of the animated text.\n * @type {string}\n */\n screenReaderText: {\n type: String,\n default: '',\n },\n },\n\n emits: [\n /**\n * Emitted when the animation starts, and at the start of each looped cycle.\n * @event start\n */\n 'start',\n\n /**\n * Emitted when the animation completes, and at the end of each looped cycle.\n * @event complete\n */\n 'complete',\n\n /**\n * Emitted as each word finishes animating.\n * @event progress\n * @type {{ wordsComplete: number, totalWords: number, progress: number }}\n */\n 'progress',\n\n /**\n * Emitted when the animation is paused.\n * @event pause\n */\n 'pause',\n\n /**\n * Emitted when the animation resumes.\n * @event resume\n */\n 'resume',\n ],\n\n data () {\n return {\n words: splitWords(this.text),\n wordWidths: [],\n isRtl: false,\n isAnimating: false,\n isPaused: false,\n isComplete: false,\n isRestarting: false,\n isLooped: false,\n isUnmounted: false,\n animationTimeouts: [],\n timelineStartedAt: 0,\n timelineElapsed: 0,\n prefersReducedMotion: false,\n animationKey: 0,\n cssIterations: 1,\n };\n },\n\n computed: {\n modeSettings () {\n return MOTION_TEXT_MODE_SETTINGS[this.animationMode] ?? RESTING_SETTINGS;\n },\n\n isWholeText () {\n return Boolean(this.modeSettings.wholeText);\n },\n\n /**\n * Multiplier applied to every motion timing for the current speed.\n */\n speedScale () {\n const preset = MOTION_TEXT_TIMING_PRESETS[String(this.speed)] ?? DEFAULT_PRESET;\n return preset.duration / DEFAULT_PRESET.duration;\n },\n\n /**\n * Track timings for the current mode as CSS variables, e.g. --d-motion-text-enter-stagger\n */\n componentStyles () {\n const styles = {};\n this.modeSettings.tracks.forEach(track => {\n Object.entries(MOTION_TEXT_TRACKS[track]).forEach(([key, value]) => {\n styles[`--d-motion-text-${track}-${key}`] = `${Math.round(value * this.speedScale)}ms`;\n });\n });\n return styles;\n },\n\n /**\n * Per-word index (drives the stagger) and, in gradient modes, the slice of the shared gradient\n * each word shows so it reads as one continuous gradient across the text.\n */\n wordStyles () {\n const slices = this.modeSettings.gradient ? getGradientSlices(this.wordWidths, this.isRtl) : [];\n\n return this.words.map((word, index) => {\n const slice = slices[index];\n return {\n '--d-motion-text-word-index': index,\n ...(slice && {\n '--d-motion-text-gradient-size': slice.size,\n '--d-motion-text-gradient-position': slice.position,\n }),\n };\n });\n },\n\n /**\n * Time (ms) at which each word finishes its last track\n */\n wordEndTimes () {\n return this.words.map((word, index) => {\n const ends = this.modeSettings.tracks.map(track => {\n const { delay, stagger, duration } = MOTION_TEXT_TRACKS[track];\n return delay + stagger * index + duration;\n });\n return Math.max(0, ...ends) * this.speedScale;\n });\n },\n\n /**\n * Time (ms) at which one cycle of the animation ends\n */\n cycleDuration () {\n if (!this.isWholeText) return Math.max(0, ...this.wordEndTimes);\n\n const ends = this.modeSettings.tracks.map(track => {\n const { delay, duration } = MOTION_TEXT_TRACKS[track];\n return delay + duration;\n });\n return Math.max(0, ...ends) * this.speedScale * this.cssIterations;\n },\n\n motionTextClasses () {\n return [\n 'd-motion-text',\n `d-motion-text--${this.animationMode}`,\n {\n 'd-motion-text--animating': this.isAnimating,\n 'd-motion-text--paused': this.isPaused,\n 'd-motion-text--complete': this.isComplete,\n 'd-motion-text--restarting': this.isRestarting,\n 'd-motion-text--looped': this.isLooped,\n 'd-motion-text--respects-reduced-motion': this.respectsReducedMotion,\n },\n ];\n },\n },\n\n watch: {\n text () {\n // Whole-text modes render the text live and keep animating, as they always have\n if (this.isWholeText) {\n this.words = splitWords(this.text);\n\n // A finished single play runs again for the new text; a loop stopped with skipToEnd() stays at rest\n if (this.isComplete && this.autoStart && !this.loop) {\n this.reset();\n this.$nextTick(() => this.start());\n }\n return;\n }\n\n this.reset();\n\n if (this.text) {\n this.initializeContent();\n return;\n }\n\n // Slot content only renders once the words are cleared, so read it on the next tick\n this.words = [];\n this.$nextTick(() => this.initializeContent());\n },\n\n animationMode (mode, oldMode) {\n const wasWholeText = Boolean(MOTION_TEXT_MODE_SETTINGS[oldMode]?.wholeText);\n\n // Whole-text modes render the slot live, so read it again when switching to or from word mode\n if (!this.text && wasWholeText !== this.isWholeText) {\n const wasAnimating = this.isAnimating;\n this.reset();\n this.words = [];\n this.$nextTick(() => {\n this.words = splitWords(this.getSlotText());\n this.wordWidths = [];\n if (wasAnimating) this.$nextTick(() => this.start());\n });\n return;\n }\n\n this.restartIfAnimating();\n },\n\n autoStart (value) {\n if (value && !this.isAnimating && (this.isWholeText || this.words.length)) {\n this.$nextTick(() => this.start());\n }\n },\n\n speed () {\n this.restartIfAnimating();\n },\n\n loop: {\n handler (newVal) {\n this.isLooped = newVal;\n\n // Reschedule so the current cycle ends (or restarts) according to the new value\n if (this.isAnimating && !this.isPaused) {\n this.timelineElapsed = Date.now() - this.timelineStartedAt;\n this.clearTimeouts();\n this.runTimeline();\n }\n },\n\n immediate: true,\n },\n },\n\n mounted () {\n this.initWatchReducedMotion();\n this.initializeContent();\n\n // Word widths change once web fonts load, which would misalign the gradient slices\n document.fonts?.ready.then(() => {\n if (!this.isUnmounted && this.isAnimating) this.measureWords();\n });\n },\n\n beforeUnmount () {\n this.isUnmounted = true;\n this.clearTimeouts();\n this.stopWatchingReducedMotion?.();\n },\n\n methods: {\n /**\n * Collect the text of slot content, ignoring markup\n */\n getSlotText () {\n return this.$refs.slotRef?.textContent || '';\n },\n\n /**\n * Track the reduced motion preference, finishing any running animation if it turns on\n */\n initWatchReducedMotion () {\n if (typeof window === 'undefined' || !window.matchMedia) return;\n\n const query = window.matchMedia('(prefers-reduced-motion: reduce)');\n const onChange = (event) => {\n this.prefersReducedMotion = event.matches;\n if (event.matches && this.respectsReducedMotion && this.isAnimating) this.skipToEnd();\n };\n\n this.prefersReducedMotion = query.matches;\n query.addEventListener?.('change', onChange);\n this.stopWatchingReducedMotion = () => query.removeEventListener?.('change', onChange);\n },\n\n /**\n * Measure rendered word widths so each word can show its slice of the gradient.\n * Falls back to character counts when layout is unavailable (e.g. not yet rendered).\n */\n measureWords () {\n if (!this.modeSettings.gradient) return;\n\n const wordEls = this.$refs.contentRef?.querySelectorAll('.d-motion-text__word') || [];\n const widths = Array.from(wordEls, el => el.getBoundingClientRect().width);\n\n this.isRtl = window.getComputedStyle(this.$el).direction === 'rtl';\n this.wordWidths = widths.length === this.words.length && widths.every(width => width > 0)\n ? widths\n : this.words.map(word => word.text.length);\n },\n\n /**\n * Clear all animation timeouts\n */\n clearTimeouts () {\n this.animationTimeouts.forEach(timeout => clearTimeout(timeout));\n this.animationTimeouts = [];\n },\n\n schedule (delay, callback) {\n this.animationTimeouts.push(setTimeout(callback, Math.max(0, delay)));\n },\n\n /**\n * Schedule progress, completion and (when looping) restart events for the remainder\n * of the current cycle. CSS runs the animation itself; this keeps events in step with it.\n */\n runTimeline () {\n const elapsed = this.timelineElapsed;\n const totalWords = this.words.length;\n const cycleEnd = this.cycleDuration;\n\n this.timelineStartedAt = Date.now() - elapsed;\n\n // Whole-text modes have no per-word progress\n const wordEnds = this.isWholeText ? [] : this.wordEndTimes;\n wordEnds.forEach((end, index) => {\n if (end <= elapsed) return;\n this.schedule(end - elapsed, () => {\n this.$emit('progress', {\n wordsComplete: index + 1,\n totalWords,\n progress: (index + 1) / totalWords,\n });\n });\n });\n\n if (cycleEnd > elapsed) {\n this.schedule(cycleEnd - elapsed, () => this.completeAnimation());\n }\n\n if (this.loop) {\n const restartAt = cycleEnd + this.modeSettings.loopHold * this.speedScale;\n this.schedule(restartAt - elapsed, () => this.restartCycle());\n } else if (cycleEnd <= elapsed) {\n // The cycle already ended while looping (e.g. loop turned off during the hold)\n this.finishAnimation();\n }\n },\n\n /**\n * Start the animation\n * @public\n */\n start () {\n if (this.isAnimating || this.isUnmounted) return;\n\n this.clearTimeouts();\n this.isAnimating = true;\n this.isPaused = false;\n this.isComplete = false;\n this.$emit('start');\n\n // Skip animation if reduced motion is preferred and enabled\n if (this.respectsReducedMotion && this.prefersReducedMotion) {\n this.showAllContent();\n return;\n }\n\n if (!this.modeSettings.tracks.length || (!this.isWholeText && !this.words.length)) {\n this.showAllContent();\n return;\n }\n\n this.measureWords();\n this.cssIterations = this.readCssIterations();\n this.timelineElapsed = 0;\n this.runTimeline();\n },\n\n /**\n * Whole-text animations honor a consumer's animation-iteration-count override (e.g. 2 sweeps)\n */\n readCssIterations () {\n if (!this.isWholeText || this.loop) return 1;\n\n const count = parseFloat(window.getComputedStyle(this.$el).animationIterationCount);\n return Number.isFinite(count) && count > 1 ? count : 1;\n },\n\n /**\n * Pause the animation\n * @public\n */\n pause () {\n if (!this.isAnimating || this.isPaused) return;\n\n this.timelineElapsed = Date.now() - this.timelineStartedAt;\n this.clearTimeouts();\n this.isPaused = true;\n this.$emit('pause');\n },\n\n /**\n * Resume the animation\n * @public\n */\n resume () {\n if (!this.isPaused) return;\n\n this.isPaused = false;\n this.$emit('resume');\n this.runTimeline();\n },\n\n /**\n * Reset the animation to initial state\n * @public\n */\n reset () {\n this.clearTimeouts();\n this.isAnimating = false;\n this.isPaused = false;\n this.isComplete = false;\n this.timelineElapsed = 0;\n this.animationKey++;\n // Whole-text modes animate the root, which re-keying the words doesn't reset\n this.replayAnimations();\n },\n\n /**\n * Skip to the end of the animation\n * @public\n */\n skipToEnd () {\n this.showAllContent();\n },\n\n /**\n * Show all content immediately in its resting state\n */\n showAllContent () {\n this.finishAnimation();\n this.isPaused = false;\n this.schedule(0, () => this.$emit('complete'));\n },\n\n finishAnimation () {\n this.clearTimeouts();\n this.isAnimating = false;\n this.isComplete = true;\n },\n\n restartIfAnimating () {\n if (!this.isAnimating) return;\n\n this.reset();\n this.$nextTick(() => this.start());\n },\n\n /**\n * End of a cycle. Looped animations keep animating through the hold before restarting.\n */\n completeAnimation () {\n this.$emit('complete');\n if (!this.loop) this.finishAnimation();\n },\n\n /**\n * Drop the CSS animations for one style pass so they replay from their first frame on the same\n * elements, keeping text selection and not re-inserting anything into the aria-live region.\n */\n replayAnimations (callback) {\n this.isRestarting = true;\n\n this.$nextTick(() => {\n // Flush styles while the animations are removed\n this.$el?.getBoundingClientRect?.();\n this.isRestarting = false;\n callback?.();\n });\n },\n\n /**\n * Restart a looped animation: everything returns to its starting state at once\n */\n restartCycle () {\n if (this.isUnmounted) return;\n\n this.clearTimeouts();\n this.replayAnimations(() => {\n this.measureWords();\n this.timelineElapsed = 0;\n this.$emit('start');\n this.runTimeline();\n });\n },\n\n /**\n * Initialize content based on text prop or slot content\n */\n initializeContent () {\n this.words = splitWords(this.text || this.getSlotText());\n this.wordWidths = [];\n\n // Whole-text modes start even while empty, e.g. a slot that streams its content in\n if (this.autoStart && (this.isWholeText || this.words.length > 0)) {\n this.$nextTick(() => this.start());\n }\n },\n },\n};\n</script>\n"],"mappings":";;;;;AAqEA,IAAM,IAAiB,EAA2B,MAE5C,IAAmB;CAAE,QAAQ,EAAE;CAAE,UAAU;CAAO,UAAU;CAAG,EAEhE,IAAU;CACb,MAAM;CAEN,OAAO;EAKL,MAAM;GACJ,MAAM;GACN,SAAS;GACV;EAMD,eAAe;GACb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AAa,EAAA,mBAAgB,SAAY,KAAA;aAE1C,EASW,GAAA,MAAA,EARiB,EAAA,QAAlB,GAAM,2BACL,EAAA,aAAY,GAAI,KAAA,EAAA,CAEzB,EAIuB,QAAA;EAHrB,WAAQ;EACR,OAAM;EACL,OAAK,EAAE,EAAA,WAAW,GAAO;MACxB,EAAK,KAAI,EAAA,EAAA,EAAA,EAAA,EAAa,EAAK,MAAK,EAAA,EAAA,CAAA,EAAA,GAAA,2BAKxC,EAMO,QANP,GAMO,CADL,EAAQ,EAAA,QAAA,UAAA,CAAA,EAAA,IAAA,EAAA,EAAA,IAAA,EAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});function e(e){return(e?.match(/\S+\s*/g)||[]).map(e=>{let t=e.trimEnd();return{text:t,space:e.slice(t.length)}})}function t(e,t=!1){let n=e.reduce((e,t)=>e+t,0),r=0;return e.map(e=>{let i=t?n-r-e:r;return r+=e,e>0?{size:`${n/e*100}% 100%`,position:n>e?`${i/(n-e)*100}% 0%`:`0% 0%`}:null})}exports.getGradientSlices=t,exports.splitWords=e;
|
|
2
|
+
//# sourceMappingURL=utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.cjs","names":[],"sources":["../../../components/MotionText/utils.js"],"sourcesContent":["/**\n * Split text into words, keeping the whitespace that follows each one (spaces, line breaks) so\n * the consumer's `white-space` setting still applies between words.\n * @param {string} text\n * @returns {Array<{ text: string, space: string }>}\n */\nexport function splitWords (text) {\n return (text?.match(/\\S+\\s*/g) || []).map(segment => {\n const word = segment.trimEnd();\n return { text: word, space: segment.slice(word.length) };\n });\n}\n\n/**\n * The slice of one continuous gradient each word shows, as background-size / background-position.\n * Spaces between words are excluded (matching the Figma spec). The gradient runs left to right\n * like other Ai gradient treatments, so in RTL, where the first word sits on the right, slices\n * are mirrored to keep it continuous across the line.\n * @param {number[]} widths rendered word widths, in reading order\n * @param {boolean} isRtl\n * @returns {Array<{ size: string, position: string } | null>} null for words without a width\n */\nexport function getGradientSlices (widths, isRtl = false) {\n const totalWidth = widths.reduce((sum, width) => sum + width, 0);\n let offset = 0;\n\n return widths.map(width => {\n const start = isRtl ? totalWidth - offset - width : offset;\n offset += width;\n\n if (!(width > 0)) return null;\n\n return {\n size: `${(totalWidth / width) * 100}% 100%`,\n position: totalWidth > width ? `${(start / (totalWidth - width)) * 100}% 0%` : '0% 0%',\n };\n });\n}\n"],"mappings":"mEAMA,SAAgB,EAAY,EAAM,CAChC,OAAQ,GAAM,MAAM,UAAU,EAAI,EAAE,EAAE,IAAI,GAAW,CACnD,IAAM,EAAO,EAAQ,SAAS,CAC9B,MAAO,CAAE,KAAM,EAAM,MAAO,EAAQ,MAAM,EAAK,OAAO,CAAE,EACxD,CAYJ,SAAgB,EAAmB,EAAQ,EAAQ,GAAO,CACxD,IAAM,EAAa,EAAO,QAAQ,EAAK,IAAU,EAAM,EAAO,EAAE,CAC5D,EAAS,EAEb,OAAO,EAAO,IAAI,GAAS,CACzB,IAAM,EAAQ,EAAQ,EAAa,EAAS,EAAQ,EAKpD,MAJA,IAAU,EAEJ,EAAQ,EAEP,CACL,KAAM,GAAI,EAAa,EAAS,IAAI,QACpC,SAAU,EAAa,EAAQ,GAAI,GAAS,EAAa,GAAU,IAAI,MAAQ,QAChF,CALwB,MAMzB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//#region components/MotionText/utils.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
return (e?.match(/\S+\s*/g) || []).map((e) => {
|
|
4
|
+
let t = e.trimEnd();
|
|
5
|
+
return {
|
|
6
|
+
text: t,
|
|
7
|
+
space: e.slice(t.length)
|
|
8
|
+
};
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function t(e, t = !1) {
|
|
12
|
+
let n = e.reduce((e, t) => e + t, 0), r = 0;
|
|
13
|
+
return e.map((e) => {
|
|
14
|
+
let i = t ? n - r - e : r;
|
|
15
|
+
return r += e, e > 0 ? {
|
|
16
|
+
size: `${n / e * 100}% 100%`,
|
|
17
|
+
position: n > e ? `${i / (n - e) * 100}% 0%` : "0% 0%"
|
|
18
|
+
} : null;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { t as getGradientSlices, e as splitWords };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../components/MotionText/utils.js"],"sourcesContent":["/**\n * Split text into words, keeping the whitespace that follows each one (spaces, line breaks) so\n * the consumer's `white-space` setting still applies between words.\n * @param {string} text\n * @returns {Array<{ text: string, space: string }>}\n */\nexport function splitWords (text) {\n return (text?.match(/\\S+\\s*/g) || []).map(segment => {\n const word = segment.trimEnd();\n return { text: word, space: segment.slice(word.length) };\n });\n}\n\n/**\n * The slice of one continuous gradient each word shows, as background-size / background-position.\n * Spaces between words are excluded (matching the Figma spec). The gradient runs left to right\n * like other Ai gradient treatments, so in RTL, where the first word sits on the right, slices\n * are mirrored to keep it continuous across the line.\n * @param {number[]} widths rendered word widths, in reading order\n * @param {boolean} isRtl\n * @returns {Array<{ size: string, position: string } | null>} null for words without a width\n */\nexport function getGradientSlices (widths, isRtl = false) {\n const totalWidth = widths.reduce((sum, width) => sum + width, 0);\n let offset = 0;\n\n return widths.map(width => {\n const start = isRtl ? totalWidth - offset - width : offset;\n offset += width;\n\n if (!(width > 0)) return null;\n\n return {\n size: `${(totalWidth / width) * 100}% 100%`,\n position: totalWidth > width ? `${(start / (totalWidth - width)) * 100}% 0%` : '0% 0%',\n };\n });\n}\n"],"mappings":";AAMA,SAAgB,EAAY,GAAM;AAChC,SAAQ,GAAM,MAAM,UAAU,IAAI,EAAE,EAAE,KAAI,MAAW;EACnD,IAAM,IAAO,EAAQ,SAAS;AAC9B,SAAO;GAAE,MAAM;GAAM,OAAO,EAAQ,MAAM,EAAK,OAAO;GAAE;GACxD;;AAYJ,SAAgB,EAAmB,GAAQ,IAAQ,IAAO;CACxD,IAAM,IAAa,EAAO,QAAQ,GAAK,MAAU,IAAM,GAAO,EAAE,EAC5D,IAAS;AAEb,QAAO,EAAO,KAAI,MAAS;EACzB,IAAM,IAAQ,IAAQ,IAAa,IAAS,IAAQ;AAKpD,SAJA,KAAU,GAEJ,IAAQ,IAEP;GACL,MAAM,GAAI,IAAa,IAAS,IAAI;GACpC,UAAU,IAAa,IAAQ,GAAI,KAAS,IAAa,KAAU,IAAI,QAAQ;GAChF,GALwB;GAMzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../ForceLinkify-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../ForceLinkify-kQ_kWKVm.cjs`);exports.forceLinkifyPendingText=e.t,exports.isValidLinkStructure=e.n,exports.rangeFullyLinked=e.r;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "../../ForceLinkify-
|
|
1
|
+
import { n as e, r as t, t as n } from "../../ForceLinkify-DuAo3TMB.js";
|
|
2
2
|
export { n as forceLinkifyPendingText, e as isValidLinkStructure, t as rangeFullyLinked };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../RichTextEditor-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../RichTextEditor-7eY8gy9u.cjs`),t=require(`./rich-text-editor-constants.cjs`);exports.DtRichTextEditor=e.t,exports.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES=t.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES,exports.RICH_TEXT_EDITOR_OUTPUT_FORMATS=t.RICH_TEXT_EDITOR_OUTPUT_FORMATS;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as e } from "../../RichTextEditor-
|
|
1
|
+
import { t as e } from "../../RichTextEditor-DaOHmXD_.js";
|
|
2
2
|
import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as t, RICH_TEXT_EDITOR_OUTPUT_FORMATS as n } from "./rich-text-editor-constants.js";
|
|
3
3
|
export { e as DtRichTextEditor, t as RICH_TEXT_EDITOR_AUTOFOCUS_TYPES, n as RICH_TEXT_EDITOR_OUTPUT_FORMATS };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../MarkdownRenderer-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../MarkdownRenderer-C5wdjC5_.cjs`);exports.renderEditorToMarkdown=e.t;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../MarkdownRenderer-
|
|
1
|
+
import { t as e } from "../../MarkdownRenderer-eMwmPygx.js";
|
|
2
2
|
export { e as renderEditorToMarkdown };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../RichTextEditor-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../RichTextEditor-7eY8gy9u.cjs`);exports.default=e.t;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../RichTextEditor-
|
|
1
|
+
import { t as e } from "../../RichTextEditor-DaOHmXD_.js";
|
|
2
2
|
export { e as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../Scroller-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../Scroller-pAU8UWIH.cjs`);exports.DtScroller=e.t;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../Scroller-
|
|
1
|
+
import { t as e } from "../../Scroller-B1xwv6TG.js";
|
|
2
2
|
export { e as DtScroller };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../Scroller-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../Scroller-pAU8UWIH.cjs`);exports.default=e.t;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../Scroller-
|
|
1
|
+
import { t as e } from "../../Scroller-B1xwv6TG.js";
|
|
2
2
|
export { e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),t=require(`./skeleton-shape.cjs`),n=require(`./skeleton-text.cjs`),r=require(`./skeleton-paragraph.cjs`),i=require(`./skeleton-list-item.cjs`);let a=require(`vue`);var o={name:`DtSkeleton`,components:{DtSkeletonText:n.default,DtSkeletonShape:t.default,DtSkeletonListItem:i.default,DtSkeletonParagraph:r.default},props:{paragraphOption:{type:[Object,Boolean],default:null},listItemOption:{type:[Object,Boolean],default:null},textOption:{type:Object,default:null},shapeOption:{type:[Object,Boolean],default:null},animationDuration:{type:Number,default:-1},ariaLabel:{type:String,default:``},animate:{type:Boolean,default:!0},offset:{type:Number,default:1}},computed:{validationOptions(){return{paragraphOption:this.paragraphOption,listItemOption:this.listItemOption,textOption:this.textOption,shapeOption:this.shapeOption}}},watch:{$props:{immediate:!0,handler:`validator`}},methods:{validator(){let e=Object.entries(this.validationOptions).filter(([,e])=>e);if(e.length>=2){let t=`Use only one of ${e.map(([e])=>e).join(` | `)} options at the same time`;console.error(t)}}}},s=[`aria-label`];function c(e,t,n,r,i,o){let c=(0,a.resolveComponent)(`dt-skeleton-list-item`),l=(0,a.resolveComponent)(`dt-skeleton-shape`),u=(0,a.resolveComponent)(`dt-skeleton-paragraph`),d=(0,a.resolveComponent)(`dt-skeleton-text`);return(0,a.openBlock)(),(0,a.createElementBlock)(`div`,{"aria-busy":`true`,role:`status`,"aria-label":n.ariaLabel},[n.listItemOption?((0,a.openBlock)(),(0,a.createBlock)(c,(0,a.mergeProps)({key:0},n.listItemOption===!0?{}:n.listItemOption,{"animation-duration":n.animationDuration,animate:n.animate,offset:n.offset}),null,16,[`animation-duration`,`animate`,`offset`])):n.shapeOption?((0,a.openBlock)(),(0,a.createBlock)(l,(0,a.mergeProps)({key:1},n.shapeOption===!0?{}:n.shapeOption,{"animation-duration":n.animationDuration,animate:n.animate,offset:n.offset}),null,16,[`animation-duration`,`animate`,`offset`])):n.paragraphOption?((0,a.openBlock)(),(0,a.createBlock)(u,(0,a.mergeProps)({key:2},n.paragraphOption===!0?{}:n.paragraphOption,{"animation-duration":n.animationDuration,animate:n.animate,offset:n.offset}),null,16,[`animation-duration`,`animate`,`offset`])):((0,a.openBlock)(),(0,a.createBlock)(d,(0,a.mergeProps)({key:3},n.textOption||{},{"animation-duration":n.animationDuration,animate:n.animate,offset:n.offset}),null,16,[`animation-duration`,`animate`,`offset`]))],8,s)}var l=e.t(o,[[`render`,c]]);exports.default=l;
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),t=require(`./skeleton-shape.cjs`),n=require(`./skeleton-text.cjs`),r=require(`./skeleton-paragraph.cjs`),i=require(`./skeleton-list-item.cjs`);let a=require(`vue`);var o={name:`DtSkeleton`,components:{DtSkeletonText:n.default,DtSkeletonShape:t.default,DtSkeletonListItem:i.default,DtSkeletonParagraph:r.default},props:{paragraphOption:{type:[Object,Boolean],default:null},listItemOption:{type:[Object,Boolean],default:null},textOption:{type:Object,default:null},shapeOption:{type:[Object,Boolean],default:null},animationDuration:{type:Number,default:-1},ariaLabel:{type:String,default:``},animate:{type:Boolean,default:!0},offset:{type:Number,default:1}},computed:{validationOptions(){return{paragraphOption:this.paragraphOption,listItemOption:this.listItemOption,textOption:this.textOption,shapeOption:this.shapeOption}}},watch:{$props:{immediate:!0,handler:`validator`}},methods:{validator(){let e=Object.entries(this.validationOptions).filter(([,e])=>e);if(e.length>=2){let t=`Use only one of ${e.map(([e])=>e).join(` | `)} options at the same time`;console.error(t)}}}},s=[`aria-label`];function c(e,t,n,r,i,o){let c=(0,a.resolveComponent)(`dt-skeleton-list-item`),l=(0,a.resolveComponent)(`dt-skeleton-shape`),u=(0,a.resolveComponent)(`dt-skeleton-paragraph`),d=(0,a.resolveComponent)(`dt-skeleton-text`);return(0,a.openBlock)(),(0,a.createElementBlock)(`div`,{"data-qa":`dt-skeleton`,"aria-busy":`true`,role:`status`,"aria-label":n.ariaLabel},[n.listItemOption?((0,a.openBlock)(),(0,a.createBlock)(c,(0,a.mergeProps)({key:0},n.listItemOption===!0?{}:n.listItemOption,{"animation-duration":n.animationDuration,animate:n.animate,offset:n.offset}),null,16,[`animation-duration`,`animate`,`offset`])):n.shapeOption?((0,a.openBlock)(),(0,a.createBlock)(l,(0,a.mergeProps)({key:1},n.shapeOption===!0?{}:n.shapeOption,{"animation-duration":n.animationDuration,animate:n.animate,offset:n.offset}),null,16,[`animation-duration`,`animate`,`offset`])):n.paragraphOption?((0,a.openBlock)(),(0,a.createBlock)(u,(0,a.mergeProps)({key:2},n.paragraphOption===!0?{}:n.paragraphOption,{"animation-duration":n.animationDuration,animate:n.animate,offset:n.offset}),null,16,[`animation-duration`,`animate`,`offset`])):((0,a.openBlock)(),(0,a.createBlock)(d,(0,a.mergeProps)({key:3},n.textOption||{},{"animation-duration":n.animationDuration,animate:n.animate,offset:n.offset}),null,16,[`animation-duration`,`animate`,`offset`]))],8,s)}var l=e.t(o,[[`render`,c]]);exports.default=l;
|
|
2
2
|
//# sourceMappingURL=skeleton.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.cjs","names":[],"sources":["../../../components/Skeleton/Skeleton.vue"],"sourcesContent":["<template>\n <div\n aria-busy=\"true\"\n role=\"status\"\n :aria-label=\"ariaLabel\"\n >\n <dt-skeleton-list-item\n v-if=\"listItemOption\"\n v-bind=\"listItemOption === true ? {} : listItemOption\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n <dt-skeleton-shape\n v-else-if=\"shapeOption\"\n v-bind=\"shapeOption === true ? {} : shapeOption\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n <dt-skeleton-paragraph\n v-else-if=\"paragraphOption\"\n v-bind=\"paragraphOption === true ? {} : paragraphOption\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n <dt-skeleton-text\n v-else\n v-bind=\"textOption || {}\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n </div>\n</template>\n\n<script>\nimport DtSkeletonShape from './SkeletonShape.vue';\nimport DtSkeletonListItem from './SkeletonListItem.vue';\nimport DtSkeletonParagraph from './SkeletonParagraph.vue';\nimport DtSkeletonText from './SkeletonText.vue';\n\n/**\n * Skeleton loader is a non-interactive placeholder that displays a preview of the UI to visually communicate\n * that content is in the process of loading. Skeleton is used to provide a low fidelity\n * representation of the user interface (UI) before content appears on the page.\n * @see https://dialtone.dialpad.com/components/skeleton.html\n */\nexport default {\n name: 'DtSkeleton',\n components: {\n DtSkeletonText,\n DtSkeletonShape,\n DtSkeletonListItem,\n DtSkeletonParagraph,\n },\n\n props: {\n /**\n * Set this prop to have the skeleton render as multiple lines of text.\n * Set only one option prop at a time.\n */\n paragraphOption: {\n type: [Object, Boolean],\n default: null,\n },\n\n /**\n * Set this prop to have the skeleton render as a list item with an avatar and wrapping text.\n * Set only one option prop at a time.\n */\n listItemOption: {\n type: [Object, Boolean],\n default: null,\n },\n\n /**\n * Set this prop to have the skeleton render as a single line of text.\n * Set only one option prop at a time.\n */\n textOption: {\n type: Object,\n default: null,\n },\n\n /**\n * Set this prop to have the skeleton render as a specific shape.\n * Set only one option prop at a time.\n */\n shapeOption: {\n type: [Object, Boolean],\n default: null,\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * Descriptive label for the content.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: true,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n },\n\n computed: {\n validationOptions () {\n return {\n paragraphOption: this.paragraphOption,\n listItemOption: this.listItemOption,\n textOption: this.textOption,\n shapeOption: this.shapeOption,\n };\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n handler: 'validator',\n },\n },\n\n methods: {\n validator () {\n const filtered = Object.entries(this.validationOptions)\n .filter(([, option]) => option);\n if (filtered.length >= 2) {\n const errorMessage = `Use only one of ${filtered.map(([key]) => key).join(' | ')} options at the same time`;\n console.error(errorMessage);\n }\n },\n },\n};\n</script>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"skeleton.cjs","names":[],"sources":["../../../components/Skeleton/Skeleton.vue"],"sourcesContent":["<template>\n <div\n data-qa=\"dt-skeleton\"\n aria-busy=\"true\"\n role=\"status\"\n :aria-label=\"ariaLabel\"\n >\n <dt-skeleton-list-item\n v-if=\"listItemOption\"\n v-bind=\"listItemOption === true ? {} : listItemOption\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n <dt-skeleton-shape\n v-else-if=\"shapeOption\"\n v-bind=\"shapeOption === true ? {} : shapeOption\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n <dt-skeleton-paragraph\n v-else-if=\"paragraphOption\"\n v-bind=\"paragraphOption === true ? {} : paragraphOption\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n <dt-skeleton-text\n v-else\n v-bind=\"textOption || {}\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n </div>\n</template>\n\n<script>\nimport DtSkeletonShape from './SkeletonShape.vue';\nimport DtSkeletonListItem from './SkeletonListItem.vue';\nimport DtSkeletonParagraph from './SkeletonParagraph.vue';\nimport DtSkeletonText from './SkeletonText.vue';\n\n/**\n * Skeleton loader is a non-interactive placeholder that displays a preview of the UI to visually communicate\n * that content is in the process of loading. Skeleton is used to provide a low fidelity\n * representation of the user interface (UI) before content appears on the page.\n * @see https://dialtone.dialpad.com/components/skeleton.html\n */\nexport default {\n name: 'DtSkeleton',\n components: {\n DtSkeletonText,\n DtSkeletonShape,\n DtSkeletonListItem,\n DtSkeletonParagraph,\n },\n\n props: {\n /**\n * Set this prop to have the skeleton render as multiple lines of text.\n * Set only one option prop at a time.\n */\n paragraphOption: {\n type: [Object, Boolean],\n default: null,\n },\n\n /**\n * Set this prop to have the skeleton render as a list item with an avatar and wrapping text.\n * Set only one option prop at a time.\n */\n listItemOption: {\n type: [Object, Boolean],\n default: null,\n },\n\n /**\n * Set this prop to have the skeleton render as a single line of text.\n * Set only one option prop at a time.\n */\n textOption: {\n type: Object,\n default: null,\n },\n\n /**\n * Set this prop to have the skeleton render as a specific shape.\n * Set only one option prop at a time.\n */\n shapeOption: {\n type: [Object, Boolean],\n default: null,\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * Descriptive label for the content.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: true,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n },\n\n computed: {\n validationOptions () {\n return {\n paragraphOption: this.paragraphOption,\n listItemOption: this.listItemOption,\n textOption: this.textOption,\n shapeOption: this.shapeOption,\n };\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n handler: 'validator',\n },\n },\n\n methods: {\n validator () {\n const filtered = Object.entries(this.validationOptions)\n .filter(([, option]) => option);\n if (filtered.length >= 2) {\n const errorMessage = `Use only one of ${filtered.map(([key]) => key).join(' | ')} options at the same time`;\n console.error(errorMessage);\n }\n },\n },\n};\n</script>\n"],"mappings":"uWAkDA,IAAK,EAAU,CACb,KAAM,aACN,WAAY,CACV,eAAA,EAAA,QACA,gBAAA,EAAA,QACA,mBAAA,EAAA,QACA,oBAAA,EAAA,QACD,CAED,MAAO,CAKL,gBAAiB,CACf,KAAM,CAAC,OAAQ,QAAQ,CACvB,QAAS,KACV,CAMD,eAAgB,CACd,KAAM,CAAC,OAAQ,QAAQ,CACvB,QAAS,KACV,CAMD,WAAY,CACV,KAAM,OACN,QAAS,KACV,CAMD,YAAa,CACX,KAAM,CAAC,OAAQ,QAAQ,CACvB,QAAS,KACV,CAKD,kBAAmB,CACjB,KAAM,OACN,QAAS,GACV,CAKD,UAAW,CACT,KAAM,OACN,QAAS,GACV,CAMD,QAAS,CACP,KAAM,QACN,QAAS,GACV,CAUD,OAAQ,CACN,KAAM,OACN,QAAS,EACV,CACF,CAED,SAAU,CACR,mBAAqB,CACnB,MAAO,CACL,gBAAiB,KAAK,gBACtB,eAAgB,KAAK,eACrB,WAAY,KAAK,WACjB,Y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r, i, u) {
|
|
71
71
|
let f = l("dt-skeleton-list-item"), p = l("dt-skeleton-shape"), m = l("dt-skeleton-paragraph"), h = l("dt-skeleton-text");
|
|
72
72
|
return c(), o("div", {
|
|
73
|
+
"data-qa": "dt-skeleton",
|
|
73
74
|
"aria-busy": "true",
|
|
74
75
|
role: "status",
|
|
75
76
|
"aria-label": n.ariaLabel
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.js","names":[],"sources":["../../../components/Skeleton/Skeleton.vue"],"sourcesContent":["<template>\n <div\n aria-busy=\"true\"\n role=\"status\"\n :aria-label=\"ariaLabel\"\n >\n <dt-skeleton-list-item\n v-if=\"listItemOption\"\n v-bind=\"listItemOption === true ? {} : listItemOption\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n <dt-skeleton-shape\n v-else-if=\"shapeOption\"\n v-bind=\"shapeOption === true ? {} : shapeOption\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n <dt-skeleton-paragraph\n v-else-if=\"paragraphOption\"\n v-bind=\"paragraphOption === true ? {} : paragraphOption\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n <dt-skeleton-text\n v-else\n v-bind=\"textOption || {}\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n </div>\n</template>\n\n<script>\nimport DtSkeletonShape from './SkeletonShape.vue';\nimport DtSkeletonListItem from './SkeletonListItem.vue';\nimport DtSkeletonParagraph from './SkeletonParagraph.vue';\nimport DtSkeletonText from './SkeletonText.vue';\n\n/**\n * Skeleton loader is a non-interactive placeholder that displays a preview of the UI to visually communicate\n * that content is in the process of loading. Skeleton is used to provide a low fidelity\n * representation of the user interface (UI) before content appears on the page.\n * @see https://dialtone.dialpad.com/components/skeleton.html\n */\nexport default {\n name: 'DtSkeleton',\n components: {\n DtSkeletonText,\n DtSkeletonShape,\n DtSkeletonListItem,\n DtSkeletonParagraph,\n },\n\n props: {\n /**\n * Set this prop to have the skeleton render as multiple lines of text.\n * Set only one option prop at a time.\n */\n paragraphOption: {\n type: [Object, Boolean],\n default: null,\n },\n\n /**\n * Set this prop to have the skeleton render as a list item with an avatar and wrapping text.\n * Set only one option prop at a time.\n */\n listItemOption: {\n type: [Object, Boolean],\n default: null,\n },\n\n /**\n * Set this prop to have the skeleton render as a single line of text.\n * Set only one option prop at a time.\n */\n textOption: {\n type: Object,\n default: null,\n },\n\n /**\n * Set this prop to have the skeleton render as a specific shape.\n * Set only one option prop at a time.\n */\n shapeOption: {\n type: [Object, Boolean],\n default: null,\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * Descriptive label for the content.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: true,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n },\n\n computed: {\n validationOptions () {\n return {\n paragraphOption: this.paragraphOption,\n listItemOption: this.listItemOption,\n textOption: this.textOption,\n shapeOption: this.shapeOption,\n };\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n handler: 'validator',\n },\n },\n\n methods: {\n validator () {\n const filtered = Object.entries(this.validationOptions)\n .filter(([, option]) => option);\n if (filtered.length >= 2) {\n const errorMessage = `Use only one of ${filtered.map(([key]) => key).join(' | ')} options at the same time`;\n console.error(errorMessage);\n }\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"skeleton.js","names":[],"sources":["../../../components/Skeleton/Skeleton.vue"],"sourcesContent":["<template>\n <div\n data-qa=\"dt-skeleton\"\n aria-busy=\"true\"\n role=\"status\"\n :aria-label=\"ariaLabel\"\n >\n <dt-skeleton-list-item\n v-if=\"listItemOption\"\n v-bind=\"listItemOption === true ? {} : listItemOption\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n <dt-skeleton-shape\n v-else-if=\"shapeOption\"\n v-bind=\"shapeOption === true ? {} : shapeOption\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n <dt-skeleton-paragraph\n v-else-if=\"paragraphOption\"\n v-bind=\"paragraphOption === true ? {} : paragraphOption\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n <dt-skeleton-text\n v-else\n v-bind=\"textOption || {}\"\n :animation-duration=\"animationDuration\"\n :animate=\"animate\"\n :offset=\"offset\"\n />\n </div>\n</template>\n\n<script>\nimport DtSkeletonShape from './SkeletonShape.vue';\nimport DtSkeletonListItem from './SkeletonListItem.vue';\nimport DtSkeletonParagraph from './SkeletonParagraph.vue';\nimport DtSkeletonText from './SkeletonText.vue';\n\n/**\n * Skeleton loader is a non-interactive placeholder that displays a preview of the UI to visually communicate\n * that content is in the process of loading. Skeleton is used to provide a low fidelity\n * representation of the user interface (UI) before content appears on the page.\n * @see https://dialtone.dialpad.com/components/skeleton.html\n */\nexport default {\n name: 'DtSkeleton',\n components: {\n DtSkeletonText,\n DtSkeletonShape,\n DtSkeletonListItem,\n DtSkeletonParagraph,\n },\n\n props: {\n /**\n * Set this prop to have the skeleton render as multiple lines of text.\n * Set only one option prop at a time.\n */\n paragraphOption: {\n type: [Object, Boolean],\n default: null,\n },\n\n /**\n * Set this prop to have the skeleton render as a list item with an avatar and wrapping text.\n * Set only one option prop at a time.\n */\n listItemOption: {\n type: [Object, Boolean],\n default: null,\n },\n\n /**\n * Set this prop to have the skeleton render as a single line of text.\n * Set only one option prop at a time.\n */\n textOption: {\n type: Object,\n default: null,\n },\n\n /**\n * Set this prop to have the skeleton render as a specific shape.\n * Set only one option prop at a time.\n */\n shapeOption: {\n type: [Object, Boolean],\n default: null,\n },\n\n /**\n * Duration time of the animation (ms), set -1 for an infinite animation.\n */\n animationDuration: {\n type: Number,\n default: -1,\n },\n\n /**\n * Descriptive label for the content.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * This property has higher priority than \"option.animate\"\n * @values true, false\n */\n animate: {\n type: Boolean,\n default: true,\n },\n\n /**\n * RippleDuration controls how long the delay is for the animation of a\n * placeholder 1000 pixels from the top of the page. Each placeholder\n * from the top down will have a delay duration from 0 to this offset.\n * The delay of each placeholder animation is based on how far down the page\n * the placeholder is rendered. This is a linear relationship. The unit\n * is milliseconds.\n */\n offset: {\n type: Number,\n default: 1,\n },\n },\n\n computed: {\n validationOptions () {\n return {\n paragraphOption: this.paragraphOption,\n listItemOption: this.listItemOption,\n textOption: this.textOption,\n shapeOption: this.shapeOption,\n };\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n handler: 'validator',\n },\n },\n\n methods: {\n validator () {\n const filtered = Object.entries(this.validationOptions)\n .filter(([, option]) => option);\n if (filtered.length >= 2) {\n const errorMessage = `Use only one of ${filtered.map(([key]) => key).join(' | ')} options at the same time`;\n console.error(errorMessage);\n }\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;AAkDA,IAAK,IAAU;CACb,MAAM;CACN,YAAY;EACV,gBAAA;EACA,iBAAA;EACA,oBAAA;EACA,qBAAA;EACD;CAED,OAAO;EAKL,iBAAiB;GACf,MAAM,CAAC,QAAQ,QAAQ;GACvB,SAAS;GACV;EAMD,gBAAgB;GACd,MAAM,CAAC,QAAQ,QAAQ;GACvB,SAAS;GACV;EAMD,YAAY;GACV,MAAM;GACN,SAAS;GACV;EAMD,aAAa;GACX,MAAM,CAAC,QAAQ,QAAQ;GACvB,SAAS;GACV;EAKD,mBAAmB;GACjB,MAAM;GACN,SAAS;GACV;EAKD,WAAW;GACT,MAAM;G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,EAAA;EACT,QAAQ,EAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../Slider-D2cDYZcJ.cjs`);exports.DtSlider=e.t,exports.SLIDER_DEFAULT_LARGE_STEP=e.n,exports.SLIDER_EDGE_CLAMP_TOLERANCE_PX=e.r,exports.SLIDER_FILL_ORIGINS=e.i,exports.SLIDER_ORIENTATIONS=e.a,exports.SLIDER_READOUT_EDGE_CLAMP_TOLERANCE_PX=e.o,exports.SLIDER_READOUT_MODES=e.s;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "../../Slider-Du45PVLU.js";
|
|
2
|
+
export { o as DtSlider, n as SLIDER_DEFAULT_LARGE_STEP, i as SLIDER_EDGE_CLAMP_TOLERANCE_PX, t as SLIDER_FILL_ORIGINS, e as SLIDER_ORIENTATIONS, r as SLIDER_READOUT_EDGE_CLAMP_TOLERANCE_PX, a as SLIDER_READOUT_MODES };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../Slider-D2cDYZcJ.cjs`);exports.default=e.t;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=1e3;function t(e){return Number.isFinite(typeof e==`number`?e:e?.value)}function n(t,n,r,i){let a=n-t,o=a>0?Math.floor(a/r)+1:1,s=r;o>1e3&&(s=a/(e-1),process.env.NODE_ENV!==`production`&&console.info(`[Dialtone] DtSlider: ${i}=${r} would generate more than ${e} points over this range — using ${s} instead so coverage still spans the full range.`));let c=[];for(let e=t;e<=n&&c.length<1e3;e=parseFloat((e+s).toFixed(10)))c.push(e);return c.length&&c[c.length-1]<n-1e-9&&c.push(n),c}function r(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function i(e,t,n,r){let i=n.left-e,a=t-n.right;return i>r?i-r:a>r?-(a-r):0}function a(e,t){return t?100-e:e}function o(e){let t=document.createElement(`div`);t.style.position=`absolute`,t.style.visibility=`hidden`,t.style.pointerEvents=`none`,t.style.inlineSize=`var(--slider-edge-inset)`,t.style.blockSize=`0px`,e.appendChild(t);let n=t.getBoundingClientRect().width;return t.remove(),n}exports.MAX_GENERATED_POINTS=e,exports.edgeClampOffset=i,exports.generateInterval=n,exports.isValidMark=t,exports.measureEdgeInsetPx=o,exports.mirrorPct=a,exports.sameValues=r;
|
|
2
|
+
//# sourceMappingURL=utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.cjs","names":[],"sources":["../../../components/Slider/utils.js"],"sourcesContent":["// A too-small interval relative to [min, max] (e.g. showTicks=0.001 over a\n// 0–100 range) would otherwise generate tens of thousands of DOM nodes and an\n// equally large per-pointermove scan — cap it and warn instead of silently\n// hanging the tab.\nexport const MAX_GENERATED_POINTS = 1000;\n\nexport function isValidMark(mark) {\n return Number.isFinite(typeof mark === 'number' ? mark : mark?.value);\n}\n\n// Shared by computedTickValues (UseSliderMarksAndTicks) and computedSnapPoints\n// (UseSliderMagneticSnap) — a number means \"evenly spaced\", used identically\n// by both features.\nexport function generateInterval(min, max, interval, label) {\n const span = max - min;\n const naturalCount = span > 0 ? Math.floor(span / interval) + 1 : 1;\n let effectiveInterval = interval;\n if (naturalCount > MAX_GENERATED_POINTS) {\n // Too many points for the requested interval to be practical over this\n // range — widen it just enough to fit the cap while still spanning the\n // FULL domain, rather than truncating to a fixed count from `min`. That\n // used to silently cover only the first ~1% of the range (e.g.\n // showTicks=0.001 over 0–100 rendered ticks from 0 to 0.999 only) —\n // a plausible-looking but materially false representation of the range.\n effectiveInterval = span / (MAX_GENERATED_POINTS - 1);\n if (process.env.NODE_ENV !== 'production') {\n console.info(\n `[Dialtone] DtSlider: ${label}=${interval} would generate more than ${MAX_GENERATED_POINTS} points over this range — using ${effectiveInterval} instead so coverage still spans the full range.`,\n );\n }\n }\n const values = [];\n for (\n let v = min;\n v <= max && values.length < MAX_GENERATED_POINTS;\n v = parseFloat((v + effectiveInterval).toFixed(10))\n ) {\n values.push(v);\n }\n // Float accumulation can fall just short of `max` after many increments —\n // make sure the end of the domain is always represented.\n if (values.length && values[values.length - 1] < max - 1e-9) {\n values.push(max);\n }\n return values;\n}\n\n// Same length and the same entries in order — cheap enough to run every frame.\nexport function sameValues(a, b) {\n return a.length === b.length && a.every((value, i) => value === b[i]);\n}\n\n// How far to nudge a mark (UseSliderCollisionAvoidance) inward: however far\n// it hangs past controlRect, once that overflow exceeds tolerance.\nexport function edgeClampOffset(leftEdge, rightEdge, controlRect, tolerance) {\n const startOverflow = controlRect.left - leftEdge; // >0 means it hangs past the start edge\n const endOverflow = rightEdge - controlRect.right; // >0 means it hangs past the end edge\n if (startOverflow > tolerance) return startOverflow - tolerance;\n if (endOverflow > tolerance) return -(endOverflow - tolerance);\n return 0;\n}\n\n// pct is measured from insetInlineStart, which the browser mirrors to the\n// physical right under dir=\"rtl\" — analytical position math has to mirror\n// the same way, or it lands on the wrong physical edge.\nexport function mirrorPct(pct, isRtl) {\n return isRtl ? 100 - pct : pct;\n}\n\n// A CSS custom property isn't resolved to a used pixel value by\n// getComputedStyle on its own — per spec it's an unparsed token stream\n// until something concrete (a real layout property) consumes it. Giving a\n// disposable child element inline-size: var(--slider-edge-inset) and\n// reading its rendered width is the standard way to resolve one without\n// hand-reimplementing the calc() it's built from (UseSliderGeometry,\n// slider.less) — which would silently drift out of sync with it over time.\n// Shared by UseSliderInteraction (pointer-to-value mapping) and\n// UseSliderCollisionAvoidance (analytical readout/mark rects) — both need\n// the same inset in px to match where the thumb/readout actually render.\nexport function measureEdgeInsetPx(controlEl) {\n const probe = document.createElement('div');\n probe.style.position = 'absolute';\n probe.style.visibility = 'hidden';\n probe.style.pointerEvents = 'none';\n probe.style.inlineSize = 'var(--slider-edge-inset)';\n probe.style.blockSize = '0px';\n controlEl.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MAAM,UAAY,MACxB,EAAU,YAAY,EAAM,CAC5B,IAAM,EAAK,EAAM,uBAAuB,CAAC,MAEzC,OADA,EAAM,QAAQ,CACP"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//#region components/Slider/utils.js
|
|
2
|
+
var e = 1e3;
|
|
3
|
+
function t(e) {
|
|
4
|
+
return Number.isFinite(typeof e == "number" ? e : e?.value);
|
|
5
|
+
}
|
|
6
|
+
function n(t, n, r, i) {
|
|
7
|
+
let a = n - t, o = a > 0 ? Math.floor(a / r) + 1 : 1, s = r;
|
|
8
|
+
o > 1e3 && (s = a / (e - 1), process.env.NODE_ENV !== "production" && console.info(`[Dialtone] DtSlider: ${i}=${r} would generate more than ${e} points over this range — using ${s} instead so coverage still spans the full range.`));
|
|
9
|
+
let c = [];
|
|
10
|
+
for (let e = t; e <= n && c.length < 1e3; e = parseFloat((e + s).toFixed(10))) c.push(e);
|
|
11
|
+
return c.length && c[c.length - 1] < n - 1e-9 && c.push(n), c;
|
|
12
|
+
}
|
|
13
|
+
function r(e, t) {
|
|
14
|
+
return e.length === t.length && e.every((e, n) => e === t[n]);
|
|
15
|
+
}
|
|
16
|
+
function i(e, t, n, r) {
|
|
17
|
+
let i = n.left - e, a = t - n.right;
|
|
18
|
+
return i > r ? i - r : a > r ? -(a - r) : 0;
|
|
19
|
+
}
|
|
20
|
+
function a(e, t) {
|
|
21
|
+
return t ? 100 - e : e;
|
|
22
|
+
}
|
|
23
|
+
function o(e) {
|
|
24
|
+
let t = document.createElement("div");
|
|
25
|
+
t.style.position = "absolute", t.style.visibility = "hidden", t.style.pointerEvents = "none", t.style.inlineSize = "var(--slider-edge-inset)", t.style.blockSize = "0px", e.appendChild(t);
|
|
26
|
+
let n = t.getBoundingClientRect().width;
|
|
27
|
+
return t.remove(), n;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { e as MAX_GENERATED_POINTS, i as edgeClampOffset, n as generateInterval, t as isValidMark, o as measureEdgeInsetPx, a as mirrorPct, r as sameValues };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../../components/Slider/utils.js"],"sourcesContent":["// A too-small interval relative to [min, max] (e.g. showTicks=0.001 over a\n// 0–100 range) would otherwise generate tens of thousands of DOM nodes and an\n// equally large per-pointermove scan — cap it and warn instead of silently\n// hanging the tab.\nexport const MAX_GENERATED_POINTS = 1000;\n\nexport function isValidMark(mark) {\n return Number.isFinite(typeof mark === 'number' ? mark : mark?.value);\n}\n\n// Shared by computedTickValues (UseSliderMarksAndTicks) and computedSnapPoints\n// (UseSliderMagneticSnap) — a number means \"evenly spaced\", used identically\n// by both features.\nexport function generateInterval(min, max, interval, label) {\n const span = max - min;\n const naturalCount = span > 0 ? Math.floor(span / interval) + 1 : 1;\n let effectiveInterval = interval;\n if (naturalCount > MAX_GENERATED_POINTS) {\n // Too many points for the requested interval to be practical over this\n // range — widen it just enough to fit the cap while still spanning the\n // FULL domain, rather than truncating to a fixed count from `min`. That\n // used to silently cover only the first ~1% of the range (e.g.\n // showTicks=0.001 over 0–100 rendered ticks from 0 to 0.999 only) —\n // a plausible-looking but materially false representation of the range.\n effectiveInterval = span / (MAX_GENERATED_POINTS - 1);\n if (process.env.NODE_ENV !== 'production') {\n console.info(\n `[Dialtone] DtSlider: ${label}=${interval} would generate more than ${MAX_GENERATED_POINTS} points over this range — using ${effectiveInterval} instead so coverage still spans the full range.`,\n );\n }\n }\n const values = [];\n for (\n let v = min;\n v <= max && values.length < MAX_GENERATED_POINTS;\n v = parseFloat((v + effectiveInterval).toFixed(10))\n ) {\n values.push(v);\n }\n // Float accumulation can fall just short of `max` after many increments —\n // make sure the end of the domain is always represented.\n if (values.length && values[values.length - 1] < max - 1e-9) {\n values.push(max);\n }\n return values;\n}\n\n// Same length and the same entries in order — cheap enough to run every frame.\nexport function sameValues(a, b) {\n return a.length === b.length && a.every((value, i) => value === b[i]);\n}\n\n// How far to nudge a mark (UseSliderCollisionAvoidance) inward: however far\n// it hangs past controlRect, once that overflow exceeds tolerance.\nexport function edgeClampOffset(leftEdge, rightEdge, controlRect, tolerance) {\n const startOverflow = controlRect.left - leftEdge; // >0 means it hangs past the start edge\n const endOverflow = rightEdge - controlRect.right; // >0 means it hangs past the end edge\n if (startOverflow > tolerance) return startOverflow - tolerance;\n if (endOverflow > tolerance) return -(endOverflow - tolerance);\n return 0;\n}\n\n// pct is measured from insetInlineStart, which the browser mirrors to the\n// physical right under dir=\"rtl\" — analytical position math has to mirror\n// the same way, or it lands on the wrong physical edge.\nexport function mirrorPct(pct, isRtl) {\n return isRtl ? 100 - pct : pct;\n}\n\n// A CSS custom property isn't resolved to a used pixel value by\n// getComputedStyle on its own — per spec it's an unparsed token stream\n// until something concrete (a real layout property) consumes it. Giving a\n// disposable child element inline-size: var(--slider-edge-inset) and\n// reading its rendered width is the standard way to resolve one without\n// hand-reimplementing the calc() it's built from (UseSliderGeometry,\n// slider.less) — which would silently drift out of sync with it over time.\n// Shared by UseSliderInteraction (pointer-to-value mapping) and\n// UseSliderCollisionAvoidance (analytical readout/mark rects) — both need\n// the same inset in px to match where the thumb/readout actually render.\nexport function measureEdgeInsetPx(controlEl) {\n const probe = document.createElement('div');\n probe.style.position = 'absolute';\n probe.style.visibility = 'hidden';\n probe.style.pointerEvents = 'none';\n probe.style.inlineSize = 'var(--slider-edge-inset)';\n probe.style.blockSize = '0px';\n controlEl.appendChild(probe);\n const px = probe.getBoundingClientRect().width;\n probe.remove();\n return px;\n}\n"],"mappings":";AAIA,IAAa,IAAuB;AAEpC,SAAgB,EAAY,GAAM;AAChC,QAAO,OAAO,SAAS,OAAO,KAAS,WAAW,IAAO,GAAM,MAAM;;AAMvE,SAAgB,EAAiB,GAAK,GAAK,GAAU,GAAO;CAC1D,IAAM,IAAO,IAAM,GACb,IAAe,IAAO,IAAI,KAAK,MAAM,IAAO,EAAS,GAAG,IAAI,GAC9D,IAAoB;AACxB,CAAI,IAAA,QAOF,IAAoB,KAAQ,IAAuB,IACnD,QAAA,IAAA,aAA6B,gBAC3B,QAAQ,KACN,wBAAwB,EAAM,GAAG,EAAS,4BAA4B,EAAqB,kCAAkC,EAAkB,kDAChJ;CAGL,IAAM,IAAS,EAAE;AACjB,MACE,IAAI,IAAI,GACR,KAAK,KAAO,EAAO,SAAA,KACnB,IAAI,YAAY,IAAI,GAAmB,QAAQ,GAAG,CAAC,CAEnD,GAAO,KAAK,EAAE;AAOhB,QAHI,EAAO,UAAU,EAAO,EAAO,SAAS,KAAK,IAAM,QACrD,EAAO,KAAK,EAAI,EAEX;;AAIT,SAAgB,EAAW,GAAG,GAAG;AAC/B,QAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,GAAO,MAAM,MAAU,EAAE,GAAG;;AAKvE,SAAgB,EAAgB,GAAU,GAAW,GAAa,GAAW;CAC3E,IAAM,IAAgB,EAAY,OAAO,GACnC,IAAc,IAAY,EAAY;AAG5C,QAFI,IAAgB,IAAkB,IAAgB,IAClD,IAAc,IAAkB,EAAE,IAAc,KAC7C;;AAMT,SAAgB,EAAU,GAAK,GAAO;AACpC,QAAO,IAAQ,MAAM,IAAM;;AAa7B,SAAgB,EAAmB,GAAW;CAC5C,IAAM,IAAQ,SAAS,cAAc,MAAM;AAM3C,CALA,EAAM,MAAM,WAAW,YACvB,EAAM,MAAM,aAAa,UACzB,EAAM,MAAM,gBAAgB,QAC5B,EAAM,MAAM,aAAa,4BACzB,EAAM,MAAM,YAAY,OACxB,EAAU,YAAY,EAAM;CAC5B,IAAM,IAAK,EAAM,uBAAuB,CAAC;AAEzC,QADA,EAAM,QAAQ,EACP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./text-list-constants.cjs`),t=require(`../../TextList-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./text-list-constants.cjs`),t=require(`../../TextList-CLUdOdlp.cjs`),n=require(`../../TextListItem-B-bhrqik.cjs`);exports.DT_TEXT_LIST_DEFAULT_TYPE=e.DT_TEXT_LIST_DEFAULT_TYPE,exports.DT_TEXT_LIST_GAP=e.DT_TEXT_LIST_GAP,exports.DT_TEXT_LIST_MARKERS=e.DT_TEXT_LIST_MARKERS,exports.DT_TEXT_LIST_MARKER_TONES=e.DT_TEXT_LIST_MARKER_TONES,exports.DT_TEXT_LIST_ORDERED_MARKERS=e.DT_TEXT_LIST_ORDERED_MARKERS,exports.DT_TEXT_LIST_TYPES=e.DT_TEXT_LIST_TYPES,exports.DT_TEXT_LIST_UNORDERED_MARKERS=e.DT_TEXT_LIST_UNORDERED_MARKERS,exports.DtTextList=t.t,exports.DtTextListItem=n.t;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DT_TEXT_LIST_DEFAULT_TYPE as e, DT_TEXT_LIST_GAP as t, DT_TEXT_LIST_MARKERS as n, DT_TEXT_LIST_MARKER_TONES as r, DT_TEXT_LIST_ORDERED_MARKERS as i, DT_TEXT_LIST_TYPES as a, DT_TEXT_LIST_UNORDERED_MARKERS as o } from "./text-list-constants.js";
|
|
2
|
-
import { t as s } from "../../TextList-
|
|
3
|
-
import { t as c } from "../../TextListItem-
|
|
2
|
+
import { t as s } from "../../TextList-7RwngSie.js";
|
|
3
|
+
import { t as c } from "../../TextListItem-D0UmIR_q.js";
|
|
4
4
|
export { e as DT_TEXT_LIST_DEFAULT_TYPE, t as DT_TEXT_LIST_GAP, n as DT_TEXT_LIST_MARKERS, r as DT_TEXT_LIST_MARKER_TONES, i as DT_TEXT_LIST_ORDERED_MARKERS, a as DT_TEXT_LIST_TYPES, o as DT_TEXT_LIST_UNORDERED_MARKERS, s as DtTextList, c as DtTextListItem };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../TextListItem-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../TextListItem-B-bhrqik.cjs`);exports.default=e.t;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../TextListItem-
|
|
1
|
+
import { t as e } from "../../TextListItem-D0UmIR_q.js";
|
|
2
2
|
export { e as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../TextList-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../TextList-CLUdOdlp.cjs`);exports.default=e.t;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../TextList-
|
|
1
|
+
import { t as e } from "../../TextList-7RwngSie.js";
|
|
2
2
|
export { e as default };
|
package/dist/lib/toast/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./toast-constants.cjs`),t=require(`../../Toast-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./toast-constants.cjs`),t=require(`../../Toast-57Ts-hX9.cjs`);exports.DtToast=t.t,exports.TOAST_MIN_DURATION=e.TOAST_MIN_DURATION,exports.TOAST_ROLES=e.TOAST_ROLES;
|
package/dist/lib/toast/index.js
CHANGED
package/dist/lib/toast/toast.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../Toast-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../Toast-57Ts-hX9.cjs`);exports.default=e.t;
|
package/dist/lib/toast/toast.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../Toast-
|
|
1
|
+
import { t as e } from "../../Toast-BNhGD6l8.js";
|
|
2
2
|
export { e as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dialpad/dialtone-vue",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "Vue component library for Dialpad's design system Dialtone",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"regex-combined-emojis": "1.6.0",
|
|
48
48
|
"tippy.js": "6.3.7",
|
|
49
49
|
"@dialpad/dialtone-emojis": "1.3.1",
|
|
50
|
-
"@dialpad/dialtone-icons": "5.
|
|
50
|
+
"@dialpad/dialtone-icons": "5.4.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@storybook/addon-a11y": "10.3.0",
|
|
@@ -61,12 +61,12 @@
|
|
|
61
61
|
"react": "19.2.4",
|
|
62
62
|
"storybook": "10.3.0",
|
|
63
63
|
"vue": "^3.3.4",
|
|
64
|
-
"@dialpad/dialtone-css": "9.
|
|
64
|
+
"@dialpad/dialtone-css": "9.2.0",
|
|
65
65
|
"@dialpad/generator-dialtone": "0.1.0"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"vue": ">=3.2",
|
|
69
|
-
"@dialpad/dialtone-css": "^9.
|
|
69
|
+
"@dialpad/dialtone-css": "^9.2.0"
|
|
70
70
|
},
|
|
71
71
|
"bugs": {
|
|
72
72
|
"email": "dialtone@dialpad.com"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Datepicker-CGFa1nGm.js","names":["$refs","$emit"],"sources":["../components/Datepicker/Composables/UseMonthYearPicker.js","../components/Datepicker/Modules/MonthYearPicker.vue","../components/Datepicker/Composables/UseCalendar.js","../components/Datepicker/Modules/Calendar.vue","../components/Datepicker/Datepicker.vue"],"sourcesContent":["import { computed, ref, watch } from 'vue';\nimport { addMonths, endOfMonth, getDate, getMonth, getYear, set, startOfDay, startOfMonth, subMonths } from 'date-fns';\nimport { formatMonth, getCalendarDays } from '../Utils.js';\nimport { INTL_MONTH_FORMAT } from '../DatepickerConstants';\nimport { returnFirstEl } from '@/common/utils';\nimport { DialtoneLocalization } from '@/localization';\n\nexport function useMonthYearPicker (props, emits) {\n const selectMonth = ref(getMonth(props.selectedDate));\n const selectYear = ref(getYear(props.selectedDate));\n const highlightedDay = ref(null);\n const focusPicker = ref(0);\n const focusRefs = ref([]);\n const i18n = new DialtoneLocalization();\n\n const calendarDays = computed(() => {\n return getCalendarDays(\n selectMonth.value, selectYear.value, highlightedDay.value,\n props.minDate, props.maxDate, props.weekStartsOn,\n );\n });\n\n const isPrevMonthDisabled = computed(() => {\n if (!props.minDate) return false;\n const prevMonth = subMonths(new Date(selectYear.value, selectMonth.value, 1), 1);\n return endOfMonth(prevMonth) < startOfDay(props.minDate);\n });\n\n const isNextMonthDisabled = computed(() => {\n if (!props.maxDate) return false;\n const nextMonth = addMonths(new Date(selectYear.value, selectMonth.value, 1), 1);\n return startOfMonth(nextMonth) > startOfDay(props.maxDate);\n });\n\n const isPrevYearDisabled = computed(() => {\n if (!props.minDate) return false;\n const prevYearMonth = new Date(selectYear.value - 1, selectMonth.value, 1);\n return endOfMonth(prevYearMonth) < startOfDay(props.minDate);\n });\n\n const isNextYearDisabled = computed(() => {\n if (!props.maxDate) return false;\n const nextYearMonth = new Date(selectYear.value + 1, selectMonth.value, 1);\n return startOfMonth(nextYearMonth) > startOfDay(props.maxDate);\n });\n\n watch(selectMonth, () => {\n highlightDay();\n emits('calendar-days', calendarDays.value);\n }, { immediate: true });\n\n watch(selectYear, () => {\n highlightDay();\n emits('calendar-days', calendarDays.value);\n }, { immediate: true });\n\n watch(() => props.minDate, () => {\n emits('calendar-days', calendarDays.value);\n });\n\n watch(() => props.maxDate, () => {\n emits('calendar-days', calendarDays.value);\n });\n\n function formattedMonth (month) {\n return formatMonth(month, INTL_MONTH_FORMAT, i18n.currentLocale);\n }\n\n function setDayRef (el) {\n if (!focusRefs.value.includes(el)) {\n focusRefs.value.push(el);\n }\n }\n\n function focusMonthYearPicker () {\n returnFirstEl(focusRefs.value[0].$el).focus();\n }\n\n function handleKeyDown (event) {\n switch (event.key) {\n case 'ArrowLeft':\n event.preventDefault();\n if (focusPicker.value === 0) {\n focusPicker.value = 3;\n returnFirstEl(focusRefs.value[focusPicker.value].$el).focus();\n } else {\n focusPicker.value--;\n returnFirstEl(focusRefs.value[focusPicker.value].$el).focus();\n }\n break;\n\n case 'ArrowRight':\n event.preventDefault();\n if (focusPicker.value === 3) {\n focusPicker.value = 0;\n returnFirstEl(focusRefs.value[focusPicker.value].$el).focus();\n } else {\n focusPicker.value++;\n returnFirstEl(focusRefs.value[focusPicker.value].$el).focus();\n }\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n emits('focus-first-day');\n break;\n\n case 'Tab':\n event.preventDefault();\n emits('focus-first-day');\n break;\n\n case 'Escape':\n emits('close-datepicker');\n break;\n }\n }\n\n function highlightDay () {\n const year = getYear(props.selectedDate);\n const month = getMonth(props.selectedDate);\n\n if (year !== selectYear.value || month !== selectMonth.value) {\n highlightedDay.value = null;\n } else {\n highlightedDay.value = getDate(props.selectedDate);\n }\n }\n\n function changeMonth (value) {\n if (value === -1 && isPrevMonthDisabled.value) return;\n if (value === 1 && isNextMonthDisabled.value) return;\n\n // Adjust year when changing from January to December or vice versa\n if ((selectMonth.value === 0 && value === -1) || (selectMonth.value === 11 && value === 1)) {\n selectYear.value += value;\n }\n\n // Calculate the new date by adding or subtracting months\n const initialDate = set(props.selectedDate, { month: selectMonth.value, year: selectYear.value });\n const newDate = value === 1 ? addMonths(initialDate, 1) : subMonths(initialDate, 1);\n\n // Update the selected month\n selectMonth.value = getMonth(newDate);\n }\n\n function changeYear (value) {\n if (value === -1 && isPrevYearDisabled.value) return;\n if (value === 1 && isNextYearDisabled.value) return;\n\n selectYear.value = selectYear.value + value;\n }\n\n function goToNextMonth () {\n changeMonth(1);\n }\n\n function goToPrevMonth () {\n changeMonth(-1);\n }\n\n function previousYearAriaLabel () {\n return `${i18n.$t('DIALTONE_DATEPICKER_CHANGE_TO')} ${i18n.$t('DIALTONE_DATEPICKER_PREVIOUS_YEAR')} ${selectYear.value - 1}`;\n }\n\n function previousMonthAriaLabel () {\n return `${i18n.$t('DIALTONE_DATEPICKER_CHANGE_TO')} ${i18n.$t('DIALTONE_DATEPICKER_PREVIOUS_MONTH')} ${formattedMonth(selectMonth.value - 1)}`;\n }\n\n function nextYearAriaLabel () {\n return `${i18n.$t('DIALTONE_DATEPICKER_CHANGE_TO')} ${i18n.$t('DIALTONE_DATEPICKER_NEXT_YEAR')} ${selectYear.value + 1}`;\n }\n\n function nextMonthAriaLabel () {\n return `${i18n.$t('DIALTONE_DATEPICKER_CHANGE_TO')} ${i18n.$t('DIALTONE_DATEPICKER_NEXT_MONTH')} ${formattedMonth(selectMonth.value + 1)}`;\n }\n\n return {\n selectMonth,\n selectYear,\n formattedMonth,\n setDayRef,\n focusMonthYearPicker,\n handleKeyDown,\n changeMonth,\n changeYear,\n goToNextMonth,\n goToPrevMonth,\n isPrevMonthDisabled,\n isNextMonthDisabled,\n isPrevYearDisabled,\n isNextYearDisabled,\n previousYearAriaLabel,\n previousMonthAriaLabel,\n nextYearAriaLabel,\n nextMonthAriaLabel,\n };\n}\n","<template>\n <dt-stack\n class=\"d-datepicker__month-year\"\n direction=\"row\"\n gap=\"50\"\n >\n <dt-stack\n as=\"nav\"\n class=\"d-datepicker__nav\"\n direction=\"row\"\n gap=\"25\"\n >\n <dt-tooltip\n :fallback-placements=\"['top-start', 'auto']\"\n :message=\"i18n.$t('DIALTONE_DATEPICKER_PREVIOUS_YEAR')\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n id=\"prevYearButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n :aria-label=\"previousYearAriaLabel()\"\n :disabled=\"isPrevYearDisabled\"\n kind=\"muted\"\n class=\"d-datepicker__nav-btn\"\n importance=\"clear\"\n :size=\"100\"\n type=\"button\"\n @click=\"changeYear(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <template #icon=\"{ iconSize }\">\n <dt-icon-chevrons-left :size=\"iconSize\" />\n </template>\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :fallback-placements=\"['top-start', 'auto']\"\n :message=\"i18n.$t('DIALTONE_DATEPICKER_PREVIOUS_MONTH')\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n id=\"prevMonthButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n :aria-label=\"previousMonthAriaLabel()\"\n :disabled=\"isPrevMonthDisabled\"\n class=\"d-datepicker__nav-btn\"\n importance=\"clear\"\n kind=\"muted\"\n :size=\"100\"\n type=\"button\"\n @click=\"changeMonth(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <template #icon=\"{ iconSize }\">\n <dt-icon-chevron-left :size=\"iconSize\" />\n </template>\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n <div\n id=\"calendar-heading\"\n class=\"d-datepicker__month-year-title\"\n >\n {{ formattedMonth(selectMonth) }}\n\n {{ selectYear }}\n </div>\n <dt-stack\n as=\"nav\"\n class=\"d-datepicker__nav\"\n direction=\"row\"\n gap=\"25\"\n >\n <dt-tooltip\n :fallback-placements=\"['top-end', 'auto']\"\n :message=\"i18n.$t('DIALTONE_DATEPICKER_NEXT_MONTH')\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n id=\"nextMonthButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n :aria-label=\"nextMonthAriaLabel()\"\n :disabled=\"isNextMonthDisabled\"\n class=\"d-datepicker__nav-btn\"\n importance=\"clear\"\n kind=\"muted\"\n :size=\"100\"\n type=\"button\"\n @click=\"changeMonth(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <template #icon=\"{ iconSize }\">\n <dt-icon-chevron-right :size=\"iconSize\" />\n </template>\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :fallback-placements=\"['top-end', 'auto']\"\n :message=\"i18n.$t('DIALTONE_DATEPICKER_NEXT_YEAR')\"\n placement=\"top\"\n >\n <template #anchor>\n <dt-button\n id=\"nextYearButton\"\n :ref=\"el => { if (el) setDayRef(el) }\"\n :aria-label=\"nextYearAriaLabel()\"\n :disabled=\"isNextYearDisabled\"\n class=\"d-datepicker__nav-btn\"\n importance=\"clear\"\n kind=\"muted\"\n :size=\"100\"\n type=\"button\"\n @click=\"changeYear(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <template #icon=\"{ iconSize }\">\n <dt-icon-chevrons-right :size=\"iconSize\" />\n </template>\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n </dt-stack>\n</template>\n\n<script setup>\nimport {\n DtIconChevronLeft,\n DtIconChevronsLeft,\n DtIconChevronRight,\n DtIconChevronsRight,\n} from '@dialpad/dialtone-icons/vue';\nimport { DtStack } from '@/components/Stack';\nimport { DtButton } from '@/components/Button';\nimport { DtTooltip } from '@/components/Tooltip';\nimport { onMounted } from 'vue';\nimport { useMonthYearPicker } from '../Composables/UseMonthYearPicker.js';\nimport { DialtoneLocalization } from '@/localization';\n\nconst props = defineProps({\n selectedDate: {\n type: Date,\n required: true,\n },\n\n minDate: {\n type: Date,\n default: null,\n },\n\n maxDate: {\n type: Date,\n default: null,\n },\n\n weekStartsOn: {\n type: Number,\n default: 0,\n validator: (v) => Number.isInteger(v) && v >= 0 && v <= 6,\n },\n});\n\nconst emits = defineEmits([\n /**\n * Will retrieve the calendar days of the given date\n *\n * @event calendar-days\n * @type {Array}\n */\n 'calendar-days',\n\n /**\n * Will focus first day in calendar\n *\n * @event focus-first-day\n */\n 'focus-first-day',\n\n /**\n * Will focus last day in calendar\n *\n * @event focus-last-day\n */\n 'focus-last-day',\n\n /**\n * Will close the datepicker\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n]);\n\nconst i18n = new DialtoneLocalization();\n\nconst {\n selectMonth,\n selectYear,\n formattedMonth,\n setDayRef,\n focusMonthYearPicker,\n handleKeyDown,\n changeMonth,\n changeYear,\n goToNextMonth,\n goToPrevMonth,\n isPrevMonthDisabled,\n isNextMonthDisabled,\n isPrevYearDisabled,\n isNextYearDisabled,\n previousYearAriaLabel,\n previousMonthAriaLabel,\n nextMonthAriaLabel,\n nextYearAriaLabel,\n} = useMonthYearPicker(props, emits);\n\nonMounted(() => {\n focusMonthYearPicker();\n});\n\ndefineExpose({\n focusMonthYearPicker,\n goToNextMonth,\n goToPrevMonth,\n});\n</script>\n","import { computed, ref, watch, nextTick } from 'vue';\nimport { getWeekDayNames, calculateNextFocusDate, calculatePrevFocusDate, formatDate } from '../Utils.js';\nimport { INTL_MONTH_FORMAT } from '../DatepickerConstants.js';\nimport { returnFirstEl } from '@/common/utils';\nimport { DialtoneLocalization } from '@/localization';\n\nexport function useCalendar (props, emits) {\n const selectedDay = ref(null);\n const focusDay = ref(0);\n const daysRef = ref([]);\n const i18n = new DialtoneLocalization();\n\n const weekDays = computed(() => {\n return getWeekDayNames(i18n.currentLocale, props.weekStartsOn);\n });\n\n watch(() => props.calendarDays, () => {\n focusDay.value = 0;\n daysRef.value = [];\n selectedDay.value = null;\n });\n\n function dayAriaLabel (day) {\n return i18n.$t('DIALTONE_DATEPICKER_SELECT_DAY') + ` ${formatDate(day.value, INTL_MONTH_FORMAT, i18n.currentLocale)}`;\n }\n\n function setDayRef (el, day) {\n if (!daysRef.value.some(day => day.el === el) && !day.disabled) {\n daysRef.value.push({ el, day });\n }\n }\n\n function handleKeyDown (event) {\n switch (event.key) {\n case 'ArrowUp':\n event.preventDefault();\n focusDay.value -= 7;\n try {\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n } catch {\n const prevFocusDate = calculatePrevFocusDate(daysRef.value[focusDay.value + 7].day.value);\n emits('go-to-prev-month');\n\n nextTick(() => {\n returnFirstEl(daysRef.value[prevFocusDate - 1].el.$el).focus();\n focusDay.value += prevFocusDate - 1;\n });\n }\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n focusDay.value += 7;\n try {\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n } catch {\n const nextFocusDate = calculateNextFocusDate(daysRef.value[focusDay.value - 7].day.value);\n emits('go-to-next-month');\n\n nextTick(() => {\n returnFirstEl(daysRef.value[nextFocusDate - 1].el.$el).focus();\n focusDay.value += nextFocusDate - 1;\n });\n }\n break;\n\n case 'ArrowLeft':\n event.preventDefault();\n if (focusDay.value > 0) {\n focusDay.value -= 1;\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n } else {\n // if we are on month first day, jump to last day of prev month\n emits('go-to-prev-month');\n focusLastDay();\n }\n break;\n\n case 'ArrowRight':\n event.preventDefault();\n if (focusDay.value < daysRef.value.length - 1) {\n focusDay.value += 1;\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n } else {\n // if we are on month last day, jump to first day of next month\n emits('go-to-next-month');\n\n focusFirstDay();\n }\n break;\n\n case 'Tab':\n event.preventDefault();\n emits('focus-month-year-picker');\n break;\n\n case 'Escape':\n emits('close-datepicker');\n break;\n }\n }\n\n function focusFirstDay () {\n focusDay.value = 0;\n\n nextTick(() => {\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n });\n }\n\n function focusLastDay () {\n nextTick(() => {\n focusDay.value = daysRef.value.length - 1;\n returnFirstEl(daysRef.value[focusDay.value].el.$el).focus();\n });\n }\n\n function selectDay (day) {\n if (day.disabled) { return; }\n\n // local selectedDay is updated when a day is selected\n selectedDay.value = day.text;\n emits('select-date', day.value);\n }\n\n return {\n selectedDay,\n weekDays,\n dayAriaLabel,\n setDayRef,\n handleKeyDown,\n focusFirstDay,\n selectDay,\n };\n}\n","<template>\n <table\n class=\"d-datepicker__calendar\"\n aria-labelledby=\"calendar-heading\"\n >\n <thead>\n <tr>\n <th\n v-for=\"day in weekDays\"\n :key=\"day\"\n scope=\"col\"\n class=\"d-datepicker__cell d-datepicker__cell--header\"\n >\n <span\n class=\"d-datepicker__weekday\"\n :title=\"day\"\n :aria-label=\"day\"\n > {{ day }}</span>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n v-for=\"(week, indexWeek) in calendarDays\"\n :key=\"indexWeek\"\n >\n <td\n v-for=\"(day, indexDays) in week.days\"\n :key=\"indexWeek + indexDays\"\n class=\"d-datepicker__cell\"\n role=\"listbox\"\n >\n <dt-button\n :ref=\"el => { if (el) setDayRef(el, day) }\"\n class=\"d-datepicker__day\"\n :size=\"200\"\n kind=\"muted\"\n importance=\"clear\"\n :disabled=\"day.disabled\"\n :class=\"{\n 'd-datepicker__day--disabled': day.disabled,\n 'd-datepicker__day--selected': selectedDay\n ? ((day.text === selectedDay) && !day.disabled)\n : day.selected,\n }\"\n type=\"button\"\n :aria-selected=\"!!selectedDay ? ((day.text === selectedDay) && !day.disabled) : day.selected\"\n :aria-label=\"dayAriaLabel(day)\"\n role=\"option\"\n @click=\"selectDay(day)\"\n @keydown=\"handleKeyDown($event)\"\n >\n {{ day.text }}\n </dt-button>\n </td>\n </tr>\n </tbody>\n </table>\n</template>\n\n<script setup>\nimport { useCalendar } from '../Composables/UseCalendar.js';\nimport { DtButton } from '@/components/Button';\n\nconst props = defineProps({\n calendarDays: {\n type: Array,\n required: true,\n },\n\n weekStartsOn: {\n type: Number,\n default: 0,\n validator: (v) => Number.isInteger(v) && v >= 0 && v <= 6,\n },\n});\n\nconst emits = defineEmits([\n /**\n * Event fired when a date is selected\n *\n * @event select-date\n * @type {Date}\n */\n 'select-date',\n\n /**\n * Will focus the month and year picker\n *\n * @event focus-month-year-picker\n */\n 'focus-month-year-picker',\n\n /**\n * Will close the datepicker\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n\n /**\n * Will go to the next month\n *\n * @event go-to-next-month\n */\n 'go-to-next-month',\n\n /**\n * Will go to the previous month\n *\n * @event go-to-prev-month\n */\n 'go-to-prev-month',\n]);\n\nconst {\n selectedDay,\n weekDays,\n dayAriaLabel,\n setDayRef,\n handleKeyDown,\n focusFirstDay,\n selectDay,\n} = useCalendar(props, emits);\n\ndefineExpose({\n focusFirstDay,\n});\n</script>\n","<!-- eslint-disable vue/multi-word-component-names -->\n<template>\n <dt-stack\n class=\"d-datepicker\"\n gap=\"100\"\n >\n <div class=\"d-datepicker__hd\">\n <month-year-picker\n ref=\"monthYearPicker\"\n :selected-date=\"selectedDate\"\n :min-date=\"minDate\"\n :max-date=\"maxDate\"\n :week-starts-on=\"weekStartsOn\"\n @calendar-days=\"updateCalendarDays\"\n @focus-first-day=\"$refs.calendar.focusFirstDay()\"\n @focus-last-day=\"$refs.calendar.focusLastDay()\"\n @close-datepicker=\"$emit('close-datepicker')\"\n />\n </div>\n <div class=\"d-datepicker__bd\">\n <calendar\n ref=\"calendar\"\n :calendar-days=\"calendarDays\"\n :week-starts-on=\"weekStartsOn\"\n @select-date=\"$emit('selected-date', $event)\"\n @focus-month-year-picker=\"$refs.monthYearPicker.focusMonthYearPicker()\"\n @close-datepicker=\"$emit('close-datepicker')\"\n @go-to-next-month=\"$refs.monthYearPicker.goToNextMonth()\"\n @go-to-prev-month=\"$refs.monthYearPicker.goToPrevMonth()\"\n />\n </div>\n </dt-stack>\n</template>\n\n<script setup>\nimport MonthYearPicker from './Modules/MonthYearPicker.vue';\nimport Calendar from './Modules/Calendar.vue';\nimport { DtStack } from '@/components/Stack';\nimport { returnFirstEl, warnIfUnmounted } from '@/common/utils';\nimport { onMounted, ref, getCurrentInstance } from 'vue';\n\ndefineOptions({\n name: 'DtDatepicker',\n});\n\ndefineProps({\n /**\n * Selected date\n *\n * @type {Date}\n */\n selectedDate: {\n type: Date,\n default: () => (new Date()),\n },\n\n /**\n * Minimum selectable date. Days before this date will be disabled.\n * Must be before or equal to maxDate when both are provided.\n *\n * @type {Date}\n */\n minDate: {\n type: Date,\n default: null,\n },\n\n /**\n * Maximum selectable date. Days after this date will be disabled.\n * Must be after or equal to minDate when both are provided.\n *\n * @type {Date}\n */\n maxDate: {\n type: Date,\n default: null,\n validator: (value, props) => {\n if (value && props.minDate && value < props.minDate) {\n console.warn('[DtDatepicker]: maxDate must be after or equal to minDate.');\n return false;\n }\n return true;\n },\n },\n\n /**\n * Day the week starts on. 0 = Sunday, 1 = Monday, ... 6 = Saturday.\n *\n * @values 0, 1, 2, 3, 4, 5, 6\n */\n weekStartsOn: {\n type: Number,\n default: 0,\n validator: (v) => Number.isInteger(v) && v >= 0 && v <= 6,\n },\n});\n\ndefineEmits([\n /**\n * Event fired when a date is selected\n *\n * @event selected-date\n * @type {Date}\n */\n 'selected-date',\n\n /**\n * Event fired when user presses the esc key\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n]);\n\nconst calendarDays = ref([]);\n\nfunction updateCalendarDays (days) {\n calendarDays.value = days;\n}\n\nonMounted(() => {\n const instance = getCurrentInstance();\n warnIfUnmounted(returnFirstEl(instance.proxy.$el), 'datepicker');\n});\n</script>\n"],"mappings":";;;;;;;;;;;AAOA,SAAgB,EAAoB,GAAO,GAAO;CAChD,IAAM,IAAc,EAAI,EAAS,EAAM,aAAa,CAAC,EAC/C,IAAa,EAAI,EAAQ,EAAM,aAAa,CAAC,EAC7C,IAAiB,EAAI,KAAK,EAC1B,IAAc,EAAI,EAAE,EACpB,IAAY,EAAI,EAAE,CAAC,EACnB,IAAO,IAAI,GAAsB,EAEjC,IAAe,QACZ,EACL,EAAY,OAAO,EAAW,OAAO,EAAe,OACpD,EAAM,SAAS,EAAM,SAAS,EAAM,aACrC,CACD,EAEI,IAAsB,QACrB,EAAM,UAEJ,EADW,EAAU,IAAI,KAAK,EAAW,OAAO,EAAY,OAAO,EAAE,EAAE,EAAE,CACpD,GAAG,EAAW,EAAM,QAAQ,GAF7B,GAG3B,EAEI,IAAsB,QACrB,EAAM,UAEJ,EADW,EAAU,IAAI,KAAK,EAAW,OAAO,EAAY,OAAO,EAAE,EAAE,EAAE,CAClD,GAAG,EAAW,EAAM,QAA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