@dialpad/dialtone 9.126.5 → 9.127.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (449) hide show
  1. package/README.md +1 -1
  2. package/dist/tokens/doc.json +29906 -29906
  3. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  4. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
  5. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +7 -7
  6. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  7. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  8. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
  9. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js +5 -5
  10. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  11. package/dist/vue2/lib/datepicker/datepicker.cjs +1 -1
  12. package/dist/vue2/lib/datepicker/datepicker.cjs.map +1 -1
  13. package/dist/vue2/lib/datepicker/datepicker.js +10 -10
  14. package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
  15. package/dist/vue2/lib/dropdown/dropdown.cjs +1 -1
  16. package/dist/vue2/lib/dropdown/dropdown.cjs.map +1 -1
  17. package/dist/vue2/lib/dropdown/dropdown.js +24 -26
  18. package/dist/vue2/lib/dropdown/dropdown.js.map +1 -1
  19. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  20. package/dist/vue2/lib/emoji-picker/emoji-picker.js +1 -0
  21. package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
  22. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +3 -3
  23. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  24. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +65 -65
  25. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  26. package/dist/vue2/lib/toast/toast.cjs.map +1 -1
  27. package/dist/vue2/lib/toast/toast.js.map +1 -1
  28. package/dist/vue2/localization/de-DE.cjs +1 -13
  29. package/dist/vue2/localization/de-DE.cjs.map +1 -1
  30. package/dist/vue2/localization/de-DE.js +1 -13
  31. package/dist/vue2/localization/de-DE.js.map +1 -1
  32. package/dist/vue2/localization/es-LA.cjs +1 -13
  33. package/dist/vue2/localization/es-LA.cjs.map +1 -1
  34. package/dist/vue2/localization/es-LA.js +1 -13
  35. package/dist/vue2/localization/es-LA.js.map +1 -1
  36. package/dist/vue2/localization/fr-FR.cjs +1 -13
  37. package/dist/vue2/localization/fr-FR.cjs.map +1 -1
  38. package/dist/vue2/localization/fr-FR.js +1 -13
  39. package/dist/vue2/localization/fr-FR.js.map +1 -1
  40. package/dist/vue2/localization/it-IT.cjs +1 -13
  41. package/dist/vue2/localization/it-IT.cjs.map +1 -1
  42. package/dist/vue2/localization/it-IT.js +1 -13
  43. package/dist/vue2/localization/it-IT.js.map +1 -1
  44. package/dist/vue2/localization/ja-JP.cjs +1 -8
  45. package/dist/vue2/localization/ja-JP.cjs.map +1 -1
  46. package/dist/vue2/localization/ja-JP.js +1 -8
  47. package/dist/vue2/localization/ja-JP.js.map +1 -1
  48. package/dist/vue2/localization/nl-NL.cjs +1 -13
  49. package/dist/vue2/localization/nl-NL.cjs.map +1 -1
  50. package/dist/vue2/localization/nl-NL.js +1 -13
  51. package/dist/vue2/localization/nl-NL.js.map +1 -1
  52. package/dist/vue2/localization/pt-BR.cjs +1 -13
  53. package/dist/vue2/localization/pt-BR.cjs.map +1 -1
  54. package/dist/vue2/localization/pt-BR.js +1 -13
  55. package/dist/vue2/localization/pt-BR.js.map +1 -1
  56. package/dist/vue2/localization/ru-RU.cjs +1 -23
  57. package/dist/vue2/localization/ru-RU.cjs.map +1 -1
  58. package/dist/vue2/localization/ru-RU.js +1 -23
  59. package/dist/vue2/localization/ru-RU.js.map +1 -1
  60. package/dist/vue2/localization/zh-CN.cjs +1 -8
  61. package/dist/vue2/localization/zh-CN.cjs.map +1 -1
  62. package/dist/vue2/localization/zh-CN.js +1 -8
  63. package/dist/vue2/localization/zh-CN.js.map +1 -1
  64. package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
  65. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  66. package/dist/vue2/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
  67. package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +1 -1
  68. package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
  69. package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
  70. package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
  71. package/dist/vue3/common/mixins/index.cjs +1 -1
  72. package/dist/vue3/common/mixins/index.js +8 -10
  73. package/dist/vue3/common/mixins/index.js.map +1 -1
  74. package/dist/vue3/common/utils/index.cjs +1 -1
  75. package/dist/vue3/common/utils/index.cjs.map +1 -1
  76. package/dist/vue3/common/utils/index.js +42 -38
  77. package/dist/vue3/common/utils/index.js.map +1 -1
  78. package/dist/vue3/component-documentation.json +1 -1
  79. package/dist/vue3/dialtone-vue.cjs +1 -1
  80. package/dist/vue3/dialtone-vue.js +298 -299
  81. package/dist/vue3/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  82. package/dist/vue3/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
  83. package/dist/vue3/lib/attachment-carousel/attachment-carousel.js +86 -110
  84. package/dist/vue3/lib/attachment-carousel/attachment-carousel.js.map +1 -1
  85. package/dist/vue3/lib/banner/banner.cjs +2 -2
  86. package/dist/vue3/lib/banner/banner.cjs.map +1 -1
  87. package/dist/vue3/lib/banner/banner.js +27 -38
  88. package/dist/vue3/lib/banner/banner.js.map +1 -1
  89. package/dist/vue3/lib/breadcrumbs/breadcrumbs.cjs +1 -1
  90. package/dist/vue3/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
  91. package/dist/vue3/lib/breadcrumbs/breadcrumbs.js +20 -18
  92. package/dist/vue3/lib/breadcrumbs/breadcrumbs.js.map +1 -1
  93. package/dist/vue3/lib/button/button.cjs +1 -1
  94. package/dist/vue3/lib/button/button.cjs.map +1 -1
  95. package/dist/vue3/lib/button/button.js +26 -24
  96. package/dist/vue3/lib/button/button.js.map +1 -1
  97. package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  98. package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
  99. package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +36 -41
  100. package/dist/vue3/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  101. package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  102. package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
  103. package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.js +35 -37
  104. package/dist/vue3/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  105. package/dist/vue3/lib/chip/chip.cjs +1 -1
  106. package/dist/vue3/lib/chip/chip.cjs.map +1 -1
  107. package/dist/vue3/lib/chip/chip.js +54 -57
  108. package/dist/vue3/lib/chip/chip.js.map +1 -1
  109. package/dist/vue3/lib/combobox/combobox-constants.cjs +1 -1
  110. package/dist/vue3/lib/combobox/combobox-constants.cjs.map +1 -1
  111. package/dist/vue3/lib/combobox/combobox-constants.js +2 -2
  112. package/dist/vue3/lib/combobox/combobox-constants.js.map +1 -1
  113. package/dist/vue3/lib/combobox/combobox-empty-list.cjs.map +1 -1
  114. package/dist/vue3/lib/combobox/combobox-empty-list.js.map +1 -1
  115. package/dist/vue3/lib/combobox/combobox-loading-list.cjs.map +1 -1
  116. package/dist/vue3/lib/combobox/combobox-loading-list.js.map +1 -1
  117. package/dist/vue3/lib/combobox/combobox.cjs +2 -2
  118. package/dist/vue3/lib/combobox/combobox.cjs.map +1 -1
  119. package/dist/vue3/lib/combobox/combobox.js +20 -20
  120. package/dist/vue3/lib/combobox/combobox.js.map +1 -1
  121. package/dist/vue3/lib/combobox/index.cjs +1 -1
  122. package/dist/vue3/lib/combobox/index.js +3 -3
  123. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  124. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  125. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js +119 -124
  126. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  127. package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
  128. package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
  129. package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.js +76 -80
  130. package/dist/vue3/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
  131. package/dist/vue3/lib/contact-centers-row/contact-centers-row.cjs +1 -1
  132. package/dist/vue3/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
  133. package/dist/vue3/lib/contact-centers-row/contact-centers-row.js +68 -63
  134. package/dist/vue3/lib/contact-centers-row/contact-centers-row.js.map +1 -1
  135. package/dist/vue3/lib/contact-row/contact-row.cjs +1 -1
  136. package/dist/vue3/lib/contact-row/contact-row.cjs.map +1 -1
  137. package/dist/vue3/lib/contact-row/contact-row.js +32 -48
  138. package/dist/vue3/lib/contact-row/contact-row.js.map +1 -1
  139. package/dist/vue3/lib/datepicker/datepicker-constants.cjs +1 -1
  140. package/dist/vue3/lib/datepicker/datepicker-constants.cjs.map +1 -1
  141. package/dist/vue3/lib/datepicker/datepicker-constants.js +2 -3
  142. package/dist/vue3/lib/datepicker/datepicker-constants.js.map +1 -1
  143. package/dist/vue3/lib/datepicker/datepicker.cjs +1 -1
  144. package/dist/vue3/lib/datepicker/datepicker.cjs.map +1 -1
  145. package/dist/vue3/lib/datepicker/datepicker.js +264 -349
  146. package/dist/vue3/lib/datepicker/datepicker.js.map +1 -1
  147. package/dist/vue3/lib/datepicker/formatUtils.cjs +1 -1
  148. package/dist/vue3/lib/datepicker/formatUtils.cjs.map +1 -1
  149. package/dist/vue3/lib/datepicker/formatUtils.js +21 -20
  150. package/dist/vue3/lib/datepicker/formatUtils.js.map +1 -1
  151. package/dist/vue3/lib/datepicker/utils.cjs +1 -1
  152. package/dist/vue3/lib/datepicker/utils.cjs.map +1 -1
  153. package/dist/vue3/lib/datepicker/utils.js +12 -11
  154. package/dist/vue3/lib/datepicker/utils.js.map +1 -1
  155. package/dist/vue3/lib/description-list/description-list.cjs +1 -1
  156. package/dist/vue3/lib/description-list/description-list.cjs.map +1 -1
  157. package/dist/vue3/lib/description-list/description-list.js +10 -10
  158. package/dist/vue3/lib/description-list/description-list.js.map +1 -1
  159. package/dist/vue3/lib/dropdown/dropdown.cjs +1 -1
  160. package/dist/vue3/lib/dropdown/dropdown.cjs.map +1 -1
  161. package/dist/vue3/lib/dropdown/dropdown.js +36 -46
  162. package/dist/vue3/lib/dropdown/dropdown.js.map +1 -1
  163. package/dist/vue3/lib/editor/editor.cjs +1 -1
  164. package/dist/vue3/lib/editor/editor.cjs.map +1 -1
  165. package/dist/vue3/lib/editor/editor.js +169 -186
  166. package/dist/vue3/lib/editor/editor.js.map +1 -1
  167. package/dist/vue3/lib/editor/index.cjs +1 -1
  168. package/dist/vue3/lib/editor/index.js +2 -2
  169. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs +1 -1
  170. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
  171. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js +7 -20
  172. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js.map +1 -1
  173. package/dist/vue3/lib/emoji-picker/emoji-picker.cjs +1 -1
  174. package/dist/vue3/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  175. package/dist/vue3/lib/emoji-picker/emoji-picker.js +419 -477
  176. package/dist/vue3/lib/emoji-picker/emoji-picker.js.map +1 -1
  177. package/dist/vue3/lib/emoji-picker/index.cjs +1 -1
  178. package/dist/vue3/lib/emoji-picker/index.js +3 -4
  179. package/dist/vue3/lib/emoji-row/emoji-row-constants.cjs +1 -1
  180. package/dist/vue3/lib/emoji-row/emoji-row-constants.cjs.map +1 -1
  181. package/dist/vue3/lib/emoji-row/emoji-row-constants.js +6 -7
  182. package/dist/vue3/lib/emoji-row/emoji-row-constants.js.map +1 -1
  183. package/dist/vue3/lib/emoji-row/emoji-row.cjs +1 -1
  184. package/dist/vue3/lib/emoji-row/emoji-row.cjs.map +1 -1
  185. package/dist/vue3/lib/emoji-row/emoji-row.js +53 -43
  186. package/dist/vue3/lib/emoji-row/emoji-row.js.map +1 -1
  187. package/dist/vue3/lib/feed-item-pill/feed-item-pill.cjs +1 -1
  188. package/dist/vue3/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
  189. package/dist/vue3/lib/feed-item-pill/feed-item-pill.js +52 -53
  190. package/dist/vue3/lib/feed-item-pill/feed-item-pill.js.map +1 -1
  191. package/dist/vue3/lib/general-row/general-row.cjs +1 -1
  192. package/dist/vue3/lib/general-row/general-row.cjs.map +1 -1
  193. package/dist/vue3/lib/general-row/general-row.js +133 -118
  194. package/dist/vue3/lib/general-row/general-row.js.map +1 -1
  195. package/dist/vue3/lib/group-row/group-row.cjs +1 -1
  196. package/dist/vue3/lib/group-row/group-row.cjs.map +1 -1
  197. package/dist/vue3/lib/group-row/group-row.js +53 -39
  198. package/dist/vue3/lib/group-row/group-row.js.map +1 -1
  199. package/dist/vue3/lib/icon/icon-constants.cjs.map +1 -1
  200. package/dist/vue3/lib/icon/icon-constants.js.map +1 -1
  201. package/dist/vue3/lib/icon/icon.cjs +1 -1
  202. package/dist/vue3/lib/icon/icon.cjs.map +1 -1
  203. package/dist/vue3/lib/icon/icon.js +15 -11
  204. package/dist/vue3/lib/icon/icon.js.map +1 -1
  205. package/dist/vue3/lib/image-viewer/image-viewer.cjs +1 -1
  206. package/dist/vue3/lib/image-viewer/image-viewer.cjs.map +1 -1
  207. package/dist/vue3/lib/image-viewer/image-viewer.js +51 -47
  208. package/dist/vue3/lib/image-viewer/image-viewer.js.map +1 -1
  209. package/dist/vue3/lib/ivr-node/ivr-node-constants.cjs +1 -1
  210. package/dist/vue3/lib/ivr-node/ivr-node-constants.cjs.map +1 -1
  211. package/dist/vue3/lib/ivr-node/ivr-node-constants.js +24 -24
  212. package/dist/vue3/lib/ivr-node/ivr-node-constants.js.map +1 -1
  213. package/dist/vue3/lib/ivr-node/ivr-node.cjs +1 -1
  214. package/dist/vue3/lib/ivr-node/ivr-node.cjs.map +1 -1
  215. package/dist/vue3/lib/ivr-node/ivr-node.js +80 -76
  216. package/dist/vue3/lib/ivr-node/ivr-node.js.map +1 -1
  217. package/dist/vue3/lib/message-input/message-input-link.cjs +1 -1
  218. package/dist/vue3/lib/message-input/message-input-link.cjs.map +1 -1
  219. package/dist/vue3/lib/message-input/message-input-link.js +100 -77
  220. package/dist/vue3/lib/message-input/message-input-link.js.map +1 -1
  221. package/dist/vue3/lib/message-input/message-input-topbar.cjs +1 -1
  222. package/dist/vue3/lib/message-input/message-input-topbar.cjs.map +1 -1
  223. package/dist/vue3/lib/message-input/message-input-topbar.js +126 -94
  224. package/dist/vue3/lib/message-input/message-input-topbar.js.map +1 -1
  225. package/dist/vue3/lib/message-input/message-input.cjs +1 -1
  226. package/dist/vue3/lib/message-input/message-input.cjs.map +1 -1
  227. package/dist/vue3/lib/message-input/message-input.js +272 -296
  228. package/dist/vue3/lib/message-input/message-input.js.map +1 -1
  229. package/dist/vue3/lib/modal/modal.cjs +1 -2
  230. package/dist/vue3/lib/modal/modal.cjs.map +1 -1
  231. package/dist/vue3/lib/modal/modal.js +64 -79
  232. package/dist/vue3/lib/modal/modal.js.map +1 -1
  233. package/dist/vue3/lib/notice/notice-action.cjs +1 -1
  234. package/dist/vue3/lib/notice/notice-action.cjs.map +1 -1
  235. package/dist/vue3/lib/notice/notice-action.js +38 -39
  236. package/dist/vue3/lib/notice/notice-action.js.map +1 -1
  237. package/dist/vue3/lib/notice/notice.cjs +1 -1
  238. package/dist/vue3/lib/notice/notice.cjs.map +1 -1
  239. package/dist/vue3/lib/notice/notice.js +37 -49
  240. package/dist/vue3/lib/notice/notice.js.map +1 -1
  241. package/dist/vue3/lib/pagination/pagination.cjs +1 -1
  242. package/dist/vue3/lib/pagination/pagination.cjs.map +1 -1
  243. package/dist/vue3/lib/pagination/pagination.js +72 -81
  244. package/dist/vue3/lib/pagination/pagination.js.map +1 -1
  245. package/dist/vue3/lib/popover/popover-header-footer.cjs +1 -1
  246. package/dist/vue3/lib/popover/popover-header-footer.cjs.map +1 -1
  247. package/dist/vue3/lib/popover/popover-header-footer.js +44 -45
  248. package/dist/vue3/lib/popover/popover-header-footer.js.map +1 -1
  249. package/dist/vue3/lib/popover/popover.cjs +1 -1
  250. package/dist/vue3/lib/popover/popover.cjs.map +1 -1
  251. package/dist/vue3/lib/popover/popover.js +26 -37
  252. package/dist/vue3/lib/popover/popover.js.map +1 -1
  253. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +4 -4
  254. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  255. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +187 -185
  256. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  257. package/dist/vue3/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
  258. package/dist/vue3/lib/settings-menu-button/settings-menu-button.js.map +1 -1
  259. package/dist/vue3/lib/time-pill/time-pill.cjs.map +1 -1
  260. package/dist/vue3/lib/time-pill/time-pill.js.map +1 -1
  261. package/dist/vue3/lib/toast/toast.cjs +1 -1
  262. package/dist/vue3/lib/toast/toast.cjs.map +1 -1
  263. package/dist/vue3/lib/toast/toast.js +83 -127
  264. package/dist/vue3/lib/toast/toast.js.map +1 -1
  265. package/dist/vue3/lib/unread-pill/unread-pill.cjs +1 -1
  266. package/dist/vue3/lib/unread-pill/unread-pill.cjs.map +1 -1
  267. package/dist/vue3/lib/unread-pill/unread-pill.js +25 -14
  268. package/dist/vue3/lib/unread-pill/unread-pill.js.map +1 -1
  269. package/dist/vue3/localization/de-DE.cjs +157 -0
  270. package/dist/vue3/localization/de-DE.cjs.map +1 -0
  271. package/dist/vue3/localization/de-DE.js +160 -0
  272. package/dist/vue3/localization/de-DE.js.map +1 -0
  273. package/dist/vue3/localization/en-US.cjs +175 -0
  274. package/dist/vue3/localization/en-US.cjs.map +1 -0
  275. package/dist/vue3/localization/en-US.js +178 -0
  276. package/dist/vue3/localization/en-US.js.map +1 -0
  277. package/dist/vue3/localization/es-LA.cjs +157 -0
  278. package/dist/vue3/localization/es-LA.cjs.map +1 -0
  279. package/dist/vue3/localization/es-LA.js +160 -0
  280. package/dist/vue3/localization/es-LA.js.map +1 -0
  281. package/dist/vue3/localization/fr-FR.cjs +157 -0
  282. package/dist/vue3/localization/fr-FR.cjs.map +1 -0
  283. package/dist/vue3/localization/fr-FR.js +160 -0
  284. package/dist/vue3/localization/fr-FR.js.map +1 -0
  285. package/dist/vue3/localization/index.cjs +2 -0
  286. package/dist/vue3/localization/index.cjs.map +1 -0
  287. package/dist/vue3/localization/index.js +82 -0
  288. package/dist/vue3/localization/index.js.map +1 -0
  289. package/dist/vue3/localization/it-IT.cjs +157 -0
  290. package/dist/vue3/localization/it-IT.cjs.map +1 -0
  291. package/dist/vue3/localization/it-IT.js +160 -0
  292. package/dist/vue3/localization/it-IT.js.map +1 -0
  293. package/dist/vue3/localization/ja-JP.cjs +157 -0
  294. package/dist/vue3/localization/ja-JP.cjs.map +1 -0
  295. package/dist/vue3/localization/ja-JP.js +160 -0
  296. package/dist/vue3/localization/ja-JP.js.map +1 -0
  297. package/dist/vue3/localization/nl-NL.cjs +157 -0
  298. package/dist/vue3/localization/nl-NL.cjs.map +1 -0
  299. package/dist/vue3/localization/nl-NL.js +160 -0
  300. package/dist/vue3/localization/nl-NL.js.map +1 -0
  301. package/dist/vue3/localization/pt-BR.cjs +157 -0
  302. package/dist/vue3/localization/pt-BR.cjs.map +1 -0
  303. package/dist/vue3/localization/pt-BR.js +160 -0
  304. package/dist/vue3/localization/pt-BR.js.map +1 -0
  305. package/dist/vue3/localization/ru-RU.cjs +157 -0
  306. package/dist/vue3/localization/ru-RU.cjs.map +1 -0
  307. package/dist/vue3/localization/ru-RU.js +160 -0
  308. package/dist/vue3/localization/ru-RU.js.map +1 -0
  309. package/dist/vue3/localization/zh-CN.cjs +157 -0
  310. package/dist/vue3/localization/zh-CN.cjs.map +1 -0
  311. package/dist/vue3/localization/zh-CN.js +160 -0
  312. package/dist/vue3/localization/zh-CN.js.map +1 -0
  313. package/dist/vue3/shared/sr_only_close_button.cjs +1 -1
  314. package/dist/vue3/shared/sr_only_close_button.cjs.map +1 -1
  315. package/dist/vue3/shared/sr_only_close_button.js +27 -25
  316. package/dist/vue3/shared/sr_only_close_button.js.map +1 -1
  317. package/dist/vue3/types/common/mixins/index.d.ts +0 -1
  318. package/dist/vue3/types/common/sr_only_close_button.vue.d.ts +8 -15
  319. package/dist/vue3/types/common/sr_only_close_button.vue.d.ts.map +1 -1
  320. package/dist/vue3/types/common/utils/index.d.ts +1 -0
  321. package/dist/vue3/types/common/utils/index.d.ts.map +1 -1
  322. package/dist/vue3/types/components/banner/banner.vue.d.ts +0 -33
  323. package/dist/vue3/types/components/banner/banner.vue.d.ts.map +1 -1
  324. package/dist/vue3/types/components/breadcrumbs/breadcrumbs.vue.d.ts +2 -0
  325. package/dist/vue3/types/components/breadcrumbs/breadcrumbs.vue.d.ts.map +1 -1
  326. package/dist/vue3/types/components/button/button.vue.d.ts +2 -0
  327. package/dist/vue3/types/components/button/button.vue.d.ts.map +1 -1
  328. package/dist/vue3/types/components/chip/chip.vue.d.ts +3 -15
  329. package/dist/vue3/types/components/chip/chip.vue.d.ts.map +1 -1
  330. package/dist/vue3/types/components/combobox/combobox.vue.d.ts.map +1 -1
  331. package/dist/vue3/types/components/combobox/combobox_constants.d.ts +2 -2
  332. package/dist/vue3/types/components/combobox/index.d.ts +1 -1
  333. package/dist/vue3/types/components/datepicker/composables/useCalendar.d.ts.map +1 -1
  334. package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts +5 -1
  335. package/dist/vue3/types/components/datepicker/composables/useMonthYearPicker.d.ts.map +1 -1
  336. package/dist/vue3/types/components/datepicker/datepicker.vue.d.ts.map +1 -1
  337. package/dist/vue3/types/components/datepicker/datepicker_constants.d.ts +0 -1
  338. package/dist/vue3/types/components/datepicker/datepicker_constants.d.ts.map +1 -1
  339. package/dist/vue3/types/components/datepicker/formatUtils.d.ts +5 -5
  340. package/dist/vue3/types/components/datepicker/formatUtils.d.ts.map +1 -1
  341. package/dist/vue3/types/components/datepicker/modules/calendar.vue.d.ts +0 -4
  342. package/dist/vue3/types/components/datepicker/modules/calendar.vue.d.ts.map +1 -1
  343. package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts +0 -12
  344. package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts.map +1 -1
  345. package/dist/vue3/types/components/datepicker/utils.d.ts +1 -0
  346. package/dist/vue3/types/components/datepicker/utils.d.ts.map +1 -1
  347. package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts +0 -24
  348. package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
  349. package/dist/vue3/types/components/emoji_picker/emoji_picker_constants.d.ts +0 -13
  350. package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
  351. package/dist/vue3/types/components/icon/icon.vue.d.ts +1 -0
  352. package/dist/vue3/types/components/icon/icon_constants.d.ts.map +1 -1
  353. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts +3 -8
  354. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  355. package/dist/vue3/types/components/modal/modal.vue.d.ts +3 -35
  356. package/dist/vue3/types/components/modal/modal.vue.d.ts.map +1 -1
  357. package/dist/vue3/types/components/notice/notice.vue.d.ts +1 -34
  358. package/dist/vue3/types/components/notice/notice.vue.d.ts.map +1 -1
  359. package/dist/vue3/types/components/notice/notice_action.vue.d.ts +7 -35
  360. package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
  361. package/dist/vue3/types/components/pagination/pagination.vue.d.ts +5 -24
  362. package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
  363. package/dist/vue3/types/components/popover/popover.vue.d.ts +0 -33
  364. package/dist/vue3/types/components/popover/popover.vue.d.ts.map +1 -1
  365. package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts +5 -10
  366. package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
  367. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +2 -0
  368. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  369. package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +2 -46
  370. package/dist/vue3/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
  371. package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts +1 -34
  372. package/dist/vue3/types/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
  373. package/dist/vue3/types/components/toast/toast.vue.d.ts +4 -115
  374. package/dist/vue3/types/components/toast/toast.vue.d.ts.map +1 -1
  375. package/dist/vue3/types/index.d.ts +1 -0
  376. package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +3 -11
  377. package/dist/vue3/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
  378. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +3 -10
  379. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
  380. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +4 -8
  381. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  382. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node_constants.d.ts +7 -7
  383. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node_constants.d.ts.map +1 -1
  384. package/dist/vue3/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
  385. package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -25
  386. package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
  387. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +3 -41
  388. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  389. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +6 -25
  390. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -1
  391. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +2 -2
  392. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +6 -49
  393. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  394. package/dist/vue3/types/recipes/conversation_view/editor/index.d.ts +1 -1
  395. package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +6 -2
  396. package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
  397. package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row_constants.d.ts.map +1 -1
  398. package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +3 -8
  399. package/dist/vue3/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
  400. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -1
  401. package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +6 -1
  402. package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
  403. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +12 -88
  404. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  405. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +11 -1
  406. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
  407. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +13 -1
  408. package/dist/vue3/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
  409. package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +5 -8
  410. package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
  411. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -18
  412. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  413. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +9 -27
  414. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  415. package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts +11 -21
  416. package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
  417. package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +6 -2
  418. package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  419. package/package.json +2 -2
  420. package/dist/vue3/common/mixins/sr-only-close-button.cjs +0 -3
  421. package/dist/vue3/common/mixins/sr-only-close-button.cjs.map +0 -1
  422. package/dist/vue3/common/mixins/sr-only-close-button.js +0 -44
  423. package/dist/vue3/common/mixins/sr-only-close-button.js.map +0 -1
  424. package/dist/vue3/lib/contact-row/contact-row-constants.cjs +0 -2
  425. package/dist/vue3/lib/contact-row/contact-row-constants.cjs.map +0 -1
  426. package/dist/vue3/lib/contact-row/contact-row-constants.js +0 -5
  427. package/dist/vue3/lib/contact-row/contact-row-constants.js.map +0 -1
  428. package/dist/vue3/lib/emoji/emoji-constants.cjs +0 -2
  429. package/dist/vue3/lib/emoji/emoji-constants.cjs.map +0 -1
  430. package/dist/vue3/lib/emoji/emoji-constants.js +0 -5
  431. package/dist/vue3/lib/emoji/emoji-constants.js.map +0 -1
  432. package/dist/vue3/lib/group-row/group-row-constants.cjs +0 -2
  433. package/dist/vue3/lib/group-row/group-row-constants.cjs.map +0 -1
  434. package/dist/vue3/lib/group-row/group-row-constants.js +0 -8
  435. package/dist/vue3/lib/group-row/group-row-constants.js.map +0 -1
  436. package/dist/vue3/lib/time-pill/time-pill-constants.cjs +0 -2
  437. package/dist/vue3/lib/time-pill/time-pill-constants.cjs.map +0 -1
  438. package/dist/vue3/lib/time-pill/time-pill-constants.js +0 -8
  439. package/dist/vue3/lib/time-pill/time-pill-constants.js.map +0 -1
  440. package/dist/vue3/types/common/mixins/sr_only_close_button.d.ts +0 -30
  441. package/dist/vue3/types/common/mixins/sr_only_close_button.d.ts.map +0 -1
  442. package/dist/vue3/types/components/emoji/emoji_constants.d.ts +0 -3
  443. package/dist/vue3/types/components/emoji/emoji_constants.d.ts.map +0 -1
  444. package/dist/vue3/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts +0 -6
  445. package/dist/vue3/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts.map +0 -1
  446. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row_constants.d.ts +0 -3
  447. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row_constants.d.ts.map +0 -1
  448. package/dist/vue3/types/recipes/leftbar/group_row/group_row_constants.d.ts +0 -6
  449. package/dist/vue3/types/recipes/leftbar/group_row/group_row_constants.d.ts.map +0 -1
