@dialpad/dialtone-vue 3.223.0-next.2 → 3.223.0-next.4

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 (423) hide show
  1. package/dist/Combobox-CYEmi3dv.cjs +3 -0
  2. package/dist/Combobox-CYEmi3dv.cjs.map +1 -0
  3. package/dist/{Combobox-By01ETlj.js → Combobox-D8nQeBIf.js} +33 -32
  4. package/dist/Combobox-D8nQeBIf.js.map +1 -0
  5. package/dist/MarkdownRenderer-D5XWsyQk.cjs.map +1 -1
  6. package/dist/{MarkdownRenderer-C3MZDB2I.js → MarkdownRenderer-NSSny0ID.js} +2 -2
  7. package/dist/{MarkdownRenderer-C3MZDB2I.js.map → MarkdownRenderer-NSSny0ID.js.map} +1 -1
  8. package/dist/{RichTextEditor-BX-5tCOx.cjs → RichTextEditor-B9NGgB03.cjs} +2 -2
  9. package/dist/{RichTextEditor-BX-5tCOx.cjs.map → RichTextEditor-B9NGgB03.cjs.map} +1 -1
  10. package/dist/{RichTextEditor-D8Kas5A3.js → RichTextEditor-DxbZSRop.js} +4 -4
  11. package/dist/{RichTextEditor-D8Kas5A3.js.map → RichTextEditor-DxbZSRop.js.map} +1 -1
  12. package/dist/TextList-B6XFfQfD.js +88 -0
  13. package/dist/TextList-B6XFfQfD.js.map +1 -0
  14. package/dist/TextList-Dd-ROFiI.cjs +2 -0
  15. package/dist/TextList-Dd-ROFiI.cjs.map +1 -0
  16. package/dist/TextListItem-DIlrCkaM.cjs +2 -0
  17. package/dist/TextListItem-DIlrCkaM.cjs.map +1 -0
  18. package/dist/TextListItem-ImUi_FWh.js +62 -0
  19. package/dist/TextListItem-ImUi_FWh.js.map +1 -0
  20. package/dist/{Toast-CHbVmbBg.js → Toast-BIHkIpZP.js} +95 -94
  21. package/dist/Toast-BIHkIpZP.js.map +1 -0
  22. package/dist/Toast-D8ARDEgT.cjs +2 -0
  23. package/dist/Toast-D8ARDEgT.cjs.map +1 -0
  24. package/dist/{attachment_carousel-BFIAXWOZ.js → attachment_carousel-CyiexPBk.js} +1 -1
  25. package/dist/{attachment_carousel-BFIAXWOZ.js.map → attachment_carousel-CyiexPBk.js.map} +1 -1
  26. package/dist/{attachment_carousel-BJxqNJ5T.cjs → attachment_carousel-DJqILY7f.cjs} +1 -1
  27. package/dist/{attachment_carousel-BJxqNJ5T.cjs.map → attachment_carousel-DJqILY7f.cjs.map} +1 -1
  28. package/dist/common/mixins/input.d.ts +4 -4
  29. package/dist/common/mixins/input_group.d.ts +2 -2
  30. package/dist/common/sr_only_close_button.vue.d.ts +30 -30
  31. package/dist/common/sr_only_close_button.vue.d.ts.map +1 -1
  32. package/dist/common/validators/index.cjs +1 -1
  33. package/dist/common/validators/index.cjs.map +1 -1
  34. package/dist/common/validators/index.d.ts +2 -0
  35. package/dist/common/validators/index.d.ts.map +1 -1
  36. package/dist/common/validators/index.js +9 -2
  37. package/dist/common/validators/index.js.map +1 -1
  38. package/dist/component-documentation.json +1 -1
  39. package/dist/components/Avatar/Avatar.vue.d.ts +10 -10
  40. package/dist/components/Avatar/Avatar.vue.d.ts.map +1 -1
  41. package/dist/components/Badge/Badge.vue.d.ts +13 -13
  42. package/dist/components/Banner/Banner.vue.d.ts +142 -107
  43. package/dist/components/Banner/Banner.vue.d.ts.map +1 -1
  44. package/dist/components/Box/Box.vue.d.ts +18 -0
  45. package/dist/components/Box/Box.vue.d.ts.map +1 -1
  46. package/dist/components/Box/BoxConstants.d.ts +4 -0
  47. package/dist/components/Box/BoxConstants.d.ts.map +1 -1
  48. package/dist/components/Box/Validators.d.ts +4 -0
  49. package/dist/components/Box/Validators.d.ts.map +1 -1
  50. package/dist/components/Box/index.d.ts +1 -1
  51. package/dist/components/Breadcrumbs/BreadcrumbItem.vue.d.ts +1 -0
  52. package/dist/components/Breadcrumbs/BreadcrumbItem.vue.d.ts.map +1 -1
  53. package/dist/components/Breadcrumbs/Breadcrumbs.vue.d.ts +3 -2
  54. package/dist/components/Button/Button.vue.d.ts +25 -25
  55. package/dist/components/Button/Button.vue.d.ts.map +1 -1
  56. package/dist/components/Card/Card.vue.d.ts +6 -6
  57. package/dist/components/Checkbox/Checkbox.vue.d.ts +62 -27
  58. package/dist/components/Checkbox/Checkbox.vue.d.ts.map +1 -1
  59. package/dist/components/CheckboxGroup/CheckboxGroup.vue.d.ts +82 -47
  60. package/dist/components/CheckboxGroup/CheckboxGroup.vue.d.ts.map +1 -1
  61. package/dist/components/Chip/Chip.vue.d.ts +40 -40
  62. package/dist/components/Chip/Chip.vue.d.ts.map +1 -1
  63. package/dist/components/Codeblock/Codeblock.vue.d.ts +2 -2
  64. package/dist/components/Collapsible/Collapsible.vue.d.ts +39 -39
  65. package/dist/components/Collapsible/Collapsible.vue.d.ts.map +1 -1
  66. package/dist/components/Combobox/Combobox.vue.d.ts +66 -66
  67. package/dist/components/Combobox/Combobox.vue.d.ts.map +1 -1
  68. package/dist/components/Combobox/ComboboxEmptyList.vue.d.ts +29 -29
  69. package/dist/components/Combobox/ComboboxEmptyList.vue.d.ts.map +1 -1
  70. package/dist/components/Combobox/ComboboxLoadingList.vue.d.ts +35 -35
  71. package/dist/components/Combobox/ComboboxLoadingList.vue.d.ts.map +1 -1
  72. package/dist/components/ComboboxWithPopover/ComboboxWithPopover.vue.d.ts +216 -216
  73. package/dist/components/ComboboxWithPopover/ComboboxWithPopover.vue.d.ts.map +1 -1
  74. package/dist/components/DescriptionList/DescriptionList.vue.d.ts +4 -4
  75. package/dist/components/Dropdown/Dropdown.vue.d.ts +82 -82
  76. package/dist/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
  77. package/dist/components/Emoji/Emoji.vue.d.ts +17 -17
  78. package/dist/components/EmojiPicker/EmojiPicker.vue.d.ts +73 -38
  79. package/dist/components/EmojiPicker/EmojiPicker.vue.d.ts.map +1 -1
  80. package/dist/components/EmojiPicker/Modules/EmojiSearch.vue.d.ts +73 -38
  81. package/dist/components/EmojiPicker/Modules/EmojiSearch.vue.d.ts.map +1 -1
  82. package/dist/components/EmojiTextWrapper/EmojiTextWrapper.vue.d.ts +24 -24
  83. package/dist/components/EmojiTextWrapper/EmojiTextWrapper.vue.d.ts.map +1 -1
  84. package/dist/components/EmptyState/EmptyState.vue.d.ts.map +1 -1
  85. package/dist/components/FilterPill/FilterPill.vue.d.ts +380 -310
  86. package/dist/components/FilterPill/FilterPill.vue.d.ts.map +1 -1
  87. package/dist/components/Hovercard/Hovercard.vue.d.ts +156 -156
  88. package/dist/components/Hovercard/Hovercard.vue.d.ts.map +1 -1
  89. package/dist/components/Icon/Icon.vue.d.ts +7 -7
  90. package/dist/components/ImageViewer/ImageViewer.vue.d.ts +60 -60
  91. package/dist/components/ImageViewer/ImageViewer.vue.d.ts.map +1 -1
  92. package/dist/components/Input/Input.vue.d.ts +73 -38
  93. package/dist/components/Input/Input.vue.d.ts.map +1 -1
  94. package/dist/components/InputGroup/InputGroup.vue.d.ts +82 -47
  95. package/dist/components/InputGroup/InputGroup.vue.d.ts.map +1 -1
  96. package/dist/components/ItemLayout/ItemLayout.vue.d.ts +20 -20
  97. package/dist/components/KeyboardShortcut/KeyboardShortcut.vue.d.ts +116 -81
  98. package/dist/components/KeyboardShortcut/KeyboardShortcut.vue.d.ts.map +1 -1
  99. package/dist/components/Link/Link.vue.d.ts +1 -0
  100. package/dist/components/Link/LinkConstants.d.ts +3 -0
  101. package/dist/components/Link/LinkConstants.d.ts.map +1 -1
  102. package/dist/components/ListItem/ListItem.vue.d.ts +27 -27
  103. package/dist/components/ListItem/ListItem.vue.d.ts.map +1 -1
  104. package/dist/components/ListItemGroup/ListItemGroup.vue.d.ts +4 -4
  105. package/dist/components/Loader/Loader.vue.d.ts +7 -7
  106. package/dist/components/Modal/Modal.vue.d.ts +115 -86
  107. package/dist/components/Modal/Modal.vue.d.ts.map +1 -1
  108. package/dist/components/Modal/ModalConstants.d.ts +0 -5
  109. package/dist/components/Modal/index.d.ts +1 -1
  110. package/dist/components/Notice/Notice.vue.d.ts +142 -107
  111. package/dist/components/Notice/Notice.vue.d.ts.map +1 -1
  112. package/dist/components/Notice/NoticeAction.vue.d.ts +62 -62
  113. package/dist/components/Notice/NoticeAction.vue.d.ts.map +1 -1
  114. package/dist/components/Notice/NoticeContent.vue.d.ts +40 -5
  115. package/dist/components/Notice/NoticeContent.vue.d.ts.map +1 -1
  116. package/dist/components/Notice/NoticeIcon.vue.d.ts +32 -32
  117. package/dist/components/Notice/NoticeIcon.vue.d.ts.map +1 -1
  118. package/dist/components/Pagination/Pagination.vue.d.ts +40 -40
  119. package/dist/components/Pagination/Pagination.vue.d.ts.map +1 -1
  120. package/dist/components/Popover/Popover.vue.d.ts +78 -78
  121. package/dist/components/Popover/Popover.vue.d.ts.map +1 -1
  122. package/dist/components/Popover/PopoverHeaderFooter.vue.d.ts +34 -34
  123. package/dist/components/Popover/PopoverHeaderFooter.vue.d.ts.map +1 -1
  124. package/dist/components/ProgressCircle/ProgressCircle.vue.d.ts +7 -7
  125. package/dist/components/Prose/Prose.vue.d.ts.map +1 -1
  126. package/dist/components/Radio/Radio.vue.d.ts +62 -27
  127. package/dist/components/Radio/Radio.vue.d.ts.map +1 -1
  128. package/dist/components/RadioGroup/RadioGroup.vue.d.ts +82 -47
  129. package/dist/components/RadioGroup/RadioGroup.vue.d.ts.map +1 -1
  130. package/dist/components/RichTextEditor/Extensions/Channels/ChannelComponent.vue.d.ts +6 -5
  131. package/dist/components/RichTextEditor/Extensions/Channels/ChannelComponent.vue.d.ts.map +1 -1
  132. package/dist/components/RichTextEditor/Extensions/Channels/ChannelSuggestion.vue.d.ts +10 -10
  133. package/dist/components/RichTextEditor/Extensions/Channels/ChannelSuggestion.vue.d.ts.map +1 -1
  134. package/dist/components/RichTextEditor/Extensions/Emoji/EmojiComponent.vue.d.ts +17 -17
  135. package/dist/components/RichTextEditor/Extensions/Emoji/EmojiSuggestion.vue.d.ts +17 -17
  136. package/dist/components/RichTextEditor/Extensions/Mentions/MentionComponent.vue.d.ts +1 -0
  137. package/dist/components/RichTextEditor/Extensions/Mentions/MentionSuggestion.vue.d.ts +46 -11
  138. package/dist/components/RichTextEditor/Extensions/SlashCommand/SlashCommandSuggestion.vue.d.ts +36 -1
  139. package/dist/components/RichTextEditor/Extensions/Suggestion/SuggestionList.vue.d.ts +27 -27
  140. package/dist/components/RichTextEditor/Extensions/Suggestion/SuggestionList.vue.d.ts.map +1 -1
  141. package/dist/components/RichTextEditor/Extensions/Variable/VariableComponent.vue.d.ts +189 -154
  142. package/dist/components/RichTextEditor/Extensions/Variable/VariableComponent.vue.d.ts.map +1 -1
  143. package/dist/components/RootLayout/RootLayout.vue.d.ts +10 -10
  144. package/dist/components/SegmentedControl/SegmentedControl.vue.d.ts.map +1 -1
  145. package/dist/components/SelectMenu/SelectMenu.vue.d.ts +69 -34
  146. package/dist/components/SelectMenu/SelectMenu.vue.d.ts.map +1 -1
  147. package/dist/components/Skeleton/Skeleton.vue.d.ts +8 -8
  148. package/dist/components/Skeleton/SkeletonListItem.vue.d.ts +4 -4
  149. package/dist/components/Skeleton/SkeletonParagraph.vue.d.ts +2 -2
  150. package/dist/components/Skeleton/SkeletonShape.vue.d.ts +2 -2
  151. package/dist/components/SplitButton/SplitButton.vue.d.ts +157 -157
  152. package/dist/components/SplitButton/SplitButton.vue.d.ts.map +1 -1
  153. package/dist/components/SplitButton/SplitButtonEnd.vue.d.ts +30 -30
  154. package/dist/components/SplitButton/SplitButtonEnd.vue.d.ts.map +1 -1
  155. package/dist/components/SplitButton/SplitButtonStart.vue.d.ts +31 -31
  156. package/dist/components/Tab/Tab.vue.d.ts +33 -33
  157. package/dist/components/Tab/TabGroup.vue.d.ts +6 -6
  158. package/dist/components/Tab/TabPanel.vue.d.ts +2 -2
  159. package/dist/components/Text/Text.vue.d.ts +36 -1
  160. package/dist/components/Text/Text.vue.d.ts.map +1 -1
  161. package/dist/components/Text/TextConstants.d.ts +53 -0
  162. package/dist/components/Text/TextConstants.d.ts.map +1 -1
  163. package/dist/components/Text/index.d.ts +1 -1
  164. package/dist/components/TextList/TextList.vue.d.ts +87 -0
  165. package/dist/components/TextList/TextList.vue.d.ts.map +1 -0
  166. package/dist/components/TextList/TextListConstants.d.ts +20 -0
  167. package/dist/components/TextList/TextListConstants.d.ts.map +1 -0
  168. package/dist/components/TextList/TextListItem.vue.d.ts +60 -0
  169. package/dist/components/TextList/TextListItem.vue.d.ts.map +1 -0
  170. package/dist/components/TextList/Validators.d.ts +5 -0
  171. package/dist/components/TextList/Validators.d.ts.map +1 -0
  172. package/dist/components/TextList/index.d.ts +4 -0
  173. package/dist/components/TextList/index.d.ts.map +1 -0
  174. package/dist/components/Toast/Layouts/ToastLayoutAlternate.vue.d.ts +144 -109
  175. package/dist/components/Toast/Layouts/ToastLayoutAlternate.vue.d.ts.map +1 -1
  176. package/dist/components/Toast/Layouts/ToastLayoutAlternateIcon.vue.d.ts +34 -34
  177. package/dist/components/Toast/Layouts/ToastLayoutAlternateIcon.vue.d.ts.map +1 -1
  178. package/dist/components/Toast/Layouts/ToastLayoutDefault.vue.d.ts +142 -107
  179. package/dist/components/Toast/Layouts/ToastLayoutDefault.vue.d.ts.map +1 -1
  180. package/dist/components/Toast/Toast.vue.d.ts +580 -440
  181. package/dist/components/Toast/Toast.vue.d.ts.map +1 -1
  182. package/dist/components/Toggle/Toggle.vue.d.ts +4 -4
  183. package/dist/components/Toggle/Toggle.vue.d.ts.map +1 -1
  184. package/dist/components/Tooltip/Tooltip.vue.d.ts +4 -4
  185. package/dist/components/ValidationMessages/ValidationMessages.vue.d.ts +22 -22
  186. package/dist/components/ValidationMessages/ValidationMessages.vue.d.ts.map +1 -1
  187. package/dist/dialtone-vue.cjs +1 -1
  188. package/dist/dialtone-vue.js +146 -142
  189. package/dist/index.d.ts +1 -0
  190. package/dist/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  191. package/dist/lib/attachment-carousel/attachment-carousel.js +1 -1
  192. package/dist/lib/attachment-carousel/index.cjs +1 -1
  193. package/dist/lib/attachment-carousel/index.js +1 -1
  194. package/dist/lib/avatar/avatar.cjs +1 -1
  195. package/dist/lib/avatar/avatar.cjs.map +1 -1
  196. package/dist/lib/avatar/avatar.js +55 -54
  197. package/dist/lib/avatar/avatar.js.map +1 -1
  198. package/dist/lib/badge/badge.cjs +1 -1
  199. package/dist/lib/badge/badge.cjs.map +1 -1
  200. package/dist/lib/badge/badge.js +36 -35
  201. package/dist/lib/badge/badge.js.map +1 -1
  202. package/dist/lib/box/box-constants.cjs +1 -1
  203. package/dist/lib/box/box-constants.cjs.map +1 -1
  204. package/dist/lib/box/box-constants.js +34 -7
  205. package/dist/lib/box/box-constants.js.map +1 -1
  206. package/dist/lib/box/box.cjs +1 -1
  207. package/dist/lib/box/box.cjs.map +1 -1
  208. package/dist/lib/box/box.js +93 -34
  209. package/dist/lib/box/box.js.map +1 -1
  210. package/dist/lib/box/index.cjs +1 -1
  211. package/dist/lib/box/index.js +3 -3
  212. package/dist/lib/box/validators.cjs +1 -1
  213. package/dist/lib/box/validators.cjs.map +1 -1
  214. package/dist/lib/box/validators.js +4 -4
  215. package/dist/lib/box/validators.js.map +1 -1
  216. package/dist/lib/button/button.cjs +1 -1
  217. package/dist/lib/button/button.cjs.map +1 -1
  218. package/dist/lib/button/button.js +69 -68
  219. package/dist/lib/button/button.js.map +1 -1
  220. package/dist/lib/chip/chip.cjs +1 -1
  221. package/dist/lib/chip/chip.cjs.map +1 -1
  222. package/dist/lib/chip/chip.js +36 -35
  223. package/dist/lib/chip/chip.js.map +1 -1
  224. package/dist/lib/codeblock/codeblock.cjs +1 -1
  225. package/dist/lib/codeblock/codeblock.cjs.map +1 -1
  226. package/dist/lib/codeblock/codeblock.js +11 -10
  227. package/dist/lib/codeblock/codeblock.js.map +1 -1
  228. package/dist/lib/combobox/combobox.cjs +1 -1
  229. package/dist/lib/combobox/combobox.js +1 -1
  230. package/dist/lib/combobox/index.cjs +1 -1
  231. package/dist/lib/combobox/index.js +1 -1
  232. package/dist/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  233. package/dist/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  234. package/dist/lib/combobox-multi-select/combobox-multi-select.js +53 -53
  235. package/dist/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  236. package/dist/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
  237. package/dist/lib/combobox-with-popover/combobox-with-popover.cjs.map +1 -1
  238. package/dist/lib/combobox-with-popover/combobox-with-popover.js +48 -47
  239. package/dist/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
  240. package/dist/lib/editor/editor.cjs +1 -1
  241. package/dist/lib/editor/editor.js +2 -2
  242. package/dist/lib/emoji/emoji.cjs +1 -1
  243. package/dist/lib/emoji/emoji.cjs.map +1 -1
  244. package/dist/lib/emoji/emoji.js +25 -24
  245. package/dist/lib/emoji/emoji.js.map +1 -1
  246. package/dist/lib/emoji-text-wrapper/emoji-text-wrapper.cjs +1 -1
  247. package/dist/lib/emoji-text-wrapper/emoji-text-wrapper.cjs.map +1 -1
  248. package/dist/lib/emoji-text-wrapper/emoji-text-wrapper.js +20 -19
  249. package/dist/lib/emoji-text-wrapper/emoji-text-wrapper.js.map +1 -1
  250. package/dist/lib/empty-state/empty-state.cjs +1 -1
  251. package/dist/lib/empty-state/empty-state.cjs.map +1 -1
  252. package/dist/lib/empty-state/empty-state.js +31 -30
  253. package/dist/lib/empty-state/empty-state.js.map +1 -1
  254. package/dist/lib/filter-pill/filter-pill.cjs +1 -1
  255. package/dist/lib/filter-pill/filter-pill.cjs.map +1 -1
  256. package/dist/lib/filter-pill/filter-pill.js +73 -72
  257. package/dist/lib/filter-pill/filter-pill.js.map +1 -1
  258. package/dist/lib/icon/icon.cjs +1 -1
  259. package/dist/lib/icon/icon.cjs.map +1 -1
  260. package/dist/lib/icon/icon.js +16 -15
  261. package/dist/lib/icon/icon.js.map +1 -1
  262. package/dist/lib/input/input.cjs +1 -1
  263. package/dist/lib/input/input.cjs.map +1 -1
  264. package/dist/lib/input/input.js +64 -63
  265. package/dist/lib/input/input.js.map +1 -1
  266. package/dist/lib/link/link-constants.cjs +1 -1
  267. package/dist/lib/link/link-constants.cjs.map +1 -1
  268. package/dist/lib/link/link-constants.js +11 -9
  269. package/dist/lib/link/link-constants.js.map +1 -1
  270. package/dist/lib/link/link.cjs +1 -1
  271. package/dist/lib/link/link.cjs.map +1 -1
  272. package/dist/lib/link/link.js +17 -14
  273. package/dist/lib/link/link.js.map +1 -1
  274. package/dist/lib/loader/loader.cjs +3 -3
  275. package/dist/lib/loader/loader.cjs.map +1 -1
  276. package/dist/lib/loader/loader.js +21 -20
  277. package/dist/lib/loader/loader.js.map +1 -1
  278. package/dist/lib/message-input/index.cjs +1 -1
  279. package/dist/lib/message-input/index.js +1 -1
  280. package/dist/lib/message-input/message-input.cjs +1 -1
  281. package/dist/lib/message-input/message-input.js +1 -1
  282. package/dist/lib/modal/index.cjs +1 -1
  283. package/dist/lib/modal/index.js +3 -3
  284. package/dist/lib/modal/modal-constants.cjs +1 -1
  285. package/dist/lib/modal/modal-constants.cjs.map +1 -1
  286. package/dist/lib/modal/modal-constants.js +1 -4
  287. package/dist/lib/modal/modal-constants.js.map +1 -1
  288. package/dist/lib/modal/modal.cjs +1 -1
  289. package/dist/lib/modal/modal.cjs.map +1 -1
  290. package/dist/lib/modal/modal.js +40 -42
  291. package/dist/lib/modal/modal.js.map +1 -1
  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 +1 -1
  295. package/dist/lib/popover/popover.js.map +1 -1
  296. package/dist/lib/progress-circle/progress-circle.cjs +1 -1
  297. package/dist/lib/progress-circle/progress-circle.cjs.map +1 -1
  298. package/dist/lib/progress-circle/progress-circle.js +33 -32
  299. package/dist/lib/progress-circle/progress-circle.js.map +1 -1
  300. package/dist/lib/prose/prose.cjs +1 -1
  301. package/dist/lib/prose/prose.cjs.map +1 -1
  302. package/dist/lib/prose/prose.js +23 -22
  303. package/dist/lib/prose/prose.js.map +1 -1
  304. package/dist/lib/rich-text-editor/index.cjs +1 -1
  305. package/dist/lib/rich-text-editor/index.js +1 -1
  306. package/dist/lib/rich-text-editor/markdown-renderer.js +1 -1
  307. package/dist/lib/rich-text-editor/rich-text-editor.cjs +1 -1
  308. package/dist/lib/rich-text-editor/rich-text-editor.js +1 -1
  309. package/dist/lib/segmented-control/segmented-control.cjs +1 -1
  310. package/dist/lib/segmented-control/segmented-control.cjs.map +1 -1
  311. package/dist/lib/segmented-control/segmented-control.js +42 -41
  312. package/dist/lib/segmented-control/segmented-control.js.map +1 -1
  313. package/dist/lib/select-menu/select-menu.cjs +1 -1
  314. package/dist/lib/select-menu/select-menu.cjs.map +1 -1
  315. package/dist/lib/select-menu/select-menu.js +48 -47
  316. package/dist/lib/select-menu/select-menu.js.map +1 -1
  317. package/dist/lib/split-button/split-button.cjs +1 -1
  318. package/dist/lib/split-button/split-button.cjs.map +1 -1
  319. package/dist/lib/split-button/split-button.js +45 -44
  320. package/dist/lib/split-button/split-button.js.map +1 -1
  321. package/dist/lib/tab/tab-group.cjs +1 -1
  322. package/dist/lib/tab/tab-group.cjs.map +1 -1
  323. package/dist/lib/tab/tab-group.js +34 -35
  324. package/dist/lib/tab/tab-group.js.map +1 -1
  325. package/dist/lib/text/index.cjs +1 -1
  326. package/dist/lib/text/index.js +3 -3
  327. package/dist/lib/text/text-constants.cjs +1 -1
  328. package/dist/lib/text/text-constants.cjs.map +1 -1
  329. package/dist/lib/text/text-constants.js +70 -21
  330. package/dist/lib/text/text-constants.js.map +1 -1
  331. package/dist/lib/text/text.cjs +1 -1
  332. package/dist/lib/text/text.cjs.map +1 -1
  333. package/dist/lib/text/text.js +72 -37
  334. package/dist/lib/text/text.js.map +1 -1
  335. package/dist/lib/text-list/index.cjs +1 -0
  336. package/dist/lib/text-list/index.js +4 -0
  337. package/dist/lib/text-list/text-list-constants.cjs +2 -0
  338. package/dist/lib/text-list/text-list-constants.cjs.map +1 -0
  339. package/dist/lib/text-list/text-list-constants.js +31 -0
  340. package/dist/lib/text-list/text-list-constants.js.map +1 -0
  341. package/dist/lib/text-list/text-list-item.cjs +1 -0
  342. package/dist/lib/text-list/text-list-item.js +2 -0
  343. package/dist/lib/text-list/text-list.cjs +1 -0
  344. package/dist/lib/text-list/text-list.js +2 -0
  345. package/dist/lib/text-list/validators.cjs +2 -0
  346. package/dist/lib/text-list/validators.cjs.map +1 -0
  347. package/dist/lib/text-list/validators.js +10 -0
  348. package/dist/lib/text-list/validators.js.map +1 -0
  349. package/dist/lib/toast/index.cjs +1 -1
  350. package/dist/lib/toast/index.js +1 -1
  351. package/dist/lib/toast/toast.cjs +1 -1
  352. package/dist/lib/toast/toast.js +1 -1
  353. package/dist/lib/toggle/toggle.cjs +1 -1
  354. package/dist/lib/toggle/toggle.cjs.map +1 -1
  355. package/dist/lib/toggle/toggle.js +23 -22
  356. package/dist/lib/toggle/toggle.js.map +1 -1
  357. package/dist/{message_input-CbQCd07F.js → message_input-C6BcWqr8.js} +2 -2
  358. package/dist/{message_input-CbQCd07F.js.map → message_input-C6BcWqr8.js.map} +1 -1
  359. package/dist/{message_input-dBQwgyjI.cjs → message_input-ftx8f8wC.cjs} +2 -2
  360. package/dist/{message_input-dBQwgyjI.cjs.map → message_input-ftx8f8wC.cjs.map} +1 -1
  361. package/dist/node_modules/@tiptap/vue-3.cjs.map +1 -1
  362. package/dist/node_modules/@tiptap/vue-3.js +1 -1
  363. package/dist/node_modules/@tiptap/vue-3.js.map +1 -1
  364. package/dist/recipes/buttons/callbar_button/callbar_button.vue.d.ts +33 -33
  365. package/dist/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts +149 -149
  366. package/dist/recipes/buttons/callbar_button_with_dropdown/callbar_button_with_dropdown.vue.d.ts.map +1 -1
  367. package/dist/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts +147 -147
  368. package/dist/recipes/buttons/callbar_button_with_popover/callbar_button_with_popover.vue.d.ts.map +1 -1
  369. package/dist/recipes/cards/ivr_node/ivr_node.vue.d.ts +173 -173
  370. package/dist/recipes/cards/ivr_node/ivr_node.vue.d.ts.map +1 -1
  371. package/dist/recipes/chips/grouped_chip/grouped_chip.vue.d.ts +40 -40
  372. package/dist/recipes/chips/grouped_chip/grouped_chip.vue.d.ts.map +1 -1
  373. package/dist/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts +132 -132
  374. package/dist/recipes/conversation_view/attachment_carousel/attachment_carousel.vue.d.ts.map +1 -1
  375. package/dist/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts +97 -97
  376. package/dist/recipes/conversation_view/attachment_carousel/media_components/image_carousel.vue.d.ts.map +1 -1
  377. package/dist/recipes/conversation_view/editor/EditorToolbarButton.vue.d.ts +25 -25
  378. package/dist/recipes/conversation_view/editor/EditorToolbarDropdownButton.vue.d.ts +107 -107
  379. package/dist/recipes/conversation_view/editor/EditorToolbarDropdownButton.vue.d.ts.map +1 -1
  380. package/dist/recipes/conversation_view/editor/EditorToolbarPopoverButton.vue.d.ts +103 -103
  381. package/dist/recipes/conversation_view/editor/EditorToolbarPopoverButton.vue.d.ts.map +1 -1
  382. package/dist/recipes/conversation_view/editor/editor.vue.d.ts +672 -637
  383. package/dist/recipes/conversation_view/editor/editor.vue.d.ts.map +1 -1
  384. package/dist/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts +70 -70
  385. package/dist/recipes/conversation_view/emoji_row/emoji_row.vue.d.ts.map +1 -1
  386. package/dist/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts +66 -66
  387. package/dist/recipes/conversation_view/feed_item_pill/feed_item_pill.vue.d.ts.map +1 -1
  388. package/dist/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts +55 -55
  389. package/dist/recipes/conversation_view/feed_item_row/feed_item_row.vue.d.ts.map +1 -1
  390. package/dist/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +55 -55
  391. package/dist/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts.map +1 -1
  392. package/dist/recipes/conversation_view/message_input/message_input.vue.d.ts +784 -609
  393. package/dist/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  394. package/dist/recipes/conversation_view/message_input/message_input_button.vue.d.ts +145 -110
  395. package/dist/recipes/conversation_view/message_input/message_input_button.vue.d.ts.map +1 -1
  396. package/dist/recipes/conversation_view/message_input/message_input_link.vue.d.ts +326 -256
  397. package/dist/recipes/conversation_view/message_input/message_input_link.vue.d.ts.map +1 -1
  398. package/dist/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts +185 -150
  399. package/dist/recipes/conversation_view/message_input/message_input_topbar.vue.d.ts.map +1 -1
  400. package/dist/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts +30 -30
  401. package/dist/recipes/header/settings_menu_button/settings_menu_button.vue.d.ts.map +1 -1
  402. package/dist/recipes/item_layout/contact_info/contact_info.vue.d.ts +30 -30
  403. package/dist/recipes/leftbar/callbox/callbox.vue.d.ts +28 -28
  404. package/dist/recipes/leftbar/callbox/callbox.vue.d.ts.map +1 -1
  405. package/dist/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts +72 -72
  406. package/dist/recipes/leftbar/contact_centers_row/contact_centers_row.vue.d.ts.map +1 -1
  407. package/dist/recipes/leftbar/contact_row/contact_row.vue.d.ts +215 -215
  408. package/dist/recipes/leftbar/contact_row/contact_row.vue.d.ts.map +1 -1
  409. package/dist/recipes/leftbar/general_row/general_row.vue.d.ts +176 -176
  410. package/dist/recipes/leftbar/general_row/general_row.vue.d.ts.map +1 -1
  411. package/dist/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts +80 -80
  412. package/dist/recipes/leftbar/general_row/leftbar_general_row_icon.vue.d.ts.map +1 -1
  413. package/dist/recipes/leftbar/group_row/group_row.vue.d.ts +181 -181
  414. package/dist/recipes/leftbar/group_row/group_row.vue.d.ts.map +1 -1
  415. package/dist/recipes/leftbar/unread_pill/unread_pill.vue.d.ts +10 -10
  416. package/dist/recipes/leftbar/unread_pill/unread_pill.vue.d.ts.map +1 -1
  417. package/package.json +4 -4
  418. package/dist/Combobox-By01ETlj.js.map +0 -1
  419. package/dist/Combobox-D4hc1-41.cjs +0 -3
  420. package/dist/Combobox-D4hc1-41.cjs.map +0 -1
  421. package/dist/Toast-CHbVmbBg.js.map +0 -1
  422. package/dist/Toast-DX-REYXG.cjs +0 -2
  423. package/dist/Toast-DX-REYXG.cjs.map +0 -1
