@dialpad/dialtone-vue 2.126.0 → 2.127.1

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 (425) hide show
  1. package/dist/chunks/_plugin-vue2_normalizer-1aBeR4AK.js +59 -0
  2. package/dist/chunks/_plugin-vue2_normalizer-1aBeR4AK.js.map +1 -0
  3. package/dist/chunks/_plugin-vue2_normalizer-sOSkiPF3.js +60 -0
  4. package/dist/chunks/_plugin-vue2_normalizer-sOSkiPF3.js.map +1 -0
  5. package/dist/chunks/{dropdown-SMWaTWyF.js → dropdown-DTtcQEFC.js} +131 -84
  6. package/dist/chunks/{dropdown-SMWaTWyF.js.map → dropdown-DTtcQEFC.js.map} +1 -1
  7. package/dist/chunks/dropdown-IaLNHmVd.js +403 -0
  8. package/dist/chunks/dropdown-IaLNHmVd.js.map +1 -0
  9. package/dist/chunks/dropdown_constants-2pGCXy7m.js +8 -0
  10. package/dist/chunks/dropdown_constants-2pGCXy7m.js.map +1 -0
  11. package/dist/chunks/dropdown_constants-w1MXGC3Z.js +9 -0
  12. package/dist/chunks/dropdown_constants-w1MXGC3Z.js.map +1 -0
  13. package/dist/chunks/{icon_constants-OpYAAKwF.js → icon_constants-Dy4MEUJL.js} +7 -6
  14. package/dist/chunks/{icon_constants-OpYAAKwF.js.map → icon_constants-Dy4MEUJL.js.map} +1 -1
  15. package/dist/chunks/icon_constants-QYpmdE0R.js +16 -0
  16. package/dist/chunks/icon_constants-QYpmdE0R.js.map +1 -0
  17. package/dist/chunks/index-DUr1xHR0.js +442 -0
  18. package/dist/chunks/{index-nIyl_PL6.js.map → index-DUr1xHR0.js.map} +1 -1
  19. package/dist/chunks/index-IA-Z8fgm.js +441 -0
  20. package/dist/chunks/index-IA-Z8fgm.js.map +1 -0
  21. package/dist/chunks/{input-1tm09l_-.js → input-6kbd8Pju.js} +83 -60
  22. package/dist/chunks/{input-1tm09l_-.js.map → input-6kbd8Pju.js.map} +1 -1
  23. package/dist/chunks/input-Axw-wFj2.js +295 -0
  24. package/dist/chunks/input-Axw-wFj2.js.map +1 -0
  25. package/dist/chunks/input_group-m3cWYUfI.js +143 -0
  26. package/dist/chunks/{input_group-zcAq3DQl.js.map → input_group-m3cWYUfI.js.map} +1 -1
  27. package/dist/chunks/{input_group-zcAq3DQl.js → input_group-qVZaS5Bb.js} +27 -24
  28. package/dist/chunks/input_group-qVZaS5Bb.js.map +1 -0
  29. package/dist/chunks/keyboard_list_navigation-ScXhrxya.js +284 -0
  30. package/dist/chunks/{keyboard_list_navigation-F0O8nht0.js.map → keyboard_list_navigation-ScXhrxya.js.map} +1 -1
  31. package/dist/chunks/keyboard_list_navigation-fJnl_Iox.js +283 -0
  32. package/dist/chunks/keyboard_list_navigation-fJnl_Iox.js.map +1 -0
  33. package/dist/chunks/link_constants-Huj7D_hm.js +22 -0
  34. package/dist/chunks/{link_constants-vIUB92L4.js.map → link_constants-Huj7D_hm.js.map} +1 -1
  35. package/dist/chunks/link_constants-nWVlXQBs.js +23 -0
  36. package/dist/chunks/link_constants-nWVlXQBs.js.map +1 -0
  37. package/dist/chunks/list_item_constants-EiqkqZvP.js +13 -0
  38. package/dist/chunks/{list_item_constants-LTUc74pD.js.map → list_item_constants-EiqkqZvP.js.map} +1 -1
  39. package/dist/chunks/list_item_constants-u1xcN9Dd.js +14 -0
  40. package/dist/chunks/list_item_constants-u1xcN9Dd.js.map +1 -0
  41. package/dist/chunks/modal-VgxXAQFP.js +105 -0
  42. package/dist/chunks/{modal-VuMFkZFH.js.map → modal-VgxXAQFP.js.map} +1 -1
  43. package/dist/chunks/modal-XOr4kiNZ.js +106 -0
  44. package/dist/chunks/modal-XOr4kiNZ.js.map +1 -0
  45. package/dist/chunks/notice_action-IRUoLX2d.js +196 -0
  46. package/dist/chunks/{notice_action-9NmtQRai.js.map → notice_action-IRUoLX2d.js.map} +1 -1
  47. package/dist/chunks/notice_action-P6uDyE9x.js +195 -0
  48. package/dist/chunks/notice_action-P6uDyE9x.js.map +1 -0
  49. package/dist/chunks/notice_constants-7Qt2CQEY.js +7 -0
  50. package/dist/chunks/{notice_constants-c--hBFQw.js.map → notice_constants-7Qt2CQEY.js.map} +1 -1
  51. package/dist/chunks/notice_constants-UXo9e3bS.js +6 -0
  52. package/dist/chunks/notice_constants-UXo9e3bS.js.map +1 -0
  53. package/dist/chunks/popover_constants-JwBF9h1Z.js +143 -0
  54. package/dist/chunks/{popover_constants-qjlEkroB.js.map → popover_constants-JwBF9h1Z.js.map} +1 -1
  55. package/dist/chunks/popover_constants-Qkpb0yh2.js +144 -0
  56. package/dist/chunks/popover_constants-Qkpb0yh2.js.map +1 -0
  57. package/dist/chunks/sr_only_close_button-81bHIpPu.js +95 -0
  58. package/dist/chunks/{sr_only_close_button-JGole5Xi.js.map → sr_only_close_button-81bHIpPu.js.map} +1 -1
  59. package/dist/chunks/sr_only_close_button-ZaGdAHz7.js +94 -0
  60. package/dist/chunks/sr_only_close_button-ZaGdAHz7.js.map +1 -0
  61. package/dist/chunks/stack_constants-HraCekPm.js +15 -0
  62. package/dist/chunks/{stack_constants-u7tNqGtc.js.map → stack_constants-HraCekPm.js.map} +1 -1
  63. package/dist/chunks/stack_constants-SMzMWnAQ.js +14 -0
  64. package/dist/chunks/stack_constants-SMzMWnAQ.js.map +1 -0
  65. package/dist/chunks/tab-FcsV5VmK.js +386 -0
  66. package/dist/chunks/tab-FcsV5VmK.js.map +1 -0
  67. package/dist/chunks/tab-V4cb44Ry.js +387 -0
  68. package/dist/chunks/{tab-Qm9LVkYj.js.map → tab-V4cb44Ry.js.map} +1 -1
  69. package/dist/common/constants.cjs +60 -0
  70. package/dist/common/constants.cjs.map +1 -0
  71. package/dist/{lib → common}/constants.js +25 -18
  72. package/dist/{lib → common}/constants.js.map +1 -1
  73. package/dist/common/dates.cjs +72 -0
  74. package/dist/common/dates.cjs.map +1 -0
  75. package/dist/common/dates.js +72 -0
  76. package/dist/{lib → common}/dates.js.map +1 -1
  77. package/dist/common/emoji.cjs +163 -0
  78. package/dist/common/emoji.cjs.map +1 -0
  79. package/dist/common/emoji.js +168 -0
  80. package/dist/common/emoji.js.map +1 -0
  81. package/dist/common/mixins.cjs +17 -0
  82. package/dist/common/mixins.cjs.map +1 -0
  83. package/dist/common/mixins.js +17 -0
  84. package/dist/common/utils.cjs +237 -0
  85. package/dist/common/utils.cjs.map +1 -0
  86. package/dist/common/utils.js +237 -0
  87. package/dist/{lib → common}/utils.js.map +1 -1
  88. package/dist/common/validators.cjs +23 -0
  89. package/dist/common/validators.cjs.map +1 -0
  90. package/dist/common/validators.js +23 -0
  91. package/dist/{lib → common}/validators.js.map +1 -1
  92. package/dist/component-documentation.json +1 -1
  93. package/dist/dialtone-vue.cjs +373 -0
  94. package/dist/dialtone-vue.cjs.map +1 -0
  95. package/dist/dialtone-vue.js +325 -324
  96. package/dist/dialtone-vue.js.map +1 -1
  97. package/dist/lib/attachment-carousel.cjs +261 -0
  98. package/dist/lib/attachment-carousel.cjs.map +1 -0
  99. package/dist/lib/attachment-carousel.js +96 -85
  100. package/dist/lib/attachment-carousel.js.map +1 -1
  101. package/dist/lib/avatar.cjs +400 -0
  102. package/dist/lib/avatar.cjs.map +1 -0
  103. package/dist/lib/avatar.js +111 -80
  104. package/dist/lib/avatar.js.map +1 -1
  105. package/dist/lib/badge.cjs +183 -0
  106. package/dist/lib/badge.cjs.map +1 -0
  107. package/dist/lib/badge.js +53 -39
  108. package/dist/lib/badge.js.map +1 -1
  109. package/dist/lib/banner.cjs +210 -0
  110. package/dist/lib/banner.cjs.map +1 -0
  111. package/dist/lib/banner.js +58 -48
  112. package/dist/lib/banner.js.map +1 -1
  113. package/dist/lib/breadcrumbs.cjs +147 -0
  114. package/dist/lib/breadcrumbs.cjs.map +1 -0
  115. package/dist/lib/breadcrumbs.js +57 -48
  116. package/dist/lib/breadcrumbs.js.map +1 -1
  117. package/dist/lib/button-group.cjs +48 -0
  118. package/dist/lib/button-group.cjs.map +1 -0
  119. package/dist/lib/button-group.js +21 -18
  120. package/dist/lib/button-group.js.map +1 -1
  121. package/dist/lib/button.cjs +350 -0
  122. package/dist/lib/button.cjs.map +1 -0
  123. package/dist/lib/button.js +98 -76
  124. package/dist/lib/button.js.map +1 -1
  125. package/dist/lib/callbar-button-with-popover.cjs +250 -0
  126. package/dist/lib/callbar-button-with-popover.cjs.map +1 -0
  127. package/dist/lib/callbar-button-with-popover.js +66 -51
  128. package/dist/lib/callbar-button-with-popover.js.map +1 -1
  129. package/dist/lib/callbar-button.cjs +183 -0
  130. package/dist/lib/callbar-button.cjs.map +1 -0
  131. package/dist/lib/callbar-button.js +42 -34
  132. package/dist/lib/callbar-button.js.map +1 -1
  133. package/dist/lib/callbox.cjs +147 -0
  134. package/dist/lib/callbox.cjs.map +1 -0
  135. package/dist/lib/callbox.js +38 -33
  136. package/dist/lib/callbox.js.map +1 -1
  137. package/dist/lib/card.cjs +74 -0
  138. package/dist/lib/card.cjs.map +1 -0
  139. package/dist/lib/card.js +22 -20
  140. package/dist/lib/card.js.map +1 -1
  141. package/dist/lib/checkbox-group.cjs +130 -0
  142. package/dist/lib/checkbox-group.cjs.map +1 -0
  143. package/dist/lib/checkbox-group.js +42 -29
  144. package/dist/lib/checkbox-group.js.map +1 -1
  145. package/dist/lib/checkbox.cjs +128 -0
  146. package/dist/lib/checkbox.cjs.map +1 -0
  147. package/dist/lib/checkbox.js +46 -35
  148. package/dist/lib/checkbox.js.map +1 -1
  149. package/dist/lib/chip.cjs +199 -0
  150. package/dist/lib/chip.cjs.map +1 -0
  151. package/dist/lib/chip.js +59 -46
  152. package/dist/lib/chip.js.map +1 -1
  153. package/dist/lib/codeblock.cjs +30 -0
  154. package/dist/lib/codeblock.cjs.map +1 -0
  155. package/dist/lib/codeblock.js +15 -14
  156. package/dist/lib/codeblock.js.map +1 -1
  157. package/dist/lib/collapsible.cjs +335 -0
  158. package/dist/lib/collapsible.cjs.map +1 -0
  159. package/dist/lib/collapsible.js +91 -69
  160. package/dist/lib/collapsible.js.map +1 -1
  161. package/dist/lib/combobox-multi-select.cjs +520 -0
  162. package/dist/lib/combobox-multi-select.cjs.map +1 -0
  163. package/dist/lib/combobox-multi-select.js +223 -136
  164. package/dist/lib/combobox-multi-select.js.map +1 -1
  165. package/dist/lib/combobox-with-popover.cjs +385 -0
  166. package/dist/lib/combobox-with-popover.cjs.map +1 -0
  167. package/dist/lib/combobox-with-popover.js +131 -87
  168. package/dist/lib/combobox-with-popover.js.map +1 -1
  169. package/dist/lib/combobox.cjs +19 -0
  170. package/dist/lib/combobox.cjs.map +1 -0
  171. package/dist/lib/combobox.js +9 -9
  172. package/dist/lib/contact-info.cjs +146 -0
  173. package/dist/lib/contact-info.cjs.map +1 -0
  174. package/dist/lib/contact-info.js +34 -33
  175. package/dist/lib/contact-info.js.map +1 -1
  176. package/dist/lib/contact-row.cjs +206 -0
  177. package/dist/lib/contact-row.cjs.map +1 -0
  178. package/dist/lib/contact-row.js +42 -39
  179. package/dist/lib/contact-row.js.map +1 -1
  180. package/dist/lib/datepicker.cjs +663 -0
  181. package/dist/lib/datepicker.cjs.map +1 -0
  182. package/dist/lib/datepicker.js +330 -219
  183. package/dist/lib/datepicker.js.map +1 -1
  184. package/dist/lib/description-list.cjs +115 -0
  185. package/dist/lib/description-list.cjs.map +1 -0
  186. package/dist/lib/description-list.js +51 -19
  187. package/dist/lib/description-list.js.map +1 -1
  188. package/dist/lib/dropdown.cjs +46 -0
  189. package/dist/lib/dropdown.cjs.map +1 -0
  190. package/dist/lib/dropdown.js +27 -26
  191. package/dist/lib/dropdown.js.map +1 -1
  192. package/dist/lib/editor.cjs +556 -0
  193. package/dist/lib/editor.cjs.map +1 -0
  194. package/dist/lib/editor.js +191 -162
  195. package/dist/lib/editor.js.map +1 -1
  196. package/dist/lib/emoji-picker.cjs +1064 -0
  197. package/dist/lib/emoji-picker.cjs.map +1 -0
  198. package/dist/lib/emoji-picker.js +638 -375
  199. package/dist/lib/emoji-picker.js.map +1 -1
  200. package/dist/lib/emoji-row.cjs +89 -0
  201. package/dist/lib/emoji-row.cjs.map +1 -0
  202. package/dist/lib/emoji-row.js +46 -40
  203. package/dist/lib/emoji-row.js.map +1 -1
  204. package/dist/lib/emoji-text-wrapper.cjs +110 -0
  205. package/dist/lib/emoji-text-wrapper.cjs.map +1 -0
  206. package/dist/lib/emoji-text-wrapper.js +49 -35
  207. package/dist/lib/emoji-text-wrapper.js.map +1 -1
  208. package/dist/lib/emoji.cjs +146 -0
  209. package/dist/lib/emoji.cjs.map +1 -0
  210. package/dist/lib/emoji.js +140 -5
  211. package/dist/lib/emoji.js.map +1 -1
  212. package/dist/lib/feed-item-row.cjs +214 -0
  213. package/dist/lib/feed-item-row.cjs.map +1 -0
  214. package/dist/lib/feed-item-row.js +71 -64
  215. package/dist/lib/feed-item-row.js.map +1 -1
  216. package/dist/lib/feed-pill.cjs +150 -0
  217. package/dist/lib/feed-pill.cjs.map +1 -0
  218. package/dist/lib/feed-pill.js +60 -52
  219. package/dist/lib/feed-pill.js.map +1 -1
  220. package/dist/lib/general-row.cjs +406 -0
  221. package/dist/lib/general-row.cjs.map +1 -0
  222. package/dist/lib/general-row.js +133 -106
  223. package/dist/lib/general-row.js.map +1 -1
  224. package/dist/lib/group-row.cjs +118 -0
  225. package/dist/lib/group-row.cjs.map +1 -0
  226. package/dist/lib/group-row.js +34 -31
  227. package/dist/lib/group-row.js.map +1 -1
  228. package/dist/lib/grouped-chip.cjs +46 -0
  229. package/dist/lib/grouped-chip.cjs.map +1 -0
  230. package/dist/lib/grouped-chip.js +28 -27
  231. package/dist/lib/grouped-chip.js.map +1 -1
  232. package/dist/lib/hovercard.cjs +228 -0
  233. package/dist/lib/hovercard.cjs.map +1 -0
  234. package/dist/lib/hovercard.js +98 -64
  235. package/dist/lib/hovercard.js.map +1 -1
  236. package/dist/lib/icon.cjs +60 -0
  237. package/dist/lib/icon.cjs.map +1 -0
  238. package/dist/lib/icon.js +22 -44
  239. package/dist/lib/icon.js.map +1 -1
  240. package/dist/lib/image-viewer.cjs +191 -0
  241. package/dist/lib/image-viewer.cjs.map +1 -0
  242. package/dist/lib/image-viewer.js +83 -63
  243. package/dist/lib/image-viewer.js.map +1 -1
  244. package/dist/lib/input-group.cjs +92 -0
  245. package/dist/lib/input-group.cjs.map +1 -0
  246. package/dist/lib/input-group.js +29 -27
  247. package/dist/lib/input-group.js.map +1 -1
  248. package/dist/lib/input.cjs +493 -0
  249. package/dist/lib/input.cjs.map +1 -0
  250. package/dist/lib/input.js +127 -89
  251. package/dist/lib/input.js.map +1 -1
  252. package/dist/lib/item-layout.cjs +41 -0
  253. package/dist/lib/item-layout.cjs.map +1 -0
  254. package/dist/lib/item-layout.js +15 -13
  255. package/dist/lib/item-layout.js.map +1 -1
  256. package/dist/lib/ivr-node.cjs +210 -0
  257. package/dist/lib/ivr-node.cjs.map +1 -0
  258. package/dist/lib/ivr-node.js +115 -100
  259. package/dist/lib/ivr-node.js.map +1 -1
  260. package/dist/lib/keyboard-shortcut.cjs +107 -0
  261. package/dist/lib/keyboard-shortcut.cjs.map +1 -0
  262. package/dist/lib/keyboard-shortcut.js +42 -35
  263. package/dist/lib/keyboard-shortcut.js.map +1 -1
  264. package/dist/lib/lazy-show.cjs +81 -0
  265. package/dist/lib/lazy-show.cjs.map +1 -0
  266. package/dist/lib/lazy-show.js +20 -16
  267. package/dist/lib/lazy-show.js.map +1 -1
  268. package/dist/lib/link.cjs +71 -0
  269. package/dist/lib/link.cjs.map +1 -0
  270. package/dist/lib/link.js +22 -20
  271. package/dist/lib/link.js.map +1 -1
  272. package/dist/lib/list-item-group.cjs +61 -0
  273. package/dist/lib/list-item-group.cjs.map +1 -0
  274. package/dist/lib/list-item-group.js +19 -17
  275. package/dist/lib/list-item-group.js.map +1 -1
  276. package/dist/lib/list-item.cjs +205 -0
  277. package/dist/lib/list-item.cjs.map +1 -0
  278. package/dist/lib/list-item.js +67 -57
  279. package/dist/lib/list-item.js.map +1 -1
  280. package/dist/lib/message-input.cjs +555 -0
  281. package/dist/lib/message-input.cjs.map +1 -0
  282. package/dist/lib/message-input.js +211 -147
  283. package/dist/lib/message-input.js.map +1 -1
  284. package/dist/lib/modal.cjs +351 -0
  285. package/dist/lib/modal.cjs.map +1 -0
  286. package/dist/lib/modal.js +118 -91
  287. package/dist/lib/modal.js.map +1 -1
  288. package/dist/lib/notice.cjs +160 -0
  289. package/dist/lib/notice.cjs.map +1 -0
  290. package/dist/lib/notice.js +46 -44
  291. package/dist/lib/notice.js.map +1 -1
  292. package/dist/lib/pagination.cjs +153 -0
  293. package/dist/lib/pagination.cjs.map +1 -0
  294. package/dist/lib/pagination.js +60 -49
  295. package/dist/lib/pagination.js.map +1 -1
  296. package/dist/lib/popover.cjs +957 -0
  297. package/dist/lib/popover.cjs.map +1 -0
  298. package/dist/lib/popover.js +401 -222
  299. package/dist/lib/popover.js.map +1 -1
  300. package/dist/lib/presence.cjs +66 -0
  301. package/dist/lib/presence.cjs.map +1 -0
  302. package/dist/lib/presence.js +32 -26
  303. package/dist/lib/presence.js.map +1 -1
  304. package/dist/lib/radio-group.cjs +99 -0
  305. package/dist/lib/radio-group.cjs.map +1 -0
  306. package/dist/lib/radio-group.js +24 -22
  307. package/dist/lib/radio-group.js.map +1 -1
  308. package/dist/lib/radio.cjs +119 -0
  309. package/dist/lib/radio.cjs.map +1 -0
  310. package/dist/lib/radio.js +43 -35
  311. package/dist/lib/radio.js.map +1 -1
  312. package/dist/lib/rich-text-editor.cjs +1139 -0
  313. package/dist/lib/rich-text-editor.cjs.map +1 -0
  314. package/dist/lib/rich-text-editor.js +611 -392
  315. package/dist/lib/rich-text-editor.js.map +1 -1
  316. package/dist/lib/root-layout.cjs +131 -0
  317. package/dist/lib/root-layout.cjs.map +1 -0
  318. package/dist/lib/root-layout.js +28 -24
  319. package/dist/lib/root-layout.js.map +1 -1
  320. package/dist/lib/select-menu.cjs +283 -0
  321. package/dist/lib/select-menu.cjs.map +1 -0
  322. package/dist/lib/select-menu.js +101 -61
  323. package/dist/lib/select-menu.js.map +1 -1
  324. package/dist/lib/settings-menu-button.cjs +66 -0
  325. package/dist/lib/settings-menu-button.cjs.map +1 -0
  326. package/dist/lib/settings-menu-button.js +26 -25
  327. package/dist/lib/settings-menu-button.js.map +1 -1
  328. package/dist/lib/skeleton.cjs +613 -0
  329. package/dist/lib/skeleton.cjs.map +1 -0
  330. package/dist/lib/skeleton.js +174 -135
  331. package/dist/lib/skeleton.js.map +1 -1
  332. package/dist/lib/stack.cjs +128 -0
  333. package/dist/lib/stack.cjs.map +1 -0
  334. package/dist/lib/stack.js +66 -56
  335. package/dist/lib/stack.js.map +1 -1
  336. package/dist/lib/tabs.cjs +100 -0
  337. package/dist/lib/tabs.cjs.map +1 -0
  338. package/dist/lib/tabs.js +42 -35
  339. package/dist/lib/tabs.js.map +1 -1
  340. package/dist/lib/time-pill.cjs +48 -0
  341. package/dist/lib/time-pill.cjs.map +1 -0
  342. package/dist/lib/time-pill.js +21 -16
  343. package/dist/lib/time-pill.js.map +1 -1
  344. package/dist/lib/toast.cjs +248 -0
  345. package/dist/lib/toast.cjs.map +1 -0
  346. package/dist/lib/toast.js +78 -56
  347. package/dist/lib/toast.js.map +1 -1
  348. package/dist/lib/toggle.cjs +178 -0
  349. package/dist/lib/toggle.cjs.map +1 -0
  350. package/dist/lib/toggle.js +46 -37
  351. package/dist/lib/toggle.js.map +1 -1
  352. package/dist/lib/tooltip-directive.cjs +88 -0
  353. package/dist/lib/tooltip-directive.cjs.map +1 -0
  354. package/dist/lib/tooltip-directive.js +55 -41
  355. package/dist/lib/tooltip-directive.js.map +1 -1
  356. package/dist/lib/tooltip.cjs +437 -0
  357. package/dist/lib/tooltip.cjs.map +1 -0
  358. package/dist/lib/tooltip.js +152 -90
  359. package/dist/lib/tooltip.js.map +1 -1
  360. package/dist/lib/top-banner-info.cjs +64 -0
  361. package/dist/lib/top-banner-info.cjs.map +1 -0
  362. package/dist/lib/top-banner-info.js +22 -18
  363. package/dist/lib/top-banner-info.js.map +1 -1
  364. package/dist/lib/unread-pill.cjs +64 -0
  365. package/dist/lib/unread-pill.cjs.map +1 -0
  366. package/dist/lib/unread-pill.js +25 -22
  367. package/dist/lib/unread-pill.js.map +1 -1
  368. package/dist/lib/validation-messages.cjs +86 -0
  369. package/dist/lib/validation-messages.cjs.map +1 -0
  370. package/dist/lib/validation-messages.js +32 -29
  371. package/dist/lib/validation-messages.js.map +1 -1
  372. package/dist/style.css +1214 -1
  373. package/dist/types/components/avatar/avatar.vue.d.ts +1 -1
  374. package/dist/types/components/button/button.vue.d.ts +2 -2
  375. package/dist/types/components/card/card.vue.d.ts +1 -1
  376. package/dist/types/components/chip/chip.vue.d.ts +1 -1
  377. package/dist/types/components/collapsible/collapsible.vue.d.ts +2 -2
  378. package/dist/types/components/combobox/combobox.vue.d.ts +1 -1
  379. package/dist/types/components/dropdown/dropdown.vue.d.ts +1 -1
  380. package/dist/types/components/emoji/emoji.vue.d.ts +1 -1
  381. package/dist/types/components/icon/icon.vue.d.ts +2 -22
  382. package/dist/types/components/icon/icon.vue.d.ts.map +1 -1
  383. package/dist/types/components/list_item_group/list_item_group.vue.d.ts +1 -1
  384. package/dist/types/components/modal/modal.vue.d.ts +2 -2
  385. package/dist/types/components/popover/popover_header_footer.vue.d.ts +1 -1
  386. package/dist/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +2 -2
  387. package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +2 -2
  388. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +91 -1
  389. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  390. package/dist/types/components/skeleton/skeleton-list-item.vue.d.ts +1 -1
  391. package/dist/types/components/skeleton/skeleton-paragraph.vue.d.ts +3 -3
  392. package/dist/types/components/skeleton/skeleton-shape.vue.d.ts +2 -2
  393. package/dist/types/components/skeleton/skeleton-text.vue.d.ts +2 -2
  394. package/dist/types/components/skeleton/skeleton.vue.d.ts +1 -1
  395. package/dist/types/components/tooltip/tooltip.vue.d.ts +2 -2
  396. package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
  397. package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
  398. package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +2 -2
  399. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +90 -0
  400. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  401. package/dist/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
  402. package/dist/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +1 -1
  403. package/package.json +37 -35
  404. package/dist/chunks/_plugin-vue2_normalizer-u6G_3nkj.js +0 -33
  405. package/dist/chunks/_plugin-vue2_normalizer-u6G_3nkj.js.map +0 -1
  406. package/dist/chunks/dropdown_constants-EUcDxBrX.js +0 -9
  407. package/dist/chunks/dropdown_constants-EUcDxBrX.js.map +0 -1
  408. package/dist/chunks/index-YkSDT8-g.js +0 -244
  409. package/dist/chunks/index-YkSDT8-g.js.map +0 -1
  410. package/dist/chunks/index-nIyl_PL6.js +0 -372
  411. package/dist/chunks/keyboard_list_navigation-F0O8nht0.js +0 -197
  412. package/dist/chunks/link_constants-vIUB92L4.js +0 -16
  413. package/dist/chunks/list_item_constants-LTUc74pD.js +0 -13
  414. package/dist/chunks/modal-VuMFkZFH.js +0 -82
  415. package/dist/chunks/notice_action-9NmtQRai.js +0 -182
  416. package/dist/chunks/notice_constants-c--hBFQw.js +0 -6
  417. package/dist/chunks/popover_constants-qjlEkroB.js +0 -114
  418. package/dist/chunks/sr_only_close_button-JGole5Xi.js +0 -86
  419. package/dist/chunks/stack_constants-u7tNqGtc.js +0 -13
  420. package/dist/chunks/tab-Qm9LVkYj.js +0 -346
  421. package/dist/lib/dates.js +0 -57
  422. package/dist/lib/mixins.js +0 -17
  423. package/dist/lib/utils.js +0 -175
  424. package/dist/lib/validators.js +0 -12
  425. /package/dist/{lib → common}/mixins.js.map +0 -0