@@ -1,35 +1,26 @@
1
1
  import { DtIconClose as I } from "@dialpad/dialtone-icons/vue3";
2
- import O from "../../common/mixins/modal.js";
3
- import { MODAL_KIND_MODIFIERS as y, MODAL_SIZE_MODIFIERS as _, MODAL_BANNER_KINDS as b } from "./modal-constants.js";
4
- import { getUniqueString as v, hasSlotContent as B, disableRootScrolling as D, returnFirstEl as C, enableRootScrolling as F } from "../../common/utils/index.js";
2
+ import D from "../../common/mixins/modal.js";
3
+ import { MODAL_KIND_MODIFIERS as f, MODAL_SIZE_MODIFIERS as _, MODAL_BANNER_KINDS as y } from "./modal-constants.js";
4
+ import { getUniqueString as O, hasSlotContent as p, disableRootScrolling as T, returnFirstEl as b, enableRootScrolling as B } from "../../common/utils/index.js";
5
5
  import { EVENT_KEYNAMES as n } from "../../common/constants/index.js";
6
- import M from "../../common/mixins/sr-only-close-button.js";
7
- import A from "../../shared/sr_only_close_button.js";
8
- import { resolveComponent as d, openBlock as l, createBlock as m, mergeProps as g, toHandlers as T, withCtx as h, createElementBlock as a, normalizeClass as r, renderSlot as c, createTextVNode as L, toDisplayString as f, createCommentVNode as u, createVNode as S, Transition as N, withDirectives as H, createElementVNode as z, vShow as K } from "vue";
9
- import { _ as R } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
10
- import q from "../lazy-show/lazy-show.js";
11
- import j from "../button/button.js";
12
- import { NOTICE_KINDS as P } from "../notice/notice-constants.js";
13
- const V = {
6
+ import F from "../../shared/sr_only_close_button.js";
7
+ import { DialtoneLocalization as M } from "../../localization/index.js";
8
+ import { resolveComponent as d, openBlock as o, createBlock as m, mergeProps as A, toHandlers as N, withCtx as u, createElementBlock as a, normalizeClass as r, renderSlot as c, createTextVNode as L, toDisplayString as h, createCommentVNode as g, createVNode as E, Transition as v, withDirectives as z, createElementVNode as K, vShow as R } from "vue";
9
+ import { _ as q } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
10
+ import j from "../lazy-show/lazy-show.js";
11
+ import H from "../button/button.js";
12
+ import { NOTICE_KINDS as V } from "../notice/notice-constants.js";
13
+ const P = {
14
14
  compatConfig: { MODE: 3 },
15
15
  name: "DtModal",
16
16
  components: {
17
- DtLazyShow: q,
18
- DtButton: j,
17
+ DtLazyShow: j,
18
+ DtButton: H,
19
19
  DtIconClose: I,
20
- SrOnlyCloseButton: A
20
+ SrOnlyCloseButton: F
21
21
  },
22
- mixins: [O, M],
22
+ mixins: [D],
23
23
  props: {
24
- /**
25
- * A set of props to be passed into the modal's close button.
26
- * Requires an 'ariaLabel' property.
27
- */
28
- closeButtonProps: {
29
- type: Object,
30
- required: !0,
31
- validator: (e) => !!e.ariaLabel
32
- },
33
24
  /**
34
25
  * Body text to display as the modal's main content.
35
26
  */
@@ -52,7 +43,7 @@ const V = {
52
43
  labelledById: {
53
44
  type: String,
54
45
  default: function() {
55
- return v();
46
+ return O();
56
47
  }
57
48
  },
58
49
  /**
@@ -85,7 +76,7 @@ const V = {
85
76
  kind: {
86
77
  type: String,
87
78
  default: "default",
88
- validator: (e) => Object.keys(y).includes(e)
79
+ validator: (e) => Object.keys(f).includes(e)
89
80
  },
90
81
  /**
91
82
  * The size of the modal. size - default or full,
@@ -131,7 +122,7 @@ const V = {
131
122
  type: String,
132
123
  default: "warning",
133
124
  validate(e) {
134
- return P.includes(e);
125
+ return V.includes(e);
135
126
  }
136
127
  },
137
128
  /**
@@ -206,11 +197,12 @@ const V = {
206
197
  ],
207
198
  data() {
208
199
  return {
209
- MODAL_KIND_MODIFIERS: y,
200
+ MODAL_KIND_MODIFIERS: f,
210
201
  MODAL_SIZE_MODIFIERS: _,
211
- MODAL_BANNER_KINDS: b,
202
+ MODAL_BANNER_KINDS: y,
212
203
  EVENT_KEYNAMES: n,
213
- hasSlotContent: B
204
+ hasSlotContent: p,
205
+ i18n: new M()
214
206
  };
215
207
  },
216
208
  computed: {
@@ -246,21 +238,17 @@ const V = {
246
238
  return !!this.$slots.footer;
247
239
  },
248
240
  bannerKindClass() {
249
- return b[this.bannerKind];
241
+ return y[this.bannerKind];
242
+ },
243
+ closeButtonTitle() {
244
+ return this.i18n.$t("DIALTONE_CLOSE_BUTTON");
250
245
  }
251
246
  },
252
247
  watch: {
253
248
  show: {
254
249
  handler(e) {
255
250
  var s;
256
- e ? (this.previousActiveElement = document.activeElement, D(C(this.$el).getRootNode().host)) : (F(C(this.$el).getRootNode().host), (s = this.previousActiveElement) == null || s.focus(), this.previousActiveElement = null);
257
- }
258
- },
259
- $props: {
260
- immediate: !0,
261
- deep: !0,
262
- handler() {
263
- this.validateProps();
251
+ e ? (this.previousActiveElement = document.activeElement, T(b(this.$el).getRootNode().host)) : (B(b(this.$el).getRootNode().host), (s = this.previousActiveElement) == null || s.focus(), this.previousActiveElement = null);
264
252
  }
265
253
  }
266
254
  },
@@ -277,19 +265,15 @@ const V = {
277
265
  handleModalClick(e) {
278
266
  const s = e.target, t = this._getFocusableElements();
279
267
  t.length && !t.includes(s) && (t.includes(document.activeElement) || this.focusFirstElement());
280
- },
281
- validateProps() {
282
- this.hideClose && !this.visuallyHiddenClose && console.error(`If hideClose prop is true, visuallyHiddenClose and visuallyHiddenCloseLabel props
283
- need to be set so the component always includes a close button`);
284
268
  }
285
269
  }
286
- }, W = ["aria-describedby", "aria-labelledby"], Z = ["id"], U = ["id"], Y = {
270
+ }, U = ["aria-describedby", "aria-labelledby"], W = ["id"], Z = ["id"], x = {
287
271
  key: 4,
288
272
  class: "d-modal__footer"
289
273
  };
290
- function x(e, s, t, G, i, o) {
291
- const E = d("dt-icon-close"), p = d("dt-button"), w = d("sr-only-close-button"), k = d("dt-lazy-show");
292
- return l(), m(k, g({
274
+ function Y(e, s, t, G, i, l) {
275
+ const S = d("sr-only-close-button"), C = d("dt-icon-close"), k = d("dt-button"), w = d("dt-lazy-show");
276
+ return o(), m(w, A({
293
277
  transition: "d-zoom",
294
278
  show: t.show,
295
279
  class: [
@@ -299,28 +283,28 @@ function x(e, s, t, G, i, o) {
299
283
  t.modalClass
300
284
  ],
301
285
  "data-qa": "dt-modal",
302
- "aria-hidden": o.open
303
- }, T(o.modalListeners)), {
304
- default: h(() => [
305
- t.show && (i.hasSlotContent(e.$slots.banner) || t.bannerTitle) ? (l(), a("div", {
286
+ "aria-hidden": l.open
287
+ }, N(l.modalListeners)), {
288
+ default: u(() => [
289
+ t.show && (i.hasSlotContent(e.$slots.banner) || t.bannerTitle) ? (o(), a("div", {
306
290
  key: 0,
307
291
  "data-qa": "dt-modal-banner",
308
292
  class: r([
309
293
  "d-modal__banner",
310
294
  t.bannerClass,
311
- o.bannerKindClass
295
+ l.bannerKindClass
312
296
  ])
313
297
  }, [
314
298
  c(e.$slots, "banner", {}, () => [
315
- L(f(t.bannerTitle), 1)
299
+ L(h(t.bannerTitle), 1)
316
300
  ])
317
- ], 2)) : u("", !0),
318
- S(N, {
301
+ ], 2)) : g("", !0),
302
+ E(v, {
319
303
  appear: "",
320
304
  name: "d-modal__dialog"
321
305
  }, {
322
- default: h(() => [
323
- H(z("div", {
306
+ default: u(() => [
307
+ z(K("div", {
324
308
  class: r([
325
309
  "d-modal__dialog",
326
310
  { "d-modal__dialog--scrollable": t.fixedHeaderFooter },
@@ -331,20 +315,20 @@ function x(e, s, t, G, i, o) {
331
315
  "aria-describedby": t.describedById,
332
316
  "aria-labelledby": t.labelledById
333
317
  }, [
334
- i.hasSlotContent(e.$slots.header) ? (l(), a("div", {
318
+ i.hasSlotContent(e.$slots.header) ? (o(), a("div", {
335
319
  key: 0,
336
320
  id: t.labelledById,
337
321
  class: "d-modal__header",
338
322
  "data-qa": "dt-modal-title"
339
323
  }, [
340
324
  c(e.$slots, "header")
341
- ], 8, Z)) : (l(), a("h2", {
325
+ ], 8, W)) : (o(), a("h2", {
342
326
  key: 1,
343
327
  id: t.labelledById,
344
328
  class: "d-modal__header",
345
329
  "data-qa": "dt-modal-title"
346
- }, f(t.title), 9, U)),
347
- i.hasSlotContent(e.$slots.default) ? (l(), a("div", {
330
+ }, h(t.title), 9, Z)),
331
+ i.hasSlotContent(e.$slots.default) ? (o(), a("div", {
348
332
  key: 2,
349
333
  class: r([
350
334
  "d-modal__content",
@@ -353,37 +337,38 @@ function x(e, s, t, G, i, o) {
353
337
  "data-qa": "dt-modal-copy"
354
338
  }, [
355
339
  c(e.$slots, "default")
356
- ], 2)) : (l(), a("p", {
340
+ ], 2)) : (o(), a("p", {
357
341
  key: 3,
358
342
  class: r([
359
343
  "d-modal__content",
360
344
  t.contentClass
361
345
  ]),
362
346
  "data-qa": "dt-modal-copy"
363
- }, f(t.copy), 3)),
364
- o.hasFooterSlot ? (l(), a("footer", Y, [
347
+ }, h(t.copy), 3)),
348
+ l.hasFooterSlot ? (o(), a("footer", x, [
365
349
  c(e.$slots, "footer")
366
- ])) : u("", !0),
367
- t.hideClose ? u("", !0) : (l(), m(p, g({
350
+ ])) : g("", !0),
351
+ t.hideClose ? (o(), m(S, {
368
352
  key: 5,
353
+ onClose: l.close
354
+ }, null, 8, ["onClose"])) : (o(), m(k, {
355
+ key: 6,
369
356
  class: "d-modal__close",
357
+ "data-qa": "dt-modal-close-button",
370
358
  circle: "",
371
359
  size: "lg",
372
360
  importance: "clear",
373
- "aria-label": t.closeButtonProps.ariaLabel
374
- }, t.closeButtonProps, { onClick: o.close }), {
375
- icon: h(() => [
376
- S(E, { size: "400" })
361
+ "aria-label": l.closeButtonTitle,
362
+ title: l.closeButtonTitle,
363
+ onClick: l.close
364
+ }, {
365
+ icon: u(() => [
366
+ E(C, { size: "400" })
377
367
  ]),
378
368
  _: 1
379
- }, 16, ["aria-label", "onClick"])),
380
- e.showVisuallyHiddenClose ? (l(), m(w, {
381
- key: 6,
382
- "visually-hidden-close-label": e.visuallyHiddenCloseLabel,
383
- onClose: o.close
384
- }, null, 8, ["visually-hidden-close-label", "onClose"])) : u("", !0)
385
- ], 10, W), [
386
- [K, t.show]
369
+ }, 8, ["aria-label", "title", "onClick"]))
370
+ ], 10, U), [
371
+ [R, t.show]
387
372
  ])
388
373
  ]),
389
374
  _: 3
@@ -392,7 +377,7 @@ function x(e, s, t, G, i, o) {
392
377
  _: 3
393
378
  }, 16, ["show", "class", "aria-hidden"]);
394
379
  }
395
- const de = /* @__PURE__ */ R(V, [["render", x]]);
380
+ const de = /* @__PURE__ */ q(P, [["render", Y]]);
396
381
  export {
397
382
  de as default
398
383
  };
@@ -1 +1 @@
1
- {"version":3,"file":"modal.js","sources":["../../../components/modal/modal.vue"],"sourcesContent":["<template>\n <dt-lazy-show\n transition=\"d-zoom\"\n :show=\"show\"\n :class=\"[\n 'd-modal',\n MODAL_KIND_MODIFIERS[kind],\n MODAL_SIZE_MODIFIERS[size],\n modalClass,\n ]\"\n data-qa=\"dt-modal\"\n :aria-hidden=\"open\"\n v-on=\"modalListeners\"\n >\n <div\n v-if=\"show && (hasSlotContent($slots.banner) || bannerTitle)\"\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 bannerTitle prop -->\n <slot name=\"banner\">\n {{ bannerTitle }}\n </slot>\n </div>\n <transition\n appear\n name=\"d-modal__dialog\"\n >\n <div\n v-show=\"show\"\n :class=\"[\n 'd-modal__dialog',\n { 'd-modal__dialog--scrollable': fixedHeaderFooter },\n dialogClass,\n ]\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-describedby=\"describedById\"\n :aria-labelledby=\"labelledById\"\n >\n <div\n v-if=\"hasSlotContent($slots.header)\"\n :id=\"labelledById\"\n class=\"d-modal__header\"\n data-qa=\"dt-modal-title\"\n >\n <!-- @slot Slot for dialog header section, taking the place of any \"title\" text prop -->\n <slot name=\"header\" />\n </div>\n <h2\n v-else\n :id=\"labelledById\"\n class=\"d-modal__header\"\n data-qa=\"dt-modal-title\"\n >\n {{ title }}\n </h2>\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\"\n >\n <!-- @slot Slot for dialog footer content, often containing cancel and confirm buttons. -->\n <slot name=\"footer\" />\n </footer>\n <dt-button\n v-if=\"!hideClose\"\n class=\"d-modal__close\"\n circle\n size=\"lg\"\n importance=\"clear\"\n :aria-label=\"closeButtonProps.ariaLabel\"\n v-bind=\"closeButtonProps\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon-close\n size=\"400\"\n />\n </template>\n </dt-button>\n <sr-only-close-button\n v-if=\"showVisuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n @close=\"close\"\n />\n </div>\n </transition>\n </dt-lazy-show>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue3';\nimport Modal from '@/common/mixins/modal';\nimport {\n MODAL_BANNER_KINDS,\n MODAL_KIND_MODIFIERS,\n MODAL_SIZE_MODIFIERS,\n} from './modal_constants';\nimport { returnFirstEl, getUniqueString, hasSlotContent, disableRootScrolling, enableRootScrolling } from '@/common/utils';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { EVENT_KEYNAMES } from '@/common/constants';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\nimport { NOTICE_KINDS } from '@/components/notice';\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 compatConfig: { MODE: 3 },\n name: 'DtModal',\n\n components: {\n DtLazyShow,\n DtButton,\n DtIconClose,\n SrOnlyCloseButton,\n },\n\n mixins: [Modal, SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * A set of props to be passed into the modal's close button.\n * Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n required: true,\n validator: (props) => {\n return !!props.ariaLabel;\n },\n },\n\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 show: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Title text to display in the modal header.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Title text to display in the modal banner.\n */\n bannerTitle: {\n type: String,\n default: '',\n },\n\n /**\n * The theme of the modal. kind - default or danger,\n * @values default, danger\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, error, info, success, warning\n */\n bannerKind: {\n type: String,\n default: 'warning',\n validate (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 * Hides the close button on the modal\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\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, HTMLElement],\n default: 'first',\n validator: initialFocusElement => {\n return initialFocusElement === 'first' ||\n (initialFocusElement instanceof HTMLElement) ||\n initialFocusElement.startsWith('#');\n },\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:show\n * @type {Boolean}\n */\n 'update:show',\n ],\n\n data () {\n return {\n MODAL_KIND_MODIFIERS,\n MODAL_SIZE_MODIFIERS,\n MODAL_BANNER_KINDS,\n EVENT_KEYNAMES,\n hasSlotContent,\n };\n },\n\n computed: {\n modalListeners () {\n return {\n click: event => {\n // Handle backdrop clicks for closing modal\n if (this.closeOnClick && event.target === event.currentTarget) {\n this.close();\n } else if (this.show && event.target !== event.currentTarget) {\n // Ensure focus stays within modal when clicking inside it\n this.handleModalClick(event);\n }\n\n this.$emit('click', event);\n },\n\n keydown: event => {\n switch (event.code) {\n case EVENT_KEYNAMES.esc:\n case EVENT_KEYNAMES.escape:\n this.close();\n break;\n case EVENT_KEYNAMES.tab:\n this.trapFocus(event);\n break;\n }\n this.$emit('keydown', event);\n },\n\n 'after-enter': async () => {\n this.$emit('update:show', true);\n await this.setFocusAfterTransition();\n },\n\n focusin: event => {\n // Ensure focus stays within modal\n if (this.show && !this.$el.contains(event.target)) {\n event.preventDefault();\n this.focusFirstElement();\n }\n },\n };\n },\n\n open () {\n return `${!this.show}`;\n },\n\n hasFooterSlot () {\n return !!this.$slots.footer;\n },\n\n bannerKindClass () {\n return MODAL_BANNER_KINDS[this.bannerKind];\n },\n },\n\n watch: {\n show: {\n handler (isShowing) {\n if (isShowing) {\n // Set a reference to the previously-active element, to which we'll return focus on modal close.\n this.previousActiveElement = document.activeElement;\n disableRootScrolling(returnFirstEl(this.$el).getRootNode().host);\n } else {\n enableRootScrolling(returnFirstEl(this.$el).getRootNode().host);\n // Modal is being hidden, so return focus to the previously active element before clearing the reference.\n this.previousActiveElement?.focus();\n this.previousActiveElement = null;\n }\n },\n },\n\n $props: {\n immediate: true,\n deep: true,\n handler () {\n this.validateProps();\n },\n },\n },\n\n methods: {\n close () {\n this.$emit('update:show', false);\n },\n\n async setFocusAfterTransition () {\n if (this.initialFocusElement === 'first') {\n await this.focusFirstElement();\n } else if (this.initialFocusElement.startsWith('#')) {\n await this.focusElementById(this.initialFocusElement);\n } else if (this.initialFocusElement instanceof HTMLElement) {\n this.initialFocusElement.focus();\n }\n },\n\n trapFocus (e) {\n if (this.show) {\n this.focusTrappedTabPress(e);\n }\n },\n\n handleModalClick (event) {\n // Ensure focus stays within modal when clicking inside it\n const clickedElement = event.target;\n const focusableElements = this._getFocusableElements();\n\n // If the clicked element is not focusable, ensure focus stays in modal\n if (focusableElements.length && !focusableElements.includes(clickedElement)) {\n // Check if current active element is still within the modal\n if (!focusableElements.includes(document.activeElement)) {\n this.focusFirstElement();\n }\n }\n },\n\n validateProps () {\n if (this.hideClose && !this.visuallyHiddenClose) {\n console.error(`If hideClose prop is true, visuallyHiddenClose and visuallyHiddenCloseLabel props\n need to be set so the component always includes a close button`);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtLazyShow","DtButton","DtIconClose","SrOnlyCloseButton","Modal","SrOnlyCloseButtonMixin","props","getUniqueString","k","MODAL_KIND_MODIFIERS","s","MODAL_SIZE_MODIFIERS","kind","NOTICE_KINDS","initialFocusElement","MODAL_BANNER_KINDS","EVENT_KEYNAMES","hasSlotContent","event","isShowing","disableRootScrolling","returnFirstEl","enableRootScrolling","_a","clickedElement","focusableElements","_hoisted_1","_hoisted_2","_hoisted_3","_openBlock","_createBlock","_component_dt_lazy_show","_mergeProps","$props","$data","$options","_toHandlers","_withCtx","_ctx","_createElementBlock","_normalizeClass","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode","_createVNode","_Transition","_createElementVNode","_hoisted_4","_component_dt_button","_component_dt_icon_close","_component_sr_only_close_button"],"mappings":";;;;;;;;;;;;AAyIA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,mBAAAC;AAAA,EACD;AAAA,EAED,QAAQ,CAACC,GAAOC,CAAsB;AAAA,EAEtC,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,UA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AAQ;AAAA,iBAELA,EAAI,IAAA,GAAA,CAAA;AAAA,YAGDE,EAAa,iBADrBN,KAAAU,EAMS,UANTS,GAMS;AAAA,cADPP,EAAsBH,EAAA,QAAA,QAAA;AAAA,kBAvFhCM,EAAA,IAAA,EAAA;AAAA,YA0FiBX,EAAS,YA1F1BW,EAAA,IAAA,EAAA,KAyFQf,KAAAC,EAeYmB,GAfZjB,EAeY;AAAA,cAxGpB,KAAA;AAAA,cA2FU,OAAM;AAAA,cACN,QAAA;AAAA,cACA,MAAK;AAAA,cACL,YAAW;AAAA,cACV,cAAYC,EAAgB,iBAAC;AAAA,eACtBA,EAAgB,kBAAA,EACvB,SAAOE,EAAK,MAAA,CAAA,GAAA;AAAA,cAEF,QACT,MAEE;AAAA,gBAFFU,EAEEK,GAAA,EADA,MAAK,MAAK,CAAA;AAAA;cArGxB,GAAA;AAAA;YA0GgBZ,EAAuB,gCAD/BR,EAIEqB,GAAA;AAAA,cA7GV,KAAA;AAAA,cA2GW,+BAA6Bb,EAAwB;AAAA,cACrD,SAAOH,EAAK;AAAA,uEA5GvBS,EAAA,IAAA,EAAA;AAAA,UAAA,GAAA,IAAAlB,CAAA,GAAA;AAAA,gBAiCgBO,EAAI,IAAA;AAAA;;QAjCpB,GAAA;AAAA;;IAAA,GAAA;AAAA;;;"}
1
+ {"version":3,"file":"modal.js","sources":["../../../components/modal/modal.vue"],"sourcesContent":["<template>\n <dt-lazy-show\n transition=\"d-zoom\"\n :show=\"show\"\n :class=\"[\n 'd-modal',\n MODAL_KIND_MODIFIERS[kind],\n MODAL_SIZE_MODIFIERS[size],\n modalClass,\n ]\"\n data-qa=\"dt-modal\"\n :aria-hidden=\"open\"\n v-on=\"modalListeners\"\n >\n <div\n v-if=\"show && (hasSlotContent($slots.banner) || bannerTitle)\"\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 bannerTitle prop -->\n <slot name=\"banner\">\n {{ bannerTitle }}\n </slot>\n </div>\n <transition\n appear\n name=\"d-modal__dialog\"\n >\n <div\n v-show=\"show\"\n :class=\"[\n 'd-modal__dialog',\n { 'd-modal__dialog--scrollable': fixedHeaderFooter },\n dialogClass,\n ]\"\n role=\"dialog\"\n aria-modal=\"true\"\n :aria-describedby=\"describedById\"\n :aria-labelledby=\"labelledById\"\n >\n <div\n v-if=\"hasSlotContent($slots.header)\"\n :id=\"labelledById\"\n class=\"d-modal__header\"\n data-qa=\"dt-modal-title\"\n >\n <!-- @slot Slot for dialog header section, taking the place of any \"title\" text prop -->\n <slot name=\"header\" />\n </div>\n <h2\n v-else\n :id=\"labelledById\"\n class=\"d-modal__header\"\n data-qa=\"dt-modal-title\"\n >\n {{ title }}\n </h2>\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\"\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=\"hideClose\"\n @close=\"close\"\n />\n <dt-button\n v-else\n class=\"d-modal__close\"\n data-qa=\"dt-modal-close-button\"\n circle\n size=\"lg\"\n importance=\"clear\"\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon-close\n size=\"400\"\n />\n </template>\n </dt-button>\n </div>\n </transition>\n </dt-lazy-show>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue3';\nimport Modal from '@/common/mixins/modal';\nimport {\n MODAL_BANNER_KINDS,\n MODAL_KIND_MODIFIERS,\n MODAL_SIZE_MODIFIERS,\n} from './modal_constants';\nimport { returnFirstEl, getUniqueString, hasSlotContent, disableRootScrolling, enableRootScrolling } from '@/common/utils';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { EVENT_KEYNAMES } from '@/common/constants';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\nimport { NOTICE_KINDS } from '@/components/notice';\nimport { DialtoneLocalization } from '@/localization';\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 compatConfig: { MODE: 3 },\n name: 'DtModal',\n\n components: {\n DtLazyShow,\n DtButton,\n DtIconClose,\n SrOnlyCloseButton,\n },\n\n mixins: [Modal],\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 show: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Title text to display in the modal header.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Title text to display in the modal banner.\n */\n bannerTitle: {\n type: String,\n default: '',\n },\n\n /**\n * The theme of the modal. kind - default or danger,\n * @values default, danger\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, error, info, success, warning\n */\n bannerKind: {\n type: String,\n default: 'warning',\n validate (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 * Hides the close button on the modal\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\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, HTMLElement],\n default: 'first',\n validator: initialFocusElement => {\n return initialFocusElement === 'first' ||\n (initialFocusElement instanceof HTMLElement) ||\n initialFocusElement.startsWith('#');\n },\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:show\n * @type {Boolean}\n */\n 'update:show',\n ],\n\n data () {\n return {\n MODAL_KIND_MODIFIERS,\n MODAL_SIZE_MODIFIERS,\n MODAL_BANNER_KINDS,\n EVENT_KEYNAMES,\n hasSlotContent,\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n modalListeners () {\n return {\n click: event => {\n // Handle backdrop clicks for closing modal\n if (this.closeOnClick && event.target === event.currentTarget) {\n this.close();\n } else if (this.show && event.target !== event.currentTarget) {\n // Ensure focus stays within modal when clicking inside it\n this.handleModalClick(event);\n }\n\n this.$emit('click', event);\n },\n\n keydown: event => {\n switch (event.code) {\n case EVENT_KEYNAMES.esc:\n case EVENT_KEYNAMES.escape:\n this.close();\n break;\n case EVENT_KEYNAMES.tab:\n this.trapFocus(event);\n break;\n }\n this.$emit('keydown', event);\n },\n\n 'after-enter': async () => {\n this.$emit('update:show', true);\n await this.setFocusAfterTransition();\n },\n\n focusin: event => {\n // Ensure focus stays within modal\n if (this.show && !this.$el.contains(event.target)) {\n event.preventDefault();\n this.focusFirstElement();\n }\n },\n };\n },\n\n open () {\n return `${!this.show}`;\n },\n\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 show: {\n handler (isShowing) {\n if (isShowing) {\n // Set a reference to the previously-active element, to which we'll return focus on modal close.\n this.previousActiveElement = document.activeElement;\n disableRootScrolling(returnFirstEl(this.$el).getRootNode().host);\n } else {\n enableRootScrolling(returnFirstEl(this.$el).getRootNode().host);\n // Modal is being hidden, so return focus to the previously active element before clearing the reference.\n this.previousActiveElement?.focus();\n this.previousActiveElement = null;\n }\n },\n },\n },\n\n methods: {\n close () {\n this.$emit('update:show', false);\n },\n\n async setFocusAfterTransition () {\n if (this.initialFocusElement === 'first') {\n await this.focusFirstElement();\n } else if (this.initialFocusElement.startsWith('#')) {\n await this.focusElementById(this.initialFocusElement);\n } else if (this.initialFocusElement instanceof HTMLElement) {\n this.initialFocusElement.focus();\n }\n },\n\n trapFocus (e) {\n if (this.show) {\n this.focusTrappedTabPress(e);\n }\n },\n\n handleModalClick (event) {\n // Ensure focus stays within modal when clicking inside it\n const clickedElement = event.target;\n const focusableElements = this._getFocusableElements();\n\n // If the clicked element is not focusable, ensure focus stays in modal\n if (focusableElements.length && !focusableElements.includes(clickedElement)) {\n // Check if current active element is still within the modal\n if (!focusableElements.includes(document.activeElement)) {\n this.focusFirstElement();\n }\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtLazyShow","DtButton","DtIconClose","SrOnlyCloseButton","Modal","getUniqueString","k","MODAL_KIND_MODIFIERS","s","MODAL_SIZE_MODIFIERS","kind","NOTICE_KINDS","initialFocusElement","MODAL_BANNER_KINDS","EVENT_KEYNAMES","hasSlotContent","DialtoneLocalization","event","isShowing","disableRootScrolling","returnFirstEl","enableRootScrolling","_a","clickedElement","focusableElements","_hoisted_1","_hoisted_2","_hoisted_3","_openBlock","_createBlock","_component_dt_lazy_show","_mergeProps","$props","$data","$options","_toHandlers","_withCtx","_ctx","_createElementBlock","_normalizeClass","_renderSlot","_createTextVNode","_toDisplayString","_createCommentVNode","_createVNode","_Transition","_createElementVNode","_hoisted_4","_component_sr_only_close_button","_component_dt_button","_component_dt_icon_close"],"mappings":";;;;;;;;;;;;AAyIA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,mBAAAC;AAAA,EACD;AAAA,EAED,QAAQ,CAACC,CAAK;AAAA,EAEd,OAAO;AAA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AAAA,YA0FgBX,EAAS,kBADjBH,EAGEmB,GAAA;AAAA,cA5FV,KAAA;AAAA,cA2FW,SAAOd,EAAK;AAAA,8CAEfL,EAgBYoB,GAAA;AAAA,cA7GpB,KAAA;AAAA,cA+FU,OAAM;AAAA,cACN,WAAQ;AAAA,cACR,QAAA;AAAA,cACA,MAAK;AAAA,cACL,YAAW;AAAA,cACV,cAAYf,EAAgB;AAAA,cAC5B,OAAOA,EAAgB;AAAA,cACvB,SAAOA,EAAK;AAAA;cAEF,QACT,MAEE;AAAA,gBAFFU,EAEEM,GAAA,EADA,MAAK,MAAK,CAAA;AAAA;cA1GxB,GAAA;AAAA;UAAA,GAAA,IAAAzB,CAAA,GAAA;AAAA,gBAiCgBO,EAAI,IAAA;AAAA;;QAjCpB,GAAA;AAAA;;IAAA,GAAA;AAAA;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("@dialpad/dialtone-icons/vue3"),a=require("../../common/mixins/sr-only-close-button.cjs"),r=require("../../shared/sr_only_close_button.cjs"),e=require("vue"),u=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),d=require("../button/button.cjs"),m={compatConfig:{MODE:3},name:"DtNoticeAction",components:{DtIconClose:i.DtIconClose,DtButton:d.default,SrOnlyCloseButton:r.default},mixins:[a.default],props:{closeButtonProps:{type:Object,default:()=>({})},hideClose:{type:Boolean,default:!1},hideAction:{type:Boolean,default:!1}},emits:["close"],created(){!this.hideClose&&!this.closeButtonProps.ariaLabel&&console.error("Invalid props: you must pass in closeButtonProps.ariaLabel if the close button is displayed.")},mounted(){this.hideClose||(this.lastFocusedElement=document.activeElement)},beforeUnmount(){var o;(o=this.lastFocusedElement)==null||o.focus()},methods:{close(){this.$emit("close")}}},_={class:"d-notice__actions","data-qa":"notice-content-actions"};function p(o,C,t,f,h,n){const l=e.resolveComponent("dt-icon-close"),s=e.resolveComponent("dt-button"),c=e.resolveComponent("sr-only-close-button");return e.openBlock(),e.createElementBlock("div",_,[t.hideAction?e.createCommentVNode("",!0):e.renderSlot(o.$slots,"default",{key:0}),t.hideClose?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s,e.mergeProps({key:1,ref:"closeButton","data-qa":"dt-notice-action-close-button",size:"sm",importance:"clear",circle:"","aria-label":t.closeButtonProps.ariaLabel?t.closeButtonProps.ariaLabel:"Close"},t.closeButtonProps,{onClick:n.close}),{icon:e.withCtx(()=>[e.createVNode(l,{size:"200"})]),_:1},16,["aria-label","onClick"])),o.showVisuallyHiddenClose?(e.openBlock(),e.createBlock(c,{key:2,"visually-hidden-close-label":o.visuallyHiddenCloseLabel,onClose:n.close},null,8,["visually-hidden-close-label","onClose"])):e.createCommentVNode("",!0)])}const b=u._(m,[["render",p]]);exports.default=b;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("@dialpad/dialtone-icons/vue3"),a=require("../../shared/sr_only_close_button.cjs"),r=require("../../localization/index.cjs"),e=require("vue"),u=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),d=require("../button/button.cjs"),_={compatConfig:{MODE:3},name:"DtNoticeAction",components:{DtIconClose:i.DtIconClose,DtButton:d.default,SrOnlyCloseButton:a.default},props:{hideClose:{type:Boolean,default:!1},hideAction:{type:Boolean,default:!1}},emits:["close"],data(){return{i18n:new r.DialtoneLocalization}},computed:{closeButtonTitle(){return this.i18n.$t("DIALTONE_CLOSE_BUTTON")}},mounted(){this.hideClose||(this.lastFocusedElement=document.activeElement)},beforeUnmount(){var t;(t=this.lastFocusedElement)==null||t.focus()},methods:{close(){this.$emit("close")}}},m={class:"d-notice__actions","data-qa":"notice-content-actions"};function f(t,C,n,h,B,o){const c=e.resolveComponent("dt-icon-close"),l=e.resolveComponent("dt-button"),s=e.resolveComponent("sr-only-close-button");return e.openBlock(),e.createElementBlock("div",m,[n.hideAction?e.createCommentVNode("",!0):e.renderSlot(t.$slots,"default",{key:0}),n.hideClose?(e.openBlock(),e.createBlock(s,{key:2,onClose:o.close},null,8,["onClose"])):(e.openBlock(),e.createBlock(l,{key:1,ref:"closeButton",circle:!0,"data-qa":"dt-notice-action-close-button",importance:"clear",size:"sm","aria-label":o.closeButtonTitle,title:o.closeButtonTitle,onClick:o.close},{icon:e.withCtx(()=>[e.createVNode(c,{size:"200"})]),_:1},8,["aria-label","title","onClick"]))])}const p=u._(_,[["render",f]]);exports.default=p;
2
2
  //# sourceMappingURL=notice-action.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"notice-action.cjs","sources":["../../../components/notice/notice_action.vue"],"sourcesContent":["<template>\n <div\n class=\"d-notice__actions\"\n data-qa=\"notice-content-actions\"\n >\n <!-- @slot Slot for main content -->\n <slot v-if=\"!hideAction\" />\n <dt-button\n v-if=\"!hideClose\"\n ref=\"closeButton\"\n data-qa=\"dt-notice-action-close-button\"\n size=\"sm\"\n importance=\"clear\"\n circle\n :aria-label=\"closeButtonProps.ariaLabel ? closeButtonProps.ariaLabel : 'Close'\"\n v-bind=\"closeButtonProps\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon-close\n size=\"200\"\n />\n </template>\n </dt-button>\n <sr-only-close-button\n v-if=\"showVisuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n @close=\"close\"\n />\n </div>\n</template>\n\n<script>\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue3';\nimport { DtButton } from '@/components/button';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtNoticeAction',\n\n components: {\n DtIconClose,\n DtButton,\n SrOnlyCloseButton,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * Props for the notice close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n ],\n\n created () {\n if (!this.hideClose && !this.closeButtonProps.ariaLabel) {\n console.error('Invalid props: you must pass in closeButtonProps.ariaLabel if the close button is displayed.');\n }\n },\n\n mounted () {\n if (!this.hideClose) {\n this.lastFocusedElement = document.activeElement;\n }\n },\n\n beforeUnmount () {\n this.lastFocusedElement?.focus();\n },\n\n methods: {\n close () {\n this.$emit('close');\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtIconClose","DtButton","SrOnlyCloseButton","SrOnlyCloseButtonMixin","_a","_openBlock","_createElementBlock","_hoisted_1","$props","_createCommentVNode","_renderSlot","_ctx","_createBlock","_component_dt_button","_mergeProps","$options","_createVNode","_component_dt_icon_close","_component_sr_only_close_button"],"mappings":"sXAsCKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,iBAEN,WAAY,aACVC,EAAW,YACX,SAAAC,EAAQ,QACR,kBAAAC,EAAiB,OAClB,EAED,OAAQ,CAACC,EAAAA,OAAsB,EAE/B,MAAO,CAIL,iBAAkB,CAChB,KAAM,OACN,QAAS,KAAO,CAAA,EACjB,EAMD,UAAW,CACT,KAAM,QACN,QAAS,EACV,EAMD,WAAY,CACV,KAAM,QACN,QAAS,EACV,CACF,EAED,MAAO,CAML,OACD,EAED,SAAW,CACL,CAAC,KAAK,WAAa,CAAC,KAAK,iBAAiB,WAC5C,QAAQ,MAAM,8FAA8F,CAE/G,EAED,SAAW,CACJ,KAAK,YACR,KAAK,mBAAqB,SAAS,cAEtC,EAED,eAAiB,QACfC,EAAA,KAAK,qBAAL,MAAAA,EAAyB,OAC1B,EAED,QAAS,CACP,OAAS,CACP,KAAK,MAAM,OAAO,CACnB,CACF,CACH,KA1GI,MAAM,oBACN,UAAQ,6KAFV,OAAAC,YAAA,EAAAC,qBA4BM,MA5BNC,EA4BM,CAvBSC,EAAU,WAN3BC,EAAA,mBAAA,GAAA,EAAA,EAMIC,EAAA,WAA2BC,oBAN/B,IAAA,EAAA,EAQaH,EAAS,UARtBC,EAAA,mBAAA,GAAA,EAAA,GAOIJ,EAAAA,YAAAO,EAAAA,YAgBYC,EAhBZC,aAgBY,CAvBhB,IAAA,EASM,IAAI,cACJ,UAAQ,gCACR,KAAK,KACL,WAAW,QACX,OAAA,GACC,aAAYN,EAAgB,iBAAC,UAAYA,EAAA,iBAAiB,UAAS,SAC5DA,EAAgB,iBAAA,CACvB,QAAOO,EAAK,KAAA,CAAA,EAAA,CAEF,eACT,IAEE,CAFFC,EAAAA,YAEEC,EAAA,CADA,KAAK,KAAK,CAAA,IApBpB,EAAA,iCAyBYN,EAAuB,uCAD/BC,EAIE,YAAAM,EAAA,CA5BN,IAAA,EA0BO,8BAA6BP,EAAwB,yBACrD,QAAOI,EAAK,0DA3BnBN,EAAA,mBAAA,GAAA,EAAA"}
1
+ {"version":3,"file":"notice-action.cjs","sources":["../../../components/notice/notice_action.vue"],"sourcesContent":["<template>\n <div\n class=\"d-notice__actions\"\n data-qa=\"notice-content-actions\"\n >\n <!-- @slot Slot for main content -->\n <slot v-if=\"!hideAction\" />\n <dt-button\n v-if=\"!hideClose\"\n ref=\"closeButton\"\n :circle=\"true\"\n data-qa=\"dt-notice-action-close-button\"\n importance=\"clear\"\n size=\"sm\"\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon-close\n size=\"200\"\n />\n </template>\n </dt-button>\n <sr-only-close-button\n v-else\n @close=\"close\"\n />\n </div>\n</template>\n\n<script>\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue3';\nimport { DtButton } from '@/components/button';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\nimport { DialtoneLocalization } from '@/localization';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtNoticeAction',\n\n components: {\n DtIconClose,\n DtButton,\n SrOnlyCloseButton,\n },\n\n props: {\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n ],\n\n data () {\n return {\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n mounted () {\n if (!this.hideClose) {\n this.lastFocusedElement = document.activeElement;\n }\n },\n\n beforeUnmount () {\n this.lastFocusedElement?.focus();\n },\n\n methods: {\n close () {\n this.$emit('close');\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtIconClose","DtButton","SrOnlyCloseButton","DialtoneLocalization","_a","_openBlock","_createElementBlock","_hoisted_1","$props","_createCommentVNode","_renderSlot","_ctx","_createBlock","_component_sr_only_close_button","$options","_component_dt_button","_createVNode","_component_dt_icon_close"],"mappings":"sWAqCKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,iBAEN,WAAY,aACVC,EAAW,YACX,SAAAC,EAAQ,QACR,kBAAAC,EAAiB,OAClB,EAED,MAAO,CAKL,UAAW,CACT,KAAM,QACN,QAAS,EACV,EAMD,WAAY,CACV,KAAM,QACN,QAAS,EACV,CACF,EAED,MAAO,CAML,OACD,EAED,MAAQ,CACN,MAAO,CACL,KAAM,IAAIC,EAAAA,qBAEb,EAED,SAAU,CACR,kBAAoB,CAClB,OAAO,KAAK,KAAK,GAAG,uBAAuB,CAC5C,CACF,EAED,SAAW,CACJ,KAAK,YACR,KAAK,mBAAqB,SAAS,cAEtC,EAED,eAAiB,QACfC,EAAA,KAAK,qBAAL,MAAAA,EAAyB,OAC1B,EAED,QAAS,CACP,OAAS,CACP,KAAK,MAAM,OAAO,CACnB,CACF,CACH,KArGI,MAAM,oBACN,UAAQ,6KAFV,OAAAC,YAAA,EAAAC,qBA2BM,MA3BNC,EA2BM,CAtBSC,EAAU,WAN3BC,EAAA,mBAAA,GAAA,EAAA,EAMIC,EAAA,WAA2BC,oBAN/B,IAAA,EAAA,EAQaH,EAAS,yBAgBlBI,EAGE,YAAAC,EAAA,CA3BN,IAAA,EA0BO,QAAOC,EAAK,2CAnBfF,EAgBY,YAAAG,EAAA,CAvBhB,IAAA,EASM,IAAI,cACH,OAAQ,GACT,UAAQ,gCACR,WAAW,QACX,KAAK,KACJ,aAAYD,EAAgB,iBAC5B,MAAOA,EAAgB,iBACvB,QAAOA,EAAK,QAEF,eACT,IAEE,CAFFE,EAAAA,YAEEC,EAAA,CADA,KAAK,KAAK,CAAA,IApBpB,EAAA"}
@@ -1,26 +1,18 @@
1
- import { DtIconClose as d } from "@dialpad/dialtone-icons/vue3";
2
- import u from "../../common/mixins/sr-only-close-button.js";
1
+ import { DtIconClose as r } from "@dialpad/dialtone-icons/vue3";
3
2
  import m from "../../shared/sr_only_close_button.js";
4
- import { resolveComponent as t, openBlock as s, createElementBlock as f, renderSlot as p, createCommentVNode as l, createBlock as c, mergeProps as _, withCtx as h, createVNode as C } from "vue";
5
- import { _ as b } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
6
- import y from "../button/button.js";
7
- const B = {
3
+ import { DialtoneLocalization as d } from "../../localization/index.js";
4
+ import { resolveComponent as o, openBlock as n, createElementBlock as u, renderSlot as _, createCommentVNode as f, createBlock as l, withCtx as p, createVNode as h } from "vue";
5
+ import { _ as C } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
6
+ import B from "../button/button.js";
7
+ const b = {
8
8
  compatConfig: { MODE: 3 },
9
9
  name: "DtNoticeAction",
10
10
  components: {
11
- DtIconClose: d,
12
- DtButton: y,
11
+ DtIconClose: r,
12
+ DtButton: B,
13
13
  SrOnlyCloseButton: m
14
14
  },
15
- mixins: [u],
16
15
  props: {
17
- /**
18
- * Props for the notice close button.
19
- */
20
- closeButtonProps: {
21
- type: Object,
22
- default: () => ({})
23
- },
24
16
  /**
25
17
  * Hides the close button from the notice
26
18
  * @values true, false
@@ -46,15 +38,22 @@ const B = {
46
38
  */
47
39
  "close"
48
40
  ],
49
- created() {
50
- !this.hideClose && !this.closeButtonProps.ariaLabel && console.error("Invalid props: you must pass in closeButtonProps.ariaLabel if the close button is displayed.");
41
+ data() {
42
+ return {
43
+ i18n: new d()
44
+ };
45
+ },
46
+ computed: {
47
+ closeButtonTitle() {
48
+ return this.i18n.$t("DIALTONE_CLOSE_BUTTON");
49
+ }
51
50
  },
52
51
  mounted() {
53
52
  this.hideClose || (this.lastFocusedElement = document.activeElement);
54
53
  },
55
54
  beforeUnmount() {
56
- var e;
57
- (e = this.lastFocusedElement) == null || e.focus();
55
+ var t;
56
+ (t = this.lastFocusedElement) == null || t.focus();
58
57
  },
59
58
  methods: {
60
59
  close() {
@@ -65,33 +64,33 @@ const B = {
65
64
  class: "d-notice__actions",
66
65
  "data-qa": "notice-content-actions"
67
66
  };
68
- function v(e, P, o, D, E, n) {
69
- const i = t("dt-icon-close"), a = t("dt-button"), r = t("sr-only-close-button");
70
- return s(), f("div", k, [
71
- o.hideAction ? l("", !0) : p(e.$slots, "default", { key: 0 }),
72
- o.hideClose ? l("", !0) : (s(), c(a, _({
67
+ function y(t, D, c, E, N, e) {
68
+ const s = o("dt-icon-close"), i = o("dt-button"), a = o("sr-only-close-button");
69
+ return n(), u("div", k, [
70
+ c.hideAction ? f("", !0) : _(t.$slots, "default", { key: 0 }),
71
+ c.hideClose ? (n(), l(a, {
72
+ key: 2,
73
+ onClose: e.close
74
+ }, null, 8, ["onClose"])) : (n(), l(i, {
73
75
  key: 1,
74
76
  ref: "closeButton",
77
+ circle: !0,
75
78
  "data-qa": "dt-notice-action-close-button",
76
- size: "sm",
77
79
  importance: "clear",
78
- circle: "",
79
- "aria-label": o.closeButtonProps.ariaLabel ? o.closeButtonProps.ariaLabel : "Close"
80
- }, o.closeButtonProps, { onClick: n.close }), {
81
- icon: h(() => [
82
- C(i, { size: "200" })
80
+ size: "sm",
81
+ "aria-label": e.closeButtonTitle,
82
+ title: e.closeButtonTitle,
83
+ onClick: e.close
84
+ }, {
85
+ icon: p(() => [
86
+ h(s, { size: "200" })
83
87
  ]),
84
88
  _: 1
85
- }, 16, ["aria-label", "onClick"])),
86
- e.showVisuallyHiddenClose ? (s(), c(r, {
87
- key: 2,
88
- "visually-hidden-close-label": e.visuallyHiddenCloseLabel,
89
- onClose: n.close
90
- }, null, 8, ["visually-hidden-close-label", "onClose"])) : l("", !0)
89
+ }, 8, ["aria-label", "title", "onClick"]))
91
90
  ]);
92
91
  }
93
- const V = /* @__PURE__ */ b(B, [["render", v]]);
92
+ const L = /* @__PURE__ */ C(b, [["render", y]]);
94
93
  export {
95
- V as default
94
+ L as default
96
95
  };
97
96
  //# sourceMappingURL=notice-action.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notice-action.js","sources":["../../../components/notice/notice_action.vue"],"sourcesContent":["<template>\n <div\n class=\"d-notice__actions\"\n data-qa=\"notice-content-actions\"\n >\n <!-- @slot Slot for main content -->\n <slot v-if=\"!hideAction\" />\n <dt-button\n v-if=\"!hideClose\"\n ref=\"closeButton\"\n data-qa=\"dt-notice-action-close-button\"\n size=\"sm\"\n importance=\"clear\"\n circle\n :aria-label=\"closeButtonProps.ariaLabel ? closeButtonProps.ariaLabel : 'Close'\"\n v-bind=\"closeButtonProps\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon-close\n size=\"200\"\n />\n </template>\n </dt-button>\n <sr-only-close-button\n v-if=\"showVisuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n @close=\"close\"\n />\n </div>\n</template>\n\n<script>\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue3';\nimport { DtButton } from '@/components/button';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtNoticeAction',\n\n components: {\n DtIconClose,\n DtButton,\n SrOnlyCloseButton,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * Props for the notice close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n ],\n\n created () {\n if (!this.hideClose && !this.closeButtonProps.ariaLabel) {\n console.error('Invalid props: you must pass in closeButtonProps.ariaLabel if the close button is displayed.');\n }\n },\n\n mounted () {\n if (!this.hideClose) {\n this.lastFocusedElement = document.activeElement;\n }\n },\n\n beforeUnmount () {\n this.lastFocusedElement?.focus();\n },\n\n methods: {\n close () {\n this.$emit('close');\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtIconClose","DtButton","SrOnlyCloseButton","SrOnlyCloseButtonMixin","_a","_openBlock","_createElementBlock","_hoisted_1","$props","_createCommentVNode","_renderSlot","_ctx","_createBlock","_component_dt_button","_mergeProps","$options","_createVNode","_component_dt_icon_close","_component_sr_only_close_button"],"mappings":";;;;;;AAsCA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,EACD;AAAA,EAED,QAAQ,CAACC,CAAsB;AAAA,EAE/B,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,SAAS,OAAO,CAAA;AAAA,IACjB;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAA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AA,IAAA,EAAA;AAAA;;;"}
1
+ {"version":3,"file":"notice-action.js","sources":["../../../components/notice/notice_action.vue"],"sourcesContent":["<template>\n <div\n class=\"d-notice__actions\"\n data-qa=\"notice-content-actions\"\n >\n <!-- @slot Slot for main content -->\n <slot v-if=\"!hideAction\" />\n <dt-button\n v-if=\"!hideClose\"\n ref=\"closeButton\"\n :circle=\"true\"\n data-qa=\"dt-notice-action-close-button\"\n importance=\"clear\"\n size=\"sm\"\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon-close\n size=\"200\"\n />\n </template>\n </dt-button>\n <sr-only-close-button\n v-else\n @close=\"close\"\n />\n </div>\n</template>\n\n<script>\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue3';\nimport { DtButton } from '@/components/button';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\nimport { DialtoneLocalization } from '@/localization';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtNoticeAction',\n\n components: {\n DtIconClose,\n DtButton,\n SrOnlyCloseButton,\n },\n\n props: {\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n ],\n\n data () {\n return {\n i18n: new DialtoneLocalization(),\n };\n },\n\n computed: {\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n mounted () {\n if (!this.hideClose) {\n this.lastFocusedElement = document.activeElement;\n }\n },\n\n beforeUnmount () {\n this.lastFocusedElement?.focus();\n },\n\n methods: {\n close () {\n this.$emit('close');\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtIconClose","DtButton","SrOnlyCloseButton","DialtoneLocalization","_a","_openBlock","_createElementBlock","_hoisted_1","$props","_createCommentVNode","_renderSlot","_ctx","_createBlock","_component_sr_only_close_button","$options","_component_dt_button","_createVNode","_component_dt_icon_close"],"mappings":";;;;;;AAqCA,MAAKA,IAAU;AAAA,EACb,cAAc,EAAE,MAAM,EAAG;AAAA,EACzB,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,EACF;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAML;AAAA,EACD;AAAA,EAED,OAAQ;AACN,WAAO;AAAA,MACL,MAAM,IAAIC,EAAsB;AAAA;EAEnC;AAAA,EAED,UAAU;AAAA,IACR,mBAAoB;AAClB,aAAO,KAAK,KAAK,GAAG,uBAAuB;AAAA,IAC5C;AAAA,EACF;AAAA,EAED,UAAW;AACT,IAAK,KAAK,cACR,KAAK,qBAAqB,SAAS;AAAA,EAEtC;AAAA,EAED,gBAAiB;;AACf,KAAAC,IAAA,KAAK,uBAAL,QAAAA,EAAyB;AAAA,EAC1B;AAAA,EAED,SAAS;AAAA,IACP,QAAS;AACP,WAAK,MAAM,OAAO;AAAA,IACnB;AAAA,EACF;AACH;EArGI,OAAM;AAAA,EACN,WAAQ;;;;AAFV,SAAAC,EAAA,GAAAC,EA2BM,OA3BNC,GA2BM;AAAA,IAtBSC,EAAU,aAN3BC,EAAA,IAAA,EAAA,IAMIC,EAA2BC,uBAN/B,KAAA,GAAA;AAAA,IAQaH,EAAS,kBAgBlBI,EAGEC,GAAA;AAAA,MA3BN,KAAA;AAAA,MA0BO,SAAOC,EAAK;AAAA,sCAnBfF,EAgBYG,GAAA;AAAA,MAvBhB,KAAA;AAAA,MASM,KAAI;AAAA,MACH,QAAQ;AAAA,MACT,WAAQ;AAAA,MACR,YAAW;AAAA,MACX,MAAK;AAAA,MACJ,cAAYD,EAAgB;AAAA,MAC5B,OAAOA,EAAgB;AAAA,MACvB,SAAOA,EAAK;AAAA;MAEF,QACT,MAEE;AAAA,QAFFE,EAEEC,GAAA,EADA,MAAK,MAAK,CAAA;AAAA;MApBpB,GAAA;AAAA;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./notice-icon.cjs"),r=require("./notice-content.cjs"),u=require("./notice-action.cjs"),i=require("./notice-constants.cjs"),f=require("../../common/mixins/sr-only-close-button.cjs"),e=require("vue"),_=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),m={compatConfig:{MODE:3},name:"DtNotice",components:{DtNoticeIcon:a.default,DtNoticeContent:r.default,DtNoticeAction:u.default},mixins:[f.default],props:{titleId:{type:String,default:void 0},contentId:{type:String,default:void 0},title:{type:String,default:""},role:{type:String,default:"status",validate(t){return i.NOTICE_ROLES.includes(t)}},important:{type:Boolean,default:!1},kind:{type:String,default:"base",validate(t){return i.NOTICE_KINDS.includes(t)}},closeButtonProps:{type:Object,default:()=>({})},hideClose:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1},hideAction:{type:Boolean,default:!1},truncateText:{type:Boolean,default:!1}},emits:["close","click"],computed:{noticeClass(){return["d-notice",{error:"d-notice--error",info:"d-notice--info",success:"d-notice--success",warning:"d-notice--warning",base:"d-notice--base"}[this.kind],{"d-notice--important":this.important,"d-notice--truncate":this.truncateText}]}}};function C(t,o,n,h,y,l){const c=e.resolveComponent("dt-notice-icon"),d=e.resolveComponent("dt-notice-content"),s=e.resolveComponent("dt-notice-action");return e.openBlock(),e.createElementBlock("aside",{class:e.normalizeClass(l.noticeClass),"data-qa":"notice"},[n.hideIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,{key:0,kind:n.kind},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),_:3},8,["kind"])),e.createVNode(d,{"title-id":n.titleId,"content-id":n.contentId,title:n.title,role:n.role},{titleOverride:e.withCtx(()=>[e.renderSlot(t.$slots,"titleOverride")]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["title-id","content-id","title","role"]),e.createVNode(s,{"hide-action":n.hideAction,"hide-close":n.hideClose,"close-button-props":n.closeButtonProps,"visually-hidden-close":t.visuallyHiddenClose,"visually-hidden-close-label":t.visuallyHiddenCloseLabel,onClose:o[0]||(o[0]=v=>t.$emit("close"))},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"action")]),_:3},8,["hide-action","hide-close","close-button-props","visually-hidden-close","visually-hidden-close-label"])],2)}const p=_._(m,[["render",C]]);exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("./notice-icon.cjs"),s=require("./notice-content.cjs"),u=require("./notice-action.cjs"),i=require("./notice-constants.cjs"),e=require("vue"),f=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),_={compatConfig:{MODE:3},name:"DtNotice",components:{DtNoticeIcon:r.default,DtNoticeContent:s.default,DtNoticeAction:u.default},props:{titleId:{type:String,default:void 0},contentId:{type:String,default:void 0},title:{type:String,default:""},role:{type:String,default:"status",validate(t){return i.NOTICE_ROLES.includes(t)}},important:{type:Boolean,default:!1},kind:{type:String,default:"base",validate(t){return i.NOTICE_KINDS.includes(t)}},hideClose:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1},hideAction:{type:Boolean,default:!1},truncateText:{type:Boolean,default:!1}},emits:["close","click"],computed:{noticeClass(){return["d-notice",{error:"d-notice--error",info:"d-notice--info",success:"d-notice--success",warning:"d-notice--warning",base:"d-notice--base"}[this.kind],{"d-notice--important":this.important,"d-notice--truncate":this.truncateText}]}}};function m(t,o,n,p,h,c){const l=e.resolveComponent("dt-notice-icon"),d=e.resolveComponent("dt-notice-content"),a=e.resolveComponent("dt-notice-action");return e.openBlock(),e.createElementBlock("aside",{class:e.normalizeClass(c.noticeClass),"data-qa":"notice"},[n.hideIcon?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(l,{key:0,kind:n.kind},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"icon")]),_:3},8,["kind"])),e.createVNode(d,{"title-id":n.titleId,"content-id":n.contentId,title:n.title,role:n.role},{titleOverride:e.withCtx(()=>[e.renderSlot(t.$slots,"titleOverride")]),default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["title-id","content-id","title","role"]),e.createVNode(a,{"hide-action":n.hideAction,"hide-close":n.hideClose,onClose:o[0]||(o[0]=S=>t.$emit("close"))},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"action")]),_:3},8,["hide-action","hide-close"])],2)}const C=f._(_,[["render",m]]);exports.default=C;
2
2
  //# sourceMappingURL=notice.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"notice.cjs","sources":["../../../components/notice/notice.vue"],"sourcesContent":["<template>\n <aside\n :class=\"noticeClass\"\n data-qa=\"notice\"\n >\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need\n to override with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the notice -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n :close-button-props=\"closeButtonProps\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n @close=\"$emit('close')\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </aside>\n</template>\n\n<script>\nimport DtNoticeIcon from './notice_icon.vue';\nimport DtNoticeContent from './notice_content.vue';\nimport DtNoticeAction from './notice_action.vue';\nimport { NOTICE_KINDS, NOTICE_ROLES } from './notice_constants';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\n/**\n * A notice is an informational and assistive message that appears inline with content.\n * @see https://dialtone.dialpad.com/components/notice.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtNotice',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the notice. This can be left blank to remove the title from the notice entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the notice. 'status' is used to communicate a message. 'alert' is used to communicate an\n * important message that does not contain any interactive elements. 'alertdialog' is used to communicate an\n * important message that does contain interactive elements.\n * @values alert, alertdialog, status\n */\n role: {\n type: String,\n default: 'status',\n validate (role) {\n return NOTICE_ROLES.includes(role);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * This will also change the aria role from status to alert.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Severity level of the notice, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Props for the notice close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Truncates the content instead of wrapping.\n * Used when the notice needs to have a fixed height.\n * @values true, false\n */\n truncateText: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native button click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n computed: {\n noticeClass () {\n const noticeKinds = {\n error: 'd-notice--error',\n info: 'd-notice--info',\n success: 'd-notice--success',\n warning: 'd-notice--warning',\n base: 'd-notice--base',\n };\n return [\n 'd-notice',\n noticeKinds[this.kind],\n { 'd-notice--important': this.important, 'd-notice--truncate': this.truncateText },\n ];\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","SrOnlyCloseButtonMixin","role","NOTICE_ROLES","kind","NOTICE_KINDS","_createElementBlock","_normalizeClass","$options","$props","_createCommentVNode","_createBlock","_component_dt_notice_icon","_withCtx","_renderSlot","_ctx","_createVNode","_component_dt_notice_content","_component_dt_notice_action"],"mappings":"6XAmDKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,WAEN,WAAY,cACVC,EAAY,QACZ,gBAAAC,EAAe,QACf,eAAAC,EAAc,OACf,EAED,OAAQ,CAACC,EAAAA,OAAsB,EAE/B,MAAO,CAKL,QAAS,CACP,KAAM,OACN,QAAS,MACV,EAMD,UAAW,CACT,KAAM,OACN,QAAS,MACV,EAKD,MAAO,CACL,KAAM,OACN,QAAS,EACV,EAQD,KAAM,CACJ,KAAM,OACN,QAAS,SACT,SAAUC,EAAM,CACd,OAAOC,EAAY,aAAC,SAASD,CAAI,CAClC,CACF,EAOD,UAAW,CACT,KAAM,QACN,QAAS,EACV,EAMD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AAAF,EAAA,QAmCM,IAAsB,CAAtBC,aAAsBC,EAAA,OAAA,QAAA,IAnC5B,EAAA"}
