@dialpad/dialtone 9.29.1 → 9.30.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 (864) hide show
  1. package/dist/css/dialtone.css +2 -2
  2. package/dist/tokens/css/variables-dark.css +1 -1
  3. package/dist/tokens/css/variables-expressive-dark.css +937 -0
  4. package/dist/tokens/css/variables-expressive-light.css +817 -0
  5. package/dist/tokens/css/{variables-cox-dark.css → variables-expressive-sm-dark.css} +68 -67
  6. package/dist/tokens/css/{variables-cox-light.css → variables-expressive-sm-light.css} +67 -66
  7. package/dist/tokens/css/variables-light.css +1 -1
  8. package/dist/tokens/css/variables-tmo-dark.css +1 -1
  9. package/dist/tokens/css/variables-tmo-light.css +1 -1
  10. package/dist/tokens/doc.json +21010 -294
  11. package/dist/tokens/less/variables-dark.less +1 -1
  12. package/dist/tokens/less/variables-expressive-dark.less +934 -0
  13. package/dist/tokens/less/variables-expressive-light.less +814 -0
  14. package/dist/tokens/less/{variables-cox-dark.less → variables-expressive-sm-dark.less} +67 -66
  15. package/dist/tokens/less/{variables-cox-light.less → variables-expressive-sm-light.less} +66 -65
  16. package/dist/tokens/less/variables-light.less +1 -1
  17. package/dist/tokens/less/variables-tmo-dark.less +1 -1
  18. package/dist/tokens/less/variables-tmo-light.less +1 -1
  19. package/dist/vue2/chunks/_plugin-vue2_normalizer-1aBeR4AK.js +59 -0
  20. package/dist/vue2/chunks/_plugin-vue2_normalizer-1aBeR4AK.js.map +1 -0
  21. package/dist/vue2/chunks/_plugin-vue2_normalizer-sOSkiPF3.js +60 -0
  22. package/dist/vue2/chunks/_plugin-vue2_normalizer-sOSkiPF3.js.map +1 -0
  23. package/dist/vue2/chunks/{dropdown-SMWaTWyF.js → dropdown-DTtcQEFC.js} +131 -84
  24. package/dist/vue2/chunks/{dropdown-SMWaTWyF.js.map → dropdown-DTtcQEFC.js.map} +1 -1
  25. package/dist/vue2/chunks/dropdown-IaLNHmVd.js +403 -0
  26. package/dist/vue2/chunks/{dropdown-zhMEz3bn.js.map → dropdown-IaLNHmVd.js.map} +1 -1
  27. package/dist/vue2/chunks/dropdown_constants-2pGCXy7m.js +8 -0
  28. package/dist/vue2/chunks/dropdown_constants-2pGCXy7m.js.map +1 -0
  29. package/dist/vue2/chunks/dropdown_constants-w1MXGC3Z.js +9 -0
  30. package/dist/vue2/chunks/dropdown_constants-w1MXGC3Z.js.map +1 -0
  31. package/dist/vue2/chunks/{icon_constants-OpYAAKwF.js → icon_constants-Dy4MEUJL.js} +7 -6
  32. package/dist/vue2/chunks/{icon_constants-2S_OSQ1t.js.map → icon_constants-Dy4MEUJL.js.map} +1 -1
  33. package/dist/vue2/chunks/icon_constants-QYpmdE0R.js +16 -0
  34. package/dist/{vue3/chunks/icon_constants-2S_OSQ1t.js.map → vue2/chunks/icon_constants-QYpmdE0R.js.map} +1 -1
  35. package/dist/vue2/chunks/index-DUr1xHR0.js +442 -0
  36. package/dist/vue2/chunks/{index-2jPosQBn.js.map → index-DUr1xHR0.js.map} +1 -1
  37. package/dist/vue2/chunks/index-IA-Z8fgm.js +441 -0
  38. package/dist/vue2/chunks/{index-nIyl_PL6.js.map → index-IA-Z8fgm.js.map} +1 -1
  39. package/dist/{vue3/chunks/input-4UQWegUk.js → vue2/chunks/input-6kbd8Pju.js} +83 -60
  40. package/dist/vue2/chunks/{input-o-fc1X4b.js.map → input-6kbd8Pju.js.map} +1 -1
  41. package/dist/vue2/chunks/input-Axw-wFj2.js +295 -0
  42. package/dist/vue2/chunks/{input-1tm09l_-.js.map → input-Axw-wFj2.js.map} +1 -1
  43. package/dist/vue2/chunks/input_group-m3cWYUfI.js +143 -0
  44. package/dist/vue2/chunks/{input_group-zcAq3DQl.js.map → input_group-m3cWYUfI.js.map} +1 -1
  45. package/dist/vue2/chunks/{input_group-zcAq3DQl.js → input_group-qVZaS5Bb.js} +27 -24
  46. package/dist/vue2/chunks/{input_group-j2gTtc1C.js.map → input_group-qVZaS5Bb.js.map} +1 -1
  47. package/dist/vue2/chunks/keyboard_list_navigation-ScXhrxya.js +284 -0
  48. package/dist/vue2/chunks/{keyboard_list_navigation-N74Bpdq7.js.map → keyboard_list_navigation-ScXhrxya.js.map} +1 -1
  49. package/dist/vue2/chunks/keyboard_list_navigation-fJnl_Iox.js +283 -0
  50. package/dist/{vue3/chunks/keyboard_list_navigation-F0O8nht0.js.map → vue2/chunks/keyboard_list_navigation-fJnl_Iox.js.map} +1 -1
  51. package/dist/vue2/chunks/link_constants-Huj7D_hm.js +22 -0
  52. package/dist/vue2/chunks/{link_constants-Kn6kP4i1.js.map → link_constants-Huj7D_hm.js.map} +1 -1
  53. package/dist/vue2/chunks/link_constants-nWVlXQBs.js +23 -0
  54. package/dist/{vue3/chunks/link_constants-Kn6kP4i1.js.map → vue2/chunks/link_constants-nWVlXQBs.js.map} +1 -1
  55. package/dist/vue2/chunks/list_item_constants-EiqkqZvP.js +13 -0
  56. package/dist/vue2/chunks/{list_item_constants-Tsz5CO1m.js.map → list_item_constants-EiqkqZvP.js.map} +1 -1
  57. package/dist/vue2/chunks/list_item_constants-u1xcN9Dd.js +14 -0
  58. package/dist/{vue3/chunks/list_item_constants-Tsz5CO1m.js.map → vue2/chunks/list_item_constants-u1xcN9Dd.js.map} +1 -1
  59. package/dist/vue2/chunks/modal-VgxXAQFP.js +105 -0
  60. package/dist/vue2/chunks/{modal-qEzlo0Sj.js.map → modal-VgxXAQFP.js.map} +1 -1
  61. package/dist/vue2/chunks/modal-XOr4kiNZ.js +106 -0
  62. package/dist/{vue3/chunks/modal-VuMFkZFH.js.map → vue2/chunks/modal-XOr4kiNZ.js.map} +1 -1
  63. package/dist/vue2/chunks/notice_action-IRUoLX2d.js +196 -0
  64. package/dist/vue2/chunks/{notice_action-u3ZKIhit.js.map → notice_action-IRUoLX2d.js.map} +1 -1
  65. package/dist/vue2/chunks/notice_action-P6uDyE9x.js +195 -0
  66. package/dist/vue2/chunks/{notice_action-9NmtQRai.js.map → notice_action-P6uDyE9x.js.map} +1 -1
  67. package/dist/vue2/chunks/notice_constants-7Qt2CQEY.js +7 -0
  68. package/dist/vue2/chunks/{notice_constants-mC6al2Dm.js.map → notice_constants-7Qt2CQEY.js.map} +1 -1
  69. package/dist/vue2/chunks/notice_constants-UXo9e3bS.js +6 -0
  70. package/dist/{vue3/chunks/notice_constants-mC6al2Dm.js.map → vue2/chunks/notice_constants-UXo9e3bS.js.map} +1 -1
  71. package/dist/vue2/chunks/popover_constants-JwBF9h1Z.js +143 -0
  72. package/dist/{vue3/chunks/popover_constants-hOEhklvr.js.map → vue2/chunks/popover_constants-JwBF9h1Z.js.map} +1 -1
  73. package/dist/vue2/chunks/popover_constants-Qkpb0yh2.js +144 -0
  74. package/dist/vue2/chunks/{popover_constants-hOEhklvr.js.map → popover_constants-Qkpb0yh2.js.map} +1 -1
  75. package/dist/vue2/chunks/sr_only_close_button-81bHIpPu.js +95 -0
  76. package/dist/vue2/chunks/{sr_only_close_button-ErijKGYR.js.map → sr_only_close_button-81bHIpPu.js.map} +1 -1
  77. package/dist/vue2/chunks/sr_only_close_button-ZaGdAHz7.js +94 -0
  78. package/dist/vue2/chunks/{sr_only_close_button-JGole5Xi.js.map → sr_only_close_button-ZaGdAHz7.js.map} +1 -1
  79. package/dist/vue2/chunks/stack_constants-HraCekPm.js +15 -0
  80. package/dist/vue2/chunks/{stack_constants-m9Ickqw0.js.map → stack_constants-HraCekPm.js.map} +1 -1
  81. package/dist/vue2/chunks/stack_constants-SMzMWnAQ.js +14 -0
  82. package/dist/{vue3/chunks/stack_constants-m9Ickqw0.js.map → vue2/chunks/stack_constants-SMzMWnAQ.js.map} +1 -1
  83. package/dist/vue2/chunks/tab-FcsV5VmK.js +386 -0
  84. package/dist/vue2/chunks/{tab-7hJQSLFx.js.map → tab-FcsV5VmK.js.map} +1 -1
  85. package/dist/vue2/chunks/tab-V4cb44Ry.js +387 -0
  86. package/dist/vue2/chunks/{tab-Qm9LVkYj.js.map → tab-V4cb44Ry.js.map} +1 -1
  87. package/dist/vue2/common/constants.cjs +60 -0
  88. package/dist/vue2/{lib → common}/constants.cjs.map +1 -1
  89. package/dist/{vue3/lib → vue2/common}/constants.js +25 -18
  90. package/dist/vue2/{lib → common}/constants.js.map +1 -1
  91. package/dist/vue2/common/dates.cjs +72 -0
  92. package/dist/{vue3/lib → vue2/common}/dates.cjs.map +1 -1
  93. package/dist/vue2/common/dates.js +72 -0
  94. package/dist/vue2/{lib → common}/dates.js.map +1 -1
  95. package/dist/vue2/common/emoji.cjs +163 -0
  96. package/dist/vue2/common/emoji.cjs.map +1 -0
  97. package/dist/vue2/common/emoji.js +168 -0
  98. package/dist/vue2/common/emoji.js.map +1 -0
  99. package/dist/vue2/common/mixins.cjs +17 -0
  100. package/dist/vue2/{lib → common}/mixins.cjs.map +1 -1
  101. package/dist/vue2/common/mixins.js +17 -0
  102. package/dist/vue2/common/utils.cjs +237 -0
  103. package/dist/vue2/{lib → common}/utils.cjs.map +1 -1
  104. package/dist/vue2/common/utils.js +237 -0
  105. package/dist/vue2/{lib → common}/utils.js.map +1 -1
  106. package/dist/vue2/common/validators.cjs +23 -0
  107. package/dist/vue2/{lib → common}/validators.cjs.map +1 -1
  108. package/dist/vue2/common/validators.js +23 -0
  109. package/dist/vue2/{lib → common}/validators.js.map +1 -1
  110. package/dist/vue2/dialtone-vue.cjs +372 -1
  111. package/dist/vue2/dialtone-vue.cjs.map +1 -1
  112. package/dist/vue2/dialtone-vue.js +325 -324
  113. package/dist/vue2/dialtone-vue.js.map +1 -1
  114. package/dist/vue2/lib/attachment-carousel.cjs +260 -1
  115. package/dist/vue2/lib/attachment-carousel.cjs.map +1 -1
  116. package/dist/vue2/lib/attachment-carousel.js +96 -84
  117. package/dist/vue2/lib/attachment-carousel.js.map +1 -1
  118. package/dist/vue2/lib/avatar.cjs +399 -1
  119. package/dist/vue2/lib/avatar.cjs.map +1 -1
  120. package/dist/vue2/lib/avatar.js +111 -79
  121. package/dist/vue2/lib/avatar.js.map +1 -1
  122. package/dist/vue2/lib/badge.cjs +182 -1
  123. package/dist/vue2/lib/badge.cjs.map +1 -1
  124. package/dist/vue2/lib/badge.js +53 -38
  125. package/dist/vue2/lib/badge.js.map +1 -1
  126. package/dist/vue2/lib/banner.cjs +209 -2
  127. package/dist/vue2/lib/banner.cjs.map +1 -1
  128. package/dist/vue2/lib/banner.js +58 -47
  129. package/dist/vue2/lib/banner.js.map +1 -1
  130. package/dist/vue2/lib/breadcrumbs.cjs +146 -1
  131. package/dist/vue2/lib/breadcrumbs.cjs.map +1 -1
  132. package/dist/vue2/lib/breadcrumbs.js +57 -48
  133. package/dist/vue2/lib/breadcrumbs.js.map +1 -1
  134. package/dist/vue2/lib/button-group.cjs +47 -1
  135. package/dist/vue2/lib/button-group.cjs.map +1 -1
  136. package/dist/vue2/lib/button-group.js +21 -18
  137. package/dist/vue2/lib/button-group.js.map +1 -1
  138. package/dist/vue2/lib/button.cjs +349 -1
  139. package/dist/vue2/lib/button.cjs.map +1 -1
  140. package/dist/vue2/lib/button.js +98 -76
  141. package/dist/vue2/lib/button.js.map +1 -1
  142. package/dist/vue2/lib/callbar-button-with-popover.cjs +249 -1
  143. package/dist/vue2/lib/callbar-button-with-popover.cjs.map +1 -1
  144. package/dist/vue2/lib/callbar-button-with-popover.js +66 -50
  145. package/dist/vue2/lib/callbar-button-with-popover.js.map +1 -1
  146. package/dist/vue2/lib/callbar-button.cjs +182 -1
  147. package/dist/vue2/lib/callbar-button.cjs.map +1 -1
  148. package/dist/vue2/lib/callbar-button.js +42 -34
  149. package/dist/vue2/lib/callbar-button.js.map +1 -1
  150. package/dist/vue2/lib/callbox.cjs +146 -1
  151. package/dist/vue2/lib/callbox.cjs.map +1 -1
  152. package/dist/vue2/lib/callbox.js +38 -32
  153. package/dist/vue2/lib/callbox.js.map +1 -1
  154. package/dist/vue2/lib/card.cjs +73 -1
  155. package/dist/vue2/lib/card.cjs.map +1 -1
  156. package/dist/vue2/lib/card.js +22 -20
  157. package/dist/vue2/lib/card.js.map +1 -1
  158. package/dist/vue2/lib/checkbox-group.cjs +129 -1
  159. package/dist/vue2/lib/checkbox-group.cjs.map +1 -1
  160. package/dist/vue2/lib/checkbox-group.js +42 -29
  161. package/dist/vue2/lib/checkbox-group.js.map +1 -1
  162. package/dist/vue2/lib/checkbox.cjs +127 -1
  163. package/dist/vue2/lib/checkbox.cjs.map +1 -1
  164. package/dist/vue2/lib/checkbox.js +46 -35
  165. package/dist/vue2/lib/checkbox.js.map +1 -1
  166. package/dist/vue2/lib/chip.cjs +198 -1
  167. package/dist/vue2/lib/chip.cjs.map +1 -1
  168. package/dist/vue2/lib/chip.js +59 -45
  169. package/dist/vue2/lib/chip.js.map +1 -1
  170. package/dist/vue2/lib/codeblock.cjs +29 -2
  171. package/dist/vue2/lib/codeblock.cjs.map +1 -1
  172. package/dist/vue2/lib/codeblock.js +15 -14
  173. package/dist/vue2/lib/codeblock.js.map +1 -1
  174. package/dist/vue2/lib/collapsible.cjs +334 -1
  175. package/dist/vue2/lib/collapsible.cjs.map +1 -1
  176. package/dist/vue2/lib/collapsible.js +91 -68
  177. package/dist/vue2/lib/collapsible.js.map +1 -1
  178. package/dist/vue2/lib/combobox-multi-select.cjs +519 -1
  179. package/dist/vue2/lib/combobox-multi-select.cjs.map +1 -1
  180. package/dist/vue2/lib/combobox-multi-select.js +223 -136
  181. package/dist/vue2/lib/combobox-multi-select.js.map +1 -1
  182. package/dist/vue2/lib/combobox-with-popover.cjs +384 -1
  183. package/dist/vue2/lib/combobox-with-popover.cjs.map +1 -1
  184. package/dist/vue2/lib/combobox-with-popover.js +130 -86
  185. package/dist/vue2/lib/combobox-with-popover.js.map +1 -1
  186. package/dist/vue2/lib/combobox.cjs +18 -1
  187. package/dist/vue2/lib/combobox.cjs.map +1 -1
  188. package/dist/vue2/lib/combobox.js +9 -9
  189. package/dist/vue2/lib/contact-info.cjs +145 -1
  190. package/dist/vue2/lib/contact-info.cjs.map +1 -1
  191. package/dist/vue2/lib/contact-info.js +34 -32
  192. package/dist/vue2/lib/contact-info.js.map +1 -1
  193. package/dist/vue2/lib/contact-row.cjs +205 -1
  194. package/dist/vue2/lib/contact-row.cjs.map +1 -1
  195. package/dist/vue2/lib/contact-row.js +42 -39
  196. package/dist/vue2/lib/contact-row.js.map +1 -1
  197. package/dist/vue2/lib/datepicker.cjs +662 -1
  198. package/dist/vue2/lib/datepicker.cjs.map +1 -1
  199. package/dist/vue2/lib/datepicker.js +330 -218
  200. package/dist/vue2/lib/datepicker.js.map +1 -1
  201. package/dist/vue2/lib/description-list.cjs +114 -1
  202. package/dist/vue2/lib/description-list.cjs.map +1 -1
  203. package/dist/vue2/lib/description-list.js +51 -19
  204. package/dist/vue2/lib/description-list.js.map +1 -1
  205. package/dist/vue2/lib/dropdown.cjs +45 -1
  206. package/dist/vue2/lib/dropdown.cjs.map +1 -1
  207. package/dist/vue2/lib/dropdown.js +27 -25
  208. package/dist/vue2/lib/dropdown.js.map +1 -1
  209. package/dist/vue2/lib/editor.cjs +555 -1
  210. package/dist/vue2/lib/editor.cjs.map +1 -1
  211. package/dist/vue2/lib/editor.js +191 -162
  212. package/dist/vue2/lib/editor.js.map +1 -1
  213. package/dist/vue2/lib/emoji-picker.cjs +1063 -1
  214. package/dist/vue2/lib/emoji-picker.cjs.map +1 -1
  215. package/dist/vue2/lib/emoji-picker.js +638 -374
  216. package/dist/vue2/lib/emoji-picker.js.map +1 -1
  217. package/dist/vue2/lib/emoji-row.cjs +88 -1
  218. package/dist/vue2/lib/emoji-row.cjs.map +1 -1
  219. package/dist/vue2/lib/emoji-row.js +46 -40
  220. package/dist/vue2/lib/emoji-row.js.map +1 -1
  221. package/dist/vue2/lib/emoji-text-wrapper.cjs +109 -1
  222. package/dist/vue2/lib/emoji-text-wrapper.cjs.map +1 -1
  223. package/dist/vue2/lib/emoji-text-wrapper.js +49 -35
  224. package/dist/vue2/lib/emoji-text-wrapper.js.map +1 -1
  225. package/dist/vue2/lib/emoji.cjs +145 -1
  226. package/dist/vue2/lib/emoji.cjs.map +1 -1
  227. package/dist/vue2/lib/emoji.js +140 -5
  228. package/dist/vue2/lib/emoji.js.map +1 -1
  229. package/dist/vue2/lib/feed-item-row.cjs +213 -1
  230. package/dist/vue2/lib/feed-item-row.cjs.map +1 -1
  231. package/dist/vue2/lib/feed-item-row.js +71 -63
  232. package/dist/vue2/lib/feed-item-row.js.map +1 -1
  233. package/dist/vue2/lib/feed-pill.cjs +149 -1
  234. package/dist/vue2/lib/feed-pill.cjs.map +1 -1
  235. package/dist/vue2/lib/feed-pill.js +60 -51
  236. package/dist/vue2/lib/feed-pill.js.map +1 -1
  237. package/dist/vue2/lib/general-row.cjs +405 -1
  238. package/dist/vue2/lib/general-row.cjs.map +1 -1
  239. package/dist/vue2/lib/general-row.js +133 -106
  240. package/dist/vue2/lib/general-row.js.map +1 -1
  241. package/dist/vue2/lib/group-row.cjs +117 -1
  242. package/dist/vue2/lib/group-row.cjs.map +1 -1
  243. package/dist/vue2/lib/group-row.js +33 -30
  244. package/dist/vue2/lib/group-row.js.map +1 -1
  245. package/dist/vue2/lib/grouped-chip.cjs +45 -1
  246. package/dist/vue2/lib/grouped-chip.cjs.map +1 -1
  247. package/dist/vue2/lib/grouped-chip.js +28 -26
  248. package/dist/vue2/lib/grouped-chip.js.map +1 -1
  249. package/dist/vue2/lib/hovercard.cjs +227 -1
  250. package/dist/vue2/lib/hovercard.cjs.map +1 -1
  251. package/dist/vue2/lib/hovercard.js +98 -63
  252. package/dist/vue2/lib/hovercard.js.map +1 -1
  253. package/dist/vue2/lib/icon.cjs +59 -1
  254. package/dist/vue2/lib/icon.cjs.map +1 -1
  255. package/dist/vue2/lib/icon.js +22 -20
  256. package/dist/vue2/lib/icon.js.map +1 -1
  257. package/dist/vue2/lib/image-viewer.cjs +190 -1
  258. package/dist/vue2/lib/image-viewer.cjs.map +1 -1
  259. package/dist/vue2/lib/image-viewer.js +83 -62
  260. package/dist/vue2/lib/image-viewer.js.map +1 -1
  261. package/dist/vue2/lib/input-group.cjs +91 -1
  262. package/dist/vue2/lib/input-group.cjs.map +1 -1
  263. package/dist/vue2/lib/input-group.js +29 -27
  264. package/dist/vue2/lib/input-group.js.map +1 -1
  265. package/dist/vue2/lib/input.cjs +492 -1
  266. package/dist/vue2/lib/input.cjs.map +1 -1
  267. package/dist/vue2/lib/input.js +127 -89
  268. package/dist/vue2/lib/input.js.map +1 -1
  269. package/dist/vue2/lib/item-layout.cjs +40 -1
  270. package/dist/vue2/lib/item-layout.cjs.map +1 -1
  271. package/dist/vue2/lib/item-layout.js +15 -13
  272. package/dist/vue2/lib/item-layout.js.map +1 -1
  273. package/dist/vue2/lib/ivr-node.cjs +209 -1
  274. package/dist/vue2/lib/ivr-node.cjs.map +1 -1
  275. package/dist/vue2/lib/ivr-node.js +115 -99
  276. package/dist/vue2/lib/ivr-node.js.map +1 -1
  277. package/dist/vue2/lib/keyboard-shortcut.cjs +106 -1
  278. package/dist/vue2/lib/keyboard-shortcut.cjs.map +1 -1
  279. package/dist/vue2/lib/keyboard-shortcut.js +42 -34
  280. package/dist/vue2/lib/keyboard-shortcut.js.map +1 -1
  281. package/dist/vue2/lib/lazy-show.cjs +80 -1
  282. package/dist/vue2/lib/lazy-show.cjs.map +1 -1
  283. package/dist/vue2/lib/lazy-show.js +20 -16
  284. package/dist/vue2/lib/lazy-show.js.map +1 -1
  285. package/dist/vue2/lib/link.cjs +70 -1
  286. package/dist/vue2/lib/link.cjs.map +1 -1
  287. package/dist/vue2/lib/link.js +22 -20
  288. package/dist/vue2/lib/link.js.map +1 -1
  289. package/dist/vue2/lib/list-item-group.cjs +60 -1
  290. package/dist/vue2/lib/list-item-group.cjs.map +1 -1
  291. package/dist/vue2/lib/list-item-group.js +19 -17
  292. package/dist/vue2/lib/list-item-group.js.map +1 -1
  293. package/dist/vue2/lib/list-item.cjs +204 -1
  294. package/dist/vue2/lib/list-item.cjs.map +1 -1
  295. package/dist/vue2/lib/list-item.js +67 -56
  296. package/dist/vue2/lib/list-item.js.map +1 -1
  297. package/dist/vue2/lib/message-input.cjs +554 -1
  298. package/dist/vue2/lib/message-input.cjs.map +1 -1
  299. package/dist/vue2/lib/message-input.js +174 -152
  300. package/dist/vue2/lib/message-input.js.map +1 -1
  301. package/dist/vue2/lib/modal.cjs +350 -2
  302. package/dist/vue2/lib/modal.cjs.map +1 -1
  303. package/dist/vue2/lib/modal.js +118 -90
  304. package/dist/vue2/lib/modal.js.map +1 -1
  305. package/dist/vue2/lib/notice.cjs +159 -1
  306. package/dist/vue2/lib/notice.cjs.map +1 -1
  307. package/dist/vue2/lib/notice.js +46 -43
  308. package/dist/vue2/lib/notice.js.map +1 -1
  309. package/dist/vue2/lib/pagination.cjs +152 -1
  310. package/dist/vue2/lib/pagination.cjs.map +1 -1
  311. package/dist/vue2/lib/pagination.js +60 -48
  312. package/dist/vue2/lib/pagination.js.map +1 -1
  313. package/dist/vue2/lib/popover.cjs +956 -1
  314. package/dist/vue2/lib/popover.cjs.map +1 -1
  315. package/dist/vue2/lib/popover.js +401 -221
  316. package/dist/vue2/lib/popover.js.map +1 -1
  317. package/dist/vue2/lib/presence.cjs +65 -1
  318. package/dist/vue2/lib/presence.cjs.map +1 -1
  319. package/dist/vue2/lib/presence.js +32 -26
  320. package/dist/vue2/lib/presence.js.map +1 -1
  321. package/dist/vue2/lib/radio-group.cjs +98 -1
  322. package/dist/vue2/lib/radio-group.cjs.map +1 -1
  323. package/dist/vue2/lib/radio-group.js +24 -22
  324. package/dist/vue2/lib/radio-group.js.map +1 -1
  325. package/dist/vue2/lib/radio.cjs +118 -1
  326. package/dist/vue2/lib/radio.cjs.map +1 -1
  327. package/dist/vue2/lib/radio.js +43 -35
  328. package/dist/vue2/lib/radio.js.map +1 -1
  329. package/dist/vue2/lib/rich-text-editor.cjs +1138 -1
  330. package/dist/vue2/lib/rich-text-editor.cjs.map +1 -1
  331. package/dist/vue2/lib/rich-text-editor.js +574 -387
  332. package/dist/vue2/lib/rich-text-editor.js.map +1 -1
  333. package/dist/vue2/lib/root-layout.cjs +130 -1
  334. package/dist/vue2/lib/root-layout.cjs.map +1 -1
  335. package/dist/vue2/lib/root-layout.js +28 -24
  336. package/dist/vue2/lib/root-layout.js.map +1 -1
  337. package/dist/vue2/lib/select-menu.cjs +282 -1
  338. package/dist/vue2/lib/select-menu.cjs.map +1 -1
  339. package/dist/vue2/lib/select-menu.js +101 -61
  340. package/dist/vue2/lib/select-menu.js.map +1 -1
  341. package/dist/vue2/lib/settings-menu-button.cjs +65 -1
  342. package/dist/vue2/lib/settings-menu-button.cjs.map +1 -1
  343. package/dist/vue2/lib/settings-menu-button.js +26 -24
  344. package/dist/vue2/lib/settings-menu-button.js.map +1 -1
  345. package/dist/vue2/lib/skeleton.cjs +612 -1
  346. package/dist/vue2/lib/skeleton.cjs.map +1 -1
  347. package/dist/vue2/lib/skeleton.js +174 -135
  348. package/dist/vue2/lib/skeleton.js.map +1 -1
  349. package/dist/vue2/lib/stack.cjs +127 -1
  350. package/dist/vue2/lib/stack.cjs.map +1 -1
  351. package/dist/vue2/lib/stack.js +66 -56
  352. package/dist/vue2/lib/stack.js.map +1 -1
  353. package/dist/vue2/lib/tabs.cjs +99 -1
  354. package/dist/vue2/lib/tabs.cjs.map +1 -1
  355. package/dist/vue2/lib/tabs.js +42 -35
  356. package/dist/vue2/lib/tabs.js.map +1 -1
  357. package/dist/vue2/lib/time-pill.cjs +47 -1
  358. package/dist/vue2/lib/time-pill.cjs.map +1 -1
  359. package/dist/vue2/lib/time-pill.js +21 -16
  360. package/dist/vue2/lib/time-pill.js.map +1 -1
  361. package/dist/vue2/lib/toast.cjs +247 -1
  362. package/dist/vue2/lib/toast.cjs.map +1 -1
  363. package/dist/vue2/lib/toast.js +78 -55
  364. package/dist/vue2/lib/toast.js.map +1 -1
  365. package/dist/vue2/lib/toggle.cjs +177 -1
  366. package/dist/vue2/lib/toggle.cjs.map +1 -1
  367. package/dist/vue2/lib/toggle.js +46 -37
  368. package/dist/vue2/lib/toggle.js.map +1 -1
  369. package/dist/vue2/lib/tooltip-directive.cjs +87 -1
  370. package/dist/vue2/lib/tooltip-directive.cjs.map +1 -1
  371. package/dist/vue2/lib/tooltip-directive.js +55 -41
  372. package/dist/vue2/lib/tooltip-directive.js.map +1 -1
  373. package/dist/vue2/lib/tooltip.cjs +436 -1
  374. package/dist/vue2/lib/tooltip.cjs.map +1 -1
  375. package/dist/vue2/lib/tooltip.js +152 -90
  376. package/dist/vue2/lib/tooltip.js.map +1 -1
  377. package/dist/vue2/lib/top-banner-info.cjs +63 -1
  378. package/dist/vue2/lib/top-banner-info.cjs.map +1 -1
  379. package/dist/vue2/lib/top-banner-info.js +22 -18
  380. package/dist/vue2/lib/top-banner-info.js.map +1 -1
  381. package/dist/vue2/lib/unread-pill.cjs +63 -1
  382. package/dist/vue2/lib/unread-pill.cjs.map +1 -1
  383. package/dist/vue2/lib/unread-pill.js +25 -21
  384. package/dist/vue2/lib/unread-pill.js.map +1 -1
  385. package/dist/vue2/lib/validation-messages.cjs +85 -1
  386. package/dist/vue2/lib/validation-messages.cjs.map +1 -1
  387. package/dist/vue2/lib/validation-messages.js +32 -29
  388. package/dist/vue2/lib/validation-messages.js.map +1 -1
  389. package/dist/vue2/style.css +1214 -1
  390. package/dist/vue2/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +2 -2
  391. package/dist/vue2/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +2 -2
  392. package/dist/vue3/chunks/_plugin-vue_export-helper-caHeSgYY.js +11 -0
  393. package/dist/vue3/chunks/_plugin-vue_export-helper-caHeSgYY.js.map +1 -0
  394. package/dist/vue3/chunks/_plugin-vue_export-helper-fhnQq0tA.js +10 -0
  395. package/dist/vue3/chunks/_plugin-vue_export-helper-fhnQq0tA.js.map +1 -0
  396. package/dist/vue3/chunks/{dropdown-eWOvBvwq.js → dropdown-Hn-TeTvZ.js} +151 -104
  397. package/dist/vue3/chunks/{dropdown-UO3UJalk.js.map → dropdown-Hn-TeTvZ.js.map} +1 -1
  398. package/dist/vue3/chunks/dropdown-w8Do29L5.js +442 -0
  399. package/dist/vue3/chunks/{dropdown-eWOvBvwq.js.map → dropdown-w8Do29L5.js.map} +1 -1
  400. package/dist/vue3/chunks/dropdown_constants-2pGCXy7m.js +8 -0
  401. package/dist/vue3/chunks/dropdown_constants-2pGCXy7m.js.map +1 -0
  402. package/dist/vue3/chunks/dropdown_constants-w1MXGC3Z.js +9 -0
  403. package/dist/vue3/chunks/dropdown_constants-w1MXGC3Z.js.map +1 -0
  404. package/dist/vue3/chunks/{icon_constants-OpYAAKwF.js → icon_constants-Dy4MEUJL.js} +7 -6
  405. package/dist/{vue2/chunks/icon_constants-OpYAAKwF.js.map → vue3/chunks/icon_constants-Dy4MEUJL.js.map} +1 -1
  406. package/dist/vue3/chunks/icon_constants-QYpmdE0R.js +16 -0
  407. package/dist/vue3/chunks/{icon_constants-OpYAAKwF.js.map → icon_constants-QYpmdE0R.js.map} +1 -1
  408. package/dist/vue3/chunks/index-We0ixqCH.js +446 -0
  409. package/dist/vue3/chunks/{index-b4iXYvId.js.map → index-We0ixqCH.js.map} +1 -1
  410. package/dist/vue3/chunks/index-xVEqMOTr.js +447 -0
  411. package/dist/vue3/chunks/{index-6tYeqbgP.js.map → index-xVEqMOTr.js.map} +1 -1
  412. package/dist/{vue2/chunks/input-1tm09l_-.js → vue3/chunks/input-NmYDD5bn.js} +83 -60
  413. package/dist/vue3/chunks/{input-0Uksk4DP.js.map → input-NmYDD5bn.js.map} +1 -1
  414. package/dist/vue3/chunks/input-ttnte8zB.js +295 -0
  415. package/dist/vue3/chunks/{input-4UQWegUk.js.map → input-ttnte8zB.js.map} +1 -1
  416. package/dist/vue3/chunks/input_group-M-D25pOJ.js +152 -0
  417. package/dist/vue3/chunks/{input_group-bBKaq3Wi.js.map → input_group-M-D25pOJ.js.map} +1 -1
  418. package/dist/vue3/chunks/{input_group-bBKaq3Wi.js → input_group-jWnq2DJT.js} +27 -24
  419. package/dist/vue3/chunks/{input_group-AS760Cp7.js.map → input_group-jWnq2DJT.js.map} +1 -1
  420. package/dist/vue3/chunks/keyboard_list_navigation-ScXhrxya.js +284 -0
  421. package/dist/vue3/chunks/{keyboard_list_navigation-N74Bpdq7.js.map → keyboard_list_navigation-ScXhrxya.js.map} +1 -1
  422. package/dist/vue3/chunks/keyboard_list_navigation-fJnl_Iox.js +283 -0
  423. package/dist/{vue2/chunks/keyboard_list_navigation-F0O8nht0.js.map → vue3/chunks/keyboard_list_navigation-fJnl_Iox.js.map} +1 -1
  424. package/dist/vue3/chunks/link_constants-Huj7D_hm.js +22 -0
  425. package/dist/{vue2/chunks/link_constants-vIUB92L4.js.map → vue3/chunks/link_constants-Huj7D_hm.js.map} +1 -1
  426. package/dist/vue3/chunks/link_constants-nWVlXQBs.js +23 -0
  427. package/dist/vue3/chunks/{link_constants-vIUB92L4.js.map → link_constants-nWVlXQBs.js.map} +1 -1
  428. package/dist/vue3/chunks/list_item_constants-EiqkqZvP.js +13 -0
  429. package/dist/{vue2/chunks/list_item_constants-LTUc74pD.js.map → vue3/chunks/list_item_constants-EiqkqZvP.js.map} +1 -1
  430. package/dist/vue3/chunks/list_item_constants-u1xcN9Dd.js +14 -0
  431. package/dist/vue3/chunks/{list_item_constants-LTUc74pD.js.map → list_item_constants-u1xcN9Dd.js.map} +1 -1
  432. package/dist/vue3/chunks/modal-VgxXAQFP.js +105 -0
  433. package/dist/vue3/chunks/{modal-qEzlo0Sj.js.map → modal-VgxXAQFP.js.map} +1 -1
  434. package/dist/vue3/chunks/modal-XOr4kiNZ.js +106 -0
  435. package/dist/{vue2/chunks/modal-VuMFkZFH.js.map → vue3/chunks/modal-XOr4kiNZ.js.map} +1 -1
  436. package/dist/vue3/chunks/notice_action-WTucGhvr.js +222 -0
  437. package/dist/vue3/chunks/{notice_action-tJfD5Qw1.js.map → notice_action-WTucGhvr.js.map} +1 -1
  438. package/dist/vue3/chunks/notice_action-p-ePanW_.js +223 -0
  439. package/dist/vue3/chunks/{notice_action-jO199emq.js.map → notice_action-p-ePanW_.js.map} +1 -1
  440. package/dist/vue3/chunks/notice_constants-7Qt2CQEY.js +7 -0
  441. package/dist/{vue2/chunks/notice_constants-c--hBFQw.js.map → vue3/chunks/notice_constants-7Qt2CQEY.js.map} +1 -1
  442. package/dist/vue3/chunks/notice_constants-UXo9e3bS.js +6 -0
  443. package/dist/vue3/chunks/{notice_constants-c--hBFQw.js.map → notice_constants-UXo9e3bS.js.map} +1 -1
  444. package/dist/vue3/chunks/popover_constants-JwBF9h1Z.js +143 -0
  445. package/dist/{vue2/chunks/popover_constants-qjlEkroB.js.map → vue3/chunks/popover_constants-JwBF9h1Z.js.map} +1 -1
  446. package/dist/vue3/chunks/popover_constants-Qkpb0yh2.js +144 -0
  447. package/dist/vue3/chunks/{popover_constants-qjlEkroB.js.map → popover_constants-Qkpb0yh2.js.map} +1 -1
  448. package/dist/vue3/chunks/{sr_only_close_button-7O-Ev8uM.js → sr_only_close_button-3EdsV-dH.js} +28 -24
  449. package/dist/vue3/chunks/{sr_only_close_button-iD7s1Pbj.js.map → sr_only_close_button-3EdsV-dH.js.map} +1 -1
  450. package/dist/vue3/chunks/sr_only_close_button-xGrHFjwA.js +91 -0
  451. package/dist/vue3/chunks/{sr_only_close_button-7O-Ev8uM.js.map → sr_only_close_button-xGrHFjwA.js.map} +1 -1
  452. package/dist/vue3/chunks/stack_constants-HraCekPm.js +15 -0
  453. package/dist/{vue2/chunks/stack_constants-u7tNqGtc.js.map → vue3/chunks/stack_constants-HraCekPm.js.map} +1 -1
  454. package/dist/vue3/chunks/stack_constants-SMzMWnAQ.js +14 -0
  455. package/dist/vue3/chunks/{stack_constants-u7tNqGtc.js.map → stack_constants-SMzMWnAQ.js.map} +1 -1
  456. package/dist/vue3/chunks/tab-RTDgnD9-.js +391 -0
  457. package/dist/vue3/chunks/{tab-at7WWglk.js.map → tab-RTDgnD9-.js.map} +1 -1
  458. package/dist/vue3/chunks/tab-qc3f42Yp.js +390 -0
  459. package/dist/vue3/chunks/{tab-GQZFMq83.js.map → tab-qc3f42Yp.js.map} +1 -1
  460. package/dist/vue3/common/constants.cjs +60 -0
  461. package/dist/vue3/{lib → common}/constants.cjs.map +1 -1
  462. package/dist/{vue2/lib → vue3/common}/constants.js +25 -18
  463. package/dist/vue3/{lib → common}/constants.js.map +1 -1
  464. package/dist/vue3/common/dates.cjs +72 -0
  465. package/dist/{vue2/lib → vue3/common}/dates.cjs.map +1 -1
  466. package/dist/vue3/common/dates.js +72 -0
  467. package/dist/vue3/{lib → common}/dates.js.map +1 -1
  468. package/dist/vue3/common/emoji.cjs +163 -0
  469. package/dist/vue3/common/emoji.cjs.map +1 -0
  470. package/dist/vue3/common/emoji.js +168 -0
  471. package/dist/vue3/common/emoji.js.map +1 -0
  472. package/dist/vue3/common/mixins.cjs +17 -0
  473. package/dist/vue3/{lib → common}/mixins.cjs.map +1 -1
  474. package/dist/vue3/common/mixins.js +17 -0
  475. package/dist/vue3/common/utils.cjs +243 -0
  476. package/dist/vue3/{lib → common}/utils.cjs.map +1 -1
  477. package/dist/vue3/common/utils.js +243 -0
  478. package/dist/vue3/{lib → common}/utils.js.map +1 -1
  479. package/dist/vue3/common/validators.cjs +23 -0
  480. package/dist/vue3/{lib → common}/validators.cjs.map +1 -1
  481. package/dist/vue3/common/validators.js +23 -0
  482. package/dist/vue3/{lib → common}/validators.js.map +1 -1
  483. package/dist/vue3/dialtone-vue.cjs +373 -1
  484. package/dist/vue3/dialtone-vue.cjs.map +1 -1
  485. package/dist/vue3/dialtone-vue.js +328 -327
  486. package/dist/vue3/dialtone-vue.js.map +1 -1
  487. package/dist/vue3/lib/attachment-carousel.cjs +345 -1
  488. package/dist/vue3/lib/attachment-carousel.cjs.map +1 -1
  489. package/dist/vue3/lib/attachment-carousel.js +126 -108
  490. package/dist/vue3/lib/attachment-carousel.js.map +1 -1
  491. package/dist/vue3/lib/avatar.cjs +447 -1
  492. package/dist/vue3/lib/avatar.cjs.map +1 -1
  493. package/dist/vue3/lib/avatar.js +135 -101
  494. package/dist/vue3/lib/avatar.js.map +1 -1
  495. package/dist/vue3/lib/badge.cjs +206 -1
  496. package/dist/vue3/lib/badge.cjs.map +1 -1
  497. package/dist/vue3/lib/badge.js +64 -48
  498. package/dist/vue3/lib/badge.js.map +1 -1
  499. package/dist/vue3/lib/banner.cjs +242 -2
  500. package/dist/vue3/lib/banner.cjs.map +1 -1
  501. package/dist/vue3/lib/banner.js +81 -71
  502. package/dist/vue3/lib/banner.js.map +1 -1
  503. package/dist/vue3/lib/breadcrumbs.cjs +150 -1
  504. package/dist/vue3/lib/breadcrumbs.cjs.map +1 -1
  505. package/dist/vue3/lib/breadcrumbs.js +60 -52
  506. package/dist/vue3/lib/breadcrumbs.js.map +1 -1
  507. package/dist/vue3/lib/button-group.cjs +41 -1
  508. package/dist/vue3/lib/button-group.cjs.map +1 -1
  509. package/dist/vue3/lib/button-group.js +15 -14
  510. package/dist/vue3/lib/button-group.js.map +1 -1
  511. package/dist/vue3/lib/button.cjs +356 -1
  512. package/dist/vue3/lib/button.cjs.map +1 -1
  513. package/dist/vue3/lib/button.js +108 -88
  514. package/dist/vue3/lib/button.js.map +1 -1
  515. package/dist/vue3/lib/callbar-button-with-popover.cjs +322 -1
  516. package/dist/vue3/lib/callbar-button-with-popover.cjs.map +1 -1
  517. package/dist/vue3/lib/callbar-button-with-popover.js +101 -83
  518. package/dist/vue3/lib/callbar-button-with-popover.js.map +1 -1
  519. package/dist/vue3/lib/callbar-button.cjs +200 -1
  520. package/dist/vue3/lib/callbar-button.cjs.map +1 -1
  521. package/dist/vue3/lib/callbar-button.js +52 -45
  522. package/dist/vue3/lib/callbar-button.js.map +1 -1
  523. package/dist/vue3/lib/callbox.cjs +217 -1
  524. package/dist/vue3/lib/callbox.cjs.map +1 -1
  525. package/dist/vue3/lib/callbox.js +80 -67
  526. package/dist/vue3/lib/callbox.js.map +1 -1
  527. package/dist/vue3/lib/card.cjs +91 -1
  528. package/dist/vue3/lib/card.cjs.map +1 -1
  529. package/dist/vue3/lib/card.js +27 -27
  530. package/dist/vue3/lib/card.js.map +1 -1
  531. package/dist/vue3/lib/checkbox-group.cjs +115 -1
  532. package/dist/vue3/lib/checkbox-group.cjs.map +1 -1
  533. package/dist/vue3/lib/checkbox-group.js +34 -23
  534. package/dist/vue3/lib/checkbox-group.js.map +1 -1
  535. package/dist/vue3/lib/checkbox.cjs +156 -1
  536. package/dist/vue3/lib/checkbox.cjs.map +1 -1
  537. package/dist/vue3/lib/checkbox.js +72 -60
  538. package/dist/vue3/lib/checkbox.js.map +1 -1
  539. package/dist/vue3/lib/chip.cjs +235 -1
  540. package/dist/vue3/lib/chip.cjs.map +1 -1
  541. package/dist/vue3/lib/chip.js +84 -67
  542. package/dist/vue3/lib/chip.js.map +1 -1
  543. package/dist/vue3/lib/codeblock.cjs +23 -2
  544. package/dist/vue3/lib/codeblock.cjs.map +1 -1
  545. package/dist/vue3/lib/codeblock.js +13 -13
  546. package/dist/vue3/lib/codeblock.js.map +1 -1
  547. package/dist/vue3/lib/collapsible.cjs +398 -1
  548. package/dist/vue3/lib/collapsible.cjs.map +1 -1
  549. package/dist/vue3/lib/collapsible.js +123 -100
  550. package/dist/vue3/lib/collapsible.js.map +1 -1
  551. package/dist/vue3/lib/combobox-multi-select.cjs +589 -1
  552. package/dist/vue3/lib/combobox-multi-select.cjs.map +1 -1
  553. package/dist/vue3/lib/combobox-multi-select.js +270 -177
  554. package/dist/vue3/lib/combobox-multi-select.js.map +1 -1
  555. package/dist/vue3/lib/combobox-with-popover.cjs +452 -1
  556. package/dist/vue3/lib/combobox-with-popover.cjs.map +1 -1
  557. package/dist/vue3/lib/combobox-with-popover.js +172 -127
  558. package/dist/vue3/lib/combobox-with-popover.js.map +1 -1
  559. package/dist/vue3/lib/combobox.cjs +18 -1
  560. package/dist/vue3/lib/combobox.cjs.map +1 -1
  561. package/dist/vue3/lib/combobox.js +9 -9
  562. package/dist/vue3/lib/contact-info.cjs +205 -1
  563. package/dist/vue3/lib/contact-info.cjs.map +1 -1
  564. package/dist/vue3/lib/contact-info.js +69 -60
  565. package/dist/vue3/lib/contact-info.js.map +1 -1
  566. package/dist/vue3/lib/contact-row.cjs +246 -1
  567. package/dist/vue3/lib/contact-row.cjs.map +1 -1
  568. package/dist/vue3/lib/contact-row.js +67 -63
  569. package/dist/vue3/lib/contact-row.js.map +1 -1
  570. package/dist/vue3/lib/datepicker.cjs +854 -1
  571. package/dist/vue3/lib/datepicker.cjs.map +1 -1
  572. package/dist/vue3/lib/datepicker.js +585 -441
  573. package/dist/vue3/lib/datepicker.js.map +1 -1
  574. package/dist/vue3/lib/description-list.cjs +116 -1
  575. package/dist/vue3/lib/description-list.cjs.map +1 -1
  576. package/dist/vue3/lib/description-list.js +56 -24
  577. package/dist/vue3/lib/description-list.js.map +1 -1
  578. package/dist/vue3/lib/dropdown.cjs +36 -1
  579. package/dist/vue3/lib/dropdown.cjs.map +1 -1
  580. package/dist/vue3/lib/dropdown.js +22 -21
  581. package/dist/vue3/lib/dropdown.js.map +1 -1
  582. package/dist/vue3/lib/editor.cjs +711 -1
  583. package/dist/vue3/lib/editor.cjs.map +1 -1
  584. package/dist/vue3/lib/editor.js +271 -235
  585. package/dist/vue3/lib/editor.js.map +1 -1
  586. package/dist/vue3/lib/emoji-picker.cjs +1277 -1
  587. package/dist/vue3/lib/emoji-picker.cjs.map +1 -1
  588. package/dist/vue3/lib/emoji-picker.js +859 -569
  589. package/dist/vue3/lib/emoji-picker.js.map +1 -1
  590. package/dist/vue3/lib/emoji-row.cjs +128 -1
  591. package/dist/vue3/lib/emoji-row.cjs.map +1 -1
  592. package/dist/vue3/lib/emoji-row.js +89 -75
  593. package/dist/vue3/lib/emoji-row.js.map +1 -1
  594. package/dist/vue3/lib/emoji-text-wrapper.cjs +102 -1
  595. package/dist/vue3/lib/emoji-text-wrapper.cjs.map +1 -1
  596. package/dist/vue3/lib/emoji-text-wrapper.js +42 -31
  597. package/dist/vue3/lib/emoji-text-wrapper.js.map +1 -1
  598. package/dist/vue3/lib/emoji.cjs +157 -1
  599. package/dist/vue3/lib/emoji.cjs.map +1 -1
  600. package/dist/vue3/lib/emoji.js +152 -6
  601. package/dist/vue3/lib/emoji.js.map +1 -1
  602. package/dist/vue3/lib/feed-item-row.cjs +296 -1
  603. package/dist/vue3/lib/feed-item-row.cjs.map +1 -1
  604. package/dist/vue3/lib/feed-item-row.js +119 -100
  605. package/dist/vue3/lib/feed-item-row.js.map +1 -1
  606. package/dist/vue3/lib/feed-pill.cjs +173 -1
  607. package/dist/vue3/lib/feed-pill.cjs.map +1 -1
  608. package/dist/vue3/lib/feed-pill.js +70 -57
  609. package/dist/vue3/lib/feed-pill.js.map +1 -1
  610. package/dist/vue3/lib/general-row.cjs +518 -1
  611. package/dist/vue3/lib/general-row.cjs.map +1 -1
  612. package/dist/vue3/lib/general-row.js +186 -148
  613. package/dist/vue3/lib/general-row.js.map +1 -1
  614. package/dist/vue3/lib/group-row.cjs +116 -1
  615. package/dist/vue3/lib/group-row.cjs.map +1 -1
  616. package/dist/vue3/lib/group-row.js +37 -35
  617. package/dist/vue3/lib/group-row.js.map +1 -1
  618. package/dist/vue3/lib/grouped-chip.cjs +96 -1
  619. package/dist/vue3/lib/grouped-chip.cjs.map +1 -1
  620. package/dist/vue3/lib/grouped-chip.js +51 -46
  621. package/dist/vue3/lib/grouped-chip.js.map +1 -1
  622. package/dist/vue3/lib/hovercard.cjs +223 -1
  623. package/dist/vue3/lib/hovercard.cjs.map +1 -1
  624. package/dist/vue3/lib/hovercard.js +115 -80
  625. package/dist/vue3/lib/hovercard.js.map +1 -1
  626. package/dist/vue3/lib/icon.cjs +58 -1
  627. package/dist/vue3/lib/icon.cjs.map +1 -1
  628. package/dist/vue3/lib/icon.js +20 -20
  629. package/dist/vue3/lib/icon.js.map +1 -1
  630. package/dist/vue3/lib/image-viewer.cjs +243 -1
  631. package/dist/vue3/lib/image-viewer.cjs.map +1 -1
  632. package/dist/vue3/lib/image-viewer.js +104 -80
  633. package/dist/vue3/lib/image-viewer.js.map +1 -1
  634. package/dist/vue3/lib/input-group.cjs +91 -1
  635. package/dist/vue3/lib/input-group.cjs.map +1 -1
  636. package/dist/vue3/lib/input-group.js +41 -39
  637. package/dist/vue3/lib/input-group.js.map +1 -1
  638. package/dist/vue3/lib/input.cjs +578 -1
  639. package/dist/vue3/lib/input.cjs.map +1 -1
  640. package/dist/vue3/lib/input.js +185 -137
  641. package/dist/vue3/lib/input.js.map +1 -1
  642. package/dist/vue3/lib/item-layout.cjs +91 -1
  643. package/dist/vue3/lib/item-layout.cjs.map +1 -1
  644. package/dist/vue3/lib/item-layout.js +45 -39
  645. package/dist/vue3/lib/item-layout.js.map +1 -1
  646. package/dist/vue3/lib/ivr-node.cjs +263 -1
  647. package/dist/vue3/lib/ivr-node.cjs.map +1 -1
  648. package/dist/vue3/lib/ivr-node.js +130 -112
  649. package/dist/vue3/lib/ivr-node.js.map +1 -1
  650. package/dist/vue3/lib/keyboard-shortcut.cjs +119 -1
  651. package/dist/vue3/lib/keyboard-shortcut.cjs.map +1 -1
  652. package/dist/vue3/lib/keyboard-shortcut.js +58 -48
  653. package/dist/vue3/lib/keyboard-shortcut.js.map +1 -1
  654. package/dist/vue3/lib/lazy-show.cjs +82 -1
  655. package/dist/vue3/lib/lazy-show.cjs.map +1 -1
  656. package/dist/vue3/lib/lazy-show.js +21 -19
  657. package/dist/vue3/lib/lazy-show.js.map +1 -1
  658. package/dist/vue3/lib/link.cjs +43 -1
  659. package/dist/vue3/lib/link.cjs.map +1 -1
  660. package/dist/vue3/lib/link.js +20 -19
  661. package/dist/vue3/lib/link.js.map +1 -1
  662. package/dist/vue3/lib/list-item-group.cjs +67 -1
  663. package/dist/vue3/lib/list-item-group.cjs.map +1 -1
  664. package/dist/vue3/lib/list-item-group.js +24 -22
  665. package/dist/vue3/lib/list-item-group.js.map +1 -1
  666. package/dist/vue3/lib/list-item.cjs +216 -1
  667. package/dist/vue3/lib/list-item.cjs.map +1 -1
  668. package/dist/vue3/lib/list-item.js +71 -60
  669. package/dist/vue3/lib/list-item.js.map +1 -1
  670. package/dist/vue3/lib/message-input.cjs +708 -1
  671. package/dist/vue3/lib/message-input.cjs.map +1 -1
  672. package/dist/vue3/lib/message-input.js +232 -206
  673. package/dist/vue3/lib/message-input.js.map +1 -1
  674. package/dist/vue3/lib/modal.cjs +444 -2
  675. package/dist/vue3/lib/modal.cjs.map +1 -1
  676. package/dist/vue3/lib/modal.js +153 -120
  677. package/dist/vue3/lib/modal.js.map +1 -1
  678. package/dist/vue3/lib/notice.cjs +197 -1
  679. package/dist/vue3/lib/notice.cjs.map +1 -1
  680. package/dist/vue3/lib/notice.js +66 -63
  681. package/dist/vue3/lib/notice.js.map +1 -1
  682. package/dist/vue3/lib/pagination.cjs +205 -1
  683. package/dist/vue3/lib/pagination.cjs.map +1 -1
  684. package/dist/vue3/lib/pagination.js +96 -81
  685. package/dist/vue3/lib/pagination.js.map +1 -1
  686. package/dist/vue3/lib/popover.cjs +1080 -1
  687. package/dist/vue3/lib/popover.cjs.map +1 -1
  688. package/dist/vue3/lib/popover.js +447 -267
  689. package/dist/vue3/lib/popover.js.map +1 -1
  690. package/dist/vue3/lib/presence.cjs +70 -1
  691. package/dist/vue3/lib/presence.cjs.map +1 -1
  692. package/dist/vue3/lib/presence.js +33 -27
  693. package/dist/vue3/lib/presence.js.map +1 -1
  694. package/dist/vue3/lib/radio-group.cjs +88 -1
  695. package/dist/vue3/lib/radio-group.cjs.map +1 -1
  696. package/dist/vue3/lib/radio-group.js +18 -18
  697. package/dist/vue3/lib/radio-group.js.map +1 -1
  698. package/dist/vue3/lib/radio.cjs +162 -1
  699. package/dist/vue3/lib/radio.cjs.map +1 -1
  700. package/dist/vue3/lib/radio.js +66 -57
  701. package/dist/vue3/lib/radio.js.map +1 -1
  702. package/dist/vue3/lib/rich-text-editor.cjs +1137 -1
  703. package/dist/vue3/lib/rich-text-editor.cjs.map +1 -1
  704. package/dist/vue3/lib/rich-text-editor.js +567 -386
  705. package/dist/vue3/lib/rich-text-editor.js.map +1 -1
  706. package/dist/vue3/lib/root-layout.cjs +158 -1
  707. package/dist/vue3/lib/root-layout.cjs.map +1 -1
  708. package/dist/vue3/lib/root-layout.js +33 -31
  709. package/dist/vue3/lib/root-layout.js.map +1 -1
  710. package/dist/vue3/lib/scroller.cjs +1090 -1
  711. package/dist/vue3/lib/scroller.cjs.map +1 -1
  712. package/dist/vue3/lib/scroller.js +668 -345
  713. package/dist/vue3/lib/scroller.js.map +1 -1
  714. package/dist/vue3/lib/select-menu.cjs +312 -1
  715. package/dist/vue3/lib/select-menu.cjs.map +1 -1
  716. package/dist/vue3/lib/select-menu.js +124 -79
  717. package/dist/vue3/lib/select-menu.js.map +1 -1
  718. package/dist/vue3/lib/settings-menu-button.cjs +77 -1
  719. package/dist/vue3/lib/settings-menu-button.cjs.map +1 -1
  720. package/dist/vue3/lib/settings-menu-button.js +31 -30
  721. package/dist/vue3/lib/settings-menu-button.js.map +1 -1
  722. package/dist/vue3/lib/skeleton.cjs +635 -1
  723. package/dist/vue3/lib/skeleton.cjs.map +1 -1
  724. package/dist/vue3/lib/skeleton.js +189 -152
  725. package/dist/vue3/lib/skeleton.js.map +1 -1
  726. package/dist/vue3/lib/stack.cjs +123 -1
  727. package/dist/vue3/lib/stack.cjs.map +1 -1
  728. package/dist/vue3/lib/stack.js +61 -53
  729. package/dist/vue3/lib/stack.js.map +1 -1
  730. package/dist/vue3/lib/tabs.cjs +102 -1
  731. package/dist/vue3/lib/tabs.cjs.map +1 -1
  732. package/dist/vue3/lib/tabs.js +47 -41
  733. package/dist/vue3/lib/tabs.js.map +1 -1
  734. package/dist/vue3/lib/time-pill.cjs +41 -1
  735. package/dist/vue3/lib/time-pill.cjs.map +1 -1
  736. package/dist/vue3/lib/time-pill.js +18 -14
  737. package/dist/vue3/lib/time-pill.js.map +1 -1
  738. package/dist/vue3/lib/toast.cjs +281 -1
  739. package/dist/vue3/lib/toast.cjs.map +1 -1
  740. package/dist/vue3/lib/toast.js +96 -74
  741. package/dist/vue3/lib/toast.js.map +1 -1
  742. package/dist/vue3/lib/toggle.cjs +192 -1
  743. package/dist/vue3/lib/toggle.cjs.map +1 -1
  744. package/dist/vue3/lib/toggle.js +60 -49
  745. package/dist/vue3/lib/toggle.js.map +1 -1
  746. package/dist/vue3/lib/tooltip-directive.cjs +84 -1
  747. package/dist/vue3/lib/tooltip-directive.cjs.map +1 -1
  748. package/dist/vue3/lib/tooltip-directive.js +56 -42
  749. package/dist/vue3/lib/tooltip-directive.js.map +1 -1
  750. package/dist/vue3/lib/tooltip.cjs +460 -1
  751. package/dist/vue3/lib/tooltip.cjs.map +1 -1
  752. package/dist/vue3/lib/tooltip.js +162 -103
  753. package/dist/vue3/lib/tooltip.js.map +1 -1
  754. package/dist/vue3/lib/top-banner-info.cjs +71 -1
  755. package/dist/vue3/lib/top-banner-info.cjs.map +1 -1
  756. package/dist/vue3/lib/top-banner-info.js +27 -22
  757. package/dist/vue3/lib/top-banner-info.js.map +1 -1
  758. package/dist/vue3/lib/unread-pill.cjs +73 -1
  759. package/dist/vue3/lib/unread-pill.cjs.map +1 -1
  760. package/dist/vue3/lib/unread-pill.js +28 -25
  761. package/dist/vue3/lib/unread-pill.js.map +1 -1
  762. package/dist/vue3/lib/validation-messages.cjs +89 -1
  763. package/dist/vue3/lib/validation-messages.cjs.map +1 -1
  764. package/dist/vue3/lib/validation-messages.js +41 -36
  765. package/dist/vue3/lib/validation-messages.js.map +1 -1
  766. package/dist/vue3/style.css +1257 -1
  767. package/dist/vue3/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +2 -2
  768. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +2 -2
  769. package/package.json +35 -35
  770. package/dist/vue2/chunks/_plugin-vue2_normalizer-ZK80B3OL.js +0 -2
  771. package/dist/vue2/chunks/_plugin-vue2_normalizer-ZK80B3OL.js.map +0 -1
  772. package/dist/vue2/chunks/_plugin-vue2_normalizer-u6G_3nkj.js +0 -33
  773. package/dist/vue2/chunks/_plugin-vue2_normalizer-u6G_3nkj.js.map +0 -1
  774. package/dist/vue2/chunks/dropdown-zhMEz3bn.js +0 -2
  775. package/dist/vue2/chunks/dropdown_constants-EUcDxBrX.js +0 -9
  776. package/dist/vue2/chunks/dropdown_constants-EUcDxBrX.js.map +0 -1
  777. package/dist/vue2/chunks/dropdown_constants-KHFvVI2L.js +0 -2
  778. package/dist/vue2/chunks/dropdown_constants-KHFvVI2L.js.map +0 -1
  779. package/dist/vue2/chunks/icon_constants-2S_OSQ1t.js +0 -2
  780. package/dist/vue2/chunks/index-2jPosQBn.js +0 -3
  781. package/dist/vue2/chunks/index-YkSDT8-g.js +0 -244
  782. package/dist/vue2/chunks/index-YkSDT8-g.js.map +0 -1
  783. package/dist/vue2/chunks/index-nIyl_PL6.js +0 -372
  784. package/dist/vue2/chunks/index-sdfB7Aok.js +0 -2
  785. package/dist/vue2/chunks/index-sdfB7Aok.js.map +0 -1
  786. package/dist/vue2/chunks/input-o-fc1X4b.js +0 -2
  787. package/dist/vue2/chunks/input_group-j2gTtc1C.js +0 -2
  788. package/dist/vue2/chunks/keyboard_list_navigation-F0O8nht0.js +0 -197
  789. package/dist/vue2/chunks/keyboard_list_navigation-N74Bpdq7.js +0 -2
  790. package/dist/vue2/chunks/link_constants-Kn6kP4i1.js +0 -2
  791. package/dist/vue2/chunks/link_constants-vIUB92L4.js +0 -16
  792. package/dist/vue2/chunks/list_item_constants-LTUc74pD.js +0 -13
  793. package/dist/vue2/chunks/list_item_constants-Tsz5CO1m.js +0 -2
  794. package/dist/vue2/chunks/modal-VuMFkZFH.js +0 -82
  795. package/dist/vue2/chunks/modal-qEzlo0Sj.js +0 -2
  796. package/dist/vue2/chunks/notice_action-9NmtQRai.js +0 -182
  797. package/dist/vue2/chunks/notice_action-u3ZKIhit.js +0 -2
  798. package/dist/vue2/chunks/notice_constants-c--hBFQw.js +0 -6
  799. package/dist/vue2/chunks/notice_constants-mC6al2Dm.js +0 -2
  800. package/dist/vue2/chunks/popover_constants-hOEhklvr.js +0 -2
  801. package/dist/vue2/chunks/popover_constants-qjlEkroB.js +0 -114
  802. package/dist/vue2/chunks/sr_only_close_button-ErijKGYR.js +0 -3
  803. package/dist/vue2/chunks/sr_only_close_button-JGole5Xi.js +0 -86
  804. package/dist/vue2/chunks/stack_constants-m9Ickqw0.js +0 -2
  805. package/dist/vue2/chunks/stack_constants-u7tNqGtc.js +0 -13
  806. package/dist/vue2/chunks/tab-7hJQSLFx.js +0 -2
  807. package/dist/vue2/chunks/tab-Qm9LVkYj.js +0 -346
  808. package/dist/vue2/lib/constants.cjs +0 -2
  809. package/dist/vue2/lib/dates.cjs +0 -2
  810. package/dist/vue2/lib/dates.js +0 -57
  811. package/dist/vue2/lib/mixins.cjs +0 -2
  812. package/dist/vue2/lib/mixins.js +0 -17
  813. package/dist/vue2/lib/utils.cjs +0 -2
  814. package/dist/vue2/lib/utils.js +0 -175
  815. package/dist/vue2/lib/validators.cjs +0 -2
  816. package/dist/vue2/lib/validators.js +0 -12
  817. package/dist/vue3/chunks/_plugin-vue_export-helper-6_y-gaV6.js +0 -2
  818. package/dist/vue3/chunks/_plugin-vue_export-helper-6_y-gaV6.js.map +0 -1
  819. package/dist/vue3/chunks/_plugin-vue_export-helper-hUChTQA_.js +0 -10
  820. package/dist/vue3/chunks/_plugin-vue_export-helper-hUChTQA_.js.map +0 -1
  821. package/dist/vue3/chunks/dropdown-UO3UJalk.js +0 -2
  822. package/dist/vue3/chunks/dropdown_constants-EUcDxBrX.js +0 -9
  823. package/dist/vue3/chunks/dropdown_constants-EUcDxBrX.js.map +0 -1
  824. package/dist/vue3/chunks/dropdown_constants-KHFvVI2L.js +0 -2
  825. package/dist/vue3/chunks/dropdown_constants-KHFvVI2L.js.map +0 -1
  826. package/dist/vue3/chunks/icon_constants-2S_OSQ1t.js +0 -2
  827. package/dist/vue3/chunks/index-6tYeqbgP.js +0 -3
  828. package/dist/vue3/chunks/index-IBtQ5jRJ.js +0 -2
  829. package/dist/vue3/chunks/index-IBtQ5jRJ.js.map +0 -1
  830. package/dist/vue3/chunks/index-b4iXYvId.js +0 -399
  831. package/dist/vue3/chunks/index-mRmwpCBG.js +0 -256
  832. package/dist/vue3/chunks/index-mRmwpCBG.js.map +0 -1
  833. package/dist/vue3/chunks/input-0Uksk4DP.js +0 -2
  834. package/dist/vue3/chunks/input_group-AS760Cp7.js +0 -2
  835. package/dist/vue3/chunks/keyboard_list_navigation-F0O8nht0.js +0 -197
  836. package/dist/vue3/chunks/keyboard_list_navigation-N74Bpdq7.js +0 -2
  837. package/dist/vue3/chunks/link_constants-Kn6kP4i1.js +0 -2
  838. package/dist/vue3/chunks/link_constants-vIUB92L4.js +0 -16
  839. package/dist/vue3/chunks/list_item_constants-LTUc74pD.js +0 -13
  840. package/dist/vue3/chunks/list_item_constants-Tsz5CO1m.js +0 -2
  841. package/dist/vue3/chunks/modal-VuMFkZFH.js +0 -82
  842. package/dist/vue3/chunks/modal-qEzlo0Sj.js +0 -2
  843. package/dist/vue3/chunks/notice_action-jO199emq.js +0 -2
  844. package/dist/vue3/chunks/notice_action-tJfD5Qw1.js +0 -209
  845. package/dist/vue3/chunks/notice_constants-c--hBFQw.js +0 -6
  846. package/dist/vue3/chunks/notice_constants-mC6al2Dm.js +0 -2
  847. package/dist/vue3/chunks/popover_constants-hOEhklvr.js +0 -2
  848. package/dist/vue3/chunks/popover_constants-qjlEkroB.js +0 -114
  849. package/dist/vue3/chunks/sr_only_close_button-iD7s1Pbj.js +0 -3
  850. package/dist/vue3/chunks/stack_constants-m9Ickqw0.js +0 -2
  851. package/dist/vue3/chunks/stack_constants-u7tNqGtc.js +0 -13
  852. package/dist/vue3/chunks/tab-GQZFMq83.js +0 -367
  853. package/dist/vue3/chunks/tab-at7WWglk.js +0 -2
  854. package/dist/vue3/lib/constants.cjs +0 -2
  855. package/dist/vue3/lib/dates.cjs +0 -2
  856. package/dist/vue3/lib/dates.js +0 -57
  857. package/dist/vue3/lib/mixins.cjs +0 -2
  858. package/dist/vue3/lib/mixins.js +0 -17
  859. package/dist/vue3/lib/utils.cjs +0 -2
  860. package/dist/vue3/lib/utils.js +0 -171
  861. package/dist/vue3/lib/validators.cjs +0 -2
  862. package/dist/vue3/lib/validators.js +0 -12
  863. /package/dist/vue2/{lib → common}/mixins.js.map +0 -0
  864. /package/dist/vue3/{lib → common}/mixins.js.map +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-multi-select.js","sources":["../../recipes/comboboxes/combobox_multi_select/combobox_multi_select_constants.js","../../recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue"],"sourcesContent":["export const MULTI_SELECT_SIZES = {\n // Chip has no 'lg' and 'xl' size. So we don't support that in multi-select.\n EXTRA_SMALL: 'xs',\n SMALL: 'sm',\n DEFAULT: 'md',\n};\n\nexport const CHIP_SIZES = {\n xs: 'xs',\n sm: 'xs',\n md: 'sm',\n};\n\nexport const CHIP_TOP_POSITION = {\n xs: 1.4,\n sm: 0.4,\n md: 0.2,\n};\n\nexport default {\n MULTI_SELECT_SIZES,\n CHIP_SIZES,\n CHIP_TOP_POSITION,\n};\n","<template>\n <dt-recipe-combobox-with-popover\n ref=\"comboboxWithPopover\"\n :label=\"label\"\n :show-list=\"showList\"\n :max-height=\"listMaxHeight\"\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 >\n <template #input=\"{ onInput }\">\n <span\n ref=\"inputSlotWrapper\"\n class=\"combobox__input-wrapper\"\n >\n <span\n ref=\"chipsWrapper\"\n class=\"combobox__chip-wrapper\"\n >\n <dt-chip\n v-for=\"item in selectedItems\"\n ref=\"chips\"\n :key=\"item\"\n :label-class=\"['d-chip__label']\"\n class=\"combobox__chip\"\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=\"combobox__input\"\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=\"$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 @mousedown.prevent\n >\n <slot\n v-if=\"!loading\"\n name=\"list\"\n />\n <div\n v-else\n class=\"combobox__list--loading\"\n >\n {{ loadingMessage }}\n </div>\n </div>\n </template>\n\n <!-- @slot slot for popover footer -->\n <template\n v-if=\"$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>\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 {\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 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 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 data () {\n return {\n value: '',\n popoverOffset: [0, 4],\n showValidationMessages: false,\n initialInputPadding: {},\n resizeWindowObserver: null,\n originalInputSize: null,\n CHIP_SIZES,\n };\n },\n\n computed: {\n inputPlaceHolder () {\n return this.selectedItems?.length > 0 ? '' : this.placeholder;\n },\n\n chipListeners () {\n return {\n ...this.$listeners,\n keyup: event => {\n this.onChipKeyup(event);\n this.$emit('keyup', event);\n },\n };\n },\n\n inputListeners () {\n return {\n ...this.$listeners,\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\n watch: {\n selectedItems: {\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.originalInputSize = input.getBoundingClientRect().height;\n this.setInputPadding();\n this.setChipsTopPosition();\n },\n },\n },\n\n mounted () {\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 beforeDestroy () {\n this.resizeWindowObserver?.unobserve(document.body);\n },\n\n methods: {\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 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 => chip.$el.querySelector('button'));\n },\n\n getChips () {\n return this.$refs.chips && this.$refs.chips.map(chip => 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\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 input.style.paddingLeft = left + 'px';\n\n // Get the chip size minus the 4px padding\n const chipsSize = chipsWrapper.getBoundingClientRect().height - 4;\n\n // Get lastChip offsetTop plus 2px of the input padding.\n const top = lastChip.offsetTop + 2;\n\n // Add padding to Top only if the chips need more space\n if (chipsSize > this.originalInputSize) {\n input.style.paddingTop = `${top}px`;\n }\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};\n</script>\n\n<style scoped lang=\"less\">\n.combobox__input-wrapper {\n position: relative;\n display: block;\n}\n\n.combobox__chip-wrapper {\n position: absolute;\n margin-left: var(--dt-space-200);\n margin-right: var(--dt-space-200);\n padding-left: var(--dt-space-100);\n max-width: calc(var(--dt-size-100-percent) - var(--dt-space-400));\n}\n\n.combobox__chip {\n margin-top: var(--dt-space-300);\n margin-left: var(--dt-space-200);\n margin-right: var(--dt-space-200);\n z-index: var(--zi-base1);\n max-width: var(--dt-size-100-percent);\n}\n\n.combobox__input {\n flex-grow: 1;\n}\n\n.combobox__list--loading {\n text-align: center;\n padding-top: var(--dt-space-500);\n padding-bottom: var(--dt-space-500);\n}\n</style>\n"],"names":["MULTI_SELECT_SIZES","CHIP_SIZES","CHIP_TOP_POSITION","_sfc_main","DtRecipeComboboxWithPopover","DtInput","DtChip","DtValidationMessages","SrOnlyCloseButtonMixin","inputMessages","validationMessageValidator","appendTo","POPOVER_APPEND_TO_VALUES","_a","event","input","item","i","chip","key","target","toLeft","from","to","inputSlotWrapper","top","chips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,SAAA,KAAA,eACA,KAAA,yBAAA,IACA,KAAA,MAAA,cAAA,KAEA,KAAA,yBAAA;AAAA,IAEA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"combobox-multi-select.js","sources":["../../recipes/comboboxes/combobox_multi_select/combobox_multi_select_constants.js","../../recipes/comboboxes/combobox_multi_select/combobox_multi_select.vue"],"sourcesContent":["export const MULTI_SELECT_SIZES = {\n // Chip has no 'lg' and 'xl' size. So we don't support that in multi-select.\n EXTRA_SMALL: 'xs',\n SMALL: 'sm',\n DEFAULT: 'md',\n};\n\nexport const CHIP_SIZES = {\n xs: 'xs',\n sm: 'xs',\n md: 'sm',\n};\n\nexport const CHIP_TOP_POSITION = {\n xs: 1.4,\n sm: 0.4,\n md: 0.2,\n};\n\nexport default {\n MULTI_SELECT_SIZES,\n CHIP_SIZES,\n CHIP_TOP_POSITION,\n};\n","<template>\n <dt-recipe-combobox-with-popover\n ref=\"comboboxWithPopover\"\n :label=\"label\"\n :show-list=\"showList\"\n :max-height=\"listMaxHeight\"\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 >\n <template #input=\"{ onInput }\">\n <span\n ref=\"inputSlotWrapper\"\n class=\"combobox__input-wrapper\"\n >\n <span\n ref=\"chipsWrapper\"\n class=\"combobox__chip-wrapper\"\n >\n <dt-chip\n v-for=\"item in selectedItems\"\n ref=\"chips\"\n :key=\"item\"\n :label-class=\"['d-chip__label']\"\n class=\"combobox__chip\"\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=\"combobox__input\"\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=\"$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 @mousedown.prevent\n >\n <slot\n v-if=\"!loading\"\n name=\"list\"\n />\n <div\n v-else\n class=\"combobox__list--loading\"\n >\n {{ loadingMessage }}\n </div>\n </div>\n </template>\n\n <!-- @slot slot for popover footer -->\n <template\n v-if=\"$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>\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 {\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 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 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 data () {\n return {\n value: '',\n popoverOffset: [0, 4],\n showValidationMessages: false,\n initialInputPadding: {},\n resizeWindowObserver: null,\n originalInputSize: null,\n CHIP_SIZES,\n };\n },\n\n computed: {\n inputPlaceHolder () {\n return this.selectedItems?.length > 0 ? '' : this.placeholder;\n },\n\n chipListeners () {\n return {\n ...this.$listeners,\n keyup: event => {\n this.onChipKeyup(event);\n this.$emit('keyup', event);\n },\n };\n },\n\n inputListeners () {\n return {\n ...this.$listeners,\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\n watch: {\n selectedItems: {\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.originalInputSize = input.getBoundingClientRect().height;\n this.setInputPadding();\n this.setChipsTopPosition();\n },\n },\n },\n\n mounted () {\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 beforeDestroy () {\n this.resizeWindowObserver?.unobserve(document.body);\n },\n\n methods: {\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 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 => chip.$el.querySelector('button'));\n },\n\n getChips () {\n return this.$refs.chips && this.$refs.chips.map(chip => 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\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 input.style.paddingLeft = left + 'px';\n\n // Get the chip size minus the 4px padding\n const chipsSize = chipsWrapper.getBoundingClientRect().height - 4;\n\n // Get lastChip offsetTop plus 2px of the input padding.\n const top = lastChip.offsetTop + 2;\n\n // Add padding to Top only if the chips need more space\n if (chipsSize > this.originalInputSize) {\n input.style.paddingTop = `${top}px`;\n }\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};\n</script>\n\n<style scoped lang=\"less\">\n.combobox__input-wrapper {\n position: relative;\n display: block;\n}\n\n.combobox__chip-wrapper {\n position: absolute;\n margin-left: var(--dt-space-200);\n margin-right: var(--dt-space-200);\n padding-left: var(--dt-space-100);\n max-width: calc(var(--dt-size-100-percent) - var(--dt-space-400));\n}\n\n.combobox__chip {\n margin-top: var(--dt-space-300);\n margin-left: var(--dt-space-200);\n margin-right: var(--dt-space-200);\n z-index: var(--zi-base1);\n max-width: var(--dt-size-100-percent);\n}\n\n.combobox__input {\n flex-grow: 1;\n}\n\n.combobox__list--loading {\n text-align: center;\n padding-top: var(--dt-space-500);\n padding-bottom: var(--dt-space-500);\n}\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAY,MAAC,qBAAqB;AAAA;AAAA,EAEhC,aAAa;AAAA,EACb,OAAO;AAAA,EACP,SAAS;AACX;AAEY,MAAC,aAAa;AAAA,EACxB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEY,MAAC,oBAAoB;AAAA,EAC/B,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;ACsGA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AA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,UAAA,CAAA;AAAA;AACA,WAAA,mBAAA,KAAA;AACA,WAAA,gBAAA,CAAA,GAAA,CAAA;AACA,UAAA,CAAA;AAAA;AAIA,YAAA,OAAA,SAAA,aAAA,KAAA,aAAA,QAAA;AACA,YAAA,MAAA,cAAA,OAAA;AAGA,YAAA,YAAA,aAAA,sBAAA,EAAA,SAAA;AAGA,YAAA,MAAA,SAAA,YAAA;AAGA,UAAA,YAAA,KAAA,mBAAA;AACA,cAAA,MAAA,aAAA,GAAA,GAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,mBAAA,OAAA;AACA,YAAA,MAAA,cAAA;AACA,YAAA,MAAA,aAAA;AACA,YAAA,MAAA,gBAAA;AAAA,IACA;AAAA,IAEA,aAAA,IAAA;AACA,YAAA,SAAA,OAAA,iBAAA,EAAA;AACA,aAAA,GAAA,cAAA,SAAA,OAAA,UAAA,IAAA,SAAA,OAAA,WAAA;AAAA,IACA;AAAA,IAEA,mBAAA;AAEA,YAAA,YAAA,KAAA;AACA,YAAA,QAAA,KAAA;AACA,UAAA,CAAA;AAAA;AACA,UAAA,WAAA;AAEA,cAAA,MAAA,WAAA,KAAA,aAAA,SAAA,IAAA,IAAA;AAAA,MACA,OAAA;AACA,cAAA,MAAA,WAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,mBAAA;AACA,UAAA,KAAA,gBAAA;AAAA;AACA,UAAA,KAAA,cAAA,SAAA,KAAA,aAAA;AACA,aAAA,yBAAA;AACA,aAAA,MAAA,cAAA;AAAA,MACA,OAAA;AACA,aAAA,yBAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,385 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../chunks/index-2jPosQBn.js"),u=require("./utils.cjs"),d=require("../chunks/sr_only_close_button-ErijKGYR.js"),c=require("../chunks/_plugin-vue2_normalizer-ZK80B3OL.js"),f=require("./popover.cjs"),a=require("../chunks/dropdown_constants-KHFvVI2L.js"),p=require("../chunks/popover_constants-hOEhklvr.js");require("../chunks/keyboard_list_navigation-N74Bpdq7.js");require("./list-item.cjs");require("../chunks/list_item_constants-Tsz5CO1m.js");require("./item-layout.cjs");require("./icon.cjs");require("@dialpad/dialtone-icons/vue2");require("../chunks/icon_constants-2S_OSQ1t.js");require("@dialpad/dialtone-icons/icons.json");require("./constants.cjs");require("vue");require("./skeleton.cjs");require("./button.cjs");require("../chunks/link_constants-Kn6kP4i1.js");require("@linusborg/vue-simple-portal");require("../chunks/modal-qEzlo0Sj.js");require("./lazy-show.cjs");require("tippy.js");const h={name:"DtRecipeComboboxWithPopover",components:{DtCombobox:l.D,DtPopover:f.DtPopover,ComboboxLoadingList:l.C,ComboboxEmptyList:l.a},mixins:[d.a],props:{label:{type:String,required:!0},labelVisible:{type:Boolean,default:!0},size:{type:String,default:null,validator:t=>Object.values(l.L).includes(t)},description:{type:String,default:""},showList:{type:Boolean,default:null},listId:{type:String,default(){return u.getUniqueString()}},listClass:{type:[String,Array,Object],default:""},onBeginningOfList:{type:Function,default:null},onEndOfList:{type:Function,default:null},maxHeight:{type:String,default:""},maxWidth:{type:String,default:""},padding:{type:String,default:"small",validator:t=>Object.keys(a.D).some(e=>e===t)},contentWidth:{type:String,default:null,validator:t=>p.c.includes(t)},openWithArrowKeys:{type:Boolean,default:!1},popoverOffset:{type:Array,default:()=>[0,4]},popoverSticky:{type:[Boolean,String],default:!1},hasSuggestionList:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},emptyList:{type:Boolean,default:!1},emptyStateMessage:{type:String,default:""},appendTo:{type:[HTMLElement,String],default:"body",validator:t=>p.e.includes(t)||t instanceof HTMLElement},transition:{type:String,default:"fade"}},emits:["select","escape","highlight","opened"],data(){return{DROPDOWN_PADDING_CLASSES:a.D,isListShown:!1,isInputFocused:!1,isListFocused:!1,externalAnchor:u.getUniqueString()}},computed:{comboboxListeners(){return{...this.$listeners,select:this.onSelect,escape:this.onEscape,highlight:this.onHighlight}}},watch:{showList:{handler:function(t){t!==null&&(this.isListShown=t)},immediate:!0},isListShown(t){t?window.addEventListener("mousedown",this.onFocusOut):window.removeEventListener("mousedown",this.onFocusOut),this.onOpened(t)}},methods:{handleDisplayList(t){!this.hasSuggestionList&&t&&this.showComboboxList(),!this.hasSuggestionList&&!t&&this.closeComboboxList()},showComboboxList(){this.showList==null&&(this.isListShown=!0)},closeComboboxList(){this.showList==null&&(this.isListShown=!1)},onSelect(t){this.loading||(this.$emit("select",t),this.hasSuggestionList||this.closeComboboxList())},onEscape(){this.$emit("escape"),this.closeComboboxList()},onHighlight(t){this.loading||this.$emit("highlight",t)},onOpened(t){this.$emit("opened",t)},onFocusIn(t){var e;this.hasSuggestionList&&t&&((e=this.$refs.input)==null?void 0:e.querySelector("input"))===t.target&&this.showComboboxList()},onFocusOut(t){var n,o,s;const e=(o=(n=this.$refs.popover)==null?void 0:n.tip)==null?void 0:o.popper,i=this.$refs.input;(s=t.composedPath())!=null&&s.some(r=>[e,i].includes(r))||this.closeComboboxList()},openOnArrowKeyPress(){this.showList!==null||this.isListShown||!this.openWithArrowKeys||this.showComboboxList()}}};var b=function(){var e=this,i=e._self._c;return i("dt-combobox",e._g({ref:"combobox",attrs:{loading:e.loading,label:e.label,"label-visible":e.labelVisible,size:e.size,description:e.description,"empty-list":e.emptyList,"empty-state-message":e.emptyStateMessage,"show-list":e.isListShown,"on-beginning-of-list":e.onBeginningOfList,"on-end-of-list":e.onEndOfList,"list-rendered-outside":!0,"list-id":e.listId,"data-qa":"dt-combobox"},scopedSlots:e._u([{key:"input",fn:function({inputProps:n}){return[i("div",{ref:"input",attrs:{id:e.externalAnchor},on:{focusin:e.onFocusIn,keydown:[function(o){return!o.type.indexOf("key")&&e._k(o.keyCode,"up",38,o.key,["Up","ArrowUp"])?null:e.openOnArrowKeyPress(o)},function(o){return!o.type.indexOf("key")&&e._k(o.keyCode,"down",40,o.key,["Down","ArrowDown"])?null:e.openOnArrowKeyPress(o)}]}},[e._t("input",null,{inputProps:n,onInput:e.handleDisplayList})],2)]}},{key:"list",fn:function({opened:n,listProps:o,clearHighlightIndex:s}){return[i("dt-popover",{ref:"popover",attrs:{open:e.isListShown,"hide-on-click":!1,"max-height":e.maxHeight,"max-width":e.maxWidth,offset:e.popoverOffset,sticky:e.popoverSticky,placement:"bottom-start","initial-focus-element":"none",padding:"none",role:"listbox","external-anchor":e.externalAnchor,"content-width":e.contentWidth,"content-appear":!0,"content-tabindex":null,modal:!1,"auto-focus":!1,"append-to":e.appendTo,transition:e.transition,"visually-hidden-close-label":e.visuallyHiddenCloseLabel,"visually-hidden-close":e.visuallyHiddenClose},on:{"update:open":function(r){e.isListShown=r},opened:function(r){return n(r,arguments[1])}},scopedSlots:e._u([e.$slots.header?{key:"headerContent",fn:function(){return[i("div",{ref:"header"},[e._t("header")],2)]},proxy:!0}:null,{key:"content",fn:function(){return[i("div",{ref:"listWrapper",class:[e.DROPDOWN_PADDING_CLASSES[e.padding],e.listClass],on:{mouseleave:s,focusout:s}},[e.loading?i("combobox-loading-list",e._b({},"combobox-loading-list",o,!1)):e.emptyList&&e.emptyStateMessage?i("combobox-empty-list",e._b({attrs:{message:e.emptyStateMessage}},"combobox-empty-list",o,!1)):e._t("list",null,{listProps:o})],2)]},proxy:!0},e.$slots.footer?{key:"footerContent",fn:function(){return[i("div",{ref:"footer"},[e._t("footer")],2)]},proxy:!0}:null],null,!0)})]}}],null,!0)},e.comboboxListeners))},m=[],y=c.n(h,b,m,!1,null,null,null,null);const g=y.exports;exports.DtRecipeComboboxWithPopover=g;
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const lib_combobox = require("../chunks/index-IA-Z8fgm.js");
4
+ const common_utils = require("../common/utils.cjs");
5
+ const sr_only_close_button = require("../chunks/sr_only_close_button-ZaGdAHz7.js");
6
+ const _pluginVue2_normalizer = require("../chunks/_plugin-vue2_normalizer-1aBeR4AK.js");
7
+ const lib_popover = require("./popover.cjs");
8
+ const dropdown_constants = require("../chunks/dropdown_constants-2pGCXy7m.js");
9
+ const popover_constants = require("../chunks/popover_constants-JwBF9h1Z.js");
10
+ require("../chunks/keyboard_list_navigation-fJnl_Iox.js");
11
+ require("./list-item.cjs");
12
+ require("../chunks/list_item_constants-EiqkqZvP.js");
13
+ require("./item-layout.cjs");
14
+ require("./icon.cjs");
15
+ require("@dialpad/dialtone-icons/vue2");
16
+ require("../chunks/icon_constants-QYpmdE0R.js");
17
+ require("@dialpad/dialtone-icons/icons.json");
18
+ require("../common/constants.cjs");
19
+ require("vue");
20
+ require("./skeleton.cjs");
21
+ require("./button.cjs");
22
+ require("../chunks/link_constants-Huj7D_hm.js");
23
+ require("@linusborg/vue-simple-portal");
24
+ require("../chunks/modal-VgxXAQFP.js");
25
+ require("./lazy-show.cjs");
26
+ require("tippy.js");
27
+ const _sfc_main = {
28
+ name: "DtRecipeComboboxWithPopover",
29
+ components: {
30
+ DtCombobox: lib_combobox.DtCombobox,
31
+ DtPopover: lib_popover.DtPopover,
32
+ ComboboxLoadingList: lib_combobox.ComboboxLoadingList,
33
+ ComboboxEmptyList: lib_combobox.ComboboxEmptyList
34
+ },
35
+ mixins: [sr_only_close_button.SrOnlyCloseButtonMixin],
36
+ props: {
37
+ /**
38
+ * String to use for the input label.
39
+ */
40
+ label: {
41
+ type: String,
42
+ required: true
43
+ },
44
+ /**
45
+ * Determines visibility of input label.
46
+ * @values true, false
47
+ */
48
+ labelVisible: {
49
+ type: Boolean,
50
+ default: true
51
+ },
52
+ /**
53
+ * Size of the input, one of `xs`, `sm`, `md`, `lg`, `xl`
54
+ * @values null, xs, sm, md, lg, xl
55
+ */
56
+ size: {
57
+ type: String,
58
+ default: null,
59
+ validator: (t) => Object.values(lib_combobox.LABEL_SIZES).includes(t)
60
+ },
61
+ /**
62
+ * Description for the input
63
+ */
64
+ description: {
65
+ type: String,
66
+ default: ""
67
+ },
68
+ /**
69
+ * Determines when to show the list element and also controls the aria-expanded attribute.
70
+ * Leaving this null will have the combobox trigger on input focus by default.
71
+ * If you set this value, the default trigger behavior will be disabled and you can
72
+ * control it as you need.
73
+ */
74
+ showList: {
75
+ type: Boolean,
76
+ default: null
77
+ },
78
+ /**
79
+ * Sets an ID on the list element of the component. Used by several aria attributes
80
+ * as well as when deriving the IDs for each item.
81
+ */
82
+ listId: {
83
+ type: String,
84
+ default() {
85
+ return common_utils.getUniqueString();
86
+ }
87
+ },
88
+ /**
89
+ * Additional class for the wrapper list element.
90
+ */
91
+ listClass: {
92
+ type: [String, Array, Object],
93
+ default: ""
94
+ },
95
+ /**
96
+ * A method that will be called when the selection goes past the beginning of the list.
97
+ */
98
+ onBeginningOfList: {
99
+ type: Function,
100
+ default: null
101
+ },
102
+ /**
103
+ * A method that will be called when the selection goes past the end of the list.
104
+ */
105
+ onEndOfList: {
106
+ type: Function,
107
+ default: null
108
+ },
109
+ /**
110
+ * Determines maximum height for the popover before overflow.
111
+ * Possible units rem|px|em
112
+ */
113
+ maxHeight: {
114
+ type: String,
115
+ default: ""
116
+ },
117
+ /**
118
+ * Determines maximum width for the popover before overflow.
119
+ * Possible units rem|px|%|em
120
+ */
121
+ maxWidth: {
122
+ type: String,
123
+ default: ""
124
+ },
125
+ /**
126
+ * Vertical padding size around the list element.
127
+ */
128
+ padding: {
129
+ type: String,
130
+ default: "small",
131
+ validator: (padding) => {
132
+ return Object.keys(dropdown_constants.DROPDOWN_PADDING_CLASSES).some((item) => item === padding);
133
+ }
134
+ },
135
+ /**
136
+ * Width configuration for the popover content. When its value is 'anchor',
137
+ * the popover content will have the same width as the anchor.
138
+ */
139
+ contentWidth: {
140
+ type: String,
141
+ default: null,
142
+ validator: (contentWidth) => popover_constants.POPOVER_CONTENT_WIDTHS.includes(contentWidth)
143
+ },
144
+ /**
145
+ * If the list should be shown by pressing up or down arrow key on the input element.
146
+ * This can be set when not passing showList prop.
147
+ */
148
+ openWithArrowKeys: {
149
+ type: Boolean,
150
+ default: false
151
+ },
152
+ /**
153
+ * Displaces the popover content box from its anchor element
154
+ * by the specified number of pixels.
155
+ */
156
+ popoverOffset: {
157
+ type: Array,
158
+ default: () => [0, 4]
159
+ },
160
+ /**
161
+ * If the popover sticks to the input.
162
+ */
163
+ popoverSticky: {
164
+ type: [Boolean, String],
165
+ default: false
166
+ },
167
+ /**
168
+ * Displays the list when the combobox is focused, before the user has typed anything.
169
+ * When this is enabled the list will not close after selection.
170
+ */
171
+ hasSuggestionList: {
172
+ type: Boolean,
173
+ default: true
174
+ },
175
+ /**
176
+ * Determines when to show the skeletons and also controls aria-busy attribute.
177
+ */
178
+ loading: {
179
+ type: Boolean,
180
+ default: false
181
+ },
182
+ /**
183
+ * Sets the list to an empty state, and displays the message from prop `emptyStateMessage`.
184
+ */
185
+ emptyList: {
186
+ type: Boolean,
187
+ default: false
188
+ },
189
+ /**
190
+ * Message to show when the list is empty
191
+ */
192
+ emptyStateMessage: {
193
+ type: String,
194
+ default: ""
195
+ },
196
+ /**
197
+ * Sets the element to which the popover is going to append to.
198
+ * 'body' will append to the nearest body (supports shadow DOM).
199
+ * @values 'body', 'parent', HTMLElement,
200
+ */
201
+ appendTo: {
202
+ type: [HTMLElement, String],
203
+ default: "body",
204
+ validator: (appendTo) => {
205
+ return popover_constants.POPOVER_APPEND_TO_VALUES.includes(appendTo) || appendTo instanceof HTMLElement;
206
+ }
207
+ },
208
+ /**
209
+ * Named transition when the content display is toggled.
210
+ * @see DtLazyShow
211
+ */
212
+ transition: {
213
+ type: String,
214
+ default: "fade"
215
+ }
216
+ },
217
+ emits: [
218
+ /**
219
+ * Event fired when item selected
220
+ *
221
+ * @event select
222
+ * @type {Number}
223
+ */
224
+ "select",
225
+ /**
226
+ * Event fired when 'escape' key is pressed
227
+ *
228
+ * @event escape
229
+ */
230
+ "escape",
231
+ /**
232
+ * Event fired when an item is highlighted
233
+ *
234
+ * @event highlight
235
+ * @type {Number}
236
+ */
237
+ "highlight",
238
+ /**
239
+ * Emitted when items are shown or hidden
240
+ *
241
+ * @event opened
242
+ * @type {Boolean | Array}
243
+ */
244
+ "opened"
245
+ ],
246
+ data() {
247
+ return {
248
+ DROPDOWN_PADDING_CLASSES: dropdown_constants.DROPDOWN_PADDING_CLASSES,
249
+ isListShown: false,
250
+ isInputFocused: false,
251
+ isListFocused: false,
252
+ externalAnchor: common_utils.getUniqueString()
253
+ };
254
+ },
255
+ computed: {
256
+ comboboxListeners() {
257
+ return {
258
+ ...this.$listeners,
259
+ select: this.onSelect,
260
+ escape: this.onEscape,
261
+ highlight: this.onHighlight
262
+ };
263
+ }
264
+ },
265
+ watch: {
266
+ showList: {
267
+ handler: function(show) {
268
+ if (show !== null) {
269
+ this.isListShown = show;
270
+ }
271
+ },
272
+ immediate: true
273
+ },
274
+ isListShown(val) {
275
+ if (val) {
276
+ window.addEventListener("mousedown", this.onFocusOut);
277
+ } else {
278
+ window.removeEventListener("mousedown", this.onFocusOut);
279
+ }
280
+ this.onOpened(val);
281
+ }
282
+ },
283
+ methods: {
284
+ handleDisplayList(value) {
285
+ if (!this.hasSuggestionList && value) {
286
+ this.showComboboxList();
287
+ }
288
+ if (!this.hasSuggestionList && !value) {
289
+ this.closeComboboxList();
290
+ }
291
+ },
292
+ showComboboxList() {
293
+ if (this.showList != null) {
294
+ return;
295
+ }
296
+ this.isListShown = true;
297
+ },
298
+ closeComboboxList() {
299
+ if (this.showList != null) {
300
+ return;
301
+ }
302
+ this.isListShown = false;
303
+ },
304
+ onSelect(highlightIndex) {
305
+ if (this.loading)
306
+ return;
307
+ this.$emit("select", highlightIndex);
308
+ if (!this.hasSuggestionList) {
309
+ this.closeComboboxList();
310
+ }
311
+ },
312
+ onEscape() {
313
+ this.$emit("escape");
314
+ this.closeComboboxList();
315
+ },
316
+ onHighlight(highlightIndex) {
317
+ if (this.loading)
318
+ return;
319
+ this.$emit("highlight", highlightIndex);
320
+ },
321
+ onOpened(opened) {
322
+ this.$emit("opened", opened);
323
+ },
324
+ onFocusIn(e) {
325
+ var _a;
326
+ if (this.hasSuggestionList && e && ((_a = this.$refs.input) == null ? void 0 : _a.querySelector("input")) === e.target) {
327
+ this.showComboboxList();
328
+ }
329
+ },
330
+ onFocusOut(e) {
331
+ var _a, _b, _c;
332
+ const popoverEl = (_b = (_a = this.$refs.popover) == null ? void 0 : _a.tip) == null ? void 0 : _b.popper;
333
+ const comboboxEl = this.$refs.input;
334
+ if ((_c = e.composedPath()) == null ? void 0 : _c.some((el) => [popoverEl, comboboxEl].includes(el)))
335
+ return;
336
+ this.closeComboboxList();
337
+ },
338
+ openOnArrowKeyPress() {
339
+ if (this.showList !== null || this.isListShown || !this.openWithArrowKeys) {
340
+ return;
341
+ }
342
+ this.showComboboxList();
343
+ }
344
+ }
345
+ };
346
+ var _sfc_render = function render() {
347
+ var _vm = this, _c = _vm._self._c;
348
+ return _c("dt-combobox", _vm._g({ ref: "combobox", attrs: { "loading": _vm.loading, "label": _vm.label, "label-visible": _vm.labelVisible, "size": _vm.size, "description": _vm.description, "empty-list": _vm.emptyList, "empty-state-message": _vm.emptyStateMessage, "show-list": _vm.isListShown, "on-beginning-of-list": _vm.onBeginningOfList, "on-end-of-list": _vm.onEndOfList, "list-rendered-outside": true, "list-id": _vm.listId, "data-qa": "dt-combobox" }, scopedSlots: _vm._u([{ key: "input", fn: function({ inputProps }) {
349
+ return [_c("div", { ref: "input", attrs: { "id": _vm.externalAnchor }, on: { "focusin": _vm.onFocusIn, "keydown": [function($event) {
350
+ if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "up", 38, $event.key, ["Up", "ArrowUp"]))
351
+ return null;
352
+ return _vm.openOnArrowKeyPress($event);
353
+ }, function($event) {
354
+ if (!$event.type.indexOf("key") && _vm._k($event.keyCode, "down", 40, $event.key, ["Down", "ArrowDown"]))
355
+ return null;
356
+ return _vm.openOnArrowKeyPress($event);
357
+ }] } }, [_vm._t("input", null, { "inputProps": inputProps, "onInput": _vm.handleDisplayList })], 2)];
358
+ } }, { key: "list", fn: function({ opened, listProps, clearHighlightIndex }) {
359
+ return [_c("dt-popover", { ref: "popover", attrs: { "open": _vm.isListShown, "hide-on-click": false, "max-height": _vm.maxHeight, "max-width": _vm.maxWidth, "offset": _vm.popoverOffset, "sticky": _vm.popoverSticky, "placement": "bottom-start", "initial-focus-element": "none", "padding": "none", "role": "listbox", "external-anchor": _vm.externalAnchor, "content-width": _vm.contentWidth, "content-appear": true, "content-tabindex": null, "modal": false, "auto-focus": false, "append-to": _vm.appendTo, "transition": _vm.transition, "visually-hidden-close-label": _vm.visuallyHiddenCloseLabel, "visually-hidden-close": _vm.visuallyHiddenClose }, on: { "update:open": function($event) {
360
+ _vm.isListShown = $event;
361
+ }, "opened": function($event) {
362
+ return opened($event, arguments[1]);
363
+ } }, scopedSlots: _vm._u([_vm.$slots.header ? { key: "headerContent", fn: function() {
364
+ return [_c("div", { ref: "header" }, [_vm._t("header")], 2)];
365
+ }, proxy: true } : null, { key: "content", fn: function() {
366
+ return [_c("div", { ref: "listWrapper", class: [_vm.DROPDOWN_PADDING_CLASSES[_vm.padding], _vm.listClass], on: { "mouseleave": clearHighlightIndex, "focusout": clearHighlightIndex } }, [_vm.loading ? _c("combobox-loading-list", _vm._b({}, "combobox-loading-list", listProps, false)) : _vm.emptyList && _vm.emptyStateMessage ? _c("combobox-empty-list", _vm._b({ attrs: { "message": _vm.emptyStateMessage } }, "combobox-empty-list", listProps, false)) : _vm._t("list", null, { "listProps": listProps })], 2)];
367
+ }, proxy: true }, _vm.$slots.footer ? { key: "footerContent", fn: function() {
368
+ return [_c("div", { ref: "footer" }, [_vm._t("footer")], 2)];
369
+ }, proxy: true } : null], null, true) })];
370
+ } }], null, true) }, _vm.comboboxListeners));
371
+ };
372
+ var _sfc_staticRenderFns = [];
373
+ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
374
+ _sfc_main,
375
+ _sfc_render,
376
+ _sfc_staticRenderFns,
377
+ false,
378
+ null,
379
+ null,
380
+ null,
381
+ null
382
+ );
383
+ const DtRecipeComboboxWithPopover = __component__.exports;
384
+ exports.DtRecipeComboboxWithPopover = DtRecipeComboboxWithPopover;
2
385
  //# sourceMappingURL=combobox-with-popover.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-with-popover.cjs","sources":["../../recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue"],"sourcesContent":["<template>\n <dt-combobox\n ref=\"combobox\"\n :loading=\"loading\"\n :label=\"label\"\n :label-visible=\"labelVisible\"\n :size=\"size\"\n :description=\"description\"\n :empty-list=\"emptyList\"\n :empty-state-message=\"emptyStateMessage\"\n :show-list=\"isListShown\"\n :on-beginning-of-list=\"onBeginningOfList\"\n :on-end-of-list=\"onEndOfList\"\n :list-rendered-outside=\"true\"\n :list-id=\"listId\"\n data-qa=\"dt-combobox\"\n v-on=\"comboboxListeners\"\n >\n <template\n #input=\"{ inputProps }\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"externalAnchor\"\n ref=\"input\"\n @focusin=\"onFocusIn\"\n @keydown.up=\"openOnArrowKeyPress($event)\"\n @keydown.down=\"openOnArrowKeyPress($event)\"\n >\n <slot\n name=\"input\"\n :input-props=\"inputProps\"\n :on-input=\"handleDisplayList\"\n />\n </div>\n </template>\n <template #list=\"{ opened, listProps, clearHighlightIndex }\">\n <dt-popover\n ref=\"popover\"\n :open.sync=\"isListShown\"\n :hide-on-click=\"false\"\n :max-height=\"maxHeight\"\n :max-width=\"maxWidth\"\n :offset=\"popoverOffset\"\n :sticky=\"popoverSticky\"\n placement=\"bottom-start\"\n initial-focus-element=\"none\"\n padding=\"none\"\n role=\"listbox\"\n :external-anchor=\"externalAnchor\"\n :content-width=\"contentWidth\"\n :content-appear=\"true\"\n :content-tabindex=\"null\"\n :modal=\"false\"\n :auto-focus=\"false\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n @opened=\"opened($event, arguments[1]);\"\n >\n <template\n v-if=\"$slots.header\"\n #headerContent\n >\n <div\n ref=\"header\"\n >\n <slot name=\"header\" />\n </div>\n </template>\n\n <template #content>\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"listWrapper\"\n :class=\"[DROPDOWN_PADDING_CLASSES[padding], listClass]\"\n @mouseleave=\"clearHighlightIndex\"\n @focusout=\"clearHighlightIndex\"\n >\n <combobox-loading-list\n v-if=\"loading\"\n v-bind=\"listProps\"\n />\n <combobox-empty-list\n v-else-if=\"emptyList && emptyStateMessage\"\n v-bind=\"listProps\"\n :message=\"emptyStateMessage\"\n />\n <slot\n v-else\n name=\"list\"\n :list-props=\"listProps\"\n />\n </div>\n </template>\n\n <template\n v-if=\"$slots.footer\"\n #footerContent\n >\n <div\n ref=\"footer\"\n >\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-popover>\n </template>\n </dt-combobox>\n</template>\n\n<script>\nimport ComboboxLoadingList from '@/components/combobox/combobox_loading-list.vue';\nimport ComboboxEmptyList from '@/components/combobox/combobox_empty-list.vue';\nimport { DtCombobox, LABEL_SIZES } from '@/components/combobox';\nimport { DtPopover, POPOVER_APPEND_TO_VALUES, POPOVER_CONTENT_WIDTHS } from '@/components/popover';\nimport { getUniqueString } from '@/common/utils';\nimport { DROPDOWN_PADDING_CLASSES } from '@/components/dropdown';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\nexport default {\n name: 'DtRecipeComboboxWithPopover',\n\n components: {\n DtCombobox,\n DtPopover,\n ComboboxLoadingList,\n ComboboxEmptyList,\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 * Size of the input, one of `xs`, `sm`, `md`, `lg`, `xl`\n * @values null, xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: null,\n validator: (t) => Object.values(LABEL_SIZES).includes(t),\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\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 * Sets an ID on the list element of the component. Used by several aria attributes\n * as well as when deriving the IDs for each item.\n */\n listId: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Additional class for the wrapper list element.\n */\n listClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A method that will be called when the selection goes past the beginning of the list.\n */\n onBeginningOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * A method that will be called when the selection goes past the end of the list.\n */\n onEndOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Vertical padding size around the list element.\n */\n padding: {\n type: String,\n default: 'small',\n validator: (padding) => {\n return Object.keys(DROPDOWN_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n */\n contentWidth: {\n type: String,\n default: null,\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * If the list should be shown by pressing up or down arrow key on the input element.\n * This can be set when not passing showList prop.\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the popover content box from its anchor element\n * by the specified number of pixels.\n */\n popoverOffset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * If the popover sticks to the input.\n */\n popoverSticky: {\n type: [Boolean, String],\n default: false,\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 * Determines when to show the skeletons and also controls aria-busy attribute.\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the list to an empty state, and displays the message from prop `emptyStateMessage`.\n */\n emptyList: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Message to show when the list is empty\n */\n emptyStateMessage: {\n type: String,\n default: '',\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 emits: [\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when 'escape' key is pressed\n *\n * @event escape\n */\n 'escape',\n\n /**\n * Event fired when an item is highlighted\n *\n * @event highlight\n * @type {Number}\n */\n 'highlight',\n\n /**\n * Emitted when items are shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n ],\n\n data () {\n return {\n DROPDOWN_PADDING_CLASSES,\n isListShown: false,\n isInputFocused: false,\n isListFocused: false,\n externalAnchor: getUniqueString(),\n };\n },\n\n computed: {\n comboboxListeners () {\n return {\n ...this.$listeners,\n\n select: this.onSelect,\n\n escape: this.onEscape,\n\n highlight: this.onHighlight,\n };\n },\n },\n\n watch: {\n showList: {\n handler: function (show) {\n if (show !== null) {\n this.isListShown = show;\n }\n },\n\n immediate: true,\n },\n\n isListShown (val) {\n if (val) {\n window.addEventListener('mousedown', this.onFocusOut);\n } else {\n window.removeEventListener('mousedown', this.onFocusOut);\n }\n this.onOpened(val);\n },\n },\n\n methods: {\n handleDisplayList (value) {\n if (!this.hasSuggestionList && value) { this.showComboboxList(); }\n if (!this.hasSuggestionList && !value) { this.closeComboboxList(); }\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = true;\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = false;\n },\n\n onSelect (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('select', highlightIndex);\n if (!this.hasSuggestionList) {\n // we don't display the list before the user has typed anything\n this.closeComboboxList();\n }\n },\n\n onEscape () {\n this.$emit('escape');\n this.closeComboboxList();\n },\n\n onHighlight (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('highlight', highlightIndex);\n },\n\n onOpened (opened) {\n this.$emit('opened', opened);\n },\n\n onFocusIn (e) {\n if (this.hasSuggestionList && e && this.$refs.input?.querySelector('input') === e.target) {\n // only trigger if we show suggestion list when focused, and\n // it's the input specifically that was focused\n this.showComboboxList();\n }\n },\n\n onFocusOut (e) {\n // Check if the focus change was to another target within the combobox component\n const popoverEl = this.$refs.popover?.tip?.popper;\n const comboboxEl = this.$refs.input;\n\n if (e.composedPath()?.some(el => [popoverEl, comboboxEl].includes(el))) return;\n\n // If outside the combobox then close\n this.closeComboboxList();\n },\n\n openOnArrowKeyPress () {\n if (this.showList !== null || this.isListShown || !this.openWithArrowKeys) { return; }\n\n this.showComboboxList();\n },\n },\n};\n</script>\n"],"names":["_sfc_main","DtCombobox","DtPopover","ComboboxLoadingList","ComboboxEmptyList","SrOnlyCloseButtonMixin","LABEL_SIZES","getUniqueString","padding","DROPDOWN_PADDING_CLASSES","item","contentWidth","POPOVER_CONTENT_WIDTHS","appendTo","POPOVER_APPEND_TO_VALUES","show","val","value","highlightIndex","opened","e","_a","popoverEl","_b","comboboxEl","_c","el"],"mappings":"89BAyHA,MAAAA,EAAA,CACA,KAAA,8BAEA,WAAA,CACA,WAAAC,EAAA,EACA,UAAAC,EAAA,UACA,oBAAAC,EAAA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AAA,MAAA,UAAA,YAAAA,EAAA,MAAA,YAAAE,EAAA,OACAC,EAAA,KAAA,MAAA,OAEAC,EAAAL,EAAA,iBAAA,MAAAK,EAAA,KAAAC,GAAA,CAAAJ,EAAAE,CAAA,EAAA,SAAAE,CAAA,IAGA,KAAA,kBAAA,CACA,EAEA,qBAAA,CACA,KAAA,WAAA,MAAA,KAAA,aAAA,CAAA,KAAA,mBAEA,KAAA,iBAAA,CACA,CACA,CACA"}
