@dialpad/dialtone-vue 4.9.0 → 4.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (477) hide show
  1. package/dist/{Combobox-WsLvegw6.js → Combobox-BKj61IcR.js} +5 -5
  2. package/dist/{Combobox-WsLvegw6.js.map → Combobox-BKj61IcR.js.map} +1 -1
  3. package/dist/Combobox-BOGcBq-6.cjs +3 -0
  4. package/dist/{Combobox-96zAPv6d.cjs.map → Combobox-BOGcBq-6.cjs.map} +1 -1
  5. package/dist/{Datepicker-D-Lgvthq.js → Datepicker-DOSIyo8a.js} +39 -39
  6. package/dist/{Datepicker-D-Lgvthq.js.map → Datepicker-DOSIyo8a.js.map} +1 -1
  7. package/dist/Datepicker-DfdVsVb9.cjs +2 -0
  8. package/dist/{Datepicker-DmKOuf5y.cjs.map → Datepicker-DfdVsVb9.cjs.map} +1 -1
  9. package/dist/{EmojiPicker-D46lLRMp.js → EmojiPicker-B_ZVTdOY.js} +2 -2
  10. package/dist/{EmojiPicker-D46lLRMp.js.map → EmojiPicker-B_ZVTdOY.js.map} +1 -1
  11. package/dist/EmojiPicker-DS8XmAHV.cjs +2 -0
  12. package/dist/{EmojiPicker-CXFd-iVj.cjs.map → EmojiPicker-DS8XmAHV.cjs.map} +1 -1
  13. package/dist/FilterPill-BmYe_SsY.cjs +2 -0
  14. package/dist/{FilterPill-DY9T19XB.cjs.map → FilterPill-BmYe_SsY.cjs.map} +1 -1
  15. package/dist/{FilterPill-IBlswKiK.js → FilterPill-C4TXD8Tl.js} +5 -5
  16. package/dist/{FilterPill-IBlswKiK.js.map → FilterPill-C4TXD8Tl.js.map} +1 -1
  17. package/dist/{ForceLinkify-DhmBEXhe.cjs → ForceLinkify-BMmlUc8Q.cjs} +1 -1
  18. package/dist/{ForceLinkify-DhmBEXhe.cjs.map → ForceLinkify-BMmlUc8Q.cjs.map} +1 -1
  19. package/dist/{ForceLinkify-53Zegx7z.js → ForceLinkify-Cw3Q1Nn7.js} +1 -1
  20. package/dist/{ForceLinkify-53Zegx7z.js.map → ForceLinkify-Cw3Q1Nn7.js.map} +1 -1
  21. package/dist/{MarkdownRenderer-Cnbn7gje.js → MarkdownRenderer-BR-fbldH.js} +1 -1
  22. package/dist/{MarkdownRenderer-Cnbn7gje.js.map → MarkdownRenderer-BR-fbldH.js.map} +1 -1
  23. package/dist/{MarkdownRenderer-a12waV7r.cjs → MarkdownRenderer-CH4L8Evn.cjs} +1 -1
  24. package/dist/{MarkdownRenderer-a12waV7r.cjs.map → MarkdownRenderer-CH4L8Evn.cjs.map} +1 -1
  25. package/dist/{Presence-CGgyodnC.js → Presence-BkPCvddH.js} +2 -2
  26. package/dist/{Presence-CGgyodnC.js.map → Presence-BkPCvddH.js.map} +1 -1
  27. package/dist/{Presence-DLM3JR-n.cjs → Presence-DG9Kvu5J.cjs} +2 -2
  28. package/dist/{Presence-DLM3JR-n.cjs.map → Presence-DG9Kvu5J.cjs.map} +1 -1
  29. package/dist/ProgressBar-BMycZBZE.cjs +2 -0
  30. package/dist/ProgressBar-BMycZBZE.cjs.map +1 -0
  31. package/dist/ProgressBar-Cj8xqPc0.js +77 -0
  32. package/dist/ProgressBar-Cj8xqPc0.js.map +1 -0
  33. package/dist/{Resizable-Ddsm-H14.js → Resizable-BkijqucD.js} +3 -3
  34. package/dist/{Resizable-Ddsm-H14.js.map → Resizable-BkijqucD.js.map} +1 -1
  35. package/dist/{Resizable-DdP6uPio.cjs → Resizable-DQoUk81S.cjs} +2 -2
  36. package/dist/{Resizable-DdP6uPio.cjs.map → Resizable-DQoUk81S.cjs.map} +1 -1
  37. package/dist/{ResizableHandle-_ldmhyEw.cjs → ResizableHandle-D2gZ6dg5.cjs} +2 -2
  38. package/dist/{ResizableHandle-_ldmhyEw.cjs.map → ResizableHandle-D2gZ6dg5.cjs.map} +1 -1
  39. package/dist/{ResizableHandle-DQduVxrG.js → ResizableHandle-MDdaNR_t.js} +3 -3
  40. package/dist/{ResizableHandle-DQduVxrG.js.map → ResizableHandle-MDdaNR_t.js.map} +1 -1
  41. package/dist/{ResizableUtils-BptSHmLg.cjs → ResizableUtils-CXU7o9pL.cjs} +1 -1
  42. package/dist/{ResizableUtils-BptSHmLg.cjs.map → ResizableUtils-CXU7o9pL.cjs.map} +1 -1
  43. package/dist/{ResizableUtils-BIRNCdKB.js → ResizableUtils-ChIk3Blc.js} +1 -1
  44. package/dist/{ResizableUtils-BIRNCdKB.js.map → ResizableUtils-ChIk3Blc.js.map} +1 -1
  45. package/dist/{RichTextEditor-DhNhx5AH.js → RichTextEditor-BIcaFJQp.js} +15 -15
  46. package/dist/{RichTextEditor-DhNhx5AH.js.map → RichTextEditor-BIcaFJQp.js.map} +1 -1
  47. package/dist/RichTextEditor-D6kCBnLJ.cjs +11 -0
  48. package/dist/{RichTextEditor-CjyvDYID.cjs.map → RichTextEditor-D6kCBnLJ.cjs.map} +1 -1
  49. package/dist/{Scroller-D7MjyXun.js → Scroller-D6LZtmkL.js} +3 -3
  50. package/dist/{Scroller-D7MjyXun.js.map → Scroller-D6LZtmkL.js.map} +1 -1
  51. package/dist/Scroller-eXc7l23J.cjs +2 -0
  52. package/dist/{Scroller-Bt8TUghI.cjs.map → Scroller-eXc7l23J.cjs.map} +1 -1
  53. package/dist/Slider-B7O2M5_S.cjs +2 -0
  54. package/dist/{Slider-CfvbLBv5.cjs.map → Slider-B7O2M5_S.cjs.map} +1 -1
  55. package/dist/{Slider-Xd5Aj9nS.js → Slider-oJROUIMS.js} +7 -7
  56. package/dist/{Slider-Xd5Aj9nS.js.map → Slider-oJROUIMS.js.map} +1 -1
  57. package/dist/Text-BDgOWPw7.cjs +2 -0
  58. package/dist/Text-BDgOWPw7.cjs.map +1 -0
  59. package/dist/Text-CfiPqjL0.js +404 -0
  60. package/dist/Text-CfiPqjL0.js.map +1 -0
  61. package/dist/{TextList-DUL3NwQp.cjs → TextList-D3HHK2DW.cjs} +1 -1
  62. package/dist/{TextList-DUL3NwQp.cjs.map → TextList-D3HHK2DW.cjs.map} +1 -1
  63. package/dist/{TextList-CkY7OAl2.js → TextList-DXEov7Ls.js} +1 -1
  64. package/dist/{TextList-CkY7OAl2.js.map → TextList-DXEov7Ls.js.map} +1 -1
  65. package/dist/TextListItem-C2Vc8Gnu.cjs +2 -0
  66. package/dist/{TextListItem-BI9M_J8Y.cjs.map → TextListItem-C2Vc8Gnu.cjs.map} +1 -1
  67. package/dist/{TextListItem-D96feMQf.js → TextListItem-CaFTtZ3G.js} +2 -2
  68. package/dist/{TextListItem-D96feMQf.js.map → TextListItem-CaFTtZ3G.js.map} +1 -1
  69. package/dist/{Toast-DmzQrYtG.js → Toast-AGiQccuG.js} +3 -3
  70. package/dist/{Toast-DmzQrYtG.js.map → Toast-AGiQccuG.js.map} +1 -1
  71. package/dist/Toast-DImJ0PkZ.cjs +2 -0
  72. package/dist/{Toast-BXvUrvd_.cjs.map → Toast-DImJ0PkZ.cjs.map} +1 -1
  73. package/dist/{UseResizableCalculations-BNcxJfef.cjs → UseResizableCalculations-D4xVxWje.cjs} +2 -2
  74. package/dist/{UseResizableCalculations-BNcxJfef.cjs.map → UseResizableCalculations-D4xVxWje.cjs.map} +1 -1
  75. package/dist/{UseResizableCalculations-k6TSRlpa.js → UseResizableCalculations-DTxD7NKO.js} +2 -2
  76. package/dist/{UseResizableCalculations-k6TSRlpa.js.map → UseResizableCalculations-DTxD7NKO.js.map} +1 -1
  77. package/dist/common/composables/use-accessible-name-warning.cjs +2 -0
  78. package/dist/common/composables/use-accessible-name-warning.cjs.map +1 -0
  79. package/dist/common/composables/use-accessible-name-warning.js +11 -0
  80. package/dist/common/composables/use-accessible-name-warning.js.map +1 -0
  81. package/dist/common/composables/use-indicator-animation.cjs +1 -1
  82. package/dist/common/composables/use-indicator-animation.cjs.map +1 -1
  83. package/dist/common/composables/use-indicator-animation.js +14 -14
  84. package/dist/common/composables/use-indicator-animation.js.map +1 -1
  85. package/dist/common/composables/useAccessibleNameWarning.d.ts +2 -0
  86. package/dist/common/composables/useAccessibleNameWarning.d.ts.map +1 -0
  87. package/dist/common/composables/useIndicatorAnimation.d.ts +2 -1
  88. package/dist/common/composables/useIndicatorAnimation.d.ts.map +1 -1
  89. package/dist/common/dates/index.cjs +1 -1
  90. package/dist/common/dates/index.cjs.map +1 -1
  91. package/dist/common/dates/index.js +1 -1
  92. package/dist/common/mixins/input-group.cjs +1 -1
  93. package/dist/common/mixins/input-group.cjs.map +1 -1
  94. package/dist/common/mixins/input-group.js +5 -5
  95. package/dist/common/mixins/input.cjs +1 -1
  96. package/dist/common/mixins/input.cjs.map +1 -1
  97. package/dist/common/mixins/input.js +1 -1
  98. package/dist/common/mixins/keyboard-list-navigation.cjs +1 -1
  99. package/dist/common/mixins/keyboard-list-navigation.cjs.map +1 -1
  100. package/dist/common/mixins/keyboard-list-navigation.js +1 -1
  101. package/dist/common/mixins/modal.cjs +1 -1
  102. package/dist/common/mixins/modal.cjs.map +1 -1
  103. package/dist/common/mixins/modal.js +1 -1
  104. package/dist/common/mixins/mode.cjs +1 -1
  105. package/dist/common/mixins/mode.js +1 -1
  106. package/dist/common/owned_classes.d.ts +4 -0
  107. package/dist/common/owned_classes.d.ts.map +1 -0
  108. package/dist/common/utils/index.cjs +1 -2
  109. package/dist/common/utils/index.d.ts +2 -2
  110. package/dist/common/utils/index.d.ts.map +1 -1
  111. package/dist/common/utils/index.js +2 -150
  112. package/dist/component-documentation.json +1 -1
  113. package/dist/components/Banner/Banner.vue.d.ts +53 -1
  114. package/dist/components/Banner/Banner.vue.d.ts.map +1 -1
  115. package/dist/components/Checkbox/Checkbox.vue.d.ts +53 -1
  116. package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
  117. package/dist/components/CheckboxGroup/CheckboxGroup.vue.d.ts +53 -1
  118. package/dist/components/ComboboxWithPopover/ComboboxWithPopover.vue.d.ts +1 -0
  119. package/dist/components/ComboboxWithPopover/ComboboxWithPopover.vue.d.ts.map +1 -1
  120. package/dist/components/Dropdown/Dropdown.vue.d.ts +1 -3
  121. package/dist/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
  122. package/dist/components/EmojiPicker/EmojiPicker.vue.d.ts +53 -1
  123. package/dist/components/EmojiPicker/Modules/EmojiSearch.vue.d.ts +53 -1
  124. package/dist/components/EmojiPicker/Modules/EmojiSearch.vue.d.ts.map +1 -1
  125. package/dist/components/FilterPill/FilterPill.vue.d.ts +161 -6
  126. package/dist/components/FilterPill/FilterPill.vue.d.ts.map +1 -1
  127. package/dist/components/Hovercard/Hovercard.vue.d.ts +4 -0
  128. package/dist/components/Hovercard/Hovercard.vue.d.ts.map +1 -1
  129. package/dist/components/Input/Input.vue.d.ts +53 -1
  130. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  131. package/dist/components/InputGroup/InputGroup.vue.d.ts +53 -1
  132. package/dist/components/InputGroup/InputGroup.vue.d.ts.map +1 -1
  133. package/dist/components/KeyboardShortcut/KeyboardShortcut.vue.d.ts +53 -1
  134. package/dist/components/Modal/Modal.vue.d.ts +53 -1
  135. package/dist/components/Modal/Modal.vue.d.ts.map +1 -1
  136. package/dist/components/Notice/Notice.vue.d.ts +53 -1
  137. package/dist/components/Notice/Notice.vue.d.ts.map +1 -1
  138. package/dist/components/Notice/NoticeContent.vue.d.ts +53 -1
  139. package/dist/components/Notice/NoticeContent.vue.d.ts.map +1 -1
  140. package/dist/components/Popover/Popover.vue.d.ts +1 -0
  141. package/dist/components/Popover/Popover.vue.d.ts.map +1 -1
  142. package/dist/components/ProgressBar/ProgressBar.vue.d.ts +66 -0
  143. package/dist/components/ProgressBar/ProgressBar.vue.d.ts.map +1 -0
  144. package/dist/components/ProgressBar/ProgressBarConstants.d.ts +18 -0
  145. package/dist/components/ProgressBar/ProgressBarConstants.d.ts.map +1 -0
  146. package/dist/components/ProgressBar/index.d.ts +3 -0
  147. package/dist/components/ProgressBar/index.d.ts.map +1 -0
  148. package/dist/components/ProgressCircle/ProgressCircle.vue.d.ts +41 -9
  149. package/dist/components/Radio/Radio.vue.d.ts +53 -1
  150. package/dist/components/Radio/Radio.vue.d.ts.map +1 -1
  151. package/dist/components/RadioGroup/RadioGroup.vue.d.ts +53 -1
  152. package/dist/components/RichTextEditor/Extensions/Mentions/MentionSuggestion.vue.d.ts +53 -1
  153. package/dist/components/RichTextEditor/Extensions/SlashCommand/SlashCommandSuggestion.vue.d.ts +53 -1
  154. package/dist/components/RichTextEditor/Extensions/Variable/VariableComponent.vue.d.ts +54 -1
  155. package/dist/components/RichTextEditor/Extensions/Variable/VariableComponent.vue.d.ts.map +1 -1
  156. package/dist/components/SegmentedControl/SegmentedControlItem.vue.d.ts +10 -0
  157. package/dist/components/SegmentedControl/SegmentedControlItem.vue.d.ts.map +1 -1
  158. package/dist/components/SelectMenu/SelectMenu.vue.d.ts +53 -1
  159. package/dist/components/SelectMenu/SelectMenu.vue.d.ts.map +1 -1
  160. package/dist/components/SplitButton/SplitButton.vue.d.ts +1 -3
  161. package/dist/components/SplitButton/SplitButton.vue.d.ts.map +1 -1
  162. package/dist/components/Tab/Tab.vue.d.ts +18 -0
  163. package/dist/components/Tab/Tab.vue.d.ts.map +1 -1
  164. package/dist/components/Tab/TabGroup.vue.d.ts +3 -1
  165. package/dist/components/Tab/TabGroup.vue.d.ts.map +1 -1
  166. package/dist/components/Text/Text.vue.d.ts +53 -1
  167. package/dist/components/Text/Text.vue.d.ts.map +1 -1
  168. package/dist/components/Text/TextConstants.d.ts +2 -0
  169. package/dist/components/Text/TextConstants.d.ts.map +1 -1
  170. package/dist/components/Text/index.d.ts +1 -1
  171. package/dist/components/Text/modules/SlideViewport.vue.d.ts +38 -0
  172. package/dist/components/Text/modules/SlideViewport.vue.d.ts.map +1 -0
  173. package/dist/components/Text/modules/slide.d.ts +19 -0
  174. package/dist/components/Text/modules/slide.d.ts.map +1 -0
  175. package/dist/components/Toast/Layouts/ToastLayoutAlternate.vue.d.ts +53 -1
  176. package/dist/components/Toast/Layouts/ToastLayoutAlternate.vue.d.ts.map +1 -1
  177. package/dist/components/Toast/Layouts/ToastLayoutDefault.vue.d.ts +53 -1
  178. package/dist/components/Toast/Layouts/ToastLayoutDefault.vue.d.ts.map +1 -1
  179. package/dist/components/Toast/Toast.vue.d.ts +212 -4
  180. package/dist/components/Toast/Toast.vue.d.ts.map +1 -1
  181. package/dist/components/Tooltip/Tooltip.vue.d.ts.map +1 -1
  182. package/dist/dialtone-vue.cjs +1 -1
  183. package/dist/dialtone-vue.js +62 -61
  184. package/dist/{floating-ui.dom-BUeA6pp4.js → floating-ui.dom-CuL5LTgX.js} +1 -1
  185. package/dist/{floating-ui.dom-BUeA6pp4.js.map → floating-ui.dom-CuL5LTgX.js.map} +1 -1
  186. package/dist/{floating-ui.dom-DF2uE3n8.cjs → floating-ui.dom-S7QIcAlj.cjs} +1 -1
  187. package/dist/{floating-ui.dom-DF2uE3n8.cjs.map → floating-ui.dom-S7QIcAlj.cjs.map} +1 -1
  188. package/dist/index.d.ts +1 -1
  189. package/dist/lib/avatar/avatar.cjs +1 -1
  190. package/dist/lib/avatar/avatar.cjs.map +1 -1
  191. package/dist/lib/avatar/avatar.js +7 -7
  192. package/dist/lib/badge/badge.cjs +1 -1
  193. package/dist/lib/badge/badge.cjs.map +1 -1
  194. package/dist/lib/badge/badge.js +2 -2
  195. package/dist/lib/banner/banner.cjs +1 -1
  196. package/dist/lib/banner/banner.cjs.map +1 -1
  197. package/dist/lib/banner/banner.js +2 -2
  198. package/dist/lib/breadcrumbs/breadcrumb-item.cjs +1 -1
  199. package/dist/lib/breadcrumbs/breadcrumb-item.cjs.map +1 -1
  200. package/dist/lib/breadcrumbs/breadcrumb-item.js +2 -2
  201. package/dist/lib/breadcrumbs/breadcrumbs.cjs +1 -1
  202. package/dist/lib/breadcrumbs/breadcrumbs.js +1 -1
  203. package/dist/lib/button/button.cjs +1 -1
  204. package/dist/lib/button/button.cjs.map +1 -1
  205. package/dist/lib/button/button.js +6 -6
  206. package/dist/lib/button/button.js.map +1 -1
  207. package/dist/lib/button-group/button-group.cjs +1 -1
  208. package/dist/lib/button-group/button-group.js +1 -1
  209. package/dist/lib/button-group/buttons-decorator.cjs +1 -1
  210. package/dist/lib/button-group/buttons-decorator.js +1 -1
  211. package/dist/lib/card/card.cjs +1 -1
  212. package/dist/lib/card/card.cjs.map +1 -1
  213. package/dist/lib/card/card.js +2 -2
  214. package/dist/lib/checkbox/checkbox.cjs +1 -1
  215. package/dist/lib/checkbox/checkbox.cjs.map +1 -1
  216. package/dist/lib/checkbox/checkbox.js +5 -5
  217. package/dist/lib/checkbox-group/checkboxes-decorator.cjs +1 -1
  218. package/dist/lib/checkbox-group/checkboxes-decorator.js +1 -1
  219. package/dist/lib/chip/chip.cjs +1 -1
  220. package/dist/lib/chip/chip.cjs.map +1 -1
  221. package/dist/lib/chip/chip.js +4 -4
  222. package/dist/lib/codeblock/codeblock.cjs +1 -1
  223. package/dist/lib/codeblock/codeblock.js +1 -1
  224. package/dist/lib/collapsible/collapsible-lazy-show.cjs +1 -1
  225. package/dist/lib/collapsible/collapsible-lazy-show.js +1 -1
  226. package/dist/lib/collapsible/collapsible.cjs +1 -1
  227. package/dist/lib/collapsible/collapsible.cjs.map +1 -1
  228. package/dist/lib/collapsible/collapsible.js +4 -4
  229. package/dist/lib/combobox/combobox-empty-list.cjs +1 -1
  230. package/dist/lib/combobox/combobox-empty-list.js +1 -1
  231. package/dist/lib/combobox/combobox-loading-list.cjs +1 -1
  232. package/dist/lib/combobox/combobox-loading-list.js +1 -1
  233. package/dist/lib/combobox/combobox.cjs +1 -1
  234. package/dist/lib/combobox/combobox.js +1 -1
  235. package/dist/lib/combobox/index.cjs +1 -1
  236. package/dist/lib/combobox/index.js +1 -1
  237. package/dist/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  238. package/dist/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  239. package/dist/lib/combobox-multi-select/combobox-multi-select.js +8 -8
  240. package/dist/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
  241. package/dist/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
  242. package/dist/lib/combobox-with-popover/combobox-with-popover.js +7 -7
  243. package/dist/lib/datepicker/datepicker.cjs +1 -1
  244. package/dist/lib/datepicker/datepicker.js +1 -1
  245. package/dist/lib/datepicker/index.cjs +1 -1
  246. package/dist/lib/datepicker/index.js +1 -1
  247. package/dist/lib/description-list/description-list.cjs +1 -1
  248. package/dist/lib/description-list/description-list.js +1 -1
  249. package/dist/lib/dropdown/dropdown-list.cjs +1 -1
  250. package/dist/lib/dropdown/dropdown-list.cjs.map +1 -1
  251. package/dist/lib/dropdown/dropdown-list.js +2 -2
  252. package/dist/lib/dropdown/dropdown-separator.cjs +1 -1
  253. package/dist/lib/dropdown/dropdown-separator.js +1 -1
  254. package/dist/lib/dropdown/dropdown.cjs +1 -1
  255. package/dist/lib/dropdown/dropdown.cjs.map +1 -1
  256. package/dist/lib/dropdown/dropdown.js +8 -18
  257. package/dist/lib/dropdown/dropdown.js.map +1 -1
  258. package/dist/lib/emoji/emoji.cjs +1 -1
  259. package/dist/lib/emoji/emoji.js +1 -1
  260. package/dist/lib/emoji-picker/emoji-picker.cjs +1 -1
  261. package/dist/lib/emoji-picker/emoji-picker.js +1 -1
  262. package/dist/lib/emoji-picker/index.cjs +1 -1
  263. package/dist/lib/emoji-picker/index.js +1 -1
  264. package/dist/lib/empty-state/empty-state.cjs +1 -1
  265. package/dist/lib/empty-state/empty-state.cjs.map +1 -1
  266. package/dist/lib/empty-state/empty-state.js +2 -2
  267. package/dist/lib/filter-pill/filter-pill-controlled.cjs +1 -1
  268. package/dist/lib/filter-pill/filter-pill-controlled.cjs.map +1 -1
  269. package/dist/lib/filter-pill/filter-pill-controlled.js +1 -1
  270. package/dist/lib/filter-pill/filter-pill.cjs +1 -1
  271. package/dist/lib/filter-pill/filter-pill.js +1 -1
  272. package/dist/lib/filter-pill/index.cjs +1 -1
  273. package/dist/lib/filter-pill/index.js +1 -1
  274. package/dist/lib/hovercard/hovercard.cjs +1 -1
  275. package/dist/lib/hovercard/hovercard.cjs.map +1 -1
  276. package/dist/lib/hovercard/hovercard.js +2 -2
  277. package/dist/lib/icon/icon.cjs +1 -1
  278. package/dist/lib/icon/icon.js +1 -1
  279. package/dist/lib/image-viewer/image-viewer.cjs +1 -1
  280. package/dist/lib/image-viewer/image-viewer.cjs.map +1 -1
  281. package/dist/lib/image-viewer/image-viewer.js +2 -2
  282. package/dist/lib/input/input.cjs +1 -1
  283. package/dist/lib/input/input.cjs.map +1 -1
  284. package/dist/lib/input/input.js +8 -8
  285. package/dist/lib/input-group/input-group.cjs +1 -1
  286. package/dist/lib/input-group/input-group.cjs.map +1 -1
  287. package/dist/lib/input-group/input-group.js +5 -5
  288. package/dist/lib/item-layout/item-layout.cjs +2 -2
  289. package/dist/lib/item-layout/item-layout.cjs.map +1 -1
  290. package/dist/lib/item-layout/item-layout.js +2 -2
  291. package/dist/lib/keyboard-shortcut/keyboard-shortcut.cjs +1 -1
  292. package/dist/lib/keyboard-shortcut/keyboard-shortcut.cjs.map +1 -1
  293. package/dist/lib/keyboard-shortcut/keyboard-shortcut.js +2 -2
  294. package/dist/lib/kitchen-sink/kitchen-sink-view.cjs +1 -1
  295. package/dist/lib/kitchen-sink/kitchen-sink-view.cjs.map +1 -1
  296. package/dist/lib/kitchen-sink/kitchen-sink-view.js +2 -2
  297. package/dist/lib/lazy-show/lazy-show.cjs +1 -1
  298. package/dist/lib/lazy-show/lazy-show.js +1 -1
  299. package/dist/lib/link/link.cjs +1 -1
  300. package/dist/lib/link/link.js +1 -1
  301. package/dist/lib/list-item/list-item.cjs +1 -1
  302. package/dist/lib/list-item/list-item.cjs.map +1 -1
  303. package/dist/lib/list-item/list-item.js +2 -2
  304. package/dist/lib/list-item-group/list-item-group.cjs +1 -1
  305. package/dist/lib/list-item-group/list-item-group.cjs.map +1 -1
  306. package/dist/lib/list-item-group/list-item-group.js +2 -2
  307. package/dist/lib/loader/loader.cjs +1 -1
  308. package/dist/lib/loader/loader.js +1 -1
  309. package/dist/lib/modal/modal.cjs +1 -1
  310. package/dist/lib/modal/modal.cjs.map +1 -1
  311. package/dist/lib/modal/modal.js +9 -9
  312. package/dist/lib/modal/modal.js.map +1 -1
  313. package/dist/lib/mode-directive/mode.cjs +1 -1
  314. package/dist/lib/mode-directive/mode.js +1 -1
  315. package/dist/lib/mode-island/mode-island.cjs +1 -1
  316. package/dist/lib/mode-island/mode-island.js +1 -1
  317. package/dist/lib/motion-text/motion-text.cjs +1 -1
  318. package/dist/lib/motion-text/motion-text.js +1 -1
  319. package/dist/lib/notice/notice-action.cjs +1 -1
  320. package/dist/lib/notice/notice-action.js +1 -1
  321. package/dist/lib/notice/notice-content.cjs +1 -1
  322. package/dist/lib/notice/notice-content.cjs.map +1 -1
  323. package/dist/lib/notice/notice-content.js +3 -3
  324. package/dist/lib/notice/notice-icon.cjs +1 -1
  325. package/dist/lib/notice/notice-icon.cjs.map +1 -1
  326. package/dist/lib/notice/notice-icon.js +2 -2
  327. package/dist/lib/notice/notice.cjs +1 -1
  328. package/dist/lib/notice/notice.js +1 -1
  329. package/dist/lib/pagination/pagination.cjs +1 -1
  330. package/dist/lib/pagination/pagination.js +1 -1
  331. package/dist/lib/popover/popover-header-footer.cjs +1 -1
  332. package/dist/lib/popover/popover-header-footer.cjs.map +1 -1
  333. package/dist/lib/popover/popover-header-footer.js +4 -4
  334. package/dist/lib/popover/popover.cjs +1 -1
  335. package/dist/lib/popover/popover.cjs.map +1 -1
  336. package/dist/lib/popover/popover.js +101 -83
  337. package/dist/lib/popover/popover.js.map +1 -1
  338. package/dist/lib/presence/index.cjs +1 -1
  339. package/dist/lib/presence/index.js +1 -1
  340. package/dist/lib/presence/presence.cjs +1 -1
  341. package/dist/lib/presence/presence.js +1 -1
  342. package/dist/lib/progress-bar/index.cjs +1 -0
  343. package/dist/lib/progress-bar/index.js +2 -0
  344. package/dist/lib/progress-bar/progress-bar.cjs +1 -0
  345. package/dist/lib/progress-bar/progress-bar.js +2 -0
  346. package/dist/lib/progress-circle/progress-circle.cjs +1 -1
  347. package/dist/lib/progress-circle/progress-circle.cjs.map +1 -1
  348. package/dist/lib/progress-circle/progress-circle.js +81 -42
  349. package/dist/lib/progress-circle/progress-circle.js.map +1 -1
  350. package/dist/lib/radio/radio.cjs +1 -1
  351. package/dist/lib/radio/radio.cjs.map +1 -1
  352. package/dist/lib/radio/radio.js +7 -7
  353. package/dist/lib/radio-group/radios-decorator.cjs +1 -1
  354. package/dist/lib/radio-group/radios-decorator.js +1 -1
  355. package/dist/lib/resizable/index.cjs +1 -1
  356. package/dist/lib/resizable/index.js +3 -3
  357. package/dist/lib/resizable/resizable-handle.cjs +1 -1
  358. package/dist/lib/resizable/resizable-handle.js +1 -1
  359. package/dist/lib/resizable/resizable-panel.cjs +1 -1
  360. package/dist/lib/resizable/resizable-panel.js +1 -1
  361. package/dist/lib/resizable/resizable.cjs +1 -1
  362. package/dist/lib/resizable/resizable.js +1 -1
  363. package/dist/lib/rich-text-editor/force-linkify.cjs +1 -1
  364. package/dist/lib/rich-text-editor/force-linkify.js +1 -1
  365. package/dist/lib/rich-text-editor/index.cjs +1 -1
  366. package/dist/lib/rich-text-editor/index.js +1 -1
  367. package/dist/lib/rich-text-editor/markdown-renderer.cjs +1 -1
  368. package/dist/lib/rich-text-editor/markdown-renderer.js +1 -1
  369. package/dist/lib/rich-text-editor/rich-text-editor.cjs +1 -1
  370. package/dist/lib/rich-text-editor/rich-text-editor.js +1 -1
  371. package/dist/lib/root-layout/root-layout.cjs +1 -1
  372. package/dist/lib/root-layout/root-layout.js +1 -1
  373. package/dist/lib/scroller/index.cjs +1 -1
  374. package/dist/lib/scroller/index.js +1 -1
  375. package/dist/lib/scroller/scroller.cjs +1 -1
  376. package/dist/lib/scroller/scroller.js +1 -1
  377. package/dist/lib/segmented-control/segmented-control-item.cjs +1 -1
  378. package/dist/lib/segmented-control/segmented-control-item.cjs.map +1 -1
  379. package/dist/lib/segmented-control/segmented-control-item.js +34 -4
  380. package/dist/lib/segmented-control/segmented-control-item.js.map +1 -1
  381. package/dist/lib/segmented-control/segmented-control.cjs +1 -1
  382. package/dist/lib/segmented-control/segmented-control.cjs.map +1 -1
  383. package/dist/lib/segmented-control/segmented-control.js +1 -1
  384. package/dist/lib/select-menu/select-menu.cjs +1 -1
  385. package/dist/lib/select-menu/select-menu.cjs.map +1 -1
  386. package/dist/lib/select-menu/select-menu.js +8 -8
  387. package/dist/lib/skeleton/skeleton-list-item.cjs +1 -1
  388. package/dist/lib/skeleton/skeleton-list-item.js +1 -1
  389. package/dist/lib/skeleton/skeleton-paragraph.cjs +1 -1
  390. package/dist/lib/skeleton/skeleton-paragraph.js +1 -1
  391. package/dist/lib/skeleton/skeleton-shape.cjs +1 -1
  392. package/dist/lib/skeleton/skeleton-shape.js +1 -1
  393. package/dist/lib/skeleton/skeleton-text.cjs +1 -1
  394. package/dist/lib/skeleton/skeleton-text.js +1 -1
  395. package/dist/lib/skeleton/skeleton.cjs +1 -1
  396. package/dist/lib/skeleton/skeleton.js +1 -1
  397. package/dist/lib/slider/index.cjs +1 -1
  398. package/dist/lib/slider/index.js +1 -1
  399. package/dist/lib/slider/slider.cjs +1 -1
  400. package/dist/lib/slider/slider.js +1 -1
  401. package/dist/lib/split-button/split-button-end.cjs +1 -1
  402. package/dist/lib/split-button/split-button-end.cjs.map +1 -1
  403. package/dist/lib/split-button/split-button-end.js +2 -2
  404. package/dist/lib/split-button/split-button-start.cjs +1 -1
  405. package/dist/lib/split-button/split-button-start.js +1 -1
  406. package/dist/lib/split-button/split-button.cjs +1 -1
  407. package/dist/lib/split-button/split-button.cjs.map +1 -1
  408. package/dist/lib/split-button/split-button.js +5 -5
  409. package/dist/lib/stack/stack.cjs +1 -1
  410. package/dist/lib/stack/stack.js +1 -1
  411. package/dist/lib/tab/tab-group.cjs +1 -1
  412. package/dist/lib/tab/tab-group.cjs.map +1 -1
  413. package/dist/lib/tab/tab-group.js +12 -4
  414. package/dist/lib/tab/tab-group.js.map +1 -1
  415. package/dist/lib/tab/tab-panel.cjs +1 -1
  416. package/dist/lib/tab/tab-panel.cjs.map +1 -1
  417. package/dist/lib/tab/tab-panel.js +2 -2
  418. package/dist/lib/tab/tab.cjs +1 -1
  419. package/dist/lib/tab/tab.cjs.map +1 -1
  420. package/dist/lib/tab/tab.js +36 -6
  421. package/dist/lib/tab/tab.js.map +1 -1
  422. package/dist/lib/text/index.cjs +1 -1
  423. package/dist/lib/text/index.js +3 -3
  424. package/dist/lib/text/text-constants.cjs +1 -1
  425. package/dist/lib/text/text-constants.cjs.map +1 -1
  426. package/dist/lib/text/text-constants.js +5 -4
  427. package/dist/lib/text/text-constants.js.map +1 -1
  428. package/dist/lib/text/text.cjs +1 -2
  429. package/dist/lib/text/text.js +2 -184
  430. package/dist/lib/text-list/index.cjs +1 -1
  431. package/dist/lib/text-list/index.js +2 -2
  432. package/dist/lib/text-list/text-list-item.cjs +1 -1
  433. package/dist/lib/text-list/text-list-item.js +1 -1
  434. package/dist/lib/text-list/text-list.cjs +1 -1
  435. package/dist/lib/text-list/text-list.js +1 -1
  436. package/dist/lib/toast/index.cjs +1 -1
  437. package/dist/lib/toast/index.js +1 -1
  438. package/dist/lib/toast/toast.cjs +1 -1
  439. package/dist/lib/toast/toast.js +1 -1
  440. package/dist/lib/toggle/toggle.cjs +1 -1
  441. package/dist/lib/toggle/toggle.cjs.map +1 -1
  442. package/dist/lib/toggle/toggle.js +4 -4
  443. package/dist/lib/tooltip/tooltip.cjs +1 -1
  444. package/dist/lib/tooltip/tooltip.cjs.map +1 -1
  445. package/dist/lib/tooltip/tooltip.js +6 -6
  446. package/dist/lib/tooltip/tooltip.js.map +1 -1
  447. package/dist/lib/tooltip-directive/tooltip.cjs +1 -1
  448. package/dist/lib/tooltip-directive/tooltip.cjs.map +1 -1
  449. package/dist/lib/tooltip-directive/tooltip.js +2 -2
  450. package/dist/lib/validation-messages/validation-messages.cjs +1 -1
  451. package/dist/lib/validation-messages/validation-messages.cjs.map +1 -1
  452. package/dist/lib/validation-messages/validation-messages.js +4 -4
  453. package/dist/{mode_constants-tb7TL85q.js → mode_constants-B8_1b5T8.js} +1 -1
  454. package/dist/{mode_constants-tb7TL85q.js.map → mode_constants-B8_1b5T8.js.map} +1 -1
  455. package/dist/{mode_constants-CzYJW9ua.cjs → mode_constants-DM0SVbFM.cjs} +1 -1
  456. package/dist/{mode_constants-CzYJW9ua.cjs.map → mode_constants-DM0SVbFM.cjs.map} +1 -1
  457. package/dist/shared/sr_only_close_button.cjs +1 -1
  458. package/dist/shared/sr_only_close_button.js +1 -1
  459. package/dist/utils-BL_SrwnF.js +172 -0
  460. package/dist/utils-BL_SrwnF.js.map +1 -0
  461. package/dist/utils-GofHWJKi.cjs +2 -0
  462. package/dist/{common/utils/index.js.map → utils-GofHWJKi.cjs.map} +1 -1
  463. package/package.json +11 -6
  464. package/dist/Combobox-96zAPv6d.cjs +0 -3
  465. package/dist/Datepicker-DmKOuf5y.cjs +0 -2
  466. package/dist/EmojiPicker-CXFd-iVj.cjs +0 -2
  467. package/dist/FilterPill-DY9T19XB.cjs +0 -2
  468. package/dist/RichTextEditor-CjyvDYID.cjs +0 -11
  469. package/dist/Scroller-Bt8TUghI.cjs +0 -2
  470. package/dist/Slider-CfvbLBv5.cjs +0 -2
  471. package/dist/TextListItem-BI9M_J8Y.cjs +0 -2
  472. package/dist/Toast-BXvUrvd_.cjs +0 -2
  473. package/dist/common/utils/index.cjs.map +0 -1
  474. package/dist/lib/text/text.cjs.map +0 -1
  475. package/dist/lib/text/text.js.map +0 -1
  476. /package/dist/{_plugin-vue_export-helper-BTgDAbhb.js → _plugin-vue_export-helper-BecorN_g.js} +0 -0
  477. /package/dist/{_plugin-vue_export-helper-D8jCH6HB.cjs → _plugin-vue_export-helper-CX7YVcP6.cjs} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { ordinalSizeValidator as e } from "../../common/validators/index.js";
