@dialpad/dialtone 9.123.2 → 9.125.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 (344) hide show
  1. package/README.md +12 -5
  2. package/dist/css/dialtone-default-theme.css +414 -77
  3. package/dist/css/dialtone-default-theme.min.css +1 -1
  4. package/dist/css/dialtone-docs.json +1 -1
  5. package/dist/css/dialtone.css +188 -68
  6. package/dist/css/dialtone.min.css +1 -1
  7. package/dist/css/svg/spot/playlist.svg +1 -0
  8. package/dist/css/vue/spot/SpotPlaylist.vue +3 -0
  9. package/dist/tokens/doc.json +24348 -24348
  10. package/dist/vue2/common/mixins/index.cjs +1 -1
  11. package/dist/vue2/common/mixins/index.js +10 -10
  12. package/dist/vue2/common/mixins/localization.cjs +2 -0
  13. package/dist/vue2/common/mixins/localization.cjs.map +1 -0
  14. package/dist/vue2/common/mixins/localization.js +10 -0
  15. package/dist/vue2/common/mixins/localization.js.map +1 -0
  16. package/dist/vue2/common/utils/index.cjs +1 -1
  17. package/dist/vue2/common/utils/index.cjs.map +1 -1
  18. package/dist/vue2/common/utils/index.js +43 -39
  19. package/dist/vue2/common/utils/index.js.map +1 -1
  20. package/dist/vue2/component-documentation.json +1 -1
  21. package/dist/vue2/dialtone-vue.cjs +1 -1
  22. package/dist/vue2/dialtone-vue.js +341 -340
  23. package/dist/vue2/dialtone-vue.js.map +1 -1
  24. package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  25. package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
  26. package/dist/vue2/lib/attachment-carousel/attachment-carousel.js +61 -86
  27. package/dist/vue2/lib/attachment-carousel/attachment-carousel.js.map +1 -1
  28. package/dist/vue2/lib/banner/banner.cjs +2 -2
  29. package/dist/vue2/lib/banner/banner.cjs.map +1 -1
  30. package/dist/vue2/lib/banner/banner.js +25 -33
  31. package/dist/vue2/lib/banner/banner.js.map +1 -1
  32. package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs +1 -1
  33. package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
  34. package/dist/vue2/lib/breadcrumbs/breadcrumbs.js +14 -12
  35. package/dist/vue2/lib/breadcrumbs/breadcrumbs.js.map +1 -1
  36. package/dist/vue2/lib/button/button.cjs +1 -1
  37. package/dist/vue2/lib/button/button.cjs.map +1 -1
  38. package/dist/vue2/lib/button/button.js +11 -9
  39. package/dist/vue2/lib/button/button.js.map +1 -1
  40. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  41. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
  42. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +19 -25
  43. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  44. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  45. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
  46. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js +18 -21
  47. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  48. package/dist/vue2/lib/chip/chip.cjs +1 -1
  49. package/dist/vue2/lib/chip/chip.cjs.map +1 -1
  50. package/dist/vue2/lib/chip/chip.js +24 -29
  51. package/dist/vue2/lib/chip/chip.js.map +1 -1
  52. package/dist/vue2/lib/combobox/combobox-constants.cjs +1 -1
  53. package/dist/vue2/lib/combobox/combobox-constants.cjs.map +1 -1
  54. package/dist/vue2/lib/combobox/combobox-constants.js +2 -2
  55. package/dist/vue2/lib/combobox/combobox-constants.js.map +1 -1
  56. package/dist/vue2/lib/combobox/combobox-empty-list.cjs.map +1 -1
  57. package/dist/vue2/lib/combobox/combobox-empty-list.js.map +1 -1
  58. package/dist/vue2/lib/combobox/combobox-loading-list.cjs.map +1 -1
  59. package/dist/vue2/lib/combobox/combobox-loading-list.js.map +1 -1
  60. package/dist/vue2/lib/combobox/combobox.cjs +2 -2
  61. package/dist/vue2/lib/combobox/combobox.cjs.map +1 -1
  62. package/dist/vue2/lib/combobox/combobox.js +12 -12
  63. package/dist/vue2/lib/combobox/combobox.js.map +1 -1
  64. package/dist/vue2/lib/combobox/index.cjs +1 -1
  65. package/dist/vue2/lib/combobox/index.js +3 -3
  66. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  67. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  68. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js +19 -20
  69. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  70. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
  71. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
  72. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js +22 -24
  73. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
  74. package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs +1 -1
  75. package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
  76. package/dist/vue2/lib/contact-centers-row/contact-centers-row.js +40 -36
  77. package/dist/vue2/lib/contact-centers-row/contact-centers-row.js.map +1 -1
  78. package/dist/vue2/lib/contact-row/contact-row.cjs +1 -1
  79. package/dist/vue2/lib/contact-row/contact-row.cjs.map +1 -1
  80. package/dist/vue2/lib/contact-row/contact-row.js +11 -25
  81. package/dist/vue2/lib/contact-row/contact-row.js.map +1 -1
  82. package/dist/vue2/lib/datepicker/datepicker-constants.cjs +1 -1
  83. package/dist/vue2/lib/datepicker/datepicker-constants.cjs.map +1 -1
  84. package/dist/vue2/lib/datepicker/datepicker-constants.js +2 -3
  85. package/dist/vue2/lib/datepicker/datepicker-constants.js.map +1 -1
  86. package/dist/vue2/lib/datepicker/datepicker.cjs +1 -1
  87. package/dist/vue2/lib/datepicker/datepicker.cjs.map +1 -1
  88. package/dist/vue2/lib/datepicker/datepicker.js +143 -229
  89. package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
  90. package/dist/vue2/lib/datepicker/utils.cjs +1 -1
  91. package/dist/vue2/lib/datepicker/utils.cjs.map +1 -1
  92. package/dist/vue2/lib/datepicker/utils.js +12 -11
  93. package/dist/vue2/lib/datepicker/utils.js.map +1 -1
  94. package/dist/vue2/lib/description-list/description-list.cjs +1 -1
  95. package/dist/vue2/lib/description-list/description-list.cjs.map +1 -1
  96. package/dist/vue2/lib/description-list/description-list.js +8 -8
  97. package/dist/vue2/lib/description-list/description-list.js.map +1 -1
  98. package/dist/vue2/lib/dropdown/dropdown.cjs +1 -1
  99. package/dist/vue2/lib/dropdown/dropdown.cjs.map +1 -1
  100. package/dist/vue2/lib/dropdown/dropdown.js +48 -50
  101. package/dist/vue2/lib/dropdown/dropdown.js.map +1 -1
  102. package/dist/vue2/lib/editor/editor.cjs +1 -1
  103. package/dist/vue2/lib/editor/editor.cjs.map +1 -1
  104. package/dist/vue2/lib/editor/editor.js +78 -87
  105. package/dist/vue2/lib/editor/editor.js.map +1 -1
  106. package/dist/vue2/lib/emoji-picker/emoji-picker-constants.cjs +1 -1
  107. package/dist/vue2/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
  108. package/dist/vue2/lib/emoji-picker/emoji-picker-constants.js +6 -19
  109. package/dist/vue2/lib/emoji-picker/emoji-picker-constants.js.map +1 -1
  110. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs +1 -1
  111. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  112. package/dist/vue2/lib/emoji-picker/emoji-picker.js +106 -145
  113. package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
  114. package/dist/vue2/lib/emoji-picker/index.cjs +1 -1
  115. package/dist/vue2/lib/emoji-picker/index.js +6 -7
  116. package/dist/vue2/lib/emoji-row/emoji-row-constants.cjs +1 -1
  117. package/dist/vue2/lib/emoji-row/emoji-row-constants.cjs.map +1 -1
  118. package/dist/vue2/lib/emoji-row/emoji-row-constants.js +5 -7
  119. package/dist/vue2/lib/emoji-row/emoji-row-constants.js.map +1 -1
  120. package/dist/vue2/lib/emoji-row/emoji-row.cjs +1 -1
  121. package/dist/vue2/lib/emoji-row/emoji-row.cjs.map +1 -1
  122. package/dist/vue2/lib/emoji-row/emoji-row.js +31 -22
  123. package/dist/vue2/lib/emoji-row/emoji-row.js.map +1 -1
  124. package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs +1 -1
  125. package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
  126. package/dist/vue2/lib/feed-item-pill/feed-item-pill.js +20 -22
  127. package/dist/vue2/lib/feed-item-pill/feed-item-pill.js.map +1 -1
  128. package/dist/vue2/lib/general-row/general-row.cjs +1 -1
  129. package/dist/vue2/lib/general-row/general-row.cjs.map +1 -1
  130. package/dist/vue2/lib/general-row/general-row.js +63 -52
  131. package/dist/vue2/lib/general-row/general-row.js.map +1 -1
  132. package/dist/vue2/lib/group-row/group-row.cjs +1 -1
  133. package/dist/vue2/lib/group-row/group-row.cjs.map +1 -1
  134. package/dist/vue2/lib/group-row/group-row.js +43 -32
  135. package/dist/vue2/lib/group-row/group-row.js.map +1 -1
  136. package/dist/vue2/lib/icon/icon-constants.cjs.map +1 -1
  137. package/dist/vue2/lib/icon/icon-constants.js.map +1 -1
  138. package/dist/vue2/lib/icon/icon.cjs +1 -1
  139. package/dist/vue2/lib/icon/icon.cjs.map +1 -1
  140. package/dist/vue2/lib/icon/icon.js +12 -8
  141. package/dist/vue2/lib/icon/icon.js.map +1 -1
  142. package/dist/vue2/lib/image-viewer/image-viewer.cjs +1 -1
  143. package/dist/vue2/lib/image-viewer/image-viewer.cjs.map +1 -1
  144. package/dist/vue2/lib/image-viewer/image-viewer.js +30 -31
  145. package/dist/vue2/lib/image-viewer/image-viewer.js.map +1 -1
  146. package/dist/vue2/lib/ivr-node/ivr-node-constants.cjs +1 -1
  147. package/dist/vue2/lib/ivr-node/ivr-node-constants.cjs.map +1 -1
  148. package/dist/vue2/lib/ivr-node/ivr-node-constants.js +24 -24
  149. package/dist/vue2/lib/ivr-node/ivr-node-constants.js.map +1 -1
  150. package/dist/vue2/lib/ivr-node/ivr-node.cjs +1 -1
  151. package/dist/vue2/lib/ivr-node/ivr-node.cjs.map +1 -1
  152. package/dist/vue2/lib/ivr-node/ivr-node.js +38 -36
  153. package/dist/vue2/lib/ivr-node/ivr-node.js.map +1 -1
  154. package/dist/vue2/lib/message-input/message-input-link.cjs +1 -1
  155. package/dist/vue2/lib/message-input/message-input-link.cjs.map +1 -1
  156. package/dist/vue2/lib/message-input/message-input-link.js +48 -23
  157. package/dist/vue2/lib/message-input/message-input-link.js.map +1 -1
  158. package/dist/vue2/lib/message-input/message-input-topbar.cjs +1 -1
  159. package/dist/vue2/lib/message-input/message-input-topbar.cjs.map +1 -1
  160. package/dist/vue2/lib/message-input/message-input-topbar.js +50 -22
  161. package/dist/vue2/lib/message-input/message-input-topbar.js.map +1 -1
  162. package/dist/vue2/lib/message-input/message-input.cjs +1 -1
  163. package/dist/vue2/lib/message-input/message-input.cjs.map +1 -1
  164. package/dist/vue2/lib/message-input/message-input.js +112 -143
  165. package/dist/vue2/lib/message-input/message-input.js.map +1 -1
  166. package/dist/vue2/lib/modal/modal.cjs +1 -2
  167. package/dist/vue2/lib/modal/modal.cjs.map +1 -1
  168. package/dist/vue2/lib/modal/modal.js +25 -42
  169. package/dist/vue2/lib/modal/modal.js.map +1 -1
  170. package/dist/vue2/lib/notice/notice-action.cjs +1 -1
  171. package/dist/vue2/lib/notice/notice-action.cjs.map +1 -1
  172. package/dist/vue2/lib/notice/notice-action.js +19 -26
  173. package/dist/vue2/lib/notice/notice-action.js.map +1 -1
  174. package/dist/vue2/lib/notice/notice.cjs +1 -1
  175. package/dist/vue2/lib/notice/notice.cjs.map +1 -1
  176. package/dist/vue2/lib/notice/notice.js +18 -27
  177. package/dist/vue2/lib/notice/notice.js.map +1 -1
  178. package/dist/vue2/lib/pagination/pagination.cjs +1 -1
  179. package/dist/vue2/lib/pagination/pagination.cjs.map +1 -1
  180. package/dist/vue2/lib/pagination/pagination.js +49 -58
  181. package/dist/vue2/lib/pagination/pagination.js.map +1 -1
  182. package/dist/vue2/lib/popover/popover-header-footer.cjs +1 -1
  183. package/dist/vue2/lib/popover/popover-header-footer.cjs.map +1 -1
  184. package/dist/vue2/lib/popover/popover-header-footer.js +24 -26
  185. package/dist/vue2/lib/popover/popover-header-footer.js.map +1 -1
  186. package/dist/vue2/lib/popover/popover.cjs +1 -1
  187. package/dist/vue2/lib/popover/popover.cjs.map +1 -1
  188. package/dist/vue2/lib/popover/popover.js +26 -35
  189. package/dist/vue2/lib/popover/popover.js.map +1 -1
  190. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +5 -5
  191. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  192. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +330 -320
  193. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  194. package/dist/vue2/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
  195. package/dist/vue2/lib/settings-menu-button/settings-menu-button.js.map +1 -1
  196. package/dist/vue2/lib/time-pill/time-pill.cjs.map +1 -1
  197. package/dist/vue2/lib/time-pill/time-pill.js.map +1 -1
  198. package/dist/vue2/lib/toast/toast.cjs +1 -1
  199. package/dist/vue2/lib/toast/toast.cjs.map +1 -1
  200. package/dist/vue2/lib/toast/toast.js +64 -97
  201. package/dist/vue2/lib/toast/toast.js.map +1 -1
  202. package/dist/vue2/lib/unread-pill/unread-pill.cjs +1 -1
  203. package/dist/vue2/lib/unread-pill/unread-pill.cjs.map +1 -1
  204. package/dist/vue2/lib/unread-pill/unread-pill.js +27 -18
  205. package/dist/vue2/lib/unread-pill/unread-pill.js.map +1 -1
  206. package/dist/vue2/localization/en-US.cjs +185 -0
  207. package/dist/vue2/localization/en-US.cjs.map +1 -0
  208. package/dist/vue2/localization/en-US.js +188 -0
  209. package/dist/vue2/localization/en-US.js.map +1 -0
  210. package/dist/vue2/localization/es-LA.cjs +169 -0
  211. package/dist/vue2/localization/es-LA.cjs.map +1 -0
  212. package/dist/vue2/localization/es-LA.js +172 -0
  213. package/dist/vue2/localization/es-LA.js.map +1 -0
  214. package/dist/vue2/localization/index.cjs +1176 -0
  215. package/dist/vue2/localization/index.cjs.map +1 -0
  216. package/dist/vue2/localization/index.js +1239 -0
  217. package/dist/vue2/localization/index.js.map +1 -0
  218. package/dist/vue2/node_modules/@tiptap/vue-2.cjs.map +1 -1
  219. package/dist/vue2/node_modules/@tiptap/vue-2.js.map +1 -1
  220. package/dist/vue2/shared/sr_only_close_button.cjs +1 -1
  221. package/dist/vue2/shared/sr_only_close_button.cjs.map +1 -1
  222. package/dist/vue2/shared/sr_only_close_button.js +19 -22
  223. package/dist/vue2/shared/sr_only_close_button.js.map +1 -1
  224. package/dist/vue2/types/common/mixins/index.d.ts +1 -1
  225. package/dist/vue2/types/common/mixins/localization.d.ts +8 -0
  226. package/dist/vue2/types/common/mixins/localization.d.ts.map +1 -0
  227. package/dist/vue2/types/common/sr_only_close_button.vue.d.ts +7 -13
  228. package/dist/vue2/types/common/sr_only_close_button.vue.d.ts.map +1 -1
  229. package/dist/vue2/types/common/utils/index.d.ts +1 -0
  230. package/dist/vue2/types/common/utils/index.d.ts.map +1 -1
  231. package/dist/vue2/types/components/banner/banner.vue.d.ts +0 -33
  232. package/dist/vue2/types/components/banner/banner.vue.d.ts.map +1 -1
  233. package/dist/vue2/types/components/breadcrumbs/breadcrumbs.vue.d.ts +5 -1
  234. package/dist/vue2/types/components/button/button.vue.d.ts +6 -2
  235. package/dist/vue2/types/components/chip/chip.vue.d.ts +8 -18
  236. package/dist/vue2/types/components/combobox/combobox_constants.d.ts +2 -2
  237. package/dist/vue2/types/components/combobox/index.d.ts +1 -1
  238. package/dist/vue2/types/components/datepicker/datepicker.vue.d.ts.map +1 -1
  239. package/dist/vue2/types/components/datepicker/datepicker_constants.d.ts +0 -1
  240. package/dist/vue2/types/components/datepicker/datepicker_constants.d.ts.map +1 -1
  241. package/dist/vue2/types/components/datepicker/modules/calendar.vue.d.ts +5 -17
  242. package/dist/vue2/types/components/datepicker/modules/month-year-picker.vue.d.ts +8 -48
  243. package/dist/vue2/types/components/datepicker/utils.d.ts +1 -0
  244. package/dist/vue2/types/components/datepicker/utils.d.ts.map +1 -1
  245. package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts +0 -24
  246. package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
  247. package/dist/vue2/types/components/emoji_picker/emoji_picker.vue.d.ts +5 -1
  248. package/dist/vue2/types/components/emoji_picker/emoji_picker_constants.d.ts +0 -13
  249. package/dist/vue2/types/components/icon/icon.vue.d.ts +1 -0
  250. package/dist/vue2/types/components/icon/icon_constants.d.ts.map +1 -1
  251. package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts +5 -8
  252. package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  253. package/dist/vue2/types/components/modal/modal.vue.d.ts +3 -33
  254. package/dist/vue2/types/components/notice/notice.vue.d.ts +1 -34
  255. package/dist/vue2/types/components/notice/notice.vue.d.ts.map +1 -1
  256. package/dist/vue2/types/components/notice/notice_action.vue.d.ts +3 -31
  257. package/dist/vue2/types/components/notice/notice_action.vue.d.ts.map +1 -1
  258. package/dist/vue2/types/components/pagination/pagination.vue.d.ts +9 -26
  259. package/dist/vue2/types/components/pagination/pagination.vue.d.ts.map +1 -1
  260. package/dist/vue2/types/components/popover/popover.vue.d.ts +0 -33
  261. package/dist/vue2/types/components/popover/popover.vue.d.ts.map +1 -1
  262. package/dist/vue2/types/components/popover/popover_header_footer.vue.d.ts +8 -11
  263. package/dist/vue2/types/components/popover/popover_header_footer.vue.d.ts.map +1 -1
  264. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +15 -2
  265. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  266. package/dist/vue2/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +1 -43
  267. package/dist/vue2/types/components/toast/layouts/toast_layout_alternate.vue.d.ts.map +1 -1
  268. package/dist/vue2/types/components/toast/layouts/toast_layout_default.vue.d.ts +1 -34
  269. package/dist/vue2/types/components/toast/layouts/toast_layout_default.vue.d.ts.map +1 -1
  270. package/dist/vue2/types/components/toast/toast.vue.d.ts +3 -111
  271. package/dist/vue2/types/components/toast/toast.vue.d.ts.map +1 -1
  272. package/dist/vue2/types/index.d.ts +1 -0
  273. package/dist/vue2/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +7 -13
  274. package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +7 -12
  275. package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +8 -10
  276. package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  277. package/dist/vue2/types/recipes/cards/ivr_node/ivr_node_constants.d.ts +7 -7
  278. package/dist/vue2/types/recipes/cards/ivr_node/ivr_node_constants.d.ts.map +1 -1
  279. package/dist/vue2/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -25
  280. package/dist/vue2/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts.map +1 -1
  281. package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -25
  282. package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts.map +1 -1
  283. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +5 -41
  284. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  285. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +8 -26
  286. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +2 -2
  287. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +20 -61
  288. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  289. package/dist/vue2/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +6 -1
  290. package/dist/vue2/types/recipes/conversation_view/emoji_row/emoji_row_constants.d.ts.map +1 -1
  291. package/dist/vue2/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +9 -12
  292. package/dist/vue2/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
  293. package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +8 -2
  294. package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
  295. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +15 -90
  296. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  297. package/dist/vue2/types/recipes/conversation_view/message_input/message_input_link.vue.d.ts +14 -2
  298. package/dist/vue2/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +14 -1
  299. package/dist/vue2/types/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
  300. package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +10 -11
  301. package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
  302. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -18
  303. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  304. package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts +21 -37
  305. package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  306. package/dist/vue2/types/recipes/leftbar/group_row/group_row.vue.d.ts +9 -18
  307. package/dist/vue2/types/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
  308. package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +7 -1
  309. package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  310. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  311. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  312. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js +3 -2
  313. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  314. package/package.json +4 -3
  315. package/dist/vue2/common/mixins/sr-only-close-button.cjs +0 -3
  316. package/dist/vue2/common/mixins/sr-only-close-button.cjs.map +0 -1
  317. package/dist/vue2/common/mixins/sr-only-close-button.js +0 -44
  318. package/dist/vue2/common/mixins/sr-only-close-button.js.map +0 -1
  319. package/dist/vue2/lib/contact-row/contact-row-constants.cjs +0 -2
  320. package/dist/vue2/lib/contact-row/contact-row-constants.cjs.map +0 -1
  321. package/dist/vue2/lib/contact-row/contact-row-constants.js +0 -5
  322. package/dist/vue2/lib/contact-row/contact-row-constants.js.map +0 -1
  323. package/dist/vue2/lib/emoji/emoji-constants.cjs +0 -2
  324. package/dist/vue2/lib/emoji/emoji-constants.cjs.map +0 -1
  325. package/dist/vue2/lib/emoji/emoji-constants.js +0 -5
  326. package/dist/vue2/lib/emoji/emoji-constants.js.map +0 -1
  327. package/dist/vue2/lib/group-row/group-row-constants.cjs +0 -2
  328. package/dist/vue2/lib/group-row/group-row-constants.cjs.map +0 -1
  329. package/dist/vue2/lib/group-row/group-row-constants.js +0 -8
  330. package/dist/vue2/lib/group-row/group-row-constants.js.map +0 -1
  331. package/dist/vue2/lib/time-pill/time-pill-constants.cjs +0 -2
  332. package/dist/vue2/lib/time-pill/time-pill-constants.cjs.map +0 -1
  333. package/dist/vue2/lib/time-pill/time-pill-constants.js +0 -8
  334. package/dist/vue2/lib/time-pill/time-pill-constants.js.map +0 -1
  335. package/dist/vue2/types/common/mixins/sr_only_close_button.d.ts +0 -30
  336. package/dist/vue2/types/common/mixins/sr_only_close_button.d.ts.map +0 -1
  337. package/dist/vue2/types/components/emoji/emoji_constants.d.ts +0 -3
  338. package/dist/vue2/types/components/emoji/emoji_constants.d.ts.map +0 -1
  339. package/dist/vue2/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts +0 -6
  340. package/dist/vue2/types/recipes/conversation_view/time_pill/time_pill_constants.d.ts.map +0 -1
  341. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row_constants.d.ts +0 -3
  342. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row_constants.d.ts.map +0 -1
  343. package/dist/vue2/types/recipes/leftbar/group_row/group_row_constants.d.ts +0 -6
  344. package/dist/vue2/types/recipes/leftbar/group_row/group_row_constants.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"dialtone-vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"dialtone-vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("@dialpad/dialtone-icons/vue2"),o=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),l=require("../image-viewer/image-viewer.cjs"),c=require("../button/button.cjs"),n={name:"DtProgressBar",props:{progressbarAriaLabel:{type:String,required:!0},progress:{type:Number,default:20}},data:()=>({circleCircumference:50}),computed:{cssVars(){return{"--stroke-dashoffset":this.circleCircumference-this.circleCircumference*this.progress/100,"--stroke-dasharray":this.circleCircumference}}},mounted(){this.circleCircumference=this.$refs.progressbarCircle.getTotalLength()}};var u=function(){var e=this,t=e._self._c;return t("div",{attrs:{role:"progressbar","aria-label":e.progressbarAriaLabel,tabindex:"-1","aria-valuenow":e.progress,"aria-valuemin":"0","aria-valuemax":"100"}},[t("svg",{staticClass:"d-recipe-attachment-carousel__progress-bar",style:e.cssVars},[t("circle",{ref:"progressbarCircle",staticClass:"d-recipe-attachment-carousel__progress-bar-circle",attrs:{r:"8",cx:"12",cy:"12"}}),t("circle",{staticClass:"d-recipe-attachment-carousel__progress-bar-circle",attrs:{r:"8",cx:"12",cy:"12"}})])])},m=[],d=o.n(n,u,m);const h=d.exports,p={name:"DtImageCarousel",components:{DtImageViewer:l.default,DtButton:c.default,DtIconClose:i.DtIconClose,DtProgressBar:h},props:{mediaItem:{type:Object,required:!0},index:{type:Number,required:!0},closeAriaLabel:{type:String,required:!0},clickToOpenAriaLabel:{type:String,required:!0},progressbarAriaLabel:{type:String,required:!0}},emits:["remove-media"],methods:{removeMediaItem(r){this.$emit("remove-media",r)}}};var _=function(){var e=this,t=e._self._c;return t("li",{staticClass:"d-recipe-attachment-carousel__image"},[t("dt-image-viewer",{attrs:{"image-button-class":"d-recipe-attachment-carousel__image-viewer","image-src":e.mediaItem.path,"image-alt":e.mediaItem.altText,"close-aria-label":e.closeAriaLabel,"aria-label":e.clickToOpenAriaLabel}}),t("div",{staticClass:"d-recipe-attachment-carousel__image-top-right"},[e.mediaItem.isUploading?t("dt-progress-bar",{staticClass:"d-recipe-attachment-carousel__image-progress-bar",attrs:{progress:e.mediaItem.progress,"progressbar-aria-label":e.progressbarAriaLabel}}):e._e(),t("dt-button",{staticClass:"d-recipe-attachment-carousel__image-close-button",attrs:{id:`closeButton-${e.index}`,tabindex:"0",circle:"",size:"xs",importance:"clear","aria-label":e.closeAriaLabel},on:{click:function(a){return e.removeMediaItem(e.index)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("dt-icon-close",{attrs:{size:"200"}})]},proxy:!0}])})],1)],1)},f=[],g=o.n(p,_,f);const b=g.exports,w=64,v={name:"DtRecipeAttachmentCarousel",components:{DtButton:c.default,DtIconArrowRight:i.DtIconArrowRight,DtIconArrowLeft:i.DtIconArrowLeft,DtImageCarousel:b},mixins:[],props:{mediaList:{type:Array,default:()=>[]},closeAriaLabel:{type:String,required:!0},clickToOpenAriaLabel:{type:String,required:!0},progressbarAriaLabel:{type:String,required:!0},leftArrowAriaLabel:{type:String,required:!0},rightArrowAriaLabel:{type:String,required:!0}},emits:["remove-media"],data(){return{showCloseButton:{},showRightArrow:!0,showLeftArrow:!1,isMounted:!1}},computed:{filteredMediaList(){return this.mediaList.filter(r=>r.type==="image"||r.type==="video")}},mounted:function(){this.showLeftArrow=this.$refs.carousel.scrollLeft>0,this.showRightArrow=this.$refs.carousel.scrollWidth>this.$refs.carousel.clientWidth},methods:{onItemFocus(r){r.currentTarget.scrollIntoView({behavior:"smooth"})},mediaComponent(r){switch(r){case"image":return"dt-image-carousel";default:return null}},removeMediaItem(r){this.showRightArrow=this.$refs.carousel.scrollWidth>this.$refs.carousel.clientWidth+w,this.$emit("remove-media",r)},closeButton(r,e){this.showCloseButton[e]=r},handleScroll(){const r=this.$refs.carousel;this.showLeftArrow=r.scrollLeft>0,this.showRightArrow=r.scrollLeft+r.clientWidth!==r.scrollWidth},leftScroll(){this.$refs.carousel.scrollTo({left:this.$refs.carousel.scrollLeft-100,behavior:"smooth"})},rightScroll(){this.$refs.carousel.scrollTo({left:this.$refs.carousel.scrollLeft+100,behavior:"smooth"})}}};var A=function(){var e=this,t=e._self._c;return t("div",{staticClass:"d-recipe-attachment-carousel",attrs:{role:"presentation"}},[e.mediaList.length>0?t("ul",{ref:"carousel",staticClass:"d-recipe-attachment-carousel__media-list",on:{scroll:e.handleScroll}},e._l(e.filteredMediaList,function(a,s){return t(e.mediaComponent(a.type),{key:`media-${s}`,tag:"component",attrs:{index:s,"media-item":a,"close-aria-label":e.closeAriaLabel,"click-to-open-aria-label":e.clickToOpenAriaLabel,"progressbar-aria-label":e.progressbarAriaLabel},on:{"remove-media":function($){return e.removeMediaItem(s)},focusin:e.onItemFocus}})}),1):e._e(),t("dt-button",{directives:[{name:"show",rawName:"v-show",value:e.showLeftArrow,expression:"showLeftArrow"}],staticClass:"d-recipe-attachment-carousel__arrow d-recipe-attachment-carousel__arrow--left",attrs:{tabindex:"-1","aria-label":e.leftArrowAriaLabel,circle:"",size:"xs",importance:"clear"},on:{click:e.leftScroll},scopedSlots:e._u([{key:"icon",fn:function(){return[t("dt-icon-arrow-left",{attrs:{size:"100"}})]},proxy:!0}])}),t("dt-button",{directives:[{name:"show",rawName:"v-show",value:e.showRightArrow,expression:"showRightArrow"}],staticClass:"d-recipe-attachment-carousel__arrow d-recipe-attachment-carousel__arrow--right",attrs:{tabindex:"-1","aria-label":e.rightArrowAriaLabel,circle:"",size:"xs",importance:"clear"},on:{click:e.rightScroll},scopedSlots:e._u([{key:"icon",fn:function(){return[t("dt-icon-arrow-right",{attrs:{size:"100"}})]},proxy:!0}])})],1)},L=[],y=o.n(v,A,L);const C=y.exports;exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("@dialpad/dialtone-icons/vue2"),i=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),l=require("../image-viewer/image-viewer.cjs"),c=require("../button/button.cjs"),n=require("../../common/mixins/localization.cjs"),u={name:"DtProgressBar",props:{ariaLabel:{type:String,required:!0},progress:{type:Number,default:20}},data:()=>({circleCircumference:50}),computed:{cssVars(){return{"--stroke-dashoffset":this.circleCircumference-this.circleCircumference*this.progress/100,"--stroke-dasharray":this.circleCircumference}}},mounted(){this.circleCircumference=this.$refs.progressbarCircle.getTotalLength()}};var m=function(){var e=this,r=e._self._c;return r("div",{attrs:{role:"progressbar","aria-label":e.ariaLabel,tabindex:"-1","aria-valuenow":e.progress,"aria-valuemin":"0","aria-valuemax":"100"}},[r("svg",{staticClass:"d-recipe-attachment-carousel__progress-bar",style:e.cssVars},[r("circle",{ref:"progressbarCircle",staticClass:"d-recipe-attachment-carousel__progress-bar-circle",attrs:{r:"8",cx:"12",cy:"12"}}),r("circle",{staticClass:"d-recipe-attachment-carousel__progress-bar-circle",attrs:{r:"8",cx:"12",cy:"12"}})])])},_=[],d=i.n(u,m,_);const h=d.exports,f={name:"DtImageCarousel",components:{DtImageViewer:l.default,DtButton:c.default,DtIconClose:o.DtIconClose,DtProgressBar:h},mixins:[n.default],props:{mediaItem:{type:Object,required:!0},index:{type:Number,required:!0}},emits:["remove-media"],computed:{closeButtonTitle(){return this.i18n.$t("DIALTONE_CLOSE_BUTTON")}},methods:{removeMediaItem(t){this.$emit("remove-media",t)}}};var p=function(){var e=this,r=e._self._c;return r("li",{staticClass:"d-recipe-attachment-carousel__image"},[r("dt-image-viewer",{attrs:{"image-button-class":"d-recipe-attachment-carousel__image-viewer","image-src":e.mediaItem.path,"image-alt":e.mediaItem.altText,"aria-label":e.i18n.$t("DIALTONE_IMAGE_CAROUSEL_CLICK_TO_OPEN_ARIA_LABEL")}}),r("div",{staticClass:"d-recipe-attachment-carousel__image-top-right"},[e.mediaItem.isUploading?r("dt-progress-bar",{staticClass:"d-recipe-attachment-carousel__image-progress-bar",attrs:{progress:e.mediaItem.progress,"aria-label":e.i18n.$t("DIALTONE_IMAGE_CAROUSEL_PROGRESS_BAR_ARIA_LABEL")}}):e._e(),r("dt-button",{staticClass:"d-recipe-attachment-carousel__image-close-button",attrs:{id:`closeButton-${e.index}`,tabindex:"0",circle:"",size:"xs",importance:"clear","aria-label":e.closeButtonTitle,title:e.closeButtonTitle},on:{click:function(s){return e.removeMediaItem(e.index)}},scopedSlots:e._u([{key:"icon",fn:function(){return[r("dt-icon-close",{attrs:{size:"200"}})]},proxy:!0}])})],1)],1)},g=[],v=i.n(f,p,g);const w=v.exports,A=64,L={name:"DtRecipeAttachmentCarousel",components:{DtButton:c.default,DtIconArrowRight:o.DtIconArrowRight,DtIconArrowLeft:o.DtIconArrowLeft,DtImageCarousel:w},mixins:[n.default],props:{mediaList:{type:Array,default:()=>[]}},emits:["remove-media"],data(){return{showCloseButton:{},showRightArrow:!0,showLeftArrow:!1,isMounted:!1}},computed:{filteredMediaList(){return this.mediaList.filter(t=>t.type==="image"||t.type==="video")}},mounted:function(){this.showLeftArrow=this.$refs.carousel.scrollLeft>0,this.showRightArrow=this.$refs.carousel.scrollWidth>this.$refs.carousel.clientWidth},methods:{onItemFocus(t){t.currentTarget.scrollIntoView({behavior:"smooth"})},mediaComponent(t){switch(t){case"image":return"dt-image-carousel";default:return null}},removeMediaItem(t){this.showRightArrow=this.$refs.carousel.scrollWidth>this.$refs.carousel.clientWidth+A,this.$emit("remove-media",t)},closeButton(t,e){this.showCloseButton[e]=t},handleScroll(){const t=this.$refs.carousel;this.showLeftArrow=t.scrollLeft>0,this.showRightArrow=t.scrollLeft+t.clientWidth!==t.scrollWidth},leftScroll(){this.$refs.carousel.scrollTo({left:this.$refs.carousel.scrollLeft-100,behavior:"smooth"})},rightScroll(){this.$refs.carousel.scrollTo({left:this.$refs.carousel.scrollLeft+100,behavior:"smooth"})}}};var b=function(){var e=this,r=e._self._c;return r("div",{staticClass:"d-recipe-attachment-carousel",attrs:{role:"presentation"}},[e.mediaList.length>0?r("ul",{ref:"carousel",staticClass:"d-recipe-attachment-carousel__media-list",on:{scroll:e.handleScroll}},e._l(e.filteredMediaList,function(s,a){return r(e.mediaComponent(s.type),{key:`media-${a}`,tag:"component",attrs:{index:a,"media-item":s},on:{"remove-media":function(R){return e.removeMediaItem(a)},focusin:e.onItemFocus}})}),1):e._e(),r("dt-button",{directives:[{name:"show",rawName:"v-show",value:e.showLeftArrow,expression:"showLeftArrow"}],staticClass:"d-recipe-attachment-carousel__arrow d-recipe-attachment-carousel__arrow--left",attrs:{tabindex:"-1","aria-label":e.i18n.$t("DIALTONE_ATTACHMENT_CAROUSEL_LEFT_ARROW_ARIA_LABEL"),circle:"",size:"xs",importance:"clear"},on:{click:e.leftScroll},scopedSlots:e._u([{key:"icon",fn:function(){return[r("dt-icon-arrow-left",{attrs:{size:"100"}})]},proxy:!0}])}),r("dt-button",{directives:[{name:"show",rawName:"v-show",value:e.showRightArrow,expression:"showRightArrow"}],staticClass:"d-recipe-attachment-carousel__arrow d-recipe-attachment-carousel__arrow--right",attrs:{tabindex:"-1","aria-label":e.i18n.$t("DIALTONE_ATTACHMENT_CAROUSEL_RIGHT_ARROW_ARIA_LABEL"),circle:"",size:"xs",importance:"clear"},on:{click:e.rightScroll},scopedSlots:e._u([{key:"icon",fn:function(){return[r("dt-icon-arrow-right",{attrs:{size:"100"}})]},proxy:!0}])})],1)},C=[],I=i.n(L,b,C);const $=I.exports;exports.default=$;
