@nextcloud/vue 8.27.0 → 8.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (503) hide show
  1. package/CHANGELOG.md +99 -25
  2. package/dist/Components/NcActionButton.cjs +1 -1
  3. package/dist/Components/NcActionButton.mjs +1 -1
  4. package/dist/Components/NcActionButtonGroup.cjs +1 -1
  5. package/dist/Components/NcActionButtonGroup.mjs +1 -1
  6. package/dist/Components/NcActionInput.cjs +1 -1
  7. package/dist/Components/NcActionInput.mjs +1 -1
  8. package/dist/Components/NcActionText.cjs +3 -3
  9. package/dist/Components/NcActionText.cjs.map +1 -1
  10. package/dist/Components/NcActionText.mjs +3 -3
  11. package/dist/Components/NcActionText.mjs.map +1 -1
  12. package/dist/Components/NcActionTextEditable.cjs +1 -1
  13. package/dist/Components/NcActionTextEditable.mjs +1 -1
  14. package/dist/Components/NcActions.cjs +1 -1
  15. package/dist/Components/NcActions.mjs +1 -1
  16. package/dist/Components/NcAppContent.cjs +1 -1
  17. package/dist/Components/NcAppContent.mjs +1 -1
  18. package/dist/Components/NcAppNavigation.cjs +1 -1
  19. package/dist/Components/NcAppNavigation.mjs +1 -1
  20. package/dist/Components/NcAppNavigationCaption.cjs +1 -1
  21. package/dist/Components/NcAppNavigationCaption.mjs +1 -1
  22. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  23. package/dist/Components/NcAppNavigationItem.mjs +1 -1
  24. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  25. package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
  26. package/dist/Components/NcAppNavigationSearch.cjs +1 -1
  27. package/dist/Components/NcAppNavigationSearch.mjs +1 -1
  28. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  29. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  30. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  31. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  32. package/dist/Components/NcAppSettingsDialog.cjs +1 -1
  33. package/dist/Components/NcAppSettingsDialog.mjs +1 -1
  34. package/dist/Components/NcAppSidebar.cjs +1 -1
  35. package/dist/Components/NcAppSidebar.mjs +1 -1
  36. package/dist/Components/NcAvatar.cjs +1 -1
  37. package/dist/Components/NcAvatar.mjs +1 -1
  38. package/dist/Components/NcBreadcrumb.cjs +1 -1
  39. package/dist/Components/NcBreadcrumb.mjs +1 -1
  40. package/dist/Components/NcBreadcrumbs.cjs +1 -1
  41. package/dist/Components/NcBreadcrumbs.mjs +1 -1
  42. package/dist/Components/NcButton.cjs +15 -2
  43. package/dist/Components/NcButton.cjs.map +1 -1
  44. package/dist/Components/NcButton.mjs +15 -2
  45. package/dist/Components/NcButton.mjs.map +1 -1
  46. package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
  47. package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
  48. package/dist/Components/NcChip.cjs +4 -4
  49. package/dist/Components/NcChip.mjs +4 -4
  50. package/dist/Components/NcCollectionList.cjs +1 -1
  51. package/dist/Components/NcCollectionList.mjs +1 -1
  52. package/dist/Components/NcColorPicker.cjs +1 -1
  53. package/dist/Components/NcColorPicker.mjs +1 -1
  54. package/dist/Components/NcContent.cjs +1 -1
  55. package/dist/Components/NcContent.mjs +1 -1
  56. package/dist/Components/NcDashboardWidget.cjs +1 -1
  57. package/dist/Components/NcDashboardWidget.mjs +1 -1
  58. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  59. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  60. package/dist/Components/NcDateTime.cjs +1 -1
  61. package/dist/Components/NcDateTime.mjs +1 -1
  62. package/dist/Components/NcDateTimePicker.cjs +5 -5
  63. package/dist/Components/NcDateTimePicker.mjs +5 -5
  64. package/dist/Components/NcDateTimePickerNative.cjs +1 -1
  65. package/dist/Components/NcDateTimePickerNative.mjs +1 -1
  66. package/dist/Components/NcDialog.cjs +1 -1
  67. package/dist/Components/NcDialog.mjs +1 -1
  68. package/dist/Components/NcDialogButton.cjs +1 -1
  69. package/dist/Components/NcDialogButton.mjs +1 -1
  70. package/dist/Components/NcEmojiPicker.cjs +1 -1
  71. package/dist/Components/NcEmojiPicker.mjs +1 -1
  72. package/dist/Components/NcGuestContent.cjs +2 -2
  73. package/dist/Components/NcGuestContent.cjs.map +1 -1
  74. package/dist/Components/NcGuestContent.mjs +2 -2
  75. package/dist/Components/NcGuestContent.mjs.map +1 -1
  76. package/dist/Components/NcHeaderButton.cjs +1 -1
  77. package/dist/Components/NcHeaderButton.mjs +1 -1
  78. package/dist/Components/NcHeaderMenu.cjs +1 -1
  79. package/dist/Components/NcHeaderMenu.mjs +1 -1
  80. package/dist/Components/NcInputField.cjs +1 -1
  81. package/dist/Components/NcInputField.mjs +1 -1
  82. package/dist/Components/NcListItem.cjs +1 -1
  83. package/dist/Components/NcListItem.mjs +1 -1
  84. package/dist/Components/NcListItemIcon.cjs +1 -1
  85. package/dist/Components/NcListItemIcon.mjs +1 -1
  86. package/dist/Components/NcLoadingIcon.cjs +2 -2
  87. package/dist/Components/NcLoadingIcon.cjs.map +1 -1
  88. package/dist/Components/NcLoadingIcon.mjs +2 -2
  89. package/dist/Components/NcLoadingIcon.mjs.map +1 -1
  90. package/dist/Components/NcModal.cjs +8 -17
  91. package/dist/Components/NcModal.cjs.map +1 -1
  92. package/dist/Components/NcModal.mjs +8 -17
  93. package/dist/Components/NcModal.mjs.map +1 -1
  94. package/dist/Components/NcPasswordField.cjs +1 -1
  95. package/dist/Components/NcPasswordField.mjs +1 -1
  96. package/dist/Components/NcPopover.cjs +1 -1
  97. package/dist/Components/NcPopover.mjs +1 -1
  98. package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
  99. package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
  100. package/dist/Components/NcRichContenteditable.cjs +2 -2
  101. package/dist/Components/NcRichContenteditable.mjs +2 -2
  102. package/dist/Components/NcRichText.cjs +2 -2
  103. package/dist/Components/NcRichText.mjs +3 -3
  104. package/dist/Components/NcSavingIndicatorIcon.cjs +1 -1
  105. package/dist/Components/NcSavingIndicatorIcon.mjs +1 -1
  106. package/dist/Components/NcSelect.cjs +1 -1
  107. package/dist/Components/NcSelect.mjs +1 -1
  108. package/dist/Components/NcSelectTags.cjs +1 -1
  109. package/dist/Components/NcSelectTags.mjs +1 -1
  110. package/dist/Components/NcSelectUsers.cjs +1 -1
  111. package/dist/Components/NcSelectUsers.mjs +1 -1
  112. package/dist/Components/NcSettingsInputText.cjs +1 -1
  113. package/dist/Components/NcSettingsInputText.mjs +1 -1
  114. package/dist/Components/NcSettingsSection.cjs +1 -1
  115. package/dist/Components/NcSettingsSection.mjs +1 -1
  116. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  117. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  118. package/dist/Components/NcTextArea.cjs +1 -1
  119. package/dist/Components/NcTextArea.mjs +1 -1
  120. package/dist/Components/NcTextField.cjs +1 -1
  121. package/dist/Components/NcTextField.mjs +1 -1
  122. package/dist/Components/NcThemeProvider.cjs +4 -0
  123. package/dist/Components/NcThemeProvider.cjs.map +1 -0
  124. package/dist/Components/NcThemeProvider.mjs +5 -0
  125. package/dist/Components/NcThemeProvider.mjs.map +1 -0
  126. package/dist/Components/NcTimezonePicker.cjs +1 -1
  127. package/dist/Components/NcTimezonePicker.mjs +1 -1
  128. package/dist/Components/NcUserBubble.cjs +1 -1
  129. package/dist/Components/NcUserBubble.mjs +1 -1
  130. package/dist/Components/NcUserStatusIcon.cjs +1 -1
  131. package/dist/Components/NcUserStatusIcon.mjs +1 -1
  132. package/dist/Composables/useFormatDateTime.cjs +68 -0
  133. package/dist/Composables/useFormatDateTime.cjs.map +1 -0
  134. package/dist/Composables/useFormatDateTime.mjs +68 -0
  135. package/dist/Composables/useFormatDateTime.mjs.map +1 -0
  136. package/dist/Composables/useHotKey.cjs +13 -1
  137. package/dist/Composables/useHotKey.cjs.map +1 -1
  138. package/dist/Composables/useHotKey.mjs +13 -1
  139. package/dist/Composables/useHotKey.mjs.map +1 -1
  140. package/dist/Composables/useIsDarkTheme.cjs +23 -6
  141. package/dist/Composables/useIsDarkTheme.cjs.map +1 -1
  142. package/dist/Composables/useIsDarkTheme.mjs +24 -7
  143. package/dist/Composables/useIsDarkTheme.mjs.map +1 -1
  144. package/dist/Functions/dialog.cjs +19 -7
  145. package/dist/Functions/dialog.cjs.map +1 -1
  146. package/dist/Functions/dialog.mjs +19 -7
  147. package/dist/Functions/dialog.mjs.map +1 -1
  148. package/dist/Functions/reference.cjs +1 -1
  149. package/dist/Functions/reference.mjs +1 -1
  150. package/dist/Functions/usernameToColor.cjs +28 -2
  151. package/dist/Functions/usernameToColor.cjs.map +1 -1
  152. package/dist/Functions/usernameToColor.mjs +25 -2
  153. package/dist/Functions/usernameToColor.mjs.map +1 -1
  154. package/dist/Mixins/richEditor.cjs +1 -1
  155. package/dist/Mixins/richEditor.mjs +1 -1
  156. package/dist/assets/{NcActionButton-CuV1ITDb.css → NcActionButton-D8Lyueq3.css} +20 -17
  157. package/dist/assets/{NcActionInput-gUagFGC5.css → NcActionInput-Q0DfTHVL.css} +62 -62
  158. package/dist/assets/{NcActionText-vT7nheBU.css → NcActionText-Rad4JSXq.css} +18 -18
  159. package/dist/assets/{NcActions-3STB3u9J.css → NcActions-C3F-rqxz.css} +11 -11
  160. package/dist/assets/{NcAppContent-DUkkgtHn.css → NcAppContent-Bb5hgGi3.css} +23 -23
  161. package/dist/assets/{NcAppNavigationItem-CdT6ce8-.css → NcAppNavigationItem-Ca2ekElv.css} +35 -31
  162. package/dist/assets/{NcAppNavigationNewItem-D7wroqrc.css → NcAppNavigationNewItem-PE-w8y-g.css} +5 -1
  163. package/dist/assets/{NcAppSidebar-BFg2HHh6.css → NcAppSidebar-u0G_qQMh.css} +44 -67
  164. package/dist/assets/NcAvatar-BqNcvkxP.css +134 -0
  165. package/dist/assets/{NcButton-DnNZaEy_.css → NcButton-Cjx-v-Qz.css} +84 -72
  166. package/dist/assets/{NcCheckboxRadioSwitch-DlEieXCj.css → NcCheckboxRadioSwitch-B-axx3m7.css} +45 -42
  167. package/dist/assets/{NcColorPicker-BayJGD4p.css → NcColorPicker-C-3wb1sk.css} +28 -28
  168. package/dist/assets/{NcContent-Bq-7EZQc.css → NcContent-DH4tX3N4.css} +12 -9
  169. package/dist/assets/{NcDateTimePicker-hcAowAbZ.css → NcDateTimePicker-Bx7XHFo7.css} +7 -7
  170. package/dist/assets/{NcDialog-BPI0CJvw.css → NcDialog-X7BRqUGJ.css} +15 -15
  171. package/dist/assets/{NcGuestContent-B0ivUQHg.css → NcGuestContent-ByAkjts7.css} +2 -2
  172. package/dist/assets/{NcHeaderButton-Dr6MgPDQ.css → NcHeaderButton-ByNXqS7x.css} +4 -0
  173. package/dist/assets/{NcHeaderMenu-DN-HfTkh.css → NcHeaderMenu-Dp_vJKTP.css} +4 -0
  174. package/dist/assets/{NcInputField-GxJ-rf2p.css → NcInputField-Cdd0B1OR.css} +38 -32
  175. package/dist/assets/{NcListItem-DfaWGP5A.css → NcListItem-CCu1OBiG.css} +44 -44
  176. package/dist/assets/{NcLoadingIcon-x1d284UU.css → NcLoadingIcon-DbbToJVp.css} +5 -2
  177. package/dist/assets/{NcMentionBubble-CB5c5ue2.css → NcMentionBubble-UsTMm5VD.css} +9 -9
  178. package/dist/assets/{NcModal-BS5vtogq.css → NcModal-Cy3UOuI2.css} +62 -62
  179. package/dist/assets/{NcPasswordField-whtKJFcB.css → NcPasswordField-DVK8tuPi.css} +2 -2
  180. package/dist/assets/{NcRichContenteditable-BbOjh6i7.css → NcRichContenteditable-CGRMNrie.css} +9 -9
  181. package/dist/assets/{NcRichText-li93TNBn.css → NcRichText-CWVHZl8s.css} +86 -83
  182. package/dist/assets/NcSelectUsers-BOwQNNMf.css +4 -0
  183. package/dist/assets/{NcSettingsSection-_mX6UqM_.css → NcSettingsSection-uKqWTbhb.css} +8 -8
  184. package/dist/assets/{NcTextArea-fzbciv3V.css → NcTextArea-DhttRTsL.css} +20 -20
  185. package/dist/assets/{NcUserStatusIcon-DAVSJFhS.css → NcUserStatusIcon-ChHaXPex.css} +7 -7
  186. package/dist/chunks/{GenColors-7bkY5Nwl.cjs → GenColors-BnYS3bvv.cjs} +2 -2
  187. package/dist/chunks/{GenColors-7bkY5Nwl.cjs.map → GenColors-BnYS3bvv.cjs.map} +1 -1
  188. package/dist/chunks/{GenColors-B49R8TGp.mjs → GenColors-DNN63dHB.mjs} +2 -2
  189. package/dist/chunks/{GenColors-B49R8TGp.mjs.map → GenColors-DNN63dHB.mjs.map} +1 -1
  190. package/dist/chunks/{NcActionButton-CD87AU6W.cjs → NcActionButton-2qh96K_i.cjs} +4 -4
  191. package/dist/chunks/{NcActionButton-CD87AU6W.cjs.map → NcActionButton-2qh96K_i.cjs.map} +1 -1
  192. package/dist/chunks/{NcActionButton-CuVNJJtW.mjs → NcActionButton-CHrE7amZ.mjs} +4 -4
  193. package/dist/chunks/{NcActionButton-CuVNJJtW.mjs.map → NcActionButton-CHrE7amZ.mjs.map} +1 -1
  194. package/dist/chunks/{NcActionButtonGroup-BMy3W9fG.cjs → NcActionButtonGroup-B8Bj-Qb3.cjs} +2 -2
  195. package/dist/chunks/{NcActionButtonGroup-BMy3W9fG.cjs.map → NcActionButtonGroup-B8Bj-Qb3.cjs.map} +1 -1
  196. package/dist/chunks/{NcActionButtonGroup-DEf00ge6.mjs → NcActionButtonGroup-_R4fp-bK.mjs} +2 -2
  197. package/dist/chunks/{NcActionButtonGroup-DEf00ge6.mjs.map → NcActionButtonGroup-_R4fp-bK.mjs.map} +1 -1
  198. package/dist/chunks/{NcActionInput-B4qGsF57.mjs → NcActionInput-BXOssTbe.mjs} +12 -11
  199. package/dist/chunks/NcActionInput-BXOssTbe.mjs.map +1 -0
  200. package/dist/chunks/{NcActionInput-BmERg0FB.cjs → NcActionInput-Bv4_2oYO.cjs} +13 -11
  201. package/dist/chunks/NcActionInput-Bv4_2oYO.cjs.map +1 -0
  202. package/dist/chunks/{NcActionTextEditable-Cceub6Yt.cjs → NcActionTextEditable-DqcHZqN5.cjs} +2 -2
  203. package/dist/chunks/{NcActionTextEditable-Cceub6Yt.cjs.map → NcActionTextEditable-DqcHZqN5.cjs.map} +1 -1
  204. package/dist/chunks/{NcActionTextEditable-DNweMXRJ.mjs → NcActionTextEditable-xrMV-kE8.mjs} +2 -2
  205. package/dist/chunks/{NcActionTextEditable-DNweMXRJ.mjs.map → NcActionTextEditable-xrMV-kE8.mjs.map} +1 -1
  206. package/dist/chunks/{NcActions-B4VZCD8B.mjs → NcActions-BANvgaMn.mjs} +42 -9
  207. package/dist/chunks/NcActions-BANvgaMn.mjs.map +1 -0
  208. package/dist/chunks/{NcActions-B7DbEbCo.cjs → NcActions-DV3CjPHr.cjs} +42 -9
  209. package/dist/chunks/NcActions-DV3CjPHr.cjs.map +1 -0
  210. package/dist/chunks/{NcAppContent-B7ER65tk.cjs → NcAppContent-BqR67yTH.cjs} +44 -36
  211. package/dist/chunks/NcAppContent-BqR67yTH.cjs.map +1 -0
  212. package/dist/chunks/{NcAppContent-DyXqBrOB.mjs → NcAppContent-twZJBrQv.mjs} +44 -36
  213. package/dist/chunks/NcAppContent-twZJBrQv.mjs.map +1 -0
  214. package/dist/chunks/{NcAppNavigation-JyeZxhb6.cjs → NcAppNavigation-COge8_bn.cjs} +3 -3
  215. package/dist/chunks/{NcAppNavigation-JyeZxhb6.cjs.map → NcAppNavigation-COge8_bn.cjs.map} +1 -1
  216. package/dist/chunks/{NcAppNavigation-CqKWSnxO.mjs → NcAppNavigation-VSGTDckG.mjs} +3 -3
  217. package/dist/chunks/{NcAppNavigation-CqKWSnxO.mjs.map → NcAppNavigation-VSGTDckG.mjs.map} +1 -1
  218. package/dist/chunks/{NcAppNavigationCaption-CMnWvBgA.cjs → NcAppNavigationCaption-ofy-JSGu.cjs} +2 -2
  219. package/dist/chunks/{NcAppNavigationCaption-CMnWvBgA.cjs.map → NcAppNavigationCaption-ofy-JSGu.cjs.map} +1 -1
  220. package/dist/chunks/{NcAppNavigationCaption-DcgSwIOY.mjs → NcAppNavigationCaption-oxc7chGv.mjs} +2 -2
  221. package/dist/chunks/{NcAppNavigationCaption-DcgSwIOY.mjs.map → NcAppNavigationCaption-oxc7chGv.mjs.map} +1 -1
  222. package/dist/chunks/{NcAppNavigationItem-B9Gs5p7m.cjs → NcAppNavigationItem-B-uv2tWu.cjs} +8 -8
  223. package/dist/chunks/NcAppNavigationItem-B-uv2tWu.cjs.map +1 -0
  224. package/dist/chunks/{NcAppNavigationItem-CrTVtqYV.mjs → NcAppNavigationItem-CbtPNTg_.mjs} +8 -8
  225. package/dist/chunks/NcAppNavigationItem-CbtPNTg_.mjs.map +1 -0
  226. package/dist/chunks/{NcAppNavigationNewItem-CcBvnQst.mjs → NcAppNavigationNewItem-Cz8VbLjN.mjs} +3 -3
  227. package/dist/chunks/{NcAppNavigationNewItem-CcBvnQst.mjs.map → NcAppNavigationNewItem-Cz8VbLjN.mjs.map} +1 -1
  228. package/dist/chunks/{NcAppNavigationNewItem-BLek0JRU.cjs → NcAppNavigationNewItem-DzpW6cIK.cjs} +3 -3
  229. package/dist/chunks/{NcAppNavigationNewItem-BLek0JRU.cjs.map → NcAppNavigationNewItem-DzpW6cIK.cjs.map} +1 -1
  230. package/dist/chunks/{NcAppNavigationSearch-BC3kPnxr.mjs → NcAppNavigationSearch-BvCjwhyQ.mjs} +3 -3
  231. package/dist/chunks/{NcAppNavigationSearch-BC3kPnxr.mjs.map → NcAppNavigationSearch-BvCjwhyQ.mjs.map} +1 -1
  232. package/dist/chunks/{NcAppNavigationSearch-BblolNaS.cjs → NcAppNavigationSearch-s1mEjjZM.cjs} +3 -3
  233. package/dist/chunks/{NcAppNavigationSearch-BblolNaS.cjs.map → NcAppNavigationSearch-s1mEjjZM.cjs.map} +1 -1
  234. package/dist/chunks/{NcAppNavigationSettings-JruJ3cF1.mjs → NcAppNavigationSettings-DhQ5tXEJ.mjs} +5 -3
  235. package/dist/chunks/{NcAppNavigationSettings-JruJ3cF1.mjs.map → NcAppNavigationSettings-DhQ5tXEJ.mjs.map} +1 -1
  236. package/dist/chunks/{NcAppNavigationSettings-ppse1A0c.cjs → NcAppNavigationSettings-DnvFbZyP.cjs} +5 -3
  237. package/dist/chunks/{NcAppNavigationSettings-ppse1A0c.cjs.map → NcAppNavigationSettings-DnvFbZyP.cjs.map} +1 -1
  238. package/dist/chunks/{NcAppNavigationToggle-CUdNQwyN.mjs → NcAppNavigationToggle-CINjg2Mo.mjs} +2 -2
  239. package/dist/chunks/{NcAppNavigationToggle-CUdNQwyN.mjs.map → NcAppNavigationToggle-CINjg2Mo.mjs.map} +1 -1
  240. package/dist/chunks/{NcAppNavigationToggle-CUGOWggc.cjs → NcAppNavigationToggle-CbZem2gZ.cjs} +2 -2
  241. package/dist/chunks/{NcAppNavigationToggle-CUGOWggc.cjs.map → NcAppNavigationToggle-CbZem2gZ.cjs.map} +1 -1
  242. package/dist/chunks/{NcAppSettingsDialog-6cTux_qA.cjs → NcAppSettingsDialog-C1m0QYAK.cjs} +3 -3
  243. package/dist/chunks/{NcAppSettingsDialog-6cTux_qA.cjs.map → NcAppSettingsDialog-C1m0QYAK.cjs.map} +1 -1
  244. package/dist/chunks/{NcAppSettingsDialog-D98cLpyy.mjs → NcAppSettingsDialog-Duyfikm-.mjs} +3 -3
  245. package/dist/chunks/{NcAppSettingsDialog-D98cLpyy.mjs.map → NcAppSettingsDialog-Duyfikm-.mjs.map} +1 -1
  246. package/dist/chunks/{NcAppSidebar-BqMsSY-_.cjs → NcAppSidebar-C-7OzN3N.cjs} +7 -7
  247. package/dist/chunks/{NcAppSidebar-BdryV6wY.mjs.map → NcAppSidebar-C-7OzN3N.cjs.map} +1 -1
  248. package/dist/chunks/{NcAppSidebar-BdryV6wY.mjs → NcAppSidebar-ape8OSJ3.mjs} +7 -7
  249. package/dist/chunks/{NcAppSidebar-BqMsSY-_.cjs.map → NcAppSidebar-ape8OSJ3.mjs.map} +1 -1
  250. package/dist/chunks/{NcAvatar-YSp2ORHc.mjs → NcAvatar-BA6pHpbT.mjs} +37 -26
  251. package/dist/chunks/NcAvatar-BA6pHpbT.mjs.map +1 -0
  252. package/dist/chunks/{NcAvatar-D_1clyWB.cjs → NcAvatar-CdBMEKsO.cjs} +39 -28
  253. package/dist/chunks/NcAvatar-CdBMEKsO.cjs.map +1 -0
  254. package/dist/chunks/{NcBreadcrumb-BSRmcIIh.cjs → NcBreadcrumb-BiW4k0c_.cjs} +2 -2
  255. package/dist/chunks/{NcBreadcrumb-BSRmcIIh.cjs.map → NcBreadcrumb-BiW4k0c_.cjs.map} +1 -1
  256. package/dist/chunks/{NcBreadcrumb-Cu1XtrUo.mjs → NcBreadcrumb-BjsavDr1.mjs} +2 -2
  257. package/dist/chunks/{NcBreadcrumb-Cu1XtrUo.mjs.map → NcBreadcrumb-BjsavDr1.mjs.map} +1 -1
  258. package/dist/chunks/{NcBreadcrumbs-B1LdRe5_.mjs → NcBreadcrumbs-Bc2obqjl.mjs} +4 -4
  259. package/dist/chunks/{NcBreadcrumbs-B1LdRe5_.mjs.map → NcBreadcrumbs-Bc2obqjl.mjs.map} +1 -1
  260. package/dist/chunks/{NcBreadcrumbs-B0m6jKER.cjs → NcBreadcrumbs-Dwnn6dKU.cjs} +4 -4
  261. package/dist/chunks/{NcBreadcrumbs-B0m6jKER.cjs.map → NcBreadcrumbs-Dwnn6dKU.cjs.map} +1 -1
  262. package/dist/chunks/{NcCheckboxRadioSwitch-DbK49DI7.cjs → NcCheckboxRadioSwitch-ewtyZP3Z.cjs} +5 -5
  263. package/dist/chunks/NcCheckboxRadioSwitch-ewtyZP3Z.cjs.map +1 -0
  264. package/dist/chunks/{NcCheckboxRadioSwitch-VeztTzpz.mjs → NcCheckboxRadioSwitch-qmvgRzxb.mjs} +5 -5
  265. package/dist/chunks/NcCheckboxRadioSwitch-qmvgRzxb.mjs.map +1 -0
  266. package/dist/chunks/{NcCollectionList-BStYmq4u.cjs → NcCollectionList-C5nw4svt.cjs} +6 -6
  267. package/dist/chunks/{NcCollectionList-BStYmq4u.cjs.map → NcCollectionList-C5nw4svt.cjs.map} +1 -1
  268. package/dist/chunks/{NcCollectionList-CFt-EZON.mjs → NcCollectionList-CXAtmdEZ.mjs} +6 -6
  269. package/dist/chunks/{NcCollectionList-CFt-EZON.mjs.map → NcCollectionList-CXAtmdEZ.mjs.map} +1 -1
  270. package/dist/chunks/{NcColorPicker-D7aj2f61.mjs → NcColorPicker-CU2sbJKt.mjs} +63 -33
  271. package/dist/chunks/NcColorPicker-CU2sbJKt.mjs.map +1 -0
  272. package/dist/chunks/{NcColorPicker-T-ifFDNs.cjs → NcColorPicker-DkoxNQJS.cjs} +63 -33
  273. package/dist/chunks/NcColorPicker-DkoxNQJS.cjs.map +1 -0
  274. package/dist/chunks/{NcContent-Cfz3ytoh.mjs → NcContent-BkmB4vmh.mjs} +4 -4
  275. package/dist/chunks/{NcContent-DUUfYUtn.cjs.map → NcContent-BkmB4vmh.mjs.map} +1 -1
  276. package/dist/chunks/{NcContent-DUUfYUtn.cjs → NcContent-h4LUA1hj.cjs} +4 -4
  277. package/dist/chunks/{NcContent-Cfz3ytoh.mjs.map → NcContent-h4LUA1hj.cjs.map} +1 -1
  278. package/dist/chunks/{NcDashboardWidget-eStjL-WD.mjs → NcDashboardWidget-B_Egc1Og.mjs} +4 -4
  279. package/dist/chunks/{NcDashboardWidget-eStjL-WD.mjs.map → NcDashboardWidget-B_Egc1Og.mjs.map} +1 -1
  280. package/dist/chunks/{NcDashboardWidget-BI_Z44sc.cjs → NcDashboardWidget-EsWoGPKV.cjs} +4 -4
  281. package/dist/chunks/{NcDashboardWidget-BI_Z44sc.cjs.map → NcDashboardWidget-EsWoGPKV.cjs.map} +1 -1
  282. package/dist/chunks/{NcDashboardWidgetItem-BRFj1-Ir.mjs → NcDashboardWidgetItem-3oirT6j6.mjs} +4 -4
  283. package/dist/chunks/{NcDashboardWidgetItem-BRFj1-Ir.mjs.map → NcDashboardWidgetItem-3oirT6j6.mjs.map} +1 -1
  284. package/dist/chunks/{NcDashboardWidgetItem-gMKHqbAo.cjs → NcDashboardWidgetItem-qibYWTLk.cjs} +4 -4
  285. package/dist/chunks/{NcDashboardWidgetItem-gMKHqbAo.cjs.map → NcDashboardWidgetItem-qibYWTLk.cjs.map} +1 -1
  286. package/dist/chunks/NcDateTime-Cl-PZpLN.cjs +76 -0
  287. package/dist/chunks/NcDateTime-Cl-PZpLN.cjs.map +1 -0
  288. package/dist/chunks/NcDateTime-kanSdMgW.mjs +77 -0
  289. package/dist/chunks/NcDateTime-kanSdMgW.mjs.map +1 -0
  290. package/dist/chunks/{NcDialog-CKgpZOiy.mjs → NcDialog-C_IHQciE.mjs} +5 -5
  291. package/dist/chunks/{NcDialog-CKgpZOiy.mjs.map → NcDialog-C_IHQciE.mjs.map} +1 -1
  292. package/dist/chunks/{NcDialog-DvC6y1MC.cjs → NcDialog-Cqdo11BM.cjs} +5 -5
  293. package/dist/chunks/{NcDialog-DvC6y1MC.cjs.map → NcDialog-Cqdo11BM.cjs.map} +1 -1
  294. package/dist/chunks/{NcDialogButton-CROAi1Ll.mjs → NcDialogButton-Cc3iWZH1.mjs} +2 -2
  295. package/dist/chunks/{NcDialogButton-CROAi1Ll.mjs.map → NcDialogButton-Cc3iWZH1.mjs.map} +1 -1
  296. package/dist/chunks/{NcDialogButton-BFemrIUw.cjs → NcDialogButton-_biPxXPQ.cjs} +2 -2
  297. package/dist/chunks/{NcDialogButton-BFemrIUw.cjs.map → NcDialogButton-_biPxXPQ.cjs.map} +1 -1
  298. package/dist/chunks/{NcEmojiPicker-Du-vbR5T.mjs → NcEmojiPicker-C3rhl7Xh.mjs} +7 -7
  299. package/dist/chunks/{NcEmojiPicker-Du-vbR5T.mjs.map → NcEmojiPicker-C3rhl7Xh.mjs.map} +1 -1
  300. package/dist/chunks/{NcEmojiPicker-CtvRZuBW.cjs → NcEmojiPicker-Dynz_fRD.cjs} +7 -7
  301. package/dist/chunks/{NcEmojiPicker-CtvRZuBW.cjs.map → NcEmojiPicker-Dynz_fRD.cjs.map} +1 -1
  302. package/dist/chunks/{NcHeaderMenu-Dj7jeq88.mjs → NcHeaderMenu--AvoyMeD.mjs} +6 -4
  303. package/dist/chunks/{NcHeaderMenu-Dj7jeq88.mjs.map → NcHeaderMenu--AvoyMeD.mjs.map} +1 -1
  304. package/dist/chunks/{NcHeaderMenu-CCaYMhFb.cjs → NcHeaderMenu-B12nEFGc.cjs} +6 -4
  305. package/dist/chunks/{NcHeaderMenu-CCaYMhFb.cjs.map → NcHeaderMenu-B12nEFGc.cjs.map} +1 -1
  306. package/dist/chunks/{NcInputConfirmCancel-lVLFwBA4.cjs → NcInputConfirmCancel-BpPXGiKs.cjs} +2 -2
  307. package/dist/chunks/{NcInputConfirmCancel-lVLFwBA4.cjs.map → NcInputConfirmCancel-BpPXGiKs.cjs.map} +1 -1
  308. package/dist/chunks/{NcInputConfirmCancel-Dhbj3Gad.mjs → NcInputConfirmCancel-P1H1ymiB.mjs} +2 -2
  309. package/dist/chunks/{NcInputConfirmCancel-Dhbj3Gad.mjs.map → NcInputConfirmCancel-P1H1ymiB.mjs.map} +1 -1
  310. package/dist/chunks/{NcInputField-C61UUN46.cjs → NcInputField-CD_Jxnho.cjs} +11 -4
  311. package/dist/chunks/NcInputField-CD_Jxnho.cjs.map +1 -0
  312. package/dist/chunks/{NcInputField-DTtUueUZ.mjs → NcInputField-a50IXAHm.mjs} +11 -4
  313. package/dist/chunks/NcInputField-a50IXAHm.mjs.map +1 -0
  314. package/dist/chunks/{NcListItem-BVNMtN9D.cjs → NcListItem-BJLfBv4G.cjs} +10 -9
  315. package/dist/chunks/{NcListItem-BVNMtN9D.cjs.map → NcListItem-BJLfBv4G.cjs.map} +1 -1
  316. package/dist/chunks/{NcListItem-B4Uyn2AS.mjs → NcListItem-DIupNkcV.mjs} +10 -9
  317. package/dist/chunks/{NcListItem-B4Uyn2AS.mjs.map → NcListItem-DIupNkcV.mjs.map} +1 -1
  318. package/dist/chunks/{NcListItemIcon-C_sEE5Xw.cjs → NcListItemIcon-BGehR6IP.cjs} +5 -3
  319. package/dist/chunks/{NcListItemIcon-C_sEE5Xw.cjs.map → NcListItemIcon-BGehR6IP.cjs.map} +1 -1
  320. package/dist/chunks/{NcListItemIcon-0H1Pepui.mjs → NcListItemIcon-C2PVlvB7.mjs} +5 -3
  321. package/dist/chunks/{NcListItemIcon-0H1Pepui.mjs.map → NcListItemIcon-C2PVlvB7.mjs.map} +1 -1
  322. package/dist/chunks/{NcPasswordField-BCzIotoB.cjs → NcPasswordField-Bci0EOiA.cjs} +35 -19
  323. package/dist/chunks/NcPasswordField-Bci0EOiA.cjs.map +1 -0
  324. package/dist/chunks/{NcPasswordField-DNjegDVj.mjs → NcPasswordField-CNUa4WOq.mjs} +35 -19
  325. package/dist/chunks/NcPasswordField-CNUa4WOq.mjs.map +1 -0
  326. package/dist/chunks/{NcPopover-kYsewfff.mjs → NcPopover-4-YxCZOD.mjs} +2 -2
  327. package/dist/chunks/{NcPopover-kYsewfff.mjs.map → NcPopover-4-YxCZOD.mjs.map} +1 -1
  328. package/dist/chunks/{NcPopover-B2z7TwNr.cjs → NcPopover-DH2oMHFe.cjs} +2 -2
  329. package/dist/chunks/{NcPopover-B2z7TwNr.cjs.map → NcPopover-DH2oMHFe.cjs.map} +1 -1
  330. package/dist/chunks/{NcRelatedResourcesPanel-C9qkNtuo.cjs → NcRelatedResourcesPanel-D_4x0nYR.cjs} +2 -2
  331. package/dist/chunks/{NcRelatedResourcesPanel-C9qkNtuo.cjs.map → NcRelatedResourcesPanel-D_4x0nYR.cjs.map} +1 -1
  332. package/dist/chunks/{NcRelatedResourcesPanel-Y38zaKtn.mjs → NcRelatedResourcesPanel-qQK3J_qe.mjs} +2 -2
  333. package/dist/chunks/{NcRelatedResourcesPanel-Y38zaKtn.mjs.map → NcRelatedResourcesPanel-qQK3J_qe.mjs.map} +1 -1
  334. package/dist/chunks/{NcRichContenteditable-Df_eA-oc.cjs → NcRichContenteditable-BLXUzOmi.cjs} +20 -15
  335. package/dist/chunks/NcRichContenteditable-BLXUzOmi.cjs.map +1 -0
  336. package/dist/chunks/{NcRichContenteditable-B8UqleMX.mjs → NcRichContenteditable-C5Dfv3nk.mjs} +20 -15
  337. package/dist/chunks/NcRichContenteditable-C5Dfv3nk.mjs.map +1 -0
  338. package/dist/chunks/{NcRichText-CwXSzf21.mjs → NcRichText-BE5jQHKt.mjs} +10 -6
  339. package/dist/chunks/{NcRichText-BS22_NFb.cjs.map → NcRichText-BE5jQHKt.mjs.map} +1 -1
  340. package/dist/chunks/{NcRichText-BS22_NFb.cjs → NcRichText-Blh7R46K.cjs} +10 -6
  341. package/dist/chunks/{NcRichText-CwXSzf21.mjs.map → NcRichText-Blh7R46K.cjs.map} +1 -1
  342. package/dist/chunks/{NcSavingIndicatorIcon-nv1147dk.mjs → NcSavingIndicatorIcon-BPlY5Y9p.mjs} +2 -2
  343. package/dist/chunks/{NcSavingIndicatorIcon-nv1147dk.mjs.map → NcSavingIndicatorIcon-BPlY5Y9p.mjs.map} +1 -1
  344. package/dist/chunks/{NcSavingIndicatorIcon-Bu-zt4pR.cjs → NcSavingIndicatorIcon-DmGFZsmS.cjs} +2 -2
  345. package/dist/chunks/{NcSavingIndicatorIcon-Bu-zt4pR.cjs.map → NcSavingIndicatorIcon-DmGFZsmS.cjs.map} +1 -1
  346. package/dist/chunks/{NcSelect-CjUzohn5.mjs → NcSelect-B3fxFbfG.mjs} +3 -3
  347. package/dist/chunks/{NcSelect-CjUzohn5.mjs.map → NcSelect-B3fxFbfG.mjs.map} +1 -1
  348. package/dist/chunks/{NcSelect-D2xnxw4_.cjs → NcSelect-R8bPyBFL.cjs} +3 -3
  349. package/dist/chunks/{NcSelect-D2xnxw4_.cjs.map → NcSelect-R8bPyBFL.cjs.map} +1 -1
  350. package/dist/chunks/{NcSelectTags-wJN9J7_t.mjs → NcSelectTags-BxII3k6P.mjs} +3 -3
  351. package/dist/chunks/{NcSelectTags-wJN9J7_t.mjs.map → NcSelectTags-BxII3k6P.mjs.map} +1 -1
  352. package/dist/chunks/{NcSelectTags--3rrSgOf.cjs → NcSelectTags-CmOvIcGU.cjs} +3 -3
  353. package/dist/chunks/{NcSelectTags--3rrSgOf.cjs.map → NcSelectTags-CmOvIcGU.cjs.map} +1 -1
  354. package/dist/chunks/{NcSelectUsers-CtuVriGK.cjs → NcSelectUsers-4dbGg26c.cjs} +14 -8
  355. package/dist/chunks/{NcSelectUsers-CtuVriGK.cjs.map → NcSelectUsers-4dbGg26c.cjs.map} +1 -1
  356. package/dist/chunks/{NcSelectUsers-W17kOow7.mjs → NcSelectUsers-BlVsLFrq.mjs} +14 -8
  357. package/dist/chunks/{NcSelectUsers-W17kOow7.mjs.map → NcSelectUsers-BlVsLFrq.mjs.map} +1 -1
  358. package/dist/chunks/{NcSettingsInputText-BU1_SHOq.cjs → NcSettingsInputText-Cf-juMyF.cjs} +2 -2
  359. package/dist/chunks/{NcSettingsInputText-BU1_SHOq.cjs.map → NcSettingsInputText-Cf-juMyF.cjs.map} +1 -1
  360. package/dist/chunks/{NcSettingsInputText-YO053agL.mjs → NcSettingsInputText-DYN2i2d2.mjs} +2 -2
  361. package/dist/chunks/{NcSettingsInputText-YO053agL.mjs.map → NcSettingsInputText-DYN2i2d2.mjs.map} +1 -1
  362. package/dist/chunks/{NcSettingsSection-C76Kqeew.mjs → NcSettingsSection-DK0dtGcw.mjs} +8 -9
  363. package/dist/chunks/NcSettingsSection-DK0dtGcw.mjs.map +1 -0
  364. package/dist/chunks/{NcSettingsSection-Dcdxs1IN.cjs → NcSettingsSection-VrSMms0R.cjs} +8 -9
  365. package/dist/chunks/NcSettingsSection-VrSMms0R.cjs.map +1 -0
  366. package/dist/chunks/{NcSettingsSelectGroup-Dj0Cusng.cjs → NcSettingsSelectGroup-CutKYnV3.cjs} +3 -3
  367. package/dist/chunks/{NcSettingsSelectGroup-Dj0Cusng.cjs.map → NcSettingsSelectGroup-CutKYnV3.cjs.map} +1 -1
  368. package/dist/chunks/{NcSettingsSelectGroup-CH_kppKo.mjs → NcSettingsSelectGroup-buP5uEyf.mjs} +3 -3
  369. package/dist/chunks/{NcSettingsSelectGroup-CH_kppKo.mjs.map → NcSettingsSelectGroup-buP5uEyf.mjs.map} +1 -1
  370. package/dist/chunks/{NcTextArea-CYLGAGcO.cjs → NcTextArea-BUqxDVLX.cjs} +11 -4
  371. package/dist/chunks/NcTextArea-BUqxDVLX.cjs.map +1 -0
  372. package/dist/chunks/{NcTextArea-BHERsE_g.mjs → NcTextArea-C10S9llK.mjs} +11 -4
  373. package/dist/chunks/NcTextArea-C10S9llK.mjs.map +1 -0
  374. package/dist/chunks/{NcTextField-Uk5iD8o2.cjs → NcTextField-C24Y7Zzr.cjs} +30 -49
  375. package/dist/chunks/NcTextField-C24Y7Zzr.cjs.map +1 -0
  376. package/dist/chunks/{NcTextField-o_8gWurX.mjs → NcTextField-GdOVvMI8.mjs} +30 -49
  377. package/dist/chunks/NcTextField-GdOVvMI8.mjs.map +1 -0
  378. package/dist/chunks/NcThemeProvider-25ResoIv.mjs +53 -0
  379. package/dist/chunks/NcThemeProvider-25ResoIv.mjs.map +1 -0
  380. package/dist/chunks/NcThemeProvider-BqGPTeWg.cjs +52 -0
  381. package/dist/chunks/NcThemeProvider-BqGPTeWg.cjs.map +1 -0
  382. package/dist/chunks/{NcTimezonePicker-q46K1fSq.mjs → NcTimezonePicker-CHrv7H1J.mjs} +3 -3
  383. package/dist/chunks/{NcTimezonePicker-q46K1fSq.mjs.map → NcTimezonePicker-CHrv7H1J.mjs.map} +1 -1
  384. package/dist/chunks/{NcTimezonePicker-BZhgUp10.cjs → NcTimezonePicker-DiYxhC2U.cjs} +3 -3
  385. package/dist/chunks/{NcTimezonePicker-BZhgUp10.cjs.map → NcTimezonePicker-DiYxhC2U.cjs.map} +1 -1
  386. package/dist/chunks/{NcUserBubble-CQHrLJ0S.cjs → NcUserBubble-Bb2KMW2-.cjs} +3 -3
  387. package/dist/chunks/{NcUserBubble-CQHrLJ0S.cjs.map → NcUserBubble-Bb2KMW2-.cjs.map} +1 -1
  388. package/dist/chunks/{NcUserBubble-B3-E-5F5.mjs → NcUserBubble-DMHgoLZr.mjs} +3 -3
  389. package/dist/chunks/{NcUserBubble-B3-E-5F5.mjs.map → NcUserBubble-DMHgoLZr.mjs.map} +1 -1
  390. package/dist/chunks/NcUserStatusIcon-4MmJE11d.cjs +147 -0
  391. package/dist/chunks/NcUserStatusIcon-4MmJE11d.cjs.map +1 -0
  392. package/dist/chunks/NcUserStatusIcon-C1nS9t71.mjs +146 -0
  393. package/dist/chunks/NcUserStatusIcon-C1nS9t71.mjs.map +1 -0
  394. package/dist/chunks/{ScopeComponent-CsLxtFTy.cjs → ScopeComponent-CB6JQj2P.cjs} +2 -2
  395. package/dist/chunks/{ScopeComponent-CsLxtFTy.cjs.map → ScopeComponent-CB6JQj2P.cjs.map} +1 -1
  396. package/dist/chunks/{ScopeComponent-B1B5sM-c.mjs → ScopeComponent-DRKCxrLx.mjs} +2 -2
  397. package/dist/chunks/{ScopeComponent-B1B5sM-c.mjs.map → ScopeComponent-DRKCxrLx.mjs.map} +1 -1
  398. package/dist/chunks/_l10n-BU8-kQzN.mjs +145 -0
  399. package/dist/chunks/_l10n-BU8-kQzN.mjs.map +1 -0
  400. package/dist/chunks/_l10n-DpwcsAC3.cjs +144 -0
  401. package/dist/chunks/{_l10n-BiiXtYiP.cjs.map → _l10n-DpwcsAC3.cjs.map} +1 -1
  402. package/dist/chunks/constants-Bls5liKo.mjs +9 -0
  403. package/dist/chunks/constants-Bls5liKo.mjs.map +1 -0
  404. package/dist/chunks/constants-C_lA-vcp.cjs +8 -0
  405. package/dist/chunks/constants-C_lA-vcp.cjs.map +1 -0
  406. package/dist/chunks/{focusTrap-Vbgxe8ZX.cjs → focusTrap-DUTqW_IG.cjs} +6 -3
  407. package/dist/chunks/focusTrap-DUTqW_IG.cjs.map +1 -0
  408. package/dist/chunks/{focusTrap-DmkaYJTC.mjs → focusTrap-HJQ4pqHV.mjs} +6 -3
  409. package/dist/chunks/focusTrap-HJQ4pqHV.mjs.map +1 -0
  410. package/dist/chunks/getAvatarUrl-Du9Y3cPO.cjs +14 -0
  411. package/dist/chunks/getAvatarUrl-Du9Y3cPO.cjs.map +1 -0
  412. package/dist/chunks/getAvatarUrl-IhLacDEr.mjs +15 -0
  413. package/dist/chunks/getAvatarUrl-IhLacDEr.mjs.map +1 -0
  414. package/dist/chunks/{index-B0yHh7IW.cjs → index-AlIgEQXL.cjs} +12 -8
  415. package/dist/chunks/index-AlIgEQXL.cjs.map +1 -0
  416. package/dist/chunks/{index-Dpk-sL3D.mjs → index-B8gPNa8c.mjs} +12 -8
  417. package/dist/chunks/index-B8gPNa8c.mjs.map +1 -0
  418. package/dist/chunks/legacy-Brrs7mi9.cjs +4 -0
  419. package/dist/chunks/legacy-Brrs7mi9.cjs.map +1 -0
  420. package/dist/chunks/legacy-SvM_Of-C.mjs +5 -0
  421. package/dist/chunks/legacy-SvM_Of-C.mjs.map +1 -0
  422. package/dist/chunks/{mdi-YVKlPhQN.cjs → mdi-BqDPfc6J.cjs} +7 -1
  423. package/dist/chunks/{mdi-YVKlPhQN.cjs.map → mdi-BqDPfc6J.cjs.map} +1 -1
  424. package/dist/chunks/mdi-vLkDaZ9y.mjs +19 -0
  425. package/dist/chunks/{mdi-VRLMiqbd.mjs.map → mdi-vLkDaZ9y.mjs.map} +1 -1
  426. package/dist/chunks/{referencePickerModal-4kExxHbR.mjs → referencePickerModal-C9Ot-OgO.mjs} +6 -6
  427. package/dist/chunks/{referencePickerModal-4kExxHbR.mjs.map → referencePickerModal-C9Ot-OgO.mjs.map} +1 -1
  428. package/dist/chunks/{referencePickerModal-D4q4tELn.cjs → referencePickerModal-Yw2bZ96U.cjs} +6 -6
  429. package/dist/chunks/{referencePickerModal-D4q4tELn.cjs.map → referencePickerModal-Yw2bZ96U.cjs.map} +1 -1
  430. package/dist/chunks/{useTrapStackControl-BJmJdJak.cjs → useTrapStackControl-CTZTSUOt.cjs} +2 -2
  431. package/dist/chunks/{useTrapStackControl-BJmJdJak.cjs.map → useTrapStackControl-CTZTSUOt.cjs.map} +1 -1
  432. package/dist/chunks/{useTrapStackControl-b3A_383w.mjs → useTrapStackControl-yqM2SDEs.mjs} +2 -2
  433. package/dist/chunks/{useTrapStackControl-b3A_383w.mjs.map → useTrapStackControl-yqM2SDEs.mjs.map} +1 -1
  434. package/dist/composables/useFormatDateTime/index.d.ts +73 -0
  435. package/dist/composables/useIsDarkTheme/constants.d.ts +7 -0
  436. package/dist/composables/useIsDarkTheme/index.d.ts +7 -3
  437. package/dist/functions/dialog/index.d.ts +10 -14
  438. package/dist/functions/index.d.ts +1 -1
  439. package/dist/index.cjs +59 -53
  440. package/dist/index.cjs.map +1 -1
  441. package/dist/index.mjs +61 -56
  442. package/dist/index.mjs.map +1 -1
  443. package/dist/utils/focusTrap.d.ts +6 -0
  444. package/dist/utils/getAvatarUrl.d.ts +23 -1
  445. package/dist/utils/legacy.d.ts +1 -0
  446. package/package.json +44 -35
  447. package/dist/assets/NcAvatar-CRiCqAWQ.css +0 -132
  448. package/dist/assets/NcSelectUsers-CRH00RA2.css +0 -4
  449. package/dist/chunks/DotsHorizontal-BoI3vnhk.cjs +0 -37
  450. package/dist/chunks/DotsHorizontal-BoI3vnhk.cjs.map +0 -1
  451. package/dist/chunks/DotsHorizontal-C6LNsw4N.mjs +0 -38
  452. package/dist/chunks/DotsHorizontal-C6LNsw4N.mjs.map +0 -1
  453. package/dist/chunks/NcActionInput-B4qGsF57.mjs.map +0 -1
  454. package/dist/chunks/NcActionInput-BmERg0FB.cjs.map +0 -1
  455. package/dist/chunks/NcActions-B4VZCD8B.mjs.map +0 -1
  456. package/dist/chunks/NcActions-B7DbEbCo.cjs.map +0 -1
  457. package/dist/chunks/NcAppContent-B7ER65tk.cjs.map +0 -1
  458. package/dist/chunks/NcAppContent-DyXqBrOB.mjs.map +0 -1
  459. package/dist/chunks/NcAppNavigationItem-B9Gs5p7m.cjs.map +0 -1
  460. package/dist/chunks/NcAppNavigationItem-CrTVtqYV.mjs.map +0 -1
  461. package/dist/chunks/NcAvatar-D_1clyWB.cjs.map +0 -1
  462. package/dist/chunks/NcAvatar-YSp2ORHc.mjs.map +0 -1
  463. package/dist/chunks/NcCheckboxRadioSwitch-DbK49DI7.cjs.map +0 -1
  464. package/dist/chunks/NcCheckboxRadioSwitch-VeztTzpz.mjs.map +0 -1
  465. package/dist/chunks/NcColorPicker-D7aj2f61.mjs.map +0 -1
  466. package/dist/chunks/NcColorPicker-T-ifFDNs.cjs.map +0 -1
  467. package/dist/chunks/NcDateTime-C-kLQayi.cjs +0 -158
  468. package/dist/chunks/NcDateTime-C-kLQayi.cjs.map +0 -1
  469. package/dist/chunks/NcDateTime-DshRFtUU.mjs +0 -159
  470. package/dist/chunks/NcDateTime-DshRFtUU.mjs.map +0 -1
  471. package/dist/chunks/NcInputField-C61UUN46.cjs.map +0 -1
  472. package/dist/chunks/NcInputField-DTtUueUZ.mjs.map +0 -1
  473. package/dist/chunks/NcPasswordField-BCzIotoB.cjs.map +0 -1
  474. package/dist/chunks/NcPasswordField-DNjegDVj.mjs.map +0 -1
  475. package/dist/chunks/NcRichContenteditable-B8UqleMX.mjs.map +0 -1
  476. package/dist/chunks/NcRichContenteditable-Df_eA-oc.cjs.map +0 -1
  477. package/dist/chunks/NcSettingsSection-C76Kqeew.mjs.map +0 -1
  478. package/dist/chunks/NcSettingsSection-Dcdxs1IN.cjs.map +0 -1
  479. package/dist/chunks/NcTextArea-BHERsE_g.mjs.map +0 -1
  480. package/dist/chunks/NcTextArea-CYLGAGcO.cjs.map +0 -1
  481. package/dist/chunks/NcTextField-Uk5iD8o2.cjs.map +0 -1
  482. package/dist/chunks/NcTextField-o_8gWurX.mjs.map +0 -1
  483. package/dist/chunks/NcUserStatusIcon-cs42Lzdd.cjs +0 -139
  484. package/dist/chunks/NcUserStatusIcon-cs42Lzdd.cjs.map +0 -1
  485. package/dist/chunks/NcUserStatusIcon-kbPFeJV6.mjs +0 -138
  486. package/dist/chunks/NcUserStatusIcon-kbPFeJV6.mjs.map +0 -1
  487. package/dist/chunks/_l10n-BiiXtYiP.cjs +0 -143
  488. package/dist/chunks/_l10n-DQgzdF9S.mjs +0 -144
  489. package/dist/chunks/_l10n-DQgzdF9S.mjs.map +0 -1
  490. package/dist/chunks/focusTrap-DmkaYJTC.mjs.map +0 -1
  491. package/dist/chunks/focusTrap-Vbgxe8ZX.cjs.map +0 -1
  492. package/dist/chunks/getAvatarUrl-6z9qRNH-.cjs +0 -11
  493. package/dist/chunks/getAvatarUrl-6z9qRNH-.cjs.map +0 -1
  494. package/dist/chunks/getAvatarUrl-DxvUjKMi.mjs +0 -12
  495. package/dist/chunks/getAvatarUrl-DxvUjKMi.mjs.map +0 -1
  496. package/dist/chunks/index-B0yHh7IW.cjs.map +0 -1
  497. package/dist/chunks/index-Dpk-sL3D.mjs.map +0 -1
  498. package/dist/chunks/mdi-VRLMiqbd.mjs +0 -13
  499. package/dist/chunks/usernameToColor-mqInDrGv.cjs +0 -28
  500. package/dist/chunks/usernameToColor-mqInDrGv.cjs.map +0 -1
  501. package/dist/chunks/usernameToColor-yoVXn0De.mjs +0 -27
  502. package/dist/chunks/usernameToColor-yoVXn0De.mjs.map +0 -1
  503. package/dist/composables/useFormatDateTime.d.ts +0 -56
