@dialpad/dialtone 9.73.0-beta.2 → 9.74.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 (456) hide show
  1. package/dist/tokens/doc.json +16912 -16912
  2. package/dist/vue2/common/sr_only_close_button.vue.cjs +3 -3
  3. package/dist/vue2/common/sr_only_close_button.vue.cjs.map +1 -1
  4. package/dist/vue2/common/sr_only_close_button.vue.js +3 -3
  5. package/dist/vue2/common/sr_only_close_button.vue.js.map +1 -1
  6. package/dist/vue2/common/storybook_utils.cjs +8 -0
  7. package/dist/vue2/common/storybook_utils.cjs.map +1 -0
  8. package/dist/vue2/common/storybook_utils.js +8 -0
  9. package/dist/vue2/common/storybook_utils.js.map +1 -0
  10. package/dist/vue2/component-documentation.json +1 -1
  11. package/dist/vue2/components/avatar/avatar.vue.cjs +24 -13
  12. package/dist/vue2/components/avatar/avatar.vue.cjs.map +1 -1
  13. package/dist/vue2/components/avatar/avatar.vue.js +24 -13
  14. package/dist/vue2/components/avatar/avatar.vue.js.map +1 -1
  15. package/dist/vue2/components/badge/badge.vue.cjs +34 -13
  16. package/dist/vue2/components/badge/badge.vue.cjs.map +1 -1
  17. package/dist/vue2/components/badge/badge.vue.js +34 -13
  18. package/dist/vue2/components/badge/badge.vue.js.map +1 -1
  19. package/dist/vue2/components/chip/chip.vue.cjs +4 -4
  20. package/dist/vue2/components/chip/chip.vue.cjs.map +1 -1
  21. package/dist/vue2/components/chip/chip.vue.js +4 -4
  22. package/dist/vue2/components/chip/chip.vue.js.map +1 -1
  23. package/dist/vue2/components/collapsible/collapsible.vue.cjs +3 -4
  24. package/dist/vue2/components/collapsible/collapsible.vue.cjs.map +1 -1
  25. package/dist/vue2/components/collapsible/collapsible.vue.js +3 -4
  26. package/dist/vue2/components/collapsible/collapsible.vue.js.map +1 -1
  27. package/dist/vue2/components/datepicker/modules/month-year-picker.vue.cjs +6 -14
  28. package/dist/vue2/components/datepicker/modules/month-year-picker.vue.cjs.map +1 -1
  29. package/dist/vue2/components/datepicker/modules/month-year-picker.vue.js +6 -14
  30. package/dist/vue2/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
  31. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs +5 -6
  32. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
  33. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js +5 -6
  34. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
  35. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs +14 -23
  36. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
  37. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js +14 -23
  38. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
  39. package/dist/vue2/components/empty_state/empty_state.vue.cjs +80 -20
  40. package/dist/vue2/components/empty_state/empty_state.vue.cjs.map +1 -1
  41. package/dist/vue2/components/empty_state/empty_state.vue.js +81 -21
  42. package/dist/vue2/components/empty_state/empty_state.vue.js.map +1 -1
  43. package/dist/vue2/components/empty_state/empty_state_constants.cjs +0 -18
  44. package/dist/vue2/components/empty_state/empty_state_constants.cjs.map +1 -1
  45. package/dist/vue2/components/empty_state/empty_state_constants.js +0 -18
  46. package/dist/vue2/components/empty_state/empty_state_constants.js.map +1 -1
  47. package/dist/vue2/components/icon/icon.vue.cjs +2 -2
  48. package/dist/vue2/components/icon/icon.vue.js +2 -2
  49. package/dist/vue2/components/illustration/illustration.vue.cjs +2 -2
  50. package/dist/vue2/components/illustration/illustration.vue.js +2 -2
  51. package/dist/vue2/components/image_viewer/image_viewer.vue.cjs +4 -4
  52. package/dist/vue2/components/image_viewer/image_viewer.vue.cjs.map +1 -1
  53. package/dist/vue2/components/image_viewer/image_viewer.vue.js +4 -4
  54. package/dist/vue2/components/image_viewer/image_viewer.vue.js.map +1 -1
  55. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +9 -24
  56. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.cjs.map +1 -1
  57. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.js +7 -22
  58. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.js.map +1 -1
  59. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.cjs +14 -8
  60. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.cjs.map +1 -1
  61. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.js +15 -9
  62. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.js.map +1 -1
  63. package/dist/vue2/components/list_item/list_item.vue.cjs +3 -3
  64. package/dist/vue2/components/list_item/list_item.vue.cjs.map +1 -1
  65. package/dist/vue2/components/list_item/list_item.vue.js +3 -3
  66. package/dist/vue2/components/list_item/list_item.vue.js.map +1 -1
  67. package/dist/vue2/components/modal/modal.vue.cjs +4 -4
  68. package/dist/vue2/components/modal/modal.vue.cjs.map +1 -1
  69. package/dist/vue2/components/modal/modal.vue.js +4 -4
  70. package/dist/vue2/components/modal/modal.vue.js.map +1 -1
  71. package/dist/vue2/components/notice/notice_action.vue.cjs +4 -4
  72. package/dist/vue2/components/notice/notice_action.vue.cjs.map +1 -1
  73. package/dist/vue2/components/notice/notice_action.vue.js +4 -4
  74. package/dist/vue2/components/notice/notice_action.vue.js.map +1 -1
  75. package/dist/vue2/components/notice/notice_icon.vue.cjs +8 -12
  76. package/dist/vue2/components/notice/notice_icon.vue.cjs.map +1 -1
  77. package/dist/vue2/components/notice/notice_icon.vue.js +8 -12
  78. package/dist/vue2/components/notice/notice_icon.vue.js.map +1 -1
  79. package/dist/vue2/components/pagination/pagination.vue.cjs +5 -11
  80. package/dist/vue2/components/pagination/pagination.vue.cjs.map +1 -1
  81. package/dist/vue2/components/pagination/pagination.vue.js +5 -11
  82. package/dist/vue2/components/pagination/pagination.vue.js.map +1 -1
  83. package/dist/vue2/components/popover/popover_header_footer.vue.cjs +4 -4
  84. package/dist/vue2/components/popover/popover_header_footer.vue.cjs.map +1 -1
  85. package/dist/vue2/components/popover/popover_header_footer.vue.js +4 -4
  86. package/dist/vue2/components/popover/popover_header_footer.vue.js.map +1 -1
  87. package/dist/vue2/components/tooltip/tooltip.vue.cjs +13 -6
  88. package/dist/vue2/components/tooltip/tooltip.vue.cjs.map +1 -1
  89. package/dist/vue2/components/tooltip/tooltip.vue.js +14 -7
  90. package/dist/vue2/components/tooltip/tooltip.vue.js.map +1 -1
  91. package/dist/vue2/dialtone-vue.cjs +3 -0
  92. package/dist/vue2/dialtone-vue.cjs.map +1 -1
  93. package/dist/vue2/dialtone-vue.js +5 -2
  94. package/dist/vue2/lib/general-row.cjs +1 -0
  95. package/dist/vue2/lib/general-row.cjs.map +1 -1
  96. package/dist/vue2/lib/general-row.js +2 -1
  97. package/dist/vue2/lib/keyboard-shortcut.cjs +2 -0
  98. package/dist/vue2/lib/keyboard-shortcut.cjs.map +1 -1
  99. package/dist/vue2/lib/keyboard-shortcut.js +4 -2
  100. package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +5 -5
  101. package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
  102. package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +5 -5
  103. package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
  104. package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.cjs +5 -25
  105. package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.cjs.map +1 -1
  106. package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.js +6 -26
  107. package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.js.map +1 -1
  108. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +19 -6
  109. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
  110. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +19 -6
  111. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
  112. package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +4 -5
  113. package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
  114. package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +4 -5
  115. package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
  116. package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +3 -3
  117. package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
  118. package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +3 -3
  119. package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
  120. package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs +22 -35
  121. package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
  122. package/dist/vue2/recipes/conversation_view/editor/editor.vue.js +22 -35
  123. package/dist/vue2/recipes/conversation_view/editor/editor.vue.js.map +1 -1
  124. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +6 -7
  125. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
  126. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +6 -7
  127. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
  128. package/dist/vue2/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs +17 -9
  129. package/dist/vue2/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs.map +1 -1
  130. package/dist/vue2/recipes/conversation_view/feed_pill/feed_item_pill.vue.js +17 -9
  131. package/dist/vue2/recipes/conversation_view/feed_pill/feed_item_pill.vue.js.map +1 -1
  132. package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs +5 -6
  133. package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs.map +1 -1
  134. package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js +5 -6
  135. package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js.map +1 -1
  136. package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.cjs +11 -22
  137. package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
  138. package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.js +11 -22
  139. package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
  140. package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +6 -6
  141. package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
  142. package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.js +6 -6
  143. package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
  144. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.cjs +10 -14
  145. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
  146. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.js +10 -14
  147. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
  148. package/dist/vue2/recipes/leftbar/callbox/callbox.vue.cjs +3 -6
  149. package/dist/vue2/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
  150. package/dist/vue2/recipes/leftbar/callbox/callbox.vue.js +3 -6
  151. package/dist/vue2/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
  152. package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.cjs +5 -6
  153. package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.cjs.map +1 -1
  154. package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.js +5 -6
  155. package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.js.map +1 -1
  156. package/dist/vue2/recipes/leftbar/general_row/general_row.vue.cjs +7 -8
  157. package/dist/vue2/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
  158. package/dist/vue2/recipes/leftbar/general_row/general_row.vue.js +7 -8
  159. package/dist/vue2/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
  160. package/dist/vue2/recipes/leftbar/general_row/general_row_constants.cjs +17 -0
  161. package/dist/vue2/recipes/leftbar/general_row/general_row_constants.cjs.map +1 -1
  162. package/dist/vue2/recipes/leftbar/general_row/general_row_constants.js +17 -0
  163. package/dist/vue2/recipes/leftbar/general_row/general_row_constants.js.map +1 -1
  164. package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +4 -36
  165. package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
  166. package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +5 -37
  167. package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
  168. package/dist/vue2/recipes/leftbar/group_row/group_row.vue.cjs +3 -3
  169. package/dist/vue2/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
  170. package/dist/vue2/recipes/leftbar/group_row/group_row.vue.js +3 -3
  171. package/dist/vue2/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
  172. package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.cjs +3 -4
  173. package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.cjs.map +1 -1
  174. package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.js +3 -4
  175. package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.js.map +1 -1
  176. package/dist/vue2/style.css +132 -135
  177. package/dist/vue2/types/common/storybook_utils.d.ts +35 -0
  178. package/dist/vue2/types/common/storybook_utils.d.ts.map +1 -0
  179. package/dist/vue2/types/components/avatar/avatar.vue.d.ts +34 -4
  180. package/dist/vue2/types/components/avatar/avatar.vue.d.ts.map +1 -1
  181. package/dist/vue2/types/components/badge/badge.vue.d.ts +45 -16
  182. package/dist/vue2/types/components/badge/badge.vue.d.ts.map +1 -1
  183. package/dist/vue2/types/components/chip/chip.vue.d.ts +1 -1
  184. package/dist/vue2/types/components/collapsible/collapsible.vue.d.ts +1 -1
  185. package/dist/vue2/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
  186. package/dist/vue2/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts +67 -1
  187. package/dist/vue2/types/components/empty_state/empty_state_constants.d.ts +0 -27
  188. package/dist/vue2/types/components/keyboard_shortcut/index.d.ts +1 -1
  189. package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +15 -7
  190. package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
  191. package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts +11 -0
  192. package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts.map +1 -1
  193. package/dist/vue2/types/components/modal/modal.vue.d.ts +6 -4
  194. package/dist/vue2/types/components/modal/modal.vue.d.ts.map +1 -1
  195. package/dist/vue2/types/components/notice/notice_action.vue.d.ts +4 -5
  196. package/dist/vue2/types/components/notice/notice_action.vue.d.ts.map +1 -1
  197. package/dist/vue2/types/components/notice/notice_icon.vue.d.ts +1 -1
  198. package/dist/vue2/types/components/notice/notice_icon.vue.d.ts.map +1 -1
  199. package/dist/vue2/types/components/pagination/pagination.vue.d.ts.map +1 -1
  200. package/dist/vue2/types/components/split_button/split_button-omega.vue.d.ts +1 -1
  201. package/dist/vue2/types/components/tooltip/tooltip.vue.d.ts +12 -24
  202. package/dist/vue2/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
  203. package/dist/vue2/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
  204. package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
  205. package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  206. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  207. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +8 -8
  208. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  209. package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -0
  210. package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  211. package/dist/vue2/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts +16 -2
  212. package/dist/vue2/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts.map +1 -1
  213. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +6 -4
  214. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  215. package/dist/vue2/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +16 -3
  216. package/dist/vue2/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
  217. package/dist/vue2/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
  218. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -0
  219. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  220. package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
  221. package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  222. package/dist/vue2/types/recipes/leftbar/general_row/general_row_constants.d.ts +6 -0
  223. package/dist/vue2/types/recipes/leftbar/general_row/general_row_constants.d.ts.map +1 -1
  224. package/dist/vue2/types/recipes/leftbar/general_row/index.d.ts +1 -1
  225. package/dist/vue2/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +1 -1
  226. package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  227. package/dist/vue3/common/sr_only_close_button.vue.cjs +4 -4
  228. package/dist/vue3/common/sr_only_close_button.vue.cjs.map +1 -1
  229. package/dist/vue3/common/sr_only_close_button.vue.js +4 -4
  230. package/dist/vue3/common/sr_only_close_button.vue.js.map +1 -1
  231. package/dist/vue3/common/storybook_utils.cjs +8 -0
  232. package/dist/vue3/common/storybook_utils.cjs.map +1 -0
  233. package/dist/vue3/common/storybook_utils.js +8 -0
  234. package/dist/vue3/common/storybook_utils.js.map +1 -0
  235. package/dist/vue3/component-documentation.json +1 -1
  236. package/dist/vue3/components/avatar/avatar.vue.cjs +41 -30
  237. package/dist/vue3/components/avatar/avatar.vue.cjs.map +1 -1
  238. package/dist/vue3/components/avatar/avatar.vue.js +43 -32
  239. package/dist/vue3/components/avatar/avatar.vue.js.map +1 -1
  240. package/dist/vue3/components/badge/badge.vue.cjs +39 -22
  241. package/dist/vue3/components/badge/badge.vue.cjs.map +1 -1
  242. package/dist/vue3/components/badge/badge.vue.js +40 -23
  243. package/dist/vue3/components/badge/badge.vue.js.map +1 -1
  244. package/dist/vue3/components/chip/chip.vue.cjs +7 -4
  245. package/dist/vue3/components/chip/chip.vue.cjs.map +1 -1
  246. package/dist/vue3/components/chip/chip.vue.js +7 -4
  247. package/dist/vue3/components/chip/chip.vue.js.map +1 -1
  248. package/dist/vue3/components/collapsible/collapsible.vue.cjs +6 -12
  249. package/dist/vue3/components/collapsible/collapsible.vue.cjs.map +1 -1
  250. package/dist/vue3/components/collapsible/collapsible.vue.js +6 -12
  251. package/dist/vue3/components/collapsible/collapsible.vue.js.map +1 -1
  252. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs +17 -5
  253. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs.map +1 -1
  254. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js +17 -5
  255. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
  256. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs +9 -4
  257. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
  258. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js +10 -5
  259. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
  260. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs +14 -11
  261. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
  262. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js +15 -12
  263. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
  264. package/dist/vue3/components/empty_state/empty_state.vue.cjs +92 -19
  265. package/dist/vue3/components/empty_state/empty_state.vue.cjs.map +1 -1
  266. package/dist/vue3/components/empty_state/empty_state.vue.js +93 -20
  267. package/dist/vue3/components/empty_state/empty_state.vue.js.map +1 -1
  268. package/dist/vue3/components/empty_state/empty_state_constants.cjs +0 -18
  269. package/dist/vue3/components/empty_state/empty_state_constants.cjs.map +1 -1
  270. package/dist/vue3/components/empty_state/empty_state_constants.js +0 -18
  271. package/dist/vue3/components/empty_state/empty_state_constants.js.map +1 -1
  272. package/dist/vue3/components/icon/icon.vue.cjs +2 -2
  273. package/dist/vue3/components/icon/icon.vue.js +2 -2
  274. package/dist/vue3/components/illustration/illustration.vue.cjs +2 -2
  275. package/dist/vue3/components/illustration/illustration.vue.js +2 -2
  276. package/dist/vue3/components/image_viewer/image_viewer.vue.cjs +5 -4
  277. package/dist/vue3/components/image_viewer/image_viewer.vue.cjs.map +1 -1
  278. package/dist/vue3/components/image_viewer/image_viewer.vue.js +5 -4
  279. package/dist/vue3/components/image_viewer/image_viewer.vue.js.map +1 -1
  280. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +11 -24
  281. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.cjs.map +1 -1
  282. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.js +10 -23
  283. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.js.map +1 -1
  284. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.cjs +14 -8
  285. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.cjs.map +1 -1
  286. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.js +15 -9
  287. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.js.map +1 -1
  288. package/dist/vue3/components/list_item/list_item.vue.cjs +5 -4
  289. package/dist/vue3/components/list_item/list_item.vue.cjs.map +1 -1
  290. package/dist/vue3/components/list_item/list_item.vue.js +5 -4
  291. package/dist/vue3/components/list_item/list_item.vue.js.map +1 -1
  292. package/dist/vue3/components/modal/modal.vue.cjs +7 -4
  293. package/dist/vue3/components/modal/modal.vue.cjs.map +1 -1
  294. package/dist/vue3/components/modal/modal.vue.js +7 -4
  295. package/dist/vue3/components/modal/modal.vue.js.map +1 -1
  296. package/dist/vue3/components/notice/notice_action.vue.cjs +7 -4
  297. package/dist/vue3/components/notice/notice_action.vue.cjs.map +1 -1
  298. package/dist/vue3/components/notice/notice_action.vue.js +7 -4
  299. package/dist/vue3/components/notice/notice_action.vue.js.map +1 -1
  300. package/dist/vue3/components/notice/notice_icon.vue.cjs +12 -12
  301. package/dist/vue3/components/notice/notice_icon.vue.cjs.map +1 -1
  302. package/dist/vue3/components/notice/notice_icon.vue.js +13 -13
  303. package/dist/vue3/components/notice/notice_icon.vue.js.map +1 -1
  304. package/dist/vue3/components/pagination/pagination.vue.cjs +15 -10
  305. package/dist/vue3/components/pagination/pagination.vue.cjs.map +1 -1
  306. package/dist/vue3/components/pagination/pagination.vue.js +15 -10
  307. package/dist/vue3/components/pagination/pagination.vue.js.map +1 -1
  308. package/dist/vue3/components/popover/popover_header_footer.vue.cjs +7 -4
  309. package/dist/vue3/components/popover/popover_header_footer.vue.cjs.map +1 -1
  310. package/dist/vue3/components/popover/popover_header_footer.vue.js +7 -4
  311. package/dist/vue3/components/popover/popover_header_footer.vue.js.map +1 -1
  312. package/dist/vue3/components/tooltip/tooltip.vue.cjs +13 -6
  313. package/dist/vue3/components/tooltip/tooltip.vue.cjs.map +1 -1
  314. package/dist/vue3/components/tooltip/tooltip.vue.js +14 -7
  315. package/dist/vue3/components/tooltip/tooltip.vue.js.map +1 -1
  316. package/dist/vue3/dialtone-vue.cjs +3 -0
  317. package/dist/vue3/dialtone-vue.cjs.map +1 -1
  318. package/dist/vue3/dialtone-vue.js +5 -2
  319. package/dist/vue3/lib/general-row.cjs +1 -0
  320. package/dist/vue3/lib/general-row.cjs.map +1 -1
  321. package/dist/vue3/lib/general-row.js +2 -1
  322. package/dist/vue3/lib/keyboard-shortcut.cjs +2 -0
  323. package/dist/vue3/lib/keyboard-shortcut.cjs.map +1 -1
  324. package/dist/vue3/lib/keyboard-shortcut.js +4 -2
  325. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +5 -4
  326. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
  327. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +5 -4
  328. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
  329. package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.cjs +11 -27
  330. package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.cjs.map +1 -1
  331. package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.js +13 -29
  332. package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.js.map +1 -1
  333. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +19 -6
  334. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
  335. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +19 -6
  336. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
  337. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +11 -7
  338. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
  339. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +11 -7
  340. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
  341. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +7 -4
  342. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
  343. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +7 -4
  344. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
  345. package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs +25 -33
  346. package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
  347. package/dist/vue3/recipes/conversation_view/editor/editor.vue.js +26 -34
  348. package/dist/vue3/recipes/conversation_view/editor/editor.vue.js.map +1 -1
  349. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +7 -14
  350. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
  351. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +8 -15
  352. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
  353. package/dist/vue3/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs +25 -23
  354. package/dist/vue3/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs.map +1 -1
  355. package/dist/vue3/recipes/conversation_view/feed_pill/feed_item_pill.vue.js +26 -24
  356. package/dist/vue3/recipes/conversation_view/feed_pill/feed_item_pill.vue.js.map +1 -1
  357. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs +12 -8
  358. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs.map +1 -1
  359. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js +12 -8
  360. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js.map +1 -1
  361. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs +18 -29
  362. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
  363. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js +18 -29
  364. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
  365. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +12 -6
  366. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
  367. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js +12 -6
  368. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
  369. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs +13 -33
  370. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
  371. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js +14 -34
  372. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
  373. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs +4 -13
  374. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
  375. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js +5 -14
  376. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
  377. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs +7 -13
  378. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs.map +1 -1
  379. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js +8 -14
  380. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js.map +1 -1
  381. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs +13 -9
  382. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
  383. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js +13 -9
  384. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
  385. package/dist/vue3/recipes/leftbar/general_row/general_row_constants.cjs +17 -0
  386. package/dist/vue3/recipes/leftbar/general_row/general_row_constants.cjs.map +1 -1
  387. package/dist/vue3/recipes/leftbar/general_row/general_row_constants.js +17 -0
  388. package/dist/vue3/recipes/leftbar/general_row/general_row_constants.js.map +1 -1
  389. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +11 -39
  390. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
  391. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +13 -41
  392. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
  393. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs +7 -4
  394. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
  395. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js +7 -4
  396. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
  397. package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.cjs +6 -11
  398. package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.cjs.map +1 -1
  399. package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.js +7 -12
  400. package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.js.map +1 -1
  401. package/dist/vue3/style.css +132 -135
  402. package/dist/vue3/types/common/storybook_utils.d.ts +25 -0
  403. package/dist/vue3/types/common/storybook_utils.d.ts.map +1 -0
  404. package/dist/vue3/types/components/avatar/avatar.vue.d.ts +33 -5
  405. package/dist/vue3/types/components/avatar/avatar.vue.d.ts.map +1 -1
  406. package/dist/vue3/types/components/badge/badge.vue.d.ts +34 -17
  407. package/dist/vue3/types/components/badge/badge.vue.d.ts.map +1 -1
  408. package/dist/vue3/types/components/chip/chip.vue.d.ts +1 -1
  409. package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts +1 -1
  410. package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
  411. package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
  412. package/dist/vue3/types/components/empty_state/empty_state.vue.d.ts +0 -4
  413. package/dist/vue3/types/components/empty_state/empty_state.vue.d.ts.map +1 -1
  414. package/dist/vue3/types/components/empty_state/empty_state_constants.d.ts +0 -27
  415. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  416. package/dist/vue3/types/components/keyboard_shortcut/index.d.ts +1 -1
  417. package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +15 -210
  418. package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
  419. package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts +11 -0
  420. package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts.map +1 -1
  421. package/dist/vue3/types/components/list_item/list_item.vue.d.ts +8 -2
  422. package/dist/vue3/types/components/list_item/list_item.vue.d.ts.map +1 -1
  423. package/dist/vue3/types/components/notice/notice_action.vue.d.ts +4 -5
  424. package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
  425. package/dist/vue3/types/components/notice/notice_icon.vue.d.ts +1 -30
  426. package/dist/vue3/types/components/notice/notice_icon.vue.d.ts.map +1 -1
  427. package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
  428. package/dist/vue3/types/components/split_button/split_button-omega.vue.d.ts +1 -1
  429. package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts +2 -8
  430. package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
  431. package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
  432. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
  433. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +1 -30
  434. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  435. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  436. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +8 -240
  437. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  438. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -0
  439. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  440. package/dist/vue3/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts +16 -31
  441. package/dist/vue3/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts.map +1 -1
  442. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +6 -4
  443. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  444. package/dist/vue3/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +16 -3
  445. package/dist/vue3/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
  446. package/dist/vue3/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
  447. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -0
  448. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  449. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
  450. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  451. package/dist/vue3/types/recipes/leftbar/general_row/general_row_constants.d.ts +6 -0
  452. package/dist/vue3/types/recipes/leftbar/general_row/general_row_constants.d.ts.map +1 -1
  453. package/dist/vue3/types/recipes/leftbar/general_row/index.d.ts +1 -1
  454. package/dist/vue3/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +1 -30
  455. package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  456. package/package.json +3 -3
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
- const vue2 = require("@dialpad/dialtone-icons/vue2");
3
2
  const chip_constants = require("./chip_constants.cjs");
