@nextcloud/vue 8.15.1 → 8.17.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 (555) hide show
  1. package/CHANGELOG.md +50 -3
  2. package/dist/Components/NcActionButton.cjs +4 -6
  3. package/dist/Components/NcActionButton.cjs.map +1 -1
  4. package/dist/Components/NcActionButton.mjs +4 -6
  5. package/dist/Components/NcActionButton.mjs.map +1 -1
  6. package/dist/Components/NcActionButtonGroup.cjs +1 -1
  7. package/dist/Components/NcActionButtonGroup.mjs +1 -1
  8. package/dist/Components/NcActionCaption.cjs +2 -4
  9. package/dist/Components/NcActionCaption.cjs.map +1 -1
  10. package/dist/Components/NcActionCaption.mjs +2 -4
  11. package/dist/Components/NcActionCaption.mjs.map +1 -1
  12. package/dist/Components/NcActionCheckbox.cjs +3 -5
  13. package/dist/Components/NcActionCheckbox.cjs.map +1 -1
  14. package/dist/Components/NcActionCheckbox.mjs +3 -5
  15. package/dist/Components/NcActionCheckbox.mjs.map +1 -1
  16. package/dist/Components/NcActionInput.cjs +1 -1
  17. package/dist/Components/NcActionInput.mjs +1 -1
  18. package/dist/Components/NcActionLink.cjs +2 -4
  19. package/dist/Components/NcActionLink.cjs.map +1 -1
  20. package/dist/Components/NcActionLink.mjs +2 -4
  21. package/dist/Components/NcActionLink.mjs.map +1 -1
  22. package/dist/Components/NcActionRadio.cjs +3 -5
  23. package/dist/Components/NcActionRadio.cjs.map +1 -1
  24. package/dist/Components/NcActionRadio.mjs +3 -5
  25. package/dist/Components/NcActionRadio.mjs.map +1 -1
  26. package/dist/Components/NcActionRouter.cjs +2 -4
  27. package/dist/Components/NcActionRouter.cjs.map +1 -1
  28. package/dist/Components/NcActionRouter.mjs +2 -4
  29. package/dist/Components/NcActionRouter.mjs.map +1 -1
  30. package/dist/Components/NcActionSeparator.cjs +2 -4
  31. package/dist/Components/NcActionSeparator.cjs.map +1 -1
  32. package/dist/Components/NcActionSeparator.mjs +2 -4
  33. package/dist/Components/NcActionSeparator.mjs.map +1 -1
  34. package/dist/Components/NcActionText.cjs +2 -4
  35. package/dist/Components/NcActionText.cjs.map +1 -1
  36. package/dist/Components/NcActionText.mjs +2 -4
  37. package/dist/Components/NcActionText.mjs.map +1 -1
  38. package/dist/Components/NcActionTextEditable.cjs +3 -5
  39. package/dist/Components/NcActionTextEditable.cjs.map +1 -1
  40. package/dist/Components/NcActionTextEditable.mjs +3 -5
  41. package/dist/Components/NcActionTextEditable.mjs.map +1 -1
  42. package/dist/Components/NcActions.cjs +1 -1
  43. package/dist/Components/NcActions.mjs +1 -1
  44. package/dist/Components/NcAppContent.cjs +1 -1
  45. package/dist/Components/NcAppContent.mjs +1 -1
  46. package/dist/Components/NcAppContentDetails.cjs +1 -3
  47. package/dist/Components/NcAppContentDetails.cjs.map +1 -1
  48. package/dist/Components/NcAppContentDetails.mjs +1 -3
  49. package/dist/Components/NcAppContentDetails.mjs.map +1 -1
  50. package/dist/Components/NcAppContentList.cjs +1 -3
  51. package/dist/Components/NcAppContentList.cjs.map +1 -1
  52. package/dist/Components/NcAppContentList.mjs +1 -3
  53. package/dist/Components/NcAppContentList.mjs.map +1 -1
  54. package/dist/Components/NcAppNavigation.cjs +1 -1
  55. package/dist/Components/NcAppNavigation.mjs +1 -1
  56. package/dist/Components/NcAppNavigationCaption.cjs +1 -1
  57. package/dist/Components/NcAppNavigationCaption.mjs +1 -1
  58. package/dist/Components/NcAppNavigationIconBullet.cjs +2 -4
  59. package/dist/Components/NcAppNavigationIconBullet.cjs.map +1 -1
  60. package/dist/Components/NcAppNavigationIconBullet.mjs +2 -4
  61. package/dist/Components/NcAppNavigationIconBullet.mjs.map +1 -1
  62. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  63. package/dist/Components/NcAppNavigationItem.mjs +1 -1
  64. package/dist/Components/NcAppNavigationList.cjs +2 -4
  65. package/dist/Components/NcAppNavigationList.cjs.map +1 -1
  66. package/dist/Components/NcAppNavigationList.mjs +2 -4
  67. package/dist/Components/NcAppNavigationList.mjs.map +1 -1
  68. package/dist/Components/NcAppNavigationNew.cjs +2 -4
  69. package/dist/Components/NcAppNavigationNew.cjs.map +1 -1
  70. package/dist/Components/NcAppNavigationNew.mjs +2 -4
  71. package/dist/Components/NcAppNavigationNew.mjs.map +1 -1
  72. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  73. package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
  74. package/dist/Components/NcAppNavigationSearch.cjs +1 -1
  75. package/dist/Components/NcAppNavigationSearch.mjs +1 -1
  76. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  77. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  78. package/dist/Components/NcAppNavigationSpacer.cjs +2 -4
  79. package/dist/Components/NcAppNavigationSpacer.cjs.map +1 -1
  80. package/dist/Components/NcAppNavigationSpacer.mjs +2 -4
  81. package/dist/Components/NcAppNavigationSpacer.mjs.map +1 -1
  82. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  83. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  84. package/dist/Components/NcAppSettingsDialog.cjs +1 -1
  85. package/dist/Components/NcAppSettingsDialog.mjs +1 -1
  86. package/dist/Components/NcAppSettingsSection.cjs +2 -4
  87. package/dist/Components/NcAppSettingsSection.cjs.map +1 -1
  88. package/dist/Components/NcAppSettingsSection.mjs +2 -4
  89. package/dist/Components/NcAppSettingsSection.mjs.map +1 -1
  90. package/dist/Components/NcAppSidebar.cjs +1 -1
  91. package/dist/Components/NcAppSidebar.mjs +1 -1
  92. package/dist/Components/NcAppSidebarTab.cjs +2 -4
  93. package/dist/Components/NcAppSidebarTab.cjs.map +1 -1
  94. package/dist/Components/NcAppSidebarTab.mjs +2 -4
  95. package/dist/Components/NcAppSidebarTab.mjs.map +1 -1
  96. package/dist/Components/NcAvatar.cjs +1 -1
  97. package/dist/Components/NcAvatar.mjs +1 -1
  98. package/dist/Components/NcBreadcrumb.cjs +1 -1
  99. package/dist/Components/NcBreadcrumb.mjs +1 -1
  100. package/dist/Components/NcBreadcrumbs.cjs +1 -1
  101. package/dist/Components/NcBreadcrumbs.mjs +1 -1
  102. package/dist/Components/NcButton.cjs +11 -6
  103. package/dist/Components/NcButton.cjs.map +1 -1
  104. package/dist/Components/NcButton.mjs +11 -6
  105. package/dist/Components/NcButton.mjs.map +1 -1
  106. package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
  107. package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
  108. package/dist/Components/NcChip.cjs +5 -7
  109. package/dist/Components/NcChip.cjs.map +1 -1
  110. package/dist/Components/NcChip.mjs +5 -7
  111. package/dist/Components/NcChip.mjs.map +1 -1
  112. package/dist/Components/NcCollectionList.cjs +1 -1
  113. package/dist/Components/NcCollectionList.mjs +1 -1
  114. package/dist/Components/NcColorPicker.cjs +1 -1
  115. package/dist/Components/NcColorPicker.mjs +1 -1
  116. package/dist/Components/NcContent.cjs +1 -1
  117. package/dist/Components/NcContent.mjs +1 -1
  118. package/dist/Components/NcCounterBubble.cjs +2 -49
  119. package/dist/Components/NcCounterBubble.cjs.map +1 -1
  120. package/dist/Components/NcCounterBubble.mjs +2 -49
  121. package/dist/Components/NcCounterBubble.mjs.map +1 -1
  122. package/dist/Components/NcDashboardWidget.cjs +1 -1
  123. package/dist/Components/NcDashboardWidget.mjs +1 -1
  124. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  125. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  126. package/dist/Components/NcDateTime.cjs +1 -1
  127. package/dist/Components/NcDateTime.mjs +1 -1
  128. package/dist/Components/NcDateTimePicker.cjs +7 -13
  129. package/dist/Components/NcDateTimePicker.cjs.map +1 -1
  130. package/dist/Components/NcDateTimePicker.mjs +7 -13
  131. package/dist/Components/NcDateTimePicker.mjs.map +1 -1
  132. package/dist/Components/NcDateTimePickerNative.cjs +3 -5
  133. package/dist/Components/NcDateTimePickerNative.cjs.map +1 -1
  134. package/dist/Components/NcDateTimePickerNative.mjs +3 -5
  135. package/dist/Components/NcDateTimePickerNative.mjs.map +1 -1
  136. package/dist/Components/NcDialog.cjs +1 -1
  137. package/dist/Components/NcDialog.mjs +1 -1
  138. package/dist/Components/NcDialogButton.cjs +1 -1
  139. package/dist/Components/NcDialogButton.mjs +1 -1
  140. package/dist/Components/NcEllipsisedOption.cjs +3 -5
  141. package/dist/Components/NcEllipsisedOption.cjs.map +1 -1
  142. package/dist/Components/NcEllipsisedOption.mjs +3 -5
  143. package/dist/Components/NcEllipsisedOption.mjs.map +1 -1
  144. package/dist/Components/NcEmojiPicker.cjs +1 -1
  145. package/dist/Components/NcEmojiPicker.mjs +1 -1
  146. package/dist/Components/NcEmptyContent.cjs +2 -4
  147. package/dist/Components/NcEmptyContent.cjs.map +1 -1
  148. package/dist/Components/NcEmptyContent.mjs +2 -4
  149. package/dist/Components/NcEmptyContent.mjs.map +1 -1
  150. package/dist/Components/NcGuestContent.cjs +2 -4
  151. package/dist/Components/NcGuestContent.cjs.map +1 -1
  152. package/dist/Components/NcGuestContent.mjs +2 -4
  153. package/dist/Components/NcGuestContent.mjs.map +1 -1
  154. package/dist/Components/NcHeaderMenu.cjs +1 -1
  155. package/dist/Components/NcHeaderMenu.mjs +1 -1
  156. package/dist/Components/NcHighlight.cjs +1 -1
  157. package/dist/Components/NcHighlight.mjs +1 -1
  158. package/dist/Components/NcIconSvgWrapper.cjs +1 -1
  159. package/dist/Components/NcIconSvgWrapper.mjs +1 -1
  160. package/dist/Components/NcInputField.cjs +5 -7
  161. package/dist/Components/NcInputField.cjs.map +1 -1
  162. package/dist/Components/NcInputField.mjs +5 -7
  163. package/dist/Components/NcInputField.mjs.map +1 -1
  164. package/dist/Components/NcListItem.cjs +1 -1
  165. package/dist/Components/NcListItem.mjs +1 -1
  166. package/dist/Components/NcListItemIcon.cjs +1 -1
  167. package/dist/Components/NcListItemIcon.mjs +1 -1
  168. package/dist/Components/NcLoadingIcon.cjs +2 -4
  169. package/dist/Components/NcLoadingIcon.cjs.map +1 -1
  170. package/dist/Components/NcLoadingIcon.mjs +2 -4
  171. package/dist/Components/NcLoadingIcon.mjs.map +1 -1
  172. package/dist/Components/NcModal.cjs +8 -16
  173. package/dist/Components/NcModal.cjs.map +1 -1
  174. package/dist/Components/NcModal.mjs +8 -16
  175. package/dist/Components/NcModal.mjs.map +1 -1
  176. package/dist/Components/NcNoteCard.cjs +24 -16
  177. package/dist/Components/NcNoteCard.cjs.map +1 -1
  178. package/dist/Components/NcNoteCard.mjs +24 -16
  179. package/dist/Components/NcNoteCard.mjs.map +1 -1
  180. package/dist/Components/NcPasswordField.cjs +1 -1
  181. package/dist/Components/NcPasswordField.mjs +1 -1
  182. package/dist/Components/NcPopover.cjs +1 -1
  183. package/dist/Components/NcPopover.mjs +1 -1
  184. package/dist/Components/NcProgressBar.cjs +1 -1
  185. package/dist/Components/NcProgressBar.mjs +1 -1
  186. package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
  187. package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
  188. package/dist/Components/NcRichContenteditable.cjs +2 -2
  189. package/dist/Components/NcRichContenteditable.mjs +2 -2
  190. package/dist/Components/NcRichText.cjs +2 -2
  191. package/dist/Components/NcRichText.mjs +3 -3
  192. package/dist/Components/NcSavingIndicatorIcon.cjs +1 -1
  193. package/dist/Components/NcSavingIndicatorIcon.mjs +1 -1
  194. package/dist/Components/NcSelect.cjs +1 -1
  195. package/dist/Components/NcSelect.mjs +1 -1
  196. package/dist/Components/NcSelectTags.cjs +1 -1
  197. package/dist/Components/NcSelectTags.mjs +1 -1
  198. package/dist/Components/NcSettingsInputText.cjs +1 -1
  199. package/dist/Components/NcSettingsInputText.mjs +1 -1
  200. package/dist/Components/NcSettingsSection.cjs +1 -1
  201. package/dist/Components/NcSettingsSection.mjs +1 -1
  202. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  203. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  204. package/dist/Components/NcTextArea.cjs +4 -6
  205. package/dist/Components/NcTextArea.cjs.map +1 -1
  206. package/dist/Components/NcTextArea.mjs +4 -6
  207. package/dist/Components/NcTextArea.mjs.map +1 -1
  208. package/dist/Components/NcTextField.cjs +1 -1
  209. package/dist/Components/NcTextField.mjs +1 -1
  210. package/dist/Components/NcTimezonePicker.cjs +1 -1
  211. package/dist/Components/NcTimezonePicker.mjs +1 -1
  212. package/dist/Components/NcUserBubble.cjs +1 -1
  213. package/dist/Components/NcUserBubble.mjs +1 -1
  214. package/dist/Components/NcUserStatusIcon.cjs +1 -1
  215. package/dist/Components/NcUserStatusIcon.mjs +1 -1
  216. package/dist/Components/NcVNodes.cjs +1 -3
  217. package/dist/Components/NcVNodes.cjs.map +1 -1
  218. package/dist/Components/NcVNodes.mjs +1 -3
  219. package/dist/Components/NcVNodes.mjs.map +1 -1
  220. package/dist/Composables/useHotKey.cjs +52 -0
  221. package/dist/Composables/useHotKey.cjs.map +1 -0
  222. package/dist/Composables/useHotKey.mjs +52 -0
  223. package/dist/Composables/useHotKey.mjs.map +1 -0
  224. package/dist/Functions/reference.cjs +1 -1
  225. package/dist/Functions/reference.mjs +1 -1
  226. package/dist/Functions/usernameToColor.cjs +1 -1
  227. package/dist/Functions/usernameToColor.mjs +1 -1
  228. package/dist/Mixins/richEditor.cjs +1 -1
  229. package/dist/Mixins/richEditor.mjs +1 -1
  230. package/dist/assets/{NcActionCheckbox-wDyhRXuN.css → NcActionCheckbox-sIGqnckr.css} +12 -12
  231. package/dist/assets/{NcActionRadio-CpCvyMa_.css → NcActionRadio-DFcWmvae.css} +12 -12
  232. package/dist/assets/{NcActions-BAHCEkZI.css → NcActions-f24RrX8r.css} +12 -12
  233. package/dist/assets/{NcAppNavigation-BM1S8Ewr.css → NcAppNavigation-YKWEqLwF.css} +12 -14
  234. package/dist/assets/{NcAppNavigationCaption-CYv7YhUS.css → NcAppNavigationCaption-zgtPq3Od.css} +9 -8
  235. package/dist/assets/{NcAppSettingsDialog-YgAGku7I.css → NcAppSettingsDialog-QF6aTZ3s.css} +19 -19
  236. package/dist/assets/{NcAvatar-m0lTnGXX.css → NcAvatar-CfUWTmJW.css} +32 -29
  237. package/dist/assets/{NcButton-BHxZm42y.css → NcButton-DYJAoXeG.css} +47 -47
  238. package/dist/assets/{NcCheckboxRadioSwitch-BkBep4wT.css → NcCheckboxRadioSwitch-DWtZ7faS.css} +55 -53
  239. package/dist/assets/{NcContent--2CGtswk.css → NcContent-ZFNIjylG.css} +10 -10
  240. package/dist/assets/{NcCounterBubble-BlAq2Vim.css → NcCounterBubble-Dizdz4Hk.css} +12 -12
  241. package/dist/assets/{NcDashboardWidgetItem-Qe5SSOhA.css → NcDashboardWidgetItem-BBZT17WU.css} +14 -14
  242. package/dist/assets/{NcDateTimePicker-C_TL2niN.css → NcDateTimePicker-C7MhJgGO.css} +7 -7
  243. package/dist/assets/{NcDialog-j6_6dpiF.css → NcDialog-DKdW_D2J.css} +15 -15
  244. package/dist/assets/{NcHeaderMenu-CuAI7Fgb.css → NcHeaderMenu-6C_FnkA6.css} +12 -12
  245. package/dist/assets/{NcInputField-BcdNbzaE.css → NcInputField-CQc5dRbY.css} +34 -34
  246. package/dist/assets/NcListItem-Db199R20.css +185 -0
  247. package/dist/assets/{NcListItemIcon-DxPdaRV5.css → NcListItemIcon--7OhLYWA.css} +20 -12
  248. package/dist/assets/{NcModal-Ch7ovo9y.css → NcModal-Djc2K_kW.css} +70 -70
  249. package/dist/assets/{NcNoteCard-BLPU1den.css → NcNoteCard-CImn6F9p.css} +18 -13
  250. package/dist/assets/NcPasswordField-DWd5gg73.css +21 -0
  251. package/dist/assets/{NcRichContenteditable-CkvTrjfG.css → NcRichContenteditable-BYEZK1DT.css} +61 -59
  252. package/dist/assets/{NcSelect-Bt5aEZZX.css → NcSelect-EIXtZSVn.css} +14 -5
  253. package/dist/assets/{NcSettingsSection-DZwOPKg1.css → NcSettingsSection-CGaCS1X0.css} +9 -8
  254. package/dist/assets/{NcUserBubble-DMjZyrGY.css → NcUserBubble-Cv-q-rH5.css} +8 -8
  255. package/dist/chunks/{AlertCircleOutline-Cb0gAiDw.cjs → AlertCircleOutline-DLtiWgZd.cjs} +1 -3
  256. package/dist/chunks/{AlertCircleOutline-Cb0gAiDw.cjs.map → AlertCircleOutline-DLtiWgZd.cjs.map} +1 -1
  257. package/dist/chunks/{AlertCircleOutline-BzttElgq.mjs → AlertCircleOutline-DU3QwU5Y.mjs} +1 -3
  258. package/dist/chunks/{AlertCircleOutline-BzttElgq.mjs.map → AlertCircleOutline-DU3QwU5Y.mjs.map} +1 -1
  259. package/dist/chunks/{ArrowLeft-B9iGweTd.mjs → ArrowLeft-BhAxJBYx.mjs} +1 -3
  260. package/dist/chunks/{ArrowLeft-B9iGweTd.mjs.map → ArrowLeft-BhAxJBYx.mjs.map} +1 -1
  261. package/dist/chunks/{ArrowLeft-BhNmMdMz.cjs → ArrowLeft-CONurT5C.cjs} +1 -3
  262. package/dist/chunks/{ArrowLeft-BhNmMdMz.cjs.map → ArrowLeft-CONurT5C.cjs.map} +1 -1
  263. package/dist/chunks/{ArrowRight-DaYrccVG.cjs → ArrowRight-Bj5G_mG0.cjs} +1 -3
  264. package/dist/chunks/{ArrowRight-DaYrccVG.cjs.map → ArrowRight-Bj5G_mG0.cjs.map} +1 -1
  265. package/dist/chunks/{ArrowRight-Clf455e1.mjs → ArrowRight-KsL2PC-o.mjs} +1 -3
  266. package/dist/chunks/{ArrowRight-Clf455e1.mjs.map → ArrowRight-KsL2PC-o.mjs.map} +1 -1
  267. package/dist/chunks/{Check-PawIlCwa.mjs → Check-XHAzUBkX.mjs} +1 -3
  268. package/dist/chunks/{Check-PawIlCwa.mjs.map → Check-XHAzUBkX.mjs.map} +1 -1
  269. package/dist/chunks/{Check-DZc7keoa.cjs → Check-fCbe4vqy.cjs} +1 -3
  270. package/dist/chunks/{Check-DZc7keoa.cjs.map → Check-fCbe4vqy.cjs.map} +1 -1
  271. package/dist/chunks/{ChevronDown-CF9m1o8_.cjs → ChevronDown-CiFbcDUC.cjs} +1 -3
  272. package/dist/chunks/{ChevronDown-CF9m1o8_.cjs.map → ChevronDown-CiFbcDUC.cjs.map} +1 -1
  273. package/dist/chunks/{ChevronDown-PedEroXo.mjs → ChevronDown-D3Tfshug.mjs} +1 -3
  274. package/dist/chunks/{ChevronDown-PedEroXo.mjs.map → ChevronDown-D3Tfshug.mjs.map} +1 -1
  275. package/dist/chunks/{ChevronRight-BNa7yMja.mjs → ChevronRight-C3eVhc5a.mjs} +1 -3
  276. package/dist/chunks/{ChevronRight-BNa7yMja.mjs.map → ChevronRight-C3eVhc5a.mjs.map} +1 -1
  277. package/dist/chunks/{ChevronRight-DVw6mR11.cjs → ChevronRight-CWbdN5_r.cjs} +1 -3
  278. package/dist/chunks/{ChevronRight-DVw6mR11.cjs.map → ChevronRight-CWbdN5_r.cjs.map} +1 -1
  279. package/dist/chunks/{ChevronUp-CTOKWYlC.cjs → ChevronUp-A2riTBrv.cjs} +1 -3
  280. package/dist/chunks/{ChevronUp-CTOKWYlC.cjs.map → ChevronUp-A2riTBrv.cjs.map} +1 -1
  281. package/dist/chunks/{ChevronUp-DGLTg_nO.mjs → ChevronUp-ljACquzS.mjs} +1 -3
  282. package/dist/chunks/{ChevronUp-DGLTg_nO.mjs.map → ChevronUp-ljACquzS.mjs.map} +1 -1
  283. package/dist/chunks/{Close-1V1F2F-M.mjs → Close-B6ccm1RP.mjs} +1 -3
  284. package/dist/chunks/{Close-1V1F2F-M.mjs.map → Close-B6ccm1RP.mjs.map} +1 -1
  285. package/dist/chunks/{Close-C2VrgKj3.cjs → Close-B7lGu0cG.cjs} +1 -3
  286. package/dist/chunks/{Close-C2VrgKj3.cjs.map → Close-B7lGu0cG.cjs.map} +1 -1
  287. package/dist/chunks/{DotsHorizontal-C0STD_HU.mjs → DotsHorizontal-Cd2x8oz2.mjs} +1 -3
  288. package/dist/chunks/{DotsHorizontal-C0STD_HU.mjs.map → DotsHorizontal-Cd2x8oz2.mjs.map} +1 -1
  289. package/dist/chunks/{DotsHorizontal-Cjw3-45t.cjs → DotsHorizontal-DQfnwpao.cjs} +1 -3
  290. package/dist/chunks/{DotsHorizontal-Cjw3-45t.cjs.map → DotsHorizontal-DQfnwpao.cjs.map} +1 -1
  291. package/dist/chunks/{GenColors-D-WqPHEB.cjs → GenColors-Bj69w5nu.cjs} +1 -7
  292. package/dist/chunks/{GenColors-D-WqPHEB.cjs.map → GenColors-Bj69w5nu.cjs.map} +1 -1
  293. package/dist/chunks/{GenColors-b4A2ply0.mjs → GenColors-u1W5WMXj.mjs} +1 -7
  294. package/dist/chunks/{GenColors-b4A2ply0.mjs.map → GenColors-u1W5WMXj.mjs.map} +1 -1
  295. package/dist/chunks/{NcActionButtonGroup-B7kbycZb.mjs → NcActionButtonGroup-Bd37MbKW.mjs} +2 -4
  296. package/dist/chunks/{NcActionButtonGroup-B7kbycZb.mjs.map → NcActionButtonGroup-Bd37MbKW.mjs.map} +1 -1
  297. package/dist/chunks/{NcActionButtonGroup-CPziJr1Y.cjs → NcActionButtonGroup-D5m7jjJp.cjs} +2 -4
  298. package/dist/chunks/{NcActionButtonGroup-CPziJr1Y.cjs.map → NcActionButtonGroup-D5m7jjJp.cjs.map} +1 -1
  299. package/dist/chunks/{NcActionInput-DTyRHjMP.cjs → NcActionInput-C-LpHj3H.cjs} +6 -8
  300. package/dist/chunks/{NcActionInput-DTyRHjMP.cjs.map → NcActionInput-C-LpHj3H.cjs.map} +1 -1
  301. package/dist/chunks/{NcActionInput-hT1S6x5u.mjs → NcActionInput-Cih0zYV4.mjs} +6 -8
  302. package/dist/chunks/{NcActionInput-hT1S6x5u.mjs.map → NcActionInput-Cih0zYV4.mjs.map} +1 -1
  303. package/dist/chunks/{NcActions-CISHDrZG.mjs → NcActions-D77YAhAy.mjs} +12 -9
  304. package/dist/chunks/NcActions-D77YAhAy.mjs.map +1 -0
  305. package/dist/chunks/{NcActions-B3s-7Qzq.cjs → NcActions-DWydFozA.cjs} +12 -9
  306. package/dist/chunks/NcActions-DWydFozA.cjs.map +1 -0
  307. package/dist/chunks/{NcAppContent-Bb5o48aT.mjs → NcAppContent-4BxMQ7Xt.mjs} +5 -9
  308. package/dist/chunks/{NcAppContent-Bb5o48aT.mjs.map → NcAppContent-4BxMQ7Xt.mjs.map} +1 -1
  309. package/dist/chunks/{NcAppContent-Ba0xqWel.cjs → NcAppContent-Cvlj45G9.cjs} +5 -9
  310. package/dist/chunks/{NcAppContent-Ba0xqWel.cjs.map → NcAppContent-Cvlj45G9.cjs.map} +1 -1
  311. package/dist/chunks/{NcAppNavigation-DD4dKkkX.cjs → NcAppNavigation-BSPUmFOP.cjs} +4 -6
  312. package/dist/chunks/{NcAppNavigation-DD4dKkkX.cjs.map → NcAppNavigation-BSPUmFOP.cjs.map} +1 -1
  313. package/dist/chunks/{NcAppNavigation-Bwm7RccS.mjs → NcAppNavigation-DAUiOJeC.mjs} +4 -6
  314. package/dist/chunks/{NcAppNavigation-Bwm7RccS.mjs.map → NcAppNavigation-DAUiOJeC.mjs.map} +1 -1
  315. package/dist/chunks/{NcAppNavigationCaption-DfZnrU9o.cjs → NcAppNavigationCaption-DIsO1tke.cjs} +4 -6
  316. package/dist/chunks/{NcAppNavigationCaption-BeddfL2b.mjs.map → NcAppNavigationCaption-DIsO1tke.cjs.map} +1 -1
  317. package/dist/chunks/{NcAppNavigationCaption-BeddfL2b.mjs → NcAppNavigationCaption-DPUdrh1W.mjs} +4 -6
  318. package/dist/chunks/{NcAppNavigationCaption-DfZnrU9o.cjs.map → NcAppNavigationCaption-DPUdrh1W.mjs.map} +1 -1
  319. package/dist/chunks/{NcAppNavigationItem-D68yn-Hi.cjs → NcAppNavigationItem-B_pjMPx9.cjs} +8 -16
  320. package/dist/chunks/{NcAppNavigationItem-D68yn-Hi.cjs.map → NcAppNavigationItem-B_pjMPx9.cjs.map} +1 -1
  321. package/dist/chunks/{NcAppNavigationItem-Di1H-Tw5.mjs → NcAppNavigationItem-DFd3T8cM.mjs} +8 -16
  322. package/dist/chunks/{NcAppNavigationItem-Di1H-Tw5.mjs.map → NcAppNavigationItem-DFd3T8cM.mjs.map} +1 -1
  323. package/dist/chunks/{NcAppNavigationNewItem-CBXDGIkq.mjs → NcAppNavigationNewItem-C3feTWit.mjs} +3 -5
  324. package/dist/chunks/{NcAppNavigationNewItem-CBXDGIkq.mjs.map → NcAppNavigationNewItem-C3feTWit.mjs.map} +1 -1
  325. package/dist/chunks/{NcAppNavigationNewItem-_Tk4JcXt.cjs → NcAppNavigationNewItem-ChhIGd9y.cjs} +3 -5
  326. package/dist/chunks/{NcAppNavigationNewItem-_Tk4JcXt.cjs.map → NcAppNavigationNewItem-ChhIGd9y.cjs.map} +1 -1
  327. package/dist/chunks/{NcAppNavigationSearch-C8t2wCJA.cjs → NcAppNavigationSearch-2zELXCcb.cjs} +4 -6
  328. package/dist/chunks/{NcAppNavigationSearch-C8t2wCJA.cjs.map → NcAppNavigationSearch-2zELXCcb.cjs.map} +1 -1
  329. package/dist/chunks/{NcAppNavigationSearch-04pQ1n2W.mjs → NcAppNavigationSearch-BjFk5Svv.mjs} +4 -6
  330. package/dist/chunks/{NcAppNavigationSearch-04pQ1n2W.mjs.map → NcAppNavigationSearch-BjFk5Svv.mjs.map} +1 -1
  331. package/dist/chunks/{NcAppNavigationSettings-BHWA2Rtx.mjs → NcAppNavigationSettings-BbdXmZxA.mjs} +3 -7
  332. package/dist/chunks/{NcAppNavigationSettings-BHWA2Rtx.mjs.map → NcAppNavigationSettings-BbdXmZxA.mjs.map} +1 -1
  333. package/dist/chunks/{NcAppNavigationSettings-B0y7Cj58.cjs → NcAppNavigationSettings-nXyfQjef.cjs} +3 -7
  334. package/dist/chunks/{NcAppNavigationSettings-B0y7Cj58.cjs.map → NcAppNavigationSettings-nXyfQjef.cjs.map} +1 -1
  335. package/dist/chunks/{NcAppNavigationToggle-BvFWFxXo.mjs → NcAppNavigationToggle-BfEEm-rA.mjs} +3 -9
  336. package/dist/chunks/{NcAppNavigationToggle-BvFWFxXo.mjs.map → NcAppNavigationToggle-BfEEm-rA.mjs.map} +1 -1
  337. package/dist/chunks/{NcAppNavigationToggle-E9vzw71g.cjs → NcAppNavigationToggle-Bs8GCwir.cjs} +3 -9
  338. package/dist/chunks/{NcAppNavigationToggle-E9vzw71g.cjs.map → NcAppNavigationToggle-Bs8GCwir.cjs.map} +1 -1
  339. package/dist/chunks/{NcAppSettingsDialog-D2vPpqBX.mjs → NcAppSettingsDialog-4B3lv0WQ.mjs} +5 -7
  340. package/dist/chunks/{NcAppSettingsDialog-D2vPpqBX.mjs.map → NcAppSettingsDialog-4B3lv0WQ.mjs.map} +1 -1
  341. package/dist/chunks/{NcAppSettingsDialog-8ak7BUOn.cjs → NcAppSettingsDialog-lfxi50N4.cjs} +5 -7
  342. package/dist/chunks/{NcAppSettingsDialog-8ak7BUOn.cjs.map → NcAppSettingsDialog-lfxi50N4.cjs.map} +1 -1
  343. package/dist/chunks/{NcAppSidebar-hknsZQJD.mjs → NcAppSidebar-CiTS4hjx.mjs} +8 -18
  344. package/dist/chunks/{NcAppSidebar-hknsZQJD.mjs.map → NcAppSidebar-CiTS4hjx.mjs.map} +1 -1
  345. package/dist/chunks/{NcAppSidebar-JZSiSveK.cjs → NcAppSidebar-CxX00b2d.cjs} +8 -18
  346. package/dist/chunks/{NcAppSidebar-JZSiSveK.cjs.map → NcAppSidebar-CxX00b2d.cjs.map} +1 -1
  347. package/dist/chunks/{NcAvatar-hFHnd3-m.mjs → NcAvatar-BFV6oZYX.mjs} +9 -11
  348. package/dist/chunks/NcAvatar-BFV6oZYX.mjs.map +1 -0
  349. package/dist/chunks/{NcAvatar-BPt2WJCV.cjs → NcAvatar-D70EswFk.cjs} +9 -11
  350. package/dist/chunks/NcAvatar-D70EswFk.cjs.map +1 -0
  351. package/dist/chunks/{NcBreadcrumb-DcekD2gL.mjs → NcBreadcrumb-B5L1PSLJ.mjs} +4 -6
  352. package/dist/chunks/{NcBreadcrumb-DcekD2gL.mjs.map → NcBreadcrumb-B5L1PSLJ.mjs.map} +1 -1
  353. package/dist/chunks/{NcBreadcrumb-CamnZPfo.cjs → NcBreadcrumb-Ck9jIMJ0.cjs} +4 -6
  354. package/dist/chunks/{NcBreadcrumb-CamnZPfo.cjs.map → NcBreadcrumb-Ck9jIMJ0.cjs.map} +1 -1
  355. package/dist/chunks/{NcBreadcrumbs-CciLrzHY.cjs → NcBreadcrumbs-BDi5uySu.cjs} +4 -8
  356. package/dist/chunks/{NcBreadcrumbs-CciLrzHY.cjs.map → NcBreadcrumbs-BDi5uySu.cjs.map} +1 -1
  357. package/dist/chunks/{NcBreadcrumbs-B7B-HlbZ.mjs → NcBreadcrumbs-Di8TiK0J.mjs} +4 -8
  358. package/dist/chunks/{NcBreadcrumbs-B7B-HlbZ.mjs.map → NcBreadcrumbs-Di8TiK0J.mjs.map} +1 -1
  359. package/dist/chunks/{NcCheckboxRadioSwitch-DqWcw1C1.cjs → NcCheckboxRadioSwitch-DeufC6NH.cjs} +5 -23
  360. package/dist/chunks/{NcCheckboxRadioSwitch-B2PO6aNp.mjs.map → NcCheckboxRadioSwitch-DeufC6NH.cjs.map} +1 -1
  361. package/dist/chunks/{NcCheckboxRadioSwitch-B2PO6aNp.mjs → NcCheckboxRadioSwitch-DnnuXT1_.mjs} +5 -23
  362. package/dist/chunks/{NcCheckboxRadioSwitch-DqWcw1C1.cjs.map → NcCheckboxRadioSwitch-DnnuXT1_.mjs.map} +1 -1
  363. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_feaabebe_lang-BRgyzABt.mjs +3 -0
  364. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_feaabebe_lang-BRgyzABt.mjs.map +1 -0
  365. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_feaabebe_lang-jOhbAsqn.cjs +4 -0
  366. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_feaabebe_lang-jOhbAsqn.cjs.map +1 -0
  367. package/dist/chunks/{NcCollectionList-TES3PYdM.cjs → NcCollectionList-1EeBHCrM.cjs} +7 -11
  368. package/dist/chunks/{NcCollectionList-TES3PYdM.cjs.map → NcCollectionList-1EeBHCrM.cjs.map} +1 -1
  369. package/dist/chunks/{NcCollectionList-DRZDPx-B.mjs → NcCollectionList-BxSwb-Gx.mjs} +7 -11
  370. package/dist/chunks/{NcCollectionList-DRZDPx-B.mjs.map → NcCollectionList-BxSwb-Gx.mjs.map} +1 -1
  371. package/dist/chunks/{NcColorPicker-C7S5S6TC.mjs → NcColorPicker-B3WnrXPa.mjs} +8 -10
  372. package/dist/chunks/{NcColorPicker-C7S5S6TC.mjs.map → NcColorPicker-B3WnrXPa.mjs.map} +1 -1
  373. package/dist/chunks/{NcColorPicker-C0xZdVTb.cjs → NcColorPicker-C4V9Xmmq.cjs} +8 -10
  374. package/dist/chunks/{NcColorPicker-C0xZdVTb.cjs.map → NcColorPicker-C4V9Xmmq.cjs.map} +1 -1
  375. package/dist/chunks/{NcContent-Ba3ScZsp.cjs → NcContent-DOV1i_sw.cjs} +5 -7
  376. package/dist/chunks/{NcContent-Ba3ScZsp.cjs.map → NcContent-DOV1i_sw.cjs.map} +1 -1
  377. package/dist/chunks/{NcContent-Bhalk7rm.mjs → NcContent-YmMP5qXT.mjs} +5 -7
  378. package/dist/chunks/{NcContent-Bhalk7rm.mjs.map → NcContent-YmMP5qXT.mjs.map} +1 -1
  379. package/dist/chunks/NcCounterBubble-D1QC3eP1.mjs +106 -0
  380. package/dist/chunks/NcCounterBubble-D1QC3eP1.mjs.map +1 -0
  381. package/dist/chunks/NcCounterBubble-R8Tmi05i.cjs +105 -0
  382. package/dist/chunks/NcCounterBubble-R8Tmi05i.cjs.map +1 -0
  383. package/dist/chunks/{NcDashboardWidget-ByPxY1rN.cjs → NcDashboardWidget-D3oQtVgq.cjs} +6 -8
  384. package/dist/chunks/{NcDashboardWidget-ByPxY1rN.cjs.map → NcDashboardWidget-D3oQtVgq.cjs.map} +1 -1
  385. package/dist/chunks/{NcDashboardWidget-Boxk4y1i.mjs → NcDashboardWidget-DOSAwzd2.mjs} +6 -8
  386. package/dist/chunks/{NcDashboardWidget-Boxk4y1i.mjs.map → NcDashboardWidget-DOSAwzd2.mjs.map} +1 -1
  387. package/dist/chunks/{NcDashboardWidgetItem-Dwa8QRZP.mjs → NcDashboardWidgetItem-DSaANTMY.mjs} +5 -7
  388. package/dist/chunks/{NcDashboardWidgetItem-Dwa8QRZP.mjs.map → NcDashboardWidgetItem-DSaANTMY.mjs.map} +1 -1
  389. package/dist/chunks/{NcDashboardWidgetItem-2oRU-z9N.cjs → NcDashboardWidgetItem-DWrAY-RW.cjs} +5 -7
  390. package/dist/chunks/{NcDashboardWidgetItem-2oRU-z9N.cjs.map → NcDashboardWidgetItem-DWrAY-RW.cjs.map} +1 -1
  391. package/dist/chunks/{NcDateTime-BmQ4_DFj.cjs → NcDateTime-Bfv9PBx5.cjs} +2 -4
  392. package/dist/chunks/{NcDateTime-BmQ4_DFj.cjs.map → NcDateTime-Bfv9PBx5.cjs.map} +1 -1
  393. package/dist/chunks/{NcDateTime-DgjfUiKI.mjs → NcDateTime-CFcnq5-P.mjs} +2 -4
  394. package/dist/chunks/{NcDateTime-DgjfUiKI.mjs.map → NcDateTime-CFcnq5-P.mjs.map} +1 -1
  395. package/dist/chunks/{NcDialog-DGaf6Udc.cjs → NcDialog-C7L86Jj6.cjs} +35 -9
  396. package/dist/chunks/NcDialog-C7L86Jj6.cjs.map +1 -0
  397. package/dist/chunks/{NcDialog-VincZ0XS.mjs → NcDialog-DXRkgfxf.mjs} +35 -9
  398. package/dist/chunks/NcDialog-DXRkgfxf.mjs.map +1 -0
  399. package/dist/chunks/{NcDialogButton-CNWF4urB.cjs → NcDialogButton-Cq7U6E8M.cjs} +18 -7
  400. package/dist/chunks/NcDialogButton-Cq7U6E8M.cjs.map +1 -0
  401. package/dist/chunks/{NcDialogButton-JvyN3X6S.mjs → NcDialogButton-DzPzSBzz.mjs} +18 -7
  402. package/dist/chunks/NcDialogButton-DzPzSBzz.mjs.map +1 -0
  403. package/dist/chunks/{NcEmojiPicker-DExoie86.mjs → NcEmojiPicker-CjeoGVH7.mjs} +7 -11
  404. package/dist/chunks/{NcEmojiPicker-DExoie86.mjs.map → NcEmojiPicker-CjeoGVH7.mjs.map} +1 -1
  405. package/dist/chunks/{NcEmojiPicker-dWlXYcVd.cjs → NcEmojiPicker-Cuo4irbL.cjs} +7 -11
  406. package/dist/chunks/{NcEmojiPicker-dWlXYcVd.cjs.map → NcEmojiPicker-Cuo4irbL.cjs.map} +1 -1
  407. package/dist/chunks/{NcHeaderMenu-D-Jo3l41.cjs → NcHeaderMenu-D6vHevbN.cjs} +3 -5
  408. package/dist/chunks/{NcHeaderMenu-D-Jo3l41.cjs.map → NcHeaderMenu-D6vHevbN.cjs.map} +1 -1
  409. package/dist/chunks/{NcHeaderMenu-Da6Ob-6t.mjs → NcHeaderMenu-DGrf5SDZ.mjs} +3 -5
  410. package/dist/chunks/{NcHeaderMenu-Da6Ob-6t.mjs.map → NcHeaderMenu-DGrf5SDZ.mjs.map} +1 -1
  411. package/dist/chunks/{NcIconSvgWrapper-DaSgIT19.cjs → NcIconSvgWrapper-Cb4bAwV6.cjs} +2 -4
  412. package/dist/chunks/{NcIconSvgWrapper-DaSgIT19.cjs.map → NcIconSvgWrapper-Cb4bAwV6.cjs.map} +1 -1
  413. package/dist/chunks/{NcIconSvgWrapper-Ckqpz-vm.mjs → NcIconSvgWrapper-DjrkBUkC.mjs} +2 -4
  414. package/dist/chunks/{NcIconSvgWrapper-Ckqpz-vm.mjs.map → NcIconSvgWrapper-DjrkBUkC.mjs.map} +1 -1
  415. package/dist/chunks/{NcInputConfirmCancel-BGuN01On.mjs → NcInputConfirmCancel-CTMBdhFf.mjs} +5 -7
  416. package/dist/chunks/{NcInputConfirmCancel-BGuN01On.mjs.map → NcInputConfirmCancel-CTMBdhFf.mjs.map} +1 -1
  417. package/dist/chunks/{NcInputConfirmCancel-CdYnRngZ.cjs → NcInputConfirmCancel-DMTb3AI2.cjs} +5 -7
  418. package/dist/chunks/{NcInputConfirmCancel-CdYnRngZ.cjs.map → NcInputConfirmCancel-DMTb3AI2.cjs.map} +1 -1
  419. package/dist/chunks/{NcListItem-BqaD6qqB.mjs → NcListItem-79bJNkOw.mjs} +16 -9
  420. package/dist/chunks/NcListItem-79bJNkOw.mjs.map +1 -0
  421. package/dist/chunks/{NcListItem-tdvCJ2pG.cjs → NcListItem-BIKAHiIz.cjs} +17 -10
  422. package/dist/chunks/NcListItem-BIKAHiIz.cjs.map +1 -0
  423. package/dist/chunks/{NcListItemIcon-CxzeW2na.cjs → NcListItemIcon-B03yo56l.cjs} +11 -12
  424. package/dist/chunks/{NcListItemIcon-CxzeW2na.cjs.map → NcListItemIcon-B03yo56l.cjs.map} +1 -1
  425. package/dist/chunks/{NcListItemIcon-C7zSZcCY.mjs → NcListItemIcon-Bo4o5oVB.mjs} +11 -12
  426. package/dist/chunks/{NcListItemIcon-C7zSZcCY.mjs.map → NcListItemIcon-Bo4o5oVB.mjs.map} +1 -1
  427. package/dist/chunks/{NcPasswordField-Cbt3BHWa.mjs → NcPasswordField-BbbShH-t.mjs} +16 -10
  428. package/dist/chunks/NcPasswordField-BbbShH-t.mjs.map +1 -0
  429. package/dist/chunks/{NcPasswordField-BQUXT4sH.cjs → NcPasswordField-DYyZIkoL.cjs} +16 -10
  430. package/dist/chunks/NcPasswordField-DYyZIkoL.cjs.map +1 -0
  431. package/dist/chunks/{NcPopover-Cl1AvQ5o.cjs → NcPopover-C0G7sLVP.cjs} +1 -5
  432. package/dist/chunks/{NcPopover-Cl1AvQ5o.cjs.map → NcPopover-C0G7sLVP.cjs.map} +1 -1
  433. package/dist/chunks/{NcPopover-VxUr4c6P.mjs → NcPopover-DbeCmze0.mjs} +1 -5
  434. package/dist/chunks/{NcPopover-VxUr4c6P.mjs.map → NcPopover-DbeCmze0.mjs.map} +1 -1
  435. package/dist/chunks/{NcProgressBar-BnKA91Pj.cjs → NcProgressBar-BrDAF_Zr.cjs} +2 -4
  436. package/dist/chunks/{NcProgressBar-BnKA91Pj.cjs.map → NcProgressBar-BrDAF_Zr.cjs.map} +1 -1
  437. package/dist/chunks/{NcProgressBar-CZtllSde.mjs → NcProgressBar-D_6Z7U5w.mjs} +2 -4
  438. package/dist/chunks/{NcProgressBar-CZtllSde.mjs.map → NcProgressBar-D_6Z7U5w.mjs.map} +1 -1
  439. package/dist/chunks/{NcRelatedResourcesPanel-CSV3L528.cjs → NcRelatedResourcesPanel-Ccltm-Er.cjs} +8 -18
  440. package/dist/chunks/{NcRelatedResourcesPanel-DLnhQCAc.mjs.map → NcRelatedResourcesPanel-Ccltm-Er.cjs.map} +1 -1
  441. package/dist/chunks/{NcRelatedResourcesPanel-DLnhQCAc.mjs → NcRelatedResourcesPanel-DxC7FIlo.mjs} +8 -18
  442. package/dist/chunks/{NcRelatedResourcesPanel-CSV3L528.cjs.map → NcRelatedResourcesPanel-DxC7FIlo.mjs.map} +1 -1
  443. package/dist/chunks/{NcRichContenteditable-DI-ZXpT5.mjs → NcRichContenteditable-CxlVyONK.mjs} +21 -26
  444. package/dist/chunks/NcRichContenteditable-CxlVyONK.mjs.map +1 -0
  445. package/dist/chunks/{NcRichContenteditable-B01oU1Py.cjs → NcRichContenteditable-DgpXktip.cjs} +21 -26
  446. package/dist/chunks/NcRichContenteditable-DgpXktip.cjs.map +1 -0
  447. package/dist/chunks/{NcRichText-S2tUM9cE.mjs → NcRichText-BvfYsu9z.mjs} +5 -9
  448. package/dist/chunks/{NcRichText-S2tUM9cE.mjs.map → NcRichText-BvfYsu9z.mjs.map} +1 -1
  449. package/dist/chunks/{NcRichText-Cv3E2opm.cjs → NcRichText-C90luaNZ.cjs} +5 -9
  450. package/dist/chunks/{NcRichText-Cv3E2opm.cjs.map → NcRichText-C90luaNZ.cjs.map} +1 -1
  451. package/dist/chunks/{NcSavingIndicatorIcon-BzKAIkhk.cjs → NcSavingIndicatorIcon-Bu-zt4pR.cjs} +1 -3
  452. package/dist/chunks/{NcSavingIndicatorIcon-BzKAIkhk.cjs.map → NcSavingIndicatorIcon-Bu-zt4pR.cjs.map} +1 -1
  453. package/dist/chunks/{NcSavingIndicatorIcon-Bhy7wcoT.mjs → NcSavingIndicatorIcon-nv1147dk.mjs} +1 -3
  454. package/dist/chunks/{NcSavingIndicatorIcon-Bhy7wcoT.mjs.map → NcSavingIndicatorIcon-nv1147dk.mjs.map} +1 -1
  455. package/dist/chunks/{NcSelect-CY9k8Npn.cjs → NcSelect-DMDRJq-5.cjs} +17 -11
  456. package/dist/chunks/NcSelect-DMDRJq-5.cjs.map +1 -0
  457. package/dist/chunks/{NcSelect-SndWSyFc.mjs → NcSelect-kmuffooC.mjs} +17 -11
  458. package/dist/chunks/NcSelect-kmuffooC.mjs.map +1 -0
  459. package/dist/chunks/{NcSelectTags-j1vMgnP_.mjs → NcSelectTags-Bppbqmvs.mjs} +3 -5
  460. package/dist/chunks/{NcSelectTags-j1vMgnP_.mjs.map → NcSelectTags-Bppbqmvs.mjs.map} +1 -1
  461. package/dist/chunks/{NcSelectTags-BRDbJ3zM.cjs → NcSelectTags-DEHO1VM7.cjs} +3 -5
  462. package/dist/chunks/{NcSelectTags-BRDbJ3zM.cjs.map → NcSelectTags-DEHO1VM7.cjs.map} +1 -1
  463. package/dist/chunks/{NcSettingsInputText-CFEhlYqU.cjs → NcSettingsInputText-BBQoQrAG.cjs} +3 -5
  464. package/dist/chunks/{NcSettingsInputText-CFEhlYqU.cjs.map → NcSettingsInputText-BBQoQrAG.cjs.map} +1 -1
  465. package/dist/chunks/{NcSettingsInputText-Cw8sfqJD.mjs → NcSettingsInputText-hAlIWx1R.mjs} +3 -5
  466. package/dist/chunks/{NcSettingsInputText-Cw8sfqJD.mjs.map → NcSettingsInputText-hAlIWx1R.mjs.map} +1 -1
  467. package/dist/chunks/{NcSettingsSection-DR413pDz.mjs → NcSettingsSection-BT-d36B9.mjs} +4 -8
  468. package/dist/chunks/NcSettingsSection-BT-d36B9.mjs.map +1 -0
  469. package/dist/chunks/{NcSettingsSection-CC40z0BR.cjs → NcSettingsSection-Dvcx-V7F.cjs} +4 -8
  470. package/dist/chunks/NcSettingsSection-Dvcx-V7F.cjs.map +1 -0
  471. package/dist/chunks/{NcSettingsSelectGroup-SzqRWbEs.cjs → NcSettingsSelectGroup-BL8EH6GB.cjs} +4 -6
  472. package/dist/chunks/{NcSettingsSelectGroup-SzqRWbEs.cjs.map → NcSettingsSelectGroup-BL8EH6GB.cjs.map} +1 -1
  473. package/dist/chunks/{NcSettingsSelectGroup-SY4s3QMa.mjs → NcSettingsSelectGroup-OkPHjjsK.mjs} +4 -6
  474. package/dist/chunks/{NcSettingsSelectGroup-SY4s3QMa.mjs.map → NcSettingsSelectGroup-OkPHjjsK.mjs.map} +1 -1
  475. package/dist/chunks/{NcTextField-NPhch54I.mjs → NcTextField-DWfgnCsS.mjs} +4 -8
  476. package/dist/chunks/{NcTextField-NPhch54I.mjs.map → NcTextField-DWfgnCsS.mjs.map} +1 -1
  477. package/dist/chunks/{NcTextField-CY1UACDQ.cjs → NcTextField-Db1VpUnM.cjs} +4 -8
  478. package/dist/chunks/{NcTextField-CY1UACDQ.cjs.map → NcTextField-Db1VpUnM.cjs.map} +1 -1
  479. package/dist/chunks/{NcTimezonePicker-B3wVH7l0.cjs → NcTimezonePicker-8R-hkchD.cjs} +3 -5
  480. package/dist/chunks/{NcTimezonePicker-B3wVH7l0.cjs.map → NcTimezonePicker-8R-hkchD.cjs.map} +1 -1
  481. package/dist/chunks/{NcTimezonePicker-C-FQGZe0.mjs → NcTimezonePicker-DdVLB1Bv.mjs} +3 -5
  482. package/dist/chunks/{NcTimezonePicker-C-FQGZe0.mjs.map → NcTimezonePicker-DdVLB1Bv.mjs.map} +1 -1
  483. package/dist/chunks/{NcUserBubble-BI5uBaCY.cjs → NcUserBubble-3UqGE1ad.cjs} +21 -11
  484. package/dist/chunks/NcUserBubble-3UqGE1ad.cjs.map +1 -0
  485. package/dist/chunks/{NcUserBubble-CzoM20ew.mjs → NcUserBubble-CuLF1XDp.mjs} +21 -11
  486. package/dist/chunks/NcUserBubble-CuLF1XDp.mjs.map +1 -0
  487. package/dist/chunks/{NcUserStatusIcon-JAQFdYUq.mjs → NcUserStatusIcon-CCCrTIIn.mjs} +3 -5
  488. package/dist/chunks/{NcUserStatusIcon-JAQFdYUq.mjs.map → NcUserStatusIcon-CCCrTIIn.mjs.map} +1 -1
  489. package/dist/chunks/{NcUserStatusIcon-OYRvKpLC.cjs → NcUserStatusIcon-Cx9unttb.cjs} +3 -5
  490. package/dist/chunks/{NcUserStatusIcon-OYRvKpLC.cjs.map → NcUserStatusIcon-Cx9unttb.cjs.map} +1 -1
  491. package/dist/chunks/{ScopeComponent-wXF17wBK.cjs → ScopeComponent-BWAf-wih.cjs} +1 -1
  492. package/dist/chunks/{ScopeComponent-wXF17wBK.cjs.map → ScopeComponent-BWAf-wih.cjs.map} +1 -1
  493. package/dist/chunks/{ScopeComponent-utlyd2B_.mjs → ScopeComponent-lSfP0CG7.mjs} +1 -1
  494. package/dist/chunks/{ScopeComponent-utlyd2B_.mjs.map → ScopeComponent-lSfP0CG7.mjs.map} +1 -1
  495. package/dist/chunks/_l10n-B4dEPXsr.mjs +130 -0
  496. package/dist/chunks/_l10n-B4dEPXsr.mjs.map +1 -0
  497. package/dist/chunks/_l10n-BEDw4wKe.cjs +129 -0
  498. package/dist/chunks/{_l10n-Dkgq8-k1.cjs.map → _l10n-BEDw4wKe.cjs.map} +1 -1
  499. package/dist/chunks/{_plugin-vue2_normalizer-D637Qkok.mjs → _plugin-vue2_normalizer-DU4iP6Vu.mjs} +2 -26
  500. package/dist/chunks/_plugin-vue2_normalizer-DU4iP6Vu.mjs.map +1 -0
  501. package/dist/chunks/{_plugin-vue2_normalizer-DbFIE4_M.cjs → _plugin-vue2_normalizer-V0q-tHlQ.cjs} +2 -26
  502. package/dist/chunks/_plugin-vue2_normalizer-V0q-tHlQ.cjs.map +1 -0
  503. package/dist/chunks/{index-CsogA-K5.mjs → index-Bz6q9mZw.mjs} +1 -3
  504. package/dist/chunks/{index-CsogA-K5.mjs.map → index-Bz6q9mZw.mjs.map} +1 -1
  505. package/dist/chunks/{index-oIpl1nrk.cjs → index-CC4ahXvG.cjs} +3 -5
  506. package/dist/chunks/index-CC4ahXvG.cjs.map +1 -0
  507. package/dist/chunks/{index-DbA2OZyf.mjs → index-CMZdBcqP.mjs} +3 -5
  508. package/dist/chunks/index-CMZdBcqP.mjs.map +1 -0
  509. package/dist/chunks/{index-BANjku4q.cjs → index-DIJxEozm.cjs} +1 -3
  510. package/dist/chunks/{index-BANjku4q.cjs.map → index-DIJxEozm.cjs.map} +1 -1
  511. package/dist/chunks/{referencePickerModal-B2vY_tQ_.cjs → referencePickerModal-CT32j5pQ.cjs} +17 -35
  512. package/dist/chunks/{referencePickerModal-B2vY_tQ_.cjs.map → referencePickerModal-CT32j5pQ.cjs.map} +1 -1
  513. package/dist/chunks/{referencePickerModal-LSsnfOpt.mjs → referencePickerModal-DW9uLKIZ.mjs} +17 -35
  514. package/dist/chunks/{referencePickerModal-LSsnfOpt.mjs.map → referencePickerModal-DW9uLKIZ.mjs.map} +1 -1
  515. package/dist/chunks/{usernameToColor-BAqfFlwH.cjs → usernameToColor-CpdyuYfd.cjs} +1 -1
  516. package/dist/chunks/{usernameToColor-BAqfFlwH.cjs.map → usernameToColor-CpdyuYfd.cjs.map} +1 -1
  517. package/dist/chunks/{usernameToColor-o6GbhQWU.mjs → usernameToColor-DivFGAn4.mjs} +1 -1
  518. package/dist/chunks/{usernameToColor-o6GbhQWU.mjs.map → usernameToColor-DivFGAn4.mjs.map} +1 -1
  519. package/dist/index.cjs +54 -52
  520. package/dist/index.cjs.map +1 -1
  521. package/dist/index.mjs +55 -53
  522. package/dist/index.mjs.map +1 -1
  523. package/package.json +4 -4
  524. package/dist/assets/NcListItem-CeiJZojD.css +0 -178
  525. package/dist/chunks/NcActions-B3s-7Qzq.cjs.map +0 -1
  526. package/dist/chunks/NcActions-CISHDrZG.mjs.map +0 -1
  527. package/dist/chunks/NcAvatar-BPt2WJCV.cjs.map +0 -1
  528. package/dist/chunks/NcAvatar-hFHnd3-m.mjs.map +0 -1
  529. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-A_mTcfF_.mjs +0 -3
  530. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-A_mTcfF_.mjs.map +0 -1
  531. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-RF3-KLI6.cjs +0 -4
  532. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-RF3-KLI6.cjs.map +0 -1
  533. package/dist/chunks/NcDialog-DGaf6Udc.cjs.map +0 -1
  534. package/dist/chunks/NcDialog-VincZ0XS.mjs.map +0 -1
  535. package/dist/chunks/NcDialogButton-CNWF4urB.cjs.map +0 -1
  536. package/dist/chunks/NcDialogButton-JvyN3X6S.mjs.map +0 -1
  537. package/dist/chunks/NcListItem-BqaD6qqB.mjs.map +0 -1
  538. package/dist/chunks/NcListItem-tdvCJ2pG.cjs.map +0 -1
  539. package/dist/chunks/NcPasswordField-BQUXT4sH.cjs.map +0 -1
  540. package/dist/chunks/NcPasswordField-Cbt3BHWa.mjs.map +0 -1
  541. package/dist/chunks/NcRichContenteditable-B01oU1Py.cjs.map +0 -1
  542. package/dist/chunks/NcRichContenteditable-DI-ZXpT5.mjs.map +0 -1
  543. package/dist/chunks/NcSelect-CY9k8Npn.cjs.map +0 -1
  544. package/dist/chunks/NcSelect-SndWSyFc.mjs.map +0 -1
  545. package/dist/chunks/NcSettingsSection-CC40z0BR.cjs.map +0 -1
  546. package/dist/chunks/NcSettingsSection-DR413pDz.mjs.map +0 -1
  547. package/dist/chunks/NcUserBubble-BI5uBaCY.cjs.map +0 -1
  548. package/dist/chunks/NcUserBubble-CzoM20ew.mjs.map +0 -1
  549. package/dist/chunks/_l10n-Dkgq8-k1.cjs +0 -129
  550. package/dist/chunks/_l10n-em5EAi4q.mjs +0 -130
  551. package/dist/chunks/_l10n-em5EAi4q.mjs.map +0 -1
  552. package/dist/chunks/_plugin-vue2_normalizer-D637Qkok.mjs.map +0 -1
  553. package/dist/chunks/_plugin-vue2_normalizer-DbFIE4_M.cjs.map +0 -1
  554. package/dist/chunks/index-DbA2OZyf.mjs.map +0 -1
  555. package/dist/chunks/index-oIpl1nrk.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"NcListItemIcon-CxzeW2na.cjs","sources":["../../src/components/NcListItemIcon/NcListItemIcon.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n## This is used to display a avatar-name/subname + icon layout\nIt might be used for list rendering or within the multiselect for example\n\n> **Note:** Any binding will be forwarded on the Avatar component root\n\n```vue\n<NcListItemIcon name=\"User 1\" />\n<NcListItemIcon name=\"User 1\" subname=\"Hidden subname because size is too small\" :avatar-size=\"24\" />\n```\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"User 1\" :avatar-size=\"44\">\n\t\t\t<template>\n\t\t\t\t<Account :size=\"20\" />\n\t\t\t</template>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport Account from 'vue-material-design-icons/Account.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tAccount,\n\t\t},\n\t}\n\t</script>\n```\n\n### With icon\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"Group 1\" subname=\"13 members\" :is-no-user=\"true\">\n\t\t\t<template>\n\t\t\t\t<AccountMultiple :size=\"20\" />\n\t\t\t</template>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport AccountMultiple from 'vue-material-design-icons/AccountMultiple.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tAccountMultiple,\n\t\t},\n\t}\n\t</script>\n```\n\n### Searching\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"Test user 1\" subname=\"callmetest@domain.com\" search=\"test\" />\n\t\t<NcListItemIcon name=\"Testing admin\" subname=\"testme@example.com\" search=\"test\" />\n\t\t<NcListItemIcon name=\"Test group 2\" subname=\"loremipsum@domain.com\" :is-no-user=\"true\" search=\"test\">\n\t\t\t<template>\n\t\t\t\t<AccountMultiple :size=\"20\" />\n\t\t\t</template>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport AccountMultiple from 'vue-material-design-icons/AccountMultiple.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tAccountMultiple,\n\t\t},\n\t}\n\t</script>\n```\n\n### With actions\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"Test user 1\" subname=\"callmetest@domain.com\">\n\t\t\t<NcActions>\n\t\t\t\t<NcActionButton @click=\"alert('Edit')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tEdit\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton @click=\"alert('Delete')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tDelete\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActions>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Pencil from 'vue-material-design-icons/Pencil.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPencil,\n\t\t},\n\t}\n\t</script>\n```\n</docs>\n\n<template>\n\t<span :id=\"id\"\n\t\tclass=\"option\"\n\t\t:style=\"cssVars\"\n\t\tv-on=\"$listeners\">\n\t\t<NcAvatar v-bind=\"$attrs\"\n\t\t\t:disable-menu=\"true\"\n\t\t\t:disable-tooltip=\"true\"\n\t\t\t:display-name=\"displayName || name\"\n\t\t\t:is-no-user=\"isNoUser\"\n\t\t\t:size=\"avatarSize\"\n\t\t\tclass=\"option__avatar\" />\n\t\t<div class=\"option__details\">\n\t\t\t<NcHighlight class=\"option__lineone\"\n\t\t\t\t:text=\"name\"\n\t\t\t\t:search=\"searchParts[0]\" />\n\t\t\t<NcHighlight v-if=\"isValidSubname && isSizeBigEnough\"\n\t\t\t\tclass=\"option__linetwo\"\n\t\t\t\t:text=\"subname\"\n\t\t\t\t:search=\"searchParts[1]\" />\n\t\t\t<span v-else-if=\"hasStatus\">\n\t\t\t\t<span>{{ userStatus.icon }}</span>\n\t\t\t\t<span>{{ userStatus.message }}</span>\n\t\t\t</span>\n\t\t</div>\n\n\t\t<!-- @slot use this slot to add a custom icon or actions -->\n\t\t<slot>\n\t\t\t<NcIconSvgWrapper v-if=\"hasIconSvg\"\n\t\t\t\tclass=\"option__icon\"\n\t\t\t\t:svg=\"iconSvg\"\n\t\t\t\t:name=\"iconName\" />\n\t\t\t<span v-else-if=\"hasIcon\"\n\t\t\t\tclass=\"icon option__icon\"\n\t\t\t\t:class=\"icon\"\n\t\t\t\t:aria-label=\"iconName\" />\n\t\t</slot>\n\t</span>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcHighlight from '../NcHighlight/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\n\nimport { userStatus } from '../../mixins/index.js'\n\n// global margin, ^2 ratio\nconst margin = 8\nconst defaultSize = 32\n\nexport default {\n\tname: 'NcListItemIcon',\n\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcHighlight,\n\t\tNcIconSvgWrapper,\n\t},\n\n\tmixins: [\n\t\tuserStatus,\n\t],\n\n\tprops: {\n\t\t/**\n\t\t * Default first line text\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Secondary optional line\n\t\t * Only visible on size of 32 and above\n\t\t */\n\t\tsubname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Icon class to be displayed at the end of the component\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * SVG icon to be displayed at the end of the component\n\t\t */\n\t\ticonSvg: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Descriptive name for the icon\n\t\t */\n\t\ticonName: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Search within the highlight of name/subname\n\t\t */\n\t\tsearch: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Set a size in px that will define the avatar height/width\n\t\t * and therefore, the height of the component\n\t\t */\n\t\tavatarSize: {\n\t\t\ttype: Number,\n\t\t\tdefault: defaultSize,\n\t\t},\n\n\t\t/**\n\t\t * Disable the margins of this component.\n\t\t * Useful for integration in `NcSelect` for example\n\t\t */\n\t\tnoMargin: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * See the [Avatar](#Avatar) displayName prop\n\t\t * Fallback to name\n\t\t */\n\t\tdisplayName: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * See the [Avatar](#Avatar) isNoUser prop\n\t\t * Enable/disable the UserStatus fetching\n\t\t */\n\t\tisNoUser: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Unique list item ID\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tmargin,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\thasIcon() {\n\t\t\treturn this.icon !== ''\n\t\t},\n\n\t\thasIconSvg() {\n\t\t\treturn this.iconSvg !== ''\n\t\t},\n\n\t\tisValidSubname() {\n\t\t\treturn this.subname?.trim?.() !== ''\n\t\t},\n\n\t\tisSizeBigEnough() {\n\t\t\treturn this.avatarSize >= defaultSize\n\t\t},\n\n\t\tcssVars() {\n\t\t\t// Don't use margin to calculate the height if noMargin\n\t\t\tconst margin = this.noMargin ? 0 : this.margin\n\n\t\t\treturn {\n\t\t\t\t'--height': this.avatarSize + 2 * margin + 'px',\n\t\t\t\t'--margin': this.margin + 'px',\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Seperates the search property into two parts, the first one is the search part on the name, the second on the subname.\n\t\t * @return {[string, string]}\n\t\t */\n\t\tsearchParts() {\n\t\t\t// Match the email notation like \"Jane <j.doe@example.com>\" with the email address as matching group\n\t\t\tconst EMAIL_NOTATION = /^([^<]*)<([^>]+)>?$/\n\n\t\t\tconst match = this.search.match(EMAIL_NOTATION)\n\t\t\tif (this.isNoUser || !match) {\n\t\t\t\treturn [this.search, this.search]\n\t\t\t}\n\t\t\treturn [match[1].trim(), match[2]]\n\t\t},\n\t},\n\n\tbeforeMount() {\n\t\t// If we don't have a subname and if this is a user\n\t\tif (!this.isNoUser && !this.subname) {\n\t\t\tthis.fetchUserStatus(this.user)\n\t\t}\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.option {\n\tdisplay: flex;\n\talign-items: center;\n\twidth: 100%;\n\theight: var(--height);\n\tcursor: inherit;\n\n\t&__avatar {\n\t\tmargin-right: var(--margin);\n\t}\n\n\t&__details {\n\t\tdisplay: flex;\n\t\tflex: 1 1;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\tmin-width: 0;\n\t}\n\n\t&__lineone {\n\t\tcolor: var(--color-main-text);\n\t}\n\n\t&__linetwo {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__lineone,\n\t&__linetwo {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tline-height: 1.1em;\n\t\tstrong {\n\t\t\tfont-weight: bold;\n\t\t}\n\t}\n\n\t&__icon {\n\t\twidth: var(--default-clickable-area);\n\t\theight: var(--default-clickable-area);\n\t\tcolor: var(--color-text-maxcontrast);\n\t\t&.icon {\n\t\t\tflex: 0 0 var(--default-clickable-area);\n\t\t\topacity: $opacity_normal;\n\t\t\tbackground-position: center;\n\t\t\tbackground-size: 16px;\n\t\t}\n\t}\n\n\t&__details,\n\t&__lineone,\n\t&__linetwo,\n\t&__icon {\n\t\tcursor: inherit;\n\t}\n}\n</style>\n"],"names":["NcAvatar","NcHighlight","NcIconSvgWrapper","userStatus","margin"],"mappings":";;;;;;;;;;;;;AA8JA,MAAA,SAAA;AACA,MAAA,cAAA;AAEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA,SAAA;AAAA,IACA,aAAAC,uBAAA;AAAA,IACA,kBAAAC,iBAAA;AAAA,EACA;AAAA,EAEA,QAAA;AAAA,IACAC,SAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;A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;;;;"}
