@dialpad/dialtone-vue 4.1.0 → 4.2.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.
Files changed (57) hide show
  1. package/dist/ForceLinkify-CI1tkUBf.cjs +3 -0
  2. package/dist/ForceLinkify-CI1tkUBf.cjs.map +1 -0
  3. package/dist/ForceLinkify-bO3ug94b.js +544 -0
  4. package/dist/ForceLinkify-bO3ug94b.js.map +1 -0
  5. package/dist/{MarkdownRenderer-BQQDcWMC.cjs → MarkdownRenderer-B6oyniLV.cjs} +1 -1
  6. package/dist/{MarkdownRenderer-BQQDcWMC.cjs.map → MarkdownRenderer-B6oyniLV.cjs.map} +1 -1
  7. package/dist/{MarkdownRenderer-D3rM2x-1.js → MarkdownRenderer-D-EV50_M.js} +1 -1
  8. package/dist/{MarkdownRenderer-D3rM2x-1.js.map → MarkdownRenderer-D-EV50_M.js.map} +1 -1
  9. package/dist/{RichTextEditor-CzMY0oVT.js → RichTextEditor-Cz2VXb7-.js} +470 -466
  10. package/dist/{RichTextEditor-CzMY0oVT.js.map → RichTextEditor-Cz2VXb7-.js.map} +1 -1
  11. package/dist/RichTextEditor-EHgahp8r.cjs +11 -0
  12. package/dist/{RichTextEditor-n42FPkjs.cjs.map → RichTextEditor-EHgahp8r.cjs.map} +1 -1
  13. package/dist/{Scroller-BUtC5Z7j.cjs → Scroller-Du2kJsTR.cjs} +1 -1
  14. package/dist/{Scroller-BUtC5Z7j.cjs.map → Scroller-Du2kJsTR.cjs.map} +1 -1
  15. package/dist/{Scroller-BsGXTN6S.js → Scroller-JDoDYC5V.js} +1 -1
  16. package/dist/{Scroller-BsGXTN6S.js.map → Scroller-JDoDYC5V.js.map} +1 -1
  17. package/dist/{TextList-B6XFfQfD.js → TextList-D40u4g4T.js} +1 -1
  18. package/dist/{TextList-B6XFfQfD.js.map → TextList-D40u4g4T.js.map} +1 -1
  19. package/dist/{TextList-Dd-ROFiI.cjs → TextList-rS1MQdPB.cjs} +1 -1
  20. package/dist/{TextList-Dd-ROFiI.cjs.map → TextList-rS1MQdPB.cjs.map} +1 -1
  21. package/dist/{TextListItem-DIlrCkaM.cjs → TextListItem-CF6DzdvT.cjs} +1 -1
  22. package/dist/{TextListItem-DIlrCkaM.cjs.map → TextListItem-CF6DzdvT.cjs.map} +1 -1
  23. package/dist/{TextListItem-ImUi_FWh.js → TextListItem-PHgDIWV1.js} +1 -1
  24. package/dist/{TextListItem-ImUi_FWh.js.map → TextListItem-PHgDIWV1.js.map} +1 -1
  25. package/dist/{Toast-IyFVsArp.cjs → Toast-CN9x3jKH.cjs} +1 -1
  26. package/dist/{Toast-IyFVsArp.cjs.map → Toast-CN9x3jKH.cjs.map} +1 -1
  27. package/dist/{Toast-t6T8fd29.js → Toast-DVUE2_fV.js} +1 -1
  28. package/dist/{Toast-t6T8fd29.js.map → Toast-DVUE2_fV.js.map} +1 -1
  29. package/dist/component-documentation.json +1 -1
  30. package/dist/components/RichTextEditor/ForceLinkify.d.ts +4 -0
  31. package/dist/components/RichTextEditor/ForceLinkify.d.ts.map +1 -0
  32. package/dist/dialtone-vue.cjs +1 -1
  33. package/dist/dialtone-vue.js +5 -5
  34. package/dist/lib/rich-text-editor/force-linkify.cjs +1 -0
  35. package/dist/lib/rich-text-editor/force-linkify.js +2 -0
  36. package/dist/lib/rich-text-editor/index.cjs +1 -1
  37. package/dist/lib/rich-text-editor/index.js +1 -1
  38. package/dist/lib/rich-text-editor/markdown-renderer.cjs +1 -1
  39. package/dist/lib/rich-text-editor/markdown-renderer.js +1 -1
  40. package/dist/lib/rich-text-editor/rich-text-editor.cjs +1 -1
  41. package/dist/lib/rich-text-editor/rich-text-editor.js +1 -1
  42. package/dist/lib/scroller/index.cjs +1 -1
  43. package/dist/lib/scroller/index.js +1 -1
  44. package/dist/lib/scroller/scroller.cjs +1 -1
  45. package/dist/lib/scroller/scroller.js +1 -1
  46. package/dist/lib/text-list/index.cjs +1 -1
  47. package/dist/lib/text-list/index.js +2 -2
  48. package/dist/lib/text-list/text-list-item.cjs +1 -1
  49. package/dist/lib/text-list/text-list-item.js +1 -1
  50. package/dist/lib/text-list/text-list.cjs +1 -1
  51. package/dist/lib/text-list/text-list.js +1 -1
  52. package/dist/lib/toast/index.cjs +1 -1
  53. package/dist/lib/toast/index.js +1 -1
  54. package/dist/lib/toast/toast.cjs +1 -1
  55. package/dist/lib/toast/toast.js +1 -1
  56. package/package.json +3 -3
  57. package/dist/RichTextEditor-n42FPkjs.cjs +0 -11
