@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,24 +1,17 @@
1
- import { DtIconClose as s } from "@dialpad/dialtone-icons/vue2";
2
- import n from "../../common/mixins/sr-only-close-button.js";
3
- import i from "../../shared/sr_only_close_button.js";
4
- import { n as l } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
1
+ import { DtIconClose as n } from "@dialpad/dialtone-icons/vue2";
2
+ import s from "../../shared/sr_only_close_button.js";
3
+ import { n as i } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
5
4
  import c from "../button/button.js";
6
- const a = {
5
+ import l from "../../common/mixins/localization.js";
6
+ const r = {
7
7
  name: "DtNoticeAction",
8
8
  components: {
9
- DtIconClose: s,
9
+ DtIconClose: n,
10
10
  DtButton: c,
11
- SrOnlyCloseButton: i
11
+ SrOnlyCloseButton: s
12
12
  },
13
- mixins: [n],
13
+ mixins: [l],
14
14
  props: {
15
- /**
16
- * Props for the notice close button.
17
- */
18
- closeButtonProps: {
19
- type: Object,
20
- default: () => ({})
21
- },
22
15
  /**
23
16
  * Hides the close button from the notice
24
17
  * @values true, false
@@ -52,11 +45,11 @@ const a = {
52
45
  this.close(), this.$emit("click", e);
53
46
  }
54
47
  };
48
+ },
49
+ closeButtonTitle() {
50
+ return this.i18n.$t("DIALTONE_CLOSE_BUTTON");
55
51
  }
56
52
  },
57
- created() {
58
- !this.hideClose && !this.closeButtonProps.ariaLabel && console.error("Invalid props: you must pass in closeButtonProps.ariaLabel if the close button is displayed.");
59
- },
60
53
  mounted() {
61
54
  this.hideClose || (this.lastFocusedElement = document.activeElement);
62
55
  },
@@ -70,18 +63,18 @@ const a = {
70
63
  }
71
64
  }
72
65
  };
73
- var r = function() {
66
+ var a = function() {
74
67
  var t = this, o = t._self._c;
75
- return o("div", { staticClass: "d-notice__actions", attrs: { "data-qa": "notice-content-actions" } }, [t.hideAction ? t._e() : t._t("default"), t.hideClose ? t._e() : o("dt-button", t._g(t._b({ ref: "closeButton", attrs: { "data-qa": "dt-notice-action-close-button", size: "sm", importance: "clear", circle: "", "aria-label": t.closeButtonProps.ariaLabel ? t.closeButtonProps.ariaLabel : "Close" }, scopedSlots: t._u([{ key: "icon", fn: function() {
68
+ return o("div", { staticClass: "d-notice__actions", attrs: { "data-qa": "notice-content-actions" } }, [t.hideAction ? t._e() : t._t("default"), t.hideClose ? o("sr-only-close-button", { on: { close: t.close } }) : o("dt-button", t._g({ ref: "closeButton", attrs: { circle: "", "data-qa": "dt-notice-action-close-button", importance: "clear", size: "sm", "aria-label": t.closeButtonTitle, title: t.closeButtonTitle }, scopedSlots: t._u([{ key: "icon", fn: function() {
76
69
  return [o("dt-icon-close", { attrs: { size: "200" } })];
77
- }, proxy: !0 }], null, !1, 4156074325) }, "dt-button", t.closeButtonProps, !1), t.noticeActionListeners)), t.showVisuallyHiddenClose ? o("sr-only-close-button", { attrs: { "visually-hidden-close-label": t.visuallyHiddenCloseLabel }, on: { close: t.close } }) : t._e()], 2);
78
- }, d = [], u = /* @__PURE__ */ l(
79
- a,
70
+ }, proxy: !0 }], null, !1, 4156074325) }, t.noticeActionListeners))], 2);
71
+ }, m = [], u = /* @__PURE__ */ i(
80
72
  r,
81
- d
73
+ a,
74
+ m
82
75
  );
83
- const b = u.exports;
76
+ const B = u.exports;
84
77
  export {
85
- b as default
78
+ B as default
86
79
  };
87
80
  //# sourceMappingURL=notice-action.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notice-action.js","sources":["../../../components/notice/notice_action.vue"],"sourcesContent":["<template>\n <div\n class=\"d-notice__actions\"\n data-qa=\"notice-content-actions\"\n >\n <!-- @slot Slot for main content -->\n <slot v-if=\"!hideAction\" />\n <dt-button\n v-if=\"!hideClose\"\n ref=\"closeButton\"\n data-qa=\"dt-notice-action-close-button\"\n size=\"sm\"\n importance=\"clear\"\n circle\n :aria-label=\"closeButtonProps.ariaLabel ? closeButtonProps.ariaLabel : 'Close'\"\n v-bind=\"closeButtonProps\"\n v-on=\"noticeActionListeners\"\n >\n <template #icon>\n <dt-icon-close\n size=\"200\"\n />\n </template>\n </dt-button>\n <sr-only-close-button\n v-if=\"showVisuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n @close=\"close\"\n />\n </div>\n</template>\n\n<script>\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue2';\nimport { DtButton } from '@/components/button';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\n\nexport default {\n name: 'DtNoticeAction',\n\n components: {\n DtIconClose,\n DtButton,\n SrOnlyCloseButton,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * Props for the notice close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n ],\n\n computed: {\n noticeActionListeners () {\n return {\n ...this.$listeners,\n\n click: event => {\n this.close();\n this.$emit('click', event);\n },\n };\n },\n },\n\n created () {\n if (!this.hideClose && !this.closeButtonProps.ariaLabel) {\n console.error('Invalid props: you must pass in closeButtonProps.ariaLabel if the close button is displayed.');\n }\n },\n\n mounted () {\n if (!this.hideClose) {\n this.lastFocusedElement = document.activeElement;\n }\n },\n\n beforeDestroy () {\n this.lastFocusedElement?.focus();\n },\n\n methods: {\n close () {\n this.$emit('close');\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtIconClose","DtButton","SrOnlyCloseButton","SrOnlyCloseButtonMixin","event","_a"],"mappings":";;;;;AAsCA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,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,YAAA;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,wBAAA;AACA,aAAA;AAAA,QACA,GAAA,KAAA;AAAA,QAEA,OAAA,CAAAC,MAAA;AACA,eAAA,MAAA,GACA,KAAA,MAAA,SAAAA,CAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,IAAA,CAAA,KAAA,aAAA,CAAA,KAAA,iBAAA,aACA,QAAA,MAAA,8FAAA;AAAA,EAEA;AAAA,EAEA,UAAA;AACA,IAAA,KAAA,cACA,KAAA,qBAAA,SAAA;AAAA,EAEA;AAAA,EAEA,gBAAA;;AACA,KAAAC,IAAA,KAAA,uBAAA,QAAAA,EAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,QAAA;AACA,WAAA,MAAA,OAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;"}
