@dialpad/dialtone 9.122.0 → 9.123.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 (376) hide show
  1. package/dist/tokens/doc.json +30685 -30685
  2. package/dist/vue2/_plugin-vue2_normalizer-CeySl7Fu.js +11 -0
  3. package/dist/vue2/_plugin-vue2_normalizer-CeySl7Fu.js.map +1 -0
  4. package/dist/vue2/_plugin-vue2_normalizer-yXi3ZRRD.cjs +2 -0
  5. package/dist/vue2/_plugin-vue2_normalizer-yXi3ZRRD.cjs.map +1 -0
  6. package/dist/vue2/component-documentation.json +1 -1
  7. package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  8. package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
  9. package/dist/vue2/lib/attachment-carousel/attachment-carousel.js +17 -8
  10. package/dist/vue2/lib/attachment-carousel/attachment-carousel.js.map +1 -1
  11. package/dist/vue2/lib/avatar/avatar.cjs +1 -1
  12. package/dist/vue2/lib/avatar/avatar.js +5 -2
  13. package/dist/vue2/lib/avatar/avatar.js.map +1 -1
  14. package/dist/vue2/lib/badge/badge.cjs +1 -1
  15. package/dist/vue2/lib/badge/badge.js +7 -4
  16. package/dist/vue2/lib/badge/badge.js.map +1 -1
  17. package/dist/vue2/lib/banner/banner.cjs +2 -2
  18. package/dist/vue2/lib/banner/banner.js +9 -6
  19. package/dist/vue2/lib/banner/banner.js.map +1 -1
  20. package/dist/vue2/lib/breadcrumbs/breadcrumb-item.cjs +1 -1
  21. package/dist/vue2/lib/breadcrumbs/breadcrumb-item.js +7 -4
  22. package/dist/vue2/lib/breadcrumbs/breadcrumb-item.js.map +1 -1
  23. package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs +1 -1
  24. package/dist/vue2/lib/breadcrumbs/breadcrumbs.js +5 -2
  25. package/dist/vue2/lib/breadcrumbs/breadcrumbs.js.map +1 -1
  26. package/dist/vue2/lib/button/button.cjs +1 -1
  27. package/dist/vue2/lib/button/button.js +5 -2
  28. package/dist/vue2/lib/button/button.js.map +1 -1
  29. package/dist/vue2/lib/button-group/button-group.cjs +1 -1
  30. package/dist/vue2/lib/button-group/button-group.js +11 -8
  31. package/dist/vue2/lib/button-group/button-group.js.map +1 -1
  32. package/dist/vue2/lib/button-group/buttons-decorator.cjs +1 -1
  33. package/dist/vue2/lib/button-group/buttons-decorator.js +7 -4
  34. package/dist/vue2/lib/button-group/buttons-decorator.js.map +1 -1
  35. package/dist/vue2/lib/callbar-button/callbar-button.cjs +1 -1
  36. package/dist/vue2/lib/callbar-button/callbar-button.js +10 -7
  37. package/dist/vue2/lib/callbar-button/callbar-button.js.map +1 -1
  38. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  39. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +5 -2
  40. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  41. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  42. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js +12 -9
  43. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  44. package/dist/vue2/lib/callbox/callbox.cjs +1 -1
  45. package/dist/vue2/lib/callbox/callbox.js +5 -2
  46. package/dist/vue2/lib/callbox/callbox.js.map +1 -1
  47. package/dist/vue2/lib/card/card.cjs +1 -1
  48. package/dist/vue2/lib/card/card.js +7 -4
  49. package/dist/vue2/lib/card/card.js.map +1 -1
  50. package/dist/vue2/lib/checkbox/checkbox.cjs +1 -1
  51. package/dist/vue2/lib/checkbox/checkbox.js +5 -2
  52. package/dist/vue2/lib/checkbox/checkbox.js.map +1 -1
  53. package/dist/vue2/lib/checkbox-group/checkbox-group.cjs +1 -1
  54. package/dist/vue2/lib/checkbox-group/checkbox-group.js +8 -5
  55. package/dist/vue2/lib/checkbox-group/checkbox-group.js.map +1 -1
  56. package/dist/vue2/lib/checkbox-group/checkboxes-decorator.cjs +1 -1
  57. package/dist/vue2/lib/checkbox-group/checkboxes-decorator.js +12 -9
  58. package/dist/vue2/lib/checkbox-group/checkboxes-decorator.js.map +1 -1
  59. package/dist/vue2/lib/chip/chip.cjs +1 -1
  60. package/dist/vue2/lib/chip/chip.js +11 -8
  61. package/dist/vue2/lib/chip/chip.js.map +1 -1
  62. package/dist/vue2/lib/codeblock/codeblock.cjs +2 -2
  63. package/dist/vue2/lib/codeblock/codeblock.js +11 -8
  64. package/dist/vue2/lib/codeblock/codeblock.js.map +1 -1
  65. package/dist/vue2/lib/collapsible/collapsible-lazy-show.cjs +1 -1
  66. package/dist/vue2/lib/collapsible/collapsible-lazy-show.js +5 -2
  67. package/dist/vue2/lib/collapsible/collapsible-lazy-show.js.map +1 -1
  68. package/dist/vue2/lib/collapsible/collapsible.cjs +1 -1
  69. package/dist/vue2/lib/collapsible/collapsible.js +7 -4
  70. package/dist/vue2/lib/collapsible/collapsible.js.map +1 -1
  71. package/dist/vue2/lib/combobox/combobox-empty-list.cjs +1 -1
  72. package/dist/vue2/lib/combobox/combobox-empty-list.js +10 -7
  73. package/dist/vue2/lib/combobox/combobox-empty-list.js.map +1 -1
  74. package/dist/vue2/lib/combobox/combobox-loading-list.cjs +1 -1
  75. package/dist/vue2/lib/combobox/combobox-loading-list.js +10 -7
  76. package/dist/vue2/lib/combobox/combobox-loading-list.js.map +1 -1
  77. package/dist/vue2/lib/combobox/combobox.cjs +2 -2
  78. package/dist/vue2/lib/combobox/combobox.js +5 -2
  79. package/dist/vue2/lib/combobox/combobox.js.map +1 -1
  80. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  81. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js +9 -6
  82. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  83. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
  84. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js +5 -2
  85. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
  86. package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs +1 -1
  87. package/dist/vue2/lib/contact-centers-row/contact-centers-row.js +9 -6
  88. package/dist/vue2/lib/contact-centers-row/contact-centers-row.js.map +1 -1
  89. package/dist/vue2/lib/contact-info/contact-info.cjs +1 -1
  90. package/dist/vue2/lib/contact-info/contact-info.js +8 -5
  91. package/dist/vue2/lib/contact-info/contact-info.js.map +1 -1
  92. package/dist/vue2/lib/contact-row/contact-row.cjs +1 -1
  93. package/dist/vue2/lib/contact-row/contact-row.js +5 -2
  94. package/dist/vue2/lib/contact-row/contact-row.js.map +1 -1
  95. package/dist/vue2/lib/datepicker/datepicker.cjs +1 -1
  96. package/dist/vue2/lib/datepicker/datepicker.cjs.map +1 -1
  97. package/dist/vue2/lib/datepicker/datepicker.js +13 -4
  98. package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
  99. package/dist/vue2/lib/description-list/description-list.cjs +1 -1
  100. package/dist/vue2/lib/description-list/description-list.js +13 -10
  101. package/dist/vue2/lib/description-list/description-list.js.map +1 -1
  102. package/dist/vue2/lib/dropdown/dropdown-list.cjs +1 -1
  103. package/dist/vue2/lib/dropdown/dropdown-list.js +8 -5
  104. package/dist/vue2/lib/dropdown/dropdown-list.js.map +1 -1
  105. package/dist/vue2/lib/dropdown/dropdown-separator.cjs +1 -1
  106. package/dist/vue2/lib/dropdown/dropdown-separator.js +7 -4
  107. package/dist/vue2/lib/dropdown/dropdown-separator.js.map +1 -1
  108. package/dist/vue2/lib/dropdown/dropdown.cjs +1 -1
  109. package/dist/vue2/lib/dropdown/dropdown.js +5 -2
  110. package/dist/vue2/lib/dropdown/dropdown.js.map +1 -1
  111. package/dist/vue2/lib/editor/editor.cjs +1 -1
  112. package/dist/vue2/lib/editor/editor.js +49 -46
  113. package/dist/vue2/lib/editor/editor.js.map +1 -1
  114. package/dist/vue2/lib/emoji/emoji.cjs +1 -1
  115. package/dist/vue2/lib/emoji/emoji.js +10 -7
  116. package/dist/vue2/lib/emoji/emoji.js.map +1 -1
  117. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs +1 -1
  118. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  119. package/dist/vue2/lib/emoji-picker/emoji-picker.js +34 -13
  120. package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
  121. package/dist/vue2/lib/emoji-row/emoji-row.cjs +1 -1
  122. package/dist/vue2/lib/emoji-row/emoji-row.js +6 -3
  123. package/dist/vue2/lib/emoji-row/emoji-row.js.map +1 -1
  124. package/dist/vue2/lib/emoji-text-wrapper/emoji-text-wrapper.cjs +1 -1
  125. package/dist/vue2/lib/emoji-text-wrapper/emoji-text-wrapper.js +9 -6
  126. package/dist/vue2/lib/emoji-text-wrapper/emoji-text-wrapper.js.map +1 -1
  127. package/dist/vue2/lib/empty-state/empty-state.cjs +1 -1
  128. package/dist/vue2/lib/empty-state/empty-state.js +9 -6
  129. package/dist/vue2/lib/empty-state/empty-state.js.map +1 -1
  130. package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs +1 -1
  131. package/dist/vue2/lib/feed-item-pill/feed-item-pill.js +14 -11
  132. package/dist/vue2/lib/feed-item-pill/feed-item-pill.js.map +1 -1
  133. package/dist/vue2/lib/feed-item-row/feed-item-row.cjs +1 -1
  134. package/dist/vue2/lib/feed-item-row/feed-item-row.js +9 -6
  135. package/dist/vue2/lib/feed-item-row/feed-item-row.js.map +1 -1
  136. package/dist/vue2/lib/general-row/general-row.cjs +1 -1
  137. package/dist/vue2/lib/general-row/general-row.js +5 -2
  138. package/dist/vue2/lib/general-row/general-row.js.map +1 -1
  139. package/dist/vue2/lib/general-row/leftbar-general-row-icon.cjs +1 -1
  140. package/dist/vue2/lib/general-row/leftbar-general-row-icon.js +10 -7
  141. package/dist/vue2/lib/general-row/leftbar-general-row-icon.js.map +1 -1
  142. package/dist/vue2/lib/group-row/group-row.cjs +1 -1
  143. package/dist/vue2/lib/group-row/group-row.js +7 -4
  144. package/dist/vue2/lib/group-row/group-row.js.map +1 -1
  145. package/dist/vue2/lib/grouped-chip/grouped-chip.cjs +1 -1
  146. package/dist/vue2/lib/grouped-chip/grouped-chip.js +7 -4
  147. package/dist/vue2/lib/grouped-chip/grouped-chip.js.map +1 -1
  148. package/dist/vue2/lib/hovercard/hovercard.cjs +1 -1
  149. package/dist/vue2/lib/hovercard/hovercard.js +9 -6
  150. package/dist/vue2/lib/hovercard/hovercard.js.map +1 -1
  151. package/dist/vue2/lib/icon/icon.cjs +1 -1
  152. package/dist/vue2/lib/icon/icon.js +12 -9
  153. package/dist/vue2/lib/icon/icon.js.map +1 -1
  154. package/dist/vue2/lib/illustration/illustration.cjs +1 -1
  155. package/dist/vue2/lib/illustration/illustration.js +13 -10
  156. package/dist/vue2/lib/illustration/illustration.js.map +1 -1
  157. package/dist/vue2/lib/image-viewer/image-viewer.cjs +1 -1
  158. package/dist/vue2/lib/image-viewer/image-viewer.js +9 -6
  159. package/dist/vue2/lib/image-viewer/image-viewer.js.map +1 -1
  160. package/dist/vue2/lib/input/input.cjs +1 -1
  161. package/dist/vue2/lib/input/input.js +5 -2
  162. package/dist/vue2/lib/input/input.js.map +1 -1
  163. package/dist/vue2/lib/input-group/input-group.cjs +1 -1
  164. package/dist/vue2/lib/input-group/input-group.js +9 -6
  165. package/dist/vue2/lib/input-group/input-group.js.map +1 -1
  166. package/dist/vue2/lib/item-layout/item-layout.cjs +2 -2
  167. package/dist/vue2/lib/item-layout/item-layout.js +7 -4
  168. package/dist/vue2/lib/item-layout/item-layout.js.map +1 -1
  169. package/dist/vue2/lib/ivr-node/ivr-node.cjs +1 -1
  170. package/dist/vue2/lib/ivr-node/ivr-node.js +14 -11
  171. package/dist/vue2/lib/ivr-node/ivr-node.js.map +1 -1
  172. package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.cjs +1 -1
  173. package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.js +13 -10
  174. package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  175. package/dist/vue2/lib/lazy-show/lazy-show.cjs +1 -1
  176. package/dist/vue2/lib/lazy-show/lazy-show.js +5 -2
  177. package/dist/vue2/lib/lazy-show/lazy-show.js.map +1 -1
  178. package/dist/vue2/lib/link/link.cjs +1 -1
  179. package/dist/vue2/lib/link/link.js +9 -6
  180. package/dist/vue2/lib/link/link.js.map +1 -1
  181. package/dist/vue2/lib/list-item/list-item.cjs +1 -1
  182. package/dist/vue2/lib/list-item/list-item.js +25 -22
  183. package/dist/vue2/lib/list-item/list-item.js.map +1 -1
  184. package/dist/vue2/lib/list-item-group/list-item-group.cjs +1 -1
  185. package/dist/vue2/lib/list-item-group/list-item-group.js +11 -8
  186. package/dist/vue2/lib/list-item-group/list-item-group.js.map +1 -1
  187. package/dist/vue2/lib/message-input/message-input-button.cjs +1 -1
  188. package/dist/vue2/lib/message-input/message-input-button.js +7 -4
  189. package/dist/vue2/lib/message-input/message-input-button.js.map +1 -1
  190. package/dist/vue2/lib/message-input/message-input-link.cjs +1 -1
  191. package/dist/vue2/lib/message-input/message-input-link.js +5 -2
  192. package/dist/vue2/lib/message-input/message-input-link.js.map +1 -1
  193. package/dist/vue2/lib/message-input/message-input-topbar.cjs +1 -1
  194. package/dist/vue2/lib/message-input/message-input-topbar.js +5 -2
  195. package/dist/vue2/lib/message-input/message-input-topbar.js.map +1 -1
  196. package/dist/vue2/lib/message-input/message-input.cjs +1 -1
  197. package/dist/vue2/lib/message-input/message-input.cjs.map +1 -1
  198. package/dist/vue2/lib/message-input/message-input.js +23 -9
  199. package/dist/vue2/lib/message-input/message-input.js.map +1 -1
  200. package/dist/vue2/lib/modal/modal.cjs +2 -2
  201. package/dist/vue2/lib/modal/modal.js +5 -2
  202. package/dist/vue2/lib/modal/modal.js.map +1 -1
  203. package/dist/vue2/lib/notice/notice-action.cjs +1 -1
  204. package/dist/vue2/lib/notice/notice-action.js +7 -4
  205. package/dist/vue2/lib/notice/notice-action.js.map +1 -1
  206. package/dist/vue2/lib/notice/notice-content.cjs +1 -1
  207. package/dist/vue2/lib/notice/notice-content.js +5 -2
  208. package/dist/vue2/lib/notice/notice-content.js.map +1 -1
  209. package/dist/vue2/lib/notice/notice-icon.cjs +1 -1
  210. package/dist/vue2/lib/notice/notice-icon.js +16 -13
  211. package/dist/vue2/lib/notice/notice-icon.js.map +1 -1
  212. package/dist/vue2/lib/notice/notice.cjs +1 -1
  213. package/dist/vue2/lib/notice/notice.js +10 -7
  214. package/dist/vue2/lib/notice/notice.js.map +1 -1
  215. package/dist/vue2/lib/pagination/pagination.cjs +1 -1
  216. package/dist/vue2/lib/pagination/pagination.js +9 -6
  217. package/dist/vue2/lib/pagination/pagination.js.map +1 -1
  218. package/dist/vue2/lib/popover/popover-header-footer.cjs +1 -1
  219. package/dist/vue2/lib/popover/popover-header-footer.js +8 -5
  220. package/dist/vue2/lib/popover/popover-header-footer.js.map +1 -1
  221. package/dist/vue2/lib/popover/popover.cjs +1 -1
  222. package/dist/vue2/lib/popover/popover.js +5 -2
  223. package/dist/vue2/lib/popover/popover.js.map +1 -1
  224. package/dist/vue2/lib/presence/presence.cjs +1 -1
  225. package/dist/vue2/lib/presence/presence.js +7 -4
  226. package/dist/vue2/lib/presence/presence.js.map +1 -1
  227. package/dist/vue2/lib/radio/radio.cjs +1 -1
  228. package/dist/vue2/lib/radio/radio.js +8 -5
  229. package/dist/vue2/lib/radio/radio.js.map +1 -1
  230. package/dist/vue2/lib/radio-group/radio-group.cjs +1 -1
  231. package/dist/vue2/lib/radio-group/radio-group.js +5 -2
  232. package/dist/vue2/lib/radio-group/radio-group.js.map +1 -1
  233. package/dist/vue2/lib/radio-group/radios-decorator.cjs +1 -1
  234. package/dist/vue2/lib/radio-group/radios-decorator.js +9 -6
  235. package/dist/vue2/lib/radio-group/radios-decorator.js.map +1 -1
  236. package/dist/vue2/lib/rich-text-editor/mention-suggestion.cjs +1 -1
  237. package/dist/vue2/lib/rich-text-editor/mention-suggestion.cjs.map +1 -1
  238. package/dist/vue2/lib/rich-text-editor/mention-suggestion.js +33 -14
  239. package/dist/vue2/lib/rich-text-editor/mention-suggestion.js.map +1 -1
  240. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +4 -4
  241. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  242. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +364 -315
  243. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  244. package/dist/vue2/lib/root-layout/root-layout.cjs +1 -1
  245. package/dist/vue2/lib/root-layout/root-layout.js +8 -5
  246. package/dist/vue2/lib/root-layout/root-layout.js.map +1 -1
  247. package/dist/vue2/lib/select-menu/select-menu.cjs +1 -1
  248. package/dist/vue2/lib/select-menu/select-menu.js +5 -2
  249. package/dist/vue2/lib/select-menu/select-menu.js.map +1 -1
  250. package/dist/vue2/lib/settings-menu-button/settings-menu-button.cjs +1 -1
  251. package/dist/vue2/lib/settings-menu-button/settings-menu-button.js +7 -4
  252. package/dist/vue2/lib/settings-menu-button/settings-menu-button.js.map +1 -1
  253. package/dist/vue2/lib/skeleton/skeleton-list-item.cjs +1 -1
  254. package/dist/vue2/lib/skeleton/skeleton-list-item.js +5 -2
  255. package/dist/vue2/lib/skeleton/skeleton-list-item.js.map +1 -1
  256. package/dist/vue2/lib/skeleton/skeleton-paragraph.cjs +1 -1
  257. package/dist/vue2/lib/skeleton/skeleton-paragraph.js +8 -5
  258. package/dist/vue2/lib/skeleton/skeleton-paragraph.js.map +1 -1
  259. package/dist/vue2/lib/skeleton/skeleton-shape.cjs +1 -1
  260. package/dist/vue2/lib/skeleton/skeleton-shape.js +7 -4
  261. package/dist/vue2/lib/skeleton/skeleton-shape.js.map +1 -1
  262. package/dist/vue2/lib/skeleton/skeleton-text.cjs +1 -1
  263. package/dist/vue2/lib/skeleton/skeleton-text.js +14 -11
  264. package/dist/vue2/lib/skeleton/skeleton-text.js.map +1 -1
  265. package/dist/vue2/lib/skeleton/skeleton.cjs +1 -1
  266. package/dist/vue2/lib/skeleton/skeleton.js +9 -6
  267. package/dist/vue2/lib/skeleton/skeleton.js.map +1 -1
  268. package/dist/vue2/lib/split-button/split-button-alpha.cjs +1 -1
  269. package/dist/vue2/lib/split-button/split-button-alpha.js +12 -9
  270. package/dist/vue2/lib/split-button/split-button-alpha.js.map +1 -1
  271. package/dist/vue2/lib/split-button/split-button-omega.cjs +1 -1
  272. package/dist/vue2/lib/split-button/split-button-omega.js +9 -6
  273. package/dist/vue2/lib/split-button/split-button-omega.js.map +1 -1
  274. package/dist/vue2/lib/split-button/split-button.cjs +1 -1
  275. package/dist/vue2/lib/split-button/split-button.js +9 -6
  276. package/dist/vue2/lib/split-button/split-button.js.map +1 -1
  277. package/dist/vue2/lib/stack/stack.cjs +1 -1
  278. package/dist/vue2/lib/stack/stack.js +15 -12
  279. package/dist/vue2/lib/stack/stack.js.map +1 -1
  280. package/dist/vue2/lib/tab/tab-group.cjs +1 -1
  281. package/dist/vue2/lib/tab/tab-group.js +5 -2
  282. package/dist/vue2/lib/tab/tab-group.js.map +1 -1
  283. package/dist/vue2/lib/tab/tab-panel.cjs +1 -1
  284. package/dist/vue2/lib/tab/tab-panel.js +11 -8
  285. package/dist/vue2/lib/tab/tab-panel.js.map +1 -1
  286. package/dist/vue2/lib/tab/tab.cjs +1 -1
  287. package/dist/vue2/lib/tab/tab.js +10 -7
  288. package/dist/vue2/lib/tab/tab.js.map +1 -1
  289. package/dist/vue2/lib/time-pill/time-pill.cjs +1 -1
  290. package/dist/vue2/lib/time-pill/time-pill.js +8 -5
  291. package/dist/vue2/lib/time-pill/time-pill.js.map +1 -1
  292. package/dist/vue2/lib/toast/toast.cjs +1 -1
  293. package/dist/vue2/lib/toast/toast.cjs.map +1 -1
  294. package/dist/vue2/lib/toast/toast.js +17 -5
  295. package/dist/vue2/lib/toast/toast.js.map +1 -1
  296. package/dist/vue2/lib/toggle/toggle.cjs +1 -1
  297. package/dist/vue2/lib/toggle/toggle.js +5 -2
  298. package/dist/vue2/lib/toggle/toggle.js.map +1 -1
  299. package/dist/vue2/lib/tooltip/tooltip.cjs +1 -1
  300. package/dist/vue2/lib/tooltip/tooltip.js +9 -6
  301. package/dist/vue2/lib/tooltip/tooltip.js.map +1 -1
  302. package/dist/vue2/lib/top-banner-info/top-banner-info.cjs +1 -1
  303. package/dist/vue2/lib/top-banner-info/top-banner-info.js +5 -2
  304. package/dist/vue2/lib/top-banner-info/top-banner-info.js.map +1 -1
  305. package/dist/vue2/lib/unread-pill/unread-pill.cjs +1 -1
  306. package/dist/vue2/lib/unread-pill/unread-pill.js +8 -5
  307. package/dist/vue2/lib/unread-pill/unread-pill.js.map +1 -1
  308. package/dist/vue2/lib/validation-messages/validation-messages.cjs +1 -1
  309. package/dist/vue2/lib/validation-messages/validation-messages.js +10 -7
  310. package/dist/vue2/lib/validation-messages/validation-messages.js.map +1 -1
  311. package/dist/vue2/node_modules/@tiptap/vue-2.cjs +1 -1
  312. package/dist/vue2/node_modules/@tiptap/vue-2.cjs.map +1 -1
  313. package/dist/vue2/node_modules/@tiptap/vue-2.js +191 -149
  314. package/dist/vue2/node_modules/@tiptap/vue-2.js.map +1 -1
  315. package/dist/vue2/shared/sr_only_close_button.cjs +1 -1
  316. package/dist/vue2/shared/sr_only_close_button.js +12 -9
  317. package/dist/vue2/shared/sr_only_close_button.js.map +1 -1
  318. package/dist/vue2/style.css +1 -0
  319. package/dist/vue2/types/components/emoji_picker/emoji_picker.vue.d.ts.map +1 -1
  320. package/dist/vue2/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +16 -16
  321. package/dist/vue2/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +16 -16
  322. package/dist/vue2/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +16 -16
  323. package/dist/vue2/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts +5 -0
  324. package/dist/vue2/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts.map +1 -1
  325. package/dist/vue2/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts +16 -16
  326. package/dist/vue2/types/components/rich_text_editor/mention_suggestion.d.ts +23 -3
  327. package/dist/vue2/types/components/rich_text_editor/mention_suggestion.d.ts.map +1 -1
  328. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  329. package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +16 -16
  330. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
  331. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  332. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -1
  333. package/dist/vue3/component-documentation.json +1 -1
  334. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs +1 -1
  335. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
  336. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js +4 -3
  337. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js.map +1 -1
  338. package/dist/vue3/lib/emoji-picker/emoji-picker.cjs +1 -1
  339. package/dist/vue3/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  340. package/dist/vue3/lib/emoji-picker/emoji-picker.js +518 -415
  341. package/dist/vue3/lib/emoji-picker/emoji-picker.js.map +1 -1
  342. package/dist/vue3/lib/rich-text-editor/mention-suggestion.cjs +1 -1
  343. package/dist/vue3/lib/rich-text-editor/mention-suggestion.cjs.map +1 -1
  344. package/dist/vue3/lib/rich-text-editor/mention-suggestion.js +34 -15
  345. package/dist/vue3/lib/rich-text-editor/mention-suggestion.js.map +1 -1
  346. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +3 -3
  347. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  348. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +264 -212
  349. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  350. package/dist/vue3/node_modules/@tiptap/vue-3.cjs +1 -1
  351. package/dist/vue3/node_modules/@tiptap/vue-3.cjs.map +1 -1
  352. package/dist/vue3/node_modules/@tiptap/vue-3.js +165 -115
  353. package/dist/vue3/node_modules/@tiptap/vue-3.js.map +1 -1
  354. package/dist/vue3/style.css +1 -0
  355. package/dist/vue3/types/components/emoji_picker/emoji_picker.vue.d.ts +1 -1
  356. package/dist/vue3/types/components/emoji_picker/emoji_picker.vue.d.ts.map +1 -1
  357. package/dist/vue3/types/components/emoji_picker/emoji_picker_constants.d.ts +1 -0
  358. package/dist/vue3/types/components/emoji_picker/modules/emoji_selector.vue.d.ts +1 -1
  359. package/dist/vue3/types/components/emoji_picker/modules/emoji_selector.vue.d.ts.map +1 -1
  360. package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
  361. package/dist/vue3/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +26 -2
  362. package/dist/vue3/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +26 -2
  363. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +26 -2
  364. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts +5 -0
  365. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts.map +1 -1
  366. package/dist/vue3/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts +26 -2
  367. package/dist/vue3/types/components/rich_text_editor/mention_suggestion.d.ts +23 -3
  368. package/dist/vue3/types/components/rich_text_editor/mention_suggestion.d.ts.map +1 -1
  369. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  370. package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +26 -2
  371. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -1
  372. package/package.json +31 -31
  373. package/dist/vue2/_plugin-vue2_normalizer-DSLOjnn3.js +0 -11
  374. package/dist/vue2/_plugin-vue2_normalizer-DSLOjnn3.js.map +0 -1
  375. package/dist/vue2/_plugin-vue2_normalizer-e_CkxkSV.cjs +0 -2
  376. package/dist/vue2/_plugin-vue2_normalizer-e_CkxkSV.cjs.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("./toast-constants.cjs"),r=require("../../common/mixins/sr-only-close-button.cjs"),s=require("../../common/utils/index.cjs"),a=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),f=require("../notice/notice-icon.cjs"),u=require("../notice/notice-content.cjs"),c=require("../notice/notice-action.cjs"),_=require("../notice/notice-constants.cjs"),o=require("@dialpad/dialtone-icons/vue2"),p=require("../icon/icon-constants.cjs"),h={name:"ToastLayoutDefault",components:{DtNoticeIcon:f.default,DtNoticeContent:u.default,DtNoticeAction:c.default},mixins:[r.default],props:{isShown:{type:Boolean,default:!1},titleId:{type:String,default(){return s.default.getUniqueString()}},contentId:{type:String,default(){return s.default.getUniqueString()}},title:{type:String,default:""},message:{type:String,default:""},role:{type:String,default:"status",validator:e=>i.TOAST_ROLES.includes(e)},kind:{type:String,default:"base",validator:e=>_.NOTICE_KINDS.includes(e)},important:{type:Boolean,default:!1},closeButtonProps:{type:Object,default:()=>({})},hideClose:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1},hideAction:{type:Boolean,default:!1}},computed:{kindClass(){return{error:"d-toast--error",info:"d-toast--info",success:"d-toast--success",warning:"d-toast--warning",base:"d-toast--base"}[this.kind]}}};var y=function(){var t=this,n=t._self._c;return t.isShown?n("div",{class:["d-toast",t.kindClass,{"d-toast--important":t.important}],attrs:{"data-qa":"dt-toast","aria-hidden":(!t.isShown).toString()}},[n("div",{staticClass:"d-toast__dialog"},[t.hideIcon?t._e():n("dt-notice-icon",t._g({attrs:{kind:t.kind}},t.$listeners),[t._t("icon")],2),n("dt-notice-content",t._g({attrs:{"title-id":t.titleId,"content-id":t.contentId,title:t.title,role:t.role},scopedSlots:t._u([{key:"titleOverride",fn:function(){return[t._t("titleOverride")]},proxy:!0}],null,!0)},t.$listeners),[t._t("default",function(){return[t._v(" "+t._s(t.message)+" ")]})],2),n("dt-notice-action",t._g({attrs:{"hide-action":t.hideAction,"hide-close":t.hideClose,"close-button-props":t.closeButtonProps,"visually-hidden-close":t.visuallyHiddenClose,"visually-hidden-close-label":t.visuallyHiddenCloseLabel}},t.$listeners),[t._t("action")],2)],1)]):t._e()},m=[],g=a.n(h,y,m);const l=g.exports,S=new Map([["info",o.DtIconInfo],["success",o.DtIconInfo],["warning",o.DtIconAlertTriangle],["error",o.DtIconInfo],["base",o.DtIconBell],["gradient",o.DtIconSparkle]]),I={name:"DtToastLayoutAlternateIcon",components:{DtIconInfo:o.DtIconInfo,DtIconAlertTriangle:o.DtIconAlertTriangle,DtIconBell:o.DtIconBell,DtIconSparkle:o.DtIconSparkle},props:{kind:{type:String,default:"base",validator(e){return i.TOAST_ALTERNATE_KINDS.includes(e)}},size:{type:String,default:"400",validator:e=>Object.keys(p.ICON_SIZE_MODIFIERS).includes(e)}},computed:{defaultIcon(){return S.get(this.kind)}}};var v=function(){var t=this,n=t._self._c;return n("div",{staticClass:"d-toast-layout-alternate__icon",attrs:{"aria-hidden":"true"}},[t._t("default",function(){return[t.defaultIcon?n(t.defaultIcon,{tag:"component",attrs:{size:t.size}}):t._e()]})],2)},T=[],C=a.n(I,v,T);const D=C.exports,k={name:"ToastLayoutAlternate",components:{DtNoticeAction:c.default,DtNoticeContent:u.default,DtToastLayoutAlternateIcon:D},mixins:[r.default],props:{isShown:{type:Boolean,default:!1},titleId:{type:String,default(){return s.default.getUniqueString()}},contentId:{type:String,default(){return s.default.getUniqueString()}},title:{type:String,default:""},message:{type:String,default:""},role:{type:String,default:"status",validator:e=>i.TOAST_ROLES.includes(e)},kind:{type:String,default:"base",validator:e=>i.TOAST_ALTERNATE_KINDS.includes(e)},important:{type:Boolean,default:!1},closeButtonProps:{type:Object,default:()=>({})},hideClose:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1}},computed:{kindClass(){return{error:"d-toast-alternate--error",info:"d-toast-alternate--info",success:"d-toast-alternate--success",warning:"d-toast-alternate--warning",gradient:"d-toast-alternate--gradient"}[this.kind]}}};var A=function(){var t=this,n=t._self._c;return t.isShown?n("div",{class:["d-toast-alternate",t.kindClass],attrs:{"data-qa":"dt-toast","aria-hidden":(!t.isShown).toString()}},[n("div",{staticClass:"d-toast-alternate__dialog"},[n("div",{staticClass:"d-toast-alternate__header"},[t.hideIcon?t._e():n("dt-toast-layout-alternate-icon",t._g({attrs:{kind:t.kind,size:"200"}},t.$listeners),[t._t("icon")],2),n("dt-notice-content",t._g({attrs:{"title-id":t.titleId,"content-id":t.contentId,title:t.title,role:t.role},scopedSlots:t._u([{key:"titleOverride",fn:function(){return[t._t("titleOverride")]},proxy:!0}],null,!0)},t.$listeners)),n("dt-notice-action",t._g({attrs:{"hide-action":!0,"hide-close":t.hideClose,"button-size":"xs","close-button-props":t.closeButtonProps,"visually-hidden-close":t.visuallyHiddenClose,"visually-hidden-close-label":t.visuallyHiddenCloseLabel}},t.$listeners))],1),n("div",{staticClass:"d-toast-alternate__content"},[t._t("default",function(){return[t._v(" "+t._s(t.message)+" ")]})],2)])]):t._e()},b=[],O=a.n(k,A,b);const d=O.exports,B={name:"DtToast",components:{ToastLayoutDefault:l,ToastLayoutAlternate:d},mixins:[r.default],props:{titleId:{type:String,default:void 0},contentId:{type:String,default:void 0},title:{type:String,default:void 0},message:{type:String,default:void 0},role:{type:String,default:"status"},kind:{type:String,default:void 0},important:{type:Boolean,default:!1},show:{type:Boolean,default:!1},closeButtonProps:{type:Object,default:void 0},hideClose:{type:Boolean,default:void 0},hideIcon:{type:Boolean,default:void 0},hideAction:{type:Boolean,default:void 0},duration:{type:Number,default:null,validator:e=>e>=i.TOAST_MIN_DURATION},layout:{type:String,default:"default",validator:e=>i.TOAST_LAYOUTS.includes(e)}},emits:["close","update:show"],data(){return{isShown:!1,minDuration:i.TOAST_MIN_DURATION}},computed:{shouldSetTimeout(){return!!this.duration&&this.duration>=this.minDuration},selectedLayout(){return this.layout==="alternate"?d:l}},watch:{show:{handler:function(e){this.isShown=e,e?this.setTimeout():clearTimeout(this.displayTimer)},immediate:!0}},destroyed(){this.shouldSetTimeout&&clearTimeout(this.displayTimer)},methods:{setTimeout(){this.shouldSetTimeout&&(this.displayTimer=setTimeout(()=>{this.isShown=!1,this.$emit("update:show",!1)},this.duration))},handleClose(){this.isShown=!1,this.$emit("update:show",!1)}}};var w=function(){var t=this,n=t._self._c;return n(t.selectedLayout,t._g({tag:"component",attrs:{"is-shown":t.isShown,"title-id":t.titleId,"content-id":t.contentId,title:t.title,message:t.message,role:t.role,kind:t.kind,important:t.important,"close-button-props":t.closeButtonProps,"hide-close":t.hideClose,"hide-icon":t.hideIcon,"hide-action":t.hideAction},on:{close:t.handleClose},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("icon")]},proxy:!0},{key:"titleOverride",fn:function(){return[t._t("titleOverride")]},proxy:!0},{key:"action",fn:function(){return[t._t("action")]},proxy:!0}],null,!0)},t.$listeners),[t._t("default",function(){return[t._v(" "+t._s(t.message)+" ")]})],2)},$=[],N=a.n(B,w,$);const q=N.exports;exports.default=q;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("./toast-constants.cjs"),l=require("../../common/mixins/sr-only-close-button.cjs"),s=require("../../common/utils/index.cjs"),a=require("../../_plugin-vue2_normalizer-yXi3ZRRD.cjs"),f=require("../notice/notice-icon.cjs"),u=require("../notice/notice-content.cjs"),c=require("../notice/notice-action.cjs"),_=require("../notice/notice-constants.cjs"),o=require("@dialpad/dialtone-icons/vue2"),p=require("../icon/icon-constants.cjs"),h={name:"ToastLayoutDefault",components:{DtNoticeIcon:f.default,DtNoticeContent:u.default,DtNoticeAction:c.default},mixins:[l.default],props:{isShown:{type:Boolean,default:!1},titleId:{type:String,default(){return s.default.getUniqueString()}},contentId:{type:String,default(){return s.default.getUniqueString()}},title:{type:String,default:""},message:{type:String,default:""},role:{type:String,default:"status",validator:e=>i.TOAST_ROLES.includes(e)},kind:{type:String,default:"base",validator:e=>_.NOTICE_KINDS.includes(e)},important:{type:Boolean,default:!1},closeButtonProps:{type:Object,default:()=>({})},hideClose:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1},hideAction:{type:Boolean,default:!1}},computed:{kindClass(){return{error:"d-toast--error",info:"d-toast--info",success:"d-toast--success",warning:"d-toast--warning",base:"d-toast--base"}[this.kind]}}};var y=function(){var t=this,n=t._self._c;return t.isShown?n("div",{class:["d-toast",t.kindClass,{"d-toast--important":t.important}],attrs:{"data-qa":"dt-toast","aria-hidden":(!t.isShown).toString()}},[n("div",{staticClass:"d-toast__dialog"},[t.hideIcon?t._e():n("dt-notice-icon",t._g({attrs:{kind:t.kind}},t.$listeners),[t._t("icon")],2),n("dt-notice-content",t._g({attrs:{"title-id":t.titleId,"content-id":t.contentId,title:t.title,role:t.role},scopedSlots:t._u([{key:"titleOverride",fn:function(){return[t._t("titleOverride")]},proxy:!0}],null,!0)},t.$listeners),[t._t("default",function(){return[t._v(" "+t._s(t.message)+" ")]})],2),n("dt-notice-action",t._g({attrs:{"hide-action":t.hideAction,"hide-close":t.hideClose,"close-button-props":t.closeButtonProps,"visually-hidden-close":t.visuallyHiddenClose,"visually-hidden-close-label":t.visuallyHiddenCloseLabel}},t.$listeners),[t._t("action")],2)],1)]):t._e()},m=[],g=a.n(h,y,m,!1,null,null);const r=g.exports,S=new Map([["info",o.DtIconInfo],["success",o.DtIconInfo],["warning",o.DtIconAlertTriangle],["error",o.DtIconInfo],["base",o.DtIconBell],["gradient",o.DtIconSparkle]]),I={name:"DtToastLayoutAlternateIcon",components:{DtIconInfo:o.DtIconInfo,DtIconAlertTriangle:o.DtIconAlertTriangle,DtIconBell:o.DtIconBell,DtIconSparkle:o.DtIconSparkle},props:{kind:{type:String,default:"base",validator(e){return i.TOAST_ALTERNATE_KINDS.includes(e)}},size:{type:String,default:"400",validator:e=>Object.keys(p.ICON_SIZE_MODIFIERS).includes(e)}},computed:{defaultIcon(){return S.get(this.kind)}}};var v=function(){var t=this,n=t._self._c;return n("div",{staticClass:"d-toast-layout-alternate__icon",attrs:{"aria-hidden":"true"}},[t._t("default",function(){return[t.defaultIcon?n(t.defaultIcon,{tag:"component",attrs:{size:t.size}}):t._e()]})],2)},T=[],C=a.n(I,v,T,!1,null,null);const D=C.exports,k={name:"ToastLayoutAlternate",components:{DtNoticeAction:c.default,DtNoticeContent:u.default,DtToastLayoutAlternateIcon:D},mixins:[l.default],props:{isShown:{type:Boolean,default:!1},titleId:{type:String,default(){return s.default.getUniqueString()}},contentId:{type:String,default(){return s.default.getUniqueString()}},title:{type:String,default:""},message:{type:String,default:""},role:{type:String,default:"status",validator:e=>i.TOAST_ROLES.includes(e)},kind:{type:String,default:"base",validator:e=>i.TOAST_ALTERNATE_KINDS.includes(e)},important:{type:Boolean,default:!1},closeButtonProps:{type:Object,default:()=>({})},hideClose:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1}},computed:{kindClass(){return{error:"d-toast-alternate--error",info:"d-toast-alternate--info",success:"d-toast-alternate--success",warning:"d-toast-alternate--warning",gradient:"d-toast-alternate--gradient"}[this.kind]}}};var A=function(){var t=this,n=t._self._c;return t.isShown?n("div",{class:["d-toast-alternate",t.kindClass],attrs:{"data-qa":"dt-toast","aria-hidden":(!t.isShown).toString()}},[n("div",{staticClass:"d-toast-alternate__dialog"},[n("div",{staticClass:"d-toast-alternate__header"},[t.hideIcon?t._e():n("dt-toast-layout-alternate-icon",t._g({attrs:{kind:t.kind,size:"200"}},t.$listeners),[t._t("icon")],2),n("dt-notice-content",t._g({attrs:{"title-id":t.titleId,"content-id":t.contentId,title:t.title,role:t.role},scopedSlots:t._u([{key:"titleOverride",fn:function(){return[t._t("titleOverride")]},proxy:!0}],null,!0)},t.$listeners)),n("dt-notice-action",t._g({attrs:{"hide-action":!0,"hide-close":t.hideClose,"button-size":"xs","close-button-props":t.closeButtonProps,"visually-hidden-close":t.visuallyHiddenClose,"visually-hidden-close-label":t.visuallyHiddenCloseLabel}},t.$listeners))],1),n("div",{staticClass:"d-toast-alternate__content"},[t._t("default",function(){return[t._v(" "+t._s(t.message)+" ")]})],2)])]):t._e()},b=[],O=a.n(k,A,b,!1,null,null);const d=O.exports,B={name:"DtToast",components:{ToastLayoutDefault:r,ToastLayoutAlternate:d},mixins:[l.default],props:{titleId:{type:String,default:void 0},contentId:{type:String,default:void 0},title:{type:String,default:void 0},message:{type:String,default:void 0},role:{type:String,default:"status"},kind:{type:String,default:void 0},important:{type:Boolean,default:!1},show:{type:Boolean,default:!1},closeButtonProps:{type:Object,default:void 0},hideClose:{type:Boolean,default:void 0},hideIcon:{type:Boolean,default:void 0},hideAction:{type:Boolean,default:void 0},duration:{type:Number,default:null,validator:e=>e>=i.TOAST_MIN_DURATION},layout:{type:String,default:"default",validator:e=>i.TOAST_LAYOUTS.includes(e)}},emits:["close","update:show"],data(){return{isShown:!1,minDuration:i.TOAST_MIN_DURATION}},computed:{shouldSetTimeout(){return!!this.duration&&this.duration>=this.minDuration},selectedLayout(){return this.layout==="alternate"?d:r}},watch:{show:{handler:function(e){this.isShown=e,e?this.setTimeout():clearTimeout(this.displayTimer)},immediate:!0}},destroyed(){this.shouldSetTimeout&&clearTimeout(this.displayTimer)},methods:{setTimeout(){this.shouldSetTimeout&&(this.displayTimer=setTimeout(()=>{this.isShown=!1,this.$emit("update:show",!1)},this.duration))},handleClose(){this.isShown=!1,this.$emit("update:show",!1)}}};var w=function(){var t=this,n=t._self._c;return n(t.selectedLayout,t._g({tag:"component",attrs:{"is-shown":t.isShown,"title-id":t.titleId,"content-id":t.contentId,title:t.title,message:t.message,role:t.role,kind:t.kind,important:t.important,"close-button-props":t.closeButtonProps,"hide-close":t.hideClose,"hide-icon":t.hideIcon,"hide-action":t.hideAction},on:{close:t.handleClose},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("icon")]},proxy:!0},{key:"titleOverride",fn:function(){return[t._t("titleOverride")]},proxy:!0},{key:"action",fn:function(){return[t._t("action")]},proxy:!0}],null,!0)},t.$listeners),[t._t("default",function(){return[t._v(" "+t._s(t.message)+" ")]})],2)},$=[],N=a.n(B,w,$,!1,null,null);const q=N.exports;exports.default=q;
