@dialpad/dialtone 9.123.1 → 9.124.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (339) hide show
  1. package/README.md +3 -3
  2. package/dist/css/dialtone-default-theme.css +464 -105
  3. package/dist/css/dialtone-default-theme.min.css +1 -1
  4. package/dist/css/dialtone-docs.json +1 -1
  5. package/dist/css/dialtone.css +238 -96
  6. package/dist/css/dialtone.min.css +1 -1
  7. package/dist/css/svg/spot/playlist.svg +1 -0
  8. package/dist/css/vue/spot/SpotPlaylist.vue +3 -0
  9. package/dist/tokens/doc.json +21642 -21642
  10. package/dist/vue2/_plugin-vue2_normalizer-DSLOjnn3.js +11 -0
  11. package/dist/vue2/_plugin-vue2_normalizer-DSLOjnn3.js.map +1 -0
  12. package/dist/vue2/_plugin-vue2_normalizer-e_CkxkSV.cjs +2 -0
  13. package/dist/vue2/_plugin-vue2_normalizer-e_CkxkSV.cjs.map +1 -0
  14. package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  15. package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
  16. package/dist/vue2/lib/attachment-carousel/attachment-carousel.js +8 -17
  17. package/dist/vue2/lib/attachment-carousel/attachment-carousel.js.map +1 -1
  18. package/dist/vue2/lib/avatar/avatar.cjs +1 -1
  19. package/dist/vue2/lib/avatar/avatar.js +2 -5
  20. package/dist/vue2/lib/avatar/avatar.js.map +1 -1
  21. package/dist/vue2/lib/badge/badge.cjs +1 -1
  22. package/dist/vue2/lib/badge/badge.js +4 -7
  23. package/dist/vue2/lib/badge/badge.js.map +1 -1
  24. package/dist/vue2/lib/banner/banner.cjs +2 -2
  25. package/dist/vue2/lib/banner/banner.js +6 -9
  26. package/dist/vue2/lib/banner/banner.js.map +1 -1
  27. package/dist/vue2/lib/breadcrumbs/breadcrumb-item.cjs +1 -1
  28. package/dist/vue2/lib/breadcrumbs/breadcrumb-item.js +4 -7
  29. package/dist/vue2/lib/breadcrumbs/breadcrumb-item.js.map +1 -1
  30. package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs +1 -1
  31. package/dist/vue2/lib/breadcrumbs/breadcrumbs.js +2 -5
  32. package/dist/vue2/lib/breadcrumbs/breadcrumbs.js.map +1 -1
  33. package/dist/vue2/lib/button/button.cjs +1 -1
  34. package/dist/vue2/lib/button/button.js +2 -5
  35. package/dist/vue2/lib/button/button.js.map +1 -1
  36. package/dist/vue2/lib/button-group/button-group.cjs +1 -1
  37. package/dist/vue2/lib/button-group/button-group.js +8 -11
  38. package/dist/vue2/lib/button-group/button-group.js.map +1 -1
  39. package/dist/vue2/lib/button-group/buttons-decorator.cjs +1 -1
  40. package/dist/vue2/lib/button-group/buttons-decorator.js +4 -7
  41. package/dist/vue2/lib/button-group/buttons-decorator.js.map +1 -1
  42. package/dist/vue2/lib/callbar-button/callbar-button.cjs +1 -1
  43. package/dist/vue2/lib/callbar-button/callbar-button.js +7 -10
  44. package/dist/vue2/lib/callbar-button/callbar-button.js.map +1 -1
  45. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  46. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +2 -5
  47. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  48. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  49. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js +9 -12
  50. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  51. package/dist/vue2/lib/callbox/callbox.cjs +1 -1
  52. package/dist/vue2/lib/callbox/callbox.js +2 -5
  53. package/dist/vue2/lib/callbox/callbox.js.map +1 -1
  54. package/dist/vue2/lib/card/card.cjs +1 -1
  55. package/dist/vue2/lib/card/card.js +4 -7
  56. package/dist/vue2/lib/card/card.js.map +1 -1
  57. package/dist/vue2/lib/checkbox/checkbox.cjs +1 -1
  58. package/dist/vue2/lib/checkbox/checkbox.js +2 -5
  59. package/dist/vue2/lib/checkbox/checkbox.js.map +1 -1
  60. package/dist/vue2/lib/checkbox-group/checkbox-group.cjs +1 -1
  61. package/dist/vue2/lib/checkbox-group/checkbox-group.js +5 -8
  62. package/dist/vue2/lib/checkbox-group/checkbox-group.js.map +1 -1
  63. package/dist/vue2/lib/checkbox-group/checkboxes-decorator.cjs +1 -1
  64. package/dist/vue2/lib/checkbox-group/checkboxes-decorator.js +9 -12
  65. package/dist/vue2/lib/checkbox-group/checkboxes-decorator.js.map +1 -1
  66. package/dist/vue2/lib/chip/chip.cjs +1 -1
  67. package/dist/vue2/lib/chip/chip.js +8 -11
  68. package/dist/vue2/lib/chip/chip.js.map +1 -1
  69. package/dist/vue2/lib/codeblock/codeblock.cjs +2 -2
  70. package/dist/vue2/lib/codeblock/codeblock.js +8 -11
  71. package/dist/vue2/lib/codeblock/codeblock.js.map +1 -1
  72. package/dist/vue2/lib/collapsible/collapsible-lazy-show.cjs +1 -1
  73. package/dist/vue2/lib/collapsible/collapsible-lazy-show.js +2 -5
  74. package/dist/vue2/lib/collapsible/collapsible-lazy-show.js.map +1 -1
  75. package/dist/vue2/lib/collapsible/collapsible.cjs +1 -1
  76. package/dist/vue2/lib/collapsible/collapsible.js +4 -7
  77. package/dist/vue2/lib/collapsible/collapsible.js.map +1 -1
  78. package/dist/vue2/lib/combobox/combobox-empty-list.cjs +1 -1
  79. package/dist/vue2/lib/combobox/combobox-empty-list.js +7 -10
  80. package/dist/vue2/lib/combobox/combobox-empty-list.js.map +1 -1
  81. package/dist/vue2/lib/combobox/combobox-loading-list.cjs +1 -1
  82. package/dist/vue2/lib/combobox/combobox-loading-list.js +7 -10
  83. package/dist/vue2/lib/combobox/combobox-loading-list.js.map +1 -1
  84. package/dist/vue2/lib/combobox/combobox.cjs +2 -2
  85. package/dist/vue2/lib/combobox/combobox.js +2 -5
  86. package/dist/vue2/lib/combobox/combobox.js.map +1 -1
  87. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  88. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  89. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js +9 -11
  90. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  91. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
  92. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js +2 -5
  93. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
  94. package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs +1 -1
  95. package/dist/vue2/lib/contact-centers-row/contact-centers-row.js +6 -9
  96. package/dist/vue2/lib/contact-centers-row/contact-centers-row.js.map +1 -1
  97. package/dist/vue2/lib/contact-info/contact-info.cjs +1 -1
  98. package/dist/vue2/lib/contact-info/contact-info.js +5 -8
  99. package/dist/vue2/lib/contact-info/contact-info.js.map +1 -1
  100. package/dist/vue2/lib/contact-row/contact-row.cjs +1 -1
  101. package/dist/vue2/lib/contact-row/contact-row.js +2 -5
  102. package/dist/vue2/lib/contact-row/contact-row.js.map +1 -1
  103. package/dist/vue2/lib/datepicker/datepicker.cjs +1 -1
  104. package/dist/vue2/lib/datepicker/datepicker.cjs.map +1 -1
  105. package/dist/vue2/lib/datepicker/datepicker.js +4 -13
  106. package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
  107. package/dist/vue2/lib/description-list/description-list.cjs +1 -1
  108. package/dist/vue2/lib/description-list/description-list.js +10 -13
  109. package/dist/vue2/lib/description-list/description-list.js.map +1 -1
  110. package/dist/vue2/lib/dropdown/dropdown-list.cjs +1 -1
  111. package/dist/vue2/lib/dropdown/dropdown-list.js +5 -8
  112. package/dist/vue2/lib/dropdown/dropdown-list.js.map +1 -1
  113. package/dist/vue2/lib/dropdown/dropdown-separator.cjs +1 -1
  114. package/dist/vue2/lib/dropdown/dropdown-separator.js +4 -7
  115. package/dist/vue2/lib/dropdown/dropdown-separator.js.map +1 -1
  116. package/dist/vue2/lib/dropdown/dropdown.cjs +1 -1
  117. package/dist/vue2/lib/dropdown/dropdown.js +2 -5
  118. package/dist/vue2/lib/dropdown/dropdown.js.map +1 -1
  119. package/dist/vue2/lib/editor/editor.cjs +1 -1
  120. package/dist/vue2/lib/editor/editor.js +46 -49
  121. package/dist/vue2/lib/editor/editor.js.map +1 -1
  122. package/dist/vue2/lib/emoji/emoji.cjs +1 -1
  123. package/dist/vue2/lib/emoji/emoji.js +7 -10
  124. package/dist/vue2/lib/emoji/emoji.js.map +1 -1
  125. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs +1 -1
  126. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  127. package/dist/vue2/lib/emoji-picker/emoji-picker.js +7 -25
  128. package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
  129. package/dist/vue2/lib/emoji-row/emoji-row.cjs +1 -1
  130. package/dist/vue2/lib/emoji-row/emoji-row.js +3 -6
  131. package/dist/vue2/lib/emoji-row/emoji-row.js.map +1 -1
  132. package/dist/vue2/lib/emoji-text-wrapper/emoji-text-wrapper.cjs +1 -1
  133. package/dist/vue2/lib/emoji-text-wrapper/emoji-text-wrapper.js +6 -9
  134. package/dist/vue2/lib/emoji-text-wrapper/emoji-text-wrapper.js.map +1 -1
  135. package/dist/vue2/lib/empty-state/empty-state.cjs +1 -1
  136. package/dist/vue2/lib/empty-state/empty-state.js +6 -9
  137. package/dist/vue2/lib/empty-state/empty-state.js.map +1 -1
  138. package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs +1 -1
  139. package/dist/vue2/lib/feed-item-pill/feed-item-pill.js +11 -14
  140. package/dist/vue2/lib/feed-item-pill/feed-item-pill.js.map +1 -1
  141. package/dist/vue2/lib/feed-item-row/feed-item-row.cjs +1 -1
  142. package/dist/vue2/lib/feed-item-row/feed-item-row.js +6 -9
  143. package/dist/vue2/lib/feed-item-row/feed-item-row.js.map +1 -1
  144. package/dist/vue2/lib/general-row/general-row.cjs +1 -1
  145. package/dist/vue2/lib/general-row/general-row.js +2 -5
  146. package/dist/vue2/lib/general-row/general-row.js.map +1 -1
  147. package/dist/vue2/lib/general-row/leftbar-general-row-icon.cjs +1 -1
  148. package/dist/vue2/lib/general-row/leftbar-general-row-icon.js +7 -10
  149. package/dist/vue2/lib/general-row/leftbar-general-row-icon.js.map +1 -1
  150. package/dist/vue2/lib/group-row/group-row.cjs +1 -1
  151. package/dist/vue2/lib/group-row/group-row.js +4 -7
  152. package/dist/vue2/lib/group-row/group-row.js.map +1 -1
  153. package/dist/vue2/lib/grouped-chip/grouped-chip.cjs +1 -1
  154. package/dist/vue2/lib/grouped-chip/grouped-chip.js +4 -7
  155. package/dist/vue2/lib/grouped-chip/grouped-chip.js.map +1 -1
  156. package/dist/vue2/lib/hovercard/hovercard.cjs +1 -1
  157. package/dist/vue2/lib/hovercard/hovercard.js +6 -9
  158. package/dist/vue2/lib/hovercard/hovercard.js.map +1 -1
  159. package/dist/vue2/lib/icon/icon.cjs +1 -1
  160. package/dist/vue2/lib/icon/icon.js +9 -12
  161. package/dist/vue2/lib/icon/icon.js.map +1 -1
  162. package/dist/vue2/lib/illustration/illustration.cjs +1 -1
  163. package/dist/vue2/lib/illustration/illustration.js +10 -13
  164. package/dist/vue2/lib/illustration/illustration.js.map +1 -1
  165. package/dist/vue2/lib/image-viewer/image-viewer.cjs +1 -1
  166. package/dist/vue2/lib/image-viewer/image-viewer.js +6 -9
  167. package/dist/vue2/lib/image-viewer/image-viewer.js.map +1 -1
  168. package/dist/vue2/lib/input/input.cjs +1 -1
  169. package/dist/vue2/lib/input/input.js +2 -5
  170. package/dist/vue2/lib/input/input.js.map +1 -1
  171. package/dist/vue2/lib/input-group/input-group.cjs +1 -1
  172. package/dist/vue2/lib/input-group/input-group.js +6 -9
  173. package/dist/vue2/lib/input-group/input-group.js.map +1 -1
  174. package/dist/vue2/lib/item-layout/item-layout.cjs +2 -2
  175. package/dist/vue2/lib/item-layout/item-layout.js +4 -7
  176. package/dist/vue2/lib/item-layout/item-layout.js.map +1 -1
  177. package/dist/vue2/lib/ivr-node/ivr-node.cjs +1 -1
  178. package/dist/vue2/lib/ivr-node/ivr-node.js +11 -14
  179. package/dist/vue2/lib/ivr-node/ivr-node.js.map +1 -1
  180. package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.cjs +1 -1
  181. package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.js +10 -13
  182. package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  183. package/dist/vue2/lib/lazy-show/lazy-show.cjs +1 -1
  184. package/dist/vue2/lib/lazy-show/lazy-show.js +2 -5
  185. package/dist/vue2/lib/lazy-show/lazy-show.js.map +1 -1
  186. package/dist/vue2/lib/link/link.cjs +1 -1
  187. package/dist/vue2/lib/link/link.js +6 -9
  188. package/dist/vue2/lib/link/link.js.map +1 -1
  189. package/dist/vue2/lib/list-item/list-item.cjs +1 -1
  190. package/dist/vue2/lib/list-item/list-item.js +22 -25
  191. package/dist/vue2/lib/list-item/list-item.js.map +1 -1
  192. package/dist/vue2/lib/list-item-group/list-item-group.cjs +1 -1
  193. package/dist/vue2/lib/list-item-group/list-item-group.js +8 -11
  194. package/dist/vue2/lib/list-item-group/list-item-group.js.map +1 -1
  195. package/dist/vue2/lib/message-input/message-input-button.cjs +1 -1
  196. package/dist/vue2/lib/message-input/message-input-button.js +4 -7
  197. package/dist/vue2/lib/message-input/message-input-button.js.map +1 -1
  198. package/dist/vue2/lib/message-input/message-input-link.cjs +1 -1
  199. package/dist/vue2/lib/message-input/message-input-link.js +2 -5
  200. package/dist/vue2/lib/message-input/message-input-link.js.map +1 -1
  201. package/dist/vue2/lib/message-input/message-input-topbar.cjs +1 -1
  202. package/dist/vue2/lib/message-input/message-input-topbar.js +2 -5
  203. package/dist/vue2/lib/message-input/message-input-topbar.js.map +1 -1
  204. package/dist/vue2/lib/message-input/message-input.cjs +1 -1
  205. package/dist/vue2/lib/message-input/message-input.cjs.map +1 -1
  206. package/dist/vue2/lib/message-input/message-input.js +3 -9
  207. package/dist/vue2/lib/message-input/message-input.js.map +1 -1
  208. package/dist/vue2/lib/modal/modal.cjs +2 -2
  209. package/dist/vue2/lib/modal/modal.js +2 -5
  210. package/dist/vue2/lib/modal/modal.js.map +1 -1
  211. package/dist/vue2/lib/notice/notice-action.cjs +1 -1
  212. package/dist/vue2/lib/notice/notice-action.js +4 -7
  213. package/dist/vue2/lib/notice/notice-action.js.map +1 -1
  214. package/dist/vue2/lib/notice/notice-content.cjs +1 -1
  215. package/dist/vue2/lib/notice/notice-content.js +2 -5
  216. package/dist/vue2/lib/notice/notice-content.js.map +1 -1
  217. package/dist/vue2/lib/notice/notice-icon.cjs +1 -1
  218. package/dist/vue2/lib/notice/notice-icon.js +13 -16
  219. package/dist/vue2/lib/notice/notice-icon.js.map +1 -1
  220. package/dist/vue2/lib/notice/notice.cjs +1 -1
  221. package/dist/vue2/lib/notice/notice.js +7 -10
  222. package/dist/vue2/lib/notice/notice.js.map +1 -1
  223. package/dist/vue2/lib/pagination/pagination.cjs +1 -1
  224. package/dist/vue2/lib/pagination/pagination.js +6 -9
  225. package/dist/vue2/lib/pagination/pagination.js.map +1 -1
  226. package/dist/vue2/lib/popover/popover-header-footer.cjs +1 -1
  227. package/dist/vue2/lib/popover/popover-header-footer.js +5 -8
  228. package/dist/vue2/lib/popover/popover-header-footer.js.map +1 -1
  229. package/dist/vue2/lib/popover/popover.cjs +1 -1
  230. package/dist/vue2/lib/popover/popover.cjs.map +1 -1
  231. package/dist/vue2/lib/popover/popover.js +3 -6
  232. package/dist/vue2/lib/popover/popover.js.map +1 -1
  233. package/dist/vue2/lib/presence/presence.cjs +1 -1
  234. package/dist/vue2/lib/presence/presence.js +4 -7
  235. package/dist/vue2/lib/presence/presence.js.map +1 -1
  236. package/dist/vue2/lib/radio/radio.cjs +1 -1
  237. package/dist/vue2/lib/radio/radio.js +5 -8
  238. package/dist/vue2/lib/radio/radio.js.map +1 -1
  239. package/dist/vue2/lib/radio-group/radio-group.cjs +1 -1
  240. package/dist/vue2/lib/radio-group/radio-group.js +2 -5
  241. package/dist/vue2/lib/radio-group/radio-group.js.map +1 -1
  242. package/dist/vue2/lib/radio-group/radios-decorator.cjs +1 -1
  243. package/dist/vue2/lib/radio-group/radios-decorator.js +6 -9
  244. package/dist/vue2/lib/radio-group/radios-decorator.js.map +1 -1
  245. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +3 -3
  246. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  247. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +11 -41
  248. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  249. package/dist/vue2/lib/root-layout/root-layout.cjs +1 -1
  250. package/dist/vue2/lib/root-layout/root-layout.js +5 -8
  251. package/dist/vue2/lib/root-layout/root-layout.js.map +1 -1
  252. package/dist/vue2/lib/select-menu/select-menu.cjs +1 -1
  253. package/dist/vue2/lib/select-menu/select-menu.js +2 -5
  254. package/dist/vue2/lib/select-menu/select-menu.js.map +1 -1
  255. package/dist/vue2/lib/settings-menu-button/settings-menu-button.cjs +1 -1
  256. package/dist/vue2/lib/settings-menu-button/settings-menu-button.js +4 -7
  257. package/dist/vue2/lib/settings-menu-button/settings-menu-button.js.map +1 -1
  258. package/dist/vue2/lib/skeleton/skeleton-list-item.cjs +1 -1
  259. package/dist/vue2/lib/skeleton/skeleton-list-item.js +2 -5
  260. package/dist/vue2/lib/skeleton/skeleton-list-item.js.map +1 -1
  261. package/dist/vue2/lib/skeleton/skeleton-paragraph.cjs +1 -1
  262. package/dist/vue2/lib/skeleton/skeleton-paragraph.js +5 -8
  263. package/dist/vue2/lib/skeleton/skeleton-paragraph.js.map +1 -1
  264. package/dist/vue2/lib/skeleton/skeleton-shape.cjs +1 -1
  265. package/dist/vue2/lib/skeleton/skeleton-shape.js +4 -7
  266. package/dist/vue2/lib/skeleton/skeleton-shape.js.map +1 -1
  267. package/dist/vue2/lib/skeleton/skeleton-text.cjs +1 -1
  268. package/dist/vue2/lib/skeleton/skeleton-text.js +11 -14
  269. package/dist/vue2/lib/skeleton/skeleton-text.js.map +1 -1
  270. package/dist/vue2/lib/skeleton/skeleton.cjs +1 -1
  271. package/dist/vue2/lib/skeleton/skeleton.js +6 -9
  272. package/dist/vue2/lib/skeleton/skeleton.js.map +1 -1
  273. package/dist/vue2/lib/split-button/split-button-alpha.cjs +1 -1
  274. package/dist/vue2/lib/split-button/split-button-alpha.js +9 -12
  275. package/dist/vue2/lib/split-button/split-button-alpha.js.map +1 -1
  276. package/dist/vue2/lib/split-button/split-button-omega.cjs +1 -1
  277. package/dist/vue2/lib/split-button/split-button-omega.js +6 -9
  278. package/dist/vue2/lib/split-button/split-button-omega.js.map +1 -1
  279. package/dist/vue2/lib/split-button/split-button.cjs +1 -1
  280. package/dist/vue2/lib/split-button/split-button.js +6 -9
  281. package/dist/vue2/lib/split-button/split-button.js.map +1 -1
  282. package/dist/vue2/lib/stack/stack.cjs +1 -1
  283. package/dist/vue2/lib/stack/stack.js +12 -15
  284. package/dist/vue2/lib/stack/stack.js.map +1 -1
  285. package/dist/vue2/lib/tab/tab-group.cjs +1 -1
  286. package/dist/vue2/lib/tab/tab-group.js +2 -5
  287. package/dist/vue2/lib/tab/tab-group.js.map +1 -1
  288. package/dist/vue2/lib/tab/tab-panel.cjs +1 -1
  289. package/dist/vue2/lib/tab/tab-panel.js +8 -11
  290. package/dist/vue2/lib/tab/tab-panel.js.map +1 -1
  291. package/dist/vue2/lib/tab/tab.cjs +1 -1
  292. package/dist/vue2/lib/tab/tab.js +7 -10
  293. package/dist/vue2/lib/tab/tab.js.map +1 -1
  294. package/dist/vue2/lib/time-pill/time-pill.cjs +1 -1
  295. package/dist/vue2/lib/time-pill/time-pill.js +5 -8
  296. package/dist/vue2/lib/time-pill/time-pill.js.map +1 -1
  297. package/dist/vue2/lib/toast/toast.cjs +1 -1
  298. package/dist/vue2/lib/toast/toast.cjs.map +1 -1
  299. package/dist/vue2/lib/toast/toast.js +5 -17
  300. package/dist/vue2/lib/toast/toast.js.map +1 -1
  301. package/dist/vue2/lib/toggle/toggle.cjs +1 -1
  302. package/dist/vue2/lib/toggle/toggle.js +2 -5
  303. package/dist/vue2/lib/toggle/toggle.js.map +1 -1
  304. package/dist/vue2/lib/tooltip/tooltip.cjs +1 -1
  305. package/dist/vue2/lib/tooltip/tooltip.js +6 -9
  306. package/dist/vue2/lib/tooltip/tooltip.js.map +1 -1
  307. package/dist/vue2/lib/top-banner-info/top-banner-info.cjs +1 -1
  308. package/dist/vue2/lib/top-banner-info/top-banner-info.js +2 -5
  309. package/dist/vue2/lib/top-banner-info/top-banner-info.js.map +1 -1
  310. package/dist/vue2/lib/unread-pill/unread-pill.cjs +1 -1
  311. package/dist/vue2/lib/unread-pill/unread-pill.js +5 -8
  312. package/dist/vue2/lib/unread-pill/unread-pill.js.map +1 -1
  313. package/dist/vue2/lib/validation-messages/validation-messages.cjs +1 -1
  314. package/dist/vue2/lib/validation-messages/validation-messages.js +7 -10
  315. package/dist/vue2/lib/validation-messages/validation-messages.js.map +1 -1
  316. package/dist/vue2/shared/sr_only_close_button.cjs +1 -1
  317. package/dist/vue2/shared/sr_only_close_button.js +9 -12
  318. package/dist/vue2/shared/sr_only_close_button.js.map +1 -1
  319. package/dist/vue2/types/components/popover/popover.vue.d.ts.map +1 -1
  320. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  321. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.cjs.map +1 -1
  322. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js +3 -2
  323. package/dist/vue3/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  324. package/dist/vue3/lib/popover/popover.cjs +1 -1
  325. package/dist/vue3/lib/popover/popover.cjs.map +1 -1
  326. package/dist/vue3/lib/popover/popover.js +37 -38
  327. package/dist/vue3/lib/popover/popover.js.map +1 -1
  328. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +1 -1
  329. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  330. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +1 -1
  331. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  332. package/dist/vue3/types/components/popover/popover.vue.d.ts.map +1 -1
  333. package/package.json +4 -4
  334. package/dist/vue2/_plugin-vue2_normalizer-CeySl7Fu.js +0 -11
  335. package/dist/vue2/_plugin-vue2_normalizer-CeySl7Fu.js.map +0 -1
  336. package/dist/vue2/_plugin-vue2_normalizer-yXi3ZRRD.cjs +0 -2
  337. package/dist/vue2/_plugin-vue2_normalizer-yXi3ZRRD.cjs.map +0 -1
  338. package/dist/vue2/style.css +0 -1
  339. package/dist/vue3/style.css +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","sources":["../../../components/tooltip/tooltip.vue"],"sourcesContent":["<template>\n <div data-qa=\"dt-tooltip-container\">\n <!-- disabling as the below events are for capturing events from interactive\n elements within the span rather than on the span itself -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <span\n v-if=\"!externalAnchor\"\n ref=\"anchor\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-on=\"$listeners\"\n >\n <!-- In case when transitionend event doesn't work correct (for ex. tooltip component with custom trigger) -->\n <!-- after-leave event can be used instead of transitionend -->\n <!-- @slot Slot for the content, defaults to message prop -->\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n</template>\n\n<script>\nimport {\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_DIRECTIONS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_DELAY_MS,\n} from './tooltip_constants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../popover/popover_constants';\nimport { flushPromises, getUniqueString } from '@/common/utils';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/popover/tippy_utils';\n\n/**\n * A tooltip is a floating label that briefly explains an action, function, or an element.\n * Its content is exclusively text and shouldn't be vital information for users.\n * If richer media is desired, consider using a popover instead.\n * @see https://dialtone.dialpad.com/components/tooltip.html\n */\nexport default {\n name: 'DtTooltip',\n\n props: {\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\"\n * if defined, otherwise it will automatically position to a new location\n * as it sees best fit. See\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => ['auto'],\n },\n\n /**\n * If true, applies inverted styles to the tooltip\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the tooltip from its reference element\n * by the specified number of pixels. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 12],\n },\n\n /**\n * The direction the popover displays relative to the anchor. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'top',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * If the tooltip sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: true,\n validator: (sticky) => {\n return TOOLTIP_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Sets the element to which the tooltip is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Additional css classes for the tooltip content element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * A provided message for the tooltip content\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Controls whether hover/focus causes the tooltip to appear.\n * Cannot be combined with the show prop. show value will be ignored.\n * by default this is true, if you override with false, the tooltip will never show up.\n */\n enabled: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.\n * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n show: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Whether the tooltip should have a transition effect (fade).\n */\n transition: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the tooltip will have a delay when being focused or moused over.\n * @values true, false\n */\n delay: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Set a custom theme on the tooltip. See https://atomiks.github.io/tippyjs/v6/themes/\n */\n theme: {\n type: String,\n default: null,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Emitted when tooltip is shown or hidden\n *\n * @event shown\n * @type {Boolean}\n */\n 'shown',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n tip: null,\n\n inTimer: null,\n\n // Internal state for whether the tooltip is shown. Changing the prop\n // will update this.\n internalShow: false,\n\n // this is where the placement currently is, this can be different than\n // the placement prop when there is not enough available room for the tip\n // to display and it uses a fallback placement.\n currentPlacement: this.placement,\n };\n },\n\n computed: {\n // eslint-disable-next-line complexity\n tippyProps () {\n return {\n offset: this.offset,\n delay: this.delay ? TOOLTIP_DELAY_MS : false,\n placement: this.placement,\n sticky: this.sticky,\n theme: this.inverted ? 'inverted' : this.theme,\n animation: this.transition ? 'fade' : false,\n // onShown only triggers when transition is truthy\n onShown: (tooltipInstance) => this.onShow(tooltipInstance, 'onShown'),\n // onShown will always be called, but it will be called before the animation is complete\n onShow: (tooltipInstance) => this.onShow(tooltipInstance, 'onShow'),\n onHidden: this.onHide,\n\n popperOptions: getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n hasHideModifierEnabled: true,\n onChangePlacement: this.onChangePlacement,\n }),\n };\n },\n\n anchor () {\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: {\n handler: 'setProps',\n deep: true,\n },\n\n show: {\n handler: function (show) {\n if (show !== null && this.enabled) {\n this.internalShow = show;\n }\n },\n\n immediate: true,\n },\n\n internalShow (value) {\n if (value) {\n this.setProps();\n this.tip.show();\n } else {\n this.tip.hide();\n }\n },\n\n sticky (sticky) {\n this.tip.setProps({\n sticky,\n });\n },\n },\n\n async mounted () {\n if (!this.enabled && this.show != null) {\n console.warn('Tooltip: You cannot use both the enabled and show props at the same time.');\n console.warn('The show prop will be ignored.');\n }\n\n this.tip = createTippy(this.anchor, this.initOptions());\n if (this.externalAnchor) {\n await flushPromises();\n this.addExternalAnchorEventListeners();\n }\n },\n\n beforeDestroy () {\n this.externalAnchor && this.removeExternalAnchorEventListeners();\n\n if (this.anchor?._tippy) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (this.$el.getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 651 when\n // anchor of popover is within a drawer.\n this.$el.closest('.d-zi-drawer')) {\n return 651;\n } else {\n return 400;\n }\n },\n\n hasVisibleFocus () {\n return this.anchor.matches(':focus-visible');\n },\n\n onEnterAnchor (e) {\n if (!this.enabled) return;\n if (this.delay && this.inTimer === null) {\n this.inTimer = setTimeout(() => {\n this.triggerShow(e);\n }, TOOLTIP_DELAY_MS);\n } else {\n this.triggerShow(e);\n }\n },\n\n triggerShow (e) {\n if (e.type === 'focusin') {\n // only show tooltips on visible focus when triggered via focus.\n // when the user is using the mouse they only want tooltips to display\n // on mouseover.\n //\n // Example: anchor of a popover is a button with tooltip.\n // closing it with the mouse would trigger the tooltip to display as\n // the anchor is focused on close. Not what we want.\n if (this.show === null && this.hasVisibleFocus()) {\n this.internalShow = true;\n }\n } else {\n if (this.show === null) this.internalShow = true;\n }\n },\n\n onLeaveAnchor (e) {\n if (e.type === 'keydown' && e.code !== 'Escape') return;\n\n clearTimeout(this.inTimer);\n this.inTimer = null;\n this.triggerHide();\n },\n\n triggerHide () {\n if (this.show === null) this.internalShow = false;\n },\n\n onChangePlacement (placement) {\n this.currentPlacement = placement;\n },\n\n onHide () {\n this.tip?.unmount();\n this.$emit('shown', false);\n if (this.show !== null) {\n this.$emit('update:show', false);\n }\n },\n\n onShow (tooltipInstance, callingMethod) {\n if (!this.tooltipHasContent(tooltipInstance)) {\n return false;\n }\n if (this.transition && callingMethod === 'onShow') {\n return;\n }\n this.$emit('shown', true);\n if (this.show !== null) {\n this.$emit('update:show', true);\n }\n },\n\n setProps () {\n if (this.tip && this.tip.setProps) {\n this.tip.setProps({\n ...this.tippyProps,\n // these need to be set here rather than in tippyProps because they are non-reactive\n appendTo: this.appendTo === 'body' ? this.anchor?.getRootNode()?.querySelector('body') : this.appendTo,\n zIndex: this.calculateAnchorZindex(),\n });\n }\n },\n\n onMount () {\n this.setProps();\n },\n\n tooltipHasContent (tooltipInstance) {\n // don't show tooltip when no content\n if (tooltipInstance.props.content.textContent.trim().length === 0) {\n return false;\n }\n return true;\n },\n\n // set initial options here. If any of the options need to dynamically change, they should be put in\n // tippyProps instead.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><path d=\"M 14.5,7 8,0 1.5,7 Z\"/></svg>',\n // transition duration - same as our custom fade delay in dialtone-globals.less\n duration: 180,\n interactive: false,\n trigger: 'manual',\n hideOnClick: false,\n // disable tooltip from displaying on touch devices\n touch: false,\n onMount: this.onMount,\n showOnCreate: this.internalShow,\n popperOptions: getPopperOptions({\n hasHideModifierEnabled: true,\n }),\n };\n },\n\n addExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n removeExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n },\n};\n</script>\n"],"names":["_sfc_main","getUniqueString","placement","TOOLTIP_DIRECTIONS","sticky","TOOLTIP_STICKY_VALUES","appendTo","POPOVER_APPEND_TO_VALUES","TOOLTIP_KIND_MODIFIERS","TOOLTIP_DELAY_MS","tooltipInstance","getPopperOptions","getAnchor","show","value","createTippy","flushPromises","_a","_b","callingMethod","listener","event"],"mappings":";;;;;AAkEA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAC,EAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAeA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,GAAA,EAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAiBA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAAC,GAAA;AACA,eAAAC,EAAA,SAAAD,CAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AAH,IAAA,KAAA,WAAA,QAAAA,EAAA,iBAAAG,GAAA,CAAAC,MAAA,KAAA,cAAAA,CAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,IAEA,qCAAA;AACA,OAAA,WAAA,YAAA,EAAA,QAAA,CAAAD,MAAA;;AACA,SAAAH,IAAA,KAAA,WAAA,QAAAA,EAAA,oBAAAG,GAAA,CAAAC,MAAA,KAAA,cAAAA,CAAA;AAAA,MACA,CAAA,GACA,CAAA,YAAA,cAAA,SAAA,EAAA,QAAA,CAAAD,MAAA;;AACA,SAAAH,IAAA,KAAA,WAAA,QAAAA,EAAA,oBAAAG,GAAA,CAAAC,MAAA,KAAA,cAAAA,CAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"tooltip.js","sources":["../../../components/tooltip/tooltip.vue"],"sourcesContent":["<template>\n <div data-qa=\"dt-tooltip-container\">\n <!-- disabling as the below events are for capturing events from interactive\n elements within the span rather than on the span itself -->\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <span\n v-if=\"!externalAnchor\"\n ref=\"anchor\"\n data-qa=\"dt-tooltip-anchor\"\n @focusin=\"onEnterAnchor\"\n @focusout=\"onLeaveAnchor\"\n @mouseenter=\"onEnterAnchor\"\n @mouseleave=\"onLeaveAnchor\"\n @keydown.esc=\"onLeaveAnchor\"\n >\n <!-- @slot Slot for the anchor element -->\n <slot\n name=\"anchor\"\n />\n </span>\n <div\n :id=\"id\"\n ref=\"content\"\n data-qa=\"dt-tooltip\"\n :class=\"[\n 'd-tooltip',\n {\n [ TOOLTIP_KIND_MODIFIERS.inverted ]: inverted,\n },\n contentClass,\n ]\"\n v-on=\"$listeners\"\n >\n <!-- In case when transitionend event doesn't work correct (for ex. tooltip component with custom trigger) -->\n <!-- after-leave event can be used instead of transitionend -->\n <!-- @slot Slot for the content, defaults to message prop -->\n <slot>\n {{ message }}\n </slot>\n </div>\n </div>\n</template>\n\n<script>\nimport {\n TOOLTIP_KIND_MODIFIERS,\n TOOLTIP_DIRECTIONS,\n TOOLTIP_STICKY_VALUES,\n TOOLTIP_DELAY_MS,\n} from './tooltip_constants.js';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '../popover/popover_constants';\nimport { flushPromises, getUniqueString } from '@/common/utils';\nimport {\n createTippy,\n getAnchor,\n getPopperOptions,\n} from '@/components/popover/tippy_utils';\n\n/**\n * A tooltip is a floating label that briefly explains an action, function, or an element.\n * Its content is exclusively text and shouldn't be vital information for users.\n * If richer media is desired, consider using a popover instead.\n * @see https://dialtone.dialpad.com/components/tooltip.html\n */\nexport default {\n name: 'DtTooltip',\n\n props: {\n /**\n * The id of the tooltip\n */\n id: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * If the popover does not fit in the direction described by \"placement\",\n * it will attempt to change its direction to the \"fallbackPlacements\"\n * if defined, otherwise it will automatically position to a new location\n * as it sees best fit. See\n * <a\n * class=\"d-link\"\n * href=\"https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements\"\n * target=\"_blank\"\n * >\n * Popper.js docs\n * </a>\n * */\n fallbackPlacements: {\n type: Array,\n default: () => ['auto'],\n },\n\n /**\n * If true, applies inverted styles to the tooltip\n * @values true, false\n */\n inverted: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the tooltip from its reference element\n * by the specified number of pixels. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#offset\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n */\n offset: {\n type: Array,\n default: () => [0, 12],\n },\n\n /**\n * The direction the popover displays relative to the anchor. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#placement\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values top, top-start, top-end,\n * right, right-start, right-end,\n * left, left-start, left-end,\n * bottom, bottom-start, bottom-end,\n * auto, auto-start, auto-end\n */\n placement: {\n type: String,\n default: 'top',\n validator (placement) {\n return TOOLTIP_DIRECTIONS.includes(placement);\n },\n },\n\n /**\n * If the tooltip sticks to the anchor. This is usually not needed, but can be needed\n * if the reference element's position is animating, or to automatically update the popover\n * position in those cases the DOM layout changes the reference element's position.\n * `true` enables it, `reference` only checks the \"reference\" rect for changes and `popper` only\n * checks the \"popper\" rect for changes. See\n * <a\n * class=\"d-link\"\n * href=\"https://atomiks.github.io/tippyjs/v6/all-props/#sticky\"\n * target=\"_blank\"\n * >\n * Tippy.js docs\n * </a>\n * @values true, false, reference, popper\n */\n sticky: {\n type: [Boolean, String],\n default: true,\n validator: (sticky) => {\n return TOOLTIP_STICKY_VALUES.includes(sticky);\n },\n },\n\n /**\n * Sets the element to which the tooltip is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * This prop is not reactive, must be set on initial render.\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Additional css classes for the tooltip content element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n contentClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * A provided message for the tooltip content\n */\n message: {\n type: String,\n default: '',\n },\n\n /**\n * Controls whether hover/focus causes the tooltip to appear.\n * Cannot be combined with the show prop. show value will be ignored.\n * by default this is true, if you override with false, the tooltip will never show up.\n */\n enabled: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Controls whether the tooltip is shown. Leaving this null will have the tooltip trigger on mouseover by default.\n * If you set this value, the default mouseover behavior will be disabled and you can control it as you need.\n * Supports .sync modifier\n * @values null, true, false\n */\n show: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Whether the tooltip should have a transition effect (fade).\n */\n transition: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Whether the tooltip will have a delay when being focused or moused over.\n * @values true, false\n */\n delay: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Set a custom theme on the tooltip. See https://atomiks.github.io/tippyjs/v6/themes/\n */\n theme: {\n type: String,\n default: null,\n },\n\n /**\n * External anchor id to use in those cases the anchor can't be provided via the slot.\n * For instance, using the combobox's input as the anchor for the popover.\n */\n externalAnchor: {\n type: String,\n default: null,\n },\n },\n\n emits: [\n /**\n * Emitted when tooltip is shown or hidden\n *\n * @event shown\n * @type {Boolean}\n */\n 'shown',\n\n /**\n * Sync show value\n *\n * @event update:show\n */\n 'update:show',\n ],\n\n data () {\n return {\n TOOLTIP_KIND_MODIFIERS,\n tip: null,\n\n inTimer: null,\n\n // Internal state for whether the tooltip is shown. Changing the prop\n // will update this.\n internalShow: false,\n\n // this is where the placement currently is, this can be different than\n // the placement prop when there is not enough available room for the tip\n // to display and it uses a fallback placement.\n currentPlacement: this.placement,\n };\n },\n\n computed: {\n // eslint-disable-next-line complexity\n tippyProps () {\n return {\n offset: this.offset,\n delay: this.delay ? TOOLTIP_DELAY_MS : false,\n placement: this.placement,\n sticky: this.sticky,\n theme: this.inverted ? 'inverted' : this.theme,\n animation: this.transition ? 'fade' : false,\n // onShown only triggers when transition is truthy\n onShown: (tooltipInstance) => this.onShow(tooltipInstance, 'onShown'),\n // onShown will always be called, but it will be called before the animation is complete\n onShow: (tooltipInstance) => this.onShow(tooltipInstance, 'onShow'),\n onHidden: this.onHide,\n\n popperOptions: getPopperOptions({\n fallbackPlacements: this.fallbackPlacements,\n hasHideModifierEnabled: true,\n onChangePlacement: this.onChangePlacement,\n }),\n };\n },\n\n anchor () {\n return this.externalAnchor ? document.body.querySelector(this.externalAnchor) : getAnchor(this.$refs.anchor);\n },\n },\n\n watch: {\n\n tippyProps: {\n handler: 'setProps',\n deep: true,\n },\n\n show: {\n handler: function (show) {\n if (show !== null && this.enabled) {\n this.internalShow = show;\n }\n },\n\n immediate: true,\n },\n\n internalShow (value) {\n if (value) {\n this.setProps();\n this.tip.show();\n } else {\n this.tip.hide();\n }\n },\n\n sticky (sticky) {\n this.tip.setProps({\n sticky,\n });\n },\n },\n\n async mounted () {\n if (!this.enabled && this.show != null) {\n console.warn('Tooltip: You cannot use both the enabled and show props at the same time.');\n console.warn('The show prop will be ignored.');\n }\n\n this.tip = createTippy(this.anchor, this.initOptions());\n if (this.externalAnchor) {\n await flushPromises();\n this.addExternalAnchorEventListeners();\n }\n },\n\n beforeDestroy () {\n this.externalAnchor && this.removeExternalAnchorEventListeners();\n\n if (this.anchor?._tippy) {\n this.tip?.destroy();\n }\n },\n\n methods: {\n calculateAnchorZindex () {\n // if a modal is currently active render at modal-element z-index, otherwise at tooltip z-index\n if (this.$el.getRootNode()\n .querySelector('.d-modal[aria-hidden=\"false\"], .d-modal--transparent[aria-hidden=\"false\"]') ||\n // Special case because we don't have any dialtone drawer component yet. Render at 651 when\n // anchor of popover is within a drawer.\n this.$el.closest('.d-zi-drawer')) {\n return 651;\n } else {\n return 400;\n }\n },\n\n hasVisibleFocus () {\n return this.anchor.matches(':focus-visible');\n },\n\n onEnterAnchor (e) {\n if (!this.enabled) return;\n if (this.delay && this.inTimer === null) {\n this.inTimer = setTimeout(() => {\n this.triggerShow(e);\n }, TOOLTIP_DELAY_MS);\n } else {\n this.triggerShow(e);\n }\n },\n\n triggerShow (e) {\n if (e.type === 'focusin') {\n // only show tooltips on visible focus when triggered via focus.\n // when the user is using the mouse they only want tooltips to display\n // on mouseover.\n //\n // Example: anchor of a popover is a button with tooltip.\n // closing it with the mouse would trigger the tooltip to display as\n // the anchor is focused on close. Not what we want.\n if (this.show === null && this.hasVisibleFocus()) {\n this.internalShow = true;\n }\n } else {\n if (this.show === null) this.internalShow = true;\n }\n },\n\n onLeaveAnchor (e) {\n if (e.type === 'keydown' && e.code !== 'Escape') return;\n\n clearTimeout(this.inTimer);\n this.inTimer = null;\n this.triggerHide();\n },\n\n triggerHide () {\n if (this.show === null) this.internalShow = false;\n },\n\n onChangePlacement (placement) {\n this.currentPlacement = placement;\n },\n\n onHide () {\n this.tip?.unmount();\n this.$emit('shown', false);\n if (this.show !== null) {\n this.$emit('update:show', false);\n }\n },\n\n onShow (tooltipInstance, callingMethod) {\n if (!this.tooltipHasContent(tooltipInstance)) {\n return false;\n }\n if (this.transition && callingMethod === 'onShow') {\n return;\n }\n this.$emit('shown', true);\n if (this.show !== null) {\n this.$emit('update:show', true);\n }\n },\n\n setProps () {\n if (this.tip && this.tip.setProps) {\n this.tip.setProps({\n ...this.tippyProps,\n // these need to be set here rather than in tippyProps because they are non-reactive\n appendTo: this.appendTo === 'body' ? this.anchor?.getRootNode()?.querySelector('body') : this.appendTo,\n zIndex: this.calculateAnchorZindex(),\n });\n }\n },\n\n onMount () {\n this.setProps();\n },\n\n tooltipHasContent (tooltipInstance) {\n // don't show tooltip when no content\n if (tooltipInstance.props.content.textContent.trim().length === 0) {\n return false;\n }\n return true;\n },\n\n // set initial options here. If any of the options need to dynamically change, they should be put in\n // tippyProps instead.\n initOptions () {\n const template = this.$refs.content;\n return {\n content: template,\n arrow: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"7\"><path d=\"M 14.5,7 8,0 1.5,7 Z\"/></svg>',\n // transition duration - same as our custom fade delay in dialtone-globals.less\n duration: 180,\n interactive: false,\n trigger: 'manual',\n hideOnClick: false,\n // disable tooltip from displaying on touch devices\n touch: false,\n onMount: this.onMount,\n showOnCreate: this.internalShow,\n popperOptions: getPopperOptions({\n hasHideModifierEnabled: true,\n }),\n };\n },\n\n addExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.addEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n\n removeExternalAnchorEventListeners () {\n ['focusin', 'mouseenter'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onEnterAnchor(event));\n });\n ['focusout', 'mouseleave', 'keydown'].forEach(listener => {\n this.anchor?.removeEventListener(listener, (event) => this.onLeaveAnchor(event));\n });\n },\n },\n};\n</script>\n"],"names":["_sfc_main","getUniqueString","placement","TOOLTIP_DIRECTIONS","sticky","TOOLTIP_STICKY_VALUES","appendTo","POPOVER_APPEND_TO_VALUES","TOOLTIP_KIND_MODIFIERS","TOOLTIP_DELAY_MS","tooltipInstance","getPopperOptions","getAnchor","show","value","createTippy","flushPromises","_a","_b","callingMethod","listener","event"],"mappings":";;;;;AAkEA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,eAAAC,EAAA;AAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAeA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA,GAAA,EAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAiBA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAAC,GAAA;AACA,eAAAC,EAAA,SAAAD,CAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAiBA,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AAC,MAAA,KAAA,cAAAA,CAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,IAEA,qCAAA;AACA,OAAA,WAAA,YAAA,EAAA,QAAA,CAAAD,MAAA;;AACA,SAAAH,IAAA,KAAA,WAAA,QAAAA,EAAA,oBAAAG,GAAA,CAAAC,MAAA,KAAA,cAAAA,CAAA;AAAA,MACA,CAAA,GACA,CAAA,YAAA,cAAA,SAAA,EAAA,QAAA,CAAAD,MAAA;;AACA,SAAAH,IAAA,KAAA,WAAA,QAAAA,EAAA,oBAAAG,GAAA,CAAAC,MAAA,KAAA,cAAAA,CAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./top-banner-info-constants.cjs"),o=require("../../_plugin-vue2_normalizer-yXi3ZRRD.cjs"),i={name:"DtRecipeTopBannerInfo",props:{colorCode:{type:String,default:"green300",validator:function(r){return t.COLOR_CODES.includes(r)}}},computed:{bannerInfoClass(){return[{green100:"d-recipe-top-banner-info--success",green300:"d-recipe-top-banner-info--success",red100:"d-recipe-top-banner-info--critical",red200:"d-recipe-top-banner-info--critical",gold100:"d-recipe-top-banner-info--warning",gold200:"d-recipe-top-banner-info--warning",black100:"d-recipe-top-banner-info--info",white:"d-recipe-top-banner-info--primary"}[this.colorCode]]}}};var a=function(){var e=this,n=e._self._c;return n("div",{staticClass:"d-recipe-top-banner-info",class:e.bannerInfoClass,attrs:{"data-qa":"banner-info"}},[n("div",{staticClass:"d-recipe-top-banner-info__left"},[e._t("left")],2),n("div",{staticClass:"d-recipe-top-banner-info__middle",attrs:{"data-qa":"banner-info--middle"}},[e._t("default")],2),n("div",{staticClass:"d-recipe-top-banner-info__right"},[e._t("right")],2)])},s=[],c=o.n(i,a,s,!1,null,null);const d=c.exports;exports.default=d;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./top-banner-info-constants.cjs"),o=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),i={name:"DtRecipeTopBannerInfo",props:{colorCode:{type:String,default:"green300",validator:function(r){return t.COLOR_CODES.includes(r)}}},computed:{bannerInfoClass(){return[{green100:"d-recipe-top-banner-info--success",green300:"d-recipe-top-banner-info--success",red100:"d-recipe-top-banner-info--critical",red200:"d-recipe-top-banner-info--critical",gold100:"d-recipe-top-banner-info--warning",gold200:"d-recipe-top-banner-info--warning",black100:"d-recipe-top-banner-info--info",white:"d-recipe-top-banner-info--primary"}[this.colorCode]]}}};var a=function(){var e=this,n=e._self._c;return n("div",{staticClass:"d-recipe-top-banner-info",class:e.bannerInfoClass,attrs:{"data-qa":"banner-info"}},[n("div",{staticClass:"d-recipe-top-banner-info__left"},[e._t("left")],2),n("div",{staticClass:"d-recipe-top-banner-info__middle",attrs:{"data-qa":"banner-info--middle"}},[e._t("default")],2),n("div",{staticClass:"d-recipe-top-banner-info__right"},[e._t("right")],2)])},s=[],c=o.n(i,a,s);const d=c.exports;exports.default=d;