@@ -1 +1 @@
1
- {"version":3,"file":"NcDialog-DvC6y1MC.cjs","sources":["../../src/components/NcDialog/NcDialog.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### General description\n\nThis component uses the `NcModal` under the hood for allowing users to create generic dialogs.\n\n### Basic example\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog :open.sync=\"showDialog\" name=\"Confirmation\" message=\"Are you sure to proceed?\" :buttons=\"buttons\" />\n\t\t<p>Last response: {{ lastResponse }}</p>\n\t</div>\n</template>\n<script>\nimport IconCancel from '@mdi/svg/svg/cancel.svg?raw'\nimport IconCheck from '@mdi/svg/svg/check.svg?raw'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tlastResponse: 'None',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Cancel',\n\t\t\t\t\ticon: IconCancel,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Cancel\"' },\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Ok',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Ok\"' },\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Use custom actions and content\nInstead of using the buttons property, you can also inject your custom actions using a named slot.\nYou can also use the default slot to inject custom content.\n\n```vue\n<template>\n\t<div style=\"display: flex; gap: 12px;\">\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcButton @click=\"showLongDialog = true\">Show long dialog</NcButton>\n\t\t<NcDialog v-if=\"showDialog\" name=\"Warning\" :can-close=\"false\">\n\t\t\t<template #actions>\n\t\t\t\t<NcButton @click=\"showDialog = false\">Ok</NcButton>\n\t\t\t</template>\n\t\t\t<div style=\"color: red; font-weight: bold;\">This is serious</div>\n\t\t</NcDialog>\n\t\t<NcDialog :open.sync=\"showLongDialog\" name=\"Lorem Ipsum\">\n\t\t\t<p v-for=\"i in new Array(63)\" :key=\"i\">Lorem ipsum dolor sit amet.</p>\n\t\t</NcDialog>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tshowLongDialog: false,\n\t\t}\n\t},\n}\n</script>\n```\n\n### Form example\nIt is also possible to use the dialog for small forms.\nThis can be used when asking for a password, a name or similar to have native form validation.\n\nTo make the dialog a form the `is-form` prop needs to be set.\nWhen using the form variant you can also pass buttons with `nativeType` prop to add a native `submit` button.\n\nNote that this is not possible if the dialog contains a navigation!\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog is-form\n\t\t\t:buttons=\"buttons\"\n\t\t\tname=\"Choose a name\"\n\t\t\t:open.sync=\"showDialog\"\n\t\t\t@submit=\"currentName = newName\"\n\t\t\t@reset=\"newName = ''\"\n\t\t\t@closing=\"newName = ''\">\n\t\t\t<NcTextField label=\"New name\"\n\t\t\t\tplaceholder=\"Min. 6 characters\"\n\t\t\t\trequired\n\t\t\t\tminlength=\"6\"\n\t\t\t\t:value.sync=\"newName\" />\n\t\t</NcDialog>\n\t\t<p>New name: {{ currentName }}</p>\n\t</div>\n</template>\n<script>\nimport IconCheck from '@mdi/svg/svg/check.svg?raw'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tnewName: '',\n\t\t\tcurrentName: 'none yet.',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Reset',\n\t\t\t\t\tnativeType: 'reset',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Submit',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\tnativeType: 'submit',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Loading buttons\nSometimes a dialog ends with a request and this request might fail due to server-side-validation.\nIn this case it is often desired to keep the dialog open, this can be done by returning `false` from the button callback,\nto not block this callback should return a `Promise<false>`.\n\nIt is also possible to get the result of the callback from the dialog, as the result is passed as the payload of the `closing` event.\n\nWhile the promise is awaited the button will have a loading state,\nthis means, as long as no custom `icon`-slot is used, a loading icon will be shown.\nPlease note that the **button will not be disabled or accessibility reasons**,\nbecause disabled elements cannot be focused and so the loading state could not be communicated e.g. via screen readers.\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"openDialog\">Show dialog</NcButton>\n\t\t<NcDialog :buttons=\"buttons\"\n\t\t\tname=\"Create user\"\n\t\t\t:message=\"message\"\n\t\t\t:open.sync=\"showDialog\"\n\t\t\t@closing=\"response = $event\"\n\t\t\t@update:open=\"clickClosesDialog = false\" />\n\t\t<div style=\"margin-top: 8px;\">Dialog response: {{ response }}</div>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tclickClosesDialog: false,\n\t\t\tresponse: 'none',\n\t\t}\n\t},\n\n\tmethods: {\n\t\tasync callback() {\n\t\t\t// wait 3 seconds\n\t\t\tawait new Promise((resolve) => window.setTimeout(resolve, 3000))\n\t\t\tthis.clickClosesDialog = !this.clickClosesDialog\n\t\t\t// Do not close the dialog on first and then every second button click\n\t\t\tif (this.clickClosesDialog) {\n\t\t\t\t// return false means the dialog stays open\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn '✅'\n\t\t},\n\n\t\topenDialog() {\n\t\t\tthis.response = 'none'\n\t\t\tthis.showDialog = true\n\t\t},\n\t},\n\n\tcomputed: {\n\t\tbuttons() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Create user',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\tcallback: this.callback,\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\tmessage() {\n\t\t\tif (this.clickClosesDialog) {\n\t\t\t\treturn 'Next button click will work and close the dialog.'\n\t\t\t} else {\n\t\t\t\treturn 'Clicking the button will load but not close the dialog.'\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcModal v-if=\"open\"\n\t\tclass=\"dialog__modal\"\n\t\t:enable-slideshow=\"false\"\n\t\t:enable-swipe=\"false\"\n\t\tv-bind=\"modalProps\"\n\t\t@close=\"handleClosed\"\n\t\t@update:show=\"handleClosing()\">\n\t\t<!-- The dialog name / header -->\n\t\t<h2 :id=\"navigationId\" class=\"dialog__name\" v-text=\"name\" />\n\t\t<component :is=\"dialogTagName\"\n\t\t\tref=\"dialogElement\"\n\t\t\tclass=\"dialog\"\n\t\t\t:class=\"dialogClasses\"\n\t\t\tv-on=\"dialogListeners\">\n\t\t\t<div ref=\"wrapper\" :class=\"['dialog__wrapper', { 'dialog__wrapper--collapsed': isNavigationCollapsed }]\">\n\t\t\t\t<!-- When the navigation is collapsed (too small dialog) it is displayed above the main content, otherwise on the inline start -->\n\t\t\t\t<nav v-if=\"hasNavigation\"\n\t\t\t\t\tclass=\"dialog__navigation\"\n\t\t\t\t\t:class=\"navigationClasses\"\n\t\t\t\t\t:aria-label=\"navigationAriaLabelAttr\"\n\t\t\t\t\t:aria-labelledby=\"navigationAriaLabelledbyAttr\">\n\t\t\t\t\t<slot name=\"navigation\" :is-collapsed=\"isNavigationCollapsed\" />\n\t\t\t\t</nav>\n\t\t\t\t<!-- Main dialog content -->\n\t\t\t\t<div class=\"dialog__content\" :class=\"contentClasses\">\n\t\t\t\t\t<slot>\n\t\t\t\t\t\t<p class=\"dialog__text\">\n\t\t\t\t\t\t\t{{ message }}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!-- The dialog actions aka the buttons -->\n\t\t\t<div class=\"dialog__actions\">\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<NcDialogButton v-for=\"(button, idx) in buttons\"\n\t\t\t\t\t\t:key=\"idx\"\n\t\t\t\t\t\tv-bind=\"button\"\n\t\t\t\t\t\t@click=\"(_, result) => handleButtonClose(button, result)\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</component>\n\t</NcModal>\n</template>\n\n<script>\nimport { useElementSize } from '@vueuse/core'\nimport { computed, defineComponent, ref } from 'vue'\n\nimport NcModal from '../NcModal/index.js'\nimport NcDialogButton from '../NcDialogButton/index.js'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default defineComponent({\n\tname: 'NcDialog',\n\n\tcomponents: {\n\t\tNcDialogButton,\n\t\tNcModal,\n\t},\n\n\tprops: {\n\t\t/** Name of the dialog (the heading) */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Text of the dialog */\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Additional elements to add to the focus trap */\n\t\tadditionalTrapElements: {\n\t\t\ttype: Array,\n\t\t\tvalidator: (arr) => {\n\t\t\t\treturn (\n\t\t\t\t\tArray.isArray(arr) && arr.every(\n\t\t\t\t\t\t(element) =>\n\t\t\t\t\t\t\ttypeof element === 'string' || element instanceof HTMLElement,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t},\n\t\t\tdefault: () => ([]),\n\t\t},\n\n\t\t/**\n\t\t * The element where to mount the dialog, if `null` is passed the dialog is mounted in place\n\t\t * @default 'body'\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'body',\n\t\t},\n\n\t\t/**\n\t\t * Whether the dialog should be shown\n\t\t * @default true\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Size of the underlying NcModal\n\t\t * @default 'small'\n\t\t * @type {'small'|'normal'|'large'|'full'}\n\t\t */\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'small',\n\t\t\tvalidator: (value) => typeof value === 'string' && ['small', 'normal', 'large', 'full'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * Buttons to display\n\t\t * @default []\n\t\t */\n\t\tbuttons: {\n\t\t\ttype: Array,\n\t\t\trequired: false,\n\t\t\tdefault: () => ([]),\n\t\t\tvalidator: (value) => Array.isArray(value) && value.every((element) => typeof element === 'object'),\n\t\t},\n\n\t\t/**\n\t\t * Do not show the close button for the dialog.\n\t\t * @default false\n\t\t */\n\t\tnoClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Set to false to no show a close button on the dialog\n\t\t * @deprecated - Use `noClose` instead. Will be removed in v9.\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Close the dialog if the user clicked outside of the dialog\n\t\t * Only relevant if `canClose` is set to true.\n\t\t */\n\t\tcloseOnClickOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Make the dialog wrapper a HTML form element.\n\t\t * The buttons will be wrapped within the form so they can be used as submit / reset buttons.\n\t\t * Please note that when using the property the `navigation` should not be used.\n\t\t */\n\t\tisForm: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Declare if hiding the modal should be animated\n\t\t * @default false\n\t\t */\n\t\toutTransition: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additional classes which will be set on the navigation for custom styling\n\t\t * @default ''\n\t\t * @example\n\t\t * ```html\n\t\t * <DialogBase :navigation-classes=\"['mydialog-navigation']\"><!-- --></DialogBase>\n\t\t * <!-- ... -->\n\t\t * <style lang=\"scss\">\n\t\t * :deep(.mydialog-navigation) {\n\t\t * flex-direction: row-reverse;\n\t\t * }\n\t\t * </style>\n\t\t * ```\n\t\t */\n\t\tnavigationClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-label for the dialog navigation.\n\t\t * Use it when you want to provide a more meaningful label than the dialog name.\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-labelledby for the dialog navigation.\n\t\t * Use it when you have an implicit navigation label (e.g. a heading).\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabelledby: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additional classes which will be set on the content wrapper for custom styling\n\t\t * @default ''\n\t\t */\n\t\tcontentClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additional classes which will be set on the dialog itself\n\t\t * (the default `class` attribute will be set on the modal wrapper)\n\t\t * @default ''\n\t\t */\n\t\tdialogClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['closing', 'update:open', 'submit'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t * @type {import('vue').Ref<HTMLDivElement>}\n\t\t */\n\t\tconst wrapper = ref()\n\n\t\t/**\n\t\t * We use the dialog width to decide if we collapse the navigation (flex direction row)\n\t\t */\n\t\tconst { width: dialogWidth } = useElementSize(wrapper, { width: 900 })\n\n\t\t/**\n\t\t * Whether the navigation is collapsed due to dialog and window size\n\t\t * (collapses when modal is below: 900px modal width - 2x 12px margin)\n\t\t */\n\t\tconst isNavigationCollapsed = computed(() => dialogWidth.value < 876)\n\n\t\t/**\n\t\t * Whether a navigation was passed and the element should be displayed\n\t\t */\n\t\tconst hasNavigation = computed(() => slots?.navigation !== undefined)\n\n\t\t/**\n\t\t * The unique id of the nav element\n\t\t */\n\t\tconst navigationId = GenRandomId()\n\n\t\t/**\n\t\t * aria-label attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelAttr = computed(() => props.navigationAriaLabel || undefined)\n\n\t\t/**\n\t\t * aria-labelledby attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelledbyAttr = computed(() => {\n\t\t\tif (props.navigationAriaLabel) {\n\t\t\t\t// Not needed, already labelled by aria-label\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\t// Use dialog name as a fallback label for navigation\n\t\t\treturn props.navigationAriaLabelledby || navigationId\n\t\t})\n\n\t\t/**\n\t\t * @type {import('vue').Ref<HTMLFormElement|undefined>}\n\t\t */\n\t\tconst dialogElement = ref()\n\t\t/**\n\t\t * The HTML element to use for the dialog wrapper - either form or plain div\n\t\t */\n\t\tconst dialogTagName = computed(() => props.isForm && !hasNavigation.value ? 'form' : 'div')\n\t\t/**\n\t\t * Listener to assign to the dialog element\n\t\t * This only sets the `@submit` listener if the dialog element is a form\n\t\t */\n\t\tconst dialogListeners = computed(() => dialogTagName.value === 'form'\n\t\t\t? {\n\t\t\t\t/**\n\t\t\t\t * @param {SubmitEvent} event Form submit event\n\t\t\t\t */\n\t\t\t\tsubmit(event) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t/** Forwarded HTMLFormElement submit event (only if `is-form` is set) */\n\t\t\t\t\temit('submit', event)\n\t\t\t\t},\n\t\t\t\t/**\n\t\t\t\t * @param {Event} event Form submit event\n\t\t\t\t */\n\t\t\t\treset(event) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t/**\n\t\t\t\t\t * Forwarded HTMLFormElement reset event (only if `is-form` is set).\n\t\t\t\t\t */\n\t\t\t\t\temit('reset', event)\n\t\t\t\t},\n\t\t\t}\n\t\t\t: {},\n\t\t)\n\n\t\t/**\n\t\t * If the underlying modal is shown\n\t\t */\n\t\tconst showModal = ref(true)\n\n\t\t// Because NcModal does not emit `close` when show prop is changed\n\t\t/**\n\t\t * Handle clicking a dialog button -> should close\n\t\t * @param {MouseEvent} button The button that was clicked\n\t\t * @param {unknown} result Result of the callback function\n\t\t */\n\t\tfunction handleButtonClose(button, result) {\n\t\t\t// Skip close on submit if invalid dialog\n\t\t\tif (button.nativeType === 'submit'\n\t\t\t\t&& dialogTagName.value === 'form'\n\t\t\t\t&& !dialogElement.value.reportValidity()) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\thandleClosing(result)\n\t\t\twindow.setTimeout(() => handleClosed(), 300)\n\t\t}\n\n\t\t/**\n\t\t * Handle closing the dialog, optional out transition did not run yet\n\t\t * @param {unknown} result the result of the callback\n\t\t */\n\t\tconst handleClosing = (result) => {\n\t\t\tshowModal.value = false\n\t\t\t/**\n\t\t\t * Emitted when the dialog is closing, so the out transition did not finish yet.\n\t\t\t * @param result The result of the button callback (`undefined` if closing because of clicking the 'close'-button)\n\t\t\t */\n\t\t\temit('closing', result)\n\t\t}\n\n\t\t/**\n\t\t * Handle dialog closed (out transition finished)\n\t\t */\n\t\tconst handleClosed = () => {\n\t\t\tshowModal.value = true\n\t\t\t/**\n\t\t\t * Emitted then the dialog is fully closed and the out transition run\n\t\t\t */\n\t\t\temit('update:open', false)\n\t\t}\n\n\t\t/**\n\t\t * Properties to pass to the underlying NcModal\n\t\t */\n\t\tconst modalProps = computed(() => ({\n\t\t\tnoClose: props.noClose || !props.canClose,\n\t\t\tcontainer: props.container === undefined ? 'body' : props.container,\n\t\t\t// we do not pass the name as we already have the name as the headline\n\t\t\t// name: props.name,\n\t\t\t// But we need to set the correct label id so the dialog is labelled\n\t\t\tlabelId: navigationId,\n\t\t\tsize: props.size,\n\t\t\tshow: props.open && showModal.value,\n\t\t\toutTransition: props.outTransition,\n\t\t\tcloseOnClickOutside: props.closeOnClickOutside,\n\t\t\tadditionalTrapElements: props.additionalTrapElements,\n\t\t}))\n\n\t\treturn {\n\t\t\tdialogElement,\n\t\t\tdialogListeners,\n\t\t\tdialogTagName,\n\t\t\thandleButtonClose,\n\t\t\thandleClosing,\n\t\t\thandleClosed,\n\t\t\thasNavigation,\n\t\t\tnavigationId,\n\t\t\tnavigationAriaLabelAttr,\n\t\t\tnavigationAriaLabelledbyAttr,\n\t\t\tisNavigationCollapsed,\n\t\t\tmodalProps,\n\t\t\twrapper,\n\t\t}\n\t},\n})\n</script>\n\n<style lang=\"scss\">\n/** When having the small dialog style we override the modal styling so dialogs look more dialog like */\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t.dialog__modal .modal-wrapper--small .modal-container {\n\t\twidth: fit-content;\n\t\theight: unset;\n\t\tmax-height: 90%;\n\t\tposition: relative;\n\t\ttop: unset;\n\t\tborder-radius: var(--border-radius-large);\n\t}\n}\n</style>\n\n<style lang=\"scss\" scoped>\n.dialog {\n\theight: 100%;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\toverflow: hidden;\n\n\t&__modal {\n\t\t:deep(.modal-wrapper .modal-container) {\n\t\t\tdisplay: flex !important;\n\t\t\tpadding-block: 4px 0; // 4px to align with close button, 0 block-end to make overflowing content on scroll look nice\n\t\t\tpadding-inline: 12px 0; // Same as with padding-block, we need the actions to have a margin of 4px for the button outline\n\t\t}\n\t\t:deep(.modal-wrapper .modal-container__content) {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\toverflow: hidden; // Only overflow on the .dialog__content\n\t\t}\n\t}\n\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\t// Auto scale to fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: hidden;\n\n\t\t&--collapsed {\n\t\t\tflex-direction: column;\n\t\t}\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-shrink: 0;\n\t}\n\n\t// Navigation styling when side-by-side with content\n\t&__wrapper:not(&__wrapper--collapsed) &__navigation {\n\t\tflex-direction: column;\n\n\t\toverflow: hidden auto;\n\t\theight: 100%;\n\t\tmin-width: 200px;\n\t\tmargin-inline-end: 20px;\n\t}\n\n\t// Navigation styling when on top of content\n\t&__wrapper#{&}__wrapper--collapsed &__navigation {\n\t\tflex-direction: row;\n\t\tjustify-content: space-between;\n\n\t\toverflow: auto hidden;\n\t\twidth: 100%;\n\t\tmin-width: 100%;\n\t}\n\n\t&__name {\n\t\tfont-size: 21px;\n\n\t\ttext-align: center;\n\t\theight: fit-content;\n\t\tmin-height: var(--default-clickable-area);\n\t\tline-height: var(--default-clickable-area);\n\t\toverflow-wrap: break-word;\n\t\tmargin-block: 0 12px;\n\t}\n\n\t&__content {\n\t\t// Auto fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: auto;\n\t\t// see .dialog__modal, we can not set the padding there to prevent floating scroll bars\n\t\tpadding-inline-end: 12px;\n\t}\n\n\t// In case only text content is show\n\t&__text {\n\t\t// Also add padding to the bottom to make it more readable\n\t\tpadding-block-end: 6px;\n\t}\n\n\t&__actions {\n\t\tbox-sizing: border-box;\n\n\t\tdisplay: flex;\n\t\tgap: 6px;\n\t\talign-content: center;\n\t\tjustify-content: end;\n\n\t\twidth: 100%;\n\t\tmax-width: 100%;\n\t\tpadding-inline: 0 12px; // 12px to align with the overall modal padding\n\t\tmargin-inline: 0;\n\t\tmargin-block: 0;\n\n\t\t&:not(:empty) {\n\t\t\tmargin-block: 6px 12px; // only if there are actions, we add margin so if it is empty scroll content looks nice\n\t\t}\n\t}\n}\n\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t// Ensure the dialog name does not interfere with the close button\n\t.dialog__name {\n\t\ttext-align: start;\n\t\tmargin-inline-end: var(--default-clickable-area);\n\t}\n}\n</style>\n"],"names":["defineComponent","NcDialogButton","NcModal","ref","useElementSize","computed","GenRandomId"],"mappings":";;;;;;;AA2QA,MAAA,YAAAA,IAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,gBAAAC,eAAA;AAAA,IACA,SAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA,IAEA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA,IAGA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA,IAGA,wBAA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A,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcDialog-Cqdo11BM.cjs","sources":["../../src/components/NcDialog/NcDialog.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### General description\n\nThis component uses the `NcModal` under the hood for allowing users to create generic dialogs.\n\n### Basic example\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog :open.sync=\"showDialog\" name=\"Confirmation\" message=\"Are you sure to proceed?\" :buttons=\"buttons\" />\n\t\t<p>Last response: {{ lastResponse }}</p>\n\t</div>\n</template>\n<script>\nimport IconCancel from '@mdi/svg/svg/cancel.svg?raw'\nimport IconCheck from '@mdi/svg/svg/check.svg?raw'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tlastResponse: 'None',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Cancel',\n\t\t\t\t\ticon: IconCancel,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Cancel\"' },\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Ok',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Ok\"' },\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Use custom actions and content\nInstead of using the buttons property, you can also inject your custom actions using a named slot.\nYou can also use the default slot to inject custom content.\n\n```vue\n<template>\n\t<div style=\"display: flex; gap: 12px;\">\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcButton @click=\"showLongDialog = true\">Show long dialog</NcButton>\n\t\t<NcDialog v-if=\"showDialog\" name=\"Warning\" :can-close=\"false\">\n\t\t\t<template #actions>\n\t\t\t\t<NcButton @click=\"showDialog = false\">Ok</NcButton>\n\t\t\t</template>\n\t\t\t<div style=\"color: red; font-weight: bold;\">This is serious</div>\n\t\t</NcDialog>\n\t\t<NcDialog :open.sync=\"showLongDialog\" name=\"Lorem Ipsum\">\n\t\t\t<p v-for=\"i in new Array(63)\" :key=\"i\">Lorem ipsum dolor sit amet.</p>\n\t\t</NcDialog>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tshowLongDialog: false,\n\t\t}\n\t},\n}\n</script>\n```\n\n### Form example\nIt is also possible to use the dialog for small forms.\nThis can be used when asking for a password, a name or similar to have native form validation.\n\nTo make the dialog a form the `is-form` prop needs to be set.\nWhen using the form variant you can also pass buttons with `nativeType` prop to add a native `submit` button.\n\nNote that this is not possible if the dialog contains a navigation!\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog is-form\n\t\t\t:buttons=\"buttons\"\n\t\t\tname=\"Choose a name\"\n\t\t\t:open.sync=\"showDialog\"\n\t\t\t@submit=\"currentName = newName\"\n\t\t\t@reset=\"newName = ''\"\n\t\t\t@closing=\"newName = ''\">\n\t\t\t<NcTextField label=\"New name\"\n\t\t\t\tplaceholder=\"Min. 6 characters\"\n\t\t\t\trequired\n\t\t\t\tminlength=\"6\"\n\t\t\t\t:value.sync=\"newName\" />\n\t\t</NcDialog>\n\t\t<p>New name: {{ currentName }}</p>\n\t</div>\n</template>\n<script>\nimport IconCheck from '@mdi/svg/svg/check.svg?raw'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tnewName: '',\n\t\t\tcurrentName: 'none yet.',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Reset',\n\t\t\t\t\tnativeType: 'reset',\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Submit',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\tnativeType: 'submit',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Loading buttons\nSometimes a dialog ends with a request and this request might fail due to server-side-validation.\nIn this case it is often desired to keep the dialog open, this can be done by returning `false` from the button callback,\nto not block this callback should return a `Promise<false>`.\n\nIt is also possible to get the result of the callback from the dialog, as the result is passed as the payload of the `closing` event.\n\nWhile the promise is awaited the button will have a loading state,\nthis means, as long as no custom `icon`-slot is used, a loading icon will be shown.\nPlease note that the **button will not be disabled or accessibility reasons**,\nbecause disabled elements cannot be focused and so the loading state could not be communicated e.g. via screen readers.\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"openDialog\">Show dialog</NcButton>\n\t\t<NcDialog :buttons=\"buttons\"\n\t\t\tname=\"Create user\"\n\t\t\t:message=\"message\"\n\t\t\t:open.sync=\"showDialog\"\n\t\t\t@closing=\"response = $event\"\n\t\t\t@update:open=\"clickClosesDialog = false\" />\n\t\t<div style=\"margin-top: 8px;\">Dialog response: {{ response }}</div>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tclickClosesDialog: false,\n\t\t\tresponse: 'none',\n\t\t}\n\t},\n\n\tmethods: {\n\t\tasync callback() {\n\t\t\t// wait 3 seconds\n\t\t\tawait new Promise((resolve) => window.setTimeout(resolve, 3000))\n\t\t\tthis.clickClosesDialog = !this.clickClosesDialog\n\t\t\t// Do not close the dialog on first and then every second button click\n\t\t\tif (this.clickClosesDialog) {\n\t\t\t\t// return false means the dialog stays open\n\t\t\t\treturn false\n\t\t\t}\n\t\t\treturn '✅'\n\t\t},\n\n\t\topenDialog() {\n\t\t\tthis.response = 'none'\n\t\t\tthis.showDialog = true\n\t\t},\n\t},\n\n\tcomputed: {\n\t\tbuttons() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Create user',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\tcallback: this.callback,\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\tmessage() {\n\t\t\tif (this.clickClosesDialog) {\n\t\t\t\treturn 'Next button click will work and close the dialog.'\n\t\t\t} else {\n\t\t\t\treturn 'Clicking the button will load but not close the dialog.'\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcModal v-if=\"open\"\n\t\tclass=\"dialog__modal\"\n\t\t:enable-slideshow=\"false\"\n\t\t:enable-swipe=\"false\"\n\t\tv-bind=\"modalProps\"\n\t\t@close=\"handleClosed\"\n\t\t@update:show=\"handleClosing()\">\n\t\t<!-- The dialog name / header -->\n\t\t<h2 :id=\"navigationId\" class=\"dialog__name\" v-text=\"name\" />\n\t\t<component :is=\"dialogTagName\"\n\t\t\tref=\"dialogElement\"\n\t\t\tclass=\"dialog\"\n\t\t\t:class=\"dialogClasses\"\n\t\t\tv-on=\"dialogListeners\">\n\t\t\t<div ref=\"wrapper\" :class=\"['dialog__wrapper', { 'dialog__wrapper--collapsed': isNavigationCollapsed }]\">\n\t\t\t\t<!-- When the navigation is collapsed (too small dialog) it is displayed above the main content, otherwise on the inline start -->\n\t\t\t\t<nav v-if=\"hasNavigation\"\n\t\t\t\t\tclass=\"dialog__navigation\"\n\t\t\t\t\t:class=\"navigationClasses\"\n\t\t\t\t\t:aria-label=\"navigationAriaLabelAttr\"\n\t\t\t\t\t:aria-labelledby=\"navigationAriaLabelledbyAttr\">\n\t\t\t\t\t<slot name=\"navigation\" :is-collapsed=\"isNavigationCollapsed\" />\n\t\t\t\t</nav>\n\t\t\t\t<!-- Main dialog content -->\n\t\t\t\t<div class=\"dialog__content\" :class=\"contentClasses\">\n\t\t\t\t\t<slot>\n\t\t\t\t\t\t<p class=\"dialog__text\">\n\t\t\t\t\t\t\t{{ message }}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!-- The dialog actions aka the buttons -->\n\t\t\t<div class=\"dialog__actions\">\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<NcDialogButton v-for=\"(button, idx) in buttons\"\n\t\t\t\t\t\t:key=\"idx\"\n\t\t\t\t\t\tv-bind=\"button\"\n\t\t\t\t\t\t@click=\"(_, result) => handleButtonClose(button, result)\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</component>\n\t</NcModal>\n</template>\n\n<script>\nimport { useElementSize } from '@vueuse/core'\nimport { computed, defineComponent, ref } from 'vue'\n\nimport NcModal from '../NcModal/index.js'\nimport NcDialogButton from '../NcDialogButton/index.js'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default defineComponent({\n\tname: 'NcDialog',\n\n\tcomponents: {\n\t\tNcDialogButton,\n\t\tNcModal,\n\t},\n\n\tprops: {\n\t\t/** Name of the dialog (the heading) */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Text of the dialog */\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Additional elements to add to the focus trap */\n\t\tadditionalTrapElements: {\n\t\t\ttype: Array,\n\t\t\tvalidator: (arr) => {\n\t\t\t\treturn (\n\t\t\t\t\tArray.isArray(arr) && arr.every(\n\t\t\t\t\t\t(element) =>\n\t\t\t\t\t\t\ttypeof element === 'string' || element instanceof HTMLElement,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t},\n\t\t\tdefault: () => ([]),\n\t\t},\n\n\t\t/**\n\t\t * The element where to mount the dialog, if `null` is passed the dialog is mounted in place\n\t\t * @default 'body'\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'body',\n\t\t},\n\n\t\t/**\n\t\t * Whether the dialog should be shown\n\t\t * @default true\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Size of the underlying NcModal\n\t\t * @default 'small'\n\t\t * @type {'small'|'normal'|'large'|'full'}\n\t\t */\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'small',\n\t\t\tvalidator: (value) => typeof value === 'string' && ['small', 'normal', 'large', 'full'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * Buttons to display\n\t\t * @default []\n\t\t */\n\t\tbuttons: {\n\t\t\ttype: Array,\n\t\t\trequired: false,\n\t\t\tdefault: () => ([]),\n\t\t\tvalidator: (value) => Array.isArray(value) && value.every((element) => typeof element === 'object'),\n\t\t},\n\n\t\t/**\n\t\t * Do not show the close button for the dialog.\n\t\t * @default false\n\t\t */\n\t\tnoClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Set to false to no show a close button on the dialog\n\t\t * @deprecated - Use `noClose` instead. Will be removed in v9.\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Close the dialog if the user clicked outside of the dialog\n\t\t * Only relevant if `canClose` is set to true.\n\t\t */\n\t\tcloseOnClickOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Make the dialog wrapper a HTML form element.\n\t\t * The buttons will be wrapped within the form so they can be used as submit / reset buttons.\n\t\t * Please note that when using the property the `navigation` should not be used.\n\t\t */\n\t\tisForm: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Declare if hiding the modal should be animated\n\t\t * @default false\n\t\t */\n\t\toutTransition: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additional classes which will be set on the navigation for custom styling\n\t\t * @default ''\n\t\t * @example\n\t\t * ```html\n\t\t * <DialogBase :navigation-classes=\"['mydialog-navigation']\"><!-- --></DialogBase>\n\t\t * <!-- ... -->\n\t\t * <style lang=\"scss\">\n\t\t * :deep(.mydialog-navigation) {\n\t\t * flex-direction: row-reverse;\n\t\t * }\n\t\t * </style>\n\t\t * ```\n\t\t */\n\t\tnavigationClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-label for the dialog navigation.\n\t\t * Use it when you want to provide a more meaningful label than the dialog name.\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-labelledby for the dialog navigation.\n\t\t * Use it when you have an implicit navigation label (e.g. a heading).\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabelledby: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additional classes which will be set on the content wrapper for custom styling\n\t\t * @default ''\n\t\t */\n\t\tcontentClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additional classes which will be set on the dialog itself\n\t\t * (the default `class` attribute will be set on the modal wrapper)\n\t\t * @default ''\n\t\t */\n\t\tdialogClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['closing', 'update:open', 'submit'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t * @type {import('vue').Ref<HTMLDivElement>}\n\t\t */\n\t\tconst wrapper = ref()\n\n\t\t/**\n\t\t * We use the dialog width to decide if we collapse the navigation (flex direction row)\n\t\t */\n\t\tconst { width: dialogWidth } = useElementSize(wrapper, { width: 900 })\n\n\t\t/**\n\t\t * Whether the navigation is collapsed due to dialog and window size\n\t\t * (collapses when modal is below: 900px modal width - 2x 12px margin)\n\t\t */\n\t\tconst isNavigationCollapsed = computed(() => dialogWidth.value < 876)\n\n\t\t/**\n\t\t * Whether a navigation was passed and the element should be displayed\n\t\t */\n\t\tconst hasNavigation = computed(() => slots?.navigation !== undefined)\n\n\t\t/**\n\t\t * The unique id of the nav element\n\t\t */\n\t\tconst navigationId = GenRandomId()\n\n\t\t/**\n\t\t * aria-label attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelAttr = computed(() => props.navigationAriaLabel || undefined)\n\n\t\t/**\n\t\t * aria-labelledby attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelledbyAttr = computed(() => {\n\t\t\tif (props.navigationAriaLabel) {\n\t\t\t\t// Not needed, already labelled by aria-label\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\t// Use dialog name as a fallback label for navigation\n\t\t\treturn props.navigationAriaLabelledby || navigationId\n\t\t})\n\n\t\t/**\n\t\t * @type {import('vue').Ref<HTMLFormElement|undefined>}\n\t\t */\n\t\tconst dialogElement = ref()\n\t\t/**\n\t\t * The HTML element to use for the dialog wrapper - either form or plain div\n\t\t */\n\t\tconst dialogTagName = computed(() => props.isForm && !hasNavigation.value ? 'form' : 'div')\n\t\t/**\n\t\t * Listener to assign to the dialog element\n\t\t * This only sets the `@submit` listener if the dialog element is a form\n\t\t */\n\t\tconst dialogListeners = computed(() => dialogTagName.value === 'form'\n\t\t\t? {\n\t\t\t\t/**\n\t\t\t\t * @param {SubmitEvent} event Form submit event\n\t\t\t\t */\n\t\t\t\tsubmit(event) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t/** Forwarded HTMLFormElement submit event (only if `is-form` is set) */\n\t\t\t\t\temit('submit', event)\n\t\t\t\t},\n\t\t\t\t/**\n\t\t\t\t * @param {Event} event Form submit event\n\t\t\t\t */\n\t\t\t\treset(event) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t/**\n\t\t\t\t\t * Forwarded HTMLFormElement reset event (only if `is-form` is set).\n\t\t\t\t\t */\n\t\t\t\t\temit('reset', event)\n\t\t\t\t},\n\t\t\t}\n\t\t\t: {},\n\t\t)\n\n\t\t/**\n\t\t * If the underlying modal is shown\n\t\t */\n\t\tconst showModal = ref(true)\n\n\t\t// Because NcModal does not emit `close` when show prop is changed\n\t\t/**\n\t\t * Handle clicking a dialog button -> should close\n\t\t * @param {MouseEvent} button The button that was clicked\n\t\t * @param {unknown} result Result of the callback function\n\t\t */\n\t\tfunction handleButtonClose(button, result) {\n\t\t\t// Skip close on submit if invalid dialog\n\t\t\tif ((button.type === 'submit' || button.nativeType === 'submit')\n\t\t\t\t&& dialogTagName.value === 'form'\n\t\t\t\t&& !dialogElement.value.reportValidity()) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\thandleClosing(result)\n\t\t\twindow.setTimeout(() => handleClosed(), 300)\n\t\t}\n\n\t\t/**\n\t\t * Handle closing the dialog, optional out transition did not run yet\n\t\t * @param {unknown} result the result of the callback\n\t\t */\n\t\tconst handleClosing = (result) => {\n\t\t\tshowModal.value = false\n\t\t\t/**\n\t\t\t * Emitted when the dialog is closing, so the out transition did not finish yet.\n\t\t\t * @param result The result of the button callback (`undefined` if closing because of clicking the 'close'-button)\n\t\t\t */\n\t\t\temit('closing', result)\n\t\t}\n\n\t\t/**\n\t\t * Handle dialog closed (out transition finished)\n\t\t */\n\t\tconst handleClosed = () => {\n\t\t\tshowModal.value = true\n\t\t\t/**\n\t\t\t * Emitted then the dialog is fully closed and the out transition run\n\t\t\t */\n\t\t\temit('update:open', false)\n\t\t}\n\n\t\t/**\n\t\t * Properties to pass to the underlying NcModal\n\t\t */\n\t\tconst modalProps = computed(() => ({\n\t\t\tnoClose: props.noClose || !props.canClose,\n\t\t\tcontainer: props.container === undefined ? 'body' : props.container,\n\t\t\t// we do not pass the name as we already have the name as the headline\n\t\t\t// name: props.name,\n\t\t\t// But we need to set the correct label id so the dialog is labelled\n\t\t\tlabelId: navigationId,\n\t\t\tsize: props.size,\n\t\t\tshow: props.open && showModal.value,\n\t\t\toutTransition: props.outTransition,\n\t\t\tcloseOnClickOutside: props.closeOnClickOutside,\n\t\t\tadditionalTrapElements: props.additionalTrapElements,\n\t\t}))\n\n\t\treturn {\n\t\t\tdialogElement,\n\t\t\tdialogListeners,\n\t\t\tdialogTagName,\n\t\t\thandleButtonClose,\n\t\t\thandleClosing,\n\t\t\thandleClosed,\n\t\t\thasNavigation,\n\t\t\tnavigationId,\n\t\t\tnavigationAriaLabelAttr,\n\t\t\tnavigationAriaLabelledbyAttr,\n\t\t\tisNavigationCollapsed,\n\t\t\tmodalProps,\n\t\t\twrapper,\n\t\t}\n\t},\n})\n</script>\n\n<style lang=\"scss\">\n/** When having the small dialog style we override the modal styling so dialogs look more dialog like */\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t.dialog__modal .modal-wrapper--small .modal-container {\n\t\twidth: fit-content;\n\t\theight: unset;\n\t\tmax-height: 90%;\n\t\tposition: relative;\n\t\ttop: unset;\n\t\tborder-radius: var(--border-radius-large);\n\t}\n}\n</style>\n\n<style lang=\"scss\" scoped>\n.dialog {\n\theight: 100%;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\toverflow: hidden;\n\n\t&__modal {\n\t\t:deep(.modal-wrapper .modal-container) {\n\t\t\tdisplay: flex !important;\n\t\t\tpadding-block: 4px 0; // 4px to align with close button, 0 block-end to make overflowing content on scroll look nice\n\t\t\tpadding-inline: 12px 0; // Same as with padding-block, we need the actions to have a margin of 4px for the button outline\n\t\t}\n\t\t:deep(.modal-wrapper .modal-container__content) {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\toverflow: hidden; // Only overflow on the .dialog__content\n\t\t}\n\t}\n\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\t// Auto scale to fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: hidden;\n\n\t\t&--collapsed {\n\t\t\tflex-direction: column;\n\t\t}\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-shrink: 0;\n\t}\n\n\t// Navigation styling when side-by-side with content\n\t&__wrapper:not(&__wrapper--collapsed) &__navigation {\n\t\tflex-direction: column;\n\n\t\toverflow: hidden auto;\n\t\theight: 100%;\n\t\tmin-width: 200px;\n\t\tmargin-inline-end: 20px;\n\t}\n\n\t// Navigation styling when on top of content\n\t&__wrapper#{&}__wrapper--collapsed &__navigation {\n\t\tflex-direction: row;\n\t\tjustify-content: space-between;\n\n\t\toverflow: auto hidden;\n\t\twidth: 100%;\n\t\tmin-width: 100%;\n\t}\n\n\t&__name {\n\t\tfont-size: 21px;\n\n\t\ttext-align: center;\n\t\theight: fit-content;\n\t\tmin-height: var(--default-clickable-area);\n\t\tline-height: var(--default-clickable-area);\n\t\toverflow-wrap: break-word;\n\t\tmargin-block: 0 12px;\n\t}\n\n\t&__content {\n\t\t// Auto fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: auto;\n\t\t// see .dialog__modal, we can not set the padding there to prevent floating scroll bars\n\t\tpadding-inline-end: 12px;\n\t}\n\n\t// In case only text content is show\n\t&__text {\n\t\t// Also add padding to the bottom to make it more readable\n\t\tpadding-block-end: 6px;\n\t}\n\n\t&__actions {\n\t\tbox-sizing: border-box;\n\n\t\tdisplay: flex;\n\t\tgap: 6px;\n\t\talign-content: center;\n\t\tjustify-content: end;\n\n\t\twidth: 100%;\n\t\tmax-width: 100%;\n\t\tpadding-inline: 0 12px; // 12px to align with the overall modal padding\n\t\tmargin-inline: 0;\n\t\tmargin-block: 0;\n\n\t\t&:not(:empty) {\n\t\t\tmargin-block: 6px 12px; // only if there are actions, we add margin so if it is empty scroll content looks nice\n\t\t}\n\t}\n}\n\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t// Ensure the dialog name does not interfere with the close button\n\t.dialog__name {\n\t\ttext-align: start;\n\t\tmargin-inline-end: var(--default-clickable-area);\n\t}\n}\n</style>\n"],"names":["defineComponent","NcDialogButton","NcModal","ref","useElementSize","computed","GenRandomId"],"mappings":";;;;;;;AA2QA,MAAA,YAAAA,IAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,gBAAAC,eAAA;AAAA,IACA,SAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA,IAEA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA,IAGA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA,IAGA,wBAAA;AAAA,MACA,MAAA;AAAA,MACA,WAAA,CAAA,QAAA;AACA,eACA,MAAA,QAAA,GAAA,KAAA,IAAA;AAAA,UACA,CAAA,YACA,OAAA,YAAA,YAAA,mBAAA;AAAA,QACA;AAAA,MAEA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,UAAA,OAAA,UAAA,YAAA,CAAA,SAAA,UAAA,SAAA,MAAA,EAAA,SAAA,KAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,MACA,WAAA,CAAA,UAAA,MAAA,QAAA,KAAA,KAAA,MA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,eAAA,MAAA;AACA,gBAAA,QAAA;AAIA,WAAA,eAAA,KAAA;AAAA,IACA;AAKA,UAAA,aAAAE,IAAAA,SAAA,OAAA;AAAA,MACA,SAAA,MAAA,WAAA,CAAA,MAAA;AAAA,MACA,WAAA,MAAA,cAAA,SAAA,SAAA,MAAA;AAAA;AAAA;AAAA;AAAA,MAIA,SAAA;AAAA,MACA,MAAA,MAAA;AAAA,MACA,MAAA,MAAA,QAAA,UAAA;AAAA,MACA,eAAA,MAAA;AAAA,MACA,qBAAA,MAAA;AAAA,MACA,wBAAA,MAAA;AAAA,IACA,EAAA;AAEA,WAAA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { ref } from "vue";
2
- import { r as register, b as t30, a as t } from "./_l10n-DQgzdF9S.mjs";
2
+ import { r as register, d as t30, a as t } from "./_l10n-BU8-kQzN.mjs";
3
3
  import NcButton from "../Components/NcButton.mjs";
4
4
  import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-Cb-cPj1R.mjs";
5
5
  import NcLoadingIcon from "../Components/NcLoadingIcon.mjs";
@@ -126,4 +126,4 @@ const NcDialogButton = __component__.exports;
126
126
  export {
127
127
  NcDialogButton as N
128
128
  };
129
- //# sourceMappingURL=NcDialogButton-CROAi1Ll.mjs.map
129
+ //# sourceMappingURL=NcDialogButton-Cc3iWZH1.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcDialogButton-CROAi1Ll.mjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nDialog button component used by NcDialog in the actions slot to display the buttons passed by the `buttons` prop.\n</docs>\n\n<template>\n\t<NcButton :aria-label=\"label\"\n\t\t:disabled=\"disabled\"\n\t\t:type=\"type\"\n\t\t:native-type=\"nativeType\"\n\t\t:variant=\"variant\"\n\t\t@click=\"handleClick\">\n\t\t{{ label }}\n\t\t<template #icon>\n\t\t\t<!-- @slot Allow to set a custom icon for the button -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<!-- The loading state is an information that must be accessible -->\n\t\t\t\t<NcLoadingIcon v-if=\"isLoading\" :name=\"t('Loading …') /* TRANSLATORS: The button is in a loading state*/\" />\n\t\t\t\t<NcIconSvgWrapper v-else-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script setup>\nimport { ref } from 'vue'\nimport { t } from '../../l10n.js'\n\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\nimport NcLoadingIcon from '../NcLoadingIcon/index.js'\n\nconst props = defineProps({\n\t/**\n\t * The function that will be called when the button is pressed.\n\t * If the function returns `false` the click is ignored and the dialog will not be closed,\n\t * which is the default behavior of \"reset\"-buttons.\n\t *\n\t * @type {() => unknown|false|Promise<unknown|false>}\n\t */\n\tcallback: {\n\t\ttype: Function,\n\t\trequired: false,\n\t\tdefault: () => {},\n\t},\n\n\t/**\n\t * The label of the button\n\t */\n\tlabel: {\n\t\ttype: String,\n\t\trequired: true,\n\t},\n\n\t/**\n\t * Optional inline SVG icon for the button\n\t */\n\ticon: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: undefined,\n\t},\n\n\t/**\n\t * The button type, see NcButton.\n\t *\n\t * @deprecated The usage for setting the color variant is deprecated and will be removed with v9.\n\t * @type {'button'|'submit'|'reset'|'primary'|'secondary'|'error'|'warning'|'success'}\n\t */\n\ttype: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'secondary',\n\t\tvalidator: (type) => typeof type === 'string' && ['button', 'submit', 'reset', 'primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t},\n\n\t/**\n\t * See `nativeType` of `NcButton`.\n\t * @deprecated use `type` instead - will removed with v9\n\t */\n\tnativeType: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'button',\n\t\tvalidator(value) {\n\t\t\treturn ['submit', 'reset', 'button'].includes(value)\n\t\t},\n\t},\n\n\t/**\n\t * If the button should be shown as disabled\n\t */\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n\n\t/**\n\t * The button variant, see NcButton.\n\t *\n\t * @type {'primary'|'secondary'|'tertiary'|'error'|'warning'|'success'}\n\t * @since 8.24.0\n\t */\n\tvariant: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'secondary',\n\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t},\n})\n\nconst emit = defineEmits(['click'])\n\nconst isLoading = ref(false)\n\n/**\n * Handle clicking the button\n * @param {MouseEvent} e The click event\n */\nconst handleClick = async (e) => {\n\t// Do not re-emit while loading\n\tif (isLoading.value) {\n\t\treturn\n\t}\n\n\tisLoading.value = true\n\ttry {\n\t\t// for reset buttons the default is \"false\"\n\t\tconst fallback = props.nativeType === 'reset' ? false : undefined\n\t\tconst result = await props.callback?.() ?? fallback\n\t\tif (result !== false) {\n\t\t\t/**\n\t\t\t * The click event (`MouseEvent`) and the value returned by the callback\n\t\t\t */\n\t\t\temit('click', e, result)\n\t\t}\n\t} finally {\n\t\tisLoading.value = false\n\t}\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqHA,UAAM,YAAY,IAAI,KAAK;AAM3B,UAAM,cAAc,OAAO,MAAM;AAEhC,UAAI,UAAU,OAAO;AACpB;AAAA,MACF;AAEC,gBAAU,QAAQ;AAClB,UAAI;AAEH,cAAM,WAAW,MAAM,eAAe,UAAU,QAAQ;AACxD,cAAM,SAAS,MAAM,MAAM,gBAAgB;AAC3C,YAAI,WAAW,OAAO;AAIrB,eAAK,SAAS,GAAG,MAAM;AAAA,QAC1B;AAAA,MACA,UAAW;AACT,kBAAU,QAAQ;AAAA,MACpB;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcDialogButton-Cc3iWZH1.mjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nDialog button component used by NcDialog in the actions slot to display the buttons passed by the `buttons` prop.\n</docs>\n\n<template>\n\t<NcButton :aria-label=\"label\"\n\t\t:disabled=\"disabled\"\n\t\t:type=\"type\"\n\t\t:native-type=\"nativeType\"\n\t\t:variant=\"variant\"\n\t\t@click=\"handleClick\">\n\t\t{{ label }}\n\t\t<template #icon>\n\t\t\t<!-- @slot Allow to set a custom icon for the button -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<!-- The loading state is an information that must be accessible -->\n\t\t\t\t<NcLoadingIcon v-if=\"isLoading\" :name=\"t('Loading …') /* TRANSLATORS: The button is in a loading state*/\" />\n\t\t\t\t<NcIconSvgWrapper v-else-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script setup>\nimport { ref } from 'vue'\nimport { t } from '../../l10n.js'\n\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\nimport NcLoadingIcon from '../NcLoadingIcon/index.js'\n\nconst props = defineProps({\n\t/**\n\t * The function that will be called when the button is pressed.\n\t * If the function returns `false` the click is ignored and the dialog will not be closed,\n\t * which is the default behavior of \"reset\"-buttons.\n\t *\n\t * @type {() => unknown|false|Promise<unknown|false>}\n\t */\n\tcallback: {\n\t\ttype: Function,\n\t\trequired: false,\n\t\tdefault: () => {},\n\t},\n\n\t/**\n\t * The label of the button\n\t */\n\tlabel: {\n\t\ttype: String,\n\t\trequired: true,\n\t},\n\n\t/**\n\t * Optional inline SVG icon for the button\n\t */\n\ticon: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: undefined,\n\t},\n\n\t/**\n\t * The button type, see NcButton.\n\t *\n\t * @deprecated The usage for setting the color variant is deprecated and will be removed with v9.\n\t * @type {'button'|'submit'|'reset'|'primary'|'secondary'|'error'|'warning'|'success'}\n\t */\n\ttype: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'secondary',\n\t\tvalidator: (type) => typeof type === 'string' && ['button', 'submit', 'reset', 'primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t},\n\n\t/**\n\t * See `nativeType` of `NcButton`.\n\t * @deprecated use `type` instead - will removed with v9\n\t */\n\tnativeType: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'button',\n\t\tvalidator(value) {\n\t\t\treturn ['submit', 'reset', 'button'].includes(value)\n\t\t},\n\t},\n\n\t/**\n\t * If the button should be shown as disabled\n\t */\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n\n\t/**\n\t * The button variant, see NcButton.\n\t *\n\t * @type {'primary'|'secondary'|'tertiary'|'error'|'warning'|'success'}\n\t * @since 8.24.0\n\t */\n\tvariant: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'secondary',\n\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t},\n})\n\nconst emit = defineEmits(['click'])\n\nconst isLoading = ref(false)\n\n/**\n * Handle clicking the button\n * @param {MouseEvent} e The click event\n */\nconst handleClick = async (e) => {\n\t// Do not re-emit while loading\n\tif (isLoading.value) {\n\t\treturn\n\t}\n\n\tisLoading.value = true\n\ttry {\n\t\t// for reset buttons the default is \"false\"\n\t\tconst fallback = props.nativeType === 'reset' ? false : undefined\n\t\tconst result = await props.callback?.() ?? fallback\n\t\tif (result !== false) {\n\t\t\t/**\n\t\t\t * The click event (`MouseEvent`) and the value returned by the callback\n\t\t\t */\n\t\t\temit('click', e, result)\n\t\t}\n\t} finally {\n\t\tisLoading.value = false\n\t}\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqHA,UAAM,YAAY,IAAI,KAAK;AAM3B,UAAM,cAAc,OAAO,MAAM;AAEhC,UAAI,UAAU,OAAO;AACpB;AAAA,MACF;AAEC,gBAAU,QAAQ;AAClB,UAAI;AAEH,cAAM,WAAW,MAAM,eAAe,UAAU,QAAQ;AACxD,cAAM,SAAS,MAAM,MAAM,gBAAgB;AAC3C,YAAI,WAAW,OAAO;AAIrB,eAAK,SAAS,GAAG,MAAM;AAAA,QAC1B;AAAA,MACA,UAAW;AACT,kBAAU,QAAQ;AAAA,MACpB;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const Vue = require("vue");
3
- const _l10n = require("./_l10n-BiiXtYiP.cjs");
3
+ const _l10n = require("./_l10n-DpwcsAC3.cjs");
4
4
  const Components_NcButton = require("../Components/NcButton.cjs");
5
5
  const NcIconSvgWrapper = require("./NcIconSvgWrapper-CrnN5Sq5.cjs");
6
6
  const Components_NcLoadingIcon = require("../Components/NcLoadingIcon.cjs");
@@ -125,4 +125,4 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
125
125
  );
