@dialpad/dialtone-vue 2.196.1 → 2.197.0-next.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/common/constants/index.cjs.map +1 -1
  2. package/dist/common/constants/index.js.map +1 -1
  3. package/dist/common/dates/index.cjs.map +1 -1
  4. package/dist/common/dates/index.js +3 -3
  5. package/dist/common/dates/index.js.map +1 -1
  6. package/dist/common/emoji/index.cjs.map +1 -1
  7. package/dist/common/emoji/index.js.map +1 -1
  8. package/dist/common/mixins/dom.cjs.map +1 -1
  9. package/dist/common/mixins/dom.js.map +1 -1
  10. package/dist/common/mixins/input-group.cjs.map +1 -1
  11. package/dist/common/mixins/input-group.js +5 -5
  12. package/dist/common/mixins/input-group.js.map +1 -1
  13. package/dist/common/mixins/input.cjs.map +1 -1
  14. package/dist/common/mixins/input.js.map +1 -1
  15. package/dist/common/mixins/keyboard-list-navigation.cjs.map +1 -1
  16. package/dist/common/mixins/keyboard-list-navigation.js.map +1 -1
  17. package/dist/common/mixins/modal.cjs.map +1 -1
  18. package/dist/common/mixins/modal.js.map +1 -1
  19. package/dist/common/mixins/skeleton.cjs.map +1 -1
  20. package/dist/common/mixins/skeleton.js.map +1 -1
  21. package/dist/common/utils/index.cjs.map +1 -1
  22. package/dist/common/utils/index.js.map +1 -1
  23. package/dist/common/validators/index.cjs.map +1 -1
  24. package/dist/common/validators/index.js.map +1 -1
  25. package/dist/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  26. package/dist/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
  27. package/dist/lib/attachment-carousel/attachment-carousel.js +4 -4
  28. package/dist/lib/avatar/avatar-constants.cjs.map +1 -1
  29. package/dist/lib/avatar/avatar-constants.js.map +1 -1
  30. package/dist/lib/avatar/avatar.cjs.map +1 -1
  31. package/dist/lib/avatar/avatar.js +11 -11
  32. package/dist/lib/avatar/avatar.js.map +1 -1
  33. package/dist/lib/avatar/utils.cjs.map +1 -1
  34. package/dist/lib/avatar/utils.js.map +1 -1
  35. package/dist/lib/badge/badge.cjs.map +1 -1
  36. package/dist/lib/badge/badge.js +7 -7
  37. package/dist/lib/badge/badge.js.map +1 -1
  38. package/dist/lib/banner/banner.cjs +1 -1
  39. package/dist/lib/banner/banner.cjs.map +1 -1
  40. package/dist/lib/banner/banner.js +4 -4
  41. package/dist/lib/breadcrumbs/breadcrumb-item.cjs.map +1 -1
  42. package/dist/lib/breadcrumbs/breadcrumbs.cjs.map +1 -1
  43. package/dist/lib/button/button-constants.cjs.map +1 -1
  44. package/dist/lib/button/button-constants.js.map +1 -1
  45. package/dist/lib/button/button.cjs.map +1 -1
  46. package/dist/lib/button/button.js +12 -12
  47. package/dist/lib/button-group/button-group.cjs.map +1 -1
  48. package/dist/lib/button-group/buttons-decorator.cjs.map +1 -1
  49. package/dist/lib/callbar-button/callbar-button-constants.cjs.map +1 -1
  50. package/dist/lib/callbar-button/callbar-button-constants.js.map +1 -1
  51. package/dist/lib/callbar-button/callbar-button.cjs +1 -1
  52. package/dist/lib/callbar-button/callbar-button.cjs.map +1 -1
  53. package/dist/lib/callbar-button/callbar-button.js +3 -3
  54. package/dist/lib/callbar-button/callbar-button.js.map +1 -1
  55. package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  56. package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs.map +1 -1
  57. package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +6 -6
  58. package/dist/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  59. package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  60. package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.cjs.map +1 -1
  61. package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.js +6 -6
  62. package/dist/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  63. package/dist/lib/callbox/callbox-constants.cjs.map +1 -1
  64. package/dist/lib/callbox/callbox-constants.js.map +1 -1
  65. package/dist/lib/callbox/callbox.cjs.map +1 -1
  66. package/dist/lib/callbox/callbox.js +5 -5
  67. package/dist/lib/checkbox/checkbox-constants.cjs.map +1 -1
  68. package/dist/lib/checkbox/checkbox-constants.js.map +1 -1
  69. package/dist/lib/checkbox/checkbox.cjs.map +1 -1
  70. package/dist/lib/checkbox-group/checkbox-group.cjs.map +1 -1
  71. package/dist/lib/checkbox-group/checkbox-group.js.map +1 -1
  72. package/dist/lib/checkbox-group/checkboxes-decorator.cjs.map +1 -1
  73. package/dist/lib/chip/chip-constants.cjs.map +1 -1
  74. package/dist/lib/chip/chip-constants.js.map +1 -1
  75. package/dist/lib/chip/chip.cjs.map +1 -1
  76. package/dist/lib/chip/chip.js +3 -3
  77. package/dist/lib/collapsible/collapsible.cjs +1 -1
  78. package/dist/lib/collapsible/collapsible.cjs.map +1 -1
  79. package/dist/lib/collapsible/collapsible.js +7 -7
  80. package/dist/lib/combobox/combobox-constants.cjs.map +1 -1
  81. package/dist/lib/combobox/combobox-constants.js.map +1 -1
  82. package/dist/lib/combobox/combobox-empty-list.cjs.map +1 -1
  83. package/dist/lib/combobox/combobox-loading-list.cjs +1 -1
  84. package/dist/lib/combobox/combobox-loading-list.cjs.map +1 -1
  85. package/dist/lib/combobox/combobox-loading-list.js +3 -3
  86. package/dist/lib/combobox/combobox.cjs.map +1 -1
  87. package/dist/lib/combobox/combobox.js.map +1 -1
  88. package/dist/lib/combobox-multi-select/combobox-multi-select-constants.cjs.map +1 -1
  89. package/dist/lib/combobox-multi-select/combobox-multi-select-constants.js.map +1 -1
  90. package/dist/lib/combobox-multi-select/combobox-multi-select-story-constants.cjs.map +1 -1
  91. package/dist/lib/combobox-multi-select/combobox-multi-select-story-constants.js.map +1 -1
  92. package/dist/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  93. package/dist/lib/combobox-multi-select/combobox-multi-select.js +3 -3
  94. package/dist/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  95. package/dist/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
  96. package/dist/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
  97. package/dist/lib/combobox-with-popover/combobox-with-popover.js +9 -9
  98. package/dist/lib/contact-centers-row/contact-centers-row.cjs +1 -1
  99. package/dist/lib/contact-centers-row/contact-centers-row.cjs.map +1 -1
  100. package/dist/lib/contact-centers-row/contact-centers-row.js +7 -7
  101. package/dist/lib/contact-centers-row/contact-centers-row.js.map +1 -1
  102. package/dist/lib/contact-info/contact-info.cjs.map +1 -1
  103. package/dist/lib/contact-row/contact-row.cjs +1 -1
  104. package/dist/lib/contact-row/contact-row.cjs.map +1 -1
  105. package/dist/lib/contact-row/contact-row.js +4 -4
  106. package/dist/lib/datepicker/datepicker.cjs +1 -1
  107. package/dist/lib/datepicker/datepicker.cjs.map +1 -1
  108. package/dist/lib/datepicker/datepicker.js +21 -21
  109. package/dist/lib/datepicker/datepicker.js.map +1 -1
  110. package/dist/lib/datepicker/formatUtils.cjs.map +1 -1
  111. package/dist/lib/datepicker/formatUtils.js.map +1 -1
  112. package/dist/lib/datepicker/utils.cjs.map +1 -1
  113. package/dist/lib/datepicker/utils.js.map +1 -1
  114. package/dist/lib/description-list/description-list.cjs.map +1 -1
  115. package/dist/lib/dropdown/dropdown-constants.cjs.map +1 -1
  116. package/dist/lib/dropdown/dropdown-constants.js.map +1 -1
  117. package/dist/lib/dropdown/dropdown-story-constants.cjs.map +1 -1
  118. package/dist/lib/dropdown/dropdown-story-constants.js.map +1 -1
  119. package/dist/lib/dropdown/dropdown.cjs +1 -1
  120. package/dist/lib/dropdown/dropdown.cjs.map +1 -1
  121. package/dist/lib/dropdown/dropdown.js +1 -1
  122. package/dist/lib/dropdown/dropdown.js.map +1 -1
  123. package/dist/lib/editor/editor-constants.cjs.map +1 -1
  124. package/dist/lib/editor/editor-constants.js.map +1 -1
  125. package/dist/lib/editor/editor.cjs +1 -1
  126. package/dist/lib/editor/editor.cjs.map +1 -1
  127. package/dist/lib/editor/editor.js +44 -44
  128. package/dist/lib/editor/editor.js.map +1 -1
  129. package/dist/lib/emoji/emoji.cjs.map +1 -1
  130. package/dist/lib/emoji/emoji.js +4 -4
  131. package/dist/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
  132. package/dist/lib/emoji-picker/emoji-picker-constants.js.map +1 -1
  133. package/dist/lib/emoji-picker/emoji-picker.cjs +1 -1
  134. package/dist/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  135. package/dist/lib/emoji-picker/emoji-picker.js +9 -9
  136. package/dist/lib/emoji-picker/emoji-picker.js.map +1 -1
  137. package/dist/lib/emoji-row/emoji-row-constants.cjs.map +1 -1
  138. package/dist/lib/emoji-row/emoji-row-constants.js.map +1 -1
  139. package/dist/lib/emoji-row/emoji-row.cjs +1 -1
  140. package/dist/lib/emoji-row/emoji-row.cjs.map +1 -1
  141. package/dist/lib/emoji-row/emoji-row.js +5 -5
  142. package/dist/lib/emoji-text-wrapper/emoji-text-wrapper.cjs.map +1 -1
  143. package/dist/lib/empty-state/empty-state-constants.cjs.map +1 -1
  144. package/dist/lib/empty-state/empty-state-constants.js.map +1 -1
  145. package/dist/lib/empty-state/empty-state.cjs.map +1 -1
  146. package/dist/lib/empty-state/empty-state.js +3 -3
  147. package/dist/lib/empty-state/empty-state.js.map +1 -1
  148. package/dist/lib/feed-item-pill/feed-item-pill-constants.cjs.map +1 -1
  149. package/dist/lib/feed-item-pill/feed-item-pill-constants.js.map +1 -1
  150. package/dist/lib/feed-item-pill/feed-item-pill.cjs +1 -1
  151. package/dist/lib/feed-item-pill/feed-item-pill.cjs.map +1 -1
  152. package/dist/lib/feed-item-pill/feed-item-pill.js +3 -3
  153. package/dist/lib/feed-item-row/feed-item-row-constants.cjs.map +1 -1
  154. package/dist/lib/feed-item-row/feed-item-row-constants.js.map +1 -1
  155. package/dist/lib/feed-item-row/feed-item-row.cjs +1 -1
  156. package/dist/lib/feed-item-row/feed-item-row.cjs.map +1 -1
  157. package/dist/lib/feed-item-row/feed-item-row.js +8 -8
  158. package/dist/lib/general-row/general-row-constants.cjs.map +1 -1
  159. package/dist/lib/general-row/general-row-constants.js.map +1 -1
  160. package/dist/lib/general-row/general-row.cjs +1 -1
  161. package/dist/lib/general-row/general-row.cjs.map +1 -1
  162. package/dist/lib/general-row/general-row.js +14 -14
  163. package/dist/lib/general-row/general-row.js.map +1 -1
  164. package/dist/lib/general-row/leftbar-general-row-icon.cjs.map +1 -1
  165. package/dist/lib/general-row/leftbar-general-row-icon.js +30 -30
  166. package/dist/lib/group-row/group-row.cjs.map +1 -1
  167. package/dist/lib/grouped-chip/grouped-chip.cjs.map +1 -1
  168. package/dist/lib/hovercard/hovercard.cjs +1 -1
  169. package/dist/lib/hovercard/hovercard.cjs.map +1 -1
  170. package/dist/lib/hovercard/hovercard.js +7 -7
  171. package/dist/lib/hovercard/hovercard.js.map +1 -1
  172. package/dist/lib/icon/icon-constants.cjs.map +1 -1
  173. package/dist/lib/icon/icon-constants.js.map +1 -1
  174. package/dist/lib/icon/icon.js +3 -3
  175. package/dist/lib/illustration/illustration-constants.cjs.map +1 -1
  176. package/dist/lib/illustration/illustration-constants.js.map +1 -1
  177. package/dist/lib/image-viewer/image-viewer.cjs.map +1 -1
  178. package/dist/lib/image-viewer/image-viewer.js.map +1 -1
  179. package/dist/lib/input/input-constants.cjs.map +1 -1
  180. package/dist/lib/input/input-constants.js.map +1 -1
  181. package/dist/lib/input/input.cjs.map +1 -1
  182. package/dist/lib/input/input.js +8 -8
  183. package/dist/lib/input/input.js.map +1 -1
  184. package/dist/lib/input-group/input-group.cjs.map +1 -1
  185. package/dist/lib/ivr-node/ivr-node-constants.cjs.map +1 -1
  186. package/dist/lib/ivr-node/ivr-node-constants.js.map +1 -1
  187. package/dist/lib/ivr-node/ivr-node.cjs +1 -1
  188. package/dist/lib/ivr-node/ivr-node.cjs.map +1 -1
  189. package/dist/lib/ivr-node/ivr-node.js +27 -27
  190. package/dist/lib/keyboard-shortcut/keyboard-shortcut.cjs.map +1 -1
  191. package/dist/lib/keyboard-shortcut/keyboard-shortcut.js +13 -13
  192. package/dist/lib/link/link-constants.cjs.map +1 -1
  193. package/dist/lib/link/link-constants.js.map +1 -1
  194. package/dist/lib/link/link.cjs.map +1 -1
  195. package/dist/lib/link/link.js +3 -3
  196. package/dist/lib/list-item/list-item-constants.cjs.map +1 -1
  197. package/dist/lib/list-item/list-item-constants.js.map +1 -1
  198. package/dist/lib/list-item/list-item.cjs.map +1 -1
  199. package/dist/lib/list-item/list-item.js +1 -1
  200. package/dist/lib/list-item/list-item.js.map +1 -1
  201. package/dist/lib/list-item-group/list-item-group-constants.cjs.map +1 -1
  202. package/dist/lib/list-item-group/list-item-group-constants.js.map +1 -1
  203. package/dist/lib/list-item-group/list-item-group.cjs.map +1 -1
  204. package/dist/lib/loader/loader.cjs.map +1 -1
  205. package/dist/lib/message-input/last-active-nodes.cjs.map +1 -1
  206. package/dist/lib/message-input/last-active-nodes.js.map +1 -1
  207. package/dist/lib/message-input/message-input-button.cjs +1 -1
  208. package/dist/lib/message-input/message-input-button.cjs.map +1 -1
  209. package/dist/lib/message-input/message-input-button.js +8 -8
  210. package/dist/lib/message-input/message-input-constants.cjs.map +1 -1
  211. package/dist/lib/message-input/message-input-constants.js.map +1 -1
  212. package/dist/lib/message-input/message-input-link.cjs +1 -1
  213. package/dist/lib/message-input/message-input-link.cjs.map +1 -1
  214. package/dist/lib/message-input/message-input-link.js +8 -8
  215. package/dist/lib/message-input/message-input-topbar.cjs.map +1 -1
  216. package/dist/lib/message-input/message-input-topbar.js +9 -9
  217. package/dist/lib/message-input/message-input.cjs +1 -1
  218. package/dist/lib/message-input/message-input.cjs.map +1 -1
  219. package/dist/lib/message-input/message-input.js +26 -26
  220. package/dist/lib/message-input/message-input.js.map +1 -1
  221. package/dist/lib/modal/modal.cjs +1 -1
  222. package/dist/lib/modal/modal.cjs.map +1 -1
  223. package/dist/lib/modal/modal.js +12 -12
  224. package/dist/lib/modal/modal.js.map +1 -1
  225. package/dist/lib/notice/notice-action.cjs.map +1 -1
  226. package/dist/lib/notice/notice-constants.cjs.map +1 -1
  227. package/dist/lib/notice/notice-constants.js.map +1 -1
  228. package/dist/lib/notice/notice-icon.cjs.map +1 -1
  229. package/dist/lib/notice/notice-icon.js +9 -9
  230. package/dist/lib/notice/notice.cjs.map +1 -1
  231. package/dist/lib/notice/notice.js +3 -3
  232. package/dist/lib/pagination/pagination.cjs.map +1 -1
  233. package/dist/lib/pagination/pagination.js +3 -3
  234. package/dist/lib/pagination/pagination.js.map +1 -1
  235. package/dist/lib/popover/popover-constants.cjs.map +1 -1
  236. package/dist/lib/popover/popover-constants.js.map +1 -1
  237. package/dist/lib/popover/popover-header-footer.cjs.map +1 -1
  238. package/dist/lib/popover/popover.cjs.map +1 -1
  239. package/dist/lib/popover/popover.js +14 -14
  240. package/dist/lib/popover/popover.js.map +1 -1
  241. package/dist/lib/popover/tippy-utils.cjs.map +1 -1
  242. package/dist/lib/popover/tippy-utils.js.map +1 -1
  243. package/dist/lib/presence/presence.cjs.map +1 -1
  244. package/dist/lib/radio/radio-constants.cjs.map +1 -1
  245. package/dist/lib/radio/radio-constants.js.map +1 -1
  246. package/dist/lib/radio/radio.cjs.map +1 -1
  247. package/dist/lib/radio-group/radio-group.cjs.map +1 -1
  248. package/dist/lib/radio-group/radios-decorator.cjs.map +1 -1
  249. package/dist/lib/recipes/eslint.config.cjs.map +1 -1
  250. package/dist/lib/recipes/eslint.config.js.map +1 -1
  251. package/dist/lib/rich-text-editor/channel-suggestion.cjs.map +1 -1
  252. package/dist/lib/rich-text-editor/channel-suggestion.js.map +1 -1
  253. package/dist/lib/rich-text-editor/mention-suggestion.cjs.map +1 -1
  254. package/dist/lib/rich-text-editor/mention-suggestion.js.map +1 -1
  255. package/dist/lib/rich-text-editor/rich-text-editor-constants.cjs.map +1 -1
  256. package/dist/lib/rich-text-editor/rich-text-editor-constants.js.map +1 -1
  257. package/dist/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  258. package/dist/lib/rich-text-editor/rich-text-editor.js +21 -21
  259. package/dist/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  260. package/dist/lib/rich-text-editor/slash-command-suggestion.cjs.map +1 -1
  261. package/dist/lib/rich-text-editor/slash-command-suggestion.js.map +1 -1
  262. package/dist/lib/root-layout/root-layout-constants.cjs.map +1 -1
  263. package/dist/lib/root-layout/root-layout-constants.js.map +1 -1
  264. package/dist/lib/root-layout/root-layout.cjs.map +1 -1
  265. package/dist/lib/root-layout/root-layout.js +1 -1
  266. package/dist/lib/scrollbar-directive/scrollbar.cjs.map +1 -1
  267. package/dist/lib/scrollbar-directive/scrollbar.js.map +1 -1
  268. package/dist/lib/select-menu/select-menu-constants.cjs.map +1 -1
  269. package/dist/lib/select-menu/select-menu-constants.js.map +1 -1
  270. package/dist/lib/select-menu/select-menu.cjs.map +1 -1
  271. package/dist/lib/select-menu/select-menu.js +7 -7
  272. package/dist/lib/settings-menu-button/settings-menu-button.cjs.map +1 -1
  273. package/dist/lib/skeleton/skeleton-constants.cjs.map +1 -1
  274. package/dist/lib/skeleton/skeleton-constants.js.map +1 -1
  275. package/dist/lib/skeleton/skeleton-list-item.cjs.map +1 -1
  276. package/dist/lib/skeleton/skeleton-paragraph.cjs.map +1 -1
  277. package/dist/lib/skeleton/skeleton-paragraph.js.map +1 -1
  278. package/dist/lib/skeleton/skeleton-shape.cjs.map +1 -1
  279. package/dist/lib/skeleton/skeleton-shape.js +1 -1
  280. package/dist/lib/skeleton/skeleton-text.cjs.map +1 -1
  281. package/dist/lib/skeleton/skeleton.cjs.map +1 -1
  282. package/dist/lib/split-button/split-button-alpha.cjs.map +1 -1
  283. package/dist/lib/split-button/split-button-constants.cjs.map +1 -1
  284. package/dist/lib/split-button/split-button-constants.js.map +1 -1
  285. package/dist/lib/split-button/split-button-omega.cjs.map +1 -1
  286. package/dist/lib/split-button/split-button.cjs.map +1 -1
  287. package/dist/lib/split-button/split-button.js +5 -5
  288. package/dist/lib/split-button/split-button.js.map +1 -1
  289. package/dist/lib/stack/stack-constants.cjs.map +1 -1
  290. package/dist/lib/stack/stack-constants.js.map +1 -1
  291. package/dist/lib/stack/stack.cjs.map +1 -1
  292. package/dist/lib/stack/stack.js +9 -9
  293. package/dist/lib/stack/utils.cjs.map +1 -1
  294. package/dist/lib/stack/utils.js.map +1 -1
  295. package/dist/lib/stack/validators.cjs.map +1 -1
  296. package/dist/lib/stack/validators.js.map +1 -1
  297. package/dist/lib/tab/tab-group.cjs.map +1 -1
  298. package/dist/lib/tab/tab-group.js +5 -5
  299. package/dist/lib/tab/tab-group.js.map +1 -1
  300. package/dist/lib/tab/tab.cjs.map +1 -1
  301. package/dist/lib/toast/toast-constants.cjs.map +1 -1
  302. package/dist/lib/toast/toast-constants.js.map +1 -1
  303. package/dist/lib/toast/toast.cjs +1 -1
  304. package/dist/lib/toast/toast.cjs.map +1 -1
  305. package/dist/lib/toast/toast.js +11 -11
  306. package/dist/lib/toggle/toggle-constants.cjs.map +1 -1
  307. package/dist/lib/toggle/toggle-constants.js.map +1 -1
  308. package/dist/lib/toggle/toggle.cjs.map +1 -1
  309. package/dist/lib/tooltip/tooltip-constants.cjs.map +1 -1
  310. package/dist/lib/tooltip/tooltip-constants.js.map +1 -1
  311. package/dist/lib/tooltip/tooltip.cjs +1 -1
  312. package/dist/lib/tooltip/tooltip.cjs.map +1 -1
  313. package/dist/lib/tooltip/tooltip.js +63 -62
  314. package/dist/lib/tooltip/tooltip.js.map +1 -1
  315. package/dist/lib/tooltip-directive/tooltip.cjs.map +1 -1
  316. package/dist/lib/tooltip-directive/tooltip.js.map +1 -1
  317. package/dist/lib/top-banner-info/top-banner-info-constants.cjs.map +1 -1
  318. package/dist/lib/top-banner-info/top-banner-info-constants.js.map +1 -1
  319. package/dist/lib/top-banner-info/top-banner-info.cjs.map +1 -1
  320. package/dist/lib/unread-pill/unread-pill-constants.cjs.map +1 -1
  321. package/dist/lib/unread-pill/unread-pill-constants.js.map +1 -1
  322. package/dist/lib/unread-pill/unread-pill.cjs.map +1 -1
  323. package/dist/lib/unread-pill/unread-pill.js +6 -6
  324. package/dist/lib/validation-messages/validation-messages.cjs.map +1 -1
  325. package/dist/lib/validation-messages/validation-messages.js +3 -3
  326. package/dist/localization/de-DE.cjs.map +1 -1
  327. package/dist/localization/de-DE.js.map +1 -1
  328. package/dist/localization/en-US.cjs.map +1 -1
  329. package/dist/localization/en-US.js.map +1 -1
  330. package/dist/localization/es-LA.cjs.map +1 -1
  331. package/dist/localization/es-LA.js.map +1 -1
  332. package/dist/localization/fr-FR.cjs.map +1 -1
  333. package/dist/localization/fr-FR.js.map +1 -1
  334. package/dist/localization/index.cjs.map +1 -1
  335. package/dist/localization/index.js.map +1 -1
  336. package/dist/localization/it-IT.cjs.map +1 -1
  337. package/dist/localization/it-IT.js.map +1 -1
  338. package/dist/localization/ja-JP.cjs.map +1 -1
  339. package/dist/localization/ja-JP.js.map +1 -1
  340. package/dist/localization/nl-NL.cjs.map +1 -1
  341. package/dist/localization/nl-NL.js.map +1 -1
  342. package/dist/localization/pt-BR.cjs.map +1 -1
  343. package/dist/localization/pt-BR.js.map +1 -1
  344. package/dist/localization/ru-RU.cjs.map +1 -1
  345. package/dist/localization/ru-RU.js.map +1 -1
  346. package/dist/localization/zh-CN.cjs.map +1 -1
  347. package/dist/localization/zh-CN.js.map +1 -1
  348. package/dist/node_modules/@linusborg/vue-simple-portal.cjs.map +1 -1
  349. package/dist/node_modules/@linusborg/vue-simple-portal.js.map +1 -1
  350. package/dist/node_modules/@tiptap/vue-2.cjs.map +1 -1
  351. package/dist/node_modules/@tiptap/vue-2.js.map +1 -1
  352. package/dist/shared/sr_only_close_button.cjs.map +1 -1
  353. package/dist/types/common/constants/index.d.ts.map +1 -1
  354. package/dist/types/common/dates/index.d.ts.map +1 -1
  355. package/dist/types/common/emoji/index.d.ts.map +1 -1
  356. package/dist/types/common/mixins/dom.d.ts.map +1 -1
  357. package/dist/types/common/mixins/input.d.ts +7 -7
  358. package/dist/types/common/mixins/input.d.ts.map +1 -1
  359. package/dist/types/common/mixins/input_group.d.ts +3 -3
  360. package/dist/types/common/mixins/modal.d.ts.map +1 -1
  361. package/dist/types/common/utils/index.d.ts.map +1 -1
  362. package/dist/types/components/avatar/avatar.vue.d.ts +8 -8
  363. package/dist/types/components/badge/badge.vue.d.ts +3 -3
  364. package/dist/types/components/banner/banner.vue.d.ts +2 -2
  365. package/dist/types/components/banner/banner.vue.d.ts.map +1 -1
  366. package/dist/types/components/breadcrumbs/breadcrumbs.vue.d.ts +1 -1
  367. package/dist/types/components/breadcrumbs/breadcrumbs_constants.d.ts.map +1 -1
  368. package/dist/types/components/button/button.vue.d.ts +2 -2
  369. package/dist/types/components/button/button_constants.d.ts.map +1 -1
  370. package/dist/types/components/card/card.vue.d.ts +8 -8
  371. package/dist/types/components/checkbox/checkbox.vue.d.ts +7 -7
  372. package/dist/types/components/checkbox_group/checkbox_group.vue.d.ts +3 -3
  373. package/dist/types/components/chip/chip.vue.d.ts +6 -6
  374. package/dist/types/components/collapsible/collapsible.vue.d.ts +4 -4
  375. package/dist/types/components/combobox/combobox.vue.d.ts +3 -3
  376. package/dist/types/components/combobox/combobox_empty-list.vue.d.ts +2 -2
  377. package/dist/types/components/datepicker/datepicker_constants.d.ts.map +1 -1
  378. package/dist/types/components/datepicker/formatUtils.d.ts +5 -5
  379. package/dist/types/components/datepicker/formatUtils.d.ts.map +1 -1
  380. package/dist/types/components/description_list/description_list.vue.d.ts +4 -4
  381. package/dist/types/components/dropdown/dropdown.vue.d.ts +8 -8
  382. package/dist/types/components/emoji/emoji.vue.d.ts +2 -2
  383. package/dist/types/components/emoji_picker/emoji_picker_constants.d.ts.map +1 -1
  384. package/dist/types/components/emoji_text_wrapper/emoji_text_wrapper.vue.d.ts.map +1 -1
  385. package/dist/types/components/image_viewer/image_viewer.vue.d.ts.map +1 -1
  386. package/dist/types/components/input/input.vue.d.ts +7 -7
  387. package/dist/types/components/input_group/input_group.vue.d.ts +3 -3
  388. package/dist/types/components/item_layout/item_layout.vue.d.ts +1 -1
  389. package/dist/types/components/link/link_constants.d.ts.map +1 -1
  390. package/dist/types/components/list_item/list_item.vue.d.ts +2 -2
  391. package/dist/types/components/list_item_group/list_item_group.vue.d.ts +4 -4
  392. package/dist/types/components/modal/modal.vue.d.ts +13 -13
  393. package/dist/types/components/modal/modal.vue.d.ts.map +1 -1
  394. package/dist/types/components/notice/notice.vue.d.ts +2 -2
  395. package/dist/types/components/popover/popover.vue.d.ts +20 -20
  396. package/dist/types/components/popover/popover.vue.d.ts.map +1 -1
  397. package/dist/types/components/popover/popover_header_footer.vue.d.ts +2 -2
  398. package/dist/types/components/popover/tippy_utils.d.ts +1 -1
  399. package/dist/types/components/radio/radio.vue.d.ts +7 -7
  400. package/dist/types/components/radio_group/radio_group.vue.d.ts +3 -3
  401. package/dist/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +47 -0
  402. package/dist/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts.map +1 -0
  403. package/dist/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +45 -0
  404. package/dist/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts.map +1 -0
  405. package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +47 -0
  406. package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts.map +1 -0
  407. package/dist/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts +47 -0
  408. package/dist/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts.map +1 -0
  409. package/dist/types/components/rich_text_editor/extensions/slash_command/slash_command.d.ts +1 -1
  410. package/dist/types/components/rich_text_editor/extensions/slash_command/slash_command.d.ts.map +1 -1
  411. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +11 -11
  412. package/dist/types/components/root_layout/root_layout.vue.d.ts +8 -8
  413. package/dist/types/components/select_menu/select_menu.vue.d.ts +10 -10
  414. package/dist/types/components/skeleton/skeleton-list-item.vue.d.ts +1 -1
  415. package/dist/types/components/skeleton/skeleton-paragraph.vue.d.ts +1 -1
  416. package/dist/types/components/skeleton/skeleton-shape.vue.d.ts +3 -3
  417. package/dist/types/components/skeleton/skeleton-text.vue.d.ts +1 -1
  418. package/dist/types/components/skeleton/skeleton.vue.d.ts +7 -7
  419. package/dist/types/components/skeleton/skeleton_constants.d.ts.map +1 -1
  420. package/dist/types/components/split_button/split_button-alpha.vue.d.ts +3 -3
  421. package/dist/types/components/split_button/split_button-omega.vue.d.ts +1 -1
  422. package/dist/types/components/split_button/split_button.vue.d.ts +2 -2
  423. package/dist/types/components/tab/tab.vue.d.ts +2 -2
  424. package/dist/types/components/tab/tab_group.vue.d.ts +2 -2
  425. package/dist/types/components/tab/tab_panel.vue.d.ts +2 -2
  426. package/dist/types/components/tab/tab_panel.vue.d.ts.map +1 -1
  427. package/dist/types/components/toast/layouts/toast_layout_alternate.vue.d.ts +2 -2
  428. package/dist/types/components/toast/layouts/toast_layout_default.vue.d.ts +2 -2
  429. package/dist/types/components/toast/toast.vue.d.ts +7 -7
  430. package/dist/types/components/toast/toast_constants.d.ts.map +1 -1
  431. package/dist/types/components/toggle/toggle.vue.d.ts +4 -4
  432. package/dist/types/components/tooltip/tooltip.vue.d.ts +8 -8
  433. package/dist/types/components/tooltip/tooltip_constants.d.ts.map +1 -1
  434. package/dist/types/components/validation_messages/validation_messages.vue.d.ts +1 -0
  435. package/dist/types/components/validation_messages/validation_messages.vue.d.ts.map +1 -1
  436. package/dist/types/recipes/buttons/callbar_button/callbar_button.vue.d.ts +6 -6
  437. package/dist/types/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +5 -5
  438. package/dist/types/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +6 -6
  439. package/dist/types/recipes/cards/ivr_node/ivr_node_constants.d.ts.map +1 -1
  440. package/dist/types/recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue.d.ts +1 -1
  441. package/dist/types/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue.d.ts +7 -7
  442. package/dist/types/recipes/conversation_view/editor/editor.vue.d.ts +3 -3
  443. package/dist/types/recipes/conversation_view/editor/editor_constants.d.ts.map +1 -1
  444. package/dist/types/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +4 -4
  445. package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +1 -1
  446. package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  447. package/dist/types/recipes/conversation_view/feed_item_row/feed_item_row_constants.d.ts.map +1 -1
  448. package/dist/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +52 -0
  449. package/dist/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -0
  450. package/dist/types/recipes/conversation_view/message_input/last_active_nodes.d.ts.map +1 -1
  451. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +15 -15
  452. package/dist/types/recipes/item_layout/contact_info/contact_info.vue.d.ts +1 -1
  453. package/dist/types/recipes/leftbar/callbox/callbox.vue.d.ts +1 -1
  454. package/dist/types/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +1 -1
  455. package/dist/types/recipes/leftbar/general_row/general_row.vue.d.ts +1 -1
  456. package/package.json +4 -4