2
2
  //# sourceMappingURL=top-banner-info.cjs.map
@@ -1,5 +1,5 @@
1
1
  import { COLOR_CODES as o } from "./top-banner-info-constants.js";
2
- import { n as t } from "../../_plugin-vue2_normalizer-CeySl7Fu.js";
2
+ import { n as t } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
3
3
  const i = {
4
4
  name: "DtRecipeTopBannerInfo",
5
5
  props: {
@@ -37,10 +37,7 @@ var a = function() {
37
37
  }, s = [], c = /* @__PURE__ */ t(
38
38
  i,
39
39
  a,
40
- s,
41
- !1,
42
- null,
43
- null
40
+ s
44
41
  );
45
42
  const f = c.exports;
46
43
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"top-banner-info.js","sources":["../../../recipes/notices/top_banner_info/top_banner_info.vue"],"sourcesContent":["<template>\n <div\n class=\"d-recipe-top-banner-info\"\n :class=\"bannerInfoClass\"\n data-qa=\"banner-info\"\n >\n <div class=\"d-recipe-top-banner-info__left\">\n <slot name=\"left\" />\n </div>\n\n <div\n class=\"d-recipe-top-banner-info__middle\"\n data-qa=\"banner-info--middle\"\n >\n <slot />\n </div>\n\n <div class=\"d-recipe-top-banner-info__right\">\n <slot name=\"right\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { COLOR_CODES } from './top_banner_info_constants';\n\nexport default {\n name: 'DtRecipeTopBannerInfo',\n\n props: {\n /**\n * color of the banner background\n */\n colorCode: {\n type: String,\n default: 'green300',\n validator: function (kind) {\n return COLOR_CODES.includes(kind);\n },\n },\n },\n\n computed: {\n bannerInfoClass () {\n const bgColors = {\n // these are too specific, so for now I'm at least updating the resultant semantic value\n // TODO: breaking change: update to be more abstract\n green100: 'd-recipe-top-banner-info--success',\n green300: 'd-recipe-top-banner-info--success',\n red100: 'd-recipe-top-banner-info--critical',\n red200: 'd-recipe-top-banner-info--critical',\n gold100: 'd-recipe-top-banner-info--warning',\n gold200: 'd-recipe-top-banner-info--warning',\n black100: 'd-recipe-top-banner-info--info',\n white: 'd-recipe-top-banner-info--primary',\n };\n return [bgColors[this.colorCode]];\n },\n },\n};\n</script>\n"],"names":["_sfc_main","kind","COLOR_CODES"],"mappings":";;AA0BA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,SAAAC,GAAA;AACA,eAAAC,EAAA,SAAAD,CAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,kBAAA;AAaA,aAAA,CAZA;AAAA;AAAA;AAAA,QAGA,UAAA;AAAA,QACA,UAAA;AAAA,QACA,QAAA;AAAA,QACA,QAAA;AAAA,QACA,SAAA;AAAA,QACA,SAAA;AAAA,QACA,UAAA;AAAA,QACA,OAAA;AAAA,MACA,EACA,KAAA,SAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"top-banner-info.js","sources":["../../../recipes/notices/top_banner_info/top_banner_info.vue"],"sourcesContent":["<template>\n <div\n class=\"d-recipe-top-banner-info\"\n :class=\"bannerInfoClass\"\n data-qa=\"banner-info\"\n >\n <div class=\"d-recipe-top-banner-info__left\">\n <slot name=\"left\" />\n </div>\n\n <div\n class=\"d-recipe-top-banner-info__middle\"\n data-qa=\"banner-info--middle\"\n >\n <slot />\n </div>\n\n <div class=\"d-recipe-top-banner-info__right\">\n <slot name=\"right\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { COLOR_CODES } from './top_banner_info_constants';\n\nexport default {\n name: 'DtRecipeTopBannerInfo',\n\n props: {\n /**\n * color of the banner background\n */\n colorCode: {\n type: String,\n default: 'green300',\n validator: function (kind) {\n return COLOR_CODES.includes(kind);\n },\n },\n },\n\n computed: {\n bannerInfoClass () {\n const bgColors = {\n // these are too specific, so for now I'm at least updating the resultant semantic value\n // TODO: breaking change: update to be more abstract\n green100: 'd-recipe-top-banner-info--success',\n green300: 'd-recipe-top-banner-info--success',\n red100: 'd-recipe-top-banner-info--critical',\n red200: 'd-recipe-top-banner-info--critical',\n gold100: 'd-recipe-top-banner-info--warning',\n gold200: 'd-recipe-top-banner-info--warning',\n black100: 'd-recipe-top-banner-info--info',\n white: 'd-recipe-top-banner-info--primary',\n };\n return [bgColors[this.colorCode]];\n },\n },\n};\n</script>\n"],"names":["_sfc_main","kind","COLOR_CODES"],"mappings":";;AA0BA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,SAAAC,GAAA;AACA,eAAAC,EAAA,SAAAD,CAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,kBAAA;AAaA,aAAA,CAZA;AAAA;AAAA;AAAA,QAGA,UAAA;AAAA,QACA,UAAA;AAAA,QACA,QAAA;AAAA,QACA,QAAA;AAAA,QACA,SAAA;AAAA,QACA,SAAA;AAAA,QACA,UAAA;AAAA,QACA,OAAA;AAAA,MACA,EACA,KAAA,SAAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("@dialpad/dialtone-icons/vue2"),i=require("./unread-pill-constants.cjs"),a=require("../../_plugin-vue2_normalizer-yXi3ZRRD.cjs"),l={name:"DtRecipeUnreadPill",components:{DtIconArrowUp:n.DtIconArrowUp,DtIconArrowDown:n.DtIconArrowDown},props:{kind:{type:String,required:!0,validator:r=>i.UNREAD_PILL_KINDS.includes(r)},direction:{type:String,required:!0,validator:r=>i.UNREAD_PILL_DIRECTIONS.includes(r)}},emits:["click"]};var o=function(){var e=this,t=e._self._c;return t("button",e._g({class:["d-recipe-leftbar-unread-pill",`d-recipe-leftbar-unread-pill-${e.kind}`],attrs:{type:"button","data-qa":"dt-recipe-leftbar-unread-pill"}},e.$listeners),[e.direction==="up"?t("dt-icon-arrow-up",{attrs:{size:"300"}}):t("dt-icon-arrow-down",{attrs:{size:"300"}}),t("span",{attrs:{"data-qa":"dt-recipe-leftbar-unread-pill__label"}},[e._t("default")],2)],1)},s=[],d=a.n(l,o,s,!1,null,null);const u=d.exports;exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("@dialpad/dialtone-icons/vue2"),i=require("./unread-pill-constants.cjs"),a=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),l={name:"DtRecipeUnreadPill",components:{DtIconArrowUp:n.DtIconArrowUp,DtIconArrowDown:n.DtIconArrowDown},props:{kind:{type:String,required:!0,validator:r=>i.UNREAD_PILL_KINDS.includes(r)},direction:{type:String,required:!0,validator:r=>i.UNREAD_PILL_DIRECTIONS.includes(r)}},emits:["click"]};var o=function(){var e=this,t=e._self._c;return t("button",e._g({class:["d-recipe-leftbar-unread-pill",`d-recipe-leftbar-unread-pill-${e.kind}`],attrs:{type:"button","data-qa":"dt-recipe-leftbar-unread-pill"}},e.$listeners),[e.direction==="up"?t("dt-icon-arrow-up",{attrs:{size:"300"}}):t("dt-icon-arrow-down",{attrs:{size:"300"}}),t("span",{attrs:{"data-qa":"dt-recipe-leftbar-unread-pill__label"}},[e._t("default")],2)],1)},d=[],s=a.n(l,o,d);const c=s.exports;exports.default=c;
2
2
  //# sourceMappingURL=unread-pill.cjs.map
@@ -1,7 +1,7 @@
1
1
  import { DtIconArrowUp as n, DtIconArrowDown as a } from "@dialpad/dialtone-icons/vue2";
2
2
  import { UNREAD_PILL_KINDS as i, UNREAD_PILL_DIRECTIONS as o } from "./unread-pill-constants.js";
3
- import { n as l } from "../../_plugin-vue2_normalizer-CeySl7Fu.js";
4
- const d = {
3
+ import { n as d } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
4
+ const l = {
5
5
  name: "DtRecipeUnreadPill",
6
6
  components: {
7
7
  DtIconArrowUp: n,
@@ -40,13 +40,10 @@ const d = {
40
40
  var s = function() {
41
41
  var r = this, t = r._self._c;
42
42
  return t("button", r._g({ class: ["d-recipe-leftbar-unread-pill", `d-recipe-leftbar-unread-pill-${r.kind}`], attrs: { type: "button", "data-qa": "dt-recipe-leftbar-unread-pill" } }, r.$listeners), [r.direction === "up" ? t("dt-icon-arrow-up", { attrs: { size: "300" } }) : t("dt-icon-arrow-down", { attrs: { size: "300" } }), t("span", { attrs: { "data-qa": "dt-recipe-leftbar-unread-pill__label" } }, [r._t("default")], 2)], 1);
43
- }, c = [], p = /* @__PURE__ */ l(
44
- d,
43
+ }, c = [], p = /* @__PURE__ */ d(
44
+ l,
45
45
  s,
46
- c,
47
- !1,
48
- null,
49
- null
46
+ c
50
47
  );
51
48
  const m = p.exports;
52
49
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"unread-pill.js","sources":["../../../recipes/leftbar/unread_pill/unread_pill.vue"],"sourcesContent":["<template>\n <button\n :class=\"['d-recipe-leftbar-unread-pill', `d-recipe-leftbar-unread-pill-${kind}`]\"\n type=\"button\"\n data-qa=\"dt-recipe-leftbar-unread-pill\"\n v-on=\"$listeners\"\n >\n <dt-icon-arrow-up\n v-if=\"direction === 'up'\"\n size=\"300\"\n />\n <dt-icon-arrow-down\n v-else\n size=\"300\"\n />\n <span data-qa=\"dt-recipe-leftbar-unread-pill__label\">\n <slot />\n </span>\n </button>\n</template>\n\n<script>\nimport { DtIconArrowUp, DtIconArrowDown } from '@dialpad/dialtone-icons/vue2';\nimport { UNREAD_PILL_DIRECTIONS, UNREAD_PILL_KINDS } from './unread_pill_constants';\nexport default {\n name: 'DtRecipeUnreadPill',\n\n components: {\n DtIconArrowUp,\n DtIconArrowDown,\n },\n\n props: {\n /**\n * The kind of unread pill which determines the styling\n * @values 'mentions', 'messages'\n **/\n kind: {\n type: String,\n required: true,\n validator: (kind) => UNREAD_PILL_KINDS.includes(kind),\n },\n\n /**\n * The direction of the arrow icon\n * @values 'up', 'down'\n **/\n direction: {\n type: String,\n required: true,\n validator: (dir) => UNREAD_PILL_DIRECTIONS.includes(dir),\n },\n },\n\n emits: [\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n};\n</script>\n"],"names":["_sfc_main","DtIconArrowUp","DtIconArrowDown","kind","UNREAD_PILL_KINDS","dir","UNREAD_PILL_DIRECTIONS"],"mappings":";;;AAwBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AACA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"unread-pill.js","sources":["../../../recipes/leftbar/unread_pill/unread_pill.vue"],"sourcesContent":["<template>\n <button\n :class=\"['d-recipe-leftbar-unread-pill', `d-recipe-leftbar-unread-pill-${kind}`]\"\n type=\"button\"\n data-qa=\"dt-recipe-leftbar-unread-pill\"\n v-on=\"$listeners\"\n >\n <dt-icon-arrow-up\n v-if=\"direction === 'up'\"\n size=\"300\"\n />\n <dt-icon-arrow-down\n v-else\n size=\"300\"\n />\n <span data-qa=\"dt-recipe-leftbar-unread-pill__label\">\n <slot />\n </span>\n </button>\n</template>\n\n<script>\nimport { DtIconArrowUp, DtIconArrowDown } from '@dialpad/dialtone-icons/vue2';\nimport { UNREAD_PILL_DIRECTIONS, UNREAD_PILL_KINDS } from './unread_pill_constants';\nexport default {\n name: 'DtRecipeUnreadPill',\n\n components: {\n DtIconArrowUp,\n DtIconArrowDown,\n },\n\n props: {\n /**\n * The kind of unread pill which determines the styling\n * @values 'mentions', 'messages'\n **/\n kind: {\n type: String,\n required: true,\n validator: (kind) => UNREAD_PILL_KINDS.includes(kind),\n },\n\n /**\n * The direction of the arrow icon\n * @values 'up', 'down'\n **/\n direction: {\n type: String,\n required: true,\n validator: (dir) => UNREAD_PILL_DIRECTIONS.includes(dir),\n },\n },\n\n emits: [\n /**\n * Native click event\n *\n * @event click\n * @type {PointerEvent | KeyboardEvent}\n */\n 'click',\n ],\n};\n</script>\n"],"names":["_sfc_main","DtIconArrowUp","DtIconArrowDown","kind","UNREAD_PILL_KINDS","dir","UNREAD_PILL_DIRECTIONS"],"mappings":";;;AAwBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA,CAAAC,MAAAC,EAAA,SAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA,CAAAE,MAAAC,EAAA,SAAAD,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA;AAAA,EACA;AACA;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../common/validators/index.cjs"),t=require("../../common/utils/index.cjs"),l=require("../../_plugin-vue2_normalizer-yXi3ZRRD.cjs"),d={name:"DtValidationMessages",props:{id:{type:String,default(){return t.getUniqueString()}},validationMessages:{type:Array,default:()=>[],validator:s=>o.validationMessageValidator(s)},showMessages:{type:Boolean,default:!0}},computed:{isFilteredValidationMessagesEmpty(){return this.filteredValidationMessages.length===0},filteredValidationMessages(){return t.filterFormattedMessages(this.validationMessages)},validationState(){return t.getValidationState(this.validationMessages)}},methods:{getMessageKey(s,e){return`validation-message-${s}-${e}-${this.id}`},messageTypeClass(s){return{error:"base-input__message--error d-validation-message--error",warning:"base-input__message--warning d-validation-message--warning",success:"base-input__message--success d-validation-message--success"}[s]}}};var g=function(){var e=this,a=e._self._c;return e.showMessages&&!e.isFilteredValidationMessagesEmpty?a("div",{staticClass:"base-input__messages d-validation-message__container",attrs:{"data-qa":"validation-messages-container"}},e._l(e.filteredValidationMessages,function({message:n,type:i},r){return a("div",{key:e.getMessageKey(i,r),class:["base-input__message","d-validation-message",e.messageTypeClass(i)],attrs:{role:"status","aria-live":"polite","data-qa":"validation-message"}},[a("p",{domProps:{innerHTML:e._s(n)}})])}),0):e._e()},u=[],_=l.n(d,g,u,!1,null,null);const m=_.exports;exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../../common/validators/index.cjs"),t=require("../../common/utils/index.cjs"),d=require("../../_plugin-vue2_normalizer-e_CkxkSV.cjs"),l={name:"DtValidationMessages",props:{id:{type:String,default(){return t.getUniqueString()}},validationMessages:{type:Array,default:()=>[],validator:s=>o.validationMessageValidator(s)},showMessages:{type:Boolean,default:!0}},computed:{isFilteredValidationMessagesEmpty(){return this.filteredValidationMessages.length===0},filteredValidationMessages(){return t.filterFormattedMessages(this.validationMessages)},validationState(){return t.getValidationState(this.validationMessages)}},methods:{getMessageKey(s,e){return`validation-message-${s}-${e}-${this.id}`},messageTypeClass(s){return{error:"base-input__message--error d-validation-message--error",warning:"base-input__message--warning d-validation-message--warning",success:"base-input__message--success d-validation-message--success"}[s]}}};var g=function(){var e=this,a=e._self._c;return e.showMessages&&!e.isFilteredValidationMessagesEmpty?a("div",{staticClass:"base-input__messages d-validation-message__container",attrs:{"data-qa":"validation-messages-container"}},e._l(e.filteredValidationMessages,function({message:n,type:i},r){return a("div",{key:e.getMessageKey(i,r),class:["base-input__message","d-validation-message",e.messageTypeClass(i)],attrs:{role:"status","aria-live":"polite","data-qa":"validation-message"}},[a("p",{domProps:{innerHTML:e._s(n)}})])}),0):e._e()},u=[],_=d.n(l,g,u);const m=_.exports;exports.default=m;
2
2
  //# sourceMappingURL=validation-messages.cjs.map
@@ -1,6 +1,6 @@
1
1
  import { validationMessageValidator as r } from "../../common/validators/index.js";
2
- import { getUniqueString as o, filterFormattedMessages as l, getValidationState as d } from "../../common/utils/index.js";
3
- import { n as g } from "../../_plugin-vue2_normalizer-CeySl7Fu.js";
2
+ import { getUniqueString as o, filterFormattedMessages as d, getValidationState as l } from "../../common/utils/index.js";
3
+ import { n as g } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
4
4
  const m = {
5
5
  name: "DtValidationMessages",
6
6
  props: {
@@ -36,10 +36,10 @@ const m = {
36
36
  return this.filteredValidationMessages.length === 0;
37
37
  },
38
38
  filteredValidationMessages() {
39
- return l(this.validationMessages);
39
+ return d(this.validationMessages);
40
40
  },
41
41
  validationState() {
42
- return d(this.validationMessages);
42
+ return l(this.validationMessages);
43
43
  }
44
44
  },
45
45
  methods: {
@@ -64,15 +64,12 @@ var _ = function() {
64
64
  e.messageTypeClass(t)
65
65
  ], attrs: { role: "status", "aria-live": "polite", "data-qa": "validation-message" } }, [a("p", { domProps: { innerHTML: e._s(i) } })]);
66
66
  }), 0) : e._e();
