@dialpad/dialtone 9.122.0 → 9.123.1

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 (381) hide show
  1. package/dist/css/dialtone-default-theme.css +28 -28
  2. package/dist/css/dialtone-default-theme.min.css +1 -1
  3. package/dist/css/dialtone-docs.json +1 -1
  4. package/dist/css/dialtone.css +28 -28
  5. package/dist/css/dialtone.min.css +1 -1
  6. package/dist/tokens/doc.json +30809 -30809
  7. package/dist/vue2/_plugin-vue2_normalizer-CeySl7Fu.js +11 -0
  8. package/dist/vue2/_plugin-vue2_normalizer-CeySl7Fu.js.map +1 -0
  9. package/dist/vue2/_plugin-vue2_normalizer-yXi3ZRRD.cjs +2 -0
  10. package/dist/vue2/_plugin-vue2_normalizer-yXi3ZRRD.cjs.map +1 -0
  11. package/dist/vue2/component-documentation.json +1 -1
  12. package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs +1 -1
  13. package/dist/vue2/lib/attachment-carousel/attachment-carousel.cjs.map +1 -1
  14. package/dist/vue2/lib/attachment-carousel/attachment-carousel.js +17 -8
  15. package/dist/vue2/lib/attachment-carousel/attachment-carousel.js.map +1 -1
  16. package/dist/vue2/lib/avatar/avatar.cjs +1 -1
  17. package/dist/vue2/lib/avatar/avatar.js +5 -2
  18. package/dist/vue2/lib/avatar/avatar.js.map +1 -1
  19. package/dist/vue2/lib/badge/badge.cjs +1 -1
  20. package/dist/vue2/lib/badge/badge.js +7 -4
  21. package/dist/vue2/lib/badge/badge.js.map +1 -1
  22. package/dist/vue2/lib/banner/banner.cjs +2 -2
  23. package/dist/vue2/lib/banner/banner.js +9 -6
  24. package/dist/vue2/lib/banner/banner.js.map +1 -1
  25. package/dist/vue2/lib/breadcrumbs/breadcrumb-item.cjs +1 -1
  26. package/dist/vue2/lib/breadcrumbs/breadcrumb-item.js +7 -4
  27. package/dist/vue2/lib/breadcrumbs/breadcrumb-item.js.map +1 -1
  28. package/dist/vue2/lib/breadcrumbs/breadcrumbs.cjs +1 -1
  29. package/dist/vue2/lib/breadcrumbs/breadcrumbs.js +5 -2
  30. package/dist/vue2/lib/breadcrumbs/breadcrumbs.js.map +1 -1
  31. package/dist/vue2/lib/button/button.cjs +1 -1
  32. package/dist/vue2/lib/button/button.js +5 -2
  33. package/dist/vue2/lib/button/button.js.map +1 -1
  34. package/dist/vue2/lib/button-group/button-group.cjs +1 -1
  35. package/dist/vue2/lib/button-group/button-group.js +11 -8
  36. package/dist/vue2/lib/button-group/button-group.js.map +1 -1
  37. package/dist/vue2/lib/button-group/buttons-decorator.cjs +1 -1
  38. package/dist/vue2/lib/button-group/buttons-decorator.js +7 -4
  39. package/dist/vue2/lib/button-group/buttons-decorator.js.map +1 -1
  40. package/dist/vue2/lib/callbar-button/callbar-button.cjs +1 -1
  41. package/dist/vue2/lib/callbar-button/callbar-button.js +10 -7
  42. package/dist/vue2/lib/callbar-button/callbar-button.js.map +1 -1
  43. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.cjs +1 -1
  44. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js +5 -2
  45. package/dist/vue2/lib/callbar-button-with-dropdown/callbar-button-with-dropdown.js.map +1 -1
  46. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.cjs +1 -1
  47. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js +12 -9
  48. package/dist/vue2/lib/callbar-button-with-popover/callbar-button-with-popover.js.map +1 -1
  49. package/dist/vue2/lib/callbox/callbox.cjs +1 -1
  50. package/dist/vue2/lib/callbox/callbox.js +5 -2
  51. package/dist/vue2/lib/callbox/callbox.js.map +1 -1
  52. package/dist/vue2/lib/card/card.cjs +1 -1
  53. package/dist/vue2/lib/card/card.js +7 -4
  54. package/dist/vue2/lib/card/card.js.map +1 -1
  55. package/dist/vue2/lib/checkbox/checkbox.cjs +1 -1
  56. package/dist/vue2/lib/checkbox/checkbox.js +5 -2
  57. package/dist/vue2/lib/checkbox/checkbox.js.map +1 -1
  58. package/dist/vue2/lib/checkbox-group/checkbox-group.cjs +1 -1
  59. package/dist/vue2/lib/checkbox-group/checkbox-group.js +8 -5
  60. package/dist/vue2/lib/checkbox-group/checkbox-group.js.map +1 -1
  61. package/dist/vue2/lib/checkbox-group/checkboxes-decorator.cjs +1 -1
  62. package/dist/vue2/lib/checkbox-group/checkboxes-decorator.js +12 -9
  63. package/dist/vue2/lib/checkbox-group/checkboxes-decorator.js.map +1 -1
  64. package/dist/vue2/lib/chip/chip.cjs +1 -1
  65. package/dist/vue2/lib/chip/chip.js +11 -8
  66. package/dist/vue2/lib/chip/chip.js.map +1 -1
  67. package/dist/vue2/lib/codeblock/codeblock.cjs +2 -2
  68. package/dist/vue2/lib/codeblock/codeblock.js +11 -8
  69. package/dist/vue2/lib/codeblock/codeblock.js.map +1 -1
  70. package/dist/vue2/lib/collapsible/collapsible-lazy-show.cjs +1 -1
  71. package/dist/vue2/lib/collapsible/collapsible-lazy-show.js +5 -2
  72. package/dist/vue2/lib/collapsible/collapsible-lazy-show.js.map +1 -1
  73. package/dist/vue2/lib/collapsible/collapsible.cjs +1 -1
  74. package/dist/vue2/lib/collapsible/collapsible.js +7 -4
  75. package/dist/vue2/lib/collapsible/collapsible.js.map +1 -1
  76. package/dist/vue2/lib/combobox/combobox-empty-list.cjs +1 -1
  77. package/dist/vue2/lib/combobox/combobox-empty-list.js +10 -7
  78. package/dist/vue2/lib/combobox/combobox-empty-list.js.map +1 -1
  79. package/dist/vue2/lib/combobox/combobox-loading-list.cjs +1 -1
  80. package/dist/vue2/lib/combobox/combobox-loading-list.js +10 -7
  81. package/dist/vue2/lib/combobox/combobox-loading-list.js.map +1 -1
  82. package/dist/vue2/lib/combobox/combobox.cjs +2 -2
  83. package/dist/vue2/lib/combobox/combobox.js +5 -2
  84. package/dist/vue2/lib/combobox/combobox.js.map +1 -1
  85. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.cjs +1 -1
  86. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js +9 -6
  87. package/dist/vue2/lib/combobox-multi-select/combobox-multi-select.js.map +1 -1
  88. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.cjs +1 -1
  89. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js +5 -2
  90. package/dist/vue2/lib/combobox-with-popover/combobox-with-popover.js.map +1 -1
  91. package/dist/vue2/lib/contact-centers-row/contact-centers-row.cjs +1 -1
  92. package/dist/vue2/lib/contact-centers-row/contact-centers-row.js +9 -6
  93. package/dist/vue2/lib/contact-centers-row/contact-centers-row.js.map +1 -1
  94. package/dist/vue2/lib/contact-info/contact-info.cjs +1 -1
  95. package/dist/vue2/lib/contact-info/contact-info.js +8 -5
  96. package/dist/vue2/lib/contact-info/contact-info.js.map +1 -1
  97. package/dist/vue2/lib/contact-row/contact-row.cjs +1 -1
  98. package/dist/vue2/lib/contact-row/contact-row.js +5 -2
  99. package/dist/vue2/lib/contact-row/contact-row.js.map +1 -1
  100. package/dist/vue2/lib/datepicker/datepicker.cjs +1 -1
  101. package/dist/vue2/lib/datepicker/datepicker.cjs.map +1 -1
  102. package/dist/vue2/lib/datepicker/datepicker.js +13 -4
  103. package/dist/vue2/lib/datepicker/datepicker.js.map +1 -1
  104. package/dist/vue2/lib/description-list/description-list.cjs +1 -1
  105. package/dist/vue2/lib/description-list/description-list.js +13 -10
  106. package/dist/vue2/lib/description-list/description-list.js.map +1 -1
  107. package/dist/vue2/lib/dropdown/dropdown-list.cjs +1 -1
  108. package/dist/vue2/lib/dropdown/dropdown-list.js +8 -5
  109. package/dist/vue2/lib/dropdown/dropdown-list.js.map +1 -1
  110. package/dist/vue2/lib/dropdown/dropdown-separator.cjs +1 -1
  111. package/dist/vue2/lib/dropdown/dropdown-separator.js +7 -4
  112. package/dist/vue2/lib/dropdown/dropdown-separator.js.map +1 -1
  113. package/dist/vue2/lib/dropdown/dropdown.cjs +1 -1
  114. package/dist/vue2/lib/dropdown/dropdown.js +5 -2
  115. package/dist/vue2/lib/dropdown/dropdown.js.map +1 -1
  116. package/dist/vue2/lib/editor/editor.cjs +1 -1
  117. package/dist/vue2/lib/editor/editor.js +49 -46
  118. package/dist/vue2/lib/editor/editor.js.map +1 -1
  119. package/dist/vue2/lib/emoji/emoji.cjs +1 -1
  120. package/dist/vue2/lib/emoji/emoji.js +10 -7
  121. package/dist/vue2/lib/emoji/emoji.js.map +1 -1
  122. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs +1 -1
  123. package/dist/vue2/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  124. package/dist/vue2/lib/emoji-picker/emoji-picker.js +34 -13
  125. package/dist/vue2/lib/emoji-picker/emoji-picker.js.map +1 -1
  126. package/dist/vue2/lib/emoji-row/emoji-row.cjs +1 -1
  127. package/dist/vue2/lib/emoji-row/emoji-row.js +6 -3
  128. package/dist/vue2/lib/emoji-row/emoji-row.js.map +1 -1
  129. package/dist/vue2/lib/emoji-text-wrapper/emoji-text-wrapper.cjs +1 -1
  130. package/dist/vue2/lib/emoji-text-wrapper/emoji-text-wrapper.js +9 -6
  131. package/dist/vue2/lib/emoji-text-wrapper/emoji-text-wrapper.js.map +1 -1
  132. package/dist/vue2/lib/empty-state/empty-state.cjs +1 -1
  133. package/dist/vue2/lib/empty-state/empty-state.js +9 -6
  134. package/dist/vue2/lib/empty-state/empty-state.js.map +1 -1
  135. package/dist/vue2/lib/feed-item-pill/feed-item-pill.cjs +1 -1
  136. package/dist/vue2/lib/feed-item-pill/feed-item-pill.js +14 -11
  137. package/dist/vue2/lib/feed-item-pill/feed-item-pill.js.map +1 -1
  138. package/dist/vue2/lib/feed-item-row/feed-item-row.cjs +1 -1
  139. package/dist/vue2/lib/feed-item-row/feed-item-row.js +9 -6
  140. package/dist/vue2/lib/feed-item-row/feed-item-row.js.map +1 -1
  141. package/dist/vue2/lib/general-row/general-row.cjs +1 -1
  142. package/dist/vue2/lib/general-row/general-row.js +5 -2
  143. package/dist/vue2/lib/general-row/general-row.js.map +1 -1
  144. package/dist/vue2/lib/general-row/leftbar-general-row-icon.cjs +1 -1
  145. package/dist/vue2/lib/general-row/leftbar-general-row-icon.js +10 -7
  146. package/dist/vue2/lib/general-row/leftbar-general-row-icon.js.map +1 -1
  147. package/dist/vue2/lib/group-row/group-row.cjs +1 -1
  148. package/dist/vue2/lib/group-row/group-row.js +7 -4
  149. package/dist/vue2/lib/group-row/group-row.js.map +1 -1
  150. package/dist/vue2/lib/grouped-chip/grouped-chip.cjs +1 -1
  151. package/dist/vue2/lib/grouped-chip/grouped-chip.js +7 -4
  152. package/dist/vue2/lib/grouped-chip/grouped-chip.js.map +1 -1
  153. package/dist/vue2/lib/hovercard/hovercard.cjs +1 -1
  154. package/dist/vue2/lib/hovercard/hovercard.js +9 -6
  155. package/dist/vue2/lib/hovercard/hovercard.js.map +1 -1
  156. package/dist/vue2/lib/icon/icon.cjs +1 -1
  157. package/dist/vue2/lib/icon/icon.js +12 -9
  158. package/dist/vue2/lib/icon/icon.js.map +1 -1
  159. package/dist/vue2/lib/illustration/illustration.cjs +1 -1
  160. package/dist/vue2/lib/illustration/illustration.js +13 -10
  161. package/dist/vue2/lib/illustration/illustration.js.map +1 -1
  162. package/dist/vue2/lib/image-viewer/image-viewer.cjs +1 -1
  163. package/dist/vue2/lib/image-viewer/image-viewer.js +9 -6
  164. package/dist/vue2/lib/image-viewer/image-viewer.js.map +1 -1
  165. package/dist/vue2/lib/input/input.cjs +1 -1
  166. package/dist/vue2/lib/input/input.js +5 -2
  167. package/dist/vue2/lib/input/input.js.map +1 -1
  168. package/dist/vue2/lib/input-group/input-group.cjs +1 -1
  169. package/dist/vue2/lib/input-group/input-group.js +9 -6
  170. package/dist/vue2/lib/input-group/input-group.js.map +1 -1
  171. package/dist/vue2/lib/item-layout/item-layout.cjs +2 -2
  172. package/dist/vue2/lib/item-layout/item-layout.js +7 -4
  173. package/dist/vue2/lib/item-layout/item-layout.js.map +1 -1
  174. package/dist/vue2/lib/ivr-node/ivr-node.cjs +1 -1
  175. package/dist/vue2/lib/ivr-node/ivr-node.js +14 -11
  176. package/dist/vue2/lib/ivr-node/ivr-node.js.map +1 -1
  177. package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.cjs +1 -1
  178. package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.js +13 -10
  179. package/dist/vue2/lib/keyboard-shortcut/keyboard-shortcut.js.map +1 -1
  180. package/dist/vue2/lib/lazy-show/lazy-show.cjs +1 -1
  181. package/dist/vue2/lib/lazy-show/lazy-show.js +5 -2
  182. package/dist/vue2/lib/lazy-show/lazy-show.js.map +1 -1
  183. package/dist/vue2/lib/link/link.cjs +1 -1
  184. package/dist/vue2/lib/link/link.js +9 -6
  185. package/dist/vue2/lib/link/link.js.map +1 -1
  186. package/dist/vue2/lib/list-item/list-item.cjs +1 -1
  187. package/dist/vue2/lib/list-item/list-item.js +25 -22
  188. package/dist/vue2/lib/list-item/list-item.js.map +1 -1
  189. package/dist/vue2/lib/list-item-group/list-item-group.cjs +1 -1
  190. package/dist/vue2/lib/list-item-group/list-item-group.js +11 -8
  191. package/dist/vue2/lib/list-item-group/list-item-group.js.map +1 -1
  192. package/dist/vue2/lib/message-input/message-input-button.cjs +1 -1
  193. package/dist/vue2/lib/message-input/message-input-button.js +7 -4
  194. package/dist/vue2/lib/message-input/message-input-button.js.map +1 -1
  195. package/dist/vue2/lib/message-input/message-input-link.cjs +1 -1
  196. package/dist/vue2/lib/message-input/message-input-link.js +5 -2
  197. package/dist/vue2/lib/message-input/message-input-link.js.map +1 -1
  198. package/dist/vue2/lib/message-input/message-input-topbar.cjs +1 -1
  199. package/dist/vue2/lib/message-input/message-input-topbar.js +5 -2
  200. package/dist/vue2/lib/message-input/message-input-topbar.js.map +1 -1
  201. package/dist/vue2/lib/message-input/message-input.cjs +1 -1
  202. package/dist/vue2/lib/message-input/message-input.cjs.map +1 -1
  203. package/dist/vue2/lib/message-input/message-input.js +23 -9
  204. package/dist/vue2/lib/message-input/message-input.js.map +1 -1
  205. package/dist/vue2/lib/modal/modal.cjs +2 -2
  206. package/dist/vue2/lib/modal/modal.js +5 -2
  207. package/dist/vue2/lib/modal/modal.js.map +1 -1
  208. package/dist/vue2/lib/notice/notice-action.cjs +1 -1
  209. package/dist/vue2/lib/notice/notice-action.js +7 -4
  210. package/dist/vue2/lib/notice/notice-action.js.map +1 -1
  211. package/dist/vue2/lib/notice/notice-content.cjs +1 -1
  212. package/dist/vue2/lib/notice/notice-content.js +5 -2
  213. package/dist/vue2/lib/notice/notice-content.js.map +1 -1
  214. package/dist/vue2/lib/notice/notice-icon.cjs +1 -1
  215. package/dist/vue2/lib/notice/notice-icon.js +16 -13
  216. package/dist/vue2/lib/notice/notice-icon.js.map +1 -1
  217. package/dist/vue2/lib/notice/notice.cjs +1 -1
  218. package/dist/vue2/lib/notice/notice.js +10 -7
  219. package/dist/vue2/lib/notice/notice.js.map +1 -1
  220. package/dist/vue2/lib/pagination/pagination.cjs +1 -1
  221. package/dist/vue2/lib/pagination/pagination.js +9 -6
  222. package/dist/vue2/lib/pagination/pagination.js.map +1 -1
  223. package/dist/vue2/lib/popover/popover-header-footer.cjs +1 -1
  224. package/dist/vue2/lib/popover/popover-header-footer.js +8 -5
  225. package/dist/vue2/lib/popover/popover-header-footer.js.map +1 -1
  226. package/dist/vue2/lib/popover/popover.cjs +1 -1
  227. package/dist/vue2/lib/popover/popover.js +5 -2
  228. package/dist/vue2/lib/popover/popover.js.map +1 -1
  229. package/dist/vue2/lib/presence/presence.cjs +1 -1
  230. package/dist/vue2/lib/presence/presence.js +7 -4
  231. package/dist/vue2/lib/presence/presence.js.map +1 -1
  232. package/dist/vue2/lib/radio/radio.cjs +1 -1
  233. package/dist/vue2/lib/radio/radio.js +8 -5
  234. package/dist/vue2/lib/radio/radio.js.map +1 -1
  235. package/dist/vue2/lib/radio-group/radio-group.cjs +1 -1
  236. package/dist/vue2/lib/radio-group/radio-group.js +5 -2
  237. package/dist/vue2/lib/radio-group/radio-group.js.map +1 -1
  238. package/dist/vue2/lib/radio-group/radios-decorator.cjs +1 -1
  239. package/dist/vue2/lib/radio-group/radios-decorator.js +9 -6
  240. package/dist/vue2/lib/radio-group/radios-decorator.js.map +1 -1
  241. package/dist/vue2/lib/rich-text-editor/mention-suggestion.cjs +1 -1
  242. package/dist/vue2/lib/rich-text-editor/mention-suggestion.cjs.map +1 -1
  243. package/dist/vue2/lib/rich-text-editor/mention-suggestion.js +33 -14
  244. package/dist/vue2/lib/rich-text-editor/mention-suggestion.js.map +1 -1
  245. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs +4 -4
  246. package/dist/vue2/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  247. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js +364 -315
  248. package/dist/vue2/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  249. package/dist/vue2/lib/root-layout/root-layout.cjs +1 -1
  250. package/dist/vue2/lib/root-layout/root-layout.js +8 -5
  251. package/dist/vue2/lib/root-layout/root-layout.js.map +1 -1
  252. package/dist/vue2/lib/select-menu/select-menu.cjs +1 -1
  253. package/dist/vue2/lib/select-menu/select-menu.js +5 -2
  254. package/dist/vue2/lib/select-menu/select-menu.js.map +1 -1
  255. package/dist/vue2/lib/settings-menu-button/settings-menu-button.cjs +1 -1
  256. package/dist/vue2/lib/settings-menu-button/settings-menu-button.js +7 -4
  257. package/dist/vue2/lib/settings-menu-button/settings-menu-button.js.map +1 -1
  258. package/dist/vue2/lib/skeleton/skeleton-list-item.cjs +1 -1
  259. package/dist/vue2/lib/skeleton/skeleton-list-item.js +5 -2
  260. package/dist/vue2/lib/skeleton/skeleton-list-item.js.map +1 -1
  261. package/dist/vue2/lib/skeleton/skeleton-paragraph.cjs +1 -1
  262. package/dist/vue2/lib/skeleton/skeleton-paragraph.js +8 -5
  263. package/dist/vue2/lib/skeleton/skeleton-paragraph.js.map +1 -1
  264. package/dist/vue2/lib/skeleton/skeleton-shape.cjs +1 -1
  265. package/dist/vue2/lib/skeleton/skeleton-shape.js +7 -4
  266. package/dist/vue2/lib/skeleton/skeleton-shape.js.map +1 -1
  267. package/dist/vue2/lib/skeleton/skeleton-text.cjs +1 -1
  268. package/dist/vue2/lib/skeleton/skeleton-text.js +14 -11
  269. package/dist/vue2/lib/skeleton/skeleton-text.js.map +1 -1
  270. package/dist/vue2/lib/skeleton/skeleton.cjs +1 -1
  271. package/dist/vue2/lib/skeleton/skeleton.js +9 -6
  272. package/dist/vue2/lib/skeleton/skeleton.js.map +1 -1
  273. package/dist/vue2/lib/split-button/split-button-alpha.cjs +1 -1
  274. package/dist/vue2/lib/split-button/split-button-alpha.js +12 -9
  275. package/dist/vue2/lib/split-button/split-button-alpha.js.map +1 -1
  276. package/dist/vue2/lib/split-button/split-button-omega.cjs +1 -1
  277. package/dist/vue2/lib/split-button/split-button-omega.js +9 -6
  278. package/dist/vue2/lib/split-button/split-button-omega.js.map +1 -1
  279. package/dist/vue2/lib/split-button/split-button.cjs +1 -1
  280. package/dist/vue2/lib/split-button/split-button.js +9 -6
  281. package/dist/vue2/lib/split-button/split-button.js.map +1 -1
  282. package/dist/vue2/lib/stack/stack.cjs +1 -1
  283. package/dist/vue2/lib/stack/stack.js +15 -12
  284. package/dist/vue2/lib/stack/stack.js.map +1 -1
  285. package/dist/vue2/lib/tab/tab-group.cjs +1 -1
  286. package/dist/vue2/lib/tab/tab-group.js +5 -2
  287. package/dist/vue2/lib/tab/tab-group.js.map +1 -1
  288. package/dist/vue2/lib/tab/tab-panel.cjs +1 -1
  289. package/dist/vue2/lib/tab/tab-panel.js +11 -8
  290. package/dist/vue2/lib/tab/tab-panel.js.map +1 -1
  291. package/dist/vue2/lib/tab/tab.cjs +1 -1
  292. package/dist/vue2/lib/tab/tab.js +10 -7
  293. package/dist/vue2/lib/tab/tab.js.map +1 -1
  294. package/dist/vue2/lib/time-pill/time-pill.cjs +1 -1
  295. package/dist/vue2/lib/time-pill/time-pill.js +8 -5
  296. package/dist/vue2/lib/time-pill/time-pill.js.map +1 -1
  297. package/dist/vue2/lib/toast/toast.cjs +1 -1
  298. package/dist/vue2/lib/toast/toast.cjs.map +1 -1
  299. package/dist/vue2/lib/toast/toast.js +17 -5
  300. package/dist/vue2/lib/toast/toast.js.map +1 -1
  301. package/dist/vue2/lib/toggle/toggle.cjs +1 -1
  302. package/dist/vue2/lib/toggle/toggle.js +5 -2
  303. package/dist/vue2/lib/toggle/toggle.js.map +1 -1
  304. package/dist/vue2/lib/tooltip/tooltip.cjs +1 -1
  305. package/dist/vue2/lib/tooltip/tooltip.js +9 -6
  306. package/dist/vue2/lib/tooltip/tooltip.js.map +1 -1
  307. package/dist/vue2/lib/top-banner-info/top-banner-info.cjs +1 -1
  308. package/dist/vue2/lib/top-banner-info/top-banner-info.js +5 -2
  309. package/dist/vue2/lib/top-banner-info/top-banner-info.js.map +1 -1
  310. package/dist/vue2/lib/unread-pill/unread-pill.cjs +1 -1
  311. package/dist/vue2/lib/unread-pill/unread-pill.js +8 -5
  312. package/dist/vue2/lib/unread-pill/unread-pill.js.map +1 -1
  313. package/dist/vue2/lib/validation-messages/validation-messages.cjs +1 -1
  314. package/dist/vue2/lib/validation-messages/validation-messages.js +10 -7
  315. package/dist/vue2/lib/validation-messages/validation-messages.js.map +1 -1
  316. package/dist/vue2/node_modules/@tiptap/vue-2.cjs +1 -1
  317. package/dist/vue2/node_modules/@tiptap/vue-2.cjs.map +1 -1
  318. package/dist/vue2/node_modules/@tiptap/vue-2.js +191 -149
  319. package/dist/vue2/node_modules/@tiptap/vue-2.js.map +1 -1
  320. package/dist/vue2/shared/sr_only_close_button.cjs +1 -1
  321. package/dist/vue2/shared/sr_only_close_button.js +12 -9
  322. package/dist/vue2/shared/sr_only_close_button.js.map +1 -1
  323. package/dist/vue2/style.css +1 -0
  324. package/dist/vue2/types/components/emoji_picker/emoji_picker.vue.d.ts.map +1 -1
  325. package/dist/vue2/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +16 -16
  326. package/dist/vue2/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +16 -16
  327. package/dist/vue2/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +16 -16
  328. package/dist/vue2/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts +5 -0
  329. package/dist/vue2/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts.map +1 -1
  330. package/dist/vue2/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts +16 -16
  331. package/dist/vue2/types/components/rich_text_editor/mention_suggestion.d.ts +23 -3
  332. package/dist/vue2/types/components/rich_text_editor/mention_suggestion.d.ts.map +1 -1
  333. package/dist/vue2/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  334. package/dist/vue2/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +16 -16
  335. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts +1 -1
  336. package/dist/vue2/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  337. package/dist/vue2/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -1
  338. package/dist/vue3/component-documentation.json +1 -1
  339. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs +1 -1
  340. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.cjs.map +1 -1
  341. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js +4 -3
  342. package/dist/vue3/lib/emoji-picker/emoji-picker-constants.js.map +1 -1
  343. package/dist/vue3/lib/emoji-picker/emoji-picker.cjs +1 -1
  344. package/dist/vue3/lib/emoji-picker/emoji-picker.cjs.map +1 -1
  345. package/dist/vue3/lib/emoji-picker/emoji-picker.js +518 -415
  346. package/dist/vue3/lib/emoji-picker/emoji-picker.js.map +1 -1
  347. package/dist/vue3/lib/rich-text-editor/mention-suggestion.cjs +1 -1
  348. package/dist/vue3/lib/rich-text-editor/mention-suggestion.cjs.map +1 -1
  349. package/dist/vue3/lib/rich-text-editor/mention-suggestion.js +34 -15
  350. package/dist/vue3/lib/rich-text-editor/mention-suggestion.js.map +1 -1
  351. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +3 -3
  352. package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
  353. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +264 -212
  354. package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
  355. package/dist/vue3/node_modules/@tiptap/vue-3.cjs +1 -1
  356. package/dist/vue3/node_modules/@tiptap/vue-3.cjs.map +1 -1
  357. package/dist/vue3/node_modules/@tiptap/vue-3.js +165 -115
  358. package/dist/vue3/node_modules/@tiptap/vue-3.js.map +1 -1
  359. package/dist/vue3/style.css +1 -0
  360. package/dist/vue3/types/components/emoji_picker/emoji_picker.vue.d.ts +1 -1
  361. package/dist/vue3/types/components/emoji_picker/emoji_picker.vue.d.ts.map +1 -1
  362. package/dist/vue3/types/components/emoji_picker/emoji_picker_constants.d.ts +1 -0
  363. package/dist/vue3/types/components/emoji_picker/modules/emoji_selector.vue.d.ts +1 -1
  364. package/dist/vue3/types/components/emoji_picker/modules/emoji_selector.vue.d.ts.map +1 -1
  365. package/dist/vue3/types/components/emoji_picker/modules/emoji_tabset.vue.d.ts.map +1 -1
  366. package/dist/vue3/types/components/rich_text_editor/extensions/channels/ChannelComponent.vue.d.ts +26 -2
  367. package/dist/vue3/types/components/rich_text_editor/extensions/emoji/EmojiComponent.vue.d.ts +26 -2
  368. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionComponent.vue.d.ts +26 -2
  369. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts +5 -0
  370. package/dist/vue3/types/components/rich_text_editor/extensions/mentions/MentionSuggestion.vue.d.ts.map +1 -1
  371. package/dist/vue3/types/components/rich_text_editor/extensions/slash_command/SlashCommandComponent.vue.d.ts +26 -2
  372. package/dist/vue3/types/components/rich_text_editor/mention_suggestion.d.ts +23 -3
  373. package/dist/vue3/types/components/rich_text_editor/mention_suggestion.d.ts.map +1 -1
  374. package/dist/vue3/types/components/rich_text_editor/rich_text_editor.vue.d.ts.map +1 -1
  375. package/dist/vue3/types/recipes/conversation_view/message_input/extensions/meeting_pill/MeetingPill.vue.d.ts +26 -2
  376. package/dist/vue3/types/recipes/leftbar/contact_row/contact_row.vue.d.ts +1 -1
  377. package/package.json +32 -32
  378. package/dist/vue2/_plugin-vue2_normalizer-DSLOjnn3.js +0 -11
  379. package/dist/vue2/_plugin-vue2_normalizer-DSLOjnn3.js.map +0 -1
  380. package/dist/vue2/_plugin-vue2_normalizer-e_CkxkSV.cjs +0 -2
  381. package/dist/vue2/_plugin-vue2_normalizer-e_CkxkSV.cjs.map +0 -1
