@nextcloud/vue 8.28.0 → 8.29.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 (474) hide show
  1. package/CHANGELOG.md +57 -26
  2. package/dist/Components/NcActionButton.cjs +1 -1
  3. package/dist/Components/NcActionButton.mjs +1 -1
  4. package/dist/Components/NcActionButtonGroup.cjs +1 -1
  5. package/dist/Components/NcActionButtonGroup.mjs +1 -1
  6. package/dist/Components/NcActionInput.cjs +1 -1
  7. package/dist/Components/NcActionInput.mjs +1 -1
  8. package/dist/Components/NcActionTextEditable.cjs +1 -1
  9. package/dist/Components/NcActionTextEditable.mjs +1 -1
  10. package/dist/Components/NcActions.cjs +1 -1
  11. package/dist/Components/NcActions.mjs +1 -1
  12. package/dist/Components/NcAppContent.cjs +1 -1
  13. package/dist/Components/NcAppContent.mjs +1 -1
  14. package/dist/Components/NcAppNavigation.cjs +1 -1
  15. package/dist/Components/NcAppNavigation.mjs +1 -1
  16. package/dist/Components/NcAppNavigationCaption.cjs +1 -1
  17. package/dist/Components/NcAppNavigationCaption.mjs +1 -1
  18. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  19. package/dist/Components/NcAppNavigationItem.mjs +1 -1
  20. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  21. package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
  22. package/dist/Components/NcAppNavigationSearch.cjs +1 -1
  23. package/dist/Components/NcAppNavigationSearch.mjs +1 -1
  24. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  25. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  26. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  27. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  28. package/dist/Components/NcAppSettingsDialog.cjs +1 -1
  29. package/dist/Components/NcAppSettingsDialog.mjs +1 -1
  30. package/dist/Components/NcAppSidebar.cjs +1 -1
  31. package/dist/Components/NcAppSidebar.mjs +1 -1
  32. package/dist/Components/NcAvatar.cjs +1 -1
  33. package/dist/Components/NcAvatar.mjs +1 -1
  34. package/dist/Components/NcBreadcrumb.cjs +1 -1
  35. package/dist/Components/NcBreadcrumb.mjs +1 -1
  36. package/dist/Components/NcBreadcrumbs.cjs +1 -1
  37. package/dist/Components/NcBreadcrumbs.mjs +1 -1
  38. package/dist/Components/NcButton.cjs +15 -2
  39. package/dist/Components/NcButton.cjs.map +1 -1
  40. package/dist/Components/NcButton.mjs +15 -2
  41. package/dist/Components/NcButton.mjs.map +1 -1
  42. package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
  43. package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
  44. package/dist/Components/NcChip.cjs +4 -4
  45. package/dist/Components/NcChip.mjs +4 -4
  46. package/dist/Components/NcCollectionList.cjs +1 -1
  47. package/dist/Components/NcCollectionList.mjs +1 -1
  48. package/dist/Components/NcColorPicker.cjs +1 -1
  49. package/dist/Components/NcColorPicker.mjs +1 -1
  50. package/dist/Components/NcContent.cjs +1 -1
  51. package/dist/Components/NcContent.mjs +1 -1
  52. package/dist/Components/NcDashboardWidget.cjs +1 -1
  53. package/dist/Components/NcDashboardWidget.mjs +1 -1
  54. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  55. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  56. package/dist/Components/NcDateTimePicker.cjs +5 -5
  57. package/dist/Components/NcDateTimePicker.mjs +5 -5
  58. package/dist/Components/NcDateTimePickerNative.cjs +1 -1
  59. package/dist/Components/NcDateTimePickerNative.mjs +1 -1
  60. package/dist/Components/NcDialog.cjs +1 -1
  61. package/dist/Components/NcDialog.mjs +1 -1
  62. package/dist/Components/NcDialogButton.cjs +1 -1
  63. package/dist/Components/NcDialogButton.mjs +1 -1
  64. package/dist/Components/NcEmojiPicker.cjs +1 -1
  65. package/dist/Components/NcEmojiPicker.mjs +1 -1
  66. package/dist/Components/NcGuestContent.cjs +2 -2
  67. package/dist/Components/NcGuestContent.cjs.map +1 -1
  68. package/dist/Components/NcGuestContent.mjs +2 -2
  69. package/dist/Components/NcGuestContent.mjs.map +1 -1
  70. package/dist/Components/NcHeaderButton.cjs +1 -1
  71. package/dist/Components/NcHeaderButton.mjs +1 -1
  72. package/dist/Components/NcHeaderMenu.cjs +1 -1
  73. package/dist/Components/NcHeaderMenu.mjs +1 -1
  74. package/dist/Components/NcInputField.cjs +1 -1
  75. package/dist/Components/NcInputField.mjs +1 -1
  76. package/dist/Components/NcListItem.cjs +1 -1
  77. package/dist/Components/NcListItem.mjs +1 -1
  78. package/dist/Components/NcListItemIcon.cjs +1 -1
  79. package/dist/Components/NcListItemIcon.mjs +1 -1
  80. package/dist/Components/NcLoadingIcon.cjs +2 -2
  81. package/dist/Components/NcLoadingIcon.cjs.map +1 -1
  82. package/dist/Components/NcLoadingIcon.mjs +2 -2
  83. package/dist/Components/NcLoadingIcon.mjs.map +1 -1
  84. package/dist/Components/NcModal.cjs +8 -17
  85. package/dist/Components/NcModal.cjs.map +1 -1
  86. package/dist/Components/NcModal.mjs +8 -17
  87. package/dist/Components/NcModal.mjs.map +1 -1
  88. package/dist/Components/NcPasswordField.cjs +1 -1
  89. package/dist/Components/NcPasswordField.mjs +1 -1
  90. package/dist/Components/NcPopover.cjs +1 -1
  91. package/dist/Components/NcPopover.mjs +1 -1
  92. package/dist/Components/NcProgressBar.cjs +1 -1
  93. package/dist/Components/NcProgressBar.mjs +1 -1
  94. package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
  95. package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
  96. package/dist/Components/NcRichContenteditable.cjs +2 -2
  97. package/dist/Components/NcRichContenteditable.mjs +2 -2
  98. package/dist/Components/NcRichText.cjs +2 -2
  99. package/dist/Components/NcRichText.mjs +3 -3
  100. package/dist/Components/NcSavingIndicatorIcon.cjs +1 -1
  101. package/dist/Components/NcSavingIndicatorIcon.mjs +1 -1
  102. package/dist/Components/NcSelect.cjs +1 -1
  103. package/dist/Components/NcSelect.mjs +1 -1
  104. package/dist/Components/NcSelectTags.cjs +1 -1
  105. package/dist/Components/NcSelectTags.mjs +1 -1
  106. package/dist/Components/NcSelectUsers.cjs +1 -1
  107. package/dist/Components/NcSelectUsers.mjs +1 -1
  108. package/dist/Components/NcSettingsInputText.cjs +1 -1
  109. package/dist/Components/NcSettingsInputText.mjs +1 -1
  110. package/dist/Components/NcSettingsSection.cjs +1 -1
  111. package/dist/Components/NcSettingsSection.mjs +1 -1
  112. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  113. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  114. package/dist/Components/NcTextArea.cjs +1 -1
  115. package/dist/Components/NcTextArea.mjs +1 -1
  116. package/dist/Components/NcTextField.cjs +1 -1
  117. package/dist/Components/NcTextField.mjs +1 -1
  118. package/dist/Components/NcThemeProvider.cjs +4 -0
  119. package/dist/Components/NcThemeProvider.cjs.map +1 -0
  120. package/dist/Components/NcThemeProvider.mjs +5 -0
  121. package/dist/Components/NcThemeProvider.mjs.map +1 -0
  122. package/dist/Components/NcTimezonePicker.cjs +1 -1
  123. package/dist/Components/NcTimezonePicker.mjs +1 -1
  124. package/dist/Components/NcUserBubble.cjs +1 -1
  125. package/dist/Components/NcUserBubble.mjs +1 -1
  126. package/dist/Components/NcUserStatusIcon.cjs +1 -1
  127. package/dist/Components/NcUserStatusIcon.mjs +1 -1
  128. package/dist/Composables/useFormatDateTime.cjs +1 -1
  129. package/dist/Composables/useFormatDateTime.mjs +1 -1
  130. package/dist/Composables/useIsDarkTheme.cjs +23 -6
  131. package/dist/Composables/useIsDarkTheme.cjs.map +1 -1
  132. package/dist/Composables/useIsDarkTheme.mjs +24 -7
  133. package/dist/Composables/useIsDarkTheme.mjs.map +1 -1
  134. package/dist/Functions/dialog.cjs +19 -7
  135. package/dist/Functions/dialog.cjs.map +1 -1
  136. package/dist/Functions/dialog.mjs +19 -7
  137. package/dist/Functions/dialog.mjs.map +1 -1
  138. package/dist/Functions/reference.cjs +1 -1
  139. package/dist/Functions/reference.mjs +1 -1
  140. package/dist/Functions/usernameToColor.cjs +28 -2
  141. package/dist/Functions/usernameToColor.cjs.map +1 -1
  142. package/dist/Functions/usernameToColor.mjs +25 -2
  143. package/dist/Functions/usernameToColor.mjs.map +1 -1
  144. package/dist/Mixins/richEditor.cjs +1 -1
  145. package/dist/Mixins/richEditor.mjs +1 -1
  146. package/dist/assets/{NcActionInput-gUagFGC5.css → NcActionInput-D79204Jr.css} +63 -63
  147. package/dist/assets/{NcActionTextEditable-BflqGcjc.css → NcActionTextEditable-i1KSVe0J.css} +1 -1
  148. package/dist/assets/{NcAppNavigationItem-BKKHzMYw.css → NcAppNavigationItem-Ca2ekElv.css} +31 -31
  149. package/dist/assets/{NcAppSidebar-BFg2HHh6.css → NcAppSidebar-u0G_qQMh.css} +44 -67
  150. package/dist/assets/NcAvatar-BqNcvkxP.css +134 -0
  151. package/dist/assets/NcButton-DCgUYOPt.css +218 -0
  152. package/dist/assets/{NcCheckboxRadioSwitch-B-axx3m7.css → NcCheckboxRadioSwitch-DqEP1SPR.css} +36 -32
  153. package/dist/assets/{NcColorPicker-TIE_tTqD.css → NcColorPicker-DBcVuSwg.css} +28 -28
  154. package/dist/assets/{NcContent-Bq-7EZQc.css → NcContent-DH4tX3N4.css} +12 -9
  155. package/dist/assets/{NcDateTimePicker-DGkOwO8l.css → NcDateTimePicker-ZHSpShZz.css} +7 -7
  156. package/dist/assets/{NcGuestContent-B0ivUQHg.css → NcGuestContent-ByAkjts7.css} +2 -2
  157. package/dist/assets/{NcHeaderButton-Dr6MgPDQ.css → NcHeaderButton-ByNXqS7x.css} +4 -0
  158. package/dist/assets/{NcHeaderMenu-DN-HfTkh.css → NcHeaderMenu-Dp_vJKTP.css} +4 -0
  159. package/dist/assets/{NcInputField-GxJ-rf2p.css → NcInputField-CoB72F_m.css} +40 -34
  160. package/dist/assets/{NcListItem-B2yvEdWx.css → NcListItem-KrH47Efg.css} +44 -44
  161. package/dist/assets/{NcLoadingIcon-x1d284UU.css → NcLoadingIcon-DbbToJVp.css} +5 -2
  162. package/dist/assets/{NcMentionBubble-CB5c5ue2.css → NcMentionBubble-UsTMm5VD.css} +9 -9
  163. package/dist/assets/{NcModal-BS5vtogq.css → NcModal-Cy3UOuI2.css} +62 -62
  164. package/dist/assets/{NcProgressBar--z-WqmX4.css → NcProgressBar-DTCznR-m.css} +14 -14
  165. package/dist/assets/{NcRichContenteditable-BbOjh6i7.css → NcRichContenteditable-4-6A9qmC.css} +21 -21
  166. package/dist/assets/{NcSettingsSection-_mX6UqM_.css → NcSettingsSection-uKqWTbhb.css} +8 -8
  167. package/dist/assets/{NcSettingsSelectGroup-BEjOwCJQ.css → NcSettingsSelectGroup-tjJNoh16.css} +3 -3
  168. package/dist/assets/{NcTextArea-fzbciv3V.css → NcTextArea-B46u6ku9.css} +22 -22
  169. package/dist/assets/{NcUserStatusIcon-DAVSJFhS.css → NcUserStatusIcon-ChHaXPex.css} +7 -7
  170. package/dist/chunks/{GenColors-DAxlN2KL.cjs → GenColors-BnYS3bvv.cjs} +2 -2
  171. package/dist/chunks/{GenColors-DAxlN2KL.cjs.map → GenColors-BnYS3bvv.cjs.map} +1 -1
  172. package/dist/chunks/{GenColors-BowX0SaQ.mjs → GenColors-DNN63dHB.mjs} +2 -2
  173. package/dist/chunks/{GenColors-BowX0SaQ.mjs.map → GenColors-DNN63dHB.mjs.map} +1 -1
  174. package/dist/chunks/{NcActionButton-DBh812gJ.cjs → NcActionButton-2qh96K_i.cjs} +2 -2
  175. package/dist/chunks/{NcActionButton-DBh812gJ.cjs.map → NcActionButton-2qh96K_i.cjs.map} +1 -1
  176. package/dist/chunks/{NcActionButton-CpGK6gSX.mjs → NcActionButton-CHrE7amZ.mjs} +2 -2
  177. package/dist/chunks/{NcActionButton-CpGK6gSX.mjs.map → NcActionButton-CHrE7amZ.mjs.map} +1 -1
  178. package/dist/chunks/{NcActionButtonGroup-qRIt-It4.cjs → NcActionButtonGroup-B8Bj-Qb3.cjs} +2 -2
  179. package/dist/chunks/{NcActionButtonGroup-qRIt-It4.cjs.map → NcActionButtonGroup-B8Bj-Qb3.cjs.map} +1 -1
  180. package/dist/chunks/{NcActionButtonGroup-BkU5oOmB.mjs → NcActionButtonGroup-_R4fp-bK.mjs} +2 -2
  181. package/dist/chunks/{NcActionButtonGroup-BkU5oOmB.mjs.map → NcActionButtonGroup-_R4fp-bK.mjs.map} +1 -1
  182. package/dist/chunks/{NcActionInput-D3FN751M.mjs → NcActionInput-BeBxzPFZ.mjs} +12 -11
  183. package/dist/chunks/NcActionInput-BeBxzPFZ.mjs.map +1 -0
  184. package/dist/chunks/{NcActionInput-CtkE6Hny.cjs → NcActionInput-GZdB-qw1.cjs} +13 -11
  185. package/dist/chunks/NcActionInput-GZdB-qw1.cjs.map +1 -0
  186. package/dist/chunks/{NcActionTextEditable-a_607PST.mjs → NcActionTextEditable-CYac2X_P.mjs} +3 -3
  187. package/dist/chunks/{NcActionTextEditable-a_607PST.mjs.map → NcActionTextEditable-CYac2X_P.mjs.map} +1 -1
  188. package/dist/chunks/{NcActionTextEditable-Du_71yLe.cjs → NcActionTextEditable-CrW19Rr4.cjs} +3 -3
  189. package/dist/chunks/{NcActionTextEditable-Du_71yLe.cjs.map → NcActionTextEditable-CrW19Rr4.cjs.map} +1 -1
  190. package/dist/chunks/{NcActions-CzpbMJoY.mjs → NcActions-BANvgaMn.mjs} +39 -6
  191. package/dist/chunks/NcActions-BANvgaMn.mjs.map +1 -0
  192. package/dist/chunks/{NcActions-DvZOLPjX.cjs → NcActions-DV3CjPHr.cjs} +39 -6
  193. package/dist/chunks/NcActions-DV3CjPHr.cjs.map +1 -0
  194. package/dist/chunks/{NcAppContent-CItX43vM.cjs → NcAppContent-BqR67yTH.cjs} +2 -2
  195. package/dist/chunks/{NcAppContent-CItX43vM.cjs.map → NcAppContent-BqR67yTH.cjs.map} +1 -1
  196. package/dist/chunks/{NcAppContent-CP6G4fZX.mjs → NcAppContent-twZJBrQv.mjs} +2 -2
  197. package/dist/chunks/{NcAppContent-CP6G4fZX.mjs.map → NcAppContent-twZJBrQv.mjs.map} +1 -1
  198. package/dist/chunks/{NcAppNavigation-C86dBexT.cjs → NcAppNavigation-COge8_bn.cjs} +3 -3
  199. package/dist/chunks/{NcAppNavigation-C86dBexT.cjs.map → NcAppNavigation-COge8_bn.cjs.map} +1 -1
  200. package/dist/chunks/{NcAppNavigation-sCuN3OZe.mjs → NcAppNavigation-VSGTDckG.mjs} +3 -3
  201. package/dist/chunks/{NcAppNavigation-sCuN3OZe.mjs.map → NcAppNavigation-VSGTDckG.mjs.map} +1 -1
  202. package/dist/chunks/{NcAppNavigationCaption-B53sg-pO.cjs → NcAppNavigationCaption-ofy-JSGu.cjs} +2 -2
  203. package/dist/chunks/{NcAppNavigationCaption-B53sg-pO.cjs.map → NcAppNavigationCaption-ofy-JSGu.cjs.map} +1 -1
  204. package/dist/chunks/{NcAppNavigationCaption-B-5VHm-a.mjs → NcAppNavigationCaption-oxc7chGv.mjs} +2 -2
  205. package/dist/chunks/{NcAppNavigationCaption-B-5VHm-a.mjs.map → NcAppNavigationCaption-oxc7chGv.mjs.map} +1 -1
  206. package/dist/chunks/{NcAppNavigationItem-huCt6Fb0.cjs → NcAppNavigationItem-B-uv2tWu.cjs} +8 -8
  207. package/dist/chunks/NcAppNavigationItem-B-uv2tWu.cjs.map +1 -0
  208. package/dist/chunks/{NcAppNavigationItem-D7Y5mGGC.mjs → NcAppNavigationItem-CbtPNTg_.mjs} +8 -8
  209. package/dist/chunks/NcAppNavigationItem-CbtPNTg_.mjs.map +1 -0
  210. package/dist/chunks/{NcAppNavigationNewItem-DgTuysCV.mjs → NcAppNavigationNewItem-Cz8VbLjN.mjs} +2 -2
  211. package/dist/chunks/{NcAppNavigationNewItem-DgTuysCV.mjs.map → NcAppNavigationNewItem-Cz8VbLjN.mjs.map} +1 -1
  212. package/dist/chunks/{NcAppNavigationNewItem-CQB6KhNm.cjs → NcAppNavigationNewItem-DzpW6cIK.cjs} +2 -2
  213. package/dist/chunks/{NcAppNavigationNewItem-CQB6KhNm.cjs.map → NcAppNavigationNewItem-DzpW6cIK.cjs.map} +1 -1
  214. package/dist/chunks/{NcAppNavigationSearch-9NTDoHar.mjs → NcAppNavigationSearch-By7WEKGG.mjs} +3 -3
  215. package/dist/chunks/{NcAppNavigationSearch-9NTDoHar.mjs.map → NcAppNavigationSearch-By7WEKGG.mjs.map} +1 -1
  216. package/dist/chunks/{NcAppNavigationSearch-BxhJ30Ai.cjs → NcAppNavigationSearch-DjBMu0cZ.cjs} +3 -3
  217. package/dist/chunks/{NcAppNavigationSearch-BxhJ30Ai.cjs.map → NcAppNavigationSearch-DjBMu0cZ.cjs.map} +1 -1
  218. package/dist/chunks/{NcAppNavigationSettings-CS36ibjM.mjs → NcAppNavigationSettings-DhQ5tXEJ.mjs} +5 -3
  219. package/dist/chunks/{NcAppNavigationSettings-CS36ibjM.mjs.map → NcAppNavigationSettings-DhQ5tXEJ.mjs.map} +1 -1
  220. package/dist/chunks/{NcAppNavigationSettings-x3sCPjbc.cjs → NcAppNavigationSettings-DnvFbZyP.cjs} +5 -3
  221. package/dist/chunks/{NcAppNavigationSettings-x3sCPjbc.cjs.map → NcAppNavigationSettings-DnvFbZyP.cjs.map} +1 -1
  222. package/dist/chunks/{NcAppNavigationToggle-5vSrAnr1.mjs → NcAppNavigationToggle-CINjg2Mo.mjs} +2 -2
  223. package/dist/chunks/{NcAppNavigationToggle-5vSrAnr1.mjs.map → NcAppNavigationToggle-CINjg2Mo.mjs.map} +1 -1
  224. package/dist/chunks/{NcAppNavigationToggle-BesLZbAe.cjs → NcAppNavigationToggle-CbZem2gZ.cjs} +2 -2
  225. package/dist/chunks/{NcAppNavigationToggle-BesLZbAe.cjs.map → NcAppNavigationToggle-CbZem2gZ.cjs.map} +1 -1
  226. package/dist/chunks/{NcAppSettingsDialog-B6CvUEz6.cjs → NcAppSettingsDialog-C1m0QYAK.cjs} +3 -3
  227. package/dist/chunks/{NcAppSettingsDialog-B6CvUEz6.cjs.map → NcAppSettingsDialog-C1m0QYAK.cjs.map} +1 -1
  228. package/dist/chunks/{NcAppSettingsDialog-DBViVlqo.mjs → NcAppSettingsDialog-Duyfikm-.mjs} +3 -3
  229. package/dist/chunks/{NcAppSettingsDialog-DBViVlqo.mjs.map → NcAppSettingsDialog-Duyfikm-.mjs.map} +1 -1
  230. package/dist/chunks/{NcAppSidebar-BtJnp-19.cjs → NcAppSidebar-DrjH3Ign.cjs} +7 -7
  231. package/dist/chunks/{NcAppSidebar-6PtLRD0F.mjs.map → NcAppSidebar-DrjH3Ign.cjs.map} +1 -1
  232. package/dist/chunks/{NcAppSidebar-6PtLRD0F.mjs → NcAppSidebar-UROIM84v.mjs} +7 -7
  233. package/dist/chunks/{NcAppSidebar-BtJnp-19.cjs.map → NcAppSidebar-UROIM84v.mjs.map} +1 -1
  234. package/dist/chunks/{NcAvatar-CbUnw3_c.cjs → NcAvatar-CYqiINFK.cjs} +38 -28
  235. package/dist/chunks/NcAvatar-CYqiINFK.cjs.map +1 -0
  236. package/dist/chunks/{NcAvatar-DC7NtEPz.mjs → NcAvatar-NIEuFVUx.mjs} +36 -26
  237. package/dist/chunks/NcAvatar-NIEuFVUx.mjs.map +1 -0
  238. package/dist/chunks/{NcBreadcrumb-K0ol_C7l.cjs → NcBreadcrumb-BiW4k0c_.cjs} +2 -2
  239. package/dist/chunks/{NcBreadcrumb-K0ol_C7l.cjs.map → NcBreadcrumb-BiW4k0c_.cjs.map} +1 -1
  240. package/dist/chunks/{NcBreadcrumb-WO64bNkF.mjs → NcBreadcrumb-BjsavDr1.mjs} +2 -2
  241. package/dist/chunks/{NcBreadcrumb-WO64bNkF.mjs.map → NcBreadcrumb-BjsavDr1.mjs.map} +1 -1
  242. package/dist/chunks/{NcBreadcrumbs-DrTlt5X4.mjs → NcBreadcrumbs-Bc2obqjl.mjs} +4 -4
  243. package/dist/chunks/{NcBreadcrumbs-DrTlt5X4.mjs.map → NcBreadcrumbs-Bc2obqjl.mjs.map} +1 -1
  244. package/dist/chunks/{NcBreadcrumbs-Ds40ClR-.cjs → NcBreadcrumbs-Dwnn6dKU.cjs} +4 -4
  245. package/dist/chunks/{NcBreadcrumbs-Ds40ClR-.cjs.map → NcBreadcrumbs-Dwnn6dKU.cjs.map} +1 -1
  246. package/dist/chunks/{NcCheckboxRadioSwitch-BIEYfWtF.mjs → NcCheckboxRadioSwitch-BJg75WBj.mjs} +4 -4
  247. package/dist/chunks/{NcCheckboxRadioSwitch-BIEYfWtF.mjs.map → NcCheckboxRadioSwitch-BJg75WBj.mjs.map} +1 -1
  248. package/dist/chunks/{NcCheckboxRadioSwitch-IOUKKqSP.cjs → NcCheckboxRadioSwitch-G28IJAL-.cjs} +4 -4
  249. package/dist/chunks/{NcCheckboxRadioSwitch-IOUKKqSP.cjs.map → NcCheckboxRadioSwitch-G28IJAL-.cjs.map} +1 -1
  250. package/dist/chunks/{NcCollectionList-CdqFiw6Z.mjs → NcCollectionList-BZmZbRsV.mjs} +6 -6
  251. package/dist/chunks/{NcCollectionList-CdqFiw6Z.mjs.map → NcCollectionList-BZmZbRsV.mjs.map} +1 -1
  252. package/dist/chunks/{NcCollectionList-B7SKtsie.cjs → NcCollectionList-Co3VxzCN.cjs} +6 -6
  253. package/dist/chunks/{NcCollectionList-B7SKtsie.cjs.map → NcCollectionList-Co3VxzCN.cjs.map} +1 -1
  254. package/dist/chunks/{NcColorPicker-CtcS-XMk.mjs → NcColorPicker-CApQdWp0.mjs} +65 -34
  255. package/dist/chunks/NcColorPicker-CApQdWp0.mjs.map +1 -0
  256. package/dist/chunks/{NcColorPicker-HzfzrrTt.cjs → NcColorPicker-CwPThFLP.cjs} +65 -34
  257. package/dist/chunks/NcColorPicker-CwPThFLP.cjs.map +1 -0
  258. package/dist/chunks/{NcContent-BOBFr3nn.mjs → NcContent-BkmB4vmh.mjs} +4 -4
  259. package/dist/chunks/{NcContent-B2Uvy01y.cjs.map → NcContent-BkmB4vmh.mjs.map} +1 -1
  260. package/dist/chunks/{NcContent-B2Uvy01y.cjs → NcContent-h4LUA1hj.cjs} +4 -4
  261. package/dist/chunks/{NcContent-BOBFr3nn.mjs.map → NcContent-h4LUA1hj.cjs.map} +1 -1
  262. package/dist/chunks/{NcDashboardWidget-C3FrsWrR.mjs → NcDashboardWidget-CXKrTVGk.mjs} +4 -4
  263. package/dist/chunks/{NcDashboardWidget-C3FrsWrR.mjs.map → NcDashboardWidget-CXKrTVGk.mjs.map} +1 -1
  264. package/dist/chunks/{NcDashboardWidget-CJMYBSOl.cjs → NcDashboardWidget-Dn_Rq1Mt.cjs} +4 -4
  265. package/dist/chunks/{NcDashboardWidget-CJMYBSOl.cjs.map → NcDashboardWidget-Dn_Rq1Mt.cjs.map} +1 -1
  266. package/dist/chunks/{NcDashboardWidgetItem-EVIAYLsi.cjs → NcDashboardWidgetItem-C5P0N-U_.cjs} +4 -4
  267. package/dist/chunks/{NcDashboardWidgetItem-EVIAYLsi.cjs.map → NcDashboardWidgetItem-C5P0N-U_.cjs.map} +1 -1
  268. package/dist/chunks/{NcDashboardWidgetItem-D83T9o2C.mjs → NcDashboardWidgetItem-CfhAMc3T.mjs} +4 -4
  269. package/dist/chunks/{NcDashboardWidgetItem-D83T9o2C.mjs.map → NcDashboardWidgetItem-CfhAMc3T.mjs.map} +1 -1
  270. package/dist/chunks/{NcDialog-OV8kfc5o.mjs → NcDialog-C_IHQciE.mjs} +2 -2
  271. package/dist/chunks/{NcDialog-OV8kfc5o.mjs.map → NcDialog-C_IHQciE.mjs.map} +1 -1
  272. package/dist/chunks/{NcDialog-D4gfqrqn.cjs → NcDialog-Cqdo11BM.cjs} +2 -2
  273. package/dist/chunks/{NcDialog-D4gfqrqn.cjs.map → NcDialog-Cqdo11BM.cjs.map} +1 -1
  274. package/dist/chunks/{NcDialogButton-BhuiKGmE.mjs → NcDialogButton-Cc3iWZH1.mjs} +2 -2
  275. package/dist/chunks/{NcDialogButton-BhuiKGmE.mjs.map → NcDialogButton-Cc3iWZH1.mjs.map} +1 -1
  276. package/dist/chunks/{NcDialogButton-SPofxC7K.cjs → NcDialogButton-_biPxXPQ.cjs} +2 -2
  277. package/dist/chunks/{NcDialogButton-SPofxC7K.cjs.map → NcDialogButton-_biPxXPQ.cjs.map} +1 -1
  278. package/dist/chunks/{NcEmojiPicker-BJSfoews.mjs → NcEmojiPicker-C9kzoPy9.mjs} +7 -7
  279. package/dist/chunks/{NcEmojiPicker-BJSfoews.mjs.map → NcEmojiPicker-C9kzoPy9.mjs.map} +1 -1
  280. package/dist/chunks/{NcEmojiPicker-LpRAYAZU.cjs → NcEmojiPicker-CD7z1FNp.cjs} +7 -7
  281. package/dist/chunks/{NcEmojiPicker-LpRAYAZU.cjs.map → NcEmojiPicker-CD7z1FNp.cjs.map} +1 -1
  282. package/dist/chunks/{NcHeaderMenu-Dj7jeq88.mjs → NcHeaderMenu--AvoyMeD.mjs} +6 -4
  283. package/dist/chunks/{NcHeaderMenu-Dj7jeq88.mjs.map → NcHeaderMenu--AvoyMeD.mjs.map} +1 -1
  284. package/dist/chunks/{NcHeaderMenu-CCaYMhFb.cjs → NcHeaderMenu-B12nEFGc.cjs} +6 -4
  285. package/dist/chunks/{NcHeaderMenu-CCaYMhFb.cjs.map → NcHeaderMenu-B12nEFGc.cjs.map} +1 -1
  286. package/dist/chunks/{NcInputConfirmCancel-DiMrwB9r.cjs → NcInputConfirmCancel-BpPXGiKs.cjs} +2 -2
  287. package/dist/chunks/{NcInputConfirmCancel-DiMrwB9r.cjs.map → NcInputConfirmCancel-BpPXGiKs.cjs.map} +1 -1
  288. package/dist/chunks/{NcInputConfirmCancel-B4xEFita.mjs → NcInputConfirmCancel-P1H1ymiB.mjs} +2 -2
  289. package/dist/chunks/{NcInputConfirmCancel-B4xEFita.mjs.map → NcInputConfirmCancel-P1H1ymiB.mjs.map} +1 -1
  290. package/dist/chunks/{NcInputField-C61UUN46.cjs → NcInputField-CfK08BcA.cjs} +11 -4
  291. package/dist/chunks/NcInputField-CfK08BcA.cjs.map +1 -0
  292. package/dist/chunks/{NcInputField-DTtUueUZ.mjs → NcInputField-ixOGmIZ8.mjs} +11 -4
  293. package/dist/chunks/NcInputField-ixOGmIZ8.mjs.map +1 -0
  294. package/dist/chunks/{NcListItem-BHhlE1Sb.mjs → NcListItem-BkW4aSAh.mjs} +7 -6
  295. package/dist/chunks/NcListItem-BkW4aSAh.mjs.map +1 -0
  296. package/dist/chunks/{NcListItem-Bs-sl-hH.cjs → NcListItem-Dxhvk0tn.cjs} +7 -6
  297. package/dist/chunks/NcListItem-Dxhvk0tn.cjs.map +1 -0
  298. package/dist/chunks/{NcListItemIcon-DQn2njGl.cjs → NcListItemIcon-Ceh9_B36.cjs} +5 -3
  299. package/dist/chunks/{NcListItemIcon-DQn2njGl.cjs.map → NcListItemIcon-Ceh9_B36.cjs.map} +1 -1
  300. package/dist/chunks/{NcListItemIcon-BDq6PIUq.mjs → NcListItemIcon-DL1UGBlY.mjs} +5 -3
  301. package/dist/chunks/{NcListItemIcon-BDq6PIUq.mjs.map → NcListItemIcon-DL1UGBlY.mjs.map} +1 -1
  302. package/dist/chunks/{NcPasswordField-5oXVlA4T.mjs → NcPasswordField-Bf_EN2zU.mjs} +3 -3
  303. package/dist/chunks/{NcPasswordField-5oXVlA4T.mjs.map → NcPasswordField-Bf_EN2zU.mjs.map} +1 -1
  304. package/dist/chunks/{NcPasswordField-B_d4oTF9.cjs → NcPasswordField-DflDMgYh.cjs} +3 -3
  305. package/dist/chunks/{NcPasswordField-B_d4oTF9.cjs.map → NcPasswordField-DflDMgYh.cjs.map} +1 -1
  306. package/dist/chunks/{NcPopover-kYsewfff.mjs → NcPopover-4-YxCZOD.mjs} +2 -2
  307. package/dist/chunks/{NcPopover-kYsewfff.mjs.map → NcPopover-4-YxCZOD.mjs.map} +1 -1
  308. package/dist/chunks/{NcPopover-B2z7TwNr.cjs → NcPopover-DH2oMHFe.cjs} +2 -2
  309. package/dist/chunks/{NcPopover-B2z7TwNr.cjs.map → NcPopover-DH2oMHFe.cjs.map} +1 -1
  310. package/dist/chunks/{NcProgressBar-DegJ2JjE.mjs → NcProgressBar-CI_nOrPg.mjs} +4 -4
  311. package/dist/chunks/{NcProgressBar-DegJ2JjE.mjs.map → NcProgressBar-CI_nOrPg.mjs.map} +1 -1
  312. package/dist/chunks/{NcProgressBar-Do5Y3u8S.cjs → NcProgressBar-lh4Gtdfr.cjs} +4 -4
  313. package/dist/chunks/{NcProgressBar-Do5Y3u8S.cjs.map → NcProgressBar-lh4Gtdfr.cjs.map} +1 -1
  314. package/dist/chunks/{NcRelatedResourcesPanel-DDKi2A47.cjs → NcRelatedResourcesPanel-D_4x0nYR.cjs} +2 -2
  315. package/dist/chunks/{NcRelatedResourcesPanel-DDKi2A47.cjs.map → NcRelatedResourcesPanel-D_4x0nYR.cjs.map} +1 -1
  316. package/dist/chunks/{NcRelatedResourcesPanel-w0cVgK_u.mjs → NcRelatedResourcesPanel-qQK3J_qe.mjs} +2 -2
  317. package/dist/chunks/{NcRelatedResourcesPanel-w0cVgK_u.mjs.map → NcRelatedResourcesPanel-qQK3J_qe.mjs.map} +1 -1
  318. package/dist/chunks/{NcRichContenteditable-CbF4935r.cjs → NcRichContenteditable-Dwe0KT-g.cjs} +21 -16
  319. package/dist/chunks/NcRichContenteditable-Dwe0KT-g.cjs.map +1 -0
  320. package/dist/chunks/{NcRichContenteditable-Cqt-neS3.mjs → NcRichContenteditable-Vv9aizR-.mjs} +21 -16
  321. package/dist/chunks/NcRichContenteditable-Vv9aizR-.mjs.map +1 -0
  322. package/dist/chunks/{NcRichText-BWY0OxW9.mjs → NcRichText-CeLtcmp0.mjs} +3 -3
  323. package/dist/chunks/{NcRichText-BWY0OxW9.mjs.map → NcRichText-CeLtcmp0.mjs.map} +1 -1
  324. package/dist/chunks/{NcRichText-DxDK1G5d.cjs → NcRichText-Dk2KeWVm.cjs} +3 -3
  325. package/dist/chunks/{NcRichText-DxDK1G5d.cjs.map → NcRichText-Dk2KeWVm.cjs.map} +1 -1
  326. package/dist/chunks/{NcSavingIndicatorIcon-Bu-zt4pR.cjs → NcSavingIndicatorIcon-DFyB2KRK.cjs} +2 -2
  327. package/dist/chunks/{NcSavingIndicatorIcon-nv1147dk.mjs.map → NcSavingIndicatorIcon-DFyB2KRK.cjs.map} +1 -1
  328. package/dist/chunks/{NcSavingIndicatorIcon-nv1147dk.mjs → NcSavingIndicatorIcon-U7AIamCl.mjs} +2 -2
  329. package/dist/chunks/{NcSavingIndicatorIcon-Bu-zt4pR.cjs.map → NcSavingIndicatorIcon-U7AIamCl.mjs.map} +1 -1
  330. package/dist/chunks/{NcSelect-DmIaznJY.mjs → NcSelect-dUFIWW35.mjs} +3 -3
  331. package/dist/chunks/{NcSelect-DmIaznJY.mjs.map → NcSelect-dUFIWW35.mjs.map} +1 -1
  332. package/dist/chunks/{NcSelect-CvN1DuY2.cjs → NcSelect-mKPxrPJk.cjs} +3 -3
  333. package/dist/chunks/{NcSelect-CvN1DuY2.cjs.map → NcSelect-mKPxrPJk.cjs.map} +1 -1
  334. package/dist/chunks/{NcSelectTags-MsqvY1l4.mjs → NcSelectTags-D-ZtVQr7.mjs} +3 -3
  335. package/dist/chunks/{NcSelectTags-MsqvY1l4.mjs.map → NcSelectTags-D-ZtVQr7.mjs.map} +1 -1
  336. package/dist/chunks/{NcSelectTags-DJoDzrZl.cjs → NcSelectTags-D43sFJA2.cjs} +3 -3
  337. package/dist/chunks/{NcSelectTags-DJoDzrZl.cjs.map → NcSelectTags-D43sFJA2.cjs.map} +1 -1
  338. package/dist/chunks/{NcSelectUsers-BYynRS17.mjs → NcSelectUsers-C7sxHP1r.mjs} +4 -4
  339. package/dist/chunks/{NcSelectUsers-BYynRS17.mjs.map → NcSelectUsers-C7sxHP1r.mjs.map} +1 -1
  340. package/dist/chunks/{NcSelectUsers-IoPgizBH.cjs → NcSelectUsers-CpT8ELJ8.cjs} +4 -4
  341. package/dist/chunks/{NcSelectUsers-IoPgizBH.cjs.map → NcSelectUsers-CpT8ELJ8.cjs.map} +1 -1
  342. package/dist/chunks/{NcSettingsInputText-BknU0gbE.cjs → NcSettingsInputText-Cf-juMyF.cjs} +2 -2
  343. package/dist/chunks/{NcSettingsInputText-BknU0gbE.cjs.map → NcSettingsInputText-Cf-juMyF.cjs.map} +1 -1
  344. package/dist/chunks/{NcSettingsInputText-BXbSSC7N.mjs → NcSettingsInputText-DYN2i2d2.mjs} +2 -2
  345. package/dist/chunks/{NcSettingsInputText-BXbSSC7N.mjs.map → NcSettingsInputText-DYN2i2d2.mjs.map} +1 -1
  346. package/dist/chunks/{NcSettingsSection-BNefU-yk.mjs → NcSettingsSection-DK0dtGcw.mjs} +8 -9
  347. package/dist/chunks/NcSettingsSection-DK0dtGcw.mjs.map +1 -0
  348. package/dist/chunks/{NcSettingsSection-dlDi9oLJ.cjs → NcSettingsSection-VrSMms0R.cjs} +8 -9
  349. package/dist/chunks/NcSettingsSection-VrSMms0R.cjs.map +1 -0
  350. package/dist/chunks/{NcSettingsSelectGroup-DWEorw2V.mjs → NcSettingsSelectGroup-B3PCXeTE.mjs} +5 -5
  351. package/dist/chunks/{NcSettingsSelectGroup-DWEorw2V.mjs.map → NcSettingsSelectGroup-B3PCXeTE.mjs.map} +1 -1
  352. package/dist/chunks/{NcSettingsSelectGroup-Bm8naUVk.cjs → NcSettingsSelectGroup-CW5zc5my.cjs} +5 -5
  353. package/dist/chunks/{NcSettingsSelectGroup-Bm8naUVk.cjs.map → NcSettingsSelectGroup-CW5zc5my.cjs.map} +1 -1
  354. package/dist/chunks/{NcTextArea-BHERsE_g.mjs → NcTextArea-HIcTePZQ.mjs} +11 -4
  355. package/dist/chunks/NcTextArea-HIcTePZQ.mjs.map +1 -0
  356. package/dist/chunks/{NcTextArea-CYLGAGcO.cjs → NcTextArea-MvdupZXi.cjs} +11 -4
  357. package/dist/chunks/NcTextArea-MvdupZXi.cjs.map +1 -0
  358. package/dist/chunks/{NcTextField-Cd_RjGj6.mjs → NcTextField-BpHFogO-.mjs} +4 -4
  359. package/dist/chunks/{NcTextField-Cd_RjGj6.mjs.map → NcTextField-BpHFogO-.mjs.map} +1 -1
  360. package/dist/chunks/{NcTextField-CMxmd2Wn.cjs → NcTextField-C1dfqkDm.cjs} +4 -4
  361. package/dist/chunks/{NcTextField-CMxmd2Wn.cjs.map → NcTextField-C1dfqkDm.cjs.map} +1 -1
  362. package/dist/chunks/NcThemeProvider-25ResoIv.mjs +53 -0
  363. package/dist/chunks/NcThemeProvider-25ResoIv.mjs.map +1 -0
  364. package/dist/chunks/NcThemeProvider-BqGPTeWg.cjs +52 -0
  365. package/dist/chunks/NcThemeProvider-BqGPTeWg.cjs.map +1 -0
  366. package/dist/chunks/{NcTimezonePicker-Ds_yZJVZ.cjs → NcTimezonePicker-ClV6QojF.cjs} +3 -3
  367. package/dist/chunks/{NcTimezonePicker-Ds_yZJVZ.cjs.map → NcTimezonePicker-ClV6QojF.cjs.map} +1 -1
  368. package/dist/chunks/{NcTimezonePicker-BjUmYLVj.mjs → NcTimezonePicker-Wwx4gzK_.mjs} +3 -3
  369. package/dist/chunks/{NcTimezonePicker-BjUmYLVj.mjs.map → NcTimezonePicker-Wwx4gzK_.mjs.map} +1 -1
  370. package/dist/chunks/{NcUserBubble-B5MtyQce.cjs → NcUserBubble-BmUfbXN0.cjs} +3 -3
  371. package/dist/chunks/{NcUserBubble-B5MtyQce.cjs.map → NcUserBubble-BmUfbXN0.cjs.map} +1 -1
  372. package/dist/chunks/{NcUserBubble-DH2UiUfH.mjs → NcUserBubble-DFos_NnH.mjs} +3 -3
  373. package/dist/chunks/{NcUserBubble-DH2UiUfH.mjs.map → NcUserBubble-DFos_NnH.mjs.map} +1 -1
  374. package/dist/chunks/NcUserStatusIcon-BeuFRhWr.cjs +147 -0
  375. package/dist/chunks/NcUserStatusIcon-BeuFRhWr.cjs.map +1 -0
  376. package/dist/chunks/NcUserStatusIcon-Biiq6zqy.mjs +146 -0
  377. package/dist/chunks/NcUserStatusIcon-Biiq6zqy.mjs.map +1 -0
  378. package/dist/chunks/{ScopeComponent-CC0LPlVx.mjs → ScopeComponent-DxrG1ptt.mjs} +2 -2
  379. package/dist/chunks/{ScopeComponent-CC0LPlVx.mjs.map → ScopeComponent-DxrG1ptt.mjs.map} +1 -1
  380. package/dist/chunks/{ScopeComponent-SIPKHdQy.cjs → ScopeComponent-X0gqPFY9.cjs} +2 -2
  381. package/dist/chunks/{ScopeComponent-SIPKHdQy.cjs.map → ScopeComponent-X0gqPFY9.cjs.map} +1 -1
  382. package/dist/chunks/_l10n-BU8-kQzN.mjs +145 -0
  383. package/dist/chunks/_l10n-BU8-kQzN.mjs.map +1 -0
  384. package/dist/chunks/_l10n-DpwcsAC3.cjs +144 -0
  385. package/dist/chunks/{_l10n-CXXSIoEf.cjs.map → _l10n-DpwcsAC3.cjs.map} +1 -1
  386. package/dist/chunks/constants-Bls5liKo.mjs +9 -0
  387. package/dist/chunks/constants-Bls5liKo.mjs.map +1 -0
  388. package/dist/chunks/constants-C_lA-vcp.cjs +8 -0
  389. package/dist/chunks/constants-C_lA-vcp.cjs.map +1 -0
  390. package/dist/chunks/{focusTrap-Vbgxe8ZX.cjs → focusTrap-DUTqW_IG.cjs} +6 -3
  391. package/dist/chunks/focusTrap-DUTqW_IG.cjs.map +1 -0
  392. package/dist/chunks/{focusTrap-DmkaYJTC.mjs → focusTrap-HJQ4pqHV.mjs} +6 -3
  393. package/dist/chunks/focusTrap-HJQ4pqHV.mjs.map +1 -0
  394. package/dist/chunks/getAvatarUrl-Du9Y3cPO.cjs +14 -0
  395. package/dist/chunks/getAvatarUrl-Du9Y3cPO.cjs.map +1 -0
  396. package/dist/chunks/getAvatarUrl-IhLacDEr.mjs +15 -0
  397. package/dist/chunks/getAvatarUrl-IhLacDEr.mjs.map +1 -0
  398. package/dist/chunks/{index-B0yHh7IW.cjs → index-AlIgEQXL.cjs} +12 -8
  399. package/dist/chunks/index-AlIgEQXL.cjs.map +1 -0
  400. package/dist/chunks/{index-Dpk-sL3D.mjs → index-B8gPNa8c.mjs} +12 -8
  401. package/dist/chunks/index-B8gPNa8c.mjs.map +1 -0
  402. package/dist/chunks/legacy-KBXhWdRy.cjs +5 -0
  403. package/dist/chunks/legacy-KBXhWdRy.cjs.map +1 -0
  404. package/dist/chunks/legacy-MK4GvP26.mjs +6 -0
  405. package/dist/chunks/legacy-MK4GvP26.mjs.map +1 -0
  406. package/dist/chunks/{mdi-BflUJIiB.cjs → mdi-BqDPfc6J.cjs} +5 -1
  407. package/dist/chunks/{mdi-C1L0jZ1V.mjs.map → mdi-BqDPfc6J.cjs.map} +1 -1
  408. package/dist/chunks/{mdi-C1L0jZ1V.mjs → mdi-vLkDaZ9y.mjs} +6 -2
  409. package/dist/chunks/{mdi-BflUJIiB.cjs.map → mdi-vLkDaZ9y.mjs.map} +1 -1
  410. package/dist/chunks/{referencePickerModal-DbrHVDKS.cjs → referencePickerModal-BVu6vAC8.cjs} +6 -6
  411. package/dist/chunks/{referencePickerModal-DbrHVDKS.cjs.map → referencePickerModal-BVu6vAC8.cjs.map} +1 -1
  412. package/dist/chunks/{referencePickerModal-sscttPbK.mjs → referencePickerModal-CXQey71p.mjs} +6 -6
  413. package/dist/chunks/{referencePickerModal-sscttPbK.mjs.map → referencePickerModal-CXQey71p.mjs.map} +1 -1
  414. package/dist/chunks/{useTrapStackControl-BJmJdJak.cjs → useTrapStackControl-CTZTSUOt.cjs} +2 -2
  415. package/dist/chunks/{useTrapStackControl-BJmJdJak.cjs.map → useTrapStackControl-CTZTSUOt.cjs.map} +1 -1
  416. package/dist/chunks/{useTrapStackControl-b3A_383w.mjs → useTrapStackControl-yqM2SDEs.mjs} +2 -2
  417. package/dist/chunks/{useTrapStackControl-b3A_383w.mjs.map → useTrapStackControl-yqM2SDEs.mjs.map} +1 -1
  418. package/dist/composables/useIsDarkTheme/constants.d.ts +7 -0
  419. package/dist/composables/useIsDarkTheme/index.d.ts +7 -3
  420. package/dist/functions/dialog/index.d.ts +10 -14
  421. package/dist/functions/index.d.ts +1 -1
  422. package/dist/index.cjs +55 -52
  423. package/dist/index.cjs.map +1 -1
  424. package/dist/index.mjs +57 -54
  425. package/dist/index.mjs.map +1 -1
  426. package/dist/utils/focusTrap.d.ts +6 -0
  427. package/dist/utils/getAvatarUrl.d.ts +23 -1
  428. package/dist/utils/legacy.d.ts +5 -0
  429. package/package.json +43 -34
  430. package/dist/assets/NcAvatar-BgjB8atT.css +0 -132
  431. package/dist/assets/NcButton-DnNZaEy_.css +0 -210
  432. package/dist/chunks/DotsHorizontal-BoI3vnhk.cjs +0 -37
  433. package/dist/chunks/DotsHorizontal-BoI3vnhk.cjs.map +0 -1
  434. package/dist/chunks/DotsHorizontal-C6LNsw4N.mjs +0 -38
  435. package/dist/chunks/DotsHorizontal-C6LNsw4N.mjs.map +0 -1
  436. package/dist/chunks/NcActionInput-CtkE6Hny.cjs.map +0 -1
  437. package/dist/chunks/NcActionInput-D3FN751M.mjs.map +0 -1
  438. package/dist/chunks/NcActions-CzpbMJoY.mjs.map +0 -1
  439. package/dist/chunks/NcActions-DvZOLPjX.cjs.map +0 -1
  440. package/dist/chunks/NcAppNavigationItem-D7Y5mGGC.mjs.map +0 -1
  441. package/dist/chunks/NcAppNavigationItem-huCt6Fb0.cjs.map +0 -1
  442. package/dist/chunks/NcAvatar-CbUnw3_c.cjs.map +0 -1
  443. package/dist/chunks/NcAvatar-DC7NtEPz.mjs.map +0 -1
  444. package/dist/chunks/NcColorPicker-CtcS-XMk.mjs.map +0 -1
  445. package/dist/chunks/NcColorPicker-HzfzrrTt.cjs.map +0 -1
  446. package/dist/chunks/NcInputField-C61UUN46.cjs.map +0 -1
  447. package/dist/chunks/NcInputField-DTtUueUZ.mjs.map +0 -1
  448. package/dist/chunks/NcListItem-BHhlE1Sb.mjs.map +0 -1
  449. package/dist/chunks/NcListItem-Bs-sl-hH.cjs.map +0 -1
  450. package/dist/chunks/NcRichContenteditable-CbF4935r.cjs.map +0 -1
  451. package/dist/chunks/NcRichContenteditable-Cqt-neS3.mjs.map +0 -1
  452. package/dist/chunks/NcSettingsSection-BNefU-yk.mjs.map +0 -1
  453. package/dist/chunks/NcSettingsSection-dlDi9oLJ.cjs.map +0 -1
  454. package/dist/chunks/NcTextArea-BHERsE_g.mjs.map +0 -1
  455. package/dist/chunks/NcTextArea-CYLGAGcO.cjs.map +0 -1
  456. package/dist/chunks/NcUserStatusIcon-B_-V1MDZ.cjs +0 -139
  457. package/dist/chunks/NcUserStatusIcon-B_-V1MDZ.cjs.map +0 -1
  458. package/dist/chunks/NcUserStatusIcon-Bya1v9qo.mjs +0 -138
  459. package/dist/chunks/NcUserStatusIcon-Bya1v9qo.mjs.map +0 -1
  460. package/dist/chunks/_l10n-CXXSIoEf.cjs +0 -139
  461. package/dist/chunks/_l10n-DIOHNc85.mjs +0 -140
  462. package/dist/chunks/_l10n-DIOHNc85.mjs.map +0 -1
  463. package/dist/chunks/focusTrap-DmkaYJTC.mjs.map +0 -1
  464. package/dist/chunks/focusTrap-Vbgxe8ZX.cjs.map +0 -1
  465. package/dist/chunks/getAvatarUrl-6z9qRNH-.cjs +0 -11
  466. package/dist/chunks/getAvatarUrl-6z9qRNH-.cjs.map +0 -1
  467. package/dist/chunks/getAvatarUrl-DxvUjKMi.mjs +0 -12
  468. package/dist/chunks/getAvatarUrl-DxvUjKMi.mjs.map +0 -1
  469. package/dist/chunks/index-B0yHh7IW.cjs.map +0 -1
  470. package/dist/chunks/index-Dpk-sL3D.mjs.map +0 -1
  471. package/dist/chunks/usernameToColor-BPaEECqs.mjs +0 -27
  472. package/dist/chunks/usernameToColor-BPaEECqs.mjs.map +0 -1
  473. package/dist/chunks/usernameToColor-Bu43-l7c.cjs +0 -28
  474. package/dist/chunks/usernameToColor-Bu43-l7c.cjs.map +0 -1
