@dialpad/dialtone 9.73.0-beta.2 → 9.74.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (456) hide show
  1. package/dist/tokens/doc.json +16912 -16912
  2. package/dist/vue2/common/sr_only_close_button.vue.cjs +3 -3
  3. package/dist/vue2/common/sr_only_close_button.vue.cjs.map +1 -1
  4. package/dist/vue2/common/sr_only_close_button.vue.js +3 -3
  5. package/dist/vue2/common/sr_only_close_button.vue.js.map +1 -1
  6. package/dist/vue2/common/storybook_utils.cjs +8 -0
  7. package/dist/vue2/common/storybook_utils.cjs.map +1 -0
  8. package/dist/vue2/common/storybook_utils.js +8 -0
  9. package/dist/vue2/common/storybook_utils.js.map +1 -0
  10. package/dist/vue2/component-documentation.json +1 -1
  11. package/dist/vue2/components/avatar/avatar.vue.cjs +24 -13
  12. package/dist/vue2/components/avatar/avatar.vue.cjs.map +1 -1
  13. package/dist/vue2/components/avatar/avatar.vue.js +24 -13
  14. package/dist/vue2/components/avatar/avatar.vue.js.map +1 -1
  15. package/dist/vue2/components/badge/badge.vue.cjs +34 -13
  16. package/dist/vue2/components/badge/badge.vue.cjs.map +1 -1
  17. package/dist/vue2/components/badge/badge.vue.js +34 -13
  18. package/dist/vue2/components/badge/badge.vue.js.map +1 -1
  19. package/dist/vue2/components/chip/chip.vue.cjs +4 -4
  20. package/dist/vue2/components/chip/chip.vue.cjs.map +1 -1
  21. package/dist/vue2/components/chip/chip.vue.js +4 -4
  22. package/dist/vue2/components/chip/chip.vue.js.map +1 -1
  23. package/dist/vue2/components/collapsible/collapsible.vue.cjs +3 -4
  24. package/dist/vue2/components/collapsible/collapsible.vue.cjs.map +1 -1
  25. package/dist/vue2/components/collapsible/collapsible.vue.js +3 -4
  26. package/dist/vue2/components/collapsible/collapsible.vue.js.map +1 -1
  27. package/dist/vue2/components/datepicker/modules/month-year-picker.vue.cjs +6 -14
  28. package/dist/vue2/components/datepicker/modules/month-year-picker.vue.cjs.map +1 -1
  29. package/dist/vue2/components/datepicker/modules/month-year-picker.vue.js +6 -14
  30. package/dist/vue2/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
  31. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs +5 -6
  32. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
  33. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js +5 -6
  34. package/dist/vue2/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
  35. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs +14 -23
  36. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
  37. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js +14 -23
  38. package/dist/vue2/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
  39. package/dist/vue2/components/empty_state/empty_state.vue.cjs +80 -20
  40. package/dist/vue2/components/empty_state/empty_state.vue.cjs.map +1 -1
  41. package/dist/vue2/components/empty_state/empty_state.vue.js +81 -21
  42. package/dist/vue2/components/empty_state/empty_state.vue.js.map +1 -1
  43. package/dist/vue2/components/empty_state/empty_state_constants.cjs +0 -18
  44. package/dist/vue2/components/empty_state/empty_state_constants.cjs.map +1 -1
  45. package/dist/vue2/components/empty_state/empty_state_constants.js +0 -18
  46. package/dist/vue2/components/empty_state/empty_state_constants.js.map +1 -1
  47. package/dist/vue2/components/icon/icon.vue.cjs +2 -2
  48. package/dist/vue2/components/icon/icon.vue.js +2 -2
  49. package/dist/vue2/components/illustration/illustration.vue.cjs +2 -2
  50. package/dist/vue2/components/illustration/illustration.vue.js +2 -2
  51. package/dist/vue2/components/image_viewer/image_viewer.vue.cjs +4 -4
  52. package/dist/vue2/components/image_viewer/image_viewer.vue.cjs.map +1 -1
  53. package/dist/vue2/components/image_viewer/image_viewer.vue.js +4 -4
  54. package/dist/vue2/components/image_viewer/image_viewer.vue.js.map +1 -1
  55. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +9 -24
  56. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.cjs.map +1 -1
  57. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.js +7 -22
  58. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut.vue.js.map +1 -1
  59. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.cjs +14 -8
  60. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.cjs.map +1 -1
  61. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.js +15 -9
  62. package/dist/vue2/components/keyboard_shortcut/keyboard_shortcut_constants.js.map +1 -1
  63. package/dist/vue2/components/list_item/list_item.vue.cjs +3 -3
  64. package/dist/vue2/components/list_item/list_item.vue.cjs.map +1 -1
  65. package/dist/vue2/components/list_item/list_item.vue.js +3 -3
  66. package/dist/vue2/components/list_item/list_item.vue.js.map +1 -1
  67. package/dist/vue2/components/modal/modal.vue.cjs +4 -4
  68. package/dist/vue2/components/modal/modal.vue.cjs.map +1 -1
  69. package/dist/vue2/components/modal/modal.vue.js +4 -4
  70. package/dist/vue2/components/modal/modal.vue.js.map +1 -1
  71. package/dist/vue2/components/notice/notice_action.vue.cjs +4 -4
  72. package/dist/vue2/components/notice/notice_action.vue.cjs.map +1 -1
  73. package/dist/vue2/components/notice/notice_action.vue.js +4 -4
  74. package/dist/vue2/components/notice/notice_action.vue.js.map +1 -1
  75. package/dist/vue2/components/notice/notice_icon.vue.cjs +8 -12
  76. package/dist/vue2/components/notice/notice_icon.vue.cjs.map +1 -1
  77. package/dist/vue2/components/notice/notice_icon.vue.js +8 -12
  78. package/dist/vue2/components/notice/notice_icon.vue.js.map +1 -1
  79. package/dist/vue2/components/pagination/pagination.vue.cjs +5 -11
  80. package/dist/vue2/components/pagination/pagination.vue.cjs.map +1 -1
  81. package/dist/vue2/components/pagination/pagination.vue.js +5 -11
  82. package/dist/vue2/components/pagination/pagination.vue.js.map +1 -1
  83. package/dist/vue2/components/popover/popover_header_footer.vue.cjs +4 -4
  84. package/dist/vue2/components/popover/popover_header_footer.vue.cjs.map +1 -1
  85. package/dist/vue2/components/popover/popover_header_footer.vue.js +4 -4
  86. package/dist/vue2/components/popover/popover_header_footer.vue.js.map +1 -1
  87. package/dist/vue2/components/tooltip/tooltip.vue.cjs +13 -6
  88. package/dist/vue2/components/tooltip/tooltip.vue.cjs.map +1 -1
  89. package/dist/vue2/components/tooltip/tooltip.vue.js +14 -7
  90. package/dist/vue2/components/tooltip/tooltip.vue.js.map +1 -1
  91. package/dist/vue2/dialtone-vue.cjs +3 -0
  92. package/dist/vue2/dialtone-vue.cjs.map +1 -1
  93. package/dist/vue2/dialtone-vue.js +5 -2
  94. package/dist/vue2/lib/general-row.cjs +1 -0
  95. package/dist/vue2/lib/general-row.cjs.map +1 -1
  96. package/dist/vue2/lib/general-row.js +2 -1
  97. package/dist/vue2/lib/keyboard-shortcut.cjs +2 -0
  98. package/dist/vue2/lib/keyboard-shortcut.cjs.map +1 -1
  99. package/dist/vue2/lib/keyboard-shortcut.js +4 -2
  100. package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +5 -5
  101. package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
  102. package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +5 -5
  103. package/dist/vue2/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
  104. package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.cjs +5 -25
  105. package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.cjs.map +1 -1
  106. package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.js +6 -26
  107. package/dist/vue2/recipes/cards/ivr_node/ivr_node.vue.js.map +1 -1
  108. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +19 -6
  109. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
  110. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +19 -6
  111. package/dist/vue2/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
  112. package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +4 -5
  113. package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
  114. package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +4 -5
  115. package/dist/vue2/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
  116. package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +3 -3
  117. package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
  118. package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +3 -3
  119. package/dist/vue2/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
  120. package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs +22 -35
  121. package/dist/vue2/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
  122. package/dist/vue2/recipes/conversation_view/editor/editor.vue.js +22 -35
  123. package/dist/vue2/recipes/conversation_view/editor/editor.vue.js.map +1 -1
  124. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +6 -7
  125. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
  126. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +6 -7
  127. package/dist/vue2/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
  128. package/dist/vue2/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs +17 -9
  129. package/dist/vue2/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs.map +1 -1
  130. package/dist/vue2/recipes/conversation_view/feed_pill/feed_item_pill.vue.js +17 -9
  131. package/dist/vue2/recipes/conversation_view/feed_pill/feed_item_pill.vue.js.map +1 -1
  132. package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs +5 -6
  133. package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs.map +1 -1
  134. package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js +5 -6
  135. package/dist/vue2/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js.map +1 -1
  136. package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.cjs +11 -22
  137. package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
  138. package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.js +11 -22
  139. package/dist/vue2/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
  140. package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +6 -6
  141. package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
  142. package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.js +6 -6
  143. package/dist/vue2/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
  144. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.cjs +10 -14
  145. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
  146. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.js +10 -14
  147. package/dist/vue2/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
  148. package/dist/vue2/recipes/leftbar/callbox/callbox.vue.cjs +3 -6
  149. package/dist/vue2/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
  150. package/dist/vue2/recipes/leftbar/callbox/callbox.vue.js +3 -6
  151. package/dist/vue2/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
  152. package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.cjs +5 -6
  153. package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.cjs.map +1 -1
  154. package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.js +5 -6
  155. package/dist/vue2/recipes/leftbar/contact_row/contact_row.vue.js.map +1 -1
  156. package/dist/vue2/recipes/leftbar/general_row/general_row.vue.cjs +7 -8
  157. package/dist/vue2/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
  158. package/dist/vue2/recipes/leftbar/general_row/general_row.vue.js +7 -8
  159. package/dist/vue2/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
  160. package/dist/vue2/recipes/leftbar/general_row/general_row_constants.cjs +17 -0
  161. package/dist/vue2/recipes/leftbar/general_row/general_row_constants.cjs.map +1 -1
  162. package/dist/vue2/recipes/leftbar/general_row/general_row_constants.js +17 -0
  163. package/dist/vue2/recipes/leftbar/general_row/general_row_constants.js.map +1 -1
  164. package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +4 -36
  165. package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
  166. package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +5 -37
  167. package/dist/vue2/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
  168. package/dist/vue2/recipes/leftbar/group_row/group_row.vue.cjs +3 -3
  169. package/dist/vue2/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
  170. package/dist/vue2/recipes/leftbar/group_row/group_row.vue.js +3 -3
  171. package/dist/vue2/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
  172. package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.cjs +3 -4
  173. package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.cjs.map +1 -1
  174. package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.js +3 -4
  175. package/dist/vue2/recipes/leftbar/unread_pill/unread_pill.vue.js.map +1 -1
  176. package/dist/vue2/style.css +132 -135
  177. package/dist/vue2/types/common/storybook_utils.d.ts +35 -0
  178. package/dist/vue2/types/common/storybook_utils.d.ts.map +1 -0
  179. package/dist/vue2/types/components/avatar/avatar.vue.d.ts +34 -4
  180. package/dist/vue2/types/components/avatar/avatar.vue.d.ts.map +1 -1
  181. package/dist/vue2/types/components/badge/badge.vue.d.ts +45 -16
  182. package/dist/vue2/types/components/badge/badge.vue.d.ts.map +1 -1
  183. package/dist/vue2/types/components/chip/chip.vue.d.ts +1 -1
  184. package/dist/vue2/types/components/collapsible/collapsible.vue.d.ts +1 -1
  185. package/dist/vue2/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
  186. package/dist/vue2/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts +67 -1
  187. package/dist/vue2/types/components/empty_state/empty_state_constants.d.ts +0 -27
  188. package/dist/vue2/types/components/keyboard_shortcut/index.d.ts +1 -1
  189. package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +15 -7
  190. package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
  191. package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts +11 -0
  192. package/dist/vue2/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts.map +1 -1
  193. package/dist/vue2/types/components/modal/modal.vue.d.ts +6 -4
  194. package/dist/vue2/types/components/modal/modal.vue.d.ts.map +1 -1
  195. package/dist/vue2/types/components/notice/notice_action.vue.d.ts +4 -5
  196. package/dist/vue2/types/components/notice/notice_action.vue.d.ts.map +1 -1
  197. package/dist/vue2/types/components/notice/notice_icon.vue.d.ts +1 -1
  198. package/dist/vue2/types/components/notice/notice_icon.vue.d.ts.map +1 -1
  199. package/dist/vue2/types/components/pagination/pagination.vue.d.ts.map +1 -1
  200. package/dist/vue2/types/components/split_button/split_button-omega.vue.d.ts +1 -1
  201. package/dist/vue2/types/components/tooltip/tooltip.vue.d.ts +12 -24
  202. package/dist/vue2/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
  203. package/dist/vue2/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
  204. package/dist/vue2/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
  205. package/dist/vue2/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  206. package/dist/vue2/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  207. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts +8 -8
  208. package/dist/vue2/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  209. package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -0
  210. package/dist/vue2/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  211. package/dist/vue2/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts +16 -2
  212. package/dist/vue2/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts.map +1 -1
  213. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +6 -4
  214. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  215. package/dist/vue2/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +16 -3
  216. package/dist/vue2/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
  217. package/dist/vue2/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
  218. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -0
  219. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  220. package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
  221. package/dist/vue2/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  222. package/dist/vue2/types/recipes/leftbar/general_row/general_row_constants.d.ts +6 -0
  223. package/dist/vue2/types/recipes/leftbar/general_row/general_row_constants.d.ts.map +1 -1
  224. package/dist/vue2/types/recipes/leftbar/general_row/index.d.ts +1 -1
  225. package/dist/vue2/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +1 -1
  226. package/dist/vue2/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  227. package/dist/vue3/common/sr_only_close_button.vue.cjs +4 -4
  228. package/dist/vue3/common/sr_only_close_button.vue.cjs.map +1 -1
  229. package/dist/vue3/common/sr_only_close_button.vue.js +4 -4
  230. package/dist/vue3/common/sr_only_close_button.vue.js.map +1 -1
  231. package/dist/vue3/common/storybook_utils.cjs +8 -0
  232. package/dist/vue3/common/storybook_utils.cjs.map +1 -0
  233. package/dist/vue3/common/storybook_utils.js +8 -0
  234. package/dist/vue3/common/storybook_utils.js.map +1 -0
  235. package/dist/vue3/component-documentation.json +1 -1
  236. package/dist/vue3/components/avatar/avatar.vue.cjs +41 -30
  237. package/dist/vue3/components/avatar/avatar.vue.cjs.map +1 -1
  238. package/dist/vue3/components/avatar/avatar.vue.js +43 -32
  239. package/dist/vue3/components/avatar/avatar.vue.js.map +1 -1
  240. package/dist/vue3/components/badge/badge.vue.cjs +39 -22
  241. package/dist/vue3/components/badge/badge.vue.cjs.map +1 -1
  242. package/dist/vue3/components/badge/badge.vue.js +40 -23
  243. package/dist/vue3/components/badge/badge.vue.js.map +1 -1
  244. package/dist/vue3/components/chip/chip.vue.cjs +7 -4
  245. package/dist/vue3/components/chip/chip.vue.cjs.map +1 -1
  246. package/dist/vue3/components/chip/chip.vue.js +7 -4
  247. package/dist/vue3/components/chip/chip.vue.js.map +1 -1
  248. package/dist/vue3/components/collapsible/collapsible.vue.cjs +6 -12
  249. package/dist/vue3/components/collapsible/collapsible.vue.cjs.map +1 -1
  250. package/dist/vue3/components/collapsible/collapsible.vue.js +6 -12
  251. package/dist/vue3/components/collapsible/collapsible.vue.js.map +1 -1
  252. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs +17 -5
  253. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.cjs.map +1 -1
  254. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js +17 -5
  255. package/dist/vue3/components/datepicker/modules/month-year-picker.vue.js.map +1 -1
  256. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs +9 -4
  257. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.cjs.map +1 -1
  258. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js +10 -5
  259. package/dist/vue3/components/emoji_picker/modules/emoji_search.vue.js.map +1 -1
  260. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs +14 -11
  261. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.cjs.map +1 -1
  262. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js +15 -12
  263. package/dist/vue3/components/emoji_picker/modules/emoji_tabset.vue.js.map +1 -1
  264. package/dist/vue3/components/empty_state/empty_state.vue.cjs +92 -19
  265. package/dist/vue3/components/empty_state/empty_state.vue.cjs.map +1 -1
  266. package/dist/vue3/components/empty_state/empty_state.vue.js +93 -20
  267. package/dist/vue3/components/empty_state/empty_state.vue.js.map +1 -1
  268. package/dist/vue3/components/empty_state/empty_state_constants.cjs +0 -18
  269. package/dist/vue3/components/empty_state/empty_state_constants.cjs.map +1 -1
  270. package/dist/vue3/components/empty_state/empty_state_constants.js +0 -18
  271. package/dist/vue3/components/empty_state/empty_state_constants.js.map +1 -1
  272. package/dist/vue3/components/icon/icon.vue.cjs +2 -2
  273. package/dist/vue3/components/icon/icon.vue.js +2 -2
  274. package/dist/vue3/components/illustration/illustration.vue.cjs +2 -2
  275. package/dist/vue3/components/illustration/illustration.vue.js +2 -2
  276. package/dist/vue3/components/image_viewer/image_viewer.vue.cjs +5 -4
  277. package/dist/vue3/components/image_viewer/image_viewer.vue.cjs.map +1 -1
  278. package/dist/vue3/components/image_viewer/image_viewer.vue.js +5 -4
  279. package/dist/vue3/components/image_viewer/image_viewer.vue.js.map +1 -1
  280. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.cjs +11 -24
  281. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.cjs.map +1 -1
  282. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.js +10 -23
  283. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut.vue.js.map +1 -1
  284. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.cjs +14 -8
  285. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.cjs.map +1 -1
  286. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.js +15 -9
  287. package/dist/vue3/components/keyboard_shortcut/keyboard_shortcut_constants.js.map +1 -1
  288. package/dist/vue3/components/list_item/list_item.vue.cjs +5 -4
  289. package/dist/vue3/components/list_item/list_item.vue.cjs.map +1 -1
  290. package/dist/vue3/components/list_item/list_item.vue.js +5 -4
  291. package/dist/vue3/components/list_item/list_item.vue.js.map +1 -1
  292. package/dist/vue3/components/modal/modal.vue.cjs +7 -4
  293. package/dist/vue3/components/modal/modal.vue.cjs.map +1 -1
  294. package/dist/vue3/components/modal/modal.vue.js +7 -4
  295. package/dist/vue3/components/modal/modal.vue.js.map +1 -1
  296. package/dist/vue3/components/notice/notice_action.vue.cjs +7 -4
  297. package/dist/vue3/components/notice/notice_action.vue.cjs.map +1 -1
  298. package/dist/vue3/components/notice/notice_action.vue.js +7 -4
  299. package/dist/vue3/components/notice/notice_action.vue.js.map +1 -1
  300. package/dist/vue3/components/notice/notice_icon.vue.cjs +12 -12
  301. package/dist/vue3/components/notice/notice_icon.vue.cjs.map +1 -1
  302. package/dist/vue3/components/notice/notice_icon.vue.js +13 -13
  303. package/dist/vue3/components/notice/notice_icon.vue.js.map +1 -1
  304. package/dist/vue3/components/pagination/pagination.vue.cjs +15 -10
  305. package/dist/vue3/components/pagination/pagination.vue.cjs.map +1 -1
  306. package/dist/vue3/components/pagination/pagination.vue.js +15 -10
  307. package/dist/vue3/components/pagination/pagination.vue.js.map +1 -1
  308. package/dist/vue3/components/popover/popover_header_footer.vue.cjs +7 -4
  309. package/dist/vue3/components/popover/popover_header_footer.vue.cjs.map +1 -1
  310. package/dist/vue3/components/popover/popover_header_footer.vue.js +7 -4
  311. package/dist/vue3/components/popover/popover_header_footer.vue.js.map +1 -1
  312. package/dist/vue3/components/tooltip/tooltip.vue.cjs +13 -6
  313. package/dist/vue3/components/tooltip/tooltip.vue.cjs.map +1 -1
  314. package/dist/vue3/components/tooltip/tooltip.vue.js +14 -7
  315. package/dist/vue3/components/tooltip/tooltip.vue.js.map +1 -1
  316. package/dist/vue3/dialtone-vue.cjs +3 -0
  317. package/dist/vue3/dialtone-vue.cjs.map +1 -1
  318. package/dist/vue3/dialtone-vue.js +5 -2
  319. package/dist/vue3/lib/general-row.cjs +1 -0
  320. package/dist/vue3/lib/general-row.cjs.map +1 -1
  321. package/dist/vue3/lib/general-row.js +2 -1
  322. package/dist/vue3/lib/keyboard-shortcut.cjs +2 -0
  323. package/dist/vue3/lib/keyboard-shortcut.cjs.map +1 -1
  324. package/dist/vue3/lib/keyboard-shortcut.js +4 -2
  325. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs +5 -4
  326. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.cjs.map +1 -1
  327. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js +5 -4
  328. package/dist/vue3/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.js.map +1 -1
  329. package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.cjs +11 -27
  330. package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.cjs.map +1 -1
  331. package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.js +13 -29
  332. package/dist/vue3/recipes/cards/ivr_node/ivr_node.vue.js.map +1 -1
  333. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs +19 -6
  334. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.cjs.map +1 -1
  335. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js +19 -6
  336. package/dist/vue3/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.js.map +1 -1
  337. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs +11 -7
  338. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.cjs.map +1 -1
  339. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js +11 -7
  340. package/dist/vue3/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.js.map +1 -1
  341. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs +7 -4
  342. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.cjs.map +1 -1
  343. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js +7 -4
  344. package/dist/vue3/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.js.map +1 -1
  345. package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs +25 -33
  346. package/dist/vue3/recipes/conversation_view/editor/editor.vue.cjs.map +1 -1
  347. package/dist/vue3/recipes/conversation_view/editor/editor.vue.js +26 -34
  348. package/dist/vue3/recipes/conversation_view/editor/editor.vue.js.map +1 -1
  349. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs +7 -14
  350. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.cjs.map +1 -1
  351. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js +8 -15
  352. package/dist/vue3/recipes/conversation_view/feed_item_row/feed_item_row.vue.js.map +1 -1
  353. package/dist/vue3/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs +25 -23
  354. package/dist/vue3/recipes/conversation_view/feed_pill/feed_item_pill.vue.cjs.map +1 -1
  355. package/dist/vue3/recipes/conversation_view/feed_pill/feed_item_pill.vue.js +26 -24
  356. package/dist/vue3/recipes/conversation_view/feed_pill/feed_item_pill.vue.js.map +1 -1
  357. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs +12 -8
  358. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.cjs.map +1 -1
  359. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js +12 -8
  360. package/dist/vue3/recipes/conversation_view/message_input/meeting_pill/MeetingPill.vue.js.map +1 -1
  361. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs +18 -29
  362. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.cjs.map +1 -1
  363. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js +18 -29
  364. package/dist/vue3/recipes/conversation_view/message_input/message_input.vue.js.map +1 -1
  365. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs +12 -6
  366. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.cjs.map +1 -1
  367. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js +12 -6
  368. package/dist/vue3/recipes/header/settings_menu_button/settings_menu_button.vue.js.map +1 -1
  369. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs +13 -33
  370. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.cjs.map +1 -1
  371. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js +14 -34
  372. package/dist/vue3/recipes/item_layout/contact_info/contact_info.vue.js.map +1 -1
  373. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs +4 -13
  374. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.cjs.map +1 -1
  375. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js +5 -14
  376. package/dist/vue3/recipes/leftbar/callbox/callbox.vue.js.map +1 -1
  377. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs +7 -13
  378. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.cjs.map +1 -1
  379. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js +8 -14
  380. package/dist/vue3/recipes/leftbar/contact_row/contact_row.vue.js.map +1 -1
  381. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs +13 -9
  382. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.cjs.map +1 -1
  383. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js +13 -9
  384. package/dist/vue3/recipes/leftbar/general_row/general_row.vue.js.map +1 -1
  385. package/dist/vue3/recipes/leftbar/general_row/general_row_constants.cjs +17 -0
  386. package/dist/vue3/recipes/leftbar/general_row/general_row_constants.cjs.map +1 -1
  387. package/dist/vue3/recipes/leftbar/general_row/general_row_constants.js +17 -0
  388. package/dist/vue3/recipes/leftbar/general_row/general_row_constants.js.map +1 -1
  389. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs +11 -39
  390. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.cjs.map +1 -1
  391. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js +13 -41
  392. package/dist/vue3/recipes/leftbar/general_row/leftbar_general_row_icon.vue.js.map +1 -1
  393. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs +7 -4
  394. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.cjs.map +1 -1
  395. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js +7 -4
  396. package/dist/vue3/recipes/leftbar/group_row/group_row.vue.js.map +1 -1
  397. package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.cjs +6 -11
  398. package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.cjs.map +1 -1
  399. package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.js +7 -12
  400. package/dist/vue3/recipes/leftbar/unread_pill/unread_pill.vue.js.map +1 -1
  401. package/dist/vue3/style.css +132 -135
  402. package/dist/vue3/types/common/storybook_utils.d.ts +25 -0
  403. package/dist/vue3/types/common/storybook_utils.d.ts.map +1 -0
  404. package/dist/vue3/types/components/avatar/avatar.vue.d.ts +33 -5
  405. package/dist/vue3/types/components/avatar/avatar.vue.d.ts.map +1 -1
  406. package/dist/vue3/types/components/badge/badge.vue.d.ts +34 -17
  407. package/dist/vue3/types/components/badge/badge.vue.d.ts.map +1 -1
  408. package/dist/vue3/types/components/chip/chip.vue.d.ts +1 -1
  409. package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts +1 -1
  410. package/dist/vue3/types/components/collapsible/collapsible.vue.d.ts.map +1 -1
  411. package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
  412. package/dist/vue3/types/components/empty_state/empty_state.vue.d.ts +0 -4
  413. package/dist/vue3/types/components/empty_state/empty_state.vue.d.ts.map +1 -1
  414. package/dist/vue3/types/components/empty_state/empty_state_constants.d.ts +0 -27
  415. package/dist/vue3/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  416. package/dist/vue3/types/components/keyboard_shortcut/index.d.ts +1 -1
  417. package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts +15 -210
  418. package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut.vue.d.ts.map +1 -1
  419. package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts +11 -0
  420. package/dist/vue3/types/components/keyboard_shortcut/keyboard_shortcut_constants.d.ts.map +1 -1
  421. package/dist/vue3/types/components/list_item/list_item.vue.d.ts +8 -2
  422. package/dist/vue3/types/components/list_item/list_item.vue.d.ts.map +1 -1
  423. package/dist/vue3/types/components/notice/notice_action.vue.d.ts +4 -5
  424. package/dist/vue3/types/components/notice/notice_action.vue.d.ts.map +1 -1
  425. package/dist/vue3/types/components/notice/notice_icon.vue.d.ts +1 -30
  426. package/dist/vue3/types/components/notice/notice_icon.vue.d.ts.map +1 -1
  427. package/dist/vue3/types/components/pagination/pagination.vue.d.ts.map +1 -1
  428. package/dist/vue3/types/components/split_button/split_button-omega.vue.d.ts +1 -1
  429. package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts +2 -8
  430. package/dist/vue3/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
  431. package/dist/vue3/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +1 -1
  432. package/dist/vue3/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +1 -1
  433. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts +1 -30
  434. package/dist/vue3/types/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  435. package/dist/vue3/types/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  436. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts +8 -240
  437. package/dist/vue3/types/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  438. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -0
  439. package/dist/vue3/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  440. package/dist/vue3/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts +16 -31
  441. package/dist/vue3/types/recipes/conversation_view/feed_pill/feed_item_pill.vue.d.ts.map +1 -1
  442. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts +6 -4
  443. package/dist/vue3/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  444. package/dist/vue3/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +16 -3
  445. package/dist/vue3/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -1
  446. package/dist/vue3/types/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
  447. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -0
  448. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  449. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
  450. package/dist/vue3/types/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  451. package/dist/vue3/types/recipes/leftbar/general_row/general_row_constants.d.ts +6 -0
  452. package/dist/vue3/types/recipes/leftbar/general_row/general_row_constants.d.ts.map +1 -1
  453. package/dist/vue3/types/recipes/leftbar/general_row/index.d.ts +1 -1
  454. package/dist/vue3/types/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +1 -30
  455. package/dist/vue3/types/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  456. package/package.json +3 -3