126
126
  const NcDialogButton = __component__.exports;
127
127
  exports.NcDialogButton = NcDialogButton;
128
- //# sourceMappingURL=NcDialogButton-BFemrIUw.cjs.map
128
+ //# sourceMappingURL=NcDialogButton-_biPxXPQ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcDialogButton-BFemrIUw.cjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nDialog button component used by NcDialog in the actions slot to display the buttons passed by the `buttons` prop.\n</docs>\n\n<template>\n\t<NcButton :aria-label=\"label\"\n\t\t:disabled=\"disabled\"\n\t\t:type=\"type\"\n\t\t:native-type=\"nativeType\"\n\t\t:variant=\"variant\"\n\t\t@click=\"handleClick\">\n\t\t{{ label }}\n\t\t<template #icon>\n\t\t\t<!-- @slot Allow to set a custom icon for the button -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<!-- The loading state is an information that must be accessible -->\n\t\t\t\t<NcLoadingIcon v-if=\"isLoading\" :name=\"t('Loading …') /* TRANSLATORS: The button is in a loading state*/\" />\n\t\t\t\t<NcIconSvgWrapper v-else-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script setup>\nimport { ref } from 'vue'\nimport { t } from '../../l10n.js'\n\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\nimport NcLoadingIcon from '../NcLoadingIcon/index.js'\n\nconst props = defineProps({\n\t/**\n\t * The function that will be called when the button is pressed.\n\t * If the function returns `false` the click is ignored and the dialog will not be closed,\n\t * which is the default behavior of \"reset\"-buttons.\n\t *\n\t * @type {() => unknown|false|Promise<unknown|false>}\n\t */\n\tcallback: {\n\t\ttype: Function,\n\t\trequired: false,\n\t\tdefault: () => {},\n\t},\n\n\t/**\n\t * The label of the button\n\t */\n\tlabel: {\n\t\ttype: String,\n\t\trequired: true,\n\t},\n\n\t/**\n\t * Optional inline SVG icon for the button\n\t */\n\ticon: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: undefined,\n\t},\n\n\t/**\n\t * The button type, see NcButton.\n\t *\n\t * @deprecated The usage for setting the color variant is deprecated and will be removed with v9.\n\t * @type {'button'|'submit'|'reset'|'primary'|'secondary'|'error'|'warning'|'success'}\n\t */\n\ttype: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'secondary',\n\t\tvalidator: (type) => typeof type === 'string' && ['button', 'submit', 'reset', 'primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t},\n\n\t/**\n\t * See `nativeType` of `NcButton`.\n\t * @deprecated use `type` instead - will removed with v9\n\t */\n\tnativeType: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'button',\n\t\tvalidator(value) {\n\t\t\treturn ['submit', 'reset', 'button'].includes(value)\n\t\t},\n\t},\n\n\t/**\n\t * If the button should be shown as disabled\n\t */\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n\n\t/**\n\t * The button variant, see NcButton.\n\t *\n\t * @type {'primary'|'secondary'|'tertiary'|'error'|'warning'|'success'}\n\t * @since 8.24.0\n\t */\n\tvariant: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'secondary',\n\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t},\n})\n\nconst emit = defineEmits(['click'])\n\nconst isLoading = ref(false)\n\n/**\n * Handle clicking the button\n * @param {MouseEvent} e The click event\n */\nconst handleClick = async (e) => {\n\t// Do not re-emit while loading\n\tif (isLoading.value) {\n\t\treturn\n\t}\n\n\tisLoading.value = true\n\ttry {\n\t\t// for reset buttons the default is \"false\"\n\t\tconst fallback = props.nativeType === 'reset' ? false : undefined\n\t\tconst result = await props.callback?.() ?? fallback\n\t\tif (result !== false) {\n\t\t\t/**\n\t\t\t * The click event (`MouseEvent`) and the value returned by the callback\n\t\t\t */\n\t\t\temit('click', e, result)\n\t\t}\n\t} finally {\n\t\tisLoading.value = false\n\t}\n}\n</script>\n"],"names":["ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqHA,UAAM,YAAYA,IAAG,IAAC,KAAK;AAM3B,UAAM,cAAc,OAAO,MAAM;AAEhC,UAAI,UAAU,OAAO;AACpB;AAAA,MACF;AAEC,gBAAU,QAAQ;AAClB,UAAI;AAEH,cAAM,WAAW,MAAM,eAAe,UAAU,QAAQ;AACxD,cAAM,SAAS,MAAM,MAAM,gBAAgB;AAC3C,YAAI,WAAW,OAAO;AAIrB,eAAK,SAAS,GAAG,MAAM;AAAA,QAC1B;AAAA,MACA,UAAW;AACT,kBAAU,QAAQ;AAAA,MACpB;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcDialogButton-_biPxXPQ.cjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nDialog button component used by NcDialog in the actions slot to display the buttons passed by the `buttons` prop.\n</docs>\n\n<template>\n\t<NcButton :aria-label=\"label\"\n\t\t:disabled=\"disabled\"\n\t\t:type=\"type\"\n\t\t:native-type=\"nativeType\"\n\t\t:variant=\"variant\"\n\t\t@click=\"handleClick\">\n\t\t{{ label }}\n\t\t<template #icon>\n\t\t\t<!-- @slot Allow to set a custom icon for the button -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<!-- The loading state is an information that must be accessible -->\n\t\t\t\t<NcLoadingIcon v-if=\"isLoading\" :name=\"t('Loading …') /* TRANSLATORS: The button is in a loading state*/\" />\n\t\t\t\t<NcIconSvgWrapper v-else-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script setup>\nimport { ref } from 'vue'\nimport { t } from '../../l10n.js'\n\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\nimport NcLoadingIcon from '../NcLoadingIcon/index.js'\n\nconst props = defineProps({\n\t/**\n\t * The function that will be called when the button is pressed.\n\t * If the function returns `false` the click is ignored and the dialog will not be closed,\n\t * which is the default behavior of \"reset\"-buttons.\n\t *\n\t * @type {() => unknown|false|Promise<unknown|false>}\n\t */\n\tcallback: {\n\t\ttype: Function,\n\t\trequired: false,\n\t\tdefault: () => {},\n\t},\n\n\t/**\n\t * The label of the button\n\t */\n\tlabel: {\n\t\ttype: String,\n\t\trequired: true,\n\t},\n\n\t/**\n\t * Optional inline SVG icon for the button\n\t */\n\ticon: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: undefined,\n\t},\n\n\t/**\n\t * The button type, see NcButton.\n\t *\n\t * @deprecated The usage for setting the color variant is deprecated and will be removed with v9.\n\t * @type {'button'|'submit'|'reset'|'primary'|'secondary'|'error'|'warning'|'success'}\n\t */\n\ttype: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'secondary',\n\t\tvalidator: (type) => typeof type === 'string' && ['button', 'submit', 'reset', 'primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t},\n\n\t/**\n\t * See `nativeType` of `NcButton`.\n\t * @deprecated use `type` instead - will removed with v9\n\t */\n\tnativeType: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'button',\n\t\tvalidator(value) {\n\t\t\treturn ['submit', 'reset', 'button'].includes(value)\n\t\t},\n\t},\n\n\t/**\n\t * If the button should be shown as disabled\n\t */\n\tdisabled: {\n\t\ttype: Boolean,\n\t\tdefault: false,\n\t},\n\n\t/**\n\t * The button variant, see NcButton.\n\t *\n\t * @type {'primary'|'secondary'|'tertiary'|'error'|'warning'|'success'}\n\t * @since 8.24.0\n\t */\n\tvariant: {\n\t\ttype: String,\n\t\trequired: false,\n\t\tdefault: 'secondary',\n\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t},\n})\n\nconst emit = defineEmits(['click'])\n\nconst isLoading = ref(false)\n\n/**\n * Handle clicking the button\n * @param {MouseEvent} e The click event\n */\nconst handleClick = async (e) => {\n\t// Do not re-emit while loading\n\tif (isLoading.value) {\n\t\treturn\n\t}\n\n\tisLoading.value = true\n\ttry {\n\t\t// for reset buttons the default is \"false\"\n\t\tconst fallback = props.nativeType === 'reset' ? false : undefined\n\t\tconst result = await props.callback?.() ?? fallback\n\t\tif (result !== false) {\n\t\t\t/**\n\t\t\t * The click event (`MouseEvent`) and the value returned by the callback\n\t\t\t */\n\t\t\temit('click', e, result)\n\t\t}\n\t} finally {\n\t\tisLoading.value = false\n\t}\n}\n</script>\n"],"names":["ref"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqHA,UAAM,YAAYA,IAAG,IAAC,KAAK;AAM3B,UAAM,cAAc,OAAO,MAAM;AAEhC,UAAI,UAAU,OAAO;AACpB;AAAA,MACF;AAEC,gBAAU,QAAQ;AAClB,UAAI;AAEH,cAAM,WAAW,MAAM,eAAe,UAAU,QAAQ;AACxD,cAAM,SAAS,MAAM,MAAM,gBAAgB;AAC3C,YAAI,WAAW,OAAO;AAIrB,eAAK,SAAS,GAAG,MAAM;AAAA,QAC1B;AAAA,MACA,UAAW;AACT,kBAAU,QAAQ;AAAA,MACpB;AAAA,IACA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,16 +1,16 @@
1
1
  import '../assets/NcEmojiPicker-Ca6U46T8.css';
