@nextcloud/vue 8.29.1 → 8.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (432) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +4 -3
  3. package/dist/Components/NcActionButton.cjs +1 -1
  4. package/dist/Components/NcActionButton.mjs +1 -1
  5. package/dist/Components/NcActionButtonGroup.cjs +1 -1
  6. package/dist/Components/NcActionButtonGroup.mjs +1 -1
  7. package/dist/Components/NcActionInput.cjs +1 -1
  8. package/dist/Components/NcActionInput.mjs +1 -1
  9. package/dist/Components/NcActionTextEditable.cjs +1 -1
  10. package/dist/Components/NcActionTextEditable.mjs +1 -1
  11. package/dist/Components/NcActions.cjs +1 -1
  12. package/dist/Components/NcActions.mjs +1 -1
  13. package/dist/Components/NcAppContent.cjs +1 -1
  14. package/dist/Components/NcAppContent.mjs +1 -1
  15. package/dist/Components/NcAppNavigation.cjs +1 -1
  16. package/dist/Components/NcAppNavigation.mjs +1 -1
  17. package/dist/Components/NcAppNavigationCaption.cjs +1 -1
  18. package/dist/Components/NcAppNavigationCaption.mjs +1 -1
  19. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  20. package/dist/Components/NcAppNavigationItem.mjs +1 -1
  21. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  22. package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
  23. package/dist/Components/NcAppNavigationSearch.cjs +1 -1
  24. package/dist/Components/NcAppNavigationSearch.mjs +1 -1
  25. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  26. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  27. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  28. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  29. package/dist/Components/NcAppSettingsDialog.cjs +1 -1
  30. package/dist/Components/NcAppSettingsDialog.mjs +1 -1
  31. package/dist/Components/NcAppSidebar.cjs +1 -1
  32. package/dist/Components/NcAppSidebar.mjs +1 -1
  33. package/dist/Components/NcAssistantButton.cjs +4 -0
  34. package/dist/Components/NcAssistantButton.cjs.map +1 -0
  35. package/dist/Components/NcAssistantButton.mjs +5 -0
  36. package/dist/Components/NcAssistantButton.mjs.map +1 -0
  37. package/dist/Components/NcAssistantContent.cjs +50 -0
  38. package/dist/Components/NcAssistantContent.cjs.map +1 -0
  39. package/dist/Components/NcAssistantContent.mjs +51 -0
  40. package/dist/Components/NcAssistantContent.mjs.map +1 -0
  41. package/dist/Components/NcAssistantIcon.cjs +4 -0
  42. package/dist/Components/NcAssistantIcon.cjs.map +1 -0
  43. package/dist/Components/NcAssistantIcon.mjs +5 -0
  44. package/dist/Components/NcAssistantIcon.mjs.map +1 -0
  45. package/dist/Components/NcAvatar.cjs +1 -1
  46. package/dist/Components/NcAvatar.mjs +1 -1
  47. package/dist/Components/NcBreadcrumb.cjs +1 -1
  48. package/dist/Components/NcBreadcrumb.mjs +1 -1
  49. package/dist/Components/NcBreadcrumbs.cjs +1 -1
  50. package/dist/Components/NcBreadcrumbs.mjs +1 -1
  51. package/dist/Components/NcButton.cjs +2 -2
  52. package/dist/Components/NcButton.cjs.map +1 -1
  53. package/dist/Components/NcButton.mjs +2 -2
  54. package/dist/Components/NcButton.mjs.map +1 -1
  55. package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
  56. package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
  57. package/dist/Components/NcChip.cjs +4 -4
  58. package/dist/Components/NcChip.mjs +4 -4
  59. package/dist/Components/NcCollectionList.cjs +1 -1
  60. package/dist/Components/NcCollectionList.mjs +1 -1
  61. package/dist/Components/NcColorPicker.cjs +1 -1
  62. package/dist/Components/NcColorPicker.mjs +1 -1
  63. package/dist/Components/NcContent.cjs +1 -1
  64. package/dist/Components/NcContent.mjs +1 -1
  65. package/dist/Components/NcDashboardWidget.cjs +1 -1
  66. package/dist/Components/NcDashboardWidget.mjs +1 -1
  67. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  68. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  69. package/dist/Components/NcDateTimePicker.cjs +6 -6
  70. package/dist/Components/NcDateTimePicker.cjs.map +1 -1
  71. package/dist/Components/NcDateTimePicker.mjs +6 -6
  72. package/dist/Components/NcDateTimePicker.mjs.map +1 -1
  73. package/dist/Components/NcDateTimePickerNative.cjs +1 -1
  74. package/dist/Components/NcDateTimePickerNative.mjs +1 -1
  75. package/dist/Components/NcDialog.cjs +1 -1
  76. package/dist/Components/NcDialog.mjs +1 -1
  77. package/dist/Components/NcDialogButton.cjs +1 -1
  78. package/dist/Components/NcDialogButton.mjs +1 -1
  79. package/dist/Components/NcEmojiPicker.cjs +1 -1
  80. package/dist/Components/NcEmojiPicker.mjs +1 -1
  81. package/dist/Components/NcHeaderButton.cjs +2 -2
  82. package/dist/Components/NcHeaderButton.cjs.map +1 -1
  83. package/dist/Components/NcHeaderButton.mjs +2 -2
  84. package/dist/Components/NcHeaderButton.mjs.map +1 -1
  85. package/dist/Components/NcHeaderMenu.cjs +1 -1
  86. package/dist/Components/NcHeaderMenu.mjs +1 -1
  87. package/dist/Components/NcInputField.cjs +1 -1
  88. package/dist/Components/NcInputField.mjs +1 -1
  89. package/dist/Components/NcListItem.cjs +1 -1
  90. package/dist/Components/NcListItem.mjs +1 -1
  91. package/dist/Components/NcListItemIcon.cjs +1 -1
  92. package/dist/Components/NcListItemIcon.mjs +1 -1
  93. package/dist/Components/NcModal.cjs +4 -4
  94. package/dist/Components/NcModal.mjs +4 -4
  95. package/dist/Components/NcNoteCard.cjs +13 -18
  96. package/dist/Components/NcNoteCard.cjs.map +1 -1
  97. package/dist/Components/NcNoteCard.mjs +13 -18
  98. package/dist/Components/NcNoteCard.mjs.map +1 -1
  99. package/dist/Components/NcPasswordField.cjs +1 -1
  100. package/dist/Components/NcPasswordField.mjs +1 -1
  101. package/dist/Components/NcPopover.cjs +1 -1
  102. package/dist/Components/NcPopover.mjs +1 -1
  103. package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
  104. package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
  105. package/dist/Components/NcRichContenteditable.cjs +1 -1
  106. package/dist/Components/NcRichContenteditable.mjs +1 -1
  107. package/dist/Components/NcRichText.cjs +10 -10
  108. package/dist/Components/NcRichText.mjs +10 -10
  109. package/dist/Components/NcSelect.cjs +1 -1
  110. package/dist/Components/NcSelect.mjs +1 -1
  111. package/dist/Components/NcSelectTags.cjs +1 -1
  112. package/dist/Components/NcSelectTags.mjs +1 -1
  113. package/dist/Components/NcSelectUsers.cjs +1 -1
  114. package/dist/Components/NcSelectUsers.mjs +1 -1
  115. package/dist/Components/NcSettingsInputText.cjs +1 -1
  116. package/dist/Components/NcSettingsInputText.mjs +1 -1
  117. package/dist/Components/NcSettingsSection.cjs +1 -1
  118. package/dist/Components/NcSettingsSection.mjs +1 -1
  119. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  120. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  121. package/dist/Components/NcTextArea.cjs +1 -1
  122. package/dist/Components/NcTextArea.mjs +1 -1
  123. package/dist/Components/NcTextField.cjs +1 -1
  124. package/dist/Components/NcTextField.mjs +1 -1
  125. package/dist/Components/NcTimezonePicker.cjs +1 -1
  126. package/dist/Components/NcTimezonePicker.mjs +1 -1
  127. package/dist/Components/NcUserBubble.cjs +1 -1
  128. package/dist/Components/NcUserBubble.mjs +1 -1
  129. package/dist/Components/NcUserStatusIcon.cjs +1 -1
  130. package/dist/Components/NcUserStatusIcon.mjs +1 -1
  131. package/dist/Composables/useFormatDateTime.cjs +1 -1
  132. package/dist/Composables/useFormatDateTime.mjs +1 -1
  133. package/dist/Functions/reference.cjs +10 -10
  134. package/dist/Functions/reference.mjs +7 -7
  135. package/dist/Functions/registerReference.cjs +11 -11
  136. package/dist/Functions/registerReference.mjs +5 -5
  137. package/dist/Functions/usernameToColor.cjs +1 -1
  138. package/dist/Functions/usernameToColor.mjs +1 -1
  139. package/dist/assets/{NcActionButtonGroup-BND4GQdv.css → NcActionButtonGroup-oAqMyrzr.css} +8 -8
  140. package/dist/assets/{NcActions-C3F-rqxz.css → NcActions-Bjgv1Dku.css} +13 -13
  141. package/dist/assets/{NcAppNavigationItem-Ca2ekElv.css → NcAppNavigationItem-DKcGNjYx.css} +43 -39
  142. package/dist/assets/{NcAppNavigationNewItem-PE-w8y-g.css → NcAppNavigationNewItem-CS2gLROV.css} +6 -0
  143. package/dist/assets/{NcAppNavigationSearch-CFtTLRbc.css → NcAppNavigationSearch-CD7kv7L_.css} +6 -6
  144. package/dist/assets/{NcAppNavigationSettings-vd47rlNY.css → NcAppNavigationSettings-_Qi3rUlw.css} +11 -16
  145. package/dist/assets/NcAssistantButton-owGSr0s0.css +54 -0
  146. package/dist/assets/NcAssistantContent-Ban7n3Bg.css +31 -0
  147. package/dist/assets/NcAssistantIcon-BFNU0uqH.css +35 -0
  148. package/dist/assets/{NcButton-DCgUYOPt.css → NcButton-C_LOxojs.css} +47 -46
  149. package/dist/assets/{NcCheckboxRadioSwitch-DqEP1SPR.css → NcCheckboxRadioSwitch-CC2zuvLL.css} +53 -43
  150. package/dist/assets/{NcDashboardWidget-BSTvIgiJ.css → NcDashboardWidget-CrhZaGWD.css} +12 -12
  151. package/dist/assets/{NcDateTimePicker-ZHSpShZz.css → NcDateTimePicker-Ce57VAyL.css} +19 -19
  152. package/dist/assets/NcEmojiPicker-BRSm8OUy.css +546 -0
  153. package/dist/assets/{NcHeaderButton-ByNXqS7x.css → NcHeaderButton-BRhv2o2J.css} +9 -9
  154. package/dist/assets/{NcHeaderMenu-Dp_vJKTP.css → NcHeaderMenu-Cjb3kKi1.css} +13 -13
  155. package/dist/assets/{NcInputField-CoB72F_m.css → NcInputField-DAiNwtp_.css} +76 -45
  156. package/dist/assets/{NcNoteCard-C6xb7vi0.css → NcNoteCard-ChweF_5Q.css} +26 -14
  157. package/dist/assets/{NcPopover-Dx28oc68.css → NcPopover--XoXIhLx.css} +13 -13
  158. package/dist/assets/{NcRichContenteditable-4-6A9qmC.css → NcRichContenteditable-DZLSoy84.css} +11 -11
  159. package/dist/assets/NcTextArea-vxeIyeSg.css +136 -0
  160. package/dist/assets/{NcUserStatusIcon-ChHaXPex.css → NcUserStatusIcon-Dc-aUzBe.css} +8 -4
  161. package/dist/assets/{referencePickerModal-Ba6soz9w.css → referencePickerModal-DrvqNTIf.css} +21 -38
  162. package/dist/chunks/{GenColors-BnYS3bvv.cjs → GenColors-BjsCKF7S.cjs} +2 -2
  163. package/dist/chunks/{GenColors-BnYS3bvv.cjs.map → GenColors-BjsCKF7S.cjs.map} +1 -1
  164. package/dist/chunks/{GenColors-DNN63dHB.mjs → GenColors-BrpkL3hT.mjs} +2 -2
  165. package/dist/chunks/{GenColors-DNN63dHB.mjs.map → GenColors-BrpkL3hT.mjs.map} +1 -1
  166. package/dist/chunks/{NcActionButton-2qh96K_i.cjs → NcActionButton-BhSk7AAp.cjs} +2 -2
  167. package/dist/chunks/{NcActionButton-2qh96K_i.cjs.map → NcActionButton-BhSk7AAp.cjs.map} +1 -1
  168. package/dist/chunks/{NcActionButton-CHrE7amZ.mjs → NcActionButton-DC3oAI2L.mjs} +2 -2
  169. package/dist/chunks/{NcActionButton-CHrE7amZ.mjs.map → NcActionButton-DC3oAI2L.mjs.map} +1 -1
  170. package/dist/chunks/{NcActionButtonGroup-B8Bj-Qb3.cjs → NcActionButtonGroup-Cr4OSmyb.cjs} +4 -4
  171. package/dist/chunks/{NcActionButtonGroup-B8Bj-Qb3.cjs.map → NcActionButtonGroup-Cr4OSmyb.cjs.map} +1 -1
  172. package/dist/chunks/{NcActionButtonGroup-_R4fp-bK.mjs → NcActionButtonGroup-hhh3GBSS.mjs} +4 -4
  173. package/dist/chunks/{NcActionButtonGroup-_R4fp-bK.mjs.map → NcActionButtonGroup-hhh3GBSS.mjs.map} +1 -1
  174. package/dist/chunks/{NcActionInput-BeBxzPFZ.mjs → NcActionInput-B5ysJl2S.mjs} +4 -4
  175. package/dist/chunks/{NcActionInput-BeBxzPFZ.mjs.map → NcActionInput-B5ysJl2S.mjs.map} +1 -1
  176. package/dist/chunks/{NcActionInput-GZdB-qw1.cjs → NcActionInput-DdaafMi8.cjs} +4 -4
  177. package/dist/chunks/{NcActionInput-GZdB-qw1.cjs.map → NcActionInput-DdaafMi8.cjs.map} +1 -1
  178. package/dist/chunks/{NcActionTextEditable-CrW19Rr4.cjs → NcActionTextEditable-CTXGUIPM.cjs} +2 -2
  179. package/dist/chunks/{NcActionTextEditable-CrW19Rr4.cjs.map → NcActionTextEditable-CTXGUIPM.cjs.map} +1 -1
  180. package/dist/chunks/{NcActionTextEditable-CYac2X_P.mjs → NcActionTextEditable-CpxJ_LEa.mjs} +2 -2
  181. package/dist/chunks/{NcActionTextEditable-CYac2X_P.mjs.map → NcActionTextEditable-CpxJ_LEa.mjs.map} +1 -1
  182. package/dist/chunks/{NcActions-DV3CjPHr.cjs → NcActions-DRCkAU8h.cjs} +6 -6
  183. package/dist/chunks/{NcActions-DV3CjPHr.cjs.map → NcActions-DRCkAU8h.cjs.map} +1 -1
  184. package/dist/chunks/{NcActions-BANvgaMn.mjs → NcActions-DdARGGZ_.mjs} +6 -6
  185. package/dist/chunks/{NcActions-BANvgaMn.mjs.map → NcActions-DdARGGZ_.mjs.map} +1 -1
  186. package/dist/chunks/{NcAppContent-twZJBrQv.mjs → NcAppContent-BS7BiMG0.mjs} +2 -2
  187. package/dist/chunks/{NcAppContent-twZJBrQv.mjs.map → NcAppContent-BS7BiMG0.mjs.map} +1 -1
  188. package/dist/chunks/{NcAppContent-BqR67yTH.cjs → NcAppContent-POt1Lj3W.cjs} +2 -2
  189. package/dist/chunks/{NcAppContent-BqR67yTH.cjs.map → NcAppContent-POt1Lj3W.cjs.map} +1 -1
  190. package/dist/chunks/{NcAppNavigation-COge8_bn.cjs → NcAppNavigation-BKxSUpcQ.cjs} +2 -2
  191. package/dist/chunks/{NcAppNavigation-COge8_bn.cjs.map → NcAppNavigation-BKxSUpcQ.cjs.map} +1 -1
  192. package/dist/chunks/{NcAppNavigation-VSGTDckG.mjs → NcAppNavigation-BvEa92PC.mjs} +2 -2
  193. package/dist/chunks/{NcAppNavigation-VSGTDckG.mjs.map → NcAppNavigation-BvEa92PC.mjs.map} +1 -1
  194. package/dist/chunks/{NcAppNavigationCaption-ofy-JSGu.cjs → NcAppNavigationCaption-BpmzZDPj.cjs} +2 -2
  195. package/dist/chunks/{NcAppNavigationCaption-ofy-JSGu.cjs.map → NcAppNavigationCaption-BpmzZDPj.cjs.map} +1 -1
  196. package/dist/chunks/{NcAppNavigationCaption-oxc7chGv.mjs → NcAppNavigationCaption-O4l8dFkh.mjs} +2 -2
  197. package/dist/chunks/{NcAppNavigationCaption-oxc7chGv.mjs.map → NcAppNavigationCaption-O4l8dFkh.mjs.map} +1 -1
  198. package/dist/chunks/{NcAppNavigationItem-CbtPNTg_.mjs → NcAppNavigationItem-BFF0p136.mjs} +18 -11
  199. package/dist/chunks/NcAppNavigationItem-BFF0p136.mjs.map +1 -0
  200. package/dist/chunks/{NcAppNavigationItem-B-uv2tWu.cjs → NcAppNavigationItem-D1CEGuhm.cjs} +18 -11
  201. package/dist/chunks/NcAppNavigationItem-D1CEGuhm.cjs.map +1 -0
  202. package/dist/chunks/{NcAppNavigationNewItem-DzpW6cIK.cjs → NcAppNavigationNewItem-CTAoGkDy.cjs} +3 -3
  203. package/dist/chunks/{NcAppNavigationNewItem-DzpW6cIK.cjs.map → NcAppNavigationNewItem-CTAoGkDy.cjs.map} +1 -1
  204. package/dist/chunks/{NcAppNavigationNewItem-Cz8VbLjN.mjs → NcAppNavigationNewItem-D4fJeBl0.mjs} +3 -3
  205. package/dist/chunks/{NcAppNavigationNewItem-Cz8VbLjN.mjs.map → NcAppNavigationNewItem-D4fJeBl0.mjs.map} +1 -1
  206. package/dist/chunks/{NcAppNavigationSearch-By7WEKGG.mjs → NcAppNavigationSearch-B9OkdsuE.mjs} +7 -7
  207. package/dist/chunks/{NcAppNavigationSearch-By7WEKGG.mjs.map → NcAppNavigationSearch-B9OkdsuE.mjs.map} +1 -1
  208. package/dist/chunks/{NcAppNavigationSearch-DjBMu0cZ.cjs → NcAppNavigationSearch-CaBrnpf9.cjs} +7 -7
  209. package/dist/chunks/{NcAppNavigationSearch-DjBMu0cZ.cjs.map → NcAppNavigationSearch-CaBrnpf9.cjs.map} +1 -1
  210. package/dist/chunks/NcAppNavigationSettings-DV5ZnR2s.cjs +85 -0
  211. package/dist/chunks/NcAppNavigationSettings-DV5ZnR2s.cjs.map +1 -0
  212. package/dist/chunks/NcAppNavigationSettings-Do0e5oWy.mjs +86 -0
  213. package/dist/chunks/NcAppNavigationSettings-Do0e5oWy.mjs.map +1 -0
  214. package/dist/chunks/{NcAppNavigationToggle-CbZem2gZ.cjs → NcAppNavigationToggle-DGppWo0q.cjs} +2 -2
  215. package/dist/chunks/{NcAppNavigationToggle-CbZem2gZ.cjs.map → NcAppNavigationToggle-DGppWo0q.cjs.map} +1 -1
  216. package/dist/chunks/{NcAppNavigationToggle-CINjg2Mo.mjs → NcAppNavigationToggle-VxL1CfJY.mjs} +2 -2
  217. package/dist/chunks/{NcAppNavigationToggle-CINjg2Mo.mjs.map → NcAppNavigationToggle-VxL1CfJY.mjs.map} +1 -1
  218. package/dist/chunks/{NcAppSettingsDialog-C1m0QYAK.cjs → NcAppSettingsDialog-BDo3la0P.cjs} +3 -3
  219. package/dist/chunks/{NcAppSettingsDialog-C1m0QYAK.cjs.map → NcAppSettingsDialog-BDo3la0P.cjs.map} +1 -1
  220. package/dist/chunks/{NcAppSettingsDialog-Duyfikm-.mjs → NcAppSettingsDialog-BwsIc_QT.mjs} +3 -3
  221. package/dist/chunks/{NcAppSettingsDialog-Duyfikm-.mjs.map → NcAppSettingsDialog-BwsIc_QT.mjs.map} +1 -1
  222. package/dist/chunks/{NcAppSidebar-UROIM84v.mjs → NcAppSidebar-AR-D7HSj.mjs} +4 -4
  223. package/dist/chunks/{NcAppSidebar-UROIM84v.mjs.map → NcAppSidebar-AR-D7HSj.mjs.map} +1 -1
  224. package/dist/chunks/{NcAppSidebar-DrjH3Ign.cjs → NcAppSidebar-Cvyq-kN5.cjs} +4 -4
  225. package/dist/chunks/{NcAppSidebar-DrjH3Ign.cjs.map → NcAppSidebar-Cvyq-kN5.cjs.map} +1 -1
  226. package/dist/chunks/NcAssistantButton-Ck1NUjhl.mjs +97 -0
  227. package/dist/chunks/NcAssistantButton-Ck1NUjhl.mjs.map +1 -0
  228. package/dist/chunks/NcAssistantButton-gD3MKoYS.cjs +96 -0
  229. package/dist/chunks/NcAssistantButton-gD3MKoYS.cjs.map +1 -0
  230. package/dist/chunks/NcAssistantIcon-D_xelcY2.cjs +68 -0
  231. package/dist/chunks/NcAssistantIcon-D_xelcY2.cjs.map +1 -0
  232. package/dist/chunks/NcAssistantIcon-tjSguP9N.mjs +69 -0
  233. package/dist/chunks/NcAssistantIcon-tjSguP9N.mjs.map +1 -0
  234. package/dist/chunks/{NcAvatar-NIEuFVUx.mjs → NcAvatar-BEIBwiA6.mjs} +5 -5
  235. package/dist/chunks/{NcAvatar-NIEuFVUx.mjs.map → NcAvatar-BEIBwiA6.mjs.map} +1 -1
  236. package/dist/chunks/{NcAvatar-CYqiINFK.cjs → NcAvatar-DS1H-VrZ.cjs} +5 -5
  237. package/dist/chunks/{NcAvatar-CYqiINFK.cjs.map → NcAvatar-DS1H-VrZ.cjs.map} +1 -1
  238. package/dist/chunks/{NcBreadcrumb-BjsavDr1.mjs → NcBreadcrumb-BYYXWaif.mjs} +2 -2
  239. package/dist/chunks/{NcBreadcrumb-BjsavDr1.mjs.map → NcBreadcrumb-BYYXWaif.mjs.map} +1 -1
  240. package/dist/chunks/{NcBreadcrumb-BiW4k0c_.cjs → NcBreadcrumb-HtgcEJgs.cjs} +2 -2
  241. package/dist/chunks/{NcBreadcrumb-BiW4k0c_.cjs.map → NcBreadcrumb-HtgcEJgs.cjs.map} +1 -1
  242. package/dist/chunks/{NcBreadcrumbs-Dwnn6dKU.cjs → NcBreadcrumbs-CQcnjGJO.cjs} +4 -4
  243. package/dist/chunks/{NcBreadcrumbs-Dwnn6dKU.cjs.map → NcBreadcrumbs-CQcnjGJO.cjs.map} +1 -1
  244. package/dist/chunks/{NcBreadcrumbs-Bc2obqjl.mjs → NcBreadcrumbs-cj5ip2-X.mjs} +4 -4
  245. package/dist/chunks/{NcBreadcrumbs-Bc2obqjl.mjs.map → NcBreadcrumbs-cj5ip2-X.mjs.map} +1 -1
  246. package/dist/chunks/{NcCheckboxRadioSwitch-G28IJAL-.cjs → NcCheckboxRadioSwitch-B-lXOnEF.cjs} +38 -9
  247. package/dist/chunks/NcCheckboxRadioSwitch-B-lXOnEF.cjs.map +1 -0
  248. package/dist/chunks/{NcCheckboxRadioSwitch-BJg75WBj.mjs → NcCheckboxRadioSwitch-DqdNvkCt.mjs} +38 -9
  249. package/dist/chunks/NcCheckboxRadioSwitch-DqdNvkCt.mjs.map +1 -0
  250. package/dist/chunks/{NcCollectionList-BZmZbRsV.mjs → NcCollectionList-CLv50tJ3.mjs} +6 -6
  251. package/dist/chunks/{NcCollectionList-BZmZbRsV.mjs.map → NcCollectionList-CLv50tJ3.mjs.map} +1 -1
  252. package/dist/chunks/{NcCollectionList-Co3VxzCN.cjs → NcCollectionList-DXNSOjPG.cjs} +6 -6
  253. package/dist/chunks/{NcCollectionList-Co3VxzCN.cjs.map → NcCollectionList-DXNSOjPG.cjs.map} +1 -1
  254. package/dist/chunks/{NcColorPicker-CApQdWp0.mjs → NcColorPicker-52xaYx9k.mjs} +5 -5
  255. package/dist/chunks/{NcColorPicker-CApQdWp0.mjs.map → NcColorPicker-52xaYx9k.mjs.map} +1 -1
  256. package/dist/chunks/{NcColorPicker-CwPThFLP.cjs → NcColorPicker-CbiIpVlT.cjs} +5 -5
  257. package/dist/chunks/{NcColorPicker-CwPThFLP.cjs.map → NcColorPicker-CbiIpVlT.cjs.map} +1 -1
  258. package/dist/chunks/{NcContent-BkmB4vmh.mjs → NcContent-BbmqoSY7.mjs} +2 -2
  259. package/dist/chunks/{NcContent-BkmB4vmh.mjs.map → NcContent-BbmqoSY7.mjs.map} +1 -1
  260. package/dist/chunks/{NcContent-h4LUA1hj.cjs → NcContent-DH7uH5Gv.cjs} +2 -2
  261. package/dist/chunks/{NcContent-h4LUA1hj.cjs.map → NcContent-DH7uH5Gv.cjs.map} +1 -1
  262. package/dist/chunks/{NcDashboardWidget-CXKrTVGk.mjs → NcDashboardWidget-809lybR1.mjs} +7 -7
  263. package/dist/chunks/{NcDashboardWidget-CXKrTVGk.mjs.map → NcDashboardWidget-809lybR1.mjs.map} +1 -1
  264. package/dist/chunks/{NcDashboardWidget-Dn_Rq1Mt.cjs → NcDashboardWidget-DhJAJn-_.cjs} +7 -7
  265. package/dist/chunks/{NcDashboardWidget-Dn_Rq1Mt.cjs.map → NcDashboardWidget-DhJAJn-_.cjs.map} +1 -1
  266. package/dist/chunks/{NcDashboardWidgetItem-CfhAMc3T.mjs → NcDashboardWidgetItem-6JbU9gp1.mjs} +4 -4
  267. package/dist/chunks/{NcDashboardWidgetItem-CfhAMc3T.mjs.map → NcDashboardWidgetItem-6JbU9gp1.mjs.map} +1 -1
  268. package/dist/chunks/{NcDashboardWidgetItem-C5P0N-U_.cjs → NcDashboardWidgetItem-CgO8qJUQ.cjs} +4 -4
  269. package/dist/chunks/{NcDashboardWidgetItem-C5P0N-U_.cjs.map → NcDashboardWidgetItem-CgO8qJUQ.cjs.map} +1 -1
  270. package/dist/chunks/{NcDialog-C_IHQciE.mjs → NcDialog-C1b3UtA7.mjs} +2 -2
  271. package/dist/chunks/{NcDialog-C_IHQciE.mjs.map → NcDialog-C1b3UtA7.mjs.map} +1 -1
  272. package/dist/chunks/{NcDialog-Cqdo11BM.cjs → NcDialog-ps0F3IQM.cjs} +2 -2
  273. package/dist/chunks/{NcDialog-Cqdo11BM.cjs.map → NcDialog-ps0F3IQM.cjs.map} +1 -1
  274. package/dist/chunks/{NcDialogButton-_biPxXPQ.cjs → NcDialogButton-CEdM0Qnr.cjs} +3 -3
  275. package/dist/chunks/NcDialogButton-CEdM0Qnr.cjs.map +1 -0
  276. package/dist/chunks/{NcDialogButton-Cc3iWZH1.mjs → NcDialogButton-Di9tU3e_.mjs} +3 -3
  277. package/dist/chunks/NcDialogButton-Di9tU3e_.mjs.map +1 -0
  278. package/dist/chunks/{NcEmojiPicker-CD7z1FNp.cjs → NcEmojiPicker-CdH7bAGd.cjs} +10 -10
  279. package/dist/chunks/NcEmojiPicker-CdH7bAGd.cjs.map +1 -0
  280. package/dist/chunks/{NcEmojiPicker-C9kzoPy9.mjs → NcEmojiPicker-CyZg0bCF.mjs} +10 -10
  281. package/dist/chunks/NcEmojiPicker-CyZg0bCF.mjs.map +1 -0
  282. package/dist/chunks/{NcHeaderMenu-B12nEFGc.cjs → NcHeaderMenu-BWFubuox.cjs} +14 -5
  283. package/dist/chunks/NcHeaderMenu-BWFubuox.cjs.map +1 -0
  284. package/dist/chunks/{NcHeaderMenu--AvoyMeD.mjs → NcHeaderMenu-Dq_Avv2T.mjs} +14 -5
  285. package/dist/chunks/NcHeaderMenu-Dq_Avv2T.mjs.map +1 -0
  286. package/dist/chunks/{NcInputConfirmCancel-P1H1ymiB.mjs → NcInputConfirmCancel-DA740BJ-.mjs} +2 -2
  287. package/dist/chunks/{NcInputConfirmCancel-P1H1ymiB.mjs.map → NcInputConfirmCancel-DA740BJ-.mjs.map} +1 -1
  288. package/dist/chunks/{NcInputConfirmCancel-BpPXGiKs.cjs → NcInputConfirmCancel-Dz7-CkOl.cjs} +2 -2
  289. package/dist/chunks/{NcInputConfirmCancel-BpPXGiKs.cjs.map → NcInputConfirmCancel-Dz7-CkOl.cjs.map} +1 -1
  290. package/dist/chunks/{NcInputField-ixOGmIZ8.mjs → NcInputField-BNSfmQqu.mjs} +8 -4
  291. package/dist/chunks/NcInputField-BNSfmQqu.mjs.map +1 -0
  292. package/dist/chunks/{NcInputField-CfK08BcA.cjs → NcInputField-cT3u4gMS.cjs} +8 -4
  293. package/dist/chunks/NcInputField-cT3u4gMS.cjs.map +1 -0
  294. package/dist/chunks/{NcListItem-Dxhvk0tn.cjs → NcListItem-Bx9qm5xC.cjs} +2 -2
  295. package/dist/chunks/{NcListItem-Dxhvk0tn.cjs.map → NcListItem-Bx9qm5xC.cjs.map} +1 -1
  296. package/dist/chunks/{NcListItem-BkW4aSAh.mjs → NcListItem-CifyXFmv.mjs} +2 -2
  297. package/dist/chunks/{NcListItem-BkW4aSAh.mjs.map → NcListItem-CifyXFmv.mjs.map} +1 -1
  298. package/dist/chunks/{NcListItemIcon-DL1UGBlY.mjs → NcListItemIcon-CZrilo88.mjs} +2 -2
  299. package/dist/chunks/{NcListItemIcon-DL1UGBlY.mjs.map → NcListItemIcon-CZrilo88.mjs.map} +1 -1
  300. package/dist/chunks/{NcListItemIcon-Ceh9_B36.cjs → NcListItemIcon-DMhlNuU9.cjs} +2 -2
  301. package/dist/chunks/{NcListItemIcon-Ceh9_B36.cjs.map → NcListItemIcon-DMhlNuU9.cjs.map} +1 -1
  302. package/dist/chunks/{NcPasswordField-Bf_EN2zU.mjs → NcPasswordField-DSdrAkZy.mjs} +3 -3
  303. package/dist/chunks/{NcPasswordField-Bf_EN2zU.mjs.map → NcPasswordField-DSdrAkZy.mjs.map} +1 -1
  304. package/dist/chunks/{NcPasswordField-DflDMgYh.cjs → NcPasswordField-DcFBNVHn.cjs} +3 -3
  305. package/dist/chunks/{NcPasswordField-DflDMgYh.cjs.map → NcPasswordField-DcFBNVHn.cjs.map} +1 -1
  306. package/dist/chunks/{NcPopover-DH2oMHFe.cjs → NcPopover-DjeDGPXc.cjs} +44 -9
  307. package/dist/chunks/NcPopover-DjeDGPXc.cjs.map +1 -0
  308. package/dist/chunks/{NcPopover-4-YxCZOD.mjs → NcPopover-DxTXnL3u.mjs} +47 -12
  309. package/dist/chunks/NcPopover-DxTXnL3u.mjs.map +1 -0
  310. package/dist/chunks/{NcRelatedResourcesPanel-D_4x0nYR.cjs → NcRelatedResourcesPanel-BR_ggojH.cjs} +2 -2
  311. package/dist/chunks/{NcRelatedResourcesPanel-D_4x0nYR.cjs.map → NcRelatedResourcesPanel-BR_ggojH.cjs.map} +1 -1
  312. package/dist/chunks/{NcRelatedResourcesPanel-qQK3J_qe.mjs → NcRelatedResourcesPanel-DyvwxDjI.mjs} +2 -2
  313. package/dist/chunks/{NcRelatedResourcesPanel-qQK3J_qe.mjs.map → NcRelatedResourcesPanel-DyvwxDjI.mjs.map} +1 -1
  314. package/dist/chunks/{NcRichContenteditable-Vv9aizR-.mjs → NcRichContenteditable-CMQnS1Wz.mjs} +11 -11
  315. package/dist/chunks/NcRichContenteditable-CMQnS1Wz.mjs.map +1 -0
  316. package/dist/chunks/{NcRichContenteditable-Dwe0KT-g.cjs → NcRichContenteditable-DtkaJmwG.cjs} +11 -11
  317. package/dist/chunks/NcRichContenteditable-DtkaJmwG.cjs.map +1 -0
  318. package/dist/chunks/{NcRichText-Dk2KeWVm.cjs → NcRichText-7B9lDtoo.cjs} +3 -3
  319. package/dist/chunks/{NcRichText-Dk2KeWVm.cjs.map → NcRichText-7B9lDtoo.cjs.map} +1 -1
  320. package/dist/chunks/{NcRichText-CeLtcmp0.mjs → NcRichText-MMeidJmP.mjs} +3 -3
  321. package/dist/chunks/{NcRichText-CeLtcmp0.mjs.map → NcRichText-MMeidJmP.mjs.map} +1 -1
  322. package/dist/chunks/{NcSelect-mKPxrPJk.cjs → NcSelect-CrxryIo3.cjs} +3 -3
  323. package/dist/chunks/{NcSelect-mKPxrPJk.cjs.map → NcSelect-CrxryIo3.cjs.map} +1 -1
  324. package/dist/chunks/{NcSelect-dUFIWW35.mjs → NcSelect-okD5YTJq.mjs} +3 -3
  325. package/dist/chunks/{NcSelect-dUFIWW35.mjs.map → NcSelect-okD5YTJq.mjs.map} +1 -1
  326. package/dist/chunks/{NcSelectTags-D-ZtVQr7.mjs → NcSelectTags-BPxmiMto.mjs} +3 -3
  327. package/dist/chunks/{NcSelectTags-D-ZtVQr7.mjs.map → NcSelectTags-BPxmiMto.mjs.map} +1 -1
  328. package/dist/chunks/{NcSelectTags-D43sFJA2.cjs → NcSelectTags-BZqBdSqC.cjs} +3 -3
  329. package/dist/chunks/{NcSelectTags-D43sFJA2.cjs.map → NcSelectTags-BZqBdSqC.cjs.map} +1 -1
  330. package/dist/chunks/{NcSelectUsers-CpT8ELJ8.cjs → NcSelectUsers-CshAjqE_.cjs} +4 -4
  331. package/dist/chunks/{NcSelectUsers-CpT8ELJ8.cjs.map → NcSelectUsers-CshAjqE_.cjs.map} +1 -1
  332. package/dist/chunks/{NcSelectUsers-C7sxHP1r.mjs → NcSelectUsers-DK3EtvnG.mjs} +4 -4
  333. package/dist/chunks/{NcSelectUsers-C7sxHP1r.mjs.map → NcSelectUsers-DK3EtvnG.mjs.map} +1 -1
  334. package/dist/chunks/{NcSettingsInputText-DYN2i2d2.mjs → NcSettingsInputText-BKoaCiQU.mjs} +2 -2
  335. package/dist/chunks/{NcSettingsInputText-DYN2i2d2.mjs.map → NcSettingsInputText-BKoaCiQU.mjs.map} +1 -1
  336. package/dist/chunks/{NcSettingsInputText-Cf-juMyF.cjs → NcSettingsInputText-D7eoCI2o.cjs} +2 -2
  337. package/dist/chunks/{NcSettingsInputText-Cf-juMyF.cjs.map → NcSettingsInputText-D7eoCI2o.cjs.map} +1 -1
  338. package/dist/chunks/{NcSettingsSection-VrSMms0R.cjs → NcSettingsSection-Bmo90KQR.cjs} +2 -2
  339. package/dist/chunks/{NcSettingsSection-VrSMms0R.cjs.map → NcSettingsSection-Bmo90KQR.cjs.map} +1 -1
  340. package/dist/chunks/{NcSettingsSection-DK0dtGcw.mjs → NcSettingsSection-fe_YIg-L.mjs} +2 -2
  341. package/dist/chunks/{NcSettingsSection-DK0dtGcw.mjs.map → NcSettingsSection-fe_YIg-L.mjs.map} +1 -1
  342. package/dist/chunks/{NcSettingsSelectGroup-B3PCXeTE.mjs → NcSettingsSelectGroup-CUUKv6lH.mjs} +3 -3
  343. package/dist/chunks/{NcSettingsSelectGroup-B3PCXeTE.mjs.map → NcSettingsSelectGroup-CUUKv6lH.mjs.map} +1 -1
  344. package/dist/chunks/{NcSettingsSelectGroup-CW5zc5my.cjs → NcSettingsSelectGroup-Dd04CVAM.cjs} +3 -3
  345. package/dist/chunks/{NcSettingsSelectGroup-CW5zc5my.cjs.map → NcSettingsSelectGroup-Dd04CVAM.cjs.map} +1 -1
  346. package/dist/chunks/{NcTextArea-MvdupZXi.cjs → NcTextArea-B2hcap39.cjs} +9 -4
  347. package/dist/chunks/NcTextArea-B2hcap39.cjs.map +1 -0
  348. package/dist/chunks/{NcTextArea-HIcTePZQ.mjs → NcTextArea-BFLuhsEv.mjs} +9 -4
  349. package/dist/chunks/NcTextArea-BFLuhsEv.mjs.map +1 -0
  350. package/dist/chunks/{NcTextField-C1dfqkDm.cjs → NcTextField-DDJqk3SI.cjs} +4 -4
  351. package/dist/chunks/{NcTextField-C1dfqkDm.cjs.map → NcTextField-DDJqk3SI.cjs.map} +1 -1
  352. package/dist/chunks/{NcTextField-BpHFogO-.mjs → NcTextField-eKuP0G6I.mjs} +4 -4
  353. package/dist/chunks/{NcTextField-BpHFogO-.mjs.map → NcTextField-eKuP0G6I.mjs.map} +1 -1
  354. package/dist/chunks/{NcTimezonePicker-Wwx4gzK_.mjs → NcTimezonePicker-BbqblRd7.mjs} +4 -4
  355. package/dist/chunks/{NcTimezonePicker-Wwx4gzK_.mjs.map → NcTimezonePicker-BbqblRd7.mjs.map} +1 -1
  356. package/dist/chunks/{NcTimezonePicker-ClV6QojF.cjs → NcTimezonePicker-DV_arh0f.cjs} +4 -4
  357. package/dist/chunks/{NcTimezonePicker-ClV6QojF.cjs.map → NcTimezonePicker-DV_arh0f.cjs.map} +1 -1
  358. package/dist/chunks/{NcUserBubble-DFos_NnH.mjs → NcUserBubble-C7XtYsrf.mjs} +3 -3
  359. package/dist/chunks/{NcUserBubble-DFos_NnH.mjs.map → NcUserBubble-C7XtYsrf.mjs.map} +1 -1
  360. package/dist/chunks/{NcUserBubble-BmUfbXN0.cjs → NcUserBubble-DuyMsPzl.cjs} +3 -3
  361. package/dist/chunks/{NcUserBubble-BmUfbXN0.cjs.map → NcUserBubble-DuyMsPzl.cjs.map} +1 -1
  362. package/dist/chunks/{NcUserStatusIcon-BeuFRhWr.cjs → NcUserStatusIcon-CKPJ27oi.cjs} +16 -18
  363. package/dist/chunks/NcUserStatusIcon-CKPJ27oi.cjs.map +1 -0
  364. package/dist/chunks/{NcUserStatusIcon-Biiq6zqy.mjs → NcUserStatusIcon-DQr5EGWZ.mjs} +16 -18
  365. package/dist/chunks/NcUserStatusIcon-DQr5EGWZ.mjs.map +1 -0
  366. package/dist/chunks/{ScopeComponent-DxrG1ptt.mjs → ScopeComponent-B_NOkzpc.mjs} +2 -2
  367. package/dist/chunks/{ScopeComponent-DxrG1ptt.mjs.map → ScopeComponent-B_NOkzpc.mjs.map} +1 -1
  368. package/dist/chunks/{ScopeComponent-X0gqPFY9.cjs → ScopeComponent-CbzbU6pi.cjs} +2 -2
  369. package/dist/chunks/{ScopeComponent-X0gqPFY9.cjs.map → ScopeComponent-CbzbU6pi.cjs.map} +1 -1
  370. package/dist/chunks/{_l10n-BU8-kQzN.mjs → _l10n-CW0YfIWk.mjs} +19 -19
  371. package/dist/chunks/_l10n-CW0YfIWk.mjs.map +1 -0
  372. package/dist/chunks/{_l10n-DpwcsAC3.cjs → _l10n-RKohWu5d.cjs} +6 -6
  373. package/dist/chunks/{_l10n-DpwcsAC3.cjs.map → _l10n-RKohWu5d.cjs.map} +1 -1
  374. package/dist/chunks/{index-56SXuvlv.mjs → customPickerElements-CH9vlHLd.mjs} +47 -46
  375. package/dist/chunks/customPickerElements-CH9vlHLd.mjs.map +1 -0
  376. package/dist/chunks/{index-BV85rPB7.cjs → customPickerElements-Q3Y7fgZ1.cjs} +42 -41
  377. package/dist/chunks/customPickerElements-Q3Y7fgZ1.cjs.map +1 -0
  378. package/dist/chunks/mdi-BBwE-MZC.cjs +24 -0
  379. package/dist/chunks/{mdi-BqDPfc6J.cjs.map → mdi-BBwE-MZC.cjs.map} +1 -1
  380. package/dist/chunks/mdi-DXu6GWVJ.mjs +25 -0
  381. package/dist/chunks/{mdi-vLkDaZ9y.mjs.map → mdi-DXu6GWVJ.mjs.map} +1 -1
  382. package/dist/chunks/{referencePickerModal-CXQey71p.mjs → referencePickerModal-B2nPzrke.mjs} +46 -52
  383. package/dist/chunks/referencePickerModal-B2nPzrke.mjs.map +1 -0
  384. package/dist/chunks/{referencePickerModal-BVu6vAC8.cjs → referencePickerModal-BINQW-pL.cjs} +54 -60
  385. package/dist/chunks/referencePickerModal-BINQW-pL.cjs.map +1 -0
  386. package/dist/components/NcAssistantButton/index.d.ts +5 -0
  387. package/dist/components/NcAssistantContent/index.d.ts +5 -0
  388. package/dist/components/NcAssistantIcon/index.d.ts +5 -0
  389. package/dist/functions/reference/customPickerElements.d.ts +56 -0
  390. package/dist/functions/reference/index.d.ts +8 -0
  391. package/dist/functions/reference/providerHelper.d.ts +45 -0
  392. package/dist/functions/reference/referencePickerModal.d.ts +11 -0
  393. package/dist/functions/reference/widgets.d.ts +47 -28
  394. package/dist/functions/registerReference/index.d.ts +6 -0
  395. package/dist/index.cjs +65 -56
  396. package/dist/index.cjs.map +1 -1
  397. package/dist/index.mjs +63 -54
  398. package/dist/index.mjs.map +1 -1
  399. package/package.json +1 -1
  400. package/dist/assets/NcEmojiPicker-Ca6U46T8.css +0 -575
  401. package/dist/assets/NcTextArea-B46u6ku9.css +0 -112
  402. package/dist/chunks/NcAppNavigationItem-B-uv2tWu.cjs.map +0 -1
  403. package/dist/chunks/NcAppNavigationItem-CbtPNTg_.mjs.map +0 -1
  404. package/dist/chunks/NcAppNavigationSettings-DhQ5tXEJ.mjs +0 -109
  405. package/dist/chunks/NcAppNavigationSettings-DhQ5tXEJ.mjs.map +0 -1
  406. package/dist/chunks/NcAppNavigationSettings-DnvFbZyP.cjs +0 -108
  407. package/dist/chunks/NcAppNavigationSettings-DnvFbZyP.cjs.map +0 -1
  408. package/dist/chunks/NcCheckboxRadioSwitch-BJg75WBj.mjs.map +0 -1
  409. package/dist/chunks/NcCheckboxRadioSwitch-G28IJAL-.cjs.map +0 -1
  410. package/dist/chunks/NcDialogButton-Cc3iWZH1.mjs.map +0 -1
  411. package/dist/chunks/NcDialogButton-_biPxXPQ.cjs.map +0 -1
  412. package/dist/chunks/NcEmojiPicker-C9kzoPy9.mjs.map +0 -1
  413. package/dist/chunks/NcEmojiPicker-CD7z1FNp.cjs.map +0 -1
  414. package/dist/chunks/NcHeaderMenu--AvoyMeD.mjs.map +0 -1
  415. package/dist/chunks/NcHeaderMenu-B12nEFGc.cjs.map +0 -1
  416. package/dist/chunks/NcInputField-CfK08BcA.cjs.map +0 -1
  417. package/dist/chunks/NcInputField-ixOGmIZ8.mjs.map +0 -1
  418. package/dist/chunks/NcPopover-4-YxCZOD.mjs.map +0 -1
  419. package/dist/chunks/NcPopover-DH2oMHFe.cjs.map +0 -1
  420. package/dist/chunks/NcRichContenteditable-Dwe0KT-g.cjs.map +0 -1
  421. package/dist/chunks/NcRichContenteditable-Vv9aizR-.mjs.map +0 -1
  422. package/dist/chunks/NcTextArea-HIcTePZQ.mjs.map +0 -1
  423. package/dist/chunks/NcTextArea-MvdupZXi.cjs.map +0 -1
  424. package/dist/chunks/NcUserStatusIcon-BeuFRhWr.cjs.map +0 -1
  425. package/dist/chunks/NcUserStatusIcon-Biiq6zqy.mjs.map +0 -1
  426. package/dist/chunks/_l10n-BU8-kQzN.mjs.map +0 -1
  427. package/dist/chunks/index-56SXuvlv.mjs.map +0 -1
  428. package/dist/chunks/index-BV85rPB7.cjs.map +0 -1
  429. package/dist/chunks/mdi-BqDPfc6J.cjs +0 -18
  430. package/dist/chunks/mdi-vLkDaZ9y.mjs +0 -19
  431. package/dist/chunks/referencePickerModal-BVu6vAC8.cjs.map +0 -1
  432. package/dist/chunks/referencePickerModal-CXQey71p.mjs.map +0 -1