@@ -1,23 +1,22 @@
1
- import { a as i, b as o, D as s } from "../chunks/notice_action-9NmtQRai.js";
2
- import { a as l, N as r } from "../chunks/notice_constants-c--hBFQw.js";
3
- import { a } from "../chunks/sr_only_close_button-JGole5Xi.js";
4
- import { n as c } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.js";
1
+ import { DtNoticeIcon, DtNoticeContent, DtNoticeAction } from "../chunks/notice_action-IRUoLX2d.js";
2
+ import { NOTICE_ROLES, NOTICE_KINDS } from "../chunks/notice_constants-7Qt2CQEY.js";
3
+ import { SrOnlyCloseButtonMixin } from "../chunks/sr_only_close_button-81bHIpPu.js";
4
+ import { normalizeComponent } from "../chunks/_plugin-vue2_normalizer-sOSkiPF3.js";
5
5
  import "./icon.js";
6
6
  import "@dialpad/dialtone-icons/vue2";
7
- import "../chunks/icon_constants-OpYAAKwF.js";
7
+ import "../chunks/icon_constants-Dy4MEUJL.js";
8
8
  import "@dialpad/dialtone-icons/icons.json";
9
- import "./skeleton.js";
10
9
  import "./button.js";
11
10
  import "vue";