2
2
  //# sourceMappingURL=toast.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"toast.cjs","sources":["../../../components/toast/layouts/toast_layout_default.vue","../../../components/toast/layouts/toast_layout_alternate_icon.vue","../../../components/toast/layouts/toast_layout_alternate.vue","../../../components/toast/toast.vue"],"sourcesContent":["<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-on=\"$listeners\"\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 v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\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 v-on=\"$listeners\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport { TOAST_ROLES } from '../toast_constants.js';\nexport default {\n name: 'ToastLayoutDefault',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\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 () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the toast\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 computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast--error',\n info: 'd-toast--info',\n success: 'd-toast--success',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n },\n};\n</script>\n","<template>\n <div\n aria-hidden=\"true\"\n class=\"d-toast-layout-alternate__icon\"\n >\n <slot>\n <component\n :is=\"defaultIcon\"\n v-if=\"defaultIcon\"\n :size=\"size\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n} from '@dialpad/dialtone-icons/vue2';\nimport { TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nimport { ICON_SIZE_MODIFIERS } from '@/components/icon/icon_constants.js';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['success', DtIconInfo],\n ['warning', DtIconAlertTriangle],\n ['error', DtIconInfo],\n ['base', DtIconBell],\n ['gradient', DtIconSparkle],\n]);\n\nexport default {\n name: 'DtToastLayoutAlternateIcon',\n components: {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator (kind) {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n size: {\n type: String,\n default: '400',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n","<!-- eslint-disable vue/no-bare-strings-in-template -->\n<!-- stub for the new alternate toast layout -->\n<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast-alternate',\n kindClass,\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast-alternate__dialog\">\n <div class=\"d-toast-alternate__header\">\n <dt-toast-layout-alternate-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n size=\"200\"\n v-on=\"$listeners\"\n >\n <slot name=\"icon\" />\n </dt-toast-layout-alternate-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <slot name=\"titleOverride\" />\n </template>\n </dt-notice-content>\n\n <!-- Close Button -->\n <dt-notice-action\n :hide-action=\"true\"\n :hide-close=\"hideClose\"\n button-size=\"xs\"\n :close-button-props=\"closeButtonProps\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n v-on=\"$listeners\"\n />\n </div>\n <!-- Content Section -->\n <div class=\"d-toast-alternate__content\">\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport DtToastLayoutAlternateIcon from './toast_layout_alternate_icon.vue';\nimport { DtNoticeAction, DtNoticeContent } from '@/components/notice';\nimport { TOAST_ROLES, TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nexport default {\n name: 'ToastLayoutAlternate',\n\n components: {\n DtNoticeAction,\n DtNoticeContent,\n DtToastLayoutAlternateIcon,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\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 () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the toast\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 computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast-alternate--error',\n info: 'd-toast-alternate--info',\n success: 'd-toast-alternate--success',\n warning: 'd-toast-alternate--warning',\n gradient: 'd-toast-alternate--gradient',\n };\n\n return kindClasses[this.kind];\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"selectedLayout\"\n :is-shown=\"isShown\"\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :message=\"message\"\n :role=\"role\"\n :kind=\"kind\"\n :important=\"important\"\n :close-button-props=\"closeButtonProps\"\n :hide-close=\"hideClose\"\n :hide-icon=\"hideIcon\"\n :hide-action=\"hideAction\"\n v-on=\"$listeners\"\n @close=\"handleClose\"\n >\n <!-- @slot Slot for custom icon -->\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <template #action>\n <slot name=\"action\" />\n </template>\n </component>\n</template>\n\n<script>\nimport { TOAST_MIN_DURATION, TOAST_LAYOUTS } from './toast_constants.js';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport ToastLayoutDefault from './layouts/toast_layout_default.vue';\nimport ToastLayoutAlternate from './layouts/toast_layout_alternate.vue';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n name: 'DtToast',\n\n components: {\n ToastLayoutDefault,\n ToastLayoutAlternate,\n },\n\n 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 toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: undefined,\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n },\n\n /**\n * Severity level of the toast, could be different depending on which toast layout is used.\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: undefined,\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `.sync` modifier with this prop to update\n * the data in your component.\n * Supports .sync modifier\n * @values true, false\n */\n show: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: undefined,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n\n /**\n * The layout / styling you wish to use for the toast.\n * @values default, alternate\n */\n layout: {\n type: String,\n default: 'default',\n validator: (layout) => {\n return TOAST_LAYOUTS.includes(layout);\n },\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n\n selectedLayout () {\n return this.layout === 'alternate' ? ToastLayoutAlternate : ToastLayoutDefault;\n },\n },\n\n watch: {\n show: {\n handler: function (show) {\n this.isShown = show;\n if (show) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n destroyed () {\n if (this.shouldSetTimeout) {\n clearTimeout(this.displayTimer);\n }\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:show', false);\n }, this.duration);\n }\n },\n\n handleClose () {\n this.isShown = false;\n this.$emit('update:show', false);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","SrOnlyCloseButtonMixin","utils","role","TOAST_ROLES","kind","NOTICE_KINDS","kindToIcon","DtIconInfo","DtIconAlertTriangle","DtIconBell","DtIconSparkle","TOAST_ALTERNATE_KINDS","s","ICON_SIZE_MODIFIERS","DtToastLayoutAlternateIcon","ToastLayoutDefault","ToastLayoutAlternate","duration","TOAST_MIN_DURATION","layout","TOAST_LAYOUTS","show"],"mappings":"yiBAyDAA,EAAA,CACA,KAAA,qBAEA,WAAA,CACA,aAAAC,EAAA,QACA,gBAAAC,EAAA,QACA,eAAAC,EAAA,OACA,EAEA,OAAA,CAAAC,EAAAA,OAAA,EAEA,MAAA,CACA,QAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,QAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAC,UAAA,gBAAA,CAAA,CACA,EAMA,UAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAA,UAAA,gBAAA,CAAA,CACA,EAKA,MAAA,CACA,KAAA,OACA,QAAA,EACA,EAKA,QAAA,CACA,KAAA,OACA,QAAA,EACA,EAOA,KAAA,CACA,KAAA,OACA,QAAA,SACA,UAAAC,GACAC,EAAA,YAAA,SAAAD,CAAA,CAEA,EAMA,KAAA,CACA,KAAA,OACA,QAAA,OACA,UAAAE,GACAC,EAAA,aAAA,SAAAD,CAAA,CAEA,EAMA,UAAA,CACA,KAAA,QACA,QAAA,EACA,EAKA,iBAAA,CACA,KAAA,OACA,QAAA,KAAA,CAAA,EACA,EAMA,UAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,SAAA,CACA,KAAA,QACA,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ACA,MAAA,CACA,QAAA,GACA,YAAAD,EAAA,kBACA,CACA,EAEA,SAAA,CACA,kBAAA,CACA,MAAA,CAAA,CAAA,KAAA,UAAA,KAAA,UAAA,KAAA,WACA,EAEA,gBAAA,CACA,OAAA,KAAA,SAAA,YAAAF,EAAAD,CACA,CACA,EAEA,MAAA,CACA,KAAA,CACA,QAAA,SAAAM,EAAA,CACA,KAAA,QAAAA,EACAA,EACA,KAAA,WAAA,EAEA,aAAA,KAAA,YAAA,CAEA,EAEA,UAAA,EACA,CACA,EAEA,WAAA,CACA,KAAA,kBACA,aAAA,KAAA,YAAA,CAEA,EAEA,QAAA,CACA,YAAA,CACA,KAAA,mBACA,KAAA,aAAA,WAAA,IAAA,CACA,KAAA,QAAA,GACA,KAAA,MAAA,cAAA,EAAA,CACA,EAAA,KAAA,QAAA,EAEA,EAEA,aAAA,CACA,KAAA,QAAA,GACA,KAAA,MAAA,cAAA,EAAA,CACA,CACA,CACA"}
