@dialpad/dialtone-vue 3.223.0-next.3 → 3.223.0-next.4

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 (387) hide show
  1. package/dist/Combobox-CYEmi3dv.cjs +3 -0
  2. package/dist/Combobox-CYEmi3dv.cjs.map +1 -0
  3. package/dist/{Combobox-By01ETlj.js → Combobox-D8nQeBIf.js} +33 -32
  4. package/dist/Combobox-D8nQeBIf.js.map +1 -0
  5. package/dist/TextList-B6XFfQfD.js +88 -0
  6. package/dist/TextList-B6XFfQfD.js.map +1 -0
  7. package/dist/TextList-Dd-ROFiI.cjs +2 -0
  8. package/dist/TextList-Dd-ROFiI.cjs.map +1 -0
  9. package/dist/TextListItem-DIlrCkaM.cjs +2 -0
  10. package/dist/TextListItem-DIlrCkaM.cjs.map +1 -0
  11. package/dist/TextListItem-ImUi_FWh.js +62 -0
  12. package/dist/TextListItem-ImUi_FWh.js.map +1 -0
  13. package/dist/{Toast-CHbVmbBg.js → Toast-BIHkIpZP.js} +95 -94
  14. package/dist/Toast-BIHkIpZP.js.map +1 -0
  15. package/dist/Toast-D8ARDEgT.cjs +2 -0
  16. package/dist/Toast-D8ARDEgT.cjs.map +1 -0
  17. package/dist/{attachment_carousel-BFIAXWOZ.js → attachment_carousel-CyiexPBk.js} +1 -1
  18. package/dist/{attachment_carousel-BFIAXWOZ.js.map → attachment_carousel-CyiexPBk.js.map} +1 -1
  19. package/dist/{attachment_carousel-BJxqNJ5T.cjs → attachment_carousel-DJqILY7f.cjs} +1 -1
  20. package/dist/{attachment_carousel-BJxqNJ5T.cjs.map → attachment_carousel-DJqILY7f.cjs.map} +1 -1
  21. package/dist/common/mixins/input.d.ts +4 -4
  22. package/dist/common/mixins/input_group.d.ts +2 -2
  23. package/dist/common/sr_only_close_button.vue.d.ts +30 -30
  24. package/dist/common/sr_only_close_button.vue.d.ts.map +1 -1
  25. package/dist/common/validators/index.cjs +1 -1
  26. package/dist/common/validators/index.cjs.map +1 -1
  27. package/dist/common/validators/index.d.ts +2 -0
  28. package/dist/common/validators/index.d.ts.map +1 -1
  29. package/dist/common/validators/index.js +9 -2
  30. package/dist/common/validators/index.js.map +1 -1
  31. package/dist/component-documentation.json +1 -1
  32. package/dist/components/Avatar/Avatar.vue.d.ts +10 -10
  33. package/dist/components/Avatar/Avatar.vue.d.ts.map +1 -1
  34. package/dist/components/Badge/Badge.vue.d.ts +13 -13
  35. package/dist/components/Banner/Banner.vue.d.ts +106 -106
  36. package/dist/components/Banner/Banner.vue.d.ts.map +1 -1
  37. package/dist/components/Box/Box.vue.d.ts +18 -0
  38. package/dist/components/Box/Box.vue.d.ts.map +1 -1
  39. package/dist/components/Box/BoxConstants.d.ts +4 -0
  40. package/dist/components/Box/BoxConstants.d.ts.map +1 -1
  41. package/dist/components/Box/Validators.d.ts +4 -0
  42. package/dist/components/Box/Validators.d.ts.map +1 -1
  43. package/dist/components/Box/index.d.ts +1 -1
  44. package/dist/components/Breadcrumbs/BreadcrumbItem.vue.d.ts +1 -0
  45. package/dist/components/Breadcrumbs/BreadcrumbItem.vue.d.ts.map +1 -1
  46. package/dist/components/Breadcrumbs/Breadcrumbs.vue.d.ts +3 -2
  47. package/dist/components/Button/Button.vue.d.ts +25 -25
  48. package/dist/components/Button/Button.vue.d.ts.map +1 -1
  49. package/dist/components/Card/Card.vue.d.ts +6 -6
  50. package/dist/components/Checkbox/Checkbox.vue.d.ts +26 -26
  51. package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
  52. package/dist/components/CheckboxGroup/CheckboxGroup.vue.d.ts +46 -46
  53. package/dist/components/CheckboxGroup/CheckboxGroup.vue.d.ts.map +1 -1
  54. package/dist/components/Chip/Chip.vue.d.ts +40 -40
  55. package/dist/components/Chip/Chip.vue.d.ts.map +1 -1
  56. package/dist/components/Codeblock/Codeblock.vue.d.ts +2 -2
  57. package/dist/components/Collapsible/Collapsible.vue.d.ts +39 -39
  58. package/dist/components/Collapsible/Collapsible.vue.d.ts.map +1 -1
  59. package/dist/components/Combobox/Combobox.vue.d.ts +66 -66
  60. package/dist/components/Combobox/Combobox.vue.d.ts.map +1 -1
  61. package/dist/components/Combobox/ComboboxEmptyList.vue.d.ts +29 -29
  62. package/dist/components/Combobox/ComboboxEmptyList.vue.d.ts.map +1 -1
  63. package/dist/components/Combobox/ComboboxLoadingList.vue.d.ts +35 -35
  64. package/dist/components/Combobox/ComboboxLoadingList.vue.d.ts.map +1 -1
  65. package/dist/components/ComboboxWithPopover/ComboboxWithPopover.vue.d.ts +216 -216
  66. package/dist/components/ComboboxWithPopover/ComboboxWithPopover.vue.d.ts.map +1 -1
  67. package/dist/components/DescriptionList/DescriptionList.vue.d.ts +4 -4
  68. package/dist/components/Dropdown/Dropdown.vue.d.ts +82 -82
  69. package/dist/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
  70. package/dist/components/Emoji/Emoji.vue.d.ts +17 -17
  71. package/dist/components/EmojiPicker/EmojiPicker.vue.d.ts +37 -37
  72. package/dist/components/EmojiPicker/EmojiPicker.vue.d.ts.map +1 -1
  73. package/dist/components/EmojiPicker/Modules/EmojiSearch.vue.d.ts +37 -37
  74. package/dist/components/EmojiPicker/Modules/EmojiSearch.vue.d.ts.map +1 -1
  75. package/dist/components/EmojiTextWrapper/EmojiTextWrapper.vue.d.ts +24 -24
  76. package/dist/components/EmojiTextWrapper/EmojiTextWrapper.vue.d.ts.map +1 -1
  77. package/dist/components/EmptyState/EmptyState.vue.d.ts.map +1 -1
  78. package/dist/components/FilterPill/FilterPill.vue.d.ts +308 -308
  79. package/dist/components/FilterPill/FilterPill.vue.d.ts.map +1 -1
  80. package/dist/components/Hovercard/Hovercard.vue.d.ts +156 -156
  81. package/dist/components/Hovercard/Hovercard.vue.d.ts.map +1 -1
  82. package/dist/components/Icon/Icon.vue.d.ts +7 -7
  83. package/dist/components/ImageViewer/ImageViewer.vue.d.ts +60 -60
  84. package/dist/components/ImageViewer/ImageViewer.vue.d.ts.map +1 -1
  85. package/dist/components/Input/Input.vue.d.ts +37 -37
  86. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  87. package/dist/components/InputGroup/InputGroup.vue.d.ts +46 -46
  88. package/dist/components/InputGroup/InputGroup.vue.d.ts.map +1 -1
  89. package/dist/components/ItemLayout/ItemLayout.vue.d.ts +20 -20
  90. package/dist/components/KeyboardShortcut/KeyboardShortcut.vue.d.ts +80 -80
  91. package/dist/components/KeyboardShortcut/KeyboardShortcut.vue.d.ts.map +1 -1
  92. package/dist/components/Link/Link.vue.d.ts +1 -0
  93. package/dist/components/Link/LinkConstants.d.ts +3 -0
  94. package/dist/components/Link/LinkConstants.d.ts.map +1 -1
  95. package/dist/components/ListItem/ListItem.vue.d.ts +27 -27
  96. package/dist/components/ListItem/ListItem.vue.d.ts.map +1 -1
  97. package/dist/components/ListItemGroup/ListItemGroup.vue.d.ts +4 -4
  98. package/dist/components/Loader/Loader.vue.d.ts +7 -7
  99. package/dist/components/Modal/Modal.vue.d.ts +79 -85
  100. package/dist/components/Modal/Modal.vue.d.ts.map +1 -1
  101. package/dist/components/Modal/ModalConstants.d.ts +0 -5
  102. package/dist/components/Modal/index.d.ts +1 -1
  103. package/dist/components/Notice/Notice.vue.d.ts +106 -106
  104. package/dist/components/Notice/Notice.vue.d.ts.map +1 -1
  105. package/dist/components/Notice/NoticeAction.vue.d.ts +62 -62
  106. package/dist/components/Notice/NoticeAction.vue.d.ts.map +1 -1
  107. package/dist/components/Notice/NoticeContent.vue.d.ts +4 -4
  108. package/dist/components/Notice/NoticeIcon.vue.d.ts +32 -32
  109. package/dist/components/Notice/NoticeIcon.vue.d.ts.map +1 -1
  110. package/dist/components/Pagination/Pagination.vue.d.ts +40 -40
  111. package/dist/components/Pagination/Pagination.vue.d.ts.map +1 -1
  112. package/dist/components/Popover/Popover.vue.d.ts +78 -78
  113. package/dist/components/Popover/Popover.vue.d.ts.map +1 -1
  114. package/dist/components/Popover/PopoverHeaderFooter.vue.d.ts +34 -34
  115. package/dist/components/Popover/PopoverHeaderFooter.vue.d.ts.map +1 -1
  116. package/dist/components/ProgressCircle/ProgressCircle.vue.d.ts +7 -7
  117. package/dist/components/Prose/Prose.vue.d.ts.map +1 -1
  118. package/dist/components/Radio/Radio.vue.d.ts +26 -26
  119. package/dist/components/Radio/Radio.vue.d.ts.map +1 -1
  120. package/dist/components/RadioGroup/RadioGroup.vue.d.ts +46 -46
  121. package/dist/components/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
  122. package/dist/components/RichTextEditor/Extensions/Channels/ChannelComponent.vue.d.ts +6 -5
  123. package/dist/components/RichTextEditor/Extensions/Channels/ChannelComponent.vue.d.ts.map +1 -1
  124. package/dist/components/RichTextEditor/Extensions/Channels/ChannelSuggestion.vue.d.ts +10 -10
  125. package/dist/components/RichTextEditor/Extensions/Channels/ChannelSuggestion.vue.d.ts.map +1 -1
  126. package/dist/components/RichTextEditor/Extensions/Emoji/EmojiComponent.vue.d.ts +17 -17
  127. package/dist/components/RichTextEditor/Extensions/Emoji/EmojiSuggestion.vue.d.ts +17 -17
  128. package/dist/components/RichTextEditor/Extensions/Mentions/MentionComponent.vue.d.ts +1 -0
  129. package/dist/components/RichTextEditor/Extensions/Mentions/MentionSuggestion.vue.d.ts +10 -10
  130. package/dist/components/RichTextEditor/Extensions/Suggestion/SuggestionList.vue.d.ts +27 -27
  131. package/dist/components/RichTextEditor/Extensions/Suggestion/SuggestionList.vue.d.ts.map +1 -1
  132. package/dist/components/RichTextEditor/Extensions/Variable/VariableComponent.vue.d.ts +153 -153
  133. package/dist/components/RichTextEditor/Extensions/Variable/VariableComponent.vue.d.ts.map +1 -1
  134. package/dist/components/RootLayout/RootLayout.vue.d.ts +10 -10
  135. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
  136. package/dist/components/SelectMenu/SelectMenu.vue.d.ts +33 -33
  137. package/dist/components/SelectMenu/SelectMenu.vue.d.ts.map +1 -1
  138. package/dist/components/Skeleton/Skeleton.vue.d.ts +8 -8
  139. package/dist/components/Skeleton/SkeletonListItem.vue.d.ts +4 -4
  140. package/dist/components/Skeleton/SkeletonParagraph.vue.d.ts +2 -2
  141. package/dist/components/Skeleton/SkeletonShape.vue.d.ts +2 -2
  142. package/dist/components/SplitButton/SplitButton.vue.d.ts +157 -157
  143. package/dist/components/SplitButton/SplitButton.vue.d.ts.map +1 -1
  144. package/dist/components/SplitButton/SplitButtonEnd.vue.d.ts +30 -30
  145. package/dist/components/SplitButton/SplitButtonEnd.vue.d.ts.map +1 -1
  146. package/dist/components/SplitButton/SplitButtonStart.vue.d.ts +31 -31
  147. package/dist/components/Tab/Tab.vue.d.ts +33 -33
  148. package/dist/components/Tab/TabGroup.vue.d.ts +6 -6
  149. package/dist/components/Tab/TabPanel.vue.d.ts +2 -2
  150. package/dist/components/TextList/TextList.vue.d.ts +87 -0
  151. package/dist/components/TextList/TextList.vue.d.ts.map +1 -0
  152. package/dist/components/TextList/TextListConstants.d.ts +20 -0
  153. package/dist/components/TextList/TextListConstants.d.ts.map +1 -0
  154. package/dist/components/TextList/TextListItem.vue.d.ts +60 -0
  155. package/dist/components/TextList/TextListItem.vue.d.ts.map +1 -0
  156. package/dist/components/TextList/Validators.d.ts +5 -0
  157. package/dist/components/TextList/Validators.d.ts.map +1 -0
  158. package/dist/components/TextList/index.d.ts +4 -0
  159. package/dist/components/TextList/index.d.ts.map +1 -0
  160. package/dist/components/Toast/Layouts/ToastLayoutAlternate.vue.d.ts +108 -108
  161. package/dist/components/Toast/Layouts/ToastLayoutAlternate.vue.d.ts.map +1 -1
  162. package/dist/components/Toast/Layouts/ToastLayoutAlternateIcon.vue.d.ts +34 -34
  163. package/dist/components/Toast/Layouts/ToastLayoutAlternateIcon.vue.d.ts.map +1 -1
  164. package/dist/components/Toast/Layouts/ToastLayoutDefault.vue.d.ts +106 -106
  165. package/dist/components/Toast/Layouts/ToastLayoutDefault.vue.d.ts.map +1 -1
  166. package/dist/components/Toast/Toast.vue.d.ts +436 -436
  167. package/dist/components/Toast/Toast.vue.d.ts.map +1 -1
  168. package/dist/components/Toggle/Toggle.vue.d.ts +4 -4
  169. package/dist/components/Toggle/Toggle.vue.d.ts.map +1 -1
  170. package/dist/components/Tooltip/Tooltip.vue.d.ts +4 -4
  171. package/dist/components/ValidationMessages/ValidationMessages.vue.d.ts +22 -22
  172. package/dist/components/ValidationMessages/ValidationMessages.vue.d.ts.map +1 -1
  173. package/dist/dialtone-vue.cjs +1 -1
  174. package/dist/dialtone-vue.js +134 -130
  175. package/dist/index.d.ts +1 -0
  176. package/dist/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  177. package/dist/lib/attachment-carousel/attachment-carousel.js +1 -1
  178. package/dist/lib/attachment-carousel/index.cjs +1 -1
  179. package/dist/lib/attachment-carousel/index.js +1 -1
  180. package/dist/lib/avatar/avatar.cjs +1 -1
  181. package/dist/lib/avatar/avatar.cjs.map +1 -1
  182. package/dist/lib/avatar/avatar.js +55 -54
  183. package/dist/lib/avatar/avatar.js.map +1 -1
  184. package/dist/lib/badge/badge.cjs +1 -1
  185. package/dist/lib/badge/badge.cjs.map +1 -1
  186. package/dist/lib/badge/badge.js +36 -35
  187. package/dist/lib/badge/badge.js.map +1 -1
  188. package/dist/lib/box/box-constants.cjs +1 -1
  189. package/dist/lib/box/box-constants.cjs.map +1 -1
  190. package/dist/lib/box/box-constants.js +34 -7
  191. package/dist/lib/box/box-constants.js.map +1 -1
  192. package/dist/lib/box/box.cjs +1 -1
  193. package/dist/lib/box/box.cjs.map +1 -1
  194. package/dist/lib/box/box.js +93 -34
  195. package/dist/lib/box/box.js.map +1 -1
  196. package/dist/lib/box/index.cjs +1 -1
  197. package/dist/lib/box/index.js +3 -3
  198. package/dist/lib/box/validators.cjs +1 -1
  199. package/dist/lib/box/validators.cjs.map +1 -1
  200. package/dist/lib/box/validators.js +4 -4
  201. package/dist/lib/box/validators.js.map +1 -1
  202. package/dist/lib/button/button.cjs +1 -1
  203. package/dist/lib/button/button.cjs.map +1 -1
  204. package/dist/lib/button/button.js +69 -68
  205. package/dist/lib/button/button.js.map +1 -1
  206. package/dist/lib/chip/chip.cjs +1 -1
  207. package/dist/lib/chip/chip.cjs.map +1 -1
  208. package/dist/lib/chip/chip.js +36 -35
  209. package/dist/lib/chip/chip.js.map +1 -1
  210. package/dist/lib/codeblock/codeblock.cjs +1 -1
  211. package/dist/lib/codeblock/codeblock.cjs.map +1 -1
  212. package/dist/lib/codeblock/codeblock.js +11 -10
  213. package/dist/lib/codeblock/codeblock.js.map +1 -1
  214. package/dist/lib/combobox/combobox.cjs +1 -1
  215. package/dist/lib/combobox/combobox.js +1 -1
  216. package/dist/lib/combobox/index.cjs +1 -1
  217. package/dist/lib/combobox/index.js +1 -1
  218. package/dist/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  219. package/dist/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  220. package/dist/lib/combobox-multi-select/combobox-multi-select.js +53 -53
  221. package/dist/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  222. package/dist/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
  223. package/dist/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
  224. package/dist/lib/combobox-with-popover/combobox-with-popover.js +48 -47
  225. package/dist/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
  226. package/dist/lib/editor/editor.cjs +1 -1
  227. package/dist/lib/editor/editor.js +1 -1
  228. package/dist/lib/emoji/emoji.cjs +1 -1
  229. package/dist/lib/emoji/emoji.cjs.map +1 -1
  230. package/dist/lib/emoji/emoji.js +25 -24
  231. package/dist/lib/emoji/emoji.js.map +1 -1
  232. package/dist/lib/emoji-text-wrapper/emoji-text-wrapper.cjs +1 -1
  233. package/dist/lib/emoji-text-wrapper/emoji-text-wrapper.cjs.map +1 -1
  234. package/dist/lib/emoji-text-wrapper/emoji-text-wrapper.js +20 -19
  235. package/dist/lib/emoji-text-wrapper/emoji-text-wrapper.js.map +1 -1
  236. package/dist/lib/empty-state/empty-state.cjs +1 -1
  237. package/dist/lib/empty-state/empty-state.cjs.map +1 -1
  238. package/dist/lib/empty-state/empty-state.js +31 -30
  239. package/dist/lib/empty-state/empty-state.js.map +1 -1
  240. package/dist/lib/filter-pill/filter-pill.cjs +1 -1
  241. package/dist/lib/filter-pill/filter-pill.cjs.map +1 -1
  242. package/dist/lib/filter-pill/filter-pill.js +73 -72
  243. package/dist/lib/filter-pill/filter-pill.js.map +1 -1
  244. package/dist/lib/icon/icon.cjs +1 -1
  245. package/dist/lib/icon/icon.cjs.map +1 -1
  246. package/dist/lib/icon/icon.js +16 -15
  247. package/dist/lib/icon/icon.js.map +1 -1
  248. package/dist/lib/input/input.cjs +1 -1
  249. package/dist/lib/input/input.cjs.map +1 -1
  250. package/dist/lib/input/input.js +64 -63
  251. package/dist/lib/input/input.js.map +1 -1
  252. package/dist/lib/link/link-constants.cjs +1 -1
  253. package/dist/lib/link/link-constants.cjs.map +1 -1
  254. package/dist/lib/link/link-constants.js +11 -9
  255. package/dist/lib/link/link-constants.js.map +1 -1
  256. package/dist/lib/link/link.cjs +1 -1
  257. package/dist/lib/link/link.cjs.map +1 -1
  258. package/dist/lib/link/link.js +17 -14
  259. package/dist/lib/link/link.js.map +1 -1
  260. package/dist/lib/loader/loader.cjs +3 -3
  261. package/dist/lib/loader/loader.cjs.map +1 -1
  262. package/dist/lib/loader/loader.js +21 -20
  263. package/dist/lib/loader/loader.js.map +1 -1
  264. package/dist/lib/message-input/index.cjs +1 -1
  265. package/dist/lib/message-input/index.js +1 -1
  266. package/dist/lib/message-input/message-input.cjs +1 -1
  267. package/dist/lib/message-input/message-input.js +1 -1
  268. package/dist/lib/modal/index.cjs +1 -1
  269. package/dist/lib/modal/index.js +3 -3
  270. package/dist/lib/modal/modal-constants.cjs +1 -1
  271. package/dist/lib/modal/modal-constants.cjs.map +1 -1
  272. package/dist/lib/modal/modal-constants.js +1 -4
  273. package/dist/lib/modal/modal-constants.js.map +1 -1
  274. package/dist/lib/modal/modal.cjs +1 -1
  275. package/dist/lib/modal/modal.cjs.map +1 -1
  276. package/dist/lib/modal/modal.js +40 -42
  277. package/dist/lib/modal/modal.js.map +1 -1
  278. package/dist/lib/progress-circle/progress-circle.cjs +1 -1
  279. package/dist/lib/progress-circle/progress-circle.cjs.map +1 -1
  280. package/dist/lib/progress-circle/progress-circle.js +33 -32
  281. package/dist/lib/progress-circle/progress-circle.js.map +1 -1
  282. package/dist/lib/prose/prose.cjs +1 -1
  283. package/dist/lib/prose/prose.cjs.map +1 -1
  284. package/dist/lib/prose/prose.js +23 -22
  285. package/dist/lib/prose/prose.js.map +1 -1
  286. package/dist/lib/segmented-control/segmented-control.cjs +1 -1
  287. package/dist/lib/segmented-control/segmented-control.cjs.map +1 -1
  288. package/dist/lib/segmented-control/segmented-control.js +42 -41
  289. package/dist/lib/segmented-control/segmented-control.js.map +1 -1
  290. package/dist/lib/select-menu/select-menu.cjs +1 -1
  291. package/dist/lib/select-menu/select-menu.cjs.map +1 -1
  292. package/dist/lib/select-menu/select-menu.js +48 -47
  293. package/dist/lib/select-menu/select-menu.js.map +1 -1
  294. package/dist/lib/split-button/split-button.cjs +1 -1
  295. package/dist/lib/split-button/split-button.cjs.map +1 -1
  296. package/dist/lib/split-button/split-button.js +45 -44
  297. package/dist/lib/split-button/split-button.js.map +1 -1
  298. package/dist/lib/tab/tab-group.cjs +1 -1
  299. package/dist/lib/tab/tab-group.cjs.map +1 -1
  300. package/dist/lib/tab/tab-group.js +34 -35
  301. package/dist/lib/tab/tab-group.js.map +1 -1
  302. package/dist/lib/text-list/index.cjs +1 -0
  303. package/dist/lib/text-list/index.js +4 -0
  304. package/dist/lib/text-list/text-list-constants.cjs +2 -0
  305. package/dist/lib/text-list/text-list-constants.cjs.map +1 -0
  306. package/dist/lib/text-list/text-list-constants.js +31 -0
  307. package/dist/lib/text-list/text-list-constants.js.map +1 -0
  308. package/dist/lib/text-list/text-list-item.cjs +1 -0
  309. package/dist/lib/text-list/text-list-item.js +2 -0
  310. package/dist/lib/text-list/text-list.cjs +1 -0
  311. package/dist/lib/text-list/text-list.js +2 -0
  312. package/dist/lib/text-list/validators.cjs +2 -0
  313. package/dist/lib/text-list/validators.cjs.map +1 -0
  314. package/dist/lib/text-list/validators.js +10 -0
  315. package/dist/lib/text-list/validators.js.map +1 -0
  316. package/dist/lib/toast/index.cjs +1 -1
  317. package/dist/lib/toast/index.js +1 -1
  318. package/dist/lib/toast/toast.cjs +1 -1
  319. package/dist/lib/toast/toast.js +1 -1
  320. package/dist/lib/toggle/toggle.cjs +1 -1
  321. package/dist/lib/toggle/toggle.cjs.map +1 -1
  322. package/dist/lib/toggle/toggle.js +23 -22
  323. package/dist/lib/toggle/toggle.js.map +1 -1
  324. package/dist/{message_input-DOE5NEU9.js → message_input-C6BcWqr8.js} +1 -1
  325. package/dist/{message_input-DOE5NEU9.js.map → message_input-C6BcWqr8.js.map} +1 -1
  326. package/dist/{message_input-DMyIOe4y.cjs → message_input-ftx8f8wC.cjs} +1 -1
  327. package/dist/{message_input-DMyIOe4y.cjs.map → message_input-ftx8f8wC.cjs.map} +1 -1
  328. package/dist/recipes/buttons/callbar_button/callbar_button.vue.d.ts +33 -33
  329. package/dist/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +149 -149
  330. package/dist/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
  331. package/dist/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +147 -147
  332. package/dist/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
  333. package/dist/recipes/cards/ivr_node/ivr_node.vue.d.ts +173 -173
  334. package/dist/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  335. package/dist/recipes/chips/grouped_chip/grouped_chip.vue.d.ts +40 -40
  336. package/dist/recipes/chips/grouped_chip/grouped_chip.vue.d.ts.map +1 -1
  337. package/dist/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +132 -132
  338. package/dist/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  339. package/dist/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +97 -97
  340. package/dist/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -1
  341. package/dist/recipes/conversation_view/editor/EditorToolbarButton.vue.d.ts +25 -25
  342. package/dist/recipes/conversation_view/editor/EditorToolbarDropdownButton.vue.d.ts +107 -107
  343. package/dist/recipes/conversation_view/editor/EditorToolbarDropdownButton.vue.d.ts.map +1 -1
  344. package/dist/recipes/conversation_view/editor/EditorToolbarPopoverButton.vue.d.ts +103 -103
  345. package/dist/recipes/conversation_view/editor/EditorToolbarPopoverButton.vue.d.ts.map +1 -1
  346. package/dist/recipes/conversation_view/editor/editor.vue.d.ts +636 -636
  347. package/dist/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  348. package/dist/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +70 -70
  349. package/dist/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
  350. package/dist/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +66 -66
  351. package/dist/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
  352. package/dist/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +55 -55
  353. package/dist/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  354. package/dist/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +55 -55
  355. package/dist/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
  356. package/dist/recipes/conversation_view/message_input/message_input.vue.d.ts +604 -604
  357. package/dist/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  358. package/dist/recipes/conversation_view/message_input/message_input_button.vue.d.ts +109 -109
  359. package/dist/recipes/conversation_view/message_input/message_input_button.vue.d.ts.map +1 -1
  360. package/dist/recipes/conversation_view/message_input/message_input_link.vue.d.ts +254 -254
  361. package/dist/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
  362. package/dist/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +149 -149
  363. package/dist/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
  364. package/dist/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts +30 -30
  365. package/dist/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts.map +1 -1
  366. package/dist/recipes/item_layout/contact_info/contact_info.vue.d.ts +30 -30
  367. package/dist/recipes/leftbar/callbox/callbox.vue.d.ts +28 -28
  368. package/dist/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
  369. package/dist/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +72 -72
  370. package/dist/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
  371. package/dist/recipes/leftbar/contact_row/contact_row.vue.d.ts +215 -215
  372. package/dist/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  373. package/dist/recipes/leftbar/general_row/general_row.vue.d.ts +176 -176
  374. package/dist/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  375. package/dist/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +80 -80
  376. package/dist/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts.map +1 -1
  377. package/dist/recipes/leftbar/group_row/group_row.vue.d.ts +181 -181
  378. package/dist/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
  379. package/dist/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +10 -10
  380. package/dist/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  381. package/package.json +4 -4
  382. package/dist/Combobox-By01ETlj.js.map +0 -1
  383. package/dist/Combobox-D4hc1-41.cjs +0 -3
  384. package/dist/Combobox-D4hc1-41.cjs.map +0 -1
  385. package/dist/Toast-CHbVmbBg.js.map +0 -1
  386. package/dist/Toast-DX-REYXG.cjs +0 -2
  387. package/dist/Toast-DX-REYXG.cjs.map +0 -1
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/constants/index.cjs`),t=require(`../../common/utils/index.cjs`),n=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),r=require(`../../common/mixins/mode.cjs`),i=require(`../notice/notice-constants.cjs`),a=require(`../text/text.cjs`),o=require(`../../localization/index.cjs`),s=require(`../button/button.cjs`),c=require(`../../shared/sr_only_close_button.cjs`),l=require(`./modal-constants.cjs`);let u=require(`vue`),d=require(`@dialpad/dialtone-icons/vue`);var f=`button:not(:disabled),[href],input:not(:disabled),select:not(:disabled),textarea:not(:disabled),details,[tabindex]:not([tabindex="-1"]):not(:disabled):not([aria-disabled="true"])`,p={name:`DtModal`,components:{DtButton:s.default,DtText:a.default,DtIconClose:d.DtIconClose,SrOnlyCloseButton:c.default},mixins:[r.default],props:{copy:{type:String,default:``},describedById:{type:String,default:``},labelledById:{type:String,default:function(){return t.getUniqueString()}},open:{type:Boolean,default:!1},headerText:{type:String,default:void 0},bannerHeaderText:{type:String,default:void 0},kind:{type:String,default:`default`,validator:e=>Object.keys(l.MODAL_KIND_MODIFIERS).includes(e)},size:{type:String,default:`default`,validator:e=>Object.keys(l.MODAL_SIZE_MODIFIERS).includes(e)},modalClass:{type:[String,Object,Array],default:``},dialogClass:{type:[String,Object,Array],default:``},contentClass:{type:[String,Object,Array],default:``},bannerKind:{type:String,default:`warning`,validator(e){return i.NOTICE_KINDS.includes(e)}},bannerClass:{type:[String,Object,Array],default:``},headerClass:{type:[String,Object,Array],default:``},footerClass:{type:[String,Object,Array],default:``},showClose:{type:Boolean,default:!0},closeOnClick:{type:Boolean,default:!0},fixedHeaderFooter:{type:Boolean,default:!0},initialFocusElement:{type:[String,e.HTML_ELEMENT_TYPE],default:`first`,validator:e=>e===`first`||e instanceof HTMLElement||e.startsWith(`#`)},appendTo:{type:String,default:void 0},transparentBackdrop:{type:Boolean,default:!1}},emits:[`click`,`keydown`,`update:open`],data(){return{MODAL_KIND_MODIFIERS:l.MODAL_KIND_MODIFIERS,MODAL_SIZE_MODIFIERS:l.MODAL_SIZE_MODIFIERS,MODAL_BANNER_KINDS:l.MODAL_BANNER_KINDS,hasSlotContent:t.hasSlotContent,i18n:new o.DialtoneLocalization,autoTeleportTarget:null}},computed:{hasFooterSlot(){return!!this.$slots.footer},bannerKindClass(){return l.MODAL_BANNER_KINDS[this.bannerKind]},closeButtonTitle(){return this.i18n.$t(`DIALTONE_CLOSE_BUTTON`)}},watch:{open(e){this.syncDialogState(e)}},mounted(){if(!this.appendTo){let e=this.$el?.getRootNode();if(e instanceof ShadowRoot){this.autoTeleportTarget=e,this.open&&this.$nextTick(()=>{this.open&&this.syncDialogState(!0)});return}}this.open&&this.syncDialogState(!0)},beforeUnmount(){let e=this.$refs.dialogEl;e?.open&&(e.close(),t.enableRootScrolling(this.getScrollRoot())),this.previousActiveElement=null},methods:{getScrollRoot(){return t.returnFirstEl(this.$refs.dialogEl)?.getRootNode()?.host},syncDialogState(e){let n=this.$refs.dialogEl;n&&(e?(this.previousActiveElement=document.activeElement,n.open||n.showModal(),t.disableRootScrolling(this.getScrollRoot())):n.open&&t.enableRootScrolling(this.getScrollRoot()))},close(){this.$emit(`update:open`,!1)},onBackdropClick(e){this.closeOnClick&&e.target===e.currentTarget&&this.close(),this.$emit(`click`,e)},onKeydown(e){this.$emit(`keydown`,e)},async onAfterEnter(){this.$emit(`update:open`,!0),await this.setFocusAfterTransition()},onAfterLeave(){let e=this.$refs.dialogEl;e?.open&&e.close(),this.previousActiveElement?.focus(),this.previousActiveElement=null},focusFirstTabbable(e){let t=[...e.querySelectorAll(f)];if(!t.length)return;let n=t[0];n.matches(`[type="radio"]:not(:checked)`)&&(n=t.find(e=>e.checked&&e.name===n.name)||n),n.focus({preventScroll:!0})},async setFocusAfterTransition(){let e=this.$refs.dialogEl;if(e)if(await this.$nextTick(),this.initialFocusElement===`first`)this.focusFirstTabbable(e);else if(typeof this.initialFocusElement==`string`&&this.initialFocusElement.startsWith(`#`)){let t=e.querySelector(this.initialFocusElement);t?t.focus():(console.warn(`Could not find the element specified in dt-modal prop "initialFocusElement". Defaulting to focusing the first element.`),this.focusFirstTabbable(e))}else this.initialFocusElement instanceof HTMLElement&&this.initialFocusElement.focus()}}},m=[`aria-describedby`,`aria-labelledby`],h=[`id`];function g(e,t,n,r,i,a){let o=(0,u.resolveComponent)(`dt-text`),s=(0,u.resolveComponent)(`sr-only-close-button`),c=(0,u.resolveComponent)(`dt-icon-close`),l=(0,u.resolveComponent)(`dt-button`),d=(0,u.resolveDirective)(`dt-focustrap`);return(0,u.openBlock)(),(0,u.createBlock)(u.Teleport,{disabled:!n.appendTo&&!i.autoTeleportTarget,to:n.appendTo||i.autoTeleportTarget},[(0,u.withDirectives)(((0,u.openBlock)(),(0,u.createElementBlock)(`dialog`,(0,u.mergeProps)({ref:`dialogEl`,class:[`d-modal`,i.MODAL_KIND_MODIFIERS[n.kind],i.MODAL_SIZE_MODIFIERS[n.size],{"d-modal--transparent-backdrop":n.transparentBackdrop},n.modalClass],"data-qa":`dt-modal`,"aria-describedby":n.describedById||void 0,"aria-labelledby":n.labelledById},e.modeAttrs,{onCancel:t[0]||(t[0]=(0,u.withModifiers)((...e)=>a.close&&a.close(...e),[`prevent`])),onClick:t[1]||(t[1]=(...e)=>a.onBackdropClick&&a.onBackdropClick(...e)),onKeydown:t[2]||(t[2]=(...e)=>a.onKeydown&&a.onKeydown(...e))}),[n.open&&(i.hasSlotContent(e.$slots.banner)||n.bannerHeaderText)?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:0,"data-qa":`dt-modal-banner`,class:(0,u.normalizeClass)([`d-modal__banner`,n.bannerClass,a.bannerKindClass])},[(0,u.renderSlot)(e.$slots,`banner`,{},()=>[(0,u.createTextVNode)((0,u.toDisplayString)(n.bannerHeaderText),1)])],2)):(0,u.createCommentVNode)(``,!0),(0,u.createVNode)(u.Transition,{appear:n.open,name:`d-modal__dialog`,onAfterEnter:a.onAfterEnter,onAfterLeave:a.onAfterLeave},{default:(0,u.withCtx)(()=>[(0,u.withDirectives)((0,u.createElementVNode)(`div`,{class:(0,u.normalizeClass)([`d-modal__dialog`,{"d-modal__dialog--scrollable":n.fixedHeaderFooter},n.dialogClass])},[i.hasSlotContent(e.$slots.header)?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:0,id:n.labelledById,class:(0,u.normalizeClass)([`d-modal__header`,n.headerClass]),"data-qa":`dt-modal-title`},[(0,u.renderSlot)(e.$slots,`header`)],10,h)):((0,u.openBlock)(),(0,u.createBlock)(o,{key:1,id:n.labelledById,kind:`headline`,size:600,strength:`medium`,density:`100`,"text-box-trim":`start`,as:`h2`,class:(0,u.normalizeClass)([`d-modal__header`,n.headerClass]),"data-qa":`dt-modal-title`},{default:(0,u.withCtx)(()=>[(0,u.createTextVNode)((0,u.toDisplayString)(n.headerText),1)]),_:1},8,[`id`,`class`])),i.hasSlotContent(e.$slots.default)?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:2,class:(0,u.normalizeClass)([`d-modal__content`,n.contentClass]),"data-qa":`dt-modal-copy`},[(0,u.renderSlot)(e.$slots,`default`)],2)):((0,u.openBlock)(),(0,u.createElementBlock)(`p`,{key:3,class:(0,u.normalizeClass)([`d-modal__content`,n.contentClass]),"data-qa":`dt-modal-copy`},(0,u.toDisplayString)(n.copy),3)),a.hasFooterSlot?((0,u.openBlock)(),(0,u.createElementBlock)(`footer`,{key:4,class:(0,u.normalizeClass)([`d-modal__footer`,n.footerClass])},[(0,u.renderSlot)(e.$slots,`footer`)],2)):(0,u.createCommentVNode)(``,!0),n.showClose?((0,u.openBlock)(),(0,u.createBlock)(l,{key:6,class:`d-modal__close`,"data-qa":`dt-modal-close-button`,size:300,kind:`muted`,importance:`clear`,"aria-label":a.closeButtonTitle,title:a.closeButtonTitle,onClick:a.close},{icon:(0,u.withCtx)(({iconSize:e})=>[(0,u.createVNode)(c,{size:e},null,8,[`size`])]),_:1},8,[`aria-label`,`title`,`onClick`])):((0,u.openBlock)(),(0,u.createBlock)(s,{key:5,onClose:a.close},null,8,[`onClose`]))],2),[[u.vShow,n.open]])]),_:3},8,[`appear`,`onAfterEnter`,`onAfterLeave`])],16,m)),[[d,{active:n.open,initialFocus:!1,restoreFocus:!1}]])],8,[`disabled`,`to`])}var _=n.t(p,[[`render`,g]]);exports.default=_;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/constants/index.cjs`),t=require(`../../common/utils/index.cjs`),n=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),r=require(`../../common/mixins/mode.cjs`),i=require(`../notice/notice-constants.cjs`),a=require(`../text/text.cjs`),o=require(`../../localization/index.cjs`),s=require(`../button/button.cjs`),c=require(`../../shared/sr_only_close_button.cjs`),l=require(`./modal-constants.cjs`);let u=require(`vue`),d=require(`@dialpad/dialtone-icons/vue`);var f=`button:not(:disabled),[href],input:not(:disabled),select:not(:disabled),textarea:not(:disabled),details,[tabindex]:not([tabindex="-1"]):not(:disabled):not([aria-disabled="true"])`,p={name:`DtModal`,components:{DtButton:s.default,DtText:a.default,DtIconClose:d.DtIconClose,SrOnlyCloseButton:c.default},mixins:[r.default],props:{copy:{type:String,default:``},describedById:{type:String,default:``},labelledById:{type:String,default:function(){return t.getUniqueString()}},open:{type:Boolean,default:!1},headerText:{type:String,default:void 0},bannerHeaderText:{type:String,default:void 0},kind:{type:String,default:`default`,validator:e=>Object.keys(l.MODAL_KIND_MODIFIERS).includes(e)},fullscreen:{type:Boolean,default:!1},modalClass:{type:[String,Object,Array],default:``},dialogClass:{type:[String,Object,Array],default:``},contentClass:{type:[String,Object,Array],default:``},bannerKind:{type:String,default:`warning`,validator(e){return i.NOTICE_KINDS.includes(e)}},bannerClass:{type:[String,Object,Array],default:``},headerClass:{type:[String,Object,Array],default:``},footerClass:{type:[String,Object,Array],default:``},showClose:{type:Boolean,default:!0},closeOnClick:{type:Boolean,default:!0},fixedHeaderFooter:{type:Boolean,default:!0},initialFocusElement:{type:[String,e.HTML_ELEMENT_TYPE],default:`first`,validator:e=>e===`first`||e instanceof HTMLElement||e.startsWith(`#`)},appendTo:{type:String,default:void 0},transparentBackdrop:{type:Boolean,default:!1}},emits:[`click`,`keydown`,`update:open`],data(){return{MODAL_KIND_MODIFIERS:l.MODAL_KIND_MODIFIERS,MODAL_BANNER_KINDS:l.MODAL_BANNER_KINDS,hasSlotContent:t.hasSlotContent,i18n:new o.DialtoneLocalization,autoTeleportTarget:null}},computed:{hasFooterSlot(){return!!this.$slots.footer},bannerKindClass(){return l.MODAL_BANNER_KINDS[this.bannerKind]},closeButtonTitle(){return this.i18n.$t(`DIALTONE_CLOSE_BUTTON`)}},watch:{open(e){this.syncDialogState(e)}},mounted(){if(!this.appendTo){let e=this.$el?.getRootNode();if(e instanceof ShadowRoot){this.autoTeleportTarget=e,this.open&&this.$nextTick(()=>{this.open&&this.syncDialogState(!0)});return}}this.open&&this.syncDialogState(!0)},beforeUnmount(){let e=this.$refs.dialogEl;e?.open&&(e.close(),t.enableRootScrolling(this.getScrollRoot())),this.previousActiveElement=null},methods:{getScrollRoot(){return t.returnFirstEl(this.$refs.dialogEl)?.getRootNode()?.host},syncDialogState(e){let n=this.$refs.dialogEl;n&&(e?(this.previousActiveElement=document.activeElement,n.open||n.showModal(),t.disableRootScrolling(this.getScrollRoot())):n.open&&t.enableRootScrolling(this.getScrollRoot()))},close(){this.$emit(`update:open`,!1)},onBackdropClick(e){this.closeOnClick&&e.target===e.currentTarget&&this.close(),this.$emit(`click`,e)},onKeydown(e){this.$emit(`keydown`,e)},async onAfterEnter(){this.$emit(`update:open`,!0),await this.setFocusAfterTransition()},onAfterLeave(){let e=this.$refs.dialogEl;e?.open&&e.close(),this.previousActiveElement?.focus(),this.previousActiveElement=null},focusFirstTabbable(e){let t=[...e.querySelectorAll(f)];if(!t.length)return;let n=t[0];n.matches(`[type="radio"]:not(:checked)`)&&(n=t.find(e=>e.checked&&e.name===n.name)||n),n.focus({preventScroll:!0})},async setFocusAfterTransition(){let e=this.$refs.dialogEl;if(e)if(await this.$nextTick(),this.initialFocusElement===`first`)this.focusFirstTabbable(e);else if(typeof this.initialFocusElement==`string`&&this.initialFocusElement.startsWith(`#`)){let t=e.querySelector(this.initialFocusElement);t?t.focus():(console.warn(`Could not find the element specified in dt-modal prop "initialFocusElement". Defaulting to focusing the first element.`),this.focusFirstTabbable(e))}else this.initialFocusElement instanceof HTMLElement&&this.initialFocusElement.focus()}}},m=[`aria-describedby`,`aria-labelledby`],h=[`id`];function g(e,t,n,r,i,a){let o=(0,u.resolveComponent)(`dt-text`),s=(0,u.resolveComponent)(`sr-only-close-button`),c=(0,u.resolveComponent)(`dt-icon-close`),l=(0,u.resolveComponent)(`dt-button`),d=(0,u.resolveDirective)(`dt-focustrap`);return(0,u.openBlock)(),(0,u.createBlock)(u.Teleport,{disabled:!n.appendTo&&!i.autoTeleportTarget,to:n.appendTo||i.autoTeleportTarget},[(0,u.withDirectives)(((0,u.openBlock)(),(0,u.createElementBlock)(`dialog`,(0,u.mergeProps)({ref:`dialogEl`,class:[`d-modal`,i.MODAL_KIND_MODIFIERS[n.kind],{"d-modal--full":n.fullscreen},{"d-modal--transparent-backdrop":n.transparentBackdrop},n.modalClass],"data-qa":`dt-modal`,"aria-describedby":n.describedById||void 0,"aria-labelledby":n.labelledById},e.modeAttrs,{onCancel:t[0]||(t[0]=(0,u.withModifiers)((...e)=>a.close&&a.close(...e),[`prevent`])),onClick:t[1]||(t[1]=(...e)=>a.onBackdropClick&&a.onBackdropClick(...e)),onKeydown:t[2]||(t[2]=(...e)=>a.onKeydown&&a.onKeydown(...e))}),[n.open&&(i.hasSlotContent(e.$slots.banner)||n.bannerHeaderText)?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:0,"data-qa":`dt-modal-banner`,class:(0,u.normalizeClass)([`d-modal__banner`,n.bannerClass,a.bannerKindClass])},[(0,u.renderSlot)(e.$slots,`banner`,{},()=>[(0,u.createTextVNode)((0,u.toDisplayString)(n.bannerHeaderText),1)])],2)):(0,u.createCommentVNode)(``,!0),(0,u.createVNode)(u.Transition,{appear:n.open,name:`d-modal__dialog`,onAfterEnter:a.onAfterEnter,onAfterLeave:a.onAfterLeave},{default:(0,u.withCtx)(()=>[(0,u.withDirectives)((0,u.createElementVNode)(`div`,{class:(0,u.normalizeClass)([`d-modal__dialog`,{"d-modal__dialog--scrollable":n.fixedHeaderFooter},n.dialogClass])},[i.hasSlotContent(e.$slots.header)?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:0,id:n.labelledById,class:(0,u.normalizeClass)([`d-modal__header`,n.headerClass]),"data-qa":`dt-modal-title`},[(0,u.renderSlot)(e.$slots,`header`)],10,h)):((0,u.openBlock)(),(0,u.createBlock)(o,{key:1,id:n.labelledById,kind:`headline`,size:600,strength:`medium`,density:`100`,"text-box-trim":`start`,as:`h2`,class:(0,u.normalizeClass)([`d-modal__header`,n.headerClass]),"data-qa":`dt-modal-title`},{default:(0,u.withCtx)(()=>[(0,u.createTextVNode)((0,u.toDisplayString)(n.headerText),1)]),_:1},8,[`id`,`class`])),i.hasSlotContent(e.$slots.default)?((0,u.openBlock)(),(0,u.createElementBlock)(`div`,{key:2,class:(0,u.normalizeClass)([`d-modal__content`,n.contentClass]),"data-qa":`dt-modal-copy`},[(0,u.renderSlot)(e.$slots,`default`)],2)):((0,u.openBlock)(),(0,u.createElementBlock)(`p`,{key:3,class:(0,u.normalizeClass)([`d-modal__content`,n.contentClass]),"data-qa":`dt-modal-copy`},(0,u.toDisplayString)(n.copy),3)),a.hasFooterSlot?((0,u.openBlock)(),(0,u.createElementBlock)(`footer`,{key:4,class:(0,u.normalizeClass)([`d-modal__footer`,n.footerClass])},[(0,u.renderSlot)(e.$slots,`footer`)],2)):(0,u.createCommentVNode)(``,!0),n.showClose?((0,u.openBlock)(),(0,u.createBlock)(l,{key:6,class:`d-modal__close`,"data-qa":`dt-modal-close-button`,size:300,kind:`muted`,importance:`clear`,"aria-label":a.closeButtonTitle,title:a.closeButtonTitle,onClick:a.close},{icon:(0,u.withCtx)(({iconSize:e})=>[(0,u.createVNode)(c,{size:e},null,8,[`size`])]),_:1},8,[`aria-label`,`title`,`onClick`])):((0,u.openBlock)(),(0,u.createBlock)(s,{key:5,onClose:a.close},null,8,[`onClose`]))],2),[[u.vShow,n.open]])]),_:3},8,[`appear`,`onAfterEnter`,`onAfterLeave`])],16,m)),[[d,{active:n.open,initialFocus:!1,restoreFocus:!1}]])],8,[`disabled`,`to`])}var _=n.t(p,[[`render`,g]]);exports.default=_;
2
2
  //# sourceMappingURL=modal.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal.cjs","names":[],"sources":["../../../components/Modal/Modal.vue"],"sourcesContent":["<template>\n <teleport\n :disabled=\"!appendTo && !autoTeleportTarget\"\n :to=\"appendTo || autoTeleportTarget\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <dialog\n ref=\"dialogEl\"\n v-dt-focustrap=\"{ active: open, initialFocus: false, restoreFocus: false }\"\n :class=\"[\n 'd-modal',\n MODAL_KIND_MODIFIERS[kind],\n MODAL_SIZE_MODIFIERS[size],\n { 'd-modal--transparent-backdrop': transparentBackdrop },\n modalClass,\n ]\"\n data-qa=\"dt-modal\"\n :aria-describedby=\"describedById || undefined\"\n :aria-labelledby=\"labelledById\"\n v-bind=\"modeAttrs\"\n @cancel.prevent=\"close\"\n @click=\"onBackdropClick\"\n @keydown=\"onKeydown\"\n >\n <div\n v-if=\"open && (hasSlotContent($slots.banner) || bannerHeaderText)\"\n data-qa=\"dt-modal-banner\"\n :class=\"[\n 'd-modal__banner',\n bannerClass,\n bannerKindClass,\n ]\"\n >\n <!-- @slot Slot for the banner, defaults to bannerHeaderText prop -->\n <slot name=\"banner\">\n {{ bannerHeaderText }}\n </slot>\n </div>\n <transition\n :appear=\"open\"\n name=\"d-modal__dialog\"\n @after-enter=\"onAfterEnter\"\n @after-leave=\"onAfterLeave\"\n >\n <div\n v-show=\"open\"\n :class=\"[\n 'd-modal__dialog',\n { 'd-modal__dialog--scrollable': fixedHeaderFooter },\n dialogClass,\n ]\"\n >\n <div\n v-if=\"hasSlotContent($slots.header)\"\n :id=\"labelledById\"\n :class=\"['d-modal__header', headerClass]\"\n data-qa=\"dt-modal-title\"\n >\n <!-- @slot Slot for dialog header section, taking the place of any \"headerText\" text prop -->\n <slot name=\"header\" />\n </div>\n <dt-text\n v-else\n :id=\"labelledById\"\n kind=\"headline\"\n :size=\"600\"\n strength=\"medium\"\n density=\"100\"\n text-box-trim=\"start\"\n as=\"h2\"\n :class=\"['d-modal__header', headerClass]\"\n data-qa=\"dt-modal-title\"\n >\n {{ headerText }}\n </dt-text>\n <div\n v-if=\"hasSlotContent($slots.default)\"\n :class=\"[\n 'd-modal__content',\n contentClass,\n ]\"\n data-qa=\"dt-modal-copy\"\n >\n <!-- @slot Default slot for dialog body section, taking the place of any \"copy\" text prop -->\n <slot />\n </div>\n <p\n v-else\n :class=\"[\n 'd-modal__content',\n contentClass,\n ]\"\n data-qa=\"dt-modal-copy\"\n >\n {{ copy }}\n </p>\n <footer\n v-if=\"hasFooterSlot\"\n :class=\"['d-modal__footer', footerClass]\"\n >\n <!-- @slot Slot for dialog footer content, often containing cancel and confirm buttons. -->\n <slot name=\"footer\" />\n </footer>\n <sr-only-close-button\n v-if=\"!showClose\"\n @close=\"close\"\n />\n <dt-button\n v-else\n class=\"d-modal__close\"\n data-qa=\"dt-modal-close-button\"\n :size=\"300\"\n kind=\"muted\"\n importance=\"clear\"\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"close\"\n >\n <template #icon=\"{ iconSize }\">\n <dt-icon-close\n :size=\"iconSize\"\n />\n </template>\n </dt-button>\n </div>\n </transition>\n </dialog>\n </teleport>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { DtButton } from '@/components/Button';\nimport { DtText } from '@/components/Text';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue';\nimport ModeMixin from '@/common/mixins/mode';\nimport {\n MODAL_BANNER_KINDS,\n MODAL_KIND_MODIFIERS,\n MODAL_SIZE_MODIFIERS,\n} from './ModalConstants';\nimport { getUniqueString, hasSlotContent, returnFirstEl, disableRootScrolling, enableRootScrolling } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\nimport { NOTICE_KINDS } from '@/components/Notice';\nimport { DialtoneLocalization } from '@/localization';\n\nconst focusableSelector = 'button:not(:disabled),[href],input:not(:disabled),select:not(:disabled),' +\n 'textarea:not(:disabled),details,[tabindex]:not([tabindex=\"-1\"]):not(:disabled):not([aria-disabled=\"true\"])';\n\n/**\n * Modals focus the user's attention exclusively on one task or piece of information\n * via a window that sits on top of the page content.\n * @see https://dialtone.dialpad.com/components/modal.html\n */\nexport default {\n name: 'DtModal',\n\n components: {\n DtButton,\n DtText,\n DtIconClose,\n SrOnlyCloseButton,\n },\n\n mixins: [ModeMixin],\n\n props: {\n /**\n * Body text to display as the modal's main content.\n */\n copy: {\n type: String,\n default: '',\n },\n\n /**\n * Id to use for the dialog's aria-describedby.\n * Recommended only if the dialog content itself isn't enough to give full context,\n * as screen readers should recite the dialog contents by default before any aria-description.\n */\n describedById: {\n type: String,\n default: '',\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n labelledById: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Whether the modal should be shown.\n * Parent component can sync on this value to control the modal's visibility.\n * @values true, false\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Header text to display in the modal header.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Header text to display in the modal banner.\n */\n bannerHeaderText: {\n type: String,\n default: undefined,\n },\n\n /**\n * The theme of the modal.\n * @values default, critical\n */\n kind: {\n type: String,\n default: 'default',\n validator: (k) => Object.keys(MODAL_KIND_MODIFIERS).includes(k),\n },\n\n /**\n * The size of the modal. size - default or full,\n * @values default, full\n */\n size: {\n type: String,\n default: 'default',\n validator: (s) => Object.keys(MODAL_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Additional class name for the root modal element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n modalClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n dialogClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the content element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Sets the color of the banner.\n * @values base, critical, info, positive, warning\n */\n bannerKind: {\n type: String,\n default: 'warning',\n validator (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Additional class name for the banner element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n bannerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the header element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n headerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the footer element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n footerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Shows the close button on the modal\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the modal will close when you click outside of the dialog on the overlay.\n * @values true, false\n */\n closeOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Scrollable modal that allows scroll the modal content keeping the header and footer fixed\n * @values true, false\n */\n fixedHeaderFooter: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The element that is focused when the modal is opened. This can be an\n * HTMLElement within the modal, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'first',\n validator: initialFocusElement => {\n return initialFocusElement === 'first' ||\n (initialFocusElement instanceof HTMLElement) ||\n initialFocusElement.startsWith('#');\n },\n },\n\n /**\n * A CSS selector string for the element to portal the modal to. If not provided, the modal will be rendered in its default location.\n */\n appendTo: {\n type: String,\n default: undefined,\n },\n\n /**\n * When true, the surrounding backdrop is rendered fully transparent\n * instead of the default dimming overlay. The dialog box itself\n * remains opaque. Useful when the underlying UI should remain visible.\n * @values true, false\n */\n transparentBackdrop: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native button click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * The modal will emit a \"false\" boolean value for this event when the user performs a modal-closing action.\n * Parent components can sync on this value to create a 2-way binding to control modal visibility.\n *\n * @event update:open\n * @type {Boolean}\n */\n 'update:open',\n ],\n\n data () {\n return {\n MODAL_KIND_MODIFIERS,\n MODAL_SIZE_MODIFIERS,\n MODAL_BANNER_KINDS,\n hasSlotContent,\n i18n: new DialtoneLocalization(),\n autoTeleportTarget: null,\n };\n },\n\n computed: {\n hasFooterSlot () {\n return !!this.$slots.footer;\n },\n\n bannerKindClass () {\n return MODAL_BANNER_KINDS[this.bannerKind];\n },\n\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n watch: {\n open (isShowing) {\n this.syncDialogState(isShowing);\n },\n },\n\n mounted () {\n if (!this.appendTo) {\n const root = this.$el?.getRootNode();\n if (root instanceof ShadowRoot) {\n this.autoTeleportTarget = root;\n // Defer syncDialogState so the teleport renders inside the shadow root first.\n if (this.open) this.$nextTick(() => { if (this.open) this.syncDialogState(true); });\n return;\n }\n }\n if (this.open) {\n this.syncDialogState(true);\n }\n },\n\n beforeUnmount () {\n const dialogEl = this.$refs.dialogEl;\n if (dialogEl?.open) {\n dialogEl.close();\n enableRootScrolling(this.getScrollRoot());\n }\n this.previousActiveElement = null;\n },\n\n methods: {\n getScrollRoot () {\n return returnFirstEl(this.$refs.dialogEl)?.getRootNode()?.host;\n },\n\n syncDialogState (isShowing) {\n const dialogEl = this.$refs.dialogEl;\n if (!dialogEl) return;\n\n if (isShowing) {\n this.previousActiveElement = document.activeElement;\n if (!dialogEl.open) {\n dialogEl.showModal();\n }\n disableRootScrolling(this.getScrollRoot());\n } else if (dialogEl.open) {\n // Leave transition plays via v-show on inner content.\n // close() is called in onAfterLeave when transition completes.\n enableRootScrolling(this.getScrollRoot());\n }\n },\n\n close () {\n this.$emit('update:open', false);\n },\n\n onBackdropClick (event) {\n if (this.closeOnClick && event.target === event.currentTarget) {\n this.close();\n }\n this.$emit('click', event);\n },\n\n onKeydown (event) {\n this.$emit('keydown', event);\n },\n\n async onAfterEnter () {\n this.$emit('update:open', true);\n await this.setFocusAfterTransition();\n },\n\n onAfterLeave () {\n const dialogEl = this.$refs.dialogEl;\n if (dialogEl?.open) {\n dialogEl.close();\n }\n this.previousActiveElement?.focus();\n this.previousActiveElement = null;\n },\n\n focusFirstTabbable (container) {\n const focusable = [...container.querySelectorAll(focusableSelector)];\n if (!focusable.length) return;\n let target = focusable[0];\n // If first focusable is an unchecked radio, prefer the checked radio in the same group.\n if (target.matches('[type=\"radio\"]:not(:checked)')) {\n target = focusable.find(el => el.checked && el.name === target.name) || target;\n }\n target.focus({ preventScroll: true });\n },\n\n async setFocusAfterTransition () {\n const dialogEl = this.$refs.dialogEl;\n if (!dialogEl) return;\n\n await this.$nextTick();\n\n if (this.initialFocusElement === 'first') {\n this.focusFirstTabbable(dialogEl);\n } else if (typeof this.initialFocusElement === 'string' && this.initialFocusElement.startsWith('#')) {\n const el = dialogEl.querySelector(this.initialFocusElement);\n if (el) {\n el.focus();\n } else {\n // eslint-disable-next-line no-console\n console.warn('Could not find the element specified in dt-modal prop \"initialFocusElement\". ' +\n 'Defaulting to focusing the first element.');\n this.focusFirstTabbable(dialogEl);\n }\n } else if (this.initialFocusElement instanceof HTMLElement) {\n this.initialFocusElement.focus();\n }\n },\n },\n};\n</script>\n"],"mappings":"+mBAmJA,IAAM,EAAoB,qLAQrB,EAAU,CACb,KAAM,UAEN,WAAY,CACV,SAAA,EAAA,QACA,OAAA,EAAA,QACA,YAAA,EAAA,YACA,kBAAA,EAAA,QACD,CAED,OAAQ,CAAC,EAAA,QAAU,CAEnB,MAAO,CAIL,KAAM,CACJ,KAAM,OACN,QAAS,GACV,CAOD,cAAe,CACb,KAAM,OACN,QAAS,GACV,CAKD,aAAc,CACZ,KAAM,OACN,QAAS,UAAY,CAAE,OAAO,EAAA,iBAAiB,EAChD,CAOD,KAAM,CACJ,KAAM,QACN,QAAS,GACV,CAKD,WAAY,CACV,KAAM,OACN,QAAS,IAAA,GACV,CAKD,iBAAkB,CAChB,KAAM,OACN,QAAS,IAAA,GACV,CAMD,KAAM,CACJ,KAAM,OACN,QAAS,UACT,UAAY,GAAM,OAAO,KAAK,EAAA,qBAAqB,CAAC,SAAS,EAAE,CAChE,CAMD,KAAM,CACJ,KAAM,OACN,QAAS,UACT,UAAY,GAAM,OAAO,KAAK,EAAA,qBAAqB,CAAC,SAAS,EAAE,CAChE,CAOD,WAAY,CACV,KAAM,CAAC,OAAQ,OAAQ,MAAM,CAC7B,QAAS,GACV,CAOD,YAAa,CACX,KAAM,CAAC,OAAQ,OAAQ,MAAM,CAC7B,QAAS,GACV,CAOD,aAAc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AAA,CAI1D,UAAQ,uCAEL,EAAA,KAAI,CAAA,EAAA,EAGD,EAAA,gBAAA,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,oBAKC,SAAA,OAJN,OAAA,EAAA,EAAA,gBAAK,CAAA,kBAAsB,EAAA,YAAW,CAAA,oBAGjB,EAAA,OAAA,SAAA,CAAA,CAAA,EAAA,GAAA,EAAA,EAAA,oBAAA,GAAA,GAAA,CAGf,EAAA,+CAmBG,EAAA,OAdV,MAAM,iBACN,UAAQ,wBACP,KAAM,IACP,KAAK,QACL,WAAW,QACV,aAAY,EAAA,iBACZ,MAAO,EAAA,iBACP,QAAO,EAAA,QAEG,MAAA,EAAA,EAAA,UAGP,CAHe,cAAQ,EAAA,EAAA,EAAA,aAGvB,EAAA,CADC,KAAM,EAAQ,CAAA,KAAA,EAAA,CAAA,OAAA,CAAA,CAAA,CAAA,6CAhBZ,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,aAEP,EAAA,OADC,QAAO,EAAA,0CA5DF,EAAA,KAAI,CAAA,CAAA,CAAA,CAAA,sEArCU,EAAA,KAAI,aAAA,GAAA,aAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,WAAA,KAAA,CAAA"}
