@nextcloud/vue 9.3.3 → 9.5.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 (323) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/assets/{NcActionInput-BxRA_Skn.css → NcActionInput-BO4gR6sg.css} +65 -65
  3. package/dist/assets/{NcAppContent-HF21N7dO.css → NcAppContent-BqcaybfQ.css} +19 -19
  4. package/dist/assets/{NcAppNavigationItem-D97Onpd9.css → NcAppNavigationItem-qicc4X_c.css} +36 -36
  5. package/dist/assets/{NcAppNavigationSearch-BH8hBjGe.css → NcAppNavigationSearch-Bpd_RlYz.css} +5 -5
  6. package/dist/assets/{NcAppNavigationSettings-Bt0dnsjR.css → NcAppNavigationSettings-BmfpoWXN.css} +6 -6
  7. package/dist/assets/{NcAppSettingsDialog-CapZ_qNk.css → NcAppSettingsDialog-Ckc0OWTs.css} +13 -13
  8. package/dist/assets/{NcAppSettingsShortcutsSection-CRO4RakN.css → NcAppSettingsShortcutsSection-BonG0SgH.css} +1 -1
  9. package/dist/assets/{NcAppSidebar-krHtMwId.css → NcAppSidebar-Ci7hXMpX.css} +57 -57
  10. package/dist/assets/{NcAssistantButton-owGSr0s0.css → NcAssistantButton-BmD9GrOw.css} +9 -9
  11. package/dist/assets/{NcAssistantContent-Ban7n3Bg.css → NcAssistantContent-7THxd33X.css} +3 -3
  12. package/dist/assets/{NcAssistantIcon--1biUGYh.css → NcAssistantIcon-CxXrcBfu.css} +4 -4
  13. package/dist/assets/{NcAvatar-f8SJKMDw.css → NcAvatar-CuPj3fbb.css} +24 -24
  14. package/dist/assets/{NcBlurHash-7aGtE-_T.css → NcBlurHash-tWUPu9Oh.css} +2 -2
  15. package/dist/assets/{NcBreadcrumb-CHjeSh0y.css → NcBreadcrumb-D9N_qB_o.css} +15 -15
  16. package/dist/assets/{NcBreadcrumbs-DYfGaSjT.css → NcBreadcrumbs-5gl8Syfa.css} +6 -6
  17. package/dist/assets/{NcButton--Fj4gghF.css → NcButton-Ch8zyY_U.css} +48 -49
  18. package/dist/assets/{NcCheckboxRadioSwitch-DpYt0YbL.css → NcCheckboxRadioSwitch-BBLFj8M-.css} +36 -36
  19. package/dist/assets/{NcChip-DZ8dUSFy.css → NcChip-DbSI4mFP.css} +12 -12
  20. package/dist/assets/{NcCollectionList-C7OiUQQ-.css → NcCollectionList-e5JFvzqX.css} +42 -42
  21. package/dist/assets/{NcColorPicker-CO_Jq2Ow.css → NcColorPicker-CCanY5eB.css} +31 -31
  22. package/dist/assets/{NcDashboardWidget-DFY9GRrd.css → NcDashboardWidget-nZuIL1UN.css} +12 -12
  23. package/dist/assets/{NcDashboardWidgetItem-DPVZ3Oso.css → NcDashboardWidgetItem-DpVmEBwQ.css} +12 -12
  24. package/dist/assets/{NcDateTimePicker-D6xbEbaC.css → NcDateTimePicker-HT1ZTE-Z.css} +234 -234
  25. package/dist/assets/{NcDialog-D3fAX1Fs.css → NcDialog-BSV74Bru.css} +15 -15
  26. package/dist/assets/{NcEmojiPicker-B7xDz_8U.css → NcEmojiPicker-vNKR9S87.css} +122 -122
  27. package/dist/assets/{NcFormBox-D-kcijXp.css → NcFormBox-CRdHJkrd.css} +11 -11
  28. package/dist/assets/{NcFormBoxButton-C6EvdLK4.css → NcFormBoxButton-BWfU7d2r.css} +2 -2
  29. package/dist/assets/{NcFormBoxItem-BfXKp9xJ.css → NcFormBoxItem-CATNOTQx.css} +13 -13
  30. package/dist/assets/{NcFormBoxSwitch-DScgbxtv.css → NcFormBoxSwitch-Cn-MBAzZ.css} +2 -2
  31. package/dist/assets/{NcFormGroup-BrD0Scm7.css → NcFormGroup-BjWhd5Ky.css} +7 -7
  32. package/dist/assets/{NcHotkey-4yi1Hobg.css → NcHotkey-CvuY7fQJ.css} +8 -8
  33. package/dist/assets/{NcHotkeyList-gAZN0WIu.css → NcHotkeyList-Braxeyah.css} +2 -2
  34. package/dist/assets/{NcIconToggleSwitch-C29S_5Rp.css → NcIconToggleSwitch-saytabt5.css} +4 -4
  35. package/dist/assets/{NcInputField-B9DSDOEd.css → NcInputField-B0lNBgr9.css} +44 -43
  36. package/dist/assets/{NcKbd-BGW1_Jb7.css → NcKbd-BeQpGp0b.css} +3 -3
  37. package/dist/assets/{NcListItem-CZnKmy9X.css → NcListItem-Cat18cSx.css} +41 -41
  38. package/dist/assets/{NcListItemIcon-aquns6B7.css → NcListItemIcon-DJRcmlo1.css} +13 -13
  39. package/dist/assets/{NcModal-Du-f0B7Y.css → NcModal-bYmoCrzo.css} +58 -58
  40. package/dist/assets/{NcPasswordField-BCJ0LHSS.css → NcPasswordField-ftYon3Xm.css} +2 -2
  41. package/dist/assets/{NcPopover-CZ3pMU6Y.css → NcPopover-P1fheee2.css} +14 -14
  42. package/dist/assets/{NcProgressBar-BAPOXMAL.css → NcProgressBar-D1DYRrCN.css} +23 -12
  43. package/dist/assets/{NcRadioGroup-1zpSX8V5.css → NcRadioGroup-BoFb0R8S.css} +2 -2
  44. package/dist/assets/{NcRadioGroupButton-DRZ1_-yY.css → NcRadioGroupButton-xGU7fVa3.css} +19 -11
  45. package/dist/assets/{NcRelatedResourcesPanel-DYB-wrU0.css → NcRelatedResourcesPanel-D1efpH8E.css} +3 -3
  46. package/dist/assets/{NcRichContenteditable-BuaWt3Xn.css → NcRichContenteditable-C4KtXEvK.css} +17 -17
  47. package/dist/assets/{NcRichText-RvICaxkO.css → NcRichText-3BHy89Ls.css} +2 -2
  48. package/dist/assets/{NcSelect-ZnE_MlqV.css → NcSelect-CvDEQAjD.css} +1 -1
  49. package/dist/assets/NcSelectUsers-YF5729PJ.css +4 -0
  50. package/dist/assets/{NcSettingsSelectGroup-BxvEAWNm.css → NcSettingsSelectGroup-D_fSrafm.css} +2 -2
  51. package/dist/assets/{NcTextArea-nivEqHE-.css → NcTextArea-_-yGXq-j.css} +1 -1
  52. package/dist/assets/{NcUserBubble-B3Jad98g.css → NcUserBubble-DFUmBxeb.css} +8 -8
  53. package/dist/assets/{referencePickerModal-DWMAMaU3.css → referencePickerModal-CpzDUJ5f.css} +36 -36
  54. package/dist/chunks/{NcActionButtonGroup-B2MGnwK_.mjs → NcActionButtonGroup-C7ej9wLo.mjs} +2 -2
  55. package/dist/chunks/{NcActionButtonGroup-B2MGnwK_.mjs.map → NcActionButtonGroup-C7ej9wLo.mjs.map} +1 -1
  56. package/dist/chunks/{NcActionInput-BemRG66_.mjs → NcActionInput-1xeJpD6P.mjs} +32 -32
  57. package/dist/chunks/NcActionInput-1xeJpD6P.mjs.map +1 -0
  58. package/dist/chunks/{NcActions-4R7icatI.mjs → NcActions-BWDsG06k.mjs} +4 -4
  59. package/dist/chunks/{NcActions-4R7icatI.mjs.map → NcActions-BWDsG06k.mjs.map} +1 -1
  60. package/dist/chunks/{NcAppContent-BTNf1r8Z.mjs → NcAppContent-njY3MCzi.mjs} +16 -14
  61. package/dist/chunks/NcAppContent-njY3MCzi.mjs.map +1 -0
  62. package/dist/chunks/{NcAppNavigation-DQB0KqoZ.mjs → NcAppNavigation-Bpdpz-wF.mjs} +3 -3
  63. package/dist/chunks/{NcAppNavigation-DQB0KqoZ.mjs.map → NcAppNavigation-Bpdpz-wF.mjs.map} +1 -1
  64. package/dist/chunks/{NcAppNavigationCaption-DiLoiMN5.mjs → NcAppNavigationCaption-CyEhlxoS.mjs} +2 -2
  65. package/dist/chunks/{NcAppNavigationCaption-DiLoiMN5.mjs.map → NcAppNavigationCaption-CyEhlxoS.mjs.map} +1 -1
  66. package/dist/chunks/{NcAppNavigationItem-OrqBniiI.mjs → NcAppNavigationItem-Ny1Po7Rd.mjs} +11 -11
  67. package/dist/chunks/NcAppNavigationItem-Ny1Po7Rd.mjs.map +1 -0
  68. package/dist/chunks/{NcAppNavigationNew-WS0F9mau.mjs → NcAppNavigationNew-CJpxzq_I.mjs} +2 -2
  69. package/dist/chunks/{NcAppNavigationNew-WS0F9mau.mjs.map → NcAppNavigationNew-CJpxzq_I.mjs.map} +1 -1
  70. package/dist/chunks/{NcAppNavigationNewItem-DYH3Gimz.mjs → NcAppNavigationNewItem-hsUDrzT-.mjs} +2 -2
  71. package/dist/chunks/{NcAppNavigationNewItem-DYH3Gimz.mjs.map → NcAppNavigationNewItem-hsUDrzT-.mjs.map} +1 -1
  72. package/dist/chunks/{NcAppNavigationSearch-ByuV3q2c.mjs → NcAppNavigationSearch-C5RAT6JQ.mjs} +9 -9
  73. package/dist/chunks/NcAppNavigationSearch-C5RAT6JQ.mjs.map +1 -0
  74. package/dist/chunks/{NcAppNavigationSettings-A0DXzd5B.mjs → NcAppNavigationSettings-BPLJktWz.mjs} +15 -15
  75. package/dist/chunks/NcAppNavigationSettings-BPLJktWz.mjs.map +1 -0
  76. package/dist/chunks/{NcAppSettingsDialog-BaN30xl4.mjs → NcAppSettingsDialog-DddRGyYJ.mjs} +15 -15
  77. package/dist/chunks/NcAppSettingsDialog-DddRGyYJ.mjs.map +1 -0
  78. package/dist/chunks/{NcAppSettingsShortcutsSection-DDmDMMsF.mjs → NcAppSettingsShortcutsSection-D07KOJfT.mjs} +4 -4
  79. package/dist/chunks/{NcAppSettingsShortcutsSection-DDmDMMsF.mjs.map → NcAppSettingsShortcutsSection-D07KOJfT.mjs.map} +1 -1
  80. package/dist/chunks/{NcAppSidebar-as8lzUZp.mjs → NcAppSidebar-BAnJD3ea.mjs} +16 -16
  81. package/dist/chunks/NcAppSidebar-BAnJD3ea.mjs.map +1 -0
  82. package/dist/chunks/{NcAssistantButton-CioiSWRg.mjs → NcAssistantButton-CkFCuTft.mjs} +11 -11
  83. package/dist/chunks/{NcAssistantButton-CioiSWRg.mjs.map → NcAssistantButton-CkFCuTft.mjs.map} +1 -1
  84. package/dist/chunks/{NcAssistantContent-Boi-0v_0.mjs → NcAssistantContent-BR3lWBWC.mjs} +5 -5
  85. package/dist/chunks/{NcAssistantContent-Boi-0v_0.mjs.map → NcAssistantContent-BR3lWBWC.mjs.map} +1 -1
  86. package/dist/chunks/{NcAssistantIcon-8pL-4h5f.mjs → NcAssistantIcon-DsJh5rb7.mjs} +6 -6
  87. package/dist/chunks/{NcAssistantIcon-8pL-4h5f.mjs.map → NcAssistantIcon-DsJh5rb7.mjs.map} +1 -1
  88. package/dist/chunks/{NcAvatar-CK_dTsmT.mjs → NcAvatar-C9d7Wrc8.mjs} +9 -9
  89. package/dist/chunks/NcAvatar-C9d7Wrc8.mjs.map +1 -0
  90. package/dist/chunks/{NcBlurHash-BiFktE2N.mjs → NcBlurHash-Cp7enp4q.mjs} +9 -9
  91. package/dist/chunks/{NcBlurHash-BiFktE2N.mjs.map → NcBlurHash-Cp7enp4q.mjs.map} +1 -1
  92. package/dist/chunks/{NcBreadcrumb-ChYVw5CP.mjs → NcBreadcrumb-BRt3l6x6.mjs} +9 -9
  93. package/dist/chunks/NcBreadcrumb-BRt3l6x6.mjs.map +1 -0
  94. package/dist/chunks/{NcBreadcrumbs-CbJmdlaF.mjs → NcBreadcrumbs-CIsUSeJx.mjs} +5 -5
  95. package/dist/chunks/{NcBreadcrumbs-CbJmdlaF.mjs.map → NcBreadcrumbs-CIsUSeJx.mjs.map} +1 -1
  96. package/dist/chunks/{NcButton-CzpKEx4V.mjs → NcButton-C9D47Igd.mjs} +3 -3
  97. package/dist/chunks/{NcButton-CzpKEx4V.mjs.map → NcButton-C9D47Igd.mjs.map} +1 -1
  98. package/dist/chunks/{NcCheckboxRadioSwitch-DisCqPZK.mjs → NcCheckboxRadioSwitch-BMsPx74L.mjs} +15 -15
  99. package/dist/chunks/NcCheckboxRadioSwitch-BMsPx74L.mjs.map +1 -0
  100. package/dist/chunks/{NcChip-B8jcrLqG.mjs → NcChip-B71t2Ny2.mjs} +8 -8
  101. package/dist/chunks/NcChip-B71t2Ny2.mjs.map +1 -0
  102. package/dist/chunks/{NcCollectionList-TB1GbWbo.mjs → NcCollectionList-BLDdPjtu.mjs} +14 -14
  103. package/dist/chunks/NcCollectionList-BLDdPjtu.mjs.map +1 -0
  104. package/dist/chunks/{NcColorPicker-3wpX7pKD.mjs → NcColorPicker-DDHxR-iN.mjs} +12 -12
  105. package/dist/chunks/NcColorPicker-DDHxR-iN.mjs.map +1 -0
  106. package/dist/chunks/{NcContent-BrRHLO19.mjs → NcContent-O-bMKi-3.mjs} +3 -3
  107. package/dist/chunks/{NcContent-BrRHLO19.mjs.map → NcContent-O-bMKi-3.mjs.map} +1 -1
  108. package/dist/chunks/{NcDashboardWidget-1tax78_e.mjs → NcDashboardWidget-DCBQdRFz.mjs} +7 -7
  109. package/dist/chunks/NcDashboardWidget-DCBQdRFz.mjs.map +1 -0
  110. package/dist/chunks/{NcDashboardWidgetItem-BjsN8uF0.mjs → NcDashboardWidgetItem-ygUG05Ut.mjs} +11 -11
  111. package/dist/chunks/NcDashboardWidgetItem-ygUG05Ut.mjs.map +1 -0
  112. package/dist/chunks/{NcDateTimePicker-DCuHXZjc.mjs → NcDateTimePicker-RLihgV8b.mjs} +69 -25
  113. package/dist/chunks/NcDateTimePicker-RLihgV8b.mjs.map +1 -0
  114. package/dist/chunks/{NcDateTimePickerNative-Dr8_mGlQ.mjs → NcDateTimePickerNative-C_4mwR_o.mjs} +2 -2
  115. package/dist/chunks/{NcDateTimePickerNative-Dr8_mGlQ.mjs.map → NcDateTimePickerNative-C_4mwR_o.mjs.map} +1 -1
  116. package/dist/chunks/{NcDialog-BHl_LOs_.mjs → NcDialog-BG9t4Psg.mjs} +6 -7
  117. package/dist/chunks/{NcDialog-BHl_LOs_.mjs.map → NcDialog-BG9t4Psg.mjs.map} +1 -1
  118. package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-CYpktNKA.mjs → NcDialogButton.vue_vue_type_script_setup_true_lang-DABuSwSR.mjs} +3 -3
  119. package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-CYpktNKA.mjs.map → NcDialogButton.vue_vue_type_script_setup_true_lang-DABuSwSR.mjs.map} +1 -1
  120. package/dist/chunks/{NcEmojiPicker-CReazifM.mjs → NcEmojiPicker-Djc9a0gw.mjs} +25 -25
  121. package/dist/chunks/NcEmojiPicker-Djc9a0gw.mjs.map +1 -0
  122. package/dist/chunks/{NcFormBox-CkgY7Tif.mjs → NcFormBox-BYjllt0m.mjs} +7 -7
  123. package/dist/chunks/NcFormBox-BYjllt0m.mjs.map +1 -0
  124. package/dist/chunks/{NcFormBoxButton-DvMw5yUf.mjs → NcFormBoxButton-RDIKiZIH.mjs} +8 -8
  125. package/dist/chunks/NcFormBoxButton-RDIKiZIH.mjs.map +1 -0
  126. package/dist/chunks/{NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DYtyXBqR.mjs → NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-CIPhWmeP.mjs} +4 -4
  127. package/dist/chunks/NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-CIPhWmeP.mjs.map +1 -0
  128. package/dist/chunks/{NcFormBoxItem-vnU0KmUL.mjs → NcFormBoxItem-BAAPOa6z.mjs} +10 -10
  129. package/dist/chunks/NcFormBoxItem-BAAPOa6z.mjs.map +1 -0
  130. package/dist/chunks/{NcFormBoxSwitch-DGcRJH9Q.mjs → NcFormBoxSwitch-m9uRjJzl.mjs} +6 -6
  131. package/dist/chunks/{NcFormBoxSwitch-DGcRJH9Q.mjs.map → NcFormBoxSwitch-m9uRjJzl.mjs.map} +1 -1
  132. package/dist/chunks/{NcFormGroup-CnSfPFey.mjs → NcFormGroup-Bf8Mme1o.mjs} +9 -9
  133. package/dist/chunks/{NcFormGroup-CnSfPFey.mjs.map → NcFormGroup-Bf8Mme1o.mjs.map} +1 -1
  134. package/dist/chunks/{NcHeaderButton-CIb5SvFk.mjs → NcHeaderButton-DZ7Sd9pu.mjs} +2 -2
  135. package/dist/chunks/{NcHeaderButton-CIb5SvFk.mjs.map → NcHeaderButton-DZ7Sd9pu.mjs.map} +1 -1
  136. package/dist/chunks/{NcHeaderMenu-CeJZT5-m.mjs → NcHeaderMenu-D9WjsIsy.mjs} +2 -2
  137. package/dist/chunks/{NcHeaderMenu-CeJZT5-m.mjs.map → NcHeaderMenu-D9WjsIsy.mjs.map} +1 -1
  138. package/dist/chunks/{NcHotkey-BMbdzaIs.mjs → NcHotkey-Bd-gNn3a.mjs} +7 -7
  139. package/dist/chunks/{NcHotkey-BMbdzaIs.mjs.map → NcHotkey-Bd-gNn3a.mjs.map} +1 -1
  140. package/dist/chunks/{NcHotkeyList-67NnF26Y.mjs → NcHotkeyList-D8hkh6o6.mjs} +5 -5
  141. package/dist/chunks/{NcHotkeyList-67NnF26Y.mjs.map → NcHotkeyList-D8hkh6o6.mjs.map} +1 -1
  142. package/dist/chunks/{NcIconToggleSwitch-DNEYngCw.mjs → NcIconToggleSwitch-CSrdR61T.mjs} +4 -4
  143. package/dist/chunks/{NcIconToggleSwitch-DNEYngCw.mjs.map → NcIconToggleSwitch-CSrdR61T.mjs.map} +1 -1
  144. package/dist/chunks/{NcInputConfirmCancel-DjMO3Xyv.mjs → NcInputConfirmCancel-ClnOVtrc.mjs} +3 -3
  145. package/dist/chunks/{NcInputConfirmCancel-DjMO3Xyv.mjs.map → NcInputConfirmCancel-ClnOVtrc.mjs.map} +1 -1
  146. package/dist/chunks/{NcInputField-Clm9jOGJ.mjs → NcInputField-o5OFv3z6.mjs} +4 -4
  147. package/dist/chunks/{NcInputField-Clm9jOGJ.mjs.map → NcInputField-o5OFv3z6.mjs.map} +1 -1
  148. package/dist/chunks/{NcKbd-CZdynD1d.mjs → NcKbd-DzE_4Z3y.mjs} +5 -5
  149. package/dist/chunks/{NcKbd-CZdynD1d.mjs.map → NcKbd-DzE_4Z3y.mjs.map} +1 -1
  150. package/dist/chunks/{NcListItem-Bx93C7tP.mjs → NcListItem-DSdLnQJX.mjs} +12 -10
  151. package/dist/chunks/NcListItem-DSdLnQJX.mjs.map +1 -0
  152. package/dist/chunks/{NcListItemIcon-DVy6eGJx.mjs → NcListItemIcon-C_yQkDIv.mjs} +9 -9
  153. package/dist/chunks/NcListItemIcon-C_yQkDIv.mjs.map +1 -0
  154. package/dist/chunks/{NcModal-D00OJZV2.mjs → NcModal-DHryP_87.mjs} +7 -7
  155. package/dist/chunks/NcModal-DHryP_87.mjs.map +1 -0
  156. package/dist/chunks/{NcPasswordField-BOZlUwhr.mjs → NcPasswordField-uaMO2pdt.mjs} +9 -9
  157. package/dist/chunks/{NcPasswordField-BOZlUwhr.mjs.map → NcPasswordField-uaMO2pdt.mjs.map} +1 -1
  158. package/dist/chunks/{NcPopover-C-MTaPCs.mjs → NcPopover-OqcYrWOx.mjs} +17 -17
  159. package/dist/chunks/NcPopover-OqcYrWOx.mjs.map +1 -0
  160. package/dist/chunks/{NcProgressBar-DDMAo4h-.mjs → NcProgressBar-OIWW1Sei.mjs} +25 -14
  161. package/dist/chunks/NcProgressBar-OIWW1Sei.mjs.map +1 -0
  162. package/dist/chunks/{NcRadioGroup-HorQ2m39.mjs → NcRadioGroup-Bjl3n_1z.mjs} +8 -8
  163. package/dist/chunks/NcRadioGroup-Bjl3n_1z.mjs.map +1 -0
  164. package/dist/chunks/{NcRadioGroupButton-CAisx7g4.mjs → NcRadioGroupButton-BWPOKDMR.mjs} +18 -10
  165. package/dist/chunks/NcRadioGroupButton-BWPOKDMR.mjs.map +1 -0
  166. package/dist/chunks/{NcRelatedResourcesPanel-Dtxd3-o1.mjs → NcRelatedResourcesPanel-BndhQA8u.mjs} +8 -8
  167. package/dist/chunks/NcRelatedResourcesPanel-BndhQA8u.mjs.map +1 -0
  168. package/dist/chunks/{NcRichContenteditable-B-w64JsT.mjs → NcRichContenteditable-CjuPClU1.mjs} +22 -22
  169. package/dist/chunks/{NcRichContenteditable-B-w64JsT.mjs.map → NcRichContenteditable-CjuPClU1.mjs.map} +1 -1
  170. package/dist/chunks/{NcRichText-1U5RXjPL.mjs → NcRichText-DJlaHs_Q.mjs} +9 -9
  171. package/dist/chunks/NcRichText-DJlaHs_Q.mjs.map +1 -0
  172. package/dist/chunks/{NcSelect-Cc9_a8nG.mjs → NcSelect-DLheQ2yp.mjs} +6 -6
  173. package/dist/chunks/NcSelect-DLheQ2yp.mjs.map +1 -0
  174. package/dist/chunks/{NcSelectTags-JyyA4W_e.mjs → NcSelectTags-CTHyuMcq.mjs} +6 -6
  175. package/dist/chunks/NcSelectTags-CTHyuMcq.mjs.map +1 -0
  176. package/dist/chunks/{NcSelectUsers-DlUM6S6l.mjs → NcSelectUsers-BlMjKkJ3.mjs} +9 -9
  177. package/dist/chunks/NcSelectUsers-BlMjKkJ3.mjs.map +1 -0
  178. package/dist/chunks/{NcSettingsSection-BcLE6UnZ.mjs → NcSettingsSection-BiX5No3C.mjs} +2 -2
  179. package/dist/chunks/{NcSettingsSection-BcLE6UnZ.mjs.map → NcSettingsSection-BiX5No3C.mjs.map} +1 -1
  180. package/dist/chunks/{NcSettingsSelectGroup-CUU-GWYl.mjs → NcSettingsSelectGroup-B69Mhcar.mjs} +10 -10
  181. package/dist/chunks/NcSettingsSelectGroup-B69Mhcar.mjs.map +1 -0
  182. package/dist/chunks/{NcTextArea-PIs9Kt0A.mjs → NcTextArea-CWA3KOiC.mjs} +2 -2
  183. package/dist/chunks/{NcTextArea-PIs9Kt0A.mjs.map → NcTextArea-CWA3KOiC.mjs.map} +1 -1
  184. package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-CCsZqnkM.mjs → NcTextField.vue_vue_type_script_setup_true_lang-BxkYy7wv.mjs} +3 -3
  185. package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-CCsZqnkM.mjs.map → NcTextField.vue_vue_type_script_setup_true_lang-BxkYy7wv.mjs.map} +1 -1
  186. package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-BffYEppS.mjs → NcTimezonePicker.vue_vue_type_script_setup_true_lang-B7nhSDot.mjs} +4 -4
  187. package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-BffYEppS.mjs.map → NcTimezonePicker.vue_vue_type_script_setup_true_lang-B7nhSDot.mjs.map} +1 -1
  188. package/dist/chunks/{NcUserBubble-Cs84CNHz.mjs → NcUserBubble-vOAXLHB5.mjs} +11 -11
  189. package/dist/chunks/{NcUserBubble-Cs84CNHz.mjs.map → NcUserBubble-vOAXLHB5.mjs.map} +1 -1
  190. package/dist/chunks/{NcUserStatusIcon-BgElapLh.mjs → NcUserStatusIcon-XiwrgeCm.mjs} +2 -2
  191. package/dist/chunks/{NcUserStatusIcon-BgElapLh.mjs.map → NcUserStatusIcon-XiwrgeCm.mjs.map} +1 -1
  192. package/dist/chunks/_l10n-Dq_eYxz_.mjs +145 -0
  193. package/dist/chunks/_l10n-Dq_eYxz_.mjs.map +1 -0
  194. package/dist/chunks/{appName-DtnLUijR.mjs → appName-DyNMVZpX.mjs} +12 -7
  195. package/dist/chunks/appName-DyNMVZpX.mjs.map +1 -0
  196. package/dist/chunks/{colors-CL_wvNtd.mjs → colors-BHGKZFDI.mjs} +11 -31
  197. package/dist/chunks/colors-BHGKZFDI.mjs.map +1 -0
  198. package/dist/chunks/{referencePickerModal-CXAtbcPd.mjs → referencePickerModal-D9HwChP3.mjs} +29 -29
  199. package/dist/chunks/referencePickerModal-D9HwChP3.mjs.map +1 -0
  200. package/dist/chunks/{useCopy-D4CcMqlA.mjs → useCopy-CfYsbB0V.mjs} +2 -2
  201. package/dist/chunks/{useCopy-D4CcMqlA.mjs.map → useCopy-CfYsbB0V.mjs.map} +1 -1
  202. package/dist/components/NcActionButtonGroup/index.mjs +1 -1
  203. package/dist/components/NcActionInput/NcActionInput.vue.d.ts +11 -0
  204. package/dist/components/NcActionInput/index.mjs +1 -1
  205. package/dist/components/NcActions/index.mjs +1 -1
  206. package/dist/components/NcAppContent/NcAppContent.vue.d.ts +2 -0
  207. package/dist/components/NcAppContent/index.mjs +1 -1
  208. package/dist/components/NcAppNavigation/index.mjs +1 -1
  209. package/dist/components/NcAppNavigationCaption/index.mjs +1 -1
  210. package/dist/components/NcAppNavigationItem/index.mjs +1 -1
  211. package/dist/components/NcAppNavigationNew/index.mjs +1 -1
  212. package/dist/components/NcAppNavigationNewItem/index.mjs +1 -1
  213. package/dist/components/NcAppNavigationSearch/index.mjs +1 -1
  214. package/dist/components/NcAppNavigationSettings/index.mjs +1 -1
  215. package/dist/components/NcAppSettingsDialog/index.mjs +1 -1
  216. package/dist/components/NcAppSettingsSectionShortcuts/index.mjs +1 -1
  217. package/dist/components/NcAppSettingsShortcutsSection/index.mjs +1 -1
  218. package/dist/components/NcAppSidebar/index.mjs +1 -1
  219. package/dist/components/NcAssistantButton/index.mjs +1 -1
  220. package/dist/components/NcAssistantContent/index.mjs +1 -1
  221. package/dist/components/NcAssistantIcon/index.mjs +1 -1
  222. package/dist/components/NcAvatar/index.mjs +1 -1
  223. package/dist/components/NcBlurHash/index.mjs +1 -1
  224. package/dist/components/NcBreadcrumb/index.mjs +1 -1
  225. package/dist/components/NcBreadcrumbs/index.mjs +1 -1
  226. package/dist/components/NcButton/index.mjs +1 -1
  227. package/dist/components/NcCheckboxRadioSwitch/index.mjs +1 -1
  228. package/dist/components/NcChip/index.mjs +1 -1
  229. package/dist/components/NcCollectionList/index.mjs +1 -1
  230. package/dist/components/NcColorPicker/index.mjs +1 -1
  231. package/dist/components/NcContent/index.mjs +1 -1
  232. package/dist/components/NcDashboardWidget/index.mjs +1 -1
  233. package/dist/components/NcDashboardWidgetItem/index.mjs +1 -1
  234. package/dist/components/NcDateTimePicker/NcDateTimePicker.vue.d.ts +19 -0
  235. package/dist/components/NcDateTimePicker/index.mjs +1 -1
  236. package/dist/components/NcDateTimePickerNative/index.mjs +1 -1
  237. package/dist/components/NcDialog/index.mjs +1 -1
  238. package/dist/components/NcDialogButton/index.mjs +1 -1
  239. package/dist/components/NcEmojiPicker/NcEmojiPicker.vue.d.ts +1 -2
  240. package/dist/components/NcEmojiPicker/index.mjs +1 -1
  241. package/dist/components/NcFormBox/index.mjs +1 -1
  242. package/dist/components/NcFormBoxButton/index.mjs +1 -1
  243. package/dist/components/NcFormBoxCopyButton/index.mjs +1 -1
  244. package/dist/components/NcFormBoxSwitch/index.mjs +1 -1
  245. package/dist/components/NcFormGroup/index.mjs +1 -1
  246. package/dist/components/NcHeaderButton/index.mjs +1 -1
  247. package/dist/components/NcHeaderMenu/index.mjs +1 -1
  248. package/dist/components/NcHotkey/index.mjs +1 -1
  249. package/dist/components/NcHotkeyList/index.mjs +1 -1
  250. package/dist/components/NcInputField/index.mjs +1 -1
  251. package/dist/components/NcKbd/index.mjs +1 -1
  252. package/dist/components/NcListItem/NcListItem.vue.d.ts +2 -1
  253. package/dist/components/NcListItem/index.mjs +1 -1
  254. package/dist/components/NcListItemIcon/index.mjs +1 -1
  255. package/dist/components/NcModal/index.mjs +1 -1
  256. package/dist/components/NcPasswordField/index.mjs +1 -1
  257. package/dist/components/NcPopover/index.mjs +1 -1
  258. package/dist/components/NcProgressBar/NcProgressBar.vue.d.ts +9 -0
  259. package/dist/components/NcProgressBar/index.mjs +1 -1
  260. package/dist/components/NcRadioGroup/index.mjs +1 -1
  261. package/dist/components/NcRadioGroupButton/NcRadioGroupButton.vue.d.ts +4 -0
  262. package/dist/components/NcRadioGroupButton/index.mjs +1 -1
  263. package/dist/components/NcRelatedResourcesPanel/index.mjs +1 -1
  264. package/dist/components/NcRichContenteditable/index.mjs +1 -1
  265. package/dist/components/NcRichText/index.mjs +3 -3
  266. package/dist/components/NcSelect/index.mjs +1 -1
  267. package/dist/components/NcSelectTags/index.mjs +1 -1
  268. package/dist/components/NcSelectUsers/NcSelectUsers.vue.d.ts +5 -5
  269. package/dist/components/NcSelectUsers/index.d.ts +1 -0
  270. package/dist/components/NcSelectUsers/index.mjs +1 -1
  271. package/dist/components/NcSettingsSection/index.mjs +1 -1
  272. package/dist/components/NcSettingsSelectGroup/index.mjs +1 -1
  273. package/dist/components/NcTextArea/index.mjs +1 -1
  274. package/dist/components/NcTextField/index.mjs +1 -1
  275. package/dist/components/NcTimezonePicker/index.mjs +1 -1
  276. package/dist/components/NcUserBubble/index.mjs +1 -1
  277. package/dist/components/NcUserStatusIcon/index.mjs +1 -1
  278. package/dist/composables/useFormatDateTime/index.mjs +1 -1
  279. package/dist/functions/reference/index.mjs +1 -1
  280. package/dist/functions/usernameToColor/index.mjs +1 -1
  281. package/dist/index.mjs +67 -67
  282. package/dist/utils/appName.d.ts +6 -2
  283. package/package.json +24 -24
  284. package/dist/assets/NcSelectUsers-BWhtNRbI.css +0 -4
  285. package/dist/chunks/NcActionInput-BemRG66_.mjs.map +0 -1
  286. package/dist/chunks/NcAppContent-BTNf1r8Z.mjs.map +0 -1
  287. package/dist/chunks/NcAppNavigationItem-OrqBniiI.mjs.map +0 -1
  288. package/dist/chunks/NcAppNavigationSearch-ByuV3q2c.mjs.map +0 -1
  289. package/dist/chunks/NcAppNavigationSettings-A0DXzd5B.mjs.map +0 -1
  290. package/dist/chunks/NcAppSettingsDialog-BaN30xl4.mjs.map +0 -1
  291. package/dist/chunks/NcAppSidebar-as8lzUZp.mjs.map +0 -1
  292. package/dist/chunks/NcAvatar-CK_dTsmT.mjs.map +0 -1
  293. package/dist/chunks/NcBreadcrumb-ChYVw5CP.mjs.map +0 -1
  294. package/dist/chunks/NcCheckboxRadioSwitch-DisCqPZK.mjs.map +0 -1
  295. package/dist/chunks/NcChip-B8jcrLqG.mjs.map +0 -1
  296. package/dist/chunks/NcCollectionList-TB1GbWbo.mjs.map +0 -1
  297. package/dist/chunks/NcColorPicker-3wpX7pKD.mjs.map +0 -1
  298. package/dist/chunks/NcDashboardWidget-1tax78_e.mjs.map +0 -1
  299. package/dist/chunks/NcDashboardWidgetItem-BjsN8uF0.mjs.map +0 -1
  300. package/dist/chunks/NcDateTimePicker-DCuHXZjc.mjs.map +0 -1
  301. package/dist/chunks/NcEmojiPicker-CReazifM.mjs.map +0 -1
  302. package/dist/chunks/NcFormBox-CkgY7Tif.mjs.map +0 -1
  303. package/dist/chunks/NcFormBoxButton-DvMw5yUf.mjs.map +0 -1
  304. package/dist/chunks/NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DYtyXBqR.mjs.map +0 -1
  305. package/dist/chunks/NcFormBoxItem-vnU0KmUL.mjs.map +0 -1
  306. package/dist/chunks/NcListItem-Bx93C7tP.mjs.map +0 -1
  307. package/dist/chunks/NcListItemIcon-DVy6eGJx.mjs.map +0 -1
  308. package/dist/chunks/NcModal-D00OJZV2.mjs.map +0 -1
  309. package/dist/chunks/NcPopover-C-MTaPCs.mjs.map +0 -1
  310. package/dist/chunks/NcProgressBar-DDMAo4h-.mjs.map +0 -1
  311. package/dist/chunks/NcRadioGroup-HorQ2m39.mjs.map +0 -1
  312. package/dist/chunks/NcRadioGroupButton-CAisx7g4.mjs.map +0 -1
  313. package/dist/chunks/NcRelatedResourcesPanel-Dtxd3-o1.mjs.map +0 -1
  314. package/dist/chunks/NcRichText-1U5RXjPL.mjs.map +0 -1
  315. package/dist/chunks/NcSelect-Cc9_a8nG.mjs.map +0 -1
  316. package/dist/chunks/NcSelectTags-JyyA4W_e.mjs.map +0 -1
  317. package/dist/chunks/NcSelectUsers-DlUM6S6l.mjs.map +0 -1
  318. package/dist/chunks/NcSettingsSelectGroup-CUU-GWYl.mjs.map +0 -1
  319. package/dist/chunks/_l10n-CgsPi8nC.mjs +0 -145
  320. package/dist/chunks/_l10n-CgsPi8nC.mjs.map +0 -1
  321. package/dist/chunks/appName-DtnLUijR.mjs.map +0 -1
  322. package/dist/chunks/colors-CL_wvNtd.mjs.map +0 -1
  323. package/dist/chunks/referencePickerModal-CXAtbcPd.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NcModal-DHryP_87.mjs","sources":["../../src/composables/useScopeIdAttrs.ts","../../src/components/NcModal/NcModal.vue"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { ComponentInternalInstance } from 'vue'\n\nimport { getCurrentInstance, warn } from 'vue'\n\n/**\n * Get the parent instance of the instance only if the instance is the root node of the parent\n * - Parent > Child - same root node\n * - Parent > div > Child - different root node\n * - Parent > WrapperWithSlot > Child - different root node\n *\n * @param instance - Current instance (internal)\n */\nfunction getSameNodeParent(instance: ComponentInternalInstance): ComponentInternalInstance | null {\n\tif (!instance.parent) {\n\t\treturn null\n\t}\n\n\tif ('vapor' in instance || 'vapor' in instance.parent) {\n\t\twarn('Vapor instances are not supported in useScopeIdAttrs :(')\n\t\treturn null\n\t}\n\n\tif (instance.parent.subTree !== instance.vnode) {\n\t\treturn null\n\t}\n\n\treturn instance.parent\n}\n\n/**\n * Get all ancestor instances of the instance that are on the same root node\n *\n * @param instance - Current instance (internal)\n */\nfunction getSameNodeAncestors(instance: ComponentInternalInstance): ComponentInternalInstance[] {\n\tconst ancestors: ComponentInternalInstance[] = [instance]\n\tlet parent = getSameNodeParent(instance)\n\twhile (parent) {\n\t\tancestors.push(parent)\n\t\tparent = getSameNodeParent(parent)\n\t}\n\treturn ancestors\n}\n\n/**\n * Get a binding object for all data-v-scopeid attributes that are supposed to be on the root node.\n * It allows to have scoped styles from parents in edge cases not covered by Vue:\n * - Teleport on the root\n * - Fragments\n *\n * @todo Do we need to support slotScopeIds for `:slotted()`?\n *\n * @example\n * ```ts\n * <script setup>\n * import { useScopeIdAttrs } from './useScopeIdAttrs.ts'\n * const scopeIdAttrs = useScopeIdAttrs()\n * </script>\n * <template>\n * <teleport to=\"body\">\n * <div v-bind=\"scopeIdAttrs\" />\n * </teleport>\n * </template>\n * ```\n */\nexport function useScopeIdAttrs() {\n\tconst instance = getCurrentInstance()\n\n\tif (!instance) {\n\t\tthrow new Error('useScopeId must be called within a setup context')\n\t}\n\n\tconst sameNodeAncestors = getSameNodeAncestors(instance)\n\tconst scopeIds = sameNodeAncestors.map((instance) => instance.vnode.scopeId).filter(Boolean)\n\tconst scopeIdAttrs = Object.fromEntries(scopeIds.map((scopeId) => [scopeId, '']))\n\treturn scopeIdAttrs\n}\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { UseSwipeDirection } from '@vueuse/core'\nimport type { FocusTargetValueOrFalse, FocusTrap, Options as FocusTrapOptions } from 'focus-trap'\nimport type { Slot } from 'vue'\n\nimport { mdiChevronLeft, mdiChevronRight, mdiClose, mdiPause, mdiPlay } from '@mdi/js'\nimport { useIntervalFn, useSwipe } from '@vueuse/core'\nimport { createFocusTrap } from 'focus-trap'\nimport { computed, nextTick, onMounted, onUnmounted, ref, toRef, useTemplateRef, warn, watch, watchEffect } from 'vue'\nimport NcActions from '../NcActions/NcActions.vue'\nimport NcButton from '../NcButton/NcButton.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport { useHotKey } from '../../composables/index.ts'\nimport { useScopeIdAttrs } from '../../composables/useScopeIdAttrs.ts'\nimport { t } from '../../l10n.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { getTrapStack } from '../../utils/focusTrap.ts'\nimport { isRtl } from '../../utils/rtl.ts'\n\ndefineOptions({ inheritAttrs: false })\n\n/**\n * The show-state of the modal.\n */\nconst showModal = defineModel<boolean>('show', { default: true })\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * Name to be shown with the modal\n\t */\n\tname?: string\n\n\t/**\n\t * Declare if a previous slide is available\n\t */\n\thasPrevious?: boolean\n\n\t/**\n\t * Declare if a next slide is available\n\t */\n\thasNext?: boolean\n\n\t/**\n\t * Declare if hiding the modal should be animated\n\t */\n\toutTransition?: boolean\n\n\t/**\n\t * Declare if the slideshow functionality should be enabled\n\t */\n\tenableSlideshow?: boolean\n\n\t/**\n\t * Declare the slide interval\n\t */\n\tslideshowDelay?: number\n\n\t/**\n\t * Allow to pause an ongoing slideshow\n\t */\n\tslideshowPaused?: boolean\n\n\t/**\n\t * Disable swipe between slides\n\t */\n\tdisableSwipe?: boolean\n\n\t/**\n\t * Enable spread navigation\n\t */\n\tspreadNavigation?: boolean\n\n\t/**\n\t * Defines the modal size.\n\t * All sizes except 'small' change automatically to full-screen on mobile.\n\t */\n\tsize?: 'small' | 'normal' | 'large' | 'full'\n\n\t/**\n\t * Do not show the close button for the dialog.\n\t */\n\tnoClose?: boolean\n\n\t/**\n\t * Close the modal if the user clicked outside the modal\n\t * Only relevant if `noClose` is not set.\n\t */\n\tcloseOnClickOutside?: boolean\n\n\t/**\n\t * Makes the modal backdrop opaque if true\n\t * Will be overwritten if some buttons are shown outside\n\t */\n\tdark?: boolean\n\n\t/**\n\t * Set light backdrop. Makes the modal header appear light.\n\t */\n\tlightBackdrop?: boolean\n\n\t/**\n\t * Selector for the modal container, pass `null` to prevent automatic container mounting\n\t */\n\tcontainer?: string | null\n\n\t/**\n\t * Pass in `true` if you want the modal 'close' button to be displayed\n\t * outside the modal boundaries, in the top right corner of the window.\n\t *\n\t * @since 8.25.0\n\t */\n\tcloseButtonOutside?: boolean\n\n\t/**\n\t * Additional elements to add to the focus trap\n\t */\n\tadditionalTrapElements?: (string | HTMLElement)[]\n\n\t/**\n\t * Display x items inline\n\t *\n\t * @see NcActions component usage\n\t */\n\tinlineActions?: number\n\n\t/**\n\t * Id of the element that labels the dialog (the name)\n\t * Not needed if the `name` prop is set, but if no name is set you need to provide the ID of an element to label the dialog for accessibility.\n\t */\n\tlabelId?: string\n\n\t/**\n\t * Set element to return focus to after focus trap deactivation\n\t */\n\tsetReturnFocus?: FocusTargetValueOrFalse\n}>(), {\n\tadditionalTrapElements: () => [],\n\tcontainer: 'body',\n\tinlineActions: 0,\n\tlabelId: '',\n\tslideshowDelay: 5000,\n\tsize: 'normal',\n\tname: '',\n\tsetReturnFocus: undefined,\n})\n\nconst emit = defineEmits<{\n\t/**\n\t * Trigger showing the next slide.\n\t *\n\t * @param payload - The event that triggered showing the next slide\n\t */\n\tnext: [payload?: Event]\n\n\t/**\n\t * Trigger showing the previous slide.\n\t *\n\t * @param payload - The event that triggered showing the previous slide\n\t */\n\tprevious: [payload?: Event]\n\n\t/**\n\t * Emitted when the closing animation is finished\n\t *\n\t * @param payload - The event that triggered the close\n\t */\n\tclose: [payload?: Event]\n\n\t/**\n\t * @param payload - The new show-state\n\t */\n\t'update:show': [payload: boolean]\n}>()\n\ndefineSlots<{\n\t/**\n\t * Actions to show (one or more NcAction* components)\n\t */\n\tactions?: Slot\n\n\t/**\n\t * The modal content to show.\n\t */\n\tdefault?: Slot\n}>()\n\nconst scopeIdAttrs = useScopeIdAttrs()\n\nconst modalId = createElementId()\nconst maskElement = useTemplateRef('mask')\n\n// Set up the focus trap\nlet focusTrap: FocusTrap | undefined\nonMounted(() => useFocusTrap())\nonUnmounted(() => clearFocusTrap())\nwatch(() => props.additionalTrapElements, (elements) => {\n\tif (focusTrap) {\n\t\tfocusTrap.updateContainerElements([maskElement.value!, ...elements])\n\t}\n})\n\n// Set up the slideshow\nconst {\n\tisActive: isPlaying,\n\tpause: stopSlideshow,\n\tresume: startSlideshow,\n} = useIntervalFn(nextSlide, toRef(() => props.slideshowDelay), { immediate: false })\n\nconst animationKey = ref(0)\nconst runSlideshow = ref(false)\nwatchEffect(() => {\n\tif (runSlideshow.value && !props.slideshowPaused) {\n\t\tstartSlideshow()\n\t} else if (isPlaying.value) {\n\t\tstopSlideshow()\n\t}\n})\n\nconst cssSlideshowDelay = computed(() => `${props.slideshowDelay}ms`)\n\n// Setup swipe navigation\nconst { stop: stopSwipe } = useSwipe(maskElement, {\n\tonSwipeEnd: handleSwipe,\n})\nonUnmounted(stopSwipe)\n\n// Setup hotkeys (keyboard navigation)\nuseHotKey('Escape', () => {\n\tconst trapStack = getTrapStack()\n\t// Only close the most recent focus trap modal\n\tif (trapStack.at(-1) === focusTrap) {\n\t\tclose()\n\t}\n}, { allowInModal: true })\n\nuseHotKey(['ArrowLeft', 'ArrowRight'], (event) => {\n\t// Ignore arrow navigation, if there is a current focus outside the modal.\n\t// For example, when the focus is in Sidebar or NcActions' items,\n\t// arrow navigation should not be intercepted by modal slider\n\tif (document.activeElement && !maskElement.value!.contains(document.activeElement)) {\n\t\treturn\n\t}\n\n\tif ((event.key === 'ArrowLeft') !== isRtl) {\n\t\tpreviousSlide()\n\t} else {\n\t\tnextSlide()\n\t}\n}, { allowInModal: true })\n\n// for developers we should add a warning if used with invalid props combination\nonMounted(() => {\n\tif (!props.name && !props.labelId) {\n\t\twarn('[NcModal] You need either set the name or set a `labelId` for accessibility.')\n\t}\n})\n\n/**\n * Trigger showing the next slide\n *\n * @param event - The mouse click event if triggered by user\n */\nfunction nextSlide(event?: Event) {\n\tif (!props.hasNext) {\n\t\trunSlideshow.value = false\n\t\t// do not send the event if nothing is available\n\t\treturn\n\t}\n\n\tif (event && isPlaying.value) {\n\t\trestartSlideshow()\n\t}\n\temit('next', event)\n}\n\n/**\n * Trigger showing the previous slide\n *\n * @param event - The mouse click event if triggered by user\n */\nfunction previousSlide(event?: Event) {\n\tif (!props.hasPrevious) {\n\t\t// do not send the event if nothing is available\n\t\treturn\n\t}\n\n\tif (event && isPlaying.value) {\n\t\trestartSlideshow()\n\t}\n\temit('previous', event)\n}\n\n/**\n * handle the swipe event\n *\n * @param e - The touch event\n * @param direction - Swipe direction\n */\nfunction handleSwipe(e: TouchEvent, direction: UseSwipeDirection) {\n\tif (!props.disableSwipe) {\n\t\tif (direction !== 'left' && direction !== 'right') {\n\t\t\treturn\n\t\t}\n\n\t\tif ((direction === 'left') !== isRtl) {\n\t\t\tnextSlide(e)\n\t\t} else {\n\t\t\tpreviousSlide(e)\n\t\t}\n\t}\n}\n\n/**\n * Reset the slideshow interval and animation\n */\nfunction restartSlideshow() {\n\tstopSlideshow()\n\tstartSlideshow()\n\tanimationKey.value++\n}\n\n/**\n * Handle closing the modal.\n *\n * @param event - The event that triggered closing the modal\n */\nfunction close(event?: Event) {\n\t// do not fire event if forbidden\n\tif (props.noClose) {\n\t\treturn\n\t}\n\n\tshowModal.value = false\n\n\t// delay closing for animation\n\tsetTimeout(() => {\n\t\temit('close', event)\n\t}, 300)\n}\n\n/**\n * Handle click on modal wrapper\n * If `closeOnClickOutside` is set the modal will be closed\n *\n * @param event - The click event\n */\nfunction handleClickModalWrapper(event: MouseEvent) {\n\tif (props.closeOnClickOutside) {\n\t\tclose(event)\n\t}\n}\n\n/**\n * Add focus trap for accessibility.\n */\nasync function useFocusTrap() {\n\t// Don't do anything if the modal is hidden,\n\t// or we have a focus trap already\n\tif (!showModal.value || focusTrap) {\n\t\treturn\n\t}\n\n\t// wait until all children are mounted and available in the DOM before focusTrap can be added\n\tawait nextTick()\n\n\tconst options: FocusTrapOptions = {\n\t\tallowOutsideClick: true,\n\t\tfallbackFocus: maskElement.value!,\n\t\ttrapStack: getTrapStack(),\n\t\t// Esc can be used without stop in content or additionalTrapElements where it should not deactivate modal's focus trap.\n\t\t// Focus trap is deactivated on modal close anyway.\n\t\tescapeDeactivates: false,\n\t\tsetReturnFocus: props.setReturnFocus,\n\t}\n\n\t// Init focus trap\n\tfocusTrap = createFocusTrap([maskElement.value!, ...props.additionalTrapElements], options)\n\tfocusTrap.activate()\n}\n\n/**\n * Deactivate the active focus trap - if any.\n */\nfunction clearFocusTrap() {\n\tif (!focusTrap) {\n\t\treturn\n\t}\n\tfocusTrap?.deactivate()\n\tfocusTrap = undefined\n}\n</script>\n\n<template>\n\t<Teleport :disabled=\"container === null\" :to=\"container\">\n\t\t<transition\n\t\t\tname=\"fade\"\n\t\t\tappear\n\t\t\t@afterEnter=\"useFocusTrap\"\n\t\t\t@beforeLeave=\"clearFocusTrap\">\n\t\t\t<div\n\t\t\t\tv-show=\"showModal\"\n\t\t\t\tv-bind=\"{ ...$attrs, ...scopeIdAttrs }\"\n\t\t\t\tref=\"mask\"\n\t\t\t\tclass=\"modal-mask\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'modal-mask--opaque': dark || closeButtonOutside || hasPrevious || hasNext,\n\t\t\t\t\t'modal-mask--light': lightBackdrop,\n\t\t\t\t}\"\n\t\t\t\trole=\"dialog\"\n\t\t\t\taria-modal=\"true\"\n\t\t\t\t:aria-labelledby=\"labelId || `modal-name-${modalId}`\"\n\t\t\t\t:aria-describedby=\"'modal-description-' + modalId\"\n\t\t\t\ttabindex=\"-1\">\n\t\t\t\t<!-- Header -->\n\t\t\t\t<transition name=\"fade-visibility\" appear>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"modal-header\"\n\t\t\t\t\t\t:data-theme-light=\"lightBackdrop\"\n\t\t\t\t\t\t:data-theme-dark=\"!lightBackdrop\">\n\t\t\t\t\t\t<h2\n\t\t\t\t\t\t\tv-if=\"name.trim() !== ''\"\n\t\t\t\t\t\t\t:id=\"'modal-name-' + modalId\"\n\t\t\t\t\t\t\tclass=\"modal-header__name\">\n\t\t\t\t\t\t\t{{ name }}\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t<div class=\"icons-menu\">\n\t\t\t\t\t\t\t<!-- Play-pause toggle -->\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tv-if=\"hasNext && enableSlideshow\"\n\t\t\t\t\t\t\t\tclass=\"play-pause-icons\"\n\t\t\t\t\t\t\t\t:class=\"{ 'play-pause-icons--paused': slideshowPaused }\"\n\t\t\t\t\t\t\t\t:title=\"isPlaying ? t('Pause slideshow') : t('Start slideshow')\"\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t@click=\"runSlideshow = !runSlideshow\">\n\t\t\t\t\t\t\t\t<!-- Play/pause icons -->\n\t\t\t\t\t\t\t\t<NcIconSvgWrapper\n\t\t\t\t\t\t\t\t\tclass=\"play-pause-icons__icon\"\n\t\t\t\t\t\t\t\t\tinline\n\t\t\t\t\t\t\t\t\t:name=\"isPlaying ? t('Pause slideshow') : t('Start slideshow')\"\n\t\t\t\t\t\t\t\t\t:path=\"isPlaying ? mdiPause : mdiPlay\" />\n\n\t\t\t\t\t\t\t\t<!-- Progress circle, css animated -->\n\t\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\t\tv-if=\"isPlaying\"\n\t\t\t\t\t\t\t\t\t:key=\"`${modalId}-animation-${animationKey}`\"\n\t\t\t\t\t\t\t\t\tclass=\"progress-ring\"\n\t\t\t\t\t\t\t\t\theight=\"50\"\n\t\t\t\t\t\t\t\t\twidth=\"50\">\n\t\t\t\t\t\t\t\t\t<circle\n\t\t\t\t\t\t\t\t\t\tclass=\"progress-ring__circle\"\n\t\t\t\t\t\t\t\t\t\tstroke=\"white\"\n\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\tfill=\"transparent\"\n\t\t\t\t\t\t\t\t\t\tr=\"15\"\n\t\t\t\t\t\t\t\t\t\tcx=\"25\"\n\t\t\t\t\t\t\t\t\t\tcy=\"25\" />\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t\t<!-- Actions menu -->\n\t\t\t\t\t\t\t<NcActions class=\"header-actions\" :inline=\"inlineActions\">\n\t\t\t\t\t\t\t\t<slot name=\"actions\" />\n\t\t\t\t\t\t\t</NcActions>\n\n\t\t\t\t\t\t\t<!-- Close modal -->\n\t\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\t\tv-if=\"!noClose && closeButtonOutside\"\n\t\t\t\t\t\t\t\t:aria-label=\"t('Close')\"\n\t\t\t\t\t\t\t\tclass=\"header-close\"\n\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\t@click=\"close\">\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiClose\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</transition>\n\n\t\t\t\t<!-- Content wrapper -->\n\t\t\t\t<transition :name=\"`modal-${outTransition ? 'out' : 'in'}`\" appear>\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-show=\"showModal\"\n\t\t\t\t\t\tclass=\"modal-wrapper\"\n\t\t\t\t\t\t:class=\"[\n\t\t\t\t\t\t\t`modal-wrapper--${size}`,\n\t\t\t\t\t\t\t{ 'modal-wrapper--spread-navigation': spreadNavigation },\n\t\t\t\t\t\t]\"\n\t\t\t\t\t\t@mousedown.self=\"handleClickModalWrapper\">\n\t\t\t\t\t\t<!-- Navigation button -->\n\t\t\t\t\t\t<transition name=\"fade-visibility\" appear>\n\t\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\t\tv-show=\"hasPrevious\"\n\t\t\t\t\t\t\t\t:aria-label=\"t('Previous')\"\n\t\t\t\t\t\t\t\tclass=\"prev\"\n\t\t\t\t\t\t\t\tvariant=\"tertiary-no-background\"\n\t\t\t\t\t\t\t\t@click=\"previousSlide\">\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<NcIconSvgWrapper\n\t\t\t\t\t\t\t\t\t\tdirectional\n\t\t\t\t\t\t\t\t\t\t:path=\"mdiChevronLeft\"\n\t\t\t\t\t\t\t\t\t\t:size=\"40\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t</transition>\n\n\t\t\t\t\t\t<!-- Content -->\n\t\t\t\t\t\t<div :id=\"'modal-description-' + modalId\" class=\"modal-container\">\n\t\t\t\t\t\t\t<div class=\"modal-container__content\">\n\t\t\t\t\t\t\t\t<slot />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<!-- Close modal -->\n\t\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\t\tv-if=\"!noClose && !closeButtonOutside\"\n\t\t\t\t\t\t\t\t:aria-label=\"t('Close')\"\n\t\t\t\t\t\t\t\tclass=\"modal-container__close\"\n\t\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\t\t@click=\"close\">\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<NcIconSvgWrapper :path=\"mdiClose\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<!-- Navigation button -->\n\t\t\t\t\t\t<transition name=\"fade-visibility\" appear>\n\t\t\t\t\t\t\t<NcButton\n\t\t\t\t\t\t\t\tv-show=\"hasNext\"\n\t\t\t\t\t\t\t\t:aria-label=\"t('Next')\"\n\t\t\t\t\t\t\t\tclass=\"next\"\n\t\t\t\t\t\t\t\tvariant=\"tertiary-no-background\"\n\t\t\t\t\t\t\t\t@click=\"nextSlide\">\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<NcIconSvgWrapper\n\t\t\t\t\t\t\t\t\t\tdirectional\n\t\t\t\t\t\t\t\t\t\t:path=\"mdiChevronRight\"\n\t\t\t\t\t\t\t\t\t\t:size=\"40\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t</transition>\n\t\t\t\t\t</div>\n\t\t\t\t</transition>\n\t\t\t</div>\n\t\t</transition>\n\t</Teleport>\n</template>\n\n<style lang=\"scss\" scoped>\n\n.modal-mask {\n\tposition: fixed;\n\tz-index: 9998;\n\ttop: 0;\n\tinset-inline-start: 0;\n\tdisplay: block;\n\twidth: 100%;\n\theight: 100%;\n\t--backdrop-color: 0, 0, 0;\n\tbackground-color: rgba(var(--backdrop-color), .5);\n\n\t&,\n\t& * {\n\t\tbox-sizing: border-box;\n\t}\n\n\t&--opaque {\n\t\tbackground-color: rgba(var(--backdrop-color), .92);\n\t}\n\t&--light {\n\t\t--backdrop-color: 255, 255, 255;\n\t}\n}\n\n.modal-header {\n\tposition: absolute;\n\tz-index: 10001;\n\ttop: 0;\n\tinset-inline: 0 0;\n\t// prevent vue show to use display:none and resetting\n\t// the circle animation loop\n\tdisplay: flex !important;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 100%;\n\theight: var(--header-height);\n\toverflow: hidden;\n\ttransition: opacity 250ms, visibility 250ms;\n\n\t&__name {\n\t\toverflow-x: hidden;\n\t\twidth: 100%;\n\t\tpadding: 0 calc(var(--default-clickable-area) * 3) 0 12px; // maximum actions is 3\n\t\ttransition: padding ease 100ms;\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\tfont-size: $icon-size;\n\t\tmargin-block: 0;\n\t}\n\n\t// On wider screens the name can be centered\n\t@media only screen and (min-width: $breakpoint-mobile) {\n\t\t&__name {\n\t\t\tpadding-inline-start: calc(var(--default-clickable-area) * 3); // maximum actions is 3\n\t\t\ttext-align: center;\n\t\t}\n\t}\n\n\t.icons-menu {\n\t\tposition: absolute;\n\t\tinset-inline-end: 0;\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: flex-end;\n\n\t\t.header-close {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\tmargin: calc((var(--header-height) - var(--default-clickable-area)) / 2);\n\t\t\tpadding: 0;\n\t\t}\n\n\t\t.play-pause-icons {\n\t\t\tposition: relative;\n\t\t\twidth: var(--header-height);\n\t\t\theight: var(--header-height);\n\t\t\tmargin: 0;\n\t\t\tpadding: 0;\n\t\t\tcursor: pointer;\n\t\t\tborder: none;\n\t\t\tbackground-color: transparent;\n\t\t\t&:hover,\n\t\t\t&:focus {\n\t\t\t\t.play-pause-icons__icon {\n\t\t\t\t\topacity: $opacity_full;\n\t\t\t\t\tborder-radius: calc(var(--default-clickable-area) / 2);\n\t\t\t\t\tbackground-color: $icon-focus-bg;\n\t\t\t\t}\n\t\t\t}\n\t\t\t&__icon {\n\t\t\t\twidth: var(--default-clickable-area);\n\t\t\t\theight: var(--default-clickable-area);\n\t\t\t\tmargin: calc((var(--header-height) - var(--default-clickable-area)) / 2);\n\t\t\t\tcursor: pointer;\n\t\t\t\topacity: $opacity_normal;\n\t\t\t}\n\t\t}\n\n\t\t&:deep() .action-item {\n\t\t\tmargin: calc((var(--header-height) - var(--default-clickable-area)) / 2);\n\n\t\t\t&--single {\n\t\t\t\twidth: var(--default-clickable-area);\n\t\t\t\theight: var(--default-clickable-area);\n\t\t\t\tcursor: pointer;\n\t\t\t\tbackground-position: center;\n\t\t\t\tbackground-size: 22px;\n\t\t\t}\n\t\t}\n\n\t\t// The modal ignores the color theme and adds a black backdrop\n\t\t// so we need to add custom color of the actions toggle\n\t\t.header-actions :deep(button:focus-visible) {\n\t\t\tbox-shadow: none !important;\n\t\t\toutline: 2px solid #fff !important;\n\t\t}\n\t}\n}\n\n.modal-wrapper {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 100%;\n\theight: 100%;\n\n\t/* Navigation buttons */\n\t.prev,\n\t.next {\n\t\tz-index: 10000;\n\t\theight: 35vh;\n\t\tmin-height: 300px;\n\t\tposition: absolute;\n\t\ttransition: opacity 250ms;\n\t\t// hover the mask\n\t\tcolor: white;\n\n\t\t&:focus-visible {\n\t\t\t// Override NcButton focus styles\n\t\t\tbox-shadow: 0 0 0 2px var(--color-primary-element-text);\n\t\t\tbackground-color: var(--color-box-shadow);\n\t\t}\n\t}\n\n\t.prev {\n\t\tinset-inline-start: 2px;\n\t}\n\t.next {\n\t\tinset-inline-end: 2px;\n\t}\n\n\t/* Content */\n\t.modal-container {\n\t\tposition: relative;\n\t\tdisplay: flex;\n\t\tpadding: 0;\n\t\ttransition: transform 300ms ease;\n\t\tborder-radius: var(--border-radius-container);\n\t\tbackground-color: var(--color-main-background);\n\t\tcolor: var(--color-main-text);\n\t\tbox-shadow: 0 0 40px rgba(0, 0, 0, .2);\n\t\toverflow: auto;\n\n\t\t&__close {\n\t\t\t// Ensure the close button is always on top of the content\n\t\t\tz-index: 1;\n\t\t\tposition: absolute;\n\t\t\ttop: 4px;\n\t\t\tinset-inline-end: var(--default-grid-baseline);\n\t\t}\n\n\t\t&__content {\n\t\t\twidth: 100%;\n\t\t\tmin-height: 52px; // At least the close button shall fit in\n\t\t\toverflow: auto; // avoids unnecessary hacks if the content should be bigger than the modal\n\t\t}\n\t}\n\n\t// We allow 90% max-height, but we need to ensure the header does not overlap the modal\n\t// as the modal is centered, we need the space on top and bottom\n\t$max-modal-height: min(90%, calc(100% - 2 * var(--header-height) - 2 * var(--body-container-margin)));\n\n\t// Sizing\n\t&--small {\n\t\t& > .modal-container {\n\t\t\twidth: 400px;\n\t\t\tmax-width: 90%;\n\t\t\tmax-height: $max-modal-height;\n\t\t}\n\t}\n\t&--normal {\n\t\t& > .modal-container {\n\t\t\tmax-width: 90%;\n\t\t\twidth: 600px;\n\t\t\tmax-height: $max-modal-height;\n\t\t}\n\t}\n\t&--large {\n\t\t& > .modal-container {\n\t\t\tmax-width: 90%;\n\t\t\twidth: 900px;\n\t\t\tmax-height: $max-modal-height;\n\t\t}\n\t}\n\t&--full {\n\t\t& > .modal-container {\n\t\t\twidth: 100%;\n\t\t\theight: calc(100% - var(--header-height));\n\t\t\tposition: absolute;\n\t\t\ttop: var(--header-height);\n\t\t\tborder-radius: 0;\n\t\t}\n\t}\n\n\t// Make modal full screen on mobile\n\t@media only screen and ((max-width: $breakpoint-small-mobile) or (max-height: 400px)) {\n\t\t.modal-container {\n\t\t\tmax-width: initial;\n\t\t\twidth: 100%;\n\t\t\tmax-height: initial;\n\t\t\theight: calc(100% - var(--header-height));\n\t\t\tposition: absolute;\n\t\t\ttop: var(--header-height);\n\t\t\tborder-radius: 0;\n\t\t}\n\t}\n}\n\n/* TRANSITIONS */\n.fade-enter-active,\n.fade-leave-active {\n\ttransition: opacity 250ms;\n}\n\n.fade-enter-from,\n.fade-leave-to {\n\topacity: 0;\n}\n\n.fade-visibility-enter-from,\n.fade-visibility-leave-to {\n\tvisibility: hidden;\n\topacity: 0;\n}\n\n.modal-in-enter-active,\n.modal-in-leave-active,\n.modal-out-enter-active,\n.modal-out-leave-active {\n\ttransition: opacity 250ms;\n}\n\n.modal-in-enter-from,\n.modal-in-leave-to,\n.modal-out-enter-from,\n.modal-out-leave-to {\n\topacity: 0;\n}\n\n.modal-in-enter .modal-container,\n.modal-in-leave-to .modal-container {\n\ttransform: scale(.9);\n}\n\n.modal-out-enter .modal-container,\n.modal-out-leave-to .modal-container {\n\ttransform: scale(1.1);\n}\n\n// animated circle\n$radius: 15;\n$pi: 3.14159265358979;\n\n.modal-mask .play-pause-icons {\n\t.progress-ring {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tinset-inline-start: 0;\n\t\ttransform: rotate(-90deg);\n\t\t.progress-ring__circle {\n\t\t\ttransition: 100ms stroke-dashoffset;\n\t\t\ttransform-origin: 50% 50%; // axis compensation\n\t\t\tanimation: progressring linear v-bind('cssSlideshowDelay') infinite;\n\n\t\t\tstroke-linecap: round;\n\t\t\tstroke-dashoffset: $radius * 2 * $pi; // radius * 2 * PI\n\t\t\tstroke-dasharray: $radius * 2 * $pi; // radius * 2 * PI\n\t\t}\n\t}\n\t&--paused {\n\t\t.play-pause-icons__icon {\n\t\t\tanimation: breath 2s cubic-bezier(.4, 0, .2, 1) infinite;\n\t\t}\n\t\t.progress-ring__circle {\n\t\t\tanimation-play-state: paused !important;\n\t\t}\n\t}\n}\n\n// keyframes get scoped too and break the animation name, we need them unscoped\n@keyframes progressring {\n\tfrom {\n\t\tstroke-dashoffset: $radius * 2 * $pi; // radius * 2 * PI\n\t}\n\tto {\n\t\tstroke-dashoffset: 0;\n\t}\n}\n\n@keyframes breath {\n\t0% {\n\t\topacity: 1;\n\t}\n\t50% {\n\t\topacity: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}\n</style>\n\n<docs>\nThe `NcModel` is the base component used for modals and dialogs.\nWhile `NcDialog` should be used for general dialogs like confirmations or forms,\n`NcModal` allows for custom content like showing image multimedia.\n\nFor showing the modal you can use either `v-model:show=\"showModal\"` or `v-if` on the `NcModal`,\ndepending on whether you require the Modal to stay within the DOM or not. Do not mix both, as this will break the out transition animation.\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showModal\">Show Modal</NcButton>\n\t\t<NcModal\n\t\t\tv-model:show=\"modal\"\n\t\t\t@close=\"closeModal\"\n\t\t\tsize=\"small\"\n\t\t\tname=\"Name\"\n\t\t\tout-transition>\n\t\t\t<template #actions>\n\t\t\t\t<NcActionCaption name=\"Some action\" />\n\t\t\t</template>\n\t\t\t<div class=\"modal__content\">Hello world</div>\n\t\t</NcModal>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tmodal: false\n\t\t}\n\t},\n\tmethods: {\n\t\tshowModal() {\n\t\t\tthis.modal = true\n\t\t},\n\t\tcloseModal() {\n\t\t\tthis.modal = false\n\t\t}\n\t}\n}\n</script>\n<style scoped>\n.modal__content {\n\tmargin: 50px;\n\ttext-align: center;\n}\n</style>\n```\n\n### Modal with slideshow\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"isOpen = true\">Show Modal</NcButton>\n\t\t<NcModal\n\t\t\tv-if=\"isOpen\"\n\t\t\tclose-button-outside\n\t\t\tenable-slideshow\n\t\t\t:has-next=\"page < lastPage\"\n\t\t\t:has-previous=\"page > 0\"\n\t\t\tname=\"Modal with slideshow\"\n\t\t\t@next=\"page++\"\n\t\t\t@previous=\"page--\"\n\t\t\t@close=\"isOpen = false\">\n\t\t\t<div class=\"modal__content\" :style=\"{ background: currentPage.background }\">\n\t\t\t\t<p class=\"model__content-text\">{{ currentPage.text }}</p>\n\t\t\t</div>\n\t\t</NcModal>\n\t</div>\n</template>\n<script>\nconst PAGES = [\n\t{ text: 'First page', background: 'linear-gradient(#e66465, #9198e5)' },\n\t{ text: 'Second page', background: 'linear-gradient(0.25turn, #3f87a6, #ebf8e1, #f69d3c)' },\n\t{ text: 'Third page', background: 'lightblue' },\n\t{ text: 'Last page', background: 'lightgrey' },\n]\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tisOpen: false,\n\t\t\tpage: 0,\n\t\t\tlastPage: PAGES.length - 1,\n\t\t}\n\t},\n\tcomputed: {\n\t\tcurrentPage() {\n\t\t\treturn PAGES[this.page]\n\t\t},\n\t}\n}\n</script>\n<style scoped>\n.modal__content {\n\theight: 100%;\n\tmin-height: 30vh;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n.model__content-text {\n\tfont-size: 16px;\n\tfont-weight: bold;\n}\n</style>\n```\n\n### Usage of popover in modal\n\n* Set container property to .modal-mask to inject popover context of the modal:\n\n```vue\n<template>\n\t<div>\n\t\t<NcButton @click=\"showModal\">Show Modal</NcButton>\n\t\t<NcModal\n\t\t\tv-model:show=\"modal\"\n\t\t\tclass=\"emoji-modal\"\n\t\t\tname=\"Modal with popover\"\n\t\t\tsize=\"small\"\n\t\t\t@close=\"closeModal\">\n\t\t\t<div class=\"emoji-modal__content\">\n\t\t\t\t<NcEmojiPicker container=\".emoji-modal\" @select=\"select\">\n\t\t\t\t\t<NcButton>Select emoji {{ emoji }}</NcButton>\n\t\t\t\t</NcEmojiPicker>\n\t\t\t</div>\n\t\t</NcModal>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\temoji: '😛',\n\t\t\tmodal: false\n\t\t}\n\t},\n\tmethods: {\n\t\tshowModal() {\n\t\t\tthis.modal = true\n\t\t},\n\t\tcloseModal() {\n\t\t\tthis.modal = false\n\t\t},\n\t\tselect(emoji) {\n\t\t\tthis.emoji = emoji\n\t\t},\n\t},\n}\n</script>\n<style scoped>\n.emoji-modal__content {\n\tdisplay: flex;\n\tjustify-content: center;\n\tmargin: 20px 0px 100px;\n}\n</style>\n```\n</docs>\n"],"names":["instance","_useModel","_createBlock","_Teleport","container","_createVNode","_Transition","_withDirectives","_createElementVNode","_mergeProps","$attrs","_unref","dark","closeButtonOutside","hasPrevious","hasNext","lightBackdrop","labelId","name","_createElementBlock","enableSlideshow","_normalizeClass","slideshowPaused","inlineActions","_renderSlot","noClose","outTransition","size","spreadNavigation"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAiBA,SAAS,kBAAkB,UAAuE;AACjG,MAAI,CAAC,SAAS,QAAQ;AACrB,WAAO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;AAAA,0BACP,SAAO;AAAA,wBAAA;0BACG,cACV,MAGc;AAAA,4BAHdN,YAGc,kBAAA;AAAA,8BAFb,aAAA;AAAA,8BACC,MAAMM,MAAA,eAAA;AAAA,8BACN,MAAM;AAAA,4BAAA;;;;kCATDI,KAAAA,OAAO;AAAA,wBAAA;;;;;4BA7CT,UAAA,KAAS;AAAA,kBAAA;;;;;sBAlFX,UAAA,KAAS;AAAA,YAAA;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import '../assets/NcPasswordField-BCJ0LHSS.css';
1
+ import '../assets/NcPasswordField-ftYon3Xm.css';
2
2
  import { defineComponent, mergeModels, useModel, watch, useTemplateRef, ref, computed, createBlock, openBlock, mergeProps, unref, createSlots, withCtx, createVNode, renderSlot } from "vue";
3
3
  import { q as mdiEyeOff, r as mdiEye } from "./mdi-CpchYUUV.mjs";
4
4
  import axios from "@nextcloud/axios";
@@ -6,8 +6,8 @@ import { getCapabilities } from "@nextcloud/capabilities";
6
6
  import { generateOcsUrl } from "@nextcloud/router";
7
7
  import debounce from "debounce";
8
8
  import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-BvLanNaW.mjs";
9
- import { N as NcInputField } from "./NcInputField-Clm9jOGJ.mjs";
10
- import { r as register, n as t29, a as t } from "./_l10n-CgsPi8nC.mjs";
9
+ import { N as NcInputField } from "./NcInputField-o5OFv3z6.mjs";
10
+ import { r as register, n as t29, a as t } from "./_l10n-Dq_eYxz_.mjs";
11
11
  import { l as logger } from "./logger-D3RVzcfQ.mjs";
12
12
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
13
13
  register(t29);
@@ -97,11 +97,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
97
97
  modelValue: modelValue.value,
98
98
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
99
99
  error: _ctx.error || isValid.value === false,
100
- "helper-text": _ctx.helperText || internalHelpMessage.value,
101
- "input-class": [_ctx.inputClass, { "password-field__input--secure-text": !visible.value && _ctx.asText }],
100
+ helperText: _ctx.helperText || internalHelpMessage.value,
101
+ inputClass: [_ctx.inputClass, { "password-field__input--secure-text": !visible.value && _ctx.asText }],
102
102
  minlength: minLengthWithPolicy.value,
103
103
  success: _ctx.success || isValid.value === true,
104
- "trailing-button-label": visible.value ? unref(t)("Hide password") : unref(t)("Show password"),
104
+ trailingButtonLabel: visible.value ? unref(t)("Hide password") : unref(t)("Show password"),
105
105
  type: visible.value || _ctx.asText ? "text" : "password",
106
106
  onTrailingButtonClick: toggleVisibility
107
107
  }), createSlots({
@@ -119,12 +119,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
119
119
  ]),
