@dialpad/dialtone 9.73.0-beta.1 → 9.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (657) hide show
  1. package/dist/css/dialtone-default-theme.css +14545 -13955
  2. package/dist/css/dialtone-default-theme.min.css +1 -1
  3. package/dist/css/dialtone.css +263 -24
  4. package/dist/css/dialtone.min.css +1 -1
  5. package/dist/css/tokens/tokens-base-dark.css +898 -895
  6. package/dist/css/tokens/tokens-base-light.css +673 -670
  7. package/dist/css/tokens/tokens-dp-dark.css +1831 -1831
  8. package/dist/css/tokens/tokens-dp-light.css +1832 -1832
  9. package/dist/css/tokens/tokens-expressive-dark.css +1793 -1793
  10. package/dist/css/tokens/tokens-expressive-light.css +1793 -1793
  11. package/dist/css/tokens/tokens-expressive-sm-dark.css +1793 -1793
  12. package/dist/css/tokens/tokens-expressive-sm-light.css +1793 -1793
  13. package/dist/css/tokens/tokens-tmo-dark.css +1787 -1787
  14. package/dist/css/tokens/tokens-tmo-light.css +1787 -1787
  15. package/dist/tokens/css/tokens-base-dark.css +898 -895
  16. package/dist/tokens/css/tokens-base-light.css +673 -670
  17. package/dist/tokens/css/tokens-dp-dark.css +1831 -1831
  18. package/dist/tokens/css/tokens-dp-light.css +1832 -1832
  19. package/dist/tokens/css/tokens-expressive-dark.css +1793 -1793
  20. package/dist/tokens/css/tokens-expressive-light.css +1793 -1793
  21. package/dist/tokens/css/tokens-expressive-sm-dark.css +1793 -1793
  22. package/dist/tokens/css/tokens-expressive-sm-light.css +1793 -1793
  23. package/dist/tokens/css/tokens-tmo-dark.css +1787 -1787
  24. package/dist/tokens/css/tokens-tmo-light.css +1787 -1787
  25. package/dist/tokens/doc.json +44630 -44458
  26. package/dist/tokens/less/tokens-base-dark.less +20 -17
  27. package/dist/tokens/less/tokens-base-light.less +20 -17
  28. package/dist/tokens/less/tokens-dp-dark.less +59 -59
  29. package/dist/tokens/less/tokens-dp-light.less +59 -59
  30. package/dist/tokens/less/tokens-expressive-dark.less +55 -55
  31. package/dist/tokens/less/tokens-expressive-light.less +55 -55
  32. package/dist/tokens/less/tokens-expressive-sm-dark.less +55 -55
  33. package/dist/tokens/less/tokens-expressive-sm-light.less +55 -55
  34. package/dist/tokens/less/tokens-tmo-dark.less +49 -49
  35. package/dist/tokens/less/tokens-tmo-light.less +49 -49
  36. package/dist/tokens/themes/chunks/tokens-base-dark-D3v4_NMT.js +4 -0
  37. package/dist/tokens/themes/chunks/tokens-base-dark-SlAAMLw5.js +1 -0
  38. package/dist/tokens/themes/chunks/tokens-base-light-BUcyLIIS.js +4 -0
  39. package/dist/tokens/themes/chunks/tokens-base-light-Dx0sRL2j.js +1 -0
  40. package/dist/tokens/themes/dp-dark.cjs +1 -1
  41. package/dist/tokens/themes/dp-dark.js +4 -4
  42. package/dist/tokens/themes/dp-light.cjs +1 -1
  43. package/dist/tokens/themes/dp-light.js +4 -4
  44. package/dist/tokens/themes/expressive-dark.cjs +1 -1
  45. package/dist/tokens/themes/expressive-dark.js +2 -2
  46. package/dist/tokens/themes/expressive-light.cjs +1 -1
  47. package/dist/tokens/themes/expressive-light.js +4 -4
  48. package/dist/tokens/themes/expressive-sm-dark.cjs +1 -1
  49. package/dist/tokens/themes/expressive-sm-dark.js +2 -2
  50. package/dist/tokens/themes/expressive-sm-light.cjs +1 -1
  51. package/dist/tokens/themes/expressive-sm-light.js +4 -4
  52. package/dist/tokens/themes/tmo-dark.cjs +1 -1
  53. package/dist/tokens/themes/tmo-dark.js +4 -4
  54. package/dist/tokens/themes/tmo-light.cjs +1 -1
  55. package/dist/tokens/themes/tmo-light.js +4 -4
  56. package/dist/tokens/tokens-base-dark.json +20 -17
  57. package/dist/tokens/tokens-base-light.json +20 -17
  58. package/dist/tokens/tokens-dp-dark.json +59 -59
  59. package/dist/tokens/tokens-dp-light.json +59 -59
  60. package/dist/tokens/tokens-expressive-dark.json +55 -55
  61. package/dist/tokens/tokens-expressive-light.json +55 -55
  62. package/dist/tokens/tokens-expressive-sm-dark.json +55 -55
  63. package/dist/tokens/tokens-expressive-sm-light.json +55 -55
  64. package/dist/tokens/tokens-tmo-dark.json +49 -49
  65. package/dist/tokens/tokens-tmo-light.json +49 -49
  66. package/dist/vue2/common/sr_only_close_button.vue.cjs +3 -3
  67. package/dist/vue2/common/sr_only_close_button.vue.cjs.map +1 -1
  68. package/dist/vue2/common/sr_only_close_button.vue.js +3 -3
  69. package/dist/vue2/common/sr_only_close_button.vue.js.map +1 -1
  70. package/dist/vue2/component-documentation.json +1 -1
  71. package/dist/vue2/components/badge/badge.vue.cjs +34 -13
  72. package/dist/vue2/components/badge/badge.vue.cjs.map +1 -1
  73. package/dist/vue2/components/badge/badge.vue.js +34 -13
  74. package/dist/vue2/components/badge/badge.vue.js.map +1 -1
  75. package/dist/vue2/components/chip/chip.vue.cjs +4 -4
  76. package/dist/vue2/components/chip/chip.vue.cjs.map +1 -1
  77. package/dist/vue2/components/chip/chip.vue.js +4 -4
  78. package/dist/vue2/components/chip/chip.vue.js.map +1 -1
  79. package/dist/vue2/components/collapsible/collapsible.vue.cjs +3 -4
  80. package/dist/vue2/components/collapsible/collapsible.vue.cjs.map +1 -1
  81. package/dist/vue2/components/collapsible/collapsible.vue.js +3 -4
  82. package/dist/vue2/components/collapsible/collapsible.vue.js.map +1 -1
  83. package/dist/vue2/components/datepicker/modules/month-year-picker.vue.cjs +6 -14
  84. package/dist/vue2/components/datepicker/modules/month-year-picker.vue.cjs.map +1 -1
  85. package/dist/vue2/components/datepicker/modules/month-year-picker.vue.js +6 -14
  86. package/dist/vue2/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
  87. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs +5 -6
  88. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
  89. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js +5 -6
  90. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
  91. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs +14 -23
  92. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
  93. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js +14 -23
  94. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
  95. package/dist/vue2/components/empty_state/empty_state.vue.cjs +80 -20
  96. package/dist/vue2/components/empty_state/empty_state.vue.cjs.map +1 -1
  97. package/dist/vue2/components/empty_state/empty_state.vue.js +81 -21
  98. package/dist/vue2/components/empty_state/empty_state.vue.js.map +1 -1
  99. package/dist/vue2/components/empty_state/empty_state_constants.cjs +0 -18
  100. package/dist/vue2/components/empty_state/empty_state_constants.cjs.map +1 -1
  101. package/dist/vue2/components/empty_state/empty_state_constants.js +0 -18
  102. package/dist/vue2/components/empty_state/empty_state_constants.js.map +1 -1
  103. package/dist/vue2/components/illustration/illustration.vue.cjs +2 -2
  104. package/dist/vue2/components/illustration/illustration.vue.js +2 -2
  105. package/dist/vue2/components/image_viewer/image_viewer.vue.cjs +4 -4
  106. package/dist/vue2/components/image_viewer/image_viewer.vue.cjs.map +1 -1
  107. package/dist/vue2/components/image_viewer/image_viewer.vue.js +4 -4
  108. package/dist/vue2/components/image_viewer/image_viewer.vue.js.map +1 -1
  109. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +9 -24
  110. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.cjs.map +1 -1
  111. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.js +7 -22
  112. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.js.map +1 -1
  113. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.cjs +14 -8
  114. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.cjs.map +1 -1
  115. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.js +15 -9
  116. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.js.map +1 -1
  117. package/dist/vue2/components/list_item/list_item.vue.cjs +3 -3
  118. package/dist/vue2/components/list_item/list_item.vue.cjs.map +1 -1
  119. package/dist/vue2/components/list_item/list_item.vue.js +3 -3
  120. package/dist/vue2/components/list_item/list_item.vue.js.map +1 -1
  121. package/dist/vue2/components/modal/modal.vue.cjs +4 -4
  122. package/dist/vue2/components/modal/modal.vue.cjs.map +1 -1
  123. package/dist/vue2/components/modal/modal.vue.js +4 -4
  124. package/dist/vue2/components/modal/modal.vue.js.map +1 -1
  125. package/dist/vue2/components/notice/notice_action.vue.cjs +4 -4
  126. package/dist/vue2/components/notice/notice_action.vue.cjs.map +1 -1
  127. package/dist/vue2/components/notice/notice_action.vue.js +4 -4
  128. package/dist/vue2/components/notice/notice_action.vue.js.map +1 -1
  129. package/dist/vue2/components/notice/notice_icon.vue.cjs +8 -12
  130. package/dist/vue2/components/notice/notice_icon.vue.cjs.map +1 -1
  131. package/dist/vue2/components/notice/notice_icon.vue.js +8 -12
  132. package/dist/vue2/components/notice/notice_icon.vue.js.map +1 -1
  133. package/dist/vue2/components/pagination/pagination.vue.cjs +5 -11
  134. package/dist/vue2/components/pagination/pagination.vue.cjs.map +1 -1
  135. package/dist/vue2/components/pagination/pagination.vue.js +5 -11
  136. package/dist/vue2/components/pagination/pagination.vue.js.map +1 -1
  137. package/dist/vue2/components/popover/popover_header_footer.vue.cjs +4 -4
  138. package/dist/vue2/components/popover/popover_header_footer.vue.cjs.map +1 -1
  139. package/dist/vue2/components/popover/popover_header_footer.vue.js +4 -4
  140. package/dist/vue2/components/popover/popover_header_footer.vue.js.map +1 -1
  141. package/dist/vue2/dialtone-vue.cjs +3 -0
  142. package/dist/vue2/dialtone-vue.cjs.map +1 -1
  143. package/dist/vue2/dialtone-vue.js +5 -2
  144. package/dist/vue2/directives/scrollbar/scrollbar.cjs.map +1 -1
  145. package/dist/vue2/directives/scrollbar/scrollbar.js.map +1 -1
  146. package/dist/vue2/lib/general-row.cjs +1 -0
  147. package/dist/vue2/lib/general-row.cjs.map +1 -1
  148. package/dist/vue2/lib/general-row.js +2 -1
  149. package/dist/vue2/lib/keyboard-shortcut.cjs +2 -0
  150. package/dist/vue2/lib/keyboard-shortcut.cjs.map +1 -1
  151. package/dist/vue2/lib/keyboard-shortcut.js +4 -2
  152. package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +5 -5
  153. package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
  154. package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +5 -5
  155. package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
  156. package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.cjs +5 -25
  157. package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.cjs.map +1 -1
  158. package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.js +6 -26
  159. package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.js.map +1 -1
  160. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +19 -6
  161. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
  162. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +19 -6
  163. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
  164. package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +4 -5
  165. package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
  166. package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +4 -5
  167. package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
  168. package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +3 -3
  169. package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
  170. package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +3 -3
  171. package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
  172. package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs +22 -35
  173. package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
  174. package/dist/vue2/recipes/conversation_view/editor/editor.vue.js +22 -35
  175. package/dist/vue2/recipes/conversation_view/editor/editor.vue.js.map +1 -1
  176. package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs +3 -3
  177. package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs.map +1 -1
  178. package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js +3 -3
  179. package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js.map +1 -1
  180. package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +6 -6
  181. package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
  182. package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.js +6 -6
  183. package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
  184. package/dist/vue2/recipes/leftbar/general_row/general_row.vue.cjs +7 -8
  185. package/dist/vue2/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
  186. package/dist/vue2/recipes/leftbar/general_row/general_row.vue.js +7 -8
  187. package/dist/vue2/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
  188. package/dist/vue2/recipes/leftbar/general_row/general_row_constants.cjs +17 -0
  189. package/dist/vue2/recipes/leftbar/general_row/general_row_constants.cjs.map +1 -1
  190. package/dist/vue2/recipes/leftbar/general_row/general_row_constants.js +17 -0
  191. package/dist/vue2/recipes/leftbar/general_row/general_row_constants.js.map +1 -1
  192. package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +4 -36
  193. package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
  194. package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +5 -37
  195. package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
  196. package/dist/vue2/recipes/leftbar/group_row/group_row.vue.cjs +3 -3
  197. package/dist/vue2/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
  198. package/dist/vue2/recipes/leftbar/group_row/group_row.vue.js +3 -3
  199. package/dist/vue2/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
  200. package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.cjs +3 -4
  201. package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.cjs.map +1 -1
  202. package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.js +3 -4
  203. package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.js.map +1 -1
  204. package/dist/vue2/style.css +70 -70
  205. package/dist/vue2/types/common/sr_only_close_button.vue.d.ts +1 -1
  206. package/dist/vue2/types/components/avatar/avatar.vue.d.ts +1 -1
  207. package/dist/vue2/types/components/badge/badge.vue.d.ts +46 -17
  208. package/dist/vue2/types/components/badge/badge.vue.d.ts.map +1 -1
  209. package/dist/vue2/types/components/banner/banner.vue.d.ts +1 -1
  210. package/dist/vue2/types/components/breadcrumbs/breadcrumb_item.vue.d.ts +1 -1
  211. package/dist/vue2/types/components/breadcrumbs/breadcrumbs.vue.d.ts +1 -1
  212. package/dist/vue2/types/components/button/button.vue.d.ts +1 -1
  213. package/dist/vue2/types/components/button_group/button_group.vue.d.ts +1 -1
  214. package/dist/vue2/types/components/button_group/buttons_decorator.vue.d.ts +1 -1
  215. package/dist/vue2/types/components/card/card.vue.d.ts +1 -1
  216. package/dist/vue2/types/components/checkbox/checkbox.vue.d.ts +1 -1
  217. package/dist/vue2/types/components/checkbox_group/checkbox_group.vue.d.ts +3 -3
  218. package/dist/vue2/types/components/checkbox_group/checkboxes_decorator.vue.d.ts +1 -1
  219. package/dist/vue2/types/components/chip/chip.vue.d.ts +1 -1
  220. package/dist/vue2/types/components/codeblock/codeblock.vue.d.ts +1 -1
  221. package/dist/vue2/types/components/collapsible/collapsible.vue.d.ts +1 -1
  222. package/dist/vue2/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
  223. package/dist/vue2/types/components/collapsible/collapsible_lazy_show.vue.d.ts +1 -1
  224. package/dist/vue2/types/components/combobox/combobox.vue.d.ts +1 -1
  225. package/dist/vue2/types/components/combobox/combobox_empty-list.vue.d.ts +1 -1
  226. package/dist/vue2/types/components/combobox/combobox_loading-list.vue.d.ts +1 -1
  227. package/dist/vue2/types/components/datepicker/datepicker.vue.d.ts +1 -1
  228. package/dist/vue2/types/components/datepicker/modules/calendar.vue.d.ts +1 -1
  229. package/dist/vue2/types/components/datepicker/modules/month-year-picker.vue.d.ts +1 -1
  230. package/dist/vue2/types/components/description_list/description_list.vue.d.ts +1 -1
  231. package/dist/vue2/types/components/dropdown/dropdown.vue.d.ts +2 -2
  232. package/dist/vue2/types/components/dropdown/dropdown_list.vue.d.ts +1 -1
  233. package/dist/vue2/types/components/dropdown/dropdown_separator.vue.d.ts +1 -1
  234. package/dist/vue2/types/components/emoji/emoji.vue.d.ts +1 -1
  235. package/dist/vue2/types/components/emoji_picker/emoji_picker.vue.d.ts +1 -1
  236. package/dist/vue2/types/components/emoji_picker/modules/emoji_description.vue.d.ts +1 -1
  237. package/dist/vue2/types/components/emoji_picker/modules/emoji_search.vue.d.ts +1 -1
  238. package/dist/vue2/types/components/emoji_picker/modules/emoji_selector.vue.d.ts +1 -1
  239. package/dist/vue2/types/components/emoji_picker/modules/emoji_skin_selector.vue.d.ts +1 -1
  240. package/dist/vue2/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts +67 -1
  241. package/dist/vue2/types/components/emoji_text_wrapper/emoji_text_wrapper.vue.d.ts +1 -1
  242. package/dist/vue2/types/components/empty_state/empty_state.vue.d.ts +1 -1
  243. package/dist/vue2/types/components/empty_state/empty_state_constants.d.ts +0 -27
  244. package/dist/vue2/types/components/hovercard/hovercard.vue.d.ts +1 -1
  245. package/dist/vue2/types/components/icon/icon.vue.d.ts +1 -1
  246. package/dist/vue2/types/components/illustration/illustration.vue.d.ts +1 -1
  247. package/dist/vue2/types/components/image_viewer/image_viewer.vue.d.ts +1 -1
  248. package/dist/vue2/types/components/input/input.vue.d.ts +1 -1
  249. package/dist/vue2/types/components/input_group/decorators/input.vue.d.ts +1 -1
  250. package/dist/vue2/types/components/input_group/decorators/inputs.vue.d.ts +1 -1
  251. package/dist/vue2/types/components/input_group/input_group.vue.d.ts +2 -2
  252. package/dist/vue2/types/components/item_layout/item_layout.vue.d.ts +1 -1
  253. package/dist/vue2/types/components/keyboard_shortcut/index.d.ts +1 -1
  254. package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +16 -8
  255. package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
  256. package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts +11 -0
  257. package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts.map +1 -1
  258. package/dist/vue2/types/components/lazy_show/lazy_show.vue.d.ts +1 -1
  259. package/dist/vue2/types/components/link/link.vue.d.ts +1 -1
  260. package/dist/vue2/types/components/list_item/list_item.vue.d.ts +2 -2
  261. package/dist/vue2/types/components/list_item_group/list_item_group.vue.d.ts +1 -1
  262. package/dist/vue2/types/components/modal/modal.vue.d.ts +7 -5
  263. package/dist/vue2/types/components/modal/modal.vue.d.ts.map +1 -1
  264. package/dist/vue2/types/components/notice/notice.vue.d.ts +1 -1
  265. package/dist/vue2/types/components/notice/notice_action.vue.d.ts +5 -6
  266. package/dist/vue2/types/components/notice/notice_action.vue.d.ts.map +1 -1
  267. package/dist/vue2/types/components/notice/notice_content.vue.d.ts +1 -1
  268. package/dist/vue2/types/components/notice/notice_icon.vue.d.ts +2 -2
  269. package/dist/vue2/types/components/notice/notice_icon.vue.d.ts.map +1 -1
  270. package/dist/vue2/types/components/pagination/pagination.vue.d.ts +1 -1
  271. package/dist/vue2/types/components/pagination/pagination.vue.d.ts.map +1 -1
  272. package/dist/vue2/types/components/popover/popover.vue.d.ts +1 -1
  273. package/dist/vue2/types/components/popover/popover_header_footer.vue.d.ts +1 -1
  274. package/dist/vue2/types/components/presence/presence.vue.d.ts +1 -1
  275. package/dist/vue2/types/components/radio/radio.vue.d.ts +1 -1
  276. package/dist/vue2/types/components/radio_group/radio_group.vue.d.ts +3 -3
  277. package/dist/vue2/types/components/radio_group/radios_decorator.vue.d.ts +1 -1
  278. package/dist/vue2/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +17 -17
  279. package/dist/vue2/types/components/rich_text_editor/extensions/channels/ChannelSuggestion.vue.d.ts +1 -1
  280. package/dist/vue2/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +17 -17
  281. package/dist/vue2/types/components/rich_text_editor/extensions/emoji/EmojiSuggestion.vue.d.ts +1 -1
  282. package/dist/vue2/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +17 -17
  283. package/dist/vue2/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts +1 -1
  284. package/dist/vue2/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts +17 -17
  285. package/dist/vue2/types/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.d.ts +1 -1
  286. package/dist/vue2/types/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts +1 -1
  287. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts +1 -1
  288. package/dist/vue2/types/components/root_layout/root_layout.vue.d.ts +1 -1
  289. package/dist/vue2/types/components/select_menu/select_menu.vue.d.ts +1 -1
  290. package/dist/vue2/types/components/skeleton/skeleton-list-item.vue.d.ts +1 -1
  291. package/dist/vue2/types/components/skeleton/skeleton-paragraph.vue.d.ts +1 -1
  292. package/dist/vue2/types/components/skeleton/skeleton-shape.vue.d.ts +1 -1
  293. package/dist/vue2/types/components/skeleton/skeleton-text.vue.d.ts +1 -1
  294. package/dist/vue2/types/components/skeleton/skeleton.vue.d.ts +1 -1
  295. package/dist/vue2/types/components/split_button/split_button-alpha.vue.d.ts +1 -1
  296. package/dist/vue2/types/components/split_button/split_button-omega.vue.d.ts +1 -1
  297. package/dist/vue2/types/components/split_button/split_button.vue.d.ts +2 -2
  298. package/dist/vue2/types/components/stack/stack.vue.d.ts +1 -1
  299. package/dist/vue2/types/components/tabs/tab.vue.d.ts +1 -1
  300. package/dist/vue2/types/components/tabs/tab_group.vue.d.ts +1 -1
  301. package/dist/vue2/types/components/tabs/tab_panel.vue.d.ts +1 -1
  302. package/dist/vue2/types/components/toast/toast.vue.d.ts +1 -1
  303. package/dist/vue2/types/components/toggle/toggle.vue.d.ts +1 -1
  304. package/dist/vue2/types/components/tooltip/tooltip.vue.d.ts +2 -2
  305. package/dist/vue2/types/components/validation_messages/validation_messages.vue.d.ts +1 -1
  306. package/dist/vue2/types/directives/scrollbar/scrollbar.d.ts.map +1 -1
  307. package/dist/vue2/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
  308. package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
  309. package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +1 -1
  310. package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  311. package/dist/vue2/types/recipes/chips/grouped_chip/grouped_chip.vue.d.ts +1 -1
  312. package/dist/vue2/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
  313. package/dist/vue2/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +1 -1
  314. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +1 -1
  315. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  316. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +1 -1
  317. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +1 -1
  318. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +9 -9
  319. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  320. package/dist/vue2/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +1 -1
  321. package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -1
  322. package/dist/vue2/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts +1 -1
  323. package/dist/vue2/types/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.d.ts +17 -17
  324. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
  325. package/dist/vue2/types/recipes/conversation_view/time_pill/time_pill.vue.d.ts +1 -1
  326. package/dist/vue2/types/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts +1 -1
  327. package/dist/vue2/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +1 -1
  328. package/dist/vue2/types/recipes/leftbar/callbox/callbox.vue.d.ts +1 -1
  329. package/dist/vue2/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +1 -1
  330. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -1
  331. package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
  332. package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  333. package/dist/vue2/types/recipes/leftbar/general_row/general_row_constants.d.ts +6 -0
  334. package/dist/vue2/types/recipes/leftbar/general_row/general_row_constants.d.ts.map +1 -1
  335. package/dist/vue2/types/recipes/leftbar/general_row/index.d.ts +1 -1
  336. package/dist/vue2/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +2 -2
  337. package/dist/vue2/types/recipes/leftbar/group_row/group_row.vue.d.ts +1 -1
  338. package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +1 -1
  339. package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  340. package/dist/vue2/types/recipes/notices/top_banner_info/top_banner_info.vue.d.ts +1 -1
  341. package/dist/vue3/common/sr_only_close_button.vue.cjs +4 -4
  342. package/dist/vue3/common/sr_only_close_button.vue.cjs.map +1 -1
  343. package/dist/vue3/common/sr_only_close_button.vue.js +4 -4
  344. package/dist/vue3/common/sr_only_close_button.vue.js.map +1 -1
  345. package/dist/vue3/common/storybook_utils.cjs +8 -0
  346. package/dist/vue3/common/storybook_utils.cjs.map +1 -0
  347. package/dist/vue3/common/storybook_utils.js +8 -0
  348. package/dist/vue3/common/storybook_utils.js.map +1 -0
  349. package/dist/vue3/component-documentation.json +1 -1
  350. package/dist/vue3/components/avatar/avatar.vue.cjs +41 -30
  351. package/dist/vue3/components/avatar/avatar.vue.cjs.map +1 -1
  352. package/dist/vue3/components/avatar/avatar.vue.js +43 -32
  353. package/dist/vue3/components/avatar/avatar.vue.js.map +1 -1
  354. package/dist/vue3/components/badge/badge.vue.cjs +39 -22
  355. package/dist/vue3/components/badge/badge.vue.cjs.map +1 -1
  356. package/dist/vue3/components/badge/badge.vue.js +40 -23
  357. package/dist/vue3/components/badge/badge.vue.js.map +1 -1
  358. package/dist/vue3/components/checkbox/checkbox.vue.cjs +1 -1
  359. package/dist/vue3/components/checkbox/checkbox.vue.js +1 -1
  360. package/dist/vue3/components/chip/chip.vue.cjs +7 -4
  361. package/dist/vue3/components/chip/chip.vue.cjs.map +1 -1
  362. package/dist/vue3/components/chip/chip.vue.js +7 -4
  363. package/dist/vue3/components/chip/chip.vue.js.map +1 -1
  364. package/dist/vue3/components/collapsible/collapsible.vue.cjs +6 -12
  365. package/dist/vue3/components/collapsible/collapsible.vue.cjs.map +1 -1
  366. package/dist/vue3/components/collapsible/collapsible.vue.js +6 -12
  367. package/dist/vue3/components/collapsible/collapsible.vue.js.map +1 -1
  368. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs +17 -5
  369. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs.map +1 -1
  370. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js +17 -5
  371. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
  372. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs +9 -4
  373. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
  374. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js +10 -5
  375. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
  376. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs +14 -11
  377. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
  378. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js +15 -12
  379. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
  380. package/dist/vue3/components/empty_state/empty_state.vue.cjs +92 -19
  381. package/dist/vue3/components/empty_state/empty_state.vue.cjs.map +1 -1
  382. package/dist/vue3/components/empty_state/empty_state.vue.js +93 -20
  383. package/dist/vue3/components/empty_state/empty_state.vue.js.map +1 -1
  384. package/dist/vue3/components/empty_state/empty_state_constants.cjs +0 -18
  385. package/dist/vue3/components/empty_state/empty_state_constants.cjs.map +1 -1
  386. package/dist/vue3/components/empty_state/empty_state_constants.js +0 -18
  387. package/dist/vue3/components/empty_state/empty_state_constants.js.map +1 -1
  388. package/dist/vue3/components/illustration/illustration.vue.cjs +2 -2
  389. package/dist/vue3/components/illustration/illustration.vue.js +2 -2
  390. package/dist/vue3/components/image_viewer/image_viewer.vue.cjs +5 -4
  391. package/dist/vue3/components/image_viewer/image_viewer.vue.cjs.map +1 -1
  392. package/dist/vue3/components/image_viewer/image_viewer.vue.js +5 -4
  393. package/dist/vue3/components/image_viewer/image_viewer.vue.js.map +1 -1
  394. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +11 -24
  395. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.cjs.map +1 -1
  396. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.js +10 -23
  397. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.js.map +1 -1
  398. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.cjs +14 -8
  399. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.cjs.map +1 -1
  400. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.js +15 -9
  401. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.js.map +1 -1
  402. package/dist/vue3/components/list_item/list_item.vue.cjs +5 -4
  403. package/dist/vue3/components/list_item/list_item.vue.cjs.map +1 -1
  404. package/dist/vue3/components/list_item/list_item.vue.js +5 -4
  405. package/dist/vue3/components/list_item/list_item.vue.js.map +1 -1
  406. package/dist/vue3/components/modal/modal.vue.cjs +7 -4
  407. package/dist/vue3/components/modal/modal.vue.cjs.map +1 -1
  408. package/dist/vue3/components/modal/modal.vue.js +7 -4
  409. package/dist/vue3/components/modal/modal.vue.js.map +1 -1
  410. package/dist/vue3/components/notice/notice_action.vue.cjs +7 -4
  411. package/dist/vue3/components/notice/notice_action.vue.cjs.map +1 -1
  412. package/dist/vue3/components/notice/notice_action.vue.js +7 -4
  413. package/dist/vue3/components/notice/notice_action.vue.js.map +1 -1
  414. package/dist/vue3/components/notice/notice_icon.vue.cjs +12 -12
  415. package/dist/vue3/components/notice/notice_icon.vue.cjs.map +1 -1
  416. package/dist/vue3/components/notice/notice_icon.vue.js +13 -13
  417. package/dist/vue3/components/notice/notice_icon.vue.js.map +1 -1
  418. package/dist/vue3/components/pagination/pagination.vue.cjs +15 -10
  419. package/dist/vue3/components/pagination/pagination.vue.cjs.map +1 -1
  420. package/dist/vue3/components/pagination/pagination.vue.js +15 -10
  421. package/dist/vue3/components/pagination/pagination.vue.js.map +1 -1
  422. package/dist/vue3/components/popover/popover_header_footer.vue.cjs +7 -4
  423. package/dist/vue3/components/popover/popover_header_footer.vue.cjs.map +1 -1
  424. package/dist/vue3/components/popover/popover_header_footer.vue.js +7 -4
  425. package/dist/vue3/components/popover/popover_header_footer.vue.js.map +1 -1
  426. package/dist/vue3/dialtone-vue.cjs +3 -0
  427. package/dist/vue3/dialtone-vue.cjs.map +1 -1
  428. package/dist/vue3/dialtone-vue.js +5 -2
  429. package/dist/vue3/directives/scrollbar/scrollbar.cjs.map +1 -1
  430. package/dist/vue3/directives/scrollbar/scrollbar.js.map +1 -1
  431. package/dist/vue3/lib/general-row.cjs +1 -0
  432. package/dist/vue3/lib/general-row.cjs.map +1 -1
  433. package/dist/vue3/lib/general-row.js +2 -1
  434. package/dist/vue3/lib/keyboard-shortcut.cjs +2 -0
  435. package/dist/vue3/lib/keyboard-shortcut.cjs.map +1 -1
  436. package/dist/vue3/lib/keyboard-shortcut.js +4 -2
  437. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +5 -4
  438. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
  439. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +5 -4
  440. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
  441. package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.cjs +11 -27
  442. package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.cjs.map +1 -1
  443. package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.js +13 -29
  444. package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.js.map +1 -1
  445. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +19 -6
  446. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
  447. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +19 -6
  448. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
  449. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +11 -7
  450. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
  451. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +11 -7
  452. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
  453. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +7 -4
  454. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
  455. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +7 -4
  456. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
  457. package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs +25 -33
  458. package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
  459. package/dist/vue3/recipes/conversation_view/editor/editor.vue.js +26 -34
  460. package/dist/vue3/recipes/conversation_view/editor/editor.vue.js.map +1 -1
  461. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +7 -14
  462. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
  463. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +8 -15
  464. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
  465. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs +6 -4
  466. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs.map +1 -1
  467. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js +6 -4
  468. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js.map +1 -1
  469. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +12 -6
  470. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
  471. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js +12 -6
  472. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
  473. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs +7 -27
  474. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
  475. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js +8 -28
  476. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
  477. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs +4 -13
  478. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
  479. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js +5 -14
  480. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
  481. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs +7 -13
  482. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs.map +1 -1
  483. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js +8 -14
  484. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js.map +1 -1
  485. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs +13 -9
  486. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
  487. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js +13 -9
  488. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
  489. package/dist/vue3/recipes/leftbar/general_row/general_row_constants.cjs +17 -0
  490. package/dist/vue3/recipes/leftbar/general_row/general_row_constants.cjs.map +1 -1
  491. package/dist/vue3/recipes/leftbar/general_row/general_row_constants.js +17 -0
  492. package/dist/vue3/recipes/leftbar/general_row/general_row_constants.js.map +1 -1
  493. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +11 -39
  494. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
  495. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +13 -41
  496. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
  497. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs +7 -4
  498. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
  499. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js +7 -4
  500. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
  501. package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.cjs +6 -11
  502. package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.cjs.map +1 -1
  503. package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.js +7 -12
  504. package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.js.map +1 -1
  505. package/dist/vue3/style.css +119 -119
  506. package/dist/vue3/types/common/sr_only_close_button.vue.d.ts +1 -1
  507. package/dist/vue3/types/common/storybook_utils.d.ts +25 -0
  508. package/dist/vue3/types/common/storybook_utils.d.ts.map +1 -0
  509. package/dist/vue3/types/components/avatar/avatar.vue.d.ts +39 -11
  510. package/dist/vue3/types/components/avatar/avatar.vue.d.ts.map +1 -1
  511. package/dist/vue3/types/components/badge/badge.vue.d.ts +35 -18
  512. package/dist/vue3/types/components/badge/badge.vue.d.ts.map +1 -1
  513. package/dist/vue3/types/components/banner/banner.vue.d.ts +1 -1
  514. package/dist/vue3/types/components/breadcrumbs/breadcrumb_item.vue.d.ts +1 -1
  515. package/dist/vue3/types/components/breadcrumbs/breadcrumbs.vue.d.ts +1 -1
  516. package/dist/vue3/types/components/button/button.vue.d.ts +3 -3
  517. package/dist/vue3/types/components/button_group/button_group.vue.d.ts +1 -1
  518. package/dist/vue3/types/components/button_group/buttons_decorator.vue.d.ts +1 -1
  519. package/dist/vue3/types/components/card/card.vue.d.ts +1 -1
  520. package/dist/vue3/types/components/checkbox/checkbox.vue.d.ts +2 -2
  521. package/dist/vue3/types/components/checkbox_group/checkbox_group.vue.d.ts +4 -4
  522. package/dist/vue3/types/components/checkbox_group/checkboxes_decorator.vue.d.ts +1 -1
  523. package/dist/vue3/types/components/chip/chip.vue.d.ts +3 -3
  524. package/dist/vue3/types/components/codeblock/codeblock.vue.d.ts +1 -1
  525. package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts +3 -3
  526. package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
  527. package/dist/vue3/types/components/collapsible/collapsible_lazy_show.vue.d.ts +1 -1
  528. package/dist/vue3/types/components/combobox/combobox.vue.d.ts +14 -14
  529. package/dist/vue3/types/components/combobox/combobox_empty-list.vue.d.ts +1 -1
  530. package/dist/vue3/types/components/combobox/combobox_loading-list.vue.d.ts +1 -1
  531. package/dist/vue3/types/components/datepicker/datepicker.vue.d.ts +1 -1
  532. package/dist/vue3/types/components/datepicker/modules/calendar.vue.d.ts +1 -1
  533. package/dist/vue3/types/components/datepicker/modules/month-year-picker.vue.d.ts +1 -1
  534. package/dist/vue3/types/components/description_list/description_list.vue.d.ts +1 -1
  535. package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts +7 -5
  536. package/dist/vue3/types/components/dropdown/dropdown.vue.d.ts.map +1 -1
  537. package/dist/vue3/types/components/dropdown/dropdown_list.vue.d.ts +1 -1
  538. package/dist/vue3/types/components/dropdown/dropdown_separator.vue.d.ts +1 -1
  539. package/dist/vue3/types/components/emoji/emoji.vue.d.ts +1 -1
  540. package/dist/vue3/types/components/emoji_picker/emoji_picker.vue.d.ts +1 -1
  541. package/dist/vue3/types/components/emoji_picker/modules/emoji_description.vue.d.ts +1 -1
  542. package/dist/vue3/types/components/emoji_picker/modules/emoji_search.vue.d.ts +1 -1
  543. package/dist/vue3/types/components/emoji_picker/modules/emoji_selector.vue.d.ts +1 -1
  544. package/dist/vue3/types/components/emoji_picker/modules/emoji_skin_selector.vue.d.ts +1 -1
  545. package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts +1 -1
  546. package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
  547. package/dist/vue3/types/components/emoji_text_wrapper/emoji_text_wrapper.vue.d.ts +1 -1
  548. package/dist/vue3/types/components/empty_state/empty_state.vue.d.ts +1 -5
  549. package/dist/vue3/types/components/empty_state/empty_state.vue.d.ts.map +1 -1
  550. package/dist/vue3/types/components/empty_state/empty_state_constants.d.ts +0 -27
  551. package/dist/vue3/types/components/hovercard/hovercard.vue.d.ts +1 -1
  552. package/dist/vue3/types/components/icon/icon.vue.d.ts +1 -1
  553. package/dist/vue3/types/components/illustration/illustration.vue.d.ts +1 -1
  554. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts +1 -1
  555. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  556. package/dist/vue3/types/components/input/input.vue.d.ts +7 -7
  557. package/dist/vue3/types/components/input_group/decorators/input.vue.d.ts +1 -1
  558. package/dist/vue3/types/components/input_group/decorators/inputs.vue.d.ts +1 -1
  559. package/dist/vue3/types/components/input_group/input_group.vue.d.ts +2 -2
  560. package/dist/vue3/types/components/item_layout/item_layout.vue.d.ts +1 -1
  561. package/dist/vue3/types/components/keyboard_shortcut/index.d.ts +1 -1
  562. package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +19 -214
  563. package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
  564. package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts +11 -0
  565. package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts.map +1 -1
  566. package/dist/vue3/types/components/lazy_show/lazy_show.vue.d.ts +2 -2
  567. package/dist/vue3/types/components/link/link.vue.d.ts +1 -1
  568. package/dist/vue3/types/components/list_item/list_item.vue.d.ts +10 -4
  569. package/dist/vue3/types/components/list_item/list_item.vue.d.ts.map +1 -1
  570. package/dist/vue3/types/components/list_item_group/list_item_group.vue.d.ts +1 -1
  571. package/dist/vue3/types/components/modal/modal.vue.d.ts +3 -3
  572. package/dist/vue3/types/components/notice/notice.vue.d.ts +1 -1
  573. package/dist/vue3/types/components/notice/notice_action.vue.d.ts +5 -6
  574. package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
  575. package/dist/vue3/types/components/notice/notice_content.vue.d.ts +1 -1
  576. package/dist/vue3/types/components/notice/notice_icon.vue.d.ts +2 -31
  577. package/dist/vue3/types/components/notice/notice_icon.vue.d.ts.map +1 -1
  578. package/dist/vue3/types/components/pagination/pagination.vue.d.ts +1 -1
  579. package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
  580. package/dist/vue3/types/components/popover/popover_header_footer.vue.d.ts +1 -1
  581. package/dist/vue3/types/components/presence/presence.vue.d.ts +1 -1
  582. package/dist/vue3/types/components/radio/radio.vue.d.ts +3 -3
  583. package/dist/vue3/types/components/radio_group/radio_group.vue.d.ts +4 -4
  584. package/dist/vue3/types/components/radio_group/radios_decorator.vue.d.ts +1 -1
  585. package/dist/vue3/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +1 -1
  586. package/dist/vue3/types/components/rich_text_editor/extensions/channels/ChannelSuggestion.vue.d.ts +1 -1
  587. package/dist/vue3/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +1 -1
  588. package/dist/vue3/types/components/rich_text_editor/extensions/emoji/EmojiSuggestion.vue.d.ts +1 -1
  589. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +1 -1
  590. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts +1 -1
  591. package/dist/vue3/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts +1 -1
  592. package/dist/vue3/types/components/rich_text_editor/extensions/slash_command/SlashCommandSuggestion.vue.d.ts +1 -1
  593. package/dist/vue3/types/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts +1 -1
  594. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts +4 -4
  595. package/dist/vue3/types/components/root_layout/root_layout.vue.d.ts +1 -1
  596. package/dist/vue3/types/components/scroller/DtScroller.vue.d.ts +1 -1
  597. package/dist/vue3/types/components/scroller/modules/core_scroller.vue.d.ts +1 -1
  598. package/dist/vue3/types/components/scroller/modules/dynamic_scroller.vue.d.ts +4 -4
  599. package/dist/vue3/types/components/scroller/modules/scroller_item.vue.d.ts +1 -1
  600. package/dist/vue3/types/components/select_menu/select_menu.vue.d.ts +2 -2
  601. package/dist/vue3/types/components/skeleton/skeleton-list-item.vue.d.ts +1 -1
  602. package/dist/vue3/types/components/skeleton/skeleton-paragraph.vue.d.ts +1 -1
  603. package/dist/vue3/types/components/skeleton/skeleton-shape.vue.d.ts +2 -2
  604. package/dist/vue3/types/components/skeleton/skeleton-text.vue.d.ts +1 -1
  605. package/dist/vue3/types/components/skeleton/skeleton.vue.d.ts +1 -1
  606. package/dist/vue3/types/components/split_button/split_button-alpha.vue.d.ts +2 -2
  607. package/dist/vue3/types/components/split_button/split_button-omega.vue.d.ts +2 -2
  608. package/dist/vue3/types/components/split_button/split_button.vue.d.ts +20 -20
  609. package/dist/vue3/types/components/tabs/tab.vue.d.ts +2 -2
  610. package/dist/vue3/types/components/tabs/tab_group.vue.d.ts +1 -1
  611. package/dist/vue3/types/components/tabs/tab_panel.vue.d.ts +2 -2
  612. package/dist/vue3/types/components/toast/toast.vue.d.ts +1 -1
  613. package/dist/vue3/types/components/toggle/toggle.vue.d.ts +1 -1
  614. package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts +6 -6
  615. package/dist/vue3/types/components/validation_messages/validation_messages.vue.d.ts +1 -1
  616. package/dist/vue3/types/directives/scrollbar/scrollbar.d.ts.map +1 -1
  617. package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +2 -2
  618. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +4 -4
  619. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +2 -31
  620. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  621. package/dist/vue3/types/recipes/chips/grouped_chip/grouped_chip.vue.d.ts +1 -1
  622. package/dist/vue3/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +6 -6
  623. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +1 -1
  624. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  625. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +1 -1
  626. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/media_components/progress_bar.vue.d.ts +1 -1
  627. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +21 -253
  628. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  629. package/dist/vue3/types/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +1 -1
  630. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +9 -2
  631. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  632. package/dist/vue3/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts +3 -3
  633. package/dist/vue3/types/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.d.ts +1 -1
  634. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +4 -4
  635. package/dist/vue3/types/recipes/conversation_view/time_pill/time_pill.vue.d.ts +1 -1
  636. package/dist/vue3/types/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts +1 -1
  637. package/dist/vue3/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +4 -4
  638. package/dist/vue3/types/recipes/leftbar/callbox/callbox.vue.d.ts +1 -1
  639. package/dist/vue3/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
  640. package/dist/vue3/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +3 -3
  641. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +2 -1
  642. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  643. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +11 -11
  644. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  645. package/dist/vue3/types/recipes/leftbar/general_row/general_row_constants.d.ts +6 -0
  646. package/dist/vue3/types/recipes/leftbar/general_row/general_row_constants.d.ts.map +1 -1
  647. package/dist/vue3/types/recipes/leftbar/general_row/index.d.ts +1 -1
  648. package/dist/vue3/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +2 -31
  649. package/dist/vue3/types/recipes/leftbar/group_row/group_row.vue.d.ts +1 -1
  650. package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +1 -1
  651. package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  652. package/dist/vue3/types/recipes/notices/top_banner_info/top_banner_info.vue.d.ts +1 -1
  653. package/package.json +3 -3
  654. package/dist/tokens/themes/chunks/tokens-base-dark-BEsKKfTV.js +0 -4
  655. package/dist/tokens/themes/chunks/tokens-base-dark-Bxzti7ig.js +0 -1
  656. package/dist/tokens/themes/chunks/tokens-base-light-DV0xl0Dv.js +0 -1
  657. package/dist/tokens/themes/chunks/tokens-base-light-jdZ77WhZ.js +0 -4