@@ -1,22 +1,18 @@
1
1
  "use strict";
2
- const vue2 = require("@dialpad/dialtone-icons/vue2");
3
2
  const notice_constants = require("./notice_constants.cjs");
4
3
  const _pluginVue2_normalizer = require("../../_virtual/_plugin-vue2_normalizer.cjs");
4
+ const icon = require("../icon/icon.vue.cjs");
5
5
  const kindToIcon = /* @__PURE__ */ new Map([
6
- ["info", vue2.DtIconInfo],
7
- ["success", vue2.DtIconCheckCircle],
8
- ["warning", vue2.DtIconAlertTriangle],
9
- ["error", vue2.DtIconAlertCircle],
10
- ["base", vue2.DtIconBell]
6
+ ["info", "info"],
7
+ ["success", "check-circle"],
8
+ ["warning", "alert-triangle"],
9
+ ["error", "alert-circle"],
10
+ ["base", "bell"]
11
11
  ]);
12
12
  const _sfc_main = {
13
13
  name: "DtNoticeIcon",
14
14
  components: {
15
- DtIconInfo: vue2.DtIconInfo,
16
- DtIconCheckCircle: vue2.DtIconCheckCircle,
17
- DtIconAlertTriangle: vue2.DtIconAlertTriangle,
18
- DtIconAlertCircle: vue2.DtIconAlertCircle,
19
- DtIconBell: vue2.DtIconBell
15
+ DtIcon: icon
20
16
  },
21
17
  props: {
22
18
  /**
@@ -40,7 +36,7 @@ const _sfc_main = {
40
36
  var _sfc_render = function render() {
41
37
  var _vm = this, _c = _vm._self._c;
42
38
  return _vm.defaultIcon || _vm.$slots.default ? _c("div", { staticClass: "d-notice__icon", attrs: { "aria-hidden": "true" } }, [_vm._t("default", function() {
43
- return [_c(_vm.defaultIcon, { tag: "component", attrs: { "size": "400" } })];
39
+ return [_c("dt-icon", { attrs: { "name": _vm.defaultIcon, "size": "400" } })];
44
40
  })], 2) : _vm._e();
45
41
  };
46
42
  var _sfc_staticRenderFns = [];
@@ -1 +1 @@
1
- {"version":3,"file":"notice_icon.vue.cjs","sources":["../../../components/notice/notice_icon.vue"],"sourcesContent":["<template>\n <div\n v-if=\"defaultIcon || $slots.default\"\n aria-hidden=\"true\"\n class=\"d-notice__icon\"\n >\n <!-- @slot Slot for the main content -->\n <slot>\n <component\n :is=\"defaultIcon\"\n size=\"400\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconCheckCircle,\n DtIconAlertTriangle,\n DtIconAlertCircle,\n DtIconBell,\n} from '@dialpad/dialtone-icons/vue2';\nimport { NOTICE_KINDS } from './notice_constants.js';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['success', DtIconCheckCircle],\n ['warning', DtIconAlertTriangle],\n ['error', DtIconAlertCircle],\n ['base', DtIconBell],\n]);\n\nexport default {\n name: 'DtNoticeIcon',\n\n components: {\n DtIconInfo,\n DtIconCheckCircle,\n DtIconAlertTriangle,\n DtIconAlertCircle,\n DtIconBell,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n"],"names":["DtIconInfo","DtIconCheckCircle","DtIconAlertTriangle","DtIconAlertCircle","DtIconBell","NOTICE_KINDS"],"mappings":";;;;AA0BA,MAAA,aAAA,oBAAA,IAAA;AAAA,EACA,CAAA,QAAAA,KAAAA,UAAA;AAAA,EACA,CAAA,WAAAC,KAAAA,iBAAA;AAAA,EACA,CAAA,WAAAC,KAAAA,mBAAA;AAAA,EACA,CAAA,SAAAC,KAAAA,iBAAA;AAAA,EACA,CAAA,QAAAC,KAAAA,UAAA;AACA,CAAA;AAEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,YAAAJ,KAAA;AAAA,IACA,mBAAAC,KAAA;AAAA,IACA,qBAAAC,KAAA;AAAA,IACA,mBAAAC,KAAA;AAAA,IACA,YAAAC,KAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,SAAA,MAAA;AACA,eAAAC,iBAAA,aAAA,SAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,cAAA;AACA,aAAA,WAAA,IAAA,KAAA,IAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"notice_icon.vue.cjs","sources":["../../../components/notice/notice_icon.vue"],"sourcesContent":["<template>\n <div\n v-if=\"defaultIcon || $slots.default\"\n aria-hidden=\"true\"\n class=\"d-notice__icon\"\n >\n <!-- @slot Slot for the main content -->\n <slot>\n <dt-icon\n :name=\"defaultIcon\"\n size=\"400\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport { DtIcon } from '@/components/icon';\nimport { NOTICE_KINDS } from './notice_constants';\n\nconst kindToIcon = new Map([\n ['info', 'info'],\n ['success', 'check-circle'],\n ['warning', 'alert-triangle'],\n ['error', 'alert-circle'],\n ['base', 'bell'],\n]);\n\nexport default {\n name: 'DtNoticeIcon',\n\n components: {\n DtIcon,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n"],"names":["DtIcon","NOTICE_KINDS"],"mappings":";;;;AAoBA,MAAA,aAAA,oBAAA,IAAA;AAAA,EACA,CAAA,QAAA,MAAA;AAAA,EACA,CAAA,WAAA,cAAA;AAAA,EACA,CAAA,WAAA,gBAAA;AAAA,EACA,CAAA,SAAA,cAAA;AAAA,EACA,CAAA,QAAA,MAAA;AACA,CAAA;AAEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,QAAAA;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,SAAA,MAAA;AACA,eAAAC,iBAAA,aAAA,SAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,cAAA;AACA,aAAA,WAAA,IAAA,KAAA,IAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
@@ -1,21 +1,17 @@
1
- import { DtIconInfo, DtIconCheckCircle, DtIconAlertTriangle, DtIconAlertCircle, DtIconBell } from "@dialpad/dialtone-icons/vue2";
2
1
  import { NOTICE_KINDS } from "./notice_constants.js";
3
2
  import normalizeComponent from "../../_virtual/_plugin-vue2_normalizer.js";
3
+ import DtIcon from "../icon/icon.vue.js";
4
4
  const kindToIcon = /* @__PURE__ */ new Map([
5
- ["info", DtIconInfo],
6
- ["success", DtIconCheckCircle],
7
- ["warning", DtIconAlertTriangle],
8
- ["error", DtIconAlertCircle],
9
- ["base", DtIconBell]
5
+ ["info", "info"],
6
+ ["success", "check-circle"],
7
+ ["warning", "alert-triangle"],
8
+ ["error", "alert-circle"],
9
+ ["base", "bell"]
10
10
  ]);
11
11
  const _sfc_main = {
12
12
  name: "DtNoticeIcon",
13
13
  components: {
14
- DtIconInfo,
15
- DtIconCheckCircle,
16
- DtIconAlertTriangle,
17
- DtIconAlertCircle,
18
- DtIconBell
14
+ DtIcon
19
15
  },
20
16
  props: {
21
17
  /**
@@ -39,7 +35,7 @@ const _sfc_main = {
39
35
  var _sfc_render = function render() {
40
36
  var _vm = this, _c = _vm._self._c;
41
37
  return _vm.defaultIcon || _vm.$slots.default ? _c("div", { staticClass: "d-notice__icon", attrs: { "aria-hidden": "true" } }, [_vm._t("default", function() {
42
- return [_c(_vm.defaultIcon, { tag: "component", attrs: { "size": "400" } })];
38
+ return [_c("dt-icon", { attrs: { "name": _vm.defaultIcon, "size": "400" } })];
43
39
  })], 2) : _vm._e();
44
40
  };
45
41
  var _sfc_staticRenderFns = [];
@@ -1 +1 @@
1
- {"version":3,"file":"notice_icon.vue.js","sources":["../../../components/notice/notice_icon.vue"],"sourcesContent":["<template>\n <div\n v-if=\"defaultIcon || $slots.default\"\n aria-hidden=\"true\"\n class=\"d-notice__icon\"\n >\n <!-- @slot Slot for the main content -->\n <slot>\n <component\n :is=\"defaultIcon\"\n size=\"400\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport {\n DtIconInfo,\n DtIconCheckCircle,\n DtIconAlertTriangle,\n DtIconAlertCircle,\n DtIconBell,\n} from '@dialpad/dialtone-icons/vue2';\nimport { NOTICE_KINDS } from './notice_constants.js';\n\nconst kindToIcon = new Map([\n ['info', DtIconInfo],\n ['success', DtIconCheckCircle],\n ['warning', DtIconAlertTriangle],\n ['error', DtIconAlertCircle],\n ['base', DtIconBell],\n]);\n\nexport default {\n name: 'DtNoticeIcon',\n\n components: {\n DtIconInfo,\n DtIconCheckCircle,\n DtIconAlertTriangle,\n DtIconAlertCircle,\n DtIconBell,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;AA0BA,MAAA,aAAA,oBAAA,IAAA;AAAA,EACA,CAAA,QAAA,UAAA;AAAA,EACA,CAAA,WAAA,iBAAA;AAAA,EACA,CAAA,WAAA,mBAAA;AAAA,EACA,CAAA,SAAA,iBAAA;AAAA,EACA,CAAA,QAAA,UAAA;AACA,CAAA;AAEA,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,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,SAAA,MAAA;AACA,eAAA,aAAA,SAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,cAAA;AACA,aAAA,WAAA,IAAA,KAAA,IAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"notice_icon.vue.js","sources":["../../../components/notice/notice_icon.vue"],"sourcesContent":["<template>\n <div\n v-if=\"defaultIcon || $slots.default\"\n aria-hidden=\"true\"\n class=\"d-notice__icon\"\n >\n <!-- @slot Slot for the main content -->\n <slot>\n <dt-icon\n :name=\"defaultIcon\"\n size=\"400\"\n />\n </slot>\n </div>\n</template>\n\n<script>\nimport { DtIcon } from '@/components/icon';\nimport { NOTICE_KINDS } from './notice_constants';\n\nconst kindToIcon = new Map([\n ['info', 'info'],\n ['success', 'check-circle'],\n ['warning', 'alert-triangle'],\n ['error', 'alert-circle'],\n ['base', 'bell'],\n]);\n\nexport default {\n name: 'DtNoticeIcon',\n\n components: {\n DtIcon,\n },\n\n props: {\n /**\n * Kind of icon\n * @values base, error, info, success, warning\n */\n kind: {\n type: String,\n default: 'base',\n validate (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n },\n\n computed: {\n defaultIcon () {\n return kindToIcon.get(this.kind);\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;AAoBA,MAAA,aAAA,oBAAA,IAAA;AAAA,EACA,CAAA,QAAA,MAAA;AAAA,EACA,CAAA,WAAA,cAAA;AAAA,EACA,CAAA,WAAA,gBAAA;AAAA,EACA,CAAA,SAAA,cAAA;AAAA,EACA,CAAA,QAAA,MAAA;AACA,CAAA;AAEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,SAAA,MAAA;AACA,eAAA,aAAA,SAAA,IAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,cAAA;AACA,aAAA,WAAA,IAAA,KAAA,IAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
@@ -1,14 +1,12 @@
1
1
  "use strict";
2
- const vue2 = require("@dialpad/dialtone-icons/vue2");
3
2
  const _pluginVue2_normalizer = require("../../_virtual/_plugin-vue2_normalizer.cjs");
4
3
  const button = require("../button/button.vue.cjs");
4
+ const icon = require("../icon/icon.vue.cjs");
5
5
  const _sfc_main = {
6
6
  name: "DtPagination",
7
7
  components: {
8
8
  DtButton: button,
9
- DtIconChevronLeft: vue2.DtIconChevronLeft,
10
- DtIconChevronRight: vue2.DtIconChevronRight,
11
- DtIconMoreHorizontal: vue2.DtIconMoreHorizontal
9
+ DtIcon: icon
12
10
  },
13
11
  props: {
14
12
  /**
@@ -125,17 +123,13 @@ var _sfc_render = function render() {
125
123
  var _vm = this, _c = _vm._self._c;
126
124
  return _c("nav", { staticClass: "d-pagination", attrs: { "aria-label": _vm.ariaLabel } }, [_c("dt-button", { staticClass: "d-pagination__button", class: _vm.isFirstPage ? "d-fc-black-300 d-bgc-transparent" : "d-fc-tertiary", attrs: { "data-qa": "dt-pagination-prev", "aria-label": _vm.prevAriaLabel, "kind": _vm.isFirstPage ? "default" : "muted", "importance": _vm.isFirstPage ? "primary" : "clear", "disabled": _vm.isFirstPage }, on: { "click": function($event) {
127
125
  return _vm.changePage(_vm.currentPage - 1);
128
- } }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
129
- return [_c("dt-icon-chevron-left", { attrs: { "size": "300" } })];
130
- }, proxy: true }]) }), _vm._l(_vm.pages, function(page, index) {
131
- return _c("div", { key: `page-${page}-${index}`, class: { "d-pagination__separator": isNaN(Number(page)) } }, [isNaN(Number(page)) ? _c("div", { staticClass: "d-pagination__separator-icon", attrs: { "data-qa": "dt-pagination-separator" } }, [_c("dt-icon-more-horizontal", { attrs: { "size": "300" } })], 1) : _c("dt-button", { attrs: { "aria-label": _vm.pageNumberAriaLabel(page), "kind": _vm.currentPage === page ? "default" : "muted", "importance": _vm.currentPage === page ? "primary" : "clear", "label-class": "" }, on: { "click": function($event) {
126
+ } } }, [_c("template", { slot: "icon" }, [_c("dt-icon", { attrs: { "name": "chevron-left", "size": "300" } })], 1)], 2), _vm._l(_vm.pages, function(page, index) {
127
+ return _c("div", { key: `page-${page}-${index}`, class: { "d-pagination__separator": isNaN(Number(page)) } }, [isNaN(Number(page)) ? _c("div", { staticClass: "d-pagination__separator-icon", attrs: { "data-qa": "dt-pagination-separator" } }, [_c("dt-icon", { attrs: { "name": "more-horizontal", "size": "300" } })], 1) : _c("dt-button", { attrs: { "aria-label": _vm.pageNumberAriaLabel(page), "kind": _vm.currentPage === page ? "default" : "muted", "importance": _vm.currentPage === page ? "primary" : "clear", "label-class": "" }, on: { "click": function($event) {
132
128
  return _vm.changePage(page);
133
129
  } } }, [_vm._v(" " + _vm._s(page) + " ")])], 1);
134
130
  }), _c("dt-button", { staticClass: "d-pagination__button", class: _vm.isLastPage ? "d-fc-black-300 d-bgc-transparent" : "d-fc-tertiary", attrs: { "data-qa": "dt-pagination-next", "aria-label": _vm.nextAriaLabel, "disabled": _vm.isLastPage, "kind": "muted", "importance": _vm.isLastPage ? "primary" : "clear" }, on: { "click": function($event) {
135
131
  return _vm.changePage(_vm.currentPage + 1);
136
- } }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
137
- return [_c("dt-icon-chevron-right", { attrs: { "size": "300" } })];
138
- }, proxy: true }]) })], 2);
132
+ } } }, [_c("template", { slot: "icon" }, [_c("dt-icon", { attrs: { "name": "chevron-right", "size": "300" } })], 1)], 2)], 2);
139
133
  };
140
134
  var _sfc_staticRenderFns = [];
141
135
  var __component__ = /* @__PURE__ */ _pluginVue2_normalizer(
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.vue.cjs","sources":["../../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n :kind=\"isFirstPage ? 'default' : 'muted'\"\n :importance=\"isFirstPage ? 'primary' : 'clear'\"\n :disabled=\"isFirstPage\"\n :class=\"isFirstPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template #icon>\n <dt-icon-chevron-left\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon-more-horizontal\n size=\"300\"\n />\n <!-- … -->\n </div>\n <!-- eslint-enable vue/no-bare-strings-in-template -->\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n :importance=\"isLastPage ? 'primary' : 'clear'\"\n :class=\"isLastPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template #icon>\n <dt-icon-chevron-right\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconChevronLeft, DtIconChevronRight, DtIconMoreHorizontal } from '@dialpad/dialtone-icons/vue2';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIconChevronLeft,\n DtIconChevronRight,\n DtIconMoreHorizontal,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * Descriptive label for the previous button.\n */\n prevAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the next button.\n */\n nextAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * A method that will be called to get the aria label of each page.\n */\n pageNumberAriaLabel: {\n type: Function,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n const start = this.maxVisible - 1;\n const end = this.totalPages - start + 1;\n\n if (this.currentPage < start) {\n return [...this.range(1, start), '...', this.totalPages];\n }\n\n if (this.currentPage > end) {\n return [1, '...', ...this.range(end, this.totalPages)];\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n const left = this.currentPage - centerIndex;\n const right = this.currentPage + centerIndex;\n return [1, '...', ...this.range(left, right), '...', this.totalPages];\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":["DtButton","DtIconChevronLeft","DtIconChevronRight","DtIconMoreHorizontal"],"mappings":";;;;AA4EA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA;AAAAA,IACA,mBAAAC,KAAA;AAAA,IACA,oBAAAC,KAAA;AAAA,IACA,sBAAAC,KAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AA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AAA;AACA,cAAA,KAAA,CAAA;AAAA,MACA;AACA,aAAA;AAAA,IACA;AAAA,IAEA,WAAA,MAAA;AACA,WAAA,cAAA;AACA,WAAA,MAAA,UAAA,KAAA,WAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"pagination.vue.cjs","sources":["../../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n :kind=\"isFirstPage ? 'default' : 'muted'\"\n :importance=\"isFirstPage ? 'primary' : 'clear'\"\n :disabled=\"isFirstPage\"\n :class=\"isFirstPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"chevron-left\"\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon\n name=\"more-horizontal\"\n size=\"300\"\n />\n <!-- … -->\n </div>\n <!-- eslint-enable vue/no-bare-strings-in-template -->\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n :importance=\"isLastPage ? 'primary' : 'clear'\"\n :class=\"isLastPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"chevron-right\"\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * Descriptive label for the previous button.\n */\n prevAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the next button.\n */\n nextAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * A method that will be called to get the aria label of each page.\n */\n pageNumberAriaLabel: {\n type: Function,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n const start = this.maxVisible - 1;\n const end = this.totalPages - start + 1;\n\n if (this.currentPage < start) {\n return [...this.range(1, start), '...', this.totalPages];\n }\n\n if (this.currentPage > end) {\n return [1, '...', ...this.range(end, this.totalPages)];\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n const left = this.currentPage - centerIndex;\n const right = this.currentPage + centerIndex;\n return [1, '...', ...this.range(left, right), '...', this.totalPages];\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":["DtButton","DtIcon"],"mappings":";;;;AA+EA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA;AAAAA,IACA,QAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,qBAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA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1,11 @@
1
- import { DtIconChevronLeft, DtIconChevronRight, DtIconMoreHorizontal } from "@dialpad/dialtone-icons/vue2";
2
1
  import normalizeComponent from "../../_virtual/_plugin-vue2_normalizer.js";
3
2
  import DtButton from "../button/button.vue.js";
3
+ import DtIcon from "../icon/icon.vue.js";
4
4
  const _sfc_main = {
5
5
  name: "DtPagination",
6
6
  components: {
7
7
  DtButton,
8
- DtIconChevronLeft,
9
- DtIconChevronRight,
10
- DtIconMoreHorizontal
8
+ DtIcon
11
9
  },
12
10
  props: {
13
11
  /**
@@ -124,17 +122,13 @@ var _sfc_render = function render() {
124
122
  var _vm = this, _c = _vm._self._c;
125
123
  return _c("nav", { staticClass: "d-pagination", attrs: { "aria-label": _vm.ariaLabel } }, [_c("dt-button", { staticClass: "d-pagination__button", class: _vm.isFirstPage ? "d-fc-black-300 d-bgc-transparent" : "d-fc-tertiary", attrs: { "data-qa": "dt-pagination-prev", "aria-label": _vm.prevAriaLabel, "kind": _vm.isFirstPage ? "default" : "muted", "importance": _vm.isFirstPage ? "primary" : "clear", "disabled": _vm.isFirstPage }, on: { "click": function($event) {
126
124
  return _vm.changePage(_vm.currentPage - 1);
127
- } }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
128
- return [_c("dt-icon-chevron-left", { attrs: { "size": "300" } })];
129
- }, proxy: true }]) }), _vm._l(_vm.pages, function(page, index) {
130
- return _c("div", { key: `page-${page}-${index}`, class: { "d-pagination__separator": isNaN(Number(page)) } }, [isNaN(Number(page)) ? _c("div", { staticClass: "d-pagination__separator-icon", attrs: { "data-qa": "dt-pagination-separator" } }, [_c("dt-icon-more-horizontal", { attrs: { "size": "300" } })], 1) : _c("dt-button", { attrs: { "aria-label": _vm.pageNumberAriaLabel(page), "kind": _vm.currentPage === page ? "default" : "muted", "importance": _vm.currentPage === page ? "primary" : "clear", "label-class": "" }, on: { "click": function($event) {
125
+ } } }, [_c("template", { slot: "icon" }, [_c("dt-icon", { attrs: { "name": "chevron-left", "size": "300" } })], 1)], 2), _vm._l(_vm.pages, function(page, index) {
126
+ return _c("div", { key: `page-${page}-${index}`, class: { "d-pagination__separator": isNaN(Number(page)) } }, [isNaN(Number(page)) ? _c("div", { staticClass: "d-pagination__separator-icon", attrs: { "data-qa": "dt-pagination-separator" } }, [_c("dt-icon", { attrs: { "name": "more-horizontal", "size": "300" } })], 1) : _c("dt-button", { attrs: { "aria-label": _vm.pageNumberAriaLabel(page), "kind": _vm.currentPage === page ? "default" : "muted", "importance": _vm.currentPage === page ? "primary" : "clear", "label-class": "" }, on: { "click": function($event) {
131
127
  return _vm.changePage(page);
132
128
  } } }, [_vm._v(" " + _vm._s(page) + " ")])], 1);
133
129
  }), _c("dt-button", { staticClass: "d-pagination__button", class: _vm.isLastPage ? "d-fc-black-300 d-bgc-transparent" : "d-fc-tertiary", attrs: { "data-qa": "dt-pagination-next", "aria-label": _vm.nextAriaLabel, "disabled": _vm.isLastPage, "kind": "muted", "importance": _vm.isLastPage ? "primary" : "clear" }, on: { "click": function($event) {
134
130
  return _vm.changePage(_vm.currentPage + 1);
135
- } }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
136
- return [_c("dt-icon-chevron-right", { attrs: { "size": "300" } })];
137
- }, proxy: true }]) })], 2);
131
+ } } }, [_c("template", { slot: "icon" }, [_c("dt-icon", { attrs: { "name": "chevron-right", "size": "300" } })], 1)], 2)], 2);
138
132
  };
139
133
  var _sfc_staticRenderFns = [];
140
134
  var __component__ = /* @__PURE__ */ normalizeComponent(
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.vue.js","sources":["../../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n :kind=\"isFirstPage ? 'default' : 'muted'\"\n :importance=\"isFirstPage ? 'primary' : 'clear'\"\n :disabled=\"isFirstPage\"\n :class=\"isFirstPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template #icon>\n <dt-icon-chevron-left\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon-more-horizontal\n size=\"300\"\n />\n <!-- … -->\n </div>\n <!-- eslint-enable vue/no-bare-strings-in-template -->\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n :importance=\"isLastPage ? 'primary' : 'clear'\"\n :class=\"isLastPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template #icon>\n <dt-icon-chevron-right\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconChevronLeft, DtIconChevronRight, DtIconMoreHorizontal } from '@dialpad/dialtone-icons/vue2';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIconChevronLeft,\n DtIconChevronRight,\n DtIconMoreHorizontal,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * Descriptive label for the previous button.\n */\n prevAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the next button.\n */\n nextAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * A method that will be called to get the aria label of each page.\n */\n pageNumberAriaLabel: {\n type: Function,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n const start = this.maxVisible - 1;\n const end = this.totalPages - start + 1;\n\n if (this.currentPage < start) {\n return [...this.range(1, start), '...', this.totalPages];\n }\n\n if (this.currentPage > end) {\n return [1, '...', ...this.range(end, this.totalPages)];\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n const left = this.currentPage - centerIndex;\n const right = this.currentPage + centerIndex;\n return [1, '...', ...this.range(left, right), '...', this.totalPages];\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;AA4EA,MAAA,YA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,CAAA,GAAA,KAAA,MAAA,GAAA,KAAA,GAAA,OAAA,KAAA,UAAA;AAAA,MACA;AAEA,UAAA,KAAA,cAAA,KAAA;AACA,eAAA,CAAA,GAAA,OAAA,GAAA,KAAA,MAAA,KAAA,KAAA,UAAA,CAAA;AAAA,MACA;AAGA,YAAA,QAAA,KAAA,cAAA,IAAA,KAAA,aAAA;AACA,YAAA,cAAA,KAAA,MAAA,QAAA,CAAA;AACA,YAAA,OAAA,KAAA,cAAA;AACA,YAAA,QAAA,KAAA,cAAA;AACA,aAAA,CAAA,GAAA,OAAA,GAAA,KAAA,MAAA,MAAA,KAAA,GAAA,OAAA,KAAA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,MAAA,MAAA,IAAA;AACA,YAAA,QAAA,CAAA;AACA,aAAA,OAAA,IAAA,OAAA;AACA,eAAA,IAAA,MAAA,KAAA,IAAA,KAAA;AACA,cAAA,KAAA,CAAA;AAAA,MACA;AACA,aAAA;AAAA,IACA;AAAA,IAEA,WAAA,MAAA;AACA,WAAA,cAAA;AACA,WAAA,MAAA,UAAA,KAAA,WAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"pagination.vue.js","sources":["../../../components/pagination/pagination.vue"],"sourcesContent":["<template>\n <nav\n :aria-label=\"ariaLabel\"\n class=\"d-pagination\"\n >\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-prev\"\n :aria-label=\"prevAriaLabel\"\n :kind=\"isFirstPage ? 'default' : 'muted'\"\n :importance=\"isFirstPage ? 'primary' : 'clear'\"\n :disabled=\"isFirstPage\"\n :class=\"isFirstPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage - 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"chevron-left\"\n size=\"300\"\n />\n </template>\n </dt-button>\n <div\n v-for=\"(page, index) in pages\"\n :key=\"`page-${page}-${index}`\"\n :class=\"{ 'd-pagination__separator': isNaN(Number(page)) }\"\n >\n <!-- eslint-disable vue/no-bare-strings-in-template -->\n <div\n v-if=\"isNaN(Number(page))\"\n class=\"d-pagination__separator-icon\"\n data-qa=\"dt-pagination-separator\"\n >\n <dt-icon\n name=\"more-horizontal\"\n size=\"300\"\n />\n <!-- … -->\n </div>\n <!-- eslint-enable vue/no-bare-strings-in-template -->\n <dt-button\n v-else\n :aria-label=\"pageNumberAriaLabel(page)\"\n :kind=\"currentPage === page ? 'default' : 'muted'\"\n :importance=\"currentPage === page ? 'primary' : 'clear'\"\n label-class=\"\"\n @click=\"changePage(page)\"\n >\n {{ page }}\n </dt-button>\n </div>\n <dt-button\n class=\"d-pagination__button\"\n data-qa=\"dt-pagination-next\"\n :aria-label=\"nextAriaLabel\"\n :disabled=\"isLastPage\"\n kind=\"muted\"\n :importance=\"isLastPage ? 'primary' : 'clear'\"\n :class=\"isLastPage ? 'd-fc-black-300 d-bgc-transparent' : 'd-fc-tertiary'\"\n @click=\"changePage(currentPage + 1)\"\n >\n <template slot=\"icon\">\n <dt-icon\n name=\"chevron-right\"\n size=\"300\"\n />\n </template>\n </dt-button>\n </nav>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\n\n/**\n * Pagination allows you to divide large amounts of content into smaller chunks across multiple pages.\n * @see https://dialtone.dialpad.com/components/pagination.html\n */\nexport default {\n name: 'DtPagination',\n\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n /**\n * Descriptive label for the pagination content.\n */\n ariaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * The total number of the pages\n */\n totalPages: {\n type: Number,\n required: true,\n },\n\n /**\n * Descriptive label for the previous button.\n */\n prevAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * Descriptive label for the next button.\n */\n nextAriaLabel: {\n type: String,\n required: true,\n },\n\n /**\n * A method that will be called to get the aria label of each page.\n */\n pageNumberAriaLabel: {\n type: Function,\n required: true,\n },\n\n /**\n * The active current page in the list of pages, defaults to the first page\n */\n activePage: {\n type: Number,\n default: 1,\n },\n\n /**\n * Determines the max pages to be shown in the list. Using an odd number is recommended.\n * If an even number is given, then it will be rounded down to the nearest odd number to always\n * keep current page in the middle when current page is in the mid-range.\n */\n maxVisible: {\n type: Number,\n default: 5,\n },\n },\n\n emits: [\n /**\n * Page change event\n *\n * @event change\n * @type {Number}\n */\n 'change',\n ],\n\n data () {\n return {\n currentPage: this.activePage,\n };\n },\n\n computed: {\n isFirstPage () {\n return this.currentPage === 1;\n },\n\n isLastPage () {\n return this.currentPage === this.totalPages;\n },\n\n pages () {\n if (this.maxVisible === 0) {\n return [];\n }\n if (this.totalPages <= this.maxVisible) {\n return this.range(1, this.totalPages);\n }\n\n const start = this.maxVisible - 1;\n const end = this.totalPages - start + 1;\n\n if (this.currentPage < start) {\n return [...this.range(1, start), '...', this.totalPages];\n }\n\n if (this.currentPage > end) {\n return [1, '...', ...this.range(end, this.totalPages)];\n }\n\n // rounding to the nearest odd according to the maxlength to always show the page number in the middle.\n const total = this.maxVisible - (3 - this.maxVisible % 2);\n const centerIndex = Math.floor(total / 2);\n const left = this.currentPage - centerIndex;\n const right = this.currentPage + centerIndex;\n return [1, '...', ...this.range(left, right), '...', this.totalPages];\n },\n },\n\n methods: {\n range (from, to) {\n const range = [];\n from = from > 0 ? from : 1;\n for (let i = from; i <= to; i++) {\n range.push(i);\n }\n return range;\n },\n\n changePage (page) {\n this.currentPage = page;\n this.$emit('change', this.currentPage);\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;AA+EA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA;AAAA,MACA,M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AA,cAAA,KAAA,MAAA,QAAA,CAAA;AACA,YAAA,OAAA,KAAA,cAAA;AACA,YAAA,QAAA,KAAA,cAAA;AACA,aAAA,CAAA,GAAA,OAAA,GAAA,KAAA,MAAA,MAAA,KAAA,GAAA,OAAA,KAAA,UAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,MAAA,MAAA,IAAA;AACA,YAAA,QAAA,CAAA;AACA,aAAA,OAAA,IAAA,OAAA;AACA,eAAA,IAAA,MAAA,KAAA,IAAA,KAAA;AACA,cAAA,KAAA,CAAA;AAAA,MACA;AACA,aAAA;AAAA,IACA;AAAA,IAEA,WAAA,MAAA;AACA,WAAA,cAAA;AACA,WAAA,MAAA,UAAA,KAAA,WAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
- const vue2 = require("@dialpad/dialtone-icons/vue2");
3
2
  const _pluginVue2_normalizer = require("../../_virtual/_plugin-vue2_normalizer.cjs");
4
3
  const button = require("../button/button.vue.cjs");
4
+ const icon = require("../icon/icon.vue.cjs");
5
5
  const _sfc_main = {
6
6
  name: "PopoverHeaderFooter",
7
7
  components: {
8
8
  DtButton: button,
9
- DtIconClose: vue2.DtIconClose
9
+ DtIcon: icon
10
10
  },
11
11
  props: {
12
12
  // eslint-disable-next-line vue/require-default-prop
@@ -72,8 +72,8 @@ var _sfc_render = function render() {
72
72
  }, attrs: { "data-qa": "dt-popover-close", "importance": "outlined", "kind": "muted", "circle": "" }, on: { "click": function($event) {
73
73
  return _vm.$emit("close");
74
74
  } }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
75
- return [_c("dt-icon-close", { attrs: { "size": "300" } })];
76
- }, proxy: true }], null, false, 2465905460) }, "dt-button", _vm.closeButtonProps, false)) : _vm._e()], 1);
75
+ return [_c("dt-icon", { attrs: { "name": "close", "size": "300" } })];
76
+ }, proxy: true }], null, false, 2538694920) }, "dt-button", _vm.closeButtonProps, false)) : _vm._e()], 1);
77
77
  };