120
120
  key: "0"
121
121
  } : void 0
122
- ]), 1040, ["modelValue", "error", "helper-text", "input-class", "minlength", "success", "trailing-button-label", "type"]);
122
+ ]), 1040, ["modelValue", "error", "helperText", "inputClass", "minlength", "success", "trailingButtonLabel", "type"]);
123
123
  };
124
124
  }
125
125
  });
126
- const NcPasswordField = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b2684de6"]]);
126
+ const NcPasswordField = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-00e75248"]]);
127
127
  export {
128
128
  NcPasswordField as N
129
129
  };
130
- //# sourceMappingURL=NcPasswordField-BOZlUwhr.mjs.map
130
+ //# sourceMappingURL=NcPasswordField-uaMO2pdt.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"NcPasswordField-BOZlUwhr.mjs","sources":["../../src/components/NcPasswordField/NcPasswordField.vue"],"sourcesContent":["<!--\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 v-model=\"text2\"\n\t\t\t\tid=\"textField\"\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 v-model=\"text3\"\n\t\t\t\tid=\"textField2\"\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\t\t\t<template #icon>\n\t\t\t\t<IconLockOutline :size=\"20\" />\n\t\t\t</template>\n\t\t</NcPasswordField>\n\n\t\t<NcPasswordField v-model=\"text5\"\n\t\t\t:disabled=\"true\"\n\t\t\tlabel=\"Disabled\" />\n\n\t\t<NcPasswordField :value.sync=\"text6\"\n\t\t\tlabel=\"Secret token\"\n\t\t\tas-text />\n\t</div>\n</template>\n<script>\nimport IconLockOutline from 'vue-material-design-icons/LockOutline'\n\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\tcomponents: {\n\t\tIconLockOutline,\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<script setup lang=\"ts\">\nimport type { Writable } from '../../utils/VueTypes.ts'\nimport type { NcInputFieldProps } from '../NcInputField/NcInputField.vue'\n\nimport { mdiEye, mdiEyeOff } from '@mdi/js'\nimport axios from '@nextcloud/axios'\nimport { getCapabilities } from '@nextcloud/capabilities'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport debounce from 'debounce'\nimport { computed, ref, useTemplateRef, watch } from 'vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\nimport { t } from '../../l10n.ts'\nimport { logger } from '../../utils/logger.ts'\n\nconst modelValue = defineModel<string>({ default: '' })\n\n/**\n * The visibility of the password.\n * If this is set to true then the password will not be obfuscated by the browser.\n */\nconst visible = defineModel<boolean>('visible', { default: false })\n\nconst props = withDefaults(defineProps<Omit<NcInputFieldProps, 'trailingButtonLabel' | 'type'> & {\n\t/**\n\t * Check if the user entered a valid password using the password_policy\n\t * app if available.\n\t *\n\t * Warning: this doesn't replace server side checking and will do nothing\n\t * if the password_policy app is disabled.\n\t */\n\tcheckPasswordStrength?: boolean\n\n\t/**\n\t * The minlength property defines the minimum number of characters\n\t * (as UTF-16 code units) the user can enter.\n\t */\n\tminlength?: number\n\n\t/**\n\t * Render as input[type=text] that looks like password field.\n\t * Allows to avoid unwanted password-specific browser behavior,\n\t * such as save or generate password prompt.\n\t * Useful for secret token fields.\n\t * Note: autocomplete=\"off\" is ignored by most browsers.\n\t */\n\tasText?: boolean\n}>(), {\n\tinputClass: '',\n\tminlength: undefined,\n\t// overwrite default\n\tshowTrailingButton: true,\n})\n\nconst emit = defineEmits<{\n\tvalid: []\n\tinvalid: []\n}>()\n\nwatch(modelValue, debounce(checkPassword, 500))\n\n// public API\ndefineExpose({\n\tfocus,\n\tselect,\n})\n\n// password policy\ninterface PasswordPolicy {\n\t/**\n\t * The URLs to the password_policy app methods\n\t */\n\tapi: {\n\t\t/**\n\t\t * The URL to the password generator\n\t\t */\n\t\tgenerate: string\n\n\t\t/**\n\t\t * The URL to the password validator\n\t\t */\n\t\tvalidate: string\n\t}\n\n\t/**\n\t * Whether to enforce non common passwords\n\t */\n\tenforceNonCommonPassword: boolean\n\n\t/**\n\t * Whether to enforce numeric characters\n\t */\n\tenforceNumericCharacters: boolean\n\n\t/**\n\t * Whether to enforce special characters\n\t */\n\tenforceSpecialCharacters: boolean\n\n\t/**\n\t * Whether to enforce upper and lower case\n\t */\n\tenforceUpperLowerCase: boolean\n\n\t/**\n\t * The minimum length of the password\n\t */\n\tminLength: number\n}\n\nconst { password_policy: passwordPolicy } = getCapabilities() as { password_policy?: PasswordPolicy }\n\n// internal state\nconst inputFieldInstance = useTemplateRef('inputField')\n\nconst internalHelpMessage = ref('')\nconst isValid = ref<boolean>()\n\nconst propsToForward = computed<Partial<NcInputFieldProps>>(() => {\n\tconst all = { ...props } as Partial<Writable<typeof props>>\n\t// our props\n\tdelete all.checkPasswordStrength\n\tdelete all.minlength\n\tdelete all.asText\n\t// other props already set in template\n\tdelete all.error\n\tdelete all.helperText\n\tdelete all.inputClass\n\tdelete all.success\n\n\treturn all satisfies Partial<NcInputFieldProps>\n})\n\nconst minLengthWithPolicy = computed(() => {\n\treturn props.minlength\n\t\t?? (props.checkPasswordStrength ? passwordPolicy?.minLength : undefined)\n\t\t?? undefined\n})\n\n/**\n * Validate the entered password.\n * If available this method will use the password-policy app API to validate the password.\n */\nasync function checkPassword() {\n\tif (!props.checkPasswordStrength) {\n\t\treturn\n\t}\n\n\ttry {\n\t\tconst { data } = await axios.post(generateOcsUrl('apps/password_policy/api/v1/validate'), { password: modelValue.value })\n\t\tisValid.value = data.ocs.data.passed\n\t\tif (data.ocs.data.passed) {\n\t\t\tinternalHelpMessage.value = t('Password is secure')\n\t\t\t/**\n\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t * password entered is valid.\n\t\t\t */\n\t\t\temit('valid')\n\t\t\treturn\n\t\t}\n\n\t\tinternalHelpMessage.value = data.ocs.data.reason\n\t\t/**\n\t\t * Triggers when the internal password_policy detect that the\n\t\t * password entered is invalid.\n\t\t */\n\t\temit('invalid')\n\t} catch (error) {\n\t\tlogger.error('Password policy returned an error', { error })\n\t}\n}\n\n/**\n * Toggle the visibility of the password\n */\nfunction toggleVisibility() {\n\tvisible.value = !visible.value\n}\n\n/**\n * Focus the input element\n *\n * @param options - Focus options\n * @public\n */\nfunction focus(options?: FocusOptions) {\n\tinputFieldInstance.value!.focus(options)\n}\n\n/**\n * Select all the text in the input\n *\n * @public\n */\nfunction select() {\n\tinputFieldInstance.value!.select()\n}\n</script>\n\n<template>\n\t<NcInputField\n\t\tv-bind=\"propsToForward\"\n\t\tref=\"inputField\"\n\t\tv-model=\"modelValue\"\n\t\t:error=\"error || isValid === false\"\n\t\t:helper-text=\"helperText || internalHelpMessage\"\n\t\t:input-class=\"[inputClass, { 'password-field__input--secure-text': !visible && asText }]\"\n\t\t:minlength=\"minLengthWithPolicy\"\n\t\t:success=\"success || isValid === true\"\n\t\t:trailing-button-label=\"visible ? t('Hide password') : t('Show password')\"\n\t\t:type=\"visible || asText ? 'text' : 'password'\"\n\t\t@trailing-button-click=\"toggleVisibility\">\n\t\t<template v-if=\"!!$slots.icon\" #icon>\n\t\t\t<!-- @slot Leading icon -->\n\t\t\t<slot name=\"icon\" />\n\t\t</template>\n\t\t<template #trailing-button-icon>\n\t\t\t<NcIconSvgWrapper :path=\"visible ? mdiEyeOff : mdiEye\" />\n\t\t</template>\n\t</NcInputField>\n</template>\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":["_useModel","_createBlock","_mergeProps","error","helperText","inputClass","asText","success","_unref","_createVNode","$slots","_renderSlot"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8GA,UAAM,aA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SAAwB;AACtC,yBAAmB,MAAO,MAAM,OAAO;AAAA,IACxC;AAOA,aAAS,SAAS;AACjB,yBAAmB,MAAO,OAAA;AAAA,IAC3B;;0BAICC,YAmBe,cAnBfC,WAmBe,eAAA,OAlBQ;AAAA,QACtB,KAAI;AAAA,oBACK,WAAA;AAAA,qEAAA,WAAU,QAAA;AAAA,QAClB,OAAOC,KAAAA,SAAS,QAAA,UAAO;AAAA,QACvB,eAAaC,KAAAA,cAAc,oBAAA;AAAA,QAC3B,eAAW,CAAGC,KAAAA,YAAU,EAAA,sCAAA,CAA2C,QAAA,SAAWC,KAAAA,QAAM;AAAA,QACpF,WAAW,oBAAA;AAAA,QACX,SAASC,KAAAA,WAAW,QAAA,UAAO;AAAA,QAC3B,yBAAuB,QAAA,QAAUC,MAAA,CAAA,qBAAqBA,MAAA,CAAA,EAAC,eAAA;AAAA,QACvD,MAAM,QAAA,SAAWF,KAAAA,SAAM,SAAA;AAAA,QACvB,uBAAuB;AAAA,MAAA;QAKb,gCACV,MAAyD;AAAA,UAAzDG,YAAyD,kBAAA;AAAA,YAAtC,MAAM,QAAA,QAAUD,MAAA,SAAA,IAAYA,MAAA,MAAA;AAAA,UAAA;;;;QAL9BE,CAAAA,CAAAA,KAAAA,OAAO;gBAAO;AAAA,sBAE/B,MAAoB;AAAA,YAApBC,WAAoB,KAAA,QAAA,QAAA,CAAA,GAAA,QAAA,IAAA;AAAA,UAAA;;;;;;;;"}
1
+ {"version":3,"file":"NcPasswordField-uaMO2pdt.mjs","sources":["../../src/components/NcPasswordField/NcPasswordField.vue"],"sourcesContent":["<!--\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 v-model=\"text2\"\n\t\t\t\tid=\"textField\"\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 v-model=\"text3\"\n\t\t\t\tid=\"textField2\"\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\t\t\t<template #icon>\n\t\t\t\t<IconLockOutline :size=\"20\" />\n\t\t\t</template>\n\t\t</NcPasswordField>\n\n\t\t<NcPasswordField v-model=\"text5\"\n\t\t\t:disabled=\"true\"\n\t\t\tlabel=\"Disabled\" />\n\n\t\t<NcPasswordField :value.sync=\"text6\"\n\t\t\tlabel=\"Secret token\"\n\t\t\tas-text />\n\t</div>\n</template>\n<script>\nimport IconLockOutline from 'vue-material-design-icons/LockOutline'\n\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\tcomponents: {\n\t\tIconLockOutline,\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<script setup lang=\"ts\">\nimport type { Writable } from '../../utils/VueTypes.ts'\nimport type { NcInputFieldProps } from '../NcInputField/NcInputField.vue'\n\nimport { mdiEye, mdiEyeOff } from '@mdi/js'\nimport axios from '@nextcloud/axios'\nimport { getCapabilities } from '@nextcloud/capabilities'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport debounce from 'debounce'\nimport { computed, ref, useTemplateRef, watch } from 'vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\nimport { t } from '../../l10n.ts'\nimport { logger } from '../../utils/logger.ts'\n\nconst modelValue = defineModel<string>({ default: '' })\n\n/**\n * The visibility of the password.\n * If this is set to true then the password will not be obfuscated by the browser.\n */\nconst visible = defineModel<boolean>('visible', { default: false })\n\nconst props = withDefaults(defineProps<Omit<NcInputFieldProps, 'trailingButtonLabel' | 'type'> & {\n\t/**\n\t * Check if the user entered a valid password using the password_policy\n\t * app if available.\n\t *\n\t * Warning: this doesn't replace server side checking and will do nothing\n\t * if the password_policy app is disabled.\n\t */\n\tcheckPasswordStrength?: boolean\n\n\t/**\n\t * The minlength property defines the minimum number of characters\n\t * (as UTF-16 code units) the user can enter.\n\t */\n\tminlength?: number\n\n\t/**\n\t * Render as input[type=text] that looks like password field.\n\t * Allows to avoid unwanted password-specific browser behavior,\n\t * such as save or generate password prompt.\n\t * Useful for secret token fields.\n\t * Note: autocomplete=\"off\" is ignored by most browsers.\n\t */\n\tasText?: boolean\n}>(), {\n\tinputClass: '',\n\tminlength: undefined,\n\t// overwrite default\n\tshowTrailingButton: true,\n})\n\nconst emit = defineEmits<{\n\tvalid: []\n\tinvalid: []\n}>()\n\nwatch(modelValue, debounce(checkPassword, 500))\n\n// public API\ndefineExpose({\n\tfocus,\n\tselect,\n})\n\n// password policy\ninterface PasswordPolicy {\n\t/**\n\t * The URLs to the password_policy app methods\n\t */\n\tapi: {\n\t\t/**\n\t\t * The URL to the password generator\n\t\t */\n\t\tgenerate: string\n\n\t\t/**\n\t\t * The URL to the password validator\n\t\t */\n\t\tvalidate: string\n\t}\n\n\t/**\n\t * Whether to enforce non common passwords\n\t */\n\tenforceNonCommonPassword: boolean\n\n\t/**\n\t * Whether to enforce numeric characters\n\t */\n\tenforceNumericCharacters: boolean\n\n\t/**\n\t * Whether to enforce special characters\n\t */\n\tenforceSpecialCharacters: boolean\n\n\t/**\n\t * Whether to enforce upper and lower case\n\t */\n\tenforceUpperLowerCase: boolean\n\n\t/**\n\t * The minimum length of the password\n\t */\n\tminLength: number\n}\n\nconst { password_policy: passwordPolicy } = getCapabilities() as { password_policy?: PasswordPolicy }\n\n// internal state\nconst inputFieldInstance = useTemplateRef('inputField')\n\nconst internalHelpMessage = ref('')\nconst isValid = ref<boolean>()\n\nconst propsToForward = computed<Partial<NcInputFieldProps>>(() => {\n\tconst all = { ...props } as Partial<Writable<typeof props>>\n\t// our props\n\tdelete all.checkPasswordStrength\n\tdelete all.minlength\n\tdelete all.asText\n\t// other props already set in template\n\tdelete all.error\n\tdelete all.helperText\n\tdelete all.inputClass\n\tdelete all.success\n\n\treturn all satisfies Partial<NcInputFieldProps>\n})\n\nconst minLengthWithPolicy = computed(() => {\n\treturn props.minlength\n\t\t?? (props.checkPasswordStrength ? passwordPolicy?.minLength : undefined)\n\t\t?? undefined\n})\n\n/**\n * Validate the entered password.\n * If available this method will use the password-policy app API to validate the password.\n */\nasync function checkPassword() {\n\tif (!props.checkPasswordStrength) {\n\t\treturn\n\t}\n\n\ttry {\n\t\tconst { data } = await axios.post(generateOcsUrl('apps/password_policy/api/v1/validate'), { password: modelValue.value })\n\t\tisValid.value = data.ocs.data.passed\n\t\tif (data.ocs.data.passed) {\n\t\t\tinternalHelpMessage.value = t('Password is secure')\n\t\t\t/**\n\t\t\t * Triggers when the internal password_policy detect that the\n\t\t\t * password entered is valid.\n\t\t\t */\n\t\t\temit('valid')\n\t\t\treturn\n\t\t}\n\n\t\tinternalHelpMessage.value = data.ocs.data.reason\n\t\t/**\n\t\t * Triggers when the internal password_policy detect that the\n\t\t * password entered is invalid.\n\t\t */\n\t\temit('invalid')\n\t} catch (error) {\n\t\tlogger.error('Password policy returned an error', { error })\n\t}\n}\n\n/**\n * Toggle the visibility of the password\n */\nfunction toggleVisibility() {\n\tvisible.value = !visible.value\n}\n\n/**\n * Focus the input element\n *\n * @param options - Focus options\n * @public\n */\nfunction focus(options?: FocusOptions) {\n\tinputFieldInstance.value!.focus(options)\n}\n\n/**\n * Select all the text in the input\n *\n * @public\n */\nfunction select() {\n\tinputFieldInstance.value!.select()\n}\n</script>\n\n<template>\n\t<NcInputField\n\t\tv-bind=\"propsToForward\"\n\t\tref=\"inputField\"\n\t\tv-model=\"modelValue\"\n\t\t:error=\"error || isValid === false\"\n\t\t:helperText=\"helperText || internalHelpMessage\"\n\t\t:inputClass=\"[inputClass, { 'password-field__input--secure-text': !visible && asText }]\"\n\t\t:minlength=\"minLengthWithPolicy\"\n\t\t:success=\"success || isValid === true\"\n\t\t:trailingButtonLabel=\"visible ? t('Hide password') : t('Show password')\"\n\t\t:type=\"visible || asText ? 'text' : 'password'\"\n\t\t@trailingButtonClick=\"toggleVisibility\">\n\t\t<template v-if=\"!!$slots.icon\" #icon>\n\t\t\t<!-- @slot Leading icon -->\n\t\t\t<slot name=\"icon\" />\n\t\t</template>\n\t\t<template #trailing-button-icon>\n\t\t\t<NcIconSvgWrapper :path=\"visible ? mdiEyeOff : mdiEye\" />\n\t\t</template>\n\t</NcInputField>\n</template>\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":["_useModel","_createBlock","_mergeProps","error","helperText","inputClass","asText","success","_unref","_createVNode","$slots","_renderSlot"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8GA,UAAM,aA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SAAwB;AACtC,yBAAmB,MAAO,MAAM,OAAO;AAAA,IACxC;AAOA,aAAS,SAAS;AACjB,yBAAmB,MAAO,OAAA;AAAA,IAC3B;;0BAICC,YAmBe,cAnBfC,WAmBe,eAAA,OAlBQ;AAAA,QACtB,KAAI;AAAA,oBACK,WAAA;AAAA,qEAAA,WAAU,QAAA;AAAA,QAClB,OAAOC,KAAAA,SAAS,QAAA,UAAO;AAAA,QACvB,YAAYC,KAAAA,cAAc,oBAAA;AAAA,QAC1B,YAAU,CAAGC,KAAAA,YAAU,EAAA,sCAAA,CAA2C,QAAA,SAAWC,KAAAA,QAAM;AAAA,QACnF,WAAW,oBAAA;AAAA,QACX,SAASC,KAAAA,WAAW,QAAA,UAAO;AAAA,QAC3B,qBAAqB,QAAA,QAAUC,MAAA,CAAA,qBAAqBA,MAAA,CAAA,EAAC,eAAA;AAAA,QACrD,MAAM,QAAA,SAAWF,KAAAA,SAAM,SAAA;AAAA,QACvB,uBAAqB;AAAA,MAAA;QAKX,gCACV,MAAyD;AAAA,UAAzDG,YAAyD,kBAAA;AAAA,YAAtC,MAAM,QAAA,QAAUD,MAAA,SAAA,IAAYA,MAAA,MAAA;AAAA,UAAA;;;;QAL9BE,CAAAA,CAAAA,KAAAA,OAAO;gBAAO;AAAA,sBAE/B,MAAoB;AAAA,YAApBC,WAAoB,KAAA,QAAA,QAAA,CAAA,GAAA,QAAA,IAAA;AAAA,UAAA;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import '../assets/NcPopover-CZ3pMU6Y.css';
1
+ import '../assets/NcPopover-P1fheee2.css';
2
2
  import { options, Dropdown } from "floating-vue";
3
3
  import { createFocusTrap } from "focus-trap";
4
4
  import { defineComponent, warn, resolveComponent, createBlock, openBlock, withCtx, createVNode, renderSlot, normalizeProps, guardReactiveProps } from "vue";
@@ -44,9 +44,9 @@ const _sfc_main$1 = defineComponent({
44
44
  });
45
45
  }
46
46
  });