1
+ {"version":3,"file":"NcListItemIcon-B03yo56l.cjs","sources":["../../src/components/NcListItemIcon/NcListItemIcon.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n## This is used to display a avatar-name/subname + icon layout\nIt might be used for list rendering or within the multiselect for example\n\n> **Note:** Any binding will be forwarded on the Avatar component root\n\n```vue\n<NcListItemIcon name=\"User 1\" />\n<NcListItemIcon name=\"User 1\" subname=\"Hidden subname because size is too small\" :avatar-size=\"24\" />\n```\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"User 1\" :avatar-size=\"44\">\n\t\t\t<template>\n\t\t\t\t<Account :size=\"20\" />\n\t\t\t</template>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport Account from 'vue-material-design-icons/Account.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tAccount,\n\t\t},\n\t}\n\t</script>\n```\n\n### With icon\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"Group 1\" subname=\"13 members\" :is-no-user=\"true\">\n\t\t\t<template>\n\t\t\t\t<AccountMultiple :size=\"20\" />\n\t\t\t</template>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport AccountMultiple from 'vue-material-design-icons/AccountMultiple.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tAccountMultiple,\n\t\t},\n\t}\n\t</script>\n```\n\n### Searching\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"Test user 1\" subname=\"callmetest@domain.com\" search=\"test\" />\n\t\t<NcListItemIcon name=\"Testing admin\" subname=\"testme@example.com\" search=\"test\" />\n\t\t<NcListItemIcon name=\"Test group 2\" subname=\"loremipsum@domain.com\" :is-no-user=\"true\" search=\"test\">\n\t\t\t<template>\n\t\t\t\t<AccountMultiple :size=\"20\" />\n\t\t\t</template>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport AccountMultiple from 'vue-material-design-icons/AccountMultiple.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tAccountMultiple,\n\t\t},\n\t}\n\t</script>\n```\n\n### With actions\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"Test user 1\" subname=\"callmetest@domain.com\">\n\t\t\t<NcActions>\n\t\t\t\t<NcActionButton @click=\"alert('Edit')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tEdit\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton @click=\"alert('Delete')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tDelete\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActions>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Pencil from 'vue-material-design-icons/Pencil.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPencil,\n\t\t},\n\t}\n\t</script>\n```\n</docs>\n\n<template>\n\t<span :id=\"id\"\n\t\tclass=\"option\"\n\t\t:class=\"{ 'option--compact': avatarSize < defaultSize }\"\n\t\t:style=\"cssVars\"\n\t\tv-on=\"$listeners\">\n\t\t<NcAvatar v-bind=\"$attrs\"\n\t\t\t:disable-menu=\"true\"\n\t\t\t:disable-tooltip=\"true\"\n\t\t\t:display-name=\"displayName || name\"\n\t\t\t:is-no-user=\"isNoUser\"\n\t\t\t:size=\"avatarSize\"\n\t\t\tclass=\"option__avatar\" />\n\t\t<div class=\"option__details\">\n\t\t\t<NcHighlight class=\"option__lineone\"\n\t\t\t\t:text=\"name\"\n\t\t\t\t:search=\"searchParts[0]\" />\n\t\t\t<NcHighlight v-if=\"isValidSubname && isSizeBigEnough\"\n\t\t\t\tclass=\"option__linetwo\"\n\t\t\t\t:text=\"subname\"\n\t\t\t\t:search=\"searchParts[1]\" />\n\t\t\t<span v-else-if=\"hasStatus\">\n\t\t\t\t<span>{{ userStatus.icon }}</span>\n\t\t\t\t<span>{{ userStatus.message }}</span>\n\t\t\t</span>\n\t\t</div>\n\n\t\t<!-- @slot use this slot to add a custom icon or actions -->\n\t\t<slot>\n\t\t\t<NcIconSvgWrapper v-if=\"hasIconSvg\"\n\t\t\t\tclass=\"option__icon\"\n\t\t\t\t:svg=\"iconSvg\"\n\t\t\t\t:name=\"iconName\" />\n\t\t\t<span v-else-if=\"hasIcon\"\n\t\t\t\tclass=\"icon option__icon\"\n\t\t\t\t:class=\"icon\"\n\t\t\t\t:aria-label=\"iconName\" />\n\t\t</slot>\n\t</span>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcHighlight from '../NcHighlight/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\n\nimport { userStatus } from '../../mixins/index.js'\n\n// global margin, ^2 ratio\nconst margin = 8\nconst defaultSize = 32\n\nexport default {\n\tname: 'NcListItemIcon',\n\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcHighlight,\n\t\tNcIconSvgWrapper,\n\t},\n\n\tmixins: [\n\t\tuserStatus,\n\t],\n\n\tprops: {\n\t\t/**\n\t\t * Default first line text\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Secondary optional line\n\t\t * Only visible on size of 32 and above\n\t\t */\n\t\tsubname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Icon class to be displayed at the end of the component\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * SVG icon to be displayed at the end of the component\n\t\t */\n\t\ticonSvg: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Descriptive name for the icon\n\t\t */\n\t\ticonName: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Search within the highlight of name/subname\n\t\t */\n\t\tsearch: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Set a size in px that will define the avatar height/width\n\t\t * and therefore, the height of the component\n\t\t */\n\t\tavatarSize: {\n\t\t\ttype: Number,\n\t\t\tdefault: defaultSize,\n\t\t},\n\n\t\t/**\n\t\t * Disable the margins of this component.\n\t\t * Useful for integration in `NcSelect` for example\n\t\t */\n\t\tnoMargin: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * See the [Avatar](#Avatar) displayName prop\n\t\t * Fallback to name\n\t\t */\n\t\tdisplayName: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * See the [Avatar](#Avatar) isNoUser prop\n\t\t * Enable/disable the UserStatus fetching\n\t\t */\n\t\tisNoUser: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Unique list item ID\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tsetup() {\n\t\treturn {\n\t\t\tmargin,\n\t\t\tdefaultSize,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\thasIcon() {\n\t\t\treturn this.icon !== ''\n\t\t},\n\n\t\thasIconSvg() {\n\t\t\treturn this.iconSvg !== ''\n\t\t},\n\n\t\tisValidSubname() {\n\t\t\treturn this.subname?.trim?.() !== ''\n\t\t},\n\n\t\tisSizeBigEnough() {\n\t\t\treturn this.avatarSize >= 26 // the font sizes\n\t\t},\n\n\t\tcssVars() {\n\t\t\t// Don't use margin to calculate the height if noMargin\n\t\t\tconst margin = this.noMargin ? 0 : this.margin\n\n\t\t\treturn {\n\t\t\t\t'--height': this.avatarSize + 2 * margin + 'px',\n\t\t\t\t'--margin': this.margin + 'px',\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Seperates the search property into two parts, the first one is the search part on the name, the second on the subname.\n\t\t * @return {[string, string]}\n\t\t */\n\t\tsearchParts() {\n\t\t\t// Match the email notation like \"Jane <j.doe@example.com>\" with the email address as matching group\n\t\t\tconst EMAIL_NOTATION = /^([^<]*)<([^>]+)>?$/\n\n\t\t\tconst match = this.search.match(EMAIL_NOTATION)\n\t\t\tif (this.isNoUser || !match) {\n\t\t\t\treturn [this.search, this.search]\n\t\t\t}\n\t\t\treturn [match[1].trim(), match[2]]\n\t\t},\n\t},\n\n\tbeforeMount() {\n\t\t// If we don't have a subname and if this is a user\n\t\tif (!this.isNoUser && !this.subname) {\n\t\t\tthis.fetchUserStatus(this.user)\n\t\t}\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.option {\n\tdisplay: flex;\n\talign-items: center;\n\twidth: 100%;\n\theight: var(--height);\n\tcursor: inherit;\n\n\t&__avatar {\n\t\tmargin-right: var(--margin);\n\t}\n\n\t&__details {\n\t\tdisplay: flex;\n\t\tflex: 1 1;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\tmin-width: 0;\n\t}\n\n\t&__lineone {\n\t\tcolor: var(--color-main-text);\n\t}\n\n\t&__linetwo {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__lineone,\n\t&__linetwo {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tline-height: 1.2;\n\t\tstrong {\n\t\t\tfont-weight: bold;\n\t\t}\n\t}\n\n\t&--compact {\n\t\t.option {\n\t\t\t&__lineone {\n\t\t\t\tfont-size: 14px;\n\t\t\t}\n\t\t\t&__linetwo {\n\t\t\t\tfont-size: 11px;\n\t\t\t\tline-height: 1.5;\n\t\t\t\tmargin-top: -4px;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__icon {\n\t\twidth: var(--default-clickable-area);\n\t\theight: var(--default-clickable-area);\n\t\tcolor: var(--color-text-maxcontrast);\n\t\t&.icon {\n\t\t\tflex: 0 0 var(--default-clickable-area);\n\t\t\topacity: $opacity_normal;\n\t\t\tbackground-position: center;\n\t\t\tbackground-size: 16px;\n\t\t}\n\t}\n\n\t&__details,\n\t&__lineone,\n\t&__linetwo,\n\t&__icon {\n\t\tcursor: inherit;\n\t}\n}\n</style>\n"],"names":["NcAvatar","NcHighlight","NcIconSvgWrapper","userStatus","margin"],"mappings":";;;;;;;;;;;;;AA+JA,MAAA,SAAA;AACA,MAAA,cAAA;AAEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAA,SAAA;AAAA,IACA,aAAAC,uBAAA;AAAA,IACA,kBAAAC,iBAAA;AAAA,EACA;AAAA,EAEA,QAAA;AAAA,IACAC,SAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,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3
- import { N as NcAvatar, u as userStatus } from "./NcAvatar-hFHnd3-m.mjs";
4
- import { N as NcHighlight } from "./index-CsogA-K5.mjs";
5
- import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-Ckqpz-vm.mjs";
2
+ import '../assets/NcListItemIcon--7OhLYWA.css';
3
+ import { N as NcAvatar, u as userStatus } from "./NcAvatar-BFV6oZYX.mjs";
4
+ import { N as NcHighlight } from "./index-Bz6q9mZw.mjs";
5
+ import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-DjrkBUkC.mjs";
6
6
  import "../Composables/useIsFullscreen.mjs";
7
7
  import "../Composables/useIsMobile.mjs";
8
8
  import "@nextcloud/router";
9
9
  /* empty css */
10
- import { n as normalizeComponent } from "./_plugin-vue2_normalizer-D637Qkok.mjs";
10
+ import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
11
11
  import "linkify-string";
12
12
  import "escape-html";
13
13
  import "striptags";
@@ -108,9 +108,10 @@ const _sfc_main = {
108
108
  default: null
109
109
  }
110
110
  },
