@dialpad/dialtone 9.75.0 → 9.77.0-beta.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 (444) hide show
  1. package/dist/tokens/doc.json +11989 -11989
  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/component-documentation.json +1 -1
  7. package/dist/vue2/components/avatar/avatar.vue.cjs +13 -24
  8. package/dist/vue2/components/avatar/avatar.vue.cjs.map +1 -1
  9. package/dist/vue2/components/avatar/avatar.vue.js +13 -24
  10. package/dist/vue2/components/avatar/avatar.vue.js.map +1 -1
  11. package/dist/vue2/components/badge/badge.vue.cjs +13 -34
  12. package/dist/vue2/components/badge/badge.vue.cjs.map +1 -1
  13. package/dist/vue2/components/badge/badge.vue.js +13 -34
  14. package/dist/vue2/components/badge/badge.vue.js.map +1 -1
  15. package/dist/vue2/components/chip/chip.vue.cjs +4 -4
  16. package/dist/vue2/components/chip/chip.vue.cjs.map +1 -1
  17. package/dist/vue2/components/chip/chip.vue.js +4 -4
  18. package/dist/vue2/components/chip/chip.vue.js.map +1 -1
  19. package/dist/vue2/components/collapsible/collapsible.vue.cjs +4 -3
  20. package/dist/vue2/components/collapsible/collapsible.vue.cjs.map +1 -1
  21. package/dist/vue2/components/collapsible/collapsible.vue.js +4 -3
  22. package/dist/vue2/components/collapsible/collapsible.vue.js.map +1 -1
  23. package/dist/vue2/components/datepicker/modules/month-year-picker.vue.cjs +14 -6
  24. package/dist/vue2/components/datepicker/modules/month-year-picker.vue.cjs.map +1 -1
  25. package/dist/vue2/components/datepicker/modules/month-year-picker.vue.js +14 -6
  26. package/dist/vue2/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
  27. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs +6 -5
  28. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
  29. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js +6 -5
  30. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
  31. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs +23 -14
  32. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
  33. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js +23 -14
  34. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
  35. package/dist/vue2/components/empty_state/empty_state.vue.cjs +20 -80
  36. package/dist/vue2/components/empty_state/empty_state.vue.cjs.map +1 -1
  37. package/dist/vue2/components/empty_state/empty_state.vue.js +21 -81
  38. package/dist/vue2/components/empty_state/empty_state.vue.js.map +1 -1
  39. package/dist/vue2/components/empty_state/empty_state_constants.cjs +18 -0
  40. package/dist/vue2/components/empty_state/empty_state_constants.cjs.map +1 -1
  41. package/dist/vue2/components/empty_state/empty_state_constants.js +18 -0
  42. package/dist/vue2/components/empty_state/empty_state_constants.js.map +1 -1
  43. package/dist/vue2/components/icon/icon.vue.cjs +2 -2
  44. package/dist/vue2/components/icon/icon.vue.js +2 -2
  45. package/dist/vue2/components/illustration/illustration.vue.cjs +2 -2
  46. package/dist/vue2/components/illustration/illustration.vue.js +2 -2
  47. package/dist/vue2/components/image_viewer/image_viewer.vue.cjs +4 -4
  48. package/dist/vue2/components/image_viewer/image_viewer.vue.cjs.map +1 -1
  49. package/dist/vue2/components/image_viewer/image_viewer.vue.js +4 -4
  50. package/dist/vue2/components/image_viewer/image_viewer.vue.js.map +1 -1
  51. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +24 -9
  52. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.cjs.map +1 -1
  53. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.js +22 -7
  54. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.js.map +1 -1
  55. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.cjs +8 -14
  56. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.cjs.map +1 -1
  57. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.js +9 -15
  58. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.js.map +1 -1
  59. package/dist/vue2/components/list_item/list_item.vue.cjs +3 -3
  60. package/dist/vue2/components/list_item/list_item.vue.cjs.map +1 -1
  61. package/dist/vue2/components/list_item/list_item.vue.js +3 -3
  62. package/dist/vue2/components/list_item/list_item.vue.js.map +1 -1
  63. package/dist/vue2/components/modal/modal.vue.cjs +4 -4
  64. package/dist/vue2/components/modal/modal.vue.cjs.map +1 -1
  65. package/dist/vue2/components/modal/modal.vue.js +4 -4
  66. package/dist/vue2/components/modal/modal.vue.js.map +1 -1
  67. package/dist/vue2/components/notice/notice_action.vue.cjs +4 -4
  68. package/dist/vue2/components/notice/notice_action.vue.cjs.map +1 -1
  69. package/dist/vue2/components/notice/notice_action.vue.js +4 -4
  70. package/dist/vue2/components/notice/notice_action.vue.js.map +1 -1
  71. package/dist/vue2/components/notice/notice_icon.vue.cjs +12 -8
  72. package/dist/vue2/components/notice/notice_icon.vue.cjs.map +1 -1
  73. package/dist/vue2/components/notice/notice_icon.vue.js +12 -8
  74. package/dist/vue2/components/notice/notice_icon.vue.js.map +1 -1
  75. package/dist/vue2/components/pagination/pagination.vue.cjs +11 -5
  76. package/dist/vue2/components/pagination/pagination.vue.cjs.map +1 -1
  77. package/dist/vue2/components/pagination/pagination.vue.js +11 -5
  78. package/dist/vue2/components/pagination/pagination.vue.js.map +1 -1
  79. package/dist/vue2/components/popover/popover_header_footer.vue.cjs +4 -4
  80. package/dist/vue2/components/popover/popover_header_footer.vue.cjs.map +1 -1
  81. package/dist/vue2/components/popover/popover_header_footer.vue.js +4 -4
  82. package/dist/vue2/components/popover/popover_header_footer.vue.js.map +1 -1
  83. package/dist/vue2/dialtone-vue.cjs +0 -3
  84. package/dist/vue2/dialtone-vue.cjs.map +1 -1
  85. package/dist/vue2/dialtone-vue.js +2 -5
  86. package/dist/vue2/lib/general-row.cjs +0 -1
  87. package/dist/vue2/lib/general-row.cjs.map +1 -1
  88. package/dist/vue2/lib/general-row.js +1 -2
  89. package/dist/vue2/lib/keyboard-shortcut.cjs +0 -2
  90. package/dist/vue2/lib/keyboard-shortcut.cjs.map +1 -1
  91. package/dist/vue2/lib/keyboard-shortcut.js +2 -4
  92. package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +5 -5
  93. package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
  94. package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +5 -5
  95. package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
  96. package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.cjs +25 -5
  97. package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.cjs.map +1 -1
  98. package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.js +26 -6
  99. package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.js.map +1 -1
  100. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +16 -2
  101. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
  102. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +16 -2
  103. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
  104. package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +5 -4
  105. package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
  106. package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +5 -4
  107. package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
  108. package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +3 -3
  109. package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
  110. package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +3 -3
  111. package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
  112. package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs +35 -22
  113. package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
  114. package/dist/vue2/recipes/conversation_view/editor/editor.vue.js +35 -22
  115. package/dist/vue2/recipes/conversation_view/editor/editor.vue.js.map +1 -1
  116. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +7 -6
  117. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
  118. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +7 -6
  119. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
  120. package/dist/vue2/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs +9 -17
  121. package/dist/vue2/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs.map +1 -1
  122. package/dist/vue2/recipes/conversation_view/feed_pill/feed_item_pill.vue.js +9 -17
  123. package/dist/vue2/recipes/conversation_view/feed_pill/feed_item_pill.vue.js.map +1 -1
  124. package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs +6 -5
  125. package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs.map +1 -1
  126. package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js +6 -5
  127. package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js.map +1 -1
  128. package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.cjs +22 -11
  129. package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
  130. package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.js +22 -11
  131. package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
  132. package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +6 -6
  133. package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
  134. package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.js +6 -6
  135. package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
  136. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.cjs +14 -10
  137. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
  138. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.js +14 -10
  139. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
  140. package/dist/vue2/recipes/leftbar/callbox/callbox.vue.cjs +6 -3
  141. package/dist/vue2/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
  142. package/dist/vue2/recipes/leftbar/callbox/callbox.vue.js +6 -3
  143. package/dist/vue2/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
  144. package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.cjs +6 -5
  145. package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.cjs.map +1 -1
  146. package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.js +6 -5
  147. package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.js.map +1 -1
  148. package/dist/vue2/recipes/leftbar/general_row/general_row.vue.cjs +8 -7
  149. package/dist/vue2/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
  150. package/dist/vue2/recipes/leftbar/general_row/general_row.vue.js +8 -7
  151. package/dist/vue2/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
  152. package/dist/vue2/recipes/leftbar/general_row/general_row_constants.cjs +0 -17
  153. package/dist/vue2/recipes/leftbar/general_row/general_row_constants.cjs.map +1 -1
  154. package/dist/vue2/recipes/leftbar/general_row/general_row_constants.js +0 -17
  155. package/dist/vue2/recipes/leftbar/general_row/general_row_constants.js.map +1 -1
  156. package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +36 -4
  157. package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
  158. package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +37 -5
  159. package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
  160. package/dist/vue2/recipes/leftbar/group_row/group_row.vue.cjs +3 -3
  161. package/dist/vue2/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
  162. package/dist/vue2/recipes/leftbar/group_row/group_row.vue.js +3 -3
  163. package/dist/vue2/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
  164. package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.cjs +4 -3
  165. package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.cjs.map +1 -1
  166. package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.js +4 -3
  167. package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.js.map +1 -1
  168. package/dist/vue2/style.css +139 -132
  169. package/dist/vue2/types/components/avatar/avatar.vue.d.ts +4 -34
  170. package/dist/vue2/types/components/avatar/avatar.vue.d.ts.map +1 -1
  171. package/dist/vue2/types/components/badge/badge.vue.d.ts +16 -45
  172. package/dist/vue2/types/components/badge/badge.vue.d.ts.map +1 -1
  173. package/dist/vue2/types/components/chip/chip.vue.d.ts +1 -1
  174. package/dist/vue2/types/components/collapsible/collapsible.vue.d.ts +1 -1
  175. package/dist/vue2/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
  176. package/dist/vue2/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts +1 -67
  177. package/dist/vue2/types/components/empty_state/empty_state_constants.d.ts +27 -0
  178. package/dist/vue2/types/components/keyboard_shortcut/index.d.ts +1 -1
  179. package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +7 -15
  180. package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
  181. package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts +0 -11
  182. package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts.map +1 -1
  183. package/dist/vue2/types/components/modal/modal.vue.d.ts +4 -6
  184. package/dist/vue2/types/components/modal/modal.vue.d.ts.map +1 -1
  185. package/dist/vue2/types/components/notice/notice_action.vue.d.ts +5 -4
  186. package/dist/vue2/types/components/notice/notice_action.vue.d.ts.map +1 -1
  187. package/dist/vue2/types/components/notice/notice_icon.vue.d.ts +1 -1
  188. package/dist/vue2/types/components/notice/notice_icon.vue.d.ts.map +1 -1
  189. package/dist/vue2/types/components/pagination/pagination.vue.d.ts.map +1 -1
  190. package/dist/vue2/types/components/split_button/split_button-omega.vue.d.ts +1 -1
  191. package/dist/vue2/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
  192. package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
  193. package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  194. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  195. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +8 -8
  196. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  197. package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +0 -1
  198. package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  199. package/dist/vue2/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts +2 -16
  200. package/dist/vue2/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts.map +1 -1
  201. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +4 -6
  202. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  203. package/dist/vue2/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +3 -16
  204. package/dist/vue2/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
  205. package/dist/vue2/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
  206. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -1
  207. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  208. package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
  209. package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  210. package/dist/vue2/types/recipes/leftbar/general_row/general_row_constants.d.ts +0 -6
  211. package/dist/vue2/types/recipes/leftbar/general_row/general_row_constants.d.ts.map +1 -1
  212. package/dist/vue2/types/recipes/leftbar/general_row/index.d.ts +1 -1
  213. package/dist/vue2/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +1 -1
  214. package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  215. package/dist/vue3/common/sr_only_close_button.vue.cjs +4 -4
  216. package/dist/vue3/common/sr_only_close_button.vue.cjs.map +1 -1
  217. package/dist/vue3/common/sr_only_close_button.vue.js +4 -4
  218. package/dist/vue3/common/sr_only_close_button.vue.js.map +1 -1
  219. package/dist/vue3/component-documentation.json +1 -1
  220. package/dist/vue3/components/avatar/avatar.vue.cjs +30 -41
  221. package/dist/vue3/components/avatar/avatar.vue.cjs.map +1 -1
  222. package/dist/vue3/components/avatar/avatar.vue.js +32 -43
  223. package/dist/vue3/components/avatar/avatar.vue.js.map +1 -1
  224. package/dist/vue3/components/badge/badge.vue.cjs +22 -39
  225. package/dist/vue3/components/badge/badge.vue.cjs.map +1 -1
  226. package/dist/vue3/components/badge/badge.vue.js +23 -40
  227. package/dist/vue3/components/badge/badge.vue.js.map +1 -1
  228. package/dist/vue3/components/chip/chip.vue.cjs +4 -7
  229. package/dist/vue3/components/chip/chip.vue.cjs.map +1 -1
  230. package/dist/vue3/components/chip/chip.vue.js +4 -7
  231. package/dist/vue3/components/chip/chip.vue.js.map +1 -1
  232. package/dist/vue3/components/collapsible/collapsible.vue.cjs +12 -6
  233. package/dist/vue3/components/collapsible/collapsible.vue.cjs.map +1 -1
  234. package/dist/vue3/components/collapsible/collapsible.vue.js +12 -6
  235. package/dist/vue3/components/collapsible/collapsible.vue.js.map +1 -1
  236. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs +5 -17
  237. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs.map +1 -1
  238. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js +5 -17
  239. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
  240. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs +4 -9
  241. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
  242. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js +5 -10
  243. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
  244. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs +11 -14
  245. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
  246. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js +12 -15
  247. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
  248. package/dist/vue3/components/empty_state/empty_state.vue.cjs +19 -92
  249. package/dist/vue3/components/empty_state/empty_state.vue.cjs.map +1 -1
  250. package/dist/vue3/components/empty_state/empty_state.vue.js +20 -93
  251. package/dist/vue3/components/empty_state/empty_state.vue.js.map +1 -1
  252. package/dist/vue3/components/empty_state/empty_state_constants.cjs +18 -0
  253. package/dist/vue3/components/empty_state/empty_state_constants.cjs.map +1 -1
  254. package/dist/vue3/components/empty_state/empty_state_constants.js +18 -0
  255. package/dist/vue3/components/empty_state/empty_state_constants.js.map +1 -1
  256. package/dist/vue3/components/icon/icon.vue.cjs +2 -2
  257. package/dist/vue3/components/icon/icon.vue.js +2 -2
  258. package/dist/vue3/components/illustration/illustration.vue.cjs +2 -2
  259. package/dist/vue3/components/illustration/illustration.vue.js +2 -2
  260. package/dist/vue3/components/image_viewer/image_viewer.vue.cjs +4 -5
  261. package/dist/vue3/components/image_viewer/image_viewer.vue.cjs.map +1 -1
  262. package/dist/vue3/components/image_viewer/image_viewer.vue.js +4 -5
  263. package/dist/vue3/components/image_viewer/image_viewer.vue.js.map +1 -1
  264. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +24 -11
  265. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.cjs.map +1 -1
  266. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.js +23 -10
  267. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.js.map +1 -1
  268. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.cjs +8 -14
  269. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.cjs.map +1 -1
  270. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.js +9 -15
  271. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.js.map +1 -1
  272. package/dist/vue3/components/list_item/list_item.vue.cjs +4 -5
  273. package/dist/vue3/components/list_item/list_item.vue.cjs.map +1 -1
  274. package/dist/vue3/components/list_item/list_item.vue.js +4 -5
  275. package/dist/vue3/components/list_item/list_item.vue.js.map +1 -1
  276. package/dist/vue3/components/modal/modal.vue.cjs +4 -7
  277. package/dist/vue3/components/modal/modal.vue.cjs.map +1 -1
  278. package/dist/vue3/components/modal/modal.vue.js +4 -7
  279. package/dist/vue3/components/modal/modal.vue.js.map +1 -1
  280. package/dist/vue3/components/notice/notice_action.vue.cjs +4 -7
  281. package/dist/vue3/components/notice/notice_action.vue.cjs.map +1 -1
  282. package/dist/vue3/components/notice/notice_action.vue.js +4 -7
  283. package/dist/vue3/components/notice/notice_action.vue.js.map +1 -1
  284. package/dist/vue3/components/notice/notice_icon.vue.cjs +12 -12
  285. package/dist/vue3/components/notice/notice_icon.vue.cjs.map +1 -1
  286. package/dist/vue3/components/notice/notice_icon.vue.js +13 -13
  287. package/dist/vue3/components/notice/notice_icon.vue.js.map +1 -1
  288. package/dist/vue3/components/pagination/pagination.vue.cjs +10 -15
  289. package/dist/vue3/components/pagination/pagination.vue.cjs.map +1 -1
  290. package/dist/vue3/components/pagination/pagination.vue.js +10 -15
  291. package/dist/vue3/components/pagination/pagination.vue.js.map +1 -1
  292. package/dist/vue3/components/popover/popover_header_footer.vue.cjs +4 -7
  293. package/dist/vue3/components/popover/popover_header_footer.vue.cjs.map +1 -1
  294. package/dist/vue3/components/popover/popover_header_footer.vue.js +4 -7
  295. package/dist/vue3/components/popover/popover_header_footer.vue.js.map +1 -1
  296. package/dist/vue3/dialtone-vue.cjs +0 -3
  297. package/dist/vue3/dialtone-vue.cjs.map +1 -1
  298. package/dist/vue3/dialtone-vue.js +2 -5
  299. package/dist/vue3/lib/general-row.cjs +0 -1
  300. package/dist/vue3/lib/general-row.cjs.map +1 -1
  301. package/dist/vue3/lib/general-row.js +1 -2
  302. package/dist/vue3/lib/keyboard-shortcut.cjs +0 -2
  303. package/dist/vue3/lib/keyboard-shortcut.cjs.map +1 -1
  304. package/dist/vue3/lib/keyboard-shortcut.js +2 -4
  305. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +4 -5
  306. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
  307. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +4 -5
  308. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
  309. package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.cjs +27 -11
  310. package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.cjs.map +1 -1
  311. package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.js +29 -13
  312. package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.js.map +1 -1
  313. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +18 -3
  314. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
  315. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +18 -3
  316. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
  317. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +7 -11
  318. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
  319. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +7 -11
  320. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
  321. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +4 -7
  322. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
  323. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +4 -7
  324. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
  325. package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs +33 -25
  326. package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
  327. package/dist/vue3/recipes/conversation_view/editor/editor.vue.js +34 -26
  328. package/dist/vue3/recipes/conversation_view/editor/editor.vue.js.map +1 -1
  329. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +14 -7
  330. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
  331. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +15 -8
  332. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
  333. package/dist/vue3/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs +23 -25
  334. package/dist/vue3/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs.map +1 -1
  335. package/dist/vue3/recipes/conversation_view/feed_pill/feed_item_pill.vue.js +24 -26
  336. package/dist/vue3/recipes/conversation_view/feed_pill/feed_item_pill.vue.js.map +1 -1
  337. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs +8 -12
  338. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs.map +1 -1
  339. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js +8 -12
  340. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js.map +1 -1
  341. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs +29 -18
  342. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
  343. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js +29 -18
  344. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
  345. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +6 -12
  346. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
  347. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js +6 -12
  348. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
  349. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs +33 -13
  350. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
  351. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js +34 -14
  352. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
  353. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs +13 -4
  354. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
  355. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js +14 -5
  356. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
  357. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs +13 -7
  358. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs.map +1 -1
  359. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js +14 -8
  360. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js.map +1 -1
  361. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs +9 -13
  362. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
  363. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js +9 -13
  364. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
  365. package/dist/vue3/recipes/leftbar/general_row/general_row_constants.cjs +0 -17
  366. package/dist/vue3/recipes/leftbar/general_row/general_row_constants.cjs.map +1 -1
  367. package/dist/vue3/recipes/leftbar/general_row/general_row_constants.js +0 -17
  368. package/dist/vue3/recipes/leftbar/general_row/general_row_constants.js.map +1 -1
  369. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +39 -11
  370. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
  371. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +41 -13
  372. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
  373. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs +4 -7
  374. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
  375. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js +4 -7
  376. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
  377. package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.cjs +11 -6
  378. package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.cjs.map +1 -1
  379. package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.js +12 -7
  380. package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.js.map +1 -1
  381. package/dist/vue3/style.css +139 -132
  382. package/dist/vue3/types/components/avatar/avatar.vue.d.ts +5 -33
  383. package/dist/vue3/types/components/avatar/avatar.vue.d.ts.map +1 -1
  384. package/dist/vue3/types/components/badge/badge.vue.d.ts +17 -34
  385. package/dist/vue3/types/components/badge/badge.vue.d.ts.map +1 -1
  386. package/dist/vue3/types/components/chip/chip.vue.d.ts +1 -1
  387. package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts +1 -1
  388. package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
  389. package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
  390. package/dist/vue3/types/components/empty_state/empty_state.vue.d.ts +4 -0
  391. package/dist/vue3/types/components/empty_state/empty_state.vue.d.ts.map +1 -1
  392. package/dist/vue3/types/components/empty_state/empty_state_constants.d.ts +27 -0
  393. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  394. package/dist/vue3/types/components/keyboard_shortcut/index.d.ts +1 -1
  395. package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +210 -15
  396. package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
  397. package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts +0 -11
  398. package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts.map +1 -1
  399. package/dist/vue3/types/components/list_item/list_item.vue.d.ts +2 -8
  400. package/dist/vue3/types/components/list_item/list_item.vue.d.ts.map +1 -1
  401. package/dist/vue3/types/components/notice/notice_action.vue.d.ts +5 -4
  402. package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
  403. package/dist/vue3/types/components/notice/notice_icon.vue.d.ts +30 -1
  404. package/dist/vue3/types/components/notice/notice_icon.vue.d.ts.map +1 -1
  405. package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
  406. package/dist/vue3/types/components/split_button/split_button-omega.vue.d.ts +1 -1
  407. package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
  408. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
  409. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +30 -1
  410. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  411. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  412. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +240 -8
  413. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  414. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +0 -1
  415. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  416. package/dist/vue3/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts +31 -16
  417. package/dist/vue3/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts.map +1 -1
  418. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +4 -6
  419. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  420. package/dist/vue3/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +3 -16
  421. package/dist/vue3/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
  422. package/dist/vue3/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
  423. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +0 -1
  424. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  425. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
  426. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  427. package/dist/vue3/types/recipes/leftbar/general_row/general_row_constants.d.ts +0 -6
  428. package/dist/vue3/types/recipes/leftbar/general_row/general_row_constants.d.ts.map +1 -1
  429. package/dist/vue3/types/recipes/leftbar/general_row/index.d.ts +1 -1
  430. package/dist/vue3/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +30 -1
  431. package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  432. package/package.json +3 -3
  433. package/dist/vue2/common/storybook_utils.cjs +0 -8
  434. package/dist/vue2/common/storybook_utils.cjs.map +0 -1
  435. package/dist/vue2/common/storybook_utils.js +0 -8
  436. package/dist/vue2/common/storybook_utils.js.map +0 -1
  437. package/dist/vue2/types/common/storybook_utils.d.ts +0 -35
  438. package/dist/vue2/types/common/storybook_utils.d.ts.map +0 -1
  439. package/dist/vue3/common/storybook_utils.cjs +0 -8
  440. package/dist/vue3/common/storybook_utils.cjs.map +0 -1
  441. package/dist/vue3/common/storybook_utils.js +0 -8
  442. package/dist/vue3/common/storybook_utils.js.map +0 -1
  443. package/dist/vue3/types/common/storybook_utils.d.ts +0 -25
  444. package/dist/vue3/types/common/storybook_utils.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"badge.vue.cjs","sources":["../../../components/badge/badge.vue"],"sourcesContent":["<template>\n <span\n :class=\"[\n 'd-badge',\n BADGE_TYPE_MODIFIERS[type],\n BADGE_KIND_MODIFIERS[kind],\n BADGE_DECORATION_MODIFIERS[decoration],\n { 'd-badge--subtle': subtle },\n { 'd-badge--outlined': outlined },\n ]\"\n data-qa=\"dt-badge\"\n >\n <span\n v-if=\"decoration\"\n class=\"d-badge__decorative\"\n />\n <span\n v-if=\"iconLeft\"\n class=\"d-badge__icon-left\"\n >\n <dt-icon\n :name=\"iconLeft\"\n size=\"200\"\n />\n </span>\n <span :class=\"['d-badge__label', labelClass]\">\n <!-- @slot Slot for badge content, defaults to text prop -->\n <slot>\n {{ text }}\n </slot>\n </span>\n <span\n v-if=\"iconRight\"\n class=\"d-badge__icon-right\"\n >\n <dt-icon\n :name=\"iconRight\"\n size=\"200\"\n />\n </span>\n </span>\n</template>\n\n<script>\nimport { BADGE_TYPE_MODIFIERS, BADGE_KIND_MODIFIERS, BADGE_DECORATION_MODIFIERS } from './badge_constants';\nimport { DtIcon } from '@/components/icon';\n\n/**\n * A badge is a compact UI element that provides brief, descriptive information about an element.\n * It is terse, ideally one word.\n * @see https://dialtone.dialpad.com/components/badge.html\n */\nexport default {\n name: 'DtBadge',\n\n components: {\n DtIcon,\n },\n\n props: {\n /**\n * Icon on the left side of the badge. Supports any valid icon name from the icon catalog at\n * https://dialtone.dialpad.com/components/icon.html#icon-catalog. If type:'ai' is set, the ai icon\n * will automatically be shown here, but this can be overridden by setting this prop.\n */\n iconLeft: {\n type: String,\n default: '',\n },\n\n /**\n * Icon on the right side of the badge. Supports any valid icon name from the icon catalog at\n * https://dialtone.dialpad.com/components/icon.html#icon-catalog\n */\n iconRight: {\n type: String,\n default: '',\n },\n\n /**\n * Text for the badge content\n */\n text: {\n type: String,\n default: '',\n },\n\n /**\n * The kind of badge which determines the styling\n * @values label, count\n */\n kind: {\n type: String,\n default: 'label',\n validator: (kind) => Object.keys(BADGE_KIND_MODIFIERS).includes(kind),\n },\n\n /**\n * Color for the badge background\n * @values default, info, success, warning, critical, bulletin, ai\n */\n type: {\n type: String,\n default: 'default',\n validator: (type) => Object.keys(BADGE_TYPE_MODIFIERS).includes(type),\n },\n\n /**\n * Decoration for the badge. This can be only used with kind: label and type: default\n * with no iconLeft and iconRight\n * @values default, black-400, black-500, black-900, red-200, red-300, red-400, purple-200,\n * purple-300, purple-400, purple-500, blue-200, blue-300, blue-400, green-300, green-400,\n * green-500, gold-300, gold-400, gold-500, magenta-200, magenta-300, magenta-400\n */\n decoration: {\n type: String,\n default: undefined,\n validator: (type) => Object.keys(BADGE_DECORATION_MODIFIERS).includes(type),\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Shows a subtle appearance for the badge\n * Currently only affects the badge when type is bulletin.\n */\n subtle: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Outlines the badge with a border\n */\n outlined: {\n type: Boolean,\n default: false,\n },\n },\n\n data () {\n return {\n BADGE_TYPE_MODIFIERS,\n BADGE_KIND_MODIFIERS,\n BADGE_DECORATION_MODIFIERS,\n };\n },\n\n computed: {\n hasIcons () {\n return this.iconLeft !== '' || this.iconRight !== '';\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n deep: true,\n handler () {\n this.validateProps();\n },\n },\n },\n\n methods: {\n validateProps () {\n this.validateTypePropCombination();\n this.validateDecorationPropCombination();\n },\n\n validateTypePropCombination () {\n if (this.type === 'ai' && this.kind === 'count') {\n console.error('DtBadge error: type: \\'ai\\' with kind: \\'count\\' is an invalid combination.');\n }\n if (this.type !== 'bulletin' && this.subtle) {\n console.error('DtBadge error: subtle can only be used with type \\'bulletin\\'');\n }\n },\n\n validateDecorationPropCombination () {\n if (!this.decoration) return;\n\n if (this.kind !== 'label' || this.type !== 'default') {\n console.error('DtBadge error: decoration prop can only be used with kind: \\'label\\' and type: \\'default\\'.');\n }\n\n if (this.hasIcons) {\n console.error('DtBadge error: decoration prop cannot be used with iconLeft or iconRight.');\n }\n },\n },\n};\n</script>\n"],"names":["DtIcon","BADGE_KIND_MODIFIERS","BADGE_TYPE_MODIFIERS","BADGE_DECORATION_MODIFIERS","_createElementBlock","_normalizeClass","_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AAA,aAAAF,IAAAA,mBAQO,QARP,YAQO;AAAA,MAJLG,IAAAA,YAGE,oBAAA;AAAA,QAFC,MAAM,OAAQ;AAAA,QACf,MAAK;AAAA;;IAGTC,IAAAA,mBAKO,QAAA;AAAA,MALA,6CAA0B,OAAU,UAAA,CAAA;AAAA;MAEzCC,IAAAA,WAEO,4BAFP,MAEO;AAAA,gDADF,OAAI,IAAA,GAAA,CAAA;AAAA;;IAIH,OAAS,aADjBH,IAAAA,aAAAF,IAAAA,mBAQO,QARP,YAQO;AAAA,MAJLG,IAAAA,YAGE,oBAAA;AAAA,QAFC,MAAM,OAAS;AAAA,QAChB,MAAK;AAAA;;;;;;"}