12
- import "../chunks/link_constants-vIUB92L4.js";
13
- const d = {
11
+ import "../chunks/link_constants-nWVlXQBs.js";
12
+ const _sfc_main = {
14
13
  name: "DtNotice",
15
14
  components: {
16
- DtNoticeIcon: i,
17
- DtNoticeContent: o,
18
- DtNoticeAction: s
15
+ DtNoticeIcon,
16
+ DtNoticeContent,
17
+ DtNoticeAction
19
18
  },
20
- mixins: [a],
19
+ mixins: [SrOnlyCloseButtonMixin],
21
20
  props: {
22
21
  /**
23
22
  * Sets an ID on the title element of the component. Useful for aria-describedby
@@ -51,8 +50,8 @@ const d = {
51
50
  role: {
52
51
  type: String,
53
52
  default: "status",
54
- validate(e) {
55
- return l.includes(e);
53
+ validate(role) {
54
+ return NOTICE_ROLES.includes(role);
56
55
  }
57
56
  },
58
57
  /**
@@ -62,7 +61,7 @@ const d = {
62
61
  */
63
62
  important: {
64
63
  type: Boolean,
65
- default: !1
64
+ default: false
66
65
  },
67
66
  /**
68
67
  * Severity level of the notice, sets the icon and background
@@ -71,8 +70,8 @@ const d = {
71
70
  kind: {
72
71
  type: String,
73
72
  default: "base",
74
- validate(e) {
75
- return r.includes(e);
73
+ validate(kind) {
74
+ return NOTICE_KINDS.includes(kind);
76
75
  }
77
76
  },
78
77
  /**
@@ -88,7 +87,7 @@ const d = {
88
87
  */
89
88
  hideClose: {
90
89
  type: Boolean,
91
- default: !1
90
+ default: false
92
91
  },
93
92
  /**
94
93
  * Hides the icon from the notice
@@ -96,7 +95,7 @@ const d = {
96
95
  */
97
96
  hideIcon: {
98
97
  type: Boolean,
99
- default: !1
98
+ default: false
100
99
  },
101
100
  /**
102
101
  * Hides the action from the notice
@@ -104,7 +103,7 @@ const d = {
104
103
  */
105
104
  hideAction: {
106
105
  type: Boolean,
107
- default: !1
106
+ default: false
108
107
  }
109
108
  },
110
109
  emits: [
@@ -117,42 +116,45 @@ const d = {
117
116
  ],
118
117
  computed: {
119
118
  noticeClass() {
119
+ const noticeKinds = {
120
+ error: "d-notice--error",
121
+ info: "d-notice--info",
122
+ success: "d-notice--success",
123
+ warning: "d-notice--warning",
124
+ base: "d-notice--base"
125
+ };
120
126
  return [
121
127
  "d-notice",
122
- {
123
- error: "d-notice--error",
124
- info: "d-notice--info",
125
- success: "d-notice--success",
126
- warning: "d-notice--warning",
127
- base: "d-notice--base"
128
- }[this.kind],
128
+ noticeKinds[this.kind],
129
129
  { "d-notice--important": this.important }
130
130
  ];
131
131
  }
132
132
  }
133
133
  };
134
- var u = function() {
135
- var t = this, n = t._self._c;
136
- 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() {
137
- return [t._t("titleOverride")];
138
- }, 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);
139
- }, p = [], f = /* @__PURE__ */ c(
140
- d,
141
- u,
142
- p,
143
- !1,
134
+ var _sfc_render = function render() {
135
+ var _vm = this, _c = _vm._self._c;
136
+ return _c("aside", { class: _vm.noticeClass, attrs: { "data-qa": "notice" } }, [!_vm.hideIcon ? _c("dt-notice-icon", { attrs: { "kind": _vm.kind } }, [_vm._t("icon")], 2) : _vm._e(), _c("dt-notice-content", _vm._g({ attrs: { "title-id": _vm.titleId, "content-id": _vm.contentId, "title": _vm.title, "role": _vm.role }, scopedSlots: _vm._u([{ key: "titleOverride", fn: function() {
137
+ return [_vm._t("titleOverride")];
138
+ }, proxy: true }], null, true) }, _vm.$listeners), [_vm._t("default")], 2), _c("dt-notice-action", _vm._g({ attrs: { "hide-action": _vm.hideAction, "hide-close": _vm.hideClose, "close-button-props": _vm.closeButtonProps, "visually-hidden-close": _vm.visuallyHiddenClose, "visually-hidden-close-label": _vm.visuallyHiddenCloseLabel } }, _vm.$listeners), [_vm._t("action")], 2)], 1);
139
+ };
140
+ var _sfc_staticRenderFns = [];
141
+ var __component__ = /* @__PURE__ */ normalizeComponent(
142
+ _sfc_main,
143
+ _sfc_render,
144
+ _sfc_staticRenderFns,
145
+ false,
144
146
  null,
145
147
  null,
146
148
  null,
147
149
  null
148
150
  );
149
- const D = f.exports;
151
+ const notice = __component__.exports;
150
152
  export {
151
- D as DtNotice,
152
- s as DtNoticeAction,
153
- o as DtNoticeContent,
154
- i as DtNoticeIcon,
155
- r as NOTICE_KINDS,
156
- l as NOTICE_ROLES
153
+ notice as DtNotice,
154
+ DtNoticeAction,
155
+ DtNoticeContent,
156
+ DtNoticeIcon,
157
+ NOTICE_KINDS,
158
+ NOTICE_ROLES
157
159
  };
158
160
  //# sourceMappingURL=notice.js.map
@@ -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 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 },\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,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,UAAA;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 :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 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 },\n ];\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;AAoDA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,QAAA,CAAA,sBAAA;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,SAAA,MAAA;AACA,eAAA,aAAA,SAAA,IAAA;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,SAAA,MAAA;AACA,eAAA,aAAA,SAAA,IAAA;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,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,cAAA;AACA,YAAA,cAAA;AAAA,QACA,OAAA;AAAA,QACA,MAAA;AAAA,QACA,SAAA;AAAA,QACA,SAAA;AAAA,QACA,MAAA;AAAA,MACA;AACA,aAAA;AAAA,QACA;AAAA,QACA,YAAA,KAAA,IAAA;AAAA,QACA,EAAA,uBAAA,KAAA,UAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,153 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-1aBeR4AK.js");
4
+ const lib_button = require("./button.cjs");
5
+ const lib_icon = require("./icon.cjs");
6
+ require("vue");
7
+ require("../chunks/link_constants-Huj7D_hm.js");
8
+ require("@dialpad/dialtone-icons/vue2");
9
+ require("../chunks/icon_constants-QYpmdE0R.js");
10
+ require("@dialpad/dialtone-icons/icons.json");
11
+ const _sfc_main = {
12
+ name: "DtPagination",
13
+ components: {
14
+ DtButton: lib_button.DtButton,
15
+ DtIcon: lib_icon.DtIcon
16
+ },
17
+ props: {
18
+ /**
19
+ * Descriptive label for the pagination content.
20
+ */
21
+ ariaLabel: {
22
+ type: String,
23
+ required: true
24
+ },
25
+ /**
26
+ * The total number of the pages
27
+ */
28
+ totalPages: {
29
+ type: Number,
30
+ required: true
31
+ },
32
+ /**
33
+ * Descriptive label for the previous button.
34
+ */
35
+ prevAriaLabel: {
36
+ type: String,
37
+ required: true
38
+ },
39
+ /**
40
+ * Descriptive label for the next button.
41
+ */
42
+ nextAriaLabel: {
43
+ type: String,
44
+ required: true
45
+ },
46
+ /**
47
+ * A method that will be called to get the aria label of each page.
48
+ */
49
+ pageNumberAriaLabel: {
50
+ type: Function,
51
+ required: true
52
+ },
53
+ /**
54
+ * The active current page in the list of pages, defaults to the first page
55
+ */
56
+ activePage: {
57
+ type: Number,
58
+ default: 1
59
+ },
60
+ /**
61
+ * Determines the max pages to be shown in the list. Using an odd number is recommended.
62
+ * If an even number is given, then it will be rounded down to the nearest odd number to always
63
+ * keep current page in the middle when current page is in the mid-range.
64
+ */
65
+ maxVisible: {
66
+ type: Number,
67
+ default: 5
68
+ }
69
+ },
70
+ emits: [
71
+ /**
72
+ * Page change event
73
+ *
74
+ * @event change
75
+ * @type {Number}
76
+ */
77
+ "change"
78
+ ],
79
+ data() {
80
+ return {
81
+ currentPage: this.activePage
82
+ };
83
+ },
84
+ computed: {
85
+ isFirstPage() {
86
+ return this.currentPage === 1;
87
+ },
88
+ isLastPage() {
89
+ return this.currentPage === this.totalPages;
90
+ },
91
+ pages() {
92
+ if (this.maxVisible === 0) {
93
+ return [];
94
+ }
95
+ if (this.totalPages <= this.maxVisible) {
96
+ return this.range(1, this.totalPages);
97
+ }
98
+ const start = this.maxVisible - 1;
99
+ const end = this.totalPages - start + 1;
100
+ if (this.currentPage < start) {
101
+ return [...this.range(1, start), "...", this.totalPages];
102
+ }
103
+ if (this.currentPage > end) {
104
+ return [1, "...", ...this.range(end, this.totalPages)];
105
+ }
106
+ const total = this.maxVisible - (3 - this.maxVisible % 2);
107
+ const centerIndex = Math.floor(total / 2);
108
+ const left = this.currentPage - centerIndex;
109
+ const right = this.currentPage + centerIndex;
110
+ return [1, "...", ...this.range(left, right), "...", this.totalPages];
111
+ }
112
+ },
113
+ methods: {
114
+ range(from, to) {
115
+ const range = [];
116
+ from = from > 0 ? from : 1;
117
+ for (let i = from; i <= to; i++) {
118
+ range.push(i);
119
+ }
120
+ return range;
121
+ },
122
+ changePage(page) {
123
+ this.currentPage = page;
124
+ this.$emit("change", this.currentPage);
125
+ }
126
+ }
127
+ };
128
+ var _sfc_render = function render() {
129
+ var _vm = this, _c = _vm._self._c;
130
+ return _c("nav", { staticClass: "d-pagination", attrs: { "aria-label": _vm.ariaLabel } }, [_c("dt-button", { staticClass: "d-pagination__button", class: _vm.isFirstPage ? "d-fc-black-300 d-bgc-transparent" : "d-fc-tertiary", attrs: { "data-qa": "dt-pagination-prev", "aria-label": _vm.prevAriaLabel, "kind": _vm.isFirstPage ? "default" : "muted", "importance": _vm.isFirstPage ? "primary" : "clear", "disabled": _vm.isFirstPage }, on: { "click": function($event) {
131
+ return _vm.changePage(_vm.currentPage - 1);
132
+ } } }, [_c("template", { slot: "icon" }, [_c("dt-icon", { attrs: { "name": "chevron-left", "size": "300" } })], 1)], 2), _vm._l(_vm.pages, function(page, index) {
133
+ return _c("div", { key: `page-${page}-${index}`, class: { "d-pagination__separator": isNaN(Number(page)) } }, [isNaN(Number(page)) ? _c("div", { staticClass: "d-pagination__separator-icon", attrs: { "data-qa": "dt-pagination-separator" } }, [_c("dt-icon", { attrs: { "name": "more-horizontal", "size": "300" } })], 1) : _c("dt-button", { attrs: { "aria-label": _vm.pageNumberAriaLabel(page), "kind": _vm.currentPage === page ? "default" : "muted", "importance": _vm.currentPage === page ? "primary" : "clear", "label-class": "" }, on: { "click": function($event) {
134
+ return _vm.changePage(page);
135
+ } } }, [_vm._v(" " + _vm._s(page) + " ")])], 1);
136
+ }), _c("dt-button", { staticClass: "d-pagination__button", class: _vm.isLastPage ? "d-fc-black-300 d-bgc-transparent" : "d-fc-tertiary", attrs: { "data-qa": "dt-pagination-next", "aria-label": _vm.nextAriaLabel, "disabled": _vm.isLastPage, "kind": "muted", "importance": _vm.isLastPage ? "primary" : "clear" }, on: { "click": function($event) {
137
+ return _vm.changePage(_vm.currentPage + 1);
138
+ } } }, [_c("template", { slot: "icon" }, [_c("dt-icon", { attrs: { "name": "chevron-right", "size": "300" } })], 1)], 2)], 2);
139
+ };
140
+ var _sfc_staticRenderFns = [];
141
+ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
142
+ _sfc_main,
143
+ _sfc_render,
144
+ _sfc_staticRenderFns,
145
+ false,
146
+ null,
147
+ null,
148
+ null,
149
+ null
150
+ );
151
+ const pagination = __component__.exports;
152
+ exports.DtPagination = pagination;
153
+ //# sourceMappingURL=pagination.cjs.map
@@ -0,0 +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=\"isFirstPage ? 'default' : 'muted'\"\n :importance=\"isFirstPage ? 'primary' : 'clear'\"\n :disabled=\"isFirstPage\"\n :class=\"isFirstPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"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\n name=\"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=\"isLastPage ? 'primary' : 'clear'\"\n :class=\"isLastPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"chevron-right\"\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\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 DtIcon,\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 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 const start = this.maxVisible - 1;\n const end = this.totalPages - start + 1;\n\n if (this.currentPage < start) {\n return [...this.range(1, start), '...', this.totalPages];\n }\n\n if (this.currentPage > end) {\n return [1, '...', ...this.range(end, this.totalPages)];\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 const left = this.currentPage - centerIndex;\n const right = this.currentPage + centerIndex;\n return [1, '...', ...this.range(left, right), '...', this.totalPages];\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":["DtButton","DtIcon"],"mappings":";;;;;;;;;;AA+EA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA,WAAA;AAAA,IACA,QAAAC,SAAA;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,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,GAAA;AACA,eAAA;MACA;AACA,UAAA,KAAA,cAAA,KAAA,YAAA;AACA,eAAA,KAAA,MAAA,GAAA,KAAA,UAAA;AAAA,MACA;AAEA,YAAA,QAAA,KAAA,aAAA;AACA,YAAA,MAAA,KAAA,aAAA,QAAA;AAEA,UAAA,KAAA,cAAA,OAAA;AACA,eAAA,CAAA,GAAA,KAAA,MAAA,GAAA,KAAA,GAAA,OAAA,KAAA,UAAA;AAAA,MACA;AAEA,UAAA,KAAA,cAAA,KAAA;AACA,eAAA,CAAA,GAAA,OAAA,GAAA,KAAA,MAAA,KAAA,KAAA,UAAA,CAAA;AAAA,MACA;AAGA,YAAA,QAAA,KAAA,cAAA,IAAA,KAAA,aAAA;AACA,YAAA,cAAA,KAAA,MAAA,QAAA,CAAA;AACA,YAAA,OAAA,KAAA,cAAA;AACA,YAAA,QAAA,KAAA,cAAA;AACA,aAAA,CAAA,GAAA,OAAA,GAAA,KAAA,MAAA,MAAA,KAAA,GAAA,OAAA,KAAA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,MAAA,MAAA,IAAA;AACA,YAAA,QAAA,CAAA;AACA,aAAA,OAAA,IAAA,OAAA;AACA,eAAA,IAAA,MAAA,KAAA,IAAA,KAAA;AACA,cAAA,KAAA,CAAA;AAAA,MACA;AACA,aAAA;AAAA,IACA;AAAA,IAEA,WAAA,MAAA;AACA,WAAA,cAAA;AACA,WAAA,MAAA,UAAA,KAAA,WAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,17 +1,16 @@
1
- import { n as s } from "../chunks/_plugin-vue2_normalizer-u6G_3nkj.js";
2
- import { DtButton as o } from "./button.js";
3
- import { DtIcon as c } from "./icon.js";
1
+ import { normalizeComponent } from "../chunks/_plugin-vue2_normalizer-sOSkiPF3.js";
2
+ import { DtButton } from "./button.js";
3
+ import { DtIcon } from "./icon.js";
4
4
  import "vue";