2
2
  import { Picker, Emoji, EmojiIndex } from "emoji-mart-vue-fast";
3
3
  import { isFocusable } from "tabbable";
4
- import { r as register, B as t40, C as t34, q as t14, D as t5, a as t } from "./_l10n-DQgzdF9S.mjs";
4
+ import { r as register, B as t40, C as t34, q as t14, D as t5, a as t } from "./_l10n-BU8-kQzN.mjs";
5
5
  import { s as setCurrentSkinTone, g as getCurrentSkinTone } from "./emoji-BY_D0V5K.mjs";
6
- import { u as useTrapStackControl } from "./useTrapStackControl-b3A_383w.mjs";
7
- import { C as Color } from "./GenColors-B49R8TGp.mjs";
6
+ import { u as useTrapStackControl } from "./useTrapStackControl-yqM2SDEs.mjs";
7
+ import { C as Color } from "./GenColors-DNN63dHB.mjs";
8
8
  import data from "emoji-mart-vue-fast/data/all.json";
9
9
  import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
10
10
  import NcButton from "../Components/NcButton.mjs";
11
- import { N as NcColorPicker } from "./NcColorPicker-D7aj2f61.mjs";
12
- import { N as NcPopover } from "./NcPopover-kYsewfff.mjs";
13
- import { N as NcTextField } from "./NcTextField-o_8gWurX.mjs";
11
+ import { N as NcColorPicker } from "./NcColorPicker-CU2sbJKt.mjs";
12
+ import { N as NcPopover } from "./NcPopover-4-YxCZOD.mjs";
13
+ import { N as NcTextField } from "./NcTextField-GdOVvMI8.mjs";
14
14
  register(t5, t14, t34, t40);