@@ -1 +1 @@
1
- {"version":3,"file":"TextList-B6XFfQfD.js","names":[],"sources":["../components/TextList/TextList.vue","../components/TextList/TextList.vue"],"sourcesContent":["<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <component\n :is=\"listElement\"\n ref=\"listRef\"\n data-qa=\"dt-text-list\"\n :class=\"textListClasses\"\n :role=\"role\"\n :start=\"orderedStart\"\n :reversed=\"orderedReversed\"\n >\n <!-- @slot Text list items. Use DtTextListItem as the direct child. -->\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n onMounted,\n provide,\n ref,\n toRef,\n} from 'vue';\nimport {\n DT_TEXT_LIST_CONTEXT,\n DT_TEXT_LIST_DEFAULT_TYPE,\n DT_TEXT_LIST_ORDERED_MARKERS,\n DT_TEXT_LIST_UNORDERED_MARKERS,\n} from './TextListConstants';\nimport {\n textListGapValidator,\n textListMarkerToneValidator,\n textListMarkerValidator,\n textListTypeValidator,\n} from './Validators';\n\ndefineOptions({\n name: 'DtTextList',\n});\n\nconst props = defineProps({\n /**\n * Semantic list type. Sets the rendered element to `ul` or `ol`.\n * @values unordered, ordered\n */\n type: {\n type: String,\n default: DT_TEXT_LIST_DEFAULT_TYPE,\n validator: textListTypeValidator,\n },\n\n /**\n * Visual marker style. Leave unset for automatic depth-aware markers.\n * @values disc, circle, square, decimal, lower-alpha, upper-alpha, lower-roman, upper-roman, none\n */\n marker: {\n type: String,\n default: undefined,\n validator: textListMarkerValidator,\n },\n\n /**\n * Marker foreground tone. Uses the same tone vocabulary as DtText.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n markerTone: {\n type: String,\n default: undefined,\n validator: textListMarkerToneValidator,\n },\n\n /**\n * Space between list items and before nested lists.\n * @values 0, 1, 25, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400\n */\n gap: {\n type: String,\n default: undefined,\n validator: textListGapValidator,\n },\n\n /**\n * Starting number for ordered lists.\n */\n start: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Reverse ordered list numbering.\n */\n reversed: {\n type: Boolean,\n default: false,\n },\n});\n\nconst listRef = ref(null);\n\nprovide(DT_TEXT_LIST_CONTEXT, {\n type: toRef(props, 'type'),\n});\n\nconst isOrdered = computed(() => props.type === 'ordered');\nconst listElement = computed(() => isOrdered.value ? 'ol' : 'ul');\n// Safari drops list semantics when list-style is none; restore them explicitly.\nconst role = computed(() => props.marker === 'none' ? 'list' : undefined);\nconst orderedStart = computed(() => isOrdered.value ? props.start : undefined);\nconst orderedReversed = computed(() => isOrdered.value && props.reversed ? true : undefined);\n\nconst textListClasses = computed(() => [\n 'd-text-list',\n props.gap ? `d-text-list--gap-${props.gap}` : null,\n {\n 'd-text-list--ordered': isOrdered.value,\n },\n props.marker ? `d-text-list--marker-${props.marker}` : null,\n props.markerTone ? `d-text-list--marker-tone-${props.markerTone}` : null,\n]);\n\n// eslint-disable-next-line no-console\nconst warn = message => console.warn(`[DtTextList] ${message}`);\n\nfunction validateOrderedOnlyProps () {\n if (isOrdered.value) return;\n\n if (props.start !== undefined) {\n warn('The start prop only applies when type=\"ordered\".');\n }\n\n if (props.reversed) {\n warn('The reversed prop only applies when type=\"ordered\".');\n }\n}\n\nfunction validateMarkerFamily () {\n if (!props.marker || props.marker === 'none') return;\n\n if (props.type === 'ordered' && DT_TEXT_LIST_UNORDERED_MARKERS.includes(props.marker)) {\n warn(`The marker=\"${props.marker}\" value is usually used with type=\"unordered\".`);\n }\n\n if (props.type === 'unordered' && DT_TEXT_LIST_ORDERED_MARKERS.includes(props.marker)) {\n warn(`The marker=\"${props.marker}\" value is usually used with type=\"ordered\".`);\n }\n}\n\nfunction validateChildren () {\n const rootElement = listRef.value?.$el ?? listRef.value;\n if (!rootElement) return;\n\n for (const child of rootElement.children) {\n if (child.tagName === 'LI') continue;\n\n warn('Use DtTextListItem or a native li as the direct child of DtTextList.');\n break;\n }\n}\n\nonMounted(() => {\n if (process.env.NODE_ENV !== 'production') {\n validateOrderedOnlyProps();\n validateMarkerFamily();\n validateChildren();\n }\n});\n</script>\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <component\n :is=\"listElement\"\n ref=\"listRef\"\n data-qa=\"dt-text-list\"\n :class=\"textListClasses\"\n :role=\"role\"\n :start=\"orderedStart\"\n :reversed=\"orderedReversed\"\n >\n <!-- @slot Text list items. Use DtTextListItem as the direct child. -->\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n onMounted,\n provide,\n ref,\n toRef,\n} from 'vue';\nimport {\n DT_TEXT_LIST_CONTEXT,\n DT_TEXT_LIST_DEFAULT_TYPE,\n DT_TEXT_LIST_ORDERED_MARKERS,\n DT_TEXT_LIST_UNORDERED_MARKERS,\n} from './TextListConstants';\nimport {\n textListGapValidator,\n textListMarkerToneValidator,\n textListMarkerValidator,\n textListTypeValidator,\n} from './Validators';\n\ndefineOptions({\n name: 'DtTextList',\n});\n\nconst props = defineProps({\n /**\n * Semantic list type. Sets the rendered element to `ul` or `ol`.\n * @values unordered, ordered\n */\n type: {\n type: String,\n default: DT_TEXT_LIST_DEFAULT_TYPE,\n validator: textListTypeValidator,\n },\n\n /**\n * Visual marker style. Leave unset for automatic depth-aware markers.\n * @values disc, circle, square, decimal, lower-alpha, upper-alpha, lower-roman, upper-roman, none\n */\n marker: {\n type: String,\n default: undefined,\n validator: textListMarkerValidator,\n },\n\n /**\n * Marker foreground tone. Uses the same tone vocabulary as DtText.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n markerTone: {\n type: String,\n default: undefined,\n validator: textListMarkerToneValidator,\n },\n\n /**\n * Space between list items and before nested lists.\n * @values 0, 1, 25, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400\n */\n gap: {\n type: String,\n default: undefined,\n validator: textListGapValidator,\n },\n\n /**\n * Starting number for ordered lists.\n */\n start: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Reverse ordered list numbering.\n */\n reversed: {\n type: Boolean,\n default: false,\n },\n});\n\nconst listRef = ref(null);\n\nprovide(DT_TEXT_LIST_CONTEXT, {\n type: toRef(props, 'type'),\n});\n\nconst isOrdered = computed(() => props.type === 'ordered');\nconst listElement = computed(() => isOrdered.value ? 'ol' : 'ul');\n// Safari drops list semantics when list-style is none; restore them explicitly.\nconst role = computed(() => props.marker === 'none' ? 'list' : undefined);\nconst orderedStart = computed(() => isOrdered.value ? props.start : undefined);\nconst orderedReversed = computed(() => isOrdered.value && props.reversed ? true : undefined);\n\nconst textListClasses = computed(() => [\n 'd-text-list',\n props.gap ? `d-text-list--gap-${props.gap}` : null,\n {\n 'd-text-list--ordered': isOrdered.value,\n },\n props.marker ? `d-text-list--marker-${props.marker}` : null,\n props.markerTone ? `d-text-list--marker-tone-${props.markerTone}` : null,\n]);\n\n// eslint-disable-next-line no-console\nconst warn = message => console.warn(`[DtTextList] ${message}`);\n\nfunction validateOrderedOnlyProps () {\n if (isOrdered.value) return;\n\n if (props.start !== undefined) {\n warn('The start prop only applies when type=\"ordered\".');\n }\n\n if (props.reversed) {\n warn('The reversed prop only applies when type=\"ordered\".');\n }\n}\n\nfunction validateMarkerFamily () {\n if (!props.marker || props.marker === 'none') return;\n\n if (props.type === 'ordered' && DT_TEXT_LIST_UNORDERED_MARKERS.includes(props.marker)) {\n warn(`The marker=\"${props.marker}\" value is usually used with type=\"unordered\".`);\n }\n\n if (props.type === 'unordered' && DT_TEXT_LIST_ORDERED_MARKERS.includes(props.marker)) {\n warn(`The marker=\"${props.marker}\" value is usually used with type=\"ordered\".`);\n }\n}\n\nfunction validateChildren () {\n const rootElement = listRef.value?.$el ?? listRef.value;\n if (!rootElement) return;\n\n for (const child of rootElement.children) {\n if (child.tagName === 'LI') continue;\n\n warn('Use DtTextListItem or a native li as the direct child of DtTextList.');\n break;\n }\n}\n\nonMounted(() => {\n if (process.env.NODE_ENV !== 'production') {\n validateOrderedOnlyProps();\n validateMarkerFamily();\n validateChildren();\n }\n});\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CA,IAAM,IAAQ,GA0DR,IAAU,EAAI,KAAK;AAEzB,IAAQ,GAAsB,EAC5B,MAAM,EAAM,GAAO,OAAO,EAC3B,CAAC;EAEF,IAAM,IAAY,QAAe,EAAM,SAAS,UAAU,EACpD,IAAc,QAAe,EAAU,QAAQ,OAAO,KAAK,EAE3D,IAAO,QAAe,EAAM,WAAW,SAAS,SAAS,KAAA,EAAU,EACnE,IAAe,QAAe,EAAU,QAAQ,EAAM,QAAQ,KAAA,EAAU,EACxE,IAAkB,QAAe,EAAU,SAAS,EAAM,WAAW,KAAO,KAAA,EAAU,EAEtF,IAAkB,QAAe;GACrC;GACA,EAAM,MAAM,oBAAoB,EAAM,QAAQ;GAC9C,EACE,wBAAwB,EAAU,OACnC;GACD,EAAM,SAAS,uBAAuB,EAAM,WAAW;GACvD,EAAM,aAAa,4BAA4B,EAAM,eAAe;GACrE,CAAC,EAGI,KAAO,MAAW,QAAQ,KAAK,gBAAgB,IAAU;EAE/D,SAAS,IAA4B;AAC/B,KAAU,UAEV,EAAM,UAAU,KAAA,KAClB,EAAK,qDAAmD,EAGtD,EAAM,YACR,EAAK,wDAAsD;;EAI/D,SAAS,IAAwB;AAC3B,IAAC,EAAM,UAAU,EAAM,WAAW,WAElC,EAAM,SAAS,aAAa,EAA+B,SAAS,EAAM,OAAO,IACnF,EAAK,eAAe,EAAM,OAAO,gDAAgD,EAG/E,EAAM,SAAS,eAAe,EAA6B,SAAS,EAAM,OAAO,IACnF,EAAK,eAAe,EAAM,OAAO,8CAA8C;;EAInF,SAAS,IAAoB;GAC3B,IAAM,IAAc,EAAQ,OAAO,OAAO,EAAQ;AAC7C,UAEL;SAAK,IAAM,KAAS,EAAY,SAC1B,OAAM,YAAY,MAEtB;OAAK,uEAAuE;AAC5E;;;;SAIJ,QAAgB;AACd,GAAA,QAAA,IAAA,aAA6B,iBAC3B,GAA0B,EAC1B,GAAsB,EACtB,GAAkB;IAEpB,kBAtKA,EAWY,EAVL,EAAA,MAAW,EAAA;YACZ;GAAJ,KAAI;GACJ,WAAQ;GACP,OAAK,EAAE,EAAA,MAAe;GACtB,MAAM,EAAA;GACN,OAAO,EAAA;GACP,UAAU,EAAA;;oBAGH,CAAR,EAAQ,EAAA,QAAA,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"TextList-D40u4g4T.js","names":[],"sources":["../components/TextList/TextList.vue","../components/TextList/TextList.vue"],"sourcesContent":["<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <component\n :is=\"listElement\"\n ref=\"listRef\"\n data-qa=\"dt-text-list\"\n :class=\"textListClasses\"\n :role=\"role\"\n :start=\"orderedStart\"\n :reversed=\"orderedReversed\"\n >\n <!-- @slot Text list items. Use DtTextListItem as the direct child. -->\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n onMounted,\n provide,\n ref,\n toRef,\n} from 'vue';\nimport {\n DT_TEXT_LIST_CONTEXT,\n DT_TEXT_LIST_DEFAULT_TYPE,\n DT_TEXT_LIST_ORDERED_MARKERS,\n DT_TEXT_LIST_UNORDERED_MARKERS,\n} from './TextListConstants';\nimport {\n textListGapValidator,\n textListMarkerToneValidator,\n textListMarkerValidator,\n textListTypeValidator,\n} from './Validators';\n\ndefineOptions({\n name: 'DtTextList',\n});\n\nconst props = defineProps({\n /**\n * Semantic list type. Sets the rendered element to `ul` or `ol`.\n * @values unordered, ordered\n */\n type: {\n type: String,\n default: DT_TEXT_LIST_DEFAULT_TYPE,\n validator: textListTypeValidator,\n },\n\n /**\n * Visual marker style. Leave unset for automatic depth-aware markers.\n * @values disc, circle, square, decimal, lower-alpha, upper-alpha, lower-roman, upper-roman, none\n */\n marker: {\n type: String,\n default: undefined,\n validator: textListMarkerValidator,\n },\n\n /**\n * Marker foreground tone. Uses the same tone vocabulary as DtText.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n markerTone: {\n type: String,\n default: undefined,\n validator: textListMarkerToneValidator,\n },\n\n /**\n * Space between list items and before nested lists.\n * @values 0, 1, 25, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400\n */\n gap: {\n type: String,\n default: undefined,\n validator: textListGapValidator,\n },\n\n /**\n * Starting number for ordered lists.\n */\n start: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Reverse ordered list numbering.\n */\n reversed: {\n type: Boolean,\n default: false,\n },\n});\n\nconst listRef = ref(null);\n\nprovide(DT_TEXT_LIST_CONTEXT, {\n type: toRef(props, 'type'),\n});\n\nconst isOrdered = computed(() => props.type === 'ordered');\nconst listElement = computed(() => isOrdered.value ? 'ol' : 'ul');\n// Safari drops list semantics when list-style is none; restore them explicitly.\nconst role = computed(() => props.marker === 'none' ? 'list' : undefined);\nconst orderedStart = computed(() => isOrdered.value ? props.start : undefined);\nconst orderedReversed = computed(() => isOrdered.value && props.reversed ? true : undefined);\n\nconst textListClasses = computed(() => [\n 'd-text-list',\n props.gap ? `d-text-list--gap-${props.gap}` : null,\n {\n 'd-text-list--ordered': isOrdered.value,\n },\n props.marker ? `d-text-list--marker-${props.marker}` : null,\n props.markerTone ? `d-text-list--marker-tone-${props.markerTone}` : null,\n]);\n\n// eslint-disable-next-line no-console\nconst warn = message => console.warn(`[DtTextList] ${message}`);\n\nfunction validateOrderedOnlyProps () {\n if (isOrdered.value) return;\n\n if (props.start !== undefined) {\n warn('The start prop only applies when type=\"ordered\".');\n }\n\n if (props.reversed) {\n warn('The reversed prop only applies when type=\"ordered\".');\n }\n}\n\nfunction validateMarkerFamily () {\n if (!props.marker || props.marker === 'none') return;\n\n if (props.type === 'ordered' && DT_TEXT_LIST_UNORDERED_MARKERS.includes(props.marker)) {\n warn(`The marker=\"${props.marker}\" value is usually used with type=\"unordered\".`);\n }\n\n if (props.type === 'unordered' && DT_TEXT_LIST_ORDERED_MARKERS.includes(props.marker)) {\n warn(`The marker=\"${props.marker}\" value is usually used with type=\"ordered\".`);\n }\n}\n\nfunction validateChildren () {\n const rootElement = listRef.value?.$el ?? listRef.value;\n if (!rootElement) return;\n\n for (const child of rootElement.children) {\n if (child.tagName === 'LI') continue;\n\n warn('Use DtTextListItem or a native li as the direct child of DtTextList.');\n break;\n }\n}\n\nonMounted(() => {\n if (process.env.NODE_ENV !== 'production') {\n validateOrderedOnlyProps();\n validateMarkerFamily();\n validateChildren();\n }\n});\n</script>\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <component\n :is=\"listElement\"\n ref=\"listRef\"\n data-qa=\"dt-text-list\"\n :class=\"textListClasses\"\n :role=\"role\"\n :start=\"orderedStart\"\n :reversed=\"orderedReversed\"\n >\n <!-- @slot Text list items. Use DtTextListItem as the direct child. -->\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n onMounted,\n provide,\n ref,\n toRef,\n} from 'vue';\nimport {\n DT_TEXT_LIST_CONTEXT,\n DT_TEXT_LIST_DEFAULT_TYPE,\n DT_TEXT_LIST_ORDERED_MARKERS,\n DT_TEXT_LIST_UNORDERED_MARKERS,\n} from './TextListConstants';\nimport {\n textListGapValidator,\n textListMarkerToneValidator,\n textListMarkerValidator,\n textListTypeValidator,\n} from './Validators';\n\ndefineOptions({\n name: 'DtTextList',\n});\n\nconst props = defineProps({\n /**\n * Semantic list type. Sets the rendered element to `ul` or `ol`.\n * @values unordered, ordered\n */\n type: {\n type: String,\n default: DT_TEXT_LIST_DEFAULT_TYPE,\n validator: textListTypeValidator,\n },\n\n /**\n * Visual marker style. Leave unset for automatic depth-aware markers.\n * @values disc, circle, square, decimal, lower-alpha, upper-alpha, lower-roman, upper-roman, none\n */\n marker: {\n type: String,\n default: undefined,\n validator: textListMarkerValidator,\n },\n\n /**\n * Marker foreground tone. Uses the same tone vocabulary as DtText.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n markerTone: {\n type: String,\n default: undefined,\n validator: textListMarkerToneValidator,\n },\n\n /**\n * Space between list items and before nested lists.\n * @values 0, 1, 25, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400\n */\n gap: {\n type: String,\n default: undefined,\n validator: textListGapValidator,\n },\n\n /**\n * Starting number for ordered lists.\n */\n start: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Reverse ordered list numbering.\n */\n reversed: {\n type: Boolean,\n default: false,\n },\n});\n\nconst listRef = ref(null);\n\nprovide(DT_TEXT_LIST_CONTEXT, {\n type: toRef(props, 'type'),\n});\n\nconst isOrdered = computed(() => props.type === 'ordered');\nconst listElement = computed(() => isOrdered.value ? 'ol' : 'ul');\n// Safari drops list semantics when list-style is none; restore them explicitly.\nconst role = computed(() => props.marker === 'none' ? 'list' : undefined);\nconst orderedStart = computed(() => isOrdered.value ? props.start : undefined);\nconst orderedReversed = computed(() => isOrdered.value && props.reversed ? true : undefined);\n\nconst textListClasses = computed(() => [\n 'd-text-list',\n props.gap ? `d-text-list--gap-${props.gap}` : null,\n {\n 'd-text-list--ordered': isOrdered.value,\n },\n props.marker ? `d-text-list--marker-${props.marker}` : null,\n props.markerTone ? `d-text-list--marker-tone-${props.markerTone}` : null,\n]);\n\n// eslint-disable-next-line no-console\nconst warn = message => console.warn(`[DtTextList] ${message}`);\n\nfunction validateOrderedOnlyProps () {\n if (isOrdered.value) return;\n\n if (props.start !== undefined) {\n warn('The start prop only applies when type=\"ordered\".');\n }\n\n if (props.reversed) {\n warn('The reversed prop only applies when type=\"ordered\".');\n }\n}\n\nfunction validateMarkerFamily () {\n if (!props.marker || props.marker === 'none') return;\n\n if (props.type === 'ordered' && DT_TEXT_LIST_UNORDERED_MARKERS.includes(props.marker)) {\n warn(`The marker=\"${props.marker}\" value is usually used with type=\"unordered\".`);\n }\n\n if (props.type === 'unordered' && DT_TEXT_LIST_ORDERED_MARKERS.includes(props.marker)) {\n warn(`The marker=\"${props.marker}\" value is usually used with type=\"ordered\".`);\n }\n}\n\nfunction validateChildren () {\n const rootElement = listRef.value?.$el ?? listRef.value;\n if (!rootElement) return;\n\n for (const child of rootElement.children) {\n if (child.tagName === 'LI') continue;\n\n warn('Use DtTextListItem or a native li as the direct child of DtTextList.');\n break;\n }\n}\n\nonMounted(() => {\n if (process.env.NODE_ENV !== 'production') {\n validateOrderedOnlyProps();\n validateMarkerFamily();\n validateChildren();\n }\n});\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CA,IAAM,IAAQ,GA0DR,IAAU,EAAI,KAAK;AAEzB,IAAQ,GAAsB,EAC5B,MAAM,EAAM,GAAO,OAAO,EAC3B,CAAC;EAEF,IAAM,IAAY,QAAe,EAAM,SAAS,UAAU,EACpD,IAAc,QAAe,EAAU,QAAQ,OAAO,KAAK,EAE3D,IAAO,QAAe,EAAM,WAAW,SAAS,SAAS,KAAA,EAAU,EACnE,IAAe,QAAe,EAAU,QAAQ,EAAM,QAAQ,KAAA,EAAU,EACxE,IAAkB,QAAe,EAAU,SAAS,EAAM,WAAW,KAAO,KAAA,EAAU,EAEtF,IAAkB,QAAe;GACrC;GACA,EAAM,MAAM,oBAAoB,EAAM,QAAQ;GAC9C,EACE,wBAAwB,EAAU,OACnC;GACD,EAAM,SAAS,uBAAuB,EAAM,WAAW;GACvD,EAAM,aAAa,4BAA4B,EAAM,eAAe;GACrE,CAAC,EAGI,KAAO,MAAW,QAAQ,KAAK,gBAAgB,IAAU;EAE/D,SAAS,IAA4B;AAC/B,KAAU,UAEV,EAAM,UAAU,KAAA,KAClB,EAAK,qDAAmD,EAGtD,EAAM,YACR,EAAK,wDAAsD;;EAI/D,SAAS,IAAwB;AAC3B,IAAC,EAAM,UAAU,EAAM,WAAW,WAElC,EAAM,SAAS,aAAa,EAA+B,SAAS,EAAM,OAAO,IACnF,EAAK,eAAe,EAAM,OAAO,gDAAgD,EAG/E,EAAM,SAAS,eAAe,EAA6B,SAAS,EAAM,OAAO,IACnF,EAAK,eAAe,EAAM,OAAO,8CAA8C;;EAInF,SAAS,IAAoB;GAC3B,IAAM,IAAc,EAAQ,OAAO,OAAO,EAAQ;AAC7C,UAEL;SAAK,IAAM,KAAS,EAAY,SAC1B,OAAM,YAAY,MAEtB;OAAK,uEAAuE;AAC5E;;;;SAIJ,QAAgB;AACd,GAAA,QAAA,IAAA,aAA6B,iBAC3B,GAA0B,EAC1B,GAAsB,EACtB,GAAkB;IAEpB,kBAtKA,EAWY,EAVL,EAAA,MAAW,EAAA;YACZ;GAAJ,KAAI;GACJ,WAAQ;GACP,OAAK,EAAE,EAAA,MAAe;GACtB,MAAM,EAAA;GACN,OAAO,EAAA;GACP,UAAU,EAAA;;oBAGH,CAAR,EAAQ,EAAA,QAAA,UAAA,CAAA,CAAA"}
@@ -1,2 +1,2 @@
1
1
  require(`./chunk-Bmb41Sf3.cjs`);const e=require(`./lib/text-list/text-list-constants.cjs`),t=require(`./lib/text-list/validators.cjs`);let n=require(`vue`);var r=(0,n.defineComponent)({name:`DtTextList`,__name:`TextList`,props:{type:{type:String,default:e.DT_TEXT_LIST_DEFAULT_TYPE,validator:t.textListTypeValidator},marker:{type:String,default:void 0,validator:t.textListMarkerValidator},markerTone:{type:String,default:void 0,validator:t.textListMarkerToneValidator},gap:{type:String,default:void 0,validator:t.textListGapValidator},start:{type:Number,default:void 0},reversed:{type:Boolean,default:!1}},setup(t){let r=t,i=(0,n.ref)(null);(0,n.provide)(e.DT_TEXT_LIST_CONTEXT,{type:(0,n.toRef)(r,`type`)});let a=(0,n.computed)(()=>r.type===`ordered`),o=(0,n.computed)(()=>a.value?`ol`:`ul`),s=(0,n.computed)(()=>r.marker===`none`?`list`:void 0),c=(0,n.computed)(()=>a.value?r.start:void 0),l=(0,n.computed)(()=>a.value&&r.reversed?!0:void 0),u=(0,n.computed)(()=>[`d-text-list`,r.gap?`d-text-list--gap-${r.gap}`:null,{"d-text-list--ordered":a.value},r.marker?`d-text-list--marker-${r.marker}`:null,r.markerTone?`d-text-list--marker-tone-${r.markerTone}`:null]),d=e=>console.warn(`[DtTextList] ${e}`);function f(){a.value||(r.start!==void 0&&d(`The start prop only applies when type="ordered".`),r.reversed&&d(`The reversed prop only applies when type="ordered".`))}function p(){!r.marker||r.marker===`none`||(r.type===`ordered`&&e.DT_TEXT_LIST_UNORDERED_MARKERS.includes(r.marker)&&d(`The marker="${r.marker}" value is usually used with type="unordered".`),r.type===`unordered`&&e.DT_TEXT_LIST_ORDERED_MARKERS.includes(r.marker)&&d(`The marker="${r.marker}" value is usually used with type="ordered".`))}function m(){let e=i.value?.$el??i.value;if(e){for(let t of e.children)if(t.tagName!==`LI`){d(`Use DtTextListItem or a native li as the direct child of DtTextList.`);break}}}return(0,n.onMounted)(()=>{process.env.NODE_ENV!==`production`&&(f(),p(),m())}),(e,t)=>((0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)(o.value),{ref_key:`listRef`,ref:i,"data-qa":`dt-text-list`,class:(0,n.normalizeClass)(u.value),role:s.value,start:c.value,reversed:l.value},{default:(0,n.withCtx)(()=>[(0,n.renderSlot)(e.$slots,`default`)]),_:3},8,[`class`,`role`,`start`,`reversed`]))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
2
- //# sourceMappingURL=TextList-Dd-ROFiI.cjs.map
2
+ //# sourceMappingURL=TextList-rS1MQdPB.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextList-Dd-ROFiI.cjs","names":[],"sources":["../components/TextList/TextList.vue","../components/TextList/TextList.vue"],"sourcesContent":["<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <component\n :is=\"listElement\"\n ref=\"listRef\"\n data-qa=\"dt-text-list\"\n :class=\"textListClasses\"\n :role=\"role\"\n :start=\"orderedStart\"\n :reversed=\"orderedReversed\"\n >\n <!-- @slot Text list items. Use DtTextListItem as the direct child. -->\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n onMounted,\n provide,\n ref,\n toRef,\n} from 'vue';\nimport {\n DT_TEXT_LIST_CONTEXT,\n DT_TEXT_LIST_DEFAULT_TYPE,\n DT_TEXT_LIST_ORDERED_MARKERS,\n DT_TEXT_LIST_UNORDERED_MARKERS,\n} from './TextListConstants';\nimport {\n textListGapValidator,\n textListMarkerToneValidator,\n textListMarkerValidator,\n textListTypeValidator,\n} from './Validators';\n\ndefineOptions({\n name: 'DtTextList',\n});\n\nconst props = defineProps({\n /**\n * Semantic list type. Sets the rendered element to `ul` or `ol`.\n * @values unordered, ordered\n */\n type: {\n type: String,\n default: DT_TEXT_LIST_DEFAULT_TYPE,\n validator: textListTypeValidator,\n },\n\n /**\n * Visual marker style. Leave unset for automatic depth-aware markers.\n * @values disc, circle, square, decimal, lower-alpha, upper-alpha, lower-roman, upper-roman, none\n */\n marker: {\n type: String,\n default: undefined,\n validator: textListMarkerValidator,\n },\n\n /**\n * Marker foreground tone. Uses the same tone vocabulary as DtText.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n markerTone: {\n type: String,\n default: undefined,\n validator: textListMarkerToneValidator,\n },\n\n /**\n * Space between list items and before nested lists.\n * @values 0, 1, 25, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400\n */\n gap: {\n type: String,\n default: undefined,\n validator: textListGapValidator,\n },\n\n /**\n * Starting number for ordered lists.\n */\n start: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Reverse ordered list numbering.\n */\n reversed: {\n type: Boolean,\n default: false,\n },\n});\n\nconst listRef = ref(null);\n\nprovide(DT_TEXT_LIST_CONTEXT, {\n type: toRef(props, 'type'),\n});\n\nconst isOrdered = computed(() => props.type === 'ordered');\nconst listElement = computed(() => isOrdered.value ? 'ol' : 'ul');\n// Safari drops list semantics when list-style is none; restore them explicitly.\nconst role = computed(() => props.marker === 'none' ? 'list' : undefined);\nconst orderedStart = computed(() => isOrdered.value ? props.start : undefined);\nconst orderedReversed = computed(() => isOrdered.value && props.reversed ? true : undefined);\n\nconst textListClasses = computed(() => [\n 'd-text-list',\n props.gap ? `d-text-list--gap-${props.gap}` : null,\n {\n 'd-text-list--ordered': isOrdered.value,\n },\n props.marker ? `d-text-list--marker-${props.marker}` : null,\n props.markerTone ? `d-text-list--marker-tone-${props.markerTone}` : null,\n]);\n\n// eslint-disable-next-line no-console\nconst warn = message => console.warn(`[DtTextList] ${message}`);\n\nfunction validateOrderedOnlyProps () {\n if (isOrdered.value) return;\n\n if (props.start !== undefined) {\n warn('The start prop only applies when type=\"ordered\".');\n }\n\n if (props.reversed) {\n warn('The reversed prop only applies when type=\"ordered\".');\n }\n}\n\nfunction validateMarkerFamily () {\n if (!props.marker || props.marker === 'none') return;\n\n if (props.type === 'ordered' && DT_TEXT_LIST_UNORDERED_MARKERS.includes(props.marker)) {\n warn(`The marker=\"${props.marker}\" value is usually used with type=\"unordered\".`);\n }\n\n if (props.type === 'unordered' && DT_TEXT_LIST_ORDERED_MARKERS.includes(props.marker)) {\n warn(`The marker=\"${props.marker}\" value is usually used with type=\"ordered\".`);\n }\n}\n\nfunction validateChildren () {\n const rootElement = listRef.value?.$el ?? listRef.value;\n if (!rootElement) return;\n\n for (const child of rootElement.children) {\n if (child.tagName === 'LI') continue;\n\n warn('Use DtTextListItem or a native li as the direct child of DtTextList.');\n break;\n }\n}\n\nonMounted(() => {\n if (process.env.NODE_ENV !== 'production') {\n validateOrderedOnlyProps();\n validateMarkerFamily();\n validateChildren();\n }\n});\n</script>\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <component\n :is=\"listElement\"\n ref=\"listRef\"\n data-qa=\"dt-text-list\"\n :class=\"textListClasses\"\n :role=\"role\"\n :start=\"orderedStart\"\n :reversed=\"orderedReversed\"\n >\n <!-- @slot Text list items. Use DtTextListItem as the direct child. -->\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n onMounted,\n provide,\n ref,\n toRef,\n} from 'vue';\nimport {\n DT_TEXT_LIST_CONTEXT,\n DT_TEXT_LIST_DEFAULT_TYPE,\n DT_TEXT_LIST_ORDERED_MARKERS,\n DT_TEXT_LIST_UNORDERED_MARKERS,\n} from './TextListConstants';\nimport {\n textListGapValidator,\n textListMarkerToneValidator,\n textListMarkerValidator,\n textListTypeValidator,\n} from './Validators';\n\ndefineOptions({\n name: 'DtTextList',\n});\n\nconst props = defineProps({\n /**\n * Semantic list type. Sets the rendered element to `ul` or `ol`.\n * @values unordered, ordered\n */\n type: {\n type: String,\n default: DT_TEXT_LIST_DEFAULT_TYPE,\n validator: textListTypeValidator,\n },\n\n /**\n * Visual marker style. Leave unset for automatic depth-aware markers.\n * @values disc, circle, square, decimal, lower-alpha, upper-alpha, lower-roman, upper-roman, none\n */\n marker: {\n type: String,\n default: undefined,\n validator: textListMarkerValidator,\n },\n\n /**\n * Marker foreground tone. Uses the same tone vocabulary as DtText.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n markerTone: {\n type: String,\n default: undefined,\n validator: textListMarkerToneValidator,\n },\n\n /**\n * Space between list items and before nested lists.\n * @values 0, 1, 25, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400\n */\n gap: {\n type: String,\n default: undefined,\n validator: textListGapValidator,\n },\n\n /**\n * Starting number for ordered lists.\n */\n start: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Reverse ordered list numbering.\n */\n reversed: {\n type: Boolean,\n default: false,\n },\n});\n\nconst listRef = ref(null);\n\nprovide(DT_TEXT_LIST_CONTEXT, {\n type: toRef(props, 'type'),\n});\n\nconst isOrdered = computed(() => props.type === 'ordered');\nconst listElement = computed(() => isOrdered.value ? 'ol' : 'ul');\n// Safari drops list semantics when list-style is none; restore them explicitly.\nconst role = computed(() => props.marker === 'none' ? 'list' : undefined);\nconst orderedStart = computed(() => isOrdered.value ? props.start : undefined);\nconst orderedReversed = computed(() => isOrdered.value && props.reversed ? true : undefined);\n\nconst textListClasses = computed(() => [\n 'd-text-list',\n props.gap ? `d-text-list--gap-${props.gap}` : null,\n {\n 'd-text-list--ordered': isOrdered.value,\n },\n props.marker ? `d-text-list--marker-${props.marker}` : null,\n props.markerTone ? `d-text-list--marker-tone-${props.markerTone}` : null,\n]);\n\n// eslint-disable-next-line no-console\nconst warn = message => console.warn(`[DtTextList] ${message}`);\n\nfunction validateOrderedOnlyProps () {\n if (isOrdered.value) return;\n\n if (props.start !== undefined) {\n warn('The start prop only applies when type=\"ordered\".');\n }\n\n if (props.reversed) {\n warn('The reversed prop only applies when type=\"ordered\".');\n }\n}\n\nfunction validateMarkerFamily () {\n if (!props.marker || props.marker === 'none') return;\n\n if (props.type === 'ordered' && DT_TEXT_LIST_UNORDERED_MARKERS.includes(props.marker)) {\n warn(`The marker=\"${props.marker}\" value is usually used with type=\"unordered\".`);\n }\n\n if (props.type === 'unordered' && DT_TEXT_LIST_ORDERED_MARKERS.includes(props.marker)) {\n warn(`The marker=\"${props.marker}\" value is usually used with type=\"ordered\".`);\n }\n}\n\nfunction validateChildren () {\n const rootElement = listRef.value?.$el ?? listRef.value;\n if (!rootElement) return;\n\n for (const child of rootElement.children) {\n if (child.tagName === 'LI') continue;\n\n warn('Use DtTextListItem or a native li as the direct child of DtTextList.');\n break;\n }\n}\n\nonMounted(() => {\n if (process.env.NODE_ENV !== 'production') {\n validateOrderedOnlyProps();\n validateMarkerFamily();\n validateChildren();\n }\n});\n</script>\n"],"mappings":"umBA0CA,IAAM,EAAQ,EA0DR,GAAA,EAAA,EAAA,KAAc,KAAK,EAEzB,EAAA,EAAA,SAAQ,EAAA,qBAAsB,CAC5B,MAAA,EAAA,EAAA,OAAY,EAAO,OAAO,CAC3B,CAAC,CAEF,IAAM,GAAA,EAAA,EAAA,cAA2B,EAAM,OAAS,UAAU,CACpD,GAAA,EAAA,EAAA,cAA6B,EAAU,MAAQ,KAAO,KAAK,CAE3D,GAAA,EAAA,EAAA,cAAsB,EAAM,SAAW,OAAS,OAAS,IAAA,GAAU,CACnE,GAAA,EAAA,EAAA,cAA8B,EAAU,MAAQ,EAAM,MAAQ,IAAA,GAAU,CACxE,GAAA,EAAA,EAAA,cAAiC,EAAU,OAAS,EAAM,SAAW,GAAO,IAAA,GAAU,CAEtF,GAAA,EAAA,EAAA,cAAiC,CACrC,cACA,EAAM,IAAM,oBAAoB,EAAM,MAAQ,KAC9C,CACE,uBAAwB,EAAU,MACnC,CACD,EAAM,OAAS,uBAAuB,EAAM,SAAW,KACvD,EAAM,WAAa,4BAA4B,EAAM,aAAe,KACrE,CAAC,CAGI,EAAO,GAAW,QAAQ,KAAK,gBAAgB,IAAU,CAE/D,SAAS,GAA4B,CAC/B,EAAU,QAEV,EAAM,QAAU,IAAA,IAClB,EAAK,mDAAmD,CAGtD,EAAM,UACR,EAAK,sDAAsD,EAI/D,SAAS,GAAwB,CAC3B,CAAC,EAAM,QAAU,EAAM,SAAW,SAElC,EAAM,OAAS,WAAa,EAAA,+BAA+B,SAAS,EAAM,OAAO,EACnF,EAAK,eAAe,EAAM,OAAO,gDAAgD,CAG/E,EAAM,OAAS,aAAe,EAAA,6BAA6B,SAAS,EAAM,OAAO,EACnF,EAAK,eAAe,EAAM,OAAO,8CAA8C,EAInF,SAAS,GAAoB,CAC3B,IAAM,EAAc,EAAQ,OAAO,KAAO,EAAQ,MAC7C,KAEL,KAAK,IAAM,KAAS,EAAY,SAC1B,KAAM,UAAY,KAEtB,GAAK,uEAAuE,CAC5E,eAIJ,EAAA,EAAA,eAAgB,CACd,QAAA,IAAA,WAA6B,eAC3B,GAA0B,CAC1B,GAAsB,CACtB,GAAkB,GAEpB,2EArKO,EAAA,MAAW,CAAA,SACZ,UAAJ,IAAI,EACJ,UAAQ,eACP,OAAA,EAAA,EAAA,gBAAO,EAAA,MAAe,CACtB,KAAM,EAAA,MACN,MAAO,EAAA,MACP,SAAU,EAAA,kCAGH,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"TextList-rS1MQdPB.cjs","names":[],"sources":["../components/TextList/TextList.vue","../components/TextList/TextList.vue"],"sourcesContent":["<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <component\n :is=\"listElement\"\n ref=\"listRef\"\n data-qa=\"dt-text-list\"\n :class=\"textListClasses\"\n :role=\"role\"\n :start=\"orderedStart\"\n :reversed=\"orderedReversed\"\n >\n <!-- @slot Text list items. Use DtTextListItem as the direct child. -->\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n onMounted,\n provide,\n ref,\n toRef,\n} from 'vue';\nimport {\n DT_TEXT_LIST_CONTEXT,\n DT_TEXT_LIST_DEFAULT_TYPE,\n DT_TEXT_LIST_ORDERED_MARKERS,\n DT_TEXT_LIST_UNORDERED_MARKERS,\n} from './TextListConstants';\nimport {\n textListGapValidator,\n textListMarkerToneValidator,\n textListMarkerValidator,\n textListTypeValidator,\n} from './Validators';\n\ndefineOptions({\n name: 'DtTextList',\n});\n\nconst props = defineProps({\n /**\n * Semantic list type. Sets the rendered element to `ul` or `ol`.\n * @values unordered, ordered\n */\n type: {\n type: String,\n default: DT_TEXT_LIST_DEFAULT_TYPE,\n validator: textListTypeValidator,\n },\n\n /**\n * Visual marker style. Leave unset for automatic depth-aware markers.\n * @values disc, circle, square, decimal, lower-alpha, upper-alpha, lower-roman, upper-roman, none\n */\n marker: {\n type: String,\n default: undefined,\n validator: textListMarkerValidator,\n },\n\n /**\n * Marker foreground tone. Uses the same tone vocabulary as DtText.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n markerTone: {\n type: String,\n default: undefined,\n validator: textListMarkerToneValidator,\n },\n\n /**\n * Space between list items and before nested lists.\n * @values 0, 1, 25, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400\n */\n gap: {\n type: String,\n default: undefined,\n validator: textListGapValidator,\n },\n\n /**\n * Starting number for ordered lists.\n */\n start: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Reverse ordered list numbering.\n */\n reversed: {\n type: Boolean,\n default: false,\n },\n});\n\nconst listRef = ref(null);\n\nprovide(DT_TEXT_LIST_CONTEXT, {\n type: toRef(props, 'type'),\n});\n\nconst isOrdered = computed(() => props.type === 'ordered');\nconst listElement = computed(() => isOrdered.value ? 'ol' : 'ul');\n// Safari drops list semantics when list-style is none; restore them explicitly.\nconst role = computed(() => props.marker === 'none' ? 'list' : undefined);\nconst orderedStart = computed(() => isOrdered.value ? props.start : undefined);\nconst orderedReversed = computed(() => isOrdered.value && props.reversed ? true : undefined);\n\nconst textListClasses = computed(() => [\n 'd-text-list',\n props.gap ? `d-text-list--gap-${props.gap}` : null,\n {\n 'd-text-list--ordered': isOrdered.value,\n },\n props.marker ? `d-text-list--marker-${props.marker}` : null,\n props.markerTone ? `d-text-list--marker-tone-${props.markerTone}` : null,\n]);\n\n// eslint-disable-next-line no-console\nconst warn = message => console.warn(`[DtTextList] ${message}`);\n\nfunction validateOrderedOnlyProps () {\n if (isOrdered.value) return;\n\n if (props.start !== undefined) {\n warn('The start prop only applies when type=\"ordered\".');\n }\n\n if (props.reversed) {\n warn('The reversed prop only applies when type=\"ordered\".');\n }\n}\n\nfunction validateMarkerFamily () {\n if (!props.marker || props.marker === 'none') return;\n\n if (props.type === 'ordered' && DT_TEXT_LIST_UNORDERED_MARKERS.includes(props.marker)) {\n warn(`The marker=\"${props.marker}\" value is usually used with type=\"unordered\".`);\n }\n\n if (props.type === 'unordered' && DT_TEXT_LIST_ORDERED_MARKERS.includes(props.marker)) {\n warn(`The marker=\"${props.marker}\" value is usually used with type=\"ordered\".`);\n }\n}\n\nfunction validateChildren () {\n const rootElement = listRef.value?.$el ?? listRef.value;\n if (!rootElement) return;\n\n for (const child of rootElement.children) {\n if (child.tagName === 'LI') continue;\n\n warn('Use DtTextListItem or a native li as the direct child of DtTextList.');\n break;\n }\n}\n\nonMounted(() => {\n if (process.env.NODE_ENV !== 'production') {\n validateOrderedOnlyProps();\n validateMarkerFamily();\n validateChildren();\n }\n});\n</script>\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <component\n :is=\"listElement\"\n ref=\"listRef\"\n data-qa=\"dt-text-list\"\n :class=\"textListClasses\"\n :role=\"role\"\n :start=\"orderedStart\"\n :reversed=\"orderedReversed\"\n >\n <!-- @slot Text list items. Use DtTextListItem as the direct child. -->\n <slot />\n </component>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n onMounted,\n provide,\n ref,\n toRef,\n} from 'vue';\nimport {\n DT_TEXT_LIST_CONTEXT,\n DT_TEXT_LIST_DEFAULT_TYPE,\n DT_TEXT_LIST_ORDERED_MARKERS,\n DT_TEXT_LIST_UNORDERED_MARKERS,\n} from './TextListConstants';\nimport {\n textListGapValidator,\n textListMarkerToneValidator,\n textListMarkerValidator,\n textListTypeValidator,\n} from './Validators';\n\ndefineOptions({\n name: 'DtTextList',\n});\n\nconst props = defineProps({\n /**\n * Semantic list type. Sets the rendered element to `ul` or `ol`.\n * @values unordered, ordered\n */\n type: {\n type: String,\n default: DT_TEXT_LIST_DEFAULT_TYPE,\n validator: textListTypeValidator,\n },\n\n /**\n * Visual marker style. Leave unset for automatic depth-aware markers.\n * @values disc, circle, square, decimal, lower-alpha, upper-alpha, lower-roman, upper-roman, none\n */\n marker: {\n type: String,\n default: undefined,\n validator: textListMarkerValidator,\n },\n\n /**\n * Marker foreground tone. Uses the same tone vocabulary as DtText.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n markerTone: {\n type: String,\n default: undefined,\n validator: textListMarkerToneValidator,\n },\n\n /**\n * Space between list items and before nested lists.\n * @values 0, 1, 25, 50, 75, 100, 125, 150, 175, 200, 250, 300, 350, 400\n */\n gap: {\n type: String,\n default: undefined,\n validator: textListGapValidator,\n },\n\n /**\n * Starting number for ordered lists.\n */\n start: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Reverse ordered list numbering.\n */\n reversed: {\n type: Boolean,\n default: false,\n },\n});\n\nconst listRef = ref(null);\n\nprovide(DT_TEXT_LIST_CONTEXT, {\n type: toRef(props, 'type'),\n});\n\nconst isOrdered = computed(() => props.type === 'ordered');\nconst listElement = computed(() => isOrdered.value ? 'ol' : 'ul');\n// Safari drops list semantics when list-style is none; restore them explicitly.\nconst role = computed(() => props.marker === 'none' ? 'list' : undefined);\nconst orderedStart = computed(() => isOrdered.value ? props.start : undefined);\nconst orderedReversed = computed(() => isOrdered.value && props.reversed ? true : undefined);\n\nconst textListClasses = computed(() => [\n 'd-text-list',\n props.gap ? `d-text-list--gap-${props.gap}` : null,\n {\n 'd-text-list--ordered': isOrdered.value,\n },\n props.marker ? `d-text-list--marker-${props.marker}` : null,\n props.markerTone ? `d-text-list--marker-tone-${props.markerTone}` : null,\n]);\n\n// eslint-disable-next-line no-console\nconst warn = message => console.warn(`[DtTextList] ${message}`);\n\nfunction validateOrderedOnlyProps () {\n if (isOrdered.value) return;\n\n if (props.start !== undefined) {\n warn('The start prop only applies when type=\"ordered\".');\n }\n\n if (props.reversed) {\n warn('The reversed prop only applies when type=\"ordered\".');\n }\n}\n\nfunction validateMarkerFamily () {\n if (!props.marker || props.marker === 'none') return;\n\n if (props.type === 'ordered' && DT_TEXT_LIST_UNORDERED_MARKERS.includes(props.marker)) {\n warn(`The marker=\"${props.marker}\" value is usually used with type=\"unordered\".`);\n }\n\n if (props.type === 'unordered' && DT_TEXT_LIST_ORDERED_MARKERS.includes(props.marker)) {\n warn(`The marker=\"${props.marker}\" value is usually used with type=\"ordered\".`);\n }\n}\n\nfunction validateChildren () {\n const rootElement = listRef.value?.$el ?? listRef.value;\n if (!rootElement) return;\n\n for (const child of rootElement.children) {\n if (child.tagName === 'LI') continue;\n\n warn('Use DtTextListItem or a native li as the direct child of DtTextList.');\n break;\n }\n}\n\nonMounted(() => {\n if (process.env.NODE_ENV !== 'production') {\n validateOrderedOnlyProps();\n validateMarkerFamily();\n validateChildren();\n }\n});\n</script>\n"],"mappings":"umBA0CA,IAAM,EAAQ,EA0DR,GAAA,EAAA,EAAA,KAAc,KAAK,EAEzB,EAAA,EAAA,SAAQ,EAAA,qBAAsB,CAC5B,MAAA,EAAA,EAAA,OAAY,EAAO,OAAO,CAC3B,CAAC,CAEF,IAAM,GAAA,EAAA,EAAA,cAA2B,EAAM,OAAS,UAAU,CACpD,GAAA,EAAA,EAAA,cAA6B,EAAU,MAAQ,KAAO,KAAK,CAE3D,GAAA,EAAA,EAAA,cAAsB,EAAM,SAAW,OAAS,OAAS,IAAA,GAAU,CACnE,GAAA,EAAA,EAAA,cAA8B,EAAU,MAAQ,EAAM,MAAQ,IAAA,GAAU,CACxE,GAAA,EAAA,EAAA,cAAiC,EAAU,OAAS,EAAM,SAAW,GAAO,IAAA,GAAU,CAEtF,GAAA,EAAA,EAAA,cAAiC,CACrC,cACA,EAAM,IAAM,oBAAoB,EAAM,MAAQ,KAC9C,CACE,uBAAwB,EAAU,MACnC,CACD,EAAM,OAAS,uBAAuB,EAAM,SAAW,KACvD,EAAM,WAAa,4BAA4B,EAAM,aAAe,KACrE,CAAC,CAGI,EAAO,GAAW,QAAQ,KAAK,gBAAgB,IAAU,CAE/D,SAAS,GAA4B,CAC/B,EAAU,QAEV,EAAM,QAAU,IAAA,IAClB,EAAK,mDAAmD,CAGtD,EAAM,UACR,EAAK,sDAAsD,EAI/D,SAAS,GAAwB,CAC3B,CAAC,EAAM,QAAU,EAAM,SAAW,SAElC,EAAM,OAAS,WAAa,EAAA,+BAA+B,SAAS,EAAM,OAAO,EACnF,EAAK,eAAe,EAAM,OAAO,gDAAgD,CAG/E,EAAM,OAAS,aAAe,EAAA,6BAA6B,SAAS,EAAM,OAAO,EACnF,EAAK,eAAe,EAAM,OAAO,8CAA8C,EAInF,SAAS,GAAoB,CAC3B,IAAM,EAAc,EAAQ,OAAO,KAAO,EAAQ,MAC7C,KAEL,KAAK,IAAM,KAAS,EAAY,SAC1B,KAAM,UAAY,KAEtB,GAAK,uEAAuE,CAC5E,eAIJ,EAAA,EAAA,eAAgB,CACd,QAAA,IAAA,WAA6B,eAC3B,GAA0B,CAC1B,GAAsB,CACtB,GAAkB,GAEpB,2EArKO,EAAA,MAAW,CAAA,SACZ,UAAJ,IAAI,EACJ,UAAQ,eACP,OAAA,EAAA,EAAA,gBAAO,EAAA,MAAe,CACtB,KAAM,EAAA,MACN,MAAO,EAAA,MACP,SAAU,EAAA,kCAGH,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,UAAA,CAAA,CAAA"}
@@ -1,2 +1,2 @@
1
1
  require(`./chunk-Bmb41Sf3.cjs`);const e=require(`./common/utils/index.cjs`),t=require(`./lib/text-list/text-list-constants.cjs`),n=require(`./lib/text-list/validators.cjs`);let r=require(`vue`);var i=[`value`],a=(0,r.defineComponent)({name:`DtTextListItem`,__name:`TextListItem`,props:{value:{type:Number,default:void 0},markerTone:{type:String,default:void 0,validator:n.textListMarkerToneValidator},markerClass:{type:[String,Array,Object],default:``},contentClass:{type:[String,Array,Object],default:``}},setup(n){let a=n,o=(0,r.useSlots)(),s=(0,r.inject)(t.DT_TEXT_LIST_CONTEXT,null),c=(0,r.computed)(()=>s?(0,r.unref)(s.type):void 0),l=(0,r.computed)(()=>e.hasSlotContent(o.marker)),u=(0,r.computed)(()=>c.value===`ordered`?a.value:void 0),d=(0,r.computed)(()=>[`d-text-list__item`,{"d-text-list__item--custom-marker":l.value},a.markerTone?`d-text-list__item--marker-tone-${a.markerTone}`:null]),f=e=>console.warn(`[DtTextListItem] ${e}`);return(0,r.onMounted)(()=>{process.env.NODE_ENV!==`production`&&(s||f(`DtTextListItem must be used inside DtTextList.`),a.value!==void 0&&c.value!==`ordered`&&f(`The value prop only applies inside a DtTextList with type="ordered".`))}),(e,t)=>((0,r.openBlock)(),(0,r.createElementBlock)(`li`,{"data-qa":`dt-text-list-item`,class:(0,r.normalizeClass)(d.value),value:u.value},[l.value?((0,r.openBlock)(),(0,r.createElementBlock)(`span`,{key:0,"data-qa":`dt-text-list-item-marker`,class:(0,r.normalizeClass)([`d-text-list__item-marker`,n.markerClass]),"aria-hidden":`true`},[(0,r.renderSlot)(e.$slots,`marker`)],2)):(0,r.createCommentVNode)(``,!0),(0,r.createElementVNode)(`div`,{"data-qa":`dt-text-list-item-content`,class:(0,r.normalizeClass)([`d-text-list__item-content`,n.contentClass])},[(0,r.renderSlot)(e.$slots,`default`)],2)],10,i))}});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
2
- //# sourceMappingURL=TextListItem-DIlrCkaM.cjs.map
2
+ //# sourceMappingURL=TextListItem-CF6DzdvT.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextListItem-DIlrCkaM.cjs","names":[],"sources":["../components/TextList/TextListItem.vue","../components/TextList/TextListItem.vue"],"sourcesContent":["<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <li\n data-qa=\"dt-text-list-item\"\n :class=\"textListItemClasses\"\n :value=\"orderedValue\"\n >\n <span\n v-if=\"hasCustomMarker\"\n data-qa=\"dt-text-list-item-marker\"\n class=\"d-text-list__item-marker\"\n :class=\"markerClass\"\n aria-hidden=\"true\"\n >\n <!-- @slot Custom marker content. Decorative by default. -->\n <slot name=\"marker\" />\n </span>\n <div\n data-qa=\"dt-text-list-item-content\"\n :class=\"['d-text-list__item-content', contentClass]\"\n >\n <!-- @slot Text list item content. -->\n <slot />\n </div>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n inject,\n onMounted,\n unref,\n useSlots,\n} from 'vue';\nimport { hasSlotContent } from '@/common/utils';\nimport { DT_TEXT_LIST_CONTEXT } from './TextListConstants';\nimport { textListMarkerToneValidator } from './Validators';\n\ndefineOptions({\n name: 'DtTextListItem',\n});\n\nconst props = defineProps({\n /**\n * Native `li` value for ordered lists.\n */\n value: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Marker foreground tone for this item. Overrides the parent DtTextList markerTone.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n markerTone: {\n type: String,\n default: undefined,\n validator: textListMarkerToneValidator,\n },\n\n /**\n * Additional class name for the marker wrapper.\n */\n markerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n});\n\nconst slots = useSlots();\nconst parentContext = inject(DT_TEXT_LIST_CONTEXT, null);\nconst parentType = computed(() => parentContext ? unref(parentContext.type) : undefined);\nconst hasCustomMarker = computed(() => hasSlotContent(slots.marker));\nconst orderedValue = computed(() => parentType.value === 'ordered' ? props.value : undefined);\nconst textListItemClasses = computed(() => [\n 'd-text-list__item',\n { 'd-text-list__item--custom-marker': hasCustomMarker.value },\n props.markerTone ? `d-text-list__item--marker-tone-${props.markerTone}` : null,\n]);\n\n// eslint-disable-next-line no-console\nconst warn = message => console.warn(`[DtTextListItem] ${message}`);\n\nonMounted(() => {\n if (process.env.NODE_ENV !== 'production') {\n if (!parentContext) {\n warn('DtTextListItem must be used inside DtTextList.');\n }\n\n if (props.value !== undefined && parentType.value !== 'ordered') {\n warn('The value prop only applies inside a DtTextList with type=\"ordered\".');\n }\n }\n});\n</script>\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <li\n data-qa=\"dt-text-list-item\"\n :class=\"textListItemClasses\"\n :value=\"orderedValue\"\n >\n <span\n v-if=\"hasCustomMarker\"\n data-qa=\"dt-text-list-item-marker\"\n class=\"d-text-list__item-marker\"\n :class=\"markerClass\"\n aria-hidden=\"true\"\n >\n <!-- @slot Custom marker content. Decorative by default. -->\n <slot name=\"marker\" />\n </span>\n <div\n data-qa=\"dt-text-list-item-content\"\n :class=\"['d-text-list__item-content', contentClass]\"\n >\n <!-- @slot Text list item content. -->\n <slot />\n </div>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n inject,\n onMounted,\n unref,\n useSlots,\n} from 'vue';\nimport { hasSlotContent } from '@/common/utils';\nimport { DT_TEXT_LIST_CONTEXT } from './TextListConstants';\nimport { textListMarkerToneValidator } from './Validators';\n\ndefineOptions({\n name: 'DtTextListItem',\n});\n\nconst props = defineProps({\n /**\n * Native `li` value for ordered lists.\n */\n value: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Marker foreground tone for this item. Overrides the parent DtTextList markerTone.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n markerTone: {\n type: String,\n default: undefined,\n validator: textListMarkerToneValidator,\n },\n\n /**\n * Additional class name for the marker wrapper.\n */\n markerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n});\n\nconst slots = useSlots();\nconst parentContext = inject(DT_TEXT_LIST_CONTEXT, null);\nconst parentType = computed(() => parentContext ? unref(parentContext.type) : undefined);\nconst hasCustomMarker = computed(() => hasSlotContent(slots.marker));\nconst orderedValue = computed(() => parentType.value === 'ordered' ? props.value : undefined);\nconst textListItemClasses = computed(() => [\n 'd-text-list__item',\n { 'd-text-list__item--custom-marker': hasCustomMarker.value },\n props.markerTone ? `d-text-list__item--marker-tone-${props.markerTone}` : null,\n]);\n\n// eslint-disable-next-line no-console\nconst warn = message => console.warn(`[DtTextListItem] ${message}`);\n\nonMounted(() => {\n if (process.env.NODE_ENV !== 'production') {\n if (!parentContext) {\n warn('DtTextListItem must be used inside DtTextList.');\n }\n\n if (props.value !== undefined && parentType.value !== 'ordered') {\n warn('The value prop only applies inside a DtTextList with type=\"ordered\".');\n }\n }\n});\n</script>\n"],"mappings":"ogBA4CA,IAAM,EAAQ,EAoCR,GAAA,EAAA,EAAA,WAAkB,CAClB,GAAA,EAAA,EAAA,QAAuB,EAAA,qBAAsB,KAAK,CAClD,GAAA,EAAA,EAAA,cAA4B,GAAA,EAAA,EAAA,OAAsB,EAAc,KAAK,CAAG,IAAA,GAAU,CAClF,GAAA,EAAA,EAAA,cAAiC,EAAA,eAAe,EAAM,OAAO,CAAC,CAC9D,GAAA,EAAA,EAAA,cAA8B,EAAW,QAAU,UAAY,EAAM,MAAQ,IAAA,GAAU,CACvF,GAAA,EAAA,EAAA,cAAqC,CACzC,oBACA,CAAE,mCAAoC,EAAgB,MAAO,CAC7D,EAAM,WAAa,kCAAkC,EAAM,aAAe,KAC3E,CAAC,CAGI,EAAO,GAAW,QAAQ,KAAK,oBAAoB,IAAU,QAEnE,EAAA,EAAA,eAAgB,CACd,QAAA,IAAA,WAA6B,eACtB,GACH,EAAK,iDAAiD,CAGpD,EAAM,QAAU,IAAA,IAAa,EAAW,QAAU,WACpD,EAAK,uEAAuE,GAGhF,oDAhFK,KAAA,CArBH,UAAQ,oBACP,OAAA,EAAA,EAAA,gBAAO,EAAA,MAAmB,CAC1B,MAAO,EAAA,QAGA,EAAA,QAAA,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,oBAQD,OAAA,OAPL,UAAQ,2BACR,OAAA,EAAA,EAAA,gBAAK,CAAC,2BACE,EAAA,YAAW,CAAA,CACnB,cAAY,0BAGU,EAAA,OAAA,SAAA,CAAA,CAAA,EAAA,GAAA,EAAA,EAAA,oBAAA,GAAA,GAAA,EAAA,EAAA,EAAA,oBAQlB,MAAA,CALJ,UAAQ,4BACP,OAAA,EAAA,EAAA,gBAAK,CAAA,4BAAgC,EAAA,aAAY,CAAA,oBAG1C,EAAA,OAAA,UAAA,CAAA,CAAA,EAAA,CAAA,CAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"TextListItem-CF6DzdvT.cjs","names":[],"sources":["../components/TextList/TextListItem.vue","../components/TextList/TextListItem.vue"],"sourcesContent":["<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <li\n data-qa=\"dt-text-list-item\"\n :class=\"textListItemClasses\"\n :value=\"orderedValue\"\n >\n <span\n v-if=\"hasCustomMarker\"\n data-qa=\"dt-text-list-item-marker\"\n class=\"d-text-list__item-marker\"\n :class=\"markerClass\"\n aria-hidden=\"true\"\n >\n <!-- @slot Custom marker content. Decorative by default. -->\n <slot name=\"marker\" />\n </span>\n <div\n data-qa=\"dt-text-list-item-content\"\n :class=\"['d-text-list__item-content', contentClass]\"\n >\n <!-- @slot Text list item content. -->\n <slot />\n </div>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n inject,\n onMounted,\n unref,\n useSlots,\n} from 'vue';\nimport { hasSlotContent } from '@/common/utils';\nimport { DT_TEXT_LIST_CONTEXT } from './TextListConstants';\nimport { textListMarkerToneValidator } from './Validators';\n\ndefineOptions({\n name: 'DtTextListItem',\n});\n\nconst props = defineProps({\n /**\n * Native `li` value for ordered lists.\n */\n value: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Marker foreground tone for this item. Overrides the parent DtTextList markerTone.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n markerTone: {\n type: String,\n default: undefined,\n validator: textListMarkerToneValidator,\n },\n\n /**\n * Additional class name for the marker wrapper.\n */\n markerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n});\n\nconst slots = useSlots();\nconst parentContext = inject(DT_TEXT_LIST_CONTEXT, null);\nconst parentType = computed(() => parentContext ? unref(parentContext.type) : undefined);\nconst hasCustomMarker = computed(() => hasSlotContent(slots.marker));\nconst orderedValue = computed(() => parentType.value === 'ordered' ? props.value : undefined);\nconst textListItemClasses = computed(() => [\n 'd-text-list__item',\n { 'd-text-list__item--custom-marker': hasCustomMarker.value },\n props.markerTone ? `d-text-list__item--marker-tone-${props.markerTone}` : null,\n]);\n\n// eslint-disable-next-line no-console\nconst warn = message => console.warn(`[DtTextListItem] ${message}`);\n\nonMounted(() => {\n if (process.env.NODE_ENV !== 'production') {\n if (!parentContext) {\n warn('DtTextListItem must be used inside DtTextList.');\n }\n\n if (props.value !== undefined && parentType.value !== 'ordered') {\n warn('The value prop only applies inside a DtTextList with type=\"ordered\".');\n }\n }\n});\n</script>\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <li\n data-qa=\"dt-text-list-item\"\n :class=\"textListItemClasses\"\n :value=\"orderedValue\"\n >\n <span\n v-if=\"hasCustomMarker\"\n data-qa=\"dt-text-list-item-marker\"\n class=\"d-text-list__item-marker\"\n :class=\"markerClass\"\n aria-hidden=\"true\"\n >\n <!-- @slot Custom marker content. Decorative by default. -->\n <slot name=\"marker\" />\n </span>\n <div\n data-qa=\"dt-text-list-item-content\"\n :class=\"['d-text-list__item-content', contentClass]\"\n >\n <!-- @slot Text list item content. -->\n <slot />\n </div>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n inject,\n onMounted,\n unref,\n useSlots,\n} from 'vue';\nimport { hasSlotContent } from '@/common/utils';\nimport { DT_TEXT_LIST_CONTEXT } from './TextListConstants';\nimport { textListMarkerToneValidator } from './Validators';\n\ndefineOptions({\n name: 'DtTextListItem',\n});\n\nconst props = defineProps({\n /**\n * Native `li` value for ordered lists.\n */\n value: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Marker foreground tone for this item. Overrides the parent DtTextList markerTone.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n markerTone: {\n type: String,\n default: undefined,\n validator: textListMarkerToneValidator,\n },\n\n /**\n * Additional class name for the marker wrapper.\n */\n markerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n});\n\nconst slots = useSlots();\nconst parentContext = inject(DT_TEXT_LIST_CONTEXT, null);\nconst parentType = computed(() => parentContext ? unref(parentContext.type) : undefined);\nconst hasCustomMarker = computed(() => hasSlotContent(slots.marker));\nconst orderedValue = computed(() => parentType.value === 'ordered' ? props.value : undefined);\nconst textListItemClasses = computed(() => [\n 'd-text-list__item',\n { 'd-text-list__item--custom-marker': hasCustomMarker.value },\n props.markerTone ? `d-text-list__item--marker-tone-${props.markerTone}` : null,\n]);\n\n// eslint-disable-next-line no-console\nconst warn = message => console.warn(`[DtTextListItem] ${message}`);\n\nonMounted(() => {\n if (process.env.NODE_ENV !== 'production') {\n if (!parentContext) {\n warn('DtTextListItem must be used inside DtTextList.');\n }\n\n if (props.value !== undefined && parentType.value !== 'ordered') {\n warn('The value prop only applies inside a DtTextList with type=\"ordered\".');\n }\n }\n});\n</script>\n"],"mappings":"ogBA4CA,IAAM,EAAQ,EAoCR,GAAA,EAAA,EAAA,WAAkB,CAClB,GAAA,EAAA,EAAA,QAAuB,EAAA,qBAAsB,KAAK,CAClD,GAAA,EAAA,EAAA,cAA4B,GAAA,EAAA,EAAA,OAAsB,EAAc,KAAK,CAAG,IAAA,GAAU,CAClF,GAAA,EAAA,EAAA,cAAiC,EAAA,eAAe,EAAM,OAAO,CAAC,CAC9D,GAAA,EAAA,EAAA,cAA8B,EAAW,QAAU,UAAY,EAAM,MAAQ,IAAA,GAAU,CACvF,GAAA,EAAA,EAAA,cAAqC,CACzC,oBACA,CAAE,mCAAoC,EAAgB,MAAO,CAC7D,EAAM,WAAa,kCAAkC,EAAM,aAAe,KAC3E,CAAC,CAGI,EAAO,GAAW,QAAQ,KAAK,oBAAoB,IAAU,QAEnE,EAAA,EAAA,eAAgB,CACd,QAAA,IAAA,WAA6B,eACtB,GACH,EAAK,iDAAiD,CAGpD,EAAM,QAAU,IAAA,IAAa,EAAW,QAAU,WACpD,EAAK,uEAAuE,GAGhF,oDAhFK,KAAA,CArBH,UAAQ,oBACP,OAAA,EAAA,EAAA,gBAAO,EAAA,MAAmB,CAC1B,MAAO,EAAA,QAGA,EAAA,QAAA,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,oBAQD,OAAA,OAPL,UAAQ,2BACR,OAAA,EAAA,EAAA,gBAAK,CAAC,2BACE,EAAA,YAAW,CAAA,CACnB,cAAY,0BAGU,EAAA,OAAA,SAAA,CAAA,CAAA,EAAA,GAAA,EAAA,EAAA,oBAAA,GAAA,GAAA,EAAA,EAAA,EAAA,oBAQlB,MAAA,CALJ,UAAQ,4BACP,OAAA,EAAA,EAAA,gBAAK,CAAA,4BAAgC,EAAA,aAAY,CAAA,oBAG1C,EAAA,OAAA,UAAA,CAAA,CAAA,EAAA,CAAA,CAAA,GAAA,EAAA"}
@@ -59,4 +59,4 @@ var h = ["value"], g = /* @__PURE__ */ s({
59
59
  //#endregion
60
60
  export { g as t };
61
61
 
62
- //# sourceMappingURL=TextListItem-ImUi_FWh.js.map
62
+ //# sourceMappingURL=TextListItem-PHgDIWV1.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextListItem-ImUi_FWh.js","names":[],"sources":["../components/TextList/TextListItem.vue","../components/TextList/TextListItem.vue"],"sourcesContent":["<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <li\n data-qa=\"dt-text-list-item\"\n :class=\"textListItemClasses\"\n :value=\"orderedValue\"\n >\n <span\n v-if=\"hasCustomMarker\"\n data-qa=\"dt-text-list-item-marker\"\n class=\"d-text-list__item-marker\"\n :class=\"markerClass\"\n aria-hidden=\"true\"\n >\n <!-- @slot Custom marker content. Decorative by default. -->\n <slot name=\"marker\" />\n </span>\n <div\n data-qa=\"dt-text-list-item-content\"\n :class=\"['d-text-list__item-content', contentClass]\"\n >\n <!-- @slot Text list item content. -->\n <slot />\n </div>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n inject,\n onMounted,\n unref,\n useSlots,\n} from 'vue';\nimport { hasSlotContent } from '@/common/utils';\nimport { DT_TEXT_LIST_CONTEXT } from './TextListConstants';\nimport { textListMarkerToneValidator } from './Validators';\n\ndefineOptions({\n name: 'DtTextListItem',\n});\n\nconst props = defineProps({\n /**\n * Native `li` value for ordered lists.\n */\n value: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Marker foreground tone for this item. Overrides the parent DtTextList markerTone.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n markerTone: {\n type: String,\n default: undefined,\n validator: textListMarkerToneValidator,\n },\n\n /**\n * Additional class name for the marker wrapper.\n */\n markerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n});\n\nconst slots = useSlots();\nconst parentContext = inject(DT_TEXT_LIST_CONTEXT, null);\nconst parentType = computed(() => parentContext ? unref(parentContext.type) : undefined);\nconst hasCustomMarker = computed(() => hasSlotContent(slots.marker));\nconst orderedValue = computed(() => parentType.value === 'ordered' ? props.value : undefined);\nconst textListItemClasses = computed(() => [\n 'd-text-list__item',\n { 'd-text-list__item--custom-marker': hasCustomMarker.value },\n props.markerTone ? `d-text-list__item--marker-tone-${props.markerTone}` : null,\n]);\n\n// eslint-disable-next-line no-console\nconst warn = message => console.warn(`[DtTextListItem] ${message}`);\n\nonMounted(() => {\n if (process.env.NODE_ENV !== 'production') {\n if (!parentContext) {\n warn('DtTextListItem must be used inside DtTextList.');\n }\n\n if (props.value !== undefined && parentType.value !== 'ordered') {\n warn('The value prop only applies inside a DtTextList with type=\"ordered\".');\n }\n }\n});\n</script>\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <li\n data-qa=\"dt-text-list-item\"\n :class=\"textListItemClasses\"\n :value=\"orderedValue\"\n >\n <span\n v-if=\"hasCustomMarker\"\n data-qa=\"dt-text-list-item-marker\"\n class=\"d-text-list__item-marker\"\n :class=\"markerClass\"\n aria-hidden=\"true\"\n >\n <!-- @slot Custom marker content. Decorative by default. -->\n <slot name=\"marker\" />\n </span>\n <div\n data-qa=\"dt-text-list-item-content\"\n :class=\"['d-text-list__item-content', contentClass]\"\n >\n <!-- @slot Text list item content. -->\n <slot />\n </div>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n inject,\n onMounted,\n unref,\n useSlots,\n} from 'vue';\nimport { hasSlotContent } from '@/common/utils';\nimport { DT_TEXT_LIST_CONTEXT } from './TextListConstants';\nimport { textListMarkerToneValidator } from './Validators';\n\ndefineOptions({\n name: 'DtTextListItem',\n});\n\nconst props = defineProps({\n /**\n * Native `li` value for ordered lists.\n */\n value: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Marker foreground tone for this item. Overrides the parent DtTextList markerTone.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n markerTone: {\n type: String,\n default: undefined,\n validator: textListMarkerToneValidator,\n },\n\n /**\n * Additional class name for the marker wrapper.\n */\n markerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n});\n\nconst slots = useSlots();\nconst parentContext = inject(DT_TEXT_LIST_CONTEXT, null);\nconst parentType = computed(() => parentContext ? unref(parentContext.type) : undefined);\nconst hasCustomMarker = computed(() => hasSlotContent(slots.marker));\nconst orderedValue = computed(() => parentType.value === 'ordered' ? props.value : undefined);\nconst textListItemClasses = computed(() => [\n 'd-text-list__item',\n { 'd-text-list__item--custom-marker': hasCustomMarker.value },\n props.markerTone ? `d-text-list__item--marker-tone-${props.markerTone}` : null,\n]);\n\n// eslint-disable-next-line no-console\nconst warn = message => console.warn(`[DtTextListItem] ${message}`);\n\nonMounted(() => {\n if (process.env.NODE_ENV !== 'production') {\n if (!parentContext) {\n warn('DtTextListItem must be used inside DtTextList.');\n }\n\n if (props.value !== undefined && parentType.value !== 'ordered') {\n warn('The value prop only applies inside a DtTextList with type=\"ordered\".');\n }\n }\n});\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4CA,IAAM,IAAQ,GAoCR,IAAQ,GAAU,EAClB,IAAgB,EAAO,GAAsB,KAAK,EAClD,IAAa,QAAe,IAAgB,EAAM,EAAc,KAAK,GAAG,KAAA,EAAU,EAClF,IAAkB,QAAe,EAAe,EAAM,OAAO,CAAC,EAC9D,IAAe,QAAe,EAAW,UAAU,YAAY,EAAM,QAAQ,KAAA,EAAU,EACvF,IAAsB,QAAe;GACzC;GACA,EAAE,oCAAoC,EAAgB,OAAO;GAC7D,EAAM,aAAa,kCAAkC,EAAM,eAAe;GAC3E,CAAC,EAGI,KAAO,MAAW,QAAQ,KAAK,oBAAoB,IAAU;SAEnE,QAAgB;AACd,GAAA,QAAA,IAAA,aAA6B,iBACtB,KACH,EAAK,iDAAiD,EAGpD,EAAM,UAAU,KAAA,KAAa,EAAW,UAAU,aACpD,EAAK,yEAAuE;IAGhF,kBAtGA,EAsBK,MAAA;GArBH,WAAQ;GACP,OAAK,EAAE,EAAA,MAAmB;GAC1B,OAAO,EAAA;MAGA,EAAA,SAAA,GAAA,EADR,EASO,QAAA;;GAPL,WAAQ;GACR,OAAK,EAAA,CAAC,4BACE,EAAA,YAAW,CAAA;GACnB,eAAY;MAGZ,EAAsB,EAAA,QAAA,SAAA,CAAA,EAAA,EAAA,IAAA,EAAA,IAAA,GAAA,EAExB,EAMM,OAAA;GALJ,WAAQ;GACP,OAAK,EAAA,CAAA,6BAAgC,EAAA,aAAY,CAAA;MAGlD,EAAQ,EAAA,QAAA,UAAA,CAAA,EAAA,EAAA,CAAA,EAAA,IAAA,EAAA"}
1
+ {"version":3,"file":"TextListItem-PHgDIWV1.js","names":[],"sources":["../components/TextList/TextListItem.vue","../components/TextList/TextListItem.vue"],"sourcesContent":["<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <li\n data-qa=\"dt-text-list-item\"\n :class=\"textListItemClasses\"\n :value=\"orderedValue\"\n >\n <span\n v-if=\"hasCustomMarker\"\n data-qa=\"dt-text-list-item-marker\"\n class=\"d-text-list__item-marker\"\n :class=\"markerClass\"\n aria-hidden=\"true\"\n >\n <!-- @slot Custom marker content. Decorative by default. -->\n <slot name=\"marker\" />\n </span>\n <div\n data-qa=\"dt-text-list-item-content\"\n :class=\"['d-text-list__item-content', contentClass]\"\n >\n <!-- @slot Text list item content. -->\n <slot />\n </div>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n inject,\n onMounted,\n unref,\n useSlots,\n} from 'vue';\nimport { hasSlotContent } from '@/common/utils';\nimport { DT_TEXT_LIST_CONTEXT } from './TextListConstants';\nimport { textListMarkerToneValidator } from './Validators';\n\ndefineOptions({\n name: 'DtTextListItem',\n});\n\nconst props = defineProps({\n /**\n * Native `li` value for ordered lists.\n */\n value: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Marker foreground tone for this item. Overrides the parent DtTextList markerTone.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n markerTone: {\n type: String,\n default: undefined,\n validator: textListMarkerToneValidator,\n },\n\n /**\n * Additional class name for the marker wrapper.\n */\n markerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n});\n\nconst slots = useSlots();\nconst parentContext = inject(DT_TEXT_LIST_CONTEXT, null);\nconst parentType = computed(() => parentContext ? unref(parentContext.type) : undefined);\nconst hasCustomMarker = computed(() => hasSlotContent(slots.marker));\nconst orderedValue = computed(() => parentType.value === 'ordered' ? props.value : undefined);\nconst textListItemClasses = computed(() => [\n 'd-text-list__item',\n { 'd-text-list__item--custom-marker': hasCustomMarker.value },\n props.markerTone ? `d-text-list__item--marker-tone-${props.markerTone}` : null,\n]);\n\n// eslint-disable-next-line no-console\nconst warn = message => console.warn(`[DtTextListItem] ${message}`);\n\nonMounted(() => {\n if (process.env.NODE_ENV !== 'production') {\n if (!parentContext) {\n warn('DtTextListItem must be used inside DtTextList.');\n }\n\n if (props.value !== undefined && parentType.value !== 'ordered') {\n warn('The value prop only applies inside a DtTextList with type=\"ordered\".');\n }\n }\n});\n</script>\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <li\n data-qa=\"dt-text-list-item\"\n :class=\"textListItemClasses\"\n :value=\"orderedValue\"\n >\n <span\n v-if=\"hasCustomMarker\"\n data-qa=\"dt-text-list-item-marker\"\n class=\"d-text-list__item-marker\"\n :class=\"markerClass\"\n aria-hidden=\"true\"\n >\n <!-- @slot Custom marker content. Decorative by default. -->\n <slot name=\"marker\" />\n </span>\n <div\n data-qa=\"dt-text-list-item-content\"\n :class=\"['d-text-list__item-content', contentClass]\"\n >\n <!-- @slot Text list item content. -->\n <slot />\n </div>\n </li>\n</template>\n\n<script setup lang=\"ts\">\n// @ts-nocheck\nimport {\n computed,\n inject,\n onMounted,\n unref,\n useSlots,\n} from 'vue';\nimport { hasSlotContent } from '@/common/utils';\nimport { DT_TEXT_LIST_CONTEXT } from './TextListConstants';\nimport { textListMarkerToneValidator } from './Validators';\n\ndefineOptions({\n name: 'DtTextListItem',\n});\n\nconst props = defineProps({\n /**\n * Native `li` value for ordered lists.\n */\n value: {\n type: Number,\n default: undefined,\n },\n\n /**\n * Marker foreground tone for this item. Overrides the parent DtTextList markerTone.\n * @values primary, secondary, tertiary, muted, disabled, placeholder, critical, critical-strong, positive, positive-strong, warning, info, info-strong, neutral-black, neutral-white\n */\n markerTone: {\n type: String,\n default: undefined,\n validator: textListMarkerToneValidator,\n },\n\n /**\n * Additional class name for the marker wrapper.\n */\n markerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n});\n\nconst slots = useSlots();\nconst parentContext = inject(DT_TEXT_LIST_CONTEXT, null);\nconst parentType = computed(() => parentContext ? unref(parentContext.type) : undefined);\nconst hasCustomMarker = computed(() => hasSlotContent(slots.marker));\nconst orderedValue = computed(() => parentType.value === 'ordered' ? props.value : undefined);\nconst textListItemClasses = computed(() => [\n 'd-text-list__item',\n { 'd-text-list__item--custom-marker': hasCustomMarker.value },\n props.markerTone ? `d-text-list__item--marker-tone-${props.markerTone}` : null,\n]);\n\n// eslint-disable-next-line no-console\nconst warn = message => console.warn(`[DtTextListItem] ${message}`);\n\nonMounted(() => {\n if (process.env.NODE_ENV !== 'production') {\n if (!parentContext) {\n warn('DtTextListItem must be used inside DtTextList.');\n }\n\n if (props.value !== undefined && parentType.value !== 'ordered') {\n warn('The value prop only applies inside a DtTextList with type=\"ordered\".');\n }\n }\n});\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4CA,IAAM,IAAQ,GAoCR,IAAQ,GAAU,EAClB,IAAgB,EAAO,GAAsB,KAAK,EAClD,IAAa,QAAe,IAAgB,EAAM,EAAc,KAAK,GAAG,KAAA,EAAU,EAClF,IAAkB,QAAe,EAAe,EAAM,OAAO,CAAC,EAC9D,IAAe,QAAe,EAAW,UAAU,YAAY,EAAM,QAAQ,KAAA,EAAU,EACvF,IAAsB,QAAe;GACzC;GACA,EAAE,oCAAoC,EAAgB,OAAO;GAC7D,EAAM,aAAa,kCAAkC,EAAM,eAAe;GAC3E,CAAC,EAGI,KAAO,MAAW,QAAQ,KAAK,oBAAoB,IAAU;SAEnE,QAAgB;AACd,GAAA,QAAA,IAAA,aAA6B,iBACtB,KACH,EAAK,iDAAiD,EAGpD,EAAM,UAAU,KAAA,KAAa,EAAW,UAAU,aACpD,EAAK,yEAAuE;IAGhF,kBAtGA,EAsBK,MAAA;GArBH,WAAQ;GACP,OAAK,EAAE,EAAA,MAAmB;GAC1B,OAAO,EAAA;MAGA,EAAA,SAAA,GAAA,EADR,EASO,QAAA;;GAPL,WAAQ;GACR,OAAK,EAAA,CAAC,4BACE,EAAA,YAAW,CAAA;GACnB,eAAY;MAGZ,EAAsB,EAAA,QAAA,SAAA,CAAA,EAAA,EAAA,IAAA,EAAA,IAAA,GAAA,EAExB,EAMM,OAAA;GALJ,WAAQ;GACP,OAAK,EAAA,CAAA,6BAAgC,EAAA,aAAY,CAAA;MAGlD,EAAQ,EAAA,QAAA,UAAA,CAAA,EAAA,EAAA,CAAA,EAAA,IAAA,EAAA"}
@@ -1,2 +1,2 @@
1
1
  require(`./chunk-Bmb41Sf3.cjs`);const e=require(`./common/validators/index.cjs`),t=require(`./common/utils/index.cjs`),n=require(`./_plugin-vue_export-helper-D8jCH6HB.cjs`),r=require(`./lib/icon/icon-constants.cjs`),i=require(`./lib/notice/notice-constants.cjs`),a=require(`./lib/notice/notice-icon.cjs`),o=require(`./lib/notice/notice-content.cjs`),s=require(`./lib/notice/notice-action.cjs`),c=require(`./lib/toast/toast-constants.cjs`);let l=require(`vue`),u=require(`@dialpad/dialtone-icons/vue`);var d={name:`ToastLayoutDefault`,components:{DtNoticeIcon:a.default,DtNoticeContent:o.default,DtNoticeAction:s.default},inheritAttrs:!1,props:{isShown:{type:Boolean,default:!1},headerId:{type:String,default(){return t.default.getUniqueString()}},contentId:{type:String,default(){return t.default.getUniqueString()}},headerText:{type:String,default:void 0},message:{type:String,default:``},role:{type:String,default:`status`,validator:e=>c.TOAST_ROLES.includes(e)},kind:{type:String,default:`base`,validator:e=>i.NOTICE_KINDS.includes(e)},important:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},showAction:{type:Boolean,default:!0},iconClass:{type:[String,Array,Object],default:``},headerClass:{type:[String,Array,Object],default:``},contentClass:{type:[String,Array,Object],default:``},actionClass:{type:[String,Array,Object],default:``}},emits:[`close`],computed:{kindClass(){return{critical:`d-toast--critical`,info:`d-toast--info`,positive:`d-toast--positive`,warning:`d-toast--warning`,base:`d-toast--base`}[this.kind]},toastListeners(){return t.extractVueListeners(this.$attrs)}}},f=[`aria-hidden`],p={class:`d-toast__dialog`};function m(e,t,n,r,i,a){let o=(0,l.resolveComponent)(`dt-notice-icon`),s=(0,l.resolveComponent)(`dt-notice-content`),c=(0,l.resolveComponent)(`dt-notice-action`);return n.isShown?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:0,class:(0,l.normalizeClass)([`d-toast`,a.kindClass,e.$attrs.class,{"d-toast--important":n.important}]),"data-qa":`dt-toast`,"aria-hidden":(!n.isShown).toString()},[(0,l.createElementVNode)(`div`,p,[n.showIcon?((0,l.openBlock)(),(0,l.createBlock)(o,(0,l.mergeProps)({key:0,kind:n.kind,"icon-class":n.iconClass,class:{"d-notice__icon--has-title":n.headerText||e.$slots.header}},a.toastListeners),{default:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`icon`)]),_:3},16,[`kind`,`icon-class`,`class`])):(0,l.createCommentVNode)(``,!0),(0,l.createVNode)(s,(0,l.mergeProps)({"header-id":n.headerId,"content-id":n.contentId,"header-text":n.headerText,message:n.message,"header-class":n.headerClass,"content-class":n.contentClass,role:n.role},a.toastListeners),{header:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`header`)]),default:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`default`)]),_:3},16,[`header-id`,`content-id`,`header-text`,`message`,`header-class`,`content-class`,`role`]),(0,l.createVNode)(c,(0,l.mergeProps)({"show-action":n.showAction,"show-close":n.showClose,"action-class":n.actionClass},a.toastListeners,{onClose:t[0]||(t[0]=t=>e.$emit(`close`))}),{default:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`action`)]),_:3},16,[`show-action`,`show-close`,`action-class`])])],10,f)):(0,l.createCommentVNode)(``,!0)}var h=n.t(d,[[`render`,m]]),g=new Map([[`info`,u.DtIconInfo],[`positive`,u.DtIconInfo],[`warning`,u.DtIconAlertTriangle],[`critical`,u.DtIconInfo],[`base`,u.DtIconBell],[`gradient`,u.DtIconSparkle]]),_={name:`DtToastLayoutAlternateIcon`,components:{DtIconInfo:u.DtIconInfo,DtIconAlertTriangle:u.DtIconAlertTriangle,DtIconBell:u.DtIconBell,DtIconSparkle:u.DtIconSparkle},props:{kind:{type:String,default:`base`,validator(e){return c.TOAST_ALTERNATE_KINDS.includes(e)}},size:{type:[String,Number],default:400,validator:e.ordinalSizeValidator(r.ICON_SIZE_MODIFIERS)},iconClass:{type:[String,Array,Object],default:``}},computed:{defaultIcon(){return g.get(this.kind)}}};function v(e,t,n,r,i,a){return(0,l.openBlock)(),(0,l.createElementBlock)(`div`,{"aria-hidden":`true`,class:(0,l.normalizeClass)([`d-toast-layout-alternate__icon`,n.iconClass])},[(0,l.renderSlot)(e.$slots,`default`,{},()=>[a.defaultIcon?((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(a.defaultIcon),{key:0,size:n.size},null,8,[`size`])):(0,l.createCommentVNode)(``,!0)])],2)}var y=n.t(_,[[`render`,v]]),b={name:`ToastLayoutAlternate`,components:{DtNoticeAction:s.default,DtNoticeContent:o.default,DtToastLayoutAlternateIcon:y},inheritAttrs:!1,props:{isShown:{type:Boolean,default:!1},headerId:{type:String,default(){return t.default.getUniqueString()}},contentId:{type:String,default(){return t.default.getUniqueString()}},headerText:{type:String,default:void 0},message:{type:String,default:``},role:{type:String,default:`status`,validator:e=>c.TOAST_ROLES.includes(e)},kind:{type:String,default:`base`,validator:e=>c.TOAST_ALTERNATE_KINDS.includes(e)},showClose:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},iconClass:{type:[String,Array,Object],default:``},headerClass:{type:[String,Array,Object],default:``},contentClass:{type:[String,Array,Object],default:``},actionClass:{type:[String,Array,Object],default:``}},computed:{kindClass(){return{critical:`d-toast-alternate--critical`,info:`d-toast-alternate--info`,positive:`d-toast-alternate--positive`,warning:`d-toast-alternate--warning`,gradient:`d-toast-alternate--gradient`}[this.kind]},toastListeners(){return t.extractVueListeners(this.$attrs)}}},x=[`aria-hidden`],S={class:`d-toast-alternate__dialog`},C={class:`d-toast-alternate__header`},w={class:`d-toast-alternate__content`};function T(e,t,n,r,i,a){let o=(0,l.resolveComponent)(`dt-toast-layout-alternate-icon`),s=(0,l.resolveComponent)(`dt-notice-content`),c=(0,l.resolveComponent)(`dt-notice-action`);return n.isShown?((0,l.openBlock)(),(0,l.createElementBlock)(`div`,{key:0,class:(0,l.normalizeClass)([`d-toast-alternate`,e.$attrs.class,a.kindClass]),"data-qa":`dt-toast`,"aria-hidden":(!n.isShown).toString()},[(0,l.createElementVNode)(`div`,S,[(0,l.createElementVNode)(`div`,C,[n.showIcon?((0,l.openBlock)(),(0,l.createBlock)(o,(0,l.mergeProps)({key:0,kind:n.kind,"icon-class":n.iconClass,size:`200`},a.toastListeners),{default:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`icon`)]),_:3},16,[`kind`,`icon-class`])):(0,l.createCommentVNode)(``,!0),(0,l.createVNode)(s,(0,l.mergeProps)({"header-id":n.headerId,"content-id":n.contentId,"header-text":n.headerText,"header-class":n.headerClass,"content-class":n.contentClass,role:n.role},a.toastListeners),{header:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`header`)]),_:3},16,[`header-id`,`content-id`,`header-text`,`header-class`,`content-class`,`role`]),(0,l.createVNode)(c,(0,l.mergeProps)({"show-action":!1,"show-close":n.showClose,"action-class":n.actionClass,"button-size":100},a.toastListeners,{onClose:t[0]||(t[0]=t=>e.$emit(`close`))}),null,16,[`show-close`,`action-class`])]),(0,l.createElementVNode)(`div`,w,[(0,l.renderSlot)(e.$slots,`default`,{},()=>[(0,l.createTextVNode)((0,l.toDisplayString)(n.message),1)])])])],10,x)):(0,l.createCommentVNode)(``,!0)}var E=n.t(b,[[`render`,T]]),D={name:`DtToast`,components:{ToastLayoutDefault:h,ToastLayoutAlternate:E},inheritAttrs:!1,props:{headerId:{type:String,default:void 0},contentId:{type:String,default:void 0},headerText:{type:String,default:void 0},message:{type:String,default:void 0},role:{type:String,default:`status`},kind:{type:String,default:void 0},important:{type:Boolean,default:!1},open:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!0},showAction:{type:Boolean,default:!0},duration:{type:Number,default:null,validator:e=>e>=c.TOAST_MIN_DURATION},layout:{type:String,default:`default`,validator:e=>c.TOAST_LAYOUTS.includes(e)},iconClass:{type:[String,Array,Object],default:``},headerClass:{type:[String,Array,Object],default:``},contentClass:{type:[String,Array,Object],default:``},actionClass:{type:[String,Array,Object],default:``}},emits:[`close`,`update:open`],data(){return{isShown:!1,minDuration:c.TOAST_MIN_DURATION}},computed:{shouldSetTimeout(){return!!this.duration&&this.duration>=this.minDuration},selectedLayout(){return this.layout===`alternate`?E:h}},watch:{open:{handler:function(e){this.isShown=e,e?this.setTimeout():clearTimeout(this.displayTimer)},immediate:!0}},unmounted(){clearTimeout(this.displayTimer)},methods:{setTimeout(){this.shouldSetTimeout&&(this.displayTimer=setTimeout(()=>{this.isShown=!1,this.$emit(`update:open`,!1)},this.duration))},handleClose(){this.isShown=!1,this.$emit(`close`),this.$emit(`update:open`,!1)}}};function O(e,t,n,r,i,a){return(0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(a.selectedLayout),(0,l.mergeProps)({"is-shown":i.isShown,"header-id":n.headerId,"content-id":n.contentId,"header-text":n.headerText,message:n.message,role:n.role,kind:n.kind,important:n.important,"show-close":n.showClose,"show-icon":n.showIcon,"show-action":n.showAction,"icon-class":n.iconClass,"header-class":n.headerClass,"content-class":n.contentClass,"action-class":n.actionClass},e.$attrs,{onClose:a.handleClose}),{icon:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`icon`)]),header:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`header`)]),action:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`action`)]),default:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,`default`)]),_:3},16,[`is-shown`,`header-id`,`content-id`,`header-text`,`message`,`role`,`kind`,`important`,`show-close`,`show-icon`,`show-action`,`icon-class`,`header-class`,`content-class`,`action-class`,`onClose`])}var k=n.t(D,[[`render`,O]]);Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return k}});
