@nextcloud/vue 8.16.0 → 8.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (542) hide show
  1. package/CHANGELOG.md +39 -2
  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 +2 -12
  177. package/dist/Components/NcNoteCard.cjs.map +1 -1
  178. package/dist/Components/NcNoteCard.mjs +2 -12
  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 +54 -0
  221. package/dist/Composables/useHotKey.cjs.map +1 -0
  222. package/dist/Composables/useHotKey.mjs +54 -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-fhylfTxx.css} +14 -13
  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-BnOXoW8w.css → NcAvatar-CfUWTmJW.css} +28 -28
  237. package/dist/assets/{NcButton-BHxZm42y.css → NcButton-DYJAoXeG.css} +47 -47
  238. package/dist/assets/{NcCheckboxRadioSwitch-BkBep4wT.css → NcCheckboxRadioSwitch-D5gP42gi.css} +55 -53
  239. package/dist/assets/{NcContent--2CGtswk.css → NcContent-ZFNIjylG.css} +10 -10
  240. package/dist/assets/{NcCounterBubble-BQB2m2ZT.css → NcCounterBubble-Dizdz4Hk.css} +12 -13
  241. package/dist/assets/{NcDateTimePicker-CWLRe5-W.css → NcDateTimePicker-BshzbbKT.css} +7 -7
  242. package/dist/assets/{NcDialog-j6_6dpiF.css → NcDialog-DKdW_D2J.css} +15 -15
  243. package/dist/assets/{NcHeaderMenu-CuAI7Fgb.css → NcHeaderMenu-DjPL7Ozo.css} +14 -15
  244. package/dist/assets/{NcInputField-Dq0PVf84.css → NcInputField-CQc5dRbY.css} +33 -33
  245. package/dist/assets/{NcListItem-D8zBJgoD.css → NcListItem-Db199R20.css} +46 -44
  246. package/dist/assets/{NcModal-Ch7ovo9y.css → NcModal-Djc2K_kW.css} +70 -70
  247. package/dist/assets/{NcRichContenteditable-CkvTrjfG.css → NcRichContenteditable-BYEZK1DT.css} +61 -59
  248. package/dist/assets/{NcRichText-BKnmtD0n.css → NcRichText-DqDAPQPD.css} +3 -3
  249. package/dist/chunks/{AlertCircleOutline-Cb0gAiDw.cjs → AlertCircleOutline-DLtiWgZd.cjs} +1 -3
  250. package/dist/chunks/{AlertCircleOutline-Cb0gAiDw.cjs.map → AlertCircleOutline-DLtiWgZd.cjs.map} +1 -1
  251. package/dist/chunks/{AlertCircleOutline-BzttElgq.mjs → AlertCircleOutline-DU3QwU5Y.mjs} +1 -3
  252. package/dist/chunks/{AlertCircleOutline-BzttElgq.mjs.map → AlertCircleOutline-DU3QwU5Y.mjs.map} +1 -1
  253. package/dist/chunks/{ArrowLeft-B9iGweTd.mjs → ArrowLeft-BhAxJBYx.mjs} +1 -3
  254. package/dist/chunks/{ArrowLeft-B9iGweTd.mjs.map → ArrowLeft-BhAxJBYx.mjs.map} +1 -1
  255. package/dist/chunks/{ArrowLeft-BhNmMdMz.cjs → ArrowLeft-CONurT5C.cjs} +1 -3
  256. package/dist/chunks/{ArrowLeft-BhNmMdMz.cjs.map → ArrowLeft-CONurT5C.cjs.map} +1 -1
  257. package/dist/chunks/{ArrowRight-DaYrccVG.cjs → ArrowRight-Bj5G_mG0.cjs} +1 -3
  258. package/dist/chunks/{ArrowRight-DaYrccVG.cjs.map → ArrowRight-Bj5G_mG0.cjs.map} +1 -1
  259. package/dist/chunks/{ArrowRight-Clf455e1.mjs → ArrowRight-KsL2PC-o.mjs} +1 -3
  260. package/dist/chunks/{ArrowRight-Clf455e1.mjs.map → ArrowRight-KsL2PC-o.mjs.map} +1 -1
  261. package/dist/chunks/{Check-PawIlCwa.mjs → Check-XHAzUBkX.mjs} +1 -3
  262. package/dist/chunks/{Check-PawIlCwa.mjs.map → Check-XHAzUBkX.mjs.map} +1 -1
  263. package/dist/chunks/{Check-DZc7keoa.cjs → Check-fCbe4vqy.cjs} +1 -3
  264. package/dist/chunks/{Check-DZc7keoa.cjs.map → Check-fCbe4vqy.cjs.map} +1 -1
  265. package/dist/chunks/{ChevronDown-CF9m1o8_.cjs → ChevronDown-CiFbcDUC.cjs} +1 -3
  266. package/dist/chunks/{ChevronDown-CF9m1o8_.cjs.map → ChevronDown-CiFbcDUC.cjs.map} +1 -1
  267. package/dist/chunks/{ChevronDown-PedEroXo.mjs → ChevronDown-D3Tfshug.mjs} +1 -3
  268. package/dist/chunks/{ChevronDown-PedEroXo.mjs.map → ChevronDown-D3Tfshug.mjs.map} +1 -1
  269. package/dist/chunks/{ChevronRight-BNa7yMja.mjs → ChevronRight-C3eVhc5a.mjs} +1 -3
  270. package/dist/chunks/{ChevronRight-BNa7yMja.mjs.map → ChevronRight-C3eVhc5a.mjs.map} +1 -1
  271. package/dist/chunks/{ChevronRight-DVw6mR11.cjs → ChevronRight-CWbdN5_r.cjs} +1 -3
  272. package/dist/chunks/{ChevronRight-DVw6mR11.cjs.map → ChevronRight-CWbdN5_r.cjs.map} +1 -1
  273. package/dist/chunks/{ChevronUp-CTOKWYlC.cjs → ChevronUp-A2riTBrv.cjs} +1 -3
  274. package/dist/chunks/{ChevronUp-CTOKWYlC.cjs.map → ChevronUp-A2riTBrv.cjs.map} +1 -1
  275. package/dist/chunks/{ChevronUp-DGLTg_nO.mjs → ChevronUp-ljACquzS.mjs} +1 -3
  276. package/dist/chunks/{ChevronUp-DGLTg_nO.mjs.map → ChevronUp-ljACquzS.mjs.map} +1 -1
  277. package/dist/chunks/{Close-1V1F2F-M.mjs → Close-B6ccm1RP.mjs} +1 -3
  278. package/dist/chunks/{Close-1V1F2F-M.mjs.map → Close-B6ccm1RP.mjs.map} +1 -1
  279. package/dist/chunks/{Close-C2VrgKj3.cjs → Close-B7lGu0cG.cjs} +1 -3
  280. package/dist/chunks/{Close-C2VrgKj3.cjs.map → Close-B7lGu0cG.cjs.map} +1 -1
  281. package/dist/chunks/{DotsHorizontal-C0STD_HU.mjs → DotsHorizontal-Cd2x8oz2.mjs} +1 -3
  282. package/dist/chunks/{DotsHorizontal-C0STD_HU.mjs.map → DotsHorizontal-Cd2x8oz2.mjs.map} +1 -1
  283. package/dist/chunks/{DotsHorizontal-Cjw3-45t.cjs → DotsHorizontal-DQfnwpao.cjs} +1 -3
  284. package/dist/chunks/{DotsHorizontal-Cjw3-45t.cjs.map → DotsHorizontal-DQfnwpao.cjs.map} +1 -1
  285. package/dist/chunks/{GenColors-BIhFdCC4.cjs → GenColors-Bj69w5nu.cjs} +1 -7
  286. package/dist/chunks/{GenColors-BIhFdCC4.cjs.map → GenColors-Bj69w5nu.cjs.map} +1 -1
  287. package/dist/chunks/{GenColors-CSpRMtcT.mjs → GenColors-u1W5WMXj.mjs} +1 -7
  288. package/dist/chunks/{GenColors-CSpRMtcT.mjs.map → GenColors-u1W5WMXj.mjs.map} +1 -1
  289. package/dist/chunks/{NcActionButtonGroup-CRr3MGWH.mjs → NcActionButtonGroup-Bd37MbKW.mjs} +2 -4
  290. package/dist/chunks/{NcActionButtonGroup-CRr3MGWH.mjs.map → NcActionButtonGroup-Bd37MbKW.mjs.map} +1 -1
  291. package/dist/chunks/{NcActionButtonGroup-u0n6b6by.cjs → NcActionButtonGroup-D5m7jjJp.cjs} +2 -4
  292. package/dist/chunks/{NcActionButtonGroup-u0n6b6by.cjs.map → NcActionButtonGroup-D5m7jjJp.cjs.map} +1 -1
  293. package/dist/chunks/{NcActionInput-CcfF_tha.cjs → NcActionInput-C-LpHj3H.cjs} +6 -8
  294. package/dist/chunks/{NcActionInput-CcfF_tha.cjs.map → NcActionInput-C-LpHj3H.cjs.map} +1 -1
  295. package/dist/chunks/{NcActionInput-Cz7D7XfL.mjs → NcActionInput-Cih0zYV4.mjs} +6 -8
  296. package/dist/chunks/{NcActionInput-Cz7D7XfL.mjs.map → NcActionInput-Cih0zYV4.mjs.map} +1 -1
  297. package/dist/chunks/{NcActions-BNYD2s1x.mjs → NcActions-D77YAhAy.mjs} +12 -9
  298. package/dist/chunks/NcActions-D77YAhAy.mjs.map +1 -0
  299. package/dist/chunks/{NcActions-Bu5UnlHN.cjs → NcActions-DWydFozA.cjs} +12 -9
  300. package/dist/chunks/NcActions-DWydFozA.cjs.map +1 -0
  301. package/dist/chunks/{NcAppContent-DIojf9zk.mjs → NcAppContent-4BxMQ7Xt.mjs} +5 -9
  302. package/dist/chunks/{NcAppContent-DIojf9zk.mjs.map → NcAppContent-4BxMQ7Xt.mjs.map} +1 -1
  303. package/dist/chunks/{NcAppContent-BiQqUrj1.cjs → NcAppContent-Cvlj45G9.cjs} +5 -9
  304. package/dist/chunks/{NcAppContent-BiQqUrj1.cjs.map → NcAppContent-Cvlj45G9.cjs.map} +1 -1
  305. package/dist/chunks/{NcAppNavigation-b745VaE7.mjs → NcAppNavigation-BDbJ4m0b.mjs} +4 -6
  306. package/dist/chunks/{NcAppNavigation-b745VaE7.mjs.map → NcAppNavigation-BDbJ4m0b.mjs.map} +1 -1
  307. package/dist/chunks/{NcAppNavigation-D2duZ9d4.cjs → NcAppNavigation-BPcFGTv2.cjs} +4 -6
  308. package/dist/chunks/{NcAppNavigation-D2duZ9d4.cjs.map → NcAppNavigation-BPcFGTv2.cjs.map} +1 -1
  309. package/dist/chunks/{NcAppNavigationCaption-lStN6GgW.cjs → NcAppNavigationCaption-DIsO1tke.cjs} +4 -6
  310. package/dist/chunks/{NcAppNavigationCaption-BhT61A8a.mjs.map → NcAppNavigationCaption-DIsO1tke.cjs.map} +1 -1
  311. package/dist/chunks/{NcAppNavigationCaption-BhT61A8a.mjs → NcAppNavigationCaption-DPUdrh1W.mjs} +4 -6
  312. package/dist/chunks/{NcAppNavigationCaption-lStN6GgW.cjs.map → NcAppNavigationCaption-DPUdrh1W.mjs.map} +1 -1
  313. package/dist/chunks/{NcAppNavigationItem-DymXTFpC.cjs → NcAppNavigationItem-B_pjMPx9.cjs} +8 -16
  314. package/dist/chunks/{NcAppNavigationItem-DymXTFpC.cjs.map → NcAppNavigationItem-B_pjMPx9.cjs.map} +1 -1
  315. package/dist/chunks/{NcAppNavigationItem-BgUcekR9.mjs → NcAppNavigationItem-DFd3T8cM.mjs} +8 -16
  316. package/dist/chunks/{NcAppNavigationItem-BgUcekR9.mjs.map → NcAppNavigationItem-DFd3T8cM.mjs.map} +1 -1
  317. package/dist/chunks/{NcAppNavigationNewItem-Di3xZODi.mjs → NcAppNavigationNewItem-C3feTWit.mjs} +3 -5
  318. package/dist/chunks/{NcAppNavigationNewItem-Di3xZODi.mjs.map → NcAppNavigationNewItem-C3feTWit.mjs.map} +1 -1
  319. package/dist/chunks/{NcAppNavigationNewItem-BWqcj3fJ.cjs → NcAppNavigationNewItem-ChhIGd9y.cjs} +3 -5
  320. package/dist/chunks/{NcAppNavigationNewItem-BWqcj3fJ.cjs.map → NcAppNavigationNewItem-ChhIGd9y.cjs.map} +1 -1
  321. package/dist/chunks/{NcAppNavigationSearch-DXgD6484.cjs → NcAppNavigationSearch-2zELXCcb.cjs} +4 -6
  322. package/dist/chunks/{NcAppNavigationSearch-DXgD6484.cjs.map → NcAppNavigationSearch-2zELXCcb.cjs.map} +1 -1
  323. package/dist/chunks/{NcAppNavigationSearch-Bn6ze-K8.mjs → NcAppNavigationSearch-BjFk5Svv.mjs} +4 -6
  324. package/dist/chunks/{NcAppNavigationSearch-Bn6ze-K8.mjs.map → NcAppNavigationSearch-BjFk5Svv.mjs.map} +1 -1
  325. package/dist/chunks/{NcAppNavigationSettings-CPtlFWzu.mjs → NcAppNavigationSettings-BbdXmZxA.mjs} +3 -7
  326. package/dist/chunks/{NcAppNavigationSettings-CPtlFWzu.mjs.map → NcAppNavigationSettings-BbdXmZxA.mjs.map} +1 -1
  327. package/dist/chunks/{NcAppNavigationSettings-X-3Hn4DT.cjs → NcAppNavigationSettings-nXyfQjef.cjs} +3 -7
  328. package/dist/chunks/{NcAppNavigationSettings-X-3Hn4DT.cjs.map → NcAppNavigationSettings-nXyfQjef.cjs.map} +1 -1
  329. package/dist/chunks/{NcAppNavigationToggle-CefGs9zI.mjs → NcAppNavigationToggle-BfEEm-rA.mjs} +3 -9
  330. package/dist/chunks/{NcAppNavigationToggle-CefGs9zI.mjs.map → NcAppNavigationToggle-BfEEm-rA.mjs.map} +1 -1
  331. package/dist/chunks/{NcAppNavigationToggle-EOuuC2uD.cjs → NcAppNavigationToggle-Bs8GCwir.cjs} +3 -9
  332. package/dist/chunks/{NcAppNavigationToggle-EOuuC2uD.cjs.map → NcAppNavigationToggle-Bs8GCwir.cjs.map} +1 -1
  333. package/dist/chunks/{NcAppSettingsDialog-BygD2XER.mjs → NcAppSettingsDialog-4B3lv0WQ.mjs} +5 -7
  334. package/dist/chunks/{NcAppSettingsDialog-BygD2XER.mjs.map → NcAppSettingsDialog-4B3lv0WQ.mjs.map} +1 -1
  335. package/dist/chunks/{NcAppSettingsDialog-B9tlPluJ.cjs → NcAppSettingsDialog-lfxi50N4.cjs} +5 -7
  336. package/dist/chunks/{NcAppSettingsDialog-B9tlPluJ.cjs.map → NcAppSettingsDialog-lfxi50N4.cjs.map} +1 -1
  337. package/dist/chunks/{NcAppSidebar-DHsJCU6p.cjs → NcAppSidebar-BUP_CGWJ.cjs} +8 -18
  338. package/dist/chunks/{NcAppSidebar-DHsJCU6p.cjs.map → NcAppSidebar-BUP_CGWJ.cjs.map} +1 -1
  339. package/dist/chunks/{NcAppSidebar-ClR8nmTm.mjs → NcAppSidebar-DZb0qhUN.mjs} +8 -18
  340. package/dist/chunks/{NcAppSidebar-ClR8nmTm.mjs.map → NcAppSidebar-DZb0qhUN.mjs.map} +1 -1
  341. package/dist/chunks/{NcAvatar-C1miLzxS.mjs → NcAvatar-BFV6oZYX.mjs} +9 -11
  342. package/dist/chunks/NcAvatar-BFV6oZYX.mjs.map +1 -0
  343. package/dist/chunks/{NcAvatar-B_FI8kMO.cjs → NcAvatar-D70EswFk.cjs} +9 -11
  344. package/dist/chunks/NcAvatar-D70EswFk.cjs.map +1 -0
  345. package/dist/chunks/{NcBreadcrumb-6-TEgzIX.mjs → NcBreadcrumb-B5L1PSLJ.mjs} +4 -6
  346. package/dist/chunks/{NcBreadcrumb-6-TEgzIX.mjs.map → NcBreadcrumb-B5L1PSLJ.mjs.map} +1 -1
  347. package/dist/chunks/{NcBreadcrumb-BEGaPK2T.cjs → NcBreadcrumb-Ck9jIMJ0.cjs} +4 -6
  348. package/dist/chunks/{NcBreadcrumb-BEGaPK2T.cjs.map → NcBreadcrumb-Ck9jIMJ0.cjs.map} +1 -1
  349. package/dist/chunks/{NcBreadcrumbs-BvgztT1n.cjs → NcBreadcrumbs-BDi5uySu.cjs} +4 -8
  350. package/dist/chunks/{NcBreadcrumbs-BvgztT1n.cjs.map → NcBreadcrumbs-BDi5uySu.cjs.map} +1 -1
  351. package/dist/chunks/{NcBreadcrumbs-B9rm2Pwq.mjs → NcBreadcrumbs-Di8TiK0J.mjs} +4 -8
  352. package/dist/chunks/{NcBreadcrumbs-B9rm2Pwq.mjs.map → NcBreadcrumbs-Di8TiK0J.mjs.map} +1 -1
  353. package/dist/chunks/{NcCheckboxRadioSwitch-Du9MhLnc.cjs → NcCheckboxRadioSwitch-B5i9ebMR.cjs} +7 -25
  354. package/dist/chunks/{NcCheckboxRadioSwitch-Dxh5eqs0.mjs.map → NcCheckboxRadioSwitch-B5i9ebMR.cjs.map} +1 -1
  355. package/dist/chunks/{NcCheckboxRadioSwitch-Dxh5eqs0.mjs → NcCheckboxRadioSwitch-D1Iu7jy1.mjs} +7 -25
  356. package/dist/chunks/{NcCheckboxRadioSwitch-Du9MhLnc.cjs.map → NcCheckboxRadioSwitch-D1Iu7jy1.mjs.map} +1 -1
  357. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_00597cce_lang-BwT3zLFj.mjs +3 -0
  358. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_00597cce_lang-BwT3zLFj.mjs.map +1 -0
  359. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_00597cce_lang-CP9n1exV.cjs +4 -0
  360. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_00597cce_lang-CP9n1exV.cjs.map +1 -0
  361. package/dist/chunks/{NcCollectionList-BTU680_b.cjs → NcCollectionList-1EeBHCrM.cjs} +7 -11
  362. package/dist/chunks/{NcCollectionList-BTU680_b.cjs.map → NcCollectionList-1EeBHCrM.cjs.map} +1 -1
  363. package/dist/chunks/{NcCollectionList-DLw6mNFw.mjs → NcCollectionList-BxSwb-Gx.mjs} +7 -11
  364. package/dist/chunks/{NcCollectionList-DLw6mNFw.mjs.map → NcCollectionList-BxSwb-Gx.mjs.map} +1 -1
  365. package/dist/chunks/{NcColorPicker-BUq5h7jz.mjs → NcColorPicker-B3WnrXPa.mjs} +8 -10
  366. package/dist/chunks/{NcColorPicker-BUq5h7jz.mjs.map → NcColorPicker-B3WnrXPa.mjs.map} +1 -1
  367. package/dist/chunks/{NcColorPicker-CiNIPwM2.cjs → NcColorPicker-C4V9Xmmq.cjs} +8 -10
  368. package/dist/chunks/{NcColorPicker-CiNIPwM2.cjs.map → NcColorPicker-C4V9Xmmq.cjs.map} +1 -1
  369. package/dist/chunks/{NcContent-C1xtRN_d.cjs → NcContent-DOV1i_sw.cjs} +5 -7
  370. package/dist/chunks/{NcContent-C1xtRN_d.cjs.map → NcContent-DOV1i_sw.cjs.map} +1 -1
  371. package/dist/chunks/{NcContent-D6FQABFh.mjs → NcContent-YmMP5qXT.mjs} +5 -7
  372. package/dist/chunks/{NcContent-D6FQABFh.mjs.map → NcContent-YmMP5qXT.mjs.map} +1 -1
  373. package/dist/chunks/NcCounterBubble-D1QC3eP1.mjs +106 -0
  374. package/dist/chunks/NcCounterBubble-D1QC3eP1.mjs.map +1 -0
  375. package/dist/chunks/NcCounterBubble-R8Tmi05i.cjs +105 -0
  376. package/dist/chunks/NcCounterBubble-R8Tmi05i.cjs.map +1 -0
  377. package/dist/chunks/{NcDashboardWidget-DcmmCy--.cjs → NcDashboardWidget-D3oQtVgq.cjs} +6 -8
  378. package/dist/chunks/{NcDashboardWidget-DcmmCy--.cjs.map → NcDashboardWidget-D3oQtVgq.cjs.map} +1 -1
  379. package/dist/chunks/{NcDashboardWidget-D7HGohS3.mjs → NcDashboardWidget-DOSAwzd2.mjs} +6 -8
  380. package/dist/chunks/{NcDashboardWidget-D7HGohS3.mjs.map → NcDashboardWidget-DOSAwzd2.mjs.map} +1 -1
  381. package/dist/chunks/{NcDashboardWidgetItem-LOg5ztHu.mjs → NcDashboardWidgetItem-DSaANTMY.mjs} +4 -6
  382. package/dist/chunks/{NcDashboardWidgetItem-LOg5ztHu.mjs.map → NcDashboardWidgetItem-DSaANTMY.mjs.map} +1 -1
  383. package/dist/chunks/{NcDashboardWidgetItem-l9PIHfs-.cjs → NcDashboardWidgetItem-DWrAY-RW.cjs} +4 -6
  384. package/dist/chunks/{NcDashboardWidgetItem-l9PIHfs-.cjs.map → NcDashboardWidgetItem-DWrAY-RW.cjs.map} +1 -1
  385. package/dist/chunks/{NcDateTime-C9kf-YEX.mjs → NcDateTime-3T3J08Bd.mjs} +9 -11
  386. package/dist/chunks/NcDateTime-3T3J08Bd.mjs.map +1 -0
  387. package/dist/chunks/{NcDateTime-D-MxBcYv.cjs → NcDateTime-4AuZ9Qlt.cjs} +9 -11
  388. package/dist/chunks/NcDateTime-4AuZ9Qlt.cjs.map +1 -0
  389. package/dist/chunks/{NcDialog-DGaf6Udc.cjs → NcDialog-C7L86Jj6.cjs} +35 -9
  390. package/dist/chunks/NcDialog-C7L86Jj6.cjs.map +1 -0
  391. package/dist/chunks/{NcDialog-VincZ0XS.mjs → NcDialog-DXRkgfxf.mjs} +35 -9
  392. package/dist/chunks/NcDialog-DXRkgfxf.mjs.map +1 -0
  393. package/dist/chunks/{NcDialogButton-CNWF4urB.cjs → NcDialogButton-Cq7U6E8M.cjs} +18 -7
  394. package/dist/chunks/NcDialogButton-Cq7U6E8M.cjs.map +1 -0
  395. package/dist/chunks/{NcDialogButton-JvyN3X6S.mjs → NcDialogButton-DzPzSBzz.mjs} +18 -7
  396. package/dist/chunks/NcDialogButton-DzPzSBzz.mjs.map +1 -0
  397. package/dist/chunks/{NcEmojiPicker-1Lmb0vDx.mjs → NcEmojiPicker-CjeoGVH7.mjs} +7 -11
  398. package/dist/chunks/{NcEmojiPicker-1Lmb0vDx.mjs.map → NcEmojiPicker-CjeoGVH7.mjs.map} +1 -1
  399. package/dist/chunks/{NcEmojiPicker-DT9jlZ0U.cjs → NcEmojiPicker-Cuo4irbL.cjs} +7 -11
  400. package/dist/chunks/{NcEmojiPicker-DT9jlZ0U.cjs.map → NcEmojiPicker-Cuo4irbL.cjs.map} +1 -1
  401. package/dist/chunks/{NcHeaderMenu-Da6Ob-6t.mjs → NcHeaderMenu-CeU4L29l.mjs} +3 -5
  402. package/dist/chunks/{NcHeaderMenu-Da6Ob-6t.mjs.map → NcHeaderMenu-CeU4L29l.mjs.map} +1 -1
  403. package/dist/chunks/{NcHeaderMenu-D-Jo3l41.cjs → NcHeaderMenu-CwgL6yg6.cjs} +3 -5
  404. package/dist/chunks/{NcHeaderMenu-D-Jo3l41.cjs.map → NcHeaderMenu-CwgL6yg6.cjs.map} +1 -1
  405. package/dist/chunks/{NcIconSvgWrapper-DaSgIT19.cjs → NcIconSvgWrapper-Cb4bAwV6.cjs} +2 -4
  406. package/dist/chunks/{NcIconSvgWrapper-DaSgIT19.cjs.map → NcIconSvgWrapper-Cb4bAwV6.cjs.map} +1 -1
  407. package/dist/chunks/{NcIconSvgWrapper-Ckqpz-vm.mjs → NcIconSvgWrapper-DjrkBUkC.mjs} +2 -4
  408. package/dist/chunks/{NcIconSvgWrapper-Ckqpz-vm.mjs.map → NcIconSvgWrapper-DjrkBUkC.mjs.map} +1 -1
  409. package/dist/chunks/{NcInputConfirmCancel-WkGs9n0n.mjs → NcInputConfirmCancel-CTMBdhFf.mjs} +5 -7
  410. package/dist/chunks/{NcInputConfirmCancel-WkGs9n0n.mjs.map → NcInputConfirmCancel-CTMBdhFf.mjs.map} +1 -1
  411. package/dist/chunks/{NcInputConfirmCancel-d15q32Kg.cjs → NcInputConfirmCancel-DMTb3AI2.cjs} +5 -7
  412. package/dist/chunks/{NcInputConfirmCancel-d15q32Kg.cjs.map → NcInputConfirmCancel-DMTb3AI2.cjs.map} +1 -1
  413. package/dist/chunks/{NcListItem-C88XN6YO.mjs → NcListItem-79bJNkOw.mjs} +14 -9
  414. package/dist/chunks/NcListItem-79bJNkOw.mjs.map +1 -0
  415. package/dist/chunks/{NcListItem-EKJB0pLP.cjs → NcListItem-BIKAHiIz.cjs} +15 -10
  416. package/dist/chunks/NcListItem-BIKAHiIz.cjs.map +1 -0
  417. package/dist/chunks/{NcListItemIcon-CaH2qDJw.cjs → NcListItemIcon-B03yo56l.cjs} +5 -7
  418. package/dist/chunks/{NcListItemIcon-CaH2qDJw.cjs.map → NcListItemIcon-B03yo56l.cjs.map} +1 -1
  419. package/dist/chunks/{NcListItemIcon-B_1SU8D4.mjs → NcListItemIcon-Bo4o5oVB.mjs} +5 -7
  420. package/dist/chunks/{NcListItemIcon-B_1SU8D4.mjs.map → NcListItemIcon-Bo4o5oVB.mjs.map} +1 -1
  421. package/dist/chunks/{NcPasswordField-BwznS07l.mjs → NcPasswordField-BbbShH-t.mjs} +3 -9
  422. package/dist/chunks/{NcPasswordField-BwznS07l.mjs.map → NcPasswordField-BbbShH-t.mjs.map} +1 -1
  423. package/dist/chunks/{NcPasswordField-DNoYXohw.cjs → NcPasswordField-DYyZIkoL.cjs} +3 -9
  424. package/dist/chunks/{NcPasswordField-DNoYXohw.cjs.map → NcPasswordField-DYyZIkoL.cjs.map} +1 -1
  425. package/dist/chunks/{NcPopover-Cl1AvQ5o.cjs → NcPopover-C0G7sLVP.cjs} +1 -5
  426. package/dist/chunks/{NcPopover-Cl1AvQ5o.cjs.map → NcPopover-C0G7sLVP.cjs.map} +1 -1
  427. package/dist/chunks/{NcPopover-VxUr4c6P.mjs → NcPopover-DbeCmze0.mjs} +1 -5
  428. package/dist/chunks/{NcPopover-VxUr4c6P.mjs.map → NcPopover-DbeCmze0.mjs.map} +1 -1
  429. package/dist/chunks/{NcProgressBar-BnKA91Pj.cjs → NcProgressBar-BrDAF_Zr.cjs} +2 -4
  430. package/dist/chunks/{NcProgressBar-BnKA91Pj.cjs.map → NcProgressBar-BrDAF_Zr.cjs.map} +1 -1
  431. package/dist/chunks/{NcProgressBar-CZtllSde.mjs → NcProgressBar-D_6Z7U5w.mjs} +2 -4
  432. package/dist/chunks/{NcProgressBar-CZtllSde.mjs.map → NcProgressBar-D_6Z7U5w.mjs.map} +1 -1
  433. package/dist/chunks/{NcRelatedResourcesPanel-Dzs3PYFk.cjs → NcRelatedResourcesPanel-Ccltm-Er.cjs} +8 -18
  434. package/dist/chunks/{NcRelatedResourcesPanel-i0NTYqUN.mjs.map → NcRelatedResourcesPanel-Ccltm-Er.cjs.map} +1 -1
  435. package/dist/chunks/{NcRelatedResourcesPanel-i0NTYqUN.mjs → NcRelatedResourcesPanel-DxC7FIlo.mjs} +8 -18
  436. package/dist/chunks/{NcRelatedResourcesPanel-Dzs3PYFk.cjs.map → NcRelatedResourcesPanel-DxC7FIlo.mjs.map} +1 -1
  437. package/dist/chunks/{NcRichContenteditable-CEbFjqp9.mjs → NcRichContenteditable-CZOXY-O9.mjs} +22 -27
  438. package/dist/chunks/NcRichContenteditable-CZOXY-O9.mjs.map +1 -0
  439. package/dist/chunks/{NcRichContenteditable-wPBdqg09.cjs → NcRichContenteditable-DglXhZSr.cjs} +22 -27
  440. package/dist/chunks/NcRichContenteditable-DglXhZSr.cjs.map +1 -0
  441. package/dist/chunks/{NcRichText-yXF4GYlY.mjs → NcRichText-BX80Ezvi.mjs} +8 -10
  442. package/dist/chunks/{NcRichText-yXF4GYlY.mjs.map → NcRichText-BX80Ezvi.mjs.map} +1 -1
  443. package/dist/chunks/{NcRichText-VkvYnsdW.cjs → NcRichText-SLTQmr1-.cjs} +8 -10
  444. package/dist/chunks/{NcRichText-VkvYnsdW.cjs.map → NcRichText-SLTQmr1-.cjs.map} +1 -1
  445. package/dist/chunks/{NcSavingIndicatorIcon-BzKAIkhk.cjs → NcSavingIndicatorIcon-Bu-zt4pR.cjs} +1 -3
  446. package/dist/chunks/{NcSavingIndicatorIcon-BzKAIkhk.cjs.map → NcSavingIndicatorIcon-Bu-zt4pR.cjs.map} +1 -1
  447. package/dist/chunks/{NcSavingIndicatorIcon-Bhy7wcoT.mjs → NcSavingIndicatorIcon-nv1147dk.mjs} +1 -3
  448. package/dist/chunks/{NcSavingIndicatorIcon-Bhy7wcoT.mjs.map → NcSavingIndicatorIcon-nv1147dk.mjs.map} +1 -1
  449. package/dist/chunks/{NcSelect-sVANAgAj.cjs → NcSelect-DMDRJq-5.cjs} +5 -7
  450. package/dist/chunks/{NcSelect-sVANAgAj.cjs.map → NcSelect-DMDRJq-5.cjs.map} +1 -1
  451. package/dist/chunks/{NcSelect-CphXaRDq.mjs → NcSelect-kmuffooC.mjs} +5 -7
  452. package/dist/chunks/{NcSelect-CphXaRDq.mjs.map → NcSelect-kmuffooC.mjs.map} +1 -1
  453. package/dist/chunks/{NcSelectTags-Dj3rLyZe.mjs → NcSelectTags-Bppbqmvs.mjs} +3 -5
  454. package/dist/chunks/{NcSelectTags-Dj3rLyZe.mjs.map → NcSelectTags-Bppbqmvs.mjs.map} +1 -1
  455. package/dist/chunks/{NcSelectTags-DTyiD2pa.cjs → NcSelectTags-DEHO1VM7.cjs} +3 -5
  456. package/dist/chunks/{NcSelectTags-DTyiD2pa.cjs.map → NcSelectTags-DEHO1VM7.cjs.map} +1 -1
  457. package/dist/chunks/{NcSettingsInputText-DWpZg8Av.cjs → NcSettingsInputText-BBQoQrAG.cjs} +3 -5
  458. package/dist/chunks/{NcSettingsInputText-DWpZg8Av.cjs.map → NcSettingsInputText-BBQoQrAG.cjs.map} +1 -1
  459. package/dist/chunks/{NcSettingsInputText-DERFu-YS.mjs → NcSettingsInputText-hAlIWx1R.mjs} +3 -5
  460. package/dist/chunks/{NcSettingsInputText-DERFu-YS.mjs.map → NcSettingsInputText-hAlIWx1R.mjs.map} +1 -1
  461. package/dist/chunks/{NcSettingsSection-CmmnCHg2.mjs → NcSettingsSection-BT-d36B9.mjs} +3 -7
  462. package/dist/chunks/{NcSettingsSection-CmmnCHg2.mjs.map → NcSettingsSection-BT-d36B9.mjs.map} +1 -1
  463. package/dist/chunks/{NcSettingsSection-BwpFsQ1r.cjs → NcSettingsSection-Dvcx-V7F.cjs} +3 -7
  464. package/dist/chunks/{NcSettingsSection-BwpFsQ1r.cjs.map → NcSettingsSection-Dvcx-V7F.cjs.map} +1 -1
  465. package/dist/chunks/{NcSettingsSelectGroup-CL1bEq6g.cjs → NcSettingsSelectGroup-BL8EH6GB.cjs} +4 -6
  466. package/dist/chunks/{NcSettingsSelectGroup-CL1bEq6g.cjs.map → NcSettingsSelectGroup-BL8EH6GB.cjs.map} +1 -1
  467. package/dist/chunks/{NcSettingsSelectGroup-BQc8lPh6.mjs → NcSettingsSelectGroup-OkPHjjsK.mjs} +4 -6
  468. package/dist/chunks/{NcSettingsSelectGroup-BQc8lPh6.mjs.map → NcSettingsSelectGroup-OkPHjjsK.mjs.map} +1 -1
  469. package/dist/chunks/{NcTextField-BDlLxIBj.mjs → NcTextField-DWfgnCsS.mjs} +4 -8
  470. package/dist/chunks/{NcTextField-BDlLxIBj.mjs.map → NcTextField-DWfgnCsS.mjs.map} +1 -1
  471. package/dist/chunks/{NcTextField-DLnxKZWa.cjs → NcTextField-Db1VpUnM.cjs} +4 -8
  472. package/dist/chunks/{NcTextField-DLnxKZWa.cjs.map → NcTextField-Db1VpUnM.cjs.map} +1 -1
  473. package/dist/chunks/{NcTimezonePicker-3t-1P2Jd.cjs → NcTimezonePicker-8R-hkchD.cjs} +3 -5
  474. package/dist/chunks/{NcTimezonePicker-3t-1P2Jd.cjs.map → NcTimezonePicker-8R-hkchD.cjs.map} +1 -1
  475. package/dist/chunks/{NcTimezonePicker-BSkLspq1.mjs → NcTimezonePicker-DdVLB1Bv.mjs} +3 -5
  476. package/dist/chunks/{NcTimezonePicker-BSkLspq1.mjs.map → NcTimezonePicker-DdVLB1Bv.mjs.map} +1 -1
  477. package/dist/chunks/{NcUserBubble-DxTBJt7-.cjs → NcUserBubble-3UqGE1ad.cjs} +4 -8
  478. package/dist/chunks/{NcUserBubble-DxTBJt7-.cjs.map → NcUserBubble-3UqGE1ad.cjs.map} +1 -1
  479. package/dist/chunks/{NcUserBubble-B_i04DHm.mjs → NcUserBubble-CuLF1XDp.mjs} +4 -8
  480. package/dist/chunks/{NcUserBubble-B_i04DHm.mjs.map → NcUserBubble-CuLF1XDp.mjs.map} +1 -1
  481. package/dist/chunks/{NcUserStatusIcon-DZIISraw.mjs → NcUserStatusIcon-CCCrTIIn.mjs} +3 -5
  482. package/dist/chunks/{NcUserStatusIcon-DZIISraw.mjs.map → NcUserStatusIcon-CCCrTIIn.mjs.map} +1 -1
  483. package/dist/chunks/{NcUserStatusIcon-v0iUL9CD.cjs → NcUserStatusIcon-Cx9unttb.cjs} +3 -5
  484. package/dist/chunks/{NcUserStatusIcon-v0iUL9CD.cjs.map → NcUserStatusIcon-Cx9unttb.cjs.map} +1 -1
  485. package/dist/chunks/{ScopeComponent-Din0MwwL.cjs → ScopeComponent-DDA-FdAa.cjs} +1 -1
  486. package/dist/chunks/{ScopeComponent-Din0MwwL.cjs.map → ScopeComponent-DDA-FdAa.cjs.map} +1 -1
  487. package/dist/chunks/{ScopeComponent-BfYUtYsU.mjs → ScopeComponent-_wrdOOmW.mjs} +1 -1
  488. package/dist/chunks/{ScopeComponent-BfYUtYsU.mjs.map → ScopeComponent-_wrdOOmW.mjs.map} +1 -1
  489. package/dist/chunks/_l10n-B4dEPXsr.mjs +130 -0
  490. package/dist/chunks/_l10n-B4dEPXsr.mjs.map +1 -0
  491. package/dist/chunks/_l10n-BEDw4wKe.cjs +129 -0
  492. package/dist/chunks/{_l10n-CikTMMT1.cjs.map → _l10n-BEDw4wKe.cjs.map} +1 -1
  493. package/dist/chunks/{_plugin-vue2_normalizer-D637Qkok.mjs → _plugin-vue2_normalizer-DU4iP6Vu.mjs} +2 -26
  494. package/dist/chunks/_plugin-vue2_normalizer-DU4iP6Vu.mjs.map +1 -0
  495. package/dist/chunks/{_plugin-vue2_normalizer-DbFIE4_M.cjs → _plugin-vue2_normalizer-V0q-tHlQ.cjs} +2 -26
  496. package/dist/chunks/_plugin-vue2_normalizer-V0q-tHlQ.cjs.map +1 -0
  497. package/dist/chunks/{index-CsogA-K5.mjs → index-Bz6q9mZw.mjs} +1 -3
  498. package/dist/chunks/{index-CsogA-K5.mjs.map → index-Bz6q9mZw.mjs.map} +1 -1
  499. package/dist/chunks/{index-oIpl1nrk.cjs → index-CC4ahXvG.cjs} +3 -5
  500. package/dist/chunks/index-CC4ahXvG.cjs.map +1 -0
  501. package/dist/chunks/{index-DbA2OZyf.mjs → index-CMZdBcqP.mjs} +3 -5
  502. package/dist/chunks/index-CMZdBcqP.mjs.map +1 -0
  503. package/dist/chunks/{index-BANjku4q.cjs → index-DIJxEozm.cjs} +1 -3
  504. package/dist/chunks/{index-BANjku4q.cjs.map → index-DIJxEozm.cjs.map} +1 -1
  505. package/dist/chunks/{referencePickerModal-CrqjWX5J.cjs → referencePickerModal-CT32j5pQ.cjs} +17 -35
  506. package/dist/chunks/{referencePickerModal-CrqjWX5J.cjs.map → referencePickerModal-CT32j5pQ.cjs.map} +1 -1
  507. package/dist/chunks/{referencePickerModal-DN2oqc6Q.mjs → referencePickerModal-DW9uLKIZ.mjs} +17 -35
  508. package/dist/chunks/{referencePickerModal-DN2oqc6Q.mjs.map → referencePickerModal-DW9uLKIZ.mjs.map} +1 -1
  509. package/dist/chunks/{usernameToColor-DamXL3WM.cjs → usernameToColor-CpdyuYfd.cjs} +1 -1
  510. package/dist/chunks/{usernameToColor-DamXL3WM.cjs.map → usernameToColor-CpdyuYfd.cjs.map} +1 -1
  511. package/dist/chunks/{usernameToColor-zLYstN5o.mjs → usernameToColor-DivFGAn4.mjs} +1 -1
  512. package/dist/chunks/{usernameToColor-zLYstN5o.mjs.map → usernameToColor-DivFGAn4.mjs.map} +1 -1
  513. package/dist/index.cjs +55 -53
  514. package/dist/index.cjs.map +1 -1
  515. package/dist/index.mjs +56 -54
  516. package/dist/index.mjs.map +1 -1
  517. package/package.json +3 -3
  518. package/dist/chunks/NcActions-BNYD2s1x.mjs.map +0 -1
  519. package/dist/chunks/NcActions-Bu5UnlHN.cjs.map +0 -1
  520. package/dist/chunks/NcAvatar-B_FI8kMO.cjs.map +0 -1
  521. package/dist/chunks/NcAvatar-C1miLzxS.mjs.map +0 -1
  522. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-Dx3hLEKV.cjs +0 -4
  523. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-Dx3hLEKV.cjs.map +0 -1
  524. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-U1P8BlMr.mjs +0 -3
  525. package/dist/chunks/NcCheckboxRadioSwitch.vue_vue_type_style_index_0_scoped_919d07b7_lang-U1P8BlMr.mjs.map +0 -1
  526. package/dist/chunks/NcDateTime-C9kf-YEX.mjs.map +0 -1
  527. package/dist/chunks/NcDateTime-D-MxBcYv.cjs.map +0 -1
  528. package/dist/chunks/NcDialog-DGaf6Udc.cjs.map +0 -1
  529. package/dist/chunks/NcDialog-VincZ0XS.mjs.map +0 -1
  530. package/dist/chunks/NcDialogButton-CNWF4urB.cjs.map +0 -1
  531. package/dist/chunks/NcDialogButton-JvyN3X6S.mjs.map +0 -1
  532. package/dist/chunks/NcListItem-C88XN6YO.mjs.map +0 -1
  533. package/dist/chunks/NcListItem-EKJB0pLP.cjs.map +0 -1
  534. package/dist/chunks/NcRichContenteditable-CEbFjqp9.mjs.map +0 -1
  535. package/dist/chunks/NcRichContenteditable-wPBdqg09.cjs.map +0 -1
  536. package/dist/chunks/_l10n-BlIvfB2V.mjs +0 -130
  537. package/dist/chunks/_l10n-BlIvfB2V.mjs.map +0 -1
  538. package/dist/chunks/_l10n-CikTMMT1.cjs +0 -129
  539. package/dist/chunks/_plugin-vue2_normalizer-D637Qkok.mjs.map +0 -1
  540. package/dist/chunks/_plugin-vue2_normalizer-DbFIE4_M.cjs.map +0 -1
  541. package/dist/chunks/index-DbA2OZyf.mjs.map +0 -1
  542. package/dist/chunks/index-oIpl1nrk.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"NcDashboardWidgetItem-l9PIHfs-.cjs","sources":["../../src/components/NcDashboardWidgetItem/NcDashboardWidgetItem.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 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 meant to be used inside a DashboardWidget component.\n\n</docs>\n\n<template>\n\t<div @mouseover=\"hovered = true\" @mouseleave=\"hovered = false\">\n\t\t<component :is=\"targetUrl ? 'a' : 'div'\"\n\t\t\t:href=\"targetUrl || undefined\"\n\t\t\t:target=\"targetUrl ? '_blank' : undefined\"\n\t\t\t:class=\"{ 'item-list__entry': true, 'item-list__entry--has-actions-menu': gotMenu }\"\n\t\t\t@click=\"onLinkClick\">\n\t\t\t<!-- @slot Slot for passing a user avatar. -->\n\t\t\t<slot name=\"avatar\" :avatar-url=\"avatarUrl\" :avatar-username=\"avatarUsername\">\n\t\t\t\t<NcAvatar class=\"item-avatar\"\n\t\t\t\t\t:size=\"44\"\n\t\t\t\t\t:url=\"avatarUrl\"\n\t\t\t\t\t:user=\"avatarUsername\"\n\t\t\t\t\t:is-no-user=\"avatarIsNoUser\"\n\t\t\t\t\t:show-user-status=\"!gotOverlayIcon\" />\n\t\t\t</slot>\n\t\t\t<img v-if=\"overlayIconUrl\"\n\t\t\t\tclass=\"item-icon\"\n\t\t\t\talt=\"\"\n\t\t\t\t:src=\"overlayIconUrl\">\n\t\t\t<div class=\"item__details\">\n\t\t\t\t<h3 :title=\"mainText\">\n\t\t\t\t\t{{ mainText }}\n\t\t\t\t</h3>\n\t\t\t\t<span v-if=\"subText !== ''\" class=\"message\" :title=\"subText\">\n\t\t\t\t\t{{ subText }}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t<NcActions v-if=\"gotMenu\" :force-menu=\"forceMenu\">\n\t\t\t\t<!-- @slot This slot can be used to provide actions for each dashboard widget item. -->\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<NcActionButton v-for=\"(m, menuItemId) in itemMenu\"\n\t\t\t\t\t\t:key=\"menuItemId\"\n\t\t\t\t\t\t:icon=\"m.icon\"\n\t\t\t\t\t\t:close-after-click=\"true\"\n\t\t\t\t\t\t@click.prevent.stop=\"$emit(menuItemId, item)\">\n\t\t\t\t\t\t{{ m.text }}\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t</slot>\n\t\t\t</NcActions>\n\t\t</component>\n\t</div>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcActions from '../NcActions/index.js'\nimport NcActionButton from '../NcActionButton/index.js'\n\nexport default {\n\tname: 'NcDashboardWidgetItem',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcActions,\n\t\tNcActionButton,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The item id (optional)\n\t\t */\n\t\tid: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * The item element is a link to this URL (optional)\n\t\t */\n\t\ttargetUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Where to get the avatar image. (optional) Used if avatarUsername is not defined.\n\t\t */\n\t\tavatarUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Name to provide to the Avatar. (optional) Used if avatarUrl is not defined.\n\t\t */\n\t\tavatarUsername: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Is the avatarUsername not a user's name? (optional, false by default)\n\t\t */\n\t\tavatarIsNoUser: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Small icon to display on the bottom-right corner of the avatar (optional)\n\t\t */\n\t\toverlayIconUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Item main text (mandatory)\n\t\t */\n\t\tmainText: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * Item subline text (optional)\n\t\t */\n\t\tsubText: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * An object containing context menu entries that will be displayed for each items (optional)\n\t\t */\n\t\titemMenu: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\n\t\t/**\n\t\t * Specify whether the 3 dot menu is forced when only one action is present\n\t\t */\n\t\tforceMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\thovered: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\titem() {\n\t\t\treturn {\n\t\t\t\tid: this.id,\n\t\t\t\ttargetUrl: this.targetUrl,\n\t\t\t\tavatarUrl: this.avatarUrl,\n\t\t\t\tavatarUsername: this.avatarUsername,\n\t\t\t\toverlayIconUrl: this.overlayIconUrl,\n\t\t\t\tmainText: this.mainText,\n\t\t\t\tsubText: this.subText,\n\t\t\t}\n\t\t},\n\t\tgotMenu() {\n\t\t\treturn Object.keys(this.itemMenu).length !== 0 || !!this.$slots.actions\n\t\t},\n\t\tgotOverlayIcon() {\n\t\t\treturn this.overlayIconUrl && this.overlayIconUrl !== ''\n\t\t},\n\t},\n\n\tmethods: {\n\t\tonLinkClick(event) {\n\t\t\tif (event.target.closest('.action-item')) {\n\t\t\t\tevent.preventDefault()\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.item-list__entry {\n\tdisplay: flex;\n\talign-items: center;\n\tposition: relative;\n\tpadding: 8px;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t}\n\t.item-avatar {\n\t\tposition: relative;\n\t\tmargin-top: auto;\n\t\tmargin-bottom: auto;\n\t}\n\t.item__details {\n\t\tpadding-left: 8px;\n\t\tmax-height: fit-content;\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\tmin-height: var(--default-clickable-area);\n\n\t\th3,\n\t\t.message {\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t\t.message span {\n\t\t\twidth: 10px;\n\t\t\tdisplay: inline-block;\n\t\t\tmargin-bottom: -3px;\n\t\t}\n\t\th3 {\n\t\t\tfont-size: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.message {\n\t\t\twidth: 100%;\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\n\t.item-icon {\n\t\tposition: relative;\n\t\twidth: 14px;\n\t\theight: 14px;\n\t\tmargin: 27px -3px 0px -7px;\n\t}\n\n\tbutton.primary {\n\t\tpadding: 21px;\n\t\tmargin: 0;\n\t}\n}\n/*\n.content-popover {\n\theight: 0px;\n\twidth: 0px;\n\tmargin-left: auto;\n\tmargin-right: auto;\n}\n.popover-container {\n\twidth: 100%;\n\theight: 0px;\n}\n*/\n</style>\n"],"names":["NcAvatar","NcActions","NcActionButton"],"mappings":";;;;;AA8DA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAA,SAAA;AAAA,IACA,WAAAC,UAAA;AAAA,IACA,gBAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA;AAAA,eAAA;MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,OAAA;AACA,aAAA;AAAA,QACA,IAAA,KAAA;AAAA,QACA,WAAA,KAAA;AAAA,QACA,WAAA,KAAA;AAAA,QACA,gBAAA,KAAA;AAAA,QACA,gBAAA,KAAA;AAAA,QACA,UAAA,KAAA;AAAA,QACA,SAAA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,IACA,UAAA;AACA,aAAA,OAAA,KAAA,KAAA,QAAA,EAAA,WAAA,KAAA,CAAA,CAAA,KAAA,OAAA;AAAA,IACA;AAAA,IACA,iBAAA;AACA,aAAA,KAAA,kBAAA,KAAA,mBAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,YAAA,OAAA;AACA,UAAA,MAAA,OAAA,QAAA,cAAA,GAAA;AACA,cAAA,eAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcDashboardWidgetItem-DWrAY-RW.cjs","sources":["../../src/components/NcDashboardWidgetItem/NcDashboardWidgetItem.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 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 meant to be used inside a DashboardWidget component.\n\n</docs>\n\n<template>\n\t<div @mouseover=\"hovered = true\" @mouseleave=\"hovered = false\">\n\t\t<component :is=\"targetUrl ? 'a' : 'div'\"\n\t\t\t:href=\"targetUrl || undefined\"\n\t\t\t:target=\"targetUrl ? '_blank' : undefined\"\n\t\t\t:class=\"{ 'item-list__entry': true, 'item-list__entry--has-actions-menu': gotMenu }\"\n\t\t\t@click=\"onLinkClick\">\n\t\t\t<!-- @slot Slot for passing a user avatar. -->\n\t\t\t<slot name=\"avatar\" :avatar-url=\"avatarUrl\" :avatar-username=\"avatarUsername\">\n\t\t\t\t<NcAvatar class=\"item-avatar\"\n\t\t\t\t\t:size=\"44\"\n\t\t\t\t\t:url=\"avatarUrl\"\n\t\t\t\t\t:user=\"avatarUsername\"\n\t\t\t\t\t:is-no-user=\"avatarIsNoUser\"\n\t\t\t\t\t:show-user-status=\"!gotOverlayIcon\" />\n\t\t\t</slot>\n\t\t\t<img v-if=\"overlayIconUrl\"\n\t\t\t\tclass=\"item-icon\"\n\t\t\t\talt=\"\"\n\t\t\t\t:src=\"overlayIconUrl\">\n\t\t\t<div class=\"item__details\">\n\t\t\t\t<h3 :title=\"mainText\">\n\t\t\t\t\t{{ mainText }}\n\t\t\t\t</h3>\n\t\t\t\t<span v-if=\"subText !== ''\" class=\"message\" :title=\"subText\">\n\t\t\t\t\t{{ subText }}\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t<NcActions v-if=\"gotMenu\" :force-menu=\"forceMenu\">\n\t\t\t\t<!-- @slot This slot can be used to provide actions for each dashboard widget item. -->\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<NcActionButton v-for=\"(m, menuItemId) in itemMenu\"\n\t\t\t\t\t\t:key=\"menuItemId\"\n\t\t\t\t\t\t:icon=\"m.icon\"\n\t\t\t\t\t\t:close-after-click=\"true\"\n\t\t\t\t\t\t@click.prevent.stop=\"$emit(menuItemId, item)\">\n\t\t\t\t\t\t{{ m.text }}\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t</slot>\n\t\t\t</NcActions>\n\t\t</component>\n\t</div>\n</template>\n\n<script>\nimport NcAvatar from '../NcAvatar/index.js'\nimport NcActions from '../NcActions/index.js'\nimport NcActionButton from '../NcActionButton/index.js'\n\nexport default {\n\tname: 'NcDashboardWidgetItem',\n\tcomponents: {\n\t\tNcAvatar,\n\t\tNcActions,\n\t\tNcActionButton,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The item id (optional)\n\t\t */\n\t\tid: {\n\t\t\ttype: [String, Number],\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * The item element is a link to this URL (optional)\n\t\t */\n\t\ttargetUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Where to get the avatar image. (optional) Used if avatarUsername is not defined.\n\t\t */\n\t\tavatarUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Name to provide to the Avatar. (optional) Used if avatarUrl is not defined.\n\t\t */\n\t\tavatarUsername: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Is the avatarUsername not a user's name? (optional, false by default)\n\t\t */\n\t\tavatarIsNoUser: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\t/**\n\t\t * Small icon to display on the bottom-right corner of the avatar (optional)\n\t\t */\n\t\toverlayIconUrl: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t\t/**\n\t\t * Item main text (mandatory)\n\t\t */\n\t\tmainText: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * Item subline text (optional)\n\t\t */\n\t\tsubText: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t\t/**\n\t\t * An object containing context menu entries that will be displayed for each items (optional)\n\t\t */\n\t\titemMenu: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\n\t\t/**\n\t\t * Specify whether the 3 dot menu is forced when only one action is present\n\t\t */\n\t\tforceMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\thovered: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\titem() {\n\t\t\treturn {\n\t\t\t\tid: this.id,\n\t\t\t\ttargetUrl: this.targetUrl,\n\t\t\t\tavatarUrl: this.avatarUrl,\n\t\t\t\tavatarUsername: this.avatarUsername,\n\t\t\t\toverlayIconUrl: this.overlayIconUrl,\n\t\t\t\tmainText: this.mainText,\n\t\t\t\tsubText: this.subText,\n\t\t\t}\n\t\t},\n\t\tgotMenu() {\n\t\t\treturn Object.keys(this.itemMenu).length !== 0 || !!this.$slots.actions\n\t\t},\n\t\tgotOverlayIcon() {\n\t\t\treturn this.overlayIconUrl && this.overlayIconUrl !== ''\n\t\t},\n\t},\n\n\tmethods: {\n\t\tonLinkClick(event) {\n\t\t\tif (event.target.closest('.action-item')) {\n\t\t\t\tevent.preventDefault()\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.item-list__entry {\n\tdisplay: flex;\n\talign-items: center;\n\tposition: relative;\n\tpadding: 8px;\n\n\t&:hover,\n\t&:focus {\n\t\tbackground-color: var(--color-background-hover);\n\t\tborder-radius: var(--border-radius-large);\n\t}\n\t.item-avatar {\n\t\tposition: relative;\n\t\tmargin-top: auto;\n\t\tmargin-bottom: auto;\n\t}\n\t.item__details {\n\t\tpadding-left: 8px;\n\t\tmax-height: fit-content;\n\t\tflex-grow: 1;\n\t\toverflow: hidden;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\tmin-height: var(--default-clickable-area);\n\n\t\th3,\n\t\t.message {\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t\t.message span {\n\t\t\twidth: 10px;\n\t\t\tdisplay: inline-block;\n\t\t\tmargin-bottom: -3px;\n\t\t}\n\t\th3 {\n\t\t\tfont-size: 100%;\n\t\t\tmargin: 0;\n\t\t}\n\t\t.message {\n\t\t\twidth: 100%;\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\n\t.item-icon {\n\t\tposition: relative;\n\t\twidth: 14px;\n\t\theight: 14px;\n\t\tmargin: 27px -3px 0px -7px;\n\t}\n\n\tbutton.primary {\n\t\tpadding: 21px;\n\t\tmargin: 0;\n\t}\n}\n/*\n.content-popover {\n\theight: 0px;\n\twidth: 0px;\n\tmargin-left: auto;\n\tmargin-right: auto;\n}\n.popover-container {\n\twidth: 100%;\n\theight: 0px;\n}\n*/\n</style>\n"],"names":["NcAvatar","NcActions","NcActionButton"],"mappings":";;;;;AA8DA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,YAAA;AAAA,IACA,UAAAA,SAAA;AAAA,IACA,WAAAC,UAAA;AAAA,IACA,gBAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,IAAA;AAAA,MACA,MAAA,CAAA,QAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,MAAA;AAAA,eAAA;MAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,OAAA;AACA,aAAA;AAAA,QACA,IAAA,KAAA;AAAA,QACA,WAAA,KAAA;AAAA,QACA,WAAA,KAAA;AAAA,QACA,gBAAA,KAAA;AAAA,QACA,gBAAA,KAAA;AAAA,QACA,UAAA,KAAA;AAAA,QACA,SAAA,KAAA;AAAA,MACA;AAAA,IACA;AAAA,IACA,UAAA;AACA,aAAA,OAAA,KAAA,KAAA,QAAA,EAAA,WAAA,KAAA,CAAA,CAAA,KAAA,OAAA;AAAA,IACA;AAAA,IACA,iBAAA;AACA,aAAA,KAAA,kBAAA,KAAA,mBAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,YAAA,OAAA;AACA,UAAA,MAAA,OAAA,QAAA,cAAA,GAAA;AACA,cAAA,eAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { ref, unref, computed, watch, onMounted, onUnmounted } from "vue";