15
15
  const _sfc_main$1 = {
16
16
  name: "CircleIcon",
@@ -310,4 +310,4 @@ const NcEmojiPicker = __component__.exports;
310
310
  export {
311
311
  NcEmojiPicker as N
312
312
  };
313
- //# sourceMappingURL=NcEmojiPicker-Du-vbR5T.mjs.map
313
+ //# sourceMappingURL=NcEmojiPicker-C3rhl7Xh.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcEmojiPicker-Du-vbR5T.mjs","sources":["../../node_modules/vue-material-design-icons/Circle.vue","../../src/components/NcEmojiPicker/NcEmojiPicker.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon circle-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"CircleIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### General description\n\nThis component allows the user to pick an emoji.\n\n### Usage\n\n* Listen to the select event and pass in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker @select=\"select\" style=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Showing a preview and keeping it open after a user selected an emoji\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:close-on-select=\"false\"\n\t\t\t:show-preview=\"true\"\n\t\t\t@select=\"select\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Allow unselecting a previously set emoji.\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:show-preview=\"true\"\n\t\t\t:allow-unselect=\"true\"\n\t\t\t:selected-emoji=\"emoji\"\n\t\t\t@select=\"select\"\n\t\t\t@unselect=\"unselect\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t\tunselect() {\n\t\t\t\tthis.emoji = ''\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n</docs>\n\n<template>\n\t<NcPopover ref=\"popover\"\n\t\t:shown.sync=\"open\"\n\t\t:container=\"container\"\n\t\tpopup-role=\"dialog\"\n\t\tv-bind=\"$attrs\"\n\t\t:focus-trap=\"false /* Handled manually to remove emoji buttons from TAB sequence */\"\n\t\tv-on=\"$listeners\"\n\t\t@after-show=\"afterShow\"\n\t\t@after-hide=\"afterHide\">\n\t\t<template #trigger=\"slotProps\">\n\t\t\t<slot v-bind=\"slotProps\" />\n\t\t</template>\n\t\t<Picker ref=\"picker\"\n\t\t\tclass=\"nc-emoji-picker\"\n\t\t\tcolor=\"var(--color-primary-element)\"\n\t\t\t:data=\"emojiIndex\"\n\t\t\t:emoji=\"previewFallbackEmoji\"\n\t\t\t:i18n=\"i18n\"\n\t\t\t:native=\"native\"\n\t\t\t:emoji-size=\"20\"\n\t\t\t:per-line=\"8\"\n\t\t\t:picker-styles=\"{ width: '320px' }\"\n\t\t\t:show-preview=\"showPreview\"\n\t\t\t:skin=\"currentSkinTone\"\n\t\t\t:show-skin-tones=\"false\"\n\t\t\t:title=\"previewFallbackName\"\n\t\t\trole=\"dialog\"\n\t\t\taria-modal=\"true\"\n\t\t\t:aria-label=\"t('Emoji picker')\"\n\t\t\tv-bind=\"$attrs\"\n\t\t\t@keydown.native.tab.prevent=\"handleTabNavigationSkippingEmojis\"\n\t\t\t@select=\"select\">\n\t\t\t<template #searchTemplate=\"{ onSearch }\">\n\t\t\t\t<div class=\"search__wrapper\">\n\t\t\t\t\t<NcTextField ref=\"search\"\n\t\t\t\t\t\tclass=\"search\"\n\t\t\t\t\t\t:value.sync=\"search\"\n\t\t\t\t\t\t:label=\"t('Search')\"\n\t\t\t\t\t\t:label-visible=\"true\"\n\t\t\t\t\t\t:placeholder=\"i18n.search\"\n\t\t\t\t\t\ttrailing-button-icon=\"close\"\n\t\t\t\t\t\t:trailing-button-label=\"t('Clear search')\"\n\t\t\t\t\t\t:show-trailing-button=\"search !== ''\"\n\t\t\t\t\t\t@keydown.left=\"callPickerArrowHandlerWithScrollFix('onArrowLeft', $event)\"\n\t\t\t\t\t\t@keydown.right=\"callPickerArrowHandlerWithScrollFix('onArrowRight', $event)\"\n\t\t\t\t\t\t@keydown.down=\"callPickerArrowHandlerWithScrollFix('onArrowDown', $event)\"\n\t\t\t\t\t\t@keydown.up=\"callPickerArrowHandlerWithScrollFix('onArrowUp', $event)\"\n\t\t\t\t\t\t@keydown.enter=\"$refs.picker.onEnter\"\n\t\t\t\t\t\t@trailing-button-click=\"clearSearch(); onSearch('');\"\n\t\t\t\t\t\t@update:value=\"onSearch(search)\" />\n\t\t\t\t\t<NcColorPicker palette-only\n\t\t\t\t\t\t:container=\"container\"\n\t\t\t\t\t\t:palette=\"skinTonePalette\"\n\t\t\t\t\t\t:value=\"currentColor.color\"\n\t\t\t\t\t\t@update:value=\"onChangeSkinTone\">\n\t\t\t\t\t\t<NcButton :aria-label=\"t('Skin tone')\" variant=\"tertiary-no-background\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconCircle :style=\"{ color: currentColor.color }\" :title=\"currentColor.name\" :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</NcColorPicker>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t\t<template v-if=\"allowUnselect && selectedEmoji\" #customCategory>\n\t\t\t\t<div class=\"emoji-mart-category-label\">\n\t\t\t\t\t<h3 class=\"emoji-mart-category-label\">\n\t\t\t\t\t\t{{ t('Selected') }}\n\t\t\t\t\t</h3>\n\t\t\t\t</div>\n\t\t\t\t<Emoji class=\"emoji-selected\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\t:emoji=\"selectedEmoji\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"32\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t\t<Emoji class=\"emoji-delete\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\temoji=\":x:\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"10\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t</template>\n\t\t</Picker>\n\t</NcPopover>\n</template>\n\n<script>\nimport { Picker, Emoji, EmojiIndex } from 'emoji-mart-vue-fast'\nimport { isFocusable } from 'tabbable'\nimport { t } from '../../l10n.js'\nimport { getCurrentSkinTone, setCurrentSkinTone } from '../../functions/emoji/emoji.ts'\nimport { useTrapStackControl } from '../../composables/useTrapStackControl.ts'\nimport { Color } from '../../utils/GenColors.js'\n\nimport data from 'emoji-mart-vue-fast/data/all.json'\nimport IconCircle from 'vue-material-design-icons/Circle.vue'\nimport NcButton from '../NcButton/index.js'\nimport NcColorPicker from '../NcColorPicker/NcColorPicker.vue'\nimport NcPopover from '../NcPopover/index.js'\nimport NcTextField from '../NcTextField/index.js'\n\n// Shared emoji index and skinTone for all NcEmojiPicker instances\n// Will be initialized on the first NcEmojiPicker creating\nlet emojiIndex\n\nconst i18n = {\n\tsearch: t('Search emoji'),\n\tnotfound: t('No emoji found'),\n\tcategories: {\n\t\tsearch: t('Search results'),\n\t\trecent: t('Frequently used'),\n\t\tsmileys: t('Smileys & Emotion'),\n\t\tpeople: t('People & Body'),\n\t\tnature: t('Animals & Nature'),\n\t\tfoods: t('Food & Drink'),\n\t\tactivity: t('Activities'),\n\t\tplaces: t('Travel & Places'),\n\t\tobjects: t('Objects'),\n\t\tsymbols: t('Symbols'),\n\t\tflags: t('Flags'),\n\t\tcustom: t('Custom'),\n\t},\n}\n\nconst skinTonePalette = [\n\tnew Color(255, 222, 52, t('Neutral skin color')),\n\tnew Color(228, 205, 166, t('Light skin tone')),\n\tnew Color(250, 221, 192, t('Medium light skin tone')),\n\tnew Color(174, 129, 87, t('Medium skin tone')),\n\tnew Color(158, 113, 88, t('Medium dark skin tone')),\n\tnew Color(96, 79, 69, t('Dark skin tone')),\n]\n\nexport default {\n\tname: 'NcEmojiPicker',\n\n\tcomponents: {\n\t\tEmoji,\n\t\tIconCircle,\n\t\tNcButton,\n\t\tNcColorPicker,\n\t\tNcPopover,\n\t\tNcTextField,\n\t\tPicker,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The emoji-set\n\t\t */\n\t\tactiveSet: {\n\t\t\ttype: String,\n\t\t\tdefault: 'native',\n\t\t},\n\t\t/**\n\t\t * Show preview section when hovering emoji\n\t\t */\n\t\tshowPreview: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Allow unselecting the selected emoji\n\t\t */\n\t\tallowUnselect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Selected emoji to allow unselecting\n\t\t */\n\t\tselectedEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The fallback emoji in the preview section\n\t\t */\n\t\tpreviewFallbackEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: 'grinning',\n\t\t},\n\t\t/**\n\t\t * The fallback text in the preview section\n\t\t */\n\t\tpreviewFallbackName: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Pick an emoji'),\n\t\t},\n\t\t/**\n\t\t * Whether to close the emoji picker after picking one\n\t\t */\n\t\tcloseOnSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Selector for the popover container\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: [String, Object, Element, Boolean],\n\t\t\tdefault: 'body',\n\t\t},\n\t},\n\temits: [\n\t\t'select',\n\t\t'select-data',\n\t\t'unselect',\n\t],\n\n\tsetup() {\n\t\t// If this is the first instance of NcEmojiPicker - setup EmojiIndex\n\t\tif (!emojiIndex) {\n\t\t\temojiIndex = new EmojiIndex(data)\n\t\t}\n\n\t\treturn {\n\t\t\t// Non-reactive constants\n\t\t\temojiIndex,\n\t\t\tskinTonePalette,\n\t\t\ti18n,\n\t\t}\n\t},\n\n\tdata() {\n\t\tconst currentSkinTone = getCurrentSkinTone()\n\n\t\treturn {\n\t\t\t/**\n\t\t\t * The current active color from the skin tone palette\n\t\t\t */\n\t\t\tcurrentColor: skinTonePalette[currentSkinTone - 1],\n\t\t\t/**\n\t\t\t * The current active skin tone\n\t\t\t * @type {1|2|3|4|5|6}\n\t\t\t */\n\t\t\tcurrentSkinTone,\n\t\t\tsearch: '',\n\t\t\topen: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tnative() {\n\t\t\treturn this.activeSet === 'native'\n\t\t},\n\t},\n\n\tcreated() {\n\t\t// Component has its own custom focus management\n\t\t// The global focus trap stack should be paused\n\t\tuseTrapStackControl(() => this.open)\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\tclearSearch() {\n\t\t\tthis.search = ''\n\t\t\tthis.$refs.search.focus()\n\t\t},\n\n\t\t/**\n\t\t * Update the current skin tone by the result of the color picker\n\t\t * @param {string} color Color set\n\t\t */\n\t\tonChangeSkinTone(color) {\n\t\t\tconst index = this.skinTonePalette.findIndex((tone) => tone.color.toLowerCase() === color.toLowerCase())\n\t\t\tif (index > -1) {\n\t\t\t\tthis.currentSkinTone = index + 1\n\t\t\t\tthis.currentColor = this.skinTonePalette[index]\n\t\t\t\tsetCurrentSkinTone(this.currentSkinTone)\n\t\t\t}\n\t\t},\n\n\t\tselect(emojiObject) {\n\t\t\t/**\n\t\t\t * Emits a string containing the emoji e.g. '👩🏿‍💻'\n\t\t\t */\n\t\t\tthis.$emit('select', emojiObject.native)\n\n\t\t\t/**\n\t\t\t * Emits a object with more data about the picked emoji\n\t\t\t */\n\t\t\tthis.$emit('select-data', emojiObject)\n\n\t\t\tif (this.closeOnSelect) {\n\t\t\t\tthis.open = false\n\t\t\t}\n\t\t},\n\n\t\tunselect() {\n\t\t\tthis.$emit('unselect')\n\t\t},\n\n\t\tafterShow() {\n\t\t\tthis.$refs.search.focus()\n\t\t},\n\n\t\tafterHide() {\n\t\t\t// Manually return focus to the trigger button, as we disabled focus-trap\n\t\t\t// But only if there is no focus target outside the picker, for example, input element that received focus by click closing the emoji picker\n\t\t\tif (!document.activeElement || this.$refs.picker.$el.contains(document.activeElement) || !isFocusable(document.activeElement)) {\n\t\t\t\tthis.$refs.popover.$el.querySelector('button, [role=\"button\"]')?.focus()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Manually handle Tab navigation skipping emoji buttons.\n\t\t * Navigation over emojis is handled by Arrow keys.\n\t\t * @param {KeyboardEvent} event - Keyboard event\n\t\t */\n\t\thandleTabNavigationSkippingEmojis(event) {\n\t\t\tconst current = event.target\n\t\t\tconst focusable = Array.from(this.$refs.picker.$el.querySelectorAll('button:not(.emoji-mart-emoji), input'))\n\t\t\tif (!event.shiftKey) {\n\t\t\t\tconst nextNode = focusable.find((node) => current.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_FOLLOWING) || focusable[0]\n\t\t\t\tnextNode.focus()\n\t\t\t} else {\n\t\t\t\tconst prevNode = focusable.findLast((node) => current.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_PRECEDING) || focusable.at(-1)\n\t\t\t\tprevNode.focus()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Handle arrow navigation via <Picker>'s handlers with scroll bug fix\n\t\t * @param {'onArrowLeft' | 'onArrowRight' | 'onArrowDown' | 'onArrowUp'} originalHandlerName - Picker's arrow keydown handler name\n\t\t * @param {KeyboardEvent} event - Keyboard event\n\t\t */\n\t\tasync callPickerArrowHandlerWithScrollFix(originalHandlerName, event) {\n\t\t\t// Call the original handler\n\t\t\t// See: https://github.com/serebrov/emoji-mart-vue/blob/a1ea72673a111cce78dc8caad8bc9ea3e02ad5bd/src/components/Picker.vue#L29\n\t\t\t// TODO: expose these methods via slot props in upstream library\n\t\t\tthis.$refs.picker[originalHandlerName](event)\n\n\t\t\t// Wait until emoji-mart-vue-fast scrolls\n\t\t\tawait this.$nextTick()\n\n\t\t\t// Scroll position is incorrect after emoji-mart-vue-fast scrolls...\n\t\t\t// It calculates scroll incorrectly.\n\t\t\t// It doesn't take into account, that emojis are wrapped into categories sections\n\t\t\t// See: https://github.com/serebrov/emoji-mart-vue/blob/a1ea72673a111cce78dc8caad8bc9ea3e02ad5bd/src/utils/picker.js#L244\n\t\t\t// Now scroll to the correct position\n\t\t\t// TODO: fix in upstream\n\t\t\tconst selectedEmoji = this.$refs.picker.$el.querySelector('.emoji-mart-emoji-selected')\n\t\t\tselectedEmoji?.scrollIntoView({\n\t\t\t\tblock: 'center',\n\t\t\t\tinline: 'center',\n\t\t\t})\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n@import 'emoji-mart-vue-fast/css/emoji-mart.css';\n\n.nc-emoji-picker.emoji-mart {\n\tbackground-color: var(--color-main-background) !important;\n\tborder: 0;\n\tcolor: var(--color-main-text) !important;\n\n\t// Reset emoji-mart styles\n\tbutton {\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\tfont-size: inherit;\n\t}\n\n\t.emoji-mart-bar,\n\t.emoji-mart-anchors,\n\t.emoji-mart-search,\n\t.emoji-mart-search input,\n\t.emoji-mart-category,\n\t.emoji-mart-category-label,\n\t.emoji-mart-category-label span,\n\t.emoji-mart-skin-swatches {\n\t\tbackground-color: transparent !important;\n\t\tborder-color: var(--color-border) !important;\n\t\tcolor: inherit !important;\n\t}\n\n\t.emoji-mart-anchors {\n\t\tpadding-block: 0;\n\t\tpadding-inline: calc(2 * var(--default-grid-baseline));\n\t}\n\n\t.emoji-mart-anchor {\n\t\tborder-radius: 0;\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\t\theight: var(--clickable-area-small);\n\t\tmin-width: var(--clickable-area-small);\n\n\t\t&:hover {\n\t\t\tbackground-color: var(--color-background-hover);\n\t\t}\n\n\t\t&:focus-visible {\n\t\t\toutline: 2px solid var(--color-primary-element) !important;\n\t\t\toutline-offset: -2px;\n\t\t}\n\n\t\t// Icon\n\t\tdiv {\n\t\t\tdisplay: grid;\n\t\t\tplace-content: center;\n\t\t}\n\t}\n\n\t.emoji-mart-scroll {\n\t\tpadding-inline: calc(2 * var(--default-grid-baseline));\n\t\tpadding-block: 0 calc(2 * var(--default-grid-baseline));\n\t}\n\n\t.emoji-mart-category {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(8, 1fr);\n\t\tjustify-items: stretch;\n\n\t\t&.emoji-mart-no-results {\n\t\t\tgrid-template-columns: 1fr;\n\t\t\tfont-size: inherit;\n\t\t\tcolor: var(--color-text-maxcontrast) !important;\n\t\t}\n\t}\n\n\t/* Label element in the section grid */\n\tdiv.emoji-mart-category-label {\n\t\tgrid-column: span 8;\n\t\tjustify-self: stretch;\n\t}\n\n\t/* An actual heading inside the element */\n\th3.emoji-mart-category-label {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\t// Inline with buttons\n\t\theight: var(--default-clickable-area);\n\t\tmargin: 0;\n\t\t// Inline with input\n\t\tpadding-inline: calc(2 * var(--default-grid-baseline));\n\t\tpadding-block: 0;\n\t\tuser-select: none;\n\t}\n\n\t.emoji-mart-emoji {\n\t\taspect-ratio: 1 / 1;\n\t\ttext-align: center;\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\n\t\t&:hover,\n\t\t&:focus-visible,\n\t\t&.emoji-mart-emoji-selected {\n\t\t\tbackground-color: var(--color-background-hover) !important;\n\t\t\tborder: none;\n\t\t\tborder-radius: var(--border-radius-element, var(--border-radius-pill));\n\t\t\tbox-shadow: none !important;\n\t\t\toutline: 2px solid var(--color-primary-element) !important;\n\t\t\toutline-offset: -2px;\n\t\t}\n\n\t\t&::before {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\tspan {\n\t\t\tcursor: pointer;\n\t\t}\n\t}\n}\n</style>\n\n<style scoped lang=\"scss\">\n.search__wrapper {\n\tdisplay: flex;\n\tflex-direction: row;\n\tgap: var(--default-grid-baseline);\n\talign-items: end;\n\tpadding-block: var(--default-grid-baseline);\n\tpadding-inline: calc(2 * var(--default-grid-baseline));\n}\n\n.row-selected {\n\tbutton, span {\n\t\tvertical-align: middle;\n\t}\n}\n\n.emoji-delete {\n\tvertical-align: top;\n\tmargin-left: -21px;\n\tmargin-top: -3px;\n}\n</style>\n"],"names":["_sfc_main"],"mappings":";;;;;;;;;;;;;AAoBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;ACgLA,IAAA;AAEA,MAAA,OAAA;AAAA,EACA,QAAA,EAAA,cAAA;AAAA,EACA,UAAA,EAAA,gBAAA;AAAA,EACA,YAAA;AAAA,IACA,QAAA,EAAA,gBAAA;AAAA,IACA,QAAA,EAAA,iBAAA;AAAA,IACA,SAAA,EAAA,mBAAA;AAAA,IACA,QAAA,EAAA,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;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"NcEmojiPicker-C3rhl7Xh.mjs","sources":["../../node_modules/vue-material-design-icons/Circle.vue","../../src/components/NcEmojiPicker/NcEmojiPicker.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon circle-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"CircleIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### General description\n\nThis component allows the user to pick an emoji.\n\n### Usage\n\n* Listen to the select event and pass in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker @select=\"select\" style=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Showing a preview and keeping it open after a user selected an emoji\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:close-on-select=\"false\"\n\t\t\t:show-preview=\"true\"\n\t\t\t@select=\"select\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Allow unselecting a previously set emoji.\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:show-preview=\"true\"\n\t\t\t:allow-unselect=\"true\"\n\t\t\t:selected-emoji=\"emoji\"\n\t\t\t@select=\"select\"\n\t\t\t@unselect=\"unselect\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t\tunselect() {\n\t\t\t\tthis.emoji = ''\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n</docs>\n\n<template>\n\t<NcPopover ref=\"popover\"\n\t\t:shown.sync=\"open\"\n\t\t:container=\"container\"\n\t\tpopup-role=\"dialog\"\n\t\tv-bind=\"$attrs\"\n\t\t:focus-trap=\"false /* Handled manually to remove emoji buttons from TAB sequence */\"\n\t\tv-on=\"$listeners\"\n\t\t@after-show=\"afterShow\"\n\t\t@after-hide=\"afterHide\">\n\t\t<template #trigger=\"slotProps\">\n\t\t\t<slot v-bind=\"slotProps\" />\n\t\t</template>\n\t\t<Picker ref=\"picker\"\n\t\t\tclass=\"nc-emoji-picker\"\n\t\t\tcolor=\"var(--color-primary-element)\"\n\t\t\t:data=\"emojiIndex\"\n\t\t\t:emoji=\"previewFallbackEmoji\"\n\t\t\t:i18n=\"i18n\"\n\t\t\t:native=\"native\"\n\t\t\t:emoji-size=\"20\"\n\t\t\t:per-line=\"8\"\n\t\t\t:picker-styles=\"{ width: '320px' }\"\n\t\t\t:show-preview=\"showPreview\"\n\t\t\t:skin=\"currentSkinTone\"\n\t\t\t:show-skin-tones=\"false\"\n\t\t\t:title=\"previewFallbackName\"\n\t\t\trole=\"dialog\"\n\t\t\taria-modal=\"true\"\n\t\t\t:aria-label=\"t('Emoji picker')\"\n\t\t\tv-bind=\"$attrs\"\n\t\t\t@keydown.native.tab.prevent=\"handleTabNavigationSkippingEmojis\"\n\t\t\t@select=\"select\">\n\t\t\t<template #searchTemplate=\"{ onSearch }\">\n\t\t\t\t<div class=\"search__wrapper\">\n\t\t\t\t\t<NcTextField ref=\"search\"\n\t\t\t\t\t\tclass=\"search\"\n\t\t\t\t\t\t:value.sync=\"search\"\n\t\t\t\t\t\t:label=\"t('Search')\"\n\t\t\t\t\t\t:label-visible=\"true\"\n\t\t\t\t\t\t:placeholder=\"i18n.search\"\n\t\t\t\t\t\ttrailing-button-icon=\"close\"\n\t\t\t\t\t\t:trailing-button-label=\"t('Clear search')\"\n\t\t\t\t\t\t:show-trailing-button=\"search !== ''\"\n\t\t\t\t\t\t@keydown.left=\"callPickerArrowHandlerWithScrollFix('onArrowLeft', $event)\"\n\t\t\t\t\t\t@keydown.right=\"callPickerArrowHandlerWithScrollFix('onArrowRight', $event)\"\n\t\t\t\t\t\t@keydown.down=\"callPickerArrowHandlerWithScrollFix('onArrowDown', $event)\"\n\t\t\t\t\t\t@keydown.up=\"callPickerArrowHandlerWithScrollFix('onArrowUp', $event)\"\n\t\t\t\t\t\t@keydown.enter=\"$refs.picker.onEnter\"\n\t\t\t\t\t\t@trailing-button-click=\"clearSearch(); onSearch('');\"\n\t\t\t\t\t\t@update:value=\"onSearch(search)\" />\n\t\t\t\t\t<NcColorPicker palette-only\n\t\t\t\t\t\t:container=\"container\"\n\t\t\t\t\t\t:palette=\"skinTonePalette\"\n\t\t\t\t\t\t:value=\"currentColor.color\"\n\t\t\t\t\t\t@update:value=\"onChangeSkinTone\">\n\t\t\t\t\t\t<NcButton :aria-label=\"t('Skin tone')\" variant=\"tertiary-no-background\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconCircle :style=\"{ color: currentColor.color }\" :title=\"currentColor.name\" :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</NcColorPicker>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t\t<template v-if=\"allowUnselect && selectedEmoji\" #customCategory>\n\t\t\t\t<div class=\"emoji-mart-category-label\">\n\t\t\t\t\t<h3 class=\"emoji-mart-category-label\">\n\t\t\t\t\t\t{{ t('Selected') }}\n\t\t\t\t\t</h3>\n\t\t\t\t</div>\n\t\t\t\t<Emoji class=\"emoji-selected\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\t:emoji=\"selectedEmoji\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"32\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t\t<Emoji class=\"emoji-delete\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\temoji=\":x:\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"10\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t</template>\n\t\t</Picker>\n\t</NcPopover>\n</template>\n\n<script>\nimport { Picker, Emoji, EmojiIndex } from 'emoji-mart-vue-fast'\nimport { isFocusable } from 'tabbable'\nimport { t } from '../../l10n.js'\nimport { getCurrentSkinTone, setCurrentSkinTone } from '../../functions/emoji/emoji.ts'\nimport { useTrapStackControl } from '../../composables/useTrapStackControl.ts'\nimport { Color } from '../../utils/GenColors.js'\n\nimport data from 'emoji-mart-vue-fast/data/all.json'\nimport IconCircle from 'vue-material-design-icons/Circle.vue'\nimport NcButton from '../NcButton/index.js'\nimport NcColorPicker from '../NcColorPicker/NcColorPicker.vue'\nimport NcPopover from '../NcPopover/index.js'\nimport NcTextField from '../NcTextField/index.js'\n\n// Shared emoji index and skinTone for all NcEmojiPicker instances\n// Will be initialized on the first NcEmojiPicker creating\nlet emojiIndex\n\nconst i18n = {\n\tsearch: t('Search emoji'),\n\tnotfound: t('No emoji found'),\n\tcategories: {\n\t\tsearch: t('Search results'),\n\t\trecent: t('Frequently used'),\n\t\tsmileys: t('Smileys & Emotion'),\n\t\tpeople: t('People & Body'),\n\t\tnature: t('Animals & Nature'),\n\t\tfoods: t('Food & Drink'),\n\t\tactivity: t('Activities'),\n\t\tplaces: t('Travel & Places'),\n\t\tobjects: t('Objects'),\n\t\tsymbols: t('Symbols'),\n\t\tflags: t('Flags'),\n\t\tcustom: t('Custom'),\n\t},\n}\n\nconst skinTonePalette = [\n\tnew Color(255, 222, 52, t('Neutral skin color')),\n\tnew Color(228, 205, 166, t('Light skin tone')),\n\tnew Color(250, 221, 192, t('Medium light skin tone')),\n\tnew Color(174, 129, 87, t('Medium skin tone')),\n\tnew Color(158, 113, 88, t('Medium dark skin tone')),\n\tnew Color(96, 79, 69, t('Dark skin tone')),\n]\n\nexport default {\n\tname: 'NcEmojiPicker',\n\n\tcomponents: {\n\t\tEmoji,\n\t\tIconCircle,\n\t\tNcButton,\n\t\tNcColorPicker,\n\t\tNcPopover,\n\t\tNcTextField,\n\t\tPicker,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The emoji-set\n\t\t */\n\t\tactiveSet: {\n\t\t\ttype: String,\n\t\t\tdefault: 'native',\n\t\t},\n\t\t/**\n\t\t * Show preview section when hovering emoji\n\t\t */\n\t\tshowPreview: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Allow unselecting the selected emoji\n\t\t */\n\t\tallowUnselect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Selected emoji to allow unselecting\n\t\t */\n\t\tselectedEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The fallback emoji in the preview section\n\t\t */\n\t\tpreviewFallbackEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: 'grinning',\n\t\t},\n\t\t/**\n\t\t * The fallback text in the preview section\n\t\t */\n\t\tpreviewFallbackName: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Pick an emoji'),\n\t\t},\n\t\t/**\n\t\t * Whether to close the emoji picker after picking one\n\t\t */\n\t\tcloseOnSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Selector for the popover container\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: [String, Object, Element, Boolean],\n\t\t\tdefault: 'body',\n\t\t},\n\t},\n\temits: [\n\t\t'select',\n\t\t'select-data',\n\t\t'unselect',\n\t],\n\n\tsetup() {\n\t\t// If this is the first instance of NcEmojiPicker - setup EmojiIndex\n\t\tif (!emojiIndex) {\n\t\t\temojiIndex = new EmojiIndex(data)\n\t\t}\n\n\t\treturn {\n\t\t\t// Non-reactive constants\n\t\t\temojiIndex,\n\t\t\tskinTonePalette,\n\t\t\ti18n,\n\t\t}\n\t},\n\n\tdata() {\n\t\tconst currentSkinTone = getCurrentSkinTone()\n\n\t\treturn {\n\t\t\t/**\n\t\t\t * The current active color from the skin tone palette\n\t\t\t */\n\t\t\tcurrentColor: skinTonePalette[currentSkinTone - 1],\n\t\t\t/**\n\t\t\t * The current active skin tone\n\t\t\t * @type {1|2|3|4|5|6}\n\t\t\t */\n\t\t\tcurrentSkinTone,\n\t\t\tsearch: '',\n\t\t\topen: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tnative() {\n\t\t\treturn this.activeSet === 'native'\n\t\t},\n\t},\n\n\tcreated() {\n\t\t// Component has its own custom focus management\n\t\t// The global focus trap stack should be paused\n\t\tuseTrapStackControl(() => this.open)\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\tclearSearch() {\n\t\t\tthis.search = ''\n\t\t\tthis.$refs.search.focus()\n\t\t},\n\n\t\t/**\n\t\t * Update the current skin tone by the result of the color picker\n\t\t * @param {string} color Color set\n\t\t */\n\t\tonChangeSkinTone(color) {\n\t\t\tconst index = this.skinTonePalette.findIndex((tone) => tone.color.toLowerCase() === color.toLowerCase())\n\t\t\tif (index > -1) {\n\t\t\t\tthis.currentSkinTone = index + 1\n\t\t\t\tthis.currentColor = this.skinTonePalette[index]\n\t\t\t\tsetCurrentSkinTone(this.currentSkinTone)\n\t\t\t}\n\t\t},\n\n\t\tselect(emojiObject) {\n\t\t\t/**\n\t\t\t * Emits a string containing the emoji e.g. '👩🏿‍💻'\n\t\t\t */\n\t\t\tthis.$emit('select', emojiObject.native)\n\n\t\t\t/**\n\t\t\t * Emits a object with more data about the picked emoji\n\t\t\t */\n\t\t\tthis.$emit('select-data', emojiObject)\n\n\t\t\tif (this.closeOnSelect) {\n\t\t\t\tthis.open = false\n\t\t\t}\n\t\t},\n\n\t\tunselect() {\n\t\t\tthis.$emit('unselect')\n\t\t},\n\n\t\tafterShow() {\n\t\t\tthis.$refs.search.focus()\n\t\t},\n\n\t\tafterHide() {\n\t\t\t// Manually return focus to the trigger button, as we disabled focus-trap\n\t\t\t// But only if there is no focus target outside the picker, for example, input element that received focus by click closing the emoji picker\n\t\t\tif (!document.activeElement || this.$refs.picker.$el.contains(document.activeElement) || !isFocusable(document.activeElement)) {\n\t\t\t\tthis.$refs.popover.$el.querySelector('button, [role=\"button\"]')?.focus()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Manually handle Tab navigation skipping emoji buttons.\n\t\t * Navigation over emojis is handled by Arrow keys.\n\t\t * @param {KeyboardEvent} event - Keyboard event\n\t\t */\n\t\thandleTabNavigationSkippingEmojis(event) {\n\t\t\tconst current = event.target\n\t\t\tconst focusable = Array.from(this.$refs.picker.$el.querySelectorAll('button:not(.emoji-mart-emoji), input'))\n\t\t\tif (!event.shiftKey) {\n\t\t\t\tconst nextNode = focusable.find((node) => current.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_FOLLOWING) || focusable[0]\n\t\t\t\tnextNode.focus()\n\t\t\t} else {\n\t\t\t\tconst prevNode = focusable.findLast((node) => current.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_PRECEDING) || focusable.at(-1)\n\t\t\t\tprevNode.focus()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Handle arrow navigation via <Picker>'s handlers with scroll bug fix\n\t\t * @param {'onArrowLeft' | 'onArrowRight' | 'onArrowDown' | 'onArrowUp'} originalHandlerName - Picker's arrow keydown handler name\n\t\t * @param {KeyboardEvent} event - Keyboard event\n\t\t */\n\t\tasync callPickerArrowHandlerWithScrollFix(originalHandlerName, event) {\n\t\t\t// Call the original handler\n\t\t\t// See: https://github.com/serebrov/emoji-mart-vue/blob/a1ea72673a111cce78dc8caad8bc9ea3e02ad5bd/src/components/Picker.vue#L29\n\t\t\t// TODO: expose these methods via slot props in upstream library\n\t\t\tthis.$refs.picker[originalHandlerName](event)\n\n\t\t\t// Wait until emoji-mart-vue-fast scrolls\n\t\t\tawait this.$nextTick()\n\n\t\t\t// Scroll position is incorrect after emoji-mart-vue-fast scrolls...\n\t\t\t// It calculates scroll incorrectly.\n\t\t\t// It doesn't take into account, that emojis are wrapped into categories sections\n\t\t\t// See: https://github.com/serebrov/emoji-mart-vue/blob/a1ea72673a111cce78dc8caad8bc9ea3e02ad5bd/src/utils/picker.js#L244\n\t\t\t// Now scroll to the correct position\n\t\t\t// TODO: fix in upstream\n\t\t\tconst selectedEmoji = this.$refs.picker.$el.querySelector('.emoji-mart-emoji-selected')\n\t\t\tselectedEmoji?.scrollIntoView({\n\t\t\t\tblock: 'center',\n\t\t\t\tinline: 'center',\n\t\t\t})\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n@import 'emoji-mart-vue-fast/css/emoji-mart.css';\n\n.nc-emoji-picker.emoji-mart {\n\tbackground-color: var(--color-main-background) !important;\n\tborder: 0;\n\tcolor: var(--color-main-text) !important;\n\n\t// Reset emoji-mart styles\n\tbutton {\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\tfont-size: inherit;\n\t}\n\n\t.emoji-mart-bar,\n\t.emoji-mart-anchors,\n\t.emoji-mart-search,\n\t.emoji-mart-search input,\n\t.emoji-mart-category,\n\t.emoji-mart-category-label,\n\t.emoji-mart-category-label span,\n\t.emoji-mart-skin-swatches {\n\t\tbackground-color: transparent !important;\n\t\tborder-color: var(--color-border) !important;\n\t\tcolor: inherit !important;\n\t}\n\n\t.emoji-mart-anchors {\n\t\tpadding-block: 0;\n\t\tpadding-inline: calc(2 * var(--default-grid-baseline));\n\t}\n\n\t.emoji-mart-anchor {\n\t\tborder-radius: 0;\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\t\theight: var(--clickable-area-small);\n\t\tmin-width: var(--clickable-area-small);\n\n\t\t&:hover {\n\t\t\tbackground-color: var(--color-background-hover);\n\t\t}\n\n\t\t&:focus-visible {\n\t\t\toutline: 2px solid var(--color-primary-element) !important;\n\t\t\toutline-offset: -2px;\n\t\t}\n\n\t\t// Icon\n\t\tdiv {\n\t\t\tdisplay: grid;\n\t\t\tplace-content: center;\n\t\t}\n\t}\n\n\t.emoji-mart-scroll {\n\t\tpadding-inline: calc(2 * var(--default-grid-baseline));\n\t\tpadding-block: 0 calc(2 * var(--default-grid-baseline));\n\t}\n\n\t.emoji-mart-category {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(8, 1fr);\n\t\tjustify-items: stretch;\n\n\t\t&.emoji-mart-no-results {\n\t\t\tgrid-template-columns: 1fr;\n\t\t\tfont-size: inherit;\n\t\t\tcolor: var(--color-text-maxcontrast) !important;\n\t\t}\n\t}\n\n\t/* Label element in the section grid */\n\tdiv.emoji-mart-category-label {\n\t\tgrid-column: span 8;\n\t\tjustify-self: stretch;\n\t}\n\n\t/* An actual heading inside the element */\n\th3.emoji-mart-category-label {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\t// Inline with buttons\n\t\theight: var(--default-clickable-area);\n\t\tmargin: 0;\n\t\t// Inline with input\n\t\tpadding-inline: calc(2 * var(--default-grid-baseline));\n\t\tpadding-block: 0;\n\t\tuser-select: none;\n\t}\n\n\t.emoji-mart-emoji {\n\t\taspect-ratio: 1 / 1;\n\t\ttext-align: center;\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\n\t\t&:hover,\n\t\t&:focus-visible,\n\t\t&.emoji-mart-emoji-selected {\n\t\t\tbackground-color: var(--color-background-hover) !important;\n\t\t\tborder: none;\n\t\t\tborder-radius: var(--border-radius-element, var(--border-radius-pill));\n\t\t\tbox-shadow: none !important;\n\t\t\toutline: 2px solid var(--color-primary-element) !important;\n\t\t\toutline-offset: -2px;\n\t\t}\n\n\t\t&::before {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\tspan {\n\t\t\tcursor: pointer;\n\t\t}\n\t}\n}\n</style>\n\n<style scoped lang=\"scss\">\n.search__wrapper {\n\tdisplay: flex;\n\tflex-direction: row;\n\tgap: var(--default-grid-baseline);\n\talign-items: end;\n\tpadding-block: var(--default-grid-baseline);\n\tpadding-inline: calc(2 * var(--default-grid-baseline));\n}\n\n.row-selected {\n\tbutton, span {\n\t\tvertical-align: middle;\n\t}\n}\n\n.emoji-delete {\n\tvertical-align: top;\n\tmargin-left: -21px;\n\tmargin-top: -3px;\n}\n</style>\n"],"names":["_sfc_main"],"mappings":";;;;;;;;;;;;;AAoBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA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AAA,oCAAA,qBAAA,OAAA;AAIA,WAAA,MAAA,OAAA,mBAAA,EAAA,KAAA;AAGA,YAAA,KAAA,UAAA;AAQA,YAAA,gBAAA,KAAA,MAAA,OAAA,IAAA,cAAA,4BAAA;AACA,qBAAA,eAAA;AAAA,QACA,OAAA;AAAA,QACA,QAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
@@ -2,16 +2,16 @@ require('../assets/NcEmojiPicker-Ca6U46T8.css');
2
2
  "use strict";
3
3
  const emojiMartVueFast = require("emoji-mart-vue-fast");
4
4
  const tabbable = require("tabbable");
5
- const _l10n = require("./_l10n-BiiXtYiP.cjs");
5
+ const _l10n = require("./_l10n-DpwcsAC3.cjs");
6
6
  const emoji = require("./emoji-VgSjNTd5.cjs");
7
- const useTrapStackControl = require("./useTrapStackControl-BJmJdJak.cjs");
8
- const GenColors = require("./GenColors-7bkY5Nwl.cjs");
7
+ const useTrapStackControl = require("./useTrapStackControl-CTZTSUOt.cjs");
8
+ const GenColors = require("./GenColors-BnYS3bvv.cjs");
9
9
  const data = require("emoji-mart-vue-fast/data/all.json");
10
10
  const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
11
11
  const Components_NcButton = require("../Components/NcButton.cjs");
12
- const NcColorPicker = require("./NcColorPicker-T-ifFDNs.cjs");
13
- const NcPopover = require("./NcPopover-B2z7TwNr.cjs");
14
- const NcTextField = require("./NcTextField-Uk5iD8o2.cjs");
12
+ const NcColorPicker = require("./NcColorPicker-DkoxNQJS.cjs");
13
+ const NcPopover = require("./NcPopover-DH2oMHFe.cjs");
14
+ const NcTextField = require("./NcTextField-C24Y7Zzr.cjs");
15
15
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
16
16
  const data__default = /* @__PURE__ */ _interopDefault(data);
17
17
  _l10n.register(_l10n.t5, _l10n.t14, _l10n.t34, _l10n.t40);
@@ -311,4 +311,4 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
311
311
  );