1
+ {"version":3,"file":"toast.cjs","sources":["../../../components/toast/layouts/toast_layout_default.vue","../../../components/toast/layouts/toast_layout_alternate_icon.vue","../../../components/toast/layouts/toast_layout_alternate.vue","../../../components/toast/toast.vue"],"sourcesContent":["<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-on=\"$listeners\"\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 v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\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 v-on=\"$listeners\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport { TOAST_ROLES } from '../toast_constants.js';\nexport default {\n name: 'ToastLayoutDefault',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\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 () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the toast\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 computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast--error',\n info: 'd-toast--info',\n success: 'd-toast--success',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n },\n};\n</script>\n","<template>\n <div\n aria-hidden=\"true\"\n class=\"d-toast-layout-alternate__icon\"\n >\n <slot>\n <component\n :is=\"defaultIcon\"\n v-if=\"defaultIcon\"\n :size=\"size\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n} from '@dialpad/dialtone-icons/vue2';\nimport { TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nimport { ICON_SIZE_MODIFIERS } from '@/components/icon/icon_constants.js';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['success', DtIconInfo],\n ['warning', DtIconAlertTriangle],\n ['error', DtIconInfo],\n ['base', DtIconBell],\n ['gradient', DtIconSparkle],\n]);\n\nexport default {\n name: 'DtToastLayoutAlternateIcon',\n components: {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator (kind) {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n size: {\n type: String,\n default: '400',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n","<!-- eslint-disable vue/no-bare-strings-in-template -->\n<!-- stub for the new alternate toast layout -->\n<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast-alternate',\n kindClass,\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast-alternate__dialog\">\n <div class=\"d-toast-alternate__header\">\n <dt-toast-layout-alternate-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n size=\"200\"\n v-on=\"$listeners\"\n >\n <slot name=\"icon\" />\n </dt-toast-layout-alternate-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <slot name=\"titleOverride\" />\n </template>\n </dt-notice-content>\n\n <!-- Close Button -->\n <dt-notice-action\n :hide-action=\"true\"\n :hide-close=\"hideClose\"\n button-size=\"xs\"\n :close-button-props=\"closeButtonProps\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n v-on=\"$listeners\"\n />\n </div>\n <!-- Content Section -->\n <div class=\"d-toast-alternate__content\">\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport DtToastLayoutAlternateIcon from './toast_layout_alternate_icon.vue';\nimport { DtNoticeAction, DtNoticeContent } from '@/components/notice';\nimport { TOAST_ROLES, TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nexport default {\n name: 'ToastLayoutAlternate',\n\n components: {\n DtNoticeAction,\n DtNoticeContent,\n DtToastLayoutAlternateIcon,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\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 () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the toast\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 computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast-alternate--error',\n info: 'd-toast-alternate--info',\n success: 'd-toast-alternate--success',\n warning: 'd-toast-alternate--warning',\n gradient: 'd-toast-alternate--gradient',\n };\n\n return kindClasses[this.kind];\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"selectedLayout\"\n :is-shown=\"isShown\"\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :message=\"message\"\n :role=\"role\"\n :kind=\"kind\"\n :important=\"important\"\n :close-button-props=\"closeButtonProps\"\n :hide-close=\"hideClose\"\n :hide-icon=\"hideIcon\"\n :hide-action=\"hideAction\"\n v-on=\"$listeners\"\n @close=\"handleClose\"\n >\n <!-- @slot Slot for custom icon -->\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <template #action>\n <slot name=\"action\" />\n </template>\n </component>\n</template>\n\n<script>\nimport { TOAST_MIN_DURATION, TOAST_LAYOUTS } from './toast_constants.js';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport ToastLayoutDefault from './layouts/toast_layout_default.vue';\nimport ToastLayoutAlternate from './layouts/toast_layout_alternate.vue';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n name: 'DtToast',\n\n components: {\n ToastLayoutDefault,\n ToastLayoutAlternate,\n },\n\n 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 toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: undefined,\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n },\n\n /**\n * Severity level of the toast, could be different depending on which toast layout is used.\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: undefined,\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `.sync` modifier with this prop to update\n * the data in your component.\n * Supports .sync modifier\n * @values true, false\n */\n show: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: undefined,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n\n /**\n * The layout / styling you wish to use for the toast.\n * @values default, alternate\n */\n layout: {\n type: String,\n default: 'default',\n validator: (layout) => {\n return TOAST_LAYOUTS.includes(layout);\n },\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n\n selectedLayout () {\n return this.layout === 'alternate' ? ToastLayoutAlternate : ToastLayoutDefault;\n },\n },\n\n watch: {\n show: {\n handler: function (show) {\n this.isShown = show;\n if (show) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n destroyed () {\n if (this.shouldSetTimeout) {\n clearTimeout(this.displayTimer);\n }\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:show', false);\n }, this.duration);\n }\n },\n\n handleClose () {\n this.isShown = false;\n this.$emit('update:show', false);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","SrOnlyCloseButtonMixin","utils","role","TOAST_ROLES","kind","NOTICE_KINDS","kindToIcon","DtIconInfo","DtIconAlertTriangle","DtIconBell","DtIconSparkle","TOAST_ALTERNATE_KINDS","s","ICON_SIZE_MODIFIERS","DtToastLayoutAlternateIcon","ToastLayoutDefault","ToastLayoutAlternate","duration","TOAST_MIN_DURATION","layout","TOAST_LAYOUTS","show"],"mappings":"yiBAyDAA,EAAA,CACA,KAAA,qBAEA,WAAA,CACA,aAAAC,EAAA,QACA,gBAAAC,EAAA,QACA,eAAAC,EAAA,OACA,EAEA,OAAA,CAAAC,EAAAA,OAAA,EAEA,MAAA,CACA,QAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,QAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAC,UAAA,gBAAA,CAAA,CACA,EAMA,UAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAA,UAAA,gBAAA,CAAA,CACA,EAKA,MAAA,CACA,KAAA,OACA,QAAA,EACA,EAKA,QAAA,CACA,KAAA,OACA,QAAA,EACA,EAOA,KAAA,CACA,KAAA,OACA,QAAA,SACA,UAAAC,GACAC,EAAA,YAAA,SAAAD,CAAA,CAEA,EAMA,KAAA,CACA,KAAA,OACA,QAAA,OACA,UAAAE,GACAC,EAAA,aAAA,SAAAD,CAAA,CAEA,EAMA,UAAA,CACA,KAAA,QACA,QAAA,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AAA,CACA,KAAA,OACA,QAAA,UACA,UAAAC,GACAC,EAAA,cAAA,SAAAD,CAAA,CAEA,CACA,EAEA,MAAA,CAMA,QAOA,aACA,EAEA,MAAA,CACA,MAAA,CACA,QAAA,GACA,YAAAD,EAAA,kBACA,CACA,EAEA,SAAA,CACA,kBAAA,CACA,MAAA,CAAA,CAAA,KAAA,UAAA,KAAA,UAAA,KAAA,WACA,EAEA,gBAAA,CACA,OAAA,KAAA,SAAA,YAAAF,EAAAD,CACA,CACA,EAEA,MAAA,CACA,KAAA,CACA,QAAA,SAAAM,EAAA,CACA,KAAA,QAAAA,EACAA,EACA,KAAA,WAAA,EAEA,aAAA,KAAA,YAAA,CAEA,EAEA,UAAA,EACA,CACA,EAEA,WAAA,CACA,KAAA,kBACA,aAAA,KAAA,YAAA,CAEA,EAEA,QAAA,CACA,YAAA,CACA,KAAA,mBACA,KAAA,aAAA,WAAA,IAAA,CACA,KAAA,QAAA,GACA,KAAA,MAAA,cAAA,EAAA,CACA,EAAA,KAAA,QAAA,EAEA,EAEA,aAAA,CACA,KAAA,QAAA,GACA,KAAA,MAAA,cAAA,EAAA,CACA,CACA,CACA"}
@@ -1,7 +1,7 @@
1
1
  import { TOAST_ROLES as u, TOAST_ALTERNATE_KINDS as c, TOAST_MIN_DURATION as r, TOAST_LAYOUTS as y } from "./toast-constants.js";