1
+ {"version":3,"file":"modal.cjs","names":[],"sources":["../../../components/Modal/Modal.vue"],"sourcesContent":["<template>\n <teleport\n :disabled=\"!appendTo && !autoTeleportTarget\"\n :to=\"appendTo || autoTeleportTarget\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <dialog\n ref=\"dialogEl\"\n v-dt-focustrap=\"{ active: open, initialFocus: false, restoreFocus: false }\"\n :class=\"[\n 'd-modal',\n MODAL_KIND_MODIFIERS[kind],\n { 'd-modal--full': fullscreen },\n { 'd-modal--transparent-backdrop': transparentBackdrop },\n modalClass,\n ]\"\n data-qa=\"dt-modal\"\n :aria-describedby=\"describedById || undefined\"\n :aria-labelledby=\"labelledById\"\n v-bind=\"modeAttrs\"\n @cancel.prevent=\"close\"\n @click=\"onBackdropClick\"\n @keydown=\"onKeydown\"\n >\n <div\n v-if=\"open && (hasSlotContent($slots.banner) || bannerHeaderText)\"\n data-qa=\"dt-modal-banner\"\n :class=\"[\n 'd-modal__banner',\n bannerClass,\n bannerKindClass,\n ]\"\n >\n <!-- @slot Slot for the banner, defaults to bannerHeaderText prop -->\n <slot name=\"banner\">\n {{ bannerHeaderText }}\n </slot>\n </div>\n <transition\n :appear=\"open\"\n name=\"d-modal__dialog\"\n @after-enter=\"onAfterEnter\"\n @after-leave=\"onAfterLeave\"\n >\n <div\n v-show=\"open\"\n :class=\"[\n 'd-modal__dialog',\n { 'd-modal__dialog--scrollable': fixedHeaderFooter },\n dialogClass,\n ]\"\n >\n <div\n v-if=\"hasSlotContent($slots.header)\"\n :id=\"labelledById\"\n :class=\"['d-modal__header', headerClass]\"\n data-qa=\"dt-modal-title\"\n >\n <!-- @slot Slot for dialog header section, taking the place of any \"headerText\" text prop -->\n <slot name=\"header\" />\n </div>\n <dt-text\n v-else\n :id=\"labelledById\"\n kind=\"headline\"\n :size=\"600\"\n strength=\"medium\"\n density=\"100\"\n text-box-trim=\"start\"\n as=\"h2\"\n :class=\"['d-modal__header', headerClass]\"\n data-qa=\"dt-modal-title\"\n >\n {{ headerText }}\n </dt-text>\n <div\n v-if=\"hasSlotContent($slots.default)\"\n :class=\"[\n 'd-modal__content',\n contentClass,\n ]\"\n data-qa=\"dt-modal-copy\"\n >\n <!-- @slot Default slot for dialog body section, taking the place of any \"copy\" text prop -->\n <slot />\n </div>\n <p\n v-else\n :class=\"[\n 'd-modal__content',\n contentClass,\n ]\"\n data-qa=\"dt-modal-copy\"\n >\n {{ copy }}\n </p>\n <footer\n v-if=\"hasFooterSlot\"\n :class=\"['d-modal__footer', footerClass]\"\n >\n <!-- @slot Slot for dialog footer content, often containing cancel and confirm buttons. -->\n <slot name=\"footer\" />\n </footer>\n <sr-only-close-button\n v-if=\"!showClose\"\n @close=\"close\"\n />\n <dt-button\n v-else\n class=\"d-modal__close\"\n data-qa=\"dt-modal-close-button\"\n :size=\"300\"\n kind=\"muted\"\n importance=\"clear\"\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"close\"\n >\n <template #icon=\"{ iconSize }\">\n <dt-icon-close\n :size=\"iconSize\"\n />\n </template>\n </dt-button>\n </div>\n </transition>\n </dialog>\n </teleport>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { DtButton } from '@/components/Button';\nimport { DtText } from '@/components/Text';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue';\nimport ModeMixin from '@/common/mixins/mode';\nimport {\n MODAL_BANNER_KINDS,\n MODAL_KIND_MODIFIERS,\n} from './ModalConstants';\nimport { getUniqueString, hasSlotContent, returnFirstEl, disableRootScrolling, enableRootScrolling } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\nimport { NOTICE_KINDS } from '@/components/Notice';\nimport { DialtoneLocalization } from '@/localization';\n\nconst focusableSelector = 'button:not(:disabled),[href],input:not(:disabled),select:not(:disabled),' +\n 'textarea:not(:disabled),details,[tabindex]:not([tabindex=\"-1\"]):not(:disabled):not([aria-disabled=\"true\"])';\n\n/**\n * Modals focus the user's attention exclusively on one task or piece of information\n * via a window that sits on top of the page content.\n * @see https://dialtone.dialpad.com/components/modal.html\n */\nexport default {\n name: 'DtModal',\n\n components: {\n DtButton,\n DtText,\n DtIconClose,\n SrOnlyCloseButton,\n },\n\n mixins: [ModeMixin],\n\n props: {\n /**\n * Body text to display as the modal's main content.\n */\n copy: {\n type: String,\n default: '',\n },\n\n /**\n * Id to use for the dialog's aria-describedby.\n * Recommended only if the dialog content itself isn't enough to give full context,\n * as screen readers should recite the dialog contents by default before any aria-description.\n */\n describedById: {\n type: String,\n default: '',\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n labelledById: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Whether the modal should be shown.\n * Parent component can sync on this value to control the modal's visibility.\n * @values true, false\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Header text to display in the modal header.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Header text to display in the modal banner.\n */\n bannerHeaderText: {\n type: String,\n default: undefined,\n },\n\n /**\n * The theme of the modal.\n * @values default, critical\n */\n kind: {\n type: String,\n default: 'default',\n validator: (k) => Object.keys(MODAL_KIND_MODIFIERS).includes(k),\n },\n\n /**\n * Whether the modal fills the viewport instead of rendering at its default size.\n * @values true, false\n */\n fullscreen: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the root modal element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n modalClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n dialogClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the content element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Sets the color of the banner.\n * @values base, critical, info, positive, warning\n */\n bannerKind: {\n type: String,\n default: 'warning',\n validator (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Additional class name for the banner element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n bannerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the header element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n headerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the footer element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n footerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Shows the close button on the modal\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the modal will close when you click outside of the dialog on the overlay.\n * @values true, false\n */\n closeOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Scrollable modal that allows scroll the modal content keeping the header and footer fixed\n * @values true, false\n */\n fixedHeaderFooter: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The element that is focused when the modal is opened. This can be an\n * HTMLElement within the modal, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'first',\n validator: initialFocusElement => {\n return initialFocusElement === 'first' ||\n (initialFocusElement instanceof HTMLElement) ||\n initialFocusElement.startsWith('#');\n },\n },\n\n /**\n * A CSS selector string for the element to portal the modal to. If not provided, the modal will be rendered in its default location.\n */\n appendTo: {\n type: String,\n default: undefined,\n },\n\n /**\n * When true, the surrounding backdrop is rendered fully transparent\n * instead of the default dimming overlay. The dialog box itself\n * remains opaque. Useful when the underlying UI should remain visible.\n * @values true, false\n */\n transparentBackdrop: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native button click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * The modal will emit a \"false\" boolean value for this event when the user performs a modal-closing action.\n * Parent components can sync on this value to create a 2-way binding to control modal visibility.\n *\n * @event update:open\n * @type {Boolean}\n */\n 'update:open',\n ],\n\n data () {\n return {\n MODAL_KIND_MODIFIERS,\n MODAL_BANNER_KINDS,\n hasSlotContent,\n i18n: new DialtoneLocalization(),\n autoTeleportTarget: null,\n };\n },\n\n computed: {\n hasFooterSlot () {\n return !!this.$slots.footer;\n },\n\n bannerKindClass () {\n return MODAL_BANNER_KINDS[this.bannerKind];\n },\n\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n watch: {\n open (isShowing) {\n this.syncDialogState(isShowing);\n },\n },\n\n mounted () {\n if (!this.appendTo) {\n const root = this.$el?.getRootNode();\n if (root instanceof ShadowRoot) {\n this.autoTeleportTarget = root;\n // Defer syncDialogState so the teleport renders inside the shadow root first.\n if (this.open) this.$nextTick(() => { if (this.open) this.syncDialogState(true); });\n return;\n }\n }\n if (this.open) {\n this.syncDialogState(true);\n }\n },\n\n beforeUnmount () {\n const dialogEl = this.$refs.dialogEl;\n if (dialogEl?.open) {\n dialogEl.close();\n enableRootScrolling(this.getScrollRoot());\n }\n this.previousActiveElement = null;\n },\n\n methods: {\n getScrollRoot () {\n return returnFirstEl(this.$refs.dialogEl)?.getRootNode()?.host;\n },\n\n syncDialogState (isShowing) {\n const dialogEl = this.$refs.dialogEl;\n if (!dialogEl) return;\n\n if (isShowing) {\n this.previousActiveElement = document.activeElement;\n if (!dialogEl.open) {\n dialogEl.showModal();\n }\n disableRootScrolling(this.getScrollRoot());\n } else if (dialogEl.open) {\n // Leave transition plays via v-show on inner content.\n // close() is called in onAfterLeave when transition completes.\n enableRootScrolling(this.getScrollRoot());\n }\n },\n\n close () {\n this.$emit('update:open', false);\n },\n\n onBackdropClick (event) {\n if (this.closeOnClick && event.target === event.currentTarget) {\n this.close();\n }\n this.$emit('click', event);\n },\n\n onKeydown (event) {\n this.$emit('keydown', event);\n },\n\n async onAfterEnter () {\n this.$emit('update:open', true);\n await this.setFocusAfterTransition();\n },\n\n onAfterLeave () {\n const dialogEl = this.$refs.dialogEl;\n if (dialogEl?.open) {\n dialogEl.close();\n }\n this.previousActiveElement?.focus();\n this.previousActiveElement = null;\n },\n\n focusFirstTabbable (container) {\n const focusable = [...container.querySelectorAll(focusableSelector)];\n if (!focusable.length) return;\n let target = focusable[0];\n // If first focusable is an unchecked radio, prefer the checked radio in the same group.\n if (target.matches('[type=\"radio\"]:not(:checked)')) {\n target = focusable.find(el => el.checked && el.name === target.name) || target;\n }\n target.focus({ preventScroll: true });\n },\n\n async setFocusAfterTransition () {\n const dialogEl = this.$refs.dialogEl;\n if (!dialogEl) return;\n\n await this.$nextTick();\n\n if (this.initialFocusElement === 'first') {\n this.focusFirstTabbable(dialogEl);\n } else if (typeof this.initialFocusElement === 'string' && this.initialFocusElement.startsWith('#')) {\n const el = dialogEl.querySelector(this.initialFocusElement);\n if (el) {\n el.focus();\n } else {\n // eslint-disable-next-line no-console\n console.warn('Could not find the element specified in dt-modal prop \"initialFocusElement\". ' +\n 'Defaulting to focusing the first element.');\n this.focusFirstTabbable(dialogEl);\n }\n } else if (this.initialFocusElement instanceof HTMLElement) {\n this.initialFocusElement.focus();\n }\n },\n },\n};\n</script>\n"],"mappings":"+mBAkJA,IAAM,EAAoB,qLAQrB,EAAU,CACb,KAAM,UAEN,WAAY,CACV,SAAA,EAAA,QACA,OAAA,EAAA,QACA,YAAA,EAAA,YACA,kBAAA,EAAA,QACD,CAED,OAAQ,CAAC,EAAA,QAAU,CAEnB,MAAO,CAIL,KAAM,CACJ,KAAM,OACN,QAAS,GACV,CAOD,cAAe,CACb,KAAM,OACN,QAAS,GACV,CAKD,aAAc,CACZ,KAAM,OACN,QAAS,UAAY,CAAE,OAAO,EAAA,iBAAiB,EAChD,CAOD,KAAM,CACJ,KAAM,QACN,QAAS,GACV,CAKD,WAAY,CACV,KAAM,OACN,QAAS,IAAA,GACV,CAKD,iBAAkB,CAChB,KAAM,OACN,QAAS,IAAA,GACV,CAMD,KAAM,CACJ,KAAM,OACN,QAAS,UACT,UAAY,GAAM,OAAO,KAAK,EAAA,qBAAqB,CAAC,SAAS,EAAE,CAChE,CAMD,WAAY,CACV,KAAM,QACN,QAAS,GACV,CAOD,WAAY,CACV,KAAM,CAAC,OAAQ,OAAQ,MAAM,CAC7B,QAAS,GACV,CAOD,YAAa,CACX,KAAM,CAAC,OAAQ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BAAoD,EAAA,aAAA,CAAA,CAI1D,UAAQ,uCAEL,EAAA,KAAI,CAAA,EAAA,EAGD,EAAA,gBAAA,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,oBAKC,SAAA,OAJN,OAAA,EAAA,EAAA,gBAAK,CAAA,kBAAsB,EAAA,YAAW,CAAA,oBAGjB,EAAA,OAAA,SAAA,CAAA,CAAA,EAAA,GAAA,EAAA,EAAA,oBAAA,GAAA,GAAA,CAGf,EAAA,+CAmBG,EAAA,OAdV,MAAM,iBACN,UAAQ,wBACP,KAAM,IACP,KAAK,QACL,WAAW,QACV,aAAY,EAAA,iBACZ,MAAO,EAAA,iBACP,QAAO,EAAA,QAEG,MAAA,EAAA,EAAA,UAGP,CAHe,cAAQ,EAAA,EAAA,EAAA,aAGvB,EAAA,CADC,KAAM,EAAQ,CAAA,KAAA,EAAA,CAAA,OAAA,CAAA,CAAA,CAAA,6CAhBZ,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,aAEP,EAAA,OADC,QAAO,EAAA,0CA5DF,EAAA,KAAI,CAAA,CAAA,CAAA,CAAA,sEArCU,EAAA,KAAI,aAAA,GAAA,aAAA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,WAAA,KAAA,CAAA"}
@@ -7,16 +7,16 @@ import l from "../text/text.js";
7
7
  import { DialtoneLocalization as u } from "../../localization/index.js";