78
78
  var _sfc_staticRenderFns = [];
79
79
  var __component__ = /* @__PURE__ */ _pluginVue2_normalizer(
@@ -1 +1 @@
1
- {"version":3,"file":"popover_header_footer.vue.cjs","sources":["../../../components/popover/popover_header_footer.vue"],"sourcesContent":["<template>\n <div\n data-qa=\"dt-popover-header-footer\"\n :class=\"{\n 'd-popover__header': type === 'header',\n 'd-popover__footer': type === 'footer',\n }\"\n >\n <div\n v-if=\"$slots.content\"\n data-qa=\"dt-popover-header-footer-content\"\n :class=\"[{\n 'd-popover__header__content': type === 'header',\n 'd-popover__footer__content': type === 'footer',\n }, contentClass]\"\n >\n <!-- @slot Slot for main content -->\n <slot name=\"content\" />\n </div>\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"popover__close-button\"\n data-qa=\"dt-popover-close\"\n :class=\"{\n 'd-popover__header__close-button': type === 'header',\n 'd-popover__footer__close-button': type === 'footer',\n }\"\n importance=\"outlined\"\n kind=\"muted\"\n circle\n v-bind=\"closeButtonProps\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon-close\n size=\"300\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue2';\n\nexport default {\n name: 'PopoverHeaderFooter',\n components: {\n DtButton,\n DtIconClose,\n },\n\n props: {\n // eslint-disable-next-line vue/require-default-prop\n type: {\n type: String,\n validator: function (value) {\n return ['header', 'footer'].includes(value);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * A set of props to be passed into the popover's header close button.\n * Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: () => {},\n },\n },\n\n emits: [\n /**\n * Emitted when popover is closed\n *\n * @event close\n * @type { Boolean }\n */\n 'close',\n ],\n\n methods: {\n focusCloseButton () {\n const closeButton = this.$refs['popover__close-button']?.$el;\n closeButton?.focus();\n },\n },\n};\n</script>\n"],"names":["DtButton","DtIconClose"],"mappings":";;;;AA8CA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAA;AAAAA,IACA,aAAAC,KAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA,IAEA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,WAAA,SAAA,OAAA;AACA,eAAA,CAAA,UAAA,QAAA,EAAA,SAAA,KAAA;AAAA,MACA;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,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA;AAAA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,mBAAA;;AACA,YAAA,eAAA,UAAA,MAAA,uBAAA,MAAA,mBAAA;AACA,iDAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"popover_header_footer.vue.cjs","sources":["../../../components/popover/popover_header_footer.vue"],"sourcesContent":["<template>\n <div\n data-qa=\"dt-popover-header-footer\"\n :class=\"{\n 'd-popover__header': type === 'header',\n 'd-popover__footer': type === 'footer',\n }\"\n >\n <div\n v-if=\"$slots.content\"\n data-qa=\"dt-popover-header-footer-content\"\n :class=\"[{\n 'd-popover__header__content': type === 'header',\n 'd-popover__footer__content': type === 'footer',\n }, contentClass]\"\n >\n <!-- @slot Slot for main content -->\n <slot name=\"content\" />\n </div>\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"popover__close-button\"\n data-qa=\"dt-popover-close\"\n :class=\"{\n 'd-popover__header__close-button': type === 'header',\n 'd-popover__footer__close-button': type === 'footer',\n }\"\n importance=\"outlined\"\n kind=\"muted\"\n circle\n v-bind=\"closeButtonProps\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n size=\"300\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\n\nexport default {\n name: 'PopoverHeaderFooter',\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n // eslint-disable-next-line vue/require-default-prop\n type: {\n type: String,\n validator: function (value) {\n return ['header', 'footer'].includes(value);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * A set of props to be passed into the popover's header close button.\n * Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: () => {},\n },\n },\n\n emits: [\n /**\n * Emitted when popover is closed\n *\n * @event close\n * @type { Boolean }\n */\n 'close',\n ],\n\n methods: {\n focusCloseButton () {\n const closeButton = this.$refs['popover__close-button']?.$el;\n closeButton?.focus();\n },\n },\n};\n</script>\n"],"names":["DtButton","DtIcon"],"mappings":";;;;AA+CA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAA;AAAAA,IACA,QAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA,IAEA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,WAAA,SAAA,OAAA;AACA,eAAA,CAAA,UAAA,QAAA,EAAA,SAAA,KAAA;AAAA,MACA;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,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA;AAAA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,mBAAA;;AACA,YAAA,eAAA,UAAA,MAAA,uBAAA,MAAA,mBAAA;AACA,iDAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,11 +1,11 @@
1
- import { DtIconClose } from "@dialpad/dialtone-icons/vue2";
2
1
  import normalizeComponent from "../../_virtual/_plugin-vue2_normalizer.js";
3
2
  import DtButton from "../button/button.vue.js";
3
+ import DtIcon from "../icon/icon.vue.js";
4
4
  const _sfc_main = {
5
5
  name: "PopoverHeaderFooter",
6
6
  components: {
7
7
  DtButton,
8
- DtIconClose
8
+ DtIcon
9
9
  },
10
10
  props: {
11
11
  // eslint-disable-next-line vue/require-default-prop
@@ -71,8 +71,8 @@ var _sfc_render = function render() {
71
71
  }, attrs: { "data-qa": "dt-popover-close", "importance": "outlined", "kind": "muted", "circle": "" }, on: { "click": function($event) {
72
72
  return _vm.$emit("close");
73
73
  } }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
74
- return [_c("dt-icon-close", { attrs: { "size": "300" } })];
75
- }, proxy: true }], null, false, 2465905460) }, "dt-button", _vm.closeButtonProps, false)) : _vm._e()], 1);
74
+ return [_c("dt-icon", { attrs: { "name": "close", "size": "300" } })];
75
+ }, proxy: true }], null, false, 2538694920) }, "dt-button", _vm.closeButtonProps, false)) : _vm._e()], 1);
76
76
  };