67
- }, u = [], p = /* @__PURE__ */ g(
67
+ }, p = [], u = /* @__PURE__ */ g(
68
68
  m,
69
69
  _,
70
- u,
71
- !1,
72
- null,
73
- null
70
+ p
74
71
  );
75
- const M = p.exports;
72
+ const M = u.exports;
76
73
  export {
77
74
  M as default
78
75
  };
@@ -1 +1 @@
1
- {"version":3,"file":"validation-messages.js","sources":["../../../components/validation_messages/validation_messages.vue"],"sourcesContent":["<template>\n <div\n v-if=\"showMessages && !isFilteredValidationMessagesEmpty\"\n class=\"base-input__messages d-validation-message__container\"\n data-qa=\"validation-messages-container\"\n >\n <div\n v-for=\"({ message, type }, index) in filteredValidationMessages\"\n :key=\"getMessageKey(type, index)\"\n role=\"status\"\n aria-live=\"polite\"\n data-qa=\"validation-message\"\n :class=\"[\n 'base-input__message',\n 'd-validation-message',\n messageTypeClass(type),\n ]\"\n >\n <p v-html=\"message\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { validationMessageValidator } from '@/common/validators';\nimport {\n getUniqueString,\n filterFormattedMessages,\n getValidationState,\n} from '@/common/utils';\n\n/**\n * Validation messages are used to convey information to the user about the current state of the input element.\n * These messages can have an error, warning or success type.\n * @see https://dialtone.dialpad.com/components/validation_messages.html\n */\nexport default {\n name: 'DtValidationMessages',\n\n props: {\n /**\n * The id of the validation message\n */\n id: {\n type: String,\n default () {\n return getUniqueString();\n },\n },\n\n /**\n * Array of validation messages. Each message has the following structure:\n * `{ message: \"Some informative message\", type: \"error|warning|success\"}`\n */\n validationMessages: {\n type: Array,\n default: () => [],\n validator: messages => validationMessageValidator(messages),\n },\n\n /**\n * Show Validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n },\n\n computed: {\n isFilteredValidationMessagesEmpty () {\n return this.filteredValidationMessages.length === 0;\n },\n\n filteredValidationMessages () {\n return filterFormattedMessages(this.validationMessages);\n },\n\n validationState () {\n return getValidationState(this.validationMessages);\n },\n },\n\n methods: {\n getMessageKey (type, index) {\n return `validation-message-${type}-${index}-${this.id}`;\n },\n\n messageTypeClass (type) {\n const messageTypesClasses = {\n error: 'base-input__message--error d-validation-message--error',\n warning: 'base-input__message--warning d-validation-message--warning',\n success: 'base-input__message--success d-validation-message--success',\n };\n\n return messageTypesClasses[type];\n },\n },\n};\n</script>\n"],"names":["_sfc_main","getUniqueString","messages","validationMessageValidator","filterFormattedMessages","getValidationState","type","index"],"mappings":";;;AAoCA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AACA,eAAAC,EAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,MACA,WAAA,CAAAC,MAAAC,EAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,oCAAA;AACA,aAAA,KAAA,2BAAA,WAAA;AAAA,IACA;AAAA,IAEA,6BAAA;AACA,aAAAE,EAAA,KAAA,kBAAA;AAAA,IACA;AAAA,IAEA,kBAAA;AACA,aAAAC,EAAA,KAAA,kBAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,cAAAC,GAAAC,GAAA;AACA,aAAA,sBAAAD,CAAA,IAAAC,CAAA,IAAA,KAAA,EAAA;AAAA,IACA;AAAA,IAEA,iBAAAD,GAAA;AAOA,aANA;AAAA,QACA,OAAA;AAAA,QACA,SAAA;AAAA,QACA,SAAA;AAAA,MACA,EAEAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"validation-messages.js","sources":["../../../components/validation_messages/validation_messages.vue"],"sourcesContent":["<template>\n <div\n v-if=\"showMessages && !isFilteredValidationMessagesEmpty\"\n class=\"base-input__messages d-validation-message__container\"\n data-qa=\"validation-messages-container\"\n >\n <div\n v-for=\"({ message, type }, index) in filteredValidationMessages\"\n :key=\"getMessageKey(type, index)\"\n role=\"status\"\n aria-live=\"polite\"\n data-qa=\"validation-message\"\n :class=\"[\n 'base-input__message',\n 'd-validation-message',\n messageTypeClass(type),\n ]\"\n >\n <p v-html=\"message\" />\n </div>\n </div>\n</template>\n\n<script>\nimport { validationMessageValidator } from '@/common/validators';\nimport {\n getUniqueString,\n filterFormattedMessages,\n getValidationState,\n} from '@/common/utils';\n\n/**\n * Validation messages are used to convey information to the user about the current state of the input element.\n * These messages can have an error, warning or success type.\n * @see https://dialtone.dialpad.com/components/validation_messages.html\n */\nexport default {\n name: 'DtValidationMessages',\n\n props: {\n /**\n * The id of the validation message\n */\n id: {\n type: String,\n default () {\n return getUniqueString();\n },\n },\n\n /**\n * Array of validation messages. Each message has the following structure:\n * `{ message: \"Some informative message\", type: \"error|warning|success\"}`\n */\n validationMessages: {\n type: Array,\n default: () => [],\n validator: messages => validationMessageValidator(messages),\n },\n\n /**\n * Show Validation messages\n * @values true, false\n */\n showMessages: {\n type: Boolean,\n default: true,\n },\n },\n\n computed: {\n isFilteredValidationMessagesEmpty () {\n return this.filteredValidationMessages.length === 0;\n },\n\n filteredValidationMessages () {\n return filterFormattedMessages(this.validationMessages);\n },\n\n validationState () {\n return getValidationState(this.validationMessages);\n },\n },\n\n methods: {\n getMessageKey (type, index) {\n return `validation-message-${type}-${index}-${this.id}`;\n },\n\n messageTypeClass (type) {\n const messageTypesClasses = {\n error: 'base-input__message--error d-validation-message--error',\n warning: 'base-input__message--warning d-validation-message--warning',\n success: 'base-input__message--success d-validation-message--success',\n };\n\n return messageTypesClasses[type];\n },\n },\n};\n</script>\n"],"names":["_sfc_main","getUniqueString","messages","validationMessageValidator","filterFormattedMessages","getValidationState","type","index"],"mappings":";;;AAoCA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AACA,eAAAC,EAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,oBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,MACA,WAAA,CAAAC,MAAAC,EAAAD,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,oCAAA;AACA,aAAA,KAAA,2BAAA,WAAA;AAAA,IACA;AAAA,IAEA,6BAAA;AACA,aAAAE,EAAA,KAAA,kBAAA;AAAA,IACA;AAAA,IAEA,kBAAA;AACA,aAAAC,EAAA,KAAA,kBAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,cAAAC,GAAAC,GAAA;AACA,aAAA,sBAAAD,CAAA,IAAAC,CAAA,IAAA,KAAA,EAAA;AAAA,IACA;AAAA,IAEA,iBAAAD,GAAA;AAOA,aANA;AAAA,QACA,OAAA;AAAA,QACA,SAAA;AAAA,QACA,SAAA;AAAA,MACA,EAEAA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("@dialpad/dialtone-icons/vue2"),n=require("../_plugin-vue2_normalizer-yXi3ZRRD.cjs"),s=require("../lib/button/button.cjs"),r={name:"SrOnlyCloseButton",components:{DtIconClose:o.DtIconClose,DtButton:s.default},props:{visuallyHiddenCloseLabel:{type:String,default:null}},emits:["close"],methods:{close(){this.$emit("close")}}};var u=function(){var e=this,l=e._self._c;return l("dt-button",{staticClass:"d-vi-visible-sr",attrs:{id:"sr-only-close-button","data-qa":"dt-sr-only-close-button","aria-label":e.visuallyHiddenCloseLabel},on:{click:e.close,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"space",32,t.key,[" ","Spacebar"])?null:(t.preventDefault(),t.stopPropagation(),e.close.apply(null,arguments))}}},[l("dt-icon-close")],1)},a=[],i=n.n(r,u,a,!1,null,null);const c=i.exports;exports.default=c;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("@dialpad/dialtone-icons/vue2"),l=require("../_plugin-vue2_normalizer-e_CkxkSV.cjs"),s=require("../lib/button/button.cjs"),r={name:"SrOnlyCloseButton",components:{DtIconClose:n.DtIconClose,DtButton:s.default},props:{visuallyHiddenCloseLabel:{type:String,default:null}},emits:["close"],methods:{close(){this.$emit("close")}}};var a=function(){var e=this,o=e._self._c;return o("dt-button",{staticClass:"d-vi-visible-sr",attrs:{id:"sr-only-close-button","data-qa":"dt-sr-only-close-button","aria-label":e.visuallyHiddenCloseLabel},on:{click:e.close,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"space",32,t.key,[" ","Spacebar"])?null:(t.preventDefault(),t.stopPropagation(),e.close.apply(null,arguments))}}},[o("dt-icon-close")],1)},u=[],i=l.n(r,a,u);const c=i.exports;exports.default=c;
2
2
  //# sourceMappingURL=sr_only_close_button.cjs.map
