@nextcloud/vue 9.7.0 → 9.8.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 (278) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/assets/{NcActionButton-Bb0ihLdt.css → NcActionButton-DLer-aUY.css} +3 -2
  3. package/dist/assets/{NcActionCheckbox-DLJQfCUI.css → NcActionCheckbox-wD8m_a8-.css} +3 -2
  4. package/dist/assets/{NcActionInput-BO4gR6sg.css → NcActionInput-t9WvlgV0.css} +66 -66
  5. package/dist/assets/{NcActionLink-DAEr-vmd.css → NcActionLink-b4Ph5q10.css} +3 -2
  6. package/dist/assets/{NcActionRadio-Bd4RFH-l.css → NcActionRadio-D2rLM1ci.css} +3 -2
  7. package/dist/assets/{NcActionRouter-DeYzeM5W.css → NcActionRouter-BWXfCfxM.css} +3 -2
  8. package/dist/assets/{NcActionText-D9InmayH.css → NcActionText-Dzegj6AY.css} +3 -2
  9. package/dist/assets/{NcActionTextEditable-TPYz4ma-.css → NcActionTextEditable-BlZeHZ7J.css} +66 -66
  10. package/dist/assets/{NcAppNavigation-BSo8jV19.css → NcAppNavigation-ykL7Wz6L.css} +18 -12
  11. package/dist/assets/{NcAppNavigationCaption-HUg9fMCm.css → NcAppNavigationCaption-ggcWspH2.css} +8 -8
  12. package/dist/assets/{NcAppNavigationItem-qicc4X_c.css → NcAppNavigationItem-DF81QkEz.css} +78 -40
  13. package/dist/assets/{NcAppNavigationNewItem-e_CtdnzP.css → NcAppNavigationNewItem-vxkB61-C.css} +42 -4
  14. package/dist/assets/{NcAppNavigationSettings-BmfpoWXN.css → NcAppNavigationSettings-HQEDobBQ.css} +1 -1
  15. package/dist/assets/NcAppSettingsDialog-B6-RqGYA.css +221 -0
  16. package/dist/assets/{NcAppSettingsSection-ObwpPdgW.css → NcAppSettingsSection-DIw8GLHR.css} +7 -7
  17. package/dist/assets/{NcAppSidebar-Ci7hXMpX.css → NcAppSidebar-BMon2CtX.css} +116 -70
  18. package/dist/assets/{NcAvatar-CuPj3fbb.css → NcAvatar-Bs7qEhkA.css} +25 -25
  19. package/dist/assets/{NcBreadcrumb-D9N_qB_o.css → NcBreadcrumb-BxhZKQlW.css} +16 -16
  20. package/dist/assets/{NcButton-CCY9S6Db.css → NcButton-Bf9wuDV-.css} +53 -50
  21. package/dist/assets/{NcCheckboxRadioSwitch-DRqOiQON.css → NcCheckboxRadioSwitch-CZYa6mnQ.css} +51 -49
  22. package/dist/assets/{NcColorPicker-CCanY5eB.css → NcColorPicker-DVYGs8R3.css} +32 -32
  23. package/dist/assets/{NcContent-CVIwhwfc.css → NcContent-DXc6geEw.css} +23 -11
  24. package/dist/assets/{NcEmptyContent-CLjlZ-UT.css → NcEmptyContent-DJMDuGVz.css} +10 -10
  25. package/dist/assets/{NcFormBoxItem-CATNOTQx.css → NcFormBoxItem-Bjbi17-B.css} +4 -0
  26. package/dist/assets/{NcFormGroup-BjWhd5Ky.css → NcFormGroup-qFucmL8a.css} +1 -1
  27. package/dist/assets/{NcHotkeyList-Braxeyah.css → NcHotkeyList-BfrEkKmK.css} +1 -1
  28. package/dist/assets/NcInputConfirmCancel-BEmwC87z.css +53 -0
  29. package/dist/assets/{NcInputField-DR0FULeu.css → NcInputField-DpyFJ1xw.css} +44 -44
  30. package/dist/assets/NcListItem-1uR7AJIf.css +219 -0
  31. package/dist/assets/{NcModal-RDmyJqvC.css → NcModal-UuJKmueo.css} +59 -59
  32. package/dist/assets/{NcNoteCard-DZSuYX4-.css → NcNoteCard-DfescGKl.css} +11 -11
  33. package/dist/assets/{NcRadioGroupButton-xGU7fVa3.css → NcRadioGroupButton-DUF_3DDU.css} +1 -1
  34. package/dist/assets/{NcRelatedResourcesPanel-Bx4CA8ph.css → NcRelatedResourcesPanel-CiG_Ixb6.css} +30 -30
  35. package/dist/assets/{NcRichContenteditable-BXRR0rmI.css → NcRichContenteditable-DNABzVif.css} +12 -12
  36. package/dist/assets/{NcRichText-9e40m1to.css → NcRichText-D0Dv1hVB.css} +93 -93
  37. package/dist/assets/{NcTextArea-DF9NgPUa.css → NcTextArea-BxGe3Lqn.css} +28 -28
  38. package/dist/assets/{referencePickerModal-CpzDUJ5f.css → referencePickerModal-Dod7nzta.css} +18 -18
  39. package/dist/chunks/{NcActionButton-BuRnYpJX.mjs → NcActionButton-BJKJG2zO.mjs} +2 -2
  40. package/dist/chunks/{NcActionButton-BuRnYpJX.mjs.map → NcActionButton-BJKJG2zO.mjs.map} +1 -1
  41. package/dist/chunks/{NcActionCheckbox-CjawS972.mjs → NcActionCheckbox-D2Fu35M_.mjs} +2 -2
  42. package/dist/chunks/{NcActionCheckbox-CjawS972.mjs.map → NcActionCheckbox-D2Fu35M_.mjs.map} +1 -1
  43. package/dist/chunks/{NcActionInput-CKbFgbxQ.mjs → NcActionInput-gv6uLn_N.mjs} +5 -5
  44. package/dist/chunks/{NcActionInput-CKbFgbxQ.mjs.map → NcActionInput-gv6uLn_N.mjs.map} +1 -1
  45. package/dist/chunks/{NcActionLink-CCszAEdZ.mjs → NcActionLink-BFiaYt9A.mjs} +2 -2
  46. package/dist/chunks/{NcActionLink-CCszAEdZ.mjs.map → NcActionLink-BFiaYt9A.mjs.map} +1 -1
  47. package/dist/chunks/{NcActionRadio-BV9Ra5tq.mjs → NcActionRadio-BJ4i9n8a.mjs} +2 -2
  48. package/dist/chunks/{NcActionRadio-BV9Ra5tq.mjs.map → NcActionRadio-BJ4i9n8a.mjs.map} +1 -1
  49. package/dist/chunks/{NcActionRouter-CvDVCQiQ.mjs → NcActionRouter-vYFtIOzD.mjs} +2 -2
  50. package/dist/chunks/{NcActionRouter-CvDVCQiQ.mjs.map → NcActionRouter-vYFtIOzD.mjs.map} +1 -1
  51. package/dist/chunks/{NcActionText-SU4ghOlw.mjs → NcActionText-CQ9qwJ0p.mjs} +2 -2
  52. package/dist/chunks/{NcActionText-SU4ghOlw.mjs.map → NcActionText-CQ9qwJ0p.mjs.map} +1 -1
  53. package/dist/chunks/{NcActionTextEditable-BC66QDvV.mjs → NcActionTextEditable-Bd6fU8b3.mjs} +3 -3
  54. package/dist/chunks/NcActionTextEditable-Bd6fU8b3.mjs.map +1 -0
  55. package/dist/chunks/{NcActions-CeP_c9MH.mjs → NcActions-fCXSb_0o.mjs} +2 -2
  56. package/dist/chunks/{NcActions-CeP_c9MH.mjs.map → NcActions-fCXSb_0o.mjs.map} +1 -1
  57. package/dist/chunks/{NcAppContent-CdEdgX3o.mjs → NcAppContent-taTvqnvd.mjs} +2 -2
  58. package/dist/chunks/{NcAppContent-CdEdgX3o.mjs.map → NcAppContent-taTvqnvd.mjs.map} +1 -1
  59. package/dist/chunks/{NcAppNavigation-C2njwnqV.mjs → NcAppNavigation-Bb54U_qJ.mjs} +9 -5
  60. package/dist/chunks/NcAppNavigation-Bb54U_qJ.mjs.map +1 -0
  61. package/dist/chunks/{NcAppNavigationCaption-C7cl2M2w.mjs → NcAppNavigationCaption-CwaRTmmd.mjs} +4 -4
  62. package/dist/chunks/{NcAppNavigationCaption-C7cl2M2w.mjs.map → NcAppNavigationCaption-CwaRTmmd.mjs.map} +1 -1
  63. package/dist/chunks/{NcAppNavigationItem-Csh8IBIf.mjs → NcAppNavigationItem-Dg2d2AwS.mjs} +19 -13
  64. package/dist/chunks/NcAppNavigationItem-Dg2d2AwS.mjs.map +1 -0
  65. package/dist/chunks/{NcAppNavigationNew-BkybFzV0.mjs → NcAppNavigationNew-Ch_kPggd.mjs} +2 -2
  66. package/dist/chunks/{NcAppNavigationNew-BkybFzV0.mjs.map → NcAppNavigationNew-Ch_kPggd.mjs.map} +1 -1
  67. package/dist/chunks/{NcAppNavigationNewItem-DsLct9Bj.mjs → NcAppNavigationNewItem-DYM8hEa7.mjs} +3 -3
  68. package/dist/chunks/{NcAppNavigationNewItem-DsLct9Bj.mjs.map → NcAppNavigationNewItem-DYM8hEa7.mjs.map} +1 -1
  69. package/dist/chunks/{NcAppNavigationSearch-C5XwT74Z.mjs → NcAppNavigationSearch-BWHsAoc1.mjs} +2 -2
  70. package/dist/chunks/{NcAppNavigationSearch-C5XwT74Z.mjs.map → NcAppNavigationSearch-BWHsAoc1.mjs.map} +1 -1
  71. package/dist/chunks/{NcAppNavigationSettings-Drwi5qgh.mjs → NcAppNavigationSettings-CJ2z5cYU.mjs} +4 -4
  72. package/dist/chunks/{NcAppNavigationSettings-Drwi5qgh.mjs.map → NcAppNavigationSettings-CJ2z5cYU.mjs.map} +1 -1
  73. package/dist/chunks/{NcAppSettingsDialog-CjOvPWbc.mjs → NcAppSettingsDialog-37Ko8yBC.mjs} +19 -13
  74. package/dist/chunks/NcAppSettingsDialog-37Ko8yBC.mjs.map +1 -0
  75. package/dist/chunks/{NcAppSettingsSection-B-ak1kbx.mjs → NcAppSettingsSection-MusCsTGg.mjs} +3 -3
  76. package/dist/chunks/{NcAppSettingsSection-B-ak1kbx.mjs.map → NcAppSettingsSection-MusCsTGg.mjs.map} +1 -1
  77. package/dist/chunks/{NcAppSettingsShortcutsSection-yDWzNzFB.mjs → NcAppSettingsShortcutsSection-C0io5RJP.mjs} +2 -2
  78. package/dist/chunks/{NcAppSettingsShortcutsSection-yDWzNzFB.mjs.map → NcAppSettingsShortcutsSection-C0io5RJP.mjs.map} +1 -1
  79. package/dist/chunks/{NcAppSidebar-BvXH4I-d.mjs → NcAppSidebar-CV2t1fDr.mjs} +17 -12
  80. package/dist/chunks/NcAppSidebar-CV2t1fDr.mjs.map +1 -0
  81. package/dist/chunks/{NcAssistantButton-DxNbEbqt.mjs → NcAssistantButton-u8m6vfFY.mjs} +2 -2
  82. package/dist/chunks/NcAssistantButton-u8m6vfFY.mjs.map +1 -0
  83. package/dist/chunks/{NcAvatar-D9yNUkjq.mjs → NcAvatar-QYahYt2p.mjs} +9 -9
  84. package/dist/chunks/{NcAvatar-D9yNUkjq.mjs.map → NcAvatar-QYahYt2p.mjs.map} +1 -1
  85. package/dist/chunks/{NcBreadcrumb-CfFsCTmn.mjs → NcBreadcrumb-CYI3eykz.mjs} +5 -5
  86. package/dist/chunks/{NcBreadcrumb-CfFsCTmn.mjs.map → NcBreadcrumb-CYI3eykz.mjs.map} +1 -1
  87. package/dist/chunks/{NcBreadcrumbs-bX1x_cye.mjs → NcBreadcrumbs-DLKGhmX6.mjs} +6 -6
  88. package/dist/chunks/{NcBreadcrumbs-bX1x_cye.mjs.map → NcBreadcrumbs-DLKGhmX6.mjs.map} +1 -1
  89. package/dist/chunks/{NcButton-lQra4n2g.mjs → NcButton-CdQzGSB6.mjs} +6 -5
  90. package/dist/chunks/NcButton-CdQzGSB6.mjs.map +1 -0
  91. package/dist/chunks/{NcCheckboxRadioSwitch-VV_Err2A.mjs → NcCheckboxRadioSwitch-B0KUiKrb.mjs} +6 -6
  92. package/dist/chunks/NcCheckboxRadioSwitch-B0KUiKrb.mjs.map +1 -0
  93. package/dist/chunks/{NcChip-JjodlHFu.mjs → NcChip-CjYZUIUu.mjs} +3 -3
  94. package/dist/chunks/{NcChip-JjodlHFu.mjs.map → NcChip-CjYZUIUu.mjs.map} +1 -1
  95. package/dist/chunks/{NcCollectionList-DK050qCv.mjs → NcCollectionList-CU1Tigay.mjs} +5 -5
  96. package/dist/chunks/{NcCollectionList-DK050qCv.mjs.map → NcCollectionList-CU1Tigay.mjs.map} +1 -1
  97. package/dist/chunks/{NcColorPicker-B1FEzC_4.mjs → NcColorPicker-DUIppkpO.mjs} +5 -5
  98. package/dist/chunks/{NcColorPicker-B1FEzC_4.mjs.map → NcColorPicker-DUIppkpO.mjs.map} +1 -1
  99. package/dist/chunks/{NcContent-bQ5c_Pwd.mjs → NcContent-Dd15hgck.mjs} +7 -6
  100. package/dist/chunks/{NcContent-bQ5c_Pwd.mjs.map → NcContent-Dd15hgck.mjs.map} +1 -1
  101. package/dist/chunks/{NcDashboardWidget-CCeqnB6g.mjs → NcDashboardWidget-CPI2VARK.mjs} +4 -4
  102. package/dist/chunks/{NcDashboardWidget-CCeqnB6g.mjs.map → NcDashboardWidget-CPI2VARK.mjs.map} +1 -1
  103. package/dist/chunks/{NcDashboardWidgetItem-i7xArH0I.mjs → NcDashboardWidgetItem-DJ820dYQ.mjs} +4 -4
  104. package/dist/chunks/{NcDashboardWidgetItem-i7xArH0I.mjs.map → NcDashboardWidgetItem-DJ820dYQ.mjs.map} +1 -1
  105. package/dist/chunks/NcDateTime.vue_vue_type_script_setup_true_lang-B4upiZjL.mjs.map +1 -1
  106. package/dist/chunks/{NcDateTimePicker-4-6ux1S_.mjs → NcDateTimePicker-8vIvIKoD.mjs} +3 -3
  107. package/dist/chunks/{NcDateTimePicker-4-6ux1S_.mjs.map → NcDateTimePicker-8vIvIKoD.mjs.map} +1 -1
  108. package/dist/chunks/{NcDialog-DnJfLwGR.mjs → NcDialog-D-qxVQxL.mjs} +3 -3
  109. package/dist/chunks/{NcDialog-DnJfLwGR.mjs.map → NcDialog-D-qxVQxL.mjs.map} +1 -1
  110. package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-DMoLf2ll.mjs → NcDialogButton.vue_vue_type_script_setup_true_lang-WZfDqDwc.mjs} +2 -2
  111. package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-DMoLf2ll.mjs.map → NcDialogButton.vue_vue_type_script_setup_true_lang-WZfDqDwc.mjs.map} +1 -1
  112. package/dist/chunks/{NcEmojiPicker-Cuy9A4DP.mjs → NcEmojiPicker-DG3qO_fi.mjs} +5 -5
  113. package/dist/chunks/{NcEmojiPicker-Cuy9A4DP.mjs.map → NcEmojiPicker-DG3qO_fi.mjs.map} +1 -1
  114. package/dist/chunks/{NcEmptyContent-CDgWCt_m.mjs → NcEmptyContent--TRhmNAW.mjs} +3 -3
  115. package/dist/chunks/{NcEmptyContent-CDgWCt_m.mjs.map → NcEmptyContent--TRhmNAW.mjs.map} +1 -1
  116. package/dist/chunks/{NcFilePicker-CrHd83Bv.mjs → NcFilePicker-DPiYJu5B.mjs} +3 -3
  117. package/dist/chunks/{NcFilePicker-CrHd83Bv.mjs.map → NcFilePicker-DPiYJu5B.mjs.map} +1 -1
  118. package/dist/chunks/{NcFormBoxButton-JvZ6_2E3.mjs → NcFormBoxButton-DhEpFn7z.mjs} +2 -2
  119. package/dist/chunks/{NcFormBoxButton-JvZ6_2E3.mjs.map → NcFormBoxButton-DhEpFn7z.mjs.map} +1 -1
  120. package/dist/chunks/{NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DhKiWUS8.mjs → NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DLh3Ylq_.mjs} +2 -2
  121. package/dist/chunks/{NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DhKiWUS8.mjs.map → NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DLh3Ylq_.mjs.map} +1 -1
  122. package/dist/chunks/{NcFormBoxItem-B7YVodqN.mjs → NcFormBoxItem-CHxCeuxj.mjs} +5 -5
  123. package/dist/chunks/{NcFormBoxItem-B7YVodqN.mjs.map → NcFormBoxItem-CHxCeuxj.mjs.map} +1 -1
  124. package/dist/chunks/{NcFormBoxSwitch-DP4dD4xe.mjs → NcFormBoxSwitch-QMisnf8C.mjs} +2 -2
  125. package/dist/chunks/{NcFormBoxSwitch-DP4dD4xe.mjs.map → NcFormBoxSwitch-QMisnf8C.mjs.map} +1 -1
  126. package/dist/chunks/{NcFormGroup-B3a2iUnT.mjs → NcFormGroup-BDjfDvq0.mjs} +2 -2
  127. package/dist/chunks/{NcFormGroup-B3a2iUnT.mjs.map → NcFormGroup-BDjfDvq0.mjs.map} +1 -1
  128. package/dist/chunks/{NcHeaderButton-CXu9xIQP.mjs → NcHeaderButton-lhDrtYWN.mjs} +2 -2
  129. package/dist/chunks/{NcHeaderButton-CXu9xIQP.mjs.map → NcHeaderButton-lhDrtYWN.mjs.map} +1 -1
  130. package/dist/chunks/{NcHeaderMenu-CYU4Y3h5.mjs → NcHeaderMenu-B5-BQbQ6.mjs} +2 -2
  131. package/dist/chunks/{NcHeaderMenu-CYU4Y3h5.mjs.map → NcHeaderMenu-B5-BQbQ6.mjs.map} +1 -1
  132. package/dist/chunks/{NcHotkeyList-lslhX0EJ.mjs → NcHotkeyList-Ca7AtgZ9.mjs} +2 -2
  133. package/dist/chunks/NcHotkeyList-Ca7AtgZ9.mjs.map +1 -0
  134. package/dist/chunks/{NcInputConfirmCancel-xoQuby4k.mjs → NcInputConfirmCancel-BL_BkfXh.mjs} +15 -10
  135. package/dist/chunks/NcInputConfirmCancel-BL_BkfXh.mjs.map +1 -0
  136. package/dist/chunks/{NcInputField-CPL-a_MM.mjs → NcInputField-C3iof9pY.mjs} +5 -5
  137. package/dist/chunks/{NcInputField-CPL-a_MM.mjs.map → NcInputField-C3iof9pY.mjs.map} +1 -1
  138. package/dist/chunks/NcKbd-Caeq706M.mjs.map +1 -1
  139. package/dist/chunks/{NcListItem-C0y1LfQx.mjs → NcListItem-Chk9TtPa.mjs} +14 -7
  140. package/dist/chunks/NcListItem-Chk9TtPa.mjs.map +1 -0
  141. package/dist/chunks/{NcListItemIcon-ByoiA9YZ.mjs → NcListItemIcon-vZ-OTxIa.mjs} +2 -2
  142. package/dist/chunks/{NcListItemIcon-ByoiA9YZ.mjs.map → NcListItemIcon-vZ-OTxIa.mjs.map} +1 -1
  143. package/dist/chunks/{NcModal-CDj4hQx7.mjs → NcModal-DyOZxq9E.mjs} +7 -7
  144. package/dist/chunks/{NcModal-CDj4hQx7.mjs.map → NcModal-DyOZxq9E.mjs.map} +1 -1
  145. package/dist/chunks/{NcNoteCard-CWiO3Dse.mjs → NcNoteCard-BJF9bD7S.mjs} +4 -4
  146. package/dist/chunks/{NcNoteCard-CWiO3Dse.mjs.map → NcNoteCard-BJF9bD7S.mjs.map} +1 -1
  147. package/dist/chunks/{NcPasswordField-C7yuRADA.mjs → NcPasswordField-ykWHv_hw.mjs} +2 -2
  148. package/dist/chunks/{NcPasswordField-C7yuRADA.mjs.map → NcPasswordField-ykWHv_hw.mjs.map} +1 -1
  149. package/dist/chunks/{NcRadioGroup-LkOsE5Mc.mjs → NcRadioGroup-EGc_x6uH.mjs} +2 -2
  150. package/dist/chunks/{NcRadioGroup-LkOsE5Mc.mjs.map → NcRadioGroup-EGc_x6uH.mjs.map} +1 -1
  151. package/dist/chunks/{NcRadioGroupButton-BtE_SLVd.mjs → NcRadioGroupButton-Dd5hMWx5.mjs} +2 -2
  152. package/dist/chunks/{NcRadioGroupButton-BtE_SLVd.mjs.map → NcRadioGroupButton-Dd5hMWx5.mjs.map} +1 -1
  153. package/dist/chunks/{NcRelatedResourcesPanel-B01Lid3d.mjs → NcRelatedResourcesPanel-C7C0-pBV.mjs} +6 -6
  154. package/dist/chunks/NcRelatedResourcesPanel-C7C0-pBV.mjs.map +1 -0
  155. package/dist/chunks/{NcRichContenteditable-DeN1H5pQ.mjs → NcRichContenteditable-DLPNb2TV.mjs} +13 -13
  156. package/dist/chunks/NcRichContenteditable-DLPNb2TV.mjs.map +1 -0
  157. package/dist/chunks/{NcRichText-DGV7OHFb.mjs → NcRichText-rS9gcduo.mjs} +15 -8
  158. package/dist/chunks/NcRichText-rS9gcduo.mjs.map +1 -0
  159. package/dist/chunks/{NcSelect-Ba-lsVsl.mjs → NcSelect-DK4ZWMha.mjs} +2 -2
  160. package/dist/chunks/{NcSelect-Ba-lsVsl.mjs.map → NcSelect-DK4ZWMha.mjs.map} +1 -1
  161. package/dist/chunks/{NcSelectTags-cNBPJ5FM.mjs → NcSelectTags-D3tAMWYx.mjs} +2 -2
  162. package/dist/chunks/{NcSelectTags-cNBPJ5FM.mjs.map → NcSelectTags-D3tAMWYx.mjs.map} +1 -1
  163. package/dist/chunks/{NcSelectUsers-LqSEQ2A_.mjs → NcSelectUsers-2L4I2yvb.mjs} +3 -3
  164. package/dist/chunks/{NcSelectUsers-LqSEQ2A_.mjs.map → NcSelectUsers-2L4I2yvb.mjs.map} +1 -1
  165. package/dist/chunks/{NcSettingsSelectGroup-C15v3EvD.mjs → NcSettingsSelectGroup-CYgEv80h.mjs} +2 -2
  166. package/dist/chunks/{NcSettingsSelectGroup-C15v3EvD.mjs.map → NcSettingsSelectGroup-CYgEv80h.mjs.map} +1 -1
  167. package/dist/chunks/{NcTextArea-CseOD9aM.mjs → NcTextArea-BwFQx9Bj.mjs} +4 -4
  168. package/dist/chunks/{NcTextArea-CseOD9aM.mjs.map → NcTextArea-BwFQx9Bj.mjs.map} +1 -1
  169. package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-1ABbHJ0f.mjs → NcTextField.vue_vue_type_script_setup_true_lang-DgvCZDmR.mjs} +2 -2
  170. package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-1ABbHJ0f.mjs.map → NcTextField.vue_vue_type_script_setup_true_lang-DgvCZDmR.mjs.map} +1 -1
  171. package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-lGMjb2u1.mjs → NcTimezonePicker.vue_vue_type_script_setup_true_lang-53QSdjMX.mjs} +2 -2
  172. package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-lGMjb2u1.mjs.map → NcTimezonePicker.vue_vue_type_script_setup_true_lang-53QSdjMX.mjs.map} +1 -1
  173. package/dist/chunks/{NcUserBubble-D00m2qmd.mjs → NcUserBubble-BnaGHDoD.mjs} +2 -2
  174. package/dist/chunks/{NcUserBubble-D00m2qmd.mjs.map → NcUserBubble-BnaGHDoD.mjs.map} +1 -1
  175. package/dist/chunks/{colors-CSua0q55.mjs → colors-2YFh1g7z.mjs} +5 -1
  176. package/dist/chunks/{colors-CSua0q55.mjs.map → colors-2YFh1g7z.mjs.map} +1 -1
  177. package/dist/chunks/legacy-BoqDmOCa.mjs +9 -0
  178. package/dist/chunks/legacy-BoqDmOCa.mjs.map +1 -0
  179. package/dist/chunks/{referencePickerModal-Bsq4XIcs.mjs → referencePickerModal-DgIpbEdl.mjs} +9 -9
  180. package/dist/chunks/referencePickerModal-DgIpbEdl.mjs.map +1 -0
  181. package/dist/components/NcActionButton/index.mjs +1 -1
  182. package/dist/components/NcActionCheckbox/index.mjs +1 -1
  183. package/dist/components/NcActionInput/index.mjs +1 -1
  184. package/dist/components/NcActionLink/index.mjs +1 -1
  185. package/dist/components/NcActionRadio/index.mjs +1 -1
  186. package/dist/components/NcActionRouter/index.mjs +1 -1
  187. package/dist/components/NcActionText/index.mjs +1 -1
  188. package/dist/components/NcActionTextEditable/index.mjs +1 -1
  189. package/dist/components/NcActions/index.mjs +1 -1
  190. package/dist/components/NcAppContent/index.mjs +1 -1
  191. package/dist/components/NcAppNavigation/index.mjs +1 -1
  192. package/dist/components/NcAppNavigationCaption/index.mjs +1 -1
  193. package/dist/components/NcAppNavigationItem/NcAppNavigationIconCollapsible.vue.d.ts +3 -1
  194. package/dist/components/NcAppNavigationItem/NcAppNavigationItem.vue.d.ts +7 -2
  195. package/dist/components/NcAppNavigationItem/NcInputConfirmCancel.vue.d.ts +3 -1
  196. package/dist/components/NcAppNavigationItem/index.mjs +1 -1
  197. package/dist/components/NcAppNavigationNew/index.mjs +1 -1
  198. package/dist/components/NcAppNavigationNewItem/NcAppNavigationNewItem.vue.d.ts +3 -1
  199. package/dist/components/NcAppNavigationNewItem/index.mjs +1 -1
  200. package/dist/components/NcAppNavigationSearch/index.mjs +1 -1
  201. package/dist/components/NcAppNavigationSettings/index.mjs +1 -1
  202. package/dist/components/NcAppSettingsDialog/index.mjs +1 -1
  203. package/dist/components/NcAppSettingsSection/index.mjs +1 -1
  204. package/dist/components/NcAppSettingsSectionShortcuts/index.mjs +1 -1
  205. package/dist/components/NcAppSettingsShortcutsSection/index.mjs +1 -1
  206. package/dist/components/NcAppSidebar/NcAppSidebar.vue.d.ts +1 -0
  207. package/dist/components/NcAppSidebar/NcAppSidebarTabs.vue.d.ts +3 -2
  208. package/dist/components/NcAppSidebar/index.mjs +1 -1
  209. package/dist/components/NcAssistantButton/index.mjs +1 -1
  210. package/dist/components/NcAvatar/index.mjs +1 -1
  211. package/dist/components/NcBreadcrumb/index.mjs +1 -1
  212. package/dist/components/NcBreadcrumbs/index.mjs +1 -1
  213. package/dist/components/NcButton/index.mjs +1 -1
  214. package/dist/components/NcCheckboxRadioSwitch/index.mjs +1 -1
  215. package/dist/components/NcChip/index.mjs +1 -1
  216. package/dist/components/NcCollectionList/index.mjs +1 -1
  217. package/dist/components/NcColorPicker/index.mjs +1 -1
  218. package/dist/components/NcContent/index.mjs +1 -1
  219. package/dist/components/NcDashboardWidget/index.mjs +1 -1
  220. package/dist/components/NcDashboardWidgetItem/index.mjs +1 -1
  221. package/dist/components/NcDateTimePicker/index.mjs +1 -1
  222. package/dist/components/NcDialog/index.mjs +1 -1
  223. package/dist/components/NcDialogButton/index.mjs +1 -1
  224. package/dist/components/NcEmojiPicker/index.mjs +1 -1
  225. package/dist/components/NcEmptyContent/index.mjs +1 -1
  226. package/dist/components/NcFilePicker/index.mjs +1 -1
  227. package/dist/components/NcFormBoxButton/index.mjs +1 -1
  228. package/dist/components/NcFormBoxCopyButton/index.mjs +1 -1
  229. package/dist/components/NcFormBoxSwitch/index.mjs +1 -1
  230. package/dist/components/NcFormGroup/index.mjs +1 -1
  231. package/dist/components/NcHeaderButton/index.mjs +1 -1
  232. package/dist/components/NcHeaderMenu/index.mjs +1 -1
  233. package/dist/components/NcHotkeyList/index.mjs +1 -1
  234. package/dist/components/NcInputField/index.mjs +1 -1
  235. package/dist/components/NcListItem/NcListItem.vue.d.ts +3 -1
  236. package/dist/components/NcListItem/index.mjs +1 -1
  237. package/dist/components/NcListItemIcon/index.mjs +1 -1
  238. package/dist/components/NcModal/index.mjs +1 -1
  239. package/dist/components/NcNoteCard/index.mjs +1 -1
  240. package/dist/components/NcPasswordField/index.mjs +1 -1
  241. package/dist/components/NcRadioGroup/index.mjs +1 -1
  242. package/dist/components/NcRadioGroupButton/index.mjs +1 -1
  243. package/dist/components/NcRelatedResourcesPanel/index.mjs +1 -1
  244. package/dist/components/NcRichContenteditable/index.mjs +1 -1
  245. package/dist/components/NcRichText/index.mjs +3 -3
  246. package/dist/components/NcSelect/index.mjs +1 -1
  247. package/dist/components/NcSelectTags/index.mjs +1 -1
  248. package/dist/components/NcSelectUsers/index.mjs +1 -1
  249. package/dist/components/NcSettingsSelectGroup/index.mjs +1 -1
  250. package/dist/components/NcTextArea/index.mjs +1 -1
  251. package/dist/components/NcTextField/index.mjs +1 -1
  252. package/dist/components/NcTimezonePicker/index.mjs +1 -1
  253. package/dist/components/NcUserBubble/index.mjs +1 -1
  254. package/dist/functions/reference/index.mjs +1 -1
  255. package/dist/functions/usernameToColor/index.mjs +1 -1
  256. package/dist/index.mjs +66 -66
  257. package/dist/utils/legacy.d.ts +1 -0
  258. package/package.json +10 -10
  259. package/dist/assets/NcAppSettingsDialog-Ckc0OWTs.css +0 -98
  260. package/dist/assets/NcInputConfirmCancel-BrdZEfr2.css +0 -39
  261. package/dist/assets/NcListItem-Cat18cSx.css +0 -177
  262. package/dist/chunks/NcActionTextEditable-BC66QDvV.mjs.map +0 -1
  263. package/dist/chunks/NcAppNavigation-C2njwnqV.mjs.map +0 -1
  264. package/dist/chunks/NcAppNavigationItem-Csh8IBIf.mjs.map +0 -1
  265. package/dist/chunks/NcAppSettingsDialog-CjOvPWbc.mjs.map +0 -1
  266. package/dist/chunks/NcAppSidebar-BvXH4I-d.mjs.map +0 -1
  267. package/dist/chunks/NcAssistantButton-DxNbEbqt.mjs.map +0 -1
  268. package/dist/chunks/NcButton-lQra4n2g.mjs.map +0 -1
  269. package/dist/chunks/NcCheckboxRadioSwitch-VV_Err2A.mjs.map +0 -1
  270. package/dist/chunks/NcHotkeyList-lslhX0EJ.mjs.map +0 -1
  271. package/dist/chunks/NcInputConfirmCancel-xoQuby4k.mjs.map +0 -1
  272. package/dist/chunks/NcListItem-C0y1LfQx.mjs.map +0 -1
  273. package/dist/chunks/NcRelatedResourcesPanel-B01Lid3d.mjs.map +0 -1
  274. package/dist/chunks/NcRichContenteditable-DeN1H5pQ.mjs.map +0 -1
  275. package/dist/chunks/NcRichText-DGV7OHFb.mjs.map +0 -1
  276. package/dist/chunks/legacy-DcjXBL_t.mjs +0 -6
  277. package/dist/chunks/legacy-DcjXBL_t.mjs.map +0 -1
  278. package/dist/chunks/referencePickerModal-Bsq4XIcs.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"NcEmptyContent-CDgWCt_m.mjs","sources":["../../src/components/NcEmptyContent/NcEmptyContent.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Basic use\n\nUse this component to display a message about an empty content.\nProviding an icon, name, and a description is strongly advised.\n\n```\n<template>\n\t<NcEmptyContent name=\"No comments\"\n\t\tdescription=\"Start writing comments and they will appear here.\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n#### With custom svg\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No files in here\">\n\t\t<template #icon>\n\t\t\t<NcIconSvgWrapper :svg=\"folderSvg\" />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport folderSvg from '@mdi/svg/svg/folder.svg?raw'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfolderSvg,\n\t\t}\n\t},\n}\n</script>\n```\n\nYou can also customize the name using the `#name` slot\nand add actions. But to keep the style consistent across Nextcloud\nconsider only using header elements as the root elements for the name slot.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tdescription=\"No comments in here\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #name>\n\t\t\t<h1 class=\"empty-content__name\">\n\t\t\t\tNo comments\n\t\t\t</h1>\n\t\t</template>\n\t\t<template #action>\n\t\t\t<NcButton variant=\"primary\">\n\t\t\t\tAdd a comment!\n\t\t\t</NcButton>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n\nSimilar to the `#name` slot, you could also use the `#description` slot.\nThe content will be rendered within a paragraph so you can use any inline element,\nlike a link.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No comments\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #description>\n\t\t\t<a href=\"https://en.wikipedia.org/wiki/Comment\">What is even a comment?</a>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n</docs>\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { createElementId } from '../../utils/createElementId.ts'\n\nwithDefaults(defineProps<{\n\t/**\n\t * Desription of the empty content\n\t *\n\t * @example 'No comments yet, start the conversation!'\n\t */\n\tdescription?: string\n\n\t/**\n\t * A header message about an empty content shown.\n\t *\n\t * @example 'No comments'\n\t */\n\tname?: string\n}>(), {\n\tdescription: '',\n\tname: '',\n})\n\ndefineSlots<{\n\t/**\n\t * Optional slot for a button or the like\n\t */\n\taction?: Slot\n\n\t/**\n\t * Optional slot for adding an icon\n\t */\n\ticon?: Slot\n\n\t/**\n\t * Allow to add custom formatted name as an alternative to the name property.\n\t * The content passed shall be enclosed by a header element.\n\t */\n\tname?: Slot\n\n\t/**\n\t * Optional formatted description rendered inside a paragraph as an alternative to the description property.\n\t */\n\tdescription?: Slot\n}>()\n\nconst nameId = createElementId()\n</script>\n\n<template>\n\t<div :aria-labelledby=\"nameId\" class=\"empty-content\" role=\"note\">\n\t\t<div v-if=\"$slots.icon\" class=\"empty-content__icon\" aria-hidden=\"true\">\n\t\t\t<slot name=\"icon\" />\n\t\t</div>\n\t\t<div v-if=\"name !== '' || $slots.name\" :id=\"nameId\" class=\"empty-content__name\">\n\t\t\t<slot name=\"name\">\n\t\t\t\t{{ name }}\n\t\t\t</slot>\n\t\t</div>\n\t\t<p v-if=\"description !== '' || $slots.description\" class=\"empty-content__description\">\n\t\t\t<slot name=\"description\">\n\t\t\t\t{{ description }}\n\t\t\t</slot>\n\t\t</p>\n\t\t<div v-if=\"$slots.action\" class=\"empty-content__action\">\n\t\t\t<slot name=\"action\" />\n\t\t</div>\n\t</div>\n</template>\n\n<style lang=\"scss\" scoped>\n.empty-content {\n\tdisplay: flex;\n\talign-items: center;\n\tflex-direction: column;\n\tjustify-content: center;\n\t/* In case of using in a flex container - flex in advance */\n\tflex-grow: 1;\n\tpadding: var(--default-grid-baseline);\n\n\t.modal-wrapper & {\n\t\tmargin-top: 5vh;\n\t\tmargin-bottom: 5vh;\n\t}\n\n\t&__icon {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 64px;\n\t\theight: 64px;\n\t\tmargin: 0 auto 15px;\n\t\topacity: .4;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\tbackground-size: 64px;\n\n\t\t:deep(svg) {\n\t\t\twidth: 64px !important;\n\t\t\theight: 64px !important;\n\t\t\tmax-width: 64px !important;\n\t\t\tmax-height: 64px !important;\n\t\t}\n\t}\n\n\t&__name {\n\t\tmargin-bottom: 10px;\n\t\ttext-align: center;\n\t\tfont-weight: bold;\n\t\tfont-size: 20px;\n\t\tline-height: 30px;\n\t}\n\n\t&__description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\ttext-align: center;\n\t\ttext-wrap-style: balance;\n\t}\n\n\t&__action {\n\t\tmargin-top: 8px;\n\n\t\t.modal-wrapper & {\n\t\t\tmargin-top: 20px;\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_createElementBlock","_unref","$slots","_openBlock","_renderSlot","name","description"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0KA,UAAM,SAAS,gBAAA;;0BAIdA,mBAiBM,OAAA;AAAA,QAjBA,mBAAiBC,MAAA,MAAA;AAAA,QAAQ,OAAM;AAAA,QAAgB,MAAK;AAAA,MAAA;QAC9CC,KAAAA,OAAO,QAAlBC,aAAAH,mBAEM,OAFN,YAEM;AAAA,UADLI,WAAoB,KAAA,QAAA,QAAA,CAAA,GAAA,QAAA,IAAA;AAAA,QAAA;QAEVC,KAAAA,SAAI,MAAWH,KAAAA,OAAO,qBAAjCF,mBAIM,OAAA;AAAA;UAJkC,IAAIC,MAAA,MAAA;AAAA,UAAQ,OAAM;AAAA,QAAA;UACzDG,WAEO,yBAFP,MAEO;AAAA,4CADHC,KAAAA,IAAI,GAAA,CAAA;AAAA,UAAA;;QAGAC,KAAAA,gBAAW,MAAWJ,KAAAA,OAAO,eAAtCC,aAAAH,mBAII,KAJJ,YAII;AAAA,UAHHI,WAEO,gCAFP,MAEO;AAAA,4CADHE,KAAAA,WAAW,GAAA,CAAA;AAAA,UAAA;;QAGLJ,KAAAA,OAAO,UAAlBC,aAAAH,mBAEM,OAFN,YAEM;AAAA,UADLI,WAAsB,KAAA,QAAA,UAAA,CAAA,GAAA,QAAA,IAAA;AAAA,QAAA;;;;;;"}
1
+ {"version":3,"file":"NcEmptyContent--TRhmNAW.mjs","sources":["../../src/components/NcEmptyContent/NcEmptyContent.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Basic use\n\nUse this component to display a message about an empty content.\nProviding an icon, name, and a description is strongly advised.\n\n```\n<template>\n\t<NcEmptyContent name=\"No comments\"\n\t\tdescription=\"Start writing comments and they will appear here.\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n#### With custom svg\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No files in here\">\n\t\t<template #icon>\n\t\t\t<NcIconSvgWrapper :svg=\"folderSvg\" />\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport folderSvg from '@mdi/svg/svg/folder.svg?raw'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tfolderSvg,\n\t\t}\n\t},\n}\n</script>\n```\n\nYou can also customize the name using the `#name` slot\nand add actions. But to keep the style consistent across Nextcloud\nconsider only using header elements as the root elements for the name slot.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tdescription=\"No comments in here\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #name>\n\t\t\t<h1 class=\"empty-content__name\">\n\t\t\t\tNo comments\n\t\t\t</h1>\n\t\t</template>\n\t\t<template #action>\n\t\t\t<NcButton variant=\"primary\">\n\t\t\t\tAdd a comment!\n\t\t\t</NcButton>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n\nSimilar to the `#name` slot, you could also use the `#description` slot.\nThe content will be rendered within a paragraph so you can use any inline element,\nlike a link.\n\n```\n<template>\n\t<NcEmptyContent\n\t\tname=\"No comments\">\n\t\t<template #icon>\n\t\t\t<Comment />\n\t\t</template>\n\t\t<template #description>\n\t\t\t<a href=\"https://en.wikipedia.org/wiki/Comment\">What is even a comment?</a>\n\t\t</template>\n\t</NcEmptyContent>\n</template>\n\n<script>\nimport Comment from 'vue-material-design-icons/Comment.vue'\n\nexport default {\n\tcomponents: {\n\t\tComment,\n\t},\n}\n</script>\n```\n</docs>\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { createElementId } from '../../utils/createElementId.ts'\n\nwithDefaults(defineProps<{\n\t/**\n\t * Desription of the empty content\n\t *\n\t * @example 'No comments yet, start the conversation!'\n\t */\n\tdescription?: string\n\n\t/**\n\t * A header message about an empty content shown.\n\t *\n\t * @example 'No comments'\n\t */\n\tname?: string\n}>(), {\n\tdescription: '',\n\tname: '',\n})\n\ndefineSlots<{\n\t/**\n\t * Optional slot for a button or the like\n\t */\n\taction?: Slot\n\n\t/**\n\t * Optional slot for adding an icon\n\t */\n\ticon?: Slot\n\n\t/**\n\t * Allow to add custom formatted name as an alternative to the name property.\n\t * The content passed shall be enclosed by a header element.\n\t */\n\tname?: Slot\n\n\t/**\n\t * Optional formatted description rendered inside a paragraph as an alternative to the description property.\n\t */\n\tdescription?: Slot\n}>()\n\nconst nameId = createElementId()\n</script>\n\n<template>\n\t<div :aria-labelledby=\"nameId\" class=\"empty-content\" role=\"note\">\n\t\t<div v-if=\"$slots.icon\" class=\"empty-content__icon\" aria-hidden=\"true\">\n\t\t\t<slot name=\"icon\" />\n\t\t</div>\n\t\t<div v-if=\"name !== '' || $slots.name\" :id=\"nameId\" class=\"empty-content__name\">\n\t\t\t<slot name=\"name\">\n\t\t\t\t{{ name }}\n\t\t\t</slot>\n\t\t</div>\n\t\t<p v-if=\"description !== '' || $slots.description\" class=\"empty-content__description\">\n\t\t\t<slot name=\"description\">\n\t\t\t\t{{ description }}\n\t\t\t</slot>\n\t\t</p>\n\t\t<div v-if=\"$slots.action\" class=\"empty-content__action\">\n\t\t\t<slot name=\"action\" />\n\t\t</div>\n\t</div>\n</template>\n\n<style lang=\"scss\" scoped>\n.empty-content {\n\tdisplay: flex;\n\talign-items: center;\n\tflex-direction: column;\n\tjustify-content: center;\n\t/* In case of using in a flex container - flex in advance */\n\tflex-grow: 1;\n\tpadding: var(--default-grid-baseline);\n\n\t.modal-wrapper & {\n\t\tmargin-top: 5vh;\n\t\tmargin-bottom: 5vh;\n\t}\n\n\t&__icon {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 64px;\n\t\theight: 64px;\n\t\tmargin: 0 auto 15px;\n\t\topacity: .4;\n\t\tbackground-repeat: no-repeat;\n\t\tbackground-position: center;\n\t\tbackground-size: 64px;\n\n\t\t:deep(svg) {\n\t\t\twidth: 64px !important;\n\t\t\theight: 64px !important;\n\t\t\tmax-width: 64px !important;\n\t\t\tmax-height: 64px !important;\n\t\t}\n\t}\n\n\t&__name {\n\t\tmargin-bottom: 10px;\n\t\ttext-align: center;\n\t\tfont-weight: var(--font-weight-heading, bold);\n\t\tfont-size: 20px;\n\t\tline-height: 30px;\n\t}\n\n\t&__description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t\ttext-align: center;\n\t\ttext-wrap-style: balance;\n\t}\n\n\t&__action {\n\t\tmargin-top: 8px;\n\n\t\t.modal-wrapper & {\n\t\t\tmargin-top: 20px;\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_createElementBlock","_unref","$slots","_openBlock","_renderSlot","name","description"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0KA,UAAM,SAAS,gBAAA;;0BAIdA,mBAiBM,OAAA;AAAA,QAjBA,mBAAiBC,MAAA,MAAA;AAAA,QAAQ,OAAM;AAAA,QAAgB,MAAK;AAAA,MAAA;QAC9CC,KAAAA,OAAO,QAAlBC,aAAAH,mBAEM,OAFN,YAEM;AAAA,UADLI,WAAoB,KAAA,QAAA,QAAA,CAAA,GAAA,QAAA,IAAA;AAAA,QAAA;QAEVC,KAAAA,SAAI,MAAWH,KAAAA,OAAO,qBAAjCF,mBAIM,OAAA;AAAA;UAJkC,IAAIC,MAAA,MAAA;AAAA,UAAQ,OAAM;AAAA,QAAA;UACzDG,WAEO,yBAFP,MAEO;AAAA,4CADHC,KAAAA,IAAI,GAAA,CAAA;AAAA,UAAA;;QAGAC,KAAAA,gBAAW,MAAWJ,KAAAA,OAAO,eAAtCC,aAAAH,mBAII,KAJJ,YAII;AAAA,UAHHI,WAEO,gCAFP,MAEO;AAAA,4CADHE,KAAAA,WAAW,GAAA,CAAA;AAAA,UAAA;;QAGLJ,KAAAA,OAAO,UAAlBC,aAAAH,mBAEM,OAFN,YAEM;AAAA,UADLI,WAAsB,KAAA,QAAA,UAAA,CAAA,GAAA,QAAA,IAAA;AAAA,QAAA;;;;;;"}
@@ -1,9 +1,9 @@
1
1
  import '../assets/NcFilePicker-CimiKIH1.css';
2
2
  import { openBlock, createElementBlock, mergeProps, createElementVNode, toDisplayString, createCommentVNode, defineComponent, useTemplateRef, computed, normalizeClass, createVNode, withCtx, createBlock, createTextVNode, unref, Fragment, renderList, renderSlot, nextTick } from "vue";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
4
- import { N as NcActionButton } from "./NcActionButton-BuRnYpJX.mjs";
4
+ import { N as NcActionButton } from "./NcActionButton-BJKJG2zO.mjs";
5
5
  import { N as NcActionCaption } from "./NcActionCaption-f7L9gBlT.mjs";
6
- import { N as NcActions } from "./NcActions-CeP_c9MH.mjs";
6
+ import { N as NcActions } from "./NcActions-fCXSb_0o.mjs";
7
7
  import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-De-2-ukl.mjs";
8
8
  import { N as NcLoadingIcon } from "./NcLoadingIcon-CInLzPtA.mjs";
9
9
  import { getGettextBuilder } from "@nextcloud/l10n/gettext";
@@ -300,4 +300,4 @@ const NcFilePicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cs
300
300
  export {
301
301
  NcFilePicker as N
302
302
  };
303
- //# sourceMappingURL=NcFilePicker-CrHd83Bv.mjs.map
303
+ //# sourceMappingURL=NcFilePicker-DPiYJu5B.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcFilePicker-CrHd83Bv.mjs","sources":["../../node_modules/vue-material-design-icons/FolderUpload.vue","../../node_modules/vue-material-design-icons/Plus.vue","../../node_modules/vue-material-design-icons/Upload.vue","../../src/l10n.ts","../../src/components/NcFilePicker/NcFilePicker.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon folder-upload-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M20,6A2,2 0 0,1 22,8V18A2,2 0 0,1 20,20H4A2,2 0 0,1 2,18V6A2,2 0 0,1 4,4H10L12,6H20M10.75,13H14V17H16V13H19.25L15,8.75\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"FolderUploadIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon plus-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"PlusIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon upload-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"UploadIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","/*!\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n// This is only a dummy file, the real translations are injected by the vite plugin from build/l10n-plugin!\nimport { getGettextBuilder } from '@nextcloud/l10n/gettext'\n\nconst gtBuilder = getGettextBuilder().detectLanguage()\nconst gt = gtBuilder.build()\n\nconst n = gt.ngettext.bind(gt)\nconst t = gt.gettext.bind(gt)\n\nexport { n, t }\n","<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { computed, nextTick, useTemplateRef } from 'vue'\nimport IconFolderUpload from 'vue-material-design-icons/FolderUpload.vue'\nimport IconPlus from 'vue-material-design-icons/Plus.vue'\nimport IconUpload from 'vue-material-design-icons/Upload.vue'\nimport NcActionButton from '../NcActionButton/NcActionButton.vue'\nimport NcActionCaption from '../NcActionCaption/NcActionCaption.vue'\nimport NcActions from '../NcActions/NcActions.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport NcLoadingIcon from '../NcLoadingIcon/NcLoadingIcon.vue'\nimport { t } from '../../l10n.js'\n\nexport interface FilePickerItem {\n\t/**\n\t * SVG icon (as string) for the action\n\t */\n\ticonSvg: string\n\t/**\n\t * Label of the action\n\t */\n\tlabel: string\n\t/**\n\t * Callback when the action is clicked\n\t */\n\tonClick: () => void\n}\n\nexport interface FilePickerItemGroup {\n\t/**\n\t * Caption for the action group\n\t */\n\tcaption: string\n\t/**\n\t * Actions within this group\n\t */\n\tactions: FilePickerItem[]\n}\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * File types to accept\n\t */\n\taccept?: string[]\n\n\t/**\n\t * Optional menu caption to be shown above the actions\n\t */\n\tactionCaption?: string\n\n\t/**\n\t * Additional actions to be shown within the picker menu\n\t */\n\tactions?: FilePickerItem[] | FilePickerItemGroup[]\n\n\t/**\n\t * Allow picking a directory\n\t */\n\tdirectory?: boolean\n\n\t/**\n\t * Disable picking files and only allow picking a directory\n\t */\n\tdirectoryOnly?: boolean\n\n\t/**\n\t * Disabled state of the picker\n\t */\n\tdisabled?: boolean\n\n\t/**\n\t * If set then the label is only used for accessibility but not shown visually\n\t */\n\ticonOnly?: boolean\n\n\t/**\n\t * Label of the picker\n\t *\n\t * @default 'Pick file' or 'Pick files' depending on `multiple`\n\t */\n\tlabel?: string\n\n\t/**\n\t * If set then the picker will be set into a loading state.\n\t * This means the picker is disabled, a loading spinner is shown and the label is adjusted.\n\t */\n\tloading?: boolean\n\n\t/**\n\t * Can the user pick multiple files.\n\t * This is ignored when picking folder (by browser limitations).\n\t */\n\tmultiple?: boolean\n\n\t/**\n\t * The variant of the button\n\t */\n\tvariant?: 'primary' | 'secondary' | 'tertiary'\n}>(), {\n\tactions: () => [],\n\taccept: undefined,\n\tactionCaption: '',\n\tlabel: undefined,\n\tvariant: 'primary',\n})\n\nconst emit = defineEmits<{\n\tpick: [files: File[]]\n}>()\n\ndefineSlots<{\n\t/**\n\t * Optional custom icon for the picker menu\n\t */\n\ticon?: Slot\n\n\t/**\n\t * Optional content to be shown in the picker.\n\t * This can be used e.g. for a progress bar or similar.\n\t */\n\tdefault?: Slot\n}>()\n\ndefineExpose({\n\treset,\n})\n\nconst formElement = useTemplateRef('form')\nconst inputElement = useTemplateRef('input')\n\n/**\n * The current label to be used as menu name and accessible name of the picker.\n */\nconst currentLabel = computed(() => {\n\tif (props.loading) {\n\t\treturn t('Uploading …')\n\t} else if (props.label) {\n\t\treturn props.label\n\t} else if (props.directoryOnly) {\n\t\treturn t('Pick folder')\n\t}\n\treturn props.multiple ? t('Pick files') : t('Pick file')\n})\n\n/**\n * Check whether the current browser supports uploading directories\n * Hint: This does not check if the current connection supports this, as some browsers require a secure context!\n */\nconst canUploadFolders = computed(() => {\n\treturn (props.directory || props.directoryOnly) && 'webkitdirectory' in HTMLInputElement.prototype\n})\n\n/**\n * Trigger file picker\n *\n * @param uploadFolders - Whether to upload folders or files\n */\nfunction triggerPickFiles(uploadFolders: boolean) {\n\t// Without reset selecting the same file doesn't trigger the change event\n\treset()\n\n\t// Only if the browser supports picking folders and the user selected \"pick folder\" we set the file input to directory picking.\n\tif (canUploadFolders.value) {\n\t\tinputElement.value!.webkitdirectory = uploadFolders\n\t}\n\n\t// Wait for the reset and the `webkitdirectory` to be dispatched in DOM\n\tnextTick(() => inputElement.value!.click())\n}\n\n/**\n * Handle picking some local files\n */\nfunction onPick() {\n\tconst files = inputElement.value?.files ? Array.from(inputElement.value.files) : []\n\temit('pick', files)\n}\n\n/**\n * Reset the picker state of the currently selected files.\n */\nfunction reset() {\n\tformElement.value!.reset()\n}\n</script>\n\n<template>\n\t<form\n\t\tref=\"form\"\n\t\t:class=\"$style.filePicker\">\n\t\t<NcActions\n\t\t\t:aria-label=\"currentLabel\"\n\t\t\t:disabled=\"disabled || loading\"\n\t\t\t:menuName=\"iconOnly ? undefined : currentLabel\"\n\t\t\t:forceName=\"!iconOnly\"\n\t\t\t:variant>\n\t\t\t<template #icon>\n\t\t\t\t<slot v-if=\"!loading\" name=\"icon\">\n\t\t\t\t\t<IconPlus :size=\"20\" />\n\t\t\t\t</slot>\n\t\t\t\t<NcLoadingIcon v-else />\n\t\t\t</template>\n\n\t\t\t<NcActionCaption v-if=\"actionCaption\" :name=\"actionCaption\" />\n\n\t\t\t<NcActionButton\n\t\t\t\tv-if=\"!directoryOnly\"\n\t\t\t\tcloseAfterClick\n\t\t\t\t@click=\"triggerPickFiles(false)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconUpload :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t<!-- If this is not the only action in the NcActions this is a menu entry and we need a generic name - otherwise this will be a single button where we need to apply the label -->\n\t\t\t\t{{ canUploadFolders || $slots.actions ? (multiple ? t('Upload files') : t('Upload file')) : currentLabel }}\n\t\t\t</NcActionButton>\n\n\t\t\t<NcActionButton\n\t\t\t\tv-if=\"canUploadFolders\"\n\t\t\t\tcloseAfterClick\n\t\t\t\t@click=\"triggerPickFiles(true)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconFolderUpload style=\"color: var(--color-primary-element)\" :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t<!-- If this is not the only action in the NcActions this is a menu entry and we need a generic name - otherwise this will be a single button where we need to apply the label -->\n\t\t\t\t{{ !directoryOnly || $slots.actions ? t('Upload folder') : currentLabel }}\n\t\t\t</NcActionButton>\n\n\t\t\t<template v-for=\"group of actions\">\n\t\t\t\t<NcActionCaption\n\t\t\t\t\tv-if=\"(group as FilePickerItemGroup).caption\"\n\t\t\t\t\t:key=\"(group as FilePickerItemGroup).caption\"\n\t\t\t\t\t:name=\"(group as FilePickerItemGroup).caption\" />\n\n\t\t\t\t<NcActionButton\n\t\t\t\t\tv-for=\"action of (group as FilePickerItemGroup).actions ?? [group as FilePickerItem]\"\n\t\t\t\t\t:key=\"action.label\"\n\t\t\t\t\tcloseAfterClick\n\t\t\t\t\t@click=\"action.onClick\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper :svg=\"action.iconSvg\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ action.label }}\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcActions>\n\n\t\t<!-- Hidden files picker input - also hidden for accessibility as otherwise such users also loose the ability to pick files -->\n\t\t<input\n\t\t\tref=\"input\"\n\t\t\t:accept=\"accept?.join(', ')\"\n\t\t\taria-hidden=\"true\"\n\t\t\tclass=\"hidden-visually\"\n\t\t\t:multiple\n\t\t\ttype=\"file\"\n\t\t\t@change=\"onPick\">\n\n\t\t<slot />\n\t</form>\n</template>\n\n<style module>\n.filePicker {\n\tdisplay: inline-flex;\n\talign-items: center;\n\theight: var(--default-clickable-area);\n}\n</style>\n\n<docs>\nThis component allows to pick local files (or directories) which can be used to upload them to Nextcloud or directly process them in the browser.\n\n### Exposed methods\n\n- `function reset(): void`\n This method allows to reset the internal state of the file picker to clear the current selection\n\n### Example\n\n```vue\n<template>\n\t<div>\n\t\t<div class=\"wrapper\">\n\t\t\t<NcFilePicker ref=\"picker\"\n\t\t\t\tdirectory\n\t\t\t\t@pick=\"selectedFiles = $event\" />\n\n\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t@click=\"clearPicker\">\n\t\t\t\tClear\n\t\t\t</NcButton>\n\t\t</div>\n\n\t\t<h3>Selected files:</h3>\n\t\t<ul>\n\t\t\t<li v-for=\"file in selectedFiles\" key=\"file.name\">\n\t\t\t\t{{ file.webkitRelativePath || file.name }}\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tselectedFiles: [],\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\t/**\n\t\t\t * This will clear the selected files from the picker.\n\t\t\t */\n\t\t\tclearPicker() {\n\t\t\t\tthis.$refs.picker.reset()\n\t\t\t},\n\t\t},\n\t}\n</script>\n<style scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 10px;\n}\n</style>\n```\n</docs>\n"],"names":["_sfc_main","_hoisted_3","_createElementBlock","_mergeProps","_createElementVNode","_openBlock","_normalizeClass","$style","_createVNode","disabled","loading","iconOnly","variant","_renderSlot","_createBlock","actionCaption","directoryOnly","_createTextVNode","_toDisplayString","$slots","multiple","_unref","_Fragment","_renderList","actions","accept"],"mappings":";;;;;;;;AAoBA,MAAKA,cAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,OAAO;AAAA,MACL,M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N,YAA0C,kBAAA;AAAA,wBAAvB,KAAK,OAAO;AAAA,sBAAA;;qCACrB,MACX;AAAA,sCADW,MACXU,gBAAG,OAAO,KAAK,GAAA,CAAA;AAAA,oBAAA;;;;;;;;;QAMlBd,mBAOkB,SAAA;AAAA,UANjB,KAAI;AAAA,UACH,QAAQqB,KAAAA,QAAQ,KAAI,IAAA;AAAA,UACrB,eAAY;AAAA,UACZ,OAAM;AAAA,UACL,UAAAL,KAAAA;AAAAA,UACD,MAAK;AAAA,UACJ,UAAQ;AAAA,QAAA;QAEVP,WAAQ,KAAA,QAAA,SAAA;AAAA,MAAA;;;;;;;;;;;;","x_google_ignoreList":[0,1,2]}
1
+ {"version":3,"file":"NcFilePicker-DPiYJu5B.mjs","sources":["../../node_modules/vue-material-design-icons/FolderUpload.vue","../../node_modules/vue-material-design-icons/Plus.vue","../../node_modules/vue-material-design-icons/Upload.vue","../../src/l10n.ts","../../src/components/NcFilePicker/NcFilePicker.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon folder-upload-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M20,6A2,2 0 0,1 22,8V18A2,2 0 0,1 20,20H4A2,2 0 0,1 2,18V6A2,2 0 0,1 4,4H10L12,6H20M10.75,13H14V17H16V13H19.25L15,8.75\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"FolderUploadIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon plus-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"PlusIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon upload-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"UploadIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","/*!\n * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n// This is only a dummy file, the real translations are injected by the vite plugin from build/l10n-plugin!\nimport { getGettextBuilder } from '@nextcloud/l10n/gettext'\n\nconst gtBuilder = getGettextBuilder().detectLanguage()\nconst gt = gtBuilder.build()\n\nconst n = gt.ngettext.bind(gt)\nconst t = gt.gettext.bind(gt)\n\nexport { n, t }\n","<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { computed, nextTick, useTemplateRef } from 'vue'\nimport IconFolderUpload from 'vue-material-design-icons/FolderUpload.vue'\nimport IconPlus from 'vue-material-design-icons/Plus.vue'\nimport IconUpload from 'vue-material-design-icons/Upload.vue'\nimport NcActionButton from '../NcActionButton/NcActionButton.vue'\nimport NcActionCaption from '../NcActionCaption/NcActionCaption.vue'\nimport NcActions from '../NcActions/NcActions.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport NcLoadingIcon from '../NcLoadingIcon/NcLoadingIcon.vue'\nimport { t } from '../../l10n.js'\n\nexport interface FilePickerItem {\n\t/**\n\t * SVG icon (as string) for the action\n\t */\n\ticonSvg: string\n\t/**\n\t * Label of the action\n\t */\n\tlabel: string\n\t/**\n\t * Callback when the action is clicked\n\t */\n\tonClick: () => void\n}\n\nexport interface FilePickerItemGroup {\n\t/**\n\t * Caption for the action group\n\t */\n\tcaption: string\n\t/**\n\t * Actions within this group\n\t */\n\tactions: FilePickerItem[]\n}\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * File types to accept\n\t */\n\taccept?: string[]\n\n\t/**\n\t * Optional menu caption to be shown above the actions\n\t */\n\tactionCaption?: string\n\n\t/**\n\t * Additional actions to be shown within the picker menu\n\t */\n\tactions?: FilePickerItem[] | FilePickerItemGroup[]\n\n\t/**\n\t * Allow picking a directory\n\t */\n\tdirectory?: boolean\n\n\t/**\n\t * Disable picking files and only allow picking a directory\n\t */\n\tdirectoryOnly?: boolean\n\n\t/**\n\t * Disabled state of the picker\n\t */\n\tdisabled?: boolean\n\n\t/**\n\t * If set then the label is only used for accessibility but not shown visually\n\t */\n\ticonOnly?: boolean\n\n\t/**\n\t * Label of the picker\n\t *\n\t * @default 'Pick file' or 'Pick files' depending on `multiple`\n\t */\n\tlabel?: string\n\n\t/**\n\t * If set then the picker will be set into a loading state.\n\t * This means the picker is disabled, a loading spinner is shown and the label is adjusted.\n\t */\n\tloading?: boolean\n\n\t/**\n\t * Can the user pick multiple files.\n\t * This is ignored when picking folder (by browser limitations).\n\t */\n\tmultiple?: boolean\n\n\t/**\n\t * The variant of the button\n\t */\n\tvariant?: 'primary' | 'secondary' | 'tertiary'\n}>(), {\n\tactions: () => [],\n\taccept: undefined,\n\tactionCaption: '',\n\tlabel: undefined,\n\tvariant: 'primary',\n})\n\nconst emit = defineEmits<{\n\tpick: [files: File[]]\n}>()\n\ndefineSlots<{\n\t/**\n\t * Optional custom icon for the picker menu\n\t */\n\ticon?: Slot\n\n\t/**\n\t * Optional content to be shown in the picker.\n\t * This can be used e.g. for a progress bar or similar.\n\t */\n\tdefault?: Slot\n}>()\n\ndefineExpose({\n\treset,\n})\n\nconst formElement = useTemplateRef('form')\nconst inputElement = useTemplateRef('input')\n\n/**\n * The current label to be used as menu name and accessible name of the picker.\n */\nconst currentLabel = computed(() => {\n\tif (props.loading) {\n\t\treturn t('Uploading …')\n\t} else if (props.label) {\n\t\treturn props.label\n\t} else if (props.directoryOnly) {\n\t\treturn t('Pick folder')\n\t}\n\treturn props.multiple ? t('Pick files') : t('Pick file')\n})\n\n/**\n * Check whether the current browser supports uploading directories\n * Hint: This does not check if the current connection supports this, as some browsers require a secure context!\n */\nconst canUploadFolders = computed(() => {\n\treturn (props.directory || props.directoryOnly) && 'webkitdirectory' in HTMLInputElement.prototype\n})\n\n/**\n * Trigger file picker\n *\n * @param uploadFolders - Whether to upload folders or files\n */\nfunction triggerPickFiles(uploadFolders: boolean) {\n\t// Without reset selecting the same file doesn't trigger the change event\n\treset()\n\n\t// Only if the browser supports picking folders and the user selected \"pick folder\" we set the file input to directory picking.\n\tif (canUploadFolders.value) {\n\t\tinputElement.value!.webkitdirectory = uploadFolders\n\t}\n\n\t// Wait for the reset and the `webkitdirectory` to be dispatched in DOM\n\tnextTick(() => inputElement.value!.click())\n}\n\n/**\n * Handle picking some local files\n */\nfunction onPick() {\n\tconst files = inputElement.value?.files ? Array.from(inputElement.value.files) : []\n\temit('pick', files)\n}\n\n/**\n * Reset the picker state of the currently selected files.\n */\nfunction reset() {\n\tformElement.value!.reset()\n}\n</script>\n\n<template>\n\t<form\n\t\tref=\"form\"\n\t\t:class=\"$style.filePicker\">\n\t\t<NcActions\n\t\t\t:aria-label=\"currentLabel\"\n\t\t\t:disabled=\"disabled || loading\"\n\t\t\t:menuName=\"iconOnly ? undefined : currentLabel\"\n\t\t\t:forceName=\"!iconOnly\"\n\t\t\t:variant>\n\t\t\t<template #icon>\n\t\t\t\t<slot v-if=\"!loading\" name=\"icon\">\n\t\t\t\t\t<IconPlus :size=\"20\" />\n\t\t\t\t</slot>\n\t\t\t\t<NcLoadingIcon v-else />\n\t\t\t</template>\n\n\t\t\t<NcActionCaption v-if=\"actionCaption\" :name=\"actionCaption\" />\n\n\t\t\t<NcActionButton\n\t\t\t\tv-if=\"!directoryOnly\"\n\t\t\t\tcloseAfterClick\n\t\t\t\t@click=\"triggerPickFiles(false)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconUpload :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t<!-- If this is not the only action in the NcActions this is a menu entry and we need a generic name - otherwise this will be a single button where we need to apply the label -->\n\t\t\t\t{{ canUploadFolders || $slots.actions ? (multiple ? t('Upload files') : t('Upload file')) : currentLabel }}\n\t\t\t</NcActionButton>\n\n\t\t\t<NcActionButton\n\t\t\t\tv-if=\"canUploadFolders\"\n\t\t\t\tcloseAfterClick\n\t\t\t\t@click=\"triggerPickFiles(true)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconFolderUpload style=\"color: var(--color-primary-element)\" :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t<!-- If this is not the only action in the NcActions this is a menu entry and we need a generic name - otherwise this will be a single button where we need to apply the label -->\n\t\t\t\t{{ !directoryOnly || $slots.actions ? t('Upload folder') : currentLabel }}\n\t\t\t</NcActionButton>\n\n\t\t\t<template v-for=\"group of actions\">\n\t\t\t\t<NcActionCaption\n\t\t\t\t\tv-if=\"(group as FilePickerItemGroup).caption\"\n\t\t\t\t\t:key=\"(group as FilePickerItemGroup).caption\"\n\t\t\t\t\t:name=\"(group as FilePickerItemGroup).caption\" />\n\n\t\t\t\t<NcActionButton\n\t\t\t\t\tv-for=\"action of (group as FilePickerItemGroup).actions ?? [group as FilePickerItem]\"\n\t\t\t\t\t:key=\"action.label\"\n\t\t\t\t\tcloseAfterClick\n\t\t\t\t\t@click=\"action.onClick\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper :svg=\"action.iconSvg\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ action.label }}\n\t\t\t\t</NcActionButton>\n\t\t\t</template>\n\t\t</NcActions>\n\n\t\t<!-- Hidden files picker input - also hidden for accessibility as otherwise such users also loose the ability to pick files -->\n\t\t<input\n\t\t\tref=\"input\"\n\t\t\t:accept=\"accept?.join(', ')\"\n\t\t\taria-hidden=\"true\"\n\t\t\tclass=\"hidden-visually\"\n\t\t\t:multiple\n\t\t\ttype=\"file\"\n\t\t\t@change=\"onPick\">\n\n\t\t<slot />\n\t</form>\n</template>\n\n<style module>\n.filePicker {\n\tdisplay: inline-flex;\n\talign-items: center;\n\theight: var(--default-clickable-area);\n}\n</style>\n\n<docs>\nThis component allows to pick local files (or directories) which can be used to upload them to Nextcloud or directly process them in the browser.\n\n### Exposed methods\n\n- `function reset(): void`\n This method allows to reset the internal state of the file picker to clear the current selection\n\n### Example\n\n```vue\n<template>\n\t<div>\n\t\t<div class=\"wrapper\">\n\t\t\t<NcFilePicker ref=\"picker\"\n\t\t\t\tdirectory\n\t\t\t\t@pick=\"selectedFiles = $event\" />\n\n\t\t\t<NcButton variant=\"tertiary\"\n\t\t\t\t@click=\"clearPicker\">\n\t\t\t\tClear\n\t\t\t</NcButton>\n\t\t</div>\n\n\t\t<h3>Selected files:</h3>\n\t\t<ul>\n\t\t\t<li v-for=\"file in selectedFiles\" key=\"file.name\">\n\t\t\t\t{{ file.webkitRelativePath || file.name }}\n\t\t\t</li>\n\t\t</ul>\n\t</div>\n</template>\n<script>\n\texport default {\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\tselectedFiles: [],\n\t\t\t}\n\t\t},\n\t\tmethods: {\n\t\t\t/**\n\t\t\t * This will clear the selected files from the picker.\n\t\t\t */\n\t\t\tclearPicker() {\n\t\t\t\tthis.$refs.picker.reset()\n\t\t\t},\n\t\t},\n\t}\n</script>\n<style scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 10px;\n}\n</style>\n```\n</docs>\n"],"names":["_sfc_main","_hoisted_3","_createElementBlock","_mergeProps","_createElementVNode","_openBlock","_normalizeClass","$style","_createVNode","disabled","loading","iconOnly","variant","_renderSlot","_createBlock","actionCaption","directoryOnly","_createTextVNode","_toDisplayString","$slots","multiple","_unref","_Fragment","_renderList","actions","accept"],"mappings":";;;;;;;;AAoBA,MAAKA,cAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA;IAER,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA;IAEX,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACF;AACF;;;AAxBY,MAAAC,eAAA,EAAA,GAAE,yHAAwH;;;sBAXpIC,mBAeO,QAfPC,WAAc,KAAA,QAAM;AAAA,IACb,eAAa,OAAA,QAAK,OAAA;AAAA,IAClB,cAAY,OAAA;AAAA,IACb,OAAM;AAAA,IACN,MAAK;AAAA,IACJ,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,YAAE,KAAA,MAAK,SAAU,MAAM;AAAA;kBACjCD,mBAQM,OAAA;AAAA,MARA,MAAM,OAAA;AAAA,MACP,OAAM;AAAA,MACL,OAAO,OAAA;AAAA,MACP,QAAQ,OAAA;AAAA,MACT,SAAQ;AAAA;MACXE,mBAEO,QAFPH,cAEO;AAAA,Q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AAA;cACb,cACV,MAA2E;AAAA,gBAA3EN,YAA2E,kBAAA;AAAA,kBAAzD,OAAA,EAAA,SAAA,+BAAA;AAAA,kBAA6C,MAAM;AAAA,gBAAA;;+BAC3D,MAEX;AAAA,gCAFW,MAEXU,gBAAA,CAAIF,sBAAiBG,KAAAA,OAAO,UAAUE,MAAA,CAAA,EAAC,eAAA,IAAoB,aAAA,KAAY,GAAA,CAAA;AAAA,cAAA;;;8BAGxEnB,mBAgBWoB,UAAA,MAAAC,WAhBeC,KAAAA,SAAO,CAAhB,UAAK;;gBAEb,MAA8B,wBADtCV,YAGkD,iBAAA;AAAA,kBADhD,KAAM,MAA8B;AAAA,kBACpC,MAAO,MAA8B;AAAA,gBAAA;iBAEvCT,UAAA,IAAA,GAAAH,mBASiBoB,2BARE,MAA8B,WAAO,CAAK,SAArD,WAAM;sCADdR,YASiB,gBAAA;AAAA,oBAPf,KAAK,OAAO;AAAA,oBACb,iBAAA;AAAA,oBACC,SAAO,OAAO;AAAA,kBAAA;oBACJ,cACV,MAA0C;AAAA,sBAA1CN,YAA0C,kBAAA;AAAA,wBAAvB,KAAK,OAAO;AAAA,sBAAA;;qCACrB,MACX;AAAA,sCADW,MACXU,gBAAG,OAAO,KAAK,GAAA,CAAA;AAAA,oBAAA;;;;;;;;;QAMlBd,mBAOkB,SAAA;AAAA,UANjB,KAAI;AAAA,UACH,QAAQqB,KAAAA,QAAQ,KAAI,IAAA;AAAA,UACrB,eAAY;AAAA,UACZ,OAAM;AAAA,UACL,UAAAL,KAAAA;AAAAA,UACD,MAAK;AAAA,UACJ,UAAQ;AAAA,QAAA;QAEVP,WAAQ,KAAA,QAAA,SAAA;AAAA,MAAA;;;;;;;;;;;;","x_google_ignoreList":[0,1,2]}
@@ -1,7 +1,7 @@
1
1
  import '../assets/NcFormBoxButton-BWfU7d2r.css';
2
2
  import { reactive, inject, computed, defineComponent, toRef, openBlock, createBlock, mergeProps, unref, createSlots, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from "vue";
3
3
  import { s as mdiOpenInNew, t as mdiArrowTopRight } from "./mdi-CpchYUUV.mjs";
4
- import { N as NcFormBoxItem } from "./NcFormBoxItem-B7YVodqN.mjs";
4
+ import { N as NcFormBoxItem } from "./NcFormBoxItem-CHxCeuxj.mjs";
5
5
  import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-De-2-ukl.mjs";
6
6
  import { routerKey } from "vue-router";
7
7
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
@@ -142,4 +142,4 @@ const NcFormBoxButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules",
142
142
  export {
143
143
  NcFormBoxButton as N
144
144
  };
145
- //# sourceMappingURL=NcFormBoxButton-JvZ6_2E3.mjs.map
145
+ //# sourceMappingURL=NcFormBoxButton-DhEpFn7z.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcFormBoxButton-JvZ6_2E3.mjs","sources":["../../src/composables/useButtonLink.ts","../../src/components/NcFormBoxButton/NcFormBoxButton.vue"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { AnchorHTMLAttributes, ButtonHTMLAttributes, MaybeRef } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\n\nimport { computed, inject, reactive } from 'vue'\nimport { routerKey } from 'vue-router'\n\ntype ButtonLinkProps = {\n\t// Required - general link props\n\n\t/**\n\t * RouterLink's to props and a trigger to use RouterLink.\n\t * Note: This takes precedence over the href attribute.\n\t */\n\tto: MaybeRef<RouteLocationRaw | undefined>\n\t/**\n\t * HyperLink href attribute and a trigger to use <a> hyperlink.\n\t */\n\thref: MaybeRef<string | undefined>\n\t/**\n\t * Define additional attributes, based on the tag\n\t */\n\tadditionalAttrs?: (tag: 'RouterLink' | 'a' | 'button') => object | undefined\n\n\t// RouterLink props\n\n\t/**\n\t * RouterLink's activeClass prop\n\t */\n\tactiveClass?: MaybeRef<string | undefined>\n\n\t// Hyperlink\n\n\t/**\n\t * <a> hyperlink's target attribute\n\t */\n\ttarget?: MaybeRef<AnchorHTMLAttributes['target'] | undefined>\n\t/**\n\t * <a> hyperlink's download attribute\n\t */\n\tdownload?: MaybeRef<string | boolean | undefined>\n\n\t// Button\n\n\t/**\n\t * <button> element's type attribute, but default to \"button\" instead of \"submit\"\n\t */\n\ttype?: MaybeRef<ButtonHTMLAttributes['type'] | undefined>\n\t/**\n\t * <button> element's disabled attribute\n\t */\n\tdisabled?: MaybeRef<boolean | undefined>\n}\n\n/**\n * Reusable implementation of an interactive button-like element that can be a link or a button\n *\n * @param options - Props to determine the button/link behavior. Can be a reactive object, or an object with nested refs, or mixed.\n */\nexport function useButtonLink(options: ButtonLinkProps) {\n\t// Resolve all MaybeRef-s values and maybe reactive object via unwrapping\n\tconst props = reactive(options)\n\n\tconst hasVueRouterContext = inject(routerKey, null) !== null\n\n\t/**\n\t * Tag name to be used\n\t */\n\tconst tag = computed(() => {\n\t\t// TODO: should we warn if props.to is provided but there is no vue-router?\n\t\tif (hasVueRouterContext && props.to) {\n\t\t\t// Note: RouterLink is used as globally registered component (by name) and not imported intentionally\n\t\t\t// to use injected component from the app and not bundle it to the button\n\t\t\treturn 'RouterLink'\n\t\t} else if (props.href) {\n\t\t\treturn 'a'\n\t\t} else {\n\t\t\treturn 'button'\n\t\t}\n\t})\n\n\tconst isLink = computed(() => tag.value === 'RouterLink' || tag.value === 'a')\n\tconst isHyperLink = computed(() => tag.value === 'a')\n\tconst isRouterLink = computed(() => tag.value === 'RouterLink')\n\tconst isButton = computed(() => tag.value === 'button')\n\n\tconst attrs = computed(() => {\n\t\tif (tag.value === 'RouterLink') {\n\t\t\treturn {\n\t\t\t\tto: props.to,\n\t\t\t\tactiveClass: 'active',\n\t\t\t\t...(props.additionalAttrs?.('RouterLink') ?? {}),\n\t\t\t}\n\t\t} else if (tag.value === 'a') {\n\t\t\treturn {\n\t\t\t\thref: props.href,\n\t\t\t\ttarget: props.target,\n\t\t\t\tdownload: props.download || undefined,\n\t\t\t\trel: 'nofollow noreferrer noopener',\n\t\t\t\t...(props.additionalAttrs?.('a') ?? {}),\n\t\t\t}\n\t\t} else if (tag.value === 'button') {\n\t\t\treturn {\n\t\t\t\ttype: props.type || 'button',\n\t\t\t\tdisabled: props.disabled,\n\t\t\t\t...(props.additionalAttrs?.('button') ?? {}),\n\t\t\t}\n\t\t}\n\t})\n\n\treturn {\n\t\ttag,\n\t\tisLink,\n\t\tisHyperLink,\n\t\tisRouterLink,\n\t\tisButton,\n\t\tattrs,\n\t}\n}\n","<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { AnchorHTMLAttributes, Slot } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\n\nimport { mdiArrowTopRight, mdiOpenInNew } from '@mdi/js'\nimport { computed, toRef } from 'vue'\nimport NcFormBoxItem from '../NcFormBox/NcFormBoxItem.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport { useButtonLink } from '../../composables/useButtonLink.ts'\n\nconst {\n\tlabel = undefined,\n\tdescription = undefined,\n\tinvertedAccent = false,\n\tto = undefined,\n\thref = undefined,\n\ttarget = undefined, // TODO: should it be _blank by default?\n\tdisabled = false,\n} = defineProps<{\n\t/** Main label */\n\tlabel?: string\n\t/** Optional description below the label, also used for the aria-describedby */\n\tdescription?: string\n\t/** Accent on the description instead of the label (see docs) */\n\tinvertedAccent?: boolean\n\t/** RouterLink's `to` prop; when provided, renders as `<RouterLink>` (takes precedence over the `href` prop) */\n\tto?: RouteLocationRaw\n\t/** Hyperlink `href` attribute; when provided, renders as `<a>` */\n\thref?: string\n\t/** Hyperlink's target attribute */\n\ttarget?: AnchorHTMLAttributes['target']\n\t/** Button's disabled attribute, not applicable to links */\n\tdisabled?: boolean\n}>()\n\ndefineEmits<{\n\t/** Native click event */\n\tclick: [event: MouseEvent]\n}>()\n\ndefineSlots<{\n\t/** Custom label content */\n\tdefault?: Slot\n\t/** Custom description content */\n\tdescription?: Slot\n\t/** Required icon (links have a default icon) */\n\ticon?: Slot // TODO: should the default link icon only be used for _blank links?\n}>()\n\nconst { tag, attrs, isLink } = useButtonLink({\n\tto: toRef(() => to),\n\thref: toRef(() => href),\n\ttarget: toRef(() => target),\n\tdisabled: toRef(() => disabled),\n})\n\nconst icon = computed(() => {\n\tif (isLink.value) {\n\t\treturn target === '_blank' ? mdiOpenInNew : mdiArrowTopRight\n\t}\n\treturn undefined\n})\n</script>\n\n<template>\n\t<NcFormBoxItem\n\t\t:tag\n\t\t:itemClasses=\"[\n\t\t\t'button-vue', /* Reset server's global HTML button styles */\n\t\t\t$style.formBoxButton,\n\t\t]\"\n\t\t:invertedAccent\n\t\tv-bind=\"attrs\"\n\t\ttabindex=\"0\"\n\t\t@click=\"$emit('click', $event)\">\n\t\t<template v-if=\"$slots.default || label\" #default>\n\t\t\t<slot>\n\t\t\t\t{{ label }}\n\t\t\t</slot>\n\t\t</template>\n\t\t<template v-if=\"$slots.description || description\" #description>\n\t\t\t<slot name=\"description\">\n\t\t\t\t{{ description }}\n\t\t\t</slot>\n\t\t</template>\n\t\t<template v-if=\"$slots.icon || icon\" #icon>\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<NcIconSvgWrapper v-if=\"icon\" :path=\"icon\" inline />\n\t\t\t</slot>\n\t\t</template>\n\t</NcFormBoxItem>\n</template>\n\n<style lang=\"scss\" module>\n.formBoxButton {\n\t/* Reset default HTML button styles */\n\tbackground: unset;\n\tborder: none;\n\tcolor: inherit;\n\tfont-size: inherit;\n\tfont-weight: inherit;\n\ttext-decoration: none;\n\ttext-align: inherit;\n\tline-height: inherit;\n\tpadding: 0;\n\tmargin: 0;\n\toutline: none;\n}\n</style>\n\n<docs>\n### General\n\nAn interactive button-like item within `<NcFormBox>`. It can be a button or a native link/router link if `to` or `href` props are provided.\n\nLike other form box items, it has a label and an optional description.\n\n```vue\n<script>\nimport { mdiContentCopy, mdiInformationOutline } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\treturn {\n\t\t\tmdiContentCopy,\n\t\t\tmdiInformationOutline,\n\t\t}\n\t},\n}\n</script>\n\n<template>\n\t<NcFormBox>\n\t\t<NcFormBoxButton\n\t\t\tlabel=\"Nextcloud\"\n\t\t\thref=\"https://nextcloud.com\"\n\t\t\ttarget=\"_blank\" />\n\n\t\t<NcFormBoxButton\n\t\t\thref=\"https://nextcloud-vue-components.netlify.app\">\n\t\t\t<code>@nextcloud/vue</code> documentation\n\t\t</NcFormBoxButton>\n\n\t\t<NcFormBoxButton\n\t\t\tlabel=\"About\"\n\t\t\tdescription=\"Installation details\"\n\t\t\thref=\"https://nextcloud.com\"\n\t\t\ttarget=\"_blank\">\n\t\t\t<template #icon>\n\t\t\t\t<NcIconSvgWrapper :path=\"mdiInformationOutline\" inline />\n\t\t\t</template>\n\t\t</NcFormBoxButton>\n\n\t\t<NcFormBoxButton\n\t\t\tlabel=\"Public signing key\">\n\t\t\t<template #description>\n\t\t\t\t<code>SSBkb24ndCBrbm93IHdoeSB5b3UgZGVjb2RlZCB0aGlzIHZhbHVlDQrgvLwg44GkIOKXlV/il5Ug4Ly944Gk</code>\n\t\t\t</template>\n\t\t\t<template #icon>\n\t\t\t\t<NcIconSvgWrapper :path=\"mdiContentCopy\" inline />\n\t\t\t</template>\n\t\t</NcFormBoxButton>\n\t</NcFormBox>\n</template>\n```\n\n### Inverted accent\n\nSometimes the description is more important than the label. In such cases use `inverted-accent` prop.\n\nFor example:\n- **Steps:** the description of the step is more important than the step number\n- **Copy button:** the value being copied is more important than the value label\n- **Folder picker:** the selected folder path is more important than the input label\n\n```vue\n<script>\nimport { mdiContentCopy, mdiDomain, mdiFolderOpenOutline } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\treturn { mdiContentCopy, mdiDomain, mdiFolderOpenOutline }\n\t},\n}\n</script>\n\n<template>\n\t<div style=\"display: flex; flex-direction: column; gap: calc(4 * var(--default-grid-baseline));\">\n\t\t<NcFormGroup label=\"Mailvelope\" description=\"A browser extension that enables easy OpenPGP encryption and decryption of emails\">\n\t\t\t<NcFormBox>\n\t\t\t\t<NcFormBoxButton\n\t\t\t\t\tlabel=\"Step 1\"\n\t\t\t\t\tdescription=\"Install the browser extension\"\n\t\t\t\t\thref=\"https://www.mailvelope.com/\"\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\tinverted-accent />\n\t\t\t\t<NcFormBoxButton\n\t\t\t\t\tlabel=\"Step 2\"\n\t\t\t\t\tdescription=\"Enable the current domain\"\n\t\t\t\t\tinverted-accent>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiDomain\" inline />\n\t\t\t\t\t</template>\n\t\t\t\t</NcFormBoxButton>\n\t\t\t</NcFormBox>\n\t\t</NcFormGroup>\n\n\t\t<NcFormGroup label=\"CalDAV\" description=\"Access Nextcloud calendars from other apps and devices\">\n\t\t\t<NcFormBox>\n\t\t\t\t<NcFormBoxButton\n\t\t\t\t\tlabel=\"CalDAV URL\"\n\t\t\t\t\tdescription=\"https://cloud.example.com/remote.php/dav/\"\n\t\t\t\t\tinverted-accent>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiContentCopy\" inline />\n\t\t\t\t\t</template>\n\t\t\t\t</NcFormBoxButton>\n\t\t\t\t<NcFormBoxButton\n\t\t\t\t\tlabel=\"Server Address for iOS and macOS\"\n\t\t\t\t\tdescription=\"https://cloud.example.com/remote.php/dav/principals/users/user/\"\n\t\t\t\t\tinverted-accent>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiContentCopy\" inline />\n\t\t\t\t\t</template>\n\t\t\t\t</NcFormBoxButton>\n\t\t\t</NcFormBox>\n\t\t</NcFormGroup>\n\n\t\t<NcFormGroup label=\"Files\">\n\t\t\t<NcFormBox>\n\t\t\t\t<NcFormBoxButton\n\t\t\t\t\tlabel=\"Attachments folder\"\n\t\t\t\t\tdescription=\"/Talk\"\n\t\t\t\t\tinverted-accent>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiFolderOpenOutline\" inline />\n\t\t\t\t\t</template>\n\t\t\t\t</NcFormBoxButton>\n\t\t\t</NcFormBox>\n\t\t</NcFormGroup>\n\t</div>\n</template>\n```\n\n### Requirements\n\n- Label is required (`label` prop or the default slot)\n- Icon is required unless there is a default icon (links)\n\n```vue\n<template>\n\t<NcFormBox>\n\t\t<NcFormBoxButton description=\"No label example\">\n\t\t\t<template #icon>\n\t\t\t\t✅\n\t\t\t</template>\n\t\t</NcFormBoxButton>\n\t\t<NcFormBoxButton label=\"No icon example\"/>\n\t\t<NcFormBoxButton\n\t\t\tlabel=\"No icon link example\"\n\t\t\tdescription=\"Links have a default icon\"\n\t\t\thref=\"https://nextcloud.com\"\n\t\t\ttarget=\"_blank\" />\n\t</NcFormBox>\n</template>\n```\n</docs>\n"],"names":["_openBlock","_createBlock","_mergeProps","_unref","$style","invertedAccent","$emit","$slots","label","_renderSlot","description"],"mappings":";;;;;;AAAA;AAAA;AAAA;AAAA;AA+DO,SAAS,cAAc,SAA0B;AAEvD,QAAM,QAAQ,SAAS,OAAO;AAE9B,QAAM,sBAAsB,OAAO,WAAW,IAAI,MAAM;AAKxD,QAAM,MAAM,SAAS,MAAM;AAE1B,QAAI,uBAAuB,MAAM,IAAI;AAGpC,aAAO;AAAA,IACR,WAAW,MAAM,MAAM;AACtB,aAAO;AAAA,IACR,OAAO;AACN,aAAO;AAAA,IACR;AAAA,EACD,CAAC;AAED,QAAM,SAAS,SAAS,MAAM,IAAI,UAAU,gBAAgB,IAAI,UAAU,GAAG;AAC7E,QAAM,cAAc,SAAS,MAAM,IAAI,UAAU,GAAG;AACpD,QAAM,eAAe,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aAAW;AAAA;;UAAuEC,KAAAA,OAAO;AAAA,QAAA;AAAA,QAIzF,gBAAAC,KAAAA;AAAAA,MAAAA,GACOF,MAAA,KAAA,GAAK;AAAA,QACb,UAAS;AAAA,QACR,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,CAAA,WAAEG,KAAAA,MAAK,SAAU,MAAM;AAAA,MAAA;QACbC,KAAAA,OAAO,WAAWC,KAAAA;gBAAQ;AAAA,sBACzC,MAEO;AAAA,YAFPC,WAEO,4BAFP,MAEO;AAAA,8CADHD,KAAAA,KAAK,GAAA,CAAA;AAAA,YAAA;;;;QAGMD,KAAAA,OAAO,eAAeG,KAAAA;gBAAc;AAAA,sBACnD,MAEO;AAAA,YAFPD,WAEO,gCAFP,MAEO;AAAA,8CADHC,KAAAA,WAAW,GAAA,CAAA;AAAA,YAAA;;;;QAGAH,KAAAA,OAAO,QAAQ,KAAA;gBAAO;AAAA,sBACrC,MAEO;AAAA,YAFPE,WAEO,yBAFP,MAEO;AAAA,cADkB,KAAA,sBAAxBR,YAAoD,kBAAA;AAAA;gBAArB,MAAM,KAAA;AAAA,gBAAM,QAAA;AAAA,cAAA;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcFormBoxButton-DhEpFn7z.mjs","sources":["../../src/composables/useButtonLink.ts","../../src/components/NcFormBoxButton/NcFormBoxButton.vue"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { AnchorHTMLAttributes, ButtonHTMLAttributes, MaybeRef } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\n\nimport { computed, inject, reactive } from 'vue'\nimport { routerKey } from 'vue-router'\n\ntype ButtonLinkProps = {\n\t// Required - general link props\n\n\t/**\n\t * RouterLink's to props and a trigger to use RouterLink.\n\t * Note: This takes precedence over the href attribute.\n\t */\n\tto: MaybeRef<RouteLocationRaw | undefined>\n\t/**\n\t * HyperLink href attribute and a trigger to use <a> hyperlink.\n\t */\n\thref: MaybeRef<string | undefined>\n\t/**\n\t * Define additional attributes, based on the tag\n\t */\n\tadditionalAttrs?: (tag: 'RouterLink' | 'a' | 'button') => object | undefined\n\n\t// RouterLink props\n\n\t/**\n\t * RouterLink's activeClass prop\n\t */\n\tactiveClass?: MaybeRef<string | undefined>\n\n\t// Hyperlink\n\n\t/**\n\t * <a> hyperlink's target attribute\n\t */\n\ttarget?: MaybeRef<AnchorHTMLAttributes['target'] | undefined>\n\t/**\n\t * <a> hyperlink's download attribute\n\t */\n\tdownload?: MaybeRef<string | boolean | undefined>\n\n\t// Button\n\n\t/**\n\t * <button> element's type attribute, but default to \"button\" instead of \"submit\"\n\t */\n\ttype?: MaybeRef<ButtonHTMLAttributes['type'] | undefined>\n\t/**\n\t * <button> element's disabled attribute\n\t */\n\tdisabled?: MaybeRef<boolean | undefined>\n}\n\n/**\n * Reusable implementation of an interactive button-like element that can be a link or a button\n *\n * @param options - Props to determine the button/link behavior. Can be a reactive object, or an object with nested refs, or mixed.\n */\nexport function useButtonLink(options: ButtonLinkProps) {\n\t// Resolve all MaybeRef-s values and maybe reactive object via unwrapping\n\tconst props = reactive(options)\n\n\tconst hasVueRouterContext = inject(routerKey, null) !== null\n\n\t/**\n\t * Tag name to be used\n\t */\n\tconst tag = computed(() => {\n\t\t// TODO: should we warn if props.to is provided but there is no vue-router?\n\t\tif (hasVueRouterContext && props.to) {\n\t\t\t// Note: RouterLink is used as globally registered component (by name) and not imported intentionally\n\t\t\t// to use injected component from the app and not bundle it to the button\n\t\t\treturn 'RouterLink'\n\t\t} else if (props.href) {\n\t\t\treturn 'a'\n\t\t} else {\n\t\t\treturn 'button'\n\t\t}\n\t})\n\n\tconst isLink = computed(() => tag.value === 'RouterLink' || tag.value === 'a')\n\tconst isHyperLink = computed(() => tag.value === 'a')\n\tconst isRouterLink = computed(() => tag.value === 'RouterLink')\n\tconst isButton = computed(() => tag.value === 'button')\n\n\tconst attrs = computed(() => {\n\t\tif (tag.value === 'RouterLink') {\n\t\t\treturn {\n\t\t\t\tto: props.to,\n\t\t\t\tactiveClass: 'active',\n\t\t\t\t...(props.additionalAttrs?.('RouterLink') ?? {}),\n\t\t\t}\n\t\t} else if (tag.value === 'a') {\n\t\t\treturn {\n\t\t\t\thref: props.href,\n\t\t\t\ttarget: props.target,\n\t\t\t\tdownload: props.download || undefined,\n\t\t\t\trel: 'nofollow noreferrer noopener',\n\t\t\t\t...(props.additionalAttrs?.('a') ?? {}),\n\t\t\t}\n\t\t} else if (tag.value === 'button') {\n\t\t\treturn {\n\t\t\t\ttype: props.type || 'button',\n\t\t\t\tdisabled: props.disabled,\n\t\t\t\t...(props.additionalAttrs?.('button') ?? {}),\n\t\t\t}\n\t\t}\n\t})\n\n\treturn {\n\t\ttag,\n\t\tisLink,\n\t\tisHyperLink,\n\t\tisRouterLink,\n\t\tisButton,\n\t\tattrs,\n\t}\n}\n","<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { AnchorHTMLAttributes, Slot } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\n\nimport { mdiArrowTopRight, mdiOpenInNew } from '@mdi/js'\nimport { computed, toRef } from 'vue'\nimport NcFormBoxItem from '../NcFormBox/NcFormBoxItem.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport { useButtonLink } from '../../composables/useButtonLink.ts'\n\nconst {\n\tlabel = undefined,\n\tdescription = undefined,\n\tinvertedAccent = false,\n\tto = undefined,\n\thref = undefined,\n\ttarget = undefined, // TODO: should it be _blank by default?\n\tdisabled = false,\n} = defineProps<{\n\t/** Main label */\n\tlabel?: string\n\t/** Optional description below the label, also used for the aria-describedby */\n\tdescription?: string\n\t/** Accent on the description instead of the label (see docs) */\n\tinvertedAccent?: boolean\n\t/** RouterLink's `to` prop; when provided, renders as `<RouterLink>` (takes precedence over the `href` prop) */\n\tto?: RouteLocationRaw\n\t/** Hyperlink `href` attribute; when provided, renders as `<a>` */\n\thref?: string\n\t/** Hyperlink's target attribute */\n\ttarget?: AnchorHTMLAttributes['target']\n\t/** Button's disabled attribute, not applicable to links */\n\tdisabled?: boolean\n}>()\n\ndefineEmits<{\n\t/** Native click event */\n\tclick: [event: MouseEvent]\n}>()\n\ndefineSlots<{\n\t/** Custom label content */\n\tdefault?: Slot\n\t/** Custom description content */\n\tdescription?: Slot\n\t/** Required icon (links have a default icon) */\n\ticon?: Slot // TODO: should the default link icon only be used for _blank links?\n}>()\n\nconst { tag, attrs, isLink } = useButtonLink({\n\tto: toRef(() => to),\n\thref: toRef(() => href),\n\ttarget: toRef(() => target),\n\tdisabled: toRef(() => disabled),\n})\n\nconst icon = computed(() => {\n\tif (isLink.value) {\n\t\treturn target === '_blank' ? mdiOpenInNew : mdiArrowTopRight\n\t}\n\treturn undefined\n})\n</script>\n\n<template>\n\t<NcFormBoxItem\n\t\t:tag\n\t\t:itemClasses=\"[\n\t\t\t'button-vue', /* Reset server's global HTML button styles */\n\t\t\t$style.formBoxButton,\n\t\t]\"\n\t\t:invertedAccent\n\t\tv-bind=\"attrs\"\n\t\ttabindex=\"0\"\n\t\t@click=\"$emit('click', $event)\">\n\t\t<template v-if=\"$slots.default || label\" #default>\n\t\t\t<slot>\n\t\t\t\t{{ label }}\n\t\t\t</slot>\n\t\t</template>\n\t\t<template v-if=\"$slots.description || description\" #description>\n\t\t\t<slot name=\"description\">\n\t\t\t\t{{ description }}\n\t\t\t</slot>\n\t\t</template>\n\t\t<template v-if=\"$slots.icon || icon\" #icon>\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<NcIconSvgWrapper v-if=\"icon\" :path=\"icon\" inline />\n\t\t\t</slot>\n\t\t</template>\n\t</NcFormBoxItem>\n</template>\n\n<style lang=\"scss\" module>\n.formBoxButton {\n\t/* Reset default HTML button styles */\n\tbackground: unset;\n\tborder: none;\n\tcolor: inherit;\n\tfont-size: inherit;\n\tfont-weight: inherit;\n\ttext-decoration: none;\n\ttext-align: inherit;\n\tline-height: inherit;\n\tpadding: 0;\n\tmargin: 0;\n\toutline: none;\n}\n</style>\n\n<docs>\n### General\n\nAn interactive button-like item within `<NcFormBox>`. It can be a button or a native link/router link if `to` or `href` props are provided.\n\nLike other form box items, it has a label and an optional description.\n\n```vue\n<script>\nimport { mdiContentCopy, mdiInformationOutline } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\treturn {\n\t\t\tmdiContentCopy,\n\t\t\tmdiInformationOutline,\n\t\t}\n\t},\n}\n</script>\n\n<template>\n\t<NcFormBox>\n\t\t<NcFormBoxButton\n\t\t\tlabel=\"Nextcloud\"\n\t\t\thref=\"https://nextcloud.com\"\n\t\t\ttarget=\"_blank\" />\n\n\t\t<NcFormBoxButton\n\t\t\thref=\"https://nextcloud-vue-components.netlify.app\">\n\t\t\t<code>@nextcloud/vue</code> documentation\n\t\t</NcFormBoxButton>\n\n\t\t<NcFormBoxButton\n\t\t\tlabel=\"About\"\n\t\t\tdescription=\"Installation details\"\n\t\t\thref=\"https://nextcloud.com\"\n\t\t\ttarget=\"_blank\">\n\t\t\t<template #icon>\n\t\t\t\t<NcIconSvgWrapper :path=\"mdiInformationOutline\" inline />\n\t\t\t</template>\n\t\t</NcFormBoxButton>\n\n\t\t<NcFormBoxButton\n\t\t\tlabel=\"Public signing key\">\n\t\t\t<template #description>\n\t\t\t\t<code>SSBkb24ndCBrbm93IHdoeSB5b3UgZGVjb2RlZCB0aGlzIHZhbHVlDQrgvLwg44GkIOKXlV/il5Ug4Ly944Gk</code>\n\t\t\t</template>\n\t\t\t<template #icon>\n\t\t\t\t<NcIconSvgWrapper :path=\"mdiContentCopy\" inline />\n\t\t\t</template>\n\t\t</NcFormBoxButton>\n\t</NcFormBox>\n</template>\n```\n\n### Inverted accent\n\nSometimes the description is more important than the label. In such cases use `inverted-accent` prop.\n\nFor example:\n- **Steps:** the description of the step is more important than the step number\n- **Copy button:** the value being copied is more important than the value label\n- **Folder picker:** the selected folder path is more important than the input label\n\n```vue\n<script>\nimport { mdiContentCopy, mdiDomain, mdiFolderOpenOutline } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\treturn { mdiContentCopy, mdiDomain, mdiFolderOpenOutline }\n\t},\n}\n</script>\n\n<template>\n\t<div style=\"display: flex; flex-direction: column; gap: calc(4 * var(--default-grid-baseline));\">\n\t\t<NcFormGroup label=\"Mailvelope\" description=\"A browser extension that enables easy OpenPGP encryption and decryption of emails\">\n\t\t\t<NcFormBox>\n\t\t\t\t<NcFormBoxButton\n\t\t\t\t\tlabel=\"Step 1\"\n\t\t\t\t\tdescription=\"Install the browser extension\"\n\t\t\t\t\thref=\"https://www.mailvelope.com/\"\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\tinverted-accent />\n\t\t\t\t<NcFormBoxButton\n\t\t\t\t\tlabel=\"Step 2\"\n\t\t\t\t\tdescription=\"Enable the current domain\"\n\t\t\t\t\tinverted-accent>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiDomain\" inline />\n\t\t\t\t\t</template>\n\t\t\t\t</NcFormBoxButton>\n\t\t\t</NcFormBox>\n\t\t</NcFormGroup>\n\n\t\t<NcFormGroup label=\"CalDAV\" description=\"Access Nextcloud calendars from other apps and devices\">\n\t\t\t<NcFormBox>\n\t\t\t\t<NcFormBoxButton\n\t\t\t\t\tlabel=\"CalDAV URL\"\n\t\t\t\t\tdescription=\"https://cloud.example.com/remote.php/dav/\"\n\t\t\t\t\tinverted-accent>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiContentCopy\" inline />\n\t\t\t\t\t</template>\n\t\t\t\t</NcFormBoxButton>\n\t\t\t\t<NcFormBoxButton\n\t\t\t\t\tlabel=\"Server Address for iOS and macOS\"\n\t\t\t\t\tdescription=\"https://cloud.example.com/remote.php/dav/principals/users/user/\"\n\t\t\t\t\tinverted-accent>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiContentCopy\" inline />\n\t\t\t\t\t</template>\n\t\t\t\t</NcFormBoxButton>\n\t\t\t</NcFormBox>\n\t\t</NcFormGroup>\n\n\t\t<NcFormGroup label=\"Files\">\n\t\t\t<NcFormBox>\n\t\t\t\t<NcFormBoxButton\n\t\t\t\t\tlabel=\"Attachments folder\"\n\t\t\t\t\tdescription=\"/Talk\"\n\t\t\t\t\tinverted-accent>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiFolderOpenOutline\" inline />\n\t\t\t\t\t</template>\n\t\t\t\t</NcFormBoxButton>\n\t\t\t</NcFormBox>\n\t\t</NcFormGroup>\n\t</div>\n</template>\n```\n\n### Requirements\n\n- Label is required (`label` prop or the default slot)\n- Icon is required unless there is a default icon (links)\n\n```vue\n<template>\n\t<NcFormBox>\n\t\t<NcFormBoxButton description=\"No label example\">\n\t\t\t<template #icon>\n\t\t\t\t✅\n\t\t\t</template>\n\t\t</NcFormBoxButton>\n\t\t<NcFormBoxButton label=\"No icon example\"/>\n\t\t<NcFormBoxButton\n\t\t\tlabel=\"No icon link example\"\n\t\t\tdescription=\"Links have a default icon\"\n\t\t\thref=\"https://nextcloud.com\"\n\t\t\ttarget=\"_blank\" />\n\t</NcFormBox>\n</template>\n```\n</docs>\n"],"names":["_openBlock","_createBlock","_mergeProps","_unref","$style","invertedAccent","$emit","$slots","label","_renderSlot","description"],"mappings":";;;;;;AAAA;AAAA;AAAA;AAAA;AA+DO,SAAS,cAAc,SAA0B;AAEvD,QAAM,QAAQ,SAAS,OAAO;AAE9B,QAAM,sBAAsB,OAAO,WAAW,IAAI,MAAM;AAKxD,QAAM,MAAM,SAAS,MAAM;AAE1B,QAAI,uBAAuB,MAAM,IAAI;AAGpC,aAAO;AAAA,IACR,WAAW,MAAM,MAAM;AACt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AC3B,UAAI,OAAO,OAAO;AACjB,eAAO,QAAA,WAAW,WAAW,eAAe;AAAA,MAC7C;AACA,aAAO;AAAA,IACR,CAAC;;AAIA,aAAAA,UAAA,GAAAC,YAyBgB,eAzBhBC,WAyBgB;AAAA,QAxBd,KAAAC,MAAA,GAAA;AAAA,QACA,aAAW;AAAA;;UAAuEC,KAAAA,OAAO;AAAA,QAAA;AAAA,QAIzF,gBAAAC,KAAAA;AAAAA,MAAAA,GACOF,MAAA,KAAA,GAAK;AAAA,QACb,UAAS;AAAA,QACR,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,CAAA,WAAEG,KAAAA,MAAK,SAAU,MAAM;AAAA,MAAA;QACbC,KAAAA,OAAO,WAAWC,KAAAA;gBAAQ;AAAA,sBACzC,MAEO;AAAA,YAFPC,WAEO,4BAFP,MAEO;AAAA,8CADHD,KAAAA,KAAK,GAAA,CAAA;AAAA,YAAA;;;;QAGMD,KAAAA,OAAO,eAAeG,KAAAA;gBAAc;AAAA,sBACnD,MAEO;AAAA,YAFPD,WAEO,gCAFP,MAEO;AAAA,8CADHC,KAAAA,WAAW,GAAA,CAAA;AAAA,YAAA;;;;QAGAH,KAAAA,OAAO,QAAQ,KAAA;gBAAO;AAAA,sBACrC,MAEO;AAAA,YAFPE,WAEO,yBAFP,MAEO;AAAA,cADkB,KAAA,sBAAxBR,YAAoD,kBAAA;AAAA;gBAArB,MAAM,KAAA;AAAA,gBAAM,QAAA;AAAA,cAAA;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, openBlock, createBlock, unref, createSlots, withCtx, createVNode, createTextVNode, toDisplayString, createElementVNode, renderSlot } from "vue";
2
2
  import { whenever } from "@vueuse/core";
3
- import { N as NcFormBoxButton } from "./NcFormBoxButton-JvZ6_2E3.mjs";
3
+ import { N as NcFormBoxButton } from "./NcFormBoxButton-DhEpFn7z.mjs";
4
4
  import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-De-2-ukl.mjs";
5
5
  import { u as useCopy } from "./useCopy--plF8q1P.mjs";
6
6
  const _hoisted_1 = { class: "hidden-visually" };
@@ -50,4 +50,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
50
50
  export {
51
51
  _sfc_main as _
52
52
  };
53
- //# sourceMappingURL=NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DhKiWUS8.mjs.map
53
+ //# sourceMappingURL=NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DLh3Ylq_.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DhKiWUS8.mjs","sources":["../../src/components/NcFormBoxCopyButton/NcFormBoxCopyButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { whenever } from '@vueuse/core'\nimport NcFormBoxButton from '../NcFormBoxButton/NcFormBoxButton.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport { useCopy } from '../../composables/useCopy.ts'\n\nconst {\n\tlabel = undefined,\n\tvalue,\n\tdisabled = false,\n} = defineProps<{\n\t/** Copied value's value */\n\tlabel?: string\n\t/** The value to be copied */\n\tvalue: string\n\t/** Native disabled attribute */\n\tdisabled?: boolean\n}>()\n\nconst emit = defineEmits<{\n\t/** Value has been successfully copied */\n\tcopy: []\n}>()\n\ndefineSlots<{\n\t/** Custom label content */\n\tdefault?: Slot\n}>()\n\nconst { isCopied, copy, icon, altText } = useCopy(() => value)\n\nwhenever(isCopied, () => emit('copy'))\n</script>\n\n<template>\n\t<NcFormBoxButton\n\t\t:disabled\n\t\tinvertedAccent\n\t\t@click=\"copy\">\n\t\t<template v-if=\"$slots.default || label\" #default>\n\t\t\t<span class=\"hidden-visually\">\n\t\t\t\t{{ altText }}\n\t\t\t</span>\n\t\t\t<slot>\n\t\t\t\t{{ label }}\n\t\t\t</slot>\n\t\t</template>\n\t\t<template #description>\n\t\t\t{{ value }}\n\t\t</template>\n\t\t<template #icon>\n\t\t\t<NcIconSvgWrapper :path=\"icon\" inline />\n\t\t</template>\n\t</NcFormBoxButton>\n</template>\n\n<docs>\n### General\n\n`NcFormBoxButton` set up to be a copy button.\n\n```vue\n<template>\n\t<NcFormGroup label=\"CalDAV\" description=\"Access Nextcloud calendars from other apps and devices\">\n\t\t<NcFormBox>\n\t\t\t<NcFormBoxCopyButton\n\t\t\t\tlabel=\"CalDAV URL\"\n\t\t\t\tvalue=\"https://cloud.example.com/remote.php/dav/\" />\n\t\t\t<NcFormBoxCopyButton\n\t\t\t\tlabel=\"Server Address for iOS and macOS\"\n\t\t\t\tvalue=\"https://cloud.example.com/remote.php/dav/principals/users/user/\" />\n\t\t</NcFormBox>\n\t</NcFormGroup>\n</template>\n```\n</docs>\n"],"names":["_createBlock","disabled","_unref","value","_createVNode","$slots","label","_createElementVNode","_toDisplayString","_renderSlot"],"mappings":";;;;;;;;;;;;;;;AA0BA,UAAM,OAAO;AAUb,UAAM,EAAE,UAAU,MAAM,MAAM,YAAY,QAAQ,MAAM,QAAA,KAAK;AAE7D,aAAS,UAAU,MAAM,KAAK,MAAM,CAAC;;0BAIpCA,YAkBkB,iBAAA;AAAA,QAjBhB,UAAAC,KAAAA;AAAAA,QACD,gBAAA;AAAA,QACC,SAAOC,MAAA,IAAA;AAAA,MAAA;QASG,qBACV,MAAW;AAAA,0CAARC,KAAAA,KAAK,GAAA,CAAA;AAAA,QAAA;QAEE,cACV,MAAwC;AAAA,UAAxCC,YAAwC,kBAAA;AAAA,YAArB,MAAMF,MAAA,IAAA;AAAA,YAAM,QAAA;AAAA,UAAA;;;;QAZhBG,KAAAA,OAAO,WAAWC,KAAAA;gBAAQ;AAAA,sBACzC,MAEO;AAAA,YAFPC,mBAEO,QAFP,YAEOC,gBADHN,MAAA,OAAA,CAAO,GAAA,CAAA;AAAA,YAEXO,WAEO,4BAFP,MAEO;AAAA,8CADHH,KAAAA,KAAK,GAAA,CAAA;AAAA,YAAA;;;;;;;;"}
1
+ {"version":3,"file":"NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DLh3Ylq_.mjs","sources":["../../src/components/NcFormBoxCopyButton/NcFormBoxCopyButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { whenever } from '@vueuse/core'\nimport NcFormBoxButton from '../NcFormBoxButton/NcFormBoxButton.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport { useCopy } from '../../composables/useCopy.ts'\n\nconst {\n\tlabel = undefined,\n\tvalue,\n\tdisabled = false,\n} = defineProps<{\n\t/** Copied value's value */\n\tlabel?: string\n\t/** The value to be copied */\n\tvalue: string\n\t/** Native disabled attribute */\n\tdisabled?: boolean\n}>()\n\nconst emit = defineEmits<{\n\t/** Value has been successfully copied */\n\tcopy: []\n}>()\n\ndefineSlots<{\n\t/** Custom label content */\n\tdefault?: Slot\n}>()\n\nconst { isCopied, copy, icon, altText } = useCopy(() => value)\n\nwhenever(isCopied, () => emit('copy'))\n</script>\n\n<template>\n\t<NcFormBoxButton\n\t\t:disabled\n\t\tinvertedAccent\n\t\t@click=\"copy\">\n\t\t<template v-if=\"$slots.default || label\" #default>\n\t\t\t<span class=\"hidden-visually\">\n\t\t\t\t{{ altText }}\n\t\t\t</span>\n\t\t\t<slot>\n\t\t\t\t{{ label }}\n\t\t\t</slot>\n\t\t</template>\n\t\t<template #description>\n\t\t\t{{ value }}\n\t\t</template>\n\t\t<template #icon>\n\t\t\t<NcIconSvgWrapper :path=\"icon\" inline />\n\t\t</template>\n\t</NcFormBoxButton>\n</template>\n\n<docs>\n### General\n\n`NcFormBoxButton` set up to be a copy button.\n\n```vue\n<template>\n\t<NcFormGroup label=\"CalDAV\" description=\"Access Nextcloud calendars from other apps and devices\">\n\t\t<NcFormBox>\n\t\t\t<NcFormBoxCopyButton\n\t\t\t\tlabel=\"CalDAV URL\"\n\t\t\t\tvalue=\"https://cloud.example.com/remote.php/dav/\" />\n\t\t\t<NcFormBoxCopyButton\n\t\t\t\tlabel=\"Server Address for iOS and macOS\"\n\t\t\t\tvalue=\"https://cloud.example.com/remote.php/dav/principals/users/user/\" />\n\t\t</NcFormBox>\n\t</NcFormGroup>\n</template>\n```\n</docs>\n"],"names":["_createBlock","disabled","_unref","value","_createVNode","$slots","label","_createElementVNode","_toDisplayString","_renderSlot"],"mappings":";;;;;;;;;;;;;;;AA0BA,UAAM,OAAO;AAUb,UAAM,EAAE,UAAU,MAAM,MAAM,YAAY,QAAQ,MAAM,QAAA,KAAK;AAE7D,aAAS,UAAU,MAAM,KAAK,MAAM,CAAC;;0BAIpCA,YAkBkB,iBAAA;AAAA,QAjBhB,UAAAC,KAAAA;AAAAA,QACD,gBAAA;AAAA,QACC,SAAOC,MAAA,IAAA;AAAA,MAAA;QASG,qBACV,MAAW;AAAA,0CAARC,KAAAA,KAAK,GAAA,CAAA;AAAA,QAAA;QAEE,cACV,MAAwC;AAAA,UAAxCC,YAAwC,kBAAA;AAAA,YAArB,MAAMF,MAAA,IAAA;AAAA,YAAM,QAAA;AAAA,UAAA;;;;QAZhBG,KAAAA,OAAO,WAAWC,KAAAA;gBAAQ;AAAA,sBACzC,MAEO;AAAA,YAFPC,mBAEO,QAFP,YAEOC,gBADHN,MAAA,OAAA,CAAO,GAAA,CAAA;AAAA,YAEXO,WAEO,4BAFP,MAEO;AAAA,8CADHH,KAAAA,KAAK,GAAA,CAAA;AAAA,YAAA;;;;;;;;"}
@@ -1,8 +1,8 @@
1
- import '../assets/NcFormBoxItem-CATNOTQx.css';
1
+ import '../assets/NcFormBoxItem-Bjbi17-B.css';
2
2
  import { defineComponent, useSlots, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, createBlock, resolveDynamicComponent, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from "vue";
3
3
  import { u as useNcFormBox } from "./useNcFormBox-Djlh582y.mjs";
4
4
  import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
5
- import { i as isLegacy } from "./legacy-DcjXBL_t.mjs";
5
+ import { a as isLegacy } from "./legacy-BoqDmOCa.mjs";
6
6
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
7
7
  const _hoisted_1 = ["id"];
8
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -71,19 +71,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
71
71
  }
72
72
  });
73
73
  const formBoxItem = "_formBoxItem_74l6r";
74
+ const formBoxItem__description = "_formBoxItem__description_1GjPD";
74
75
  const formBoxItem_legacy = "_formBoxItem_legacy_IgNr3";
75
76
  const formBoxItem_inverted = "_formBoxItem_inverted_9GGkh";
76
77
  const formBoxItem__element = "_formBoxItem__element_YEZDA";
77
- const formBoxItem__description = "_formBoxItem__description_1GjPD";
78
78
  const formBoxItem__content = "_formBoxItem__content_CcZbG";
79
79
  const formBoxItem__icon = "_formBoxItem__icon_eZXNE";
80
80
  const style0 = {
81
81
  "material-design-icon": "_material-design-icon_D2F-K",
82
82
  formBoxItem,
83
+ formBoxItem__description,
83
84
  formBoxItem_legacy,
84
85
  formBoxItem_inverted,
85
86
  formBoxItem__element,
86
- formBoxItem__description,
87
87
  formBoxItem__content,
88
88
  formBoxItem__icon
89
89
  };
@@ -94,4 +94,4 @@ const NcFormBoxItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", c
94
94
  export {
95
95
  NcFormBoxItem as N
96
96
  };
97
- //# sourceMappingURL=NcFormBoxItem-B7YVodqN.mjs.map
97
+ //# sourceMappingURL=NcFormBoxItem-CHxCeuxj.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcFormBoxItem-B7YVodqN.mjs","sources":["../../src/components/NcFormBox/NcFormBoxItem.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\nimport type { VueClassType } from '../../utils/VueTypes.ts'\n\nimport { useNcFormBox } from '../../components/NcFormBox/useNcFormBox.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { isLegacy } from '../../utils/legacy.ts'\n\ndefineOptions({ inheritAttrs: false })\n\nconst {\n\ttag,\n\tlabel = undefined,\n\tdescription = undefined,\n\tinvertedAccent = false,\n\tclass: rootClasses = undefined,\n\titemClasses = undefined,\n} = defineProps<{\n\t/** Interactive item element's tag */\n\ttag: string\n\t/** Main Label */\n\tlabel?: string\n\t/** Optional description below the label, also used for the aria-describedby */\n\tdescription?: string\n\t/** Accent on the description instead of the label */\n\tinvertedAccent?: boolean\n\t/** Root element classes */\n\tclass?: VueClassType\n\t/** Interactive item classes */\n\titemClasses?: VueClassType\n}>()\n\ndefineEmits<{\n\t/** Click on the item */\n\tclick: [event: MouseEvent]\n}>()\n\nconst slots = defineSlots<{\n\t/** Item's label custom content */\n\tdefault?: Slot<{\n\t\t/** IDRef of the description element if present */\n\t\tdescriptionId?: string\n\t}>\n\t/** Custom description content */\n\tdescription?: Slot<{\n\t\t/** IDRef of the description element if present */\n\t\tdescriptionId?: string\n\t}>\n\t/** Icon content */\n\ticon?: Slot\n}>()\n\nconst { formBoxItemClass } = useNcFormBox()\n\nconst descriptionId = createElementId()\nconst hasDescription = () => !!description || !!slots.description\n</script>\n\n<template>\n\t<div\n\t\t:class=\"[\n\t\t\trootClasses,\n\t\t\t$style.formBoxItem,\n\t\t\tformBoxItemClass,\n\t\t\t{\n\t\t\t\t[$style.formBoxItem_inverted]: invertedAccent && hasDescription(),\n\t\t\t\t[$style.formBoxItem_legacy]: isLegacy,\n\t\t\t},\n\t\t]\">\n\t\t<span :class=\"$style.formBoxItem__content\">\n\t\t\t<component\n\t\t\t\t:is=\"tag\"\n\t\t\t\t:class=\"[$style.formBoxItem__element, itemClasses]\"\n\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t@click=\"$emit('click', $event)\">\n\t\t\t\t<slot :descriptionId>\n\t\t\t\t\t{{ label || '⚠️ Label is missing' }}\n\t\t\t\t</slot>\n\t\t\t</component>\n\t\t\t<span v-if=\"hasDescription()\" :id=\"descriptionId\" :class=\"$style.formBoxItem__description\">\n\t\t\t\t<slot name=\"description\">\n\t\t\t\t\t{{ description }}\n\t\t\t\t</slot>\n\t\t\t</span>\n\t\t</span>\n\t\t<span :class=\"$style.formBoxItem__icon\">\n\t\t\t<slot name=\"icon\" :descriptionId>\n\t\t\t\t⚠️ Icon is missing\n\t\t\t</slot>\n\t\t</span>\n\t</div>\n</template>\n\n<style lang=\"scss\" module>\n.formBoxItem {\n\t--nc-form-box-item-border-width: 1px;\n\t--nc-form-box-item-min-height: 40px; // Special size defined by the design\n\t--form-element-label-offset: calc(var(--border-radius-element) + var(--default-grid-baseline));\n\t--form-element-label-padding: calc(var(--form-element-label-offset) - var(--nc-form-box-item-border-width));\n\t// New colors we don't yet have in theming\n\t// TODO: add new colors to the theming\n\t--color-primary-element-extra-light: hsl(from var(--color-primary-element-light) h s calc(l * 1.045));\n\t--color-primary-element-extra-light-hover: hsl(from var(--color-primary-element-light-hover) h s calc(l * 1.045));\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: calc(2 * var(--default-grid-baseline));\n\tmin-height: var(--nc-form-box-item-min-height);\n\tpadding-inline: var(--form-element-label-padding);\n\tborder: 1px solid var(--color-primary-element-extra-light-hover);\n\tborder-bottom-width: 2px;\n\tborder-radius: var(--border-radius-element);\n\tbackground-color: var(--color-primary-element-extra-light);\n\tcolor: var(--color-main-text);\n\ttransition-property: color, border-color, background-color;\n\ttransition-duration: var(--animation-quick);\n\ttransition-timing-function: linear;\n\t-webkit-user-select: none;\n\tuser-select: none;\n\tcursor: pointer;\n\n\t* {\n\t\tcursor: inherit;\n\t}\n\n\t&:has(:disabled) {\n\t\tcursor: default;\n\t\topacity: 0.5;\n\t}\n\n\t&:hover:not(:has(:disabled)) {\n\t\tcolor: var(--color-primary-element-light-text);\n\t\tbackground-color: var(--color-primary-element-extra-light-hover);\n\t}\n\n\t&:has(:focus-visible) {\n\t\toutline: 2px solid var(--color-main-text);\n\t\tbox-shadow: 0 0 0 4px var(--color-main-background);\n\t}\n\n\t&.formBoxItem_legacy {\n\t\t--nc-form-box-item-border-width: 0px;\n\t\tborder: none;\n\t}\n\n\t&.formBoxItem_inverted {\n\t\t.formBoxItem__element {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\n\t\t.formBoxItem__description {\n\t\t\tcolor: inherit;\n\t\t}\n\t}\n}\n\n.formBoxItem__content {\n\tflex: 1;\n\tdisplay: flex;\n\tflex-direction: column;\n\tpadding-block: calc(2 * var(--default-grid-baseline));\n\toverflow-wrap: anywhere;\n}\n\n// A trick for accessibility:\n// make entire component clickable while internally splitting the interactive item and the description\n.formBoxItem__element::after {\n\tcontent: '';\n\tposition: absolute;\n\tinset: 0;\n}\n\n.formBoxItem__description {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.formBoxItem__icon {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: flex-end;\n}\n</style>\n\n<docs>\nAn internal component\n</docs>\n"],"names":["_useSlots","_createElementBlock","_normalizeClass","$style","_unref","invertedAccent","_createElementVNode","_createBlock","_resolveDynamicComponent","tag","_mergeProps","itemClasses","$attrs","$emit","_renderSlot","label","description"],"mappings":";;;;;;;;;;;;;;;;;;;AA0CA,UAAM,QAAQA,SAAA;AAed,UAAM,EAAE,iBAAA,IAAqB,aAAA;AAE7B,UAAM,gBAAgB,gBAAA;AACtB,UAAM,iBAAiB,MAAM,CAAC,CAAC,QAAA,eAAe,CAAC,CAAC,MAAM;;0BAIr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ources":["../../src/components/NcFormBox/NcFormBoxItem.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\nimport type { VueClassType } from '../../utils/VueTypes.ts'\n\nimport { useNcFormBox } from '../../components/NcFormBox/useNcFormBox.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { isLegacy } from '../../utils/legacy.ts'\n\ndefineOptions({ inheritAttrs: false })\n\nconst {\n\ttag,\n\tlabel = undefined,\n\tdescription = undefined,\n\tinvertedAccent = false,\n\tclass: rootClasses = undefined,\n\titemClasses = undefined,\n} = defineProps<{\n\t/** Interactive item element's tag */\n\ttag: string\n\t/** Main Label */\n\tlabel?: string\n\t/** Optional description below the label, also used for the aria-describedby */\n\tdescription?: string\n\t/** Accent on the description instead of the label */\n\tinvertedAccent?: boolean\n\t/** Root element classes */\n\tclass?: VueClassType\n\t/** Interactive item classes */\n\titemClasses?: VueClassType\n}>()\n\ndefineEmits<{\n\t/** Click on the item */\n\tclick: [event: MouseEvent]\n}>()\n\nconst slots = defineSlots<{\n\t/** Item's label custom content */\n\tdefault?: Slot<{\n\t\t/** IDRef of the description element if present */\n\t\tdescriptionId?: string\n\t}>\n\t/** Custom description content */\n\tdescription?: Slot<{\n\t\t/** IDRef of the description element if present */\n\t\tdescriptionId?: string\n\t}>\n\t/** Icon content */\n\ticon?: Slot\n}>()\n\nconst { formBoxItemClass } = useNcFormBox()\n\nconst descriptionId = createElementId()\nconst hasDescription = () => !!description || !!slots.description\n</script>\n\n<template>\n\t<div\n\t\t:class=\"[\n\t\t\trootClasses,\n\t\t\t$style.formBoxItem,\n\t\t\tformBoxItemClass,\n\t\t\t{\n\t\t\t\t[$style.formBoxItem_inverted]: invertedAccent && hasDescription(),\n\t\t\t\t[$style.formBoxItem_legacy]: isLegacy,\n\t\t\t},\n\t\t]\">\n\t\t<span :class=\"$style.formBoxItem__content\">\n\t\t\t<component\n\t\t\t\t:is=\"tag\"\n\t\t\t\t:class=\"[$style.formBoxItem__element, itemClasses]\"\n\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t@click=\"$emit('click', $event)\">\n\t\t\t\t<slot :descriptionId>\n\t\t\t\t\t{{ label || '⚠️ Label is missing' }}\n\t\t\t\t</slot>\n\t\t\t</component>\n\t\t\t<span v-if=\"hasDescription()\" :id=\"descriptionId\" :class=\"$style.formBoxItem__description\">\n\t\t\t\t<slot name=\"description\">\n\t\t\t\t\t{{ description }}\n\t\t\t\t</slot>\n\t\t\t</span>\n\t\t</span>\n\t\t<span :class=\"$style.formBoxItem__icon\">\n\t\t\t<slot name=\"icon\" :descriptionId>\n\t\t\t\t⚠️ Icon is missing\n\t\t\t</slot>\n\t\t</span>\n\t</div>\n</template>\n\n<style lang=\"scss\" module>\n.formBoxItem {\n\t--nc-form-box-item-border-width: 1px;\n\t--nc-form-box-item-min-height: 40px; // Special size defined by the design\n\t--form-element-label-offset: calc(var(--border-radius-element) + var(--default-grid-baseline));\n\t--form-element-label-padding: calc(var(--form-element-label-offset) - var(--nc-form-box-item-border-width));\n\t// New colors we don't yet have in theming\n\t// TODO: add new colors to the theming\n\t--color-primary-element-extra-light: hsl(from var(--color-primary-element-light) h s calc(l * 1.045));\n\t--color-primary-element-extra-light-hover: hsl(from var(--color-primary-element-light-hover) h s calc(l * 1.045));\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: calc(2 * var(--default-grid-baseline));\n\tmin-height: var(--nc-form-box-item-min-height);\n\tpadding-inline: var(--form-element-label-padding);\n\tborder: 1px solid var(--color-primary-element-extra-light-hover);\n\tborder-bottom-width: 2px;\n\tborder-radius: var(--border-radius-element);\n\tbackground-color: var(--color-primary-element-extra-light);\n\tcolor: var(--color-main-text);\n\tfont-weight: var(--font-weight-element, normal);\n\ttransition-property: color, border-color, background-color;\n\ttransition-duration: var(--animation-quick);\n\ttransition-timing-function: linear;\n\t-webkit-user-select: none;\n\tuser-select: none;\n\tcursor: pointer;\n\n\t* {\n\t\tcursor: inherit;\n\t}\n\n\t&:has(:disabled) {\n\t\tcursor: default;\n\t\topacity: 0.5;\n\t}\n\n\t&:hover:not(:has(:disabled)) {\n\t\tcolor: var(--color-primary-element-light-text);\n\t\tbackground-color: var(--color-primary-element-extra-light-hover);\n\t}\n\n\t&:has(:focus-visible) {\n\t\toutline: 2px solid var(--color-main-text);\n\t\tbox-shadow: 0 0 0 4px var(--color-main-background);\n\t}\n\n\t&__description {\n\t\tfont-weight: var(--font-weight-default, normal);\n\t}\n\n\t&.formBoxItem_legacy {\n\t\t--nc-form-box-item-border-width: 0px;\n\t\tborder: none;\n\t}\n\n\t&.formBoxItem_inverted {\n\t\t.formBoxItem__element {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\n\t\t.formBoxItem__description {\n\t\t\tcolor: inherit;\n\t\t}\n\t}\n}\n\n.formBoxItem__content {\n\tflex: 1;\n\tdisplay: flex;\n\tflex-direction: column;\n\tpadding-block: calc(2 * var(--default-grid-baseline));\n\toverflow-wrap: anywhere;\n}\n\n// A trick for accessibility:\n// make entire component clickable while internally splitting the interactive item and the description\n.formBoxItem__element::after {\n\tcontent: '';\n\tposition: absolute;\n\tinset: 0;\n}\n\n.formBoxItem__description {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.formBoxItem__icon {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: flex-end;\n}\n</style>\n\n<docs>\nAn internal component\n</docs>\n"],"names":["_useSlots","_createElementBlock","_normalizeClass","$style","_unref","invertedAccent","_createElementVNode","_createBlock","_resolveDynamicComponent","tag","_mergeProps","itemClasses","$attrs","$emit","_renderSlot","label","description"],"mappings":";;;;;;;;;;;;;;;;;;;AA0CA,UAAM,QAAQA,SAAA;AAed,UAAM,EAAE,iBAAA,IAAqB,aAAA;AAE7B,UAAM,gBAAgB,gBAAA;AACtB,UAAM,iBAAiB,MAA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;;"}
@@ -1,6 +1,6 @@
1
1
  import '../assets/NcFormBoxSwitch-Cn-MBAzZ.css';
2
2
  import { defineComponent, useModel, watch, openBlock, createBlock, unref, createSlots, withCtx, withDirectives, createElementVNode, normalizeClass, vModelCheckbox, createVNode, renderSlot, createTextVNode, toDisplayString, mergeModels } from "vue";
3
- import { N as NcFormBoxItem } from "./NcFormBoxItem-B7YVodqN.mjs";
3
+ import { N as NcFormBoxItem } from "./NcFormBoxItem-CHxCeuxj.mjs";
4
4
  import { N as NcIconToggleSwitch } from "./NcIconToggleSwitch-B7kfYo0B.mjs";
5
5
  import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
6
6
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
@@ -89,4 +89,4 @@ const NcFormBoxSwitch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules",
89
89
  export {
90
90
  NcFormBoxSwitch as N
91
91
  };
92
- //# sourceMappingURL=NcFormBoxSwitch-DP4dD4xe.mjs.map
92
+ //# sourceMappingURL=NcFormBoxSwitch-QMisnf8C.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcFormBoxSwitch-DP4dD4xe.mjs","sources":["../../src/components/NcFormBoxSwitch/NcFormBoxSwitch.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { watch } from 'vue'\nimport NcFormBoxItem from '../NcFormBox/NcFormBoxItem.vue'\nimport NcIconToggleSwitch from '../NcIconToggleSwitch/NcIconToggleSwitch.vue'\nimport { createElementId } from '../../utils/createElementId.ts'\n\n/** Switch toggle model value */\nconst modelValue = defineModel<boolean>({ required: true })\n\nconst {\n\tlabel = undefined,\n\tdescription = undefined,\n\tdisabled = false,\n} = defineProps<{\n\t/** Main label */\n\tlabel?: string\n\t/** Optional description below the label, also used for the aria-describedby */\n\tdescription?: string\n\t/** Disabled state */\n\tdisabled?: boolean\n}>()\n\nconst emit = defineEmits<{\n\t/** Switch is toggled ON */\n\tenable: []\n\t/** Switch is toggled OFF */\n\tdisable: []\n}>()\n\ndefineSlots<{\n\t/** Custom label content */\n\tdefault?: Slot\n\t/** Custom description content */\n\tdescription?: Slot\n}>()\n\nconst inputId = createElementId()\n\nwatch(modelValue, () => {\n\tif (modelValue.value) {\n\t\temit('enable')\n\t} else {\n\t\temit('disable')\n\t}\n}, {\n\t// defineModel emits update:modelValue synchronously\n\t// Watching it synchronously to emit the enable/disable events together with the update:modelValue event\n\tflush: 'sync',\n})\n</script>\n\n<template>\n\t<NcFormBoxItem\n\t\ttag=\"label\"\n\t\t:for=\"inputId\">\n\t\t<template v-if=\"$slots.default || label\" #default>\n\t\t\t<slot>\n\t\t\t\t{{ label }}\n\t\t\t</slot>\n\t\t</template>\n\t\t<template v-if=\"$slots.description || description\" #description>\n\t\t\t<slot name=\"description\">\n\t\t\t\t{{ description }}\n\t\t\t</slot>\n\t\t</template>\n\t\t<template #icon=\"{ descriptionId }\">\n\t\t\t<input\n\t\t\t\t:id=\"inputId\"\n\t\t\t\tv-model=\"modelValue\"\n\t\t\t\t:class=\"$style.formBoxSwitch__input\"\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\trole=\"switch\"\n\t\t\t\t:aria-describedby=\"descriptionId\"\n\t\t\t\t:disabled>\n\t\t\t<NcIconToggleSwitch :checked=\"modelValue\" inline />\n\t\t</template>\n\t</NcFormBoxItem>\n</template>\n\n<style lang=\"scss\" module>\ninput.formBoxSwitch__input {\n\tmargin: 0;\n\twidth: var(--default-clickable-area);\n\t/* Keep it visually hidden but on the position of visual switch icon */\n\tposition: absolute;\n\tinset-block: 0;\n\tinset-inline-end: var(--form-element-label-offset);\n\tz-index: -1;\n\topacity: 0 !important;\n\t/* Override server styles */\n\theight: auto;\n\tcursor: inherit;\n}\n</style>\n\n<docs>\n### General\n\nA toggle switch to be used within `<NcFormBox>`.\n\nLike other form box items, it has a label and an optional description.\n\nIn addition to the standard `v-model` binding, it emits `enable` and `disable` events when toggled **on** or **off**.\n\n```vue\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tswitchValue: false,\n\t\t}\n\t}\n}\n</script>\n\n<template>\n\t<NcFormBox>\n\t\t<NcFormBoxSwitch v-model=\"switchValue\" label=\"Turn camera and microphone off by default\" />\n\t\t<NcFormBoxSwitch\n\t\t\tv-model=\"switchValue\"\n\t\t\tlabel=\"Blur camera background by default\"\n\t\t\tdisabled />\n\t\t<NcFormBoxSwitch\n\t\t\tv-model=\"switchValue\"\n\t\t\tlabel=\"Skip device preview before joining a call\"\n\t\t\tdescription=\"Will always show if recording consent is required\"\n\t\t\t@update:modelValue=\"console.log('Switch toggled', $event, switchValue)\"\n\t\t\t@enable=\"console.log('Switch enabled', switchValue)\"\n\t\t\t@disable=\"console.log('Switch disabled', switchValue)\"\n\t\t/>\n\t\t<NcFormBoxSwitch v-model=\"switchValue\" />\n\t</NcFormBox>\n</template>\n```\n</docs>\n"],"names":["_useModel","_createBlock","_unref","_withCtx","_createElementVNode","_normalizeClass","$style","disabled","_createVNode","$slots","label","_renderSlot","description"],"mappings":";;;;;;;;;;;;;;;;;;AAcA,UAAM,aAAaA,SAAoB,SAAA,YAAmB;AAe1D,UAAM,OAAO;AAcb,UAAM,UAAU,gBAAA;AAEhB,UAAM,YAAY,MAAM;AACvB,UAAI,WAAW,OAAO;AACrB,aAAK,QAAQ;AAAA,MACd,OAAO;AACN,aAAK,SAAS;AAAA,MACf;AAAA,IACD,GAAG;AAAA;AAAA;AAAA,MAGF,OAAO;AAAA,IAAA,CACP;;0BAIAC,YAwBgB,eAAA;AAAA,QAvBf,KAAI;AAAA,QACH,KAAKC,MAAA,OAAA;AAAA,MAAA;QAWK,MAAIC,QACd,CAOW,EARO,oBAAa;AAAA,yBAC/BC,mBAOW,SAAA;AAAA,YANT,IAAIF,MAAA,OAAA;AAAA,yEACI,WAAU,QAAA;AAAA,YAClB,OAAKG,eAAEC,KAAAA,OAAO,oBAAoB;AAAA,YACnC,MAAK;AAAA,YACL,MAAK;AAAA,YACJ,oBAAkB;AAAA,YAClB,UAAAC,KAAAA;AAAAA,UAAAA;6BALQ,WAAA,KAAU;AAAA,UAAA;UAMpBC,YAAmD,oBAAA;AAAA,YAA9B,SAAS,WAAA;AAAA,YAAY,QAAA;AAAA,UAAA;;;;QAnB3BC,KAAAA,OAAO,WAAWC,KAAAA;gBAAQ;AAAA,sBACzC,MAEO;AAAA,YAFPC,WAEO,4BAFP,MAEO;AAAA,8CADHD,KAAAA,KAAK,GAAA,CAAA;AAAA,YAAA;;;;QAGMD,KAAAA,OAAO,eAAeG,KAAAA;gBAAc;AAAA,sBACnD,MAEO;AAAA,YAFPD,WAEO,gCAFP,MAEO;AAAA,8CADHC,KAAAA,WAAW,GAAA,CAAA;AAAA,YAAA;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcFormBoxSwitch-QMisnf8C.mjs","sources":["../../src/components/NcFormBoxSwitch/NcFormBoxSwitch.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { watch } from 'vue'\nimport NcFormBoxItem from '../NcFormBox/NcFormBoxItem.vue'\nimport NcIconToggleSwitch from '../NcIconToggleSwitch/NcIconToggleSwitch.vue'\nimport { createElementId } from '../../utils/createElementId.ts'\n\n/** Switch toggle model value */\nconst modelValue = defineModel<boolean>({ required: true })\n\nconst {\n\tlabel = undefined,\n\tdescription = undefined,\n\tdisabled = false,\n} = defineProps<{\n\t/** Main label */\n\tlabel?: string\n\t/** Optional description below the label, also used for the aria-describedby */\n\tdescription?: string\n\t/** Disabled state */\n\tdisabled?: boolean\n}>()\n\nconst emit = defineEmits<{\n\t/** Switch is toggled ON */\n\tenable: []\n\t/** Switch is toggled OFF */\n\tdisable: []\n}>()\n\ndefineSlots<{\n\t/** Custom label content */\n\tdefault?: Slot\n\t/** Custom description content */\n\tdescription?: Slot\n}>()\n\nconst inputId = createElementId()\n\nwatch(modelValue, () => {\n\tif (modelValue.value) {\n\t\temit('enable')\n\t} else {\n\t\temit('disable')\n\t}\n}, {\n\t// defineModel emits update:modelValue synchronously\n\t// Watching it synchronously to emit the enable/disable events together with the update:modelValue event\n\tflush: 'sync',\n})\n</script>\n\n<template>\n\t<NcFormBoxItem\n\t\ttag=\"label\"\n\t\t:for=\"inputId\">\n\t\t<template v-if=\"$slots.default || label\" #default>\n\t\t\t<slot>\n\t\t\t\t{{ label }}\n\t\t\t</slot>\n\t\t</template>\n\t\t<template v-if=\"$slots.description || description\" #description>\n\t\t\t<slot name=\"description\">\n\t\t\t\t{{ description }}\n\t\t\t</slot>\n\t\t</template>\n\t\t<template #icon=\"{ descriptionId }\">\n\t\t\t<input\n\t\t\t\t:id=\"inputId\"\n\t\t\t\tv-model=\"modelValue\"\n\t\t\t\t:class=\"$style.formBoxSwitch__input\"\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\trole=\"switch\"\n\t\t\t\t:aria-describedby=\"descriptionId\"\n\t\t\t\t:disabled>\n\t\t\t<NcIconToggleSwitch :checked=\"modelValue\" inline />\n\t\t</template>\n\t</NcFormBoxItem>\n</template>\n\n<style lang=\"scss\" module>\ninput.formBoxSwitch__input {\n\tmargin: 0;\n\twidth: var(--default-clickable-area);\n\t/* Keep it visually hidden but on the position of visual switch icon */\n\tposition: absolute;\n\tinset-block: 0;\n\tinset-inline-end: var(--form-element-label-offset);\n\tz-index: -1;\n\topacity: 0 !important;\n\t/* Override server styles */\n\theight: auto;\n\tcursor: inherit;\n}\n</style>\n\n<docs>\n### General\n\nA toggle switch to be used within `<NcFormBox>`.\n\nLike other form box items, it has a label and an optional description.\n\nIn addition to the standard `v-model` binding, it emits `enable` and `disable` events when toggled **on** or **off**.\n\n```vue\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tswitchValue: false,\n\t\t}\n\t}\n}\n</script>\n\n<template>\n\t<NcFormBox>\n\t\t<NcFormBoxSwitch v-model=\"switchValue\" label=\"Turn camera and microphone off by default\" />\n\t\t<NcFormBoxSwitch\n\t\t\tv-model=\"switchValue\"\n\t\t\tlabel=\"Blur camera background by default\"\n\t\t\tdisabled />\n\t\t<NcFormBoxSwitch\n\t\t\tv-model=\"switchValue\"\n\t\t\tlabel=\"Skip device preview before joining a call\"\n\t\t\tdescription=\"Will always show if recording consent is required\"\n\t\t\t@update:modelValue=\"console.log('Switch toggled', $event, switchValue)\"\n\t\t\t@enable=\"console.log('Switch enabled', switchValue)\"\n\t\t\t@disable=\"console.log('Switch disabled', switchValue)\"\n\t\t/>\n\t\t<NcFormBoxSwitch v-model=\"switchValue\" />\n\t</NcFormBox>\n</template>\n```\n</docs>\n"],"names":["_useModel","_createBlock","_unref","_withCtx","_createElementVNode","_normalizeClass","$style","disabled","_createVNode","$slots","label","_renderSlot","description"],"mappings":";;;;;;;;;;;;;;;;;;AAcA,UAAM,aAAaA,SAAoB,SAAA,YAAmB;AAe1D,UAAM,OAAO;AAcb,UAAM,UAAU,gBAAA;AAEhB,UAAM,YAAY,MAAM;AACvB,UAAI,WAAW,OAAO;AACrB,aAAK,QAAQ;AAAA,MACd,OAAO;AACN,aAAK,SAAS;AAAA,MACf;AAAA,IACD,GAAG;AAAA;AAAA;AAAA,MAGF,OAAO;AAAA,IAAA,CACP;;0BAIAC,YAwBgB,eAAA;AAAA,QAvBf,KAAI;AAAA,QACH,KAAKC,MAAA,OAAA;AAAA,MAAA;QAWK,MAAIC,QACd,CAOW,EARO,oBAAa;AAAA,yBAC/BC,mBAOW,SAAA;AAAA,YANT,IAAIF,MAAA,OAAA;AAAA,yEACI,WAAU,QAAA;AAAA,YAClB,OAAKG,eAAEC,KAAAA,OAAO,oBAAoB;AAAA,YACnC,MAAK;AAAA,YACL,MAAK;AAAA,YACJ,oBAAkB;AAAA,YAClB,UAAAC,KAAAA;AAAAA,UAAAA;6BALQ,WAAA,KAAU;AAAA,UAAA;UAMpBC,YAAmD,oBAAA;AAAA,YAA9B,SAAS,WAAA;AAAA,YAAY,QAAA;AAAA,UAAA;;;;QAnB3BC,KAAAA,OAAO,WAAWC,KAAAA;gBAAQ;AAAA,sBACzC,MAEO;AAAA,YAFPC,WAEO,4BAFP,MAEO;AAAA,8CADHD,KAAAA,KAAK,GAAA,CAAA;AAAA,YAAA;;;;QAGMD,KAAAA,OAAO,eAAeG,KAAAA;gBAAc;AAAA,sBACnD,MAEO;AAAA,YAFPD,WAEO,gCAFP,MAEO;AAAA,8CADHC,KAAAA,WAAW,GAAA,CAAA;AAAA,YAAA;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import '../assets/NcFormGroup-BjWhd5Ky.css';
1
+ import '../assets/NcFormGroup-qFucmL8a.css';
2
2
  import { defineComponent, useSlots, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, createTextVNode, toDisplayString, createCommentVNode } from "vue";
3
3
  import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
4
4
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
@@ -71,4 +71,4 @@ const NcFormGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", css
71
71
  export {
72
72
  NcFormGroup as N
73
73
  };
74
- //# sourceMappingURL=NcFormGroup-B3a2iUnT.mjs.map
74
+ //# sourceMappingURL=NcFormGroup-BDjfDvq0.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcFormGroup-B3a2iUnT.mjs","sources":["../../src/components/NcFormGroup/NcFormGroup.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { createElementId } from '../../utils/createElementId.ts'\n\nconst {\n\tlabel = undefined,\n\tdescription = undefined,\n\thideLabel = false,\n\thideDescription = false,\n\tnoGap = false,\n} = defineProps<{\n\t/**\n\t * Group label #label slot can be used for custom label content\n\t */\n\tlabel?: string\n\t/**\n\t * Optional fieldset description. #description slot can be used for custom description content\n\t */\n\tdescription?: string\n\t/**\n\t * Hide the label visually but keep it accessible for screen readers\n\t */\n\thideLabel?: boolean\n\t/**\n\t * Hide the description visually but keep it accessible for screen readers\n\t */\n\thideDescription?: boolean\n\t/**\n\t * Disable default fieldset content gap between content elements\n\t */\n\tnoGap?: boolean\n}>()\n\nconst slots = defineSlots<{\n\t/**\n\t * Content\n\t */\n\tdefault?: Slot\n\t/**\n\t * Custom label content\n\t */\n\tlabel?: Slot\n\t/**\n\t * Custom description content\n\t */\n\tdescription?: Slot\n}>()\n\nconst id = `nc-form-group-${createElementId()}`\nconst descriptionId = `${id}-description`\n\nconst hasDescription = () => !!description || !!slots.description\nconst getDescriptionId = () => hasDescription() ? descriptionId : undefined\nconst hasContentOnly = () => hideLabel && (!hasDescription() || hideDescription)\n</script>\n\n<template>\n\t<fieldset\n\t\t:class=\"[$style.formGroup, { [$style.formGroup_noGap]: noGap }]\"\n\t\t:aria-describedby=\"getDescriptionId()\">\n\t\t<legend :class=\"[$style.formGroup__label, { 'hidden-visually': hideLabel }]\">\n\t\t\t<slot name=\"label\">\n\t\t\t\t{{ label || '⚠️ Missing label' }}\n\t\t\t</slot>\n\t\t</legend>\n\t\t<div v-if=\"hasDescription()\" :id=\"descriptionId\" :class=\"[$style.formGroup__description, { 'hidden-visually': hideDescription }]\">\n\t\t\t<slot name=\"description\">\n\t\t\t\t{{ description }}\n\t\t\t</slot>\n\t\t</div>\n\t\t<div :class=\"[$style.formGroup__content, { [$style.formGroup__content_only]: hasContentOnly() }]\">\n\t\t\t<slot />\n\t\t</div>\n\t</fieldset>\n</template>\n\n<style lang=\"scss\" module>\n.formGroup {\n\t--form-element-label-offset: calc(var(--border-radius-element) + var(--default-grid-baseline));\n\t--form-group-content-gap: calc(2 * var(--default-grid-baseline));\n\n\t&.formGroup_noGap {\n\t\t--form-group-content-gap: 0;\n\t}\n}\n\n.formGroup__label {\n\tpadding-inline: var(--form-element-label-offset);\n\tfont-size: var(--font-size);\n\tfont-weight: bold;\n}\n\n.formGroup__description {\n\tpadding-inline: var(--form-element-label-offset);\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.formGroup__content {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--form-group-content-gap);\n\tmargin-block-start: calc(2.5 * var(--default-grid-baseline));\n\n\t&.formGroup__content_only {\n\t\tmargin-block-start: 0;\n\t}\n}\n</style>\n\n<docs>\n### General\n\nLabelled group of form elements.\n\n```vue\n<template>\n\t<NcFormGroup label=\"Personal information\">\n\t\t<NcTextField label=\"First name\" />\n\t\t<NcTextField label=\"Last name\" />\n\t</NcFormGroup>\n</template>\n```\n\n### With description\n\n```vue\n<template>\n\t<NcFormGroup label=\"Personal information\" description=\"Your contact details\">\n\t\t<NcTextField label=\"First name\" />\n\t\t<NcTextField label=\"Last name\" />\n\t</NcFormGroup>\n</template>\n```\n\n### Hidden label/description\n\nYou can visually hide the label and/or the description.\\\nNote: you still must provide the label. Do not visually hide the missing label warning!\n\n```vue\n<template>\n\t<NcFormGroup\n\t\tlabel=\"Personal information\"\n\t\tdescription=\"Your contact details\"\n\t\thide-label\n\t\thide-description>\n\t\t<NcTextField label=\"First name\" />\n\t\t<NcTextField label=\"Last name\" />\n\t</NcFormGroup>\n</template>\n```\n</docs>\n"],"names":["_useSlots","_createElementBlock","_normalizeClass","$style","noGap","_createElementVNode","hideLabel","_renderSlot","label","hideDescription","description"],"mappings":";;;;;;;;;;;;;;AAuCA,UAAM,QAAQA,SAAA;AAed,UAAM,KAAK,iBAAiB,gBAAA,CAAiB;AAC7C,UAAM,gBAAgB,GAAG,EAAE;AAE3B,UAAM,iBAAiB,MAAM,CAAC,CAAC,QAAA,eAAe,CAAC,CAAC,MAAM;AACtD,UAAM,mBAAmB,MAAM,eAAA,IAAmB,gBAAgB;AAClE,UAAM,iBAAiB,MAAM,QAAA,cAAc,CAAC,eAAA,KAAoB,QAAA;;0BAI/DC,mBAgBW,YAAA;AAAA,QAfT,OAAKC,eAAA,CAAGC,YAAO,cAAcA,KAAAA,OAAO,eAAe,GAAGC,KAAAA,MAAAA,CAAK,CAAA;AAAA,QAC3D,oBAAkB,iBAAA;AAAA,MAAgB;QACnCC,mBAIS,UAAA;AAAA,UAJA,OAAKH,eAAA,CAAGC,KAAAA,OAAO,uCAAuCG,KAAAA,WAAS,CAAA;AAAA,QAAA;UACvEC,WAEO,0BAFP,MAEO;AAAA,4CADHC,KAAAA,SAAK,kBAAA,GAAA,CAAA;AAAA,UAAA;;QAGC,iCAAXP,mBAIM,OAAA;AAAA;UAJwB,IAAI;AAAA,UAAgB,OAAKC,eAAA,CAAGC,KAAAA,OAAO,6CAA6CM,KAAAA,iBAAe,CAAA;AAAA,QAAA;UAC5HF,WAEO,gCAFP,MAEO;AAAA,4CADHG,KAAAA,WAAW,GAAA,CAAA;AAAA,UAAA;;QAGhBL,mBAEM,OAAA;AAAA,UAFA,OAAKH,eAAA,CAAGC,YAAO,uBAAuBA,KAAAA,OAAO,uBAAuB,GAAG,eAAA,EAAc,CAAA,CAAA;AAAA,QAAA;UAC1FI,WAAQ,KAAA,QAAA,SAAA;AAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcFormGroup-BDjfDvq0.mjs","sources":["../../src/components/NcFormGroup/NcFormGroup.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { createElementId } from '../../utils/createElementId.ts'\n\nconst {\n\tlabel = undefined,\n\tdescription = undefined,\n\thideLabel = false,\n\thideDescription = false,\n\tnoGap = false,\n} = defineProps<{\n\t/**\n\t * Group label #label slot can be used for custom label content\n\t */\n\tlabel?: string\n\t/**\n\t * Optional fieldset description. #description slot can be used for custom description content\n\t */\n\tdescription?: string\n\t/**\n\t * Hide the label visually but keep it accessible for screen readers\n\t */\n\thideLabel?: boolean\n\t/**\n\t * Hide the description visually but keep it accessible for screen readers\n\t */\n\thideDescription?: boolean\n\t/**\n\t * Disable default fieldset content gap between content elements\n\t */\n\tnoGap?: boolean\n}>()\n\nconst slots = defineSlots<{\n\t/**\n\t * Content\n\t */\n\tdefault?: Slot\n\t/**\n\t * Custom label content\n\t */\n\tlabel?: Slot\n\t/**\n\t * Custom description content\n\t */\n\tdescription?: Slot\n}>()\n\nconst id = `nc-form-group-${createElementId()}`\nconst descriptionId = `${id}-description`\n\nconst hasDescription = () => !!description || !!slots.description\nconst getDescriptionId = () => hasDescription() ? descriptionId : undefined\nconst hasContentOnly = () => hideLabel && (!hasDescription() || hideDescription)\n</script>\n\n<template>\n\t<fieldset\n\t\t:class=\"[$style.formGroup, { [$style.formGroup_noGap]: noGap }]\"\n\t\t:aria-describedby=\"getDescriptionId()\">\n\t\t<legend :class=\"[$style.formGroup__label, { 'hidden-visually': hideLabel }]\">\n\t\t\t<slot name=\"label\">\n\t\t\t\t{{ label || '⚠️ Missing label' }}\n\t\t\t</slot>\n\t\t</legend>\n\t\t<div v-if=\"hasDescription()\" :id=\"descriptionId\" :class=\"[$style.formGroup__description, { 'hidden-visually': hideDescription }]\">\n\t\t\t<slot name=\"description\">\n\t\t\t\t{{ description }}\n\t\t\t</slot>\n\t\t</div>\n\t\t<div :class=\"[$style.formGroup__content, { [$style.formGroup__content_only]: hasContentOnly() }]\">\n\t\t\t<slot />\n\t\t</div>\n\t</fieldset>\n</template>\n\n<style lang=\"scss\" module>\n.formGroup {\n\t--form-element-label-offset: calc(var(--border-radius-element) + var(--default-grid-baseline));\n\t--form-group-content-gap: calc(2 * var(--default-grid-baseline));\n\n\t&.formGroup_noGap {\n\t\t--form-group-content-gap: 0;\n\t}\n}\n\n.formGroup__label {\n\tpadding-inline: var(--form-element-label-offset);\n\tfont-size: var(--font-size);\n\tfont-weight: var(--font-weight-heading, bold);\n}\n\n.formGroup__description {\n\tpadding-inline: var(--form-element-label-offset);\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.formGroup__content {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--form-group-content-gap);\n\tmargin-block-start: calc(2.5 * var(--default-grid-baseline));\n\n\t&.formGroup__content_only {\n\t\tmargin-block-start: 0;\n\t}\n}\n</style>\n\n<docs>\n### General\n\nLabelled group of form elements.\n\n```vue\n<template>\n\t<NcFormGroup label=\"Personal information\">\n\t\t<NcTextField label=\"First name\" />\n\t\t<NcTextField label=\"Last name\" />\n\t</NcFormGroup>\n</template>\n```\n\n### With description\n\n```vue\n<template>\n\t<NcFormGroup label=\"Personal information\" description=\"Your contact details\">\n\t\t<NcTextField label=\"First name\" />\n\t\t<NcTextField label=\"Last name\" />\n\t</NcFormGroup>\n</template>\n```\n\n### Hidden label/description\n\nYou can visually hide the label and/or the description.\\\nNote: you still must provide the label. Do not visually hide the missing label warning!\n\n```vue\n<template>\n\t<NcFormGroup\n\t\tlabel=\"Personal information\"\n\t\tdescription=\"Your contact details\"\n\t\thide-label\n\t\thide-description>\n\t\t<NcTextField label=\"First name\" />\n\t\t<NcTextField label=\"Last name\" />\n\t</NcFormGroup>\n</template>\n```\n</docs>\n"],"names":["_useSlots","_createElementBlock","_normalizeClass","$style","noGap","_createElementVNode","hideLabel","_renderSlot","label","hideDescription","description"],"mappings":";;;;;;;;;;;;;;AAuCA,UAAM,QAAQA,SAAA;AAed,UAAM,KAAK,iBAAiB,gBAAA,CAAiB;AAC7C,UAAM,gBAAgB,GAAG,EAAE;AAE3B,UAAM,iBAAiB,MAAM,CAAC,CAAC,QAAA,eAAe,CAAC,CAAC,MAAM;AACtD,UAAM,mBAAmB,MAAM,eAAA,IAAmB,gBAAgB;AAClE,UAAM,iBAAiB,MAAM,QAAA,cAAc,CAAC,eAAA,KAAoB,QAAA;;0BAI/DC,mBAgBW,YAAA;AAAA,QAfT,OAAKC,eAAA,CAAGC,YAAO,cAAcA,KAAAA,OAAO,eAAe,GAAGC,KAAAA,MAAAA,CAAK,CAAA;AAAA,QAC3D,oBAAkB,iBAAA;AAAA,MAAgB;QACnCC,mBAIS,UAAA;AAAA,UAJA,OAAKH,eAAA,CAAGC,KAAAA,OAAO,uCAAuCG,KAAAA,WAAS,CAAA;AAAA,QAAA;UACvEC,WAEO,0BAFP,MAEO;AAAA,4CADHC,KAAAA,SAAK,kBAAA,GAAA,CAAA;AAAA,UAAA;;QAGC,iCAAXP,mBAIM,OAAA;AAAA;UAJwB,IAAI;AAAA,UAAgB,OAAKC,eAAA,CAAGC,KAAAA,OAAO,6CAA6CM,KAAAA,iBAAe,CAAA;AAAA,QAAA;UAC5HF,WAEO,gCAFP,MAEO;AAAA,4CADHG,KAAAA,WAAW,GAAA,CAAA;AAAA,UAAA;;QAGhBL,mBAEM,OAAA;AAAA,UAFA,OAAKH,eAAA,CAAGC,YAAO,uBAAuBA,KAAAA,OAAO,uBAAuB,GAAG,eAAA,EAAc,CAAA,CAAA;AAAA,QAAA;UAC1FI,WAAQ,KAAA,QAAA,SAAA;AAAA,QAAA;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import '../assets/NcHeaderButton-CVOQgRjm.css';
2
2
  import { defineComponent, openBlock, createElementBlock, createVNode, unref, withModifiers, withCtx, renderSlot, toDisplayString, createCommentVNode } from "vue";
3
3
  import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
4
- import { N as NcButton } from "./NcButton-lQra4n2g.mjs";
4
+ import { N as NcButton } from "./NcButton-CdQzGSB6.mjs";
5
5
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
6
6
  const _hoisted_1 = ["id"];
7
7
  const _hoisted_2 = ["id"];
@@ -46,4 +46,4 @@ const NcHeaderButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "da
46
46
  export {
47
47
  NcHeaderButton as N
48
48
  };
49
- //# sourceMappingURL=NcHeaderButton-CXu9xIQP.mjs.map
49
+ //# sourceMappingURL=NcHeaderButton-lhDrtYWN.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcHeaderButton-CXu9xIQP.mjs","sources":["../../src/components/NcHeaderButton/NcHeaderButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2024 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 in the Nextcloud top header,\nsimilar to the NcHeaderMenu but to be used when only a trigger button is needed, e.g. when opening a dialog.\n\n```\n<template>\n\t<div id=\"nextcloud-header\">\n\t\t<NcHeaderButton id=\"search-dialog\"\n\t\t\taria-label=\"Search\"\n\t\t\t@click=\"showDialog = true\">\n\t\t\t<template #icon>\n\t\t\t\t<Magnify />\n\t\t\t</template>\n\t\t</NcHeaderButton>\n\n\t\t<NcDialog name=\"Search\"\n\t\t\tsize=\"normal\"\n\t\t\tv-model:open=\"showDialog\">\n\t\t\t<NcTextField label=\"Search for files, comments, contacts …\"\n\t\t\t\ttype=\"search\"\n\t\t\t\tv-model=\"query\" />\n\t\t\t<NcEmptyContent name=\"Search\"\n\t\t\t\t:description=\"query ? `No results for '${query}'` : 'Start typing to search'\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Magnify />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t</NcDialog>\n\t</div>\n</template>\n<script>\nimport Magnify from 'vue-material-design-icons/Magnify'\n\nexport default {\n\tcomponents: {\n\t\tMagnify,\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tquery: '',\n\t\t}\n\t},\n}\n</script>\n<style>\n#nextcloud-header {\n\tdisplay: flex;\n\tjustify-content: right;\n\tbackground-color: var(--color-primary);\n\theight: var(--header-height, 50px);\n\tpadding-inline-end: 12px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<!-- We need a wrapper for server styles to apply -->\n\t<div :id=\"id\" class=\"header-menu\">\n\t\t<NcButton\n\t\t\t:aria-label=\"ariaLabel\"\n\t\t\t:aria-describedby=\"descriptionId\"\n\t\t\tclass=\"header-menu__trigger\"\n\t\t\tsize=\"large\"\n\t\t\tvariant=\"tertiary-no-background\"\n\t\t\t@click.prevent=\"$emit('click', $event)\">\n\t\t\t<template #icon>\n\t\t\t\t<!-- @slot Icon trigger slot. Make sure the svg path\n\t\t\t\tis at least 16px. Usually mdi icon works at 20px -->\n\t\t\t\t<slot name=\"icon\" />\n\t\t\t</template>\n\t\t</NcButton>\n\n\t\t<span\n\t\t\tv-if=\"description\"\n\t\t\t:id=\"descriptionId\"\n\t\t\tclass=\"header-menu__description hidden-visually\">\n\t\t\t{{ description }}\n\t\t</span>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { createElementId } from '../../utils/createElementId.ts'\nimport NcButton from '../NcButton/index.ts'\n\ndefineProps<{\n\t/** Unique id for this menu */\n\tid: string\n\t/** `aria-label` attribute of the button */\n\tariaLabel: string\n\t/** Optional visually hidden description text for the button */\n\tdescription?: string\n}>()\n\ndefineEmits<{\n\tclick: [event: MouseEvent]\n}>()\n\nconst descriptionId = createElementId()\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../NcHeaderMenu/header-menu__trigger.scss';\n</style>\n"],"names":["_createElementBlock","id","_createVNode","_unref","ariaLabel","_withModifiers","$emit","_renderSlot","description"],"mappings":";;;;;;;;;;;;;;;AA0GA,UAAM,gBAAgB,gBAAA;;0BAzCrBA,mBAqBM,OAAA;AAAA,QArBA,IAAIC,KAAAA;AAAAA,QAAI,OAAM;AAAA,MAAA;QACnBC,YAYWC,MAAA,QAAA,GAAA;AAAA,UAXT,cAAYC,KAAAA;AAAAA,UACZ,oBAAkBD,MAAA,aAAA;AAAA,UACnB,OAAM;AAAA,UACN,MAAK;AAAA,UACL,SAAQ;AAAA,UACP,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAAE,cAAA,CAAA,WAAUC,KAAAA,MAAK,SAAU,MAAM,GAAA,CAAA,SAAA,CAAA;AAAA,QAAA;UAC1B,cAGV,MAAoB;AAAA,YAApBC,WAAoB,KAAA,QAAA,QAAA,CAAA,GAAA,QAAA,IAAA;AAAA,UAAA;;;QAKfC,KAAAA,4BADPR,mBAKO,QAAA;AAAA;UAHL,IAAIG,MAAA,aAAA;AAAA,UACL,OAAM;AAAA,QAAA,mBACHK,KAAAA,WAAW,GAAA,GAAA,UAAA;;;;;;"}
1
+ {"version":3,"file":"NcHeaderButton-lhDrtYWN.mjs","sources":["../../src/components/NcHeaderButton/NcHeaderButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2024 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 in the Nextcloud top header,\nsimilar to the NcHeaderMenu but to be used when only a trigger button is needed, e.g. when opening a dialog.\n\n```\n<template>\n\t<div id=\"nextcloud-header\">\n\t\t<NcHeaderButton id=\"search-dialog\"\n\t\t\taria-label=\"Search\"\n\t\t\t@click=\"showDialog = true\">\n\t\t\t<template #icon>\n\t\t\t\t<Magnify />\n\t\t\t</template>\n\t\t</NcHeaderButton>\n\n\t\t<NcDialog name=\"Search\"\n\t\t\tsize=\"normal\"\n\t\t\tv-model:open=\"showDialog\">\n\t\t\t<NcTextField label=\"Search for files, comments, contacts …\"\n\t\t\t\ttype=\"search\"\n\t\t\t\tv-model=\"query\" />\n\t\t\t<NcEmptyContent name=\"Search\"\n\t\t\t\t:description=\"query ? `No results for '${query}'` : 'Start typing to search'\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Magnify />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t</NcDialog>\n\t</div>\n</template>\n<script>\nimport Magnify from 'vue-material-design-icons/Magnify'\n\nexport default {\n\tcomponents: {\n\t\tMagnify,\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tquery: '',\n\t\t}\n\t},\n}\n</script>\n<style>\n#nextcloud-header {\n\tdisplay: flex;\n\tjustify-content: right;\n\tbackground-color: var(--color-primary);\n\theight: var(--header-height, 50px);\n\tpadding-inline-end: 12px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<!-- We need a wrapper for server styles to apply -->\n\t<div :id=\"id\" class=\"header-menu\">\n\t\t<NcButton\n\t\t\t:aria-label=\"ariaLabel\"\n\t\t\t:aria-describedby=\"descriptionId\"\n\t\t\tclass=\"header-menu__trigger\"\n\t\t\tsize=\"large\"\n\t\t\tvariant=\"tertiary-no-background\"\n\t\t\t@click.prevent=\"$emit('click', $event)\">\n\t\t\t<template #icon>\n\t\t\t\t<!-- @slot Icon trigger slot. Make sure the svg path\n\t\t\t\tis at least 16px. Usually mdi icon works at 20px -->\n\t\t\t\t<slot name=\"icon\" />\n\t\t\t</template>\n\t\t</NcButton>\n\n\t\t<span\n\t\t\tv-if=\"description\"\n\t\t\t:id=\"descriptionId\"\n\t\t\tclass=\"header-menu__description hidden-visually\">\n\t\t\t{{ description }}\n\t\t</span>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { createElementId } from '../../utils/createElementId.ts'\nimport NcButton from '../NcButton/index.ts'\n\ndefineProps<{\n\t/** Unique id for this menu */\n\tid: string\n\t/** `aria-label` attribute of the button */\n\tariaLabel: string\n\t/** Optional visually hidden description text for the button */\n\tdescription?: string\n}>()\n\ndefineEmits<{\n\tclick: [event: MouseEvent]\n}>()\n\nconst descriptionId = createElementId()\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../NcHeaderMenu/header-menu__trigger.scss';\n</style>\n"],"names":["_createElementBlock","id","_createVNode","_unref","ariaLabel","_withModifiers","$emit","_renderSlot","description"],"mappings":";;;;;;;;;;;;;;;AA0GA,UAAM,gBAAgB,gBAAA;;0BAzCrBA,mBAqBM,OAAA;AAAA,QArBA,IAAIC,KAAAA;AAAAA,QAAI,OAAM;AAAA,MAAA;QACnBC,YAYWC,MAAA,QAAA,GAAA;AAAA,UAXT,cAAYC,KAAAA;AAAAA,UACZ,oBAAkBD,MAAA,aAAA;AAAA,UACnB,OAAM;AAAA,UACN,MAAK;AAAA,UACL,SAAQ;AAAA,UACP,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAAE,cAAA,CAAA,WAAUC,KAAAA,MAAK,SAAU,MAAM,GAAA,CAAA,SAAA,CAAA;AAAA,QAAA;UAC1B,cAGV,MAAoB;AAAA,YAApBC,WAAoB,KAAA,QAAA,QAAA,CAAA,GAAA,QAAA,IAAA;AAAA,UAAA;;;QAKfC,KAAAA,4BADPR,mBAKO,QAAA;AAAA;UAHL,IAAIG,MAAA,aAAA;AAAA,UACL,OAAM;AAAA,QAAA,mBACHK,KAAAA,WAAW,GAAA,GAAA,UAAA;;;;;;"}
@@ -10,7 +10,7 @@ import "../composables/useIsMobile/index.mjs";
10
10
  import { u as useTrapStackControl } from "./useTrapStackControl-B6cEicto.mjs";
11
11
  import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
12
12
  import { g as getTrapStack } from "./focusTrap-HJQ4pqHV.mjs";
13
- import { N as NcButton } from "./NcButton-lQra4n2g.mjs";
13
+ import { N as NcButton } from "./NcButton-CdQzGSB6.mjs";
14
14
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
15
15
  const _hoisted_1 = ["id"];
16
16
  const _hoisted_2 = { class: "header-menu__caret" };
@@ -139,4 +139,4 @@ const NcHeaderMenu = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data
139
139
  export {
140
140
  NcHeaderMenu as N
141
141
  };
142
- //# sourceMappingURL=NcHeaderMenu-CYU4Y3h5.mjs.map
142
+ //# sourceMappingURL=NcHeaderMenu-B5-BQbQ6.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcHeaderMenu-CYU4Y3h5.mjs","sources":["../../src/components/NcHeaderMenu/NcHeaderMenu.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 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 in the Nextcloud top header.\n\n```\n<template>\n\t<div id=\"nextcloud-header\">\n\t\t<NcHeaderMenu id=\"search\"\n\t\t\taria-label=\"Search\">\n\t\t\t<template #trigger>\n\t\t\t\t<Magnify />\n\t\t\t</template>\n\t\t\t<div>\n\t\t\t\t<NcTextField label=\"Search for files, comments, contacts …\"\n\t\t\t\t\tstyle=\"padding-inline: 8px;\"\n\t\t\t\t\ttype=\"search\"\n\t\t\t\t\tv-model=\"query\" />\n\t\t\t\t<NcEmptyContent\n\t\t\t\t\tname=\"Search\"\n\t\t\t\t\t:description=\"query ? `No results for '${query}'` : 'Start typing to search'\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Magnify />\n\t\t\t\t\t</template>\n\t\t\t\t</NcEmptyContent>\n\t\t\t</div>\n\t\t</NcHeaderMenu>\n\t</div>\n</template>\n<script>\nimport Magnify from 'vue-material-design-icons/Magnify'\n\nexport default {\n\tcomponents: {\n\t\tMagnify,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tquery: '',\n\t\t}\n\t},\n}\n</script>\n<style>\n#nextcloud-header {\n\tdisplay: flex;\n\tjustify-content: end;\n\tbackground-color: var(--color-primary);\n\theight: var(--header-height, 50px);\n\tpadding-inline-end: 12px;\n}\n</style>\n```\n</docs>\n\n<script setup lang=\"ts\">\nimport type { FocusTrap } from 'focus-trap'\nimport type { Slot } from 'vue'\n\nimport { onClickOutside } from '@vueuse/core'\nimport { createFocusTrap } from 'focus-trap'\nimport { computed, nextTick, ref, useTemplateRef, watch } from 'vue'\nimport { useHotKey } from '../../composables/index.js'\nimport { useTrapStackControl } from '../../composables/useTrapStackControl.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { getTrapStack } from '../../utils/focusTrap.js'\nimport NcButton from '../NcButton/index.ts'\n\nconst {\n\tariaLabel = undefined,\n\tdescription = undefined,\n\texcludeClickOutsideSelectors = [],\n\topen = false,\n\tisNav = false,\n} = defineProps<{\n\t/**\n\t * Unique id for this menu\n\t */\n\tid: string\n\n\t/**\n\t * aria-label attribute of the menu open button\n\t */\n\tariaLabel?: string\n\n\t/**\n\t * Current menu open state\n\t */\n\topen?: boolean\n\n\t/**\n\t * Pass `true` if the header menu is used for website navigation\n\t *\n\t * The wrapper tag will be set to `nav` and its `aria-labelledby`\n\t * will be associated with the menu open button\n\t */\n\tisNav?: boolean\n\n\t/**\n\t * Additional visually hidden description text for the menu\n\t * open button\n\t */\n\tdescription?: string\n\n\t/**\n\t * A query-selector or an array of query-selectors\n\t * to be ignored when clicking outside an element\n\t */\n\texcludeClickOutsideSelectors?: string | string[]\n}>()\n\nconst emit = defineEmits<{\n\t/** Emitted when the menu is fully closed (animation done) */\n\tclosed: []\n\n\t/** Emitted when the menu is fully opened (animation done) */\n\topened: []\n\n\t/** Updated open state */\n\t'update:open': [v: boolean]\n}>()\n\ndefineSlots<{\n\t/** The menu content */\n\tdefault?: Slot\n\t/** Icon trigger slot. Make sure the svg path is at least 16px. Usually mdi icon works at 20px */\n\ttrigger?: Slot\n}>()\n\n/** Id of the menu description */\nconst descriptionId = createElementId()\n/** Id of the trigger button */\nconst triggerId = createElementId()\n/** The active focus trap (if any) */\nconst focusTrap = ref<FocusTrap>()\n/** Is the menu currently opened */\nconst isOpened = ref(open)\n/** HTML tag to use for the header menu */\nconst wrapperTag = computed(() => isNav ? 'nav' : 'div')\n\n/** The menu content container element */\nconst contentContainerElement = useTemplateRef('contentContainer')\n/** The overall header menu wrapping element (<nav> or <div>) */\nconst headerMenuElement = useTemplateRef<HTMLElement>('headerMenu')\n/** The menu trigger button */\nconst triggerButtonInstance = useTemplateRef('triggerButton')\n\n// Handle click outside of the menu -> should close the menu\nconst ignore = computed(() => Array.isArray(excludeClickOutsideSelectors)\n\t? excludeClickOutsideSelectors\n\t: excludeClickOutsideSelectors.split(' '))\nonClickOutside(headerMenuElement, () => setMenuState(false), { ignore })\n\n// Pressing escape should close the menu\nuseHotKey('Escape', () => setMenuState(false), { prevent: true })\n\n// When component has its own custom focus management\n// The global focus trap stack should be paused\nuseTrapStackControl(isOpened, {\n\tdisabled: () => !isNav,\n})\n\n// Watch the open prop to adjust the internal opened state\nwatch(() => open, (state: boolean) => setMenuState(state))\n\n/**\n * Toggle the current menu open state\n */\nfunction toggleMenu() {\n\tsetMenuState(!isOpened.value)\n}\n\n/**\n * Set the menu opened state\n *\n * @param state The opened state to set\n */\nasync function setMenuState(state: boolean) {\n\tif (state === isOpened.value) {\n\t\treturn\n\t}\n\n\tisOpened.value = state\n\temit('update:open', state)\n\n\t// wait one tick to make sure the rendering finished\n\tawait nextTick()\n\t// either add or clear the focus trap\n\tawait (state ? addFocusTrap() : clearFocusTrap())\n\n\t// Emit signal to mark finished toggling\n\t// @ts-expect-error This seems to be broken in Vue's typescript macro compiler...\n\temit(state ? 'opened' : 'closed')\n}\n\n/**\n * When this is role navigation, then we cannot apply a focus trap.\n * In this case we close the menu on focus-out.\n *\n * @param event the focus event\n */\nfunction onFocusOut(event: FocusEvent) {\n\t// Is not a navigation\n\tif (!isNav) {\n\t\treturn\n\t}\n\n\t// Event target is not a node\n\tif (!(event.relatedTarget instanceof Node)) {\n\t\treturn\n\t}\n\n\tif (headerMenuElement.value?.contains(event.relatedTarget)) {\n\t\tsetMenuState(false)\n\t}\n}\n\n/**\n * Add focus trap for accessibility.\n * Shall only be used when all children are mounted\n * and available in the DOM. We use $nextTick for that.\n */\nasync function addFocusTrap() {\n\t// We cannot add the focus trap on navigation roles\n\t// also skip if already set\n\tif (isNav || focusTrap.value) {\n\t\treturn\n\t}\n\n\t// Init focus trap\n\tfocusTrap.value = createFocusTrap(contentContainerElement.value!, {\n\t\tallowOutsideClick: true,\n\t\ttrapStack: getTrapStack(),\n\t\tfallbackFocus: triggerButtonInstance.value?.$el,\n\t})\n\tfocusTrap.value.activate()\n}\n\n/**\n * Deactivate and clear the focus trap\n */\nfunction clearFocusTrap() {\n\tfocusTrap.value?.deactivate()\n\tfocusTrap.value = undefined\n}\n</script>\n\n<template>\n\t<component\n\t\t:is=\"wrapperTag\"\n\t\t:id=\"id\"\n\t\tref=\"headerMenu\"\n\t\t:aria-labelledby=\"isNav ? triggerId : null\"\n\t\t:class=\"{ 'header-menu--opened': isOpened }\"\n\t\tclass=\"header-menu\"\n\t\t@focusout=\"onFocusOut\">\n\t\t<!-- Trigger -->\n\t\t<NcButton\n\t\t\t:id=\"isNav ? triggerId : null\"\n\t\t\tref=\"triggerButton\"\n\t\t\t:aria-controls=\"`header-menu-${id}`\"\n\t\t\t:aria-expanded=\"isOpened.toString()\"\n\t\t\t:aria-label\n\t\t\tclass=\"header-menu__trigger\"\n\t\t\tsize=\"large\"\n\t\t\tvariant=\"tertiary-no-background\"\n\t\t\t@click.prevent=\"toggleMenu\">\n\t\t\t<template #icon>\n\t\t\t\t<slot name=\"trigger\" />\n\t\t\t</template>\n\t\t</NcButton>\n\n\t\t<span\n\t\t\tv-if=\"description\"\n\t\t\t:id=\"descriptionId\"\n\t\t\tclass=\"header-menu__description hidden-visually\">\n\t\t\t{{ description }}\n\t\t</span>\n\n\t\t<!-- Visual triangle -->\n\t\t<div v-show=\"isOpened\" class=\"header-menu__caret\" />\n\n\t\t<!-- Menu opened content -->\n\t\t<div\n\t\t\tv-show=\"isOpened\"\n\t\t\t:id=\"`header-menu-${id}`\"\n\t\t\tclass=\"header-menu__wrapper\">\n\t\t\t<div ref=\"contentContainer\" class=\"header-menu__content\">\n\t\t\t\t<slot />\n\t\t\t</div>\n\t\t</div>\n\t</component>\n</template>\n\n<style lang=\"scss\" scoped>\n@use './header-menu__trigger.scss';\n\n// content inner and outer margin\n// Also used for menu top-right positioning\n$externalMargin: 8px;\n\n.header-menu {\n\t&__wrapper {\n\t\tposition: fixed;\n\t\tz-index: 2000;\n\t\ttop: var(--header-height);\n\t\tinset-inline-end: 0;\n\t\tbox-sizing: border-box;\n\t\tmargin: 0 $externalMargin;\n\t\tborder-radius: var(--border-radius-element);\n\t\tbackground-color: var(--color-main-background);\n\n\t\tfilter: drop-shadow(0 1px 5px var(--color-box-shadow));\n\t}\n\n\t&__caret {\n\t\tposition: absolute;\n\t\tz-index: 2001; // Because __wrapper is 2000.\n\t\tbottom: 0;\n\t\tinset-inline-start: calc(50% - 10px);\n\t\twidth: 0;\n\t\theight: 0;\n\t\tcontent: ' ';\n\t\tpointer-events: none;\n\t\tborder: 10px solid transparent;\n\t\tborder-bottom-color: var(--color-main-background);\n\t}\n\n\t&__content {\n\t\toverflow: auto;\n\t\twidth: 350px;\n\t\tmax-width: calc(100vw - 2 * $externalMargin);\n\t\tmin-height: calc(var(--default-clickable-area) * 1.5);\n\t\tmax-height: calc(100vh - var(--header-height) * 2);\n\t\t:deep(.empty-content) {\n\t\t\tmargin: 12vh 10px;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","id","isNav","_unref","_normalizeClass","_createVNode","ariaLabel","_renderSlot","description","_createElementBlock","_withDirectives","_createElementVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA,UAAM,OAAO;AAmBb,UAAM,gBAAgB,gBAAA;AAEtB,UAAM,YAAY,gBAAA;AAElB,UAAM,YAAY,IAAA;AAElB,UAAM,WAAW,IAAI,QAAA,IAAI;AAEzB,UAAM,aAAa,SAAS,MAAM,QAAA,QAAQ,QAAQ,KAAK;AAGvD,UAAM,0BAA0B,eAAe,kBAAkB;AAEjE,UAAM,oBAAoB,eAA4B,YAAY;AAElE,UAAM,wBAAwB,eAAe,eAAe;AAG5D,UAAM,SAAS,SAAS,MAAM,MAAM,QAAQ,QAAA,4BAA4B,IACrE,QAAA,+BACA,QAAA,6BAA6B,MAAM,GAAG,CAAC;AAC1C,mBAAe,mBAAm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AAKC,eAAA,CAAA,EAAA,uBAA2B,SAAA,MAAA,GAC3B,aAAa,CAAA;AAAA,QAClB,YAAU;AAAA,MAAA;yBAEX,MAaW;AAAA,UAbXC,YAaWF,MAAA,QAAA,GAAA;AAAA,YAZT,IAAID,KAAAA,QAAQC,MAAA,SAAA,IAAS;AAAA,YACtB,KAAI;AAAA,YACH,gCAA8BF,KAAAA,EAAE;AAAA,YAChC,iBAAe,SAAA,MAAS,SAAA;AAAA,YACxB,cAAAK,KAAAA;AAAAA,YACD,OAAM;AAAA,YACN,MAAK;AAAA,YACL,SAAQ;AAAA,YACP,uBAAe,YAAU,CAAA,SAAA,CAAA;AAAA,UAAA;YACf,cACV,MAAuB;AAAA,cAAvBC,WAAuB,KAAA,QAAA,WAAA,CAAA,GAAA,QAAA,IAAA;AAAA,YAAA;;;UAKlBC,KAAAA,4BADPC,mBAKO,QAAA;AAAA;YAHL,IAAIN,MAAA,aAAA;AAAA,YACL,OAAM;AAAA,UAAA,mBACHK,KAAAA,WAAW,GAAA,GAAA,UAAA;UAIfE,eAAAC,mBAAoD,OAApD,YAAoD,MAAA,GAAA,GAAA;AAAA,oBAAvC,SAAA,KAAQ;AAAA,UAAA;yBAGrBA,mBAOM,OAAA;AAAA,YALJ,mBAAmBV,KAAAA,EAAE;AAAA,YACtB,OAAM;AAAA,UAAA;YACNU,mBAEM,OAFN,YAEM;AAAA,cADLJ,WAAQ,KAAA,QAAA,WAAA,CAAA,GAAA,QAAA,IAAA;AAAA,YAAA;;oBAJD,SAAA,KAAQ;AAAA,UAAA;;;;;;;;"}
1
+ {"version":3,"file":"NcHeaderMenu-B5-BQbQ6.mjs","sources":["../../src/components/NcHeaderMenu/NcHeaderMenu.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 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 in the Nextcloud top header.\n\n```\n<template>\n\t<div id=\"nextcloud-header\">\n\t\t<NcHeaderMenu id=\"search\"\n\t\t\taria-label=\"Search\">\n\t\t\t<template #trigger>\n\t\t\t\t<Magnify />\n\t\t\t</template>\n\t\t\t<div>\n\t\t\t\t<NcTextField label=\"Search for files, comments, contacts …\"\n\t\t\t\t\tstyle=\"padding-inline: 8px;\"\n\t\t\t\t\ttype=\"search\"\n\t\t\t\t\tv-model=\"query\" />\n\t\t\t\t<NcEmptyContent\n\t\t\t\t\tname=\"Search\"\n\t\t\t\t\t:description=\"query ? `No results for '${query}'` : 'Start typing to search'\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Magnify />\n\t\t\t\t\t</template>\n\t\t\t\t</NcEmptyContent>\n\t\t\t</div>\n\t\t</NcHeaderMenu>\n\t</div>\n</template>\n<script>\nimport Magnify from 'vue-material-design-icons/Magnify'\n\nexport default {\n\tcomponents: {\n\t\tMagnify,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tquery: '',\n\t\t}\n\t},\n}\n</script>\n<style>\n#nextcloud-header {\n\tdisplay: flex;\n\tjustify-content: end;\n\tbackground-color: var(--color-primary);\n\theight: var(--header-height, 50px);\n\tpadding-inline-end: 12px;\n}\n</style>\n```\n</docs>\n\n<script setup lang=\"ts\">\nimport type { FocusTrap } from 'focus-trap'\nimport type { Slot } from 'vue'\n\nimport { onClickOutside } from '@vueuse/core'\nimport { createFocusTrap } from 'focus-trap'\nimport { computed, nextTick, ref, useTemplateRef, watch } from 'vue'\nimport { useHotKey } from '../../composables/index.js'\nimport { useTrapStackControl } from '../../composables/useTrapStackControl.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { getTrapStack } from '../../utils/focusTrap.js'\nimport NcButton from '../NcButton/index.ts'\n\nconst {\n\tariaLabel = undefined,\n\tdescription = undefined,\n\texcludeClickOutsideSelectors = [],\n\topen = false,\n\tisNav = false,\n} = defineProps<{\n\t/**\n\t * Unique id for this menu\n\t */\n\tid: string\n\n\t/**\n\t * aria-label attribute of the menu open button\n\t */\n\tariaLabel?: string\n\n\t/**\n\t * Current menu open state\n\t */\n\topen?: boolean\n\n\t/**\n\t * Pass `true` if the header menu is used for website navigation\n\t *\n\t * The wrapper tag will be set to `nav` and its `aria-labelledby`\n\t * will be associated with the menu open button\n\t */\n\tisNav?: boolean\n\n\t/**\n\t * Additional visually hidden description text for the menu\n\t * open button\n\t */\n\tdescription?: string\n\n\t/**\n\t * A query-selector or an array of query-selectors\n\t * to be ignored when clicking outside an element\n\t */\n\texcludeClickOutsideSelectors?: string | string[]\n}>()\n\nconst emit = defineEmits<{\n\t/** Emitted when the menu is fully closed (animation done) */\n\tclosed: []\n\n\t/** Emitted when the menu is fully opened (animation done) */\n\topened: []\n\n\t/** Updated open state */\n\t'update:open': [v: boolean]\n}>()\n\ndefineSlots<{\n\t/** The menu content */\n\tdefault?: Slot\n\t/** Icon trigger slot. Make sure the svg path is at least 16px. Usually mdi icon works at 20px */\n\ttrigger?: Slot\n}>()\n\n/** Id of the menu description */\nconst descriptionId = createElementId()\n/** Id of the trigger button */\nconst triggerId = createElementId()\n/** The active focus trap (if any) */\nconst focusTrap = ref<FocusTrap>()\n/** Is the menu currently opened */\nconst isOpened = ref(open)\n/** HTML tag to use for the header menu */\nconst wrapperTag = computed(() => isNav ? 'nav' : 'div')\n\n/** The menu content container element */\nconst contentContainerElement = useTemplateRef('contentContainer')\n/** The overall header menu wrapping element (<nav> or <div>) */\nconst headerMenuElement = useTemplateRef<HTMLElement>('headerMenu')\n/** The menu trigger button */\nconst triggerButtonInstance = useTemplateRef('triggerButton')\n\n// Handle click outside of the menu -> should close the menu\nconst ignore = computed(() => Array.isArray(excludeClickOutsideSelectors)\n\t? excludeClickOutsideSelectors\n\t: excludeClickOutsideSelectors.split(' '))\nonClickOutside(headerMenuElement, () => setMenuState(false), { ignore })\n\n// Pressing escape should close the menu\nuseHotKey('Escape', () => setMenuState(false), { prevent: true })\n\n// When component has its own custom focus management\n// The global focus trap stack should be paused\nuseTrapStackControl(isOpened, {\n\tdisabled: () => !isNav,\n})\n\n// Watch the open prop to adjust the internal opened state\nwatch(() => open, (state: boolean) => setMenuState(state))\n\n/**\n * Toggle the current menu open state\n */\nfunction toggleMenu() {\n\tsetMenuState(!isOpened.value)\n}\n\n/**\n * Set the menu opened state\n *\n * @param state The opened state to set\n */\nasync function setMenuState(state: boolean) {\n\tif (state === isOpened.value) {\n\t\treturn\n\t}\n\n\tisOpened.value = state\n\temit('update:open', state)\n\n\t// wait one tick to make sure the rendering finished\n\tawait nextTick()\n\t// either add or clear the focus trap\n\tawait (state ? addFocusTrap() : clearFocusTrap())\n\n\t// Emit signal to mark finished toggling\n\t// @ts-expect-error This seems to be broken in Vue's typescript macro compiler...\n\temit(state ? 'opened' : 'closed')\n}\n\n/**\n * When this is role navigation, then we cannot apply a focus trap.\n * In this case we close the menu on focus-out.\n *\n * @param event the focus event\n */\nfunction onFocusOut(event: FocusEvent) {\n\t// Is not a navigation\n\tif (!isNav) {\n\t\treturn\n\t}\n\n\t// Event target is not a node\n\tif (!(event.relatedTarget instanceof Node)) {\n\t\treturn\n\t}\n\n\tif (headerMenuElement.value?.contains(event.relatedTarget)) {\n\t\tsetMenuState(false)\n\t}\n}\n\n/**\n * Add focus trap for accessibility.\n * Shall only be used when all children are mounted\n * and available in the DOM. We use $nextTick for that.\n */\nasync function addFocusTrap() {\n\t// We cannot add the focus trap on navigation roles\n\t// also skip if already set\n\tif (isNav || focusTrap.value) {\n\t\treturn\n\t}\n\n\t// Init focus trap\n\tfocusTrap.value = createFocusTrap(contentContainerElement.value!, {\n\t\tallowOutsideClick: true,\n\t\ttrapStack: getTrapStack(),\n\t\tfallbackFocus: triggerButtonInstance.value?.$el,\n\t})\n\tfocusTrap.value.activate()\n}\n\n/**\n * Deactivate and clear the focus trap\n */\nfunction clearFocusTrap() {\n\tfocusTrap.value?.deactivate()\n\tfocusTrap.value = undefined\n}\n</script>\n\n<template>\n\t<component\n\t\t:is=\"wrapperTag\"\n\t\t:id=\"id\"\n\t\tref=\"headerMenu\"\n\t\t:aria-labelledby=\"isNav ? triggerId : null\"\n\t\t:class=\"{ 'header-menu--opened': isOpened }\"\n\t\tclass=\"header-menu\"\n\t\t@focusout=\"onFocusOut\">\n\t\t<!-- Trigger -->\n\t\t<NcButton\n\t\t\t:id=\"isNav ? triggerId : null\"\n\t\t\tref=\"triggerButton\"\n\t\t\t:aria-controls=\"`header-menu-${id}`\"\n\t\t\t:aria-expanded=\"isOpened.toString()\"\n\t\t\t:aria-label\n\t\t\tclass=\"header-menu__trigger\"\n\t\t\tsize=\"large\"\n\t\t\tvariant=\"tertiary-no-background\"\n\t\t\t@click.prevent=\"toggleMenu\">\n\t\t\t<template #icon>\n\t\t\t\t<slot name=\"trigger\" />\n\t\t\t</template>\n\t\t</NcButton>\n\n\t\t<span\n\t\t\tv-if=\"description\"\n\t\t\t:id=\"descriptionId\"\n\t\t\tclass=\"header-menu__description hidden-visually\">\n\t\t\t{{ description }}\n\t\t</span>\n\n\t\t<!-- Visual triangle -->\n\t\t<div v-show=\"isOpened\" class=\"header-menu__caret\" />\n\n\t\t<!-- Menu opened content -->\n\t\t<div\n\t\t\tv-show=\"isOpened\"\n\t\t\t:id=\"`header-menu-${id}`\"\n\t\t\tclass=\"header-menu__wrapper\">\n\t\t\t<div ref=\"contentContainer\" class=\"header-menu__content\">\n\t\t\t\t<slot />\n\t\t\t</div>\n\t\t</div>\n\t</component>\n</template>\n\n<style lang=\"scss\" scoped>\n@use './header-menu__trigger.scss';\n\n// content inner and outer margin\n// Also used for menu top-right positioning\n$externalMargin: 8px;\n\n.header-menu {\n\t&__wrapper {\n\t\tposition: fixed;\n\t\tz-index: 2000;\n\t\ttop: var(--header-height);\n\t\tinset-inline-end: 0;\n\t\tbox-sizing: border-box;\n\t\tmargin: 0 $externalMargin;\n\t\tborder-radius: var(--border-radius-element);\n\t\tbackground-color: var(--color-main-background);\n\n\t\tfilter: drop-shadow(0 1px 5px var(--color-box-shadow));\n\t}\n\n\t&__caret {\n\t\tposition: absolute;\n\t\tz-index: 2001; // Because __wrapper is 2000.\n\t\tbottom: 0;\n\t\tinset-inline-start: calc(50% - 10px);\n\t\twidth: 0;\n\t\theight: 0;\n\t\tcontent: ' ';\n\t\tpointer-events: none;\n\t\tborder: 10px solid transparent;\n\t\tborder-bottom-color: var(--color-main-background);\n\t}\n\n\t&__content {\n\t\toverflow: auto;\n\t\twidth: 350px;\n\t\tmax-width: calc(100vw - 2 * $externalMargin);\n\t\tmin-height: calc(var(--default-clickable-area) * 1.5);\n\t\tmax-height: calc(100vh - var(--header-height) * 2);\n\t\t:deep(.empty-content) {\n\t\t\tmargin: 12vh 10px;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","id","isNav","_unref","_normalizeClass","_createVNode","ariaLabel","_renderSlot","description","_createElementBlock","_withDirectives","_createElementVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA,UAAM,OAAO;AAmBb,UAAM,gBAAgB,gBAAA;AAEtB,UAAM,YAAY,gBAAA;AAElB,UAAM,YAAY,IAAA;AAElB,UAAM,WAAW,IAAI,QAAA,IAAI;AAEzB,UAAM,aAAa,SAAS,MAAM,QAAA,QAAQ,QAAQ,KAAK;AAGvD,UAAM,0BAA0B,eAAe,kBAAkB;AAEjE,UAAM,oBAAoB,eAA4B,YAAY;AAElE,UAAM,wBAAwB,eAAe,eAAe;AAG5D,UAAM,SAAS,SAAS,MAAM,MAAM,QAAQ,QAAA,4BAA4B,IACrE,QAAA,+BACA,QAAA,6BAA6B,MAAM,GAAG,CAAC;AAC1C,mBAAe,mBAAmB,MAAM,aAAa,KAAK,GAAG,EAAE,QAAQ;AAGvE,cAAU,UAAU,MAAM,aAAa,KAAK,GAAG,EAAE,SAAS,MAAM;AAIhE,wBAAoB,UAAU;AAAA,MAC7B,UAAU,MAAM,CAAC,QAAA;AAAA,IAAA,CACjB;AAGD,UAAM,MAAM,QAAA,MAAM,CAAC,UAAmB,aAAa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CAA8BF,KAAAA,EAAE;AAAA,YAChC,iBAAe,SAAA,MAAS,SAAA;AAAA,YACxB,cAAAK,KAAAA;AAAAA,YACD,OAAM;AAAA,YACN,MAAK;AAAA,YACL,SAAQ;AAAA,YACP,uBAAe,YAAU,CAAA,SAAA,CAAA;AAAA,UAAA;YACf,cACV,MAAuB;AAAA,cAAvBC,WAAuB,KAAA,QAAA,WAAA,CAAA,GAAA,QAAA,IAAA;AAAA,YAAA;;;UAKlBC,KAAAA,4BADPC,mBAKO,QAAA;AAAA;YAHL,IAAIN,MAAA,aAAA;AAAA,YACL,OAAM;AAAA,UAAA,mBACHK,KAAAA,WAAW,GAAA,GAAA,UAAA;UAIfE,eAAAC,mBAAoD,OAApD,YAAoD,MAAA,GAAA,GAAA;AAAA,oBAAvC,SAAA,KAAQ;AAAA,UAAA;yBAGrBA,mBAOM,OAAA;AAAA,YALJ,mBAAmBV,KAAAA,EAAE;AAAA,YACtB,OAAM;AAAA,UAAA;YACNU,mBAEM,OAFN,YAEM;AAAA,cADLJ,WAAQ,KAAA,QAAA,WAAA,CAAA,GAAA,QAAA,IAAA;AAAA,YAAA;;oBAJD,SAAA,KAAQ;AAAA,UAAA;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import '../assets/NcHotkeyList-Braxeyah.css';
1
+ import '../assets/NcHotkeyList-BfrEkKmK.css';
2
2
  import { defineComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, unref, renderSlot } from "vue";
3
3
  import { r as register, p as t31, a as t } from "./_l10n-BCg4udFv.mjs";
4
4
  import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
@@ -39,4 +39,4 @@ const NcHotkeyList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cs
39
39
  export {
40
40
  NcHotkeyList as N
41
41
  };
42
- //# sourceMappingURL=NcHotkeyList-lslhX0EJ.mjs.map
42
+ //# sourceMappingURL=NcHotkeyList-Ca7AtgZ9.mjs.map