47
- const ncPopover = "_ncPopover_wpltc_20";
47
+ const ncPopover = "_ncPopover_HjJ88";
48
48
  const style0 = {
49
- "material-design-icon": "_material-design-icon_wpltc_12",
49
+ "material-design-icon": "_material-design-icon_FKPyJ",
50
50
  ncPopover
51
51
  };
52
52
  const theme = "nc-popover-9";
@@ -387,23 +387,23 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
387
387
  _cache[0] || (_cache[0] = ($event) => $data.internalShown = $event),
388
388
  _cache[1] || (_cache[1] = ($event) => $data.internalShown = $event)
389
389
  ],
390
- "arrow-padding": 10,
391
- "auto-hide": !$props.noCloseOnClickOutside && $props.closeOnClickOutside,
390
+ arrowPadding: 10,
391
+ autoHide: !$props.noCloseOnClickOutside && $props.closeOnClickOutside,
392
392
  boundary: $props.boundary || void 0,
393
393
  container: $props.container,
394
394
  delay: $props.delay,
395
395
  distance: 10,
396
- "handle-resize": "",
397
- "no-auto-focus": true,
396
+ handleResize: "",
397
+ noAutoFocus: true,
398
398
  placement: $options.internalPlacement,
399
- "popper-class": [_ctx.$style.ncPopover, $props.popoverBaseClass],
400
- "popper-triggers": $options.popperTriggers,
401
- "popper-hide-triggers": $options.popperHideTriggers,
402
- "popper-show-triggers": $options.popperShowTriggers,
399
+ popperClass: [_ctx.$style.ncPopover, $props.popoverBaseClass],
400
+ popperTriggers: $options.popperTriggers,
401
+ popperHideTriggers: $options.popperHideTriggers,
402
+ popperShowTriggers: $options.popperShowTriggers,
403
403
  theme: $setup.theme,
