@nextcloud/vue 8.35.2 → 8.36.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 (496) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/Components/NcActionButton.cjs +1 -1
  3. package/dist/Components/NcActionButton.mjs +1 -1
  4. package/dist/Components/NcActionButtonGroup.cjs +1 -1
  5. package/dist/Components/NcActionButtonGroup.mjs +1 -1
  6. package/dist/Components/NcActionCheckbox.cjs +1 -1
  7. package/dist/Components/NcActionCheckbox.mjs +1 -1
  8. package/dist/Components/NcActionInput.cjs +1 -1
  9. package/dist/Components/NcActionInput.mjs +1 -1
  10. package/dist/Components/NcActionRadio.cjs +1 -1
  11. package/dist/Components/NcActionRadio.mjs +1 -1
  12. package/dist/Components/NcActionTextEditable.cjs +1 -1
  13. package/dist/Components/NcActionTextEditable.mjs +1 -1
  14. package/dist/Components/NcActions.cjs +1 -1
  15. package/dist/Components/NcActions.mjs +1 -1
  16. package/dist/Components/NcAppContent.cjs +1 -1
  17. package/dist/Components/NcAppContent.mjs +1 -1
  18. package/dist/Components/NcAppNavigation.cjs +1 -1
  19. package/dist/Components/NcAppNavigation.mjs +1 -1
  20. package/dist/Components/NcAppNavigationCaption.cjs +1 -1
  21. package/dist/Components/NcAppNavigationCaption.mjs +1 -1
  22. package/dist/Components/NcAppNavigationItem.cjs +1 -1
  23. package/dist/Components/NcAppNavigationItem.mjs +1 -1
  24. package/dist/Components/NcAppNavigationNewItem.cjs +1 -1
  25. package/dist/Components/NcAppNavigationNewItem.mjs +1 -1
  26. package/dist/Components/NcAppNavigationSearch.cjs +1 -1
  27. package/dist/Components/NcAppNavigationSearch.mjs +1 -1
  28. package/dist/Components/NcAppNavigationSettings.cjs +1 -1
  29. package/dist/Components/NcAppNavigationSettings.mjs +1 -1
  30. package/dist/Components/NcAppNavigationToggle.cjs +1 -1
  31. package/dist/Components/NcAppNavigationToggle.mjs +1 -1
  32. package/dist/Components/NcAppSettingsDialog.cjs +1 -1
  33. package/dist/Components/NcAppSettingsDialog.mjs +1 -1
  34. package/dist/Components/NcAppSettingsSectionShortcuts.cjs +1 -1
  35. package/dist/Components/NcAppSettingsSectionShortcuts.mjs +1 -1
  36. package/dist/Components/NcAppSettingsShortcutsSection.cjs +1 -1
  37. package/dist/Components/NcAppSettingsShortcutsSection.mjs +1 -1
  38. package/dist/Components/NcAppSidebar.cjs +1 -1
  39. package/dist/Components/NcAppSidebar.mjs +1 -1
  40. package/dist/Components/NcAssistantButton.cjs +1 -1
  41. package/dist/Components/NcAssistantButton.mjs +1 -1
  42. package/dist/Components/NcAssistantContent.cjs +4 -4
  43. package/dist/Components/NcAssistantContent.mjs +4 -4
  44. package/dist/Components/NcAssistantIcon.cjs +1 -1
  45. package/dist/Components/NcAssistantIcon.mjs +1 -1
  46. package/dist/Components/NcAvatar.cjs +1 -1
  47. package/dist/Components/NcAvatar.mjs +1 -1
  48. package/dist/Components/NcBlurHash.cjs +1 -1
  49. package/dist/Components/NcBlurHash.mjs +1 -1
  50. package/dist/Components/NcBreadcrumb.cjs +1 -1
  51. package/dist/Components/NcBreadcrumb.mjs +1 -1
  52. package/dist/Components/NcBreadcrumbs.cjs +1 -1
  53. package/dist/Components/NcBreadcrumbs.mjs +1 -1
  54. package/dist/Components/NcCheckboxRadioSwitch.cjs +1 -1
  55. package/dist/Components/NcCheckboxRadioSwitch.mjs +1 -1
  56. package/dist/Components/NcChip.cjs +4 -4
  57. package/dist/Components/NcChip.mjs +4 -4
  58. package/dist/Components/NcCollectionList.cjs +1 -1
  59. package/dist/Components/NcCollectionList.mjs +1 -1
  60. package/dist/Components/NcColorPicker.cjs +1 -1
  61. package/dist/Components/NcColorPicker.mjs +1 -1
  62. package/dist/Components/NcContent.cjs +1 -1
  63. package/dist/Components/NcContent.mjs +1 -1
  64. package/dist/Components/NcDashboardWidget.cjs +1 -1
  65. package/dist/Components/NcDashboardWidget.mjs +1 -1
  66. package/dist/Components/NcDashboardWidgetItem.cjs +1 -1
  67. package/dist/Components/NcDashboardWidgetItem.mjs +1 -1
  68. package/dist/Components/NcDateTimePicker.cjs +7 -7
  69. package/dist/Components/NcDateTimePicker.cjs.map +1 -1
  70. package/dist/Components/NcDateTimePicker.mjs +7 -7
  71. package/dist/Components/NcDateTimePicker.mjs.map +1 -1
  72. package/dist/Components/NcDateTimePickerNative.cjs +1 -1
  73. package/dist/Components/NcDateTimePickerNative.mjs +1 -1
  74. package/dist/Components/NcDialog.cjs +1 -1
  75. package/dist/Components/NcDialog.mjs +1 -1
  76. package/dist/Components/NcDialogButton.cjs +1 -1
  77. package/dist/Components/NcDialogButton.mjs +1 -1
  78. package/dist/Components/NcEmojiPicker.cjs +1 -1
  79. package/dist/Components/NcEmojiPicker.mjs +1 -1
  80. package/dist/Components/NcFormBox.cjs +1 -1
  81. package/dist/Components/NcFormBox.mjs +1 -1
  82. package/dist/Components/NcFormBoxButton.cjs +1 -1
  83. package/dist/Components/NcFormBoxButton.mjs +1 -1
  84. package/dist/Components/NcFormBoxCopyButton.cjs +1 -1
  85. package/dist/Components/NcFormBoxCopyButton.mjs +1 -1
  86. package/dist/Components/NcFormBoxSwitch.cjs +1 -1
  87. package/dist/Components/NcFormBoxSwitch.mjs +1 -1
  88. package/dist/Components/NcFormGroup.cjs +1 -1
  89. package/dist/Components/NcFormGroup.mjs +1 -1
  90. package/dist/Components/NcHotkey.cjs +1 -1
  91. package/dist/Components/NcHotkey.mjs +1 -1
  92. package/dist/Components/NcHotkeyList.cjs +1 -1
  93. package/dist/Components/NcHotkeyList.mjs +1 -1
  94. package/dist/Components/NcInputField.cjs +1 -1
  95. package/dist/Components/NcInputField.mjs +1 -1
  96. package/dist/Components/NcKbd.cjs +1 -1
  97. package/dist/Components/NcKbd.mjs +1 -1
  98. package/dist/Components/NcListItem.cjs +1 -1
  99. package/dist/Components/NcListItem.mjs +1 -1
  100. package/dist/Components/NcListItemIcon.cjs +1 -1
  101. package/dist/Components/NcListItemIcon.mjs +1 -1
  102. package/dist/Components/NcModal.cjs +5 -5
  103. package/dist/Components/NcModal.mjs +5 -5
  104. package/dist/Components/NcPasswordField.cjs +1 -1
  105. package/dist/Components/NcPasswordField.mjs +1 -1
  106. package/dist/Components/NcPopover.cjs +1 -1
  107. package/dist/Components/NcPopover.mjs +1 -1
  108. package/dist/Components/NcRadioGroup.cjs +1 -1
  109. package/dist/Components/NcRadioGroup.mjs +1 -1
  110. package/dist/Components/NcRadioGroupButton.cjs +1 -1
  111. package/dist/Components/NcRadioGroupButton.mjs +1 -1
  112. package/dist/Components/NcRelatedResourcesPanel.cjs +1 -1
  113. package/dist/Components/NcRelatedResourcesPanel.mjs +1 -1
  114. package/dist/Components/NcRichContenteditable.cjs +1 -1
  115. package/dist/Components/NcRichContenteditable.mjs +1 -1
  116. package/dist/Components/NcRichText.cjs +2 -2
  117. package/dist/Components/NcRichText.mjs +3 -3
  118. package/dist/Components/NcSelect.cjs +1 -1
  119. package/dist/Components/NcSelect.mjs +1 -1
  120. package/dist/Components/NcSelectTags.cjs +1 -1
  121. package/dist/Components/NcSelectTags.mjs +1 -1
  122. package/dist/Components/NcSelectUsers.cjs +1 -1
  123. package/dist/Components/NcSelectUsers.mjs +1 -1
  124. package/dist/Components/NcSettingsInputText.cjs +1 -1
  125. package/dist/Components/NcSettingsInputText.mjs +1 -1
  126. package/dist/Components/NcSettingsSection.cjs +1 -1
  127. package/dist/Components/NcSettingsSection.mjs +1 -1
  128. package/dist/Components/NcSettingsSelectGroup.cjs +1 -1
  129. package/dist/Components/NcSettingsSelectGroup.mjs +1 -1
  130. package/dist/Components/NcTextArea.cjs +1 -1
  131. package/dist/Components/NcTextArea.mjs +1 -1
  132. package/dist/Components/NcTextField.cjs +1 -1
  133. package/dist/Components/NcTextField.mjs +1 -1
  134. package/dist/Components/NcTimezonePicker.cjs +1 -1
  135. package/dist/Components/NcTimezonePicker.mjs +1 -1
  136. package/dist/Components/NcUserBubble.cjs +1 -1
  137. package/dist/Components/NcUserBubble.mjs +1 -1
  138. package/dist/Components/NcUserStatusIcon.cjs +1 -1
  139. package/dist/Components/NcUserStatusIcon.mjs +1 -1
  140. package/dist/Composables/useFormatDateTime.cjs +1 -1
  141. package/dist/Composables/useFormatDateTime.mjs +1 -1
  142. package/dist/Functions/reference.cjs +1 -1
  143. package/dist/Functions/reference.mjs +1 -1
  144. package/dist/Functions/usernameToColor.cjs +1 -1
  145. package/dist/Functions/usernameToColor.mjs +1 -1
  146. package/dist/assets/NcActionCheckbox-CzUElysW.css +127 -0
  147. package/dist/assets/NcActionRadio-CROsOVZe.css +127 -0
  148. package/dist/assets/{NcAppContent-CY_qJiOL.css → NcAppContent-COKKdvdZ.css} +19 -19
  149. package/dist/assets/{NcAppSettingsDialog-p8V4OFR1.css → NcAppSettingsDialog-N2RJYgHo.css} +3 -3
  150. package/dist/assets/{NcAppSettingsShortcutsSection-BuI-s4kd.css → NcAppSettingsShortcutsSection-C_DMnyUy.css} +3 -3
  151. package/dist/assets/{NcAppSidebar-DujbJ9sN.css → NcAppSidebar-BsMeIg8W.css} +45 -45
  152. package/dist/assets/{NcAssistantButton-owGSr0s0.css → NcAssistantButton-BNEXluSq.css} +9 -9
  153. package/dist/assets/{NcAssistantContent-Ban7n3Bg.css → NcAssistantContent-DrswfkY-.css} +3 -3
  154. package/dist/assets/{NcAssistantIcon-BoOnqVRr.css → NcAssistantIcon-CdtR1Psu.css} +4 -4
  155. package/dist/assets/{NcBlurHash-7aGtE-_T.css → NcBlurHash-CT92vFpc.css} +2 -2
  156. package/dist/assets/{NcCollectionList-hRgvNUMR.css → NcCollectionList-ChU8Os4e.css} +15 -15
  157. package/dist/assets/{NcDateTimePicker-DyG-TczL.css → NcDateTimePicker-BU_TdhUm.css} +13 -13
  158. package/dist/assets/{NcFormBox-D-kcijXp.css → NcFormBox-9NY7pxez.css} +11 -11
  159. package/dist/assets/{NcFormBoxButton-C6EvdLK4.css → NcFormBoxButton-BlS280R1.css} +2 -2
  160. package/dist/assets/{NcFormBoxItem-BfXKp9xJ.css → NcFormBoxItem-BdFKDYqL.css} +13 -13
  161. package/dist/assets/{NcFormBoxSwitch-DScgbxtv.css → NcFormBoxSwitch-CXtmxIfB.css} +2 -2
  162. package/dist/assets/{NcFormGroup-BrD0Scm7.css → NcFormGroup-uKT9TTrz.css} +7 -7
  163. package/dist/assets/{NcHotkey-4yi1Hobg.css → NcHotkey-9k8cxWO5.css} +8 -8
  164. package/dist/assets/{NcHotkeyList-gAZN0WIu.css → NcHotkeyList-CNWXE5jg.css} +2 -2
  165. package/dist/assets/{NcIconToggleSwitch-Dr-tC5Ic.css → NcIconToggleSwitch-sDZkWAmc.css} +4 -4
  166. package/dist/assets/{NcInputField-DDJ6W_1o.css → NcInputField-CJzLu0_0.css} +46 -45
  167. package/dist/assets/{NcKbd-BGW1_Jb7.css → NcKbd-8TOrFNAw.css} +3 -3
  168. package/dist/assets/{NcListItem-BX2N-9Dt.css → NcListItem-DP1egljH.css} +44 -44
  169. package/dist/assets/{NcPopover--XoXIhLx.css → NcPopover-CJgeCuwk.css} +13 -13
  170. package/dist/assets/{NcRadioGroup-1zpSX8V5.css → NcRadioGroup-Dss0ok3g.css} +2 -2
  171. package/dist/assets/{NcRadioGroupButton-DRZ1_-yY.css → NcRadioGroupButton-CMOW3Q4J.css} +19 -11
  172. package/dist/assets/{NcRichContenteditable-BjQ4qHUO.css → NcRichContenteditable-Cm0fohqz.css} +17 -17
  173. package/dist/assets/{NcSelect-z8dCuG3q.css → NcSelect-DS82iTcW.css} +1 -1
  174. package/dist/assets/NcSelectUsers-BDh2CSCJ.css +4 -0
  175. package/dist/assets/{NcTextArea-Tr_3gutt.css → NcTextArea-BNxd9_FK.css} +1 -1
  176. package/dist/chunks/{NcActionButton-w5F9kCHW.mjs → NcActionButton-1gSJfFUC.mjs} +2 -2
  177. package/dist/chunks/{NcActionButton-w5F9kCHW.mjs.map → NcActionButton-1gSJfFUC.mjs.map} +1 -1
  178. package/dist/chunks/{NcActionButton-jtEEPXw2.cjs → NcActionButton-C5Dqge0c.cjs} +2 -2
  179. package/dist/chunks/{NcActionButton-jtEEPXw2.cjs.map → NcActionButton-C5Dqge0c.cjs.map} +1 -1
  180. package/dist/chunks/{NcActionButtonGroup-Dl_0bIqn.mjs → NcActionButtonGroup-BxvJmEwM.mjs} +2 -2
  181. package/dist/chunks/{NcActionButtonGroup-Dl_0bIqn.mjs.map → NcActionButtonGroup-BxvJmEwM.mjs.map} +1 -1
  182. package/dist/chunks/{NcActionButtonGroup-E-6SoAHx.cjs → NcActionButtonGroup-QVUAMbKq.cjs} +2 -2
  183. package/dist/chunks/{NcActionButtonGroup-E-6SoAHx.cjs.map → NcActionButtonGroup-QVUAMbKq.cjs.map} +1 -1
  184. package/dist/chunks/{NcActionCheckbox-D9aQuEYw.mjs → NcActionCheckbox-23CmleUh.mjs} +32 -36
  185. package/dist/chunks/NcActionCheckbox-23CmleUh.mjs.map +1 -0
  186. package/dist/chunks/{NcActionCheckbox-ixZtnZR4.cjs → NcActionCheckbox-BGCUJhg_.cjs} +32 -36
  187. package/dist/chunks/NcActionCheckbox-BGCUJhg_.cjs.map +1 -0
  188. package/dist/chunks/{NcActionInput-JVtIXzyo.mjs → NcActionInput-BLfZBCFj.mjs} +5 -5
  189. package/dist/chunks/{NcActionInput-JVtIXzyo.mjs.map → NcActionInput-BLfZBCFj.mjs.map} +1 -1
  190. package/dist/chunks/{NcActionInput-CvTePip6.cjs → NcActionInput-CuhJdyHk.cjs} +5 -5
  191. package/dist/chunks/{NcActionInput-CvTePip6.cjs.map → NcActionInput-CuhJdyHk.cjs.map} +1 -1
  192. package/dist/chunks/{NcActionRadio-DPF0_wH9.cjs → NcActionRadio-DbkRiTHX.cjs} +17 -29
  193. package/dist/chunks/NcActionRadio-DbkRiTHX.cjs.map +1 -0
  194. package/dist/chunks/{NcActionRadio-BmVR-lhZ.mjs → NcActionRadio-Dd3CsuiD.mjs} +17 -29
  195. package/dist/chunks/NcActionRadio-Dd3CsuiD.mjs.map +1 -0
  196. package/dist/chunks/{NcActionTextEditable-CfhlP5-E.mjs → NcActionTextEditable-CIsAP-pp.mjs} +2 -2
  197. package/dist/chunks/{NcActionTextEditable-CfhlP5-E.mjs.map → NcActionTextEditable-CIsAP-pp.mjs.map} +1 -1
  198. package/dist/chunks/{NcActionTextEditable-CDkdl0jj.cjs → NcActionTextEditable-RFLtWxrl.cjs} +2 -2
  199. package/dist/chunks/{NcActionTextEditable-CDkdl0jj.cjs.map → NcActionTextEditable-RFLtWxrl.cjs.map} +1 -1
  200. package/dist/chunks/{NcActions-DXfOYf3w.mjs → NcActions-B7LKaVy0.mjs} +3 -3
  201. package/dist/chunks/{NcActions-DXfOYf3w.mjs.map → NcActions-B7LKaVy0.mjs.map} +1 -1
  202. package/dist/chunks/{NcActions-DhEGso92.cjs → NcActions-RVSfZOYh.cjs} +3 -3
  203. package/dist/chunks/{NcActions-DhEGso92.cjs.map → NcActions-RVSfZOYh.cjs.map} +1 -1
  204. package/dist/chunks/{NcAppContent-D-MzdCDi.mjs → NcAppContent-BQbYzcUh.mjs} +10 -8
  205. package/dist/chunks/NcAppContent-BQbYzcUh.mjs.map +1 -0
  206. package/dist/chunks/{NcAppContent-cKOp687H.cjs → NcAppContent-iiQ0CC8-.cjs} +10 -8
  207. package/dist/chunks/NcAppContent-iiQ0CC8-.cjs.map +1 -0
  208. package/dist/chunks/{NcAppNavigation-BGc7ks7G.mjs → NcAppNavigation-Cu8LpQSI.mjs} +2 -2
  209. package/dist/chunks/{NcAppNavigation-BGc7ks7G.mjs.map → NcAppNavigation-Cu8LpQSI.mjs.map} +1 -1
  210. package/dist/chunks/{NcAppNavigation-Ce5BoTSG.cjs → NcAppNavigation-DjeB8XMY.cjs} +2 -2
  211. package/dist/chunks/{NcAppNavigation-Ce5BoTSG.cjs.map → NcAppNavigation-DjeB8XMY.cjs.map} +1 -1
  212. package/dist/chunks/{NcAppNavigationCaption-C8SUVqGR.cjs → NcAppNavigationCaption-BrwsCX28.cjs} +2 -2
  213. package/dist/chunks/{NcAppNavigationCaption-C8SUVqGR.cjs.map → NcAppNavigationCaption-BrwsCX28.cjs.map} +1 -1
  214. package/dist/chunks/{NcAppNavigationCaption-oRJEZSTQ.mjs → NcAppNavigationCaption-CQaKs-Zf.mjs} +2 -2
  215. package/dist/chunks/{NcAppNavigationCaption-oRJEZSTQ.mjs.map → NcAppNavigationCaption-CQaKs-Zf.mjs.map} +1 -1
  216. package/dist/chunks/{NcAppNavigationItem-DyMBscJd.cjs → NcAppNavigationItem-CyQBEt9w.cjs} +6 -6
  217. package/dist/chunks/{NcAppNavigationItem-DyMBscJd.cjs.map → NcAppNavigationItem-CyQBEt9w.cjs.map} +1 -1
  218. package/dist/chunks/{NcAppNavigationItem-zOxlduFj.mjs → NcAppNavigationItem-ryrQ6jep.mjs} +6 -6
  219. package/dist/chunks/{NcAppNavigationItem-zOxlduFj.mjs.map → NcAppNavigationItem-ryrQ6jep.mjs.map} +1 -1
  220. package/dist/chunks/{NcAppNavigationNewItem-BSsLh8nj.cjs → NcAppNavigationNewItem-C_0savRU.cjs} +2 -2
  221. package/dist/chunks/{NcAppNavigationNewItem-BSsLh8nj.cjs.map → NcAppNavigationNewItem-C_0savRU.cjs.map} +1 -1
  222. package/dist/chunks/{NcAppNavigationNewItem-D7Pn6vob.mjs → NcAppNavigationNewItem-_8ozWEv3.mjs} +2 -2
  223. package/dist/chunks/{NcAppNavigationNewItem-D7Pn6vob.mjs.map → NcAppNavigationNewItem-_8ozWEv3.mjs.map} +1 -1
  224. package/dist/chunks/{NcAppNavigationSearch-BgivVWlR.mjs → NcAppNavigationSearch-CSih_quP.mjs} +4 -4
  225. package/dist/chunks/{NcAppNavigationSearch-BgivVWlR.mjs.map → NcAppNavigationSearch-CSih_quP.mjs.map} +1 -1
  226. package/dist/chunks/{NcAppNavigationSearch-DC2ybadu.cjs → NcAppNavigationSearch-CqJql2d9.cjs} +4 -4
  227. package/dist/chunks/{NcAppNavigationSearch-DC2ybadu.cjs.map → NcAppNavigationSearch-CqJql2d9.cjs.map} +1 -1
  228. package/dist/chunks/{NcAppNavigationSettings-J1GIZ9QS.cjs → NcAppNavigationSettings-DRoGqPHP.cjs} +4 -4
  229. package/dist/chunks/{NcAppNavigationSettings-J1GIZ9QS.cjs.map → NcAppNavigationSettings-DRoGqPHP.cjs.map} +1 -1
  230. package/dist/chunks/{NcAppNavigationSettings-D5-V4TIs.mjs → NcAppNavigationSettings-Eseo9MMQ.mjs} +4 -4
  231. package/dist/chunks/{NcAppNavigationSettings-D5-V4TIs.mjs.map → NcAppNavigationSettings-Eseo9MMQ.mjs.map} +1 -1
  232. package/dist/chunks/{NcAppNavigationToggle-C0Kc4R9v.cjs → NcAppNavigationToggle-5n7gV3K0.cjs} +2 -2
  233. package/dist/chunks/{NcAppNavigationToggle-C0Kc4R9v.cjs.map → NcAppNavigationToggle-5n7gV3K0.cjs.map} +1 -1
  234. package/dist/chunks/{NcAppNavigationToggle-phm-tyID.mjs → NcAppNavigationToggle-DYJLh23P.mjs} +2 -2
  235. package/dist/chunks/{NcAppNavigationToggle-phm-tyID.mjs.map → NcAppNavigationToggle-DYJLh23P.mjs.map} +1 -1
  236. package/dist/chunks/{NcAppSettingsDialog-BSxqwcZ4.cjs → NcAppSettingsDialog-DApthKor.cjs} +10 -10
  237. package/dist/chunks/{NcAppSettingsDialog-BSxqwcZ4.cjs.map → NcAppSettingsDialog-DApthKor.cjs.map} +1 -1
  238. package/dist/chunks/{NcAppSettingsDialog-CjnPlzCs.mjs → NcAppSettingsDialog-zwmLtX7z.mjs} +10 -10
  239. package/dist/chunks/{NcAppSettingsDialog-CjnPlzCs.mjs.map → NcAppSettingsDialog-zwmLtX7z.mjs.map} +1 -1
  240. package/dist/chunks/{NcAppSettingsShortcutsSection-DzjowBeE.mjs → NcAppSettingsShortcutsSection-CiLZpXkV.mjs} +6 -6
  241. package/dist/chunks/NcAppSettingsShortcutsSection-CiLZpXkV.mjs.map +1 -0
  242. package/dist/chunks/{NcAppSettingsShortcutsSection-B0WBkOo9.cjs → NcAppSettingsShortcutsSection-Ow8Xrs6j.cjs} +6 -6
  243. package/dist/chunks/NcAppSettingsShortcutsSection-Ow8Xrs6j.cjs.map +1 -0
  244. package/dist/chunks/{NcAppSidebar-CdSeLJD4.mjs → NcAppSidebar-BiIeJ3p1.mjs} +6 -6
  245. package/dist/chunks/{NcAppSidebar-BDz7d7NJ.cjs.map → NcAppSidebar-BiIeJ3p1.mjs.map} +1 -1
  246. package/dist/chunks/{NcAppSidebar-BDz7d7NJ.cjs → NcAppSidebar-COAO4VHH.cjs} +6 -6
  247. package/dist/chunks/{NcAppSidebar-CdSeLJD4.mjs.map → NcAppSidebar-COAO4VHH.cjs.map} +1 -1
  248. package/dist/chunks/{NcAssistantButton-CjP2aanh.mjs → NcAssistantButton-Cp9x57gS.mjs} +11 -11
  249. package/dist/chunks/{NcAssistantButton-CjP2aanh.mjs.map → NcAssistantButton-Cp9x57gS.mjs.map} +1 -1
  250. package/dist/chunks/{NcAssistantButton-DQSwGT_7.cjs → NcAssistantButton-Dm2xP503.cjs} +11 -11
  251. package/dist/chunks/{NcAssistantButton-DQSwGT_7.cjs.map → NcAssistantButton-Dm2xP503.cjs.map} +1 -1
  252. package/dist/chunks/{NcAssistantIcon-Dn_unLGj.cjs → NcAssistantIcon-CD5mu9O1.cjs} +7 -7
  253. package/dist/chunks/{NcAssistantIcon-Dn_unLGj.cjs.map → NcAssistantIcon-CD5mu9O1.cjs.map} +1 -1
  254. package/dist/chunks/{NcAssistantIcon-wlxNsdd7.mjs → NcAssistantIcon-DCx6AaSW.mjs} +7 -7
  255. package/dist/chunks/{NcAssistantIcon-wlxNsdd7.mjs.map → NcAssistantIcon-DCx6AaSW.mjs.map} +1 -1
  256. package/dist/chunks/{NcAvatar-DTYINOTI.cjs → NcAvatar-DQZhvYDx.cjs} +5 -5
  257. package/dist/chunks/{NcAvatar-DTYINOTI.cjs.map → NcAvatar-DQZhvYDx.cjs.map} +1 -1
  258. package/dist/chunks/{NcAvatar-Cn98JTqK.mjs → NcAvatar-OCD_HmOb.mjs} +5 -5
  259. package/dist/chunks/{NcAvatar-Cn98JTqK.mjs.map → NcAvatar-OCD_HmOb.mjs.map} +1 -1
  260. package/dist/chunks/{NcBlurHash-CR0v4QBK.cjs → NcBlurHash-D0wcwBet.cjs} +4 -4
  261. package/dist/chunks/{NcBlurHash-CR0v4QBK.cjs.map → NcBlurHash-D0wcwBet.cjs.map} +1 -1
  262. package/dist/chunks/{NcBlurHash-DZmsBU0q.mjs → NcBlurHash-KSj0HXbX.mjs} +4 -4
  263. package/dist/chunks/{NcBlurHash-DZmsBU0q.mjs.map → NcBlurHash-KSj0HXbX.mjs.map} +1 -1
  264. package/dist/chunks/{NcBreadcrumb-CkmzyLa_.cjs → NcBreadcrumb-B-voXzzn.cjs} +2 -2
  265. package/dist/chunks/{NcBreadcrumb-CkmzyLa_.cjs.map → NcBreadcrumb-B-voXzzn.cjs.map} +1 -1
  266. package/dist/chunks/{NcBreadcrumb-DB0OuwsV.mjs → NcBreadcrumb-UmBT5BsM.mjs} +2 -2
  267. package/dist/chunks/{NcBreadcrumb-DB0OuwsV.mjs.map → NcBreadcrumb-UmBT5BsM.mjs.map} +1 -1
  268. package/dist/chunks/{NcBreadcrumbs-BizyuyGI.mjs → NcBreadcrumbs-B8iMbaQb.mjs} +4 -4
  269. package/dist/chunks/{NcBreadcrumbs-BizyuyGI.mjs.map → NcBreadcrumbs-B8iMbaQb.mjs.map} +1 -1
  270. package/dist/chunks/{NcBreadcrumbs-C4T9-I6M.cjs → NcBreadcrumbs-CyRh9rRH.cjs} +4 -4
  271. package/dist/chunks/{NcBreadcrumbs-C4T9-I6M.cjs.map → NcBreadcrumbs-CyRh9rRH.cjs.map} +1 -1
  272. package/dist/chunks/{NcCheckboxRadioSwitch-CgbTELjq.mjs → NcCheckboxRadioSwitch-Di43R9CE.mjs} +3 -3
  273. package/dist/chunks/{NcCheckboxRadioSwitch-CgbTELjq.mjs.map → NcCheckboxRadioSwitch-Di43R9CE.mjs.map} +1 -1
  274. package/dist/chunks/{NcCheckboxRadioSwitch-USANpRLI.cjs → NcCheckboxRadioSwitch-DtrlpJJN.cjs} +3 -3
  275. package/dist/chunks/{NcCheckboxRadioSwitch-USANpRLI.cjs.map → NcCheckboxRadioSwitch-DtrlpJJN.cjs.map} +1 -1
  276. package/dist/chunks/{NcCollectionList-C7QmpJW9.mjs → NcCollectionList-C-LCG1Ob.mjs} +9 -9
  277. package/dist/chunks/{NcCollectionList-BjYItjGi.cjs.map → NcCollectionList-C-LCG1Ob.mjs.map} +1 -1
  278. package/dist/chunks/{NcCollectionList-BjYItjGi.cjs → NcCollectionList-Cvf4AeNt.cjs} +9 -9
  279. package/dist/chunks/{NcCollectionList-C7QmpJW9.mjs.map → NcCollectionList-Cvf4AeNt.cjs.map} +1 -1
  280. package/dist/chunks/{NcColorPicker-Chsy5lX_.cjs → NcColorPicker-CnQNBGVB.cjs} +5 -5
  281. package/dist/chunks/{NcColorPicker-Chsy5lX_.cjs.map → NcColorPicker-CnQNBGVB.cjs.map} +1 -1
  282. package/dist/chunks/{NcColorPicker-DnWT8i3g.mjs → NcColorPicker-DPUDuNp4.mjs} +5 -5
  283. package/dist/chunks/{NcColorPicker-DnWT8i3g.mjs.map → NcColorPicker-DPUDuNp4.mjs.map} +1 -1
  284. package/dist/chunks/{NcContent-B0MLEwwX.cjs → NcContent-B1B89UG0.cjs} +3 -3
  285. package/dist/chunks/{NcContent-B0MLEwwX.cjs.map → NcContent-B1B89UG0.cjs.map} +1 -1
  286. package/dist/chunks/{NcContent-RSHRX9Ei.mjs → NcContent-mCqWZXj_.mjs} +3 -3
  287. package/dist/chunks/{NcContent-RSHRX9Ei.mjs.map → NcContent-mCqWZXj_.mjs.map} +1 -1
  288. package/dist/chunks/{NcDashboardWidget-By1MRGQM.mjs → NcDashboardWidget-CrInkRLf.mjs} +5 -5
  289. package/dist/chunks/{NcDashboardWidget-By1MRGQM.mjs.map → NcDashboardWidget-CrInkRLf.mjs.map} +1 -1
  290. package/dist/chunks/{NcDashboardWidget-tPBonsAz.cjs → NcDashboardWidget-DkIJ5CtL.cjs} +5 -5
  291. package/dist/chunks/{NcDashboardWidget-tPBonsAz.cjs.map → NcDashboardWidget-DkIJ5CtL.cjs.map} +1 -1
  292. package/dist/chunks/{NcDashboardWidgetItem-Zb-33B99.cjs → NcDashboardWidgetItem-B9edccBC.cjs} +4 -4
  293. package/dist/chunks/{NcDashboardWidgetItem-Zb-33B99.cjs.map → NcDashboardWidgetItem-B9edccBC.cjs.map} +1 -1
  294. package/dist/chunks/{NcDashboardWidgetItem-D2CwvHeu.mjs → NcDashboardWidgetItem-DwvrP3Fa.mjs} +4 -4
  295. package/dist/chunks/{NcDashboardWidgetItem-D2CwvHeu.mjs.map → NcDashboardWidgetItem-DwvrP3Fa.mjs.map} +1 -1
  296. package/dist/chunks/{NcDialog-DDWiv6ap.mjs → NcDialog-Bu9xyU24.mjs} +2 -2
  297. package/dist/chunks/{NcDialog-DDWiv6ap.mjs.map → NcDialog-Bu9xyU24.mjs.map} +1 -1
  298. package/dist/chunks/{NcDialog-ChYi3mdd.cjs → NcDialog-ja5_vkY1.cjs} +2 -2
  299. package/dist/chunks/{NcDialog-ChYi3mdd.cjs.map → NcDialog-ja5_vkY1.cjs.map} +1 -1
  300. package/dist/chunks/{NcDialogButton-DljI3tNu.cjs → NcDialogButton-BKPo8qTj.cjs} +3 -3
  301. package/dist/chunks/{NcDialogButton-DljI3tNu.cjs.map → NcDialogButton-BKPo8qTj.cjs.map} +1 -1
  302. package/dist/chunks/{NcDialogButton-lR5aJG_-.mjs → NcDialogButton-DGBhiACK.mjs} +3 -3
  303. package/dist/chunks/{NcDialogButton-lR5aJG_-.mjs.map → NcDialogButton-DGBhiACK.mjs.map} +1 -1
  304. package/dist/chunks/{NcEmojiPicker-C0AfqJC9.cjs → NcEmojiPicker-Bm-B75F0.cjs} +7 -7
  305. package/dist/chunks/{NcEmojiPicker-C0AfqJC9.cjs.map → NcEmojiPicker-Bm-B75F0.cjs.map} +1 -1
  306. package/dist/chunks/{NcEmojiPicker-DclGvRU_.mjs → NcEmojiPicker-DOFfHZjX.mjs} +7 -7
  307. package/dist/chunks/{NcEmojiPicker-DclGvRU_.mjs.map → NcEmojiPicker-DOFfHZjX.mjs.map} +1 -1
  308. package/dist/chunks/{NcFormBox-DjrN-K4Q.cjs → NcFormBox-DRGVpFeZ.cjs} +7 -7
  309. package/dist/chunks/{NcFormBox-DjrN-K4Q.cjs.map → NcFormBox-DRGVpFeZ.cjs.map} +1 -1
  310. package/dist/chunks/{NcFormBox-C4wu4RJ_.mjs → NcFormBox-DtoCXLMx.mjs} +7 -7
  311. package/dist/chunks/{NcFormBox-C4wu4RJ_.mjs.map → NcFormBox-DtoCXLMx.mjs.map} +1 -1
  312. package/dist/chunks/{NcFormBoxButton-WatYqw6i.cjs → NcFormBoxButton-BO2bMnah.cjs} +6 -6
  313. package/dist/chunks/{NcFormBoxButton-WatYqw6i.cjs.map → NcFormBoxButton-BO2bMnah.cjs.map} +1 -1
  314. package/dist/chunks/{NcFormBoxButton-4xiKHRJH.mjs → NcFormBoxButton-BQi11xQX.mjs} +6 -6
  315. package/dist/chunks/{NcFormBoxButton-4xiKHRJH.mjs.map → NcFormBoxButton-BQi11xQX.mjs.map} +1 -1
  316. package/dist/chunks/{NcFormBoxCopyButton-VM720MPU.cjs → NcFormBoxCopyButton-DmFZ1t3a.cjs} +3 -3
  317. package/dist/chunks/{NcFormBoxCopyButton-VM720MPU.cjs.map → NcFormBoxCopyButton-DmFZ1t3a.cjs.map} +1 -1
  318. package/dist/chunks/{NcFormBoxCopyButton-AeYq9iKM.mjs → NcFormBoxCopyButton-DtJpZ971.mjs} +3 -3
  319. package/dist/chunks/{NcFormBoxCopyButton-AeYq9iKM.mjs.map → NcFormBoxCopyButton-DtJpZ971.mjs.map} +1 -1
  320. package/dist/chunks/{NcFormBoxItem-DJZrmlTP.mjs → NcFormBoxItem-Cu3gWo1q.mjs} +10 -10
  321. package/dist/chunks/{NcFormBoxItem-DJZrmlTP.mjs.map → NcFormBoxItem-Cu3gWo1q.mjs.map} +1 -1
  322. package/dist/chunks/{NcFormBoxItem-CK0Zakr1.cjs → NcFormBoxItem-y2AfRFCy.cjs} +10 -10
  323. package/dist/chunks/{NcFormBoxItem-CK0Zakr1.cjs.map → NcFormBoxItem-y2AfRFCy.cjs.map} +1 -1
  324. package/dist/chunks/{NcFormBoxSwitch-Dq5JvIem.mjs → NcFormBoxSwitch-E6sxPL4n.mjs} +6 -6
  325. package/dist/chunks/{NcFormBoxSwitch-Dq5JvIem.mjs.map → NcFormBoxSwitch-E6sxPL4n.mjs.map} +1 -1
  326. package/dist/chunks/{NcFormBoxSwitch-DGAjBKdo.cjs → NcFormBoxSwitch-OoIgFMb9.cjs} +6 -6
  327. package/dist/chunks/{NcFormBoxSwitch-DGAjBKdo.cjs.map → NcFormBoxSwitch-OoIgFMb9.cjs.map} +1 -1
  328. package/dist/chunks/{NcFormGroup-CBMl_9_J.cjs → NcFormGroup-AxkxubKD.cjs} +9 -9
  329. package/dist/chunks/{NcFormGroup-CBMl_9_J.cjs.map → NcFormGroup-AxkxubKD.cjs.map} +1 -1
  330. package/dist/chunks/{NcFormGroup-BfsPo9aC.mjs → NcFormGroup-DblLoFMf.mjs} +9 -9
  331. package/dist/chunks/{NcFormGroup-BfsPo9aC.mjs.map → NcFormGroup-DblLoFMf.mjs.map} +1 -1
  332. package/dist/chunks/{NcHotkey-COqzksbg.mjs → NcHotkey-Cv2Je6eF.mjs} +7 -7
  333. package/dist/chunks/{NcHotkey-COqzksbg.mjs.map → NcHotkey-Cv2Je6eF.mjs.map} +1 -1
  334. package/dist/chunks/{NcHotkey-B9IBly2F.cjs → NcHotkey-wTQuk8tk.cjs} +7 -7
  335. package/dist/chunks/{NcHotkey-B9IBly2F.cjs.map → NcHotkey-wTQuk8tk.cjs.map} +1 -1
  336. package/dist/chunks/{NcHotkeyList-D5QS6zXI.cjs → NcHotkeyList-CezOirdf.cjs} +6 -6
  337. package/dist/chunks/{NcHotkeyList-D5QS6zXI.cjs.map → NcHotkeyList-CezOirdf.cjs.map} +1 -1
  338. package/dist/chunks/{NcHotkeyList-D9tKXM-e.mjs → NcHotkeyList-CrAcIN70.mjs} +6 -6
  339. package/dist/chunks/{NcHotkeyList-D9tKXM-e.mjs.map → NcHotkeyList-CrAcIN70.mjs.map} +1 -1
  340. package/dist/chunks/{NcIconToggleSwitch-C2VDKTSP.mjs → NcIconToggleSwitch-0NTw7i-t.mjs} +4 -4
  341. package/dist/chunks/{NcIconToggleSwitch-C2VDKTSP.mjs.map → NcIconToggleSwitch-0NTw7i-t.mjs.map} +1 -1
  342. package/dist/chunks/{NcIconToggleSwitch-Cnov67_2.cjs → NcIconToggleSwitch-LTgdIBoC.cjs} +4 -4
  343. package/dist/chunks/{NcIconToggleSwitch-Cnov67_2.cjs.map → NcIconToggleSwitch-LTgdIBoC.cjs.map} +1 -1
  344. package/dist/chunks/{NcInputConfirmCancel-BAM7SUH2.cjs → NcInputConfirmCancel-CsJOuKAS.cjs} +2 -2
  345. package/dist/chunks/{NcInputConfirmCancel-BAM7SUH2.cjs.map → NcInputConfirmCancel-CsJOuKAS.cjs.map} +1 -1
  346. package/dist/chunks/{NcInputConfirmCancel-CrZiDaEw.mjs → NcInputConfirmCancel-D7e4BkoB.mjs} +2 -2
  347. package/dist/chunks/{NcInputConfirmCancel-CrZiDaEw.mjs.map → NcInputConfirmCancel-D7e4BkoB.mjs.map} +1 -1
  348. package/dist/chunks/{NcInputField-Dyvi0lw3.cjs → NcInputField-BNi4nRz_.cjs} +3 -3
  349. package/dist/chunks/{NcInputField-Dyvi0lw3.cjs.map → NcInputField-BNi4nRz_.cjs.map} +1 -1
  350. package/dist/chunks/{NcInputField-CZRuRX_c.mjs → NcInputField-DyXCCIOM.mjs} +3 -3
  351. package/dist/chunks/{NcInputField-CZRuRX_c.mjs.map → NcInputField-DyXCCIOM.mjs.map} +1 -1
  352. package/dist/chunks/{NcKbd-DiOuj-R9.cjs → NcKbd-BOezPDqA.cjs} +5 -5
  353. package/dist/chunks/{NcKbd-DiOuj-R9.cjs.map → NcKbd-BOezPDqA.cjs.map} +1 -1
  354. package/dist/chunks/{NcKbd-CapL6_v1.mjs → NcKbd-CUoUkqEz.mjs} +5 -5
  355. package/dist/chunks/{NcKbd-CapL6_v1.mjs.map → NcKbd-CUoUkqEz.mjs.map} +1 -1
  356. package/dist/chunks/{NcListItem-DO5dSzuL.cjs → NcListItem-BYJvJ8iU.cjs} +7 -4
  357. package/dist/chunks/NcListItem-BYJvJ8iU.cjs.map +1 -0
  358. package/dist/chunks/{NcListItem-BCsfLnyO.mjs → NcListItem-DzezqYDz.mjs} +7 -4
  359. package/dist/chunks/NcListItem-DzezqYDz.mjs.map +1 -0
  360. package/dist/chunks/{NcListItemIcon-D--9lMWR.mjs → NcListItemIcon-BKWOSFfG.mjs} +2 -2
  361. package/dist/chunks/{NcListItemIcon-D--9lMWR.mjs.map → NcListItemIcon-BKWOSFfG.mjs.map} +1 -1
  362. package/dist/chunks/{NcListItemIcon-DShtuUOU.cjs → NcListItemIcon-mfE2915t.cjs} +2 -2
  363. package/dist/chunks/{NcListItemIcon-DShtuUOU.cjs.map → NcListItemIcon-mfE2915t.cjs.map} +1 -1
  364. package/dist/chunks/{NcPasswordField-btocqVR7.cjs → NcPasswordField-DVXnb5JS.cjs} +4 -4
  365. package/dist/chunks/{NcPasswordField-btocqVR7.cjs.map → NcPasswordField-DVXnb5JS.cjs.map} +1 -1
  366. package/dist/chunks/{NcPasswordField-Df0X4U3c.mjs → NcPasswordField-Di_KXR_G.mjs} +4 -4
  367. package/dist/chunks/{NcPasswordField-Df0X4U3c.mjs.map → NcPasswordField-Di_KXR_G.mjs.map} +1 -1
  368. package/dist/chunks/{NcPopover-DmPH_emH.mjs → NcPopover-UAg26Qdd.mjs} +4 -4
  369. package/dist/chunks/{NcPopover-DmPH_emH.mjs.map → NcPopover-UAg26Qdd.mjs.map} +1 -1
  370. package/dist/chunks/{NcPopover-CD8IwZd2.cjs → NcPopover-Ujf9nIvN.cjs} +4 -4
  371. package/dist/chunks/{NcPopover-CD8IwZd2.cjs.map → NcPopover-Ujf9nIvN.cjs.map} +1 -1
  372. package/dist/chunks/{NcRadioGroup-C2Nibs7w.mjs → NcRadioGroup-BbBX9X2J.mjs} +6 -6
  373. package/dist/chunks/{NcRadioGroup-C2Nibs7w.mjs.map → NcRadioGroup-BbBX9X2J.mjs.map} +1 -1
  374. package/dist/chunks/{NcRadioGroup-zZIcG3FY.cjs → NcRadioGroup-CsPmwGlc.cjs} +6 -6
  375. package/dist/chunks/{NcRadioGroup-zZIcG3FY.cjs.map → NcRadioGroup-CsPmwGlc.cjs.map} +1 -1
  376. package/dist/chunks/{NcRadioGroupButton-C_T_e6DC.cjs → NcRadioGroupButton-6skMHhr7.cjs} +17 -10
  377. package/dist/chunks/NcRadioGroupButton-6skMHhr7.cjs.map +1 -0
  378. package/dist/chunks/{NcRadioGroupButton-Bzd7AZ5F.mjs → NcRadioGroupButton-BkxlxjIA.mjs} +17 -10
  379. package/dist/chunks/NcRadioGroupButton-BkxlxjIA.mjs.map +1 -0
  380. package/dist/chunks/{NcRelatedResourcesPanel-DDEAaN_S.cjs → NcRelatedResourcesPanel-BNyUdxZY.cjs} +4 -4
  381. package/dist/chunks/{NcRelatedResourcesPanel-DDEAaN_S.cjs.map → NcRelatedResourcesPanel-BNyUdxZY.cjs.map} +1 -1
  382. package/dist/chunks/{NcRelatedResourcesPanel-CZgZsBil.mjs → NcRelatedResourcesPanel-MmhCAbd4.mjs} +4 -4
  383. package/dist/chunks/{NcRelatedResourcesPanel-CZgZsBil.mjs.map → NcRelatedResourcesPanel-MmhCAbd4.mjs.map} +1 -1
  384. package/dist/chunks/{NcRichContenteditable-BitJ9Dpc.mjs → NcRichContenteditable-BDjKhFe3.mjs} +19 -19
  385. package/dist/chunks/{NcRichContenteditable-BitJ9Dpc.mjs.map → NcRichContenteditable-BDjKhFe3.mjs.map} +1 -1
  386. package/dist/chunks/{NcRichContenteditable-Y5XIH11o.cjs → NcRichContenteditable-C7lbE4KZ.cjs} +19 -19
  387. package/dist/chunks/{NcRichContenteditable-Y5XIH11o.cjs.map → NcRichContenteditable-C7lbE4KZ.cjs.map} +1 -1
  388. package/dist/chunks/{NcRichText-C-Sj_7GQ.cjs → NcRichText-C5whs7n-.cjs} +4 -4
  389. package/dist/chunks/{NcRichText-C-Sj_7GQ.cjs.map → NcRichText-C5whs7n-.cjs.map} +1 -1
  390. package/dist/chunks/{NcRichText-BoBTuJn0.mjs → NcRichText-DTzKWfUk.mjs} +4 -4
  391. package/dist/chunks/{NcRichText-BoBTuJn0.mjs.map → NcRichText-DTzKWfUk.mjs.map} +1 -1
  392. package/dist/chunks/{NcSelect-vNUKMdvr.mjs → NcSelect-BD9fhCVy.mjs} +5 -5
  393. package/dist/chunks/{NcSelect-vNUKMdvr.mjs.map → NcSelect-BD9fhCVy.mjs.map} +1 -1
  394. package/dist/chunks/{NcSelect-B04XrVzV.cjs → NcSelect-BDPuWrJ7.cjs} +5 -5
  395. package/dist/chunks/{NcSelect-B04XrVzV.cjs.map → NcSelect-BDPuWrJ7.cjs.map} +1 -1
  396. package/dist/chunks/{NcSelectTags-BHfgOy9u.mjs → NcSelectTags-AFttsKK_.mjs} +3 -3
  397. package/dist/chunks/{NcSelectTags-BHfgOy9u.mjs.map → NcSelectTags-AFttsKK_.mjs.map} +1 -1
  398. package/dist/chunks/{NcSelectTags-DeVGcDZr.cjs → NcSelectTags-BdCxmpQz.cjs} +3 -3
  399. package/dist/chunks/{NcSelectTags-DeVGcDZr.cjs.map → NcSelectTags-BdCxmpQz.cjs.map} +1 -1
  400. package/dist/chunks/{NcSelectUsers--GvJjma1.mjs → NcSelectUsers-BRDGLoPt.mjs} +10 -13
  401. package/dist/chunks/NcSelectUsers-BRDGLoPt.mjs.map +1 -0
  402. package/dist/chunks/{NcSelectUsers-BSi-wQFH.cjs → NcSelectUsers-Tl4BZ0R-.cjs} +9 -12
  403. package/dist/chunks/NcSelectUsers-Tl4BZ0R-.cjs.map +1 -0
  404. package/dist/chunks/{NcSettingsInputText-DRgdOe4X.mjs → NcSettingsInputText-BeLtzRuE.mjs} +3 -3
  405. package/dist/chunks/{NcSettingsInputText-DRgdOe4X.mjs.map → NcSettingsInputText-BeLtzRuE.mjs.map} +1 -1
  406. package/dist/chunks/{NcSettingsInputText-BmZijZoF.cjs → NcSettingsInputText-C4vnFBMY.cjs} +3 -3
  407. package/dist/chunks/{NcSettingsInputText-BmZijZoF.cjs.map → NcSettingsInputText-C4vnFBMY.cjs.map} +1 -1
  408. package/dist/chunks/{NcSettingsSection-Ck1k_G_E.cjs → NcSettingsSection-B26VKgIm.cjs} +2 -2
  409. package/dist/chunks/{NcSettingsSection-Ck1k_G_E.cjs.map → NcSettingsSection-B26VKgIm.cjs.map} +1 -1
  410. package/dist/chunks/{NcSettingsSection-10O9VU1F.mjs → NcSettingsSection-CCJrqjyc.mjs} +2 -2
  411. package/dist/chunks/{NcSettingsSection-10O9VU1F.mjs.map → NcSettingsSection-CCJrqjyc.mjs.map} +1 -1
  412. package/dist/chunks/{NcSettingsSelectGroup-Chz3fOJq.cjs → NcSettingsSelectGroup-BAbur3rR.cjs} +4 -4
  413. package/dist/chunks/{NcSettingsSelectGroup-Chz3fOJq.cjs.map → NcSettingsSelectGroup-BAbur3rR.cjs.map} +1 -1
  414. package/dist/chunks/{NcSettingsSelectGroup-Dqh2jQi_.mjs → NcSettingsSelectGroup-BqSdPsYY.mjs} +4 -4
  415. package/dist/chunks/{NcSettingsSelectGroup-Dqh2jQi_.mjs.map → NcSettingsSelectGroup-BqSdPsYY.mjs.map} +1 -1
  416. package/dist/chunks/{NcTextArea-Dd8ctlvG.cjs → NcTextArea-CdYBB93W.cjs} +2 -2
  417. package/dist/chunks/{NcTextArea-Dd8ctlvG.cjs.map → NcTextArea-CdYBB93W.cjs.map} +1 -1
  418. package/dist/chunks/{NcTextArea-CIgfjLRv.mjs → NcTextArea-DaYLP_Lc.mjs} +2 -2
  419. package/dist/chunks/{NcTextArea-CIgfjLRv.mjs.map → NcTextArea-DaYLP_Lc.mjs.map} +1 -1
  420. package/dist/chunks/{NcTextField-DiFoJmdM.cjs → NcTextField-BdfF5z6a.cjs} +5 -5
  421. package/dist/chunks/{NcTextField-DiFoJmdM.cjs.map → NcTextField-BdfF5z6a.cjs.map} +1 -1
  422. package/dist/chunks/{NcTextField-DyPJI6lW.mjs → NcTextField-DLlQozKA.mjs} +5 -5
  423. package/dist/chunks/{NcTextField-DyPJI6lW.mjs.map → NcTextField-DLlQozKA.mjs.map} +1 -1
  424. package/dist/chunks/NcTimezonePicker-B-o71qLO.cjs +68 -0
  425. package/dist/chunks/NcTimezonePicker-B-o71qLO.cjs.map +1 -0
  426. package/dist/chunks/NcTimezonePicker-DTdF1yG4.mjs +69 -0
  427. package/dist/chunks/NcTimezonePicker-DTdF1yG4.mjs.map +1 -0
  428. package/dist/chunks/{NcUserBubble-DT9YWw5v.mjs → NcUserBubble-CWgceS0Q.mjs} +3 -3
  429. package/dist/chunks/{NcUserBubble-DT9YWw5v.mjs.map → NcUserBubble-CWgceS0Q.mjs.map} +1 -1
  430. package/dist/chunks/{NcUserBubble-OTn2y2Qh.cjs → NcUserBubble-DBqYZmgY.cjs} +3 -3
  431. package/dist/chunks/{NcUserBubble-OTn2y2Qh.cjs.map → NcUserBubble-DBqYZmgY.cjs.map} +1 -1
  432. package/dist/chunks/{NcUserStatusIcon-BNyLZCP1.mjs → NcUserStatusIcon-BjrsTrss.mjs} +3 -3
  433. package/dist/chunks/{NcUserStatusIcon-BNyLZCP1.mjs.map → NcUserStatusIcon-BjrsTrss.mjs.map} +1 -1
  434. package/dist/chunks/{NcUserStatusIcon-CeS_I2cx.cjs → NcUserStatusIcon-CVgFNNxH.cjs} +3 -3
  435. package/dist/chunks/{NcUserStatusIcon-CeS_I2cx.cjs.map → NcUserStatusIcon-CVgFNNxH.cjs.map} +1 -1
  436. package/dist/chunks/{ScopeComponent-DzNYMeEs.mjs → ScopeComponent-DnsVyhxP.mjs} +2 -2
  437. package/dist/chunks/{ScopeComponent-DzNYMeEs.mjs.map → ScopeComponent-DnsVyhxP.mjs.map} +1 -1
  438. package/dist/chunks/{ScopeComponent-DIh9MG7S.cjs → ScopeComponent-Zty1tz_X.cjs} +2 -2
  439. package/dist/chunks/{ScopeComponent-DIh9MG7S.cjs.map → ScopeComponent-Zty1tz_X.cjs.map} +1 -1
  440. package/dist/chunks/{_l10n-IBFNlYqh.cjs → _l10n-Cd8G51Ar.cjs} +28 -30
  441. package/dist/chunks/{_l10n-IBFNlYqh.cjs.map → _l10n-Cd8G51Ar.cjs.map} +1 -1
  442. package/dist/chunks/{_l10n-BcrsamRV.mjs → _l10n-Dpecfv0B.mjs} +76 -78
  443. package/dist/chunks/_l10n-Dpecfv0B.mjs.map +1 -0
  444. package/dist/chunks/{appName-D8lIU8jk.cjs → appName-CgEzCWsS.cjs} +11 -5
  445. package/dist/chunks/appName-CgEzCWsS.cjs.map +1 -0
  446. package/dist/chunks/{appName-DA23ARcC.mjs → appName-qk1L3dsY.mjs} +11 -5
  447. package/dist/chunks/appName-qk1L3dsY.mjs.map +1 -0
  448. package/dist/chunks/{colors-DSOGBWbF.cjs → colors-Cvcv7NQc.cjs} +11 -31
  449. package/dist/chunks/colors-Cvcv7NQc.cjs.map +1 -0
  450. package/dist/chunks/{colors-DqvwWwoq.mjs → colors-DFNwuW2a.mjs} +11 -31
  451. package/dist/chunks/colors-DFNwuW2a.mjs.map +1 -0
  452. package/dist/chunks/{mdi-BLgCcHlv.cjs → mdi-DTiP6a6e.cjs} +9 -1
  453. package/dist/chunks/{mdi-BLgCcHlv.cjs.map → mdi-DTiP6a6e.cjs.map} +1 -1
  454. package/dist/chunks/{mdi-CNJ_YP0l.mjs → mdi-DkJglNiS.mjs} +17 -9
  455. package/dist/chunks/{mdi-CNJ_YP0l.mjs.map → mdi-DkJglNiS.mjs.map} +1 -1
  456. package/dist/chunks/{referencePickerModal-B8AfZsD_.mjs → referencePickerModal-BqYhlLYA.mjs} +7 -7
  457. package/dist/chunks/{referencePickerModal-B8AfZsD_.mjs.map → referencePickerModal-BqYhlLYA.mjs.map} +1 -1
  458. package/dist/chunks/{referencePickerModal-BfGuwv98.cjs → referencePickerModal-Cd3jRn0q.cjs} +7 -7
  459. package/dist/chunks/{referencePickerModal-BfGuwv98.cjs.map → referencePickerModal-Cd3jRn0q.cjs.map} +1 -1
  460. package/dist/chunks/{useCopy-BWnr0WjK.mjs → useCopy-CYjunv08.mjs} +3 -3
  461. package/dist/chunks/{useCopy-BWnr0WjK.mjs.map → useCopy-CYjunv08.mjs.map} +1 -1
  462. package/dist/chunks/{useCopy-B8YTkOhE.cjs → useCopy-Crn9gIC_.cjs} +3 -3
  463. package/dist/chunks/{useCopy-B8YTkOhE.cjs.map → useCopy-Crn9gIC_.cjs.map} +1 -1
  464. package/dist/components/NcSelectUsers/index.d.ts +6 -0
  465. package/dist/components/NcTimezonePicker/index.d.ts +6 -0
  466. package/dist/components/NcTimezonePicker/timezoneUtils.d.ts +8 -0
  467. package/dist/index.cjs +61 -61
  468. package/dist/index.mjs +62 -62
  469. package/dist/utils/appName.d.ts +6 -2
  470. package/package.json +11 -11
  471. package/dist/assets/NcActionCheckbox-C8I_k6NA.css +0 -80
  472. package/dist/assets/NcActionRadio-CLIRNp3t.css +0 -79
  473. package/dist/assets/NcSelectUsers-CfOSPgtz.css +0 -4
  474. package/dist/chunks/NcActionCheckbox-D9aQuEYw.mjs.map +0 -1
  475. package/dist/chunks/NcActionCheckbox-ixZtnZR4.cjs.map +0 -1
  476. package/dist/chunks/NcActionRadio-BmVR-lhZ.mjs.map +0 -1
  477. package/dist/chunks/NcActionRadio-DPF0_wH9.cjs.map +0 -1
  478. package/dist/chunks/NcAppContent-D-MzdCDi.mjs.map +0 -1
  479. package/dist/chunks/NcAppContent-cKOp687H.cjs.map +0 -1
  480. package/dist/chunks/NcAppSettingsShortcutsSection-B0WBkOo9.cjs.map +0 -1
  481. package/dist/chunks/NcAppSettingsShortcutsSection-DzjowBeE.mjs.map +0 -1
  482. package/dist/chunks/NcListItem-BCsfLnyO.mjs.map +0 -1
  483. package/dist/chunks/NcListItem-DO5dSzuL.cjs.map +0 -1
  484. package/dist/chunks/NcRadioGroupButton-Bzd7AZ5F.mjs.map +0 -1
  485. package/dist/chunks/NcRadioGroupButton-C_T_e6DC.cjs.map +0 -1
  486. package/dist/chunks/NcSelectUsers--GvJjma1.mjs.map +0 -1
  487. package/dist/chunks/NcSelectUsers-BSi-wQFH.cjs.map +0 -1
  488. package/dist/chunks/NcTimezonePicker-2dMBEhRN.cjs +0 -216
  489. package/dist/chunks/NcTimezonePicker-2dMBEhRN.cjs.map +0 -1
  490. package/dist/chunks/NcTimezonePicker-Cirerde6.mjs +0 -217
  491. package/dist/chunks/NcTimezonePicker-Cirerde6.mjs.map +0 -1
  492. package/dist/chunks/_l10n-BcrsamRV.mjs.map +0 -1
  493. package/dist/chunks/appName-D8lIU8jk.cjs.map +0 -1
  494. package/dist/chunks/appName-DA23ARcC.mjs.map +0 -1
  495. package/dist/chunks/colors-DSOGBWbF.cjs.map +0 -1
  496. package/dist/chunks/colors-DqvwWwoq.mjs.map +0 -1