2
- import { getUniqueString as t, hasSlotContent as n, removeClassStyleAttrs as r } from "../../common/utils/index.js";
3
- import { t as i } from "../../_plugin-vue_export-helper-BTgDAbhb.js";
2
+ import { D as t, _ as n, m as r } from "../../utils-BL_SrwnF.js";
3
+ import { t as i } from "../../_plugin-vue_export-helper-BecorN_g.js";
4
4
  import { TOGGLE_CHECKED_VALUES as a, TOGGLE_SIZE_MODIFIERS as o } from "./toggle-constants.js";
5
5
  import { createCommentVNode as s, createElementBlock as c, createElementVNode as l, mergeProps as u, normalizeClass as d, normalizeStyle as f, openBlock as p, renderSlot as m } from "vue";
6
6
  //#region components/Toggle/Toggle.vue
@@ -11,7 +11,7 @@ var h = {
11
11
  id: {
12
12
  type: String,
13
13
  default() {
14
- return t();
14
+ return r();
15
15
  }
16
16
  },
17
17
  disabled: {
@@ -63,7 +63,7 @@ var h = {
63
63
  computed: {
64
64
  inputListeners() {
65
65
  return {
66
- ...r(this.$attrs),
66
+ ...t(this.$attrs),
67
67
  onClick: () => this.toggleCheckedValue()
68
68
  };
69
69
  },
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/constants/index.cjs`),t=require(`../../common/utils/index.cjs`),n=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),r=require(`../../common/mixins/mode.cjs`),i=require(`../popover/tippy-utils.cjs`),a=require(`./tooltip-constants.cjs`),o=require(`../popover/popover-constants.cjs`);let s=require(`vue`);var c=`<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>`,l={name:`DtTooltip`,mixins:[r.default],props:{id:{type:String,default(){return t.getUniqueString()}},fallbackPlacements:{type:Array,default:()=>[`auto`]},inverted:{type:Boolean,default:!1},offset:{type:Array,default:()=>[0,12]},showArrow:{type:Boolean,default:!0},placement:{type:String,default:`top`,validator(e){return a.TOOLTIP_DIRECTIONS.includes(e)}},sticky:{type:[Boolean,String],default:!0,validator:e=>a.TOOLTIP_STICKY_VALUES.includes(e)},appendTo:{type:[e.HTML_ELEMENT_TYPE,String],default:`body`,validator:e=>o.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},contentClass:{type:[String,Object,Array],default:``},anchorClass:{type:[String,Object,Array],default:``},message:{type:String,default:``},enabled:{type:Boolean,default:!0},open:{type:[Boolean,null],default:null},transition:{type:Boolean,default:!0},delay:{type:Boolean,default:!0},theme:{type:String,default:null},externalAnchor:{type:String,default:null},externalAnchorElement:{type:e.HTML_ELEMENT_TYPE,default:null}},emits:[`shown`,`update:open`],data(){return{TOOLTIP_KIND_MODIFIERS:a.TOOLTIP_KIND_MODIFIERS,hasSlotContent:t.hasSlotContent,tip:null,inTimer:null,internalShow:!1,currentPlacement:this.placement}},computed:{tippyArrow(){return this.showArrow?c:!1},tippyProps(){return{arrow:this.tippyArrow,offset:this.offset,delay:this.delay?300:!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.externalAnchorElement?this.externalAnchorElement:this.externalAnchor?document.body.querySelector(this.externalAnchor):i.getAnchor(this.$refs.anchor)}},watch:{tippyProps:`setProps`,offset:{deep:!0,handler(e,t){e===t&&this.setProps()}},fallbackPlacements:{deep:!0,handler(e,t){e===t&&this.setProps()}},open:{handler:function(e){e!==null&&this.enabled&&(this.internalShow=e)},immediate:!0},internalShow(e){!this.tip||!this.anchor||(e?(this.setProps(),this.tip.show()):this.tip.hide())},sticky(e){this.tip.setProps({sticky:e})}},async mounted(){!this.enabled&&this.open!=null&&(console.warn(`Tooltip: You cannot use both the enabled and open props at the same time.`),console.warn(`The open prop will be ignored.`)),this.tip=i.createTippy(this.anchor,this.initOptions()),(this.externalAnchor||this.externalAnchorElement)&&(await t.flushPromises(),this.addExternalAnchorEventListeners()),t.warnIfUnmounted(t.returnFirstEl(this.$el),this.$options.name)},beforeUnmount(){(this.externalAnchor||this.externalAnchorElement)&&this.removeExternalAnchorEventListeners(),this.anchor?._tippy&&this.tip?.destroy()},methods:{getModeReferenceEl(){return this.anchor},calculateAnchorZindex(){return t.returnFirstEl(this.$el).getRootNode().querySelector(`.d-modal[aria-hidden="false"], .d-modal--transparent[aria-hidden="false"], .d-modal[open], .d-modal--transparent[open]`)||t.returnFirstEl(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)},300):this.triggerShow(e))},triggerShow(e){e.type===`focusin`?this.open===null&&this.hasVisibleFocus()&&(this.internalShow=!0):this.open===null&&(this.internalShow=!0)},onLeaveAnchor(e){e.type===`keydown`&&e.code!==`Escape`||(clearTimeout(this.inTimer),this.inTimer=null,this.triggerHide())},triggerHide(){this.open===null&&(this.internalShow=!1)},onChangePlacement(e){this.currentPlacement=e},onHide(){this.tip?.unmount(),this.$emit(`shown`,!1),this.open!==null&&this.$emit(`update:open`,!1)},onShow(e,t){if(!this.tooltipHasContent(e))return!1;this.transition&&t===`onShow`||(this.$emit(`shown`,!0),this.open!==null&&this.$emit(`update:open`,!0))},resolveAppendTo(){return this.appendTo===`body`?this.anchor?.closest(`dialog`)??this.anchor?.getRootNode()?.querySelector(`body`):this.appendTo},setProps(){!this.tip||!this.tip.setProps||!this.anchor||this.tip&&this.tip.setProps&&this.tip.setProps({...this.tippyProps,appendTo:this.resolveAppendTo(),zIndex:this.calculateAnchorZindex()})},onMount(){this.setProps()},tooltipHasContent(e){return e.props.content.textContent.trim().length!==0},initOptions(){return{content:this.$refs.content,arrow:this.tippyArrow,duration:180,interactive:!1,trigger:`manual`,hideOnClick:!1,touch:!1,onMount:this.onMount,showOnCreate:this.internalShow,appendTo:this.resolveAppendTo(),popperOptions:i.getPopperOptions({hasHideModifierEnabled:!0})}},addExternalAnchorEventListeners(){[`focusin`,`mouseenter`].forEach(e=>{this.anchor?.addEventListener(e,e=>this.onEnterAnchor(e))}),[`focusout`,`mouseleave`,`keydown`].forEach(e=>{this.anchor?.addEventListener(e,e=>this.onLeaveAnchor(e))})},removeExternalAnchorEventListeners(){[`focusin`,`mouseenter`].forEach(e=>{this.anchor?.removeEventListener(e,e=>this.onEnterAnchor(e))}),[`focusout`,`mouseleave`,`keydown`].forEach(e=>{this.anchor?.removeEventListener(e,e=>this.onLeaveAnchor(e))})}}},u={"data-qa":`dt-tooltip-container`},d=[`id`];function f(e,t,n,r,i,a){return(0,s.openBlock)(),(0,s.createElementBlock)(`div`,u,[!n.externalAnchor&&!n.externalAnchorElement?((0,s.openBlock)(),(0,s.createElementBlock)(`span`,{key:0,ref:`anchor`,class:(0,s.normalizeClass)(n.anchorClass),"data-qa":`dt-tooltip-anchor`,onFocusin:t[0]||(t[0]=(...e)=>a.onEnterAnchor&&a.onEnterAnchor(...e)),onFocusout:t[1]||(t[1]=(...e)=>a.onLeaveAnchor&&a.onLeaveAnchor(...e)),onMouseenter:t[2]||(t[2]=(...e)=>a.onEnterAnchor&&a.onEnterAnchor(...e)),onMouseleave:t[3]||(t[3]=(...e)=>a.onLeaveAnchor&&a.onLeaveAnchor(...e)),onKeydown:t[4]||(t[4]=(0,s.withKeys)((...e)=>a.onLeaveAnchor&&a.onLeaveAnchor(...e),[`esc`]))},[(0,s.renderSlot)(e.$slots,`anchor`)],34)):(0,s.createCommentVNode)(``,!0),(0,s.createElementVNode)(`div`,(0,s.mergeProps)({id:n.id,ref:`content`,"data-qa":`dt-tooltip`,class:[`d-tooltip`,{[i.TOOLTIP_KIND_MODIFIERS.inverted]:n.inverted},n.contentClass]},e.modeAttrs),[(0,s.renderSlot)(e.$slots,`default`,{},()=>[(0,s.createTextVNode)((0,s.toDisplayString)(n.message),1)])],16,d)])}var p=n.t(l,[[`render`,f]]);exports.default=p;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/constants/index.cjs`),t=require(`../../utils-GofHWJKi.cjs`),n=require(`../../_plugin-vue_export-helper-CX7YVcP6.cjs`),r=require(`../../common/mixins/mode.cjs`),i=require(`../popover/tippy-utils.cjs`),a=require(`./tooltip-constants.cjs`),o=require(`../popover/popover-constants.cjs`);let s=require(`vue`);var c=`<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>`,l={name:`DtTooltip`,mixins:[r.default],props:{id:{type:String,default(){return t.m()}},fallbackPlacements:{type:Array,default:()=>[`auto`]},inverted:{type:Boolean,default:!1},offset:{type:Array,default:()=>[0,12]},showArrow:{type:Boolean,default:!0},placement:{type:String,default:`top`,validator(e){return a.TOOLTIP_DIRECTIONS.includes(e)}},sticky:{type:[Boolean,String],default:!0,validator:e=>a.TOOLTIP_STICKY_VALUES.includes(e)},appendTo:{type:[e.HTML_ELEMENT_TYPE,String],default:`body`,validator:e=>o.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},contentClass:{type:[String,Object,Array],default:``},anchorClass:{type:[String,Object,Array],default:``},message:{type:String,default:``},enabled:{type:Boolean,default:!0},open:{type:[Boolean,null],default:null},transition:{type:Boolean,default:!0},delay:{type:Boolean,default:!0},theme:{type:String,default:null},externalAnchor:{type:String,default:null},externalAnchorElement:{type:e.HTML_ELEMENT_TYPE,default:null}},emits:[`shown`,`update:open`],data(){return{TOOLTIP_KIND_MODIFIERS:a.TOOLTIP_KIND_MODIFIERS,hasSlotContent:t._,tip:null,inTimer:null,internalShow:!1,currentPlacement:this.placement}},computed:{tippyArrow(){return this.showArrow?c:!1},tippyProps(){return{arrow:this.tippyArrow,offset:this.offset,delay:this.delay?300:!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.externalAnchorElement?this.externalAnchorElement:this.externalAnchor?document.body.querySelector(this.externalAnchor):i.getAnchor(this.$refs.anchor)}},watch:{tippyProps:`setProps`,offset:{deep:!0,handler(e,t){e===t&&this.setProps()}},fallbackPlacements:{deep:!0,handler(e,t){e===t&&this.setProps()}},open:{handler:function(e){e!==null&&this.enabled&&(this.internalShow=e)},immediate:!0},internalShow(e){!this.tip||!this.anchor||(e?(this.setProps(),this.tip.show()):this.tip.hide())},sticky(e){this.tip.setProps({sticky:e})}},async mounted(){!this.enabled&&this.open!=null&&(console.warn(`Tooltip: You cannot use both the enabled and open props at the same time.`),console.warn(`The open prop will be ignored.`)),this.tip=i.createTippy(this.anchor,this.initOptions()),(this.externalAnchor||this.externalAnchorElement)&&(await t.l(),this.addExternalAnchorEventListeners()),t.M(t.O(this.$el),this.$options.name)},beforeUnmount(){(this.externalAnchor||this.externalAnchorElement)&&this.removeExternalAnchorEventListeners(),this.anchor?._tippy&&this.tip?.destroy()},methods:{getModeReferenceEl(){return this.anchor},calculateAnchorZindex(){return t.O(this.$el).getRootNode().querySelector(`.d-modal[aria-hidden="false"], .d-modal--transparent[aria-hidden="false"], .d-modal[open], .d-modal--transparent[open]`)||t.O(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)},300):this.triggerShow(e))},triggerShow(e){e.type===`focusin`?this.open===null&&this.hasVisibleFocus()&&(this.internalShow=!0):this.open===null&&(this.internalShow=!0)},onLeaveAnchor(e){e.type===`keydown`&&e.code!==`Escape`||(clearTimeout(this.inTimer),this.inTimer=null,this.triggerHide())},triggerHide(){this.open===null&&(this.internalShow=!1)},onChangePlacement(e){this.currentPlacement=e},onHide(){this.tip?.unmount(),this.$emit(`shown`,!1),this.open!==null&&this.$emit(`update:open`,!1)},onShow(e,t){if(!this.tooltipHasContent(e))return!1;this.transition&&t===`onShow`||(this.$emit(`shown`,!0),this.open!==null&&this.$emit(`update:open`,!0))},resolveAppendTo(){return this.appendTo===`body`?this.anchor?.closest(`dialog`)??this.anchor?.getRootNode()?.querySelector?.(`body`)??document.body:this.appendTo},setProps(){!this.tip||!this.tip.setProps||!this.anchor||this.tip&&this.tip.setProps&&this.tip.setProps({...this.tippyProps,appendTo:this.resolveAppendTo(),zIndex:this.calculateAnchorZindex()})},onMount(){this.setProps()},tooltipHasContent(e){return e.props.content.textContent.trim().length!==0},initOptions(){return{content:this.$refs.content,arrow:this.tippyArrow,duration:180,interactive:!1,trigger:`manual`,hideOnClick:!1,touch:!1,onMount:this.onMount,showOnCreate:this.internalShow,appendTo:this.resolveAppendTo(),popperOptions:i.getPopperOptions({hasHideModifierEnabled:!0})}},addExternalAnchorEventListeners(){[`focusin`,`mouseenter`].forEach(e=>{this.anchor?.addEventListener(e,e=>this.onEnterAnchor(e))}),[`focusout`,`mouseleave`,`keydown`].forEach(e=>{this.anchor?.addEventListener(e,e=>this.onLeaveAnchor(e))})},removeExternalAnchorEventListeners(){[`focusin`,`mouseenter`].forEach(e=>{this.anchor?.removeEventListener(e,e=>this.onEnterAnchor(e))}),[`focusout`,`mouseleave`,`keydown`].forEach(e=>{this.anchor?.removeEventListener(e,e=>this.onLeaveAnchor(e))})}}},u={"data-qa":`dt-tooltip-container`},d=[`id`];function f(e,t,n,r,i,a){return(0,s.openBlock)(),(0,s.createElementBlock)(`div`,u,[!n.externalAnchor&&!n.externalAnchorElement?((0,s.openBlock)(),(0,s.createElementBlock)(`span`,{key:0,ref:`anchor`,class:(0,s.normalizeClass)(n.anchorClass),"data-qa":`dt-tooltip-anchor`,onFocusin:t[0]||(t[0]=(...e)=>a.onEnterAnchor&&a.onEnterAnchor(...e)),onFocusout:t[1]||(t[1]=(...e)=>a.onLeaveAnchor&&a.onLeaveAnchor(...e)),onMouseenter:t[2]||(t[2]=(...e)=>a.onEnterAnchor&&a.onEnterAnchor(...e)),onMouseleave:t[3]||(t[3]=(...e)=>a.onLeaveAnchor&&a.onLeaveAnchor(...e)),onKeydown:t[4]||(t[4]=(0,s.withKeys)((...e)=>a.onLeaveAnchor&&a.onLeaveAnchor(...e),[`esc`]))},[(0,s.renderSlot)(e.$slots,`anchor`)],34)):(0,s.createCommentVNode)(``,!0),(0,s.createElementVNode)(`div`,(0,s.mergeProps)({id:n.id,ref:`content`,"data-qa":`dt-tooltip`,class:[`d-tooltip`,{[i.TOOLTIP_KIND_MODIFIERS.inverted]:n.inverted},n.contentClass]},e.modeAttrs),[(0,s.renderSlot)(e.$slots,`default`,{},()=>[(0,s.createTextVNode)((0,s.toDisplayString)(n.message),1)])],16,d)])}var p=n.t(l,[[`render`,f]]);exports.default=p;
2
2
  //# sourceMappingURL=tooltip.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.cjs","names":[],"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 && !externalAnchorElement\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-bind=\"modeAttrs\"\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 './TooltipConstants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../Popover/PopoverConstants';\nimport { flushPromises, getUniqueString, hasSlotContent, warnIfUnmounted, returnFirstEl } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/Popover/TippyUtils';\nimport ModeMixin from '@/common/mixins/mode';\n\nconst TOOLTIP_ARROW_SVG = '<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\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 mixins: [ModeMixin],\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 * @deprecated Use contentMode=\"invert\"\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 * Whether to show the arrow between the tooltip and its anchor.\n * @values true, false\n */\n showArrow: {\n type: Boolean,\n default: true,\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 */\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' appends to the nearest ancestor <dialog> element when inside one\n * (keeping the tooltip in the browser's top layer), or to the nearest body otherwise.\n * To always append to body regardless of dialog context, pass document.body as an HTMLElement.\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', 'root', HTMLElement,\n */\n appendTo: {\n type: [HTML_ELEMENT_TYPE, 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 * Additional class name for the anchor wrapper 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 anchorClass: {\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 open prop. open 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 * @values null, true, false\n */\n open: {\n type: [Boolean, null],\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 * @deprecated Use externalAnchorElement instead for Shadow DOM compatibility.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n\n /**\n * External anchor element reference. Use this instead of externalAnchor when\n * the anchor may be inside a Shadow DOM, as querySelector cannot pierce shadow boundaries.\n */\n externalAnchorElement: {\n type: HTML_ELEMENT_TYPE,\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 open value\n *\n * @event update:open\n */\n 'update:open',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n hasSlotContent,\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 tippyArrow () {\n return this.showArrow ? TOOLTIP_ARROW_SVG : false;\n },\n\n tippyProps () {\n return {\n arrow: this.tippyArrow,\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 if (this.externalAnchorElement) return this.externalAnchorElement;\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: 'setProps',\n\n // tippyProps only tracks the offset/fallbackPlacements array references, so in-place\n // mutations (e.g. offset[1] = 8) need their own deep watchers to trigger setProps.\n // Reference replacements are already handled by the tippyProps watcher above; skip\n // those here (newValue === oldValue only when the array was mutated in place) to\n // avoid calling setProps twice for the same change.\n offset: {\n deep: true,\n handler (newValue, oldValue) {\n if (newValue === oldValue) this.setProps();\n },\n },\n\n fallbackPlacements: {\n deep: true,\n handler (newValue, oldValue) {\n if (newValue === oldValue) this.setProps();\n },\n },\n\n open: {\n handler: function (open) {\n if (open !== null && this.enabled) {\n this.internalShow = open;\n }\n },\n\n immediate: true,\n },\n\n internalShow (value) {\n if (!this.tip || !this.anchor) return;\n\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.open != null) {\n console.warn('Tooltip: You cannot use both the enabled and open props at the same time.');\n console.warn('The open prop will be ignored.');\n }\n\n this.tip = createTippy(this.anchor, this.initOptions());\n if (this.externalAnchor || this.externalAnchorElement) {\n await flushPromises();\n this.addExternalAnchorEventListeners();\n }\n warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n },\n\n beforeUnmount () {\n (this.externalAnchor || this.externalAnchorElement) && this.removeExternalAnchorEventListeners();\n\n if (this.anchor?._tippy) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n getModeReferenceEl () {\n return this.anchor;\n },\n\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (returnFirstEl(this.$el).getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"], .d-modal[open], .d-modal--transparent[open]') ||\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 returnFirstEl(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.open === null && this.hasVisibleFocus()) {\n this.internalShow = true;\n }\n } else {\n if (this.open === 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.open === 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.open !== null) {\n this.$emit('update:open', 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.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n resolveAppendTo () {\n // When inside a native <dialog>, append there to stay in the browser's top layer.\n if (this.appendTo === 'body') {\n return this.anchor?.closest('dialog') ?? this.anchor?.getRootNode()?.querySelector('body');\n }\n return this.appendTo;\n },\n\n setProps () {\n if (!this.tip || !this.tip.setProps || !this.anchor) return;\n\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.resolveAppendTo(),\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. Reactive options belong in tippyProps, but arrow is duplicated because Tippy\n // renders its default arrow during synchronous showOnCreate mounting. setProps only runs later from\n // onMount, so omitting the initial value would leave the default arrow in the DOM until then.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: this.tippyArrow,\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 appendTo: this.resolveAppendTo(),\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"],"mappings":"qdA+DA,IAAM,EAAoB,uGAQrB,EAAU,CACb,KAAM,YAEN,OAAQ,CAAC,EAAA,QAAU,CAEnB,MAAO,CAIL,GAAI,CACF,KAAM,OACN,SAAW,CAAE,OAAO,EAAA,iBAAiB,EACtC,CAeD,mBAAoB,CAClB,KAAM,MACN,YAAe,CAAC,OAAO,CACxB,CAMD,SAAU,CACR,KAAM,QACN,QAAS,GACV,CAaD,OAAQ,CACN,KAAM,MACN,YAAe,CAAC,EAAG,GAAG,CACvB,CAMD,UAAW,CACT,KAAM,QACN,QAAS,GACV,CAgBD,UAAW,CACT,KAAM,OACN,QAAS,MACT,UAAW,EAAW,CACpB,OAAO,EAAA,mBAAmB,SAAS,EAAU,EAEhD,CAiBD,OAAQ,CACN,KAAM,CAAC,QAAS,OAAO,CACvB,QAAS,GACT,UAAY,GACH,EAAA,sBAAsB,SAAS,EAAO,CAEhD,CAUD,SAAU,CACR,KAAM,CAAC,EAAA,kBAAmB,OAAO,CACjC,QAAS,OACT,UAAW,GACF,EAAA,yBAAyB,SAAS,EAAQ,EAC5C,aAAoB,YAE5B,CAOD,aAAc,CACZ,KA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AAA,IAAM,EAAA,eAAA,EAAA,cAAA,GAAA,EAAa,CAAA,CAAA,MAAA,CAAA,qBAKzB,EAAA,OAAA,SAAA,CAAA,CAAA,GAAA,GAAA,EAAA,EAAA,oBAAA,GAAA,GAAA,EAAA,EAAA,EAAA,oBAqBE,OAAA,EAAA,EAAA,YAAA,CAlBH,GAAI,EAAA,GACL,IAAI,UACJ,UAAQ,aACP,MAAK,eAA+C,EAAA,uBAAuB,UAAY,EAAA,SAAA,CAA6B,EAAA,eAO7G,EAAA,UAAS,CAAA,EAAA,EAAA,EAAA,YAOV,EAAA,OAAA,UAAA,EAAA,KAAA,EAAA,EAAA,EAAA,kBAAA,EAAA,EAAA,iBADF,EAAA,QAAO,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,GAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"tooltip.cjs","names":[],"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 && !externalAnchorElement\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-bind=\"modeAttrs\"\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 './TooltipConstants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../Popover/PopoverConstants';\nimport { flushPromises, getUniqueString, hasSlotContent, warnIfUnmounted, returnFirstEl } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/Popover/TippyUtils';\nimport ModeMixin from '@/common/mixins/mode';\n\nconst TOOLTIP_ARROW_SVG = '<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\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 mixins: [ModeMixin],\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 * @deprecated Use contentMode=\"invert\"\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 * Whether to show the arrow between the tooltip and its anchor.\n * @values true, false\n */\n showArrow: {\n type: Boolean,\n default: true,\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 */\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' appends to the nearest ancestor <dialog> element when inside one\n * (keeping the tooltip in the browser's top layer), or to the nearest body otherwise.\n * To always append to body regardless of dialog context, pass document.body as an HTMLElement.\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', 'root', HTMLElement,\n */\n appendTo: {\n type: [HTML_ELEMENT_TYPE, 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 * Additional class name for the anchor wrapper 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 anchorClass: {\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 open prop. open 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 * @values null, true, false\n */\n open: {\n type: [Boolean, null],\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 * @deprecated Use externalAnchorElement instead for Shadow DOM compatibility.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n\n /**\n * External anchor element reference. Use this instead of externalAnchor when\n * the anchor may be inside a Shadow DOM, as querySelector cannot pierce shadow boundaries.\n */\n externalAnchorElement: {\n type: HTML_ELEMENT_TYPE,\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 open value\n *\n * @event update:open\n */\n 'update:open',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n hasSlotContent,\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 tippyArrow () {\n return this.showArrow ? TOOLTIP_ARROW_SVG : false;\n },\n\n tippyProps () {\n return {\n arrow: this.tippyArrow,\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 if (this.externalAnchorElement) return this.externalAnchorElement;\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: 'setProps',\n\n // tippyProps only tracks the offset/fallbackPlacements array references, so in-place\n // mutations (e.g. offset[1] = 8) need their own deep watchers to trigger setProps.\n // Reference replacements are already handled by the tippyProps watcher above; skip\n // those here (newValue === oldValue only when the array was mutated in place) to\n // avoid calling setProps twice for the same change.\n offset: {\n deep: true,\n handler (newValue, oldValue) {\n if (newValue === oldValue) this.setProps();\n },\n },\n\n fallbackPlacements: {\n deep: true,\n handler (newValue, oldValue) {\n if (newValue === oldValue) this.setProps();\n },\n },\n\n open: {\n handler: function (open) {\n if (open !== null && this.enabled) {\n this.internalShow = open;\n }\n },\n\n immediate: true,\n },\n\n internalShow (value) {\n if (!this.tip || !this.anchor) return;\n\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.open != null) {\n console.warn('Tooltip: You cannot use both the enabled and open props at the same time.');\n console.warn('The open prop will be ignored.');\n }\n\n this.tip = createTippy(this.anchor, this.initOptions());\n if (this.externalAnchor || this.externalAnchorElement) {\n await flushPromises();\n this.addExternalAnchorEventListeners();\n }\n warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n },\n\n beforeUnmount () {\n (this.externalAnchor || this.externalAnchorElement) && this.removeExternalAnchorEventListeners();\n\n if (this.anchor?._tippy) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n getModeReferenceEl () {\n return this.anchor;\n },\n\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (returnFirstEl(this.$el).getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"], .d-modal[open], .d-modal--transparent[open]') ||\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 returnFirstEl(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.open === null && this.hasVisibleFocus()) {\n this.internalShow = true;\n }\n } else {\n if (this.open === 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.open === 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.open !== null) {\n this.$emit('update:open', 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.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n resolveAppendTo () {\n // When inside a native <dialog>, append there to stay in the browser's top layer.\n if (this.appendTo === 'body') {\n // querySelector('body') returns null when the anchor is detached or inside a shadow root,\n // and tippy then throws on `parentNode.contains(popper)`, so fall back to document.body.\n return this.anchor?.closest('dialog') ??\n this.anchor?.getRootNode()?.querySelector?.('body') ??\n document.body;\n }\n return this.appendTo;\n },\n\n setProps () {\n if (!this.tip || !this.tip.setProps || !this.anchor) return;\n\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.resolveAppendTo(),\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. Reactive options belong in tippyProps, but arrow is duplicated because Tippy\n // renders its default arrow during synchronous showOnCreate mounting. setProps only runs later from\n // onMount, so omitting the initial value would leave the default arrow in the DOM until then.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: this.tippyArrow,\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 appendTo: this.resolveAppendTo(),\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"],"mappings":"idA+DA,IAAM,EAAoB,uGAQrB,EAAU,CACb,KAAM,YAEN,OAAQ,CAAC,EAAA,QAAU,CAEnB,MAAO,CAIL,GAAI,CACF,KAAM,OACN,SAAW,CAAE,OAAO,EAAA,GAAiB,EACtC,CAeD,mBAAoB,CAClB,KAAM,MACN,YAAe,CAAC,OAAO,CACxB,CAMD,SAAU,CACR,KAAM,QACN,QAAS,GACV,CAaD,OAAQ,CACN,KAAM,MACN,YAAe,CAAC,EAAG,GAAG,CACvB,CAMD,UAAW,CACT,KAAM,QACN,QAAS,GACV,CAgBD,UAAW,CACT,KAAM,OACN,QAAS,MACT,UAAW,EAAW,CACpB,OAAO,EAAA,mBAAmB,SAAS,EAAU,EAEhD,CAiBD,OAAQ,CACN,KAAM,CAAC,QAAS,OAAO,CACvB,QAAS,GACT,UAAY,GACH,EAAA,sBAAsB,SAAS,EAAO,CAEhD,CAUD,SAAU,CACR,KAAM,CAAC,EAAA,kBAAmB,OAAO,CACjC,QAAS,OACT,UAAW,GACF,EAAA,yBAAyB,SAAS,EAAQ,EAC5C,aAAoB,YAE5B,CAOD,aAAc,CACZ,KAAM,CAAC,OAAQ,OAAQ,MAAM,CAC7B,QAAS,GACV,CAOD,YAAa,CACX,KAAM,CAAC,OAAQ,OAAQ,MAAM,CAC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AAA,SAAA,CAAA,CAAA,GAAA,GAAA,EAAA,EAAA,oBAAA,GAAA,GAAA,EAAA,EAAA,EAAA,oBAqBE,OAAA,EAAA,EAAA,YAAA,CAlBH,GAAI,EAAA,GACL,IAAI,UACJ,UAAQ,aACP,MAAK,eAA+C,EAAA,uBAAuB,UAAY,EAAA,SAAA,CAA6B,EAAA,eAO7G,EAAA,UAAS,CAAA,EAAA,EAAA,EAAA,YAOV,EAAA,OAAA,UAAA,EAAA,KAAA,EAAA,EAAA,EAAA,kBAAA,EAAA,EAAA,iBADF,EAAA,QAAO,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,GAAA,EAAA,CAAA,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { HTML_ELEMENT_TYPE as e } from "../../common/constants/index.js";
2
- import { flushPromises as t, getUniqueString as n, hasSlotContent as r, returnFirstEl as i, warnIfUnmounted as a } from "../../common/utils/index.js";
3
- import { t as o } from "../../_plugin-vue_export-helper-BTgDAbhb.js";
2
+ import { M as t, O as n, _ as r, l as i, m as a } from "../../utils-BL_SrwnF.js";
3
+ import { t as o } from "../../_plugin-vue_export-helper-BecorN_g.js";
4
4
  import s from "../../common/mixins/mode.js";
5
5
  import { createTippy as c, getAnchor as l, getPopperOptions as u } from "../popover/tippy-utils.js";
6
6
  import { TOOLTIP_DIRECTIONS as d, TOOLTIP_KIND_MODIFIERS as f, TOOLTIP_STICKY_VALUES as p } from "./tooltip-constants.js";
@@ -14,7 +14,7 @@ var T = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><pa
14
14
  id: {
15
15
  type: String,
16
16
  default() {
17
- return n();
17
+ return a();
18
18
  }
19
19
  },
20
20
  fallbackPlacements: {
@@ -165,7 +165,7 @@ var T = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><pa
165
165
  }
166
166
  },