2
- //# sourceMappingURL=Toast-IyFVsArp.cjs.map
2
+ //# sourceMappingURL=Toast-CN9x3jKH.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toast-IyFVsArp.cjs","names":[],"sources":["../components/Toast/Layouts/ToastLayoutDefault.vue","../components/Toast/Layouts/ToastLayoutAlternateIcon.vue","../components/Toast/Layouts/ToastLayoutAlternate.vue","../components/Toast/Toast.vue"],"sourcesContent":["<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n $attrs.class,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"showIcon\"\n :kind=\"kind\"\n :icon-class=\"iconClass\"\n :class=\"{ 'd-notice__icon--has-title': headerText || $slots.header }\"\n v-bind=\"toastListeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :header-id=\"headerId\"\n :content-id=\"contentId\"\n :header-text=\"headerText\"\n :message=\"message\"\n :header-class=\"headerClass\"\n :content-class=\"contentClass\"\n :role=\"role\"\n v-bind=\"toastListeners\"\n >\n <template #header>\n <!-- @slot Slot for the header -->\n <slot name=\"header\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :show-action=\"showAction\"\n :show-close=\"showClose\"\n :action-class=\"actionClass\"\n v-bind=\"toastListeners\"\n @close=\"$emit('close')\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/Notice';\nimport { TOAST_ROLES } from '../ToastConstants.js';\nimport { extractVueListeners } from '@/common/utils/index.js';\n\nexport default {\n name: 'ToastLayoutDefault',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n inheritAttrs: false,\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the header element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the header.\n */\n headerId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Header text of the toast. This can be left blank to remove the header from the toast entirely.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, critical, info, positive, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows the close button in the toast\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the icon in the toast\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the action in the toast\n * @values true, false\n */\n showAction: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the action wrapper element.\n */\n actionClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: ['close'],\n\n computed: {\n kindClass () {\n const kindClasses = {\n critical: 'd-toast--critical',\n info: 'd-toast--info',\n positive: 'd-toast--positive',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n\n toastListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n","<template>\n <div\n aria-hidden=\"true\"\n :class=\"['d-toast-layout-alternate__icon', iconClass]\"\n >\n <slot>\n <component\n :is=\"defaultIcon\"\n v-if=\"defaultIcon\"\n :size=\"size\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n} from '@dialpad/dialtone-icons/vue';\nimport { TOAST_ALTERNATE_KINDS } from '../ToastConstants.js';\nimport { ICON_SIZE_MODIFIERS } from '@/components/Icon/IconConstants.js';\nimport { ordinalSizeValidator } from '@/common/validators';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['positive', DtIconInfo],\n ['warning', DtIconAlertTriangle],\n ['critical', DtIconInfo],\n ['base', DtIconBell],\n ['gradient', DtIconSparkle],\n]);\n\nexport default {\n name: 'DtToastLayoutAlternateIcon',\n\n components: {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, critical, info, positive, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator (kind) {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n size: {\n type: [String, Number],\n default: 400,\n validator: ordinalSizeValidator(ICON_SIZE_MODIFIERS),\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n","<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast-alternate',\n $attrs.class,\n kindClass,\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast-alternate__dialog\">\n <div class=\"d-toast-alternate__header\">\n <dt-toast-layout-alternate-icon\n v-if=\"showIcon\"\n :kind=\"kind\"\n :icon-class=\"iconClass\"\n size=\"200\"\n v-bind=\"toastListeners\"\n >\n <slot name=\"icon\" />\n </dt-toast-layout-alternate-icon>\n <dt-notice-content\n :header-id=\"headerId\"\n :content-id=\"contentId\"\n :header-text=\"headerText\"\n :header-class=\"headerClass\"\n :content-class=\"contentClass\"\n :role=\"role\"\n v-bind=\"toastListeners\"\n >\n <template #header>\n <slot name=\"header\" />\n </template>\n </dt-notice-content>\n\n <!-- Close Button -->\n <dt-notice-action\n :show-action=\"false\"\n :show-close=\"showClose\"\n :action-class=\"actionClass\"\n :button-size=\"100\"\n v-bind=\"toastListeners\"\n @close=\"$emit('close')\"\n />\n </div>\n <!-- Content Section -->\n <div class=\"d-toast-alternate__content\">\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport DtToastLayoutAlternateIcon from './ToastLayoutAlternateIcon.vue';\nimport { DtNoticeAction, DtNoticeContent } from '@/components/Notice';\nimport { TOAST_ROLES, TOAST_ALTERNATE_KINDS } from '../ToastConstants.js';\nimport { extractVueListeners } from '@/common/utils/index.js';\n\nexport default {\n name: 'ToastLayoutAlternate',\n\n components: {\n DtNoticeAction,\n DtNoticeContent,\n DtToastLayoutAlternateIcon,\n },\n\n inheritAttrs: false,\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the header element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the header.\n */\n headerId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Header text of the toast. This can be left blank to remove the header from the toast entirely.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, critical, info, positive, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n /**\n * Shows the close button in the toast\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the icon in the toast\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the action wrapper element.\n */\n actionClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n critical: 'd-toast-alternate--critical',\n info: 'd-toast-alternate--info',\n positive: 'd-toast-alternate--positive',\n warning: 'd-toast-alternate--warning',\n gradient: 'd-toast-alternate--gradient',\n };\n\n return kindClasses[this.kind];\n },\n\n toastListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"selectedLayout\"\n :is-shown=\"isShown\"\n :header-id=\"headerId\"\n :content-id=\"contentId\"\n :header-text=\"headerText\"\n :message=\"message\"\n :role=\"role\"\n :kind=\"kind\"\n :important=\"important\"\n :show-close=\"showClose\"\n :show-icon=\"showIcon\"\n :show-action=\"showAction\"\n :icon-class=\"iconClass\"\n :header-class=\"headerClass\"\n :content-class=\"contentClass\"\n :action-class=\"actionClass\"\n v-bind=\"$attrs\"\n @close=\"handleClose\"\n >\n <!-- @slot Slot for custom icon -->\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #header>\n <!-- @slot Slot for the header -->\n <slot name=\"header\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot />\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <template #action>\n <slot name=\"action\" />\n </template>\n </component>\n</template>\n\n<script>\nimport { TOAST_MIN_DURATION, TOAST_LAYOUTS } from './ToastConstants.js';\nimport ToastLayoutDefault from './Layouts/ToastLayoutDefault.vue';\nimport ToastLayoutAlternate from './Layouts/ToastLayoutAlternate.vue';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n name: 'DtToast',\n\n components: {\n ToastLayoutDefault,\n ToastLayoutAlternate,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Sets an ID on the header element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the header.\n */\n headerId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Header text of the toast. This can be left blank to remove the header from the toast entirely.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: undefined,\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n },\n\n /**\n * Severity level of the toast, could be different depending on which toast layout is used.\n * @values base, critical, info, positive, warning, gradient\n */\n kind: {\n type: String,\n default: undefined,\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `v-model` with this prop to update\n * the data in your component.\n * Supports v-model\n * @values true, false\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows the close button in the toast.\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the icon in the toast.\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the action in the toast.\n * @values true, false\n */\n showAction: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n\n /**\n * The layout / styling you wish to use for the toast.\n * @values default, alternate\n */\n layout: {\n type: String,\n default: 'default',\n validator: (layout) => {\n return TOAST_LAYOUTS.includes(layout);\n },\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the action wrapper element.\n */\n actionClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync open value\n *\n * @event update:open\n */\n 'update:open',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n\n selectedLayout () {\n return this.layout === 'alternate' ? ToastLayoutAlternate : ToastLayoutDefault;\n },\n },\n\n watch: {\n open: {\n handler: function (open) {\n this.isShown = open;\n if (open) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n unmounted () {\n clearTimeout(this.displayTimer);\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:open', false);\n }, this.duration);\n }\n },\n\n handleClose () {\n this.isShown = false;\n this.$emit('close');\n this.$emit('update:open', false);\n },\n },\n};\n</script>\n"],"mappings":"qfA4DA,IAAK,EAAU,CACb,KAAM,qBAEN,WAAY,CACV,aAAA,EAAA,QACA,gBAAA,EAAA,QACA,eAAA,EAAA,QACD,CAED,aAAc,GAEd,MAAO,CACL,QAAS,CACP,KAAM,QACN,QAAS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a,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,SAAA,CAAA,CAAA,CAKb,QAAA,EAAA,EAAA,aACa,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,SAAA,CAAA,CAAA,2BAHhB,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"Toast-CN9x3jKH.cjs","names":[],"sources":["../components/Toast/Layouts/ToastLayoutDefault.vue","../components/Toast/Layouts/ToastLayoutAlternateIcon.vue","../components/Toast/Layouts/ToastLayoutAlternate.vue","../components/Toast/Toast.vue"],"sourcesContent":["<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n $attrs.class,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"showIcon\"\n :kind=\"kind\"\n :icon-class=\"iconClass\"\n :class=\"{ 'd-notice__icon--has-title': headerText || $slots.header }\"\n v-bind=\"toastListeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :header-id=\"headerId\"\n :content-id=\"contentId\"\n :header-text=\"headerText\"\n :message=\"message\"\n :header-class=\"headerClass\"\n :content-class=\"contentClass\"\n :role=\"role\"\n v-bind=\"toastListeners\"\n >\n <template #header>\n <!-- @slot Slot for the header -->\n <slot name=\"header\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :show-action=\"showAction\"\n :show-close=\"showClose\"\n :action-class=\"actionClass\"\n v-bind=\"toastListeners\"\n @close=\"$emit('close')\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/Notice';\nimport { TOAST_ROLES } from '../ToastConstants.js';\nimport { extractVueListeners } from '@/common/utils/index.js';\n\nexport default {\n name: 'ToastLayoutDefault',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n inheritAttrs: false,\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the header element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the header.\n */\n headerId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Header text of the toast. This can be left blank to remove the header from the toast entirely.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, critical, info, positive, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows the close button in the toast\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the icon in the toast\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the action in the toast\n * @values true, false\n */\n showAction: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the action wrapper element.\n */\n actionClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: ['close'],\n\n computed: {\n kindClass () {\n const kindClasses = {\n critical: 'd-toast--critical',\n info: 'd-toast--info',\n positive: 'd-toast--positive',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n\n toastListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n","<template>\n <div\n aria-hidden=\"true\"\n :class=\"['d-toast-layout-alternate__icon', iconClass]\"\n >\n <slot>\n <component\n :is=\"defaultIcon\"\n v-if=\"defaultIcon\"\n :size=\"size\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n} from '@dialpad/dialtone-icons/vue';\nimport { TOAST_ALTERNATE_KINDS } from '../ToastConstants.js';\nimport { ICON_SIZE_MODIFIERS } from '@/components/Icon/IconConstants.js';\nimport { ordinalSizeValidator } from '@/common/validators';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['positive', DtIconInfo],\n ['warning', DtIconAlertTriangle],\n ['critical', DtIconInfo],\n ['base', DtIconBell],\n ['gradient', DtIconSparkle],\n]);\n\nexport default {\n name: 'DtToastLayoutAlternateIcon',\n\n components: {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, critical, info, positive, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator (kind) {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n size: {\n type: [String, Number],\n default: 400,\n validator: ordinalSizeValidator(ICON_SIZE_MODIFIERS),\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n","<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast-alternate',\n $attrs.class,\n kindClass,\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast-alternate__dialog\">\n <div class=\"d-toast-alternate__header\">\n <dt-toast-layout-alternate-icon\n v-if=\"showIcon\"\n :kind=\"kind\"\n :icon-class=\"iconClass\"\n size=\"200\"\n v-bind=\"toastListeners\"\n >\n <slot name=\"icon\" />\n </dt-toast-layout-alternate-icon>\n <dt-notice-content\n :header-id=\"headerId\"\n :content-id=\"contentId\"\n :header-text=\"headerText\"\n :header-class=\"headerClass\"\n :content-class=\"contentClass\"\n :role=\"role\"\n v-bind=\"toastListeners\"\n >\n <template #header>\n <slot name=\"header\" />\n </template>\n </dt-notice-content>\n\n <!-- Close Button -->\n <dt-notice-action\n :show-action=\"false\"\n :show-close=\"showClose\"\n :action-class=\"actionClass\"\n :button-size=\"100\"\n v-bind=\"toastListeners\"\n @close=\"$emit('close')\"\n />\n </div>\n <!-- Content Section -->\n <div class=\"d-toast-alternate__content\">\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport DtToastLayoutAlternateIcon from './ToastLayoutAlternateIcon.vue';\nimport { DtNoticeAction, DtNoticeContent } from '@/components/Notice';\nimport { TOAST_ROLES, TOAST_ALTERNATE_KINDS } from '../ToastConstants.js';\nimport { extractVueListeners } from '@/common/utils/index.js';\n\nexport default {\n name: 'ToastLayoutAlternate',\n\n components: {\n DtNoticeAction,\n DtNoticeContent,\n DtToastLayoutAlternateIcon,\n },\n\n inheritAttrs: false,\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the header element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the header.\n */\n headerId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Header text of the toast. This can be left blank to remove the header from the toast entirely.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, critical, info, positive, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n /**\n * Shows the close button in the toast\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the icon in the toast\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the action wrapper element.\n */\n actionClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n critical: 'd-toast-alternate--critical',\n info: 'd-toast-alternate--info',\n positive: 'd-toast-alternate--positive',\n warning: 'd-toast-alternate--warning',\n gradient: 'd-toast-alternate--gradient',\n };\n\n return kindClasses[this.kind];\n },\n\n toastListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"selectedLayout\"\n :is-shown=\"isShown\"\n :header-id=\"headerId\"\n :content-id=\"contentId\"\n :header-text=\"headerText\"\n :message=\"message\"\n :role=\"role\"\n :kind=\"kind\"\n :important=\"important\"\n :show-close=\"showClose\"\n :show-icon=\"showIcon\"\n :show-action=\"showAction\"\n :icon-class=\"iconClass\"\n :header-class=\"headerClass\"\n :content-class=\"contentClass\"\n :action-class=\"actionClass\"\n v-bind=\"$attrs\"\n @close=\"handleClose\"\n >\n <!-- @slot Slot for custom icon -->\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #header>\n <!-- @slot Slot for the header -->\n <slot name=\"header\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot />\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <template #action>\n <slot name=\"action\" />\n </template>\n </component>\n</template>\n\n<script>\nimport { TOAST_MIN_DURATION, TOAST_LAYOUTS } from './ToastConstants.js';\nimport ToastLayoutDefault from './Layouts/ToastLayoutDefault.vue';\nimport ToastLayoutAlternate from './Layouts/ToastLayoutAlternate.vue';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n name: 'DtToast',\n\n components: {\n ToastLayoutDefault,\n ToastLayoutAlternate,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Sets an ID on the header element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the header.\n */\n headerId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Header text of the toast. This can be left blank to remove the header from the toast entirely.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: undefined,\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n },\n\n /**\n * Severity level of the toast, could be different depending on which toast layout is used.\n * @values base, critical, info, positive, warning, gradient\n */\n kind: {\n type: String,\n default: undefined,\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `v-model` with this prop to update\n * the data in your component.\n * Supports v-model\n * @values true, false\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows the close button in the toast.\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the icon in the toast.\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the action in the toast.\n * @values true, false\n */\n showAction: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n\n /**\n * The layout / styling you wish to use for the toast.\n * @values default, alternate\n */\n layout: {\n type: String,\n default: 'default',\n validator: (layout) => {\n return TOAST_LAYOUTS.includes(layout);\n },\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the action wrapper element.\n */\n actionClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync open value\n *\n * @event update:open\n */\n 'update:open',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n\n selectedLayout () {\n return this.layout === 'alternate' ? ToastLayoutAlternate : ToastLayoutDefault;\n },\n },\n\n watch: {\n open: {\n handler: function (open) {\n this.isShown = open;\n if (open) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n unmounted () {\n clearTimeout(this.displayTimer);\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:open', false);\n }, this.duration);\n }\n },\n\n handleClose () {\n this.isShown = false;\n this.$emit('close');\n this.$emit('update:open', false);\n },\n },\n};\n</script>\n"],"mappings":"qfA4DA,IAAK,EAAU,CACb,KAAM,qBAEN,WAAY,CACV,aAAA,EAAA,QACA,gBAAA,EAAA,QACA,eAAA,EAAA,QACD,CAED,aAAc,GAEd,MAAO,CACL,QAAS,CACP,KAAM,QACN,QAAS,GACV,CAMD,SAAU,CACR,KAAM,OACN,SAAW,CAAE,OAAO,EAAA,QAAM,iBAAiB,EAC5C,CAMD,UAAW,CACT,KAAM,OACN,SAAW,CAAE,OAAO,EAAA,QAAM,iBAAiB,EAC5C,CAKD,WAAY,CACV,KAAM,OACN,QAAS,IAAA,GACV,CAKD,QAAS,CACP,KAAM,OACN,QAAS,GACV,CAOD,KAAM,CACJ,KAAM,OACN,QAAS,SACT,UAAY,GACH,EAAA,YAAY,SAAS,EAAK,CAEpC,CAMD,KAAM,CACJ,KAAM,OACN,QAAS,OACT,UAAY,GACH,EAAA,aAAa,SAAS,EAAK,CAErC,CAMD,UAAW,CACT,KAAM,QACN,QAAS,GACV,CAMD,UAAW,CACT,KAAM,QACN,QAAS,GACV,CAMD,SAAU,CACR,KAAM,QACN,QAA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CAED,WAAa,CACX,aAAa,KAAK,aAAa,EAGjC,QAAS,CACP,YAAc,CACR,KAAK,mBACP,KAAK,aAAe,eAAiB,CACnC,KAAK,QAAU,GACf,KAAK,MAAM,cAAe,GAAM,EAC/B,KAAK,SAAS,GAIrB,aAAe,CACb,KAAK,QAAU,GACf,KAAK,MAAM,QAAQ,CACnB,KAAK,MAAM,cAAe,GAAM,EAEnC,CACF,iGA5RQ,EAAA,eAAc,EAAA,EAAA,EAAA,YAiCT,CAhCT,WAAU,EAAA,QACV,YAAW,EAAA,SACX,aAAY,EAAA,UACZ,cAAa,EAAA,WACb,QAAS,EAAA,QACT,KAAM,EAAA,KACN,KAAM,EAAA,KACN,UAAW,EAAA,UACX,aAAY,EAAA,UACZ,YAAW,EAAA,SACX,cAAa,EAAA,WACb,aAAY,EAAA,UACZ,eAAc,EAAA,YACd,gBAAe,EAAA,aACf,eAAc,EAAA,aACP,EAAA,OAAM,CACb,QAAO,EAAA,YAAW,CAAA,CAAA,CAGR,MAAA,EAAA,EAAA,aACW,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,OAAA,CAAA,CAAA,CAEX,QAAA,EAAA,EAAA,aAEa,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,SAAA,CAAA,CAAA,CAKb,QAAA,EAAA,EAAA,aACa,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,SAAA,CAAA,CAAA,2BAHhB,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,UAAA,CAAA,CAAA"}
@@ -553,4 +553,4 @@ var J = /* @__PURE__ */ r(K, [["render", q]]);
553
553
  //#endregion
