@dialpad/dialtone-vue 4.10.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 (432) hide show
  1. package/dist/{Combobox-DP8tbe6x.js → Combobox-BKj61IcR.js} +5 -5
  2. package/dist/{Combobox-DP8tbe6x.js.map → Combobox-BKj61IcR.js.map} +1 -1
  3. package/dist/Combobox-BOGcBq-6.cjs +3 -0
  4. package/dist/{Combobox-DdBIRmeH.cjs.map → Combobox-BOGcBq-6.cjs.map} +1 -1
  5. package/dist/{Datepicker-CNFVUyyK.js → Datepicker-DOSIyo8a.js} +39 -39
  6. package/dist/{Datepicker-CNFVUyyK.js.map → Datepicker-DOSIyo8a.js.map} +1 -1
  7. package/dist/Datepicker-DfdVsVb9.cjs +2 -0
  8. package/dist/{Datepicker-Df6uR0r_.cjs.map → Datepicker-DfdVsVb9.cjs.map} +1 -1
  9. package/dist/{EmojiPicker-B7AKJlAM.js → EmojiPicker-B_ZVTdOY.js} +2 -2
  10. package/dist/{EmojiPicker-B7AKJlAM.js.map → EmojiPicker-B_ZVTdOY.js.map} +1 -1
  11. package/dist/EmojiPicker-DS8XmAHV.cjs +2 -0
  12. package/dist/{EmojiPicker-KbIfc-GH.cjs.map → EmojiPicker-DS8XmAHV.cjs.map} +1 -1
  13. package/dist/FilterPill-BmYe_SsY.cjs +2 -0
  14. package/dist/{FilterPill-DwapR9JK.cjs.map → FilterPill-BmYe_SsY.cjs.map} +1 -1
  15. package/dist/{FilterPill-BR7FAmMG.js → FilterPill-C4TXD8Tl.js} +5 -5
  16. package/dist/{FilterPill-BR7FAmMG.js.map → FilterPill-C4TXD8Tl.js.map} +1 -1
  17. package/dist/{ForceLinkify-D4FBhBxD.cjs → ForceLinkify-BMmlUc8Q.cjs} +1 -1
  18. package/dist/{ForceLinkify-D4FBhBxD.cjs.map → ForceLinkify-BMmlUc8Q.cjs.map} +1 -1
  19. package/dist/{ForceLinkify-wTXS_wJS.js → ForceLinkify-Cw3Q1Nn7.js} +1 -1
  20. package/dist/{ForceLinkify-wTXS_wJS.js.map → ForceLinkify-Cw3Q1Nn7.js.map} +1 -1
  21. package/dist/{MarkdownRenderer-3CVbodrq.js → MarkdownRenderer-BR-fbldH.js} +1 -1
  22. package/dist/{MarkdownRenderer-3CVbodrq.js.map → MarkdownRenderer-BR-fbldH.js.map} +1 -1
  23. package/dist/{MarkdownRenderer-CaBjENW6.cjs → MarkdownRenderer-CH4L8Evn.cjs} +1 -1
  24. package/dist/{MarkdownRenderer-CaBjENW6.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-F6PU5oKB.js → Resizable-BkijqucD.js} +3 -3
  34. package/dist/{Resizable-F6PU5oKB.js.map → Resizable-BkijqucD.js.map} +1 -1
  35. package/dist/{Resizable-BQsHIvDC.cjs → Resizable-DQoUk81S.cjs} +2 -2
  36. package/dist/{Resizable-BQsHIvDC.cjs.map → Resizable-DQoUk81S.cjs.map} +1 -1
  37. package/dist/{ResizableHandle-VBoudEYy.cjs → ResizableHandle-D2gZ6dg5.cjs} +2 -2
  38. package/dist/{ResizableHandle-VBoudEYy.cjs.map → ResizableHandle-D2gZ6dg5.cjs.map} +1 -1
  39. package/dist/{ResizableHandle-CqIIQvza.js → ResizableHandle-MDdaNR_t.js} +3 -3
  40. package/dist/{ResizableHandle-CqIIQvza.js.map → ResizableHandle-MDdaNR_t.js.map} +1 -1
  41. package/dist/{ResizableUtils-CZdVSd6q.cjs → ResizableUtils-CXU7o9pL.cjs} +1 -1
  42. package/dist/{ResizableUtils-CZdVSd6q.cjs.map → ResizableUtils-CXU7o9pL.cjs.map} +1 -1
  43. package/dist/{ResizableUtils-CrBOa8js.js → ResizableUtils-ChIk3Blc.js} +1 -1
  44. package/dist/{ResizableUtils-CrBOa8js.js.map → ResizableUtils-ChIk3Blc.js.map} +1 -1
  45. package/dist/{RichTextEditor-DLiJCPI6.js → RichTextEditor-BIcaFJQp.js} +15 -15
  46. package/dist/{RichTextEditor-DLiJCPI6.js.map → RichTextEditor-BIcaFJQp.js.map} +1 -1
  47. package/dist/RichTextEditor-D6kCBnLJ.cjs +11 -0
  48. package/dist/{RichTextEditor-ECmStZDK.cjs.map → RichTextEditor-D6kCBnLJ.cjs.map} +1 -1
  49. package/dist/{Scroller-D6f0HvIT.js → Scroller-D6LZtmkL.js} +3 -3
  50. package/dist/{Scroller-D6f0HvIT.js.map → Scroller-D6LZtmkL.js.map} +1 -1
  51. package/dist/Scroller-eXc7l23J.cjs +2 -0
  52. package/dist/{Scroller-EIHN3a26.cjs.map → Scroller-eXc7l23J.cjs.map} +1 -1
  53. package/dist/Slider-B7O2M5_S.cjs +2 -0
  54. package/dist/{Slider-BDgY7gNR.cjs.map → Slider-B7O2M5_S.cjs.map} +1 -1
  55. package/dist/{Slider-Bg9KspmL.js → Slider-oJROUIMS.js} +7 -7
  56. package/dist/{Slider-Bg9KspmL.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-5MobHF6z.js → Text-CfiPqjL0.js} +4 -4
  60. package/dist/Text-CfiPqjL0.js.map +1 -0
  61. package/dist/{TextList-1_ZM5zE3.cjs → TextList-D3HHK2DW.cjs} +1 -1
  62. package/dist/{TextList-1_ZM5zE3.cjs.map → TextList-D3HHK2DW.cjs.map} +1 -1
  63. package/dist/{TextList-DIj84CPZ.js → TextList-DXEov7Ls.js} +1 -1
  64. package/dist/{TextList-DIj84CPZ.js.map → TextList-DXEov7Ls.js.map} +1 -1
  65. package/dist/TextListItem-C2Vc8Gnu.cjs +2 -0
  66. package/dist/{TextListItem-CVjrHr2_.cjs.map → TextListItem-C2Vc8Gnu.cjs.map} +1 -1
  67. package/dist/{TextListItem-BhmijfFO.js → TextListItem-CaFTtZ3G.js} +2 -2
  68. package/dist/{TextListItem-BhmijfFO.js.map → TextListItem-CaFTtZ3G.js.map} +1 -1
  69. package/dist/{Toast-4nsu1oxP.js → Toast-AGiQccuG.js} +3 -3
  70. package/dist/{Toast-4nsu1oxP.js.map → Toast-AGiQccuG.js.map} +1 -1
  71. package/dist/Toast-DImJ0PkZ.cjs +2 -0
  72. package/dist/{Toast--W8p7jzA.cjs.map → Toast-DImJ0PkZ.cjs.map} +1 -1
  73. package/dist/{UseResizableCalculations-CahDXDOn.cjs → UseResizableCalculations-D4xVxWje.cjs} +2 -2
  74. package/dist/{UseResizableCalculations-CahDXDOn.cjs.map → UseResizableCalculations-D4xVxWje.cjs.map} +1 -1
  75. package/dist/{UseResizableCalculations-B-yTU9ZI.js → UseResizableCalculations-DTxD7NKO.js} +2 -2
  76. package/dist/{UseResizableCalculations-B-yTU9ZI.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/ComboboxWithPopover/ComboboxWithPopover.vue.d.ts +1 -0
  114. package/dist/components/ComboboxWithPopover/ComboboxWithPopover.vue.d.ts.map +1 -1
  115. package/dist/components/Dropdown/Dropdown.vue.d.ts +1 -0
  116. package/dist/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
  117. package/dist/components/FilterPill/FilterPill.vue.d.ts +2 -0
  118. package/dist/components/FilterPill/FilterPill.vue.d.ts.map +1 -1
  119. package/dist/components/Hovercard/Hovercard.vue.d.ts +4 -0
  120. package/dist/components/Hovercard/Hovercard.vue.d.ts.map +1 -1
  121. package/dist/components/Modal/Modal.vue.d.ts.map +1 -1
  122. package/dist/components/Popover/Popover.vue.d.ts +1 -0
  123. package/dist/components/Popover/Popover.vue.d.ts.map +1 -1
  124. package/dist/components/ProgressBar/ProgressBar.vue.d.ts +66 -0
  125. package/dist/components/ProgressBar/ProgressBar.vue.d.ts.map +1 -0
  126. package/dist/components/ProgressBar/ProgressBarConstants.d.ts +18 -0
  127. package/dist/components/ProgressBar/ProgressBarConstants.d.ts.map +1 -0
  128. package/dist/components/ProgressBar/index.d.ts +3 -0
  129. package/dist/components/ProgressBar/index.d.ts.map +1 -0
  130. package/dist/components/ProgressCircle/ProgressCircle.vue.d.ts +41 -9
  131. package/dist/components/RichTextEditor/Extensions/Variable/VariableComponent.vue.d.ts +1 -0
  132. package/dist/components/RichTextEditor/Extensions/Variable/VariableComponent.vue.d.ts.map +1 -1
  133. package/dist/components/SegmentedControl/SegmentedControlItem.vue.d.ts +10 -0
  134. package/dist/components/SegmentedControl/SegmentedControlItem.vue.d.ts.map +1 -1
  135. package/dist/components/SplitButton/SplitButton.vue.d.ts +1 -0
  136. package/dist/components/SplitButton/SplitButton.vue.d.ts.map +1 -1
  137. package/dist/components/Tab/Tab.vue.d.ts +18 -0
  138. package/dist/components/Tab/Tab.vue.d.ts.map +1 -1
  139. package/dist/components/Tab/TabGroup.vue.d.ts +3 -1
  140. package/dist/components/Tab/TabGroup.vue.d.ts.map +1 -1
  141. package/dist/components/Text/modules/slide.d.ts.map +1 -1
  142. package/dist/components/Tooltip/Tooltip.vue.d.ts.map +1 -1
  143. package/dist/dialtone-vue.cjs +1 -1
  144. package/dist/dialtone-vue.js +51 -49
  145. package/dist/{floating-ui.dom-Cqf6X2Wc.js → floating-ui.dom-CuL5LTgX.js} +1 -1
  146. package/dist/{floating-ui.dom-Cqf6X2Wc.js.map → floating-ui.dom-CuL5LTgX.js.map} +1 -1
  147. package/dist/{floating-ui.dom-n1CheoWj.cjs → floating-ui.dom-S7QIcAlj.cjs} +1 -1
  148. package/dist/{floating-ui.dom-n1CheoWj.cjs.map → floating-ui.dom-S7QIcAlj.cjs.map} +1 -1
  149. package/dist/index.d.ts +1 -0
  150. package/dist/lib/avatar/avatar.cjs +1 -1
  151. package/dist/lib/avatar/avatar.cjs.map +1 -1
  152. package/dist/lib/avatar/avatar.js +7 -7
  153. package/dist/lib/badge/badge.cjs +1 -1
  154. package/dist/lib/badge/badge.cjs.map +1 -1
  155. package/dist/lib/badge/badge.js +2 -2
  156. package/dist/lib/banner/banner.cjs +1 -1
  157. package/dist/lib/banner/banner.cjs.map +1 -1
  158. package/dist/lib/banner/banner.js +2 -2
  159. package/dist/lib/breadcrumbs/breadcrumb-item.cjs +1 -1
  160. package/dist/lib/breadcrumbs/breadcrumb-item.cjs.map +1 -1
  161. package/dist/lib/breadcrumbs/breadcrumb-item.js +2 -2
  162. package/dist/lib/breadcrumbs/breadcrumbs.cjs +1 -1
  163. package/dist/lib/breadcrumbs/breadcrumbs.js +1 -1
  164. package/dist/lib/button/button.cjs +1 -1
  165. package/dist/lib/button/button.cjs.map +1 -1
  166. package/dist/lib/button/button.js +6 -6
  167. package/dist/lib/button/button.js.map +1 -1
  168. package/dist/lib/button-group/button-group.cjs +1 -1
  169. package/dist/lib/button-group/button-group.js +1 -1
  170. package/dist/lib/button-group/buttons-decorator.cjs +1 -1
  171. package/dist/lib/button-group/buttons-decorator.js +1 -1
  172. package/dist/lib/card/card.cjs +1 -1
  173. package/dist/lib/card/card.cjs.map +1 -1
  174. package/dist/lib/card/card.js +2 -2
  175. package/dist/lib/checkbox/checkbox.cjs +1 -1
  176. package/dist/lib/checkbox/checkbox.cjs.map +1 -1
  177. package/dist/lib/checkbox/checkbox.js +5 -5
  178. package/dist/lib/checkbox-group/checkboxes-decorator.cjs +1 -1
  179. package/dist/lib/checkbox-group/checkboxes-decorator.js +1 -1
  180. package/dist/lib/chip/chip.cjs +1 -1
  181. package/dist/lib/chip/chip.cjs.map +1 -1
  182. package/dist/lib/chip/chip.js +4 -4
  183. package/dist/lib/codeblock/codeblock.cjs +1 -1
  184. package/dist/lib/codeblock/codeblock.js +1 -1
  185. package/dist/lib/collapsible/collapsible-lazy-show.cjs +1 -1
  186. package/dist/lib/collapsible/collapsible-lazy-show.js +1 -1
  187. package/dist/lib/collapsible/collapsible.cjs +1 -1
  188. package/dist/lib/collapsible/collapsible.cjs.map +1 -1
  189. package/dist/lib/collapsible/collapsible.js +4 -4
  190. package/dist/lib/combobox/combobox-empty-list.cjs +1 -1
  191. package/dist/lib/combobox/combobox-empty-list.js +1 -1
  192. package/dist/lib/combobox/combobox-loading-list.cjs +1 -1
  193. package/dist/lib/combobox/combobox-loading-list.js +1 -1
  194. package/dist/lib/combobox/combobox.cjs +1 -1
  195. package/dist/lib/combobox/combobox.js +1 -1
  196. package/dist/lib/combobox/index.cjs +1 -1
  197. package/dist/lib/combobox/index.js +1 -1
  198. package/dist/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  199. package/dist/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  200. package/dist/lib/combobox-multi-select/combobox-multi-select.js +8 -8
  201. package/dist/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
  202. package/dist/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
  203. package/dist/lib/combobox-with-popover/combobox-with-popover.js +7 -7
  204. package/dist/lib/datepicker/datepicker.cjs +1 -1
  205. package/dist/lib/datepicker/datepicker.js +1 -1
  206. package/dist/lib/datepicker/index.cjs +1 -1
  207. package/dist/lib/datepicker/index.js +1 -1
  208. package/dist/lib/description-list/description-list.cjs +1 -1
  209. package/dist/lib/description-list/description-list.js +1 -1
  210. package/dist/lib/dropdown/dropdown-list.cjs +1 -1
  211. package/dist/lib/dropdown/dropdown-list.js +2 -2
  212. package/dist/lib/dropdown/dropdown-separator.cjs +1 -1
  213. package/dist/lib/dropdown/dropdown-separator.js +1 -1
  214. package/dist/lib/dropdown/dropdown.cjs +1 -1
  215. package/dist/lib/dropdown/dropdown.cjs.map +1 -1
  216. package/dist/lib/dropdown/dropdown.js +3 -3
  217. package/dist/lib/dropdown/dropdown.js.map +1 -1
  218. package/dist/lib/emoji/emoji.cjs +1 -1
  219. package/dist/lib/emoji/emoji.js +1 -1
  220. package/dist/lib/emoji-picker/emoji-picker.cjs +1 -1
  221. package/dist/lib/emoji-picker/emoji-picker.js +1 -1
  222. package/dist/lib/emoji-picker/index.cjs +1 -1
  223. package/dist/lib/emoji-picker/index.js +1 -1
  224. package/dist/lib/empty-state/empty-state.cjs +1 -1
  225. package/dist/lib/empty-state/empty-state.cjs.map +1 -1
  226. package/dist/lib/empty-state/empty-state.js +2 -2
  227. package/dist/lib/filter-pill/filter-pill-controlled.cjs +1 -1
  228. package/dist/lib/filter-pill/filter-pill-controlled.cjs.map +1 -1
  229. package/dist/lib/filter-pill/filter-pill-controlled.js +1 -1
  230. package/dist/lib/filter-pill/filter-pill.cjs +1 -1
  231. package/dist/lib/filter-pill/filter-pill.js +1 -1
  232. package/dist/lib/filter-pill/index.cjs +1 -1
  233. package/dist/lib/filter-pill/index.js +1 -1
  234. package/dist/lib/hovercard/hovercard.cjs +1 -1
  235. package/dist/lib/hovercard/hovercard.cjs.map +1 -1
  236. package/dist/lib/hovercard/hovercard.js +2 -2
  237. package/dist/lib/icon/icon.cjs +1 -1
  238. package/dist/lib/icon/icon.js +1 -1
  239. package/dist/lib/image-viewer/image-viewer.cjs +1 -1
  240. package/dist/lib/image-viewer/image-viewer.cjs.map +1 -1
  241. package/dist/lib/image-viewer/image-viewer.js +2 -2
  242. package/dist/lib/input/input.cjs +1 -1
  243. package/dist/lib/input/input.cjs.map +1 -1
  244. package/dist/lib/input/input.js +8 -8
  245. package/dist/lib/input-group/input-group.cjs +1 -1
  246. package/dist/lib/input-group/input-group.cjs.map +1 -1
  247. package/dist/lib/input-group/input-group.js +5 -5
  248. package/dist/lib/item-layout/item-layout.cjs +2 -2
  249. package/dist/lib/item-layout/item-layout.cjs.map +1 -1
  250. package/dist/lib/item-layout/item-layout.js +2 -2
  251. package/dist/lib/keyboard-shortcut/keyboard-shortcut.cjs +1 -1
  252. package/dist/lib/keyboard-shortcut/keyboard-shortcut.js +2 -2
  253. package/dist/lib/kitchen-sink/kitchen-sink-view.cjs +1 -1
  254. package/dist/lib/kitchen-sink/kitchen-sink-view.js +2 -2
  255. package/dist/lib/lazy-show/lazy-show.cjs +1 -1
  256. package/dist/lib/lazy-show/lazy-show.js +1 -1
  257. package/dist/lib/link/link.cjs +1 -1
  258. package/dist/lib/link/link.js +1 -1
  259. package/dist/lib/list-item/list-item.cjs +1 -1
  260. package/dist/lib/list-item/list-item.cjs.map +1 -1
  261. package/dist/lib/list-item/list-item.js +2 -2
  262. package/dist/lib/list-item-group/list-item-group.cjs +1 -1
  263. package/dist/lib/list-item-group/list-item-group.cjs.map +1 -1
  264. package/dist/lib/list-item-group/list-item-group.js +2 -2
  265. package/dist/lib/loader/loader.cjs +1 -1
  266. package/dist/lib/loader/loader.js +1 -1
  267. package/dist/lib/modal/modal.cjs +1 -1
  268. package/dist/lib/modal/modal.cjs.map +1 -1
  269. package/dist/lib/modal/modal.js +9 -9
  270. package/dist/lib/modal/modal.js.map +1 -1
  271. package/dist/lib/mode-directive/mode.cjs +1 -1
  272. package/dist/lib/mode-directive/mode.js +1 -1
  273. package/dist/lib/mode-island/mode-island.cjs +1 -1
  274. package/dist/lib/mode-island/mode-island.js +1 -1
  275. package/dist/lib/motion-text/motion-text.cjs +1 -1
  276. package/dist/lib/motion-text/motion-text.js +1 -1
  277. package/dist/lib/notice/notice-action.cjs +1 -1
  278. package/dist/lib/notice/notice-action.js +1 -1
  279. package/dist/lib/notice/notice-content.cjs +1 -1
  280. package/dist/lib/notice/notice-content.cjs.map +1 -1
  281. package/dist/lib/notice/notice-content.js +3 -3
  282. package/dist/lib/notice/notice-icon.cjs +1 -1
  283. package/dist/lib/notice/notice-icon.cjs.map +1 -1
  284. package/dist/lib/notice/notice-icon.js +2 -2
  285. package/dist/lib/notice/notice.cjs +1 -1
  286. package/dist/lib/notice/notice.js +1 -1
  287. package/dist/lib/pagination/pagination.cjs +1 -1
  288. package/dist/lib/pagination/pagination.js +1 -1
  289. package/dist/lib/popover/popover-header-footer.cjs +1 -1
  290. package/dist/lib/popover/popover-header-footer.cjs.map +1 -1
  291. package/dist/lib/popover/popover-header-footer.js +4 -4
  292. package/dist/lib/popover/popover.cjs +1 -1
  293. package/dist/lib/popover/popover.cjs.map +1 -1
  294. package/dist/lib/popover/popover.js +95 -82
  295. package/dist/lib/popover/popover.js.map +1 -1
  296. package/dist/lib/presence/index.cjs +1 -1
  297. package/dist/lib/presence/index.js +1 -1
  298. package/dist/lib/presence/presence.cjs +1 -1
  299. package/dist/lib/presence/presence.js +1 -1
  300. package/dist/lib/progress-bar/index.cjs +1 -0
  301. package/dist/lib/progress-bar/index.js +2 -0
  302. package/dist/lib/progress-bar/progress-bar.cjs +1 -0
  303. package/dist/lib/progress-bar/progress-bar.js +2 -0
  304. package/dist/lib/progress-circle/progress-circle.cjs +1 -1
  305. package/dist/lib/progress-circle/progress-circle.cjs.map +1 -1
  306. package/dist/lib/progress-circle/progress-circle.js +81 -42
  307. package/dist/lib/progress-circle/progress-circle.js.map +1 -1
  308. package/dist/lib/radio/radio.cjs +1 -1
  309. package/dist/lib/radio/radio.cjs.map +1 -1
  310. package/dist/lib/radio/radio.js +7 -7
  311. package/dist/lib/radio-group/radios-decorator.cjs +1 -1
  312. package/dist/lib/radio-group/radios-decorator.js +1 -1
  313. package/dist/lib/resizable/index.cjs +1 -1
  314. package/dist/lib/resizable/index.js +3 -3
  315. package/dist/lib/resizable/resizable-handle.cjs +1 -1
  316. package/dist/lib/resizable/resizable-handle.js +1 -1
  317. package/dist/lib/resizable/resizable-panel.cjs +1 -1
  318. package/dist/lib/resizable/resizable-panel.js +1 -1
  319. package/dist/lib/resizable/resizable.cjs +1 -1
  320. package/dist/lib/resizable/resizable.js +1 -1
  321. package/dist/lib/rich-text-editor/force-linkify.cjs +1 -1
  322. package/dist/lib/rich-text-editor/force-linkify.js +1 -1
  323. package/dist/lib/rich-text-editor/index.cjs +1 -1
  324. package/dist/lib/rich-text-editor/index.js +1 -1
  325. package/dist/lib/rich-text-editor/markdown-renderer.cjs +1 -1
  326. package/dist/lib/rich-text-editor/markdown-renderer.js +1 -1
  327. package/dist/lib/rich-text-editor/rich-text-editor.cjs +1 -1
  328. package/dist/lib/rich-text-editor/rich-text-editor.js +1 -1
  329. package/dist/lib/root-layout/root-layout.cjs +1 -1
  330. package/dist/lib/root-layout/root-layout.js +1 -1
  331. package/dist/lib/scroller/index.cjs +1 -1
  332. package/dist/lib/scroller/index.js +1 -1
  333. package/dist/lib/scroller/scroller.cjs +1 -1
  334. package/dist/lib/scroller/scroller.js +1 -1
  335. package/dist/lib/segmented-control/segmented-control-item.cjs +1 -1
  336. package/dist/lib/segmented-control/segmented-control-item.cjs.map +1 -1
  337. package/dist/lib/segmented-control/segmented-control-item.js +34 -4
  338. package/dist/lib/segmented-control/segmented-control-item.js.map +1 -1
  339. package/dist/lib/segmented-control/segmented-control.cjs +1 -1
  340. package/dist/lib/segmented-control/segmented-control.cjs.map +1 -1
  341. package/dist/lib/segmented-control/segmented-control.js +1 -1
  342. package/dist/lib/select-menu/select-menu.cjs +1 -1
  343. package/dist/lib/select-menu/select-menu.cjs.map +1 -1
  344. package/dist/lib/select-menu/select-menu.js +8 -8
  345. package/dist/lib/skeleton/skeleton-list-item.cjs +1 -1
  346. package/dist/lib/skeleton/skeleton-list-item.js +1 -1
  347. package/dist/lib/skeleton/skeleton-paragraph.cjs +1 -1
  348. package/dist/lib/skeleton/skeleton-paragraph.js +1 -1
  349. package/dist/lib/skeleton/skeleton-shape.cjs +1 -1
  350. package/dist/lib/skeleton/skeleton-shape.js +1 -1
  351. package/dist/lib/skeleton/skeleton-text.cjs +1 -1
  352. package/dist/lib/skeleton/skeleton-text.js +1 -1
  353. package/dist/lib/skeleton/skeleton.cjs +1 -1
  354. package/dist/lib/skeleton/skeleton.js +1 -1
  355. package/dist/lib/slider/index.cjs +1 -1
  356. package/dist/lib/slider/index.js +1 -1
  357. package/dist/lib/slider/slider.cjs +1 -1
  358. package/dist/lib/slider/slider.js +1 -1
  359. package/dist/lib/split-button/split-button-end.cjs +1 -1
  360. package/dist/lib/split-button/split-button-end.cjs.map +1 -1
  361. package/dist/lib/split-button/split-button-end.js +2 -2
  362. package/dist/lib/split-button/split-button-start.cjs +1 -1
  363. package/dist/lib/split-button/split-button-start.js +1 -1
  364. package/dist/lib/split-button/split-button.cjs +1 -1
  365. package/dist/lib/split-button/split-button.cjs.map +1 -1
  366. package/dist/lib/split-button/split-button.js +5 -5
  367. package/dist/lib/stack/stack.cjs +1 -1
  368. package/dist/lib/stack/stack.js +1 -1
  369. package/dist/lib/tab/tab-group.cjs +1 -1
  370. package/dist/lib/tab/tab-group.cjs.map +1 -1
  371. package/dist/lib/tab/tab-group.js +12 -4
  372. package/dist/lib/tab/tab-group.js.map +1 -1
  373. package/dist/lib/tab/tab-panel.cjs +1 -1
  374. package/dist/lib/tab/tab-panel.cjs.map +1 -1
  375. package/dist/lib/tab/tab-panel.js +2 -2
  376. package/dist/lib/tab/tab.cjs +1 -1
  377. package/dist/lib/tab/tab.cjs.map +1 -1
  378. package/dist/lib/tab/tab.js +36 -6
  379. package/dist/lib/tab/tab.js.map +1 -1
  380. package/dist/lib/text/index.cjs +1 -1
  381. package/dist/lib/text/index.js +1 -1
  382. package/dist/lib/text/text.cjs +1 -1
  383. package/dist/lib/text/text.js +1 -1
  384. package/dist/lib/text-list/index.cjs +1 -1
  385. package/dist/lib/text-list/index.js +2 -2
  386. package/dist/lib/text-list/text-list-item.cjs +1 -1
  387. package/dist/lib/text-list/text-list-item.js +1 -1
  388. package/dist/lib/text-list/text-list.cjs +1 -1
  389. package/dist/lib/text-list/text-list.js +1 -1
  390. package/dist/lib/toast/index.cjs +1 -1
  391. package/dist/lib/toast/index.js +1 -1
  392. package/dist/lib/toast/toast.cjs +1 -1
  393. package/dist/lib/toast/toast.js +1 -1
  394. package/dist/lib/toggle/toggle.cjs +1 -1
  395. package/dist/lib/toggle/toggle.cjs.map +1 -1
  396. package/dist/lib/toggle/toggle.js +4 -4
  397. package/dist/lib/tooltip/tooltip.cjs +1 -1
  398. package/dist/lib/tooltip/tooltip.cjs.map +1 -1
  399. package/dist/lib/tooltip/tooltip.js +6 -6
  400. package/dist/lib/tooltip/tooltip.js.map +1 -1
  401. package/dist/lib/tooltip-directive/tooltip.cjs +1 -1
  402. package/dist/lib/tooltip-directive/tooltip.cjs.map +1 -1
  403. package/dist/lib/tooltip-directive/tooltip.js +2 -2
  404. package/dist/lib/validation-messages/validation-messages.cjs +1 -1
  405. package/dist/lib/validation-messages/validation-messages.cjs.map +1 -1
  406. package/dist/lib/validation-messages/validation-messages.js +4 -4
  407. package/dist/{mode_constants-tb7TL85q.js → mode_constants-B8_1b5T8.js} +1 -1
  408. package/dist/{mode_constants-tb7TL85q.js.map → mode_constants-B8_1b5T8.js.map} +1 -1
  409. package/dist/{mode_constants-CzYJW9ua.cjs → mode_constants-DM0SVbFM.cjs} +1 -1
  410. package/dist/{mode_constants-CzYJW9ua.cjs.map → mode_constants-DM0SVbFM.cjs.map} +1 -1
  411. package/dist/shared/sr_only_close_button.cjs +1 -1
  412. package/dist/shared/sr_only_close_button.js +1 -1
  413. package/dist/utils-BL_SrwnF.js +172 -0
  414. package/dist/utils-BL_SrwnF.js.map +1 -0
  415. package/dist/utils-GofHWJKi.cjs +2 -0
  416. package/dist/{common/utils/index.js.map → utils-GofHWJKi.cjs.map} +1 -1
  417. package/package.json +6 -6
  418. package/dist/Combobox-DdBIRmeH.cjs +0 -3
  419. package/dist/Datepicker-Df6uR0r_.cjs +0 -2
  420. package/dist/EmojiPicker-KbIfc-GH.cjs +0 -2
  421. package/dist/FilterPill-DwapR9JK.cjs +0 -2
  422. package/dist/RichTextEditor-ECmStZDK.cjs +0 -11
  423. package/dist/Scroller-EIHN3a26.cjs +0 -2
  424. package/dist/Slider-BDgY7gNR.cjs +0 -2
  425. package/dist/Text-5MobHF6z.js.map +0 -1
  426. package/dist/Text-DNVNZree.cjs +0 -2
  427. package/dist/Text-DNVNZree.cjs.map +0 -1
  428. package/dist/TextListItem-CVjrHr2_.cjs +0 -2
  429. package/dist/Toast--W8p7jzA.cjs +0 -2
  430. package/dist/common/utils/index.cjs.map +0 -1
  431. /package/dist/{_plugin-vue_export-helper-BTgDAbhb.js → _plugin-vue_export-helper-BecorN_g.js} +0 -0
  432. /package/dist/{_plugin-vue_export-helper-D8jCH6HB.cjs → _plugin-vue_export-helper-CX7YVcP6.cjs} +0 -0
@@ -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;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;GACN,SAAS;GACV;EAgBD,WAAW;GACT,MAAM;GACN,SAAS;GACT,UAAW,GAAW;AACpB,WAAO,EAAmB,SAAS,EAAU;;GAEhD;EAiBD,QAAQ;GACN,MAAM,CAAC,SAAS,OAAO;GACvB,SAAS;GACT,YAAY,MACH,EAAsB,SAAS,EAAO;GAEhD;EAUD,UAAU;GACR,MAAM,CAAC,GAAmB,OAAO;GACjC,SAAS;GACT,YAAW,MACF,EAAyB,SAAS,EAAQ,IAC5C,aAAoB;GAE5B;EAOD,cAAc;GACZ,MAAM;IAAC;IAAQ;IAAQ;IAAM;GAC7B,SAAS;GACV;EAOD,aAAa;GACX,MAAM;IAAC;IAAQ;IAAQ;IAAM;GAC7B,SAAS;GACV;EAKD,SAAS;GACP,MAAM;GACN,SAAS;GACV;EAOD,SAAS;GACP,MAAM;GACN,SAAS;GACV;EAOD,MAAM;GACJ,MAAM,CAAC,SAAS,KAAK;GACrB,SAAS;GACV;EAKD,YAAY;GACV,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A,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;GACN,SAAS;GACV;EAgBD,WAAW;GACT,MAAM;GACN,SAAS;GACT,UAAW,GAAW;AACpB,WAAO,EAAmB,SAAS,EAAU;;GAEhD;EAiBD,QAAQ;GACN,MAAM,CAAC,SAAS,OAAO;GACvB,SAAS;GACT,YAAY,MACH,EAAsB,SAAS,EAAO;GAEhD;EAUD,UAAU;GACR,MAAM,CAAC,GAAmB,OAAO;GACjC,SAAS;GACT,YAAW,MACF,EAAyB,SAAS,EAAQ,IAC5C,aAAoB;GAE5B;EAOD,cAAc;GACZ,MAAM;IAAC;IAAQ;IAAQ;IAAM;GAC7B,SAAS;GACV;EAOD,aAAa;GACX,MAAM;IAAC;IAAQ;IAAQ;IAAM;GAC7B,SAAS;GACV;EAKD,SAAS;GACP,MAAM;GACN,SAAS;GACV;EAOD,SAAS;GACP,MAAM;GACN,SAAS;GACV;EAOD,MAAM;GACJ,MAAM,CAAC,SAAS,KAAK;GACrB,SAAS;GACV;EAKD,YAAY;GACV,MAAM;GACN,SAAS;GACV;EAMD,OAAO;GACL,MAAM;GACN,SAAS;GACV;EAKD,OAAO;GACL,MAAM;GACN,SAAS;GACV;EAOD,gBAAgB;GACd,MAAM;GACN,SAAS;GACV;EAMD,uBAAuB;GACrB,MAAM;GACN,SAAS;GACV;EACF;CAED,OAAO,CAOL,SAOA,cACD;CAED,OAA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.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,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,GAAG,MACzC,EAAA,EAAA,GAASA,EAAAA,QAAW,CAClB,IAAK,EACL,GAAG,EACH,OAAQ,EAAa,SAAW,IAAA,GAAkC,GAAtB,EAAa,OAIzD,MAAO,EAAa,QAAU,IAAA,GAAyB,QAAA,IAAA,WAAkC,OAA/C,EAAa,MACvD,sBAAuB,EACxB,CAAC,CACF,CACH,EAEJ,CAAC,CAEI,EAAa,SAAS,cAAc,MAAM,CAChD,SAAS,KAAK,YAAY,EAAW,CACrC,EAAsB,MAAM,EAAW,CAGzC,IAAM,EAAa,WAAW,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IONS"],"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,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,GAAiB,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,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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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";
@@ -0,0 +1,172 @@
1
+ import { DEFAULT_VALIDATION_MESSAGE_TYPE as e, VALIDATION_MESSAGE_TYPES as t } from "./common/constants/index.js";
2
+ import { Comment as n, Text as r, h as ee } from "vue";
3
+ //#region common/owned_classes.js
4
+ var i = /* @__PURE__ */ new WeakMap();
5
+ function a(e, t, n) {
6
+ let r = i.get(e);
7
+ r || (r = /* @__PURE__ */ new Map(), i.set(e, r)), !r.has(n) && (r.set(n, t), e.classList.add(t));
8
+ }
9
+ function o(e, t) {
10
+ let n = i.get(e), r = n?.get(t);
11
+ if (r) {
12
+ n.delete(t), n.size || i.delete(e);
13
+ for (let e of n.values()) if (e === r) return;
14
+ e.classList.remove(r);
15
+ }
16
+ }
17
+ function s(e) {
18
+ return i.has(e);
19
+ }
20
+ //#endregion
21
+ //#region common/utils/index.js
22
+ var c = 0, l, u = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]", d = typeof setImmediate == "function" ? setImmediate : setTimeout;
23
+ function f(e = "dt") {
24
+ return `${e}${c++}`;
25
+ }
26
+ function p(e, t) {
27
+ if (t) {
28
+ let n = m(t);
29
+ return e[Math.abs(n) % e.length];
30
+ } else return e[h(e.length)];
31
+ }
32
+ function m(e) {
33
+ let t;
34
+ for (let n = 0; n < e.length; n++) t = Math.imul(31, t) + e.charCodeAt(n) | 0;
35
+ return t;
36
+ }
37
+ function h(e) {
38
+ return Math.floor(Math.random() * e);
39
+ }
40
+ function g(t) {
41
+ return t ? t.map((t) => typeof t == "string" ? {
42
+ message: t,
43
+ type: e
44
+ } : t) : [];
45
+ }
46
+ function _(e) {
47
+ let t = v(e);
48
+ return !e || !t ? [] : e.filter((e) => !!e.message && e.type === t);
49
+ }
50
+ function v(e) {
51
+ return e ? y(e, t.CRITICAL) ? t.CRITICAL : y(e, t.WARNING) ? t.WARNING : y(e, t.POSITIVE) ? t.POSITIVE : y(e, t.INFO) ? t.INFO : null : null;
52
+ }
53
+ function y(e, t) {
54
+ return !e || !t ? !1 : e.some((e) => e?.type === t);
55
+ }
56
+ function b(e) {
57
+ return e?.querySelector(u);
58
+ }
59
+ var x = (e) => ee("div", { innerHTML: e.html }), S = () => new Promise((e) => {
60
+ d(e);
61
+ });
62
+ function C(e, t = {}) {
63
+ return e ? e(t).some((e) => e.type === n || Array.isArray(e.children) && !e.children.length ? !1 : e.type !== r || typeof e.children == "string" && e.children.trim() !== "") : !1;
64
+ }
65
+ var w = (e) => e?.toLowerCase().split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(""), te = (e) => e.replace(/\.?([A-Z0-9]+)/g, (e, t) => "-" + t.toLowerCase()).replace(/^-/, ""), T = (e) => {
66
+ let t = Object.entries(e).filter(([e]) => e.match(/on[A-Z]/));
67
+ return Object.fromEntries(t);
68
+ }, E = (e) => {
69
+ let t = Object.entries(e).filter(([e]) => !e.match(/on[A-Z]/));
70
+ return Object.fromEntries(t);
71
+ }, D = (e) => e?.nodeType === Node.ELEMENT_NODE ? e : e?.nodeType ? D(e?.nextSibling) : null;
72
+ function O(e) {
73
+ let t = Object.entries(e).filter(([e]) => !["class", "style"].includes(e));
74
+ return Object.fromEntries(t);
75
+ }
76
+ function k(e, t = 300) {
77
+ clearTimeout(l), l = setTimeout(e, t);
78
+ }
79
+ function A(e) {
80
+ let t = e.getBoundingClientRect(), n = {
81
+ top: t.top < 0,
82
+ left: t.left < 0,
83
+ bottom: t.bottom > (window.innerHeight || document.documentElement.clientHeight),
84
+ right: t.right > (window.innerWidth || document.documentElement.clientWidth)
85
+ };
86
+ return n.any = Object.values(n).some((e) => e), n.all = Object.values(n).every((e) => e), n;
87
+ }
88
+ var j = /(?:(?:[^\s!@#$%^&*()_=+[\]{}\\|;:'",.<>/?]+)\.)/, M = /* @__PURE__ */ RegExp("(?:com|ru|org|net|de|jp|uk|br|it|pl|fr|in|au|ir|info|nl|cn|es|cz|kr|ca|eu|ua|co|gr|za|ro|biz|ch|se|tw|mx|vn|hu|be|tr|at|dk|tv|me|ar|sk|no|us|fi|id|cl|xyz|io|pt|by|il|ie|nz|kz|hk|lt|cc|my|sg|club|bg|edu|рф|pk|su|top|th|hr|rs|pe|pro|si|az|lv|pw|ae|ph|online|ng|ee|ws|ve|cat)"), N = /* @__PURE__ */ RegExp("(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])"), P = RegExp("(?:" + [[j.source, M.source].join("+"), N.source].join("|") + ")"), F = /(?:(?:[;/][^#?<>\s]*)?)/, I = /(?:(?:\?[^#<>\s]+)?(?:#[^<>\s]+)?)/, L = RegExp("\\b" + [
89
+ P.source,
90
+ F.source,
91
+ I.source,
92
+ "(?!\\w)"
93
+ ].join("+")), R = /\b[a-z\d.-]+:\/\/[^<>\s]+/, z = RegExp("(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@" + [P.source, I.source].join("+") + "(?!\\w)");
94
+ function B(e = 7, t = 15) {
95
+ try {
96
+ return RegExp(`(?:^|(?<=\\W))(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${e},${t}})(?=\\b)(?=\\W(?=\\W|\$)|\\s|\$)`);
97
+ } catch {
98
+ console.warn("This browser doesn't support regex lookahead/lookbehind");
99
+ }
100
+ return RegExp(`(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${e},${t}})(?=\\b)(?=\\W(?=\\W|\$)|\\s|\$)`);
101
+ }
102
+ var V = B(), H = new RegExp([
103
+ L.source,
104
+ R.source,
105
+ z.source,
106
+ V.source
107
+ ].join("|"), "gi");
108
+ function U(e) {
109
+ return !e || !["string", "number"].includes(typeof e) ? !1 : (e = e.toString(), V.exec(e)?.[0] === e);
110
+ }
111
+ function W(e) {
112
+ return !e || typeof e != "string" ? !1 : L.exec(e)?.[0] === e || R.exec(e)?.[0] === e;
113
+ }
114
+ function G(e) {
115
+ return !e || typeof e != "string" ? !1 : z.exec(e)?.[0] === e;
116
+ }
117
+ function K(e) {
118
+ return e.filter((e) => !!e).join(", ");
119
+ }
120
+ function q(e, t = "en-US") {
121
+ return e.replace(/^\p{CWU}/u, (e) => e.toLocaleUpperCase(t));
122
+ }
123
+ function J(e, t) {
124
+ typeof process > "u" || process.env.NODE_ENV === "test" && (!e || !(e instanceof HTMLElement) || !document?.body || document.body.contains(e) || console.warn(`The ${t} component is not attached to the document body. This may cause issues.`));
125
+ }
126
+ function Y(e = document.documentElement) {
127
+ return !!e.hasAttribute("data-overlayscrollbars");
128
+ }
129
+ var X = Symbol("legacyScrollLockOwner");
130
+ function Z(e) {
131
+ return Y(e) ? "d-scrollbar-disabled" : "d-of-hidden";
132
+ }
133
+ function Q(e = document.documentElement, t = X) {
134
+ a(e, Z(e), t);
135
+ }
136
+ function $(e = document.documentElement, t = X) {
137
+ s(e) ? o(e, t) : t === X && e.classList.remove(Z(e));
138
+ }
139
+ function ne(e) {
140
+ return e.replaceAll(/[ -]/g, "_").replaceAll(/\W/g, "").toUpperCase();
141
+ }
142
+ var re = {
143
+ getUniqueString: f,
144
+ getRandomElement: p,
145
+ getRandomInt: h,
146
+ formatMessages: g,
147
+ filterFormattedMessages: _,
148
+ hasFormattedMessageOfType: y,
149
+ getValidationState: v,
150
+ htmlFragment: x,
151
+ flushPromises: S,
152
+ kebabCaseToPascalCase: w,
153
+ extractVueListeners: T,
154
+ extractNonListeners: E,
155
+ removeClassStyleAttrs: O,
156
+ returnFirstEl: D,
157
+ debounce: k,
158
+ isOutOfViewPort: A,
159
+ getPhoneNumberRegex: B,
160
+ linkRegex: H,
161
+ isEmailAddress: G,
162
+ isPhoneNumber: U,
163
+ isURL: W,
164
+ safeConcatStrings: K,
165
+ capitalizeFirstLetter: q,
166
+ disableRootScrolling: Q,
167
+ enableRootScrolling: $
168
+ };
169
+ //#endregion
170
+ export { ne as A, m as C, O as D, te as E, J as M, a as N, D as O, o as P, W as S, H as T, C as _, E as a, A as b, b as c, B as d, p as f, y as g, v as h, $ as i, re as j, K as k, S as l, f as m, k as n, T as o, h as p, Q as r, _ as s, q as t, g as u, x as v, w, U as x, G as y };
171
+
172
+ //# sourceMappingURL=utils-BL_SrwnF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils-BL_SrwnF.js","names":[],"sources":["../common/owned_classes.js","../common/utils/index.js"],"sourcesContent":["// Element -> Map(owner -> class that owner added).\nconst classOwners = new WeakMap();\n\n/**\n * Adds a class to an element on behalf of an owner. Adding again for the same owner does nothing.\n * @param element {HTMLElement}\n * @param className {string}\n * @param owner {*}\n */\nexport function addOwnedClass (element, className, owner) {\n let owners = classOwners.get(element);\n if (!owners) {\n owners = new Map();\n classOwners.set(element, owners);\n }\n if (owners.has(owner)) return;\n owners.set(owner, className);\n element.classList.add(className);\n}\n\n/**\n * Releases the class an owner added. The class is removed once no remaining owner holds it.\n * @param element {HTMLElement}\n * @param owner {*}\n */\nexport function removeOwnedClass (element, owner) {\n const owners = classOwners.get(element);\n const className = owners?.get(owner);\n if (!className) return;\n owners.delete(owner);\n if (!owners.size) classOwners.delete(element);\n for (const remainingClassName of owners.values()) {\n if (remainingClassName === className) return;\n }\n element.classList.remove(className);\n}\n\n/**\n * @param element {HTMLElement}\n * @returns {boolean} whether any owner holds a class on the element.\n */\nexport function hasClassOwners (element) {\n return classOwners.has(element);\n}\n","import {\n DEFAULT_PREFIX,\n DEFAULT_VALIDATION_MESSAGE_TYPE,\n VALIDATION_MESSAGE_TYPES,\n} from '../constants/index.js';\nimport {\n h,\n Comment,\n Text,\n} from 'vue';\nimport { addOwnedClass, hasClassOwners, removeOwnedClass } from '../owned_classes.js';\n\nlet UNIQUE_ID_COUNTER = 0;\nlet TIMER;\n\n// selector to find focusable not hidden inputs\nconst FOCUSABLE_SELECTOR_NOT_HIDDEN = 'input:not([type=hidden]):not(:disabled)';\n// selector to find focusable not disables elements\nconst FOCUSABLE_SELECTOR_NOT_DISABLED = 'select:not(:disabled),textarea:not(:disabled),button:not(:disabled)';\n// // selector to find focusable not hidden and disabled elements\nconst FOCUSABLE_SELECTOR_NOT_HIDDEN_DISABLED = `${FOCUSABLE_SELECTOR_NOT_HIDDEN},${FOCUSABLE_SELECTOR_NOT_DISABLED}`;\n// selector to find focusable elements\nconst FOCUSABLE_SELECTOR = `a,frame,iframe,${FOCUSABLE_SELECTOR_NOT_HIDDEN_DISABLED},*[tabindex]`;\n\nconst scheduler = typeof setImmediate === 'function' ? setImmediate : setTimeout;\n\nexport function getUniqueString (prefix = DEFAULT_PREFIX) {\n return `${prefix}${UNIQUE_ID_COUNTER++}`;\n}\n\n/**\n * Returns a random element from array\n * @param array - the array to return a random element from\n * @param {string} seed - use a string to seed the randomization, so it returns the same element each time\n * based on that string.\n * @returns {*} - the random element\n */\nexport function getRandomElement (array, seed) {\n if (seed) {\n const hash = javaHashCode(seed);\n return array[Math.abs(hash) % array.length];\n } else {\n return array[getRandomInt(array.length)];\n }\n}\n\n/**\n * Returns a hash code for a string.\n * (Compatible to Java's String.hashCode())\n * We use this algo to be in sync with android.\n *\n * The hash code for a string object is computed as\n * s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]\n * using number arithmetic, where s[i] is the i th character\n * of the given string, n is the length of the string,\n * and ^ indicates exponentiation.\n * (The hash value of the empty string is zero.)\n *\n * @param {string} str a string\n * @return {number} a hash code value for the given string.\n */\nexport function javaHashCode (str) {\n let h;\n for (let i = 0; i < str.length; i++) {\n h = Math.imul(31, h) + str.charCodeAt(i) | 0;\n }\n\n return h;\n}\n\n/**\n * Generate a random integer\n * @param {number} max - max range of integer to generate\n * @returns {number} randomly generated integer between 0 and max\n */\nexport function getRandomInt (max) {\n return Math.floor(Math.random() * max);\n}\n\nexport function formatMessages (messages) {\n if (!messages) {\n return [];\n }\n\n return messages.map(message => {\n if (typeof message === 'string') {\n return {\n message,\n type: DEFAULT_VALIDATION_MESSAGE_TYPE,\n };\n }\n\n return message;\n });\n}\n\nexport function filterFormattedMessages (formattedMessages) {\n const validationState = getValidationState(formattedMessages);\n\n if (!formattedMessages || !validationState) {\n return [];\n }\n\n return formattedMessages.filter(message => !!message.message && message.type === validationState);\n}\n\n/*\n * The priority order of message types is: 'critical' > 'warning' > 'positive' > 'info'.\n * If any message of type 'critical' is present in messages, the input state is considered\n * to be 'critical', then 'warning', then 'positive', and lastly 'info'.\n */\nexport function getValidationState (formattedMessages) {\n if (!formattedMessages) {\n return null;\n }\n\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.CRITICAL)) {\n return VALIDATION_MESSAGE_TYPES.CRITICAL;\n }\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.WARNING)) {\n return VALIDATION_MESSAGE_TYPES.WARNING;\n }\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.POSITIVE)) {\n return VALIDATION_MESSAGE_TYPES.POSITIVE;\n }\n if (hasFormattedMessageOfType(formattedMessages, VALIDATION_MESSAGE_TYPES.INFO)) {\n return VALIDATION_MESSAGE_TYPES.INFO;\n }\n\n return null;\n}\n\nexport function hasFormattedMessageOfType (formattedMessages, messageType) {\n if (!formattedMessages || !messageType) {\n return false;\n }\n\n return formattedMessages.some(message => message?.type === messageType);\n}\n\nexport function findFirstFocusableNode (element) {\n return element?.querySelector(FOCUSABLE_SELECTOR);\n}\n\n/* html-fragment component:\n * To render html without wrapping in another element as when using v-html.\n * props: html\n */\nexport const htmlFragment = (props) => {\n return h('div', { innerHTML: props.html });\n};\n\nexport const flushPromises = () => {\n return new Promise((resolve) => {\n scheduler(resolve);\n });\n};\n\n/*\n It is very cumbersome to check if a slot is empty in vue 3. Copied this method from the following thread\n https://github.com/vuejs/core/issues/4733. There is an RFC to fix this but not yet being worked on.\n https://github.com/vuejs/rfcs/discussions/453\n*/\nexport function hasSlotContent (slot, slotProps = {}) {\n if (!slot) return false;\n\n\n return slot(slotProps).some((vnode) => {\n if (vnode.type === Comment) return false;\n\n if (Array.isArray(vnode.children) && !vnode.children.length) return false;\n\n return (\n vnode.type !== Text ||\n (typeof vnode.children === 'string' && vnode.children.trim() !== '')\n );\n });\n}\n\n/**\n * Transform a string from kebab-case to PascalCase\n * @param string\n * @returns {string}\n */\nexport const kebabCaseToPascalCase = (string) => {\n return string?.toLowerCase()\n .split('-')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join('');\n};\n\n/**\n * Transform a string from PascalCase to kebab-case\n * @param string\n * @returns {string}\n */\nexport const pascalCaseToKebabCase = (string) => {\n return string\n .replace(/\\.?([A-Z0-9]+)/g, (x, y) => '-' + y.toLowerCase())\n .replace(/^-/, '');\n};\n\n/**\n * Extracts Vue event listeners from attributes object\n * @param {Object} attrs - The attributes object to extract listeners from\n * @returns {Object} Object containing only Vue event listeners (keys matching on[A-Z])\n */\nexport const extractVueListeners = (attrs) => {\n const listeners = Object.entries(attrs)\n .filter(([key]) => key.match(/on[A-Z]/));\n return Object.fromEntries(listeners);\n};\n\n/**\n * Extracts non-listener attributes from attributes object\n * @param {Object} attrs - The attributes object to extract non-listeners from\n * @returns {Object} Object containing only non-listener attributes (keys not matching on[A-Z])\n */\nexport const extractNonListeners = (attrs) => {\n const nonListeners = Object.entries(attrs)\n .filter(([key]) => !key.match(/on[A-Z]/));\n return Object.fromEntries(nonListeners);\n};\n\n/**\n * $el works very differently than in vue 2, if the first node in the template is a text node\n * such as a comment it will return that instead of the first actual element. This function\n * will recursively return the first element in the template instead of the first node.\n * @param el\n * @returns {HTMLElement} The first element in the template\n */\nexport const returnFirstEl = (el) => {\n if (el?.nodeType === Node.ELEMENT_NODE) {\n return el;\n } else if (!el?.nodeType) {\n return null;\n } else {\n return returnFirstEl(el?.nextSibling);\n }\n};\n\n/**\n In Vue 3, $attrs includes class and style attributes, but when using inheritAttrs: false\n and manually binding :class=\"$attrs.class\" and :style=\"$attrs.style\" to the root element,\n we need to prevent class/style from being passed to inner elements via v-bind=\"removeClassStyleAttrs($attrs)\".\n This function removes class and style attributes from the attrs object.\n*/\nexport function removeClassStyleAttrs (attrs) {\n const listeners = Object.entries(attrs)\n .filter(([key]) => !['class', 'style'].includes(key));\n return Object.fromEntries(listeners);\n}\n\n\n/*\n* Set's a global timer to debounce the execution of a function.\n* @param { object } func - the function that is going to be called after timeout\n* @param { number } [timeout=300] timeout\n* */\nexport function debounce (func, timeout = 300) {\n clearTimeout(TIMER);\n TIMER = setTimeout(func, timeout);\n}\n\n/**\n * Checks if the element is out of the viewport\n * https://gomakethings.com/how-to-check-if-any-part-of-an-element-is-out-of-the-viewport-with-vanilla-js/\n * @param {HTMLElement} element The element to check\n * @return {Object} A set of booleans for each side of the element\n */\n\nexport function isOutOfViewPort (element) {\n const bounding = element.getBoundingClientRect();\n\n const isOut = {\n top: bounding.top < 0,\n left: bounding.left < 0,\n bottom: bounding.bottom > (window.innerHeight || document.documentElement.clientHeight),\n right: bounding.right > (window.innerWidth || document.documentElement.clientWidth),\n };\n isOut.any = Object.values(isOut).some(val => val);\n isOut.all = Object.values(isOut).every(val => val);\n return isOut;\n}\n\n// match valid characters for a domain name followed by a dot, e.g. \"dialpad.\"\nconst domainNameRegex = /(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)/;\n\n// match valid TLDs for a hostname (outdated list from ~2017)\nconst tldRegerx = new RegExp(\n '(?:' +\n 'com|ru|org|net|de|jp|uk|br|it|pl|fr|in|au|ir|info|nl|cn|es|cz|kr|ca|eu|ua|co|gr|' +\n 'za|ro|biz|ch|se|tw|mx|vn|hu|be|tr|at|dk|tv|me|ar|sk|no|us|fi|id|cl|xyz|io|pt|by|' +\n 'il|ie|nz|kz|hk|lt|cc|my|sg|club|bg|edu|рф|pk|su|top|th|hr|rs|pe|pro|si|az|lv|pw|' +\n 'ae|ph|online|ng|ee|ws|ve|cat' +\n ')',\n);\n\n// match valid IPv4 addresses, e.g. \"192.158.1.38\"\nconst ipv4Regex = new RegExp(\n '(?:(?:[0-9]|[1-9]\\\\d|1\\\\d{2}|2[0-4]\\\\d|25[0-5])\\\\.){3}' +\n '(?:[0-9]|[1-9]\\\\d|1\\\\d{2}|2[0-4]\\\\d|25[0-5])',\n);\n\n// match hostnames OR IPv4 addresses, e.g. \"dialpad.com\" or \"192.158.1.38\"\nconst hostnameOrIpRegex = new RegExp(\n '(?:' +\n [\n [\n domainNameRegex.source,\n tldRegerx.source,\n ].join('+'),\n ipv4Regex.source,\n ].join('|') +\n ')',\n);\n\n// match URL paths, e.g. \"/news\"\nconst urlPathRegex = /(?:(?:[;/][^#?<>\\s]*)?)/;\n\n// match URL queries and fragments, e.g. \"?cache=1&new=true\" or \"#heading1\"\nconst urlQueryOrFragmentRegex = /(?:(?:\\?[^#<>\\s]+)?(?:#[^<>\\s]+)?)/;\n\n// match complete hostnames or IPv4 addresses without a protocol and with optional\n// URL paths, queries and fragments e.g. \"dialpad.com/news?cache=1#heading1\"\nconst urlWithoutProtocolRegex = new RegExp(\n '\\\\b' +\n [\n hostnameOrIpRegex.source,\n urlPathRegex.source,\n urlQueryOrFragmentRegex.source,\n '(?!\\\\w)',\n ].join('+'),\n);\n\n// match complete hostnames with protocols and optional URL paths, queries and fragments,\n// e.g. \"ws://localhost:9011\" or \"https://dialpad.com/news?cache=1#heading1\"\nconst urlWithProtocolRegex = /\\b[a-z\\d.-]+:\\/\\/[^<>\\s]+/;\n\n// match email addresses with an optional \"mailto:\" prefix and URL queries, e.g.\n// \"hey@dialpad.com\" or \"mailto:hey@dialpad.com?subject=Hi&body=Hey%20there\"\nconst emailAddressRegex = new RegExp(\n '(?:mailto:)?' +\n '[a-z0-9!#$%&\\'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&\\'*+/=?^_`{|}~-]+)*@' +\n [\n hostnameOrIpRegex.source,\n urlQueryOrFragmentRegex.source,\n ].join('+') +\n '(?!\\\\w)',\n);\n\n/**\n * Match phone numbers, e.g. \"765-8813\", \"(778) 765-8813\" or \"+17787658813\".\n * @param {number} minLength\n * @param {number} maxLength\n * @returns {RegExp}\n */\nexport function getPhoneNumberRegex (minLength = 7, maxLength = 15) {\n // Some older browser versions don't support lookbehind, so provide a RegExp\n // version without it. It fails just one test case, so IMO it's still good\n // enough to use. https://caniuse.com/js-regexp-lookbehind\n try {\n return new RegExp(\n '(?:^|(?<=\\\\W))' +\n '(?![\\\\s\\\\-])\\\\+?(?:[0-9()\\\\- \\\\t]' +\n `{${minLength},${maxLength}}` +\n ')(?=\\\\b)(?=\\\\W(?=\\\\W|$)|\\\\s|$)',\n );\n } catch {\n \n console.warn('This browser doesn\\'t support regex lookahead/lookbehind');\n }\n\n return new RegExp(\n '(?![\\\\s\\\\-])\\\\+?(?:[0-9()\\\\- \\\\t]' +\n `{${minLength},${maxLength}}` +\n ')(?=\\\\b)(?=\\\\W(?=\\\\W|$)|\\\\s|$)',\n );\n}\n\nconst phoneNumberRegex = getPhoneNumberRegex();\n\n// match all link types\nexport const linkRegex = new RegExp(\n [\n urlWithoutProtocolRegex.source,\n urlWithProtocolRegex.source,\n emailAddressRegex.source,\n phoneNumberRegex.source,\n ].join('|'),\n 'gi',\n);\n\n/**\n * Check if a string is a phone number. Validates only exact matches.\n * @param {string|number} input\n * @returns {boolean}\n */\nexport function isPhoneNumber (input) {\n if (!input || (!['string', 'number'].includes(typeof input))) return false;\n input = input.toString();\n return phoneNumberRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Check if a string is an URL. Validates only exact matches.\n * @param {string} input\n * @returns {boolean}\n */\nexport function isURL (input) {\n if (!input || typeof input !== 'string') return false;\n return urlWithoutProtocolRegex.exec(input)?.[0] === input ||\n urlWithProtocolRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Check if a string is an email address. Validates only exact matches.\n * @param {string} input\n * @returns {boolean}\n */\nexport function isEmailAddress (input) {\n if (!input || typeof input !== 'string') return false;\n return emailAddressRegex.exec(input)?.[0] === input;\n}\n\n/**\n * Concatenate a string removing null or undefined elements\n * avoiding parsing them as string with template strings\n * @param {Array} elements\n * @returns {String}\n */\nexport function safeConcatStrings (elements) {\n return elements.filter(str => !!str).join(', ');\n}\n\n/**\n * Locale safe function to capitalize the first letter of a string.\n * @param {string} str the string to capitalize the first letter of\n * @param {string} locale a string representing the locale to be used. Defaults to 'en-US'\n * @returns The passed in string with the first letter capitalized\n */\nexport function capitalizeFirstLetter (str, locale = 'en-US') {\n return str.replace(/^\\p{CWU}/u, char => char.toLocaleUpperCase(locale));\n}\n\n/**\n * Warns if the component is not mounted properly. Useful for tests.\n * @param {HTMLElement} componentRef - the component reference\n * @param {string} componentName - the component name\n */\n\nexport function warnIfUnmounted (componentRef, componentName) {\n if (typeof process === 'undefined') return;\n if (process.env.NODE_ENV !== 'test') return;\n if (!componentRef || !(componentRef instanceof HTMLElement) || !document?.body) return;\n if (!document.body.contains(componentRef)) {\n console.warn(`The ${componentName} component is not attached to the document body. This may cause issues.`);\n }\n}\n\n/**\n * checks whether the dt-scrollbar is being used on the root element.\n * @param rootElement {HTMLElement}\n * @returns {boolean}\n */\nfunction isDtScrollbarInUse (rootElement = document.documentElement) {\n if (rootElement.hasAttribute('data-overlayscrollbars')) {\n return true;\n }\n return false;\n}\n\n// Shared by ownerless callers, so a legacy disable/enable pair still acts as one owner.\nconst LEGACY_SCROLL_LOCK_OWNER = Symbol('legacyScrollLockOwner');\n\nfunction getRootScrollLockClass (rootElement) {\n return isDtScrollbarInUse(rootElement) ? 'd-scrollbar-disabled' : 'd-of-hidden';\n}\n\n/**\n * This will disable scrolling on the root element regardless of whether you are using dt-scrollbar or not.\n * Each owner holds its own lock; scrolling stays disabled until every owner has called enableRootScrolling.\n * @param rootElement {HTMLElement}\n * @param owner {*} identifies the caller's lock. Ownerless callers share a single owner.\n */\nexport function disableRootScrolling (rootElement = document.documentElement, owner = LEGACY_SCROLL_LOCK_OWNER) {\n addOwnedClass(rootElement, getRootScrollLockClass(rootElement), owner);\n}\n\n/**\n * This will release the owner's scroll lock on the root element regardless of whether you are using dt-scrollbar\n * or not. The class that owner added is removed only when no other owner still holds it.\n * @param rootElement {HTMLElement}\n * @param owner {*} the owner passed to disableRootScrolling. Ownerless callers share a single owner.\n */\nexport function enableRootScrolling (rootElement = document.documentElement, owner = LEGACY_SCROLL_LOCK_OWNER) {\n if (hasClassOwners(rootElement)) {\n removeOwnedClass(rootElement, owner);\n } else if (owner === LEGACY_SCROLL_LOCK_OWNER) {\n // No tracked lock: keep the previous unconditional behavior for ownerless callers.\n rootElement.classList.remove(getRootScrollLockClass(rootElement));\n }\n}\n\n/**\n * This will take a text string e.g \"accessibility-mac\"\n * and convert it to our Fluent Key standard format \"ACCESSIBILITY_MAC\"\n * @param text\n * @returns {string}\n */\nexport function toFluentKeyString (text) {\n return text\n .replaceAll(/[ -]/g, '_')\n .replaceAll(/\\W/g, '')\n .toUpperCase();\n}\n\nexport default {\n getUniqueString,\n getRandomElement,\n getRandomInt,\n formatMessages,\n filterFormattedMessages,\n hasFormattedMessageOfType,\n getValidationState,\n htmlFragment,\n flushPromises,\n kebabCaseToPascalCase,\n extractVueListeners,\n extractNonListeners,\n removeClassStyleAttrs,\n returnFirstEl,\n debounce,\n isOutOfViewPort,\n getPhoneNumberRegex,\n linkRegex,\n isEmailAddress,\n isPhoneNumber,\n isURL,\n safeConcatStrings,\n capitalizeFirstLetter,\n disableRootScrolling,\n enableRootScrolling,\n};\n\n"],"mappings":";;;AACA,IAAM,oBAAc,IAAI,SAAS;AAQjC,SAAgB,EAAe,GAAS,GAAW,GAAO;CACxD,IAAI,IAAS,EAAY,IAAI,EAAQ;AACrC,CAAK,MACH,oBAAS,IAAI,KAAK,EAClB,EAAY,IAAI,GAAS,EAAO,GAE9B,GAAO,IAAI,EAAM,KACrB,EAAO,IAAI,GAAO,EAAU,EAC5B,EAAQ,UAAU,IAAI,EAAU;;AAQlC,SAAgB,EAAkB,GAAS,GAAO;CAChD,IAAM,IAAS,EAAY,IAAI,EAAQ,EACjC,IAAY,GAAQ,IAAI,EAAM;AAC/B,QAEL;EADA,EAAO,OAAO,EAAM,EACf,EAAO,QAAM,EAAY,OAAO,EAAQ;AAC7C,OAAK,IAAM,KAAsB,EAAO,QAAQ,CAC9C,KAAI,MAAuB,EAAW;AAExC,IAAQ,UAAU,OAAO,EAAU;;;AAOrC,SAAgB,E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AI,EAAe,EAAY,GAC7B,EAAiB,GAAa,EAAM,GAC3B,MAAU,KAEnB,EAAY,UAAU,OAAO,EAAuB,EAAY,CAAC;;AAUrE,SAAgB,GAAmB,GAAM;AACvC,QAAO,EACJ,WAAW,SAAS,IAAI,CACxB,WAAW,OAAO,GAAG,CACrB,aAAa;;AAGlB,IAAA,KAAe;CACb;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
@@ -0,0 +1,2 @@
1
+ require(`./chunk-Bmb41Sf3.cjs`);const e=require(`./common/constants/index.cjs`);let t=require(`vue`);var n=new WeakMap;function r(e,t,r){let i=n.get(e);i||(i=new Map,n.set(e,i)),!i.has(r)&&(i.set(r,t),e.classList.add(t))}function i(e,t){let r=n.get(e),i=r?.get(t);if(i){r.delete(t),r.size||n.delete(e);for(let e of r.values())if(e===i)return;e.classList.remove(i)}}function a(e){return n.has(e)}var o=0,s,c=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`,l=typeof setImmediate==`function`?setImmediate:setTimeout;function u(e=`dt`){return`${e}${o++}`}function d(e,t){if(t){let n=f(t);return e[Math.abs(n)%e.length]}else return e[p(e.length)]}function f(e){let t;for(let n=0;n<e.length;n++)t=Math.imul(31,t)+e.charCodeAt(n)|0;return t}function p(e){return Math.floor(Math.random()*e)}function m(t){return t?t.map(t=>typeof t==`string`?{message:t,type:e.DEFAULT_VALIDATION_MESSAGE_TYPE}:t):[]}function h(e){let t=g(e);return!e||!t?[]:e.filter(e=>!!e.message&&e.type===t)}function g(t){return t?_(t,e.VALIDATION_MESSAGE_TYPES.CRITICAL)?e.VALIDATION_MESSAGE_TYPES.CRITICAL:_(t,e.VALIDATION_MESSAGE_TYPES.WARNING)?e.VALIDATION_MESSAGE_TYPES.WARNING:_(t,e.VALIDATION_MESSAGE_TYPES.POSITIVE)?e.VALIDATION_MESSAGE_TYPES.POSITIVE:_(t,e.VALIDATION_MESSAGE_TYPES.INFO)?e.VALIDATION_MESSAGE_TYPES.INFO:null:null}function _(e,t){return!e||!t?!1:e.some(e=>e?.type===t)}function v(e){return e?.querySelector(c)}var y=e=>(0,t.h)(`div`,{innerHTML:e.html}),b=()=>new Promise(e=>{l(e)});function x(e,n={}){return e?e(n).some(e=>e.type===t.Comment||Array.isArray(e.children)&&!e.children.length?!1:e.type!==t.Text||typeof e.children==`string`&&e.children.trim()!==``):!1}var S=e=>e?.toLowerCase().split(`-`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(``),C=e=>e.replace(/\.?([A-Z0-9]+)/g,(e,t)=>`-`+t.toLowerCase()).replace(/^-/,``),w=e=>{let t=Object.entries(e).filter(([e])=>e.match(/on[A-Z]/));return Object.fromEntries(t)},T=e=>{let t=Object.entries(e).filter(([e])=>!e.match(/on[A-Z]/));return Object.fromEntries(t)},E=e=>e?.nodeType===Node.ELEMENT_NODE?e:e?.nodeType?E(e?.nextSibling):null;function D(e){let t=Object.entries(e).filter(([e])=>![`class`,`style`].includes(e));return Object.fromEntries(t)}function O(e,t=300){clearTimeout(s),s=setTimeout(e,t)}function k(e){let t=e.getBoundingClientRect(),n={top:t.top<0,left:t.left<0,bottom:t.bottom>(window.innerHeight||document.documentElement.clientHeight),right:t.right>(window.innerWidth||document.documentElement.clientWidth)};return n.any=Object.values(n).some(e=>e),n.all=Object.values(n).every(e=>e),n}var A=/(?:(?:[^\s!@#$%^&*()_=+[\]{}\\|;:'",.<>/?]+)\.)/,j=RegExp(`(?:com|ru|org|net|de|jp|uk|br|it|pl|fr|in|au|ir|info|nl|cn|es|cz|kr|ca|eu|ua|co|gr|za|ro|biz|ch|se|tw|mx|vn|hu|be|tr|at|dk|tv|me|ar|sk|no|us|fi|id|cl|xyz|io|pt|by|il|ie|nz|kz|hk|lt|cc|my|sg|club|bg|edu|рф|pk|su|top|th|hr|rs|pe|pro|si|az|lv|pw|ae|ph|online|ng|ee|ws|ve|cat)`),M=RegExp(`(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])`),N=RegExp(`(?:`+[[A.source,j.source].join(`+`),M.source].join(`|`)+`)`),P=/(?:(?:[;/][^#?<>\s]*)?)/,F=/(?:(?:\?[^#<>\s]+)?(?:#[^<>\s]+)?)/,I=RegExp(`\\b`+[N.source,P.source,F.source,`(?!\\w)`].join(`+`)),L=/\b[a-z\d.-]+:\/\/[^<>\s]+/,R=RegExp("(?:mailto:)?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@"+[N.source,F.source].join(`+`)+`(?!\\w)`);function z(e=7,t=15){try{return RegExp(`(?:^|(?<=\\W))(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${e},${t}})(?=\\b)(?=\\W(?=\\W|\$)|\\s|\$)`)}catch{console.warn(`This browser doesn't support regex lookahead/lookbehind`)}return RegExp(`(?![\\s\\-])\\+?(?:[0-9()\\- \\t]{${e},${t}})(?=\\b)(?=\\W(?=\\W|\$)|\\s|\$)`)}var B=z(),V=new RegExp([I.source,L.source,R.source,B.source].join(`|`),`gi`);function H(e){return!e||![`string`,`number`].includes(typeof e)?!1:(e=e.toString(),B.exec(e)?.[0]===e)}function U(e){return!e||typeof e!=`string`?!1:I.exec(e)?.[0]===e||L.exec(e)?.[0]===e}function W(e){return!e||typeof e!=`string`?!1:R.exec(e)?.[0]===e}function G(e){return e.filter(e=>!!e).join(`, `)}function K(e,t=`en-US`){return e.replace(/^\p{CWU}/u,e=>e.toLocaleUpperCase(t))}function q(e,t){typeof process>`u`||process.env.NODE_ENV===`test`&&(!e||!(e instanceof HTMLElement)||!document?.body||document.body.contains(e)||console.warn(`The ${t} component is not attached to the document body. This may cause issues.`))}function J(e=document.documentElement){return!!e.hasAttribute(`data-overlayscrollbars`)}var Y=Symbol(`legacyScrollLockOwner`);function X(e){return J(e)?`d-scrollbar-disabled`:`d-of-hidden`}function Z(e=document.documentElement,t=Y){r(e,X(e),t)}function Q(e=document.documentElement,t=Y){a(e)?i(e,t):t===Y&&e.classList.remove(X(e))}function $(e){return e.replaceAll(/[ -]/g,`_`).replaceAll(/\W/g,``).toUpperCase()}var ee={getUniqueString:u,getRandomElement:d,getRandomInt:p,formatMessages:m,filterFormattedMessages:h,hasFormattedMessageOfType:_,getValidationState:g,htmlFragment:y,flushPromises:b,kebabCaseToPascalCase:S,extractVueListeners:w,extractNonListeners:T,removeClassStyleAttrs:D,returnFirstEl:E,debounce:O,isOutOfViewPort:k,getPhoneNumberRegex:z,linkRegex:V,isEmailAddress:W,isPhoneNumber:H,isURL:U,safeConcatStrings:G,capitalizeFirstLetter:K,disableRootScrolling:Z,enableRootScrolling:Q};Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return W}});
2
+ //# sourceMappingURL=utils-GofHWJKi.cjs.map