167
167
  async mounted() {
168
- !this.enabled && this.open != null && (console.warn("Tooltip: You cannot use both the enabled and open props at the same time."), console.warn("The open prop will be ignored.")), this.tip = c(this.anchor, this.initOptions()), (this.externalAnchor || this.externalAnchorElement) && (await t(), this.addExternalAnchorEventListeners()), a(i(this.$el), this.$options.name);
168
+ !this.enabled && this.open != null && (console.warn("Tooltip: You cannot use both the enabled and open props at the same time."), console.warn("The open prop will be ignored.")), this.tip = c(this.anchor, this.initOptions()), (this.externalAnchor || this.externalAnchorElement) && (await i(), this.addExternalAnchorEventListeners()), t(n(this.$el), this.$options.name);
169
169
  },
170
170
  beforeUnmount() {
171
171
  (this.externalAnchor || this.externalAnchorElement) && this.removeExternalAnchorEventListeners(), this.anchor?._tippy && this.tip?.destroy();
@@ -175,7 +175,7 @@ var T = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><pa
175
175
  return this.anchor;
176
176
  },
177
177
  calculateAnchorZindex() {
178
- return i(this.$el).getRootNode().querySelector(".d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"], .d-modal[open], .d-modal--transparent[open]") || i(this.$el).closest(".d-zi-drawer") ? 651 : 400;
178
+ return n(this.$el).getRootNode().querySelector(".d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"], .d-modal[open], .d-modal--transparent[open]") || n(this.$el).closest(".d-zi-drawer") ? 651 : 400;
179
179
  },