312
312
  const NcEmojiPicker = __component__.exports;
313
313
  exports.NcEmojiPicker = NcEmojiPicker;
314
- //# sourceMappingURL=NcEmojiPicker-CtvRZuBW.cjs.map
314
+ //# sourceMappingURL=NcEmojiPicker-Dynz_fRD.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcEmojiPicker-CtvRZuBW.cjs","sources":["../../node_modules/vue-material-design-icons/Circle.vue","../../src/components/NcEmojiPicker/NcEmojiPicker.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon circle-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"CircleIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### General description\n\nThis component allows the user to pick an emoji.\n\n### Usage\n\n* Listen to the select event and pass in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker @select=\"select\" style=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Showing a preview and keeping it open after a user selected an emoji\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:close-on-select=\"false\"\n\t\t\t:show-preview=\"true\"\n\t\t\t@select=\"select\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Allow unselecting a previously set emoji.\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:show-preview=\"true\"\n\t\t\t:allow-unselect=\"true\"\n\t\t\t:selected-emoji=\"emoji\"\n\t\t\t@select=\"select\"\n\t\t\t@unselect=\"unselect\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t\tunselect() {\n\t\t\t\tthis.emoji = ''\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n</docs>\n\n<template>\n\t<NcPopover ref=\"popover\"\n\t\t:shown.sync=\"open\"\n\t\t:container=\"container\"\n\t\tpopup-role=\"dialog\"\n\t\tv-bind=\"$attrs\"\n\t\t:focus-trap=\"false /* Handled manually to remove emoji buttons from TAB sequence */\"\n\t\tv-on=\"$listeners\"\n\t\t@after-show=\"afterShow\"\n\t\t@after-hide=\"afterHide\">\n\t\t<template #trigger=\"slotProps\">\n\t\t\t<slot v-bind=\"slotProps\" />\n\t\t</template>\n\t\t<Picker ref=\"picker\"\n\t\t\tclass=\"nc-emoji-picker\"\n\t\t\tcolor=\"var(--color-primary-element)\"\n\t\t\t:data=\"emojiIndex\"\n\t\t\t:emoji=\"previewFallbackEmoji\"\n\t\t\t:i18n=\"i18n\"\n\t\t\t:native=\"native\"\n\t\t\t:emoji-size=\"20\"\n\t\t\t:per-line=\"8\"\n\t\t\t:picker-styles=\"{ width: '320px' }\"\n\t\t\t:show-preview=\"showPreview\"\n\t\t\t:skin=\"currentSkinTone\"\n\t\t\t:show-skin-tones=\"false\"\n\t\t\t:title=\"previewFallbackName\"\n\t\t\trole=\"dialog\"\n\t\t\taria-modal=\"true\"\n\t\t\t:aria-label=\"t('Emoji picker')\"\n\t\t\tv-bind=\"$attrs\"\n\t\t\t@keydown.native.tab.prevent=\"handleTabNavigationSkippingEmojis\"\n\t\t\t@select=\"select\">\n\t\t\t<template #searchTemplate=\"{ onSearch }\">\n\t\t\t\t<div class=\"search__wrapper\">\n\t\t\t\t\t<NcTextField ref=\"search\"\n\t\t\t\t\t\tclass=\"search\"\n\t\t\t\t\t\t:value.sync=\"search\"\n\t\t\t\t\t\t:label=\"t('Search')\"\n\t\t\t\t\t\t:label-visible=\"true\"\n\t\t\t\t\t\t:placeholder=\"i18n.search\"\n\t\t\t\t\t\ttrailing-button-icon=\"close\"\n\t\t\t\t\t\t:trailing-button-label=\"t('Clear search')\"\n\t\t\t\t\t\t:show-trailing-button=\"search !== ''\"\n\t\t\t\t\t\t@keydown.left=\"callPickerArrowHandlerWithScrollFix('onArrowLeft', $event)\"\n\t\t\t\t\t\t@keydown.right=\"callPickerArrowHandlerWithScrollFix('onArrowRight', $event)\"\n\t\t\t\t\t\t@keydown.down=\"callPickerArrowHandlerWithScrollFix('onArrowDown', $event)\"\n\t\t\t\t\t\t@keydown.up=\"callPickerArrowHandlerWithScrollFix('onArrowUp', $event)\"\n\t\t\t\t\t\t@keydown.enter=\"$refs.picker.onEnter\"\n\t\t\t\t\t\t@trailing-button-click=\"clearSearch(); onSearch('');\"\n\t\t\t\t\t\t@update:value=\"onSearch(search)\" />\n\t\t\t\t\t<NcColorPicker palette-only\n\t\t\t\t\t\t:container=\"container\"\n\t\t\t\t\t\t:palette=\"skinTonePalette\"\n\t\t\t\t\t\t:value=\"currentColor.color\"\n\t\t\t\t\t\t@update:value=\"onChangeSkinTone\">\n\t\t\t\t\t\t<NcButton :aria-label=\"t('Skin tone')\" variant=\"tertiary-no-background\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconCircle :style=\"{ color: currentColor.color }\" :title=\"currentColor.name\" :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</NcColorPicker>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t\t<template v-if=\"allowUnselect && selectedEmoji\" #customCategory>\n\t\t\t\t<div class=\"emoji-mart-category-label\">\n\t\t\t\t\t<h3 class=\"emoji-mart-category-label\">\n\t\t\t\t\t\t{{ t('Selected') }}\n\t\t\t\t\t</h3>\n\t\t\t\t</div>\n\t\t\t\t<Emoji class=\"emoji-selected\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\t:emoji=\"selectedEmoji\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"32\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t\t<Emoji class=\"emoji-delete\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\temoji=\":x:\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"10\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t</template>\n\t\t</Picker>\n\t</NcPopover>\n</template>\n\n<script>\nimport { Picker, Emoji, EmojiIndex } from 'emoji-mart-vue-fast'\nimport { isFocusable } from 'tabbable'\nimport { t } from '../../l10n.js'\nimport { getCurrentSkinTone, setCurrentSkinTone } from '../../functions/emoji/emoji.ts'\nimport { useTrapStackControl } from '../../composables/useTrapStackControl.ts'\nimport { Color } from '../../utils/GenColors.js'\n\nimport data from 'emoji-mart-vue-fast/data/all.json'\nimport IconCircle from 'vue-material-design-icons/Circle.vue'\nimport NcButton from '../NcButton/index.js'\nimport NcColorPicker from '../NcColorPicker/NcColorPicker.vue'\nimport NcPopover from '../NcPopover/index.js'\nimport NcTextField from '../NcTextField/index.js'\n\n// Shared emoji index and skinTone for all NcEmojiPicker instances\n// Will be initialized on the first NcEmojiPicker creating\nlet emojiIndex\n\nconst i18n = {\n\tsearch: t('Search emoji'),\n\tnotfound: t('No emoji found'),\n\tcategories: {\n\t\tsearch: t('Search results'),\n\t\trecent: t('Frequently used'),\n\t\tsmileys: t('Smileys & Emotion'),\n\t\tpeople: t('People & Body'),\n\t\tnature: t('Animals & Nature'),\n\t\tfoods: t('Food & Drink'),\n\t\tactivity: t('Activities'),\n\t\tplaces: t('Travel & Places'),\n\t\tobjects: t('Objects'),\n\t\tsymbols: t('Symbols'),\n\t\tflags: t('Flags'),\n\t\tcustom: t('Custom'),\n\t},\n}\n\nconst skinTonePalette = [\n\tnew Color(255, 222, 52, t('Neutral skin color')),\n\tnew Color(228, 205, 166, t('Light skin tone')),\n\tnew Color(250, 221, 192, t('Medium light skin tone')),\n\tnew Color(174, 129, 87, t('Medium skin tone')),\n\tnew Color(158, 113, 88, t('Medium dark skin tone')),\n\tnew Color(96, 79, 69, t('Dark skin tone')),\n]\n\nexport default {\n\tname: 'NcEmojiPicker',\n\n\tcomponents: {\n\t\tEmoji,\n\t\tIconCircle,\n\t\tNcButton,\n\t\tNcColorPicker,\n\t\tNcPopover,\n\t\tNcTextField,\n\t\tPicker,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The emoji-set\n\t\t */\n\t\tactiveSet: {\n\t\t\ttype: String,\n\t\t\tdefault: 'native',\n\t\t},\n\t\t/**\n\t\t * Show preview section when hovering emoji\n\t\t */\n\t\tshowPreview: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Allow unselecting the selected emoji\n\t\t */\n\t\tallowUnselect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Selected emoji to allow unselecting\n\t\t */\n\t\tselectedEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The fallback emoji in the preview section\n\t\t */\n\t\tpreviewFallbackEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: 'grinning',\n\t\t},\n\t\t/**\n\t\t * The fallback text in the preview section\n\t\t */\n\t\tpreviewFallbackName: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Pick an emoji'),\n\t\t},\n\t\t/**\n\t\t * Whether to close the emoji picker after picking one\n\t\t */\n\t\tcloseOnSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Selector for the popover container\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: [String, Object, Element, Boolean],\n\t\t\tdefault: 'body',\n\t\t},\n\t},\n\temits: [\n\t\t'select',\n\t\t'select-data',\n\t\t'unselect',\n\t],\n\n\tsetup() {\n\t\t// If this is the first instance of NcEmojiPicker - setup EmojiIndex\n\t\tif (!emojiIndex) {\n\t\t\temojiIndex = new EmojiIndex(data)\n\t\t}\n\n\t\treturn {\n\t\t\t// Non-reactive constants\n\t\t\temojiIndex,\n\t\t\tskinTonePalette,\n\t\t\ti18n,\n\t\t}\n\t},\n\n\tdata() {\n\t\tconst currentSkinTone = getCurrentSkinTone()\n\n\t\treturn {\n\t\t\t/**\n\t\t\t * The current active color from the skin tone palette\n\t\t\t */\n\t\t\tcurrentColor: skinTonePalette[currentSkinTone - 1],\n\t\t\t/**\n\t\t\t * The current active skin tone\n\t\t\t * @type {1|2|3|4|5|6}\n\t\t\t */\n\t\t\tcurrentSkinTone,\n\t\t\tsearch: '',\n\t\t\topen: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tnative() {\n\t\t\treturn this.activeSet === 'native'\n\t\t},\n\t},\n\n\tcreated() {\n\t\t// Component has its own custom focus management\n\t\t// The global focus trap stack should be paused\n\t\tuseTrapStackControl(() => this.open)\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\tclearSearch() {\n\t\t\tthis.search = ''\n\t\t\tthis.$refs.search.focus()\n\t\t},\n\n\t\t/**\n\t\t * Update the current skin tone by the result of the color picker\n\t\t * @param {string} color Color set\n\t\t */\n\t\tonChangeSkinTone(color) {\n\t\t\tconst index = this.skinTonePalette.findIndex((tone) => tone.color.toLowerCase() === color.toLowerCase())\n\t\t\tif (index > -1) {\n\t\t\t\tthis.currentSkinTone = index + 1\n\t\t\t\tthis.currentColor = this.skinTonePalette[index]\n\t\t\t\tsetCurrentSkinTone(this.currentSkinTone)\n\t\t\t}\n\t\t},\n\n\t\tselect(emojiObject) {\n\t\t\t/**\n\t\t\t * Emits a string containing the emoji e.g. '👩🏿‍💻'\n\t\t\t */\n\t\t\tthis.$emit('select', emojiObject.native)\n\n\t\t\t/**\n\t\t\t * Emits a object with more data about the picked emoji\n\t\t\t */\n\t\t\tthis.$emit('select-data', emojiObject)\n\n\t\t\tif (this.closeOnSelect) {\n\t\t\t\tthis.open = false\n\t\t\t}\n\t\t},\n\n\t\tunselect() {\n\t\t\tthis.$emit('unselect')\n\t\t},\n\n\t\tafterShow() {\n\t\t\tthis.$refs.search.focus()\n\t\t},\n\n\t\tafterHide() {\n\t\t\t// Manually return focus to the trigger button, as we disabled focus-trap\n\t\t\t// But only if there is no focus target outside the picker, for example, input element that received focus by click closing the emoji picker\n\t\t\tif (!document.activeElement || this.$refs.picker.$el.contains(document.activeElement) || !isFocusable(document.activeElement)) {\n\t\t\t\tthis.$refs.popover.$el.querySelector('button, [role=\"button\"]')?.focus()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Manually handle Tab navigation skipping emoji buttons.\n\t\t * Navigation over emojis is handled by Arrow keys.\n\t\t * @param {KeyboardEvent} event - Keyboard event\n\t\t */\n\t\thandleTabNavigationSkippingEmojis(event) {\n\t\t\tconst current = event.target\n\t\t\tconst focusable = Array.from(this.$refs.picker.$el.querySelectorAll('button:not(.emoji-mart-emoji), input'))\n\t\t\tif (!event.shiftKey) {\n\t\t\t\tconst nextNode = focusable.find((node) => current.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_FOLLOWING) || focusable[0]\n\t\t\t\tnextNode.focus()\n\t\t\t} else {\n\t\t\t\tconst prevNode = focusable.findLast((node) => current.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_PRECEDING) || focusable.at(-1)\n\t\t\t\tprevNode.focus()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Handle arrow navigation via <Picker>'s handlers with scroll bug fix\n\t\t * @param {'onArrowLeft' | 'onArrowRight' | 'onArrowDown' | 'onArrowUp'} originalHandlerName - Picker's arrow keydown handler name\n\t\t * @param {KeyboardEvent} event - Keyboard event\n\t\t */\n\t\tasync callPickerArrowHandlerWithScrollFix(originalHandlerName, event) {\n\t\t\t// Call the original handler\n\t\t\t// See: https://github.com/serebrov/emoji-mart-vue/blob/a1ea72673a111cce78dc8caad8bc9ea3e02ad5bd/src/components/Picker.vue#L29\n\t\t\t// TODO: expose these methods via slot props in upstream library\n\t\t\tthis.$refs.picker[originalHandlerName](event)\n\n\t\t\t// Wait until emoji-mart-vue-fast scrolls\n\t\t\tawait this.$nextTick()\n\n\t\t\t// Scroll position is incorrect after emoji-mart-vue-fast scrolls...\n\t\t\t// It calculates scroll incorrectly.\n\t\t\t// It doesn't take into account, that emojis are wrapped into categories sections\n\t\t\t// See: https://github.com/serebrov/emoji-mart-vue/blob/a1ea72673a111cce78dc8caad8bc9ea3e02ad5bd/src/utils/picker.js#L244\n\t\t\t// Now scroll to the correct position\n\t\t\t// TODO: fix in upstream\n\t\t\tconst selectedEmoji = this.$refs.picker.$el.querySelector('.emoji-mart-emoji-selected')\n\t\t\tselectedEmoji?.scrollIntoView({\n\t\t\t\tblock: 'center',\n\t\t\t\tinline: 'center',\n\t\t\t})\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n@import 'emoji-mart-vue-fast/css/emoji-mart.css';\n\n.nc-emoji-picker.emoji-mart {\n\tbackground-color: var(--color-main-background) !important;\n\tborder: 0;\n\tcolor: var(--color-main-text) !important;\n\n\t// Reset emoji-mart styles\n\tbutton {\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\tfont-size: inherit;\n\t}\n\n\t.emoji-mart-bar,\n\t.emoji-mart-anchors,\n\t.emoji-mart-search,\n\t.emoji-mart-search input,\n\t.emoji-mart-category,\n\t.emoji-mart-category-label,\n\t.emoji-mart-category-label span,\n\t.emoji-mart-skin-swatches {\n\t\tbackground-color: transparent !important;\n\t\tborder-color: var(--color-border) !important;\n\t\tcolor: inherit !important;\n\t}\n\n\t.emoji-mart-anchors {\n\t\tpadding-block: 0;\n\t\tpadding-inline: calc(2 * var(--default-grid-baseline));\n\t}\n\n\t.emoji-mart-anchor {\n\t\tborder-radius: 0;\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\t\theight: var(--clickable-area-small);\n\t\tmin-width: var(--clickable-area-small);\n\n\t\t&:hover {\n\t\t\tbackground-color: var(--color-background-hover);\n\t\t}\n\n\t\t&:focus-visible {\n\t\t\toutline: 2px solid var(--color-primary-element) !important;\n\t\t\toutline-offset: -2px;\n\t\t}\n\n\t\t// Icon\n\t\tdiv {\n\t\t\tdisplay: grid;\n\t\t\tplace-content: center;\n\t\t}\n\t}\n\n\t.emoji-mart-scroll {\n\t\tpadding-inline: calc(2 * var(--default-grid-baseline));\n\t\tpadding-block: 0 calc(2 * var(--default-grid-baseline));\n\t}\n\n\t.emoji-mart-category {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(8, 1fr);\n\t\tjustify-items: stretch;\n\n\t\t&.emoji-mart-no-results {\n\t\t\tgrid-template-columns: 1fr;\n\t\t\tfont-size: inherit;\n\t\t\tcolor: var(--color-text-maxcontrast) !important;\n\t\t}\n\t}\n\n\t/* Label element in the section grid */\n\tdiv.emoji-mart-category-label {\n\t\tgrid-column: span 8;\n\t\tjustify-self: stretch;\n\t}\n\n\t/* An actual heading inside the element */\n\th3.emoji-mart-category-label {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\t// Inline with buttons\n\t\theight: var(--default-clickable-area);\n\t\tmargin: 0;\n\t\t// Inline with input\n\t\tpadding-inline: calc(2 * var(--default-grid-baseline));\n\t\tpadding-block: 0;\n\t\tuser-select: none;\n\t}\n\n\t.emoji-mart-emoji {\n\t\taspect-ratio: 1 / 1;\n\t\ttext-align: center;\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\n\t\t&:hover,\n\t\t&:focus-visible,\n\t\t&.emoji-mart-emoji-selected {\n\t\t\tbackground-color: var(--color-background-hover) !important;\n\t\t\tborder: none;\n\t\t\tborder-radius: var(--border-radius-element, var(--border-radius-pill));\n\t\t\tbox-shadow: none !important;\n\t\t\toutline: 2px solid var(--color-primary-element) !important;\n\t\t\toutline-offset: -2px;\n\t\t}\n\n\t\t&::before {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\tspan {\n\t\t\tcursor: pointer;\n\t\t}\n\t}\n}\n</style>\n\n<style scoped lang=\"scss\">\n.search__wrapper {\n\tdisplay: flex;\n\tflex-direction: row;\n\tgap: var(--default-grid-baseline);\n\talign-items: end;\n\tpadding-block: var(--default-grid-baseline);\n\tpadding-inline: calc(2 * var(--default-grid-baseline));\n}\n\n.row-selected {\n\tbutton, span {\n\t\tvertical-align: middle;\n\t}\n}\n\n.emoji-delete {\n\tvertical-align: top;\n\tmargin-left: -21px;\n\tmargin-top: -3px;\n}\n</style>\n"],"names":["_sfc_main","t","Color","Emoji","NcButton","NcColorPicker","NcPopover","NcTextField","Picker","EmojiIndex","data","getCurrentSkinTone","useTrapStackControl","setCurrentSkinTone","isFocusable"],"mappings":";;;;;;;;;;;;;;;;AAoBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;ACgLA,IAAA;AAEA,MAAA,OAAA;AAAA,EACA,QAAAC,MAAA,EAAA,cAAA;AAAA,EACA,UAAAA,MAAA,EAAA,gBAAA;AAAA,EACA,YAAA;AAAA,IACA,QAAAA,MAAA,EAAA,gBAAA;AAAA,IACA,QAAAA,MAAA,EAAA,iBAAA;AAAA,IACA,SAAAA,MAAA,EAAA,mBAAA;AAAA,IACA,QAAAA,MAAA,EAAA,eAAA;AAAA,IACA,QAAAA,MAAA,EAAA,kBAAA;AAAA,IACA,OAAAA,MAAA,EAAA,cAAA;AAAA,IACA,UAAAA,MAAA,EAAA,YAAA;AAAA,IACA,QAAAA,MAAA,EAAA,iBAAA;AAAA,IACA,SAAAA,MAAA,EAAA,SAAA;AAAA,IACA,SAAAA,MAAA,EAAA,SAAA;AAAA,IACA,OAAAA,MAAA,EAAA,OAAA;AAAA,IACA,QAAAA,MAAA,EAAA,QAAA;AAAA,EACA;AACA;AAEA,MAAA,kBAAA;AAAA,EACA,IAAAC,UAAAA,MAAA,KAAA,KAAA,IAAAD,MAAAA,EAAA,oBAAA,CAAA;AAAA,EACA,IAAAC,UAAAA,MAAA,KAAA,KAAA,KAAAD,MAAAA,EAAA,iBAAA,CAAA;AAAA,EACA,IAAAC,UAAAA,MAAA,KAAA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AA,IAEA,YAAA;AAGA,UAAA,CAAA,SAAA,iBAAA,KAAA,MAAA,OAAA,IAAA,SAAA,SAAA,aAAA,KAAA,CAAAC,SAAA,YAAA,SAAA,aAAA,GAAA;AACA,aAAA,MAAA,QAAA,IAAA,cAAA,yBAAA,GAAA,MAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,kCAAA,OAAA;AACA,YAAA,UAAA,MAAA;AACA,YAAA,YAAA,MAAA,KAAA,KAAA,MAAA,OAAA,IAAA,iBAAA,sCAAA,CAAA;AACA,UAAA,CAAA,MAAA,UAAA;AACA,cAAA,WAAA,UAAA,KAAA,CAAA,SAAA,QAAA,wBAAA,IAAA,IAAA,KAAA,2BAAA,KAAA,UAAA,CAAA;AACA,iBAAA,MAAA;AAAA,MACA,OAAA;AACA,cAAA,WAAA,UAAA,SAAA,CAAA,SAAA,QAAA,wBAAA,IAAA,IAAA,KAAA,2BAAA,KAAA,UAAA,GAAA,EAAA;AACA,iBAAA,MAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA,oCAAA,qBAAA,OAAA;AAIA,WAAA,MAAA,OAAA,mBAAA,EAAA,KAAA;AAGA,YAAA,KAAA,UAAA;AAQA,YAAA,gBAAA,KAAA,MAAA,OAAA,IAAA,cAAA,4BAAA;AACA,qBAAA,eAAA;AAAA,QACA,OAAA;AAAA,QACA,QAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"NcEmojiPicker-Dynz_fRD.cjs","sources":["../../node_modules/vue-material-design-icons/Circle.vue","../../src/components/NcEmojiPicker/NcEmojiPicker.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon circle-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"CircleIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### General description\n\nThis component allows the user to pick an emoji.\n\n### Usage\n\n* Listen to the select event and pass in an HTML element that will be treated as a trigger:\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker @select=\"select\" style=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Showing a preview and keeping it open after a user selected an emoji\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:close-on-select=\"false\"\n\t\t\t:show-preview=\"true\"\n\t\t\t@select=\"select\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n* Allow unselecting a previously set emoji.\n\n```vue\n<template>\n\t<div>\n\t\t<NcEmojiPicker\n\t\t\t:show-preview=\"true\"\n\t\t\t:allow-unselect=\"true\"\n\t\t\t:selected-emoji=\"emoji\"\n\t\t\t@select=\"select\"\n\t\t\t@unselect=\"unselect\"\n\t\t\tstyle=\"display: inline-block\">\n\t\t\t<NcButton> Click Me </NcButton>\n\t\t</NcEmojiPicker>\n\t\t<span>selected emoji: {{ emoji }}</span>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\temoji: '',\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\tselect(emoji) {\n\t\t\t\tthis.emoji = emoji\n\t\t\t},\n\t\t\tunselect() {\n\t\t\t\tthis.emoji = ''\n\t\t\t},\n\t\t},\n\t}\n</script>\n```\n\n</docs>\n\n<template>\n\t<NcPopover ref=\"popover\"\n\t\t:shown.sync=\"open\"\n\t\t:container=\"container\"\n\t\tpopup-role=\"dialog\"\n\t\tv-bind=\"$attrs\"\n\t\t:focus-trap=\"false /* Handled manually to remove emoji buttons from TAB sequence */\"\n\t\tv-on=\"$listeners\"\n\t\t@after-show=\"afterShow\"\n\t\t@after-hide=\"afterHide\">\n\t\t<template #trigger=\"slotProps\">\n\t\t\t<slot v-bind=\"slotProps\" />\n\t\t</template>\n\t\t<Picker ref=\"picker\"\n\t\t\tclass=\"nc-emoji-picker\"\n\t\t\tcolor=\"var(--color-primary-element)\"\n\t\t\t:data=\"emojiIndex\"\n\t\t\t:emoji=\"previewFallbackEmoji\"\n\t\t\t:i18n=\"i18n\"\n\t\t\t:native=\"native\"\n\t\t\t:emoji-size=\"20\"\n\t\t\t:per-line=\"8\"\n\t\t\t:picker-styles=\"{ width: '320px' }\"\n\t\t\t:show-preview=\"showPreview\"\n\t\t\t:skin=\"currentSkinTone\"\n\t\t\t:show-skin-tones=\"false\"\n\t\t\t:title=\"previewFallbackName\"\n\t\t\trole=\"dialog\"\n\t\t\taria-modal=\"true\"\n\t\t\t:aria-label=\"t('Emoji picker')\"\n\t\t\tv-bind=\"$attrs\"\n\t\t\t@keydown.native.tab.prevent=\"handleTabNavigationSkippingEmojis\"\n\t\t\t@select=\"select\">\n\t\t\t<template #searchTemplate=\"{ onSearch }\">\n\t\t\t\t<div class=\"search__wrapper\">\n\t\t\t\t\t<NcTextField ref=\"search\"\n\t\t\t\t\t\tclass=\"search\"\n\t\t\t\t\t\t:value.sync=\"search\"\n\t\t\t\t\t\t:label=\"t('Search')\"\n\t\t\t\t\t\t:label-visible=\"true\"\n\t\t\t\t\t\t:placeholder=\"i18n.search\"\n\t\t\t\t\t\ttrailing-button-icon=\"close\"\n\t\t\t\t\t\t:trailing-button-label=\"t('Clear search')\"\n\t\t\t\t\t\t:show-trailing-button=\"search !== ''\"\n\t\t\t\t\t\t@keydown.left=\"callPickerArrowHandlerWithScrollFix('onArrowLeft', $event)\"\n\t\t\t\t\t\t@keydown.right=\"callPickerArrowHandlerWithScrollFix('onArrowRight', $event)\"\n\t\t\t\t\t\t@keydown.down=\"callPickerArrowHandlerWithScrollFix('onArrowDown', $event)\"\n\t\t\t\t\t\t@keydown.up=\"callPickerArrowHandlerWithScrollFix('onArrowUp', $event)\"\n\t\t\t\t\t\t@keydown.enter=\"$refs.picker.onEnter\"\n\t\t\t\t\t\t@trailing-button-click=\"clearSearch(); onSearch('');\"\n\t\t\t\t\t\t@update:value=\"onSearch(search)\" />\n\t\t\t\t\t<NcColorPicker palette-only\n\t\t\t\t\t\t:container=\"container\"\n\t\t\t\t\t\t:palette=\"skinTonePalette\"\n\t\t\t\t\t\t:value=\"currentColor.color\"\n\t\t\t\t\t\t@update:value=\"onChangeSkinTone\">\n\t\t\t\t\t\t<NcButton :aria-label=\"t('Skin tone')\" variant=\"tertiary-no-background\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconCircle :style=\"{ color: currentColor.color }\" :title=\"currentColor.name\" :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t</NcColorPicker>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t\t<template v-if=\"allowUnselect && selectedEmoji\" #customCategory>\n\t\t\t\t<div class=\"emoji-mart-category-label\">\n\t\t\t\t\t<h3 class=\"emoji-mart-category-label\">\n\t\t\t\t\t\t{{ t('Selected') }}\n\t\t\t\t\t</h3>\n\t\t\t\t</div>\n\t\t\t\t<Emoji class=\"emoji-selected\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\t:emoji=\"selectedEmoji\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"32\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t\t<Emoji class=\"emoji-delete\"\n\t\t\t\t\t:data=\"emojiIndex\"\n\t\t\t\t\temoji=\":x:\"\n\t\t\t\t\t:native=\"true\"\n\t\t\t\t\t:size=\"10\"\n\t\t\t\t\t@click=\"unselect\" />\n\t\t\t</template>\n\t\t</Picker>\n\t</NcPopover>\n</template>\n\n<script>\nimport { Picker, Emoji, EmojiIndex } from 'emoji-mart-vue-fast'\nimport { isFocusable } from 'tabbable'\nimport { t } from '../../l10n.js'\nimport { getCurrentSkinTone, setCurrentSkinTone } from '../../functions/emoji/emoji.ts'\nimport { useTrapStackControl } from '../../composables/useTrapStackControl.ts'\nimport { Color } from '../../utils/GenColors.js'\n\nimport data from 'emoji-mart-vue-fast/data/all.json'\nimport IconCircle from 'vue-material-design-icons/Circle.vue'\nimport NcButton from '../NcButton/index.js'\nimport NcColorPicker from '../NcColorPicker/NcColorPicker.vue'\nimport NcPopover from '../NcPopover/index.js'\nimport NcTextField from '../NcTextField/index.js'\n\n// Shared emoji index and skinTone for all NcEmojiPicker instances\n// Will be initialized on the first NcEmojiPicker creating\nlet emojiIndex\n\nconst i18n = {\n\tsearch: t('Search emoji'),\n\tnotfound: t('No emoji found'),\n\tcategories: {\n\t\tsearch: t('Search results'),\n\t\trecent: t('Frequently used'),\n\t\tsmileys: t('Smileys & Emotion'),\n\t\tpeople: t('People & Body'),\n\t\tnature: t('Animals & Nature'),\n\t\tfoods: t('Food & Drink'),\n\t\tactivity: t('Activities'),\n\t\tplaces: t('Travel & Places'),\n\t\tobjects: t('Objects'),\n\t\tsymbols: t('Symbols'),\n\t\tflags: t('Flags'),\n\t\tcustom: t('Custom'),\n\t},\n}\n\nconst skinTonePalette = [\n\tnew Color(255, 222, 52, t('Neutral skin color')),\n\tnew Color(228, 205, 166, t('Light skin tone')),\n\tnew Color(250, 221, 192, t('Medium light skin tone')),\n\tnew Color(174, 129, 87, t('Medium skin tone')),\n\tnew Color(158, 113, 88, t('Medium dark skin tone')),\n\tnew Color(96, 79, 69, t('Dark skin tone')),\n]\n\nexport default {\n\tname: 'NcEmojiPicker',\n\n\tcomponents: {\n\t\tEmoji,\n\t\tIconCircle,\n\t\tNcButton,\n\t\tNcColorPicker,\n\t\tNcPopover,\n\t\tNcTextField,\n\t\tPicker,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The emoji-set\n\t\t */\n\t\tactiveSet: {\n\t\t\ttype: String,\n\t\t\tdefault: 'native',\n\t\t},\n\t\t/**\n\t\t * Show preview section when hovering emoji\n\t\t */\n\t\tshowPreview: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Allow unselecting the selected emoji\n\t\t */\n\t\tallowUnselect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Selected emoji to allow unselecting\n\t\t */\n\t\tselectedEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * The fallback emoji in the preview section\n\t\t */\n\t\tpreviewFallbackEmoji: {\n\t\t\ttype: String,\n\t\t\tdefault: 'grinning',\n\t\t},\n\t\t/**\n\t\t * The fallback text in the preview section\n\t\t */\n\t\tpreviewFallbackName: {\n\t\t\ttype: String,\n\t\t\tdefault: t('Pick an emoji'),\n\t\t},\n\t\t/**\n\t\t * Whether to close the emoji picker after picking one\n\t\t */\n\t\tcloseOnSelect: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Selector for the popover container\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: [String, Object, Element, Boolean],\n\t\t\tdefault: 'body',\n\t\t},\n\t},\n\temits: [\n\t\t'select',\n\t\t'select-data',\n\t\t'unselect',\n\t],\n\n\tsetup() {\n\t\t// If this is the first instance of NcEmojiPicker - setup EmojiIndex\n\t\tif (!emojiIndex) {\n\t\t\temojiIndex = new EmojiIndex(data)\n\t\t}\n\n\t\treturn {\n\t\t\t// Non-reactive constants\n\t\t\temojiIndex,\n\t\t\tskinTonePalette,\n\t\t\ti18n,\n\t\t}\n\t},\n\n\tdata() {\n\t\tconst currentSkinTone = getCurrentSkinTone()\n\n\t\treturn {\n\t\t\t/**\n\t\t\t * The current active color from the skin tone palette\n\t\t\t */\n\t\t\tcurrentColor: skinTonePalette[currentSkinTone - 1],\n\t\t\t/**\n\t\t\t * The current active skin tone\n\t\t\t * @type {1|2|3|4|5|6}\n\t\t\t */\n\t\t\tcurrentSkinTone,\n\t\t\tsearch: '',\n\t\t\topen: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tnative() {\n\t\t\treturn this.activeSet === 'native'\n\t\t},\n\t},\n\n\tcreated() {\n\t\t// Component has its own custom focus management\n\t\t// The global focus trap stack should be paused\n\t\tuseTrapStackControl(() => this.open)\n\t},\n\n\tmethods: {\n\t\tt,\n\n\t\tclearSearch() {\n\t\t\tthis.search = ''\n\t\t\tthis.$refs.search.focus()\n\t\t},\n\n\t\t/**\n\t\t * Update the current skin tone by the result of the color picker\n\t\t * @param {string} color Color set\n\t\t */\n\t\tonChangeSkinTone(color) {\n\t\t\tconst index = this.skinTonePalette.findIndex((tone) => tone.color.toLowerCase() === color.toLowerCase())\n\t\t\tif (index > -1) {\n\t\t\t\tthis.currentSkinTone = index + 1\n\t\t\t\tthis.currentColor = this.skinTonePalette[index]\n\t\t\t\tsetCurrentSkinTone(this.currentSkinTone)\n\t\t\t}\n\t\t},\n\n\t\tselect(emojiObject) {\n\t\t\t/**\n\t\t\t * Emits a string containing the emoji e.g. '👩🏿‍💻'\n\t\t\t */\n\t\t\tthis.$emit('select', emojiObject.native)\n\n\t\t\t/**\n\t\t\t * Emits a object with more data about the picked emoji\n\t\t\t */\n\t\t\tthis.$emit('select-data', emojiObject)\n\n\t\t\tif (this.closeOnSelect) {\n\t\t\t\tthis.open = false\n\t\t\t}\n\t\t},\n\n\t\tunselect() {\n\t\t\tthis.$emit('unselect')\n\t\t},\n\n\t\tafterShow() {\n\t\t\tthis.$refs.search.focus()\n\t\t},\n\n\t\tafterHide() {\n\t\t\t// Manually return focus to the trigger button, as we disabled focus-trap\n\t\t\t// But only if there is no focus target outside the picker, for example, input element that received focus by click closing the emoji picker\n\t\t\tif (!document.activeElement || this.$refs.picker.$el.contains(document.activeElement) || !isFocusable(document.activeElement)) {\n\t\t\t\tthis.$refs.popover.$el.querySelector('button, [role=\"button\"]')?.focus()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Manually handle Tab navigation skipping emoji buttons.\n\t\t * Navigation over emojis is handled by Arrow keys.\n\t\t * @param {KeyboardEvent} event - Keyboard event\n\t\t */\n\t\thandleTabNavigationSkippingEmojis(event) {\n\t\t\tconst current = event.target\n\t\t\tconst focusable = Array.from(this.$refs.picker.$el.querySelectorAll('button:not(.emoji-mart-emoji), input'))\n\t\t\tif (!event.shiftKey) {\n\t\t\t\tconst nextNode = focusable.find((node) => current.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_FOLLOWING) || focusable[0]\n\t\t\t\tnextNode.focus()\n\t\t\t} else {\n\t\t\t\tconst prevNode = focusable.findLast((node) => current.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_PRECEDING) || focusable.at(-1)\n\t\t\t\tprevNode.focus()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Handle arrow navigation via <Picker>'s handlers with scroll bug fix\n\t\t * @param {'onArrowLeft' | 'onArrowRight' | 'onArrowDown' | 'onArrowUp'} originalHandlerName - Picker's arrow keydown handler name\n\t\t * @param {KeyboardEvent} event - Keyboard event\n\t\t */\n\t\tasync callPickerArrowHandlerWithScrollFix(originalHandlerName, event) {\n\t\t\t// Call the original handler\n\t\t\t// See: https://github.com/serebrov/emoji-mart-vue/blob/a1ea72673a111cce78dc8caad8bc9ea3e02ad5bd/src/components/Picker.vue#L29\n\t\t\t// TODO: expose these methods via slot props in upstream library\n\t\t\tthis.$refs.picker[originalHandlerName](event)\n\n\t\t\t// Wait until emoji-mart-vue-fast scrolls\n\t\t\tawait this.$nextTick()\n\n\t\t\t// Scroll position is incorrect after emoji-mart-vue-fast scrolls...\n\t\t\t// It calculates scroll incorrectly.\n\t\t\t// It doesn't take into account, that emojis are wrapped into categories sections\n\t\t\t// See: https://github.com/serebrov/emoji-mart-vue/blob/a1ea72673a111cce78dc8caad8bc9ea3e02ad5bd/src/utils/picker.js#L244\n\t\t\t// Now scroll to the correct position\n\t\t\t// TODO: fix in upstream\n\t\t\tconst selectedEmoji = this.$refs.picker.$el.querySelector('.emoji-mart-emoji-selected')\n\t\t\tselectedEmoji?.scrollIntoView({\n\t\t\t\tblock: 'center',\n\t\t\t\tinline: 'center',\n\t\t\t})\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n@import 'emoji-mart-vue-fast/css/emoji-mart.css';\n\n.nc-emoji-picker.emoji-mart {\n\tbackground-color: var(--color-main-background) !important;\n\tborder: 0;\n\tcolor: var(--color-main-text) !important;\n\n\t// Reset emoji-mart styles\n\tbutton {\n\t\tborder: none;\n\t\tbackground: transparent;\n\t\tfont-size: inherit;\n\t}\n\n\t.emoji-mart-bar,\n\t.emoji-mart-anchors,\n\t.emoji-mart-search,\n\t.emoji-mart-search input,\n\t.emoji-mart-category,\n\t.emoji-mart-category-label,\n\t.emoji-mart-category-label span,\n\t.emoji-mart-skin-swatches {\n\t\tbackground-color: transparent !important;\n\t\tborder-color: var(--color-border) !important;\n\t\tcolor: inherit !important;\n\t}\n\n\t.emoji-mart-anchors {\n\t\tpadding-block: 0;\n\t\tpadding-inline: calc(2 * var(--default-grid-baseline));\n\t}\n\n\t.emoji-mart-anchor {\n\t\tborder-radius: 0;\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\t\theight: var(--clickable-area-small);\n\t\tmin-width: var(--clickable-area-small);\n\n\t\t&:hover {\n\t\t\tbackground-color: var(--color-background-hover);\n\t\t}\n\n\t\t&:focus-visible {\n\t\t\toutline: 2px solid var(--color-primary-element) !important;\n\t\t\toutline-offset: -2px;\n\t\t}\n\n\t\t// Icon\n\t\tdiv {\n\t\t\tdisplay: grid;\n\t\t\tplace-content: center;\n\t\t}\n\t}\n\n\t.emoji-mart-scroll {\n\t\tpadding-inline: calc(2 * var(--default-grid-baseline));\n\t\tpadding-block: 0 calc(2 * var(--default-grid-baseline));\n\t}\n\n\t.emoji-mart-category {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: repeat(8, 1fr);\n\t\tjustify-items: stretch;\n\n\t\t&.emoji-mart-no-results {\n\t\t\tgrid-template-columns: 1fr;\n\t\t\tfont-size: inherit;\n\t\t\tcolor: var(--color-text-maxcontrast) !important;\n\t\t}\n\t}\n\n\t/* Label element in the section grid */\n\tdiv.emoji-mart-category-label {\n\t\tgrid-column: span 8;\n\t\tjustify-self: stretch;\n\t}\n\n\t/* An actual heading inside the element */\n\th3.emoji-mart-category-label {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\t// Inline with buttons\n\t\theight: var(--default-clickable-area);\n\t\tmargin: 0;\n\t\t// Inline with input\n\t\tpadding-inline: calc(2 * var(--default-grid-baseline));\n\t\tpadding-block: 0;\n\t\tuser-select: none;\n\t}\n\n\t.emoji-mart-emoji {\n\t\taspect-ratio: 1 / 1;\n\t\ttext-align: center;\n\t\tmargin: 0 !important;\n\t\tpadding: 0 !important;\n\n\t\t&:hover,\n\t\t&:focus-visible,\n\t\t&.emoji-mart-emoji-selected {\n\t\t\tbackground-color: var(--color-background-hover) !important;\n\t\t\tborder: none;\n\t\t\tborder-radius: var(--border-radius-element, var(--border-radius-pill));\n\t\t\tbox-shadow: none !important;\n\t\t\toutline: 2px solid var(--color-primary-element) !important;\n\t\t\toutline-offset: -2px;\n\t\t}\n\n\t\t&::before {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\tspan {\n\t\t\tcursor: pointer;\n\t\t}\n\t}\n}\n</style>\n\n<style scoped lang=\"scss\">\n.search__wrapper {\n\tdisplay: flex;\n\tflex-direction: row;\n\tgap: var(--default-grid-baseline);\n\talign-items: end;\n\tpadding-block: var(--default-grid-baseline);\n\tpadding-inline: calc(2 * var(--default-grid-baseline));\n}\n\n.row-selected {\n\tbutton, span {\n\t\tvertical-align: middle;\n\t}\n}\n\n.emoji-delete {\n\tvertical-align: top;\n\tmargin-left: -21px;\n\tmargin-top: -3px;\n}\n</style>\n"],"names":["_sfc_main","t","Color","Emoji","NcButton","NcColorPicker","NcPopover","NcTextField","Picker","EmojiIndex","data","getCurrentSkinTone","useTrapStackControl","setCurrentSkinTone","isFocusable"],"mappings":";;;;;;;;;;;;;;;;AAoBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;ACgLA,IAAA;AAEA,MAAA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AA,UAAA,CAAA;AACA,iBAAA,MAAA;AAAA,MACA,OAAA;AACA,cAAA,WAAA,UAAA,SAAA,CAAA,SAAA,QAAA,wBAAA,IAAA,IAAA,KAAA,2BAAA,KAAA,UAAA,GAAA,EAAA;AACA,iBAAA,MAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA,oCAAA,qBAAA,OAAA;AAIA,WAAA,MAAA,OAAA,mBAAA,EAAA,KAAA;AAGA,YAAA,KAAA,UAAA;AAQA,YAAA,gBAAA,KAAA,MAAA,OAAA,IAAA,cAAA,4BAAA;AACA,qBAAA,eAAA;AAAA,QACA,OAAA;AAAA,QACA,QAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
@@ -1,12 +1,14 @@
1
- import '../assets/NcMentionBubble-CB5c5ue2.css';
2
- import '../assets/NcHeaderMenu-DN-HfTkh.css';
1
+ import '../assets/NcMentionBubble-UsTMm5VD.css';
2
+ import '../assets/NcHeaderMenu-Dp_vJKTP.css';
3
3
  import { vOnClickOutside } from "@vueuse/components";