@@ -5,9 +5,9 @@ import { generateOcsUrl } from "@nextcloud/router";
5
5
  import { useVModel } from "@vueuse/core";
6
6
  import debounce from "debounce";
7
7
  import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
8
- import { N as NcInputField } from "./NcInputField-CZRuRX_c.mjs";
8
+ import { N as NcInputField } from "./NcInputField-DyXCCIOM.mjs";
9
9
  import { u as useModelMigration } from "./useModelMigration-EhAWvqDD.mjs";
10
- import { r as register, F as t29, a as t } from "./_l10n-BcrsamRV.mjs";
10
+ import { r as register, E as t28, a as t } from "./_l10n-Dpecfv0B.mjs";
11
11
  import { l as logger } from "./logger-D3RVzcfQ.mjs";
12
12
  const _sfc_main$2 = {
13
13
  name: "EyeIcon",
@@ -75,7 +75,7 @@ var __component__$1 = /* @__PURE__ */ normalizeComponent(
75
75
  null
76
76
  );
77
77
  const IconEyeOff = __component__$1.exports;
78
- register(t29);
78
+ register(t28);
79
79
  const passwordPolicy = loadState("core", "capabilities", {}).password_policy || null;
80
80
  const NcInputFieldProps = new Set(Object.keys(NcInputField.props));
81
81
  const _sfc_main = {
@@ -305,4 +305,4 @@ const NcPasswordField = __component__.exports;
305
305
  export {
306
306
  NcPasswordField as N
307
307
  };
308
- //# sourceMappingURL=NcPasswordField-Df0X4U3c.mjs.map
308
+ //# sourceMappingURL=NcPasswordField-Di_KXR_G.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcPasswordField-Df0X4U3c.mjs","sources":["../../node_modules/vue-material-design-icons/Eye.vue","../../node_modules/vue-material-design-icons/EyeOff.vue","../../src/components/NcPasswordField/NcPasswordField.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-off-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeOffIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose password field component.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcPasswordField v-model=\"text1\"\n\t\t\tlabel=\"Old password\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">New password</label>\n\t\t\t<NcPasswordField id=\"textField\"\n\t\t\t\tv-model=\"text2\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\" />\n\t\t</div>\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField2\">New password</label>\n\t\t\t<NcPasswordField id=\"textField2\"\n\t\t\t\tv-model=\"text3\"\n\t\t\t\t:error=\"true\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\t\thelper-text=\"Password is insecure\" />\n\t\t</div>\n\n\t\t<NcPasswordField v-model=\"text4\"\n\t\t\tlabel=\"Good new password\"\n\t\t\t:success=\"true\"\n\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\thelper-text=\"Password is secure\" />\n\n\t\t<NcPasswordField v-model=\"text5\"\n\t\t\t:disabled=\"true\"\n\t\t\tlabel=\"Disabled\" />\n\n\t\t<NcPasswordField v-model=\"text6\"\n\t\t\tlabel=\"Secret token\"\n\t\t\tas-text />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: 'hunter',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t\ttext6: 'secret-token',\n\t\t}\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\tgap: 14px;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField\n\t\tv-bind=\"propsAndAttrsToForward\"\n\t\tref=\"inputField\"\n\t\t:type=\"visibility || asText ? 'text' : 'password'\"\n\t\t:trailing-button-label=\"trailingButtonLabelPassword\"\n\t\t:helper-text=\"computedHelperText\"\n\t\t:error=\"computedError\"\n\t\t:success=\"computedSuccess\"\n\t\t:minlength=\"rules.minlength\"\n\t\t:input-class=\"{ 'password-field__input--secure-text': !visibility && asText }\"\n\t\tv-on=\"$listeners\"\n\t\t@trailing-button-click=\"toggleVisibility\"\n\t\t@input=\"handleInput\">\n\t\t<template v-if=\"!!$scopedSlots.icon || !!$slots.default || !!$scopedSlots.default\" #icon>\n\t\t\t<!-- @slot Leading icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<!-- @slot Deprecated, removed in v9: use #icon slot instead. -->\n\t\t\t\t<slot />\n\t\t\t</slot>\n\t\t</template>\n\n\t\t<template #trailing-button-icon>\n\t\t\t<IconEyeOff v-if=\"visibility\" :size=\"18\" />\n\t\t\t<IconEye v-else :size=\"18\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { loadState } from '@nextcloud/initial-state'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { useVModel } from '@vueuse/core'\nimport debounce from 'debounce'\nimport IconEye from 'vue-material-design-icons/Eye.vue'\nimport IconEyeOff from 'vue-material-design-icons/EyeOff.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\nimport { useModelMigration } from '../../composables/useModelMigration.ts'\nimport { t } from '../../l10n.js'\nimport { logger } from '../../utils/logger.ts'\n\n/**\n * @typedef PasswordPolicy\n * @property {object} api - The URLs to the password_policy app methods\n * @property {string} api.generate - The URL to the password generator\n * @property {string} api.validate - The URL to the password validator\n * @property {boolean} enforceNonCommonPassword - Whether to enforce non common passwords\n * @property {boolean} enforceNumericCharacters - Whether to enforce numeric characters\n * @property {boolean} enforceSpecialCharacters - Whether to enforce special characters\n * @property {boolean} enforceUpperLowerCase - Whether to enforce upper and lower case\n * @property {number} minLength - The minimum length of the password\n */\n\n/** @type {PasswordPolicy|null} */\nconst passwordPolicy = loadState('core', 'capabilities', {}).password_policy || null\n\nconst NcInputFieldProps = new Set(Object.keys(NcInputField.props))\n\nexport default {\n\tname: 'NcPasswordField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tIconEye,\n\t\tIconEyeOff,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tmodel: {\n\t\tprop: 'modelValue',\n\t\tevent: 'update:modelValue',\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Any [NcInputField](#/Components/NcFields?id=ncinputfield) props\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\n\t\t// Reuse all the props from NcInputField for better typing and documentation\n\t\t...NcInputField.props,\n\n\t\t// Redefined props\n\n\t\t/**\n\t\t * Controls whether to display the trailing button.\n\t\t */\n\t\tshowTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Removed NcInputField props, defined only by this component\n\t\t */\n\t\ttrailingButtonLabel: undefined,\n\n\t\t// Custom props\n\n\t\t/**\n\t\t * Check if the user entered a valid password using the password_policy\n\t\t * app if available.\n\t\t *\n\t\t * Warning: this doesn't replace server side checking and will do nothing\n\t\t * if the password_policy app is disabled.\n\t\t */\n\t\tcheckPasswordStrength: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The minlength property defines the minimum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tminlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * The maxlength property defines the maximum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tmaxlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Render as input[type=text] that looks like password field.\n\t\t * Allows to avoid unwanted password-specific browser behavior,\n\t\t * such as save or generate password prompt.\n\t\t * Useful for secret token fields.\n\t\t * Note: autocomplete=\"off\" is ignored by browsers.\n\t\t */\n\t\tasText: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Visibility of the password.\n\t\t * If this is set to `true` then the password will be shown to the user (input type will be set to `text`).\n\t\t */\n\t\tvisible: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'valid',\n\t\t'invalid',\n\t\t/**\n\t\t * Removed in v9 - use `update:modelValue` (`v-model`) instead\n\t\t *\n\t\t * @deprecated\n\t\t */\n\t\t'update:value',\n\t\t/**\n\t\t * Triggers when the value inside the password field is\n\t\t * updated.\n\t\t *\n\t\t * @property {string} The new value\n\t\t */\n\t\t'update:modelValue',\n\t\t/** Same as update:modelValue for Vue 2 compatibility */\n\t\t'update:model-value',\n\t\t/**\n\t\t * Updated visibility of the password\n\t\t *\n\t\t * @property {boolean} visible the new visibility state\n\t\t */\n\t\t'update:visible',\n\t],\n\n\tsetup(props, { emit }) {\n\t\tconst model = useModelMigration('value', 'update:value')\n\t\tconst visibility = useVModel(props, 'visible', emit, { passive: true })\n\n\t\treturn {\n\t\t\tt,\n\n\t\t\tmodel,\n\t\t\tvisibility,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tinternalHelpMessage: '',\n\t\t\tisValid: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcomputedError() {\n\t\t\treturn this.error || this.isValid === false\n\t\t},\n\n\t\tcomputedSuccess() {\n\t\t\treturn this.success || this.isValid === true\n\t\t},\n\n\t\tcomputedHelperText() {\n\t\t\tif (this.helperText.length > 0) {\n\t\t\t\treturn this.helperText\n\t\t\t}\n\t\t\treturn this.internalHelpMessage\n\t\t},\n\n\t\trules() {\n\t\t\tconst { minlength } = this\n\t\t\treturn {\n\t\t\t\tminlength: minlength ?? (this.checkPasswordStrength ? passwordPolicy?.minLength : undefined),\n\t\t\t}\n\t\t},\n\n\t\ttrailingButtonLabelPassword() {\n\t\t\treturn this.visibility ? t('Hide password') : t('Show password')\n\t\t},\n\n\t\tpropsAndAttrsToForward() {\n\t\t\treturn {\n\t\t\t\t// Proxy all the HTML attributes\n\t\t\t\t...this.$attrs,\n\t\t\t\t// Proxy original NcInputField's props\n\t\t\t\t...Object.fromEntries(Object.entries(this.$props).filter(([key]) => NcInputFieldProps.has(key))),\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tmodel(newValue) {\n\t\t\tif (this.checkPasswordStrength) {\n\t\t\t\tif (passwordPolicy === null) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.checkPassword(newValue)\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.inputField.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.inputField.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\tthis.model = event.target.value\n\t\t},\n\n\t\ttoggleVisibility() {\n\t\t\tthis.visibility = !this.visibility\n\t\t},\n\n\t\tcheckPassword: debounce(async function(password) {\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.post(generateOcsUrl('apps/password_policy/api/v1/validate'), { password })\n\t\t\t\tthis.isValid = data.ocs.data.passed\n\t\t\t\tif (data.ocs.data.passed) {\n\t\t\t\t\tthis.internalHelpMessage = t('Password is secure')\n\t\t\t\t\t/**\n\t\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t\t * password entered is valid.\n\t\t\t\t\t */\n\t\t\t\t\tthis.$emit('valid')\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.internalHelpMessage = data.ocs.data.reason\n\t\t\t\t/**\n\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t * password entered is invalid.\n\t\t\t\t */\n\t\t\t\tthis.$emit('invalid')\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error('Password policy returned an error', e)\n\t\t\t}\n\t\t}, 500),\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n:deep(.password-field__input--secure-text) {\n\t// Emulate password field look\n\t// This is not a part of the standard but well supported\n\t-webkit-text-security: disc;\n}\n</style>\n"],"names":["_sfc_main"],"mappings":";;;;;;;;;;AAoBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;AChBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;ACwGA,MAAA,iBAAA,UAAA,QAAA,gBAAA,CAAA,CAAA,EAAA,mBAAA;AAEA,MAAA,oBAAA,IAAA,IAAA,OAAA,KAAA,aAAA,KAAA,CAAA;AAEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA;AAAA,EAGA,cAAA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,KAAA,CAAA;AAAA;AAAA,IAGA,GAAA,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AAA,KAAA,QAAA;AACA,eAAA,sBAAA,EAAA,oBAAA;AAKA,eAAA,MAAA,OAAA;AACA;AAAA,QACA;AAEA,aAAA,sBAAA,KAAA,IAAA,KAAA;AAKA,aAAA,MAAA,SAAA;AAAA,MACA,SAAA,GAAA;AACA,eAAA,MAAA,qCAAA,CAAA;AAAA,MACA;AAAA,IACA,GAAA,GAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"NcPasswordField-Di_KXR_G.mjs","sources":["../../node_modules/vue-material-design-icons/Eye.vue","../../node_modules/vue-material-design-icons/EyeOff.vue","../../src/components/NcPasswordField/NcPasswordField.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-off-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeOffIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose password field component.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcPasswordField v-model=\"text1\"\n\t\t\tlabel=\"Old password\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">New password</label>\n\t\t\t<NcPasswordField id=\"textField\"\n\t\t\t\tv-model=\"text2\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\" />\n\t\t</div>\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField2\">New password</label>\n\t\t\t<NcPasswordField id=\"textField2\"\n\t\t\t\tv-model=\"text3\"\n\t\t\t\t:error=\"true\"\n\t\t\t\t:label-outside=\"true\"\n\t\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\t\thelper-text=\"Password is insecure\" />\n\t\t</div>\n\n\t\t<NcPasswordField v-model=\"text4\"\n\t\t\tlabel=\"Good new password\"\n\t\t\t:success=\"true\"\n\t\t\tplaceholder=\"Min. 12 characters\"\n\t\t\thelper-text=\"Password is secure\" />\n\n\t\t<NcPasswordField v-model=\"text5\"\n\t\t\t:disabled=\"true\"\n\t\t\tlabel=\"Disabled\" />\n\n\t\t<NcPasswordField v-model=\"text6\"\n\t\t\tlabel=\"Secret token\"\n\t\t\tas-text />\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\ttext1: '',\n\t\t\ttext2: '',\n\t\t\ttext3: 'hunter',\n\t\t\ttext4: '',\n\t\t\ttext5: '',\n\t\t\ttext6: 'secret-token',\n\t\t}\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\tgap: 14px;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField\n\t\tv-bind=\"propsAndAttrsToForward\"\n\t\tref=\"inputField\"\n\t\t:type=\"visibility || asText ? 'text' : 'password'\"\n\t\t:trailing-button-label=\"trailingButtonLabelPassword\"\n\t\t:helper-text=\"computedHelperText\"\n\t\t:error=\"computedError\"\n\t\t:success=\"computedSuccess\"\n\t\t:minlength=\"rules.minlength\"\n\t\t:input-class=\"{ 'password-field__input--secure-text': !visibility && asText }\"\n\t\tv-on=\"$listeners\"\n\t\t@trailing-button-click=\"toggleVisibility\"\n\t\t@input=\"handleInput\">\n\t\t<template v-if=\"!!$scopedSlots.icon || !!$slots.default || !!$scopedSlots.default\" #icon>\n\t\t\t<!-- @slot Leading icon -->\n\t\t\t<slot name=\"icon\">\n\t\t\t\t<!-- @slot Deprecated, removed in v9: use #icon slot instead. -->\n\t\t\t\t<slot />\n\t\t\t</slot>\n\t\t</template>\n\n\t\t<template #trailing-button-icon>\n\t\t\t<IconEyeOff v-if=\"visibility\" :size=\"18\" />\n\t\t\t<IconEye v-else :size=\"18\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script>\nimport axios from '@nextcloud/axios'\nimport { loadState } from '@nextcloud/initial-state'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { useVModel } from '@vueuse/core'\nimport debounce from 'debounce'\nimport IconEye from 'vue-material-design-icons/Eye.vue'\nimport IconEyeOff from 'vue-material-design-icons/EyeOff.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\nimport { useModelMigration } from '../../composables/useModelMigration.ts'\nimport { t } from '../../l10n.js'\nimport { logger } from '../../utils/logger.ts'\n\n/**\n * @typedef PasswordPolicy\n * @property {object} api - The URLs to the password_policy app methods\n * @property {string} api.generate - The URL to the password generator\n * @property {string} api.validate - The URL to the password validator\n * @property {boolean} enforceNonCommonPassword - Whether to enforce non common passwords\n * @property {boolean} enforceNumericCharacters - Whether to enforce numeric characters\n * @property {boolean} enforceSpecialCharacters - Whether to enforce special characters\n * @property {boolean} enforceUpperLowerCase - Whether to enforce upper and lower case\n * @property {number} minLength - The minimum length of the password\n */\n\n/** @type {PasswordPolicy|null} */\nconst passwordPolicy = loadState('core', 'capabilities', {}).password_policy || null\n\nconst NcInputFieldProps = new Set(Object.keys(NcInputField.props))\n\nexport default {\n\tname: 'NcPasswordField',\n\n\tcomponents: {\n\t\tNcInputField,\n\t\tIconEye,\n\t\tIconEyeOff,\n\t},\n\n\t// Allow forwarding all attributes\n\tinheritAttrs: false,\n\n\tmodel: {\n\t\tprop: 'modelValue',\n\t\tevent: 'update:modelValue',\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Any [NcInputField](#/Components/NcFields?id=ncinputfield) props\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\t\t// eslint-disable-next-line\n\t\t' ': {},\n\n\t\t// Reuse all the props from NcInputField for better typing and documentation\n\t\t...NcInputField.props,\n\n\t\t// Redefined props\n\n\t\t/**\n\t\t * Controls whether to display the trailing button.\n\t\t */\n\t\tshowTrailingButton: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Removed NcInputField props, defined only by this component\n\t\t */\n\t\ttrailingButtonLabel: undefined,\n\n\t\t// Custom props\n\n\t\t/**\n\t\t * Check if the user entered a valid password using the password_policy\n\t\t * app if available.\n\t\t *\n\t\t * Warning: this doesn't replace server side checking and will do nothing\n\t\t * if the password_policy app is disabled.\n\t\t */\n\t\tcheckPasswordStrength: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The minlength property defines the minimum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tminlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * The maxlength property defines the maximum number of characters\n\t\t * (as UTF-16 code units) the user can enter\n\t\t */\n\t\tmaxlength: {\n\t\t\ttype: Number,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Render as input[type=text] that looks like password field.\n\t\t * Allows to avoid unwanted password-specific browser behavior,\n\t\t * such as save or generate password prompt.\n\t\t * Useful for secret token fields.\n\t\t * Note: autocomplete=\"off\" is ignored by browsers.\n\t\t */\n\t\tasText: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Visibility of the password.\n\t\t * If this is set to `true` then the password will be shown to the user (input type will be set to `text`).\n\t\t */\n\t\tvisible: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'valid',\n\t\t'invalid',\n\t\t/**\n\t\t * Removed in v9 - use `update:modelValue` (`v-model`) instead\n\t\t *\n\t\t * @deprecated\n\t\t */\n\t\t'update:value',\n\t\t/**\n\t\t * Triggers when the value inside the password field is\n\t\t * updated.\n\t\t *\n\t\t * @property {string} The new value\n\t\t */\n\t\t'update:modelValue',\n\t\t/** Same as update:modelValue for Vue 2 compatibility */\n\t\t'update:model-value',\n\t\t/**\n\t\t * Updated visibility of the password\n\t\t *\n\t\t * @property {boolean} visible the new visibility state\n\t\t */\n\t\t'update:visible',\n\t],\n\n\tsetup(props, { emit }) {\n\t\tconst model = useModelMigration('value', 'update:value')\n\t\tconst visibility = useVModel(props, 'visible', emit, { passive: true })\n\n\t\treturn {\n\t\t\tt,\n\n\t\t\tmodel,\n\t\t\tvisibility,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tinternalHelpMessage: '',\n\t\t\tisValid: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tcomputedError() {\n\t\t\treturn this.error || this.isValid === false\n\t\t},\n\n\t\tcomputedSuccess() {\n\t\t\treturn this.success || this.isValid === true\n\t\t},\n\n\t\tcomputedHelperText() {\n\t\t\tif (this.helperText.length > 0) {\n\t\t\t\treturn this.helperText\n\t\t\t}\n\t\t\treturn this.internalHelpMessage\n\t\t},\n\n\t\trules() {\n\t\t\tconst { minlength } = this\n\t\t\treturn {\n\t\t\t\tminlength: minlength ?? (this.checkPasswordStrength ? passwordPolicy?.minLength : undefined),\n\t\t\t}\n\t\t},\n\n\t\ttrailingButtonLabelPassword() {\n\t\t\treturn this.visibility ? t('Hide password') : t('Show password')\n\t\t},\n\n\t\tpropsAndAttrsToForward() {\n\t\t\treturn {\n\t\t\t\t// Proxy all the HTML attributes\n\t\t\t\t...this.$attrs,\n\t\t\t\t// Proxy original NcInputField's props\n\t\t\t\t...Object.fromEntries(Object.entries(this.$props).filter(([key]) => NcInputFieldProps.has(key))),\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tmodel(newValue) {\n\t\t\tif (this.checkPasswordStrength) {\n\t\t\t\tif (passwordPolicy === null) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tthis.checkPassword(newValue)\n\t\t\t}\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Focus the input element\n\t\t *\n\t\t * @public\n\t\t */\n\t\tfocus() {\n\t\t\tthis.$refs.inputField.focus()\n\t\t},\n\n\t\t/**\n\t\t * Select all the text in the input\n\t\t *\n\t\t * @public\n\t\t */\n\t\tselect() {\n\t\t\tthis.$refs.inputField.select()\n\t\t},\n\n\t\thandleInput(event) {\n\t\t\tthis.model = event.target.value\n\t\t},\n\n\t\ttoggleVisibility() {\n\t\t\tthis.visibility = !this.visibility\n\t\t},\n\n\t\tcheckPassword: debounce(async function(password) {\n\t\t\ttry {\n\t\t\t\tconst { data } = await axios.post(generateOcsUrl('apps/password_policy/api/v1/validate'), { password })\n\t\t\t\tthis.isValid = data.ocs.data.passed\n\t\t\t\tif (data.ocs.data.passed) {\n\t\t\t\t\tthis.internalHelpMessage = t('Password is secure')\n\t\t\t\t\t/**\n\t\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t\t * password entered is valid.\n\t\t\t\t\t */\n\t\t\t\t\tthis.$emit('valid')\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tthis.internalHelpMessage = data.ocs.data.reason\n\t\t\t\t/**\n\t\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t\t * password entered is invalid.\n\t\t\t\t */\n\t\t\t\tthis.$emit('invalid')\n\t\t\t} catch (e) {\n\t\t\t\tlogger.error('Password policy returned an error', e)\n\t\t\t}\n\t\t}, 500),\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n:deep(.password-field__input--secure-text) {\n\t// Emulate password field look\n\t// This is not a part of the standard but well supported\n\t-webkit-text-security: disc;\n}\n</style>\n"],"names":["_sfc_main"],"mappings":";;;;;;;;;;AAoBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;AChBA,MAAAA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA,CAAA,OAAA;AAAA,EACA,OAAA;AAAA,IACA,OAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,IACA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,IACA,MAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;ACwGA,MAAA,iBAAA,UAAA,QAAA,gBAAA,CAAA,CAAA,EAAA,mBAAA;AAEA,MAAA,oBAAA,IAAA,IAAA,OAAA,KAAA,aAAA,KAAA,CAAA;AAEA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACA;AAAA;AAAA,EAGA,cAAA;AAAA,EAEA,OAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,KAAA,CAAA;AAAA;AAAA,IAGA,GAAA,aAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,oBAAA;AAAA,MACA,MAAA;AAAA;AAAA,MAEA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,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aAAA,MAAA,SAAA;AAAA,MACA,SAAA,GAAA;AACA,eAAA,MAAA,qCAAA,CAAA;AAAA,MACA;AAAA,IACA,GAAA,GAAA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1]}
@@ -1,4 +1,4 @@
1
- import '../assets/NcPopover--XoXIhLx.css';
1
+ import '../assets/NcPopover-CJgeCuwk.css';
2
2
  import { options, Dropdown } from "floating-vue";
3
3
  import { createFocusTrap } from "focus-trap";
4
4
  import { tabbable } from "tabbable";
@@ -55,9 +55,9 @@ var __component__$1 = /* @__PURE__ */ normalizeComponent(
55
55
  null
56
56
  );
57
57
  const NcPopoverTriggerProvider = __component__$1.exports;
58
- const ncPopover = "_ncPopover_hdy45_20";
58
+ const ncPopover = "_ncPopover_k--Q7";
59
59
  const style0 = {
60
- "material-design-icon": "_material-design-icon_hdy45_12",
60
+ "material-design-icon": "_material-design-icon_WzKjA",
61
61
  ncPopover
62
62
  };
63
63
  const THEME = "nc-popover-8";
@@ -320,4 +320,4 @@ const NcPopover = __component__.exports;
320
320
  export {
321
321
  NcPopover as N
322
322
  };
323
- //# sourceMappingURL=NcPopover-DmPH_emH.mjs.map
323
+ //# sourceMappingURL=NcPopover-UAg26Qdd.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcPopover-DmPH_emH.mjs","sources":["../../src/components/NcPopover/NcPopoverTriggerProvider.vue","../../src/components/NcPopover/NcPopover.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script>\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n\tname: 'NcPopoverTriggerProvider',\n\n\tprovide() {\n\t\treturn {\n\t\t\t'NcPopover:trigger:shown': () => this.shown,\n\t\t\t'NcPopover:trigger:attrs': () => this.triggerAttrs,\n\t\t}\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Is the popover currently shown\n\t\t */\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * ARIA Role of the popup\n\t\t */\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\ttriggerAttrs() {\n\t\t\treturn {\n\t\t\t\t'aria-haspopup': this.popupRole,\n\t\t\t\t'aria-expanded': this.shown.toString(),\n\t\t\t}\n\t\t},\n\t},\n\n\trender() {\n\t\t// TODO: Vue 3 - replace with $slots\n\t\treturn this.$scopedSlots.default?.({\n\t\t\tattrs: this.triggerAttrs,\n\t\t})\n\t},\n})\n</script>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis component is just a wrapper for the floating-vue plugin by Akryum,\nplease refer to this documentation for customization:\nhttps://github.com/Akryum/floating-vue\n\nThis components has two slots:\n* 'trigger' which can be any html element and it will trigger the popover\nthis slot is optional since you can toggle the popover also by updating the\nopen prop on this component;\n\n* a default slot that is for the content of the popover.\n\n### Examples\n\n#### With a `<NcButton>` as a trigger:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\t<form tabindex=\"0\" role=\"dialog\" aria-labelledby=\"popover-example-dialog-header-1\" @submit.prevent>\n\t\t\t\t\t<h2 id=\"popover-example-dialog-header-1\">this is some content</h2>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. <br/>\n\t\t\t\t\t\tVestibulum eget placerat velit.\n\t\t\t\t\t</p>\n\t\t\t\t\t<label>\n\t\t\t\t\t\tLabel element\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"input element\"/>\n\t\t\t\t\t</label>\n\t\t\t\t</form>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Without focus trap:\n\nThe [`focus-trap`](https://github.com/focus-trap/focus-trap) emits an error when used in a non-focusable element tree.\n\nThe prop `:focus-trap=\"false\"` help to prevent it when the default behavior is not relevant.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover :focus-trap=\"false\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Click me!</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\tHi! 🚀\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With passing props to `floating-vue`'s `Dropdown`:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover container=\"body\" :popper-hide-triggers=\"(triggers) => [...triggers, 'click']\" popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template #default>\n\t\t\t\t<NcButton>Click on the button will close NcPopover</NcButton>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With a custom button in as a trigger:\n\nWhen `<NcButton>` is used as a `<NcPopover>` trigger, it injects required for a11y attributes to the button.\n\nIf you are using your own custom button as a trigger make sure to bind `attrs` from the trigger slot props.\nSee code example below.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover>\n\t\t\t<!-- Take \"attrs\" from the slot props -->\n\t\t\t<template #trigger=\"{ attrs }\">\n\t\t\t\t<!-- Bind attrs as the button attrs -->\n\t\t\t\t<button v-bind=\"attrs\">\n\t\t\t\t\tI am a custom button in the trigger\n\t\t\t\t</button>\n\t\t\t</template>\n\n\t\t\tHi! 🚀\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Provide role for the popover content\n\nFor accessibility reasons, popover should have a role. Provide it to the `popup-role` and make sure that the popover content is an element with the same role.\n\nSee: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<!-- Provide popup role -->\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Delete</NcButton>\n\t\t\t</template>\n\n\t\t\t<!-- Popover content should has the same role -->\n\t\t\t<div role=\"dialog\" aria-labelledby=\"popover-example-custom-role-1\" aria-modal=\"true\">\n\t\t\t\t<!-- This is not required but better to provide a label -->\n\t\t\t\t<header id=\"popover-example-custom-role-1\">\n\t\t\t\t\t<strong>Confirm remove</strong>\n\t\t\t\t</header>\n\t\t\t\t<NcButton type=\"danger\">Delete</NcButton>\n\t\t\t</div>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n</docs>\n\n<template>\n\t<Dropdown\n\t\tref=\"popover\"\n\t\t:distance=\"10\"\n\t\t:arrow-padding=\"10\"\n\t\tv-bind=\"$attrs\"\n\t\t:no-auto-focus=\"true /* Handled by the focus trap */\"\n\t\t:popper-class=\"[$style.ncPopover, popoverBaseClass]\"\n\t\t:theme=\"THEME\"\n\t\t:shown=\"internalShown\"\n\t\tv-on=\"$listeners\"\n\t\t@update:shown=\"internalShown = $event\"\n\t\t@apply-show=\"afterShow\"\n\t\t@apply-hide=\"afterHide\">\n\t\t<NcPopoverTriggerProvider v-slot=\"slotProps\" :shown=\"internalShown\" :popup-role=\"popupRole\">\n\t\t\t<!-- This will be the popover target (for the events and position) -->\n\t\t\t<slot name=\"trigger\" v-bind=\"slotProps\" />\n\t\t</NcPopoverTriggerProvider>\n\n\t\t<!-- This will be the content of the popover -->\n\t\t<template #popper=\"slotProps\">\n\t\t\t<slot name=\"default\" v-bind=\"slotProps\" />\n\t\t</template>\n\t</Dropdown>\n</template>\n\n<script>\nimport { Dropdown, options } from 'floating-vue'\nimport { createFocusTrap } from 'focus-trap'\nimport { tabbable } from 'tabbable'\nimport Vue from 'vue'\nimport NcPopoverTriggerProvider from './NcPopoverTriggerProvider.vue'\nimport { getTrapStack } from '../../utils/focusTrap.ts'\nimport { logger } from '../../utils/logger.ts'\n\nconst THEME = 'nc-popover-8'\n\n// NcPopover has a custom theme to have a custom name but same as the default \"dropdown\" theme\noptions.themes[THEME] = structuredClone(options.themes.dropdown)\n\n/**\n * @typedef {import('focus-trap').FocusTargetValueOrFalse} FocusTargetValueOrFalse\n * @typedef {FocusTargetValueOrFalse|() => FocusTargetValueOrFalse} SetReturnFocus\n */\n\nexport default {\n\tname: 'NcPopover',\n\n\tcomponents: {\n\t\tDropdown,\n\t\tNcPopoverTriggerProvider,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Show or hide the popper\n\t\t *\n\t\t * @see https://floating-vue.starpad.dev/api/#shown\n\t\t */\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Popup role\n\t\t *\n\t\t * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#values\n\t\t */\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t\tvalidator: (value) => ['menu', 'listbox', 'tree', 'grid', 'dialog', 'true'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * Class to be applied to the popover base\n\t\t */\n\t\tpopoverBaseClass: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Enable popover focus trap\n\t\t *\n\t\t * @deprecated use noFocusTrap instead\n\t\t */\n\t\tfocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Disable the popover focus trap.\n\t\t */\n\t\tnoFocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Set element to return focus to after focus trap deactivation\n\t\t *\n\t\t * @type {SetReturnFocus}\n\t\t */\n\t\tsetReturnFocus: {\n\t\t\tdefault: undefined,\n\t\t\ttype: [Boolean, HTMLElement, SVGElement, String, Function],\n\t\t},\n\n\t\t/**\n\t\t * When there is no setReturnFocus, NcPopover will try to return focus to the trigger button.\n\t\t * Use this prop to disable this behavior.\n\t\t */\n\t\tnoAutoReturnFocus: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'after-show',\n\t\t'after-hide',\n\t\t/**\n\t\t * @see https://floating-vue.starpad.dev/api/#update-shown\n\t\t */\n\t\t'update:shown',\n\t],\n\n\tsetup() {\n\t\treturn {\n\t\t\tTHEME,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tinternalShown: this.shown,\n\t\t}\n\t},\n\n\twatch: {\n\t\tshown(value) {\n\t\t\tthis.internalShown = value\n\t\t\tif (this.internalShown) {\n\t\t\t\tthis.checkTriggerA11y()\n\t\t\t}\n\t\t},\n\n\t\tinternalShown(value) {\n\t\t\tthis.$emit('update:shown', value)\n\t\t},\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.clearFocusTrap()\n\t\tthis.clearEscapeStopPropagation()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Check if the trigger has all required a11y attributes.\n\t\t * Important to check custom trigger button.\n\t\t */\n\t\tcheckTriggerA11y() {\n\t\t\tif (window.OC?.debug) {\n\t\t\t\tconst triggerButton = this.getPopoverTriggerButtonElement()\n\t\t\t\tif (!triggerButton || !triggerButton.hasAttributes('aria-expanded', 'aria-haspopup')) {\n\t\t\t\t\tVue.util.warn('It looks like you are using a custom button as a <NcPopover> or other popover #trigger. If you are not using <NcButton> as a trigger, you need to bind attrs from the #trigger slot props to your custom button. See <NcPopover> docs for an example.')\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Remove incorrect aria-describedby attribute from the trigger.\n\t\t *\n\t\t * @see https://github.com/Akryum/floating-vue/blob/8d4f7125aae0e3ea00ba4093d6d2001ab15058f1/packages/floating-vue/src/components/Popper.ts#L734\n\t\t */\n\t\tremoveFloatingVueAriaDescribedBy() {\n\t\t\t// When the popover is shown, floating-vue mutates the root elements of the trigger adding data-popper-shown and incorrect aria-describedby attributes.\n\t\t\tconst triggerContainer = this.getPopoverTriggerElement()\n\t\t\tconst triggerElements = triggerContainer.querySelectorAll('[data-popper-shown]')\n\t\t\tfor (const el of triggerElements) {\n\t\t\t\tel.removeAttribute('aria-describedby')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverContentElement() {\n\t\t\treturn this.$refs.popover?.$refs.popperContent?.$el\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverTriggerElement() {\n\t\t\t// TODO: Vue 3: should be\n\t\t\t// this.$refs.popover.$refs.popper.$refs.reference\n\t\t\treturn this.$refs.popover.$refs.reference\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverTriggerButtonElement() {\n\t\t\tconst triggerContainer = this.getPopoverTriggerElement()\n\t\t\treturn triggerContainer && tabbable(triggerContainer)[0]\n\t\t},\n\n\t\t/**\n\t\t * Add focus trap for accessibility.\n\t\t */\n\t\tasync useFocusTrap() {\n\t\t\tawait this.$nextTick()\n\n\t\t\tif (this.noFocusTrap || !this.focusTrap) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel.tabIndex = -1\n\n\t\t\tif (!el) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Init focus trap\n\t\t\tthis.$focusTrap = createFocusTrap(el, {\n\t\t\t\t// Prevents to lose focus using esc key\n\t\t\t\t// Focus will be release when popover be hide\n\t\t\t\tescapeDeactivates: false,\n\t\t\t\tallowOutsideClick: true,\n\t\t\t\tsetReturnFocus: this.setReturnFocus || (!this.noAutoReturnFocus && this.getPopoverTriggerButtonElement()),\n\t\t\t\ttrapStack: getTrapStack(),\n\t\t\t\tfallBackFocus: el,\n\t\t\t})\n\t\t\tthis.$focusTrap.activate()\n\t\t},\n\n\t\t/**\n\t\t * Remove focus trap\n\t\t *\n\t\t * @param {object} options The configuration options for focusTrap\n\t\t */\n\t\tclearFocusTrap(options = {}) {\n\t\t\ttry {\n\t\t\t\tthis.$focusTrap?.deactivate(options)\n\t\t\t\tthis.$focusTrap = null\n\t\t\t} catch (error) {\n\t\t\t\tlogger.warn('Could not clear focus trap', { error })\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Add stopPropagation for Escape.\n\t\t * It prevents global Escape handling after closing popover.\n\t\t *\n\t\t * Manual event handling is used here instead of v-on because there is no direct access to the node.\n\t\t * Alternative - wrap <template #popover> in a div wrapper.\n\t\t */\n\t\taddEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.addEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * Remove stop Escape handler\n\t\t */\n\t\tclearEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.removeEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * @param {KeyboardEvent} event - native keydown event\n\t\t */\n\t\tstopKeydownEscapeHandler(event) {\n\t\t\tif (event.type === 'keydown' && event.key === 'Escape') {\n\t\t\t\tevent.stopPropagation()\n\t\t\t}\n\t\t},\n\n\t\tasync afterShow() {\n\t\t\tthis.getPopoverContentElement().addEventListener('transitionend', () => {\n\t\t\t\t/**\n\t\t\t\t * Triggered after the tooltip was visually displayed.\n\t\t\t\t *\n\t\t\t\t * This is different from the 'show' and 'apply-show' which\n\t\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t\t */\n\t\t\t\tthis.$emit('after-show')\n\t\t\t}, { once: true, passive: true })\n\n\t\t\tthis.removeFloatingVueAriaDescribedBy()\n\n\t\t\tawait this.$nextTick()\n\t\t\tawait this.useFocusTrap()\n\t\t\tthis.addEscapeStopPropagation()\n\t\t},\n\n\t\tafterHide() {\n\t\t\tthis.getPopoverContentElement().addEventListener('transitionend', () => {\n\t\t\t\t/**\n\t\t\t\t * Triggered after the tooltip was visually hidden.\n\t\t\t\t *\n\t\t\t\t * This is different from the 'hide' and 'apply-hide' which\n\t\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t\t */\n\t\t\t\tthis.$emit('after-hide')\n\t\t\t}, { once: true, passive: true })\n\n\t\t\tthis.clearFocusTrap()\n\t\t\tthis.clearEscapeStopPropagation()\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" module>\n$arrow-width: 10px;\n// Move the arrow just slightly inside the popover\n// To prevent a visual gap on page scaling\n$arrow-position: $arrow-width - 1px;\n\n// Class is built by floating-vue as \"v-popper--theme-{THEME}\"\n.ncPopover:global(.v-popper--theme-nc-popover-8) {\n\t// Size class comes from the floating-vue library we use\n\t:global(.resize-observer) {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\tleft: 0;\n\t\tz-index: -1;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder: none;\n\t\tbackground-color: transparent;\n\t\tpointer-events: none;\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t\topacity: 0;\n\n\t\tobject {\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tleft: 0;\n\t\t\theight: 100%;\n\t\t\twidth: 100%;\n\t\t\toverflow: hidden;\n\t\t\tpointer-events: none;\n\t\t\tz-index: -1;\n\t\t}\n\t}\n\n\t&:global(.v-popper__popper) {\n\t\tz-index: 100000;\n\t\ttop: 0;\n\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\tleft: 0;\n\t\tdisplay: block !important;\n\n\t\t:global(.v-popper__wrapper) {\n\t\t\t/*\n\t\t\t * In theory, \"filter: drop-shadow\" would look better here with arrow shadow.\n\t\t\t * In fact, in results in a blurry popover in Chromium on scaling.\n\t\t\t * The hypothesis is that \"filter\" creates a new composition layer,\n\t\t\t * and with GPU acceleration requires the previous layers content to be rasterized.\n\t\t\t * In combination with translate3d from floating-vue, it makes Chromium to first render and rasterize the popover\n\t\t\t * and then apply scaling, which results in a blurry popover.\n\t\t\t */\n\t\t\tbox-shadow: 0 1px 10px var(--color-box-shadow);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t}\n\n\t\t:global(.v-popper__inner) {\n\t\t\tpadding: 0;\n\t\t\tcolor: var(--color-main-text);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t\toverflow: hidden;\n\t\t\tbackground: var(--color-main-background);\n\t\t}\n\n\t\t:global(.v-popper__arrow-container) {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t\tborder-color: transparent;\n\t\t\tborder-width: $arrow-width;\n\t\t}\n\n\t\t&[data-popper-placement^='top'] :global(.v-popper__arrow-container) {\n\t\t\tbottom: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-bottom-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-top-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='bottom'] :global(.v-popper__arrow-container) {\n\t\t\ttop: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-top-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-bottom-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='right'] :global(.v-popper__arrow-container) {\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tleft: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-left-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-right-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='left'] :global(.v-popper__arrow-container) {\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tright: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-right-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-left-color: var(--color-main-background);\n\t\t}\n\n\t\t&[aria-hidden='true'] {\n\t\t\tvisibility: hidden;\n\t\t\ttransition: opacity var(--animation-quick), visibility var(--animation-quick);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t&[aria-hidden='false'] {\n\t\t\tvisibility: visible;\n\t\t\ttransition: opacity var(--animation-quick);\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","options"],"mappings":";;;;;;;AAQA,MAAAA,cAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,UAAA;AACA,WAAA;AAAA,MACA,2BAAA,MAAA,KAAA;AAAA,MACA,2BAAA,MAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,eAAA;AACA,aAAA;AAAA,QACA,iBAAA,KAAA;AAAA,QACA,iBAAA,KAAA,MAAA,SAAA;AAAA,MACA;AAAA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,MAAA,SAAA,KAAA,CAAA;AAEA,WAAA,eAAA;AACA,WAAA,2BAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcPopover-UAg26Qdd.mjs","sources":["../../src/components/NcPopover/NcPopoverTriggerProvider.vue","../../src/components/NcPopover/NcPopover.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script>\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n\tname: 'NcPopoverTriggerProvider',\n\n\tprovide() {\n\t\treturn {\n\t\t\t'NcPopover:trigger:shown': () => this.shown,\n\t\t\t'NcPopover:trigger:attrs': () => this.triggerAttrs,\n\t\t}\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Is the popover currently shown\n\t\t */\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * ARIA Role of the popup\n\t\t */\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\ttriggerAttrs() {\n\t\t\treturn {\n\t\t\t\t'aria-haspopup': this.popupRole,\n\t\t\t\t'aria-expanded': this.shown.toString(),\n\t\t\t}\n\t\t},\n\t},\n\n\trender() {\n\t\t// TODO: Vue 3 - replace with $slots\n\t\treturn this.$scopedSlots.default?.({\n\t\t\tattrs: this.triggerAttrs,\n\t\t})\n\t},\n})\n</script>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis component is just a wrapper for the floating-vue plugin by Akryum,\nplease refer to this documentation for customization:\nhttps://github.com/Akryum/floating-vue\n\nThis components has two slots:\n* 'trigger' which can be any html element and it will trigger the popover\nthis slot is optional since you can toggle the popover also by updating the\nopen prop on this component;\n\n* a default slot that is for the content of the popover.\n\n### Examples\n\n#### With a `<NcButton>` as a trigger:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\t<form tabindex=\"0\" role=\"dialog\" aria-labelledby=\"popover-example-dialog-header-1\" @submit.prevent>\n\t\t\t\t\t<h2 id=\"popover-example-dialog-header-1\">this is some content</h2>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. <br/>\n\t\t\t\t\t\tVestibulum eget placerat velit.\n\t\t\t\t\t</p>\n\t\t\t\t\t<label>\n\t\t\t\t\t\tLabel element\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"input element\"/>\n\t\t\t\t\t</label>\n\t\t\t\t</form>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Without focus trap:\n\nThe [`focus-trap`](https://github.com/focus-trap/focus-trap) emits an error when used in a non-focusable element tree.\n\nThe prop `:focus-trap=\"false\"` help to prevent it when the default behavior is not relevant.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover :focus-trap=\"false\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Click me!</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\tHi! 🚀\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With passing props to `floating-vue`'s `Dropdown`:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover container=\"body\" :popper-hide-triggers=\"(triggers) => [...triggers, 'click']\" popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template #default>\n\t\t\t\t<NcButton>Click on the button will close NcPopover</NcButton>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With a custom button in as a trigger:\n\nWhen `<NcButton>` is used as a `<NcPopover>` trigger, it injects required for a11y attributes to the button.\n\nIf you are using your own custom button as a trigger make sure to bind `attrs` from the trigger slot props.\nSee code example below.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover>\n\t\t\t<!-- Take \"attrs\" from the slot props -->\n\t\t\t<template #trigger=\"{ attrs }\">\n\t\t\t\t<!-- Bind attrs as the button attrs -->\n\t\t\t\t<button v-bind=\"attrs\">\n\t\t\t\t\tI am a custom button in the trigger\n\t\t\t\t</button>\n\t\t\t</template>\n\n\t\t\tHi! 🚀\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Provide role for the popover content\n\nFor accessibility reasons, popover should have a role. Provide it to the `popup-role` and make sure that the popover content is an element with the same role.\n\nSee: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<!-- Provide popup role -->\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Delete</NcButton>\n\t\t\t</template>\n\n\t\t\t<!-- Popover content should has the same role -->\n\t\t\t<div role=\"dialog\" aria-labelledby=\"popover-example-custom-role-1\" aria-modal=\"true\">\n\t\t\t\t<!-- This is not required but better to provide a label -->\n\t\t\t\t<header id=\"popover-example-custom-role-1\">\n\t\t\t\t\t<strong>Confirm remove</strong>\n\t\t\t\t</header>\n\t\t\t\t<NcButton type=\"danger\">Delete</NcButton>\n\t\t\t</div>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n</docs>\n\n<template>\n\t<Dropdown\n\t\tref=\"popover\"\n\t\t:distance=\"10\"\n\t\t:arrow-padding=\"10\"\n\t\tv-bind=\"$attrs\"\n\t\t:no-auto-focus=\"true /* Handled by the focus trap */\"\n\t\t:popper-class=\"[$style.ncPopover, popoverBaseClass]\"\n\t\t:theme=\"THEME\"\n\t\t:shown=\"internalShown\"\n\t\tv-on=\"$listeners\"\n\t\t@update:shown=\"internalShown = $event\"\n\t\t@apply-show=\"afterShow\"\n\t\t@apply-hide=\"afterHide\">\n\t\t<NcPopoverTriggerProvider v-slot=\"slotProps\" :shown=\"internalShown\" :popup-role=\"popupRole\">\n\t\t\t<!-- This will be the popover target (for the events and position) -->\n\t\t\t<slot name=\"trigger\" v-bind=\"slotProps\" />\n\t\t</NcPopoverTriggerProvider>\n\n\t\t<!-- This will be the content of the popover -->\n\t\t<template #popper=\"slotProps\">\n\t\t\t<slot name=\"default\" v-bind=\"slotProps\" />\n\t\t</template>\n\t</Dropdown>\n</template>\n\n<script>\nimport { Dropdown, options } from 'floating-vue'\nimport { createFocusTrap } from 'focus-trap'\nimport { tabbable } from 'tabbable'\nimport Vue from 'vue'\nimport NcPopoverTriggerProvider from './NcPopoverTriggerProvider.vue'\nimport { getTrapStack } from '../../utils/focusTrap.ts'\nimport { logger } from '../../utils/logger.ts'\n\nconst THEME = 'nc-popover-8'\n\n// NcPopover has a custom theme to have a custom name but same as the default \"dropdown\" theme\noptions.themes[THEME] = structuredClone(options.themes.dropdown)\n\n/**\n * @typedef {import('focus-trap').FocusTargetValueOrFalse} FocusTargetValueOrFalse\n * @typedef {FocusTargetValueOrFalse|() => FocusTargetValueOrFalse} SetReturnFocus\n */\n\nexport default {\n\tname: 'NcPopover',\n\n\tcomponents: {\n\t\tDropdown,\n\t\tNcPopoverTriggerProvider,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Show or hide the popper\n\t\t *\n\t\t * @see https://floating-vue.starpad.dev/api/#shown\n\t\t */\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Popup role\n\t\t *\n\t\t * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#values\n\t\t */\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t\tvalidator: (value) => ['menu', 'listbox', 'tree', 'grid', 'dialog', 'true'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * Class to be applied to the popover base\n\t\t */\n\t\tpopoverBaseClass: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Enable popover focus trap\n\t\t *\n\t\t * @deprecated use noFocusTrap instead\n\t\t */\n\t\tfocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Disable the popover focus trap.\n\t\t */\n\t\tnoFocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Set element to return focus to after focus trap deactivation\n\t\t *\n\t\t * @type {SetReturnFocus}\n\t\t */\n\t\tsetReturnFocus: {\n\t\t\tdefault: undefined,\n\t\t\ttype: [Boolean, HTMLElement, SVGElement, String, Function],\n\t\t},\n\n\t\t/**\n\t\t * When there is no setReturnFocus, NcPopover will try to return focus to the trigger button.\n\t\t * Use this prop to disable this behavior.\n\t\t */\n\t\tnoAutoReturnFocus: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'after-show',\n\t\t'after-hide',\n\t\t/**\n\t\t * @see https://floating-vue.starpad.dev/api/#update-shown\n\t\t */\n\t\t'update:shown',\n\t],\n\n\tsetup() {\n\t\treturn {\n\t\t\tTHEME,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tinternalShown: this.shown,\n\t\t}\n\t},\n\n\twatch: {\n\t\tshown(value) {\n\t\t\tthis.internalShown = value\n\t\t\tif (this.internalShown) {\n\t\t\t\tthis.checkTriggerA11y()\n\t\t\t}\n\t\t},\n\n\t\tinternalShown(value) {\n\t\t\tthis.$emit('update:shown', value)\n\t\t},\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.clearFocusTrap()\n\t\tthis.clearEscapeStopPropagation()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Check if the trigger has all required a11y attributes.\n\t\t * Important to check custom trigger button.\n\t\t */\n\t\tcheckTriggerA11y() {\n\t\t\tif (window.OC?.debug) {\n\t\t\t\tconst triggerButton = this.getPopoverTriggerButtonElement()\n\t\t\t\tif (!triggerButton || !triggerButton.hasAttributes('aria-expanded', 'aria-haspopup')) {\n\t\t\t\t\tVue.util.warn('It looks like you are using a custom button as a <NcPopover> or other popover #trigger. If you are not using <NcButton> as a trigger, you need to bind attrs from the #trigger slot props to your custom button. See <NcPopover> docs for an example.')\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Remove incorrect aria-describedby attribute from the trigger.\n\t\t *\n\t\t * @see https://github.com/Akryum/floating-vue/blob/8d4f7125aae0e3ea00ba4093d6d2001ab15058f1/packages/floating-vue/src/components/Popper.ts#L734\n\t\t */\n\t\tremoveFloatingVueAriaDescribedBy() {\n\t\t\t// When the popover is shown, floating-vue mutates the root elements of the trigger adding data-popper-shown and incorrect aria-describedby attributes.\n\t\t\tconst triggerContainer = this.getPopoverTriggerElement()\n\t\t\tconst triggerElements = triggerContainer.querySelectorAll('[data-popper-shown]')\n\t\t\tfor (const el of triggerElements) {\n\t\t\t\tel.removeAttribute('aria-describedby')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverContentElement() {\n\t\t\treturn this.$refs.popover?.$refs.popperContent?.$el\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverTriggerElement() {\n\t\t\t// TODO: Vue 3: should be\n\t\t\t// this.$refs.popover.$refs.popper.$refs.reference\n\t\t\treturn this.$refs.popover.$refs.reference\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverTriggerButtonElement() {\n\t\t\tconst triggerContainer = this.getPopoverTriggerElement()\n\t\t\treturn triggerContainer && tabbable(triggerContainer)[0]\n\t\t},\n\n\t\t/**\n\t\t * Add focus trap for accessibility.\n\t\t */\n\t\tasync useFocusTrap() {\n\t\t\tawait this.$nextTick()\n\n\t\t\tif (this.noFocusTrap || !this.focusTrap) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel.tabIndex = -1\n\n\t\t\tif (!el) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Init focus trap\n\t\t\tthis.$focusTrap = createFocusTrap(el, {\n\t\t\t\t// Prevents to lose focus using esc key\n\t\t\t\t// Focus will be release when popover be hide\n\t\t\t\tescapeDeactivates: false,\n\t\t\t\tallowOutsideClick: true,\n\t\t\t\tsetReturnFocus: this.setReturnFocus || (!this.noAutoReturnFocus && this.getPopoverTriggerButtonElement()),\n\t\t\t\ttrapStack: getTrapStack(),\n\t\t\t\tfallBackFocus: el,\n\t\t\t})\n\t\t\tthis.$focusTrap.activate()\n\t\t},\n\n\t\t/**\n\t\t * Remove focus trap\n\t\t *\n\t\t * @param {object} options The configuration options for focusTrap\n\t\t */\n\t\tclearFocusTrap(options = {}) {\n\t\t\ttry {\n\t\t\t\tthis.$focusTrap?.deactivate(options)\n\t\t\t\tthis.$focusTrap = null\n\t\t\t} catch (error) {\n\t\t\t\tlogger.warn('Could not clear focus trap', { error })\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Add stopPropagation for Escape.\n\t\t * It prevents global Escape handling after closing popover.\n\t\t *\n\t\t * Manual event handling is used here instead of v-on because there is no direct access to the node.\n\t\t * Alternative - wrap <template #popover> in a div wrapper.\n\t\t */\n\t\taddEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.addEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * Remove stop Escape handler\n\t\t */\n\t\tclearEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.removeEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * @param {KeyboardEvent} event - native keydown event\n\t\t */\n\t\tstopKeydownEscapeHandler(event) {\n\t\t\tif (event.type === 'keydown' && event.key === 'Escape') {\n\t\t\t\tevent.stopPropagation()\n\t\t\t}\n\t\t},\n\n\t\tasync afterShow() {\n\t\t\tthis.getPopoverContentElement().addEventListener('transitionend', () => {\n\t\t\t\t/**\n\t\t\t\t * Triggered after the tooltip was visually displayed.\n\t\t\t\t *\n\t\t\t\t * This is different from the 'show' and 'apply-show' which\n\t\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t\t */\n\t\t\t\tthis.$emit('after-show')\n\t\t\t}, { once: true, passive: true })\n\n\t\t\tthis.removeFloatingVueAriaDescribedBy()\n\n\t\t\tawait this.$nextTick()\n\t\t\tawait this.useFocusTrap()\n\t\t\tthis.addEscapeStopPropagation()\n\t\t},\n\n\t\tafterHide() {\n\t\t\tthis.getPopoverContentElement().addEventListener('transitionend', () => {\n\t\t\t\t/**\n\t\t\t\t * Triggered after the tooltip was visually hidden.\n\t\t\t\t *\n\t\t\t\t * This is different from the 'hide' and 'apply-hide' which\n\t\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t\t */\n\t\t\t\tthis.$emit('after-hide')\n\t\t\t}, { once: true, passive: true })\n\n\t\t\tthis.clearFocusTrap()\n\t\t\tthis.clearEscapeStopPropagation()\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" module>\n$arrow-width: 10px;\n// Move the arrow just slightly inside the popover\n// To prevent a visual gap on page scaling\n$arrow-position: $arrow-width - 1px;\n\n// Class is built by floating-vue as \"v-popper--theme-{THEME}\"\n.ncPopover:global(.v-popper--theme-nc-popover-8) {\n\t// Size class comes from the floating-vue library we use\n\t:global(.resize-observer) {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\tleft: 0;\n\t\tz-index: -1;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder: none;\n\t\tbackground-color: transparent;\n\t\tpointer-events: none;\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t\topacity: 0;\n\n\t\tobject {\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tleft: 0;\n\t\t\theight: 100%;\n\t\t\twidth: 100%;\n\t\t\toverflow: hidden;\n\t\t\tpointer-events: none;\n\t\t\tz-index: -1;\n\t\t}\n\t}\n\n\t&:global(.v-popper__popper) {\n\t\tz-index: 100000;\n\t\ttop: 0;\n\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\tleft: 0;\n\t\tdisplay: block !important;\n\n\t\t:global(.v-popper__wrapper) {\n\t\t\t/*\n\t\t\t * In theory, \"filter: drop-shadow\" would look better here with arrow shadow.\n\t\t\t * In fact, in results in a blurry popover in Chromium on scaling.\n\t\t\t * The hypothesis is that \"filter\" creates a new composition layer,\n\t\t\t * and with GPU acceleration requires the previous layers content to be rasterized.\n\t\t\t * In combination with translate3d from floating-vue, it makes Chromium to first render and rasterize the popover\n\t\t\t * and then apply scaling, which results in a blurry popover.\n\t\t\t */\n\t\t\tbox-shadow: 0 1px 10px var(--color-box-shadow);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t}\n\n\t\t:global(.v-popper__inner) {\n\t\t\tpadding: 0;\n\t\t\tcolor: var(--color-main-text);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t\toverflow: hidden;\n\t\t\tbackground: var(--color-main-background);\n\t\t}\n\n\t\t:global(.v-popper__arrow-container) {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t\tborder-color: transparent;\n\t\t\tborder-width: $arrow-width;\n\t\t}\n\n\t\t&[data-popper-placement^='top'] :global(.v-popper__arrow-container) {\n\t\t\tbottom: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-bottom-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-top-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='bottom'] :global(.v-popper__arrow-container) {\n\t\t\ttop: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-top-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-bottom-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='right'] :global(.v-popper__arrow-container) {\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tleft: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-left-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-right-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='left'] :global(.v-popper__arrow-container) {\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tright: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-right-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-left-color: var(--color-main-background);\n\t\t}\n\n\t\t&[aria-hidden='true'] {\n\t\t\tvisibility: hidden;\n\t\t\ttransition: opacity var(--animation-quick), visibility var(--animation-quick);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t&[aria-hidden='false'] {\n\t\t\tvisibility: visible;\n\t\t\ttrans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ACA,YAAA,KAAA,KAAA,yBAAA;AACA,UAAA,oBAAA,WAAA,KAAA,wBAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,yBAAA,OAAA;AACA,UAAA,MAAA,SAAA,aAAA,MAAA,QAAA,UAAA;AACA,cAAA,gBAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,MAAA,YAAA;AACA,WAAA,yBAAA,EAAA,iBAAA,iBAAA,MAAA;AAQA,aAAA,MAAA,YAAA;AAAA,MACA,GAAA,EAAA,MAAA,MAAA,SAAA,KAAA,CAAA;AAEA,WAAA,iCAAA;AAEA,YAAA,KAAA,UAAA;AACA,YAAA,KAAA,aAAA;AACA,WAAA,yBAAA;AAAA,IACA;AAAA,IAEA,YAAA;AACA,WAAA,yBAAA,EAAA,iBAAA,iBAAA,MAAA;AAQA,aAAA,MAAA,YAAA;AAAA,MACA,GAAA,EAAA,MAAA,MAAA,SAAA,KAAA,CAAA;AAEA,WAAA,eAAA;AACA,WAAA,2BAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- require('../assets/NcPopover--XoXIhLx.css');
1
+ require('../assets/NcPopover-CJgeCuwk.css');
2
2
  "use strict";
3
3
  const floatingVue = require("floating-vue");
4
4
  const focusTrap = require("focus-trap");
@@ -58,9 +58,9 @@ var __component__$1 = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
58
58
  null
59
59
  );
60
60
  const NcPopoverTriggerProvider = __component__$1.exports;
61
- const ncPopover = "_ncPopover_hdy45_20";
61
+ const ncPopover = "_ncPopover_k--Q7";
62
62
  const style0 = {
63
- "material-design-icon": "_material-design-icon_hdy45_12",
63
+ "material-design-icon": "_material-design-icon_WzKjA",
64
64
  ncPopover
65
65
  };
66
66
  const THEME = "nc-popover-8";
@@ -321,4 +321,4 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
321
321
  );