2
2
  //# sourceMappingURL=attachment-carousel.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"attachment-carousel.cjs","sources":["../../../recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue","../../../recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue","../../../recipes/conversation_view/attachment_carousel/attachment_carousel.vue"],"sourcesContent":["<script>\nexport default {\n name: 'DtProgressBar',\n props: {\n progressbarAriaLabel: {\n type: String,\n required: true,\n },\n\n progress: {\n type: Number,\n default: 20,\n },\n },\n\n data: () => ({\n circleCircumference: 50,\n }),\n\n computed: {\n cssVars () {\n return {\n '--stroke-dashoffset':\n (this.circleCircumference - (this.circleCircumference * this.progress / 100)),\n\n '--stroke-dasharray': this.circleCircumference,\n };\n },\n },\n\n mounted () {\n this.circleCircumference = this.$refs.progressbarCircle.getTotalLength();\n },\n};\n</script>\n\n<template>\n <div\n role=\"progressbar\"\n :aria-label=\"progressbarAriaLabel\"\n tabindex=\"-1\"\n :aria-valuenow=\"progress\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n >\n <svg\n class=\"d-recipe-attachment-carousel__progress-bar\"\n :style=\"cssVars\"\n >\n <circle\n ref=\"progressbarCircle\"\n r=\"8\"\n cx=\"12\"\n cy=\"12\"\n class=\"d-recipe-attachment-carousel__progress-bar-circle\"\n />\n <circle\n r=\"8\"\n cx=\"12\"\n cy=\"12\"\n class=\"d-recipe-attachment-carousel__progress-bar-circle\"\n />\n </svg>\n </div>\n</template>\n","<template>\n <li\n class=\"d-recipe-attachment-carousel__image\"\n >\n <dt-image-viewer\n image-button-class=\"d-recipe-attachment-carousel__image-viewer\"\n :image-src=\"mediaItem.path\"\n :image-alt=\"mediaItem.altText\"\n :close-aria-label=\"closeAriaLabel\"\n :aria-label=\"clickToOpenAriaLabel\"\n />\n\n <!-- Loader / Close button -->\n <div\n class=\"d-recipe-attachment-carousel__image-top-right\"\n >\n <dt-progress-bar\n v-if=\"mediaItem.isUploading\"\n class=\"d-recipe-attachment-carousel__image-progress-bar\"\n :progress=\"mediaItem.progress\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n />\n <dt-button\n :id=\"`closeButton-${index}`\"\n tabindex=\"0\"\n class=\"d-recipe-attachment-carousel__image-close-button\"\n circle\n size=\"xs\"\n importance=\"clear\"\n :aria-label=\"closeAriaLabel\"\n @click=\"removeMediaItem(index)\"\n >\n <template #icon>\n <dt-icon-close\n size=\"200\"\n />\n </template>\n </dt-button>\n </div>\n </li>\n</template>\n\n<script>\nimport { DtImageViewer } from '@/components/image_viewer';\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue2';\n\nimport DtProgressBar from './progress_bar.vue';\n\nexport default {\n name: 'DtImageCarousel',\n\n components: {\n DtImageViewer,\n DtButton,\n DtIconClose,\n DtProgressBar,\n },\n\n props: {\n mediaItem: {\n type: Object,\n required: true,\n },\n\n index: {\n type: Number,\n required: true,\n },\n\n closeAriaLabel: {\n type: String,\n required: true,\n },\n\n clickToOpenAriaLabel: {\n type: String,\n required: true,\n },\n\n progressbarAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when media close button is clicked to remove the image\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n methods: {\n removeMediaItem (index) {\n this.$emit('remove-media', index);\n },\n },\n};\n</script>\n","<template>\n <div\n class=\"d-recipe-attachment-carousel\"\n role=\"presentation\"\n >\n <ul\n v-if=\"mediaList.length > 0\"\n ref=\"carousel\"\n class=\"d-recipe-attachment-carousel__media-list\"\n @scroll=\"handleScroll\"\n >\n <!-- media list -->\n <component\n :is=\"mediaComponent(mediaItem.type)\"\n v-for=\"(mediaItem, index) in filteredMediaList\"\n :key=\"`media-${index}`\"\n :index=\"index\"\n :media-item=\"mediaItem\"\n :close-aria-label=\"closeAriaLabel\"\n :click-to-open-aria-label=\"clickToOpenAriaLabel\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n @remove-media=\"removeMediaItem(index)\"\n @focusin=\"onItemFocus\"\n />\n </ul>\n\n <!-- Carousel Arrows -->\n <dt-button\n v-show=\"showLeftArrow\"\n tabindex=\"-1\"\n :aria-label=\"leftArrowAriaLabel\"\n class=\"d-recipe-attachment-carousel__arrow d-recipe-attachment-carousel__arrow--left\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"leftScroll\"\n >\n <template #icon>\n <dt-icon-arrow-left\n size=\"100\"\n />\n </template>\n </dt-button>\n <dt-button\n v-show=\"showRightArrow\"\n tabindex=\"-1\"\n :aria-label=\"rightArrowAriaLabel\"\n class=\"d-recipe-attachment-carousel__arrow d-recipe-attachment-carousel__arrow--right\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"rightScroll\"\n >\n <template #icon>\n <dt-icon-arrow-right\n size=\"100\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtIconArrowRight, DtIconArrowLeft } from '@dialpad/dialtone-icons/vue2';\nimport { DtButton } from '@/components/button';\n\nimport DtImageCarousel from './media_components/image_carousel.vue';\n\nconst MEDIA_ITEM_WIDTH = 64;\n\nexport default {\n name: 'DtRecipeAttachmentCarousel',\n\n components: {\n DtButton,\n DtIconArrowRight,\n DtIconArrowLeft,\n DtImageCarousel,\n },\n\n mixins: [],\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n // inheritAttrs: false,\n\n props: {\n /**\n * media - object array of media objects\n * @type {Array}\n *\n * Object: {\n * path: String,\n * altText: String | null,\n * }\n */\n mediaList: {\n type: Array,\n default: () => [],\n },\n\n closeAriaLabel: {\n type: String,\n required: true,\n },\n\n clickToOpenAriaLabel: {\n type: String,\n required: true,\n },\n\n progressbarAriaLabel: {\n type: String,\n required: true,\n },\n\n leftArrowAriaLabel: {\n type: String,\n required: true,\n },\n\n rightArrowAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n data () {\n return {\n showCloseButton: {},\n showRightArrow: true,\n showLeftArrow: false,\n isMounted: false,\n };\n },\n\n computed: {\n filteredMediaList () {\n return this.mediaList.filter((mediaItem) => mediaItem.type === 'image' || mediaItem.type === 'video');\n },\n },\n\n mounted: function () {\n this.showLeftArrow = this.$refs.carousel.scrollLeft > 0;\n this.showRightArrow = this.$refs.carousel.scrollWidth > this.$refs.carousel.clientWidth;\n },\n\n methods: {\n onItemFocus (e) {\n e.currentTarget.scrollIntoView({ behavior: 'smooth' });\n },\n\n mediaComponent (type) {\n switch (type) {\n case 'image':\n return 'dt-image-carousel';\n default:\n // unknown media type\n return null;\n }\n },\n\n removeMediaItem (index) {\n // make sure the carousel arrows is updated. 64 is the width of each media item\n this.showRightArrow = this.$refs.carousel.scrollWidth > (this.$refs.carousel.clientWidth + MEDIA_ITEM_WIDTH);\n this.$emit('remove-media', index);\n },\n\n closeButton (val, index) {\n this.showCloseButton[index] = val;\n },\n\n handleScroll () {\n const carousel = this.$refs.carousel;\n this.showLeftArrow = carousel.scrollLeft > 0;\n this.showRightArrow = !((carousel.scrollLeft + carousel.clientWidth) === carousel.scrollWidth);\n },\n\n leftScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft - 100,\n behavior: 'smooth',\n });\n },\n\n rightScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft + 100,\n behavior: 'smooth',\n });\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtImageViewer","DtButton","DtIconClose","DtProgressBar","index","MEDIA_ITEM_WIDTH","DtIconArrowRight","DtIconArrowLeft","DtImageCarousel","mediaItem","e","type","val","carousel"],"mappings":"oSACAA,EAAA,CACA,KAAA,gBACA,MAAA,CACA,qBAAA,CACA,KAAA,OACA,SAAA,EACA,EAEA,SAAA,CACA,KAAA,OACA,QAAA,EACA,CACA,EAEA,KAAA,KAAA,CACA,oBAAA,EACA,GAEA,SAAA,CACA,SAAA,CACA,MAAA,CACA,sBACA,KAAA,oBAAA,KAAA,oBAAA,KAAA,SAAA,IAEA,qBAAA,KAAA,mBACA,CACA,CACA,EAEA,SAAA,CACA,KAAA,oBAAA,KAAA,MAAA,kBAAA,eAAA,CACA,CACA,4jBCgBAA,EAAA,CACA,KAAA,kBAEA,WAAA,CACA,cAAAC,EAAA,QACA,SAAAC,EAAA,QACA,YAAAC,EAAA,YACA,cAAAC,CACA,EAEA,MAAA,CACA,UAAA,CACA,KAAA,OACA,SAAA,EACA,EAEA,MAAA,CACA,KAAA,OACA,SAAA,EACA,EAEA,eAAA,CACA,KAAA,OACA,SAAA,EACA,EAEA,qBAAA,CACA,KAAA,OACA,SAAA,EACA,EAEA,qBAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,EAEA,MAAA,CAOA,cACA,EAEA,QAAA,CACA,gBAAAC,EAAA,CACA,KAAA,MAAA,eAAAA,CAAA,CACA,CACA,CACA,4/BCjCAC,EAAA,GAEAN,EAAA,CACA,KAAA,6BAEA,WAAA,CACA,SAAAE,EAAA,QACA,iBAAAK,EAAA,iBACA,gBAAAC,EAAA,gBACA,gBAAAC,CACA,EAEA,OAAA,CAAA,EAQA,MAAA,CAUA,UAAA,CACA,KAAA,MACA,QAAA,IAAA,CAAA,CACA,EAEA,eAAA,CACA,KAAA,OACA,SAAA,EACA,EAEA,qBAAA,CACA,KAAA,OACA,SAAA,EACA,EAEA,qBAAA,CACA,KAAA,OACA,SAAA,EACA,EAEA,mBAAA,CACA,KAAA,OACA,SAAA,EACA,EAEA,oBAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,EAEA,MAAA,CAOA,cACA,EAEA,MAAA,CACA,MAAA,CACA,gBAAA,CAAA,EACA,eAAA,GACA,cAAA,GACA,UAAA,EACA,CACA,EAEA,SAAA,CACA,mBAAA,CACA,OAAA,KAAA,UAAA,OAAAC,GAAAA,EAAA,OAAA,SAAAA,EAAA,OAAA,OAAA,CACA,CACA,EAEA,QAAA,UAAA,CACA,KAAA,cAAA,KAAA,MAAA,SAAA,WAAA,EACA,KAAA,eAAA,KAAA,MAAA,SAAA,YAAA,KAAA,MAAA,SAAA,WACA,EAEA,QAAA,CACA,YAAAC,EAAA,CACAA,EAAA,cAAA,eAAA,CAAA,SAAA,QAAA,CAAA,CACA,EAEA,eAAAC,EAAA,CACA,OAAAA,EAAA,CACA,IAAA,QACA,MAAA,oBACA,QAEA,OAAA,IACA,CACA,EAEA,gBAAAP,EAAA,CAEA,KAAA,eAAA,KAAA,MAAA,SAAA,YAAA,KAAA,MAAA,SAAA,YAAAC,EACA,KAAA,MAAA,eAAAD,CAAA,CACA,EAEA,YAAAQ,EAAAR,EAAA,CACA,KAAA,gBAAAA,CAAA,EAAAQ,CACA,EAEA,cAAA,CACA,MAAAC,EAAA,KAAA,MAAA,SACA,KAAA,cAAAA,EAAA,WAAA,EACA,KAAA,eAAAA,EAAA,WAAAA,EAAA,cAAAA,EAAA,WACA,EAEA,YAAA,CACA,KAAA,MAAA,SAAA,SAAA,CACA,KAAA,KAAA,MAAA,SAAA,WAAA,IACA,SAAA,QACA,CAAA,CACA,EAEA,aAAA,CACA,KAAA,MAAA,SAAA,SAAA,CACA,KAAA,KAAA,MAAA,SAAA,WAAA,IACA,SAAA,QACA,CAAA,CACA,CACA,CACA"}