4
4
  import { createFocusTrap } from "focus-trap";
5
5
  import { G as GenRandomId } from "./GenRandomId-CMooMQt0.mjs";
6
6
  import clickOutsideOptions from "../Mixins/clickOutsideOptions.mjs";
7
7
  import "../Composables/useIsFullscreen.mjs";
8
8
  import "../Composables/useIsMobile.mjs";
9
+ import "../Composables/useIsDarkTheme.mjs";
9
10
  import "@nextcloud/router";
11
+ import "../Functions/isDarkTheme.mjs";
10
12
  /* empty css */
11
13
  import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
12
14
  import "escape-html";
@@ -15,7 +17,7 @@ import "vue";
15
17
  import "@nextcloud/auth";
16
18
  import "@nextcloud/axios";
17
19
  import "@nextcloud/capabilities";
18
- import { g as getTrapStack } from "./focusTrap-DmkaYJTC.mjs";
20
+ import { g as getTrapStack } from "./focusTrap-HJQ4pqHV.mjs";
19
21
  import NcButton from "../Components/NcButton.mjs";
20
22
  const _sfc_main = {
21
23
  name: "NcHeaderMenu",
@@ -219,4 +221,4 @@ const NcHeaderMenu = __component__.exports;
219
221
  export {
220
222
  NcHeaderMenu as N
221
223
  };
222
- //# sourceMappingURL=NcHeaderMenu-Dj7jeq88.mjs.map
224
+ //# sourceMappingURL=NcHeaderMenu--AvoyMeD.mjs.map