322
322
  const NcPopover = __component__.exports;
323
323
  exports.NcPopover = NcPopover;
324
- //# sourceMappingURL=NcPopover-CD8IwZd2.cjs.map
324
+ //# sourceMappingURL=NcPopover-Ujf9nIvN.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcPopover-CD8IwZd2.cjs","sources":["../../src/components/NcPopover/NcPopoverTriggerProvider.vue","../../src/components/NcPopover/NcPopover.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script>\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n\tname: 'NcPopoverTriggerProvider',\n\n\tprovide() {\n\t\treturn {\n\t\t\t'NcPopover:trigger:shown': () => this.shown,\n\t\t\t'NcPopover:trigger:attrs': () => this.triggerAttrs,\n\t\t}\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Is the popover currently shown\n\t\t */\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * ARIA Role of the popup\n\t\t */\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\ttriggerAttrs() {\n\t\t\treturn {\n\t\t\t\t'aria-haspopup': this.popupRole,\n\t\t\t\t'aria-expanded': this.shown.toString(),\n\t\t\t}\n\t\t},\n\t},\n\n\trender() {\n\t\t// TODO: Vue 3 - replace with $slots\n\t\treturn this.$scopedSlots.default?.({\n\t\t\tattrs: this.triggerAttrs,\n\t\t})\n\t},\n})\n</script>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis component is just a wrapper for the floating-vue plugin by Akryum,\nplease refer to this documentation for customization:\nhttps://github.com/Akryum/floating-vue\n\nThis components has two slots:\n* 'trigger' which can be any html element and it will trigger the popover\nthis slot is optional since you can toggle the popover also by updating the\nopen prop on this component;\n\n* a default slot that is for the content of the popover.\n\n### Examples\n\n#### With a `<NcButton>` as a trigger:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\t<form tabindex=\"0\" role=\"dialog\" aria-labelledby=\"popover-example-dialog-header-1\" @submit.prevent>\n\t\t\t\t\t<h2 id=\"popover-example-dialog-header-1\">this is some content</h2>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. <br/>\n\t\t\t\t\t\tVestibulum eget placerat velit.\n\t\t\t\t\t</p>\n\t\t\t\t\t<label>\n\t\t\t\t\t\tLabel element\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"input element\"/>\n\t\t\t\t\t</label>\n\t\t\t\t</form>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Without focus trap:\n\nThe [`focus-trap`](https://github.com/focus-trap/focus-trap) emits an error when used in a non-focusable element tree.\n\nThe prop `:focus-trap=\"false\"` help to prevent it when the default behavior is not relevant.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover :focus-trap=\"false\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Click me!</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\tHi! 🚀\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With passing props to `floating-vue`'s `Dropdown`:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover container=\"body\" :popper-hide-triggers=\"(triggers) => [...triggers, 'click']\" popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template #default>\n\t\t\t\t<NcButton>Click on the button will close NcPopover</NcButton>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With a custom button in as a trigger:\n\nWhen `<NcButton>` is used as a `<NcPopover>` trigger, it injects required for a11y attributes to the button.\n\nIf you are using your own custom button as a trigger make sure to bind `attrs` from the trigger slot props.\nSee code example below.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover>\n\t\t\t<!-- Take \"attrs\" from the slot props -->\n\t\t\t<template #trigger=\"{ attrs }\">\n\t\t\t\t<!-- Bind attrs as the button attrs -->\n\t\t\t\t<button v-bind=\"attrs\">\n\t\t\t\t\tI am a custom button in the trigger\n\t\t\t\t</button>\n\t\t\t</template>\n\n\t\t\tHi! 🚀\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Provide role for the popover content\n\nFor accessibility reasons, popover should have a role. Provide it to the `popup-role` and make sure that the popover content is an element with the same role.\n\nSee: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<!-- Provide popup role -->\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Delete</NcButton>\n\t\t\t</template>\n\n\t\t\t<!-- Popover content should has the same role -->\n\t\t\t<div role=\"dialog\" aria-labelledby=\"popover-example-custom-role-1\" aria-modal=\"true\">\n\t\t\t\t<!-- This is not required but better to provide a label -->\n\t\t\t\t<header id=\"popover-example-custom-role-1\">\n\t\t\t\t\t<strong>Confirm remove</strong>\n\t\t\t\t</header>\n\t\t\t\t<NcButton type=\"danger\">Delete</NcButton>\n\t\t\t</div>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n</docs>\n\n<template>\n\t<Dropdown\n\t\tref=\"popover\"\n\t\t:distance=\"10\"\n\t\t:arrow-padding=\"10\"\n\t\tv-bind=\"$attrs\"\n\t\t:no-auto-focus=\"true /* Handled by the focus trap */\"\n\t\t:popper-class=\"[$style.ncPopover, popoverBaseClass]\"\n\t\t:theme=\"THEME\"\n\t\t:shown=\"internalShown\"\n\t\tv-on=\"$listeners\"\n\t\t@update:shown=\"internalShown = $event\"\n\t\t@apply-show=\"afterShow\"\n\t\t@apply-hide=\"afterHide\">\n\t\t<NcPopoverTriggerProvider v-slot=\"slotProps\" :shown=\"internalShown\" :popup-role=\"popupRole\">\n\t\t\t<!-- This will be the popover target (for the events and position) -->\n\t\t\t<slot name=\"trigger\" v-bind=\"slotProps\" />\n\t\t</NcPopoverTriggerProvider>\n\n\t\t<!-- This will be the content of the popover -->\n\t\t<template #popper=\"slotProps\">\n\t\t\t<slot name=\"default\" v-bind=\"slotProps\" />\n\t\t</template>\n\t</Dropdown>\n</template>\n\n<script>\nimport { Dropdown, options } from 'floating-vue'\nimport { createFocusTrap } from 'focus-trap'\nimport { tabbable } from 'tabbable'\nimport Vue from 'vue'\nimport NcPopoverTriggerProvider from './NcPopoverTriggerProvider.vue'\nimport { getTrapStack } from '../../utils/focusTrap.ts'\nimport { logger } from '../../utils/logger.ts'\n\nconst THEME = 'nc-popover-8'\n\n// NcPopover has a custom theme to have a custom name but same as the default \"dropdown\" theme\noptions.themes[THEME] = structuredClone(options.themes.dropdown)\n\n/**\n * @typedef {import('focus-trap').FocusTargetValueOrFalse} FocusTargetValueOrFalse\n * @typedef {FocusTargetValueOrFalse|() => FocusTargetValueOrFalse} SetReturnFocus\n */\n\nexport default {\n\tname: 'NcPopover',\n\n\tcomponents: {\n\t\tDropdown,\n\t\tNcPopoverTriggerProvider,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Show or hide the popper\n\t\t *\n\t\t * @see https://floating-vue.starpad.dev/api/#shown\n\t\t */\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Popup role\n\t\t *\n\t\t * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#values\n\t\t */\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t\tvalidator: (value) => ['menu', 'listbox', 'tree', 'grid', 'dialog', 'true'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * Class to be applied to the popover base\n\t\t */\n\t\tpopoverBaseClass: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Enable popover focus trap\n\t\t *\n\t\t * @deprecated use noFocusTrap instead\n\t\t */\n\t\tfocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Disable the popover focus trap.\n\t\t */\n\t\tnoFocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Set element to return focus to after focus trap deactivation\n\t\t *\n\t\t * @type {SetReturnFocus}\n\t\t */\n\t\tsetReturnFocus: {\n\t\t\tdefault: undefined,\n\t\t\ttype: [Boolean, HTMLElement, SVGElement, String, Function],\n\t\t},\n\n\t\t/**\n\t\t * When there is no setReturnFocus, NcPopover will try to return focus to the trigger button.\n\t\t * Use this prop to disable this behavior.\n\t\t */\n\t\tnoAutoReturnFocus: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'after-show',\n\t\t'after-hide',\n\t\t/**\n\t\t * @see https://floating-vue.starpad.dev/api/#update-shown\n\t\t */\n\t\t'update:shown',\n\t],\n\n\tsetup() {\n\t\treturn {\n\t\t\tTHEME,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tinternalShown: this.shown,\n\t\t}\n\t},\n\n\twatch: {\n\t\tshown(value) {\n\t\t\tthis.internalShown = value\n\t\t\tif (this.internalShown) {\n\t\t\t\tthis.checkTriggerA11y()\n\t\t\t}\n\t\t},\n\n\t\tinternalShown(value) {\n\t\t\tthis.$emit('update:shown', value)\n\t\t},\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.clearFocusTrap()\n\t\tthis.clearEscapeStopPropagation()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Check if the trigger has all required a11y attributes.\n\t\t * Important to check custom trigger button.\n\t\t */\n\t\tcheckTriggerA11y() {\n\t\t\tif (window.OC?.debug) {\n\t\t\t\tconst triggerButton = this.getPopoverTriggerButtonElement()\n\t\t\t\tif (!triggerButton || !triggerButton.hasAttributes('aria-expanded', 'aria-haspopup')) {\n\t\t\t\t\tVue.util.warn('It looks like you are using a custom button as a <NcPopover> or other popover #trigger. If you are not using <NcButton> as a trigger, you need to bind attrs from the #trigger slot props to your custom button. See <NcPopover> docs for an example.')\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Remove incorrect aria-describedby attribute from the trigger.\n\t\t *\n\t\t * @see https://github.com/Akryum/floating-vue/blob/8d4f7125aae0e3ea00ba4093d6d2001ab15058f1/packages/floating-vue/src/components/Popper.ts#L734\n\t\t */\n\t\tremoveFloatingVueAriaDescribedBy() {\n\t\t\t// When the popover is shown, floating-vue mutates the root elements of the trigger adding data-popper-shown and incorrect aria-describedby attributes.\n\t\t\tconst triggerContainer = this.getPopoverTriggerElement()\n\t\t\tconst triggerElements = triggerContainer.querySelectorAll('[data-popper-shown]')\n\t\t\tfor (const el of triggerElements) {\n\t\t\t\tel.removeAttribute('aria-describedby')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverContentElement() {\n\t\t\treturn this.$refs.popover?.$refs.popperContent?.$el\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverTriggerElement() {\n\t\t\t// TODO: Vue 3: should be\n\t\t\t// this.$refs.popover.$refs.popper.$refs.reference\n\t\t\treturn this.$refs.popover.$refs.reference\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverTriggerButtonElement() {\n\t\t\tconst triggerContainer = this.getPopoverTriggerElement()\n\t\t\treturn triggerContainer && tabbable(triggerContainer)[0]\n\t\t},\n\n\t\t/**\n\t\t * Add focus trap for accessibility.\n\t\t */\n\t\tasync useFocusTrap() {\n\t\t\tawait this.$nextTick()\n\n\t\t\tif (this.noFocusTrap || !this.focusTrap) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel.tabIndex = -1\n\n\t\t\tif (!el) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Init focus trap\n\t\t\tthis.$focusTrap = createFocusTrap(el, {\n\t\t\t\t// Prevents to lose focus using esc key\n\t\t\t\t// Focus will be release when popover be hide\n\t\t\t\tescapeDeactivates: false,\n\t\t\t\tallowOutsideClick: true,\n\t\t\t\tsetReturnFocus: this.setReturnFocus || (!this.noAutoReturnFocus && this.getPopoverTriggerButtonElement()),\n\t\t\t\ttrapStack: getTrapStack(),\n\t\t\t\tfallBackFocus: el,\n\t\t\t})\n\t\t\tthis.$focusTrap.activate()\n\t\t},\n\n\t\t/**\n\t\t * Remove focus trap\n\t\t *\n\t\t * @param {object} options The configuration options for focusTrap\n\t\t */\n\t\tclearFocusTrap(options = {}) {\n\t\t\ttry {\n\t\t\t\tthis.$focusTrap?.deactivate(options)\n\t\t\t\tthis.$focusTrap = null\n\t\t\t} catch (error) {\n\t\t\t\tlogger.warn('Could not clear focus trap', { error })\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Add stopPropagation for Escape.\n\t\t * It prevents global Escape handling after closing popover.\n\t\t *\n\t\t * Manual event handling is used here instead of v-on because there is no direct access to the node.\n\t\t * Alternative - wrap <template #popover> in a div wrapper.\n\t\t */\n\t\taddEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.addEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * Remove stop Escape handler\n\t\t */\n\t\tclearEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.removeEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * @param {KeyboardEvent} event - native keydown event\n\t\t */\n\t\tstopKeydownEscapeHandler(event) {\n\t\t\tif (event.type === 'keydown' && event.key === 'Escape') {\n\t\t\t\tevent.stopPropagation()\n\t\t\t}\n\t\t},\n\n\t\tasync afterShow() {\n\t\t\tthis.getPopoverContentElement().addEventListener('transitionend', () => {\n\t\t\t\t/**\n\t\t\t\t * Triggered after the tooltip was visually displayed.\n\t\t\t\t *\n\t\t\t\t * This is different from the 'show' and 'apply-show' which\n\t\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t\t */\n\t\t\t\tthis.$emit('after-show')\n\t\t\t}, { once: true, passive: true })\n\n\t\t\tthis.removeFloatingVueAriaDescribedBy()\n\n\t\t\tawait this.$nextTick()\n\t\t\tawait this.useFocusTrap()\n\t\t\tthis.addEscapeStopPropagation()\n\t\t},\n\n\t\tafterHide() {\n\t\t\tthis.getPopoverContentElement().addEventListener('transitionend', () => {\n\t\t\t\t/**\n\t\t\t\t * Triggered after the tooltip was visually hidden.\n\t\t\t\t *\n\t\t\t\t * This is different from the 'hide' and 'apply-hide' which\n\t\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t\t */\n\t\t\t\tthis.$emit('after-hide')\n\t\t\t}, { once: true, passive: true })\n\n\t\t\tthis.clearFocusTrap()\n\t\t\tthis.clearEscapeStopPropagation()\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" module>\n$arrow-width: 10px;\n// Move the arrow just slightly inside the popover\n// To prevent a visual gap on page scaling\n$arrow-position: $arrow-width - 1px;\n\n// Class is built by floating-vue as \"v-popper--theme-{THEME}\"\n.ncPopover:global(.v-popper--theme-nc-popover-8) {\n\t// Size class comes from the floating-vue library we use\n\t:global(.resize-observer) {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\tleft: 0;\n\t\tz-index: -1;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder: none;\n\t\tbackground-color: transparent;\n\t\tpointer-events: none;\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t\topacity: 0;\n\n\t\tobject {\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tleft: 0;\n\t\t\theight: 100%;\n\t\t\twidth: 100%;\n\t\t\toverflow: hidden;\n\t\t\tpointer-events: none;\n\t\t\tz-index: -1;\n\t\t}\n\t}\n\n\t&:global(.v-popper__popper) {\n\t\tz-index: 100000;\n\t\ttop: 0;\n\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\tleft: 0;\n\t\tdisplay: block !important;\n\n\t\t:global(.v-popper__wrapper) {\n\t\t\t/*\n\t\t\t * In theory, \"filter: drop-shadow\" would look better here with arrow shadow.\n\t\t\t * In fact, in results in a blurry popover in Chromium on scaling.\n\t\t\t * The hypothesis is that \"filter\" creates a new composition layer,\n\t\t\t * and with GPU acceleration requires the previous layers content to be rasterized.\n\t\t\t * In combination with translate3d from floating-vue, it makes Chromium to first render and rasterize the popover\n\t\t\t * and then apply scaling, which results in a blurry popover.\n\t\t\t */\n\t\t\tbox-shadow: 0 1px 10px var(--color-box-shadow);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t}\n\n\t\t:global(.v-popper__inner) {\n\t\t\tpadding: 0;\n\t\t\tcolor: var(--color-main-text);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t\toverflow: hidden;\n\t\t\tbackground: var(--color-main-background);\n\t\t}\n\n\t\t:global(.v-popper__arrow-container) {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t\tborder-color: transparent;\n\t\t\tborder-width: $arrow-width;\n\t\t}\n\n\t\t&[data-popper-placement^='top'] :global(.v-popper__arrow-container) {\n\t\t\tbottom: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-bottom-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-top-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='bottom'] :global(.v-popper__arrow-container) {\n\t\t\ttop: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-top-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-bottom-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='right'] :global(.v-popper__arrow-container) {\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tleft: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-left-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-right-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='left'] :global(.v-popper__arrow-container) {\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tright: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-right-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-left-color: var(--color-main-background);\n\t\t}\n\n\t\t&[aria-hidden='true'] {\n\t\t\tvisibility: hidden;\n\t\t\ttransition: opacity var(--animation-quick), visibility var(--animation-quick);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t&[aria-hidden='false'] {\n\t\t\tvisibility: visible;\n\t\t\ttransition: opacity var(--animation-quick);\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","defineComponent","options","Dropdown","Vue","tabbable","createFocusTrap","getTrapStack","logger"],"mappings":";;;;;;;;;;AAQA,MAAAA,cAAAC,IAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,UAAA;AACA,WAAA;AAAA,MACA,2BAAA,MAAA,KAAA;AAAA,MACA,2BAAA,MAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,eAAA;AACA,aAAA;AAAA,QACA,iBAAA,KAAA;AAAA,QACA,iBAAA,KAAA,MAAA,SAAA;AAAA,MACA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,SAAA;AAEA,WAAA,KAAA,aAAA,UAAA;AAAA,MACA,OAAA,KAAA;AAAA,IACA,CAAA;AAAA,EACA;AACA,CAAA;;;;;;;;;;;;;;;;;AC6HA,MAAA,QAAA;AAGAC,YAAAA,QAAA,OAAA,KAAA,IAAA,gBAAAA,YAAAA,QAAA,OAAA,QAAA;AAOA,MAAA,YAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,UAAAC,YAAAA;AAAAA,IACA;AAAA,EACA;AAAA,EAEA,cAAA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA,CAAA,UAAA,CAAA,QAAA,WAAA,QA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AA;AAAA,IASA,2BAAA;AACA,YAAA,KAAA,KAAA,yBAAA;AACA,UAAA,iBAAA,WAAA,KAAA,wBAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,6BAAA;AACA,YAAA,KAAA,KAAA,yBAAA;AACA,UAAA,oBAAA,WAAA,KAAA,wBAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,yBAAA,OAAA;AACA,UAAA,MAAA,SAAA,aAAA,MAAA,QAAA,UAAA;AACA,cAAA,gBAAA;AAAA,MACA;AAAA,IACA;AAAA,IAEA,MAAA,YAAA;AACA,WAAA,yBAAA,EAAA,iBAAA,iBAAA,MAAA;AAQA,aAAA,MAAA,YAAA;AAAA,MACA,GAAA,EAAA,MAAA,MAAA,SAAA,KAAA,CAAA;AAEA,WAAA,iCAAA;AAEA,YAAA,KAAA,UAAA;AACA,YAAA,KAAA,aAAA;AACA,WAAA,yBAAA;AAAA,IACA;AAAA,IAEA,YAAA;AACA,WAAA,yBAAA,EAAA,iBAAA,iBAAA,MAAA;AAQA,aAAA,MAAA,YAAA;AAAA,MACA,GAAA,EAAA,MAAA,MAAA,SAAA,KAAA,CAAA;AAEA,WAAA,eAAA;AACA,WAAA,2BAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcPopover-Ujf9nIvN.cjs","sources":["../../src/components/NcPopover/NcPopoverTriggerProvider.vue","../../src/components/NcPopover/NcPopover.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script>\nimport { defineComponent } from 'vue'\n\nexport default defineComponent({\n\tname: 'NcPopoverTriggerProvider',\n\n\tprovide() {\n\t\treturn {\n\t\t\t'NcPopover:trigger:shown': () => this.shown,\n\t\t\t'NcPopover:trigger:attrs': () => this.triggerAttrs,\n\t\t}\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Is the popover currently shown\n\t\t */\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * ARIA Role of the popup\n\t\t */\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\ttriggerAttrs() {\n\t\t\treturn {\n\t\t\t\t'aria-haspopup': this.popupRole,\n\t\t\t\t'aria-expanded': this.shown.toString(),\n\t\t\t}\n\t\t},\n\t},\n\n\trender() {\n\t\t// TODO: Vue 3 - replace with $slots\n\t\treturn this.$scopedSlots.default?.({\n\t\t\tattrs: this.triggerAttrs,\n\t\t})\n\t},\n})\n</script>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### General description\n\nThis component is just a wrapper for the floating-vue plugin by Akryum,\nplease refer to this documentation for customization:\nhttps://github.com/Akryum/floating-vue\n\nThis components has two slots:\n* 'trigger' which can be any html element and it will trigger the popover\nthis slot is optional since you can toggle the popover also by updating the\nopen prop on this component;\n\n* a default slot that is for the content of the popover.\n\n### Examples\n\n#### With a `<NcButton>` as a trigger:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\t<form tabindex=\"0\" role=\"dialog\" aria-labelledby=\"popover-example-dialog-header-1\" @submit.prevent>\n\t\t\t\t\t<h2 id=\"popover-example-dialog-header-1\">this is some content</h2>\n\t\t\t\t\t<p>\n\t\t\t\t\t\tLorem ipsum dolor sit amet, consectetur adipiscing elit. <br/>\n\t\t\t\t\t\tVestibulum eget placerat velit.\n\t\t\t\t\t</p>\n\t\t\t\t\t<label>\n\t\t\t\t\t\tLabel element\n\t\t\t\t\t\t<input type=\"text\" placeholder=\"input element\"/>\n\t\t\t\t\t</label>\n\t\t\t\t</form>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Without focus trap:\n\nThe [`focus-trap`](https://github.com/focus-trap/focus-trap) emits an error when used in a non-focusable element tree.\n\nThe prop `:focus-trap=\"false\"` help to prevent it when the default behavior is not relevant.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover :focus-trap=\"false\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Click me!</NcButton>\n\t\t\t</template>\n\t\t\t<template>\n\t\t\t\tHi! 🚀\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With passing props to `floating-vue`'s `Dropdown`:\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover container=\"body\" :popper-hide-triggers=\"(triggers) => [...triggers, 'click']\" popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>I am the trigger</NcButton>\n\t\t\t</template>\n\t\t\t<template #default>\n\t\t\t\t<NcButton>Click on the button will close NcPopover</NcButton>\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With a custom button in as a trigger:\n\nWhen `<NcButton>` is used as a `<NcPopover>` trigger, it injects required for a11y attributes to the button.\n\nIf you are using your own custom button as a trigger make sure to bind `attrs` from the trigger slot props.\nSee code example below.\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<NcPopover>\n\t\t\t<!-- Take \"attrs\" from the slot props -->\n\t\t\t<template #trigger=\"{ attrs }\">\n\t\t\t\t<!-- Bind attrs as the button attrs -->\n\t\t\t\t<button v-bind=\"attrs\">\n\t\t\t\t\tI am a custom button in the trigger\n\t\t\t\t</button>\n\t\t\t</template>\n\n\t\t\tHi! 🚀\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### Provide role for the popover content\n\nFor accessibility reasons, popover should have a role. Provide it to the `popup-role` and make sure that the popover content is an element with the same role.\n\nSee: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup\n\n```vue\n<template>\n\t<div style=\"display: flex\">\n\t\t<!-- Provide popup role -->\n\t\t<NcPopover popup-role=\"dialog\">\n\t\t\t<template #trigger>\n\t\t\t\t<NcButton>Delete</NcButton>\n\t\t\t</template>\n\n\t\t\t<!-- Popover content should has the same role -->\n\t\t\t<div role=\"dialog\" aria-labelledby=\"popover-example-custom-role-1\" aria-modal=\"true\">\n\t\t\t\t<!-- This is not required but better to provide a label -->\n\t\t\t\t<header id=\"popover-example-custom-role-1\">\n\t\t\t\t\t<strong>Confirm remove</strong>\n\t\t\t\t</header>\n\t\t\t\t<NcButton type=\"danger\">Delete</NcButton>\n\t\t\t</div>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n</docs>\n\n<template>\n\t<Dropdown\n\t\tref=\"popover\"\n\t\t:distance=\"10\"\n\t\t:arrow-padding=\"10\"\n\t\tv-bind=\"$attrs\"\n\t\t:no-auto-focus=\"true /* Handled by the focus trap */\"\n\t\t:popper-class=\"[$style.ncPopover, popoverBaseClass]\"\n\t\t:theme=\"THEME\"\n\t\t:shown=\"internalShown\"\n\t\tv-on=\"$listeners\"\n\t\t@update:shown=\"internalShown = $event\"\n\t\t@apply-show=\"afterShow\"\n\t\t@apply-hide=\"afterHide\">\n\t\t<NcPopoverTriggerProvider v-slot=\"slotProps\" :shown=\"internalShown\" :popup-role=\"popupRole\">\n\t\t\t<!-- This will be the popover target (for the events and position) -->\n\t\t\t<slot name=\"trigger\" v-bind=\"slotProps\" />\n\t\t</NcPopoverTriggerProvider>\n\n\t\t<!-- This will be the content of the popover -->\n\t\t<template #popper=\"slotProps\">\n\t\t\t<slot name=\"default\" v-bind=\"slotProps\" />\n\t\t</template>\n\t</Dropdown>\n</template>\n\n<script>\nimport { Dropdown, options } from 'floating-vue'\nimport { createFocusTrap } from 'focus-trap'\nimport { tabbable } from 'tabbable'\nimport Vue from 'vue'\nimport NcPopoverTriggerProvider from './NcPopoverTriggerProvider.vue'\nimport { getTrapStack } from '../../utils/focusTrap.ts'\nimport { logger } from '../../utils/logger.ts'\n\nconst THEME = 'nc-popover-8'\n\n// NcPopover has a custom theme to have a custom name but same as the default \"dropdown\" theme\noptions.themes[THEME] = structuredClone(options.themes.dropdown)\n\n/**\n * @typedef {import('focus-trap').FocusTargetValueOrFalse} FocusTargetValueOrFalse\n * @typedef {FocusTargetValueOrFalse|() => FocusTargetValueOrFalse} SetReturnFocus\n */\n\nexport default {\n\tname: 'NcPopover',\n\n\tcomponents: {\n\t\tDropdown,\n\t\tNcPopoverTriggerProvider,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\t/**\n\t\t * Show or hide the popper\n\t\t *\n\t\t * @see https://floating-vue.starpad.dev/api/#shown\n\t\t */\n\t\tshown: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Popup role\n\t\t *\n\t\t * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup#values\n\t\t */\n\t\tpopupRole: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t\tvalidator: (value) => ['menu', 'listbox', 'tree', 'grid', 'dialog', 'true'].includes(value),\n\t\t},\n\n\t\t/**\n\t\t * Class to be applied to the popover base\n\t\t */\n\t\tpopoverBaseClass: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Enable popover focus trap\n\t\t *\n\t\t * @deprecated use noFocusTrap instead\n\t\t */\n\t\tfocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\t// eslint-disable-next-line vue/no-boolean-default\n\t\t\tdefault: true,\n\t\t},\n\n\t\t/**\n\t\t * Disable the popover focus trap.\n\t\t */\n\t\tnoFocusTrap: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Set element to return focus to after focus trap deactivation\n\t\t *\n\t\t * @type {SetReturnFocus}\n\t\t */\n\t\tsetReturnFocus: {\n\t\t\tdefault: undefined,\n\t\t\ttype: [Boolean, HTMLElement, SVGElement, String, Function],\n\t\t},\n\n\t\t/**\n\t\t * When there is no setReturnFocus, NcPopover will try to return focus to the trigger button.\n\t\t * Use this prop to disable this behavior.\n\t\t */\n\t\tnoAutoReturnFocus: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\temits: [\n\t\t'after-show',\n\t\t'after-hide',\n\t\t/**\n\t\t * @see https://floating-vue.starpad.dev/api/#update-shown\n\t\t */\n\t\t'update:shown',\n\t],\n\n\tsetup() {\n\t\treturn {\n\t\t\tTHEME,\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tinternalShown: this.shown,\n\t\t}\n\t},\n\n\twatch: {\n\t\tshown(value) {\n\t\t\tthis.internalShown = value\n\t\t\tif (this.internalShown) {\n\t\t\t\tthis.checkTriggerA11y()\n\t\t\t}\n\t\t},\n\n\t\tinternalShown(value) {\n\t\t\tthis.$emit('update:shown', value)\n\t\t},\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.clearFocusTrap()\n\t\tthis.clearEscapeStopPropagation()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Check if the trigger has all required a11y attributes.\n\t\t * Important to check custom trigger button.\n\t\t */\n\t\tcheckTriggerA11y() {\n\t\t\tif (window.OC?.debug) {\n\t\t\t\tconst triggerButton = this.getPopoverTriggerButtonElement()\n\t\t\t\tif (!triggerButton || !triggerButton.hasAttributes('aria-expanded', 'aria-haspopup')) {\n\t\t\t\t\tVue.util.warn('It looks like you are using a custom button as a <NcPopover> or other popover #trigger. If you are not using <NcButton> as a trigger, you need to bind attrs from the #trigger slot props to your custom button. See <NcPopover> docs for an example.')\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Remove incorrect aria-describedby attribute from the trigger.\n\t\t *\n\t\t * @see https://github.com/Akryum/floating-vue/blob/8d4f7125aae0e3ea00ba4093d6d2001ab15058f1/packages/floating-vue/src/components/Popper.ts#L734\n\t\t */\n\t\tremoveFloatingVueAriaDescribedBy() {\n\t\t\t// When the popover is shown, floating-vue mutates the root elements of the trigger adding data-popper-shown and incorrect aria-describedby attributes.\n\t\t\tconst triggerContainer = this.getPopoverTriggerElement()\n\t\t\tconst triggerElements = triggerContainer.querySelectorAll('[data-popper-shown]')\n\t\t\tfor (const el of triggerElements) {\n\t\t\t\tel.removeAttribute('aria-describedby')\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverContentElement() {\n\t\t\treturn this.$refs.popover?.$refs.popperContent?.$el\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverTriggerElement() {\n\t\t\t// TODO: Vue 3: should be\n\t\t\t// this.$refs.popover.$refs.popper.$refs.reference\n\t\t\treturn this.$refs.popover.$refs.reference\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement|undefined}\n\t\t */\n\t\tgetPopoverTriggerButtonElement() {\n\t\t\tconst triggerContainer = this.getPopoverTriggerElement()\n\t\t\treturn triggerContainer && tabbable(triggerContainer)[0]\n\t\t},\n\n\t\t/**\n\t\t * Add focus trap for accessibility.\n\t\t */\n\t\tasync useFocusTrap() {\n\t\t\tawait this.$nextTick()\n\n\t\t\tif (this.noFocusTrap || !this.focusTrap) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel.tabIndex = -1\n\n\t\t\tif (!el) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// Init focus trap\n\t\t\tthis.$focusTrap = createFocusTrap(el, {\n\t\t\t\t// Prevents to lose focus using esc key\n\t\t\t\t// Focus will be release when popover be hide\n\t\t\t\tescapeDeactivates: false,\n\t\t\t\tallowOutsideClick: true,\n\t\t\t\tsetReturnFocus: this.setReturnFocus || (!this.noAutoReturnFocus && this.getPopoverTriggerButtonElement()),\n\t\t\t\ttrapStack: getTrapStack(),\n\t\t\t\tfallBackFocus: el,\n\t\t\t})\n\t\t\tthis.$focusTrap.activate()\n\t\t},\n\n\t\t/**\n\t\t * Remove focus trap\n\t\t *\n\t\t * @param {object} options The configuration options for focusTrap\n\t\t */\n\t\tclearFocusTrap(options = {}) {\n\t\t\ttry {\n\t\t\t\tthis.$focusTrap?.deactivate(options)\n\t\t\t\tthis.$focusTrap = null\n\t\t\t} catch (error) {\n\t\t\t\tlogger.warn('Could not clear focus trap', { error })\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Add stopPropagation for Escape.\n\t\t * It prevents global Escape handling after closing popover.\n\t\t *\n\t\t * Manual event handling is used here instead of v-on because there is no direct access to the node.\n\t\t * Alternative - wrap <template #popover> in a div wrapper.\n\t\t */\n\t\taddEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.addEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * Remove stop Escape handler\n\t\t */\n\t\tclearEscapeStopPropagation() {\n\t\t\tconst el = this.getPopoverContentElement()\n\t\t\tel?.removeEventListener('keydown', this.stopKeydownEscapeHandler)\n\t\t},\n\n\t\t/**\n\t\t * @param {KeyboardEvent} event - native keydown event\n\t\t */\n\t\tstopKeydownEscapeHandler(event) {\n\t\t\tif (event.type === 'keydown' && event.key === 'Escape') {\n\t\t\t\tevent.stopPropagation()\n\t\t\t}\n\t\t},\n\n\t\tasync afterShow() {\n\t\t\tthis.getPopoverContentElement().addEventListener('transitionend', () => {\n\t\t\t\t/**\n\t\t\t\t * Triggered after the tooltip was visually displayed.\n\t\t\t\t *\n\t\t\t\t * This is different from the 'show' and 'apply-show' which\n\t\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t\t */\n\t\t\t\tthis.$emit('after-show')\n\t\t\t}, { once: true, passive: true })\n\n\t\t\tthis.removeFloatingVueAriaDescribedBy()\n\n\t\t\tawait this.$nextTick()\n\t\t\tawait this.useFocusTrap()\n\t\t\tthis.addEscapeStopPropagation()\n\t\t},\n\n\t\tafterHide() {\n\t\t\tthis.getPopoverContentElement().addEventListener('transitionend', () => {\n\t\t\t\t/**\n\t\t\t\t * Triggered after the tooltip was visually hidden.\n\t\t\t\t *\n\t\t\t\t * This is different from the 'hide' and 'apply-hide' which\n\t\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t\t */\n\t\t\t\tthis.$emit('after-hide')\n\t\t\t}, { once: true, passive: true })\n\n\t\t\tthis.clearFocusTrap()\n\t\t\tthis.clearEscapeStopPropagation()\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" module>\n$arrow-width: 10px;\n// Move the arrow just slightly inside the popover\n// To prevent a visual gap on page scaling\n$arrow-position: $arrow-width - 1px;\n\n// Class is built by floating-vue as \"v-popper--theme-{THEME}\"\n.ncPopover:global(.v-popper--theme-nc-popover-8) {\n\t// Size class comes from the floating-vue library we use\n\t:global(.resize-observer) {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\tleft: 0;\n\t\tz-index: -1;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder: none;\n\t\tbackground-color: transparent;\n\t\tpointer-events: none;\n\t\tdisplay: block;\n\t\toverflow: hidden;\n\t\topacity: 0;\n\n\t\tobject {\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\ttop: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tleft: 0;\n\t\t\theight: 100%;\n\t\t\twidth: 100%;\n\t\t\toverflow: hidden;\n\t\t\tpointer-events: none;\n\t\t\tz-index: -1;\n\t\t}\n\t}\n\n\t&:global(.v-popper__popper) {\n\t\tz-index: 100000;\n\t\ttop: 0;\n\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\tleft: 0;\n\t\tdisplay: block !important;\n\n\t\t:global(.v-popper__wrapper) {\n\t\t\t/*\n\t\t\t * In theory, \"filter: drop-shadow\" would look better here with arrow shadow.\n\t\t\t * In fact, in results in a blurry popover in Chromium on scaling.\n\t\t\t * The hypothesis is that \"filter\" creates a new composition layer,\n\t\t\t * and with GPU acceleration requires the previous layers content to be rasterized.\n\t\t\t * In combination with translate3d from floating-vue, it makes Chromium to first render and rasterize the popover\n\t\t\t * and then apply scaling, which results in a blurry popover.\n\t\t\t */\n\t\t\tbox-shadow: 0 1px 10px var(--color-box-shadow);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t}\n\n\t\t:global(.v-popper__inner) {\n\t\t\tpadding: 0;\n\t\t\tcolor: var(--color-main-text);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t\toverflow: hidden;\n\t\t\tbackground: var(--color-main-background);\n\t\t}\n\n\t\t:global(.v-popper__arrow-container) {\n\t\t\tposition: absolute;\n\t\t\tz-index: 1;\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t\tborder-color: transparent;\n\t\t\tborder-width: $arrow-width;\n\t\t}\n\n\t\t&[data-popper-placement^='top'] :global(.v-popper__arrow-container) {\n\t\t\tbottom: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-bottom-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-top-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='bottom'] :global(.v-popper__arrow-container) {\n\t\t\ttop: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-top-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-bottom-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='right'] :global(.v-popper__arrow-container) {\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tleft: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-left-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-right-color: var(--color-main-background);\n\t\t}\n\n\t\t&[data-popper-placement^='left'] :global(.v-popper__arrow-container) {\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tright: -$arrow-position;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-right-width: 0;\n\t\t\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\t\t\tborder-left-color: var(--color-main-background);\n\t\t}\n\n\t\t&[aria-hidden='true'] {\n\t\t\tvisibility: hidden;\n\t\t\ttransition: opacity var(--animation-quick), visibility var(--animation-quick);\n\t\t\topacity: 0;\n\t\t}\n\n\t\t&[aria-hidden='false'] {\n\t\t\tvisibility: visible;\n\t\t\ttransition: opacity var(--animation-quick);\n\t\t\topacity: 1;\n\t\t}\n\t}\n}\n\n</style>\n"],"names":["_sfc_main","defineComponent","options","Dropdown","Vue","tabbable","createFocusTrap","getTrapStack","logger"],"mappings":";;;;;;;;;;AAQA,MAAAA,cAAAC,IAAAA,gBAAA;AAAA,EACA,MAAA;AAAA,EAEA,UAAA;AACA,WAAA;AAAA,MACA,2BAAA,MAAA,KAAA;AAAA,MACA,2BAAA,MAAA,KAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,OAAA;AAAA,MACA,MAAA;AAAA,MACA,UAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AAAA,IACA,e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A,KAAA,aAAA;AACA,WAAA,yBAAA;AAAA,IACA;AAAA,IAEA,YAAA;AACA,WAAA,yBAAA,EAAA,iBAAA,iBAAA,MAAA;AAQA,aAAA,MAAA,YAAA;AAAA,MACA,GAAA,EAAA,MAAA,MAAA,SAAA,KAAA,CAAA;AAEA,WAAA,eAAA;AACA,WAAA,2BAAA;AAAA,IACA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
- import '../assets/NcRadioGroup-1zpSX8V5.css';
1
+ import '../assets/NcRadioGroup-Dss0ok3g.css';
2
2
  import Vue, { defineComponent, ref, provide, computed } from "vue";