554
554
  export { J as t };
555
555
 
556
- //# sourceMappingURL=Toast-t6T8fd29.js.map
556
+ //# sourceMappingURL=Toast-DVUE2_fV.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toast-t6T8fd29.js","names":[],"sources":["../components/Toast/Layouts/ToastLayoutDefault.vue","../components/Toast/Layouts/ToastLayoutAlternateIcon.vue","../components/Toast/Layouts/ToastLayoutAlternate.vue","../components/Toast/Toast.vue"],"sourcesContent":["<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n $attrs.class,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"showIcon\"\n :kind=\"kind\"\n :icon-class=\"iconClass\"\n :class=\"{ 'd-notice__icon--has-title': headerText || $slots.header }\"\n v-bind=\"toastListeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :header-id=\"headerId\"\n :content-id=\"contentId\"\n :header-text=\"headerText\"\n :message=\"message\"\n :header-class=\"headerClass\"\n :content-class=\"contentClass\"\n :role=\"role\"\n v-bind=\"toastListeners\"\n >\n <template #header>\n <!-- @slot Slot for the header -->\n <slot name=\"header\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :show-action=\"showAction\"\n :show-close=\"showClose\"\n :action-class=\"actionClass\"\n v-bind=\"toastListeners\"\n @close=\"$emit('close')\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/Notice';\nimport { TOAST_ROLES } from '../ToastConstants.js';\nimport { extractVueListeners } from '@/common/utils/index.js';\n\nexport default {\n name: 'ToastLayoutDefault',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n inheritAttrs: false,\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the header element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the header.\n */\n headerId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Header text of the toast. This can be left blank to remove the header from the toast entirely.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, critical, info, positive, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows the close button in the toast\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the icon in the toast\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the action in the toast\n * @values true, false\n */\n showAction: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the action wrapper element.\n */\n actionClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: ['close'],\n\n computed: {\n kindClass () {\n const kindClasses = {\n critical: 'd-toast--critical',\n info: 'd-toast--info',\n positive: 'd-toast--positive',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n\n toastListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n","<template>\n <div\n aria-hidden=\"true\"\n :class=\"['d-toast-layout-alternate__icon', iconClass]\"\n >\n <slot>\n <component\n :is=\"defaultIcon\"\n v-if=\"defaultIcon\"\n :size=\"size\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n} from '@dialpad/dialtone-icons/vue';\nimport { TOAST_ALTERNATE_KINDS } from '../ToastConstants.js';\nimport { ICON_SIZE_MODIFIERS } from '@/components/Icon/IconConstants.js';\nimport { ordinalSizeValidator } from '@/common/validators';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['positive', DtIconInfo],\n ['warning', DtIconAlertTriangle],\n ['critical', DtIconInfo],\n ['base', DtIconBell],\n ['gradient', DtIconSparkle],\n]);\n\nexport default {\n name: 'DtToastLayoutAlternateIcon',\n\n components: {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, critical, info, positive, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator (kind) {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n size: {\n type: [String, Number],\n default: 400,\n validator: ordinalSizeValidator(ICON_SIZE_MODIFIERS),\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n","<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast-alternate',\n $attrs.class,\n kindClass,\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast-alternate__dialog\">\n <div class=\"d-toast-alternate__header\">\n <dt-toast-layout-alternate-icon\n v-if=\"showIcon\"\n :kind=\"kind\"\n :icon-class=\"iconClass\"\n size=\"200\"\n v-bind=\"toastListeners\"\n >\n <slot name=\"icon\" />\n </dt-toast-layout-alternate-icon>\n <dt-notice-content\n :header-id=\"headerId\"\n :content-id=\"contentId\"\n :header-text=\"headerText\"\n :header-class=\"headerClass\"\n :content-class=\"contentClass\"\n :role=\"role\"\n v-bind=\"toastListeners\"\n >\n <template #header>\n <slot name=\"header\" />\n </template>\n </dt-notice-content>\n\n <!-- Close Button -->\n <dt-notice-action\n :show-action=\"false\"\n :show-close=\"showClose\"\n :action-class=\"actionClass\"\n :button-size=\"100\"\n v-bind=\"toastListeners\"\n @close=\"$emit('close')\"\n />\n </div>\n <!-- Content Section -->\n <div class=\"d-toast-alternate__content\">\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport DtToastLayoutAlternateIcon from './ToastLayoutAlternateIcon.vue';\nimport { DtNoticeAction, DtNoticeContent } from '@/components/Notice';\nimport { TOAST_ROLES, TOAST_ALTERNATE_KINDS } from '../ToastConstants.js';\nimport { extractVueListeners } from '@/common/utils/index.js';\n\nexport default {\n name: 'ToastLayoutAlternate',\n\n components: {\n DtNoticeAction,\n DtNoticeContent,\n DtToastLayoutAlternateIcon,\n },\n\n inheritAttrs: false,\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the header element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the header.\n */\n headerId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Header text of the toast. This can be left blank to remove the header from the toast entirely.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, critical, info, positive, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n /**\n * Shows the close button in the toast\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the icon in the toast\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the action wrapper element.\n */\n actionClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n critical: 'd-toast-alternate--critical',\n info: 'd-toast-alternate--info',\n positive: 'd-toast-alternate--positive',\n warning: 'd-toast-alternate--warning',\n gradient: 'd-toast-alternate--gradient',\n };\n\n return kindClasses[this.kind];\n },\n\n toastListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"selectedLayout\"\n :is-shown=\"isShown\"\n :header-id=\"headerId\"\n :content-id=\"contentId\"\n :header-text=\"headerText\"\n :message=\"message\"\n :role=\"role\"\n :kind=\"kind\"\n :important=\"important\"\n :show-close=\"showClose\"\n :show-icon=\"showIcon\"\n :show-action=\"showAction\"\n :icon-class=\"iconClass\"\n :header-class=\"headerClass\"\n :content-class=\"contentClass\"\n :action-class=\"actionClass\"\n v-bind=\"$attrs\"\n @close=\"handleClose\"\n >\n <!-- @slot Slot for custom icon -->\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #header>\n <!-- @slot Slot for the header -->\n <slot name=\"header\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot />\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <template #action>\n <slot name=\"action\" />\n </template>\n </component>\n</template>\n\n<script>\nimport { TOAST_MIN_DURATION, TOAST_LAYOUTS } from './ToastConstants.js';\nimport ToastLayoutDefault from './Layouts/ToastLayoutDefault.vue';\nimport ToastLayoutAlternate from './Layouts/ToastLayoutAlternate.vue';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n name: 'DtToast',\n\n components: {\n ToastLayoutDefault,\n ToastLayoutAlternate,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Sets an ID on the header element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the header.\n */\n headerId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Header text of the toast. This can be left blank to remove the header from the toast entirely.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: undefined,\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n },\n\n /**\n * Severity level of the toast, could be different depending on which toast layout is used.\n * @values base, critical, info, positive, warning, gradient\n */\n kind: {\n type: String,\n default: undefined,\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `v-model` with this prop to update\n * the data in your component.\n * Supports v-model\n * @values true, false\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows the close button in the toast.\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the icon in the toast.\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the action in the toast.\n * @values true, false\n */\n showAction: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n\n /**\n * The layout / styling you wish to use for the toast.\n * @values default, alternate\n */\n layout: {\n type: String,\n default: 'default',\n validator: (layout) => {\n return TOAST_LAYOUTS.includes(layout);\n },\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the action wrapper element.\n */\n actionClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync open value\n *\n * @event update:open\n */\n 'update:open',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n\n selectedLayout () {\n return this.layout === 'alternate' ? ToastLayoutAlternate : ToastLayoutDefault;\n },\n },\n\n watch: {\n open: {\n handler: function (open) {\n this.isShown = open;\n if (open) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n unmounted () {\n clearTimeout(this.displayTimer);\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:open', false);\n }, this.duration);\n }\n },\n\n handleClose () {\n this.isShown = false;\n this.$emit('close');\n this.$emit('update:open', false);\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;;AA4DA,IAAK,IAAU;CACb,MAAM;CAEN,YAAY;EACV,cAAA;EACA,iBAAA;EACA,gBAAA;EACD;CAED,cAAc;CAEd,OAAO;EACL,SAAS;GACP,MAAM;GACN,SAAS;GACV;EAMD,UAAU;GACR,MAAM;GACN,UAAW;AAAE,WAAO,EAAM,iBAAiB;;GAC5C;EAMD,WAAW;GACT,MAAM;GACN,UAAW;AAAE,WAAO,EAAM,iBAAiB;;GAC5C;EAKD,YAAY;GACV,MAAM;GACN,SAAS,KAAA;GACV;EAKD,SAAS;GACP,MAAM;GACN,SAAS;GACV;EAOD,MAAM;GACJ,MAAM;GACN,SAAS;GACT,YAAY,MACH,EAAY,SAAS,EAAK;GAEpC;EAMD,MAAM;GACJ,MAAM;GACN,SAAS;GACT,YAAY,MACH,EAAa,SAAS,EAAK;GAErC;EAMD,WAAW;GACT,MAAM;GACN,SAAS;GACV;EAMD,WAAW;GACT,MAAM;GACN,SAAS;GACV;EAMD,UAAU;GACR,MAAM;GACN,SAAS;GACV;EAMD,YAAY;GACV,MAAM;GACN,SAAS;GACV;EAKD,WAAW;GACT,MAAM;IAAC;IAAQ;IAAO;IAAO;GAC7B,SAAS;GACV;EAKD,aAAa;GACX,MAAM;IAAC;IAAQ;IAAO;IAAO;GAC7B,SAAS;GACV;EAKD,cAAc;GACZ,MAAM;IAAC;IAAQ;IAAO;IAAO;GAC7B,SAAS;GACV;EAKD,aAAa;GACX,MAAM;IAAC;IAAQ;IAAO;IAAO;GAC7B,SAAS;GACV;EACF;CAED,OAAO,CAAC,QAAQ;CAEhB,UAAU;EACR,YAAa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SAAA,CAAA,CAAA;mBAHhB,CAAR,EAAQ,EAAA,QAAA,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"Toast-DVUE2_fV.js","names":[],"sources":["../components/Toast/Layouts/ToastLayoutDefault.vue","../components/Toast/Layouts/ToastLayoutAlternateIcon.vue","../components/Toast/Layouts/ToastLayoutAlternate.vue","../components/Toast/Toast.vue"],"sourcesContent":["<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n $attrs.class,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"showIcon\"\n :kind=\"kind\"\n :icon-class=\"iconClass\"\n :class=\"{ 'd-notice__icon--has-title': headerText || $slots.header }\"\n v-bind=\"toastListeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :header-id=\"headerId\"\n :content-id=\"contentId\"\n :header-text=\"headerText\"\n :message=\"message\"\n :header-class=\"headerClass\"\n :content-class=\"contentClass\"\n :role=\"role\"\n v-bind=\"toastListeners\"\n >\n <template #header>\n <!-- @slot Slot for the header -->\n <slot name=\"header\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :show-action=\"showAction\"\n :show-close=\"showClose\"\n :action-class=\"actionClass\"\n v-bind=\"toastListeners\"\n @close=\"$emit('close')\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/Notice';\nimport { TOAST_ROLES } from '../ToastConstants.js';\nimport { extractVueListeners } from '@/common/utils/index.js';\n\nexport default {\n name: 'ToastLayoutDefault',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n inheritAttrs: false,\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the header element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the header.\n */\n headerId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Header text of the toast. This can be left blank to remove the header from the toast entirely.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, critical, info, positive, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows the close button in the toast\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the icon in the toast\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the action in the toast\n * @values true, false\n */\n showAction: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the action wrapper element.\n */\n actionClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: ['close'],\n\n computed: {\n kindClass () {\n const kindClasses = {\n critical: 'd-toast--critical',\n info: 'd-toast--info',\n positive: 'd-toast--positive',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n\n toastListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n","<template>\n <div\n aria-hidden=\"true\"\n :class=\"['d-toast-layout-alternate__icon', iconClass]\"\n >\n <slot>\n <component\n :is=\"defaultIcon\"\n v-if=\"defaultIcon\"\n :size=\"size\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n} from '@dialpad/dialtone-icons/vue';\nimport { TOAST_ALTERNATE_KINDS } from '../ToastConstants.js';\nimport { ICON_SIZE_MODIFIERS } from '@/components/Icon/IconConstants.js';\nimport { ordinalSizeValidator } from '@/common/validators';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['positive', DtIconInfo],\n ['warning', DtIconAlertTriangle],\n ['critical', DtIconInfo],\n ['base', DtIconBell],\n ['gradient', DtIconSparkle],\n]);\n\nexport default {\n name: 'DtToastLayoutAlternateIcon',\n\n components: {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, critical, info, positive, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator (kind) {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n size: {\n type: [String, Number],\n default: 400,\n validator: ordinalSizeValidator(ICON_SIZE_MODIFIERS),\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n","<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast-alternate',\n $attrs.class,\n kindClass,\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast-alternate__dialog\">\n <div class=\"d-toast-alternate__header\">\n <dt-toast-layout-alternate-icon\n v-if=\"showIcon\"\n :kind=\"kind\"\n :icon-class=\"iconClass\"\n size=\"200\"\n v-bind=\"toastListeners\"\n >\n <slot name=\"icon\" />\n </dt-toast-layout-alternate-icon>\n <dt-notice-content\n :header-id=\"headerId\"\n :content-id=\"contentId\"\n :header-text=\"headerText\"\n :header-class=\"headerClass\"\n :content-class=\"contentClass\"\n :role=\"role\"\n v-bind=\"toastListeners\"\n >\n <template #header>\n <slot name=\"header\" />\n </template>\n </dt-notice-content>\n\n <!-- Close Button -->\n <dt-notice-action\n :show-action=\"false\"\n :show-close=\"showClose\"\n :action-class=\"actionClass\"\n :button-size=\"100\"\n v-bind=\"toastListeners\"\n @close=\"$emit('close')\"\n />\n </div>\n <!-- Content Section -->\n <div class=\"d-toast-alternate__content\">\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport DtToastLayoutAlternateIcon from './ToastLayoutAlternateIcon.vue';\nimport { DtNoticeAction, DtNoticeContent } from '@/components/Notice';\nimport { TOAST_ROLES, TOAST_ALTERNATE_KINDS } from '../ToastConstants.js';\nimport { extractVueListeners } from '@/common/utils/index.js';\n\nexport default {\n name: 'ToastLayoutAlternate',\n\n components: {\n DtNoticeAction,\n DtNoticeContent,\n DtToastLayoutAlternateIcon,\n },\n\n inheritAttrs: false,\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets an ID on the header element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the header.\n */\n headerId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Header text of the toast. This can be left blank to remove the header from the toast entirely.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, critical, info, positive, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n /**\n * Shows the close button in the toast\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the icon in the toast\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the action wrapper element.\n */\n actionClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n kindClass () {\n const kindClasses = {\n critical: 'd-toast-alternate--critical',\n info: 'd-toast-alternate--info',\n positive: 'd-toast-alternate--positive',\n warning: 'd-toast-alternate--warning',\n gradient: 'd-toast-alternate--gradient',\n };\n\n return kindClasses[this.kind];\n },\n\n toastListeners () {\n return extractVueListeners(this.$attrs);\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"selectedLayout\"\n :is-shown=\"isShown\"\n :header-id=\"headerId\"\n :content-id=\"contentId\"\n :header-text=\"headerText\"\n :message=\"message\"\n :role=\"role\"\n :kind=\"kind\"\n :important=\"important\"\n :show-close=\"showClose\"\n :show-icon=\"showIcon\"\n :show-action=\"showAction\"\n :icon-class=\"iconClass\"\n :header-class=\"headerClass\"\n :content-class=\"contentClass\"\n :action-class=\"actionClass\"\n v-bind=\"$attrs\"\n @close=\"handleClose\"\n >\n <!-- @slot Slot for custom icon -->\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #header>\n <!-- @slot Slot for the header -->\n <slot name=\"header\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot />\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <template #action>\n <slot name=\"action\" />\n </template>\n </component>\n</template>\n\n<script>\nimport { TOAST_MIN_DURATION, TOAST_LAYOUTS } from './ToastConstants.js';\nimport ToastLayoutDefault from './Layouts/ToastLayoutDefault.vue';\nimport ToastLayoutAlternate from './Layouts/ToastLayoutAlternate.vue';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n name: 'DtToast',\n\n components: {\n ToastLayoutDefault,\n ToastLayoutAlternate,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * Sets an ID on the header element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the header.\n */\n headerId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Header text of the toast. This can be left blank to remove the header from the toast entirely.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: undefined,\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n },\n\n /**\n * Severity level of the toast, could be different depending on which toast layout is used.\n * @values base, critical, info, positive, warning, gradient\n */\n kind: {\n type: String,\n default: undefined,\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `v-model` with this prop to update\n * the data in your component.\n * Supports v-model\n * @values true, false\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Shows the close button in the toast.\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the icon in the toast.\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Shows the action in the toast.\n * @values true, false\n */\n showAction: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n\n /**\n * The layout / styling you wish to use for the toast.\n * @values default, alternate\n */\n layout: {\n type: String,\n default: 'default',\n validator: (layout) => {\n return TOAST_LAYOUTS.includes(layout);\n },\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the action wrapper element.\n */\n actionClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync open value\n *\n * @event update:open\n */\n 'update:open',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n\n selectedLayout () {\n return this.layout === 'alternate' ? ToastLayoutAlternate : ToastLayoutDefault;\n },\n },\n\n watch: {\n open: {\n handler: function (open) {\n this.isShown = open;\n if (open) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n unmounted () {\n clearTimeout(this.displayTimer);\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:open', false);\n }, this.duration);\n }\n },\n\n handleClose () {\n this.isShown = false;\n this.$emit('close');\n this.$emit('update:open', false);\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;;AA4DA,IAAK,IAAU;CACb,MAAM;CAEN,YAAY;EACV,cAAA;EACA,iBAAA;EACA,gBAAA;EACD;CAED,cAAc;CAEd,OAAO;EACL,SAAS;GACP,MAAM;GACN,SAAS;GACV;EAMD,UAAU;GACR,MAAM;GACN,UAAW;AAAE,WAAO,EAAM,iBAAiB;;GAC5C;EAMD,WAAW;GACT,MAAM;GACN,UAAW;AAAE,WAAO,EAAM,iBAAiB;;GAC5C;EAKD,YAAY;GACV,MAAM;GACN,SAAS,KAAA;GACV;EAKD,SAAS;GACP,MAAM;GACN,SAAS;GACV;EAOD,MAAM;GACJ,MAAM;GACN,SAAS;GACT,YAAY,MACH,EAAY,SAAS,EAAK;GAEpC;EAMD,MAAM;GACJ,MAAM;GACN,SAAS;GACT,YAAY,MACH,EAAa,SAAS,EAAK;GAErC;EAMD,WAAW;GACT,MAAM;GACN,SAAS;GACV;EAMD,WAAW;GACT,MAAM;GACN,SAAS;GACV;EAMD,UAAU;GACR,MAAM;GACN,SAAS;GACV;EAMD,YAAY;GACV,MAAM;GACN,SAAS;GACV;EAKD,WAAW;GACT,MAAM;IAAC;IAAQ;IAAO;IAAO;GAC7B,SAAS;GACV;EAKD,aAAa;GACX,MAAM;IAAC;IAAQ;IAAO;IAAO;GA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