1
+ {"version":3,"file":"badge.vue.cjs","sources":["../../../components/badge/badge.vue"],"sourcesContent":["<template>\n <span\n :class=\"[\n 'd-badge',\n BADGE_TYPE_MODIFIERS[type],\n BADGE_KIND_MODIFIERS[kind],\n BADGE_DECORATION_MODIFIERS[decoration],\n { 'd-badge--subtle': subtle },\n { 'd-badge--outlined': outlined },\n ]\"\n data-qa=\"dt-badge\"\n >\n <span\n v-if=\"decoration\"\n class=\"d-badge__decorative\"\n />\n <span\n v-if=\"hasLeftIcon\"\n class=\"d-badge__icon-left\"\n >\n <!-- @slot Slot for left icon, icon-size slot prop defaults to '200' -->\n <slot\n name=\"leftIcon\"\n :icon-size=\"iconSize\"\n />\n </span>\n <span :class=\"['d-badge__label', labelClass]\">\n <!-- @slot Slot for badge content, defaults to text prop -->\n <slot>\n {{ text }}\n </slot>\n </span>\n <span\n v-if=\"hasRightIcon\"\n class=\"d-badge__icon-right\"\n >\n <!-- @slot Slot for right icon, icon-size slot prop defaults to '200' -->\n <slot\n name=\"rightIcon\"\n :icon-size=\"iconSize\"\n />\n </span>\n </span>\n</template>\n\n<script>\nimport { BADGE_TYPE_MODIFIERS, BADGE_KIND_MODIFIERS, BADGE_DECORATION_MODIFIERS } from './badge_constants';\nimport { ICON_SIZE_MODIFIERS } from '@/components/icon';\nimport { hasSlotContent } from '@/common/utils/index.js';\n\n/**\n * A badge is a compact UI element that provides brief, descriptive information about an element.\n * It is terse, ideally one word.\n * @see https://dialtone.dialpad.com/components/badge.html\n */\nexport default {\n name: 'DtBadge',\n\n props: {\n /**\n * The size of the left and right icons.\n * @values 100, 200, 300, 400, 500, 600, 700, 800\n */\n iconSize: {\n type: String,\n default: '200',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Text for the badge content\n */\n text: {\n type: String,\n default: '',\n },\n\n /**\n * The kind of badge which determines the styling\n * @values label, count\n */\n kind: {\n type: String,\n default: 'label',\n validator: (kind) => Object.keys(BADGE_KIND_MODIFIERS).includes(kind),\n },\n\n /**\n * Color for the badge background\n * @values default, info, success, warning, critical, bulletin, ai\n */\n type: {\n type: String,\n default: 'default',\n validator: (type) => Object.keys(BADGE_TYPE_MODIFIERS).includes(type),\n },\n\n /**\n * Decoration for the badge. This can be only used with kind: label and type: default\n * with no left and right icons\n * @values default, black-400, black-500, black-900, red-200, red-300, red-400, purple-200,\n * purple-300, purple-400, purple-500, blue-200, blue-300, blue-400, green-300, green-400,\n * green-500, gold-300, gold-400, gold-500, magenta-200, magenta-300, magenta-400\n */\n decoration: {\n type: String,\n default: undefined,\n validator: (type) => Object.keys(BADGE_DECORATION_MODIFIERS).includes(type),\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Shows a subtle appearance for the badge\n * Currently only affects the badge when type is bulletin.\n */\n subtle: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Outlines the badge with a border\n */\n outlined: {\n type: Boolean,\n default: false,\n },\n },\n\n data () {\n return {\n BADGE_TYPE_MODIFIERS,\n BADGE_KIND_MODIFIERS,\n BADGE_DECORATION_MODIFIERS,\n };\n },\n\n computed: {\n hasLeftIcon () {\n return hasSlotContent(this.$slots.leftIcon);\n },\n\n hasRightIcon () {\n return hasSlotContent(this.$slots.rightIcon);\n },\n\n hasIcons () {\n return this.hasLeftIcon || this.hasRightIcon;\n },\n },\n\n updated () {\n this.validateProps();\n },\n\n methods: {\n validateProps () {\n this.validateTypePropCombination();\n this.validateDecorationPropCombination();\n },\n\n validateTypePropCombination () {\n if (this.type === 'ai' && this.kind === 'count') {\n console.error('DtBadge error: type: \\'ai\\' with kind: \\'count\\' is an invalid combination.');\n }\n if (this.type !== 'bulletin' && this.subtle) {\n console.error('DtBadge error: subtle can only be used with type \\'bulletin\\'');\n }\n },\n\n validateDecorationPropCombination () {\n if (!this.decoration) return;\n\n if (this.kind !== 'label' || this.type !== 'default') {\n console.error('DtBadge error: decoration prop can only be used with kind: \\'label\\' and type: \\'default\\'.');\n }\n\n if (this.hasIcons) {\n console.error('DtBadge error: decoration prop cannot be used with leftIcon or rightIcon.');\n }\n },\n },\n};\n</script>\n"],"names":["ICON_SIZE_MODIFIERS","BADGE_KIND_MODIFIERS","BADGE_TYPE_MODIFIERS","BADGE_DECORATION_MODIFIERS","hasSlotContent","_createElementBlock","_normalizeClass","_openBlock","_renderSlot","_createElementVNode"],"mappings":";;;;;;AAuDA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,MAAM,OAAO,KAAKA,kCAAmB,EAAE,SAAS,CAAC;AAAA,IAC9D;AAAA;AAAA;AAAA;AAAA,IAKD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,SAAS,OAAO,KAAKC,oCAAoB,EAAE,SAAS,IAAI;AAAA,IACrE;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,S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AAI,CAAC,KAAK,WAAY;AAEtB,UAAI,KAAK,SAAS,WAAW,KAAK,SAAS,WAAW;AACpD,gBAAQ,MAAM,yFAA6F;AAAA,MAC7G;AAEA,UAAI,KAAK,UAAU;AACjB,gBAAQ,MAAM,2EAA2E;AAAA,MAC3F;AAAA,IACD;AAAA,EACF;AACH;;;EA/KM,OAAM;;;;EAIN,OAAM;;;;EAgBN,OAAM;;;0BAjCVC,IAyCO,mBAAA,QAAA;AAAA,IAxCJ,OAAKC,IAAAA,eAAA;AAAA;MAA2B,MAAA,qBAAqB,OAAI,IAAA;AAAA,MAAS,MAAA,qBAAqB,OAAI,IAAA;AAAA,MAAS,MAAA,2BAA2B,OAAU,UAAA;AAAA,2BAA8B,OAAM,OAAA;AAAA,6BAAiC,OAAQ,SAAA;AAAA;IAQvN,WAAQ;AAAA;IAGA,OAAU,cADlBC,IAAAA,aAAAF,IAAAA,mBAGE,QAHF,UAGE;IAEM,SAAW,eADnBE,IAAAA,aAAAF,IAAAA,mBASO,QATP,YASO;AAAA,MAJLG,IAGE,WAAA,KAAA,QAAA,YAAA,EADC,UAAW,OAAQ,UAAA;AAAA;IAGxBC,IAAAA,mBAKO,QAAA;AAAA,MALA,6CAA0B,OAAU,UAAA,CAAA;AAAA;MAEzCD,IAAAA,WAEO,4BAFP,MAEO;AAAA,gDADF,OAAI,IAAA,GAAA,CAAA;AAAA;;IAIH,SAAY,gBADpBD,IAAAA,aAAAF,IAAAA,mBASO,QATP,YASO;AAAA,MAJLG,IAGE,WAAA,KAAA,QAAA,aAAA,EADC,UAAW,OAAQ,UAAA;AAAA;;;;;"}
@@ -1,29 +1,19 @@
1
1
  import { BADGE_KIND_MODIFIERS, BADGE_TYPE_MODIFIERS, BADGE_DECORATION_MODIFIERS } from "./badge_constants.js";