404
404
  triggers: $options.internalTriggers,
405
- "hide-triggers": $options.hideTriggers,
406
- "show-triggers": $options.showTriggers,
405
+ hideTriggers: $options.hideTriggers,
406
+ showTriggers: $options.showTriggers,
407
407
  onApplyShow: $options.afterShow,
408
408
  onApplyHide: $options.afterHide
409
409
  }, {
@@ -413,16 +413,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
413
413
  default: withCtx(() => [
414
414
  createVNode(_component_NcPopoverTriggerProvider, {
415
415
  shown: $data.internalShown,
416
- "popup-role": $props.popupRole
416
+ popupRole: $props.popupRole
417
417
  }, {
418
418
  default: withCtx((slotProps) => [
419
419
  renderSlot(_ctx.$slots, "trigger", normalizeProps(guardReactiveProps(slotProps)))
420
420
  ]),
421
421
  _: 3
422
- }, 8, ["shown", "popup-role"])
422
+ }, 8, ["shown", "popupRole"])
423
423
  ]),
424
424
  _: 3
425
- }, 8, ["shown", "auto-hide", "boundary", "container", "delay", "placement", "popper-class", "popper-triggers", "popper-hide-triggers", "popper-show-triggers", "theme", "triggers", "hide-triggers", "show-triggers", "onApplyShow", "onApplyHide"]);
425
+ }, 8, ["shown", "autoHide", "boundary", "container", "delay", "placement", "popperClass", "popperTriggers", "popperHideTriggers", "popperShowTriggers", "theme", "triggers", "hideTriggers", "showTriggers", "onApplyShow", "onApplyHide"]);
426
426
  }