3
- import { N as NcFormBox } from "./NcFormBox-C4wu4RJ_.mjs";
4
- import { N as NcFormGroup } from "./NcFormGroup-BfsPo9aC.mjs";
3
+ import { N as NcFormBox } from "./NcFormBox-DtoCXLMx.mjs";
4
+ import { N as NcFormGroup } from "./NcFormGroup-DblLoFMf.mjs";
5
5
  import { I as INSIDE_RADIO_GROUP_KEY } from "./useNcRadioGroup-D6llQmAl.mjs";
6
6
  import { n as normalizeComponent } from "./_plugin-vue2_normalizer-DU4iP6Vu.mjs";
7
7
  const __default__ = {
@@ -41,9 +41,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
41
41
  return { __sfc: true, props, emit, buttonVariant, register, onUpdate, NcFormBox, NcFormGroup };
42
42
  }
43
43
  });
44
- const radioGroup_checkboxRadioContainer = "_radioGroup_checkboxRadioContainer_14z4o_20";
44
+ const radioGroup_checkboxRadioContainer = "_radioGroup_checkboxRadioContainer_TLs-l";
45
45
  const style0 = {
46
- "material-design-icon": "_material-design-icon_14z4o_12",
46
+ "material-design-icon": "_material-design-icon_KOnh9",
47
47
  radioGroup_checkboxRadioContainer
48
48
  };
