@dialpad/dialtone-vue 3.120.0 → 3.120.2

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 (425) hide show
  1. package/dist/chunks/_plugin-vue_export-helper-caHeSgYY.js +11 -0
  2. package/dist/chunks/_plugin-vue_export-helper-caHeSgYY.js.map +1 -0
  3. package/dist/chunks/_plugin-vue_export-helper-fhnQq0tA.js +10 -0
  4. package/dist/chunks/_plugin-vue_export-helper-fhnQq0tA.js.map +1 -0
  5. package/dist/chunks/{dropdown-eWOvBvwq.js → dropdown-Hn-TeTvZ.js} +151 -104
  6. package/dist/chunks/{dropdown-UO3UJalk.js.map → dropdown-Hn-TeTvZ.js.map} +1 -1
  7. package/dist/chunks/dropdown-w8Do29L5.js +442 -0
  8. package/dist/chunks/{dropdown-eWOvBvwq.js.map → dropdown-w8Do29L5.js.map} +1 -1
  9. package/dist/chunks/dropdown_constants-2pGCXy7m.js +8 -0
  10. package/dist/chunks/dropdown_constants-2pGCXy7m.js.map +1 -0
  11. package/dist/chunks/dropdown_constants-w1MXGC3Z.js +9 -0
  12. package/dist/chunks/dropdown_constants-w1MXGC3Z.js.map +1 -0
  13. package/dist/chunks/{icon_constants-OpYAAKwF.js → icon_constants-Dy4MEUJL.js} +7 -6
  14. package/dist/chunks/{icon_constants-2S_OSQ1t.js.map → icon_constants-Dy4MEUJL.js.map} +1 -1
  15. package/dist/chunks/icon_constants-QYpmdE0R.js +16 -0
  16. package/dist/chunks/{icon_constants-OpYAAKwF.js.map → icon_constants-QYpmdE0R.js.map} +1 -1
  17. package/dist/chunks/index-4qgKeErp.js +446 -0
  18. package/dist/chunks/{index-b4iXYvId.js.map → index-4qgKeErp.js.map} +1 -1
  19. package/dist/chunks/index-b_MgDylR.js +447 -0
  20. package/dist/chunks/{index-6tYeqbgP.js.map → index-b_MgDylR.js.map} +1 -1
  21. package/dist/chunks/{input-4UQWegUk.js → input-NmYDD5bn.js} +83 -60
  22. package/dist/chunks/{input-0Uksk4DP.js.map → input-NmYDD5bn.js.map} +1 -1
  23. package/dist/chunks/input-ttnte8zB.js +295 -0
  24. package/dist/chunks/{input-4UQWegUk.js.map → input-ttnte8zB.js.map} +1 -1
  25. package/dist/chunks/input_group-M-D25pOJ.js +152 -0
  26. package/dist/chunks/{input_group-bBKaq3Wi.js.map → input_group-M-D25pOJ.js.map} +1 -1
  27. package/dist/chunks/{input_group-bBKaq3Wi.js → input_group-jWnq2DJT.js} +27 -24
  28. package/dist/chunks/{input_group-AS760Cp7.js.map → input_group-jWnq2DJT.js.map} +1 -1
  29. package/dist/chunks/keyboard_list_navigation-ScXhrxya.js +284 -0
  30. package/dist/chunks/{keyboard_list_navigation-N74Bpdq7.js.map → keyboard_list_navigation-ScXhrxya.js.map} +1 -1
  31. package/dist/chunks/keyboard_list_navigation-fJnl_Iox.js +283 -0
  32. package/dist/chunks/{keyboard_list_navigation-F0O8nht0.js.map → keyboard_list_navigation-fJnl_Iox.js.map} +1 -1
  33. package/dist/chunks/link_constants-Huj7D_hm.js +22 -0
  34. package/dist/chunks/{link_constants-Kn6kP4i1.js.map → link_constants-Huj7D_hm.js.map} +1 -1
  35. package/dist/chunks/link_constants-nWVlXQBs.js +23 -0
  36. package/dist/chunks/{link_constants-vIUB92L4.js.map → link_constants-nWVlXQBs.js.map} +1 -1
  37. package/dist/chunks/list_item_constants-EiqkqZvP.js +13 -0
  38. package/dist/chunks/{list_item_constants-Tsz5CO1m.js.map → list_item_constants-EiqkqZvP.js.map} +1 -1
  39. package/dist/chunks/list_item_constants-u1xcN9Dd.js +14 -0
  40. package/dist/chunks/{list_item_constants-LTUc74pD.js.map → list_item_constants-u1xcN9Dd.js.map} +1 -1
  41. package/dist/chunks/modal-VgxXAQFP.js +105 -0
  42. package/dist/chunks/{modal-qEzlo0Sj.js.map → modal-VgxXAQFP.js.map} +1 -1
  43. package/dist/chunks/modal-XOr4kiNZ.js +106 -0
  44. package/dist/chunks/{modal-VuMFkZFH.js.map → modal-XOr4kiNZ.js.map} +1 -1
  45. package/dist/chunks/notice_action-WTucGhvr.js +222 -0
  46. package/dist/chunks/{notice_action-tJfD5Qw1.js.map → notice_action-WTucGhvr.js.map} +1 -1
  47. package/dist/chunks/notice_action-p-ePanW_.js +223 -0
  48. package/dist/chunks/{notice_action-jO199emq.js.map → notice_action-p-ePanW_.js.map} +1 -1
  49. package/dist/chunks/notice_constants-7Qt2CQEY.js +7 -0
  50. package/dist/chunks/{notice_constants-mC6al2Dm.js.map → notice_constants-7Qt2CQEY.js.map} +1 -1
  51. package/dist/chunks/notice_constants-UXo9e3bS.js +6 -0
  52. package/dist/chunks/{notice_constants-c--hBFQw.js.map → notice_constants-UXo9e3bS.js.map} +1 -1
  53. package/dist/chunks/popover_constants-JwBF9h1Z.js +143 -0
  54. package/dist/chunks/{popover_constants-hOEhklvr.js.map → popover_constants-JwBF9h1Z.js.map} +1 -1
  55. package/dist/chunks/popover_constants-Qkpb0yh2.js +144 -0
  56. package/dist/chunks/{popover_constants-qjlEkroB.js.map → popover_constants-Qkpb0yh2.js.map} +1 -1
  57. package/dist/chunks/{sr_only_close_button-7O-Ev8uM.js → sr_only_close_button-3EdsV-dH.js} +28 -24
  58. package/dist/chunks/{sr_only_close_button-iD7s1Pbj.js.map → sr_only_close_button-3EdsV-dH.js.map} +1 -1
  59. package/dist/chunks/sr_only_close_button-xGrHFjwA.js +91 -0
  60. package/dist/chunks/{sr_only_close_button-7O-Ev8uM.js.map → sr_only_close_button-xGrHFjwA.js.map} +1 -1
  61. package/dist/chunks/stack_constants-HraCekPm.js +15 -0
  62. package/dist/chunks/{stack_constants-m9Ickqw0.js.map → stack_constants-HraCekPm.js.map} +1 -1
  63. package/dist/chunks/stack_constants-SMzMWnAQ.js +14 -0
  64. package/dist/chunks/{stack_constants-u7tNqGtc.js.map → stack_constants-SMzMWnAQ.js.map} +1 -1
  65. package/dist/chunks/tab-RTDgnD9-.js +391 -0
  66. package/dist/chunks/{tab-at7WWglk.js.map → tab-RTDgnD9-.js.map} +1 -1
  67. package/dist/chunks/tab-qc3f42Yp.js +390 -0
  68. package/dist/chunks/{tab-GQZFMq83.js.map → tab-qc3f42Yp.js.map} +1 -1
  69. package/dist/common/constants.cjs +60 -0
  70. package/dist/{lib → common}/constants.cjs.map +1 -1
  71. package/dist/{lib → common}/constants.js +25 -18
  72. package/dist/{lib → common}/constants.js.map +1 -1
  73. package/dist/common/dates.cjs +72 -0
  74. package/dist/{lib → common}/dates.cjs.map +1 -1
  75. package/dist/common/dates.js +72 -0
  76. package/dist/{lib → common}/dates.js.map +1 -1
  77. package/dist/common/emoji.cjs +163 -0
  78. package/dist/common/emoji.cjs.map +1 -0
  79. package/dist/common/emoji.js +168 -0
  80. package/dist/common/emoji.js.map +1 -0
  81. package/dist/common/mixins.cjs +17 -0
  82. package/dist/{lib → common}/mixins.cjs.map +1 -1
  83. package/dist/common/mixins.js +17 -0
  84. package/dist/common/utils.cjs +243 -0
  85. package/dist/{lib → common}/utils.cjs.map +1 -1
  86. package/dist/common/utils.js +243 -0
  87. package/dist/{lib → common}/utils.js.map +1 -1
  88. package/dist/common/validators.cjs +23 -0
  89. package/dist/{lib → common}/validators.cjs.map +1 -1
  90. package/dist/common/validators.js +23 -0
  91. package/dist/{lib → common}/validators.js.map +1 -1
  92. package/dist/dialtone-vue.cjs +373 -1
  93. package/dist/dialtone-vue.cjs.map +1 -1
  94. package/dist/dialtone-vue.js +328 -327
  95. package/dist/dialtone-vue.js.map +1 -1
  96. package/dist/lib/attachment-carousel.cjs +345 -1
  97. package/dist/lib/attachment-carousel.cjs.map +1 -1
  98. package/dist/lib/attachment-carousel.js +126 -108
  99. package/dist/lib/attachment-carousel.js.map +1 -1
  100. package/dist/lib/avatar.cjs +447 -1
  101. package/dist/lib/avatar.cjs.map +1 -1
  102. package/dist/lib/avatar.js +135 -101
  103. package/dist/lib/avatar.js.map +1 -1
  104. package/dist/lib/badge.cjs +206 -1
  105. package/dist/lib/badge.cjs.map +1 -1
  106. package/dist/lib/badge.js +64 -48
  107. package/dist/lib/badge.js.map +1 -1
  108. package/dist/lib/banner.cjs +242 -2
  109. package/dist/lib/banner.cjs.map +1 -1
  110. package/dist/lib/banner.js +81 -71
  111. package/dist/lib/banner.js.map +1 -1
  112. package/dist/lib/breadcrumbs.cjs +150 -1
  113. package/dist/lib/breadcrumbs.cjs.map +1 -1
  114. package/dist/lib/breadcrumbs.js +60 -52
  115. package/dist/lib/breadcrumbs.js.map +1 -1
  116. package/dist/lib/button-group.cjs +41 -1
  117. package/dist/lib/button-group.cjs.map +1 -1
  118. package/dist/lib/button-group.js +15 -14
  119. package/dist/lib/button-group.js.map +1 -1
  120. package/dist/lib/button.cjs +356 -1
  121. package/dist/lib/button.cjs.map +1 -1
  122. package/dist/lib/button.js +108 -88
  123. package/dist/lib/button.js.map +1 -1
  124. package/dist/lib/callbar-button-with-popover.cjs +322 -1
  125. package/dist/lib/callbar-button-with-popover.cjs.map +1 -1
  126. package/dist/lib/callbar-button-with-popover.js +101 -83
  127. package/dist/lib/callbar-button-with-popover.js.map +1 -1
  128. package/dist/lib/callbar-button.cjs +200 -1
  129. package/dist/lib/callbar-button.cjs.map +1 -1
  130. package/dist/lib/callbar-button.js +52 -45
  131. package/dist/lib/callbar-button.js.map +1 -1
  132. package/dist/lib/callbox.cjs +217 -1
  133. package/dist/lib/callbox.cjs.map +1 -1
  134. package/dist/lib/callbox.js +80 -67
  135. package/dist/lib/callbox.js.map +1 -1
  136. package/dist/lib/card.cjs +91 -1
  137. package/dist/lib/card.cjs.map +1 -1
  138. package/dist/lib/card.js +27 -27
  139. package/dist/lib/card.js.map +1 -1
  140. package/dist/lib/checkbox-group.cjs +115 -1
  141. package/dist/lib/checkbox-group.cjs.map +1 -1
  142. package/dist/lib/checkbox-group.js +34 -23
  143. package/dist/lib/checkbox-group.js.map +1 -1
  144. package/dist/lib/checkbox.cjs +156 -1
  145. package/dist/lib/checkbox.cjs.map +1 -1
  146. package/dist/lib/checkbox.js +72 -60
  147. package/dist/lib/checkbox.js.map +1 -1
  148. package/dist/lib/chip.cjs +235 -1
  149. package/dist/lib/chip.cjs.map +1 -1
  150. package/dist/lib/chip.js +84 -67
  151. package/dist/lib/chip.js.map +1 -1
  152. package/dist/lib/codeblock.cjs +23 -2
  153. package/dist/lib/codeblock.cjs.map +1 -1
  154. package/dist/lib/codeblock.js +13 -13
  155. package/dist/lib/codeblock.js.map +1 -1
  156. package/dist/lib/collapsible.cjs +398 -1
  157. package/dist/lib/collapsible.cjs.map +1 -1
  158. package/dist/lib/collapsible.js +123 -100
  159. package/dist/lib/collapsible.js.map +1 -1
  160. package/dist/lib/combobox-multi-select.cjs +589 -1
  161. package/dist/lib/combobox-multi-select.cjs.map +1 -1
  162. package/dist/lib/combobox-multi-select.js +270 -177
  163. package/dist/lib/combobox-multi-select.js.map +1 -1
  164. package/dist/lib/combobox-with-popover.cjs +452 -1
  165. package/dist/lib/combobox-with-popover.cjs.map +1 -1
  166. package/dist/lib/combobox-with-popover.js +172 -127
  167. package/dist/lib/combobox-with-popover.js.map +1 -1
  168. package/dist/lib/combobox.cjs +18 -1
  169. package/dist/lib/combobox.cjs.map +1 -1
  170. package/dist/lib/combobox.js +9 -9
  171. package/dist/lib/contact-info.cjs +205 -1
  172. package/dist/lib/contact-info.cjs.map +1 -1
  173. package/dist/lib/contact-info.js +69 -60
  174. package/dist/lib/contact-info.js.map +1 -1
  175. package/dist/lib/contact-row.cjs +246 -1
  176. package/dist/lib/contact-row.cjs.map +1 -1
  177. package/dist/lib/contact-row.js +67 -63
  178. package/dist/lib/contact-row.js.map +1 -1
  179. package/dist/lib/datepicker.cjs +854 -1
  180. package/dist/lib/datepicker.cjs.map +1 -1
  181. package/dist/lib/datepicker.js +585 -441
  182. package/dist/lib/datepicker.js.map +1 -1
  183. package/dist/lib/description-list.cjs +116 -1
  184. package/dist/lib/description-list.cjs.map +1 -1
  185. package/dist/lib/description-list.js +56 -24
  186. package/dist/lib/description-list.js.map +1 -1
  187. package/dist/lib/dropdown.cjs +36 -1
  188. package/dist/lib/dropdown.cjs.map +1 -1
  189. package/dist/lib/dropdown.js +22 -21
  190. package/dist/lib/dropdown.js.map +1 -1
  191. package/dist/lib/editor.cjs +711 -1
  192. package/dist/lib/editor.cjs.map +1 -1
  193. package/dist/lib/editor.js +271 -235
  194. package/dist/lib/editor.js.map +1 -1
  195. package/dist/lib/emoji-picker.cjs +1277 -1
  196. package/dist/lib/emoji-picker.cjs.map +1 -1
  197. package/dist/lib/emoji-picker.js +859 -569
  198. package/dist/lib/emoji-picker.js.map +1 -1
  199. package/dist/lib/emoji-row.cjs +128 -1
  200. package/dist/lib/emoji-row.cjs.map +1 -1
  201. package/dist/lib/emoji-row.js +89 -75
  202. package/dist/lib/emoji-row.js.map +1 -1
  203. package/dist/lib/emoji-text-wrapper.cjs +102 -1
  204. package/dist/lib/emoji-text-wrapper.cjs.map +1 -1
  205. package/dist/lib/emoji-text-wrapper.js +42 -31
  206. package/dist/lib/emoji-text-wrapper.js.map +1 -1
  207. package/dist/lib/emoji.cjs +158 -1
  208. package/dist/lib/emoji.cjs.map +1 -1
  209. package/dist/lib/emoji.js +153 -6
  210. package/dist/lib/emoji.js.map +1 -1
  211. package/dist/lib/feed-item-row.cjs +296 -1
  212. package/dist/lib/feed-item-row.cjs.map +1 -1
  213. package/dist/lib/feed-item-row.js +119 -100
  214. package/dist/lib/feed-item-row.js.map +1 -1
  215. package/dist/lib/feed-pill.cjs +173 -1
  216. package/dist/lib/feed-pill.cjs.map +1 -1
  217. package/dist/lib/feed-pill.js +70 -57
  218. package/dist/lib/feed-pill.js.map +1 -1
  219. package/dist/lib/general-row.cjs +518 -1
  220. package/dist/lib/general-row.cjs.map +1 -1
  221. package/dist/lib/general-row.js +186 -148
  222. package/dist/lib/general-row.js.map +1 -1
  223. package/dist/lib/group-row.cjs +116 -1
  224. package/dist/lib/group-row.cjs.map +1 -1
  225. package/dist/lib/group-row.js +37 -35
  226. package/dist/lib/group-row.js.map +1 -1
  227. package/dist/lib/grouped-chip.cjs +96 -1
  228. package/dist/lib/grouped-chip.cjs.map +1 -1
  229. package/dist/lib/grouped-chip.js +51 -46
  230. package/dist/lib/grouped-chip.js.map +1 -1
  231. package/dist/lib/hovercard.cjs +223 -1
  232. package/dist/lib/hovercard.cjs.map +1 -1
  233. package/dist/lib/hovercard.js +115 -80
  234. package/dist/lib/hovercard.js.map +1 -1
  235. package/dist/lib/icon.cjs +58 -1
  236. package/dist/lib/icon.cjs.map +1 -1
  237. package/dist/lib/icon.js +20 -20
  238. package/dist/lib/icon.js.map +1 -1
  239. package/dist/lib/image-viewer.cjs +243 -1
  240. package/dist/lib/image-viewer.cjs.map +1 -1
  241. package/dist/lib/image-viewer.js +104 -80
  242. package/dist/lib/image-viewer.js.map +1 -1
  243. package/dist/lib/input-group.cjs +91 -1
  244. package/dist/lib/input-group.cjs.map +1 -1
  245. package/dist/lib/input-group.js +41 -39
  246. package/dist/lib/input-group.js.map +1 -1
  247. package/dist/lib/input.cjs +578 -1
  248. package/dist/lib/input.cjs.map +1 -1
  249. package/dist/lib/input.js +185 -137
  250. package/dist/lib/input.js.map +1 -1
  251. package/dist/lib/item-layout.cjs +91 -1
  252. package/dist/lib/item-layout.cjs.map +1 -1
  253. package/dist/lib/item-layout.js +45 -39
  254. package/dist/lib/item-layout.js.map +1 -1
  255. package/dist/lib/ivr-node.cjs +263 -1
  256. package/dist/lib/ivr-node.cjs.map +1 -1
  257. package/dist/lib/ivr-node.js +130 -112
  258. package/dist/lib/ivr-node.js.map +1 -1
  259. package/dist/lib/keyboard-shortcut.cjs +119 -1
  260. package/dist/lib/keyboard-shortcut.cjs.map +1 -1
  261. package/dist/lib/keyboard-shortcut.js +58 -48
  262. package/dist/lib/keyboard-shortcut.js.map +1 -1
  263. package/dist/lib/lazy-show.cjs +82 -1
  264. package/dist/lib/lazy-show.cjs.map +1 -1
  265. package/dist/lib/lazy-show.js +21 -19
  266. package/dist/lib/lazy-show.js.map +1 -1
  267. package/dist/lib/link.cjs +43 -1
  268. package/dist/lib/link.cjs.map +1 -1
  269. package/dist/lib/link.js +20 -19
  270. package/dist/lib/link.js.map +1 -1
  271. package/dist/lib/list-item-group.cjs +67 -1
  272. package/dist/lib/list-item-group.cjs.map +1 -1
  273. package/dist/lib/list-item-group.js +24 -22
  274. package/dist/lib/list-item-group.js.map +1 -1
  275. package/dist/lib/list-item.cjs +216 -1
  276. package/dist/lib/list-item.cjs.map +1 -1
  277. package/dist/lib/list-item.js +71 -60
  278. package/dist/lib/list-item.js.map +1 -1
  279. package/dist/lib/message-input.cjs +708 -1
  280. package/dist/lib/message-input.cjs.map +1 -1
  281. package/dist/lib/message-input.js +232 -206
  282. package/dist/lib/message-input.js.map +1 -1
  283. package/dist/lib/modal.cjs +444 -2
  284. package/dist/lib/modal.cjs.map +1 -1
  285. package/dist/lib/modal.js +153 -120
  286. package/dist/lib/modal.js.map +1 -1
  287. package/dist/lib/notice.cjs +197 -1
  288. package/dist/lib/notice.cjs.map +1 -1
  289. package/dist/lib/notice.js +66 -63
  290. package/dist/lib/notice.js.map +1 -1
  291. package/dist/lib/pagination.cjs +205 -1
  292. package/dist/lib/pagination.cjs.map +1 -1
  293. package/dist/lib/pagination.js +96 -81
  294. package/dist/lib/pagination.js.map +1 -1
  295. package/dist/lib/popover.cjs +1080 -1
  296. package/dist/lib/popover.cjs.map +1 -1
  297. package/dist/lib/popover.js +447 -267
  298. package/dist/lib/popover.js.map +1 -1
  299. package/dist/lib/presence.cjs +70 -1
  300. package/dist/lib/presence.cjs.map +1 -1
  301. package/dist/lib/presence.js +33 -27
  302. package/dist/lib/presence.js.map +1 -1
  303. package/dist/lib/radio-group.cjs +88 -1
  304. package/dist/lib/radio-group.cjs.map +1 -1
  305. package/dist/lib/radio-group.js +18 -18
  306. package/dist/lib/radio-group.js.map +1 -1
  307. package/dist/lib/radio.cjs +162 -1
  308. package/dist/lib/radio.cjs.map +1 -1
  309. package/dist/lib/radio.js +66 -57
  310. package/dist/lib/radio.js.map +1 -1
  311. package/dist/lib/rich-text-editor.cjs +1137 -1
  312. package/dist/lib/rich-text-editor.cjs.map +1 -1
  313. package/dist/lib/rich-text-editor.js +567 -386
  314. package/dist/lib/rich-text-editor.js.map +1 -1
  315. package/dist/lib/root-layout.cjs +158 -1
  316. package/dist/lib/root-layout.cjs.map +1 -1
  317. package/dist/lib/root-layout.js +33 -31
  318. package/dist/lib/root-layout.js.map +1 -1
  319. package/dist/lib/scroller.cjs +1090 -1
  320. package/dist/lib/scroller.cjs.map +1 -1
  321. package/dist/lib/scroller.js +668 -345
  322. package/dist/lib/scroller.js.map +1 -1
  323. package/dist/lib/select-menu.cjs +312 -1
  324. package/dist/lib/select-menu.cjs.map +1 -1
  325. package/dist/lib/select-menu.js +124 -79
  326. package/dist/lib/select-menu.js.map +1 -1
  327. package/dist/lib/settings-menu-button.cjs +77 -1
  328. package/dist/lib/settings-menu-button.cjs.map +1 -1
  329. package/dist/lib/settings-menu-button.js +31 -30
  330. package/dist/lib/settings-menu-button.js.map +1 -1
  331. package/dist/lib/skeleton.cjs +635 -1
  332. package/dist/lib/skeleton.cjs.map +1 -1
  333. package/dist/lib/skeleton.js +189 -152
  334. package/dist/lib/skeleton.js.map +1 -1
  335. package/dist/lib/stack.cjs +123 -1
  336. package/dist/lib/stack.cjs.map +1 -1
  337. package/dist/lib/stack.js +61 -53
  338. package/dist/lib/stack.js.map +1 -1
  339. package/dist/lib/tabs.cjs +102 -1
  340. package/dist/lib/tabs.cjs.map +1 -1
  341. package/dist/lib/tabs.js +47 -41
  342. package/dist/lib/tabs.js.map +1 -1
  343. package/dist/lib/time-pill.cjs +41 -1
  344. package/dist/lib/time-pill.cjs.map +1 -1
  345. package/dist/lib/time-pill.js +18 -14
  346. package/dist/lib/time-pill.js.map +1 -1
  347. package/dist/lib/toast.cjs +281 -1
  348. package/dist/lib/toast.cjs.map +1 -1
  349. package/dist/lib/toast.js +96 -74
  350. package/dist/lib/toast.js.map +1 -1
  351. package/dist/lib/toggle.cjs +192 -1
  352. package/dist/lib/toggle.cjs.map +1 -1
  353. package/dist/lib/toggle.js +60 -49
  354. package/dist/lib/toggle.js.map +1 -1
  355. package/dist/lib/tooltip-directive.cjs +84 -1
  356. package/dist/lib/tooltip-directive.cjs.map +1 -1
  357. package/dist/lib/tooltip-directive.js +56 -42
  358. package/dist/lib/tooltip-directive.js.map +1 -1
  359. package/dist/lib/tooltip.cjs +460 -1
  360. package/dist/lib/tooltip.cjs.map +1 -1
  361. package/dist/lib/tooltip.js +162 -103
  362. package/dist/lib/tooltip.js.map +1 -1
  363. package/dist/lib/top-banner-info.cjs +71 -1
  364. package/dist/lib/top-banner-info.cjs.map +1 -1
  365. package/dist/lib/top-banner-info.js +27 -22
  366. package/dist/lib/top-banner-info.js.map +1 -1
  367. package/dist/lib/unread-pill.cjs +73 -1
  368. package/dist/lib/unread-pill.cjs.map +1 -1
  369. package/dist/lib/unread-pill.js +28 -25
  370. package/dist/lib/unread-pill.js.map +1 -1
  371. package/dist/lib/validation-messages.cjs +89 -1
  372. package/dist/lib/validation-messages.cjs.map +1 -1
  373. package/dist/lib/validation-messages.js +41 -36
  374. package/dist/lib/validation-messages.js.map +1 -1
  375. package/dist/style.css +1257 -1
  376. package/dist/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +2 -2
  377. package/dist/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +2 -2
  378. package/package.json +30 -29
  379. package/dist/chunks/_plugin-vue_export-helper-6_y-gaV6.js +0 -2
  380. package/dist/chunks/_plugin-vue_export-helper-6_y-gaV6.js.map +0 -1
  381. package/dist/chunks/_plugin-vue_export-helper-hUChTQA_.js +0 -10
  382. package/dist/chunks/_plugin-vue_export-helper-hUChTQA_.js.map +0 -1
  383. package/dist/chunks/dropdown-UO3UJalk.js +0 -2
  384. package/dist/chunks/dropdown_constants-EUcDxBrX.js +0 -9
  385. package/dist/chunks/dropdown_constants-EUcDxBrX.js.map +0 -1
  386. package/dist/chunks/dropdown_constants-KHFvVI2L.js +0 -2
  387. package/dist/chunks/dropdown_constants-KHFvVI2L.js.map +0 -1
  388. package/dist/chunks/icon_constants-2S_OSQ1t.js +0 -2
  389. package/dist/chunks/index-6tYeqbgP.js +0 -3
  390. package/dist/chunks/index-IBtQ5jRJ.js +0 -2
  391. package/dist/chunks/index-IBtQ5jRJ.js.map +0 -1
  392. package/dist/chunks/index-b4iXYvId.js +0 -399
  393. package/dist/chunks/index-mRmwpCBG.js +0 -256
  394. package/dist/chunks/index-mRmwpCBG.js.map +0 -1
  395. package/dist/chunks/input-0Uksk4DP.js +0 -2
  396. package/dist/chunks/input_group-AS760Cp7.js +0 -2
  397. package/dist/chunks/keyboard_list_navigation-F0O8nht0.js +0 -197
  398. package/dist/chunks/keyboard_list_navigation-N74Bpdq7.js +0 -2
  399. package/dist/chunks/link_constants-Kn6kP4i1.js +0 -2
  400. package/dist/chunks/link_constants-vIUB92L4.js +0 -16
  401. package/dist/chunks/list_item_constants-LTUc74pD.js +0 -13
  402. package/dist/chunks/list_item_constants-Tsz5CO1m.js +0 -2
  403. package/dist/chunks/modal-VuMFkZFH.js +0 -82
  404. package/dist/chunks/modal-qEzlo0Sj.js +0 -2
  405. package/dist/chunks/notice_action-jO199emq.js +0 -2
  406. package/dist/chunks/notice_action-tJfD5Qw1.js +0 -209
  407. package/dist/chunks/notice_constants-c--hBFQw.js +0 -6
  408. package/dist/chunks/notice_constants-mC6al2Dm.js +0 -2
  409. package/dist/chunks/popover_constants-hOEhklvr.js +0 -2
  410. package/dist/chunks/popover_constants-qjlEkroB.js +0 -114
  411. package/dist/chunks/sr_only_close_button-iD7s1Pbj.js +0 -3
  412. package/dist/chunks/stack_constants-m9Ickqw0.js +0 -2
  413. package/dist/chunks/stack_constants-u7tNqGtc.js +0 -13
  414. package/dist/chunks/tab-GQZFMq83.js +0 -367
  415. package/dist/chunks/tab-at7WWglk.js +0 -2
  416. package/dist/lib/constants.cjs +0 -2
  417. package/dist/lib/dates.cjs +0 -2
  418. package/dist/lib/dates.js +0 -57
  419. package/dist/lib/mixins.cjs +0 -2
  420. package/dist/lib/mixins.js +0 -17
  421. package/dist/lib/utils.cjs +0 -2
  422. package/dist/lib/utils.js +0 -171
  423. package/dist/lib/validators.cjs +0 -2
  424. package/dist/lib/validators.js +0 -12
  425. /package/dist/{lib → common}/mixins.js.map +0 -0