2
2
  import a from "../../common/mixins/sr-only-close-button.js";
3
3
  import i from "../../common/utils/index.js";
4
- import { n as s } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
4
+ import { n as s } from "../../_plugin-vue2_normalizer-CeySl7Fu.js";
5
5
  import g from "../notice/notice-icon.js";
6
6
  import f from "../notice/notice-content.js";
7
7
  import p from "../notice/notice-action.js";
@@ -140,7 +140,10 @@ var T = function() {
140
140
  }, C = [], k = /* @__PURE__ */ s(
141
141
  I,
142
142
  T,
143
- C
143
+ C,
144
+ !1,
145
+ null,
146
+ null
144
147
  );
145
148
  const l = k.exports, w = /* @__PURE__ */ new Map([
146
149
  ["info", o],
@@ -189,7 +192,10 @@ var O = function() {
189
192
  }, $ = [], b = /* @__PURE__ */ s(
190
193
  B,
191
194
  O,
192
- $
195
+ $,
196
+ !1,
197
+ null,
198
+ null
193
199
  );
194
200
  const A = b.exports, D = {
195
201
  name: "ToastLayoutAlternate",
@@ -314,7 +320,10 @@ var x = function() {
314
320
  }, L = [], N = /* @__PURE__ */ s(
315
321
  D,
316
322
  x,
317
- L
323
+ L,
324
+ !1,
325
+ null,
326
+ null
318
327
  );
319
328
  const d = N.exports, R = {
320
329
  name: "DtToast",
@@ -505,7 +514,10 @@ var q = function() {
505
514
  }, z = [], E = /* @__PURE__ */ s(
506
515
  R,
507
516
  q,
508
- z
517
+ z,
518
+ !1,
519
+ null,
520
+ null
509
521
  );
510
522
  const J = E.exports;
511
523
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"toast.js","sources":["../../../components/toast/layouts/toast_layout_default.vue","../../../components/toast/layouts/toast_layout_alternate_icon.vue","../../../components/toast/layouts/toast_layout_alternate.vue","../../../components/toast/toast.vue"],"sourcesContent":["<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-on=\"$listeners\"\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 v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\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 v-on=\"$listeners\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport { TOAST_ROLES } from '../toast_constants.js';\nexport default {\n name: 'ToastLayoutDefault',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\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 () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the toast\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 computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast--error',\n info: 'd-toast--info',\n success: 'd-toast--success',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n },\n};\n</script>\n","<template>\n <div\n aria-hidden=\"true\"\n class=\"d-toast-layout-alternate__icon\"\n >\n <slot>\n <component\n :is=\"defaultIcon\"\n v-if=\"defaultIcon\"\n :size=\"size\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n} from '@dialpad/dialtone-icons/vue2';\nimport { TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nimport { ICON_SIZE_MODIFIERS } from '@/components/icon/icon_constants.js';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['success', DtIconInfo],\n ['warning', DtIconAlertTriangle],\n ['error', DtIconInfo],\n ['base', DtIconBell],\n ['gradient', DtIconSparkle],\n]);\n\nexport default {\n name: 'DtToastLayoutAlternateIcon',\n components: {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator (kind) {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n size: {\n type: String,\n default: '400',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n","<!-- eslint-disable vue/no-bare-strings-in-template -->\n<!-- stub for the new alternate toast layout -->\n<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast-alternate',\n kindClass,\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast-alternate__dialog\">\n <div class=\"d-toast-alternate__header\">\n <dt-toast-layout-alternate-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n size=\"200\"\n v-on=\"$listeners\"\n >\n <slot name=\"icon\" />\n </dt-toast-layout-alternate-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <slot name=\"titleOverride\" />\n </template>\n </dt-notice-content>\n\n <!-- Close Button -->\n <dt-notice-action\n :hide-action=\"true\"\n :hide-close=\"hideClose\"\n button-size=\"xs\"\n :close-button-props=\"closeButtonProps\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n v-on=\"$listeners\"\n />\n </div>\n <!-- Content Section -->\n <div class=\"d-toast-alternate__content\">\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport DtToastLayoutAlternateIcon from './toast_layout_alternate_icon.vue';\nimport { DtNoticeAction, DtNoticeContent } from '@/components/notice';\nimport { TOAST_ROLES, TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nexport default {\n name: 'ToastLayoutAlternate',\n\n components: {\n DtNoticeAction,\n DtNoticeContent,\n DtToastLayoutAlternateIcon,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\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 () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the toast\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 computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast-alternate--error',\n info: 'd-toast-alternate--info',\n success: 'd-toast-alternate--success',\n warning: 'd-toast-alternate--warning',\n gradient: 'd-toast-alternate--gradient',\n };\n\n return kindClasses[this.kind];\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"selectedLayout\"\n :is-shown=\"isShown\"\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :message=\"message\"\n :role=\"role\"\n :kind=\"kind\"\n :important=\"important\"\n :close-button-props=\"closeButtonProps\"\n :hide-close=\"hideClose\"\n :hide-icon=\"hideIcon\"\n :hide-action=\"hideAction\"\n v-on=\"$listeners\"\n @close=\"handleClose\"\n >\n <!-- @slot Slot for custom icon -->\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <template #action>\n <slot name=\"action\" />\n </template>\n </component>\n</template>\n\n<script>\nimport { TOAST_MIN_DURATION, TOAST_LAYOUTS } from './toast_constants.js';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport ToastLayoutDefault from './layouts/toast_layout_default.vue';\nimport ToastLayoutAlternate from './layouts/toast_layout_alternate.vue';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n name: 'DtToast',\n\n components: {\n ToastLayoutDefault,\n ToastLayoutAlternate,\n },\n\n 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 toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: undefined,\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n },\n\n /**\n * Severity level of the toast, could be different depending on which toast layout is used.\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: undefined,\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `.sync` modifier with this prop to update\n * the data in your component.\n * Supports .sync modifier\n * @values true, false\n */\n show: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: undefined,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n\n /**\n * The layout / styling you wish to use for the toast.\n * @values default, alternate\n */\n layout: {\n type: String,\n default: 'default',\n validator: (layout) => {\n return TOAST_LAYOUTS.includes(layout);\n },\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n\n selectedLayout () {\n return this.layout === 'alternate' ? ToastLayoutAlternate : ToastLayoutDefault;\n },\n },\n\n watch: {\n show: {\n handler: function (show) {\n this.isShown = show;\n if (show) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n destroyed () {\n if (this.shouldSetTimeout) {\n clearTimeout(this.displayTimer);\n }\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:show', false);\n }, this.duration);\n }\n },\n\n handleClose () {\n this.isShown = false;\n this.$emit('update:show', false);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","SrOnlyCloseButtonMixin","utils","role","TOAST_ROLES","kind","NOTICE_KINDS","kindToIcon","DtIconInfo","DtIconAlertTriangle","DtIconBell","DtIconSparkle","TOAST_ALTERNATE_KINDS","s","ICON_SIZE_MODIFIERS","DtToastLayoutAlternateIcon","ToastLayoutDefault","ToastLayoutAlternate","duration","TOAST_MIN_DURATION","layout","TOAST_LAYOUTS","show"],"mappings":";;;;;;;;;;AAyDA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,cAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,OAAA;AAAA,IACA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAC,EAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAA,EAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAA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,YAAA,KAAA;AAAA,IACA;AAAA,IAEA,iBAAA;AACA,aAAA,KAAA,WAAA,cAAAF,IAAAD;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,MACA,SAAA,SAAAM,GAAA;AACA,aAAA,UAAAA,GACAA,IACA,KAAA,WAAA,IAEA,aAAA,KAAA,YAAA;AAAA,MAEA;AAAA,MAEA,WAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,YAAA;AACA,IAAA,KAAA,oBACA,aAAA,KAAA,YAAA;AAAA,EAEA;AAAA,EAEA,SAAA;AAAA,IACA,aAAA;AACA,MAAA,KAAA,qBACA,KAAA,eAAA,WAAA,MAAA;AACA,aAAA,UAAA,IACA,KAAA,MAAA,eAAA,EAAA;AAAA,MACA,GAAA,KAAA,QAAA;AAAA,IAEA;AAAA,IAEA,cAAA;AACA,WAAA,UAAA,IACA,KAAA,MAAA,eAAA,EAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"toast.js","sources":["../../../components/toast/layouts/toast_layout_default.vue","../../../components/toast/layouts/toast_layout_alternate_icon.vue","../../../components/toast/layouts/toast_layout_alternate.vue","../../../components/toast/toast.vue"],"sourcesContent":["<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast',\n kindClass,\n { 'd-toast--important': important },\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast__dialog\">\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-on=\"$listeners\"\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 v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\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 v-on=\"$listeners\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport { TOAST_ROLES } from '../toast_constants.js';\nexport default {\n name: 'ToastLayoutDefault',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\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 () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the toast\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 computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast--error',\n info: 'd-toast--info',\n success: 'd-toast--success',\n warning: 'd-toast--warning',\n base: 'd-toast--base',\n };\n\n return kindClasses[this.kind];\n },\n },\n};\n</script>\n","<template>\n <div\n aria-hidden=\"true\"\n class=\"d-toast-layout-alternate__icon\"\n >\n <slot>\n <component\n :is=\"defaultIcon\"\n v-if=\"defaultIcon\"\n :size=\"size\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n} from '@dialpad/dialtone-icons/vue2';\nimport { TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nimport { ICON_SIZE_MODIFIERS } from '@/components/icon/icon_constants.js';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['success', DtIconInfo],\n ['warning', DtIconAlertTriangle],\n ['error', DtIconInfo],\n ['base', DtIconBell],\n ['gradient', DtIconSparkle],\n]);\n\nexport default {\n name: 'DtToastLayoutAlternateIcon',\n components: {\n DtIconInfo,\n DtIconAlertTriangle,\n DtIconBell,\n DtIconSparkle,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validator (kind) {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n size: {\n type: String,\n default: '400',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n","<!-- eslint-disable vue/no-bare-strings-in-template -->\n<!-- stub for the new alternate toast layout -->\n<template>\n <div\n v-if=\"isShown\"\n :class=\"[\n 'd-toast-alternate',\n kindClass,\n ]\"\n data-qa=\"dt-toast\"\n :aria-hidden=\"(!isShown).toString()\"\n >\n <div class=\"d-toast-alternate__dialog\">\n <div class=\"d-toast-alternate__header\">\n <dt-toast-layout-alternate-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n size=\"200\"\n v-on=\"$listeners\"\n >\n <slot name=\"icon\" />\n </dt-toast-layout-alternate-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <slot name=\"titleOverride\" />\n </template>\n </dt-notice-content>\n\n <!-- Close Button -->\n <dt-notice-action\n :hide-action=\"true\"\n :hide-close=\"hideClose\"\n button-size=\"xs\"\n :close-button-props=\"closeButtonProps\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n v-on=\"$listeners\"\n />\n </div>\n <!-- Content Section -->\n <div class=\"d-toast-alternate__content\">\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n </div>\n</template>\n\n<script>\nimport utils from '@/common/utils';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport DtToastLayoutAlternateIcon from './toast_layout_alternate_icon.vue';\nimport { DtNoticeAction, DtNoticeContent } from '@/components/notice';\nimport { TOAST_ROLES, TOAST_ALTERNATE_KINDS } from '../toast_constants.js';\nexport default {\n name: 'ToastLayoutAlternate',\n\n components: {\n DtNoticeAction,\n DtNoticeContent,\n DtToastLayoutAlternateIcon,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n isShown: {\n type: Boolean,\n default: false,\n },\n\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 () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n validator: (role) => {\n return TOAST_ROLES.includes(role);\n },\n },\n\n /**\n * Severity level of the toast, sets the icon and background\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: 'base',\n validator: (kind) => {\n return TOAST_ALTERNATE_KINDS.includes(kind);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the toast\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 computed: {\n kindClass () {\n const kindClasses = {\n error: 'd-toast-alternate--error',\n info: 'd-toast-alternate--info',\n success: 'd-toast-alternate--success',\n warning: 'd-toast-alternate--warning',\n gradient: 'd-toast-alternate--gradient',\n };\n\n return kindClasses[this.kind];\n },\n },\n};\n</script>\n","<template>\n <component\n :is=\"selectedLayout\"\n :is-shown=\"isShown\"\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :message=\"message\"\n :role=\"role\"\n :kind=\"kind\"\n :important=\"important\"\n :close-button-props=\"closeButtonProps\"\n :hide-close=\"hideClose\"\n :hide-icon=\"hideIcon\"\n :hide-action=\"hideAction\"\n v-on=\"$listeners\"\n @close=\"handleClose\"\n >\n <!-- @slot Slot for custom icon -->\n <template #icon>\n <slot name=\"icon\" />\n </template>\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need to override\n with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the toast -->\n <slot>\n {{ message }}\n </slot>\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <template #action>\n <slot name=\"action\" />\n </template>\n </component>\n</template>\n\n<script>\nimport { TOAST_MIN_DURATION, TOAST_LAYOUTS } from './toast_constants.js';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport ToastLayoutDefault from './layouts/toast_layout_default.vue';\nimport ToastLayoutAlternate from './layouts/toast_layout_alternate.vue';\n\n/**\n * A toast notice, sometimes called a snackbar, is a time-based message that appears based on users' actions.\n * It contains at-a-glance information about outcomes and can be paired with actions.\n * @see https://dialtone.dialpad.com/components/toast.html\n */\nexport default {\n name: 'DtToast',\n\n components: {\n ToastLayoutDefault,\n ToastLayoutAlternate,\n },\n\n 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 toast. This can be left blank to remove the title from the toast entirely.\n */\n title: {\n type: String,\n default: undefined,\n },\n\n /**\n * Message of the toast. Overridden by default slot.\n */\n message: {\n type: String,\n default: undefined,\n },\n\n /**\n * Provides a role for the toast. 'status' is used by default to communicate a message. 'alert' is used to\n * communicate an important message like an error that does not contain any interactive elements.\n * @values status, alert\n */\n role: {\n type: String,\n default: 'status',\n },\n\n /**\n * Severity level of the toast, could be different depending on which toast layout is used.\n * @values base, error, info, success, warning, gradient\n */\n kind: {\n type: String,\n default: undefined,\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Controls whether the toast is shown. If a valid duration is provided, the toast will disappear\n * after reaching the duration time, so it's convenient to use `.sync` modifier with this prop to update\n * the data in your component.\n * Supports .sync modifier\n * @values true, false\n */\n show: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Props for the toast close button.\n */\n closeButtonProps: {\n type: Object,\n default: undefined,\n },\n\n /**\n * Hides the close button from the toast\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: undefined,\n },\n\n /**\n * The duration in ms the toast will display before disappearing.\n * The toast won't disappear if the duration is not provided.\n * If it's provided, it should be equal to or greater than 6000.\n */\n duration: {\n type: Number,\n default: null,\n validator: (duration) => {\n return duration >= TOAST_MIN_DURATION;\n },\n },\n\n /**\n * The layout / styling you wish to use for the toast.\n * @values default, alternate\n */\n layout: {\n type: String,\n default: 'default',\n validator: (layout) => {\n return TOAST_LAYOUTS.includes(layout);\n },\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n isShown: false,\n minDuration: TOAST_MIN_DURATION,\n };\n },\n\n computed: {\n shouldSetTimeout () {\n return !!this.duration && this.duration >= this.minDuration;\n },\n\n selectedLayout () {\n return this.layout === 'alternate' ? ToastLayoutAlternate : ToastLayoutDefault;\n },\n },\n\n watch: {\n show: {\n handler: function (show) {\n this.isShown = show;\n if (show) {\n this.setTimeout();\n } else {\n clearTimeout(this.displayTimer);\n }\n },\n\n immediate: true,\n },\n },\n\n destroyed () {\n if (this.shouldSetTimeout) {\n clearTimeout(this.displayTimer);\n }\n },\n\n methods: {\n setTimeout () {\n if (this.shouldSetTimeout) {\n this.displayTimer = setTimeout(() => {\n this.isShown = false;\n this.$emit('update:show', false);\n }, this.duration);\n }\n },\n\n handleClose () {\n this.isShown = false;\n this.$emit('update:show', false);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","SrOnlyCloseButtonMixin","utils","role","TOAST_ROLES","kind","NOTICE_KINDS","kindToIcon","DtIconInfo","DtIconAlertTriangle","DtIconBell","DtIconSparkle","TOAST_ALTERNATE_KINDS","s","ICON_SIZE_MODIFIERS","DtToastLayoutAlternateIcon","ToastLayoutDefault","ToastLayoutAlternate","duration","TOAST_MIN_DURATION","layout","TOAST_LAYOUTS","show"],"mappings":";;;;;;;;;;AAyDA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,cAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,OAAA;AAAA,IACA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAC,EAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAA,EAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA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ACA,SAAA;AAAA,MACA,aAAAD;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,mBAAA;AACA,aAAA,CAAA,CAAA,KAAA,YAAA,KAAA,YAAA,KAAA;AAAA,IACA;AAAA,IAEA,iBAAA;AACA,aAAA,KAAA,WAAA,cAAAF,IAAAD;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,MACA,SAAA,SAAAM,GAAA;AACA,aAAA,UAAAA,GACAA,IACA,KAAA,WAAA,IAEA,aAAA,KAAA,YAAA;AAAA,MAEA;AAAA,MAEA,WAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,YAAA;AACA,IAAA,KAAA,oBACA,aAAA,KAAA,YAAA;AAAA,EAEA;AAAA,EAEA,SAAA;AAAA,IACA,aAAA;AACA,MAAA,KAAA,qBACA,KAAA,eAAA,WAAA,MAAA;AACA,aAAA,UAAA,IACA,KAAA,MAAA,eAAA,EAAA;AAAA,MACA,GAAA,KAAA,QAAA;AAAA,IAEA;AAAA,IAEA,cAAA;AACA,WAAA,UAAA,IACA,KAAA,MAAA,eAAA,EAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),i=require("../../common/utils/index.cjs"),a=require("./toggle-constants.cjs"),n=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),r={name:"DtToggle",inheritAttrs:!1,model:{prop:"checked",event:"change"},props:{id:{type:String,default(){return i.default.getUniqueString()}},disabled:{type:Boolean,default:!1},checked:{type:[Boolean,String],default:!1,validator:t=>a.TOGGLE_CHECKED_VALUES.includes(t)},toggleOnClick:{type:Boolean,default:!0},size:{type:String,default:"md",validator:t=>Object.keys(a.TOGGLE_SIZE_MODIFIERS).includes(t)},showIcon:{type:Boolean,default:!0},labelClass:{type:[String,Array,Object],default:""},labelChildProps:{type:Object,default:()=>({})}},emits:["change"],data(){return{internalChecked:this.checked}},computed:{inputListeners(){return{...this.$listeners,click:t=>this.toggleCheckedValue()}},isIndeterminate(){return this.internalChecked==="mixed"},toggleRole(){return this.isIndeterminate?"checkbox":"switch"},toggleClasses(){return["d-toggle",a.TOGGLE_SIZE_MODIFIERS[this.size],{"d-toggle--checked":this.internalChecked===!0,"d-toggle--disabled":this.disabled,"d-toggle--indeterminate":this.isIndeterminate}]}},watch:{checked(t){this.internalChecked=t}},mounted(){this.runValidations()},methods:{toggleCheckedValue(){this.$emit("change",!this.internalChecked),this.toggleOnClick&&(this.internalChecked=!this.internalChecked)},hasSlotLabel(){return!!this.$slots.default},runValidations(){this.validateInputLabels(this.hasSlotLabel(),this.$attrs["aria-label"])},validateInputLabels(t,e){!t&&!e&&s.util.warn("You must provide an aria-label when there is no label passed",this)}}};var d=function(){var e=this,l=e._self._c;return l("div",{staticClass:"d-toggle-wrapper"},[e.$slots.default?l("label",e._b({class:e.labelClass,attrs:{for:e.id,"data-qa":"toggle-label"}},"label",e.labelChildProps,!1),[e._t("default")],2):e._e(),l("button",e._g(e._b({class:e.toggleClasses,attrs:{id:e.id,role:e.toggleRole,type:"button","aria-checked":e.internalChecked.toString(),disabled:e.disabled,"aria-disabled":e.disabled.toString()}},"button",e.$attrs,!1),e.inputListeners),[e.showIcon?l("span",{staticClass:"d-toggle__inner"}):e._e()])])},o=[],c=n.n(r,d,o);const u=c.exports;exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),i=require("../../common/utils/index.cjs"),a=require("./toggle-constants.cjs"),n=require("../../_plugin-vue2_normalizer-yXi3ZRRD.cjs"),r={name:"DtToggle",inheritAttrs:!1,model:{prop:"checked",event:"change"},props:{id:{type:String,default(){return i.default.getUniqueString()}},disabled:{type:Boolean,default:!1},checked:{type:[Boolean,String],default:!1,validator:t=>a.TOGGLE_CHECKED_VALUES.includes(t)},toggleOnClick:{type:Boolean,default:!0},size:{type:String,default:"md",validator:t=>Object.keys(a.TOGGLE_SIZE_MODIFIERS).includes(t)},showIcon:{type:Boolean,default:!0},labelClass:{type:[String,Array,Object],default:""},labelChildProps:{type:Object,default:()=>({})}},emits:["change"],data(){return{internalChecked:this.checked}},computed:{inputListeners(){return{...this.$listeners,click:t=>this.toggleCheckedValue()}},isIndeterminate(){return this.internalChecked==="mixed"},toggleRole(){return this.isIndeterminate?"checkbox":"switch"},toggleClasses(){return["d-toggle",a.TOGGLE_SIZE_MODIFIERS[this.size],{"d-toggle--checked":this.internalChecked===!0,"d-toggle--disabled":this.disabled,"d-toggle--indeterminate":this.isIndeterminate}]}},watch:{checked(t){this.internalChecked=t}},mounted(){this.runValidations()},methods:{toggleCheckedValue(){this.$emit("change",!this.internalChecked),this.toggleOnClick&&(this.internalChecked=!this.internalChecked)},hasSlotLabel(){return!!this.$slots.default},runValidations(){this.validateInputLabels(this.hasSlotLabel(),this.$attrs["aria-label"])},validateInputLabels(t,e){!t&&!e&&s.util.warn("You must provide an aria-label when there is no label passed",this)}}};var d=function(){var e=this,l=e._self._c;return l("div",{staticClass:"d-toggle-wrapper"},[e.$slots.default?l("label",e._b({class:e.labelClass,attrs:{for:e.id,"data-qa":"toggle-label"}},"label",e.labelChildProps,!1),[e._t("default")],2):e._e(),l("button",e._g(e._b({class:e.toggleClasses,attrs:{id:e.id,role:e.toggleRole,type:"button","aria-checked":e.internalChecked.toString(),disabled:e.disabled,"aria-disabled":e.disabled.toString()}},"button",e.$attrs,!1),e.inputListeners),[e.showIcon?l("span",{staticClass:"d-toggle__inner"}):e._e()])])},o=[],c=n.n(r,d,o,!1,null,null);const u=c.exports;exports.default=u;
2
2
  //# sourceMappingURL=toggle.cjs.map