@@ -1,9 +1,30 @@
1
1
  "use strict";
2
2
  const badge_constants = require("./badge_constants.cjs");
3
3
  const _pluginVue2_normalizer = require("../../_virtual/_plugin-vue2_normalizer.cjs");
4
+ const icon = require("../icon/icon.vue.cjs");
4
5
  const _sfc_main = {
5
6
  name: "DtBadge",
7
+ components: {
8
+ DtIcon: icon
9
+ },
6
10
  props: {
11
+ /**
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.
15
+ */
16
+ iconLeft: {
17
+ 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: ""
27
+ },
7
28
  /**
8
29
  * Text for the badge content
9
30
  */
@@ -31,7 +52,7 @@ const _sfc_main = {
31
52
  },
32
53
  /**
33
54
  * Decoration for the badge. This can be only used with kind: label and type: default
34
- * with no left and right icons
55
+ * with no iconLeft and iconRight
35
56
  * @values default, black-400, black-500, black-900, red-200, red-300, red-400, purple-200,
36
57
  * purple-300, purple-400, purple-500, blue-200, blue-300, blue-400, green-300, green-400,
37
58
  * green-500, gold-300, gold-400, gold-500, magenta-200, magenta-300, magenta-400
@@ -72,18 +93,18 @@ const _sfc_main = {
72
93
  };
73
94
  },
74
95
  computed: {
75
- hasLeftIcon() {
76
- return this.$scopedSlots.leftIcon && this.$scopedSlots.leftIcon();
77
- },
78
- hasRightIcon() {
79
- return this.$scopedSlots.rightIcon && this.$scopedSlots.rightIcon();
80
- },
81
96
  hasIcons() {
82
- return this.hasLeftIcon || this.hasRightIcon;
97
+ return this.iconLeft !== "" || this.iconRight !== "";
83
98
  }
84
99
  },
85
- updated() {
86
- this.validateProps();
100
+ watch: {
101
+ $props: {
102
+ immediate: true,
103
+ deep: true,
104
+ handler() {
105
+ this.validateProps();
106
+ }
107
+ }
87
108
  },
88
109
  methods: {
89
110
  validateProps() {
@@ -104,7 +125,7 @@ const _sfc_main = {
104
125
  console.error("DtBadge error: decoration prop can only be used with kind: 'label' and type: 'default'.");
105
126
  }
106
127
  if (this.hasIcons) {
107
- console.error("DtBadge error: decoration prop cannot be used with leftIcon or rightIcon.");
128
+ console.error("DtBadge error: decoration prop cannot be used with iconLeft or iconRight.");
108
129
  }
109
130
  }
110
131
  }
@@ -118,9 +139,9 @@ var _sfc_render = function render() {
118
139
  _vm.BADGE_DECORATION_MODIFIERS[_vm.decoration],
119
140
  { "d-badge--subtle": _vm.subtle },
120
141
  { "d-badge--outlined": _vm.outlined }
121
- ], attrs: { "data-qa": "dt-badge" } }, [_vm.decoration ? _c("span", { staticClass: "d-badge__decorative" }) : _vm._e(), _vm.hasLeftIcon ? _c("span", { staticClass: "d-badge__icon-left" }, [_vm._t("leftIcon", null, { "iconSize": "200" })], 2) : _vm._e(), _c("span", { class: ["d-badge__label", _vm.labelClass] }, [_vm._t("default", function() {
142
+ ], attrs: { "data-qa": "dt-badge" } }, [_vm.decoration ? _c("span", { staticClass: "d-badge__decorative" }) : _vm._e(), _vm.iconLeft ? _c("span", { staticClass: "d-badge__icon-left" }, [_c("dt-icon", { attrs: { "name": _vm.iconLeft, "size": "200" } })], 1) : _vm._e(), _c("span", { class: ["d-badge__label", _vm.labelClass] }, [_vm._t("default", function() {
122
143
  return [_vm._v(" " + _vm._s(_vm.text) + " ")];
123
- })], 2), _vm.hasRightIcon ? _c("span", { staticClass: "d-badge__icon-right" }, [_vm._t("rightIcon", null, { "iconSize": "200" })], 2) : _vm._e()]);
144
+ })], 2), _vm.iconRight ? _c("span", { staticClass: "d-badge__icon-right" }, [_c("dt-icon", { attrs: { "name": _vm.iconRight, "size": "200" } })], 1) : _vm._e()]);
124
145
  };
125
146
  var _sfc_staticRenderFns = [];
126
147
  var __component__ = /* @__PURE__ */ _pluginVue2_normalizer(
@@ -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=\"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=\"'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=\"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=\"'200'\"\n />\n </span>\n </span>\n</template>\n\n<script>\nimport { BADGE_TYPE_MODIFIERS, BADGE_KIND_MODIFIERS, BADGE_DECORATION_MODIFIERS } from './badge_constants';\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 * 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 this.$scopedSlots.leftIcon && this.$scopedSlots.leftIcon();\n },\n\n hasRightIcon () {\n return this.$scopedSlots.rightIcon && this.$scopedSlots.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 }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aAAA,KAAA,aAAA,aAAA,KAAA,aAAA;IACA;AAAA,IAEA,WAAA;AACA,aAAA,KAAA,eAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,SAAA,cAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,gBAAA;AACA,WAAA,4BAAA;AACA,WAAA,kCAAA;AAAA,IACA;AAAA,IAEA,8BAAA;AACA,UAAA,KAAA,SAAA,QAAA,KAAA,SAAA,SAAA;AACA,gBAAA,MAAA,yEAAA;AAAA,MACA;AACA,UAAA,KAAA,SAAA,cAAA,KAAA,QAAA;AACA,gBAAA,MAAA,6DAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,oCAAA;AACA,UAAA,CAAA,KAAA,WAAA;AAEA,UAAA,KAAA,SAAA,WAAA,KAAA,SAAA,WAAA;AACA,gBAAA,MAAA,yFAAA;AAAA,MACA;AAEA,UAAA,KAAA,UAAA;AACA,gBAAA,MAAA,2EAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;"}
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"],"mappings":";;;;AAoDA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,QAAAA;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;A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AA,SAAA,SAAA;AACA,gBAAA,MAAA,yEAAA;AAAA,MACA;AACA,UAAA,KAAA,SAAA,cAAA,KAAA,QAAA;AACA,gBAAA,MAAA,6DAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,oCAAA;AACA,UAAA,CAAA,KAAA,WAAA;AAEA,UAAA,KAAA,SAAA,WAAA,KAAA,SAAA,WAAA;AACA,gBAAA,MAAA,yFAAA;AAAA,MACA;AAEA,UAAA,KAAA,UAAA;AACA,gBAAA,MAAA,2EAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,29 @@
1
1
  import { BADGE_KIND_MODIFIERS, BADGE_TYPE_MODIFIERS, BADGE_DECORATION_MODIFIERS } from "./badge_constants.js";
2
2
  import normalizeComponent from "../../_virtual/_plugin-vue2_normalizer.js";
3
+ import DtIcon from "../icon/icon.vue.js";
3
4
  const _sfc_main = {
4
5
  name: "DtBadge",
6
+ components: {
7
+ DtIcon
8
+ },
5
9
  props: {
10
+ /**
11
+ * Icon on the left side of the badge. Supports any valid icon name from the icon catalog at
12
+ * https://dialtone.dialpad.com/components/icon.html#icon-catalog. If type:'ai' is set, the ai icon
13
+ * will automatically be shown here, but this can be overridden by setting this prop.
14
+ */
15
+ iconLeft: {
16
+ type: String,
17
+ default: ""
18
+ },
19
+ /**
20
+ * Icon on the right side of the badge. Supports any valid icon name from the icon catalog at
21
+ * https://dialtone.dialpad.com/components/icon.html#icon-catalog
22
+ */
23
+ iconRight: {
24
+ type: String,
25
+ default: ""
26
+ },
6
27
  /**
7
28
  * Text for the badge content
8
29
  */
@@ -30,7 +51,7 @@ const _sfc_main = {
30
51
  },
31
52
  /**
32
53
  * Decoration for the badge. This can be only used with kind: label and type: default
33
- * with no left and right icons
54
+ * with no iconLeft and iconRight
34
55
  * @values default, black-400, black-500, black-900, red-200, red-300, red-400, purple-200,
35
56
  * purple-300, purple-400, purple-500, blue-200, blue-300, blue-400, green-300, green-400,
36
57
  * green-500, gold-300, gold-400, gold-500, magenta-200, magenta-300, magenta-400
@@ -71,18 +92,18 @@ const _sfc_main = {
71
92
  };
72
93
  },
73
94
  computed: {
74
- hasLeftIcon() {
75
- return this.$scopedSlots.leftIcon && this.$scopedSlots.leftIcon();
76
- },
77
- hasRightIcon() {
78
- return this.$scopedSlots.rightIcon && this.$scopedSlots.rightIcon();
79
- },
80
95
  hasIcons() {
81
- return this.hasLeftIcon || this.hasRightIcon;
96
+ return this.iconLeft !== "" || this.iconRight !== "";
82
97
  }
83
98
  },
84
- updated() {
85
- this.validateProps();
99
+ watch: {
100
+ $props: {
101
+ immediate: true,
102
+ deep: true,
103
+ handler() {
104
+ this.validateProps();
105
+ }
106
+ }
86
107
  },
87
108
  methods: {
88
109
  validateProps() {
@@ -103,7 +124,7 @@ const _sfc_main = {
103
124
  console.error("DtBadge error: decoration prop can only be used with kind: 'label' and type: 'default'.");
104
125
  }
105
126
  if (this.hasIcons) {
106
- console.error("DtBadge error: decoration prop cannot be used with leftIcon or rightIcon.");
127
+ console.error("DtBadge error: decoration prop cannot be used with iconLeft or iconRight.");
107
128
  }
108
129
  }
109
130
  }
@@ -117,9 +138,9 @@ var _sfc_render = function render() {
117
138
  _vm.BADGE_DECORATION_MODIFIERS[_vm.decoration],
118
139
  { "d-badge--subtle": _vm.subtle },
119
140
  { "d-badge--outlined": _vm.outlined }
120
- ], attrs: { "data-qa": "dt-badge" } }, [_vm.decoration ? _c("span", { staticClass: "d-badge__decorative" }) : _vm._e(), _vm.hasLeftIcon ? _c("span", { staticClass: "d-badge__icon-left" }, [_vm._t("leftIcon", null, { "iconSize": "200" })], 2) : _vm._e(), _c("span", { class: ["d-badge__label", _vm.labelClass] }, [_vm._t("default", function() {
141
+ ], attrs: { "data-qa": "dt-badge" } }, [_vm.decoration ? _c("span", { staticClass: "d-badge__decorative" }) : _vm._e(), _vm.iconLeft ? _c("span", { staticClass: "d-badge__icon-left" }, [_c("dt-icon", { attrs: { "name": _vm.iconLeft, "size": "200" } })], 1) : _vm._e(), _c("span", { class: ["d-badge__label", _vm.labelClass] }, [_vm._t("default", function() {
121
142
  return [_vm._v(" " + _vm._s(_vm.text) + " ")];
122
- })], 2), _vm.hasRightIcon ? _c("span", { staticClass: "d-badge__icon-right" }, [_vm._t("rightIcon", null, { "iconSize": "200" })], 2) : _vm._e()]);
143
+ })], 2), _vm.iconRight ? _c("span", { staticClass: "d-badge__icon-right" }, [_c("dt-icon", { attrs: { "name": _vm.iconRight, "size": "200" } })], 1) : _vm._e()]);
123
144
  };
124
145
  var _sfc_staticRenderFns = [];
125
146
  var __component__ = /* @__PURE__ */ normalizeComponent(
@@ -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=\"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=\"'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=\"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=\"'200'\"\n />\n </span>\n </span>\n</template>\n\n<script>\nimport { BADGE_TYPE_MODIFIERS, BADGE_KIND_MODIFIERS, BADGE_DECORATION_MODIFIERS } from './badge_constants';\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 * 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 this.$scopedSlots.leftIcon && this.$scopedSlots.leftIcon();\n },\n\n hasRightIcon () {\n return this.$scopedSlots.rightIcon && this.$scopedSlots.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":[],"mappings":";;AAqDA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,SAAA,OAAA,KAAA,oBAAA,EAAA,SAAA,IAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,SAAA,OAAA,KAAA,oBAAA,EAAA,SAAA,IAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,SAAA,OAAA,KAAA,0BAAA,EAAA,SAAA,IAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,cAAA;AACA,aAAA,KAAA,aAAA,YAAA,KAAA,aAAA;IACA;AAAA,IAEA,eAAA;AACA,aAAA,KAAA,aAAA,aAAA,KAAA,aAAA;IACA;AAAA,IAEA,WAAA;AACA,aAAA,KAAA,eAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,SAAA,cAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,gBAAA;AACA,WAAA,4BAAA;AACA,WAAA,kCAAA;AAAA,IACA;AAAA,IAEA,8BAAA;AACA,UAAA,KAAA,SAAA,QAAA,KAAA,SAAA,SAAA;AACA,gBAAA,MAAA,yEAAA;AAAA,MACA;AACA,UAAA,KAAA,SAAA,cAAA,KAAA,QAAA;AACA,gBAAA,MAAA,6DAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,oCAAA;AACA,UAAA,CAAA,KAAA,WAAA;AAEA,UAAA,KAAA,SAAA,WAAA,KAAA,SAAA,WAAA;AACA,gBAAA,MAAA,yFAAA;AAAA,MACA;AAEA,UAAA,KAAA,UAAA;AACA,gBAAA,MAAA,2EAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;"}
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":[],"mappings":";;;AAoDA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AA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;AACA,WAAA,kCAAA;AAAA,IACA;AAAA,IAEA,8BAAA;AACA,UAAA,KAAA,SAAA,QAAA,KAAA,SAAA,SAAA;AACA,gBAAA,MAAA,yEAAA;AAAA,MACA;AACA,UAAA,KAAA,SAAA,cAAA,KAAA,QAAA;AACA,gBAAA,MAAA,6DAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,oCAAA;AACA,UAAA,CAAA,KAAA,WAAA;AAEA,UAAA,KAAA,SAAA,WAAA,KAAA,SAAA,WAAA;AACA,gBAAA,MAAA,yFAAA;AAAA,MACA;AAEA,UAAA,KAAA,UAAA;AACA,gBAAA,MAAA,2EAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
- const vue2 = require("@dialpad/dialtone-icons/vue2");
3
2
  const chip_constants = require("./chip_constants.cjs");
4
3
  const common_utils = require("../../common/utils.cjs");
5
4
  const _pluginVue2_normalizer = require("../../_virtual/_plugin-vue2_normalizer.cjs");
6
5
  const button = require("../button/button.vue.cjs");
6
+ const icon = require("../icon/icon.vue.cjs");
7
7
  const _sfc_main = {
8
8
  name: "DtChip",
9
9
  components: {
10
10
  DtButton: button,
11
- DtIconClose: vue2.DtIconClose
11
+ DtIcon: icon
12
12
  },
13
13
  props: {
14
14
  /**
@@ -155,8 +155,8 @@ var _sfc_render = function render() {
155
155
  return _c("span", { staticClass: "d-chip" }, [_c(_vm.interactive ? "button" : "span", _vm._g({ tag: "component", class: _vm.chipClasses(), attrs: { "id": _vm.id, "type": _vm.interactive && "button", "data-qa": "dt-chip", "aria-labelledby": _vm.ariaLabel ? void 0 : `${_vm.id}-content`, "aria-label": _vm.ariaLabel } }, _vm.chipListeners), [_vm.$slots.icon ? _c("span", { staticClass: "d-chip__icon", attrs: { "data-qa": "dt-chip-icon" } }, [_vm._t("icon")], 2) : _vm.$slots.avatar ? _c("span", { attrs: { "data-qa": "dt-chip-avatar" } }, [_vm._t("avatar")], 2) : _vm._e(), _vm.$slots.default ? _c("span", { class: ["d-chip__text", _vm.contentClass], attrs: { "id": `${_vm.id}-content`, "data-qa": "dt-chip-label" } }, [_vm._t("default")], 2) : _vm._e()]), !_vm.hideClose ? _c("dt-button", _vm._b({ class: _vm.chipCloseButtonClasses(), attrs: { "data-qa": "dt-chip-close", "aria-label": _vm.closeButtonProps.ariaLabel }, on: { "click": function($event) {
156
156
  return _vm.$emit("close");
157
157
  } }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
158
- return [_c("dt-icon-close", { attrs: { "size": _vm.closeButtonIconSize } })];
159
- }, proxy: true }], null, false, 1341282633) }, "dt-button", _vm.closeButtonProps, false)) : _vm._e()], 1);
158
+ return [_c("dt-icon", { attrs: { "name": "close", "size": _vm.closeButtonIconSize } })];
159
+ }, proxy: true }], null, false, 1192647893) }, "dt-button", _vm.closeButtonProps, false)) : _vm._e()], 1);
160
160
  };
161
161
  var _sfc_staticRenderFns = [];
162
162
  var __component__ = /* @__PURE__ */ _pluginVue2_normalizer(
@@ -1 +1 @@
1
- {"version":3,"file":"chip.vue.cjs","sources":["../../../components/chip/chip.vue"],"sourcesContent":["<template>\n <span class=\"d-chip\">\n <component\n :is=\"interactive ? 'button' : 'span'\"\n :id=\"id\"\n :type=\"interactive && 'button'\"\n :class=\"chipClasses()\"\n data-qa=\"dt-chip\"\n :aria-labelledby=\"ariaLabel ? undefined : `${id}-content`\"\n :aria-label=\"ariaLabel\"\n v-on=\"chipListeners\"\n >\n <span\n v-if=\"$slots.icon\"\n data-qa=\"dt-chip-icon\"\n class=\"d-chip__icon\"\n >\n <!-- @slot slot for Chip icon -->\n <slot name=\"icon\" />\n </span>\n <span\n v-else-if=\"$slots.avatar\"\n data-qa=\"dt-chip-avatar\"\n >\n <!-- @slot slot for Chip avatar -->\n <slot name=\"avatar\" />\n </span>\n <span\n v-if=\"$slots.default\"\n :id=\"`${id}-content`\"\n data-qa=\"dt-chip-label\"\n :class=\"['d-chip__text', contentClass]\"\n >\n <!-- @slot slot for Content within chip -->\n <slot />\n </span>\n </component>\n <dt-button\n v-if=\"!hideClose\"\n v-bind=\"closeButtonProps\"\n :class=\"chipCloseButtonClasses()\"\n data-qa=\"dt-chip-close\"\n :aria-label=\"closeButtonProps.ariaLabel\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon-close\n :size=\"closeButtonIconSize\"\n />\n </template>\n </dt-button>\n </span>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue2';\nimport {\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n} from './chip_constants';\nimport { getUniqueString } from '@/common/utils';\n\n/**\n * A chip is a compact UI element that provides brief, descriptive information about an element.\n * It is terse, ideally one word. It is important a button is identifiable, consistent, and\n * communicates its actions clearly, and is appropriately sized to its action.\n * @see https://dialtone.dialpad.com/components/chip.html\n */\nexport default {\n name: 'DtChip',\n\n components: {\n DtButton,\n DtIconClose,\n },\n\n props: {\n /**\n * A set of props to be passed into the modal's close button. Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: function () { return { ariaLabel: 'close' }; },\n validator: (props) => {\n return !!props.ariaLabel;\n },\n },\n\n /**\n * Hides the close button on the chip\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The size of the chip.\n * @values xs, sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(CHIP_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * The interactivity of the chip.\n * Makes chip clickable, apply hover/focus/active style, emit keyboard events etc.\n * @values true, false\n */\n interactive: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n id: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Descriptive label for the chip content.\n * If this prop is unset the content in the default slot will be used as an aria-label.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the chip element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the span element.\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native chip click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native chip key up event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n ],\n\n data () {\n return {\n isActive: false,\n };\n },\n\n computed: {\n chipListeners () {\n return {\n ...this.$listeners,\n click: event => {\n if (this.interactive) this.$emit('click', event);\n },\n\n keyup: event => {\n if (event.code?.toLowerCase() === 'delete') {\n this.onClose();\n } else {\n this.$emit('keyup', event);\n }\n },\n };\n },\n\n closeButtonIconSize () {\n return CHIP_ICON_SIZES[this.size];\n },\n },\n\n methods: {\n chipClasses () {\n return [\n this.$attrs['grouped-chip'] ? 'd-chip' : 'd-chip__label',\n CHIP_SIZE_MODIFIERS[this.size],\n this.labelClass,\n ];\n },\n\n chipCloseButtonClasses () {\n return [\n 'd-chip__close',\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS[this.size],\n ];\n },\n\n onClose () {\n if (!this.hideClose) {\n this.$emit('close');\n }\n },\n },\n};\n</script>\n"],"names":["DtButton","DtIconClose","CHIP_SIZE_MODIFIERS","getUniqueString","CHIP_ICON_SIZES","CHIP_CLOSE_BUTTON_SIZE_MODIFIERS"],"mappings":";;;;;;AAsEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA;AAAAA,IACA,aAAAC,KAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,WAAA;AAAA,eAAA,EAAA,WAAA,QAAA;AAAA,MAAA;AAAA,MACA,WA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A,WAAA;;AACA,gBAAA,WAAA,SAAA,mBAAA,mBAAA,UAAA;AACA,iBAAA,QAAA;AAAA,UACA,OAAA;AACA,iBAAA,MAAA,SAAA,KAAA;AAAA,UACA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,sBAAA;AACA,aAAAC,eAAA,gBAAA,KAAA,IAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,cAAA;AACA,aAAA;AAAA,QACA,KAAA,OAAA,cAAA,IAAA,WAAA;AAAA,QACAF,eAAA,oBAAA,KAAA,IAAA;AAAA,QACA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,yBAAA;AACA,aAAA;AAAA,QACA;AAAA,QACAG,eAAA,iCAAA,KAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,UAAA;AACA,UAAA,CAAA,KAAA,WAAA;AACA,aAAA,MAAA,OAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"chip.vue.cjs","sources":["../../../components/chip/chip.vue"],"sourcesContent":["<template>\n <span class=\"d-chip\">\n <component\n :is=\"interactive ? 'button' : 'span'\"\n :id=\"id\"\n :type=\"interactive && 'button'\"\n :class=\"chipClasses()\"\n data-qa=\"dt-chip\"\n :aria-labelledby=\"ariaLabel ? undefined : `${id}-content`\"\n :aria-label=\"ariaLabel\"\n v-on=\"chipListeners\"\n >\n <span\n v-if=\"$slots.icon\"\n data-qa=\"dt-chip-icon\"\n class=\"d-chip__icon\"\n >\n <!-- @slot slot for Chip icon -->\n <slot name=\"icon\" />\n </span>\n <span\n v-else-if=\"$slots.avatar\"\n data-qa=\"dt-chip-avatar\"\n >\n <!-- @slot slot for Chip avatar -->\n <slot name=\"avatar\" />\n </span>\n <span\n v-if=\"$slots.default\"\n :id=\"`${id}-content`\"\n data-qa=\"dt-chip-label\"\n :class=\"['d-chip__text', contentClass]\"\n >\n <!-- @slot slot for Content within chip -->\n <slot />\n </span>\n </component>\n <dt-button\n v-if=\"!hideClose\"\n v-bind=\"closeButtonProps\"\n :class=\"chipCloseButtonClasses()\"\n data-qa=\"dt-chip-close\"\n :aria-label=\"closeButtonProps.ariaLabel\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n :size=\"closeButtonIconSize\"\n />\n </template>\n </dt-button>\n </span>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\nimport {\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n} from './chip_constants';\nimport { getUniqueString } from '@/common/utils';\n\n/**\n * A chip is a compact UI element that provides brief, descriptive information about an element.\n * It is terse, ideally one word. It is important a button is identifiable, consistent, and\n * communicates its actions clearly, and is appropriately sized to its action.\n * @see https://dialtone.dialpad.com/components/chip.html\n */\nexport default {\n name: 'DtChip',\n\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n /**\n * A set of props to be passed into the modal's close button. Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: function () { return { ariaLabel: 'close' }; },\n validator: (props) => {\n return !!props.ariaLabel;\n },\n },\n\n /**\n * Hides the close button on the chip\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The size of the chip.\n * @values xs, sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(CHIP_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * The interactivity of the chip.\n * Makes chip clickable, apply hover/focus/active style, emit keyboard events etc.\n * @values true, false\n */\n interactive: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n id: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Descriptive label for the chip content.\n * If this prop is unset the content in the default slot will be used as an aria-label.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the chip element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the span element.\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native chip click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native chip key up event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n ],\n\n data () {\n return {\n isActive: false,\n };\n },\n\n computed: {\n chipListeners () {\n return {\n ...this.$listeners,\n click: event => {\n if (this.interactive) this.$emit('click', event);\n },\n\n keyup: event => {\n if (event.code?.toLowerCase() === 'delete') {\n this.onClose();\n } else {\n this.$emit('keyup', event);\n }\n },\n };\n },\n\n closeButtonIconSize () {\n return CHIP_ICON_SIZES[this.size];\n },\n },\n\n methods: {\n chipClasses () {\n return [\n this.$attrs['grouped-chip'] ? 'd-chip' : 'd-chip__label',\n CHIP_SIZE_MODIFIERS[this.size],\n this.labelClass,\n ];\n },\n\n chipCloseButtonClasses () {\n return [\n 'd-chip__close',\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS[this.size],\n ];\n },\n\n onClose () {\n if (!this.hideClose) {\n this.$emit('close');\n }\n },\n },\n};\n</script>\n"],"names":["DtButton","DtIcon","CHIP_SIZE_MODIFIERS","getUniqueString","CHIP_ICON_SIZES","CHIP_CLOSE_BUTTON_SIZE_MODIFIERS"],"mappings":";;;;;;AAuEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA;AAAAA,IACA,QAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,WAAA;AAAA,eAAA,EAAA,WAAA,QAAA;AAAA,MAAA;AAAA,MACA,WAAA,CAAA,UAAA;AACA,eAAA,CAAA,CAAA,MAAA;AAAA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AAA;AACA,iBAAA,QAAA;AAAA,UACA,OAAA;AACA,iBAAA,MAAA,SAAA,KAAA;AAAA,UACA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,sBAAA;AACA,aAAAC,eAAA,gBAAA,KAAA,IAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,cAAA;AACA,aAAA;AAAA,QACA,KAAA,OAAA,cAAA,IAAA,WAAA;AAAA,QACAF,eAAA,oBAAA,KAAA,IAAA;AAAA,QACA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,yBAAA;AACA,aAAA;AAAA,QACA;AAAA,QACAG,eAAA,iCAAA,KAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,UAAA;AACA,UAAA,CAAA,KAAA,WAAA;AACA,aAAA,MAAA,OAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;"}
@@ -1,13 +1,13 @@
1
- import { DtIconClose } from "@dialpad/dialtone-icons/vue2";
2
1
  import { CHIP_SIZE_MODIFIERS, CHIP_ICON_SIZES, CHIP_CLOSE_BUTTON_SIZE_MODIFIERS } from "./chip_constants.js";
3
2
  import { getUniqueString } from "../../common/utils.js";
4
3
  import normalizeComponent from "../../_virtual/_plugin-vue2_normalizer.js";
5
4
  import DtButton from "../button/button.vue.js";
5
+ import DtIcon from "../icon/icon.vue.js";
6
6
  const _sfc_main = {
7
7
  name: "DtChip",
8
8
  components: {
9
9
  DtButton,
10
- DtIconClose
10
+ DtIcon
11
11
  },
12
12
  props: {
13
13
  /**
@@ -154,8 +154,8 @@ var _sfc_render = function render() {
154
154
  return _c("span", { staticClass: "d-chip" }, [_c(_vm.interactive ? "button" : "span", _vm._g({ tag: "component", class: _vm.chipClasses(), attrs: { "id": _vm.id, "type": _vm.interactive && "button", "data-qa": "dt-chip", "aria-labelledby": _vm.ariaLabel ? void 0 : `${_vm.id}-content`, "aria-label": _vm.ariaLabel } }, _vm.chipListeners), [_vm.$slots.icon ? _c("span", { staticClass: "d-chip__icon", attrs: { "data-qa": "dt-chip-icon" } }, [_vm._t("icon")], 2) : _vm.$slots.avatar ? _c("span", { attrs: { "data-qa": "dt-chip-avatar" } }, [_vm._t("avatar")], 2) : _vm._e(), _vm.$slots.default ? _c("span", { class: ["d-chip__text", _vm.contentClass], attrs: { "id": `${_vm.id}-content`, "data-qa": "dt-chip-label" } }, [_vm._t("default")], 2) : _vm._e()]), !_vm.hideClose ? _c("dt-button", _vm._b({ class: _vm.chipCloseButtonClasses(), attrs: { "data-qa": "dt-chip-close", "aria-label": _vm.closeButtonProps.ariaLabel }, on: { "click": function($event) {
155
155
  return _vm.$emit("close");
156
156
  } }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
157
- return [_c("dt-icon-close", { attrs: { "size": _vm.closeButtonIconSize } })];
158
- }, proxy: true }], null, false, 1341282633) }, "dt-button", _vm.closeButtonProps, false)) : _vm._e()], 1);
157
+ return [_c("dt-icon", { attrs: { "name": "close", "size": _vm.closeButtonIconSize } })];
158
+ }, proxy: true }], null, false, 1192647893) }, "dt-button", _vm.closeButtonProps, false)) : _vm._e()], 1);
159
159
  };
160
160
  var _sfc_staticRenderFns = [];
161
161
  var __component__ = /* @__PURE__ */ normalizeComponent(
@@ -1 +1 @@
1
- {"version":3,"file":"chip.vue.js","sources":["../../../components/chip/chip.vue"],"sourcesContent":["<template>\n <span class=\"d-chip\">\n <component\n :is=\"interactive ? 'button' : 'span'\"\n :id=\"id\"\n :type=\"interactive && 'button'\"\n :class=\"chipClasses()\"\n data-qa=\"dt-chip\"\n :aria-labelledby=\"ariaLabel ? undefined : `${id}-content`\"\n :aria-label=\"ariaLabel\"\n v-on=\"chipListeners\"\n >\n <span\n v-if=\"$slots.icon\"\n data-qa=\"dt-chip-icon\"\n class=\"d-chip__icon\"\n >\n <!-- @slot slot for Chip icon -->\n <slot name=\"icon\" />\n </span>\n <span\n v-else-if=\"$slots.avatar\"\n data-qa=\"dt-chip-avatar\"\n >\n <!-- @slot slot for Chip avatar -->\n <slot name=\"avatar\" />\n </span>\n <span\n v-if=\"$slots.default\"\n :id=\"`${id}-content`\"\n data-qa=\"dt-chip-label\"\n :class=\"['d-chip__text', contentClass]\"\n >\n <!-- @slot slot for Content within chip -->\n <slot />\n </span>\n </component>\n <dt-button\n v-if=\"!hideClose\"\n v-bind=\"closeButtonProps\"\n :class=\"chipCloseButtonClasses()\"\n data-qa=\"dt-chip-close\"\n :aria-label=\"closeButtonProps.ariaLabel\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon-close\n :size=\"closeButtonIconSize\"\n />\n </template>\n </dt-button>\n </span>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue2';\nimport {\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n} from './chip_constants';\nimport { getUniqueString } from '@/common/utils';\n\n/**\n * A chip is a compact UI element that provides brief, descriptive information about an element.\n * It is terse, ideally one word. It is important a button is identifiable, consistent, and\n * communicates its actions clearly, and is appropriately sized to its action.\n * @see https://dialtone.dialpad.com/components/chip.html\n */\nexport default {\n name: 'DtChip',\n\n components: {\n DtButton,\n DtIconClose,\n },\n\n props: {\n /**\n * A set of props to be passed into the modal's close button. Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: function () { return { ariaLabel: 'close' }; },\n validator: (props) => {\n return !!props.ariaLabel;\n },\n },\n\n /**\n * Hides the close button on the chip\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The size of the chip.\n * @values xs, sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(CHIP_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * The interactivity of the chip.\n * Makes chip clickable, apply hover/focus/active style, emit keyboard events etc.\n * @values true, false\n */\n interactive: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n id: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Descriptive label for the chip content.\n * If this prop is unset the content in the default slot will be used as an aria-label.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the chip element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the span element.\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native chip click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native chip key up event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n ],\n\n data () {\n return {\n isActive: false,\n };\n },\n\n computed: {\n chipListeners () {\n return {\n ...this.$listeners,\n click: event => {\n if (this.interactive) this.$emit('click', event);\n },\n\n keyup: event => {\n if (event.code?.toLowerCase() === 'delete') {\n this.onClose();\n } else {\n this.$emit('keyup', event);\n }\n },\n };\n },\n\n closeButtonIconSize () {\n return CHIP_ICON_SIZES[this.size];\n },\n },\n\n methods: {\n chipClasses () {\n return [\n this.$attrs['grouped-chip'] ? 'd-chip' : 'd-chip__label',\n CHIP_SIZE_MODIFIERS[this.size],\n this.labelClass,\n ];\n },\n\n chipCloseButtonClasses () {\n return [\n 'd-chip__close',\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS[this.size],\n ];\n },\n\n onClose () {\n if (!this.hideClose) {\n this.$emit('close');\n }\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;AAsEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,WAAA;AAAA,eAAA,EAAA,WAAA,QAAA;AAAA,MA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AEA,OAAA,WAAA;;AACA,gBAAA,WAAA,SAAA,mBAAA,mBAAA,UAAA;AACA,iBAAA,QAAA;AAAA,UACA,OAAA;AACA,iBAAA,MAAA,SAAA,KAAA;AAAA,UACA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,sBAAA;AACA,aAAA,gBAAA,KAAA,IAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,cAAA;AACA,aAAA;AAAA,QACA,KAAA,OAAA,cAAA,IAAA,WAAA;AAAA,QACA,oBAAA,KAAA,IAAA;AAAA,QACA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,yBAAA;AACA,aAAA;AAAA,QACA;AAAA,QACA,iCAAA,KAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,UAAA;AACA,UAAA,CAAA,KAAA,WAAA;AACA,aAAA,MAAA,OAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"chip.vue.js","sources":["../../../components/chip/chip.vue"],"sourcesContent":["<template>\n <span class=\"d-chip\">\n <component\n :is=\"interactive ? 'button' : 'span'\"\n :id=\"id\"\n :type=\"interactive && 'button'\"\n :class=\"chipClasses()\"\n data-qa=\"dt-chip\"\n :aria-labelledby=\"ariaLabel ? undefined : `${id}-content`\"\n :aria-label=\"ariaLabel\"\n v-on=\"chipListeners\"\n >\n <span\n v-if=\"$slots.icon\"\n data-qa=\"dt-chip-icon\"\n class=\"d-chip__icon\"\n >\n <!-- @slot slot for Chip icon -->\n <slot name=\"icon\" />\n </span>\n <span\n v-else-if=\"$slots.avatar\"\n data-qa=\"dt-chip-avatar\"\n >\n <!-- @slot slot for Chip avatar -->\n <slot name=\"avatar\" />\n </span>\n <span\n v-if=\"$slots.default\"\n :id=\"`${id}-content`\"\n data-qa=\"dt-chip-label\"\n :class=\"['d-chip__text', contentClass]\"\n >\n <!-- @slot slot for Content within chip -->\n <slot />\n </span>\n </component>\n <dt-button\n v-if=\"!hideClose\"\n v-bind=\"closeButtonProps\"\n :class=\"chipCloseButtonClasses()\"\n data-qa=\"dt-chip-close\"\n :aria-label=\"closeButtonProps.ariaLabel\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n :size=\"closeButtonIconSize\"\n />\n </template>\n </dt-button>\n </span>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\nimport {\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS,\n CHIP_SIZE_MODIFIERS,\n CHIP_ICON_SIZES,\n} from './chip_constants';\nimport { getUniqueString } from '@/common/utils';\n\n/**\n * A chip is a compact UI element that provides brief, descriptive information about an element.\n * It is terse, ideally one word. It is important a button is identifiable, consistent, and\n * communicates its actions clearly, and is appropriately sized to its action.\n * @see https://dialtone.dialpad.com/components/chip.html\n */\nexport default {\n name: 'DtChip',\n\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n /**\n * A set of props to be passed into the modal's close button. Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: function () { return { ariaLabel: 'close' }; },\n validator: (props) => {\n return !!props.ariaLabel;\n },\n },\n\n /**\n * Hides the close button on the chip\n * @values true, false\n */\n hideClose: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The size of the chip.\n * @values xs, sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(CHIP_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * The interactivity of the chip.\n * Makes chip clickable, apply hover/focus/active style, emit keyboard events etc.\n * @values true, false\n */\n interactive: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n id: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Descriptive label for the chip content.\n * If this prop is unset the content in the default slot will be used as an aria-label.\n */\n ariaLabel: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the chip element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the span element.\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native chip click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Close button click event\n *\n * @event close\n */\n 'close',\n\n /**\n * Native chip key up event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n ],\n\n data () {\n return {\n isActive: false,\n };\n },\n\n computed: {\n chipListeners () {\n return {\n ...this.$listeners,\n click: event => {\n if (this.interactive) this.$emit('click', event);\n },\n\n keyup: event => {\n if (event.code?.toLowerCase() === 'delete') {\n this.onClose();\n } else {\n this.$emit('keyup', event);\n }\n },\n };\n },\n\n closeButtonIconSize () {\n return CHIP_ICON_SIZES[this.size];\n },\n },\n\n methods: {\n chipClasses () {\n return [\n this.$attrs['grouped-chip'] ? 'd-chip' : 'd-chip__label',\n CHIP_SIZE_MODIFIERS[this.size],\n this.labelClass,\n ];\n },\n\n chipCloseButtonClasses () {\n return [\n 'd-chip__close',\n CHIP_CLOSE_BUTTON_SIZE_MODIFIERS[this.size],\n ];\n },\n\n onClose () {\n if (!this.hideClose) {\n this.$emit('close');\n }\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;AAuEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,WAAA;AAAA,eAAA,EAAA,WAAA,QAAA;AAAA,MAAA;AAAA,MACA,WAAA,CAAA,UAAA;AACA,eAAA,CAAA,CAAA,MAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAA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AA,gBAAA,KAAA,IAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,cAAA;AACA,aAAA;AAAA,QACA,KAAA,OAAA,cAAA,IAAA,WAAA;AAAA,QACA,oBAAA,KAAA,IAAA;AAAA,QACA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,yBAAA;AACA,aAAA;AAAA,QACA;AAAA,QACA,iCAAA,KAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,UAAA;AACA,UAAA,CAAA,KAAA,WAAA;AACA,aAAA,MAAA,OAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;"}
@@ -1,18 +1,17 @@
1
1
  "use strict";
2
2
  const common_utils = require("../../common/utils.cjs");
3
3
  const collapsible_lazy_show = require("./collapsible_lazy_show.vue.cjs");
4
- const vue2 = require("@dialpad/dialtone-icons/vue2");
5
4
  const _pluginVue2_normalizer = require("../../_virtual/_plugin-vue2_normalizer.cjs");
6
5
  const button = require("../button/button.vue.cjs");
7
6
  const lazy_show = require("../lazy_show/lazy_show.vue.cjs");
7
+ const icon = require("../icon/icon.vue.cjs");
8
8
  const _sfc_main = {
9
9
  name: "DtCollapsible",
10
10
  components: {
11
11
  DtButton: button,
12
12
  DtCollapsibleLazyShow: collapsible_lazy_show,
13
13
  DtLazyShow: lazy_show,
14
- DtIconChevronDown: vue2.DtIconChevronDown,
15
- DtIconChevronRight: vue2.DtIconChevronRight
14
+ DtIcon: icon
16
15
  },
17
16
  props: {
18
17
  /**
@@ -173,7 +172,7 @@ var _sfc_render = function render() {
173
172
  return _c(_vm.elementType, _vm._g({ ref: "collapsible", tag: "component" }, _vm.$listeners), [_c("div", { ref: "anchor", class: _vm.anchorClass, attrs: { "id": !_vm.ariaLabelledBy && _vm.labelledBy } }, [_vm._t("anchor", function() {
174
173
  return [_c("dt-button", { style: {
175
174
  "width": _vm.maxWidth
176
- }, attrs: { "importance": "clear", "kind": "muted", "aria-controls": _vm.id, "aria-expanded": `${_vm.isOpen}` }, on: { "click": _vm.defaultToggleOpen } }, [_vm.isOpen ? _c("dt-icon-chevron-down", { staticClass: "d-collapsible__icon", attrs: { "size": "300" } }) : _c("dt-icon-chevron-right", { staticClass: "d-collapsible__icon", attrs: { "size": "300" } }), _c("span", { staticClass: "d-collapsible__anchor-text", attrs: { "title": _vm.anchorText } }, [_vm._v(" " + _vm._s(_vm.anchorText) + " ")])], 1)];
175
+ }, attrs: { "importance": "clear", "kind": "muted", "aria-controls": _vm.id, "aria-expanded": `${_vm.isOpen}` }, on: { "click": _vm.defaultToggleOpen } }, [_c("dt-icon", { staticClass: "d-collapsible__icon", attrs: { "name": _vm.isOpen ? "chevron-down" : "chevron-right", "size": "300" } }), _c("span", { staticClass: "d-collapsible__anchor-text", attrs: { "title": _vm.anchorText } }, [_vm._v(" " + _vm._s(_vm.anchorText) + " ")])], 1)];
177
176
  }, { "attrs": {
178
177
  "aria-controls": _vm.id,
179
178
  "aria-expanded": _vm.isOpen.toString(),
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible.vue.cjs","sources":["../../../components/collapsible/collapsible.vue"],"sourcesContent":["<template>\n <component\n :is=\"elementType\"\n ref=\"collapsible\"\n v-on=\"$listeners\"\n >\n <!-- Element for capturing keypress events -->\n <div\n :id=\"!ariaLabelledBy && labelledBy\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n >\n <!-- @slot Slot for the anchor element that toggles the collapsible content -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-controls': id,\n 'aria-expanded': isOpen.toString(),\n 'role': 'button',\n }\"\n >\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-controls=\"id\"\n :aria-expanded=\"`${isOpen}`\"\n :style=\"{\n 'width': maxWidth,\n }\"\n @click=\"defaultToggleOpen\"\n >\n <dt-icon-chevron-down\n v-if=\"isOpen\"\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <dt-icon-chevron-right\n v-else\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <span\n class=\"d-collapsible__anchor-text\"\n :title=\"anchorText\"\n >\n {{ anchorText }}\n </span>\n </dt-button>\n </slot>\n </div>\n <dt-collapsible-lazy-show\n :id=\"id\"\n ref=\"contentWrapper\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :show=\"isOpen\"\n :element-type=\"contentElementType\"\n :class=\"contentClass\"\n :style=\"{\n 'max-height': maxHeight,\n 'max-width': maxWidth,\n }\"\n data-qa=\"dt-collapsible--content\"\n tabindex=\"-1\"\n appear\n v-on=\"$listeners\"\n @after-leave=\"onLeaveTransitionComplete\"\n @after-enter=\"onEnterTransitionComplete\"\n >\n <!-- @slot Slot for the collapsible element that is expanded by the anchor -->\n <slot\n name=\"content\"\n />\n </dt-collapsible-lazy-show>\n </component>\n</template>\n\n<script>\nimport { getUniqueString } from '@/common/utils';\nimport DtCollapsibleLazyShow from './collapsible_lazy_show.vue';\nimport { DtButton } from '@/components/button';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { DtIconChevronDown, DtIconChevronRight } from '@dialpad/dialtone-icons/vue2';\n\n/**\n * A collapsible is a component consisting of an interactive anchor that toggled the expandable/collapsible element.\n * @see https://dialtone.dialpad.com/components/collapsible.html\n */\nexport default {\n name: 'DtCollapsible',\n\n components: {\n DtButton,\n DtCollapsibleLazyShow,\n DtLazyShow,\n DtIconChevronDown,\n DtIconChevronRight,\n },\n\n props: {\n /**\n * Text that is displayed on the anchor if nothing is passed in the slot.\n * Ignored if the anchor slot is used.\n */\n anchorText: {\n type: String,\n default: null,\n },\n\n /**\n * Controls whether the collapsible is shown. Leaving this null will have the collapsible start\n * expanded and trigger on click by default. If you set this value, the default trigger\n * behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The id of the content wrapper.\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * HTML element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n contentElementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Additional class name for the anchor wrapper element.\n */\n anchorClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * The maximum width of the anchor and collapsible element.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: null,\n },\n\n /**\n * The maximum height of the collapsible element.\n * Possible units rem|px|%|em\n */\n maxHeight: {\n type: String,\n default: null,\n },\n\n /**\n * Label on the collapsible content. Should provide this or ariaLabelledBy but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Id of the element that labels the collapsible content. Defaults to the anchor element.\n * Should provide this or ariaLabel but not both.\n */\n ariaLabelledBy: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Event fired when the content is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n ],\n\n data () {\n return {\n isOpen: true,\n };\n },\n\n computed: {\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor\n return this.ariaLabelledBy || (!this.ariaLabel && getUniqueString('DtCollapsible__anchor'));\n },\n },\n\n watch: {\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n },\n\n mounted () {\n this.validateProperAnchor();\n },\n\n methods: {\n onLeaveTransitionComplete () {\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n onEnterTransitionComplete () {\n this.$emit('opened', true, this.$refs.content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n defaultToggleOpen () {\n if (this.open === null) {\n this.toggleOpen();\n }\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n validateProperAnchor () {\n if (!this.anchorText && !this.$scopedSlots.anchor) {\n console.error('anchor text and anchor slot content cannot both be falsy');\n }\n },\n },\n};\n</script>\n"],"names":["DtButton","DtCollapsibleLazyShow","DtLazyShow","DtIconChevronDown","DtIconChevronRight","getUniqueString"],"mappings":";;;;;;;AAyFA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA;AAAAA,IACA,uBAAAC;AAAAA,IACA,YAAAC;AAAAA,IACA,mBAAAC,KAAA;AAAA,IACA,oBAAAC,KAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAC,aAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;A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AAA,CAAA,KAAA,cAAA,CAAA,KAAA,aAAA,QAAA;AACA,gBAAA,MAAA,0DAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"collapsible.vue.cjs","sources":["../../../components/collapsible/collapsible.vue"],"sourcesContent":["<template>\n <component\n :is=\"elementType\"\n ref=\"collapsible\"\n v-on=\"$listeners\"\n >\n <!-- Element for capturing keypress events -->\n <div\n :id=\"!ariaLabelledBy && labelledBy\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n >\n <!-- @slot Slot for the anchor element that toggles the collapsible content -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-controls': id,\n 'aria-expanded': isOpen.toString(),\n 'role': 'button',\n }\"\n >\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-controls=\"id\"\n :aria-expanded=\"`${isOpen}`\"\n :style=\"{\n 'width': maxWidth,\n }\"\n @click=\"defaultToggleOpen\"\n >\n <dt-icon\n :name=\" isOpen ? 'chevron-down' : 'chevron-right'\"\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <span\n class=\"d-collapsible__anchor-text\"\n :title=\"anchorText\"\n >\n {{ anchorText }}\n </span>\n </dt-button>\n </slot>\n </div>\n <dt-collapsible-lazy-show\n :id=\"id\"\n ref=\"contentWrapper\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :show=\"isOpen\"\n :element-type=\"contentElementType\"\n :class=\"contentClass\"\n :style=\"{\n 'max-height': maxHeight,\n 'max-width': maxWidth,\n }\"\n data-qa=\"dt-collapsible--content\"\n tabindex=\"-1\"\n appear\n v-on=\"$listeners\"\n @after-leave=\"onLeaveTransitionComplete\"\n @after-enter=\"onEnterTransitionComplete\"\n >\n <!-- @slot Slot for the collapsible element that is expanded by the anchor -->\n <slot\n name=\"content\"\n />\n </dt-collapsible-lazy-show>\n </component>\n</template>\n\n<script>\nimport { getUniqueString } from '@/common/utils';\nimport DtCollapsibleLazyShow from './collapsible_lazy_show.vue';\nimport { DtButton } from '@/components/button';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { DtIcon } from '@/components/icon';\n\n/**\n * A collapsible is a component consisting of an interactive anchor that toggled the expandable/collapsible element.\n * @see https://dialtone.dialpad.com/components/collapsible.html\n */\nexport default {\n name: 'DtCollapsible',\n\n components: {\n DtButton,\n DtCollapsibleLazyShow,\n DtLazyShow,\n DtIcon,\n },\n\n props: {\n /**\n * Text that is displayed on the anchor if nothing is passed in the slot.\n * Ignored if the anchor slot is used.\n */\n anchorText: {\n type: String,\n default: null,\n },\n\n /**\n * Controls whether the collapsible is shown. Leaving this null will have the collapsible start\n * expanded and trigger on click by default. If you set this value, the default trigger\n * behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The id of the content wrapper.\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * HTML element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n contentElementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Additional class name for the anchor wrapper element.\n */\n anchorClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * The maximum width of the anchor and collapsible element.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: null,\n },\n\n /**\n * The maximum height of the collapsible element.\n * Possible units rem|px|%|em\n */\n maxHeight: {\n type: String,\n default: null,\n },\n\n /**\n * Label on the collapsible content. Should provide this or ariaLabelledBy but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Id of the element that labels the collapsible content. Defaults to the anchor element.\n * Should provide this or ariaLabel but not both.\n */\n ariaLabelledBy: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Event fired when the content is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n ],\n\n data () {\n return {\n isOpen: true,\n };\n },\n\n computed: {\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor\n return this.ariaLabelledBy || (!this.ariaLabel && getUniqueString('DtCollapsible__anchor'));\n },\n },\n\n watch: {\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n },\n\n mounted () {\n this.validateProperAnchor();\n },\n\n methods: {\n onLeaveTransitionComplete () {\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n onEnterTransitionComplete () {\n this.$emit('opened', true, this.$refs.content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n defaultToggleOpen () {\n if (this.open === null) {\n this.toggleOpen();\n }\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n validateProperAnchor () {\n if (!this.anchorText && !this.$scopedSlots.anchor) {\n console.error('anchor text and anchor slot content cannot both be falsy');\n }\n },\n },\n};\n</script>\n"],"names":["DtButton","DtCollapsibleLazyShow","DtLazyShow","DtIcon","getUniqueString"],"mappings":";;;;;;;AAoFA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA;AAAAA,IACA,uBAAAC;AAAAA,IACA,YAAAC;AAAAA,IACA,QAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AA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A,eAAA,SAAA;AAAA,QACA;AAAA,MACA;AAAA,MAEA,WAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,SAAA,qBAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,4BAAA;AACA,WAAA,MAAA,UAAA,KAAA;AACA,UAAA,KAAA,SAAA,MAAA;AACA,aAAA,MAAA,eAAA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,4BAAA;AACA,WAAA,MAAA,UAAA,MAAA,KAAA,MAAA,OAAA;AACA,UAAA,KAAA,SAAA,MAAA;AACA,aAAA,MAAA,eAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,oBAAA;AACA,UAAA,KAAA,SAAA,MAAA;AACA,aAAA,WAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,aAAA;AACA,WAAA,SAAA,CAAA,KAAA;AAAA,IACA;AAAA,IAEA,uBAAA;AACA,UAAA,CAAA,KAAA,cAAA,CAAA,KAAA,aAAA,QAAA;AACA,gBAAA,MAAA,0DAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,17 +1,16 @@
1
1
  import { getUniqueString } from "../../common/utils.js";
2
2
  import DtCollapsibleLazyShow from "./collapsible_lazy_show.vue.js";
3
- import { DtIconChevronDown, DtIconChevronRight } from "@dialpad/dialtone-icons/vue2";
4
3
  import normalizeComponent from "../../_virtual/_plugin-vue2_normalizer.js";
5
4
  import DtButton from "../button/button.vue.js";
6
5
  import DtLazyShow from "../lazy_show/lazy_show.vue.js";
6
+ import DtIcon from "../icon/icon.vue.js";
7
7
  const _sfc_main = {
8
8
  name: "DtCollapsible",
9
9
  components: {
10
10
  DtButton,
11
11
  DtCollapsibleLazyShow,
12
12
  DtLazyShow,
13
- DtIconChevronDown,
14
- DtIconChevronRight
13
+ DtIcon
15
14
  },
16
15
  props: {
17
16
  /**
@@ -172,7 +171,7 @@ var _sfc_render = function render() {
172
171
  return _c(_vm.elementType, _vm._g({ ref: "collapsible", tag: "component" }, _vm.$listeners), [_c("div", { ref: "anchor", class: _vm.anchorClass, attrs: { "id": !_vm.ariaLabelledBy && _vm.labelledBy } }, [_vm._t("anchor", function() {
173
172
  return [_c("dt-button", { style: {
174
173
  "width": _vm.maxWidth
175
- }, attrs: { "importance": "clear", "kind": "muted", "aria-controls": _vm.id, "aria-expanded": `${_vm.isOpen}` }, on: { "click": _vm.defaultToggleOpen } }, [_vm.isOpen ? _c("dt-icon-chevron-down", { staticClass: "d-collapsible__icon", attrs: { "size": "300" } }) : _c("dt-icon-chevron-right", { staticClass: "d-collapsible__icon", attrs: { "size": "300" } }), _c("span", { staticClass: "d-collapsible__anchor-text", attrs: { "title": _vm.anchorText } }, [_vm._v(" " + _vm._s(_vm.anchorText) + " ")])], 1)];
174
+ }, attrs: { "importance": "clear", "kind": "muted", "aria-controls": _vm.id, "aria-expanded": `${_vm.isOpen}` }, on: { "click": _vm.defaultToggleOpen } }, [_c("dt-icon", { staticClass: "d-collapsible__icon", attrs: { "name": _vm.isOpen ? "chevron-down" : "chevron-right", "size": "300" } }), _c("span", { staticClass: "d-collapsible__anchor-text", attrs: { "title": _vm.anchorText } }, [_vm._v(" " + _vm._s(_vm.anchorText) + " ")])], 1)];
176
175
  }, { "attrs": {
177
176
  "aria-controls": _vm.id,
178
177
  "aria-expanded": _vm.isOpen.toString(),
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible.vue.js","sources":["../../../components/collapsible/collapsible.vue"],"sourcesContent":["<template>\n <component\n :is=\"elementType\"\n ref=\"collapsible\"\n v-on=\"$listeners\"\n >\n <!-- Element for capturing keypress events -->\n <div\n :id=\"!ariaLabelledBy && labelledBy\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n >\n <!-- @slot Slot for the anchor element that toggles the collapsible content -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-controls': id,\n 'aria-expanded': isOpen.toString(),\n 'role': 'button',\n }\"\n >\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-controls=\"id\"\n :aria-expanded=\"`${isOpen}`\"\n :style=\"{\n 'width': maxWidth,\n }\"\n @click=\"defaultToggleOpen\"\n >\n <dt-icon-chevron-down\n v-if=\"isOpen\"\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <dt-icon-chevron-right\n v-else\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <span\n class=\"d-collapsible__anchor-text\"\n :title=\"anchorText\"\n >\n {{ anchorText }}\n </span>\n </dt-button>\n </slot>\n </div>\n <dt-collapsible-lazy-show\n :id=\"id\"\n ref=\"contentWrapper\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :show=\"isOpen\"\n :element-type=\"contentElementType\"\n :class=\"contentClass\"\n :style=\"{\n 'max-height': maxHeight,\n 'max-width': maxWidth,\n }\"\n data-qa=\"dt-collapsible--content\"\n tabindex=\"-1\"\n appear\n v-on=\"$listeners\"\n @after-leave=\"onLeaveTransitionComplete\"\n @after-enter=\"onEnterTransitionComplete\"\n >\n <!-- @slot Slot for the collapsible element that is expanded by the anchor -->\n <slot\n name=\"content\"\n />\n </dt-collapsible-lazy-show>\n </component>\n</template>\n\n<script>\nimport { getUniqueString } from '@/common/utils';\nimport DtCollapsibleLazyShow from './collapsible_lazy_show.vue';\nimport { DtButton } from '@/components/button';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { DtIconChevronDown, DtIconChevronRight } from '@dialpad/dialtone-icons/vue2';\n\n/**\n * A collapsible is a component consisting of an interactive anchor that toggled the expandable/collapsible element.\n * @see https://dialtone.dialpad.com/components/collapsible.html\n */\nexport default {\n name: 'DtCollapsible',\n\n components: {\n DtButton,\n DtCollapsibleLazyShow,\n DtLazyShow,\n DtIconChevronDown,\n DtIconChevronRight,\n },\n\n props: {\n /**\n * Text that is displayed on the anchor if nothing is passed in the slot.\n * Ignored if the anchor slot is used.\n */\n anchorText: {\n type: String,\n default: null,\n },\n\n /**\n * Controls whether the collapsible is shown. Leaving this null will have the collapsible start\n * expanded and trigger on click by default. If you set this value, the default trigger\n * behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The id of the content wrapper.\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * HTML element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n contentElementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Additional class name for the anchor wrapper element.\n */\n anchorClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * The maximum width of the anchor and collapsible element.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: null,\n },\n\n /**\n * The maximum height of the collapsible element.\n * Possible units rem|px|%|em\n */\n maxHeight: {\n type: String,\n default: null,\n },\n\n /**\n * Label on the collapsible content. Should provide this or ariaLabelledBy but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Id of the element that labels the collapsible content. Defaults to the anchor element.\n * Should provide this or ariaLabel but not both.\n */\n ariaLabelledBy: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Event fired when the content is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n ],\n\n data () {\n return {\n isOpen: true,\n };\n },\n\n computed: {\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor\n return this.ariaLabelledBy || (!this.ariaLabel && getUniqueString('DtCollapsible__anchor'));\n },\n },\n\n watch: {\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n },\n\n mounted () {\n this.validateProperAnchor();\n },\n\n methods: {\n onLeaveTransitionComplete () {\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n onEnterTransitionComplete () {\n this.$emit('opened', true, this.$refs.content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n defaultToggleOpen () {\n if (this.open === null) {\n this.toggleOpen();\n }\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n validateProperAnchor () {\n if (!this.anchorText && !this.$scopedSlots.anchor) {\n console.error('anchor text and anchor slot content cannot both be falsy');\n }\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;;AAyFA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,cAAA;AAAA,MACA,MAAA,CAAA,QAAA,OAAA,MAAA;AAAA,MACA,SAA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,MACA;AAAA,IACA;AAAA,IAEA,aAAA;AACA,WAAA,SAAA,CAAA,KAAA;AAAA,IACA;AAAA,IAEA,uBAAA;AACA,UAAA,CAAA,KAAA,cAAA,CAAA,KAAA,aAAA,QAAA;AACA,gBAAA,MAAA,0DAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"collapsible.vue.js","sources":["../../../components/collapsible/collapsible.vue"],"sourcesContent":["<template>\n <component\n :is=\"elementType\"\n ref=\"collapsible\"\n v-on=\"$listeners\"\n >\n <!-- Element for capturing keypress events -->\n <div\n :id=\"!ariaLabelledBy && labelledBy\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n >\n <!-- @slot Slot for the anchor element that toggles the collapsible content -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-controls': id,\n 'aria-expanded': isOpen.toString(),\n 'role': 'button',\n }\"\n >\n <dt-button\n importance=\"clear\"\n kind=\"muted\"\n :aria-controls=\"id\"\n :aria-expanded=\"`${isOpen}`\"\n :style=\"{\n 'width': maxWidth,\n }\"\n @click=\"defaultToggleOpen\"\n >\n <dt-icon\n :name=\" isOpen ? 'chevron-down' : 'chevron-right'\"\n class=\"d-collapsible__icon\"\n size=\"300\"\n />\n <span\n class=\"d-collapsible__anchor-text\"\n :title=\"anchorText\"\n >\n {{ anchorText }}\n </span>\n </dt-button>\n </slot>\n </div>\n <dt-collapsible-lazy-show\n :id=\"id\"\n ref=\"contentWrapper\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :show=\"isOpen\"\n :element-type=\"contentElementType\"\n :class=\"contentClass\"\n :style=\"{\n 'max-height': maxHeight,\n 'max-width': maxWidth,\n }\"\n data-qa=\"dt-collapsible--content\"\n tabindex=\"-1\"\n appear\n v-on=\"$listeners\"\n @after-leave=\"onLeaveTransitionComplete\"\n @after-enter=\"onEnterTransitionComplete\"\n >\n <!-- @slot Slot for the collapsible element that is expanded by the anchor -->\n <slot\n name=\"content\"\n />\n </dt-collapsible-lazy-show>\n </component>\n</template>\n\n<script>\nimport { getUniqueString } from '@/common/utils';\nimport DtCollapsibleLazyShow from './collapsible_lazy_show.vue';\nimport { DtButton } from '@/components/button';\nimport { DtLazyShow } from '@/components/lazy_show';\nimport { DtIcon } from '@/components/icon';\n\n/**\n * A collapsible is a component consisting of an interactive anchor that toggled the expandable/collapsible element.\n * @see https://dialtone.dialpad.com/components/collapsible.html\n */\nexport default {\n name: 'DtCollapsible',\n\n components: {\n DtButton,\n DtCollapsibleLazyShow,\n DtLazyShow,\n DtIcon,\n },\n\n props: {\n /**\n * Text that is displayed on the anchor if nothing is passed in the slot.\n * Ignored if the anchor slot is used.\n */\n anchorText: {\n type: String,\n default: null,\n },\n\n /**\n * Controls whether the collapsible is shown. Leaving this null will have the collapsible start\n * expanded and trigger on click by default. If you set this value, the default trigger\n * behavior will be disabled, and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n open: {\n type: Boolean,\n default: null,\n },\n\n /**\n * The id of the content wrapper.\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * HTML element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * HTML element type (tag name) of the content wrapper element.\n */\n contentElementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Additional class name for the anchor wrapper element.\n */\n anchorClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: null,\n },\n\n /**\n * The maximum width of the anchor and collapsible element.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: null,\n },\n\n /**\n * The maximum height of the collapsible element.\n * Possible units rem|px|%|em\n */\n maxHeight: {\n type: String,\n default: null,\n },\n\n /**\n * Label on the collapsible content. Should provide this or ariaLabelledBy but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Id of the element that labels the collapsible content. Defaults to the anchor element.\n * Should provide this or ariaLabel but not both.\n */\n ariaLabelledBy: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Event fired when the content is shown or hidden\n *\n * @event opened\n * @type {Boolean}\n */\n 'opened',\n ],\n\n data () {\n return {\n isOpen: true,\n };\n },\n\n computed: {\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor\n return this.ariaLabelledBy || (!this.ariaLabel && getUniqueString('DtCollapsible__anchor'));\n },\n },\n\n watch: {\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n },\n\n immediate: true,\n },\n },\n\n mounted () {\n this.validateProperAnchor();\n },\n\n methods: {\n onLeaveTransitionComplete () {\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n onEnterTransitionComplete () {\n this.$emit('opened', true, this.$refs.content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n defaultToggleOpen () {\n if (this.open === null) {\n this.toggleOpen();\n }\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n validateProperAnchor () {\n if (!this.anchorText && !this.$scopedSlots.anchor) {\n console.error('anchor text and anchor slot content cannot both be falsy');\n }\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;;;;AAoFA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;A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