@@ -123,7 +123,7 @@
123
123
  /*
124
124
  * Ensure proper alignment of the vue material icons
125
125
  */
126
- .material-design-icon[data-v-de9850e4] {
126
+ .material-design-icon[data-v-93468058] {
127
127
  display: flex;
128
128
  align-self: center;
129
129
  justify-self: center;
@@ -140,40 +140,40 @@
140
140
  /*
141
141
  * Ensure proper alignment of the vue material icons
142
142
  */
143
- .material-design-icon[data-v-f03ee0c9] {
143
+ .material-design-icon[data-v-10f6fc31] {
144
144
  display: flex;
145
145
  align-self: center;
146
146
  justify-self: center;
147
147
  align-items: center;
148
148
  justify-content: center;
149
149
  }
150
- .provider-list[data-v-f03ee0c9] {
150
+ .provider-list[data-v-10f6fc31] {
151
151
  width: 100%;
152
152
  min-height: 400px;
153
153
  padding: 0 16px 16px 16px;
154
154
  display: flex;
155
155
  flex-direction: column;
156
156
  }
157
- .provider-list--select[data-v-f03ee0c9] {
157
+ .provider-list--select[data-v-10f6fc31] {
158
158
  width: 100%;
159
159
  }
160
- .provider-list--select .provider[data-v-f03ee0c9] {
160
+ .provider-list--select .provider[data-v-10f6fc31] {
161
161
  display: flex;
162
162
  align-items: center;
163
163
  height: 28px;
164
164
  overflow: hidden;
165
165
  }
166
- .provider-list--select .provider .link-icon[data-v-f03ee0c9] {
166
+ .provider-list--select .provider .link-icon[data-v-10f6fc31] {
167
167
  margin-inline-end: 8px;
168
168
  }
169
- .provider-list--select .provider .provider-icon[data-v-f03ee0c9] {
169
+ .provider-list--select .provider .provider-icon[data-v-10f6fc31] {
170
170
  width: 20px;
171
171
  height: 20px;
172
172
  object-fit: contain;
173
173
  margin-inline-end: 8px;
174
174
  filter: var(--background-invert-if-dark);
175
175
  }
176
- .provider-list--select .provider .option-text[data-v-f03ee0c9] {
176
+ .provider-list--select .provider .option-text[data-v-10f6fc31] {
177
177
  overflow: hidden;
178
178
  text-overflow: ellipsis;
179
179
  white-space: nowrap;
@@ -326,24 +326,24 @@
326
326
  /*
327
327
  * Ensure proper alignment of the vue material icons
328
328
  */
329
- .material-design-icon[data-v-cd33df8e] {
329
+ .material-design-icon[data-v-98624f25] {
330
330
  display: flex;
331
331
  align-self: center;
332
332
  justify-self: center;
333
333
  align-items: center;
334
334
  justify-content: center;
335
335
  }
336
- .reference-picker[data-v-cd33df8e] {
336
+ .reference-picker[data-v-98624f25] {
337
337
  display: flex;
338
338
  overflow-y: auto;
339
339
  width: 100%;
340
340
  }
341
- .reference-picker .custom-element-wrapper[data-v-cd33df8e] {
341
+ .reference-picker .custom-element-wrapper[data-v-98624f25] {
342
342
  display: flex;
343
343
  overflow-y: auto;
344
344
  width: 100%;
345
345
  }
346
- .reference-picker .custom-element-wrapper .custom-element[data-v-cd33df8e] {
346
+ .reference-picker .custom-element-wrapper .custom-element[data-v-98624f25] {
347
347
  display: flex;
348
348
  overflow-y: auto;
349
349
  width: 100%;
@@ -358,34 +358,17 @@
358
358
  /*
359
359
  * Ensure proper alignment of the vue material icons
360
360
  */
361
- .material-design-icon {
361
+ .material-design-icon[data-v-13d8f21e] {
362
362
  display: flex;
363
363
  align-self: center;
364
364
  justify-self: center;
365
365
  align-items: center;
366
366
  justify-content: center;
367
367
  }
368
- .reference-picker-modal .modal-container {
368
+ .reference-picker-modal[data-v-13d8f21e] .modal-container {
369
369
  display: flex !important;
370
- }/**
371
- * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
372
- * SPDX-License-Identifier: AGPL-3.0-or-later
373
- */
374
- /**
375
- * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
376
- * SPDX-License-Identifier: AGPL-3.0-or-later
377
- */
378
- /*
379
- * Ensure proper alignment of the vue material icons
380
- */
381
- .material-design-icon[data-v-c66449c1] {
382
- display: flex;
383
- align-self: center;
384
- justify-self: center;
385
- align-items: center;
386
- justify-content: center;
387
370
  }
388
- .reference-picker-modal--content[data-v-c66449c1] {
371
+ .reference-picker-modal--content[data-v-13d8f21e] {
389
372
  width: 100%;
390
373
  display: flex;
391
374
  flex-direction: column;
@@ -393,21 +376,21 @@
393
376
  justify-content: center;
394
377
  overflow-y: auto;
395
378
  }
396
- .reference-picker-modal--content .close-button[data-v-c66449c1],
397
- .reference-picker-modal--content .back-button[data-v-c66449c1] {
379
+ .reference-picker-modal--content .close-button[data-v-13d8f21e],
380
+ .reference-picker-modal--content .back-button[data-v-13d8f21e] {
398
381
  position: absolute;
399
382
  top: 4px;
400
383
  }
401
- .reference-picker-modal--content .back-button[data-v-c66449c1] {
384
+ .reference-picker-modal--content .back-button[data-v-13d8f21e] {
402
385
  inset-inline-start: 4px;
403
386
  }
404
- .reference-picker-modal--content .close-button[data-v-c66449c1] {
387
+ .reference-picker-modal--content .close-button[data-v-13d8f21e] {
405
388
  inset-inline-end: 4px;
406
389
  }
407
- .reference-picker-modal--content > h2[data-v-c66449c1] {
390
+ .reference-picker-modal--content > h2[data-v-13d8f21e] {
408
391
  display: flex;
409
392
  margin: 12px 0 20px 0;
410
393
  }
411
- .reference-picker-modal--content > h2 .icon[data-v-c66449c1] {
394
+ .reference-picker-modal--content > h2 .icon[data-v-13d8f21e] {
412
395
  margin-inline-end: 8px;
413
396
  }
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const _l10n = require("./_l10n-DpwcsAC3.cjs");
2
+ const _l10n = require("./_l10n-RKohWu5d.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-BnYS3bvv.cjs.map
133
+ //# sourceMappingURL=GenColors-BjsCKF7S.cjs.map
@@ -1 +1 @@
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,S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,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-BjsCKF7S.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,OA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;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-BU8-kQzN.mjs";
1
+ import { r as register, t as t3, a as t } from "./_l10n-CW0YfIWk.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-DNN63dHB.mjs.map
134
+ //# sourceMappingURL=GenColors-BrpkL3hT.mjs.map
@@ -1 +1 @@
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,QAA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,WAAW,WAAW,OAAO,MAAM,GAAG;AAE5C,SAAO,SAAS,OAAO,QAAQ,EAAE,OAAO,QAAQ;AACjD;"}
1
+ {"version":3,"file":"GenColors-BrpkL3hT.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,KA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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-BqDPfc6J.cjs");
3
+ const mdi = require("./mdi-BBwE-MZC.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-2qh96K_i.cjs.map
181
+ //# sourceMappingURL=NcActionButton-BhSk7AAp.cjs.map
@@ -1 +1 @@
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: pointer;\n\t}\n}\n</style>\n"],"names":["NcIconSvgWrapper","ActionTextMixin","mdiCheck","mdiChevronRight"],"mappings":";;;;;AAoYA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,kBAAAA,iBAAA;AAAA,EACA;AAAA,EACA,QAAA,CAAAC,WAAAA,eAAA;AAAA,EAEA,QAAA;AAAA,IACA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;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AA;AAAA;AAAA,IAKA,mBAAA;AACA,YAAA,aAAA,CAAA;AAEA,UAAA,KAAA,kBAAA;AAEA,mBAAA,OAAA;AAEA,YAAA,KAAA,SAAA,SAAA;AACA,qBAAA,OAAA;AACA,qBAAA,cAAA,IAAA,KAAA,YAAA,SAAA;AAAA,QACA,WAAA,KAAA,SAAA,cAAA,KAAA,eAAA,YAAA,KAAA,eAAA,MAAA;AAEA,qBAAA,OAAA;AACA,qBAAA,cAAA,IAAA,KAAA,eAAA,OAAA,UAAA,KAAA,aAAA,SAAA;AAAA,QACA;AAAA,MACA,WAAA,KAAA,eAAA,QAAA,KAAA,eAAA,UAAA;AAEA,mBAAA,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-BhSk7AAp.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","ActionTextMixin","mdiCheck","mdiChevronRight"],"mappings":";;;;;AAoYA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,kBAAAA,iBAAA;AAAA,EACA;AAAA,EACA,QAAA,CAAAC,WAAAA,eAAA;AAAA,EAEA,QAAA;AAAA,IACA,kBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;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eAAA,KAAA;AAAA,MACA;AACA,aAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,mBAAA;AACA,YAAA,aAAA,CAAA;AAEA,UAAA,KAAA,kBAAA;AAEA,mBAAA,OAAA;AAEA,YAAA,KAAA,SAAA,SAAA;AACA,qBAAA,OAAA;AACA,qBAAA,cAAA,IAAA,KAAA,YAAA,SAAA;AAAA,QACA,WAAA,KAAA,SAAA,cAAA,KAAA,eAAA,YAAA,KAAA,eAAA,MAAA;AAEA,qBAAA,OAAA;AACA,qBAAA,cAAA,IAAA,KAAA,eAAA,OAAA,UAAA,KAAA,aAAA,SAAA;AAAA,QACA;AAAA,MACA,WAAA,KAAA,eAAA,QAAA,KAAA,eAAA,UAAA;AAEA,mBAAA,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,5 +1,5 @@
1
1
  import '../assets/NcActionButton-D8Lyueq3.css';
2
- import { m as mdiChevronRight, a as mdiCheck } from "./mdi-vLkDaZ9y.mjs";
2
+ import { m as mdiChevronRight, a as mdiCheck } from "./mdi-DXu6GWVJ.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-CHrE7amZ.mjs.map
182
+ //# sourceMappingURL=NcActionButton-DC3oAI2L.mjs.map
@@ -1 +1 @@
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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,YAAA;AAAA,MACA,MAAA,CAAA,SAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAA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A,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-DC3oAI2L.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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,YAAA;AAAA,MACA,MAAA,CAAA,SAAA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,aAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA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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,8 +1,8 @@
1
- require('../assets/NcActionButtonGroup-BND4GQdv.css');
1
+ require('../assets/NcActionButtonGroup-oAqMyrzr.css');
2
2
  "use strict";
3
3
  const Vue = require("vue");
4
4
  const GenRandomId = require("./GenRandomId-BQDud3d4.cjs");
5
- const _l10n = require("./_l10n-DpwcsAC3.cjs");
5
+ const _l10n = require("./_l10n-RKohWu5d.cjs");
6
6
  const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
7
7
  _l10n.register();
8
8
  const _sfc_main = Vue.defineComponent({
@@ -44,8 +44,8 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
44
44
  _sfc_staticRenderFns,
45
45
  false,
46
46
  null,
47
- null
47
+ "bc844f45"
48
48
  );
49
49
  const NcActionButtonGroup = __component__.exports;
50
50
  exports.NcActionButtonGroup = NcActionButtonGroup;
51
- //# sourceMappingURL=NcActionButtonGroup-B8Bj-Qb3.cjs.map
51
+ //# sourceMappingURL=NcActionButtonGroup-Cr4OSmyb.cjs.map
@@ -1 +1 @@
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
+ {"version":3,"file":"NcActionButtonGroup-Cr4OSmyb.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\" scoped>\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\n\t\t:deep(li) {\n\t\t\tflex: 1 1;\n\t\t}\n\n\t\t:deep(.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
- import '../assets/NcActionButtonGroup-BND4GQdv.css';
1
+ import '../assets/NcActionButtonGroup-oAqMyrzr.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-BU8-kQzN.mjs";
4
+ import { r as register, a as t } from "./_l10n-CW0YfIWk.mjs";
5
5
  import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
6
6
  register();
7
7
  const _sfc_main = defineComponent({
@@ -43,10 +43,10 @@ var __component__ = /* @__PURE__ */ normalizeComponent(
43
43
  _sfc_staticRenderFns,
44
44
  false,
45
45
  null,
46
- null
46
+ "bc844f45"
47
47
  );
48
48
  const NcActionButtonGroup = __component__.exports;
49
49
  export {
50
50
  NcActionButtonGroup as N
51
51
  };
52
- //# sourceMappingURL=NcActionButtonGroup-_R4fp-bK.mjs.map
52
+ //# sourceMappingURL=NcActionButtonGroup-hhh3GBSS.mjs.map
@@ -1 +1 @@
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;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcActionButtonGroup-hhh3GBSS.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\" scoped>\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\n\t\t:deep(li) {\n\t\t\tflex: 1 1;\n\t\t}\n\n\t\t:deep(.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,11 +1,11 @@
1
1
  import '../assets/NcActionInput-D79204Jr.css';
2
2
  import { defineAsyncComponent } from "vue";
3
3
  import NcDateTimePickerNative from "../Components/NcDateTimePickerNative.mjs";
4
- import { N as NcPasswordField } from "./NcPasswordField-Bf_EN2zU.mjs";
5
- import { N as NcTextField } from "./NcTextField-BpHFogO-.mjs";
4
+ import { N as NcPasswordField } from "./NcPasswordField-DSdrAkZy.mjs";
5
+ import { N as NcTextField } from "./NcTextField-eKuP0G6I.mjs";
6
6
  import { A as ActionGlobalMixin } from "./actionGlobal-DqVa7c7G.mjs";
7
7
  import { G as GenRandomId } from "./GenRandomId-CMooMQt0.mjs";
8
- import { r as register, i as t47, a as t } from "./_l10n-BU8-kQzN.mjs";
8
+ import { r as register, i as t47, a as t } from "./_l10n-CW0YfIWk.mjs";
9
9
  import { u as useModelMigration } from "./useModelMigration-EhAWvqDD.mjs";
10
10
  import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
11
11
  register(t47);
@@ -283,4 +283,4 @@ const NcActionInput = __component__.exports;
283
283
  export {
284
284
  NcActionInput as N
285
285
  };
286
- //# sourceMappingURL=NcActionInput-BeBxzPFZ.mjs.map
286
+ //# sourceMappingURL=NcActionInput-B5ysJl2S.mjs.map