49
49
  var _sfc_render = function render() {
@@ -71,4 +71,4 @@ const NcRadioGroup = __component__.exports;
71
71
  export {
72
72
  NcRadioGroup as N
73
73
  };
74
- //# sourceMappingURL=NcRadioGroup-C2Nibs7w.mjs.map
74
+ //# sourceMappingURL=NcRadioGroup-BbBX9X2J.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcRadioGroup-C2Nibs7w.mjs","sources":["../../src/components/NcRadioGroup/NcRadioGroup.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 Vue, { computed, provide, ref } from 'vue'\nimport NcFormBox from '../NcFormBox/NcFormBox.vue'\nimport NcFormGroup from '../NcFormGroup/NcFormGroup.vue'\nimport { INSIDE_RADIO_GROUP_KEY } from './useNcRadioGroup.ts'\n\nconst props = defineProps<{\n\t/**\n\t * Label of the radio group (accessible name).\n\t * It can be hidden visually if needed using `hide-label` prop.\n\t */\n\tlabel: string\n\n\t/**\n\t * If set the label of the button group will not be shown visually but only for accessibility purposes.\n\t *\n\t * @deprecated Use `hide-label` instead.\n\t */\n\tlabelHidden?: boolean\n\n\t/**\n\t * If set the label of the button group will not be shown visually but only for accessibility purposes.\n\t */\n\thideLabel?: boolean\n\n\t/**\n\t * Optional visual description of the radio group.\n\t */\n\tdescription?: string\n\n\t/**\n\t * The currently selected value\n\t */\n\tmodelValue?: string\n}>()\n\nconst emit = defineEmits<{\n\t(event: 'update:modelValue', value: string): void\n}>()\n\nconst buttonVariant = ref<boolean>()\n\nprovide(INSIDE_RADIO_GROUP_KEY, computed(() => ({\n\tmodelValue: props.modelValue,\n\tonUpdate,\n\tregister,\n})))\n\n/**\n * Register a child component\n *\n * @param isButton - Whether the registered child component is a button or normal radio\n */\nfunction register(isButton: boolean): void {\n\tif (buttonVariant.value !== undefined && buttonVariant.value !== isButton) {\n\t\tVue.util.warn('[NcRadioGroup] Mixing NcCheckboxRadioSwitch and NcRadioGroupButton is not possible!')\n\t}\n\tbuttonVariant.value = isButton\n}\n\n/**\n * Handle updating the current model value\n *\n * @param value - The new value\n */\nfunction onUpdate(value: string) {\n\temit('update:modelValue', value)\n}\n</script>\n\n<script lang=\"ts\">\nexport default {\n\tmodel: {\n\t\tprop: 'modelValue',\n\t\tevent: 'update:modelValue',\n\t},\n}\n</script>\n\n<template>\n\t<NcFormGroup\n\t\t:label=\"label\"\n\t\t:description=\"description\"\n\t\t:hide-label=\"labelHidden || hideLabel\">\n\t\t<NcFormBox v-if=\"buttonVariant\" row>\n\t\t\t<!-- @slot Slot for the included radio buttons (`NcCheckboxRadioSwitch`).\n\t\t\t\t The `type` prop of the `NcCheckboxRadioSwitch` will be automatically set (and forced) to `radio`.\n\t\t\t\t If you want the button variant, then you have to use `NcRadioGroupButton`.-->\n\t\t\t<slot />\n\t\t</NcFormBox>\n\t\t<span v-else :class=\"$style.radioGroup_checkboxRadioContainer\">\n\t\t\t<slot />\n\t\t</span>\n\t</NcFormGroup>\n</template>\n\n<style module lang=\"scss\">\n.radioGroup_checkboxRadioContainer :global(.checkbox-content) {\n\tmax-width: unset !important;\n}\n</style>\n\n<docs>\n## Usage example\n\n### Grouping multiple radio buttons\n\nThe radio group allows to group radio buttons into semantical groups.\nThe `v-model` only needs to be bound to the group component, also the `type` will automatically be set to `radio`.\n\n```vue\n<template>\n\t<NcRadioGroup v-model=\"selectedSides\" class=\"radio-group\" label=\"Sides\" description=\"Please choose the sides for your menu.\">\n\t\t<NcCheckboxRadioSwitch value=\"fries\">\n\t\t\tFries\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch value=\"salad\">\n\t\t\tSalad\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch value=\"none\">\n\t\t\tNothing\n\t\t</NcCheckboxRadioSwitch>\n\t</NcRadioGroup>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tselectedSides: 'none',\n\t\t}\n\t},\n}\n</script>\n\n<style scoped>\n.radio-group {\n\tmax-width: 400px\n}\n</style>\n```\n\n### Radio buttons with button styling\n\nThe radio group also allows to create a button like styling together with the `NcRadioGroupButton` component:\n\n```vue\n<template>\n\t<div>\n\t\t<h4>With text labels</h4>\n\t\t<div style=\"max-width: 400px\">\n\t\t\t<NcRadioGroup v-model=\"alignment\" label=\"Example alignment\" hide-label>\n\t\t\t\t<NcRadioGroupButton label=\"Start\" value=\"start\" />\n\t\t\t\t<NcRadioGroupButton label=\"Center\" value=\"center\" />\n\t\t\t\t<NcRadioGroupButton label=\"End\" value=\"end\" />\n\t\t\t</NcRadioGroup>\n\t\t</div>\n\n\t\t<br>\n\n\t\t<h4>With icons</h4>\n\t\t<div style=\"max-width: 250px\">\n\t\t\t<NcRadioGroup v-model=\"alignment\" label=\"Example alignment with icons\" hide-label>\n\t\t\t\t<NcRadioGroupButton aria-label=\"Start\" value=\"start\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper directional :path=\"mdiAlignHorizontalLeft\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcRadioGroupButton>\n\t\t\t\t<NcRadioGroupButton aria-label=\"Center\" value=\"center\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiAlignHorizontalCenter\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcRadioGroupButton>\n\t\t\t\t<NcRadioGroupButton aria-label=\"End\" value=\"end\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper directional :path=\"mdiAlignHorizontalRight\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcRadioGroupButton>\n\t\t\t</NcRadioGroup>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { mdiAlignHorizontalCenter, mdiAlignHorizontalLeft, mdiAlignHorizontalRight } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\treturn {\n\t\t\tmdiAlignHorizontalCenter,\n\t\t\tmdiAlignHorizontalLeft,\n\t\t\tmdiAlignHorizontalRight,\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\talignment: 'center',\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;;AA4EA,MAAA,cAAe;AAAA,EACd,OAAO;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAET;;;;;;;;;;;;;;AApCA,UAAM,gBAAgB,IAAA;AAEtB,YAAQ,wBAAwB,SAAS,OAAO;AAAA,MAC/C,YAAY,MAAM;AAAA,MAClB;AAAA,MACA;AAAA,IAAA,EACC,CAAC;AAOH,aAAS,SAAS,UAAyB;AAC1C,UAAI,cAAc,UAAU,UAAa,cAAc,UAAU,UAAU;AAC1E,YAAI,KAAK,KAAK,qFAAqF;AAAA,MACpG;AACA,oBAAc,QAAQ;AAAA,IACvB;AAOA,aAAS,SAAS,OAAe;AAChC,WAAK,qBAAqB,KAAK;AAAA,IAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcRadioGroup-BbBX9X2J.mjs","sources":["../../src/components/NcRadioGroup/NcRadioGroup.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 Vue, { computed, provide, ref } from 'vue'\nimport NcFormBox from '../NcFormBox/NcFormBox.vue'\nimport NcFormGroup from '../NcFormGroup/NcFormGroup.vue'\nimport { INSIDE_RADIO_GROUP_KEY } from './useNcRadioGroup.ts'\n\nconst props = defineProps<{\n\t/**\n\t * Label of the radio group (accessible name).\n\t * It can be hidden visually if needed using `hide-label` prop.\n\t */\n\tlabel: string\n\n\t/**\n\t * If set the label of the button group will not be shown visually but only for accessibility purposes.\n\t *\n\t * @deprecated Use `hide-label` instead.\n\t */\n\tlabelHidden?: boolean\n\n\t/**\n\t * If set the label of the button group will not be shown visually but only for accessibility purposes.\n\t */\n\thideLabel?: boolean\n\n\t/**\n\t * Optional visual description of the radio group.\n\t */\n\tdescription?: string\n\n\t/**\n\t * The currently selected value\n\t */\n\tmodelValue?: string\n}>()\n\nconst emit = defineEmits<{\n\t(event: 'update:modelValue', value: string): void\n}>()\n\nconst buttonVariant = ref<boolean>()\n\nprovide(INSIDE_RADIO_GROUP_KEY, computed(() => ({\n\tmodelValue: props.modelValue,\n\tonUpdate,\n\tregister,\n})))\n\n/**\n * Register a child component\n *\n * @param isButton - Whether the registered child component is a button or normal radio\n */\nfunction register(isButton: boolean): void {\n\tif (buttonVariant.value !== undefined && buttonVariant.value !== isButton) {\n\t\tVue.util.warn('[NcRadioGroup] Mixing NcCheckboxRadioSwitch and NcRadioGroupButton is not possible!')\n\t}\n\tbuttonVariant.value = isButton\n}\n\n/**\n * Handle updating the current model value\n *\n * @param value - The new value\n */\nfunction onUpdate(value: string) {\n\temit('update:modelValue', value)\n}\n</script>\n\n<script lang=\"ts\">\nexport default {\n\tmodel: {\n\t\tprop: 'modelValue',\n\t\tevent: 'update:modelValue',\n\t},\n}\n</script>\n\n<template>\n\t<NcFormGroup\n\t\t:label=\"label\"\n\t\t:description=\"description\"\n\t\t:hide-label=\"labelHidden || hideLabel\">\n\t\t<NcFormBox v-if=\"buttonVariant\" row>\n\t\t\t<!-- @slot Slot for the included radio buttons (`NcCheckboxRadioSwitch`).\n\t\t\t\t The `type` prop of the `NcCheckboxRadioSwitch` will be automatically set (and forced) to `radio`.\n\t\t\t\t If you want the button variant, then you have to use `NcRadioGroupButton`.-->\n\t\t\t<slot />\n\t\t</NcFormBox>\n\t\t<span v-else :class=\"$style.radioGroup_checkboxRadioContainer\">\n\t\t\t<slot />\n\t\t</span>\n\t</NcFormGroup>\n</template>\n\n<style module lang=\"scss\">\n.radioGroup_checkboxRadioContainer :global(.checkbox-content) {\n\tmax-width: unset !important;\n}\n</style>\n\n<docs>\n## Usage example\n\n### Grouping multiple radio buttons\n\nThe radio group allows to group radio buttons into semantical groups.\nThe `v-model` only needs to be bound to the group component, also the `type` will automatically be set to `radio`.\n\n```vue\n<template>\n\t<NcRadioGroup v-model=\"selectedSides\" class=\"radio-group\" label=\"Sides\" description=\"Please choose the sides for your menu.\">\n\t\t<NcCheckboxRadioSwitch value=\"fries\">\n\t\t\tFries\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch value=\"salad\">\n\t\t\tSalad\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch value=\"none\">\n\t\t\tNothing\n\t\t</NcCheckboxRadioSwitch>\n\t</NcRadioGroup>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tselectedSides: 'none',\n\t\t}\n\t},\n}\n</script>\n\n<style scoped>\n.radio-group {\n\tmax-width: 400px\n}\n</style>\n```\n\n### Radio buttons with button styling\n\nThe radio group also allows to create a button like styling together with the `NcRadioGroupButton` component:\n\n```vue\n<template>\n\t<div>\n\t\t<h4>With text labels</h4>\n\t\t<div style=\"max-width: 400px\">\n\t\t\t<NcRadioGroup v-model=\"alignment\" label=\"Example alignment\" hide-label>\n\t\t\t\t<NcRadioGroupButton label=\"Start\" value=\"start\" />\n\t\t\t\t<NcRadioGroupButton label=\"Center\" value=\"center\" />\n\t\t\t\t<NcRadioGroupButton label=\"End\" value=\"end\" />\n\t\t\t</NcRadioGroup>\n\t\t</div>\n\n\t\t<br>\n\n\t\t<h4>With icons</h4>\n\t\t<div style=\"max-width: 250px\">\n\t\t\t<NcRadioGroup v-model=\"alignment\" label=\"Example alignment with icons\" hide-label>\n\t\t\t\t<NcRadioGroupButton aria-label=\"Start\" value=\"start\" disabled>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper directional :path=\"mdiAlignHorizontalLeft\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcRadioGroupButton>\n\t\t\t\t<NcRadioGroupButton aria-label=\"Center\" value=\"center\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiAlignHorizontalCenter\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcRadioGroupButton>\n\t\t\t\t<NcRadioGroupButton aria-label=\"End\" value=\"end\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper directional :path=\"mdiAlignHorizontalRight\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcRadioGroupButton>\n\t\t\t</NcRadioGroup>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { mdiAlignHorizontalCenter, mdiAlignHorizontalLeft, mdiAlignHorizontalRight } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\treturn {\n\t\t\tmdiAlignHorizontalCenter,\n\t\t\tmdiAlignHorizontalLeft,\n\t\t\tmdiAlignHorizontalRight,\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\talignment: 'center',\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n"],"names":[],"mappings":";;;;;AA4EA,MAAA,cAAe;AAAA,EACd,OAAO;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAET;;;;;;;;;;;;;;AApCA,UAAM,gBAAgB,IAAA;AAEtB,YAAQ,wBAAwB,SAAS,OAAO;AAAA,MAC/C,YAAY,MAAM;AAAA,MAClB;AAAA,MACA;AAAA,IAAA,EACC,CAAC;AAOH,aAAS,SAAS,UAAyB;AAC1C,UAAI,cAAc,UAAU,UAAa,cAAc,UAAU,UAAU;AAC1E,YAAI,KAAK,KAAK,qFAAqF;AAAA,MACpG;AACA,oBAAc,QAAQ;AAAA,IACvB;AAOA,aAAS,SAAS,OAAe;AAChC,WAAK,qBAAqB,KAAK;AAAA,IAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,8 +1,8 @@
1
- require('../assets/NcRadioGroup-1zpSX8V5.css');
1
+ require('../assets/NcRadioGroup-Dss0ok3g.css');
2
2
  "use strict";
3
3
  const Vue = require("vue");
4
- const NcFormBox = require("./NcFormBox-DjrN-K4Q.cjs");
5
- const NcFormGroup = require("./NcFormGroup-CBMl_9_J.cjs");
4
+ const NcFormBox = require("./NcFormBox-DRGVpFeZ.cjs");
5
+ const NcFormGroup = require("./NcFormGroup-AxkxubKD.cjs");
6
6
  const useNcRadioGroup = require("./useNcRadioGroup-rLYISWKB.cjs");
7
7
  const _pluginVue2_normalizer = require("./_plugin-vue2_normalizer-V0q-tHlQ.cjs");
8
8
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
@@ -44,9 +44,9 @@ const _sfc_main = /* @__PURE__ */ Vue.defineComponent({
44
44
  return { __sfc: true, props, emit, buttonVariant, register, onUpdate, NcFormBox: NcFormBox.NcFormBox, NcFormGroup: NcFormGroup.NcFormGroup };
45
45
  }
46
46
  });