77
77
  var _sfc_staticRenderFns = [];
78
78
  var __component__ = /* @__PURE__ */ normalizeComponent(
@@ -1 +1 @@
1
- {"version":3,"file":"popover_header_footer.vue.js","sources":["../../../components/popover/popover_header_footer.vue"],"sourcesContent":["<template>\n <div\n data-qa=\"dt-popover-header-footer\"\n :class=\"{\n 'd-popover__header': type === 'header',\n 'd-popover__footer': type === 'footer',\n }\"\n >\n <div\n v-if=\"$slots.content\"\n data-qa=\"dt-popover-header-footer-content\"\n :class=\"[{\n 'd-popover__header__content': type === 'header',\n 'd-popover__footer__content': type === 'footer',\n }, contentClass]\"\n >\n <!-- @slot Slot for main content -->\n <slot name=\"content\" />\n </div>\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"popover__close-button\"\n data-qa=\"dt-popover-close\"\n :class=\"{\n 'd-popover__header__close-button': type === 'header',\n 'd-popover__footer__close-button': type === 'footer',\n }\"\n importance=\"outlined\"\n kind=\"muted\"\n circle\n v-bind=\"closeButtonProps\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon-close\n size=\"300\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue2';\n\nexport default {\n name: 'PopoverHeaderFooter',\n components: {\n DtButton,\n DtIconClose,\n },\n\n props: {\n // eslint-disable-next-line vue/require-default-prop\n type: {\n type: String,\n validator: function (value) {\n return ['header', 'footer'].includes(value);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * A set of props to be passed into the popover's header close button.\n * Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: () => {},\n },\n },\n\n emits: [\n /**\n * Emitted when popover is closed\n *\n * @event close\n * @type { Boolean }\n */\n 'close',\n ],\n\n methods: {\n focusCloseButton () {\n const closeButton = this.$refs['popover__close-button']?.$el;\n closeButton?.focus();\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;AA8CA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA,IAEA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,WAAA,SAAA,OAAA;AACA,eAAA,CAAA,UAAA,QAAA,EAAA,SAAA,KAAA;AAAA,MACA;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,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA;AAAA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,mBAAA;;AACA,YAAA,eAAA,UAAA,MAAA,uBAAA,MAAA,mBAAA;AACA,iDAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"popover_header_footer.vue.js","sources":["../../../components/popover/popover_header_footer.vue"],"sourcesContent":["<template>\n <div\n data-qa=\"dt-popover-header-footer\"\n :class=\"{\n 'd-popover__header': type === 'header',\n 'd-popover__footer': type === 'footer',\n }\"\n >\n <div\n v-if=\"$slots.content\"\n data-qa=\"dt-popover-header-footer-content\"\n :class=\"[{\n 'd-popover__header__content': type === 'header',\n 'd-popover__footer__content': type === 'footer',\n }, contentClass]\"\n >\n <!-- @slot Slot for main content -->\n <slot name=\"content\" />\n </div>\n <dt-button\n v-if=\"showCloseButton\"\n ref=\"popover__close-button\"\n data-qa=\"dt-popover-close\"\n :class=\"{\n 'd-popover__header__close-button': type === 'header',\n 'd-popover__footer__close-button': type === 'footer',\n }\"\n importance=\"outlined\"\n kind=\"muted\"\n circle\n v-bind=\"closeButtonProps\"\n @click=\"$emit('close')\"\n >\n <template #icon>\n <dt-icon\n name=\"close\"\n size=\"300\"\n />\n </template>\n </dt-button>\n </div>\n</template>\n\n<script>\nimport { DtButton } from '@/components/button';\nimport { DtIcon } from '@/components/icon';\n\nexport default {\n name: 'PopoverHeaderFooter',\n components: {\n DtButton,\n DtIcon,\n },\n\n props: {\n // eslint-disable-next-line vue/require-default-prop\n type: {\n type: String,\n validator: function (value) {\n return ['header', 'footer'].includes(value);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * A set of props to be passed into the popover's header close button.\n * Requires an 'ariaLabel' property.\n */\n closeButtonProps: {\n type: Object,\n default: () => {},\n },\n },\n\n emits: [\n /**\n * Emitted when popover is closed\n *\n * @event close\n * @type { Boolean }\n */\n 'close',\n ],\n\n methods: {\n focusCloseButton () {\n const closeButton = this.$refs['popover__close-button']?.$el;\n closeButton?.focus();\n },\n },\n};\n</script>\n"],"names":[],"mappings":";;;AA+CA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA,IAEA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,WAAA,SAAA,OAAA;AACA,eAAA,CAAA,UAAA,QAAA,EAAA,SAAA,KAAA;AAAA,MACA;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,iBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA;AAAA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,mBAAA;;AACA,YAAA,eAAA,UAAA,MAAA,uBAAA,MAAA,mBAAA;AACA,iDAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -262,13 +262,16 @@ const _sfc_main = {
262
262
  });