@@ -1,7 +1,7 @@
1
1
  import s from "vue";
2
2
  import i from "../../common/utils/index.js";
3
3
  import { TOGGLE_CHECKED_VALUES as n, TOGGLE_SIZE_MODIFIERS as l } from "./toggle-constants.js";
4
- import { n as r } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
4
+ import { n as r } from "../../_plugin-vue2_normalizer-CeySl7Fu.js";
5
5
  const d = {
6
6
  name: "DtToggle",
7
7
  inheritAttrs: !1,
@@ -150,7 +150,10 @@ var o = function() {
150
150
  }, c = [], h = /* @__PURE__ */ r(
151
151
  d,
152
152
  o,
153
- c
153
+ c,
154
+ !1,
155
+ null,
156
+ null
154
157
  );
155
158
  const f = h.exports;
156
159
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"toggle.js","sources":["../../../components/toggle/toggle.vue"],"sourcesContent":["<template>\n <div class=\"d-toggle-wrapper\">\n <label\n v-if=\"$slots.default\"\n :class=\"labelClass\"\n :for=\"id\"\n v-bind=\"labelChildProps\"\n data-qa=\"toggle-label\"\n >\n <!-- @slot Slot for the main content -->\n <slot />\n </label>\n <button\n :id=\"id\"\n :role=\"toggleRole\"\n type=\"button\"\n :aria-checked=\"internalChecked.toString()\"\n :disabled=\"disabled\"\n :aria-disabled=\"disabled.toString()\"\n :class=\"toggleClasses\"\n v-bind=\"$attrs\"\n v-on=\"inputListeners\"\n >\n <span\n v-if=\"showIcon\"\n class=\"d-toggle__inner\"\n />\n </button>\n </div>\n</template>\n\n<script>\nimport Vue from 'vue';\nimport utils from '@/common/utils';\nimport { TOGGLE_CHECKED_VALUES, TOGGLE_SIZE_MODIFIERS } from '@/components/toggle/toggle_constants';\n\n/**\n * A toggle (or \"switch\") is a button control element that allows the user to make a binary (on/off) selection.\n * @see https://dialtone.dialpad.com/components/toggle.html\n */\nexport default {\n\n name: 'DtToggle',\n\n inheritAttrs: false,\n\n model: {\n prop: 'checked',\n event: 'change',\n },\n\n props: {\n\n /**\n * The id of the toggle\n */\n id: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Disables the toggle interactions\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Value of the toggle\n * @model checked\n * @values true, false, 'mixed'\n */\n checked: {\n type: [Boolean, String],\n default: false,\n validator: (v) => TOGGLE_CHECKED_VALUES.includes(v),\n },\n\n /**\n * Whether the component toggles on click. If you set this to false it means you will handle the toggling manually\n * via the checked prop or v-model. Change events will still be triggered.\n * @values true, false\n */\n toggleOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The size of the toggle.\n * @values sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(TOGGLE_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Shows the icon\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n emits: [\n /**\n * Toggle change event\n *\n * @event change\n * @type {Boolean}\n * @model change\n */\n 'change',\n ],\n\n data () {\n return {\n internalChecked: this.checked,\n };\n },\n\n computed: {\n inputListeners () {\n return {\n ...this.$listeners,\n click: _ => this.toggleCheckedValue(),\n };\n },\n\n isIndeterminate () {\n return this.internalChecked === 'mixed';\n },\n\n toggleRole () {\n return this.isIndeterminate ? 'checkbox' : 'switch';\n },\n\n toggleClasses () {\n return [\n 'd-toggle',\n TOGGLE_SIZE_MODIFIERS[this.size],\n {\n 'd-toggle--checked': this.internalChecked === true,\n 'd-toggle--disabled': this.disabled,\n 'd-toggle--indeterminate': this.isIndeterminate,\n },\n ];\n },\n },\n\n watch: {\n checked (newChecked) {\n this.internalChecked = newChecked;\n },\n },\n\n mounted () {\n this.runValidations();\n },\n\n methods: {\n toggleCheckedValue () {\n this.$emit('change', !this.internalChecked);\n\n if (this.toggleOnClick) {\n this.internalChecked = !this.internalChecked;\n }\n },\n\n hasSlotLabel () {\n return !!(this.$slots.default);\n },\n\n runValidations () {\n this.validateInputLabels(this.hasSlotLabel(), this.$attrs['aria-label']);\n },\n\n validateInputLabels (hasLabel, ariaLabel) {\n if (!hasLabel && !ariaLabel) {\n Vue.util.warn(\n 'You must provide an aria-label when there is no label passed',\n this,\n );\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","utils","v","TOGGLE_CHECKED_VALUES","s","TOGGLE_SIZE_MODIFIERS","_","newChecked","hasLabel","ariaLabel","Vue"],"mappings":";;;;AAwCA,MAAAA,IAAA;AAAA,EAEA,MAAA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAC,EAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,SAAA;AAAA,MACA,MAAA,CAAA,SAAA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAE,MAAA,OAAA,KAAAC,CAAA,EAAA,SAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,OAAA,CAAA;A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../../../components/toggle/toggle.vue"],"sourcesContent":["<template>\n <div class=\"d-toggle-wrapper\">\n <label\n v-if=\"$slots.default\"\n :class=\"labelClass\"\n :for=\"id\"\n v-bind=\"labelChildProps\"\n data-qa=\"toggle-label\"\n >\n <!-- @slot Slot for the main content -->\n <slot />\n </label>\n <button\n :id=\"id\"\n :role=\"toggleRole\"\n type=\"button\"\n :aria-checked=\"internalChecked.toString()\"\n :disabled=\"disabled\"\n :aria-disabled=\"disabled.toString()\"\n :class=\"toggleClasses\"\n v-bind=\"$attrs\"\n v-on=\"inputListeners\"\n >\n <span\n v-if=\"showIcon\"\n class=\"d-toggle__inner\"\n />\n </button>\n </div>\n</template>\n\n<script>\nimport Vue from 'vue';\nimport utils from '@/common/utils';\nimport { TOGGLE_CHECKED_VALUES, TOGGLE_SIZE_MODIFIERS } from '@/components/toggle/toggle_constants';\n\n/**\n * A toggle (or \"switch\") is a button control element that allows the user to make a binary (on/off) selection.\n * @see https://dialtone.dialpad.com/components/toggle.html\n */\nexport default {\n\n name: 'DtToggle',\n\n inheritAttrs: false,\n\n model: {\n prop: 'checked',\n event: 'change',\n },\n\n props: {\n\n /**\n * The id of the toggle\n */\n id: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Disables the toggle interactions\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Value of the toggle\n * @model checked\n * @values true, false, 'mixed'\n */\n checked: {\n type: [Boolean, String],\n default: false,\n validator: (v) => TOGGLE_CHECKED_VALUES.includes(v),\n },\n\n /**\n * Whether the component toggles on click. If you set this to false it means you will handle the toggling manually\n * via the checked prop or v-model. Change events will still be triggered.\n * @values true, false\n */\n toggleOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The size of the toggle.\n * @values sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(TOGGLE_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Shows the icon\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n emits: [\n /**\n * Toggle change event\n *\n * @event change\n * @type {Boolean}\n * @model change\n */\n 'change',\n ],\n\n data () {\n return {\n internalChecked: this.checked,\n };\n },\n\n computed: {\n inputListeners () {\n return {\n ...this.$listeners,\n click: _ => this.toggleCheckedValue(),\n };\n },\n\n isIndeterminate () {\n return this.internalChecked === 'mixed';\n },\n\n toggleRole () {\n return this.isIndeterminate ? 'checkbox' : 'switch';\n },\n\n toggleClasses () {\n return [\n 'd-toggle',\n TOGGLE_SIZE_MODIFIERS[this.size],\n {\n 'd-toggle--checked': this.internalChecked === true,\n 'd-toggle--disabled': this.disabled,\n 'd-toggle--indeterminate': this.isIndeterminate,\n },\n ];\n },\n },\n\n watch: {\n checked (newChecked) {\n this.internalChecked = newChecked;\n },\n },\n\n mounted () {\n this.runValidations();\n },\n\n methods: {\n toggleCheckedValue () {\n this.$emit('change', !this.internalChecked);\n\n if (this.toggleOnClick) {\n this.internalChecked = !this.internalChecked;\n }\n },\n\n hasSlotLabel () {\n return !!(this.$slots.default);\n },\n\n runValidations () {\n this.validateInputLabels(this.hasSlotLabel(), this.$attrs['aria-label']);\n },\n\n validateInputLabels (hasLabel, ariaLabel) {\n if (!hasLabel && !ariaLabel) {\n Vue.util.warn(\n 'You must provide an aria-label when there is no label passed',\n this,\n );\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","utils","v","TOGGLE_CHECKED_VALUES","s","TOGGLE_SIZE_MODIFIERS","_","newChecked","hasLabel","ariaLabel","Vue"],"mappings":";;;;AAwCA,MAAAA,IAAA;AAAA,EAEA,MAAA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;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A;AAAA,IACA;AAAA,IAEA,aAAA;AACA,aAAA,KAAA,kBAAA,aAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,aAAA;AAAA,QACA;AAAA,QACAD,EAAA,KAAA,IAAA;AAAA,QACA;AAAA,UACA,qBAAA,KAAA,oBAAA;AAAA,UACA,sBAAA,KAAA;AAAA,UACA,2BAAA,KAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,QAAAE,GAAA;AACA,WAAA,kBAAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,SAAA,eAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,qBAAA;AACA,WAAA,MAAA,UAAA,CAAA,KAAA,eAAA,GAEA,KAAA,kBACA,KAAA,kBAAA,CAAA,KAAA;AAAA,IAEA;AAAA,IAEA,eAAA;AACA,aAAA,CAAA,CAAA,KAAA,OAAA;AAAA,IACA;AAAA,IAEA,iBAAA;AACA,WAAA,oBAAA,KAAA,aAAA,GAAA,KAAA,OAAA,YAAA,CAAA;AAAA,IACA;AAAA,IAEA,oBAAAC,GAAAC,GAAA;AACA,MAAA,CAAAD,KAAA,CAAAC,KACAC,EAAA,KAAA;AAAA,QACA;AAAA,QACA;AAAA,MACA;AAAA,IAEA;AAAA,EACA;AACA;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./tooltip-constants.cjs"),a=require("../popover/popover-constants.cjs"),s=require("../../common/utils/index.cjs"),i=require("../popover/tippy-utils.cjs"),h=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),l={name:"DtTooltip",props:{id:{type:String,default(){return s.getUniqueString()}},fallbackPlacements:{type:Array,default:()=>["auto"]},inverted:{type:Boolean,default:!1},offset:{type:Array,default:()=>[0,12]},placement:{type:String,default:"top",validator(e){return o.TOOLTIP_DIRECTIONS.includes(e)}},sticky:{type:[Boolean,String],default:!0,validator:e=>o.TOOLTIP_STICKY_VALUES.includes(e)},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>a.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},contentClass:{type:[String,Object,Array],default:""},message:{type:String,default:""},enabled:{type:Boolean,default:!0},show:{type:Boolean,default:null},transition:{type:Boolean,default:!0},delay:{type:Boolean,default:!0},theme:{type:String,default:null},externalAnchor:{type:String,default:null}},emits:["shown","update:show"],data(){return{TOOLTIP_KIND_MODIFIERS:o.TOOLTIP_KIND_MODIFIERS,tip:null,inTimer:null,internalShow:!1,currentPlacement:this.placement}},computed:{tippyProps(){return{offset:this.offset,delay:this.delay?o.TOOLTIP_DELAY_MS:!1,placement:this.placement,sticky:this.sticky,theme:this.inverted?"inverted":this.theme,animation:this.transition?"fade":!1,onShown:e=>this.onShow(e,"onShown"),onShow:e=>this.onShow(e,"onShow"),onHidden:this.onHide,popperOptions:i.getPopperOptions({fallbackPlacements:this.fallbackPlacements,hasHideModifierEnabled:!0,onChangePlacement:this.onChangePlacement})}},anchor(){return this.externalAnchor?document.body.querySelector(this.externalAnchor):i.getAnchor(this.$refs.anchor)}},watch:{tippyProps:{handler:"setProps",deep:!0},show:{handler:function(e){e!==null&&this.enabled&&(this.internalShow=e)},immediate:!0},internalShow(e){e?(this.setProps(),this.tip.show()):this.tip.hide()},sticky(e){this.tip.setProps({sticky:e})}},async mounted(){!this.enabled&&this.show!=null&&(console.warn("Tooltip: You cannot use both the enabled and show props at the same time."),console.warn("The show prop will be ignored.")),this.tip=i.createTippy(this.anchor,this.initOptions()),this.externalAnchor&&(await s.flushPromises(),this.addExternalAnchorEventListeners())},beforeDestroy(){var e,t;this.externalAnchor&&this.removeExternalAnchorEventListeners(),(e=this.anchor)!=null&&e._tippy&&((t=this.tip)==null||t.destroy())},methods:{calculateAnchorZindex(){return this.$el.getRootNode().querySelector('.d-modal[aria-hidden="false"], .d-modal--transparent[aria-hidden="false"]')||this.$el.closest(".d-zi-drawer")?651:400},hasVisibleFocus(){return this.anchor.matches(":focus-visible")},onEnterAnchor(e){this.enabled&&(this.delay&&this.inTimer===null?this.inTimer=setTimeout(()=>{this.triggerShow(e)},o.TOOLTIP_DELAY_MS):this.triggerShow(e))},triggerShow(e){e.type==="focusin"?this.show===null&&this.hasVisibleFocus()&&(this.internalShow=!0):this.show===null&&(this.internalShow=!0)},onLeaveAnchor(e){e.type==="keydown"&&e.code!=="Escape"||(clearTimeout(this.inTimer),this.inTimer=null,this.triggerHide())},triggerHide(){this.show===null&&(this.internalShow=!1)},onChangePlacement(e){this.currentPlacement=e},onHide(){var e;(e=this.tip)==null||e.unmount(),this.$emit("shown",!1),this.show!==null&&this.$emit("update:show",!1)},onShow(e,t){if(!this.tooltipHasContent(e))return!1;this.transition&&t==="onShow"||(this.$emit("shown",!0),this.show!==null&&this.$emit("update:show",!0))},setProps(){var e,t;this.tip&&this.tip.setProps&&this.tip.setProps({...this.tippyProps,appendTo:this.appendTo==="body"?(t=(e=this.anchor)==null?void 0:e.getRootNode())==null?void 0:t.querySelector("body"):this.appendTo,zIndex:this.calculateAnchorZindex()})},onMount(){this.setProps()},tooltipHasContent(e){return e.props.content.textContent.trim().length!==0},initOptions(){return{content:this.$refs.content,arrow:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="7"><path d="M 14.5,7 8,0 1.5,7 Z"/></svg>',duration:180,interactive:!1,trigger:"manual",hideOnClick:!1,touch:!1,onMount:this.onMount,showOnCreate:this.internalShow,popperOptions:i.getPopperOptions({hasHideModifierEnabled:!0})}},addExternalAnchorEventListeners(){["focusin","mouseenter"].forEach(e=>{var t;(t=this.anchor)==null||t.addEventListener(e,n=>this.onEnterAnchor(n))}),["focusout","mouseleave","keydown"].forEach(e=>{var t;(t=this.anchor)==null||t.addEventListener(e,n=>this.onLeaveAnchor(n))})},removeExternalAnchorEventListeners(){["focusin","mouseenter"].forEach(e=>{var t;(t=this.anchor)==null||t.removeEventListener(e,n=>this.onEnterAnchor(n))}),["focusout","mouseleave","keydown"].forEach(e=>{var t;(t=this.anchor)==null||t.removeEventListener(e,n=>this.onLeaveAnchor(n))})}}};var u=function(){var t=this,n=t._self._c;return n("div",{attrs:{"data-qa":"dt-tooltip-container"}},[t.externalAnchor?t._e():n("span",{ref:"anchor",attrs:{"data-qa":"dt-tooltip-anchor"},on:{focusin:t.onEnterAnchor,focusout:t.onLeaveAnchor,mouseenter:t.onEnterAnchor,mouseleave:t.onLeaveAnchor,keydown:function(r){return!r.type.indexOf("key")&&t._k(r.keyCode,"esc",27,r.key,["Esc","Escape"])?null:t.onLeaveAnchor.apply(null,arguments)}}},[t._t("anchor")],2),n("div",t._g({ref:"content",class:["d-tooltip",{[t.TOOLTIP_KIND_MODIFIERS.inverted]:t.inverted},t.contentClass],attrs:{id:t.id,"data-qa":"dt-tooltip"}},t.$listeners),[t._t("default",function(){return[t._v(" "+t._s(t.message)+" ")]})],2)])},c=[],d=h.n(l,u,c);const p=d.exports;exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./tooltip-constants.cjs"),a=require("../popover/popover-constants.cjs"),s=require("../../common/utils/index.cjs"),i=require("../popover/tippy-utils.cjs"),l=require("../../_plugin-vue2_normalizer-yXi3ZRRD.cjs"),h={name:"DtTooltip",props:{id:{type:String,default(){return s.getUniqueString()}},fallbackPlacements:{type:Array,default:()=>["auto"]},inverted:{type:Boolean,default:!1},offset:{type:Array,default:()=>[0,12]},placement:{type:String,default:"top",validator(e){return o.TOOLTIP_DIRECTIONS.includes(e)}},sticky:{type:[Boolean,String],default:!0,validator:e=>o.TOOLTIP_STICKY_VALUES.includes(e)},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>a.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},contentClass:{type:[String,Object,Array],default:""},message:{type:String,default:""},enabled:{type:Boolean,default:!0},show:{type:Boolean,default:null},transition:{type:Boolean,default:!0},delay:{type:Boolean,default:!0},theme:{type:String,default:null},externalAnchor:{type:String,default:null}},emits:["shown","update:show"],data(){return{TOOLTIP_KIND_MODIFIERS:o.TOOLTIP_KIND_MODIFIERS,tip:null,inTimer:null,internalShow:!1,currentPlacement:this.placement}},computed:{tippyProps(){return{offset:this.offset,delay:this.delay?o.TOOLTIP_DELAY_MS:!1,placement:this.placement,sticky:this.sticky,theme:this.inverted?"inverted":this.theme,animation:this.transition?"fade":!1,onShown:e=>this.onShow(e,"onShown"),onShow:e=>this.onShow(e,"onShow"),onHidden:this.onHide,popperOptions:i.getPopperOptions({fallbackPlacements:this.fallbackPlacements,hasHideModifierEnabled:!0,onChangePlacement:this.onChangePlacement})}},anchor(){return this.externalAnchor?document.body.querySelector(this.externalAnchor):i.getAnchor(this.$refs.anchor)}},watch:{tippyProps:{handler:"setProps",deep:!0},show:{handler:function(e){e!==null&&this.enabled&&(this.internalShow=e)},immediate:!0},internalShow(e){e?(this.setProps(),this.tip.show()):this.tip.hide()},sticky(e){this.tip.setProps({sticky:e})}},async mounted(){!this.enabled&&this.show!=null&&(console.warn("Tooltip: You cannot use both the enabled and show props at the same time."),console.warn("The show prop will be ignored.")),this.tip=i.createTippy(this.anchor,this.initOptions()),this.externalAnchor&&(await s.flushPromises(),this.addExternalAnchorEventListeners())},beforeDestroy(){var e,t;this.externalAnchor&&this.removeExternalAnchorEventListeners(),(e=this.anchor)!=null&&e._tippy&&((t=this.tip)==null||t.destroy())},methods:{calculateAnchorZindex(){return this.$el.getRootNode().querySelector('.d-modal[aria-hidden="false"], .d-modal--transparent[aria-hidden="false"]')||this.$el.closest(".d-zi-drawer")?651:400},hasVisibleFocus(){return this.anchor.matches(":focus-visible")},onEnterAnchor(e){this.enabled&&(this.delay&&this.inTimer===null?this.inTimer=setTimeout(()=>{this.triggerShow(e)},o.TOOLTIP_DELAY_MS):this.triggerShow(e))},triggerShow(e){e.type==="focusin"?this.show===null&&this.hasVisibleFocus()&&(this.internalShow=!0):this.show===null&&(this.internalShow=!0)},onLeaveAnchor(e){e.type==="keydown"&&e.code!=="Escape"||(clearTimeout(this.inTimer),this.inTimer=null,this.triggerHide())},triggerHide(){this.show===null&&(this.internalShow=!1)},onChangePlacement(e){this.currentPlacement=e},onHide(){var e;(e=this.tip)==null||e.unmount(),this.$emit("shown",!1),this.show!==null&&this.$emit("update:show",!1)},onShow(e,t){if(!this.tooltipHasContent(e))return!1;this.transition&&t==="onShow"||(this.$emit("shown",!0),this.show!==null&&this.$emit("update:show",!0))},setProps(){var e,t;this.tip&&this.tip.setProps&&this.tip.setProps({...this.tippyProps,appendTo:this.appendTo==="body"?(t=(e=this.anchor)==null?void 0:e.getRootNode())==null?void 0:t.querySelector("body"):this.appendTo,zIndex:this.calculateAnchorZindex()})},onMount(){this.setProps()},tooltipHasContent(e){return e.props.content.textContent.trim().length!==0},initOptions(){return{content:this.$refs.content,arrow:'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="7"><path d="M 14.5,7 8,0 1.5,7 Z"/></svg>',duration:180,interactive:!1,trigger:"manual",hideOnClick:!1,touch:!1,onMount:this.onMount,showOnCreate:this.internalShow,popperOptions:i.getPopperOptions({hasHideModifierEnabled:!0})}},addExternalAnchorEventListeners(){["focusin","mouseenter"].forEach(e=>{var t;(t=this.anchor)==null||t.addEventListener(e,n=>this.onEnterAnchor(n))}),["focusout","mouseleave","keydown"].forEach(e=>{var t;(t=this.anchor)==null||t.addEventListener(e,n=>this.onLeaveAnchor(n))})},removeExternalAnchorEventListeners(){["focusin","mouseenter"].forEach(e=>{var t;(t=this.anchor)==null||t.removeEventListener(e,n=>this.onEnterAnchor(n))}),["focusout","mouseleave","keydown"].forEach(e=>{var t;(t=this.anchor)==null||t.removeEventListener(e,n=>this.onLeaveAnchor(n))})}}};var u=function(){var t=this,n=t._self._c;return n("div",{attrs:{"data-qa":"dt-tooltip-container"}},[t.externalAnchor?t._e():n("span",{ref:"anchor",attrs:{"data-qa":"dt-tooltip-anchor"},on:{focusin:t.onEnterAnchor,focusout:t.onLeaveAnchor,mouseenter:t.onEnterAnchor,mouseleave:t.onLeaveAnchor,keydown:function(r){return!r.type.indexOf("key")&&t._k(r.keyCode,"esc",27,r.key,["Esc","Escape"])?null:t.onLeaveAnchor.apply(null,arguments)}}},[t._t("anchor")],2),n("div",t._g({ref:"content",class:["d-tooltip",{[t.TOOLTIP_KIND_MODIFIERS.inverted]:t.inverted},t.contentClass],attrs:{id:t.id,"data-qa":"dt-tooltip"}},t.$listeners),[t._t("default",function(){return[t._v(" "+t._s(t.message)+" ")]})],2)])},c=[],d=l.n(h,u,c,!1,null,null);const p=d.exports;exports.default=p;
2
2
  //# sourceMappingURL=tooltip.cjs.map
@@ -1,8 +1,8 @@
1
1
  import { TOOLTIP_DIRECTIONS as s, TOOLTIP_STICKY_VALUES as a, TOOLTIP_KIND_MODIFIERS as h, TOOLTIP_DELAY_MS as i } from "./tooltip-constants.js";
2
2
  import { POPOVER_APPEND_TO_VALUES as l } from "../popover/popover-constants.js";
3
- import { getUniqueString as c, flushPromises as d } from "../../common/utils/index.js";
4
- import { getPopperOptions as r, getAnchor as u, createTippy as p } from "../popover/tippy-utils.js";
5
- import { n as f } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
3
+ import { getUniqueString as c, flushPromises as u } from "../../common/utils/index.js";
4
+ import { getPopperOptions as r, getAnchor as d, createTippy as p } from "../popover/tippy-utils.js";
5
+ import { n as f } from "../../_plugin-vue2_normalizer-CeySl7Fu.js";
6
6
  const m = {
7
7
  name: "DtTooltip",
8
8
  props: {
@@ -226,7 +226,7 @@ const m = {
226
226
  };
227
227
  },
228
228
  anchor() {
229
- return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : u(this.$refs.anchor);
229
+ return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : d(this.$refs.anchor);
230
230
  }
231
231
  },
232
232
  watch: {
@@ -250,7 +250,7 @@ const m = {
250
250
  }
251
251
  },
252
252
  async mounted() {
253
- !this.enabled && this.show != null && (console.warn("Tooltip: You cannot use both the enabled and show props at the same time."), console.warn("The show prop will be ignored.")), this.tip = p(this.anchor, this.initOptions()), this.externalAnchor && (await d(), this.addExternalAnchorEventListeners());
253
+ !this.enabled && this.show != null && (console.warn("Tooltip: You cannot use both the enabled and show props at the same time."), console.warn("The show prop will be ignored.")), this.tip = p(this.anchor, this.initOptions()), this.externalAnchor && (await u(), this.addExternalAnchorEventListeners());
254
254
  },
255
255
  beforeDestroy() {
256
256
  var e, t;
@@ -362,7 +362,10 @@ var y = function() {
362
362
  }, w = [], g = /* @__PURE__ */ f(
363
363
  m,
364
364
  y,
365
- w
365
+ w,
366
+ !1,
367
+ null,
368
+ null
366
369
  );
367
370
  const T = g.exports;
368
371
  export {