@nextcloud/vue 9.0.0-rc.2 → 9.0.0-rc.3
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.
- package/CHANGELOG.md +84 -3
- package/dist/assets/{NcActionButton-B2G7zsju.css → NcActionButton-Dz2EBAuD.css} +20 -17
- package/dist/assets/{NcActionInput-SoC93uat.css → NcActionInput-BA67jS1l.css} +62 -62
- package/dist/assets/{NcAppContent-Di-SbMxO.css → NcAppContent-Zgn8-wsd.css} +19 -19
- package/dist/assets/{NcAppNavigation-BXItV5BV.css → NcAppNavigation-C6-8ErA_.css} +12 -12
- package/dist/assets/{NcAppNavigationItem-Cq6ZYdmT.css → NcAppNavigationItem-B27WFnUV.css} +35 -31
- package/dist/assets/{NcAppNavigationNewItem-CsqJ6c8v.css → NcAppNavigationNewItem-BrLekTMb.css} +37 -33
- package/dist/assets/{NcAppNavigationSettings-BDc6Mtek.css → NcAppNavigationSettings-B0I7HR1V.css} +14 -5
- package/dist/assets/NcAppNavigationSpacer-LST5uYYS.css +6 -0
- package/dist/assets/{NcAppNavigationToggle-DnTKNSH7.css → NcAppNavigationToggle-M0oDbwAS.css} +3 -3
- package/dist/assets/{NcAppSettingsDialog-DMWosHw9.css → NcAppSettingsDialog-DfBJYMdm.css} +10 -10
- package/dist/assets/{NcAppSidebar-exl90fRm.css → NcAppSidebar-PG3qIdkG.css} +44 -44
- package/dist/assets/{NcAvatar-B3wk2Xxl.css → NcAvatar-C01qP9VA.css} +24 -24
- package/dist/assets/{NcButton-DbE0wInI.css → NcButton-Cpw_vPKw.css} +49 -49
- package/dist/assets/{NcCheckboxRadioSwitch-sqQXUuVB.css → NcCheckboxRadioSwitch-DKVMIvxJ.css} +47 -44
- package/dist/assets/{NcChip-VsVAGaG6.css → NcChip-rGBYOr-Q.css} +9 -9
- package/dist/assets/{NcColorPicker-Clz7MjCA.css → NcColorPicker-DgByWqzp.css} +28 -28
- package/dist/assets/{NcContent-cRwic6r5.css → NcContent-C12jLe34.css} +9 -9
- package/dist/assets/{NcDashboardWidgetItem-B8_6-_k8.css → NcDashboardWidgetItem-V_jSEH-7.css} +12 -12
- package/dist/assets/{NcDateTimePickerNative-CeuS8Oeg.css → NcDateTimePickerNative-BizATZfE.css} +13 -13
- package/dist/assets/{NcDialog-bP7Jt0ZE.css → NcDialog-Ch6FuMQo.css} +15 -15
- package/dist/assets/{NcEllipsisedOption-D-IsjXWc.css → NcEllipsisedOption-BNLv_eyF.css} +5 -5
- package/dist/assets/{NcEmojiPicker-DnMU8iEd.css → NcEmojiPicker-kxoeGEM5.css} +4 -4
- package/dist/assets/{NcHeaderMenu-zo6kw_jn.css → NcHeaderMenu-BAKwNTFx.css} +11 -11
- package/dist/assets/{NcInputField-B8J2uFD4.css → NcInputField-CvP4PFAO.css} +44 -42
- package/dist/assets/{NcListItem-9eCenovm.css → NcListItem-ff6bfJFE.css} +44 -44
- package/dist/assets/{NcListItemIcon-DjEDwxRp.css → NcListItemIcon-BVhiRo5R.css} +13 -13
- package/dist/assets/{NcLoadingIcon-x1d284UU.css → NcLoadingIcon-DlDKflKI.css} +2 -2
- package/dist/assets/{NcModal-DaHROv08.css → NcModal-BMVfhs7c.css} +61 -61
- package/dist/assets/{NcNoteCard-C6xb7vi0.css → NcNoteCard-C387qsQO.css} +11 -8
- package/dist/assets/{NcPasswordField-z9gbKnov.css → NcPasswordField-DVV6Eiwf.css} +2 -2
- package/dist/assets/{NcRichText-GnQKcHYO.css → NcRichText-Fi_WAwSP.css} +86 -83
- package/dist/assets/{NcTextArea-DHr9DPOJ.css → NcTextArea-DoBYU3IE.css} +20 -20
- package/dist/assets/{NcUserBubble-tSs2XTDQ.css → NcUserBubble-CqaL0Oxv.css} +8 -8
- package/dist/assets/{referencePickerModal-DAD-jv3F.css → referencePickerModal-CUVCkTmZ.css} +19 -19
- package/dist/chunks/{ArrowLeft-CanHG70H.mjs → ArrowLeft-BiZLJltw.mjs} +3 -3
- package/dist/chunks/{ArrowLeft-CanHG70H.mjs.map → ArrowLeft-BiZLJltw.mjs.map} +1 -1
- package/dist/chunks/{DotsHorizontal-AMVAlTNH.mjs → DotsHorizontal-BJ_GCGpi.mjs} +3 -3
- package/dist/chunks/{DotsHorizontal-AMVAlTNH.mjs.map → DotsHorizontal-BJ_GCGpi.mjs.map} +1 -1
- package/dist/chunks/{NcActionButton-CnX0dQzz.mjs → NcActionButton-BECWgEPr.mjs} +4 -4
- package/dist/chunks/{NcActionButton-CnX0dQzz.mjs.map → NcActionButton-BECWgEPr.mjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-3Da8b3EI.mjs → NcActionButtonGroup-e4F30E5Z.mjs} +2 -2
- package/dist/chunks/{NcActionButtonGroup-3Da8b3EI.mjs.map → NcActionButtonGroup-e4F30E5Z.mjs.map} +1 -1
- package/dist/chunks/{NcActionInput-DeFy255L.mjs → NcActionInput-DYLqm7AP.mjs} +12 -12
- package/dist/chunks/{NcActionInput-DeFy255L.mjs.map → NcActionInput-DYLqm7AP.mjs.map} +1 -1
- package/dist/chunks/{NcActionTextEditable-B7nemAOJ.mjs → NcActionTextEditable-ByA0z9nO.mjs} +2 -2
- package/dist/chunks/{NcActionTextEditable-B7nemAOJ.mjs.map → NcActionTextEditable-ByA0z9nO.mjs.map} +1 -1
- package/dist/chunks/{NcActions-DS88I6qk.mjs → NcActions-iwG1Tj-I.mjs} +6 -6
- package/dist/chunks/{NcActions-DS88I6qk.mjs.map → NcActions-iwG1Tj-I.mjs.map} +1 -1
- package/dist/chunks/{NcAppContent-DRhM7Gyz.mjs → NcAppContent-B2qF2-YG.mjs} +9 -7
- package/dist/chunks/NcAppContent-B2qF2-YG.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-BVXVi9JQ.mjs → NcAppNavigation-JoRJnwqf.mjs} +4 -4
- package/dist/chunks/{NcAppNavigation-BVXVi9JQ.mjs.map → NcAppNavigation-JoRJnwqf.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-DkiIEk6r.mjs → NcAppNavigationCaption-DhwvNbx1.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationCaption-DkiIEk6r.mjs.map → NcAppNavigationCaption-DhwvNbx1.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-s3GC1n4o.mjs → NcAppNavigationItem-B51Guztu.mjs} +10 -10
- package/dist/chunks/{NcAppNavigationItem-s3GC1n4o.mjs.map → NcAppNavigationItem-B51Guztu.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNew-BUQgcKdv.mjs → NcAppNavigationNew-CMjaAY5A.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNew-BUQgcKdv.mjs.map → NcAppNavigationNew-CMjaAY5A.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-D1GWsi8R.mjs → NcAppNavigationNewItem-DyzpvBOb.mjs} +5 -5
- package/dist/chunks/{NcAppNavigationNewItem-D1GWsi8R.mjs.map → NcAppNavigationNewItem-DyzpvBOb.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-Cy0s4XWp.mjs → NcAppNavigationSearch-CvHp92E-.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationSearch-Cy0s4XWp.mjs.map → NcAppNavigationSearch-CvHp92E-.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-GeCb9tlR.mjs → NcAppNavigationSettings-iJ84_lwr.mjs} +16 -10
- package/dist/chunks/{NcAppNavigationSettings-GeCb9tlR.mjs.map → NcAppNavigationSettings-iJ84_lwr.mjs.map} +1 -1
- package/dist/chunks/NcAppNavigationSpacer-BvkBfuVw.mjs +17 -0
- package/dist/chunks/NcAppNavigationSpacer-BvkBfuVw.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationToggle-CFw3W3_o.mjs → NcAppNavigationToggle-D3UGt5TV.mjs} +46 -68
- package/dist/chunks/NcAppNavigationToggle-D3UGt5TV.mjs.map +1 -0
- package/dist/chunks/{NcAppSettingsDialog-CBLZvdnK.mjs → NcAppSettingsDialog-CQnZ29WZ.mjs} +6 -6
- package/dist/chunks/{NcAppSettingsDialog-CBLZvdnK.mjs.map → NcAppSettingsDialog-CQnZ29WZ.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-BomlW59S.mjs → NcAppSidebar-QEkYs8pt.mjs} +8 -8
- package/dist/chunks/{NcAppSidebar-BomlW59S.mjs.map → NcAppSidebar-QEkYs8pt.mjs.map} +1 -1
- package/dist/chunks/{NcAvatar-CSk-1oFe.mjs → NcAvatar-BadoF6cb.mjs} +13 -12
- package/dist/chunks/{NcAvatar-CSk-1oFe.mjs.map → NcAvatar-BadoF6cb.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-Bvsnecwa.mjs → NcBreadcrumb-BH4XQJ8K.mjs} +3 -3
- package/dist/chunks/{NcBreadcrumb-Bvsnecwa.mjs.map → NcBreadcrumb-BH4XQJ8K.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-DWU2ZRkM.mjs → NcBreadcrumbs-DyWyrhrJ.mjs} +4 -4
- package/dist/chunks/{NcBreadcrumbs-DWU2ZRkM.mjs.map → NcBreadcrumbs-DyWyrhrJ.mjs.map} +1 -1
- package/dist/chunks/{NcButton-Byg8-ta1.mjs → NcButton-yN4vYgXb.mjs} +3 -3
- package/dist/chunks/{NcButton-Byg8-ta1.mjs.map → NcButton-yN4vYgXb.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-Ca1ouh22.mjs → NcCheckboxRadioSwitch-Di0xbf6d.mjs} +8 -8
- package/dist/chunks/NcCheckboxRadioSwitch-Di0xbf6d.mjs.map +1 -0
- package/dist/chunks/{NcChip-Cl6RfDoK.mjs → NcChip-DfDlpsAh.mjs} +7 -7
- package/dist/chunks/{NcChip-Cl6RfDoK.mjs.map → NcChip-DfDlpsAh.mjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-CxzQkCFq.mjs → NcCollectionList-B2PzNHzw.mjs} +6 -6
- package/dist/chunks/{NcCollectionList-CxzQkCFq.mjs.map → NcCollectionList-B2PzNHzw.mjs.map} +1 -1
- package/dist/chunks/NcColorPicker-CoteX_0P.mjs +182 -0
- package/dist/chunks/NcColorPicker-CoteX_0P.mjs.map +1 -0
- package/dist/chunks/{NcContent-DtM8j8ub.mjs → NcContent-BImnEnMI.mjs} +81 -112
- package/dist/chunks/{NcContent-DtM8j8ub.mjs.map → NcContent-BImnEnMI.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-uBobynyZ.mjs → NcDashboardWidget-DJtdcW-W.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidget-uBobynyZ.mjs.map → NcDashboardWidget-DJtdcW-W.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-DnI9uLf1.mjs → NcDashboardWidgetItem-CZaWF40u.mjs} +8 -8
- package/dist/chunks/NcDashboardWidgetItem-CZaWF40u.mjs.map +1 -0
- package/dist/chunks/{NcDateTime.vue_vue_type_script_setup_true_lang-BD-rj6Dr.mjs → NcDateTime.vue_vue_type_script_setup_true_lang-C2VbacBQ.mjs} +2 -2
- package/dist/chunks/{NcDateTime.vue_vue_type_script_setup_true_lang-BD-rj6Dr.mjs.map → NcDateTime.vue_vue_type_script_setup_true_lang-C2VbacBQ.mjs.map} +1 -1
- package/dist/chunks/{NcDateTimePicker-DYNOGc6A.mjs → NcDateTimePicker-BB--HQog.mjs} +4 -4
- package/dist/chunks/{NcDateTimePicker-DYNOGc6A.mjs.map → NcDateTimePicker-BB--HQog.mjs.map} +1 -1
- package/dist/chunks/NcDateTimePickerNative-DaPzFiYH.mjs +100 -0
- package/dist/chunks/NcDateTimePickerNative-DaPzFiYH.mjs.map +1 -0
- package/dist/chunks/NcDialog-CXVaeWJf.mjs +169 -0
- package/dist/chunks/NcDialog-CXVaeWJf.mjs.map +1 -0
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-DAZ2Budh.mjs → NcDialogButton.vue_vue_type_script_setup_true_lang-DSKWXzqG.mjs} +4 -4
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-DAZ2Budh.mjs.map → NcDialogButton.vue_vue_type_script_setup_true_lang-DSKWXzqG.mjs.map} +1 -1
- package/dist/chunks/{NcEllipsisedOption-4k07kvEr.mjs → NcEllipsisedOption-C8uNDC-j.mjs} +4 -4
- package/dist/chunks/{NcEllipsisedOption-4k07kvEr.mjs.map → NcEllipsisedOption-C8uNDC-j.mjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-lhuMMbDy.mjs → NcEmojiPicker-BGO0v-D5.mjs} +11 -11
- package/dist/chunks/{NcEmojiPicker-lhuMMbDy.mjs.map → NcEmojiPicker-BGO0v-D5.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderButton-BXfTpkIm.mjs → NcHeaderButton-BTZ1WNux.mjs} +2 -2
- package/dist/chunks/{NcHeaderButton-BXfTpkIm.mjs.map → NcHeaderButton-BTZ1WNux.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-o9FmNBI5.mjs → NcHeaderMenu-DmpJfS86.mjs} +5 -5
- package/dist/chunks/NcHeaderMenu-DmpJfS86.mjs.map +1 -0
- package/dist/chunks/{NcHighlight-Cu4UfEEO.mjs → NcHighlight.vue_vue_type_script_lang-DnWQDM_2.mjs} +5 -9
- package/dist/chunks/NcHighlight.vue_vue_type_script_lang-DnWQDM_2.mjs.map +1 -0
- package/dist/chunks/{NcInputConfirmCancel-C1K1gyQA.mjs → NcInputConfirmCancel-B7gAZ7U1.mjs} +3 -3
- package/dist/chunks/{NcInputConfirmCancel-C1K1gyQA.mjs.map → NcInputConfirmCancel-B7gAZ7U1.mjs.map} +1 -1
- package/dist/chunks/NcInputField-DH5ybroK.mjs +162 -0
- package/dist/chunks/NcInputField-DH5ybroK.mjs.map +1 -0
- package/dist/chunks/{NcListItem-C2LlJgjL.mjs → NcListItem-50hUlVlb.mjs} +8 -8
- package/dist/chunks/{NcListItem-C2LlJgjL.mjs.map → NcListItem-50hUlVlb.mjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-5ms0eK3w.mjs → NcListItemIcon-BGEA45de.mjs} +5 -5
- package/dist/chunks/{NcListItemIcon-5ms0eK3w.mjs.map → NcListItemIcon-BGEA45de.mjs.map} +1 -1
- package/dist/chunks/NcLoadingIcon-Dm3kRPrf.mjs +57 -0
- package/dist/chunks/NcLoadingIcon-Dm3kRPrf.mjs.map +1 -0
- package/dist/chunks/{NcModal-BisVxXe_.mjs → NcModal-CWRw1hyF.mjs} +12 -17
- package/dist/chunks/NcModal-CWRw1hyF.mjs.map +1 -0
- package/dist/chunks/NcNoteCard-DmhVICGO.mjs +61 -0
- package/dist/chunks/NcNoteCard-DmhVICGO.mjs.map +1 -0
- package/dist/chunks/NcPasswordField-DY-wDP9m.mjs +211 -0
- package/dist/chunks/NcPasswordField-DY-wDP9m.mjs.map +1 -0
- package/dist/chunks/{NcPopover-MsWUAvsI.mjs → NcPopover-BUlWWIxc.mjs} +3 -3
- package/dist/chunks/{NcPopover-MsWUAvsI.mjs.map → NcPopover-BUlWWIxc.mjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel-CShyi9lg.mjs → NcRelatedResourcesPanel-BUasditW.mjs} +4 -4
- package/dist/chunks/{NcRelatedResourcesPanel-CShyi9lg.mjs.map → NcRelatedResourcesPanel-BUasditW.mjs.map} +1 -1
- package/dist/chunks/{NcRichContenteditable-DgH9H1qf.mjs → NcRichContenteditable-CGP8KN41.mjs} +15 -13
- package/dist/chunks/{NcRichContenteditable-DgH9H1qf.mjs.map → NcRichContenteditable-CGP8KN41.mjs.map} +1 -1
- package/dist/chunks/{NcRichText-BkKK1moX.mjs → NcRichText-DDllQirJ.mjs} +10 -6
- package/dist/chunks/{NcRichText-BkKK1moX.mjs.map → NcRichText-DDllQirJ.mjs.map} +1 -1
- package/dist/chunks/{NcSelect-BSa2kSPW.mjs → NcSelect-Bkg2rrDQ.mjs} +4 -4
- package/dist/chunks/{NcSelect-BSa2kSPW.mjs.map → NcSelect-Bkg2rrDQ.mjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-BW0QroJV.mjs → NcSelectTags-gJMICSS2.mjs} +4 -4
- package/dist/chunks/{NcSelectTags-BW0QroJV.mjs.map → NcSelectTags-gJMICSS2.mjs.map} +1 -1
- package/dist/chunks/{NcSelectUsers-Bhx9k-0v.mjs → NcSelectUsers-mRdIiG7L.mjs} +3 -3
- package/dist/chunks/{NcSelectUsers-Bhx9k-0v.mjs.map → NcSelectUsers-mRdIiG7L.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-CrOqaL-x.mjs → NcSettingsInputText-P8cEi0aP.mjs} +3 -3
- package/dist/chunks/{NcSettingsInputText-CrOqaL-x.mjs.map → NcSettingsInputText-P8cEi0aP.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-D6ShpfeY.mjs → NcSettingsSection-DkDLjL_G.mjs} +2 -2
- package/dist/chunks/{NcSettingsSection-D6ShpfeY.mjs.map → NcSettingsSection-DkDLjL_G.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-DpNxkoZ2.mjs → NcSettingsSelectGroup-BvYxv8aw.mjs} +4 -4
- package/dist/chunks/{NcSettingsSelectGroup-DpNxkoZ2.mjs.map → NcSettingsSelectGroup-BvYxv8aw.mjs.map} +1 -1
- package/dist/chunks/NcTextArea-D4hJqp6W.mjs +122 -0
- package/dist/chunks/NcTextArea-D4hJqp6W.mjs.map +1 -0
- package/dist/chunks/NcTextField.vue_vue_type_script_setup_true_lang-BggEO9Jn.mjs +92 -0
- package/dist/chunks/NcTextField.vue_vue_type_script_setup_true_lang-BggEO9Jn.mjs.map +1 -0
- package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-T3gPr-FV.mjs → NcTimezonePicker.vue_vue_type_script_setup_true_lang-C7loAI0C.mjs} +3 -3
- package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-T3gPr-FV.mjs.map → NcTimezonePicker.vue_vue_type_script_setup_true_lang-C7loAI0C.mjs.map} +1 -1
- package/dist/chunks/NcUserBubble-CKN4C4kP.mjs +136 -0
- package/dist/chunks/NcUserBubble-CKN4C4kP.mjs.map +1 -0
- package/dist/chunks/{NcUserStatusIcon-CtOZd90o.mjs → NcUserStatusIcon-BX9ILG2r.mjs} +2 -2
- package/dist/chunks/{NcUserStatusIcon-CtOZd90o.mjs.map → NcUserStatusIcon-BX9ILG2r.mjs.map} +1 -1
- package/dist/chunks/{_l10n-Bg-fZ9R0.mjs → _l10n-B4AgnzNC.mjs} +59 -69
- package/dist/chunks/_l10n-B4AgnzNC.mjs.map +1 -0
- package/dist/chunks/{colors-BPGhD2C5.mjs → colors-fFK6HkHZ.mjs} +2 -2
- package/dist/chunks/{colors-BPGhD2C5.mjs.map → colors-fFK6HkHZ.mjs.map} +1 -1
- package/dist/chunks/mdi-CWpCzTmH.mjs +33 -0
- package/dist/chunks/{mdi-CR-3gwdl.mjs.map → mdi-CWpCzTmH.mjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-Dw1szWUR.mjs → referencePickerModal-uLIBRHIc.mjs} +19 -19
- package/dist/chunks/{referencePickerModal-Dw1szWUR.mjs.map → referencePickerModal-uLIBRHIc.mjs.map} +1 -1
- package/dist/chunks/{useFormatDateTime-L411ysPm.mjs → useFormatDateTime-DmnI1ENQ.mjs} +2 -2
- package/dist/chunks/{useFormatDateTime-L411ysPm.mjs.map → useFormatDateTime-DmnI1ENQ.mjs.map} +1 -1
- package/dist/chunks/{usernameToColor-CuTR6O_B.mjs → usernameToColor-Bik5PNni.mjs} +2 -2
- package/dist/chunks/{usernameToColor-CuTR6O_B.mjs.map → usernameToColor-Bik5PNni.mjs.map} +1 -1
- package/dist/components/NcActionButton/index.mjs +1 -1
- package/dist/components/NcActionButtonGroup/index.mjs +1 -1
- package/dist/components/NcActionCheckbox/NcActionCheckbox.vue.d.ts +1 -1
- package/dist/components/NcActionInput/index.mjs +1 -1
- package/dist/components/NcActionRadio/NcActionRadio.vue.d.ts +1 -1
- package/dist/components/NcActionTextEditable/index.mjs +1 -1
- package/dist/components/NcActions/index.mjs +1 -1
- package/dist/components/NcAppContent/NcAppContent.vue.d.ts +2 -1
- package/dist/components/NcAppContent/index.mjs +1 -1
- package/dist/components/NcAppNavigation/NcAppNavigation.vue.d.ts +66 -0
- package/dist/components/NcAppNavigation/index.mjs +1 -1
- package/dist/components/NcAppNavigationCaption/index.mjs +1 -1
- package/dist/components/NcAppNavigationItem/index.mjs +1 -1
- package/dist/components/NcAppNavigationNew/index.mjs +1 -1
- package/dist/components/NcAppNavigationNewItem/index.mjs +1 -1
- package/dist/components/NcAppNavigationSearch/NcAppNavigationSearch.vue.d.ts +275 -0
- package/dist/components/NcAppNavigationSearch/index.mjs +1 -1
- package/dist/components/NcAppNavigationSettings/index.mjs +1 -1
- package/dist/components/NcAppNavigationSpacer/NcAppNavigationSpacer.vue.d.ts +1 -1
- package/dist/components/NcAppNavigationSpacer/index.d.ts +4 -0
- package/dist/components/NcAppNavigationSpacer/index.mjs +1 -1
- package/dist/components/NcAppNavigationToggle/NcAppNavigationToggle.vue.d.ts +9 -0
- package/dist/components/NcAppNavigationToggle/index.d.ts +5 -3
- package/dist/components/NcAppNavigationToggle/index.mjs +2 -3
- package/dist/components/NcAppSettingsDialog/index.mjs +1 -1
- package/dist/components/NcAppSidebar/index.mjs +1 -1
- package/dist/components/NcAvatar/index.mjs +1 -1
- package/dist/components/NcBreadcrumb/index.mjs +1 -1
- package/dist/components/NcBreadcrumbs/index.mjs +1 -1
- package/dist/components/NcButton/index.mjs +1 -1
- package/dist/components/NcCheckboxRadioSwitch/index.mjs +1 -1
- package/dist/components/NcChip/NcChip.vue.d.ts +2 -2
- package/dist/components/NcChip/index.mjs +1 -1
- package/dist/components/NcCollectionList/index.mjs +1 -1
- package/dist/components/NcColorPicker/NcColorPicker.vue.d.ts +54 -1
- package/dist/components/NcColorPicker/index.d.ts +4 -0
- package/dist/components/NcColorPicker/index.mjs +1 -1
- package/dist/components/NcContent/NcContent.vue.d.ts +33 -0
- package/dist/components/NcContent/index.d.ts +4 -0
- package/dist/components/NcContent/index.mjs +1 -1
- package/dist/components/NcDashboardWidget/index.mjs +1 -1
- package/dist/components/NcDashboardWidgetItem/index.mjs +1 -1
- package/dist/components/NcDateTime/index.mjs +1 -1
- package/dist/components/NcDateTimePicker/index.mjs +1 -1
- package/dist/components/NcDateTimePickerNative/NcDateTimePickerNative.vue.d.ts +29 -151
- package/dist/components/NcDateTimePickerNative/index.d.ts +4 -0
- package/dist/components/NcDateTimePickerNative/index.mjs +1 -1
- package/dist/components/NcDialog/NcDialog.vue.d.ts +73 -380
- package/dist/components/NcDialog/index.d.ts +4 -0
- package/dist/components/NcDialog/index.mjs +1 -1
- package/dist/components/NcDialogButton/index.mjs +1 -1
- package/dist/components/NcEllipsisedOption/index.mjs +1 -1
- package/dist/components/NcEmojiPicker/index.mjs +1 -1
- package/dist/components/NcHeaderButton/index.mjs +1 -1
- package/dist/components/NcHeaderMenu/index.d.ts +4 -0
- package/dist/components/NcHeaderMenu/index.mjs +1 -1
- package/dist/components/NcHighlight/NcHighlight.vue.d.ts +15 -8
- package/dist/components/NcHighlight/index.d.ts +4 -0
- package/dist/components/NcHighlight/index.mjs +1 -1
- package/dist/components/NcInputField/NcInputField.vue.d.ts +147 -0
- package/dist/components/NcInputField/index.d.ts +5 -0
- package/dist/components/NcInputField/index.mjs +1 -1
- package/dist/components/NcListItem/index.mjs +1 -1
- package/dist/components/NcListItemIcon/index.mjs +1 -1
- package/dist/components/NcLoadingIcon/NcLoadingIcon.vue.d.ts +9 -45
- package/dist/components/NcLoadingIcon/index.d.ts +4 -0
- package/dist/components/NcLoadingIcon/index.mjs +1 -1
- package/dist/components/NcModal/index.mjs +1 -1
- package/dist/components/NcNoteCard/NcNoteCard.vue.d.ts +37 -62
- package/dist/components/NcNoteCard/index.d.ts +4 -0
- package/dist/components/NcNoteCard/index.mjs +1 -1
- package/dist/components/NcPasswordField/NcPasswordField.vue.d.ts +282 -0
- package/dist/components/NcPasswordField/index.d.ts +4 -0
- package/dist/components/NcPasswordField/index.mjs +1 -1
- package/dist/components/NcPopover/index.mjs +1 -1
- package/dist/components/NcRelatedResourcesPanel/index.mjs +1 -1
- package/dist/components/NcRichContenteditable/NcRichContenteditable.vue.d.ts +1 -1
- package/dist/components/NcRichContenteditable/index.mjs +1 -1
- package/dist/components/NcRichText/index.mjs +3 -3
- package/dist/components/NcSelect/index.mjs +1 -1
- package/dist/components/NcSelectTags/index.mjs +1 -1
- package/dist/components/NcSelectUsers/index.mjs +1 -1
- package/dist/components/NcSettingsInputText/NcSettingsInputText.vue.d.ts +1 -1
- package/dist/components/NcSettingsInputText/index.mjs +1 -1
- package/dist/components/NcSettingsSection/index.mjs +1 -1
- package/dist/components/NcSettingsSelectGroup/index.mjs +1 -1
- package/dist/components/NcTextArea/NcTextArea.vue.d.ts +51 -170
- package/dist/components/NcTextArea/index.d.ts +4 -0
- package/dist/components/NcTextArea/index.mjs +1 -1
- package/dist/components/NcTextField/NcTextField.vue.d.ts +277 -0
- package/dist/components/NcTextField/index.d.ts +4 -0
- package/dist/components/NcTextField/index.mjs +2 -2
- package/dist/components/NcTimezonePicker/index.mjs +1 -1
- package/dist/components/NcUserBubble/NcUserBubble.vue.d.ts +90 -0
- package/dist/components/NcUserBubble/NcUserBubbleDiv.vue.d.ts +16 -1
- package/dist/components/NcUserBubble/index.d.ts +4 -0
- package/dist/components/NcUserBubble/index.mjs +1 -1
- package/dist/components/NcUserStatusIcon/index.mjs +1 -1
- package/dist/components/index.d.ts +15 -15
- package/dist/functions/reference/index.mjs +1 -1
- package/dist/functions/usernameToColor/index.mjs +1 -1
- package/dist/index.mjs +76 -76
- package/dist/utils/VueTypes.d.ts +6 -0
- package/package.json +2 -2
- package/dist/assets/NcAppNavigationSpacer-BJj8CIpA.css +0 -6
- package/dist/chunks/AlertCircleOutline-DVzpKQVu.mjs +0 -49
- package/dist/chunks/AlertCircleOutline-DVzpKQVu.mjs.map +0 -1
- package/dist/chunks/NcAppContent-DRhM7Gyz.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationSpacer-CzBLuQL8.mjs +0 -15
- package/dist/chunks/NcAppNavigationSpacer-CzBLuQL8.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationToggle-CFw3W3_o.mjs.map +0 -1
- package/dist/chunks/NcCheckboxRadioSwitch-Ca1ouh22.mjs.map +0 -1
- package/dist/chunks/NcColorPicker-BjsBCkEt.mjs +0 -275
- package/dist/chunks/NcColorPicker-BjsBCkEt.mjs.map +0 -1
- package/dist/chunks/NcDashboardWidgetItem-DnI9uLf1.mjs.map +0 -1
- package/dist/chunks/NcDateTimePickerNative-D0pjWawX.mjs +0 -202
- package/dist/chunks/NcDateTimePickerNative-D0pjWawX.mjs.map +0 -1
- package/dist/chunks/NcDialog-BQNR_-Ju.mjs +0 -319
- package/dist/chunks/NcDialog-BQNR_-Ju.mjs.map +0 -1
- package/dist/chunks/NcHeaderMenu-o9FmNBI5.mjs.map +0 -1
- package/dist/chunks/NcHighlight-Cu4UfEEO.mjs.map +0 -1
- package/dist/chunks/NcInputField-BBS1E7r-.mjs +0 -306
- package/dist/chunks/NcInputField-BBS1E7r-.mjs.map +0 -1
- package/dist/chunks/NcLoadingIcon-CsMn1bFR.mjs +0 -79
- package/dist/chunks/NcLoadingIcon-CsMn1bFR.mjs.map +0 -1
- package/dist/chunks/NcModal-BisVxXe_.mjs.map +0 -1
- package/dist/chunks/NcNoteCard-XoSOund1.mjs +0 -276
- package/dist/chunks/NcNoteCard-XoSOund1.mjs.map +0 -1
- package/dist/chunks/NcPasswordField-hZiEd3tC.mjs +0 -298
- package/dist/chunks/NcPasswordField-hZiEd3tC.mjs.map +0 -1
- package/dist/chunks/NcTextArea-DKHjCur8.mjs +0 -217
- package/dist/chunks/NcTextArea-DKHjCur8.mjs.map +0 -1
- package/dist/chunks/NcTextField-DJ1KtSKd.mjs +0 -174
- package/dist/chunks/NcTextField-DJ1KtSKd.mjs.map +0 -1
- package/dist/chunks/NcUserBubble-Csot0WLv.mjs +0 -228
- package/dist/chunks/NcUserBubble-Csot0WLv.mjs.map +0 -1
- package/dist/chunks/_l10n-Bg-fZ9R0.mjs.map +0 -1
- package/dist/chunks/mdi-CR-3gwdl.mjs +0 -21
- package/dist/components/NcEllipsisedOption/NcEllipsisedOption.vue.d.ts +0 -95
- package/dist/components/NcRichText/NcReferencePicker/NcProviderList.vue.d.ts +0 -215
- package/dist/components/NcRichText/NcReferencePicker/NcSearch.vue.d.ts +0 -289
- package/dist/components/NcRichText/NcReferencePicker/NcSearchResult.vue.d.ts +0 -69
- package/dist/components/NcSelect/NcSelect.vue.d.ts +0 -121
- package/dist/components/NcSelectTags/NcSelectTags.vue.d.ts +0 -205
- package/dist/components/NcSettingsSelectGroup/NcSettingsSelectGroup.vue.d.ts +0 -265
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import '../assets/NcNoteCard-C387qsQO.css';
|
|
2
|
+
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, renderSlot, createElementVNode, createVNode, unref, createCommentVNode, toDisplayString } from "vue";
|
|
3
|
+
import { f as mdiAlert, g as mdiInformation, h as mdiCheckboxMarkedCircle, i as mdiAlertDecagram } from "./mdi-CWpCzTmH.mjs";
|
|
4
|
+
import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-BOiCKv0b.mjs";
|
|
5
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
6
|
+
const _hoisted_1 = ["role"];
|
|
7
|
+
const _hoisted_2 = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "notecard__heading"
|
|
10
|
+
};
|
|
11
|
+
const _hoisted_3 = { class: "notecard__text" };
|
|
12
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
|
+
__name: "NcNoteCard",
|
|
14
|
+
props: {
|
|
15
|
+
heading: { default: void 0 },
|
|
16
|
+
showAlert: { type: Boolean },
|
|
17
|
+
text: { default: void 0 },
|
|
18
|
+
type: { default: "warning" }
|
|
19
|
+
},
|
|
20
|
+
setup(__props) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const shouldShowAlert = computed(() => props.showAlert || props.type === "error");
|
|
23
|
+
const iconPath = computed(() => {
|
|
24
|
+
switch (props.type) {
|
|
25
|
+
case "error":
|
|
26
|
+
return mdiAlertDecagram;
|
|
27
|
+
case "success":
|
|
28
|
+
return mdiCheckboxMarkedCircle;
|
|
29
|
+
case "info":
|
|
30
|
+
return mdiInformation;
|
|
31
|
+
case "warning":
|
|
32
|
+
default:
|
|
33
|
+
return mdiAlert;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
return (_ctx, _cache) => {
|
|
37
|
+
return openBlock(), createElementBlock("div", {
|
|
38
|
+
class: normalizeClass(["notecard", `notecard--${_ctx.type}`]),
|
|
39
|
+
role: shouldShowAlert.value ? "alert" : "note"
|
|
40
|
+
}, [
|
|
41
|
+
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
42
|
+
createVNode(unref(NcIconSvgWrapper), {
|
|
43
|
+
path: iconPath.value,
|
|
44
|
+
class: normalizeClass(["notecard__icon", { "notecard__icon--heading": _ctx.heading }])
|
|
45
|
+
}, null, 8, ["path", "class"])
|
|
46
|
+
], true),
|
|
47
|
+
createElementVNode("div", null, [
|
|
48
|
+
_ctx.heading ? (openBlock(), createElementBlock("p", _hoisted_2, toDisplayString(_ctx.heading), 1)) : createCommentVNode("", true),
|
|
49
|
+
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
50
|
+
createElementVNode("p", _hoisted_3, toDisplayString(_ctx.text), 1)
|
|
51
|
+
], true)
|
|
52
|
+
])
|
|
53
|
+
], 10, _hoisted_1);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
const NcNoteCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5af42bd4"]]);
|
|
58
|
+
export {
|
|
59
|
+
NcNoteCard as N
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=NcNoteCard-DmhVICGO.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NcNoteCard-DmhVICGO.mjs","sources":["../../src/components/NcNoteCard/NcNoteCard.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to display additional information to the user. It is\navailable in four versions:\n\n- **success**: Display a successful message.<br>\n Should be used to show success of an operation or optional information to help a user be more successful.\n- **info**: Display an informational message.<br>\n Should be used to highlight information that users should take into account.\n- **warning**: Display a warning to the user.<br>\n Should be used for critical content demanding user attention due to potential risks.\n- **error**: Display an error message.<br>\n Should be used for negative potential consequences of an action.\n\n### Usage\n\n```vue\n<template>\n\t<div>\n\t\t<NcNoteCard type=\"warning\" text=\"This is dangerous\" />\n\n\t\t<NcNoteCard type=\"error\"\n\t\t\theading=\"Error\"\n\t\t\ttext=\"The server is not happy and reported the following error\" />\n\n\t\t<NcNoteCard type=\"success\" text=\"You won\" />\n\n\t\t<NcNoteCard type=\"info\" text=\"For your information\" />\n\n\t\t<h4>Custom icon</h4>\n\t\t<NcNoteCard type=\"warning\" text=\"Custom icon usage\">\n\t\t\t<template #icon>\n\t\t\t\t<Cog :size=\"20\"/>\n\t\t\t</template>\n\t\t</NcNoteCard>\n\n\t\t<h4>Custom content using the default slot</h4>\n\t\t<NcNoteCard type=\"info\">\n\t\t\tPress <kbd>CTRL</kbd>+<kbd>C</kbd>\n\t\t</NcNoteCard>\n\t</div>\n</template>\n\n<script>\n\timport Cog from 'vue-material-design-icons/Cog.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tCog,\n\t\t},\n\t}\n</script>\n```\n</docs>\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { mdiAlert, mdiAlertDecagram, mdiCheckboxMarkedCircle, mdiInformation } from '@mdi/js'\nimport { computed } from 'vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.ts'\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * Optional text to show as a heading of the note card\n\t */\n\theading?: string\n\n\t/**\n\t * Enforce the `alert` role on the note card.\n\t *\n\t * The alert role should only be used for information that requires the user's immediate attention.\n\t *\n\t * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/alert_role\n\t */\n\tshowAlert?: boolean\n\n\t/**\n\t * The message text of the note card\n\t */\n\ttext?: string\n\n\t/**\n\t * Type or severity of the message\n\t */\n\ttype?: 'success' | 'info' | 'warning' | 'error'\n}>(), {\n\theading: undefined,\n\ttext: undefined,\n\ttype: 'warning',\n})\n\ndefineSlots<{\n\t/** The main content (overwrites the `text` prop) */\n\tdefault?: Slot\n\t/** Manually provided icon */\n\ticon?: Slot\n}>()\n\nconst shouldShowAlert = computed(() => props.showAlert || props.type === 'error')\n\nconst iconPath = computed(() => {\n\tswitch (props.type) {\n\tcase 'error':\n\t\treturn mdiAlertDecagram\n\tcase 'success':\n\t\treturn mdiCheckboxMarkedCircle\n\tcase 'info':\n\t\treturn mdiInformation\n\tcase 'warning':\n\tdefault:\n\t\treturn mdiAlert\n\t}\n})\n</script>\n\n<template>\n\t<div class=\"notecard\"\n\t\t:class=\"`notecard--${type}`\"\n\t\t:role=\"shouldShowAlert ? 'alert' : 'note'\">\n\t\t<slot name=\"icon\">\n\t\t\t<NcIconSvgWrapper :path=\"iconPath\"\n\t\t\t\tclass=\"notecard__icon\"\n\t\t\t\t:class=\"{ 'notecard__icon--heading': heading }\" />\n\t\t</slot>\n\t\t<div>\n\t\t\t<p v-if=\"heading\" class=\"notecard__heading\">\n\t\t\t\t{{ heading }}\n\t\t\t</p>\n\t\t\t<slot>\n\t\t\t\t<p class=\"notecard__text\">\n\t\t\t\t\t{{ text }}\n\t\t\t\t</p>\n\t\t\t</slot>\n\t\t</div>\n\t</div>\n</template>\n\n<style lang=\"scss\" scoped>\n.notecard {\n\t--note-card-icon-size: 20px;\n\t--note-card-padding: calc(2 * var(--default-grid-baseline));\n\tcolor: var(--color-main-text) !important;\n\tbackground-color: var(--note-background) !important;\n\tborder-inline-start: var(--default-grid-baseline) solid var(--note-theme);\n\tborder-radius: var(--border-radius);\n\tmargin: 1rem 0;\n\tpadding: var(--note-card-padding);\n\tdisplay: flex;\n\tflex-direction: row;\n\tgap: var(--note-card-padding);\n\n\t&__heading {\n\t\tfont-size: var(--note-card-icon-size); // Same as icon\n\t\tfont-weight: 600;\n\t}\n\n\t&__icon {\n\t\tcolor: var(--note-theme);\n\n\t\t&--heading {\n\t\t\tfont-size: var(--note-card-icon-size);\n\t\t\t// Ensure icon is on the same height as the heading\n\t\t\tmargin-block: calc((1lh - 1em) / 2) auto;\n\t\t}\n\t}\n\n\t&--success {\n\t\t--note-background: rgba(var(--color-success-rgb), 0.1);\n\t\t--note-theme: var(--color-success);\n\t}\n\n\t&--info {\n\t\t--note-background: rgba(var(--color-info-rgb), 0.1);\n\t\t--note-theme: var(--color-info);\n\t}\n\n\t&--error {\n\t\t--note-background: rgba(var(--color-error-rgb), 0.1);\n\t\t--note-theme: var(--color-error);\n\t}\n\n\t&--warning {\n\t\t--note-background: rgba(var(--color-warning-rgb), 0.1);\n\t\t--note-theme: var(--color-warning);\n\t}\n}\n</style>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAkEA,UAAM,QAAQ;AAqCd,UAAM,kBAAkB,SAAS,MAAM,MAAM,aAAa,MAAM,SAAS,OAAO;AAE1E,UAAA,WAAW,SAAS,MAAM;AAC/B,cAAQ,MAAM,MAAM;AAAA,QACpB,KAAK;AACG,iBAAA;AAAA,QACR,KAAK;AACG,iBAAA;AAAA,QACR,KAAK;AACG,iBAAA;AAAA,QACR,KAAK;AAAA,QACL;AACQ,iBAAA;AAAA,MAAA;AAAA,IACR,CACA;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import '../assets/NcPasswordField-DVV6Eiwf.css';
|
|
2
|
+
import { createElementBlock, openBlock, mergeProps, createElementVNode, createCommentVNode, toDisplayString, defineComponent, mergeModels, useModel, watch, useTemplateRef, ref, computed, createBlock, unref, createSlots, withCtx, renderSlot } from "vue";
|
|
3
|
+
import debounce from "debounce";
|
|
4
|
+
import axios from "@nextcloud/axios";
|
|
5
|
+
import { getCapabilities } from "@nextcloud/capabilities";
|
|
6
|
+
import { generateOcsUrl } from "@nextcloud/router";
|
|
7
|
+
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
8
|
+
import { N as NcInputField } from "./NcInputField-DH5ybroK.mjs";
|
|
9
|
+
import { r as register, a as t } from "./_l10n-B4AgnzNC.mjs";
|
|
10
|
+
import { l as logger } from "./logger-D3RVzcfQ.mjs";
|
|
11
|
+
const _sfc_main$2 = {
|
|
12
|
+
name: "EyeIcon",
|
|
13
|
+
emits: ["click"],
|
|
14
|
+
props: {
|
|
15
|
+
title: {
|
|
16
|
+
type: String
|
|
17
|
+
},
|
|
18
|
+
fillColor: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "currentColor"
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 24
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const _hoisted_1$1 = ["aria-hidden", "aria-label"];
|
|
29
|
+
const _hoisted_2$1 = ["fill", "width", "height"];
|
|
30
|
+
const _hoisted_3$1 = { d: "M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z" };
|
|
31
|
+
const _hoisted_4$1 = { key: 0 };
|
|
32
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
33
|
+
return openBlock(), createElementBlock("span", mergeProps(_ctx.$attrs, {
|
|
34
|
+
"aria-hidden": $props.title ? null : "true",
|
|
35
|
+
"aria-label": $props.title,
|
|
36
|
+
class: "material-design-icon eye-icon",
|
|
37
|
+
role: "img",
|
|
38
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
|
|
39
|
+
}), [
|
|
40
|
+
(openBlock(), createElementBlock("svg", {
|
|
41
|
+
fill: $props.fillColor,
|
|
42
|
+
class: "material-design-icon__svg",
|
|
43
|
+
width: $props.size,
|
|
44
|
+
height: $props.size,
|
|
45
|
+
viewBox: "0 0 24 24"
|
|
46
|
+
}, [
|
|
47
|
+
createElementVNode("path", _hoisted_3$1, [
|
|
48
|
+
$props.title ? (openBlock(), createElementBlock("title", _hoisted_4$1, toDisplayString($props.title), 1)) : createCommentVNode("", true)
|
|
49
|
+
])
|
|
50
|
+
], 8, _hoisted_2$1))
|
|
51
|
+
], 16, _hoisted_1$1);
|
|
52
|
+
}
|
|
53
|
+
const Eye = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1]]);
|
|
54
|
+
const _sfc_main$1 = {
|
|
55
|
+
name: "EyeOffIcon",
|
|
56
|
+
emits: ["click"],
|
|
57
|
+
props: {
|
|
58
|
+
title: {
|
|
59
|
+
type: String
|
|
60
|
+
},
|
|
61
|
+
fillColor: {
|
|
62
|
+
type: String,
|
|
63
|
+
default: "currentColor"
|
|
64
|
+
},
|
|
65
|
+
size: {
|
|
66
|
+
type: Number,
|
|
67
|
+
default: 24
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const _hoisted_1 = ["aria-hidden", "aria-label"];
|
|
72
|
+
const _hoisted_2 = ["fill", "width", "height"];
|
|
73
|
+
const _hoisted_3 = { d: "M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z" };
|
|
74
|
+
const _hoisted_4 = { key: 0 };
|
|
75
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
76
|
+
return openBlock(), createElementBlock("span", mergeProps(_ctx.$attrs, {
|
|
77
|
+
"aria-hidden": $props.title ? null : "true",
|
|
78
|
+
"aria-label": $props.title,
|
|
79
|
+
class: "material-design-icon eye-off-icon",
|
|
80
|
+
role: "img",
|
|
81
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
|
|
82
|
+
}), [
|
|
83
|
+
(openBlock(), createElementBlock("svg", {
|
|
84
|
+
fill: $props.fillColor,
|
|
85
|
+
class: "material-design-icon__svg",
|
|
86
|
+
width: $props.size,
|
|
87
|
+
height: $props.size,
|
|
88
|
+
viewBox: "0 0 24 24"
|
|
89
|
+
}, [
|
|
90
|
+
createElementVNode("path", _hoisted_3, [
|
|
91
|
+
$props.title ? (openBlock(), createElementBlock("title", _hoisted_4, toDisplayString($props.title), 1)) : createCommentVNode("", true)
|
|
92
|
+
])
|
|
93
|
+
], 8, _hoisted_2))
|
|
94
|
+
], 16, _hoisted_1);
|
|
95
|
+
}
|
|
96
|
+
const EyeOff = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]);
|
|
97
|
+
register();
|
|
98
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
99
|
+
__name: "NcPasswordField",
|
|
100
|
+
props: /* @__PURE__ */ mergeModels({
|
|
101
|
+
class: {},
|
|
102
|
+
inputClass: { default: "" },
|
|
103
|
+
id: {},
|
|
104
|
+
label: {},
|
|
105
|
+
labelOutside: { type: Boolean },
|
|
106
|
+
placeholder: {},
|
|
107
|
+
showTrailingButton: { type: Boolean, default: true },
|
|
108
|
+
success: { type: Boolean },
|
|
109
|
+
error: { type: Boolean },
|
|
110
|
+
helperText: {},
|
|
111
|
+
disabled: { type: Boolean },
|
|
112
|
+
pill: { type: Boolean },
|
|
113
|
+
checkPasswordStrength: { type: Boolean },
|
|
114
|
+
minlength: { default: void 0 },
|
|
115
|
+
asText: { type: Boolean }
|
|
116
|
+
}, {
|
|
117
|
+
"modelValue": { default: "" },
|
|
118
|
+
"modelModifiers": {}
|
|
119
|
+
}),
|
|
120
|
+
emits: /* @__PURE__ */ mergeModels(["valid", "invalid"], ["update:modelValue"]),
|
|
121
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
122
|
+
const props = __props;
|
|
123
|
+
const modelValue = useModel(__props, "modelValue");
|
|
124
|
+
watch(modelValue, debounce(checkPassword, 500));
|
|
125
|
+
const emit = __emit;
|
|
126
|
+
__expose({
|
|
127
|
+
focus,
|
|
128
|
+
select
|
|
129
|
+
});
|
|
130
|
+
const { password_policy: passwordPolicy } = getCapabilities();
|
|
131
|
+
const inputField = useTemplateRef("inputField");
|
|
132
|
+
const isPasswordHidden = ref(true);
|
|
133
|
+
const internalHelpMessage = ref("");
|
|
134
|
+
const isValid = ref();
|
|
135
|
+
const propsToForward = computed(() => {
|
|
136
|
+
const all = { ...props };
|
|
137
|
+
delete all.checkPasswordStrength;
|
|
138
|
+
delete all.minlength;
|
|
139
|
+
delete all.asText;
|
|
140
|
+
delete all.error;
|
|
141
|
+
delete all.helperText;
|
|
142
|
+
delete all.inputClass;
|
|
143
|
+
delete all.success;
|
|
144
|
+
return all;
|
|
145
|
+
});
|
|
146
|
+
async function checkPassword() {
|
|
147
|
+
if (!props.checkPasswordStrength) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
try {
|
|
151
|
+
const { data } = await axios.post(generateOcsUrl("apps/password_policy/api/v1/validate"), { password: modelValue.value });
|
|
152
|
+
isValid.value = data.ocs.data.passed;
|
|
153
|
+
if (data.ocs.data.passed) {
|
|
154
|
+
internalHelpMessage.value = t("Password is secure");
|
|
155
|
+
emit("valid");
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
internalHelpMessage.value = data.ocs.data.reason;
|
|
159
|
+
emit("invalid");
|
|
160
|
+
} catch (error) {
|
|
161
|
+
logger.error("Password policy returned an error", { error });
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function focus(options) {
|
|
165
|
+
inputField.value.focus(options);
|
|
166
|
+
}
|
|
167
|
+
function select() {
|
|
168
|
+
inputField.value.select();
|
|
169
|
+
}
|
|
170
|
+
return (_ctx, _cache) => {
|
|
171
|
+
return openBlock(), createBlock(NcInputField, mergeProps(propsToForward.value, {
|
|
172
|
+
ref_key: "inputField",
|
|
173
|
+
ref: inputField,
|
|
174
|
+
modelValue: modelValue.value,
|
|
175
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
176
|
+
error: _ctx.error || isValid.value === false,
|
|
177
|
+
"helper-text": _ctx.helperText || internalHelpMessage.value,
|
|
178
|
+
"input-class": [_ctx.inputClass, { "password-field__input--secure-text": isPasswordHidden.value && _ctx.asText }],
|
|
179
|
+
minlength: _ctx.minlength ?? unref(passwordPolicy)?.minLength ?? 0,
|
|
180
|
+
success: _ctx.success || isValid.value === true,
|
|
181
|
+
"trailing-button-label": isPasswordHidden.value ? unref(t)("Show password") : unref(t)("Hide password"),
|
|
182
|
+
type: isPasswordHidden.value && !_ctx.asText ? "password" : "text",
|
|
183
|
+
onTrailingButtonClick: _cache[1] || (_cache[1] = ($event) => isPasswordHidden.value = !isPasswordHidden.value)
|
|
184
|
+
}), createSlots({
|
|
185
|
+
"trailing-button-icon": withCtx(() => [
|
|
186
|
+
isPasswordHidden.value ? (openBlock(), createBlock(Eye, {
|
|
187
|
+
key: 0,
|
|
188
|
+
size: 18
|
|
189
|
+
})) : (openBlock(), createBlock(EyeOff, {
|
|
190
|
+
key: 1,
|
|
191
|
+
size: 18
|
|
192
|
+
}))
|
|
193
|
+
]),
|
|
194
|
+
_: 2
|
|
195
|
+
}, [
|
|
196
|
+
!!_ctx.$slots.icon ? {
|
|
197
|
+
name: "icon",
|
|
198
|
+
fn: withCtx(() => [
|
|
199
|
+
renderSlot(_ctx.$slots, "icon", {}, void 0, true)
|
|
200
|
+
]),
|
|
201
|
+
key: "0"
|
|
202
|
+
} : void 0
|
|
203
|
+
]), 1040, ["modelValue", "error", "helper-text", "input-class", "minlength", "success", "trailing-button-label", "type"]);
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
const NcPasswordField = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-124ce5f5"]]);
|
|
208
|
+
export {
|
|
209
|
+
NcPasswordField as N
|
|
210
|
+
};
|
|
211
|
+
//# sourceMappingURL=NcPasswordField-DY-wDP9m.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NcPasswordField-DY-wDP9m.mjs","sources":["../../node_modules/vue-material-design-icons/Eye.vue","../../node_modules/vue-material-design-icons/EyeOff.vue","../../src/components/NcPasswordField/NcPasswordField.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon eye-off-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"EyeOffIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Description\nSee [NcInputField](#/Components/NcFields?id=ncinputfield) for a list of all available props.\n\nGeneral purpose password field component.\n\n```\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcPasswordField v-model=\"text1\"\n\t\t\tlabel=\"Old password\" />\n\t\t<div class=\"external-label\">\n\t\t\t<label for=\"textField\">New password</label>\n\t\t\t<NcPasswordField 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<Lock :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 Lock from 'vue-material-design-icons/Lock'\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\tLock,\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.wrapper {\n\tdisplay: flex;\n\tgap: 4px;\n\talign-items: flex-end;\n\tflex-wrap: wrap;\n}\n\n.external-label {\n\tdisplay: flex;\n\tgap: 14px;\n\twidth: 100%;\n\tmargin-top: 1rem;\n}\n\n.external-label label {\n\tpadding-top: 7px;\n\twhite-space: nowrap;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<NcInputField v-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': isPasswordHidden && asText }]\"\n\t\t:minlength=\"minlength ?? passwordPolicy?.minLength ?? 0\"\n\t\t:success=\"success || isValid === true\"\n\t\t:trailing-button-label=\"isPasswordHidden ? t('Show password') : t('Hide password')\"\n\t\t:type=\"isPasswordHidden && !asText ? 'password' : 'text'\"\n\t\t@trailing-button-click=\"isPasswordHidden = !isPasswordHidden\">\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<Eye v-if=\"isPasswordHidden\" :size=\"18\" />\n\t\t\t<EyeOff v-else :size=\"18\" />\n\t\t</template>\n\t</NcInputField>\n</template>\n\n<script setup lang=\"ts\">\nimport type { NcInputFieldProps } from '../NcInputField/NcInputField.vue'\nimport type { Writable } from '../../utils/VueTypes.ts'\n\nimport debounce from 'debounce'\nimport axios from '@nextcloud/axios'\nimport { getCapabilities } from '@nextcloud/capabilities'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport { computed, ref, useTemplateRef, watch } from 'vue'\nimport Eye from 'vue-material-design-icons/Eye.vue'\nimport EyeOff from 'vue-material-design-icons/EyeOff.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\nimport { t } from '../../l10n.js'\nimport logger from '../../utils/logger.ts'\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 modelValue = defineModel<string>('modelValue', { default: '' })\nwatch(modelValue, debounce(checkPassword, 500))\n\nconst emit = defineEmits<{\n\tvalid: []\n\tinvalid: []\n}>()\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 inputField = useTemplateRef('inputField')\n\nconst isPasswordHidden = ref(true)\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\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 * Focus the input element\n *\n * @param options - Focus options\n * @public\n */\nfunction focus(options?: FocusOptions) {\n\tinputField.value!.focus(options)\n}\n\n/**\n * Select all the text in the input\n *\n * @public\n */\nfunction select() {\n\tinputField.value!.select()\n}\n</script>\n\n<style lang=\"scss\" scoped>\n:deep(.password-field__input--secure-text) {\n\t// Emulate password field look\n\t// This is not a part of the standard but well supported\n\t-webkit-text-security: disc;\n}\n</style>\n"],"names":["_sfc_main","_hoisted_1","_hoisted_2","_hoisted_3","_createElementBlock","_mergeProps","_createElementVNode","_hoisted_4","_createCommentVNode","_useModel"],"mappings":";;;;;;;;;AAoBA,MAAKA,cAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA,IACP;AAAA,IACD,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA,IACV;AAAA,IACD,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACF;AACF;AApCA,MAAAC,eAAA,CAAA,eAAA,YAAA;AAAA,MAAAC,eAAA,CAAA,QAAA,SAAA,QAAA;AAYY,MAAAC,eAAA,EAAA,GAAE,oPAAmP;uBAZjQ,KAAA,EAAA;;sBACEC,mBAeO,QAfPC,WAAc,KAAM,QAAA;AAAA,IACb,eAAa,OAAK,QAAA,OAAA;AAAA,IAClB,cAAY,OAAK;AAAA,IAClB,OAAM;AAAA,IACN,MAAK;AAAA,IACJ,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,YAAE,KAAK,MAAA,SAAU,MAAM;AAAA;kBACjCD,mBAQM,OAAA;AAAA,MARA,MAAM,OAAS;AAAA,MAChB,OAAM;AAAA,MACL,OAAO,OAAI;AAAA,MACX,QAAQ,OAAI;AAAA,MACb,SAAQ;AAAA;MACXE,mBAEO,QAFPH,cAEO;AAAA,QADQ,OAAK,sBAAlBC,mBAAuC,SAb/CG,8BAa+B,OAAK,KAAA,GAAA,CAAA,KAbpCC,mBAAA,IAAA,IAAA;AAAA;IAAA,GAAA,GAAAN,YAAA;AAAA,EAAA,GAAA,IAAAD,YAAA;;;ACoBA,MAAKD,cAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,OAAO;AAAA,EAC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C,UAAM,UAAU,IAAa;AAEvB,UAAA,iBAAiB,SAAqC,MAAM;AAC3D,YAAA,MAAM,EAAE,GAAG,MAAM;AAEvB,aAAO,IAAI;AACX,aAAO,IAAI;AACX,aAAO,IAAI;AAEX,aAAO,IAAI;AACX,aAAO,IAAI;AACX,aAAO,IAAI;AACX,aAAO,IAAI;AAEJ,aAAA;AAAA,IAAA,CACP;AAMD,mBAAe,gBAAgB;AAC1B,UAAA,CAAC,MAAM,uBAAuB;AACjC;AAAA,MAAA;AAGG,UAAA;AACH,cAAM,EAAE,KAAA,IAAS,MAAM,MAAM,KAAK,eAAe,sCAAsC,GAAG,EAAE,UAAU,WAAW,OAAO;AAChH,gBAAA,QAAQ,KAAK,IAAI,KAAK;AAC1B,YAAA,KAAK,IAAI,KAAK,QAAQ;AACL,8BAAA,QAAQ,EAAE,oBAAoB;AAKlD,eAAK,OAAO;AACZ;AAAA,QAAA;AAGmB,4BAAA,QAAQ,KAAK,IAAI,KAAK;AAK1C,aAAK,SAAS;AAAA,eACN,OAAO;AACf,eAAO,MAAM,qCAAqC,EAAE,MAAA,CAAO;AAAA,MAAA;AAAA,IAC5D;AASD,aAAS,MAAM,SAAwB;AAC3B,iBAAA,MAAO,MAAM,OAAO;AAAA,IAAA;AAQhC,aAAS,SAAS;AACjB,iBAAW,MAAO,OAAO;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0,1]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '../assets/NcPopover-zFjgXDlM.css';
|
|
2
2
|
import { Dropdown } from "floating-vue";
|
|
3
3
|
import { createFocusTrap } from "focus-trap";
|
|
4
|
-
import { defineComponent, resolveComponent, createBlock, openBlock, withCtx, createVNode, renderSlot, normalizeProps, guardReactiveProps
|
|
4
|
+
import { defineComponent, warn, resolveComponent, createBlock, openBlock, withCtx, createVNode, renderSlot, normalizeProps, guardReactiveProps } from "vue";
|
|
5
5
|
import { g as getTrapStack } from "./focusTrap-DmkaYJTC.mjs";
|
|
6
6
|
import { i as isRtl } from "./rtl-v0UOPAM7.mjs";
|
|
7
7
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
@@ -335,7 +335,7 @@ const _sfc_main = {
|
|
|
335
335
|
this.addEscapeStopPropagation();
|
|
336
336
|
},
|
|
337
337
|
afterHide() {
|
|
338
|
-
this.getPopoverContentElement()
|
|
338
|
+
this.getPopoverContentElement()?.addEventListener("transitionend", () => {
|
|
339
339
|
this.$emit("afterHide");
|
|
340
340
|
}, { once: true, passive: true });
|
|
341
341
|
this.clearFocusTrap();
|
|
@@ -393,4 +393,4 @@ const NcPopover = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render
|
|
|
393
393
|
export {
|
|
394
394
|
NcPopover as N
|
|
395
395
|
};
|
|
396
|
-
//# sourceMappingURL=NcPopover-
|
|
396
|
+
//# sourceMappingURL=NcPopover-BUlWWIxc.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcPopover-MsWUAvsI.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\tshown: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\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 ref=\"popover\"\n\t\tv-model:shown=\"internalShown\"\n\t\t:arrow-padding=\"10\"\n\t\t:auto-hide=\"closeOnClickOutside\"\n\t\t:boundary=\"boundary || undefined\"\n\t\t:container\n\t\t:delay\n\t\t:distance=\"10\"\n\t\thandle-resize\n\t\t:no-auto-focus=\"true /* Handled by the focus trap */\"\n\t\t:placement=\"internalPlacement\"\n\t\t:popper-class=\"popoverBaseClass\"\n\t\t:popper-triggers\n\t\t:popper-hide-triggers\n\t\t:popper-show-triggers\n\t\t:triggers=\"internalTriggers\"\n\t\t:hide-triggers\n\t\t:show-triggers\n\t\t@update:shown=\"internalShown = $event\"\n\t\t@apply-show=\"afterShow\"\n\t\t@apply-hide=\"afterHide\">\n\t\t<NcPopoverTriggerProvider v-slot=\"slotProps\" :shown=\"internalShown\" :popup-role=\"popupRole\">\n\t\t\t<!-- This will be the popover target (for the events and position) -->\n\t\t\t<slot name=\"trigger\" v-bind=\"slotProps\" />\n\t\t</NcPopoverTriggerProvider>\n\n\t\t<!-- This will be the content of the popover -->\n\t\t<template #popper=\"slotProps\">\n\t\t\t<slot name=\"default\" v-bind=\"slotProps\" />\n\t\t</template>\n\t</Dropdown>\n</template>\n\n<script>\nimport { Dropdown } from 'floating-vue'\nimport { createFocusTrap } from 'focus-trap'\nimport { warn } from 'vue'\nimport { getTrapStack } from '../../utils/focusTrap.ts'\nimport { isRtl } from '../../utils/rtl.ts'\nimport NcPopoverTriggerProvider from './NcPopoverTriggerProvider.vue'\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\tcloseOnClickOutside: {\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: [String, Boolean],\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\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 * @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: [HTMLElement, SVGElement, String, Boolean, 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\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\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\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\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\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 * @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 (err) {\n\t\t\t\tconsole.warn(err)\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\t\tafterHide() {\n\t\t\tthis.getPopoverContentElement().addEventListener('transitionend', () => {\n\t\t\t\t/**\n\t\t\t\t * Triggered after the tooltip was visually hidden.\n\t\t\t\t *\n\t\t\t\t * This is different from the 'hide' and 'apply-hide' which\n\t\t\t\t * run earlier than this where there is no guarantee that the\n\t\t\t\t * tooltip is already visible and in the DOM.\n\t\t\t\t */\n\t\t\t\tthis.$emit('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\">\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// Size class comes from the floating-vue library we use\n.resize-observer {\n\tposition: absolute;\n\ttop: 0;\n\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\tleft: 0;\n\tz-index: -1;\n\twidth: 100%;\n\theight: 100%;\n\tborder: none;\n\tbackground-color: transparent;\n\tpointer-events: none;\n\tdisplay: block;\n\toverflow: hidden;\n\topacity: 0;\n\n\tobject {\n\t\tdisplay: block;\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\theight: 100%;\n\t\twidth: 100%;\n\t\toverflow: hidden;\n\t\tpointer-events: none;\n\t\tz-index: -1;\n\t}\n}\n\n.v-popper--theme-dropdown {\n\t&,\n\t& * {\n\t\tbox-sizing: border-box;\n\t}\n\n\t&.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.v-popper__wrapper {\n\t\t\t/*\n\t\t\t * In theory, \"filter: drop-shadow\" would look better here with arrow shadow.\n\t\t\t * In fact, in results in a blurry popover in Chromium on scaling.\n\t\t\t * The hypothesis is that \"filter\" creates a new composition layer,\n\t\t\t * and with GPU acceleration requires the previous layers content to be rasterized.\n\t\t\t * In combination with translate3d from floating-vue, it makes Chromium to first render and rasterize the popover\n\t\t\t * and then apply scaling, which results in a blurry popover.\n\t\t\t */\n\t\t\tbox-shadow: 0 1px 10px var(--color-box-shadow);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t}\n\n\t\t.v-popper__inner {\n\t\t\tpadding: 0;\n\t\t\tcolor: var(--color-main-text);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t\toverflow: hidden;\n\t\t\tbackground: var(--color-main-background);\n\t\t}\n\n\t\t.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'] .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'] .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'] .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'] .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","_createBlock","_withCtx","_ren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,SAAa;AAAA,IACb,iBAAA,SAAa;AAAA,IAEb,aAAY,SAAS;AAAA,IACrB,aAAY,SAAS;AAAA;IAOX,QAAMC,QAChB,CADkB,cAAS;AAAA,MAC3BC,WAA0C,KAAA,QAAA,WA7M7CC,eAAAC,mBA6MgC,SAAS,CAAA,CAAA;AAAA;IA7MzC,SAAAH,QAsME,MAG2B;AAAA,MAH3BI,YAG2B,qCAAA;AAAA,QAHmB,OAAO,MAAa;AAAA,QAAG,cAAY,OAAS;AAAA;QAtM5F,SAwMGJ,QAAA,CAA0C,cAFA;AAAA,UAE1CC,WAA0C,KAAA,QAAA,WAxM7CC,eAAAC,mBAwMgC,SAAS,CAAA,CAAA;AAAA;QAxMzC,GAAA;AAAA;;IAAA,GAAA;AAAA;;;"}
|
|
1
|
+
{"version":3,"file":"NcPopover-BUlWWIxc.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\tshown: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\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 ref=\"popover\"\n\t\tv-model:shown=\"internalShown\"\n\t\t:arrow-padding=\"10\"\n\t\t:auto-hide=\"closeOnClickOutside\"\n\t\t:boundary=\"boundary || undefined\"\n\t\t:container\n\t\t:delay\n\t\t:distance=\"10\"\n\t\thandle-resize\n\t\t:no-auto-focus=\"true /* Handled by the focus trap */\"\n\t\t:placement=\"internalPlacement\"\n\t\t:popper-class=\"popoverBaseClass\"\n\t\t:popper-triggers\n\t\t:popper-hide-triggers\n\t\t:popper-show-triggers\n\t\t:triggers=\"internalTriggers\"\n\t\t:hide-triggers\n\t\t:show-triggers\n\t\t@update:shown=\"internalShown = $event\"\n\t\t@apply-show=\"afterShow\"\n\t\t@apply-hide=\"afterHide\">\n\t\t<NcPopoverTriggerProvider v-slot=\"slotProps\" :shown=\"internalShown\" :popup-role=\"popupRole\">\n\t\t\t<!-- This will be the popover target (for the events and position) -->\n\t\t\t<slot name=\"trigger\" v-bind=\"slotProps\" />\n\t\t</NcPopoverTriggerProvider>\n\n\t\t<!-- This will be the content of the popover -->\n\t\t<template #popper=\"slotProps\">\n\t\t\t<slot name=\"default\" v-bind=\"slotProps\" />\n\t\t</template>\n\t</Dropdown>\n</template>\n\n<script>\nimport { Dropdown } from 'floating-vue'\nimport { createFocusTrap } from 'focus-trap'\nimport { warn } from 'vue'\nimport { getTrapStack } from '../../utils/focusTrap.ts'\nimport { isRtl } from '../../utils/rtl.ts'\nimport NcPopoverTriggerProvider from './NcPopoverTriggerProvider.vue'\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\tcloseOnClickOutside: {\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: [String, Boolean],\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\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 * @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: [HTMLElement, SVGElement, String, Boolean, 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\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\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\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\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\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 * @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 (err) {\n\t\t\t\tconsole.warn(err)\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\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\">\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// Size class comes from the floating-vue library we use\n.resize-observer {\n\tposition: absolute;\n\ttop: 0;\n\t/* stylelint-disable-next-line csstools/use-logical */ /* upstream logic */\n\tleft: 0;\n\tz-index: -1;\n\twidth: 100%;\n\theight: 100%;\n\tborder: none;\n\tbackground-color: transparent;\n\tpointer-events: none;\n\tdisplay: block;\n\toverflow: hidden;\n\topacity: 0;\n\n\tobject {\n\t\tdisplay: block;\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\theight: 100%;\n\t\twidth: 100%;\n\t\toverflow: hidden;\n\t\tpointer-events: none;\n\t\tz-index: -1;\n\t}\n}\n\n.v-popper--theme-dropdown {\n\t&,\n\t& * {\n\t\tbox-sizing: border-box;\n\t}\n\n\t&.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.v-popper__wrapper {\n\t\t\t/*\n\t\t\t * In theory, \"filter: drop-shadow\" would look better here with arrow shadow.\n\t\t\t * In fact, in results in a blurry popover in Chromium on scaling.\n\t\t\t * The hypothesis is that \"filter\" creates a new composition layer,\n\t\t\t * and with GPU acceleration requires the previous layers content to be rasterized.\n\t\t\t * In combination with translate3d from floating-vue, it makes Chromium to first render and rasterize the popover\n\t\t\t * and then apply scaling, which results in a blurry popover.\n\t\t\t */\n\t\t\tbox-shadow: 0 1px 10px var(--color-box-shadow);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t}\n\n\t\t.v-popper__inner {\n\t\t\tpadding: 0;\n\t\t\tcolor: var(--color-main-text);\n\t\t\tborder-radius: var(--border-radius-large);\n\t\t\toverflow: hidden;\n\t\t\tbackground: var(--color-main-background);\n\t\t}\n\n\t\t.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'] .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'] .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'] .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'] .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","_createBlock","_withCtx","_renderSlot","_normalizeProps","_guardReactiveProps","_createVNode"],"mappings":";;;;;;AAQA,MAAKA,cAAa,gBAAa;AAAA,EAC9B,MAAM;AAAA,EAEN,UAAU;AACT,WAAO;AAAA,MACN,2BAA2B,MAAM,KAAK;AAAA,MACtC,2BAA2B,MAAM,KAAK;AAAA,IACvC;AAAA,EACA;AAAA,EAED,OAAO;AAAA,IACN,OAAO;AAAA,MACN,MAAM;AAAA,MACN,UAAU;AAAA,IACV;AAAA,IACD,WAAW;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA,EACD;AAAA,EAED,UAAU;AAAA,IACT,eAAe;AACd,aAAO;AAAA,QACN,iBAAiB,KAAK;AAAA,QACtB,iBAAiB,KAAK,MAAM,SAAU;AAAA,MACvC;AAAA,IACA;AAAA,EACD;AAAA,EAED,SAAS;AACR,WAAO,KAAK,OAAO,UAAU;AAAA,MAC5B,OAAO,KAAK;AAAA,IACZ,CAAA;AAAA,EACD;AACF,CAAC;ACmLD,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EAEN,YAAY;AAAA,IACX;AAAA,8BACAC;AAAAA,EACA;AAAA,EAED,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,IAKN,UAAU;AAAA,MACT,MAAM,CAAC,QAAQ,MAAM;AAAA,MACrB,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA,IAKD,qBAAqB;AAAA,MACpB,MAAM;AAAA,MACN,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA;AAAA,IAMD,WAAW;AAAA,MACV,MAAM,CAAC,QAAQ,OAAO;AAAA,MACtB,SAAS;AAAA,IACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOD,OAAO;AAAA,MACN,MAAM,CAAC,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,IAC5B,gBAAc,OAAgB;AAAA,IAC9B,mBAAA,SAAe;AAAA,IACf,wBAAA,SAAoB;AAAA,IACpB,wBAAA,SAAoB;AAAA,IACpB,UAAU,SAAgB;AAAA,IAC1B,iBAAA,SAAa;AAAA,IACb,iBAAA,SAAa;AAAA,IAEb,aAAY,SAAS;AAAA,IACrB,aAAY,SAAS;AAAA;IAOX,QAAMC,QAChB,CADkB,cAAS;AAAA,MAC3BC,WAA0C,KAAA,QAAA,WA7M7CC,eAAAC,mBA6MgC,SAAS,CAAA,CAAA;AAAA;IA7MzC,SAAAH,QAsME,MAG2B;AAAA,MAH3BI,YAG2B,qCAAA;AAAA,QAHmB,OAAO,MAAa;AAAA,QAAG,cAAY,OAAS;AAAA;QAtM5F,SAwMGJ,QAAA,CAA0C,cAFA;AAAA,UAE1CC,WAA0C,KAAA,QAAA,WAxM7CC,eAAAC,mBAwMgC,SAAS,CAAA,CAAA;AAAA;QAxMzC,GAAA;AAAA;;IAAA,GAAA;AAAA;;;"}
|
package/dist/chunks/{NcRelatedResourcesPanel-CShyi9lg.mjs → NcRelatedResourcesPanel-BUasditW.mjs}
RENAMED
|
@@ -6,9 +6,9 @@ import { createElementBlock, openBlock, mergeProps, createElementVNode, createCo
|
|
|
6
6
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
7
7
|
import { C as ChevronDown } from "./ChevronDown-FiGpp0KT.mjs";
|
|
8
8
|
import { C as ChevronUp } from "./ChevronUp-DPXFp1ss.mjs";
|
|
9
|
-
import { N as NcButton } from "./NcButton-
|
|
9
|
+
import { N as NcButton } from "./NcButton-yN4vYgXb.mjs";
|
|
10
10
|
import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-BOiCKv0b.mjs";
|
|
11
|
-
import { r as register,
|
|
11
|
+
import { r as register, D as t39, a as t, E as t36, F as t8 } from "./_l10n-B4AgnzNC.mjs";
|
|
12
12
|
import { g as getRoute } from "./autolink-CKPk5rzg.mjs";
|
|
13
13
|
const _sfc_main$4 = {
|
|
14
14
|
name: "AccountGroupIcon",
|
|
@@ -96,7 +96,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
96
96
|
], 16, _hoisted_1$3);
|
|
97
97
|
}
|
|
98
98
|
const OpenInNew = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3]]);
|
|
99
|
-
register(
|
|
99
|
+
register(t39);
|
|
100
100
|
const teamResourceProviders = getCapabilities()?.circles?.teamResourceProviders ?? [];
|
|
101
101
|
const _sfc_main$2 = {
|
|
102
102
|
name: "NcTeamResources",
|
|
@@ -549,4 +549,4 @@ const NcRelatedResourcesPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render
|
|
|
549
549
|
export {
|
|
550
550
|
NcRelatedResourcesPanel as N
|
|
551
551
|
};
|
|
552
|
-
//# sourceMappingURL=NcRelatedResourcesPanel-
|
|
552
|
+
//# sourceMappingURL=NcRelatedResourcesPanel-BUasditW.mjs.map
|