2
- import { resolveComponent, openBlock, createElementBlock, normalizeClass, createCommentVNode, createVNode, createElementVNode, renderSlot, createTextVNode, toDisplayString } from "vue";
2
+ import { hasSlotContent } from "../../common/utils.js";
3
+ import { openBlock, createElementBlock, normalizeClass, createCommentVNode, renderSlot, createElementVNode, createTextVNode, toDisplayString } from "vue";
3
4
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
4
- import DtIcon from "../icon/icon.vue.js";
5
+ import { ICON_SIZE_MODIFIERS } from "../icon/icon_constants.js";
5
6
  const _sfc_main = {
6
7
  name: "DtBadge",
7
- components: {
8
- DtIcon
9
- },
10
8
  props: {
11
9
  /**
12
- * Icon on the left side of the badge. Supports any valid icon name from the icon catalog at
13
- * https://dialtone.dialpad.com/components/icon.html#icon-catalog. If type:'ai' is set, the ai icon
14
- * will automatically be shown here, but this can be overridden by setting this prop.
10
+ * The size of the left and right icons.
11
+ * @values 100, 200, 300, 400, 500, 600, 700, 800
15
12
  */
16
- iconLeft: {
13
+ iconSize: {
17
14
  type: String,
18
- default: ""
19
- },
20
- /**
21
- * Icon on the right side of the badge. Supports any valid icon name from the icon catalog at
22
- * https://dialtone.dialpad.com/components/icon.html#icon-catalog
23
- */
24
- iconRight: {
25
- type: String,
26
- default: ""
15
+ default: "200",
16
+ validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s)
27
17
  },
28
18
  /**
29
19
  * Text for the badge content
@@ -52,7 +42,7 @@ const _sfc_main = {
52
42
  },
53
43
  /**
54
44
  * Decoration for the badge. This can be only used with kind: label and type: default
55
- * with no iconLeft and iconRight
45
+ * with no left and right icons
56
46
  * @values default, black-400, black-500, black-900, red-200, red-300, red-400, purple-200,
57
47
  * purple-300, purple-400, purple-500, blue-200, blue-300, blue-400, green-300, green-400,
58
48
  * green-500, gold-300, gold-400, gold-500, magenta-200, magenta-300, magenta-400
@@ -93,18 +83,18 @@ const _sfc_main = {
93
83
  };
94
84
  },
95
85
  computed: {
86
+ hasLeftIcon() {
87
+ return hasSlotContent(this.$slots.leftIcon);
88
+ },
89
+ hasRightIcon() {
90
+ return hasSlotContent(this.$slots.rightIcon);
91
+ },
96
92
  hasIcons() {
97
- return this.iconLeft !== "" || this.iconRight !== "";
93
+ return this.hasLeftIcon || this.hasRightIcon;
98
94
  }
99
95
  },
100
- watch: {
101
- $props: {
102
- immediate: true,
103
- deep: true,
104
- handler() {
105
- this.validateProps();
106
- }
107
- }
96
+ updated() {
97
+ this.validateProps();
108
98
  },
109
99
  methods: {
110
100
  validateProps() {
@@ -125,7 +115,7 @@ const _sfc_main = {
125
115
  console.error("DtBadge error: decoration prop can only be used with kind: 'label' and type: 'default'.");
126
116
  }
127
117
  if (this.hasIcons) {
128
- console.error("DtBadge error: decoration prop cannot be used with iconLeft or iconRight.");
118
+ console.error("DtBadge error: decoration prop cannot be used with leftIcon or rightIcon.");
129
119
  }
130
120
  }
131
121
  }
@@ -143,7 +133,6 @@ const _hoisted_3 = {
143
133
  class: "d-badge__icon-right"
144
134
  };
145
135
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
146
- const _component_dt_icon = resolveComponent("dt-icon");
147
136
  return openBlock(), createElementBlock("span", {
148
137
  class: normalizeClass([
149
138
  "d-badge",
@@ -156,11 +145,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
156
145
  "data-qa": "dt-badge"
157
146
  }, [
158
147
  $props.decoration ? (openBlock(), createElementBlock("span", _hoisted_1)) : createCommentVNode("", true),
159
- $props.iconLeft ? (openBlock(), createElementBlock("span", _hoisted_2, [
160
- createVNode(_component_dt_icon, {
161
- name: $props.iconLeft,
162
- size: "200"
163
- }, null, 8, ["name"])
148
+ $options.hasLeftIcon ? (openBlock(), createElementBlock("span", _hoisted_2, [
149
+ renderSlot(_ctx.$slots, "leftIcon", { iconSize: $props.iconSize })
164
150
  ])) : createCommentVNode("", true),
165
151
  createElementVNode("span", {
166
152
  class: normalizeClass(["d-badge__label", $props.labelClass])
@@ -169,11 +155,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
169
155
  createTextVNode(toDisplayString($props.text), 1)
170
156
  ])
171
157
  ], 2),
172
- $props.iconRight ? (openBlock(), createElementBlock("span", _hoisted_3, [
173
- createVNode(_component_dt_icon, {
174
- name: $props.iconRight,
175
- size: "200"
176
- }, null, 8, ["name"])
158
+ $options.hasRightIcon ? (openBlock(), createElementBlock("span", _hoisted_3, [
159
+ renderSlot(_ctx.$slots, "rightIcon", { iconSize: $props.iconSize })
177
160
  ])) : createCommentVNode("", true)
178
161
  ], 2);
179
162
  }
@@ -1 +1 @@
1
- {"version":3,"file":"badge.vue.js","sources":["../../../components/badge/badge.vue"],"sourcesContent":["<template>\n <span\n :class=\"[\n 'd-badge',\n BADGE_TYPE_MODIFIERS[type],\n BADGE_KIND_MODIFIERS[kind],\n BADGE_DECORATION_MODIFIERS[decoration],\n { 'd-badge--subtle': subtle },\n { 'd-badge--outlined': outlined },\n ]\"\n data-qa=\"dt-badge\"\n >\n <span\n v-if=\"decoration\"\n class=\"d-badge__decorative\"\n />\n <span\n v-if=\"iconLeft\"\n class=\"d-badge__icon-left\"\n >\n <dt-icon\n :name=\"iconLeft\"\n size=\"200\"\n />\n </span>\n <span :class=\"['d-badge__label', labelClass]\">\n <!-- @slot Slot for badge content, defaults to text prop -->\n <slot>\n {{ text }}\n </slot>\n </span>\n <span\n v-if=\"iconRight\"\n class=\"d-badge__icon-right\"\n >\n <dt-icon\n :name=\"iconRight\"\n size=\"200\"\n />\n </span>\n </span>\n</template>\n\n<script>\nimport { BADGE_TYPE_MODIFIERS, BADGE_KIND_MODIFIERS, BADGE_DECORATION_MODIFIERS } from './badge_constants';\nimport { DtIcon } from '@/components/icon';\n\n/**\n * A badge is a compact UI element that provides brief, descriptive information about an element.\n * It is terse, ideally one word.\n * @see https://dialtone.dialpad.com/components/badge.html\n */\nexport default {\n name: 'DtBadge',\n\n components: {\n DtIcon,\n },\n\n props: {\n /**\n * Icon on the left side of the badge. Supports any valid icon name from the icon catalog at\n * https://dialtone.dialpad.com/components/icon.html#icon-catalog. If type:'ai' is set, the ai icon\n * will automatically be shown here, but this can be overridden by setting this prop.\n */\n iconLeft: {\n type: String,\n default: '',\n },\n\n /**\n * Icon on the right side of the badge. Supports any valid icon name from the icon catalog at\n * https://dialtone.dialpad.com/components/icon.html#icon-catalog\n */\n iconRight: {\n type: String,\n default: '',\n },\n\n /**\n * Text for the badge content\n */\n text: {\n type: String,\n default: '',\n },\n\n /**\n * The kind of badge which determines the styling\n * @values label, count\n */\n kind: {\n type: String,\n default: 'label',\n validator: (kind) => Object.keys(BADGE_KIND_MODIFIERS).includes(kind),\n },\n\n /**\n * Color for the badge background\n * @values default, info, success, warning, critical, bulletin, ai\n */\n type: {\n type: String,\n default: 'default',\n validator: (type) => Object.keys(BADGE_TYPE_MODIFIERS).includes(type),\n },\n\n /**\n * Decoration for the badge. This can be only used with kind: label and type: default\n * with no iconLeft and iconRight\n * @values default, black-400, black-500, black-900, red-200, red-300, red-400, purple-200,\n * purple-300, purple-400, purple-500, blue-200, blue-300, blue-400, green-300, green-400,\n * green-500, gold-300, gold-400, gold-500, magenta-200, magenta-300, magenta-400\n */\n decoration: {\n type: String,\n default: undefined,\n validator: (type) => Object.keys(BADGE_DECORATION_MODIFIERS).includes(type),\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Shows a subtle appearance for the badge\n * Currently only affects the badge when type is bulletin.\n */\n subtle: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Outlines the badge with a border\n */\n outlined: {\n type: Boolean,\n default: false,\n },\n },\n\n data () {\n return {\n BADGE_TYPE_MODIFIERS,\n BADGE_KIND_MODIFIERS,\n BADGE_DECORATION_MODIFIERS,\n };\n },\n\n computed: {\n hasIcons () {\n return this.iconLeft !== '' || this.iconRight !== '';\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n deep: true,\n handler () {\n this.validateProps();\n },\n },\n },\n\n methods: {\n validateProps () {\n this.validateTypePropCombination();\n this.validateDecorationPropCombination();\n },\n\n validateTypePropCombination () {\n if (this.type === 'ai' && this.kind === 'count') {\n console.error('DtBadge error: type: \\'ai\\' with kind: \\'count\\' is an invalid combination.');\n }\n if (this.type !== 'bulletin' && this.subtle) {\n console.error('DtBadge error: subtle can only be used with type \\'bulletin\\'');\n }\n },\n\n validateDecorationPropCombination () {\n if (!this.decoration) return;\n\n if (this.kind !== 'label' || this.type !== 'default') {\n console.error('DtBadge error: decoration prop can only be used with kind: \\'label\\' and type: \\'default\\'.');\n }\n\n if (this.hasIcons) {\n console.error('DtBadge error: decoration prop cannot be used with iconLeft or iconRight.');\n }\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_normalizeClass","_openBlock","_createVNode","_createElementVNode","_renderSlot"],"mappings":";;;;AAoDA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAML,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,SAAS,OAAO,KAAK,oBAAoB,EAAE,SAAS,IAAI;AAAA,IACrE;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,SAAS,OAAO,KAAK,oBAAoB,EAAE,SAAS,IAAI;AAAA,IACrE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,SAAS,OAAO,KAAK,0BAA0B,EAAE,SAAS,IAAI;AAAA,IAC3E;AAAA;AA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MAAA,qBAAqB,OAAI,IAAA;AAAA,MAAS,MAAA,qBAAqB,OAAI,IAAA;AAAA,MAAS,MAAA,2BAA2B,OAAU,UAAA;AAAA,2BAA8B,OAAM,OAAA;AAAA,6BAAiC,OAAQ,SAAA;AAAA;IAQvN,WAAQ;AAAA;IAGA,OAAU,cADlBC,aAAAF,mBAGE,QAHF,UAGE;IAEM,OAAQ,YADhBE,aAAAF,mBAQO,QARP,YAQO;AAAA,MAJLG,YAGE,oBAAA;AAAA,QAFC,MAAM,OAAQ;AAAA,QACf,MAAK;AAAA;;IAGTC,mBAKO,QAAA;AAAA,MALA,yCAA0B,OAAU,UAAA,CAAA;AAAA;MAEzCC,WAEO,4BAFP,MAEO;AAAA,wCADF,OAAI,IAAA,GAAA,CAAA;AAAA;;IAIH,OAAS,aADjBH,aAAAF,mBAQO,QARP,YAQO;AAAA,MAJLG,YAGE,oBAAA;AAAA,QAFC,MAAM,OAAS;AAAA,QAChB,MAAK;AAAA;;;;;"}
1
+ {"version":3,"file":"badge.vue.js","sources":["../../../components/badge/badge.vue"],"sourcesContent":["<template>\n <span\n :class=\"[\n 'd-badge',\n BADGE_TYPE_MODIFIERS[type],\n BADGE_KIND_MODIFIERS[kind],\n BADGE_DECORATION_MODIFIERS[decoration],\n { 'd-badge--subtle': subtle },\n { 'd-badge--outlined': outlined },\n ]\"\n data-qa=\"dt-badge\"\n >\n <span\n v-if=\"decoration\"\n class=\"d-badge__decorative\"\n />\n <span\n v-if=\"hasLeftIcon\"\n class=\"d-badge__icon-left\"\n >\n <!-- @slot Slot for left icon, icon-size slot prop defaults to '200' -->\n <slot\n name=\"leftIcon\"\n :icon-size=\"iconSize\"\n />\n </span>\n <span :class=\"['d-badge__label', labelClass]\">\n <!-- @slot Slot for badge content, defaults to text prop -->\n <slot>\n {{ text }}\n </slot>\n </span>\n <span\n v-if=\"hasRightIcon\"\n class=\"d-badge__icon-right\"\n >\n <!-- @slot Slot for right icon, icon-size slot prop defaults to '200' -->\n <slot\n name=\"rightIcon\"\n :icon-size=\"iconSize\"\n />\n </span>\n </span>\n</template>\n\n<script>\nimport { BADGE_TYPE_MODIFIERS, BADGE_KIND_MODIFIERS, BADGE_DECORATION_MODIFIERS } from './badge_constants';\nimport { ICON_SIZE_MODIFIERS } from '@/components/icon';\nimport { hasSlotContent } from '@/common/utils/index.js';\n\n/**\n * A badge is a compact UI element that provides brief, descriptive information about an element.\n * It is terse, ideally one word.\n * @see https://dialtone.dialpad.com/components/badge.html\n */\nexport default {\n name: 'DtBadge',\n\n props: {\n /**\n * The size of the left and right icons.\n * @values 100, 200, 300, 400, 500, 600, 700, 800\n */\n iconSize: {\n type: String,\n default: '200',\n validator: (s) => Object.keys(ICON_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Text for the badge content\n */\n text: {\n type: String,\n default: '',\n },\n\n /**\n * The kind of badge which determines the styling\n * @values label, count\n */\n kind: {\n type: String,\n default: 'label',\n validator: (kind) => Object.keys(BADGE_KIND_MODIFIERS).includes(kind),\n },\n\n /**\n * Color for the badge background\n * @values default, info, success, warning, critical, bulletin, ai\n */\n type: {\n type: String,\n default: 'default',\n validator: (type) => Object.keys(BADGE_TYPE_MODIFIERS).includes(type),\n },\n\n /**\n * Decoration for the badge. This can be only used with kind: label and type: default\n * with no left and right icons\n * @values default, black-400, black-500, black-900, red-200, red-300, red-400, purple-200,\n * purple-300, purple-400, purple-500, blue-200, blue-300, blue-400, green-300, green-400,\n * green-500, gold-300, gold-400, gold-500, magenta-200, magenta-300, magenta-400\n */\n decoration: {\n type: String,\n default: undefined,\n validator: (type) => Object.keys(BADGE_DECORATION_MODIFIERS).includes(type),\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Shows a subtle appearance for the badge\n * Currently only affects the badge when type is bulletin.\n */\n subtle: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Outlines the badge with a border\n */\n outlined: {\n type: Boolean,\n default: false,\n },\n },\n\n data () {\n return {\n BADGE_TYPE_MODIFIERS,\n BADGE_KIND_MODIFIERS,\n BADGE_DECORATION_MODIFIERS,\n };\n },\n\n computed: {\n hasLeftIcon () {\n return hasSlotContent(this.$slots.leftIcon);\n },\n\n hasRightIcon () {\n return hasSlotContent(this.$slots.rightIcon);\n },\n\n hasIcons () {\n return this.hasLeftIcon || this.hasRightIcon;\n },\n },\n\n updated () {\n this.validateProps();\n },\n\n methods: {\n validateProps () {\n this.validateTypePropCombination();\n this.validateDecorationPropCombination();\n },\n\n validateTypePropCombination () {\n if (this.type === 'ai' && this.kind === 'count') {\n console.error('DtBadge error: type: \\'ai\\' with kind: \\'count\\' is an invalid combination.');\n }\n if (this.type !== 'bulletin' && this.subtle) {\n console.error('DtBadge error: subtle can only be used with type \\'bulletin\\'');\n }\n },\n\n validateDecorationPropCombination () {\n if (!this.decoration) return;\n\n if (this.kind !== 'label' || this.type !== 'default') {\n console.error('DtBadge error: decoration prop can only be used with kind: \\'label\\' and type: \\'default\\'.');\n }\n\n if (this.hasIcons) {\n console.error('DtBadge error: decoration prop cannot be used with leftIcon or rightIcon.');\n }\n },\n },\n};\n</script>\n"],"names":["_createElementBlock","_normalizeClass","_openBlock","_renderSlot","_createElementVNode"],"mappings":";;;;;AAuDA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,MAAM,OAAO,KAAK,mBAAmB,EAAE,SAAS,CAAC;AAAA,IAC9D;AAAA;AAAA;AAAA;AAAA,IAKD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,MACT,WAAW,CAAC,SAAS,OAAO,KAAK,oBAAoB,EAAE,SAAS,IAAI;AAAA,IACrE;AAAA;AA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AAAA,IACD;AAAA,IAED,oCAAqC;AACnC,UAAI,CAAC,KAAK,WAAY;AAEtB,UAAI,KAAK,SAAS,WAAW,KAAK,SAAS,WAAW;AACpD,gBAAQ,MAAM,yFAA6F;AAAA,MAC7G;AAEA,UAAI,KAAK,UAAU;AACjB,gBAAQ,MAAM,2EAA2E;AAAA,MAC3F;AAAA,IACD;AAAA,EACF;AACH;;;EA/KM,OAAM;;;;EAIN,OAAM;;;;EAgBN,OAAM;;;sBAjCVA,mBAyCO,QAAA;AAAA,IAxCJ,OAAKC,eAAA;AAAA;MAA2B,MAAA,qBAAqB,OAAI,IAAA;AAAA,MAAS,MAAA,qBAAqB,OAAI,IAAA;AAAA,MAAS,MAAA,2BAA2B,OAAU,UAAA;AAAA,2BAA8B,OAAM,OAAA;AAAA,6BAAiC,OAAQ,SAAA;AAAA;IAQvN,WAAQ;AAAA;IAGA,OAAU,cADlBC,aAAAF,mBAGE,QAHF,UAGE;IAEM,SAAW,eADnBE,aAAAF,mBASO,QATP,YASO;AAAA,MAJLG,WAGE,KAAA,QAAA,YAAA,EADC,UAAW,OAAQ,UAAA;AAAA;IAGxBC,mBAKO,QAAA;AAAA,MALA,yCAA0B,OAAU,UAAA,CAAA;AAAA;MAEzCD,WAEO,4BAFP,MAEO;AAAA,wCADF,OAAI,IAAA,GAAA,CAAA;AAAA;;IAIH,SAAY,gBADpBD,aAAAF,mBASO,QATP,YASO;AAAA,MAJLG,WAGE,KAAA,QAAA,aAAA,EADC,UAAW,OAAQ,UAAA;AAAA;;;;"}
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
+ const vue3 = require("@dialpad/dialtone-icons/vue3");
2
3
  const chip_constants = require("./chip_constants.cjs");
3
4
  const common_utils = require("../../common/utils.cjs");
4
5
  const vue = require("vue");
5
6
  const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.cjs");
6
7
  const button = require("../button/button.vue.cjs");
7
- const icon = require("../icon/icon.vue.cjs");
8
8
  const _sfc_main = {
9
9
  name: "DtChip",
10
10
  components: {
11
11
  DtButton: button,
12
- DtIcon: icon
12
+ DtIconClose: vue3.DtIconClose
13
13
  },
14
14
  props: {
15
15
  /**
@@ -163,7 +163,7 @@ const _hoisted_3 = {
163
163
  };
164
164
  const _hoisted_4 = ["id"];
165
165
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
166
- const _component_dt_icon = vue.resolveComponent("dt-icon");
166
+ const _component_dt_icon_close = vue.resolveComponent("dt-icon-close");
167
167
  const _component_dt_button = vue.resolveComponent("dt-button");
168
168
  return vue.openBlock(), vue.createElementBlock("span", _hoisted_1, [
169
169
  (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.interactive ? "button" : "span"), vue.mergeProps({
@@ -198,10 +198,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
198
198
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
199
199
  }), {
200
200
  icon: vue.withCtx(() => [
201
- vue.createVNode(_component_dt_icon, {
202
- name: "close",
203
- size: $options.closeButtonIconSize
204
- }, null, 8, ["size"])
201
+ vue.createVNode(_component_dt_icon_close, { size: $options.closeButtonIconSize }, null, 8, ["size"])
205
202
  ]),
206
203
  _: 1
207
204
  }, 16, ["class", "aria-label"])) : vue.createCommentVNode("", true)
@@ -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=\"hasSlotContent($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=\"hasSlotContent($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=\"hasSlotContent($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, hasSlotContent } 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 hasSlotContent,\n };\n },\n\n computed: {\n chipListeners () {\n return {\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","hasSlotContent","CHIP_ICON_SIZES","CHIP_CLOSE_BUTTON_SIZE_MODIFIERS","_openBlock","_createElementBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_toHandlers","_renderSlot","_createVNode"],"mappings":";;;;;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AAAA,MAC9C,cAAY,OAAS;AAAA,IACtB,GAAAC,eAAM,SAAa,aAAA,CAAA,GAAA;AAAA,2BAEnB,MAOO;AAAA,QANC,MAAc,eAAC,KAAM,OAAC,IAAI,KADlCL,IAAAA,aAAAC,IAAAA,mBAOO,QAPP,YAOO;AAAA,UADLK,eAAoB,KAAA,QAAA,MAAA;AAAA,cAGT,MAAc,eAAC,KAAM,OAAC,MAAM,KADzCN,IAAAA,aAAAC,IAAAA,mBAMO,QANP,YAMO;AAAA,UADLK,eAAsB,KAAA,QAAA,QAAA;AAAA;QAGhB,MAAc,eAAC,KAAM,OAAC,OAAO,sBADrCL,IAQO,mBAAA,QAAA;AAAA;UANJ,OAAO,OAAE,EAAA;AAAA,UACV,WAAQ;AAAA,UACP,2CAAwB,OAAY,YAAA,CAAA;AAAA;UAGrCK,eAAQ,KAAA,QAAA,SAAA;AAAA;;;;KAIH,OAAS,8BADlBJ,gBAcY,sBAdZE,IAcY,WAAA,EAAA,KAAA,EAAA,GAZF,OAAgB,kBAAA;AAAA,MACvB,OAAO,SAAsB,uBAAA;AAAA,MAC9B,WAAQ;AAAA,MACP,cAAY,OAAgB,iBAAC;AAAA,MAC7B,+CAAO,KAAK,MAAA,OAAA;AAAA;MAEF,kBACT,MAGE;AAAA,QAHFG,IAAAA,YAGE,oBAAA;AAAA,UAFA,MAAK;AAAA,UACJ,MAAM,SAAmB;AAAA;;;;;;;;"}
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=\"hasSlotContent($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=\"hasSlotContent($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=\"hasSlotContent($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/vue3';\nimport {\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n} from './chip_constants';\nimport { getUniqueString, hasSlotContent } 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 hasSlotContent,\n };\n },\n\n computed: {\n chipListeners () {\n return {\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","hasSlotContent","CHIP_ICON_SIZES","CHIP_CLOSE_BUTTON_SIZE_MODIFIERS","_openBlock","_createElementBlock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;AAAA,MACnB,WAAQ;AAAA,MACP,mBAAiB,OAAA,YAAY,YAAe,OAAE,EAAA;AAAA,MAC9C,cAAY,OAAS;AAAA,IACtB,GAAAC,eAAM,SAAa,aAAA,CAAA,GAAA;AAAA,2BAEnB,MAOO;AAAA,QANC,MAAc,eAAC,KAAM,OAAC,IAAI,KADlCL,IAAAA,aAAAC,IAAAA,mBAOO,QAPP,YAOO;AAAA,UADLK,eAAoB,KAAA,QAAA,MAAA;AAAA,cAGT,MAAc,eAAC,KAAM,OAAC,MAAM,KADzCN,IAAAA,aAAAC,IAAAA,mBAMO,QANP,YAMO;AAAA,UADLK,eAAsB,KAAA,QAAA,QAAA;AAAA;QAGhB,MAAc,eAAC,KAAM,OAAC,OAAO,sBADrCL,IAQO,mBAAA,QAAA;AAAA;UANJ,OAAO,OAAE,EAAA;AAAA,UACV,WAAQ;AAAA,UACP,2CAAwB,OAAY,YAAA,CAAA;AAAA;UAGrCK,eAAQ,KAAA,QAAA,SAAA;AAAA;;;;KAIH,OAAS,8BADlBJ,gBAaY,sBAbZE,IAaY,WAAA,EAAA,KAAA,EAAA,GAXF,OAAgB,kBAAA;AAAA,MACvB,OAAO,SAAsB,uBAAA;AAAA,MAC9B,WAAQ;AAAA,MACP,cAAY,OAAgB,iBAAC;AAAA,MAC7B,+CAAO,KAAK,MAAA,OAAA;AAAA;MAEF,kBACT,MAEE;AAAA,QAFFG,gBAEE,0BAAA,EADC,MAAM,SAAmB,oBAAA,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA;AAAA;;;;;;;"}
@@ -1,14 +1,14 @@
1
+ import { DtIconClose } from "@dialpad/dialtone-icons/vue3";
1
2
  import { CHIP_SIZE_MODIFIERS, CHIP_ICON_SIZES, CHIP_CLOSE_BUTTON_SIZE_MODIFIERS } from "./chip_constants.js";
2
3
  import { getUniqueString, hasSlotContent } from "../../common/utils.js";
3
4
  import { resolveComponent, openBlock, createElementBlock, createBlock, resolveDynamicComponent, mergeProps, toHandlers, withCtx, renderSlot, createCommentVNode, normalizeClass, createVNode } from "vue";
4
5
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
5
6
  import DtButton from "../button/button.vue.js";
6
- import DtIcon from "../icon/icon.vue.js";
7
7
  const _sfc_main = {
8
8
  name: "DtChip",
9
9
  components: {
10
10
  DtButton,
11
- DtIcon
11
+ DtIconClose
12
12
  },
13
13
  props: {
14
14
  /**
@@ -162,7 +162,7 @@ const _hoisted_3 = {
162
162
  };
163
163
  const _hoisted_4 = ["id"];
164
164
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
165
- const _component_dt_icon = resolveComponent("dt-icon");
165
+ const _component_dt_icon_close = resolveComponent("dt-icon-close");
166
166
  const _component_dt_button = resolveComponent("dt-button");
167
167
  return openBlock(), createElementBlock("span", _hoisted_1, [
168
168
  (openBlock(), createBlock(resolveDynamicComponent($props.interactive ? "button" : "span"), mergeProps({
@@ -197,10 +197,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
197
197
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("close"))
198
198
  }), {
199
199
  icon: withCtx(() => [
200
- createVNode(_component_dt_icon, {
201
- name: "close",
202
- size: $options.closeButtonIconSize
203
- }, null, 8, ["size"])
200
+ createVNode(_component_dt_icon_close, { size: $options.closeButtonIconSize }, null, 8, ["size"])
204
201
  ]),
205
202
  _: 1
206
203
  }, 16, ["class", "aria-label"])) : createCommentVNode("", true)
@@ -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=\"hasSlotContent($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=\"hasSlotContent($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=\"hasSlotContent($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, hasSlotContent } 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 hasSlotContent,\n };\n },\n\n computed: {\n chipListeners () {\n return {\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":["_openBlock","_createElementBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_toHandlers","_renderSlot","_createVNode"],"mappings":";;;;;;AAuEA,MAAK,Y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EnB,MAOO;AAAA,QANC,MAAc,eAAC,KAAM,OAAC,IAAI,KADlCL,aAAAC,mBAOO,QAPP,YAOO;AAAA,UADLK,WAAoB,KAAA,QAAA,MAAA;AAAA,cAGT,MAAc,eAAC,KAAM,OAAC,MAAM,KADzCN,aAAAC,mBAMO,QANP,YAMO;AAAA,UADLK,WAAsB,KAAA,QAAA,QAAA;AAAA;QAGhB,MAAc,eAAC,KAAM,OAAC,OAAO,kBADrCL,mBAQO,QAAA;AAAA;UANJ,OAAO,OAAE,EAAA;AAAA,UACV,WAAQ;AAAA,UACP,uCAAwB,OAAY,YAAA,CAAA;AAAA;UAGrCK,WAAQ,KAAA,QAAA,SAAA;AAAA;;;;KAIH,OAAS,0BADlBJ,YAcY,sBAdZE,WAcY,EAAA,KAAA,EAAA,GAZF,OAAgB,kBAAA;AAAA,MACvB,OAAO,SAAsB,uBAAA;AAAA,MAC9B,WAAQ;AAAA,MACP,cAAY,OAAgB,iBAAC;AAAA,MAC7B,+CAAO,KAAK,MAAA,OAAA;AAAA;MAEF,cACT,MAGE;AAAA,QAHFG,YAGE,oBAAA;AAAA,UAFA,MAAK;AAAA,UACJ,MAAM,SAAmB;AAAA;;;;;;;"}
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=\"hasSlotContent($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=\"hasSlotContent($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=\"hasSlotContent($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/vue3';\nimport {\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n} from './chip_constants';\nimport { getUniqueString, hasSlotContent } 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 hasSlotContent,\n };\n },\n\n computed: {\n chipListeners () {\n return {\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":["_openBlock","_createElementBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_toHandlers","_renderSlot","_createVNode"],"mappings":";;;;;;AAsEA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA,IAIL,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,SAAS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AM,KADzCN,aAAAC,mBAMO,QANP,YAMO;AAAA,UADLK,WAAsB,KAAA,QAAA,QAAA;AAAA;QAGhB,MAAc,eAAC,KAAM,OAAC,OAAO,kBADrCL,mBAQO,QAAA;AAAA;UANJ,OAAO,OAAE,EAAA;AAAA,UACV,WAAQ;AAAA,UACP,uCAAwB,OAAY,YAAA,CAAA;AAAA;UAGrCK,WAAQ,KAAA,QAAA,SAAA;AAAA;;;;KAIH,OAAS,0BADlBJ,YAaY,sBAbZE,WAaY,EAAA,KAAA,EAAA,GAXF,OAAgB,kBAAA;AAAA,MACvB,OAAO,SAAsB,uBAAA;AAAA,MAC9B,WAAQ;AAAA,MACP,cAAY,OAAgB,iBAAC;AAAA,MAC7B,+CAAO,KAAK,MAAA,OAAA;AAAA;MAEF,cACT,MAEE;AAAA,QAFFG,YAEE,0BAAA,EADC,MAAM,SAAmB,oBAAA,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA;AAAA;;;;;;"}
@@ -1,18 +1,19 @@
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 vue3 = require("@dialpad/dialtone-icons/vue3");
4
5
  const vue = require("vue");
5
6
  const _pluginVue_exportHelper = require("../../_virtual/_plugin-vue_export-helper.cjs");
6
7
  const button = require("../button/button.vue.cjs");
7
8
  const lazy_show = require("../lazy_show/lazy_show.vue.cjs");
8
- const icon = require("../icon/icon.vue.cjs");
9
9
  const _sfc_main = {
10
10
  name: "DtCollapsible",
11
11
  components: {
12
12
  DtButton: button,
13
13
  DtCollapsibleLazyShow: collapsible_lazy_show,
14
14
  DtLazyShow: lazy_show,
15
- DtIcon: icon
15
+ DtIconChevronDown: vue3.DtIconChevronDown,
16
+ DtIconChevronRight: vue3.DtIconChevronRight
16
17
  },
17
18
  props: {
18
19
  /**
@@ -174,7 +175,8 @@ const _sfc_main = {
174
175
  const _hoisted_1 = ["id"];
175
176
  const _hoisted_2 = ["title"];
176
177
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
177
- const _component_dt_icon = vue.resolveComponent("dt-icon");
178
+ const _component_dt_icon_chevron_down = vue.resolveComponent("dt-icon-chevron-down");
179
+ const _component_dt_icon_chevron_right = vue.resolveComponent("dt-icon-chevron-right");
178
180
  const _component_dt_button = vue.resolveComponent("dt-button");
179
181
  const _component_dt_collapsible_lazy_show = vue.resolveComponent("dt-collapsible-lazy-show");
180
182
  return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent($props.elementType), vue.mergeProps({ ref: "collapsible" }, vue.toHandlers($options.collapsibleListeners)), {
@@ -202,11 +204,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
202
204
  onClick: $options.defaultToggleOpen
203
205
  }, {
204
206
  default: vue.withCtx(() => [
205
- vue.createVNode(_component_dt_icon, {
206
- name: $data.isOpen ? "chevron-down" : "chevron-right",
207
+ $data.isOpen ? (vue.openBlock(), vue.createBlock(_component_dt_icon_chevron_down, {
208
+ key: 0,
207
209
  class: "d-collapsible__icon",
208
210
  size: "300"
209
- }, null, 8, ["name"]),
211
+ })) : (vue.openBlock(), vue.createBlock(_component_dt_icon_chevron_right, {
212
+ key: 1,
213
+ class: "d-collapsible__icon",
214
+ size: "300"
215
+ })),
210
216
  vue.createElementVNode("span", {
211
217
  class: "d-collapsible__anchor-text",
212
218
  title: $props.anchorText
@@ -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=\"collapsibleListeners\"\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=\"collapsibleListeners\"\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 { extractVueListeners, getUniqueString, hasSlotContent } 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 collapsibleListeners () {\n return extractVueListeners(this.$attrs);\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 created () {\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 && !hasSlotContent(this.$slots.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","extractVueListeners","hasSlotContent","_createBlock","_resolveDynamicComponent","_mergeProps","_toHandlers","_createElementVNode","_renderSlot","_createVNode","_normalizeStyle"],"mappings":";;;;;;;;AAoFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,UAAAA;AAAAA,IACA,uBAAAC;AAAAA,gBACAC;AAAAA,IACA,QAAAC;AAAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AAAE,eAAOC,aAAe,gBAAA;AAAA,MAAK;AAAA,IACzC;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MAC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AAA,gBACd,OAAM;AAAA,gBACN,MAAK;AAAA;cAEPF,IAAAA,mBAKO,QAAA;AAAA,gBAJL,OAAM;AAAA,gBACL,OAAO,OAAU;AAAA,qCAEf,OAAU,UAAA,GAAA,GAAA,UAAA;AAAA;;;;;MAKrBE,IAAA,YAwB2B,qCAxB3BJ,eAwB2B;AAAA,QAvBxB,IAAI,OAAE;AAAA,QACP,KAAI;AAAA,QACH,mBAAiB,MAAM,MAAA;AAAA,QACvB,mBAAiB,SAAU;AAAA,QAC3B,cAAY,OAAS;AAAA,QACrB,MAAM,MAAM;AAAA,QACZ,gBAAc,OAAkB;AAAA,QAChC,OAAO,OAAY;AAAA,QACnB,OAAK;AAAA,wBAA0B,OAAS;AAAA,uBAAuB,OAAQ;AAAA;QAIxE,WAAQ;AAAA,QACR,UAAS;AAAA,QACT,QAAA;AAAA,MACA,GAAAC,IAAA,WAAM,SAAoB,oBAAA,GAAA;AAAA,QACzB,cAAa,SAAyB;AAAA,QACtC,cAAa,SAAyB;AAAA;6BAGvC,MAEE;AAAA,UAFFE,eAEE,KAAA,QAAA,SAAA;AAAA;;;;;;;;;"}
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=\"collapsibleListeners\"\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=\"collapsibleListeners\"\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 { extractVueListeners, getUniqueString, hasSlotContent } 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/vue3';\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 collapsibleListeners () {\n return extractVueListeners(this.$attrs);\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 created () {\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 && !hasSlotContent(this.$slots.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","extractVueListeners","hasSlotContent","_createBlock","_resolveDynamicComponent","_mergeProps","_toHandlers","_createElementVNode","_renderSlot","_createVNode","_normalizeStyle"],"mappings":";;;;;;;;AAyFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV,UAAAA;AAAAA,IACA,uBAAAC;AAAAA,gBACAC;AAAAA,IACA,mBAAAC,KAAiB;AAAA,IACjB,oBAAAC,KAAkB;AAAA,EACnB;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AAAE,eAAOC,aAAe,gBAAA;AAAA,MAAK;AAAA,IACzC;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM,CAAC,QAAQ,OAAO,MAAM;AA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AAA,kCAAA;AAAA;gBAFA,OAAM;AAAA,gBACN,MAAK;AAAA;cAEPI,IAAAA,mBAKO,QAAA;AAAA,gBAJL,OAAM;AAAA,gBACL,OAAO,OAAU;AAAA,qCAEf,OAAU,UAAA,GAAA,GAAA,UAAA;AAAA;;;;;MAKrBE,IAAA,YAwB2B,qCAxB3BJ,eAwB2B;AAAA,QAvBxB,IAAI,OAAE;AAAA,QACP,KAAI;AAAA,QACH,mBAAiB,MAAM,MAAA;AAAA,QACvB,mBAAiB,SAAU;AAAA,QAC3B,cAAY,OAAS;AAAA,QACrB,MAAM,MAAM;AAAA,QACZ,gBAAc,OAAkB;AAAA,QAChC,OAAO,OAAY;AAAA,QACnB,OAAK;AAAA,wBAA0B,OAAS;AAAA,uBAAuB,OAAQ;AAAA;QAIxE,WAAQ;AAAA,QACR,UAAS;AAAA,QACT,QAAA;AAAA,MACA,GAAAC,IAAA,WAAM,SAAoB,oBAAA,GAAA;AAAA,QACzB,cAAa,SAAyB;AAAA,QACtC,cAAa,SAAyB;AAAA;6BAGvC,MAEE;AAAA,UAFFE,eAEE,KAAA,QAAA,SAAA;AAAA;;;;;;;;;"}
@@ -1,17 +1,18 @@
1
1
  import { getUniqueString, extractVueListeners, hasSlotContent } from "../../common/utils.js";
2
2
  import DtCollapsibleLazyShow from "./collapsible_lazy_show.vue.js";
3
+ import { DtIconChevronDown, DtIconChevronRight } from "@dialpad/dialtone-icons/vue3";
3
4
  import { resolveComponent, openBlock, createBlock, resolveDynamicComponent, mergeProps, toHandlers, withCtx, createElementVNode, normalizeClass, renderSlot, createVNode, normalizeStyle, toDisplayString } from "vue";
4
5
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
5
6
  import DtButton from "../button/button.vue.js";
6
7
  import DtLazyShow from "../lazy_show/lazy_show.vue.js";
7
- import DtIcon from "../icon/icon.vue.js";
8
8
  const _sfc_main = {
9
9
  name: "DtCollapsible",
10
10
  components: {
11
11
  DtButton,
12
12
  DtCollapsibleLazyShow,
13
13
  DtLazyShow,
14
- DtIcon
14
+ DtIconChevronDown,
15
+ DtIconChevronRight
15
16
  },
16
17
  props: {
17
18
  /**
@@ -173,7 +174,8 @@ const _sfc_main = {
173
174
  const _hoisted_1 = ["id"];
174
175
  const _hoisted_2 = ["title"];
175
176
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
176
- const _component_dt_icon = resolveComponent("dt-icon");
177
+ const _component_dt_icon_chevron_down = resolveComponent("dt-icon-chevron-down");
178
+ const _component_dt_icon_chevron_right = resolveComponent("dt-icon-chevron-right");
177
179
  const _component_dt_button = resolveComponent("dt-button");
178
180
  const _component_dt_collapsible_lazy_show = resolveComponent("dt-collapsible-lazy-show");
179
181
  return openBlock(), createBlock(resolveDynamicComponent($props.elementType), mergeProps({ ref: "collapsible" }, toHandlers($options.collapsibleListeners)), {
@@ -201,11 +203,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
201
203
  onClick: $options.defaultToggleOpen
202
204
  }, {
203
205
  default: withCtx(() => [
204
- createVNode(_component_dt_icon, {
205
- name: $data.isOpen ? "chevron-down" : "chevron-right",
206
+ $data.isOpen ? (openBlock(), createBlock(_component_dt_icon_chevron_down, {
207
+ key: 0,
206
208
  class: "d-collapsible__icon",
207
209
  size: "300"
208
- }, null, 8, ["name"]),
210
+ })) : (openBlock(), createBlock(_component_dt_icon_chevron_right, {
211
+ key: 1,
212
+ class: "d-collapsible__icon",
213
+ size: "300"
214
+ })),
209
215
  createElementVNode("span", {
210
216
  class: "d-collapsible__anchor-text",
211
217
  title: $props.anchorText
@@ -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=\"collapsibleListeners\"\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=\"collapsibleListeners\"\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 { extractVueListeners, getUniqueString, hasSlotContent } 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 collapsibleListeners () {\n return extractVueListeners(this.$attrs);\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 created () {\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 && !hasSlotContent(this.$slots.anchor)) {\n console.error('anchor text and anchor slot content cannot both be falsy');\n }\n },\n },\n};\n</script>\n"],"names":["_createBlock","_resolveDynamicComponent","_mergeProps","_toHandlers","_createElementVNode","_renderSlot","_createVNode","_normalizeStyle"],"mappings":";;;;;;;AAoFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AAAE,eAAO,gBAAe;AAAA,MAAK;AAAA,IACzC;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX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AAM;AAAA,gBACL,OAAO,OAAU;AAAA,iCAEf,OAAU,UAAA,GAAA,GAAA,UAAA;AAAA;;;;;MAKrBE,YAwB2B,qCAxB3BJ,WAwB2B;AAAA,QAvBxB,IAAI,OAAE;AAAA,QACP,KAAI;AAAA,QACH,mBAAiB,MAAM,MAAA;AAAA,QACvB,mBAAiB,SAAU;AAAA,QAC3B,cAAY,OAAS;AAAA,QACrB,MAAM,MAAM;AAAA,QACZ,gBAAc,OAAkB;AAAA,QAChC,OAAO,OAAY;AAAA,QACnB,OAAK;AAAA,wBAA0B,OAAS;AAAA,uBAAuB,OAAQ;AAAA;QAIxE,WAAQ;AAAA,QACR,UAAS;AAAA,QACT,QAAA;AAAA,MACA,GAAAC,WAAM,SAAoB,oBAAA,GAAA;AAAA,QACzB,cAAa,SAAyB;AAAA,QACtC,cAAa,SAAyB;AAAA;yBAGvC,MAEE;AAAA,UAFFE,WAEE,KAAA,QAAA,SAAA;AAAA;;;;;;;;"}
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=\"collapsibleListeners\"\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=\"collapsibleListeners\"\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 { extractVueListeners, getUniqueString, hasSlotContent } 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/vue3';\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 collapsibleListeners () {\n return extractVueListeners(this.$attrs);\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 created () {\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 && !hasSlotContent(this.$slots.anchor)) {\n console.error('anchor text and anchor slot content cannot both be falsy');\n }\n },\n },\n};\n</script>\n"],"names":["_createBlock","_resolveDynamicComponent","_mergeProps","_toHandlers","_createElementVNode","_renderSlot","_createVNode","_normalizeStyle"],"mappings":";;;;;;;AAyFA,MAAK,YAAU;AAAA,EACb,MAAM;AAAA,EAEN,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKL,YAAY;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,IAAI;AAAA,MACF,MAAM;AAAA,MACN,UAAW;AAAE,eAAO,gBAAe;AAAA,MAAK;AAAA,IACzC;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,oBAAoB;AAAA,MAClB,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,aAAa;AAAA,MACX,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA,IAKD,cAAc;AAAA,MACZ,MAAM,CAAC,QAAQ,OAAO,MAAM;AAAA,MAC5B,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,UAAU;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA;AAAA;AAAA;AAAA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