263
263
  }
264
264
  },
265
- mounted() {
265
+ async mounted() {
266
266
  if (!this.enabled && this.show != null) {
267
267
  console.warn("Tooltip: You cannot use both the enabled and show props at the same time.");
268
268
  console.warn("The show prop will be ignored.");
269
269
  }
270
- this.externalAnchor && this.addExternalAnchorEventListeners();
271
270
  this.tip = tippy_utils.createTippy(this.anchor, this.initOptions());
271
+ if (this.externalAnchor) {
272
+ await common_utils.flushPromises();
273
+ this.addExternalAnchorEventListeners();
274
+ }
272
275
  },
273
276
  beforeDestroy() {
274
277
  var _a;
@@ -384,18 +387,22 @@ const _sfc_main = {
384
387
  },
385
388
  addExternalAnchorEventListeners() {
386
389
  ["focusin", "mouseenter"].forEach((listener) => {
387
- this.anchor.addEventListener(listener, (event) => this.onEnterAnchor(event));
390
+ var _a;
391
+ (_a = this.anchor) == null ? void 0 : _a.addEventListener(listener, (event) => this.onEnterAnchor(event));
388
392
  });
389
393
  ["focusout", "mouseleave", "keydown"].forEach((listener) => {
390
- this.anchor.addEventListener(listener, (event) => this.onLeaveAnchor(event));
394
+ var _a;
395
+ (_a = this.anchor) == null ? void 0 : _a.addEventListener(listener, (event) => this.onLeaveAnchor(event));
391
396
  });
392
397
  },
393
398
  removeExternalAnchorEventListeners() {
394
399
  ["focusin", "mouseenter"].forEach((listener) => {
395
- this.anchor.removeEventListener(listener, (event) => this.onEnterAnchor(event));
400
+ var _a;
401
+ (_a = this.anchor) == null ? void 0 : _a.removeEventListener(listener, (event) => this.onEnterAnchor(event));
396
402
  });
397
403
  ["focusout", "mouseleave", "keydown"].forEach((listener) => {
398
- this.anchor.removeEventListener(listener, (event) => this.onLeaveAnchor(event));
404
+ var _a;
405
+ (_a = this.anchor) == null ? void 0 : _a.removeEventListener(listener, (event) => this.onLeaveAnchor(event));
399
406
  });
400
407
  }
401
408
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.vue.cjs","sources":["../../../components/tooltip/tooltip.vue"],"sourcesContent":["<template>\n <div data-qa=\"dt-tooltip-container\">\n <!-- disabling as the below events are for capturing events from interactive\n elements within the span rather than on the span itself -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <span\n v-if=\"!externalAnchor\"\n ref=\"anchor\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-on=\"$listeners\"\n >\n <!-- In case when transitionend event doesn't work correct (for ex. tooltip component with custom trigger) -->\n <!-- after-leave event can be used instead of transitionend -->\n <!-- @slot Slot for the content, defaults to message prop -->\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n</template>\n\n<script>\nimport {\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_DIRECTIONS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_DELAY_MS,\n} from './tooltip_constants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../popover/popover_constants';\nimport { getUniqueString } from '@/common/utils';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/popover/tippy_utils';\n\n/**\n * A tooltip is a floating label that briefly explains an action, function, or an element.\n * Its content is exclusively text and shouldn't be vital information for users.\n * If richer media is desired, consider using a popover instead.\n * @see https://dialtone.dialpad.com/components/tooltip.html\n */\nexport default {\n name: 'DtTooltip',\n\n props: {\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\"\n * if defined, otherwise it will automatically position to a new location\n * as it sees best fit. See\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => ['auto'],\n },\n\n /**\n * If true, applies inverted styles to the tooltip\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the tooltip from its reference element\n * by the specified number of pixels. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 12],\n },\n\n /**\n * The direction the popover displays relative to the anchor. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'top',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * If the tooltip sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: true,\n validator: (sticky) => {\n return TOOLTIP_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Sets the element to which the tooltip is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Additional css classes for the tooltip content element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * A provided message for the tooltip content\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Controls whether hover/focus causes the tooltip to appear.\n * Cannot be combined with the show prop. show value will be ignored.\n * by default this is true, if you override with false, the tooltip will never show up.\n */\n enabled: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.\n * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n show: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Whether the tooltip should have a transition effect (fade).\n */\n transition: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the tooltip will have a delay when being focused or moused over.\n * @values true, false\n */\n delay: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Set a custom theme on the tooltip. See https://atomiks.github.io/tippyjs/v6/themes/\n */\n theme: {\n type: String,\n default: null,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Emitted when tooltip is shown or hidden\n *\n * @event shown\n * @type {Boolean}\n */\n 'shown',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n tip: null,\n\n inTimer: null,\n\n // Internal state for whether the tooltip is shown. Changing the prop\n // will update this.\n internalShow: false,\n\n // this is where the placement currently is, this can be different than\n // the placement prop when there is not enough available room for the tip\n // to display and it uses a fallback placement.\n currentPlacement: this.placement,\n };\n },\n\n computed: {\n // eslint-disable-next-line complexity\n tippyProps () {\n return {\n offset: this.offset,\n delay: this.delay ? TOOLTIP_DELAY_MS : false,\n placement: this.placement,\n sticky: this.sticky,\n theme: this.inverted ? 'inverted' : this.theme,\n animation: this.transition ? 'fade' : false,\n // onShown only triggers when transition is truthy\n onShown: (tooltipInstance) => this.onShow(tooltipInstance, 'onShown'),\n // onShown will always be called, but it will be called before the animation is complete\n onShow: (tooltipInstance) => this.onShow(tooltipInstance, 'onShow'),\n onHidden: this.onHide,\n\n popperOptions: getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n hasHideModifierEnabled: true,\n onChangePlacement: this.onChangePlacement,\n }),\n };\n },\n\n anchor () {\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: {\n handler: 'setProps',\n deep: true,\n },\n\n show: {\n handler: function (show) {\n if (show !== null && this.enabled) {\n this.internalShow = show;\n }\n },\n\n immediate: true,\n },\n\n internalShow (value) {\n if (value) {\n this.setProps();\n this.tip.show();\n } else {\n this.tip.hide();\n }\n },\n\n sticky (sticky) {\n this.tip.setProps({\n sticky,\n });\n },\n },\n\n mounted () {\n if (!this.enabled && this.show != null) {\n console.warn('Tooltip: You cannot use both the enabled and show props at the same time.');\n console.warn('The show prop will be ignored.');\n }\n this.externalAnchor && this.addExternalAnchorEventListeners();\n this.tip = createTippy(this.anchor, this.initOptions());\n },\n\n beforeDestroy () {\n this.externalAnchor && this.removeExternalAnchorEventListeners();\n\n if (this.tip) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (this.$el.getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 651 when\n // anchor of popover is within a drawer.\n this.$el.closest('.d-zi-drawer')) {\n return 651;\n } else {\n return 400;\n }\n },\n\n hasVisibleFocus () {\n return this.anchor.matches(':focus-visible');\n },\n\n onEnterAnchor (e) {\n if (!this.enabled) return;\n if (this.delay && this.inTimer === null) {\n this.inTimer = setTimeout(() => {\n this.triggerShow(e);\n }, TOOLTIP_DELAY_MS);\n } else {\n this.triggerShow(e);\n }\n },\n\n triggerShow (e) {\n if (e.type === 'focusin') {\n // only show tooltips on visible focus when triggered via focus.\n // when the user is using the mouse they only want tooltips to display\n // on mouseover.\n //\n // Example: anchor of a popover is a button with tooltip.\n // closing it with the mouse would trigger the tooltip to display as\n // the anchor is focused on close. Not what we want.\n if (this.show === null && this.hasVisibleFocus()) {\n this.internalShow = true;\n }\n } else {\n if (this.show === null) this.internalShow = true;\n }\n },\n\n onLeaveAnchor (e) {\n if (e.type === 'keydown' && e.code !== 'Escape') return;\n\n clearTimeout(this.inTimer);\n this.inTimer = null;\n this.triggerHide();\n },\n\n triggerHide () {\n if (this.show === null) this.internalShow = false;\n },\n\n onChangePlacement (placement) {\n this.currentPlacement = placement;\n },\n\n onHide () {\n this.tip?.unmount();\n this.$emit('shown', false);\n if (this.show !== null) {\n this.$emit('update:show', false);\n }\n },\n\n onShow (tooltipInstance, callingMethod) {\n if (!this.tooltipHasContent(tooltipInstance)) {\n return false;\n }\n if (this.transition && callingMethod === 'onShow') {\n return;\n }\n this.$emit('shown', true);\n if (this.show !== null) {\n this.$emit('update:show', true);\n }\n },\n\n setProps () {\n if (this.tip && this.tip.setProps) {\n this.tip.setProps({\n ...this.tippyProps,\n // these need to be set here rather than in tippyProps because they are non-reactive\n appendTo: this.appendTo === 'body' ? this.anchor?.getRootNode()?.querySelector('body') : this.appendTo,\n zIndex: this.calculateAnchorZindex(),\n });\n }\n },\n\n onMount () {\n this.setProps();\n },\n\n tooltipHasContent (tooltipInstance) {\n // don't show tooltip when no content\n if (tooltipInstance.props.content.textContent.trim().length === 0) {\n return false;\n }\n return true;\n },\n\n // set initial options here. If any of the options need to dynamically change, they should be put in\n // tippyProps instead.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><path d=\"M 14.5,7 8,0 1.5,7 Z\"/></svg>',\n // transition duration - same as our custom fade delay in dialtone-globals.less\n duration: 180,\n interactive: false,\n trigger: 'manual',\n hideOnClick: false,\n // disable tooltip from displaying on touch devices\n touch: false,\n onMount: this.onMount,\n showOnCreate: this.internalShow,\n popperOptions: getPopperOptions({\n hasHideModifierEnabled: true,\n }),\n };\n },\n\n addExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor.addEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor.addEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n removeExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor.removeEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor.removeEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n@import 'tippy.js/dist/svg-arrow.css';\n\n.tippy-box[data-reference-hidden] {\n visibility: hidden;\n pointer-events: none;\n}\n\n.tippy-box > .tippy-svg-arrow {\n fill: var(--dt-color-surface-contrast);\n}\n\n.tippy-box[data-theme~='inverted'] > .tippy-svg-arrow {\n fill: var(--dt-color-surface-moderate);\n}\n\n.tippy-box[data-animation='fade'][data-state='hidden'] {\n opacity: 0;\n}\n</style>\n"],"names":["getUniqueString","TOOLTIP_DIRECTIONS","TOOLTIP_STICKY_VALUES","POPOVER_APPEND_TO_VALUES","TOOLTIP_KIND_MODIFIERS","TOOLTIP_DELAY_MS","getPopperOptions","getAnchor","createTippy"],"mappings":";;;;;;;AAkEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAA,aAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAeA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,GAAA,EAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAiBA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA,WAAA;AACA,eAAAC,kBAAA,mBAAA,SAAA,SAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAA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AAA,QACA,SAAA,KAAA;AAAA,QACA,cAAA,KAAA;AAAA,QACA,eAAAC,YAAAA,iBAAA;AAAA,UACA,wBAAA;AAAA,QACA,CAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,kCAAA;AACA,OAAA,WAAA,YAAA,EAAA,QAAA,cAAA;AACA,aAAA,OAAA,iBAAA,UAAA,CAAA,UAAA,KAAA,cAAA,KAAA,CAAA;AAAA,MACA,CAAA;AACA,OAAA,YAAA,cAAA,SAAA,EAAA,QAAA,cAAA;AACA,aAAA,OAAA,iBAAA,UAAA,CAAA,UAAA,KAAA,cAAA,KAAA,CAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,IAEA,qCAAA;AACA,OAAA,WAAA,YAAA,EAAA,QAAA,cAAA;AACA,aAAA,OAAA,oBAAA,UAAA,CAAA,UAAA,KAAA,cAAA,KAAA,CAAA;AAAA,MACA,CAAA;AACA,OAAA,YAAA,cAAA,SAAA,EAAA,QAAA,cAAA;AACA,aAAA,OAAA,oBAAA,UAAA,CAAA,UAAA,KAAA,cAAA,KAAA,CAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"tooltip.vue.cjs","sources":["../../../components/tooltip/tooltip.vue"],"sourcesContent":["<template>\n <div data-qa=\"dt-tooltip-container\">\n <!-- disabling as the below events are for capturing events from interactive\n elements within the span rather than on the span itself -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <span\n v-if=\"!externalAnchor\"\n ref=\"anchor\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-on=\"$listeners\"\n >\n <!-- In case when transitionend event doesn't work correct (for ex. tooltip component with custom trigger) -->\n <!-- after-leave event can be used instead of transitionend -->\n <!-- @slot Slot for the content, defaults to message prop -->\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n</template>\n\n<script>\nimport {\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_DIRECTIONS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_DELAY_MS,\n} from './tooltip_constants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../popover/popover_constants';\nimport { flushPromises, getUniqueString } from '@/common/utils';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/popover/tippy_utils';\n\n/**\n * A tooltip is a floating label that briefly explains an action, function, or an element.\n * Its content is exclusively text and shouldn't be vital information for users.\n * If richer media is desired, consider using a popover instead.\n * @see https://dialtone.dialpad.com/components/tooltip.html\n */\nexport default {\n name: 'DtTooltip',\n\n props: {\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\"\n * if defined, otherwise it will automatically position to a new location\n * as it sees best fit. See\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => ['auto'],\n },\n\n /**\n * If true, applies inverted styles to the tooltip\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the tooltip from its reference element\n * by the specified number of pixels. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 12],\n },\n\n /**\n * The direction the popover displays relative to the anchor. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'top',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * If the tooltip sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: true,\n validator: (sticky) => {\n return TOOLTIP_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Sets the element to which the tooltip is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Additional css classes for the tooltip content element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * A provided message for the tooltip content\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Controls whether hover/focus causes the tooltip to appear.\n * Cannot be combined with the show prop. show value will be ignored.\n * by default this is true, if you override with false, the tooltip will never show up.\n */\n enabled: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.\n * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n show: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Whether the tooltip should have a transition effect (fade).\n */\n transition: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the tooltip will have a delay when being focused or moused over.\n * @values true, false\n */\n delay: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Set a custom theme on the tooltip. See https://atomiks.github.io/tippyjs/v6/themes/\n */\n theme: {\n type: String,\n default: null,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Emitted when tooltip is shown or hidden\n *\n * @event shown\n * @type {Boolean}\n */\n 'shown',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n tip: null,\n\n inTimer: null,\n\n // Internal state for whether the tooltip is shown. Changing the prop\n // will update this.\n internalShow: false,\n\n // this is where the placement currently is, this can be different than\n // the placement prop when there is not enough available room for the tip\n // to display and it uses a fallback placement.\n currentPlacement: this.placement,\n };\n },\n\n computed: {\n // eslint-disable-next-line complexity\n tippyProps () {\n return {\n offset: this.offset,\n delay: this.delay ? TOOLTIP_DELAY_MS : false,\n placement: this.placement,\n sticky: this.sticky,\n theme: this.inverted ? 'inverted' : this.theme,\n animation: this.transition ? 'fade' : false,\n // onShown only triggers when transition is truthy\n onShown: (tooltipInstance) => this.onShow(tooltipInstance, 'onShown'),\n // onShown will always be called, but it will be called before the animation is complete\n onShow: (tooltipInstance) => this.onShow(tooltipInstance, 'onShow'),\n onHidden: this.onHide,\n\n popperOptions: getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n hasHideModifierEnabled: true,\n onChangePlacement: this.onChangePlacement,\n }),\n };\n },\n\n anchor () {\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: {\n handler: 'setProps',\n deep: true,\n },\n\n show: {\n handler: function (show) {\n if (show !== null && this.enabled) {\n this.internalShow = show;\n }\n },\n\n immediate: true,\n },\n\n internalShow (value) {\n if (value) {\n this.setProps();\n this.tip.show();\n } else {\n this.tip.hide();\n }\n },\n\n sticky (sticky) {\n this.tip.setProps({\n sticky,\n });\n },\n },\n\n async mounted () {\n if (!this.enabled && this.show != null) {\n console.warn('Tooltip: You cannot use both the enabled and show props at the same time.');\n console.warn('The show prop will be ignored.');\n }\n\n this.tip = createTippy(this.anchor, this.initOptions());\n if (this.externalAnchor) {\n await flushPromises();\n this.addExternalAnchorEventListeners();\n }\n },\n\n beforeDestroy () {\n this.externalAnchor && this.removeExternalAnchorEventListeners();\n\n if (this.tip) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (this.$el.getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 651 when\n // anchor of popover is within a drawer.\n this.$el.closest('.d-zi-drawer')) {\n return 651;\n } else {\n return 400;\n }\n },\n\n hasVisibleFocus () {\n return this.anchor.matches(':focus-visible');\n },\n\n onEnterAnchor (e) {\n if (!this.enabled) return;\n if (this.delay && this.inTimer === null) {\n this.inTimer = setTimeout(() => {\n this.triggerShow(e);\n }, TOOLTIP_DELAY_MS);\n } else {\n this.triggerShow(e);\n }\n },\n\n triggerShow (e) {\n if (e.type === 'focusin') {\n // only show tooltips on visible focus when triggered via focus.\n // when the user is using the mouse they only want tooltips to display\n // on mouseover.\n //\n // Example: anchor of a popover is a button with tooltip.\n // closing it with the mouse would trigger the tooltip to display as\n // the anchor is focused on close. Not what we want.\n if (this.show === null && this.hasVisibleFocus()) {\n this.internalShow = true;\n }\n } else {\n if (this.show === null) this.internalShow = true;\n }\n },\n\n onLeaveAnchor (e) {\n if (e.type === 'keydown' && e.code !== 'Escape') return;\n\n clearTimeout(this.inTimer);\n this.inTimer = null;\n this.triggerHide();\n },\n\n triggerHide () {\n if (this.show === null) this.internalShow = false;\n },\n\n onChangePlacement (placement) {\n this.currentPlacement = placement;\n },\n\n onHide () {\n this.tip?.unmount();\n this.$emit('shown', false);\n if (this.show !== null) {\n this.$emit('update:show', false);\n }\n },\n\n onShow (tooltipInstance, callingMethod) {\n if (!this.tooltipHasContent(tooltipInstance)) {\n return false;\n }\n if (this.transition && callingMethod === 'onShow') {\n return;\n }\n this.$emit('shown', true);\n if (this.show !== null) {\n this.$emit('update:show', true);\n }\n },\n\n setProps () {\n if (this.tip && this.tip.setProps) {\n this.tip.setProps({\n ...this.tippyProps,\n // these need to be set here rather than in tippyProps because they are non-reactive\n appendTo: this.appendTo === 'body' ? this.anchor?.getRootNode()?.querySelector('body') : this.appendTo,\n zIndex: this.calculateAnchorZindex(),\n });\n }\n },\n\n onMount () {\n this.setProps();\n },\n\n tooltipHasContent (tooltipInstance) {\n // don't show tooltip when no content\n if (tooltipInstance.props.content.textContent.trim().length === 0) {\n return false;\n }\n return true;\n },\n\n // set initial options here. If any of the options need to dynamically change, they should be put in\n // tippyProps instead.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><path d=\"M 14.5,7 8,0 1.5,7 Z\"/></svg>',\n // transition duration - same as our custom fade delay in dialtone-globals.less\n duration: 180,\n interactive: false,\n trigger: 'manual',\n hideOnClick: false,\n // disable tooltip from displaying on touch devices\n touch: false,\n onMount: this.onMount,\n showOnCreate: this.internalShow,\n popperOptions: getPopperOptions({\n hasHideModifierEnabled: true,\n }),\n };\n },\n\n addExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n removeExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n },\n};\n</script>\n\n<style lang=\"less\">\n@import 'tippy.js/dist/svg-arrow.css';\n\n.tippy-box[data-reference-hidden] {\n visibility: hidden;\n pointer-events: none;\n}\n\n.tippy-box > .tippy-svg-arrow {\n fill: var(--dt-color-surface-contrast);\n}\n\n.tippy-box[data-theme~='inverted'] > .tippy-svg-arrow {\n fill: var(--dt-color-surface-moderate);\n}\n\n.tippy-box[data-animation='fade'][data-state='hidden'] {\n opacity: 0;\n}\n</style>\n"],"names":["getUniqueString","TOOLTIP_DIRECTIONS","TOOLTIP_STICKY_VALUES","POPOVER_APPEND_TO_VALUES","TOOLTIP_KIND_MODIFIERS","TOOLTIP_DELAY_MS","getPopperOptions","getAnchor","createTippy","flushPromises"],"mappings":";;;;;;;AAkEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAA,aAAA,gBAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAeA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;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}
@@ -1,6 +1,6 @@
1
1
  import { TOOLTIP_DIRECTIONS, TOOLTIP_STICKY_VALUES, TOOLTIP_KIND_MODIFIERS, TOOLTIP_DELAY_MS } from "./tooltip_constants.js";