@@ -1,11 +1,11 @@
1
- import { DtIconClose as l } from "@dialpad/dialtone-icons/vue2";
2
- import { n } from "../_plugin-vue2_normalizer-CeySl7Fu.js";
3
- import s from "../lib/button/button.js";
1
+ import { DtIconClose as n } from "@dialpad/dialtone-icons/vue2";
2
+ import { n as s } from "../_plugin-vue2_normalizer-DSLOjnn3.js";
3
+ import l from "../lib/button/button.js";
4
4
  const r = {
5
5
  name: "SrOnlyCloseButton",
6
6
  components: {
7
- DtIconClose: l,
8
- DtButton: s
7
+ DtIconClose: n,
8
+ DtButton: l
9
9
  },
10
10
  props: {
11
11
  /**
@@ -29,16 +29,13 @@ var a = function() {
29
29
  return e("dt-button", { staticClass: "d-vi-visible-sr", attrs: { id: "sr-only-close-button", "data-qa": "dt-sr-only-close-button", "aria-label": o.visuallyHiddenCloseLabel }, on: { click: o.close, keydown: function(t) {
30
30
  return !t.type.indexOf("key") && o._k(t.keyCode, "space", 32, t.key, [" ", "Spacebar"]) ? null : (t.preventDefault(), t.stopPropagation(), o.close.apply(null, arguments));
31
31
  } } }, [e("dt-icon-close")], 1);
32
- }, i = [], c = /* @__PURE__ */ n(
32
+ }, i = [], c = /* @__PURE__ */ s(
33
33
  r,
34
34
  a,
35
- i,
36
- !1,
37
- null,
38
- null
35
+ i
39
36
  );
40
- const f = c.exports;
37
+ const _ = c.exports;
41
38
  export {
42
- f as default
39
+ _ as default
43
40
  };
44
41
  //# sourceMappingURL=sr_only_close_button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sr_only_close_button.js","sources":["../../common/sr_only_close_button.vue"],"sourcesContent":["<template>\n <dt-button\n id=\"sr-only-close-button\"\n data-qa=\"dt-sr-only-close-button\"\n class=\"d-vi-visible-sr\"\n :aria-label=\"visuallyHiddenCloseLabel\"\n @click=\"close\"\n @keydown.space.prevent.stop=\"close\"\n >\n <dt-icon-close />\n </dt-button>\n</template>\n\n<script>\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue2';\nimport { DtButton } from '@/components/button';\n\nexport default {\n name: 'SrOnlyCloseButton',\n components: {\n DtIconClose,\n DtButton,\n },\n\n props: {\n /**\n * Label for the visually hidden close button\n * Required if visuallyHiddenClose is set to `true`\n */\n visuallyHiddenCloseLabel: {\n type: String,\n default: null,\n },\n },\n\n emits: ['close'],\n\n methods: {\n close () {\n this.$emit('close');\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtIconClose","DtButton"],"mappings":";;;AAiBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,0BAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA,CAAA,OAAA;AAAA,EAEA,SAAA;AAAA,IACA,QAAA;AACA,WAAA,MAAA,OAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"sr_only_close_button.js","sources":["../../common/sr_only_close_button.vue"],"sourcesContent":["<template>\n <dt-button\n id=\"sr-only-close-button\"\n data-qa=\"dt-sr-only-close-button\"\n class=\"d-vi-visible-sr\"\n :aria-label=\"visuallyHiddenCloseLabel\"\n @click=\"close\"\n @keydown.space.prevent.stop=\"close\"\n >\n <dt-icon-close />\n </dt-button>\n</template>\n\n<script>\nimport { DtIconClose } from '@dialpad/dialtone-icons/vue2';\nimport { DtButton } from '@/components/button';\n\nexport default {\n name: 'SrOnlyCloseButton',\n components: {\n DtIconClose,\n DtButton,\n },\n\n props: {\n /**\n * Label for the visually hidden close button\n * Required if visuallyHiddenClose is set to `true`\n */\n visuallyHiddenCloseLabel: {\n type: String,\n default: null,\n },\n },\n\n emits: ['close'],\n\n methods: {\n close () {\n this.$emit('close');\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtIconClose","DtButton"],"mappings":";;;AAiBA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,0BAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA,CAAA,OAAA;AAAA,EAEA,SAAA;AAAA,IACA,QAAA;AACA,WAAA,MAAA,OAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"popover.vue.d.ts","sourceRoot":"","sources":["../../../../components/popover/popover.vue"],"names":[],"mappings":"AAwHA;"}
1
+ {"version":3,"file":"popover.vue.d.ts","sourceRoot":"","sources":["../../../../components/popover/popover.vue"],"names":[],"mappings":"AAuHA;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("../combobox-with-popover/combobox-with-popover.cjs"),b=require("../input/input.cjs"),C=require("../chip/chip.cjs"),y=require("../validation-messages/validation-messages.cjs"),x=require("../../common/validators/index.cjs"),u=require("../../common/utils/index.cjs"),v=require("../popover/popover-constants.cjs"),p=require("./combobox-multi-select-constants.cjs"),I=require("../../common/mixins/sr-only-close-button.cjs"),t=require("vue"),_=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),S={compatConfig:{MODE:3},name:"DtRecipeComboboxMultiSelect",components:{DtRecipeComboboxWithPopover:f.default,DtInput:b.default,DtChip:C.default,DtValidationMessages:y.default},mixins:[I.default],props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},description:{type:String,default:""},placeholder:{type:String,default:"Select one or start typing"},inputMessages:{type:Array,default:()=>[],validator:e=>x.validationMessageValidator(e)},showInputMessages:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingMessage:{type:String,default:"loading..."},showList:{type:Boolean,default:null},listMaxHeight:{type:String,default:"300px"},selectedItems:{type:Array,default:function(){return[]}},maxSelected:{type:Number,default:0},maxSelectedMessage:{type:Array,default:function(){return[]}},hasSuggestionList:{type:Boolean,default:!0},size:{type:String,default:"md",validator:e=>Object.values(p.MULTI_SELECT_SIZES).includes(e)},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>v.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},transition:{type:String,default:"fade"},collapseOnFocusOut:{type:Boolean,default:!1},listMaxWidth:{type:String,default:""},reservedRightSpace:{type:Number,default:64},chipMaxWidth:{type:String,default:""},inputClass:{type:[String,Object,Array],default:""},inputWrapperClass:{type:[String,Object,Array],default:""}},emits:["input","select","remove","max-selected","keyup","combobox-highlight"],data(){return{value:"",popoverOffset:[0,4],showValidationMessages:!1,resizeWindowObserver:null,initialInputHeight:null,CHIP_SIZES:p.CHIP_SIZES,hasSlotContent:u.hasSlotContent,inputFocused:!1,hideInputText:!1}},computed:{inputPlaceHolder(){var e;return((e=this.selectedItems)==null?void 0:e.length)>0?"":this.placeholder},chipListeners(){return{keyup:e=>{this.onChipKeyup(e),this.$emit("keyup",e)}}},inputListeners(){return{input:e=>{this.$emit("input",e),this.hasSuggestionList&&this.showComboboxList()},keyup:e=>{this.onInputKeyup(e),this.$emit("keyup",e)},click:e=>{this.hasSuggestionList&&this.showComboboxList()}}},chipWrapperClass(){return{[`d-recipe-combobox-multi-select__chip-wrapper-${this.size}--collapsed`]:!this.inputFocused&&this.collapseOnFocusOut}}},watch:{selectedItems:{deep:!0,handler:async function(){this.initSelectedItems()}},chipMaxWidth:{async handler(){this.initSelectedItems()}},async label(){await this.$nextTick(),this.setChipsTopPosition()},async description(){await this.$nextTick(),this.setChipsTopPosition()},size:{async handler(){await this.$nextTick();const e=this.getInput();this.revertInputPadding(e),this.initialInputHeight=e.getBoundingClientRect().height,this.setInputPadding(),this.setChipsTopPosition()}}},mounted(){this.setInitialInputHeight(),this.resizeWindowObserver=new ResizeObserver(async()=>{this.setChipsTopPosition(),this.setInputPadding()}),this.resizeWindowObserver.observe(document.body),this.initSelectedItems()},beforeUnmount(){var e;(e=this.resizeWindowObserver)==null||e.unobserve(document.body)},methods:{comboboxHighlight(e){this.$emit("combobox-highlight",e)},async initSelectedItems(){await this.$nextTick(),this.setInputPadding(),this.setChipsTopPosition(),this.setInputMinWidth(),this.checkMaxSelected()},onChipRemove(e){var s;this.$emit("remove",e),(s=this.$refs.input)==null||s.focus()},onComboboxSelect(e){this.loading||(this.value="",this.$emit("select",e))},showComboboxList(){var e;this.showList==null&&((e=this.$refs.comboboxWithPopover)==null||e.showComboboxList())},closeComboboxList(){var e;this.showList==null&&((e=this.$refs.comboboxWithPopover)==null||e.closeComboboxList())},getChipButtons(){return this.$refs.chips&&this.$refs.chips.map(e=>u.returnFirstEl(e.$el).querySelector("button"))},getChips(){return this.$refs.chips&&this.$refs.chips.map(e=>u.returnFirstEl(e.$el))},getLastChipButton(){return this.$refs.chips&&this.getChipButtons()[this.getChipButtons().length-1]},getLastChip(){return this.$refs.chips&&this.getChips()[this.getChips().length-1]},getFirstChip(){return this.$refs.chips&&this.getChips()[0]},getInput(){var e;return(e=this.$refs.input)==null?void 0:e.$refs.input},onChipKeyup(e){var i;const s=(i=e.code)==null?void 0:i.toLowerCase();s==="arrowleft"?this.navigateBetweenChips(e.target,!0):s==="arrowright"&&(e.target.id===this.getLastChipButton().id?this.moveFromChipToInput():this.navigateBetweenChips(e.target,!1))},onInputKeyup(e){var i;const s=(i=e.code)==null?void 0:i.toLowerCase();this.selectedItems.length>0&&e.target.selectionStart===0&&(s==="backspace"||s==="arrowleft")&&this.moveFromInputToChip()},moveFromInputToChip(){var e;this.getLastChipButton().focus(),(e=this.$refs.input)==null||e.blur(),this.closeComboboxList()},moveFromChipToInput(){var e;this.getLastChipButton().blur(),(e=this.$refs.input)==null||e.focus(),this.showComboboxList()},navigateBetweenChips(e,s){var o;const i=this.getChipButtons().indexOf(e),a=s?i-1:i+1;a<0||a>=((o=this.$refs.chips)==null?void 0:o.length)||(this.getChipButtons()[i].blur(),this.getChipButtons()[a].focus(),this.closeComboboxList())},setChipsTopPosition(){const e=this.getInput();if(!e)return;const s=this.$refs.inputSlotWrapper,i=e.getBoundingClientRect().top-s.getBoundingClientRect().top,a=this.$refs.chipsWrapper;a.style.top=i-p.CHIP_TOP_POSITION[this.size]+"px"},setInputPadding(){const e=this.getLastChip(),s=this.getInput(),i=this.$refs.chipsWrapper;if(!s||(this.revertInputPadding(s),this.popoverOffset=[0,4],!e)||this.collapseOnFocusOut&&!this.inputFocused)return;const a=e.offsetLeft+this.getFullWidth(e),o=s.getBoundingClientRect().width-a;o>this.reservedRightSpace?s.style.paddingLeft=a+"px":s.style.paddingLeft="4px";const n=i.getBoundingClientRect().height-4,r=e.getBoundingClientRect().height-4,h=o>this.reservedRightSpace?e.offsetTop+2:n+r-9;s.style.paddingTop=`${h}px`},revertInputPadding(e){e.style.paddingLeft="",e.style.paddingTop="",e.style.paddingBottom=""},getFullWidth(e){const s=window.getComputedStyle(e);return e.offsetWidth+parseInt(s.marginLeft)+parseInt(s.marginRight)},setInputMinWidth(){const e=this.getFirstChip(),s=this.getInput();s&&(e?s.style.minWidth=this.getFullWidth(e)+4+"px":s.style.minWidth="")},checkMaxSelected(){this.maxSelected!==0&&(this.selectedItems.length>this.maxSelected?(this.showValidationMessages=!0,this.$emit("max-selected")):this.showValidationMessages=!1)},setInitialInputHeight(){const e=this.getInput();e&&(this.initialInputHeight=e.getBoundingClientRect().height)},async handleInputFocusIn(){this.inputFocused=!0,this.collapseOnFocusOut&&(await this.$nextTick(),this.setInputPadding(),this.hideInputText=!1)},async handleInputFocusOut(){if(this.inputFocused=!1,this.collapseOnFocusOut){const e=this.getInput();if(!e||!e.style.paddingTop)return;this.hideInputText=!0,this.revertInputPadding(e)}}}},w={ref:"header"},L={key:1,class:"d-recipe-combobox-multi-select__list--loading"},M={ref:"footer"};function W(e,s,i,a,o,n){const r=t.resolveComponent("dt-chip"),h=t.resolveComponent("dt-input"),c=t.resolveComponent("dt-validation-messages"),d=t.resolveComponent("dt-recipe-combobox-with-popover");return t.openBlock(),t.createBlock(d,{ref:"comboboxWithPopover",label:i.label,"show-list":i.showList,"max-height":i.listMaxHeight,"max-width":i.listMaxWidth,"popover-offset":o.popoverOffset,"has-suggestion-list":i.hasSuggestionList,"visually-hidden-close-label":e.visuallyHiddenCloseLabel,"visually-hidden-close":e.visuallyHiddenClose,"content-width":"anchor","append-to":i.appendTo,transition:i.transition,onSelect:n.onComboboxSelect,onHighlight:n.comboboxHighlight},t.createSlots({input:t.withCtx(({onInput:g})=>[t.createElementVNode("span",{ref:"inputSlotWrapper",class:"d-recipe-combobox-multi-select__input-wrapper",onFocusin:s[1]||(s[1]=(...l)=>n.handleInputFocusIn&&n.handleInputFocusIn(...l)),onFocusout:s[2]||(s[2]=(...l)=>n.handleInputFocusOut&&n.handleInputFocusOut(...l))},[t.createElementVNode("span",{ref:"chipsWrapper",class:t.normalizeClass(["d-recipe-combobox-multi-select__chip-wrapper",n.chipWrapperClass])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.selectedItems,l=>(t.openBlock(),t.createBlock(r,t.mergeProps({ref_for:!0,ref:"chips",key:l,"label-class":["d-chip__label"],class:["d-recipe-combobox-multi-select__chip",{"d-recipe-combobox-multi-select__chip--truncate":!!i.chipMaxWidth}],style:{maxWidth:i.chipMaxWidth},"close-button-props":{ariaLabel:"close"},size:o.CHIP_SIZES[i.size]},t.toHandlers(n.chipListeners),{onKeyup:t.withKeys(m=>n.onChipRemove(l),["backspace"]),onClose:m=>n.onChipRemove(l)}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l),1)]),_:2},1040,["class","style","size","onKeyup","onClose"]))),128))],2),t.createVNode(h,t.mergeProps({ref:"input",modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=l=>o.value=l),class:"d-recipe-combobox-multi-select__input","input-class":[i.inputClass,{"d-recipe-combobox-multi-select__input--hidden":o.hideInputText}],"input-wrapper-class":i.inputWrapperClass,"aria-label":i.label,label:i.labelVisible?i.label:"",description:i.description,placeholder:n.inputPlaceHolder,"show-messages":i.showInputMessages,messages:i.inputMessages,size:i.size},t.toHandlers(n.inputListeners),{onInput:g}),null,16,["modelValue","input-class","input-wrapper-class","aria-label","label","description","placeholder","show-messages","messages","size","onInput"]),t.createVNode(c,{"validation-messages":i.maxSelectedMessage,"show-messages":o.showValidationMessages},null,8,["validation-messages","show-messages"])],544)]),list:t.withCtx(()=>[t.createElementVNode("div",{ref:"list",class:"d-recipe-combobox-multi-select__list",onMousedown:s[3]||(s[3]=t.withModifiers(()=>{},["prevent"]))},[i.loading?(t.openBlock(),t.createElementBlock("div",L,t.toDisplayString(i.loadingMessage),1)):t.renderSlot(e.$slots,"list",{key:0})],544)]),_:2},[o.hasSlotContent(e.$slots.header)?{name:"header",fn:t.withCtx(()=>[t.createElementVNode("div",w,[t.renderSlot(e.$slots,"header")],512)]),key:"0"}:void 0,o.hasSlotContent(e.$slots.footer)?{name:"footer",fn:t.withCtx(()=>[t.createElementVNode("div",M,[t.renderSlot(e.$slots,"footer")],512)]),key:"1"}:void 0]),1032,["label","show-list","max-height","max-width","popover-offset","has-suggestion-list","visually-hidden-close-label","visually-hidden-close","append-to","transition","onSelect","onHighlight"])}const B=_._(S,[["render",W]]);exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("../combobox-with-popover/combobox-with-popover.cjs"),b=require("../input/input.cjs"),C=require("../chip/chip.cjs"),y=require("../validation-messages/validation-messages.cjs"),x=require("../../common/validators/index.cjs"),u=require("../../common/utils/index.cjs"),v=require("../popover/popover-constants.cjs"),p=require("./combobox-multi-select-constants.cjs"),I=require("../../common/mixins/sr-only-close-button.cjs"),t=require("vue"),_=require("../../_plugin-vue_export-helper-BRilXfQE.cjs"),S={compatConfig:{MODE:3},name:"DtRecipeComboboxMultiSelect",components:{DtRecipeComboboxWithPopover:f.default,DtInput:b.default,DtChip:C.default,DtValidationMessages:y.default},mixins:[I.default],props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},description:{type:String,default:""},placeholder:{type:String,default:"Select one or start typing"},inputMessages:{type:Array,default:()=>[],validator:e=>x.validationMessageValidator(e)},showInputMessages:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingMessage:{type:String,default:"loading..."},showList:{type:Boolean,default:null},listMaxHeight:{type:String,default:"300px"},selectedItems:{type:Array,default:function(){return[]}},maxSelected:{type:Number,default:0},maxSelectedMessage:{type:Array,default:function(){return[]}},hasSuggestionList:{type:Boolean,default:!0},size:{type:String,default:"md",validator:e=>Object.values(p.MULTI_SELECT_SIZES).includes(e)},appendTo:{type:[HTMLElement,String],default:"body",validator:e=>v.POPOVER_APPEND_TO_VALUES.includes(e)||e instanceof HTMLElement},transition:{type:String,default:"fade"},collapseOnFocusOut:{type:Boolean,default:!1},listMaxWidth:{type:String,default:""},reservedRightSpace:{type:Number,default:64},chipMaxWidth:{type:String,default:""},inputClass:{type:[String,Object,Array],default:""},inputWrapperClass:{type:[String,Object,Array],default:""}},emits:["input","select","remove","max-selected","keyup","combobox-highlight"],data(){return{value:"",popoverOffset:[0,4],showValidationMessages:!1,resizeWindowObserver:null,initialInputHeight:null,CHIP_SIZES:p.CHIP_SIZES,hasSlotContent:u.hasSlotContent,inputFocused:!1,hideInputText:!1}},computed:{inputPlaceHolder(){var e;return((e=this.selectedItems)==null?void 0:e.length)>0?"":this.placeholder},chipListeners(){return{keyup:e=>{this.onChipKeyup(e),this.$emit("keyup",e)}}},inputListeners(){return{input:e=>{this.$emit("input",e),this.hasSuggestionList&&this.showComboboxList()},keyup:e=>{this.onInputKeyup(e),this.$emit("keyup",e)},click:e=>{this.hasSuggestionList&&this.showComboboxList()}}},chipWrapperClass(){return{[`d-recipe-combobox-multi-select__chip-wrapper-${this.size}--collapsed`]:!this.inputFocused&&this.collapseOnFocusOut}}},watch:{selectedItems:{deep:!0,handler:async function(){this.initSelectedItems()}},chipMaxWidth:{async handler(){this.initSelectedItems()}},async label(){await this.$nextTick(),this.setChipsTopPosition()},async description(){await this.$nextTick(),this.setChipsTopPosition()},size:{async handler(){await this.$nextTick();const e=this.getInput();this.revertInputPadding(e),this.initialInputHeight=e.getBoundingClientRect().height,this.setInputPadding(),this.setChipsTopPosition()}}},mounted(){this.setInitialInputHeight(),this.resizeWindowObserver=new ResizeObserver(async()=>{this.setChipsTopPosition(),this.setInputPadding()}),this.resizeWindowObserver.observe(document.body),this.initSelectedItems()},beforeUnmount(){var e;(e=this.resizeWindowObserver)==null||e.unobserve(document.body)},methods:{comboboxHighlight(e){this.$emit("combobox-highlight",e)},async initSelectedItems(){await this.$nextTick(),this.setInputPadding(),this.setChipsTopPosition(),this.setInputMinWidth(),this.checkMaxSelected()},onChipRemove(e){var s;this.$emit("remove",e),(s=this.$refs.input)==null||s.focus()},onComboboxSelect(e){this.loading||(this.value="",this.$emit("select",e))},showComboboxList(){var e;this.showList==null&&((e=this.$refs.comboboxWithPopover)==null||e.showComboboxList())},closeComboboxList(){var e;this.showList==null&&((e=this.$refs.comboboxWithPopover)==null||e.closeComboboxList())},getChipButtons(){return this.$refs.chips&&this.$refs.chips.map(e=>u.returnFirstEl(e.$el).querySelector("button"))},getChips(){return this.$refs.chips&&this.$refs.chips.map(e=>u.returnFirstEl(e.$el))},getLastChipButton(){return this.$refs.chips&&this.getChipButtons()[this.getChipButtons().length-1]},getLastChip(){return this.$refs.chips&&this.getChips()[this.getChips().length-1]},getFirstChip(){return this.$refs.chips&&this.getChips()[0]},getInput(){var e;return(e=this.$refs.input)==null?void 0:e.$refs.input},onChipKeyup(e){var i;const s=(i=e.code)==null?void 0:i.toLowerCase();s==="arrowleft"?this.navigateBetweenChips(e.target,!0):s==="arrowright"&&(e.target.id===this.getLastChipButton().id?this.moveFromChipToInput():this.navigateBetweenChips(e.target,!1))},onInputKeyup(e){var i;const s=(i=e.code)==null?void 0:i.toLowerCase();this.selectedItems.length>0&&e.target.selectionStart===0&&(s==="backspace"||s==="arrowleft")&&this.moveFromInputToChip()},moveFromInputToChip(){var e;this.getLastChipButton().focus(),(e=this.$refs.input)==null||e.blur(),this.closeComboboxList()},moveFromChipToInput(){var e;this.getLastChipButton().blur(),(e=this.$refs.input)==null||e.focus(),this.showComboboxList()},navigateBetweenChips(e,s){var o;const i=this.getChipButtons().indexOf(e),a=s?i-1:i+1;a<0||a>=((o=this.$refs.chips)==null?void 0:o.length)||(this.getChipButtons()[i].blur(),this.getChipButtons()[a].focus(),this.closeComboboxList())},setChipsTopPosition(){const e=this.getInput();if(!e)return;const s=this.$refs.inputSlotWrapper,i=e.getBoundingClientRect().top-s.getBoundingClientRect().top,a=this.$refs.chipsWrapper;a.style.top=i-p.CHIP_TOP_POSITION[this.size]+"px"},setInputPadding(){const e=this.getLastChip(),s=this.getInput(),i=this.$refs.chipsWrapper;if(!s||(this.revertInputPadding(s),this.popoverOffset=[0,4],!e)||this.collapseOnFocusOut&&!this.inputFocused)return;const a=e.offsetLeft+this.getFullWidth(e),o=s.getBoundingClientRect().width-a;o>this.reservedRightSpace?s.style.paddingLeft=a+"px":s.style.paddingLeft="4px";const n=i.getBoundingClientRect().height-4,r=e.getBoundingClientRect().height-4,h=o>this.reservedRightSpace?e.offsetTop+2:n+r-9;s.style.paddingTop=`${h}px`},revertInputPadding(e){e.style.paddingLeft="",e.style.paddingTop="",e.style.paddingBottom=""},getFullWidth(e){const s=window.getComputedStyle(e);return e.offsetWidth+parseInt(s.marginLeft)+parseInt(s.marginRight)},setInputMinWidth(){const e=this.getFirstChip(),s=this.getInput();s&&(e?s.style.minWidth=this.getFullWidth(e)+4+"px":s.style.minWidth="")},checkMaxSelected(){this.maxSelected!==0&&(this.selectedItems.length>this.maxSelected?(this.showValidationMessages=!0,this.$emit("max-selected")):this.showValidationMessages=!1)},setInitialInputHeight(){const e=this.getInput();e&&(this.initialInputHeight=e.getBoundingClientRect().height)},async handleInputFocusIn(){this.inputFocused=!0,this.collapseOnFocusOut&&(this.hideInputText=!1,await this.$nextTick(),this.setInputPadding())},async handleInputFocusOut(){if(this.inputFocused=!1,this.collapseOnFocusOut){this.hideInputText=!0;const e=this.getInput();if(!e||!e.style.paddingTop)return;this.revertInputPadding(e)}}}},w={ref:"header"},L={key:1,class:"d-recipe-combobox-multi-select__list--loading"},M={ref:"footer"};function W(e,s,i,a,o,n){const r=t.resolveComponent("dt-chip"),h=t.resolveComponent("dt-input"),c=t.resolveComponent("dt-validation-messages"),d=t.resolveComponent("dt-recipe-combobox-with-popover");return t.openBlock(),t.createBlock(d,{ref:"comboboxWithPopover",label:i.label,"show-list":i.showList,"max-height":i.listMaxHeight,"max-width":i.listMaxWidth,"popover-offset":o.popoverOffset,"has-suggestion-list":i.hasSuggestionList,"visually-hidden-close-label":e.visuallyHiddenCloseLabel,"visually-hidden-close":e.visuallyHiddenClose,"content-width":"anchor","append-to":i.appendTo,transition:i.transition,onSelect:n.onComboboxSelect,onHighlight:n.comboboxHighlight},t.createSlots({input:t.withCtx(({onInput:g})=>[t.createElementVNode("span",{ref:"inputSlotWrapper",class:"d-recipe-combobox-multi-select__input-wrapper",onFocusin:s[1]||(s[1]=(...l)=>n.handleInputFocusIn&&n.handleInputFocusIn(...l)),onFocusout:s[2]||(s[2]=(...l)=>n.handleInputFocusOut&&n.handleInputFocusOut(...l))},[t.createElementVNode("span",{ref:"chipsWrapper",class:t.normalizeClass(["d-recipe-combobox-multi-select__chip-wrapper",n.chipWrapperClass])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.selectedItems,l=>(t.openBlock(),t.createBlock(r,t.mergeProps({ref_for:!0,ref:"chips",key:l,"label-class":["d-chip__label"],class:["d-recipe-combobox-multi-select__chip",{"d-recipe-combobox-multi-select__chip--truncate":!!i.chipMaxWidth}],style:{maxWidth:i.chipMaxWidth},"close-button-props":{ariaLabel:"close"},size:o.CHIP_SIZES[i.size]},t.toHandlers(n.chipListeners),{onKeyup:t.withKeys(m=>n.onChipRemove(l),["backspace"]),onClose:m=>n.onChipRemove(l)}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l),1)]),_:2},1040,["class","style","size","onKeyup","onClose"]))),128))],2),t.createVNode(h,t.mergeProps({ref:"input",modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=l=>o.value=l),class:"d-recipe-combobox-multi-select__input","input-class":[i.inputClass,{"d-recipe-combobox-multi-select__input--hidden":o.hideInputText}],"input-wrapper-class":i.inputWrapperClass,"aria-label":i.label,label:i.labelVisible?i.label:"",description:i.description,placeholder:n.inputPlaceHolder,"show-messages":i.showInputMessages,messages:i.inputMessages,size:i.size},t.toHandlers(n.inputListeners),{onInput:g}),null,16,["modelValue","input-class","input-wrapper-class","aria-label","label","description","placeholder","show-messages","messages","size","onInput"]),t.createVNode(c,{"validation-messages":i.maxSelectedMessage,"show-messages":o.showValidationMessages},null,8,["validation-messages","show-messages"])],544)]),list:t.withCtx(()=>[t.createElementVNode("div",{ref:"list",class:"d-recipe-combobox-multi-select__list",onMousedown:s[3]||(s[3]=t.withModifiers(()=>{},["prevent"]))},[i.loading?(t.openBlock(),t.createElementBlock("div",L,t.toDisplayString(i.loadingMessage),1)):t.renderSlot(e.$slots,"list",{key:0})],544)]),_:2},[o.hasSlotContent(e.$slots.header)?{name:"header",fn:t.withCtx(()=>[t.createElementVNode("div",w,[t.renderSlot(e.$slots,"header")],512)]),key:"0"}:void 0,o.hasSlotContent(e.$slots.footer)?{name:"footer",fn:t.withCtx(()=>[t.createElementVNode("div",M,[t.renderSlot(e.$slots,"footer")],512)]),key:"1"}:void 0]),1032,["label","show-list","max-height","max-width","popover-offset","has-suggestion-list","visually-hidden-close-label","visually-hidden-close","append-to","transition","onSelect","onHighlight"])}const B=_._(S,[["render",W]]);exports.default=B;
2
2
  //# sourceMappingURL=combobox-multi-select.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-multi-select.cjs","sources":["../../../recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue"],"sourcesContent":["<!-- eslint-disable vue/no-static-inline-styles -->\n<template>\n <dt-recipe-combobox-with-popover\n ref=\"comboboxWithPopover\"\n :label=\"label\"\n :show-list=\"showList\"\n :max-height=\"listMaxHeight\"\n :max-width=\"listMaxWidth\"\n :popover-offset=\"popoverOffset\"\n :has-suggestion-list=\"hasSuggestionList\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n content-width=\"anchor\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n @select=\"onComboboxSelect\"\n @highlight=\"comboboxHighlight\"\n >\n <template #input=\"{ onInput }\">\n <span\n ref=\"inputSlotWrapper\"\n class=\"d-recipe-combobox-multi-select__input-wrapper\"\n @focusin=\"handleInputFocusIn\"\n @focusout=\"handleInputFocusOut\"\n >\n <span\n ref=\"chipsWrapper\"\n :class=\"['d-recipe-combobox-multi-select__chip-wrapper', chipWrapperClass]\"\n >\n <dt-chip\n v-for=\"item in selectedItems\"\n ref=\"chips\"\n :key=\"item\"\n :label-class=\"['d-chip__label']\"\n :class=\"[\n 'd-recipe-combobox-multi-select__chip',\n { 'd-recipe-combobox-multi-select__chip--truncate': !!chipMaxWidth },\n ]\"\n :style=\"{ maxWidth: chipMaxWidth }\"\n :close-button-props=\"{ ariaLabel: 'close' }\"\n :size=\"CHIP_SIZES[size]\"\n v-on=\"chipListeners\"\n @keyup.backspace=\"onChipRemove(item)\"\n @close=\"onChipRemove(item)\"\n >\n {{ item }}\n </dt-chip>\n </span>\n\n <dt-input\n ref=\"input\"\n v-model=\"value\"\n class=\"d-recipe-combobox-multi-select__input\"\n :input-class=\"[\n inputClass, {\n 'd-recipe-combobox-multi-select__input--hidden': hideInputText,\n }]\"\n :input-wrapper-class=\"inputWrapperClass\"\n :aria-label=\"label\"\n :label=\"labelVisible ? label : ''\"\n :description=\"description\"\n :placeholder=\"inputPlaceHolder\"\n :show-messages=\"showInputMessages\"\n :messages=\"inputMessages\"\n :size=\"size\"\n v-on=\"inputListeners\"\n @input=\"onInput\"\n />\n\n <dt-validation-messages\n :validation-messages=\"maxSelectedMessage\"\n :show-messages=\"showValidationMessages\"\n />\n </span>\n </template>\n\n <!-- @slot slot for popover header -->\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #header\n >\n <div ref=\"header\">\n <slot name=\"header\" />\n </div>\n </template>\n\n <!-- @slot slot for popover list -->\n <template #list>\n <div\n ref=\"list\"\n class=\"d-recipe-combobox-multi-select__list\"\n @mousedown.prevent\n >\n <slot\n v-if=\"!loading\"\n name=\"list\"\n />\n <div\n v-else\n class=\"d-recipe-combobox-multi-select__list--loading\"\n >\n {{ loadingMessage }}\n </div>\n </div>\n </template>\n\n <!-- @slot slot for popover footer -->\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footer\n >\n <div ref=\"footer\">\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-recipe-combobox-with-popover>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport DtRecipeComboboxWithPopover from '@/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue';\nimport DtInput from '@/components/input/input.vue';\nimport DtChip from '@/components/chip/chip.vue';\nimport DtValidationMessages from '@/components/validation_messages/validation_messages.vue';\nimport { validationMessageValidator } from '@/common/validators';\nimport { hasSlotContent, returnFirstEl } from '@/common/utils';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '@/components/popover/popover_constants';\nimport {\n MULTI_SELECT_SIZES,\n CHIP_SIZES,\n CHIP_TOP_POSITION,\n} from './combobox_multi_select_constants';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeComboboxMultiSelect',\n\n components: {\n DtRecipeComboboxWithPopover,\n DtInput,\n DtChip,\n DtValidationMessages,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n labelVisible: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Input placeholder\n */\n placeholder: {\n type: String,\n default: 'Select one or start typing',\n },\n\n /**\n * Input validation messages\n */\n inputMessages: {\n type: Array,\n default: () => [],\n validator: inputMessages => {\n return validationMessageValidator(inputMessages);\n },\n },\n\n /**\n * Show input validation message\n */\n showInputMessages: {\n type: Boolean,\n default: true,\n },\n\n // @TODO: https://dialpad.atlassian.net/browse/DP-52324\n // type: {\n // type: String,\n // values: ['input', 'select'],\n // default: 'select',\n // },\n\n /**\n * Determines if the list is loading\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The message when the list is loading\n */\n loadingMessage: {\n type: String,\n default: 'loading...',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxHeight: {\n type: String,\n default: '300px',\n },\n\n /**\n * The selected items\n */\n selectedItems: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Would be the maximum number of selections you can make. 0 is unlimited\n */\n maxSelected: {\n type: Number,\n default: 0,\n },\n\n /**\n * Max select message when the max selections is exceeded with the structure:\n * `[{\"message\": string, \"type\": VALIDATION_MESSAGE_TYPES }]`\n */\n maxSelectedMessage: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the chip, one of `xs`, `sm`, `md`\n */\n size: {\n type: String,\n default: 'md',\n validator: (t) => Object.values(MULTI_SELECT_SIZES).includes(t),\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n\n /**\n * Determines whether the combobox should collapse to a single when losing focus.\n * @type {boolean}\n */\n collapseOnFocusOut: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Amount of reserved space (in px) on the right side of the input\n * before the chips and the input caret jump to the next line.\n * default is 64\n */\n reservedRightSpace: {\n type: Number,\n default: 64,\n },\n\n /**\n * Determines the maximum width of a single chip. If the text within this chip exceeds the value\n * it will be truncated with ellipses.\n * Possible units rem|px|em\n */\n chipMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the input 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 inputClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the input wrapper element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n inputWrapperClass: {\n type: [String, Object, Array],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String }\n */\n 'input',\n\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when item removed\n *\n * @event remove\n * @type {String}\n */\n 'remove',\n\n /**\n * Event fired when max selected items limit is reached\n *\n * @event max-selected\n * @type {Object}\n */\n 'max-selected',\n\n /**\n * Native keyup event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n\n /**\n * Event fired when combobox item is highlighted\n *\n * @event combobox-highlight\n * @type {Object}\n */\n 'combobox-highlight',\n ],\n\n data () {\n return {\n value: '',\n popoverOffset: [0, 4],\n showValidationMessages: false,\n resizeWindowObserver: null,\n initialInputHeight: null,\n CHIP_SIZES,\n hasSlotContent,\n inputFocused: false,\n hideInputText: false,\n };\n },\n\n computed: {\n inputPlaceHolder () {\n return this.selectedItems?.length > 0 ? '' : this.placeholder;\n },\n\n chipListeners () {\n return {\n keyup: event => {\n this.onChipKeyup(event);\n this.$emit('keyup', event);\n },\n };\n },\n\n inputListeners () {\n return {\n input: event => {\n this.$emit('input', event);\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n\n keyup: event => {\n this.onInputKeyup(event);\n this.$emit('keyup', event);\n },\n\n click: event => {\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n };\n },\n\n chipWrapperClass () {\n return {\n [`d-recipe-combobox-multi-select__chip-wrapper-${this.size}--collapsed`]: !this.inputFocused && this.collapseOnFocusOut,\n };\n },\n },\n\n watch: {\n selectedItems: {\n deep: true,\n handler: async function () {\n this.initSelectedItems();\n },\n },\n\n chipMaxWidth: {\n async handler () {\n this.initSelectedItems();\n },\n },\n\n async label () {\n await this.$nextTick();\n // Adjust the chips position if label changed\n this.setChipsTopPosition();\n },\n\n async description () {\n await this.$nextTick();\n // Adjust the chips position if description changed\n this.setChipsTopPosition();\n },\n\n size: {\n async handler () {\n await this.$nextTick();\n const input = this.getInput();\n this.revertInputPadding(input);\n this.initialInputHeight = input.getBoundingClientRect().height;\n this.setInputPadding();\n this.setChipsTopPosition();\n },\n },\n },\n\n mounted () {\n this.setInitialInputHeight();\n // Recalculate chip position and input padding when resizing window\n this.resizeWindowObserver = new ResizeObserver(async () => {\n this.setChipsTopPosition();\n this.setInputPadding();\n });\n this.resizeWindowObserver.observe(document.body);\n\n this.initSelectedItems();\n },\n\n beforeUnmount () {\n this.resizeWindowObserver?.unobserve(document.body);\n },\n\n methods: {\n comboboxHighlight (highlightIndex) {\n this.$emit('combobox-highlight', highlightIndex);\n },\n\n async initSelectedItems () {\n await this.$nextTick();\n this.setInputPadding();\n this.setChipsTopPosition();\n this.setInputMinWidth();\n this.checkMaxSelected();\n },\n\n onChipRemove (item) {\n this.$emit('remove', item);\n this.$refs.input?.focus();\n },\n\n onComboboxSelect (i) {\n if (this.loading) return;\n this.value = '';\n this.$emit('select', i);\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.showComboboxList();\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.closeComboboxList();\n },\n\n getChipButtons () {\n return this.$refs.chips && this.$refs.chips.map(chip => returnFirstEl(chip.$el).querySelector('button'));\n },\n\n getChips () {\n return this.$refs.chips && this.$refs.chips.map(chip => returnFirstEl(chip.$el));\n },\n\n getLastChipButton () {\n return this.$refs.chips && this.getChipButtons()[this.getChipButtons().length - 1];\n },\n\n getLastChip () {\n return this.$refs.chips && this.getChips()[this.getChips().length - 1];\n },\n\n getFirstChip () {\n return this.$refs.chips && this.getChips()[0];\n },\n\n getInput () {\n return this.$refs.input?.$refs.input;\n },\n\n onChipKeyup (event) {\n const key = event.code?.toLowerCase();\n if (key === 'arrowleft') {\n // Move to the previous chip\n this.navigateBetweenChips(event.target, true);\n } else if (key === 'arrowright') {\n if (event.target.id === this.getLastChipButton().id) {\n // Move to the input if it's the last chip\n this.moveFromChipToInput();\n } else {\n // Move to the next chip\n this.navigateBetweenChips(event.target, false);\n }\n }\n },\n\n onInputKeyup (event) {\n const key = event.code?.toLowerCase();\n // If the cursor is at the start of the text,\n // press 'backspace' or 'left' focuses the last chip\n if (this.selectedItems.length > 0 && event.target.selectionStart === 0) {\n if (key === 'backspace' || key === 'arrowleft') {\n this.moveFromInputToChip();\n }\n }\n },\n\n moveFromInputToChip () {\n this.getLastChipButton().focus();\n this.$refs.input?.blur();\n this.closeComboboxList();\n },\n\n moveFromChipToInput () {\n this.getLastChipButton().blur();\n this.$refs.input?.focus();\n this.showComboboxList();\n },\n\n navigateBetweenChips (target, toLeft) {\n const from = this.getChipButtons().indexOf(target);\n const to = toLeft ? from - 1 : from + 1;\n if (to < 0 || to >= this.$refs.chips?.length) {\n return;\n }\n this.getChipButtons()[from].blur();\n this.getChipButtons()[to].focus();\n this.closeComboboxList();\n },\n\n setChipsTopPosition () {\n // To place the chips in the input box\n // The chip \"top\" position should be the same line as the input box\n const input = this.getInput();\n if (!input) return;\n const inputSlotWrapper = this.$refs.inputSlotWrapper;\n const top = input.getBoundingClientRect().top -\n inputSlotWrapper.getBoundingClientRect().top;\n const chipsWrapper = this.$refs.chipsWrapper;\n chipsWrapper.style.top = (top - CHIP_TOP_POSITION[this.size]) + 'px';\n },\n\n setInputPadding () {\n const lastChip = this.getLastChip();\n const input = this.getInput();\n const chipsWrapper = this.$refs.chipsWrapper;\n if (!input) return;\n this.revertInputPadding(input);\n this.popoverOffset = [0, 4];\n if (!lastChip) return;\n // Avoid adding extra padding when the input is not focused if collapseOnFocusOut is true\n // This ensures the input returns to its original state when resizing\n if (this.collapseOnFocusOut && !this.inputFocused) return;\n\n // Get the position of the last chip\n // The input cursor should be the same \"top\" as that chip and next besides it\n const left = lastChip.offsetLeft + this.getFullWidth(lastChip);\n const spaceLeft = input.getBoundingClientRect().width - left;\n // input.style.paddingLeft = left + 'px';\n\n if (spaceLeft > this.reservedRightSpace) {\n input.style.paddingLeft = left + 'px';\n } else {\n input.style.paddingLeft = '4px';\n }\n\n // Get the chip wrapper height minus the 4px padding\n const chipsWrapperHeight = chipsWrapper.getBoundingClientRect().height - 4;\n const lastChipHeight = lastChip.getBoundingClientRect().height - 4;\n\n // Get lastChip offsetTop plus 2px of the input padding.\n const top = spaceLeft > this.reservedRightSpace\n ? lastChip.offsetTop + 2\n : (chipsWrapperHeight + lastChipHeight - 9);\n\n input.style.paddingTop = `${top}px`;\n },\n\n revertInputPadding (input) {\n input.style.paddingLeft = '';\n input.style.paddingTop = '';\n input.style.paddingBottom = '';\n },\n\n getFullWidth (el) {\n const styles = window.getComputedStyle(el);\n return el.offsetWidth + parseInt(styles.marginLeft) + parseInt(styles.marginRight);\n },\n\n setInputMinWidth () {\n // Ensure the width of the input is \"slightly bigger\" than the width of a single chip\n const firstChip = this.getFirstChip();\n const input = this.getInput();\n if (!input) return;\n if (firstChip) {\n // Add 4px buffer for typing room\n input.style.minWidth = (this.getFullWidth(firstChip) + 4) + 'px';\n } else {\n input.style.minWidth = '';\n }\n },\n\n checkMaxSelected () {\n if (this.maxSelected === 0) return;\n if (this.selectedItems.length > this.maxSelected) {\n this.showValidationMessages = true;\n this.$emit('max-selected');\n } else {\n this.showValidationMessages = false;\n }\n },\n\n setInitialInputHeight () {\n const input = this.getInput();\n if (!input) return;\n this.initialInputHeight = input.getBoundingClientRect().height;\n },\n\n async handleInputFocusIn () {\n this.inputFocused = true;\n if (this.collapseOnFocusOut) {\n await this.$nextTick();\n this.setInputPadding();\n this.hideInputText = false;\n }\n },\n\n async handleInputFocusOut () {\n this.inputFocused = false;\n if (this.collapseOnFocusOut) {\n const input = this.getInput();\n if (!input) return;\n // Hide the input text when is not on first line\n if (!input.style.paddingTop) {\n return;\n }\n this.hideInputText = true;\n this.revertInputPadding(input);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtRecipeComboboxWithPopover","DtInput","DtChip","DtValidationMessages","SrOnlyCloseButtonMixin","inputMessages","validationMessageValidator","t","MULTI_SELECT_SIZES","appendTo","POPOVER_APPEND_TO_VALUES","CHIP_SIZES","hasSlotContent","_a","event","input","highlightIndex","item","i","chip","returnFirstEl","key","target","toLeft","from","to","inputSlotWrapper","top","chipsWrapper","CHIP_TOP_POSITION","lastChip","left","spaceLeft","chipsWrapperHeight","lastChipHeight","el","styles","firstChip","_hoisted_1","_hoisted_3","_createBlock","_component_dt_recipe_combobox_with_popover","$props","$data","_ctx","$options","_createSlots","_withCtx","onInput","_createElementVNode","args","_normalizeClass","_openBlock","_createElementBlock","_Fragment","_renderList","_component_dt_chip","_mergeProps","_toHandlers","_withKeys","$event","_createTextVNode","_toDisplayString","_createVNode","_component_dt_input","_cache","_component_dt_validation_messages","_withModifiers","_hoisted_2","_renderSlot"],"mappings":"2mBAwIKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,8BAEN,WAAY,6BACVC,EAA2B,QAC3B,QAAAC,EAAO,QACP,OAAAC,EAAM,QACN,qBAAAC,EAAoB,OACrB,EAED,OAAQ,CAACC,EAAAA,OAAsB,EAE/B,MAAO,CAIL,MAAO,CACL,KAAM,OACN,SAAU,EACX,EAMD,aAAc,CACZ,KAAM,QACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,4BACV,EAKD,cAAe,CACb,KAAM,MACN,QAAS,IAAM,CAAE,EACjB,UAAWC,GACFC,EAAAA,2BAA2BD,CAAa,CAElD,EAKD,kBAAmB,CACjB,KAAM,QACN,QAAS,EACV,EAYD,QAAS,CACP,KAAM,QACN,QAAS,EACV,EAKD,eAAgB,CACd,KAAM,OACN,QAAS,YACV,EAQD,SAAU,CACR,KAAM,QACN,QAAS,IACV,EAMD,cAAe,CACb,KAAM,OACN,QAAS,OACV,EAKD,cAAe,CACb,KAAM,MACN,QAAS,UAAY,CAAE,MAAO,CAAA,CAAK,CACpC,EAKD,YAAa,CACX,KAAM,OACN,QAAS,CACV,EAMD,mBAAoB,CAClB,KAAM,MACN,QAAS,UAAY,CAAE,MAAO,CAAA,CAAK,CACpC,EAMD,kBAAmB,CACjB,KAAM,QACN,QAAS,EACV,EAKD,KAAM,CACJ,KAAM,OACN,QAAS,KACT,UAAYE,GAAM,OAAO,OAAOC,oBAAkB,EAAE,SAASD,CAAC,CAC/D,EAOD,SAAU,CACR,KAAM,CAAC,YAAa,MAAM,EAC1B,QAAS,OACT,UAAWE,GAC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eslint-disable vue/no-static-inline-styles -->\n<template>\n <dt-recipe-combobox-with-popover\n ref=\"comboboxWithPopover\"\n :label=\"label\"\n :show-list=\"showList\"\n :max-height=\"listMaxHeight\"\n :max-width=\"listMaxWidth\"\n :popover-offset=\"popoverOffset\"\n :has-suggestion-list=\"hasSuggestionList\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n content-width=\"anchor\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n @select=\"onComboboxSelect\"\n @highlight=\"comboboxHighlight\"\n >\n <template #input=\"{ onInput }\">\n <span\n ref=\"inputSlotWrapper\"\n class=\"d-recipe-combobox-multi-select__input-wrapper\"\n @focusin=\"handleInputFocusIn\"\n @focusout=\"handleInputFocusOut\"\n >\n <span\n ref=\"chipsWrapper\"\n :class=\"['d-recipe-combobox-multi-select__chip-wrapper', chipWrapperClass]\"\n >\n <dt-chip\n v-for=\"item in selectedItems\"\n ref=\"chips\"\n :key=\"item\"\n :label-class=\"['d-chip__label']\"\n :class=\"[\n 'd-recipe-combobox-multi-select__chip',\n { 'd-recipe-combobox-multi-select__chip--truncate': !!chipMaxWidth },\n ]\"\n :style=\"{ maxWidth: chipMaxWidth }\"\n :close-button-props=\"{ ariaLabel: 'close' }\"\n :size=\"CHIP_SIZES[size]\"\n v-on=\"chipListeners\"\n @keyup.backspace=\"onChipRemove(item)\"\n @close=\"onChipRemove(item)\"\n >\n {{ item }}\n </dt-chip>\n </span>\n\n <dt-input\n ref=\"input\"\n v-model=\"value\"\n class=\"d-recipe-combobox-multi-select__input\"\n :input-class=\"[\n inputClass, {\n 'd-recipe-combobox-multi-select__input--hidden': hideInputText,\n }]\"\n :input-wrapper-class=\"inputWrapperClass\"\n :aria-label=\"label\"\n :label=\"labelVisible ? label : ''\"\n :description=\"description\"\n :placeholder=\"inputPlaceHolder\"\n :show-messages=\"showInputMessages\"\n :messages=\"inputMessages\"\n :size=\"size\"\n v-on=\"inputListeners\"\n @input=\"onInput\"\n />\n\n <dt-validation-messages\n :validation-messages=\"maxSelectedMessage\"\n :show-messages=\"showValidationMessages\"\n />\n </span>\n </template>\n\n <!-- @slot slot for popover header -->\n <template\n v-if=\"hasSlotContent($slots.header)\"\n #header\n >\n <div ref=\"header\">\n <slot name=\"header\" />\n </div>\n </template>\n\n <!-- @slot slot for popover list -->\n <template #list>\n <div\n ref=\"list\"\n class=\"d-recipe-combobox-multi-select__list\"\n @mousedown.prevent\n >\n <slot\n v-if=\"!loading\"\n name=\"list\"\n />\n <div\n v-else\n class=\"d-recipe-combobox-multi-select__list--loading\"\n >\n {{ loadingMessage }}\n </div>\n </div>\n </template>\n\n <!-- @slot slot for popover footer -->\n <template\n v-if=\"hasSlotContent($slots.footer)\"\n #footer\n >\n <div ref=\"footer\">\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-recipe-combobox-with-popover>\n</template>\n\n<script>\n/* eslint-disable max-lines */\nimport DtRecipeComboboxWithPopover from '@/recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue';\nimport DtInput from '@/components/input/input.vue';\nimport DtChip from '@/components/chip/chip.vue';\nimport DtValidationMessages from '@/components/validation_messages/validation_messages.vue';\nimport { validationMessageValidator } from '@/common/validators';\nimport { hasSlotContent, returnFirstEl } from '@/common/utils';\nimport {\n POPOVER_APPEND_TO_VALUES,\n} from '@/components/popover/popover_constants';\nimport {\n MULTI_SELECT_SIZES,\n CHIP_SIZES,\n CHIP_TOP_POSITION,\n} from './combobox_multi_select_constants';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeComboboxMultiSelect',\n\n components: {\n DtRecipeComboboxWithPopover,\n DtInput,\n DtChip,\n DtValidationMessages,\n },\n\n mixins: [SrOnlyCloseButtonMixin],\n\n props: {\n /**\n * String to use for the input label.\n */\n label: {\n type: String,\n required: true,\n },\n\n /**\n * Determines visibility of input label.\n * @values true, false\n */\n labelVisible: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\n },\n\n /**\n * Input placeholder\n */\n placeholder: {\n type: String,\n default: 'Select one or start typing',\n },\n\n /**\n * Input validation messages\n */\n inputMessages: {\n type: Array,\n default: () => [],\n validator: inputMessages => {\n return validationMessageValidator(inputMessages);\n },\n },\n\n /**\n * Show input validation message\n */\n showInputMessages: {\n type: Boolean,\n default: true,\n },\n\n // @TODO: https://dialpad.atlassian.net/browse/DP-52324\n // type: {\n // type: String,\n // values: ['input', 'select'],\n // default: 'select',\n // },\n\n /**\n * Determines if the list is loading\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * The message when the list is loading\n */\n loadingMessage: {\n type: String,\n default: 'loading...',\n },\n\n /**\n * Determines when to show the list element and also controls the aria-expanded attribute.\n * Leaving this null will have the combobox trigger on input focus by default.\n * If you set this value, the default trigger behavior will be disabled and you can\n * control it as you need.\n */\n showList: {\n type: Boolean,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxHeight: {\n type: String,\n default: '300px',\n },\n\n /**\n * The selected items\n */\n selectedItems: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Would be the maximum number of selections you can make. 0 is unlimited\n */\n maxSelected: {\n type: Number,\n default: 0,\n },\n\n /**\n * Max select message when the max selections is exceeded with the structure:\n * `[{\"message\": string, \"type\": VALIDATION_MESSAGE_TYPES }]`\n */\n maxSelectedMessage: {\n type: Array,\n default: function () { return []; },\n },\n\n /**\n * Displays the list when the combobox is focused, before the user has typed anything.\n * When this is enabled the list will not close after selection.\n */\n hasSuggestionList: {\n type: Boolean,\n default: true,\n },\n\n /**\n * Size of the chip, one of `xs`, `sm`, `md`\n */\n size: {\n type: String,\n default: 'md',\n validator: (t) => Object.values(MULTI_SELECT_SIZES).includes(t),\n },\n\n /**\n * Sets the element to which the popover is going to append to.\n * 'body' will append to the nearest body (supports shadow DOM).\n * @values 'body', 'parent', HTMLElement,\n */\n appendTo: {\n type: [HTMLElement, String],\n default: 'body',\n validator: appendTo => {\n return POPOVER_APPEND_TO_VALUES.includes(appendTo) ||\n (appendTo instanceof HTMLElement);\n },\n },\n\n /**\n * Named transition when the content display is toggled.\n * @see DtLazyShow\n */\n transition: {\n type: String,\n default: 'fade',\n },\n\n /**\n * Determines whether the combobox should collapse to a single when losing focus.\n * @type {boolean}\n */\n collapseOnFocusOut: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|em\n */\n listMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Amount of reserved space (in px) on the right side of the input\n * before the chips and the input caret jump to the next line.\n * default is 64\n */\n reservedRightSpace: {\n type: Number,\n default: 64,\n },\n\n /**\n * Determines the maximum width of a single chip. If the text within this chip exceeds the value\n * it will be truncated with ellipses.\n * Possible units rem|px|em\n */\n chipMaxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Additional class name for the input 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 inputClass: {\n type: [String, Object, Array],\n default: '',\n },\n\n /**\n * Additional class name for the input wrapper element.\n * Can accept all of String, Object, and Array, i.e. has the\n * same api as Vue's built-in handling of the class attribute.\n */\n inputWrapperClass: {\n type: [String, Object, Array],\n default: '',\n },\n },\n\n emits: [\n /**\n * Native input event\n *\n * @event input\n * @type {String }\n */\n 'input',\n\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when item removed\n *\n * @event remove\n * @type {String}\n */\n 'remove',\n\n /**\n * Event fired when max selected items limit is reached\n *\n * @event max-selected\n * @type {Object}\n */\n 'max-selected',\n\n /**\n * Native keyup event\n *\n * @event keyup\n * @type {KeyboardEvent}\n */\n 'keyup',\n\n /**\n * Event fired when combobox item is highlighted\n *\n * @event combobox-highlight\n * @type {Object}\n */\n 'combobox-highlight',\n ],\n\n data () {\n return {\n value: '',\n popoverOffset: [0, 4],\n showValidationMessages: false,\n resizeWindowObserver: null,\n initialInputHeight: null,\n CHIP_SIZES,\n hasSlotContent,\n inputFocused: false,\n hideInputText: false,\n };\n },\n\n computed: {\n inputPlaceHolder () {\n return this.selectedItems?.length > 0 ? '' : this.placeholder;\n },\n\n chipListeners () {\n return {\n keyup: event => {\n this.onChipKeyup(event);\n this.$emit('keyup', event);\n },\n };\n },\n\n inputListeners () {\n return {\n input: event => {\n this.$emit('input', event);\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n\n keyup: event => {\n this.onInputKeyup(event);\n this.$emit('keyup', event);\n },\n\n click: event => {\n if (this.hasSuggestionList) {\n this.showComboboxList();\n }\n },\n };\n },\n\n chipWrapperClass () {\n return {\n [`d-recipe-combobox-multi-select__chip-wrapper-${this.size}--collapsed`]: !this.inputFocused && this.collapseOnFocusOut,\n };\n },\n },\n\n watch: {\n selectedItems: {\n deep: true,\n handler: async function () {\n this.initSelectedItems();\n },\n },\n\n chipMaxWidth: {\n async handler () {\n this.initSelectedItems();\n },\n },\n\n async label () {\n await this.$nextTick();\n // Adjust the chips position if label changed\n this.setChipsTopPosition();\n },\n\n async description () {\n await this.$nextTick();\n // Adjust the chips position if description changed\n this.setChipsTopPosition();\n },\n\n size: {\n async handler () {\n await this.$nextTick();\n const input = this.getInput();\n this.revertInputPadding(input);\n this.initialInputHeight = input.getBoundingClientRect().height;\n this.setInputPadding();\n this.setChipsTopPosition();\n },\n },\n },\n\n mounted () {\n this.setInitialInputHeight();\n // Recalculate chip position and input padding when resizing window\n this.resizeWindowObserver = new ResizeObserver(async () => {\n this.setChipsTopPosition();\n this.setInputPadding();\n });\n this.resizeWindowObserver.observe(document.body);\n\n this.initSelectedItems();\n },\n\n beforeUnmount () {\n this.resizeWindowObserver?.unobserve(document.body);\n },\n\n methods: {\n comboboxHighlight (highlightIndex) {\n this.$emit('combobox-highlight', highlightIndex);\n },\n\n async initSelectedItems () {\n await this.$nextTick();\n this.setInputPadding();\n this.setChipsTopPosition();\n this.setInputMinWidth();\n this.checkMaxSelected();\n },\n\n onChipRemove (item) {\n this.$emit('remove', item);\n this.$refs.input?.focus();\n },\n\n onComboboxSelect (i) {\n if (this.loading) return;\n this.value = '';\n this.$emit('select', i);\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.showComboboxList();\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.$refs.comboboxWithPopover?.closeComboboxList();\n },\n\n getChipButtons () {\n return this.$refs.chips && this.$refs.chips.map(chip => returnFirstEl(chip.$el).querySelector('button'));\n },\n\n getChips () {\n return this.$refs.chips && this.$refs.chips.map(chip => returnFirstEl(chip.$el));\n },\n\n getLastChipButton () {\n return this.$refs.chips && this.getChipButtons()[this.getChipButtons().length - 1];\n },\n\n getLastChip () {\n return this.$refs.chips && this.getChips()[this.getChips().length - 1];\n },\n\n getFirstChip () {\n return this.$refs.chips && this.getChips()[0];\n },\n\n getInput () {\n return this.$refs.input?.$refs.input;\n },\n\n onChipKeyup (event) {\n const key = event.code?.toLowerCase();\n if (key === 'arrowleft') {\n // Move to the previous chip\n this.navigateBetweenChips(event.target, true);\n } else if (key === 'arrowright') {\n if (event.target.id === this.getLastChipButton().id) {\n // Move to the input if it's the last chip\n this.moveFromChipToInput();\n } else {\n // Move to the next chip\n this.navigateBetweenChips(event.target, false);\n }\n }\n },\n\n onInputKeyup (event) {\n const key = event.code?.toLowerCase();\n // If the cursor is at the start of the text,\n // press 'backspace' or 'left' focuses the last chip\n if (this.selectedItems.length > 0 && event.target.selectionStart === 0) {\n if (key === 'backspace' || key === 'arrowleft') {\n this.moveFromInputToChip();\n }\n }\n },\n\n moveFromInputToChip () {\n this.getLastChipButton().focus();\n this.$refs.input?.blur();\n this.closeComboboxList();\n },\n\n moveFromChipToInput () {\n this.getLastChipButton().blur();\n this.$refs.input?.focus();\n this.showComboboxList();\n },\n\n navigateBetweenChips (target, toLeft) {\n const from = this.getChipButtons().indexOf(target);\n const to = toLeft ? from - 1 : from + 1;\n if (to < 0 || to >= this.$refs.chips?.length) {\n return;\n }\n this.getChipButtons()[from].blur();\n this.getChipButtons()[to].focus();\n this.closeComboboxList();\n },\n\n setChipsTopPosition () {\n // To place the chips in the input box\n // The chip \"top\" position should be the same line as the input box\n const input = this.getInput();\n if (!input) return;\n const inputSlotWrapper = this.$refs.inputSlotWrapper;\n const top = input.getBoundingClientRect().top -\n inputSlotWrapper.getBoundingClientRect().top;\n const chipsWrapper = this.$refs.chipsWrapper;\n chipsWrapper.style.top = (top - CHIP_TOP_POSITION[this.size]) + 'px';\n },\n\n setInputPadding () {\n const lastChip = this.getLastChip();\n const input = this.getInput();\n const chipsWrapper = this.$refs.chipsWrapper;\n if (!input) return;\n this.revertInputPadding(input);\n this.popoverOffset = [0, 4];\n if (!lastChip) return;\n // Avoid adding extra padding when the input is not focused if collapseOnFocusOut is true\n // This ensures the input returns to its original state when resizing\n if (this.collapseOnFocusOut && !this.inputFocused) return;\n\n // Get the position of the last chip\n // The input cursor should be the same \"top\" as that chip and next besides it\n const left = lastChip.offsetLeft + this.getFullWidth(lastChip);\n const spaceLeft = input.getBoundingClientRect().width - left;\n // input.style.paddingLeft = left + 'px';\n\n if (spaceLeft > this.reservedRightSpace) {\n input.style.paddingLeft = left + 'px';\n } else {\n input.style.paddingLeft = '4px';\n }\n\n // Get the chip wrapper height minus the 4px padding\n const chipsWrapperHeight = chipsWrapper.getBoundingClientRect().height - 4;\n const lastChipHeight = lastChip.getBoundingClientRect().height - 4;\n\n // Get lastChip offsetTop plus 2px of the input padding.\n const top = spaceLeft > this.reservedRightSpace\n ? lastChip.offsetTop + 2\n : (chipsWrapperHeight + lastChipHeight - 9);\n\n input.style.paddingTop = `${top}px`;\n },\n\n revertInputPadding (input) {\n input.style.paddingLeft = '';\n input.style.paddingTop = '';\n input.style.paddingBottom = '';\n },\n\n getFullWidth (el) {\n const styles = window.getComputedStyle(el);\n return el.offsetWidth + parseInt(styles.marginLeft) + parseInt(styles.marginRight);\n },\n\n setInputMinWidth () {\n // Ensure the width of the input is \"slightly bigger\" than the width of a single chip\n const firstChip = this.getFirstChip();\n const input = this.getInput();\n if (!input) return;\n if (firstChip) {\n // Add 4px buffer for typing room\n input.style.minWidth = (this.getFullWidth(firstChip) + 4) + 'px';\n } else {\n input.style.minWidth = '';\n }\n },\n\n checkMaxSelected () {\n if (this.maxSelected === 0) return;\n if (this.selectedItems.length > this.maxSelected) {\n this.showValidationMessages = true;\n this.$emit('max-selected');\n } else {\n this.showValidationMessages = false;\n }\n },\n\n setInitialInputHeight () {\n const input = this.getInput();\n if (!input) return;\n this.initialInputHeight = input.getBoundingClientRect().height;\n },\n\n async handleInputFocusIn () {\n this.inputFocused = true;\n if (this.collapseOnFocusOut) {\n this.hideInputText = false;\n await this.$nextTick();\n this.setInputPadding();\n }\n },\n\n async handleInputFocusOut () {\n this.inputFocused = false;\n if (this.collapseOnFocusOut) {\n this.hideInputText = true;\n const input = this.getInput();\n if (!input) return;\n // Hide the input text when is not on first line\n if (!input.style.paddingTop) {\n return;\n }\n this.revertInputPadding(input);\n }\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtRecipeComboboxWithPopover","DtInput","DtChip","DtValidationMessages","SrOnlyCloseButtonMixin","inputMessages","validationMessageValidator","t","MULTI_SELECT_SIZES","appendTo","POPOVER_APPEND_TO_VALUES","CHIP_SIZES","hasSlotContent","_a","event","input","highlightIndex","item","i","chip","returnFirstEl","key","target","toLeft","from","to","inputSlotWrapper","top","chipsWrapper","CHIP_TOP_POSITION","lastChip","left","spaceLeft","chipsWrapperHeight","lastChipHeight","el","styles","firstChip","_hoisted_1","_hoisted_3","_createBlock","_component_dt_recipe_combobox_with_popover","$props","$data","_ctx","$options","_createSlots","_withCtx","onInput","_createElementVNode","args","_normalizeClass","_openBlock","_createElementBlock","_Fragment","_renderList","_component_dt_chip","_mergeProps","_toHandlers","_withKeys","$event","_createTextVNode","_toDisplayString","_createVNode","_component_dt_input","_cache","_component_dt_validation_messages","_withModifiers","_hoisted_2","_renderSlot"],"mappings":"2mBAwIKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,8BAEN,WAAY,6BACVC,EAA2B,QAC3B,QAAAC,EAAO,QACP,OAAAC,EAAM,QACN,qBAAAC,EAAoB,OACrB,EAED,OAAQ,CAACC,EAAAA,OAAsB,EAE/B,MAAO,CAIL,MAAO,CACL,KAAM,OACN,SAAU,EACX,EAMD,aAAc,CACZ,KAAM,QACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,EACV,EAKD,YAAa,CACX,KAAM,OACN,QAAS,4BACV,EAKD,cAAe,CACb,KAAM,MACN,QAAS,IAAM,CAAE,EACjB,UAAWC,GACFC,EAAAA,2BAA2BD,CAAa,CAElD,EAKD,kBAAmB,CACjB,KAAM,QACN,QAAS,EACV,EAYD,QAAS,CACP,KAAM,QACN,QAAS,EACV,EAKD,eAAgB,CACd,KAAM,OACN,QAAS,YACV,EAQD,SAAU,CACR,KAAM,QACN,QAAS,IACV,EAMD,cAAe,CACb,KAAM,OACN,QAAS,OACV,EAKD,cAAe,CACb,KAAM,MACN,QAAS,UAAY,CAAE,MAAO,CAAA,CAAK,CACpC,EAKD,YAAa,CACX,KAAM,OACN,QAAS,CACV,EAMD,mBAAoB,CAClB,KAAM,MACN,QAAS,UAAY,CAAE,MAAO,CAAA,CAAK,CACpC,EAMD,kBAAmB,CACjB,KAAM,QACN,QAAS,EACV,EAKD,KAAM,CACJ,KAAM,OACN,QAAS,KACT,UAAYE,GAAM,OAAO,OAAOC,oBAAkB,EAAE,SAASD,CAAC,CAC/D,EAOD,SAAU,CACR,KAAM,CAAC,YAAa,MAAM,EAC1B,QAAS,OACT,UAAWE,GACFC,EAAwB,yBAAC,SAASD,CAAQ,GAC5CA,aAAoB,WAE5B,EAMD,WAAY,CACV,KAAM,OACN,QAAS,MACV,EAMD,mBAAoB,CAClB,KAAM,QACN,QAAS,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,EAAW,YACxB,YAAaG,EAAgB,iBAC7B,gBAAeH,EAAiB,kBAChC,SAAUA,EAAa,cACvB,KAAMA,EAAI,IACX,EAAAgB,EAAA,WAAqBb,EAAf,cAAc,EACnB,CAAA,QAAOG,EAAO,EAAA,KAAA,GAAA,CAAA,aAAA,cAAA,sBAAA,aAAA,QAAA,cAAA,cAAA,gBAAA,WAAA,OAAA,SAAA,CAAA,EAGjBe,EAAAA,YAGEG,EAAA,CAFC,sBAAqBxB,EAAkB,mBACvC,gBAAeC,EAAsB,gFAgBjC,eACT,IAeM,CAfNM,EAAAA,mBAeM,MAAA,CAdJ,IAAI,OACJ,MAAM,uCACL,YAASgB,EAAA,CAAA,IAAAA,EAAA,CAAA,EA3FlBE,EAAAA,cA2FQ,IAAkB,CAAA,EAAA,CAAA,SAAA,CAAA,KAGTzB,EAAO,uBAGhBW,qBAKM,MALNe,EAKMN,EAAA,gBADDpB,EAAc,cAAA,EAAA,CAAA,GARnB2B,EAAA,WAGEzB,iBAhGV,IAAA,EAAA,UAAA,EAAA,IA8EYD,EAAc,eAACC,EAAM,OAAC,MAAM,GA9ExC,KA+EO,SA/EP,GAAAG,EAAA,QAiFM,IAEM,CAFNE,EAAA,mBAEM,MAFNX,EAEM,CADJ+B,aAAsBzB,EAAA,OAAA,QAAA,UAlF9B,IAAA,KAAA,OA4GYD,EAAc,eAACC,EAAM,OAAC,MAAM,GA5GxC,KA6GO,SA7GP,GAAAG,EAAA,QA+GM,IAEM,CAFNE,EAAA,mBAEM,MAFNV,EAEM,CADJ8B,aAAsBzB,EAAA,OAAA,QAAA,UAhH9B,IAAA,KAAA"}
@@ -435,14 +435,15 @@ const U = {
435
435
  e && (this.initialInputHeight = e.getBoundingClientRect().height);
436
436
  },
437
437
  async handleInputFocusIn() {
438
- this.inputFocused = !0, this.collapseOnFocusOut && (await this.$nextTick(), this.setInputPadding(), this.hideInputText = !1);
438
+ this.inputFocused = !0, this.collapseOnFocusOut && (this.hideInputText = !1, await this.$nextTick(), this.setInputPadding());
439
439
  },
440
440
  async handleInputFocusOut() {
441
441
  if (this.inputFocused = !1, this.collapseOnFocusOut) {
442
+ this.hideInputText = !0;
442
443
  const e = this.getInput();
443
444
  if (!e || !e.style.paddingTop)
444
445
  return;
445
- this.hideInputText = !0, this.revertInputPadding(e);
446
+ this.revertInputPadding(e);
446
447
  }
447
448
  }
448
449
  }