111
- data() {
111
+ setup() {
112
112
  return {
113
- margin
113
+ margin,
114
+ defaultSize
114
115
  };
115
116
  },
116
117
  computed: {
@@ -125,7 +126,7 @@ const _sfc_main = {
125
126
  return ((_b = (_a = this.subname) == null ? void 0 : _a.trim) == null ? void 0 : _b.call(_a)) !== "";
126
127
  },
127
128
  isSizeBigEnough() {
128
- return this.avatarSize >= defaultSize;
129
+ return this.avatarSize >= 26;
129
130
  },
130
131
  cssVars() {
131
132
  const margin2 = this.noMargin ? 0 : this.margin;
@@ -155,7 +156,7 @@ const _sfc_main = {
155
156
  };
156
157
  var _sfc_render = function render() {
157
158
  var _vm = this, _c = _vm._self._c;
158
- return _c("span", _vm._g({ staticClass: "option", style: _vm.cssVars, attrs: { "id": _vm.id } }, _vm.$listeners), [_c("NcAvatar", _vm._b({ staticClass: "option__avatar", attrs: { "disable-menu": true, "disable-tooltip": true, "display-name": _vm.displayName || _vm.name, "is-no-user": _vm.isNoUser, "size": _vm.avatarSize } }, "NcAvatar", _vm.$attrs, false)), _c("div", { staticClass: "option__details" }, [_c("NcHighlight", { staticClass: "option__lineone", attrs: { "text": _vm.name, "search": _vm.searchParts[0] } }), _vm.isValidSubname && _vm.isSizeBigEnough ? _c("NcHighlight", { staticClass: "option__linetwo", attrs: { "text": _vm.subname, "search": _vm.searchParts[1] } }) : _vm.hasStatus ? _c("span", [_c("span", [_vm._v(_vm._s(_vm.userStatus.icon))]), _c("span", [_vm._v(_vm._s(_vm.userStatus.message))])]) : _vm._e()], 1), _vm._t("default", function() {
159
+ return _c("span", _vm._g({ staticClass: "option", class: { "option--compact": _vm.avatarSize < _vm.defaultSize }, style: _vm.cssVars, attrs: { "id": _vm.id } }, _vm.$listeners), [_c("NcAvatar", _vm._b({ staticClass: "option__avatar", attrs: { "disable-menu": true, "disable-tooltip": true, "display-name": _vm.displayName || _vm.name, "is-no-user": _vm.isNoUser, "size": _vm.avatarSize } }, "NcAvatar", _vm.$attrs, false)), _c("div", { staticClass: "option__details" }, [_c("NcHighlight", { staticClass: "option__lineone", attrs: { "text": _vm.name, "search": _vm.searchParts[0] } }), _vm.isValidSubname && _vm.isSizeBigEnough ? _c("NcHighlight", { staticClass: "option__linetwo", attrs: { "text": _vm.subname, "search": _vm.searchParts[1] } }) : _vm.hasStatus ? _c("span", [_c("span", [_vm._v(_vm._s(_vm.userStatus.icon))]), _c("span", [_vm._v(_vm._s(_vm.userStatus.message))])]) : _vm._e()], 1), _vm._t("default", function() {
159
160
  return [_vm.hasIconSvg ? _c("NcIconSvgWrapper", { staticClass: "option__icon", attrs: { "svg": _vm.iconSvg, "name": _vm.iconName } }) : _vm.hasIcon ? _c("span", { staticClass: "icon option__icon", class: _vm.icon, attrs: { "aria-label": _vm.iconName } }) : _vm._e()];
160
161
  })], 2);
161
162
  };
@@ -166,9 +167,7 @@ var __component__ = /* @__PURE__ */ normalizeComponent(
166
167
  _sfc_staticRenderFns,
167
168
  false,
168
169
  null,
169
- "89979c0c",
170
- null,
171
- null
170
+ "a0f4d73a"
172
171
  );
173
172
  const NcListItemIcon = __component__.exports;
174
173
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"NcListItemIcon-C7zSZcCY.mjs","sources":["../../src/components/NcListItemIcon/NcListItemIcon.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n## This is used to display a avatar-name/subname + icon layout\nIt might be used for list rendering or within the multiselect for example\n\n> **Note:** Any binding will be forwarded on the Avatar component root\n\n```vue\n<NcListItemIcon name=\"User 1\" />\n<NcListItemIcon name=\"User 1\" subname=\"Hidden subname because size is too small\" :avatar-size=\"24\" />\n```\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"User 1\" :avatar-size=\"44\">\n\t\t\t<template>\n\t\t\t\t<Account :size=\"20\" />\n\t\t\t</template>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport Account from 'vue-material-design-icons/Account.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tAccount,\n\t\t},\n\t}\n\t</script>\n```\n\n### With icon\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"Group 1\" subname=\"13 members\" :is-no-user=\"true\">\n\t\t\t<template>\n\t\t\t\t<AccountMultiple :size=\"20\" />\n\t\t\t</template>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport AccountMultiple from 'vue-material-design-icons/AccountMultiple.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tAccountMultiple,\n\t\t},\n\t}\n\t</script>\n```\n\n### Searching\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"Test user 1\" subname=\"callmetest@domain.com\" search=\"test\" />\n\t\t<NcListItemIcon name=\"Testing admin\" subname=\"testme@example.com\" search=\"test\" />\n\t\t<NcListItemIcon name=\"Test group 2\" subname=\"loremipsum@domain.com\" :is-no-user=\"true\" search=\"test\">\n\t\t\t<template>\n\t\t\t\t<AccountMultiple :size=\"20\" />\n\t\t\t</template>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport AccountMultiple from 'vue-material-design-icons/AccountMultiple.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tAccountMultiple,\n\t\t},\n\t}\n\t</script>\n```\n\n### With actions\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"Test user 1\" subname=\"callmetest@domain.com\">\n\t\t\t<NcActions>\n\t\t\t\t<NcActionButton @click=\"alert('Edit')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tEdit\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton @click=\"alert('Delete')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tDelete\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActions>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Pencil from 'vue-material-design-icons/Pencil.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPencil,\n\t\t},\n\t}\n\t</script>\n```\n</docs>\n\n<template>\n\t<span :id=\"id\"\n\t\tclass=\"option\"\n\t\t:style=\"cssVars\"\n\t\tv-on=\"$listeners\">\n\t\t<NcAvatar v-bind=\"$attrs\"\n\t\t\t:disable-menu=\"true\"\n\t\t\t:disable-tooltip=\"true\"\n\t\t\t:display-name=\"displayName || name\"\n\t\t\t:is-no-user=\"isNoUser\"\n\t\t\t:size=\"avatarSize\"\n\t\t\tclass=\"option__avatar\" />\n\t\t<div class=\"option__details\">\n\t\t\t<NcHighlight class=\"option__lineone\"\n\t\t\t\t:text=\"name\"\n\t\t\t\t:search=\"searchParts[0]\" />\n\t\t\t<NcHighlight v-if=\"isValidSubname && isSizeBigEnough\"\n\t\t\t\tclass=\"option__linetwo\"\n\t\t\t\t:text=\"subname\"\n\t\t\t\t:search=\"searchParts[1]\" />\n\t\t\t<span v-else-if=\"hasStatus\">\n\t\t\t\t<span>{{ userStatus.icon }}</span>\n\t\t\t\t<span>{{ userStatus.message }}</span>\n\t\t\t</span>\n\t\t</div>\n\n\t\t<!-- @slot use this slot to add a custom icon or actions -->\n\t\t<slot>\n\t\t\t<NcIconSvgWrapper v-if=\"hasIconSvg\"\n\t\t\t\tclass=\"option__icon\"\n\t\t\t\t:svg=\"iconSvg\"\n\t\t\t\t:name=\"iconName\" />\n\t\t\t<span v-else-if=\"hasIcon\"\n\t\t\t\tclass=\"icon option__icon\"\n\t\t\t\t:class=\"icon\"\n\t\t\t\t:aria-label=\"iconName\" />\n\t\t</slot>\n\t</span>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcHighlight from '../NcHighlight/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\n\nimport { userStatus } from '../../mixins/index.js'\n\n// global margin, ^2 ratio\nconst margin = 8\nconst defaultSize = 32\n\nexport default {\n\tname: 'NcListItemIcon',\n\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcHighlight,\n\t\tNcIconSvgWrapper,\n\t},\n\n\tmixins: [\n\t\tuserStatus,\n\t],\n\n\tprops: {\n\t\t/**\n\t\t * Default first line text\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Secondary optional line\n\t\t * Only visible on size of 32 and above\n\t\t */\n\t\tsubname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Icon class to be displayed at the end of the component\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * SVG icon to be displayed at the end of the component\n\t\t */\n\t\ticonSvg: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Descriptive name for the icon\n\t\t */\n\t\ticonName: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Search within the highlight of name/subname\n\t\t */\n\t\tsearch: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Set a size in px that will define the avatar height/width\n\t\t * and therefore, the height of the component\n\t\t */\n\t\tavatarSize: {\n\t\t\ttype: Number,\n\t\t\tdefault: defaultSize,\n\t\t},\n\n\t\t/**\n\t\t * Disable the margins of this component.\n\t\t * Useful for integration in `NcSelect` for example\n\t\t */\n\t\tnoMargin: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * See the [Avatar](#Avatar) displayName prop\n\t\t * Fallback to name\n\t\t */\n\t\tdisplayName: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * See the [Avatar](#Avatar) isNoUser prop\n\t\t * Enable/disable the UserStatus fetching\n\t\t */\n\t\tisNoUser: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Unique list item ID\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tmargin,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\thasIcon() {\n\t\t\treturn this.icon !== ''\n\t\t},\n\n\t\thasIconSvg() {\n\t\t\treturn this.iconSvg !== ''\n\t\t},\n\n\t\tisValidSubname() {\n\t\t\treturn this.subname?.trim?.() !== ''\n\t\t},\n\n\t\tisSizeBigEnough() {\n\t\t\treturn this.avatarSize >= defaultSize\n\t\t},\n\n\t\tcssVars() {\n\t\t\t// Don't use margin to calculate the height if noMargin\n\t\t\tconst margin = this.noMargin ? 0 : this.margin\n\n\t\t\treturn {\n\t\t\t\t'--height': this.avatarSize + 2 * margin + 'px',\n\t\t\t\t'--margin': this.margin + 'px',\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Seperates the search property into two parts, the first one is the search part on the name, the second on the subname.\n\t\t * @return {[string, string]}\n\t\t */\n\t\tsearchParts() {\n\t\t\t// Match the email notation like \"Jane <j.doe@example.com>\" with the email address as matching group\n\t\t\tconst EMAIL_NOTATION = /^([^<]*)<([^>]+)>?$/\n\n\t\t\tconst match = this.search.match(EMAIL_NOTATION)\n\t\t\tif (this.isNoUser || !match) {\n\t\t\t\treturn [this.search, this.search]\n\t\t\t}\n\t\t\treturn [match[1].trim(), match[2]]\n\t\t},\n\t},\n\n\tbeforeMount() {\n\t\t// If we don't have a subname and if this is a user\n\t\tif (!this.isNoUser && !this.subname) {\n\t\t\tthis.fetchUserStatus(this.user)\n\t\t}\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.option {\n\tdisplay: flex;\n\talign-items: center;\n\twidth: 100%;\n\theight: var(--height);\n\tcursor: inherit;\n\n\t&__avatar {\n\t\tmargin-right: var(--margin);\n\t}\n\n\t&__details {\n\t\tdisplay: flex;\n\t\tflex: 1 1;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\tmin-width: 0;\n\t}\n\n\t&__lineone {\n\t\tcolor: var(--color-main-text);\n\t}\n\n\t&__linetwo {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__lineone,\n\t&__linetwo {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tline-height: 1.1em;\n\t\tstrong {\n\t\t\tfont-weight: bold;\n\t\t}\n\t}\n\n\t&__icon {\n\t\twidth: var(--default-clickable-area);\n\t\theight: var(--default-clickable-area);\n\t\tcolor: var(--color-text-maxcontrast);\n\t\t&.icon {\n\t\t\tflex: 0 0 var(--default-clickable-area);\n\t\t\topacity: $opacity_normal;\n\t\t\tbackground-position: center;\n\t\t\tbackground-size: 16px;\n\t\t}\n\t}\n\n\t&__details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A,OAAA;AACA,WAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,UAAA;AACA,aAAA,KAAA,SAAA;AAAA,IACA;AAAA,IAEA,aAAA;AACA,aAAA,KAAA,YAAA;AAAA,IACA;AAAA,IAEA,iBAAA;;AACA,eAAA,gBAAA,YAAA,mBAAA,SAAA,iCAAA;AAAA,IACA;AAAA,IAEA,kBAAA;AACA,aAAA,KAAA,cAAA;AAAA,IACA;AAAA,IAEA,UAAA;AAEA,YAAAA,UAAA,KAAA,WAAA,IAAA,KAAA;AAEA,aAAA;AAAA,QACA,YAAA,KAAA,aAAA,IAAAA,UAAA;AAAA,QACA,YAAA,KAAA,SAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AAEA,YAAA,iBAAA;AAEA,YAAA,QAAA,KAAA,OAAA,MAAA,cAAA;AACA,UAAA,KAAA,YAAA,CAAA,OAAA;AACA,eAAA,CAAA,KAAA,QAAA,KAAA,MAAA;AAAA,MACA;AACA,aAAA,CAAA,MAAA,CAAA,EAAA,KAAA,GAAA,MAAA,CAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,cAAA;AAEA,QAAA,CAAA,KAAA,YAAA,CAAA,KAAA,SAAA;AACA,WAAA,gBAAA,KAAA,IAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcListItemIcon-Bo4o5oVB.mjs","sources":["../../src/components/NcListItemIcon/NcListItemIcon.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n## This is used to display a avatar-name/subname + icon layout\nIt might be used for list rendering or within the multiselect for example\n\n> **Note:** Any binding will be forwarded on the Avatar component root\n\n```vue\n<NcListItemIcon name=\"User 1\" />\n<NcListItemIcon name=\"User 1\" subname=\"Hidden subname because size is too small\" :avatar-size=\"24\" />\n```\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"User 1\" :avatar-size=\"44\">\n\t\t\t<template>\n\t\t\t\t<Account :size=\"20\" />\n\t\t\t</template>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport Account from 'vue-material-design-icons/Account.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tAccount,\n\t\t},\n\t}\n\t</script>\n```\n\n### With icon\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"Group 1\" subname=\"13 members\" :is-no-user=\"true\">\n\t\t\t<template>\n\t\t\t\t<AccountMultiple :size=\"20\" />\n\t\t\t</template>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport AccountMultiple from 'vue-material-design-icons/AccountMultiple.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tAccountMultiple,\n\t\t},\n\t}\n\t</script>\n```\n\n### Searching\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"Test user 1\" subname=\"callmetest@domain.com\" search=\"test\" />\n\t\t<NcListItemIcon name=\"Testing admin\" subname=\"testme@example.com\" search=\"test\" />\n\t\t<NcListItemIcon name=\"Test group 2\" subname=\"loremipsum@domain.com\" :is-no-user=\"true\" search=\"test\">\n\t\t\t<template>\n\t\t\t\t<AccountMultiple :size=\"20\" />\n\t\t\t</template>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport AccountMultiple from 'vue-material-design-icons/AccountMultiple.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tAccountMultiple,\n\t\t},\n\t}\n\t</script>\n```\n\n### With actions\n```vue\n\t<template>\n\t\t<NcListItemIcon name=\"Test user 1\" subname=\"callmetest@domain.com\">\n\t\t\t<NcActions>\n\t\t\t\t<NcActionButton @click=\"alert('Edit')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tEdit\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton @click=\"alert('Delete')\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\tDelete\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActions>\n\t\t</NcListItemIcon>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Pencil from 'vue-material-design-icons/Pencil.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPencil,\n\t\t},\n\t}\n\t</script>\n```\n</docs>\n\n<template>\n\t<span :id=\"id\"\n\t\tclass=\"option\"\n\t\t:class=\"{ 'option--compact': avatarSize < defaultSize }\"\n\t\t:style=\"cssVars\"\n\t\tv-on=\"$listeners\">\n\t\t<NcAvatar v-bind=\"$attrs\"\n\t\t\t:disable-menu=\"true\"\n\t\t\t:disable-tooltip=\"true\"\n\t\t\t:display-name=\"displayName || name\"\n\t\t\t:is-no-user=\"isNoUser\"\n\t\t\t:size=\"avatarSize\"\n\t\t\tclass=\"option__avatar\" />\n\t\t<div class=\"option__details\">\n\t\t\t<NcHighlight class=\"option__lineone\"\n\t\t\t\t:text=\"name\"\n\t\t\t\t:search=\"searchParts[0]\" />\n\t\t\t<NcHighlight v-if=\"isValidSubname && isSizeBigEnough\"\n\t\t\t\tclass=\"option__linetwo\"\n\t\t\t\t:text=\"subname\"\n\t\t\t\t:search=\"searchParts[1]\" />\n\t\t\t<span v-else-if=\"hasStatus\">\n\t\t\t\t<span>{{ userStatus.icon }}</span>\n\t\t\t\t<span>{{ userStatus.message }}</span>\n\t\t\t</span>\n\t\t</div>\n\n\t\t<!-- @slot use this slot to add a custom icon or actions -->\n\t\t<slot>\n\t\t\t<NcIconSvgWrapper v-if=\"hasIconSvg\"\n\t\t\t\tclass=\"option__icon\"\n\t\t\t\t:svg=\"iconSvg\"\n\t\t\t\t:name=\"iconName\" />\n\t\t\t<span v-else-if=\"hasIcon\"\n\t\t\t\tclass=\"icon option__icon\"\n\t\t\t\t:class=\"icon\"\n\t\t\t\t:aria-label=\"iconName\" />\n\t\t</slot>\n\t</span>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcHighlight from '../NcHighlight/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\n\nimport { userStatus } from '../../mixins/index.js'\n\n// global margin, ^2 ratio\nconst margin = 8\nconst defaultSize = 32\n\nexport default {\n\tname: 'NcListItemIcon',\n\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcHighlight,\n\t\tNcIconSvgWrapper,\n\t},\n\n\tmixins: [\n\t\tuserStatus,\n\t],\n\n\tprops: {\n\t\t/**\n\t\t * Default first line text\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Secondary optional line\n\t\t * Only visible on size of 32 and above\n\t\t */\n\t\tsubname: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Icon class to be displayed at the end of the component\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * SVG icon to be displayed at the end of the component\n\t\t */\n\t\ticonSvg: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Descriptive name for the icon\n\t\t */\n\t\ticonName: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Search within the highlight of name/subname\n\t\t */\n\t\tsearch: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Set a size in px that will define the avatar height/width\n\t\t * and therefore, the height of the component\n\t\t */\n\t\tavatarSize: {\n\t\t\ttype: Number,\n\t\t\tdefault: defaultSize,\n\t\t},\n\n\t\t/**\n\t\t * Disable the margins of this component.\n\t\t * Useful for integration in `NcSelect` for example\n\t\t */\n\t\tnoMargin: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * See the [Avatar](#Avatar) displayName prop\n\t\t * Fallback to name\n\t\t */\n\t\tdisplayName: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\t/**\n\t\t * See the [Avatar](#Avatar) isNoUser prop\n\t\t * Enable/disable the UserStatus fetching\n\t\t */\n\t\tisNoUser: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Unique list item ID\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tsetup() {\n\t\treturn {\n\t\t\tmargin,\n\t\t\tdefaultSize,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\thasIcon() {\n\t\t\treturn this.icon !== ''\n\t\t},\n\n\t\thasIconSvg() {\n\t\t\treturn this.iconSvg !== ''\n\t\t},\n\n\t\tisValidSubname() {\n\t\t\treturn this.subname?.trim?.() !== ''\n\t\t},\n\n\t\tisSizeBigEnough() {\n\t\t\treturn this.avatarSize >= 26 // the font sizes\n\t\t},\n\n\t\tcssVars() {\n\t\t\t// Don't use margin to calculate the height if noMargin\n\t\t\tconst margin = this.noMargin ? 0 : this.margin\n\n\t\t\treturn {\n\t\t\t\t'--height': this.avatarSize + 2 * margin + 'px',\n\t\t\t\t'--margin': this.margin + 'px',\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Seperates the search property into two parts, the first one is the search part on the name, the second on the subname.\n\t\t * @return {[string, string]}\n\t\t */\n\t\tsearchParts() {\n\t\t\t// Match the email notation like \"Jane <j.doe@example.com>\" with the email address as matching group\n\t\t\tconst EMAIL_NOTATION = /^([^<]*)<([^>]+)>?$/\n\n\t\t\tconst match = this.search.match(EMAIL_NOTATION)\n\t\t\tif (this.isNoUser || !match) {\n\t\t\t\treturn [this.search, this.search]\n\t\t\t}\n\t\t\treturn [match[1].trim(), match[2]]\n\t\t},\n\t},\n\n\tbeforeMount() {\n\t\t// If we don't have a subname and if this is a user\n\t\tif (!this.isNoUser && !this.subname) {\n\t\t\tthis.fetchUserStatus(this.user)\n\t\t}\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.option {\n\tdisplay: flex;\n\talign-items: center;\n\twidth: 100%;\n\theight: var(--height);\n\tcursor: inherit;\n\n\t&__avatar {\n\t\tmargin-right: var(--margin);\n\t}\n\n\t&__details {\n\t\tdisplay: flex;\n\t\tflex: 1 1;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\tmin-width: 0;\n\t}\n\n\t&__lineone {\n\t\tcolor: var(--color-main-text);\n\t}\n\n\t&__linetwo {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\t&__lineone,\n\t&__linetwo {\n\t\toverflow: hidden;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tline-height: 1.2;\n\t\tstrong {\n\t\t\tfont-weight: bold;\n\t\t}\n\t}\n\n\t&--compact {\n\t\t.option {\n\t\t\t&__lineone {\n\t\t\t\tfont-size: 14px;\n\t\t\t}\n\t\t\t&__linetwo {\n\t\t\t\tfont-size: 11px;\n\t\t\t\tline-height: 1.5;\n\t\t\t\tmargin-top: -4px;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__icon {\n\t\twidth: var(--default-clickable-area);\n\t\theight: var(--default-clickable-area);\n\t\tcolor: var(--color-text-maxcontrast);\n\t\t&.icon {\n\t\t\tflex: 0 0 var(--default-clickable-area);\n\t\t\topacity: $opacity_normal;\n\t\t\tbackground-position: center;\n\t\t\tbackground-size: 16px;\n\t\t}\n\t}\n\n\t&__details,\n\t&__lineone,\n\t&__linetwo,\n\t&__icon {\n\t\tcursor: inherit;\n\t}\n}\n</style>\n"],"names":["margin"],"mappings":";;;;;;;;;;;;AA+JA,MAAA,SAAA;AACA,MAAA,cAAA;AAEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AA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BAAA;;AACA,eAAA,gBAAA,YAAA,mBAAA,SAAA,iCAAA;AAAA,IACA;AAAA,IAEA,kBAAA;AACA,aAAA,KAAA,cAAA;AAAA,IACA;AAAA,IAEA,UAAA;AAEA,YAAAA,UAAA,KAAA,WAAA,IAAA,KAAA;AAEA,aAAA;AAAA,QACA,YAAA,KAAA,aAAA,IAAAA,UAAA;AAAA,QACA,YAAA,KAAA,SAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,cAAA;AAEA,YAAA,iBAAA;AAEA,YAAA,QAAA,KAAA,OAAA,MAAA,cAAA;AACA,UAAA,KAAA,YAAA,CAAA,OAAA;AACA,eAAA,CAAA,KAAA,QAAA,KAAA,MAAA;AAAA,MACA;AACA,aAAA,CAAA,MAAA,CAAA,EAAA,KAAA,GAAA,MAAA,CAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,cAAA;AAEA,QAAA,CAAA,KAAA,YAAA,CAAA,KAAA,SAAA;AACA,WAAA,gBAAA,KAAA,IAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
@@ -1,10 +1,11 @@
1
- import { n as normalizeComponent } from "./_plugin-vue2_normalizer-D637Qkok.mjs";
1
+ import '../assets/NcPasswordField-DWd5gg73.css';
2
+ import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
2
3
  import NcInputField from "../Components/NcInputField.mjs";
3
4
  import debounce from "debounce";
4
5
  import axios from "@nextcloud/axios";
5
6
  import { loadState } from "@nextcloud/initial-state";
6
7
  import { generateOcsUrl } from "@nextcloud/router";
7
- import { r as register, y as t28, a as t } from "./_l10n-em5EAi4q.mjs";
8
+ import { r as register, E as t28, a as t } from "./_l10n-B4dEPXsr.mjs";
8
9
  import { getLoggerBuilder } from "@nextcloud/logger";
9
10
  const _sfc_main$2 = {
10
11
  name: "EyeIcon",
@@ -36,8 +37,6 @@ var __component__$2 = /* @__PURE__ */ normalizeComponent(
36
37
  _sfc_staticRenderFns$2,
37
38
  false,
38
39
  null,
39
- null,
40
- null,
41
40
  null
42
41
  );
43
42
  const Eye = __component__$2.exports;
@@ -71,8 +70,6 @@ var __component__$1 = /* @__PURE__ */ normalizeComponent(
71
70
  _sfc_staticRenderFns$1,
72
71
  false,
73
72
  null,
74
- null,
75
- null,
76
73
  null
77
74
  );
78
75
  const EyeOff = __component__$1.exports;
@@ -135,6 +132,17 @@ const _sfc_main = {
135
132
  maxlength: {
136
133
  type: Number,
137
134
  default: null
135
+ },
136
+ /**
137
+ * Render as input[type=text] that looks like password field.
138
+ * Allows to avoid unwanted password-specific browser behavior,
139
+ * such as save or generate password prompt.
140
+ * Useful for secret token fields.
141
+ * Note: autocomplete="off" is ignored by browsers.
142
+ */
143
+ asText: {
144
+ type: Boolean,
145
+ default: false
138
146
  }
139
147
  },
140
148
  emits: [
@@ -234,7 +242,7 @@ const _sfc_main = {
234
242
  };
235
243
  var _sfc_render = function render3() {
236
244
  var _vm = this, _c = _vm._self._c;
237
- return _c("NcInputField", _vm._g(_vm._b({ ref: "inputField", attrs: { "type": _vm.isPasswordHidden ? "password" : "text", "trailing-button-label": _vm.trailingButtonLabelPassword, "helper-text": _vm.computedHelperText, "error": _vm.computedError, "success": _vm.computedSuccess, "minlength": _vm.rules.minlength }, on: { "trailing-button-click": _vm.togglePasswordVisibility, "input": _vm.handleInput }, scopedSlots: _vm._u([{ key: "trailing-button-icon", fn: function() {
245
+ return _c("NcInputField", _vm._g(_vm._b({ ref: "inputField", attrs: { "type": _vm.isPasswordHidden && !_vm.asText ? "password" : "text", "trailing-button-label": _vm.trailingButtonLabelPassword, "helper-text": _vm.computedHelperText, "error": _vm.computedError, "success": _vm.computedSuccess, "minlength": _vm.rules.minlength, "input-class": { "password-field__input--secure-text": _vm.isPasswordHidden && _vm.asText } }, on: { "trailing-button-click": _vm.togglePasswordVisibility, "input": _vm.handleInput }, scopedSlots: _vm._u([{ key: "trailing-button-icon", fn: function() {
238
246
  return [_vm.isPasswordHidden ? _c("Eye", { attrs: { "size": 18 } }) : _c("EyeOff", { attrs: { "size": 18 } })];
239
247
  }, proxy: true }]) }, "NcInputField", _vm.propsAndAttrsToForward, false), _vm.$listeners), [_vm._t("default")], 2);
240
248
  };
@@ -245,9 +253,7 @@ var __component__ = /* @__PURE__ */ normalizeComponent(
245
253
  _sfc_staticRenderFns,
246
254
  false,
247
255
  null,
248
- null,
249
- null,
250
- null
256
+ "d984b8e5"
251
257
  );
252
258
  const NcPasswordField = __component__.exports;
253
259
  export {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NcPasswordField-BbbShH-t.mjs","sources":["../../node_modules/vue-material-design-icons/Eye.vue","../../node_modules/vue-material-design-icons/EyeOff.vue","../../src/utils/logger.js","../../src/components/NcPasswordField/NcPasswordField.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : true\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-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,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeIcon\",\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>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : true\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-off-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=\"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeOffIcon\",\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: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.detectUser()\n\t.setApp('@nextcloud/vue')\n\t.build()\n","<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose password field component.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcPasswordField :value.sync=\"text1\"\n\t\t\tlabel=\"Old password\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">New password</label>\n\t\t\t<NcPasswordField id=\"textField\"\n\t\t\t\t:value.sync=\"text2\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\" />\n\t\t</div>\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField2\">New password</label>\n\t\t\t<NcPasswordField id=\"textField2\"\n\t\t\t\t:value.sync=\"text3\"\n\t\t\t\t:error=\"true\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\t\thelper-text=\"Password is insecure\" />\n\t\t</div>\n\n\t\t<NcPasswordField :value.sync=\"text4\"\n\t\t\tlabel=\"Good new password\"\n\t\t\t:success=\"true\"\n\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\thelper-text=\"Password is secure\" />\n\n\t\t<NcPasswordField :value.sync=\"text5\"\n\t\t\t:disabled=\"true\"\n\t\t\tlabel=\"Disabled\" />\n\n\t\t<NcPasswordField :value.sync=\"text6\"\n\t\t\tlabel=\"Secret token\"\n\t\t\tas-text />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: 'hunter',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t\ttext6: 'secret-token',\n\t\t}\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\tpadding-right: 14px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"propsAndAttrsToForward\"\n\t\tref=\"inputField\"\n\t\t:type=\"isPasswordHidden && !asText ? 'password' : 'text'\"\n\t\t:trailing-button-label=\"trailingButtonLabelPassword\"\n\t\t:helper-text=\"computedHelperText\"\n\t\t:error=\"computedError\"\n\t\t:success=\"computedSuccess\"\n\t\t:minlength=\"rules.minlength\"\n\t\t:input-class=\"{ 'password-field__input--secure-text': isPasswordHidden && asText }\"\n\t\tv-on=\"$listeners\"\n\t\t@trailing-button-click=\"togglePasswordVisibility\"\n\t\t@input=\"handleInput\">\n\t\t<!-- Default slot for the leading icon -->\n\t\t<slot />\n\t\t<template #trailing-button-icon>\n\t\t\t<Eye v-if=\"isPasswordHidden\" :size=\"18\" />\n\t\t\t<EyeOff v-else :size=\"18\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\n\nimport Eye from 'vue-material-design-icons/Eye.vue'\nimport EyeOff from 'vue-material-design-icons/EyeOff.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\nimport debounce from 'debounce'\nimport axios from '@nextcloud/axios'\nimport { loadState } from '@nextcloud/initial-state'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { t } from '../../l10n.js'\nimport logger from '../../utils/logger.js'\n\n/**\n * @typedef PasswordPolicy\n * @property {object} api - The URLs to the password_policy app methods\n * @property {string} api.generate - The URL to the password generator\n * @property {string} api.validate - The URL to the password validator\n * @property {boolean} enforceNonCommonPassword - Whether to enforce non common passwords\n * @property {boolean} enforceNumericCharacters - Whether to enforce numeric characters\n * @property {boolean} enforceSpecialCharacters - Whether to enforce special characters\n * @property {boolean} enforceUpperLowerCase - Whether to enforce upper and lower case\n * @property {number} minLength - The minimum length of the password\n */\n\n/** @type {PasswordPolicy|null} */\nconst passwordPolicy = loadState('core', 'capabilities', {}).password_policy || null\n\nconst NcInputFieldProps = new Set(Object.keys(NcInputField.props))\n\nexport default {\n\tname: 'NcPasswordField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tEye,\n\t\tEyeOff,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Any [NcInputField](#/Components/NcFields?id=ncinputfield) props\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\n\t\t// Reuse all the props from NcInputField for better typing and documentation\n\t\t...NcInputField.props,\n\n\t\t// Redefined props\n\n\t\t/**\n\t\t * Controls whether to display the trailing button.\n\t\t */\n\t\t showTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t// Removed NcInputField props, defined only by this component\n\n\t\ttrailingButtonLabel: undefined,\n\n\t\t// Custom props\n\n\t\t/**\n\t\t * Check if the user entered a valid password using the password_policy\n\t\t * app if available.\n\t\t *\n\t\t * Warning: this doesn't replace server side checking and will do nothing\n\t\t * if the password_policy app is disabled.\n\t\t */\n\t\tcheckPasswordStrength: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The minlength property defines the minimum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tminlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\n\t\t/**\n\t\t * The maxlength property defines the maximum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tmaxlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Render as input[type=text] that looks like password field.\n\t\t * Allows to avoid unwanted password-specific browser behavior,\n\t\t * such as save or generate password prompt.\n\t\t * Useful for secret token fields.\n\t\t * Note: autocomplete=\"off\" is ignored by browsers.\n\t\t */\n\t\tasText: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'valid',\n\t\t'invalid',\n\t\t'update:value',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tisPasswordHidden: true,\n\t\t\tinternalHelpMessage: '',\n\t\t\tisValid: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcomputedError() {\n\t\t\treturn this.error || this.isValid === false\n\t\t},\n\t\tcomputedSuccess() {\n\t\t\treturn this.success || this.isValid === true\n\t\t},\n\t\tcomputedHelperText() {\n\t\t\tif (this.helperText.length > 0) {\n\t\t\t\treturn this.helperText\n\t\t\t}\n\t\t\treturn this.internalHelpMessage\n\t\t},\n\n\t\trules() {\n\t\t\tconst { minlength } = this\n\t\t\treturn {\n\t\t\t\tminlength: minlength ?? passwordPolicy?.minLength,\n\t\t\t}\n\t\t},\n\n\t\ttrailingButtonLabelPassword() {\n\t\t\treturn this.isPasswordHidden ? t('Show password') : t('Hide password')\n\t\t},\n\n\t\tpropsAndAttrsToForward() {\n\t\t\treturn {\n\t\t\t\t// Proxy all the HTML attributes\n\t\t\t\t...this.$attrs,\n\t\t\t\t// Proxy original NcInputField's props\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\tObject.entries(this.$props).filter(([key]) => NcInputFieldProps.has(key)),\n\t\t\t\t),\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tvalue(newValue) {\n\t\t\tif (this.checkPasswordStrength) {\n\t\t\t\tif (passwordPolicy === null) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.checkPassword(newValue)\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.inputField.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.inputField.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\t/**\n\t\t\t * Triggers when the value inside the password field is\n\t\t\t * updated.\n\t\t\t *\n\t\t\t * @property {string} The new value\n\t\t\t */\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t\ttogglePasswordVisibility() {\n\t\t\tthis.isPasswordHidden = !this.isPasswordHidden\n\t\t},\n\t\tcheckPassword: debounce(async function(password) {\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.post(generateOcsUrl('apps/password_policy/api/v1/validate'), { password })\n\t\t\t\tthis.isValid = data.ocs.data.passed\n\t\t\t\tif (data.ocs.data.passed) {\n\t\t\t\t\tthis.internalHelpMessage = t('Password is secure')\n\t\t\t\t\t/**\n\t\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t\t * password entered is valid.\n\t\t\t\t\t */\n\t\t\t\t\tthis.$emit('valid')\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.internalHelpMessage = data.ocs.data.reason\n\t\t\t\t/**\n\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t * password entered is invalid.\n\t\t\t\t */\n\t\t\t\tthis.$emit('invalid')\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error('Password policy returned an error', e)\n\t\t\t}\n\t\t}, 500),\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n:deep(.password-field__input--secure-text) {\n\t// Emulate password field look\n\t// This is not a part of the standard but well supported\n\t-webkit-text-security: disc;\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;;;;;;;;;;;;;;;;;AChBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;A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A,UAAA;AACA,cAAA,EAAA,SAAA,MAAA,MAAA,KAAA,eAAA,sCAAA,GAAA,EAAA,UAAA;AACA,aAAA,UAAA,KAAA,IAAA,KAAA;AACA,YAAA,KAAA,IAAA,KAAA,QAAA;AACA,eAAA,sBAAA,EAAA,oBAAA;AAKA,eAAA,MAAA,OAAA;AACA;AAAA,QACA;AAEA,aAAA,sBAAA,KAAA,IAAA,KAAA;AAKA,aAAA,MAAA,SAAA;AAAA,MACA,SAAA,GAAA;AACA,eAAA,MAAA,qCAAA,CAAA;AAAA,MACA;AAAA,IACA,GAAA,GAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1]}
@@ -1,11 +1,12 @@
1
+ require('../assets/NcPasswordField-DWd5gg73.css');
1
2
  "use strict";
2
- const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-DbFIE4_M.cjs");
3
+ const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
3
4
  const Components_NcInputField = require("../Components/NcInputField.cjs");
4
5
  const debounce = require("debounce");
5
6
  const axios = require("@nextcloud/axios");
6
7
  const initialState = require("@nextcloud/initial-state");
7
8
  const router = require("@nextcloud/router");
8
- const _l10n = require("./_l10n-Dkgq8-k1.cjs");
9
+ const _l10n = require("./_l10n-BEDw4wKe.cjs");
9
10
  const logger$1 = require("@nextcloud/logger");
10
11
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
11
12
  const debounce__default = /* @__PURE__ */ _interopDefault(debounce);
@@ -40,8 +41,6 @@ var __component__$2 = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
40
41
  _sfc_staticRenderFns$2,
41
42
  false,
42
43
  null,
43
- null,
44
- null,
45
44
  null
46
45
  );
47
46
  const Eye = __component__$2.exports;
@@ -75,8 +74,6 @@ var __component__$1 = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
75
74
  _sfc_staticRenderFns$1,
76
75
  false,
77
76
  null,
78
- null,
79
- null,
80
77
  null
81
78
  );
82
79
  const EyeOff = __component__$1.exports;
@@ -139,6 +136,17 @@ const _sfc_main = {
139
136
  maxlength: {
140
137
  type: Number,
141
138
  default: null
139
+ },
140
+ /**
141
+ * Render as input[type=text] that looks like password field.
142
+ * Allows to avoid unwanted password-specific browser behavior,
143
+ * such as save or generate password prompt.
144
+ * Useful for secret token fields.
145
+ * Note: autocomplete="off" is ignored by browsers.
146
+ */
147
+ asText: {
148
+ type: Boolean,
149
+ default: false
142
150
  }
143
151
  },
144
152
  emits: [
@@ -238,7 +246,7 @@ const _sfc_main = {
238
246
  };
239
247
  var _sfc_render = function render3() {
240
248
  var _vm = this, _c = _vm._self._c;
241
- return _c("NcInputField", _vm._g(_vm._b({ ref: "inputField", attrs: { "type": _vm.isPasswordHidden ? "password" : "text", "trailing-button-label": _vm.trailingButtonLabelPassword, "helper-text": _vm.computedHelperText, "error": _vm.computedError, "success": _vm.computedSuccess, "minlength": _vm.rules.minlength }, on: { "trailing-button-click": _vm.togglePasswordVisibility, "input": _vm.handleInput }, scopedSlots: _vm._u([{ key: "trailing-button-icon", fn: function() {
249
+ return _c("NcInputField", _vm._g(_vm._b({ ref: "inputField", attrs: { "type": _vm.isPasswordHidden && !_vm.asText ? "password" : "text", "trailing-button-label": _vm.trailingButtonLabelPassword, "helper-text": _vm.computedHelperText, "error": _vm.computedError, "success": _vm.computedSuccess, "minlength": _vm.rules.minlength, "input-class": { "password-field__input--secure-text": _vm.isPasswordHidden && _vm.asText } }, on: { "trailing-button-click": _vm.togglePasswordVisibility, "input": _vm.handleInput }, scopedSlots: _vm._u([{ key: "trailing-button-icon", fn: function() {
242
250
  return [_vm.isPasswordHidden ? _c("Eye", { attrs: { "size": 18 } }) : _c("EyeOff", { attrs: { "size": 18 } })];
243
251
  }, proxy: true }]) }, "NcInputField", _vm.propsAndAttrsToForward, false), _vm.$listeners), [_vm._t("default")], 2);
244
252
  };
@@ -249,9 +257,7 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
249
257
  _sfc_staticRenderFns,
250
258
  false,
251
259
  null,
252
- null,
253
- null,
254
- null
260
+ "d984b8e5"
255
261
  );
256
262
  const NcPasswordField = __component__.exports;
257
263
  exports.NcPasswordField = NcPasswordField;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NcPasswordField-DYyZIkoL.cjs","sources":["../../node_modules/vue-material-design-icons/Eye.vue","../../node_modules/vue-material-design-icons/EyeOff.vue","../../src/utils/logger.js","../../src/components/NcPasswordField/NcPasswordField.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : true\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-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,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeIcon\",\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>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : true\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-off-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=\"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeOffIcon\",\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: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.detectUser()\n\t.setApp('@nextcloud/vue')\n\t.build()\n","<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose password field component.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcPasswordField :value.sync=\"text1\"\n\t\t\tlabel=\"Old password\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">New password</label>\n\t\t\t<NcPasswordField id=\"textField\"\n\t\t\t\t:value.sync=\"text2\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\" />\n\t\t</div>\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField2\">New password</label>\n\t\t\t<NcPasswordField id=\"textField2\"\n\t\t\t\t:value.sync=\"text3\"\n\t\t\t\t:error=\"true\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\t\thelper-text=\"Password is insecure\" />\n\t\t</div>\n\n\t\t<NcPasswordField :value.sync=\"text4\"\n\t\t\tlabel=\"Good new password\"\n\t\t\t:success=\"true\"\n\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\thelper-text=\"Password is secure\" />\n\n\t\t<NcPasswordField :value.sync=\"text5\"\n\t\t\t:disabled=\"true\"\n\t\t\tlabel=\"Disabled\" />\n\n\t\t<NcPasswordField :value.sync=\"text6\"\n\t\t\tlabel=\"Secret token\"\n\t\t\tas-text />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: 'hunter',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t\ttext6: 'secret-token',\n\t\t}\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\tpadding-right: 14px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-bind=\"propsAndAttrsToForward\"\n\t\tref=\"inputField\"\n\t\t:type=\"isPasswordHidden && !asText ? 'password' : 'text'\"\n\t\t:trailing-button-label=\"trailingButtonLabelPassword\"\n\t\t:helper-text=\"computedHelperText\"\n\t\t:error=\"computedError\"\n\t\t:success=\"computedSuccess\"\n\t\t:minlength=\"rules.minlength\"\n\t\t:input-class=\"{ 'password-field__input--secure-text': isPasswordHidden && asText }\"\n\t\tv-on=\"$listeners\"\n\t\t@trailing-button-click=\"togglePasswordVisibility\"\n\t\t@input=\"handleInput\">\n\t\t<!-- Default slot for the leading icon -->\n\t\t<slot />\n\t\t<template #trailing-button-icon>\n\t\t\t<Eye v-if=\"isPasswordHidden\" :size=\"18\" />\n\t\t\t<EyeOff v-else :size=\"18\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\n\nimport Eye from 'vue-material-design-icons/Eye.vue'\nimport EyeOff from 'vue-material-design-icons/EyeOff.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\nimport debounce from 'debounce'\nimport axios from '@nextcloud/axios'\nimport { loadState } from '@nextcloud/initial-state'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { t } from '../../l10n.js'\nimport logger from '../../utils/logger.js'\n\n/**\n * @typedef PasswordPolicy\n * @property {object} api - The URLs to the password_policy app methods\n * @property {string} api.generate - The URL to the password generator\n * @property {string} api.validate - The URL to the password validator\n * @property {boolean} enforceNonCommonPassword - Whether to enforce non common passwords\n * @property {boolean} enforceNumericCharacters - Whether to enforce numeric characters\n * @property {boolean} enforceSpecialCharacters - Whether to enforce special characters\n * @property {boolean} enforceUpperLowerCase - Whether to enforce upper and lower case\n * @property {number} minLength - The minimum length of the password\n */\n\n/** @type {PasswordPolicy|null} */\nconst passwordPolicy = loadState('core', 'capabilities', {}).password_policy || null\n\nconst NcInputFieldProps = new Set(Object.keys(NcInputField.props))\n\nexport default {\n\tname: 'NcPasswordField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tEye,\n\t\tEyeOff,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Any [NcInputField](#/Components/NcFields?id=ncinputfield) props\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\n\t\t// Reuse all the props from NcInputField for better typing and documentation\n\t\t...NcInputField.props,\n\n\t\t// Redefined props\n\n\t\t/**\n\t\t * Controls whether to display the trailing button.\n\t\t */\n\t\t showTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t// Removed NcInputField props, defined only by this component\n\n\t\ttrailingButtonLabel: undefined,\n\n\t\t// Custom props\n\n\t\t/**\n\t\t * Check if the user entered a valid password using the password_policy\n\t\t * app if available.\n\t\t *\n\t\t * Warning: this doesn't replace server side checking and will do nothing\n\t\t * if the password_policy app is disabled.\n\t\t */\n\t\tcheckPasswordStrength: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The minlength property defines the minimum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tminlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\n\t\t/**\n\t\t * The maxlength property defines the maximum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tmaxlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Render as input[type=text] that looks like password field.\n\t\t * Allows to avoid unwanted password-specific browser behavior,\n\t\t * such as save or generate password prompt.\n\t\t * Useful for secret token fields.\n\t\t * Note: autocomplete=\"off\" is ignored by browsers.\n\t\t */\n\t\tasText: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'valid',\n\t\t'invalid',\n\t\t'update:value',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tisPasswordHidden: true,\n\t\t\tinternalHelpMessage: '',\n\t\t\tisValid: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcomputedError() {\n\t\t\treturn this.error || this.isValid === false\n\t\t},\n\t\tcomputedSuccess() {\n\t\t\treturn this.success || this.isValid === true\n\t\t},\n\t\tcomputedHelperText() {\n\t\t\tif (this.helperText.length > 0) {\n\t\t\t\treturn this.helperText\n\t\t\t}\n\t\t\treturn this.internalHelpMessage\n\t\t},\n\n\t\trules() {\n\t\t\tconst { minlength } = this\n\t\t\treturn {\n\t\t\t\tminlength: minlength ?? passwordPolicy?.minLength,\n\t\t\t}\n\t\t},\n\n\t\ttrailingButtonLabelPassword() {\n\t\t\treturn this.isPasswordHidden ? t('Show password') : t('Hide password')\n\t\t},\n\n\t\tpropsAndAttrsToForward() {\n\t\t\treturn {\n\t\t\t\t// Proxy all the HTML attributes\n\t\t\t\t...this.$attrs,\n\t\t\t\t// Proxy original NcInputField's props\n\t\t\t\t...Object.fromEntries(\n\t\t\t\t\tObject.entries(this.$props).filter(([key]) => NcInputFieldProps.has(key)),\n\t\t\t\t),\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tvalue(newValue) {\n\t\t\tif (this.checkPasswordStrength) {\n\t\t\t\tif (passwordPolicy === null) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.checkPassword(newValue)\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.inputField.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.inputField.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\t/**\n\t\t\t * Triggers when the value inside the password field is\n\t\t\t * updated.\n\t\t\t *\n\t\t\t * @property {string} The new value\n\t\t\t */\n\t\t\tthis.$emit('update:value', event.target.value)\n\t\t},\n\t\ttogglePasswordVisibility() {\n\t\t\tthis.isPasswordHidden = !this.isPasswordHidden\n\t\t},\n\t\tcheckPassword: debounce(async function(password) {\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.post(generateOcsUrl('apps/password_policy/api/v1/validate'), { password })\n\t\t\t\tthis.isValid = data.ocs.data.passed\n\t\t\t\tif (data.ocs.data.passed) {\n\t\t\t\t\tthis.internalHelpMessage = t('Password is secure')\n\t\t\t\t\t/**\n\t\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t\t * password entered is valid.\n\t\t\t\t\t */\n\t\t\t\t\tthis.$emit('valid')\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.internalHelpMessage = data.ocs.data.reason\n\t\t\t\t/**\n\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t * password entered is invalid.\n\t\t\t\t */\n\t\t\t\tthis.$emit('invalid')\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error('Password policy returned an error', e)\n\t\t\t}\n\t\t}, 500),\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n:deep(.password-field__input--secure-text) {\n\t// Emulate password field look\n\t// This is not a part of the standard but well supported\n\t-webkit-text-security: disc;\n}\n</style>\n"],"names":["_sfc_main","getLoggerBuilder","loadState","NcInputField","t","debounce","axios","generateOcsUrl"],"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;;;;;;;;;;;;;;;;;AChBA,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;AA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A,EAAA,UAAA;AACA,aAAA,UAAA,KAAA,IAAA,KAAA;AACA,YAAA,KAAA,IAAA,KAAA,QAAA;AACA,eAAA,sBAAAH,MAAA,EAAA,oBAAA;AAKA,eAAA,MAAA,OAAA;AACA;AAAA,QACA;AAEA,aAAA,sBAAA,KAAA,IAAA,KAAA;AAKA,aAAA,MAAA,SAAA;AAAA,MACA,SAAA,GAAA;AACA,eAAA,MAAA,qCAAA,CAAA;AAAA,MACA;AAAA,IACA,GAAA,GAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1]}
@@ -4,7 +4,7 @@ const Vue = require("vue");
4
4
  const floatingVue = require("floating-vue");
5
5
  const focusTrap = require("focus-trap");
6
6
  const focusTrap$1 = require("./focusTrap-EeXFmjdI.cjs");
7
- const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-DbFIE4_M.cjs");
7
+ const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
8
8
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
9
9
  const Vue__default = /* @__PURE__ */ _interopDefault(Vue);
10
10
  const _sfc_main$1 = Vue.defineComponent({
@@ -48,8 +48,6 @@ var __component__$1 = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
48
48
  _sfc_staticRenderFns$1,
49
49
  false,
50
50
  null,
51
- null,
52
- null,
53
51
  null
54
52
  );
55
53
  const NcPopoverTriggerProvider = __component__$1.exports;
@@ -260,8 +258,6 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
260
258
  _sfc_staticRenderFns,
261
259
  false,
262
260
  null,
263
- null,
264
- null,
265
261
  null
266
262
  );
267
263
  const NcPopover = __component__.exports;
@@ -1 +1 @@
1
- {"version":3,"file":"NcPopover-Cl1AvQ5o.cjs","sources":["../../src/components/NcPopover/NcPopoverTriggerProvider.vue","../../src/components/NcPopover/NcPopover.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script>\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n\tname: 'NcPopoverTriggerProvider',\n\n\tprovide() {\n\t\treturn {\n\t\t\t'NcPopover:trigger:shown': () => this.shown,\n\t\t\t'NcPopover:trigger:attrs': () => this.triggerAttrs,\n\t\t}\n\t},\n\n\tprops: {\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\ttriggerAttrs() {\n\t\t\treturn {\n\t\t\t\t'aria-haspopup': this.popupRole,\n\t\t\t\t'aria-expanded': this.shown.toString(),\n\t\t\t}\n\t\t},\n\t},\n\n\trender() {\n\t\t// TODO: Vue 3 - replace with $slots\n\t\treturn this.$scopedSlots.default?.({\n\t\t\tattrs: this.triggerAttrs,\n\t\t})\n\t},\n})\n</script>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis component is just a wrapper for the floating-vue plugin by Akryum,\nplease refer to this documentation for customization:\nhttps://github.com/Akryum/floating-vue\n\nThis components has two slots:\n* 'trigger' which can be any html element and it will trigger the popover\nthis slot is optional since you can toggle the popover also by updating the\nopen prop on this component;\n\n* a default slot that is for the content of the popover.\n\n### Examples\n\n#### With a `<NcButton>` as a trigger:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\t<form tabindex=\"0\" role=\"dialog\" aria-labelledby=\"popover-example-dialog-header-1\" @submit.prevent>\n\t\t\t\t\t<h2 id=\"popover-example-dialog-header-1\">this is some content</h2>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. <br/>\n\t\t\t\t\t\tVestibulum eget placerat velit.\n\t\t\t\t\t</p>\n\t\t\t\t\t<label>\n\t\t\t\t\t\tLabel element\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"input element\"/>\n\t\t\t\t\t</label>\n\t\t\t\t</form>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Without focus trap:\n\nThe [`focus-trap`](https://github.com/focus-trap/focus-trap) emits an error when used in a non-focusable element tree.\n\nThe prop `:focus-trap=\"false\"` help to prevent it when the default behavior is not relevant.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover :focus-trap=\"false\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Click me!</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\tHi! 🚀\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With passing props to `floating-vue`'s `Dropdown`:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover container=\"body\" :popper-hide-triggers=\"(triggers) => [...triggers, 'click']\" popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template #default>\n\t\t\t\t<NcButton>Click on the button will close NcPopover</NcButton>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With a custom button in as a trigger:\n\nWhen `<NcButton>` is used as a `<NcPopover>` trigger, it injects required for a11y attributes to the button.\n\nIf you are using your own custom button as a trigger make sure to bind `attrs` from the trigger slot props.\nSee code example below.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover>\n\t\t\t<!-- Take \"attrs\" from the slot props -->\n\t\t\t<template #trigger=\"{ attrs }\">\n\t\t\t\t<!-- Bind attrs as the button attrs -->\n\t\t\t\t<button v-bind=\"attrs\">\n\t\t\t\t\tI am a custom button in the trigger\n\t\t\t\t</button>\n\t\t\t</template>\n\n\t\t\tHi! 🚀\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Provide role for the popover content\n\nFor accessibility reasons, popover should have a role. Provide it to the `popup-role` and make sure that the popover content is an element with the same role.\n\nSee: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<!-- Provide popup role -->\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Delete</NcButton>\n\t\t\t</template>\n\n\t\t\t<!-- Popover content should has the same role -->\n\t\t\t<div role=\"dialog\" aria-labelledby=\"popover-example-custom-role-1\" aria-modal=\"true\">\n\t\t\t\t<!-- This is not required but better to provide a label -->\n\t\t\t\t<header id=\"popover-example-custom-role-1\">\n\t\t\t\t\t<strong>Confirm remove</strong>\n\t\t\t\t</header>\n\t\t\t\t<NcButton type=\"danger\">Delete</NcButton>\n\t\t\t</div>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n</docs>\n\n<template>\n\t<Dropdown ref=\"popover\"\n\t\t:distance=\"10\"\n\t\t:arrow-padding=\"10\"\n\t\tv-bind=\"$attrs\"\n\t\t:no-auto-focus=\"true /* Handled by the focus trap */\"\n\t\t:popper-class=\"popoverBaseClass\"\n\t\t:shown=\"internalShown\"\n\t\tv-on=\"$listeners\"\n\t\t@update:shown=\"internalShown = $event\"\n\t\t@apply-show=\"afterShow\"\n\t\t@apply-hide=\"afterHide\">\n\t\t<NcPopoverTriggerProvider v-slot=\"slotProps\" :shown=\"internalShown\" :popup-role=\"popupRole\">\n\t\t\t<!-- This will be the popover target (for the events and position) -->\n\t\t\t<slot name=\"trigger\" v-bind=\"slotProps\" />\n\t\t</NcPopoverTriggerProvider>\n\n\t\t<!-- This will be the content of the popover -->\n\t\t<template #popper>\n\t\t\t<slot />\n\t\t</template>\n\t</Dropdown>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { Dropdown } from 'floating-vue'\nimport { createFocusTrap } from 'focus-trap'\nimport { getTrapStack } from '../../utils/focusTrap.js'\nimport NcPopoverTriggerProvider from './NcPopoverTriggerProvider.vue'\n\nexport default {\n\tname: 'NcPopover',\n\n\tcomponents: {\n\t\tDropdown,\n\t\tNcPopoverTriggerProvider,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Show or hide the popper\n\t\t * @see https://floating-vue.starpad.dev/api/#shown\n\t\t */\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Popup role\n\t\t * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#values\n\t\t */\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t\tvalidator: (value) => ['menu', 'listbox', 'tree', 'grid', 'dialog', 'true'].includes(value),\n\t\t},\n\n\t\tpopoverBaseClass: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * Enable popover focus trap\n\t\t */\n\t\tfocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\t/**\n\t\t * Set element to return focus to after focus trap deactivation\n\t\t *\n\t\t * @type {import('focus-trap').FocusTargetValueOrFalse}\n\t\t */\n\t\tsetReturnFocus: {\n\t\t\tdefault: undefined,\n\t\t\ttype: [HTMLElement, SVGElement, String, Boolean],\n\t\t},\n\t},\n\n\temits: [\n\t\t'after-show',\n\t\t'after-hide',\n\t\t/**\n\t\t * @see https://floating-vue.starpad.dev/api/#update-shown\n\t\t */\n\t\t'update:shown',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tinternalShown: this.shown,\n\t\t}\n\t},\n\n\twatch: {\n\t\tshown(value) {\n\t\t\tthis.internalShown = value\n\t\t},\n\n\t\tinternalShown(value) {\n\t\t\tthis.$emit('update:shown', value)\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.checkTriggerA11y()\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.clearFocusTrap()\n\t\tthis.clearEscapeStopPropagation()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Check if the trigger has all required a11y attributes.\n\t\t * Important to check custom trigger button.\n\t\t */\n\t\tcheckTriggerA11y() {\n\t\t\tif (window.OC?.debug) {\n\t\t\t\tconst triggerContainer = this.getPopoverTriggerContainerElement()\n\t\t\t\tconst requiredTriggerButton = triggerContainer.querySelector('[aria-expanded]')\n\t\t\t\tif (!requiredTriggerButton) {\n\t\t\t\t\tVue.util.warn('It looks like you are using a custom button as a <NcPopover> or other popover #trigger. If you are not using <NcButton> as a trigger, you need to bind attrs from the #trigger slot props to your custom button. See <NcPopover> docs for an example.')\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Remove incorrect aria-describedby attribute from the trigger.\n\t\t * @see https://github.com/Akryum/floating-vue/blob/8d4f7125aae0e3ea00ba4093d6d2001ab15058f1/packages/floating-vue/src/components/Popper.ts#L734\n\t\t */\n\t\tremoveFloatingVueAriaDescribedBy() {\n\t\t\t// When the popover is shown, floating-vue mutates the root elements of the trigger adding data-popper-shown and incorrect aria-describedby attributes.\n\t\t\tconst triggerContainer = this.getPopoverTriggerContainerElement()\n\t\t\tconst triggerElements = triggerContainer.querySelectorAll('[data-popper-shown]')\n\t\t\tfor (const el of triggerElements) {\n\t\t\t\tel.removeAttribute('aria-describedby')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverContentElement() {\n\t\t\treturn this.$refs.popover?.$refs.popperContent?.$el\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverTriggerContainerElement() {\n\t\t\t// TODO: Vue 3: should be\n\t\t\t// this.$refs.popover.$refs.popper.$refs.reference\n\t\t\treturn this.$refs.popover.$refs.reference\n\t\t},\n\n\t\t/**\n\t\t * Add focus trap for accessibility.\n\t\t */\n\t\tasync useFocusTrap() {\n\t\t\tawait this.$nextTick()\n\n\t\t\tif (!this.focusTrap) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst el = this.getPopoverContentElement()\n\n\t\t\tif (!el) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Init focus trap\n\t\t\tthis.$focusTrap = createFocusTrap(el, {\n\t\t\t\t// Prevents to lose focus using esc key\n\t\t\t\t// Focus will be release when popover be hide\n\t\t\t\tescapeDeactivates: false,\n\t\t\t\tallowOutsideClick: true,\n\t\t\t\tsetReturnFocus: this.setReturnFocus,\n\t\t\t\ttrapStack: getTrapStack(),\n\t\t\t})\n\t\t\tthis.$focusTrap.activate()\n\t\t},\n\n\t\t/**\n\t\t * Remove focus trap\n\t\t *\n\t\t * @param {object} options The configuration options for focusTrap\n\t\t */\n\t\tclearFocusTrap(options = {}) {\n\t\t\ttry {\n\t\t\t\tthis.$focusTrap?.deactivate(options)\n\t\t\t\tthis.$focusTrap = null\n\t\t\t} catch (err) {\n\t\t\t\tconsole.warn(err)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Add stopPropagation for Escape.\n\t\t * It prevents global Escape handling after closing popover.\n\t\t *\n\t\t * Manual event handling is used here instead of v-on because there is no direct access to the node.\n\t\t * Alternative - wrap <template #popover> in a div wrapper.\n\t\t */\n\t\taddEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.addEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * Remove stop Escape handler\n\t\t */\n\t\tclearEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.removeEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * @param {KeyboardEvent} event - native keydown event\n\t\t */\n\t\tstopKeydownEscapeHandler(event) {\n\t\t\tif (event.type === 'keydown' && event.key === 'Escape') {\n\t\t\t\tevent.stopPropagation()\n\t\t\t}\n\t\t},\n\n\t\tafterShow() {\n\t\t\tthis.removeFloatingVueAriaDescribedBy()\n\n\t\t\tthis.$nextTick(() => {\n\t\t\t\t/**\n\t\t\t\t * Triggered after the tooltip was visually displayed.\n\t\t\t\t *\n\t\t\t\t * This is different from the 'show' and 'apply-show' which\n\t\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t\t */\n\t\t\t\tthis.$emit('after-show')\n\t\t\t\tthis.useFocusTrap()\n\t\t\t\tthis.addEscapeStopPropagation()\n\t\t\t})\n\t\t},\n\t\tafterHide() {\n\t\t\t/**\n\t\t\t * Triggered after the tooltip was visually hidden.\n\t\t\t */\n\t\t\tthis.$emit('after-hide')\n\t\t\tthis.clearFocusTrap()\n\t\t\tthis.clearEscapeStopPropagation()\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n\n.resize-observer {\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\tz-index:-1;\n\twidth:100%;\n\theight:100%;\n\tborder:none;\n\tbackground-color:transparent;\n\tpointer-events:none;\n\tdisplay:block;\n\toverflow:hidden;\n\topacity:0\n}\n\n.resize-observer object {\n\tdisplay:block;\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\theight:100%;\n\twidth:100%;\n\toverflow:hidden;\n\tpointer-events:none;\n\tz-index:-1\n}\n\n$arrow-width: 10px;\n\n.v-popper--theme-dropdown {\n\t&.v-popper__popper {\n\t\tz-index: 100000;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tdisplay: block !important;\n\n\t\tfilter: drop-shadow(0 1px 10px var(--color-box-shadow));\n\n\t\t.v-popper__inner {\n\t\t\tpadding: 0;\n\t\t\tcolor: var(--color-main-text);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t\toverflow: hidden;\n\t\t\tbackground: var(--color-main-background);\n\t\t}\n\n\t\t.v-popper__arrow-container {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t\tborder-color: transparent;\n\t\t\tborder-width: $arrow-width;\n\t\t}\n\n\t\t&[data-popper-placement^='top'] .v-popper__arrow-container {\n\t\t\tbottom: -$arrow-width;\n\t\t\tborder-bottom-width: 0;\n\t\t\tborder-top-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='bottom'] .v-popper__arrow-container {\n\t\t\ttop: -$arrow-width;\n\t\t\tborder-top-width: 0;\n\t\t\tborder-bottom-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='right'] .v-popper__arrow-container {\n\t\t\tleft: -$arrow-width;\n\t\t\tborder-left-width: 0;\n\t\t\tborder-right-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='left'] .v-popper__arrow-container {\n\t\t\tright: -$arrow-width;\n\t\t\tborder-right-width: 0;\n\t\t\tborder-left-color: var(--color-main-background);\n\t\t}\n\n\t\t&[aria-hidden='true'] {\n\t\t\tvisibility: hidden;\n\t\t\ttransition: opacity var(--animation-quick), visibility var(--animation-quick);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t&[aria-hidden='false'] {\n\t\t\tvisibility: visible;\n\t\t\ttransition: opacity var(--animation-quick);\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","defineComponent","Dropdown","Vue","createFocusTrap","getTrapStack"],"mappings":";;;;;;;;AAQA,MAAAA,cAAAC,IAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,UAAA;AACA,WAAA;AAAA,MACA,2BAAA,MAAA,KAAA;AAAA,MACA,2BAAA,MAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IACA,WAA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OA,eAAA,UAAA,IAAA;;AACA,UAAA;AACA,mBAAA,eAAA,mBAAA,WAAA;AACA,aAAA,aAAA;AAAA,MACA,SAAA,KAAA;AACA,gBAAA,KAAA,GAAA;AAAA,MACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,2BAAA;AACA,YAAA,KAAA,KAAA,yBAAA;AACA,+BAAA,iBAAA,WAAA,KAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,6BAAA;AACA,YAAA,KAAA,KAAA,yBAAA;AACA,+BAAA,oBAAA,WAAA,KAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,yBAAA,OAAA;AACA,UAAA,MAAA,SAAA,aAAA,MAAA,QAAA,UAAA;AACA,cAAA,gBAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,YAAA;AACA,WAAA,iCAAA;AAEA,WAAA,UAAA,MAAA;AAQA,aAAA,MAAA,YAAA;AACA,aAAA,aAAA;AACA,aAAA,yBAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,IACA,YAAA;AAIA,WAAA,MAAA,YAAA;AACA,WAAA,eAAA;AACA,WAAA,2BAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcPopover-C0G7sLVP.cjs","sources":["../../src/components/NcPopover/NcPopoverTriggerProvider.vue","../../src/components/NcPopover/NcPopover.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script>\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n\tname: 'NcPopoverTriggerProvider',\n\n\tprovide() {\n\t\treturn {\n\t\t\t'NcPopover:trigger:shown': () => this.shown,\n\t\t\t'NcPopover:trigger:attrs': () => this.triggerAttrs,\n\t\t}\n\t},\n\n\tprops: {\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\ttriggerAttrs() {\n\t\t\treturn {\n\t\t\t\t'aria-haspopup': this.popupRole,\n\t\t\t\t'aria-expanded': this.shown.toString(),\n\t\t\t}\n\t\t},\n\t},\n\n\trender() {\n\t\t// TODO: Vue 3 - replace with $slots\n\t\treturn this.$scopedSlots.default?.({\n\t\t\tattrs: this.triggerAttrs,\n\t\t})\n\t},\n})\n</script>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis component is just a wrapper for the floating-vue plugin by Akryum,\nplease refer to this documentation for customization:\nhttps://github.com/Akryum/floating-vue\n\nThis components has two slots:\n* 'trigger' which can be any html element and it will trigger the popover\nthis slot is optional since you can toggle the popover also by updating the\nopen prop on this component;\n\n* a default slot that is for the content of the popover.\n\n### Examples\n\n#### With a `<NcButton>` as a trigger:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\t<form tabindex=\"0\" role=\"dialog\" aria-labelledby=\"popover-example-dialog-header-1\" @submit.prevent>\n\t\t\t\t\t<h2 id=\"popover-example-dialog-header-1\">this is some content</h2>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. <br/>\n\t\t\t\t\t\tVestibulum eget placerat velit.\n\t\t\t\t\t</p>\n\t\t\t\t\t<label>\n\t\t\t\t\t\tLabel element\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"input element\"/>\n\t\t\t\t\t</label>\n\t\t\t\t</form>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Without focus trap:\n\nThe [`focus-trap`](https://github.com/focus-trap/focus-trap) emits an error when used in a non-focusable element tree.\n\nThe prop `:focus-trap=\"false\"` help to prevent it when the default behavior is not relevant.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover :focus-trap=\"false\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Click me!</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\tHi! 🚀\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With passing props to `floating-vue`'s `Dropdown`:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover container=\"body\" :popper-hide-triggers=\"(triggers) => [...triggers, 'click']\" popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template #default>\n\t\t\t\t<NcButton>Click on the button will close NcPopover</NcButton>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With a custom button in as a trigger:\n\nWhen `<NcButton>` is used as a `<NcPopover>` trigger, it injects required for a11y attributes to the button.\n\nIf you are using your own custom button as a trigger make sure to bind `attrs` from the trigger slot props.\nSee code example below.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover>\n\t\t\t<!-- Take \"attrs\" from the slot props -->\n\t\t\t<template #trigger=\"{ attrs }\">\n\t\t\t\t<!-- Bind attrs as the button attrs -->\n\t\t\t\t<button v-bind=\"attrs\">\n\t\t\t\t\tI am a custom button in the trigger\n\t\t\t\t</button>\n\t\t\t</template>\n\n\t\t\tHi! 🚀\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Provide role for the popover content\n\nFor accessibility reasons, popover should have a role. Provide it to the `popup-role` and make sure that the popover content is an element with the same role.\n\nSee: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<!-- Provide popup role -->\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Delete</NcButton>\n\t\t\t</template>\n\n\t\t\t<!-- Popover content should has the same role -->\n\t\t\t<div role=\"dialog\" aria-labelledby=\"popover-example-custom-role-1\" aria-modal=\"true\">\n\t\t\t\t<!-- This is not required but better to provide a label -->\n\t\t\t\t<header id=\"popover-example-custom-role-1\">\n\t\t\t\t\t<strong>Confirm remove</strong>\n\t\t\t\t</header>\n\t\t\t\t<NcButton type=\"danger\">Delete</NcButton>\n\t\t\t</div>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n</docs>\n\n<template>\n\t<Dropdown ref=\"popover\"\n\t\t:distance=\"10\"\n\t\t:arrow-padding=\"10\"\n\t\tv-bind=\"$attrs\"\n\t\t:no-auto-focus=\"true /* Handled by the focus trap */\"\n\t\t:popper-class=\"popoverBaseClass\"\n\t\t:shown=\"internalShown\"\n\t\tv-on=\"$listeners\"\n\t\t@update:shown=\"internalShown = $event\"\n\t\t@apply-show=\"afterShow\"\n\t\t@apply-hide=\"afterHide\">\n\t\t<NcPopoverTriggerProvider v-slot=\"slotProps\" :shown=\"internalShown\" :popup-role=\"popupRole\">\n\t\t\t<!-- This will be the popover target (for the events and position) -->\n\t\t\t<slot name=\"trigger\" v-bind=\"slotProps\" />\n\t\t</NcPopoverTriggerProvider>\n\n\t\t<!-- This will be the content of the popover -->\n\t\t<template #popper>\n\t\t\t<slot />\n\t\t</template>\n\t</Dropdown>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { Dropdown } from 'floating-vue'\nimport { createFocusTrap } from 'focus-trap'\nimport { getTrapStack } from '../../utils/focusTrap.js'\nimport NcPopoverTriggerProvider from './NcPopoverTriggerProvider.vue'\n\nexport default {\n\tname: 'NcPopover',\n\n\tcomponents: {\n\t\tDropdown,\n\t\tNcPopoverTriggerProvider,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Show or hide the popper\n\t\t * @see https://floating-vue.starpad.dev/api/#shown\n\t\t */\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Popup role\n\t\t * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#values\n\t\t */\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t\tvalidator: (value) => ['menu', 'listbox', 'tree', 'grid', 'dialog', 'true'].includes(value),\n\t\t},\n\n\t\tpopoverBaseClass: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * Enable popover focus trap\n\t\t */\n\t\tfocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t\t/**\n\t\t * Set element to return focus to after focus trap deactivation\n\t\t *\n\t\t * @type {import('focus-trap').FocusTargetValueOrFalse}\n\t\t */\n\t\tsetReturnFocus: {\n\t\t\tdefault: undefined,\n\t\t\ttype: [HTMLElement, SVGElement, String, Boolean],\n\t\t},\n\t},\n\n\temits: [\n\t\t'after-show',\n\t\t'after-hide',\n\t\t/**\n\t\t * @see https://floating-vue.starpad.dev/api/#update-shown\n\t\t */\n\t\t'update:shown',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tinternalShown: this.shown,\n\t\t}\n\t},\n\n\twatch: {\n\t\tshown(value) {\n\t\t\tthis.internalShown = value\n\t\t},\n\n\t\tinternalShown(value) {\n\t\t\tthis.$emit('update:shown', value)\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.checkTriggerA11y()\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.clearFocusTrap()\n\t\tthis.clearEscapeStopPropagation()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Check if the trigger has all required a11y attributes.\n\t\t * Important to check custom trigger button.\n\t\t */\n\t\tcheckTriggerA11y() {\n\t\t\tif (window.OC?.debug) {\n\t\t\t\tconst triggerContainer = this.getPopoverTriggerContainerElement()\n\t\t\t\tconst requiredTriggerButton = triggerContainer.querySelector('[aria-expanded]')\n\t\t\t\tif (!requiredTriggerButton) {\n\t\t\t\t\tVue.util.warn('It looks like you are using a custom button as a <NcPopover> or other popover #trigger. If you are not using <NcButton> as a trigger, you need to bind attrs from the #trigger slot props to your custom button. See <NcPopover> docs for an example.')\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Remove incorrect aria-describedby attribute from the trigger.\n\t\t * @see https://github.com/Akryum/floating-vue/blob/8d4f7125aae0e3ea00ba4093d6d2001ab15058f1/packages/floating-vue/src/components/Popper.ts#L734\n\t\t */\n\t\tremoveFloatingVueAriaDescribedBy() {\n\t\t\t// When the popover is shown, floating-vue mutates the root elements of the trigger adding data-popper-shown and incorrect aria-describedby attributes.\n\t\t\tconst triggerContainer = this.getPopoverTriggerContainerElement()\n\t\t\tconst triggerElements = triggerContainer.querySelectorAll('[data-popper-shown]')\n\t\t\tfor (const el of triggerElements) {\n\t\t\t\tel.removeAttribute('aria-describedby')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverContentElement() {\n\t\t\treturn this.$refs.popover?.$refs.popperContent?.$el\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverTriggerContainerElement() {\n\t\t\t// TODO: Vue 3: should be\n\t\t\t// this.$refs.popover.$refs.popper.$refs.reference\n\t\t\treturn this.$refs.popover.$refs.reference\n\t\t},\n\n\t\t/**\n\t\t * Add focus trap for accessibility.\n\t\t */\n\t\tasync useFocusTrap() {\n\t\t\tawait this.$nextTick()\n\n\t\t\tif (!this.focusTrap) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst el = this.getPopoverContentElement()\n\n\t\t\tif (!el) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Init focus trap\n\t\t\tthis.$focusTrap = createFocusTrap(el, {\n\t\t\t\t// Prevents to lose focus using esc key\n\t\t\t\t// Focus will be release when popover be hide\n\t\t\t\tescapeDeactivates: false,\n\t\t\t\tallowOutsideClick: true,\n\t\t\t\tsetReturnFocus: this.setReturnFocus,\n\t\t\t\ttrapStack: getTrapStack(),\n\t\t\t})\n\t\t\tthis.$focusTrap.activate()\n\t\t},\n\n\t\t/**\n\t\t * Remove focus trap\n\t\t *\n\t\t * @param {object} options The configuration options for focusTrap\n\t\t */\n\t\tclearFocusTrap(options = {}) {\n\t\t\ttry {\n\t\t\t\tthis.$focusTrap?.deactivate(options)\n\t\t\t\tthis.$focusTrap = null\n\t\t\t} catch (err) {\n\t\t\t\tconsole.warn(err)\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Add stopPropagation for Escape.\n\t\t * It prevents global Escape handling after closing popover.\n\t\t *\n\t\t * Manual event handling is used here instead of v-on because there is no direct access to the node.\n\t\t * Alternative - wrap <template #popover> in a div wrapper.\n\t\t */\n\t\taddEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.addEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * Remove stop Escape handler\n\t\t */\n\t\tclearEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.removeEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * @param {KeyboardEvent} event - native keydown event\n\t\t */\n\t\tstopKeydownEscapeHandler(event) {\n\t\t\tif (event.type === 'keydown' && event.key === 'Escape') {\n\t\t\t\tevent.stopPropagation()\n\t\t\t}\n\t\t},\n\n\t\tafterShow() {\n\t\t\tthis.removeFloatingVueAriaDescribedBy()\n\n\t\t\tthis.$nextTick(() => {\n\t\t\t\t/**\n\t\t\t\t * Triggered after the tooltip was visually displayed.\n\t\t\t\t *\n\t\t\t\t * This is different from the 'show' and 'apply-show' which\n\t\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t\t */\n\t\t\t\tthis.$emit('after-show')\n\t\t\t\tthis.useFocusTrap()\n\t\t\t\tthis.addEscapeStopPropagation()\n\t\t\t})\n\t\t},\n\t\tafterHide() {\n\t\t\t/**\n\t\t\t * Triggered after the tooltip was visually hidden.\n\t\t\t */\n\t\t\tthis.$emit('after-hide')\n\t\t\tthis.clearFocusTrap()\n\t\t\tthis.clearEscapeStopPropagation()\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n\n.resize-observer {\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\tz-index:-1;\n\twidth:100%;\n\theight:100%;\n\tborder:none;\n\tbackground-color:transparent;\n\tpointer-events:none;\n\tdisplay:block;\n\toverflow:hidden;\n\topacity:0\n}\n\n.resize-observer object {\n\tdisplay:block;\n\tposition:absolute;\n\ttop:0;\n\tleft:0;\n\theight:100%;\n\twidth:100%;\n\toverflow:hidden;\n\tpointer-events:none;\n\tz-index:-1\n}\n\n$arrow-width: 10px;\n\n.v-popper--theme-dropdown {\n\t&.v-popper__popper {\n\t\tz-index: 100000;\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tdisplay: block !important;\n\n\t\tfilter: drop-shadow(0 1px 10px var(--color-box-shadow));\n\n\t\t.v-popper__inner {\n\t\t\tpadding: 0;\n\t\t\tcolor: var(--color-main-text);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t\toverflow: hidden;\n\t\t\tbackground: var(--color-main-background);\n\t\t}\n\n\t\t.v-popper__arrow-container {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t\tborder-color: transparent;\n\t\t\tborder-width: $arrow-width;\n\t\t}\n\n\t\t&[data-popper-placement^='top'] .v-popper__arrow-container {\n\t\t\tbottom: -$arrow-width;\n\t\t\tborder-bottom-width: 0;\n\t\t\tborder-top-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='bottom'] .v-popper__arrow-container {\n\t\t\ttop: -$arrow-width;\n\t\t\tborder-top-width: 0;\n\t\t\tborder-bottom-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='right'] .v-popper__arrow-container {\n\t\t\tleft: -$arrow-width;\n\t\t\tborder-left-width: 0;\n\t\t\tborder-right-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='left'] .v-popper__arrow-container {\n\t\t\tright: -$arrow-width;\n\t\t\tborder-right-width: 0;\n\t\t\tborder-left-color: var(--color-main-background);\n\t\t}\n\n\t\t&[aria-hidden='true'] {\n\t\t\tvisibility: hidden;\n\t\t\ttransition: opacity var(--animation-quick), visibility var(--animation-quick);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t&[aria-hidden='false'] {\n\t\t\tvisibility: visible;\n\t\t\ttransition: opacity var(--animation-quick);\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","defineComponent","Dropdown","Vue","createFocusTrap","getTrapStack"],"mappings":";;;;;;;;AAQA,MAAAA,cAAAC,IAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,UAAA;AACA,WAAA;AAAA,MACA,2BAAA,MAAA,KAAA;AAAA,MACA,2BAAA,MAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,eAAA;AACA,aAAA;AAAA,QACA,iBAAA,KAAA;AAAA,QACA,iBAAA,KAAA,MAAA,SAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;;AAEA,YAAA,gBAAA,cAAA,YAAA,4BAAA;AAAA,MACA,OAAA,KAAA;AAAA,IACA;A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AA;AAAA;AAAA,IAKA,6BAAA;AACA,YAAA,KAAA,KAAA,yBAAA;AACA,+BAAA,oBAAA,WAAA,KAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,yBAAA,OAAA;AACA,UAAA,MAAA,SAAA,aAAA,MAAA,QAAA,UAAA;AACA,cAAA,gBAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,YAAA;AACA,WAAA,iCAAA;AAEA,WAAA,UAAA,MAAA;AAQA,aAAA,MAAA,YAAA;AACA,aAAA,aAAA;AACA,aAAA,yBAAA;AAAA,MACA,CAAA;AAAA,IACA;AAAA,IACA,YAAA;AAIA,WAAA,MAAA,YAAA;AACA,WAAA,eAAA;AACA,WAAA,2BAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,7 +3,7 @@ import Vue, { defineComponent } from "vue";
3
3
  import { Dropdown } from "floating-vue";
4
4
  import { createFocusTrap } from "focus-trap";
5
5
  import { g as getTrapStack } from "./focusTrap-Cecv_gjR.mjs";
6
- import { n as normalizeComponent } from "./_plugin-vue2_normalizer-D637Qkok.mjs";
6
+ import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
7
7
  const _sfc_main$1 = defineComponent({
8
8
  name: "NcPopoverTriggerProvider",
9
9
  provide() {
@@ -45,8 +45,6 @@ var __component__$1 = /* @__PURE__ */ normalizeComponent(
45
45
  _sfc_staticRenderFns$1,
46
46
  false,
47
47
  null,
48
- null,
49
- null,
50
48
  null
51
49
  );
52
50
  const NcPopoverTriggerProvider = __component__$1.exports;
@@ -257,8 +255,6 @@ var __component__ = /* @__PURE__ */ normalizeComponent(
257
255
  _sfc_staticRenderFns,
258
256
  false,
259
257
  null,
260
- null,
261
- null,
262
258
  null
263
259
  );
264
260
  const NcPopover = __component__.exports;