180
180
  hasVisibleFocus() {
181
181
  return this.anchor.matches(":focus-visible");
@@ -205,7 +205,7 @@ var T = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><pa
205
205
  this.transition && t === "onShow" || (this.$emit("shown", !0), this.open !== null && this.$emit("update:open", !0));
206
206
  },
207
207
  resolveAppendTo() {
208
- return this.appendTo === "body" ? this.anchor?.closest("dialog") ?? this.anchor?.getRootNode()?.querySelector("body") : this.appendTo;
208
+ return this.appendTo === "body" ? this.anchor?.closest("dialog") ?? this.anchor?.getRootNode()?.querySelector?.("body") ?? document.body : this.appendTo;
209
209
  },
210
210
  setProps() {
211
211
  !this.tip || !this.tip.setProps || !this.anchor || this.tip && this.tip.setProps && this.tip.setProps({
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","names":[],"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 && !externalAnchorElement\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-bind=\"modeAttrs\"\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 './TooltipConstants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../Popover/PopoverConstants';\nimport { flushPromises, getUniqueString, hasSlotContent, warnIfUnmounted, returnFirstEl } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/Popover/TippyUtils';\nimport ModeMixin from '@/common/mixins/mode';\n\nconst TOOLTIP_ARROW_SVG = '<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\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 mixins: [ModeMixin],\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 * @deprecated Use contentMode=\"invert\"\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 * Whether to show the arrow between the tooltip and its anchor.\n * @values true, false\n */\n showArrow: {\n type: Boolean,\n default: true,\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 */\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' appends to the nearest ancestor <dialog> element when inside one\n * (keeping the tooltip in the browser's top layer), or to the nearest body otherwise.\n * To always append to body regardless of dialog context, pass document.body as an HTMLElement.\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', 'root', HTMLElement,\n */\n appendTo: {\n type: [HTML_ELEMENT_TYPE, 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 * Additional class name for the anchor wrapper 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 anchorClass: {\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 open prop. open 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 * @values null, true, false\n */\n open: {\n type: [Boolean, null],\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 * @deprecated Use externalAnchorElement instead for Shadow DOM compatibility.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n\n /**\n * External anchor element reference. Use this instead of externalAnchor when\n * the anchor may be inside a Shadow DOM, as querySelector cannot pierce shadow boundaries.\n */\n externalAnchorElement: {\n type: HTML_ELEMENT_TYPE,\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 open value\n *\n * @event update:open\n */\n 'update:open',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n hasSlotContent,\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 tippyArrow () {\n return this.showArrow ? TOOLTIP_ARROW_SVG : false;\n },\n\n tippyProps () {\n return {\n arrow: this.tippyArrow,\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 if (this.externalAnchorElement) return this.externalAnchorElement;\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: 'setProps',\n\n // tippyProps only tracks the offset/fallbackPlacements array references, so in-place\n // mutations (e.g. offset[1] = 8) need their own deep watchers to trigger setProps.\n // Reference replacements are already handled by the tippyProps watcher above; skip\n // those here (newValue === oldValue only when the array was mutated in place) to\n // avoid calling setProps twice for the same change.\n offset: {\n deep: true,\n handler (newValue, oldValue) {\n if (newValue === oldValue) this.setProps();\n },\n },\n\n fallbackPlacements: {\n deep: true,\n handler (newValue, oldValue) {\n if (newValue === oldValue) this.setProps();\n },\n },\n\n open: {\n handler: function (open) {\n if (open !== null && this.enabled) {\n this.internalShow = open;\n }\n },\n\n immediate: true,\n },\n\n internalShow (value) {\n if (!this.tip || !this.anchor) return;\n\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.open != null) {\n console.warn('Tooltip: You cannot use both the enabled and open props at the same time.');\n console.warn('The open prop will be ignored.');\n }\n\n this.tip = createTippy(this.anchor, this.initOptions());\n if (this.externalAnchor || this.externalAnchorElement) {\n await flushPromises();\n this.addExternalAnchorEventListeners();\n }\n warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n },\n\n beforeUnmount () {\n (this.externalAnchor || this.externalAnchorElement) && this.removeExternalAnchorEventListeners();\n\n if (this.anchor?._tippy) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n getModeReferenceEl () {\n return this.anchor;\n },\n\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (returnFirstEl(this.$el).getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"], .d-modal[open], .d-modal--transparent[open]') ||\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 returnFirstEl(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.open === null && this.hasVisibleFocus()) {\n this.internalShow = true;\n }\n } else {\n if (this.open === 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.open === 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.open !== null) {\n this.$emit('update:open', 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.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n resolveAppendTo () {\n // When inside a native <dialog>, append there to stay in the browser's top layer.\n if (this.appendTo === 'body') {\n return this.anchor?.closest('dialog') ?? this.anchor?.getRootNode()?.querySelector('body');\n }\n return this.appendTo;\n },\n\n setProps () {\n if (!this.tip || !this.tip.setProps || !this.anchor) return;\n\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.resolveAppendTo(),\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. Reactive options belong in tippyProps, but arrow is duplicated because Tippy\n // renders its default arrow during synchronous showOnCreate mounting. setProps only runs later from\n // onMount, so omitting the initial value would leave the default arrow in the DOM until then.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: this.tippyArrow,\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 appendTo: this.resolveAppendTo(),\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"],"mappings":";;;;;;;;;AA+DA,IAAM,IAAoB,gHAQrB,IAAU;CACb,MAAM;CAEN,QAAQ,CAAC,EAAU;CAEnB,OAAO;EAIL,IAAI;GAC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AwCM,OAxCN,GAwCM,CAAA,CAnCK,EAAA,kBAAc,CAAK,EAAA,yBAAA,GAAA,EAD5B,EAeO,QAAA;;EAbL,KAAI;EACH,OAAK,EAAE,EAAA,YAAW;EACnB,WAAQ;EACP,WAAO,EAAA,OAAA,EAAA,MAAA,GAAA,MAAE,EAAA,iBAAA,EAAA,cAAA,GAAA,EAAa;EACtB,YAAQ,EAAA,OAAA,EAAA,MAAA,GAAA,MAAE,EAAA,iBAAA,EAAA,cAAA,GAAA,EAAa;EACvB,cAAU,EAAA,OAAA,EAAA,MAAA,GAAA,MAAE,EAAA,iBAAA,EAAA,cAAA,GAAA,EAAa;EACzB,cAAU,EAAA,OAAA,EAAA,MAAA,GAAA,MAAE,EAAA,iBAAA,EAAA,cAAA,GAAA,EAAa;EACzB,WAAO,EAAA,OAAA,EAAA,KAAA,GAAA,GAAA,MAAM,EAAA,iBAAA,EAAA,cAAA,GAAA,EAAa,EAAA,CAAA,MAAA,CAAA;KAG3B,EAEE,EAAA,QAAA,SAAA,CAAA,EAAA,GAAA,IAAA,EAAA,IAAA,GAAA,EAEJ,EAmBM,OAnBN,EAmBM;EAlBH,IAAI,EAAA;EACL,KAAI;EACJ,WAAQ;EACP,OAAK;;MAA+C,EAAA,uBAAuB,WAAY,EAAA,UAAA;GAA6B,EAAA;;IAO7G,EAAA,UAAS,EAAA,CAKjB,EAEO,EAAA,QAAA,WAAA,EAAA,QAAA,CAAA,EAAA,EADF,EAAA,QAAO,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,IAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"tooltip.js","names":[],"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 && !externalAnchorElement\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-bind=\"modeAttrs\"\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 './TooltipConstants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../Popover/PopoverConstants';\nimport { flushPromises, getUniqueString, hasSlotContent, warnIfUnmounted, returnFirstEl } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/Popover/TippyUtils';\nimport ModeMixin from '@/common/mixins/mode';\n\nconst TOOLTIP_ARROW_SVG = '<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\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 mixins: [ModeMixin],\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 * @deprecated Use contentMode=\"invert\"\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 * Whether to show the arrow between the tooltip and its anchor.\n * @values true, false\n */\n showArrow: {\n type: Boolean,\n default: true,\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 */\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' appends to the nearest ancestor <dialog> element when inside one\n * (keeping the tooltip in the browser's top layer), or to the nearest body otherwise.\n * To always append to body regardless of dialog context, pass document.body as an HTMLElement.\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', 'root', HTMLElement,\n */\n appendTo: {\n type: [HTML_ELEMENT_TYPE, 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 * Additional class name for the anchor wrapper 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 anchorClass: {\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 open prop. open 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 * @values null, true, false\n */\n open: {\n type: [Boolean, null],\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 * @deprecated Use externalAnchorElement instead for Shadow DOM compatibility.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n\n /**\n * External anchor element reference. Use this instead of externalAnchor when\n * the anchor may be inside a Shadow DOM, as querySelector cannot pierce shadow boundaries.\n */\n externalAnchorElement: {\n type: HTML_ELEMENT_TYPE,\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 open value\n *\n * @event update:open\n */\n 'update:open',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n hasSlotContent,\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 tippyArrow () {\n return this.showArrow ? TOOLTIP_ARROW_SVG : false;\n },\n\n tippyProps () {\n return {\n arrow: this.tippyArrow,\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 if (this.externalAnchorElement) return this.externalAnchorElement;\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: 'setProps',\n\n // tippyProps only tracks the offset/fallbackPlacements array references, so in-place\n // mutations (e.g. offset[1] = 8) need their own deep watchers to trigger setProps.\n // Reference replacements are already handled by the tippyProps watcher above; skip\n // those here (newValue === oldValue only when the array was mutated in place) to\n // avoid calling setProps twice for the same change.\n offset: {\n deep: true,\n handler (newValue, oldValue) {\n if (newValue === oldValue) this.setProps();\n },\n },\n\n fallbackPlacements: {\n deep: true,\n handler (newValue, oldValue) {\n if (newValue === oldValue) this.setProps();\n },\n },\n\n open: {\n handler: function (open) {\n if (open !== null && this.enabled) {\n this.internalShow = open;\n }\n },\n\n immediate: true,\n },\n\n internalShow (value) {\n if (!this.tip || !this.anchor) return;\n\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.open != null) {\n console.warn('Tooltip: You cannot use both the enabled and open props at the same time.');\n console.warn('The open prop will be ignored.');\n }\n\n this.tip = createTippy(this.anchor, this.initOptions());\n if (this.externalAnchor || this.externalAnchorElement) {\n await flushPromises();\n this.addExternalAnchorEventListeners();\n }\n warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n },\n\n beforeUnmount () {\n (this.externalAnchor || this.externalAnchorElement) && this.removeExternalAnchorEventListeners();\n\n if (this.anchor?._tippy) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n getModeReferenceEl () {\n return this.anchor;\n },\n\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (returnFirstEl(this.$el).getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"], .d-modal[open], .d-modal--transparent[open]') ||\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 returnFirstEl(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.open === null && this.hasVisibleFocus()) {\n this.internalShow = true;\n }\n } else {\n if (this.open === 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.open === 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.open !== null) {\n this.$emit('update:open', 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.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n resolveAppendTo () {\n // When inside a native <dialog>, append there to stay in the browser's top layer.\n if (this.appendTo === 'body') {\n // querySelector('body') returns null when the anchor is detached or inside a shadow root,\n // and tippy then throws on `parentNode.contains(popper)`, so fall back to document.body.\n return this.anchor?.closest('dialog') ??\n this.anchor?.getRootNode()?.querySelector?.('body') ??\n document.body;\n }\n return this.appendTo;\n },\n\n setProps () {\n if (!this.tip || !this.tip.setProps || !this.anchor) return;\n\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.resolveAppendTo(),\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. Reactive options belong in tippyProps, but arrow is duplicated because Tippy\n // renders its default arrow during synchronous showOnCreate mounting. setProps only runs later from\n // onMount, so omitting the initial value would leave the default arrow in the DOM until then.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: this.tippyArrow,\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 appendTo: this.resolveAppendTo(),\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"],"mappings":";;;;;;;;;AA+DA,IAAM,IAAoB,gHAQrB,IAAU;CACb,MAAM;CAEN,QAAQ,CAAC,EAAU;CAEnB,OAAO;EAIL,IAAI;GACF,MAAM;GACN,UAAW;AAAE,WAAO,GAAiB;;GACtC;EAeD,oBAAoB;GAClB,MAAM;GACN,eAAe,CAAC,OAAO;GACxB;EAMD,UAAU;GACR,MAAM;GACN,SAAS;GACV;EAaD,QAAQ;GACN,MAAM;GACN,eAAe,CAAC,GAAG,GAAG;GACvB;EAMD,WAAW;GACT,MAAM;G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EAAA,cAAA,GAAA,EAAa;EACtB,YAAQ,EAAA,OAAA,EAAA,MAAA,GAAA,MAAE,EAAA,iBAAA,EAAA,cAAA,GAAA,EAAa;EACvB,cAAU,EAAA,OAAA,EAAA,MAAA,GAAA,MAAE,EAAA,iBAAA,EAAA,cAAA,GAAA,EAAa;EACzB,cAAU,EAAA,OAAA,EAAA,MAAA,GAAA,MAAE,EAAA,iBAAA,EAAA,cAAA,GAAA,EAAa;EACzB,WAAO,EAAA,OAAA,EAAA,KAAA,GAAA,GAAA,MAAM,EAAA,iBAAA,EAAA,cAAA,GAAA,EAAa,EAAA,CAAA,MAAA,CAAA;KAG3B,EAEE,EAAA,QAAA,SAAA,CAAA,EAAA,GAAA,IAAA,EAAA,IAAA,GAAA,EAEJ,EAmBM,OAnBN,EAmBM;EAlBH,IAAI,EAAA;EACL,KAAI;EACJ,WAAQ;EACP,OAAK;;MAA+C,EAAA,uBAAuB,WAAY,EAAA,UAAA;GAA6B,EAAA;;IAO7G,EAAA,UAAS,EAAA,CAKjB,EAEO,EAAA,QAAA,WAAA,EAAA,QAAA,CAAA,EAAA,EADF,EAAA,QAAO,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,IAAA,EAAA,CAAA,CAAA"}
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../common/utils/index.cjs`),n=require(`../../mode_constants-CzYJW9ua.cjs`),r=require(`../tooltip/tooltip-constants.cjs`),i=require(`../tooltip/tooltip.cjs`);let a=require(`vue`),o=require(`deep-equal`);o=e.t(o);var s={name:`dt-tooltip-directive`,install(e){if(!globalThis.__DtTooltipDirectiveApp){let e=(0,a.createApp)({name:`DtTooltipDirectiveApp`,components:{DtTooltip:i.default},data(){return{tooltips:[]}},mounted(){globalThis.__DtTooltipDirectiveApp=this},methods:{addOrUpdateTooltip(e,t){let n=this.tooltips.findIndex(t=>t.id===e);n===-1?this.tooltips.push({id:e,...t}):this.tooltips.splice(n,1,{id:e,...t})},removeTooltip(e){this.tooltips=this.tooltips.filter(t=>t.id!==e)}},render(){return(0,a.h)(`div`,this.tooltips.map(({id:e,anchorElement:t,...n})=>(0,a.h)(i.default,{key:e,...n,sticky:n.sticky===void 0?!0:n.sticky,delay:n.delay===void 0?process.env.NODE_ENV!==`test`:n.delay,externalAnchorElement:t})))}}),t=document.createElement(`div`);document.body.appendChild(t),e.mount(t)}let s=globalThis.__DtTooltipDirectiveApp;e.directive(`dt-tooltip`,{beforeMount(e,t){c(e,t)},updated(e,t){(0,o.default)(t.value,t.oldValue)||c(e,t)},unmounted(e){s.removeTooltip(e.getAttribute(`data-dt-tooltip-id`))}});function c(e,i){if(i.value===null||i.value===void 0){let t=e.getAttribute(`data-dt-tooltip-id`);t&&s.removeTooltip(t);return}let a=e.getAttribute(`data-dt-tooltip-id`)||t.getUniqueString(),o;if(typeof i.value==`string`)o={message:i.value,placement:i.arg||`top`};else if(typeof i.value==`object`&&i.value!==null)o={placement:i.arg||i.value.placement||`top`,...i.value};else{console.error(`DtTooltipDirective: binding value must be string, object, null or undefined`);return}Object.keys(i.modifiers).forEach(e=>{switch(e){case`inverted`:o.inverted=!0;break;case`no-delay`:o.delay=!1;break;case`no-transition`:o.transition=!1;break;default:n.n.includes(e)?o.contentMode=e:r.TOOLTIP_DIRECTIONS.includes(e)&&(o.placement=e);break}}),o.anchorElement=e,e.setAttribute(`data-dt-tooltip-id`,a),s.addOrUpdateTooltip(a,o)}}};exports.DtTooltipDirective=s,exports.default=s;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../../chunk-Bmb41Sf3.cjs`),t=require(`../../utils-GofHWJKi.cjs`),n=require(`../../mode_constants-DM0SVbFM.cjs`),r=require(`../tooltip/tooltip-constants.cjs`),i=require(`../tooltip/tooltip.cjs`);let a=require(`vue`),o=require(`deep-equal`);o=e.t(o);var s={name:`dt-tooltip-directive`,install(e){if(!globalThis.__DtTooltipDirectiveApp){let e=(0,a.createApp)({name:`DtTooltipDirectiveApp`,components:{DtTooltip:i.default},data(){return{tooltips:[]}},mounted(){globalThis.__DtTooltipDirectiveApp=this},methods:{addOrUpdateTooltip(e,t){let n=this.tooltips.findIndex(t=>t.id===e);n===-1?this.tooltips.push({id:e,...t}):this.tooltips.splice(n,1,{id:e,...t})},removeTooltip(e){this.tooltips=this.tooltips.filter(t=>t.id!==e)}},render(){return(0,a.h)(`div`,this.tooltips.map(({id:e,anchorElement:t,...n})=>(0,a.h)(i.default,{key:e,...n,sticky:n.sticky===void 0?!0:n.sticky,delay:n.delay===void 0?process.env.NODE_ENV!==`test`:n.delay,externalAnchorElement:t})))}}),t=document.createElement(`div`);document.body.appendChild(t),e.mount(t)}let s=globalThis.__DtTooltipDirectiveApp;e.directive(`dt-tooltip`,{beforeMount(e,t){c(e,t)},updated(e,t){(0,o.default)(t.value,t.oldValue)||c(e,t)},unmounted(e){s.removeTooltip(e.getAttribute(`data-dt-tooltip-id`))}});function c(e,i){if(i.value===null||i.value===void 0){let t=e.getAttribute(`data-dt-tooltip-id`);t&&s.removeTooltip(t);return}let a=e.getAttribute(`data-dt-tooltip-id`)||t.m(),o;if(typeof i.value==`string`)o={message:i.value,placement:i.arg||`top`};else if(typeof i.value==`object`&&i.value!==null)o={placement:i.arg||i.value.placement||`top`,...i.value};else{console.error(`DtTooltipDirective: binding value must be string, object, null or undefined`);return}Object.keys(i.modifiers).forEach(e=>{switch(e){case`inverted`:o.inverted=!0;break;case`no-delay`:o.delay=!1;break;case`no-transition`:o.transition=!1;break;default:n.n.includes(e)?o.contentMode=e:r.TOOLTIP_DIRECTIONS.includes(e)&&(o.placement=e);break}}),o.anchorElement=e,e.setAttribute(`data-dt-tooltip-id`,a),s.addOrUpdateTooltip(a,o)}}};exports.DtTooltipDirective=s,exports.default=s;
2
2
  //# sourceMappingURL=tooltip.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.cjs","names":["DtTooltip","getUniqueString","CONTENT_MODE_VALUES","TOOLTIP_DIRECTIONS"],"sources":["../../../directives/tooltip_directive/tooltip.js"],"sourcesContent":["import { DtTooltip, TOOLTIP_DIRECTIONS } from '@/components/Tooltip';\nimport { getUniqueString } from '@/common/utils';\nimport { createApp, h } from 'vue';\nimport deepEqual from 'deep-equal';\nimport { CONTENT_MODE_VALUES } from '@/common/mode_constants';\n\nexport const DtTooltipDirective = {\n name: 'dt-tooltip-directive',\n install (app) {\n const DEFAULT_PLACEMENT = 'top';\n if (!globalThis.__DtTooltipDirectiveApp) {\n const DtTooltipDirectiveApp = createApp({\n name: 'DtTooltipDirectiveApp',\n components: { DtTooltip },\n data () {\n return {\n tooltips: [],\n };\n },\n\n mounted () {\n globalThis.__DtTooltipDirectiveApp = this;\n },\n\n methods: {\n addOrUpdateTooltip (id, tooltipConfig) {\n const index = this.tooltips.findIndex(tooltip => tooltip.id === id);\n if (index !== -1) {\n // Update existing tooltip\n this.tooltips.splice(index, 1, { id, ...tooltipConfig });\n } else {\n // Add new tooltip\n this.tooltips.push({ id, ...tooltipConfig });\n }\n },\n\n removeTooltip (id) {\n this.tooltips = this.tooltips.filter(tooltip => tooltip.id !== id);\n },\n },\n\n render () {\n return h('div',\n this.tooltips.map(({ id, anchorElement, ...tooltipProps }) => {\n return h(DtTooltip, {\n key: id,\n ...tooltipProps,\n sticky: tooltipProps.sticky !== undefined ? tooltipProps.sticky : true,\n /**\n * Set the delay to false when running tests only.\n */\n delay: tooltipProps.delay !== undefined ? tooltipProps.delay : (process.env.NODE_ENV !== 'test'),\n externalAnchorElement: anchorElement,\n });\n }),\n );\n },\n });\n\n const mountPoint = document.createElement('div');\n document.body.appendChild(mountPoint);\n DtTooltipDirectiveApp.mount(mountPoint);\n }\n\n const tooltipApp = globalThis.__DtTooltipDirectiveApp;\n\n app.directive('dt-tooltip', {\n beforeMount (anchor, binding) {\n // Initial tooltip setup\n setupTooltip(anchor, binding);\n },\n updated (anchor, binding) {\n // Update tooltip on binding value change\n // Use deep equality check to prevent infinite loops when objects are passed\n if (!deepEqual(binding.value, binding.oldValue)) {\n setupTooltip(anchor, binding);\n }\n },\n unmounted (anchor) {\n tooltipApp.removeTooltip(anchor.getAttribute('data-dt-tooltip-id'));\n },\n });\n\n function setupTooltip (anchor, binding) {\n if (binding.value === null || binding.value === undefined) {\n const tooltipId = anchor.getAttribute('data-dt-tooltip-id');\n if (tooltipId) {\n tooltipApp.removeTooltip(tooltipId);\n }\n return;\n }\n const tooltipId = anchor.getAttribute('data-dt-tooltip-id') || getUniqueString();\n\n let tooltipConfig;\n if (typeof binding.value === 'string') {\n tooltipConfig = {\n message: binding.value,\n placement: binding.arg || DEFAULT_PLACEMENT,\n };\n } else if (typeof binding.value === 'object' && binding.value !== null) {\n tooltipConfig = {\n placement: binding.arg || binding.value.placement || DEFAULT_PLACEMENT,\n ...binding.value,\n };\n } else {\n console.error('DtTooltipDirective: binding value must be string, object, null or undefined');\n return;\n }\n\n Object.keys(binding.modifiers).forEach(modifier => {\n switch (modifier) {\n case 'inverted':\n tooltipConfig.inverted = true;\n break;\n case 'no-delay':\n tooltipConfig.delay = false;\n break;\n case 'no-transition':\n tooltipConfig.transition = false;\n break;\n default:\n if (CONTENT_MODE_VALUES.includes(modifier)) {\n tooltipConfig.contentMode = modifier;\n } else if (TOOLTIP_DIRECTIONS.includes(modifier)) {\n tooltipConfig.placement = modifier;\n }\n break;\n }\n });\n\n tooltipConfig.anchorElement = anchor;\n anchor.setAttribute('data-dt-tooltip-id', tooltipId);\n tooltipApp.addOrUpdateTooltip(tooltipId, tooltipConfig);\n }\n },\n};\n\nexport default DtTooltipDirective;\n"],"mappings":"4WAMA,IAAa,EAAqB,CAChC,KAAM,uBACN,QAAS,EAAK,CAEZ,GAAI,CAAC,WAAW,wBAAyB,CACvC,IAAM,GAAA,EAAA,EAAA,WAAkC,CACtC,KAAM,wBACN,WAAY,CAAE,UAAA,EAAA,QAAW,CACz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AW,cAAc,EAAU,CAErC,OAEF,IAAM,EAAY,EAAO,aAAa,qBAAqB,EAAIC,EAAAA,iBAAiB,CAE5E,EACJ,GAAI,OAAO,EAAQ,OAAU,SAC3B,EAAgB,CACd,QAAS,EAAQ,MACjB,UAAW,EAAQ,KAAO,MAC3B,SACQ,OAAO,EAAQ,OAAU,UAAY,EAAQ,QAAU,KAChE,EAAgB,CACd,UAAW,EAAQ,KAAO,EAAQ,MAAM,WAAa,MACrD,GAAG,EAAQ,MACZ,KACI,CACL,QAAQ,MAAM,8EAA8E,CAC5F,OAGF,OAAO,KAAK,EAAQ,UAAU,CAAC,QAAQ,GAAY,CACjD,OAAQ,EAAR,CACE,IAAK,WACH,EAAc,SAAW,GACzB,MACF,IAAK,WACH,EAAc,MAAQ,GACtB,MACF,IAAK,gBACH,EAAc,WAAa,GAC3B,MACF,QACMC,EAAAA,EAAoB,SAAS,EAAS,CACxC,EAAc,YAAc,EACnBC,EAAAA,mBAAmB,SAAS,EAAS,GAC9C,EAAc,UAAY,GAE5B,QAEJ,CAEF,EAAc,cAAgB,EAC9B,EAAO,aAAa,qBAAsB,EAAU,CACpD,EAAW,mBAAmB,EAAW,EAAc,GAG5D"}
1
+ {"version":3,"file":"tooltip.cjs","names":["DtTooltip","getUniqueString","CONTENT_MODE_VALUES","TOOLTIP_DIRECTIONS"],"sources":["../../../directives/tooltip_directive/tooltip.js"],"sourcesContent":["import { DtTooltip, TOOLTIP_DIRECTIONS } from '@/components/Tooltip';\nimport { getUniqueString } from '@/common/utils';\nimport { createApp, h } from 'vue';\nimport deepEqual from 'deep-equal';\nimport { CONTENT_MODE_VALUES } from '@/common/mode_constants';\n\nexport const DtTooltipDirective = {\n name: 'dt-tooltip-directive',\n install (app) {\n const DEFAULT_PLACEMENT = 'top';\n if (!globalThis.__DtTooltipDirectiveApp) {\n const DtTooltipDirectiveApp = createApp({\n name: 'DtTooltipDirectiveApp',\n components: { DtTooltip },\n data () {\n return {\n tooltips: [],\n };\n },\n\n mounted () {\n globalThis.__DtTooltipDirectiveApp = this;\n },\n\n methods: {\n addOrUpdateTooltip (id, tooltipConfig) {\n const index = this.tooltips.findIndex(tooltip => tooltip.id === id);\n if (index !== -1) {\n // Update existing tooltip\n this.tooltips.splice(index, 1, { id, ...tooltipConfig });\n } else {\n // Add new tooltip\n this.tooltips.push({ id, ...tooltipConfig });\n }\n },\n\n removeTooltip (id) {\n this.tooltips = this.tooltips.filter(tooltip => tooltip.id !== id);\n },\n },\n\n render () {\n return h('div',\n this.tooltips.map(({ id, anchorElement, ...tooltipProps }) => {\n return h(DtTooltip, {\n key: id,\n ...tooltipProps,\n sticky: tooltipProps.sticky !== undefined ? tooltipProps.sticky : true,\n /**\n * Set the delay to false when running tests only.\n */\n delay: tooltipProps.delay !== undefined ? tooltipProps.delay : (process.env.NODE_ENV !== 'test'),\n externalAnchorElement: anchorElement,\n });\n }),\n );\n },\n });\n\n const mountPoint = document.createElement('div');\n document.body.appendChild(mountPoint);\n DtTooltipDirectiveApp.mount(mountPoint);\n }\n\n const tooltipApp = globalThis.__DtTooltipDirectiveApp;\n\n app.directive('dt-tooltip', {\n beforeMount (anchor, binding) {\n // Initial tooltip setup\n setupTooltip(anchor, binding);\n },\n updated (anchor, binding) {\n // Update tooltip on binding value change\n // Use deep equality check to prevent infinite loops when objects are passed\n if (!deepEqual(binding.value, binding.oldValue)) {\n setupTooltip(anchor, binding);\n }\n },\n unmounted (anchor) {\n tooltipApp.removeTooltip(anchor.getAttribute('data-dt-tooltip-id'));\n },\n });\n\n function setupTooltip (anchor, binding) {\n if (binding.value === null || binding.value === undefined) {\n const tooltipId = anchor.getAttribute('data-dt-tooltip-id');\n if (tooltipId) {\n tooltipApp.removeTooltip(tooltipId);\n }\n return;\n }\n const tooltipId = anchor.getAttribute('data-dt-tooltip-id') || getUniqueString();\n\n let tooltipConfig;\n if (typeof binding.value === 'string') {\n tooltipConfig = {\n message: binding.value,\n placement: binding.arg || DEFAULT_PLACEMENT,\n };\n } else if (typeof binding.value === 'object' && binding.value !== null) {\n tooltipConfig = {\n placement: binding.arg || binding.value.placement || DEFAULT_PLACEMENT,\n ...binding.value,\n };\n } else {\n console.error('DtTooltipDirective: binding value must be string, object, null or undefined');\n return;\n }\n\n Object.keys(binding.modifiers).forEach(modifier => {\n switch (modifier) {\n case 'inverted':\n tooltipConfig.inverted = true;\n break;\n case 'no-delay':\n tooltipConfig.delay = false;\n break;\n case 'no-transition':\n tooltipConfig.transition = false;\n break;\n default:\n if (CONTENT_MODE_VALUES.includes(modifier)) {\n tooltipConfig.contentMode = modifier;\n } else if (TOOLTIP_DIRECTIONS.includes(modifier)) {\n tooltipConfig.placement = modifier;\n }\n break;\n }\n });\n\n tooltipConfig.anchorElement = anchor;\n anchor.setAttribute('data-dt-tooltip-id', tooltipId);\n tooltipApp.addOrUpdateTooltip(tooltipId, tooltipConfig);\n }\n },\n};\n\nexport default DtTooltipDirective;\n"],"mappings":"wWAMA,IAAa,EAAqB,CAChC,KAAM,uBACN,QAAS,EAAK,CAEZ,GAAI,CAAC,WAAW,wBAAyB,CACvC,IAAM,GAAA,EAAA,EAAA,WAAkC,CACtC,KAAM,wBACN,WAAY,CAAE,UAAA,EAAA,QAAW,CACzB,MAAQ,CACN,MAAO,CACL,SAAU,EAAE,CACb,EAGH,SAAW,CACT,WAAW,wBAA0B,MAGvC,QAAS,CACP,mBAAoB,EAAI,EAAe,CACrC,IAAM,EAAQ,KAAK,SAAS,UAAU,GAAW,EAAQ,KAAO,EAAG,CAC/D,IAAU,GAKZ,KAAK,SAAS,KAAK,CAAE,KAAI,GAAG,EAAe,CAAC,CAH5C,KAAK,SAAS,OAAO,EAAO,EAAG,CAAE,KAAI,GAAG,EAAe,CAAC,EAO5D,cAAe,EAAI,CACjB,KAAK,SAAW,KAAK,SAAS,OAAO,GAAW,EAAQ,KAAO,EAAG,EAErE,CAED,QAAU,CACR,OAAA,EAAA,EAAA,GAAS,MACP,KAAK,SAAS,KAAK,CAAE,KAAI,gBAAe,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Q,GACtB,MACF,IAAK,gBACH,EAAc,WAAa,GAC3B,MACF,QACMC,EAAAA,EAAoB,SAAS,EAAS,CACxC,EAAc,YAAc,EACnBC,EAAAA,mBAAmB,SAAS,EAAS,GAC9C,EAAc,UAAY,GAE5B,QAEJ,CAEF,EAAc,cAAgB,EAC9B,EAAO,aAAa,qBAAsB,EAAU,CACpD,EAAW,mBAAmB,EAAW,EAAc,GAG5D"}
@@ -1,5 +1,5 @@
1
- import { getUniqueString as e } from "../../common/utils/index.js";
2
- import { n as t } from "../../mode_constants-tb7TL85q.js";
1
+ import { m as e } from "../../utils-BL_SrwnF.js";
2
+ import { n as t } from "../../mode_constants-B8_1b5T8.js";
3
3
  import { TOOLTIP_DIRECTIONS as n } from "../tooltip/tooltip-constants.js";
4
4
  import r from "../tooltip/tooltip.js";
5
5
  import { createApp as i, h as a } from "vue";
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/validators/index.cjs`),t=require(`../../common/utils/index.cjs`),n=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`);let r=require(`vue`),i=require(`@dialpad/dialtone-icons/vue`);var a=Object.freeze({warning:i.DtIconAlertTriangle,critical:i.DtIconAlertCircle,positive:i.DtIconCheckCircle,info:i.DtIconInfo}),o={name:`DtValidationMessages`,components:{DtIconAlertTriangle:i.DtIconAlertTriangle,DtIconAlertCircle:i.DtIconAlertCircle,DtIconCheckCircle:i.DtIconCheckCircle,DtIconInfo:i.DtIconInfo},props:{id:{type:String,default(){return t.getUniqueString()}},validationMessages:{type:Array,default:()=>[],validator:t=>e.validationMessageValidator(t)},showMessages:{type:Boolean,default:!0},iconClass:{type:[String,Array,Object],default:``}},computed:{filteredValidationMessages(){return t.filterFormattedMessages(this.validationMessages)},validationState(){return t.getValidationState(this.validationMessages)}},methods:{getMessageKey(e,t){return`validation-message-${e}-${t}-${this.id}`},iconForType(e){return a[e]??null},messageTypeClass(e){return{critical:`base-input__message--critical d-validation-message--critical`,warning:`base-input__message--warning d-validation-message--warning`,positive:`base-input__message--positive d-validation-message--positive`,info:`base-input__message--info d-validation-message--info`}[e]}}},s=[`id`],c=[`innerHTML`];function l(e,t,n,i,a,o){return(0,r.openBlock)(),(0,r.createElementBlock)(`div`,{id:n.id,"aria-live":`assertive`,class:`base-input__messages d-validation-message__container`,"data-qa":`validation-messages-container`},[n.showMessages?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:0},(0,r.renderList)(o.filteredValidationMessages,({message:t,type:i},a)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{key:o.getMessageKey(i,a),"data-qa":`validation-message`,class:(0,r.normalizeClass)([`base-input__message`,`d-validation-message`,o.messageTypeClass(i)])},[(0,r.renderSlot)(e.$slots,`icon`,{type:i},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(o.iconForType(i)),{class:(0,r.normalizeClass)([`d-validation-message__icon`,n.iconClass]),"data-qa":`validation-message-icon`,size:`300`},null,8,[`class`]))]),(0,r.createElementVNode)(`p`,{innerHTML:t},null,8,c)],2))),128)):(0,r.createCommentVNode)(``,!0)],8,s)}var u=n.t(o,[[`render`,l]]);exports.default=u;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/validators/index.cjs`),t=require(`../../utils-GofHWJKi.cjs`),n=require(`../../_plugin-vue_export-helper-CX7YVcP6.cjs`);let r=require(`vue`),i=require(`@dialpad/dialtone-icons/vue`);var a=Object.freeze({warning:i.DtIconAlertTriangle,critical:i.DtIconAlertCircle,positive:i.DtIconCheckCircle,info:i.DtIconInfo}),o={name:`DtValidationMessages`,components:{DtIconAlertTriangle:i.DtIconAlertTriangle,DtIconAlertCircle:i.DtIconAlertCircle,DtIconCheckCircle:i.DtIconCheckCircle,DtIconInfo:i.DtIconInfo},props:{id:{type:String,default(){return t.m()}},validationMessages:{type:Array,default:()=>[],validator:t=>e.validationMessageValidator(t)},showMessages:{type:Boolean,default:!0},iconClass:{type:[String,Array,Object],default:``}},computed:{filteredValidationMessages(){return t.s(this.validationMessages)},validationState(){return t.h(this.validationMessages)}},methods:{getMessageKey(e,t){return`validation-message-${e}-${t}-${this.id}`},iconForType(e){return a[e]??null},messageTypeClass(e){return{critical:`base-input__message--critical d-validation-message--critical`,warning:`base-input__message--warning d-validation-message--warning`,positive:`base-input__message--positive d-validation-message--positive`,info:`base-input__message--info d-validation-message--info`}[e]}}},s=[`id`],c=[`innerHTML`];function l(e,t,n,i,a,o){return(0,r.openBlock)(),(0,r.createElementBlock)(`div`,{id:n.id,"aria-live":`assertive`,class:`base-input__messages d-validation-message__container`,"data-qa":`validation-messages-container`},[n.showMessages?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:0},(0,r.renderList)(o.filteredValidationMessages,({message:t,type:i},a)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{key:o.getMessageKey(i,a),"data-qa":`validation-message`,class:(0,r.normalizeClass)([`base-input__message`,`d-validation-message`,o.messageTypeClass(i)])},[(0,r.renderSlot)(e.$slots,`icon`,{type:i},()=>[((0,r.openBlock)(),(0,r.createBlock)((0,r.resolveDynamicComponent)(o.iconForType(i)),{class:(0,r.normalizeClass)([`d-validation-message__icon`,n.iconClass]),"data-qa":`validation-message-icon`,size:`300`},null,8,[`class`]))]),(0,r.createElementVNode)(`p`,{innerHTML:t},null,8,c)],2))),128)):(0,r.createCommentVNode)(``,!0)],8,s)}var u=n.t(o,[[`render`,l]]);exports.default=u;
2
2
  //# sourceMappingURL=validation-messages.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"validation-messages.cjs","names":[],"sources":["../../../components/ValidationMessages/ValidationMessages.vue"],"sourcesContent":["<template>\n <!-- Live region is always present so VoiceOver can detect mutations on a stable node (DLT-3430). -->\n <div\n :id=\"id\"\n aria-live=\"assertive\"\n class=\"base-input__messages d-validation-message__container\"\n data-qa=\"validation-messages-container\"\n >\n <template v-if=\"showMessages\">\n <div\n v-for=\"({ message, type }, index) in filteredValidationMessages\"\n :key=\"getMessageKey(type, index)\"\n data-qa=\"validation-message\"\n :class=\"[\n 'base-input__message',\n 'd-validation-message',\n messageTypeClass(type),\n ]\"\n >\n <!-- @slot icon — replaces the default per-type DtIcon. Slot content must be a Dialtone icon (carries\n the `d-icon` class) so the CSS pseudo-element fallback suppresses correctly. Receives { type } scope. -->\n <slot\n name=\"icon\"\n :type=\"type\"\n >\n <component\n :is=\"iconForType(type)\"\n :class=\"['d-validation-message__icon', iconClass]\"\n data-qa=\"validation-message-icon\"\n size=\"300\"\n />\n </slot>\n <p v-html=\"message\" />\n </div>\n </template>\n </div>\n</template>\n\n<script>\nimport { validationMessageValidator } from '@/common/validators';\nimport {\n getUniqueString,\n filterFormattedMessages,\n getValidationState,\n} from '@/common/utils';\nimport {\n DtIconAlertTriangle,\n DtIconAlertCircle,\n DtIconCheckCircle,\n DtIconInfo,\n} from '@dialpad/dialtone-icons/vue';\n\nconst kindToIcon = Object.freeze({\n warning: DtIconAlertTriangle,\n critical: DtIconAlertCircle,\n positive: DtIconCheckCircle,\n info: DtIconInfo,\n});\n\n/**\n * Validation messages are used to convey information to the user about the current state of the input element.\n * These messages can have a critical, warning, positive, or info type.\n * @see https://dialtone.dialpad.com/components/validation_messages.html\n */\nexport default {\n name: 'DtValidationMessages',\n\n components: { DtIconAlertTriangle, DtIconAlertCircle, DtIconCheckCircle, DtIconInfo },\n\n props: {\n /**\n * The id of the validation message\n */\n id: {\n type: String,\n default () {\n return getUniqueString();\n },\n },\n\n /**\n * Array of validation messages. Each message has the following structure:\n * `{ message: \"Some informative message\", type: \"critical|warning|positive|info\"}`\n */\n validationMessages: {\n type: Array,\n default: () => [],\n validator: messages => validationMessageValidator(messages),\n },\n\n /**\n * Show Validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n filteredValidationMessages () {\n return filterFormattedMessages(this.validationMessages);\n },\n\n validationState () {\n return getValidationState(this.validationMessages);\n },\n },\n\n methods: {\n getMessageKey (type, index) {\n return `validation-message-${type}-${index}-${this.id}`;\n },\n\n iconForType (type) {\n return kindToIcon[type] ?? null;\n },\n\n messageTypeClass (type) {\n const messageTypesClasses = {\n critical: 'base-input__message--critical d-validation-message--critical',\n warning: 'base-input__message--warning d-validation-message--warning',\n positive: 'base-input__message--positive d-validation-message--positive',\n info: 'base-input__message--info d-validation-message--info',\n };\n\n return messageTypesClasses[type];\n },\n },\n};\n</script>\n"],"mappings":"0VAoDA,IAAM,EAAa,OAAO,OAAO,CAC/B,QAAS,EAAA,oBACT,SAAU,EAAA,kBACV,SAAU,EAAA,kBACV,KAAM,EAAA,WACP,CAAC,CAOG,EAAU,CACb,KAAM,uBAEN,WAAY,CAAE,oBAAA,EAAA,oBAAqB,kBAAA,EAAA,kBAAmB,kBAAA,EAAA,kBAAmB,WAAA,EAAA,WAAY,CAErF,MAAO,CAIL,GAAI,CACF,KAAM,OACN,SAAW,CACT,OAAO,EAAA,iBAAiB,EAE3B,CAMD,mBAAoB,CAClB,KAAM,MACN,YAAe,EAAE,CACjB,UAAW,GAAY,EAAA,2BAA2B,EAAS,CAC5D,CAMD,aAAc,CACZ,KAAM,QACN,QAAS,GACV,CAKD,UAAW,CACT,KAAM,CAAC,OAAQ,MAAO,OAAO,CAC7B,QAAS,GACV,CACF,CAED,SAAU,CACR,4BAA8B,CAC5B,OAAO,EAAA,wBAAwB,KAAK,mBAAmB,EAGzD,iBAAmB,CACjB,OAAO,EAAA,mBAAmB,KAAK,mBAAmB,EAErD,CAED,QAAS,CACP,cAAe,EAAM,EAAO,CAC1B,MAAO,sBAAsB,EAAK,GAAG,EAAM,GAAG,KAAK,MAGrD,YAAa,EAAM,CACjB,OAAO,EAAW,IAAS,MAG7B,iBAAkB,EAAM,CAQtB,MAP4B,CAC1B,SAAU,+DACV,QAAS,6DACT,SAAU,+DACV,KAAM,uDACP,CAE0B,IAE9B,CACF,mGAvGO,MAAA,CAhCH,GAAI,EAAA,GACL,YAAU,YACV,MAAM,uDACN,UAAQ,kCAEQ,EAAA,eAAA,EAAA,EAAA,WAAA,GAAA,EAAA,EAAA,EAAA,oBAyBR,EAAA,SAAA,CAAA,IAAA,EAAA,EAAA,EAAA,EAAA,YAvBiC,EAAA,4BAA0B,CAArD,UAAS,QAAQ,gDAuBvB,MAAA,CAtBH,IAAK,EAAA,cAAc,EAAM,EAAK,CAC/B,UAAQ,qBACP,OAAA,EAAA,EAAA,gBAAK,8CAAiF,EAAA,iBAAiB,EAAI,sBAkBrG,EAAA,OAAA,OAAA,CARE,OAAI,KAQN,GAAA,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,cAAA,EAAA,EAAA,yBALE,EAAA,YAAY,EAAI,CAAA,CAAA,CACpB,OAAA,EAAA,EAAA,gBAAK,CAAA,6BAAiC,EAAA,UAAS,CAAA,CAChD,UAAQ,0BACR,KAAK,qDAGa,IAAA,CAAnB,UAAQ,EAAO,CAAA,KAAA,EAAA,EAAA,CAAA,CAAA,EAAA"}