@@ -1,29 +1,31 @@
1
- import { ref as p, onMounted as ae, openBlock as y, createElementBlock as _, createVNode as F, unref as T, withKeys as U, withModifiers as ue, createSlots as Se, withCtx as H, createElementVNode as w, computed as B, toRefs as _e, watch as W, Fragment as z, renderList as Y, createBlock as je, nextTick as x, onUnmounted as Re, toDisplayString as J, withDirectives as oe, createCommentVNode as le, vShow as se, normalizeClass as ce, watchEffect as re, createTextVNode as fe } from "vue";
2
- import { DtInput as Te } from "./input.js";
3
- import { DtIcon as ne } from "./icon.js";
4
- import { D as we, a as Ee } from "../chunks/tab-GQZFMq83.js";
5
- import { emojisGrouped as I } from "@dialpad/dialtone-emojis";
6
- import { DtTooltip as $e } from "./tooltip.js";
7
- import "./constants.js";
8
- import "./utils.js";
9
- import "../chunks/input-4UQWegUk.js";
10
- import "./validators.js";
11
- import "../chunks/_plugin-vue_export-helper-hUChTQA_.js";
1
+ import { ref, onMounted, openBlock, createElementBlock, createVNode, unref, withKeys, withModifiers, createSlots, withCtx, createElementVNode, computed, toRefs, watch, Fragment, renderList, createBlock, nextTick, onUnmounted, toDisplayString, withDirectives, createCommentVNode, vShow, normalizeClass, watchEffect, createTextVNode } from "vue";
2
+ import { DtInput } from "./input.js";
3
+ import { DtIcon } from "./icon.js";
4
+ import { DtTabGroup, DtTab } from "../chunks/tab-RTDgnD9-.js";
5
+ import { emojisGrouped } from "@dialpad/dialtone-emojis";
6
+ import { DtTooltip } from "./tooltip.js";
7
+ import "../common/constants.js";
8
+ import "../common/utils.js";
9
+ import "../chunks/input-NmYDD5bn.js";
10
+ import "../common/validators.js";
11
+ import "../chunks/_plugin-vue_export-helper-caHeSgYY.js";
12
12
  import "./validation-messages.js";