4
3
  const common_utils = require("../../common/utils.cjs");
5
4
  const _pluginVue2_normalizer = require("../../_virtual/_plugin-vue2_normalizer.cjs");
6
5
  const button = require("../button/button.vue.cjs");
6
+ const icon = require("../icon/icon.vue.cjs");
7
7
  const _sfc_main = {
8
8
  name: "DtChip",
9
9
  components: {
10
10
  DtButton: button,
11
- DtIconClose: vue2.DtIconClose
11
+ DtIcon: icon
12
12
  },
13
13
  props: {
14
14
  /**
@@ -155,8 +155,8 @@ var _sfc_render = function render() {
155
155
  return _c("span", { staticClass: "d-chip" }, [_c(_vm.interactive ? "button" : "span", _vm._g({ tag: "component", class: _vm.chipClasses(), attrs: { "id": _vm.id, "type": _vm.interactive && "button", "data-qa": "dt-chip", "aria-labelledby": _vm.ariaLabel ? void 0 : `${_vm.id}-content`, "aria-label": _vm.ariaLabel } }, _vm.chipListeners), [_vm.$slots.icon ? _c("span", { staticClass: "d-chip__icon", attrs: { "data-qa": "dt-chip-icon" } }, [_vm._t("icon")], 2) : _vm.$slots.avatar ? _c("span", { attrs: { "data-qa": "dt-chip-avatar" } }, [_vm._t("avatar")], 2) : _vm._e(), _vm.$slots.default ? _c("span", { class: ["d-chip__text", _vm.contentClass], attrs: { "id": `${_vm.id}-content`, "data-qa": "dt-chip-label" } }, [_vm._t("default")], 2) : _vm._e()]), !_vm.hideClose ? _c("dt-button", _vm._b({ class: _vm.chipCloseButtonClasses(), attrs: { "data-qa": "dt-chip-close", "aria-label": _vm.closeButtonProps.ariaLabel }, on: { "click": function($event) {
156
156
  return _vm.$emit("close");
157
157
  } }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
158
- return [_c("dt-icon-close", { attrs: { "size": _vm.closeButtonIconSize } })];
159
- }, proxy: true }], null, false, 1341282633) }, "dt-button", _vm.closeButtonProps, false)) : _vm._e()], 1);
158
+ return [_c("dt-icon", { attrs: { "name": "close", "size": _vm.closeButtonIconSize } })];
159
+ }, proxy: true }], null, false, 1192647893) }, "dt-button", _vm.closeButtonProps, false)) : _vm._e()], 1);
160
160
  };
161
161
  var _sfc_staticRenderFns = [];
162
162
  var __component__ = /* @__PURE__ */ _pluginVue2_normalizer(
@@ -1 +1 @@
1
- {"version":3,"file":"chip.vue.cjs","sources":["../../../components/chip/chip.vue"],"sourcesContent":["<template>\n <span class=\"d-chip\">\n <component\n :is=\"interactive ? 'button' : 'span'\"\n :id=\"id\"\n :type=\"interactive && 'button'\"\n :class=\"chipClasses()\"\n data-qa=\"dt-chip\"\n :aria-labelledby=\"ariaLabel ? undefined : `${id}-content`\"\n :aria-label=\"ariaLabel\"\n v-on=\"chipListeners\"\n >\n <span\n v-if=\"$slots.icon\"\n data-qa=\"dt-chip-icon\"\n class=\"d-chip__icon\"\n >\n <!-- @slot slot for Chip icon -->\n <slot name=\"icon\" />\n </span>\n <span\n v-else-if=\"$slots.avatar\"\n data-qa=\"dt-chip-avatar\"\n >\n <!-- @slot slot for Chip avatar -->\n <slot name=\"avatar\" />\n </span>\n <span\n v-if=\"$slots.default\"\n :id=\"`${id}-content`\"\n data-qa=\"dt-chip-label\"\n :class=\"['d-chip__text', contentClass]\"\n >\n <!-- @slot slot for Content within chip -->\n <slot />\n </span>\n </component>\n <dt-button\n v-if=\"!hideClose\"\n v-bind=\"closeButtonProps\"\n :class=\"chipCloseButtonClasses()\"\n data-qa=\"dt-chip-close\"\n :aria-label=\"closeButtonProps.ariaLabel\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon-close\n :size=\"closeButtonIconSize\"\n />\n </template>\n </dt-button>\n </span>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue2';\nimport {\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n} from './chip_constants';\nimport { getUniqueString } from '@/common/utils';\n\n/**\n * A chip is a compact UI element that provides brief, descriptive information about an element.\n * It is terse, ideally one word. It is important a button is identifiable, consistent, and\n * communicates its actions clearly, and is appropriately sized to its action.\n * @see https://dialtone.dialpad.com/components/chip.html\n */\nexport default {\n name: 'DtChip',\n\n components: {\n DtButton,\n DtIconClose,\n },\n\n props: {\n /**\n * A set of props to be passed into the modal's close button. Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: function () { return { ariaLabel: 'close' }; },\n validator: (props) => {\n return !!props.ariaLabel;\n },\n },\n\n /**\n * Hides the close button on the chip\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The size of the chip.\n * @values xs, sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(CHIP_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * The interactivity of the chip.\n * Makes chip clickable, apply hover/focus/active style, emit keyboard events etc.\n * @values true, false\n */\n interactive: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n id: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Descriptive label for the chip content.\n * If this prop is unset the content in the default slot will be used as an aria-label.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the chip element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the span element.\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native chip click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native chip key up event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n ],\n\n data () {\n return {\n isActive: false,\n };\n },\n\n computed: {\n chipListeners () {\n return {\n ...this.$listeners,\n click: event => {\n if (this.interactive) this.$emit('click', event);\n },\n\n keyup: event => {\n if (event.code?.toLowerCase() === 'delete') {\n this.onClose();\n } else {\n this.$emit('keyup', event);\n }\n },\n };\n },\n\n closeButtonIconSize () {\n return CHIP_ICON_SIZES[this.size];\n },\n },\n\n methods: {\n chipClasses () {\n return [\n this.$attrs['grouped-chip'] ? 'd-chip' : 'd-chip__label',\n CHIP_SIZE_MODIFIERS[this.size],\n this.labelClass,\n ];\n },\n\n chipCloseButtonClasses () {\n return [\n 'd-chip__close',\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS[this.size],\n ];\n },\n\n onClose () {\n if (!this.hideClose) {\n this.$emit('close');\n }\n },\n },\n};\n</script>\n"],"names":["DtButton","DtIconClose","CHIP_SIZE_MODIFIERS","getUniqueString","CHIP_ICON_SIZES","CHIP_CLOSE_BUTTON_SIZE_MODIFIERS"],"mappings":";;;;;;AAsEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA;AAAAA,IACA,aAAAC,KAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,WAAA;AAAA,eAAA,EAAA,WAAA,QAAA;AAAA,MAAA;AAAA,MACA,WAAA,CAAA,UAAA;AACA,eAAA,CAAA,CAAA,MAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA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;AAAA,UACA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,sBAAA;AACA,aAAAC,eAAA,gBAAA,KAAA,IAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,cAAA;AACA,aAAA;AAAA,QACA,KAAA,OAAA,cAAA,IAAA,WAAA;AAAA,QACAF,eAAA,oBAAA,KAAA,IAAA;AAAA,QACA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,yBAAA;AACA,aAAA;AAAA,QACA;AAAA,QACAG,eAAA,iCAAA,KAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,UAAA;AACA,UAAA,CAAA,KAAA,WAAA;AACA,aAAA,MAAA,OAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"chip.vue.cjs","sources":["../../../components/chip/chip.vue"],"sourcesContent":["<template>\n <span class=\"d-chip\">\n <component\n :is=\"interactive ? 'button' : 'span'\"\n :id=\"id\"\n :type=\"interactive && 'button'\"\n :class=\"chipClasses()\"\n data-qa=\"dt-chip\"\n :aria-labelledby=\"ariaLabel ? undefined : `${id}-content`\"\n :aria-label=\"ariaLabel\"\n v-on=\"chipListeners\"\n >\n <span\n v-if=\"$slots.icon\"\n data-qa=\"dt-chip-icon\"\n class=\"d-chip__icon\"\n >\n <!-- @slot slot for Chip icon -->\n <slot name=\"icon\" />\n </span>\n <span\n v-else-if=\"$slots.avatar\"\n data-qa=\"dt-chip-avatar\"\n >\n <!-- @slot slot for Chip avatar -->\n <slot name=\"avatar\" />\n </span>\n <span\n v-if=\"$slots.default\"\n :id=\"`${id}-content`\"\n data-qa=\"dt-chip-label\"\n :class=\"['d-chip__text', contentClass]\"\n >\n <!-- @slot slot for Content within chip -->\n <slot />\n </span>\n </component>\n <dt-button\n v-if=\"!hideClose\"\n v-bind=\"closeButtonProps\"\n :class=\"chipCloseButtonClasses()\"\n data-qa=\"dt-chip-close\"\n :aria-label=\"closeButtonProps.ariaLabel\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n :size=\"closeButtonIconSize\"\n />\n </template>\n </dt-button>\n </span>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\nimport {\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n} from './chip_constants';\nimport { getUniqueString } from '@/common/utils';\n\n/**\n * A chip is a compact UI element that provides brief, descriptive information about an element.\n * It is terse, ideally one word. It is important a button is identifiable, consistent, and\n * communicates its actions clearly, and is appropriately sized to its action.\n * @see https://dialtone.dialpad.com/components/chip.html\n */\nexport default {\n name: 'DtChip',\n\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n /**\n * A set of props to be passed into the modal's close button. Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: function () { return { ariaLabel: 'close' }; },\n validator: (props) => {\n return !!props.ariaLabel;\n },\n },\n\n /**\n * Hides the close button on the chip\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The size of the chip.\n * @values xs, sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(CHIP_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * The interactivity of the chip.\n * Makes chip clickable, apply hover/focus/active style, emit keyboard events etc.\n * @values true, false\n */\n interactive: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n id: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Descriptive label for the chip content.\n * If this prop is unset the content in the default slot will be used as an aria-label.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the chip element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the span element.\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native chip click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native chip key up event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n ],\n\n data () {\n return {\n isActive: false,\n };\n },\n\n computed: {\n chipListeners () {\n return {\n ...this.$listeners,\n click: event => {\n if (this.interactive) this.$emit('click', event);\n },\n\n keyup: event => {\n if (event.code?.toLowerCase() === 'delete') {\n this.onClose();\n } else {\n this.$emit('keyup', event);\n }\n },\n };\n },\n\n closeButtonIconSize () {\n return CHIP_ICON_SIZES[this.size];\n },\n },\n\n methods: {\n chipClasses () {\n return [\n this.$attrs['grouped-chip'] ? 'd-chip' : 'd-chip__label',\n CHIP_SIZE_MODIFIERS[this.size],\n this.labelClass,\n ];\n },\n\n chipCloseButtonClasses () {\n return [\n 'd-chip__close',\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS[this.size],\n ];\n },\n\n onClose () {\n if (!this.hideClose) {\n this.$emit('close');\n }\n },\n },\n};\n</script>\n"],"names":["DtButton","DtIcon","CHIP_SIZE_MODIFIERS","getUniqueString","CHIP_ICON_SIZES","CHIP_CLOSE_BUTTON_SIZE_MODIFIERS"],"mappings":";;;;;;AAuEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA;AAAAA,IACA,QAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,WAAA;AAAA,eAAA,EAAA,WAAA,QAAA;AAAA,MAAA;AAAA,MACA,WAAA,CAAA,UAAA;AACA,eAAA,CAAA,CAAA,MAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AA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,IAEA,sBAAA;AACA,aAAAC,eAAA,gBAAA,KAAA,IAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,cAAA;AACA,aAAA;AAAA,QACA,KAAA,OAAA,cAAA,IAAA,WAAA;AAAA,QACAF,eAAA,oBAAA,KAAA,IAAA;AAAA,QACA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,yBAAA;AACA,aAAA;AAAA,QACA;AAAA,QACAG,eAAA,iCAAA,KAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,UAAA;AACA,UAAA,CAAA,KAAA,WAAA;AACA,aAAA,MAAA,OAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;"}
@@ -1,13 +1,13 @@
1
- import { DtIconClose } from "@dialpad/dialtone-icons/vue2";
2
1
  import { CHIP_SIZE_MODIFIERS, CHIP_ICON_SIZES, CHIP_CLOSE_BUTTON_SIZE_MODIFIERS } from "./chip_constants.js";
3
2
  import { getUniqueString } from "../../common/utils.js";
4
3
  import normalizeComponent from "../../_virtual/_plugin-vue2_normalizer.js";
5
4
  import DtButton from "../button/button.vue.js";
5
+ import DtIcon from "../icon/icon.vue.js";
6
6
  const _sfc_main = {
7
7
  name: "DtChip",
8
8
  components: {
9
9
  DtButton,
10
- DtIconClose
10
+ DtIcon
11
11
  },
12
12
  props: {
13
13
  /**
@@ -154,8 +154,8 @@ var _sfc_render = function render() {
154
154
  return _c("span", { staticClass: "d-chip" }, [_c(_vm.interactive ? "button" : "span", _vm._g({ tag: "component", class: _vm.chipClasses(), attrs: { "id": _vm.id, "type": _vm.interactive && "button", "data-qa": "dt-chip", "aria-labelledby": _vm.ariaLabel ? void 0 : `${_vm.id}-content`, "aria-label": _vm.ariaLabel } }, _vm.chipListeners), [_vm.$slots.icon ? _c("span", { staticClass: "d-chip__icon", attrs: { "data-qa": "dt-chip-icon" } }, [_vm._t("icon")], 2) : _vm.$slots.avatar ? _c("span", { attrs: { "data-qa": "dt-chip-avatar" } }, [_vm._t("avatar")], 2) : _vm._e(), _vm.$slots.default ? _c("span", { class: ["d-chip__text", _vm.contentClass], attrs: { "id": `${_vm.id}-content`, "data-qa": "dt-chip-label" } }, [_vm._t("default")], 2) : _vm._e()]), !_vm.hideClose ? _c("dt-button", _vm._b({ class: _vm.chipCloseButtonClasses(), attrs: { "data-qa": "dt-chip-close", "aria-label": _vm.closeButtonProps.ariaLabel }, on: { "click": function($event) {
155
155
  return _vm.$emit("close");
156
156
  } }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
157
- return [_c("dt-icon-close", { attrs: { "size": _vm.closeButtonIconSize } })];
158
- }, proxy: true }], null, false, 1341282633) }, "dt-button", _vm.closeButtonProps, false)) : _vm._e()], 1);
157
+ return [_c("dt-icon", { attrs: { "name": "close", "size": _vm.closeButtonIconSize } })];
158
+ }, proxy: true }], null, false, 1192647893) }, "dt-button", _vm.closeButtonProps, false)) : _vm._e()], 1);
159
159
  };
160
160
  var _sfc_staticRenderFns = [];
161
161
  var __component__ = /* @__PURE__ */ normalizeComponent(
@@ -1 +1 @@
1
- {"version":3,"file":"chip.vue.js","sources":["../../../components/chip/chip.vue"],"sourcesContent":["<template>\n <span class=\"d-chip\">\n <component\n :is=\"interactive ? 'button' : 'span'\"\n :id=\"id\"\n :type=\"interactive && 'button'\"\n :class=\"chipClasses()\"\n data-qa=\"dt-chip\"\n :aria-labelledby=\"ariaLabel ? undefined : `${id}-content`\"\n :aria-label=\"ariaLabel\"\n v-on=\"chipListeners\"\n >\n <span\n v-if=\"$slots.icon\"\n data-qa=\"dt-chip-icon\"\n class=\"d-chip__icon\"\n >\n <!-- @slot slot for Chip icon -->\n <slot name=\"icon\" />\n </span>\n <span\n v-else-if=\"$slots.avatar\"\n data-qa=\"dt-chip-avatar\"\n >\n <!-- @slot slot for Chip avatar -->\n <slot name=\"avatar\" />\n </span>\n <span\n v-if=\"$slots.default\"\n :id=\"`${id}-content`\"\n data-qa=\"dt-chip-label\"\n :class=\"['d-chip__text', contentClass]\"\n >\n <!-- @slot slot for Content within chip -->\n <slot />\n </span>\n </component>\n <dt-button\n v-if=\"!hideClose\"\n v-bind=\"closeButtonProps\"\n :class=\"chipCloseButtonClasses()\"\n data-qa=\"dt-chip-close\"\n :aria-label=\"closeButtonProps.ariaLabel\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon-close\n :size=\"closeButtonIconSize\"\n />\n </template>\n </dt-button>\n </span>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue2';\nimport {\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n} from './chip_constants';\nimport { getUniqueString } from '@/common/utils';\n\n/**\n * A chip is a compact UI element that provides brief, descriptive information about an element.\n * It is terse, ideally one word. It is important a button is identifiable, consistent, and\n * communicates its actions clearly, and is appropriately sized to its action.\n * @see https://dialtone.dialpad.com/components/chip.html\n */\nexport default {\n name: 'DtChip',\n\n components: {\n DtButton,\n DtIconClose,\n },\n\n props: {\n /**\n * A set of props to be passed into the modal's close button. Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: function () { return { ariaLabel: 'close' }; },\n validator: (props) => {\n return !!props.ariaLabel;\n },\n },\n\n /**\n * Hides the close button on the chip\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The size of the chip.\n * @values xs, sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(CHIP_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * The interactivity of the chip.\n * Makes chip clickable, apply hover/focus/active style, emit keyboard events etc.\n * @values true, false\n */\n interactive: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n id: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Descriptive label for the chip content.\n * If this prop is unset the content in the default slot will be used as an aria-label.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the chip element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the span element.\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native chip click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native chip key up event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n ],\n\n data () {\n return {\n isActive: false,\n };\n },\n\n computed: {\n chipListeners () {\n return {\n ...this.$listeners,\n click: event => {\n if (this.interactive) this.$emit('click', event);\n },\n\n keyup: event => {\n if (event.code?.toLowerCase() === 'delete') {\n this.onClose();\n } else {\n this.$emit('keyup', event);\n }\n },\n };\n },\n\n closeButtonIconSize () {\n return CHIP_ICON_SIZES[this.size];\n },\n },\n\n methods: {\n chipClasses () {\n return [\n this.$attrs['grouped-chip'] ? 'd-chip' : 'd-chip__label',\n CHIP_SIZE_MODIFIERS[this.size],\n this.labelClass,\n ];\n },\n\n chipCloseButtonClasses () {\n return [\n 'd-chip__close',\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS[this.size],\n ];\n },\n\n onClose () {\n if (!this.hideClose) {\n this.$emit('close');\n }\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;AAsEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,WAAA;AAAA,eAAA,EAAA,WAAA,QAAA;AAAA,MAAA;AAAA,MACA,WAAA,CAAA,UAAA;AACA,eAAA,CAAA,CAAA,MAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA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AA,KAAA;AAAA,UACA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,sBAAA;AACA,aAAA,gBAAA,KAAA,IAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,cAAA;AACA,aAAA;AAAA,QACA,KAAA,OAAA,cAAA,IAAA,WAAA;AAAA,QACA,oBAAA,KAAA,IAAA;AAAA,QACA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,yBAAA;AACA,aAAA;AAAA,QACA;AAAA,QACA,iCAAA,KAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,UAAA;AACA,UAAA,CAAA,KAAA,WAAA;AACA,aAAA,MAAA,OAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"chip.vue.js","sources":["../../../components/chip/chip.vue"],"sourcesContent":["<template>\n <span class=\"d-chip\">\n <component\n :is=\"interactive ? 'button' : 'span'\"\n :id=\"id\"\n :type=\"interactive && 'button'\"\n :class=\"chipClasses()\"\n data-qa=\"dt-chip\"\n :aria-labelledby=\"ariaLabel ? undefined : `${id}-content`\"\n :aria-label=\"ariaLabel\"\n v-on=\"chipListeners\"\n >\n <span\n v-if=\"$slots.icon\"\n data-qa=\"dt-chip-icon\"\n class=\"d-chip__icon\"\n >\n <!-- @slot slot for Chip icon -->\n <slot name=\"icon\" />\n </span>\n <span\n v-else-if=\"$slots.avatar\"\n data-qa=\"dt-chip-avatar\"\n >\n <!-- @slot slot for Chip avatar -->\n <slot name=\"avatar\" />\n </span>\n <span\n v-if=\"$slots.default\"\n :id=\"`${id}-content`\"\n data-qa=\"dt-chip-label\"\n :class=\"['d-chip__text', contentClass]\"\n >\n <!-- @slot slot for Content within chip -->\n <slot />\n </span>\n </component>\n <dt-button\n v-if=\"!hideClose\"\n v-bind=\"closeButtonProps\"\n :class=\"chipCloseButtonClasses()\"\n data-qa=\"dt-chip-close\"\n :aria-label=\"closeButtonProps.ariaLabel\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n :size=\"closeButtonIconSize\"\n />\n </template>\n </dt-button>\n </span>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\nimport {\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n} from './chip_constants';\nimport { getUniqueString } from '@/common/utils';\n\n/**\n * A chip is a compact UI element that provides brief, descriptive information about an element.\n * It is terse, ideally one word. It is important a button is identifiable, consistent, and\n * communicates its actions clearly, and is appropriately sized to its action.\n * @see https://dialtone.dialpad.com/components/chip.html\n */\nexport default {\n name: 'DtChip',\n\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n /**\n * A set of props to be passed into the modal's close button. Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: function () { return { ariaLabel: 'close' }; },\n validator: (props) => {\n return !!props.ariaLabel;\n },\n },\n\n /**\n * Hides the close button on the chip\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The size of the chip.\n * @values xs, sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(CHIP_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * The interactivity of the chip.\n * Makes chip clickable, apply hover/focus/active style, emit keyboard events etc.\n * @values true, false\n */\n interactive: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n id: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Descriptive label for the chip content.\n * If this prop is unset the content in the default slot will be used as an aria-label.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the chip element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the span element.\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native chip click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native chip key up event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n ],\n\n data () {\n return {\n isActive: false,\n };\n },\n\n computed: {\n chipListeners () {\n return {\n ...this.$listeners,\n click: event => {\n if (this.interactive) this.$emit('click', event);\n },\n\n keyup: event => {\n if (event.code?.toLowerCase() === 'delete') {\n this.onClose();\n } else {\n this.$emit('keyup', event);\n }\n },\n };\n },\n\n closeButtonIconSize () {\n return CHIP_ICON_SIZES[this.size];\n },\n },\n\n methods: {\n chipClasses () {\n return [\n this.$attrs['grouped-chip'] ? 'd-chip' : 'd-chip__label',\n CHIP_SIZE_MODIFIERS[this.size],\n this.labelClass,\n ];\n },\n\n chipCloseButtonClasses () {\n return [\n 'd-chip__close',\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS[this.size],\n ];\n },\n\n onClose () {\n if (!this.hideClose) {\n this.$emit('close');\n }\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;AAuEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,WAAA;AAAA,eAAA,EAAA,WAAA,QAAA;AAAA,MAAA;AAAA,MACA,WAAA,CAAA,UAAA;AACA,eAAA,CAAA,CAAA,MAAA;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,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,MAAA,OAAA,KAAA,mBAAA,EAAA,SAAA,CAAA;AAA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,IAAA,WAAA;AAAA,QACA,oBAAA,KAAA,IAAA;AAAA,QACA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,yBAAA;AACA,aAAA;AAAA,QACA;AAAA,QACA,iCAAA,KAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,UAAA;AACA,UAAA,CAAA,KAAA,WAAA;AACA,aAAA,MAAA,OAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;"}
@@ -1,18 +1,17 @@
1
1
  "use strict";
2
2
  const common_utils = require("../../common/utils.cjs");
3
3
  const collapsible_lazy_show = require("./collapsible_lazy_show.vue.cjs");
4
- const vue2 = require("@dialpad/dialtone-icons/vue2");
5
4
  const _pluginVue2_normalizer = require("../../_virtual/_plugin-vue2_normalizer.cjs");
6
5
  const button = require("../button/button.vue.cjs");
7
6
  const lazy_show = require("../lazy_show/lazy_show.vue.cjs");
7
+ const icon = require("../icon/icon.vue.cjs");
8
8
  const _sfc_main = {
9
9
  name: "DtCollapsible",
10
10
  components: {
11
11
  DtButton: button,
12
12
  DtCollapsibleLazyShow: collapsible_lazy_show,
13
13
  DtLazyShow: lazy_show,
14
- DtIconChevronDown: vue2.DtIconChevronDown,
15
- DtIconChevronRight: vue2.DtIconChevronRight
14
+ DtIcon: icon
16
15
  },
17
16
  props: {
18
17
  /**
@@ -173,7 +172,7 @@ var _sfc_render = function render() {
173
172
  return _c(_vm.elementType, _vm._g({ ref: "collapsible", tag: "component" }, _vm.$listeners), [_c("div", { ref: "anchor", class: _vm.anchorClass, attrs: { "id": !_vm.ariaLabelledBy && _vm.labelledBy } }, [_vm._t("anchor", function() {
174
173
  return [_c("dt-button", { style: {
175
174
  "width": _vm.maxWidth
176
- }, attrs: { "importance": "clear", "kind": "muted", "aria-controls": _vm.id, "aria-expanded": `${_vm.isOpen}` }, on: { "click": _vm.defaultToggleOpen } }, [_vm.isOpen ? _c("dt-icon-chevron-down", { staticClass: "d-collapsible__icon", attrs: { "size": "300" } }) : _c("dt-icon-chevron-right", { staticClass: "d-collapsible__icon", attrs: { "size": "300" } }), _c("span", { staticClass: "d-collapsible__anchor-text", attrs: { "title": _vm.anchorText } }, [_vm._v(" " + _vm._s(_vm.anchorText) + " ")])], 1)];
175
+ }, attrs: { "importance": "clear", "kind": "muted", "aria-controls": _vm.id, "aria-expanded": `${_vm.isOpen}` }, on: { "click": _vm.defaultToggleOpen } }, [_c("dt-icon", { staticClass: "d-collapsible__icon", attrs: { "name": _vm.isOpen ? "chevron-down" : "chevron-right", "size": "300" } }), _c("span", { staticClass: "d-collapsible__anchor-text", attrs: { "title": _vm.anchorText } }, [_vm._v(" " + _vm._s(_vm.anchorText) + " ")])], 1)];
177
176
  }, { "attrs": {
178
177
  "aria-controls": _vm.id,
179
178
  "aria-expanded": _vm.isOpen.toString(),
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible.vue.cjs","sources":["../../../components/collapsible/collapsible.vue"],"sourcesContent":["<template>\n <component\n :is=\"elementType\"\n ref=\"collapsible\"\n v-on=\"$listeners\"\n >\n <!-- Element for capturing keypress events -->\n <div\n :id=\"!ariaLabelledBy && labelledBy\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n >\n <!-- @slot Slot for the anchor element that toggles the collapsible content -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-controls': id,\n 'aria-expanded': isOpen.toString(),\n 'role': 'button',\n }\"\n >\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-controls=\"id\"\n :aria-expanded=\"`${isOpen}`\"\n :style=\"{\n 'width': maxWidth,\n }\"\n @click=\"defaultToggleOpen\"\n >\n <dt-icon-chevron-down\n v-if=\"isOpen\"\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <dt-icon-chevron-right\n v-else\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <span\n class=\"d-collapsible__anchor-text\"\n :title=\"anchorText\"\n >\n {{ anchorText }}\n </span>\n </dt-button>\n </slot>\n </div>\n <dt-collapsible-lazy-show\n :id=\"id\"\n ref=\"contentWrapper\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :show=\"isOpen\"\n :element-type=\"contentElementType\"\n :class=\"contentClass\"\n :style=\"{\n 'max-height': maxHeight,\n 'max-width': maxWidth,\n }\"\n data-qa=\"dt-collapsible--content\"\n tabindex=\"-1\"\n appear\n v-on=\"$listeners\"\n @after-leave=\"onLeaveTransitionComplete\"\n @after-enter=\"onEnterTransitionComplete\"\n >\n <!-- @slot Slot for the collapsible element that is expanded by the anchor -->\n <slot\n name=\"content\"\n />\n </dt-collapsible-lazy-show>\n </component>\n</template>\n\n<script>\nimport { getUniqueString } from '@/common/utils';\nimport DtCollapsibleLazyShow from './collapsible_lazy_show.vue';\nimport { DtButton } from '@/components/button';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { DtIconChevronDown, DtIconChevronRight } from '@dialpad/dialtone-icons/vue2';\n\n/**\n * A collapsible is a component consisting of an interactive anchor that toggled the expandable/collapsible element.\n * @see https://dialtone.dialpad.com/components/collapsible.html\n */\nexport default {\n name: 'DtCollapsible',\n\n components: {\n DtButton,\n DtCollapsibleLazyShow,\n DtLazyShow,\n DtIconChevronDown,\n DtIconChevronRight,\n },\n\n props: {\n /**\n * Text that is displayed on the anchor if nothing is passed in the slot.\n * Ignored if the anchor slot is used.\n */\n anchorText: {\n type: String,\n default: null,\n },\n\n /**\n * Controls whether the collapsible is shown. Leaving this null will have the collapsible start\n * expanded and trigger on click by default. If you set this value, the default trigger\n * behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The id of the content wrapper.\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * HTML element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n contentElementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Additional class name for the anchor wrapper element.\n */\n anchorClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * The maximum width of the anchor and collapsible element.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: null,\n },\n\n /**\n * The maximum height of the collapsible element.\n * Possible units rem|px|%|em\n */\n maxHeight: {\n type: String,\n default: null,\n },\n\n /**\n * Label on the collapsible content. Should provide this or ariaLabelledBy but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Id of the element that labels the collapsible content. Defaults to the anchor element.\n * Should provide this or ariaLabel but not both.\n */\n ariaLabelledBy: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Event fired when the content is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n ],\n\n data () {\n return {\n isOpen: true,\n };\n },\n\n computed: {\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor\n return this.ariaLabelledBy || (!this.ariaLabel && getUniqueString('DtCollapsible__anchor'));\n },\n },\n\n watch: {\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n },\n\n mounted () {\n this.validateProperAnchor();\n },\n\n methods: {\n onLeaveTransitionComplete () {\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n onEnterTransitionComplete () {\n this.$emit('opened', true, this.$refs.content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n defaultToggleOpen () {\n if (this.open === null) {\n this.toggleOpen();\n }\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n validateProperAnchor () {\n if (!this.anchorText && !this.$scopedSlots.anchor) {\n console.error('anchor text and anchor slot content cannot both be falsy');\n }\n },\n },\n};\n</script>\n"],"names":["DtButton","DtCollapsibleLazyShow","DtLazyShow","DtIconChevronDown","DtIconChevronRight","getUniqueString"],"mappings":";;;;;;;AAyFA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA;AAAAA,IACA,uBAAAC;AAAAA,IACA,YAAAC;AAAAA,IACA,mBAAAC,KAAA;AAAA,IACA,oBAAAC,KAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAC,aAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,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,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AA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;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"collapsible.vue.cjs","sources":["../../../components/collapsible/collapsible.vue"],"sourcesContent":["<template>\n <component\n :is=\"elementType\"\n ref=\"collapsible\"\n v-on=\"$listeners\"\n >\n <!-- Element for capturing keypress events -->\n <div\n :id=\"!ariaLabelledBy && labelledBy\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n >\n <!-- @slot Slot for the anchor element that toggles the collapsible content -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-controls': id,\n 'aria-expanded': isOpen.toString(),\n 'role': 'button',\n }\"\n >\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-controls=\"id\"\n :aria-expanded=\"`${isOpen}`\"\n :style=\"{\n 'width': maxWidth,\n }\"\n @click=\"defaultToggleOpen\"\n >\n <dt-icon\n :name=\" isOpen ? 'chevron-down' : 'chevron-right'\"\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <span\n class=\"d-collapsible__anchor-text\"\n :title=\"anchorText\"\n >\n {{ anchorText }}\n </span>\n </dt-button>\n </slot>\n </div>\n <dt-collapsible-lazy-show\n :id=\"id\"\n ref=\"contentWrapper\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :show=\"isOpen\"\n :element-type=\"contentElementType\"\n :class=\"contentClass\"\n :style=\"{\n 'max-height': maxHeight,\n 'max-width': maxWidth,\n }\"\n data-qa=\"dt-collapsible--content\"\n tabindex=\"-1\"\n appear\n v-on=\"$listeners\"\n @after-leave=\"onLeaveTransitionComplete\"\n @after-enter=\"onEnterTransitionComplete\"\n >\n <!-- @slot Slot for the collapsible element that is expanded by the anchor -->\n <slot\n name=\"content\"\n />\n </dt-collapsible-lazy-show>\n </component>\n</template>\n\n<script>\nimport { getUniqueString } from '@/common/utils';\nimport DtCollapsibleLazyShow from './collapsible_lazy_show.vue';\nimport { DtButton } from '@/components/button';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { DtIcon } from '@/components/icon';\n\n/**\n * A collapsible is a component consisting of an interactive anchor that toggled the expandable/collapsible element.\n * @see https://dialtone.dialpad.com/components/collapsible.html\n */\nexport default {\n name: 'DtCollapsible',\n\n components: {\n DtButton,\n DtCollapsibleLazyShow,\n DtLazyShow,\n DtIcon,\n },\n\n props: {\n /**\n * Text that is displayed on the anchor if nothing is passed in the slot.\n * Ignored if the anchor slot is used.\n */\n anchorText: {\n type: String,\n default: null,\n },\n\n /**\n * Controls whether the collapsible is shown. Leaving this null will have the collapsible start\n * expanded and trigger on click by default. If you set this value, the default trigger\n * behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The id of the content wrapper.\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * HTML element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n contentElementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Additional class name for the anchor wrapper element.\n */\n anchorClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * The maximum width of the anchor and collapsible element.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: null,\n },\n\n /**\n * The maximum height of the collapsible element.\n * Possible units rem|px|%|em\n */\n maxHeight: {\n type: String,\n default: null,\n },\n\n /**\n * Label on the collapsible content. Should provide this or ariaLabelledBy but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Id of the element that labels the collapsible content. Defaults to the anchor element.\n * Should provide this or ariaLabel but not both.\n */\n ariaLabelledBy: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Event fired when the content is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n ],\n\n data () {\n return {\n isOpen: true,\n };\n },\n\n computed: {\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor\n return this.ariaLabelledBy || (!this.ariaLabel && getUniqueString('DtCollapsible__anchor'));\n },\n },\n\n watch: {\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n },\n\n mounted () {\n this.validateProperAnchor();\n },\n\n methods: {\n onLeaveTransitionComplete () {\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n onEnterTransitionComplete () {\n this.$emit('opened', true, this.$refs.content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n defaultToggleOpen () {\n if (this.open === null) {\n this.toggleOpen();\n }\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n validateProperAnchor () {\n if (!this.anchorText && !this.$scopedSlots.anchor) {\n console.error('anchor text and anchor slot content cannot both be falsy');\n }\n },\n },\n};\n</script>\n"],"names":["DtButton","DtCollapsibleLazyShow","DtLazyShow","DtIcon","getUniqueString"],"mappings":";;;;;;;AAoFA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA;AAAAA,IACA,uBAAAC;AAAAA,IACA,YAAAC;AAAAA,IACA,QAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAC,aAAA,gBAAA;AAAA,MAAA;AAAA,IACA;A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EACA;AAAA,EAEA,SAAA;AAAA,IACA,4BAAA;AACA,WAAA,MAAA,UAAA,KAAA;AACA,UAAA,KAAA,SAAA,MAAA;AACA,aAAA,MAAA,eAAA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,4BAAA;AACA,WAAA,MAAA,UAAA,MAAA,KAAA,MAAA,OAAA;AACA,UAAA,KAAA,SAAA,MAAA;AACA,aAAA,MAAA,eAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,oBAAA;AACA,UAAA,KAAA,SAAA,MAAA;AACA,aAAA,WAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,aAAA;AACA,WAAA,SAAA,CAAA,KAAA;AAAA,IACA;AAAA,IAEA,uBAAA;AACA,UAAA,CAAA,KAAA,cAAA,CAAA,KAAA,aAAA,QAAA;AACA,gBAAA,MAAA,0DAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,17 +1,16 @@
1
1
  import { getUniqueString } from "../../common/utils.js";
2
2
  import DtCollapsibleLazyShow from "./collapsible_lazy_show.vue.js";
3
- import { DtIconChevronDown, DtIconChevronRight } from "@dialpad/dialtone-icons/vue2";
4
3
  import normalizeComponent from "../../_virtual/_plugin-vue2_normalizer.js";
5
4
  import DtButton from "../button/button.vue.js";
6
5
  import DtLazyShow from "../lazy_show/lazy_show.vue.js";
6
+ import DtIcon from "../icon/icon.vue.js";
7
7
  const _sfc_main = {
8
8
  name: "DtCollapsible",
9
9
  components: {
10
10
  DtButton,
11
11
  DtCollapsibleLazyShow,
12
12
  DtLazyShow,
13
- DtIconChevronDown,
14
- DtIconChevronRight
13
+ DtIcon
15
14
  },
16
15
  props: {
17
16
  /**
@@ -172,7 +171,7 @@ var _sfc_render = function render() {
172
171
  return _c(_vm.elementType, _vm._g({ ref: "collapsible", tag: "component" }, _vm.$listeners), [_c("div", { ref: "anchor", class: _vm.anchorClass, attrs: { "id": !_vm.ariaLabelledBy && _vm.labelledBy } }, [_vm._t("anchor", function() {
173
172
  return [_c("dt-button", { style: {
174
173
  "width": _vm.maxWidth
175
- }, attrs: { "importance": "clear", "kind": "muted", "aria-controls": _vm.id, "aria-expanded": `${_vm.isOpen}` }, on: { "click": _vm.defaultToggleOpen } }, [_vm.isOpen ? _c("dt-icon-chevron-down", { staticClass: "d-collapsible__icon", attrs: { "size": "300" } }) : _c("dt-icon-chevron-right", { staticClass: "d-collapsible__icon", attrs: { "size": "300" } }), _c("span", { staticClass: "d-collapsible__anchor-text", attrs: { "title": _vm.anchorText } }, [_vm._v(" " + _vm._s(_vm.anchorText) + " ")])], 1)];
174
+ }, attrs: { "importance": "clear", "kind": "muted", "aria-controls": _vm.id, "aria-expanded": `${_vm.isOpen}` }, on: { "click": _vm.defaultToggleOpen } }, [_c("dt-icon", { staticClass: "d-collapsible__icon", attrs: { "name": _vm.isOpen ? "chevron-down" : "chevron-right", "size": "300" } }), _c("span", { staticClass: "d-collapsible__anchor-text", attrs: { "title": _vm.anchorText } }, [_vm._v(" " + _vm._s(_vm.anchorText) + " ")])], 1)];
176
175
  }, { "attrs": {
177
176
  "aria-controls": _vm.id,
178
177
  "aria-expanded": _vm.isOpen.toString(),
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible.vue.js","sources":["../../../components/collapsible/collapsible.vue"],"sourcesContent":["<template>\n <component\n :is=\"elementType\"\n ref=\"collapsible\"\n v-on=\"$listeners\"\n >\n <!-- Element for capturing keypress events -->\n <div\n :id=\"!ariaLabelledBy && labelledBy\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n >\n <!-- @slot Slot for the anchor element that toggles the collapsible content -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-controls': id,\n 'aria-expanded': isOpen.toString(),\n 'role': 'button',\n }\"\n >\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-controls=\"id\"\n :aria-expanded=\"`${isOpen}`\"\n :style=\"{\n 'width': maxWidth,\n }\"\n @click=\"defaultToggleOpen\"\n >\n <dt-icon-chevron-down\n v-if=\"isOpen\"\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <dt-icon-chevron-right\n v-else\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <span\n class=\"d-collapsible__anchor-text\"\n :title=\"anchorText\"\n >\n {{ anchorText }}\n </span>\n </dt-button>\n </slot>\n </div>\n <dt-collapsible-lazy-show\n :id=\"id\"\n ref=\"contentWrapper\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :show=\"isOpen\"\n :element-type=\"contentElementType\"\n :class=\"contentClass\"\n :style=\"{\n 'max-height': maxHeight,\n 'max-width': maxWidth,\n }\"\n data-qa=\"dt-collapsible--content\"\n tabindex=\"-1\"\n appear\n v-on=\"$listeners\"\n @after-leave=\"onLeaveTransitionComplete\"\n @after-enter=\"onEnterTransitionComplete\"\n >\n <!-- @slot Slot for the collapsible element that is expanded by the anchor -->\n <slot\n name=\"content\"\n />\n </dt-collapsible-lazy-show>\n </component>\n</template>\n\n<script>\nimport { getUniqueString } from '@/common/utils';\nimport DtCollapsibleLazyShow from './collapsible_lazy_show.vue';\nimport { DtButton } from '@/components/button';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { DtIconChevronDown, DtIconChevronRight } from '@dialpad/dialtone-icons/vue2';\n\n/**\n * A collapsible is a component consisting of an interactive anchor that toggled the expandable/collapsible element.\n * @see https://dialtone.dialpad.com/components/collapsible.html\n */\nexport default {\n name: 'DtCollapsible',\n\n components: {\n DtButton,\n DtCollapsibleLazyShow,\n DtLazyShow,\n DtIconChevronDown,\n DtIconChevronRight,\n },\n\n props: {\n /**\n * Text that is displayed on the anchor if nothing is passed in the slot.\n * Ignored if the anchor slot is used.\n */\n anchorText: {\n type: String,\n default: null,\n },\n\n /**\n * Controls whether the collapsible is shown. Leaving this null will have the collapsible start\n * expanded and trigger on click by default. If you set this value, the default trigger\n * behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The id of the content wrapper.\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * HTML element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n contentElementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Additional class name for the anchor wrapper element.\n */\n anchorClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * The maximum width of the anchor and collapsible element.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: null,\n },\n\n /**\n * The maximum height of the collapsible element.\n * Possible units rem|px|%|em\n */\n maxHeight: {\n type: String,\n default: null,\n },\n\n /**\n * Label on the collapsible content. Should provide this or ariaLabelledBy but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Id of the element that labels the collapsible content. Defaults to the anchor element.\n * Should provide this or ariaLabel but not both.\n */\n ariaLabelledBy: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Event fired when the content is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n ],\n\n data () {\n return {\n isOpen: true,\n };\n },\n\n computed: {\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor\n return this.ariaLabelledBy || (!this.ariaLabel && getUniqueString('DtCollapsible__anchor'));\n },\n },\n\n watch: {\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n },\n\n mounted () {\n this.validateProperAnchor();\n },\n\n methods: {\n onLeaveTransitionComplete () {\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n onEnterTransitionComplete () {\n this.$emit('opened', true, this.$refs.content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n defaultToggleOpen () {\n if (this.open === null) {\n this.toggleOpen();\n }\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n validateProperAnchor () {\n if (!this.anchorText && !this.$scopedSlots.anchor) {\n console.error('anchor text and anchor slot content cannot both be falsy');\n }\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;;AAyFA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;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AAA,CAAA,KAAA,aAAA,QAAA;AACA,gBAAA,MAAA,0DAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"collapsible.vue.js","sources":["../../../components/collapsible/collapsible.vue"],"sourcesContent":["<template>\n <component\n :is=\"elementType\"\n ref=\"collapsible\"\n v-on=\"$listeners\"\n >\n <!-- Element for capturing keypress events -->\n <div\n :id=\"!ariaLabelledBy && labelledBy\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n >\n <!-- @slot Slot for the anchor element that toggles the collapsible content -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-controls': id,\n 'aria-expanded': isOpen.toString(),\n 'role': 'button',\n }\"\n >\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-controls=\"id\"\n :aria-expanded=\"`${isOpen}`\"\n :style=\"{\n 'width': maxWidth,\n }\"\n @click=\"defaultToggleOpen\"\n >\n <dt-icon\n :name=\" isOpen ? 'chevron-down' : 'chevron-right'\"\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <span\n class=\"d-collapsible__anchor-text\"\n :title=\"anchorText\"\n >\n {{ anchorText }}\n </span>\n </dt-button>\n </slot>\n </div>\n <dt-collapsible-lazy-show\n :id=\"id\"\n ref=\"contentWrapper\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :show=\"isOpen\"\n :element-type=\"contentElementType\"\n :class=\"contentClass\"\n :style=\"{\n 'max-height': maxHeight,\n 'max-width': maxWidth,\n }\"\n data-qa=\"dt-collapsible--content\"\n tabindex=\"-1\"\n appear\n v-on=\"$listeners\"\n @after-leave=\"onLeaveTransitionComplete\"\n @after-enter=\"onEnterTransitionComplete\"\n >\n <!-- @slot Slot for the collapsible element that is expanded by the anchor -->\n <slot\n name=\"content\"\n />\n </dt-collapsible-lazy-show>\n </component>\n</template>\n\n<script>\nimport { getUniqueString } from '@/common/utils';\nimport DtCollapsibleLazyShow from './collapsible_lazy_show.vue';\nimport { DtButton } from '@/components/button';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { DtIcon } from '@/components/icon';\n\n/**\n * A collapsible is a component consisting of an interactive anchor that toggled the expandable/collapsible element.\n * @see https://dialtone.dialpad.com/components/collapsible.html\n */\nexport default {\n name: 'DtCollapsible',\n\n components: {\n DtButton,\n DtCollapsibleLazyShow,\n DtLazyShow,\n DtIcon,\n },\n\n props: {\n /**\n * Text that is displayed on the anchor if nothing is passed in the slot.\n * Ignored if the anchor slot is used.\n */\n anchorText: {\n type: String,\n default: null,\n },\n\n /**\n * Controls whether the collapsible is shown. Leaving this null will have the collapsible start\n * expanded and trigger on click by default. If you set this value, the default trigger\n * behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The id of the content wrapper.\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * HTML element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n contentElementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Additional class name for the anchor wrapper element.\n */\n anchorClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * The maximum width of the anchor and collapsible element.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: null,\n },\n\n /**\n * The maximum height of the collapsible element.\n * Possible units rem|px|%|em\n */\n maxHeight: {\n type: String,\n default: null,\n },\n\n /**\n * Label on the collapsible content. Should provide this or ariaLabelledBy but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Id of the element that labels the collapsible content. Defaults to the anchor element.\n * Should provide this or ariaLabel but not both.\n */\n ariaLabelledBy: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Event fired when the content is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n ],\n\n data () {\n return {\n isOpen: true,\n };\n },\n\n computed: {\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor\n return this.ariaLabelledBy || (!this.ariaLabel && getUniqueString('DtCollapsible__anchor'));\n },\n },\n\n watch: {\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n },\n\n mounted () {\n this.validateProperAnchor();\n },\n\n methods: {\n onLeaveTransitionComplete () {\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n onEnterTransitionComplete () {\n this.$emit('opened', true, this.$refs.content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n defaultToggleOpen () {\n if (this.open === null) {\n this.toggleOpen();\n }\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n validateProperAnchor () {\n if (!this.anchorText && !this.$scopedSlots.anchor) {\n console.error('anchor text and anchor slot content cannot both be falsy');\n }\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;;AAoFA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAA,gBAAA;AAAA,MAAA;AAAA,I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A;AAAA,EAEA,SAAA;AAAA,IACA,4BAAA;AACA,WAAA,MAAA,UAAA,KAAA;AACA,UAAA,KAAA,SAAA,MAAA;AACA,aAAA,MAAA,eAAA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,4BAAA;AACA,WAAA,MAAA,UAAA,MAAA,KAAA,MAAA,OAAA;AACA,UAAA,KAAA,SAAA,MAAA;AACA,aAAA,MAAA,eAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,oBAAA;AACA,UAAA,KAAA,SAAA,MAAA;AACA,aAAA,WAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,aAAA;AACA,WAAA,SAAA,CAAA,KAAA;AAAA,IACA;AAAA,IAEA,uBAAA;AACA,UAAA,CAAA,KAAA,cAAA,CAAA,KAAA,aAAA,QAAA;AACA,gBAAA,MAAA,0DAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- const vue2 = require("@dialpad/dialtone-icons/vue2");
3
2
  const dateFns = require("date-fns");
4
3
  const utils = require("../utils.cjs");
5
4
  const datepicker_constants = require("../datepicker_constants.cjs");
@@ -7,17 +6,10 @@ const stack = require("../../stack/stack.vue.cjs");
7
6
  const tooltip = require("../../tooltip/tooltip.vue.cjs");
8
7
  const button = require("../../button/button.vue.cjs");
9
8
  const _pluginVue2_normalizer = require("../../../_virtual/_plugin-vue2_normalizer.cjs");
9
+ const icon = require("../../icon/icon.vue.cjs");
10
10
  const _sfc_main = {
11
11
  name: "DtDatepickerMonthYearPicker",
12
- components: {
13
- DtButton: button,
14
- DtTooltip: tooltip,
15
- DtStack: stack,
16
- DtIconChevronLeft: vue2.DtIconChevronLeft,
17
- DtIconChevronsLeft: vue2.DtIconChevronsLeft,
18
- DtIconChevronRight: vue2.DtIconChevronRight,
19
- DtIconChevronsRight: vue2.DtIconChevronsRight
20
- },
12
+ components: { DtButton: button, DtTooltip: tooltip, DtStack: stack, DtIcon: icon },
21
13
  props: {
22
14
  locale: {
23
15
  type: String,
@@ -192,25 +184,25 @@ var _sfc_render = function render() {
192
184
  return _vm.changeYear(-1);
193
185
  }, "keydown": function($event) {
194
186
  return _vm.handleKeyDown($event);
195
- } } }, [_c("dt-icon-chevrons-left", { attrs: { "size": "200" } })], 1)];
187
+ } } }, [_c("dt-icon", { attrs: { "name": "chevrons-left", "size": "200" } })], 1)];
196
188
  }, proxy: true }]) }), _c("dt-tooltip", { attrs: { "message": _vm.prevMonthLabel, "placement": "top", "fallback-placements": ["top-end", "auto"] }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
197
189
  return [_c("dt-button", { ref: _vm.refNames[1], staticClass: "d-datepicker__nav-btn", attrs: { "id": "prevMonthButton", "size": "xs", "importance": "clear", "kind": "muted", "circle": true, "type": "button", "aria-label": `${_vm.changeToLabel} ${_vm.prevMonthLabel} ${_vm.formattedMonth(_vm.selectMonth - 1)}` }, on: { "click": function($event) {
198
190
  return _vm.changeMonth(-1);
199
191
  }, "keydown": function($event) {
200
192
  return _vm.handleKeyDown($event);
201
- } } }, [_c("dt-icon-chevron-left", { attrs: { "size": "200" } })], 1)];
193
+ } } }, [_c("dt-icon", { attrs: { "name": "chevron-left", "size": "200" } })], 1)];
202
194
  }, proxy: true }]) })], 1), _c("div", { staticClass: "d-datepicker__month-year-title", attrs: { "id": "calendar-heading" } }, [_vm._v(" " + _vm._s(_vm.formattedMonth(_vm.selectMonth)) + " " + _vm._s(_vm.selectYear) + " ")]), _c("dt-stack", { staticClass: "d-datepicker__nav", attrs: { "as": "nav", "direction": "row", "gap": "200" } }, [_c("dt-tooltip", { attrs: { "message": _vm.nextMonthLabel, "placement": "top", "fallback-placements": ["top-start", "auto"] }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
203
195
  return [_c("dt-button", { ref: _vm.refNames[2], staticClass: "d-datepicker__nav-btn", attrs: { "id": "nextMonthButton", "size": "xs", "importance": "clear", "circle": true, "kind": "muted", "type": "button", "aria-label": `${_vm.changeToLabel} ${_vm.nextMonthLabel} ${_vm.formattedMonth(_vm.selectMonth + 1)}` }, on: { "click": function($event) {
204
196
  return _vm.changeMonth(1);
205
197
  }, "keydown": function($event) {
206
198
  return _vm.handleKeyDown($event);
207
- } } }, [_c("dt-icon-chevron-right", { attrs: { "size": "200" } })], 1)];
199
+ } } }, [_c("dt-icon", { attrs: { "name": "chevron-right", "size": "200" } })], 1)];
208
200
  }, proxy: true }]) }), _c("dt-tooltip", { attrs: { "message": _vm.nextYearLabel, "placement": "top", "fallback-placements": ["top-end", "auto"] }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
209
201
  return [_c("dt-button", { ref: _vm.refNames[3], staticClass: "d-datepicker__nav-btn", attrs: { "id": "nextYearButton", "size": "xs", "kind": "muted", "circle": true, "importance": "clear", "type": "button", "aria-label": `${_vm.changeToLabel} ${_vm.nextYearLabel} ${_vm.selectYear + 1}` }, on: { "click": function($event) {
210
202
  return _vm.changeYear(1);
211
203
  }, "keydown": function($event) {
212
204
  return _vm.handleKeyDown($event);
213
- } } }, [_c("dt-icon-chevrons-right", { attrs: { "size": "200" } })], 1)];
205
+ } } }, [_c("dt-icon", { attrs: { "name": "chevrons-right", "size": "200" } })], 1)];
214
206
  }, proxy: true }]) })], 1)], 1);