1
+ {"version":3,"file":"validation-messages.cjs","names":[],"sources":["../../../components/ValidationMessages/ValidationMessages.vue"],"sourcesContent":["<template>\n <!-- Live region is always present so VoiceOver can detect mutations on a stable node (DLT-3430). -->\n <div\n :id=\"id\"\n aria-live=\"assertive\"\n class=\"base-input__messages d-validation-message__container\"\n data-qa=\"validation-messages-container\"\n >\n <template v-if=\"showMessages\">\n <div\n v-for=\"({ message, type }, index) in filteredValidationMessages\"\n :key=\"getMessageKey(type, index)\"\n data-qa=\"validation-message\"\n :class=\"[\n 'base-input__message',\n 'd-validation-message',\n messageTypeClass(type),\n ]\"\n >\n <!-- @slot icon — replaces the default per-type DtIcon. Slot content must be a Dialtone icon (carries\n the `d-icon` class) so the CSS pseudo-element fallback suppresses correctly. Receives { type } scope. -->\n <slot\n name=\"icon\"\n :type=\"type\"\n >\n <component\n :is=\"iconForType(type)\"\n :class=\"['d-validation-message__icon', iconClass]\"\n data-qa=\"validation-message-icon\"\n size=\"300\"\n />\n </slot>\n <p v-html=\"message\" />\n </div>\n </template>\n </div>\n</template>\n\n<script>\nimport { validationMessageValidator } from '@/common/validators';\nimport {\n getUniqueString,\n filterFormattedMessages,\n getValidationState,\n} from '@/common/utils';\nimport {\n DtIconAlertTriangle,\n DtIconAlertCircle,\n DtIconCheckCircle,\n DtIconInfo,\n} from '@dialpad/dialtone-icons/vue';\n\nconst kindToIcon = Object.freeze({\n warning: DtIconAlertTriangle,\n critical: DtIconAlertCircle,\n positive: DtIconCheckCircle,\n info: DtIconInfo,\n});\n\n/**\n * Validation messages are used to convey information to the user about the current state of the input element.\n * These messages can have a critical, warning, positive, or info type.\n * @see https://dialtone.dialpad.com/components/validation_messages.html\n */\nexport default {\n name: 'DtValidationMessages',\n\n components: { DtIconAlertTriangle, DtIconAlertCircle, DtIconCheckCircle, DtIconInfo },\n\n props: {\n /**\n * The id of the validation message\n */\n id: {\n type: String,\n default () {\n return getUniqueString();\n },\n },\n\n /**\n * Array of validation messages. Each message has the following structure:\n * `{ message: \"Some informative message\", type: \"critical|warning|positive|info\"}`\n */\n validationMessages: {\n type: Array,\n default: () => [],\n validator: messages => validationMessageValidator(messages),\n },\n\n /**\n * Show Validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Additional class name for the icon wrapper element.\n */\n iconClass: {\n type: [String, Array, Object],\n default: '',\n },\n },\n\n computed: {\n filteredValidationMessages () {\n return filterFormattedMessages(this.validationMessages);\n },\n\n validationState () {\n return getValidationState(this.validationMessages);\n },\n },\n\n methods: {\n getMessageKey (type, index) {\n return `validation-message-${type}-${index}-${this.id}`;\n },\n\n iconForType (type) {\n return kindToIcon[type] ?? null;\n },\n\n messageTypeClass (type) {\n const messageTypesClasses = {\n critical: 'base-input__message--critical d-validation-message--critical',\n warning: 'base-input__message--warning d-validation-message--warning',\n positive: 'base-input__message--positive d-validation-message--positive',\n info: 'base-input__message--info d-validation-message--info',\n };\n\n return messageTypesClasses[type];\n },\n },\n};\n</script>\n"],"mappings":"sVAoDA,IAAM,EAAa,OAAO,OAAO,CAC/B,QAAS,EAAA,oBACT,SAAU,EAAA,kBACV,SAAU,EAAA,kBACV,KAAM,EAAA,WACP,CAAC,CAOG,EAAU,CACb,KAAM,uBAEN,WAAY,CAAE,oBAAA,EAAA,oBAAqB,kBAAA,EAAA,kBAAmB,kBAAA,EAAA,kBAAmB,WAAA,EAAA,WAAY,CAErF,MAAO,CAIL,GAAI,CACF,KAAM,OACN,SAAW,CACT,OAAO,EAAA,GAAiB,EAE3B,CAMD,mBAAoB,CAClB,KAAM,MACN,YAAe,EAAE,CACjB,UAAW,GAAY,EAAA,2BAA2B,EAAS,CAC5D,CAMD,aAAc,CACZ,KAAM,QACN,QAAS,GACV,CAKD,UAAW,CACT,KAAM,CAAC,OAAQ,MAAO,OAAO,CAC7B,QAAS,GACV,CACF,CAED,SAAU,CACR,4BAA8B,CAC5B,OAAO,EAAA,EAAwB,KAAK,mBAAmB,EAGzD,iBAAmB,CACjB,OAAO,EAAA,EAAmB,KAAK,mBAAmB,EAErD,CAED,QAAS,CACP,cAAe,EAAM,EAAO,CAC1B,MAAO,sBAAsB,EAAK,GAAG,EAAM,GAAG,KAAK,MAGrD,YAAa,EAAM,CACjB,OAAO,EAAW,IAAS,MAG7B,iBAAkB,EAAM,CAQtB,MAP4B,CAC1B,SAAU,+DACV,QAAS,6DACT,SAAU,+DACV,KAAM,uDACP,CAE0B,IAE9B,CACF,mGAvGO,MAAA,CAhCH,GAAI,EAAA,GACL,YAAU,YACV,MAAM,uDACN,UAAQ,kCAEQ,EAAA,eAAA,EAAA,EAAA,WAAA,GAAA,EAAA,EAAA,EAAA,oBAyBR,EAAA,SAAA,CAAA,IAAA,EAAA,EAAA,EAAA,EAAA,YAvBiC,EAAA,4BAA0B,CAArD,UAAS,QAAQ,gDAuBvB,MAAA,CAtBH,IAAK,EAAA,cAAc,EAAM,EAAK,CAC/B,UAAQ,qBACP,OAAA,EAAA,EAAA,gBAAK,8CAAiF,EAAA,iBAAiB,EAAI,sBAkBrG,EAAA,OAAA,OAAA,CARE,OAAI,KAQN,GAAA,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,cAAA,EAAA,EAAA,yBALE,EAAA,YAAY,EAAI,CAAA,CAAA,CACpB,OAAA,EAAA,EAAA,gBAAK,CAAA,6BAAiC,EAAA,UAAS,CAAA,CAChD,UAAQ,0BACR,KAAK,qDAGa,IAAA,CAAnB,UAAQ,EAAO,CAAA,KAAA,EAAA,EAAA,CAAA,CAAA,EAAA"}
@@ -1,6 +1,6 @@
1
1
  import { validationMessageValidator as e } from "../../common/validators/index.js";