427
427
  const cssModules = {
428
428
  "$style": style0
@@ -431,4 +431,4 @@ const NcPopover = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render
431
431
  export {
432
432
  NcPopover as N
433
433
  };
434
- //# sourceMappingURL=NcPopover-C-MTaPCs.mjs.map
434
+ //# sourceMappingURL=NcPopover-OqcYrWOx.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NcPopover-OqcYrWOx.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\treturn this.$slots.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 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 #default>\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 `no-focus-trap` 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 no-focus-trap>\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 #default>\n\t\t\t\tHi! 🚀\n\t\t\t</template>\n\t\t</NcPopover>\n\t</div>\n</template>\n```\n\n#### With logical placement\n\nIf the text flow is language specific (e.g. UI is shown for right-to-left language),\nalso the popover often needs to be adjusted when not rendered on top or bottom (default).\n\n```vue\n<template>\n\t<div class=\"wrapper\">\n\t\t<fieldset>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"dir\" type=\"radio\" value=\"ltr\">\n\t\t\t\tLTR\n\t\t\t</NcCheckboxRadioSwitch>\n\t\t\t<NcCheckboxRadioSwitch v-model=\"dir\" type=\"radio\" value=\"rtl\">\n\t\t\t\tRTL\n\t\t\t</NcCheckboxRadioSwitch>\n\t\t</fieldset>\n\t\t<div class=\"content\" :dir>\n\t\t\t<NcPopover :key=\"dir\"\n\t\t\t\tplacement=\"end\"\n\t\t\t\t:triggers=\"['hover']\">\n\t\t\t\t<template #trigger>\n\t\t\t\t\t<NcButton>\n\t\t\t\t\t\tHover me\n\t\t\t\t\t</NcButton>\n\t\t\t\t</template>\n\t\t\t\t<template #default>\n\t\t\t\t\tThis will be shown on the logical end of the button.\n\t\t\t\t</template>\n\t\t\t</NcPopover>\n\t\t</div>\n\t</div>\n</template>\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tdir: 'ltr',\n\t\t}\n\t},\n}\n</script>\n<style scoped>\n.content {\n\tdisplay: flex;\n\tflex-direction: row;\n\tjustify-content: space-around;\n}\n\nfieldset {\n\tdisplay: flex;\n\tflex-direction: row;\n\tgap: 12px;\n}\n</style>\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\tv-model:shown=\"internalShown\"\n\t\t:arrowPadding=\"10\"\n\t\t:autoHide=\"!noCloseOnClickOutside && closeOnClickOutside\"\n\t\t:boundary=\"boundary || undefined\"\n\t\t:container\n\t\t:delay\n\t\t:distance=\"10\"\n\t\thandleResize\n\t\t:noAutoFocus=\"true /* Handled by the focus trap */\"\n\t\t:placement=\"internalPlacement\"\n\t\t:popperClass=\"[$style.ncPopover, popoverBaseClass]\"\n\t\t:popperTriggers\n\t\t:popperHideTriggers\n\t\t:popperShowTriggers\n\t\t:theme\n\t\t:triggers=\"internalTriggers\"\n\t\t:hideTriggers\n\t\t:showTriggers\n\t\t@update:shown=\"internalShown = $event\"\n\t\t@applyShow=\"afterShow\"\n\t\t@applyHide=\"afterHide\">\n\t\t<NcPopoverTriggerProvider v-slot=\"slotProps\" :shown=\"internalShown\" :popupRole=\"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 { warn } from 'vue'\nimport NcPopoverTriggerProvider from './NcPopoverTriggerProvider.vue'\nimport { getTrapStack } from '../../utils/focusTrap.ts'\nimport { logger } from '../../utils/logger.ts'\nimport { isRtl } from '../../utils/rtl.ts'\n\nconst theme = 'nc-popover-9'\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 */\nexport default {\n\tname: 'NcPopover',\n\n\tcomponents: {\n\t\tDropdown,\n\t\tNcPopoverTriggerProvider,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Element to use for calculating the popper boundary (size and position).\n\t\t * Either a query string or the actual HTMLElement.\n\t\t */\n\t\tboundary: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Automatically hide the popover on click outside.\n\t\t *\n\t\t * @deprecated Use `no-close-on-click-outside` instead (inverted value)\n\t\t */\n\t\tcloseOnClickOutside: {\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 automatic popover hide on click outside.\n\t\t */\n\t\tnoCloseOnClickOutside: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Container where to mount the popover.\n\t\t * Either a select query or `false` to mount to the parent node.\n\t\t */\n\t\tcontainer: {\n\t\t\ttype: [Boolean, String],\n\t\t\tdefault: 'body',\n\t\t},\n\n\t\t/**\n\t\t * Delay for showing or hiding the popover.\n\t\t *\n\t\t * Can either be a number or an object to configure different delays (`{ show: number, hide: number }`).\n\t\t */\n\t\tdelay: {\n\t\t\ttype: [Number, Object],\n\t\t\tdefault: 0,\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 * Where to place the popover.\n\t\t *\n\t\t * This consists of the vertical placement and the horizontal placement.\n\t\t * E.g. `bottom` will place the popover on the bottom of the trigger (horizontally centered),\n\t\t * while `buttom-start` will horizontally align the popover on the logical start (e.g. for LTR layout on the left.).\n\t\t * The `start` or `end` placement will align the popover on the left or right side or the trigger element.\n\t\t *\n\t\t * @type {'auto'|'auto-start'|'auto-end'|'top'|'top-start'|'top-end'|'bottom'|'bottom-start'|'bottom-end'|'start'|'end'}\n\t\t */\n\t\tplacement: {\n\t\t\ttype: String,\n\t\t\tdefault: 'bottom',\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 * Events that trigger the popover on the popover container itself.\n\t\t * This is useful if you set `triggers` to `hover` and also want the popover to stay open while hovering the popover itself.\n\t\t *\n\t\t * It is possible to also pass an object to define different triggers for hide and show `{ show: ['hover'], hide: ['click'] }`.\n\t\t */\n\t\tpopoverTriggers: {\n\t\t\ttype: [Array, Object],\n\t\t\tdefault: null,\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 * 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 * Show or hide the popper\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 * Events that trigger the popover.\n\t\t *\n\t\t * If you pass an empty array then only the `shown` prop can control the popover state.\n\t\t * Following events are available:\n\t\t * - `'hover'`\n\t\t * - `'click'`\n\t\t * - `'focus'`\n\t\t * - `'touch'`\n\t\t *\n\t\t * It is also possible to pass an object to have different events for show and hide:\n\t\t * `{ hide: ['click'], show: ['click', 'hover'] }`\n\t\t */\n\t\ttriggers: {\n\t\t\ttype: [Array, Object],\n\t\t\tdefault: () => ['click'],\n\t\t},\n\t},\n\n\temits: [\n\t\t'afterShow',\n\t\t'afterHide',\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\tcomputed: {\n\t\tpopperTriggers() {\n\t\t\tif (this.popoverTriggers && Array.isArray(this.popoverTriggers)) {\n\t\t\t\treturn this.popoverTriggers\n\t\t\t}\n\t\t\treturn undefined\n\t\t},\n\n\t\tpopperHideTriggers() {\n\t\t\tif (this.popoverTriggers && typeof this.popoverTriggers === 'object') {\n\t\t\t\treturn this.popoverTriggers.hide\n\t\t\t}\n\t\t\treturn undefined\n\t\t},\n\n\t\tpopperShowTriggers() {\n\t\t\tif (this.popoverTriggers && typeof this.popoverTriggers === 'object') {\n\t\t\t\treturn this.popoverTriggers.show\n\t\t\t}\n\t\t\treturn undefined\n\t\t},\n\n\t\tinternalTriggers() {\n\t\t\tif (this.triggers && Array.isArray(this.triggers)) {\n\t\t\t\treturn this.triggers\n\t\t\t}\n\t\t\treturn undefined\n\t\t},\n\n\t\thideTriggers() {\n\t\t\tif (this.triggers && typeof this.triggers === 'object') {\n\t\t\t\treturn this.triggers.hide\n\t\t\t}\n\t\t\treturn undefined\n\t\t},\n\n\t\tshowTriggers() {\n\t\t\tif (this.triggers && typeof this.triggers === 'object') {\n\t\t\t\treturn this.triggers.show\n\t\t\t}\n\t\t\treturn undefined\n\t\t},\n\n\t\tinternalPlacement() {\n\t\t\tif (this.placement === 'start') {\n\t\t\t\treturn isRtl ? 'right' : 'left'\n\t\t\t} else if (this.placement === 'end') {\n\t\t\t\treturn isRtl ? 'left' : 'right'\n\t\t\t}\n\t\t\treturn this.placement\n\t\t},\n\t},\n\n\twatch: {\n\t\tshown(value) {\n\t\t\tthis.internalShown = value\n\t\t},\n\n\t\tinternalShown(value) {\n\t\t\tthis.$emit('update:shown', value)\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.checkTriggerA11y()\n\t},\n\n\tbeforeUnmount() {\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 triggerContainer = this.getPopoverTriggerContainerElement()\n\t\t\t\tconst requiredTriggerButton = triggerContainer.querySelector('[aria-expanded]')\n\t\t\t\tif (!requiredTriggerButton) {\n\t\t\t\t\twarn('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.getPopoverTriggerContainerElement()\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\tgetPopoverTriggerContainerElement() {\n\t\t\treturn this.$refs.popover?.$refs.popper?.$refs.reference\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) {\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,\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('[NcPopover] Failed to 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('afterShow')\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\t/**\n\t\t\t * On component unmounting Vue:\n\t\t\t * 1. Resets the template ref to null\n\t\t\t * 2. Triggers <Dropdown> `beforeUnmount` - it emits `apply-hide` event\n\t\t\t * 2.1. At that moment this.$refs.popover is null already, and we cannot use `this.getPopoverContentElement()`\n\t\t\t * 2.2. We can ignore emitting `after-hide` event (was also not the case on stable8)\n\t\t\t * 3. Actually removes <Dropdown> node\n\t\t\t * 4. Triggers <Dropdown> `unmounted`\n\t\t\t */\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('afterHide')\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-9) {\n\t&,\n\t& * {\n\t\tbox-sizing: border-box;\n\t}\n\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-element);\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-element);\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","NcPopoverTriggerProvider","options","_createBlock","_withCtx","_renderSlot","_createVNode"],"mappings":";;;;;;;AAQA,MAAKA,cAAa,gBAAa;AAAA,EAC9B,MAAM;AAAA,EAEN,UAAU;A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A;AAAA,UAE1CC,WAA0C,0DAAb,SAAS,CAAA,CAAA;AAAA;;;;;;;;;;;"}
@@ -1,11 +1,19 @@
1
- import '../assets/NcProgressBar-BAPOXMAL.css';
2
- import { defineComponent, useCssVars, computed, createElementBlock, openBlock, normalizeClass, createElementVNode } from "vue";
1
+ import '../assets/NcProgressBar-D1DYRrCN.css';
2
+ import { defineComponent, useCssVars, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, createCommentVNode, toDisplayString } from "vue";
3
3
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
4
4
  const _hoisted_1 = ["aria-valuenow"];
5
5
  const _hoisted_2 = ["height", "width"];
6
6
  const _hoisted_3 = ["stroke-dasharray", "stroke-dashoffset", "stroke-width", "r", "cx", "cy"];
7
7
  const _hoisted_4 = ["stroke-dasharray", "stroke-dashoffset", "stroke-width", "r", "cx", "cy"];
8
- const _hoisted_5 = ["value"];
8
+ const _hoisted_5 = {
9
+ key: 1,
10
+ class: "progress-bar-container"
11
+ };
12
+ const _hoisted_6 = ["value"];
13
+ const _hoisted_7 = {
14
+ key: 0,
15
+ class: "progress-bar__value"
16
+ };
9
17
  const gridBaseline = Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-grid-baseline"));
10
18
  const clickableArea = Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area"));
11
19
  const clickableAreaSmall = Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--clickable-area-small"));
@@ -16,12 +24,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
24
  size: { default: "small" },
17
25
  error: { type: Boolean },
18
26
  type: { default: "linear" },
19
- color: { default: "var(--color-primary-element)" }
27
+ color: { default: "var(--color-primary-element)" },
28
+ showValue: { type: Boolean, default: false }
20
29
  },