215
207
  };
216
208
  var _sfc_staticRenderFns = [];
@@ -1 +1 @@
1
- {"version":3,"file":"month-year-picker.vue.cjs","sources":["../../../../components/datepicker/modules/month-year-picker.vue"],"sourcesContent":["<template>\n <dt-stack\n direction=\"row\"\n class=\"d-datepicker__month-year\"\n gap=\"300\"\n >\n <dt-stack\n as=\"nav\"\n direction=\"row\"\n gap=\"200\"\n class=\"d-datepicker__nav\"\n >\n <dt-tooltip\n :message=\"prevYearLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-start', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"prevYearButton\"\n :ref=\"refNames[0]\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${prevYearLabel} ${selectYear - 1}`\"\n @click=\"changeYear(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevrons-left\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :message=\"prevMonthLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-end', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"prevMonthButton\"\n :ref=\"refNames[1]\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${prevMonthLabel} ${formattedMonth(selectMonth - 1)}`\"\n @click=\"changeMonth(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevron-left\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n <div\n id=\"calendar-heading\"\n class=\"d-datepicker__month-year-title\"\n >\n {{ formattedMonth(selectMonth) }}\n\n {{ selectYear }}\n </div>\n <dt-stack\n as=\"nav\"\n direction=\"row\"\n gap=\"200\"\n class=\"d-datepicker__nav\"\n >\n <dt-tooltip\n :message=\"nextMonthLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-start', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"nextMonthButton\"\n :ref=\"refNames[2]\"\n size=\"xs\"\n importance=\"clear\"\n :circle=\"true\"\n kind=\"muted\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${nextMonthLabel} ${formattedMonth(selectMonth + 1)}`\"\n @click=\"changeMonth(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevron-right\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :message=\"nextYearLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-end', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"nextYearButton\"\n :ref=\"refNames[3]\"\n size=\"xs\"\n kind=\"muted\"\n :circle=\"true\"\n importance=\"clear\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${nextYearLabel} ${selectYear + 1}`\"\n @click=\"changeYear(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevrons-right\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n </dt-stack>\n</template>\n\n<script>\nimport { DtIconChevronLeft, DtIconChevronsLeft, DtIconChevronRight, DtIconChevronsRight } from '@dialpad/dialtone-icons/vue2';\nimport { getYear, addMonths, getMonth, set, subMonths, getDate } from 'date-fns';\nimport { getCalendarDays, formatMonth } from '../utils';\nimport { INTL_MONTH_FORMAT } from '../datepicker_constants';\nimport DtStack from '@/components/stack/stack.vue';\nimport DtTooltip from '@/components/tooltip/tooltip.vue';\nimport DtButton from '@/components/button/button.vue';\n\nexport default {\n name: 'DtDatepickerMonthYearPicker',\n\n components: {\n DtButton,\n DtTooltip,\n DtStack,\n DtIconChevronLeft,\n DtIconChevronsLeft,\n DtIconChevronRight,\n DtIconChevronsRight,\n },\n\n props: {\n locale: {\n type: String,\n required: true,\n },\n\n prevMonthLabel: {\n type: String,\n required: true,\n },\n\n nextMonthLabel: {\n type: String,\n required: true,\n },\n\n prevYearLabel: {\n type: String,\n required: true,\n },\n\n nextYearLabel: {\n type: String,\n required: true,\n },\n\n changeToLabel: {\n type: String,\n required: true,\n },\n\n selectedDate: {\n type: Date,\n required: true,\n },\n },\n\n emits: [\n /**\n * Will retrieve the calendar days of the given date\n *\n * @event calendar-days\n * @type {Array}\n */\n 'calendar-days',\n\n /**\n * Will focus first day in calendar\n *\n * @event focus-first-day\n */\n 'focus-first-day',\n\n /**\n * Will focus last day in calendar\n *\n * @event focus-last-day\n */\n 'focus-last-day',\n\n /**\n * Will close the datepicker\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n ],\n\n data () {\n return {\n selectMonth: getMonth(this.selectedDate),\n selectYear: getYear(this.selectedDate),\n highlightedDay: null,\n focusPicker: 0,\n focusRefs: [],\n refNames: ['prevYearButtonRef', 'prevMonthButtonRef', 'nextMonthButtonRef', 'nextYearButtonRef'],\n };\n },\n\n computed: {\n // Get days for the currently selected month and year and highlight the selected day\n calendarDays () {\n return getCalendarDays(this.selectMonth, this.selectYear, this.highlightedDay);\n },\n\n formattedMonth () {\n return (month) => formatMonth(month, INTL_MONTH_FORMAT, this.locale);\n },\n },\n\n watch: {\n selectMonth: {\n handler () {\n this.highlightDay();\n this.$emit('calendar-days', this.calendarDays);\n },\n\n immediate: true,\n },\n\n selectYear: {\n handler () {\n this.highlightDay();\n this.$emit('calendar-days', this.calendarDays);\n },\n\n immediate: true,\n },\n\n },\n\n mounted () {\n this.setButtonsRef();\n this.focusMonthYearPicker();\n },\n\n methods: {\n setButtonsRef () {\n this.focusRefs = this.refNames.map(refName => this.$refs[refName]);\n },\n\n focusMonthYearPicker () {\n this.focusPicker = 0;\n this.focusRefs[0].$el.focus();\n },\n\n handleKeyDown (event) {\n switch (event.key) {\n case 'ArrowLeft':\n event.preventDefault();\n if (this.focusPicker === 0) {\n this.focusPicker = 3;\n this.focusRefs[this.focusPicker].$el.focus();\n } else {\n this.focusPicker--;\n this.focusRefs[this.focusPicker].$el.focus();\n }\n break;\n\n case 'ArrowRight':\n event.preventDefault();\n if (this.focusPicker === 3) {\n this.focusPicker = 0;\n this.focusRefs[this.focusPicker].$el.focus();\n } else {\n this.focusPicker++;\n this.focusRefs[this.focusPicker].$el.focus();\n }\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n this.$emit('focus-first-day');\n break;\n\n case 'Tab':\n event.preventDefault();\n this.$emit('focus-first-day');\n break;\n\n case 'Escape':\n this.$emit('close-datepicker');\n break;\n }\n },\n\n highlightDay () {\n const year = getYear(this.selectedDate);\n const month = getMonth(this.selectedDate);\n\n if (year !== this.selectYear || month !== this.selectMonth) {\n this.highlightedDay = null;\n } else {\n this.highlightedDay = getDate(this.selectedDate);\n }\n },\n\n changeMonth (value) {\n // Adjust year when changing from January to December or vice versa\n if ((this.selectMonth === 0 && value === -1) || (this.selectMonth === 11 && value === 1)) {\n this.selectYear += value;\n }\n\n // Calculate the new date by adding or subtracting months\n const initialDate = set(this.selectedDate, { month: this.selectMonth, year: this.selectYear });\n const newDate = value === 1 ? addMonths(initialDate, 1) : subMonths(initialDate, 1);\n\n // Update the selected month\n this.selectMonth = getMonth(newDate);\n },\n\n changeYear (value) {\n this.selectYear = this.selectYear + value;\n },\n\n goToNextMonth () {\n this.changeMonth(1);\n },\n\n goToPrevMonth () {\n this.changeMonth(-1);\n },\n },\n};\n</script>\n"],"names":["DtButton","DtTooltip","DtStack","DtIconChevronLeft","DtIconChevronsLeft","DtIconChevronRight","DtIconChevronsRight","getMonth","getYear","getCalendarDays","formatMonth","INTL_MONTH_FORMAT","getDate","set","addMonths","subMonths"],"mappings":";;;;;;;;;AA4IA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA;AAAAA,IACA,WAAAC;AAAAA,IACA,SAAAC;AAAAA,IACA,mBAAAC,KAAA;AAAA,IACA,oBAAAC,KAAA;AAAA,IACA,oBAAAC,KAAA;AAAA,IACA,qBAAAC,KAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IAEA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IAEA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,I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AA;AACA,YAAA,UAAA,UAAA,IAAAC,kBAAA,aAAA,CAAA,IAAAC,QAAA,UAAA,aAAA,CAAA;AAGA,WAAA,cAAAR,iBAAA,OAAA;AAAA,IACA;AAAA,IAEA,WAAA,OAAA;AACA,WAAA,aAAA,KAAA,aAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,WAAA,YAAA,CAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,WAAA,YAAA,EAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"month-year-picker.vue.cjs","sources":["../../../../components/datepicker/modules/month-year-picker.vue"],"sourcesContent":["<template>\n <dt-stack\n direction=\"row\"\n class=\"d-datepicker__month-year\"\n gap=\"300\"\n >\n <dt-stack\n as=\"nav\"\n direction=\"row\"\n gap=\"200\"\n class=\"d-datepicker__nav\"\n >\n <dt-tooltip\n :message=\"prevYearLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-start', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"prevYearButton\"\n :ref=\"refNames[0]\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${prevYearLabel} ${selectYear - 1}`\"\n @click=\"changeYear(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon\n name=\"chevrons-left\"\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :message=\"prevMonthLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-end', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"prevMonthButton\"\n :ref=\"refNames[1]\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${prevMonthLabel} ${formattedMonth(selectMonth - 1)}`\"\n @click=\"changeMonth(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon\n name=\"chevron-left\"\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n <div\n id=\"calendar-heading\"\n class=\"d-datepicker__month-year-title\"\n >\n {{ formattedMonth(selectMonth) }}\n\n {{ selectYear }}\n </div>\n <dt-stack\n as=\"nav\"\n direction=\"row\"\n gap=\"200\"\n class=\"d-datepicker__nav\"\n >\n <dt-tooltip\n :message=\"nextMonthLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-start', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"nextMonthButton\"\n :ref=\"refNames[2]\"\n size=\"xs\"\n importance=\"clear\"\n :circle=\"true\"\n kind=\"muted\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${nextMonthLabel} ${formattedMonth(selectMonth + 1)}`\"\n @click=\"changeMonth(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon\n name=\"chevron-right\"\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :message=\"nextYearLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-end', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"nextYearButton\"\n :ref=\"refNames[3]\"\n size=\"xs\"\n kind=\"muted\"\n :circle=\"true\"\n importance=\"clear\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${nextYearLabel} ${selectYear + 1}`\"\n @click=\"changeYear(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon\n name=\"chevrons-right\"\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n </dt-stack>\n</template>\n\n<script>\nimport { DtIcon } from '@/components/icon';\nimport { getYear, addMonths, getMonth, set, subMonths, getDate } from 'date-fns';\nimport { getCalendarDays, formatMonth } from '../utils';\nimport { INTL_MONTH_FORMAT } from '../datepicker_constants';\nimport DtStack from '@/components/stack/stack.vue';\nimport DtTooltip from '@/components/tooltip/tooltip.vue';\nimport DtButton from '@/components/button/button.vue';\n\nexport default {\n name: 'DtDatepickerMonthYearPicker',\n\n components: { DtButton, DtTooltip, DtStack, DtIcon },\n\n props: {\n locale: {\n type: String,\n required: true,\n },\n\n prevMonthLabel: {\n type: String,\n required: true,\n },\n\n nextMonthLabel: {\n type: String,\n required: true,\n },\n\n prevYearLabel: {\n type: String,\n required: true,\n },\n\n nextYearLabel: {\n type: String,\n required: true,\n },\n\n changeToLabel: {\n type: String,\n required: true,\n },\n\n selectedDate: {\n type: Date,\n required: true,\n },\n },\n\n emits: [\n /**\n * Will retrieve the calendar days of the given date\n *\n * @event calendar-days\n * @type {Array}\n */\n 'calendar-days',\n\n /**\n * Will focus first day in calendar\n *\n * @event focus-first-day\n */\n 'focus-first-day',\n\n /**\n * Will focus last day in calendar\n *\n * @event focus-last-day\n */\n 'focus-last-day',\n\n /**\n * Will close the datepicker\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n ],\n\n data () {\n return {\n selectMonth: getMonth(this.selectedDate),\n selectYear: getYear(this.selectedDate),\n highlightedDay: null,\n focusPicker: 0,\n focusRefs: [],\n refNames: ['prevYearButtonRef', 'prevMonthButtonRef', 'nextMonthButtonRef', 'nextYearButtonRef'],\n };\n },\n\n computed: {\n // Get days for the currently selected month and year and highlight the selected day\n calendarDays () {\n return getCalendarDays(this.selectMonth, this.selectYear, this.highlightedDay);\n },\n\n formattedMonth () {\n return (month) => formatMonth(month, INTL_MONTH_FORMAT, this.locale);\n },\n },\n\n watch: {\n selectMonth: {\n handler () {\n this.highlightDay();\n this.$emit('calendar-days', this.calendarDays);\n },\n\n immediate: true,\n },\n\n selectYear: {\n handler () {\n this.highlightDay();\n this.$emit('calendar-days', this.calendarDays);\n },\n\n immediate: true,\n },\n\n },\n\n mounted () {\n this.setButtonsRef();\n this.focusMonthYearPicker();\n },\n\n methods: {\n setButtonsRef () {\n this.focusRefs = this.refNames.map(refName => this.$refs[refName]);\n },\n\n focusMonthYearPicker () {\n this.focusPicker = 0;\n this.focusRefs[0].$el.focus();\n },\n\n handleKeyDown (event) {\n switch (event.key) {\n case 'ArrowLeft':\n event.preventDefault();\n if (this.focusPicker === 0) {\n this.focusPicker = 3;\n this.focusRefs[this.focusPicker].$el.focus();\n } else {\n this.focusPicker--;\n this.focusRefs[this.focusPicker].$el.focus();\n }\n break;\n\n case 'ArrowRight':\n event.preventDefault();\n if (this.focusPicker === 3) {\n this.focusPicker = 0;\n this.focusRefs[this.focusPicker].$el.focus();\n } else {\n this.focusPicker++;\n this.focusRefs[this.focusPicker].$el.focus();\n }\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n this.$emit('focus-first-day');\n break;\n\n case 'Tab':\n event.preventDefault();\n this.$emit('focus-first-day');\n break;\n\n case 'Escape':\n this.$emit('close-datepicker');\n break;\n }\n },\n\n highlightDay () {\n const year = getYear(this.selectedDate);\n const month = getMonth(this.selectedDate);\n\n if (year !== this.selectYear || month !== this.selectMonth) {\n this.highlightedDay = null;\n } else {\n this.highlightedDay = getDate(this.selectedDate);\n }\n },\n\n changeMonth (value) {\n // Adjust year when changing from January to December or vice versa\n if ((this.selectMonth === 0 && value === -1) || (this.selectMonth === 11 && value === 1)) {\n this.selectYear += value;\n }\n\n // Calculate the new date by adding or subtracting months\n const initialDate = set(this.selectedDate, { month: this.selectMonth, year: this.selectYear });\n const newDate = value === 1 ? addMonths(initialDate, 1) : subMonths(initialDate, 1);\n\n // Update the selected month\n this.selectMonth = getMonth(newDate);\n },\n\n changeYear (value) {\n this.selectYear = this.selectYear + value;\n },\n\n goToNextMonth () {\n this.changeMonth(1);\n },\n\n goToPrevMonth () {\n this.changeMonth(-1);\n },\n },\n};\n</script>\n"],"names":["DtButton","DtTooltip","DtStack","DtIcon","getMonth","getYear","getCalendarDays","formatMonth","INTL_MONTH_FORMAT","getDate","set","addMonths","subM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A,IACA;AAAA,IAEA,eAAA;AACA,YAAA,OAAAH,QAAAA,QAAA,KAAA,YAAA;AACA,YAAA,QAAAD,QAAAA,SAAA,KAAA,YAAA;AAEA,UAAA,SAAA,KAAA,cAAA,UAAA,KAAA,aAAA;AACA,aAAA,iBAAA;AAAA,MACA,OAAA;AACA,aAAA,iBAAAK,QAAAA,QAAA,KAAA,YAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,YAAA,OAAA;AAEA,UAAA,KAAA,gBAAA,KAAA,UAAA,MAAA,KAAA,gBAAA,MAAA,UAAA,GAAA;AACA,aAAA,cAAA;AAAA,MACA;AAGA,YAAA,cAAAC,QAAAA,IAAA,KAAA,cAAA,EAAA,OAAA,KAAA,aAAA,MAAA,KAAA,WAAA,CAAA;AACA,YAAA,UAAA,UAAA,IAAAC,kBAAA,aAAA,CAAA,IAAAC,QAAA,UAAA,aAAA,CAAA;AAGA,WAAA,cAAAR,iBAAA,OAAA;AAAA,IACA;AAAA,IAEA,WAAA,OAAA;AACA,WAAA,aAAA,KAAA,aAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,WAAA,YAAA,CAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,WAAA,YAAA,EAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,3 @@
1
- import { DtIconChevronLeft, DtIconChevronsLeft, DtIconChevronRight, DtIconChevronsRight } from "@dialpad/dialtone-icons/vue2";
2
1
  import { getMonth, getYear, getDate, set, addMonths, subMonths } from "date-fns";
3
2
  import { getCalendarDays, formatMonth } from "../utils.js";
4
3
  import { INTL_MONTH_FORMAT } from "../datepicker_constants.js";
@@ -6,17 +5,10 @@ import DtStack from "../../stack/stack.vue.js";
6
5
  import DtTooltip from "../../tooltip/tooltip.vue.js";
7
6
  import DtButton from "../../button/button.vue.js";
8
7
  import normalizeComponent from "../../../_virtual/_plugin-vue2_normalizer.js";
8
+ import DtIcon from "../../icon/icon.vue.js";
9
9
  const _sfc_main = {
10
10
  name: "DtDatepickerMonthYearPicker",
11
- components: {
12
- DtButton,
13
- DtTooltip,
14
- DtStack,
15
- DtIconChevronLeft,
16
- DtIconChevronsLeft,
17
- DtIconChevronRight,
18
- DtIconChevronsRight
19
- },
11
+ components: { DtButton, DtTooltip, DtStack, DtIcon },
20
12
  props: {
21
13
  locale: {
22
14
  type: String,
@@ -191,25 +183,25 @@ var _sfc_render = function render() {
191
183
  return _vm.changeYear(-1);
192
184
  }, "keydown": function($event) {
193
185
  return _vm.handleKeyDown($event);
194
- } } }, [_c("dt-icon-chevrons-left", { attrs: { "size": "200" } })], 1)];
186
+ } } }, [_c("dt-icon", { attrs: { "name": "chevrons-left", "size": "200" } })], 1)];
195
187
  }, proxy: true }]) }), _c("dt-tooltip", { attrs: { "message": _vm.prevMonthLabel, "placement": "top", "fallback-placements": ["top-end", "auto"] }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
196
188
  return [_c("dt-button", { ref: _vm.refNames[1], staticClass: "d-datepicker__nav-btn", attrs: { "id": "prevMonthButton", "size": "xs", "importance": "clear", "kind": "muted", "circle": true, "type": "button", "aria-label": `${_vm.changeToLabel} ${_vm.prevMonthLabel} ${_vm.formattedMonth(_vm.selectMonth - 1)}` }, on: { "click": function($event) {
197
189
  return _vm.changeMonth(-1);
198
190
  }, "keydown": function($event) {
199
191
  return _vm.handleKeyDown($event);
200
- } } }, [_c("dt-icon-chevron-left", { attrs: { "size": "200" } })], 1)];
192
+ } } }, [_c("dt-icon", { attrs: { "name": "chevron-left", "size": "200" } })], 1)];
201
193
  }, proxy: true }]) })], 1), _c("div", { staticClass: "d-datepicker__month-year-title", attrs: { "id": "calendar-heading" } }, [_vm._v(" " + _vm._s(_vm.formattedMonth(_vm.selectMonth)) + " " + _vm._s(_vm.selectYear) + " ")]), _c("dt-stack", { staticClass: "d-datepicker__nav", attrs: { "as": "nav", "direction": "row", "gap": "200" } }, [_c("dt-tooltip", { attrs: { "message": _vm.nextMonthLabel, "placement": "top", "fallback-placements": ["top-start", "auto"] }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
202
194
  return [_c("dt-button", { ref: _vm.refNames[2], staticClass: "d-datepicker__nav-btn", attrs: { "id": "nextMonthButton", "size": "xs", "importance": "clear", "circle": true, "kind": "muted", "type": "button", "aria-label": `${_vm.changeToLabel} ${_vm.nextMonthLabel} ${_vm.formattedMonth(_vm.selectMonth + 1)}` }, on: { "click": function($event) {
203
195
  return _vm.changeMonth(1);
204
196
  }, "keydown": function($event) {
205
197
  return _vm.handleKeyDown($event);
206
- } } }, [_c("dt-icon-chevron-right", { attrs: { "size": "200" } })], 1)];
198
+ } } }, [_c("dt-icon", { attrs: { "name": "chevron-right", "size": "200" } })], 1)];
207
199
  }, proxy: true }]) }), _c("dt-tooltip", { attrs: { "message": _vm.nextYearLabel, "placement": "top", "fallback-placements": ["top-end", "auto"] }, scopedSlots: _vm._u([{ key: "anchor", fn: function() {
208
200
  return [_c("dt-button", { ref: _vm.refNames[3], staticClass: "d-datepicker__nav-btn", attrs: { "id": "nextYearButton", "size": "xs", "kind": "muted", "circle": true, "importance": "clear", "type": "button", "aria-label": `${_vm.changeToLabel} ${_vm.nextYearLabel} ${_vm.selectYear + 1}` }, on: { "click": function($event) {
209
201
  return _vm.changeYear(1);
210
202
  }, "keydown": function($event) {
211
203
  return _vm.handleKeyDown($event);
212
- } } }, [_c("dt-icon-chevrons-right", { attrs: { "size": "200" } })], 1)];
204
+ } } }, [_c("dt-icon", { attrs: { "name": "chevrons-right", "size": "200" } })], 1)];
213
205
  }, proxy: true }]) })], 1)], 1);