@@ -1,18 +1,18 @@
1
1
  import { TOAST_ROLES as l, TOAST_ALTERNATE_KINDS as u, TOAST_MIN_DURATION as s, TOAST_LAYOUTS as h } from "./toast-constants.js";
2
2
  import o from "../../common/utils/index.js";
3
3
  import { n as a } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
4
- import c from "../notice/notice-action.js";
5
- import f from "../notice/notice-content.js";
6
4
  import y from "../notice/notice-icon.js";
5
+ import c from "../notice/notice-content.js";
6
+ import f from "../notice/notice-action.js";
7
7
  import { NOTICE_KINDS as g } from "../notice/notice-constants.js";
8
- import { DtIconSparkle as _, DtIconBell as p, DtIconAlertTriangle as m, DtIconInfo as i } from "@dialpad/dialtone-icons/vue2";
8
+ import { DtIconInfo as i, DtIconAlertTriangle as _, DtIconBell as p, DtIconSparkle as m } from "@dialpad/dialtone-icons/vue2";
9
9
  import { ICON_SIZE_MODIFIERS as S } from "../icon/icon-constants.js";
10
10
  const v = {
11
11
  name: "ToastLayoutDefault",
12
12
  components: {
13
13
  DtNoticeIcon: y,
14
- DtNoticeContent: f,
15
- DtNoticeAction: c
14
+ DtNoticeContent: c,
15
+ DtNoticeAction: f
16
16
  },
17
17
  props: {
18
18
  isShown: {
@@ -136,17 +136,17 @@ var I = function() {
136
136
  const r = k.exports, C = /* @__PURE__ */ new Map([
137
137
  ["info", i],
138
138
  ["success", i],
139
- ["warning", m],
139
+ ["warning", _],
140
140
  ["error", i],
141
141
  ["base", p],
142
- ["gradient", _]
142
+ ["gradient", m]
143
143
  ]), w = {
144
144
  name: "DtToastLayoutAlternateIcon",
145
145
  components: {
146
146
  DtIconInfo: i,
147
- DtIconAlertTriangle: m,
147
+ DtIconAlertTriangle: _,
148
148
  DtIconBell: p,
149
- DtIconSparkle: _
149
+ DtIconSparkle: m
150
150
  },
151
151
  props: {
152
152
  /**
@@ -185,8 +185,8 @@ var $ = function() {
185
185
  const O = D.exports, B = {
186
186
  name: "ToastLayoutAlternate",
187
187
  components: {
188
- DtNoticeAction: c,
189
- DtNoticeContent: f,
188
+ DtNoticeAction: f,
189
+ DtNoticeContent: c,
190
190
  DtToastLayoutAlternateIcon: O
191
191
  },
192
192
  props: {
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-constants.cjs","sources":["../../../components/toggle/toggle_constants.js"],"sourcesContent":["export const TOGGLE_SIZE_MODIFIERS = {\n sm: 'd-toggle--small',\n md: '',\n};\n\nexport const TOGGLE_CHECKED_VALUES = [false, true, 'mixed'];\n\nexport default {\n TOGGLE_SIZE_MODIFIERS,\n TOGGLE_CHECKED_VALUES,\n};\n"],"names":["TOGGLE_SIZE_MODIFIERS","TOGGLE_CHECKED_VALUES","toggle_constants"],"mappings":"4GAAY,MAACA,EAAwB,CACnC,GAAI,kBACJ,GAAI,EACN,EAEaC,EAAwB,CAAC,GAAO,GAAM,OAAO,EAE1DC,EAAe,CACb,sBAAAF,EACA,sBAAAC,CACF"}
1
+ {"version":3,"file":"toggle-constants.cjs","sources":["../../../components/toggle/toggle_constants.js"],"sourcesContent":["export const TOGGLE_SIZE_MODIFIERS = {\n sm: 'd-toggle--small',\n md: '',\n};\n\nexport const TOGGLE_CHECKED_VALUES = [false, true, 'mixed'];\n\nexport default {\n TOGGLE_SIZE_MODIFIERS,\n TOGGLE_CHECKED_VALUES,\n};\n"],"names":["TOGGLE_SIZE_MODIFIERS","TOGGLE_CHECKED_VALUES","toggle_constants"],"mappings":"4GAAY,MAACA,EAAwB,CACnC,GAAI,kBACJ,GAAI,EACN,EAEaC,EAAwB,CAAC,GAAO,GAAM,OAAO,EAE3CC,EAAA,CACb,sBAAAF,EACA,sBAAAC,CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-constants.js","sources":["../../../components/toggle/toggle_constants.js"],"sourcesContent":["export const TOGGLE_SIZE_MODIFIERS = {\n sm: 'd-toggle--small',\n md: '',\n};\n\nexport const TOGGLE_CHECKED_VALUES = [false, true, 'mixed'];\n\nexport default {\n TOGGLE_SIZE_MODIFIERS,\n TOGGLE_CHECKED_VALUES,\n};\n"],"names":["TOGGLE_SIZE_MODIFIERS","TOGGLE_CHECKED_VALUES","toggle_constants"],"mappings":"AAAY,MAACA,IAAwB;AAAA,EACnC,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAAwB,CAAC,IAAO,IAAM,OAAO,GAE1DC,IAAe;AAAA,EACb,uBAAAF;AAAA,EACA,uBAAAC;AACF;"}
1
+ {"version":3,"file":"toggle-constants.js","sources":["../../../components/toggle/toggle_constants.js"],"sourcesContent":["export const TOGGLE_SIZE_MODIFIERS = {\n sm: 'd-toggle--small',\n md: '',\n};\n\nexport const TOGGLE_CHECKED_VALUES = [false, true, 'mixed'];\n\nexport default {\n TOGGLE_SIZE_MODIFIERS,\n TOGGLE_CHECKED_VALUES,\n};\n"],"names":["TOGGLE_SIZE_MODIFIERS","TOGGLE_CHECKED_VALUES","toggle_constants"],"mappings":"AAAY,MAACA,IAAwB;AAAA,EACnC,IAAI;AAAA,EACJ,IAAI;AACN,GAEaC,IAAwB,CAAC,IAAO,IAAM,OAAO,GAE3CC,IAAA;AAAA,EACb,uBAAAF;AAAA,EACA,uBAAAC;AACF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"toggle.cjs","sources":["../../../components/toggle/toggle.vue"],"sourcesContent":["<template>\n <div class=\"d-toggle-wrapper\">\n <label\n v-if=\"$slots.default\"\n :class=\"labelClass\"\n :for=\"id\"\n v-bind=\"labelChildProps\"\n data-qa=\"toggle-label\"\n >\n <!-- @slot Slot for the main content -->\n <slot />\n </label>\n <button\n :id=\"id\"\n :role=\"toggleRole\"\n type=\"button\"\n :aria-checked=\"internalChecked.toString()\"\n :disabled=\"disabled\"\n :aria-disabled=\"disabled.toString()\"\n :class=\"toggleClasses\"\n v-bind=\"$attrs\"\n v-on=\"inputListeners\"\n >\n <span\n v-if=\"showIcon\"\n class=\"d-toggle__inner\"\n />\n </button>\n </div>\n</template>\n\n<script>\nimport Vue from 'vue';\nimport utils from '@/common/utils';\nimport { TOGGLE_CHECKED_VALUES, TOGGLE_SIZE_MODIFIERS } from '@/components/toggle/toggle_constants';\n\n/**\n * A toggle (or \"switch\") is a button control element that allows the user to make a binary (on/off) selection.\n * @see https://dialtone.dialpad.com/components/toggle.html\n */\nexport default {\n\n name: 'DtToggle',\n\n inheritAttrs: false,\n\n model: {\n prop: 'checked',\n event: 'change',\n },\n\n props: {\n\n /**\n * The id of the toggle\n */\n id: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Disables the toggle interactions\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Value of the toggle\n * @model checked\n * @values true, false, 'mixed'\n */\n checked: {\n type: [Boolean, String],\n default: false,\n validator: (v) => TOGGLE_CHECKED_VALUES.includes(v),\n },\n\n /**\n * Whether the component toggles on click. If you set this to false it means you will handle the toggling manually\n * via the checked prop or v-model. Change events will still be triggered.\n * @values true, false\n */\n toggleOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The size of the toggle.\n * @values sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(TOGGLE_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Shows the icon\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n emits: [\n /**\n * Toggle change event\n *\n * @event change\n * @type {Boolean}\n * @model change\n */\n 'change',\n ],\n\n data () {\n return {\n internalChecked: this.checked,\n };\n },\n\n computed: {\n inputListeners () {\n return {\n ...this.$listeners,\n click: () => this.toggleCheckedValue(),\n };\n },\n\n isIndeterminate () {\n return this.internalChecked === 'mixed';\n },\n\n toggleRole () {\n return this.isIndeterminate ? 'checkbox' : 'switch';\n },\n\n toggleClasses () {\n return [\n 'd-toggle',\n TOGGLE_SIZE_MODIFIERS[this.size],\n {\n 'd-toggle--checked': this.internalChecked === true,\n 'd-toggle--disabled': this.disabled,\n 'd-toggle--indeterminate': this.isIndeterminate,\n },\n ];\n },\n },\n\n watch: {\n checked (newChecked) {\n this.internalChecked = newChecked;\n },\n },\n\n mounted () {\n this.runValidations();\n },\n\n methods: {\n toggleCheckedValue () {\n this.$emit('change', !this.internalChecked);\n\n if (this.toggleOnClick) {\n this.internalChecked = !this.internalChecked;\n }\n },\n\n hasSlotLabel () {\n return !!(this.$slots.default);\n },\n\n runValidations () {\n this.validateInputLabels(this.hasSlotLabel(), this.$attrs['aria-label']);\n },\n\n validateInputLabels (hasLabel, ariaLabel) {\n if (!hasLabel && !ariaLabel) {\n Vue.util.warn(\n 'You must provide an aria-label when there is no label passed',\n this,\n );\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","utils","v","TOGGLE_CHECKED_VALUES","s","TOGGLE_SIZE_MODIFIERS","newChecked","hasLabel","ariaLabel","Vue"],"mappings":"yQAwCAA,EAAA,CAEA,KAAA,WAEA,aAAA,GAEA,MAAA,CACA,KAAA,UACA,MAAA,QACA,EAEA,MAAA,CAKA,GAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAC,EAAAA,QAAA,gBAAA,CAAA,CACA,EAMA,SAAA,CACA,KAAA,QACA,QAAA,EACA,EAOA,QAAA,CACA,KAAA,CAAA,QAAA,MAAA,EACA,QAAA,GACA,UAAAC,GAAAC,wBAAA,SAAAD,CAAA,CACA,EAOA,cAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,KAAA,CACA,KAAA,OACA,QAAA,KACA,UAAAE,GAAA,OAAA,KAAAC,uBAAA,EAAA,SAAAD,CAAA,CACA,EAMA,SAAA,CACA,KAAA,QACA,QAAA,EACA,EAKA,WAAA,CACA,KAAA,CAAA,OAAA,MAAA,MAAA,EACA,QAAA,EACA,EAKA,gBAAA,CACA,KAAA,OACA,QAAA,KAAA,CAAA,EACA,CACA,EAEA,MAAA,CAQA,QACA,EAEA,MAAA,CACA,MAAA,CACA,gBAAA,KAAA,OACA,CACA,EAEA,SAAA,CACA,gBAAA,CACA,MAAA,CACA,GAAA,KAAA,WACA,MAAA,IAAA,KAAA,mBAAA,CACA,CACA,EAEA,iBAAA,CACA,OAAA,KAAA,kBAAA,OACA,EAEA,YAAA,CACA,OAAA,KAAA,gBAAA,WAAA,QACA,EAEA,eAAA,CACA,MAAA,CACA,WACAC,EAAAA,sBAAA,KAAA,IAAA,EACA,CACA,oBAAA,KAAA,kBAAA,GACA,qBAAA,KAAA,SACA,0BAAA,KAAA,eACA,CACA,CACA,CACA,EAEA,MAAA,CACA,QAAAC,EAAA,CACA,KAAA,gBAAAA,CACA,CACA,EAEA,SAAA,CACA,KAAA,eAAA,CACA,EAEA,QAAA,CACA,oBAAA,CACA,KAAA,MAAA,SAAA,CAAA,KAAA,eAAA,EAEA,KAAA,gBACA,KAAA,gBAAA,CAAA,KAAA,gBAEA,EAEA,cAAA,CACA,MAAA,CAAA,CAAA,KAAA,OAAA,OACA,EAEA,gBAAA,CACA,KAAA,oBAAA,KAAA,aAAA,EAAA,KAAA,OAAA,YAAA,CAAA,CACA,EAEA,oBAAAC,EAAAC,EAAA,CACA,CAAAD,GAAA,CAAAC,GACAC,EAAA,KAAA,KACA,+DACA,IACA,CAEA,CACA,CACA"}
1
+ {"version":3,"file":"toggle.cjs","sources":["../../../components/toggle/toggle.vue"],"sourcesContent":["<template>\n <div class=\"d-toggle-wrapper\">\n <label\n v-if=\"$slots.default\"\n :class=\"labelClass\"\n :for=\"id\"\n v-bind=\"labelChildProps\"\n data-qa=\"toggle-label\"\n >\n <!-- @slot Slot for the main content -->\n <slot />\n </label>\n <button\n :id=\"id\"\n :role=\"toggleRole\"\n type=\"button\"\n :aria-checked=\"internalChecked.toString()\"\n :disabled=\"disabled\"\n :aria-disabled=\"disabled.toString()\"\n :class=\"toggleClasses\"\n v-bind=\"$attrs\"\n v-on=\"inputListeners\"\n >\n <span\n v-if=\"showIcon\"\n class=\"d-toggle__inner\"\n />\n </button>\n </div>\n</template>\n\n<script>\nimport Vue from 'vue';\nimport utils from '@/common/utils';\nimport { TOGGLE_CHECKED_VALUES, TOGGLE_SIZE_MODIFIERS } from '@/components/toggle/toggle_constants';\n\n/**\n * A toggle (or \"switch\") is a button control element that allows the user to make a binary (on/off) selection.\n * @see https://dialtone.dialpad.com/components/toggle.html\n */\nexport default {\n\n name: 'DtToggle',\n\n inheritAttrs: false,\n\n model: {\n prop: 'checked',\n event: 'change',\n },\n\n props: {\n\n /**\n * The id of the toggle\n */\n id: {\n type: String,\n default () { return utils.getUniqueString(); },\n },\n\n /**\n * Disables the toggle interactions\n * @values true, false\n */\n disabled: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Value of the toggle\n * @model checked\n * @values true, false, 'mixed'\n */\n checked: {\n type: [Boolean, String],\n default: false,\n validator: (v) => TOGGLE_CHECKED_VALUES.includes(v),\n },\n\n /**\n * Whether the component toggles on click. If you set this to false it means you will handle the toggling manually\n * via the checked prop or v-model. Change events will still be triggered.\n * @values true, false\n */\n toggleOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The size of the toggle.\n * @values sm, md\n */\n size: {\n type: String,\n default: 'md',\n validator: (s) => Object.keys(TOGGLE_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Shows the icon\n * @values true, false\n */\n showIcon: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Used to customize the label container\n */\n labelClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A set of props that are passed into the label container\n */\n labelChildProps: {\n type: Object,\n default: () => ({}),\n },\n },\n\n emits: [\n /**\n * Toggle change event\n *\n * @event change\n * @type {Boolean}\n * @model change\n */\n 'change',\n ],\n\n data () {\n return {\n internalChecked: this.checked,\n };\n },\n\n computed: {\n inputListeners () {\n return {\n ...this.$listeners,\n click: () => this.toggleCheckedValue(),\n };\n },\n\n isIndeterminate () {\n return this.internalChecked === 'mixed';\n },\n\n toggleRole () {\n return this.isIndeterminate ? 'checkbox' : 'switch';\n },\n\n toggleClasses () {\n return [\n 'd-toggle',\n TOGGLE_SIZE_MODIFIERS[this.size],\n {\n 'd-toggle--checked': this.internalChecked === true,\n 'd-toggle--disabled': this.disabled,\n 'd-toggle--indeterminate': this.isIndeterminate,\n },\n ];\n },\n },\n\n watch: {\n checked (newChecked) {\n this.internalChecked = newChecked;\n },\n },\n\n mounted () {\n this.runValidations();\n },\n\n methods: {\n toggleCheckedValue () {\n this.$emit('change', !this.internalChecked);\n\n if (this.toggleOnClick) {\n this.internalChecked = !this.internalChecked;\n }\n },\n\n hasSlotLabel () {\n return !!(this.$slots.default);\n },\n\n runValidations () {\n this.validateInputLabels(this.hasSlotLabel(), this.$attrs['aria-label']);\n },\n\n validateInputLabels (hasLabel, ariaLabel) {\n if (!hasLabel && !ariaLabel) {\n Vue.util.warn(\n 'You must provide an aria-label when there is no label passed',\n this,\n );\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","utils","v","TOGGLE_CHECKED_VALUES","s","TOGGLE_SIZE_MODIFIERS","newChecked","hasLabel","ariaLabel","Vue"],"mappings":"yQAwCAA,EAAA,CAEA,KAAA,WAEA,aAAA,GAEA,MAAA,CACA,KAAA,UACA,MAAA,QACA,EAEA,MAAA,CAKA,GAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAC,UAAA,gBAAA,CAAA,CACA,EAMA,SAAA,CACA,KAAA,QACA,QAAA,EACA,EAOA,QAAA,CACA,KAAA,CAAA,QAAA,MAAA,EACA,QAAA,GACA,UAAAC,GAAAC,wBAAA,SAAAD,CAAA,CACA,EAOA,cAAA,CACA,KAAA,QACA,QAAA,EACA,EAMA,KAAA,CACA,KAAA,OACA,QAAA,KACA,UAAAE,GAAA,OAAA,KAAAC,uBAAA,EAAA,SAAAD,CAAA,CACA,EAMA,SAAA,CACA,KAAA,QACA,QAAA,EACA,EAKA,WAAA,CACA,KAAA,CAAA,OAAA,MAAA,MAAA,EACA,QAAA,EACA,EAKA,gBAAA,CACA,KAAA,OACA,QAAA,KAAA,CAAA,EACA,CACA,EAEA,MAAA,CAQA,QACA,EAEA,MAAA,CACA,MAAA,CACA,gBAAA,KAAA,OACA,CACA,EAEA,SAAA,CACA,gBAAA,CACA,MAAA,CACA,GAAA,KAAA,WACA,MAAA,IAAA,KAAA,mBAAA,CACA,CACA,EAEA,iBAAA,CACA,OAAA,KAAA,kBAAA,OACA,EAEA,YAAA,CACA,OAAA,KAAA,gBAAA,WAAA,QACA,EAEA,eAAA,CACA,MAAA,CACA,WACAC,EAAA,sBAAA,KAAA,IAAA,EACA,CACA,oBAAA,KAAA,kBAAA,GACA,qBAAA,KAAA,SACA,0BAAA,KAAA,eACA,CACA,CACA,CACA,EAEA,MAAA,CACA,QAAAC,EAAA,CACA,KAAA,gBAAAA,CACA,CACA,EAEA,SAAA,CACA,KAAA,eAAA,CACA,EAEA,QAAA,CACA,oBAAA,CACA,KAAA,MAAA,SAAA,CAAA,KAAA,eAAA,EAEA,KAAA,gBACA,KAAA,gBAAA,CAAA,KAAA,gBAEA,EAEA,cAAA,CACA,MAAA,CAAA,CAAA,KAAA,OAAA,OACA,EAEA,gBAAA,CACA,KAAA,oBAAA,KAAA,aAAA,EAAA,KAAA,OAAA,YAAA,CAAA,CACA,EAEA,oBAAAC,EAAAC,EAAA,CACA,CAAAD,GAAA,CAAAC,GACAC,EAAA,KAAA,KACA,+DACA,IACA,CAEA,CACA,CACA"}
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip-constants.cjs","sources":["../../../components/tooltip/tooltip_constants.js"],"sourcesContent":["/*\n* Tippy directions - https://atomiks.github.io/tippyjs/v6/all-props/#placement\n* */\nimport { BASE_TIPPY_DIRECTIONS, TIPPY_STICKY_VALUES } from '@/components/popover/tippy_utils';\n\nexport const TOOLTIP_DIRECTIONS = [\n ...BASE_TIPPY_DIRECTIONS,\n];\n\nexport const TOOLTIP_DELAY_MS = 300;\n\nexport const TOOLTIP_KIND_MODIFIERS = {\n hover: `d-tooltip--hover`,\n show: `d-tooltip--show`,\n inverted: `d-tooltip--inverted`,\n hide: `d-tooltip--hide`,\n};\n\nexport const TOOLTIP_STICKY_VALUES = [\n ...TIPPY_STICKY_VALUES,\n];\n\nexport const TOOLTIP_HIDE_ON_CLICK_VARIANTS = [true, false, 'toggle'];\n\nexport default {\n TOOLTIP_DIRECTIONS,\n TOOLTIP_DELAY_MS,\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_HIDE_ON_CLICK_VARIANTS,\n};\n"],"names":["TOOLTIP_DIRECTIONS","BASE_TIPPY_DIRECTIONS","TOOLTIP_DELAY_MS","TOOLTIP_KIND_MODIFIERS","TOOLTIP_STICKY_VALUES","TIPPY_STICKY_VALUES","TOOLTIP_HIDE_ON_CLICK_VARIANTS","tooltip_constants"],"mappings":"0JAKaA,EAAqB,CAChC,GAAGC,EAAAA,qBACL,EAEaC,EAAmB,IAEnBC,EAAyB,CACpC,MAAO,mBACP,KAAM,kBACN,SAAU,sBACV,KAAM,iBACR,EAEaC,EAAwB,CACnC,GAAGC,EAAAA,mBACL,EAEaC,EAAiC,CAAC,GAAM,GAAO,QAAQ,EAEpEC,EAAe,CACb,mBAAAP,EACA,iBAAAE,EACA,uBAAAC,EACA,sBAAAC,EACA,+BAAAE,CACF"}
1
+ {"version":3,"file":"tooltip-constants.cjs","sources":["../../../components/tooltip/tooltip_constants.js"],"sourcesContent":["/*\n* Tippy directions - https://atomiks.github.io/tippyjs/v6/all-props/#placement\n* */\nimport { BASE_TIPPY_DIRECTIONS, TIPPY_STICKY_VALUES } from '@/components/popover/tippy_utils';\n\nexport const TOOLTIP_DIRECTIONS = [\n ...BASE_TIPPY_DIRECTIONS,\n];\n\nexport const TOOLTIP_DELAY_MS = 300;\n\nexport const TOOLTIP_KIND_MODIFIERS = {\n hover: `d-tooltip--hover`,\n show: `d-tooltip--show`,\n inverted: `d-tooltip--inverted`,\n hide: `d-tooltip--hide`,\n};\n\nexport const TOOLTIP_STICKY_VALUES = [\n ...TIPPY_STICKY_VALUES,\n];\n\nexport const TOOLTIP_HIDE_ON_CLICK_VARIANTS = [true, false, 'toggle'];\n\nexport default {\n TOOLTIP_DIRECTIONS,\n TOOLTIP_DELAY_MS,\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_HIDE_ON_CLICK_VARIANTS,\n};\n"],"names":["TOOLTIP_DIRECTIONS","BASE_TIPPY_DIRECTIONS","TOOLTIP_DELAY_MS","TOOLTIP_KIND_MODIFIERS","TOOLTIP_STICKY_VALUES","TIPPY_STICKY_VALUES","TOOLTIP_HIDE_ON_CLICK_VARIANTS","tooltip_constants"],"mappings":"0JAKaA,EAAqB,CAChC,GAAGC,EAAqB,qBAC1B,EAEaC,EAAmB,IAEnBC,EAAyB,CACpC,MAAO,mBACP,KAAM,kBACN,SAAU,sBACV,KAAM,iBACR,EAEaC,EAAwB,CACnC,GAAGC,EAAmB,mBACxB,EAEaC,EAAiC,CAAC,GAAM,GAAO,QAAQ,EAErDC,EAAA,CACb,mBAAAP,EACA,iBAAAE,EACA,uBAAAC,EACA,sBAAAC,EACA,+BAAAE,CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip-constants.js","sources":["../../../components/tooltip/tooltip_constants.js"],"sourcesContent":["/*\n* Tippy directions - https://atomiks.github.io/tippyjs/v6/all-props/#placement\n* */\nimport { BASE_TIPPY_DIRECTIONS, TIPPY_STICKY_VALUES } from '@/components/popover/tippy_utils';\n\nexport const TOOLTIP_DIRECTIONS = [\n ...BASE_TIPPY_DIRECTIONS,\n];\n\nexport const TOOLTIP_DELAY_MS = 300;\n\nexport const TOOLTIP_KIND_MODIFIERS = {\n hover: `d-tooltip--hover`,\n show: `d-tooltip--show`,\n inverted: `d-tooltip--inverted`,\n hide: `d-tooltip--hide`,\n};\n\nexport const TOOLTIP_STICKY_VALUES = [\n ...TIPPY_STICKY_VALUES,\n];\n\nexport const TOOLTIP_HIDE_ON_CLICK_VARIANTS = [true, false, 'toggle'];\n\nexport default {\n TOOLTIP_DIRECTIONS,\n TOOLTIP_DELAY_MS,\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_HIDE_ON_CLICK_VARIANTS,\n};\n"],"names":["TOOLTIP_DIRECTIONS","BASE_TIPPY_DIRECTIONS","TOOLTIP_DELAY_MS","TOOLTIP_KIND_MODIFIERS","TOOLTIP_STICKY_VALUES","TIPPY_STICKY_VALUES","TOOLTIP_HIDE_ON_CLICK_VARIANTS","tooltip_constants"],"mappings":";AAKY,MAACA,IAAqB;AAAA,EAChC,GAAGC;AACL,GAEaC,IAAmB,KAEnBC,IAAyB;AAAA,EACpC,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AACR,GAEaC,IAAwB;AAAA,EACnC,GAAGC;AACL,GAEaC,IAAiC,CAAC,IAAM,IAAO,QAAQ,GAEpEC,IAAe;AAAA,EACb,oBAAAP;AAAA,EACA,kBAAAE;AAAA,EACA,wBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,gCAAAE;AACF;"}
1
+ {"version":3,"file":"tooltip-constants.js","sources":["../../../components/tooltip/tooltip_constants.js"],"sourcesContent":["/*\n* Tippy directions - https://atomiks.github.io/tippyjs/v6/all-props/#placement\n* */\nimport { BASE_TIPPY_DIRECTIONS, TIPPY_STICKY_VALUES } from '@/components/popover/tippy_utils';\n\nexport const TOOLTIP_DIRECTIONS = [\n ...BASE_TIPPY_DIRECTIONS,\n];\n\nexport const TOOLTIP_DELAY_MS = 300;\n\nexport const TOOLTIP_KIND_MODIFIERS = {\n hover: `d-tooltip--hover`,\n show: `d-tooltip--show`,\n inverted: `d-tooltip--inverted`,\n hide: `d-tooltip--hide`,\n};\n\nexport const TOOLTIP_STICKY_VALUES = [\n ...TIPPY_STICKY_VALUES,\n];\n\nexport const TOOLTIP_HIDE_ON_CLICK_VARIANTS = [true, false, 'toggle'];\n\nexport default {\n TOOLTIP_DIRECTIONS,\n TOOLTIP_DELAY_MS,\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_HIDE_ON_CLICK_VARIANTS,\n};\n"],"names":["TOOLTIP_DIRECTIONS","BASE_TIPPY_DIRECTIONS","TOOLTIP_DELAY_MS","TOOLTIP_KIND_MODIFIERS","TOOLTIP_STICKY_VALUES","TIPPY_STICKY_VALUES","TOOLTIP_HIDE_ON_CLICK_VARIANTS","tooltip_constants"],"mappings":";AAKY,MAACA,IAAqB;AAAA,EAChC,GAAGC;AACL,GAEaC,IAAmB,KAEnBC,IAAyB;AAAA,EACpC,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AACR,GAEaC,IAAwB;AAAA,EACnC,GAAGC;AACL,GAEaC,IAAiC,CAAC,IAAM,IAAO,QAAQ,GAErDC,IAAA;AAAA,EACb,oBAAAP;AAAA,EACA,kBAAAE;AAAA,EACA,wBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,gCAAAE;AACF;"}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./tooltip-constants.cjs"),a=require("../popover/popover-constants.cjs"),s=require("../../common/utils/index.cjs"),i=require("../popover/tippy-utils.cjs"),h=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),l={name:"DtTooltip",props:{id:{type:String,default(){return s.getUniqueString()}},fallbackPlacements:{type:Array,default:()=>["auto"]},inverted:{type:Boolean,default:!1},offset:{type:Array,default:()=>[0,12]},placement:{type:String,default:"top",validator(e){return o.TOOLTIP_DIRECTIONS.includes(e)}},sticky:{type:[Boolean,String],default:!0,validator:e=>o.TOOLTIP_STICKY_VALUES.includes(e)},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>a.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},contentClass:{type:[String,Object,Array],default:""},message:{type:String,default:""},enabled:{type:Boolean,default:!0},show:{type:Boolean,default:null},transition:{type:Boolean,default:!0},delay:{type:Boolean,default:!0},theme:{type:String,default:null},externalAnchor:{type:String,default:null}},emits:["shown","update:show"],data(){return{TOOLTIP_KIND_MODIFIERS:o.TOOLTIP_KIND_MODIFIERS,tip:null,inTimer:null,internalShow:!1,currentPlacement:this.placement}},computed:{tippyProps(){return{offset:this.offset,delay:this.delay?o.TOOLTIP_DELAY_MS:!1,placement:this.placement,sticky:this.sticky,theme:this.inverted?"inverted":this.theme,animation:this.transition?"fade":!1,onShown:e=>this.onShow(e,"onShown"),onShow:e=>this.onShow(e,"onShow"),onHidden:this.onHide,popperOptions:i.getPopperOptions({fallbackPlacements:this.fallbackPlacements,hasHideModifierEnabled:!0})}},anchor(){return this.externalAnchor?document.body.querySelector(this.externalAnchor):i.getAnchor(this.$refs.anchor)}},watch:{tippyProps:{handler:"setProps",deep:!0},show:{handler:function(e){e!==null&&this.enabled&&(this.internalShow=e)},immediate:!0},internalShow(e){e?(this.setProps(),this.tip.show()):this.tip.hide()},sticky(e){this.tip.setProps({sticky:e})}},async mounted(){!this.enabled&&this.show!=null&&(console.warn("Tooltip: You cannot use both the enabled and show props at the same time."),console.warn("The show prop will be ignored.")),this.tip=i.createTippy(this.anchor,this.initOptions()),this.externalAnchor&&(await s.flushPromises(),this.addExternalAnchorEventListeners())},beforeDestroy(){var e,t;this.externalAnchor&&this.removeExternalAnchorEventListeners(),(e=this.anchor)!=null&&e._tippy&&((t=this.tip)==null||t.destroy())},methods:{calculateAnchorZindex(){return this.$el.getRootNode().querySelector(`.d-modal[aria-hidden="false"],
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./tooltip-constants.cjs"),a=require("../popover/popover-constants.cjs"),s=require("../../common/utils/index.cjs"),i=require("../popover/tippy-utils.cjs"),h=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),l={name:"DtTooltip",props:{id:{type:String,default(){return s.getUniqueString()}},fallbackPlacements:{type:Array,default:()=>["auto"]},inverted:{type:Boolean,default:!1},offset:{type:Array,default:()=>[0,12]},placement:{type:String,default:"top",validator(e){return o.TOOLTIP_DIRECTIONS.includes(e)}},sticky:{type:[Boolean,String],default:!0,validator:e=>o.TOOLTIP_STICKY_VALUES.includes(e)},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>a.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},contentClass:{type:[String,Object,Array],default:""},message:{type:String,default:""},enabled:{type:Boolean,default:!0},show:{type:Boolean,default:null},transition:{type:Boolean,default:!0},delay:{type:Boolean,default:!0},theme:{type:String,default:null},externalAnchor:{type:String,default:null}},emits:["shown","update:show"],data(){return{TOOLTIP_KIND_MODIFIERS:o.TOOLTIP_KIND_MODIFIERS,tip:null,inTimer:null,internalShow:!1,currentPlacement:this.placement}},computed:{tippyProps(){return{offset:this.offset,delay:this.delay?o.TOOLTIP_DELAY_MS:!1,placement:this.placement,sticky:this.sticky,theme:this.inverted?"inverted":this.theme,animation:this.transition?"fade":!1,onShown:e=>this.onShow(e,"onShown"),onShow:e=>this.onShow(e,"onShow"),onHidden:this.onHide,popperOptions:i.getPopperOptions({fallbackPlacements:this.fallbackPlacements,hasHideModifierEnabled:!0,onChangePlacement:this.onChangePlacement})}},anchor(){return this.externalAnchor?document.body.querySelector(this.externalAnchor):i.getAnchor(this.$refs.anchor)}},watch:{tippyProps:{handler:"setProps",deep:!0},show:{handler:function(e){e!==null&&this.enabled&&(this.internalShow=e)},immediate:!0},internalShow(e){e?(this.setProps(),this.tip.show()):this.tip.hide()},sticky(e){this.tip.setProps({sticky:e})}},async mounted(){!this.enabled&&this.show!=null&&(console.warn("Tooltip: You cannot use both the enabled and show props at the same time."),console.warn("The show prop will be ignored.")),this.tip=i.createTippy(this.anchor,this.initOptions()),this.externalAnchor&&(await s.flushPromises(),this.addExternalAnchorEventListeners())},beforeDestroy(){var e,t;this.externalAnchor&&this.removeExternalAnchorEventListeners(),(e=this.anchor)!=null&&e._tippy&&((t=this.tip)==null||t.destroy())},methods:{calculateAnchorZindex(){return this.$el.getRootNode().querySelector(`.d-modal[aria-hidden="false"],
2
2
  .d-modal--transparent[aria-hidden="false"],
3
3
  .d-modal:not([aria-hidden]),
4
4
  .d-modal--transparent:not([aria-hidden])`)||this.$el.closest(".d-zi-drawer")?651:400},hasVisibleFocus(){return this.anchor.matches(":focus-visible")},onEnterAnchor(e){this.enabled&&(this.delay&&this.inTimer===null?this.inTimer=setTimeout(()=>{this.triggerShow(e)},o.TOOLTIP_DELAY_MS):this.triggerShow(e))},triggerShow(e){e.type==="focusin"?this.show===null&&this.hasVisibleFocus()&&(this.internalShow=!0):this.show===null&&(this.internalShow=!0)},onLeaveAnchor(e){e.type==="keydown"&&e.code!=="Escape"||(clearTimeout(this.inTimer),this.inTimer=null,this.triggerHide())},triggerHide(){this.show===null&&(this.internalShow=!1)},onChangePlacement(e){this.currentPlacement=e},onHide(){var e;(e=this.tip)==null||e.unmount(),this.$emit("shown",!1),this.show!==null&&this.$emit("update:show",!1)},onShow(e,t){if(!this.tooltipHasContent(e))return!1;this.transition&&t==="onShow"||(this.$emit("shown",!0),this.show!==null&&this.$emit("update:show",!0))},setProps(){var e,t;this.tip&&this.tip.setProps&&this.tip.setProps({...this.tippyProps,appendTo:this.appendTo==="body"?(t=(e=this.anchor)==null?void 0:e.getRootNode())==null?void 0:t.querySelector("body"):this.appendTo,zIndex:this.calculateAnchorZindex()})},onMount(){this.setProps()},tooltipHasContent(e){return e.props.content.textContent.trim().length!==0},initOptions(){return{content:this.$refs.content,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>',duration:180,interactive:!1,trigger:"manual",hideOnClick:!1,touch:!1,onMount:this.onMount,showOnCreate:this.internalShow,popperOptions:i.getPopperOptions({hasHideModifierEnabled:!0})}},addExternalAnchorEventListeners(){["focusin","mouseenter"].forEach(e=>{var t;(t=this.anchor)==null||t.addEventListener(e,n=>this.onEnterAnchor(n))}),["focusout","mouseleave","keydown"].forEach(e=>{var t;(t=this.anchor)==null||t.addEventListener(e,n=>this.onLeaveAnchor(n))})},removeExternalAnchorEventListeners(){["focusin","mouseenter"].forEach(e=>{var t;(t=this.anchor)==null||t.removeEventListener(e,n=>this.onEnterAnchor(n))}),["focusout","mouseleave","keydown"].forEach(e=>{var t;(t=this.anchor)==null||t.removeEventListener(e,n=>this.onLeaveAnchor(n))})}}};var u=function(){var t=this,n=t._self._c;return n("div",{attrs:{"data-qa":"dt-tooltip-container"}},[t.externalAnchor?t._e():n("span",{ref:"anchor",attrs:{"data-qa":"dt-tooltip-anchor"},on:{focusin:t.onEnterAnchor,focusout:t.onLeaveAnchor,mouseenter:t.onEnterAnchor,mouseleave:t.onLeaveAnchor,keydown:function(r){return!r.type.indexOf("key")&&t._k(r.keyCode,"esc",27,r.key,["Esc","Escape"])?null:t.onLeaveAnchor.apply(null,arguments)}}},[t._t("anchor")],2),n("div",t._g({ref:"content",class:["d-tooltip",{[t.TOOLTIP_KIND_MODIFIERS.inverted]:t.inverted},t.contentClass],attrs:{id:t.id,"data-qa":"dt-tooltip"}},t.$listeners),[t._t("default",function(){return[t._v(" "+t._s(t.message)+" ")]})],2)])},d=[],c=h.n(l,u,d);const p=c.exports;exports.default=p;
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.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 // eslint-disable-next-line vue/no-restricted-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 \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.anchor?._tippy) {\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(\n `.d-modal[aria-hidden=\"false\"],\n .d-modal--transparent[aria-hidden=\"false\"],\n .d-modal:not([aria-hidden]),\n .d-modal--transparent:not([aria-hidden])`) ||\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"],"names":["_sfc_main","getUniqueString","placement","TOOLTIP_DIRECTIONS","sticky","TOOLTIP_STICKY_VALUES","appendTo","POPOVER_APPEND_TO_VALUES","TOOLTIP_KIND_MODIFIERS","TOOLTIP_DELAY_MS","tooltipInstance","getPopperOptions","getAnchor","show","value","createTippy","flushPromises","_a","_b","callingMethod","listener","event"],"mappings":"+UAmEAA,EAAA,CACA,KAAA,YAEA,MAAA,CAIA,GAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAC,EAAAA,gBAAA,CAAA,CACA,EAeA,mBAAA,CACA,KAAA,MACA,QAAA,IAAA,CAAA,MAAA,CACA,EAMA,SAAA,CACA,KAAA,QACA,QAAA,EACA,EAaA,OAAA,CACA,KAAA,MACA,QAAA,IAAA,CAAA,EAAA,EAAA,CACA,EAiBA,UAAA,CACA,KAAA,OACA,QAAA,MACA,UAAAC,EAAA,CACA,OAAAC,EAAAA,mBAAA,SAAAD,CAAA,CACA,CACA,EAiBA,OAAA,CACA,KAAA,CAAA,QAAA,MAAA,EACA,QAAA,GACA,UAAAE,GACAC,EAAAA,sBAAA,SAAAD,CAAA,CAEA,EAQA,SAAA,CACA,KAAA,CAAA,YAAA,MAAA,EACA,QAAA,OACA,UAAAE,GACAC,EAAAA,yBAAA,SAAAD,CAAA,GACAA,aAAA,WAEA,EAOA,aAAA,CACA,KAAA,CAAA,OAAA,OAAA,KAAA,EACA,QAAA,EACA,EAKA,QAAA,CACA,KAAA,OACA,QAAA,EACA,EAOA,QAAA,CACA,KAAA,QACA,QAAA,EACA,EAQA,KAAA,CACA,KAAA,QACA,QAAA,IACA,EAKA,WAAA,CACA,KAAA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,UACA,KAAA,IAAA,SAAA,CACA,GAAA,KAAA,WAEA,SAAA,KAAA,WAAA,QAAAD,GAAAD,EAAA,KAAA,SAAA,YAAAA,EAAA,gBAAA,YAAAC,EAAA,cAAA,QAAA,KAAA,SACA,OAAA,KAAA,sBAAA,CACA,CAAA,CAEA,EAEA,SAAA,CACA,KAAA,SAAA,CACA,EAEA,kBAAAR,EAAA,CAEA,OAAAA,EAAA,MAAA,QAAA,YAAA,KAAA,EAAA,SAAA,CAIA,EAIA,aAAA,CAEA,MAAA,CACA,QAFA,KAAA,MAAA,QAGA,MAAA,uGAEA,SAAA,IACA,YAAA,GACA,QAAA,SACA,YAAA,GAEA,MAAA,GACA,QAAA,KAAA,QACA,aAAA,KAAA,aACA,cAAAC,EAAAA,iBAAA,CACA,uBAAA,EACA,CAAA,CACA,CACA,EAEA,iCAAA,CACA,CAAA,UAAA,YAAA,EAAA,QAAAS,GAAA,QACAH,EAAA,KAAA,SAAA,MAAAA,EAAA,iBAAAG,EAAAC,GAAA,KAAA,cAAAA,CAAA,EACA,CAAA,EACA,CAAA,WAAA,aAAA,SAAA,EAAA,QAAAD,GAAA,QACAH,EAAA,KAAA,SAAA,MAAAA,EAAA,iBAAAG,EAAAC,GAAA,KAAA,cAAAA,CAAA,EACA,CAAA,CACA,EAEA,oCAAA,CACA,CAAA,UAAA,YAAA,EAAA,QAAAD,GAAA,QACAH,EAAA,KAAA,SAAA,MAAAA,EAAA,oBAAAG,EAAAC,GAAA,KAAA,cAAAA,CAAA,EACA,CAAA,EACA,CAAA,WAAA,aAAA,SAAA,EAAA,QAAAD,GAAA,QACAH,EAAA,KAAA,SAAA,MAAAA,EAAA,oBAAAG,EAAAC,GAAA,KAAA,cAAAA,CAAA,EACA,CAAA,CACA,CACA,CACA"}
1
+ {"version":3,"file":"tooltip.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 // eslint-disable-next-line vue/no-restricted-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 \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.anchor?._tippy) {\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(\n `.d-modal[aria-hidden=\"false\"],\n .d-modal--transparent[aria-hidden=\"false\"],\n .d-modal:not([aria-hidden]),\n .d-modal--transparent:not([aria-hidden])`) ||\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"],"names":["_sfc_main","getUniqueString","placement","TOOLTIP_DIRECTIONS","sticky","TOOLTIP_STICKY_VALUES","appendTo","POPOVER_APPEND_TO_VALUES","TOOLTIP_KIND_MODIFIERS","TOOLTIP_DELAY_MS","tooltipInstance","getPopperOptions","getAnchor","show","value","createTippy","flushPromises","_a","_b","callingMethod","listener","event"],"mappings":"+UAmEAA,EAAA,CACA,KAAA,YAEA,MAAA,CAIA,GAAA,CACA,KAAA,OACA,SAAA,CAAA,OAAAC,EAAA,gBAAA,CAAA,CACA,EAeA,mBAAA,CACA,KAAA,MACA,QAAA,IAAA,CAAA,MAAA,CACA,EAMA,SAAA,CACA,KAAA,QACA,QAAA,EACA,EAaA,OAAA,CACA,KAAA,MACA,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WAAA,aAAA,SAAA,EAAA,QAAAD,GAAA,QACAH,EAAA,KAAA,SAAA,MAAAA,EAAA,iBAAAG,EAAAC,GAAA,KAAA,cAAAA,CAAA,EACA,CAAA,CACA,EAEA,oCAAA,CACA,CAAA,UAAA,YAAA,EAAA,QAAAD,GAAA,QACAH,EAAA,KAAA,SAAA,MAAAA,EAAA,oBAAAG,EAAAC,GAAA,KAAA,cAAAA,CAAA,EACA,CAAA,EACA,CAAA,WAAA,aAAA,SAAA,EAAA,QAAAD,GAAA,QACAH,EAAA,KAAA,SAAA,MAAAA,EAAA,oBAAAG,EAAAC,GAAA,KAAA,cAAAA,CAAA,EACA,CAAA,CACA,CACA,CACA"}
@@ -1,7 +1,7 @@
1
- import { TOOLTIP_DELAY_MS as i, TOOLTIP_KIND_MODIFIERS as s, TOOLTIP_STICKY_VALUES as a, TOOLTIP_DIRECTIONS as h } from "./tooltip-constants.js";
1
+ import { TOOLTIP_DIRECTIONS as s, TOOLTIP_STICKY_VALUES as a, TOOLTIP_KIND_MODIFIERS as h, TOOLTIP_DELAY_MS as i } from "./tooltip-constants.js";
2
2
  import { POPOVER_APPEND_TO_VALUES as l } from "../popover/popover-constants.js";
3
- import { flushPromises as d, getUniqueString as c } from "../../common/utils/index.js";
4
- import { getPopperOptions as r, createTippy as u, getAnchor as p } from "../popover/tippy-utils.js";
3
+ import { getUniqueString as d, flushPromises as c } from "../../common/utils/index.js";
4
+ import { getPopperOptions as r, getAnchor as u, createTippy as p } from "../popover/tippy-utils.js";
5
5
  import { n as f } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
6
6
  const m = {
7
7
  name: "DtTooltip",
@@ -12,7 +12,7 @@ const m = {
12
12
  id: {
13
13
  type: String,
14
14
  default() {
15
- return c();
15
+ return d();
16
16
  }
17
17
  },
18
18
  /**
@@ -73,8 +73,8 @@ const m = {
73
73
  placement: {
74
74
  type: String,
75
75
  default: "top",
76
- validator(t) {
77
- return h.includes(t);
76
+ validator(e) {
77
+ return s.includes(e);
78
78
  }
79
79
  },
80
80
  /**
@@ -95,7 +95,7 @@ const m = {
95
95
  sticky: {
96
96
  type: [Boolean, String],
97
97
  default: !0,
98
- validator: (t) => a.includes(t)
98
+ validator: (e) => a.includes(e)
99
99
  },
100
100
  /**
101
101
  * Sets the element to which the tooltip is going to append to.
@@ -106,7 +106,7 @@ const m = {
106
106
  appendTo: {
107
107
  type: [HTMLElement, String],
108
108
  default: "body",
109
- validator: (t) => l.includes(t) || t instanceof HTMLElement
109
+ validator: (e) => l.includes(e) || e instanceof HTMLElement
110
110
  },
111
111
  /**
112
112
  * Additional css classes for the tooltip content element.
@@ -191,7 +191,7 @@ const m = {
191
191
  ],
192
192
  data() {
193
193
  return {
194
- TOOLTIP_KIND_MODIFIERS: s,
194
+ TOOLTIP_KIND_MODIFIERS: h,
195
195
  tip: null,
196
196
  inTimer: null,
197
197
  // Internal state for whether the tooltip is shown. Changing the prop
@@ -213,18 +213,19 @@ const m = {
213
213
  theme: this.inverted ? "inverted" : this.theme,
214
214
  animation: this.transition ? "fade" : !1,
215
215
  // onShown only triggers when transition is truthy
216
- onShown: (t) => this.onShow(t, "onShown"),
216
+ onShown: (e) => this.onShow(e, "onShown"),
217
217
  // onShown will always be called, but it will be called before the animation is complete
218
- onShow: (t) => this.onShow(t, "onShow"),
218
+ onShow: (e) => this.onShow(e, "onShow"),
219
219
  onHidden: this.onHide,
220
220
  popperOptions: r({
221
221
  fallbackPlacements: this.fallbackPlacements,
222
- hasHideModifierEnabled: !0
222
+ hasHideModifierEnabled: !0,
223
+ onChangePlacement: this.onChangePlacement
223
224
  })
224
225
  };
225
226
  },
226
227
  anchor() {
227
- return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : p(this.$refs.anchor);
228
+ return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : u(this.$refs.anchor);
228
229
  }
229
230
  },
230
231
  watch: {
@@ -233,26 +234,26 @@ const m = {
233
234
  deep: !0
234
235
  },
235
236
  show: {
236
- handler: function(t) {
237
- t !== null && this.enabled && (this.internalShow = t);
237
+ handler: function(e) {
238
+ e !== null && this.enabled && (this.internalShow = e);
238
239
  },
239
240
  immediate: !0
240
241
  },
241
- internalShow(t) {
242
- t ? (this.setProps(), this.tip.show()) : this.tip.hide();
242
+ internalShow(e) {
243
+ e ? (this.setProps(), this.tip.show()) : this.tip.hide();
243
244
  },
244
- sticky(t) {
245
+ sticky(e) {
245
246
  this.tip.setProps({
246
- sticky: t
247
+ sticky: e
247
248
  });
248
249
  }
249
250
  },
250
251
  async mounted() {
251
- !this.enabled && this.show != null && (console.warn("Tooltip: You cannot use both the enabled and show props at the same time."), console.warn("The show prop will be ignored.")), this.tip = u(this.anchor, this.initOptions()), this.externalAnchor && (await d(), this.addExternalAnchorEventListeners());
252
+ !this.enabled && this.show != null && (console.warn("Tooltip: You cannot use both the enabled and show props at the same time."), console.warn("The show prop will be ignored.")), this.tip = p(this.anchor, this.initOptions()), this.externalAnchor && (await c(), this.addExternalAnchorEventListeners());
252
253
  },
253
254
  beforeDestroy() {
254
- var t, e;
255
- this.externalAnchor && this.removeExternalAnchorEventListeners(), (t = this.anchor) != null && t._tippy && ((e = this.tip) == null || e.destroy());
255
+ var e, t;
256
+ this.externalAnchor && this.removeExternalAnchorEventListeners(), (e = this.anchor) != null && e._tippy && ((t = this.tip) == null || t.destroy());
256
257
  },
257
258
  methods: {
258
259
  calculateAnchorZindex() {
@@ -268,46 +269,46 @@ const m = {
268
269
  hasVisibleFocus() {
269
270
  return this.anchor.matches(":focus-visible");
270
271
  },
271
- onEnterAnchor(t) {
272
+ onEnterAnchor(e) {
272
273
  this.enabled && (this.delay && this.inTimer === null ? this.inTimer = setTimeout(() => {
273
- this.triggerShow(t);
274
- }, i) : this.triggerShow(t));
274
+ this.triggerShow(e);
275
+ }, i) : this.triggerShow(e));
275
276
  },
276
- triggerShow(t) {
277
- t.type === "focusin" ? this.show === null && this.hasVisibleFocus() && (this.internalShow = !0) : this.show === null && (this.internalShow = !0);
277
+ triggerShow(e) {
278
+ e.type === "focusin" ? this.show === null && this.hasVisibleFocus() && (this.internalShow = !0) : this.show === null && (this.internalShow = !0);
278
279
  },
279
- onLeaveAnchor(t) {
280
- t.type === "keydown" && t.code !== "Escape" || (clearTimeout(this.inTimer), this.inTimer = null, this.triggerHide());
280
+ onLeaveAnchor(e) {
281
+ e.type === "keydown" && e.code !== "Escape" || (clearTimeout(this.inTimer), this.inTimer = null, this.triggerHide());
281
282
  },
282
283
  triggerHide() {
283
284
  this.show === null && (this.internalShow = !1);
284
285
  },
285
- onChangePlacement(t) {
286
- this.currentPlacement = t;
286
+ onChangePlacement(e) {
287
+ this.currentPlacement = e;
287
288
  },
288
289
  onHide() {
289
- var t;
290
- (t = this.tip) == null || t.unmount(), this.$emit("shown", !1), this.show !== null && this.$emit("update:show", !1);
290
+ var e;
291
+ (e = this.tip) == null || e.unmount(), this.$emit("shown", !1), this.show !== null && this.$emit("update:show", !1);
291
292
  },
292
- onShow(t, e) {
293
- if (!this.tooltipHasContent(t))
293
+ onShow(e, t) {
294
+ if (!this.tooltipHasContent(e))
294
295
  return !1;
295
- this.transition && e === "onShow" || (this.$emit("shown", !0), this.show !== null && this.$emit("update:show", !0));
296
+ this.transition && t === "onShow" || (this.$emit("shown", !0), this.show !== null && this.$emit("update:show", !0));
296
297
  },
297
298
  setProps() {
298
- var t, e;
299
+ var e, t;
299
300
  this.tip && this.tip.setProps && this.tip.setProps({
300
301
  ...this.tippyProps,
301
302
  // these need to be set here rather than in tippyProps because they are non-reactive
302
- appendTo: this.appendTo === "body" ? (e = (t = this.anchor) == null ? void 0 : t.getRootNode()) == null ? void 0 : e.querySelector("body") : this.appendTo,
303
+ appendTo: this.appendTo === "body" ? (t = (e = this.anchor) == null ? void 0 : e.getRootNode()) == null ? void 0 : t.querySelector("body") : this.appendTo,
303
304
  zIndex: this.calculateAnchorZindex()
304
305
  });
305
306
  },
306
307
  onMount() {
307
308
  this.setProps();
308
309
  },
309
- tooltipHasContent(t) {
310
- return t.props.content.textContent.trim().length !== 0;
310
+ tooltipHasContent(e) {
311
+ return e.props.content.textContent.trim().length !== 0;
311
312
  },
312
313
  // set initial options here. If any of the options need to dynamically change, they should be put in
313
314
  // tippyProps instead.
@@ -330,45 +331,45 @@ const m = {
330
331
  };
331
332
  },
332
333
  addExternalAnchorEventListeners() {
333
- ["focusin", "mouseenter"].forEach((t) => {
334
- var e;
335
- (e = this.anchor) == null || e.addEventListener(t, (n) => this.onEnterAnchor(n));
336
- }), ["focusout", "mouseleave", "keydown"].forEach((t) => {
337
- var e;
338
- (e = this.anchor) == null || e.addEventListener(t, (n) => this.onLeaveAnchor(n));
334
+ ["focusin", "mouseenter"].forEach((e) => {
335
+ var t;
336
+ (t = this.anchor) == null || t.addEventListener(e, (n) => this.onEnterAnchor(n));
337
+ }), ["focusout", "mouseleave", "keydown"].forEach((e) => {
338
+ var t;
339
+ (t = this.anchor) == null || t.addEventListener(e, (n) => this.onLeaveAnchor(n));
339
340
  });
340
341
  },
341
342
  removeExternalAnchorEventListeners() {
342
- ["focusin", "mouseenter"].forEach((t) => {
343
- var e;
344
- (e = this.anchor) == null || e.removeEventListener(t, (n) => this.onEnterAnchor(n));
345
- }), ["focusout", "mouseleave", "keydown"].forEach((t) => {
346
- var e;
347
- (e = this.anchor) == null || e.removeEventListener(t, (n) => this.onLeaveAnchor(n));
343
+ ["focusin", "mouseenter"].forEach((e) => {
344
+ var t;
345
+ (t = this.anchor) == null || t.removeEventListener(e, (n) => this.onEnterAnchor(n));
346
+ }), ["focusout", "mouseleave", "keydown"].forEach((e) => {
347
+ var t;
348
+ (t = this.anchor) == null || t.removeEventListener(e, (n) => this.onLeaveAnchor(n));
348
349
  });
349
350
  }
350
351
  }
351
352
  };
352
353
  var y = function() {
353
- var e = this, n = e._self._c;
354
- return n("div", { attrs: { "data-qa": "dt-tooltip-container" } }, [e.externalAnchor ? e._e() : n("span", { ref: "anchor", attrs: { "data-qa": "dt-tooltip-anchor" }, on: { focusin: e.onEnterAnchor, focusout: e.onLeaveAnchor, mouseenter: e.onEnterAnchor, mouseleave: e.onLeaveAnchor, keydown: function(o) {
355
- return !o.type.indexOf("key") && e._k(o.keyCode, "esc", 27, o.key, ["Esc", "Escape"]) ? null : e.onLeaveAnchor.apply(null, arguments);
356
- } } }, [e._t("anchor")], 2), n("div", e._g({ ref: "content", class: [
354
+ var t = this, n = t._self._c;
355
+ return n("div", { attrs: { "data-qa": "dt-tooltip-container" } }, [t.externalAnchor ? t._e() : n("span", { ref: "anchor", attrs: { "data-qa": "dt-tooltip-anchor" }, on: { focusin: t.onEnterAnchor, focusout: t.onLeaveAnchor, mouseenter: t.onEnterAnchor, mouseleave: t.onLeaveAnchor, keydown: function(o) {
356
+ return !o.type.indexOf("key") && t._k(o.keyCode, "esc", 27, o.key, ["Esc", "Escape"]) ? null : t.onLeaveAnchor.apply(null, arguments);
357
+ } } }, [t._t("anchor")], 2), n("div", t._g({ ref: "content", class: [
357
358
  // eslint-disable-next-line vue/no-restricted-class
358
359
  "d-tooltip",
359
360
  {
360
- [e.TOOLTIP_KIND_MODIFIERS.inverted]: e.inverted
361
+ [t.TOOLTIP_KIND_MODIFIERS.inverted]: t.inverted
361
362
  },
362
- e.contentClass
363
- ], attrs: { id: e.id, "data-qa": "dt-tooltip" } }, e.$listeners), [e._t("default", function() {
364
- return [e._v(" " + e._s(e.message) + " ")];
363
+ t.contentClass
364
+ ], attrs: { id: t.id, "data-qa": "dt-tooltip" } }, t.$listeners), [t._t("default", function() {
365
+ return [t._v(" " + t._s(t.message) + " ")];
365
366
  })], 2)]);
366
- }, w = [], v = /* @__PURE__ */ f(
367
+ }, w = [], g = /* @__PURE__ */ f(
367
368
  m,
368
369
  y,
369
370
  w
370
371
  );
371
- const T = v.exports;
372
+ const T = g.exports;
372
373
  export {
373
374
  T as default
374
375
  };
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","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 // eslint-disable-next-line vue/no-restricted-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 \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.anchor?._tippy) {\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(\n `.d-modal[aria-hidden=\"false\"],\n .d-modal--transparent[aria-hidden=\"false\"],\n .d-modal:not([aria-hidden]),\n .d-modal--transparent:not([aria-hidden])`) ||\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"],"names":["_sfc_main","getUniqueString","placement","TOOLTIP_DIRECTIONS","sticky","TOOLTIP_STICKY_VALUES","appendTo","POPOVER_APPEND_TO_VALUES","TOOLTIP_KIND_MODIFIERS","TOOLTIP_DELAY_MS","tooltipInstance","getPopperOptions","getAnchor","show","value","createTippy","flushPromises","_a","_b","e","callingMethod","listener","event"],"mappings":";;;;;AAmEA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAC,EAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAA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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 // eslint-disable-next-line vue/no-restricted-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 \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.anchor?._tippy) {\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(\n `.d-modal[aria-hidden=\"false\"],\n .d-modal--transparent[aria-hidden=\"false\"],\n .d-modal:not([aria-hidden]),\n .d-modal--transparent:not([aria-hidden])`) ||\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"],"names":["_sfc_main","getUniqueString","placement","TOOLTIP_DIRECTIONS","sticky","TOOLTIP_STICKY_VALUES","appendTo","POPOVER_APPEND_TO_VALUES","TOOLTIP_KIND_MODIFIERS","TOOLTIP_DELAY_MS","tooltipInstance","getPopperOptions","getAnchor","show","value","createTippy","flushPromises","_a","_b","callingMethod","listener","event"],"mappings":";;;;;AAmEA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAC,EA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