21
30
  setup(__props) {
22
31
  useCssVars((_ctx) => ({
23
- "0a7905e8": _ctx.color,
24
- "d7eb5974": heightPx.value
32
+ "3a86fec2": _ctx.color,
33
+ "57442460": heightPx.value
25
34
  }));
26
35
  const props = __props;
27
36
  const normalizedProgress = computed(() => Math.max(0, Math.min(100, props.value)) / 100);
@@ -78,17 +87,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
78
87
  cy: circleCenterPosition.value
79
88
  }, null, 8, _hoisted_4)
80
89
  ], 8, _hoisted_2))
81
- ], 10, _hoisted_1)) : (openBlock(), createElementBlock("progress", {
82
- key: 1,
83
- class: normalizeClass(["progress-bar progress-bar--linear vue", { "progress-bar--error": _ctx.error }]),
84
- value: _ctx.value,
85
- max: "100"
86
- }, null, 10, _hoisted_5));
90
+ ], 10, _hoisted_1)) : (openBlock(), createElementBlock("div", _hoisted_5, [
91
+ createElementVNode("progress", {
92
+ class: normalizeClass(["progress-bar progress-bar--linear vue", { "progress-bar--error": _ctx.error }]),
93
+ value: _ctx.value,
94
+ max: "100"
95
+ }, null, 10, _hoisted_6),
96
+ _ctx.showValue ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(_ctx.value) + "%", 1)) : createCommentVNode("", true)
97
+ ]));
87
98
  };
