@dialpad/dialtone 9.27.1 → 9.29.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 (604) hide show
  1. package/README.md +19 -3
  2. package/dist/css/dialtone.css +2 -2
  3. package/dist/tokens/css/variables-cox-dark.css +936 -0
  4. package/dist/tokens/css/variables-cox-light.css +816 -0
  5. package/dist/tokens/css/variables-dark.css +936 -0
  6. package/dist/tokens/css/variables-light.css +816 -0
  7. package/dist/tokens/css/variables-tmo-dark.css +936 -0
  8. package/dist/tokens/css/variables-tmo-light.css +816 -0
  9. package/dist/tokens/doc.json +86736 -0
  10. package/dist/tokens/less/variables-cox-dark.less +933 -0
  11. package/dist/tokens/less/variables-cox-light.less +813 -0
  12. package/dist/tokens/less/variables-dark.less +933 -0
  13. package/dist/tokens/less/variables-light.less +813 -0
  14. package/dist/tokens/less/variables-tmo-dark.less +933 -0
  15. package/dist/tokens/less/variables-tmo-light.less +813 -0
  16. package/dist/tokens/tokens-dark.json +928 -0
  17. package/dist/tokens/tokens-light.json +808 -0
  18. package/dist/vue2/chunks/_plugin-vue2_normalizer-ZK80B3OL.js +2 -0
  19. package/dist/vue2/chunks/_plugin-vue2_normalizer-ZK80B3OL.js.map +1 -0
  20. package/dist/vue2/chunks/dropdown-zhMEz3bn.js +2 -0
  21. package/dist/vue2/chunks/dropdown-zhMEz3bn.js.map +1 -0
  22. package/dist/vue2/chunks/dropdown_constants-KHFvVI2L.js +2 -0
  23. package/dist/vue2/chunks/dropdown_constants-KHFvVI2L.js.map +1 -0
  24. package/dist/vue2/chunks/icon_constants-2S_OSQ1t.js +2 -0
  25. package/dist/vue2/chunks/icon_constants-2S_OSQ1t.js.map +1 -0
  26. package/dist/vue2/chunks/index-2jPosQBn.js +3 -0
  27. package/dist/vue2/chunks/index-2jPosQBn.js.map +1 -0
  28. package/dist/vue2/chunks/{index-o4OMWMuv.js → index-YkSDT8-g.js} +2 -2
  29. package/dist/vue2/chunks/{index-o4OMWMuv.js.map → index-YkSDT8-g.js.map} +1 -1
  30. package/dist/vue2/chunks/index-sdfB7Aok.js +2 -0
  31. package/dist/vue2/chunks/index-sdfB7Aok.js.map +1 -0
  32. package/dist/vue2/chunks/input-o-fc1X4b.js +2 -0
  33. package/dist/vue2/chunks/input-o-fc1X4b.js.map +1 -0
  34. package/dist/vue2/chunks/input_group-j2gTtc1C.js +2 -0
  35. package/dist/vue2/chunks/input_group-j2gTtc1C.js.map +1 -0
  36. package/dist/vue2/chunks/keyboard_list_navigation-N74Bpdq7.js +2 -0
  37. package/dist/vue2/chunks/keyboard_list_navigation-N74Bpdq7.js.map +1 -0
  38. package/dist/vue2/chunks/link_constants-Kn6kP4i1.js +2 -0
  39. package/dist/vue2/chunks/link_constants-Kn6kP4i1.js.map +1 -0
  40. package/dist/vue2/chunks/list_item_constants-Tsz5CO1m.js +2 -0
  41. package/dist/vue2/chunks/list_item_constants-Tsz5CO1m.js.map +1 -0
  42. package/dist/vue2/chunks/modal-qEzlo0Sj.js +2 -0
  43. package/dist/vue2/chunks/modal-qEzlo0Sj.js.map +1 -0
  44. package/dist/vue2/chunks/notice_action-u3ZKIhit.js +2 -0
  45. package/dist/vue2/chunks/notice_action-u3ZKIhit.js.map +1 -0
  46. package/dist/vue2/chunks/notice_constants-mC6al2Dm.js +2 -0
  47. package/dist/vue2/chunks/notice_constants-mC6al2Dm.js.map +1 -0
  48. package/dist/vue2/chunks/popover_constants-hOEhklvr.js +2 -0
  49. package/dist/vue2/chunks/popover_constants-hOEhklvr.js.map +1 -0
  50. package/dist/vue2/chunks/sr_only_close_button-ErijKGYR.js +3 -0
  51. package/dist/vue2/chunks/sr_only_close_button-ErijKGYR.js.map +1 -0
  52. package/dist/vue2/chunks/stack_constants-m9Ickqw0.js +2 -0
  53. package/dist/vue2/chunks/stack_constants-m9Ickqw0.js.map +1 -0
  54. package/dist/vue2/chunks/tab-7hJQSLFx.js +2 -0
  55. package/dist/vue2/chunks/tab-7hJQSLFx.js.map +1 -0
  56. package/dist/vue2/component-documentation.json +1 -1
  57. package/dist/vue2/dialtone-vue.cjs +2 -0
  58. package/dist/vue2/dialtone-vue.cjs.map +1 -0
  59. package/dist/vue2/dialtone-vue.js +1 -1
  60. package/dist/vue2/lib/attachment-carousel.cjs +2 -0
  61. package/dist/vue2/lib/attachment-carousel.cjs.map +1 -0
  62. package/dist/vue2/lib/attachment-carousel.js +2 -3
  63. package/dist/vue2/lib/attachment-carousel.js.map +1 -1
  64. package/dist/vue2/lib/avatar.cjs +2 -0
  65. package/dist/vue2/lib/avatar.cjs.map +1 -0
  66. package/dist/vue2/lib/avatar.js +2 -3
  67. package/dist/vue2/lib/avatar.js.map +1 -1
  68. package/dist/vue2/lib/badge.cjs +2 -0
  69. package/dist/vue2/lib/badge.cjs.map +1 -0
  70. package/dist/vue2/lib/badge.js +2 -3
  71. package/dist/vue2/lib/badge.js.map +1 -1
  72. package/dist/vue2/lib/banner.cjs +3 -0
  73. package/dist/vue2/lib/banner.cjs.map +1 -0
  74. package/dist/vue2/lib/banner.js +2 -3
  75. package/dist/vue2/lib/banner.js.map +1 -1
  76. package/dist/vue2/lib/breadcrumbs.cjs +2 -0
  77. package/dist/vue2/lib/breadcrumbs.cjs.map +1 -0
  78. package/dist/vue2/lib/button-group.cjs +2 -0
  79. package/dist/vue2/lib/button-group.cjs.map +1 -0
  80. package/dist/vue2/lib/button.cjs +2 -0
  81. package/dist/vue2/lib/button.cjs.map +1 -0
  82. package/dist/vue2/lib/callbar-button-with-popover.cjs +2 -0
  83. package/dist/vue2/lib/callbar-button-with-popover.cjs.map +1 -0
  84. package/dist/vue2/lib/callbar-button-with-popover.js +2 -3
  85. package/dist/vue2/lib/callbar-button-with-popover.js.map +1 -1
  86. package/dist/vue2/lib/callbar-button.cjs +2 -0
  87. package/dist/vue2/lib/callbar-button.cjs.map +1 -0
  88. package/dist/vue2/lib/callbox.cjs +2 -0
  89. package/dist/vue2/lib/callbox.cjs.map +1 -0
  90. package/dist/vue2/lib/callbox.js +2 -3
  91. package/dist/vue2/lib/callbox.js.map +1 -1
  92. package/dist/vue2/lib/card.cjs +2 -0
  93. package/dist/vue2/lib/card.cjs.map +1 -0
  94. package/dist/vue2/lib/checkbox-group.cjs +2 -0
  95. package/dist/vue2/lib/checkbox-group.cjs.map +1 -0
  96. package/dist/vue2/lib/checkbox.cjs +2 -0
  97. package/dist/vue2/lib/checkbox.cjs.map +1 -0
  98. package/dist/vue2/lib/chip.cjs +2 -0
  99. package/dist/vue2/lib/chip.cjs.map +1 -0
  100. package/dist/vue2/lib/chip.js +2 -3
  101. package/dist/vue2/lib/chip.js.map +1 -1
  102. package/dist/vue2/lib/codeblock.cjs +3 -0
  103. package/dist/vue2/lib/codeblock.cjs.map +1 -0
  104. package/dist/vue2/lib/collapsible.cjs +2 -0
  105. package/dist/vue2/lib/collapsible.cjs.map +1 -0
  106. package/dist/vue2/lib/collapsible.js +2 -3
  107. package/dist/vue2/lib/collapsible.js.map +1 -1
  108. package/dist/vue2/lib/combobox-multi-select.cjs +2 -0
  109. package/dist/vue2/lib/combobox-multi-select.cjs.map +1 -0
  110. package/dist/vue2/lib/combobox-with-popover.cjs +2 -0
  111. package/dist/vue2/lib/combobox-with-popover.cjs.map +1 -0
  112. package/dist/vue2/lib/combobox-with-popover.js +1 -1
  113. package/dist/vue2/lib/combobox.cjs +2 -0
  114. package/dist/vue2/lib/combobox.cjs.map +1 -0
  115. package/dist/vue2/lib/constants.cjs +2 -0
  116. package/dist/vue2/lib/constants.cjs.map +1 -0
  117. package/dist/vue2/lib/contact-info.cjs +2 -0
  118. package/dist/vue2/lib/contact-info.cjs.map +1 -0
  119. package/dist/vue2/lib/contact-info.js +2 -3
  120. package/dist/vue2/lib/contact-info.js.map +1 -1
  121. package/dist/vue2/lib/contact-row.cjs +2 -0
  122. package/dist/vue2/lib/contact-row.cjs.map +1 -0
  123. package/dist/vue2/lib/contact-row.js +1 -1
  124. package/dist/vue2/lib/datepicker.cjs +2 -0
  125. package/dist/vue2/lib/datepicker.cjs.map +1 -0
  126. package/dist/vue2/lib/datepicker.js +12 -13
  127. package/dist/vue2/lib/datepicker.js.map +1 -1
  128. package/dist/vue2/lib/dates.cjs +2 -0
  129. package/dist/vue2/lib/dates.cjs.map +1 -0
  130. package/dist/vue2/lib/description-list.cjs +2 -0
  131. package/dist/vue2/lib/description-list.cjs.map +1 -0
  132. package/dist/vue2/lib/dropdown.cjs +2 -0
  133. package/dist/vue2/lib/dropdown.cjs.map +1 -0
  134. package/dist/vue2/lib/dropdown.js +6 -7
  135. package/dist/vue2/lib/dropdown.js.map +1 -1
  136. package/dist/vue2/lib/editor.cjs +2 -0
  137. package/dist/vue2/lib/editor.cjs.map +1 -0
  138. package/dist/vue2/lib/editor.js +1 -1
  139. package/dist/vue2/lib/emoji-picker.cjs +2 -0
  140. package/dist/vue2/lib/emoji-picker.cjs.map +1 -0
  141. package/dist/vue2/lib/emoji-picker.js +2 -3
  142. package/dist/vue2/lib/emoji-picker.js.map +1 -1
  143. package/dist/vue2/lib/emoji-row.cjs +2 -0
  144. package/dist/vue2/lib/emoji-row.cjs.map +1 -0
  145. package/dist/vue2/lib/emoji-row.js +1 -1
  146. package/dist/vue2/lib/emoji-text-wrapper.cjs +2 -0
  147. package/dist/vue2/lib/emoji-text-wrapper.cjs.map +1 -0
  148. package/dist/vue2/lib/emoji-text-wrapper.js +1 -1
  149. package/dist/vue2/lib/emoji.cjs +2 -0
  150. package/dist/vue2/lib/emoji.cjs.map +1 -0
  151. package/dist/vue2/lib/emoji.js +1 -1
  152. package/dist/vue2/lib/feed-item-row.cjs +2 -0
  153. package/dist/vue2/lib/feed-item-row.cjs.map +1 -0
  154. package/dist/vue2/lib/feed-item-row.js +2 -3
  155. package/dist/vue2/lib/feed-item-row.js.map +1 -1
  156. package/dist/vue2/lib/feed-pill.cjs +2 -0
  157. package/dist/vue2/lib/feed-pill.cjs.map +1 -0
  158. package/dist/vue2/lib/feed-pill.js +2 -3
  159. package/dist/vue2/lib/feed-pill.js.map +1 -1
  160. package/dist/vue2/lib/general-row.cjs +2 -0
  161. package/dist/vue2/lib/general-row.cjs.map +1 -0
  162. package/dist/vue2/lib/general-row.js +1 -1
  163. package/dist/vue2/lib/group-row.cjs +2 -0
  164. package/dist/vue2/lib/group-row.cjs.map +1 -0
  165. package/dist/vue2/lib/group-row.js +2 -2
  166. package/dist/vue2/lib/grouped-chip.cjs +2 -0
  167. package/dist/vue2/lib/grouped-chip.cjs.map +1 -0
  168. package/dist/vue2/lib/grouped-chip.js +6 -7
  169. package/dist/vue2/lib/grouped-chip.js.map +1 -1
  170. package/dist/vue2/lib/hovercard.cjs +2 -0
  171. package/dist/vue2/lib/hovercard.cjs.map +1 -0
  172. package/dist/vue2/lib/hovercard.js +6 -7
  173. package/dist/vue2/lib/hovercard.js.map +1 -1
  174. package/dist/vue2/lib/icon.cjs +2 -0
  175. package/dist/vue2/lib/icon.cjs.map +1 -0
  176. package/dist/vue2/lib/icon.js +14 -38
  177. package/dist/vue2/lib/icon.js.map +1 -1
  178. package/dist/vue2/lib/image-viewer.cjs +2 -0
  179. package/dist/vue2/lib/image-viewer.cjs.map +1 -0
  180. package/dist/vue2/lib/image-viewer.js +11 -12
  181. package/dist/vue2/lib/image-viewer.js.map +1 -1
  182. package/dist/vue2/lib/input-group.cjs +2 -0
  183. package/dist/vue2/lib/input-group.cjs.map +1 -0
  184. package/dist/vue2/lib/input.cjs +2 -0
  185. package/dist/vue2/lib/input.cjs.map +1 -0
  186. package/dist/vue2/lib/item-layout.cjs +2 -0
  187. package/dist/vue2/lib/item-layout.cjs.map +1 -0
  188. package/dist/vue2/lib/ivr-node.cjs +2 -0
  189. package/dist/vue2/lib/ivr-node.cjs.map +1 -0
  190. package/dist/vue2/lib/ivr-node.js +4 -5
  191. package/dist/vue2/lib/ivr-node.js.map +1 -1
  192. package/dist/vue2/lib/keyboard-shortcut.cjs +2 -0
  193. package/dist/vue2/lib/keyboard-shortcut.cjs.map +1 -0
  194. package/dist/vue2/lib/keyboard-shortcut.js +4 -5
  195. package/dist/vue2/lib/keyboard-shortcut.js.map +1 -1
  196. package/dist/vue2/lib/lazy-show.cjs +2 -0
  197. package/dist/vue2/lib/lazy-show.cjs.map +1 -0
  198. package/dist/vue2/lib/link.cjs +2 -0
  199. package/dist/vue2/lib/link.cjs.map +1 -0
  200. package/dist/vue2/lib/list-item-group.cjs +2 -0
  201. package/dist/vue2/lib/list-item-group.cjs.map +1 -0
  202. package/dist/vue2/lib/list-item.cjs +2 -0
  203. package/dist/vue2/lib/list-item.cjs.map +1 -0
  204. package/dist/vue2/lib/list-item.js +2 -3
  205. package/dist/vue2/lib/list-item.js.map +1 -1
  206. package/dist/vue2/lib/message-input.cjs +2 -0
  207. package/dist/vue2/lib/message-input.cjs.map +1 -0
  208. package/dist/vue2/lib/message-input.js +90 -48
  209. package/dist/vue2/lib/message-input.js.map +1 -1
  210. package/dist/vue2/lib/mixins.cjs +2 -0
  211. package/dist/vue2/lib/mixins.cjs.map +1 -0
  212. package/dist/vue2/lib/modal.cjs +3 -0
  213. package/dist/vue2/lib/modal.cjs.map +1 -0
  214. package/dist/vue2/lib/modal.js +10 -11
  215. package/dist/vue2/lib/modal.js.map +1 -1
  216. package/dist/vue2/lib/notice.cjs +2 -0
  217. package/dist/vue2/lib/notice.cjs.map +1 -0
  218. package/dist/vue2/lib/notice.js +2 -3
  219. package/dist/vue2/lib/notice.js.map +1 -1
  220. package/dist/vue2/lib/pagination.cjs +2 -0
  221. package/dist/vue2/lib/pagination.cjs.map +1 -0
  222. package/dist/vue2/lib/pagination.js +2 -3
  223. package/dist/vue2/lib/pagination.js.map +1 -1
  224. package/dist/vue2/lib/popover.cjs +2 -0
  225. package/dist/vue2/lib/popover.cjs.map +1 -0
  226. package/dist/vue2/lib/popover.js +4 -5
  227. package/dist/vue2/lib/popover.js.map +1 -1
  228. package/dist/vue2/lib/presence.cjs +2 -0
  229. package/dist/vue2/lib/presence.cjs.map +1 -0
  230. package/dist/vue2/lib/radio-group.cjs +2 -0
  231. package/dist/vue2/lib/radio-group.cjs.map +1 -0
  232. package/dist/vue2/lib/radio.cjs +2 -0
  233. package/dist/vue2/lib/radio.cjs.map +1 -0
  234. package/dist/vue2/lib/rich-text-editor.cjs +2 -0
  235. package/dist/vue2/lib/rich-text-editor.cjs.map +1 -0
  236. package/dist/vue2/lib/rich-text-editor.js +107 -75
  237. package/dist/vue2/lib/rich-text-editor.js.map +1 -1
  238. package/dist/vue2/lib/root-layout.cjs +2 -0
  239. package/dist/vue2/lib/root-layout.cjs.map +1 -0
  240. package/dist/vue2/lib/select-menu.cjs +2 -0
  241. package/dist/vue2/lib/select-menu.cjs.map +1 -0
  242. package/dist/vue2/lib/settings-menu-button.cjs +2 -0
  243. package/dist/vue2/lib/settings-menu-button.cjs.map +1 -0
  244. package/dist/vue2/lib/settings-menu-button.js +2 -3
  245. package/dist/vue2/lib/settings-menu-button.js.map +1 -1
  246. package/dist/vue2/lib/skeleton.cjs +2 -0
  247. package/dist/vue2/lib/skeleton.cjs.map +1 -0
  248. package/dist/vue2/lib/stack.cjs +2 -0
  249. package/dist/vue2/lib/stack.cjs.map +1 -0
  250. package/dist/vue2/lib/tabs.cjs +2 -0
  251. package/dist/vue2/lib/tabs.cjs.map +1 -0
  252. package/dist/vue2/lib/time-pill.cjs +2 -0
  253. package/dist/vue2/lib/time-pill.cjs.map +1 -0
  254. package/dist/vue2/lib/toast.cjs +2 -0
  255. package/dist/vue2/lib/toast.cjs.map +1 -0
  256. package/dist/vue2/lib/toast.js +2 -3
  257. package/dist/vue2/lib/toast.js.map +1 -1
  258. package/dist/vue2/lib/toggle.cjs +2 -0
  259. package/dist/vue2/lib/toggle.cjs.map +1 -0
  260. package/dist/vue2/lib/tooltip-directive.cjs +2 -0
  261. package/dist/vue2/lib/tooltip-directive.cjs.map +1 -0
  262. package/dist/vue2/lib/tooltip.cjs +2 -0
  263. package/dist/vue2/lib/tooltip.cjs.map +1 -0
  264. package/dist/vue2/lib/top-banner-info.cjs +2 -0
  265. package/dist/vue2/lib/top-banner-info.cjs.map +1 -0
  266. package/dist/vue2/lib/unread-pill.cjs +2 -0
  267. package/dist/vue2/lib/unread-pill.cjs.map +1 -0
  268. package/dist/vue2/lib/unread-pill.js +3 -4
  269. package/dist/vue2/lib/unread-pill.js.map +1 -1
  270. package/dist/vue2/lib/utils.cjs +2 -0
  271. package/dist/vue2/lib/utils.cjs.map +1 -0
  272. package/dist/vue2/lib/validation-messages.cjs +2 -0
  273. package/dist/vue2/lib/validation-messages.cjs.map +1 -0
  274. package/dist/vue2/lib/validators.cjs +2 -0
  275. package/dist/vue2/lib/validators.cjs.map +1 -0
  276. package/dist/vue2/style.css +1 -1
  277. package/dist/vue2/types/common/emoji/index.d.ts +3302 -1014
  278. package/dist/vue2/types/common/emoji/index.d.ts.map +1 -1
  279. package/dist/vue2/types/components/avatar/avatar.vue.d.ts +1 -1
  280. package/dist/vue2/types/components/button/button.vue.d.ts +2 -2
  281. package/dist/vue2/types/components/card/card.vue.d.ts +1 -1
  282. package/dist/vue2/types/components/chip/chip.vue.d.ts +1 -1
  283. package/dist/vue2/types/components/collapsible/collapsible.vue.d.ts +2 -2
  284. package/dist/vue2/types/components/combobox/combobox.vue.d.ts +1 -1
  285. package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts +1 -1
  286. package/dist/vue2/types/components/emoji/emoji.vue.d.ts +1 -1
  287. package/dist/vue2/types/components/icon/icon.vue.d.ts +2 -22
  288. package/dist/vue2/types/components/icon/icon.vue.d.ts.map +1 -1
  289. package/dist/vue2/types/components/list_item_group/list_item_group.vue.d.ts +1 -1
  290. package/dist/vue2/types/components/modal/modal.vue.d.ts +2 -2
  291. package/dist/vue2/types/components/popover/popover_header_footer.vue.d.ts +1 -1
  292. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +91 -1
  293. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  294. package/dist/vue2/types/components/skeleton/skeleton-list-item.vue.d.ts +1 -1
  295. package/dist/vue2/types/components/skeleton/skeleton-paragraph.vue.d.ts +3 -3
  296. package/dist/vue2/types/components/skeleton/skeleton-shape.vue.d.ts +2 -2
  297. package/dist/vue2/types/components/skeleton/skeleton-text.vue.d.ts +2 -2
  298. package/dist/vue2/types/components/skeleton/skeleton.vue.d.ts +1 -1
  299. package/dist/vue2/types/components/tooltip/tooltip.vue.d.ts +2 -2
  300. package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
  301. package/dist/vue2/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
  302. package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +2 -2
  303. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +90 -0
  304. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  305. package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
  306. package/dist/vue2/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +1 -1
  307. package/dist/vue3/chunks/_plugin-vue_export-helper-6_y-gaV6.js +2 -0
  308. package/dist/vue3/chunks/_plugin-vue_export-helper-6_y-gaV6.js.map +1 -0
  309. package/dist/vue3/chunks/dropdown-UO3UJalk.js +2 -0
  310. package/dist/vue3/chunks/dropdown-UO3UJalk.js.map +1 -0
  311. package/dist/vue3/chunks/dropdown_constants-KHFvVI2L.js +2 -0
  312. package/dist/vue3/chunks/dropdown_constants-KHFvVI2L.js.map +1 -0
  313. package/dist/vue3/chunks/icon_constants-2S_OSQ1t.js +2 -0
  314. package/dist/vue3/chunks/icon_constants-2S_OSQ1t.js.map +1 -0
  315. package/dist/vue3/chunks/index-6tYeqbgP.js +3 -0
  316. package/dist/vue3/chunks/index-6tYeqbgP.js.map +1 -0
  317. package/dist/vue3/chunks/index-IBtQ5jRJ.js +2 -0
  318. package/dist/vue3/chunks/index-IBtQ5jRJ.js.map +1 -0
  319. package/dist/vue3/chunks/{index-BK8b99k1.js → index-mRmwpCBG.js} +2 -2
  320. package/dist/vue3/chunks/{index-BK8b99k1.js.map → index-mRmwpCBG.js.map} +1 -1
  321. package/dist/vue3/chunks/input-0Uksk4DP.js +2 -0
  322. package/dist/vue3/chunks/input-0Uksk4DP.js.map +1 -0
  323. package/dist/vue3/chunks/input_group-AS760Cp7.js +2 -0
  324. package/dist/vue3/chunks/input_group-AS760Cp7.js.map +1 -0
  325. package/dist/vue3/chunks/keyboard_list_navigation-N74Bpdq7.js +2 -0
  326. package/dist/vue3/chunks/keyboard_list_navigation-N74Bpdq7.js.map +1 -0
  327. package/dist/vue3/chunks/link_constants-Kn6kP4i1.js +2 -0
  328. package/dist/vue3/chunks/link_constants-Kn6kP4i1.js.map +1 -0
  329. package/dist/vue3/chunks/list_item_constants-Tsz5CO1m.js +2 -0
  330. package/dist/vue3/chunks/list_item_constants-Tsz5CO1m.js.map +1 -0
  331. package/dist/vue3/chunks/modal-qEzlo0Sj.js +2 -0
  332. package/dist/vue3/chunks/modal-qEzlo0Sj.js.map +1 -0
  333. package/dist/vue3/chunks/notice_action-jO199emq.js +2 -0
  334. package/dist/vue3/chunks/notice_action-jO199emq.js.map +1 -0
  335. package/dist/vue3/chunks/notice_constants-mC6al2Dm.js +2 -0
  336. package/dist/vue3/chunks/notice_constants-mC6al2Dm.js.map +1 -0
  337. package/dist/vue3/chunks/popover_constants-hOEhklvr.js +2 -0
  338. package/dist/vue3/chunks/popover_constants-hOEhklvr.js.map +1 -0
  339. package/dist/vue3/chunks/sr_only_close_button-iD7s1Pbj.js +3 -0
  340. package/dist/vue3/chunks/sr_only_close_button-iD7s1Pbj.js.map +1 -0
  341. package/dist/vue3/chunks/stack_constants-m9Ickqw0.js +2 -0
  342. package/dist/vue3/chunks/stack_constants-m9Ickqw0.js.map +1 -0
  343. package/dist/vue3/chunks/tab-at7WWglk.js +2 -0
  344. package/dist/vue3/chunks/tab-at7WWglk.js.map +1 -0
  345. package/dist/vue3/component-documentation.json +1 -1
  346. package/dist/vue3/dialtone-vue.cjs +2 -0
  347. package/dist/vue3/dialtone-vue.cjs.map +1 -0
  348. package/dist/vue3/dialtone-vue.js +1 -1
  349. package/dist/vue3/lib/attachment-carousel.cjs +2 -0
  350. package/dist/vue3/lib/attachment-carousel.cjs.map +1 -0
  351. package/dist/vue3/lib/attachment-carousel.js +2 -3
  352. package/dist/vue3/lib/attachment-carousel.js.map +1 -1
  353. package/dist/vue3/lib/avatar.cjs +2 -0
  354. package/dist/vue3/lib/avatar.cjs.map +1 -0
  355. package/dist/vue3/lib/avatar.js +2 -3
  356. package/dist/vue3/lib/avatar.js.map +1 -1
  357. package/dist/vue3/lib/badge.cjs +2 -0
  358. package/dist/vue3/lib/badge.cjs.map +1 -0
  359. package/dist/vue3/lib/badge.js +2 -3
  360. package/dist/vue3/lib/badge.js.map +1 -1
  361. package/dist/vue3/lib/banner.cjs +3 -0
  362. package/dist/vue3/lib/banner.cjs.map +1 -0
  363. package/dist/vue3/lib/banner.js +6 -7
  364. package/dist/vue3/lib/banner.js.map +1 -1
  365. package/dist/vue3/lib/breadcrumbs.cjs +2 -0
  366. package/dist/vue3/lib/breadcrumbs.cjs.map +1 -0
  367. package/dist/vue3/lib/button-group.cjs +2 -0
  368. package/dist/vue3/lib/button-group.cjs.map +1 -0
  369. package/dist/vue3/lib/button.cjs +2 -0
  370. package/dist/vue3/lib/button.cjs.map +1 -0
  371. package/dist/vue3/lib/callbar-button-with-popover.cjs +2 -0
  372. package/dist/vue3/lib/callbar-button-with-popover.cjs.map +1 -0
  373. package/dist/vue3/lib/callbar-button-with-popover.js +9 -10
  374. package/dist/vue3/lib/callbar-button-with-popover.js.map +1 -1
  375. package/dist/vue3/lib/callbar-button.cjs +2 -0
  376. package/dist/vue3/lib/callbar-button.cjs.map +1 -0
  377. package/dist/vue3/lib/callbox.cjs +2 -0
  378. package/dist/vue3/lib/callbox.cjs.map +1 -0
  379. package/dist/vue3/lib/callbox.js +2 -3
  380. package/dist/vue3/lib/callbox.js.map +1 -1
  381. package/dist/vue3/lib/card.cjs +2 -0
  382. package/dist/vue3/lib/card.cjs.map +1 -0
  383. package/dist/vue3/lib/checkbox-group.cjs +2 -0
  384. package/dist/vue3/lib/checkbox-group.cjs.map +1 -0
  385. package/dist/vue3/lib/checkbox.cjs +2 -0
  386. package/dist/vue3/lib/checkbox.cjs.map +1 -0
  387. package/dist/vue3/lib/chip.cjs +2 -0
  388. package/dist/vue3/lib/chip.cjs.map +1 -0
  389. package/dist/vue3/lib/chip.js +10 -11
  390. package/dist/vue3/lib/chip.js.map +1 -1
  391. package/dist/vue3/lib/codeblock.cjs +3 -0
  392. package/dist/vue3/lib/codeblock.cjs.map +1 -0
  393. package/dist/vue3/lib/collapsible.cjs +2 -0
  394. package/dist/vue3/lib/collapsible.cjs.map +1 -0
  395. package/dist/vue3/lib/collapsible.js +7 -8
  396. package/dist/vue3/lib/collapsible.js.map +1 -1
  397. package/dist/vue3/lib/combobox-multi-select.cjs +2 -0
  398. package/dist/vue3/lib/combobox-multi-select.cjs.map +1 -0
  399. package/dist/vue3/lib/combobox-with-popover.cjs +2 -0
  400. package/dist/vue3/lib/combobox-with-popover.cjs.map +1 -0
  401. package/dist/vue3/lib/combobox.cjs +2 -0
  402. package/dist/vue3/lib/combobox.cjs.map +1 -0
  403. package/dist/vue3/lib/constants.cjs +2 -0
  404. package/dist/vue3/lib/constants.cjs.map +1 -0
  405. package/dist/vue3/lib/contact-info.cjs +2 -0
  406. package/dist/vue3/lib/contact-info.cjs.map +1 -0
  407. package/dist/vue3/lib/contact-info.js +2 -3
  408. package/dist/vue3/lib/contact-info.js.map +1 -1
  409. package/dist/vue3/lib/contact-row.cjs +2 -0
  410. package/dist/vue3/lib/contact-row.cjs.map +1 -0
  411. package/dist/vue3/lib/contact-row.js +1 -1
  412. package/dist/vue3/lib/datepicker.cjs +2 -0
  413. package/dist/vue3/lib/datepicker.cjs.map +1 -0
  414. package/dist/vue3/lib/datepicker.js +12 -13
  415. package/dist/vue3/lib/datepicker.js.map +1 -1
  416. package/dist/vue3/lib/dates.cjs +2 -0
  417. package/dist/vue3/lib/dates.cjs.map +1 -0
  418. package/dist/vue3/lib/description-list.cjs +2 -0
  419. package/dist/vue3/lib/description-list.cjs.map +1 -0
  420. package/dist/vue3/lib/dropdown.cjs +2 -0
  421. package/dist/vue3/lib/dropdown.cjs.map +1 -0
  422. package/dist/vue3/lib/dropdown.js +6 -7
  423. package/dist/vue3/lib/dropdown.js.map +1 -1
  424. package/dist/vue3/lib/editor.cjs +2 -0
  425. package/dist/vue3/lib/editor.cjs.map +1 -0
  426. package/dist/vue3/lib/editor.js +1 -1
  427. package/dist/vue3/lib/emoji-picker.cjs +2 -0
  428. package/dist/vue3/lib/emoji-picker.cjs.map +1 -0
  429. package/dist/vue3/lib/emoji-picker.js +2 -3
  430. package/dist/vue3/lib/emoji-picker.js.map +1 -1
  431. package/dist/vue3/lib/emoji-row.cjs +2 -0
  432. package/dist/vue3/lib/emoji-row.cjs.map +1 -0
  433. package/dist/vue3/lib/emoji-row.js +1 -1
  434. package/dist/vue3/lib/emoji-text-wrapper.cjs +2 -0
  435. package/dist/vue3/lib/emoji-text-wrapper.cjs.map +1 -0
  436. package/dist/vue3/lib/emoji-text-wrapper.js +1 -1
  437. package/dist/vue3/lib/emoji.cjs +2 -0
  438. package/dist/vue3/lib/emoji.cjs.map +1 -0
  439. package/dist/vue3/lib/emoji.js +1 -1
  440. package/dist/vue3/lib/feed-item-row.cjs +2 -0
  441. package/dist/vue3/lib/feed-item-row.cjs.map +1 -0
  442. package/dist/vue3/lib/feed-item-row.js +11 -12
  443. package/dist/vue3/lib/feed-item-row.js.map +1 -1
  444. package/dist/vue3/lib/feed-pill.cjs +2 -0
  445. package/dist/vue3/lib/feed-pill.cjs.map +1 -0
  446. package/dist/vue3/lib/feed-pill.js +2 -3
  447. package/dist/vue3/lib/feed-pill.js.map +1 -1
  448. package/dist/vue3/lib/general-row.cjs +2 -0
  449. package/dist/vue3/lib/general-row.cjs.map +1 -0
  450. package/dist/vue3/lib/general-row.js +1 -1
  451. package/dist/vue3/lib/group-row.cjs +2 -0
  452. package/dist/vue3/lib/group-row.cjs.map +1 -0
  453. package/dist/vue3/lib/group-row.js +2 -2
  454. package/dist/vue3/lib/grouped-chip.cjs +2 -0
  455. package/dist/vue3/lib/grouped-chip.cjs.map +1 -0
  456. package/dist/vue3/lib/grouped-chip.js +5 -6
  457. package/dist/vue3/lib/grouped-chip.js.map +1 -1
  458. package/dist/vue3/lib/hovercard.cjs +2 -0
  459. package/dist/vue3/lib/hovercard.cjs.map +1 -0
  460. package/dist/vue3/lib/hovercard.js +7 -8
  461. package/dist/vue3/lib/hovercard.js.map +1 -1
  462. package/dist/vue3/lib/icon.cjs +2 -0
  463. package/dist/vue3/lib/icon.cjs.map +1 -0
  464. package/dist/vue3/lib/icon.js +20 -51
  465. package/dist/vue3/lib/icon.js.map +1 -1
  466. package/dist/vue3/lib/image-viewer.cjs +2 -0
  467. package/dist/vue3/lib/image-viewer.cjs.map +1 -0
  468. package/dist/vue3/lib/image-viewer.js +9 -10
  469. package/dist/vue3/lib/image-viewer.js.map +1 -1
  470. package/dist/vue3/lib/input-group.cjs +2 -0
  471. package/dist/vue3/lib/input-group.cjs.map +1 -0
  472. package/dist/vue3/lib/input.cjs +2 -0
  473. package/dist/vue3/lib/input.cjs.map +1 -0
  474. package/dist/vue3/lib/item-layout.cjs +2 -0
  475. package/dist/vue3/lib/item-layout.cjs.map +1 -0
  476. package/dist/vue3/lib/ivr-node.cjs +2 -0
  477. package/dist/vue3/lib/ivr-node.cjs.map +1 -0
  478. package/dist/vue3/lib/ivr-node.js +4 -5
  479. package/dist/vue3/lib/ivr-node.js.map +1 -1
  480. package/dist/vue3/lib/keyboard-shortcut.cjs +2 -0
  481. package/dist/vue3/lib/keyboard-shortcut.cjs.map +1 -0
  482. package/dist/vue3/lib/keyboard-shortcut.js +4 -5
  483. package/dist/vue3/lib/keyboard-shortcut.js.map +1 -1
  484. package/dist/vue3/lib/lazy-show.cjs +2 -0
  485. package/dist/vue3/lib/lazy-show.cjs.map +1 -0
  486. package/dist/vue3/lib/link.cjs +2 -0
  487. package/dist/vue3/lib/link.cjs.map +1 -0
  488. package/dist/vue3/lib/list-item-group.cjs +2 -0
  489. package/dist/vue3/lib/list-item-group.cjs.map +1 -0
  490. package/dist/vue3/lib/list-item.cjs +2 -0
  491. package/dist/vue3/lib/list-item.cjs.map +1 -0
  492. package/dist/vue3/lib/list-item.js +2 -3
  493. package/dist/vue3/lib/list-item.js.map +1 -1
  494. package/dist/vue3/lib/message-input.cjs +2 -0
  495. package/dist/vue3/lib/message-input.cjs.map +1 -0
  496. package/dist/vue3/lib/message-input.js +149 -101
  497. package/dist/vue3/lib/message-input.js.map +1 -1
  498. package/dist/vue3/lib/mixins.cjs +2 -0
  499. package/dist/vue3/lib/mixins.cjs.map +1 -0
  500. package/dist/vue3/lib/modal.cjs +3 -0
  501. package/dist/vue3/lib/modal.cjs.map +1 -0
  502. package/dist/vue3/lib/modal.js +11 -12
  503. package/dist/vue3/lib/modal.js.map +1 -1
  504. package/dist/vue3/lib/notice.cjs +2 -0
  505. package/dist/vue3/lib/notice.cjs.map +1 -0
  506. package/dist/vue3/lib/notice.js +2 -3
  507. package/dist/vue3/lib/notice.js.map +1 -1
  508. package/dist/vue3/lib/pagination.cjs +2 -0
  509. package/dist/vue3/lib/pagination.cjs.map +1 -0
  510. package/dist/vue3/lib/pagination.js +2 -3
  511. package/dist/vue3/lib/pagination.js.map +1 -1
  512. package/dist/vue3/lib/popover.cjs +2 -0
  513. package/dist/vue3/lib/popover.cjs.map +1 -0
  514. package/dist/vue3/lib/popover.js +4 -5
  515. package/dist/vue3/lib/popover.js.map +1 -1
  516. package/dist/vue3/lib/presence.cjs +2 -0
  517. package/dist/vue3/lib/presence.cjs.map +1 -0
  518. package/dist/vue3/lib/radio-group.cjs +2 -0
  519. package/dist/vue3/lib/radio-group.cjs.map +1 -0
  520. package/dist/vue3/lib/radio.cjs +2 -0
  521. package/dist/vue3/lib/radio.cjs.map +1 -0
  522. package/dist/vue3/lib/rich-text-editor.cjs +2 -0
  523. package/dist/vue3/lib/rich-text-editor.cjs.map +1 -0
  524. package/dist/vue3/lib/rich-text-editor.js +174 -142
  525. package/dist/vue3/lib/rich-text-editor.js.map +1 -1
  526. package/dist/vue3/lib/root-layout.cjs +2 -0
  527. package/dist/vue3/lib/root-layout.cjs.map +1 -0
  528. package/dist/vue3/lib/scroller.cjs +2 -0
  529. package/dist/vue3/lib/scroller.cjs.map +1 -0
  530. package/dist/vue3/lib/select-menu.cjs +2 -0
  531. package/dist/vue3/lib/select-menu.cjs.map +1 -0
  532. package/dist/vue3/lib/settings-menu-button.cjs +2 -0
  533. package/dist/vue3/lib/settings-menu-button.cjs.map +1 -0
  534. package/dist/vue3/lib/settings-menu-button.js +2 -3
  535. package/dist/vue3/lib/settings-menu-button.js.map +1 -1
  536. package/dist/vue3/lib/skeleton.cjs +2 -0
  537. package/dist/vue3/lib/skeleton.cjs.map +1 -0
  538. package/dist/vue3/lib/stack.cjs +2 -0
  539. package/dist/vue3/lib/stack.cjs.map +1 -0
  540. package/dist/vue3/lib/tabs.cjs +2 -0
  541. package/dist/vue3/lib/tabs.cjs.map +1 -0
  542. package/dist/vue3/lib/time-pill.cjs +2 -0
  543. package/dist/vue3/lib/time-pill.cjs.map +1 -0
  544. package/dist/vue3/lib/toast.cjs +2 -0
  545. package/dist/vue3/lib/toast.cjs.map +1 -0
  546. package/dist/vue3/lib/toast.js +2 -3
  547. package/dist/vue3/lib/toast.js.map +1 -1
  548. package/dist/vue3/lib/toggle.cjs +2 -0
  549. package/dist/vue3/lib/toggle.cjs.map +1 -0
  550. package/dist/vue3/lib/tooltip-directive.cjs +2 -0
  551. package/dist/vue3/lib/tooltip-directive.cjs.map +1 -0
  552. package/dist/vue3/lib/tooltip.cjs +2 -0
  553. package/dist/vue3/lib/tooltip.cjs.map +1 -0
  554. package/dist/vue3/lib/top-banner-info.cjs +2 -0
  555. package/dist/vue3/lib/top-banner-info.cjs.map +1 -0
  556. package/dist/vue3/lib/unread-pill.cjs +2 -0
  557. package/dist/vue3/lib/unread-pill.cjs.map +1 -0
  558. package/dist/vue3/lib/unread-pill.js +2 -3
  559. package/dist/vue3/lib/unread-pill.js.map +1 -1
  560. package/dist/vue3/lib/utils.cjs +2 -0
  561. package/dist/vue3/lib/utils.cjs.map +1 -0
  562. package/dist/vue3/lib/validation-messages.cjs +2 -0
  563. package/dist/vue3/lib/validation-messages.cjs.map +1 -0
  564. package/dist/vue3/lib/validators.cjs +2 -0
  565. package/dist/vue3/lib/validators.cjs.map +1 -0
  566. package/dist/vue3/style.css +1 -1
  567. package/dist/vue3/types/common/emoji/index.d.ts +1 -1
  568. package/dist/vue3/types/components/avatar/avatar.vue.d.ts +1 -1
  569. package/dist/vue3/types/components/button/button.vue.d.ts +2 -2
  570. package/dist/vue3/types/components/card/card.vue.d.ts +1 -1
  571. package/dist/vue3/types/components/chip/chip.vue.d.ts +1 -1
  572. package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts +2 -2
  573. package/dist/vue3/types/components/combobox/combobox.vue.d.ts +1 -1
  574. package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts +1 -1
  575. package/dist/vue3/types/components/emoji/emoji.vue.d.ts +1 -1
  576. package/dist/vue3/types/components/icon/icon.vue.d.ts +1 -19
  577. package/dist/vue3/types/components/icon/icon.vue.d.ts.map +1 -1
  578. package/dist/vue3/types/components/list_item_group/list_item_group.vue.d.ts +1 -1
  579. package/dist/vue3/types/components/modal/modal.vue.d.ts +2 -2
  580. package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts +1 -1
  581. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +91 -1
  582. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  583. package/dist/vue3/types/components/root_layout/root_layout.vue.d.ts +1 -1
  584. package/dist/vue3/types/components/skeleton/skeleton-list-item.vue.d.ts +1 -1
  585. package/dist/vue3/types/components/skeleton/skeleton-paragraph.vue.d.ts +3 -3
  586. package/dist/vue3/types/components/skeleton/skeleton-shape.vue.d.ts +2 -2
  587. package/dist/vue3/types/components/skeleton/skeleton-text.vue.d.ts +2 -2
  588. package/dist/vue3/types/components/skeleton/skeleton.vue.d.ts +1 -1
  589. package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts +2 -2
  590. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
  591. package/dist/vue3/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
  592. package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +2 -2
  593. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +90 -0
  594. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  595. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
  596. package/dist/vue3/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +1 -1
  597. package/package.json +24 -16
  598. package/dist/eslint-plugin/index.js +0 -22
  599. package/dist/eslint-plugin/rules/custom-implementation.js +0 -69
  600. package/dist/eslint-plugin/rules/deprecated-component.js +0 -91
  601. package/dist/eslint-plugin/rules/deprecated-directive.js +0 -55
  602. package/dist/eslint-plugin/rules/deprecated-icons.js +0 -114
  603. package/dist/stylelint-plugin/index.js +0 -5
  604. package/dist/stylelint-plugin/rules/no-mixins.js +0 -47