1
+ {"version":3,"file":"combobox-with-popover.cjs","sources":["../../recipes/comboboxes/combobox_with_popover/combobox_with_popover.vue"],"sourcesContent":["<template>\n <dt-combobox\n ref=\"combobox\"\n :loading=\"loading\"\n :label=\"label\"\n :label-visible=\"labelVisible\"\n :size=\"size\"\n :description=\"description\"\n :empty-list=\"emptyList\"\n :empty-state-message=\"emptyStateMessage\"\n :show-list=\"isListShown\"\n :on-beginning-of-list=\"onBeginningOfList\"\n :on-end-of-list=\"onEndOfList\"\n :list-rendered-outside=\"true\"\n :list-id=\"listId\"\n data-qa=\"dt-combobox\"\n v-on=\"comboboxListeners\"\n >\n <template\n #input=\"{ inputProps }\"\n >\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n :id=\"externalAnchor\"\n ref=\"input\"\n @focusin=\"onFocusIn\"\n @keydown.up=\"openOnArrowKeyPress($event)\"\n @keydown.down=\"openOnArrowKeyPress($event)\"\n >\n <slot\n name=\"input\"\n :input-props=\"inputProps\"\n :on-input=\"handleDisplayList\"\n />\n </div>\n </template>\n <template #list=\"{ opened, listProps, clearHighlightIndex }\">\n <dt-popover\n ref=\"popover\"\n :open.sync=\"isListShown\"\n :hide-on-click=\"false\"\n :max-height=\"maxHeight\"\n :max-width=\"maxWidth\"\n :offset=\"popoverOffset\"\n :sticky=\"popoverSticky\"\n placement=\"bottom-start\"\n initial-focus-element=\"none\"\n padding=\"none\"\n role=\"listbox\"\n :external-anchor=\"externalAnchor\"\n :content-width=\"contentWidth\"\n :content-appear=\"true\"\n :content-tabindex=\"null\"\n :modal=\"false\"\n :auto-focus=\"false\"\n :append-to=\"appendTo\"\n :transition=\"transition\"\n :visually-hidden-close-label=\"visuallyHiddenCloseLabel\"\n :visually-hidden-close=\"visuallyHiddenClose\"\n @opened=\"opened($event, arguments[1]);\"\n >\n <template\n v-if=\"$slots.header\"\n #headerContent\n >\n <div\n ref=\"header\"\n >\n <slot name=\"header\" />\n </div>\n </template>\n\n <template #content>\n <!-- eslint-disable-next-line vuejs-accessibility/no-static-element-interactions -->\n <div\n ref=\"listWrapper\"\n :class=\"[DROPDOWN_PADDING_CLASSES[padding], listClass]\"\n @mouseleave=\"clearHighlightIndex\"\n @focusout=\"clearHighlightIndex\"\n >\n <combobox-loading-list\n v-if=\"loading\"\n v-bind=\"listProps\"\n />\n <combobox-empty-list\n v-else-if=\"emptyList && emptyStateMessage\"\n v-bind=\"listProps\"\n :message=\"emptyStateMessage\"\n />\n <slot\n v-else\n name=\"list\"\n :list-props=\"listProps\"\n />\n </div>\n </template>\n\n <template\n v-if=\"$slots.footer\"\n #footerContent\n >\n <div\n ref=\"footer\"\n >\n <slot name=\"footer\" />\n </div>\n </template>\n </dt-popover>\n </template>\n </dt-combobox>\n</template>\n\n<script>\nimport ComboboxLoadingList from '@/components/combobox/combobox_loading-list.vue';\nimport ComboboxEmptyList from '@/components/combobox/combobox_empty-list.vue';\nimport { DtCombobox, LABEL_SIZES } from '@/components/combobox';\nimport { DtPopover, POPOVER_APPEND_TO_VALUES, POPOVER_CONTENT_WIDTHS } from '@/components/popover';\nimport { getUniqueString } from '@/common/utils';\nimport { DROPDOWN_PADDING_CLASSES } from '@/components/dropdown';\nimport SrOnlyCloseButtonMixin from '@/common/mixins/sr_only_close_button';\n\nexport default {\n name: 'DtRecipeComboboxWithPopover',\n\n components: {\n DtCombobox,\n DtPopover,\n ComboboxLoadingList,\n ComboboxEmptyList,\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 * Size of the input, one of `xs`, `sm`, `md`, `lg`, `xl`\n * @values null, xs, sm, md, lg, xl\n */\n size: {\n type: String,\n default: null,\n validator: (t) => Object.values(LABEL_SIZES).includes(t),\n },\n\n /**\n * Description for the input\n */\n description: {\n type: String,\n default: '',\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 * Sets an ID on the list element of the component. Used by several aria attributes\n * as well as when deriving the IDs for each item.\n */\n listId: {\n type: String,\n default () { return getUniqueString(); },\n },\n\n /**\n * Additional class for the wrapper list element.\n */\n listClass: {\n type: [String, Array, Object],\n default: '',\n },\n\n /**\n * A method that will be called when the selection goes past the beginning of the list.\n */\n onBeginningOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * A method that will be called when the selection goes past the end of the list.\n */\n onEndOfList: {\n type: Function,\n default: null,\n },\n\n /**\n * Determines maximum height for the popover before overflow.\n * Possible units rem|px|em\n */\n maxHeight: {\n type: String,\n default: '',\n },\n\n /**\n * Determines maximum width for the popover before overflow.\n * Possible units rem|px|%|em\n */\n maxWidth: {\n type: String,\n default: '',\n },\n\n /**\n * Vertical padding size around the list element.\n */\n padding: {\n type: String,\n default: 'small',\n validator: (padding) => {\n return Object.keys(DROPDOWN_PADDING_CLASSES).some((item) => item === padding);\n },\n },\n\n /**\n * Width configuration for the popover content. When its value is 'anchor',\n * the popover content will have the same width as the anchor.\n */\n contentWidth: {\n type: String,\n default: null,\n validator: contentWidth => POPOVER_CONTENT_WIDTHS.includes(contentWidth),\n },\n\n /**\n * If the list should be shown by pressing up or down arrow key on the input element.\n * This can be set when not passing showList prop.\n */\n openWithArrowKeys: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Displaces the popover content box from its anchor element\n * by the specified number of pixels.\n */\n popoverOffset: {\n type: Array,\n default: () => [0, 4],\n },\n\n /**\n * If the popover sticks to the input.\n */\n popoverSticky: {\n type: [Boolean, String],\n default: false,\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 * Determines when to show the skeletons and also controls aria-busy attribute.\n */\n loading: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Sets the list to an empty state, and displays the message from prop `emptyStateMessage`.\n */\n emptyList: {\n type: Boolean,\n default: false,\n },\n\n /**\n * Message to show when the list is empty\n */\n emptyStateMessage: {\n type: String,\n default: '',\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 emits: [\n /**\n * Event fired when item selected\n *\n * @event select\n * @type {Number}\n */\n 'select',\n\n /**\n * Event fired when 'escape' key is pressed\n *\n * @event escape\n */\n 'escape',\n\n /**\n * Event fired when an item is highlighted\n *\n * @event highlight\n * @type {Number}\n */\n 'highlight',\n\n /**\n * Emitted when items are shown or hidden\n *\n * @event opened\n * @type {Boolean | Array}\n */\n 'opened',\n ],\n\n data () {\n return {\n DROPDOWN_PADDING_CLASSES,\n isListShown: false,\n isInputFocused: false,\n isListFocused: false,\n externalAnchor: getUniqueString(),\n };\n },\n\n computed: {\n comboboxListeners () {\n return {\n ...this.$listeners,\n\n select: this.onSelect,\n\n escape: this.onEscape,\n\n highlight: this.onHighlight,\n };\n },\n },\n\n watch: {\n showList: {\n handler: function (show) {\n if (show !== null) {\n this.isListShown = show;\n }\n },\n\n immediate: true,\n },\n\n isListShown (val) {\n if (val) {\n window.addEventListener('mousedown', this.onFocusOut);\n } else {\n window.removeEventListener('mousedown', this.onFocusOut);\n }\n this.onOpened(val);\n },\n },\n\n methods: {\n handleDisplayList (value) {\n if (!this.hasSuggestionList && value) { this.showComboboxList(); }\n if (!this.hasSuggestionList && !value) { this.closeComboboxList(); }\n },\n\n showComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = true;\n },\n\n closeComboboxList () {\n if (this.showList != null) { return; }\n this.isListShown = false;\n },\n\n onSelect (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('select', highlightIndex);\n if (!this.hasSuggestionList) {\n // we don't display the list before the user has typed anything\n this.closeComboboxList();\n }\n },\n\n onEscape () {\n this.$emit('escape');\n this.closeComboboxList();\n },\n\n onHighlight (highlightIndex) {\n if (this.loading) return;\n\n this.$emit('highlight', highlightIndex);\n },\n\n onOpened (opened) {\n this.$emit('opened', opened);\n },\n\n onFocusIn (e) {\n if (this.hasSuggestionList && e && this.$refs.input?.querySelector('input') === e.target) {\n // only trigger if we show suggestion list when focused, and\n // it's the input specifically that was focused\n this.showComboboxList();\n }\n },\n\n onFocusOut (e) {\n // Check if the focus change was to another target within the combobox component\n const popoverEl = this.$refs.popover?.tip?.popper;\n const comboboxEl = this.$refs.input;\n\n if (e.composedPath()?.some(el => [popoverEl, comboboxEl].includes(el))) return;\n\n // If outside the combobox then close\n this.closeComboboxList();\n },\n\n openOnArrowKeyPress () {\n if (this.showList !== null || this.isListShown || !this.openWithArrowKeys) { return; }\n\n this.showComboboxList();\n },\n },\n};\n</script>\n"],"names":["DtCombobox","DtPopover","ComboboxLoadingList","ComboboxEmptyList","SrOnlyCloseButtonMixin","LABEL_SIZES","getUniqueString","DROPDOWN_PADDING_CLASSES","POPOVER_CONTENT_WIDTHS","POPOVER_APPEND_TO_VALUES"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAyHA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