1
+ {"version":3,"file":"notice-action.js","sources":["../../../components/notice/notice_action.vue"],"sourcesContent":["<template>\n <div\n class=\"d-notice__actions\"\n data-qa=\"notice-content-actions\"\n >\n <!-- @slot Slot for main content -->\n <slot v-if=\"!hideAction\" />\n <dt-button\n v-if=\"!hideClose\"\n ref=\"closeButton\"\n circle\n data-qa=\"dt-notice-action-close-button\"\n importance=\"clear\"\n size=\"sm\"\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n v-on=\"noticeActionListeners\"\n >\n <template #icon>\n <dt-icon-close\n size=\"200\"\n />\n </template>\n </dt-button>\n <sr-only-close-button\n v-else\n @close=\"close\"\n />\n </div>\n</template>\n\n<script>\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue2';\nimport { DtButton } from '@/components/button';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'DtNoticeAction',\n\n components: {\n DtIconClose,\n DtButton,\n SrOnlyCloseButton,\n },\n\n mixins: [DtLocalizationMixin],\n\n props: {\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n ],\n\n computed: {\n noticeActionListeners () {\n return {\n ...this.$listeners,\n\n click: event => {\n this.close();\n this.$emit('click', event);\n },\n };\n },\n\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n mounted () {\n if (!this.hideClose) {\n this.lastFocusedElement = document.activeElement;\n }\n },\n\n beforeDestroy () {\n this.lastFocusedElement?.focus();\n },\n\n methods: {\n close () {\n this.$emit('close');\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtIconClose","DtButton","SrOnlyCloseButton","DtLocalizationMixin","event","_a"],"mappings":";;;;;AAqCA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;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,wBAAA;AACA,aAAA;AAAA,QACA,GAAA,KAAA;AAAA,QAEA,OAAA,CAAAC,MAAA;AACA,eAAA,MAAA,GACA,KAAA,MAAA,SAAAA,CAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,mBAAA;AACA,aAAA,KAAA,KAAA,GAAA,uBAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,IAAA,KAAA,cACA,KAAA,qBAAA,SAAA;AAAA,EAEA;AAAA,EAEA,gBAAA;;AACA,KAAAC,IAAA,KAAA,uBAAA,QAAAA,EAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,QAAA;AACA,WAAA,MAAA,OAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./notice-icon.cjs"),c=require("./notice-content.cjs"),s=require("./notice-action.cjs"),i=require("./notice-constants.cjs"),l=require("../../common/mixins/sr-only-close-button.cjs"),r=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),d={name:"DtNotice",components:{DtNoticeIcon:o.default,DtNoticeContent:c.default,DtNoticeAction:s.default},mixins:[l.default],props:{titleId:{type:String,default:void 0},contentId:{type:String,default:void 0},title:{type:String,default:""},role:{type:String,default:"status",validate(t){return i.NOTICE_ROLES.includes(t)}},important:{type:Boolean,default:!1},kind:{type:String,default:"base",validate(t){return i.NOTICE_KINDS.includes(t)}},closeButtonProps:{type:Object,default:()=>({})},hideClose:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1},hideAction:{type:Boolean,default:!1},truncateText:{type:Boolean,default:!1}},emits:["close"],computed:{noticeClass(){return["d-notice",{error:"d-notice--error",info:"d-notice--info",success:"d-notice--success",warning:"d-notice--warning",base:"d-notice--base"}[this.kind],{"d-notice--important":this.important,"d-notice--truncate":this.truncateText}]}}};var a=function(){var e=this,n=e._self._c;return n("aside",{class:e.noticeClass,attrs:{"data-qa":"notice"}},[e.hideIcon?e._e():n("dt-notice-icon",{attrs:{kind:e.kind}},[e._t("icon")],2),n("dt-notice-content",e._g({attrs:{"title-id":e.titleId,"content-id":e.contentId,title:e.title,role:e.role},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)},u=[],_=r.n(d,a,u);const f=_.exports;exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./notice-icon.cjs"),c=require("./notice-content.cjs"),r=require("./notice-action.cjs"),i=require("./notice-constants.cjs"),s=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),a={name:"DtNotice",components:{DtNoticeIcon:o.default,DtNoticeContent:c.default,DtNoticeAction:r.default},props:{titleId:{type:String,default:void 0},contentId:{type:String,default:void 0},title:{type:String,default:""},role:{type:String,default:"status",validate(e){return i.NOTICE_ROLES.includes(e)}},important:{type:Boolean,default:!1},kind:{type:String,default:"base",validate(e){return i.NOTICE_KINDS.includes(e)}},hideClose:{type:Boolean,default:!1},hideIcon:{type:Boolean,default:!1},hideAction:{type:Boolean,default:!1},truncateText:{type:Boolean,default:!1}},emits:["close"],computed:{noticeClass(){return["d-notice",{error:"d-notice--error",info:"d-notice--info",success:"d-notice--success",warning:"d-notice--warning",base:"d-notice--base"}[this.kind],{"d-notice--important":this.important,"d-notice--truncate":this.truncateText}]}}};var d=function(){var t=this,n=t._self._c;return n("aside",{class:t.noticeClass,attrs:{"data-qa":"notice"}},[t.hideIcon?t._e():n("dt-notice-icon",{attrs:{kind:t.kind}},[t._t("icon")],2),n("dt-notice-content",t._g({attrs:{"title-id":t.titleId,"content-id":t.contentId,title:t.title,role:t.role},scopedSlots:t._u([{key:"titleOverride",fn:function(){return[t._t("titleOverride")]},proxy:!0}],null,!0)},t.$listeners),[t._t("default")],2),n("dt-notice-action",t._g({attrs:{"hide-action":t.hideAction,"hide-close":t.hideClose}},t.$listeners),[t._t("action")],2)],1)},l=[],u=s.n(a,d,l);const _=u.exports;exports.default=_;
2
2
  //# sourceMappingURL=notice.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"notice.cjs","sources":["../../../components/notice/notice.vue"],"sourcesContent":["<template>\n <aside\n :class=\"noticeClass\"\n data-qa=\"notice\"\n >\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need\n to override with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the notice -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n :close-button-props=\"closeButtonProps\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n 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 </aside>\n</template>\n\n<script>\nimport DtNoticeIcon from './notice_icon.vue';\nimport DtNoticeContent from './notice_content.vue';\nimport DtNoticeAction from './notice_action.vue';\nimport { NOTICE_KINDS, NOTICE_ROLES } from './notice_constants';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\n/**\n * A notice is an informational and assistive message that appears inline with content.\n * @see https://dialtone.dialpad.com/components/notice.html\n */\nexport default {\n name: 'DtNotice',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the notice. This can be left blank to remove the title from the notice entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the notice. 'status' is used to communicate a message. 'alert' is used to communicate an\n * important message that does not contain any interactive elements. 'alertdialog' is used to communicate an\n * important message that does contain interactive elements.\n * @values alert, alertdialog, status\n */\n role: {\n type: String,\n default: 'status',\n validate (role) {\n return NOTICE_ROLES.includes(role);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * This will also change the aria role from status to alert.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Severity level of the notice, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Props for the notice close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Truncates the content instead of wrapping.\n * Used when the notice needs to have a fixed height.\n * @values true, false\n */\n truncateText: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n ],\n\n computed: {\n noticeClass () {\n const noticeKinds = {\n error: 'd-notice--error',\n info: 'd-notice--info',\n success: 'd-notice--success',\n warning: 'd-notice--warning',\n base: 'd-notice--base',\n };\n return [\n 'd-notice',\n noticeKinds[this.kind],\n { 'd-notice--important': this.important, 'd-notice--truncate': this.truncateText },\n ];\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","SrOnlyCloseButtonMixin","role","NOTICE_ROLES","kind","NOTICE_KINDS"],"mappings":"0WAoDAA,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,QAAA,MACA,EAMA,UAAA,CACA,KAAA,OACA,QAAA,MACA,EAKA,MAAA,CACA,KAAA,OACA,QAAA,EACA,EAQA,KAAA,CACA,KAAA,OACA,QAAA,SACA,SAAAC,EAAA,CACA,OAAAC,EAAA,aAAA,SAAAD,CAAA,CACA,CACA,EAOA,UAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,KAAA,CACA,KAAA,OACA,QAAA,OACA,SAAAE,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,EAOA,aAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,EAEA,MAAA,CAMA,OACA,EAEA,SAAA,CACA,aAAA,CAQA,MAAA,CACA,WARA,CACA,MAAA,kBACA,KAAA,iBACA,QAAA,oBACA,QAAA,oBACA,KAAA,gBACA,EAGA,KAAA,IAAA,EACA,CAAA,sBAAA,KAAA,UAAA,qBAAA,KAAA,YAAA,CACA,CACA,CACA,CACA"}
1
+ {"version":3,"file":"notice.cjs","sources":["../../../components/notice/notice.vue"],"sourcesContent":["<template>\n <aside\n :class=\"noticeClass\"\n data-qa=\"notice\"\n >\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need\n to override with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the notice -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n 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 </aside>\n</template>\n\n<script>\nimport DtNoticeIcon from './notice_icon.vue';\nimport DtNoticeContent from './notice_content.vue';\nimport DtNoticeAction from './notice_action.vue';\nimport { NOTICE_KINDS, NOTICE_ROLES } from './notice_constants';\n\n/**\n * A notice is an informational and assistive message that appears inline with content.\n * @see https://dialtone.dialpad.com/components/notice.html\n */\nexport default {\n name: 'DtNotice',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the notice. This can be left blank to remove the title from the notice entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the notice. 'status' is used to communicate a message. 'alert' is used to communicate an\n * important message that does not contain any interactive elements. 'alertdialog' is used to communicate an\n * important message that does contain interactive elements.\n * @values alert, alertdialog, status\n */\n role: {\n type: String,\n default: 'status',\n validate (role) {\n return NOTICE_ROLES.includes(role);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * This will also change the aria role from status to alert.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Severity level of the notice, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Truncates the content instead of wrapping.\n * Used when the notice needs to have a fixed height.\n * @values true, false\n */\n truncateText: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n ],\n\n computed: {\n noticeClass () {\n const noticeKinds = {\n error: 'd-notice--error',\n info: 'd-notice--info',\n success: 'd-notice--success',\n warning: 'd-notice--warning',\n base: 'd-notice--base',\n };\n return [\n 'd-notice',\n noticeKinds[this.kind],\n { 'd-notice--important': this.important, 'd-notice--truncate': this.truncateText },\n ];\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","role","NOTICE_ROLES","kind","NOTICE_KINDS"],"mappings":"gTAgDAA,EAAA,CACA,KAAA,WAEA,WAAA,CACA,aAAAC,EAAA,QACA,gBAAAC,EAAA,QACA,eAAAC,EAAA,OACA,EAEA,MAAA,CAKA,QAAA,CACA,KAAA,OACA,QAAA,MACA,EAMA,UAAA,CACA,KAAA,OACA,QAAA,MACA,EAKA,MAAA,CACA,KAAA,OACA,QAAA,EACA,EAQA,KAAA,CACA,KAAA,OACA,QAAA,SACA,SAAAC,EAAA,CACA,OAAAC,EAAA,aAAA,SAAAD,CAAA,CACA,CACA,EAOA,UAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,KAAA,CACA,KAAA,OACA,QAAA,OACA,SAAAE,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,EAOA,aAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,EAEA,MAAA,CAMA,OACA,EAEA,SAAA,CACA,aAAA,CAQA,MAAA,CACA,WARA,CACA,MAAA,kBACA,KAAA,iBACA,QAAA,oBACA,QAAA,oBACA,KAAA,gBACA,EAGA,KAAA,IAAA,EACA,CAAA,sBAAA,KAAA,UAAA,qBAAA,KAAA,YAAA,CACA,CACA,CACA,CACA"}
@@ -1,17 +1,15 @@
1
- import o from "./notice-icon.js";
2
- import i from "./notice-content.js";
3
- import s from "./notice-action.js";
4
- import { NOTICE_ROLES as r, NOTICE_KINDS as l } from "./notice-constants.js";
5
- import a from "../../common/mixins/sr-only-close-button.js";
6
- import { n as c } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
7
- const d = {
1
+ import i from "./notice-icon.js";
2
+ import o from "./notice-content.js";
3
+ import r from "./notice-action.js";
4
+ import { NOTICE_ROLES as c, NOTICE_KINDS as a } from "./notice-constants.js";
5
+ import { n as d } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
6
+ const s = {
8
7
  name: "DtNotice",
9
8
  components: {
10
- DtNoticeIcon: o,
11
- DtNoticeContent: i,
12
- DtNoticeAction: s
9
+ DtNoticeIcon: i,
10
+ DtNoticeContent: o,
11
+ DtNoticeAction: r
13
12
  },
14
- mixins: [a],
15
13
  props: {
16
14
  /**
17
15
  * Sets an ID on the title element of the component. Useful for aria-describedby
@@ -46,7 +44,7 @@ const d = {
46
44
  type: String,
47
45
  default: "status",
48
46
  validate(e) {
49
- return r.includes(e);
47
+ return c.includes(e);
50
48
  }
51
49
  },
52
50
  /**
@@ -66,16 +64,9 @@ const d = {
66
64
  type: String,
67
65
  default: "base",
68
66
  validate(e) {
69
- return l.includes(e);
67
+ return a.includes(e);
70
68
  }
71
69
  },
72
- /**
73
- * Props for the notice close button.
74
- */
75
- closeButtonProps: {
76
- type: Object,
77
- default: () => ({})
78
- },
79
70
  /**
80
71
  * Hides the close button from the notice
81
72
  * @values true, false
@@ -134,17 +125,17 @@ const d = {
134
125
  }
135
126
  }
136
127
  };
137
- var u = function() {
128
+ var l = function() {
138
129
  var t = this, n = t._self._c;
139
130
  return n("aside", { class: t.noticeClass, attrs: { "data-qa": "notice" } }, [t.hideIcon ? t._e() : n("dt-notice-icon", { attrs: { kind: t.kind } }, [t._t("icon")], 2), n("dt-notice-content", t._g({ attrs: { "title-id": t.titleId, "content-id": t.contentId, title: t.title, role: t.role }, scopedSlots: t._u([{ key: "titleOverride", fn: function() {
140
131
  return [t._t("titleOverride")];
141
- }, 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, "close-button-props": t.closeButtonProps, "visually-hidden-close": t.visuallyHiddenClose, "visually-hidden-close-label": t.visuallyHiddenCloseLabel } }, t.$listeners), [t._t("action")], 2)], 1);
142
- }, f = [], p = /* @__PURE__ */ c(
143
- d,
144
- u,
145
- f
132
+ }, 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);
133
+ }, u = [], f = /* @__PURE__ */ d(
134
+ s,
135
+ l,
136
+ u
146
137
  );
147
- const I = p.exports;
138
+ const I = f.exports;
148
139
  export {
149
140
  I as default
150
141
  };
@@ -1 +1 @@
1
- {"version":3,"file":"notice.js","sources":["../../../components/notice/notice.vue"],"sourcesContent":["<template>\n <aside\n :class=\"noticeClass\"\n data-qa=\"notice\"\n >\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need\n to override with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the notice -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n :close-button-props=\"closeButtonProps\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n 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 </aside>\n</template>\n\n<script>\nimport DtNoticeIcon from './notice_icon.vue';\nimport DtNoticeContent from './notice_content.vue';\nimport DtNoticeAction from './notice_action.vue';\nimport { NOTICE_KINDS, NOTICE_ROLES } from './notice_constants';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\n/**\n * A notice is an informational and assistive message that appears inline with content.\n * @see https://dialtone.dialpad.com/components/notice.html\n */\nexport default {\n name: 'DtNotice',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the notice. This can be left blank to remove the title from the notice entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the notice. 'status' is used to communicate a message. 'alert' is used to communicate an\n * important message that does not contain any interactive elements. 'alertdialog' is used to communicate an\n * important message that does contain interactive elements.\n * @values alert, alertdialog, status\n */\n role: {\n type: String,\n default: 'status',\n validate (role) {\n return NOTICE_ROLES.includes(role);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * This will also change the aria role from status to alert.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Severity level of the notice, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Props for the notice close button.\n */\n closeButtonProps: {\n type: Object,\n default: () => ({}),\n },\n\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Truncates the content instead of wrapping.\n * Used when the notice needs to have a fixed height.\n * @values true, false\n */\n truncateText: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n ],\n\n computed: {\n noticeClass () {\n const noticeKinds = {\n error: 'd-notice--error',\n info: 'd-notice--info',\n success: 'd-notice--success',\n warning: 'd-notice--warning',\n base: 'd-notice--base',\n };\n return [\n 'd-notice',\n noticeKinds[this.kind],\n { 'd-notice--important': this.important, 'd-notice--truncate': this.truncateText },\n ];\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","SrOnlyCloseButtonMixin","role","NOTICE_ROLES","kind","NOTICE_KINDS"],"mappings":";;;;;;AAoDA,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,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,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;AAAA,IAOA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,SAAAE,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;AAAA;AAAA,IAOA,cAAA;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,cAAA;AAQA,aAAA;AAAA,QACA;AAAA,QARA;AAAA,UACA,OAAA;AAAA,UACA,MAAA;AAAA,UACA,SAAA;AAAA,UACA,SAAA;AAAA,UACA,MAAA;AAAA,QACA,EAGA,KAAA,IAAA;AAAA,QACA,EAAA,uBAAA,KAAA,WAAA,sBAAA,KAAA,aAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;"}
1
+ {"version":3,"file":"notice.js","sources":["../../../components/notice/notice.vue"],"sourcesContent":["<template>\n <aside\n :class=\"noticeClass\"\n data-qa=\"notice\"\n >\n <dt-notice-icon\n v-if=\"!hideIcon\"\n :kind=\"kind\"\n >\n <!-- @slot Slot for custom icon -->\n <slot name=\"icon\" />\n </dt-notice-icon>\n <dt-notice-content\n :title-id=\"titleId\"\n :content-id=\"contentId\"\n :title=\"title\"\n :role=\"role\"\n v-on=\"$listeners\"\n >\n <template #titleOverride>\n <!-- @slot Allows you to override the title, only use this if you need\n to override with something other than text. Otherwise use the \"title\" prop. -->\n <slot name=\"titleOverride\" />\n </template>\n <!-- @slot the main textual content of the notice -->\n <slot />\n </dt-notice-content>\n <dt-notice-action\n :hide-action=\"hideAction\"\n :hide-close=\"hideClose\"\n 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 </aside>\n</template>\n\n<script>\nimport DtNoticeIcon from './notice_icon.vue';\nimport DtNoticeContent from './notice_content.vue';\nimport DtNoticeAction from './notice_action.vue';\nimport { NOTICE_KINDS, NOTICE_ROLES } from './notice_constants';\n\n/**\n * A notice is an informational and assistive message that appears inline with content.\n * @see https://dialtone.dialpad.com/components/notice.html\n */\nexport default {\n name: 'DtNotice',\n\n components: {\n DtNoticeIcon,\n DtNoticeContent,\n DtNoticeAction,\n },\n\n props: {\n /**\n * Sets an ID on the title element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the title.\n */\n titleId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Sets an ID on the content element of the component. Useful for aria-describedby\n * or aria-labelledby or any other reason you may need an id to refer to the content.\n */\n contentId: {\n type: String,\n default: undefined,\n },\n\n /**\n * Title header of the notice. This can be left blank to remove the title from the notice entirely.\n */\n title: {\n type: String,\n default: '',\n },\n\n /**\n * Provides a role for the notice. 'status' is used to communicate a message. 'alert' is used to communicate an\n * important message that does not contain any interactive elements. 'alertdialog' is used to communicate an\n * important message that does contain interactive elements.\n * @values alert, alertdialog, status\n */\n role: {\n type: String,\n default: 'status',\n validate (role) {\n return NOTICE_ROLES.includes(role);\n },\n },\n\n /**\n * Used in scenarios where the message needs to visually dominate the screen.\n * This will also change the aria role from status to alert.\n * @values true, false\n */\n important: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Severity level of the notice, sets the icon and background\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Hides the close button from the notice\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the icon from the notice\n * @values true, false\n */\n hideIcon: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Hides the action from the notice\n * @values true, false\n */\n hideAction: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Truncates the content instead of wrapping.\n * Used when the notice needs to have a fixed height.\n * @values true, false\n */\n truncateText: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n ],\n\n computed: {\n noticeClass () {\n const noticeKinds = {\n error: 'd-notice--error',\n info: 'd-notice--info',\n success: 'd-notice--success',\n warning: 'd-notice--warning',\n base: 'd-notice--base',\n };\n return [\n 'd-notice',\n noticeKinds[this.kind],\n { 'd-notice--important': this.important, 'd-notice--truncate': this.truncateText },\n ];\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtNoticeIcon","DtNoticeContent","DtNoticeAction","role","NOTICE_ROLES","kind","NOTICE_KINDS"],"mappings":";;;;;AAgDA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,cAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,gBAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,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;AAAA,IAOA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,SAAAE,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;AAAA;AAAA,IAOA,cAAA;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,cAAA;AAQA,aAAA;AAAA,QACA;AAAA,QARA;AAAA,UACA,OAAA;AAAA,UACA,MAAA;AAAA,UACA,SAAA;AAAA,UACA,SAAA;AAAA,UACA,MAAA;AAAA,QACA,EAGA,KAAA,IAAA;AAAA,QACA,EAAA,uBAAA,KAAA,WAAA,sBAAA,KAAA,aAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("@dialpad/dialtone-icons/vue2"),c=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),l=require("../button/button.cjs"),g={name:"DtPagination",components:{DtButton:l.default,DtIconChevronLeft:o.DtIconChevronLeft,DtIconChevronRight:o.DtIconChevronRight,DtIconMoreHorizontal:o.DtIconMoreHorizontal},props:{ariaLabel:{type:String,required:!0},totalPages:{type:Number,required:!0},prevAriaLabel:{type:String,required:!0},nextAriaLabel:{type:String,required:!0},pageNumberAriaLabel:{type:Function,required:!0},activePage:{type:Number,default:1},maxVisible:{type:Number,default:5},hideEdges:{type:Boolean,default:!1}},emits:["change"],data(){return{currentPage:this.activePage}},computed:{isFirstPage(){return this.currentPage===1},isLastPage(){return this.currentPage===this.totalPages},pages(){if(this.maxVisible===0)return[];if(this.totalPages<=this.maxVisible)return this.range(1,this.totalPages);let r=this.maxVisible-1,t=this.totalPages-r+1;if(this.hideEdges&&(r=r+1,t=t-1),this.currentPage<r){const n=[...this.range(1,r),"..."];return this.hideEdges||n.push(this.totalPages),n}if(this.currentPage>t){const n=["...",...this.range(t,this.totalPages)];return this.hideEdges||n.unshift(1),n}const a=this.maxVisible-(3-this.maxVisible%2),e=Math.floor(a/2);let i=this.currentPage-e,s=this.currentPage+e;this.hideEdges&&(i=i-1,s=s+1);const u=["...",...this.range(i,s),"..."];return this.hideEdges?u:[1,...u,this.totalPages]}},watch:{activePage(){this.currentPage=this.activePage}},methods:{range(r,t){const a=[];r=r>0?r:1;for(let e=r;e<=t;e++)a.push(e);return a},changePage(r){this.currentPage=r,this.$emit("change",this.currentPage)}}};var d=function(){var t=this,a=t._self._c;return a("nav",{staticClass:"d-pagination",attrs:{"aria-label":t.ariaLabel}},[a("dt-button",{staticClass:"d-pagination__button",attrs:{"data-qa":"dt-pagination-prev","aria-label":t.prevAriaLabel,kind:"muted",importance:"clear",disabled:t.isFirstPage},on:{click:function(e){return t.changePage(t.currentPage-1)}},scopedSlots:t._u([{key:"icon",fn:function(){return[a("dt-icon-chevron-left",{attrs:{size:"300"}})]},proxy:!0}])}),t._l(t.pages,function(e,i){return a("div",{key:`page-${e}-${i}`,class:{"d-pagination__separator":isNaN(Number(e))}},[isNaN(Number(e))?a("div",{staticClass:"d-pagination__separator-icon",attrs:{"data-qa":"dt-pagination-separator"}},[a("dt-icon-more-horizontal",{attrs:{size:"300"}})],1):a("dt-button",{attrs:{"aria-label":t.pageNumberAriaLabel(e),kind:t.currentPage===e?"default":"muted",importance:t.currentPage===e?"primary":"clear","label-class":""},on:{click:function(s){return t.changePage(e)}}},[t._v(" "+t._s(e)+" ")])],1)}),a("dt-button",{staticClass:"d-pagination__button",attrs:{"data-qa":"dt-pagination-next","aria-label":t.nextAriaLabel,disabled:t.isLastPage,kind:"muted",importance:"clear"},on:{click:function(e){return t.changePage(t.currentPage+1)}},scopedSlots:t._u([{key:"icon",fn:function(){return[a("dt-icon-chevron-right",{attrs:{size:"300"}})]},proxy:!0}])})],2)},h=[],p=c.n(g,d,h);const b=p.exports;exports.default=b;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("@dialpad/dialtone-icons/vue2"),u=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),l=require("../button/button.cjs"),g=require("../../common/mixins/localization.cjs"),h={name:"DtPagination",components:{DtButton:l.default,DtIconChevronLeft:o.DtIconChevronLeft,DtIconChevronRight:o.DtIconChevronRight,DtIconMoreHorizontal:o.DtIconMoreHorizontal},mixins:[g.default],props:{ariaLabel:{type:String,required:!0},totalPages:{type:Number,required:!0},activePage:{type:Number,default:1},maxVisible:{type:Number,default:5},hideEdges:{type:Boolean,default:!1}},emits:["change"],data(){return{currentPage:this.activePage}},computed:{isFirstPage(){return this.currentPage===1},isLastPage(){return this.currentPage===this.totalPages},pages(){if(this.maxVisible===0)return[];if(this.totalPages<=this.maxVisible)return this.range(1,this.totalPages);let e=this.maxVisible-1,t=this.totalPages-e+1;if(this.hideEdges&&(e=e+1,t=t-1),this.currentPage<e){const n=[...this.range(1,e),"..."];return this.hideEdges||n.push(this.totalPages),n}if(this.currentPage>t){const n=["...",...this.range(t,this.totalPages)];return this.hideEdges||n.unshift(1),n}const i=this.maxVisible-(3-this.maxVisible%2),a=Math.floor(i/2);let r=this.currentPage-a,s=this.currentPage+a;this.hideEdges&&(r=r-1,s=s+1);const c=["...",...this.range(r,s),"..."];return this.hideEdges?c:[1,...c,this.totalPages]},prevAriaLabel(){return this.isFirstPage?this.i18n.$t("DIALTONE_PAGINATION_FIRST_PAGE"):this.i18n.$t("DIALTONE_PAGINATION_PREVIOUS_PAGE")},nextAriaLabel(){return this.isLastPage?this.i18n.$t("DIALTONE_PAGINATION_LAST_PAGE"):this.i18n.$t("DIALTONE_PAGINATION_NEXT_PAGE")},pageNumberAriaLabel(){return e=>e===this.totalPages?`${this.i18n.$t("DIALTONE_PAGINATION_LAST_PAGE")} ${e}`:`${this.i18n.$t("DIALTONE_PAGINATION_PAGE_NUMBER",{page:e})}`}},watch:{activePage(){this.currentPage=this.activePage}},methods:{range(e,t){const i=[];e=e>0?e:1;for(let a=e;a<=t;a++)i.push(a);return i},changePage(e){this.currentPage=e,this.$emit("change",this.currentPage)}}};var d=function(){var t=this,i=t._self._c;return i("nav",{staticClass:"d-pagination",attrs:{"aria-label":t.ariaLabel}},[i("dt-button",{staticClass:"d-pagination__button",attrs:{"data-qa":"dt-pagination-prev","aria-label":t.prevAriaLabel,kind:"muted",importance:"clear",disabled:t.isFirstPage},on:{click:function(a){return t.changePage(t.currentPage-1)}},scopedSlots:t._u([{key:"icon",fn:function(){return[i("dt-icon-chevron-left",{attrs:{size:"300"}})]},proxy:!0}])}),t._l(t.pages,function(a,r){return i("div",{key:`page-${a}-${r}`,class:{"d-pagination__separator":isNaN(Number(a))}},[isNaN(Number(a))?i("div",{staticClass:"d-pagination__separator-icon",attrs:{"data-qa":"dt-pagination-separator"}},[i("dt-icon-more-horizontal",{attrs:{size:"300"}})],1):i("dt-button",{attrs:{"aria-label":t.pageNumberAriaLabel(a),kind:t.currentPage===a?"default":"muted",importance:t.currentPage===a?"primary":"clear","label-class":""},on:{click:function(s){return t.changePage(a)}}},[t._v(" "+t._s(a)+" ")])],1)}),i("dt-button",{staticClass:"d-pagination__button",attrs:{"data-qa":"dt-pagination-next","aria-label":t.nextAriaLabel,disabled:t.isLastPage,kind:"muted",importance:"clear"},on:{click:function(a){return t.changePage(t.currentPage+1)}},scopedSlots:t._u([{key:"icon",fn:function(){return[i("dt-icon-chevron-right",{attrs:{size:"300"}})]},proxy:!0}])})],2)},_=[],P=u.n(h,d,_);const b=P.exports;exports.default=b;
2
2
  //# sourceMappingURL=pagination.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.cjs","sources":["../../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n kind=\"muted\"\n importance=\"clear\"\n :disabled=\"isFirstPage\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template #icon>\n <dt-icon-chevron-left\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon-more-horizontal\n size=\"300\"\n />\n <!-- … -->\n </div>\n <!-- eslint-enable vue/no-bare-strings-in-template -->\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n importance=\"clear\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template #icon>\n <dt-icon-chevron-right\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconChevronLeft, DtIconChevronRight, DtIconMoreHorizontal } from '@dialpad/dialtone-icons/vue2';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIconChevronLeft,\n DtIconChevronRight,\n DtIconMoreHorizontal,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * Descriptive label for the previous button.\n */\n prevAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the next button.\n */\n nextAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * A method that will be called to get the aria label of each page.\n */\n pageNumberAriaLabel: {\n type: Function,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n\n /**\n * Sometimes you may need to hide start and end page number buttons when moving in between.\n * This prop will be used to hide the first and last page buttons when not near the edges.\n * This is useful when your backend does not support offset and you can only use cursor based pagination.\n */\n hideEdges: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n let start = this.maxVisible - 1;\n let end = this.totalPages - start + 1;\n\n // if hideEdges is true, modify the start and\n // end to account for the hidden pages\n if (this.hideEdges) {\n start = start + 1;\n end = end - 1;\n }\n\n if (this.currentPage < start) {\n const pages = [...this.range(1, start), '...'];\n if (!this.hideEdges) {\n // add last page to the end\n pages.push(this.totalPages);\n }\n return pages;\n }\n\n if (this.currentPage > end) {\n const pages = ['...', ...this.range(end, this.totalPages)];\n if (!this.hideEdges) {\n // add first page to the beginning\n pages.unshift(1);\n }\n return pages;\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n let left = this.currentPage - centerIndex;\n let right = this.currentPage + centerIndex;\n\n // if hideEdge is true, modify the left and right to account for the hidden pages\n if (this.hideEdges) {\n left = left - 1;\n right = right + 1;\n }\n\n const pages = ['...', ...this.range(left, right), '...'];\n if (!this.hideEdges) {\n return [1, ...pages, this.totalPages];\n }\n return pages;\n },\n },\n\n watch: {\n activePage () {\n this.currentPage = this.activePage;\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconChevronLeft","DtIconChevronRight","DtIconMoreHorizontal","start","end","pages","total","centerIndex","left","right","from","to","range","i","page"],"mappings":"sPA0EAA,EAAA,CACA,KAAA,eAEA,WAAA,CACA,SAAAC,EAAA,QACA,kBAAAC,EAAA,kBACA,mBAAAC,EAAA,mBACA,qBAAAC,EAAA,oBACA,EAEA,MAAA,CAIA,UAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,WAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,cAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,cAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,oBAAA,CACA,KAAA,SACA,SAAA,EACA,EAKA,WAAA,CACA,KAAA,OACA,QAAA,CACA,EAOA,WAAA,CACA,KAAA,OACA,QAAA,CACA,EAOA,UAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,EAEA,MAAA,CAOA,QACA,EAEA,MAAA,CACA,MAAA,CACA,YAAA,KAAA,UACA,CACA,EAEA,SAAA,CACA,aAAA,CACA,OAAA,KAAA,cAAA,CACA,EAEA,YAAA,CACA,OAAA,KAAA,cAAA,KAAA,UACA,EAEA,OAAA,CACA,GAAA,KAAA,aAAA,EACA,MAAA,GAEA,GAAA,KAAA,YAAA,KAAA,WACA,OAAA,KAAA,MAAA,EAAA,KAAA,UAAA,EAGA,IAAAC,EAAA,KAAA,WAAA,EACAC,EAAA,KAAA,WAAAD,EAAA,EASA,GALA,KAAA,YACAA,EAAAA,EAAA,EACAC,EAAAA,EAAA,GAGA,KAAA,YAAAD,EAAA,CACA,MAAAE,EAAA,CAAA,GAAA,KAAA,MAAA,EAAAF,CAAA,EAAA,KAAA,EACA,OAAA,KAAA,WAEAE,EAAA,KAAA,KAAA,UAAA,EAEAA,CACA,CAEA,GAAA,KAAA,YAAAD,EAAA,CACA,MAAAC,EAAA,CAAA,MAAA,GAAA,KAAA,MAAAD,EAAA,KAAA,UAAA,CAAA,EACA,OAAA,KAAA,WAEAC,EAAA,QAAA,CAAA,EAEAA,CACA,CAGA,MAAAC,EAAA,KAAA,YAAA,EAAA,KAAA,WAAA,GACAC,EAAA,KAAA,MAAAD,EAAA,CAAA,EACA,IAAAE,EAAA,KAAA,YAAAD,EACAE,EAAA,KAAA,YAAAF,EAGA,KAAA,YACAC,EAAAA,EAAA,EACAC,EAAAA,EAAA,GAGA,MAAAJ,EAAA,CAAA,MAAA,GAAA,KAAA,MAAAG,EAAAC,CAAA,EAAA,KAAA,EACA,OAAA,KAAA,UAGAJ,EAFA,CAAA,EAAA,GAAAA,EAAA,KAAA,UAAA,CAGA,CACA,EAEA,MAAA,CACA,YAAA,CACA,KAAA,YAAA,KAAA,UACA,CACA,EAEA,QAAA,CACA,MAAAK,EAAAC,EAAA,CACA,MAAAC,EAAA,CAAA,EACAF,EAAAA,EAAA,EAAAA,EAAA,EACA,QAAAG,EAAAH,EAAAG,GAAAF,EAAAE,IACAD,EAAA,KAAAC,CAAA,EAEA,OAAAD,CACA,EAEA,WAAAE,EAAA,CACA,KAAA,YAAAA,EACA,KAAA,MAAA,SAAA,KAAA,WAAA,CACA,CACA,CACA"}
1
+ {"version":3,"file":"pagination.cjs","sources":["../../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n kind=\"muted\"\n importance=\"clear\"\n :disabled=\"isFirstPage\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template #icon>\n <dt-icon-chevron-left\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon-more-horizontal\n size=\"300\"\n />\n <!-- … -->\n </div>\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n importance=\"clear\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template #icon>\n <dt-icon-chevron-right\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconChevronLeft, DtIconChevronRight, DtIconMoreHorizontal } from '@dialpad/dialtone-icons/vue2';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIconChevronLeft,\n DtIconChevronRight,\n DtIconMoreHorizontal,\n },\n\n mixins: [DtLocalizationMixin],\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n\n /**\n * Sometimes you may need to hide start and end page number buttons when moving in between.\n * This prop will be used to hide the first and last page buttons when not near the edges.\n * This is useful when your backend does not support offset and you can only use cursor based pagination.\n */\n hideEdges: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n // eslint-disable-next-line complexity\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n let start = this.maxVisible - 1;\n let end = this.totalPages - start + 1;\n\n // if hideEdges is true, modify the start and\n // end to account for the hidden pages\n if (this.hideEdges) {\n start = start + 1;\n end = end - 1;\n }\n\n if (this.currentPage < start) {\n const pages = [...this.range(1, start), '...'];\n if (!this.hideEdges) {\n // add last page to the end\n pages.push(this.totalPages);\n }\n return pages;\n }\n\n if (this.currentPage > end) {\n const pages = ['...', ...this.range(end, this.totalPages)];\n if (!this.hideEdges) {\n // add first page to the beginning\n pages.unshift(1);\n }\n return pages;\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n let left = this.currentPage - centerIndex;\n let right = this.currentPage + centerIndex;\n\n // if hideEdge is true, modify the left and right to account for the hidden pages\n if (this.hideEdges) {\n left = left - 1;\n right = right + 1;\n }\n\n const pages = ['...', ...this.range(left, right), '...'];\n if (!this.hideEdges) {\n return [1, ...pages, this.totalPages];\n }\n return pages;\n },\n\n prevAriaLabel () {\n return this.isFirstPage ? this.i18n.$t('DIALTONE_PAGINATION_FIRST_PAGE') : this.i18n.$t('DIALTONE_PAGINATION_PREVIOUS_PAGE');\n },\n\n nextAriaLabel () {\n return this.isLastPage ? this.i18n.$t('DIALTONE_PAGINATION_LAST_PAGE') : this.i18n.$t('DIALTONE_PAGINATION_NEXT_PAGE');\n },\n\n pageNumberAriaLabel () {\n return (page) => {\n return page === this.totalPages ? `${this.i18n.$t('DIALTONE_PAGINATION_LAST_PAGE')} ${page}` : `${this.i18n.$t('DIALTONE_PAGINATION_PAGE_NUMBER', { page })}`;\n };\n },\n },\n\n watch: {\n activePage () {\n this.currentPage = this.activePage;\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconChevronLeft","DtIconChevronRight","DtIconMoreHorizontal","DtLocalizationMixin","start","end","pages","total","centerIndex","left","right","page","from","to","range","i"],"mappings":"wSA0EAA,EAAA,CACA,KAAA,eAEA,WAAA,CACA,SAAAC,EAAA,QACA,kBAAAC,EAAA,kBACA,mBAAAC,EAAA,mBACA,qBAAAC,EAAA,oBACA,EAEA,OAAA,CAAAC,EAAAA,OAAA,EAEA,MAAA,CAIA,UAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,WAAA,CACA,KAAA,OACA,SAAA,EACA,EAKA,WAAA,CACA,KAAA,OACA,QAAA,CACA,EAOA,WAAA,CACA,KAAA,OACA,QAAA,CACA,EAOA,UAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,EAEA,MAAA,CAOA,QACA,EAEA,MAAA,CACA,MAAA,CACA,YAAA,KAAA,UACA,CACA,EAEA,SAAA,CACA,aAAA,CACA,OAAA,KAAA,cAAA,CACA,EAEA,YAAA,CACA,OAAA,KAAA,cAAA,KAAA,UACA,EAGA,OAAA,CACA,GAAA,KAAA,aAAA,EACA,MAAA,GAEA,GAAA,KAAA,YAAA,KAAA,WACA,OAAA,KAAA,MAAA,EAAA,KAAA,UAAA,EAGA,IAAAC,EAAA,KAAA,WAAA,EACAC,EAAA,KAAA,WAAAD,EAAA,EASA,GALA,KAAA,YACAA,EAAAA,EAAA,EACAC,EAAAA,EAAA,GAGA,KAAA,YAAAD,EAAA,CACA,MAAAE,EAAA,CAAA,GAAA,KAAA,MAAA,EAAAF,CAAA,EAAA,KAAA,EACA,OAAA,KAAA,WAEAE,EAAA,KAAA,KAAA,UAAA,EAEAA,CACA,CAEA,GAAA,KAAA,YAAAD,EAAA,CACA,MAAAC,EAAA,CAAA,MAAA,GAAA,KAAA,MAAAD,EAAA,KAAA,UAAA,CAAA,EACA,OAAA,KAAA,WAEAC,EAAA,QAAA,CAAA,EAEAA,CACA,CAGA,MAAAC,EAAA,KAAA,YAAA,EAAA,KAAA,WAAA,GACAC,EAAA,KAAA,MAAAD,EAAA,CAAA,EACA,IAAAE,EAAA,KAAA,YAAAD,EACAE,EAAA,KAAA,YAAAF,EAGA,KAAA,YACAC,EAAAA,EAAA,EACAC,EAAAA,EAAA,GAGA,MAAAJ,EAAA,CAAA,MAAA,GAAA,KAAA,MAAAG,EAAAC,CAAA,EAAA,KAAA,EACA,OAAA,KAAA,UAGAJ,EAFA,CAAA,EAAA,GAAAA,EAAA,KAAA,UAAA,CAGA,EAEA,eAAA,CACA,OAAA,KAAA,YAAA,KAAA,KAAA,GAAA,gCAAA,EAAA,KAAA,KAAA,GAAA,mCAAA,CACA,EAEA,eAAA,CACA,OAAA,KAAA,WAAA,KAAA,KAAA,GAAA,+BAAA,EAAA,KAAA,KAAA,GAAA,+BAAA,CACA,EAEA,qBAAA,CACA,OAAAK,GACAA,IAAA,KAAA,WAAA,GAAA,KAAA,KAAA,GAAA,+BAAA,CAAA,IAAAA,CAAA,GAAA,GAAA,KAAA,KAAA,GAAA,kCAAA,CAAA,KAAAA,EAAA,CAAA,EAEA,CACA,EAEA,MAAA,CACA,YAAA,CACA,KAAA,YAAA,KAAA,UACA,CACA,EAEA,QAAA,CACA,MAAAC,EAAAC,EAAA,CACA,MAAAC,EAAA,CAAA,EACAF,EAAAA,EAAA,EAAAA,EAAA,EACA,QAAAG,EAAAH,EAAAG,GAAAF,EAAAE,IACAD,EAAA,KAAAC,CAAA,EAEA,OAAAD,CACA,EAEA,WAAAH,EAAA,CACA,KAAA,YAAAA,EACA,KAAA,MAAA,SAAA,KAAA,WAAA,CACA,CACA,CACA"}
@@ -1,14 +1,16 @@
1
- import { DtIconChevronLeft as c, DtIconChevronRight as u, DtIconMoreHorizontal as g } from "@dialpad/dialtone-icons/vue2";
2
- import { n as l } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
3
- import d from "../button/button.js";
4
- const h = {
1
+ import { DtIconChevronLeft as c, DtIconChevronRight as u, DtIconMoreHorizontal as l } from "@dialpad/dialtone-icons/vue2";
2
+ import { n as h } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
3
+ import g from "../button/button.js";
4
+ import d from "../../common/mixins/localization.js";
5
+ const P = {
5
6
  name: "DtPagination",
6
7
  components: {
7
- DtButton: d,
8
+ DtButton: g,
8
9
  DtIconChevronLeft: c,
9
10
  DtIconChevronRight: u,
10
- DtIconMoreHorizontal: g
11
+ DtIconMoreHorizontal: l
11
12
  },
13
+ mixins: [d],
12
14
  props: {
13
15
  /**
14
16
  * Descriptive label for the pagination content.
@@ -24,27 +26,6 @@ const h = {
24
26
  type: Number,
25
27
  required: !0
26
28
  },
27
- /**
28
- * Descriptive label for the previous button.
29
- */
30
- prevAriaLabel: {
31
- type: String,
32
- required: !0
33
- },
34
- /**
35
- * Descriptive label for the next button.
36
- */
37
- nextAriaLabel: {
38
- type: String,
39
- required: !0
40
- },
41
- /**
42
- * A method that will be called to get the aria label of each page.
43
- */
44
- pageNumberAriaLabel: {
45
- type: Function,
46
- required: !0
47
- },
48
29
  /**
49
30
  * The active current page in the list of pages, defaults to the first page
50
31
  */
@@ -92,25 +73,35 @@ const h = {
92
73
  isLastPage() {
93
74
  return this.currentPage === this.totalPages;
94
75
  },
76
+ // eslint-disable-next-line complexity
95
77
  pages() {
96
78
  if (this.maxVisible === 0)
97
79
  return [];
98
80
  if (this.totalPages <= this.maxVisible)
99
81
  return this.range(1, this.totalPages);
100
- let r = this.maxVisible - 1, t = this.totalPages - r + 1;
101
- if (this.hideEdges && (r = r + 1, t = t - 1), this.currentPage < r) {
102
- const n = [...this.range(1, r), "..."];
82
+ let e = this.maxVisible - 1, t = this.totalPages - e + 1;
83
+ if (this.hideEdges && (e = e + 1, t = t - 1), this.currentPage < e) {
84
+ const n = [...this.range(1, e), "..."];
103
85
  return this.hideEdges || n.push(this.totalPages), n;
104
86
  }
105
87
  if (this.currentPage > t) {
106
88
  const n = ["...", ...this.range(t, this.totalPages)];
107
89
  return this.hideEdges || n.unshift(1), n;
108
90
  }
109
- const a = this.maxVisible - (3 - this.maxVisible % 2), e = Math.floor(a / 2);
110
- let i = this.currentPage - e, s = this.currentPage + e;
111
- this.hideEdges && (i = i - 1, s = s + 1);
112
- const o = ["...", ...this.range(i, s), "..."];
91
+ const i = this.maxVisible - (3 - this.maxVisible % 2), a = Math.floor(i / 2);
92
+ let r = this.currentPage - a, s = this.currentPage + a;
93
+ this.hideEdges && (r = r - 1, s = s + 1);
94
+ const o = ["...", ...this.range(r, s), "..."];
113
95
  return this.hideEdges ? o : [1, ...o, this.totalPages];
96
+ },
97
+ prevAriaLabel() {
98
+ return this.isFirstPage ? this.i18n.$t("DIALTONE_PAGINATION_FIRST_PAGE") : this.i18n.$t("DIALTONE_PAGINATION_PREVIOUS_PAGE");
99
+ },
100
+ nextAriaLabel() {
101
+ return this.isLastPage ? this.i18n.$t("DIALTONE_PAGINATION_LAST_PAGE") : this.i18n.$t("DIALTONE_PAGINATION_NEXT_PAGE");
102
+ },
103
+ pageNumberAriaLabel() {
104
+ return (e) => e === this.totalPages ? `${this.i18n.$t("DIALTONE_PAGINATION_LAST_PAGE")} ${e}` : `${this.i18n.$t("DIALTONE_PAGINATION_PAGE_NUMBER", { page: e })}`;
114
105
  }
115
106
  },
116
107
  watch: {
@@ -119,40 +110,40 @@ const h = {
119
110
  }
120
111
  },
121
112
  methods: {
122
- range(r, t) {
123
- const a = [];
124
- r = r > 0 ? r : 1;
125
- for (let e = r; e <= t; e++)
126
- a.push(e);
127
- return a;
113
+ range(e, t) {
114
+ const i = [];
115
+ e = e > 0 ? e : 1;
116
+ for (let a = e; a <= t; a++)
117
+ i.push(a);
118
+ return i;
128
119
  },
129
- changePage(r) {
130
- this.currentPage = r, this.$emit("change", this.currentPage);
120
+ changePage(e) {
121
+ this.currentPage = e, this.$emit("change", this.currentPage);
131
122
  }
132
123
  }
133
124
  };
134
- var p = function() {
135
- var t = this, a = t._self._c;
136
- return a("nav", { staticClass: "d-pagination", attrs: { "aria-label": t.ariaLabel } }, [a("dt-button", { staticClass: "d-pagination__button", attrs: { "data-qa": "dt-pagination-prev", "aria-label": t.prevAriaLabel, kind: "muted", importance: "clear", disabled: t.isFirstPage }, on: { click: function(e) {
125
+ var _ = function() {
126
+ var t = this, i = t._self._c;
127
+ return i("nav", { staticClass: "d-pagination", attrs: { "aria-label": t.ariaLabel } }, [i("dt-button", { staticClass: "d-pagination__button", attrs: { "data-qa": "dt-pagination-prev", "aria-label": t.prevAriaLabel, kind: "muted", importance: "clear", disabled: t.isFirstPage }, on: { click: function(a) {
137
128
  return t.changePage(t.currentPage - 1);
138
129
  } }, scopedSlots: t._u([{ key: "icon", fn: function() {
139
- return [a("dt-icon-chevron-left", { attrs: { size: "300" } })];
140
- }, proxy: !0 }]) }), t._l(t.pages, function(e, i) {
141
- return a("div", { key: `page-${e}-${i}`, class: { "d-pagination__separator": isNaN(Number(e)) } }, [isNaN(Number(e)) ? a("div", { staticClass: "d-pagination__separator-icon", attrs: { "data-qa": "dt-pagination-separator" } }, [a("dt-icon-more-horizontal", { attrs: { size: "300" } })], 1) : a("dt-button", { attrs: { "aria-label": t.pageNumberAriaLabel(e), kind: t.currentPage === e ? "default" : "muted", importance: t.currentPage === e ? "primary" : "clear", "label-class": "" }, on: { click: function(s) {
142
- return t.changePage(e);
143
- } } }, [t._v(" " + t._s(e) + " ")])], 1);
144
- }), a("dt-button", { staticClass: "d-pagination__button", attrs: { "data-qa": "dt-pagination-next", "aria-label": t.nextAriaLabel, disabled: t.isLastPage, kind: "muted", importance: "clear" }, on: { click: function(e) {
130
+ return [i("dt-icon-chevron-left", { attrs: { size: "300" } })];
131
+ }, proxy: !0 }]) }), t._l(t.pages, function(a, r) {
132
+ return i("div", { key: `page-${a}-${r}`, class: { "d-pagination__separator": isNaN(Number(a)) } }, [isNaN(Number(a)) ? i("div", { staticClass: "d-pagination__separator-icon", attrs: { "data-qa": "dt-pagination-separator" } }, [i("dt-icon-more-horizontal", { attrs: { size: "300" } })], 1) : i("dt-button", { attrs: { "aria-label": t.pageNumberAriaLabel(a), kind: t.currentPage === a ? "default" : "muted", importance: t.currentPage === a ? "primary" : "clear", "label-class": "" }, on: { click: function(s) {
133
+ return t.changePage(a);
134
+ } } }, [t._v(" " + t._s(a) + " ")])], 1);
135
+ }), i("dt-button", { staticClass: "d-pagination__button", attrs: { "data-qa": "dt-pagination-next", "aria-label": t.nextAriaLabel, disabled: t.isLastPage, kind: "muted", importance: "clear" }, on: { click: function(a) {
145
136
  return t.changePage(t.currentPage + 1);
146
137
  } }, scopedSlots: t._u([{ key: "icon", fn: function() {
147
- return [a("dt-icon-chevron-right", { attrs: { size: "300" } })];
138
+ return [i("dt-icon-chevron-right", { attrs: { size: "300" } })];
148
139
  }, proxy: !0 }]) })], 2);
149
- }, m = [], P = /* @__PURE__ */ l(
150
- h,
151
- p,
152
- m
140
+ }, p = [], m = /* @__PURE__ */ h(
141
+ P,
142
+ _,
143
+ p
153
144
  );
154
- const v = P.exports;
145
+ const I = m.exports;
155
146
  export {
156
- v as default
147
+ I as default
157
148
  };
158
149
  //# sourceMappingURL=pagination.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.js","sources":["../../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n kind=\"muted\"\n importance=\"clear\"\n :disabled=\"isFirstPage\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template #icon>\n <dt-icon-chevron-left\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon-more-horizontal\n size=\"300\"\n />\n <!-- … -->\n </div>\n <!-- eslint-enable vue/no-bare-strings-in-template -->\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n importance=\"clear\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template #icon>\n <dt-icon-chevron-right\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconChevronLeft, DtIconChevronRight, DtIconMoreHorizontal } from '@dialpad/dialtone-icons/vue2';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIconChevronLeft,\n DtIconChevronRight,\n DtIconMoreHorizontal,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * Descriptive label for the previous button.\n */\n prevAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the next button.\n */\n nextAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * A method that will be called to get the aria label of each page.\n */\n pageNumberAriaLabel: {\n type: Function,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n\n /**\n * Sometimes you may need to hide start and end page number buttons when moving in between.\n * This prop will be used to hide the first and last page buttons when not near the edges.\n * This is useful when your backend does not support offset and you can only use cursor based pagination.\n */\n hideEdges: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n let start = this.maxVisible - 1;\n let end = this.totalPages - start + 1;\n\n // if hideEdges is true, modify the start and\n // end to account for the hidden pages\n if (this.hideEdges) {\n start = start + 1;\n end = end - 1;\n }\n\n if (this.currentPage < start) {\n const pages = [...this.range(1, start), '...'];\n if (!this.hideEdges) {\n // add last page to the end\n pages.push(this.totalPages);\n }\n return pages;\n }\n\n if (this.currentPage > end) {\n const pages = ['...', ...this.range(end, this.totalPages)];\n if (!this.hideEdges) {\n // add first page to the beginning\n pages.unshift(1);\n }\n return pages;\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n let left = this.currentPage - centerIndex;\n let right = this.currentPage + centerIndex;\n\n // if hideEdge is true, modify the left and right to account for the hidden pages\n if (this.hideEdges) {\n left = left - 1;\n right = right + 1;\n }\n\n const pages = ['...', ...this.range(left, right), '...'];\n if (!this.hideEdges) {\n return [1, ...pages, this.totalPages];\n }\n return pages;\n },\n },\n\n watch: {\n activePage () {\n this.currentPage = this.activePage;\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconChevronLeft","DtIconChevronRight","DtIconMoreHorizontal","start","end","pages","total","centerIndex","left","right","from","to","range","i","page"],"mappings":";;;AA0EA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,sBAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,aAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,cAAA;AACA,aAAA,KAAA,gBAAA;AAAA,IACA;AAAA,IAEA,aAAA;AACA,aAAA,KAAA,gBAAA,KAAA;AAAA,IACA;AAAA,IAEA,QAAA;AACA,UAAA,KAAA,eAAA;AACA,eAAA;AAEA,UAAA,KAAA,cAAA,KAAA;AACA,eAAA,KAAA,MAAA,GAAA,KAAA,UAAA;AAGA,UAAAC,IAAA,KAAA,aAAA,GACAC,IAAA,KAAA,aAAAD,IAAA;AASA,UALA,KAAA,cACAA,IAAAA,IAAA,GACAC,IAAAA,IAAA,IAGA,KAAA,cAAAD,GAAA;AACA,cAAAE,IAAA,CAAA,GAAA,KAAA,MAAA,GAAAF,CAAA,GAAA,KAAA;AACA,eAAA,KAAA,aAEAE,EAAA,KAAA,KAAA,UAAA,GAEAA;AAAA,MACA;AAEA,UAAA,KAAA,cAAAD,GAAA;AACA,cAAAC,IAAA,CAAA,OAAA,GAAA,KAAA,MAAAD,GAAA,KAAA,UAAA,CAAA;AACA,eAAA,KAAA,aAEAC,EAAA,QAAA,CAAA,GAEAA;AAAA,MACA;AAGA,YAAAC,IAAA,KAAA,cAAA,IAAA,KAAA,aAAA,IACAC,IAAA,KAAA,MAAAD,IAAA,CAAA;AACA,UAAAE,IAAA,KAAA,cAAAD,GACAE,IAAA,KAAA,cAAAF;AAGA,MAAA,KAAA,cACAC,IAAAA,IAAA,GACAC,IAAAA,IAAA;AAGA,YAAAJ,IAAA,CAAA,OAAA,GAAA,KAAA,MAAAG,GAAAC,CAAA,GAAA,KAAA;AACA,aAAA,KAAA,YAGAJ,IAFA,CAAA,GAAA,GAAAA,GAAA,KAAA,UAAA;AAAA,IAGA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,aAAA;AACA,WAAA,cAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,MAAAK,GAAAC,GAAA;AACA,YAAAC,IAAA,CAAA;AACA,MAAAF,IAAAA,IAAA,IAAAA,IAAA;AACA,eAAAG,IAAAH,GAAAG,KAAAF,GAAAE;AACA,QAAAD,EAAA,KAAAC,CAAA;AAEA,aAAAD;AAAA,IACA;AAAA,IAEA,WAAAE,GAAA;AACA,WAAA,cAAAA,GACA,KAAA,MAAA,UAAA,KAAA,WAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"pagination.js","sources":["../../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n kind=\"muted\"\n importance=\"clear\"\n :disabled=\"isFirstPage\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template #icon>\n <dt-icon-chevron-left\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon-more-horizontal\n size=\"300\"\n />\n <!-- … -->\n </div>\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n importance=\"clear\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template #icon>\n <dt-icon-chevron-right\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconChevronLeft, DtIconChevronRight, DtIconMoreHorizontal } from '@dialpad/dialtone-icons/vue2';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIconChevronLeft,\n DtIconChevronRight,\n DtIconMoreHorizontal,\n },\n\n mixins: [DtLocalizationMixin],\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n\n /**\n * Sometimes you may need to hide start and end page number buttons when moving in between.\n * This prop will be used to hide the first and last page buttons when not near the edges.\n * This is useful when your backend does not support offset and you can only use cursor based pagination.\n */\n hideEdges: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n // eslint-disable-next-line complexity\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n let start = this.maxVisible - 1;\n let end = this.totalPages - start + 1;\n\n // if hideEdges is true, modify the start and\n // end to account for the hidden pages\n if (this.hideEdges) {\n start = start + 1;\n end = end - 1;\n }\n\n if (this.currentPage < start) {\n const pages = [...this.range(1, start), '...'];\n if (!this.hideEdges) {\n // add last page to the end\n pages.push(this.totalPages);\n }\n return pages;\n }\n\n if (this.currentPage > end) {\n const pages = ['...', ...this.range(end, this.totalPages)];\n if (!this.hideEdges) {\n // add first page to the beginning\n pages.unshift(1);\n }\n return pages;\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n let left = this.currentPage - centerIndex;\n let right = this.currentPage + centerIndex;\n\n // if hideEdge is true, modify the left and right to account for the hidden pages\n if (this.hideEdges) {\n left = left - 1;\n right = right + 1;\n }\n\n const pages = ['...', ...this.range(left, right), '...'];\n if (!this.hideEdges) {\n return [1, ...pages, this.totalPages];\n }\n return pages;\n },\n\n prevAriaLabel () {\n return this.isFirstPage ? this.i18n.$t('DIALTONE_PAGINATION_FIRST_PAGE') : this.i18n.$t('DIALTONE_PAGINATION_PREVIOUS_PAGE');\n },\n\n nextAriaLabel () {\n return this.isLastPage ? this.i18n.$t('DIALTONE_PAGINATION_LAST_PAGE') : this.i18n.$t('DIALTONE_PAGINATION_NEXT_PAGE');\n },\n\n pageNumberAriaLabel () {\n return (page) => {\n return page === this.totalPages ? `${this.i18n.$t('DIALTONE_PAGINATION_LAST_PAGE')} ${page}` : `${this.i18n.$t('DIALTONE_PAGINATION_PAGE_NUMBER', { page })}`;\n };\n },\n },\n\n watch: {\n activePage () {\n this.currentPage = this.activePage;\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconChevronLeft","DtIconChevronRight","DtIconMoreHorizontal","DtLocalizationMixin","start","end","pages","total","centerIndex","left","right","page","from","to","range","i"],"mappings":";;;;AA0EA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,sBAAAC;AAAA,EACA;AAAA,EAEA,QAAA,CAAAC,CAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,aAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,cAAA;AACA,aAAA,KAAA,gBAAA;AAAA,IACA;AAAA,IAEA,aAAA;AACA,aAAA,KAAA,gBAAA,KAAA;AAAA,IACA;AAAA;AAAA,IAGA,QAAA;AACA,UAAA,KAAA,eAAA;AACA,eAAA;AAEA,UAAA,KAAA,cAAA,KAAA;AACA,eAAA,KAAA,MAAA,GAAA,KAAA,UAAA;AAGA,UAAAC,IAAA,KAAA,aAAA,GACAC,IAAA,KAAA,aAAAD,IAAA;AASA,UALA,KAAA,cACAA,IAAAA,IAAA,GACAC,IAAAA,IAAA,IAGA,KAAA,cAAAD,GAAA;AACA,cAAAE,IAAA,CAAA,GAAA,KAAA,MAAA,GAAAF,CAAA,GAAA,KAAA;AACA,eAAA,KAAA,aAEAE,EAAA,KAAA,KAAA,UAAA,GAEAA;AAAA,MACA;AAEA,UAAA,KAAA,cAAAD,GAAA;AACA,cAAAC,IAAA,CAAA,OAAA,GAAA,KAAA,MAAAD,GAAA,KAAA,UAAA,CAAA;AACA,eAAA,KAAA,aAEAC,EAAA,QAAA,CAAA,GAEAA;AAAA,MACA;AAGA,YAAAC,IAAA,KAAA,cAAA,IAAA,KAAA,aAAA,IACAC,IAAA,KAAA,MAAAD,IAAA,CAAA;AACA,UAAAE,IAAA,KAAA,cAAAD,GACAE,IAAA,KAAA,cAAAF;AAGA,MAAA,KAAA,cACAC,IAAAA,IAAA,GACAC,IAAAA,IAAA;AAGA,YAAAJ,IAAA,CAAA,OAAA,GAAA,KAAA,MAAAG,GAAAC,CAAA,GAAA,KAAA;AACA,aAAA,KAAA,YAGAJ,IAFA,CAAA,GAAA,GAAAA,GAAA,KAAA,UAAA;AAAA,IAGA;AAAA,IAEA,gBAAA;AACA,aAAA,KAAA,cAAA,KAAA,KAAA,GAAA,gCAAA,IAAA,KAAA,KAAA,GAAA,mCAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,aAAA,KAAA,aAAA,KAAA,KAAA,GAAA,+BAAA,IAAA,KAAA,KAAA,GAAA,+BAAA;AAAA,IACA;AAAA,IAEA,sBAAA;AACA,aAAA,CAAAK,MACAA,MAAA,KAAA,aAAA,GAAA,KAAA,KAAA,GAAA,+BAAA,CAAA,IAAAA,CAAA,KAAA,GAAA,KAAA,KAAA,GAAA,mCAAA,EAAA,MAAAA,GAAA,CAAA;AAAA,IAEA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,aAAA;AACA,WAAA,cAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,MAAAC,GAAAC,GAAA;AACA,YAAAC,IAAA,CAAA;AACA,MAAAF,IAAAA,IAAA,IAAAA,IAAA;AACA,eAAAG,IAAAH,GAAAG,KAAAF,GAAAE;AACA,QAAAD,EAAA,KAAAC,CAAA;AAEA,aAAAD;AAAA,IACA;AAAA,IAEA,WAAAH,GAAA;AACA,WAAA,cAAAA,GACA,KAAA,MAAA,UAAA,KAAA,WAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("@dialpad/dialtone-icons/vue2"),n=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),s=require("../button/button.cjs"),c={name:"PopoverHeaderFooter",components:{DtButton:s.default,DtIconClose:r.DtIconClose},props:{type:{type:String,validator:function(t){return["header","footer"].includes(t)}},contentClass:{type:[String,Array,Object],default:""},showCloseButton:{type:Boolean,default:!1},closeButtonProps:{type:Object,default:()=>{}}},emits:["close"],methods:{focusCloseButton(){var e;const t=(e=this.$refs["popover__close-button"])==null?void 0:e.$el;t==null||t.focus()}}};var a=function(){var e=this,o=e._self._c;return o("div",{class:{"d-popover__header":e.type==="header","d-popover__footer":e.type==="footer"},attrs:{"data-qa":"dt-popover-header-footer"}},[e.$slots.content?o("div",{class:[{"d-popover__header__content":e.type==="header","d-popover__footer__content":e.type==="footer"},e.contentClass],attrs:{"data-qa":"dt-popover-header-footer-content"}},[e._t("content")],2):e._e(),e.showCloseButton?o("dt-button",e._b({ref:"popover__close-button",class:{"d-popover__header__close-button":e.type==="header","d-popover__footer__close-button":e.type==="footer"},attrs:{"data-qa":"dt-popover-close",importance:"outlined",kind:"muted",circle:""},on:{click:function(d){return e.$emit("close")}},scopedSlots:e._u([{key:"icon",fn:function(){return[o("dt-icon-close",{attrs:{size:"300"}})]},proxy:!0}],null,!1,2465905460)},"dt-button",e.closeButtonProps,!1)):e._e()],1)},_=[],l=n.n(c,a,_);const p=l.exports;exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("@dialpad/dialtone-icons/vue2"),n=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),s=require("../button/button.cjs"),c=require("../../common/mixins/localization.cjs"),a={name:"PopoverHeaderFooter",components:{DtButton:s.default,DtIconClose:r.DtIconClose},mixins:[c.default],props:{type:{type:String,validator:function(t){return["header","footer"].includes(t)}},contentClass:{type:[String,Array,Object],default:""},showCloseButton:{type:Boolean,default:!1}},emits:["close"],computed:{closeButtonTitle(){return this.i18n.$t("DIALTONE_CLOSE_BUTTON")}},methods:{focusCloseButton(){var e;const t=(e=this.$refs["popover__close-button"])==null?void 0:e.$el;t==null||t.focus()}}};var l=function(){var e=this,o=e._self._c;return o("div",{class:{"d-popover__header":e.type==="header","d-popover__footer":e.type==="footer"},attrs:{"data-qa":"dt-popover-header-footer"}},[e.$slots.content?o("div",{class:[{"d-popover__header__content":e.type==="header","d-popover__footer__content":e.type==="footer"},e.contentClass],attrs:{"data-qa":"dt-popover-header-footer-content"}},[e._t("content")],2):e._e(),e.showCloseButton?o("dt-button",{ref:"popover__close-button",class:{"d-popover__header__close-button":e.type==="header","d-popover__footer__close-button":e.type==="footer"},attrs:{"data-qa":"dt-popover-close",importance:"outlined",kind:"muted",circle:"","aria-label":e.closeButtonTitle,title:e.closeButtonTitle},on:{click:function(d){return e.$emit("close")}},scopedSlots:e._u([{key:"icon",fn:function(){return[o("dt-icon-close",{attrs:{size:"300"}})]},proxy:!0}],null,!1,2465905460)}):e._e()],1)},_=[],u=n.n(a,l,_);const i=u.exports;exports.default=i;
2
2
  //# sourceMappingURL=popover-header-footer.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover-header-footer.cjs","sources":["../../../components/popover/popover_header_footer.vue"],"sourcesContent":["<template>\n <div\n data-qa=\"dt-popover-header-footer\"\n :class=\"{\n 'd-popover__header': type === 'header',\n 'd-popover__footer': type === 'footer',\n }\"\n >\n <div\n v-if=\"$slots.content\"\n data-qa=\"dt-popover-header-footer-content\"\n :class=\"[{\n 'd-popover__header__content': type === 'header',\n 'd-popover__footer__content': type === 'footer',\n }, contentClass]\"\n >\n <!-- @slot Slot for main content -->\n <slot name=\"content\" />\n </div>\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"popover__close-button\"\n data-qa=\"dt-popover-close\"\n :class=\"{\n 'd-popover__header__close-button': type === 'header',\n 'd-popover__footer__close-button': type === 'footer',\n }\"\n importance=\"outlined\"\n kind=\"muted\"\n circle\n v-bind=\"closeButtonProps\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon-close\n size=\"300\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue2';\n\nexport default {\n name: 'PopoverHeaderFooter',\n components: {\n DtButton,\n DtIconClose,\n },\n\n props: {\n // eslint-disable-next-line vue/require-default-prop\n type: {\n type: String,\n validator: function (value) {\n return ['header', 'footer'].includes(value);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * A set of props to be passed into the popover's header close button.\n * Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: () => {},\n },\n },\n\n emits: [\n /**\n * Emitted when popover is closed\n *\n * @event close\n * @type { Boolean }\n */\n 'close',\n ],\n\n methods: {\n focusCloseButton () {\n const closeButton = this.$refs['popover__close-button']?.$el;\n closeButton?.focus();\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconClose","value","closeButton","_a"],"mappings":"sPA8CAA,EAAA,CACA,KAAA,sBACA,WAAA,CACA,SAAAC,EAAA,QACA,YAAAC,EAAA,WACA,EAEA,MAAA,CAEA,KAAA,CACA,KAAA,OACA,UAAA,SAAAC,EAAA,CACA,MAAA,CAAA,SAAA,QAAA,EAAA,SAAAA,CAAA,CACA,CACA,EAKA,aAAA,CACA,KAAA,CAAA,OAAA,MAAA,MAAA,EACA,QAAA,EACA,EAMA,gBAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,iBAAA,CACA,KAAA,OACA,QAAA,IAAA,CAAA,CACA,CACA,EAEA,MAAA,CAOA,OACA,EAEA,QAAA,CACA,kBAAA,OACA,MAAAC,GAAAC,EAAA,KAAA,MAAA,uBAAA,IAAA,YAAAA,EAAA,IACAD,GAAA,MAAAA,EAAA,OACA,CACA,CACA"}
1
+ {"version":3,"file":"popover-header-footer.cjs","sources":["../../../components/popover/popover_header_footer.vue"],"sourcesContent":["<template>\n <div\n data-qa=\"dt-popover-header-footer\"\n :class=\"{\n 'd-popover__header': type === 'header',\n 'd-popover__footer': type === 'footer',\n }\"\n >\n <div\n v-if=\"$slots.content\"\n data-qa=\"dt-popover-header-footer-content\"\n :class=\"[{\n 'd-popover__header__content': type === 'header',\n 'd-popover__footer__content': type === 'footer',\n }, contentClass]\"\n >\n <!-- @slot Slot for main content -->\n <slot name=\"content\" />\n </div>\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"popover__close-button\"\n data-qa=\"dt-popover-close\"\n :class=\"{\n 'd-popover__header__close-button': type === 'header',\n 'd-popover__footer__close-button': type === 'footer',\n }\"\n importance=\"outlined\"\n kind=\"muted\"\n circle\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon-close\n size=\"300\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue2';\nimport { DtLocalizationMixin } from '@/common/mixins';\n\nexport default {\n name: 'PopoverHeaderFooter',\n components: {\n DtButton,\n DtIconClose,\n },\n\n mixins: [DtLocalizationMixin],\n\n props: {\n // eslint-disable-next-line vue/require-default-prop\n type: {\n type: String,\n validator: function (value) {\n return ['header', 'footer'].includes(value);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Emitted when popover is closed\n *\n * @event close\n * @type { Boolean }\n */\n 'close',\n ],\n\n computed: {\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n methods: {\n focusCloseButton () {\n const closeButton = this.$refs['popover__close-button']?.$el;\n closeButton?.focus();\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtButton","DtIconClose","DtLocalizationMixin","value","closeButton","_a"],"mappings":"wSAgDAA,EAAA,CACA,KAAA,sBACA,WAAA,CACA,SAAAC,EAAA,QACA,YAAAC,EAAA,WACA,EAEA,OAAA,CAAAC,EAAAA,OAAA,EAEA,MAAA,CAEA,KAAA,CACA,KAAA,OACA,UAAA,SAAAC,EAAA,CACA,MAAA,CAAA,SAAA,QAAA,EAAA,SAAAA,CAAA,CACA,CACA,EAKA,aAAA,CACA,KAAA,CAAA,OAAA,MAAA,MAAA,EACA,QAAA,EACA,EAMA,gBAAA,CACA,KAAA,QACA,QAAA,EACA,CACA,EAEA,MAAA,CAOA,OACA,EAEA,SAAA,CACA,kBAAA,CACA,OAAA,KAAA,KAAA,GAAA,uBAAA,CACA,CACA,EAEA,QAAA,CACA,kBAAA,OACA,MAAAC,GAAAC,EAAA,KAAA,MAAA,uBAAA,IAAA,YAAAA,EAAA,IACAD,GAAA,MAAAA,EAAA,OACA,CACA,CACA"}