1
+ {"version":3,"file":"attachment-carousel.cjs","sources":["../../../recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue","../../../recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue","../../../recipes/conversation_view/attachment_carousel/attachment_carousel.vue"],"sourcesContent":["<script>\nexport default {\n name: 'DtProgressBar',\n props: {\n ariaLabel: {\n type: String,\n required: true,\n },\n\n progress: {\n type: Number,\n default: 20,\n },\n },\n\n data: () => ({\n circleCircumference: 50,\n }),\n\n computed: {\n cssVars () {\n return {\n '--stroke-dashoffset':\n (this.circleCircumference - (this.circleCircumference * this.progress / 100)),\n\n '--stroke-dasharray': this.circleCircumference,\n };\n },\n },\n\n mounted () {\n this.circleCircumference = this.$refs.progressbarCircle.getTotalLength();\n },\n};\n</script>\n\n<template>\n <div\n role=\"progressbar\"\n :aria-label=\"ariaLabel\"\n tabindex=\"-1\"\n :aria-valuenow=\"progress\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n >\n <svg\n class=\"d-recipe-attachment-carousel__progress-bar\"\n :style=\"cssVars\"\n >\n <circle\n ref=\"progressbarCircle\"\n r=\"8\"\n cx=\"12\"\n cy=\"12\"\n class=\"d-recipe-attachment-carousel__progress-bar-circle\"\n />\n <circle\n r=\"8\"\n cx=\"12\"\n cy=\"12\"\n class=\"d-recipe-attachment-carousel__progress-bar-circle\"\n />\n </svg>\n </div>\n</template>\n","<template>\n <li\n class=\"d-recipe-attachment-carousel__image\"\n >\n <dt-image-viewer\n image-button-class=\"d-recipe-attachment-carousel__image-viewer\"\n :image-src=\"mediaItem.path\"\n :image-alt=\"mediaItem.altText\"\n :aria-label=\"i18n.$t('DIALTONE_IMAGE_CAROUSEL_CLICK_TO_OPEN_ARIA_LABEL')\"\n />\n\n <!-- Loader / Close button -->\n <div\n class=\"d-recipe-attachment-carousel__image-top-right\"\n >\n <dt-progress-bar\n v-if=\"mediaItem.isUploading\"\n class=\"d-recipe-attachment-carousel__image-progress-bar\"\n :progress=\"mediaItem.progress\"\n :aria-label=\"i18n.$t('DIALTONE_IMAGE_CAROUSEL_PROGRESS_BAR_ARIA_LABEL')\"\n />\n <dt-button\n :id=\"`closeButton-${index}`\"\n tabindex=\"0\"\n class=\"d-recipe-attachment-carousel__image-close-button\"\n circle\n size=\"xs\"\n importance=\"clear\"\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"removeMediaItem(index)\"\n >\n <template #icon>\n <dt-icon-close\n size=\"200\"\n />\n </template>\n </dt-button>\n </div>\n </li>\n</template>\n\n<script>\nimport { DtImageViewer } from '@/components/image_viewer';\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue2';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nimport DtProgressBar from './progress_bar.vue';\n\nexport default {\n name: 'DtImageCarousel',\n\n components: {\n DtImageViewer,\n DtButton,\n DtIconClose,\n DtProgressBar,\n },\n\n mixins: [DtLocalizationMixin],\n\n props: {\n mediaItem: {\n type: Object,\n required: true,\n },\n\n index: {\n type: Number,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when media close button is clicked to remove the image\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n computed: {\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n methods: {\n removeMediaItem (index) {\n this.$emit('remove-media', index);\n },\n },\n};\n</script>\n","<template>\n <div\n class=\"d-recipe-attachment-carousel\"\n role=\"presentation\"\n >\n <ul\n v-if=\"mediaList.length > 0\"\n ref=\"carousel\"\n class=\"d-recipe-attachment-carousel__media-list\"\n @scroll=\"handleScroll\"\n >\n <!-- media list -->\n <component\n :is=\"mediaComponent(mediaItem.type)\"\n v-for=\"(mediaItem, index) in filteredMediaList\"\n :key=\"`media-${index}`\"\n :index=\"index\"\n :media-item=\"mediaItem\"\n @remove-media=\"removeMediaItem(index)\"\n @focusin=\"onItemFocus\"\n />\n </ul>\n\n <!-- Carousel Arrows -->\n <dt-button\n v-show=\"showLeftArrow\"\n tabindex=\"-1\"\n :aria-label=\"i18n.$t('DIALTONE_ATTACHMENT_CAROUSEL_LEFT_ARROW_ARIA_LABEL')\"\n class=\"d-recipe-attachment-carousel__arrow d-recipe-attachment-carousel__arrow--left\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"leftScroll\"\n >\n <template #icon>\n <dt-icon-arrow-left\n size=\"100\"\n />\n </template>\n </dt-button>\n <dt-button\n v-show=\"showRightArrow\"\n tabindex=\"-1\"\n :aria-label=\"i18n.$t('DIALTONE_ATTACHMENT_CAROUSEL_RIGHT_ARROW_ARIA_LABEL')\"\n class=\"d-recipe-attachment-carousel__arrow d-recipe-attachment-carousel__arrow--right\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"rightScroll\"\n >\n <template #icon>\n <dt-icon-arrow-right\n size=\"100\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtIconArrowRight, DtIconArrowLeft } from '@dialpad/dialtone-icons/vue2';\nimport { DtButton } from '@/components/button';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nimport DtImageCarousel from './media_components/image_carousel.vue';\n\nconst MEDIA_ITEM_WIDTH = 64;\n\nexport default {\n name: 'DtRecipeAttachmentCarousel',\n\n components: {\n DtButton,\n DtIconArrowRight,\n DtIconArrowLeft,\n DtImageCarousel,\n },\n\n mixins: [DtLocalizationMixin],\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n // inheritAttrs: false,\n\n props: {\n /**\n * media - object array of media objects\n * @type {Array}\n *\n * Object: {\n * path: String,\n * altText: String | null,\n * }\n */\n mediaList: {\n type: Array,\n default: () => [],\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n data () {\n return {\n showCloseButton: {},\n showRightArrow: true,\n showLeftArrow: false,\n isMounted: false,\n };\n },\n\n computed: {\n filteredMediaList () {\n return this.mediaList.filter((mediaItem) => mediaItem.type === 'image' || mediaItem.type === 'video');\n },\n },\n\n mounted: function () {\n this.showLeftArrow = this.$refs.carousel.scrollLeft > 0;\n this.showRightArrow = this.$refs.carousel.scrollWidth > this.$refs.carousel.clientWidth;\n },\n\n methods: {\n onItemFocus (e) {\n e.currentTarget.scrollIntoView({ behavior: 'smooth' });\n },\n\n mediaComponent (type) {\n switch (type) {\n case 'image':\n return 'dt-image-carousel';\n default:\n // unknown media type\n return null;\n }\n },\n\n removeMediaItem (index) {\n // make sure the carousel arrows is updated. 64 is the width of each media item\n this.showRightArrow = this.$refs.carousel.scrollWidth > (this.$refs.carousel.clientWidth + MEDIA_ITEM_WIDTH);\n this.$emit('remove-media', index);\n },\n\n closeButton (val, index) {\n this.showCloseButton[index] = val;\n },\n\n handleScroll () {\n const carousel = this.$refs.carousel;\n this.showLeftArrow = carousel.scrollLeft > 0;\n this.showRightArrow = !((carousel.scrollLeft + carousel.clientWidth) === carousel.scrollWidth);\n },\n\n leftScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft - 100,\n behavior: 'smooth',\n });\n },\n\n rightScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft + 100,\n behavior: 'smooth',\n });\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtImageViewer","DtButton","DtIconClose","DtProgressBar","DtLocalizationMixin","index","MEDIA_ITEM_WIDTH","DtIconArrowRight","DtIconArrowLeft","DtImageCarousel","mediaItem","e","type","val","carousel"],"mappings":"sVACAA,EAAA,CACA,KAAA,gBACA,MAAA,CACA,UAAA,CACA,KAAA,OACA,SAAA,EACA,EAEA,SAAA,CACA,KAAA,OACA,QAAA,EACA,CACA,EAEA,KAAA,KAAA,CACA,oBAAA,EACA,GAEA,SAAA,CACA,SAAA,CACA,MAAA,CACA,sBACA,KAAA,oBAAA,KAAA,oBAAA,KAAA,SAAA,IAEA,qBAAA,KAAA,mBACA,CACA,CACA,EAEA,SAAA,CACA,KAAA,oBAAA,KAAA,MAAA,kBAAA,eAAA,CACA,CACA,ijBCiBAA,EAAA,CACA,KAAA,kBAEA,WAAA,CACA,cAAAC,EAAA,QACA,SAAAC,EAAA,QACA,YAAAC,EAAA,YACA,cAAAC,CACA,EAEA,OAAA,CAAAC,EAAAA,OAAA,EAEA,MAAA,CACA,UAAA,CACA,KAAA,OACA,SAAA,EACA,EAEA,MAAA,CACA,KAAA,OACA,SAAA,EACA,CACA,EAEA,MAAA,CAOA,cACA,EAEA,SAAA,CACA,kBAAA,CACA,OAAA,KAAA,KAAA,GAAA,uBAAA,CACA,CACA,EAEA,QAAA,CACA,gBAAAC,EAAA,CACA,KAAA,MAAA,eAAAA,CAAA,CACA,CACA,CACA,ojCC7BAC,EAAA,GAEAP,EAAA,CACA,KAAA,6BAEA,WAAA,CACA,SAAAE,EAAA,QACA,iBAAAM,EAAA,iBACA,gBAAAC,EAAA,gBACA,gBAAAC,CACA,EAEA,OAAA,CAAAL,EAAAA,OAAA,EAQA,MAAA,CAUA,UAAA,CACA,KAAA,MACA,QAAA,IAAA,CAAA,CACA,CACA,EAEA,MAAA,CAOA,cACA,EAEA,MAAA,CACA,MAAA,CACA,gBAAA,CAAA,EACA,eAAA,GACA,cAAA,GACA,UAAA,EACA,CACA,EAEA,SAAA,CACA,mBAAA,CACA,OAAA,KAAA,UAAA,OAAAM,GAAAA,EAAA,OAAA,SAAAA,EAAA,OAAA,OAAA,CACA,CACA,EAEA,QAAA,UAAA,CACA,KAAA,cAAA,KAAA,MAAA,SAAA,WAAA,EACA,KAAA,eAAA,KAAA,MAAA,SAAA,YAAA,KAAA,MAAA,SAAA,WACA,EAEA,QAAA,CACA,YAAAC,EAAA,CACAA,EAAA,cAAA,eAAA,CAAA,SAAA,QAAA,CAAA,CACA,EAEA,eAAAC,EAAA,CACA,OAAAA,EAAA,CACA,IAAA,QACA,MAAA,oBACA,QAEA,OAAA,IACA,CACA,EAEA,gBAAAP,EAAA,CAEA,KAAA,eAAA,KAAA,MAAA,SAAA,YAAA,KAAA,MAAA,SAAA,YAAAC,EACA,KAAA,MAAA,eAAAD,CAAA,CACA,EAEA,YAAAQ,EAAAR,EAAA,CACA,KAAA,gBAAAA,CAAA,EAAAQ,CACA,EAEA,cAAA,CACA,MAAAC,EAAA,KAAA,MAAA,SACA,KAAA,cAAAA,EAAA,WAAA,EACA,KAAA,eAAAA,EAAA,WAAAA,EAAA,cAAAA,EAAA,WACA,EAEA,YAAA,CACA,KAAA,MAAA,SAAA,SAAA,CACA,KAAA,KAAA,MAAA,SAAA,WAAA,IACA,SAAA,QACA,CAAA,CACA,EAEA,aAAA,CACA,KAAA,MAAA,SAAA,SAAA,CACA,KAAA,KAAA,MAAA,SAAA,WAAA,IACA,SAAA,QACA,CAAA,CACA,CACA,CACA"}
@@ -1,11 +1,12 @@
1
- import { DtIconClose as c, DtIconArrowRight as l, DtIconArrowLeft as n } from "@dialpad/dialtone-icons/vue2";
2
- import { n as i } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
3
- import m from "../image-viewer/image-viewer.js";
4
- import o from "../button/button.js";
5
- const u = {
1
+ import { DtIconClose as n, DtIconArrowRight as l, DtIconArrowLeft as m } from "@dialpad/dialtone-icons/vue2";
2
+ import { n as o } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
3
+ import u from "../image-viewer/image-viewer.js";
4
+ import i from "../button/button.js";
5
+ import c from "../../common/mixins/localization.js";
6
+ const _ = {
6
7
  name: "DtProgressBar",
7
8
  props: {
8
- progressbarAriaLabel: {
9
+ ariaLabel: {
9
10
  type: String,
10
11
  required: !0
11
12
  },
@@ -30,21 +31,22 @@ const u = {
30
31
  }
31
32
  };
32
33
  var d = function() {
33
- var e = this, t = e._self._c;
34
- return t("div", { attrs: { role: "progressbar", "aria-label": e.progressbarAriaLabel, tabindex: "-1", "aria-valuenow": e.progress, "aria-valuemin": "0", "aria-valuemax": "100" } }, [t("svg", { staticClass: "d-recipe-attachment-carousel__progress-bar", style: e.cssVars }, [t("circle", { ref: "progressbarCircle", staticClass: "d-recipe-attachment-carousel__progress-bar-circle", attrs: { r: "8", cx: "12", cy: "12" } }), t("circle", { staticClass: "d-recipe-attachment-carousel__progress-bar-circle", attrs: { r: "8", cx: "12", cy: "12" } })])]);
35
- }, h = [], p = /* @__PURE__ */ i(
36
- u,
34
+ var e = this, r = e._self._c;
35
+ return r("div", { attrs: { role: "progressbar", "aria-label": e.ariaLabel, tabindex: "-1", "aria-valuenow": e.progress, "aria-valuemin": "0", "aria-valuemax": "100" } }, [r("svg", { staticClass: "d-recipe-attachment-carousel__progress-bar", style: e.cssVars }, [r("circle", { ref: "progressbarCircle", staticClass: "d-recipe-attachment-carousel__progress-bar-circle", attrs: { r: "8", cx: "12", cy: "12" } }), r("circle", { staticClass: "d-recipe-attachment-carousel__progress-bar-circle", attrs: { r: "8", cx: "12", cy: "12" } })])]);
36
+ }, h = [], p = /* @__PURE__ */ o(
37
+ _,
37
38
  d,
38
39
  h
39
40
  );
40
- const f = p.exports, _ = {
41
+ const f = p.exports, g = {
41
42
  name: "DtImageCarousel",
42
43
  components: {
43
- DtImageViewer: m,
44
- DtButton: o,
45
- DtIconClose: c,
44
+ DtImageViewer: u,
45
+ DtButton: i,
46
+ DtIconClose: n,
46
47
  DtProgressBar: f
47
48
  },
49
+ mixins: [c],
48
50
  props: {
49
51
  mediaItem: {
50
52
  type: Object,
@@ -53,18 +55,6 @@ const f = p.exports, _ = {
53
55
  index: {
54
56
  type: Number,
55
57
  required: !0
56
- },
57
- closeAriaLabel: {
58
- type: String,
59
- required: !0
60
- },
61
- clickToOpenAriaLabel: {
62
- type: String,
63
- required: !0
64
- },
65
- progressbarAriaLabel: {
66
- type: String,
67
- required: !0
68
58
  }
69
59
  },
70
60
  emits: [
@@ -76,33 +66,38 @@ const f = p.exports, _ = {
76
66
  */
77
67
  "remove-media"
78
68
  ],
69
+ computed: {
70
+ closeButtonTitle() {
71
+ return this.i18n.$t("DIALTONE_CLOSE_BUTTON");
72
+ }
73
+ },
79
74
  methods: {
80
- removeMediaItem(r) {
81
- this.$emit("remove-media", r);
75
+ removeMediaItem(t) {
76
+ this.$emit("remove-media", t);
82
77
  }
83
78
  }
84
79
  };
85
- var g = function() {
86
- var e = this, t = e._self._c;
87
- return t("li", { staticClass: "d-recipe-attachment-carousel__image" }, [t("dt-image-viewer", { attrs: { "image-button-class": "d-recipe-attachment-carousel__image-viewer", "image-src": e.mediaItem.path, "image-alt": e.mediaItem.altText, "close-aria-label": e.closeAriaLabel, "aria-label": e.clickToOpenAriaLabel } }), t("div", { staticClass: "d-recipe-attachment-carousel__image-top-right" }, [e.mediaItem.isUploading ? t("dt-progress-bar", { staticClass: "d-recipe-attachment-carousel__image-progress-bar", attrs: { progress: e.mediaItem.progress, "progressbar-aria-label": e.progressbarAriaLabel } }) : e._e(), t("dt-button", { staticClass: "d-recipe-attachment-carousel__image-close-button", attrs: { id: `closeButton-${e.index}`, tabindex: "0", circle: "", size: "xs", importance: "clear", "aria-label": e.closeAriaLabel }, on: { click: function(a) {
80
+ var A = function() {
81
+ var e = this, r = e._self._c;
82
+ return r("li", { staticClass: "d-recipe-attachment-carousel__image" }, [r("dt-image-viewer", { attrs: { "image-button-class": "d-recipe-attachment-carousel__image-viewer", "image-src": e.mediaItem.path, "image-alt": e.mediaItem.altText, "aria-label": e.i18n.$t("DIALTONE_IMAGE_CAROUSEL_CLICK_TO_OPEN_ARIA_LABEL") } }), r("div", { staticClass: "d-recipe-attachment-carousel__image-top-right" }, [e.mediaItem.isUploading ? r("dt-progress-bar", { staticClass: "d-recipe-attachment-carousel__image-progress-bar", attrs: { progress: e.mediaItem.progress, "aria-label": e.i18n.$t("DIALTONE_IMAGE_CAROUSEL_PROGRESS_BAR_ARIA_LABEL") } }) : e._e(), r("dt-button", { staticClass: "d-recipe-attachment-carousel__image-close-button", attrs: { id: `closeButton-${e.index}`, tabindex: "0", circle: "", size: "xs", importance: "clear", "aria-label": e.closeButtonTitle, title: e.closeButtonTitle }, on: { click: function(s) {
88
83
  return e.removeMediaItem(e.index);
89
84
  } }, scopedSlots: e._u([{ key: "icon", fn: function() {
90
- return [t("dt-icon-close", { attrs: { size: "200" } })];
85
+ return [r("dt-icon-close", { attrs: { size: "200" } })];
91
86
  }, proxy: !0 }]) })], 1)], 1);
92
- }, b = [], w = /* @__PURE__ */ i(
93
- _,
87
+ }, v = [], w = /* @__PURE__ */ o(
94
88
  g,
95
- b
89
+ A,
90
+ v
96
91
  );
97
- const v = w.exports, A = 64, L = {
92
+ const L = w.exports, C = 64, I = {
98
93
  name: "DtRecipeAttachmentCarousel",
99
94
  components: {
100
- DtButton: o,
95
+ DtButton: i,
101
96
  DtIconArrowRight: l,
102
- DtIconArrowLeft: n,
103
- DtImageCarousel: v
97
+ DtIconArrowLeft: m,
98
+ DtImageCarousel: L
104
99
  },
105
- mixins: [],
100
+ mixins: [c],
106
101
  /* inheritAttrs: false is generally an option we want to set on library
107
102
  components. This allows any attributes passed in that are not recognized
108
103
  as props to be passed down to another element or component using v-bind:$attrs
@@ -121,26 +116,6 @@ const v = w.exports, A = 64, L = {
121
116
  mediaList: {
122
117
  type: Array,
123
118
  default: () => []
124
- },
125
- closeAriaLabel: {
126
- type: String,
127
- required: !0
128
- },
129
- clickToOpenAriaLabel: {
130
- type: String,
131
- required: !0
132
- },
133
- progressbarAriaLabel: {
134
- type: String,
135
- required: !0
136
- },
137
- leftArrowAriaLabel: {
138
- type: String,
139
- required: !0
140
- },
141
- rightArrowAriaLabel: {
142
- type: String,
143
- required: !0
144
119
  }
145
120
  },
146
121
  emits: [
@@ -162,33 +137,33 @@ const v = w.exports, A = 64, L = {
162
137
  },
163
138
  computed: {
164
139
  filteredMediaList() {
165
- return this.mediaList.filter((r) => r.type === "image" || r.type === "video");
140
+ return this.mediaList.filter((t) => t.type === "image" || t.type === "video");
166
141
  }
167
142
  },
168
143
  mounted: function() {
169
144
  this.showLeftArrow = this.$refs.carousel.scrollLeft > 0, this.showRightArrow = this.$refs.carousel.scrollWidth > this.$refs.carousel.clientWidth;
170
145
  },
171
146
  methods: {
172
- onItemFocus(r) {
173
- r.currentTarget.scrollIntoView({ behavior: "smooth" });
147
+ onItemFocus(t) {
148
+ t.currentTarget.scrollIntoView({ behavior: "smooth" });
174
149
  },
175
- mediaComponent(r) {
176
- switch (r) {
150
+ mediaComponent(t) {
151
+ switch (t) {
177
152
  case "image":
178
153
  return "dt-image-carousel";
179
154
  default:
180
155
  return null;
181
156
  }
182
157
  },
183
- removeMediaItem(r) {
184
- this.showRightArrow = this.$refs.carousel.scrollWidth > this.$refs.carousel.clientWidth + A, this.$emit("remove-media", r);
158
+ removeMediaItem(t) {
159
+ this.showRightArrow = this.$refs.carousel.scrollWidth > this.$refs.carousel.clientWidth + C, this.$emit("remove-media", t);
185
160
  },
186
- closeButton(r, e) {
187
- this.showCloseButton[e] = r;
161
+ closeButton(t, e) {
162
+ this.showCloseButton[e] = t;
188
163
  },
189
164
  handleScroll() {
190
- const r = this.$refs.carousel;
191
- this.showLeftArrow = r.scrollLeft > 0, this.showRightArrow = r.scrollLeft + r.clientWidth !== r.scrollWidth;
165
+ const t = this.$refs.carousel;
166
+ this.showLeftArrow = t.scrollLeft > 0, this.showRightArrow = t.scrollLeft + t.clientWidth !== t.scrollWidth;
192
167
  },
193
168
  leftScroll() {
194
169
  this.$refs.carousel.scrollTo({
@@ -204,24 +179,24 @@ const v = w.exports, A = 64, L = {
204
179
  }
205
180
  }
206
181
  };
207
- var y = function() {
208
- var e = this, t = e._self._c;
209
- return t("div", { staticClass: "d-recipe-attachment-carousel", attrs: { role: "presentation" } }, [e.mediaList.length > 0 ? t("ul", { ref: "carousel", staticClass: "d-recipe-attachment-carousel__media-list", on: { scroll: e.handleScroll } }, e._l(e.filteredMediaList, function(a, s) {
210
- return t(e.mediaComponent(a.type), { key: `media-${s}`, tag: "component", attrs: { index: s, "media-item": a, "close-aria-label": e.closeAriaLabel, "click-to-open-aria-label": e.clickToOpenAriaLabel, "progressbar-aria-label": e.progressbarAriaLabel }, on: { "remove-media": function(x) {
211
- return e.removeMediaItem(s);
182
+ var b = function() {
183
+ var e = this, r = e._self._c;
184
+ return r("div", { staticClass: "d-recipe-attachment-carousel", attrs: { role: "presentation" } }, [e.mediaList.length > 0 ? r("ul", { ref: "carousel", staticClass: "d-recipe-attachment-carousel__media-list", on: { scroll: e.handleScroll } }, e._l(e.filteredMediaList, function(s, a) {
185
+ return r(e.mediaComponent(s.type), { key: `media-${a}`, tag: "component", attrs: { index: a, "media-item": s }, on: { "remove-media": function(T) {
186
+ return e.removeMediaItem(a);
212
187
  }, focusin: e.onItemFocus } });
213
- }), 1) : e._e(), t("dt-button", { directives: [{ name: "show", rawName: "v-show", value: e.showLeftArrow, expression: "showLeftArrow" }], staticClass: "d-recipe-attachment-carousel__arrow d-recipe-attachment-carousel__arrow--left", attrs: { tabindex: "-1", "aria-label": e.leftArrowAriaLabel, circle: "", size: "xs", importance: "clear" }, on: { click: e.leftScroll }, scopedSlots: e._u([{ key: "icon", fn: function() {
214
- return [t("dt-icon-arrow-left", { attrs: { size: "100" } })];
215
- }, proxy: !0 }]) }), t("dt-button", { directives: [{ name: "show", rawName: "v-show", value: e.showRightArrow, expression: "showRightArrow" }], staticClass: "d-recipe-attachment-carousel__arrow d-recipe-attachment-carousel__arrow--right", attrs: { tabindex: "-1", "aria-label": e.rightArrowAriaLabel, circle: "", size: "xs", importance: "clear" }, on: { click: e.rightScroll }, scopedSlots: e._u([{ key: "icon", fn: function() {
216
- return [t("dt-icon-arrow-right", { attrs: { size: "100" } })];
188
+ }), 1) : e._e(), r("dt-button", { directives: [{ name: "show", rawName: "v-show", value: e.showLeftArrow, expression: "showLeftArrow" }], staticClass: "d-recipe-attachment-carousel__arrow d-recipe-attachment-carousel__arrow--left", attrs: { tabindex: "-1", "aria-label": e.i18n.$t("DIALTONE_ATTACHMENT_CAROUSEL_LEFT_ARROW_ARIA_LABEL"), circle: "", size: "xs", importance: "clear" }, on: { click: e.leftScroll }, scopedSlots: e._u([{ key: "icon", fn: function() {
189
+ return [r("dt-icon-arrow-left", { attrs: { size: "100" } })];
190
+ }, proxy: !0 }]) }), r("dt-button", { directives: [{ name: "show", rawName: "v-show", value: e.showRightArrow, expression: "showRightArrow" }], staticClass: "d-recipe-attachment-carousel__arrow d-recipe-attachment-carousel__arrow--right", attrs: { tabindex: "-1", "aria-label": e.i18n.$t("DIALTONE_ATTACHMENT_CAROUSEL_RIGHT_ARROW_ARIA_LABEL"), circle: "", size: "xs", importance: "clear" }, on: { click: e.rightScroll }, scopedSlots: e._u([{ key: "icon", fn: function() {
191
+ return [r("dt-icon-arrow-right", { attrs: { size: "100" } })];
217
192
  }, proxy: !0 }]) })], 1);
218
- }, C = [], $ = /* @__PURE__ */ i(
219
- L,
220
- y,
221
- C
193
+ }, $ = [], R = /* @__PURE__ */ o(
194
+ I,
195
+ b,
196
+ $
222
197
  );
223
- const q = $.exports;
198
+ const S = R.exports;
224
199
  export {
225
- q as default
200
+ S as default
226
201
  };
227
202
  //# sourceMappingURL=attachment-carousel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"attachment-carousel.js","sources":["../../../recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue","../../../recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue","../../../recipes/conversation_view/attachment_carousel/attachment_carousel.vue"],"sourcesContent":["<script>\nexport default {\n name: 'DtProgressBar',\n props: {\n progressbarAriaLabel: {\n type: String,\n required: true,\n },\n\n progress: {\n type: Number,\n default: 20,\n },\n },\n\n data: () => ({\n circleCircumference: 50,\n }),\n\n computed: {\n cssVars () {\n return {\n '--stroke-dashoffset':\n (this.circleCircumference - (this.circleCircumference * this.progress / 100)),\n\n '--stroke-dasharray': this.circleCircumference,\n };\n },\n },\n\n mounted () {\n this.circleCircumference = this.$refs.progressbarCircle.getTotalLength();\n },\n};\n</script>\n\n<template>\n <div\n role=\"progressbar\"\n :aria-label=\"progressbarAriaLabel\"\n tabindex=\"-1\"\n :aria-valuenow=\"progress\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n >\n <svg\n class=\"d-recipe-attachment-carousel__progress-bar\"\n :style=\"cssVars\"\n >\n <circle\n ref=\"progressbarCircle\"\n r=\"8\"\n cx=\"12\"\n cy=\"12\"\n class=\"d-recipe-attachment-carousel__progress-bar-circle\"\n />\n <circle\n r=\"8\"\n cx=\"12\"\n cy=\"12\"\n class=\"d-recipe-attachment-carousel__progress-bar-circle\"\n />\n </svg>\n </div>\n</template>\n","<template>\n <li\n class=\"d-recipe-attachment-carousel__image\"\n >\n <dt-image-viewer\n image-button-class=\"d-recipe-attachment-carousel__image-viewer\"\n :image-src=\"mediaItem.path\"\n :image-alt=\"mediaItem.altText\"\n :close-aria-label=\"closeAriaLabel\"\n :aria-label=\"clickToOpenAriaLabel\"\n />\n\n <!-- Loader / Close button -->\n <div\n class=\"d-recipe-attachment-carousel__image-top-right\"\n >\n <dt-progress-bar\n v-if=\"mediaItem.isUploading\"\n class=\"d-recipe-attachment-carousel__image-progress-bar\"\n :progress=\"mediaItem.progress\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n />\n <dt-button\n :id=\"`closeButton-${index}`\"\n tabindex=\"0\"\n class=\"d-recipe-attachment-carousel__image-close-button\"\n circle\n size=\"xs\"\n importance=\"clear\"\n :aria-label=\"closeAriaLabel\"\n @click=\"removeMediaItem(index)\"\n >\n <template #icon>\n <dt-icon-close\n size=\"200\"\n />\n </template>\n </dt-button>\n </div>\n </li>\n</template>\n\n<script>\nimport { DtImageViewer } from '@/components/image_viewer';\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue2';\n\nimport DtProgressBar from './progress_bar.vue';\n\nexport default {\n name: 'DtImageCarousel',\n\n components: {\n DtImageViewer,\n DtButton,\n DtIconClose,\n DtProgressBar,\n },\n\n props: {\n mediaItem: {\n type: Object,\n required: true,\n },\n\n index: {\n type: Number,\n required: true,\n },\n\n closeAriaLabel: {\n type: String,\n required: true,\n },\n\n clickToOpenAriaLabel: {\n type: String,\n required: true,\n },\n\n progressbarAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when media close button is clicked to remove the image\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n methods: {\n removeMediaItem (index) {\n this.$emit('remove-media', index);\n },\n },\n};\n</script>\n","<template>\n <div\n class=\"d-recipe-attachment-carousel\"\n role=\"presentation\"\n >\n <ul\n v-if=\"mediaList.length > 0\"\n ref=\"carousel\"\n class=\"d-recipe-attachment-carousel__media-list\"\n @scroll=\"handleScroll\"\n >\n <!-- media list -->\n <component\n :is=\"mediaComponent(mediaItem.type)\"\n v-for=\"(mediaItem, index) in filteredMediaList\"\n :key=\"`media-${index}`\"\n :index=\"index\"\n :media-item=\"mediaItem\"\n :close-aria-label=\"closeAriaLabel\"\n :click-to-open-aria-label=\"clickToOpenAriaLabel\"\n :progressbar-aria-label=\"progressbarAriaLabel\"\n @remove-media=\"removeMediaItem(index)\"\n @focusin=\"onItemFocus\"\n />\n </ul>\n\n <!-- Carousel Arrows -->\n <dt-button\n v-show=\"showLeftArrow\"\n tabindex=\"-1\"\n :aria-label=\"leftArrowAriaLabel\"\n class=\"d-recipe-attachment-carousel__arrow d-recipe-attachment-carousel__arrow--left\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"leftScroll\"\n >\n <template #icon>\n <dt-icon-arrow-left\n size=\"100\"\n />\n </template>\n </dt-button>\n <dt-button\n v-show=\"showRightArrow\"\n tabindex=\"-1\"\n :aria-label=\"rightArrowAriaLabel\"\n class=\"d-recipe-attachment-carousel__arrow d-recipe-attachment-carousel__arrow--right\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"rightScroll\"\n >\n <template #icon>\n <dt-icon-arrow-right\n size=\"100\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtIconArrowRight, DtIconArrowLeft } from '@dialpad/dialtone-icons/vue2';\nimport { DtButton } from '@/components/button';\n\nimport DtImageCarousel from './media_components/image_carousel.vue';\n\nconst MEDIA_ITEM_WIDTH = 64;\n\nexport default {\n name: 'DtRecipeAttachmentCarousel',\n\n components: {\n DtButton,\n DtIconArrowRight,\n DtIconArrowLeft,\n DtImageCarousel,\n },\n\n mixins: [],\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n // inheritAttrs: false,\n\n props: {\n /**\n * media - object array of media objects\n * @type {Array}\n *\n * Object: {\n * path: String,\n * altText: String | null,\n * }\n */\n mediaList: {\n type: Array,\n default: () => [],\n },\n\n closeAriaLabel: {\n type: String,\n required: true,\n },\n\n clickToOpenAriaLabel: {\n type: String,\n required: true,\n },\n\n progressbarAriaLabel: {\n type: String,\n required: true,\n },\n\n leftArrowAriaLabel: {\n type: String,\n required: true,\n },\n\n rightArrowAriaLabel: {\n type: String,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n data () {\n return {\n showCloseButton: {},\n showRightArrow: true,\n showLeftArrow: false,\n isMounted: false,\n };\n },\n\n computed: {\n filteredMediaList () {\n return this.mediaList.filter((mediaItem) => mediaItem.type === 'image' || mediaItem.type === 'video');\n },\n },\n\n mounted: function () {\n this.showLeftArrow = this.$refs.carousel.scrollLeft > 0;\n this.showRightArrow = this.$refs.carousel.scrollWidth > this.$refs.carousel.clientWidth;\n },\n\n methods: {\n onItemFocus (e) {\n e.currentTarget.scrollIntoView({ behavior: 'smooth' });\n },\n\n mediaComponent (type) {\n switch (type) {\n case 'image':\n return 'dt-image-carousel';\n default:\n // unknown media type\n return null;\n }\n },\n\n removeMediaItem (index) {\n // make sure the carousel arrows is updated. 64 is the width of each media item\n this.showRightArrow = this.$refs.carousel.scrollWidth > (this.$refs.carousel.clientWidth + MEDIA_ITEM_WIDTH);\n this.$emit('remove-media', index);\n },\n\n closeButton (val, index) {\n this.showCloseButton[index] = val;\n },\n\n handleScroll () {\n const carousel = this.$refs.carousel;\n this.showLeftArrow = carousel.scrollLeft > 0;\n this.showRightArrow = !((carousel.scrollLeft + carousel.clientWidth) === carousel.scrollWidth);\n },\n\n leftScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft - 100,\n behavior: 'smooth',\n });\n },\n\n rightScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft + 100,\n behavior: 'smooth',\n });\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtImageViewer","DtButton","DtIconClose","DtProgressBar","index","MEDIA_ITEM_WIDTH","DtIconArrowRight","DtIconArrowLeft","DtImageCarousel","mediaItem","e","type","val","carousel"],"mappings":"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"}
1
+ {"version":3,"file":"attachment-carousel.js","sources":["../../../recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue","../../../recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue","../../../recipes/conversation_view/attachment_carousel/attachment_carousel.vue"],"sourcesContent":["<script>\nexport default {\n name: 'DtProgressBar',\n props: {\n ariaLabel: {\n type: String,\n required: true,\n },\n\n progress: {\n type: Number,\n default: 20,\n },\n },\n\n data: () => ({\n circleCircumference: 50,\n }),\n\n computed: {\n cssVars () {\n return {\n '--stroke-dashoffset':\n (this.circleCircumference - (this.circleCircumference * this.progress / 100)),\n\n '--stroke-dasharray': this.circleCircumference,\n };\n },\n },\n\n mounted () {\n this.circleCircumference = this.$refs.progressbarCircle.getTotalLength();\n },\n};\n</script>\n\n<template>\n <div\n role=\"progressbar\"\n :aria-label=\"ariaLabel\"\n tabindex=\"-1\"\n :aria-valuenow=\"progress\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n >\n <svg\n class=\"d-recipe-attachment-carousel__progress-bar\"\n :style=\"cssVars\"\n >\n <circle\n ref=\"progressbarCircle\"\n r=\"8\"\n cx=\"12\"\n cy=\"12\"\n class=\"d-recipe-attachment-carousel__progress-bar-circle\"\n />\n <circle\n r=\"8\"\n cx=\"12\"\n cy=\"12\"\n class=\"d-recipe-attachment-carousel__progress-bar-circle\"\n />\n </svg>\n </div>\n</template>\n","<template>\n <li\n class=\"d-recipe-attachment-carousel__image\"\n >\n <dt-image-viewer\n image-button-class=\"d-recipe-attachment-carousel__image-viewer\"\n :image-src=\"mediaItem.path\"\n :image-alt=\"mediaItem.altText\"\n :aria-label=\"i18n.$t('DIALTONE_IMAGE_CAROUSEL_CLICK_TO_OPEN_ARIA_LABEL')\"\n />\n\n <!-- Loader / Close button -->\n <div\n class=\"d-recipe-attachment-carousel__image-top-right\"\n >\n <dt-progress-bar\n v-if=\"mediaItem.isUploading\"\n class=\"d-recipe-attachment-carousel__image-progress-bar\"\n :progress=\"mediaItem.progress\"\n :aria-label=\"i18n.$t('DIALTONE_IMAGE_CAROUSEL_PROGRESS_BAR_ARIA_LABEL')\"\n />\n <dt-button\n :id=\"`closeButton-${index}`\"\n tabindex=\"0\"\n class=\"d-recipe-attachment-carousel__image-close-button\"\n circle\n size=\"xs\"\n importance=\"clear\"\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"removeMediaItem(index)\"\n >\n <template #icon>\n <dt-icon-close\n size=\"200\"\n />\n </template>\n </dt-button>\n </div>\n </li>\n</template>\n\n<script>\nimport { DtImageViewer } from '@/components/image_viewer';\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue2';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nimport DtProgressBar from './progress_bar.vue';\n\nexport default {\n name: 'DtImageCarousel',\n\n components: {\n DtImageViewer,\n DtButton,\n DtIconClose,\n DtProgressBar,\n },\n\n mixins: [DtLocalizationMixin],\n\n props: {\n mediaItem: {\n type: Object,\n required: true,\n },\n\n index: {\n type: Number,\n required: true,\n },\n },\n\n emits: [\n /**\n * Emitted when media close button is clicked to remove the image\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n computed: {\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n methods: {\n removeMediaItem (index) {\n this.$emit('remove-media', index);\n },\n },\n};\n</script>\n","<template>\n <div\n class=\"d-recipe-attachment-carousel\"\n role=\"presentation\"\n >\n <ul\n v-if=\"mediaList.length > 0\"\n ref=\"carousel\"\n class=\"d-recipe-attachment-carousel__media-list\"\n @scroll=\"handleScroll\"\n >\n <!-- media list -->\n <component\n :is=\"mediaComponent(mediaItem.type)\"\n v-for=\"(mediaItem, index) in filteredMediaList\"\n :key=\"`media-${index}`\"\n :index=\"index\"\n :media-item=\"mediaItem\"\n @remove-media=\"removeMediaItem(index)\"\n @focusin=\"onItemFocus\"\n />\n </ul>\n\n <!-- Carousel Arrows -->\n <dt-button\n v-show=\"showLeftArrow\"\n tabindex=\"-1\"\n :aria-label=\"i18n.$t('DIALTONE_ATTACHMENT_CAROUSEL_LEFT_ARROW_ARIA_LABEL')\"\n class=\"d-recipe-attachment-carousel__arrow d-recipe-attachment-carousel__arrow--left\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"leftScroll\"\n >\n <template #icon>\n <dt-icon-arrow-left\n size=\"100\"\n />\n </template>\n </dt-button>\n <dt-button\n v-show=\"showRightArrow\"\n tabindex=\"-1\"\n :aria-label=\"i18n.$t('DIALTONE_ATTACHMENT_CAROUSEL_RIGHT_ARROW_ARIA_LABEL')\"\n class=\"d-recipe-attachment-carousel__arrow d-recipe-attachment-carousel__arrow--right\"\n circle\n size=\"xs\"\n importance=\"clear\"\n @click=\"rightScroll\"\n >\n <template #icon>\n <dt-icon-arrow-right\n size=\"100\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtIconArrowRight, DtIconArrowLeft } from '@dialpad/dialtone-icons/vue2';\nimport { DtButton } from '@/components/button';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nimport DtImageCarousel from './media_components/image_carousel.vue';\n\nconst MEDIA_ITEM_WIDTH = 64;\n\nexport default {\n name: 'DtRecipeAttachmentCarousel',\n\n components: {\n DtButton,\n DtIconArrowRight,\n DtIconArrowLeft,\n DtImageCarousel,\n },\n\n mixins: [DtLocalizationMixin],\n\n /* inheritAttrs: false is generally an option we want to set on library\n components. This allows any attributes passed in that are not recognized\n as props to be passed down to another element or component using v-bind:$attrs\n more info: https://vuejs.org/v2/api/#inheritAttrs */\n // inheritAttrs: false,\n\n props: {\n /**\n * media - object array of media objects\n * @type {Array}\n *\n * Object: {\n * path: String,\n * altText: String | null,\n * }\n */\n mediaList: {\n type: Array,\n default: () => [],\n },\n },\n\n emits: [\n /**\n * Emitted when popover is shown or hidden\n *\n * @event remove-media\n * @type {Number}\n */\n 'remove-media',\n ],\n\n data () {\n return {\n showCloseButton: {},\n showRightArrow: true,\n showLeftArrow: false,\n isMounted: false,\n };\n },\n\n computed: {\n filteredMediaList () {\n return this.mediaList.filter((mediaItem) => mediaItem.type === 'image' || mediaItem.type === 'video');\n },\n },\n\n mounted: function () {\n this.showLeftArrow = this.$refs.carousel.scrollLeft > 0;\n this.showRightArrow = this.$refs.carousel.scrollWidth > this.$refs.carousel.clientWidth;\n },\n\n methods: {\n onItemFocus (e) {\n e.currentTarget.scrollIntoView({ behavior: 'smooth' });\n },\n\n mediaComponent (type) {\n switch (type) {\n case 'image':\n return 'dt-image-carousel';\n default:\n // unknown media type\n return null;\n }\n },\n\n removeMediaItem (index) {\n // make sure the carousel arrows is updated. 64 is the width of each media item\n this.showRightArrow = this.$refs.carousel.scrollWidth > (this.$refs.carousel.clientWidth + MEDIA_ITEM_WIDTH);\n this.$emit('remove-media', index);\n },\n\n closeButton (val, index) {\n this.showCloseButton[index] = val;\n },\n\n handleScroll () {\n const carousel = this.$refs.carousel;\n this.showLeftArrow = carousel.scrollLeft > 0;\n this.showRightArrow = !((carousel.scrollLeft + carousel.clientWidth) === carousel.scrollWidth);\n },\n\n leftScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft - 100,\n behavior: 'smooth',\n });\n },\n\n rightScroll () {\n this.$refs.carousel.scrollTo({\n left: this.$refs.carousel.scrollLeft + 100,\n behavior: 'smooth',\n });\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtImageViewer","DtButton","DtIconClose","DtProgressBar","DtLocalizationMixin","index","MEDIA_ITEM_WIDTH","DtIconArrowRight","DtIconArrowLeft","DtImageCarousel","mediaItem","e","type","val","carousel"],"mappings":"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"}
@@ -1,3 +1,3 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("../../common/mixins/modal.cjs"),o=require("../../common/utils/index.cjs"),a=require("../../common/mixins/sr-only-close-button.cjs"),s=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),l=require("../notice/notice-icon.cjs"),d=require("../notice/notice-content.cjs"),c=require("../notice/notice-action.cjs"),u=require("../notice/notice-constants.cjs"),f={name:"DtBanner",components:{DtNoticeIcon:l.default,DtNoticeContent:d.default,DtNoticeAction:c.default},mixins:[r.default,a.default],props:{titleId:{type:String,default(){return o.default.getUniqueString()}},contentId:{type:String,default(){return o.default.getUniqueString()}},title:{type:String,default:""},important:{type:Boolean,default:!1},pinned:{type:Boolean,default:!1},kind:{type:String,default:"base",validate(t){return u.NOTICE_KINDS.includes(t)}},closeButtonProps:{type:Object,default:()=>({})},hideClose:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1},hideAction:{type:Boolean,default:!1},dialogClass:{type:String,default:""},backgroundImage:{type:String,default:""},backgroundSize:{type:String,default:"cover"}},emits:["close"],computed:{role(){return this.important?"alertdialog":"status"},bannerClass(){return["d-banner",{error:"d-banner--error",info:"d-banner--info",success:"d-banner--success",warning:"d-banner--warning",base:"d-banner--base"}[this.kind],{"d-banner--important":this.important,"d-banner--pinned":this.pinned}]},bannerBackgroundImage(){return this.backgroundImage===""?null:`background-image: url(${this.backgroundImage});
2
- background-size: ${this.backgroundSize};`}},mounted(){this.important&&this.focusFirstElement()},methods:{trapFocus(t){this.important&&this.focusTrappedTabPress(t)}}};var _=function(){var e=this,n=e._self._c;return n("aside",{class:e.bannerClass,style:e.bannerBackgroundImage,on:{keydown:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"tab",9,i.key,"Tab")?null:e.trapFocus.apply(null,arguments)}}},[n("div",{staticClass:"d-banner__dialog",class:e.dialogClass,attrs:{role:e.role,"aria-labelledby":e.titleId,"aria-describedby":e.contentId}},[e.hideIcon?e._e():n("dt-notice-icon",e._g({attrs:{kind:e.kind}},e.$listeners),[e._t("icon")],2),n("dt-notice-content",e._g({attrs:{"title-id":e.titleId,"content-id":e.contentId,title:e.title},scopedSlots:e._u([{key:"titleOverride",fn:function(){return[e._t("titleOverride")]},proxy:!0}],null,!0)},e.$listeners),[e._t("default")],2),n("dt-notice-action",e._g({attrs:{"hide-action":e.hideAction,"hide-close":e.hideClose,"close-button-props":e.closeButtonProps,"visually-hidden-close":e.visuallyHiddenClose,"visually-hidden-close-label":e.visuallyHiddenCloseLabel}},e.$listeners),[e._t("action")],2)],1)])},p=[],b=s.n(f,_,p);const g=b.exports;exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../common/mixins/modal.cjs"),r=require("../../common/utils/index.cjs"),o=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),s=require("../notice/notice-icon.cjs"),d=require("../notice/notice-content.cjs"),l=require("../notice/notice-action.cjs"),c=require("../notice/notice-constants.cjs"),u={name:"DtBanner",components:{DtNoticeIcon:s.default,DtNoticeContent:d.default,DtNoticeAction:l.default},mixins:[a.default],props:{titleId:{type:String,default(){return r.default.getUniqueString()}},contentId:{type:String,default(){return r.default.getUniqueString()}},title:{type:String,default:""},important:{type:Boolean,default:!1},pinned:{type:Boolean,default:!1},kind:{type:String,default:"base",validate(t){return c.NOTICE_KINDS.includes(t)}},hideClose:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1},hideAction:{type:Boolean,default:!1},dialogClass:{type:String,default:""},backgroundImage:{type:String,default:""},backgroundSize:{type:String,default:"cover"}},emits:["close"],computed:{role(){return this.important?"alertdialog":"status"},bannerClass(){return["d-banner",{error:"d-banner--error",info:"d-banner--info",success:"d-banner--success",warning:"d-banner--warning",base:"d-banner--base"}[this.kind],{"d-banner--important":this.important,"d-banner--pinned":this.pinned}]},bannerBackgroundImage(){return this.backgroundImage===""?null:`background-image: url(${this.backgroundImage});
2
+ background-size: ${this.backgroundSize};`}},mounted(){this.important&&this.focusFirstElement()},methods:{trapFocus(t){this.important&&this.focusTrappedTabPress(t)}}};var f=function(){var e=this,n=e._self._c;return n("aside",{class:e.bannerClass,style:e.bannerBackgroundImage,on:{keydown:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"tab",9,i.key,"Tab")?null:e.trapFocus.apply(null,arguments)}}},[n("div",{staticClass:"d-banner__dialog",class:e.dialogClass,attrs:{role:e.role,"aria-labelledby":e.titleId,"aria-describedby":e.contentId}},[e.hideIcon?e._e():n("dt-notice-icon",e._g({attrs:{kind:e.kind}},e.$listeners),[e._t("icon")],2),n("dt-notice-content",e._g({attrs:{"title-id":e.titleId,"content-id":e.contentId,title:e.title},scopedSlots:e._u([{key:"titleOverride",fn:function(){return[e._t("titleOverride")]},proxy:!0}],null,!0)},e.$listeners),[e._t("default")],2),n("dt-notice-action",e._g({attrs:{"hide-action":e.hideAction,"hide-close":e.hideClose}},e.$listeners),[e._t("action")],2)],1)])},_=[],g=o.n(u,f,_);const p=g.exports;exports.default=p;
3
3
  //# sourceMappingURL=banner.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"banner.cjs","sources":["../../../components/banner/banner.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/no-static-element-interactions -->\n<template>\n <aside\n :class=\"bannerClass\"\n :style=\"bannerBackgroundImage\"\n @keydown.tab=\"trapFocus\"\n >\n <div\n class=\"d-banner__dialog\"\n :class=\"dialogClass\"\n :role=\"role\"\n :aria-labelledby=\"titleId\"\n :aria-describedby=\"contentId\"\n >\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-on=\"$listeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- eslint-disable-next-line max-len -->\n <!-- @slot Allows you to override the title, only use this if you need to override with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the banner -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n :close-button-props=\"closeButtonProps\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n v-on=\"$listeners\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </aside>\n</template>\n\n<script>\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport Modal from '@/common/mixins/modal';\nimport utils from '@/common/utils';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\n/**\n * Banners are a type of notice, delivering system and engagement messaging.\n * These are highly intrusive notices and should be used sparingly and appropriately.\n * @see https://dialtone.dialpad.com/components/banner.html\n */\nexport default {\n name: 'DtBanner',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n mixins: [Modal, SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the notice. This can be left blank to remove the title from the notice entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * This will also change the aria role from status to alertdialog.\n * and will modally trap the keyboard focus in the dialog as soon as it displays.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Pins the banner to the top of the window and pushes all app content down.\n * @values true, false\n */\n pinned: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Severity level of the notice, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Props for the notice close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Inner dialog class\n */\n dialogClass: {\n type: String,\n default: '',\n },\n\n /**\n * Banner background image\n */\n backgroundImage: {\n type: String,\n default: '',\n },\n\n /**\n * Background image size, follows the background-size CSS property values\n * <a class=\"d-link\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/background-size\" target=\"_blank\">\n * CSS background-sizes\n * </a>\n */\n backgroundSize: {\n type: String,\n default: 'cover',\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n ],\n\n computed: {\n role () {\n return this.important ? 'alertdialog' : 'status';\n },\n\n bannerClass () {\n const kindClasses = {\n error: 'd-banner--error',\n info: 'd-banner--info',\n success: 'd-banner--success',\n warning: 'd-banner--warning',\n base: 'd-banner--base',\n };\n\n return [\n 'd-banner',\n kindClasses[this.kind],\n {\n 'd-banner--important': this.important,\n 'd-banner--pinned': this.pinned,\n },\n ];\n },\n\n bannerBackgroundImage () {\n if (this.backgroundImage === '') return null;\n\n return `background-image: url(${this.backgroundImage});\n background-size: ${this.backgroundSize};`;\n },\n },\n\n mounted () {\n if (this.important) {\n this.focusFirstElement();\n }\n },\n\n methods: {\n trapFocus (e) {\n if (this.important) {\n this.focusTrappedTabPress(e);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","Modal","SrOnlyCloseButtonMixin","utils","kind","NOTICE_KINDS","e"],"mappings":"+dA8DAA,EAAA,CACA,KAAA,WAEA,WAAA,CACA,aAAAC,EAAA,QACA,gBAAAC,EAAA,QACA,eAAAC,EAAA,OACA,EAEA,OAAA,CAAAC,EAAA,QAAAC,SAAA,EAEA,MAAA,CAKA,QAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAC,UAAA,gBAAA,CAAA,CACA,EAMA,UAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAA,UAAA,gBAAA,CAAA,CACA,EAKA,MAAA,CACA,KAAA,OACA,QAAA,EACA,EAQA,UAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,OAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,KAAA,CACA,KAAA,OACA,QAAA,OACA,SAAAC,EAAA,CACA,OAAAC,EAAA,aAAA,SAAAD,CAAA,CACA,CACA,EAKA,iBAAA,CACA,KAAA,OACA,QAAA,KAAA,CAAA,EACA,EAMA,UAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,SAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,WAAA,CACA,KAAA,QACA,QAAA,EACA,EAKA,YAAA,CACA,KAAA,OACA,QAAA,EACA,EAKA,gBAAA,CACA,KAAA,OACA,QAAA,EACA,EAQA,eAAA,CACA,KAAA,OACA,QAAA,OACA,CACA,EAEA,MAAA,CAMA,OACA,EAEA,SAAA,CACA,MAAA,CACA,OAAA,KAAA,UAAA,cAAA,QACA,EAEA,aAAA,CASA,MAAA,CACA,WATA,CACA,MAAA,kBACA,KAAA,iBACA,QAAA,oBACA,QAAA,oBACA,KAAA,gBACA,EAIA,KAAA,IAAA,EACA,CACA,sBAAA,KAAA,UACA,mBAAA,KAAA,MACA,CACA,CACA,EAEA,uBAAA,CACA,OAAA,KAAA,kBAAA,GAAA,KAEA,yBAAA,KAAA,eAAA;AAAA,iCACA,KAAA,cAAA,GACA,CACA,EAEA,SAAA,CACA,KAAA,WACA,KAAA,kBAAA,CAEA,EAEA,QAAA,CACA,UAAAE,EAAA,CACA,KAAA,WACA,KAAA,qBAAAA,CAAA,CAEA,CACA,CACA"}
1
+ {"version":3,"file":"banner.cjs","sources":["../../../components/banner/banner.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/no-static-element-interactions -->\n<template>\n <aside\n :class=\"bannerClass\"\n :style=\"bannerBackgroundImage\"\n @keydown.tab=\"trapFocus\"\n >\n <div\n class=\"d-banner__dialog\"\n :class=\"dialogClass\"\n :role=\"role\"\n :aria-labelledby=\"titleId\"\n :aria-describedby=\"contentId\"\n >\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-on=\"$listeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- eslint-disable-next-line max-len -->\n <!-- @slot Allows you to override the title, only use this if you need to override with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the banner -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n v-on=\"$listeners\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </aside>\n</template>\n\n<script>\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport Modal from '@/common/mixins/modal';\nimport utils from '@/common/utils';\n\n/**\n * Banners are a type of notice, delivering system and engagement messaging.\n * These are highly intrusive notices and should be used sparingly and appropriately.\n * @see https://dialtone.dialpad.com/components/banner.html\n */\nexport default {\n name: 'DtBanner',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n mixins: [Modal],\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the notice. This can be left blank to remove the title from the notice entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * This will also change the aria role from status to alertdialog.\n * and will modally trap the keyboard focus in the dialog as soon as it displays.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Pins the banner to the top of the window and pushes all app content down.\n * @values true, false\n */\n pinned: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Severity level of the notice, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Inner dialog class\n */\n dialogClass: {\n type: String,\n default: '',\n },\n\n /**\n * Banner background image\n */\n backgroundImage: {\n type: String,\n default: '',\n },\n\n /**\n * Background image size, follows the background-size CSS property values\n * <a class=\"d-link\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/background-size\" target=\"_blank\">\n * CSS background-sizes\n * </a>\n */\n backgroundSize: {\n type: String,\n default: 'cover',\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n ],\n\n computed: {\n role () {\n return this.important ? 'alertdialog' : 'status';\n },\n\n bannerClass () {\n const kindClasses = {\n error: 'd-banner--error',\n info: 'd-banner--info',\n success: 'd-banner--success',\n warning: 'd-banner--warning',\n base: 'd-banner--base',\n };\n\n return [\n 'd-banner',\n kindClasses[this.kind],\n {\n 'd-banner--important': this.important,\n 'd-banner--pinned': this.pinned,\n },\n ];\n },\n\n bannerBackgroundImage () {\n if (this.backgroundImage === '') return null;\n\n return `background-image: url(${this.backgroundImage});\n background-size: ${this.backgroundSize};`;\n },\n },\n\n mounted () {\n if (this.important) {\n this.focusFirstElement();\n }\n },\n\n methods: {\n trapFocus (e) {\n if (this.important) {\n this.focusTrappedTabPress(e);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","Modal","utils","kind","NOTICE_KINDS","e"],"mappings":"qaA0DAA,EAAA,CACA,KAAA,WAEA,WAAA,CACA,aAAAC,EAAA,QACA,gBAAAC,EAAA,QACA,eAAAC,EAAA,OACA,EAEA,OAAA,CAAAC,EAAAA,OAAA,EAEA,MAAA,CAKA,QAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAC,UAAA,gBAAA,CAAA,CACA,EAMA,UAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAA,UAAA,gBAAA,CAAA,CACA,EAKA,MAAA,CACA,KAAA,OACA,QAAA,EACA,EAQA,UAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,OAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,KAAA,CACA,KAAA,OACA,QAAA,OACA,SAAAC,EAAA,CACA,OAAAC,EAAA,aAAA,SAAAD,CAAA,CACA,CACA,EAMA,UAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,SAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,WAAA,CACA,KAAA,QACA,QAAA,EACA,EAKA,YAAA,CACA,KAAA,OACA,QAAA,EACA,EAKA,gBAAA,CACA,KAAA,OACA,QAAA,EACA,EAQA,eAAA,CACA,KAAA,OACA,QAAA,OACA,CACA,EAEA,MAAA,CAMA,OACA,EAEA,SAAA,CACA,MAAA,CACA,OAAA,KAAA,UAAA,cAAA,QACA,EAEA,aAAA,CASA,MAAA,CACA,WATA,CACA,MAAA,kBACA,KAAA,iBACA,QAAA,oBACA,QAAA,oBACA,KAAA,gBACA,EAIA,KAAA,IAAA,EACA,CACA,sBAAA,KAAA,UACA,mBAAA,KAAA,MACA,CACA,CACA,EAEA,uBAAA,CACA,OAAA,KAAA,kBAAA,GAAA,KAEA,yBAAA,KAAA,eAAA;AAAA,iCACA,KAAA,cAAA,GACA,CACA,EAEA,SAAA,CACA,KAAA,WACA,KAAA,kBAAA,CAEA,EAEA,QAAA,CACA,UAAAE,EAAA,CACA,KAAA,WACA,KAAA,qBAAAA,CAAA,CAEA,CACA,CACA"}
@@ -1,19 +1,18 @@
1
- import o from "../../common/mixins/modal.js";
1
+ import a from "../../common/mixins/modal.js";
2
2
  import i from "../../common/utils/index.js";
3
- import a from "../../common/mixins/sr-only-close-button.js";
4
- import { n as s } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
5
- import l from "../notice/notice-icon.js";
3
+ import { n as o } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
4
+ import s from "../notice/notice-icon.js";
6
5
  import d from "../notice/notice-content.js";
7
- import c from "../notice/notice-action.js";
8
- import { NOTICE_KINDS as u } from "../notice/notice-constants.js";
9
- const p = {
6
+ import l from "../notice/notice-action.js";
7
+ import { NOTICE_KINDS as c } from "../notice/notice-constants.js";
8
+ const u = {
10
9
  name: "DtBanner",
11
10
  components: {
12
- DtNoticeIcon: l,
11
+ DtNoticeIcon: s,
13
12
  DtNoticeContent: d,
14
- DtNoticeAction: c
13
+ DtNoticeAction: l
15
14
  },
16
- mixins: [o, a],
15
+ mixins: [a],
17
16
  props: {
18
17
  /**
19
18
  * Sets an ID on the title element of the component. Useful for aria-describedby
@@ -67,17 +66,10 @@ const p = {
67
66
  kind: {
68
67
  type: String,
69
68
  default: "base",
70
- validate(t) {
71
- return u.includes(t);
69
+ validate(e) {
70
+ return c.includes(e);
72
71
  }
73
72
  },
74
- /**
75
- * Props for the notice close button.
76
- */
77
- closeButtonProps: {
78
- type: Object,
79
- default: () => ({})
80
- },
81
73
  /**
82
74
  * Hides the close button from the notice
83
75
  * @values true, false
@@ -164,25 +156,25 @@ const p = {
164
156
  this.important && this.focusFirstElement();
165
157
  },
166
158
  methods: {
167
- trapFocus(t) {
168
- this.important && this.focusTrappedTabPress(t);
159
+ trapFocus(e) {
160
+ this.important && this.focusTrappedTabPress(e);
169
161
  }
170
162
  }
171
163
  };
172
- var f = function() {
173
- var e = this, n = e._self._c;
174
- return n("aside", { class: e.bannerClass, style: e.bannerBackgroundImage, on: { keydown: function(r) {
175
- return !r.type.indexOf("key") && e._k(r.keyCode, "tab", 9, r.key, "Tab") ? null : e.trapFocus.apply(null, arguments);
176
- } } }, [n("div", { staticClass: "d-banner__dialog", class: e.dialogClass, attrs: { role: e.role, "aria-labelledby": e.titleId, "aria-describedby": e.contentId } }, [e.hideIcon ? e._e() : n("dt-notice-icon", e._g({ attrs: { kind: e.kind } }, e.$listeners), [e._t("icon")], 2), n("dt-notice-content", e._g({ attrs: { "title-id": e.titleId, "content-id": e.contentId, title: e.title }, scopedSlots: e._u([{ key: "titleOverride", fn: function() {
177
- return [e._t("titleOverride")];
178
- }, proxy: !0 }], null, !0) }, e.$listeners), [e._t("default")], 2), n("dt-notice-action", e._g({ attrs: { "hide-action": e.hideAction, "hide-close": e.hideClose, "close-button-props": e.closeButtonProps, "visually-hidden-close": e.visuallyHiddenClose, "visually-hidden-close-label": e.visuallyHiddenCloseLabel } }, e.$listeners), [e._t("action")], 2)], 1)]);
179
- }, m = [], g = /* @__PURE__ */ s(
164
+ var p = function() {
165
+ var t = this, n = t._self._c;
166
+ return n("aside", { class: t.bannerClass, style: t.bannerBackgroundImage, on: { keydown: function(r) {
167
+ return !r.type.indexOf("key") && t._k(r.keyCode, "tab", 9, r.key, "Tab") ? null : t.trapFocus.apply(null, arguments);
168
+ } } }, [n("div", { staticClass: "d-banner__dialog", class: t.dialogClass, attrs: { role: t.role, "aria-labelledby": t.titleId, "aria-describedby": t.contentId } }, [t.hideIcon ? t._e() : n("dt-notice-icon", t._g({ attrs: { kind: t.kind } }, t.$listeners), [t._t("icon")], 2), n("dt-notice-content", t._g({ attrs: { "title-id": t.titleId, "content-id": t.contentId, title: t.title }, scopedSlots: t._u([{ key: "titleOverride", fn: function() {
169
+ return [t._t("titleOverride")];
170
+ }, proxy: !0 }], null, !0) }, t.$listeners), [t._t("default")], 2), n("dt-notice-action", t._g({ attrs: { "hide-action": t.hideAction, "hide-close": t.hideClose } }, t.$listeners), [t._t("action")], 2)], 1)]);
171
+ }, f = [], m = /* @__PURE__ */ o(
172
+ u,
180
173
  p,
181
- f,
182
- m
174
+ f
183
175
  );
184
- const v = g.exports;
176
+ const C = m.exports;
185
177
  export {
186
- v as default
178
+ C as default
187
179
  };
188
180
  //# sourceMappingURL=banner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"banner.js","sources":["../../../components/banner/banner.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/no-static-element-interactions -->\n<template>\n <aside\n :class=\"bannerClass\"\n :style=\"bannerBackgroundImage\"\n @keydown.tab=\"trapFocus\"\n >\n <div\n class=\"d-banner__dialog\"\n :class=\"dialogClass\"\n :role=\"role\"\n :aria-labelledby=\"titleId\"\n :aria-describedby=\"contentId\"\n >\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-on=\"$listeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- eslint-disable-next-line max-len -->\n <!-- @slot Allows you to override the title, only use this if you need to override with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the banner -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n :close-button-props=\"closeButtonProps\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n v-on=\"$listeners\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </aside>\n</template>\n\n<script>\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport Modal from '@/common/mixins/modal';\nimport utils from '@/common/utils';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\n/**\n * Banners are a type of notice, delivering system and engagement messaging.\n * These are highly intrusive notices and should be used sparingly and appropriately.\n * @see https://dialtone.dialpad.com/components/banner.html\n */\nexport default {\n name: 'DtBanner',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n mixins: [Modal, SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the notice. This can be left blank to remove the title from the notice entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * This will also change the aria role from status to alertdialog.\n * and will modally trap the keyboard focus in the dialog as soon as it displays.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Pins the banner to the top of the window and pushes all app content down.\n * @values true, false\n */\n pinned: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Severity level of the notice, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Props for the notice close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Inner dialog class\n */\n dialogClass: {\n type: String,\n default: '',\n },\n\n /**\n * Banner background image\n */\n backgroundImage: {\n type: String,\n default: '',\n },\n\n /**\n * Background image size, follows the background-size CSS property values\n * <a class=\"d-link\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/background-size\" target=\"_blank\">\n * CSS background-sizes\n * </a>\n */\n backgroundSize: {\n type: String,\n default: 'cover',\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n ],\n\n computed: {\n role () {\n return this.important ? 'alertdialog' : 'status';\n },\n\n bannerClass () {\n const kindClasses = {\n error: 'd-banner--error',\n info: 'd-banner--info',\n success: 'd-banner--success',\n warning: 'd-banner--warning',\n base: 'd-banner--base',\n };\n\n return [\n 'd-banner',\n kindClasses[this.kind],\n {\n 'd-banner--important': this.important,\n 'd-banner--pinned': this.pinned,\n },\n ];\n },\n\n bannerBackgroundImage () {\n if (this.backgroundImage === '') return null;\n\n return `background-image: url(${this.backgroundImage});\n background-size: ${this.backgroundSize};`;\n },\n },\n\n mounted () {\n if (this.important) {\n this.focusFirstElement();\n }\n },\n\n methods: {\n trapFocus (e) {\n if (this.important) {\n this.focusTrappedTabPress(e);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","Modal","SrOnlyCloseButtonMixin","utils","kind","NOTICE_KINDS","e"],"mappings":";;;;;;;;AA8DA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,cAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,GAAAC,CAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAC,EAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAA,EAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,SAAAC,GAAA;AACA,eAAAC,EAAA,SAAAD,CAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,OAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,OAAA;AACA,aAAA,KAAA,YAAA,gBAAA;AAAA,IACA;AAAA,IAEA,cAAA;AASA,aAAA;AAAA,QACA;AAAA,QATA;AAAA,UACA,OAAA;AAAA,UACA,MAAA;AAAA,UACA,SAAA;AAAA,UACA,SAAA;AAAA,UACA,MAAA;AAAA,QACA,EAIA,KAAA,IAAA;AAAA,QACA;AAAA,UACA,uBAAA,KAAA;AAAA,UACA,oBAAA,KAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,wBAAA;AACA,aAAA,KAAA,oBAAA,KAAA,OAEA,yBAAA,KAAA,eAAA;AAAA,iCACA,KAAA,cAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,IAAA,KAAA,aACA,KAAA,kBAAA;AAAA,EAEA;AAAA,EAEA,SAAA;AAAA,IACA,UAAAE,GAAA;AACA,MAAA,KAAA,aACA,KAAA,qBAAAA,CAAA;AAAA,IAEA;AAAA,EACA;AACA;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"banner.js","sources":["../../../components/banner/banner.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/no-static-element-interactions -->\n<template>\n <aside\n :class=\"bannerClass\"\n :style=\"bannerBackgroundImage\"\n @keydown.tab=\"trapFocus\"\n >\n <div\n class=\"d-banner__dialog\"\n :class=\"dialogClass\"\n :role=\"role\"\n :aria-labelledby=\"titleId\"\n :aria-describedby=\"contentId\"\n >\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n v-on=\"$listeners\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- eslint-disable-next-line max-len -->\n <!-- @slot Allows you to override the title, only use this if you need to override with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the banner -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n v-on=\"$listeners\"\n >\n <!-- @slot Enter a possible action for the user to take, such as a link to another page -->\n <slot name=\"action\" />\n </dt-notice-action>\n </div>\n </aside>\n</template>\n\n<script>\nimport { DtNoticeIcon, DtNoticeContent, DtNoticeAction, NOTICE_KINDS } from '@/components/notice';\nimport Modal from '@/common/mixins/modal';\nimport utils from '@/common/utils';\n\n/**\n * Banners are a type of notice, delivering system and engagement messaging.\n * These are highly intrusive notices and should be used sparingly and appropriately.\n * @see https://dialtone.dialpad.com/components/banner.html\n */\nexport default {\n name: 'DtBanner',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n mixins: [Modal],\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Title header of the notice. This can be left blank to remove the title from the notice entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * This will also change the aria role from status to alertdialog.\n * and will modally trap the keyboard focus in the dialog as soon as it displays.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Pins the banner to the top of the window and pushes all app content down.\n * @values true, false\n */\n pinned: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Severity level of the notice, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Inner dialog class\n */\n dialogClass: {\n type: String,\n default: '',\n },\n\n /**\n * Banner background image\n */\n backgroundImage: {\n type: String,\n default: '',\n },\n\n /**\n * Background image size, follows the background-size CSS property values\n * <a class=\"d-link\" href=\"https://developer.mozilla.org/en-US/docs/Web/CSS/background-size\" target=\"_blank\">\n * CSS background-sizes\n * </a>\n */\n backgroundSize: {\n type: String,\n default: 'cover',\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n ],\n\n computed: {\n role () {\n return this.important ? 'alertdialog' : 'status';\n },\n\n bannerClass () {\n const kindClasses = {\n error: 'd-banner--error',\n info: 'd-banner--info',\n success: 'd-banner--success',\n warning: 'd-banner--warning',\n base: 'd-banner--base',\n };\n\n return [\n 'd-banner',\n kindClasses[this.kind],\n {\n 'd-banner--important': this.important,\n 'd-banner--pinned': this.pinned,\n },\n ];\n },\n\n bannerBackgroundImage () {\n if (this.backgroundImage === '') return null;\n\n return `background-image: url(${this.backgroundImage});\n background-size: ${this.backgroundSize};`;\n },\n },\n\n mounted () {\n if (this.important) {\n this.focusFirstElement();\n }\n },\n\n methods: {\n trapFocus (e) {\n if (this.important) {\n this.focusTrappedTabPress(e);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","Modal","utils","kind","NOTICE_KINDS"],"mappings":";;;;;;;AA0DA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,cAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAC,EAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAA,EAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,SAAAC,GAAA;AACA,eAAAC,EAAA,SAAAD,CAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,OAAA;AACA,aAAA,KAAA,YAAA,gBAAA;AAAA,IACA;AAAA,IAEA,cAAA;AASA,aAAA;AAAA,QACA;AAAA,QATA;AAAA,UACA,OAAA;AAAA,UACA,MAAA;AAAA,UACA,SAAA;AAAA,UACA,SAAA;AAAA,UACA,MAAA;AAAA,QACA,EAIA,KAAA,IAAA;AAAA,QACA;AAAA,UACA,uBAAA,KAAA;AAAA,UACA,oBAAA,KAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,wBAAA;AACA,aAAA,KAAA,oBAAA,KAAA,OAEA,yBAAA,KAAA,eAAA;AAAA,iCACA,KAAA,cAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,IAAA,KAAA,aACA,KAAA,kBAAA;AAAA,EAEA;AAAA,EAEA,SAAA;AAAA,IACA,UAAA,GAAA;AACA,MAAA,KAAA,aACA,KAAA,qBAAA,CAAA;AAAA,IAEA;AAAA,EACA;AACA;;;;;;;;;;;;;;"}