@@ -1,14 +1,14 @@
1
- import { ref as g, onMounted as re, openBlock as k, createElementBlock as _, createVNode as C, unref as w, withKeys as M, withModifiers as ue, createSlots as ye, withCtx as q, computed as P, watch as B, Fragment as G, renderList as W, createBlock as te, resolveDynamicComponent as Se, nextTick as X, onUnmounted as je, createElementVNode as E, toDisplayString as J, withDirectives as oe, createCommentVNode as Z, vShow as le, normalizeClass as ce, watchEffect as ae, createTextVNode as Re } from "vue";
2
- import { DtIconSearch as _e, DtIconClose as $e, DtIconClock as we, DtIconSatisfied as Te, DtIconLivingThing as Ie, DtIconFood as Ee, DtIconObject as Le, DtIconTransportation as Fe, DtIconLightbulb as De, DtIconHeart as Ae, DtIconFlag as Ce } from "@dialpad/dialtone-icons/vue3";
3
- import Ke from "../input/input.js";
4
- import Oe from "../button/button.js";
5
- import { returnFirstEl as Ne } from "../../common/utils/index.js";
6
- import { EMOJI_PICKER_CATEGORIES as O, ARROW_KEYS as z, EMOJIS_PER_ROW as L, CDN_URL as Y, EMOJI_PICKER_SKIN_TONE_MODIFIERS as V } from "./emoji-picker-constants.js";
7
- import Ue from "../tab/tab-group.js";
8
- import Me from "../tab/tab.js";
9
- import { emojisGrouped as D } from "@dialpad/dialtone-emojis";
10
- import Be from "../tooltip/tooltip.js";
11
- const qe = { class: "d-emoji-picker__search d-emoji-picker__alignment" }, Pe = {
1
+ import { ref as k, onMounted as ue, openBlock as h, createElementBlock as R, createVNode as O, unref as $, withKeys as P, withModifiers as ce, createSlots as Re, withCtx as U, computed as M, watch as N, Fragment as W, renderList as J, createBlock as Z, resolveDynamicComponent as we, nextTick as x, onBeforeUnmount as Te, createElementVNode as _, toDisplayString as H, withDirectives as oe, createCommentVNode as Y, vShow as le, normalizeClass as fe, watchEffect as re, createTextVNode as de } from "vue";
2
+ import { DtIconSearch as $e, DtIconClose as _e, DtIconClock as Le, DtIconSatisfied as Ie, DtIconLivingThing as Fe, DtIconFood as Ae, DtIconObject as Ce, DtIconTransportation as De, DtIconLightbulb as Oe, DtIconHeart as Ke, DtIconFlag as Ne, DtIconTiktok as Ue } from "@dialpad/dialtone-icons/vue3";
3
+ import Me from "../input/input.js";
4
+ import me from "../button/button.js";
5
+ import { returnFirstEl as Be } from "../../common/utils/index.js";
6
+ import { EMOJI_PICKER_CATEGORIES as D, ARROW_KEYS as z, EMOJIS_PER_ROW as L, CDN_URL as Q, EMOJI_PICKER_SKIN_TONE_MODIFIERS as V } from "./emoji-picker-constants.js";
7
+ import qe from "../tab/tab-group.js";
8
+ import Pe from "../tab/tab.js";
9
+ import { emojisGrouped as F } from "@dialpad/dialtone-emojis";
10
+ import Ve from "../tooltip/tooltip.js";
11
+ const ze = { class: "d-emoji-picker__search d-emoji-picker__alignment" }, He = {
12
12
  __name: "emoji_search",
13
13
  props: {
14
14
  searchPlaceholderLabel: {
@@ -21,50 +21,50 @@ const qe = { class: "d-emoji-picker__search d-emoji-picker__alignment" }, Pe = {
21
21
  }
22
22
  },
23
23
  emits: ["update:modelValue", "focus-emoji-selector", "focus-tabset", "select-first-emoji"],
24
- setup(t, { expose: y, emit: T }) {
25
- const a = T, c = g(null);
26
- function I() {
27
- a("update:modelValue", ""), p();
24
+ setup(o, { expose: g, emit: y }) {
25
+ const n = y, u = k(null);
26
+ function T() {
27
+ n("update:modelValue", ""), p();
28
28
  }
29
29
  function p() {
30
- c.value.focus();
30
+ u.value.focus();
31
31
  }
32
- return re(() => {
32
+ return ue(() => {
33
33
  p();
34
- }), y({
34
+ }), g({
35
35
  focusSearchInput: p
36
- }), (S, f) => (k(), _("div", qe, [
37
- C(w(Ke), {
36
+ }), (j, f) => (h(), R("div", ze, [
37
+ O($(Me), {
38
38
  id: "searchInput",
39
39
  ref_key: "searchInput",
40
- ref: c,
41
- placeholder: t.searchPlaceholderLabel,
42
- "model-value": t.modelValue,
43
- "onUpdate:modelValue": f[0] || (f[0] = (n) => S.$emit("update:modelValue", n)),
40
+ ref: u,
41
+ placeholder: o.searchPlaceholderLabel,
42
+ "model-value": o.modelValue,
43
+ "onUpdate:modelValue": f[0] || (f[0] = (i) => j.$emit("update:modelValue", i)),
44
44
  onKeydown: [
45
- f[1] || (f[1] = M((n) => S.$emit("focus-tabset"), ["up"])),
46
- f[2] || (f[2] = M(ue((n) => S.$emit("focus-emoji-selector"), ["prevent"]), ["down"])),
47
- f[3] || (f[3] = M((n) => S.$emit("select-first-emoji"), ["enter"]))
45
+ f[1] || (f[1] = P((i) => j.$emit("focus-tabset"), ["up"])),
46
+ f[2] || (f[2] = P(ce((i) => j.$emit("focus-emoji-selector"), ["prevent"]), ["down"])),
47
+ f[3] || (f[3] = P((i) => j.$emit("select-first-emoji"), ["enter"]))
48
48
  ]
49
- }, ye({
50
- leftIcon: q(() => [
51
- C(w(_e), { size: "200" })
49
+ }, Re({
50
+ leftIcon: U(() => [
51
+ O($($e), { size: "200" })
52
52
  ]),
53
53
  _: 2
54
54
  }, [
55
- t.modelValue.length > 0 ? {
55
+ o.modelValue.length > 0 ? {
56
56
  name: "rightIcon",
57
- fn: q(() => [
58
- C(w(Oe), {
57
+ fn: U(() => [
58
+ O($(me), {
59
59
  importance: "clear",
60
60
  size: "xs",
61
61
  class: "d-emoji-picker__search-x-button",
62
62
  circle: "",
63
63
  kind: "muted",
64
- onClick: I
64
+ onClick: T
65
65
  }, {
66
- icon: q(() => [
67
- C(w($e), { size: "200" })
66
+ icon: U(() => [
67
+ O($(_e), { size: "200" })
68
68
  ]),
69
69
  _: 1
70
70
  })
@@ -74,7 +74,7 @@ const qe = { class: "d-emoji-picker__search d-emoji-picker__alignment" }, Pe = {
74
74
  ]), 1032, ["placeholder", "model-value"])
75
75
  ]));
76
76
  }
77
- }, Ve = { class: "d-emoji-picker__tabset" }, ze = {
77
+ }, Ge = { class: "d-emoji-picker__tabset" }, We = {
78
78
  __name: "emoji_tabset",
79
79
  props: {
80
80
  /**
@@ -86,6 +86,15 @@ const qe = { class: "d-emoji-picker__search d-emoji-picker__alignment" }, Pe = {
86
86
  type: Boolean,
87
87
  default: !1
88
88
  },
89
+ /**
90
+ * Whether to show the custom emojis tab or not
91
+ * @type {Boolean}
92
+ * @default false
93
+ */
94
+ showCustomEmojisTab: {
95
+ type: Boolean,
96
+ default: !1
97
+ },
89
98
  scrollIntoTab: {
90
99
  type: Number,
91
100
  required: !0
@@ -114,73 +123,77 @@ const qe = { class: "d-emoji-picker__search d-emoji-picker__alignment" }, Pe = {
114
123
  "focus-search-input",
115
124
  "focus-skin-selector"
116
125
  ],
117
- setup(t, { expose: y, emit: T }) {
118
- const a = t, c = T, I = [
119
- { label: O.MOST_RECENTLY_USED, icon: we },
120
- { label: O.SMILEYS_AND_PEOPLE, icon: Te },
121
- { label: O.NATURE, icon: Ie },
122
- { label: O.FOOD, icon: Ee },
123
- { label: O.ACTIVITY, icon: Le },
124
- { label: O.TRAVEL, icon: Fe },
125
- { label: O.OBJECTS, icon: De },
126
- { label: O.SYMBOLS, icon: Ae },
127
- { label: O.FLAGS, icon: Ce }
128
- ], p = P(() => (a.showRecentlyUsedTab ? I : I.slice(1)).map((o, l) => ({
129
- ...o,
130
- label: a.tabsetLabels[l],
131
- // IDs on dt-tab component need to be on string
132
- id: (l + 1).toString(),
133
- panelId: (l + 1).toString()
134
- }))), S = P(() => a.emojiFilter.length > 0), f = g("1"), n = g([]);
135
- B(
136
- () => a.scrollIntoTab,
126
+ setup(o, { expose: g, emit: y }) {
127
+ const n = o, u = y, T = [
128
+ { label: D.MOST_RECENTLY_USED, icon: Le },
129
+ { label: D.SMILEYS_AND_PEOPLE, icon: Ie },
130
+ { label: D.NATURE, icon: Fe },
131
+ { label: D.FOOD, icon: Ae },
132
+ { label: D.ACTIVITY, icon: Ce },
133
+ { label: D.TRAVEL, icon: De },
134
+ { label: D.OBJECTS, icon: Oe },
135
+ { label: D.SYMBOLS, icon: Ke },
136
+ { label: D.FLAGS, icon: Ne },
137
+ { label: D.CUSTOM, icon: Ue }
138
+ ], p = M(() => {
139
+ const e = n.showRecentlyUsedTab ? T : T.slice(1);
140
+ return n.showCustomEmojisTab || e.pop(), e.map((t, s) => ({
141
+ ...t,
142
+ label: n.tabsetLabels[s],
143
+ // IDs on dt-tab component need to be on string
144
+ id: (s + 1).toString(),
145
+ panelId: (s + 1).toString()
146
+ }));
147
+ }), j = M(() => n.emojiFilter.length > 0), f = k("1"), i = k([]);
148
+ N(
149
+ () => n.scrollIntoTab,
137
150
  () => {
138
- S.value || (f.value = (a.scrollIntoTab + 1).toString());
151
+ j.value || (f.value = (n.scrollIntoTab + 1).toString());
139
152
  }
140
- ), B(
141
- S,
153
+ ), N(
154
+ j,
142
155
  () => {
143
- S.value && (f.value = null);
156
+ j.value && (f.value = null);
144
157
  }
145
158
  );
146
- function j(e) {
147
- const o = parseInt(e);
148
- f.value = e, c("selected-tabset", o);
159
+ function S(e) {
160
+ const t = parseInt(e);
161
+ f.value = e, u("selected-tabset", t);
149
162
  }
150
163
  function K(e) {
151
- n.value.push(Ne(e.$el));
164
+ i.value.push(Be(e.$el));
152
165
  }
153
- function d() {
154
- n.value[0].focus();
166
+ function A() {
167
+ i.value[0].focus();
155
168
  }
156
- function i(e, o) {
157
- e.key === "Enter" && (j(o), n.value[o - 1].blur()), e.key === "Tab" && (e.preventDefault(), e.shiftKey ? c("focus-skin-selector") : c("focus-search-input")), e.key === "ArrowDown" && c("focus-search-input");
169
+ function r(e, t) {
170
+ e.key === "Enter" && (S(t), i.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");
158
171
  }
159
- return y({
160
- focusTabset: d
161
- }), (e, o) => (k(), _("div", Ve, [
162
- C(w(Ue), {
172
+ return g({
173
+ focusTabset: A
174
+ }), (e, t) => (h(), R("div", Ge, [
175
+ O($(qe), {
163
176
  size: "sm",
164
177
  "tab-list-class": "d-emoji-picker__tabset-list",
165
178
  selected: f.value
166
179
  }, {
167
- tabs: q(() => [
168
- (k(!0), _(G, null, W(p.value, (l, v) => (k(), te(w(Me), {
169
- id: l.id,
180
+ tabs: U(() => [
181
+ (h(!0), R(W, null, J(p.value, (s, m) => (h(), Z($(Pe), {
182
+ id: s.id,
170
183
  ref_for: !0,
171
- ref: (r) => {
172
- r && K(r);
184
+ ref: (c) => {
185
+ c && K(c);
173
186
  },
174
- key: l.id,
175
- "panel-id": l.panelId,
176
- label: l.label,
187
+ key: s.id,
188
+ "panel-id": s.panelId,
189
+ label: s.label,
177
190
  "aria-controls": "d-emoji-picker-list",
178
- tabindex: v + 1,
179
- onClickCapture: ue((r) => j(l.id), ["stop"]),
180
- onKeydown: (r) => i(r, l.id)
191
+ tabindex: m + 1,
192
+ onClickCapture: ce((c) => S(s.id), ["stop"]),
193
+ onKeydown: (c) => r(c, s.id)
181
194
  }, {
182
- default: q(() => [
183
- (k(), te(Se(l.icon), { size: "400" }))
195
+ default: U(() => [
196
+ (h(), Z(we(s.icon), { size: "400" }))
184
197
  ]),
185
198
  _: 2
186
199
  }, 1032, ["id", "panel-id", "label", "tabindex", "onClickCapture", "onKeydown"]))), 128))
@@ -190,90 +203,90 @@ const qe = { class: "d-emoji-picker__search d-emoji-picker__alignment" }, Pe = {
190
203
  ]));
191
204
  }
192
205
  };
193
- function He() {
194
- const t = g([]), y = g([]), T = g(!1), a = g(!0);
195
- function c(e, o) {
196
- n(e, o - 1) || (t.value[e - 1] ? n(e - 1, t.value[e - 1].length - 1) : n(t.value.length - 1, t.value[t.value.length - 1].length - 1));
206
+ function Je() {
207
+ const o = k([]), g = k([]), y = k(!1), n = k(!0);
208
+ function u(e, t) {
209
+ i(e, t - 1) || (o.value[e - 1] ? i(e - 1, o.value[e - 1].length - 1) : i(o.value.length - 1, o.value[o.value.length - 1].length - 1));
197
210
  }
198
- function I(e, o) {
199
- n(e, o + 1) || n(e + 1, 0) || n(0, 0);
211
+ function T(e, t) {
212
+ i(e, t + 1) || i(e + 1, 0) || i(0, 0);
200
213
  }
201
- function p(e, o) {
202
- n(0, o - 1) || n(0, y.value.length - 1);
214
+ function p(e, t) {
215
+ i(0, t - 1) || i(0, g.value.length - 1);
203
216
  }
204
- function S(e, o) {
205
- n(0, o + 1) || n(0, 0);
217
+ function j(e, t) {
218
+ i(0, t + 1) || i(0, 0);
206
219
  }
207
- function f(e, o, l) {
208
- T.value ? e === "left" ? p(o, l) : e === "right" && S(o, l) : e === "left" ? c(o, l) : e === "right" && I(o, l);
220
+ function f(e, t, s) {
221
+ y.value ? e === "left" ? p(t, s) : e === "right" && j(t, s) : e === "left" ? u(t, s) : e === "right" && T(t, s);
209
222
  }
210
- function n(e, o) {
211
- var v, r, R;
212
- const l = T.value ? (v = y.value) == null ? void 0 : v[o] : (R = (r = t.value) == null ? void 0 : r[e]) == null ? void 0 : R[o];
213
- return l ? (l.focus(), !0) : !1;
223
+ function i(e, t) {
224
+ var m, c, E;
225
+ const s = y.value ? (m = g.value) == null ? void 0 : m[t] : (E = (c = o.value) == null ? void 0 : c[e]) == null ? void 0 : E[t];
226
+ return s ? (s.focus(), !0) : !1;
214
227
  }
215
- function j(e, o, l) {
216
- t.value[o] || (t.value[o] = []), t.value[o][l] = e;
228
+ function S(e, t, s) {
229
+ o.value[t] || (o.value[t] = []), o.value[t][s] = e;
217
230
  }
218
- function K(e, o) {
219
- y.value[o] = e;
231
+ function K(e, t) {
232
+ g.value[t] = e;
220
233
  }
221
- function d(e, o) {
222
- var l;
223
- if (a.value = !1, e === z.ARROW_UP) {
224
- const v = o % L;
225
- if (!n(0, o - L)) {
226
- const r = y.value.length - y.value.length % L + v;
227
- n(0, r), n(0, r) || n(0, y.value.length - 1);
234
+ function A(e, t) {
235
+ var s;
236
+ if (n.value = !1, e === z.ARROW_UP) {
237
+ const m = t % L;
238
+ if (!i(0, t - L)) {
239
+ const c = g.value.length - g.value.length % L + m;
240
+ i(0, c), i(0, c) || i(0, g.value.length - 1);
228
241
  }
229
242
  }
230
- if (e === z.ARROW_DOWN && !n(0, o + L)) {
231
- const v = o % L;
232
- (l = y.value) != null && l[o + (L - v)] ? n(0, y.value.length - 1) : n(0, v);
243
+ if (e === z.ARROW_DOWN && !i(0, t + L)) {
244
+ const m = t % L;
245
+ (s = g.value) != null && s[t + (L - m)] ? i(0, g.value.length - 1) : i(0, m);
233
246
  }
234
- e === z.ARROW_LEFT && f("left", 0, o), e === z.ARROW_RIGHT && f("right", 0, o);
247
+ e === z.ARROW_LEFT && f("left", 0, t), e === z.ARROW_RIGHT && f("right", 0, t);
235
248
  }
236
- function i(e, o, l) {
237
- var v, r;
249
+ function r(e, t, s) {
250
+ var m, c;
238
251
  if (e === "ArrowUp") {
239
- const R = l % L;
240
- if (o === 0) {
241
- const $ = L - t.value[t.value.length - 1].length % L, A = t.value[t.value.length - 1].length + $ - (L - R);
242
- n(t.value.length - 1, A) || n(t.value.length - 1, t.value[t.value.length - 1].length - 1);
252
+ const E = s % L;
253
+ if (t === 0) {
254
+ const w = L - o.value[o.value.length - 1].length % L, C = o.value[o.value.length - 1].length + w - (L - E);
255
+ i(o.value.length - 1, C) || i(o.value.length - 1, o.value[o.value.length - 1].length - 1);
243
256
  return;
244
257
  }
245
- if (!n(o, l - L)) {
246
- const $ = o - 1 < 0 ? 0 : o - 1, A = t.value[$].length, x = A - A % L + R;
247
- n($, x) || n(o - 1, t.value[o - 1].length - 1);
258
+ if (!i(t, s - L)) {
259
+ const w = t - 1 < 0 ? 0 : t - 1, C = o.value[w].length, ee = C - C % L + E;
260
+ i(w, ee) || i(t - 1, o.value[t - 1].length - 1);
248
261
  }
249
262
  }
250
- if (e === "ArrowDown" && !n(o, l + L)) {
251
- const R = l % L;
252
- (r = (v = t.value) == null ? void 0 : v[o]) != null && r[l + (L - R)] ? n(o, t.value[o].length - 1) : n(o + 1, R) || n(0, R) || n(0, t.value[0].length - 1);
263
+ if (e === "ArrowDown" && !i(t, s + L)) {
264
+ const E = s % L;
265
+ (c = (m = o.value) == null ? void 0 : m[t]) != null && c[s + (L - E)] ? i(t, o.value[t].length - 1) : i(t + 1, E) || i(0, E) || i(0, o.value[0].length - 1);
253
266
  }
254
- e === "ArrowLeft" && f("left", o, l), e === "ArrowRight" && f("right", o, l);
267
+ e === "ArrowLeft" && f("left", t, s), e === "ArrowRight" && f("right", t, s);
255
268
  }
256
269
  return {
257
- emojiFilteredRefs: y,
258
- isFiltering: T,
259
- hoverFirstEmoji: a,
260
- setEmojiRef: j,
270
+ emojiFilteredRefs: g,
271
+ isFiltering: y,
272
+ hoverFirstEmoji: n,
273
+ setEmojiRef: S,
261
274
  setFilteredRef: K,
262
- focusEmoji: n,
263
- handleArrowNavigationFiltered: d,
264
- handleArrowNavigation: i
275
+ focusEmoji: i,
276
+ handleArrowNavigationFiltered: A,
277
+ handleArrowNavigation: r
265
278
  };
266
279
  }
267
- const Ge = { class: "d-emoji-picker__selector" }, We = {
280
+ const Ye = { class: "d-emoji-picker__selector" }, Qe = {
268
281
  key: 0,
269
282
  class: "d-emoji-picker__search-label d-emoji-picker__alignment"
270
- }, Je = { key: 0 }, Ye = { class: "d-emoji-picker__tab" }, Qe = ["aria-label", "onClick", "onFocusin", "onMouseover", "onKeydown"], Xe = ["alt", "aria-label", "title", "src"], Ze = {
283
+ }, Xe = { key: 0 }, Ze = { class: "d-emoji-picker__tab" }, xe = ["aria-label", "onClick", "onFocusin", "onMouseover", "onKeydown"], et = ["alt", "aria-label", "title", "src"], tt = {
271
284
  key: 2,
272
285
  class: "d-emoji-picker__alignment"
273
- }, xe = {
286
+ }, ot = {
274
287
  class: "d-emoji-picker__tab",
275
288
  "data-qa": "filtered-emojis"
276
- }, et = ["aria-label", "onClick", "onFocusin", "onMouseover", "onKeydown"], tt = ["alt", "aria-label", "title", "src"], ot = {
289
+ }, lt = ["aria-label", "onClick", "onFocusin", "onMouseover", "onKeydown"], st = ["alt", "aria-label", "title", "src"], nt = {
277
290
  __name: "emoji_selector",
278
291
  props: {
279
292
  /**
@@ -327,6 +340,14 @@ const Ge = { class: "d-emoji-picker__selector" }, We = {
327
340
  recentlyUsedEmojis: {
328
341
  type: Array,
329
342
  default: () => []
343
+ },
344
+ /**
345
+ * The list of custom emojis
346
+ * @type {Array}
347
+ */
348
+ customEmojis: {
349
+ type: Array,
350
+ default: () => []
330
351
  }
331
352
  },
332
353
  emits: [
@@ -348,6 +369,12 @@ const Ge = { class: "d-emoji-picker__selector" }, We = {
348
369
  * @param {Number} tab-index - The tab that was scrolled into
349
370
  */
350
371
  "scroll-into-tab",
372
+ /**
373
+ * Emitted when the user reach bottom scroll
374
+ * This event is used on handleScroll method
375
+ * @event scroll-bottom-reached
376
+ */
377
+ "scroll-bottom-reached",
351
378
  /**
352
379
  * Emitted when the user reach the end of the emoji list
353
380
  * @event focus-skin-selector
@@ -359,222 +386,240 @@ const Ge = { class: "d-emoji-picker__selector" }, We = {
359
386
  */
360
387
  "focus-search-input"
361
388
  ],
362
- setup(t, { expose: y, emit: T }) {
363
- const a = t, c = T, {
364
- emojiFilteredRefs: I,
389
+ setup(o, { expose: g, emit: y }) {
390
+ const n = o, u = y, {
391
+ emojiFilteredRefs: T,
365
392
  isFiltering: p,
366
- hoverFirstEmoji: S,
393
+ hoverFirstEmoji: j,
367
394
  setEmojiRef: f,
368
- setFilteredRef: n,
369
- focusEmoji: j,
395
+ setFilteredRef: i,
396
+ focusEmoji: S,
370
397
  handleArrowNavigationFiltered: K,
371
- handleArrowNavigation: d
372
- } = He(), i = g(null), e = g(null), o = g(null), l = ["Recently used", "People", "Nature", "Food", "Activity", "Travel", "Objects", "Symbols", "Flags"], v = P(() => a.recentlyUsedEmojis.length ? a.tabsetLabels.map((s) => ({ label: s, ref: g(null) })) : a.tabsetLabels.slice(1).map((s) => ({ label: s, ref: g(null) }))), r = g(v.value[0].label), R = P(() => a.recentlyUsedEmojis.length ? l : l.slice(1)), $ = g([]), A = P(() => [
373
- ...D[`People${a.skinTone}`],
374
- ...D.Nature,
375
- ...D.Food,
376
- ...D[`Activity${a.skinTone}`],
377
- ...D.Travel,
378
- ...D[`Objects${a.skinTone}`],
379
- ...D.Symbols,
380
- ...D.Flags
381
- ]), x = fe(() => {
382
- I.value = [], se();
383
- });
384
- B(A, () => {
385
- se();
386
- }, { immediate: !0 }), B(
387
- () => a.recentlyUsedEmojis,
398
+ handleArrowNavigation: A
399
+ } = Je(), r = k(null), e = k(null), t = k(null), s = ["Recently used", "People", "Nature", "Food", "Activity", "Travel", "Objects", "Symbols", "Flags", "Custom"], m = M(() => {
400
+ let l = n.tabsetLabels.map((a) => ({ label: a, ref: k(null) }));
401
+ return n.recentlyUsedEmojis && !n.recentlyUsedEmojis.length && (l = n.tabsetLabels.slice(1).map((a) => ({ label: a, ref: k(null) }))), n.customEmojis && !n.customEmojis.length && l.pop(), l;
402
+ }), c = k(m.value[0].label), E = M(() => {
403
+ const l = n.recentlyUsedEmojis.length ? s.slice() : s.slice(1);
404
+ return n.customEmojis && !n.customEmojis.length && l.pop(), l;
405
+ }), w = k([]), C = M(() => [
406
+ ...F[`People${n.skinTone}`],
407
+ ...F.Nature,
408
+ ...F.Food,
409
+ ...F[`Activity${n.skinTone}`],
410
+ ...F.Travel,
411
+ ...F[`Objects${n.skinTone}`],
412
+ ...F.Symbols,
413
+ ...F.Flags
414
+ ]), ee = ve(() => {
415
+ T.value = [], ne();
416
+ }), se = () => {
417
+ const l = e.value;
418
+ l.scrollTop + l.clientHeight >= l.scrollHeight && u("scroll-bottom-reached");
419
+ };
420
+ N(C, () => {
421
+ ne();
422
+ }, { immediate: !0 }), N(
423
+ () => n.recentlyUsedEmojis,
388
424
  () => {
389
- D["Recently used"] = a.recentlyUsedEmojis;
425
+ F["Recently used"] = n.recentlyUsedEmojis;
390
426
  },
391
427
  { immediate: !0 }
392
- ), B(() => a.emojiFilter, () => {
393
- ve(), a.emojiFilter ? p.value = !0 : (p.value = !1, N(null)), x();
394
- }), B(
395
- () => a.selectedTabset,
396
- (s) => {
397
- H(s.tabId);
428
+ ), N(
429
+ () => n.customEmojis,
430
+ () => {
431
+ F.Custom = n.customEmojis;
432
+ },
433
+ { immediate: !0 }
434
+ ), N(() => n.emojiFilter, () => {
435
+ pe(), n.emojiFilter ? p.value = !0 : (p.value = !1, B(null)), ee();
436
+ }), N(
437
+ () => n.selectedTabset,
438
+ (l) => {
439
+ G(l.tabId);
398
440
  },
399
441
  { deep: !0 }
400
442
  );
401
- function ee(s, u = !1) {
402
- S.value = u, c("highlighted-emoji", s);
403
- }
404
- function se() {
405
- const s = a.emojiFilter.toLowerCase();
406
- $.value = A.value.filter((u) => {
407
- const b = u.name.toLowerCase().includes(s), h = u.keywords.some((m) => m.toLowerCase().includes(s));
408
- return b || h;
409
- }), X(() => {
410
- s && ee($.value[0], !0);
443
+ function te(l, a = !1) {
444
+ j.value = a, u("highlighted-emoji", l);
445
+ }
446
+ function ne() {
447
+ const l = n.emojiFilter.toLowerCase();
448
+ w.value = C.value.filter((a) => {
449
+ const v = a.name.toLowerCase().includes(l), b = a.keywords.some((d) => d.toLowerCase().includes(l));
450
+ return v || b;
451
+ }), x(() => {
452
+ l && te(w.value[0], !0);
411
453
  });
412
454
  }
413
- function fe(s, u = 300) {
414
- let b;
415
- return (...h) => {
416
- clearTimeout(b), b = setTimeout(() => s(...h), u);
455
+ function ve(l, a = 300) {
456
+ let v;
457
+ return (...b) => {
458
+ clearTimeout(v), v = setTimeout(() => l(...b), a);
417
459
  };
418
460
  }
419
- function de(s) {
420
- return `${Y + s}.png`;
461
+ function be(l) {
462
+ return l.date_added ? l.image : Q + l.unicode_character + ".png";
421
463
  }
422
- function me(s) {
423
- s.target.parentNode.style.display = "none";
464
+ function he(l) {
465
+ l.target.parentNode.style.display = "none";
424
466
  }
425
- function H(s, u = !0) {
426
- const h = v.value[s - 1].ref.value[0];
427
- X(() => {
428
- const m = e.value, U = s === 1 ? 0 : h.offsetTop - 15;
429
- m.scrollTop = U, u && j(s - 1, 0);
467
+ function G(l, a = !0) {
468
+ const b = m.value[l - 1].ref.value[0];
469
+ x(() => {
470
+ const d = e.value, q = l === 1 ? 0 : b.offsetTop - 15;
471
+ d.scrollTop = q, a && S(l - 1, 0);
430
472
  });
431
473
  }
432
- function ve() {
433
- const s = e.value;
434
- s.scrollTop = 0;
474
+ function pe() {
475
+ const l = e.value;
476
+ l.scrollTop = 0;
435
477
  }
436
- function be() {
437
- o.value = new IntersectionObserver(async (s) => {
438
- s.forEach((u) => {
439
- var m, U, F, ne, ie;
440
- const { target: b } = u, h = parseInt(b.dataset.index);
441
- u.isIntersecting && b.offsetTop <= i.value.offsetTop + 50 ? (r.value = ((m = v.value[h - 1]) == null ? void 0 : m.label) ?? ((U = v.value[0]) == null ? void 0 : U.label), c("scroll-into-tab", h - 1)) : u.boundingClientRect.bottom <= ((F = i.value) == null ? void 0 : F.getBoundingClientRect().bottom) ? (c("scroll-into-tab", h), r.value = (ne = v.value[h]) == null ? void 0 : ne.label) : h === 1 && (c("scroll-into-tab", h), r.value = (ie = v.value[0]) == null ? void 0 : ie.label);
478
+ function ke() {
479
+ e.value.addEventListener("scroll", se);
480
+ }
481
+ function ge() {
482
+ t.value = new IntersectionObserver(async (l) => {
483
+ l.forEach((a) => {
484
+ var d, q, I, ie, ae;
485
+ const { target: v } = a, b = parseInt(v.dataset.index);
486
+ a.isIntersecting && v.offsetTop <= r.value.offsetTop + 50 ? (c.value = ((d = m.value[b - 1]) == null ? void 0 : d.label) ?? ((q = m.value[0]) == null ? void 0 : q.label), u("scroll-into-tab", b - 1)) : a.boundingClientRect.bottom <= ((I = r.value) == null ? void 0 : I.getBoundingClientRect().bottom) ? (u("scroll-into-tab", b), c.value = (ie = m.value[b]) == null ? void 0 : ie.label) : b === 1 && (u("scroll-into-tab", b), c.value = (ae = m.value[0]) == null ? void 0 : ae.label);
442
487
  });
443
- }), o.value.observe(i.value), Array.from(e.value.children).forEach((s, u) => {
444
- o.value.observe(s), s.dataset.index = u;
488
+ }), t.value.observe(r.value), Array.from(e.value.children).forEach((l, a) => {
489
+ t.value.observe(l), l.dataset.index = a;
445
490
  });
446
491
  }
447
- const he = (s, u, b) => {
448
- if (s.preventDefault(), Object.values(z).includes(s.key)) {
449
- K(s.key, u);
492
+ const ye = (l, a, v) => {
493
+ if (l.preventDefault(), Object.values(z).includes(l.key)) {
494
+ K(l.key, a);
450
495
  return;
451
496
  }
452
- switch (s.key) {
497
+ switch (l.key) {
453
498
  case "Tab":
454
- c("focus-skin-selector");
499
+ u("focus-skin-selector");
455
500
  break;
456
501
  case "Enter":
457
- Q(b, s);
502
+ X(v, l);
458
503
  break;
459
504
  }
460
- }, pe = (s, u, b, h) => {
461
- if (s.preventDefault(), Object.values(z).includes(s.key)) {
462
- d(s.key, u, b);
505
+ }, je = (l, a, v, b) => {
506
+ if (l.preventDefault(), Object.values(z).includes(l.key)) {
507
+ A(l.key, a, v);
463
508
  return;
464
509
  }
465
- switch (s.key) {
510
+ switch (l.key) {
466
511
  case "Tab":
467
- s.shiftKey ? j(u, 0) && u > 0 ? H(u, !0) : (H(1, !1), c("focus-search-input")) : j(u + 1, 0) ? H(u + 1 + 1, !1) : c("focus-skin-selector");
512
+ l.shiftKey ? S(a, 0) && a > 0 ? G(a, !0) : (G(1, !1), u("focus-search-input")) : S(a + 1, 0) ? G(a + 1 + 1, !1) : u("focus-skin-selector");
468
513
  break;
469
514
  case "Enter":
470
- Q(h, s);
515
+ X(b, l);
471
516
  break;
472
517
  }
473
518
  };
474
- function Q(s, u) {
475
- c("selected-emoji", { ...s, shift_key: u.shiftKey });
519
+ function X(l, a) {
520
+ u("selected-emoji", { ...l, shift_key: a.shiftKey });
476
521
  }
477
- function N(s) {
478
- c("highlighted-emoji", s);
522
+ function B(l) {
523
+ u("highlighted-emoji", l);
479
524
  }
480
- function ke() {
481
- j(0, 0);
525
+ function Se() {
526
+ S(0, 0);
482
527
  }
483
- function ge() {
484
- H(R.value.length, !0);
485
- }
486
- return re(() => {
487
- be();
488
- }), je(() => {
489
- o.value.disconnect();
490
- }), y({
491
- focusEmojiSelector: ke,
492
- focusLastEmoji: ge
493
- }), (s, u) => (k(), _("div", Ge, [
494
- E("div", {
528
+ function Ee() {
529
+ G(E.value.length, !0);
530
+ }
531
+ return ue(() => {
532
+ ge(), ke();
533
+ }), Te(() => {
534
+ t.value.disconnect(), e.value.removeEventListener("scroll", se);
535
+ }), g({
536
+ focusEmojiSelector: Se,
537
+ focusLastEmoji: Ee
538
+ }), (l, a) => (h(), R("div", Ye, [
539
+ _("div", {
495
540
  id: "d-emoji-picker-list",
496
541
  ref_key: "listRef",
497
542
  ref: e,
498
543
  class: "d-emoji-picker__list"
499
544
  }, [
500
- t.emojiFilter ? (k(), _("p", We, J($.value.length > 0 ? t.searchResultsLabel : t.searchNoResultsLabel), 1)) : (k(), _("div", {
545
+ o.emojiFilter ? (h(), R("p", Qe, H(w.value.length > 0 ? o.searchResultsLabel : o.searchNoResultsLabel), 1)) : (h(), R("div", {
501
546
  key: 1,
502
547
  ref_key: "tabCategoryRef",
503
- ref: i,
548
+ ref: r,
504
549
  class: "d-emoji-picker__category d-emoji-picker__alignment"
505
550
  }, [
506
- E("p", null, J(r.value), 1)
551
+ _("p", null, H(c.value), 1)
507
552
  ], 512)),
508
- (k(!0), _(G, null, W(v.value, (b, h) => oe((k(), _("div", {
509
- key: h,
553
+ (h(!0), R(W, null, J(m.value, (v, b) => oe((h(), R("div", {
554
+ key: b,
510
555
  ref_for: !0,
511
- ref: b.ref,
556
+ ref: v.ref,
512
557
  class: "d-emoji-picker__alignment"
513
558
  }, [
514
- h ? (k(), _("p", Je, J(b.label), 1)) : Z("", !0),
515
- E("div", Ye, [
516
- (k(!0), _(G, null, W(w(D)[R.value[h] + t.skinTone] ? w(D)[R.value[h] + t.skinTone] : w(D)[R.value[h]], (m, U) => (k(), _("button", {
517
- key: m.shortname,
559
+ b ? (h(), R("p", Xe, H(v.label), 1)) : Y("", !0),
560
+ _("div", Ze, [
561
+ (h(!0), R(W, null, J($(F)[E.value[b] + o.skinTone] ? $(F)[E.value[b] + o.skinTone] : $(F)[E.value[b]], (d, q) => (h(), R("button", {
562
+ key: d.shortname,
518
563
  ref_for: !0,
519
- ref: (F) => {
520
- F && w(f)(F, h, U);
564
+ ref: (I) => {
565
+ I && $(f)(I, b, q);
521
566
  },
522
567
  type: "button",
523
- "aria-label": m.name,
524
- onClick: (F) => Q(m, F),
525
- onFocusin: (F) => N(m),
526
- onFocusout: u[0] || (u[0] = (F) => N(null)),
527
- onMouseover: (F) => N(m),
528
- onMouseleave: u[1] || (u[1] = (F) => N(null)),
529
- onKeydown: (F) => pe(F, h, U, m)
568
+ "aria-label": d.name,
569
+ onClick: (I) => X(d, I),
570
+ onFocusin: (I) => B(d),
571
+ onFocusout: a[0] || (a[0] = (I) => B(null)),
572
+ onMouseover: (I) => B(d),
573
+ onMouseleave: a[1] || (a[1] = (I) => B(null)),
574
+ onKeydown: (I) => je(I, b, q, d)
530
575
  }, [
531
- E("img", {
576
+ _("img", {
532
577
  class: "d-icon d-icon--size-500",
533
- alt: m.name,
534
- "aria-label": m.name,
535
- title: m.name,
536
- src: de(m.unicode_character),
537
- onError: me
538
- }, null, 40, Xe)
539
- ], 40, Qe))), 128))
578
+ alt: d.name,
579
+ "aria-label": d.name,
580
+ title: d.name,
581
+ src: be(d),
582
+ onError: he
583
+ }, null, 40, et)
584
+ ], 40, xe))), 128))
540
585
  ])
541
586
  ])), [
542
- [le, !t.emojiFilter]
587
+ [le, !o.emojiFilter]
543
588
  ])), 128)),
544
- t.emojiFilter ? (k(), _("div", Ze, [
545
- E("div", xe, [
546
- (k(!0), _(G, null, W($.value, (b, h) => (k(), _("button", {
547
- key: b.shortname,
589
+ o.emojiFilter ? (h(), R("div", tt, [
590
+ _("div", ot, [
591
+ (h(!0), R(W, null, J(w.value, (v, b) => (h(), R("button", {
592
+ key: v.shortname,
548
593
  ref_for: !0,
549
- ref: (m) => {
550
- m && w(n)(m, h);
594
+ ref: (d) => {
595
+ d && $(i)(d, b);
551
596
  },
552
597
  type: "button",
553
- "aria-label": b.name,
554
- class: ce({
555
- "hover-emoji": h === 0 && w(S)
598
+ "aria-label": v.name,
599
+ class: fe({
600
+ "hover-emoji": b === 0 && $(j)
556
601
  }),
557
- onClick: (m) => Q(b, m),
558
- onFocusin: (m) => N(b),
559
- onFocusout: u[2] || (u[2] = (m) => N(null)),
560
- onMouseover: (m) => ee(b),
561
- onMouseleave: u[3] || (u[3] = (m) => ee(null)),
562
- onKeydown: (m) => he(m, h, b)
602
+ onClick: (d) => X(v, d),
603
+ onFocusin: (d) => B(v),
604
+ onFocusout: a[2] || (a[2] = (d) => B(null)),
605
+ onMouseover: (d) => te(v),
606
+ onMouseleave: a[3] || (a[3] = (d) => te(null)),
607
+ onKeydown: (d) => ye(d, b, v)
563
608
  }, [
564
- E("img", {
609
+ _("img", {
565
610
  class: "d-icon d-icon--size-500",
566
- alt: b.name,
567
- "aria-label": b.name,
568
- title: b.name,
569
- src: `${w(Y) + b.unicode_character}.png`
570
- }, null, 8, tt)
571
- ], 42, et))), 128))
611
+ alt: v.name,
612
+ "aria-label": v.name,
613
+ title: v.name,
614
+ src: `${$(Q) + v.unicode_character}.png`
615
+ }, null, 8, st)
616
+ ], 42, lt))), 128))
572
617
  ])
573
- ])) : Z("", !0)
618
+ ])) : Y("", !0)
574
619
  ], 512)
575
620
  ]));
576
621
  }
577
- }, lt = { "data-qa": "skin-selector" }, st = { class: "d-emoji-picker__skin-list" }, nt = ["onKeydown", "onClick"], it = ["alt", "aria-label", "title", "src"], at = { class: "d-emoji-picker__skin-selected" }, rt = ["aria-label"], ut = ["alt", "aria-label", "title", "src"], ct = {
622
+ }, it = { "data-qa": "skin-selector" }, at = { class: "d-emoji-picker__skin-list" }, rt = ["onKeydown", "onClick"], ut = ["alt", "aria-label", "title", "src"], ct = { class: "d-emoji-picker__skin-selected" }, ft = ["aria-label"], dt = ["alt", "aria-label", "title", "src"], mt = {
578
623
  __name: "emoji_skin_selector",
579
624
  props: {
580
625
  /**
@@ -605,8 +650,8 @@ const Ge = { class: "d-emoji-picker__selector" }, We = {
605
650
  "focus-tabset",
606
651
  "focus-last-emoji"
607
652
  ],
608
- setup(t, { expose: y, emit: T }) {
609
- const a = t, c = T, I = [
653
+ setup(o, { expose: g, emit: y }) {
654
+ const n = o, u = y, T = [
610
655
  {
611
656
  name: ":wave_tone1:",
612
657
  unicode_output: "1f44b-1f3fb",
@@ -643,77 +688,77 @@ const Ge = { class: "d-emoji-picker__selector" }, We = {
643
688
  skinTone: V.DEFAULT,
644
689
  skinCode: ""
645
690
  }
646
- ], p = g(!1), S = g(null), f = g([]);
647
- ae(
648
- () => a.isHovering && (p.value = !1)
691
+ ], p = k(!1), j = k(null), f = k([]);
692
+ re(
693
+ () => n.isHovering && (p.value = !1)
649
694
  );
650
- const n = P(() => I.find((l) => l.skinTone === a.skinTone)), j = g(n.value);
651
- ae(() => n.value && (j.value = n.value));
652
- function K(l) {
653
- f.value.push(l);
695
+ const i = M(() => T.find((s) => s.skinTone === n.skinTone)), S = k(i.value);
696
+ re(() => i.value && (S.value = i.value));
697
+ function K(s) {
698
+ f.value.push(s);
654
699
  }
655
- function d() {
656
- S.value.focus();
700
+ function A() {
701
+ j.value.focus();
657
702
  }
658
- function i(l) {
659
- j.value = l, p.value = !1, c("skin-tone", l.skinTone), X(() => d());
703
+ function r(s) {
704
+ S.value = s, p.value = !1, u("skin-tone", s.skinTone), x(() => A());
660
705
  }
661
- const e = (l, v, r) => {
662
- var R, $, A;
663
- l.preventDefault(), l.key === "ArrowLeft" && (r === 0 && ((R = f.value[f.value.length - 1]) == null || R.focus()), ($ = f.value[r - 1]) == null || $.focus()), l.key === "ArrowRight" && ((A = f.value[r + 1]) == null || A.focus()), l.key === "Enter" && (v ? i(v) : o()), l.key === "Tab" && (l.shiftKey ? c("focus-last-emoji") : c("focus-tabset"));
706
+ const e = (s, m, c) => {
707
+ var E, w, C;
708
+ s.preventDefault(), s.key === "ArrowLeft" && (c === 0 && ((E = f.value[f.value.length - 1]) == null || E.focus()), (w = f.value[c - 1]) == null || w.focus()), s.key === "ArrowRight" && ((C = f.value[c + 1]) == null || C.focus()), s.key === "Enter" && (m ? r(m) : t()), s.key === "Tab" && (s.shiftKey ? u("focus-last-emoji") : u("focus-tabset"));
664
709
  };
665
- function o() {
666
- p.value = !p.value, X(() => f.value[0].focus());
667
- }
668
- return y({
669
- focusSkinSelector: d
670
- }), (l, v) => (k(), _("div", lt, [
671
- oe(E("div", st, [
672
- (k(), _(G, null, W(I, (r, R) => E("button", {
710
+ function t() {
711
+ p.value = !p.value, x(() => f.value[0].focus());
712
+ }
713
+ return g({
714
+ focusSkinSelector: A
715
+ }), (s, m) => (h(), R("div", it, [
716
+ oe(_("div", at, [
717
+ (h(), R(W, null, J(T, (c, E) => _("button", {
673
718
  ref_for: !0,
674
- ref: ($) => {
675
- $ && K($);
719
+ ref: (w) => {
720
+ w && K(w);
676
721
  },
677
- key: r.name,
678
- class: ce({
679
- selected: j.value.skinCode === r.skinCode
722
+ key: c.name,
723
+ class: fe({
724
+ selected: S.value.skinCode === c.skinCode
680
725
  }),
681
- onKeydown: ($) => e($, r, R),
682
- onClick: ($) => i(r)
726
+ onKeydown: (w) => e(w, c, E),
727
+ onClick: (w) => r(c)
683
728
  }, [
684
- E("img", {
729
+ _("img", {
685
730
  class: "d-icon d-icon--size-500",
686
- alt: r.name,
687
- "aria-label": r.name,
688
- title: r.name,
689
- src: `${w(Y) + r.unicode_output}.png`
690
- }, null, 8, it)
691
- ], 42, nt)), 64))
731
+ alt: c.name,
732
+ "aria-label": c.name,
733
+ title: c.name,
734
+ src: `${$(Q) + c.unicode_output}.png`
735
+ }, null, 8, ut)
736
+ ], 42, rt)), 64))
692
737
  ], 512), [
693
738
  [le, p.value]
694
739
  ]),
695
- oe(E("div", at, [
696
- C(w(Be), { placement: "top-end" }, {
697
- anchor: q(() => [
698
- E("button", {
740
+ oe(_("div", ct, [
741
+ O($(Ve), { placement: "top-end" }, {
742
+ anchor: U(() => [
743
+ _("button", {
699
744
  ref_key: "skinSelectorRef",
700
- ref: S,
701
- "aria-label": t.skinSelectorButtonTooltipLabel,
745
+ ref: j,
746
+ "aria-label": o.skinSelectorButtonTooltipLabel,
702
747
  tabindex: "-1",
703
- onClick: o,
704
- onKeydown: v[0] || (v[0] = (r) => e(r))
748
+ onClick: t,
749
+ onKeydown: m[0] || (m[0] = (c) => e(c))
705
750
  }, [
706
- E("img", {
751
+ _("img", {
707
752
  class: "d-icon d-icon--size-500",
708
- alt: j.value.name,
709
- "aria-label": j.value.name,
710
- title: j.value.name,
711
- src: `${w(Y) + j.value.unicode_output}.png`
712
- }, null, 8, ut)
713
- ], 40, rt)
753
+ alt: S.value.name,
754
+ "aria-label": S.value.name,
755
+ title: S.value.name,
756
+ src: `${$(Q) + S.value.unicode_output}.png`
757
+ }, null, 8, dt)
758
+ ], 40, ft)
714
759
  ]),
715
- default: q(() => [
716
- Re(J(t.skinSelectorButtonTooltipLabel) + " ", 1)
760
+ default: U(() => [
761
+ de(H(o.skinSelectorButtonTooltipLabel) + " ", 1)
717
762
  ]),
718
763
  _: 1
719
764
  })
@@ -722,7 +767,7 @@ const Ge = { class: "d-emoji-picker__selector" }, We = {
722
767
  ])
723
768
  ]));
724
769
  }
725
- }, ft = { class: "d-emoji-picker__data" }, dt = ["alt", "aria-label", "title", "src"], mt = {
770
+ }, vt = { class: "d-emoji-picker__data" }, bt = ["alt", "aria-label", "title", "src"], ht = {
726
771
  __name: "emoji_description",
727
772
  props: {
728
773
  /**
@@ -735,23 +780,26 @@ const Ge = { class: "d-emoji-picker__selector" }, We = {
735
780
  default: null
736
781
  }
737
782
  },
738
- setup(t) {
739
- return (y, T) => {
740
- var a;
741
- return k(), _("div", ft, [
742
- t.emoji ? (k(), _("img", {
783
+ setup(o) {
784
+ function g(y) {
785
+ return y.date_added ? y.image : `${Q + y.unicode_character}.png`;
786
+ }
787
+ return (y, n) => {
788
+ var u;
789
+ return h(), R("div", vt, [
790
+ o.emoji ? (h(), R("img", {
743
791
  key: 0,
744
792
  class: "d-icon d-icon--size-500",
745
- alt: t.emoji.name,
746
- "aria-label": t.emoji.name,
747
- title: t.emoji.name,
748
- src: `${w(Y) + t.emoji.unicode_character}.png`
749
- }, null, 8, dt)) : Z("", !0),
750
- E("div", null, J((a = t.emoji) == null ? void 0 : a.name), 1)
793
+ alt: o.emoji.name,
794
+ "aria-label": o.emoji.name,
795
+ title: o.emoji.name,
796
+ src: g(o.emoji)
797
+ }, null, 8, bt)) : Y("", !0),
798
+ _("div", null, H((u = o.emoji) == null ? void 0 : u.name), 1)
751
799
  ]);
752
800
  };
753
801
  }
754
- }, vt = { class: "d-emoji-picker" }, bt = { class: "d-emoji-picker--header" }, ht = { class: "d-emoji-picker--body" }, pt = { class: "d-emoji-picker--footer" }, It = {
802
+ }, pt = { class: "d-emoji-picker" }, kt = { class: "d-emoji-picker--header" }, gt = { class: "d-emoji-picker--body" }, yt = { class: "d-emoji-picker--footer" }, Ft = {
755
803
  __name: "emoji_picker",
756
804
  props: {
757
805
  /**
@@ -767,6 +815,29 @@ const Ge = { class: "d-emoji-picker__selector" }, We = {
767
815
  type: Array,
768
816
  default: () => []
769
817
  },
818
+ /**
819
+ * The array with custom emojis object
820
+ * This list is necessary to fill the custom tab
821
+ * @type {Array}
822
+ * @default []
823
+ * @example
824
+ * <dt-emoji-picker :customEmojis="[emojiObject, emojiObject]" />
825
+ */
826
+ customEmojis: {
827
+ type: Array
828
+ },
829
+ /**
830
+ * The label for the add emoji button
831
+ * required false because it is still experimental
832
+ * @type {String}
833
+ * @example
834
+ * <dt-emoji-picker :addEmojiLabel="'Add emoji'" />
835
+ */
836
+ addEmojiLabel: {
837
+ type: String,
838
+ required: !1,
839
+ default: "Add emoji"
840
+ },
770
841
  /**
771
842
  * The placeholder text for the search input
772
843
  * @type {String}
@@ -808,7 +879,7 @@ const Ge = { class: "d-emoji-picker__selector" }, We = {
808
879
  * @example
809
880
  * <dt-emoji-picker
810
881
  * :tabSetLabels="['Most recently used', 'Smileys and people', 'Nature',
811
- * 'Food', 'Activity', 'Travel', 'Objects', 'Symbols', 'Flags']" />
882
+ * 'Food', 'Activity', 'Travel', 'Objects', 'Symbols', 'Flags', 'Custom']" />
812
883
  */
813
884
  tabSetLabels: {
814
885
  type: Array,
@@ -866,6 +937,12 @@ const Ge = { class: "d-emoji-picker__selector" }, We = {
866
937
  * @param {Object} emoji - The selected emoji from the emoji selector
867
938
  */
868
939
  "selected-emoji",
940
+ /**
941
+ * Emitted when the user reach bottom scroll
942
+ * This is being handled by handleScroll method
943
+ * @event scroll-bottom-reached
944
+ */
945
+ "scroll-bottom-reached",
869
946
  /**
870
947
  * It will emit the selected skin tone
871
948
  * @event skin-tone
@@ -876,85 +953,111 @@ const Ge = { class: "d-emoji-picker__selector" }, We = {
876
953
  * Since the keyboard events are encapsulated, we emit this event to close the picker
877
954
  * @event close
878
955
  */
879
- "close"
956
+ "close",
957
+ /**
958
+ * Emitted when the user clicks on the add emoji button
959
+ * @event add-emoji
960
+ */
961
+ "add-emoji"
880
962
  ],
881
- setup(t, { emit: y }) {
882
- const T = t, a = y, c = g(T.searchQuery.value), I = g(null), p = g({}), S = g(0), f = P(() => T.recentlyUsedEmojis.length > 0);
883
- B(
884
- () => T.searchQuery,
885
- (d) => {
886
- c.value = d;
963
+ setup(o, { emit: g }) {
964
+ const y = o, n = g, u = k(y.searchQuery.value), T = k(null), p = k({}), j = k(0), f = M(() => {
965
+ var r;
966
+ return ((r = y.recentlyUsedEmojis) == null ? void 0 : r.length) > 0;
967
+ }), i = M(() => {
968
+ var r;
969
+ return ((r = y.customEmojis) == null ? void 0 : r.length) > 0;
970
+ });
971
+ N(
972
+ () => y.searchQuery,
973
+ (r) => {
974
+ u.value = r;
887
975
  }
888
976
  );
889
- function n(d) {
890
- c.value = "", p.value = d, p.value = { ...p.value, tabId: d };
977
+ function S(r) {
978
+ u.value = "", p.value = r, p.value = { ...p.value, tabId: r };
891
979
  }
892
- function j(d) {
893
- S.value = d;
980
+ function K(r) {
981
+ j.value = r;
894
982
  }
895
- function K(d) {
896
- I.value = d;
983
+ function A(r) {
984
+ T.value = r;
897
985
  }
898
- return (d, i) => (k(), _("div", vt, [
899
- E("div", bt, [
900
- C(ze, {
986
+ return (r, e) => (h(), R("div", pt, [
987
+ _("div", kt, [
988
+ O(We, {
901
989
  ref: "tabsetRef",
902
- "emoji-filter": c.value,
990
+ "emoji-filter": u.value,
991
+ "show-custom-emojis-tab": i.value,
903
992
  "show-recently-used-tab": f.value,
904
- "scroll-into-tab": S.value,
905
- "tabset-labels": t.tabSetLabels,
906
- onFocusSkinSelector: i[0] || (i[0] = (e) => d.$refs.skinSelectorRef.focusSkinSelector()),
907
- onFocusSearchInput: i[1] || (i[1] = (e) => t.showSearch ? d.$refs.searchInputRef.focusSearchInput() : d.$refs.emojiSelectorRef.focusEmojiSelector()),
908
- onSelectedTabset: n,
909
- onKeydown: i[2] || (i[2] = M((e) => a("close"), ["esc"]))
910
- }, null, 8, ["emoji-filter", "show-recently-used-tab", "scroll-into-tab", "tabset-labels"])
993
+ "scroll-into-tab": j.value,
994
+ "tabset-labels": o.tabSetLabels,
995
+ onFocusSkinSelector: e[0] || (e[0] = (t) => r.$refs.skinSelectorRef.focusSkinSelector()),
996
+ onFocusSearchInput: e[1] || (e[1] = (t) => o.showSearch ? r.$refs.searchInputRef.focusSearchInput() : r.$refs.emojiSelectorRef.focusEmojiSelector()),
997
+ onSelectedTabset: S,
998
+ onKeydown: e[2] || (e[2] = P((t) => n("close"), ["esc"]))
999
+ }, null, 8, ["emoji-filter", "show-custom-emojis-tab", "show-recently-used-tab", "scroll-into-tab", "tabset-labels"])
911
1000
  ]),
912
- E("div", ht, [
913
- t.showSearch ? (k(), te(Pe, {
1001
+ _("div", gt, [
1002
+ o.showSearch ? (h(), Z(He, {
914
1003
  key: 0,
915
1004
  ref: "searchInputRef",
916
- modelValue: c.value,
917
- "onUpdate:modelValue": i[3] || (i[3] = (e) => c.value = e),
918
- "search-placeholder-label": t.searchPlaceholderLabel,
919
- onSelectFirstEmoji: i[4] || (i[4] = (e) => a("selected-emoji", I.value)),
920
- onFocusTabset: i[5] || (i[5] = (e) => d.$refs.tabsetRef.focusTabset()),
921
- onFocusEmojiSelector: i[6] || (i[6] = (e) => d.$refs.emojiSelectorRef.focusEmojiSelector()),
922
- onKeydown: i[7] || (i[7] = M((e) => a("close"), ["esc"]))
923
- }, null, 8, ["modelValue", "search-placeholder-label"])) : Z("", !0),
924
- C(ot, {
1005
+ modelValue: u.value,
1006
+ "onUpdate:modelValue": e[3] || (e[3] = (t) => u.value = t),
1007
+ "search-placeholder-label": o.searchPlaceholderLabel,
1008
+ onSelectFirstEmoji: e[4] || (e[4] = (t) => n("selected-emoji", T.value)),
1009
+ onFocusTabset: e[5] || (e[5] = (t) => r.$refs.tabsetRef.focusTabset()),
1010
+ onFocusEmojiSelector: e[6] || (e[6] = (t) => r.$refs.emojiSelectorRef.focusEmojiSelector()),
1011
+ onKeydown: e[7] || (e[7] = P((t) => n("close"), ["esc"]))
1012
+ }, null, 8, ["modelValue", "search-placeholder-label"])) : Y("", !0),
1013
+ O(nt, {
925
1014
  ref: "emojiSelectorRef",
926
- "emoji-filter": c.value,
927
- "skin-tone": t.skinTone,
928
- "tabset-labels": t.tabSetLabels,
929
- "search-results-label": t.searchResultsLabel,
930
- "search-no-results-label": t.searchNoResultsLabel,
931
- "recently-used-emojis": t.recentlyUsedEmojis,
1015
+ "emoji-filter": u.value,
1016
+ "skin-tone": o.skinTone,
1017
+ "tabset-labels": o.tabSetLabels,
1018
+ "search-results-label": o.searchResultsLabel,
1019
+ "search-no-results-label": o.searchNoResultsLabel,
1020
+ "recently-used-emojis": o.recentlyUsedEmojis,
1021
+ "custom-emojis": o.customEmojis,
932
1022
  "selected-tabset": p.value,
933
- onScrollIntoTab: j,
934
- onHighlightedEmoji: K,
935
- onSelectedEmoji: i[8] || (i[8] = (e) => a("selected-emoji", e)),
936
- onFocusSkinSelector: i[9] || (i[9] = (e) => d.$refs.skinSelectorRef.focusSkinSelector()),
937
- onFocusSearchInput: i[10] || (i[10] = (e) => t.showSearch ? d.$refs.searchInputRef.focusSearchInput() : d.$refs.tabsetRef.focusTabset()),
938
- onKeydown: i[11] || (i[11] = M((e) => a("close"), ["esc"]))
939
- }, null, 8, ["emoji-filter", "skin-tone", "tabset-labels", "search-results-label", "search-no-results-label", "recently-used-emojis", "selected-tabset"])
1023
+ onScrollIntoTab: K,
1024
+ onHighlightedEmoji: A,
1025
+ onSelectedEmoji: e[8] || (e[8] = (t) => n("selected-emoji", t)),
1026
+ onFocusSkinSelector: e[9] || (e[9] = (t) => r.$refs.skinSelectorRef.focusSkinSelector()),
1027
+ onFocusSearchInput: e[10] || (e[10] = (t) => o.showSearch ? r.$refs.searchInputRef.focusSearchInput() : r.$refs.tabsetRef.focusTabset()),
1028
+ onKeydown: e[11] || (e[11] = P((t) => n("close"), ["esc"])),
1029
+ onScrollBottomReached: e[12] || (e[12] = (t) => n("scroll-bottom-reached"))
1030
+ }, null, 8, ["emoji-filter", "skin-tone", "tabset-labels", "search-results-label", "search-no-results-label", "recently-used-emojis", "custom-emojis", "selected-tabset"])
940
1031
  ]),
941
- E("div", pt, [
942
- C(mt, { emoji: I.value }, null, 8, ["emoji"]),
943
- C(ct, {
1032
+ _("div", yt, [
1033
+ i.value && !T.value ? (h(), Z($(me), {
1034
+ key: 0,
1035
+ importance: "outlined",
1036
+ "aria-label": o.addEmojiLabel,
1037
+ class: "d-emoji-picker__add-emoji",
1038
+ onClick: e[13] || (e[13] = (t) => n("add-emoji"))
1039
+ }, {
1040
+ default: U(() => [
1041
+ de(H(o.addEmojiLabel), 1)
1042
+ ]),
1043
+ _: 1
1044
+ }, 8, ["aria-label"])) : Y("", !0),
1045
+ O(ht, { emoji: T.value }, null, 8, ["emoji"]),
1046
+ O(mt, {
944
1047
  ref: "skinSelectorRef",
945
- "is-hovering": !!I.value,
946
- "skin-selector-button-tooltip-label": t.skinSelectorButtonTooltipLabel,
947
- "skin-tone": t.skinTone,
948
- onSkinTone: i[12] || (i[12] = (e) => a("skin-tone", e)),
949
- onFocusTabset: i[13] || (i[13] = (e) => d.$refs.tabsetRef.focusTabset()),
950
- onFocusLastEmoji: i[14] || (i[14] = (e) => d.$refs.emojiSelectorRef.focusLastEmoji()),
951
- onKeydown: i[15] || (i[15] = M((e) => a("close"), ["esc"]))
1048
+ "is-hovering": !!T.value,
1049
+ "skin-selector-button-tooltip-label": o.skinSelectorButtonTooltipLabel,
1050
+ "skin-tone": o.skinTone,
1051
+ onSkinTone: e[14] || (e[14] = (t) => n("skin-tone", t)),
1052
+ onFocusTabset: e[15] || (e[15] = (t) => r.$refs.tabsetRef.focusTabset()),
1053
+ onFocusLastEmoji: e[16] || (e[16] = (t) => r.$refs.emojiSelectorRef.focusLastEmoji()),
1054
+ onKeydown: e[17] || (e[17] = P((t) => n("close"), ["esc"]))
952
1055
  }, null, 8, ["is-hovering", "skin-selector-button-tooltip-label", "skin-tone"])
953
1056
  ])
954
1057
  ]));
955
1058
  }
956
1059
  };
957
1060
  export {
958
- It as default
1061
+ Ft as default
959
1062
  };
960
1063
  //# sourceMappingURL=emoji-picker.js.map