214
206
  };
215
207
  var _sfc_staticRenderFns = [];
@@ -1 +1 @@
1
- {"version":3,"file":"month-year-picker.vue.js","sources":["../../../../components/datepicker/modules/month-year-picker.vue"],"sourcesContent":["<template>\n <dt-stack\n direction=\"row\"\n class=\"d-datepicker__month-year\"\n gap=\"300\"\n >\n <dt-stack\n as=\"nav\"\n direction=\"row\"\n gap=\"200\"\n class=\"d-datepicker__nav\"\n >\n <dt-tooltip\n :message=\"prevYearLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-start', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"prevYearButton\"\n :ref=\"refNames[0]\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${prevYearLabel} ${selectYear - 1}`\"\n @click=\"changeYear(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevrons-left\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :message=\"prevMonthLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-end', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"prevMonthButton\"\n :ref=\"refNames[1]\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${prevMonthLabel} ${formattedMonth(selectMonth - 1)}`\"\n @click=\"changeMonth(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevron-left\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n <div\n id=\"calendar-heading\"\n class=\"d-datepicker__month-year-title\"\n >\n {{ formattedMonth(selectMonth) }}\n\n {{ selectYear }}\n </div>\n <dt-stack\n as=\"nav\"\n direction=\"row\"\n gap=\"200\"\n class=\"d-datepicker__nav\"\n >\n <dt-tooltip\n :message=\"nextMonthLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-start', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"nextMonthButton\"\n :ref=\"refNames[2]\"\n size=\"xs\"\n importance=\"clear\"\n :circle=\"true\"\n kind=\"muted\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${nextMonthLabel} ${formattedMonth(selectMonth + 1)}`\"\n @click=\"changeMonth(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevron-right\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :message=\"nextYearLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-end', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"nextYearButton\"\n :ref=\"refNames[3]\"\n size=\"xs\"\n kind=\"muted\"\n :circle=\"true\"\n importance=\"clear\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${nextYearLabel} ${selectYear + 1}`\"\n @click=\"changeYear(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon-chevrons-right\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n </dt-stack>\n</template>\n\n<script>\nimport { DtIconChevronLeft, DtIconChevronsLeft, DtIconChevronRight, DtIconChevronsRight } from '@dialpad/dialtone-icons/vue2';\nimport { getYear, addMonths, getMonth, set, subMonths, getDate } from 'date-fns';\nimport { getCalendarDays, formatMonth } from '../utils';\nimport { INTL_MONTH_FORMAT } from '../datepicker_constants';\nimport DtStack from '@/components/stack/stack.vue';\nimport DtTooltip from '@/components/tooltip/tooltip.vue';\nimport DtButton from '@/components/button/button.vue';\n\nexport default {\n name: 'DtDatepickerMonthYearPicker',\n\n components: {\n DtButton,\n DtTooltip,\n DtStack,\n DtIconChevronLeft,\n DtIconChevronsLeft,\n DtIconChevronRight,\n DtIconChevronsRight,\n },\n\n props: {\n locale: {\n type: String,\n required: true,\n },\n\n prevMonthLabel: {\n type: String,\n required: true,\n },\n\n nextMonthLabel: {\n type: String,\n required: true,\n },\n\n prevYearLabel: {\n type: String,\n required: true,\n },\n\n nextYearLabel: {\n type: String,\n required: true,\n },\n\n changeToLabel: {\n type: String,\n required: true,\n },\n\n selectedDate: {\n type: Date,\n required: true,\n },\n },\n\n emits: [\n /**\n * Will retrieve the calendar days of the given date\n *\n * @event calendar-days\n * @type {Array}\n */\n 'calendar-days',\n\n /**\n * Will focus first day in calendar\n *\n * @event focus-first-day\n */\n 'focus-first-day',\n\n /**\n * Will focus last day in calendar\n *\n * @event focus-last-day\n */\n 'focus-last-day',\n\n /**\n * Will close the datepicker\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n ],\n\n data () {\n return {\n selectMonth: getMonth(this.selectedDate),\n selectYear: getYear(this.selectedDate),\n highlightedDay: null,\n focusPicker: 0,\n focusRefs: [],\n refNames: ['prevYearButtonRef', 'prevMonthButtonRef', 'nextMonthButtonRef', 'nextYearButtonRef'],\n };\n },\n\n computed: {\n // Get days for the currently selected month and year and highlight the selected day\n calendarDays () {\n return getCalendarDays(this.selectMonth, this.selectYear, this.highlightedDay);\n },\n\n formattedMonth () {\n return (month) => formatMonth(month, INTL_MONTH_FORMAT, this.locale);\n },\n },\n\n watch: {\n selectMonth: {\n handler () {\n this.highlightDay();\n this.$emit('calendar-days', this.calendarDays);\n },\n\n immediate: true,\n },\n\n selectYear: {\n handler () {\n this.highlightDay();\n this.$emit('calendar-days', this.calendarDays);\n },\n\n immediate: true,\n },\n\n },\n\n mounted () {\n this.setButtonsRef();\n this.focusMonthYearPicker();\n },\n\n methods: {\n setButtonsRef () {\n this.focusRefs = this.refNames.map(refName => this.$refs[refName]);\n },\n\n focusMonthYearPicker () {\n this.focusPicker = 0;\n this.focusRefs[0].$el.focus();\n },\n\n handleKeyDown (event) {\n switch (event.key) {\n case 'ArrowLeft':\n event.preventDefault();\n if (this.focusPicker === 0) {\n this.focusPicker = 3;\n this.focusRefs[this.focusPicker].$el.focus();\n } else {\n this.focusPicker--;\n this.focusRefs[this.focusPicker].$el.focus();\n }\n break;\n\n case 'ArrowRight':\n event.preventDefault();\n if (this.focusPicker === 3) {\n this.focusPicker = 0;\n this.focusRefs[this.focusPicker].$el.focus();\n } else {\n this.focusPicker++;\n this.focusRefs[this.focusPicker].$el.focus();\n }\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n this.$emit('focus-first-day');\n break;\n\n case 'Tab':\n event.preventDefault();\n this.$emit('focus-first-day');\n break;\n\n case 'Escape':\n this.$emit('close-datepicker');\n break;\n }\n },\n\n highlightDay () {\n const year = getYear(this.selectedDate);\n const month = getMonth(this.selectedDate);\n\n if (year !== this.selectYear || month !== this.selectMonth) {\n this.highlightedDay = null;\n } else {\n this.highlightedDay = getDate(this.selectedDate);\n }\n },\n\n changeMonth (value) {\n // Adjust year when changing from January to December or vice versa\n if ((this.selectMonth === 0 && value === -1) || (this.selectMonth === 11 && value === 1)) {\n this.selectYear += value;\n }\n\n // Calculate the new date by adding or subtracting months\n const initialDate = set(this.selectedDate, { month: this.selectMonth, year: this.selectYear });\n const newDate = value === 1 ? addMonths(initialDate, 1) : subMonths(initialDate, 1);\n\n // Update the selected month\n this.selectMonth = getMonth(newDate);\n },\n\n changeYear (value) {\n this.selectYear = this.selectYear + value;\n },\n\n goToNextMonth () {\n this.changeMonth(1);\n },\n\n goToPrevMonth () {\n this.changeMonth(-1);\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;;;;AA4IA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IAEA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IAEA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IAEA,eAAA;AAAA,MACA,M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AAA,OAAA;AAAA,IACA;AAAA,IAEA,WAAA,OAAA;AACA,WAAA,aAAA,KAAA,aAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,WAAA,YAAA,CAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,WAAA,YAAA,EAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"month-year-picker.vue.js","sources":["../../../../components/datepicker/modules/month-year-picker.vue"],"sourcesContent":["<template>\n <dt-stack\n direction=\"row\"\n class=\"d-datepicker__month-year\"\n gap=\"300\"\n >\n <dt-stack\n as=\"nav\"\n direction=\"row\"\n gap=\"200\"\n class=\"d-datepicker__nav\"\n >\n <dt-tooltip\n :message=\"prevYearLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-start', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"prevYearButton\"\n :ref=\"refNames[0]\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${prevYearLabel} ${selectYear - 1}`\"\n @click=\"changeYear(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon\n name=\"chevrons-left\"\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :message=\"prevMonthLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-end', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"prevMonthButton\"\n :ref=\"refNames[1]\"\n size=\"xs\"\n importance=\"clear\"\n kind=\"muted\"\n :circle=\"true\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${prevMonthLabel} ${formattedMonth(selectMonth - 1)}`\"\n @click=\"changeMonth(-1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon\n name=\"chevron-left\"\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n <div\n id=\"calendar-heading\"\n class=\"d-datepicker__month-year-title\"\n >\n {{ formattedMonth(selectMonth) }}\n\n {{ selectYear }}\n </div>\n <dt-stack\n as=\"nav\"\n direction=\"row\"\n gap=\"200\"\n class=\"d-datepicker__nav\"\n >\n <dt-tooltip\n :message=\"nextMonthLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-start', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"nextMonthButton\"\n :ref=\"refNames[2]\"\n size=\"xs\"\n importance=\"clear\"\n :circle=\"true\"\n kind=\"muted\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${nextMonthLabel} ${formattedMonth(selectMonth + 1)}`\"\n @click=\"changeMonth(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon\n name=\"chevron-right\"\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n <dt-tooltip\n :message=\"nextYearLabel\"\n placement=\"top\"\n :fallback-placements=\"['top-end', 'auto']\"\n >\n <template #anchor>\n <dt-button\n id=\"nextYearButton\"\n :ref=\"refNames[3]\"\n size=\"xs\"\n kind=\"muted\"\n :circle=\"true\"\n importance=\"clear\"\n class=\"d-datepicker__nav-btn\"\n type=\"button\"\n :aria-label=\"`${changeToLabel} ${nextYearLabel} ${selectYear + 1}`\"\n @click=\"changeYear(1)\"\n @keydown=\"handleKeyDown($event)\"\n >\n <dt-icon\n name=\"chevrons-right\"\n size=\"200\"\n />\n </dt-button>\n </template>\n </dt-tooltip>\n </dt-stack>\n </dt-stack>\n</template>\n\n<script>\nimport { DtIcon } from '@/components/icon';\nimport { getYear, addMonths, getMonth, set, subMonths, getDate } from 'date-fns';\nimport { getCalendarDays, formatMonth } from '../utils';\nimport { INTL_MONTH_FORMAT } from '../datepicker_constants';\nimport DtStack from '@/components/stack/stack.vue';\nimport DtTooltip from '@/components/tooltip/tooltip.vue';\nimport DtButton from '@/components/button/button.vue';\n\nexport default {\n name: 'DtDatepickerMonthYearPicker',\n\n components: { DtButton, DtTooltip, DtStack, DtIcon },\n\n props: {\n locale: {\n type: String,\n required: true,\n },\n\n prevMonthLabel: {\n type: String,\n required: true,\n },\n\n nextMonthLabel: {\n type: String,\n required: true,\n },\n\n prevYearLabel: {\n type: String,\n required: true,\n },\n\n nextYearLabel: {\n type: String,\n required: true,\n },\n\n changeToLabel: {\n type: String,\n required: true,\n },\n\n selectedDate: {\n type: Date,\n required: true,\n },\n },\n\n emits: [\n /**\n * Will retrieve the calendar days of the given date\n *\n * @event calendar-days\n * @type {Array}\n */\n 'calendar-days',\n\n /**\n * Will focus first day in calendar\n *\n * @event focus-first-day\n */\n 'focus-first-day',\n\n /**\n * Will focus last day in calendar\n *\n * @event focus-last-day\n */\n 'focus-last-day',\n\n /**\n * Will close the datepicker\n *\n * @event close-datepicker\n */\n 'close-datepicker',\n ],\n\n data () {\n return {\n selectMonth: getMonth(this.selectedDate),\n selectYear: getYear(this.selectedDate),\n highlightedDay: null,\n focusPicker: 0,\n focusRefs: [],\n refNames: ['prevYearButtonRef', 'prevMonthButtonRef', 'nextMonthButtonRef', 'nextYearButtonRef'],\n };\n },\n\n computed: {\n // Get days for the currently selected month and year and highlight the selected day\n calendarDays () {\n return getCalendarDays(this.selectMonth, this.selectYear, this.highlightedDay);\n },\n\n formattedMonth () {\n return (month) => formatMonth(month, INTL_MONTH_FORMAT, this.locale);\n },\n },\n\n watch: {\n selectMonth: {\n handler () {\n this.highlightDay();\n this.$emit('calendar-days', this.calendarDays);\n },\n\n immediate: true,\n },\n\n selectYear: {\n handler () {\n this.highlightDay();\n this.$emit('calendar-days', this.calendarDays);\n },\n\n immediate: true,\n },\n\n },\n\n mounted () {\n this.setButtonsRef();\n this.focusMonthYearPicker();\n },\n\n methods: {\n setButtonsRef () {\n this.focusRefs = this.refNames.map(refName => this.$refs[refName]);\n },\n\n focusMonthYearPicker () {\n this.focusPicker = 0;\n this.focusRefs[0].$el.focus();\n },\n\n handleKeyDown (event) {\n switch (event.key) {\n case 'ArrowLeft':\n event.preventDefault();\n if (this.focusPicker === 0) {\n this.focusPicker = 3;\n this.focusRefs[this.focusPicker].$el.focus();\n } else {\n this.focusPicker--;\n this.focusRefs[this.focusPicker].$el.focus();\n }\n break;\n\n case 'ArrowRight':\n event.preventDefault();\n if (this.focusPicker === 3) {\n this.focusPicker = 0;\n this.focusRefs[this.focusPicker].$el.focus();\n } else {\n this.focusPicker++;\n this.focusRefs[this.focusPicker].$el.focus();\n }\n break;\n\n case 'ArrowDown':\n event.preventDefault();\n this.$emit('focus-first-day');\n break;\n\n case 'Tab':\n event.preventDefault();\n this.$emit('focus-first-day');\n break;\n\n case 'Escape':\n this.$emit('close-datepicker');\n break;\n }\n },\n\n highlightDay () {\n const year = getYear(this.selectedDate);\n const month = getMonth(this.selectedDate);\n\n if (year !== this.selectYear || month !== this.selectMonth) {\n this.highlightedDay = null;\n } else {\n this.highlightedDay = getDate(this.selectedDate);\n }\n },\n\n changeMonth (value) {\n // Adjust year when changing from January to December or vice versa\n if ((this.selectMonth === 0 && value === -1) || (this.selectMonth === 11 && value === 1)) {\n this.selectYear += value;\n }\n\n // Calculate the new date by adding or subtracting months\n const initialDate = set(this.selectedDate, { month: this.selectMonth, year: this.selectYear });\n const newDate = value === 1 ? addMonths(initialDate, 1) : subMonths(initialDate, 1);\n\n // Update the selected month\n this.selectMonth = getMonth(newDate);\n },\n\n changeYear (value) {\n this.selectYear = this.selectYear + value;\n },\n\n goToNextMonth () {\n this.changeMonth(1);\n },\n\n goToPrevMonth () {\n this.changeMonth(-1);\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;;;;AAgJA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA,EAAA,UAAA,WAAA,SAAA,OAAA;AAAA,EAEA,OAAA;AAAA,IACA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IAEA,gBAAA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KAAA,gBAAA,KAAA,UAAA,MAAA,KAAA,gBAAA,MAAA,UAAA,GAAA;AACA,aAAA,cAAA;AAAA,MACA;AAGA,YAAA,cAAA,IAAA,KAAA,cAAA,EAAA,OAAA,KAAA,aAAA,MAAA,KAAA,WAAA,CAAA;AACA,YAAA,UAAA,UAAA,IAAA,UAAA,aAAA,CAAA,IAAA,UAAA,aAAA,CAAA;AAGA,WAAA,cAAA,SAAA,OAAA;AAAA,IACA;AAAA,IAEA,WAAA,OAAA;AACA,WAAA,aAAA,KAAA,aAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,WAAA,YAAA,CAAA;AAAA,IACA;AAAA,IAEA,gBAAA;AACA,WAAA,YAAA,EAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,14 +1,13 @@
1
1
  "use strict";
2
- const vue2 = require("@dialpad/dialtone-icons/vue2");
3
2
  const _pluginVue2_normalizer = require("../../../_virtual/_plugin-vue2_normalizer.cjs");
4
3
  const input = require("../../input/input.vue.cjs");
4
+ const icon = require("../../icon/icon.vue.cjs");
5
5
  const button = require("../../button/button.vue.cjs");
6
6
  const _sfc_main = {
7
7
  name: "EmojiSearch",
8
8
  components: {
9
9
  DtInput: input,
10
- DtIconSearch: vue2.DtIconSearch,
11
- DtIconXCircle: vue2.DtIconXCircle,
10
+ DtIcon: icon,
12
11
  DtButton: button
13
12
  },
14
13
  props: {
@@ -59,11 +58,11 @@ var _sfc_render = function render() {
59
58
  if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")) return null;
60
59
  return _vm.selectFirstEmoji.apply(null, arguments);
61
60
  }] }, scopedSlots: _vm._u([{ key: "leftIcon", fn: function() {
62
- return [_c("dt-icon-search", { attrs: { "size": "200" } })];
61
+ return [_c("dt-icon", { attrs: { "name": "search", "size": "200" } })];
63
62
  }, proxy: true }, _vm.modelValue.length > 0 ? { key: "rightIcon", fn: function() {
64
63
  return [_c("dt-button", { staticClass: "d-mrn4", attrs: { "importance": "clear", "size": "xs", "circle": "", "kind": "muted" }, on: { "click": _vm.clearSearch }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
65
- return [_c("dt-icon-close", { attrs: { "size": "200" } })];
66
- }, proxy: true }], null, false, 4156074325) })];
64
+ return [_c("dt-icon", { attrs: { "name": "close", "size": "200" } })];
65
+ }, proxy: true }], null, false, 1154370889) })];
67
66
  }, proxy: true } : null], null, true) })], 1);
68
67
  };
69
68
  var _sfc_staticRenderFns = [];