@@ -1,15 +1,9 @@
1
- import * as n from "@dialpad/dialtone-icons/vue2";
2
- import { I as o, a as i } from "../chunks/icon_constants-OpYAAKwF.js";
3
- import { n as r } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.js";
4
- import { DtSkeleton as s } from "./skeleton.js";
1
+ import { icons as a } from "@dialpad/dialtone-icons/vue2";
2
+ import { I as r, a as i } from "../chunks/icon_constants-OpYAAKwF.js";
3
+ import { n as o } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.js";
5
4
  import "@dialpad/dialtone-icons/icons.json";
6
- const c = {
5
+ const s = {
7
6
  name: "DtIcon",
8
- components: {
9
- DtSkeleton: s,
10
- ...n
11
- },
12
- inheritAttrs: !1,
13
7
  props: {
14
8
  /**
15
9
  * The size of the icon.
@@ -18,7 +12,7 @@ const c = {
18
12
  size: {
19
13
  type: String,
20
14
  default: "500",
21
- validator: (a) => Object.keys(o).includes(a)
15
+ validator: (n) => Object.keys(r).includes(n)
22
16
  },
23
17
  /**
24
18
  * The icon name in kebab-case
@@ -26,7 +20,7 @@ const c = {
26
20
  name: {
27
21
  type: String,
28
22
  required: !0,
29
- validator: (a) => i.includes(a)
23
+ validator: (n) => i.includes(n)
30
24
  },
31
25
  /**
32
26
  * The label of the icon as read out by a screenreader. Leave this unset if your icon is purely presentational
@@ -34,49 +28,31 @@ const c = {
34
28
  ariaLabel: {
35
29
  type: String,
36
30
  default: void 0
37
- },
38
- /**
39
- * Shows a skeleton loader while the emoji asset is loading.
40
- * @values true, false
41
- */
42
- showSkeleton: {
43
- type: Boolean,
44
- default: !0
45
31
  }
46
32
  },
47
- data() {
48
- return {
49
- iconLoaded: !1
50
- };
51
- },
52
33
  computed: {
53
- iconSize() {
54
- return o[this.size];
55
- },
56
34
  icon() {
57
- return `dt-icon-${this.name}`;
35
+ return a[`./src/icons/${this.name}.vue`];
58
36
  }
59
37
  }
60
38
  };
61
- var l = function() {
39
+ var c = function() {
62
40
  var e = this, t = e._self._c;
63
- return t("span", { staticClass: "d-icon__wrapper" }, [t("dt-skeleton", { directives: [{ name: "show", rawName: "v-show", value: !e.iconLoaded && e.showSkeleton, expression: "!iconLoaded && showSkeleton" }], class: ["d-icon", e.iconSize], attrs: { offset: 0, "shape-option": { shape: "circle", size: "100%" }, "aria-label": e.ariaLabel } }), t(e.icon, e._b({ directives: [{ name: "show", rawName: "v-show", value: e.iconLoaded, expression: "iconLoaded" }], tag: "component", attrs: { size: e.size, "aria-label": e.ariaLabel, "data-qa": e.$attrs["data-qa"] ?? "dt-icon" }, on: { loaded: function(m) {
64
- e.iconLoaded = !0;
65
- } } }, "component", e.$attrs, !1))], 1);
66
- }, d = [], p = /* @__PURE__ */ r(
41
+ return e.icon ? t(e.icon, { tag: "component", attrs: { size: e.size, "aria-label": e.ariaLabel, "data-qa": e.$attrs["data-qa"] ?? "dt-icon" } }) : e._e();
42
+ }, l = [], _ = /* @__PURE__ */ o(
43
+ s,
67
44
  c,
68
45
  l,
69
- d,
70
46
  !1,
71
47
  null,
72
48
  null,
73
49
  null,
74
50
  null
75
51
  );
76
- const h = p.exports;
52
+ const f = _.exports;
77
53
  export {
78
- h as DtIcon,
54
+ f as DtIcon,
79
55
  i as ICON_NAMES,
80
- o as ICON_SIZE_MODIFIERS
56
+ r as ICON_SIZE_MODIFIERS
81
57
  };
82
58
  //# sourceMappingURL=icon.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon.js","sources":["../../components/icon/icon.vue"],"sourcesContent":["<template>\n <span class=\"d-icon__wrapper\">\n <dt-skeleton\n v-show=\"!iconLoaded && showSkeleton\"\n :offset=\"0\"\n :shape-option=\"{ shape: 'circle', size: '100%' }\"\n :aria-label=\"ariaLabel\"\n :class=\"['d-icon', iconSize]\"\n />\n <component\n :is=\"icon\"\n v-show=\"iconLoaded\"\n :size=\"size\"\n :aria-label=\"ariaLabel\"\n :data-qa=\"$attrs['data-qa'] ?? 'dt-icon'\"\n v-bind=\"$attrs\"\n @loaded=\"iconLoaded = true\"\n />\n </span>\n</template>\n\n<script>\nimport { DtSkeleton } from '../skeleton';\nimport * as icons from '@dialpad/dialtone-icons/vue2';\nimport { ICON_SIZE_MODIFIERS, ICON_NAMES } from './icon_constants';\n\n/**\n * The Icon component provides a set of glyphs and sizes to provide context your application.\n * @see https://dialtone.dialpad.com/components/icon.html\n */\nexport default {\n name: 'DtIcon',\n\n components: {\n DtSkeleton,\n ...icons,\n },\n\n inheritAttrs: false,\n\n props: {\n /**\n * The size of the icon.\n * @values 100, 200, 300, 400, 500, 600, 700, 800\n */\n size: {\n type: String,\n default: '500',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * The icon name in kebab-case\n */\n name: {\n type: String,\n required: true,\n validator: (name) => ICON_NAMES.includes(name),\n },\n\n /**\n * The label of the icon as read out by a screenreader. Leave this unset if your icon is purely presentational\n */\n ariaLabel: {\n type: String,\n default: undefined,\n },\n\n /**\n * Shows a skeleton loader while the emoji asset is loading.\n * @values true, false\n */\n showSkeleton: {\n type: Boolean,\n default: true,\n },\n },\n\n data () {\n return {\n iconLoaded: false,\n };\n },\n\n computed: {\n iconSize () {\n return ICON_SIZE_MODIFIERS[this.size];\n },\n\n icon () {\n return `dt-icon-${this.name}`;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtSkeleton","icons","s","ICON_SIZE_MODIFIERS","name","ICON_NAMES"],"mappings":";;;;;AA8BA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,YAAAC;AAAA,IACA,GAAAC;AAAA,EACA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAA,OAAA,KAAAC,CAAA,EAAA,SAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,YAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,WAAA;AACA,aAAAD,EAAA,KAAA,IAAA;AAAA,IACA;AAAA,IAEA,OAAA;AACA,aAAA,WAAA,KAAA,IAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"icon.js","sources":["../../components/icon/icon.vue"],"sourcesContent":["<template>\n <component\n :is=\"icon\"\n v-if=\"icon\"\n :size=\"size\"\n :aria-label=\"ariaLabel\"\n :data-qa=\"$attrs['data-qa'] ?? 'dt-icon'\"\n />\n</template>\n\n<script>\nimport { icons } from '@dialpad/dialtone-icons/vue2';\nimport { ICON_SIZE_MODIFIERS, ICON_NAMES } from './icon_constants';\n\n/**\n * The Icon component provides a set of glyphs and sizes to provide context your application.\n * @see https://dialtone.dialpad.com/components/icon.html\n */\nexport default {\n name: 'DtIcon',\n\n props: {\n /**\n * The size of the icon.\n * @values 100, 200, 300, 400, 500, 600, 700, 800\n */\n size: {\n type: String,\n default: '500',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * The icon name in kebab-case\n */\n name: {\n type: String,\n required: true,\n validator: (name) => ICON_NAMES.includes(name),\n },\n\n /**\n * The label of the icon as read out by a screenreader. Leave this unset if your icon is purely presentational\n */\n ariaLabel: {\n type: String,\n default: undefined,\n },\n },\n\n computed: {\n icon () {\n return icons[`./src/icons/${this.name}.vue`];\n },\n },\n};\n</script>\n"],"names":["_sfc_main","s","ICON_SIZE_MODIFIERS","name","ICON_NAMES","icons"],"mappings":";;;;AAkBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAAC,MAAA,OAAA,KAAAC,CAAA,EAAA,SAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,OAAA;AACA,aAAAE,EAAA,eAAA,KAAA,IAAA,MAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/modal-qEzlo0Sj.js"),a=require("./constants.cjs"),o=require("@linusborg/vue-simple-portal"),n=require("../chunks/_plugin-vue2_normalizer-ZK80B3OL.js"),l=require("./button.cjs"),u=require("./icon.cjs");require("vue");require("../chunks/link_constants-Kn6kP4i1.js");require("@dialpad/dialtone-icons/vue2");require("../chunks/icon_constants-2S_OSQ1t.js");require("@dialpad/dialtone-icons/icons.json");const c={name:"DtImageViewer",components:{Portal:o.Portal,DtButton:l.DtButton,DtIcon:u.DtIcon},mixins:[r.M],props:{open:{type:Boolean,default:null},imageSrc:{type:String,required:!0},imageAlt:{type:String,required:!0},imageButtonClass:{type:String,required:!1,default:""},ariaLabel:{type:String,required:!0},closeAriaLabel:{type:String,required:!0}},emits:["opened","update:open"],data(){return{showCloseButton:!0,isOpen:!1}},computed:{modalListeners(){return{...this.$listeners,click:t=>{t.target===t.currentTarget&&this.close()},keydown:t=>{switch(t.code){case a.EVENT_KEYNAMES.esc:case a.EVENT_KEYNAMES.escape:this.close();break;case a.EVENT_KEYNAMES.tab:this.trapFocus(t);break}}}}},watch:{isOpen:{immediate:!0,handler(t){var e;t?this.previousActiveElement=document.activeElement:((e=this.previousActiveElement)==null||e.focus(),this.previousActiveElement=null)}},open:{handler:function(t){t!==null&&(this.isOpen=t)},immediate:!0}},methods:{openModal(){this.open===null&&(this.isOpen=!0,this.showCloseButton=!0,this.$emit("opened",!0),setTimeout(()=>{this.focusAfterOpen()}))},close(){this.isOpen=!1,this.$emit("opened",!1),this.open!==null&&this.$emit("update:open",!1)},focusAfterOpen(){var t;(t=this.$refs.closeImage)==null||t.$el.focus()},trapFocus(t){this.isOpen&&this.focusTrappedTabPress(t)}}};var d=function(){var e=this,i=e._self._c;return i("div",[i("dt-button",{staticClass:"d-image-viewer__preview-button",attrs:{"data-qa":"dt-image-viewer-preview","aria-label":e.ariaLabel,importance:"clear"},on:{click:e.openModal}},[i("img",{class:e.imageButtonClass,attrs:{src:e.imageSrc,alt:e.imageAlt}})]),e.isOpen?i("portal",[i("div",e._g({staticClass:"d-modal",attrs:{"aria-hidden":e.isOpen?"false":"true","data-qa":"dt-modal"},on:{mouseover:function(s){e.showCloseButton=!0},mouseleave:function(s){e.showCloseButton=!1},focusin:function(s){e.showCloseButton=!0},focusout:function(s){e.showCloseButton=!1}}},e.modalListeners),[i("div",{staticClass:"d-image-viewer__full",attrs:{"data-qa":"dt-image-viewer-full",role:"dialog","aria-modal":"true"}},[i("img",{staticClass:"d-image-viewer__full__image",attrs:{src:e.imageSrc,alt:e.imageAlt}})]),i("transition",{attrs:{name:"fade"}},[e.showCloseButton?i("dt-button",{ref:"closeImage",staticClass:"d-modal__close",attrs:{"data-qa":"dt-image-viewer-close-btn",circle:"",size:"lg",importance:"clear",kind:"inverted","aria-label":e.closeAriaLabel},on:{click:e.close},scopedSlots:e._u([{key:"icon",fn:function(){return[i("dt-icon",{staticClass:"d-image-viewer__close-button",attrs:{name:"close",size:"400"}})]},proxy:!0}],null,!1,1620344283)}):e._e()],1)],1)]):e._e()],1)},m=[],p=n.n(c,d,m,!1,null,null,null,null);const f=p.exports;exports.DtImageViewer=f;
2
+ //# sourceMappingURL=image-viewer.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-viewer.cjs","sources":["../../components/image_viewer/image_viewer.vue"],"sourcesContent":["<template>\n <div>\n <dt-button\n data-qa=\"dt-image-viewer-preview\"\n class=\"d-image-viewer__preview-button\"\n :aria-label=\"ariaLabel\"\n importance=\"clear\"\n @click=\"openModal\"\n >\n <img\n :class=\"imageButtonClass\"\n :src=\"imageSrc\"\n :alt=\"imageAlt\"\n >\n </dt-button>\n <portal v-if=\"isOpen\">\n <div\n :aria-hidden=\"!isOpen ? 'true' : 'false'\"\n class=\"d-modal\"\n data-qa=\"dt-modal\"\n v-on=\"modalListeners\"\n @mouseover=\"showCloseButton = true\"\n @mouseleave=\"showCloseButton = false\"\n @focusin=\" showCloseButton = true\"\n @focusout=\" showCloseButton = false\"\n >\n <div\n data-qa=\"dt-image-viewer-full\"\n class=\"d-image-viewer__full\"\n role=\"dialog\"\n aria-modal=\"true\"\n >\n <img\n class=\"d-image-viewer__full__image\"\n :src=\"imageSrc\"\n :alt=\"imageAlt\"\n >\n </div>\n <transition name=\"fade\">\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"closeImage\"\n data-qa=\"dt-image-viewer-close-btn\"\n class=\"d-modal__close\"\n circle\n size=\"lg\"\n importance=\"clear\"\n kind=\"inverted\"\n :aria-label=\"closeAriaLabel\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon\n class=\"d-image-viewer__close-button\"\n name=\"close\"\n size=\"400\"\n />\n </template>\n </dt-button>\n </transition>\n </div>\n </portal>\n </div>\n</template>\n\n<script>\nimport Modal from '@/common/mixins/modal';\nimport { EVENT_KEYNAMES } from '@/common/constants';\nimport { DtIcon } from '@/components/icon';\nimport { DtButton } from '@/components/button';\nimport { Portal } from '@linusborg/vue-simple-portal';\n\nexport default {\n name: 'DtImageViewer',\n\n components: {\n Portal,\n DtButton,\n DtIcon,\n },\n\n mixins: [Modal],\n\n props: {\n /**\n * Controls whether the image modal is shown. Leaving this null will have the image modal\n * trigger on click by default.\n * If you set this value, the default trigger behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * URL of the image to be shown\n */\n imageSrc: {\n type: String,\n required: true,\n },\n\n /**\n * Alt text of image\n */\n imageAlt: {\n type: String,\n required: true,\n },\n\n /**\n * Image Class\n */\n imageButtonClass: {\n type: String,\n required: false,\n default: '',\n },\n\n /**\n * Aria label\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Aria label for close button\n */\n closeAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n ],\n\n data () {\n return {\n showCloseButton: true,\n isOpen: false,\n };\n },\n\n computed: {\n modalListeners () {\n return {\n ...this.$listeners,\n\n click: event => {\n (event.target === event.currentTarget) && this.close();\n },\n\n keydown: event => {\n switch (event.code) {\n case EVENT_KEYNAMES.esc:\n case EVENT_KEYNAMES.escape:\n this.close();\n break;\n case EVENT_KEYNAMES.tab:\n this.trapFocus(event);\n break;\n }\n },\n };\n },\n },\n\n watch: {\n isOpen: {\n immediate: true,\n handler (isShowing) {\n if (isShowing) {\n // Set a reference to the previously-active element, to which we'll return focus on modal close.\n this.previousActiveElement = document.activeElement;\n } else {\n // Modal is being hidden, so return focus to the previously active element before clearing the reference.\n this.previousActiveElement?.focus();\n this.previousActiveElement = null;\n }\n },\n },\n\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n },\n\n methods: {\n openModal () {\n // Has custom control passed in\n if (this.open !== null) {\n return;\n }\n this.isOpen = true;\n this.showCloseButton = true;\n this.$emit('opened', true);\n\n setTimeout(() => {\n this.focusAfterOpen();\n });\n },\n\n close () {\n this.isOpen = false;\n this.$emit('opened', false);\n\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n focusAfterOpen () {\n this.$refs.closeImage?.$el.focus();\n },\n\n trapFocus (e) {\n if (this.isOpen) {\n this.focusTrappedTabPress(e);\n }\n },\n\n },\n};\n</script>\n"],"names":["_sfc_main","Portal","DtButton","DtIcon","Modal","event","EVENT_KEYNAMES","isShowing","_a","open","e"],"mappings":"wfAwEA,MAAAA,EAAA,CACA,KAAA,gBAEA,WAAA,CACA,OAAAC,EAAA,OACA,SAAAC,EAAA,SACA,OAAAC,EAAA,MACA,EAEA,OAAA,CAAAC,EAAAA,CAAA,EAEA,MAAA,CAQA,KAAA,CACA,KAAA,QACA,QAAA,IACA,EAKA,SAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,SAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,iBAAA,CACA,KAAA,OACA,SAAA,GACA,QAAA,EACA,EAKA,UAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,eAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,EAEA,MAAA,CAOA,SAMA,aACA,EAEA,MAAA,CACA,MAAA,CACA,gBAAA,GACA,OAAA,EACA,CACA,EAEA,SAAA,CACA,gBAAA,CACA,MAAA,CACA,GAAA,KAAA,WAEA,MAAAC,GAAA,CACAA,EAAA,SAAAA,EAAA,eAAA,KAAA,OACA,EAEA,QAAAA,GAAA,CACA,OAAAA,EAAA,KAAA,CACA,KAAAC,EAAAA,eAAA,IACA,KAAAA,EAAA,eAAA,OACA,KAAA,MAAA,EACA,MACA,KAAAA,EAAA,eAAA,IACA,KAAA,UAAAD,CAAA,EACA,KACA,CACA,CACA,CACA,CACA,EAEA,MAAA,CACA,OAAA,CACA,UAAA,GACA,QAAAE,EAAA,OACAA,EAEA,KAAA,sBAAA,SAAA,gBAGAC,EAAA,KAAA,wBAAA,MAAAA,EAAA,QACA,KAAA,sBAAA,KAEA,CACA,EAEA,KAAA,CACA,QAAA,SAAAC,EAAA,CACAA,IAAA,OACA,KAAA,OAAAA,EAEA,EAEA,UAAA,EACA,CACA,EAEA,QAAA,CACA,WAAA,CAEA,KAAA,OAAA,OAGA,KAAA,OAAA,GACA,KAAA,gBAAA,GACA,KAAA,MAAA,SAAA,EAAA,EAEA,WAAA,IAAA,CACA,KAAA,eAAA,CACA,CAAA,EACA,EAEA,OAAA,CACA,KAAA,OAAA,GACA,KAAA,MAAA,SAAA,EAAA,EAEA,KAAA,OAAA,MACA,KAAA,MAAA,cAAA,EAAA,CAEA,EAEA,gBAAA,QACAD,EAAA,KAAA,MAAA,aAAA,MAAAA,EAAA,IAAA,OACA,EAEA,UAAAE,EAAA,CACA,KAAA,QACA,KAAA,qBAAAA,CAAA,CAEA,CAEA,CACA"}
@@ -9,7 +9,6 @@ import "../chunks/link_constants-vIUB92L4.js";
9
9
  import "@dialpad/dialtone-icons/vue2";
10
10
  import "../chunks/icon_constants-OpYAAKwF.js";
11
11
  import "@dialpad/dialtone-icons/icons.json";
12
- import "./skeleton.js";
13
12
  const c = {
14
13
  name: "DtImageViewer",
15
14
  components: {
@@ -142,30 +141,30 @@ const c = {
142
141
  }
143
142
  };
144
143
  var m = function() {
145
- var e = this, i = e._self._c;
146
- return i("div", [i("dt-button", { staticClass: "d-image-viewer__preview-button", attrs: { "data-qa": "dt-image-viewer-preview", "aria-label": e.ariaLabel, importance: "clear" }, on: { click: e.openModal } }, [i("img", { class: e.imageButtonClass, attrs: { src: e.imageSrc, alt: e.imageAlt } })]), e.isOpen ? i("portal", [i("div", e._g({ staticClass: "d-modal", attrs: { "aria-hidden": e.isOpen ? "false" : "true", "data-qa": "dt-modal" }, on: { mouseover: function(s) {
144
+ var e = this, s = e._self._c;
145
+ return s("div", [s("dt-button", { staticClass: "d-image-viewer__preview-button", attrs: { "data-qa": "dt-image-viewer-preview", "aria-label": e.ariaLabel, importance: "clear" }, on: { click: e.openModal } }, [s("img", { class: e.imageButtonClass, attrs: { src: e.imageSrc, alt: e.imageAlt } })]), e.isOpen ? s("portal", [s("div", e._g({ staticClass: "d-modal", attrs: { "aria-hidden": e.isOpen ? "false" : "true", "data-qa": "dt-modal" }, on: { mouseover: function(i) {
147
146
  e.showCloseButton = !0;
148
- }, mouseleave: function(s) {
147
+ }, mouseleave: function(i) {
149
148
  e.showCloseButton = !1;
150
- }, focusin: function(s) {
149
+ }, focusin: function(i) {
151
150
  e.showCloseButton = !0;
152
- }, focusout: function(s) {
151
+ }, focusout: function(i) {
153
152
  e.showCloseButton = !1;
154
- } } }, e.modalListeners), [i("div", { staticClass: "d-image-viewer__full", attrs: { "data-qa": "dt-image-viewer-full", role: "dialog", "aria-modal": "true" } }, [i("img", { staticClass: "d-image-viewer__full__image", attrs: { src: e.imageSrc, alt: e.imageAlt } })]), i("transition", { attrs: { name: "fade" } }, [e.showCloseButton ? i("dt-button", { ref: "closeImage", staticClass: "d-modal__close", attrs: { "data-qa": "dt-image-viewer-close-btn", circle: "", size: "lg", importance: "clear", kind: "inverted", "aria-label": e.closeAriaLabel }, on: { click: e.close }, scopedSlots: e._u([{ key: "icon", fn: function() {
155
- return [i("dt-icon", { staticClass: "d-image-viewer__close-button", attrs: { name: "close", size: "400" } })];
153
+ } } }, e.modalListeners), [s("div", { staticClass: "d-image-viewer__full", attrs: { "data-qa": "dt-image-viewer-full", role: "dialog", "aria-modal": "true" } }, [s("img", { staticClass: "d-image-viewer__full__image", attrs: { src: e.imageSrc, alt: e.imageAlt } })]), s("transition", { attrs: { name: "fade" } }, [e.showCloseButton ? s("dt-button", { ref: "closeImage", staticClass: "d-modal__close", attrs: { "data-qa": "dt-image-viewer-close-btn", circle: "", size: "lg", importance: "clear", kind: "inverted", "aria-label": e.closeAriaLabel }, on: { click: e.close }, scopedSlots: e._u([{ key: "icon", fn: function() {
154
+ return [s("dt-icon", { staticClass: "d-image-viewer__close-button", attrs: { name: "close", size: "400" } })];
156
155
  }, proxy: !0 }], null, !1, 1620344283) }) : e._e()], 1)], 1)]) : e._e()], 1);
157
- }, p = [], d = /* @__PURE__ */ n(
156
+ }, d = [], p = /* @__PURE__ */ n(
158
157
  c,
159
158
  m,
160
- p,
159
+ d,
161
160
  !1,
162
161
  null,
163
162
  null,
164
163
  null,
165
164
  null
166
165
  );
167
- const $ = d.exports;
166
+ const S = p.exports;
168
167
  export {
169
- $ as DtImageViewer
168
+ S as DtImageViewer
170
169
  };
171
170
  //# sourceMappingURL=image-viewer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-viewer.js","sources":["../../components/image_viewer/image_viewer.vue"],"sourcesContent":["<template>\n <div>\n <dt-button\n data-qa=\"dt-image-viewer-preview\"\n class=\"d-image-viewer__preview-button\"\n :aria-label=\"ariaLabel\"\n importance=\"clear\"\n @click=\"openModal\"\n >\n <img\n :class=\"imageButtonClass\"\n :src=\"imageSrc\"\n :alt=\"imageAlt\"\n >\n </dt-button>\n <portal v-if=\"isOpen\">\n <div\n :aria-hidden=\"!isOpen ? 'true' : 'false'\"\n class=\"d-modal\"\n data-qa=\"dt-modal\"\n v-on=\"modalListeners\"\n @mouseover=\"showCloseButton = true\"\n @mouseleave=\"showCloseButton = false\"\n @focusin=\" showCloseButton = true\"\n @focusout=\" showCloseButton = false\"\n >\n <div\n data-qa=\"dt-image-viewer-full\"\n class=\"d-image-viewer__full\"\n role=\"dialog\"\n aria-modal=\"true\"\n >\n <img\n class=\"d-image-viewer__full__image\"\n :src=\"imageSrc\"\n :alt=\"imageAlt\"\n >\n </div>\n <transition name=\"fade\">\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"closeImage\"\n data-qa=\"dt-image-viewer-close-btn\"\n class=\"d-modal__close\"\n circle\n size=\"lg\"\n importance=\"clear\"\n kind=\"inverted\"\n :aria-label=\"closeAriaLabel\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon\n class=\"d-image-viewer__close-button\"\n name=\"close\"\n size=\"400\"\n />\n </template>\n </dt-button>\n </transition>\n </div>\n </portal>\n </div>\n</template>\n\n<script>\nimport Modal from '@/common/mixins/modal';\nimport { EVENT_KEYNAMES } from '@/common/constants';\nimport { DtIcon } from '@/components/icon';\nimport { DtButton } from '@/components/button';\nimport { Portal } from '@linusborg/vue-simple-portal';\n\nexport default {\n name: 'DtImageViewer',\n\n components: {\n Portal,\n DtButton,\n DtIcon,\n },\n\n mixins: [Modal],\n\n props: {\n /**\n * Controls whether the image modal is shown. Leaving this null will have the image modal\n * trigger on click by default.\n * If you set this value, the default trigger behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * URL of the image to be shown\n */\n imageSrc: {\n type: String,\n required: true,\n },\n\n /**\n * Alt text of image\n */\n imageAlt: {\n type: String,\n required: true,\n },\n\n /**\n * Image Class\n */\n imageButtonClass: {\n type: String,\n required: false,\n default: '',\n },\n\n /**\n * Aria label\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Aria label for close button\n */\n closeAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n ],\n\n data () {\n return {\n showCloseButton: true,\n isOpen: false,\n };\n },\n\n computed: {\n modalListeners () {\n return {\n ...this.$listeners,\n\n click: event => {\n (event.target === event.currentTarget) && this.close();\n },\n\n keydown: event => {\n switch (event.code) {\n case EVENT_KEYNAMES.esc:\n case EVENT_KEYNAMES.escape:\n this.close();\n break;\n case EVENT_KEYNAMES.tab:\n this.trapFocus(event);\n break;\n }\n },\n };\n },\n },\n\n watch: {\n isOpen: {\n immediate: true,\n handler (isShowing) {\n if (isShowing) {\n // Set a reference to the previously-active element, to which we'll return focus on modal close.\n this.previousActiveElement = document.activeElement;\n } else {\n // Modal is being hidden, so return focus to the previously active element before clearing the reference.\n this.previousActiveElement?.focus();\n this.previousActiveElement = null;\n }\n },\n },\n\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n },\n\n methods: {\n openModal () {\n // Has custom control passed in\n if (this.open !== null) {\n return;\n }\n this.isOpen = true;\n this.showCloseButton = true;\n this.$emit('opened', true);\n\n setTimeout(() => {\n this.focusAfterOpen();\n });\n },\n\n close () {\n this.isOpen = false;\n this.$emit('opened', false);\n\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n focusAfterOpen () {\n this.$refs.closeImage?.$el.focus();\n },\n\n trapFocus (e) {\n if (this.isOpen) {\n this.focusTrappedTabPress(e);\n }\n },\n\n },\n};\n</script>\n"],"names":["_sfc_main","Portal","DtButton","DtIcon","Modal","event","EVENT_KEYNAMES","isShowing","_a","open","e"],"mappings":";;;;;;;;;;;;AAwEA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA;AAAA,EACA;AAAA,EAEA,OAAA;A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,qBAAAA,CAAA;AAAA,IAEA;AAAA,EAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"image-viewer.js","sources":["../../components/image_viewer/image_viewer.vue"],"sourcesContent":["<template>\n <div>\n <dt-button\n data-qa=\"dt-image-viewer-preview\"\n class=\"d-image-viewer__preview-button\"\n :aria-label=\"ariaLabel\"\n importance=\"clear\"\n @click=\"openModal\"\n >\n <img\n :class=\"imageButtonClass\"\n :src=\"imageSrc\"\n :alt=\"imageAlt\"\n >\n </dt-button>\n <portal v-if=\"isOpen\">\n <div\n :aria-hidden=\"!isOpen ? 'true' : 'false'\"\n class=\"d-modal\"\n data-qa=\"dt-modal\"\n v-on=\"modalListeners\"\n @mouseover=\"showCloseButton = true\"\n @mouseleave=\"showCloseButton = false\"\n @focusin=\" showCloseButton = true\"\n @focusout=\" showCloseButton = false\"\n >\n <div\n data-qa=\"dt-image-viewer-full\"\n class=\"d-image-viewer__full\"\n role=\"dialog\"\n aria-modal=\"true\"\n >\n <img\n class=\"d-image-viewer__full__image\"\n :src=\"imageSrc\"\n :alt=\"imageAlt\"\n >\n </div>\n <transition name=\"fade\">\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"closeImage\"\n data-qa=\"dt-image-viewer-close-btn\"\n class=\"d-modal__close\"\n circle\n size=\"lg\"\n importance=\"clear\"\n kind=\"inverted\"\n :aria-label=\"closeAriaLabel\"\n @click=\"close\"\n >\n <template #icon>\n <dt-icon\n class=\"d-image-viewer__close-button\"\n name=\"close\"\n size=\"400\"\n />\n </template>\n </dt-button>\n </transition>\n </div>\n </portal>\n </div>\n</template>\n\n<script>\nimport Modal from '@/common/mixins/modal';\nimport { EVENT_KEYNAMES } from '@/common/constants';\nimport { DtIcon } from '@/components/icon';\nimport { DtButton } from '@/components/button';\nimport { Portal } from '@linusborg/vue-simple-portal';\n\nexport default {\n name: 'DtImageViewer',\n\n components: {\n Portal,\n DtButton,\n DtIcon,\n },\n\n mixins: [Modal],\n\n props: {\n /**\n * Controls whether the image modal is shown. Leaving this null will have the image modal\n * trigger on click by default.\n * If you set this value, the default trigger behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * URL of the image to be shown\n */\n imageSrc: {\n type: String,\n required: true,\n },\n\n /**\n * Alt text of image\n */\n imageAlt: {\n type: String,\n required: true,\n },\n\n /**\n * Image Class\n */\n imageButtonClass: {\n type: String,\n required: false,\n default: '',\n },\n\n /**\n * Aria label\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Aria label for close button\n */\n closeAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n ],\n\n data () {\n return {\n showCloseButton: true,\n isOpen: false,\n };\n },\n\n computed: {\n modalListeners () {\n return {\n ...this.$listeners,\n\n click: event => {\n (event.target === event.currentTarget) && this.close();\n },\n\n keydown: event => {\n switch (event.code) {\n case EVENT_KEYNAMES.esc:\n case EVENT_KEYNAMES.escape:\n this.close();\n break;\n case EVENT_KEYNAMES.tab:\n this.trapFocus(event);\n break;\n }\n },\n };\n },\n },\n\n watch: {\n isOpen: {\n immediate: true,\n handler (isShowing) {\n if (isShowing) {\n // Set a reference to the previously-active element, to which we'll return focus on modal close.\n this.previousActiveElement = document.activeElement;\n } else {\n // Modal is being hidden, so return focus to the previously active element before clearing the reference.\n this.previousActiveElement?.focus();\n this.previousActiveElement = null;\n }\n },\n },\n\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n },\n\n methods: {\n openModal () {\n // Has custom control passed in\n if (this.open !== null) {\n return;\n }\n this.isOpen = true;\n this.showCloseButton = true;\n this.$emit('opened', true);\n\n setTimeout(() => {\n this.focusAfterOpen();\n });\n },\n\n close () {\n this.isOpen = false;\n this.$emit('opened', false);\n\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n focusAfterOpen () {\n this.$refs.closeImage?.$el.focus();\n },\n\n trapFocus (e) {\n if (this.isOpen) {\n this.focusTrappedTabPress(e);\n }\n },\n\n },\n};\n</script>\n"],"names":["_sfc_main","Portal","DtButton","DtIcon","Modal","event","EVENT_KEYNAMES","isShowing","_a","open","e"],"mappings":";;;;;;;;;;;AAwEA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,iBAAA;AAAA,MACA,QAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,iBAAA;AACA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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../chunks/input_group-j2gTtc1C.js"),n=require("../chunks/_plugin-vue2_normalizer-ZK80B3OL.js"),r=require("./validation-messages.cjs");require("vue");require("./validators.cjs");require("./constants.cjs");require("./utils.cjs");const l={name:"DtInputGroup",components:{DtValidationMessages:r.DtValidationMessages},mixins:[t.I],props:{dataQaGroup:{type:String,default:"input-group"},dataQaGroupLegend:{type:String,default:"input-group-legend"},dataQaGroupMessages:{type:String,default:"input-group-messages"}},emits:["input"],data(){return{internalValue:this.value,provideObj:{value:this.value}}},watch:{value(a){this.internalValue=a},internalValue(a){this.provideObj.value=a}},methods:{getMessageKey(a,e){return`input-group-message-${a}-${e}-${this.id}`}}};var i=function(){var e=this,s=e._self._c;return s("fieldset",{staticClass:"d-input-group__fieldset",attrs:{"data-qa":e.dataQaGroup}},[e.$slots.legend||e.legend?s("legend",e._b({class:["d-label",e.legendClass],attrs:{"data-qa":e.dataQaGroupLegend}},"legend",e.legendChildProps,!1),[e._t("legend",function(){return[e._v(" "+e._s(e.legend)+" ")]})],2):e._e(),e._t("default"),s("dt-validation-messages",e._b({class:e.messagesClass,attrs:{"validation-messages":e.formattedMessages,"show-messages":e.showMessages,"data-qa":e.dataQaGroupMessages}},"dt-validation-messages",e.messagesChildProps,!1))],2)},u=[],d=n.n(l,i,u,!1,null,null,null,null);const o=d.exports;exports.DtInputGroup=o;
2
+ //# sourceMappingURL=input-group.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-group.cjs","sources":["../../components/input_group/input_group.vue"],"sourcesContent":["<template>\n <fieldset\n class=\"d-input-group__fieldset\"\n :data-qa=\"dataQaGroup\"\n >\n <legend\n v-if=\"$slots.legend || legend\"\n :class=\"['d-label', legendClass]\"\n v-bind=\"legendChildProps\"\n :data-qa=\"dataQaGroupLegend\"\n >\n <!-- @slot slot for Input Group Legend -->\n <slot name=\"legend\">\n {{ legend }}\n </slot>\n </legend>\n <!-- @slot slot for Input Group Components -->\n <slot />\n <dt-validation-messages\n :validation-messages=\"formattedMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n :data-qa=\"dataQaGroupMessages\"\n v-bind=\"messagesChildProps\"\n />\n </fieldset>\n</template>\n\n<script>\nimport { InputGroupMixin } from '@/common/mixins/input_group';\nimport { DtValidationMessages } from '../validation_messages';\n\n/**\n * Input Groups are convenience components for a grouping of related inputs.\n * While each input within the group could be independent, the `v-model` on the group\n * provides a convenient interface for determining the current state of the group.\n * @see https://dialtone.dialpad.com/components/input_group.html\n */\nexport default {\n name: 'DtInputGroup',\n\n components: { DtValidationMessages },\n\n mixins: [InputGroupMixin],\n\n props: {\n /**\n * A data qa tag for the input group\n */\n dataQaGroup: {\n type: String,\n default: 'input-group',\n },\n\n /**\n * A data qa tag for the input group legend\n */\n dataQaGroupLegend: {\n type: String,\n default: 'input-group-legend',\n },\n\n /**\n * A data qa tag for the input group messages\n */\n dataQaGroupMessages: {\n type: String,\n default: 'input-group-messages',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n */\n 'input',\n ],\n\n data () {\n return {\n internalValue: this.value,\n // wrap values in object to make reactive\n provideObj: {\n value: this.value,\n },\n };\n },\n\n watch: {\n value (newValue) {\n this.internalValue = newValue;\n },\n\n /*\n * watching value to support 2 way binding for slotted inputs.\n * need this to pass value to slotted inputs if modified outside\n * input group.\n */\n internalValue (newInternalValue) {\n this.provideObj.value = newInternalValue;\n },\n },\n\n methods: {\n getMessageKey (type, index) {\n return `input-group-message-${type}-${index}-${this.id}`;\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtValidationMessages","InputGroupMixin","newValue","newInternalValue","type","index"],"mappings":"oUAsCA,MAAAA,EAAA,CACA,KAAA,eAEA,WAAA,CAAAC,qBAAAA,EAAAA,oBAAA,EAEA,OAAA,CAAAC,EAAAA,CAAA,EAEA,MAAA,CAIA,YAAA,CACA,KAAA,OACA,QAAA,aACA,EAKA,kBAAA,CACA,KAAA,OACA,QAAA,oBACA,EAKA,oBAAA,CACA,KAAA,OACA,QAAA,sBACA,CACA,EAEA,MAAA,CAMA,OACA,EAEA,MAAA,CACA,MAAA,CACA,cAAA,KAAA,MAEA,WAAA,CACA,MAAA,KAAA,KACA,CACA,CACA,EAEA,MAAA,CACA,MAAAC,EAAA,CACA,KAAA,cAAAA,CACA,EAOA,cAAAC,EAAA,CACA,KAAA,WAAA,MAAAA,CACA,CACA,EAEA,QAAA,CACA,cAAAC,EAAAC,EAAA,CACA,MAAA,uBAAAD,CAAA,IAAAC,CAAA,IAAA,KAAA,EAAA,EACA,CACA,CACA"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./constants.cjs"),c=require("./utils.cjs"),g=require("../chunks/input-o-fc1X4b.js"),f=require("../chunks/_plugin-vue2_normalizer-ZK80B3OL.js"),m=require("./validation-messages.cjs");require("vue");require("./validators.cjs");const a={TEXT:"text",TEXTAREA:"textarea",PASSWORD:"password",EMAIL:"email",NUMBER:"number",DATE:"date",TIME:"time",FILE:"file"},s={EXTRA_SMALL:"xs",SMALL:"sm",DEFAULT:"md",LARGE:"lg",EXTRA_LARGE:"xl"},_={name:"DtInput",components:{DtValidationMessages:m.DtValidationMessages},mixins:[g.M],inheritAttrs:!1,props:{name:{type:String,default:""},type:{type:String,default:a.TEXT,validator:e=>Object.values(a).includes(e)},value:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},label:{type:String,default:""},labelVisible:{type:Boolean,default:!0},description:{type:String,default:""},size:{type:String,default:null,validator:e=>Object.values(s).includes(e)},iconSize:{type:String,default:null,validator:e=>Object.values(s).includes(e)},inputClass:{type:[String,Object,Array],default:""},inputWrapperClass:{type:[String,Object,Array],default:""},currentLength:{type:Number,default:null},retainWarning:{type:Boolean,default:!1},validate:{type:Object,default:null},hidden:{type:Boolean,default:!1}},emits:["input","blur","clear","focus","focusin","focusout","update:length","update:invalid"],data(){return{descriptionSizeClasses:{lg:"d-description--lg",xl:"d-description--xl"},labelSizeClasses:{xs:"d-label--xs",sm:"d-label--sm",md:"d-label--md",lg:"d-label--lg",xl:"d-label--xl"},isInputFocused:!1,isInvalid:!1,defaultLength:0}},computed:{isTextarea(){return this.type===a.TEXTAREA},isDefaultSize(){return this.size===s.DEFAULT},isDefaultIconSize(){return this.iconSizeComputed===s.DEFAULT},iconSizeComputed(){return this.iconSize?this.iconSize:this.size},isValidSize(){return Object.values(s).includes(this.size)},isValidDescriptionSize(){return Object.values(n.DESCRIPTION_SIZE_TYPES).includes(this.size)},inputComponent(){return this.isTextarea?"textarea":"input"},inputListeners(){return{...this.$listeners,input:e=>this.$emit("input",e.target.value),focus:e=>{this.isInputFocused=!0,this.$emit("focus",e)},blur:e=>{this.isInputFocused=!1,this.onBlur(e)}}},descriptionKey(){return`input-description-${c.getUniqueString()}`},inputState(){return c.getValidationState(this.validationMessages)},defaultLengthCalculation(){return this.calculateLength(this.value)},validationProps(){var e,t,i,l,r,u,d,o,p,h;return{length:{description:(t=(e=this==null?void 0:this.validate)==null?void 0:e.length)==null?void 0:t.description,max:(l=(i=this==null?void 0:this.validate)==null?void 0:i.length)==null?void 0:l.max,warn:(u=(r=this==null?void 0:this.validate)==null?void 0:r.length)==null?void 0:u.warn,message:(o=(d=this==null?void 0:this.validate)==null?void 0:d.length)==null?void 0:o.message,limitMaxLength:(h=(p=this==null?void 0:this.validate)==null?void 0:p.length)!=null&&h.limitMaxLength?this.validate.length.limitMaxLength:!1}}},validationMessages(){return this.showLengthLimitValidation?this.formattedMessages.concat([this.inputLengthErrorMessage()]):this.formattedMessages},showInputState(){return this.showMessages&&this.inputState},inputLength(){return this.currentLength?this.currentLength:this.defaultLengthCalculation},inputLengthState(){return this.inputLength<this.validationProps.length.warn?null:this.inputLength<=this.validationProps.length.max?this.validationProps.length.warn?n.VALIDATION_MESSAGE_TYPES.WARNING:null:n.VALIDATION_MESSAGE_TYPES.ERROR},shouldValidateLength(){return!!(this.validationProps.length.description&&this.validationProps.length.max)},shouldLimitMaxLength(){return this.shouldValidateLength&&this.validationProps.length.limitMaxLength},showLengthLimitValidation(){return this.shouldValidateLength&&this.inputLengthState!==null&&this.validationProps.length.message&&(this.retainWarning||this.isInputFocused||this.isInvalid)},sizeModifierClass(){return this.isDefaultSize||!this.isValidSize?"":{input:{xs:"d-input--xs",sm:"d-input--sm",lg:"d-input--lg",xl:"d-input--xl"},textarea:{xs:"d-textarea--xs",sm:"d-textarea--sm",lg:"d-textarea--lg",xl:"d-textarea--xl"}}[this.inputComponent][this.size]},stateClass(){return[{input:{error:"d-input--error base-input__input--error",warning:"d-input--warning base-input__input--warning",success:"d-input--success base-input__input--success"},textarea:{error:"d-textarea--error base-input__input--error",warning:"d-textarea--warning base-input__input--warning",success:"d-textarea--success base-input__input--success"}}[this.inputComponent][this.inputState]]}},watch:{isInvalid(e){this.$emit("update:invalid",e)},value:{immediate:!0,handler(e){this.shouldValidateLength&&this.validateLength(this.inputLength),this.currentLength==null&&this.$emit("update:length",this.calculateLength(e))}}},methods:{inputClasses(){return["base-input__input",this.inputComponent==="input"?"d-input":"d-textarea",{[this.stateClass]:this.showInputState,"d-input-icon--left":this.$slots.leftIcon,"d-input-icon--right":this.$slots.rightIcon},this.sizeModifierClass,this.inputClass]},inputWrapperClasses(){return this.hidden?[]:["d-input__wrapper",{[this.stateClass]:this.showInputState},this.inputWrapperClass]},calculateLength(e){return typeof e!="string"?0:[...e].length},inputLengthErrorMessage(){return{message:this.validationProps.length.message,type:this.inputLengthState}},inputIconClasses(e){const t={xs:"d-input-icon--xs",sm:"d-input-icon--sm",lg:"d-input-icon--lg",xl:"d-input-icon--xl"};return[{left:"base-input__icon--left d-input-icon--left",right:"base-input__icon--right d-input-icon--right"}[e],"d-input-icon",{[t[this.iconSizeComputed]]:!this.isDefaultIconSize},this.sizeModifierClass]},onBlur(e){var t;(t=this.$refs.container)!=null&&t.contains(e.relatedTarget)||this.$emit("blur",e)},clear(){this.$emit("input",""),this.$emit("clear")},blur(){this.$refs.input.blur()},focus(){this.$refs.input.focus()},select(){this.$refs.input.select()},getMessageKey(e,t){return`message-${e}-${t}`},validateLength(e){this.isInvalid=e>this.validationProps.length.max}}};var v=function(){var t=this,i=t._self._c;return i("div",{ref:"container",class:["base-input",{"d-vi-hidden":t.hidden}],attrs:{"data-qa":"dt-input"}},[i("label",{staticClass:"base-input__label",attrs:{"aria-details":t.$slots.description||t.description?t.descriptionKey:void 0,"data-qa":"dt-input-label-wrapper"}},[t._t("labelSlot",function(){return[t.labelVisible&&t.label?i("div",{ref:"label",class:["base-input__label-text","d-label",t.labelSizeClasses[t.size]],attrs:{"data-qa":"dt-input-label"}},[t._v(" "+t._s(t.label)+" ")]):t._e()]}),t.$slots.description||t.description||t.shouldValidateLength?i("div",{ref:"description",class:["base-input__description","d-description",t.descriptionSizeClasses[t.size]],attrs:{id:t.descriptionKey,"data-qa":"dt-input-description"}},[t.$slots.description||t.description?i("div",[t._t("description",function(){return[t._v(t._s(t.description))]})],2):t._e(),t.shouldValidateLength?i("div",{staticClass:"d-input__length-description",attrs:{"data-qa":"dt-input-length-description"}},[t._v(" "+t._s(t.validationProps.length.description)+" ")]):t._e()]):t._e(),i("div",{class:t.inputWrapperClasses(),attrs:{"read-only":t.disabled}},[t.$slots.leftIcon?i("span",{class:t.inputIconClasses("left"),attrs:{"data-qa":"dt-input-left-icon-wrapper"},on:{focusout:t.onBlur}},[t._t("leftIcon")],2):t._e(),t.isTextarea?i("textarea",t._g(t._b({ref:"input",class:t.inputClasses(),attrs:{name:t.name,disabled:t.disabled,maxlength:t.shouldLimitMaxLength?t.validationProps.length.max:null,"data-qa":t.$attrs["data-qa"]??"dt-input-input"},domProps:{value:t.value}},"textarea",t.$attrs,!1),t.inputListeners)):i("input",t._g(t._b({ref:"input",class:t.inputClasses(),attrs:{name:t.name,type:t.type,disabled:t.disabled,maxlength:t.shouldLimitMaxLength?t.validationProps.length.max:null,"data-qa":t.$attrs["data-qa"]??"dt-input-input"},domProps:{value:t.value}},"input",t.$attrs,!1),t.inputListeners)),t.$slots.rightIcon?i("span",{class:t.inputIconClasses("right"),attrs:{"data-qa":"dt-input-right-icon-wrapper"},on:{focusout:t.onBlur}},[t._t("rightIcon")],2):t._e()])],2),i("dt-validation-messages",t._b({class:t.messagesClass,attrs:{"validation-messages":t.validationMessages,"show-messages":t.showMessages,"data-qa":"dt-input-messages"}},"dt-validation-messages",t.messagesChildProps,!1))],1)},b=[],S=f.n(_,v,b,!1,null,null,null,null);const x=S.exports;exports.DtInput=x;exports.INPUT_SIZES=s;exports.INPUT_TYPES=a;
2
+ //# sourceMappingURL=input.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.cjs","sources":["../../components/input/input_constants.js","../../components/input/input.vue"],"sourcesContent":["// Valid input types, any other input types (for example: 'radio' or 'checkbox') should\n// use the respective base vue components (radio.vue and checkout.vue).\nexport const INPUT_TYPES = {\n TEXT: 'text',\n TEXTAREA: 'textarea',\n PASSWORD: 'password',\n EMAIL: 'email',\n NUMBER: 'number',\n DATE: 'date',\n TIME: 'time',\n FILE: 'file',\n};\n\nexport const INPUT_SIZES = {\n EXTRA_SMALL: 'xs',\n SMALL: 'sm',\n DEFAULT: 'md',\n LARGE: 'lg',\n EXTRA_LARGE: 'xl',\n};\n\nexport default {\n INPUT_TYPES,\n INPUT_SIZES,\n};\n","<!-- eslint-disable vue/no-restricted-class -->\n<template>\n <div\n ref=\"container\"\n :class=\"['base-input', { 'd-vi-hidden': hidden }]\"\n data-qa=\"dt-input\"\n >\n <label\n class=\"base-input__label\"\n :aria-details=\"$slots.description || description ? descriptionKey : undefined\"\n data-qa=\"dt-input-label-wrapper\"\n >\n <!-- @slot slot for label, defaults to label prop -->\n <slot name=\"labelSlot\">\n <div\n v-if=\"labelVisible && label\"\n ref=\"label\"\n data-qa=\"dt-input-label\"\n :class=\"[\n 'base-input__label-text',\n 'd-label',\n labelSizeClasses[size],\n ]\"\n >\n {{ label }}\n </div>\n </slot>\n <div\n v-if=\"$slots.description || description || shouldValidateLength\"\n :id=\"descriptionKey\"\n ref=\"description\"\n :class=\"[\n 'base-input__description',\n 'd-description',\n descriptionSizeClasses[size],\n ]\"\n data-qa=\"dt-input-description\"\n >\n <div\n v-if=\"$slots.description || description\"\n >\n <!-- @slot slot for description, defaults to description prop -->\n <slot name=\"description\">{{ description }}</slot>\n </div>\n <div\n v-if=\"shouldValidateLength\"\n data-qa=\"dt-input-length-description\"\n class=\"d-input__length-description\"\n >\n {{ validationProps.length.description }}\n </div>\n </div>\n <div\n :class=\"inputWrapperClasses()\"\n :read-only=\"disabled\"\n >\n <span\n v-if=\"$slots.leftIcon\"\n :class=\"inputIconClasses('left')\"\n data-qa=\"dt-input-left-icon-wrapper\"\n @focusout=\"onBlur\"\n >\n <!-- @slot Slot for left icon -->\n <slot name=\"leftIcon\" />\n </span>\n <textarea\n v-if=\"isTextarea\"\n ref=\"input\"\n :value=\"value\"\n :name=\"name\"\n :disabled=\"disabled\"\n :class=\"inputClasses()\"\n :maxlength=\"shouldLimitMaxLength ? validationProps.length.max : null\"\n :data-qa=\"$attrs['data-qa'] ?? 'dt-input-input'\"\n v-bind=\"$attrs\"\n v-on=\"inputListeners\"\n />\n <input\n v-else\n ref=\"input\"\n :value=\"value\"\n :name=\"name\"\n :type=\"type\"\n :disabled=\"disabled\"\n :class=\"inputClasses()\"\n :maxlength=\"shouldLimitMaxLength ? validationProps.length.max : null\"\n :data-qa=\"$attrs['data-qa'] ?? 'dt-input-input'\"\n v-bind=\"$attrs\"\n v-on=\"inputListeners\"\n >\n <span\n v-if=\"$slots.rightIcon\"\n :class=\"inputIconClasses('right')\"\n data-qa=\"dt-input-right-icon-wrapper\"\n @focusout=\"onBlur\"\n >\n <!-- @slot Slot for right icon -->\n <slot name=\"rightIcon\" />\n </span>\n </div>\n </label>\n <dt-validation-messages\n :validation-messages=\"validationMessages\"\n :show-messages=\"showMessages\"\n :class=\"messagesClass\"\n v-bind=\"messagesChildProps\"\n data-qa=\"dt-input-messages\"\n />\n </div>\n</template>\n\n<script>\nimport { DESCRIPTION_SIZE_TYPES, VALIDATION_MESSAGE_TYPES } from '@/common/constants';\nimport { INPUT_TYPES, INPUT_SIZES } from './input_constants';\nimport {\n getUniqueString,\n getValidationState,\n} from '@/common/utils';\nimport { DtValidationMessages } from '@/components/validation_messages';\nimport { MessagesMixin } from '@/common/mixins/input';\n\n/**\n * An input field is an input control that allows users to enter alphanumeric information.\n * It can have a range of options and supports single line and multi-line lengths,\n * as well as varying formats, including numbers, masked passwords, etc.\n * @property {Boolean} placeholder attribute\n * @see https://dialtone.dialpad.com/components/input.html\n */\nexport default {\n name: 'DtInput',\n\n components: { DtValidationMessages },\n\n mixins: [MessagesMixin],\n\n inheritAttrs: false,\n\n props: {\n /**\n * Name property of the input element\n */\n name: {\n type: String,\n default: '',\n },\n\n /**\n * Type of the input, one of: `text`, `password`, `email`, `number`, `textarea`, 'date', 'time'.\n * When `textarea` a `<textarea>` element will be rendered instead of an `<input>` element.\n * @values text, password, email, number, textarea, date, time\n */\n type: {\n type: String,\n default: INPUT_TYPES.TEXT,\n validator: (t) => Object.values(INPUT_TYPES).includes(t),\n },\n\n /**\n * Value of the input\n */\n value: {\n type: [String, Number],\n default: '',\n },\n\n /**\n * Disables the input\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Label for the input\n */\n label: {\n type: String,\n default: '',\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n labelVisible: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Size of the input, one of `xs`, `sm`, `md`, `lg`, `xl`\n * @values null, xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: null,\n validator: (t) => Object.values(INPUT_SIZES).includes(t),\n },\n\n /**\n * Size of the icon. One of `xs`, `sm`, `md`, `lg`, `xl`. If you do not set this the icon will size relative\n * to the input size\n * @values null, xs, sm, md, lg, xl\n */\n iconSize: {\n type: String,\n default: null,\n validator: (t) => Object.values(INPUT_SIZES).includes(t),\n },\n\n /**\n * Additional class name for the input element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n inputClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the input wrapper element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n inputWrapperClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * The current character length that the user has entered into the input.\n * This will only need to be used if you are using `validate.length` and\n * the string contains abnormal characters.\n * For example, an emoji could take up many characters in the input, but should only count as 1 character.\n * If no number is provided, a built-in length calculation will be used for the length validation.\n */\n currentLength: {\n type: Number,\n default: null,\n },\n\n /**\n * Whether the input will continue to display a warning validation message even if the input has lost focus.\n */\n retainWarning: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Validation for the input. Supports maximum length validation with the structure:\n * `{ \"length\": {\"description\": string, \"max\": number, \"warn\": number, \"message\": string,\n * \"limitMaxLength\": boolean }}`\n */\n validate: {\n type: Object,\n default: null,\n },\n\n /**\n * hidden allows to use input without the element visually present in DOM\n */\n hidden: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String}\n */\n 'input',\n\n /**\n * Native input blur event\n *\n * @event blur\n * @type {FocusEvent}\n */\n 'blur',\n\n /**\n * Input clear event\n *\n * @event clear\n */\n 'clear',\n\n /**\n * Native input focus event\n *\n * @event focus\n * @type {FocusEvent}\n */\n 'focus',\n\n /**\n * Native input focusin event\n *\n * @event focusin\n * @type {FocusEvent}\n */\n 'focusin',\n\n /**\n * Native input focusout event\n *\n * @event focusout\n * @type {FocusEvent}\n */\n 'focusout',\n\n /**\n * Length of the input when currentLength prop is not passed\n *\n * @event update:length\n * @type {Number}\n */\n 'update:length',\n\n /**\n * Result of the input validation\n *\n * @event update:invalid\n * @type {Boolean}\n */\n 'update:invalid',\n ],\n\n data () {\n return {\n descriptionSizeClasses: {\n lg: 'd-description--lg',\n xl: 'd-description--xl',\n },\n\n labelSizeClasses: {\n xs: 'd-label--xs',\n sm: 'd-label--sm',\n md: 'd-label--md',\n lg: 'd-label--lg',\n xl: 'd-label--xl',\n },\n\n isInputFocused: false,\n isInvalid: false,\n defaultLength: 0,\n };\n },\n\n computed: {\n\n isTextarea () {\n return this.type === INPUT_TYPES.TEXTAREA;\n },\n\n isDefaultSize () {\n return this.size === INPUT_SIZES.DEFAULT;\n },\n\n isDefaultIconSize () {\n return this.iconSizeComputed === INPUT_SIZES.DEFAULT;\n },\n\n iconSizeComputed () {\n return this.iconSize ? this.iconSize : this.size;\n },\n\n isValidSize () {\n return Object.values(INPUT_SIZES).includes(this.size);\n },\n\n isValidDescriptionSize () {\n return Object.values(DESCRIPTION_SIZE_TYPES).includes(this.size);\n },\n\n inputComponent () {\n if (this.isTextarea) {\n return 'textarea';\n }\n\n return 'input';\n },\n\n inputListeners () {\n return {\n /* TODO\n Check if any usages of this component leverage $listeners and either remove if unused or scope the removal\n and migration prior to upgrading to Vue 3.x\n */\n ...this.$listeners,\n input: event => this.$emit('input', event.target.value),\n focus: event => {\n this.isInputFocused = true;\n this.$emit('focus', event);\n },\n\n blur: event => {\n this.isInputFocused = false;\n this.onBlur(event);\n },\n };\n },\n\n descriptionKey () {\n return `input-description-${getUniqueString()}`;\n },\n\n inputState () {\n return getValidationState(this.validationMessages);\n },\n\n defaultLengthCalculation () {\n return this.calculateLength(this.value);\n },\n\n validationProps () {\n return {\n length: {\n description: this?.validate?.length?.description,\n max: this?.validate?.length?.max,\n warn: this?.validate?.length?.warn,\n message: this?.validate?.length?.message,\n limitMaxLength: this?.validate?.length?.limitMaxLength ? this.validate.length.limitMaxLength : false,\n },\n };\n },\n\n validationMessages () {\n // Add length validation message if exists\n if (this.showLengthLimitValidation) {\n return this.formattedMessages.concat([this.inputLengthErrorMessage()]);\n }\n\n return this.formattedMessages;\n },\n\n showInputState () {\n return this.showMessages && this.inputState;\n },\n\n inputLength () {\n return this.currentLength ? this.currentLength : this.defaultLengthCalculation;\n },\n\n inputLengthState () {\n if (this.inputLength < this.validationProps.length.warn) {\n return null;\n } else if (this.inputLength <= this.validationProps.length.max) {\n return this.validationProps.length.warn ? VALIDATION_MESSAGE_TYPES.WARNING : null;\n } else {\n return VALIDATION_MESSAGE_TYPES.ERROR;\n }\n },\n\n shouldValidateLength () {\n return !!(\n this.validationProps.length.description &&\n this.validationProps.length.max\n );\n },\n\n shouldLimitMaxLength () {\n return this.shouldValidateLength && this.validationProps.length.limitMaxLength;\n },\n\n // eslint-disable-next-line complexity\n showLengthLimitValidation () {\n return (\n this.shouldValidateLength &&\n this.inputLengthState !== null &&\n this.validationProps.length.message &&\n (this.retainWarning || this.isInputFocused || this.isInvalid)\n );\n },\n\n sizeModifierClass () {\n if (this.isDefaultSize || !this.isValidSize) {\n return '';\n }\n\n const sizeClasses = {\n input: {\n xs: 'd-input--xs',\n sm: 'd-input--sm',\n lg: 'd-input--lg',\n xl: 'd-input--xl',\n },\n\n textarea: {\n xs: 'd-textarea--xs',\n sm: 'd-textarea--sm',\n lg: 'd-textarea--lg',\n xl: 'd-textarea--xl',\n },\n };\n\n return sizeClasses[this.inputComponent][this.size];\n },\n\n stateClass () {\n const inputStateClasses = {\n input: {\n error: 'd-input--error base-input__input--error',\n warning: 'd-input--warning base-input__input--warning',\n success: 'd-input--success base-input__input--success',\n },\n\n textarea: {\n error: 'd-textarea--error base-input__input--error',\n warning: 'd-textarea--warning base-input__input--warning',\n success: 'd-textarea--success base-input__input--success',\n },\n };\n return [inputStateClasses[this.inputComponent][this.inputState]];\n },\n },\n\n watch: {\n isInvalid (val) {\n this.$emit('update:invalid', val);\n },\n\n value: {\n immediate: true,\n handler (newValue) {\n if (this.shouldValidateLength) {\n this.validateLength(this.inputLength);\n }\n\n if (this.currentLength == null) {\n this.$emit('update:length', this.calculateLength(newValue));\n }\n },\n },\n },\n\n methods: {\n inputClasses () {\n return [\n 'base-input__input',\n this.inputComponent === 'input' ? 'd-input' : 'd-textarea',\n {\n [this.stateClass]: this.showInputState,\n 'd-input-icon--left': this.$slots.leftIcon,\n 'd-input-icon--right': this.$slots.rightIcon,\n },\n this.sizeModifierClass,\n this.inputClass,\n ];\n },\n\n inputWrapperClasses () {\n if (this.hidden) {\n return [];\n }\n return [\n 'd-input__wrapper',\n { [this.stateClass]: this.showInputState },\n this.inputWrapperClass,\n ];\n },\n\n calculateLength (value) {\n if (typeof value !== 'string') {\n return 0;\n }\n\n return [...value].length;\n },\n\n inputLengthErrorMessage () {\n return {\n message: this.validationProps.length.message,\n type: this.inputLengthState,\n };\n },\n\n inputIconClasses (side) {\n const iconSizeClasses = {\n xs: 'd-input-icon--xs',\n sm: 'd-input-icon--sm',\n lg: 'd-input-icon--lg',\n xl: 'd-input-icon--xl',\n };\n const iconOrientationClasses = {\n left: 'base-input__icon--left d-input-icon--left',\n right: 'base-input__icon--right d-input-icon--right',\n };\n\n return [\n iconOrientationClasses[side],\n 'd-input-icon',\n { [iconSizeClasses[this.iconSizeComputed]]: !this.isDefaultIconSize },\n this.sizeModifierClass,\n ];\n },\n\n onBlur (e) {\n // Do not emit a blur event if the target element is a child of this component\n if (!this.$refs.container?.contains(e.relatedTarget)) {\n this.$emit('blur', e);\n }\n },\n\n clear () {\n this.$emit('input', '');\n this.$emit('clear');\n },\n\n blur () {\n this.$refs.input.blur();\n },\n\n focus () {\n this.$refs.input.focus();\n },\n\n select () {\n this.$refs.input.select();\n },\n\n getMessageKey (type, index) {\n return `message-${type}-${index}`;\n },\n\n validateLength (length) {\n this.isInvalid = (length > this.validationProps.length.max);\n },\n },\n};\n</script>\n"],"names":["INPUT_TYPES","INPUT_SIZES","_sfc_main","DtValidationMessages","MessagesMixin","t","DESCRIPTION_SIZE_TYPES","event","getUniqueString","getValidationState","_b","_a","_d","_c","_f","_e","_h","_g","_j","_i","VALIDATION_MESSAGE_TYPES","val","newValue","value","side","iconSizeClasses","type","index","length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,QAAA,CACA,KAAA,MAAA,MAAA,QACA,EAEA,cAAAe,EAAAC,EAAA,CACA,MAAA,WAAAD,CAAA,IAAAC,CAAA,EACA,EAEA,eAAAC,EAAA,CACA,KAAA,UAAAA,EAAA,KAAA,gBAAA,OAAA,GACA,CACA,CACA"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../chunks/_plugin-vue2_normalizer-ZK80B3OL.js"),s={name:"DtItemLayout",props:{as:{type:String,default:"div"},unstyled:{type:Boolean,default:!1}}};var l=function(){var t=this,e=t._self._c;return e(t.as,{tag:"component",class:t.unstyled?"dt-item-layout--custom":"dt-item-layout"},[t.$slots.left?e("section",{staticClass:"dt-item-layout--left",attrs:{"data-qa":"dt-item-layout-left-wrapper"}},[t._t("left")],2):t._e(),e("section",{staticClass:"dt-item-layout--content",attrs:{"data-qa":"dt-item-layout-content-wrapper"}},[t.$slots.default?e("div",{staticClass:"dt-item-layout--title",attrs:{"data-qa":"dt-item-layout-title-wrapper"}},[t._t("default")],2):t._e(),t.$slots.subtitle?e("div",{class:["dt-item-layout--subtitle",{"dt-item-layout--subtitle--with-title":t.$slots.default}],attrs:{"data-qa":"dt-item-layout-subtitle-wrapper"}},[t._t("subtitle")],2):t._e(),t.$slots.bottom?e("div",{staticClass:"dt-item-layout--bottom",attrs:{"data-qa":"dt-item-layout-bottom-wrapper"}},[t._t("bottom")],2):t._e()]),t.$slots.right?e("section",{staticClass:"dt-item-layout--right",attrs:{"data-qa":"dt-item-layout-right-wrapper"}},[t._t("right")],2):t._e(),t.$slots.selected?e("section",{staticClass:"dt-item-layout--selected",attrs:{"data-qa":"dt-item-layout-selected-wrapper"}},[t._t("selected")],2):t._e()])},o=[],i=a.n(s,l,o,!1,null,null,null,null);const r=i.exports;exports.DtItemLayout=r;
2
+ //# sourceMappingURL=item-layout.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-layout.cjs","sources":["../../components/item_layout/item_layout.vue"],"sourcesContent":["<template>\n <component\n :is=\"as\"\n :class=\"unstyled ? 'dt-item-layout--custom' : 'dt-item-layout'\"\n >\n <section\n v-if=\"$slots.left\"\n data-qa=\"dt-item-layout-left-wrapper\"\n class=\"dt-item-layout--left\"\n >\n <!-- @slot Slot for left content -->\n <slot name=\"left\" />\n </section>\n <section\n data-qa=\"dt-item-layout-content-wrapper\"\n class=\"dt-item-layout--content\"\n >\n <div\n v-if=\"$slots.default\"\n data-qa=\"dt-item-layout-title-wrapper\"\n class=\"dt-item-layout--title\"\n >\n <!-- @slot Slot for main content -->\n <slot />\n </div>\n <div\n v-if=\"$slots.subtitle\"\n data-qa=\"dt-item-layout-subtitle-wrapper\"\n :class=\"['dt-item-layout--subtitle', { 'dt-item-layout--subtitle--with-title': $slots.default }]\"\n >\n <!-- @slot Slot for content below main content -->\n <slot name=\"subtitle\" />\n </div>\n <div\n v-if=\"$slots.bottom\"\n data-qa=\"dt-item-layout-bottom-wrapper\"\n class=\"dt-item-layout--bottom\"\n >\n <!-- @slot Slot for content below subtitle -->\n <slot name=\"bottom\" />\n </div>\n </section>\n <section\n v-if=\"$slots.right\"\n data-qa=\"dt-item-layout-right-wrapper\"\n class=\"dt-item-layout--right\"\n >\n <!-- @slot Slot for right content -->\n <slot name=\"right\" />\n </section>\n <section\n v-if=\"$slots.selected\"\n data-qa=\"dt-item-layout-selected-wrapper\"\n class=\"dt-item-layout--selected\"\n >\n <!-- @slot Slot for selected icon -->\n <slot name=\"selected\" />\n </section>\n </component>\n</template>\n\n/**\n * Custom layout to enable developer to use list-item like stack.\n * It is used as base for `dt-list-item` component\n * @see https://dialtone.dialpad.com/components/item_layout.html\n */\n<script>\nexport default {\n name: 'DtItemLayout',\n props: {\n /**\n * Set this prop to render layout as a specific HTML element.\n */\n as: {\n type: String,\n default: 'div',\n },\n\n /**\n * Set this prop to remove the default styling.\n * @values true, false\n */\n unstyled: {\n type: Boolean,\n default: false,\n },\n },\n};\n</script>\n"],"names":["_sfc_main"],"mappings":"iJAmEAA,EAAA,CACA,KAAA,eACA,MAAA,CAIA,GAAA,CACA,KAAA,OACA,QAAA,KACA,EAMA,SAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,CACA"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("../chunks/_plugin-vue2_normalizer-ZK80B3OL.js"),R=require("./card.cjs"),m=require("./button.cjs"),E=require("../chunks/dropdown-zhMEz3bn.js"),N=require("./icon.cjs");require("vue");require("../chunks/link_constants-Kn6kP4i1.js");require("../chunks/keyboard_list_navigation-N74Bpdq7.js");require("../chunks/dropdown_constants-KHFvVI2L.js");require("./utils.cjs");require("./constants.cjs");require("../chunks/sr_only_close_button-ErijKGYR.js");require("./popover.cjs");require("../chunks/popover_constants-hOEhklvr.js");require("tippy.js");require("@linusborg/vue-simple-portal");require("../chunks/modal-qEzlo0Sj.js");require("./lazy-show.cjs");require("@dialpad/dialtone-icons/vue2");require("../chunks/icon_constants-2S_OSQ1t.js");require("@dialpad/dialtone-icons/icons.json");require("../chunks/list_item_constants-Tsz5CO1m.js");const c="promptmenu",s="promptcollect",d="promptplay",a="gotoexpert",o="goto",i="branch",l="transfer",u="hangup",p={[c]:"keypad",[s]:"dialer",[d]:"volume-2",[a]:"expert-node",[i]:"branch",[o]:"call-merge",[l]:"transfer",[u]:"phone-hang-up"},I={[c]:"Menu",[s]:"Collect",[d]:"Play",[a]:"Expert",[i]:"Branch",[o]:"Go-to",[l]:"Transfer",[u]:"Hangup"},r={PROMPT:{normal:"d-bc-blue-200",selected:"d-bc-blue-300"},LOGIC:{normal:"d-bc-purple-200",selected:"d-bc-purple-400"},TERMINAL:{normal:"d-bc-red-100",selected:"d-bc-red-200"}},b={[c]:r.PROMPT,[s]:r.PROMPT,[d]:r.PROMPT,[a]:r.LOGIC,[i]:r.LOGIC,[o]:r.LOGIC,[l]:r.TERMINAL,[u]:r.TERMINAL},f={name:"DtRecipeIvrNode",components:{DtCard:R.DtCard,DtButton:m.DtButton,DtDropdown:E.D,DtIcon:N.DtIcon},props:{nodeType:{type:String,required:!0},nodeLabel:{type:String,required:!0},isSelected:{type:Boolean,default:!1},menuButtonAriaLabel:{type:String,required:!0},dtmfKey:{type:String,default:null}},emits:["click"],data(){return{isOpen:!1}},computed:{nodeIcon(){return p[this.nodeType]},headerColor(){const{normal:_,selected:e}=b[this.nodeType];return this.isSelected?e:_},isGotoNode(){return this.nodeType===o}},methods:{openMenu(){this.isOpen=!0}}};var D=function(){var e=this,t=e._self._c;return t("div",e._g({staticClass:"ivr_node"},e.$listeners),[e.dtmfKey?t("div",{staticClass:"ivr-connector ivr-connector--dtmf",class:{"ivr-connector--dtmf--selected":e.isSelected},attrs:{"data-qa":"dt-top-connector-dtmf"}},[e._v(" "+e._s(e.dtmfKey)+" ")]):e._e(),e.$slots.connector?e._t("connector"):e._e(),!e.dtmfKey&&!e.$slots.connector?t("div",{staticClass:"ivr-connector",class:{"ivr-connector--selected":e.isSelected},attrs:{"data-qa":"dt-top-connector"}}):e._e(),t("dt-card",{attrs:{"content-class":"d-bt d-bc-black-300 d-px12 d-pt8 d-pb12","container-class":["d-w100p",{"d-ba d-bar8 d-baw4":e.isSelected},e.headerColor],"header-class":["d-mtn1","d-bt","d-btw4","d-p0",e.headerColor,{"d-btr4":!e.isSelected}]},scopedSlots:e._u([{key:"header",fn:function(){return[t("div",{staticClass:"ivr_node__header-left"},[t("dt-button",{attrs:{"aria-label":e.nodeType,importance:"clear",kind:"muted","data-qa":"dt-ivr-node-icon"},scopedSlots:e._u([{key:"icon",fn:function(){return[t("dt-icon",{class:["",{ivr_node__goto_icon:e.isGotoNode}],attrs:{name:e.nodeIcon,size:"200"}})]},proxy:!0}])}),t("p",{staticClass:"ivr_node__label",attrs:{"data-qa":"ivr-node-label"}},[e._v(" "+e._s(e.nodeLabel)+" ")])],1),t("dt-dropdown",{attrs:{placement:"bottom",open:e.isOpen},on:{"update:open":function(n){e.isOpen=n}},scopedSlots:e._u([{key:"anchor",fn:function(){return[t("dt-button",{attrs:{importance:"clear",kind:"muted","aria-label":e.menuButtonAriaLabel},on:{click:function(n){return n.stopPropagation(),n.preventDefault(),e.openMenu.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("dt-icon",{attrs:{name:"more-vertical",size:"200"}})]},proxy:!0}])})]},proxy:!0},{key:"list",fn:function({close:n}){return[t("div",{staticClass:"ivr_node__dropdown-list"},[e._t("menuItems",null,{close:n})],2)]}}],null,!0)})]},proxy:!0},{key:"content",fn:function(){return[e._t("content")]},proxy:!0}],null,!0)})],2)},P=[],y=O.n(f,D,P,!1,null,null,null,null);const v=y.exports;exports.DtRecipeIvrNode=v;exports.IVR_NODE_BRANCH=i;exports.IVR_NODE_EXPERT=a;exports.IVR_NODE_GO_TO=o;exports.IVR_NODE_HANGUP=u;exports.IVR_NODE_ICON_TYPES=p;exports.IVR_NODE_LABELS=I;exports.IVR_NODE_PROMPT_COLLECT=s;exports.IVR_NODE_PROMPT_MENU=c;exports.IVR_NODE_PROMPT_PLAY=d;exports.IVR_NODE_TRANSFER=l;
2
+ //# sourceMappingURL=ivr-node.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ivr-node.cjs","sources":["../../recipes/cards/ivr_node/ivr_node_constants.js","../../recipes/cards/ivr_node/ivr_node.vue"],"sourcesContent":["export const IVR_NODE_PROMPT_MENU = 'promptmenu';\nexport const IVR_NODE_PROMPT_COLLECT = 'promptcollect';\nexport const IVR_NODE_PROMPT_PLAY = 'promptplay';\nexport const IVR_NODE_EXPERT = 'gotoexpert';\nexport const IVR_NODE_GO_TO = 'goto';\nexport const IVR_NODE_BRANCH = 'branch';\nexport const IVR_NODE_TRANSFER = 'transfer';\nexport const IVR_NODE_HANGUP = 'hangup';\n\nexport const IVR_NODE_ICON_TYPES = {\n [IVR_NODE_PROMPT_MENU]: 'keypad',\n [IVR_NODE_PROMPT_COLLECT]: 'dialer',\n [IVR_NODE_PROMPT_PLAY]: 'volume-2',\n [IVR_NODE_EXPERT]: 'expert-node',\n [IVR_NODE_BRANCH]: 'branch',\n [IVR_NODE_GO_TO]: 'call-merge',\n [IVR_NODE_TRANSFER]: 'transfer',\n [IVR_NODE_HANGUP]: 'phone-hang-up',\n};\n\nexport const IVR_NODE_LABELS = {\n [IVR_NODE_PROMPT_MENU]: 'Menu',\n [IVR_NODE_PROMPT_COLLECT]: 'Collect',\n [IVR_NODE_PROMPT_PLAY]: 'Play',\n [IVR_NODE_EXPERT]: 'Expert',\n [IVR_NODE_BRANCH]: 'Branch',\n [IVR_NODE_GO_TO]: 'Go-to',\n [IVR_NODE_TRANSFER]: 'Transfer',\n [IVR_NODE_HANGUP]: 'Hangup',\n};\n\nconst IVR_NODE_COLORS = {\n PROMPT: {\n normal: 'd-bc-blue-200',\n selected: 'd-bc-blue-300',\n },\n LOGIC: {\n normal: 'd-bc-purple-200',\n selected: 'd-bc-purple-400',\n },\n TERMINAL: {\n normal: 'd-bc-red-100',\n selected: 'd-bc-red-200',\n },\n};\n\nexport const IVR_NODE_COLOR_MAPPING = {\n [IVR_NODE_PROMPT_MENU]: IVR_NODE_COLORS.PROMPT,\n [IVR_NODE_PROMPT_COLLECT]: IVR_NODE_COLORS.PROMPT,\n [IVR_NODE_PROMPT_PLAY]: IVR_NODE_COLORS.PROMPT,\n [IVR_NODE_EXPERT]: IVR_NODE_COLORS.LOGIC,\n [IVR_NODE_BRANCH]: IVR_NODE_COLORS.LOGIC,\n [IVR_NODE_GO_TO]: IVR_NODE_COLORS.LOGIC,\n [IVR_NODE_TRANSFER]: IVR_NODE_COLORS.TERMINAL,\n [IVR_NODE_HANGUP]: IVR_NODE_COLORS.TERMINAL,\n};\n","<template>\n <div\n class=\"ivr_node\"\n v-on=\"$listeners\"\n >\n <div\n v-if=\"dtmfKey\"\n data-qa=\"dt-top-connector-dtmf\"\n class=\"ivr-connector ivr-connector--dtmf\"\n :class=\"{ 'ivr-connector--dtmf--selected': isSelected }\"\n >\n {{ dtmfKey }}\n </div>\n <slot\n v-if=\"$slots.connector\"\n name=\"connector\"\n />\n <div\n v-if=\"!dtmfKey && !$slots.connector\"\n data-qa=\"dt-top-connector\"\n class=\"ivr-connector\"\n :class=\"{ 'ivr-connector--selected': isSelected }\"\n />\n <dt-card\n content-class=\"d-bt d-bc-black-300 d-px12 d-pt8 d-pb12\"\n :container-class=\"[\n 'd-w100p',\n { 'd-ba d-bar8 d-baw4': isSelected },\n headerColor,\n ]\"\n :header-class=\"[\n 'd-mtn1',\n 'd-bt',\n 'd-btw4',\n 'd-p0',\n headerColor,\n { 'd-btr4': !isSelected },\n ]\"\n >\n <template #header>\n <!-- node label and icon section on left of the header -->\n <div class=\"ivr_node__header-left\">\n <dt-button\n :aria-label=\"nodeType\"\n importance=\"clear\"\n kind=\"muted\"\n data-qa=\"dt-ivr-node-icon\"\n >\n <template #icon>\n <dt-icon\n :name=\"nodeIcon\"\n size=\"200\"\n :class=\"['', { 'ivr_node__goto_icon': isGotoNode }]\"\n />\n </template>\n </dt-button>\n <p\n class=\"ivr_node__label\"\n data-qa=\"ivr-node-label\"\n >\n {{ nodeLabel }}\n </p>\n </div>\n <!-- node menu for actions like edit, copy, delete -->\n <dt-dropdown\n placement=\"bottom\"\n :open.sync=\"isOpen\"\n >\n <template #anchor>\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-label=\"menuButtonAriaLabel\"\n @click.stop.prevent=\"openMenu\"\n >\n <template #icon>\n <dt-icon\n name=\"more-vertical\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #list=\"{ close }\">\n <div class=\"ivr_node__dropdown-list\">\n <slot\n name=\"menuItems\"\n :close=\"close\"\n />\n </div>\n </template>\n </dt-dropdown>\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n </dt-card>\n </div>\n</template>\n\n<script>\nimport { DtCard } from '@/components/card';\nimport { DtButton } from '@/components/button';\nimport { DtDropdown } from '@/components/dropdown';\nimport { DtIcon } from '@/components/icon';\nimport {\n IVR_NODE_ICON_TYPES, IVR_NODE_COLOR_MAPPING, IVR_NODE_GO_TO,\n} from './ivr_node_constants';\n\nexport default {\n name: 'DtRecipeIvrNode',\n\n components: {\n DtCard,\n DtButton,\n DtDropdown,\n DtIcon,\n },\n\n props: {\n\n /**\n * type of IVR Node.\n */\n nodeType: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the node name.\n */\n\n nodeLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Selected state of the node\n */\n isSelected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Translated aria-label for header menu button\n */\n menuButtonAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * DTMF input\n */\n dtmfKey: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Add node click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n data () {\n return {\n isOpen: false,\n };\n },\n\n computed: {\n nodeIcon () {\n return IVR_NODE_ICON_TYPES[this.nodeType];\n },\n\n headerColor () {\n const { normal, selected } = IVR_NODE_COLOR_MAPPING[this.nodeType];\n return this.isSelected ? selected : normal;\n },\n\n isGotoNode () {\n return this.nodeType === IVR_NODE_GO_TO;\n },\n },\n\n methods: {\n openMenu () {\n this.isOpen = true;\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.ivr_node {\n width: 280px;\n display: flex;\n flex-direction: column;\n align-items: center;\n cursor: pointer;\n\n &__header-left {\n display: flex;\n align-items: center;\n }\n\n &__label {\n font-size: var(--dt-font-size-200);\n font-weight: var(--dt-font-weight-bold);\n }\n\n &__dropdown-list {\n width: var(--dt-size-825);\n }\n}\n\n.ivr_node__goto_icon {\n transform: rotate(90deg);\n}\n\n.ivr-connector {\n z-index: var(--zi-base);\n display: flex;\n justify-content: center;\n align-items: center;\n border-color: var(--dt-color-purple-600);\n background-color: var(--dt-color-purple-600);\n width: var(--dt-size-400);\n height: var(--dt-size-400);\n border-radius: var(--dt-size-radius-circle);\n margin-bottom: var(--dt-space-300-negative);\n\n &--selected {\n margin-bottom: var(--dt-space-400-negative);\n }\n\n &.ivr-connector--dtmf {\n width: var(--dt-size-550);\n height: var(--dt-size-550);\n margin-bottom: var(--dt-space-450-negative);\n color: var(--dt-color-neutral-white);\n font-size: var(--dt-font-size-200);\n\n &--selected {\n margin-bottom: var(--dt-space-500-negative);\n }\n }\n}\n</style>\n"],"names":["IVR_NODE_PROMPT_MENU","IVR_NODE_PROMPT_COLLECT","IVR_NODE_PROMPT_PLAY","IVR_NODE_EXPERT","IVR_NODE_GO_TO","IVR_NODE_BRANCH","IVR_NODE_TRANSFER","IVR_NODE_HANGUP","IVR_NODE_ICON_TYPES","IVR_NODE_LABELS","IVR_NODE_COLORS","IVR_NODE_COLOR_MAPPING","_sfc_main","DtCard","DtButton","DtDropdown","DtIcon","normal","selected"],"mappings":"i6BAAY,MAACA,EAAuB,aACvBC,EAA0B,gBAC1BC,EAAuB,aACvBC,EAAkB,aAClBC,EAAiB,OACjBC,EAAkB,SAClBC,EAAoB,WACpBC,EAAkB,SAElBC,EAAsB,CACjC,CAACR,CAAoB,EAAG,SACxB,CAACC,CAAuB,EAAG,SAC3B,CAACC,CAAoB,EAAG,WACxB,CAACC,CAAe,EAAG,cACnB,CAACE,CAAe,EAAG,SACnB,CAACD,CAAc,EAAG,aAClB,CAACE,CAAiB,EAAG,WACrB,CAACC,CAAe,EAAG,eACrB,EAEaE,EAAkB,CAC7B,CAACT,CAAoB,EAAG,OACxB,CAACC,CAAuB,EAAG,UAC3B,CAACC,CAAoB,EAAG,OACxB,CAACC,CAAe,EAAG,SACnB,CAACE,CAAe,EAAG,SACnB,CAACD,CAAc,EAAG,QAClB,CAACE,CAAiB,EAAG,WACrB,CAACC,CAAe,EAAG,QACrB,EAEMG,EAAkB,CACtB,OAAQ,CACN,OAAQ,gBACR,SAAU,eACX,EACD,MAAO,CACL,OAAQ,kBACR,SAAU,iBACX,EACD,SAAU,CACR,OAAQ,eACR,SAAU,cACX,CACH,EAEaC,EAAyB,CACpC,CAACX,CAAoB,EAAGU,EAAgB,OACxC,CAACT,CAAuB,EAAGS,EAAgB,OAC3C,CAACR,CAAoB,EAAGQ,EAAgB,OACxC,CAACP,CAAe,EAAGO,EAAgB,MACnC,CAACL,CAAe,EAAGK,EAAgB,MACnC,CAACN,CAAc,EAAGM,EAAgB,MAClC,CAACJ,CAAiB,EAAGI,EAAgB,SACrC,CAACH,CAAe,EAAGG,EAAgB,QACrC,ECsDAE,EAAA,CACA,KAAA,kBAEA,WAAA,CACA,OAAAC,EAAA,OACA,SAAAC,EAAA,SACA,WAAAC,EAAA,EACA,OAAAC,EAAA,MACA,EAEA,MAAA,CAKA,SAAA,CACA,KAAA,OACA,SAAA,EACA,EAMA,UAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,WAAA,CACA,KAAA,QACA,QAAA,EACA,EAKA,oBAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,QAAA,CACA,KAAA,OACA,QAAA,IACA,CACA,EAEA,MAAA,CAOA,OACA,EAEA,MAAA,CACA,MAAA,CACA,OAAA,EACA,CACA,EAEA,SAAA,CACA,UAAA,CACA,OAAAR,EAAA,KAAA,QAAA,CACA,EAEA,aAAA,CACA,KAAA,CAAA,OAAAS,EAAA,SAAAC,CAAA,EAAAP,EAAA,KAAA,QAAA,EACA,OAAA,KAAA,WAAAO,EAAAD,CACA,EAEA,YAAA,CACA,OAAA,KAAA,WAAAb,CACA,CACA,EAEA,QAAA,CACA,UAAA,CACA,KAAA,OAAA,EACA,CACA,CACA"}
@@ -19,7 +19,6 @@ import "./lazy-show.js";
19
19
  import "@dialpad/dialtone-icons/vue2";
20
20
  import "../chunks/icon_constants-OpYAAKwF.js";
21
21
  import "@dialpad/dialtone-icons/icons.json";
22
- import "./skeleton.js";
23
22
  import "../chunks/list_item_constants-LTUc74pD.js";
24
23
  const c = "promptmenu", s = "promptcollect", a = "promptplay", d = "gotoexpert", r = "goto", i = "branch", l = "transfer", p = "hangup", R = {
25
24
  [c]: "keypad",
@@ -30,7 +29,7 @@ const c = "promptmenu", s = "promptcollect", a = "promptplay", d = "gotoexpert",
30
29
  [r]: "call-merge",
31
30
  [l]: "transfer",
32
31
  [p]: "phone-hang-up"
33
- }, $ = {
32
+ }, Y = {
34
33
  [c]: "Menu",
35
34
  [s]: "Collect",
36
35
  [a]: "Play",
@@ -178,15 +177,15 @@ var I = function() {
178
177
  null,
179
178
  null
180
179
  );
181
- const X = E.exports;
180
+ const $ = E.exports;
182
181
  export {
183
- X as DtRecipeIvrNode,
182
+ $ as DtRecipeIvrNode,
184
183
  i as IVR_NODE_BRANCH,
185
184
  d as IVR_NODE_EXPERT,
186
185
  r as IVR_NODE_GO_TO,
187
186
  p as IVR_NODE_HANGUP,
188
187
  R as IVR_NODE_ICON_TYPES,
189
- $ as IVR_NODE_LABELS,
188
+ Y as IVR_NODE_LABELS,
190
189
  s as IVR_NODE_PROMPT_COLLECT,
191
190
  c as IVR_NODE_PROMPT_MENU,
192
191
  a as IVR_NODE_PROMPT_PLAY,
@@ -1 +1 @@
1
- {"version":3,"file":"ivr-node.js","sources":["../../recipes/cards/ivr_node/ivr_node_constants.js","../../recipes/cards/ivr_node/ivr_node.vue"],"sourcesContent":["export const IVR_NODE_PROMPT_MENU = 'promptmenu';\nexport const IVR_NODE_PROMPT_COLLECT = 'promptcollect';\nexport const IVR_NODE_PROMPT_PLAY = 'promptplay';\nexport const IVR_NODE_EXPERT = 'gotoexpert';\nexport const IVR_NODE_GO_TO = 'goto';\nexport const IVR_NODE_BRANCH = 'branch';\nexport const IVR_NODE_TRANSFER = 'transfer';\nexport const IVR_NODE_HANGUP = 'hangup';\n\nexport const IVR_NODE_ICON_TYPES = {\n [IVR_NODE_PROMPT_MENU]: 'keypad',\n [IVR_NODE_PROMPT_COLLECT]: 'dialer',\n [IVR_NODE_PROMPT_PLAY]: 'volume-2',\n [IVR_NODE_EXPERT]: 'expert-node',\n [IVR_NODE_BRANCH]: 'branch',\n [IVR_NODE_GO_TO]: 'call-merge',\n [IVR_NODE_TRANSFER]: 'transfer',\n [IVR_NODE_HANGUP]: 'phone-hang-up',\n};\n\nexport const IVR_NODE_LABELS = {\n [IVR_NODE_PROMPT_MENU]: 'Menu',\n [IVR_NODE_PROMPT_COLLECT]: 'Collect',\n [IVR_NODE_PROMPT_PLAY]: 'Play',\n [IVR_NODE_EXPERT]: 'Expert',\n [IVR_NODE_BRANCH]: 'Branch',\n [IVR_NODE_GO_TO]: 'Go-to',\n [IVR_NODE_TRANSFER]: 'Transfer',\n [IVR_NODE_HANGUP]: 'Hangup',\n};\n\nconst IVR_NODE_COLORS = {\n PROMPT: {\n normal: 'd-bc-blue-200',\n selected: 'd-bc-blue-300',\n },\n LOGIC: {\n normal: 'd-bc-purple-200',\n selected: 'd-bc-purple-400',\n },\n TERMINAL: {\n normal: 'd-bc-red-100',\n selected: 'd-bc-red-200',\n },\n};\n\nexport const IVR_NODE_COLOR_MAPPING = {\n [IVR_NODE_PROMPT_MENU]: IVR_NODE_COLORS.PROMPT,\n [IVR_NODE_PROMPT_COLLECT]: IVR_NODE_COLORS.PROMPT,\n [IVR_NODE_PROMPT_PLAY]: IVR_NODE_COLORS.PROMPT,\n [IVR_NODE_EXPERT]: IVR_NODE_COLORS.LOGIC,\n [IVR_NODE_BRANCH]: IVR_NODE_COLORS.LOGIC,\n [IVR_NODE_GO_TO]: IVR_NODE_COLORS.LOGIC,\n [IVR_NODE_TRANSFER]: IVR_NODE_COLORS.TERMINAL,\n [IVR_NODE_HANGUP]: IVR_NODE_COLORS.TERMINAL,\n};\n","<template>\n <div\n class=\"ivr_node\"\n v-on=\"$listeners\"\n >\n <div\n v-if=\"dtmfKey\"\n data-qa=\"dt-top-connector-dtmf\"\n class=\"ivr-connector ivr-connector--dtmf\"\n :class=\"{ 'ivr-connector--dtmf--selected': isSelected }\"\n >\n {{ dtmfKey }}\n </div>\n <slot\n v-if=\"$slots.connector\"\n name=\"connector\"\n />\n <div\n v-if=\"!dtmfKey && !$slots.connector\"\n data-qa=\"dt-top-connector\"\n class=\"ivr-connector\"\n :class=\"{ 'ivr-connector--selected': isSelected }\"\n />\n <dt-card\n content-class=\"d-bt d-bc-black-300 d-px12 d-pt8 d-pb12\"\n :container-class=\"[\n 'd-w100p',\n { 'd-ba d-bar8 d-baw4': isSelected },\n headerColor,\n ]\"\n :header-class=\"[\n 'd-mtn1',\n 'd-bt',\n 'd-btw4',\n 'd-p0',\n headerColor,\n { 'd-btr4': !isSelected },\n ]\"\n >\n <template #header>\n <!-- node label and icon section on left of the header -->\n <div class=\"ivr_node__header-left\">\n <dt-button\n :aria-label=\"nodeType\"\n importance=\"clear\"\n kind=\"muted\"\n data-qa=\"dt-ivr-node-icon\"\n >\n <template #icon>\n <dt-icon\n :name=\"nodeIcon\"\n size=\"200\"\n :class=\"['', { 'ivr_node__goto_icon': isGotoNode }]\"\n />\n </template>\n </dt-button>\n <p\n class=\"ivr_node__label\"\n data-qa=\"ivr-node-label\"\n >\n {{ nodeLabel }}\n </p>\n </div>\n <!-- node menu for actions like edit, copy, delete -->\n <dt-dropdown\n placement=\"bottom\"\n :open.sync=\"isOpen\"\n >\n <template #anchor>\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-label=\"menuButtonAriaLabel\"\n @click.stop.prevent=\"openMenu\"\n >\n <template #icon>\n <dt-icon\n name=\"more-vertical\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #list=\"{ close }\">\n <div class=\"ivr_node__dropdown-list\">\n <slot\n name=\"menuItems\"\n :close=\"close\"\n />\n </div>\n </template>\n </dt-dropdown>\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n </dt-card>\n </div>\n</template>\n\n<script>\nimport { DtCard } from '@/components/card';\nimport { DtButton } from '@/components/button';\nimport { DtDropdown } from '@/components/dropdown';\nimport { DtIcon } from '@/components/icon';\nimport {\n IVR_NODE_ICON_TYPES, IVR_NODE_COLOR_MAPPING, IVR_NODE_GO_TO,\n} from './ivr_node_constants';\n\nexport default {\n name: 'DtRecipeIvrNode',\n\n components: {\n DtCard,\n DtButton,\n DtDropdown,\n DtIcon,\n },\n\n props: {\n\n /**\n * type of IVR Node.\n */\n nodeType: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the node name.\n */\n\n nodeLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Selected state of the node\n */\n isSelected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Translated aria-label for header menu button\n */\n menuButtonAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * DTMF input\n */\n dtmfKey: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Add node click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n data () {\n return {\n isOpen: false,\n };\n },\n\n computed: {\n nodeIcon () {\n return IVR_NODE_ICON_TYPES[this.nodeType];\n },\n\n headerColor () {\n const { normal, selected } = IVR_NODE_COLOR_MAPPING[this.nodeType];\n return this.isSelected ? selected : normal;\n },\n\n isGotoNode () {\n return this.nodeType === IVR_NODE_GO_TO;\n },\n },\n\n methods: {\n openMenu () {\n this.isOpen = true;\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.ivr_node {\n width: 280px;\n display: flex;\n flex-direction: column;\n align-items: center;\n cursor: pointer;\n\n &__header-left {\n display: flex;\n align-items: center;\n }\n\n &__label {\n font-size: var(--dt-font-size-200);\n font-weight: var(--dt-font-weight-bold);\n }\n\n &__dropdown-list {\n width: var(--dt-size-825);\n }\n}\n\n.ivr_node__goto_icon {\n transform: rotate(90deg);\n}\n\n.ivr-connector {\n z-index: var(--zi-base);\n display: flex;\n justify-content: center;\n align-items: center;\n border-color: var(--dt-color-purple-600);\n background-color: var(--dt-color-purple-600);\n width: var(--dt-size-400);\n height: var(--dt-size-400);\n border-radius: var(--dt-size-radius-circle);\n margin-bottom: var(--dt-space-300-negative);\n\n &--selected {\n margin-bottom: var(--dt-space-400-negative);\n }\n\n &.ivr-connector--dtmf {\n width: var(--dt-size-550);\n height: var(--dt-size-550);\n margin-bottom: var(--dt-space-450-negative);\n color: var(--dt-color-neutral-white);\n font-size: var(--dt-font-size-200);\n\n &--selected {\n margin-bottom: var(--dt-space-500-negative);\n }\n }\n}\n</style>\n"],"names":["IVR_NODE_PROMPT_MENU","IVR_NODE_PROMPT_COLLECT","IVR_NODE_PROMPT_PLAY","IVR_NODE_EXPERT","IVR_NODE_GO_TO","IVR_NODE_BRANCH","IVR_NODE_TRANSFER","IVR_NODE_HANGUP","IVR_NODE_ICON_TYPES","IVR_NODE_LABELS","IVR_NODE_COLORS","IVR_NODE_COLOR_MAPPING","_sfc_main","DtCard","DtButton","DtDropdown","DtIcon","normal","selected"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAY,MAACA,IAAuB,cACvBC,IAA0B,iBAC1BC,IAAuB,cACvBC,IAAkB,cAClBC,IAAiB,QACjBC,IAAkB,UAClBC,IAAoB,YACpBC,IAAkB,UAElBC,IAAsB;AAAA,EACjC,CAACR,CAAoB,GAAG;AAAA,EACxB,CAACC,CAAuB,GAAG;AAAA,EAC3B,CAACC,CAAoB,GAAG;AAAA,EACxB,CAACC,CAAe,GAAG;AAAA,EACnB,CAACE,CAAe,GAAG;AAAA,EACnB,CAACD,CAAc,GAAG;AAAA,EAClB,CAACE,CAAiB,GAAG;AAAA,EACrB,CAACC,CAAe,GAAG;AACrB,GAEaE,IAAkB;AAAA,EAC7B,CAACT,CAAoB,GAAG;AAAA,EACxB,CAACC,CAAuB,GAAG;AAAA,EAC3B,CAACC,CAAoB,GAAG;AAAA,EACxB,CAACC,CAAe,GAAG;AAAA,EACnB,CAACE,CAAe,GAAG;AAAA,EACnB,CAACD,CAAc,GAAG;AAAA,EAClB,CAACE,CAAiB,GAAG;AAAA,EACrB,CAACC,CAAe,GAAG;AACrB,GAEMG,IAAkB;AAAA,EACtB,QAAQ;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACX;AAAA,E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A;AAAA,IACA;AAAA,IAEA,cAAA;AACA,YAAA,EAAA,QAAAS,GAAA,UAAAC,EAAA,IAAAP,EAAA,KAAA,QAAA;AACA,aAAA,KAAA,aAAAO,IAAAD;AAAA,IACA;AAAA,IAEA,aAAA;AACA,aAAA,KAAA,aAAAb;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,WAAA;AACA,WAAA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ivr-node.js","sources":["../../recipes/cards/ivr_node/ivr_node_constants.js","../../recipes/cards/ivr_node/ivr_node.vue"],"sourcesContent":["export const IVR_NODE_PROMPT_MENU = 'promptmenu';\nexport const IVR_NODE_PROMPT_COLLECT = 'promptcollect';\nexport const IVR_NODE_PROMPT_PLAY = 'promptplay';\nexport const IVR_NODE_EXPERT = 'gotoexpert';\nexport const IVR_NODE_GO_TO = 'goto';\nexport const IVR_NODE_BRANCH = 'branch';\nexport const IVR_NODE_TRANSFER = 'transfer';\nexport const IVR_NODE_HANGUP = 'hangup';\n\nexport const IVR_NODE_ICON_TYPES = {\n [IVR_NODE_PROMPT_MENU]: 'keypad',\n [IVR_NODE_PROMPT_COLLECT]: 'dialer',\n [IVR_NODE_PROMPT_PLAY]: 'volume-2',\n [IVR_NODE_EXPERT]: 'expert-node',\n [IVR_NODE_BRANCH]: 'branch',\n [IVR_NODE_GO_TO]: 'call-merge',\n [IVR_NODE_TRANSFER]: 'transfer',\n [IVR_NODE_HANGUP]: 'phone-hang-up',\n};\n\nexport const IVR_NODE_LABELS = {\n [IVR_NODE_PROMPT_MENU]: 'Menu',\n [IVR_NODE_PROMPT_COLLECT]: 'Collect',\n [IVR_NODE_PROMPT_PLAY]: 'Play',\n [IVR_NODE_EXPERT]: 'Expert',\n [IVR_NODE_BRANCH]: 'Branch',\n [IVR_NODE_GO_TO]: 'Go-to',\n [IVR_NODE_TRANSFER]: 'Transfer',\n [IVR_NODE_HANGUP]: 'Hangup',\n};\n\nconst IVR_NODE_COLORS = {\n PROMPT: {\n normal: 'd-bc-blue-200',\n selected: 'd-bc-blue-300',\n },\n LOGIC: {\n normal: 'd-bc-purple-200',\n selected: 'd-bc-purple-400',\n },\n TERMINAL: {\n normal: 'd-bc-red-100',\n selected: 'd-bc-red-200',\n },\n};\n\nexport const IVR_NODE_COLOR_MAPPING = {\n [IVR_NODE_PROMPT_MENU]: IVR_NODE_COLORS.PROMPT,\n [IVR_NODE_PROMPT_COLLECT]: IVR_NODE_COLORS.PROMPT,\n [IVR_NODE_PROMPT_PLAY]: IVR_NODE_COLORS.PROMPT,\n [IVR_NODE_EXPERT]: IVR_NODE_COLORS.LOGIC,\n [IVR_NODE_BRANCH]: IVR_NODE_COLORS.LOGIC,\n [IVR_NODE_GO_TO]: IVR_NODE_COLORS.LOGIC,\n [IVR_NODE_TRANSFER]: IVR_NODE_COLORS.TERMINAL,\n [IVR_NODE_HANGUP]: IVR_NODE_COLORS.TERMINAL,\n};\n","<template>\n <div\n class=\"ivr_node\"\n v-on=\"$listeners\"\n >\n <div\n v-if=\"dtmfKey\"\n data-qa=\"dt-top-connector-dtmf\"\n class=\"ivr-connector ivr-connector--dtmf\"\n :class=\"{ 'ivr-connector--dtmf--selected': isSelected }\"\n >\n {{ dtmfKey }}\n </div>\n <slot\n v-if=\"$slots.connector\"\n name=\"connector\"\n />\n <div\n v-if=\"!dtmfKey && !$slots.connector\"\n data-qa=\"dt-top-connector\"\n class=\"ivr-connector\"\n :class=\"{ 'ivr-connector--selected': isSelected }\"\n />\n <dt-card\n content-class=\"d-bt d-bc-black-300 d-px12 d-pt8 d-pb12\"\n :container-class=\"[\n 'd-w100p',\n { 'd-ba d-bar8 d-baw4': isSelected },\n headerColor,\n ]\"\n :header-class=\"[\n 'd-mtn1',\n 'd-bt',\n 'd-btw4',\n 'd-p0',\n headerColor,\n { 'd-btr4': !isSelected },\n ]\"\n >\n <template #header>\n <!-- node label and icon section on left of the header -->\n <div class=\"ivr_node__header-left\">\n <dt-button\n :aria-label=\"nodeType\"\n importance=\"clear\"\n kind=\"muted\"\n data-qa=\"dt-ivr-node-icon\"\n >\n <template #icon>\n <dt-icon\n :name=\"nodeIcon\"\n size=\"200\"\n :class=\"['', { 'ivr_node__goto_icon': isGotoNode }]\"\n />\n </template>\n </dt-button>\n <p\n class=\"ivr_node__label\"\n data-qa=\"ivr-node-label\"\n >\n {{ nodeLabel }}\n </p>\n </div>\n <!-- node menu for actions like edit, copy, delete -->\n <dt-dropdown\n placement=\"bottom\"\n :open.sync=\"isOpen\"\n >\n <template #anchor>\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-label=\"menuButtonAriaLabel\"\n @click.stop.prevent=\"openMenu\"\n >\n <template #icon>\n <dt-icon\n name=\"more-vertical\"\n size=\"200\"\n />\n </template>\n </dt-button>\n </template>\n <template #list=\"{ close }\">\n <div class=\"ivr_node__dropdown-list\">\n <slot\n name=\"menuItems\"\n :close=\"close\"\n />\n </div>\n </template>\n </dt-dropdown>\n </template>\n <template #content>\n <slot name=\"content\" />\n </template>\n </dt-card>\n </div>\n</template>\n\n<script>\nimport { DtCard } from '@/components/card';\nimport { DtButton } from '@/components/button';\nimport { DtDropdown } from '@/components/dropdown';\nimport { DtIcon } from '@/components/icon';\nimport {\n IVR_NODE_ICON_TYPES, IVR_NODE_COLOR_MAPPING, IVR_NODE_GO_TO,\n} from './ivr_node_constants';\n\nexport default {\n name: 'DtRecipeIvrNode',\n\n components: {\n DtCard,\n DtButton,\n DtDropdown,\n DtIcon,\n },\n\n props: {\n\n /**\n * type of IVR Node.\n */\n nodeType: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the node name.\n */\n\n nodeLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Selected state of the node\n */\n isSelected: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Translated aria-label for header menu button\n */\n menuButtonAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * DTMF input\n */\n dtmfKey: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Add node click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n\n data () {\n return {\n isOpen: false,\n };\n },\n\n computed: {\n nodeIcon () {\n return IVR_NODE_ICON_TYPES[this.nodeType];\n },\n\n headerColor () {\n const { normal, selected } = IVR_NODE_COLOR_MAPPING[this.nodeType];\n return this.isSelected ? selected : normal;\n },\n\n isGotoNode () {\n return this.nodeType === IVR_NODE_GO_TO;\n },\n },\n\n methods: {\n openMenu () {\n this.isOpen = true;\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n.ivr_node {\n width: 280px;\n display: flex;\n flex-direction: column;\n align-items: center;\n cursor: pointer;\n\n &__header-left {\n display: flex;\n align-items: center;\n }\n\n &__label {\n font-size: var(--dt-font-size-200);\n font-weight: var(--dt-font-weight-bold);\n }\n\n &__dropdown-list {\n width: var(--dt-size-825);\n }\n}\n\n.ivr_node__goto_icon {\n transform: rotate(90deg);\n}\n\n.ivr-connector {\n z-index: var(--zi-base);\n display: flex;\n justify-content: center;\n align-items: center;\n border-color: var(--dt-color-purple-600);\n background-color: var(--dt-color-purple-600);\n width: var(--dt-size-400);\n height: var(--dt-size-400);\n border-radius: var(--dt-size-radius-circle);\n margin-bottom: var(--dt-space-300-negative);\n\n &--selected {\n margin-bottom: var(--dt-space-400-negative);\n }\n\n &.ivr-connector--dtmf {\n width: var(--dt-size-550);\n height: var(--dt-size-550);\n margin-bottom: var(--dt-space-450-negative);\n color: var(--dt-color-neutral-white);\n font-size: var(--dt-font-size-200);\n\n &--selected {\n margin-bottom: var(--dt-space-500-negative);\n }\n }\n}\n</style>\n"],"names":["IVR_NODE_PROMPT_MENU","IVR_NODE_PROMPT_COLLECT","IVR_NODE_PROMPT_PLAY","IVR_NODE_EXPERT","IVR_NODE_GO_TO","IVR_NODE_BRANCH","IVR_NODE_TRANSFER","IVR_NODE_HANGUP","IVR_NODE_ICON_TYPES","IVR_NODE_LABELS","IVR_NODE_COLORS","IVR_NODE_COLOR_MAPPING","_sfc_main","DtCard","DtButton","DtDropdown","DtIcon","normal","selected"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAY,MAACA,IAAuB,cACvBC,IAA0B,iBAC1BC,IAAuB,cACvBC,IAAkB,cAClBC,IAAiB,QACjBC,IAAkB,UAClBC,IAAoB,YACpBC,IAAkB,UAElBC,IAAsB;AAAA,EACjC,CAACR,CAAoB,GAAG;AAAA,EACxB,CAACC,CAAuB,GAAG;AAAA,EAC3B,CAACC,CAAoB,GAAG;AAAA,EACxB,CAACC,CAAe,GAAG;AAAA,EACnB,CAACE,CAAe,GAAG;AAAA,EACnB,CAACD,CAAc,GAAG;AAAA,EAClB,CAACE,CAAiB,GAAG;AAAA,EACrB,CAACC,CAAe,GAAG;AACrB,GAEaE,IAAkB;AAAA,EAC7B,CAACT,CAAoB,GAAG;AAAA,EACxB,CAACC,CAAuB,GAAG;AAAA,EAC3B,CAACC,CAAoB,GAAG;AAAA,EACxB,CAACC,CAAe,GAAG;AAAA,EACnB,CAACE,CAAe,GAAG;AAAA,EACnB,CAACD,CAAc,GAAG;AAAA,EAClB,CAACE,CAAiB,GAAG;AAAA,EACrB,CAACC,CAAe,GAAG;AACrB,GAEMG,IAAkB;AAAA,EACtB,QAAQ;AAAA,IACN,QAAQ;AAAA,IACR,UAAU;AAAA,EACX;AAAA,EACD,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,UAAU;AAAA,EACX;AAAA,EACD,UAAU;AAAA,IACR,QAAQ;AAAA,IACR,UAAU;AAAA,EACX;AACH,GAEaC,IAAyB;AAAA,EACpC,CAACX,CAAoB,GAAGU,EAAgB;AAAA,EACxC,CAACT,CAAuB,GAAGS,EAAgB;AAAA,EAC3C,CAACR,CAAoB,GAAGQ,EAAgB;AAAA,EACxC,CAACP,CAAe,GAAGO,EAAgB;AAAA,EACnC,CAACL,CAAe,GAAGK,EAAgB;A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@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../chunks/_plugin-vue2_normalizer-ZK80B3OL.js"),i=require("./icon.cjs");require("@dialpad/dialtone-icons/vue2");require("../chunks/icon_constants-2S_OSQ1t.js");require("@dialpad/dialtone-icons/icons.json");const t={"{win}":"layout-grid","{arrow-right}":"arrow-right","{arrow-left}":"arrow-left","{arrow-up}":"arrow-up","{arrow-down}":"arrow-down","{cmd}":"command"},a={"{plus}":"plus"},u=Object.keys(t),d={name:"DtKeyboardShortcut",components:{DtIcon:i.DtIcon},props:{inverted:{type:Boolean,default:!1},shortcut:{type:String,required:!0},screenReaderText:{type:String,default:null}},data(){return{SHORTCUTS_ICON_ALIASES:t,separator:/\+/gi}},computed:{icons(){return{...t,...a}},shortcutWithSeparator(){return this.shortcut.replace(this.separator,"{plus}")},formattedShortcut(){return Object.keys(t).reduce((o,r)=>o.replace(new RegExp("{"+r+"}","gi"),t[r]),this.shortcutWithSeparator)},formattedShortcutSplit(){const o=Object.keys(this.icons).join("|"),r=new RegExp(`(${o})`,"gi");return this.formattedShortcut.split(r).filter(Boolean)}}};var _=function(){var r=this,n=r._self._c;return n("kbd",{class:["d-keyboard-shortcut",{"d-keyboard-shortcut--inverted":r.inverted}]},[r.screenReaderText?n("span",{staticClass:"sr-only"},[r._v(" "+r._s(r.screenReaderText)+" ")]):r._e(),r._l(r.formattedShortcutSplit,function(e,s){return[r.icons[e]?n("dt-icon",{key:`${s}-${e}`,class:["d-keyboard-shortcut__icon",{"d-keyboard-shortcut__icon--inverted":r.inverted}],attrs:{name:r.icons[e],size:"100","aria-hidden":"true"}}):n("span",{key:`${s}-${e}`,class:["d-keyboard-shortcut__item",{"d-keyboard-shortcut__item--inverted":r.inverted}],attrs:{"aria-hidden":"true"},domProps:{innerHTML:r._s(e)}})]})],2)},l=[],S=c.n(d,_,l,!1,null,null,null,null);const p=S.exports;exports.DtKeyboardShortcut=p;exports.SHORTCUTS_ALIASES_LIST=u;exports.SHORTCUTS_ICON_ALIASES=t;exports.SHORTCUTS_ICON_SEPARATOR=a;
2
+ //# sourceMappingURL=keyboard-shortcut.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard-shortcut.cjs","sources":["../../components/keyboard_shortcut/keyboard_shortcut_constants.js","../../components/keyboard_shortcut/keyboard_shortcut.vue"],"sourcesContent":["export const SHORTCUTS_ICON_ALIASES = {\n '{win}': 'layout-grid',\n '{arrow-right}': 'arrow-right',\n '{arrow-left}': 'arrow-left',\n '{arrow-up}': 'arrow-up',\n '{arrow-down}': 'arrow-down',\n '{cmd}': 'command',\n};\n\nexport const SHORTCUTS_ICON_SEPARATOR = {\n '{plus}': 'plus',\n};\n\nexport const SHORTCUTS_ALIASES_LIST = Object.keys(SHORTCUTS_ICON_ALIASES);\n","<!-- eslint-disable vue/no-v-html -->\n<template>\n <kbd\n :class=\"[\n 'd-keyboard-shortcut',\n { 'd-keyboard-shortcut--inverted': inverted },\n ]\"\n >\n <span\n v-if=\"screenReaderText\"\n class=\"sr-only\"\n >\n {{ screenReaderText }}\n </span>\n <template\n v-for=\"(item, i) in formattedShortcutSplit\"\n >\n <dt-icon\n v-if=\"icons[item]\"\n :key=\"`${i}-${item}`\"\n :name=\"icons[item]\"\n size=\"100\"\n aria-hidden=\"true\"\n :class=\"[\n 'd-keyboard-shortcut__icon',\n { 'd-keyboard-shortcut__icon--inverted': inverted },\n ]\"\n />\n <span\n v-else\n :key=\"`${i}-${item}`\"\n aria-hidden=\"true\"\n :class=\"[\n 'd-keyboard-shortcut__item',\n { 'd-keyboard-shortcut__item--inverted': inverted },\n ]\"\n v-html=\"item\"\n />\n </template>\n </kbd>\n</template>\n\n<script>\nimport { DtIcon } from '@/components/icon';\nimport { SHORTCUTS_ICON_ALIASES, SHORTCUTS_ICON_SEPARATOR } from './keyboard_shortcut_constants';\n\n/**\n * This component displays a visual representation of a keyboard shortcut to the user.\n * @see https://dialtone.dialpad.com/components/keyboard_shortcut.html\n */\nexport default {\n name: 'DtKeyboardShortcut',\n\n components: {\n DtIcon,\n },\n\n props: {\n /**\n * If true, applies inverted styles.\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Include any of these tokens in your string to render the corresponding symbol:\n * {cmd} {win} {arrow-right} {arrow-left} {arrow-up} {arrow-down}\n */\n shortcut: {\n type: String,\n required: true,\n },\n\n /**\n * Text entered here will be read by assistive technology. If null this component will be ignored by AT.\n */\n screenReaderText: {\n type: String,\n default: null,\n },\n },\n\n data () {\n return {\n SHORTCUTS_ICON_ALIASES,\n separator: /\\+/gi,\n };\n },\n\n computed: {\n icons () {\n return { ...SHORTCUTS_ICON_ALIASES, ...SHORTCUTS_ICON_SEPARATOR };\n },\n\n shortcutWithSeparator () {\n return this.shortcut.replace(this.separator, '{plus}');\n },\n\n formattedShortcut () {\n return Object.keys(SHORTCUTS_ICON_ALIASES).reduce((result, key) => {\n return result.replace(new RegExp('{' + key + '}', 'gi'), SHORTCUTS_ICON_ALIASES[key]);\n }, this.shortcutWithSeparator);\n },\n\n // Splits any icon based aliases into their own array items.\n formattedShortcutSplit () {\n const iconAliasString = Object.keys(this.icons).join('|');\n\n /*\n The regexp splits a given string with icon alias and is filtered by empty strings after:\n if {win} is our delimiter AKA shortcut icon alias\n '{win} + D K + {win}' returned value will be [{win}, ' ', '{plus}', ' D K ', '{plus}', ' ', {win}]\n */\n const regex = new RegExp(`(${iconAliasString})`, 'gi');\n return this.formattedShortcut.split(regex).filter(Boolean);\n },\n },\n};\n</script>\n"],"names":["SHORTCUTS_ICON_ALIASES","SHORTCUTS_ICON_SEPARATOR","SHORTCUTS_ALIASES_LIST","_sfc_main","DtIcon","result","key","iconAliasString","regex"],"mappings":"+SAAY,MAACA,EAAyB,CACpC,QAAS,cACT,gBAAiB,cACjB,eAAgB,aAChB,aAAc,WACd,eAAgB,aAChB,QAAS,SACX,EAEaC,EAA2B,CACtC,SAAU,MACZ,EAEaC,EAAyB,OAAO,KAAKF,CAAsB,ECqCxEG,EAAA,CACA,KAAA,qBAEA,WAAA,CACA,OAAAC,EAAA,MACA,EAEA,MAAA,CAKA,SAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,SAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,iBAAA,CACA,KAAA,OACA,QAAA,IACA,CACA,EAEA,MAAA,CACA,MAAA,CACA,uBAAAJ,EACA,UAAA,MACA,CACA,EAEA,SAAA,CACA,OAAA,CACA,MAAA,CAAA,GAAAA,EAAA,GAAAC,EACA,EAEA,uBAAA,CACA,OAAA,KAAA,SAAA,QAAA,KAAA,UAAA,QAAA,CACA,EAEA,mBAAA,CACA,OAAA,OAAA,KAAAD,CAAA,EAAA,OAAA,CAAAK,EAAAC,IACAD,EAAA,QAAA,IAAA,OAAA,IAAAC,EAAA,IAAA,IAAA,EAAAN,EAAAM,CAAA,CAAA,EACA,KAAA,qBAAA,CACA,EAGA,wBAAA,CACA,MAAAC,EAAA,OAAA,KAAA,KAAA,KAAA,EAAA,KAAA,GAAA,EAOAC,EAAA,IAAA,OAAA,IAAAD,CAAA,IAAA,IAAA,EACA,OAAA,KAAA,kBAAA,MAAAC,CAAA,EAAA,OAAA,OAAA,CACA,CACA,CACA"}
@@ -3,7 +3,6 @@ import { DtIcon as c } from "./icon.js";
3
3
  import "@dialpad/dialtone-icons/vue2";
4
4
  import "../chunks/icon_constants-OpYAAKwF.js";
5
5
  import "@dialpad/dialtone-icons/icons.json";
6
- import "./skeleton.js";
7
6
  const e = {
8
7
  "{win}": "layout-grid",
9
8
  "{arrow-right}": "arrow-right",
@@ -13,7 +12,7 @@ const e = {
13
12
  "{cmd}": "command"
14
13
  }, i = {
15
14
  "{plus}": "plus"
16
- }, b = Object.keys(e), d = {
15
+ }, y = Object.keys(e), d = {
17
16
  name: "DtKeyboardShortcut",
18
17
  components: {
19
18
  DtIcon: c
@@ -90,10 +89,10 @@ var u = function() {
90
89
  null,
91
90
  null
92
91
  );
93
- const v = p.exports;
92
+ const b = p.exports;
94
93
  export {
95
- v as DtKeyboardShortcut,
96
- b as SHORTCUTS_ALIASES_LIST,
94
+ b as DtKeyboardShortcut,
95
+ y as SHORTCUTS_ALIASES_LIST,
97
96
  e as SHORTCUTS_ICON_ALIASES,
98
97
  i as SHORTCUTS_ICON_SEPARATOR
99
98
  };
@@ -1 +1 @@
1
- {"version":3,"file":"keyboard-shortcut.js","sources":["../../components/keyboard_shortcut/keyboard_shortcut_constants.js","../../components/keyboard_shortcut/keyboard_shortcut.vue"],"sourcesContent":["export const SHORTCUTS_ICON_ALIASES = {\n '{win}': 'layout-grid',\n '{arrow-right}': 'arrow-right',\n '{arrow-left}': 'arrow-left',\n '{arrow-up}': 'arrow-up',\n '{arrow-down}': 'arrow-down',\n '{cmd}': 'command',\n};\n\nexport const SHORTCUTS_ICON_SEPARATOR = {\n '{plus}': 'plus',\n};\n\nexport const SHORTCUTS_ALIASES_LIST = Object.keys(SHORTCUTS_ICON_ALIASES);\n","<!-- eslint-disable vue/no-v-html -->\n<template>\n <kbd\n :class=\"[\n 'd-keyboard-shortcut',\n { 'd-keyboard-shortcut--inverted': inverted },\n ]\"\n >\n <span\n v-if=\"screenReaderText\"\n class=\"sr-only\"\n >\n {{ screenReaderText }}\n </span>\n <template\n v-for=\"(item, i) in formattedShortcutSplit\"\n >\n <dt-icon\n v-if=\"icons[item]\"\n :key=\"`${i}-${item}`\"\n :name=\"icons[item]\"\n size=\"100\"\n aria-hidden=\"true\"\n :class=\"[\n 'd-keyboard-shortcut__icon',\n { 'd-keyboard-shortcut__icon--inverted': inverted },\n ]\"\n />\n <span\n v-else\n :key=\"`${i}-${item}`\"\n aria-hidden=\"true\"\n :class=\"[\n 'd-keyboard-shortcut__item',\n { 'd-keyboard-shortcut__item--inverted': inverted },\n ]\"\n v-html=\"item\"\n />\n </template>\n </kbd>\n</template>\n\n<script>\nimport { DtIcon } from '@/components/icon';\nimport { SHORTCUTS_ICON_ALIASES, SHORTCUTS_ICON_SEPARATOR } from './keyboard_shortcut_constants';\n\n/**\n * This component displays a visual representation of a keyboard shortcut to the user.\n * @see https://dialtone.dialpad.com/components/keyboard_shortcut.html\n */\nexport default {\n name: 'DtKeyboardShortcut',\n\n components: {\n DtIcon,\n },\n\n props: {\n /**\n * If true, applies inverted styles.\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Include any of these tokens in your string to render the corresponding symbol:\n * {cmd} {win} {arrow-right} {arrow-left} {arrow-up} {arrow-down}\n */\n shortcut: {\n type: String,\n required: true,\n },\n\n /**\n * Text entered here will be read by assistive technology. If null this component will be ignored by AT.\n */\n screenReaderText: {\n type: String,\n default: null,\n },\n },\n\n data () {\n return {\n SHORTCUTS_ICON_ALIASES,\n separator: /\\+/gi,\n };\n },\n\n computed: {\n icons () {\n return { ...SHORTCUTS_ICON_ALIASES, ...SHORTCUTS_ICON_SEPARATOR };\n },\n\n shortcutWithSeparator () {\n return this.shortcut.replace(this.separator, '{plus}');\n },\n\n formattedShortcut () {\n return Object.keys(SHORTCUTS_ICON_ALIASES).reduce((result, key) => {\n return result.replace(new RegExp('{' + key + '}', 'gi'), SHORTCUTS_ICON_ALIASES[key]);\n }, this.shortcutWithSeparator);\n },\n\n // Splits any icon based aliases into their own array items.\n formattedShortcutSplit () {\n const iconAliasString = Object.keys(this.icons).join('|');\n\n /*\n The regexp splits a given string with icon alias and is filtered by empty strings after:\n if {win} is our delimiter AKA shortcut icon alias\n '{win} + D K + {win}' returned value will be [{win}, ' ', '{plus}', ' D K ', '{plus}', ' ', {win}]\n */\n const regex = new RegExp(`(${iconAliasString})`, 'gi');\n return this.formattedShortcut.split(regex).filter(Boolean);\n },\n },\n};\n</script>\n"],"names":["SHORTCUTS_ICON_ALIASES","SHORTCUTS_ICON_SEPARATOR","SHORTCUTS_ALIASES_LIST","_sfc_main","DtIcon","result","key","iconAliasString","regex"],"mappings":";;;;;;AAAY,MAACA,IAAyB;AAAA,EACpC,SAAS;AAAA,E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shortcut.js","sources":["../../components/keyboard_shortcut/keyboard_shortcut_constants.js","../../components/keyboard_shortcut/keyboard_shortcut.vue"],"sourcesContent":["export const SHORTCUTS_ICON_ALIASES = {\n '{win}': 'layout-grid',\n '{arrow-right}': 'arrow-right',\n '{arrow-left}': 'arrow-left',\n '{arrow-up}': 'arrow-up',\n '{arrow-down}': 'arrow-down',\n '{cmd}': 'command',\n};\n\nexport const SHORTCUTS_ICON_SEPARATOR = {\n '{plus}': 'plus',\n};\n\nexport const SHORTCUTS_ALIASES_LIST = Object.keys(SHORTCUTS_ICON_ALIASES);\n","<!-- eslint-disable vue/no-v-html -->\n<template>\n <kbd\n :class=\"[\n 'd-keyboard-shortcut',\n { 'd-keyboard-shortcut--inverted': inverted },\n ]\"\n >\n <span\n v-if=\"screenReaderText\"\n class=\"sr-only\"\n >\n {{ screenReaderText }}\n </span>\n <template\n v-for=\"(item, i) in formattedShortcutSplit\"\n >\n <dt-icon\n v-if=\"icons[item]\"\n :key=\"`${i}-${item}`\"\n :name=\"icons[item]\"\n size=\"100\"\n aria-hidden=\"true\"\n :class=\"[\n 'd-keyboard-shortcut__icon',\n { 'd-keyboard-shortcut__icon--inverted': inverted },\n ]\"\n />\n <span\n v-else\n :key=\"`${i}-${item}`\"\n aria-hidden=\"true\"\n :class=\"[\n 'd-keyboard-shortcut__item',\n { 'd-keyboard-shortcut__item--inverted': inverted },\n ]\"\n v-html=\"item\"\n />\n </template>\n </kbd>\n</template>\n\n<script>\nimport { DtIcon } from '@/components/icon';\nimport { SHORTCUTS_ICON_ALIASES, SHORTCUTS_ICON_SEPARATOR } from './keyboard_shortcut_constants';\n\n/**\n * This component displays a visual representation of a keyboard shortcut to the user.\n * @see https://dialtone.dialpad.com/components/keyboard_shortcut.html\n */\nexport default {\n name: 'DtKeyboardShortcut',\n\n components: {\n DtIcon,\n },\n\n props: {\n /**\n * If true, applies inverted styles.\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Include any of these tokens in your string to render the corresponding symbol:\n * {cmd} {win} {arrow-right} {arrow-left} {arrow-up} {arrow-down}\n */\n shortcut: {\n type: String,\n required: true,\n },\n\n /**\n * Text entered here will be read by assistive technology. If null this component will be ignored by AT.\n */\n screenReaderText: {\n type: String,\n default: null,\n },\n },\n\n data () {\n return {\n SHORTCUTS_ICON_ALIASES,\n separator: /\\+/gi,\n };\n },\n\n computed: {\n icons () {\n return { ...SHORTCUTS_ICON_ALIASES, ...SHORTCUTS_ICON_SEPARATOR };\n },\n\n shortcutWithSeparator () {\n return this.shortcut.replace(this.separator, '{plus}');\n },\n\n formattedShortcut () {\n return Object.keys(SHORTCUTS_ICON_ALIASES).reduce((result, key) => {\n return result.replace(new RegExp('{' + key + '}', 'gi'), SHORTCUTS_ICON_ALIASES[key]);\n }, this.shortcutWithSeparator);\n },\n\n // Splits any icon based aliases into their own array items.\n formattedShortcutSplit () {\n const iconAliasString = Object.keys(this.icons).join('|');\n\n /*\n The regexp splits a given string with icon alias and is filtered by empty strings after:\n if {win} is our delimiter AKA shortcut icon alias\n '{win} + D K + {win}' returned value will be [{win}, ' ', '{plus}', ' D K ', '{plus}', ' ', {win}]\n */\n const regex = new RegExp(`(${iconAliasString})`, 'gi');\n return this.formattedShortcut.split(regex).filter(Boolean);\n },\n },\n};\n</script>\n"],"names":["SHORTCUTS_ICON_ALIASES","SHORTCUTS_ICON_SEPARATOR","SHORTCUTS_ALIASES_LIST","_sfc_main","DtIcon","result","key","iconAliasString","regex"],"mappings":";;;;;AAAY,MAACA,IAAyB;AAAA,EACpC,SAAS;AAAA,EACT,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,SAAS;AACX,GAEaC,IAA2B;AAAA,EACtC,UAAU;AACZ,GAEaC,IAAyB,OAAO,KAAKF,CAAsB,GCqCxEG,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,QAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,wBAAAJ;AAAA,MACA,WAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,QAAA;AACA,aAAA,EAAA,GAAAA,GAAA,GAAAC;IACA;AAAA,IAEA,wBAAA;AACA,aAAA,KAAA,SAAA,QAAA,KAAA,WAAA,QAAA;AAAA,IACA;AAAA,IAEA,oBAAA;AACA,aAAA,OAAA,KAAAD,CAAA,EAAA,OAAA,CAAAK,GAAAC,MACAD,EAAA,QAAA,IAAA,OAAA,MAAAC,IAAA,KAAA,IAAA,GAAAN,EAAAM,CAAA,CAAA,GACA,KAAA,qBAAA;AAAA,IACA;AAAA;AAAA,IAGA,yBAAA;AACA,YAAAC,IAAA,OAAA,KAAA,KAAA,KAAA,EAAA,KAAA,GAAA,GAOAC,IAAA,IAAA,OAAA,IAAAD,CAAA,KAAA,IAAA;AACA,aAAA,KAAA,kBAAA,MAAAC,CAAA,EAAA,OAAA,OAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../chunks/_plugin-vue2_normalizer-ZK80B3OL.js"),i={name:"DtLazyShow",props:{show:{type:Boolean,default:!1},transition:{type:String,default:null},appear:{type:Boolean,default:!1}},data(){return{initialized:!!this.show}},computed:{isCSSEnabled(){return process.env.NODE_ENV!=="test"}},watch:{show:function(t){!t||this.initialized||(this.initialized=!0)}}};var s=function(){var e=this,n=e._self._c;return n("transition",e._g({attrs:{name:e.transition,appear:e.appear,css:e.isCSSEnabled}},e.$listeners),[n("div",e._g({directives:[{name:"show",rawName:"v-show",value:e.show,expression:"show"}]},e.$listeners),[e.initialized?e._t("default"):e._e()],2)])},r=[],l=a.n(i,s,r,!1,null,null,null,null);const o=l.exports;exports.DtLazyShow=o;
2
+ //# sourceMappingURL=lazy-show.cjs.map