@@ -9,28 +9,28 @@
9
9
  /*
10
10
  * Ensure proper alignment of the vue material icons
11
11
  */
12
- .material-design-icon[data-v-c89174d0] {
12
+ .material-design-icon[data-v-745b8198] {
13
13
  display: flex;
14
14
  align-self: center;
15
15
  justify-self: center;
16
16
  align-items: center;
17
17
  justify-content: center;
18
18
  }
19
- .textarea[data-v-c89174d0] {
19
+ .textarea[data-v-745b8198] {
20
20
  position: relative;
21
21
  width: 100%;
22
22
  border-radius: var(--border-radius-large);
23
23
  margin-block-start: 6px;
24
24
  resize: vertical;
25
25
  }
26
- .textarea__main-wrapper[data-v-c89174d0] {
26
+ .textarea__main-wrapper[data-v-745b8198] {
27
27
  position: relative;
28
28
  }
29
- .textarea--disabled[data-v-c89174d0] {
29
+ .textarea--disabled[data-v-745b8198] {
30
30
  opacity: 0.7;
31
31
  filter: saturate(0.7);
32
32
  }
33
- .textarea__input[data-v-c89174d0] {
33
+ .textarea__input[data-v-745b8198] {
34
34
  margin: 0;
35
35
  padding-inline: 10px 6px;
36
36
  width: 100%;
@@ -43,36 +43,36 @@
43
43
  border-radius: var(--border-radius-large);
44
44
  cursor: pointer;
45
45
  }
46
- .textarea__input[data-v-c89174d0]:active:not([disabled]), .textarea__input[data-v-c89174d0]:hover:not([disabled]), .textarea__input[data-v-c89174d0]:focus:not([disabled]) {
46
+ .textarea__input[data-v-745b8198]:active:not([disabled]), .textarea__input[data-v-745b8198]:hover:not([disabled]), .textarea__input[data-v-745b8198]:focus:not([disabled]) {
47
47
  border-width: var(--border-width-input-focused, 2px);
48
48
  border-color: var(--color-main-text);
49
49
  box-shadow: 0 0 0 2px var(--color-main-background) !important;
50
50
  }
51
- .textarea__input[data-v-c89174d0]:not(:focus, .textarea__input--label-outside)::placeholder {
51
+ .textarea__input[data-v-745b8198]:not(:focus, .textarea__input--label-outside)::placeholder {
52
52
  opacity: 0;
53
53
  }
54
- .textarea__input[data-v-c89174d0]:focus {
54
+ .textarea__input[data-v-745b8198]:focus {
55
55
  cursor: text;
56
56
  }
57
- .textarea__input[data-v-c89174d0]:disabled {
57
+ .textarea__input[data-v-745b8198]:disabled {
58
58
  cursor: default;
59
59
  }
60
- .textarea__input[data-v-c89174d0]:focus-visible {
60
+ .textarea__input[data-v-745b8198]:focus-visible {
61
61
  box-shadow: unset !important;
62
62
  }
63
- .textarea__input--success[data-v-c89174d0] {
64
- border-color: var(--color-success) !important;
63
+ .textarea__input--success[data-v-745b8198] {
64
+ border-color: var(--color-border-success, var(--color-success)) !important;
65
65
  }
66
- .textarea__input--success[data-v-c89174d0]:focus-visible {
66
+ .textarea__input--success[data-v-745b8198]:focus-visible {
67
67
  box-shadow: rgb(248, 250, 252) 0px 0px 0px 2px, var(--color-primary-element) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
68
68
  }
69
- .textarea__input--error[data-v-c89174d0] {
70
- border-color: var(--color-error) !important;
69
+ .textarea__input--error[data-v-745b8198] {
70
+ border-color: var(--color-border-error, var(--color-error)) !important;
71
71
  }
72
- .textarea__input--error[data-v-c89174d0]:focus-visible {
72
+ .textarea__input--error[data-v-745b8198]:focus-visible {
73
73
  box-shadow: rgb(248, 250, 252) 0px 0px 0px 2px, var(--color-primary-element) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
74
74
  }
75
- .textarea__label[data-v-c89174d0] {
75
+ .textarea__label[data-v-745b8198] {
76
76
  position: absolute;
77
77
  margin-inline: 12px 0;
78
78
  max-width: fit-content;
@@ -85,7 +85,7 @@
85
85
  pointer-events: none;
86
86
  transition: height var(--animation-quick), inset-block-start var(--animation-quick), font-size var(--animation-quick), color var(--animation-quick), background-color var(--animation-quick) var(--animation-slow);
87
87
  }
88
- .textarea__input:focus + .textarea__label[data-v-c89174d0], .textarea__input:not(:placeholder-shown) + .textarea__label[data-v-c89174d0] {
88
+ .textarea__input:focus + .textarea__label[data-v-745b8198], .textarea__input:not(:placeholder-shown) + .textarea__label[data-v-745b8198] {
89
89
  inset-block-start: -10px;
90
90
  line-height: 1.5;
91
91
  font-size: 13px;
@@ -96,17 +96,17 @@
96
96
  margin-inline-start: 8px;
97
97
  transition: height var(--animation-quick), inset-block-start var(--animation-quick), font-size var(--animation-quick), color var(--animation-quick);
98
98
  }
99
- .textarea__helper-text-message[data-v-c89174d0] {
99
+ .textarea__helper-text-message[data-v-745b8198] {
100
100
  padding-block: 4px;
101
101
  display: flex;
102
102
  align-items: center;
103
103
  }
104
- .textarea__helper-text-message__icon[data-v-c89174d0] {
104
+ .textarea__helper-text-message__icon[data-v-745b8198] {
105
105
  margin-inline-end: 8px;
106
106
  }
107
- .textarea__helper-text-message--error[data-v-c89174d0] {
107
+ .textarea__helper-text-message--error[data-v-745b8198] {
108
108
  color: var(--color-error-text);
109
109
  }
110
- .textarea__helper-text-message--success[data-v-c89174d0] {
110
+ .textarea__helper-text-message--success[data-v-745b8198] {
111
111
  color: var(--color-success-text);
112
112
  }
@@ -9,22 +9,22 @@
9
9
  /*
10
10
  * Ensure proper alignment of the vue material icons
11
11
  */
12
- .material-design-icon[data-v-0555d8d0] {
12
+ .material-design-icon[data-v-d4c11174] {
13
13
  display: flex;
14
14
  align-self: center;
15
15
  justify-self: center;
16
16
  align-items: center;
17
17
  justify-content: center;
18
18
  }
19
- .user-status-icon[data-v-0555d8d0] {
19
+ .user-status-icon[data-v-d4c11174] {
20
20
  display: flex;
21
21
  justify-content: center;
22
22
  align-items: center;
23
- min-width: 16px;
24
- min-height: 16px;
25
- max-width: 20px;
26
- max-height: 20px;
27
23
  }
28
- .user-status-icon--invisible[data-v-0555d8d0] {
24
+ .user-status-icon--invisible[data-v-d4c11174] {
29
25
  filter: var(--background-invert-if-dark);
26
+ }
27
+ .user-status-icon[data-v-d4c11174] svg {
28
+ width: 100%;
29
+ height: 100%;
30
30
  }
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const _l10n = require("./_l10n-CXXSIoEf.cjs");
2
+ const _l10n = require("./_l10n-DpwcsAC3.cjs");
3
3
  _l10n.register(_l10n.t3);
4
4
  class Color {
5
5
  /**
@@ -130,4 +130,4 @@ function GenColors(steps) {
130
130
  exports.Color = Color;
131
131
  exports.GenColors = GenColors;
132
132
  exports.defaultPalette = defaultPalette;
133
- //# sourceMappingURL=GenColors-DAxlN2KL.cjs.map
133
+ //# sourceMappingURL=GenColors-BnYS3bvv.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenColors-DAxlN2KL.cjs","sources":["../../src/utils/GenColors.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { t } from '../l10n.js'\n\nexport class Color {\n\n\t/**\n\t * @param {number} r The red value\n\t * @param {number} g The green value\n\t * @param {number} b The blue value\n\t * @param {string} [name] The name of the color\n\t */\n\tconstructor(r, g, b, name) {\n\t\tthis.r = r\n\t\tthis.g = g\n\t\tthis.b = b\n\t\tif (name) {\n\t\t\tthis.name = name\n\t\t}\n\t}\n\n\tget color() {\n\t\tconst toHex = (num) => `00${num.toString(16)}`.slice(-2)\n\t\treturn `#${toHex(this.r)}${toHex(this.g)}${toHex(this.b)}`\n\t}\n\n}\n\n/**\n * Calculate the number of steps\n *\n * @param {number} steps The number of steps\n * @param {Array} ends The ends\n * @return {Array} Array containing the number of steps per color\n */\nfunction stepCalc(steps, ends) {\n\tconst step = new Array(3)\n\tstep[0] = (ends[1].r - ends[0].r) / steps\n\tstep[1] = (ends[1].g - ends[0].g) / steps\n\tstep[2] = (ends[1].b - ends[0].b) / steps\n\treturn step\n}\n\n/**\n * Create a color palette from two colors\n *\n * @param {number} steps The number of steps the palette has\n * @param {Color} color1 The first color\n * @param {Color} color2 The second color\n * @return {Array} The created palette array\n */\nfunction mixPalette(steps, color1, color2) {\n\tconst palette = []\n\tpalette.push(color1)\n\tconst step = stepCalc(steps, [color1, color2])\n\tfor (let i = 1; i < steps; i++) {\n\t\tconst r = Math.floor(color1.r + step[0] * i)\n\t\tconst g = Math.floor(color1.g + step[1] * i)\n\t\tconst b = Math.floor(color1.b + step[2] * i)\n\t\tpalette.push(new Color(r, g, b))\n\t}\n\treturn palette\n}\n\n/**\n * Like GenColor(4) but with labels\n */\nexport const defaultPalette = [\n\tnew Color(182, 70, 157, t('Purple')),\n\tnew Color(\n\t\t191, 103, 139,\n\t\tt('Rosy brown'), // TRANSLATORS: A color name for RGB(191, 103, 139)\n\t),\n\tnew Color(\n\t\t201, 136, 121,\n\t\tt('Feldspar'), // TRANSLATORS: A color name for RGB(201, 136, 121)\n\t),\n\tnew Color(\n\t\t211, 169, 103,\n\t\tt('Whiskey'), // TRANSLATORS: A color name for RGB(211, 169, 103)\n\t),\n\tnew Color(\n\t\t221, 203, 85,\n\t\tt('Gold'),\n\t),\n\tnew Color(\n\t\t165, 184, 114,\n\t\tt('Olivine'), // TRANSLATORS: A color name for RGB(165, 184, 114)\n\t),\n\tnew Color(\n\t\t110, 166, 143,\n\t\tt('Acapulco'), // TRANSLATORS: A color name for RGB(110, 166, 143)\n\t),\n\tnew Color(\n\t\t55, 148, 172,\n\t\tt('Boston Blue'), // TRANSLATORS: A color name for RGB(55, 148, 172)\n\t),\n\tnew Color(\n\t\t0, 130, 201,\n\t\tt('Nextcloud blue'),\n\t),\n\tnew Color(\n\t\t45, 115, 190,\n\t\tt('Mariner'), // TRANSLATORS: A color name for RGB(45, 115, 190)\n\t),\n\tnew Color(\n\t\t91, 100, 179,\n\t\tt('Blue Violet'), // TRANSLATORS: A color name for RGB(91, 100, 179)\n\t),\n\tnew Color(\n\t\t136, 85, 168,\n\t\tt('Deluge'), // TRANSLATORS: A color name for RGB(136, 85, 168)\n\t),\n]\n\n/**\n * Generate colors from the official nextcloud color\n * You can provide how many colors you want (multiplied by 3)\n * if step = 6\n * 3 colors * 6 will result in 18 generated colors\n *\n * @param {number} [steps] Number of steps to go from a color to another\n * @return {object[]}\n */\nexport function GenColors(steps) {\n\tif (!steps) {\n\t\tsteps = 6\n\t}\n\n\tif (steps === 4) {\n\t\treturn defaultPalette\n\t}\n\n\tconst red = new Color(182, 70, 157, t('Purple'))\n\tconst yellow = new Color(221, 203, 85, t('Gold'))\n\tconst blue = new Color(0, 130, 201, t('Nextcloud blue'))\n\n\tconst palette1 = mixPalette(steps, red, yellow)\n\tconst palette2 = mixPalette(steps, yellow, blue)\n\tconst palette3 = mixPalette(steps, blue, red)\n\n\treturn palette1.concat(palette2).concat(palette3)\n}\n"],"names":["t"],"mappings":";;;AAOO,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQlB,YAAY,GAAG,GAAG,GAAG,MAAM;AAC1B,SAAK,IAAI;AACT,SAAK,IAAI;AACT,SAAK,IAAI;AACT,QAAI,MAAM;AACT,WAAK,OAAO;AAAA,IACf;AAAA,EACA;AAAA,EAEC,IAAI,QAAQ;AACX,UAAM,QAAQ,CAAC,QAAQ,KAAK,IAAI,SAAS,EAAE,CAAC,GAAG,MAAM,EAAE;AACvD,WAAO,IAAI,MAAM,KAAK,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,CAAC;AAAA,EAC1D;AAEA;AASA,SAAS,SAAS,OAAO,MAAM;AAC9B,QAAM,OAAO,IAAI,MAAM,CAAC;AACxB,OAAK,CAAC,KAAK,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,EAAE,KAAK;AACpC,OAAK,CAAC,KAAK,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,EAAE,KAAK;AACpC,OAAK,CAAC,KAAK,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,EAAE,KAAK;AACpC,SAAO;AACR;AAUA,SAAS,WAAW,OAAO,QAAQ,QAAQ;AAC1C,QAAM,UAAU,CAAA;AAChB,UAAQ,KAAK,MAAM;AACnB,QAAM,OAAO,SAAS,OAAO,CAAC,QAAQ,MAAM,CAAC;AAC7C,WAAS,IAAI,GAAG,IAAI,OAAO,KAAK;AAC/B,UAAM,IAAI,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC;AAC3C,UAAM,IAAI,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC;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EACf;AAAA,EACD,IAAI;AAAA,IACH;AAAA,IAAK;AAAA,IAAI;AAAA,IACTA,MAAAA,EAAE,QAAQ;AAAA;AAAA,EACV;AACF;AAWO,SAAS,UAAU,OAAO;AAShC,QAAM,MAAM,IAAI,MAAM,KAAK,IAAI,KAAKA,MAAC,EAAC,QAAQ,CAAC;AAC/C,QAAM,SAAS,IAAI,MAAM,KAAK,KAAK,IAAIA,MAAC,EAAC,MAAM,CAAC;AAChD,QAAM,OAAO,IAAI,MAAM,GAAG,KAAK,KAAKA,MAAC,EAAC,gBAAgB,CAAC;AAEvD,QAAM,WAAW,WAAW,OAAO,KAAK,MAAM;AAC9C,QAAM,WAAW,WAAW,OAAO,QAAQ,IAAI;AAC/C,QAAM,WAAW,WAAW,OAAO,MAAM,GAAG;AAE5C,SAAO,SAAS,OAAO,QAAQ,EAAE,OAAO,QAAQ;AACjD;;;;"}
1
+ {"version":3,"file":"GenColors-BnYS3bvv.cjs","sources":["../../src/utils/GenColors.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { t } from '../l10n.js'\n\nexport class Color {\n\n\t/**\n\t * @param {number} r The red value\n\t * @param {number} g The green value\n\t * @param {number} b The blue value\n\t * @param {string} [name] The name of the color\n\t */\n\tconstructor(r, g, b, name) {\n\t\tthis.r = r\n\t\tthis.g = g\n\t\tthis.b = b\n\t\tif (name) {\n\t\t\tthis.name = name\n\t\t}\n\t}\n\n\tget color() {\n\t\tconst toHex = (num) => `00${num.toString(16)}`.slice(-2)\n\t\treturn `#${toHex(this.r)}${toHex(this.g)}${toHex(this.b)}`\n\t}\n\n}\n\n/**\n * Calculate the number of steps\n *\n * @param {number} steps The number of steps\n * @param {Array} ends The ends\n * @return {Array} Array containing the number of steps per color\n */\nfunction stepCalc(steps, ends) {\n\tconst step = new Array(3)\n\tstep[0] = (ends[1].r - ends[0].r) / steps\n\tstep[1] = (ends[1].g - ends[0].g) / steps\n\tstep[2] = (ends[1].b - ends[0].b) / steps\n\treturn step\n}\n\n/**\n * Create a color palette from two colors\n *\n * @param {number} steps The number of steps the palette has\n * @param {Color} color1 The first color\n * @param {Color} color2 The second color\n * @return {Array} The created palette array\n */\nfunction mixPalette(steps, color1, color2) {\n\tconst palette = []\n\tpalette.push(color1)\n\tconst step = stepCalc(steps, [color1, color2])\n\tfor (let i = 1; i < steps; i++) {\n\t\tconst r = Math.floor(color1.r + step[0] * i)\n\t\tconst g = Math.floor(color1.g + step[1] * i)\n\t\tconst b = Math.floor(color1.b + step[2] * i)\n\t\tpalette.push(new Color(r, g, b))\n\t}\n\treturn palette\n}\n\n/**\n * Like GenColor(4) but with labels\n */\nexport const defaultPalette = [\n\tnew Color(182, 70, 157, t('Purple')),\n\tnew Color(\n\t\t191, 103, 139,\n\t\tt('Rosy brown'), // TRANSLATORS: A color name for RGB(191, 103, 139)\n\t),\n\tnew Color(\n\t\t201, 136, 121,\n\t\tt('Feldspar'), // TRANSLATORS: A color name for RGB(201, 136, 121)\n\t),\n\tnew Color(\n\t\t211, 169, 103,\n\t\tt('Whiskey'), // TRANSLATORS: A color name for RGB(211, 169, 103)\n\t),\n\tnew Color(\n\t\t221, 203, 85,\n\t\tt('Gold'),\n\t),\n\tnew Color(\n\t\t165, 184, 114,\n\t\tt('Olivine'), // TRANSLATORS: A color name for RGB(165, 184, 114)\n\t),\n\tnew Color(\n\t\t110, 166, 143,\n\t\tt('Acapulco'), // TRANSLATORS: A color name for RGB(110, 166, 143)\n\t),\n\tnew Color(\n\t\t55, 148, 172,\n\t\tt('Boston Blue'), // TRANSLATORS: A color name for RGB(55, 148, 172)\n\t),\n\tnew Color(\n\t\t0, 130, 201,\n\t\tt('Nextcloud blue'),\n\t),\n\tnew Color(\n\t\t45, 115, 190,\n\t\tt('Mariner'), // TRANSLATORS: A color name for RGB(45, 115, 190)\n\t),\n\tnew Color(\n\t\t91, 100, 179,\n\t\tt('Blue Violet'), // TRANSLATORS: A color name for RGB(91, 100, 179)\n\t),\n\tnew Color(\n\t\t136, 85, 168,\n\t\tt('Deluge'), // TRANSLATORS: A color name for RGB(136, 85, 168)\n\t),\n]\n\n/**\n * Generate colors from the official nextcloud color\n * You can provide how many colors you want (multiplied by 3)\n * if step = 6\n * 3 colors * 6 will result in 18 generated colors\n *\n * @param {number} [steps] Number of steps to go from a color to another\n * @return {object[]}\n */\nexport function GenColors(steps) {\n\tif (!steps) {\n\t\tsteps = 6\n\t}\n\n\tif (steps === 4) {\n\t\treturn defaultPalette\n\t}\n\n\tconst red = new Color(182, 70, 157, t('Purple'))\n\tconst yellow = new Color(221, 203, 85, t('Gold'))\n\tconst blue = new Color(0, 130, 201, t('Nextcloud blue'))\n\n\tconst palette1 = mixPalette(steps, red, yellow)\n\tconst palette2 = mixPalette(steps, yellow, blue)\n\tconst palette3 = mixPalette(steps, blue, red)\n\n\treturn palette1.concat(palette2).concat(palette3)\n}\n"],"names":["t"],"mappings":";;;AAOO,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQlB,YAAY,GAAG,GAAG,GAAG,MAAM;AAC1B,SAAK,IAAI;AACT,SAAK,IAAI;AACT,SAAK,IAAI;AACT,QAAI,MAAM;AACT,WAAK,OAAO;AAAA,IACf;AAAA,EACA;AAAA,EAEC,IAAI,QAAQ;AACX,UAAM,QAAQ,CAAC,QAAQ,KAAK,IAAI,SAAS,EAAE,CAAC,GAAG,MAAM,EAAE;AACvD,WAAO,IAAI,MAAM,KAAK,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,CAAC;AAAA,EAC1D;AAEA;AASA,SAAS,SAAS,OAAO,MAAM;AAC9B,QAAM,OAAO,IAAI,MAAM,CAAC;AACxB,OAAK,CAAC,KAAK,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,EAAE,KAAK;AACpC,OAAK,CAAC,KAAK,KAAK,CAAC,EA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AK;AAAA,IACVA,MAAAA,EAAE,UAAU;AAAA;AAAA,EACZ;AAAA,EACD,IAAI;AAAA,IACH;AAAA,IAAI;AAAA,IAAK;AAAA,IACTA,MAAAA,EAAE,aAAa;AAAA;AAAA,EACf;AAAA,EACD,IAAI;AAAA,IACH;AAAA,IAAG;AAAA,IAAK;AAAA,IACRA,MAAAA,EAAE,gBAAgB;AAAA,EAClB;AAAA,EACD,IAAI;AAAA,IACH;AAAA,IAAI;AAAA,IAAK;AAAA,IACTA,MAAAA,EAAE,SAAS;AAAA;AAAA,EACX;AAAA,EACD,IAAI;AAAA,IACH;AAAA,IAAI;AAAA,IAAK;AAAA,IACTA,MAAAA,EAAE,aAAa;AAAA;AAAA,EACf;AAAA,EACD,IAAI;AAAA,IACH;AAAA,IAAK;AAAA,IAAI;AAAA,IACTA,MAAAA,EAAE,QAAQ;AAAA;AAAA,EACV;AACF;AAWO,SAAS,UAAU,OAAO;AAShC,QAAM,MAAM,IAAI,MAAM,KAAK,IAAI,KAAKA,MAAC,EAAC,QAAQ,CAAC;AAC/C,QAAM,SAAS,IAAI,MAAM,KAAK,KAAK,IAAIA,MAAC,EAAC,MAAM,CAAC;AAChD,QAAM,OAAO,IAAI,MAAM,GAAG,KAAK,KAAKA,MAAC,EAAC,gBAAgB,CAAC;AAEvD,QAAM,WAAW,WAAW,OAAO,KAAK,MAAM;AAC9C,QAAM,WAAW,WAAW,OAAO,QAAQ,IAAI;AAC/C,QAAM,WAAW,WAAW,OAAO,MAAM,GAAG;AAE5C,SAAO,SAAS,OAAO,QAAQ,EAAE,OAAO,QAAQ;AACjD;;;;"}
@@ -1,4 +1,4 @@
1
- import { r as register, t as t3, a as t } from "./_l10n-DIOHNc85.mjs";
1
+ import { r as register, t as t3, a as t } from "./_l10n-BU8-kQzN.mjs";
2
2
  register(t3);
3
3
  class Color {
4
4
  /**
@@ -131,4 +131,4 @@ export {
131
131
  GenColors as G,
132
132
  defaultPalette as d
133
133
  };
134
- //# sourceMappingURL=GenColors-BowX0SaQ.mjs.map
134
+ //# sourceMappingURL=GenColors-DNN63dHB.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"GenColors-BowX0SaQ.mjs","sources":["../../src/utils/GenColors.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { t } from '../l10n.js'\n\nexport class Color {\n\n\t/**\n\t * @param {number} r The red value\n\t * @param {number} g The green value\n\t * @param {number} b The blue value\n\t * @param {string} [name] The name of the color\n\t */\n\tconstructor(r, g, b, name) {\n\t\tthis.r = r\n\t\tthis.g = g\n\t\tthis.b = b\n\t\tif (name) {\n\t\t\tthis.name = name\n\t\t}\n\t}\n\n\tget color() {\n\t\tconst toHex = (num) => `00${num.toString(16)}`.slice(-2)\n\t\treturn `#${toHex(this.r)}${toHex(this.g)}${toHex(this.b)}`\n\t}\n\n}\n\n/**\n * Calculate the number of steps\n *\n * @param {number} steps The number of steps\n * @param {Array} ends The ends\n * @return {Array} Array containing the number of steps per color\n */\nfunction stepCalc(steps, ends) {\n\tconst step = new Array(3)\n\tstep[0] = (ends[1].r - ends[0].r) / steps\n\tstep[1] = (ends[1].g - ends[0].g) / steps\n\tstep[2] = (ends[1].b - ends[0].b) / steps\n\treturn step\n}\n\n/**\n * Create a color palette from two colors\n *\n * @param {number} steps The number of steps the palette has\n * @param {Color} color1 The first color\n * @param {Color} color2 The second color\n * @return {Array} The created palette array\n */\nfunction mixPalette(steps, color1, color2) {\n\tconst palette = []\n\tpalette.push(color1)\n\tconst step = stepCalc(steps, [color1, color2])\n\tfor (let i = 1; i < steps; i++) {\n\t\tconst r = Math.floor(color1.r + step[0] * i)\n\t\tconst g = Math.floor(color1.g + step[1] * i)\n\t\tconst b = Math.floor(color1.b + step[2] * i)\n\t\tpalette.push(new Color(r, g, b))\n\t}\n\treturn palette\n}\n\n/**\n * Like GenColor(4) but with labels\n */\nexport const defaultPalette = [\n\tnew Color(182, 70, 157, t('Purple')),\n\tnew Color(\n\t\t191, 103, 139,\n\t\tt('Rosy brown'), // TRANSLATORS: A color name for RGB(191, 103, 139)\n\t),\n\tnew Color(\n\t\t201, 136, 121,\n\t\tt('Feldspar'), // TRANSLATORS: A color name for RGB(201, 136, 121)\n\t),\n\tnew Color(\n\t\t211, 169, 103,\n\t\tt('Whiskey'), // TRANSLATORS: A color name for RGB(211, 169, 103)\n\t),\n\tnew Color(\n\t\t221, 203, 85,\n\t\tt('Gold'),\n\t),\n\tnew Color(\n\t\t165, 184, 114,\n\t\tt('Olivine'), // TRANSLATORS: A color name for RGB(165, 184, 114)\n\t),\n\tnew Color(\n\t\t110, 166, 143,\n\t\tt('Acapulco'), // TRANSLATORS: A color name for RGB(110, 166, 143)\n\t),\n\tnew Color(\n\t\t55, 148, 172,\n\t\tt('Boston Blue'), // TRANSLATORS: A color name for RGB(55, 148, 172)\n\t),\n\tnew Color(\n\t\t0, 130, 201,\n\t\tt('Nextcloud blue'),\n\t),\n\tnew Color(\n\t\t45, 115, 190,\n\t\tt('Mariner'), // TRANSLATORS: A color name for RGB(45, 115, 190)\n\t),\n\tnew Color(\n\t\t91, 100, 179,\n\t\tt('Blue Violet'), // TRANSLATORS: A color name for RGB(91, 100, 179)\n\t),\n\tnew Color(\n\t\t136, 85, 168,\n\t\tt('Deluge'), // TRANSLATORS: A color name for RGB(136, 85, 168)\n\t),\n]\n\n/**\n * Generate colors from the official nextcloud color\n * You can provide how many colors you want (multiplied by 3)\n * if step = 6\n * 3 colors * 6 will result in 18 generated colors\n *\n * @param {number} [steps] Number of steps to go from a color to another\n * @return {object[]}\n */\nexport function GenColors(steps) {\n\tif (!steps) {\n\t\tsteps = 6\n\t}\n\n\tif (steps === 4) {\n\t\treturn defaultPalette\n\t}\n\n\tconst red = new Color(182, 70, 157, t('Purple'))\n\tconst yellow = new Color(221, 203, 85, t('Gold'))\n\tconst blue = new Color(0, 130, 201, t('Nextcloud blue'))\n\n\tconst palette1 = mixPalette(steps, red, yellow)\n\tconst palette2 = mixPalette(steps, yellow, blue)\n\tconst palette3 = mixPalette(steps, blue, red)\n\n\treturn palette1.concat(palette2).concat(palette3)\n}\n"],"names":[],"mappings":";;AAOO,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQlB,YAAY,GAAG,GAAG,GAAG,MAAM;AAC1B,SAAK,IAAI;AACT,SAAK,IAAI;AACT,SAAK,IAAI;AACT,QAAI,MAAM;AACT,WAAK,OAAO;AAAA,IACf;AAAA,EACA;AAAA,EAEC,IAAI,QAAQ;AACX,UAAM,QAAQ,CAAC,QAAQ,KAAK,IAAI,SAAS,EAAE,CAAC,GAAG,MAAM,EAAE;AACvD,WAAO,IAAI,MAAM,KAAK,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,CAAC;AAAA,EAC1D;AAEA;AASA,SAAS,SAAS,OAAO,MAAM;AAC9B,QAAM,OAAO,IAAI,MAAM,CAAC;AACxB,OAAK,CAAC,KAAK,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,EAAE,KAAK;AACpC,OAAK,CAAC,KAAK,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,EAAE,KAAK;AACpC,OAAK,CAAC,KAAK,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,EAAE,KAAK;AACpC,SAAO;AACR;AAUA,SAAS,WAAW,OAAO,QAAQ,QAAQ;AAC1C,QAAM,UAAU,CAAA;AAChB,UAAQ,KAAK,MAAM;AACnB,QAAM,OAAO,SAAS,OAAO,CAAC,QAAQ,MAAM,CAAC;AAC7C,WAAS,IAAI,GAAG,IAAI,OAAO,KAAK;AAC/B,UAAM,IAAI,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC;AAC3C,UAAM,IAAI,KAAK,MAAM,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC;AAC3C,UAAM,IAAI,KAAK,MAAM,OAAO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ShC,QAAM,MAAM,IAAI,MAAM,KAAK,IAAI,KAAK,EAAE,QAAQ,CAAC;AAC/C,QAAM,SAAS,IAAI,MAAM,KAAK,KAAK,IAAI,EAAE,MAAM,CAAC;AAChD,QAAM,OAAO,IAAI,MAAM,GAAG,KAAK,KAAK,EAAE,gBAAgB,CAAC;AAEvD,QAAM,WAAW,WAAW,OAAO,KAAK,MAAM;AAC9C,QAAM,WAAW,WAAW,OAAO,QAAQ,IAAI;AAC/C,QAAM,WAAW,WAAW,OAAO,MAAM,GAAG;AAE5C,SAAO,SAAS,OAAO,QAAQ,EAAE,OAAO,QAAQ;AACjD;"}
1
+ {"version":3,"file":"GenColors-DNN63dHB.mjs","sources":["../../src/utils/GenColors.js"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { t } from '../l10n.js'\n\nexport class Color {\n\n\t/**\n\t * @param {number} r The red value\n\t * @param {number} g The green value\n\t * @param {number} b The blue value\n\t * @param {string} [name] The name of the color\n\t */\n\tconstructor(r, g, b, name) {\n\t\tthis.r = r\n\t\tthis.g = g\n\t\tthis.b = b\n\t\tif (name) {\n\t\t\tthis.name = name\n\t\t}\n\t}\n\n\tget color() {\n\t\tconst toHex = (num) => `00${num.toString(16)}`.slice(-2)\n\t\treturn `#${toHex(this.r)}${toHex(this.g)}${toHex(this.b)}`\n\t}\n\n}\n\n/**\n * Calculate the number of steps\n *\n * @param {number} steps The number of steps\n * @param {Array} ends The ends\n * @return {Array} Array containing the number of steps per color\n */\nfunction stepCalc(steps, ends) {\n\tconst step = new Array(3)\n\tstep[0] = (ends[1].r - ends[0].r) / steps\n\tstep[1] = (ends[1].g - ends[0].g) / steps\n\tstep[2] = (ends[1].b - ends[0].b) / steps\n\treturn step\n}\n\n/**\n * Create a color palette from two colors\n *\n * @param {number} steps The number of steps the palette has\n * @param {Color} color1 The first color\n * @param {Color} color2 The second color\n * @return {Array} The created palette array\n */\nfunction mixPalette(steps, color1, color2) {\n\tconst palette = []\n\tpalette.push(color1)\n\tconst step = stepCalc(steps, [color1, color2])\n\tfor (let i = 1; i < steps; i++) {\n\t\tconst r = Math.floor(color1.r + step[0] * i)\n\t\tconst g = Math.floor(color1.g + step[1] * i)\n\t\tconst b = Math.floor(color1.b + step[2] * i)\n\t\tpalette.push(new Color(r, g, b))\n\t}\n\treturn palette\n}\n\n/**\n * Like GenColor(4) but with labels\n */\nexport const defaultPalette = [\n\tnew Color(182, 70, 157, t('Purple')),\n\tnew Color(\n\t\t191, 103, 139,\n\t\tt('Rosy brown'), // TRANSLATORS: A color name for RGB(191, 103, 139)\n\t),\n\tnew Color(\n\t\t201, 136, 121,\n\t\tt('Feldspar'), // TRANSLATORS: A color name for RGB(201, 136, 121)\n\t),\n\tnew Color(\n\t\t211, 169, 103,\n\t\tt('Whiskey'), // TRANSLATORS: A color name for RGB(211, 169, 103)\n\t),\n\tnew Color(\n\t\t221, 203, 85,\n\t\tt('Gold'),\n\t),\n\tnew Color(\n\t\t165, 184, 114,\n\t\tt('Olivine'), // TRANSLATORS: A color name for RGB(165, 184, 114)\n\t),\n\tnew Color(\n\t\t110, 166, 143,\n\t\tt('Acapulco'), // TRANSLATORS: A color name for RGB(110, 166, 143)\n\t),\n\tnew Color(\n\t\t55, 148, 172,\n\t\tt('Boston Blue'), // TRANSLATORS: A color name for RGB(55, 148, 172)\n\t),\n\tnew Color(\n\t\t0, 130, 201,\n\t\tt('Nextcloud blue'),\n\t),\n\tnew Color(\n\t\t45, 115, 190,\n\t\tt('Mariner'), // TRANSLATORS: A color name for RGB(45, 115, 190)\n\t),\n\tnew Color(\n\t\t91, 100, 179,\n\t\tt('Blue Violet'), // TRANSLATORS: A color name for RGB(91, 100, 179)\n\t),\n\tnew Color(\n\t\t136, 85, 168,\n\t\tt('Deluge'), // TRANSLATORS: A color name for RGB(136, 85, 168)\n\t),\n]\n\n/**\n * Generate colors from the official nextcloud color\n * You can provide how many colors you want (multiplied by 3)\n * if step = 6\n * 3 colors * 6 will result in 18 generated colors\n *\n * @param {number} [steps] Number of steps to go from a color to another\n * @return {object[]}\n */\nexport function GenColors(steps) {\n\tif (!steps) {\n\t\tsteps = 6\n\t}\n\n\tif (steps === 4) {\n\t\treturn defaultPalette\n\t}\n\n\tconst red = new Color(182, 70, 157, t('Purple'))\n\tconst yellow = new Color(221, 203, 85, t('Gold'))\n\tconst blue = new Color(0, 130, 201, t('Nextcloud blue'))\n\n\tconst palette1 = mixPalette(steps, red, yellow)\n\tconst palette2 = mixPalette(steps, yellow, blue)\n\tconst palette3 = mixPalette(steps, blue, red)\n\n\treturn palette1.concat(palette2).concat(palette3)\n}\n"],"names":[],"mappings":";;AAOO,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQlB,YAAY,GAAG,GAAG,GAAG,MAAM;AAC1B,SAAK,IAAI;AACT,SAAK,IAAI;AACT,SAAK,IAAI;AACT,QAAI,MAAM;AACT,WAAK,OAAO;AAAA,IACf;AAAA,EACA;AAAA,EAEC,IAAI,QAAQ;AACX,UAAM,QAAQ,CAAC,QAAQ,KAAK,IAAI,SAAS,EAAE,CAAC,GAAG,MAAM,EAAE;AACvD,WAAO,IAAI,MAAM,KAAK,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,CAAC;AAAA,EAC1D;AAEA;AASA,SAAS,SAAS,OAAO,MAAM;AAC9B,QAAM,OAAO,IAAI,MAAM,CAAC;AACxB,OAAK,CAAC,KAAK,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,EAAE,KAAK;AACpC,OAAK,CAAC,KAAK,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,EAAE,KAAK;AACpC,OAAK,CAAC,KAAK,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC,EAAE,KAAK;AACpC,SAAO;AACR;AAUA,SAAS,WAAW,OAAO,QAAQ,QAAQ;AAC1C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,EAClB;AAAA,EACD,IAAI;AAAA,IACH;AAAA,IAAI;AAAA,IAAK;AAAA,IACT,EAAE,SAAS;AAAA;AAAA,EACX;AAAA,EACD,IAAI;AAAA,IACH;AAAA,IAAI;AAAA,IAAK;AAAA,IACT,EAAE,aAAa;AAAA;AAAA,EACf;AAAA,EACD,IAAI;AAAA,IACH;AAAA,IAAK;AAAA,IAAI;AAAA,IACT,EAAE,QAAQ;AAAA;AAAA,EACV;AACF;AAWO,SAAS,UAAU,OAAO;AAShC,QAAM,MAAM,IAAI,MAAM,KAAK,IAAI,KAAK,EAAE,QAAQ,CAAC;AAC/C,QAAM,SAAS,IAAI,MAAM,KAAK,KAAK,IAAI,EAAE,MAAM,CAAC;AAChD,QAAM,OAAO,IAAI,MAAM,GAAG,KAAK,KAAK,EAAE,gBAAgB,CAAC;AAEvD,QAAM,WAAW,WAAW,OAAO,KAAK,MAAM;AAC9C,QAAM,WAAW,WAAW,OAAO,QAAQ,IAAI;AAC/C,QAAM,WAAW,WAAW,OAAO,MAAM,GAAG;AAE5C,SAAO,SAAS,OAAO,QAAQ,EAAE,OAAO,QAAQ;AACjD;"}
@@ -1,6 +1,6 @@
1
1
  require('../assets/NcActionButton-D8Lyueq3.css');
2
2
  "use strict";
3
- const mdi = require("./mdi-BflUJIiB.cjs");
3
+ const mdi = require("./mdi-BqDPfc6J.cjs");
4
4
  const actionText = require("./actionText-BcrK4uH1.cjs");
5
5
  const NcIconSvgWrapper = require("./NcIconSvgWrapper-CrnN5Sq5.cjs");
6
6
  const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
@@ -178,4 +178,4 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
178
178
  );
179
179
  const NcActionButton = __component__.exports;
180
180
  exports.NcActionButton = NcActionButton;
181
- //# sourceMappingURL=NcActionButton-DBh812gJ.cjs.map
181
+ //# sourceMappingURL=NcActionButton-2qh96K_i.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcActionButton-DBh812gJ.cjs","sources":["../../src/components/NcActionButton/NcActionButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :close-after-click=\"true\" @click=\"showMessage('Delete and close menu')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete and close\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :is-menu=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCreate\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :disabled=\"true\" @click=\"showMessage('Disabled')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDisabled button\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\nIf you're using a long text, you can specify a `name` prop.\n\nFor the same purpose, but in a more compact way, `description` prop can be used.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton name=\"Long button\" @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis button is associated with a very long text.\\nAnd with new lines too.\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton description=\"Subline description for the button\" @click=\"showMessage('Edit')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tEdit\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Pencil from 'vue-material-design-icons/Pencil.vue'\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPencil,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nAction icon attribute with a single action\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nYou can also use a custom icon, for example from the vue-material-design-icons library:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise left hand\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise right hand\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft.vue'\nimport HandBackRight from 'vue-material-design-icons/HandBackRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tHandBackRight,\n\t},\n}\n</script>\n```\n\n### With different model behavior\nBy default the button will act like a normal button, but it is also possible to change the behavior to a toggle button, checkbox button or radio button.\n\nFor example to have the button act like a toggle button just set the `modelValue` property to the toggle state:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton :model-value.sync=\"fullscreen\">\n\t\t\t<template #icon>\n\t\t\t\t<Fullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport Fullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t}\n\t},\n}\n</script>\n```\n\nAnother example would be using it with checkbox semantics, to enable or disable features.\nThis also allows tri-state behavior (`true`, `false`, `null`) in which case `aria-checked` will be either `true`, `false` or `mixed`.\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton :model-value.sync=\"handRaised\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise hand\n\t\t</NcActionButton>\n\t\t<NcActionButton :model-value.sync=\"fullscreen\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<Fullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft.vue'\nimport Fullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t\thandRaised: false,\n\t\t}\n\t},\n}\n</script>\n```\n\nIt is also possible to use the button with radio semantics, this is only possible in menus and not for inline actions!\n\nWith a string `modelValue`, checked state is determined by the `value` property and updates `modelValue` with the new `value` string.\n\nWith a boolean `modelValue`, checked state is determined by `modelValue` and updates to `true` on check.\n\nNote: unlike native radio buttons, `NcActionButton` are not grouped by name, so you need to connect them by bind correct `modelValue``.\n\n```vue\n<template>\n\t<div>\n\t\t<NcActions>\n\t\t\t<NcActionButton :model-value.sync=\"payment\" type=\"radio\" value=\"cash\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Cash :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay with cash\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :model-value.sync=\"payment\" type=\"radio\" value=\"card\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<CreditCard :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay by card\n\t\t\t</NcActionButton>\n\t\t\t<NcActionSeparator />\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isLeft\" @update:modelValue=\"setAlign('Left', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignLeft :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tLeft\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isCenter\" @update:modelValue=\"setAlign('Center', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignCenter :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCenter\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isRight\" @update:modelValue=\"setAlign('Right', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignRight :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tRight\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t\t<p>payment = \"{{ payment }}\"</p>\n\t\t<p>align.isLeft = {{ align.isLeft }}</p>\n\t\t<p>align.isCenter = {{ align.isCenter }}</p>\n\t\t<p>align.isRight = {{ align.isRight }}</p>\n\t</div>\n</template>\n<script>\nimport Cash from 'vue-material-design-icons/Cash.vue'\nimport CreditCard from 'vue-material-design-icons/CreditCard.vue'\nimport FormatAlignLeft from 'vue-material-design-icons/FormatAlignLeft.vue'\nimport FormatAlignCenter from 'vue-material-design-icons/FormatAlignCenter.vue'\nimport FormatAlignRight from 'vue-material-design-icons/FormatAlignRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tCash,\n\t\tCreditCard,\n\t\tFormatAlignLeft,\n\t\tFormatAlignCenter,\n\t\tFormatAlignRight,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpayment: 'card',\n\t\t\talign: {\n\t\t\t\tisLeft: false,\n\t\t\t\tisCenter: true,\n\t\t\t\tisRight: false,\n\t\t\t},\n\t\t}\n\t},\n\tmethods: {\n\t\tsetAlign(direction, value) {\n\t\t\tthis.align.isLeft = false\n\t\t\tthis.align.isCenter = false\n\t\t\tthis.align.isRight = false\n\t\t\tthis.align[`is${direction}`] = value\n\t\t},\n\t}\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"{ 'action--disabled': disabled }\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<button :aria-label=\"ariaLabel\"\n\t\t\t:class=\"['action-button button-vue', {\n\t\t\t\t'action-button--active': isChecked,\n\t\t\t\tfocusable: isFocusable,\n\t\t\t}]\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:title=\"title\"\n\t\t\t:type=\"nativeType\"\n\t\t\tv-bind=\"buttonAttributes\"\n\t\t\t@click=\"handleClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span :class=\"[isIconUrl ? 'action-button__icon--url' : icon]\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"action-button__icon\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<span class=\"action-button__longtext-wrapper\">\n\t\t\t\t<strong v-if=\"name\"\n\t\t\t\t\tclass=\"action-button__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span v-if=\"isLongText\"\n\t\t\t\t\tclass=\"action-button__longtext\"\n\t\t\t\t\tv-text=\"text\" />\n\t\t\t\t<!-- default text display -->\n\t\t\t\t<span v-else\n\t\t\t\t\tclass=\"action-button__text\">\n\t\t\t\t\t{{ text }}\n\t\t\t\t</span>\n\t\t\t\t<span v-if=\"description\"\n\t\t\t\t\tclass=\"action-button__description\"\n\t\t\t\t\tv-text=\"description\" />\n\t\t\t</span>\n\n\t\t\t<!-- right(in LTR) or left(in RTL) arrow icon when there is a sub-menu -->\n\t\t\t<NcIconSvgWrapper v-if=\"isMenu\"\n\t\t\t\tclass=\"action-button__menu-icon\"\n\t\t\t\tdirectional\n\t\t\t\t:path=\"mdiChevronRight\" />\n\t\t\t<NcIconSvgWrapper v-else-if=\"isChecked\" :path=\"mdiCheck\" class=\"action-button__pressed-icon\" />\n\n\t\t\t<span v-else-if=\"isChecked === false\" class=\"action-button__pressed-icon material-design-icon\" />\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</button>\n\t</li>\n</template>\n\n<script>\nimport { mdiCheck, mdiChevronRight } from '@mdi/js'\nimport ActionTextMixin from '../../mixins/actionText.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\n\n/**\n * Button component to be used in Actions\n */\nexport default {\n\tname: 'NcActionButton',\n\n\tcomponents: {\n\t\tNcIconSvgWrapper,\n\t},\n\tmixins: [ActionTextMixin],\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: 'NcActions:isSemanticMenu',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.\n\t\t * @todo Add a check in @nextcloud/vue 9 that this prop is not provided,\n\t\t * otherwise root element will inherit incorrect aria-hidden.\n\t\t */\n\t\tariaHidden: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the action button\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * If this is a menu, a chevron icon will\n\t\t * be added at the end of the line\n\t\t */\n\t\tisMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The button's behavior, by default the button acts like a normal button with optional toggle button behavior if `modelValue` is `true` or `false`.\n\t\t * But you can also set to checkbox button behavior with tri-state or radio button like behavior.\n\t\t * This extends the native HTML button type attribute.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'button',\n\t\t\tvalidator: (behavior) => ['button', 'checkbox', 'radio', 'reset', 'submit'].includes(behavior),\n\t\t},\n\n\t\t/**\n\t\t * The buttons state if `type` is 'checkbox' or 'radio' (meaning if it is pressed / selected).\n\t\t * For checkbox and toggle button behavior - boolean value.\n\t\t * For radio button behavior - could be a boolean checked or a string with the value of the button.\n\t\t * Note: Unlike native radio buttons, NcActionButton are not grouped by name, so you need to connect them by bind correct modelValue.\n\t\t *\n\t\t * **This is not availabe for `type='submit'` or `type='reset'`**\n\t\t *\n\t\t * If using `type='checkbox'` a `model-value` of `true` means checked, `false` means unchecked and `null` means indeterminate (tri-state)\n\t\t * For `type='radio'` `null` is equal to `false`\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The value used for the `modelValue` when this component is used with radio behavior\n\t\t * Similar to the `value` attribute of `<input type=\"radio\">`\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Small underlying text content of the entry\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\tsetup() {\n\t\treturn {\n\t\t\tmdiCheck,\n\t\t\tmdiChevronRight,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\n\t\t/**\n\t\t * The current \"checked\" or \"pressed\" state for the model behavior\n\t\t */\n\t\tisChecked() {\n\t\t\tif (this.type === 'radio' && typeof this.modelValue !== 'boolean') {\n\t\t\t\treturn this.modelValue === this.value\n\t\t\t}\n\t\t\treturn this.modelValue\n\t\t},\n\n\t\t/**\n\t\t * The native HTML type to set on the button\n\t\t */\n\t\tnativeType() {\n\t\t\tif (this.type === 'submit' || this.type === 'reset') {\n\t\t\t\treturn this.type\n\t\t\t}\n\t\t\treturn 'button'\n\t\t},\n\n\t\t/**\n\t\t * HTML attributes to bind to the <button>\n\t\t */\n\t\tbuttonAttributes() {\n\t\t\tconst attributes = {}\n\n\t\t\tif (this.isInSemanticMenu) {\n\t\t\t\t// By default it needs to be a menu item in semantic menus\n\t\t\t\tattributes.role = 'menuitem'\n\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tattributes.role = 'menuitemradio'\n\t\t\t\t\tattributes['aria-checked'] = this.isChecked ? 'true' : 'false'\n\t\t\t\t} else if (this.type === 'checkbox' || (this.nativeType === 'button' && this.modelValue !== null)) {\n\t\t\t\t\t// either if checkbox behavior was set or the model value is not unset\n\t\t\t\t\tattributes.role = 'menuitemcheckbox'\n\t\t\t\t\tattributes['aria-checked'] = this.modelValue === null ? 'mixed' : (this.modelValue ? 'true' : 'false')\n\t\t\t\t}\n\t\t\t} else if (this.modelValue !== null && this.nativeType === 'button') {\n\t\t\t\t// In case this has a modelValue it is considered a toggle button, so we need to set the aria-pressed\n\t\t\t\tattributes['aria-pressed'] = this.modelValue ? 'true' : 'false'\n\t\t\t}\n\n\t\t\treturn attributes\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Forward click event, let mixin handle the close-after-click and emit new modelValue if needed\n\t\t * @param {MouseEvent} event The click event\n\t\t */\n\t\thandleClick(event) {\n\t\t\tthis.onClick(event)\n\t\t\t// If modelValue or type is set (so modelValue might be null for tri-state) we need to update it\n\t\t\tif (this.modelValue !== null || this.type !== 'button') {\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tif (typeof this.modelValue !== 'boolean') {\n\t\t\t\t\t\t// String-value radios behavior is similar to native - click on checked radio does nothing\n\t\t\t\t\t\tif (!this.isChecked) {\n\t\t\t\t\t\t\tthis.$emit('update:modelValue', this.value)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Boolean radio allows to uncheck\n\t\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Checkbox toggles value\n\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../../assets/action';\n@include action-active;\n@include action--disabled;\n@include action-item('button');\n\n.action-button {\n\t&__pressed-icon {\n\t\tmargin-inline: auto calc($icon-margin * -1);\n\t}\n\n\t* {\n\t\tcursor: pointer;\n\t}\n}\n</style>\n"],"names":["NcIconSvgWrapper","ActionTextMix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IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcActionButton-2qh96K_i.cjs","sources":["../../src/components/NcActionButton/NcActionButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :close-after-click=\"true\" @click=\"showMessage('Delete and close menu')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete and close\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :is-menu=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCreate\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :disabled=\"true\" @click=\"showMessage('Disabled')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDisabled button\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\nIf you're using a long text, you can specify a `name` prop.\n\nFor the same purpose, but in a more compact way, `description` prop can be used.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton name=\"Long button\" @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis button is associated with a very long text.\\nAnd with new lines too.\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton description=\"Subline description for the button\" @click=\"showMessage('Edit')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tEdit\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Pencil from 'vue-material-design-icons/Pencil.vue'\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPencil,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nAction icon attribute with a single action\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nYou can also use a custom icon, for example from the vue-material-design-icons library:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise left hand\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise right hand\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft.vue'\nimport HandBackRight from 'vue-material-design-icons/HandBackRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tHandBackRight,\n\t},\n}\n</script>\n```\n\n### With different model behavior\nBy default the button will act like a normal button, but it is also possible to change the behavior to a toggle button, checkbox button or radio button.\n\nFor example to have the button act like a toggle button just set the `modelValue` property to the toggle state:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton :model-value.sync=\"fullscreen\">\n\t\t\t<template #icon>\n\t\t\t\t<Fullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport Fullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t}\n\t},\n}\n</script>\n```\n\nAnother example would be using it with checkbox semantics, to enable or disable features.\nThis also allows tri-state behavior (`true`, `false`, `null`) in which case `aria-checked` will be either `true`, `false` or `mixed`.\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton :model-value.sync=\"handRaised\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise hand\n\t\t</NcActionButton>\n\t\t<NcActionButton :model-value.sync=\"fullscreen\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<Fullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft.vue'\nimport Fullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t\thandRaised: false,\n\t\t}\n\t},\n}\n</script>\n```\n\nIt is also possible to use the button with radio semantics, this is only possible in menus and not for inline actions!\n\nWith a string `modelValue`, checked state is determined by the `value` property and updates `modelValue` with the new `value` string.\n\nWith a boolean `modelValue`, checked state is determined by `modelValue` and updates to `true` on check.\n\nNote: unlike native radio buttons, `NcActionButton` are not grouped by name, so you need to connect them by bind correct `modelValue``.\n\n```vue\n<template>\n\t<div>\n\t\t<NcActions>\n\t\t\t<NcActionButton :model-value.sync=\"payment\" type=\"radio\" value=\"cash\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Cash :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay with cash\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :model-value.sync=\"payment\" type=\"radio\" value=\"card\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<CreditCard :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay by card\n\t\t\t</NcActionButton>\n\t\t\t<NcActionSeparator />\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isLeft\" @update:modelValue=\"setAlign('Left', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignLeft :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tLeft\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isCenter\" @update:modelValue=\"setAlign('Center', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignCenter :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCenter\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isRight\" @update:modelValue=\"setAlign('Right', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignRight :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tRight\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t\t<p>payment = \"{{ payment }}\"</p>\n\t\t<p>align.isLeft = {{ align.isLeft }}</p>\n\t\t<p>align.isCenter = {{ align.isCenter }}</p>\n\t\t<p>align.isRight = {{ align.isRight }}</p>\n\t</div>\n</template>\n<script>\nimport Cash from 'vue-material-design-icons/Cash.vue'\nimport CreditCard from 'vue-material-design-icons/CreditCard.vue'\nimport FormatAlignLeft from 'vue-material-design-icons/FormatAlignLeft.vue'\nimport FormatAlignCenter from 'vue-material-design-icons/FormatAlignCenter.vue'\nimport FormatAlignRight from 'vue-material-design-icons/FormatAlignRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tCash,\n\t\tCreditCard,\n\t\tFormatAlignLeft,\n\t\tFormatAlignCenter,\n\t\tFormatAlignRight,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpayment: 'card',\n\t\t\talign: {\n\t\t\t\tisLeft: false,\n\t\t\t\tisCenter: true,\n\t\t\t\tisRight: false,\n\t\t\t},\n\t\t}\n\t},\n\tmethods: {\n\t\tsetAlign(direction, value) {\n\t\t\tthis.align.isLeft = false\n\t\t\tthis.align.isCenter = false\n\t\t\tthis.align.isRight = false\n\t\t\tthis.align[`is${direction}`] = value\n\t\t},\n\t}\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"{ 'action--disabled': disabled }\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<button :aria-label=\"ariaLabel\"\n\t\t\t:class=\"['action-button button-vue', {\n\t\t\t\t'action-button--active': isChecked,\n\t\t\t\tfocusable: isFocusable,\n\t\t\t}]\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:title=\"title\"\n\t\t\t:type=\"nativeType\"\n\t\t\tv-bind=\"buttonAttributes\"\n\t\t\t@click=\"handleClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span :class=\"[isIconUrl ? 'action-button__icon--url' : icon]\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"action-button__icon\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<span class=\"action-button__longtext-wrapper\">\n\t\t\t\t<strong v-if=\"name\"\n\t\t\t\t\tclass=\"action-button__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span v-if=\"isLongText\"\n\t\t\t\t\tclass=\"action-button__longtext\"\n\t\t\t\t\tv-text=\"text\" />\n\t\t\t\t<!-- default text display -->\n\t\t\t\t<span v-else\n\t\t\t\t\tclass=\"action-button__text\">\n\t\t\t\t\t{{ text }}\n\t\t\t\t</span>\n\t\t\t\t<span v-if=\"description\"\n\t\t\t\t\tclass=\"action-button__description\"\n\t\t\t\t\tv-text=\"description\" />\n\t\t\t</span>\n\n\t\t\t<!-- right(in LTR) or left(in RTL) arrow icon when there is a sub-menu -->\n\t\t\t<NcIconSvgWrapper v-if=\"isMenu\"\n\t\t\t\tclass=\"action-button__menu-icon\"\n\t\t\t\tdirectional\n\t\t\t\t:path=\"mdiChevronRight\" />\n\t\t\t<NcIconSvgWrapper v-else-if=\"isChecked\" :path=\"mdiCheck\" class=\"action-button__pressed-icon\" />\n\n\t\t\t<span v-else-if=\"isChecked === false\" class=\"action-button__pressed-icon material-design-icon\" />\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</button>\n\t</li>\n</template>\n\n<script>\nimport { mdiCheck, mdiChevronRight } from '@mdi/js'\nimport ActionTextMixin from '../../mixins/actionText.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\n\n/**\n * Button component to be used in Actions\n */\nexport default {\n\tname: 'NcActionButton',\n\n\tcomponents: {\n\t\tNcIconSvgWrapper,\n\t},\n\tmixins: [ActionTextMixin],\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: 'NcActions:isSemanticMenu',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.\n\t\t * @todo Add a check in @nextcloud/vue 9 that this prop is not provided,\n\t\t * otherwise root element will inherit incorrect aria-hidden.\n\t\t */\n\t\tariaHidden: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the action button\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * If this is a menu, a chevron icon will\n\t\t * be added at the end of the line\n\t\t */\n\t\tisMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The button's behavior, by default the button acts like a normal button with optional toggle button behavior if `modelValue` is `true` or `false`.\n\t\t * But you can also set to checkbox button behavior with tri-state or radio button like behavior.\n\t\t * This extends the native HTML button type attribute.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'button',\n\t\t\tvalidator: (behavior) => ['button', 'checkbox', 'radio', 'reset', 'submit'].includes(behavior),\n\t\t},\n\n\t\t/**\n\t\t * The buttons state if `type` is 'checkbox' or 'radio' (meaning if it is pressed / selected).\n\t\t * For checkbox and toggle button behavior - boolean value.\n\t\t * For radio button behavior - could be a boolean checked or a string with the value of the button.\n\t\t * Note: Unlike native radio buttons, NcActionButton are not grouped by name, so you need to connect them by bind correct modelValue.\n\t\t *\n\t\t * **This is not availabe for `type='submit'` or `type='reset'`**\n\t\t *\n\t\t * If using `type='checkbox'` a `model-value` of `true` means checked, `false` means unchecked and `null` means indeterminate (tri-state)\n\t\t * For `type='radio'` `null` is equal to `false`\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The value used for the `modelValue` when this component is used with radio behavior\n\t\t * Similar to the `value` attribute of `<input type=\"radio\">`\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Small underlying text content of the entry\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\tsetup() {\n\t\treturn {\n\t\t\tmdiCheck,\n\t\t\tmdiChevronRight,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\n\t\t/**\n\t\t * The current \"checked\" or \"pressed\" state for the model behavior\n\t\t */\n\t\tisChecked() {\n\t\t\tif (this.type === 'radio' && typeof this.modelValue !== 'boolean') {\n\t\t\t\treturn this.modelValue === this.value\n\t\t\t}\n\t\t\treturn this.modelValue\n\t\t},\n\n\t\t/**\n\t\t * The native HTML type to set on the button\n\t\t */\n\t\tnativeType() {\n\t\t\tif (this.type === 'submit' || this.type === 'reset') {\n\t\t\t\treturn this.type\n\t\t\t}\n\t\t\treturn 'button'\n\t\t},\n\n\t\t/**\n\t\t * HTML attributes to bind to the <button>\n\t\t */\n\t\tbuttonAttributes() {\n\t\t\tconst attributes = {}\n\n\t\t\tif (this.isInSemanticMenu) {\n\t\t\t\t// By default it needs to be a menu item in semantic menus\n\t\t\t\tattributes.role = 'menuitem'\n\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tattributes.role = 'menuitemradio'\n\t\t\t\t\tattributes['aria-checked'] = this.isChecked ? 'true' : 'false'\n\t\t\t\t} else if (this.type === 'checkbox' || (this.nativeType === 'button' && this.modelValue !== null)) {\n\t\t\t\t\t// either if checkbox behavior was set or the model value is not unset\n\t\t\t\t\tattributes.role = 'menuitemcheckbox'\n\t\t\t\t\tattributes['aria-checked'] = this.modelValue === null ? 'mixed' : (this.modelValue ? 'true' : 'false')\n\t\t\t\t}\n\t\t\t} else if (this.modelValue !== null && this.nativeType === 'button') {\n\t\t\t\t// In case this has a modelValue it is considered a toggle button, so we need to set the aria-pressed\n\t\t\t\tattributes['aria-pressed'] = this.modelValue ? 'true' : 'false'\n\t\t\t}\n\n\t\t\treturn attributes\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Forward click event, let mixin handle the close-after-click and emit new modelValue if needed\n\t\t * @param {MouseEvent} event The click event\n\t\t */\n\t\thandleClick(event) {\n\t\t\tthis.onClick(event)\n\t\t\t// If modelValue or type is set (so modelValue might be null for tri-state) we need to update it\n\t\t\tif (this.modelValue !== null || this.type !== 'button') {\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tif (typeof this.modelValue !== 'boolean') {\n\t\t\t\t\t\t// String-value radios behavior is similar to native - click on checked radio does nothing\n\t\t\t\t\t\tif (!this.isChecked) {\n\t\t\t\t\t\t\tthis.$emit('update:modelValue', this.value)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Boolean radio allows to uncheck\n\t\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Checkbox toggles value\n\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../../assets/action';\n@include action-active;\n@include action--disabled;\n@include action-item('button');\n\n.action-button {\n\t&__pressed-icon {\n\t\tmargin-inline: auto calc($icon-margin * -1);\n\t}\n\n\t* {\n\t\tcursor: p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BAAA,CAAA,KAAA,SAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import '../assets/NcActionButton-D8Lyueq3.css';
2
- import { m as mdiChevronRight, a as mdiCheck } from "./mdi-C1L0jZ1V.mjs";
2
+ import { m as mdiChevronRight, a as mdiCheck } from "./mdi-vLkDaZ9y.mjs";
3
3
  import { A as ActionTextMixin } from "./actionText-fFcUPi2g.mjs";
4
4
  import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-Cb-cPj1R.mjs";
5
5
  import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
@@ -179,4 +179,4 @@ const NcActionButton = __component__.exports;
179
179
  export {
180
180
  NcActionButton as N
181
181
  };
182
- //# sourceMappingURL=NcActionButton-CpGK6gSX.mjs.map
182
+ //# sourceMappingURL=NcActionButton-CHrE7amZ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcActionButton-CpGK6gSX.mjs","sources":["../../src/components/NcActionButton/NcActionButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :close-after-click=\"true\" @click=\"showMessage('Delete and close menu')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete and close\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :is-menu=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCreate\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :disabled=\"true\" @click=\"showMessage('Disabled')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDisabled button\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\nIf you're using a long text, you can specify a `name` prop.\n\nFor the same purpose, but in a more compact way, `description` prop can be used.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton name=\"Long button\" @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis button is associated with a very long text.\\nAnd with new lines too.\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton description=\"Subline description for the button\" @click=\"showMessage('Edit')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tEdit\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Pencil from 'vue-material-design-icons/Pencil.vue'\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPencil,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nAction icon attribute with a single action\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nYou can also use a custom icon, for example from the vue-material-design-icons library:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise left hand\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise right hand\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft.vue'\nimport HandBackRight from 'vue-material-design-icons/HandBackRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tHandBackRight,\n\t},\n}\n</script>\n```\n\n### With different model behavior\nBy default the button will act like a normal button, but it is also possible to change the behavior to a toggle button, checkbox button or radio button.\n\nFor example to have the button act like a toggle button just set the `modelValue` property to the toggle state:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton :model-value.sync=\"fullscreen\">\n\t\t\t<template #icon>\n\t\t\t\t<Fullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport Fullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t}\n\t},\n}\n</script>\n```\n\nAnother example would be using it with checkbox semantics, to enable or disable features.\nThis also allows tri-state behavior (`true`, `false`, `null`) in which case `aria-checked` will be either `true`, `false` or `mixed`.\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton :model-value.sync=\"handRaised\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise hand\n\t\t</NcActionButton>\n\t\t<NcActionButton :model-value.sync=\"fullscreen\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<Fullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft.vue'\nimport Fullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t\thandRaised: false,\n\t\t}\n\t},\n}\n</script>\n```\n\nIt is also possible to use the button with radio semantics, this is only possible in menus and not for inline actions!\n\nWith a string `modelValue`, checked state is determined by the `value` property and updates `modelValue` with the new `value` string.\n\nWith a boolean `modelValue`, checked state is determined by `modelValue` and updates to `true` on check.\n\nNote: unlike native radio buttons, `NcActionButton` are not grouped by name, so you need to connect them by bind correct `modelValue``.\n\n```vue\n<template>\n\t<div>\n\t\t<NcActions>\n\t\t\t<NcActionButton :model-value.sync=\"payment\" type=\"radio\" value=\"cash\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Cash :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay with cash\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :model-value.sync=\"payment\" type=\"radio\" value=\"card\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<CreditCard :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay by card\n\t\t\t</NcActionButton>\n\t\t\t<NcActionSeparator />\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isLeft\" @update:modelValue=\"setAlign('Left', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignLeft :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tLeft\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isCenter\" @update:modelValue=\"setAlign('Center', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignCenter :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCenter\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isRight\" @update:modelValue=\"setAlign('Right', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignRight :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tRight\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t\t<p>payment = \"{{ payment }}\"</p>\n\t\t<p>align.isLeft = {{ align.isLeft }}</p>\n\t\t<p>align.isCenter = {{ align.isCenter }}</p>\n\t\t<p>align.isRight = {{ align.isRight }}</p>\n\t</div>\n</template>\n<script>\nimport Cash from 'vue-material-design-icons/Cash.vue'\nimport CreditCard from 'vue-material-design-icons/CreditCard.vue'\nimport FormatAlignLeft from 'vue-material-design-icons/FormatAlignLeft.vue'\nimport FormatAlignCenter from 'vue-material-design-icons/FormatAlignCenter.vue'\nimport FormatAlignRight from 'vue-material-design-icons/FormatAlignRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tCash,\n\t\tCreditCard,\n\t\tFormatAlignLeft,\n\t\tFormatAlignCenter,\n\t\tFormatAlignRight,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpayment: 'card',\n\t\t\talign: {\n\t\t\t\tisLeft: false,\n\t\t\t\tisCenter: true,\n\t\t\t\tisRight: false,\n\t\t\t},\n\t\t}\n\t},\n\tmethods: {\n\t\tsetAlign(direction, value) {\n\t\t\tthis.align.isLeft = false\n\t\t\tthis.align.isCenter = false\n\t\t\tthis.align.isRight = false\n\t\t\tthis.align[`is${direction}`] = value\n\t\t},\n\t}\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"{ 'action--disabled': disabled }\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<button :aria-label=\"ariaLabel\"\n\t\t\t:class=\"['action-button button-vue', {\n\t\t\t\t'action-button--active': isChecked,\n\t\t\t\tfocusable: isFocusable,\n\t\t\t}]\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:title=\"title\"\n\t\t\t:type=\"nativeType\"\n\t\t\tv-bind=\"buttonAttributes\"\n\t\t\t@click=\"handleClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span :class=\"[isIconUrl ? 'action-button__icon--url' : icon]\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"action-button__icon\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<span class=\"action-button__longtext-wrapper\">\n\t\t\t\t<strong v-if=\"name\"\n\t\t\t\t\tclass=\"action-button__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span v-if=\"isLongText\"\n\t\t\t\t\tclass=\"action-button__longtext\"\n\t\t\t\t\tv-text=\"text\" />\n\t\t\t\t<!-- default text display -->\n\t\t\t\t<span v-else\n\t\t\t\t\tclass=\"action-button__text\">\n\t\t\t\t\t{{ text }}\n\t\t\t\t</span>\n\t\t\t\t<span v-if=\"description\"\n\t\t\t\t\tclass=\"action-button__description\"\n\t\t\t\t\tv-text=\"description\" />\n\t\t\t</span>\n\n\t\t\t<!-- right(in LTR) or left(in RTL) arrow icon when there is a sub-menu -->\n\t\t\t<NcIconSvgWrapper v-if=\"isMenu\"\n\t\t\t\tclass=\"action-button__menu-icon\"\n\t\t\t\tdirectional\n\t\t\t\t:path=\"mdiChevronRight\" />\n\t\t\t<NcIconSvgWrapper v-else-if=\"isChecked\" :path=\"mdiCheck\" class=\"action-button__pressed-icon\" />\n\n\t\t\t<span v-else-if=\"isChecked === false\" class=\"action-button__pressed-icon material-design-icon\" />\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</button>\n\t</li>\n</template>\n\n<script>\nimport { mdiCheck, mdiChevronRight } from '@mdi/js'\nimport ActionTextMixin from '../../mixins/actionText.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\n\n/**\n * Button component to be used in Actions\n */\nexport default {\n\tname: 'NcActionButton',\n\n\tcomponents: {\n\t\tNcIconSvgWrapper,\n\t},\n\tmixins: [ActionTextMixin],\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: 'NcActions:isSemanticMenu',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.\n\t\t * @todo Add a check in @nextcloud/vue 9 that this prop is not provided,\n\t\t * otherwise root element will inherit incorrect aria-hidden.\n\t\t */\n\t\tariaHidden: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the action button\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * If this is a menu, a chevron icon will\n\t\t * be added at the end of the line\n\t\t */\n\t\tisMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The button's behavior, by default the button acts like a normal button with optional toggle button behavior if `modelValue` is `true` or `false`.\n\t\t * But you can also set to checkbox button behavior with tri-state or radio button like behavior.\n\t\t * This extends the native HTML button type attribute.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'button',\n\t\t\tvalidator: (behavior) => ['button', 'checkbox', 'radio', 'reset', 'submit'].includes(behavior),\n\t\t},\n\n\t\t/**\n\t\t * The buttons state if `type` is 'checkbox' or 'radio' (meaning if it is pressed / selected).\n\t\t * For checkbox and toggle button behavior - boolean value.\n\t\t * For radio button behavior - could be a boolean checked or a string with the value of the button.\n\t\t * Note: Unlike native radio buttons, NcActionButton are not grouped by name, so you need to connect them by bind correct modelValue.\n\t\t *\n\t\t * **This is not availabe for `type='submit'` or `type='reset'`**\n\t\t *\n\t\t * If using `type='checkbox'` a `model-value` of `true` means checked, `false` means unchecked and `null` means indeterminate (tri-state)\n\t\t * For `type='radio'` `null` is equal to `false`\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The value used for the `modelValue` when this component is used with radio behavior\n\t\t * Similar to the `value` attribute of `<input type=\"radio\">`\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Small underlying text content of the entry\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\tsetup() {\n\t\treturn {\n\t\t\tmdiCheck,\n\t\t\tmdiChevronRight,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\n\t\t/**\n\t\t * The current \"checked\" or \"pressed\" state for the model behavior\n\t\t */\n\t\tisChecked() {\n\t\t\tif (this.type === 'radio' && typeof this.modelValue !== 'boolean') {\n\t\t\t\treturn this.modelValue === this.value\n\t\t\t}\n\t\t\treturn this.modelValue\n\t\t},\n\n\t\t/**\n\t\t * The native HTML type to set on the button\n\t\t */\n\t\tnativeType() {\n\t\t\tif (this.type === 'submit' || this.type === 'reset') {\n\t\t\t\treturn this.type\n\t\t\t}\n\t\t\treturn 'button'\n\t\t},\n\n\t\t/**\n\t\t * HTML attributes to bind to the <button>\n\t\t */\n\t\tbuttonAttributes() {\n\t\t\tconst attributes = {}\n\n\t\t\tif (this.isInSemanticMenu) {\n\t\t\t\t// By default it needs to be a menu item in semantic menus\n\t\t\t\tattributes.role = 'menuitem'\n\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tattributes.role = 'menuitemradio'\n\t\t\t\t\tattributes['aria-checked'] = this.isChecked ? 'true' : 'false'\n\t\t\t\t} else if (this.type === 'checkbox' || (this.nativeType === 'button' && this.modelValue !== null)) {\n\t\t\t\t\t// either if checkbox behavior was set or the model value is not unset\n\t\t\t\t\tattributes.role = 'menuitemcheckbox'\n\t\t\t\t\tattributes['aria-checked'] = this.modelValue === null ? 'mixed' : (this.modelValue ? 'true' : 'false')\n\t\t\t\t}\n\t\t\t} else if (this.modelValue !== null && this.nativeType === 'button') {\n\t\t\t\t// In case this has a modelValue it is considered a toggle button, so we need to set the aria-pressed\n\t\t\t\tattributes['aria-pressed'] = this.modelValue ? 'true' : 'false'\n\t\t\t}\n\n\t\t\treturn attributes\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Forward click event, let mixin handle the close-after-click and emit new modelValue if needed\n\t\t * @param {MouseEvent} event The click event\n\t\t */\n\t\thandleClick(event) {\n\t\t\tthis.onClick(event)\n\t\t\t// If modelValue or type is set (so modelValue might be null for tri-state) we need to update it\n\t\t\tif (this.modelValue !== null || this.type !== 'button') {\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tif (typeof this.modelValue !== 'boolean') {\n\t\t\t\t\t\t// String-value radios behavior is similar to native - click on checked radio does nothing\n\t\t\t\t\t\tif (!this.isChecked) {\n\t\t\t\t\t\t\tthis.$emit('update:modelValue', this.value)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Boolean radio allows to uncheck\n\t\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Checkbox toggles value\n\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../../assets/action';\n@include action-active;\n@include action--disabled;\n@include action-item('button');\n\n.action-button {\n\t&__pressed-icon {\n\t\tmargin-inline: auto calc($icon-margin * -1);\n\t}\n\n\t* {\n\t\tcursor: pointer;\n\t}\n}\n</style>\n"],"names":[],"mappings":";;;;AAoYA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,QAAA,CAAA,eAAA;AAAA,EAEA,QAAA;AAAA,IACA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,aAAA,CAAA,UAAA,YAAA,SAAA,SAAA,QAAA,EAAA,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AA,cAAA,IAAA,KAAA,aAAA,SAAA;AAAA,MACA;AAEA,aAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA,OAAA;AACA,WAAA,QAAA,KAAA;AAEA,UAAA,KAAA,eAAA,QAAA,KAAA,SAAA,UAAA;AACA,YAAA,KAAA,SAAA,SAAA;AACA,cAAA,OAAA,KAAA,eAAA,WAAA;AAEA,gBAAA,CAAA,KAAA,WAAA;AACA,mBAAA,MAAA,qBAAA,KAAA,KAAA;AAAA,YACA;AAAA,UACA,OAAA;AAEA,iBAAA,MAAA,qBAAA,CAAA,KAAA,SAAA;AAAA,UACA;AAAA,QACA,OAAA;AAEA,eAAA,MAAA,qBAAA,CAAA,KAAA,SAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcActionButton-CHrE7amZ.mjs","sources":["../../src/components/NcActionButton/NcActionButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :close-after-click=\"true\" @click=\"showMessage('Delete and close menu')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDelete and close\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :is-menu=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCreate\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :disabled=\"true\" @click=\"showMessage('Disabled')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tDisabled button\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\nIf you're using a long text, you can specify a `name` prop.\n\nFor the same purpose, but in a more compact way, `description` prop can be used.\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton name=\"Long button\" @click=\"showMessage('Delete')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tThis button is associated with a very long text.\\nAnd with new lines too.\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton description=\"Subline description for the button\" @click=\"showMessage('Edit')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tEdit\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport Pencil from 'vue-material-design-icons/Pencil.vue'\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tDelete,\n\t\t\tPencil,\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nAction icon attribute with a single action\n\n```vue\n\t<template>\n\t\t<NcActions>\n\t\t\t<NcActionButton @click=\"showMessage('Add')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tAdd new\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</template>\n\t<script>\n\timport Plus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tPlus,\n\t\t},\n\t\tmethods: {\n\t\t\tshowMessage(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n\n```\n\nYou can also use a custom icon, for example from the vue-material-design-icons library:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise left hand\n\t\t</NcActionButton>\n\t\t<NcActionButton>\n\t\t\t<template #icon>\n\t\t\t\t<HandBackRight :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise right hand\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft.vue'\nimport HandBackRight from 'vue-material-design-icons/HandBackRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tHandBackRight,\n\t},\n}\n</script>\n```\n\n### With different model behavior\nBy default the button will act like a normal button, but it is also possible to change the behavior to a toggle button, checkbox button or radio button.\n\nFor example to have the button act like a toggle button just set the `modelValue` property to the toggle state:\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton :model-value.sync=\"fullscreen\">\n\t\t\t<template #icon>\n\t\t\t\t<Fullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport Fullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t}\n\t},\n}\n</script>\n```\n\nAnother example would be using it with checkbox semantics, to enable or disable features.\nThis also allows tri-state behavior (`true`, `false`, `null`) in which case `aria-checked` will be either `true`, `false` or `mixed`.\n\n```vue\n<template>\n\t<NcActions>\n\t\t<NcActionButton :model-value.sync=\"handRaised\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<HandBackLeft :size=\"20\" />\n\t\t\t</template>\n\t\t\tRaise hand\n\t\t</NcActionButton>\n\t\t<NcActionButton :model-value.sync=\"fullscreen\" type=\"checkbox\">\n\t\t\t<template #icon>\n\t\t\t\t<Fullscreen :size=\"20\" />\n\t\t\t</template>\n\t\t\tFullscreen\n\t\t</NcActionButton>\n\t</NcActions>\n</template>\n<script>\nimport HandBackLeft from 'vue-material-design-icons/HandBackLeft.vue'\nimport Fullscreen from 'vue-material-design-icons/Fullscreen.vue'\n\nexport default {\n\tcomponents: {\n\t\tHandBackLeft,\n\t\tFullscreen,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfullscreen: true,\n\t\t\thandRaised: false,\n\t\t}\n\t},\n}\n</script>\n```\n\nIt is also possible to use the button with radio semantics, this is only possible in menus and not for inline actions!\n\nWith a string `modelValue`, checked state is determined by the `value` property and updates `modelValue` with the new `value` string.\n\nWith a boolean `modelValue`, checked state is determined by `modelValue` and updates to `true` on check.\n\nNote: unlike native radio buttons, `NcActionButton` are not grouped by name, so you need to connect them by bind correct `modelValue``.\n\n```vue\n<template>\n\t<div>\n\t\t<NcActions>\n\t\t\t<NcActionButton :model-value.sync=\"payment\" type=\"radio\" value=\"cash\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Cash :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay with cash\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton :model-value.sync=\"payment\" type=\"radio\" value=\"card\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<CreditCard :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tPay by card\n\t\t\t</NcActionButton>\n\t\t\t<NcActionSeparator />\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isLeft\" @update:modelValue=\"setAlign('Left', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignLeft :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tLeft\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isCenter\" @update:modelValue=\"setAlign('Center', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignCenter :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tCenter\n\t\t\t</NcActionButton>\n\t\t\t<NcActionButton type=\"radio\" :model-value=\"align.isRight\" @update:modelValue=\"setAlign('Right', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<FormatAlignRight :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tRight\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t\t<p>payment = \"{{ payment }}\"</p>\n\t\t<p>align.isLeft = {{ align.isLeft }}</p>\n\t\t<p>align.isCenter = {{ align.isCenter }}</p>\n\t\t<p>align.isRight = {{ align.isRight }}</p>\n\t</div>\n</template>\n<script>\nimport Cash from 'vue-material-design-icons/Cash.vue'\nimport CreditCard from 'vue-material-design-icons/CreditCard.vue'\nimport FormatAlignLeft from 'vue-material-design-icons/FormatAlignLeft.vue'\nimport FormatAlignCenter from 'vue-material-design-icons/FormatAlignCenter.vue'\nimport FormatAlignRight from 'vue-material-design-icons/FormatAlignRight.vue'\n\nexport default {\n\tcomponents: {\n\t\tCash,\n\t\tCreditCard,\n\t\tFormatAlignLeft,\n\t\tFormatAlignCenter,\n\t\tFormatAlignRight,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpayment: 'card',\n\t\t\talign: {\n\t\t\t\tisLeft: false,\n\t\t\t\tisCenter: true,\n\t\t\t\tisRight: false,\n\t\t\t},\n\t\t}\n\t},\n\tmethods: {\n\t\tsetAlign(direction, value) {\n\t\t\tthis.align.isLeft = false\n\t\t\tthis.align.isCenter = false\n\t\t\tthis.align.isRight = false\n\t\t\tthis.align[`is${direction}`] = value\n\t\t},\n\t}\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"action\" :class=\"{ 'action--disabled': disabled }\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<button :aria-label=\"ariaLabel\"\n\t\t\t:class=\"['action-button button-vue', {\n\t\t\t\t'action-button--active': isChecked,\n\t\t\t\tfocusable: isFocusable,\n\t\t\t}]\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:title=\"title\"\n\t\t\t:type=\"nativeType\"\n\t\t\tv-bind=\"buttonAttributes\"\n\t\t\t@click=\"handleClick\">\n\t\t\t<!-- @slot Manually provide icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<span :class=\"[isIconUrl ? 'action-button__icon--url' : icon]\"\n\t\t\t\t\t:style=\"{ backgroundImage: isIconUrl ? `url(${icon})` : null }\"\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tclass=\"action-button__icon\" />\n\t\t\t</slot>\n\n\t\t\t<!-- long text with name -->\n\t\t\t<span class=\"action-button__longtext-wrapper\">\n\t\t\t\t<strong v-if=\"name\"\n\t\t\t\t\tclass=\"action-button__name\">\n\t\t\t\t\t{{ name }}\n\t\t\t\t</strong>\n\t\t\t\t<!-- white space is shown on longtext, so we can't\n\t\t\t\t\tput {{ text }} on a new line for code readability -->\n\t\t\t\t<span v-if=\"isLongText\"\n\t\t\t\t\tclass=\"action-button__longtext\"\n\t\t\t\t\tv-text=\"text\" />\n\t\t\t\t<!-- default text display -->\n\t\t\t\t<span v-else\n\t\t\t\t\tclass=\"action-button__text\">\n\t\t\t\t\t{{ text }}\n\t\t\t\t</span>\n\t\t\t\t<span v-if=\"description\"\n\t\t\t\t\tclass=\"action-button__description\"\n\t\t\t\t\tv-text=\"description\" />\n\t\t\t</span>\n\n\t\t\t<!-- right(in LTR) or left(in RTL) arrow icon when there is a sub-menu -->\n\t\t\t<NcIconSvgWrapper v-if=\"isMenu\"\n\t\t\t\tclass=\"action-button__menu-icon\"\n\t\t\t\tdirectional\n\t\t\t\t:path=\"mdiChevronRight\" />\n\t\t\t<NcIconSvgWrapper v-else-if=\"isChecked\" :path=\"mdiCheck\" class=\"action-button__pressed-icon\" />\n\n\t\t\t<span v-else-if=\"isChecked === false\" class=\"action-button__pressed-icon material-design-icon\" />\n\n\t\t\t<!-- fake slot to gather inner text -->\n\t\t\t<slot v-if=\"false\" />\n\t\t</button>\n\t</li>\n</template>\n\n<script>\nimport { mdiCheck, mdiChevronRight } from '@mdi/js'\nimport ActionTextMixin from '../../mixins/actionText.js'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\n\n/**\n * Button component to be used in Actions\n */\nexport default {\n\tname: 'NcActionButton',\n\n\tcomponents: {\n\t\tNcIconSvgWrapper,\n\t},\n\tmixins: [ActionTextMixin],\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: 'NcActions:isSemanticMenu',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * @deprecated To be removed in @nextcloud/vue 9. Migration guide: remove ariaHidden prop from NcAction* components.\n\t\t * @todo Add a check in @nextcloud/vue 9 that this prop is not provided,\n\t\t * otherwise root element will inherit incorrect aria-hidden.\n\t\t */\n\t\tariaHidden: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * disabled state of the action button\n\t\t */\n\t\tdisabled: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * If this is a menu, a chevron icon will\n\t\t * be added at the end of the line\n\t\t */\n\t\tisMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The button's behavior, by default the button acts like a normal button with optional toggle button behavior if `modelValue` is `true` or `false`.\n\t\t * But you can also set to checkbox button behavior with tri-state or radio button like behavior.\n\t\t * This extends the native HTML button type attribute.\n\t\t */\n\t\ttype: {\n\t\t\ttype: String,\n\t\t\tdefault: 'button',\n\t\t\tvalidator: (behavior) => ['button', 'checkbox', 'radio', 'reset', 'submit'].includes(behavior),\n\t\t},\n\n\t\t/**\n\t\t * The buttons state if `type` is 'checkbox' or 'radio' (meaning if it is pressed / selected).\n\t\t * For checkbox and toggle button behavior - boolean value.\n\t\t * For radio button behavior - could be a boolean checked or a string with the value of the button.\n\t\t * Note: Unlike native radio buttons, NcActionButton are not grouped by name, so you need to connect them by bind correct modelValue.\n\t\t *\n\t\t * **This is not availabe for `type='submit'` or `type='reset'`**\n\t\t *\n\t\t * If using `type='checkbox'` a `model-value` of `true` means checked, `false` means unchecked and `null` means indeterminate (tri-state)\n\t\t * For `type='radio'` `null` is equal to `false`\n\t\t */\n\t\tmodelValue: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * The value used for the `modelValue` when this component is used with radio behavior\n\t\t * Similar to the `value` attribute of `<input type=\"radio\">`\n\t\t */\n\t\tvalue: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Small underlying text content of the entry\n\t\t */\n\t\tdescription: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\tsetup() {\n\t\treturn {\n\t\t\tmdiCheck,\n\t\t\tmdiChevronRight,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * determines if the action is focusable\n\t\t *\n\t\t * @return {boolean} is the action focusable ?\n\t\t */\n\t\tisFocusable() {\n\t\t\treturn !this.disabled\n\t\t},\n\n\t\t/**\n\t\t * The current \"checked\" or \"pressed\" state for the model behavior\n\t\t */\n\t\tisChecked() {\n\t\t\tif (this.type === 'radio' && typeof this.modelValue !== 'boolean') {\n\t\t\t\treturn this.modelValue === this.value\n\t\t\t}\n\t\t\treturn this.modelValue\n\t\t},\n\n\t\t/**\n\t\t * The native HTML type to set on the button\n\t\t */\n\t\tnativeType() {\n\t\t\tif (this.type === 'submit' || this.type === 'reset') {\n\t\t\t\treturn this.type\n\t\t\t}\n\t\t\treturn 'button'\n\t\t},\n\n\t\t/**\n\t\t * HTML attributes to bind to the <button>\n\t\t */\n\t\tbuttonAttributes() {\n\t\t\tconst attributes = {}\n\n\t\t\tif (this.isInSemanticMenu) {\n\t\t\t\t// By default it needs to be a menu item in semantic menus\n\t\t\t\tattributes.role = 'menuitem'\n\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tattributes.role = 'menuitemradio'\n\t\t\t\t\tattributes['aria-checked'] = this.isChecked ? 'true' : 'false'\n\t\t\t\t} else if (this.type === 'checkbox' || (this.nativeType === 'button' && this.modelValue !== null)) {\n\t\t\t\t\t// either if checkbox behavior was set or the model value is not unset\n\t\t\t\t\tattributes.role = 'menuitemcheckbox'\n\t\t\t\t\tattributes['aria-checked'] = this.modelValue === null ? 'mixed' : (this.modelValue ? 'true' : 'false')\n\t\t\t\t}\n\t\t\t} else if (this.modelValue !== null && this.nativeType === 'button') {\n\t\t\t\t// In case this has a modelValue it is considered a toggle button, so we need to set the aria-pressed\n\t\t\t\tattributes['aria-pressed'] = this.modelValue ? 'true' : 'false'\n\t\t\t}\n\n\t\t\treturn attributes\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Forward click event, let mixin handle the close-after-click and emit new modelValue if needed\n\t\t * @param {MouseEvent} event The click event\n\t\t */\n\t\thandleClick(event) {\n\t\t\tthis.onClick(event)\n\t\t\t// If modelValue or type is set (so modelValue might be null for tri-state) we need to update it\n\t\t\tif (this.modelValue !== null || this.type !== 'button') {\n\t\t\t\tif (this.type === 'radio') {\n\t\t\t\t\tif (typeof this.modelValue !== 'boolean') {\n\t\t\t\t\t\t// String-value radios behavior is similar to native - click on checked radio does nothing\n\t\t\t\t\t\tif (!this.isChecked) {\n\t\t\t\t\t\t\tthis.$emit('update:modelValue', this.value)\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Boolean radio allows to uncheck\n\t\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Checkbox toggles value\n\t\t\t\t\tthis.$emit('update:modelValue', !this.isChecked)\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n@import '../../assets/action';\n@include action-active;\n@include action--disabled;\n@include action-item('button');\n\n.action-button {\n\t&__pressed-icon {\n\t\tmargin-inline: auto calc($icon-margin * -1);\n\t}\n\n\t* {\n\t\tcursor: pointer;\n\t}\n}\n</style>\n"],"names":[],"mappings":";;;;AAoYA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,EACA;AAAA,EACA,QAAA,CAAA,eAAA;AAAA,EAEA,QAAA;AAAA,IACA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,YAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,QAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,aAAA,CAAA,UAAA,YAAA,SAAA,SAAA,QAAA,EAAA,SAAA,QAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA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AEA,aAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA,YAAA,OAAA;AACA,WAAA,QAAA,KAAA;AAEA,UAAA,KAAA,eAAA,QAAA,KAAA,SAAA,UAAA;AACA,YAAA,KAAA,SAAA,SAAA;AACA,cAAA,OAAA,KAAA,eAAA,WAAA;AAEA,gBAAA,CAAA,KAAA,WAAA;AACA,mBAAA,MAAA,qBAAA,KAAA,KAAA;AAAA,YACA;AAAA,UACA,OAAA;AAEA,iBAAA,MAAA,qBAAA,CAAA,KAAA,SAAA;AAAA,UACA;AAAA,QACA,OAAA;AAEA,eAAA,MAAA,qBAAA,CAAA,KAAA,SAAA;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ require('../assets/NcActionButtonGroup-BND4GQdv.css');
2
2
  "use strict";
3
3
  const Vue = require("vue");
4
4
  const GenRandomId = require("./GenRandomId-BQDud3d4.cjs");
5
- const _l10n = require("./_l10n-CXXSIoEf.cjs");
5
+ const _l10n = require("./_l10n-DpwcsAC3.cjs");
6
6
  const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
7
7
  _l10n.register();
8
8
  const _sfc_main = Vue.defineComponent({
@@ -48,4 +48,4 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
48
48
  );
49
49
  const NcActionButtonGroup = __component__.exports;
50
50
  exports.NcActionButtonGroup = NcActionButtonGroup;
51
- //# sourceMappingURL=NcActionButtonGroup-qRIt-It4.cjs.map
51
+ //# sourceMappingURL=NcActionButtonGroup-B8Bj-Qb3.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcActionButtonGroup-qRIt-It4.cjs","sources":["../../src/components/NcActionButtonGroup/NcActionButtonGroup.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots,\nto group buttons as one visual action, like for text alignment.\nThis should be used sparingly for accessibility.\n\n```vue\n<template>\n\t<div style=\"display: flex; align-items: center;\">\n\t\t<NcActions>\n\t\t\t<NcActionButtonGroup name=\"Text alignment\">\n\t\t\t\t<NcActionButton aria-label=\"Align left\"\n\t\t\t\t\t:model-value.sync=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"l\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlignLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton aria-label=\"Align center\"\n\t\t\t\t\t:model-value.sync=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"c\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlignCenter :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton aria-label=\"Align right\"\n\t\t\t\t\t:model-value.sync=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"r\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlignRight :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActionButtonGroup>\n\t\t\t<NcActionButton :close-after-click=\"true\"\n\t\t\t\t@click=\"showMessage('Some other action')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tSome other action\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</div>\n</template>\n<script>\nimport AlignLeft from 'vue-material-design-icons/AlignHorizontalLeft'\nimport AlignRight from 'vue-material-design-icons/AlignHorizontalRight'\nimport AlignCenter from 'vue-material-design-icons/AlignHorizontalCenter'\nimport Plus from 'vue-material-design-icons/Plus'\n\nexport default {\n\tcomponents: {\n\t\tAlignLeft,\n\t\tAlignRight,\n\t\tAlignCenter,\n\t\tPlus,\n\t},\n\tdata() {\n\t\treturn { alignment: 'l' }\n\t},\n\tmethods: {\n\t\tshowMessage(msg) {\n\t\t\talert(msg)\n\t\t},\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"nc-button-group-base\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<div v-if=\"name\" :id=\"labelId\">\n\t\t\t{{ name }}\n\t\t</div>\n\t\t<ul class=\"nc-button-group-content\" role=\"group\" :aria-labelledby=\"name ? labelId : undefined\">\n\t\t\t<slot />\n\t\t</ul>\n\t</li>\n</template>\n\n<script>\nimport { defineComponent } from 'vue'\nimport GenRandomId from '../../utils/GenRandomId.js'\nimport { t } from '../../l10n.js'\n\n/**\n * A wrapper for allowing inlining NcAction components within the action menu\n */\nexport default defineComponent({\n\tname: 'NcActionButtonGroup',\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: 'NcActions:isSemanticMenu',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Optional text shown below the button group\n\t\t */\n\t\tname: {\n\t\t\trequired: false,\n\t\t\tdefault: undefined,\n\t\t\ttype: String,\n\t\t},\n\t},\n\n\tsetup() {\n\t\treturn {\n\t\t\tlabelId: `nc-action-button-group-${GenRandomId()}`,\n\t\t}\n\t},\n\n\tmethods: {\n\t\tt,\n\t},\n})\n</script>\n\n<style lang=\"scss\">\n.nc-button-group-base {\n\t>div {\n\t\ttext-align: center;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\tul.nc-button-group-content {\n\t\tdisplay: flex;\n\t\tgap: 4px; // required for the focus-visible outline\n\t\tjustify-content: space-between;\n\t\tli {\n\t\t\tflex: 1 1;\n\t\t}\n\n\t\t.action-button {\n\t\t\t// Fix action buttons beeing shifted to the left (right padding)\n\t\t\tpadding: 0 !important;\n\t\t\twidth: 100%;\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: center;\n\n\t\t\t&.action-button--active {\n\t\t\t\tbackground-color: var(--color-primary-element);\n\t\t\t\tborder-radius: var(--border-radius-large);\n\t\t\t\tcolor: var(--color-primary-element-text);\n\n\t\t\t\t&:hover, &:focus, &:focus-within {\n\t\t\t\t\tbackground-color: var(--color-primary-element-hover);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.action-button__pressed-icon {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n</style>\n"],"names":["defineComponent","GenRandomId","t"],"mappings":";;;;;;AA+FA,MAAA,YAAAA,IAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,QAAA;AAAA,IACA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,QAAA;AACA,WAAA;AAAA,MACA,SAAA,0BAAAC,YAAA,YAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,GAAAC,MAAA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcActionButtonGroup-B8Bj-Qb3.cjs","sources":["../../src/components/NcActionButtonGroup/NcActionButtonGroup.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots,\nto group buttons as one visual action, like for text alignment.\nThis should be used sparingly for accessibility.\n\n```vue\n<template>\n\t<div style=\"display: flex; align-items: center;\">\n\t\t<NcActions>\n\t\t\t<NcActionButtonGroup name=\"Text alignment\">\n\t\t\t\t<NcActionButton aria-label=\"Align left\"\n\t\t\t\t\t:model-value.sync=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"l\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlignLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton aria-label=\"Align center\"\n\t\t\t\t\t:model-value.sync=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"c\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlignCenter :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton aria-label=\"Align right\"\n\t\t\t\t\t:model-value.sync=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"r\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlignRight :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActionButtonGroup>\n\t\t\t<NcActionButton :close-after-click=\"true\"\n\t\t\t\t@click=\"showMessage('Some other action')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tSome other action\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</div>\n</template>\n<script>\nimport AlignLeft from 'vue-material-design-icons/AlignHorizontalLeft'\nimport AlignRight from 'vue-material-design-icons/AlignHorizontalRight'\nimport AlignCenter from 'vue-material-design-icons/AlignHorizontalCenter'\nimport Plus from 'vue-material-design-icons/Plus'\n\nexport default {\n\tcomponents: {\n\t\tAlignLeft,\n\t\tAlignRight,\n\t\tAlignCenter,\n\t\tPlus,\n\t},\n\tdata() {\n\t\treturn { alignment: 'l' }\n\t},\n\tmethods: {\n\t\tshowMessage(msg) {\n\t\t\talert(msg)\n\t\t},\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"nc-button-group-base\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<div v-if=\"name\" :id=\"labelId\">\n\t\t\t{{ name }}\n\t\t</div>\n\t\t<ul class=\"nc-button-group-content\" role=\"group\" :aria-labelledby=\"name ? labelId : undefined\">\n\t\t\t<slot />\n\t\t</ul>\n\t</li>\n</template>\n\n<script>\nimport { defineComponent } from 'vue'\nimport GenRandomId from '../../utils/GenRandomId.js'\nimport { t } from '../../l10n.js'\n\n/**\n * A wrapper for allowing inlining NcAction components within the action menu\n */\nexport default defineComponent({\n\tname: 'NcActionButtonGroup',\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: 'NcActions:isSemanticMenu',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Optional text shown below the button group\n\t\t */\n\t\tname: {\n\t\t\trequired: false,\n\t\t\tdefault: undefined,\n\t\t\ttype: String,\n\t\t},\n\t},\n\n\tsetup() {\n\t\treturn {\n\t\t\tlabelId: `nc-action-button-group-${GenRandomId()}`,\n\t\t}\n\t},\n\n\tmethods: {\n\t\tt,\n\t},\n})\n</script>\n\n<style lang=\"scss\">\n.nc-button-group-base {\n\t>div {\n\t\ttext-align: center;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\tul.nc-button-group-content {\n\t\tdisplay: flex;\n\t\tgap: 4px; // required for the focus-visible outline\n\t\tjustify-content: space-between;\n\t\tli {\n\t\t\tflex: 1 1;\n\t\t}\n\n\t\t.action-button {\n\t\t\t// Fix action buttons beeing shifted to the left (right padding)\n\t\t\tpadding: 0 !important;\n\t\t\twidth: 100%;\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: center;\n\n\t\t\t&.action-button--active {\n\t\t\t\tbackground-color: var(--color-primary-element);\n\t\t\t\tborder-radius: var(--border-radius-large);\n\t\t\t\tcolor: var(--color-primary-element-text);\n\n\t\t\t\t&:hover, &:focus, &:focus-within {\n\t\t\t\t\tbackground-color: var(--color-primary-element-hover);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.action-button__pressed-icon {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n</style>\n"],"names":["defineComponent","GenRandomId","t"],"mappings":";;;;;;AA+FA,MAAA,YAAAA,IAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,QAAA;AAAA,IACA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,QAAA;AACA,WAAA;AAAA,MACA,SAAA,0BAAAC,YAAA,YAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA,GAAAC,MAAA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import '../assets/NcActionButtonGroup-BND4GQdv.css';
2
2
  import { defineComponent } from "vue";
3
3
  import { G as GenRandomId } from "./GenRandomId-CMooMQt0.mjs";
4
- import { r as register, a as t } from "./_l10n-DIOHNc85.mjs";
4
+ import { r as register, a as t } from "./_l10n-BU8-kQzN.mjs";
5
5
  import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
6
6
  register();
7
7
  const _sfc_main = defineComponent({
@@ -49,4 +49,4 @@ const NcActionButtonGroup = __component__.exports;
49
49
  export {
50
50
  NcActionButtonGroup as N
51
51
  };
52
- //# sourceMappingURL=NcActionButtonGroup-BkU5oOmB.mjs.map
52
+ //# sourceMappingURL=NcActionButtonGroup-_R4fp-bK.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcActionButtonGroup-BkU5oOmB.mjs","sources":["../../src/components/NcActionButtonGroup/NcActionButtonGroup.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots,\nto group buttons as one visual action, like for text alignment.\nThis should be used sparingly for accessibility.\n\n```vue\n<template>\n\t<div style=\"display: flex; align-items: center;\">\n\t\t<NcActions>\n\t\t\t<NcActionButtonGroup name=\"Text alignment\">\n\t\t\t\t<NcActionButton aria-label=\"Align left\"\n\t\t\t\t\t:model-value.sync=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"l\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlignLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton aria-label=\"Align center\"\n\t\t\t\t\t:model-value.sync=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"c\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlignCenter :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton aria-label=\"Align right\"\n\t\t\t\t\t:model-value.sync=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"r\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlignRight :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActionButtonGroup>\n\t\t\t<NcActionButton :close-after-click=\"true\"\n\t\t\t\t@click=\"showMessage('Some other action')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tSome other action\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</div>\n</template>\n<script>\nimport AlignLeft from 'vue-material-design-icons/AlignHorizontalLeft'\nimport AlignRight from 'vue-material-design-icons/AlignHorizontalRight'\nimport AlignCenter from 'vue-material-design-icons/AlignHorizontalCenter'\nimport Plus from 'vue-material-design-icons/Plus'\n\nexport default {\n\tcomponents: {\n\t\tAlignLeft,\n\t\tAlignRight,\n\t\tAlignCenter,\n\t\tPlus,\n\t},\n\tdata() {\n\t\treturn { alignment: 'l' }\n\t},\n\tmethods: {\n\t\tshowMessage(msg) {\n\t\t\talert(msg)\n\t\t},\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"nc-button-group-base\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<div v-if=\"name\" :id=\"labelId\">\n\t\t\t{{ name }}\n\t\t</div>\n\t\t<ul class=\"nc-button-group-content\" role=\"group\" :aria-labelledby=\"name ? labelId : undefined\">\n\t\t\t<slot />\n\t\t</ul>\n\t</li>\n</template>\n\n<script>\nimport { defineComponent } from 'vue'\nimport GenRandomId from '../../utils/GenRandomId.js'\nimport { t } from '../../l10n.js'\n\n/**\n * A wrapper for allowing inlining NcAction components within the action menu\n */\nexport default defineComponent({\n\tname: 'NcActionButtonGroup',\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: 'NcActions:isSemanticMenu',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Optional text shown below the button group\n\t\t */\n\t\tname: {\n\t\t\trequired: false,\n\t\t\tdefault: undefined,\n\t\t\ttype: String,\n\t\t},\n\t},\n\n\tsetup() {\n\t\treturn {\n\t\t\tlabelId: `nc-action-button-group-${GenRandomId()}`,\n\t\t}\n\t},\n\n\tmethods: {\n\t\tt,\n\t},\n})\n</script>\n\n<style lang=\"scss\">\n.nc-button-group-base {\n\t>div {\n\t\ttext-align: center;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\tul.nc-button-group-content {\n\t\tdisplay: flex;\n\t\tgap: 4px; // required for the focus-visible outline\n\t\tjustify-content: space-between;\n\t\tli {\n\t\t\tflex: 1 1;\n\t\t}\n\n\t\t.action-button {\n\t\t\t// Fix action buttons beeing shifted to the left (right padding)\n\t\t\tpadding: 0 !important;\n\t\t\twidth: 100%;\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: center;\n\n\t\t\t&.action-button--active {\n\t\t\t\tbackground-color: var(--color-primary-element);\n\t\t\t\tborder-radius: var(--border-radius-large);\n\t\t\t\tcolor: var(--color-primary-element-text);\n\n\t\t\t\t&:hover, &:focus, &:focus-within {\n\t\t\t\t\tbackground-color: var(--color-primary-element-hover);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.action-button__pressed-icon {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n</style>\n"],"names":[],"mappings":";;;;;AA+FA,MAAA,YAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,QAAA;AAAA,IACA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,QAAA;AACA,WAAA;AAAA,MACA,SAAA,0BAAA,YAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcActionButtonGroup-_R4fp-bK.mjs","sources":["../../src/components/NcActionButtonGroup/NcActionButtonGroup.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used inside of the [NcActions](#NcActions) component slots,\nto group buttons as one visual action, like for text alignment.\nThis should be used sparingly for accessibility.\n\n```vue\n<template>\n\t<div style=\"display: flex; align-items: center;\">\n\t\t<NcActions>\n\t\t\t<NcActionButtonGroup name=\"Text alignment\">\n\t\t\t\t<NcActionButton aria-label=\"Align left\"\n\t\t\t\t\t:model-value.sync=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"l\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlignLeft :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton aria-label=\"Align center\"\n\t\t\t\t\t:model-value.sync=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"c\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlignCenter :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t\t<NcActionButton aria-label=\"Align right\"\n\t\t\t\t\t:model-value.sync=\"alignment\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\tvalue=\"r\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AlignRight :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcActionButton>\n\t\t\t</NcActionButtonGroup>\n\t\t\t<NcActionButton :close-after-click=\"true\"\n\t\t\t\t@click=\"showMessage('Some other action')\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Plus :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\tSome other action\n\t\t\t</NcActionButton>\n\t\t</NcActions>\n\t</div>\n</template>\n<script>\nimport AlignLeft from 'vue-material-design-icons/AlignHorizontalLeft'\nimport AlignRight from 'vue-material-design-icons/AlignHorizontalRight'\nimport AlignCenter from 'vue-material-design-icons/AlignHorizontalCenter'\nimport Plus from 'vue-material-design-icons/Plus'\n\nexport default {\n\tcomponents: {\n\t\tAlignLeft,\n\t\tAlignRight,\n\t\tAlignCenter,\n\t\tPlus,\n\t},\n\tdata() {\n\t\treturn { alignment: 'l' }\n\t},\n\tmethods: {\n\t\tshowMessage(msg) {\n\t\t\talert(msg)\n\t\t},\n\t},\n}\n</script>\n```\n</docs>\n\n<template>\n\t<li class=\"nc-button-group-base\" :role=\"isInSemanticMenu && 'presentation'\">\n\t\t<div v-if=\"name\" :id=\"labelId\">\n\t\t\t{{ name }}\n\t\t</div>\n\t\t<ul class=\"nc-button-group-content\" role=\"group\" :aria-labelledby=\"name ? labelId : undefined\">\n\t\t\t<slot />\n\t\t</ul>\n\t</li>\n</template>\n\n<script>\nimport { defineComponent } from 'vue'\nimport GenRandomId from '../../utils/GenRandomId.js'\nimport { t } from '../../l10n.js'\n\n/**\n * A wrapper for allowing inlining NcAction components within the action menu\n */\nexport default defineComponent({\n\tname: 'NcActionButtonGroup',\n\n\tinject: {\n\t\tisInSemanticMenu: {\n\t\t\tfrom: 'NcActions:isSemanticMenu',\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Optional text shown below the button group\n\t\t */\n\t\tname: {\n\t\t\trequired: false,\n\t\t\tdefault: undefined,\n\t\t\ttype: String,\n\t\t},\n\t},\n\n\tsetup() {\n\t\treturn {\n\t\t\tlabelId: `nc-action-button-group-${GenRandomId()}`,\n\t\t}\n\t},\n\n\tmethods: {\n\t\tt,\n\t},\n})\n</script>\n\n<style lang=\"scss\">\n.nc-button-group-base {\n\t>div {\n\t\ttext-align: center;\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n\n\tul.nc-button-group-content {\n\t\tdisplay: flex;\n\t\tgap: 4px; // required for the focus-visible outline\n\t\tjustify-content: space-between;\n\t\tli {\n\t\t\tflex: 1 1;\n\t\t}\n\n\t\t.action-button {\n\t\t\t// Fix action buttons beeing shifted to the left (right padding)\n\t\t\tpadding: 0 !important;\n\t\t\twidth: 100%;\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: center;\n\n\t\t\t&.action-button--active {\n\t\t\t\tbackground-color: var(--color-primary-element);\n\t\t\t\tborder-radius: var(--border-radius-large);\n\t\t\t\tcolor: var(--color-primary-element-text);\n\n\t\t\t\t&:hover, &:focus, &:focus-within {\n\t\t\t\t\tbackground-color: var(--color-primary-element-hover);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.action-button__pressed-icon {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n</style>\n"],"names":[],"mappings":";;;;;AA+FA,MAAA,YAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,QAAA;AAAA,IACA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,MAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,QAAA;AACA,WAAA;AAAA,MACA,SAAA,0BAAA,YAAA,CAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA,IACA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;"}