5
- import "../chunks/link_constants-vIUB92L4.js";
5
+ import "../chunks/link_constants-nWVlXQBs.js";
6
6
  import "@dialpad/dialtone-icons/vue2";
7
- import "../chunks/icon_constants-OpYAAKwF.js";
7
+ import "../chunks/icon_constants-Dy4MEUJL.js";
8
8
  import "@dialpad/dialtone-icons/icons.json";
9
- import "./skeleton.js";
10
- const l = {
9
+ const _sfc_main = {
11
10
  name: "DtPagination",
12
11
  components: {
13
- DtButton: o,
14
- DtIcon: c
12
+ DtButton,
13
+ DtIcon
15
14
  },
16
15
  props: {
17
16
  /**
@@ -19,35 +18,35 @@ const l = {
19
18
  */
20
19
  ariaLabel: {
21
20
  type: String,
22
- required: !0
21
+ required: true
23
22
  },
24
23
  /**
25
24
  * The total number of the pages
26
25
  */
27
26
  totalPages: {
28
27
  type: Number,
29
- required: !0
28
+ required: true
30
29
  },
31
30
  /**
32
31
  * Descriptive label for the previous button.
33
32
  */
34
33
  prevAriaLabel: {
35
34
  type: String,
36
- required: !0
35
+ required: true
37
36
  },
38
37
  /**
39
38
  * Descriptive label for the next button.
40
39
  */
41
40
  nextAriaLabel: {
42
41
  type: String,
43
- required: !0
42
+ required: true
44
43
  },
45
44
  /**
46
45
  * A method that will be called to get the aria label of each page.
47
46
  */
48
47
  pageNumberAriaLabel: {
49
48
  type: Function,
50
- required: !0
49
+ required: true
51
50
  },
52
51
  /**
53
52
  * The active current page in the list of pages, defaults to the first page
@@ -88,55 +87,67 @@ const l = {
88
87
  return this.currentPage === this.totalPages;
89
88
  },
90
89
  pages() {
91
- if (this.maxVisible === 0)
90
+ if (this.maxVisible === 0) {
92
91
  return [];
93
- if (this.totalPages <= this.maxVisible)
92
+ }
93
+ if (this.totalPages <= this.maxVisible) {
94
94
  return this.range(1, this.totalPages);
95
- const r = this.maxVisible - 1, t = this.totalPages - r + 1;
96
- if (this.currentPage < r)
97
- return [...this.range(1, r), "...", this.totalPages];
98
- if (this.currentPage > t)
99
- return [1, "...", ...this.range(t, this.totalPages)];
100
- const e = this.maxVisible - (3 - this.maxVisible % 2), a = Math.floor(e / 2), i = this.currentPage - a, n = this.currentPage + a;
101
- return [1, "...", ...this.range(i, n), "...", this.totalPages];
95
+ }
96
+ const start = this.maxVisible - 1;
97
+ const end = this.totalPages - start + 1;
98
+ if (this.currentPage < start) {
99
+ return [...this.range(1, start), "...", this.totalPages];
100
+ }
101
+ if (this.currentPage > end) {
102
+ return [1, "...", ...this.range(end, this.totalPages)];
103
+ }
104
+ const total = this.maxVisible - (3 - this.maxVisible % 2);
105
+ const centerIndex = Math.floor(total / 2);
106
+ const left = this.currentPage - centerIndex;
107
+ const right = this.currentPage + centerIndex;
108
+ return [1, "...", ...this.range(left, right), "...", this.totalPages];
102
109
  }
103
110
  },
104
111
  methods: {
105
- range(r, t) {
106
- const e = [];
107
- r = r > 0 ? r : 1;
108
- for (let a = r; a <= t; a++)
109
- e.push(a);
110
- return e;
112
+ range(from, to) {
113
+ const range = [];
114
+ from = from > 0 ? from : 1;
115
+ for (let i = from; i <= to; i++) {
116
+ range.push(i);
117
+ }
118
+ return range;
111
119
  },
112
- changePage(r) {
113
- this.currentPage = r, this.$emit("change", this.currentPage);
120
+ changePage(page) {
121
+ this.currentPage = page;
122
+ this.$emit("change", this.currentPage);
114
123
  }
115
124
  }
116
125
  };
117
- var u = function() {
118
- var t = this, e = t._self._c;
119
- return e("nav", { staticClass: "d-pagination", attrs: { "aria-label": t.ariaLabel } }, [e("dt-button", { staticClass: "d-pagination__button", class: t.isFirstPage ? "d-fc-black-300 d-bgc-transparent" : "d-fc-tertiary", attrs: { "data-qa": "dt-pagination-prev", "aria-label": t.prevAriaLabel, kind: t.isFirstPage ? "default" : "muted", importance: t.isFirstPage ? "primary" : "clear", disabled: t.isFirstPage }, on: { click: function(a) {
120
- return t.changePage(t.currentPage - 1);
121
- } } }, [e("template", { slot: "icon" }, [e("dt-icon", { attrs: { name: "chevron-left", size: "300" } })], 1)], 2), t._l(t.pages, function(a, i) {
122
- return e("div", { key: `page-${a}-${i}`, class: { "d-pagination__separator": isNaN(Number(a)) } }, [isNaN(Number(a)) ? e("div", { staticClass: "d-pagination__separator-icon", attrs: { "data-qa": "dt-pagination-separator" } }, [e("dt-icon", { attrs: { name: "more-horizontal", size: "300" } })], 1) : e("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(n) {
123
- return t.changePage(a);
124
- } } }, [t._v(" " + t._s(a) + " ")])], 1);
125
- }), e("dt-button", { staticClass: "d-pagination__button", class: t.isLastPage ? "d-fc-black-300 d-bgc-transparent" : "d-fc-tertiary", attrs: { "data-qa": "dt-pagination-next", "aria-label": t.nextAriaLabel, disabled: t.isLastPage, kind: "muted", importance: t.isLastPage ? "primary" : "clear" }, on: { click: function(a) {
126
- return t.changePage(t.currentPage + 1);
127
- } } }, [e("template", { slot: "icon" }, [e("dt-icon", { attrs: { name: "chevron-right", size: "300" } })], 1)], 2)], 2);
128
- }, g = [], d = /* @__PURE__ */ s(
129
- l,
130
- u,
131
- g,
132
- !1,
126
+ var _sfc_render = function render() {
127
+ var _vm = this, _c = _vm._self._c;
128
+ return _c("nav", { staticClass: "d-pagination", attrs: { "aria-label": _vm.ariaLabel } }, [_c("dt-button", { staticClass: "d-pagination__button", class: _vm.isFirstPage ? "d-fc-black-300 d-bgc-transparent" : "d-fc-tertiary", attrs: { "data-qa": "dt-pagination-prev", "aria-label": _vm.prevAriaLabel, "kind": _vm.isFirstPage ? "default" : "muted", "importance": _vm.isFirstPage ? "primary" : "clear", "disabled": _vm.isFirstPage }, on: { "click": function($event) {
129
+ return _vm.changePage(_vm.currentPage - 1);
130
+ } } }, [_c("template", { slot: "icon" }, [_c("dt-icon", { attrs: { "name": "chevron-left", "size": "300" } })], 1)], 2), _vm._l(_vm.pages, function(page, index) {
131
+ return _c("div", { key: `page-${page}-${index}`, class: { "d-pagination__separator": isNaN(Number(page)) } }, [isNaN(Number(page)) ? _c("div", { staticClass: "d-pagination__separator-icon", attrs: { "data-qa": "dt-pagination-separator" } }, [_c("dt-icon", { attrs: { "name": "more-horizontal", "size": "300" } })], 1) : _c("dt-button", { attrs: { "aria-label": _vm.pageNumberAriaLabel(page), "kind": _vm.currentPage === page ? "default" : "muted", "importance": _vm.currentPage === page ? "primary" : "clear", "label-class": "" }, on: { "click": function($event) {
132
+ return _vm.changePage(page);
133
+ } } }, [_vm._v(" " + _vm._s(page) + " ")])], 1);
134
+ }), _c("dt-button", { staticClass: "d-pagination__button", class: _vm.isLastPage ? "d-fc-black-300 d-bgc-transparent" : "d-fc-tertiary", attrs: { "data-qa": "dt-pagination-next", "aria-label": _vm.nextAriaLabel, "disabled": _vm.isLastPage, "kind": "muted", "importance": _vm.isLastPage ? "primary" : "clear" }, on: { "click": function($event) {
135
+ return _vm.changePage(_vm.currentPage + 1);
136
+ } } }, [_c("template", { slot: "icon" }, [_c("dt-icon", { attrs: { "name": "chevron-right", "size": "300" } })], 1)], 2)], 2);
137
+ };
138
+ var _sfc_staticRenderFns = [];
139
+ var __component__ = /* @__PURE__ */ normalizeComponent(
140
+ _sfc_main,
141
+ _sfc_render,
142
+ _sfc_staticRenderFns,
143
+ false,
133
144
  null,
134
145
  null,
135
146
  null,
136
147
  null
137
148
  );
138
- const x = d.exports;
149
+ const pagination = __component__.exports;
139
150
  export {
140
- x as DtPagination
151
+ pagination as DtPagination
141
152
  };
142
153
  //# 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=\"isFirstPage ? 'default' : 'muted'\"\n :importance=\"isFirstPage ? 'primary' : 'clear'\"\n :disabled=\"isFirstPage\"\n :class=\"isFirstPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"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\n name=\"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=\"isLastPage ? 'primary' : 'clear'\"\n :class=\"isLastPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"chevron-right\"\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\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 DtIcon,\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 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 const start = this.maxVisible - 1;\n const end = this.totalPages - start + 1;\n\n if (this.currentPage < start) {\n return [...this.range(1, start), '...', this.totalPages];\n }\n\n if (this.currentPage > end) {\n return [1, '...', ...this.range(end, this.totalPages)];\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 const left = this.currentPage - centerIndex;\n const right = this.currentPage + centerIndex;\n return [1, '...', ...this.range(left, right), '...', this.totalPages];\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","DtIcon","start","end","total","centerIndex","left","right","from","to","range","i","page"],"mappings":";;;;;;;;;AA+EA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;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,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,YAAAC,IAAA,KAAA,aAAA,GACAC,IAAA,KAAA,aAAAD,IAAA;AAEA,UAAA,KAAA,cAAAA;AACA,eAAA,CAAA,GAAA,KAAA,MAAA,GAAAA,CAAA,GAAA,OAAA,KAAA,UAAA;AAGA,UAAA,KAAA,cAAAC;AACA,eAAA,CAAA,GAAA,OAAA,GAAA,KAAA,MAAAA,GAAA,KAAA,UAAA,CAAA;AAIA,YAAAC,IAAA,KAAA,cAAA,IAAA,KAAA,aAAA,IACAC,IAAA,KAAA,MAAAD,IAAA,CAAA,GACAE,IAAA,KAAA,cAAAD,GACAE,IAAA,KAAA,cAAAF;AACA,aAAA,CAAA,GAAA,OAAA,GAAA,KAAA,MAAAC,GAAAC,CAAA,GAAA,OAAA,KAAA,UAAA;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,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=\"isFirstPage ? 'default' : 'muted'\"\n :importance=\"isFirstPage ? 'primary' : 'clear'\"\n :disabled=\"isFirstPage\"\n :class=\"isFirstPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"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\n name=\"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=\"isLastPage ? 'primary' : 'clear'\"\n :class=\"isLastPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"chevron-right\"\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\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 DtIcon,\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 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 const start = this.maxVisible - 1;\n const end = this.totalPages - start + 1;\n\n if (this.currentPage < start) {\n return [...this.range(1, start), '...', this.totalPages];\n }\n\n if (this.currentPage > end) {\n return [1, '...', ...this.range(end, this.totalPages)];\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 const left = this.currentPage - centerIndex;\n const right = this.currentPage + centerIndex;\n return [1, '...', ...this.range(left, right), '...', this.totalPages];\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":[],"mappings":";;;;;;;;AA+EA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;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,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,GAAA;AACA,eAAA;MACA;AACA,UAAA,KAAA,cAAA,KAAA,YAAA;AACA,eAAA,KAAA,MAAA,GAAA,KAAA,UAAA;AAAA,MACA;AAEA,YAAA,QAAA,KAAA,aAAA;AACA,YAAA,MAAA,KAAA,aAAA,QAAA;AAEA,UAAA,KAAA,cAAA,OAAA;AACA,eAAA,CAAA,GAAA,KAAA,MAAA,GAAA,KAAA,GAAA,OAAA,KAAA,UAAA;AAAA,MACA;AAEA,UAAA,KAAA,cAAA,KAAA;AACA,eAAA,CAAA,GAAA,OAAA,GAAA,KAAA,MAAA,KAAA,KAAA,UAAA,CAAA;AAAA,MACA;AAGA,YAAA,QAAA,KAAA,cAAA,IAAA,KAAA,aAAA;AACA,YAAA,cAAA,KAAA,MAAA,QAAA,CAAA;AACA,YAAA,OAAA,KAAA,cAAA;AACA,YAAA,QAAA,KAAA,cAAA;AACA,aAAA,CAAA,GAAA,OAAA,GAAA,KAAA,MAAA,MAAA,KAAA,GAAA,OAAA,KAAA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,MAAA,MAAA,IAAA;AACA,YAAA,QAAA,CAAA;AACA,aAAA,OAAA,IAAA,OAAA;AACA,eAAA,IAAA,MAAA,KAAA,IAAA,KAAA;AACA,cAAA,KAAA,CAAA;AAAA,MACA;AACA,aAAA;AAAA,IACA;AAAA,IAEA,WAAA,MAAA;AACA,WAAA,cAAA;AACA,WAAA,MAAA,UAAA,KAAA,WAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;"}