47
- const radioGroup_checkboxRadioContainer = "_radioGroup_checkboxRadioContainer_14z4o_20";
47
+ const radioGroup_checkboxRadioContainer = "_radioGroup_checkboxRadioContainer_TLs-l";
48
48
  const style0 = {
49
- "material-design-icon": "_material-design-icon_14z4o_12",
49
+ "material-design-icon": "_material-design-icon_KOnh9",
50
50
  radioGroup_checkboxRadioContainer
51
51
  };
52
52
  var _sfc_render = function render() {
@@ -72,4 +72,4 @@ var __component__ = /* @__PURE__ */ _pluginVue2_normalizer.normalizeComponent(
72
72
  );
73
73
  const NcRadioGroup = __component__.exports;
74
74
  exports.NcRadioGroup = NcRadioGroup;
75
- //# sourceMappingURL=NcRadioGroup-zZIcG3FY.cjs.map
75
+ //# sourceMappingURL=NcRadioGroup-CsPmwGlc.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcRadioGroup-zZIcG3FY.cjs","sources":["../../src/components/NcRadioGroup/NcRadioGroup.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 Vue, { computed, provide, ref } from 'vue'\nimport NcFormBox from '../NcFormBox/NcFormBox.vue'\nimport NcFormGroup from '../NcFormGroup/NcFormGroup.vue'\nimport { INSIDE_RADIO_GROUP_KEY } from './useNcRadioGroup.ts'\n\nconst props = defineProps<{\n\t/**\n\t * Label of the radio group (accessible name).\n\t * It can be hidden visually if needed using `hide-label` prop.\n\t */\n\tlabel: string\n\n\t/**\n\t * If set the label of the button group will not be shown visually but only for accessibility purposes.\n\t *\n\t * @deprecated Use `hide-label` instead.\n\t */\n\tlabelHidden?: boolean\n\n\t/**\n\t * If set the label of the button group will not be shown visually but only for accessibility purposes.\n\t */\n\thideLabel?: boolean\n\n\t/**\n\t * Optional visual description of the radio group.\n\t */\n\tdescription?: string\n\n\t/**\n\t * The currently selected value\n\t */\n\tmodelValue?: string\n}>()\n\nconst emit = defineEmits<{\n\t(event: 'update:modelValue', value: string): void\n}>()\n\nconst buttonVariant = ref<boolean>()\n\nprovide(INSIDE_RADIO_GROUP_KEY, computed(() => ({\n\tmodelValue: props.modelValue,\n\tonUpdate,\n\tregister,\n})))\n\n/**\n * Register a child component\n *\n * @param isButton - Whether the registered child component is a button or normal radio\n */\nfunction register(isButton: boolean): void {\n\tif (buttonVariant.value !== undefined && buttonVariant.value !== isButton) {\n\t\tVue.util.warn('[NcRadioGroup] Mixing NcCheckboxRadioSwitch and NcRadioGroupButton is not possible!')\n\t}\n\tbuttonVariant.value = isButton\n}\n\n/**\n * Handle updating the current model value\n *\n * @param value - The new value\n */\nfunction onUpdate(value: string) {\n\temit('update:modelValue', value)\n}\n</script>\n\n<script lang=\"ts\">\nexport default {\n\tmodel: {\n\t\tprop: 'modelValue',\n\t\tevent: 'update:modelValue',\n\t},\n}\n</script>\n\n<template>\n\t<NcFormGroup\n\t\t:label=\"label\"\n\t\t:description=\"description\"\n\t\t:hide-label=\"labelHidden || hideLabel\">\n\t\t<NcFormBox v-if=\"buttonVariant\" row>\n\t\t\t<!-- @slot Slot for the included radio buttons (`NcCheckboxRadioSwitch`).\n\t\t\t\t The `type` prop of the `NcCheckboxRadioSwitch` will be automatically set (and forced) to `radio`.\n\t\t\t\t If you want the button variant, then you have to use `NcRadioGroupButton`.-->\n\t\t\t<slot />\n\t\t</NcFormBox>\n\t\t<span v-else :class=\"$style.radioGroup_checkboxRadioContainer\">\n\t\t\t<slot />\n\t\t</span>\n\t</NcFormGroup>\n</template>\n\n<style module lang=\"scss\">\n.radioGroup_checkboxRadioContainer :global(.checkbox-content) {\n\tmax-width: unset !important;\n}\n</style>\n\n<docs>\n## Usage example\n\n### Grouping multiple radio buttons\n\nThe radio group allows to group radio buttons into semantical groups.\nThe `v-model` only needs to be bound to the group component, also the `type` will automatically be set to `radio`.\n\n```vue\n<template>\n\t<NcRadioGroup v-model=\"selectedSides\" class=\"radio-group\" label=\"Sides\" description=\"Please choose the sides for your menu.\">\n\t\t<NcCheckboxRadioSwitch value=\"fries\">\n\t\t\tFries\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch value=\"salad\">\n\t\t\tSalad\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch value=\"none\">\n\t\t\tNothing\n\t\t</NcCheckboxRadioSwitch>\n\t</NcRadioGroup>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tselectedSides: 'none',\n\t\t}\n\t},\n}\n</script>\n\n<style scoped>\n.radio-group {\n\tmax-width: 400px\n}\n</style>\n```\n\n### Radio buttons with button styling\n\nThe radio group also allows to create a button like styling together with the `NcRadioGroupButton` component:\n\n```vue\n<template>\n\t<div>\n\t\t<h4>With text labels</h4>\n\t\t<div style=\"max-width: 400px\">\n\t\t\t<NcRadioGroup v-model=\"alignment\" label=\"Example alignment\" hide-label>\n\t\t\t\t<NcRadioGroupButton label=\"Start\" value=\"start\" />\n\t\t\t\t<NcRadioGroupButton label=\"Center\" value=\"center\" />\n\t\t\t\t<NcRadioGroupButton label=\"End\" value=\"end\" />\n\t\t\t</NcRadioGroup>\n\t\t</div>\n\n\t\t<br>\n\n\t\t<h4>With icons</h4>\n\t\t<div style=\"max-width: 250px\">\n\t\t\t<NcRadioGroup v-model=\"alignment\" label=\"Example alignment with icons\" hide-label>\n\t\t\t\t<NcRadioGroupButton aria-label=\"Start\" value=\"start\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper directional :path=\"mdiAlignHorizontalLeft\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcRadioGroupButton>\n\t\t\t\t<NcRadioGroupButton aria-label=\"Center\" value=\"center\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiAlignHorizontalCenter\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcRadioGroupButton>\n\t\t\t\t<NcRadioGroupButton aria-label=\"End\" value=\"end\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper directional :path=\"mdiAlignHorizontalRight\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcRadioGroupButton>\n\t\t\t</NcRadioGroup>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { mdiAlignHorizontalCenter, mdiAlignHorizontalLeft, mdiAlignHorizontalRight } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\treturn {\n\t\t\tmdiAlignHorizontalCenter,\n\t\t\tmdiAlignHorizontalLeft,\n\t\t\tmdiAlignHorizontalRight,\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\talignment: 'center',\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n"],"names":["ref","provide","INSIDE_RADIO_GROUP_KEY","computed","Vue"],"mappings":";;;;;;;;AA4EA,MAAA,cAAe;AAAA,EACd,OAAO;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAET;;;;;;;;;;;;;;AApCA,UAAM,gBAAgBA,IAAAA,IAAA;AAEtBC,gBAAQC,gBAAAA,wBAAwBC,IAAAA,SAAS,OAAO;AAAA,MAC/C,YAAY,MAAM;AAAA,MAClB;AAAA,MACA;AAAA,IAAA,EACC,CAAC;AAOH,aAAS,SAAS,UAAyB;AAC1C,UAAI,cAAc,UAAU,UAAa,cAAc,UAAU,UAAU;AAC1EC,6BAAI,KAAK,KAAK,qFAAqF;AAAA,MACpG;AACA,oBAAc,QAAQ;AAAA,IACvB;AAOA,aAAS,SAAS,OAAe;AAChC,WAAK,qBAAqB,KAAK;AAAA,IAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"NcRadioGroup-CsPmwGlc.cjs","sources":["../../src/components/NcRadioGroup/NcRadioGroup.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 Vue, { computed, provide, ref } from 'vue'\nimport NcFormBox from '../NcFormBox/NcFormBox.vue'\nimport NcFormGroup from '../NcFormGroup/NcFormGroup.vue'\nimport { INSIDE_RADIO_GROUP_KEY } from './useNcRadioGroup.ts'\n\nconst props = defineProps<{\n\t/**\n\t * Label of the radio group (accessible name).\n\t * It can be hidden visually if needed using `hide-label` prop.\n\t */\n\tlabel: string\n\n\t/**\n\t * If set the label of the button group will not be shown visually but only for accessibility purposes.\n\t *\n\t * @deprecated Use `hide-label` instead.\n\t */\n\tlabelHidden?: boolean\n\n\t/**\n\t * If set the label of the button group will not be shown visually but only for accessibility purposes.\n\t */\n\thideLabel?: boolean\n\n\t/**\n\t * Optional visual description of the radio group.\n\t */\n\tdescription?: string\n\n\t/**\n\t * The currently selected value\n\t */\n\tmodelValue?: string\n}>()\n\nconst emit = defineEmits<{\n\t(event: 'update:modelValue', value: string): void\n}>()\n\nconst buttonVariant = ref<boolean>()\n\nprovide(INSIDE_RADIO_GROUP_KEY, computed(() => ({\n\tmodelValue: props.modelValue,\n\tonUpdate,\n\tregister,\n})))\n\n/**\n * Register a child component\n *\n * @param isButton - Whether the registered child component is a button or normal radio\n */\nfunction register(isButton: boolean): void {\n\tif (buttonVariant.value !== undefined && buttonVariant.value !== isButton) {\n\t\tVue.util.warn('[NcRadioGroup] Mixing NcCheckboxRadioSwitch and NcRadioGroupButton is not possible!')\n\t}\n\tbuttonVariant.value = isButton\n}\n\n/**\n * Handle updating the current model value\n *\n * @param value - The new value\n */\nfunction onUpdate(value: string) {\n\temit('update:modelValue', value)\n}\n</script>\n\n<script lang=\"ts\">\nexport default {\n\tmodel: {\n\t\tprop: 'modelValue',\n\t\tevent: 'update:modelValue',\n\t},\n}\n</script>\n\n<template>\n\t<NcFormGroup\n\t\t:label=\"label\"\n\t\t:description=\"description\"\n\t\t:hide-label=\"labelHidden || hideLabel\">\n\t\t<NcFormBox v-if=\"buttonVariant\" row>\n\t\t\t<!-- @slot Slot for the included radio buttons (`NcCheckboxRadioSwitch`).\n\t\t\t\t The `type` prop of the `NcCheckboxRadioSwitch` will be automatically set (and forced) to `radio`.\n\t\t\t\t If you want the button variant, then you have to use `NcRadioGroupButton`.-->\n\t\t\t<slot />\n\t\t</NcFormBox>\n\t\t<span v-else :class=\"$style.radioGroup_checkboxRadioContainer\">\n\t\t\t<slot />\n\t\t</span>\n\t</NcFormGroup>\n</template>\n\n<style module lang=\"scss\">\n.radioGroup_checkboxRadioContainer :global(.checkbox-content) {\n\tmax-width: unset !important;\n}\n</style>\n\n<docs>\n## Usage example\n\n### Grouping multiple radio buttons\n\nThe radio group allows to group radio buttons into semantical groups.\nThe `v-model` only needs to be bound to the group component, also the `type` will automatically be set to `radio`.\n\n```vue\n<template>\n\t<NcRadioGroup v-model=\"selectedSides\" class=\"radio-group\" label=\"Sides\" description=\"Please choose the sides for your menu.\">\n\t\t<NcCheckboxRadioSwitch value=\"fries\">\n\t\t\tFries\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch value=\"salad\">\n\t\t\tSalad\n\t\t</NcCheckboxRadioSwitch>\n\t\t<NcCheckboxRadioSwitch value=\"none\">\n\t\t\tNothing\n\t\t</NcCheckboxRadioSwitch>\n\t</NcRadioGroup>\n</template>\n\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tselectedSides: 'none',\n\t\t}\n\t},\n}\n</script>\n\n<style scoped>\n.radio-group {\n\tmax-width: 400px\n}\n</style>\n```\n\n### Radio buttons with button styling\n\nThe radio group also allows to create a button like styling together with the `NcRadioGroupButton` component:\n\n```vue\n<template>\n\t<div>\n\t\t<h4>With text labels</h4>\n\t\t<div style=\"max-width: 400px\">\n\t\t\t<NcRadioGroup v-model=\"alignment\" label=\"Example alignment\" hide-label>\n\t\t\t\t<NcRadioGroupButton label=\"Start\" value=\"start\" />\n\t\t\t\t<NcRadioGroupButton label=\"Center\" value=\"center\" />\n\t\t\t\t<NcRadioGroupButton label=\"End\" value=\"end\" />\n\t\t\t</NcRadioGroup>\n\t\t</div>\n\n\t\t<br>\n\n\t\t<h4>With icons</h4>\n\t\t<div style=\"max-width: 250px\">\n\t\t\t<NcRadioGroup v-model=\"alignment\" label=\"Example alignment with icons\" hide-label>\n\t\t\t\t<NcRadioGroupButton aria-label=\"Start\" value=\"start\" disabled>\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper directional :path=\"mdiAlignHorizontalLeft\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcRadioGroupButton>\n\t\t\t\t<NcRadioGroupButton aria-label=\"Center\" value=\"center\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiAlignHorizontalCenter\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcRadioGroupButton>\n\t\t\t\t<NcRadioGroupButton aria-label=\"End\" value=\"end\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<NcIconSvgWrapper directional :path=\"mdiAlignHorizontalRight\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcRadioGroupButton>\n\t\t\t</NcRadioGroup>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { mdiAlignHorizontalCenter, mdiAlignHorizontalLeft, mdiAlignHorizontalRight } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\treturn {\n\t\t\tmdiAlignHorizontalCenter,\n\t\t\tmdiAlignHorizontalLeft,\n\t\t\tmdiAlignHorizontalRight,\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\talignment: 'center',\n\t\t}\n\t},\n}\n</script>\n```\n</docs>\n"],"names":["ref","provide","INSIDE_RADIO_GROUP_KEY","computed","Vue"],"mappings":";;;;;;;;AA4EA,MAAA,cAAe;AAAA,EACd,OAAO;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,EAAA;AAET;;;;;;;;;;;;;;AApCA,UAAM,gBAAgBA,IAAAA,IAAA;AAEtBC,gBAAQC,gBAAAA,wBAAwBC,IAAAA,SAAS,OAAO;AAAA,MAC/C,YAAY,MAAM;AAAA,MAClB;AAAA,MACA;AAAA,IAAA,EACC,CAAC;AAOH,aAAS,SAAS,UAAyB;AAC1C,UAAI,cAAc,UAAU,UAAa,cAAc,UAAU,UAAU;AAC1EC,6BAAI,KAAK,KAAK,qFAAqF;AAAA,MACpG;AACA,oBAAc,QAAQ;AAAA,IACvB;AAOA,aAAS,SAAS,OAAe;AAChC,WAAK,qBAAqB,KAAK;AAAA,IAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}