88
99
  }
89
100
  });
90
- const NcProgressBar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-38ba4aa1"]]);
101
+ const NcProgressBar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-353fa414"]]);
91
102
  export {
92
103
  NcProgressBar as N
93
104
  };
94
- //# sourceMappingURL=NcProgressBar-DDMAo4h-.mjs.map
105
+ //# sourceMappingURL=NcProgressBar-OIWW1Sei.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NcProgressBar-OIWW1Sei.mjs","sources":["../../src/components/NcProgressBar/NcProgressBar.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis is a simple progress bar component.\n## Usage:\n\n### Linear\n```vue\n<template>\n\t<span>\n\t\tSmall\n\t\t<NcProgressBar :value=\"20\" />\n\t\t<br />\n\t\tError\n\t\t<NcProgressBar :value=\"80\" :error=\"true\" />\n\t\t<br />\n\t\tCustom color\n\t\t<NcProgressBar :value=\"55\" size=\"medium\" color=\"green\" />\n\t\t<br />\n\t\tMedium size\n\t\t<NcProgressBar :value=\"60\" size=\"medium\" />\n\t\t<br />\n\t\tCustom size (changes the progress bar height)\n\t\t<NcProgressBar :value=\"55\" :size=\"8\" showValue />\n\t</span>\n</template>\n```\n\n### Circular\n```vue\n<template>\n\t<span>\n\t\tDefault\n\t\t<NcProgressBar type=\"circular\" :value=\"25\" />\n\t\t<br />\n\t\tColor\n\t\t<NcProgressBar type=\"circular\" :value=\"42\" color=\"green\" />\n\t\t<br />\n\t\tError\n\t\t<NcProgressBar type=\"circular\" :value=\"80\" error />\n\t\t<br />\n\t\tMedium size\n\t\t<NcProgressBar type=\"circular\" :value=\"65\" size=\"medium\" />\n\t\t<br />\n\t\tCustom size (changes the diameter of the progress bar)\n\t\t<NcProgressBar type=\"circular\" :value=\"65\" :size=\"42\" />\n\t</span>\n</template>\n```\n</docs>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * An integer between 0 and 100\n\t */\n\tvalue?: number\n\n\t/**\n\t * Determines the height of the progressbar.\n\t */\n\tsize?: 'small' | 'medium' | number\n\n\t/**\n\t * Applies an error color to the progressbar if true.\n\t */\n\terror?: boolean\n\n\t/**\n\t * Progress bar variant\n\t */\n\ttype?: 'linear' | 'circular'\n\n\t/**\n\t * The color of the progress bar\n\t */\n\tcolor?: string\n\n\t/**\n\t * Show value at the end of progress bar (only for linear type)\n\t */\n\tshowValue?: boolean\n}>(), {\n\tvalue: 0,\n\tcolor: 'var(--color-primary-element)',\n\tsize: 'small',\n\ttype: 'linear',\n\tshowValue: false,\n})\n\nconst normalizedProgress = computed(() => Math.max(0, Math.min(100, props.value)) / 100)\n\nconst height = computed(() => {\n\tif (typeof props.size === 'number') {\n\t\treturn Math.round(props.size)\n\t}\n\n\t// circular type\n\tif (props.type === 'circular') {\n\t\tif (props.size === 'medium') {\n\t\t\treturn clickableArea\n\t\t} else {\n\t\t\treturn clickableAreaSmall\n\t\t}\n\t}\n\n\t// linear type\n\tif (props.size === 'medium') {\n\t\treturn 1.5 * gridBaseline\n\t}\n\treturn gridBaseline\n})\n\nconst heightPx = computed(() => `${height.value}px`)\n\n// Variables for the circlur progressbar\nconst strokeWidth = computed(() => Math.max(gridBaseline, height.value / clickableArea * gridBaseline))\nconst circleCenterPosition = computed(() => height.value / 2)\nconst circleRadius = computed(() => (height.value / 2) - strokeWidth.value)\nconst circumference = computed(() => circleRadius.value * 2 * Math.PI)\n</script>\n\n<script lang=\"ts\">\n// design constants\nconst gridBaseline = Number.parseInt(window.getComputedStyle(document.body).getPropertyValue('--default-grid-baseline'))\nconst clickableArea = Number.parseInt(window.getComputedStyle(document.body).getPropertyValue('--default-clickable-area'))\nconst clickableAreaSmall = Number.parseInt(window.getComputedStyle(document.body).getPropertyValue('--clickable-area-small'))\n</script>\n\n<template>\n\t<span\n\t\tv-if=\"type === 'circular'\"\n\t\trole=\"progressbar\"\n\t\t:aria-valuenow=\"value\"\n\t\t:class=\"{ 'progress-bar--error': error }\"\n\t\tclass=\"progress-bar progress-bar--circular\">\n\t\t<svg\n\t\t\t:height=\"height\"\n\t\t\t:width=\"height\">\n\t\t\t<circle\n\t\t\t\tstroke=\"currentColor\"\n\t\t\t\tfill=\"transparent\"\n\t\t\t\t:stroke-dasharray=\"`${normalizedProgress * circumference} ${(1 - normalizedProgress) * circumference}`\"\n\t\t\t\t:stroke-dashoffset=\"0.25 * circumference\"\n\t\t\t\t:stroke-width\n\t\t\t\t:r=\"circleRadius\"\n\t\t\t\t:cx=\"circleCenterPosition\"\n\t\t\t\t:cy=\"circleCenterPosition\" />\n\t\t\t<circle\n\t\t\t\tstroke=\"var(--color-background-darker)\"\n\t\t\t\tfill=\"transparent\"\n\t\t\t\t:stroke-dasharray=\"`${(1 - normalizedProgress) * circumference} ${normalizedProgress * circumference}`\"\n\t\t\t\t:stroke-dashoffset=\"(0.25 - normalizedProgress) * circumference\"\n\t\t\t\t:stroke-width\n\t\t\t\t:r=\"circleRadius\"\n\t\t\t\t:cx=\"circleCenterPosition\"\n\t\t\t\t:cy=\"circleCenterPosition\" />\n\t\t</svg>\n\t</span>\n\t<div v-else class=\"progress-bar-container\">\n\t\t<progress\n\t\t\tclass=\"progress-bar progress-bar--linear vue\"\n\t\t\t:class=\"{ 'progress-bar--error': error }\"\n\t\t\t:value\n\t\t\tmax=\"100\" />\n\n\t\t<span v-if=\"showValue\" class=\"progress-bar__value\">{{ value }}%</span>\n\t</div>\n</template>\n\n<style lang=\"scss\" scoped>\n\n.progress-bar {\n\tdisplay: block;\n\theight: var(--progress-bar-height);\n\n\t--progress-bar-color: v-bind(color);\n\t--progress-bar-height: v-bind(heightPx);\n\n\t&--linear {\n\t\twidth: 100%;\n\t\toverflow: hidden;\n\t\tborder: 0;\n\t\tpadding: 0;\n\t\tbackground: var(--color-background-dark);\n\t\tborder-radius: calc(var(--progress-bar-height) / 2);\n\n\t\t// Browser specific rules\n\t\t&::-webkit-progress-bar {\n\t\t\theight: var(--progress-bar-height);\n\t\t\tbackground-color: transparent;\n\t\t}\n\t\t&::-webkit-progress-value {\n\t\t\tbackground: var(--progress-bar-color, var(--gradient-primary-background));\n\t\t\tborder-radius: calc(var(--progress-bar-height) / 2);\n\t\t}\n\t\t&::-moz-progress-bar {\n\t\t\tbackground: var(--progress-bar-color, var(--gradient-primary-background));\n\t\t\tborder-radius: calc(var(--progress-bar-height) / 2);\n\t\t}\n\t}\n\t&--circular {\n\t\twidth: var(--progress-bar-height);\n\t\tcolor: var(--progress-bar-color);\n\t}\n\t&--error {\n\t\tcolor: var(--color-text-error, var(--color-error)) !important;\n\t\t// Override previous values\n\t\t&::-moz-progress-bar {\n\t\t\tbackground: var(--color-text-error, var(--color-error)) !important;\n\t\t}\n\t\t&::-webkit-progress-value {\n\t\t\tbackground: var(--color-text-error, var(--color-error)) !important;\n\t\t}\n\t}\n\n\t&-container {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tgap: calc(2 * var(--default-grid-baseline));\n\t}\n\n\t&__value {\n\t\tfont-size: var(--font-size-small, 13px);\n\t\tfont-variant-numeric: tabular-nums;\n\t\tmin-width: 4ch;\n\t\ttext-align: end;\n\t}\n}\n\n</style>\n"],"names":["type","_createElementBlock","value","_normalizeClass","error","_createElementVNode","_openBlock","showValue","_toDisplayString"],"mappings":";;;;;;;;;;;;;;;AAiIA,MAAM,eAAe,OAAO,SAAS,OAAO,iBAAiB,SAAS,IAAI,EAAE,iBAAiB,yBAAyB,CAAC;AACvH,MAAM,gBAAgB,OAAO,SAAS,OAAO,iBAAiB,SAAS,IAAI,EAAE,iBAAiB,0BAA0B,CAAC;AACzH,MAAM,qBAAqB,OAAO,SAAS,OAAO,iBAAiB,SAAS,IAAI,EAAE,iBAAiB,wBAAwB,CAAC;;;;;;;;;;;;;;;;AA1E5H,UAAM,QAAQ;AAsCd,UAAM,qBAAqB,SAAS,MAAM,KAAK,IAAI,GAAG,KAAK,IAAI,KAAK,MAAM,KAAK,CAAC,IAAI,GAAG;AAEvF,UAAM,SAAS,SAAS,MAAM;AAC7B,UAAI,OAAO,MAAM,SAAS,UAAU;AACnC,eAAO,KAAK,MAAM,MAAM,IAAI;AAAA,MAC7B;AAGA,UAAI,MAAM,SAAS,YAAY;AAC9B,YAAI,MAAM,SAAS,UAAU;AAC5B,iBAAO;AAAA,QACR,OAAO;AACN,iBAAO;AAAA,QACR;AAAA,MACD;AAGA,UAAI,MAAM,SAAS,UAAU;AAC5B,eAAO,MAAM;AAAA,MACd;AACA,aAAO;AAAA,IACR,CAAC;AAED,UAAM,WAAW,SAAS,MAAM,GAAG,OAAO,KAAK,IAAI;AAGnD,UAAM,cAAc,SAAS,MAAM,KAAK,IAAI,cAAc,OAAO,QAAQ,gBAAgB,YAAY,CAA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AAZD,UAAA,GAAAL,mBAAsE,QAAtE,YAAsEO,gBAAhBN,KAAAA,KAAK,IAAG,KAAC,CAAA;;;;;;"}
@@ -1,7 +1,7 @@
1
- import '../assets/NcRadioGroup-1zpSX8V5.css';
1
+ import '../assets/NcRadioGroup-BoFb0R8S.css';
2
2
  import { defineComponent, mergeModels, useModel, ref, provide, computed, warn, createBlock, openBlock, withCtx, createElementBlock, renderSlot, normalizeClass } from "vue";