1
+ {"version":3,"file":"notice.cjs","sources":["../../../components/notice/notice.vue"],"sourcesContent":["<template>\n <aside\n :class=\"noticeClass\"\n data-qa=\"notice\"\n >\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need\n to override with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the notice -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n @close=\"$emit('close')\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </aside>\n</template>\n\n<script>\nimport DtNoticeIcon from './notice_icon.vue';\nimport DtNoticeContent from './notice_content.vue';\nimport DtNoticeAction from './notice_action.vue';\nimport { NOTICE_KINDS, NOTICE_ROLES } from './notice_constants';\n\n/**\n * A notice is an informational and assistive message that appears inline with content.\n * @see https://dialtone.dialpad.com/components/notice.html\n */\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtNotice',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the notice. This can be left blank to remove the title from the notice entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the notice. 'status' is used to communicate a message. 'alert' is used to communicate an\n * important message that does not contain any interactive elements. 'alertdialog' is used to communicate an\n * important message that does contain interactive elements.\n * @values alert, alertdialog, status\n */\n role: {\n type: String,\n default: 'status',\n validate (role) {\n return NOTICE_ROLES.includes(role);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * This will also change the aria role from status to alert.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Severity level of the notice, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Truncates the content instead of wrapping.\n * Used when the notice needs to have a fixed height.\n * @values true, false\n */\n truncateText: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native button click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n computed: {\n noticeClass () {\n const noticeKinds = {\n error: 'd-notice--error',\n info: 'd-notice--info',\n success: 'd-notice--success',\n warning: 'd-notice--warning',\n base: 'd-notice--base',\n };\n return [\n 'd-notice',\n noticeKinds[this.kind],\n { 'd-notice--important': this.important, 'd-notice--truncate': this.truncateText },\n ];\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","role","NOTICE_ROLES","kind","NOTICE_KINDS","_createElementBlock","_normalizeClass","$options","$props","_createCommentVNode","_createBlock","_component_dt_notice_icon","_withCtx","_renderSlot","_ctx","_createVNode","_component_dt_notice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