2
2
  import { getCanonicalLocale, getLanguage } from "@nextcloud/l10n";
3
- import { r as register, j as t2, a as t } from "./_l10n-BlIvfB2V.mjs";
4
- import { n as normalizeComponent } from "./_plugin-vue2_normalizer-D637Qkok.mjs";
3
+ import { r as register, j as t2, a as t } from "./_l10n-B4dEPXsr.mjs";
4
+ import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
5
5
  register(t2);
6
6
  const FEW_SECONDS_AGO = {
7
7
  long: t("a few seconds ago"),
@@ -33,7 +33,7 @@ function useFormatDateTime(timestamp = Date.now(), opts = {}) {
33
33
  const formatter = new Intl.RelativeTimeFormat(getLanguage(), { numeric: "auto", style: wrappedOptions.value.relativeTime });
34
34
  const diff = date.value.getTime() - currentTime.value;
35
35
  const seconds = diff / 1e3;
36
- if (Math.abs(seconds) <= 90) {
36
+ if (Math.abs(seconds) < 59.5) {
37
37
  if (wrappedOptions.value.ignoreSeconds) {
38
38
  return FEW_SECONDS_AGO[wrappedOptions.value.relativeTime];
39
39
  } else {
@@ -41,23 +41,23 @@ function useFormatDateTime(timestamp = Date.now(), opts = {}) {
41
41
  }
42
42
  }
43
43
  const minutes = seconds / 60;
44
- if (Math.abs(minutes) <= 90) {
44
+ if (Math.abs(minutes) <= 59) {
45
45
  return formatter.format(Math.round(minutes), "minute");
46
46
  }
47
47
  const hours = minutes / 60;
48
- if (Math.abs(hours) <= 24) {
48
+ if (Math.abs(hours) < 23.5) {
49
49
  return formatter.format(Math.round(hours), "hour");
50
50
  }
51
51
  const days = hours / 24;
52
- if (Math.abs(days) <= 6) {
52
+ if (Math.abs(days) < 6.5) {
53
53
  return formatter.format(Math.round(days), "day");
54
54
  }
55
- const weeks = days / 7;
56
- if (Math.abs(weeks) <= 4) {
55
+ if (Math.abs(days) < 27.5) {
56
+ const weeks = days / 7;
57
57
  return formatter.format(Math.round(weeks), "week");
58
58
  }
59
59
  const months = days / 30;
60
- if (Math.abs(months) <= 12) {
60
+ if (Math.abs(months) < 11.5) {
61
61
  return formatter.format(Math.round(months), "month");
62
62
  }
63
63
  return formatter.format(Math.round(days / 365), "year");
@@ -149,8 +149,6 @@ var __component__ = /* @__PURE__ */ normalizeComponent(
149
149
  _sfc_staticRenderFns,
150
150
  false,
151
151
  null,
152
- null,
153
- null,
154
152
  null
155
153
  );
156
154
  const NcDateTime = __component__.exports;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NcDateTime-3T3J08Bd.mjs","sources":["../../src/composables/useFormatDateTime.ts","../../src/components/NcDateTime/NcDateTime.vue"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getCanonicalLocale, getLanguage } from '@nextcloud/l10n'\nimport { computed, onUnmounted, ref, onMounted, watch, unref, type Ref } from 'vue'\nimport { t } from '../l10n.js'\n\nconst FEW_SECONDS_AGO = {\n\tlong: t('a few seconds ago'),\n\tshort: t('seconds ago'), // FOR TRANSLATORS: Shorter version of 'a few seconds ago'\n\tnarrow: t('sec. ago'), // FOR TRANSLATORS: If possible in your language an even shorter version of 'a few seconds ago'\n}\n\ninterface FormatDateOptions {\n\t/**\n\t * The format used for displaying, or if relative time is used the format used for the title\n\t */\n\tformat?: Intl.DateTimeFormatOptions\n\t/**\n\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t */\n\tignoreSeconds?: boolean\n\t/**\n\t * Wether to display the timestamp as time from now\n\t */\n\trelativeTime?: false | 'long' | 'short' | 'narrow'\n}\n\ntype MaybeRef<T> = T | Ref<T>\n\n/**\n * Composable for formatting time stamps using current users locale and language\n *\n * @param {Date | number | import('vue').Ref<Date> | import('vue').Ref<number>} timestamp Current timestamp\n * @param {object} opts Optional options\n * @param {Intl.DateTimeFormatOptions} opts.format The format used for displaying, or if relative time is used the format used for the title (optional)\n * @param {boolean} opts.ignoreSeconds Ignore seconds when displaying the relative time and just show `a few seconds ago`\n * @param {false | 'long' | 'short' | 'narrow'} opts.relativeTime Wether to display the timestamp as time from now (optional)\n */\nexport function useFormatDateTime(\n\ttimestamp: MaybeRef<Date|number> = Date.now(),\n\topts: MaybeRef<FormatDateOptions> = {},\n) {\n\t// Current time as Date.now is not reactive\n\tconst currentTime = ref(Date.now())\n\t// The interval ID for the window\n\tlet intervalId: number|undefined\n\n\tconst options = ref({\n\t\tformat: {\n\t\t\ttimeStyle: 'medium',\n\t\t\tdateStyle: 'short',\n\t\t} as Intl.DateTimeFormatOptions,\n\t\trelativeTime: 'long' as const,\n\t\tignoreSeconds: false,\n\t\t...unref(opts),\n\t})\n\tconst wrappedOptions = computed<Required<FormatDateOptions>>(() => ({ ...unref(opts), ...options.value }))\n\n\t/** ECMA Date object of the timestamp */\n\tconst date = computed(() => new Date(unref(timestamp)))\n\n\tconst formattedFullTime = computed<string>(() => {\n\t\tconst formatter = new Intl.DateTimeFormat(getCanonicalLocale(), wrappedOptions.value.format)\n\t\treturn formatter.format(date.value)\n\t})\n\n\t/** Time string formatted for main text */\n\tconst formattedTime = computed<string>(() => {\n\t\tif (wrappedOptions.value.relativeTime !== false) {\n\t\t\tconst formatter = new Intl.RelativeTimeFormat(getLanguage(), { numeric: 'auto', style: wrappedOptions.value.relativeTime })\n\n\t\t\tconst diff = date.value.getTime() - currentTime.value\n\t\t\tconst seconds = diff / 1000\n\t\t\tif (Math.abs(seconds) < 59.5) {\n\t\t\t\tif (wrappedOptions.value.ignoreSeconds) {\n\t\t\t\t\treturn FEW_SECONDS_AGO[wrappedOptions.value.relativeTime]\n\t\t\t\t} else {\n\t\t\t\t\treturn formatter.format(Math.round(seconds), 'second')\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst minutes = seconds / 60\n\t\t\tif (Math.abs(minutes) <= 59) {\n\t\t\t\treturn formatter.format(Math.round(minutes), 'minute')\n\t\t\t}\n\t\t\tconst hours = minutes / 60\n\t\t\tif (Math.abs(hours) < 23.5) {\n\t\t\t\treturn formatter.format(Math.round(hours), 'hour')\n\t\t\t}\n\t\t\tconst days = hours / 24\n\t\t\tif (Math.abs(days) < 6.5) {\n\t\t\t\treturn formatter.format(Math.round(days), 'day')\n\t\t\t}\n\t\t\tif (Math.abs(days) < 27.5) {\n\t\t\t\tconst weeks = days / 7\n\t\t\t\treturn formatter.format(Math.round(weeks), 'week')\n\t\t\t}\n\t\t\tconst months = days / 30\n\t\t\tif (Math.abs(months) < 11.5) {\n\t\t\t\treturn formatter.format(Math.round(months), 'month')\n\t\t\t}\n\t\t\treturn formatter.format(Math.round(days / 365), 'year')\n\t\t}\n\t\treturn formattedFullTime.value\n\t})\n\n\t// Set or clear interval if relative time is dis/enabled\n\twatch([wrappedOptions], () => {\n\t\twindow.clearInterval(intervalId)\n\t\tintervalId = undefined\n\t\tif (wrappedOptions.value.relativeTime) {\n\t\t\tintervalId = window.setInterval(() => { currentTime.value = Date.now() }, 1000)\n\t\t}\n\t})\n\n\t// Start the interval for setting the current time if relative time is enabled\n\tonMounted(() => {\n\t\tif (wrappedOptions.value.relativeTime !== false) {\n\t\t\tintervalId = window.setInterval(() => { currentTime.value = Date.now() }, 1000)\n\t\t}\n\t})\n\n\t// ensure interval is cleared\n\tonUnmounted(() => {\n\t\twindow.clearInterval(intervalId)\n\t})\n\n\treturn {\n\t\tformattedTime,\n\t\tformattedFullTime,\n\t\toptions,\n\t}\n}\n","<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis components purpose is to display a timestamp in the users local time format.\nIt also supports relative time, for examples *6 seconds ago*.\n\n#### Standard usage\n\nWithout any optional parameters the timestamp is displayed as a relative datetime and a title with the full date is added.\n\n```vue\n<template>\n\t<NcDateTime :timestamp=\"timestamp\" />\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Ignore seconds\n\nIf you do not want the seconds to be counted up until minutes are reached you can simply use the `ignore-seconds` property.\n\n```vue\n<template>\n\t<NcDateTime :timestamp=\"timestamp\" :ignore-seconds=\"true\" />\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Custom date or time format\n\nThe component allows to format the full date for the title by settings the `format` property.\nIt is also possible to disable relative time by setting the `relativeTime` property to `false`.\n\n```vue\n<template>\n\t<div>\n\t\t<h4>Short relative time</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" relative-time=\"short\" />\n\n\t\t<h4>Custom title format</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" :format=\"timeFormat\" />\n\n\t\t<h4>Without relative time</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" :format=\"timeFormat\" :relative-time=\"false\" />\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t\t/** For allowed formats see the Intl.DateTimeFormat options */\n\t\t\t\ttimeFormat: {\n\t\t\t\t\tdateStyle: 'short',\n\t\t\t\t\ttimeStyle: 'full'\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t}\n</script>\n<style>\nh4 {\n\tfont-weight: bold;\n\tmargin-top: 12px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<span class=\"nc-datetime\"\n\t\t:data-timestamp=\"timestamp\"\n\t\t:title=\"formattedFullTime\"\n\t\tv-text=\"formattedTime\" />\n</template>\n\n<script>\nimport { computed } from 'vue'\nimport { useFormatDateTime } from '../../composables/useFormatDateTime.ts'\n\nexport default {\n\tname: 'NcDateTime',\n\n\tprops: {\n\t\t/**\n\t\t * The timestamp to display, either an unix timestamp (in milliseconds) or a Date object\n\t\t */\n\t\ttimestamp: {\n\t\t\ttype: [Date, Number],\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * The format used for displaying, or if relative time is used the format used for the title (optional)\n\t\t *\n\t\t * @type {Intl.DateTimeFormatOptions}\n\t\t */\n\t\tformat: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ timeStyle: 'medium', dateStyle: 'short' }),\n\t\t},\n\t\t/**\n\t\t * Wether to display the timestamp as time from now (optional)\n\t\t *\n\t\t * - `false`: Disable relative time\n\t\t * - `'long'`: Long text, like *2 seconds ago* (default)\n\t\t * - `'short'`: Short text, like *2 sec. ago*\n\t\t * - `'narrow'`: Even shorter text (same as `'short'` on some languages)\n\t\t */\n\t\trelativeTime: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: 'long',\n\t\t\tvalidator: (v) => v === false || ['long', 'short', 'narrow'].includes(v),\n\t\t},\n\t\t/**\n\t\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t\t */\n\t\tignoreSeconds: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tsetup(props) {\n\t\tconst timestamp = computed(() => props.timestamp)\n\t\tconst { formattedTime, formattedFullTime } = useFormatDateTime(timestamp, props)\n\t\treturn {\n\t\t\tformattedTime,\n\t\t\tformattedFullTime,\n\t\t}\n\t},\n}\n</script>\n"],"names":[],"mappings":";;;;;AASA,MAAM,kBAAkB;AAAA,EACvB,MAAM,EAAE,mBAAmB;AAAA,EAC3B,OAAO,EAAE,aAAa;AAAA;AAAA,EACtB,QAAQ,EAAE,UAAU;AAAA;AACrB;AA4BO,SAAS,kBACf,YAAmC,KAAK,OACxC,OAAoC,CAAA,GACnC;AAED,QAAM,cAAc,IAAI,KAAK,IAAK,CAAA;AAE9B,MAAA;AAEJ,QAAM,UAAU,IAAI;AAAA,IACnB,QAAQ;AAAA,MACP,WAAW;AAAA,MACX,WAAW;AAAA,IACZ;AAAA,IACA,cAAc;AAAA,IACd,eAAe;AAAA,IACf,GAAG,MAAM,IAAI;AAAA,EAAA,CACb;AACK,QAAA,iBAAiB,SAAsC,OAAO,EAAE,GAAG,MAAM,IAAI,GAAG,GAAG,QAAQ,MAAQ,EAAA;AAGnG,QAAA,OAAO,SAAS,MAAM,IAAI,KAAK,MAAM,SAAS,CAAC,CAAC;AAEhD,QAAA,oBAAoB,SAAiB,MAAM;AAC1C,UAAA,YAAY,IAAI,KAAK,eAAe,sB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A,kBAAA,WAAA,KAAA;AACA,WAAA;AAAA,MACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  const Vue = require("vue");
3
3
  const l10n = require("@nextcloud/l10n");
4
- const _l10n = require("./_l10n-CikTMMT1.cjs");
5
- const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-DbFIE4_M.cjs");
4
+ const _l10n = require("./_l10n-BEDw4wKe.cjs");
5
+ const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
6
6
  _l10n.register(_l10n.t2);
7
7
  const FEW_SECONDS_AGO = {
8
8
  long: _l10n.t("a few seconds ago"),
@@ -34,7 +34,7 @@ function useFormatDateTime(timestamp = Date.now(), opts = {}) {
34
34
  const formatter = new Intl.RelativeTimeFormat(l10n.getLanguage(), { numeric: "auto", style: wrappedOptions.value.relativeTime });
35
35
  const diff = date.value.getTime() - currentTime.value;
36
36
  const seconds = diff / 1e3;
37
- if (Math.abs(seconds) <= 90) {
37
+ if (Math.abs(seconds) < 59.5) {
38
38
  if (wrappedOptions.value.ignoreSeconds) {
39
39
  return FEW_SECONDS_AGO[wrappedOptions.value.relativeTime];
40
40
  } else {
@@ -42,23 +42,23 @@ function useFormatDateTime(timestamp = Date.now(), opts = {}) {
42
42
  }
43
43
  }
44
44
  const minutes = seconds / 60;
45
- if (Math.abs(minutes) <= 90) {
45
+ if (Math.abs(minutes) <= 59) {
46
46
  return formatter.format(Math.round(minutes), "minute");
47
47
  }
48
48
  const hours = minutes / 60;
49
- if (Math.abs(hours) <= 24) {
49
+ if (Math.abs(hours) < 23.5) {
50
50
  return formatter.format(Math.round(hours), "hour");
51
51
  }
52
52
  const days = hours / 24;
53
- if (Math.abs(days) <= 6) {
53
+ if (Math.abs(days) < 6.5) {
54
54
  return formatter.format(Math.round(days), "day");
55
55
  }
56
- const weeks = days / 7;
57
- if (Math.abs(weeks) <= 4) {
56
+ if (Math.abs(days) < 27.5) {
57
+ const weeks = days / 7;
58
58
  return formatter.format(Math.round(weeks), "week");
59
59
  }
60
60
  const months = days / 30;
61
- if (Math.abs(months) <= 12) {
61
+ if (Math.abs(months) < 11.5) {
62
62
  return formatter.format(Math.round(months), "month");
63
63
  }
64
64
  return formatter.format(Math.round(days / 365), "year");
@@ -150,8 +150,6 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
150
150
  _sfc_staticRenderFns,
151
151
  false,
152
152
  null,
153
- null,
154
- null,
155
153
  null
156
154
  );
157
155
  const NcDateTime = __component__.exports;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NcDateTime-4AuZ9Qlt.cjs","sources":["../../src/composables/useFormatDateTime.ts","../../src/components/NcDateTime/NcDateTime.vue"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getCanonicalLocale, getLanguage } from '@nextcloud/l10n'\nimport { computed, onUnmounted, ref, onMounted, watch, unref, type Ref } from 'vue'\nimport { t } from '../l10n.js'\n\nconst FEW_SECONDS_AGO = {\n\tlong: t('a few seconds ago'),\n\tshort: t('seconds ago'), // FOR TRANSLATORS: Shorter version of 'a few seconds ago'\n\tnarrow: t('sec. ago'), // FOR TRANSLATORS: If possible in your language an even shorter version of 'a few seconds ago'\n}\n\ninterface FormatDateOptions {\n\t/**\n\t * The format used for displaying, or if relative time is used the format used for the title\n\t */\n\tformat?: Intl.DateTimeFormatOptions\n\t/**\n\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t */\n\tignoreSeconds?: boolean\n\t/**\n\t * Wether to display the timestamp as time from now\n\t */\n\trelativeTime?: false | 'long' | 'short' | 'narrow'\n}\n\ntype MaybeRef<T> = T | Ref<T>\n\n/**\n * Composable for formatting time stamps using current users locale and language\n *\n * @param {Date | number | import('vue').Ref<Date> | import('vue').Ref<number>} timestamp Current timestamp\n * @param {object} opts Optional options\n * @param {Intl.DateTimeFormatOptions} opts.format The format used for displaying, or if relative time is used the format used for the title (optional)\n * @param {boolean} opts.ignoreSeconds Ignore seconds when displaying the relative time and just show `a few seconds ago`\n * @param {false | 'long' | 'short' | 'narrow'} opts.relativeTime Wether to display the timestamp as time from now (optional)\n */\nexport function useFormatDateTime(\n\ttimestamp: MaybeRef<Date|number> = Date.now(),\n\topts: MaybeRef<FormatDateOptions> = {},\n) {\n\t// Current time as Date.now is not reactive\n\tconst currentTime = ref(Date.now())\n\t// The interval ID for the window\n\tlet intervalId: number|undefined\n\n\tconst options = ref({\n\t\tformat: {\n\t\t\ttimeStyle: 'medium',\n\t\t\tdateStyle: 'short',\n\t\t} as Intl.DateTimeFormatOptions,\n\t\trelativeTime: 'long' as const,\n\t\tignoreSeconds: false,\n\t\t...unref(opts),\n\t})\n\tconst wrappedOptions = computed<Required<FormatDateOptions>>(() => ({ ...unref(opts), ...options.value }))\n\n\t/** ECMA Date object of the timestamp */\n\tconst date = computed(() => new Date(unref(timestamp)))\n\n\tconst formattedFullTime = computed<string>(() => {\n\t\tconst formatter = new Intl.DateTimeFormat(getCanonicalLocale(), wrappedOptions.value.format)\n\t\treturn formatter.format(date.value)\n\t})\n\n\t/** Time string formatted for main text */\n\tconst formattedTime = computed<string>(() => {\n\t\tif (wrappedOptions.value.relativeTime !== false) {\n\t\t\tconst formatter = new Intl.RelativeTimeFormat(getLanguage(), { numeric: 'auto', style: wrappedOptions.value.relativeTime })\n\n\t\t\tconst diff = date.value.getTime() - currentTime.value\n\t\t\tconst seconds = diff / 1000\n\t\t\tif (Math.abs(seconds) < 59.5) {\n\t\t\t\tif (wrappedOptions.value.ignoreSeconds) {\n\t\t\t\t\treturn FEW_SECONDS_AGO[wrappedOptions.value.relativeTime]\n\t\t\t\t} else {\n\t\t\t\t\treturn formatter.format(Math.round(seconds), 'second')\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst minutes = seconds / 60\n\t\t\tif (Math.abs(minutes) <= 59) {\n\t\t\t\treturn formatter.format(Math.round(minutes), 'minute')\n\t\t\t}\n\t\t\tconst hours = minutes / 60\n\t\t\tif (Math.abs(hours) < 23.5) {\n\t\t\t\treturn formatter.format(Math.round(hours), 'hour')\n\t\t\t}\n\t\t\tconst days = hours / 24\n\t\t\tif (Math.abs(days) < 6.5) {\n\t\t\t\treturn formatter.format(Math.round(days), 'day')\n\t\t\t}\n\t\t\tif (Math.abs(days) < 27.5) {\n\t\t\t\tconst weeks = days / 7\n\t\t\t\treturn formatter.format(Math.round(weeks), 'week')\n\t\t\t}\n\t\t\tconst months = days / 30\n\t\t\tif (Math.abs(months) < 11.5) {\n\t\t\t\treturn formatter.format(Math.round(months), 'month')\n\t\t\t}\n\t\t\treturn formatter.format(Math.round(days / 365), 'year')\n\t\t}\n\t\treturn formattedFullTime.value\n\t})\n\n\t// Set or clear interval if relative time is dis/enabled\n\twatch([wrappedOptions], () => {\n\t\twindow.clearInterval(intervalId)\n\t\tintervalId = undefined\n\t\tif (wrappedOptions.value.relativeTime) {\n\t\t\tintervalId = window.setInterval(() => { currentTime.value = Date.now() }, 1000)\n\t\t}\n\t})\n\n\t// Start the interval for setting the current time if relative time is enabled\n\tonMounted(() => {\n\t\tif (wrappedOptions.value.relativeTime !== false) {\n\t\t\tintervalId = window.setInterval(() => { currentTime.value = Date.now() }, 1000)\n\t\t}\n\t})\n\n\t// ensure interval is cleared\n\tonUnmounted(() => {\n\t\twindow.clearInterval(intervalId)\n\t})\n\n\treturn {\n\t\tformattedTime,\n\t\tformattedFullTime,\n\t\toptions,\n\t}\n}\n","<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis components purpose is to display a timestamp in the users local time format.\nIt also supports relative time, for examples *6 seconds ago*.\n\n#### Standard usage\n\nWithout any optional parameters the timestamp is displayed as a relative datetime and a title with the full date is added.\n\n```vue\n<template>\n\t<NcDateTime :timestamp=\"timestamp\" />\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Ignore seconds\n\nIf you do not want the seconds to be counted up until minutes are reached you can simply use the `ignore-seconds` property.\n\n```vue\n<template>\n\t<NcDateTime :timestamp=\"timestamp\" :ignore-seconds=\"true\" />\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t}\n\t\t},\n\t}\n</script>\n```\n\n#### Custom date or time format\n\nThe component allows to format the full date for the title by settings the `format` property.\nIt is also possible to disable relative time by setting the `relativeTime` property to `false`.\n\n```vue\n<template>\n\t<div>\n\t\t<h4>Short relative time</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" relative-time=\"short\" />\n\n\t\t<h4>Custom title format</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" :format=\"timeFormat\" />\n\n\t\t<h4>Without relative time</h4>\n\t\t<NcDateTime :timestamp=\"timestamp\" :format=\"timeFormat\" :relative-time=\"false\" />\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t\t/** For allowed formats see the Intl.DateTimeFormat options */\n\t\t\t\ttimeFormat: {\n\t\t\t\t\tdateStyle: 'short',\n\t\t\t\t\ttimeStyle: 'full'\n\t\t\t\t},\n\t\t\t}\n\t\t},\n\t}\n</script>\n<style>\nh4 {\n\tfont-weight: bold;\n\tmargin-top: 12px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<span class=\"nc-datetime\"\n\t\t:data-timestamp=\"timestamp\"\n\t\t:title=\"formattedFullTime\"\n\t\tv-text=\"formattedTime\" />\n</template>\n\n<script>\nimport { computed } from 'vue'\nimport { useFormatDateTime } from '../../composables/useFormatDateTime.ts'\n\nexport default {\n\tname: 'NcDateTime',\n\n\tprops: {\n\t\t/**\n\t\t * The timestamp to display, either an unix timestamp (in milliseconds) or a Date object\n\t\t */\n\t\ttimestamp: {\n\t\t\ttype: [Date, Number],\n\t\t\trequired: true,\n\t\t},\n\t\t/**\n\t\t * The format used for displaying, or if relative time is used the format used for the title (optional)\n\t\t *\n\t\t * @type {Intl.DateTimeFormatOptions}\n\t\t */\n\t\tformat: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => ({ timeStyle: 'medium', dateStyle: 'short' }),\n\t\t},\n\t\t/**\n\t\t * Wether to display the timestamp as time from now (optional)\n\t\t *\n\t\t * - `false`: Disable relative time\n\t\t * - `'long'`: Long text, like *2 seconds ago* (default)\n\t\t * - `'short'`: Short text, like *2 sec. ago*\n\t\t * - `'narrow'`: Even shorter text (same as `'short'` on some languages)\n\t\t */\n\t\trelativeTime: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: 'long',\n\t\t\tvalidator: (v) => v === false || ['long', 'short', 'narrow'].includes(v),\n\t\t},\n\t\t/**\n\t\t * Ignore seconds when displaying the relative time and just show `a few seconds ago`\n\t\t */\n\t\tignoreSeconds: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tsetup(props) {\n\t\tconst timestamp = computed(() => props.timestamp)\n\t\tconst { formattedTime, formattedFullTime } = useFormatDateTime(timestamp, props)\n\t\treturn {\n\t\t\tformattedTime,\n\t\t\tformattedFullTime,\n\t\t}\n\t},\n}\n</script>\n"],"names":["t","ref","unref","computed","getCanonicalLocale","getLanguage","watch","onMounted","onUnmounted"],"mappings":";;;;;;AASA,MAAM,kBAAkB;AAAA,EACvB,MAAMA,QAAE,mBAAmB;AAAA,EAC3B,OAAOA,QAAE,aAAa;AAAA;AAAA,EACtB,QAAQA,QAAE,UAAU;AAAA;AACrB;AA4BO,SAAS,kBACf,YAAmC,KAAK,OACxC,OAAoC,CAAA,GACnC;AAED,QAAM,cAAcC,IAAA,IAAI,KAAK,IAAK,CAAA;AAE9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,IAMA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA,OAAA,EAAA,WAAA,UAAA,WAAA,QAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IASA,cAAA;AAAA,MACA,MAAA,CAAA,SAAA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,MAAA,MAAA,SAAA,CAAA,QAAA,SAAA,QAAA,EAAA,SAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAIA,eAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,MAAA,OAAA;AACA,UAAA,YAAAL,IAAAA,SAAA,MAAA,MAAA,SAAA;AACA,UAAA,EAAA,eAAA,kBAAA,IAAA,kBAAA,WAAA,KAAA;AACA,WAAA;AAAA,MACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
@@ -1,11 +1,11 @@
1
- require('../assets/NcDialog-j6_6dpiF.css');
1
+ require('../assets/NcDialog-DKdW_D2J.css');
2
2
  "use strict";
3
3
  const core = require("@vueuse/core");
4
4
  const Vue = require("vue");
5
5
  const Components_NcModal = require("../Components/NcModal.cjs");
6
- const NcDialogButton = require("./NcDialogButton-CNWF4urB.cjs");
6
+ const NcDialogButton = require("./NcDialogButton-Cq7U6E8M.cjs");
7
7
  const GenRandomId = require("./GenRandomId-BQDud3d4.cjs");
8
- const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-DbFIE4_M.cjs");
8
+ const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
9
9
  const _sfc_main = Vue.defineComponent({
10
10
  name: "NcDialog",
11
11
  components: {
@@ -87,6 +87,15 @@ const _sfc_main = Vue.defineComponent({
87
87
  type: Boolean,
88
88
  default: false
89
89
  },
90
+ /**
91
+ * Make the dialog wrapper a HTML form element.
92
+ * The buttons will be wrapped within the form so they can be used as submit / reset buttons.
93
+ * Please note that when using the property the `navigation` should not be used.
94
+ */
95
+ isForm: {
96
+ type: Boolean,
97
+ default: false
98
+ },
90
99
  /**
91
100
  * Declare if hiding the modal should be animated
92
101
  * @default false
@@ -156,7 +165,7 @@ const _sfc_main = Vue.defineComponent({
156
165
  default: ""
157
166
  }
158
167
  },
159
- emits: ["closing", "update:open"],
168
+ emits: ["closing", "update:open", "submit"],
160
169
  setup(props, { emit, slots }) {
161
170
  const wrapper = Vue.ref();
162
171
  const { width: dialogWidth } = core.useElementSize(wrapper, { width: 900 });
@@ -170,8 +179,24 @@ const _sfc_main = Vue.defineComponent({
170
179
  }
171
180
  return props.navigationAriaLabelledby || navigationId;
172
181
  });
182
+ const dialogElement = Vue.ref();
183
+ const dialogTagName = Vue.computed(() => props.isForm && !hasNavigation.value ? "form" : "div");
184
+ const dialogListeners = Vue.computed(
185
+ () => dialogTagName.value === "form" ? {
186
+ /**
187
+ * @param {SubmitEvent} event Form submit event
188
+ */
189
+ submit(event) {
190
+ event.preventDefault();
191
+ emit("submit", event);
192
+ }
193
+ } : {}
194
+ );
173
195
  const showModal = Vue.ref(true);
174
196
  const handleButtonClose = () => {
197
+ if (dialogTagName.value === "form" && !dialogElement.value.reportValidity()) {
198
+ return;
199
+ }
175
200
  handleClosing();
176
201
  window.setTimeout(() => handleClosed(), 300);
177
202
  };
@@ -197,6 +222,9 @@ const _sfc_main = Vue.defineComponent({
197
222
  additionalTrapElements: props.additionalTrapElements
198
223
  }));
199
224
  return {
225
+ dialogElement,
226
+ dialogListeners,
227
+ dialogTagName,
200
228
  handleButtonClose,
201
229
  handleClosing,
202
230
  handleClosed,
@@ -213,13 +241,13 @@ const _sfc_main = Vue.defineComponent({
213
241
  var _sfc_render = function render() {
214
242
  var _vm = this, _c = _vm._self._c;
215
243
  _vm._self._setupProxy;
216
- return _vm.open ? _c("NcModal", _vm._b({ staticClass: "dialog__modal", attrs: { "enable-slideshow": false, "enable-swipe": false }, on: { "close": _vm.handleClosed, "update:show": _vm.handleClosing } }, "NcModal", _vm.modalProps, false), [_c("h2", { staticClass: "dialog__name", attrs: { "id": _vm.navigationId }, domProps: { "textContent": _vm._s(_vm.name) } }), _c("div", { staticClass: "dialog", class: _vm.dialogClasses }, [_c("div", { ref: "wrapper", class: ["dialog__wrapper", { "dialog__wrapper--collapsed": _vm.isNavigationCollapsed }] }, [_vm.hasNavigation ? _c("nav", { staticClass: "dialog__navigation", class: _vm.navigationClasses, attrs: { "aria-label": _vm.navigationAriaLabelAttr, "aria-labelledby": _vm.navigationAriaLabelledbyAttr } }, [_vm._t("navigation", null, { "isCollapsed": _vm.isNavigationCollapsed })], 2) : _vm._e(), _c("div", { staticClass: "dialog__content", class: _vm.contentClasses }, [_vm._t("default", function() {
244
+ return _vm.open ? _c("NcModal", _vm._b({ staticClass: "dialog__modal", attrs: { "enable-slideshow": false, "enable-swipe": false }, on: { "close": _vm.handleClosed, "update:show": _vm.handleClosing } }, "NcModal", _vm.modalProps, false), [_c("h2", { staticClass: "dialog__name", attrs: { "id": _vm.navigationId }, domProps: { "textContent": _vm._s(_vm.name) } }), _c(_vm.dialogTagName, _vm._g({ ref: "dialogElement", tag: "component", staticClass: "dialog", class: _vm.dialogClasses }, _vm.dialogListeners), [_c("div", { ref: "wrapper", class: ["dialog__wrapper", { "dialog__wrapper--collapsed": _vm.isNavigationCollapsed }] }, [_vm.hasNavigation ? _c("nav", { staticClass: "dialog__navigation", class: _vm.navigationClasses, attrs: { "aria-label": _vm.navigationAriaLabelAttr, "aria-labelledby": _vm.navigationAriaLabelledbyAttr } }, [_vm._t("navigation", null, { "isCollapsed": _vm.isNavigationCollapsed })], 2) : _vm._e(), _c("div", { staticClass: "dialog__content", class: _vm.contentClasses }, [_vm._t("default", function() {
217
245
  return [_c("p", { staticClass: "dialog__text" }, [_vm._v(" " + _vm._s(_vm.message) + " ")])];
218
246
  })], 2)]), _c("div", { staticClass: "dialog__actions" }, [_vm._t("actions", function() {
219
247
  return _vm._l(_vm.buttons, function(button, idx) {
220
248
  return _c("NcDialogButton", _vm._b({ key: idx, on: { "click": _vm.handleButtonClose } }, "NcDialogButton", button, false));
221
249
  });
222
- })], 2)])]) : _vm._e();
250
+ })], 2)])], 1) : _vm._e();
223
251
  };
224
252
  var _sfc_staticRenderFns = [];
225
253
  var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
@@ -228,9 +256,7 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
228
256
  _sfc_staticRenderFns,
229
257
  false,
230
258
  null,
231
- "b23fe976",
232
- null,
233
- null
259
+ "de9f48dc"
234
260
  );
235
261
  const NcDialog = __component__.exports;
236
262
  exports.NcDialog = NcDialog;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NcDialog-C7L86Jj6.cjs","sources":["../../src/components/NcDialog/NcDialog.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### General description\n\nThis component uses the `NcModal` under the hood for allowing users to create generic dialogs.\n\n### Basic example\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog :open.sync=\"showDialog\" name=\"Confirmation\" message=\"Are you sure to proceed?\" :buttons=\"buttons\" />\n\t\t<p>Last response: {{ lastResponse }}</p>\n\t</div>\n</template>\n<script>\nimport IconCancel from '@mdi/svg/svg/cancel.svg?raw'\nimport IconCheck from '@mdi/svg/svg/check.svg?raw'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tlastResponse: 'None',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Cancel',\n\t\t\t\t\ticon: IconCancel,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Cancel\"' },\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Ok',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Ok\"' },\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Use custom actions and content\nInstead of using the buttons property, you can also inject your custom actions using a named slot.\nYou can also use the default slot to inject custom content.\n\n```vue\n<template>\n\t<div style=\"display: flex; gap: 12px;\">\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcButton @click=\"showLongDialog = true\">Show long dialog</NcButton>\n\t\t<NcDialog v-if=\"showDialog\" name=\"Warning\" :can-close=\"false\">\n\t\t\t<template #actions>\n\t\t\t\t<NcButton @click=\"showDialog = false\">Ok</NcButton>\n\t\t\t</template>\n\t\t\t<div style=\"color: red; font-weight: bold;\">This is serious</div>\n\t\t</NcDialog>\n\t\t<NcDialog :open.sync=\"showLongDialog\" name=\"Lorem Ipsum\">\n\t\t\t<p v-for=\"i in new Array(63)\" :key=\"i\">Lorem ipsum dolor sit amet.</p>\n\t\t</NcDialog>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tshowLongDialog: false,\n\t\t}\n\t},\n}\n</script>\n```\n\n### Form example\nIt is also possible to use the dialog for small forms.\nThis can be used when asking for a password, a name or similar to have native form validation.\n\nTo make the dialog a form the `is-form` prop needs to be set.\nWhen using the form variant you can also pass buttons with `nativeType` prop to add a native `submit` button.\n\nNote that this is not possible if the dialog contains a navigation!\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog is-form\n\t\t\t:buttons=\"buttons\"\n\t\t\tname=\"Choose a name\"\n\t\t\t:open.sync=\"showDialog\"\n\t\t\t@submit=\"currentName = newName\"\n\t\t\t@closing=\"newName = ''\">\n\t\t\t<NcTextField label=\"New name\"\n\t\t\t\tplaceholder=\"Min. 6 characters\"\n\t\t\t\trequired\n\t\t\t\tminlength=\"6\"\n\t\t\t\t:value.sync=\"newName\" />\n\t\t</NcDialog>\n\t\t<p>New name: {{ currentName }}</p>\n\t</div>\n</template>\n<script>\nimport IconCancel from '@mdi/svg/svg/cancel.svg?raw'\nimport IconCheck from '@mdi/svg/svg/check.svg?raw'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tnewName: '',\n\t\t\tcurrentName: 'none yet.',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Submit',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\tnativeType: 'submit',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcModal v-if=\"open\"\n\t\tclass=\"dialog__modal\"\n\t\t:enable-slideshow=\"false\"\n\t\t:enable-swipe=\"false\"\n\t\tv-bind=\"modalProps\"\n\t\t@close=\"handleClosed\"\n\t\t@update:show=\"handleClosing\">\n\t\t<!-- The dialog name / header -->\n\t\t<h2 :id=\"navigationId\" class=\"dialog__name\" v-text=\"name\" />\n\t\t<component :is=\"dialogTagName\"\n\t\t\tref=\"dialogElement\"\n\t\t\tclass=\"dialog\"\n\t\t\t:class=\"dialogClasses\"\n\t\t\tv-on=\"dialogListeners\">\n\t\t\t<div ref=\"wrapper\" :class=\"['dialog__wrapper', { 'dialog__wrapper--collapsed': isNavigationCollapsed }]\">\n\t\t\t\t<!-- When the navigation is collapsed (too small dialog) it is displayed above the main content, otherwise on the inline start -->\n\t\t\t\t<nav v-if=\"hasNavigation\"\n\t\t\t\t\tclass=\"dialog__navigation\"\n\t\t\t\t\t:class=\"navigationClasses\"\n\t\t\t\t\t:aria-label=\"navigationAriaLabelAttr\"\n\t\t\t\t\t:aria-labelledby=\"navigationAriaLabelledbyAttr\">\n\t\t\t\t\t<slot name=\"navigation\" :is-collapsed=\"isNavigationCollapsed\" />\n\t\t\t\t</nav>\n\t\t\t\t<!-- Main dialog content -->\n\t\t\t\t<div class=\"dialog__content\" :class=\"contentClasses\">\n\t\t\t\t\t<slot>\n\t\t\t\t\t\t<p class=\"dialog__text\">\n\t\t\t\t\t\t\t{{ message }}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!-- The dialog actions aka the buttons -->\n\t\t\t<div class=\"dialog__actions\">\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<NcDialogButton v-for=\"(button, idx) in buttons\"\n\t\t\t\t\t\t:key=\"idx\"\n\t\t\t\t\t\tv-bind=\"button\"\n\t\t\t\t\t\t@click=\"handleButtonClose\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</component>\n\t</NcModal>\n</template>\n\n<script>\nimport { useElementSize } from '@vueuse/core'\nimport { computed, defineComponent, ref } from 'vue'\n\nimport NcModal from '../NcModal/index.js'\nimport NcDialogButton from '../NcDialogButton/index.js'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default defineComponent({\n\tname: 'NcDialog',\n\n\tcomponents: {\n\t\tNcDialogButton,\n\t\tNcModal,\n\t},\n\n\tprops: {\n\t\t/** Name of the dialog (the heading) */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Text of the dialog */\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Additional elements to add to the focus trap */\n\t\tadditionalTrapElements: {\n\t\t\ttype: Array,\n\t\t\tvalidator: (arr) => {\n\t\t\t\treturn (\n\t\t\t\t\tArray.isArray(arr) && arr.every(\n\t\t\t\t\t\t(element) =>\n\t\t\t\t\t\t\ttypeof element === 'string' || element instanceof HTMLElement,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t},\n\t\t\tdefault: () => ([]),\n\t\t},\n\n\t\t/**\n\t\t * The element where to mount the dialog, if `null` is passed the dialog is mounted in place\n\t\t * @default 'body'\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'body',\n\t\t},\n\n\t\t/**\n\t\t * Whether the dialog should be shown\n\t\t * @default true\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Size of the underlying NcModal\n\t\t * @default 'small'\n\t\t * @type {'small'|'normal'|'large'|'full'}\n\t\t */\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'small',\n\t\t\tvalidator: (value) => typeof value === 'string' && ['small', 'normal', 'large', 'full'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * Buttons to display\n\t\t * @default []\n\t\t */\n\t\tbuttons: {\n\t\t\ttype: Array,\n\t\t\trequired: false,\n\t\t\tdefault: () => ([]),\n\t\t\tvalidator: (value) => Array.isArray(value) && value.every((element) => typeof element === 'object'),\n\t\t},\n\n\t\t/**\n\t\t * Set to false to no show a close button on the dialog\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Close the dialog if the user clicked outside of the dialog\n\t\t * Only relevant if `canClose` is set to true.\n\t\t */\n\t\tcloseOnClickOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Make the dialog wrapper a HTML form element.\n\t\t * The buttons will be wrapped within the form so they can be used as submit / reset buttons.\n\t\t * Please note that when using the property the `navigation` should not be used.\n\t\t */\n\t\tisForm: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Declare if hiding the modal should be animated\n\t\t * @default false\n\t\t */\n\t\toutTransition: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the navigation for custom styling\n\t\t * @default ''\n\t\t * @example\n\t\t * ```html\n\t\t * <DialogBase :navigation-classes=\"['mydialog-navigation']\"><!-- --></DialogBase>\n\t\t * <!-- ... -->\n\t\t * <style lang=\"scss\">\n\t\t * :deep(.mydialog-navigation) {\n\t\t * flex-direction: row-reverse;\n\t\t * }\n\t\t * </style>\n\t\t * ```\n\t\t */\n\t\tnavigationClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-label for the dialog navigation.\n\t\t * Use it when you want to provide a more meaningful label than the dialog name.\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-labelledby for the dialog navigation.\n\t\t * Use it when you have an implicit navigation label (e.g. a heading).\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabelledby: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the content wrapper for custom styling\n\t\t * @default ''\n\t\t */\n\t\tcontentClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the dialog itself\n\t\t * (the default `class` attribute will be set on the modal wrapper)\n\t\t * @default ''\n\t\t */\n\t\tdialogClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['closing', 'update:open', 'submit'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t * @type {import('vue').Ref<HTMLDivElement>}\n\t\t */\n\t\tconst wrapper = ref()\n\n\t\t/**\n\t\t * We use the dialog width to decide if we collapse the navigation (flex direction row)\n\t\t */\n\t\tconst { width: dialogWidth } = useElementSize(wrapper, { width: 900 })\n\n\t\t/**\n\t\t * Whether the navigation is collapsed due to dialog and window size\n\t\t * (collapses when modal is below: 900px modal width - 2x 12px margin)\n\t\t */\n\t\tconst isNavigationCollapsed = computed(() => dialogWidth.value < 876)\n\n\t\t/**\n\t\t * Whether a navigation was passed and the element should be displayed\n\t\t */\n\t\tconst hasNavigation = computed(() => slots?.navigation !== undefined)\n\n\t\t/**\n\t\t * The unique id of the nav element\n\t\t */\n\t\tconst navigationId = GenRandomId()\n\n\t\t/**\n\t\t * aria-label attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelAttr = computed(() => props.navigationAriaLabel || undefined)\n\n\t\t/**\n\t\t * aria-labelledby attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelledbyAttr = computed(() => {\n\t\t\tif (props.navigationAriaLabel) {\n\t\t\t\t// Not needed, already labelled by aria-label\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\t// Use dialog name as a fallback label for navigation\n\t\t\treturn props.navigationAriaLabelledby || navigationId\n\t\t})\n\n\t\t/**\n\t\t * @type {import('vue').Ref<HTMLFormElement|undefined>}\n\t\t */\n\t\tconst dialogElement = ref()\n\t\t/**\n\t\t * The HTML element to use for the dialog wrapper - either form or plain div\n\t\t */\n\t\tconst dialogTagName = computed(() => props.isForm && !hasNavigation.value ? 'form' : 'div')\n\t\t/**\n\t\t * Listener to assign to the dialog element\n\t\t * This only sets the `@submit` listener if the dialog element is a form\n\t\t */\n\t\tconst dialogListeners = computed(() => dialogTagName.value === 'form'\n\t\t\t? {\n\t\t\t\t/**\n\t\t\t\t * @param {SubmitEvent} event Form submit event\n\t\t\t\t */\n\t\t\t\tsubmit(event) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t/** Forwarded HTMLFormElement submit event (only if `is-form` is set) */\n\t\t\t\t\temit('submit', event)\n\t\t\t\t},\n\t\t\t}\n\t\t\t: {},\n\t\t)\n\n\t\t/**\n\t\t * If the underlying modal is shown\n\t\t */\n\t\tconst showModal = ref(true)\n\n\t\t// Because NcModal does not emit `close` when show prop is changed\n\t\t/**\n\t\t * Handle clicking a dialog button -> should close\n\t\t */\n\t\tconst handleButtonClose = () => {\n\t\t\t// Skip close if invalid dialog\n\t\t\tif (dialogTagName.value === 'form' && !dialogElement.value.reportValidity()) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\thandleClosing()\n\t\t\twindow.setTimeout(() => handleClosed(), 300)\n\t\t}\n\n\t\t/**\n\t\t * Handle closing the dialog, optional out transition did not run yet\n\t\t */\n\t\tconst handleClosing = () => {\n\t\t\tshowModal.value = false\n\t\t\t/**\n\t\t\t * Emitted when the dialog is closing, so the out transition did not finish yet\n\t\t\t */\n\t\t\temit('closing')\n\t\t}\n\n\t\t/**\n\t\t * Handle dialog closed (out transition finished)\n\t\t */\n\t\tconst handleClosed = () => {\n\t\t\tshowModal.value = true\n\t\t\t/**\n\t\t\t * Emitted then the dialog is fully closed and the out transition run\n\t\t\t */\n\t\t\temit('update:open', false)\n\t\t}\n\n\t\t/**\n\t\t * Properties to pass to the underlying NcModal\n\t\t */\n\t\tconst modalProps = computed(() => ({\n\t\t\tcanClose: props.canClose,\n\t\t\tcontainer: props.container === undefined ? 'body' : props.container,\n\t\t\t// we do not pass the name as we already have the name as the headline\n\t\t\t// name: props.name,\n\t\t\t// But we need to set the correct label id so the dialog is labelled\n\t\t\tlabelId: navigationId,\n\t\t\tsize: props.size,\n\t\t\tshow: props.open && showModal.value,\n\t\t\toutTransition: props.outTransition,\n\t\t\tcloseOnClickOutside: props.closeOnClickOutside,\n\t\t\tadditionalTrapElements: props.additionalTrapElements,\n\t\t}))\n\n\t\treturn {\n\t\t\tdialogElement,\n\t\t\tdialogListeners,\n\t\t\tdialogTagName,\n\t\t\thandleButtonClose,\n\t\t\thandleClosing,\n\t\t\thandleClosed,\n\t\t\thasNavigation,\n\t\t\tnavigationId,\n\t\t\tnavigationAriaLabelAttr,\n\t\t\tnavigationAriaLabelledbyAttr,\n\t\t\tisNavigationCollapsed,\n\t\t\tmodalProps,\n\t\t\twrapper,\n\t\t}\n\t},\n})\n</script>\n\n<style lang=\"scss\">\n/** When having the small dialog style we override the modal styling so dialogs look more dialog like */\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t.dialog__modal .modal-wrapper--small .modal-container {\n\t\twidth: fit-content;\n\t\theight: unset;\n\t\tmax-height: 90%;\n\t\tposition: relative;\n\t\ttop: unset;\n\t\tborder-radius: var(--border-radius-large);\n\t}\n}\n</style>\n\n<style lang=\"scss\" scoped>\n.dialog {\n\theight: 100%;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\toverflow: hidden;\n\n\t&__modal {\n\t\t:deep(.modal-wrapper .modal-container) {\n\t\t\tdisplay: flex !important;\n\t\t\tpadding-block: 4px 0; // 4px to align with close button, 0 block-end to make overflowing content on scroll look nice\n\t\t\tpadding-inline: 12px 0; // Same as with padding-block, we need the actions to have a margin of 4px for the button outline\n\t\t}\n\t\t:deep(.modal-wrapper .modal-container__content) {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\toverflow: hidden; // Only overflow on the .dialog__content\n\t\t}\n\t}\n\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\t// Auto scale to fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: hidden;\n\n\t\t&--collapsed {\n\t\t\tflex-direction: column;\n\t\t}\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-shrink: 0;\n\t}\n\n\t// Navigation styling when side-by-side with content\n\t&__wrapper:not(&__wrapper--collapsed) &__navigation {\n\t\tflex-direction: column;\n\n\t\toverflow: hidden auto;\n\t\theight: 100%;\n\t\tmin-width: 200px;\n\t\tmargin-inline-end: 20px;\n\t}\n\n\t// Navigation styling when on top of content\n\t&__wrapper#{&}__wrapper--collapsed &__navigation {\n\t\tflex-direction: row;\n\t\tjustify-content: space-between;\n\n\t\toverflow: auto hidden;\n\t\twidth: 100%;\n\t\tmin-width: 100%;\n\t}\n\n\t&__name {\n\t\tfont-size: 21px;\n\n\t\ttext-align: center;\n\t\theight: fit-content;\n\t\tmin-height: var(--default-clickable-area);\n\t\tline-height: var(--default-clickable-area);\n\t\toverflow-wrap: break-word;\n\t\tmargin-block: 0 12px;\n\t}\n\n\t&__content {\n\t\t// Auto fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: auto;\n\t\t// see .dialog__modal, we can not set the padding there to prevent floating scroll bars\n\t\tpadding-inline-end: 12px;\n\t}\n\n\t// In case only text content is show\n\t&__text {\n\t\t// Also add padding to the bottom to make it more readable\n\t\tpadding-block-end: 6px;\n\t}\n\n\t&__actions {\n\t\tbox-sizing: border-box;\n\n\t\tdisplay: flex;\n\t\tgap: 6px;\n\t\talign-content: center;\n\t\tjustify-content: end;\n\n\t\twidth: 100%;\n\t\tmax-width: 100%;\n\t\tpadding-inline: 0 12px; // 12px to align with the overall modal padding\n\t\tmargin-inline: 0;\n\t\tmargin-block: 0;\n\n\t\t&:not(:empty) {\n\t\t\tmargin-block: 6px 12px; // only if there are actions, we add margin so if it is empty scroll content looks nice\n\t\t}\n\t}\n}\n\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t// Ensure the dialog name does not interfere with the close button\n\t.dialog__name {\n\t\ttext-align: start;\n\t\tmargin-inline-end: var(--default-clickable-area);\n\t}\n}\n</style>\n"],"names":["defineComponent","NcDialogButton","NcModal","ref","useElementSize","computed","GenRandomId"],"mappings":";;;;;;;AA2LA,MAAA,YAAAA,IAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,gBAAAC,eAAA;AAAA,IACA,SAAAC;AAAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA,IAEA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA,IAG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import { useElementSize } from "@vueuse/core";
3
3
  import { defineComponent, ref, computed } from "vue";
4
4
  import NcModal from "../Components/NcModal.mjs";
5
- import { N as NcDialogButton } from "./NcDialogButton-JvyN3X6S.mjs";
5
+ import { N as NcDialogButton } from "./NcDialogButton-DzPzSBzz.mjs";
6
6
  import { G as GenRandomId } from "./GenRandomId-CMooMQt0.mjs";
7
- import { n as normalizeComponent } from "./_plugin-vue2_normalizer-D637Qkok.mjs";
7
+ import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
8
8
  const _sfc_main = defineComponent({
9
9
  name: "NcDialog",
10
10
  components: {
@@ -86,6 +86,15 @@ const _sfc_main = defineComponent({
86
86
  type: Boolean,
87
87
  default: false
88
88
  },
89
+ /**
90
+ * Make the dialog wrapper a HTML form element.
91
+ * The buttons will be wrapped within the form so they can be used as submit / reset buttons.
92
+ * Please note that when using the property the `navigation` should not be used.
93
+ */
94
+ isForm: {
95
+ type: Boolean,
96
+ default: false
97
+ },
89
98
  /**
90
99
  * Declare if hiding the modal should be animated
91
100
  * @default false
@@ -155,7 +164,7 @@ const _sfc_main = defineComponent({
155
164
  default: ""
156
165
  }
157
166
  },
158
- emits: ["closing", "update:open"],
167
+ emits: ["closing", "update:open", "submit"],
159
168
  setup(props, { emit, slots }) {
160
169
  const wrapper = ref();
161
170
  const { width: dialogWidth } = useElementSize(wrapper, { width: 900 });
@@ -169,8 +178,24 @@ const _sfc_main = defineComponent({
169
178
  }
170
179
  return props.navigationAriaLabelledby || navigationId;
171
180
  });
181
+ const dialogElement = ref();
182
+ const dialogTagName = computed(() => props.isForm && !hasNavigation.value ? "form" : "div");
183
+ const dialogListeners = computed(
184
+ () => dialogTagName.value === "form" ? {
185
+ /**
186
+ * @param {SubmitEvent} event Form submit event
187
+ */
188
+ submit(event) {
189
+ event.preventDefault();
190
+ emit("submit", event);
191
+ }
192
+ } : {}
193
+ );
172
194
  const showModal = ref(true);
173
195
  const handleButtonClose = () => {
196
+ if (dialogTagName.value === "form" && !dialogElement.value.reportValidity()) {
197
+ return;
198
+ }
174
199
  handleClosing();
175
200
  window.setTimeout(() => handleClosed(), 300);
176
201
  };
@@ -196,6 +221,9 @@ const _sfc_main = defineComponent({
196
221
  additionalTrapElements: props.additionalTrapElements
197
222
  }));
198
223
  return {
224
+ dialogElement,
225
+ dialogListeners,
226
+ dialogTagName,
199
227
  handleButtonClose,
200
228
  handleClosing,
201
229
  handleClosed,
@@ -212,13 +240,13 @@ const _sfc_main = defineComponent({
212
240
  var _sfc_render = function render() {
213
241
  var _vm = this, _c = _vm._self._c;
214
242
  _vm._self._setupProxy;
215
- return _vm.open ? _c("NcModal", _vm._b({ staticClass: "dialog__modal", attrs: { "enable-slideshow": false, "enable-swipe": false }, on: { "close": _vm.handleClosed, "update:show": _vm.handleClosing } }, "NcModal", _vm.modalProps, false), [_c("h2", { staticClass: "dialog__name", attrs: { "id": _vm.navigationId }, domProps: { "textContent": _vm._s(_vm.name) } }), _c("div", { staticClass: "dialog", class: _vm.dialogClasses }, [_c("div", { ref: "wrapper", class: ["dialog__wrapper", { "dialog__wrapper--collapsed": _vm.isNavigationCollapsed }] }, [_vm.hasNavigation ? _c("nav", { staticClass: "dialog__navigation", class: _vm.navigationClasses, attrs: { "aria-label": _vm.navigationAriaLabelAttr, "aria-labelledby": _vm.navigationAriaLabelledbyAttr } }, [_vm._t("navigation", null, { "isCollapsed": _vm.isNavigationCollapsed })], 2) : _vm._e(), _c("div", { staticClass: "dialog__content", class: _vm.contentClasses }, [_vm._t("default", function() {
243
+ return _vm.open ? _c("NcModal", _vm._b({ staticClass: "dialog__modal", attrs: { "enable-slideshow": false, "enable-swipe": false }, on: { "close": _vm.handleClosed, "update:show": _vm.handleClosing } }, "NcModal", _vm.modalProps, false), [_c("h2", { staticClass: "dialog__name", attrs: { "id": _vm.navigationId }, domProps: { "textContent": _vm._s(_vm.name) } }), _c(_vm.dialogTagName, _vm._g({ ref: "dialogElement", tag: "component", staticClass: "dialog", class: _vm.dialogClasses }, _vm.dialogListeners), [_c("div", { ref: "wrapper", class: ["dialog__wrapper", { "dialog__wrapper--collapsed": _vm.isNavigationCollapsed }] }, [_vm.hasNavigation ? _c("nav", { staticClass: "dialog__navigation", class: _vm.navigationClasses, attrs: { "aria-label": _vm.navigationAriaLabelAttr, "aria-labelledby": _vm.navigationAriaLabelledbyAttr } }, [_vm._t("navigation", null, { "isCollapsed": _vm.isNavigationCollapsed })], 2) : _vm._e(), _c("div", { staticClass: "dialog__content", class: _vm.contentClasses }, [_vm._t("default", function() {
216
244
  return [_c("p", { staticClass: "dialog__text" }, [_vm._v(" " + _vm._s(_vm.message) + " ")])];
217
245
  })], 2)]), _c("div", { staticClass: "dialog__actions" }, [_vm._t("actions", function() {
218
246
  return _vm._l(_vm.buttons, function(button, idx) {
219
247
  return _c("NcDialogButton", _vm._b({ key: idx, on: { "click": _vm.handleButtonClose } }, "NcDialogButton", button, false));
220
248
  });
221
- })], 2)])]) : _vm._e();
249
+ })], 2)])], 1) : _vm._e();
222
250
  };
223
251
  var _sfc_staticRenderFns = [];
224
252
  var __component__ = /* @__PURE__ */ normalizeComponent(
@@ -227,9 +255,7 @@ var __component__ = /* @__PURE__ */ normalizeComponent(
227
255
  _sfc_staticRenderFns,
228
256
  false,
229
257
  null,
230
- "b23fe976",
231
- null,
232
- null
258
+ "de9f48dc"
233
259
  );
234
260
  const NcDialog = __component__.exports;
235
261
  export {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NcDialog-DXRkgfxf.mjs","sources":["../../src/components/NcDialog/NcDialog.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### General description\n\nThis component uses the `NcModal` under the hood for allowing users to create generic dialogs.\n\n### Basic example\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog :open.sync=\"showDialog\" name=\"Confirmation\" message=\"Are you sure to proceed?\" :buttons=\"buttons\" />\n\t\t<p>Last response: {{ lastResponse }}</p>\n\t</div>\n</template>\n<script>\nimport IconCancel from '@mdi/svg/svg/cancel.svg?raw'\nimport IconCheck from '@mdi/svg/svg/check.svg?raw'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tlastResponse: 'None',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Cancel',\n\t\t\t\t\ticon: IconCancel,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Cancel\"' },\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Ok',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t\tcallback: () => { this.lastResponse = 'Pressed \"Ok\"' },\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n\n### Use custom actions and content\nInstead of using the buttons property, you can also inject your custom actions using a named slot.\nYou can also use the default slot to inject custom content.\n\n```vue\n<template>\n\t<div style=\"display: flex; gap: 12px;\">\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcButton @click=\"showLongDialog = true\">Show long dialog</NcButton>\n\t\t<NcDialog v-if=\"showDialog\" name=\"Warning\" :can-close=\"false\">\n\t\t\t<template #actions>\n\t\t\t\t<NcButton @click=\"showDialog = false\">Ok</NcButton>\n\t\t\t</template>\n\t\t\t<div style=\"color: red; font-weight: bold;\">This is serious</div>\n\t\t</NcDialog>\n\t\t<NcDialog :open.sync=\"showLongDialog\" name=\"Lorem Ipsum\">\n\t\t\t<p v-for=\"i in new Array(63)\" :key=\"i\">Lorem ipsum dolor sit amet.</p>\n\t\t</NcDialog>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tshowLongDialog: false,\n\t\t}\n\t},\n}\n</script>\n```\n\n### Form example\nIt is also possible to use the dialog for small forms.\nThis can be used when asking for a password, a name or similar to have native form validation.\n\nTo make the dialog a form the `is-form` prop needs to be set.\nWhen using the form variant you can also pass buttons with `nativeType` prop to add a native `submit` button.\n\nNote that this is not possible if the dialog contains a navigation!\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showDialog = true\">Show dialog</NcButton>\n\t\t<NcDialog is-form\n\t\t\t:buttons=\"buttons\"\n\t\t\tname=\"Choose a name\"\n\t\t\t:open.sync=\"showDialog\"\n\t\t\t@submit=\"currentName = newName\"\n\t\t\t@closing=\"newName = ''\">\n\t\t\t<NcTextField label=\"New name\"\n\t\t\t\tplaceholder=\"Min. 6 characters\"\n\t\t\t\trequired\n\t\t\t\tminlength=\"6\"\n\t\t\t\t:value.sync=\"newName\" />\n\t\t</NcDialog>\n\t\t<p>New name: {{ currentName }}</p>\n\t</div>\n</template>\n<script>\nimport IconCancel from '@mdi/svg/svg/cancel.svg?raw'\nimport IconCheck from '@mdi/svg/svg/check.svg?raw'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tnewName: '',\n\t\t\tcurrentName: 'none yet.',\n\t\t\tbuttons: [\n\t\t\t\t{\n\t\t\t\t\tlabel: 'Submit',\n\t\t\t\t\ttype: 'primary',\n\t\t\t\t\tnativeType: 'submit',\n\t\t\t\t\ticon: IconCheck,\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<NcModal v-if=\"open\"\n\t\tclass=\"dialog__modal\"\n\t\t:enable-slideshow=\"false\"\n\t\t:enable-swipe=\"false\"\n\t\tv-bind=\"modalProps\"\n\t\t@close=\"handleClosed\"\n\t\t@update:show=\"handleClosing\">\n\t\t<!-- The dialog name / header -->\n\t\t<h2 :id=\"navigationId\" class=\"dialog__name\" v-text=\"name\" />\n\t\t<component :is=\"dialogTagName\"\n\t\t\tref=\"dialogElement\"\n\t\t\tclass=\"dialog\"\n\t\t\t:class=\"dialogClasses\"\n\t\t\tv-on=\"dialogListeners\">\n\t\t\t<div ref=\"wrapper\" :class=\"['dialog__wrapper', { 'dialog__wrapper--collapsed': isNavigationCollapsed }]\">\n\t\t\t\t<!-- When the navigation is collapsed (too small dialog) it is displayed above the main content, otherwise on the inline start -->\n\t\t\t\t<nav v-if=\"hasNavigation\"\n\t\t\t\t\tclass=\"dialog__navigation\"\n\t\t\t\t\t:class=\"navigationClasses\"\n\t\t\t\t\t:aria-label=\"navigationAriaLabelAttr\"\n\t\t\t\t\t:aria-labelledby=\"navigationAriaLabelledbyAttr\">\n\t\t\t\t\t<slot name=\"navigation\" :is-collapsed=\"isNavigationCollapsed\" />\n\t\t\t\t</nav>\n\t\t\t\t<!-- Main dialog content -->\n\t\t\t\t<div class=\"dialog__content\" :class=\"contentClasses\">\n\t\t\t\t\t<slot>\n\t\t\t\t\t\t<p class=\"dialog__text\">\n\t\t\t\t\t\t\t{{ message }}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<!-- The dialog actions aka the buttons -->\n\t\t\t<div class=\"dialog__actions\">\n\t\t\t\t<slot name=\"actions\">\n\t\t\t\t\t<NcDialogButton v-for=\"(button, idx) in buttons\"\n\t\t\t\t\t\t:key=\"idx\"\n\t\t\t\t\t\tv-bind=\"button\"\n\t\t\t\t\t\t@click=\"handleButtonClose\" />\n\t\t\t\t</slot>\n\t\t\t</div>\n\t\t</component>\n\t</NcModal>\n</template>\n\n<script>\nimport { useElementSize } from '@vueuse/core'\nimport { computed, defineComponent, ref } from 'vue'\n\nimport NcModal from '../NcModal/index.js'\nimport NcDialogButton from '../NcDialogButton/index.js'\n\nimport GenRandomId from '../../utils/GenRandomId.js'\n\nexport default defineComponent({\n\tname: 'NcDialog',\n\n\tcomponents: {\n\t\tNcDialogButton,\n\t\tNcModal,\n\t},\n\n\tprops: {\n\t\t/** Name of the dialog (the heading) */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/** Text of the dialog */\n\t\tmessage: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/** Additional elements to add to the focus trap */\n\t\tadditionalTrapElements: {\n\t\t\ttype: Array,\n\t\t\tvalidator: (arr) => {\n\t\t\t\treturn (\n\t\t\t\t\tArray.isArray(arr) && arr.every(\n\t\t\t\t\t\t(element) =>\n\t\t\t\t\t\t\ttypeof element === 'string' || element instanceof HTMLElement,\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t},\n\t\t\tdefault: () => ([]),\n\t\t},\n\n\t\t/**\n\t\t * The element where to mount the dialog, if `null` is passed the dialog is mounted in place\n\t\t * @default 'body'\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'body',\n\t\t},\n\n\t\t/**\n\t\t * Whether the dialog should be shown\n\t\t * @default true\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Size of the underlying NcModal\n\t\t * @default 'small'\n\t\t * @type {'small'|'normal'|'large'|'full'}\n\t\t */\n\t\tsize: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'small',\n\t\t\tvalidator: (value) => typeof value === 'string' && ['small', 'normal', 'large', 'full'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * Buttons to display\n\t\t * @default []\n\t\t */\n\t\tbuttons: {\n\t\t\ttype: Array,\n\t\t\trequired: false,\n\t\t\tdefault: () => ([]),\n\t\t\tvalidator: (value) => Array.isArray(value) && value.every((element) => typeof element === 'object'),\n\t\t},\n\n\t\t/**\n\t\t * Set to false to no show a close button on the dialog\n\t\t * @default true\n\t\t */\n\t\tcanClose: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Close the dialog if the user clicked outside of the dialog\n\t\t * Only relevant if `canClose` is set to true.\n\t\t */\n\t\tcloseOnClickOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Make the dialog wrapper a HTML form element.\n\t\t * The buttons will be wrapped within the form so they can be used as submit / reset buttons.\n\t\t * Please note that when using the property the `navigation` should not be used.\n\t\t */\n\t\tisForm: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Declare if hiding the modal should be animated\n\t\t * @default false\n\t\t */\n\t\toutTransition: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the navigation for custom styling\n\t\t * @default ''\n\t\t * @example\n\t\t * ```html\n\t\t * <DialogBase :navigation-classes=\"['mydialog-navigation']\"><!-- --></DialogBase>\n\t\t * <!-- ... -->\n\t\t * <style lang=\"scss\">\n\t\t * :deep(.mydialog-navigation) {\n\t\t * flex-direction: row-reverse;\n\t\t * }\n\t\t * </style>\n\t\t * ```\n\t\t */\n\t\tnavigationClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-label for the dialog navigation.\n\t\t * Use it when you want to provide a more meaningful label than the dialog name.\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabel: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-labelledby for the dialog navigation.\n\t\t * Use it when you have an implicit navigation label (e.g. a heading).\n\t\t *\n\t\t * By default, navigation is labeled by the dialog name.\n\t\t */\n\t\tnavigationAriaLabelledby: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the content wrapper for custom styling\n\t\t * @default ''\n\t\t */\n\t\tcontentClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Optionally pass additionaly classes which will be set on the dialog itself\n\t\t * (the default `class` attribute will be set on the modal wrapper)\n\t\t * @default ''\n\t\t */\n\t\tdialogClasses: {\n\t\t\ttype: [String, Array, Object],\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['closing', 'update:open', 'submit'],\n\n\tsetup(props, { emit, slots }) {\n\t\t/**\n\t\t * The dialog wrapper element\n\t\t * @type {import('vue').Ref<HTMLDivElement>}\n\t\t */\n\t\tconst wrapper = ref()\n\n\t\t/**\n\t\t * We use the dialog width to decide if we collapse the navigation (flex direction row)\n\t\t */\n\t\tconst { width: dialogWidth } = useElementSize(wrapper, { width: 900 })\n\n\t\t/**\n\t\t * Whether the navigation is collapsed due to dialog and window size\n\t\t * (collapses when modal is below: 900px modal width - 2x 12px margin)\n\t\t */\n\t\tconst isNavigationCollapsed = computed(() => dialogWidth.value < 876)\n\n\t\t/**\n\t\t * Whether a navigation was passed and the element should be displayed\n\t\t */\n\t\tconst hasNavigation = computed(() => slots?.navigation !== undefined)\n\n\t\t/**\n\t\t * The unique id of the nav element\n\t\t */\n\t\tconst navigationId = GenRandomId()\n\n\t\t/**\n\t\t * aria-label attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelAttr = computed(() => props.navigationAriaLabel || undefined)\n\n\t\t/**\n\t\t * aria-labelledby attribute for the nav element\n\t\t */\n\t\tconst navigationAriaLabelledbyAttr = computed(() => {\n\t\t\tif (props.navigationAriaLabel) {\n\t\t\t\t// Not needed, already labelled by aria-label\n\t\t\t\treturn undefined\n\t\t\t}\n\t\t\t// Use dialog name as a fallback label for navigation\n\t\t\treturn props.navigationAriaLabelledby || navigationId\n\t\t})\n\n\t\t/**\n\t\t * @type {import('vue').Ref<HTMLFormElement|undefined>}\n\t\t */\n\t\tconst dialogElement = ref()\n\t\t/**\n\t\t * The HTML element to use for the dialog wrapper - either form or plain div\n\t\t */\n\t\tconst dialogTagName = computed(() => props.isForm && !hasNavigation.value ? 'form' : 'div')\n\t\t/**\n\t\t * Listener to assign to the dialog element\n\t\t * This only sets the `@submit` listener if the dialog element is a form\n\t\t */\n\t\tconst dialogListeners = computed(() => dialogTagName.value === 'form'\n\t\t\t? {\n\t\t\t\t/**\n\t\t\t\t * @param {SubmitEvent} event Form submit event\n\t\t\t\t */\n\t\t\t\tsubmit(event) {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t/** Forwarded HTMLFormElement submit event (only if `is-form` is set) */\n\t\t\t\t\temit('submit', event)\n\t\t\t\t},\n\t\t\t}\n\t\t\t: {},\n\t\t)\n\n\t\t/**\n\t\t * If the underlying modal is shown\n\t\t */\n\t\tconst showModal = ref(true)\n\n\t\t// Because NcModal does not emit `close` when show prop is changed\n\t\t/**\n\t\t * Handle clicking a dialog button -> should close\n\t\t */\n\t\tconst handleButtonClose = () => {\n\t\t\t// Skip close if invalid dialog\n\t\t\tif (dialogTagName.value === 'form' && !dialogElement.value.reportValidity()) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\thandleClosing()\n\t\t\twindow.setTimeout(() => handleClosed(), 300)\n\t\t}\n\n\t\t/**\n\t\t * Handle closing the dialog, optional out transition did not run yet\n\t\t */\n\t\tconst handleClosing = () => {\n\t\t\tshowModal.value = false\n\t\t\t/**\n\t\t\t * Emitted when the dialog is closing, so the out transition did not finish yet\n\t\t\t */\n\t\t\temit('closing')\n\t\t}\n\n\t\t/**\n\t\t * Handle dialog closed (out transition finished)\n\t\t */\n\t\tconst handleClosed = () => {\n\t\t\tshowModal.value = true\n\t\t\t/**\n\t\t\t * Emitted then the dialog is fully closed and the out transition run\n\t\t\t */\n\t\t\temit('update:open', false)\n\t\t}\n\n\t\t/**\n\t\t * Properties to pass to the underlying NcModal\n\t\t */\n\t\tconst modalProps = computed(() => ({\n\t\t\tcanClose: props.canClose,\n\t\t\tcontainer: props.container === undefined ? 'body' : props.container,\n\t\t\t// we do not pass the name as we already have the name as the headline\n\t\t\t// name: props.name,\n\t\t\t// But we need to set the correct label id so the dialog is labelled\n\t\t\tlabelId: navigationId,\n\t\t\tsize: props.size,\n\t\t\tshow: props.open && showModal.value,\n\t\t\toutTransition: props.outTransition,\n\t\t\tcloseOnClickOutside: props.closeOnClickOutside,\n\t\t\tadditionalTrapElements: props.additionalTrapElements,\n\t\t}))\n\n\t\treturn {\n\t\t\tdialogElement,\n\t\t\tdialogListeners,\n\t\t\tdialogTagName,\n\t\t\thandleButtonClose,\n\t\t\thandleClosing,\n\t\t\thandleClosed,\n\t\t\thasNavigation,\n\t\t\tnavigationId,\n\t\t\tnavigationAriaLabelAttr,\n\t\t\tnavigationAriaLabelledbyAttr,\n\t\t\tisNavigationCollapsed,\n\t\t\tmodalProps,\n\t\t\twrapper,\n\t\t}\n\t},\n})\n</script>\n\n<style lang=\"scss\">\n/** When having the small dialog style we override the modal styling so dialogs look more dialog like */\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t.dialog__modal .modal-wrapper--small .modal-container {\n\t\twidth: fit-content;\n\t\theight: unset;\n\t\tmax-height: 90%;\n\t\tposition: relative;\n\t\ttop: unset;\n\t\tborder-radius: var(--border-radius-large);\n\t}\n}\n</style>\n\n<style lang=\"scss\" scoped>\n.dialog {\n\theight: 100%;\n\twidth: 100%;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\toverflow: hidden;\n\n\t&__modal {\n\t\t:deep(.modal-wrapper .modal-container) {\n\t\t\tdisplay: flex !important;\n\t\t\tpadding-block: 4px 0; // 4px to align with close button, 0 block-end to make overflowing content on scroll look nice\n\t\t\tpadding-inline: 12px 0; // Same as with padding-block, we need the actions to have a margin of 4px for the button outline\n\t\t}\n\t\t:deep(.modal-wrapper .modal-container__content) {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\toverflow: hidden; // Only overflow on the .dialog__content\n\t\t}\n\t}\n\n\t&__wrapper {\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\t\t// Auto scale to fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: hidden;\n\n\t\t&--collapsed {\n\t\t\tflex-direction: column;\n\t\t}\n\t}\n\n\t&__navigation {\n\t\tdisplay: flex;\n\t\tflex-shrink: 0;\n\t}\n\n\t// Navigation styling when side-by-side with content\n\t&__wrapper:not(&__wrapper--collapsed) &__navigation {\n\t\tflex-direction: column;\n\n\t\toverflow: hidden auto;\n\t\theight: 100%;\n\t\tmin-width: 200px;\n\t\tmargin-inline-end: 20px;\n\t}\n\n\t// Navigation styling when on top of content\n\t&__wrapper#{&}__wrapper--collapsed &__navigation {\n\t\tflex-direction: row;\n\t\tjustify-content: space-between;\n\n\t\toverflow: auto hidden;\n\t\twidth: 100%;\n\t\tmin-width: 100%;\n\t}\n\n\t&__name {\n\t\tfont-size: 21px;\n\n\t\ttext-align: center;\n\t\theight: fit-content;\n\t\tmin-height: var(--default-clickable-area);\n\t\tline-height: var(--default-clickable-area);\n\t\toverflow-wrap: break-word;\n\t\tmargin-block: 0 12px;\n\t}\n\n\t&__content {\n\t\t// Auto fit\n\t\tflex: 1;\n\t\tmin-height: 0;\n\t\toverflow: auto;\n\t\t// see .dialog__modal, we can not set the padding there to prevent floating scroll bars\n\t\tpadding-inline-end: 12px;\n\t}\n\n\t// In case only text content is show\n\t&__text {\n\t\t// Also add padding to the bottom to make it more readable\n\t\tpadding-block-end: 6px;\n\t}\n\n\t&__actions {\n\t\tbox-sizing: border-box;\n\n\t\tdisplay: flex;\n\t\tgap: 6px;\n\t\talign-content: center;\n\t\tjustify-content: end;\n\n\t\twidth: 100%;\n\t\tmax-width: 100%;\n\t\tpadding-inline: 0 12px; // 12px to align with the overall modal padding\n\t\tmargin-inline: 0;\n\t\tmargin-block: 0;\n\n\t\t&:not(:empty) {\n\t\t\tmargin-block: 6px 12px; // only if there are actions, we add margin so if it is empty scroll content looks nice\n\t\t}\n\t}\n}\n\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t// Ensure the dialog name does not interfere with the close button\n\t.dialog__name {\n\t\ttext-align: start;\n\t\tmargin-inline-end: var(--default-clickable-area);\n\t}\n}\n</style>\n"],"names":[],"mappings":";;;;;;AA2LA,MAAA,YAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA,IAEA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA,IAGA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA,IAGA,wBAAA;AAAA,MACA,MAAA;AAAA,MACA,WAAA,CAAA,QAAA;AACA,eACA,MAAA,QAAA,GAAA,KAAA,IAAA;AAAA,UACA,CAAA,YACA,OAAA,YAAA,YAAA,mBAAA;AAAA,QACA;AAAA,MAEA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,UAAA,OAAA,UAAA,YAAA,CAAA,SAAA,UAAA,SAAA,MAAA,EAAA,SAAA,KAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,SAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA,MAAA,CAAA;AAAA,MACA,WAAA,CAAA,UAAA,MAAA,QAAA,KAAA,KAAA,MAAA,MAAA,CAAA,YAAA,OAAA,YAAA,QAAA;AAAA,IAC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,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  const Vue = require("vue");
3
3
  const Components_NcButton = require("../Components/NcButton.cjs");
4
- const NcIconSvgWrapper = require("./NcIconSvgWrapper-DaSgIT19.cjs");
5
- const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-DbFIE4_M.cjs");
4
+ const NcIconSvgWrapper = require("./NcIconSvgWrapper-Cb4bAwV6.cjs");
5
+ const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
6
6
  const _sfc_main = Vue.defineComponent({
7
7
  name: "NcDialogButton",
8
8
  components: {
@@ -16,7 +16,9 @@ const _sfc_main = Vue.defineComponent({
16
16
  */
17
17
  callback: {
18
18
  type: Function,
19
- required: true
19
+ required: false,
20
+ default: () => {
21
+ }
20
22
  },
21
23
  /**
22
24
  * The label of the button
@@ -41,7 +43,18 @@ const _sfc_main = Vue.defineComponent({
41
43
  type: String,
42
44
  required: false,
43
45
  default: "secondary",
44
- validator: (type) => typeof type === "string" && ["primary", "secondary", "error", "warning", "success"].includes(type)
46
+ validator: (type) => typeof type === "string" && ["primary", "secondary", "tertiary", "error", "warning", "success"].includes(type)
47
+ },
48
+ /**
49
+ * See `nativeType` of `NcButton`
50
+ */
51
+ nativeType: {
52
+ type: String,
53
+ required: false,
54
+ default: "button",
55
+ validator(value) {
56
+ return ["submit", "reset", "button"].includes(value);
57
+ }
45
58
  },
46
59
  /**
47
60
  * If the button should be shown as disabled
@@ -64,7 +77,7 @@ const _sfc_main = Vue.defineComponent({
64
77
  var _sfc_render = function render() {
65
78
  var _vm = this, _c = _vm._self._c;
66
79
  _vm._self._setupProxy;
67
- return _c("NcButton", { attrs: { "aria-label": _vm.label, "disabled": _vm.disabled, "type": _vm.type }, on: { "click": _vm.handleClick }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
80
+ return _c("NcButton", { attrs: { "aria-label": _vm.label, "disabled": _vm.disabled, "native-type": _vm.nativeType, "type": _vm.type }, on: { "click": _vm.handleClick }, scopedSlots: _vm._u([{ key: "icon", fn: function() {
68
81
  return [_vm._t("icon", function() {
69
82
  return [_vm.icon !== void 0 ? _c("NcIconSvgWrapper", { attrs: { "svg": _vm.icon } }) : _vm._e()];
70
83
  })];
@@ -77,8 +90,6 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
77
90
  _sfc_staticRenderFns,
78
91
  false,
79
92
  null,
80
- null,
81
- null,
82
93
  null
83
94
  );
84
95
  const NcDialogButton = __component__.exports;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NcDialogButton-Cq7U6E8M.cjs","sources":["../../src/components/NcDialogButton/NcDialogButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nDialog button component used by NcDialog in the actions slot to display the buttons passed by the `buttons` prop.\n</docs>\n\n<template>\n\t<NcButton :aria-label=\"label\"\n\t\t:disabled=\"disabled\"\n\t\t:native-type=\"nativeType\"\n\t\t:type=\"type\"\n\t\t@click=\"handleClick\">\n\t\t{{ label }}\n\t\t<template #icon>\n\t\t\t<!-- @slot Allow to set a custom icon for the button -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<NcIconSvgWrapper v-if=\"icon !== undefined\" :svg=\"icon\" />\n\t\t\t</slot>\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script>\nimport { defineComponent } from 'vue'\nimport NcButton from '../NcButton/index.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.js'\n\nexport default defineComponent({\n\tname: 'NcDialogButton',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tNcIconSvgWrapper,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The function that will be called when the button is pressed\n\t\t * @type {() => void}\n\t\t */\n\t\tcallback: {\n\t\t\ttype: Function,\n\t\t\trequired: false,\n\t\t\tdefault: () => {},\n\t\t},\n\n\t\t/**\n\t\t * The label of the button\n\t\t */\n\t\tlabel: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Optional inline SVG icon for the button\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * The button type, see NcButton\n\t\t * @type {'primary'|'secondary'|'error'|'warning'|'success'}\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'secondary',\n\t\t\tvalidator: (type) => typeof type === 'string' && ['primary', 'secondary', 'tertiary', 'error', 'warning', 'success'].includes(type),\n\t\t},\n\n\t\t/**\n\t\t * See `nativeType` of `NcButton`\n\t\t */\n\t\tnativeType: {\n\t\t\ttype: String,\n\t\t\trequired: false,\n\t\t\tdefault: 'button',\n\t\t\tvalidator(value) {\n\t\t\t\treturn ['submit', 'reset', 'button'].includes(value)\n\t\t\t},\n\t\t},\n\n\t\t/**\n\t\t * If the button should be shown as disabled\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: ['click'],\n\n\tsetup(props, { emit }) {\n\t\t/**\n\t\t * Handle clicking the button\n\t\t * @param {MouseEvent} e The click event\n\t\t */\n\t\tconst handleClick = (e) => {\n\t\t\tprops.callback?.()\n\t\t\temit('click', e)\n\t\t}\n\n\t\treturn { handleClick }\n\t},\n})\n</script>\n"],"names":["defineComponent","NcButton","NcIconSvgWrapper"],"mappings":";;;;;AA8BA,MAAA,YAAAA,IAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC;AAAAA,IACA,k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