13
13
  import "@dialpad/dialtone-icons/vue3";
14
- import "../chunks/icon_constants-OpYAAKwF.js";
14
+ import "../chunks/icon_constants-Dy4MEUJL.js";
15
15
  import "@dialpad/dialtone-icons/icons.json";
16
16
  import "./button.js";
17
- import "../chunks/link_constants-vIUB92L4.js";
18
- import "../chunks/popover_constants-qjlEkroB.js";
17
+ import "../chunks/link_constants-nWVlXQBs.js";
18
+ import "../chunks/popover_constants-Qkpb0yh2.js";
19
19
  import "tippy.js";
20
20
  import "./lazy-show.js";
21
- const Le = { class: "d-emoji-picker__search d-emoji-picker__alignment" }, Ae = ["onKeydown"], Ie = {
21
+ const _hoisted_1$5 = { class: "d-emoji-picker__search d-emoji-picker__alignment" };
22
+ const _hoisted_2$4 = ["onKeydown"];
23
+ const _sfc_main$5 = {
22
24
  __name: "emoji_search",
23
25
  props: {
24
26
  searchPlaceholderLabel: {
25
27
  type: String,
26
- required: !0
28
+ required: true
27
29
  },
28
30
  modelValue: {
29
31
  type: String,
@@ -31,57 +33,65 @@ const Le = { class: "d-emoji-picker__search d-emoji-picker__alignment" }, Ae = [
31
33
  }
32
34
  },
33
35
  emits: ["update:modelValue", "focus-emoji-selector", "focus-tabset", "select-first-emoji"],
34
- setup(o, { expose: k, emit: L }) {
35
- const i = L, u = p(null);
36
- function R() {
37
- i("update:modelValue", ""), h();
38
- }
39
- function h() {
40
- u.value.focus();
41
- }
42
- return ae(() => {
43
- h();
44
- }), k({
45
- focusSearchInput: h
46
- }), (S, c) => (y(), _("div", Le, [
47
- F(T(Te), {
48
- id: "searchInput",
49
- ref_key: "searchInput",
50
- ref: u,
51
- placeholder: o.searchPlaceholderLabel,
52
- "model-value": o.modelValue,
53
- "onUpdate:modelValue": c[0] || (c[0] = (s) => S.$emit("update:modelValue", s)),
54
- onKeydown: [
55
- c[1] || (c[1] = U((s) => S.$emit("focus-tabset"), ["up"])),
56
- c[2] || (c[2] = U(ue((s) => S.$emit("focus-emoji-selector"), ["prevent"]), ["down"])),
57
- c[3] || (c[3] = U((s) => S.$emit("select-first-emoji"), ["enter"]))
58
- ]
59
- }, Se({
60
- leftIcon: H(() => [
61
- F(T(ne), {
62
- name: "search",
63
- size: "200"
64
- })
65
- ]),
66
- _: 2
67
- }, [
68
- o.modelValue.length > 0 ? {
69
- name: "rightIcon",
70
- fn: H(() => [
71
- w("button", {
72
- class: "d-emoji-picker__search-button",
73
- onClick: R,
74
- onKeydown: U(R, ["enter"])
75
- }, [
76
- F(T(ne), { name: "close" })
77
- ], 40, Ae)
36
+ setup(__props, { expose: __expose, emit: __emit }) {
37
+ const emits = __emit;
38
+ const searchInput = ref(null);
39
+ function clearSearch() {
40
+ emits("update:modelValue", "");
41
+ focusSearchInput();
42
+ }
43
+ function focusSearchInput() {
44
+ searchInput.value.focus();
45
+ }
46
+ onMounted(() => {
47
+ focusSearchInput();
48
+ });
49
+ __expose({
50
+ focusSearchInput
51
+ });
52
+ return (_ctx, _cache) => {
53
+ return openBlock(), createElementBlock("div", _hoisted_1$5, [
54
+ createVNode(unref(DtInput), {
55
+ id: "searchInput",
56
+ ref_key: "searchInput",
57
+ ref: searchInput,
58
+ placeholder: __props.searchPlaceholderLabel,
59
+ "model-value": __props.modelValue,
60
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event)),
61
+ onKeydown: [
62
+ _cache[1] || (_cache[1] = withKeys(($event) => _ctx.$emit("focus-tabset"), ["up"])),
63
+ _cache[2] || (_cache[2] = withKeys(withModifiers(($event) => _ctx.$emit("focus-emoji-selector"), ["prevent"]), ["down"])),
64
+ _cache[3] || (_cache[3] = withKeys(($event) => _ctx.$emit("select-first-emoji"), ["enter"]))
65
+ ]
66
+ }, createSlots({
67
+ leftIcon: withCtx(() => [
68
+ createVNode(unref(DtIcon), {
69
+ name: "search",
70
+ size: "200"
71
+ })
78
72
  ]),
79
- key: "0"
80
- } : void 0
81
- ]), 1032, ["placeholder", "model-value"])
82
- ]));
73
+ _: 2
74
+ }, [
75
+ __props.modelValue.length > 0 ? {
76
+ name: "rightIcon",
77
+ fn: withCtx(() => [
78
+ createElementVNode("button", {
79
+ class: "d-emoji-picker__search-button",
80
+ onClick: clearSearch,
81
+ onKeydown: withKeys(clearSearch, ["enter"])
82
+ }, [
83
+ createVNode(unref(DtIcon), { name: "close" })
84
+ ], 40, _hoisted_2$4)
85
+ ]),
86
+ key: "0"
87
+ } : void 0
88
+ ]), 1032, ["placeholder", "model-value"])
89
+ ]);
90
+ };
83
91
  }
84
- }, Fe = { class: "d-emoji-picker__tabset" }, De = {
92
+ };
93
+ const _hoisted_1$4 = { class: "d-emoji-picker__tabset" };
94
+ const _sfc_main$4 = {
85
95
  __name: "emoji_tabset",
86
96
  props: {
87
97
  /**
@@ -91,15 +101,15 @@ const Le = { class: "d-emoji-picker__search d-emoji-picker__alignment" }, Ae = [
91
101
  */
92
102
  showRecentlyUsedTab: {
93
103
  type: Boolean,
94
- default: !1
104
+ default: false
95
105
  },
96
106
  scrollIntoTab: {
97
107
  type: Number,
98
- required: !0
108
+ required: true
99
109
  },
100
110
  isScrolling: {
101
111
  type: Boolean,
102
- default: !1
112
+ default: false
103
113
  },
104
114
  emojiFilter: {
105
115
  type: String,
@@ -112,7 +122,7 @@ const Le = { class: "d-emoji-picker__search d-emoji-picker__alignment" }, Ae = [
112
122
  */
113
123
  tabsetLabels: {
114
124
  type: Array,
115
- required: !0
125
+ required: true
116
126
  }
117
127
  },
118
128
  emits: [
@@ -125,94 +135,137 @@ const Le = { class: "d-emoji-picker__search d-emoji-picker__alignment" }, Ae = [
125
135
  "focus-search-input",
126
136
  "focus-skin-selector"
127
137
  ],
128
- setup(o, { expose: k, emit: L }) {
129
- const i = o, u = L, R = [
130
- { label: K.MOST_RECENTLY_USED, icon: "clock" },
131
- { label: K.SMILEYS_AND_PEOPLE, icon: "satisfied" },
132
- { label: K.NATURE, icon: "living-thing" },
133
- { label: K.FOOD, icon: "food" },
134
- { label: K.ACTIVITY, icon: "object" },
135
- { label: K.TRAVEL, icon: "transportation" },
136
- { label: K.OBJECTS, icon: "lightbulb" },
137
- { label: K.SYMBOLS, icon: "heart" },
138
- { label: K.FLAGS, icon: "flag" }
139
- ], h = B(() => (i.showRecentlyUsedTab ? R : R.slice(1)).map((t, r) => ({
140
- ...t,
141
- label: i.tabsetLabels[r],
142
- id: (r + 1).toString(),
143
- panelId: (r + 1).toString()
144
- }))), S = B(() => i.emojiFilter.length > 0), c = p("1"), { isScrolling: s } = _e(i), g = p([]);
145
- W(
146
- () => i.scrollIntoTab,
138
+ setup(__props, { expose: __expose, emit: __emit }) {
139
+ const props = __props;
140
+ const emits = __emit;
141
+ const TABS_DATA = [
142
+ { label: EMOJI_PICKER_CATEGORIES.MOST_RECENTLY_USED, icon: "clock" },
143
+ { label: EMOJI_PICKER_CATEGORIES.SMILEYS_AND_PEOPLE, icon: "satisfied" },
144
+ { label: EMOJI_PICKER_CATEGORIES.NATURE, icon: "living-thing" },
145
+ { label: EMOJI_PICKER_CATEGORIES.FOOD, icon: "food" },
146
+ { label: EMOJI_PICKER_CATEGORIES.ACTIVITY, icon: "object" },
147
+ { label: EMOJI_PICKER_CATEGORIES.TRAVEL, icon: "transportation" },
148
+ { label: EMOJI_PICKER_CATEGORIES.OBJECTS, icon: "lightbulb" },
149
+ { label: EMOJI_PICKER_CATEGORIES.SYMBOLS, icon: "heart" },
150
+ { label: EMOJI_PICKER_CATEGORIES.FLAGS, icon: "flag" }
151
+ ];
152
+ const tabs = computed(() => {
153
+ const tabsData = props.showRecentlyUsedTab ? TABS_DATA : TABS_DATA.slice(1);
154
+ return tabsData.map((tab, index) => ({
155
+ ...tab,
156
+ label: props.tabsetLabels[index],
157
+ id: (index + 1).toString(),
158
+ panelId: (index + 1).toString()
159
+ }));
160
+ });
161
+ const isSearching = computed(() => props.emojiFilter.length > 0);
162
+ const selectedTab = ref("1");
163
+ const { isScrolling } = toRefs(props);
164
+ const tabsetRef = ref([]);
165
+ watch(
166
+ () => props.scrollIntoTab,
147
167
  () => {
148
- !s.value && !S.value && (c.value = (i.scrollIntoTab + 1).toString());
168
+ if (!isScrolling.value && !isSearching.value) {
169
+ selectedTab.value = (props.scrollIntoTab + 1).toString();
170
+ }
149
171
  }
150
- ), W(
151
- S,
172
+ );
173
+ watch(
174
+ isSearching,
152
175
  () => {
153
- S.value && (c.value = null);
176
+ if (isSearching.value) {
177
+ selectedTab.value = null;
178
+ }
154
179
  }
155
180
  );
156
- function D(e) {
157
- s.value || (c.value = e), u("selected-tabset", e);
158
- }
159
- function O(e) {
160
- g.value.push(e.$el);
161
- }
162
- function A() {
163
- g.value[0].focus();
164
- }
165
- function l(e, t) {
166
- e.key === "Enter" && (D(t), g.value[t - 1].blur()), e.key === "Tab" && (e.preventDefault(), e.shiftKey ? u("focus-skin-selector") : u("focus-search-input")), e.key === "ArrowDown" && u("focus-search-input");
167
- }
168
- return k({
169
- focusTabset: A
170
- }), (e, t) => (y(), _("div", Fe, [
171
- F(T(we), {
172
- "tab-list-class": "d-emoji-picker__tabset-list",
173
- selected: c.value
174
- }, {
175
- tabs: H(() => [
176
- (y(!0), _(z, null, Y(h.value, (r, f) => (y(), je(T(Ee), {
177
- id: r.id,
178
- ref_for: !0,
179
- ref: (b) => {
180
- b && O(b);
181
- },
182
- key: r.id,
183
- "panel-id": r.panelId,
184
- label: r.label,
185
- "aria-controls": "d-emoji-picker-list",
186
- tabindex: f + 1,
187
- onClickCapture: ue((b) => D(r.id), ["stop"]),
188
- onKeydown: (b) => l(b, r.id)
189
- }, {
190
- default: H(() => [
191
- F(T(ne), {
192
- size: "400",
193
- name: r.icon
194
- }, null, 8, ["name"])
195
- ]),
196
- _: 2
197
- }, 1032, ["id", "panel-id", "label", "tabindex", "onClickCapture", "onKeydown"]))), 128))
198
- ]),
199
- _: 1
200
- }, 8, ["selected"])
201
- ]));
181
+ function selectTabset(id) {
182
+ if (!isScrolling.value) {
183
+ selectedTab.value = id;
184
+ }
185
+ emits("selected-tabset", id);
186
+ }
187
+ function setTabsetRef(ref2) {
188
+ tabsetRef.value.push(ref2.$el);
189
+ }
190
+ function focusTabset() {
191
+ tabsetRef.value[0].focus();
192
+ }
193
+ function handleKeyDown(event, tabId) {
194
+ if (event.key === "Enter") {
195
+ selectTabset(tabId);
196
+ tabsetRef.value[tabId - 1].blur();
197
+ }
198
+ if (event.key === "Tab") {
199
+ event.preventDefault();
200
+ if (event.shiftKey) {
201
+ emits("focus-skin-selector");
202
+ } else {
203
+ emits("focus-search-input");
204
+ }
205
+ }
206
+ if (event.key === "ArrowDown") {
207
+ emits("focus-search-input");
208
+ }
209
+ }
210
+ __expose({
211
+ focusTabset
212
+ });
213
+ return (_ctx, _cache) => {
214
+ return openBlock(), createElementBlock("div", _hoisted_1$4, [
215
+ createVNode(unref(DtTabGroup), {
216
+ "tab-list-class": "d-emoji-picker__tabset-list",
217
+ selected: selectedTab.value
218
+ }, {
219
+ tabs: withCtx(() => [
220
+ (openBlock(true), createElementBlock(Fragment, null, renderList(tabs.value, (tab, index) => {
221
+ return openBlock(), createBlock(unref(DtTab), {
222
+ id: tab.id,
223
+ ref_for: true,
224
+ ref: (el) => {
225
+ if (el)
226
+ setTabsetRef(el);
227
+ },
228
+ key: tab.id,
229
+ "panel-id": tab.panelId,
230
+ label: tab.label,
231
+ "aria-controls": "d-emoji-picker-list",
232
+ tabindex: index + 1,
233
+ onClickCapture: withModifiers(($event) => selectTabset(tab.id), ["stop"]),
234
+ onKeydown: ($event) => handleKeyDown($event, tab.id)
235
+ }, {
236
+ default: withCtx(() => [
237
+ createVNode(unref(DtIcon), {
238
+ size: "400",
239
+ name: tab.icon
240
+ }, null, 8, ["name"])
241
+ ]),
242
+ _: 2
243
+ }, 1032, ["id", "panel-id", "label", "tabindex", "onClickCapture", "onKeydown"]);
244
+ }), 128))
245
+ ]),
246
+ _: 1
247
+ }, 8, ["selected"])
248
+ ]);
249
+ };
202
250
  }
203
- }, G = {
251
+ };
252
+ const ARROW_KEYS = {
204
253
  ARROW_UP: "ArrowUp",
205
254
  ARROW_DOWN: "ArrowDown",
206
255
  ARROW_LEFT: "ArrowLeft",
207
256
  ARROW_RIGHT: "ArrowRight"
208
- }, Q = "https://static.dialpadcdn.com/joypixels/png/unicode/32/", $ = 9, q = {
257
+ };
258
+ const CDN_URL = "https://static.dialpadcdn.com/joypixels/png/unicode/32/";
259
+ const EMOJIS_PER_ROW = 9;
260
+ const EMOJI_PICKER_SKIN_TONE_MODIFIERS = {
209
261
  DEFAULT: "Default",
210
262
  LIGHT: "Light",
211
263
  MEDIUM_LIGHT: "MediumLight",
212
264
  MEDIUM: "Medium",
213
265
  MEDIUM_DARK: "MediumDark",
214
266
  DARK: "Dark"
215
- }, K = {
267
+ };
268
+ const EMOJI_PICKER_CATEGORIES = {
216
269
  MOST_RECENTLY_USED: "Most recently used",
217
270
  SMILEYS_AND_PEOPLE: "Smileys and people",
218
271
  NATURE: "Nature",
@@ -223,90 +276,173 @@ const Le = { class: "d-emoji-picker__search d-emoji-picker__alignment" }, Ae = [
223
276
  SYMBOLS: "Symbols",
224
277
  FLAGS: "Flags"
225
278
  };
226
- function Oe() {
227
- const o = p([]), k = p([]), L = p(!1), i = p(!0);
228
- function u(l, e) {
229
- s(l, e - 1) || (o.value[l - 1] ? s(l - 1, o.value[l - 1].length - 1) : s(o.value.length - 1, o.value[o.value.length - 1].length - 1));
279
+ function useKeyboardNavigation() {
280
+ const emojiRefs = ref([]);
281
+ const emojiFilteredRefs = ref([]);
282
+ const isFiltering = ref(false);
283
+ const hoverFirstEmoji = ref(true);
284
+ function _handleArrowLeft(indexTab, indexEmoji) {
285
+ if (!focusEmoji(indexTab, indexEmoji - 1)) {
286
+ if (emojiRefs.value[indexTab - 1]) {
287
+ focusEmoji(indexTab - 1, emojiRefs.value[indexTab - 1].length - 1);
288
+ } else {
289
+ focusEmoji(emojiRefs.value.length - 1, emojiRefs.value[emojiRefs.value.length - 1].length - 1);
290
+ }
291
+ }
230
292
  }
231
- function R(l, e) {
232
- s(l, e + 1) || s(l + 1, 0) || s(0, 0);
293
+ function _handleArrowRight(indexTab, indexEmoji) {
294
+ if (!focusEmoji(indexTab, indexEmoji + 1)) {
295
+ if (!focusEmoji(indexTab + 1, 0)) {
296
+ focusEmoji(0, 0);
297
+ }
298
+ }
233
299
  }
234
- function h(l, e) {
235
- s(0, e - 1) || s(0, k.value.length - 1);
300
+ function _handleArrowLeftFiltered(indexTab, indexEmoji) {
301
+ if (!focusEmoji(0, indexEmoji - 1)) {
302
+ focusEmoji(0, emojiFilteredRefs.value.length - 1);
303
+ }
236
304
  }
237
- function S(l, e) {
238
- s(0, e + 1) || s(0, 0);
305
+ function _handleArrowRightFiltered(indexTab, indexEmoji) {
306
+ if (!focusEmoji(0, indexEmoji + 1)) {
307
+ focusEmoji(0, 0);
308
+ }
239
309
  }
240
- function c(l, e, t) {
241
- L.value ? l === "left" ? h(e, t) : l === "right" && S(e, t) : l === "left" ? u(e, t) : l === "right" && R(e, t);
310
+ function _handleHorizontalNavigation(direction, indexTab, indexEmoji) {
311
+ if (isFiltering.value) {
312
+ if (direction === "left") {
313
+ _handleArrowLeftFiltered(indexTab, indexEmoji);
314
+ } else if (direction === "right") {
315
+ _handleArrowRightFiltered(indexTab, indexEmoji);
316
+ }
317
+ } else {
318
+ if (direction === "left") {
319
+ _handleArrowLeft(indexTab, indexEmoji);
320
+ } else if (direction === "right") {
321
+ _handleArrowRight(indexTab, indexEmoji);
322
+ }
323
+ }
242
324
  }
243
- function s(l, e) {
244
- var r, f, b;
245
- const t = L.value ? (r = k.value) == null ? void 0 : r[e] : (b = (f = o.value) == null ? void 0 : f[l]) == null ? void 0 : b[e];
246
- return t ? (t.focus(), !0) : !1;
325
+ function focusEmoji(indexTab, indexEmoji) {
326
+ var _a, _b, _c;
327
+ const emojiRef = isFiltering.value ? (_a = emojiFilteredRefs.value) == null ? void 0 : _a[indexEmoji] : (_c = (_b = emojiRefs.value) == null ? void 0 : _b[indexTab]) == null ? void 0 : _c[indexEmoji];
328
+ if (emojiRef) {
329
+ emojiRef.focus();
330
+ return true;
331
+ }
332
+ return false;
247
333
  }
248
- function g(l, e, t) {
249
- o.value[e] || (o.value[e] = []), o.value[e][t] = l;
334
+ function setEmojiRef(el, indexTab, indexEmoji) {
335
+ if (!emojiRefs.value[indexTab]) {
336
+ emojiRefs.value[indexTab] = [];
337
+ }
338
+ emojiRefs.value[indexTab][indexEmoji] = el;
250
339
  }
251
- function D(l, e) {
252
- k.value[e] = l;
340
+ function setFilteredRef(el, index) {
341
+ emojiFilteredRefs.value[index] = el;
253
342
  }
254
- function O(l, e) {
255
- var t;
256
- if (i.value = !1, l === G.ARROW_UP) {
257
- const r = e % $;
258
- if (!s(0, e - $)) {
259
- const f = k.value.length - k.value.length % $ + r;
260
- s(0, f), s(0, f) || s(0, k.value.length - 1);
343
+ function handleArrowNavigationFiltered(key, indexEmoji) {
344
+ var _a;
345
+ hoverFirstEmoji.value = false;
346
+ if (key === ARROW_KEYS.ARROW_UP) {
347
+ const position = indexEmoji % EMOJIS_PER_ROW;
348
+ if (!focusEmoji(0, indexEmoji - EMOJIS_PER_ROW)) {
349
+ const lastEmojiPosition = emojiFilteredRefs.value.length - emojiFilteredRefs.value.length % EMOJIS_PER_ROW + position;
350
+ focusEmoji(0, lastEmojiPosition);
351
+ if (!focusEmoji(0, lastEmojiPosition)) {
352
+ focusEmoji(0, emojiFilteredRefs.value.length - 1);
353
+ }
261
354
  }
262
355
  }
263
- if (l === G.ARROW_DOWN && !s(0, e + $)) {
264
- const r = e % $;
265
- (t = k.value) != null && t[e + ($ - r)] ? s(0, k.value.length - 1) : s(0, r);
356
+ if (key === ARROW_KEYS.ARROW_DOWN) {
357
+ if (!focusEmoji(0, indexEmoji + EMOJIS_PER_ROW)) {
358
+ const position = indexEmoji % EMOJIS_PER_ROW;
359
+ if ((_a = emojiFilteredRefs.value) == null ? void 0 : _a[indexEmoji + (EMOJIS_PER_ROW - position)]) {
360
+ focusEmoji(0, emojiFilteredRefs.value.length - 1);
361
+ } else {
362
+ focusEmoji(0, position);
363
+ }
364
+ }
365
+ }
366
+ if (key === ARROW_KEYS.ARROW_LEFT) {
367
+ _handleHorizontalNavigation("left", 0, indexEmoji);
368
+ }
369
+ if (key === ARROW_KEYS.ARROW_RIGHT) {
370
+ _handleHorizontalNavigation("right", 0, indexEmoji);
266
371
  }
267
- l === G.ARROW_LEFT && c("left", 0, e), l === G.ARROW_RIGHT && c("right", 0, e);
268
372
  }
269
- function A(l, e, t) {
270
- var r, f;
271
- if (l === "ArrowUp") {
272
- const b = t % $;
273
- if (e === 0) {
274
- const j = $ - o.value[o.value.length - 1].length % $, C = o.value[o.value.length - 1].length + j - ($ - b);
275
- s(o.value.length - 1, C) || s(o.value.length - 1, o.value[o.value.length - 1].length - 1);
373
+ function handleArrowNavigation(key, indexTab, indexEmoji) {
374
+ var _a, _b;
375
+ if (key === "ArrowUp") {
376
+ const position = indexEmoji % EMOJIS_PER_ROW;
377
+ if (indexTab === 0) {
378
+ const numberOfMissingEmojis = EMOJIS_PER_ROW - emojiRefs.value[emojiRefs.value.length - 1].length % EMOJIS_PER_ROW;
379
+ const emojiToJump = emojiRefs.value[emojiRefs.value.length - 1].length + numberOfMissingEmojis - (EMOJIS_PER_ROW - position);
380
+ if (!focusEmoji(emojiRefs.value.length - 1, emojiToJump)) {
381
+ focusEmoji(emojiRefs.value.length - 1, emojiRefs.value[emojiRefs.value.length - 1].length - 1);
382
+ }
276
383
  return;
277
384
  }
278
- if (!s(e, t - $)) {
279
- const j = e - 1 < 0 ? 0 : e - 1, C = o.value[j].length, ee = C - C % $ + b;
280
- s(j, ee) || s(e - 1, o.value[e - 1].length - 1);
385
+ if (!focusEmoji(indexTab, indexEmoji - EMOJIS_PER_ROW)) {
386
+ const previousTab = indexTab - 1 < 0 ? 0 : indexTab - 1;
387
+ const emojisInPreviousTab = emojiRefs.value[previousTab].length;
388
+ const lastEmojiPosition = emojisInPreviousTab - emojisInPreviousTab % EMOJIS_PER_ROW + position;
389
+ if (!focusEmoji(previousTab, lastEmojiPosition)) {
390
+ focusEmoji(indexTab - 1, emojiRefs.value[indexTab - 1].length - 1);
391
+ }
281
392
  }
282
393
  }
283
- if (l === "ArrowDown" && !s(e, t + $)) {
284
- const b = t % $;
285
- (f = (r = o.value) == null ? void 0 : r[e]) != null && f[t + ($ - b)] ? s(e, o.value[e].length - 1) : s(e + 1, b) || s(0, b) || s(0, o.value[0].length - 1);
394
+ if (key === "ArrowDown") {
395
+ if (!focusEmoji(indexTab, indexEmoji + EMOJIS_PER_ROW)) {
396
+ const position = indexEmoji % EMOJIS_PER_ROW;
397
+ if ((_b = (_a = emojiRefs.value) == null ? void 0 : _a[indexTab]) == null ? void 0 : _b[indexEmoji + (EMOJIS_PER_ROW - position)]) {
398
+ focusEmoji(indexTab, emojiRefs.value[indexTab].length - 1);
399
+ } else {
400
+ if (!focusEmoji(indexTab + 1, position)) {
401
+ if (!focusEmoji(0, position)) {
402
+ focusEmoji(0, emojiRefs.value[0].length - 1);
403
+ }
404
+ }
405
+ }
406
+ }
407
+ }
408
+ if (key === "ArrowLeft") {
409
+ _handleHorizontalNavigation("left", indexTab, indexEmoji);
410
+ }
411
+ if (key === "ArrowRight") {
412
+ _handleHorizontalNavigation("right", indexTab, indexEmoji);
286
413
  }
287
- l === "ArrowLeft" && c("left", e, t), l === "ArrowRight" && c("right", e, t);
288
414
  }
289
415
  return {
290
- emojiFilteredRefs: k,
291
- isFiltering: L,
292
- hoverFirstEmoji: i,
293
- setEmojiRef: g,
294
- setFilteredRef: D,
295
- focusEmoji: s,
296
- handleArrowNavigationFiltered: O,
297
- handleArrowNavigation: A
416
+ emojiFilteredRefs,
417
+ isFiltering,
418
+ hoverFirstEmoji,
419
+ setEmojiRef,
420
+ setFilteredRef,
421
+ focusEmoji,
422
+ handleArrowNavigationFiltered,
423
+ handleArrowNavigation
298
424
  };
299
425
  }
300
- const Ce = { class: "d-emoji-picker__selector" }, Me = {
426
+ const _hoisted_1$3 = { class: "d-emoji-picker__selector" };
427
+ const _hoisted_2$3 = {
301
428
  key: 0,
302
429
  class: "d-emoji-picker__search-label d-emoji-picker__alignment"
303
- }, Ke = { key: 0 }, Ne = { class: "d-emoji-picker__tab" }, Ue = ["aria-label", "onClick", "onFocusin", "onMouseover", "onKeydown"], Pe = ["alt", "aria-label", "title", "src"], Be = {
430
+ };
431
+ const _hoisted_3$2 = { key: 0 };
432
+ const _hoisted_4$2 = { class: "d-emoji-picker__tab" };
433
+ const _hoisted_5$1 = ["aria-label", "onClick", "onFocusin", "onMouseover", "onKeydown"];
434
+ const _hoisted_6$1 = ["alt", "aria-label", "title", "src"];
435
+ const _hoisted_7$1 = {
304
436
  key: 2,
305
437
  class: "d-emoji-picker__alignment"
306
- }, Ve = {
438
+ };
439
+ const _hoisted_8 = {
307
440
  class: "d-emoji-picker__tab",
308
441
  "data-qa": "filtered-emojis"
309
- }, qe = ["aria-label", "onClick", "onFocusin", "onMouseover", "onKeydown"], We = ["alt", "aria-label", "title", "src"], Ge = {
442
+ };
443
+ const _hoisted_9 = ["aria-label", "onClick", "onFocusin", "onMouseover", "onKeydown"];
444
+ const _hoisted_10 = ["alt", "aria-label", "title", "src"];
445
+ const _sfc_main$3 = {
310
446
  __name: "emoji_selector",
311
447
  props: {
312
448
  /**
@@ -325,7 +461,7 @@ const Ce = { class: "d-emoji-picker__selector" }, Me = {
325
461
  */
326
462
  skinTone: {
327
463
  type: String,
328
- required: !0
464
+ required: true
329
465
  },
330
466
  /**
331
467
  * The labels for the tabset
@@ -334,11 +470,11 @@ const Ce = { class: "d-emoji-picker__selector" }, Me = {
334
470
  */
335
471
  tabsetLabels: {
336
472
  type: Array,
337
- required: !0
473
+ required: true
338
474
  },
339
475
  selectedTabset: {
340
476
  type: Object,
341
- required: !0
477
+ required: true
342
478
  },
343
479
  /**
344
480
  * The label for the search results tab
@@ -347,11 +483,11 @@ const Ce = { class: "d-emoji-picker__selector" }, Me = {
347
483
  */
348
484
  searchResultsLabel: {
349
485
  type: String,
350
- required: !0
486
+ required: true
351
487
  },
352
488
  searchNoResultsLabel: {
353
489
  type: String,
354
- required: !0
490
+ required: true
355
491
  },
356
492
  /**
357
493
  * The list of recently used emojis
@@ -398,228 +534,325 @@ const Ce = { class: "d-emoji-picker__selector" }, Me = {
398
534
  */
399
535
  "focus-search-input"
400
536
  ],
401
- setup(o, { expose: k, emit: L }) {
402
- const i = o, u = L, {
403
- emojiFilteredRefs: R,
404
- isFiltering: h,
405
- hoverFirstEmoji: S,
406
- setEmojiRef: c,
407
- setFilteredRef: s,
408
- focusEmoji: g,
409
- handleArrowNavigationFiltered: D,
410
- handleArrowNavigation: O
411
- } = Oe(), A = p(null), l = p(null), e = p(null), t = ["Recently used", "People", "Nature", "Food", "Activity", "Travel", "Objects", "Symbols", "Flags"], r = B(() => i.recentlyUsedEmojis.length ? i.tabsetLabels.map((n) => ({ label: n, ref: p(null) })) : i.tabsetLabels.slice(1).map((n) => ({ label: n, ref: p(null) }))), f = p(r.value[0].label), b = B(() => i.recentlyUsedEmojis.length ? t : t.slice(1)), j = p([]), C = B(() => [
412
- ...I[`People${i.skinTone}`],
413
- ...I.Nature,
414
- ...I.Food,
415
- ...I[`Activity${i.skinTone}`],
416
- ...I.Travel,
417
- ...I[`Objects${i.skinTone}`],
418
- ...I.Symbols,
419
- ...I.Flags
420
- ]), ee = de(() => {
421
- R.value = [], ie();
537
+ setup(__props, { expose: __expose, emit: __emit }) {
538
+ const props = __props;
539
+ const emits = __emit;
540
+ const {
541
+ emojiFilteredRefs,
542
+ isFiltering,
543
+ hoverFirstEmoji,
544
+ setEmojiRef,
545
+ setFilteredRef,
546
+ focusEmoji,
547
+ handleArrowNavigationFiltered,
548
+ handleArrowNavigation
549
+ } = useKeyboardNavigation();
550
+ const tabCategoryRef = ref(null);
551
+ const listRef = ref(null);
552
+ const tabLabelObserver = ref(null);
553
+ const TABS_DATA = ["Recently used", "People", "Nature", "Food", "Activity", "Travel", "Objects", "Symbols", "Flags"];
554
+ const tabLabels = computed(() => {
555
+ return props.recentlyUsedEmojis.length ? props.tabsetLabels.map((label) => ({ label, ref: ref(null) })) : props.tabsetLabels.slice(1).map((label) => ({ label, ref: ref(null) }));
556
+ });
557
+ const fixedLabel = ref(tabLabels.value[0].label);
558
+ const tabs = computed(() => {
559
+ return props.recentlyUsedEmojis.length ? TABS_DATA : TABS_DATA.slice(1);
422
560
  });
423
- W(C, () => {
424
- ie();
425
- }, { immediate: !0 }), W(
426
- () => i.recentlyUsedEmojis,
561
+ const filteredEmojis = ref([]);
562
+ const currentEmojis = computed(() => {
563
+ return [
564
+ ...emojisGrouped[`People${props.skinTone}`],
565
+ ...emojisGrouped.Nature,
566
+ ...emojisGrouped.Food,
567
+ ...emojisGrouped[`Activity${props.skinTone}`],
568
+ ...emojisGrouped.Travel,
569
+ ...emojisGrouped[`Objects${props.skinTone}`],
570
+ ...emojisGrouped.Symbols,
571
+ ...emojisGrouped.Flags
572
+ ];
573
+ });
574
+ const debouncedSearch = debounce(() => {
575
+ emojiFilteredRefs.value = [];
576
+ searchByNameAndKeywords();
577
+ });
578
+ watch(currentEmojis, () => {
579
+ searchByNameAndKeywords();
580
+ }, { immediate: true });
581
+ watch(
582
+ () => props.recentlyUsedEmojis,
427
583
  () => {
428
- I["Recently used"] = i.recentlyUsedEmojis;
584
+ emojisGrouped["Recently used"] = props.recentlyUsedEmojis;
429
585
  },
430
- { immediate: !0 }
431
- ), W(() => i.emojiFilter, () => {
432
- be(), i.emojiFilter ? h.value = !0 : (h.value = !1, P(null)), ee();
433
- }), W(
434
- () => i.selectedTabset,
435
- (n) => {
436
- X(n.tabId);
586
+ { immediate: true }
587
+ );
588
+ watch(() => props.emojiFilter, () => {
589
+ resetScroll();
590
+ if (props.emojiFilter) {
591
+ isFiltering.value = true;
592
+ } else {
593
+ isFiltering.value = false;
594
+ highlightEmoji(null);
595
+ }
596
+ debouncedSearch();
597
+ });
598
+ watch(
599
+ () => props.selectedTabset,
600
+ (tab) => {
601
+ scrollToTab(tab.tabId);
437
602
  },
438
- { deep: !0 }
603
+ { deep: true }
439
604
  );
440
- function te(n, a = !1) {
441
- S.value = a, u("highlighted-emoji", n);
442
- }
443
- function ie() {
444
- const n = i.emojiFilter.toLowerCase();
445
- j.value = C.value.filter((a) => {
446
- const m = a.name.toLowerCase().includes(n), v = a.keywords.some((d) => d.toLowerCase().includes(n));
447
- return m || v;
448
- }), x(() => {
449
- n && te(j.value[0], !0);
605
+ function hoverEmoji(emoji, isFirst = false) {
606
+ hoverFirstEmoji.value = isFirst;
607
+ emits("highlighted-emoji", emoji);
608
+ }
609
+ function searchByNameAndKeywords() {
610
+ const searchStr = props.emojiFilter.toLowerCase();
611
+ filteredEmojis.value = currentEmojis.value.filter((obj) => {
612
+ const nameIncludesSearchStr = obj.name.toLowerCase().includes(searchStr);
613
+ const keywordsIncludeSearchStr = obj.keywords.some((keyword) => keyword.toLowerCase().includes(searchStr));
614
+ return nameIncludesSearchStr || keywordsIncludeSearchStr;
615
+ });
616
+ nextTick(() => {
617
+ if (searchStr) {
618
+ hoverEmoji(filteredEmojis.value[0], true);
619
+ }
450
620
  });
451
621
  }
452
- function de(n, a = 300) {
453
- let m;
454
- return (...v) => {
455
- clearTimeout(m), m = setTimeout(() => n(...v), a);
622
+ function debounce(fn, delay = 300) {
623
+ let timeout;
624
+ return (...args) => {
625
+ clearTimeout(timeout);
626
+ timeout = setTimeout(() => fn(...args), delay);
456
627
  };
457
628
  }
458
- function me(n) {
459
- return `${Q + n}.png`;
460
- }
461
- function ve(n) {
462
- n.target.parentNode.style.display = "none";
463
- }
464
- function X(n, a = !0) {
465
- const v = r.value[n - 1].ref.value[0];
466
- x(() => {
467
- const d = l.value, M = n === "1" ? 0 : v.offsetTop - 20;
468
- let E = !0, V = d.scrollTop;
469
- u("is-scrolling", !0), d.addEventListener("scroll", () => {
470
- if (E) {
471
- const N = d.scrollTop;
472
- (V < N && N >= M || V > N && N <= M) && (E = !1, u("is-scrolling", !1)), V = N;
629
+ function getImgSrc(emoji) {
630
+ return `${CDN_URL + emoji}.png`;
631
+ }
632
+ function handleImageError(event) {
633
+ event.target.parentNode.style.display = "none";
634
+ }
635
+ function scrollToTab(tabIndex, focusFirstEmoji = true) {
636
+ const tabLabel = tabLabels.value[tabIndex - 1];
637
+ const tabElement = tabLabel.ref.value[0];
638
+ nextTick(() => {
639
+ const container = listRef.value;
640
+ const offsetTop = tabIndex === "1" ? 0 : tabElement.offsetTop - 20;
641
+ let isScrolling = true;
642
+ let prevScrollTop = container.scrollTop;
643
+ emits("is-scrolling", true);
644
+ container.addEventListener("scroll", () => {
645
+ if (isScrolling) {
646
+ const scrollTop = container.scrollTop;
647
+ if (prevScrollTop < scrollTop && scrollTop >= offsetTop || prevScrollTop > scrollTop && scrollTop <= offsetTop) {
648
+ isScrolling = false;
649
+ emits("is-scrolling", false);
650
+ }
651
+ prevScrollTop = scrollTop;
473
652
  }
474
- }), d.scrollTop = M, a && g(n - 1, 0);
653
+ });
654
+ container.scrollTop = offsetTop;
655
+ if (focusFirstEmoji) {
656
+ focusEmoji(tabIndex - 1, 0);
657
+ }
475
658
  });
476
659
  }
477
- function be() {
478
- const n = l.value;
479
- n.scrollTop = 0;
660
+ function resetScroll() {
661
+ const container = listRef.value;
662
+ container.scrollTop = 0;
480
663
  }
481
- function pe() {
482
- e.value = new IntersectionObserver((n) => {
483
- n.forEach((a) => {
484
- var d, M, E, V, N;
485
- const { target: m } = a, v = parseInt(m.dataset.index);
486
- a.isIntersecting && m.offsetTop <= A.value.offsetTop + 50 ? (f.value = ((d = r.value[v - 1]) == null ? void 0 : d.label) ?? ((M = r.value[0]) == null ? void 0 : M.label), u("scroll-into-tab", v - 1)) : a.boundingClientRect.bottom <= ((E = A.value) == null ? void 0 : E.getBoundingClientRect().bottom) ? (u("scroll-into-tab", v), f.value = (V = r.value[v]) == null ? void 0 : V.label) : v === 1 && (u("scroll-into-tab", v), f.value = (N = r.value[0]) == null ? void 0 : N.label);
664
+ function setTabLabelObserver() {
665
+ tabLabelObserver.value = new IntersectionObserver((entries) => {
666
+ entries.forEach((entry) => {
667
+ var _a, _b, _c, _d, _e;
668
+ const { target } = entry;
669
+ const index = parseInt(target.dataset.index);
670
+ if (entry.isIntersecting && target.offsetTop <= tabCategoryRef.value.offsetTop + 50) {
671
+ fixedLabel.value = ((_a = tabLabels.value[index - 1]) == null ? void 0 : _a.label) ?? ((_b = tabLabels.value[0]) == null ? void 0 : _b.label);
672
+ emits("scroll-into-tab", index - 1);
673
+ } else if (entry.boundingClientRect.bottom <= ((_c = tabCategoryRef.value) == null ? void 0 : _c.getBoundingClientRect().bottom)) {
674
+ emits("scroll-into-tab", index);
675
+ fixedLabel.value = (_d = tabLabels.value[index]) == null ? void 0 : _d.label;
676
+ } else if (index === 1) {
677
+ emits("scroll-into-tab", index);
678
+ fixedLabel.value = (_e = tabLabels.value[0]) == null ? void 0 : _e.label;
679
+ }
487
680
  });
488
- }), e.value.observe(A.value), Array.from(l.value.children).forEach((n, a) => {
489
- e.value.observe(n), n.dataset.index = a;
681
+ });
682
+ tabLabelObserver.value.observe(tabCategoryRef.value);
683
+ Array.from(listRef.value.children).forEach((child, index) => {
684
+ tabLabelObserver.value.observe(child);
685
+ child.dataset.index = index;
490
686
  });
491
687
  }
492
- const he = (n, a, m) => {
493
- if (n.preventDefault(), Object.values(G).includes(n.key)) {
494
- D(n.key, a);
688
+ const handleKeyDownFilteredEmojis = (event, indexEmoji, emoji) => {
689
+ event.preventDefault();
690
+ if (Object.values(ARROW_KEYS).includes(event.key)) {
691
+ handleArrowNavigationFiltered(event.key, indexEmoji);
495
692
  return;
496
693
  }
497
- switch (n.key) {
694
+ switch (event.key) {
498
695
  case "Tab":
499
- u("focus-skin-selector");
696
+ emits("focus-skin-selector");
500
697
  break;
501
698
  case "Enter":
502
- Z(m);
699
+ selectEmoji(emoji);
503
700
  break;
504
701
  }
505
- }, ge = (n, a, m, v) => {
506
- if (n.preventDefault(), Object.values(G).includes(n.key)) {
507
- O(n.key, a, m);
702
+ };
703
+ const handleKeyDown = (event, indexTab, indexEmoji, emoji) => {
704
+ event.preventDefault();
705
+ if (Object.values(ARROW_KEYS).includes(event.key)) {
706
+ handleArrowNavigation(event.key, indexTab, indexEmoji);
508
707
  return;
509
708
  }
510
- switch (n.key) {
709
+ switch (event.key) {
511
710
  case "Tab":
512
- n.shiftKey ? g(a, 0) && a > 0 ? X(a, !0) : (X(1, !1), u("focus-search-input")) : g(a + 1, 0) ? X(a + 1 + 1, !1) : u("focus-skin-selector");
711
+ if (event.shiftKey) {
712
+ if (focusEmoji(indexTab, 0) && indexTab > 0) {
713
+ scrollToTab(indexTab, true);
714
+ } else {
715
+ scrollToTab(1, false);
716
+ emits("focus-search-input");
717
+ }
718
+ } else {
719
+ if (focusEmoji(indexTab + 1, 0)) {
720
+ scrollToTab(indexTab + 1 + 1, false);
721
+ } else {
722
+ emits("focus-skin-selector");
723
+ }
724
+ }
513
725
  break;
514
726
  case "Enter":
515
- Z(v);
727
+ selectEmoji(emoji);
516
728
  break;
517
729
  }
518
730
  };
519
- function Z(n) {
520
- u("selected-emoji", n);
521
- }
522
- function P(n) {
523
- u("highlighted-emoji", n);
524
- }
525
- function ke() {
526
- g(0, 0);
527
- }
528
- function ye() {
529
- g(b.value.length - 1, 0);
530
- }
531
- return ae(() => {
532
- pe();
533
- }), Re(() => {
534
- e.value.disconnect();
535
- }), k({
536
- focusEmojiSelector: ke,
537
- focusLastEmoji: ye
538
- }), (n, a) => (y(), _("div", Ce, [
539
- w("div", {
540
- id: "d-emoji-picker-list",
541
- ref_key: "listRef",
542
- ref: l,
543
- class: "d-emoji-picker__list"
544
- }, [
545
- o.emojiFilter ? (y(), _("p", Me, J(j.value.length > 0 ? o.searchResultsLabel : o.searchNoResultsLabel), 1)) : (y(), _("div", {
546
- key: 1,
547
- ref_key: "tabCategoryRef",
548
- ref: A,
549
- class: "d-emoji-picker__category d-emoji-picker__alignment"
550
- }, [
551
- w("p", null, J(f.value), 1)
552
- ], 512)),
553
- (y(!0), _(z, null, Y(r.value, (m, v) => oe((y(), _("div", {
554
- key: v,
555
- ref_for: !0,
556
- ref: m.ref,
557
- class: "d-emoji-picker__alignment"
731
+ function selectEmoji(emoji) {
732
+ emits("selected-emoji", emoji);
733
+ }
734
+ function highlightEmoji(emoji) {
735
+ emits("highlighted-emoji", emoji);
736
+ }
737
+ function focusEmojiSelector() {
738
+ focusEmoji(0, 0);
739
+ }
740
+ function focusLastEmoji() {
741
+ focusEmoji(tabs.value.length - 1, 0);
742
+ }
743
+ onMounted(() => {
744
+ setTabLabelObserver();
745
+ });
746
+ onUnmounted(() => {
747
+ tabLabelObserver.value.disconnect();
748
+ });
749
+ __expose({
750
+ focusEmojiSelector,
751
+ focusLastEmoji
752
+ });
753
+ return (_ctx, _cache) => {
754
+ return openBlock(), createElementBlock("div", _hoisted_1$3, [
755
+ createElementVNode("div", {
756
+ id: "d-emoji-picker-list",
757
+ ref_key: "listRef",
758
+ ref: listRef,
759
+ class: "d-emoji-picker__list"
558
760
  }, [
559
- v ? (y(), _("p", Ke, J(m.label), 1)) : le("", !0),
560
- w("div", Ne, [
561
- (y(!0), _(z, null, Y(T(I)[b.value[v] + o.skinTone] ? T(I)[b.value[v] + o.skinTone] : T(I)[b.value[v]], (d, M) => (y(), _("button", {
562
- key: d.shortname,
563
- ref_for: !0,
564
- ref: (E) => {
565
- E && T(c)(E, v, M);
566
- },
567
- type: "button",
568
- "aria-label": d.name,
569
- onClick: (E) => Z(d),
570
- onFocusin: (E) => P(d),
571
- onFocusout: a[0] || (a[0] = (E) => P(null)),
572
- onMouseover: (E) => P(d),
573
- onMouseleave: a[1] || (a[1] = (E) => P(null)),
574
- onKeydown: (E) => ge(E, v, M, d)
575
- }, [
576
- w("img", {
577
- class: "d-icon d-icon--size-500",
578
- alt: d.name,
579
- "aria-label": d.name,
580
- title: d.name,
581
- src: me(d.unicode_character),
582
- onError: ve
583
- }, null, 40, Pe)
584
- ], 40, Ue))), 128))
585
- ])
586
- ])), [
587
- [se, !o.emojiFilter]
588
- ])), 128)),
589
- o.emojiFilter ? (y(), _("div", Be, [
590
- w("div", Ve, [
591
- (y(!0), _(z, null, Y(j.value, (m, v) => (y(), _("button", {
592
- key: m.shortname,
593
- ref_for: !0,
594
- ref: (d) => {
595
- d && T(s)(d, v);
596
- },
597
- type: "button",
598
- "aria-label": m.name,
599
- class: ce({
600
- "hover-emoji": v === 0 && T(S)
601
- }),
602
- onClick: (d) => Z(m),
603
- onFocusin: (d) => P(m),
604
- onFocusout: a[2] || (a[2] = (d) => P(null)),
605
- onMouseover: (d) => te(m),
606
- onMouseleave: a[3] || (a[3] = (d) => te(null)),
607
- onKeydown: (d) => he(d, v, m)
761
+ __props.emojiFilter ? (openBlock(), createElementBlock("p", _hoisted_2$3, toDisplayString(filteredEmojis.value.length > 0 ? __props.searchResultsLabel : __props.searchNoResultsLabel), 1)) : (openBlock(), createElementBlock("div", {
762
+ key: 1,
763
+ ref_key: "tabCategoryRef",
764
+ ref: tabCategoryRef,
765
+ class: "d-emoji-picker__category d-emoji-picker__alignment"
766
+ }, [
767
+ createElementVNode("p", null, toDisplayString(fixedLabel.value), 1)
768
+ ], 512)),
769
+ (openBlock(true), createElementBlock(Fragment, null, renderList(tabLabels.value, (tabLabel, indexTab) => {
770
+ return withDirectives((openBlock(), createElementBlock("div", {
771
+ key: indexTab,
772
+ ref_for: true,
773
+ ref: tabLabel.ref,
774
+ class: "d-emoji-picker__alignment"
608
775
  }, [
609
- w("img", {
610
- class: "d-icon d-icon--size-500",
611
- alt: m.name,
612
- "aria-label": m.name,
613
- title: m.name,
614
- src: `${T(Q) + m.unicode_character}.png`
615
- }, null, 8, We)
616
- ], 42, qe))), 128))
617
- ])
618
- ])) : le("", !0)
619
- ], 512)
620
- ]));
776
+ indexTab ? (openBlock(), createElementBlock("p", _hoisted_3$2, toDisplayString(tabLabel.label), 1)) : createCommentVNode("", true),
777
+ createElementVNode("div", _hoisted_4$2, [
778
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(emojisGrouped)[tabs.value[indexTab] + __props.skinTone] ? unref(emojisGrouped)[tabs.value[indexTab] + __props.skinTone] : unref(emojisGrouped)[tabs.value[indexTab]], (emoji, indexEmoji) => {
779
+ return openBlock(), createElementBlock("button", {
780
+ key: emoji.shortname,
781
+ ref_for: true,
782
+ ref: (el) => {
783
+ if (el)
784
+ unref(setEmojiRef)(el, indexTab, indexEmoji);
785
+ },
786
+ type: "button",
787
+ "aria-label": emoji.name,
788
+ onClick: ($event) => selectEmoji(emoji),
789
+ onFocusin: ($event) => highlightEmoji(emoji),
790
+ onFocusout: _cache[0] || (_cache[0] = ($event) => highlightEmoji(null)),
791
+ onMouseover: ($event) => highlightEmoji(emoji),
792
+ onMouseleave: _cache[1] || (_cache[1] = ($event) => highlightEmoji(null)),
793
+ onKeydown: (event) => handleKeyDown(event, indexTab, indexEmoji, emoji)
794
+ }, [
795
+ createElementVNode("img", {
796
+ class: "d-icon d-icon--size-500",
797
+ alt: emoji.name,
798
+ "aria-label": emoji.name,
799
+ title: emoji.name,
800
+ src: getImgSrc(emoji.unicode_character),
801
+ onError: handleImageError
802
+ }, null, 40, _hoisted_6$1)
803
+ ], 40, _hoisted_5$1);
804
+ }), 128))
805
+ ])
806
+ ])), [
807
+ [vShow, !__props.emojiFilter]
808
+ ]);
809
+ }), 128)),
810
+ __props.emojiFilter ? (openBlock(), createElementBlock("div", _hoisted_7$1, [
811
+ createElementVNode("div", _hoisted_8, [
812
+ (openBlock(true), createElementBlock(Fragment, null, renderList(filteredEmojis.value, (emoji, index) => {
813
+ return openBlock(), createElementBlock("button", {
814
+ key: emoji.shortname,
815
+ ref_for: true,
816
+ ref: (el) => {
817
+ if (el)
818
+ unref(setFilteredRef)(el, index);
819
+ },
820
+ type: "button",
821
+ "aria-label": emoji.name,
822
+ class: normalizeClass({
823
+ "hover-emoji": index === 0 && unref(hoverFirstEmoji)
824
+ }),
825
+ onClick: ($event) => selectEmoji(emoji),
826
+ onFocusin: ($event) => highlightEmoji(emoji),
827
+ onFocusout: _cache[2] || (_cache[2] = ($event) => highlightEmoji(null)),
828
+ onMouseover: ($event) => hoverEmoji(emoji),
829
+ onMouseleave: _cache[3] || (_cache[3] = ($event) => hoverEmoji(null)),
830
+ onKeydown: (event) => handleKeyDownFilteredEmojis(event, index, emoji)
831
+ }, [
832
+ createElementVNode("img", {
833
+ class: "d-icon d-icon--size-500",
834
+ alt: emoji.name,
835
+ "aria-label": emoji.name,
836
+ title: emoji.name,
837
+ src: `${unref(CDN_URL) + emoji.unicode_character}.png`
838
+ }, null, 8, _hoisted_10)
839
+ ], 42, _hoisted_9);
840
+ }), 128))
841
+ ])
842
+ ])) : createCommentVNode("", true)
843
+ ], 512)
844
+ ]);
845
+ };
621
846
  }
622
- }, He = { "data-qa": "skin-selector" }, ze = { class: "d-emoji-picker__skin-list" }, Ye = ["onKeydown", "onClick"], Je = ["alt", "aria-label", "title", "src"], Qe = { class: "d-emoji-picker__skin-selected" }, Xe = ["aria-label"], Ze = ["alt", "aria-label", "title", "src"], xe = {
847
+ };
848
+ const _hoisted_1$2 = { "data-qa": "skin-selector" };
849
+ const _hoisted_2$2 = { class: "d-emoji-picker__skin-list" };
850
+ const _hoisted_3$1 = ["onKeydown", "onClick"];
851
+ const _hoisted_4$1 = ["alt", "aria-label", "title", "src"];
852
+ const _hoisted_5 = { class: "d-emoji-picker__skin-selected" };
853
+ const _hoisted_6 = ["aria-label"];
854
+ const _hoisted_7 = ["alt", "aria-label", "title", "src"];
855
+ const _sfc_main$2 = {
623
856
  __name: "emoji_skin_selector",
624
857
  props: {
625
858
  /**
@@ -629,15 +862,15 @@ const Ce = { class: "d-emoji-picker__selector" }, Me = {
629
862
  */
630
863
  skinTone: {
631
864
  type: String,
632
- required: !0
865
+ required: true
633
866
  },
634
867
  isHovering: {
635
868
  type: Boolean,
636
- default: !1
869
+ default: false
637
870
  },
638
871
  skinSelectorButtonTooltipLabel: {
639
872
  type: String,
640
- required: !0
873
+ required: true
641
874
  }
642
875
  },
643
876
  emits: [
@@ -650,124 +883,165 @@ const Ce = { class: "d-emoji-picker__selector" }, Me = {
650
883
  "focus-tabset",
651
884
  "focus-last-emoji"
652
885
  ],
653
- setup(o, { expose: k, emit: L }) {
654
- const i = o, u = L, R = [
886
+ setup(__props, { expose: __expose, emit: __emit }) {
887
+ const props = __props;
888
+ const emits = __emit;
889
+ const skinList = [
655
890
  {
656
891
  name: ":wave_tone1:",
657
892
  unicode_output: "1f44b-1f3fb",
658
- skinTone: q.LIGHT,
893
+ skinTone: EMOJI_PICKER_SKIN_TONE_MODIFIERS.LIGHT,
659
894
  skinCode: "_tone1"
660
895
  },
661
896
  {
662
897
  name: ":wave_tone2:",
663
898
  unicode_output: "1f44b-1f3fc",
664
- skinTone: q.MEDIUM_LIGHT,
899
+ skinTone: EMOJI_PICKER_SKIN_TONE_MODIFIERS.MEDIUM_LIGHT,
665
900
  skinCode: "_tone2"
666
901
  },
667
902
  {
668
903
  name: ":wave_tone3:",
669
904
  unicode_output: "1f44b-1f3fd",
670
- skinTone: q.MEDIUM,
905
+ skinTone: EMOJI_PICKER_SKIN_TONE_MODIFIERS.MEDIUM,
671
906
  skinCode: "_tone3"
672
907
  },
673
908
  {
674
909
  name: ":wave_tone4:",
675
910
  unicode_output: "1f44b-1f3fe",
676
- skinTone: q.MEDIUM_DARK,
911
+ skinTone: EMOJI_PICKER_SKIN_TONE_MODIFIERS.MEDIUM_DARK,
677
912
  skinCode: "_tone4"
678
913
  },
679
914
  {
680
915
  name: ":wave_tone5:",
681
916
  unicode_output: "1f44b-1f3ff",
682
- skinTone: q.DARK,
917
+ skinTone: EMOJI_PICKER_SKIN_TONE_MODIFIERS.DARK,
683
918
  skinCode: "_tone5"
684
919
  },
685
920
  {
686
921
  name: ":wave:",
687
922
  unicode_output: "1f44b",
688
- skinTone: q.DEFAULT,
923
+ skinTone: EMOJI_PICKER_SKIN_TONE_MODIFIERS.DEFAULT,
689
924
  skinCode: ""
690
925
  }
691
- ], h = p(!1), S = p(null), c = p([]);
692
- re(
693
- () => i.isHovering && (h.value = !1)
926
+ ];
927
+ const isOpen = ref(false);
928
+ const skinSelectorRef = ref(null);
929
+ const skinsRef = ref([]);
930
+ watchEffect(
931
+ () => props.isHovering && (isOpen.value = false)
694
932
  );
695
- const s = B(() => R.find((t) => t.skinTone === i.skinTone)), g = p(s.value);
696
- re(() => s.value && (g.value = s.value));
697
- function D(t) {
698
- c.value.push(t);
933
+ const skinPassedIn = computed(() => skinList.find((skin) => skin.skinTone === props.skinTone));
934
+ const skinSelected = ref(skinPassedIn.value);
935
+ watchEffect(() => skinPassedIn.value && (skinSelected.value = skinPassedIn.value));
936
+ function setSkinsRef(ref2) {
937
+ skinsRef.value.push(ref2);
699
938
  }
700
- function O() {
701
- S.value.focus();
939
+ function focusSkinSelector() {
940
+ skinSelectorRef.value.focus();
702
941
  }
703
- function A(t) {
704
- g.value = t, h.value = !1, u("skin-tone", t.skinTone), x(() => O());
942
+ function selectSkin(skin) {
943
+ skinSelected.value = skin;
944
+ isOpen.value = false;
945
+ emits("skin-tone", skin.skinTone);
946
+ nextTick(() => focusSkinSelector());
705
947
  }
706
- const l = (t, r, f) => {
707
- var b, j, C;
708
- t.preventDefault(), t.key === "ArrowLeft" && (f === 0 && ((b = c.value[c.value.length - 1]) == null || b.focus()), (j = c.value[f - 1]) == null || j.focus()), t.key === "ArrowRight" && ((C = c.value[f + 1]) == null || C.focus()), t.key === "Enter" && (r ? A(r) : e()), t.key === "Tab" && (t.shiftKey ? u("focus-last-emoji") : u("focus-tabset"));
948
+ const handleKeyDown = (event, skin, index) => {
949
+ var _a, _b, _c;
950
+ event.preventDefault();
951
+ if (event.key === "ArrowLeft") {
952
+ if (index === 0)
953
+ (_a = skinsRef.value[skinsRef.value.length - 1]) == null ? void 0 : _a.focus();
954
+ (_b = skinsRef.value[index - 1]) == null ? void 0 : _b.focus();
955
+ }
956
+ if (event.key === "ArrowRight") {
957
+ (_c = skinsRef.value[index + 1]) == null ? void 0 : _c.focus();
958
+ }
959
+ if (event.key === "Enter") {
960
+ if (skin) {
961
+ selectSkin(skin);
962
+ } else {
963
+ toggleSkinList();
964
+ }
965
+ }
966
+ if (event.key === "Tab") {
967
+ if (event.shiftKey) {
968
+ emits("focus-last-emoji");
969
+ } else {
970
+ emits("focus-tabset");
971
+ }
972
+ }
709
973
  };
710
- function e() {
711
- h.value = !h.value, x(() => c.value[0].focus());
712
- }
713
- return k({
714
- focusSkinSelector: O
715
- }), (t, r) => (y(), _("div", He, [
716
- oe(w("div", ze, [
717
- (y(), _(z, null, Y(R, (f, b) => w("button", {
718
- ref_for: !0,
719
- ref: (j) => {
720
- j && D(j);
721
- },
722
- key: f.name,
723
- class: ce({
724
- selected: g.value.skinCode === f.skinCode
725
- }),
726
- onKeydown: (j) => l(j, f, b),
727
- onClick: (j) => A(f)
728
- }, [
729
- w("img", {
730
- class: "d-icon d-icon--size-500",
731
- alt: f.name,
732
- "aria-label": f.name,
733
- title: f.name,
734
- src: `${T(Q) + f.unicode_output}.png`
735
- }, null, 8, Je)
736
- ], 42, Ye)), 64))
737
- ], 512), [
738
- [se, h.value]
739
- ]),
740
- oe(w("div", Qe, [
741
- F(T($e), { placement: "top-end" }, {
742
- anchor: H(() => [
743
- w("button", {
744
- ref_key: "skinSelectorRef",
745
- ref: S,
746
- "aria-label": o.skinSelectorButtonTooltipLabel,
747
- tabindex: "-1",
748
- onClick: e,
749
- onKeydown: r[0] || (r[0] = (f) => l(f))
974
+ function toggleSkinList() {
975
+ isOpen.value = !isOpen.value;
976
+ nextTick(() => skinsRef.value[0].focus());
977
+ }
978
+ __expose({
979
+ focusSkinSelector
980
+ });
981
+ return (_ctx, _cache) => {
982
+ return openBlock(), createElementBlock("div", _hoisted_1$2, [
983
+ withDirectives(createElementVNode("div", _hoisted_2$2, [
984
+ (openBlock(), createElementBlock(Fragment, null, renderList(skinList, (skin, index) => {
985
+ return createElementVNode("button", {
986
+ ref_for: true,
987
+ ref: (el) => {
988
+ if (el)
989
+ setSkinsRef(el);
990
+ },
991
+ key: skin.name,
992
+ class: normalizeClass({
993
+ "selected": skinSelected.value.skinCode === skin.skinCode
994
+ }),
995
+ onKeydown: (event) => handleKeyDown(event, skin, index),
996
+ onClick: ($event) => selectSkin(skin)
750
997
  }, [
751
- w("img", {
998
+ createElementVNode("img", {
752
999
  class: "d-icon d-icon--size-500",
753
- alt: g.value.name,
754
- "aria-label": g.value.name,
755
- title: g.value.name,
756
- src: `${T(Q) + g.value.unicode_output}.png`
757
- }, null, 8, Ze)
758
- ], 40, Xe)
759
- ]),
760
- default: H(() => [
761
- fe(J(o.skinSelectorButtonTooltipLabel) + " ", 1)
762
- ]),
763
- _: 1
764
- })
765
- ], 512), [
766
- [se, !h.value]
767
- ])
768
- ]));
1000
+ alt: skin.name,
1001
+ "aria-label": skin.name,
1002
+ title: skin.name,
1003
+ src: `${unref(CDN_URL) + skin.unicode_output}.png`
1004
+ }, null, 8, _hoisted_4$1)
1005
+ ], 42, _hoisted_3$1);
1006
+ }), 64))
1007
+ ], 512), [
1008
+ [vShow, isOpen.value]
1009
+ ]),
1010
+ withDirectives(createElementVNode("div", _hoisted_5, [
1011
+ createVNode(unref(DtTooltip), { placement: "top-end" }, {
1012
+ anchor: withCtx(() => [
1013
+ createElementVNode("button", {
1014
+ ref_key: "skinSelectorRef",
1015
+ ref: skinSelectorRef,
1016
+ "aria-label": __props.skinSelectorButtonTooltipLabel,
1017
+ tabindex: "-1",
1018
+ onClick: toggleSkinList,
1019
+ onKeydown: _cache[0] || (_cache[0] = (event) => handleKeyDown(event))
1020
+ }, [
1021
+ createElementVNode("img", {
1022
+ class: "d-icon d-icon--size-500",
1023
+ alt: skinSelected.value.name,
1024
+ "aria-label": skinSelected.value.name,
1025
+ title: skinSelected.value.name,
1026
+ src: `${unref(CDN_URL) + skinSelected.value.unicode_output}.png`
1027
+ }, null, 8, _hoisted_7)
1028
+ ], 40, _hoisted_6)
1029
+ ]),
1030
+ default: withCtx(() => [
1031
+ createTextVNode(toDisplayString(__props.skinSelectorButtonTooltipLabel) + " ", 1)
1032
+ ]),
1033
+ _: 1
1034
+ })
1035
+ ], 512), [
1036
+ [vShow, !isOpen.value]
1037
+ ])
1038
+ ]);
1039
+ };
769
1040
  }
770
- }, et = { class: "d-emoji-picker__data" }, tt = ["alt", "aria-label", "title", "src"], ot = {
1041
+ };
1042
+ const _hoisted_1$1 = { class: "d-emoji-picker__data" };
1043
+ const _hoisted_2$1 = ["alt", "aria-label", "title", "src"];
1044
+ const _sfc_main$1 = {
771
1045
  __name: "emoji_description",
772
1046
  props: {
773
1047
  /**
@@ -780,23 +1054,28 @@ const Ce = { class: "d-emoji-picker__selector" }, Me = {
780
1054
  default: null
781
1055
  }
782
1056
  },
783
- setup(o) {
784
- return (k, L) => {
785
- var i;
786
- return y(), _("div", et, [
787
- o.emoji ? (y(), _("img", {
1057
+ setup(__props) {
1058
+ return (_ctx, _cache) => {
1059
+ var _a;
1060
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [
1061
+ __props.emoji ? (openBlock(), createElementBlock("img", {
788
1062
  key: 0,
789
1063
  class: "d-icon d-icon--size-500",
790
- alt: o.emoji.name,
791
- "aria-label": o.emoji.name,
792
- title: o.emoji.name,
793
- src: `${T(Q) + o.emoji.unicode_character}.png`
794
- }, null, 8, tt)) : le("", !0),
795
- fe(" " + J((i = o.emoji) == null ? void 0 : i.name), 1)
1064
+ alt: __props.emoji.name,
1065
+ "aria-label": __props.emoji.name,
1066
+ title: __props.emoji.name,
1067
+ src: `${unref(CDN_URL) + __props.emoji.unicode_character}.png`
1068
+ }, null, 8, _hoisted_2$1)) : createCommentVNode("", true),
1069
+ createTextVNode(" " + toDisplayString((_a = __props.emoji) == null ? void 0 : _a.name), 1)
796
1070
  ]);
797
1071
  };
798
1072
  }
799
- }, lt = { class: "d-emoji-picker" }, st = { class: "d-emoji-picker--header" }, nt = { class: "d-emoji-picker--body" }, it = { class: "d-emoji-picker--footer" }, Et = {
1073
+ };
1074
+ const _hoisted_1 = { class: "d-emoji-picker" };
1075
+ const _hoisted_2 = { class: "d-emoji-picker--header" };
1076
+ const _hoisted_3 = { class: "d-emoji-picker--body" };
1077
+ const _hoisted_4 = { class: "d-emoji-picker--footer" };
1078
+ const _sfc_main = {
800
1079
  __name: "emoji_picker",
801
1080
  props: {
802
1081
  /**
@@ -821,7 +1100,7 @@ const Ce = { class: "d-emoji-picker__selector" }, Me = {
821
1100
  */
822
1101
  searchPlaceholderLabel: {
823
1102
  type: String,
824
- required: !0
1103
+ required: true
825
1104
  },
826
1105
  /**
827
1106
  * The label for the search results tab
@@ -832,7 +1111,7 @@ const Ce = { class: "d-emoji-picker__selector" }, Me = {
832
1111
  */
833
1112
  searchResultsLabel: {
834
1113
  type: String,
835
- required: !0
1114
+ required: true
836
1115
  },
837
1116
  /**
838
1117
  * The label for the search no results
@@ -843,7 +1122,7 @@ const Ce = { class: "d-emoji-picker__selector" }, Me = {
843
1122
  */
844
1123
  searchNoResultsLabel: {
845
1124
  type: String,
846
- required: !0
1125
+ required: true
847
1126
  },
848
1127
  /**
849
1128
  * The list of tabsets to show, it is necessary to be updated with the correct language
@@ -857,7 +1136,7 @@ const Ce = { class: "d-emoji-picker__selector" }, Me = {
857
1136
  */
858
1137
  tabSetLabels: {
859
1138
  type: Array,
860
- required: !0
1139
+ required: true
861
1140
  },
862
1141
  /**
863
1142
  * The skin tone to show the emojis
@@ -881,7 +1160,7 @@ const Ce = { class: "d-emoji-picker__selector" }, Me = {
881
1160
  */
882
1161
  skinSelectorButtonTooltipLabel: {
883
1162
  type: String,
884
- required: !0
1163
+ required: true
885
1164
  }
886
1165
  },
887
1166
  emits: [
@@ -903,86 +1182,97 @@ const Ce = { class: "d-emoji-picker__selector" }, Me = {
903
1182
  */
904
1183
  "close"
905
1184
  ],
906
- setup(o, { emit: k }) {
907
- const L = o, i = k, u = p(""), R = p(null), h = p({}), S = p(0), c = p(!1), s = B(() => L.recentlyUsedEmojis.length > 0);
908
- function g(l) {
909
- u.value = "", h.value = l, h.value = { ...h.value, tabId: l };
910
- }
911
- function D(l) {
912
- S.value = l;
913
- }
914
- function O(l) {
915
- c.value = l;
916
- }
917
- function A(l) {
918
- R.value = l;
919
- }
920
- return (l, e) => (y(), _("div", lt, [
921
- w("div", st, [
922
- F(De, {
923
- ref: "tabsetRef",
924
- "emoji-filter": u.value,
925
- "show-recently-used-tab": s.value,
926
- "scroll-into-tab": S.value,
927
- "tabset-labels": o.tabSetLabels,
928
- "is-scrolling": c.value,
929
- onFocusSearchInput: e[0] || (e[0] = (t) => l.$refs.searchInputRef.focusSearchInput()),
930
- onFocusSkinSelector: e[1] || (e[1] = (t) => l.$refs.skinSelectorRef.focusSkinSelector()),
931
- onSelectedTabset: g,
932
- onKeydown: e[2] || (e[2] = U((t) => i("close"), ["esc"]))
933
- }, null, 8, ["emoji-filter", "show-recently-used-tab", "scroll-into-tab", "tabset-labels", "is-scrolling"])
934
- ]),
935
- w("div", nt, [
936
- F(Ie, {
937
- ref: "searchInputRef",
938
- modelValue: u.value,
939
- "onUpdate:modelValue": e[3] || (e[3] = (t) => u.value = t),
940
- "search-placeholder-label": o.searchPlaceholderLabel,
941
- onSelectFirstEmoji: e[4] || (e[4] = (t) => i("selected-emoji", R.value)),
942
- onFocusTabset: e[5] || (e[5] = (t) => l.$refs.tabsetRef.focusTabset()),
943
- onFocusEmojiSelector: e[6] || (e[6] = (t) => l.$refs.emojiSelectorRef.focusEmojiSelector()),
944
- onKeydown: e[7] || (e[7] = U((t) => i("close"), ["esc"]))
945
- }, null, 8, ["modelValue", "search-placeholder-label"]),
946
- F(Ge, {
947
- ref: "emojiSelectorRef",
948
- "emoji-filter": u.value,
949
- "skin-tone": o.skinTone,
950
- "tabset-labels": o.tabSetLabels,
951
- "search-results-label": o.searchResultsLabel,
952
- "search-no-results-label": o.searchNoResultsLabel,
953
- "recently-used-emojis": o.recentlyUsedEmojis,
954
- "selected-tabset": h.value,
955
- onScrollIntoTab: D,
956
- onIsScrolling: O,
957
- onHighlightedEmoji: A,
958
- onSelectedEmoji: e[8] || (e[8] = (t) => i("selected-emoji", t)),
959
- onFocusSkinSelector: e[9] || (e[9] = (t) => l.$refs.skinSelectorRef.focusSkinSelector()),
960
- onFocusSearchInput: e[10] || (e[10] = (t) => l.$refs.searchInputRef.focusSearchInput()),
961
- onKeydown: e[11] || (e[11] = U((t) => i("close"), ["esc"]))
962
- }, null, 8, ["emoji-filter", "skin-tone", "tabset-labels", "search-results-label", "search-no-results-label", "recently-used-emojis", "selected-tabset"])
963
- ]),
964
- w("div", it, [
965
- F(ot, { emoji: R.value }, null, 8, ["emoji"]),
966
- F(xe, {
967
- ref: "skinSelectorRef",
968
- "is-hovering": !!R.value,
969
- "skin-selector-button-tooltip-label": o.skinSelectorButtonTooltipLabel,
970
- "skin-tone": o.skinTone,
971
- onSkinTone: e[12] || (e[12] = (t) => i("skin-tone", t)),
972
- onFocusTabset: e[13] || (e[13] = (t) => l.$refs.tabsetRef.focusTabset()),
973
- onFocusLastEmoji: e[14] || (e[14] = (t) => l.$refs.emojiSelectorRef.focusLastEmoji()),
974
- onKeydown: e[15] || (e[15] = U((t) => i("close"), ["esc"]))
975
- }, null, 8, ["is-hovering", "skin-selector-button-tooltip-label", "skin-tone"])
976
- ])
977
- ]));
1185
+ setup(__props, { emit: __emit }) {
1186
+ const props = __props;
1187
+ const emits = __emit;
1188
+ const searchQuery = ref("");
1189
+ const highlightedEmoji = ref(null);
1190
+ const selectedTabset = ref({});
1191
+ const scrollIntoTab = ref(0);
1192
+ const isScrolling = ref(false);
1193
+ const showRecentlyUsedTab = computed(() => props.recentlyUsedEmojis.length > 0);
1194
+ function scrollToSelectedTabset(tabId) {
1195
+ searchQuery.value = "";
1196
+ selectedTabset.value = tabId;
1197
+ selectedTabset.value = { ...selectedTabset.value, tabId };
1198
+ }
1199
+ function updateScrollIntoTab(value) {
1200
+ scrollIntoTab.value = value;
1201
+ }
1202
+ function updateIsScrolling(value) {
1203
+ isScrolling.value = value;
1204
+ }
1205
+ function updateHighlightedEmoji(emoji) {
1206
+ highlightedEmoji.value = emoji;
1207
+ }
1208
+ return (_ctx, _cache) => {
1209
+ return openBlock(), createElementBlock("div", _hoisted_1, [
1210
+ createElementVNode("div", _hoisted_2, [
1211
+ createVNode(_sfc_main$4, {
1212
+ ref: "tabsetRef",
1213
+ "emoji-filter": searchQuery.value,
1214
+ "show-recently-used-tab": showRecentlyUsedTab.value,
1215
+ "scroll-into-tab": scrollIntoTab.value,
1216
+ "tabset-labels": __props.tabSetLabels,
1217
+ "is-scrolling": isScrolling.value,
1218
+ onFocusSearchInput: _cache[0] || (_cache[0] = ($event) => _ctx.$refs.searchInputRef.focusSearchInput()),
1219
+ onFocusSkinSelector: _cache[1] || (_cache[1] = ($event) => _ctx.$refs.skinSelectorRef.focusSkinSelector()),
1220
+ onSelectedTabset: scrollToSelectedTabset,
1221
+ onKeydown: _cache[2] || (_cache[2] = withKeys(($event) => emits("close"), ["esc"]))
1222
+ }, null, 8, ["emoji-filter", "show-recently-used-tab", "scroll-into-tab", "tabset-labels", "is-scrolling"])
1223
+ ]),
1224
+ createElementVNode("div", _hoisted_3, [
1225
+ createVNode(_sfc_main$5, {
1226
+ ref: "searchInputRef",
1227
+ modelValue: searchQuery.value,
1228
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => searchQuery.value = $event),
1229
+ "search-placeholder-label": __props.searchPlaceholderLabel,
1230
+ onSelectFirstEmoji: _cache[4] || (_cache[4] = ($event) => emits("selected-emoji", highlightedEmoji.value)),
1231
+ onFocusTabset: _cache[5] || (_cache[5] = ($event) => _ctx.$refs.tabsetRef.focusTabset()),
1232
+ onFocusEmojiSelector: _cache[6] || (_cache[6] = ($event) => _ctx.$refs.emojiSelectorRef.focusEmojiSelector()),
1233
+ onKeydown: _cache[7] || (_cache[7] = withKeys(($event) => emits("close"), ["esc"]))
1234
+ }, null, 8, ["modelValue", "search-placeholder-label"]),
1235
+ createVNode(_sfc_main$3, {
1236
+ ref: "emojiSelectorRef",
1237
+ "emoji-filter": searchQuery.value,
1238
+ "skin-tone": __props.skinTone,
1239
+ "tabset-labels": __props.tabSetLabels,
1240
+ "search-results-label": __props.searchResultsLabel,
1241
+ "search-no-results-label": __props.searchNoResultsLabel,
1242
+ "recently-used-emojis": __props.recentlyUsedEmojis,
1243
+ "selected-tabset": selectedTabset.value,
1244
+ onScrollIntoTab: updateScrollIntoTab,
1245
+ onIsScrolling: updateIsScrolling,
1246
+ onHighlightedEmoji: updateHighlightedEmoji,
1247
+ onSelectedEmoji: _cache[8] || (_cache[8] = ($event) => emits("selected-emoji", $event)),
1248
+ onFocusSkinSelector: _cache[9] || (_cache[9] = ($event) => _ctx.$refs.skinSelectorRef.focusSkinSelector()),
1249
+ onFocusSearchInput: _cache[10] || (_cache[10] = ($event) => _ctx.$refs.searchInputRef.focusSearchInput()),
1250
+ onKeydown: _cache[11] || (_cache[11] = withKeys(($event) => emits("close"), ["esc"]))
1251
+ }, null, 8, ["emoji-filter", "skin-tone", "tabset-labels", "search-results-label", "search-no-results-label", "recently-used-emojis", "selected-tabset"])
1252
+ ]),
1253
+ createElementVNode("div", _hoisted_4, [
1254
+ createVNode(_sfc_main$1, { emoji: highlightedEmoji.value }, null, 8, ["emoji"]),
1255
+ createVNode(_sfc_main$2, {
1256
+ ref: "skinSelectorRef",
1257
+ "is-hovering": !!highlightedEmoji.value,
1258
+ "skin-selector-button-tooltip-label": __props.skinSelectorButtonTooltipLabel,
1259
+ "skin-tone": __props.skinTone,
1260
+ onSkinTone: _cache[12] || (_cache[12] = ($event) => emits("skin-tone", $event)),
1261
+ onFocusTabset: _cache[13] || (_cache[13] = ($event) => _ctx.$refs.tabsetRef.focusTabset()),
1262
+ onFocusLastEmoji: _cache[14] || (_cache[14] = ($event) => _ctx.$refs.emojiSelectorRef.focusLastEmoji()),
1263
+ onKeydown: _cache[15] || (_cache[15] = withKeys(($event) => emits("close"), ["esc"]))
1264
+ }, null, 8, ["is-hovering", "skin-selector-button-tooltip-label", "skin-tone"])
1265
+ ])
1266
+ ]);
1267
+ };
978
1268
  }
979
1269
  };
980
1270
  export {
981
- G as ARROW_KEYS,
982
- Q as CDN_URL,
983
- Et as DtEmojiPicker,
984
- $ as EMOJIS_PER_ROW,
985
- K as EMOJI_PICKER_CATEGORIES,
986
- q as EMOJI_PICKER_SKIN_TONE_MODIFIERS
1271
+ ARROW_KEYS,
1272
+ CDN_URL,
1273
+ _sfc_main as DtEmojiPicker,
1274
+ EMOJIS_PER_ROW,
1275
+ EMOJI_PICKER_CATEGORIES,
1276
+ EMOJI_PICKER_SKIN_TONE_MODIFIERS
987
1277
  };
988
1278
  //# sourceMappingURL=emoji-picker.js.map