2
2
  import { POPOVER_APPEND_TO_VALUES } from "../popover/popover_constants.js";
3
- import { getUniqueString } from "../../common/utils.js";
3
+ import { getUniqueString, flushPromises } from "../../common/utils.js";
4
4
  import { getPopperOptions, getAnchor, createTippy } from "../popover/tippy_utils.js";
5
5
  /* empty css */
6
6
  import normalizeComponent from "../../_virtual/_plugin-vue2_normalizer.js";
@@ -261,13 +261,16 @@ const _sfc_main = {
261
261
  });
262
262
  }
263
263
  },
264
- mounted() {
264
+ async mounted() {
265
265
  if (!this.enabled && this.show != null) {
266
266
  console.warn("Tooltip: You cannot use both the enabled and show props at the same time.");
267
267
  console.warn("The show prop will be ignored.");
268
268
  }
269
- this.externalAnchor && this.addExternalAnchorEventListeners();
270
269
  this.tip = createTippy(this.anchor, this.initOptions());
270
+ if (this.externalAnchor) {
271
+ await flushPromises();
272
+ this.addExternalAnchorEventListeners();
273
+ }
271
274
  },
272
275
  beforeDestroy() {
273
276
  var _a;
@@ -383,18 +386,22 @@ const _sfc_main = {
383
386
  },
384
387
  addExternalAnchorEventListeners() {
385
388
  ["focusin", "mouseenter"].forEach((listener) => {
386
- this.anchor.addEventListener(listener, (event) => this.onEnterAnchor(event));
389
+ var _a;
390
+ (_a = this.anchor) == null ? void 0 : _a.addEventListener(listener, (event) => this.onEnterAnchor(event));
387
391
  });
388
392
  ["focusout", "mouseleave", "keydown"].forEach((listener) => {
389
- this.anchor.addEventListener(listener, (event) => this.onLeaveAnchor(event));
393
+ var _a;
394
+ (_a = this.anchor) == null ? void 0 : _a.addEventListener(listener, (event) => this.onLeaveAnchor(event));
390
395
  });
391
396
  },
392
397
  removeExternalAnchorEventListeners() {
393
398
  ["focusin", "mouseenter"].forEach((listener) => {
394
- this.anchor.removeEventListener(listener, (event) => this.onEnterAnchor(event));
399
+ var _a;
400
+ (_a = this.anchor) == null ? void 0 : _a.removeEventListener(listener, (event) => this.onEnterAnchor(event));
395
401
  });
396
402
  ["focusout", "mouseleave", "keydown"].forEach((listener) => {
397
- this.anchor.removeEventListener(listener, (event) => this.onLeaveAnchor(event));
403
+ var _a;
404
+ (_a = this.anchor) == null ? void 0 : _a.removeEventListener(listener, (event) => this.onLeaveAnchor(event));
398
405
  });
399
406
  }
400
407
  }