@@ -7,16 +7,16 @@ import l from "../text/text.js";
7
7
  import { DialtoneLocalization as u } from "../../localization/index.js";
8
8
  import d from "../button/button.js";
9
9
  import f from "../../shared/sr_only_close_button.js";
10
- import { MODAL_BANNER_KINDS as p, MODAL_KIND_MODIFIERS as m, MODAL_SIZE_MODIFIERS as h } from "./modal-constants.js";
11
- import { Teleport as g, Transition as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createTextVNode as S, createVNode as C, mergeProps as w, normalizeClass as T, openBlock as E, renderSlot as D, resolveComponent as O, resolveDirective as k, toDisplayString as A, vShow as j, withCtx as M, withDirectives as N, withModifiers as P } from "vue";
12
- import { DtIconClose as F } from "@dialpad/dialtone-icons/vue";
10
+ import { MODAL_BANNER_KINDS as p, MODAL_KIND_MODIFIERS as m } from "./modal-constants.js";
11
+ import { Teleport as h, Transition as g, createBlock as _, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createTextVNode as x, createVNode as S, mergeProps as C, normalizeClass as w, openBlock as T, renderSlot as E, resolveComponent as D, resolveDirective as O, toDisplayString as k, vShow as A, withCtx as j, withDirectives as M, withModifiers as N } from "vue";
12
+ import { DtIconClose as P } from "@dialpad/dialtone-icons/vue";
13
13
  //#region components/Modal/Modal.vue