8
8
  import d from "../button/button.js";
9
9
  import f from "../../shared/sr_only_close_button.js";
10
- import { MODAL_BANNER_KINDS as p, MODAL_KIND_MODIFIERS as m, MODAL_SIZE_MODIFIERS as h } from "./modal-constants.js";
11
- import { Teleport as g, Transition as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, mergeProps as w, normalizeClass as T, openBlock as E, renderSlot as D, resolveComponent as O, resolveDirective as k, toDisplayString as A, vShow as j, withCtx as M, withDirectives as N, withModifiers as P } from "vue";
12
- import { DtIconClose as F } from "@dialpad/dialtone-icons/vue";
10
+ import { MODAL_BANNER_KINDS as p, MODAL_KIND_MODIFIERS as m } from "./modal-constants.js";
11
+ import { Teleport as h, Transition as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createTextVNode as x, createVNode as S, mergeProps as C, normalizeClass as w, openBlock as T, renderSlot as E, resolveComponent as D, resolveDirective as O, toDisplayString as k, vShow as A, withCtx as j, withDirectives as M, withModifiers as N } from "vue";
12
+ import { DtIconClose as P } from "@dialpad/dialtone-icons/vue";
13
13
  //#region components/Modal/Modal.vue
14
- var I = "button:not(:disabled),[href],input:not(:disabled),select:not(:disabled),textarea:not(:disabled),details,[tabindex]:not([tabindex=\"-1\"]):not(:disabled):not([aria-disabled=\"true\"])", L = {
14
+ var F = "button:not(:disabled),[href],input:not(:disabled),select:not(:disabled),textarea:not(:disabled),details,[tabindex]:not([tabindex=\"-1\"]):not(:disabled):not([aria-disabled=\"true\"])", I = {
15
15
  name: "DtModal",
16
16
  components: {
17
17
  DtButton: d,
18
18
  DtText: l,
19
- DtIconClose: F,
19
+ DtIconClose: P,
20
20
  SrOnlyCloseButton: f
21
21
  },
22
22
  mixins: [s],
@@ -52,10 +52,9 @@ var I = "button:not(:disabled),[href],input:not(:disabled),select:not(:disabled)
52
52
  default: "default",
53
53
  validator: (e) => Object.keys(m).includes(e)
54
54
  },
55
- size: {
56
- type: String,
57
- default: "default",
58
- validator: (e) => Object.keys(h).includes(e)
55
+ fullscreen: {
56
+ type: Boolean,
57
+ default: !1
59
58
  },
60
59
  modalClass: {
61
60
  type: [
@@ -146,7 +145,6 @@ var I = "button:not(:disabled),[href],input:not(:disabled),select:not(:disabled)
146
145
  data() {
147
146
  return {
148
147
  MODAL_KIND_MODIFIERS: m,
149
- MODAL_SIZE_MODIFIERS: h,
150
148
  MODAL_BANNER_KINDS: p,
151
149
  hasSlotContent: i,
152
150
  i18n: new u(),
@@ -208,7 +206,7 @@ var I = "button:not(:disabled),[href],input:not(:disabled),select:not(:disabled)
208
206
  e?.open && e.close(), this.previousActiveElement?.focus(), this.previousActiveElement = null;
209
207
  },
210
208
  focusFirstTabbable(e) {
211
- let t = [...e.querySelectorAll(I)];
209
+ let t = [...e.querySelectorAll(F)];
212
210
  if (!t.length) return;
213
211
  let n = t[0];
214
212
  n.matches("[type=\"radio\"]:not(:checked)") && (n = t.find((e) => e.checked && e.name === n.name) || n), n.focus({ preventScroll: !0 });
@@ -222,18 +220,18 @@ var I = "button:not(:disabled),[href],input:not(:disabled),select:not(:disabled)
222
220
  } else this.initialFocusElement instanceof HTMLElement && this.initialFocusElement.focus();
223
221
  }
224
222
  }
225
- }, R = ["aria-describedby", "aria-labelledby"], z = ["id"];
226
- function B(e, t, n, r, i, a) {
227
- let o = O("dt-text"), s = O("sr-only-close-button"), c = O("dt-icon-close"), l = O("dt-button"), u = k("dt-focustrap");
228
- return E(), v(g, {
223
+ }, L = ["aria-describedby", "aria-labelledby"], R = ["id"];
224
+ function z(e, t, n, r, i, a) {
225
+ let o = D("dt-text"), s = D("sr-only-close-button"), c = D("dt-icon-close"), l = D("dt-button"), u = O("dt-focustrap");
226
+ return T(), _(h, {
229
227
  disabled: !n.appendTo && !i.autoTeleportTarget,
230
228
  to: n.appendTo || i.autoTeleportTarget
231
- }, [N((E(), b("dialog", w({
229
+ }, [M((T(), y("dialog", C({
232
230
  ref: "dialogEl",
233
231
  class: [
234
232
  "d-modal",
235
233
  i.MODAL_KIND_MODIFIERS[n.kind],
236
- i.MODAL_SIZE_MODIFIERS[n.size],
234
+ { "d-modal--full": n.fullscreen },
237
235
  { "d-modal--transparent-backdrop": n.transparentBackdrop },
238
236
  n.modalClass
239
237
  ],
@@ -241,34 +239,34 @@ function B(e, t, n, r, i, a) {
241
239
  "aria-describedby": n.describedById || void 0,
242
240
  "aria-labelledby": n.labelledById
243
241
  }, e.modeAttrs, {
244
- onCancel: t[0] || (t[0] = P((...e) => a.close && a.close(...e), ["prevent"])),
242
+ onCancel: t[0] || (t[0] = N((...e) => a.close && a.close(...e), ["prevent"])),
245
243
  onClick: t[1] || (t[1] = (...e) => a.onBackdropClick && a.onBackdropClick(...e)),
246
244
  onKeydown: t[2] || (t[2] = (...e) => a.onKeydown && a.onKeydown(...e))
247
- }), [n.open && (i.hasSlotContent(e.$slots.banner) || n.bannerHeaderText) ? (E(), b("div", {
245
+ }), [n.open && (i.hasSlotContent(e.$slots.banner) || n.bannerHeaderText) ? (T(), y("div", {
248
246
  key: 0,
249
247
  "data-qa": "dt-modal-banner",
250
- class: T([
248
+ class: w([
251
249
  "d-modal__banner",
252
250
  n.bannerClass,
253
251
  a.bannerKindClass
254
252
  ])
255
- }, [D(e.$slots, "banner", {}, () => [S(A(n.bannerHeaderText), 1)])], 2)) : y("", !0), C(_, {
253
+ }, [E(e.$slots, "banner", {}, () => [x(k(n.bannerHeaderText), 1)])], 2)) : v("", !0), S(g, {
256
254
  appear: n.open,
257
255
  name: "d-modal__dialog",
258
256
  onAfterEnter: a.onAfterEnter,
259
257
  onAfterLeave: a.onAfterLeave
260
258
  }, {
261
- default: M(() => [N(x("div", { class: T([
259
+ default: j(() => [M(b("div", { class: w([
262
260
  "d-modal__dialog",
263
261
  { "d-modal__dialog--scrollable": n.fixedHeaderFooter },
264
262
  n.dialogClass
265
263
  ]) }, [
266
- i.hasSlotContent(e.$slots.header) ? (E(), b("div", {
264
+ i.hasSlotContent(e.$slots.header) ? (T(), y("div", {
267
265
  key: 0,
268
266
  id: n.labelledById,
269
- class: T(["d-modal__header", n.headerClass]),
267
+ class: w(["d-modal__header", n.headerClass]),
270
268
  "data-qa": "dt-modal-title"
271
- }, [D(e.$slots, "header")], 10, z)) : (E(), v(o, {
269
+ }, [E(e.$slots, "header")], 10, R)) : (T(), _(o, {
272
270
  key: 1,
273
271
  id: n.labelledById,
274
272
  kind: "headline",
@@ -277,26 +275,26 @@ function B(e, t, n, r, i, a) {
277
275
  density: "100",
278
276
  "text-box-trim": "start",
279
277
  as: "h2",
280
- class: T(["d-modal__header", n.headerClass]),
278
+ class: w(["d-modal__header", n.headerClass]),
281
279
  "data-qa": "dt-modal-title"
282
280
  }, {
283
- default: M(() => [S(A(n.headerText), 1)]),
281
+ default: j(() => [x(k(n.headerText), 1)]),
284
282
  _: 1
285
283
  }, 8, ["id", "class"])),
286
- i.hasSlotContent(e.$slots.default) ? (E(), b("div", {
284
+ i.hasSlotContent(e.$slots.default) ? (T(), y("div", {
287
285
  key: 2,
288
- class: T(["d-modal__content", n.contentClass]),
286
+ class: w(["d-modal__content", n.contentClass]),
289
287
  "data-qa": "dt-modal-copy"
290
- }, [D(e.$slots, "default")], 2)) : (E(), b("p", {
288
+ }, [E(e.$slots, "default")], 2)) : (T(), y("p", {
291
289
  key: 3,
292
- class: T(["d-modal__content", n.contentClass]),
290
+ class: w(["d-modal__content", n.contentClass]),
293
291
  "data-qa": "dt-modal-copy"
294
- }, A(n.copy), 3)),
295
- a.hasFooterSlot ? (E(), b("footer", {
292
+ }, k(n.copy), 3)),
293
+ a.hasFooterSlot ? (T(), y("footer", {
296
294
  key: 4,
297
- class: T(["d-modal__footer", n.footerClass])
298
- }, [D(e.$slots, "footer")], 2)) : y("", !0),
299
- n.showClose ? (E(), v(l, {
295
+ class: w(["d-modal__footer", n.footerClass])
296
+ }, [E(e.$slots, "footer")], 2)) : v("", !0),
297
+ n.showClose ? (T(), _(l, {
300
298
  key: 6,
301
299
  class: "d-modal__close",
302
300
  "data-qa": "dt-modal-close-button",
@@ -307,30 +305,30 @@ function B(e, t, n, r, i, a) {
307
305
  title: a.closeButtonTitle,
308
306
  onClick: a.close
309
307
  }, {
310
- icon: M(({ iconSize: e }) => [C(c, { size: e }, null, 8, ["size"])]),
308
+ icon: j(({ iconSize: e }) => [S(c, { size: e }, null, 8, ["size"])]),
311
309
  _: 1
312
310
  }, 8, [
313
311
  "aria-label",
314
312
  "title",
315
313
  "onClick"
316
- ])) : (E(), v(s, {
314
+ ])) : (T(), _(s, {
317
315
  key: 5,
318
316
  onClose: a.close
319
317
  }, null, 8, ["onClose"]))
320
- ], 2), [[j, n.open]])]),
318
+ ], 2), [[A, n.open]])]),
321
319
  _: 3
322
320
  }, 8, [
323
321
  "appear",
324
322
  "onAfterEnter",
325
323
  "onAfterLeave"
326
- ])], 16, R)), [[u, {
324
+ ])], 16, L)), [[u, {
327
325
  active: n.open,
328
326
  initialFocus: !1,
329
327
  restoreFocus: !1
330
328
  }]])], 8, ["disabled", "to"]);
331
329
  }
332
- var V = /* @__PURE__ */ o(L, [["render", B]]);
330
+ var B = /* @__PURE__ */ o(I, [["render", z]]);
333
331
  //#endregion
334
- export { V as default };
332
+ export { B as default };
335
333
 
336
334
  //# sourceMappingURL=modal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal.js","names":[],"sources":["../../../components/Modal/Modal.vue"],"sourcesContent":["<template>\n <teleport\n :disabled=\"!appendTo && !autoTeleportTarget\"\n :to=\"appendTo || autoTeleportTarget\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <dialog\n ref=\"dialogEl\"\n v-dt-focustrap=\"{ active: open, initialFocus: false, restoreFocus: false }\"\n :class=\"[\n 'd-modal',\n MODAL_KIND_MODIFIERS[kind],\n MODAL_SIZE_MODIFIERS[size],\n { 'd-modal--transparent-backdrop': transparentBackdrop },\n modalClass,\n ]\"\n data-qa=\"dt-modal\"\n :aria-describedby=\"describedById || undefined\"\n :aria-labelledby=\"labelledById\"\n v-bind=\"modeAttrs\"\n @cancel.prevent=\"close\"\n @click=\"onBackdropClick\"\n @keydown=\"onKeydown\"\n >\n <div\n v-if=\"open && (hasSlotContent($slots.banner) || bannerHeaderText)\"\n data-qa=\"dt-modal-banner\"\n :class=\"[\n 'd-modal__banner',\n bannerClass,\n bannerKindClass,\n ]\"\n >\n <!-- @slot Slot for the banner, defaults to bannerHeaderText prop -->\n <slot name=\"banner\">\n {{ bannerHeaderText }}\n </slot>\n </div>\n <transition\n :appear=\"open\"\n name=\"d-modal__dialog\"\n @after-enter=\"onAfterEnter\"\n @after-leave=\"onAfterLeave\"\n >\n <div\n v-show=\"open\"\n :class=\"[\n 'd-modal__dialog',\n { 'd-modal__dialog--scrollable': fixedHeaderFooter },\n dialogClass,\n ]\"\n >\n <div\n v-if=\"hasSlotContent($slots.header)\"\n :id=\"labelledById\"\n :class=\"['d-modal__header', headerClass]\"\n data-qa=\"dt-modal-title\"\n >\n <!-- @slot Slot for dialog header section, taking the place of any \"headerText\" text prop -->\n <slot name=\"header\" />\n </div>\n <dt-text\n v-else\n :id=\"labelledById\"\n kind=\"headline\"\n :size=\"600\"\n strength=\"medium\"\n density=\"100\"\n text-box-trim=\"start\"\n as=\"h2\"\n :class=\"['d-modal__header', headerClass]\"\n data-qa=\"dt-modal-title\"\n >\n {{ headerText }}\n </dt-text>\n <div\n v-if=\"hasSlotContent($slots.default)\"\n :class=\"[\n 'd-modal__content',\n contentClass,\n ]\"\n data-qa=\"dt-modal-copy\"\n >\n <!-- @slot Default slot for dialog body section, taking the place of any \"copy\" text prop -->\n <slot />\n </div>\n <p\n v-else\n :class=\"[\n 'd-modal__content',\n contentClass,\n ]\"\n data-qa=\"dt-modal-copy\"\n >\n {{ copy }}\n </p>\n <footer\n v-if=\"hasFooterSlot\"\n :class=\"['d-modal__footer', footerClass]\"\n >\n <!-- @slot Slot for dialog footer content, often containing cancel and confirm buttons. -->\n <slot name=\"footer\" />\n </footer>\n <sr-only-close-button\n v-if=\"!showClose\"\n @close=\"close\"\n />\n <dt-button\n v-else\n class=\"d-modal__close\"\n data-qa=\"dt-modal-close-button\"\n :size=\"300\"\n kind=\"muted\"\n importance=\"clear\"\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"close\"\n >\n <template #icon=\"{ iconSize }\">\n <dt-icon-close\n :size=\"iconSize\"\n />\n </template>\n </dt-button>\n </div>\n </transition>\n </dialog>\n </teleport>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { DtButton } from '@/components/Button';\nimport { DtText } from '@/components/Text';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue';\nimport ModeMixin from '@/common/mixins/mode';\nimport {\n MODAL_BANNER_KINDS,\n MODAL_KIND_MODIFIERS,\n MODAL_SIZE_MODIFIERS,\n} from './ModalConstants';\nimport { getUniqueString, hasSlotContent, returnFirstEl, disableRootScrolling, enableRootScrolling } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\nimport { NOTICE_KINDS } from '@/components/Notice';\nimport { DialtoneLocalization } from '@/localization';\n\nconst focusableSelector = 'button:not(:disabled),[href],input:not(:disabled),select:not(:disabled),' +\n 'textarea:not(:disabled),details,[tabindex]:not([tabindex=\"-1\"]):not(:disabled):not([aria-disabled=\"true\"])';\n\n/**\n * Modals focus the user's attention exclusively on one task or piece of information\n * via a window that sits on top of the page content.\n * @see https://dialtone.dialpad.com/components/modal.html\n */\nexport default {\n name: 'DtModal',\n\n components: {\n DtButton,\n DtText,\n DtIconClose,\n SrOnlyCloseButton,\n },\n\n mixins: [ModeMixin],\n\n props: {\n /**\n * Body text to display as the modal's main content.\n */\n copy: {\n type: String,\n default: '',\n },\n\n /**\n * Id to use for the dialog's aria-describedby.\n * Recommended only if the dialog content itself isn't enough to give full context,\n * as screen readers should recite the dialog contents by default before any aria-description.\n */\n describedById: {\n type: String,\n default: '',\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n labelledById: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Whether the modal should be shown.\n * Parent component can sync on this value to control the modal's visibility.\n * @values true, false\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Header text to display in the modal header.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Header text to display in the modal banner.\n */\n bannerHeaderText: {\n type: String,\n default: undefined,\n },\n\n /**\n * The theme of the modal.\n * @values default, critical\n */\n kind: {\n type: String,\n default: 'default',\n validator: (k) => Object.keys(MODAL_KIND_MODIFIERS).includes(k),\n },\n\n /**\n * The size of the modal. size - default or full,\n * @values default, full\n */\n size: {\n type: String,\n default: 'default',\n validator: (s) => Object.keys(MODAL_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Additional class name for the root modal element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n modalClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n dialogClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the content element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Sets the color of the banner.\n * @values base, critical, info, positive, warning\n */\n bannerKind: {\n type: String,\n default: 'warning',\n validator (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Additional class name for the banner element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n bannerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the header element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n headerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the footer element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n footerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Shows the close button on the modal\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the modal will close when you click outside of the dialog on the overlay.\n * @values true, false\n */\n closeOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Scrollable modal that allows scroll the modal content keeping the header and footer fixed\n * @values true, false\n */\n fixedHeaderFooter: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The element that is focused when the modal is opened. This can be an\n * HTMLElement within the modal, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'first',\n validator: initialFocusElement => {\n return initialFocusElement === 'first' ||\n (initialFocusElement instanceof HTMLElement) ||\n initialFocusElement.startsWith('#');\n },\n },\n\n /**\n * A CSS selector string for the element to portal the modal to. If not provided, the modal will be rendered in its default location.\n */\n appendTo: {\n type: String,\n default: undefined,\n },\n\n /**\n * When true, the surrounding backdrop is rendered fully transparent\n * instead of the default dimming overlay. The dialog box itself\n * remains opaque. Useful when the underlying UI should remain visible.\n * @values true, false\n */\n transparentBackdrop: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native button click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * The modal will emit a \"false\" boolean value for this event when the user performs a modal-closing action.\n * Parent components can sync on this value to create a 2-way binding to control modal visibility.\n *\n * @event update:open\n * @type {Boolean}\n */\n 'update:open',\n ],\n\n data () {\n return {\n MODAL_KIND_MODIFIERS,\n MODAL_SIZE_MODIFIERS,\n MODAL_BANNER_KINDS,\n hasSlotContent,\n i18n: new DialtoneLocalization(),\n autoTeleportTarget: null,\n };\n },\n\n computed: {\n hasFooterSlot () {\n return !!this.$slots.footer;\n },\n\n bannerKindClass () {\n return MODAL_BANNER_KINDS[this.bannerKind];\n },\n\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n watch: {\n open (isShowing) {\n this.syncDialogState(isShowing);\n },\n },\n\n mounted () {\n if (!this.appendTo) {\n const root = this.$el?.getRootNode();\n if (root instanceof ShadowRoot) {\n this.autoTeleportTarget = root;\n // Defer syncDialogState so the teleport renders inside the shadow root first.\n if (this.open) this.$nextTick(() => { if (this.open) this.syncDialogState(true); });\n return;\n }\n }\n if (this.open) {\n this.syncDialogState(true);\n }\n },\n\n beforeUnmount () {\n const dialogEl = this.$refs.dialogEl;\n if (dialogEl?.open) {\n dialogEl.close();\n enableRootScrolling(this.getScrollRoot());\n }\n this.previousActiveElement = null;\n },\n\n methods: {\n getScrollRoot () {\n return returnFirstEl(this.$refs.dialogEl)?.getRootNode()?.host;\n },\n\n syncDialogState (isShowing) {\n const dialogEl = this.$refs.dialogEl;\n if (!dialogEl) return;\n\n if (isShowing) {\n this.previousActiveElement = document.activeElement;\n if (!dialogEl.open) {\n dialogEl.showModal();\n }\n disableRootScrolling(this.getScrollRoot());\n } else if (dialogEl.open) {\n // Leave transition plays via v-show on inner content.\n // close() is called in onAfterLeave when transition completes.\n enableRootScrolling(this.getScrollRoot());\n }\n },\n\n close () {\n this.$emit('update:open', false);\n },\n\n onBackdropClick (event) {\n if (this.closeOnClick && event.target === event.currentTarget) {\n this.close();\n }\n this.$emit('click', event);\n },\n\n onKeydown (event) {\n this.$emit('keydown', event);\n },\n\n async onAfterEnter () {\n this.$emit('update:open', true);\n await this.setFocusAfterTransition();\n },\n\n onAfterLeave () {\n const dialogEl = this.$refs.dialogEl;\n if (dialogEl?.open) {\n dialogEl.close();\n }\n this.previousActiveElement?.focus();\n this.previousActiveElement = null;\n },\n\n focusFirstTabbable (container) {\n const focusable = [...container.querySelectorAll(focusableSelector)];\n if (!focusable.length) return;\n let target = focusable[0];\n // If first focusable is an unchecked radio, prefer the checked radio in the same group.\n if (target.matches('[type=\"radio\"]:not(:checked)')) {\n target = focusable.find(el => el.checked && el.name === target.name) || target;\n }\n target.focus({ preventScroll: true });\n },\n\n async setFocusAfterTransition () {\n const dialogEl = this.$refs.dialogEl;\n if (!dialogEl) return;\n\n await this.$nextTick();\n\n if (this.initialFocusElement === 'first') {\n this.focusFirstTabbable(dialogEl);\n } else if (typeof this.initialFocusElement === 'string' && this.initialFocusElement.startsWith('#')) {\n const el = dialogEl.querySelector(this.initialFocusElement);\n if (el) {\n el.focus();\n } else {\n // eslint-disable-next-line no-console\n console.warn('Could not find the element specified in dt-modal prop \"initialFocusElement\". ' +\n 'Defaulting to focusing the first element.');\n this.focusFirstTabbable(dialogEl);\n }\n } else if (this.initialFocusElement instanceof HTMLElement) {\n this.initialFocusElement.focus();\n }\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;;;AAmJA,IAAM,IAAoB,0LAQrB,IAAU;CACb,MAAM;CAEN,YAAY;EACV,UAAA;EACA,QAAA;EACA;EACA,mBAAA;EACD;CAED,QAAQ,CAAC,EAAU;CAEnB,OAAO;EAIL,MAAM;GACJ,MAAM;GACN,SAAS;GACV;EAOD,eAAe;GACb,MAAM;GACN,SAAS;GACV;EAKD,cAAc;GACZ,MAAM;GACN,SAAS,WAAY;AAAE,WAAO,GAAiB;;GAChD;EAOD,MAAM;GACJ,MAAM;GACN,SAAS;GACV;EAKD,YAAY;GACV,MAAM;GACN,SAAS,KAAA;GACV;EAKD,kBAAkB;GAChB,MAAM;GACN,SAAS,KAAA;GACV;EAMD,MAAM;GACJ,MAAM;GACN,SAAS;GACT,YAAY,MAAM,OAAO,KAAK,EAAqB,CAAC,SAAS,EAAE;GAChE;EAMD,MAAM;GACJ,MAAM;GACN,SAAS;GACT,YAAY,MAAM,OAAO,KAAK,EAAqB,CAAC,SAAS,EAAE;GAChE;EAOD,YAAY;GACV,MAAM;IAAC;IAAQ;IAAQ;IAAM;GAC7B,SAAS;GACV;EAOD,aAAa;GACX,MAAM;IAAC;IAAQ;IAAQ;IAAM;GAC7B,SAAS;GACV;EAOD,cAAc;GACZ,MAAM;IAAC;IAAQ;IAAQ;IAAM;GAC7B,SAAS;GACV;EAMD,YAAY;GACV,MAAM;GACN,SAAS;GACT,UAAW,GAAM;AACf,WAAO,EAAa,SAAS,EAAK;;GAErC;EAOD,aAAa;GACX,MAAM;IAAC;IAAQ;IAAQ;IAAM;GAC7B,SAAS;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,SAAO,EAAA;;cA5DF,EAAA,KAAI,CAAA,CAAA,CAAA,CAAA;;;;;;;UArCU,EAAA;EAAI,cAAA;EAAA,cAAA;EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,GAAA,CAAA,YAAA,KAAA,CAAA"}
1
+ {"version":3,"file":"modal.js","names":[],"sources":["../../../components/Modal/Modal.vue"],"sourcesContent":["<template>\n <teleport\n :disabled=\"!appendTo && !autoTeleportTarget\"\n :to=\"appendTo || autoTeleportTarget\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <dialog\n ref=\"dialogEl\"\n v-dt-focustrap=\"{ active: open, initialFocus: false, restoreFocus: false }\"\n :class=\"[\n 'd-modal',\n MODAL_KIND_MODIFIERS[kind],\n { 'd-modal--full': fullscreen },\n { 'd-modal--transparent-backdrop': transparentBackdrop },\n modalClass,\n ]\"\n data-qa=\"dt-modal\"\n :aria-describedby=\"describedById || undefined\"\n :aria-labelledby=\"labelledById\"\n v-bind=\"modeAttrs\"\n @cancel.prevent=\"close\"\n @click=\"onBackdropClick\"\n @keydown=\"onKeydown\"\n >\n <div\n v-if=\"open && (hasSlotContent($slots.banner) || bannerHeaderText)\"\n data-qa=\"dt-modal-banner\"\n :class=\"[\n 'd-modal__banner',\n bannerClass,\n bannerKindClass,\n ]\"\n >\n <!-- @slot Slot for the banner, defaults to bannerHeaderText prop -->\n <slot name=\"banner\">\n {{ bannerHeaderText }}\n </slot>\n </div>\n <transition\n :appear=\"open\"\n name=\"d-modal__dialog\"\n @after-enter=\"onAfterEnter\"\n @after-leave=\"onAfterLeave\"\n >\n <div\n v-show=\"open\"\n :class=\"[\n 'd-modal__dialog',\n { 'd-modal__dialog--scrollable': fixedHeaderFooter },\n dialogClass,\n ]\"\n >\n <div\n v-if=\"hasSlotContent($slots.header)\"\n :id=\"labelledById\"\n :class=\"['d-modal__header', headerClass]\"\n data-qa=\"dt-modal-title\"\n >\n <!-- @slot Slot for dialog header section, taking the place of any \"headerText\" text prop -->\n <slot name=\"header\" />\n </div>\n <dt-text\n v-else\n :id=\"labelledById\"\n kind=\"headline\"\n :size=\"600\"\n strength=\"medium\"\n density=\"100\"\n text-box-trim=\"start\"\n as=\"h2\"\n :class=\"['d-modal__header', headerClass]\"\n data-qa=\"dt-modal-title\"\n >\n {{ headerText }}\n </dt-text>\n <div\n v-if=\"hasSlotContent($slots.default)\"\n :class=\"[\n 'd-modal__content',\n contentClass,\n ]\"\n data-qa=\"dt-modal-copy\"\n >\n <!-- @slot Default slot for dialog body section, taking the place of any \"copy\" text prop -->\n <slot />\n </div>\n <p\n v-else\n :class=\"[\n 'd-modal__content',\n contentClass,\n ]\"\n data-qa=\"dt-modal-copy\"\n >\n {{ copy }}\n </p>\n <footer\n v-if=\"hasFooterSlot\"\n :class=\"['d-modal__footer', footerClass]\"\n >\n <!-- @slot Slot for dialog footer content, often containing cancel and confirm buttons. -->\n <slot name=\"footer\" />\n </footer>\n <sr-only-close-button\n v-if=\"!showClose\"\n @close=\"close\"\n />\n <dt-button\n v-else\n class=\"d-modal__close\"\n data-qa=\"dt-modal-close-button\"\n :size=\"300\"\n kind=\"muted\"\n importance=\"clear\"\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"close\"\n >\n <template #icon=\"{ iconSize }\">\n <dt-icon-close\n :size=\"iconSize\"\n />\n </template>\n </dt-button>\n </div>\n </transition>\n </dialog>\n </teleport>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { DtButton } from '@/components/Button';\nimport { DtText } from '@/components/Text';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue';\nimport ModeMixin from '@/common/mixins/mode';\nimport {\n MODAL_BANNER_KINDS,\n MODAL_KIND_MODIFIERS,\n} from './ModalConstants';\nimport { getUniqueString, hasSlotContent, returnFirstEl, disableRootScrolling, enableRootScrolling } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\nimport { NOTICE_KINDS } from '@/components/Notice';\nimport { DialtoneLocalization } from '@/localization';\n\nconst focusableSelector = 'button:not(:disabled),[href],input:not(:disabled),select:not(:disabled),' +\n 'textarea:not(:disabled),details,[tabindex]:not([tabindex=\"-1\"]):not(:disabled):not([aria-disabled=\"true\"])';\n\n/**\n * Modals focus the user's attention exclusively on one task or piece of information\n * via a window that sits on top of the page content.\n * @see https://dialtone.dialpad.com/components/modal.html\n */\nexport default {\n name: 'DtModal',\n\n components: {\n DtButton,\n DtText,\n DtIconClose,\n SrOnlyCloseButton,\n },\n\n mixins: [ModeMixin],\n\n props: {\n /**\n * Body text to display as the modal's main content.\n */\n copy: {\n type: String,\n default: '',\n },\n\n /**\n * Id to use for the dialog's aria-describedby.\n * Recommended only if the dialog content itself isn't enough to give full context,\n * as screen readers should recite the dialog contents by default before any aria-description.\n */\n describedById: {\n type: String,\n default: '',\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n labelledById: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Whether the modal should be shown.\n * Parent component can sync on this value to control the modal's visibility.\n * @values true, false\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Header text to display in the modal header.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Header text to display in the modal banner.\n */\n bannerHeaderText: {\n type: String,\n default: undefined,\n },\n\n /**\n * The theme of the modal.\n * @values default, critical\n */\n kind: {\n type: String,\n default: 'default',\n validator: (k) => Object.keys(MODAL_KIND_MODIFIERS).includes(k),\n },\n\n /**\n * Whether the modal fills the viewport instead of rendering at its default size.\n * @values true, false\n */\n fullscreen: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the root modal element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n modalClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n dialogClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the content element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Sets the color of the banner.\n * @values base, critical, info, positive, warning\n */\n bannerKind: {\n type: String,\n default: 'warning',\n validator (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Additional class name for the banner element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n bannerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the header element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n headerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the footer element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n footerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Shows the close button on the modal\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the modal will close when you click outside of the dialog on the overlay.\n * @values true, false\n */\n closeOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Scrollable modal that allows scroll the modal content keeping the header and footer fixed\n * @values true, false\n */\n fixedHeaderFooter: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The element that is focused when the modal is opened. This can be an\n * HTMLElement within the modal, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'first',\n validator: initialFocusElement => {\n return initialFocusElement === 'first' ||\n (initialFocusElement instanceof HTMLElement) ||\n initialFocusElement.startsWith('#');\n },\n },\n\n /**\n * A CSS selector string for the element to portal the modal to. If not provided, the modal will be rendered in its default location.\n */\n appendTo: {\n type: String,\n default: undefined,\n },\n\n /**\n * When true, the surrounding backdrop is rendered fully transparent\n * instead of the default dimming overlay. The dialog box itself\n * remains opaque. Useful when the underlying UI should remain visible.\n * @values true, false\n */\n transparentBackdrop: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native button click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * The modal will emit a \"false\" boolean value for this event when the user performs a modal-closing action.\n * Parent components can sync on this value to create a 2-way binding to control modal visibility.\n *\n * @event update:open\n * @type {Boolean}\n */\n 'update:open',\n ],\n\n data () {\n return {\n MODAL_KIND_MODIFIERS,\n MODAL_BANNER_KINDS,\n hasSlotContent,\n i18n: new DialtoneLocalization(),\n autoTeleportTarget: null,\n };\n },\n\n computed: {\n hasFooterSlot () {\n return !!this.$slots.footer;\n },\n\n bannerKindClass () {\n return MODAL_BANNER_KINDS[this.bannerKind];\n },\n\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n watch: {\n open (isShowing) {\n this.syncDialogState(isShowing);\n },\n },\n\n mounted () {\n if (!this.appendTo) {\n const root = this.$el?.getRootNode();\n if (root instanceof ShadowRoot) {\n this.autoTeleportTarget = root;\n // Defer syncDialogState so the teleport renders inside the shadow root first.\n if (this.open) this.$nextTick(() => { if (this.open) this.syncDialogState(true); });\n return;\n }\n }\n if (this.open) {\n this.syncDialogState(true);\n }\n },\n\n beforeUnmount () {\n const dialogEl = this.$refs.dialogEl;\n if (dialogEl?.open) {\n dialogEl.close();\n enableRootScrolling(this.getScrollRoot());\n }\n this.previousActiveElement = null;\n },\n\n methods: {\n getScrollRoot () {\n return returnFirstEl(this.$refs.dialogEl)?.getRootNode()?.host;\n },\n\n syncDialogState (isShowing) {\n const dialogEl = this.$refs.dialogEl;\n if (!dialogEl) return;\n\n if (isShowing) {\n this.previousActiveElement = document.activeElement;\n if (!dialogEl.open) {\n dialogEl.showModal();\n }\n disableRootScrolling(this.getScrollRoot());\n } else if (dialogEl.open) {\n // Leave transition plays via v-show on inner content.\n // close() is called in onAfterLeave when transition completes.\n enableRootScrolling(this.getScrollRoot());\n }\n },\n\n close () {\n this.$emit('update:open', false);\n },\n\n onBackdropClick (event) {\n if (this.closeOnClick && event.target === event.currentTarget) {\n this.close();\n }\n this.$emit('click', event);\n },\n\n onKeydown (event) {\n this.$emit('keydown', event);\n },\n\n async onAfterEnter () {\n this.$emit('update:open', true);\n await this.setFocusAfterTransition();\n },\n\n onAfterLeave () {\n const dialogEl = this.$refs.dialogEl;\n if (dialogEl?.open) {\n dialogEl.close();\n }\n this.previousActiveElement?.focus();\n this.previousActiveElement = null;\n },\n\n focusFirstTabbable (container) {\n const focusable = [...container.querySelectorAll(focusableSelector)];\n if (!focusable.length) return;\n let target = focusable[0];\n // If first focusable is an unchecked radio, prefer the checked radio in the same group.\n if (target.matches('[type=\"radio\"]:not(:checked)')) {\n target = focusable.find(el => el.checked && el.name === target.name) || target;\n }\n target.focus({ preventScroll: true });\n },\n\n async setFocusAfterTransition () {\n const dialogEl = this.$refs.dialogEl;\n if (!dialogEl) return;\n\n await this.$nextTick();\n\n if (this.initialFocusElement === 'first') {\n this.focusFirstTabbable(dialogEl);\n } else if (typeof this.initialFocusElement === 'string' && this.initialFocusElement.startsWith('#')) {\n const el = dialogEl.querySelector(this.initialFocusElement);\n if (el) {\n el.focus();\n } else {\n // eslint-disable-next-line no-console\n console.warn('Could not find the element specified in dt-modal prop \"initialFocusElement\". ' +\n 'Defaulting to focusing the first element.');\n this.focusFirstTabbable(dialogEl);\n }\n } else if (this.initialFocusElement instanceof HTMLElement) {\n this.initialFocusElement.focus();\n }\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;;;AAkJA,IAAM,IAAoB,0LAQrB,IAAU;CACb,MAAM;CAEN,YAAY;E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CAAA,EAAA,EAAb,EAAA,WAAU,EAAA,EAAA,CAAA,CAAA;;;GAGP,EAAA,eAAe,EAAA,OAAO,QAAO,IAAA,GAAA,EADrC,EAUM,OAAA;;IARH,OAAK,EAAA,CAAA,oBAAoD,EAAA,aAAA,CAAA;IAI1D,WAAQ;OAGR,EAAQ,EAAA,QAAA,UAAA,CAAA,EAAA,EAAA,KAAA,GAAA,EAEV,EASI,KAAA;;IAPD,OAAK,EAAA,CAAA,oBAAoD,EAAA,aAAA,CAAA;IAI1D,WAAQ;QAEL,EAAA,KAAI,EAAA,EAAA;GAGD,EAAA,iBAAA,GAAA,EADR,EAMS,UAAA;;IAJN,OAAK,EAAA,CAAA,mBAAsB,EAAA,YAAW,CAAA;OAGvC,EAAsB,EAAA,QAAA,SAAA,CAAA,EAAA,EAAA,IAAA,EAAA,IAAA,GAAA;GAGf,EAAA,kBAGT,EAgBY,GAAA;;IAdV,OAAM;IACN,WAAQ;IACP,MAAM;IACP,MAAK;IACL,YAAW;IACV,cAAY,EAAA;IACZ,OAAO,EAAA;IACP,SAAO,EAAA;;IAEG,MAAI,GAGX,EAHe,kBAAQ,CACzB,EAEE,GAAA,EADC,MAAM,GAAQ,EAAA,MAAA,GAAA,CAAA,OAAA,CAAA,CAAA,CAAA;;;;;;UAhBZ,GAAA,EADT,EAGE,GAAA;;IADC,SAAO,EAAA;;cA5DF,EAAA,KAAI,CAAA,CAAA,CAAA,CAAA;;;;;;;UArCU,EAAA;EAAI,cAAA;EAAA,cAAA;EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,GAAA,CAAA,YAAA,KAAA,CAAA"}
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),t=require(`./progress-circle-constants.cjs`);let n=require(`vue`);var r={name:`DtProgressCircle`,props:{ariaLabel:{type:String,required:!0},progress:{type:Number,default:0,validator:e=>e>=0&&e<=100},size:{type:String,default:`500`,validator:e=>Object.keys(t.PROGRESS_CIRCLE_SIZES).includes(e)},kind:{type:String,default:`default`,validator:e=>Object.keys(t.PROGRESS_CIRCLE_KINDS).includes(e)}},data(){return{strokeWidth:3.25,uid:Math.random().toString(36).substring(2,9)}},computed:{isAi(){return this.kind===`ai`},aiGradientId(){return`progress-circle-ai-gradient-${this.uid}`},fillStrokeStyle(){return this.isAi?{stroke:`url(#${this.aiGradientId})`}:{}},sizeClass(){return t.PROGRESS_CIRCLE_SIZES[this.size]},kindClass(){return t.PROGRESS_CIRCLE_KINDS[this.kind]},circleRadius(){return 12-this.strokeWidth/2},circleCircumference(){return 2*Math.PI*this.circleRadius},circlePath(){let e=this.circleRadius,t=12-e;return`M 12 ${t} A ${e} ${e} 0 0 1 12 ${12+e} A ${e} ${e} 0 0 1 12 ${t} Z`},cssVars(){let e=this.circleCircumference,t=e*(this.progress>0&&this.progress<5?5:this.progress)/100,n=this.strokeWidth,r=n/2,i=this.progress>0&&this.progress<100,a=i?n:0;return{"--stroke-dasharray":!i&&this.progress>=100?`none`:e,"--fill-dashoffset":e-Math.max(0,t-a),"--fill-rotate":`${i?r/e*360:0}deg`,"--track-dasharray":!i&&this.progress<=0?`none`:`${Math.max(0,e-t-a)} ${e}`,"--track-dashoffset":-(t+(i?r:0))}}}},i=[`aria-label`,`aria-valuenow`],a={key:0},o=[`id`],s=[`d`,`stroke-width`],c=[`d`,`stroke-width`];function l(e,t,r,l,u,d){return(0,n.openBlock)(),(0,n.createElementBlock)(`div`,{class:(0,n.normalizeClass)([`d-progress-circle`,[d.sizeClass,d.kindClass]]),role:`progressbar`,"aria-label":r.ariaLabel,tabindex:`-1`,"aria-valuenow":r.progress,"aria-valuemin":`0`,"aria-valuemax":`100`,"data-qa":`dt-progress-circle`},[((0,n.openBlock)(),(0,n.createElementBlock)(`svg`,{class:`d-progress-circle__bar`,style:(0,n.normalizeStyle)(d.cssVars),viewBox:`0 0 24 24`},[d.isAi?((0,n.openBlock)(),(0,n.createElementBlock)(`defs`,a,[(0,n.createElementVNode)(`linearGradient`,{id:d.aiGradientId,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`},[...t[0]||(t[0]=[(0,n.createElementVNode)(`stop`,{offset:`0%`,"stop-color":`var(--dt-color-brand-gold)`},null,-1),(0,n.createElementVNode)(`stop`,{offset:`33%`,"stop-color":`var(--dt-color-brand-red)`},null,-1),(0,n.createElementVNode)(`stop`,{offset:`66%`,"stop-color":`var(--dt-color-brand-magenta)`},null,-1),(0,n.createElementVNode)(`stop`,{offset:`100%`,"stop-color":`var(--dt-color-brand-purple)`},null,-1)])],8,o)])):(0,n.createCommentVNode)(``,!0),r.progress<=95?((0,n.openBlock)(),(0,n.createElementBlock)(`path`,{key:1,d:d.circlePath,class:`d-progress-circle__shape d-progress-circle__shape--track`,fill:`none`,"stroke-width":u.strokeWidth,"stroke-linecap":`round`},null,8,s)):(0,n.createCommentVNode)(``,!0),r.progress>0?((0,n.openBlock)(),(0,n.createElementBlock)(`path`,{key:2,d:d.circlePath,class:`d-progress-circle__shape d-progress-circle__shape--fill`,fill:`none`,"stroke-width":u.strokeWidth,"stroke-linecap":`round`,style:(0,n.normalizeStyle)(d.fillStrokeStyle)},null,12,c)):(0,n.createCommentVNode)(``,!0)],4))],10,i)}var u=e.t(r,[[`render`,l]]);exports.default=u;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/validators/index.cjs`),t=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),n=require(`./progress-circle-constants.cjs`);let r=require(`vue`);var i={name:`DtProgressCircle`,props:{ariaLabel:{type:String,required:!0},progress:{type:Number,default:0,validator:e=>e>=0&&e<=100},size:{type:[String,Number],default:500,validator:e.ordinalSizeValidator(n.PROGRESS_CIRCLE_SIZES)},kind:{type:String,default:`default`,validator:e=>Object.keys(n.PROGRESS_CIRCLE_KINDS).includes(e)}},data(){return{strokeWidth:3.25,uid:Math.random().toString(36).substring(2,9)}},computed:{isAi(){return this.kind===`ai`},aiGradientId(){return`progress-circle-ai-gradient-${this.uid}`},fillStrokeStyle(){return this.isAi?{stroke:`url(#${this.aiGradientId})`}:{}},sizeClass(){return n.PROGRESS_CIRCLE_SIZES[this.size]},kindClass(){return n.PROGRESS_CIRCLE_KINDS[this.kind]},circleRadius(){return 12-this.strokeWidth/2},circleCircumference(){return 2*Math.PI*this.circleRadius},circlePath(){let e=this.circleRadius,t=12-e;return`M 12 ${t} A ${e} ${e} 0 0 1 12 ${12+e} A ${e} ${e} 0 0 1 12 ${t} Z`},cssVars(){let e=this.circleCircumference,t=e*(this.progress>0&&this.progress<5?5:this.progress)/100,n=this.strokeWidth,r=n/2,i=this.progress>0&&this.progress<100,a=i?n:0;return{"--stroke-dasharray":!i&&this.progress>=100?`none`:e,"--fill-dashoffset":e-Math.max(0,t-a),"--fill-rotate":`${i?r/e*360:0}deg`,"--track-dasharray":!i&&this.progress<=0?`none`:`${Math.max(0,e-t-a)} ${e}`,"--track-dashoffset":-(t+(i?r:0))}}}},a=[`aria-label`,`aria-valuenow`],o={key:0},s=[`id`],c=[`d`,`stroke-width`],l=[`d`,`stroke-width`];function u(e,t,n,i,u,d){return(0,r.openBlock)(),(0,r.createElementBlock)(`div`,{class:(0,r.normalizeClass)([`d-progress-circle`,[d.sizeClass,d.kindClass]]),role:`progressbar`,"aria-label":n.ariaLabel,tabindex:`-1`,"aria-valuenow":n.progress,"aria-valuemin":`0`,"aria-valuemax":`100`,"data-qa":`dt-progress-circle`},[((0,r.openBlock)(),(0,r.createElementBlock)(`svg`,{class:`d-progress-circle__bar`,style:(0,r.normalizeStyle)(d.cssVars),viewBox:`0 0 24 24`},[d.isAi?((0,r.openBlock)(),(0,r.createElementBlock)(`defs`,o,[(0,r.createElementVNode)(`linearGradient`,{id:d.aiGradientId,x1:`0%`,y1:`0%`,x2:`100%`,y2:`100%`},[...t[0]||(t[0]=[(0,r.createElementVNode)(`stop`,{offset:`0%`,"stop-color":`var(--dt-color-brand-gold)`},null,-1),(0,r.createElementVNode)(`stop`,{offset:`33%`,"stop-color":`var(--dt-color-brand-red)`},null,-1),(0,r.createElementVNode)(`stop`,{offset:`66%`,"stop-color":`var(--dt-color-brand-magenta)`},null,-1),(0,r.createElementVNode)(`stop`,{offset:`100%`,"stop-color":`var(--dt-color-brand-purple)`},null,-1)])],8,s)])):(0,r.createCommentVNode)(``,!0),n.progress<=95?((0,r.openBlock)(),(0,r.createElementBlock)(`path`,{key:1,d:d.circlePath,class:`d-progress-circle__shape d-progress-circle__shape--track`,fill:`none`,"stroke-width":u.strokeWidth,"stroke-linecap":`round`},null,8,c)):(0,r.createCommentVNode)(``,!0),n.progress>0?((0,r.openBlock)(),(0,r.createElementBlock)(`path`,{key:2,d:d.circlePath,class:`d-progress-circle__shape d-progress-circle__shape--fill`,fill:`none`,"stroke-width":u.strokeWidth,"stroke-linecap":`round`,style:(0,r.normalizeStyle)(d.fillStrokeStyle)},null,12,l)):(0,r.createCommentVNode)(``,!0)],4))],10,a)}var d=t.t(i,[[`render`,u]]);exports.default=d;
2
2
  //# sourceMappingURL=progress-circle.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"progress-circle.cjs","names":[],"sources":["../../../components/ProgressCircle/ProgressCircle.vue"],"sourcesContent":["<script>\n/**\n * Circular SVG progress indicator for determinate upload or processing progress.\n * @see https://dialtone.dialpad.com/components/progress-circle.html\n */\nimport { PROGRESS_CIRCLE_SIZES, PROGRESS_CIRCLE_KINDS } from './ProgressCircleConstants';\n\nexport default {\n name: 'DtProgressCircle',\n props: {\n /** Accessible label read by screen readers. */\n ariaLabel: { type: String, required: true },\n /** Current progress value (0–100). */\n progress: {\n type: Number,\n default: 0,\n validator: (v) => v >= 0 && v <= 100,\n },\n\n /**\n * The size of the progress indicator, aligning to Dialtone icon sizes.\n * @values 100, 200, 300, 400, 500, 600, 700, 800\n */\n size: {\n type: String,\n default: '500',\n validator: (s) => Object.keys(PROGRESS_CIRCLE_SIZES).includes(s),\n },\n\n /**\n * The color variant of the progress indicator.\n * @values default, brand, critical, positive, warning, info, ai\n */\n kind: {\n type: String,\n default: 'default',\n validator: (k) => Object.keys(PROGRESS_CIRCLE_KINDS).includes(k),\n },\n },\n\n data () {\n return {\n strokeWidth: 3.25,\n uid: Math.random().toString(36).substring(2, 9),\n };\n },\n\n computed: {\n // SVG stroke doesn't support CSS gradients, so the \"ai\" kind uses an inline\n // SVG <linearGradient> referenced via url(#id) instead of a CSS variable.\n isAi () {\n return this.kind === 'ai';\n },\n\n // Unique per-instance to avoid collisions when multiple progress circles coexist.\n aiGradientId () {\n return `progress-circle-ai-gradient-${this.uid}`;\n },\n\n fillStrokeStyle () {\n return this.isAi ? { stroke: `url(#${this.aiGradientId})` } : {};\n },\n\n sizeClass () {\n return PROGRESS_CIRCLE_SIZES[this.size];\n },\n\n kindClass () {\n return PROGRESS_CIRCLE_KINDS[this.kind];\n },\n\n circleRadius () {\n return 12 - (this.strokeWidth / 2);\n },\n\n circleCircumference () {\n return 2 * Math.PI * this.circleRadius;\n },\n\n // Draws a full circle as two arcs so getTotalLength() returns the circumference.\n circlePath () {\n const r = this.circleRadius;\n const top = 12 - r;\n const bottom = 12 + r;\n return `M 12 ${top} A ${r} ${r} 0 0 1 12 ${bottom} A ${r} ${r} 0 0 1 12 ${top} Z`;\n },\n\n // stroke-dasharray/offset control how much of the circle is visually \"filled\".\n cssVars () {\n const C = this.circleCircumference;\n const MIN_VISUAL_PROGRESS = 5;\n const visualProgress = (this.progress > 0 && this.progress < MIN_VISUAL_PROGRESS)\n ? MIN_VISUAL_PROGRESS\n : this.progress;\n const fillLength = C * visualProgress / 100;\n const sw = this.strokeWidth;\n const capArc = sw / 2;\n\n // When both arcs are visible, round linecaps extend capArc past each endpoint.\n // Shorten each arc by capArc at both ends (total sw per arc) so the caps meet\n // exactly at each junction without overlapping. Rotate the fill forward by\n // capArc so its start cap lands at 12 o'clock.\n const both = this.progress > 0 && this.progress < 100;\n const adj = both ? sw : 0;\n\n return {\n // Full-circle arcs use 'none' to avoid round-cap overlap at the path seam.\n '--stroke-dasharray': (!both && this.progress >= 100) ? 'none' : C,\n '--fill-dashoffset': C - Math.max(0, fillLength - adj),\n '--fill-rotate': `${both ? (capArc / C * 360) : 0}deg`,\n '--track-dasharray': (!both && this.progress <= 0) ? 'none' : `${Math.max(0, C - fillLength - adj)} ${C}`,\n '--track-dashoffset': -(fillLength + (both ? capArc : 0)),\n };\n },\n },\n\n};\n</script>\n\n<template>\n <div\n class=\"d-progress-circle\"\n :class=\"[sizeClass, kindClass]\"\n role=\"progressbar\"\n :aria-label=\"ariaLabel\"\n tabindex=\"-1\"\n :aria-valuenow=\"progress\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n data-qa=\"dt-progress-circle\"\n >\n <svg\n class=\"d-progress-circle__bar\"\n :style=\"cssVars\"\n viewBox=\"0 0 24 24\"\n >\n <defs v-if=\"isAi\">\n <linearGradient\n :id=\"aiGradientId\"\n x1=\"0%\"\n y1=\"0%\"\n x2=\"100%\"\n y2=\"100%\"\n >\n <!-- This emulates the AI gradient, for which each color isn't directly mappable to a CSS variable -->\n <stop\n offset=\"0%\"\n stop-color=\"var(--dt-color-brand-gold)\"\n />\n <stop\n offset=\"33%\"\n stop-color=\"var(--dt-color-brand-red)\"\n />\n <stop\n offset=\"66%\"\n stop-color=\"var(--dt-color-brand-magenta)\"\n />\n <stop\n offset=\"100%\"\n stop-color=\"var(--dt-color-brand-purple)\"\n />\n </linearGradient>\n </defs>\n <path\n v-if=\"progress <= 95\"\n :d=\"circlePath\"\n class=\"d-progress-circle__shape d-progress-circle__shape--track\"\n fill=\"none\"\n :stroke-width=\"strokeWidth\"\n stroke-linecap=\"round\"\n />\n <path\n v-if=\"progress > 0\"\n :d=\"circlePath\"\n class=\"d-progress-circle__shape d-progress-circle__shape--fill\"\n fill=\"none\"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AAG,EAAA,WACJ,MAAM,0DACN,KAAK,OACJ,eAAc,EAAA,YACf,iBAAe,QACd,OAAA,EAAA,EAAA,gBAAO,EAAA,gBAAe"}
1
+ {"version":3,"file":"progress-circle.cjs","names":[],"sources":["../../../components/ProgressCircle/ProgressCircle.vue"],"sourcesContent":["<script>\n/**\n * Circular SVG progress indicator for determinate upload or processing progress.\n * @see https://dialtone.dialpad.com/components/progress-circle.html\n */\nimport { PROGRESS_CIRCLE_SIZES, PROGRESS_CIRCLE_KINDS } from './ProgressCircleConstants';\nimport { ordinalSizeValidator } from '@/common/validators';\n\nexport default {\n name: 'DtProgressCircle',\n props: {\n /** Accessible label read by screen readers. */\n ariaLabel: { type: String, required: true },\n /** Current progress value (0–100). */\n progress: {\n type: Number,\n default: 0,\n validator: (v) => v >= 0 && v <= 100,\n },\n\n /**\n * The size of the progress indicator, aligning to Dialtone icon sizes.\n * @values 100, 200, 300, 400, 500, 600, 700, 800\n */\n size: {\n type: [String, Number],\n default: 500,\n validator: ordinalSizeValidator(PROGRESS_CIRCLE_SIZES),\n },\n\n /**\n * The color variant of the progress indicator.\n * @values default, brand, critical, positive, warning, info, ai\n */\n kind: {\n type: String,\n default: 'default',\n validator: (k) => Object.keys(PROGRESS_CIRCLE_KINDS).includes(k),\n },\n },\n\n data () {\n return {\n strokeWidth: 3.25,\n uid: Math.random().toString(36).substring(2, 9),\n };\n },\n\n computed: {\n // SVG stroke doesn't support CSS gradients, so the \"ai\" kind uses an inline\n // SVG <linearGradient> referenced via url(#id) instead of a CSS variable.\n isAi () {\n return this.kind === 'ai';\n },\n\n // Unique per-instance to avoid collisions when multiple progress circles coexist.\n aiGradientId () {\n return `progress-circle-ai-gradient-${this.uid}`;\n },\n\n fillStrokeStyle () {\n return this.isAi ? { stroke: `url(#${this.aiGradientId})` } : {};\n },\n\n sizeClass () {\n return PROGRESS_CIRCLE_SIZES[this.size];\n },\n\n kindClass () {\n return PROGRESS_CIRCLE_KINDS[this.kind];\n },\n\n circleRadius () {\n return 12 - (this.strokeWidth / 2);\n },\n\n circleCircumference () {\n return 2 * Math.PI * this.circleRadius;\n },\n\n // Draws a full circle as two arcs so getTotalLength() returns the circumference.\n circlePath () {\n const r = this.circleRadius;\n const top = 12 - r;\n const bottom = 12 + r;\n return `M 12 ${top} A ${r} ${r} 0 0 1 12 ${bottom} A ${r} ${r} 0 0 1 12 ${top} Z`;\n },\n\n // stroke-dasharray/offset control how much of the circle is visually \"filled\".\n cssVars () {\n const C = this.circleCircumference;\n const MIN_VISUAL_PROGRESS = 5;\n const visualProgress = (this.progress > 0 && this.progress < MIN_VISUAL_PROGRESS)\n ? MIN_VISUAL_PROGRESS\n : this.progress;\n const fillLength = C * visualProgress / 100;\n const sw = this.strokeWidth;\n const capArc = sw / 2;\n\n // When both arcs are visible, round linecaps extend capArc past each endpoint.\n // Shorten each arc by capArc at both ends (total sw per arc) so the caps meet\n // exactly at each junction without overlapping. Rotate the fill forward by\n // capArc so its start cap lands at 12 o'clock.\n const both = this.progress > 0 && this.progress < 100;\n const adj = both ? sw : 0;\n\n return {\n // Full-circle arcs use 'none' to avoid round-cap overlap at the path seam.\n '--stroke-dasharray': (!both && this.progress >= 100) ? 'none' : C,\n '--fill-dashoffset': C - Math.max(0, fillLength - adj),\n '--fill-rotate': `${both ? (capArc / C * 360) : 0}deg`,\n '--track-dasharray': (!both && this.progress <= 0) ? 'none' : `${Math.max(0, C - fillLength - adj)} ${C}`,\n '--track-dashoffset': -(fillLength + (both ? capArc : 0)),\n };\n },\n },\n\n};\n</script>\n\n<template>\n <div\n class=\"d-progress-circle\"\n :class=\"[sizeClass, kindClass]\"\n role=\"progressbar\"\n :aria-label=\"ariaLabel\"\n tabindex=\"-1\"\n :aria-valuenow=\"progress\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n data-qa=\"dt-progress-circle\"\n >\n <svg\n class=\"d-progress-circle__bar\"\n :style=\"cssVars\"\n viewBox=\"0 0 24 24\"\n >\n <defs v-if=\"isAi\">\n <linearGradient\n :id=\"aiGradientId\"\n x1=\"0%\"\n y1=\"0%\"\n x2=\"100%\"\n y2=\"100%\"\n >\n <!-- This emulates the AI gradient, for which each color isn't directly mappable to a CSS variable -->\n <stop\n offset=\"0%\"\n stop-color=\"var(--dt-color-brand-gold)\"\n />\n <stop\n offset=\"33%\"\n stop-color=\"var(--dt-color-brand-red)\"\n />\n <stop\n offset=\"66%\"\n stop-color=\"var(--dt-color-brand-magenta)\"\n />\n <stop\n offset=\"100%\"\n stop-color=\"var(--dt-color-brand-purple)\"\n />\n </linearGradient>\n </defs>\n <path\n v-if=\"progress <= 95\"\n :d=\"circlePath\"\n class=\"d-progress-circle__shape d-progress-circle__shape--track\"\n fill=\"none\"\n :stroke-width=\"strokeWidth\"\n stroke-linecap=\"round\"\n />\n <path\n v-if=\"progress > 0\"\n :d=\"circlePath\"\n class=\"d-progress-circle__shape d-progress-circle__shape--fill\"\n fill=\"none\"\n :stroke-width=\"strokeWidth\"\n stroke-linecap=\"round\"\n :style=\"fillStrokeStyle\"\n />\n </svg>\n </div>\n</template>\n"],"mappings":"oTAQA,IAAK,EAAU,CACb,KAAM,mBACN,MAAO,CAEL,UAAW,CAAE,KAAM,OAAQ,SAAU,GAAM,CAE3C,SAAU,CACR,KAAM,OACN,QAAS,EACT,UAAY,GAAM,GAAK,GAAK,GAAK,IAClC,CAMD,KAAM,CACJ,KAAM,CAAC,OAAQ,OAAO,CACtB,QAAS,IACT,UAAW,EAAA,qBAAqB,EAAA,sBAAsB,CACvD,CAMD,KAAM,CACJ,KAAM,OACN,QAAS,UACT,UAAY,GAAM,OAAO,KAAK,EAAA,sBAAsB,CAAC,SAAS,EAAE,CACjE,CACF,CAED,MAAQ,CACN,MAAO,CACL,YAAa,KACb,IAAK,KAAK,QAAQ,CAAC,SAAS,GAAG,CAAC,UAAU,EAAG,EAAE,CAChD,EAGH,SAAU,CAGR,MAAQ,CACN,OAAO,KAAK,OAAS,MAIvB,cAAgB,CACd,MAAO,+BAA+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