3
- import { N as NcFormBox } from "./NcFormBox-CkgY7Tif.mjs";
4
- import { N as NcFormGroup } from "./NcFormGroup-CnSfPFey.mjs";
3
+ import { N as NcFormBox } from "./NcFormBox-BYjllt0m.mjs";
4
+ import { N as NcFormGroup } from "./NcFormGroup-Bf8Mme1o.mjs";
5
5
  import { I as INSIDE_RADIO_GROUP_KEY } from "./useNcRadioGroup-D6llQmAl.mjs";
6
6
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
7
7
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -37,7 +37,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
37
37
  return openBlock(), createBlock(NcFormGroup, {
38
38
  label: _ctx.label,
39
39
  description: _ctx.description,
40
- "hide-label": _ctx.labelHidden || _ctx.hideLabel
40
+ hideLabel: _ctx.labelHidden || _ctx.hideLabel
41
41
  }, {
42
42
  default: withCtx(() => [
43
43
  buttonVariant.value ? (openBlock(), createBlock(NcFormBox, {
@@ -56,13 +56,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
56
56
  ], 2))
57
57
  ]),
58
58
  _: 3
59
- }, 8, ["label", "description", "hide-label"]);
59
+ }, 8, ["label", "description", "hideLabel"]);
60
60
  };
61
61
  }
62
62
  });
63
- const radioGroup_checkboxRadioContainer = "_radioGroup_checkboxRadioContainer_14z4o_20";
63
+ const radioGroup_checkboxRadioContainer = "_radioGroup_checkboxRadioContainer_XfI2u";
64
64
  const style0 = {
65
- "material-design-icon": "_material-design-icon_14z4o_12",
65
+ "material-design-icon": "_material-design-icon_Sx-eY",
66
66
  radioGroup_checkboxRadioContainer
67
67
  };
68
68
  const cssModules = {
@@ -72,4 +72,4 @@ const NcRadioGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cs
72
72
  export {
73
73
  NcRadioGroup as N
74
74
  };
75
- //# sourceMappingURL=NcRadioGroup-HorQ2m39.mjs.map
75
+ //# sourceMappingURL=NcRadioGroup-Bjl3n_1z.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NcRadioGroup-Bjl3n_1z.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 type { Slot } from 'vue'\n\nimport { computed, provide, ref, warn } from 'vue'\nimport NcFormBox from '../NcFormBox/NcFormBox.vue'\nimport NcFormGroup from '../NcFormGroup/NcFormGroup.vue'\nimport { INSIDE_RADIO_GROUP_KEY } from './useNcRadioGroup.ts'\n\nconst modelValue = defineModel<string>({ required: false, default: '' })\n\ndefineProps<{\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\ndefineSlots<{\n\t/**\n\t * Slot for the included radio buttons (`NcCheckboxRadioSwitch`).\n\t * The `type` prop of the `NcCheckboxRadioSwitch` will be automatically set (and forced) to `radio`.\n\t *\n\t * If you want the button variant, then you have to use `NcRadioGroupButton`.\n\t */\n\tdefault?: Slot\n}>()\n\nconst buttonVariant = ref<boolean>()\n\nprovide(INSIDE_RADIO_GROUP_KEY, computed(() => ({\n\tregister,\n\tmodelValue: modelValue.value,\n\tonUpdate,\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\twarn('[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\tmodelValue.value = value\n}\n</script>\n\n<template>\n\t<NcFormGroup\n\t\t:label\n\t\t:description\n\t\t:hideLabel=\"labelHidden || hideLabel\">\n\t\t<NcFormBox v-if=\"buttonVariant\" row>\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":["_useModel","_createBlock","label","description","labelHidden","hideLabel","_renderSlot","_createElementBlock","_normalizeClass","$style"],"mappings":";;;;;;;;;;;;;;;;;;AAaA,UAAM,aAAaA,SAAmB,SAAA,YAAiC;AAqCvE,UAAM,gBAAgB,IAAA;AAEtB,YAAQ,wBAAwB,SAAS,OAAO;AAAA,MAC/C;AAAA,MACA,YAAY,WAAW;AAAA,MACvB;AAAA,IAAA,EACC,CAAC;AAOH,aAAS,SAAS,UAAyB;AAC1C,UAAI,cAAc,UAAU,UAAa,cAAc,UAAU,UAAU;AAC1E,aAAK,qFAAqF;AAAA,MAC3F;AACA,oBAAc,QAAQ;AAAA,IACvB;AAOA,aAAS,SAAS,OAAe;AAChC,iBAAW,QAAQ;AAAA,IACpB;;0BAICC,YAUc,aAAA;AAAA,QATZ,OAAAC,KAAAA;AAAAA,QACA,aAAAC,KAAAA;AAAAA,QACA,WAAWC,KAAAA,eAAeC,KAAAA;AAAAA,MAAAA;yBAC3B,MAEY;AAAA,UAFK,cAAA,sBAAjBJ,YAEY,WAAA;AAAA;YAFoB,KAAA;AAAA,UAAA;6BAC/B,MAAQ;AAAA,cAARK,WAAQ,KAAA,QAAA,SAAA;AAAA,YAAA;;8BAETC,mBAEO,QAAA;AAAA;YAFO,OAAKC,eAAEC,KAAAA,OAAO,iCAAiC;AAAA,UAAA;YAC5DH,WAAQ,KAAA,QAAA,SAAA;AAAA,UAAA;;;;;;;;;;;;;;;;"}
@@ -1,17 +1,18 @@
1
- import '../assets/NcRadioGroupButton-DRZ1_-yY.css';
1
+ import '../assets/NcRadioGroupButton-xGU7fVa3.css';
2
2
  import { defineComponent, onMounted, computed, createElementBlock, openBlock, normalizeClass, unref, createCommentVNode, createElementVNode, renderSlot, toDisplayString } from "vue";
3
3
  import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
4
4
  import { u as useNcFormBox } from "./useNcFormBox-Djlh582y.mjs";
5
5
  import { u as useInsideRadioGroup } from "./useNcRadioGroup-D6llQmAl.mjs";
6
6
  import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
7
7
  const _hoisted_1 = ["id"];
8
- const _hoisted_2 = ["aria-labelledby", "aria-label", "checked", "value"];
8
+ const _hoisted_2 = ["aria-labelledby", "aria-label", "checked", "disabled", "value"];
9
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
10
10
  __name: "NcRadioGroupButton",
11
11
  props: {
12
12
  ariaLabel: {},
13
13
  label: {},
14
- value: {}
14
+ value: {},
15
+ disabled: { type: Boolean }
15
16
  },
16
17
  setup(__props) {
17
18
  const props = __props;
@@ -21,12 +22,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
22
  onMounted(() => radioGroup.value.register(true));
22
23
  const isChecked = computed(() => radioGroup?.value.modelValue === props.value);
23
24
  function onUpdate() {
25
+ if (props.disabled) {
26
+ return;
27
+ }
24
28
  radioGroup.value.onUpdate(props.value);
25
29
  }
26
30
  return (_ctx, _cache) => {
27
31
  return openBlock(), createElementBlock("div", {
28
32
  class: normalizeClass([{
29
- [_ctx.$style.radioGroupButton_active]: isChecked.value
33
+ [_ctx.$style.radioGroupButton_active]: isChecked.value,
34
+ [_ctx.$style.radioGroupButton_disabled]: _ctx.disabled
30
35
  }, _ctx.$style.radioGroupButton, unref(formBoxItemClass)]),
31
36
  onClick: onUpdate
32
37
  }, [
@@ -47,6 +52,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
47
52
  class: "hidden-visually",
48
53
  checked: isChecked.value,
49
54
  type: "radio",
55
+ disabled: _ctx.disabled,
50
56
  value: _ctx.value,
51
57
  onInput: onUpdate
52
58
  }, null, 40, _hoisted_2)
@@ -54,15 +60,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
54
60
  };
55
61
  }
56
62
  });
57
- const radioGroupButton = "_radioGroupButton_1euqq_20";
58
- const radioGroupButton__label = "_radioGroupButton__label_1euqq_46";
59
- const radioGroupButton__icon = "_radioGroupButton__icon_1euqq_49";
60
- const radioGroupButton_active = "_radioGroupButton_active_1euqq_62";
63
+ const radioGroupButton = "_radioGroupButton_FB-C-";
64
+ const radioGroupButton__label = "_radioGroupButton__label_gjGCq";
65
+ const radioGroupButton__icon = "_radioGroupButton__icon_lWzM4";
66
+ const radioGroupButton_disabled = "_radioGroupButton_disabled_08iwH";
67
+ const radioGroupButton_active = "_radioGroupButton_active_KS1Ru";
61
68
  const style0 = {
62
- "material-design-icon": "_material-design-icon_1euqq_12",
69
+ "material-design-icon": "_material-design-icon_q-qLD",
63
70
  radioGroupButton,
64
71
  radioGroupButton__label,
65
72
  radioGroupButton__icon,
73
+ radioGroupButton_disabled,
66
74
  radioGroupButton_active
67
75
  };
68
76
  const cssModules = {
@@ -72,4 +80,4 @@ const NcRadioGroupButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModule
72
80
  export {
73
81
  NcRadioGroupButton as N
74
82
  };
75
- //# sourceMappingURL=NcRadioGroupButton-CAisx7g4.mjs.map
83
+ //# sourceMappingURL=NcRadioGroupButton-BWPOKDMR.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NcRadioGroupButton-BWPOKDMR.mjs","sources":["../../src/components/NcRadioGroupButton/NcRadioGroupButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { computed, onMounted } from 'vue'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { useNcFormBox } from '../NcFormBox/useNcFormBox.ts'\nimport { useInsideRadioGroup } from '../NcRadioGroup/useNcRadioGroup.ts'\n\nconst props = defineProps<{\n\t/**\n\t * Non visible label for accessibility when no `label` is passed.\n\t */\n\tariaLabel?: string\n\n\t/**\n\t * The visual label of the radio button\n\t */\n\tlabel?: string\n\n\t/**\n\t * The value that should be assigned to the `modelValue` of the `NcRadioGroup`.\n\t */\n\tvalue: string\n\n\t/**\n\t * Disabled state of the radio button\n\t */\n\tdisabled?: boolean\n}>()\n\ndefineSlots<{\n\t/**\n\t * Optional icon slot\n\t */\n\ticon?: Slot\n}>()\n\nconst labelId = createElementId()\nconst radioGroup = useInsideRadioGroup()\nconst { formBoxItemClass } = useNcFormBox()\n\nonMounted(() => radioGroup!.value.register(true))\n\nconst isChecked = computed(() => radioGroup?.value.modelValue === props.value)\n\n/**\n * Handle updating the current model value\n */\nfunction onUpdate() {\n\tif (props.disabled) {\n\t\treturn\n\t}\n\n\tradioGroup!.value.onUpdate(props.value)\n}\n</script>\n\n<template>\n\t<div\n\t\t:class=\"[{\n\t\t\t[$style.radioGroupButton_active]: isChecked,\n\t\t\t[$style.radioGroupButton_disabled]: disabled,\n\t\t}, $style.radioGroupButton, formBoxItemClass]\"\n\t\t@click=\"onUpdate\">\n\t\t<div v-if=\"$slots.icon\" :class=\"$style.radioGroupButton__icon\">\n\t\t\t<slot name=\"icon\" />\n\t\t</div>\n\n\t\t<div v-if=\"label\" :id=\"labelId\" :class=\"$style.radioGroupButton__label\">\n\t\t\t{{ label }}\n\t\t</div>\n\n\t\t<input\n\t\t\t:aria-labelledby=\"label ? labelId : undefined\"\n\t\t\t:aria-label=\"label ? undefined : ariaLabel\"\n\t\t\tclass=\"hidden-visually\"\n\t\t\t:checked=\"isChecked\"\n\t\t\ttype=\"radio\"\n\t\t\t:disabled\n\t\t\t:value\n\t\t\t@input=\"onUpdate\">\n\t</div>\n</template>\n\n<style module lang=\"scss\">\n.radioGroupButton {\n\t--radio-group-button--border-radius: var(--border-radius-small);\n\t--radio-group-button--border-width: 1px;\n\t--radio-group-button--color: var(--color-primary-element-light-text);\n\t--radio-group-button--background-color: var(--color-primary-element-light);\n\t--radio-group-button--background-color-hover: var(--color-primary-element-light-hover);\n\t--radio-group-button--padding: 1px;\n\tcursor: pointer;\n\tcolor: var(--radio-group-button--color);\n\tbackground-color: var(--radio-group-button--background-color);\n\ttransition: var(--animation-quick) background-color;\n\tborder: var(--radio-group-button--border-width) solid var(--radio-group-button--background-color-hover);\n\tborder-bottom-width: 2px;\n\tborder-radius: var(--radio-group-button--border-radius);\n\tdisplay: flex;\n\tflex-direction: row;\n\talign-items: center;\n\tjustify-content: center;\n\ttext-align: center;\n\tmin-height: var(--default-clickable-area);\n\t// ensure that the content is centered because of uneven border\n\tpadding-block: var(--radio-group-button--padding) 0;\n\tpadding-inline: var(--radio-group-button--padding);\n\n\t* {\n\t\tcursor: pointer;\n\t}\n\n\t&:has(&__label) {\n\t\tpadding-inline: calc(var(--radio-group-button--padding) + var(--border-radius-element));\n\t}\n\n\t&:has(&__icon) {\n\t\tpadding-inline-start: var(--radio-group-button--padding);\n\t}\n\n\t&:hover:not(.radioGroupButton_disabled) {\n\t\tbackground-color: var(--radio-group-button--background-color-hover);\n\t}\n\n\t&:focus-within {\n\t\t--radio-group-button--border-width: 2px;\n\t\t--radio-group-button--padding: 0px;\n\t\tborder: var(--radio-group-button--border-width) solid var(--color-main-text) !important;\n\t\toutline: calc(var(--default-grid-baseline) / 2) var(--color-main-background);\n\t}\n}\n\n.radioGroupButton_active {\n\t--radio-group-button--color: var(--color-primary-element-text);\n\t--radio-group-button--background-color: var(--color-primary-element);\n\t--radio-group-button--background-color-hover: var(--color-primary-element-hover);\n}\n\n.radioGroupButton__label {\n\tfont-weight: bold;\n}\n\n.radioGroupButton_disabled {\n\tfilter: saturate($opacity_normal);\n\topacity: $opacity_disabled;\n\n\t// Reset the cursor\n\tcursor: default;\n\t* {\n\t\tcursor: default;\n\t}\n}\n\n.radioGroupButton__icon {\n\t--radio-group-button--icon-size: calc(var(--default-clickable-area) - 4px);\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\theight: 100%;\n\twidth: var(--radio-group-button--icon-size);\n\n\t// make sure the icon is a bit smaller to account for border\n\t* {\n\t\t--default-clickable-area: var(--radio-group-button--icon-size);\n\t}\n}\n</style>\n"],"names":["_createElementBlock","_normalizeClass","$style","disabled","_unref","$slots","_renderSlot","label","_createElementVNode","ariaLabel","value"],"mappings":";;;;;;;;;;;;;;;;AAaA,UAAM,QAAQ;AA6Bd,UAAM,UAAU,gBAAA;AAChB,UAAM,aAAa,oBAAA;AACnB,UAAM,EAAE,iBAAA,IAAqB,aAAA;AAE7B,cAAU,MAAM,WAAY,MAAM,SAAS,IAAI,CAAC;AAEhD,UAAM,YAAY,SAAS,MAAM,YAAY,MAAM,eAAe,MAAM,KAAK;AAK7E,aAAS,WAAW;AACnB,UAAI,MAAM,UAAU;AACnB;AAAA,MACD;AAEA,iBAAY,MAAM,SAAS,MAAM,KAAK;AAAA,IACvC;;0BAICA,mBAuBM,OAAA;AAAA,QAtBJ,OAAKC,eAAA,CAAA;AAAA,WAASC,KAAAA,OAAO,uBAAuB,GAAG,UAAA;AAAA,WAAeA,KAAAA,OAAO,yBAAyB,GAAGC,KAAAA;AAAAA,QAAAA,GAAeD,KAAAA,OAAO,kBAAkBE,MAAA,gBAAA,CAAgB,CAAA;AAAA,QAIzJ,SAAO;AAAA,MAAA;QACGC,KAAAA,OAAO,qBAAlBL,mBAEM,OAAA;AAAA;UAFmB,OAAKC,eAAEC,KAAAA,OAAO,sBAAsB;AAAA,QAAA;UAC5DI,WAAoB,KAAA,QAAA,MAAA;AAAA,QAAA;QAGVC,KAAAA,sBAAXP,mBAEM,OAAA;AAAA;UAFa,IAAII,MAAA,OAAA;AAAA,UAAU,OAAKH,eAAEC,KAAAA,OAAO,uBAAuB;AAAA,QAAA,mBAClEK,KAAAA,KAAK,GAAA,IAAA,UAAA;QAGTC,mBAQmB,SAAA;AAAA,UAPjB,mBAAiBD,KAAAA,QAAQH,MAAA,OAAA,IAAU;AAAA,UACnC,cAAYG,KAAAA,QAAQ,SAAYE,KAAAA;A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