14
- var I = "button:not(:disabled),[href],input:not(:disabled),select:not(:disabled),textarea:not(:disabled),details,[tabindex]:not([tabindex=\"-1\"]):not(:disabled):not([aria-disabled=\"true\"])", L = {
14
+ var F = "button:not(:disabled),[href],input:not(:disabled),select:not(:disabled),textarea:not(:disabled),details,[tabindex]:not([tabindex=\"-1\"]):not(:disabled):not([aria-disabled=\"true\"])", I = {
15
15
  name: "DtModal",
16
16
  components: {
17
17
  DtButton: d,
18
18
  DtText: l,
19
- DtIconClose: F,
19
+ DtIconClose: P,
20
20
  SrOnlyCloseButton: f
21
21
  },
22
22
  mixins: [s],
@@ -52,10 +52,9 @@ var I = "button:not(:disabled),[href],input:not(:disabled),select:not(:disabled)
52
52
  default: "default",
53
53
  validator: (e) => Object.keys(m).includes(e)
54
54
  },
55
- size: {
56
- type: String,
57
- default: "default",
58
- validator: (e) => Object.keys(h).includes(e)
55
+ fullscreen: {
56
+ type: Boolean,
57
+ default: !1
59
58
  },
60
59
  modalClass: {
61
60
  type: [
@@ -146,7 +145,6 @@ var I = "button:not(:disabled),[href],input:not(:disabled),select:not(:disabled)
146
145
  data() {
147
146
  return {
148
147
  MODAL_KIND_MODIFIERS: m,
149
- MODAL_SIZE_MODIFIERS: h,
150
148
  MODAL_BANNER_KINDS: p,
151
149
  hasSlotContent: i,
152
150
  i18n: new u(),
@@ -208,7 +206,7 @@ var I = "button:not(:disabled),[href],input:not(:disabled),select:not(:disabled)
208
206
  e?.open && e.close(), this.previousActiveElement?.focus(), this.previousActiveElement = null;
209
207
  },
210
208
  focusFirstTabbable(e) {
211
- let t = [...e.querySelectorAll(I)];
209
+ let t = [...e.querySelectorAll(F)];
212
210
  if (!t.length) return;
213
211
  let n = t[0];
214
212
  n.matches("[type=\"radio\"]:not(:checked)") && (n = t.find((e) => e.checked && e.name === n.name) || n), n.focus({ preventScroll: !0 });
@@ -222,18 +220,18 @@ var I = "button:not(:disabled),[href],input:not(:disabled),select:not(:disabled)
222
220
  } else this.initialFocusElement instanceof HTMLElement && this.initialFocusElement.focus();
223
221
  }
224
222
  }
225
- }, R = ["aria-describedby", "aria-labelledby"], z = ["id"];
226
- function B(e, t, n, r, i, a) {
227
- let o = O("dt-text"), s = O("sr-only-close-button"), c = O("dt-icon-close"), l = O("dt-button"), u = k("dt-focustrap");
228
- return E(), v(g, {
223
+ }, L = ["aria-describedby", "aria-labelledby"], R = ["id"];
224
+ function z(e, t, n, r, i, a) {
225
+ let o = D("dt-text"), s = D("sr-only-close-button"), c = D("dt-icon-close"), l = D("dt-button"), u = O("dt-focustrap");
226
+ return T(), _(h, {
229
227
  disabled: !n.appendTo && !i.autoTeleportTarget,
230
228
  to: n.appendTo || i.autoTeleportTarget
231
- }, [N((E(), b("dialog", w({
229
+ }, [M((T(), y("dialog", C({
232
230
  ref: "dialogEl",
233
231
  class: [
234
232
  "d-modal",
235
233
  i.MODAL_KIND_MODIFIERS[n.kind],
236
- i.MODAL_SIZE_MODIFIERS[n.size],
234
+ { "d-modal--full": n.fullscreen },
237
235
  { "d-modal--transparent-backdrop": n.transparentBackdrop },
238
236
  n.modalClass
239
237
  ],
@@ -241,34 +239,34 @@ function B(e, t, n, r, i, a) {
241
239
  "aria-describedby": n.describedById || void 0,
242
240
  "aria-labelledby": n.labelledById
243
241
  }, e.modeAttrs, {
244
- onCancel: t[0] || (t[0] = P((...e) => a.close && a.close(...e), ["prevent"])),
242
+ onCancel: t[0] || (t[0] = N((...e) => a.close && a.close(...e), ["prevent"])),
245
243
  onClick: t[1] || (t[1] = (...e) => a.onBackdropClick && a.onBackdropClick(...e)),
246
244
  onKeydown: t[2] || (t[2] = (...e) => a.onKeydown && a.onKeydown(...e))
247
- }), [n.open && (i.hasSlotContent(e.$slots.banner) || n.bannerHeaderText) ? (E(), b("div", {
245
+ }), [n.open && (i.hasSlotContent(e.$slots.banner) || n.bannerHeaderText) ? (T(), y("div", {
248
246
  key: 0,
249
247
  "data-qa": "dt-modal-banner",
250
- class: T([
248
+ class: w([
251
249
  "d-modal__banner",
252
250
  n.bannerClass,
253
251
  a.bannerKindClass
254
252
  ])
255
- }, [D(e.$slots, "banner", {}, () => [S(A(n.bannerHeaderText), 1)])], 2)) : y("", !0), C(_, {
253
+ }, [E(e.$slots, "banner", {}, () => [x(k(n.bannerHeaderText), 1)])], 2)) : v("", !0), S(g, {
256
254
  appear: n.open,
257
255
  name: "d-modal__dialog",
258
256
  onAfterEnter: a.onAfterEnter,
259
257
  onAfterLeave: a.onAfterLeave
260
258
  }, {
261
- default: M(() => [N(x("div", { class: T([
259
+ default: j(() => [M(b("div", { class: w([
262
260
  "d-modal__dialog",
263
261
  { "d-modal__dialog--scrollable": n.fixedHeaderFooter },
264
262
  n.dialogClass
265
263
  ]) }, [
266
- i.hasSlotContent(e.$slots.header) ? (E(), b("div", {
264
+ i.hasSlotContent(e.$slots.header) ? (T(), y("div", {
267
265
  key: 0,
268
266
  id: n.labelledById,
269
- class: T(["d-modal__header", n.headerClass]),
267
+ class: w(["d-modal__header", n.headerClass]),
270
268
  "data-qa": "dt-modal-title"
271
- }, [D(e.$slots, "header")], 10, z)) : (E(), v(o, {
269
+ }, [E(e.$slots, "header")], 10, R)) : (T(), _(o, {
272
270
  key: 1,
273
271
  id: n.labelledById,
274
272
  kind: "headline",
@@ -277,26 +275,26 @@ function B(e, t, n, r, i, a) {
277
275
  density: "100",
278
276
  "text-box-trim": "start",
279
277
  as: "h2",
280
- class: T(["d-modal__header", n.headerClass]),
278
+ class: w(["d-modal__header", n.headerClass]),
281
279
  "data-qa": "dt-modal-title"
282
280
  }, {
283
- default: M(() => [S(A(n.headerText), 1)]),
281
+ default: j(() => [x(k(n.headerText), 1)]),
284
282
  _: 1
285
283
  }, 8, ["id", "class"])),
286
- i.hasSlotContent(e.$slots.default) ? (E(), b("div", {
284
+ i.hasSlotContent(e.$slots.default) ? (T(), y("div", {
287
285
  key: 2,
288
- class: T(["d-modal__content", n.contentClass]),
286
+ class: w(["d-modal__content", n.contentClass]),
289
287
  "data-qa": "dt-modal-copy"
290
- }, [D(e.$slots, "default")], 2)) : (E(), b("p", {
288
+ }, [E(e.$slots, "default")], 2)) : (T(), y("p", {
291
289
  key: 3,
292
- class: T(["d-modal__content", n.contentClass]),
290
+ class: w(["d-modal__content", n.contentClass]),
293
291
  "data-qa": "dt-modal-copy"
294
- }, A(n.copy), 3)),
295
- a.hasFooterSlot ? (E(), b("footer", {
292
+ }, k(n.copy), 3)),
293
+ a.hasFooterSlot ? (T(), y("footer", {
296
294
  key: 4,
297
- class: T(["d-modal__footer", n.footerClass])
298
- }, [D(e.$slots, "footer")], 2)) : y("", !0),
299
- n.showClose ? (E(), v(l, {
295
+ class: w(["d-modal__footer", n.footerClass])
296
+ }, [E(e.$slots, "footer")], 2)) : v("", !0),
297
+ n.showClose ? (T(), _(l, {
300
298
  key: 6,
301
299
  class: "d-modal__close",
302
300
  "data-qa": "dt-modal-close-button",
@@ -307,30 +305,30 @@ function B(e, t, n, r, i, a) {
307
305
  title: a.closeButtonTitle,
308
306
  onClick: a.close
309
307
  }, {
310
- icon: M(({ iconSize: e }) => [C(c, { size: e }, null, 8, ["size"])]),
308
+ icon: j(({ iconSize: e }) => [S(c, { size: e }, null, 8, ["size"])]),
311
309
  _: 1
312
310
  }, 8, [
313
311
  "aria-label",
314
312
  "title",
315
313
  "onClick"
316
- ])) : (E(), v(s, {
314
+ ])) : (T(), _(s, {
317
315
  key: 5,
318
316
  onClose: a.close
319
317
  }, null, 8, ["onClose"]))
320
- ], 2), [[j, n.open]])]),
318
+ ], 2), [[A, n.open]])]),
321
319
  _: 3
322
320
  }, 8, [
323
321
  "appear",
324
322
  "onAfterEnter",
325
323
  "onAfterLeave"
326
- ])], 16, R)), [[u, {
324
+ ])], 16, L)), [[u, {
327
325
  active: n.open,
328
326
  initialFocus: !1,
329
327
  restoreFocus: !1
330
328
  }]])], 8, ["disabled", "to"]);
331
329
  }
332
- var V = /* @__PURE__ */ o(L, [["render", B]]);
330
+ var B = /* @__PURE__ */ o(I, [["render", z]]);
333
331
  //#endregion
334
- export { V as default };
332
+ export { B as default };
335
333
 
336
334
  //# sourceMappingURL=modal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"modal.js","names":[],"sources":["../../../components/Modal/Modal.vue"],"sourcesContent":["<template>\n <teleport\n :disabled=\"!appendTo && !autoTeleportTarget\"\n :to=\"appendTo || autoTeleportTarget\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <dialog\n ref=\"dialogEl\"\n v-dt-focustrap=\"{ active: open, initialFocus: false, restoreFocus: false }\"\n :class=\"[\n 'd-modal',\n MODAL_KIND_MODIFIERS[kind],\n MODAL_SIZE_MODIFIERS[size],\n { 'd-modal--transparent-backdrop': transparentBackdrop },\n modalClass,\n ]\"\n data-qa=\"dt-modal\"\n :aria-describedby=\"describedById || undefined\"\n :aria-labelledby=\"labelledById\"\n v-bind=\"modeAttrs\"\n @cancel.prevent=\"close\"\n @click=\"onBackdropClick\"\n @keydown=\"onKeydown\"\n >\n <div\n v-if=\"open && (hasSlotContent($slots.banner) || bannerHeaderText)\"\n data-qa=\"dt-modal-banner\"\n :class=\"[\n 'd-modal__banner',\n bannerClass,\n bannerKindClass,\n ]\"\n >\n <!-- @slot Slot for the banner, defaults to bannerHeaderText prop -->\n <slot name=\"banner\">\n {{ bannerHeaderText }}\n </slot>\n </div>\n <transition\n :appear=\"open\"\n name=\"d-modal__dialog\"\n @after-enter=\"onAfterEnter\"\n @after-leave=\"onAfterLeave\"\n >\n <div\n v-show=\"open\"\n :class=\"[\n 'd-modal__dialog',\n { 'd-modal__dialog--scrollable': fixedHeaderFooter },\n dialogClass,\n ]\"\n >\n <div\n v-if=\"hasSlotContent($slots.header)\"\n :id=\"labelledById\"\n :class=\"['d-modal__header', headerClass]\"\n data-qa=\"dt-modal-title\"\n >\n <!-- @slot Slot for dialog header section, taking the place of any \"headerText\" text prop -->\n <slot name=\"header\" />\n </div>\n <dt-text\n v-else\n :id=\"labelledById\"\n kind=\"headline\"\n :size=\"600\"\n strength=\"medium\"\n density=\"100\"\n text-box-trim=\"start\"\n as=\"h2\"\n :class=\"['d-modal__header', headerClass]\"\n data-qa=\"dt-modal-title\"\n >\n {{ headerText }}\n </dt-text>\n <div\n v-if=\"hasSlotContent($slots.default)\"\n :class=\"[\n 'd-modal__content',\n contentClass,\n ]\"\n data-qa=\"dt-modal-copy\"\n >\n <!-- @slot Default slot for dialog body section, taking the place of any \"copy\" text prop -->\n <slot />\n </div>\n <p\n v-else\n :class=\"[\n 'd-modal__content',\n contentClass,\n ]\"\n data-qa=\"dt-modal-copy\"\n >\n {{ copy }}\n </p>\n <footer\n v-if=\"hasFooterSlot\"\n :class=\"['d-modal__footer', footerClass]\"\n >\n <!-- @slot Slot for dialog footer content, often containing cancel and confirm buttons. -->\n <slot name=\"footer\" />\n </footer>\n <sr-only-close-button\n v-if=\"!showClose\"\n @close=\"close\"\n />\n <dt-button\n v-else\n class=\"d-modal__close\"\n data-qa=\"dt-modal-close-button\"\n :size=\"300\"\n kind=\"muted\"\n importance=\"clear\"\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"close\"\n >\n <template #icon=\"{ iconSize }\">\n <dt-icon-close\n :size=\"iconSize\"\n />\n </template>\n </dt-button>\n </div>\n </transition>\n </dialog>\n </teleport>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { DtButton } from '@/components/Button';\nimport { DtText } from '@/components/Text';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue';\nimport ModeMixin from '@/common/mixins/mode';\nimport {\n MODAL_BANNER_KINDS,\n MODAL_KIND_MODIFIERS,\n MODAL_SIZE_MODIFIERS,\n} from './ModalConstants';\nimport { getUniqueString, hasSlotContent, returnFirstEl, disableRootScrolling, enableRootScrolling } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\nimport { NOTICE_KINDS } from '@/components/Notice';\nimport { DialtoneLocalization } from '@/localization';\n\nconst focusableSelector = 'button:not(:disabled),[href],input:not(:disabled),select:not(:disabled),' +\n 'textarea:not(:disabled),details,[tabindex]:not([tabindex=\"-1\"]):not(:disabled):not([aria-disabled=\"true\"])';\n\n/**\n * Modals focus the user's attention exclusively on one task or piece of information\n * via a window that sits on top of the page content.\n * @see https://dialtone.dialpad.com/components/modal.html\n */\nexport default {\n name: 'DtModal',\n\n components: {\n DtButton,\n DtText,\n DtIconClose,\n SrOnlyCloseButton,\n },\n\n mixins: [ModeMixin],\n\n props: {\n /**\n * Body text to display as the modal's main content.\n */\n copy: {\n type: String,\n default: '',\n },\n\n /**\n * Id to use for the dialog's aria-describedby.\n * Recommended only if the dialog content itself isn't enough to give full context,\n * as screen readers should recite the dialog contents by default before any aria-description.\n */\n describedById: {\n type: String,\n default: '',\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n labelledById: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Whether the modal should be shown.\n * Parent component can sync on this value to control the modal's visibility.\n * @values true, false\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Header text to display in the modal header.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Header text to display in the modal banner.\n */\n bannerHeaderText: {\n type: String,\n default: undefined,\n },\n\n /**\n * The theme of the modal.\n * @values default, critical\n */\n kind: {\n type: String,\n default: 'default',\n validator: (k) => Object.keys(MODAL_KIND_MODIFIERS).includes(k),\n },\n\n /**\n * The size of the modal. size - default or full,\n * @values default, full\n */\n size: {\n type: String,\n default: 'default',\n validator: (s) => Object.keys(MODAL_SIZE_MODIFIERS).includes(s),\n },\n\n /**\n * Additional class name for the root modal element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n modalClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n dialogClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the content element within the modal.\n * Can accept 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 * Sets the color of the banner.\n * @values base, critical, info, positive, warning\n */\n bannerKind: {\n type: String,\n default: 'warning',\n validator (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Additional class name for the banner element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n bannerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the header element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n headerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the footer element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n footerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Shows the close button on the modal\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the modal will close when you click outside of the dialog on the overlay.\n * @values true, false\n */\n closeOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Scrollable modal that allows scroll the modal content keeping the header and footer fixed\n * @values true, false\n */\n fixedHeaderFooter: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The element that is focused when the modal is opened. This can be an\n * HTMLElement within the modal, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'first',\n validator: initialFocusElement => {\n return initialFocusElement === 'first' ||\n (initialFocusElement instanceof HTMLElement) ||\n initialFocusElement.startsWith('#');\n },\n },\n\n /**\n * A CSS selector string for the element to portal the modal to. If not provided, the modal will be rendered in its default location.\n */\n appendTo: {\n type: String,\n default: undefined,\n },\n\n /**\n * When true, the surrounding backdrop is rendered fully transparent\n * instead of the default dimming overlay. The dialog box itself\n * remains opaque. Useful when the underlying UI should remain visible.\n * @values true, false\n */\n transparentBackdrop: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native button click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * The modal will emit a \"false\" boolean value for this event when the user performs a modal-closing action.\n * Parent components can sync on this value to create a 2-way binding to control modal visibility.\n *\n * @event update:open\n * @type {Boolean}\n */\n 'update:open',\n ],\n\n data () {\n return {\n MODAL_KIND_MODIFIERS,\n MODAL_SIZE_MODIFIERS,\n MODAL_BANNER_KINDS,\n hasSlotContent,\n i18n: new DialtoneLocalization(),\n autoTeleportTarget: null,\n };\n },\n\n computed: {\n hasFooterSlot () {\n return !!this.$slots.footer;\n },\n\n bannerKindClass () {\n return MODAL_BANNER_KINDS[this.bannerKind];\n },\n\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n watch: {\n open (isShowing) {\n this.syncDialogState(isShowing);\n },\n },\n\n mounted () {\n if (!this.appendTo) {\n const root = this.$el?.getRootNode();\n if (root instanceof ShadowRoot) {\n this.autoTeleportTarget = root;\n // Defer syncDialogState so the teleport renders inside the shadow root first.\n if (this.open) this.$nextTick(() => { if (this.open) this.syncDialogState(true); });\n return;\n }\n }\n if (this.open) {\n this.syncDialogState(true);\n }\n },\n\n beforeUnmount () {\n const dialogEl = this.$refs.dialogEl;\n if (dialogEl?.open) {\n dialogEl.close();\n enableRootScrolling(this.getScrollRoot());\n }\n this.previousActiveElement = null;\n },\n\n methods: {\n getScrollRoot () {\n return returnFirstEl(this.$refs.dialogEl)?.getRootNode()?.host;\n },\n\n syncDialogState (isShowing) {\n const dialogEl = this.$refs.dialogEl;\n if (!dialogEl) return;\n\n if (isShowing) {\n this.previousActiveElement = document.activeElement;\n if (!dialogEl.open) {\n dialogEl.showModal();\n }\n disableRootScrolling(this.getScrollRoot());\n } else if (dialogEl.open) {\n // Leave transition plays via v-show on inner content.\n // close() is called in onAfterLeave when transition completes.\n enableRootScrolling(this.getScrollRoot());\n }\n },\n\n close () {\n this.$emit('update:open', false);\n },\n\n onBackdropClick (event) {\n if (this.closeOnClick && event.target === event.currentTarget) {\n this.close();\n }\n this.$emit('click', event);\n },\n\n onKeydown (event) {\n this.$emit('keydown', event);\n },\n\n async onAfterEnter () {\n this.$emit('update:open', true);\n await this.setFocusAfterTransition();\n },\n\n onAfterLeave () {\n const dialogEl = this.$refs.dialogEl;\n if (dialogEl?.open) {\n dialogEl.close();\n }\n this.previousActiveElement?.focus();\n this.previousActiveElement = null;\n },\n\n focusFirstTabbable (container) {\n const focusable = [...container.querySelectorAll(focusableSelector)];\n if (!focusable.length) return;\n let target = focusable[0];\n // If first focusable is an unchecked radio, prefer the checked radio in the same group.\n if (target.matches('[type=\"radio\"]:not(:checked)')) {\n target = focusable.find(el => el.checked && el.name === target.name) || target;\n }\n target.focus({ preventScroll: true });\n },\n\n async setFocusAfterTransition () {\n const dialogEl = this.$refs.dialogEl;\n if (!dialogEl) return;\n\n await this.$nextTick();\n\n if (this.initialFocusElement === 'first') {\n this.focusFirstTabbable(dialogEl);\n } else if (typeof this.initialFocusElement === 'string' && this.initialFocusElement.startsWith('#')) {\n const el = dialogEl.querySelector(this.initialFocusElement);\n if (el) {\n el.focus();\n } else {\n // eslint-disable-next-line no-console\n console.warn('Could not find the element specified in dt-modal prop \"initialFocusElement\". ' +\n 'Defaulting to focusing the first element.');\n this.focusFirstTabbable(dialogEl);\n }\n } else if (this.initialFocusElement instanceof HTMLElement) {\n this.initialFocusElement.focus();\n }\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;;;AAmJA,IAAM,IAAoB,0LAQrB,IAAU;CACb,MAAM;CAEN,YAAY;EACV,UAAA;EACA,QAAA;EACA;EACA,mBAAA;EACD;CAED,QAAQ,CAAC,EAAU;CAEnB,OAAO;EAIL,MAAM;GACJ,MAAM;GACN,SAAS;GACV;EAOD,eAA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,EAAA,eAAe,EAAA,OAAO,QAAO,IAAA,GAAA,EADrC,EAUM,OAAA;;IARH,OAAK,EAAA,CAAA,oBAAoD,EAAA,aAAA,CAAA;IAI1D,WAAQ;OAGR,EAAQ,EAAA,QAAA,UAAA,CAAA,EAAA,EAAA,KAAA,GAAA,EAEV,EASI,KAAA;;IAPD,OAAK,EAAA,CAAA,oBAAoD,EAAA,aAAA,CAAA;IAI1D,WAAQ;QAEL,EAAA,KAAI,EAAA,EAAA;GAGD,EAAA,iBAAA,GAAA,EADR,EAMS,UAAA;;IAJN,OAAK,EAAA,CAAA,mBAAsB,EAAA,YAAW,CAAA;OAGvC,EAAsB,EAAA,QAAA,SAAA,CAAA,EAAA,EAAA,IAAA,EAAA,IAAA,GAAA;GAGf,EAAA,kBAGT,EAgBY,GAAA;;IAdV,OAAM;IACN,WAAQ;IACP,MAAM;IACP,MAAK;IACL,YAAW;IACV,cAAY,EAAA;IACZ,OAAO,EAAA;IACP,SAAO,EAAA;;IAEG,MAAI,GAGX,EAHe,kBAAQ,CACzB,EAEE,GAAA,EADC,MAAM,GAAQ,EAAA,MAAA,GAAA,CAAA,OAAA,CAAA,CAAA,CAAA;;;;;;UAhBZ,GAAA,EADT,EAGE,GAAA;;IADC,SAAO,EAAA;;cA5DF,EAAA,KAAI,CAAA,CAAA,CAAA,CAAA;;;;;;;UArCU,EAAA;EAAI,cAAA;EAAA,cAAA;EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,GAAA,CAAA,YAAA,KAAA,CAAA"}
1
+ {"version":3,"file":"modal.js","names":[],"sources":["../../../components/Modal/Modal.vue"],"sourcesContent":["<template>\n <teleport\n :disabled=\"!appendTo && !autoTeleportTarget\"\n :to=\"appendTo || autoTeleportTarget\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <dialog\n ref=\"dialogEl\"\n v-dt-focustrap=\"{ active: open, initialFocus: false, restoreFocus: false }\"\n :class=\"[\n 'd-modal',\n MODAL_KIND_MODIFIERS[kind],\n { 'd-modal--full': fullscreen },\n { 'd-modal--transparent-backdrop': transparentBackdrop },\n modalClass,\n ]\"\n data-qa=\"dt-modal\"\n :aria-describedby=\"describedById || undefined\"\n :aria-labelledby=\"labelledById\"\n v-bind=\"modeAttrs\"\n @cancel.prevent=\"close\"\n @click=\"onBackdropClick\"\n @keydown=\"onKeydown\"\n >\n <div\n v-if=\"open && (hasSlotContent($slots.banner) || bannerHeaderText)\"\n data-qa=\"dt-modal-banner\"\n :class=\"[\n 'd-modal__banner',\n bannerClass,\n bannerKindClass,\n ]\"\n >\n <!-- @slot Slot for the banner, defaults to bannerHeaderText prop -->\n <slot name=\"banner\">\n {{ bannerHeaderText }}\n </slot>\n </div>\n <transition\n :appear=\"open\"\n name=\"d-modal__dialog\"\n @after-enter=\"onAfterEnter\"\n @after-leave=\"onAfterLeave\"\n >\n <div\n v-show=\"open\"\n :class=\"[\n 'd-modal__dialog',\n { 'd-modal__dialog--scrollable': fixedHeaderFooter },\n dialogClass,\n ]\"\n >\n <div\n v-if=\"hasSlotContent($slots.header)\"\n :id=\"labelledById\"\n :class=\"['d-modal__header', headerClass]\"\n data-qa=\"dt-modal-title\"\n >\n <!-- @slot Slot for dialog header section, taking the place of any \"headerText\" text prop -->\n <slot name=\"header\" />\n </div>\n <dt-text\n v-else\n :id=\"labelledById\"\n kind=\"headline\"\n :size=\"600\"\n strength=\"medium\"\n density=\"100\"\n text-box-trim=\"start\"\n as=\"h2\"\n :class=\"['d-modal__header', headerClass]\"\n data-qa=\"dt-modal-title\"\n >\n {{ headerText }}\n </dt-text>\n <div\n v-if=\"hasSlotContent($slots.default)\"\n :class=\"[\n 'd-modal__content',\n contentClass,\n ]\"\n data-qa=\"dt-modal-copy\"\n >\n <!-- @slot Default slot for dialog body section, taking the place of any \"copy\" text prop -->\n <slot />\n </div>\n <p\n v-else\n :class=\"[\n 'd-modal__content',\n contentClass,\n ]\"\n data-qa=\"dt-modal-copy\"\n >\n {{ copy }}\n </p>\n <footer\n v-if=\"hasFooterSlot\"\n :class=\"['d-modal__footer', footerClass]\"\n >\n <!-- @slot Slot for dialog footer content, often containing cancel and confirm buttons. -->\n <slot name=\"footer\" />\n </footer>\n <sr-only-close-button\n v-if=\"!showClose\"\n @close=\"close\"\n />\n <dt-button\n v-else\n class=\"d-modal__close\"\n data-qa=\"dt-modal-close-button\"\n :size=\"300\"\n kind=\"muted\"\n importance=\"clear\"\n :aria-label=\"closeButtonTitle\"\n :title=\"closeButtonTitle\"\n @click=\"close\"\n >\n <template #icon=\"{ iconSize }\">\n <dt-icon-close\n :size=\"iconSize\"\n />\n </template>\n </dt-button>\n </div>\n </transition>\n </dialog>\n </teleport>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport { DtButton } from '@/components/Button';\nimport { DtText } from '@/components/Text';\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue';\nimport ModeMixin from '@/common/mixins/mode';\nimport {\n MODAL_BANNER_KINDS,\n MODAL_KIND_MODIFIERS,\n} from './ModalConstants';\nimport { getUniqueString, hasSlotContent, returnFirstEl, disableRootScrolling, enableRootScrolling } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\nimport { NOTICE_KINDS } from '@/components/Notice';\nimport { DialtoneLocalization } from '@/localization';\n\nconst focusableSelector = 'button:not(:disabled),[href],input:not(:disabled),select:not(:disabled),' +\n 'textarea:not(:disabled),details,[tabindex]:not([tabindex=\"-1\"]):not(:disabled):not([aria-disabled=\"true\"])';\n\n/**\n * Modals focus the user's attention exclusively on one task or piece of information\n * via a window that sits on top of the page content.\n * @see https://dialtone.dialpad.com/components/modal.html\n */\nexport default {\n name: 'DtModal',\n\n components: {\n DtButton,\n DtText,\n DtIconClose,\n SrOnlyCloseButton,\n },\n\n mixins: [ModeMixin],\n\n props: {\n /**\n * Body text to display as the modal's main content.\n */\n copy: {\n type: String,\n default: '',\n },\n\n /**\n * Id to use for the dialog's aria-describedby.\n * Recommended only if the dialog content itself isn't enough to give full context,\n * as screen readers should recite the dialog contents by default before any aria-description.\n */\n describedById: {\n type: String,\n default: '',\n },\n\n /**\n * Id to use for the dialog's aria-labelledby.\n */\n labelledById: {\n type: String,\n default: function () { return getUniqueString(); },\n },\n\n /**\n * Whether the modal should be shown.\n * Parent component can sync on this value to control the modal's visibility.\n * @values true, false\n */\n open: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Header text to display in the modal header.\n */\n headerText: {\n type: String,\n default: undefined,\n },\n\n /**\n * Header text to display in the modal banner.\n */\n bannerHeaderText: {\n type: String,\n default: undefined,\n },\n\n /**\n * The theme of the modal.\n * @values default, critical\n */\n kind: {\n type: String,\n default: 'default',\n validator: (k) => Object.keys(MODAL_KIND_MODIFIERS).includes(k),\n },\n\n /**\n * Whether the modal fills the viewport instead of rendering at its default size.\n * @values true, false\n */\n fullscreen: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the root modal element.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n modalClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n dialogClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the content element within the modal.\n * Can accept 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 * Sets the color of the banner.\n * @values base, critical, info, positive, warning\n */\n bannerKind: {\n type: String,\n default: 'warning',\n validator (kind) {\n return NOTICE_KINDS.includes(kind);\n },\n },\n\n /**\n * Additional class name for the banner element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n bannerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the header element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n headerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the footer element within the modal.\n * Can accept String, Object, and Array, i.e. has the\n * same API as Vue's built-in handling of the class attribute.\n */\n footerClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Shows the close button on the modal\n * @values true, false\n */\n showClose: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the modal will close when you click outside of the dialog on the overlay.\n * @values true, false\n */\n closeOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Scrollable modal that allows scroll the modal content keeping the header and footer fixed\n * @values true, false\n */\n fixedHeaderFooter: {\n type: Boolean,\n default: true,\n },\n\n /**\n * The element that is focused when the modal is opened. This can be an\n * HTMLElement within the modal, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n */\n initialFocusElement: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'first',\n validator: initialFocusElement => {\n return initialFocusElement === 'first' ||\n (initialFocusElement instanceof HTMLElement) ||\n initialFocusElement.startsWith('#');\n },\n },\n\n /**\n * A CSS selector string for the element to portal the modal to. If not provided, the modal will be rendered in its default location.\n */\n appendTo: {\n type: String,\n default: undefined,\n },\n\n /**\n * When true, the surrounding backdrop is rendered fully transparent\n * instead of the default dimming overlay. The dialog box itself\n * remains opaque. Useful when the underlying UI should remain visible.\n * @values true, false\n */\n transparentBackdrop: {\n type: Boolean,\n default: false,\n },\n },\n\n emits: [\n /**\n * Native button click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n\n /**\n * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * The modal will emit a \"false\" boolean value for this event when the user performs a modal-closing action.\n * Parent components can sync on this value to create a 2-way binding to control modal visibility.\n *\n * @event update:open\n * @type {Boolean}\n */\n 'update:open',\n ],\n\n data () {\n return {\n MODAL_KIND_MODIFIERS,\n MODAL_BANNER_KINDS,\n hasSlotContent,\n i18n: new DialtoneLocalization(),\n autoTeleportTarget: null,\n };\n },\n\n computed: {\n hasFooterSlot () {\n return !!this.$slots.footer;\n },\n\n bannerKindClass () {\n return MODAL_BANNER_KINDS[this.bannerKind];\n },\n\n closeButtonTitle () {\n return this.i18n.$t('DIALTONE_CLOSE_BUTTON');\n },\n },\n\n watch: {\n open (isShowing) {\n this.syncDialogState(isShowing);\n },\n },\n\n mounted () {\n if (!this.appendTo) {\n const root = this.$el?.getRootNode();\n if (root instanceof ShadowRoot) {\n this.autoTeleportTarget = root;\n // Defer syncDialogState so the teleport renders inside the shadow root first.\n if (this.open) this.$nextTick(() => { if (this.open) this.syncDialogState(true); });\n return;\n }\n }\n if (this.open) {\n this.syncDialogState(true);\n }\n },\n\n beforeUnmount () {\n const dialogEl = this.$refs.dialogEl;\n if (dialogEl?.open) {\n dialogEl.close();\n enableRootScrolling(this.getScrollRoot());\n }\n this.previousActiveElement = null;\n },\n\n methods: {\n getScrollRoot () {\n return returnFirstEl(this.$refs.dialogEl)?.getRootNode()?.host;\n },\n\n syncDialogState (isShowing) {\n const dialogEl = this.$refs.dialogEl;\n if (!dialogEl) return;\n\n if (isShowing) {\n this.previousActiveElement = document.activeElement;\n if (!dialogEl.open) {\n dialogEl.showModal();\n }\n disableRootScrolling(this.getScrollRoot());\n } else if (dialogEl.open) {\n // Leave transition plays via v-show on inner content.\n // close() is called in onAfterLeave when transition completes.\n enableRootScrolling(this.getScrollRoot());\n }\n },\n\n close () {\n this.$emit('update:open', false);\n },\n\n onBackdropClick (event) {\n if (this.closeOnClick && event.target === event.currentTarget) {\n this.close();\n }\n this.$emit('click', event);\n },\n\n onKeydown (event) {\n this.$emit('keydown', event);\n },\n\n async onAfterEnter () {\n this.$emit('update:open', true);\n await this.setFocusAfterTransition();\n },\n\n onAfterLeave () {\n const dialogEl = this.$refs.dialogEl;\n if (dialogEl?.open) {\n dialogEl.close();\n }\n this.previousActiveElement?.focus();\n this.previousActiveElement = null;\n },\n\n focusFirstTabbable (container) {\n const focusable = [...container.querySelectorAll(focusableSelector)];\n if (!focusable.length) return;\n let target = focusable[0];\n // If first focusable is an unchecked radio, prefer the checked radio in the same group.\n if (target.matches('[type=\"radio\"]:not(:checked)')) {\n target = focusable.find(el => el.checked && el.name === target.name) || target;\n }\n target.focus({ preventScroll: true });\n },\n\n async setFocusAfterTransition () {\n const dialogEl = this.$refs.dialogEl;\n if (!dialogEl) return;\n\n await this.$nextTick();\n\n if (this.initialFocusElement === 'first') {\n this.focusFirstTabbable(dialogEl);\n } else if (typeof this.initialFocusElement === 'string' && this.initialFocusElement.startsWith('#')) {\n const el = dialogEl.querySelector(this.initialFocusElement);\n if (el) {\n el.focus();\n } else {\n // eslint-disable-next-line no-console\n console.warn('Could not find the element specified in dt-modal prop \"initialFocusElement\". ' +\n 'Defaulting to focusing the first element.');\n this.focusFirstTabbable(dialogEl);\n }\n } else if (this.initialFocusElement instanceof HTMLElement) {\n this.initialFocusElement.focus();\n }\n },\n },\n};\n</script>\n"],"mappings":";;;;;;;;;;;;;AAkJA,IAAM,IAAoB,0LAQrB,IAAU;CACb,MAAM;CAEN,YAAY;EACV,UAAA;EACA,QAAA;EACA;EACA,mBAAA;EACD;CAED,QAAQ,CAAC,EAAU;CAEnB,OAAO;EAIL,MAAM;GACJ,MAAM;GACN,SAAS;GACV;EAOD,eAAe;GACb,MAAM;GACN,SAAS;GACV;EAKD,cAAc;GACZ,MAAM;GACN,SAAS,WAAY;AAAE,WAAO,GAAiB;;GAChD;EAOD,MAAM;GACJ,MAAM;GACN,SAAS;GACV;EAKD,YAAY;GACV,MAAM;GACN,SAAS,KAAA;GACV;EAKD,kBAAkB;GAChB,MAAM;GACN,SAAS,KAAA;GACV;EAMD,MAAM;GACJ,MAAM;GACN,SAAS;GACT,YAAY,MAAM,OAAO,KAAK,EAAqB,CAAC,SAAS,EAAE;GAChE;EAMD,YA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C,EAAsB,EAAA,QAAA,SAAA,CAAA,EAAA,EAAA,IAAA,EAAA,IAAA,GAAA;GAGf,EAAA,kBAGT,EAgBY,GAAA;;IAdV,OAAM;IACN,WAAQ;IACP,MAAM;IACP,MAAK;IACL,YAAW;IACV,cAAY,EAAA;IACZ,OAAO,EAAA;IACP,SAAO,EAAA;;IAEG,MAAI,GAGX,EAHe,kBAAQ,CACzB,EAEE,GAAA,EADC,MAAM,GAAQ,EAAA,MAAA,GAAA,CAAA,OAAA,CAAA,CAAA,CAAA;;;;;;UAhBZ,GAAA,EADT,EAGE,GAAA;;IADC,SAAO,EAAA;;cA5DF,EAAA,KAAI,CAAA,CAAA,CAAA,CAAA;;;;;;;UArCU,EAAA;EAAI,cAAA;EAAA,cAAA;EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,GAAA,CAAA,YAAA,KAAA,CAAA"}
@@ -1,2 +1,2 @@
1
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/constants/index.cjs`),t=require(`../../common/utils/index.cjs`),n=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),r=require(`../../common/mixins/modal.cjs`),i=require(`../../common/mixins/mode.cjs`),a=require(`../../shared/sr_only_close_button.cjs`),o=require(`./tippy-utils.cjs`),s=require(`./popover-constants.cjs`),c=require(`../lazy-show/lazy-show.cjs`),l=require(`./popover-header-footer.cjs`);let u=require(`vue`);var d={name:`DtPopover`,components:{SrOnlyCloseButton:a.default,DtLazyShow:c.default,PopoverHeaderFooter:l.default},mixins:[r.default,i.default],props:{open:{type:[Boolean,null],default:null},openOnContext:{type:Boolean,default:!1},elementType:{type:String,default:`div`},transition:{type:String,default:`fade`},role:{type:String,default:`dialog`,validator:e=>s.POPOVER_ROLES.includes(e)},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null},padding:{type:String,default:`large`,validator:e=>Object.keys(s.POPOVER_PADDING_CLASSES).some(t=>t===e)},contentClass:{type:[String,Array,Object],default:``},contentWidth:{type:String,default:``,validator:e=>s.POPOVER_CONTENT_WIDTHS.includes(e)},contentAppear:{type:Boolean,default:null},contentTabindex:{type:Number||null,default:-1},externalAnchor:{type:String,default:``},externalAnchorElement:{type:e.HTML_ELEMENT_TYPE,default:null},id:{type:String,default(){return t.getUniqueString()}},offset:{type:Array,default:()=>[0,4]},closeOnClick:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},focustrap:{type:Boolean,default:!1},fallbackPlacements:{type:Array,default:()=>[`auto`]},placement:{type:String,default:`bottom-end`},tether:{type:Boolean,default:!0},sticky:{type:[Boolean,String],default:!1,validator:e=>s.POPOVER_STICKY_VALUES.includes(e)},maxHeight:{type:String,default:``},maxWidth:{type:String,default:``},showCloseButton:{type:Boolean,default:!1},anchorClass:{type:[String,Array,Object],default:``},headerWrapperClass:{type:[String,Array,Object],default:``},headerClass:{type:[String,Array,Object],default:``},footerWrapperClass:{type:[String,Array,Object],default:``},footerClass:{type:[String,Array,Object],default:``},dialogClass:{type:[String,Array,Object],default:``},initialFocusElement:{type:[String,e.HTML_ELEMENT_TYPE],default:`first`,validator:e=>s.POPOVER_INITIAL_FOCUS_STRINGS.includes(e)||e instanceof HTMLElement||e.startsWith(`#`)},openWithArrowKeys:{type:Boolean,default:!1},appendTo:{type:[e.HTML_ELEMENT_TYPE,String],default:`body`,validator:e=>s.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement}},emits:[`keydown`,`update:open`,`opened`,`mouseenter-popover`,`mouseleave-popover`,`mouseenter-popover-anchor`,`mouseleave-popover-anchor`],data(){return{POPOVER_PADDING_CLASSES:s.POPOVER_PADDING_CLASSES,POPOVER_HEADER_FOOTER_PADDING_CLASSES:s.POPOVER_HEADER_FOOTER_PADDING_CLASSES,intersectionObserver:null,mutationObserver:null,isOutsideViewport:!1,isOpen:!1,toAppear:!1,anchorEl:null,popoverContentEl:null,hasSlotContent:t.hasSlotContent}},computed:{popoverListeners(){return{keydown:e=>{this.onKeydown(e)},"after-leave":()=>{this.onLeaveTransitionComplete()},"after-enter":()=>{this.onEnterTransitionComplete()}}},calculatedMaxHeight(){return this.isOutsideViewport&&this.modal?`calc(100vh - var(--dt-spacing-50))`:this.maxHeight},labelledBy(){return this.ariaLabelledby||!this.ariaLabel&&t.getUniqueString(`DtPopover__anchor`)}},watch:{$props:{immediate:!0,deep:!0,handler(){this.validateProps()}},modal(e){this.tip?.setProps({zIndex:e?650:this.calculateAnchorZindex()})},offset(e){this.tip?.setProps({offset:e})},sticky(e){this.tip?.setProps({sticky:e})},fallbackPlacements(){this.tip?.setProps({popperOptions:this.popperOptions()})},tether(){this.tip?.setProps({popperOptions:this.popperOptions()})},externalAnchorElement(){this.updateAnchorEl()},placement(e){this.tip?.setProps({placement:e})},open:{handler:function(e){e!==null&&(this.isOpen=e),e===!0&&(this.toAppear=!0)},immediate:!0},contentAppear:{handler:function(e){e!==null&&(this.toAppear=e)}},isOpen(e,t){e?(this.initTippyInstance(),this.tip?.show()):!e&&t!==e&&(this.removeEventListeners(),this.tip?.hide())}},mounted(){t.warnIfUnmounted(t.returnFirstEl(this.$el),this.$options.name),this.popoverContentEl=t.returnFirstEl(this.$refs.content?.$el),this.updateAnchorEl(),this.mutationObserver=new MutationObserver(this.updateAnchorEl),this.mutationObserver.observe(this.$refs.anchor,{childList:!0}),this.intersectionObserver=new IntersectionObserver(this.hasIntersectedViewport),this.intersectionObserver.observe(this.popoverContentEl)},beforeUnmount(){this._isUnmounting=!0,this.popoverContentEl&&(this.popoverContentEl.style.transition=`none`),this.tip?.destroy(),this.intersectionObserver?.disconnect(),this.mutationObserver?.disconnect(),this.removeReferences(),this.removeEventListeners()},methods:{getModeReferenceEl(){return this.$refs.anchor},hasIntersectedViewport(e){let n=e?.[0]?.target;if(!n)return;let r=t.isOutOfViewPort(n);this.isOutsideViewport=r.bottom||r.top},updateAnchorEl(){let e=(this.externalAnchorElement||(this.externalAnchor?this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`):null))??this.$refs.anchor.children[0];if(e!==this.anchorEl){if(this.anchorEl=e,this.tip?.destroy(),delete this.tip,!this.anchorEl){console.warn(`No anchor found for popover`);return}this.isOpen&&(this.initTippyInstance(),this.tip?.show())}},popperOptions(){return o.getPopperOptions({fallbackPlacements:this.fallbackPlacements,tether:this.tether,hasHideModifierEnabled:!0})},validateProps(){this.modal&&this.initialFocusElement===`none`&&console.error(`If the popover is modal you must set the initialFocusElement prop. Possible values: "dialog", "first", HTMLElement`)},calculateAnchorZindex(){return t.returnFirstEl(this.$el).getRootNode().querySelector(`.d-modal[aria-hidden="false"], .d-modal--transparent[aria-hidden="false"], .d-modal[open], .d-modal--transparent[open]`)||this.anchorEl?.closest(`.d-zi-drawer`)?650:300},defaultToggleOpen(e){if(!this.openOnContext&&(this.open===null||this.open===void 0)){if(!this.anchorEl?.contains(e.target)&&!this.anchorEl?.isEqualNode(e.target)||this.anchorEl?.disabled)return;this.toggleOpen()}},async onContext(e){this.openOnContext&&(e.preventDefault(),this.isOpen=!0,await this.$nextTick(),this.tip?.setProps({placement:`right-start`,getReferenceClientRect:()=>({width:0,height:0,top:e.clientY,bottom:e.clientY,left:e.clientX,right:e.clientX})}))},toggleOpen(){this.isOpen=!this.isOpen},onArrowKeyPress(e){this.open===null&&(this.openWithArrowKeys&&this.anchorEl?.contains(e.target)&&(this.isOpen||(this.isOpen=!0)),this.$emit(`keydown`,e))},addEventListeners(){window.addEventListener(`dt-popover-close`,this.closePopover),this.contentWidth===`anchor`&&window.addEventListener(`resize`,this.onResize)},removeEventListeners(){window.removeEventListener(`dt-popover-close`,this.closePopover),this.contentWidth===`anchor`&&window.removeEventListener(`resize`,this.onResize)},closePopover(){this.isOpen=!1},preventScrolling(){if(this.modal){let e=this.anchorEl?.closest(`body, .tippy-box`);if(!e)return;e.tagName?.toLowerCase()===`body`?(t.disableRootScrolling(this.anchorEl.getRootNode().host),this.tip?.setProps({offset:this.offset})):e.classList.add(`d-zi-popover`)}},enableScrolling(){let e=this.anchorEl?.closest(`body, .tippy-box`);e&&(e.tagName?.toLowerCase()===`body`?(t.enableRootScrolling(this.anchorEl.getRootNode().host),this.tip?.setProps({offset:this.offset})):e.classList.remove(`d-zi-popover`))},removeReferences(){this.anchorEl=null,this.popoverContentEl=null,this.tip=null},async onShow(){this.contentWidth===`anchor`&&await this.setPopoverContentAnchorWidth(),this.contentWidth===null&&(this.popoverContentEl.style.width=`auto`),this.addEventListeners()},async onLeaveTransitionComplete(){if(!this._isUnmounting){if(this.modal){if(await this.focusFirstElement(this.$refs.anchor),this._isUnmounting||(await this.$nextTick(),this._isUnmounting))return;this.enableScrolling()}this._isUnmounting||(this.tip?.unmount(),this.$emit(`opened`,!1),this.open!==null&&this.$emit(`update:open`,!1))}},async onEnterTransitionComplete(){this._isUnmounting||(this.focusInitialElement(),await this.$nextTick(),!this._isUnmounting&&(this.preventScrolling(),this.$emit(`opened`,!0,this.$refs.popover__content),this.open!==null&&this.$emit(`update:open`,!0)))},focusInitialElement(){this.initialFocusElement===`dialog`&&t.returnFirstEl(this.$refs.content?.$el)?.focus(),this.initialFocusElement.startsWith(`#`)&&this.focusInitialElementById(),this.initialFocusElement===`first`&&this.focusFirstElementIfNeeded(this.$refs.popover__content),this.initialFocusElement instanceof HTMLElement&&this.initialFocusElement.focus()},focusInitialElementById(){let e=t.returnFirstEl(this.$refs.content?.$el)?.querySelector(this.initialFocusElement);e?e.focus():(console.warn(`Could not find the element specified in dt-popover prop "initialFocusElement". Defaulting to focusing the dialog.`),t.returnFirstEl(this.$refs.content?.$el)?.focus())},onResize(){this.closePopover()},onClickOutside(){this.closeOnClick&&(this.popoverContentEl?.querySelector(`.d-popover__anchor--opened`)||this.closePopover())},onKeydown(e){e.key===`Escape`&&this.closePopover(),this.$emit(`keydown`,e)},async setPopoverContentAnchorWidth(){await this.$nextTick(),this.popoverContentEl.style.width=`${this.anchorEl?.clientWidth}px`},focusFirstElementIfNeeded(e){this._getFocusableElements(e,!0).length===0?this.showCloseButton?this.$refs.popover__header?.focusCloseButton():t.returnFirstEl(this.$refs.content?.$el).focus():this.focusFirstElement(e)},getReferenceClientRect(e){let t=this.anchorEl?.getBoundingClientRect();if(this.appendTo!==`root`||e)return t;let n=this.anchorEl?.ownerDocument,r=(n?.defaultView||n?.parentWindow)?.frameElement;if(!r)return t;let i=r.getBoundingClientRect();return{width:t?.width,height:t?.height,top:i?.top+t?.top,left:i?.left+t?.left,right:i?.right+t?.right,bottom:i?.bottom+t?.bottom}},initTippyInstance(){let e=null,t=!1;switch(this.appendTo){case`body`:e=this.anchorEl?.closest(`dialog`)??this.anchorEl?.getRootNode()?.querySelector(`body`);break;case`root`:try{e=window.parent.document.body}catch(n){console.error(`Could not attach the popover to iframe parent window: `,n),e=`parent`,t=!0}break;default:e=this.appendTo;break}this.tip?.destroy(),this.tip=o.createTippyPopover(this.anchorEl,{popperOptions:this.popperOptions(),contentElement:this.popoverContentEl,placement:this.placement,offset:this.offset,sticky:this.sticky,appendTo:e,interactive:!0,trigger:`manual`,getReferenceClientRect:()=>this.getReferenceClientRect(t),hideOnClick:!1,zIndex:this.modal?650:this.calculateAnchorZindex(),onClickOutside:this.onClickOutside,onShow:this.onShow})},onMouseEnter(){this.$emit(`mouseenter-popover`)},onMouseLeave(){this.$emit(`mouseleave-popover`)},onMouseEnterAnchor(){this.$emit(`mouseenter-popover-anchor`)},onMouseLeaveAnchor(){this.$emit(`mouseleave-popover-anchor`)}}},f=[`id`,`data-qa`,`tabindex`],p=[`data-qa`];function m(e,t,n,r,i,a){let o=(0,u.resolveComponent)(`popover-header-footer`),s=(0,u.resolveComponent)(`sr-only-close-button`),c=(0,u.resolveComponent)(`dt-lazy-show`),l=(0,u.resolveDirective)(`dt-focustrap`);return(0,u.openBlock)(),(0,u.createElementBlock)(`div`,null,[n.modal&&i.isOpen?((0,u.openBlock)(),(0,u.createBlock)(u.Teleport,{key:0,to:`body`},[(0,u.createElementVNode)(`div`,{class:`d-modal--transparent`,"aria-hidden":`false`,onClick:t[0]||(t[0]=(0,u.withModifiers)(()=>{},[`prevent`,`stop`]))})])):(0,u.createCommentVNode)(``,!0),((0,u.openBlock)(),(0,u.createBlock)((0,u.resolveDynamicComponent)(n.elementType),{ref:`popover`,class:(0,u.normalizeClass)([`d-popover`,{"d-popover__anchor--opened":i.isOpen}]),"data-qa":`dt-popover-container`},{default:(0,u.withCtx)(()=>[(0,u.createElementVNode)(`div`,{id:!n.ariaLabelledby&&a.labelledBy,ref:`anchor`,class:(0,u.normalizeClass)(n.anchorClass),"data-qa":e.$attrs[`data-qa`]?`${e.$attrs[`data-qa`]}-anchor`:`dt-popover-anchor`,tabindex:n.openOnContext?0:void 0,onClickCapture:t[1]||(t[1]=(...e)=>a.defaultToggleOpen&&a.defaultToggleOpen(...e)),onContextmenu:t[2]||(t[2]=(...e)=>a.onContext&&a.onContext(...e)),onKeydown:[t[3]||(t[3]=(0,u.withKeys)((0,u.withModifiers)((...e)=>a.onArrowKeyPress&&a.onArrowKeyPress(...e),[`prevent`]),[`up`])),t[4]||(t[4]=(0,u.withKeys)((0,u.withModifiers)((...e)=>a.onArrowKeyPress&&a.onArrowKeyPress(...e),[`prevent`]),[`down`])),t[6]||(t[6]=(0,u.withKeys)(t=>e.$emit(`keydown`,t),[`enter`])),t[7]||(t[7]=(0,u.withKeys)(t=>e.$emit(`keydown`,t),[`space`]))],onKeydownCapture:t[5]||(t[5]=(0,u.withKeys)((...e)=>a.closePopover&&a.closePopover(...e),[`escape`])),onMouseenter:t[8]||(t[8]=(...e)=>a.onMouseEnter&&a.onMouseEnter(...e)),onMouseleave:t[9]||(t[9]=(...e)=>a.onMouseLeave&&a.onMouseLeave(...e))},[(0,u.renderSlot)(e.$slots,`anchor`,{attrs:{"aria-expanded":i.isOpen.toString(),"aria-controls":n.id,"aria-haspopup":n.role}})],42,f),(0,u.withDirectives)(((0,u.openBlock)(),(0,u.createBlock)(c,(0,u.mergeProps)({id:n.id,ref:`content`,role:n.role,"data-qa":e.$attrs[`data-qa`]?`${e.$attrs[`data-qa`]}__dialog`:`dt-popover`,"aria-hidden":`${!i.isOpen}`,"aria-labelledby":a.labelledBy,"aria-label":n.ariaLabel,"aria-modal":`${!n.modal}`,transition:n.transition,show:i.isOpen,appear:i.toAppear,class:[`d-popover__dialog`,{"d-popover__dialog--modal":n.modal},n.dialogClass],style:{"max-height":a.calculatedMaxHeight,"max-width":n.maxWidth},css:e.$attrs.css,tabindex:n.contentTabindex},e.modeAttrs,(0,u.toHandlers)(a.popoverListeners),{onMouseenter:a.onMouseEnterAnchor,onMouseleave:a.onMouseLeaveAnchor}),{default:(0,u.withCtx)(()=>[i.hasSlotContent(e.$slots.headerContent)||n.showCloseButton?((0,u.openBlock)(),(0,u.createBlock)(o,{key:0,ref:`popover__header`,class:(0,u.normalizeClass)([i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[n.padding],n.headerWrapperClass]),"content-class":n.headerClass,type:`header`,"show-close-button":n.showCloseButton,onClose:a.closePopover},{content:(0,u.withCtx)(()=>[(0,u.renderSlot)(e.$slots,`headerContent`,{close:a.closePopover})]),_:3},8,[`class`,`content-class`,`show-close-button`,`onClose`])):(0,u.createCommentVNode)(``,!0),(0,u.createElementVNode)(`div`,{ref:`popover__content`,"data-qa":e.$attrs[`data-qa`]?`${e.$attrs[`data-qa`]}-content`:`dt-popover-content`,class:(0,u.normalizeClass)([`d-popover__content`,i.POPOVER_PADDING_CLASSES[n.padding],n.contentClass])},[(0,u.renderSlot)(e.$slots,`content`,{close:a.closePopover})],10,p),i.hasSlotContent(e.$slots.footerContent)?((0,u.openBlock)(),(0,u.createBlock)(o,{key:1,ref:`popover__footer`,type:`footer`,class:(0,u.normalizeClass)([i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[n.padding],n.footerWrapperClass]),"content-class":n.footerClass},{content:(0,u.withCtx)(()=>[(0,u.renderSlot)(e.$slots,`footerContent`,{close:a.closePopover})]),_:3},8,[`class`,`content-class`])):(0,u.createCommentVNode)(``,!0),n.showCloseButton?(0,u.createCommentVNode)(``,!0):((0,u.openBlock)(),(0,u.createBlock)(s,{key:2,onClose:a.closePopover},null,8,[`onClose`]))]),_:3},16,[`id`,`role`,`data-qa`,`aria-hidden`,`aria-labelledby`,`aria-label`,`aria-modal`,`transition`,`show`,`appear`,`class`,`style`,`css`,`tabindex`,`onMouseenter`,`onMouseleave`])),[[l,{active:(n.modal||n.focustrap)&&i.isOpen,initialFocus:!1,restoreFocus:!n.modal&&n.focustrap}]])]),_:3},8,[`class`]))])}var h=n.t(d,[[`render`,m]]);exports.default=h;
1
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}}),require(`../../chunk-Bmb41Sf3.cjs`);const e=require(`../../common/constants/index.cjs`),t=require(`../../common/utils/index.cjs`),n=require(`../../_plugin-vue_export-helper-D8jCH6HB.cjs`),r=require(`../../common/mixins/modal.cjs`),i=require(`../../common/mixins/mode.cjs`),a=require(`../../shared/sr_only_close_button.cjs`),o=require(`./tippy-utils.cjs`),s=require(`./popover-constants.cjs`),c=require(`../lazy-show/lazy-show.cjs`),l=require(`./popover-header-footer.cjs`);let u=require(`vue`);var d={name:`DtPopover`,components:{SrOnlyCloseButton:a.default,DtLazyShow:c.default,PopoverHeaderFooter:l.default},mixins:[r.default,i.default],props:{open:{type:[Boolean,null],default:null},openOnContext:{type:Boolean,default:!1},elementType:{type:String,default:`div`},transition:{type:String,default:`fade`},role:{type:String,default:`dialog`,validator:e=>s.POPOVER_ROLES.includes(e)},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null},padding:{type:String,default:`large`,validator:e=>Object.keys(s.POPOVER_PADDING_CLASSES).some(t=>t===e)},contentClass:{type:[String,Array,Object],default:``},contentWidth:{type:String,default:``,validator:e=>s.POPOVER_CONTENT_WIDTHS.includes(e)},contentAppear:{type:Boolean,default:null},contentTabindex:{type:Number||null,default:-1},externalAnchor:{type:String,default:``},externalAnchorElement:{type:e.HTML_ELEMENT_TYPE,default:null},id:{type:String,default(){return t.getUniqueString()}},offset:{type:Array,default:()=>[0,4]},closeOnClick:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},focustrap:{type:Boolean,default:!1},fallbackPlacements:{type:Array,default:()=>[`auto`]},placement:{type:String,default:`bottom-end`},tether:{type:Boolean,default:!0},sticky:{type:[Boolean,String],default:!1,validator:e=>s.POPOVER_STICKY_VALUES.includes(e)},maxHeight:{type:String,default:``},maxWidth:{type:String,default:``},showCloseButton:{type:Boolean,default:!1},anchorClass:{type:[String,Array,Object],default:``},headerWrapperClass:{type:[String,Array,Object],default:``},headerClass:{type:[String,Array,Object],default:``},footerWrapperClass:{type:[String,Array,Object],default:``},footerClass:{type:[String,Array,Object],default:``},dialogClass:{type:[String,Array,Object],default:``},initialFocusElement:{type:[String,e.HTML_ELEMENT_TYPE],default:`first`,validator:e=>s.POPOVER_INITIAL_FOCUS_STRINGS.includes(e)||e instanceof HTMLElement||e.startsWith(`#`)},openWithArrowKeys:{type:Boolean,default:!1},appendTo:{type:[e.HTML_ELEMENT_TYPE,String],default:`body`,validator:e=>s.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement}},emits:[`keydown`,`update:open`,`opened`,`mouseenter-popover`,`mouseleave-popover`,`mouseenter-popover-anchor`,`mouseleave-popover-anchor`],data(){return{POPOVER_PADDING_CLASSES:s.POPOVER_PADDING_CLASSES,POPOVER_HEADER_FOOTER_PADDING_CLASSES:s.POPOVER_HEADER_FOOTER_PADDING_CLASSES,intersectionObserver:null,mutationObserver:null,isOutsideViewport:!1,isOpen:!1,toAppear:!1,anchorEl:null,popoverContentEl:null,hasSlotContent:t.hasSlotContent}},computed:{popoverListeners(){return{keydown:e=>{this.onKeydown(e)},"after-leave":()=>{this.onLeaveTransitionComplete()},"after-enter":()=>{this.onEnterTransitionComplete()}}},calculatedMaxHeight(){return this.isOutsideViewport&&this.modal?`calc(100vh - var(--dt-spacing-50))`:this.maxHeight},labelledBy(){return this.ariaLabelledby||!this.ariaLabel&&t.getUniqueString(`DtPopover__anchor`)}},watch:{$props:{immediate:!0,deep:!0,handler(){this.validateProps()}},modal(e){this.tip?.setProps({zIndex:e?650:this.calculateAnchorZindex()})},offset(e){this.tip?.setProps({offset:e})},sticky(e){this.tip?.setProps({sticky:e})},fallbackPlacements(){this.tip?.setProps({popperOptions:this.popperOptions()})},tether(){this.tip?.setProps({popperOptions:this.popperOptions()})},externalAnchorElement(){this.updateAnchorEl()},placement(e){this.tip?.setProps({placement:e})},open:{handler:function(e){e!==null&&(this.isOpen=e),e===!0&&(this.toAppear=!0)},immediate:!0},contentAppear:{handler:function(e){e!==null&&(this.toAppear=e)}},isOpen(e,t){e?(this.initTippyInstance(),this.tip?.show()):!e&&t!==e&&(this.removeEventListeners(),this.tip?.hide())}},mounted(){t.warnIfUnmounted(t.returnFirstEl(this.$el),this.$options.name),this.popoverContentEl=t.returnFirstEl(this.$refs.content?.$el),this.updateAnchorEl(),this.mutationObserver=new MutationObserver(this.updateAnchorEl),this.mutationObserver.observe(this.$refs.anchor,{childList:!0}),this.intersectionObserver=new IntersectionObserver(this.hasIntersectedViewport),this.intersectionObserver.observe(this.popoverContentEl)},beforeUnmount(){this._isUnmounting=!0,this.popoverContentEl&&(this.popoverContentEl.style.transition=`none`),this.tip?.destroy(),this.intersectionObserver?.disconnect(),this.mutationObserver?.disconnect(),this.removeReferences(),this.removeEventListeners()},methods:{getModeReferenceEl(){return this.$refs.anchor},hasIntersectedViewport(e){let n=e?.[0]?.target;if(!n)return;let r=t.isOutOfViewPort(n);this.isOutsideViewport=r.bottom||r.top},updateAnchorEl(){let e=(this.externalAnchorElement||(this.externalAnchor?this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`):null))??this.$refs.anchor.children[0];if(e!==this.anchorEl){if(this.anchorEl=e,this.tip?.destroy(),delete this.tip,!this.anchorEl){console.warn(`No anchor found for popover`);return}this.isOpen&&(this.initTippyInstance(),this.tip?.show())}},popperOptions(){return o.getPopperOptions({fallbackPlacements:this.fallbackPlacements,tether:this.tether,hasHideModifierEnabled:!0})},validateProps(){this.modal&&this.initialFocusElement===`none`&&console.error(`If the popover is modal you must set the initialFocusElement prop. Possible values: "dialog", "first", HTMLElement`)},calculateAnchorZindex(){return t.returnFirstEl(this.$el).getRootNode().querySelector(`.d-modal[aria-hidden="false"], .d-modal--transparent[aria-hidden="false"], .d-modal[open], .d-modal--transparent[open]`)||this.anchorEl?.closest(`.d-zi-drawer`)?650:300},defaultToggleOpen(e){if(!this.openOnContext&&(this.open===null||this.open===void 0)){if(!this.anchorEl?.contains(e.target)&&!this.anchorEl?.isEqualNode(e.target)||this.anchorEl?.disabled)return;this.toggleOpen()}},async onContext(e){this.openOnContext&&(e.preventDefault(),this.isOpen=!0,await this.$nextTick(),this.tip?.setProps({placement:`right-start`,getReferenceClientRect:()=>({width:0,height:0,top:e.clientY,bottom:e.clientY,left:e.clientX,right:e.clientX})}))},toggleOpen(){this.isOpen=!this.isOpen},onArrowKeyPress(e){this.open===null&&(this.openWithArrowKeys&&this.anchorEl?.contains(e.target)&&(this.isOpen||(this.isOpen=!0)),this.$emit(`keydown`,e))},addEventListeners(){window.addEventListener(`dt-popover-close`,this.closePopover),this.contentWidth===`anchor`&&window.addEventListener(`resize`,this.onResize)},removeEventListeners(){window.removeEventListener(`dt-popover-close`,this.closePopover),this.contentWidth===`anchor`&&window.removeEventListener(`resize`,this.onResize)},closePopover(){this.isOpen=!1},preventScrolling(){if(this.modal){let e=this.anchorEl?.closest(`body, .tippy-box`);if(!e)return;e.tagName?.toLowerCase()===`body`?(t.disableRootScrolling(this.anchorEl.getRootNode().host),this.tip?.setProps({offset:this.offset})):e.classList.add(`d-zi-popover`)}},enableScrolling(){let e=this.anchorEl?.closest(`body, .tippy-box`);e&&(e.tagName?.toLowerCase()===`body`?(t.enableRootScrolling(this.anchorEl.getRootNode().host),this.tip?.setProps({offset:this.offset})):e.classList.remove(`d-zi-popover`))},removeReferences(){this.anchorEl=null,this.popoverContentEl=null,this.tip=null},async onShow(){this.contentWidth===`anchor`&&(await this.setPopoverContentAnchorWidth(),this._isUnmounting)||(this.contentWidth===null&&(this.popoverContentEl.style.width=`auto`),this.addEventListeners())},async onLeaveTransitionComplete(){if(!this._isUnmounting){if(this.modal){if(await this.focusFirstElement(this.$refs.anchor),this._isUnmounting||(await this.$nextTick(),this._isUnmounting))return;this.enableScrolling()}this._isUnmounting||(this.tip?.unmount(),this.$emit(`opened`,!1),this.open!==null&&this.$emit(`update:open`,!1))}},async onEnterTransitionComplete(){this._isUnmounting||(this.focusInitialElement(),await this.$nextTick(),!this._isUnmounting&&(this.preventScrolling(),this.$emit(`opened`,!0,this.$refs.popover__content),this.open!==null&&this.$emit(`update:open`,!0)))},focusInitialElement(){this.initialFocusElement===`dialog`&&t.returnFirstEl(this.$refs.content?.$el)?.focus(),this.initialFocusElement.startsWith(`#`)&&this.focusInitialElementById(),this.initialFocusElement===`first`&&this.focusFirstElementIfNeeded(this.$refs.popover__content),this.initialFocusElement instanceof HTMLElement&&this.initialFocusElement.focus()},focusInitialElementById(){let e=t.returnFirstEl(this.$refs.content?.$el)?.querySelector(this.initialFocusElement);e?e.focus():(console.warn(`Could not find the element specified in dt-popover prop "initialFocusElement". Defaulting to focusing the dialog.`),t.returnFirstEl(this.$refs.content?.$el)?.focus())},onResize(){this.closePopover()},onClickOutside(){this.closeOnClick&&(this.popoverContentEl?.querySelector(`.d-popover__anchor--opened`)||this.closePopover())},onKeydown(e){e.key===`Escape`&&this.closePopover(),this.$emit(`keydown`,e)},async setPopoverContentAnchorWidth(){await this.$nextTick(),this.popoverContentEl.style.width=`${this.anchorEl?.clientWidth}px`},focusFirstElementIfNeeded(e){this._getFocusableElements(e,!0).length===0?this.showCloseButton?this.$refs.popover__header?.focusCloseButton():t.returnFirstEl(this.$refs.content?.$el).focus():this.focusFirstElement(e)},getReferenceClientRect(e){let t=this.anchorEl?.getBoundingClientRect();if(this.appendTo!==`root`||e)return t;let n=this.anchorEl?.ownerDocument,r=(n?.defaultView||n?.parentWindow)?.frameElement;if(!r)return t;let i=r.getBoundingClientRect();return{width:t?.width,height:t?.height,top:i?.top+t?.top,left:i?.left+t?.left,right:i?.right+t?.right,bottom:i?.bottom+t?.bottom}},initTippyInstance(){let e=null,t=!1;switch(this.appendTo){case`body`:e=this.anchorEl?.closest(`dialog`)??this.anchorEl?.getRootNode()?.querySelector(`body`);break;case`root`:try{e=window.parent.document.body}catch(n){console.error(`Could not attach the popover to iframe parent window: `,n),e=`parent`,t=!0}break;default:e=this.appendTo;break}this.tip?.destroy(),this.tip=o.createTippyPopover(this.anchorEl,{popperOptions:this.popperOptions(),contentElement:this.popoverContentEl,placement:this.placement,offset:this.offset,sticky:this.sticky,appendTo:e,interactive:!0,trigger:`manual`,getReferenceClientRect:()=>this.getReferenceClientRect(t),hideOnClick:!1,zIndex:this.modal?650:this.calculateAnchorZindex(),onClickOutside:this.onClickOutside,onShow:this.onShow})},onMouseEnter(){this.$emit(`mouseenter-popover`)},onMouseLeave(){this.$emit(`mouseleave-popover`)},onMouseEnterAnchor(){this.$emit(`mouseenter-popover-anchor`)},onMouseLeaveAnchor(){this.$emit(`mouseleave-popover-anchor`)}}},f=[`id`,`data-qa`,`tabindex`],p=[`data-qa`];function m(e,t,n,r,i,a){let o=(0,u.resolveComponent)(`popover-header-footer`),s=(0,u.resolveComponent)(`sr-only-close-button`),c=(0,u.resolveComponent)(`dt-lazy-show`),l=(0,u.resolveDirective)(`dt-focustrap`);return(0,u.openBlock)(),(0,u.createElementBlock)(`div`,null,[n.modal&&i.isOpen?((0,u.openBlock)(),(0,u.createBlock)(u.Teleport,{key:0,to:`body`},[(0,u.createElementVNode)(`div`,{class:`d-modal--transparent`,"aria-hidden":`false`,onClick:t[0]||(t[0]=(0,u.withModifiers)(()=>{},[`prevent`,`stop`]))})])):(0,u.createCommentVNode)(``,!0),((0,u.openBlock)(),(0,u.createBlock)((0,u.resolveDynamicComponent)(n.elementType),{ref:`popover`,class:(0,u.normalizeClass)([`d-popover`,{"d-popover__anchor--opened":i.isOpen}]),"data-qa":`dt-popover-container`},{default:(0,u.withCtx)(()=>[(0,u.createElementVNode)(`div`,{id:!n.ariaLabelledby&&a.labelledBy,ref:`anchor`,class:(0,u.normalizeClass)(n.anchorClass),"data-qa":e.$attrs[`data-qa`]?`${e.$attrs[`data-qa`]}-anchor`:`dt-popover-anchor`,tabindex:n.openOnContext?0:void 0,onClickCapture:t[1]||(t[1]=(...e)=>a.defaultToggleOpen&&a.defaultToggleOpen(...e)),onContextmenu:t[2]||(t[2]=(...e)=>a.onContext&&a.onContext(...e)),onKeydown:[t[3]||(t[3]=(0,u.withKeys)((0,u.withModifiers)((...e)=>a.onArrowKeyPress&&a.onArrowKeyPress(...e),[`prevent`]),[`up`])),t[4]||(t[4]=(0,u.withKeys)((0,u.withModifiers)((...e)=>a.onArrowKeyPress&&a.onArrowKeyPress(...e),[`prevent`]),[`down`])),t[6]||(t[6]=(0,u.withKeys)(t=>e.$emit(`keydown`,t),[`enter`])),t[7]||(t[7]=(0,u.withKeys)(t=>e.$emit(`keydown`,t),[`space`]))],onKeydownCapture:t[5]||(t[5]=(0,u.withKeys)((...e)=>a.closePopover&&a.closePopover(...e),[`escape`])),onMouseenter:t[8]||(t[8]=(...e)=>a.onMouseEnter&&a.onMouseEnter(...e)),onMouseleave:t[9]||(t[9]=(...e)=>a.onMouseLeave&&a.onMouseLeave(...e))},[(0,u.renderSlot)(e.$slots,`anchor`,{attrs:{"aria-expanded":i.isOpen.toString(),"aria-controls":n.id,"aria-haspopup":n.role}})],42,f),(0,u.withDirectives)(((0,u.openBlock)(),(0,u.createBlock)(c,(0,u.mergeProps)({id:n.id,ref:`content`,role:n.role,"data-qa":e.$attrs[`data-qa`]?`${e.$attrs[`data-qa`]}__dialog`:`dt-popover`,"aria-hidden":`${!i.isOpen}`,"aria-labelledby":a.labelledBy,"aria-label":n.ariaLabel,"aria-modal":`${!n.modal}`,transition:n.transition,show:i.isOpen,appear:i.toAppear,class:[`d-popover__dialog`,{"d-popover__dialog--modal":n.modal},n.dialogClass],style:{"max-height":a.calculatedMaxHeight,"max-width":n.maxWidth},css:e.$attrs.css,tabindex:n.contentTabindex},e.modeAttrs,(0,u.toHandlers)(a.popoverListeners),{onMouseenter:a.onMouseEnterAnchor,onMouseleave:a.onMouseLeaveAnchor}),{default:(0,u.withCtx)(()=>[i.hasSlotContent(e.$slots.headerContent)||n.showCloseButton?((0,u.openBlock)(),(0,u.createBlock)(o,{key:0,ref:`popover__header`,class:(0,u.normalizeClass)([i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[n.padding],n.headerWrapperClass]),"content-class":n.headerClass,type:`header`,"show-close-button":n.showCloseButton,onClose:a.closePopover},{content:(0,u.withCtx)(()=>[(0,u.renderSlot)(e.$slots,`headerContent`,{close:a.closePopover})]),_:3},8,[`class`,`content-class`,`show-close-button`,`onClose`])):(0,u.createCommentVNode)(``,!0),(0,u.createElementVNode)(`div`,{ref:`popover__content`,"data-qa":e.$attrs[`data-qa`]?`${e.$attrs[`data-qa`]}-content`:`dt-popover-content`,class:(0,u.normalizeClass)([`d-popover__content`,i.POPOVER_PADDING_CLASSES[n.padding],n.contentClass])},[(0,u.renderSlot)(e.$slots,`content`,{close:a.closePopover})],10,p),i.hasSlotContent(e.$slots.footerContent)?((0,u.openBlock)(),(0,u.createBlock)(o,{key:1,ref:`popover__footer`,type:`footer`,class:(0,u.normalizeClass)([i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[n.padding],n.footerWrapperClass]),"content-class":n.footerClass},{content:(0,u.withCtx)(()=>[(0,u.renderSlot)(e.$slots,`footerContent`,{close:a.closePopover})]),_:3},8,[`class`,`content-class`])):(0,u.createCommentVNode)(``,!0),n.showCloseButton?(0,u.createCommentVNode)(``,!0):((0,u.openBlock)(),(0,u.createBlock)(s,{key:2,onClose:a.closePopover},null,8,[`onClose`]))]),_:3},16,[`id`,`role`,`data-qa`,`aria-hidden`,`aria-labelledby`,`aria-label`,`aria-modal`,`transition`,`show`,`appear`,`class`,`style`,`css`,`tabindex`,`onMouseenter`,`onMouseleave`])),[[l,{active:(n.modal||n.focustrap)&&i.isOpen,initialFocus:!1,restoreFocus:!n.modal&&n.focustrap}]])]),_:3},8,[`class`]))])}var h=n.t(d,[[`render`,m]]);exports.default=h;
2
2
  //# sourceMappingURL=popover.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.cjs","names":[],"sources":["../../../components/Popover/Popover.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <div>\n <Teleport\n v-if=\"modal && isOpen\"\n to=\"body\"\n >\n <div\n class=\"d-modal--transparent\"\n aria-hidden=\"false\"\n @click.prevent.stop\n />\n </Teleport>\n <component\n :is=\"elementType\"\n ref=\"popover\"\n :class=\"['d-popover', { 'd-popover__anchor--opened': isOpen }]\"\n data-qa=\"dt-popover-container\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"!ariaLabelledby && labelledBy\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}-anchor` : 'dt-popover-anchor'\"\n :tabindex=\"openOnContext ? 0 : undefined\"\n @click.capture=\"defaultToggleOpen\"\n @contextmenu=\"onContext\"\n @keydown.up.prevent=\"onArrowKeyPress\"\n @keydown.down.prevent=\"onArrowKeyPress\"\n @keydown.escape.capture=\"closePopover\"\n @keydown.enter=\"$emit('keydown', $event)\"\n @keydown.space=\"$emit('keydown', $event)\"\n @mouseenter=\"onMouseEnter\"\n @mouseleave=\"onMouseLeave\"\n >\n <!-- @slot Anchor element that activates the popover. Usually a button. -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-expanded': isOpen.toString(),\n 'aria-controls': id,\n 'aria-haspopup': role,\n }\"\n />\n </div>\n <dt-lazy-show\n :id=\"id\"\n ref=\"content\"\n v-dt-focustrap=\"{\n active: (modal || focustrap) && isOpen,\n initialFocus: false,\n restoreFocus: !modal && focustrap,\n }\"\n :role=\"role\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}__dialog` : 'dt-popover'\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :aria-modal=\"`${!modal}`\"\n :transition=\"transition\"\n :show=\"isOpen\"\n :appear=\"toAppear\"\n :class=\"['d-popover__dialog', { 'd-popover__dialog--modal': modal }, dialogClass]\"\n :style=\"{\n 'max-height': calculatedMaxHeight,\n 'max-width': maxWidth,\n }\"\n :css=\"$attrs.css\"\n :tabindex=\"contentTabindex\"\n v-bind=\"modeAttrs\"\n v-on=\"popoverListeners\"\n @mouseenter=\"onMouseEnterAnchor\"\n @mouseleave=\"onMouseLeaveAnchor\"\n >\n <popover-header-footer\n v-if=\"hasSlotContent($slots.headerContent) || showCloseButton\"\n ref=\"popover__header\"\n :class=\"[POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding], headerWrapperClass]\"\n :content-class=\"headerClass\"\n type=\"header\"\n :show-close-button=\"showCloseButton\"\n @close=\"closePopover\"\n >\n <template #content>\n <!-- @slot Slot for popover header content -->\n <slot\n name=\"headerContent\"\n :close=\"closePopover\"\n />\n </template>\n </popover-header-footer>\n <div\n ref=\"popover__content\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}-content` : 'dt-popover-content'\"\n :class=\"[\n 'd-popover__content',\n POPOVER_PADDING_CLASSES[padding],\n contentClass,\n ]\"\n >\n <!-- @slot Slot for the content that is displayed in the popover when it is open. -->\n <slot\n name=\"content\"\n :close=\"closePopover\"\n />\n </div>\n <popover-header-footer\n v-if=\"hasSlotContent($slots.footerContent)\"\n ref=\"popover__footer\"\n type=\"footer\"\n :class=\"[POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding], footerWrapperClass]\"\n :content-class=\"footerClass\"\n >\n <template #content>\n <!-- @slot Slot for the footer content. -->\n <slot\n name=\"footerContent\"\n :close=\"closePopover\"\n />\n </template>\n </popover-header-footer>\n <sr-only-close-button\n v-if=\"!showCloseButton\"\n @close=\"closePopover\"\n />\n </dt-lazy-show>\n </component>\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport {\n POPOVER_APPEND_TO_VALUES,\n POPOVER_CONTENT_WIDTHS,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n POPOVER_INITIAL_FOCUS_STRINGS,\n POPOVER_PADDING_CLASSES,\n POPOVER_ROLES,\n POPOVER_STICKY_VALUES,\n} from './PopoverConstants';\nimport { getUniqueString, hasSlotContent, isOutOfViewPort, warnIfUnmounted, disableRootScrolling, enableRootScrolling, returnFirstEl } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport { DtLazyShow } from '@/components/LazyShow';\nimport ModalMixin from '@/common/mixins/modal';\nimport ModeMixin from '@/common/mixins/mode';\nimport { createTippyPopover, getPopperOptions } from './TippyUtils';\nimport PopoverHeaderFooter from './PopoverHeaderFooter.vue';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\n\n/**\n * A Popover displays a content overlay when its anchor element is activated.\n * @see https://dialtone.dialpad.com/components/popover.html\n */\nexport default {\n name: 'DtPopover',\n\n /********************\n * CHILD COMPONENTS *\n ********************/\n components: {\n SrOnlyCloseButton,\n DtLazyShow,\n PopoverHeaderFooter,\n },\n\n mixins: [ModalMixin, ModeMixin],\n\n props: {\n /**\n * Controls whether the popover is shown. When null (default), the popover\n * toggles on click. When set to true or false, the default trigger is\n * disabled and the parent controls visibility via v-model:open.\n * @values null, true, false\n */\n open: {\n type: [Boolean, null],\n default: null,\n },\n\n /**\n * Opens the popover on right click (context menu). If you set this value to `true`,\n * the default trigger behavior will be disabled.\n * @values true, false\n */\n openOnContext: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n\n /**\n * ARIA role for the content of the popover. Defaults to \"dialog\".\n * <a class=\"d-link\" href=\"https://www.w3.org/TR/wai-aria/#aria-haspopup\" target=\"_blank\">aria-haspopup</a>\n */\n role: {\n type: String,\n default: 'dialog',\n validator: (role) => {\n return POPOVER_ROLES.includes(role);\n },\n },\n\n /**\n * ID of the element that serves as the label for the popover content.\n * Defaults to the \"anchor\" element; this exists to provide a different\n * ID of the label element if, for example, the anchor slot contains\n * other items that do not serve as a label. You should provide this\n * or ariaLabel, but not both.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Descriptive label for the popover content. You should provide this\n * or ariaLabelledby, but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Padding size class for the popover content.\n * @values none, small, medium, large\n */\n padding: {\n type: String,\n default: 'large',\n validator: (padding) => {\n return Object.keys(POPOVER_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n * @values null, anchor\n */\n contentWidth: {\n type: String,\n default: '',\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * Whether to apply transition on initial render in the content lazy show component.\n */\n contentAppear: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Tabindex value for the content. Passing null, no tabindex attribute will be set.\n */\n contentTabindex: {\n type: Number || null,\n default: -1,\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: '',\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 * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\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, 4],\n },\n\n /**\n * Closes the popover when clicking the anchor or outside the content box.\n * @values true, false\n */\n closeOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines modal state. If enabled popover has a modal overlay\n * preventing interaction with elements below it, but it is invisible.\n * @values true, false\n */\n modal: {\n type: Boolean,\n default: true,\n },\n\n /**\n * When true, traps Tab/Shift+Tab focus within the popover dialog.\n * Use this to enable focus trapping independently of modal state —\n * e.g. a non-modal popover whose content still requires keyboard containment.\n * When `modal` is true, the trap is already active; this prop has no additional effect.\n * @values true, false\n */\n focustrap: {\n type: Boolean,\n default: false,\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 * <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: () => {\n return ['auto'];\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'bottom-end',\n },\n\n /**\n * If set to false the dialog will display over top of the anchor when there is insufficient space.\n * If set to true it will never move from its position relative to the anchor and will clip instead.\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/prevent-overflow/#tether\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * @values true, false\n */\n tether: {\n type: Boolean,\n default: true,\n },\n\n /**\n * If the popover 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.\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: false,\n validator: (sticky) => {\n return POPOVER_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the anchor wrapper element.\n */\n anchorClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header element (d-popover__header).\n */\n headerWrapperClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header content wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the footer element (d-popover__footer).\n */\n footerWrapperClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the footer content wrapper element.\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element.\n */\n dialogClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n * @values none, dialog, first\n */\n initialFocusElement: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'first',\n validator: initialFocusElement => {\n return POPOVER_INITIAL_FOCUS_STRINGS.includes(initialFocusElement) ||\n (initialFocusElement instanceof HTMLElement) ||\n initialFocusElement.startsWith('#');\n },\n },\n\n /**\n * If the popover should open pressing up or down arrow key on the anchor element.\n * This can be set when not passing open prop.\n * @values true, false\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest ancestor <dialog> element when inside one\n * (keeping the popover 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 * 'root' will try append to the iFrame's parent body if it is contained in an iFrame\n * and has permissions to access it, else, it'd default to 'parent'.\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 emits: [\n /**\n * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n\n /**\n * Emitted when the mouse enters the popover\n *\n * @event mouseenter-popover\n */\n 'mouseenter-popover',\n\n /**\n * Emitted when the mouse leaves the popover\n *\n * @event mouseleave-popover\n */\n 'mouseleave-popover',\n\n /**\n * Emitted when the mouse enters the popover anchor\n *\n * @event mouseenter-popover-anchor\n */\n 'mouseenter-popover-anchor',\n\n /**\n * Emitted when the mouse leaves the popover anchor\n *\n * @event mouseleave-popover-anchor\n */\n 'mouseleave-popover-anchor',\n ],\n\n data () {\n return {\n POPOVER_PADDING_CLASSES,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n intersectionObserver: null,\n mutationObserver: null,\n isOutsideViewport: false,\n isOpen: false,\n toAppear: false,\n anchorEl: null,\n popoverContentEl: null,\n hasSlotContent,\n };\n },\n\n computed: {\n popoverListeners () {\n return {\n keydown: event => {\n this.onKeydown(event);\n },\n\n 'after-leave': () => {\n this.onLeaveTransitionComplete();\n },\n\n 'after-enter': () => {\n this.onEnterTransitionComplete();\n },\n };\n },\n\n calculatedMaxHeight () {\n if (this.isOutsideViewport && this.modal) {\n return `calc(100vh - var(--dt-spacing-50))`;\n }\n return this.maxHeight;\n },\n\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor.\n return this.ariaLabelledby || (!this.ariaLabel && getUniqueString('DtPopover__anchor'));\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n deep: true,\n handler () {\n this.validateProps();\n },\n },\n\n modal (modal) {\n this.tip?.setProps({\n zIndex: modal ? 650 : this.calculateAnchorZindex(),\n });\n },\n\n offset (offset) {\n this.tip?.setProps({\n offset,\n });\n },\n\n sticky (sticky) {\n this.tip?.setProps({\n sticky,\n });\n },\n\n fallbackPlacements () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n\n tether () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n\n externalAnchorElement () {\n this.updateAnchorEl();\n },\n\n placement (placement) {\n this.tip?.setProps({\n placement,\n });\n },\n\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n if (open === true) {\n this.toAppear = true;\n }\n },\n\n immediate: true,\n },\n\n contentAppear: {\n handler: function (contentAppear) {\n if (contentAppear !== null) {\n this.toAppear = contentAppear;\n }\n },\n },\n\n isOpen (isOpen, isPrev) {\n if (isOpen) {\n this.initTippyInstance();\n this.tip?.show();\n } else if (!isOpen && isPrev !== isOpen) {\n this.removeEventListeners();\n this.tip?.hide();\n }\n },\n },\n\n mounted () {\n warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n\n this.popoverContentEl = returnFirstEl(this.$refs.content?.$el);\n this.updateAnchorEl();\n\n this.mutationObserver = new MutationObserver(this.updateAnchorEl);\n this.mutationObserver.observe(this.$refs.anchor, {childList: true});\n\n // rootMargin here must be greater than the margin of the height we are setting in calculatedMaxHeight which\n // currently is var(--dt-spacing-50) (4px). If not the intersectionObserver will continually trigger in an infinite\n // loop.\n // threshold 1.0 makes this trigger every time the dialog \"touches\" the edge of the viewport.\n this.intersectionObserver = new IntersectionObserver(this.hasIntersectedViewport);\n this.intersectionObserver.observe(this.popoverContentEl);\n },\n\n beforeUnmount () {\n this._isUnmounting = true;\n // Cancel any in-progress CSS transitions so transitionend cannot fire\n // after this component is torn down and call into dead lifecycle methods.\n if (this.popoverContentEl) {\n this.popoverContentEl.style.transition = 'none';\n }\n this.tip?.destroy();\n this.intersectionObserver?.disconnect();\n this.mutationObserver?.disconnect();\n this.removeReferences();\n this.removeEventListeners();\n },\n\n /******************\n * METHODS *\n ******************/\n methods: {\n\n getModeReferenceEl () {\n return this.$refs.anchor;\n },\n\n hasIntersectedViewport (entries) {\n const dialog = entries?.[0]?.target;\n if (!dialog) return;\n const isOut = isOutOfViewPort(dialog);\n this.isOutsideViewport = isOut.bottom || isOut.top;\n },\n\n updateAnchorEl () {\n const externalAnchorEl = this.externalAnchorElement ||\n (this.externalAnchor\n ? this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`)\n : null);\n const anchorEl = externalAnchorEl ?? this.$refs.anchor.children[0];\n if (anchorEl === this.anchorEl) {\n return;\n }\n this.anchorEl = anchorEl;\n\n this.tip?.destroy();\n delete this.tip;\n\n if (!this.anchorEl) {\n console.warn('No anchor found for popover');\n return;\n }\n\n if (this.isOpen) {\n this.initTippyInstance();\n this.tip?.show();\n }\n },\n\n popperOptions () {\n return getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n tether: this.tether,\n hasHideModifierEnabled: true,\n });\n },\n\n validateProps () {\n if (this.modal && this.initialFocusElement === 'none') {\n console.error('If the popover is modal you must set the ' +\n 'initialFocusElement prop. Possible values: \"dialog\", \"first\", HTMLElement');\n }\n },\n\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at popover 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 650 when\n // anchor of popover is within a drawer.\n this.anchorEl?.closest('.d-zi-drawer')) {\n return 650;\n } else {\n return 300;\n }\n },\n\n defaultToggleOpen (e) {\n if (this.openOnContext) { return; }\n\n // Only use default toggle behaviour if the user has not set the open prop.\n // Check that the anchor element specifically was clicked.\n if (this.open === null || this.open === undefined) {\n if ((!this.anchorEl?.contains(e.target) && !this.anchorEl?.isEqualNode(e.target)) || this.anchorEl?.disabled) {\n return;\n }\n\n this.toggleOpen();\n }\n },\n\n async onContext (event) {\n if (!this.openOnContext) { return; }\n\n event.preventDefault();\n\n this.isOpen = true;\n await this.$nextTick();\n this.tip?.setProps({\n placement: 'right-start',\n getReferenceClientRect: () => ({\n width: 0,\n height: 0,\n top: event.clientY,\n bottom: event.clientY,\n left: event.clientX,\n right: event.clientX,\n }),\n });\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n onArrowKeyPress (e) {\n if (this.open !== null) { return; }\n if (this.openWithArrowKeys && this.anchorEl?.contains(e.target)) {\n if (!this.isOpen) {\n this.isOpen = true;\n }\n }\n\n this.$emit('keydown', e);\n },\n\n addEventListeners () {\n window.addEventListener('dt-popover-close', this.closePopover);\n // align popover content width when contentWidth is 'anchor'\n if (this.contentWidth === 'anchor') {\n window.addEventListener('resize', this.onResize);\n }\n },\n\n removeEventListeners () {\n window.removeEventListener('dt-popover-close', this.closePopover);\n if (this.contentWidth === 'anchor') {\n window.removeEventListener('resize', this.onResize);\n }\n },\n\n closePopover () {\n this.isOpen = false;\n },\n\n /*\n * Prevents scrolling outside of the currently opened modal popover by:\n * - when anchor is not within another popover: setting the body to overflow: hidden\n * - when anchor is within another popover: set the popover dialog container to it's non-modal z-index\n * since it is no longer the active modal. This puts it underneath the overlay and prevents scrolling.\n **/\n preventScrolling () {\n if (this.modal) {\n const element = this.anchorEl?.closest('body, .tippy-box');\n if (!element) return;\n if (element.tagName?.toLowerCase() === 'body') {\n disableRootScrolling(this.anchorEl.getRootNode().host);\n this.tip?.setProps({ offset: this.offset });\n } else {\n element.classList.add('d-zi-popover');\n }\n }\n },\n\n /*\n * Resets the prevent scrolling properties set in preventScrolling() back to normal.\n **/\n enableScrolling () {\n const element = this.anchorEl?.closest('body, .tippy-box');\n if (!element) return;\n if (element.tagName?.toLowerCase() === 'body') {\n enableRootScrolling(this.anchorEl.getRootNode().host);\n this.tip?.setProps({ offset: this.offset });\n } else {\n element.classList.remove('d-zi-popover');\n }\n },\n\n removeReferences () {\n this.anchorEl = null;\n this.popoverContentEl = null;\n this.tip = null;\n },\n\n async onShow () {\n if (this.contentWidth === 'anchor') {\n await this.setPopoverContentAnchorWidth();\n }\n\n if (this.contentWidth === null) {\n this.popoverContentEl.style.width = 'auto';\n }\n\n this.addEventListeners();\n },\n\n async onLeaveTransitionComplete () {\n if (this._isUnmounting) return;\n if (this.modal) {\n await this.focusFirstElement(this.$refs.anchor);\n if (this._isUnmounting) return;\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n if (this._isUnmounting) return;\n this.enableScrolling();\n }\n if (this._isUnmounting) return;\n this.tip?.unmount();\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n async onEnterTransitionComplete () {\n if (this._isUnmounting) return;\n this.focusInitialElement();\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n if (this._isUnmounting) return;\n this.preventScrolling();\n this.$emit('opened', true, this.$refs.popover__content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n focusInitialElement () {\n if (this.initialFocusElement === 'dialog') {\n returnFirstEl(this.$refs.content?.$el)?.focus();\n }\n // find by ID\n if (this.initialFocusElement.startsWith('#')) {\n this.focusInitialElementById();\n }\n if (this.initialFocusElement === 'first') {\n this.focusFirstElementIfNeeded(this.$refs.popover__content);\n }\n if (this.initialFocusElement instanceof HTMLElement) {\n this.initialFocusElement.focus();\n }\n },\n\n focusInitialElementById () {\n const result = returnFirstEl(this.$refs.content?.$el)?.querySelector(this.initialFocusElement);\n if (result) {\n result.focus();\n } else {\n console.warn('Could not find the element specified in dt-popover prop \"initialFocusElement\". ' +\n 'Defaulting to focusing the dialog.');\n returnFirstEl(this.$refs.content?.$el)?.focus();\n }\n },\n\n onResize () {\n this.closePopover();\n },\n\n onClickOutside () {\n if (!this.closeOnClick) return;\n // If a popover is opened inside of this one, do not hide on click out\n const innerModals = this.popoverContentEl?.querySelector('.d-popover__anchor--opened');\n if (!innerModals) {\n this.closePopover();\n }\n },\n\n onKeydown (e) {\n // Tab focus trapping (when modal or focustrap) is handled by the v-dt-focustrap directive on the content.\n if (e.key === 'Escape') {\n this.closePopover();\n }\n\n this.$emit('keydown', e);\n },\n\n async setPopoverContentAnchorWidth () {\n await this.$nextTick();\n this.popoverContentEl.style.width = `${this.anchorEl?.clientWidth}px`;\n },\n\n focusFirstElementIfNeeded (domEl) {\n const focusableElements = this._getFocusableElements(domEl, true);\n if (focusableElements.length !== 0) {\n this.focusFirstElement(domEl);\n } else if (this.showCloseButton) {\n this.$refs.popover__header?.focusCloseButton();\n } else {\n // if there are no focusable elements at all focus the dialog itself\n returnFirstEl(this.$refs.content?.$el).focus();\n }\n },\n\n /**\n * Return's the anchor ClientRect object relative to the window.\n * Refer to: https://atomiks.github.io/tippyjs/v6/all-props/#getreferenceclientrect for more information\n * @param error\n */\n getReferenceClientRect (error) {\n const anchorReferenceRect = this.anchorEl?.getBoundingClientRect();\n\n if (this.appendTo !== 'root' || error) return anchorReferenceRect;\n\n const anchorOwnerDocument = this.anchorEl?.ownerDocument;\n const anchorParentWindow = anchorOwnerDocument?.defaultView || anchorOwnerDocument?.parentWindow;\n const anchorIframe = anchorParentWindow?.frameElement;\n\n if (!anchorIframe) return anchorReferenceRect;\n\n const iframeReferenceRect = anchorIframe.getBoundingClientRect();\n\n return {\n width: anchorReferenceRect?.width,\n height: anchorReferenceRect?.height,\n top: iframeReferenceRect?.top + anchorReferenceRect?.top,\n left: iframeReferenceRect?.left + anchorReferenceRect?.left,\n right: iframeReferenceRect?.right + anchorReferenceRect?.right,\n bottom: iframeReferenceRect?.bottom + anchorReferenceRect?.bottom,\n };\n },\n\n initTippyInstance () {\n let internalAppendTo = null;\n let iFrameError = false;\n\n switch (this.appendTo) {\n case 'body':\n // When inside a native <dialog> (e.g. DtModal in Dialtone Next), append to the\n // dialog so the popover stays in the browser's top layer. Otherwise fall back to body.\n internalAppendTo = this.anchorEl?.closest('dialog') ??\n this.anchorEl?.getRootNode()?.querySelector('body');\n break;\n\n case 'root':\n // Try to attach the popover to root document, fallback to parent is fail\n try {\n internalAppendTo = window.parent.document.body;\n } catch (err) {\n console.error('Could not attach the popover to iframe parent window: ', err);\n internalAppendTo = 'parent';\n iFrameError = true;\n }\n break;\n\n default:\n internalAppendTo = this.appendTo;\n break;\n }\n\n this.tip?.destroy();\n\n this.tip = createTippyPopover(this.anchorEl, {\n popperOptions: this.popperOptions(),\n contentElement: this.popoverContentEl,\n placement: this.placement,\n offset: this.offset,\n sticky: this.sticky,\n appendTo: internalAppendTo,\n interactive: true,\n trigger: 'manual',\n getReferenceClientRect: () => this.getReferenceClientRect(iFrameError),\n // We have to manage hideOnClick functionality manually to handle\n // popover within popover situations.\n hideOnClick: false,\n zIndex: this.modal ? 650 : this.calculateAnchorZindex(),\n onClickOutside: this.onClickOutside,\n onShow: this.onShow,\n });\n },\n\n onMouseEnter () {\n this.$emit('mouseenter-popover');\n },\n\n onMouseLeave () {\n this.$emit('mouseleave-popover');\n },\n\n onMouseEnterAnchor () {\n this.$emit('mouseenter-popover-anchor');\n },\n\n onMouseLeaveAnchor () {\n this.$emit('mouseleave-popover-anchor');\n },\n },\n};\n</script>\n"],"mappings":"6kBA2JA,IAAK,EAAU,CACb,KAAM,YAKN,WAAY,CACV,kBAAA,EAAA,QACA,WAAA,EAAA,QACA,oBAAA,EAAA,QACD,CAED,OAAQ,CAAC,EAAA,QAAY,EAAA,QAAU,CAE/B,MAAO,CAOL,KAAM,CACJ,KAAM,CAAC,QAAS,KAAK,CACrB,QAAS,KACV,CAOD,cAAe,CACb,KAAM,QACN,QAAS,GACV,CAKD,YAAa,CACX,KAAM,OACN,QAAS,MACV,CAMD,WAAY,CACV,KAAM,OACN,QAAS,OACV,CAMD,KAAM,CACJ,KAAM,OACN,QAAS,SACT,UAAY,GACH,EAAA,cAAc,SAAS,EAAK,CAEtC,CASD,eAAgB,CACd,KAAM,OACN,QAAS,KACV,CAMD,UAAW,CACT,KAAM,OACN,QAAS,KACV,CAMD,QAAS,CACP,KAAM,OACN,QAAS,QACT,UAAY,GACH,OAAO,KAAK,EAAA,wBAAwB,CAAC,KAAM,GAAS,IAAS,EAAQ,CAE/E,CAKD,aAAc,CACZ,KAAM,CAAC,OAAQ,MAAO,OAAO,CAC7B,QAAS,GACV,CAOD,aAAc,CACZ,KAAM,OACN,QAAS,GACT,UAAW,GAAgB,EAAA,uBAAuB,SAAS,EAAa,CACzE,CAKD,cAAe,CACb,KAAM,QACN,QAAS,KACV,CAKD,gBAAiB,CACf,KAAM,QAAU,KAChB,QAAS,GACV,CAOD,eAAgB,CACd,KAAM,OACN,QAAS,GACV,CAMD,sBAAuB,CACrB,KAAM,EAAA,kBACN,QAAS,KACV,CAKD,GAAI,CACF,KAAM,OACN,SAAW,CAAE,OAAO,EAAA,iBAAiB,EACtC,CAaD,OAAQ,CACN,KAAM,MACN,YAAe,CAAC,EAAG,EAAE,CACtB,CAMD,aAAc,CACZ,KAAM,Q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AA,EAAA,EAAA,EAAA,aAanB,EAAA,OAZtB,IAAI,kBACJ,KAAK,SACJ,OAAA,EAAA,EAAA,gBAAK,CAAG,EAAA,sCAAsC,EAAA,SAAU,EAAA,mBAAkB,CAAA,CAC1E,gBAAe,EAAA,cAEL,SAAA,EAAA,EAAA,aAKP,EAAA,EAAA,EAAA,YAAA,EAAA,OAAA,gBAAA,CADC,MAAO,EAAA,aAAY,CAAA,CAAA,CAAA,oEAKjB,EAAA,kDAAA,EAAA,EAAA,YAAA,EAAA,EAAA,EAAA,aAEP,EAAA,OADC,QAAO,EAAA,0OA3E2B,EAAA,OAAS,EAAA,YAAc,EAAA,qCAAgE,EAAA,OAAS,EAAA"}
1
+ {"version":3,"file":"popover.cjs","names":[],"sources":["../../../components/Popover/Popover.vue"],"sourcesContent":["<!-- eslint-disable vuejs-accessibility/mouse-events-have-key-events -->\n<template>\n <div>\n <Teleport\n v-if=\"modal && isOpen\"\n to=\"body\"\n >\n <div\n class=\"d-modal--transparent\"\n aria-hidden=\"false\"\n @click.prevent.stop\n />\n </Teleport>\n <component\n :is=\"elementType\"\n ref=\"popover\"\n :class=\"['d-popover', { 'd-popover__anchor--opened': isOpen }]\"\n data-qa=\"dt-popover-container\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"!ariaLabelledby && labelledBy\"\n ref=\"anchor\"\n :class=\"anchorClass\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}-anchor` : 'dt-popover-anchor'\"\n :tabindex=\"openOnContext ? 0 : undefined\"\n @click.capture=\"defaultToggleOpen\"\n @contextmenu=\"onContext\"\n @keydown.up.prevent=\"onArrowKeyPress\"\n @keydown.down.prevent=\"onArrowKeyPress\"\n @keydown.escape.capture=\"closePopover\"\n @keydown.enter=\"$emit('keydown', $event)\"\n @keydown.space=\"$emit('keydown', $event)\"\n @mouseenter=\"onMouseEnter\"\n @mouseleave=\"onMouseLeave\"\n >\n <!-- @slot Anchor element that activates the popover. Usually a button. -->\n <slot\n name=\"anchor\"\n :attrs=\"{\n 'aria-expanded': isOpen.toString(),\n 'aria-controls': id,\n 'aria-haspopup': role,\n }\"\n />\n </div>\n <dt-lazy-show\n :id=\"id\"\n ref=\"content\"\n v-dt-focustrap=\"{\n active: (modal || focustrap) && isOpen,\n initialFocus: false,\n restoreFocus: !modal && focustrap,\n }\"\n :role=\"role\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}__dialog` : 'dt-popover'\"\n :aria-hidden=\"`${!isOpen}`\"\n :aria-labelledby=\"labelledBy\"\n :aria-label=\"ariaLabel\"\n :aria-modal=\"`${!modal}`\"\n :transition=\"transition\"\n :show=\"isOpen\"\n :appear=\"toAppear\"\n :class=\"['d-popover__dialog', { 'd-popover__dialog--modal': modal }, dialogClass]\"\n :style=\"{\n 'max-height': calculatedMaxHeight,\n 'max-width': maxWidth,\n }\"\n :css=\"$attrs.css\"\n :tabindex=\"contentTabindex\"\n v-bind=\"modeAttrs\"\n v-on=\"popoverListeners\"\n @mouseenter=\"onMouseEnterAnchor\"\n @mouseleave=\"onMouseLeaveAnchor\"\n >\n <popover-header-footer\n v-if=\"hasSlotContent($slots.headerContent) || showCloseButton\"\n ref=\"popover__header\"\n :class=\"[POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding], headerWrapperClass]\"\n :content-class=\"headerClass\"\n type=\"header\"\n :show-close-button=\"showCloseButton\"\n @close=\"closePopover\"\n >\n <template #content>\n <!-- @slot Slot for popover header content -->\n <slot\n name=\"headerContent\"\n :close=\"closePopover\"\n />\n </template>\n </popover-header-footer>\n <div\n ref=\"popover__content\"\n :data-qa=\"$attrs['data-qa'] ? `${$attrs['data-qa']}-content` : 'dt-popover-content'\"\n :class=\"[\n 'd-popover__content',\n POPOVER_PADDING_CLASSES[padding],\n contentClass,\n ]\"\n >\n <!-- @slot Slot for the content that is displayed in the popover when it is open. -->\n <slot\n name=\"content\"\n :close=\"closePopover\"\n />\n </div>\n <popover-header-footer\n v-if=\"hasSlotContent($slots.footerContent)\"\n ref=\"popover__footer\"\n type=\"footer\"\n :class=\"[POPOVER_HEADER_FOOTER_PADDING_CLASSES[padding], footerWrapperClass]\"\n :content-class=\"footerClass\"\n >\n <template #content>\n <!-- @slot Slot for the footer content. -->\n <slot\n name=\"footerContent\"\n :close=\"closePopover\"\n />\n </template>\n </popover-header-footer>\n <sr-only-close-button\n v-if=\"!showCloseButton\"\n @close=\"closePopover\"\n />\n </dt-lazy-show>\n </component>\n </div>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport {\n POPOVER_APPEND_TO_VALUES,\n POPOVER_CONTENT_WIDTHS,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n POPOVER_INITIAL_FOCUS_STRINGS,\n POPOVER_PADDING_CLASSES,\n POPOVER_ROLES,\n POPOVER_STICKY_VALUES,\n} from './PopoverConstants';\nimport { getUniqueString, hasSlotContent, isOutOfViewPort, warnIfUnmounted, disableRootScrolling, enableRootScrolling, returnFirstEl } from '@/common/utils';\nimport { HTML_ELEMENT_TYPE } from '@/common/constants';\nimport { DtLazyShow } from '@/components/LazyShow';\nimport ModalMixin from '@/common/mixins/modal';\nimport ModeMixin from '@/common/mixins/mode';\nimport { createTippyPopover, getPopperOptions } from './TippyUtils';\nimport PopoverHeaderFooter from './PopoverHeaderFooter.vue';\nimport SrOnlyCloseButton from '@/common/sr_only_close_button.vue';\n\n/**\n * A Popover displays a content overlay when its anchor element is activated.\n * @see https://dialtone.dialpad.com/components/popover.html\n */\nexport default {\n name: 'DtPopover',\n\n /********************\n * CHILD COMPONENTS *\n ********************/\n components: {\n SrOnlyCloseButton,\n DtLazyShow,\n PopoverHeaderFooter,\n },\n\n mixins: [ModalMixin, ModeMixin],\n\n props: {\n /**\n * Controls whether the popover is shown. When null (default), the popover\n * toggles on click. When set to true or false, the default trigger is\n * disabled and the parent controls visibility via v-model:open.\n * @values null, true, false\n */\n open: {\n type: [Boolean, null],\n default: null,\n },\n\n /**\n * Opens the popover on right click (context menu). If you set this value to `true`,\n * the default trigger behavior will be disabled.\n * @values true, false\n */\n openOnContext: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Element type (tag name) of the root element of the component.\n */\n elementType: {\n type: String,\n default: 'div',\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n\n /**\n * ARIA role for the content of the popover. Defaults to \"dialog\".\n * <a class=\"d-link\" href=\"https://www.w3.org/TR/wai-aria/#aria-haspopup\" target=\"_blank\">aria-haspopup</a>\n */\n role: {\n type: String,\n default: 'dialog',\n validator: (role) => {\n return POPOVER_ROLES.includes(role);\n },\n },\n\n /**\n * ID of the element that serves as the label for the popover content.\n * Defaults to the \"anchor\" element; this exists to provide a different\n * ID of the label element if, for example, the anchor slot contains\n * other items that do not serve as a label. You should provide this\n * or ariaLabel, but not both.\n */\n ariaLabelledby: {\n type: String,\n default: null,\n },\n\n /**\n * Descriptive label for the popover content. You should provide this\n * or ariaLabelledby, but not both.\n */\n ariaLabel: {\n type: String,\n default: null,\n },\n\n /**\n * Padding size class for the popover content.\n * @values none, small, medium, large\n */\n padding: {\n type: String,\n default: 'large',\n validator: (padding) => {\n return Object.keys(POPOVER_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Additional class name for the content wrapper element.\n */\n contentClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n * @values null, anchor\n */\n contentWidth: {\n type: String,\n default: '',\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * Whether to apply transition on initial render in the content lazy show component.\n */\n contentAppear: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Tabindex value for the content. Passing null, no tabindex attribute will be set.\n */\n contentTabindex: {\n type: Number || null,\n default: -1,\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: '',\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 * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Displaces the content box from its anchor element\n * by the specified number of pixels.\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, 4],\n },\n\n /**\n * Closes the popover when clicking the anchor or outside the content box.\n * @values true, false\n */\n closeOnClick: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Determines modal state. If enabled popover has a modal overlay\n * preventing interaction with elements below it, but it is invisible.\n * @values true, false\n */\n modal: {\n type: Boolean,\n default: true,\n },\n\n /**\n * When true, traps Tab/Shift+Tab focus within the popover dialog.\n * Use this to enable focus trapping independently of modal state —\n * e.g. a non-modal popover whose content still requires keyboard containment.\n * When `modal` is true, the trap is already active; this prop has no additional effect.\n * @values true, false\n */\n focustrap: {\n type: Boolean,\n default: false,\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 * <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: () => {\n return ['auto'];\n },\n },\n\n /**\n * The direction the popover displays relative to the anchor.\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'bottom-end',\n },\n\n /**\n * If set to false the dialog will display over top of the anchor when there is insufficient space.\n * If set to true it will never move from its position relative to the anchor and will clip instead.\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/prevent-overflow/#tether\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * @values true, false\n */\n tether: {\n type: Boolean,\n default: true,\n },\n\n /**\n * If the popover 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.\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: false,\n validator: (sticky) => {\n return POPOVER_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Determines visibility for close button\n * @values true, false\n */\n showCloseButton: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Additional class name for the anchor wrapper element.\n */\n anchorClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header element (d-popover__header).\n */\n headerWrapperClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the header content wrapper element.\n */\n headerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the footer element (d-popover__footer).\n */\n footerWrapperClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the footer content wrapper element.\n */\n footerClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * Additional class name for the dialog element.\n */\n dialogClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * The element that is focused when the popover is opened. This can be an\n * HTMLElement within the popover, a string starting with '#' which will\n * find the element by ID. 'first' which will automatically focus\n * the first element, or 'dialog' which will focus the dialog window itself.\n * If the dialog is modal this prop cannot be 'none'.\n * @values none, dialog, first\n */\n initialFocusElement: {\n type: [String, HTML_ELEMENT_TYPE],\n default: 'first',\n validator: initialFocusElement => {\n return POPOVER_INITIAL_FOCUS_STRINGS.includes(initialFocusElement) ||\n (initialFocusElement instanceof HTMLElement) ||\n initialFocusElement.startsWith('#');\n },\n },\n\n /**\n * If the popover should open pressing up or down arrow key on the anchor element.\n * This can be set when not passing open prop.\n * @values true, false\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest ancestor <dialog> element when inside one\n * (keeping the popover 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 * 'root' will try append to the iFrame's parent body if it is contained in an iFrame\n * and has permissions to access it, else, it'd default to 'parent'.\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 emits: [\n /**\n * Native keydown event\n *\n * @event keydown\n * @type {KeyboardEvent}\n */\n 'keydown',\n\n /**\n * Event fired to sync the open prop with the parent component\n * @event update:open\n */\n 'update:open',\n\n /**\n * Emitted when popover is shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n\n /**\n * Emitted when the mouse enters the popover\n *\n * @event mouseenter-popover\n */\n 'mouseenter-popover',\n\n /**\n * Emitted when the mouse leaves the popover\n *\n * @event mouseleave-popover\n */\n 'mouseleave-popover',\n\n /**\n * Emitted when the mouse enters the popover anchor\n *\n * @event mouseenter-popover-anchor\n */\n 'mouseenter-popover-anchor',\n\n /**\n * Emitted when the mouse leaves the popover anchor\n *\n * @event mouseleave-popover-anchor\n */\n 'mouseleave-popover-anchor',\n ],\n\n data () {\n return {\n POPOVER_PADDING_CLASSES,\n POPOVER_HEADER_FOOTER_PADDING_CLASSES,\n intersectionObserver: null,\n mutationObserver: null,\n isOutsideViewport: false,\n isOpen: false,\n toAppear: false,\n anchorEl: null,\n popoverContentEl: null,\n hasSlotContent,\n };\n },\n\n computed: {\n popoverListeners () {\n return {\n keydown: event => {\n this.onKeydown(event);\n },\n\n 'after-leave': () => {\n this.onLeaveTransitionComplete();\n },\n\n 'after-enter': () => {\n this.onEnterTransitionComplete();\n },\n };\n },\n\n calculatedMaxHeight () {\n if (this.isOutsideViewport && this.modal) {\n return `calc(100vh - var(--dt-spacing-50))`;\n }\n return this.maxHeight;\n },\n\n labelledBy () {\n // aria-labelledby should be set only if aria-labelledby is passed as a prop, or if\n // there is no aria-label and the labelledby should point to the anchor.\n return this.ariaLabelledby || (!this.ariaLabel && getUniqueString('DtPopover__anchor'));\n },\n },\n\n watch: {\n $props: {\n immediate: true,\n deep: true,\n handler () {\n this.validateProps();\n },\n },\n\n modal (modal) {\n this.tip?.setProps({\n zIndex: modal ? 650 : this.calculateAnchorZindex(),\n });\n },\n\n offset (offset) {\n this.tip?.setProps({\n offset,\n });\n },\n\n sticky (sticky) {\n this.tip?.setProps({\n sticky,\n });\n },\n\n fallbackPlacements () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n\n tether () {\n this.tip?.setProps({\n popperOptions: this.popperOptions(),\n });\n },\n\n externalAnchorElement () {\n this.updateAnchorEl();\n },\n\n placement (placement) {\n this.tip?.setProps({\n placement,\n });\n },\n\n open: {\n handler: function (open) {\n if (open !== null) {\n this.isOpen = open;\n }\n if (open === true) {\n this.toAppear = true;\n }\n },\n\n immediate: true,\n },\n\n contentAppear: {\n handler: function (contentAppear) {\n if (contentAppear !== null) {\n this.toAppear = contentAppear;\n }\n },\n },\n\n isOpen (isOpen, isPrev) {\n if (isOpen) {\n this.initTippyInstance();\n this.tip?.show();\n } else if (!isOpen && isPrev !== isOpen) {\n this.removeEventListeners();\n this.tip?.hide();\n }\n },\n },\n\n mounted () {\n warnIfUnmounted(returnFirstEl(this.$el), this.$options.name);\n\n this.popoverContentEl = returnFirstEl(this.$refs.content?.$el);\n this.updateAnchorEl();\n\n this.mutationObserver = new MutationObserver(this.updateAnchorEl);\n this.mutationObserver.observe(this.$refs.anchor, {childList: true});\n\n // rootMargin here must be greater than the margin of the height we are setting in calculatedMaxHeight which\n // currently is var(--dt-spacing-50) (4px). If not the intersectionObserver will continually trigger in an infinite\n // loop.\n // threshold 1.0 makes this trigger every time the dialog \"touches\" the edge of the viewport.\n this.intersectionObserver = new IntersectionObserver(this.hasIntersectedViewport);\n this.intersectionObserver.observe(this.popoverContentEl);\n },\n\n beforeUnmount () {\n this._isUnmounting = true;\n // Cancel any in-progress CSS transitions so transitionend cannot fire\n // after this component is torn down and call into dead lifecycle methods.\n if (this.popoverContentEl) {\n this.popoverContentEl.style.transition = 'none';\n }\n this.tip?.destroy();\n this.intersectionObserver?.disconnect();\n this.mutationObserver?.disconnect();\n this.removeReferences();\n this.removeEventListeners();\n },\n\n /******************\n * METHODS *\n ******************/\n methods: {\n\n getModeReferenceEl () {\n return this.$refs.anchor;\n },\n\n hasIntersectedViewport (entries) {\n const dialog = entries?.[0]?.target;\n if (!dialog) return;\n const isOut = isOutOfViewPort(dialog);\n this.isOutsideViewport = isOut.bottom || isOut.top;\n },\n\n updateAnchorEl () {\n const externalAnchorEl = this.externalAnchorElement ||\n (this.externalAnchor\n ? this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`)\n : null);\n const anchorEl = externalAnchorEl ?? this.$refs.anchor.children[0];\n if (anchorEl === this.anchorEl) {\n return;\n }\n this.anchorEl = anchorEl;\n\n this.tip?.destroy();\n delete this.tip;\n\n if (!this.anchorEl) {\n console.warn('No anchor found for popover');\n return;\n }\n\n if (this.isOpen) {\n this.initTippyInstance();\n this.tip?.show();\n }\n },\n\n popperOptions () {\n return getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n tether: this.tether,\n hasHideModifierEnabled: true,\n });\n },\n\n validateProps () {\n if (this.modal && this.initialFocusElement === 'none') {\n console.error('If the popover is modal you must set the ' +\n 'initialFocusElement prop. Possible values: \"dialog\", \"first\", HTMLElement');\n }\n },\n\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at popover 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 650 when\n // anchor of popover is within a drawer.\n this.anchorEl?.closest('.d-zi-drawer')) {\n return 650;\n } else {\n return 300;\n }\n },\n\n defaultToggleOpen (e) {\n if (this.openOnContext) { return; }\n\n // Only use default toggle behaviour if the user has not set the open prop.\n // Check that the anchor element specifically was clicked.\n if (this.open === null || this.open === undefined) {\n if ((!this.anchorEl?.contains(e.target) && !this.anchorEl?.isEqualNode(e.target)) || this.anchorEl?.disabled) {\n return;\n }\n\n this.toggleOpen();\n }\n },\n\n async onContext (event) {\n if (!this.openOnContext) { return; }\n\n event.preventDefault();\n\n this.isOpen = true;\n await this.$nextTick();\n this.tip?.setProps({\n placement: 'right-start',\n getReferenceClientRect: () => ({\n width: 0,\n height: 0,\n top: event.clientY,\n bottom: event.clientY,\n left: event.clientX,\n right: event.clientX,\n }),\n });\n },\n\n toggleOpen () {\n this.isOpen = !this.isOpen;\n },\n\n onArrowKeyPress (e) {\n if (this.open !== null) { return; }\n if (this.openWithArrowKeys && this.anchorEl?.contains(e.target)) {\n if (!this.isOpen) {\n this.isOpen = true;\n }\n }\n\n this.$emit('keydown', e);\n },\n\n addEventListeners () {\n window.addEventListener('dt-popover-close', this.closePopover);\n // align popover content width when contentWidth is 'anchor'\n if (this.contentWidth === 'anchor') {\n window.addEventListener('resize', this.onResize);\n }\n },\n\n removeEventListeners () {\n window.removeEventListener('dt-popover-close', this.closePopover);\n if (this.contentWidth === 'anchor') {\n window.removeEventListener('resize', this.onResize);\n }\n },\n\n closePopover () {\n this.isOpen = false;\n },\n\n /*\n * Prevents scrolling outside of the currently opened modal popover by:\n * - when anchor is not within another popover: setting the body to overflow: hidden\n * - when anchor is within another popover: set the popover dialog container to it's non-modal z-index\n * since it is no longer the active modal. This puts it underneath the overlay and prevents scrolling.\n **/\n preventScrolling () {\n if (this.modal) {\n const element = this.anchorEl?.closest('body, .tippy-box');\n if (!element) return;\n if (element.tagName?.toLowerCase() === 'body') {\n disableRootScrolling(this.anchorEl.getRootNode().host);\n this.tip?.setProps({ offset: this.offset });\n } else {\n element.classList.add('d-zi-popover');\n }\n }\n },\n\n /*\n * Resets the prevent scrolling properties set in preventScrolling() back to normal.\n **/\n enableScrolling () {\n const element = this.anchorEl?.closest('body, .tippy-box');\n if (!element) return;\n if (element.tagName?.toLowerCase() === 'body') {\n enableRootScrolling(this.anchorEl.getRootNode().host);\n this.tip?.setProps({ offset: this.offset });\n } else {\n element.classList.remove('d-zi-popover');\n }\n },\n\n removeReferences () {\n this.anchorEl = null;\n this.popoverContentEl = null;\n this.tip = null;\n },\n\n async onShow () {\n if (this.contentWidth === 'anchor') {\n await this.setPopoverContentAnchorWidth();\n if (this._isUnmounting) return;\n }\n\n if (this.contentWidth === null) {\n this.popoverContentEl.style.width = 'auto';\n }\n\n this.addEventListeners();\n },\n\n async onLeaveTransitionComplete () {\n if (this._isUnmounting) return;\n if (this.modal) {\n await this.focusFirstElement(this.$refs.anchor);\n if (this._isUnmounting) return;\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n if (this._isUnmounting) return;\n this.enableScrolling();\n }\n if (this._isUnmounting) return;\n this.tip?.unmount();\n this.$emit('opened', false);\n if (this.open !== null) {\n this.$emit('update:open', false);\n }\n },\n\n async onEnterTransitionComplete () {\n if (this._isUnmounting) return;\n this.focusInitialElement();\n // await next tick in case the user wants to change focus themselves.\n await this.$nextTick();\n if (this._isUnmounting) return;\n this.preventScrolling();\n this.$emit('opened', true, this.$refs.popover__content);\n if (this.open !== null) {\n this.$emit('update:open', true);\n }\n },\n\n focusInitialElement () {\n if (this.initialFocusElement === 'dialog') {\n returnFirstEl(this.$refs.content?.$el)?.focus();\n }\n // find by ID\n if (this.initialFocusElement.startsWith('#')) {\n this.focusInitialElementById();\n }\n if (this.initialFocusElement === 'first') {\n this.focusFirstElementIfNeeded(this.$refs.popover__content);\n }\n if (this.initialFocusElement instanceof HTMLElement) {\n this.initialFocusElement.focus();\n }\n },\n\n focusInitialElementById () {\n const result = returnFirstEl(this.$refs.content?.$el)?.querySelector(this.initialFocusElement);\n if (result) {\n result.focus();\n } else {\n console.warn('Could not find the element specified in dt-popover prop \"initialFocusElement\". ' +\n 'Defaulting to focusing the dialog.');\n returnFirstEl(this.$refs.content?.$el)?.focus();\n }\n },\n\n onResize () {\n this.closePopover();\n },\n\n onClickOutside () {\n if (!this.closeOnClick) return;\n // If a popover is opened inside of this one, do not hide on click out\n const innerModals = this.popoverContentEl?.querySelector('.d-popover__anchor--opened');\n if (!innerModals) {\n this.closePopover();\n }\n },\n\n onKeydown (e) {\n // Tab focus trapping (when modal or focustrap) is handled by the v-dt-focustrap directive on the content.\n if (e.key === 'Escape') {\n this.closePopover();\n }\n\n this.$emit('keydown', e);\n },\n\n async setPopoverContentAnchorWidth () {\n await this.$nextTick();\n this.popoverContentEl.style.width = `${this.anchorEl?.clientWidth}px`;\n },\n\n focusFirstElementIfNeeded (domEl) {\n const focusableElements = this._getFocusableElements(domEl, true);\n if (focusableElements.length !== 0) {\n this.focusFirstElement(domEl);\n } else if (this.showCloseButton) {\n this.$refs.popover__header?.focusCloseButton();\n } else {\n // if there are no focusable elements at all focus the dialog itself\n returnFirstEl(this.$refs.content?.$el).focus();\n }\n },\n\n /**\n * Return's the anchor ClientRect object relative to the window.\n * Refer to: https://atomiks.github.io/tippyjs/v6/all-props/#getreferenceclientrect for more information\n * @param error\n */\n getReferenceClientRect (error) {\n const anchorReferenceRect = this.anchorEl?.getBoundingClientRect();\n\n if (this.appendTo !== 'root' || error) return anchorReferenceRect;\n\n const anchorOwnerDocument = this.anchorEl?.ownerDocument;\n const anchorParentWindow = anchorOwnerDocument?.defaultView || anchorOwnerDocument?.parentWindow;\n const anchorIframe = anchorParentWindow?.frameElement;\n\n if (!anchorIframe) return anchorReferenceRect;\n\n const iframeReferenceRect = anchorIframe.getBoundingClientRect();\n\n return {\n width: anchorReferenceRect?.width,\n height: anchorReferenceRect?.height,\n top: iframeReferenceRect?.top + anchorReferenceRect?.top,\n left: iframeReferenceRect?.left + anchorReferenceRect?.left,\n right: iframeReferenceRect?.right + anchorReferenceRect?.right,\n bottom: iframeReferenceRect?.bottom + anchorReferenceRect?.bottom,\n };\n },\n\n initTippyInstance () {\n let internalAppendTo = null;\n let iFrameError = false;\n\n switch (this.appendTo) {\n case 'body':\n // When inside a native <dialog> (e.g. DtModal in Dialtone Next), append to the\n // dialog so the popover stays in the browser's top layer. Otherwise fall back to body.\n internalAppendTo = this.anchorEl?.closest('dialog') ??\n this.anchorEl?.getRootNode()?.querySelector('body');\n break;\n\n case 'root':\n // Try to attach the popover to root document, fallback to parent is fail\n try {\n internalAppendTo = window.parent.document.body;\n } catch (err) {\n console.error('Could not attach the popover to iframe parent window: ', err);\n internalAppendTo = 'parent';\n iFrameError = true;\n }\n break;\n\n default:\n internalAppendTo = this.appendTo;\n break;\n }\n\n this.tip?.destroy();\n\n this.tip = createTippyPopover(this.anchorEl, {\n popperOptions: this.popperOptions(),\n contentElement: this.popoverContentEl,\n placement: this.placement,\n offset: this.offset,\n sticky: this.sticky,\n appendTo: internalAppendTo,\n interactive: true,\n trigger: 'manual',\n getReferenceClientRect: () => this.getReferenceClientRect(iFrameError),\n // We have to manage hideOnClick functionality manually to handle\n // popover within popover situations.\n hideOnClick: false,\n zIndex: this.modal ? 650 : this.calculateAnchorZindex(),\n onClickOutside: this.onClickOutside,\n onShow: this.onShow,\n });\n },\n\n onMouseEnter () {\n this.$emit('mouseenter-popover');\n },\n\n onMouseLeave () {\n this.$emit('mouseleave-popover');\n },\n\n onMouseEnterAnchor () {\n this.$emit('mouseenter-popover-anchor');\n },\n\n onMouseLeaveAnchor () {\n this.$emit('mouseleave-popover-anchor');\n },\n },\n};\n</script>\n"],"mappings":"6kBA2JA,IAAK,EAAU,CACb,KAAM,YAKN,WAAY,CACV,kBAAA,EAAA,QACA,WAAA,EAAA,QACA,oBAAA,EAAA,QACD,CAED,OAAQ,CAAC,EAAA,QAAY,EAAA,QAAU,CAE/B,MAAO,CAOL,KAAM,CACJ,KAAM,CAAC,QAAS,KAAK,CACrB,QAAS,KACV,CAOD,cAAe,CACb,KAAM,QACN,QAAS,GACV,CAKD,YAAa,CACX,KAAM,OACN,QAAS,MACV,CAMD,WAAY,CACV,KAAM,OACN,QAAS,OACV,CAMD,KAAM,CACJ,KAAM,OACN,QAAS,SACT,UAAY,GACH,EAAA,cAAc,SAAS,EAAK,CAEtC,CASD,eAAgB,CACd,KAAM,OACN,QAAS,KACV,CAMD,UAAW,CACT,KAAM,OACN,QAAS,KACV,CAMD,QAAS,CACP,KAAM,OACN,QAAS,QACT,UAAY,GACH,OAAO,KAAK,EAAA,wBAAwB,CAAC,KAAM,GAAS,IAAS,EAAQ,CAE/E,CAKD,aAAc,CACZ,KAAM,CAAC,OAAQ,MAAO,OAAO,CAC7B,QAAS,GACV,CAOD,aAAc,CACZ,KAAM,OACN,QAAS,GACT,UAAW,GAAgB,EAAA,uBAAuB,SAAS,EAAa,CACzE,CAKD,cAAe,CACb,KAAM,QACN,QAAS,KACV,CAKD,gBAAiB,CACf,KAAM,QAAU,KAChB,QAAS,GACV,CAOD,eAAgB,CACd,KAAM,OACN,QAAS,G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