2
- import { filterFormattedMessages as t, getUniqueString as n, getValidationState as r } from "../../common/utils/index.js";
3
- import { t as i } from "../../_plugin-vue_export-helper-BTgDAbhb.js";
2
+ import { h as t, m as n, s as r } from "../../utils-BL_SrwnF.js";
3
+ import { t as i } from "../../_plugin-vue_export-helper-BecorN_g.js";
4
4
  import { Fragment as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, normalizeClass as u, openBlock as d, renderList as f, renderSlot as p, resolveDynamicComponent as m } from "vue";
5
5
  import { DtIconAlertCircle as h, DtIconAlertTriangle as g, DtIconCheckCircle as _, DtIconInfo as v } from "@dialpad/dialtone-icons/vue";
6
6
  //#region components/ValidationMessages/ValidationMessages.vue
@@ -44,10 +44,10 @@ var y = Object.freeze({
44
44
  },
45
45
  computed: {
46
46
  filteredValidationMessages() {
47
- return t(this.validationMessages);
47
+ return r(this.validationMessages);
48
48
  },
49
49
  validationState() {
50
- return r(this.validationMessages);
50
+ return t(this.validationMessages);
51
51
  }
52
52
  },
53
53
  methods: {
@@ -11,4 +11,4 @@ var e = Object.values({
11
11
  //#endregion
12
12
  export { e as n, t };
13
13
 
14
- //# sourceMappingURL=mode_constants-tb7TL85q.js.map
14
+ //# sourceMappingURL=mode_constants-B8_1b5T8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mode_constants-tb7TL85q.js","names":[],"sources":["../common/mode_constants.js"],"sourcesContent":["export const CONTENT_MODE_TYPES = {\n LIGHT: 'light',\n DARK: 'dark',\n INVERT: 'invert',\n};\n\nexport const CONTENT_MODE_VALUES = Object.values(CONTENT_MODE_TYPES);\n\n/**\n * Shared prop definition for the contentMode prop.\n * Use in pass-through components that forward to an inner component with the ModeMixin.\n */\nexport const CONTENT_MODE_PROP = {\n type: String,\n default: null,\n validator: (v) => v === null || CONTENT_MODE_VALUES.includes(v),\n};\n\n/**\n * Shared Storybook argType for the contentMode prop.\n */\nexport const CONTENT_MODE_ARG_TYPE = {\n options: [null, ...CONTENT_MODE_VALUES],\n control: {\n type: 'select',\n labels: { null: '(none)' },\n },\n table: {\n category: 'props',\n defaultValue: { summary: 'null' },\n },\n};\n\nexport default {\n CONTENT_MODE_TYPES,\n CONTENT_MODE_VALUES,\n CONTENT_MODE_PROP,\n CONTENT_MODE_ARG_TYPE,\n};\n"],"mappings":"AAMA,IAAa,IAAsB,OAAO,OANR;CAChC,OAAO;CACP,MAAM;CACN,QAAQ;CACT,CAEmE,EAMvD,IAAoB;CAC/B,MAAM;CACN,SAAS;CACT,YAAY,MAAM,MAAM,QAAQ,EAAoB,SAAS,EAAE;CAChE;AAMU,CAAO,GAAG,EAAoB"}
1
+ {"version":3,"file":"mode_constants-B8_1b5T8.js","names":[],"sources":["../common/mode_constants.js"],"sourcesContent":["export const CONTENT_MODE_TYPES = {\n LIGHT: 'light',\n DARK: 'dark',\n INVERT: 'invert',\n};\n\nexport const CONTENT_MODE_VALUES = Object.values(CONTENT_MODE_TYPES);\n\n/**\n * Shared prop definition for the contentMode prop.\n * Use in pass-through components that forward to an inner component with the ModeMixin.\n */\nexport const CONTENT_MODE_PROP = {\n type: String,\n default: null,\n validator: (v) => v === null || CONTENT_MODE_VALUES.includes(v),\n};\n\n/**\n * Shared Storybook argType for the contentMode prop.\n */\nexport const CONTENT_MODE_ARG_TYPE = {\n options: [null, ...CONTENT_MODE_VALUES],\n control: {\n type: 'select',\n labels: { null: '(none)' },\n },\n table: {\n category: 'props',\n defaultValue: { summary: 'null' },\n },\n};\n\nexport default {\n CONTENT_MODE_TYPES,\n CONTENT_MODE_VALUES,\n CONTENT_MODE_PROP,\n CONTENT_MODE_ARG_TYPE,\n};\n"],"mappings":"AAMA,IAAa,IAAsB,OAAO,OANR;CAChC,OAAO;CACP,MAAM;CACN,QAAQ;CACT,CAEmE,EAMvD,IAAoB;CAC/B,MAAM;CACN,SAAS;CACT,YAAY,MAAM,MAAM,QAAQ,EAAoB,SAAS,EAAE;CAChE;AAMU,CAAO,GAAG,EAAoB"}
@@ -1,2 +1,2 @@
1
1
  var e=Object.values({LIGHT:`light`,DARK:`dark`,INVERT:`invert`}),t={type:String,default:null,validator:t=>t===null||e.includes(t)};[...e],Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return t}});
2
- //# sourceMappingURL=mode_constants-CzYJW9ua.cjs.map
2
+ //# sourceMappingURL=mode_constants-DM0SVbFM.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"mode_constants-CzYJW9ua.cjs","names":[],"sources":["../common/mode_constants.js"],"sourcesContent":["export const CONTENT_MODE_TYPES = {\n LIGHT: 'light',\n DARK: 'dark',\n INVERT: 'invert',\n};\n\nexport const CONTENT_MODE_VALUES = Object.values(CONTENT_MODE_TYPES);\n\n/**\n * Shared prop definition for the contentMode prop.\n * Use in pass-through components that forward to an inner component with the ModeMixin.\n */\nexport const CONTENT_MODE_PROP = {\n type: String,\n default: null,\n validator: (v) => v === null || CONTENT_MODE_VALUES.includes(v),\n};\n\n/**\n * Shared Storybook argType for the contentMode prop.\n */\nexport const CONTENT_MODE_ARG_TYPE = {\n options: [null, ...CONTENT_MODE_VALUES],\n control: {\n type: 'select',\n labels: { null: '(none)' },\n },\n table: {\n category: 'props',\n defaultValue: { summary: 'null' },\n },\n};\n\nexport default {\n CONTENT_MODE_TYPES,\n CONTENT_MODE_VALUES,\n CONTENT_MODE_PROP,\n CONTENT_MODE_ARG_TYPE,\n};\n"],"mappings":"AAMA,IAAa,EAAsB,OAAO,OANR,CAChC,MAAO,QACP,KAAM,OACN,OAAQ,SACT,CAEmE,CAMvD,EAAoB,CAC/B,KAAM,OACN,QAAS,KACT,UAAY,GAAM,IAAM,MAAQ,EAAoB,SAAS,EAAE,CAChE,CAMU,CAAO,GAAG,EAAoB"}
1
+ {"version":3,"file":"mode_constants-DM0SVbFM.cjs","names":[],"sources":["../common/mode_constants.js"],"sourcesContent":["export const CONTENT_MODE_TYPES = {\n LIGHT: 'light',\n DARK: 'dark',\n INVERT: 'invert',\n};\n\nexport const CONTENT_MODE_VALUES = Object.values(CONTENT_MODE_TYPES);\n\n/**\n * Shared prop definition for the contentMode prop.\n * Use in pass-through components that forward to an inner component with the ModeMixin.\n */\nexport const CONTENT_MODE_PROP = {\n type: String,\n default: null,\n validator: (v) => v === null || CONTENT_MODE_VALUES.includes(v),\n};\n\n/**\n * Shared Storybook argType for the contentMode prop.\n */\nexport const CONTENT_MODE_ARG_TYPE = {\n options: [null, ...CONTENT_MODE_VALUES],\n control: {\n type: 'select',\n labels: { null: '(none)' },\n },\n table: {\n category: 'props',\n defaultValue: { summary: 'null' },\n },\n};\n\nexport default {\n CONTENT_MODE_TYPES,\n CONTENT_MODE_VALUES,\n CONTENT_MODE_PROP,\n CONTENT_MODE_ARG_TYPE,\n};\n"],"mappings":"AAMA,IAAa,EAAsB,OAAO,OANR,CAChC,MAAO,QACP,KAAM,OACN,OAAQ,SACT,CAEmE,CAMvD,EAAoB,CAC/B,KAAM,OACN,QAAS,KACT,UAAY,GAAM,IAAM,MAAQ,EAAoB,SAAS,EAAE,CAChE,CAMU,CAAO,GAAG,EAAoB"}
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../chunk-Bmb41Sf3.cjs`);const e=require(`../_plugin-vue_export-helper-D8jCH6HB.cjs`),t=require(`../localization/index.cjs`),n=require(`../lib/button/button.cjs`);let r=require(`vue`);var i={name:`SrOnlyCloseButton`,components:{DtIconClose:require(`@dialpad/dialtone-icons/vue`).DtIconClose,DtButton:n.default},emits:[`close`],data(){return{i18n:new t.DialtoneLocalization}},computed:{closeButtonTitle(){return this.i18n.$t(`DIALTONE_CLOSE_BUTTON`)}},methods:{close(){this.$emit(`close`)}}};function a(e,t,n,i,a,o){let s=(0,r.resolveComponent)(`dt-icon-close`),c=(0,r.resolveComponent)(`dt-button`);return(0,r.openBlock)(),(0,r.createBlock)(c,{id:`sr-only-close-button`,"data-qa":`dt-sr-only-close-button`,class:`d-vi-visible-sr`,"aria-label":o.closeButtonTitle,title:o.closeButtonTitle,onClick:o.close,onKeydown:(0,r.withKeys)((0,r.withModifiers)(o.close,[`prevent`,`stop`]),[`space`])},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(s)]),_:1},8,[`aria-label`,`title`,`onClick`,`onKeydown`])}var o=e.t(i,[[`render`,a]]);exports.default=o;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../chunk-Bmb41Sf3.cjs`);const e=require(`../_plugin-vue_export-helper-CX7YVcP6.cjs`),t=require(`../localization/index.cjs`),n=require(`../lib/button/button.cjs`);let r=require(`vue`);var i={name:`SrOnlyCloseButton`,components:{DtIconClose:require(`@dialpad/dialtone-icons/vue`).DtIconClose,DtButton:n.default},emits:[`close`],data(){return{i18n:new t.DialtoneLocalization}},computed:{closeButtonTitle(){return this.i18n.$t(`DIALTONE_CLOSE_BUTTON`)}},methods:{close(){this.$emit(`close`)}}};function a(e,t,n,i,a,o){let s=(0,r.resolveComponent)(`dt-icon-close`),c=(0,r.resolveComponent)(`dt-button`);return(0,r.openBlock)(),(0,r.createBlock)(c,{id:`sr-only-close-button`,"data-qa":`dt-sr-only-close-button`,class:`d-vi-visible-sr`,"aria-label":o.closeButtonTitle,title:o.closeButtonTitle,onClick:o.close,onKeydown:(0,r.withKeys)((0,r.withModifiers)(o.close,[`prevent`,`stop`]),[`space`])},{default:(0,r.withCtx)(()=>[(0,r.createVNode)(s)]),_:1},8,[`aria-label`,`title`,`onClick`,`onKeydown`])}var o=e.t(i,[[`render`,a]]);exports.default=o;
2
2
  //# sourceMappingURL=sr_only_close_button.cjs.map
@@ -1,4 +1,4 @@
1
- import { t as e } from "../_plugin-vue_export-helper-BTgDAbhb.js";
1
+ import { t as e } from "../_plugin-vue_export-helper-BecorN_g.js";
2
2
  import { DialtoneLocalization as t } from "../localization/index.js";
3
3
  import n from "../lib/button/button.js";
4
4
  import { createBlock as r, createVNode as i, openBlock as a, resolveComponent as o, withCtx as s, withKeys as c, withModifiers as l } from "vue";