@nextcloud/vue 9.2.0 → 9.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -1
- package/dist/assets/{NcActions-DXLRy-4d.css → NcActions-DneK-9R2.css} +11 -11
- package/dist/assets/{NcAppContent-r_MkL84m.css → NcAppContent-HF21N7dO.css} +19 -19
- package/dist/assets/{NcAppNavigation-Br6xragy.css → NcAppNavigation-f2zUqaiQ.css} +12 -12
- package/dist/assets/{NcAppNavigationItem-6ZUh2hMu.css → NcAppNavigationItem-D97Onpd9.css} +36 -36
- package/dist/assets/{NcAppNavigationSearch-CUSlFbdJ.css → NcAppNavigationSearch-BH8hBjGe.css} +5 -5
- package/dist/assets/{NcAppSettingsDialog-B51_ysuI.css → NcAppSettingsDialog-Dz8uBPgu.css} +36 -10
- package/dist/assets/{NcAppSidebar-aGrIJ9f6.css → NcAppSidebar-krHtMwId.css} +44 -44
- package/dist/assets/{NcAvatar-BvgSFJqT.css → NcAvatar-f8SJKMDw.css} +24 -24
- package/dist/assets/{NcButton-BjcEkfk2.css → NcButton-DtYLJgG8.css} +48 -48
- package/dist/assets/{NcChip-T6s7HqeL.css → NcChip-DZ8dUSFy.css} +12 -12
- package/dist/assets/{NcDashboardWidget-DD06i7ws.css → NcDashboardWidget-DFY9GRrd.css} +12 -12
- package/dist/assets/{NcFormBoxItem-j2nGdOvd.css → NcFormBoxItem-BfXKp9xJ.css} +14 -14
- package/dist/assets/{NcIconSvgWrapper-D6qXQDNo.css → NcIconSvgWrapper-N3OwSN9O.css} +10 -10
- package/dist/assets/{NcInputField-D5SEE7D0.css → NcInputField-DCpslX7k.css} +40 -40
- package/dist/assets/{NcListItem-D9Lk0t6j.css → NcListItem-CZnKmy9X.css} +41 -41
- package/dist/assets/{NcListItemIcon-OOjV0jWx.css → NcListItemIcon-aquns6B7.css} +13 -13
- package/dist/assets/{NcNoteCard-l5nIN9Hg.css → NcNoteCard-DZSuYX4-.css} +10 -10
- package/dist/assets/{NcPasswordField-CMuvrdVC.css → NcPasswordField-BCJ0LHSS.css} +2 -2
- package/dist/assets/{NcRelatedResourcesPanel-CZDNe7DZ.css → NcRelatedResourcesPanel-Bun35PUF.css} +7 -7
- package/dist/assets/{NcRichText-QPnpxaeG.css → NcRichText-BwHm-gXR.css} +106 -89
- package/dist/assets/{NcTextArea-7C2JBozT.css → NcTextArea-BKVszZmQ.css} +25 -25
- package/dist/chunks/{NcActionButton-2Rxa55KE.mjs → NcActionButton-DCWUru2b.mjs} +3 -3
- package/dist/chunks/{NcActionButton-2Rxa55KE.mjs.map → NcActionButton-DCWUru2b.mjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-DouiEx4u.mjs → NcActionButtonGroup-QgGuZcPA.mjs} +2 -2
- package/dist/chunks/{NcActionButtonGroup-DouiEx4u.mjs.map → NcActionButtonGroup-QgGuZcPA.mjs.map} +1 -1
- package/dist/chunks/{NcActionInput-BUey_7p4.mjs → NcActionInput-Bw4UxfFB.mjs} +5 -5
- package/dist/chunks/{NcActionInput-BUey_7p4.mjs.map → NcActionInput-Bw4UxfFB.mjs.map} +1 -1
- package/dist/chunks/{NcActionTextEditable-CXH_CFjU.mjs → NcActionTextEditable-BQXCci7D.mjs} +3 -3
- package/dist/chunks/{NcActionTextEditable-CXH_CFjU.mjs.map → NcActionTextEditable-BQXCci7D.mjs.map} +1 -1
- package/dist/chunks/{NcActions-QtUC1sD3.mjs → NcActions-B0kM6AYb.mjs} +20 -50
- package/dist/chunks/NcActions-B0kM6AYb.mjs.map +1 -0
- package/dist/chunks/{NcAppContent-DW_SpXeR.mjs → NcAppContent-BbtKZp6w.mjs} +9 -18
- package/dist/chunks/NcAppContent-BbtKZp6w.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-DrlEs9WS.mjs → NcAppNavigation-CROkGlDE.mjs} +7 -7
- package/dist/chunks/NcAppNavigation-CROkGlDE.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationCaption-CW__bXHt.mjs → NcAppNavigationCaption-CuGe5Mev.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationCaption-CW__bXHt.mjs.map → NcAppNavigationCaption-CuGe5Mev.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-DH7wxFRY.mjs → NcAppNavigationItem-DU-pLjwa.mjs} +8 -8
- package/dist/chunks/NcAppNavigationItem-DU-pLjwa.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationNew-Y50s6jTC.mjs → NcAppNavigationNew-DJbq5wr_.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNew-Y50s6jTC.mjs.map → NcAppNavigationNew-DJbq5wr_.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-DehA23th.mjs → NcAppNavigationNewItem-CoRu6Q9O.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNewItem-DehA23th.mjs.map → NcAppNavigationNewItem-CoRu6Q9O.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-BWx-LXJj.mjs → NcAppNavigationSearch-DaIFceYy.mjs} +5 -5
- package/dist/chunks/NcAppNavigationSearch-DaIFceYy.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigationSettings-77CxwYOD.mjs → NcAppNavigationSettings-45tEbBBm.mjs} +5 -5
- package/dist/chunks/{NcAppNavigationSettings-77CxwYOD.mjs.map → NcAppNavigationSettings-45tEbBBm.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-B7AG3mEJ.mjs → NcAppSettingsDialog-lTULgn3p.mjs} +38 -12
- package/dist/chunks/NcAppSettingsDialog-lTULgn3p.mjs.map +1 -0
- package/dist/chunks/{NcAppSettingsShortcutsSection-o6KPisIT.mjs → NcAppSettingsShortcutsSection-DIIuKYzs.mjs} +2 -2
- package/dist/chunks/{NcAppSettingsShortcutsSection-o6KPisIT.mjs.map → NcAppSettingsShortcutsSection-DIIuKYzs.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-BZh0lWlQ.mjs → NcAppSidebar-X9ktYY0p.mjs} +6 -6
- package/dist/chunks/NcAppSidebar-X9ktYY0p.mjs.map +1 -0
- package/dist/chunks/{NcAssistantButton-D3v1Xk22.mjs → NcAssistantButton-BID8rRE5.mjs} +5 -5
- package/dist/chunks/{NcAssistantButton-D3v1Xk22.mjs.map → NcAssistantButton-BID8rRE5.mjs.map} +1 -1
- package/dist/chunks/{NcAssistantIcon-CCdgVDM4.mjs → NcAssistantIcon-BUvb4WNg.mjs} +2 -2
- package/dist/chunks/{NcAssistantIcon-CCdgVDM4.mjs.map → NcAssistantIcon-BUvb4WNg.mjs.map} +1 -1
- package/dist/chunks/{NcAvatar-uKR5Re43.mjs → NcAvatar-Dxm05R6e.mjs} +27 -23
- package/dist/chunks/NcAvatar-Dxm05R6e.mjs.map +1 -0
- package/dist/chunks/{NcBreadcrumb-BffVglho.mjs → NcBreadcrumb-CiM9xAAS.mjs} +3 -3
- package/dist/chunks/{NcBreadcrumb-BffVglho.mjs.map → NcBreadcrumb-CiM9xAAS.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-DCzvS4nv.mjs → NcBreadcrumbs-geMiBPkk.mjs} +4 -4
- package/dist/chunks/{NcBreadcrumbs-DCzvS4nv.mjs.map → NcBreadcrumbs-geMiBPkk.mjs.map} +1 -1
- package/dist/chunks/{NcButton-DkC5k3Lb.mjs → NcButton-ZNHdqKQl.mjs} +3 -3
- package/dist/chunks/NcButton-ZNHdqKQl.mjs.map +1 -0
- package/dist/chunks/{NcCheckboxRadioSwitch-CAxvqRrM.mjs → NcCheckboxRadioSwitch-6ty3DxEG.mjs} +2 -2
- package/dist/chunks/{NcCheckboxRadioSwitch-CAxvqRrM.mjs.map → NcCheckboxRadioSwitch-6ty3DxEG.mjs.map} +1 -1
- package/dist/chunks/{NcChip-DH4rTzjt.mjs → NcChip-CFf0KxGk.mjs} +8 -8
- package/dist/chunks/NcChip-CFf0KxGk.mjs.map +1 -0
- package/dist/chunks/{NcCollectionList-BsgtKu_8.mjs → NcCollectionList-Ds-tmckn.mjs} +6 -6
- package/dist/chunks/{NcCollectionList-BsgtKu_8.mjs.map → NcCollectionList-Ds-tmckn.mjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-rGVCe-44.mjs → NcColorPicker-BFcR9_1o.mjs} +6 -6
- package/dist/chunks/{NcColorPicker-rGVCe-44.mjs.map → NcColorPicker-BFcR9_1o.mjs.map} +1 -1
- package/dist/chunks/{NcContent-DeXRbVuo.mjs → NcContent-BKKnoxxu.mjs} +4 -4
- package/dist/chunks/{NcContent-DeXRbVuo.mjs.map → NcContent-BKKnoxxu.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-BxIt1qRx.mjs → NcDashboardWidget-cclUqUde.mjs} +6 -6
- package/dist/chunks/NcDashboardWidget-cclUqUde.mjs.map +1 -0
- package/dist/chunks/{NcDashboardWidgetItem-Dg8AbqGD.mjs → NcDashboardWidgetItem-DM96gJkD.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-Dg8AbqGD.mjs.map → NcDashboardWidgetItem-DM96gJkD.mjs.map} +1 -1
- package/dist/chunks/{NcDateTimePicker-B6ni6QAB.mjs → NcDateTimePicker-CYRbEpfY.mjs} +6 -6
- package/dist/chunks/{NcDateTimePicker-B6ni6QAB.mjs.map → NcDateTimePicker-CYRbEpfY.mjs.map} +1 -1
- package/dist/chunks/{NcDateTimePickerNative-BaauiB0I.mjs → NcDateTimePickerNative-CR1Yx5Qp.mjs} +2 -2
- package/dist/chunks/{NcDateTimePickerNative-BaauiB0I.mjs.map → NcDateTimePickerNative-CR1Yx5Qp.mjs.map} +1 -1
- package/dist/chunks/{NcDialog-BC0--SOc.mjs → NcDialog-BY-1v8yi.mjs} +3 -3
- package/dist/chunks/{NcDialog-BC0--SOc.mjs.map → NcDialog-BY-1v8yi.mjs.map} +1 -1
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-CYQZ84A2.mjs → NcDialogButton.vue_vue_type_script_setup_true_lang-CF6LnBe7.mjs} +4 -4
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-CYQZ84A2.mjs.map → NcDialogButton.vue_vue_type_script_setup_true_lang-CF6LnBe7.mjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-CKp3IB6N.mjs → NcEmojiPicker-DMiiRPm1.mjs} +6 -6
- package/dist/chunks/{NcEmojiPicker-CKp3IB6N.mjs.map → NcEmojiPicker-DMiiRPm1.mjs.map} +1 -1
- package/dist/chunks/{NcFormBoxButton-CCs-0mb3.mjs → NcFormBoxButton-4XaQUTOS.mjs} +4 -4
- package/dist/chunks/{NcFormBoxButton-CCs-0mb3.mjs.map → NcFormBoxButton-4XaQUTOS.mjs.map} +1 -1
- package/dist/chunks/{NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DfPML_k7.mjs → NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DTWd7b52.mjs} +8 -38
- package/dist/chunks/NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DTWd7b52.mjs.map +1 -0
- package/dist/chunks/{NcFormBoxItem-C3We3v_4.mjs → NcFormBoxItem-BBP76Mkf.mjs} +10 -10
- package/dist/chunks/{NcFormBoxItem-C3We3v_4.mjs.map → NcFormBoxItem-BBP76Mkf.mjs.map} +1 -1
- package/dist/chunks/{NcFormBoxSwitch-gHZMcoCQ.mjs → NcFormBoxSwitch-E6Ei7MFo.mjs} +4 -4
- package/dist/chunks/{NcFormBoxSwitch-gHZMcoCQ.mjs.map → NcFormBoxSwitch-E6Ei7MFo.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderButton-DafXYbXB.mjs → NcHeaderButton-tLfDELGu.mjs} +2 -2
- package/dist/chunks/{NcHeaderButton-DafXYbXB.mjs.map → NcHeaderButton-tLfDELGu.mjs.map} +1 -1
- package/dist/chunks/{NcHeaderMenu-DfO7ghiM.mjs → NcHeaderMenu-ClRw0Xc5.mjs} +2 -2
- package/dist/chunks/{NcHeaderMenu-DfO7ghiM.mjs.map → NcHeaderMenu-ClRw0Xc5.mjs.map} +1 -1
- package/dist/chunks/{NcHotkey-CmqTn7WR.mjs → NcHotkey-Cya0WRKL.mjs} +2 -2
- package/dist/chunks/{NcHotkey-CmqTn7WR.mjs.map → NcHotkey-Cya0WRKL.mjs.map} +1 -1
- package/dist/chunks/{NcHotkeyList-CuENLgpa.mjs → NcHotkeyList-B9C--U6a.mjs} +2 -2
- package/dist/chunks/{NcHotkeyList-CuENLgpa.mjs.map → NcHotkeyList-B9C--U6a.mjs.map} +1 -1
- package/dist/chunks/{NcIconSvgWrapper-5AA93z-F.mjs → NcIconSvgWrapper-BvLanNaW.mjs} +4 -4
- package/dist/chunks/NcIconSvgWrapper-BvLanNaW.mjs.map +1 -0
- package/dist/chunks/{NcInputConfirmCancel-BWJotcI2.mjs → NcInputConfirmCancel-Brw2dsPI.mjs} +3 -3
- package/dist/chunks/{NcInputConfirmCancel-BWJotcI2.mjs.map → NcInputConfirmCancel-Brw2dsPI.mjs.map} +1 -1
- package/dist/chunks/{NcInputField-DwkKsbxv.mjs → NcInputField-z8wpYKt2.mjs} +11 -9
- package/dist/chunks/NcInputField-z8wpYKt2.mjs.map +1 -0
- package/dist/chunks/{NcKbd-B87GdbDW.mjs → NcKbd-D6pM7aJM.mjs} +2 -2
- package/dist/chunks/{NcKbd-B87GdbDW.mjs.map → NcKbd-D6pM7aJM.mjs.map} +1 -1
- package/dist/chunks/{NcListItem-BLSWE2Hb.mjs → NcListItem-D5AkAxDh.mjs} +4 -4
- package/dist/chunks/NcListItem-D5AkAxDh.mjs.map +1 -0
- package/dist/chunks/{NcListItemIcon-BXVk-irh.mjs → NcListItemIcon-D_ReDycv.mjs} +5 -5
- package/dist/chunks/NcListItemIcon-D_ReDycv.mjs.map +1 -0
- package/dist/chunks/{NcModal-BIG1WrLo.mjs → NcModal-DZtBQM1y.mjs} +6 -6
- package/dist/chunks/{NcModal-BIG1WrLo.mjs.map → NcModal-DZtBQM1y.mjs.map} +1 -1
- package/dist/chunks/{NcNoteCard-Dw222p4P.mjs → NcNoteCard-C6JdnZUp.mjs} +5 -5
- package/dist/chunks/NcNoteCard-C6JdnZUp.mjs.map +1 -0
- package/dist/chunks/{NcPasswordField-BkVdu9LI.mjs → NcPasswordField-BquWP0Di.mjs} +11 -8
- package/dist/chunks/NcPasswordField-BquWP0Di.mjs.map +1 -0
- package/dist/chunks/{NcRelatedResourcesPanel-DP7W80M0.mjs → NcRelatedResourcesPanel-DPwZ4SSu.mjs} +6 -6
- package/dist/chunks/NcRelatedResourcesPanel-DPwZ4SSu.mjs.map +1 -0
- package/dist/chunks/{NcRichContenteditable-A0F0waG9.mjs → NcRichContenteditable-ClUiBH9B.mjs} +12 -12
- package/dist/chunks/{NcRichContenteditable-A0F0waG9.mjs.map → NcRichContenteditable-ClUiBH9B.mjs.map} +1 -1
- package/dist/chunks/{NcRichText-PvndLTtG.mjs → NcRichText-DamxfqDV.mjs} +44 -8
- package/dist/chunks/NcRichText-DamxfqDV.mjs.map +1 -0
- package/dist/chunks/{NcSelect-DekSQwK1.mjs → NcSelect-Ba00b95n.mjs} +2 -2
- package/dist/chunks/{NcSelect-DekSQwK1.mjs.map → NcSelect-Ba00b95n.mjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-wqBc8W15.mjs → NcSelectTags-DAxQe-10.mjs} +3 -3
- package/dist/chunks/{NcSelectTags-wqBc8W15.mjs.map → NcSelectTags-DAxQe-10.mjs.map} +1 -1
- package/dist/chunks/{NcSelectUsers-DGY_Fvw7.mjs → NcSelectUsers-DlE8EHdq.mjs} +3 -3
- package/dist/chunks/{NcSelectUsers-DGY_Fvw7.mjs.map → NcSelectUsers-DlE8EHdq.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-DDccDeTg.mjs → NcSettingsSection-BfK7eHNT.mjs} +2 -2
- package/dist/chunks/{NcSettingsSection-DDccDeTg.mjs.map → NcSettingsSection-BfK7eHNT.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-Bpm9HZXh.mjs → NcSettingsSelectGroup-CO8dnQ6q.mjs} +3 -3
- package/dist/chunks/{NcSettingsSelectGroup-Bpm9HZXh.mjs.map → NcSettingsSelectGroup-CO8dnQ6q.mjs.map} +1 -1
- package/dist/chunks/{NcTextArea-CBx0eeEG.mjs → NcTextArea-Cr27-KiU.mjs} +9 -7
- package/dist/chunks/NcTextArea-Cr27-KiU.mjs.map +1 -0
- package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-cbNqV44E.mjs → NcTextField.vue_vue_type_script_setup_true_lang-BNSMSqMx.mjs} +5 -5
- package/dist/chunks/NcTextField.vue_vue_type_script_setup_true_lang-BNSMSqMx.mjs.map +1 -0
- package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-Dr3oElNm.mjs → NcTimezonePicker.vue_vue_type_script_setup_true_lang-CVehmrmz.mjs} +3 -3
- package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-Dr3oElNm.mjs.map → NcTimezonePicker.vue_vue_type_script_setup_true_lang-CVehmrmz.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-2CLRpxdk.mjs → NcUserBubble-DEW575GR.mjs} +2 -2
- package/dist/chunks/{NcUserBubble-2CLRpxdk.mjs.map → NcUserBubble-DEW575GR.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-D6fygDFl.mjs → NcUserStatusIcon-DHHqIgRK.mjs} +2 -2
- package/dist/chunks/{NcUserStatusIcon-D6fygDFl.mjs.map → NcUserStatusIcon-DHHqIgRK.mjs.map} +1 -1
- package/dist/chunks/{_l10n--WxGDYem.mjs → _l10n-CWKr1fUH.mjs} +35 -33
- package/dist/chunks/_l10n-CWKr1fUH.mjs.map +1 -0
- package/dist/chunks/appName-DtnLUijR.mjs +41 -0
- package/dist/chunks/appName-DtnLUijR.mjs.map +1 -0
- package/dist/chunks/{colors-BhsvsNTT.mjs → colors-BM9KkzNS.mjs} +2 -2
- package/dist/chunks/{colors-BhsvsNTT.mjs.map → colors-BM9KkzNS.mjs.map} +1 -1
- package/dist/chunks/{mdi-8kZvl9vo.mjs → mdi-HQ-WBPmL.mjs} +10 -10
- package/dist/chunks/{mdi-8kZvl9vo.mjs.map → mdi-HQ-WBPmL.mjs.map} +1 -1
- package/dist/chunks/{referencePickerModal-el0J7aNd.mjs → referencePickerModal-f8STnNvS.mjs} +7 -7
- package/dist/chunks/{referencePickerModal-el0J7aNd.mjs.map → referencePickerModal-f8STnNvS.mjs.map} +1 -1
- package/dist/chunks/useCopy-pTWmSjcP.mjs +39 -0
- package/dist/chunks/useCopy-pTWmSjcP.mjs.map +1 -0
- package/dist/components/NcActionButton/index.mjs +1 -1
- package/dist/components/NcActionButtonGroup/index.mjs +1 -1
- package/dist/components/NcActionInput/index.mjs +1 -1
- package/dist/components/NcActionTextEditable/index.mjs +1 -1
- package/dist/components/NcActions/NcActions.vue.d.ts +21 -7
- package/dist/components/NcActions/index.mjs +1 -1
- package/dist/components/NcAppContent/index.mjs +1 -1
- package/dist/components/NcAppNavigation/index.mjs +1 -1
- package/dist/components/NcAppNavigationCaption/NcAppNavigationCaption.vue.d.ts +11 -2
- package/dist/components/NcAppNavigationCaption/index.mjs +1 -1
- package/dist/components/NcAppNavigationItem/NcAppNavigationItem.vue.d.ts +11 -2
- 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/index.mjs +1 -1
- package/dist/components/NcAppNavigationSettings/index.mjs +1 -1
- package/dist/components/NcAppSettingsDialog/NcAppSettingsDialog.vue.d.ts +5 -0
- package/dist/components/NcAppSettingsDialog/NcAppSettingsDialogVersion.vue.d.ts +2 -0
- package/dist/components/NcAppSettingsDialog/index.mjs +1 -1
- package/dist/components/NcAppSettingsSectionShortcuts/index.mjs +1 -1
- package/dist/components/NcAppSettingsShortcutsSection/index.mjs +1 -1
- package/dist/components/NcAppSidebar/NcAppSidebar.vue.d.ts +11 -2
- package/dist/components/NcAppSidebar/index.mjs +1 -1
- package/dist/components/NcAssistantButton/index.mjs +1 -1
- package/dist/components/NcAssistantIcon/index.mjs +1 -1
- package/dist/components/NcAvatar/NcAvatar.vue.d.ts +12 -2
- package/dist/components/NcAvatar/index.mjs +1 -1
- package/dist/components/NcBreadcrumb/NcBreadcrumb.vue.d.ts +11 -2
- package/dist/components/NcBreadcrumb/index.mjs +1 -1
- package/dist/components/NcBreadcrumbs/NcBreadcrumbs.vue.d.ts +22 -4
- 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/index.mjs +1 -1
- package/dist/components/NcCollectionList/NcCollectionList.vue.d.ts +35 -6
- package/dist/components/NcCollectionList/NcCollectionListItem.vue.d.ts +23 -4
- package/dist/components/NcCollectionList/index.mjs +1 -1
- package/dist/components/NcColorPicker/index.mjs +1 -1
- package/dist/components/NcContent/index.mjs +1 -1
- package/dist/components/NcDashboardWidget/NcDashboardWidget.vue.d.ts +35 -6
- package/dist/components/NcDashboardWidget/index.mjs +1 -1
- package/dist/components/NcDashboardWidgetItem/NcDashboardWidgetItem.vue.d.ts +23 -4
- package/dist/components/NcDashboardWidgetItem/index.mjs +1 -1
- package/dist/components/NcDateTimePicker/index.mjs +1 -1
- package/dist/components/NcDateTimePickerNative/index.mjs +1 -1
- package/dist/components/NcDialog/index.mjs +1 -1
- package/dist/components/NcDialogButton/index.mjs +1 -1
- package/dist/components/NcEmojiPicker/index.mjs +1 -1
- package/dist/components/NcFormBoxButton/index.mjs +1 -1
- package/dist/components/NcFormBoxCopyButton/index.mjs +1 -1
- package/dist/components/NcFormBoxSwitch/index.mjs +1 -1
- package/dist/components/NcHeaderButton/index.mjs +1 -1
- package/dist/components/NcHeaderMenu/index.mjs +1 -1
- package/dist/components/NcHotkey/index.mjs +1 -1
- package/dist/components/NcHotkeyList/index.mjs +1 -1
- package/dist/components/NcIconSvgWrapper/index.mjs +1 -1
- package/dist/components/NcInputField/index.mjs +1 -1
- package/dist/components/NcKbd/index.mjs +1 -1
- package/dist/components/NcListItem/NcListItem.vue.d.ts +11 -2
- package/dist/components/NcListItem/index.mjs +1 -1
- package/dist/components/NcListItemIcon/NcListItemIcon.vue.d.ts +13 -2
- package/dist/components/NcListItemIcon/index.mjs +1 -1
- package/dist/components/NcModal/index.mjs +1 -1
- package/dist/components/NcNoteCard/index.mjs +1 -1
- package/dist/components/NcPasswordField/index.mjs +1 -1
- package/dist/components/NcRelatedResourcesPanel/index.mjs +1 -1
- package/dist/components/NcRichContenteditable/index.mjs +1 -1
- package/dist/components/NcRichText/NcRichTextCopyButton.vue.d.ts +6 -0
- 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/NcSettingsSection/index.mjs +1 -1
- package/dist/components/NcSettingsSelectGroup/index.mjs +1 -1
- package/dist/components/NcTextArea/index.mjs +1 -1
- package/dist/components/NcTextField/index.mjs +1 -1
- package/dist/components/NcTimezonePicker/index.mjs +1 -1
- package/dist/components/NcUserBubble/index.mjs +1 -1
- package/dist/components/NcUserStatusIcon/index.mjs +1 -1
- package/dist/{components/NcFormBoxCopyButton → composables}/useCopy.d.ts +2 -0
- package/dist/composables/useFormatDateTime/index.mjs +1 -1
- package/dist/functions/reference/index.mjs +1 -1
- package/dist/functions/usernameToColor/index.mjs +1 -1
- package/dist/index.mjs +63 -63
- package/dist/mixins/userStatus.d.ts +8 -0
- package/dist/utils/appName.d.ts +5 -0
- package/dist/utils/utils.d.ts +10 -0
- package/package.json +12 -12
- package/dist/chunks/NcActions-QtUC1sD3.mjs.map +0 -1
- package/dist/chunks/NcAppContent-DW_SpXeR.mjs.map +0 -1
- package/dist/chunks/NcAppNavigation-DrlEs9WS.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationItem-DH7wxFRY.mjs.map +0 -1
- package/dist/chunks/NcAppNavigationSearch-BWx-LXJj.mjs.map +0 -1
- package/dist/chunks/NcAppSettingsDialog-B7AG3mEJ.mjs.map +0 -1
- package/dist/chunks/NcAppSidebar-BZh0lWlQ.mjs.map +0 -1
- package/dist/chunks/NcAvatar-uKR5Re43.mjs.map +0 -1
- package/dist/chunks/NcButton-DkC5k3Lb.mjs.map +0 -1
- package/dist/chunks/NcChip-DH4rTzjt.mjs.map +0 -1
- package/dist/chunks/NcDashboardWidget-BxIt1qRx.mjs.map +0 -1
- package/dist/chunks/NcFormBoxCopyButton.vue_vue_type_script_setup_true_lang-DfPML_k7.mjs.map +0 -1
- package/dist/chunks/NcIconSvgWrapper-5AA93z-F.mjs.map +0 -1
- package/dist/chunks/NcInputField-DwkKsbxv.mjs.map +0 -1
- package/dist/chunks/NcListItem-BLSWE2Hb.mjs.map +0 -1
- package/dist/chunks/NcListItemIcon-BXVk-irh.mjs.map +0 -1
- package/dist/chunks/NcNoteCard-Dw222p4P.mjs.map +0 -1
- package/dist/chunks/NcPasswordField-BkVdu9LI.mjs.map +0 -1
- package/dist/chunks/NcRelatedResourcesPanel-DP7W80M0.mjs.map +0 -1
- package/dist/chunks/NcRichText-PvndLTtG.mjs.map +0 -1
- package/dist/chunks/NcTextArea-CBx0eeEG.mjs.map +0 -1
- package/dist/chunks/NcTextField.vue_vue_type_script_setup_true_lang-cbNqV44E.mjs.map +0 -1
- package/dist/chunks/_l10n--WxGDYem.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../assets/NcFormBoxItem-
|
|
1
|
+
import '../assets/NcFormBoxItem-BfXKp9xJ.css';
|
|
2
2
|
import { defineComponent, useSlots, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createBlock, createCommentVNode, resolveDynamicComponent, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString } from "vue";
|
|
3
3
|
import { u as useNcFormBox } from "./useNcFormBox-DA9iwXWY.mjs";
|
|
4
4
|
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
@@ -70,15 +70,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
|
-
const formBoxItem = "
|
|
74
|
-
const formBoxItem_legacy = "
|
|
75
|
-
const formBoxItem_inverted = "
|
|
76
|
-
const formBoxItem__element = "
|
|
77
|
-
const formBoxItem__description = "
|
|
78
|
-
const formBoxItem__content = "
|
|
79
|
-
const formBoxItem__icon = "
|
|
73
|
+
const formBoxItem = "_formBoxItem_v5un7_20";
|
|
74
|
+
const formBoxItem_legacy = "_formBoxItem_legacy_v5un7_60";
|
|
75
|
+
const formBoxItem_inverted = "_formBoxItem_inverted_v5un7_64";
|
|
76
|
+
const formBoxItem__element = "_formBoxItem__element_v5un7_64";
|
|
77
|
+
const formBoxItem__description = "_formBoxItem__description_v5un7_67";
|
|
78
|
+
const formBoxItem__content = "_formBoxItem__content_v5un7_71";
|
|
79
|
+
const formBoxItem__icon = "_formBoxItem__icon_v5un7_89";
|
|
80
80
|
const style0 = {
|
|
81
|
-
"material-design-icon": "_material-design-
|
|
81
|
+
"material-design-icon": "_material-design-icon_v5un7_12",
|
|
82
82
|
formBoxItem,
|
|
83
83
|
formBoxItem_legacy,
|
|
84
84
|
formBoxItem_inverted,
|
|
@@ -94,4 +94,4 @@ const NcFormBoxItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", c
|
|
|
94
94
|
export {
|
|
95
95
|
NcFormBoxItem as N
|
|
96
96
|
};
|
|
97
|
-
//# sourceMappingURL=NcFormBoxItem-
|
|
97
|
+
//# sourceMappingURL=NcFormBoxItem-BBP76Mkf.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcFormBoxItem-
|
|
1
|
+
{"version":3,"file":"NcFormBoxItem-BBP76Mkf.mjs","sources":["../../src/components/NcFormBox/NcFormBoxItem.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\nimport type { VueClassType } from '../../utils/VueTypes.ts'\n\nimport { useNcFormBox } from '../../components/NcFormBox/useNcFormBox.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { isLegacy } from '../../utils/legacy.ts'\n\ndefineOptions({ inheritAttrs: false })\n\nconst {\n\ttag,\n\tlabel = undefined,\n\tdescription = undefined,\n\tinvertedAccent = false,\n\tclass: rootClasses = undefined,\n\titemClasses = undefined,\n} = defineProps<{\n\t/** Interactive item element's tag */\n\ttag: string\n\t/** Main Label */\n\tlabel?: string\n\t/** Optional description below the label, also used for the aria-describedby */\n\tdescription?: string\n\t/** Accent on the description instead of the label */\n\tinvertedAccent?: boolean\n\t/** Root element classes */\n\tclass?: VueClassType\n\t/** Interactive item classes */\n\titemClasses?: VueClassType\n}>()\n\ndefineEmits<{\n\t/** Click on the item */\n\tclick: [event: MouseEvent]\n}>()\n\nconst slots = defineSlots<{\n\t/** Item's label custom content */\n\tdefault?: Slot<{\n\t\t/** IDRef of the description element if present */\n\t\tdescriptionId?: string\n\t}>\n\t/** Custom description content */\n\tdescription?: Slot<{\n\t\t/** IDRef of the description element if present */\n\t\tdescriptionId?: string\n\t}>\n\t/** Icon content */\n\ticon?: Slot\n}>()\n\nconst { formBoxItemClass } = useNcFormBox()\n\nconst descriptionId = createElementId()\nconst hasDescription = () => !!description || !!slots.description\n</script>\n\n<template>\n\t<div\n\t\t:class=\"[\n\t\t\trootClasses,\n\t\t\t$style.formBoxItem,\n\t\t\tformBoxItemClass,\n\t\t\t{\n\t\t\t\t[$style.formBoxItem_inverted]: invertedAccent && hasDescription(),\n\t\t\t\t[$style.formBoxItem_legacy]: isLegacy,\n\t\t\t},\n\t\t]\">\n\t\t<span :class=\"$style.formBoxItem__content\">\n\t\t\t<component\n\t\t\t\t:is=\"tag\"\n\t\t\t\t:class=\"[$style.formBoxItem__element, itemClasses]\"\n\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t@click=\"$emit('click', $event)\">\n\t\t\t\t<slot :description-id>\n\t\t\t\t\t{{ label || '⚠️ Label is missing' }}\n\t\t\t\t</slot>\n\t\t\t</component>\n\t\t\t<span v-if=\"hasDescription()\" :id=\"descriptionId\" :class=\"$style.formBoxItem__description\">\n\t\t\t\t<slot name=\"description\">\n\t\t\t\t\t{{ description }}\n\t\t\t\t</slot>\n\t\t\t</span>\n\t\t</span>\n\t\t<span :class=\"$style.formBoxItem__icon\">\n\t\t\t<slot name=\"icon\" :description-id>\n\t\t\t\t⚠️ Icon is missing\n\t\t\t</slot>\n\t\t</span>\n\t</div>\n</template>\n\n<style lang=\"scss\" module>\n.formBoxItem {\n\t--nc-form-box-item-border-width: 1px;\n\t--nc-form-box-item-min-height: 40px; // Special size defined by the design\n\t--form-element-label-offset: calc(var(--border-radius-element) + var(--default-grid-baseline));\n\t--form-element-label-padding: calc(var(--form-element-label-offset) - var(--nc-form-box-item-border-width));\n\t// New colors we don't yet have in theming\n\t// TODO: add new colors to the theming\n\t--color-primary-element-extra-light: hsl(from var(--color-primary-element-light) h s calc(l * 1.045));\n\t--color-primary-element-extra-light-hover: hsl(from var(--color-primary-element-light-hover) h s calc(l * 1.045));\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: center;\n\tgap: calc(2 * var(--default-grid-baseline));\n\tmin-height: var(--nc-form-box-item-min-height);\n\tpadding-inline: var(--form-element-label-padding);\n\tborder: 1px solid var(--color-primary-element-extra-light-hover);\n\tborder-bottom-width: 2px;\n\tborder-radius: var(--border-radius-element);\n\tbackground-color: var(--color-primary-element-extra-light);\n\tcolor: var(--color-main-text);\n\ttransition-property: color, border-color, background-color;\n\ttransition-duration: var(--animation-quick);\n\ttransition-timing-function: linear;\n\t-webkit-user-select: none;\n\tuser-select: none;\n\tcursor: pointer;\n\n\t* {\n\t\tcursor: inherit;\n\t}\n\n\t&:has(:disabled) {\n\t\tcursor: default;\n\t\topacity: 0.5;\n\t}\n\n\t&:hover:not(:has(:disabled)) {\n\t\tcolor: var(--color-primary-element-light-text);\n\t\tbackground-color: var(--color-primary-element-extra-light-hover);\n\t}\n\n\t&:has(:focus-visible) {\n\t\toutline: 2px solid var(--color-main-text);\n\t\tbox-shadow: 0 0 0 4px var(--color-main-background);\n\t}\n\n\t&.formBoxItem_legacy {\n\t\t--nc-form-box-item-border-width: 0px;\n\t\tborder: none;\n\t}\n\n\t&.formBoxItem_inverted {\n\t\t.formBoxItem__element {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\n\t\t.formBoxItem__description {\n\t\t\tcolor: inherit;\n\t\t}\n\t}\n}\n\n.formBoxItem__content {\n\tflex: 1;\n\tdisplay: flex;\n\tflex-direction: column;\n\tpadding-block: calc(2 * var(--default-grid-baseline));\n\toverflow-wrap: anywhere;\n}\n\n// A trick for accessibility:\n// make entire component clickable while internally splitting the interactive item and the description\n.formBoxItem__element::after {\n\tcontent: '';\n\tposition: absolute;\n\tinset: 0;\n}\n\n.formBoxItem__description {\n\tcolor: var(--color-text-maxcontrast);\n}\n\n.formBoxItem__icon {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: flex-end;\n}\n</style>\n\n<docs>\nAn internal component\n</docs>\n"],"names":["_useSlots","_createElementBlock","_normalizeClass","$style","_unref","invertedAccent","_createElementVNode","_createBlock","_resolveDynamicComponent","tag","_mergeProps","itemClasses","$attrs","$emit","_renderSlot","label","description"],"mappings":";;;;;;;;;;;;;;;;;;;AA0CA,UAAM,QAAQA,SAAA;AAed,UAAM,EAAE,iBAAA,IAAqB,aAAA;AAE7B,UAAM,gBAAgB,gBAAA;AACtB,UAAM,iBAAiB,MAAM,CAAC,CAAC,QAAA,eAAe,CAAC,CAAC,MAAM;;0BAIrDC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ormBoxSwitch-BmyNQCbA.css';
|
|
2
2
|
import { defineComponent, mergeModels, useModel, watch, createBlock, openBlock, unref, createSlots, withCtx, withDirectives, createVNode, createElementVNode, normalizeClass, vModelCheckbox, renderSlot, createTextVNode, toDisplayString } from "vue";
|
|
3
|
-
import {
|
|
4
|
-
import { N as NcFormBoxItem } from "./NcFormBoxItem-
|
|
5
|
-
import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-
|
|
3
|
+
import { k as mdiToggleSwitch, l as mdiToggleSwitchOff } from "./mdi-HQ-WBPmL.mjs";
|
|
4
|
+
import { N as NcFormBoxItem } from "./NcFormBoxItem-BBP76Mkf.mjs";
|
|
5
|
+
import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-BvLanNaW.mjs";
|
|
6
6
|
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
7
7
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
8
8
|
const _hoisted_1 = ["id", "aria-describedby", "disabled"];
|
|
@@ -94,4 +94,4 @@ const NcFormBoxSwitch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules",
|
|
|
94
94
|
export {
|
|
95
95
|
NcFormBoxSwitch as N
|
|
96
96
|
};
|
|
97
|
-
//# sourceMappingURL=NcFormBoxSwitch-
|
|
97
|
+
//# sourceMappingURL=NcFormBoxSwitch-E6Ei7MFo.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcFormBoxSwitch-
|
|
1
|
+
{"version":3,"file":"NcFormBoxSwitch-E6Ei7MFo.mjs","sources":["../../src/components/NcFormBoxSwitch/NcFormBoxSwitch.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { mdiToggleSwitch, mdiToggleSwitchOff } from '@mdi/js'\nimport { watch } from 'vue'\nimport NcFormBoxItem from '../NcFormBox/NcFormBoxItem.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport { createElementId } from '../../utils/createElementId.ts'\n\n/** Switch toggle model value */\nconst modelValue = defineModel<boolean>({ required: true })\n\nconst {\n\tlabel = undefined,\n\tdescription = undefined,\n\tdisabled = false,\n} = defineProps<{\n\t/** Main label */\n\tlabel?: string\n\t/** Optional description below the label, also used for the aria-describedby */\n\tdescription?: string\n\t/** Disabled state */\n\tdisabled?: boolean\n}>()\n\nconst emit = defineEmits<{\n\t/** Switch is toggled ON */\n\tenable: []\n\t/** Switch is toggled OFF */\n\tdisable: []\n}>()\n\ndefineSlots<{\n\t/** Custom label content */\n\tdefault?: Slot\n\t/** Custom description content */\n\tdescription?: Slot\n}>()\n\nconst inputId = createElementId()\n\nwatch(modelValue, () => {\n\tif (modelValue.value) {\n\t\temit('enable')\n\t} else {\n\t\temit('disable')\n\t}\n}, {\n\t// defineModel emits update:modelValue synchronously\n\t// Watching it synchronously to emit the enable/disable events together with the update:modelValue event\n\tflush: 'sync',\n})\n</script>\n\n<template>\n\t<NcFormBoxItem\n\t\ttag=\"label\"\n\t\t:for=\"inputId\">\n\t\t<template v-if=\"$slots.default || label\" #default>\n\t\t\t<slot>\n\t\t\t\t{{ label }}\n\t\t\t</slot>\n\t\t</template>\n\t\t<template v-if=\"$slots.description || description\" #description>\n\t\t\t<slot name=\"description\">\n\t\t\t\t{{ description }}\n\t\t\t</slot>\n\t\t</template>\n\t\t<template #icon=\"{ descriptionId }\">\n\t\t\t<input\n\t\t\t\t:id=\"inputId\"\n\t\t\t\tv-model=\"modelValue\"\n\t\t\t\t:class=\"$style.formBoxSwitch__input\"\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\trole=\"switch\"\n\t\t\t\t:aria-describedby=\"descriptionId\"\n\t\t\t\t:disabled>\n\t\t\t<NcIconSvgWrapper\n\t\t\t\t:path=\"modelValue ? mdiToggleSwitch : mdiToggleSwitchOff\"\n\t\t\t\t:class=\"$style.formBoxSwitch__icon\"\n\t\t\t\t:size=\"34 /* --default-clickable-area */\"\n\t\t\t\tinline />\n\t\t</template>\n\t</NcFormBoxItem>\n</template>\n\n<style lang=\"scss\" module>\ninput.formBoxSwitch__input {\n\tmargin: 0;\n\twidth: var(--default-clickable-area);\n\t/* Keep it visually hidden but on the position of visual switch icon */\n\tposition: absolute;\n\tinset-block: 0;\n\tinset-inline-end: var(--form-element-label-offset);\n\tz-index: -1;\n\topacity: 0 !important;\n\t/* Override server styles */\n\theight: auto;\n\tcursor: inherit;\n}\n\n.formBoxSwitch__icon {\n\tcolor: var(--color-text-maxcontrast);\n}\n\ninput:checked + .formBoxSwitch__icon {\n\tcolor: var(--color-primary-element);\n}\n</style>\n\n<docs>\n### General\n\nA toggle switch to be used within `<NcFormBox>`.\n\nLike other form box items, it has a label and an optional description.\n\nIn addition to the standard `v-model` binding, it emits `enable` and `disable` events when toggled **on** or **off**.\n\n```vue\n<script>\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tswitchValue: false,\n\t\t}\n\t}\n}\n</script>\n\n<template>\n\t<NcFormBox>\n\t\t<NcFormBoxSwitch v-model=\"switchValue\" label=\"Turn camera and microphone off by default\" />\n\t\t<NcFormBoxSwitch\n\t\t\tv-model=\"switchValue\"\n\t\t\tlabel=\"Blur camera background by default\"\n\t\t\tdisabled />\n\t\t<NcFormBoxSwitch\n\t\t\tv-model=\"switchValue\"\n\t\t\tlabel=\"Skip device preview before joining a call\"\n\t\t\tdescription=\"Will always show if recording consent is required\"\n\t\t\t@update:modelValue=\"console.log('Switch toggled', $event, switchValue)\"\n\t\t\t@enable=\"console.log('Switch enabled', switchValue)\"\n\t\t\t@disable=\"console.log('Switch disabled', switchValue)\"\n\t\t/>\n\t\t<NcFormBoxSwitch v-model=\"switchValue\" />\n\t</NcFormBox>\n</template>\n```\n</docs>\n"],"names":["_useModel","_createBlock","_unref","_withCtx","_createElementVN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-1,7 +1,7 @@
|
|
|
1
1
|
import '../assets/NcHeaderButton-CVOQgRjm.css';
|
|
2
2
|
import { defineComponent, createElementBlock, openBlock, createVNode, createCommentVNode, unref, withModifiers, withCtx, renderSlot, toDisplayString } from "vue";
|
|
3
3
|
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
4
|
-
import { N as NcButton } from "./NcButton-
|
|
4
|
+
import { N as NcButton } from "./NcButton-ZNHdqKQl.mjs";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
6
6
|
const _hoisted_1 = ["id"];
|
|
7
7
|
const _hoisted_2 = ["id"];
|
|
@@ -46,4 +46,4 @@ const NcHeaderButton = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "da
|
|
|
46
46
|
export {
|
|
47
47
|
NcHeaderButton as N
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=NcHeaderButton-
|
|
49
|
+
//# sourceMappingURL=NcHeaderButton-tLfDELGu.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcHeaderButton-
|
|
1
|
+
{"version":3,"file":"NcHeaderButton-tLfDELGu.mjs","sources":["../../src/components/NcHeaderButton/NcHeaderButton.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used in the Nextcloud top header,\nsimilar to the NcHeaderMenu but to be used when only a trigger button is needed, e.g. when opening a dialog.\n\n```\n<template>\n\t<div id=\"nextcloud-header\">\n\t\t<NcHeaderButton id=\"search-dialog\"\n\t\t\taria-label=\"Search\"\n\t\t\t@click=\"showDialog = true\">\n\t\t\t<template #icon>\n\t\t\t\t<Magnify />\n\t\t\t</template>\n\t\t</NcHeaderButton>\n\n\t\t<NcDialog name=\"Search\"\n\t\t\tsize=\"normal\"\n\t\t\tv-model:open=\"showDialog\">\n\t\t\t<NcTextField label=\"Search for files, comments, contacts …\"\n\t\t\t\ttype=\"search\"\n\t\t\t\tv-model=\"query\" />\n\t\t\t<NcEmptyContent name=\"Search\"\n\t\t\t\t:description=\"query ? `No results for '${query}'` : 'Start typing to search'\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Magnify />\n\t\t\t\t</template>\n\t\t\t</NcEmptyContent>\n\t\t</NcDialog>\n\t</div>\n</template>\n<script>\nimport Magnify from 'vue-material-design-icons/Magnify'\n\nexport default {\n\tcomponents: {\n\t\tMagnify,\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tshowDialog: false,\n\t\t\tquery: '',\n\t\t}\n\t},\n}\n</script>\n<style>\n#nextcloud-header {\n\tdisplay: flex;\n\tjustify-content: right;\n\tbackground-color: var(--color-primary);\n\theight: var(--header-height, 50px);\n\tpadding-inline-end: 12px;\n}\n</style>\n```\n</docs>\n\n<template>\n\t<!-- We need a wrapper for server styles to apply -->\n\t<div :id=\"id\" class=\"header-menu\">\n\t\t<NcButton\n\t\t\t:aria-label=\"ariaLabel\"\n\t\t\t:aria-describedby=\"descriptionId\"\n\t\t\tclass=\"header-menu__trigger\"\n\t\t\tsize=\"large\"\n\t\t\tvariant=\"tertiary-no-background\"\n\t\t\t@click.prevent=\"$emit('click', $event)\">\n\t\t\t<template #icon>\n\t\t\t\t<!-- @slot Icon trigger slot. Make sure the svg path\n\t\t\t\tis at least 16px. Usually mdi icon works at 20px -->\n\t\t\t\t<slot name=\"icon\" />\n\t\t\t</template>\n\t\t</NcButton>\n\n\t\t<span\n\t\t\tv-if=\"description\"\n\t\t\t:id=\"descriptionId\"\n\t\t\tclass=\"header-menu__description hidden-visually\">\n\t\t\t{{ description }}\n\t\t</span>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { createElementId } from '../../utils/createElementId.ts'\nimport NcButton from '../NcButton/index.ts'\n\ndefineProps<{\n\t/** Unique id for this menu */\n\tid: string\n\t/** `aria-label` attribute of the button */\n\tariaLabel: string\n\t/** Optional visually hidden description text for the button */\n\tdescription?: string\n}>()\n\ndefineEmits<{\n\tclick: [event: MouseEvent]\n}>()\n\nconst descriptionId = createElementId()\n</script>\n\n<style lang=\"scss\" scoped>\n@use '../NcHeaderMenu/header-menu__trigger.scss';\n</style>\n"],"names":["_createElementBlock","id","_createVNode","_unref","ariaLabel","_withModifiers","$emit","_renderSlot","description"],"mappings":";;;;;;;;;;;;;;;AA0GA,UAAM,gBAAgB,gBAAA;;0BAzCrBA,mBAqBM,OAAA;AAAA,QArBA,IAAIC,KAAAA;AAAAA,QAAI,OAAM;AAAA,MAAA;QACnBC,YAYWC,MAAA,QAAA,GAAA;AAAA,UAXT,cAAYC,KAAAA;AAAAA,UACZ,oBAAkBD,MAAA,aAAA;AAAA,UACnB,OAAM;AAAA,UACN,MAAK;AAAA,UACL,SAAQ;AAAA,UACP,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAAE,cAAA,CAAA,WAAUC,KAAAA,MAAK,SAAU,MAAM,GAAA,CAAA,SAAA,CAAA;AAAA,QAAA;UAC1B,cAGV,MAAoB;AAAA,YAApBC,WAAoB,KAAA,QAAA,QAAA,CAAA,GAAA,QAAA,IAAA;AAAA,UAAA;;;QAKfC,KAAAA,4BADPR,mBAKO,QAAA;AAAA;UAHL,IAAIG,MAAA,aAAA;AAAA,UACL,OAAM;AAAA,QAAA,mBACHK,KAAAA,WAAW,GAAA,GAAA,UAAA;;;;;;"}
|
|
@@ -10,7 +10,7 @@ import "../composables/useIsMobile/index.mjs";
|
|
|
10
10
|
import { u as useTrapStackControl } from "./useTrapStackControl-B6cEicto.mjs";
|
|
11
11
|
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
12
12
|
import { g as getTrapStack } from "./focusTrap-HJQ4pqHV.mjs";
|
|
13
|
-
import { N as NcButton } from "./NcButton-
|
|
13
|
+
import { N as NcButton } from "./NcButton-ZNHdqKQl.mjs";
|
|
14
14
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
15
15
|
const _hoisted_1 = ["id"];
|
|
16
16
|
const _hoisted_2 = { class: "header-menu__caret" };
|
|
@@ -139,4 +139,4 @@ const NcHeaderMenu = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data
|
|
|
139
139
|
export {
|
|
140
140
|
NcHeaderMenu as N
|
|
141
141
|
};
|
|
142
|
-
//# sourceMappingURL=NcHeaderMenu-
|
|
142
|
+
//# sourceMappingURL=NcHeaderMenu-ClRw0Xc5.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcHeaderMenu-DfO7ghiM.mjs","sources":["../../src/components/NcHeaderMenu/NcHeaderMenu.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used in the Nextcloud top header.\n\n```\n<template>\n\t<div id=\"nextcloud-header\">\n\t\t<NcHeaderMenu id=\"search\"\n\t\t\taria-label=\"Search\">\n\t\t\t<template #trigger>\n\t\t\t\t<Magnify />\n\t\t\t</template>\n\t\t\t<div>\n\t\t\t\t<NcTextField label=\"Search for files, comments, contacts …\"\n\t\t\t\t\tstyle=\"padding-inline: 8px;\"\n\t\t\t\t\ttype=\"search\"\n\t\t\t\t\tv-model=\"query\" />\n\t\t\t\t<NcEmptyContent\n\t\t\t\t\tname=\"Search\"\n\t\t\t\t\t:description=\"query ? `No results for '${query}'` : 'Start typing to search'\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Magnify />\n\t\t\t\t\t</template>\n\t\t\t\t</NcEmptyContent>\n\t\t\t</div>\n\t\t</NcHeaderMenu>\n\t</div>\n</template>\n<script>\nimport Magnify from 'vue-material-design-icons/Magnify'\n\nexport default {\n\tcomponents: {\n\t\tMagnify,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tquery: '',\n\t\t}\n\t},\n}\n</script>\n<style>\n#nextcloud-header {\n\tdisplay: flex;\n\tjustify-content: end;\n\tbackground-color: var(--color-primary);\n\theight: var(--header-height, 50px);\n\tpadding-inline-end: 12px;\n}\n</style>\n```\n</docs>\n\n<script setup lang=\"ts\">\nimport type { FocusTrap } from 'focus-trap'\nimport type { Slot } from 'vue'\n\nimport { onClickOutside } from '@vueuse/core'\nimport { createFocusTrap } from 'focus-trap'\nimport { computed, nextTick, ref, useTemplateRef, watch } from 'vue'\nimport { useHotKey } from '../../composables/index.js'\nimport { useTrapStackControl } from '../../composables/useTrapStackControl.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { getTrapStack } from '../../utils/focusTrap.js'\nimport NcButton from '../NcButton/index.ts'\n\nconst {\n\tariaLabel = undefined,\n\tdescription = undefined,\n\texcludeClickOutsideSelectors = [],\n\topen = false,\n\tisNav = false,\n} = defineProps<{\n\t/**\n\t * Unique id for this menu\n\t */\n\tid: string\n\n\t/**\n\t * aria-label attribute of the menu open button\n\t */\n\tariaLabel?: string\n\n\t/**\n\t * Current menu open state\n\t */\n\topen?: boolean\n\n\t/**\n\t * Pass `true` if the header menu is used for website navigation\n\t *\n\t * The wrapper tag will be set to `nav` and its `aria-labelledby`\n\t * will be associated with the menu open button\n\t */\n\tisNav?: boolean\n\n\t/**\n\t * Additional visually hidden description text for the menu\n\t * open button\n\t */\n\tdescription?: string\n\n\t/**\n\t * A query-selector or an array of query-selectors\n\t * to be ignored when clicking outside an element\n\t */\n\texcludeClickOutsideSelectors?: string | string[]\n}>()\n\nconst emit = defineEmits<{\n\t/** Emitted when the menu is fully closed (animation done) */\n\tclosed: []\n\n\t/** Emitted when the menu is fully opened (animation done) */\n\topened: []\n\n\t/** Updated open state */\n\t'update:open': [v: boolean]\n}>()\n\ndefineSlots<{\n\t/** The menu content */\n\tdefault?: Slot\n\t/** Icon trigger slot. Make sure the svg path is at least 16px. Usually mdi icon works at 20px */\n\ttrigger?: Slot\n}>()\n\n/** Id of the menu description */\nconst descriptionId = createElementId()\n/** Id of the trigger button */\nconst triggerId = createElementId()\n/** The active focus trap (if any) */\nconst focusTrap = ref<FocusTrap>()\n/** Is the menu currently opened */\nconst isOpened = ref(open)\n/** HTML tag to use for the header menu */\nconst wrapperTag = computed(() => isNav ? 'nav' : 'div')\n\n/** The menu content container element */\nconst contentContainerElement = useTemplateRef('contentContainer')\n/** The overall header menu wrapping element (<nav> or <div>) */\nconst headerMenuElement = useTemplateRef<HTMLElement>('headerMenu')\n/** The menu trigger button */\nconst triggerButtonInstance = useTemplateRef('triggerButton')\n\n// Handle click outside of the menu -> should close the menu\nconst ignore = computed(() => Array.isArray(excludeClickOutsideSelectors)\n\t? excludeClickOutsideSelectors\n\t: excludeClickOutsideSelectors.split(' '))\nonClickOutside(headerMenuElement, () => setMenuState(false), { ignore })\n\n// Pressing escape should close the menu\nuseHotKey('Escape', () => setMenuState(false), { prevent: true })\n\n// When component has its own custom focus management\n// The global focus trap stack should be paused\nuseTrapStackControl(isOpened, {\n\tdisabled: () => !isNav,\n})\n\n// Watch the open prop to adjust the internal opened state\nwatch(() => open, (state: boolean) => setMenuState(state))\n\n/**\n * Toggle the current menu open state\n */\nfunction toggleMenu() {\n\tsetMenuState(!isOpened.value)\n}\n\n/**\n * Set the menu opened state\n *\n * @param state The opened state to set\n */\nasync function setMenuState(state: boolean) {\n\tif (state === isOpened.value) {\n\t\treturn\n\t}\n\n\tisOpened.value = state\n\temit('update:open', state)\n\n\t// wait one tick to make sure the rendering finished\n\tawait nextTick()\n\t// either add or clear the focus trap\n\tawait (state ? addFocusTrap() : clearFocusTrap())\n\n\t// Emit signal to mark finished toggling\n\t// @ts-expect-error This seems to be broken in Vue's typescript macro compiler...\n\temit(state ? 'opened' : 'closed')\n}\n\n/**\n * When this is role navigation, then we cannot apply a focus trap.\n * In this case we close the menu on focus-out.\n *\n * @param event the focus event\n */\nfunction onFocusOut(event: FocusEvent) {\n\t// Is not a navigation\n\tif (!isNav) {\n\t\treturn\n\t}\n\n\t// Event target is not a node\n\tif (!(event.relatedTarget instanceof Node)) {\n\t\treturn\n\t}\n\n\tif (headerMenuElement.value?.contains(event.relatedTarget)) {\n\t\tsetMenuState(false)\n\t}\n}\n\n/**\n * Add focus trap for accessibility.\n * Shall only be used when all children are mounted\n * and available in the DOM. We use $nextTick for that.\n */\nasync function addFocusTrap() {\n\t// We cannot add the focus trap on navigation roles\n\t// also skip if already set\n\tif (isNav || focusTrap.value) {\n\t\treturn\n\t}\n\n\t// Init focus trap\n\tfocusTrap.value = createFocusTrap(contentContainerElement.value!, {\n\t\tallowOutsideClick: true,\n\t\ttrapStack: getTrapStack(),\n\t\tfallbackFocus: triggerButtonInstance.value?.$el,\n\t})\n\tfocusTrap.value.activate()\n}\n\n/**\n * Deactivate and clear the focus trap\n */\nfunction clearFocusTrap() {\n\tfocusTrap.value?.deactivate()\n\tfocusTrap.value = undefined\n}\n</script>\n\n<template>\n\t<component\n\t\t:is=\"wrapperTag\"\n\t\t:id=\"id\"\n\t\tref=\"headerMenu\"\n\t\t:aria-labelledby=\"isNav ? triggerId : null\"\n\t\t:class=\"{ 'header-menu--opened': isOpened }\"\n\t\tclass=\"header-menu\"\n\t\t@focusout=\"onFocusOut\">\n\t\t<!-- Trigger -->\n\t\t<NcButton\n\t\t\t:id=\"isNav ? triggerId : null\"\n\t\t\tref=\"triggerButton\"\n\t\t\t:aria-controls=\"`header-menu-${id}`\"\n\t\t\t:aria-expanded=\"isOpened.toString()\"\n\t\t\t:aria-label\n\t\t\tclass=\"header-menu__trigger\"\n\t\t\tsize=\"large\"\n\t\t\tvariant=\"tertiary-no-background\"\n\t\t\t@click.prevent=\"toggleMenu\">\n\t\t\t<template #icon>\n\t\t\t\t<slot name=\"trigger\" />\n\t\t\t</template>\n\t\t</NcButton>\n\n\t\t<span\n\t\t\tv-if=\"description\"\n\t\t\t:id=\"descriptionId\"\n\t\t\tclass=\"header-menu__description hidden-visually\">\n\t\t\t{{ description }}\n\t\t</span>\n\n\t\t<!-- Visual triangle -->\n\t\t<div v-show=\"isOpened\" class=\"header-menu__caret\" />\n\n\t\t<!-- Menu opened content -->\n\t\t<div\n\t\t\tv-show=\"isOpened\"\n\t\t\t:id=\"`header-menu-${id}`\"\n\t\t\tclass=\"header-menu__wrapper\">\n\t\t\t<div ref=\"contentContainer\" class=\"header-menu__content\">\n\t\t\t\t<slot />\n\t\t\t</div>\n\t\t</div>\n\t</component>\n</template>\n\n<style lang=\"scss\" scoped>\n@use './header-menu__trigger.scss';\n\n// content inner and outer margin\n// Also used for menu top-right positioning\n$externalMargin: 8px;\n\n.header-menu {\n\t&__wrapper {\n\t\tposition: fixed;\n\t\tz-index: 2000;\n\t\ttop: var(--header-height);\n\t\tinset-inline-end: 0;\n\t\tbox-sizing: border-box;\n\t\tmargin: 0 $externalMargin;\n\t\tborder-radius: var(--border-radius-element);\n\t\tbackground-color: var(--color-main-background);\n\n\t\tfilter: drop-shadow(0 1px 5px var(--color-box-shadow));\n\t}\n\n\t&__caret {\n\t\tposition: absolute;\n\t\tz-index: 2001; // Because __wrapper is 2000.\n\t\tbottom: 0;\n\t\tinset-inline-start: calc(50% - 10px);\n\t\twidth: 0;\n\t\theight: 0;\n\t\tcontent: ' ';\n\t\tpointer-events: none;\n\t\tborder: 10px solid transparent;\n\t\tborder-bottom-color: var(--color-main-background);\n\t}\n\n\t&__content {\n\t\toverflow: auto;\n\t\twidth: 350px;\n\t\tmax-width: calc(100vw - 2 * $externalMargin);\n\t\tmin-height: calc(var(--default-clickable-area) * 1.5);\n\t\tmax-height: calc(100vh - var(--header-height) * 2);\n\t\t:deep(.empty-content) {\n\t\t\tmargin: 12vh 10px;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","id","isNav","_unref","_normalizeClass","_createVNode","ariaLabel","_renderSlot","description","_createElementBlock","_withDirectives","_createElementVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA,UAAM,OAAO;AAmBb,UA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,mBAEM,OAFN,YAEM;AAAA,cADLJ,WAAQ,KAAA,QAAA,WAAA,CAAA,GAAA,QAAA,IAAA;AAAA,YAAA;;oBAJD,SAAA,KAAQ;AAAA,UAAA;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcHeaderMenu-ClRw0Xc5.mjs","sources":["../../src/components/NcHeaderMenu/NcHeaderMenu.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\nThis component is made to be used in the Nextcloud top header.\n\n```\n<template>\n\t<div id=\"nextcloud-header\">\n\t\t<NcHeaderMenu id=\"search\"\n\t\t\taria-label=\"Search\">\n\t\t\t<template #trigger>\n\t\t\t\t<Magnify />\n\t\t\t</template>\n\t\t\t<div>\n\t\t\t\t<NcTextField label=\"Search for files, comments, contacts …\"\n\t\t\t\t\tstyle=\"padding-inline: 8px;\"\n\t\t\t\t\ttype=\"search\"\n\t\t\t\t\tv-model=\"query\" />\n\t\t\t\t<NcEmptyContent\n\t\t\t\t\tname=\"Search\"\n\t\t\t\t\t:description=\"query ? `No results for '${query}'` : 'Start typing to search'\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Magnify />\n\t\t\t\t\t</template>\n\t\t\t\t</NcEmptyContent>\n\t\t\t</div>\n\t\t</NcHeaderMenu>\n\t</div>\n</template>\n<script>\nimport Magnify from 'vue-material-design-icons/Magnify'\n\nexport default {\n\tcomponents: {\n\t\tMagnify,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tquery: '',\n\t\t}\n\t},\n}\n</script>\n<style>\n#nextcloud-header {\n\tdisplay: flex;\n\tjustify-content: end;\n\tbackground-color: var(--color-primary);\n\theight: var(--header-height, 50px);\n\tpadding-inline-end: 12px;\n}\n</style>\n```\n</docs>\n\n<script setup lang=\"ts\">\nimport type { FocusTrap } from 'focus-trap'\nimport type { Slot } from 'vue'\n\nimport { onClickOutside } from '@vueuse/core'\nimport { createFocusTrap } from 'focus-trap'\nimport { computed, nextTick, ref, useTemplateRef, watch } from 'vue'\nimport { useHotKey } from '../../composables/index.js'\nimport { useTrapStackControl } from '../../composables/useTrapStackControl.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { getTrapStack } from '../../utils/focusTrap.js'\nimport NcButton from '../NcButton/index.ts'\n\nconst {\n\tariaLabel = undefined,\n\tdescription = undefined,\n\texcludeClickOutsideSelectors = [],\n\topen = false,\n\tisNav = false,\n} = defineProps<{\n\t/**\n\t * Unique id for this menu\n\t */\n\tid: string\n\n\t/**\n\t * aria-label attribute of the menu open button\n\t */\n\tariaLabel?: string\n\n\t/**\n\t * Current menu open state\n\t */\n\topen?: boolean\n\n\t/**\n\t * Pass `true` if the header menu is used for website navigation\n\t *\n\t * The wrapper tag will be set to `nav` and its `aria-labelledby`\n\t * will be associated with the menu open button\n\t */\n\tisNav?: boolean\n\n\t/**\n\t * Additional visually hidden description text for the menu\n\t * open button\n\t */\n\tdescription?: string\n\n\t/**\n\t * A query-selector or an array of query-selectors\n\t * to be ignored when clicking outside an element\n\t */\n\texcludeClickOutsideSelectors?: string | string[]\n}>()\n\nconst emit = defineEmits<{\n\t/** Emitted when the menu is fully closed (animation done) */\n\tclosed: []\n\n\t/** Emitted when the menu is fully opened (animation done) */\n\topened: []\n\n\t/** Updated open state */\n\t'update:open': [v: boolean]\n}>()\n\ndefineSlots<{\n\t/** The menu content */\n\tdefault?: Slot\n\t/** Icon trigger slot. Make sure the svg path is at least 16px. Usually mdi icon works at 20px */\n\ttrigger?: Slot\n}>()\n\n/** Id of the menu description */\nconst descriptionId = createElementId()\n/** Id of the trigger button */\nconst triggerId = createElementId()\n/** The active focus trap (if any) */\nconst focusTrap = ref<FocusTrap>()\n/** Is the menu currently opened */\nconst isOpened = ref(open)\n/** HTML tag to use for the header menu */\nconst wrapperTag = computed(() => isNav ? 'nav' : 'div')\n\n/** The menu content container element */\nconst contentContainerElement = useTemplateRef('contentContainer')\n/** The overall header menu wrapping element (<nav> or <div>) */\nconst headerMenuElement = useTemplateRef<HTMLElement>('headerMenu')\n/** The menu trigger button */\nconst triggerButtonInstance = useTemplateRef('triggerButton')\n\n// Handle click outside of the menu -> should close the menu\nconst ignore = computed(() => Array.isArray(excludeClickOutsideSelectors)\n\t? excludeClickOutsideSelectors\n\t: excludeClickOutsideSelectors.split(' '))\nonClickOutside(headerMenuElement, () => setMenuState(false), { ignore })\n\n// Pressing escape should close the menu\nuseHotKey('Escape', () => setMenuState(false), { prevent: true })\n\n// When component has its own custom focus management\n// The global focus trap stack should be paused\nuseTrapStackControl(isOpened, {\n\tdisabled: () => !isNav,\n})\n\n// Watch the open prop to adjust the internal opened state\nwatch(() => open, (state: boolean) => setMenuState(state))\n\n/**\n * Toggle the current menu open state\n */\nfunction toggleMenu() {\n\tsetMenuState(!isOpened.value)\n}\n\n/**\n * Set the menu opened state\n *\n * @param state The opened state to set\n */\nasync function setMenuState(state: boolean) {\n\tif (state === isOpened.value) {\n\t\treturn\n\t}\n\n\tisOpened.value = state\n\temit('update:open', state)\n\n\t// wait one tick to make sure the rendering finished\n\tawait nextTick()\n\t// either add or clear the focus trap\n\tawait (state ? addFocusTrap() : clearFocusTrap())\n\n\t// Emit signal to mark finished toggling\n\t// @ts-expect-error This seems to be broken in Vue's typescript macro compiler...\n\temit(state ? 'opened' : 'closed')\n}\n\n/**\n * When this is role navigation, then we cannot apply a focus trap.\n * In this case we close the menu on focus-out.\n *\n * @param event the focus event\n */\nfunction onFocusOut(event: FocusEvent) {\n\t// Is not a navigation\n\tif (!isNav) {\n\t\treturn\n\t}\n\n\t// Event target is not a node\n\tif (!(event.relatedTarget instanceof Node)) {\n\t\treturn\n\t}\n\n\tif (headerMenuElement.value?.contains(event.relatedTarget)) {\n\t\tsetMenuState(false)\n\t}\n}\n\n/**\n * Add focus trap for accessibility.\n * Shall only be used when all children are mounted\n * and available in the DOM. We use $nextTick for that.\n */\nasync function addFocusTrap() {\n\t// We cannot add the focus trap on navigation roles\n\t// also skip if already set\n\tif (isNav || focusTrap.value) {\n\t\treturn\n\t}\n\n\t// Init focus trap\n\tfocusTrap.value = createFocusTrap(contentContainerElement.value!, {\n\t\tallowOutsideClick: true,\n\t\ttrapStack: getTrapStack(),\n\t\tfallbackFocus: triggerButtonInstance.value?.$el,\n\t})\n\tfocusTrap.value.activate()\n}\n\n/**\n * Deactivate and clear the focus trap\n */\nfunction clearFocusTrap() {\n\tfocusTrap.value?.deactivate()\n\tfocusTrap.value = undefined\n}\n</script>\n\n<template>\n\t<component\n\t\t:is=\"wrapperTag\"\n\t\t:id=\"id\"\n\t\tref=\"headerMenu\"\n\t\t:aria-labelledby=\"isNav ? triggerId : null\"\n\t\t:class=\"{ 'header-menu--opened': isOpened }\"\n\t\tclass=\"header-menu\"\n\t\t@focusout=\"onFocusOut\">\n\t\t<!-- Trigger -->\n\t\t<NcButton\n\t\t\t:id=\"isNav ? triggerId : null\"\n\t\t\tref=\"triggerButton\"\n\t\t\t:aria-controls=\"`header-menu-${id}`\"\n\t\t\t:aria-expanded=\"isOpened.toString()\"\n\t\t\t:aria-label\n\t\t\tclass=\"header-menu__trigger\"\n\t\t\tsize=\"large\"\n\t\t\tvariant=\"tertiary-no-background\"\n\t\t\t@click.prevent=\"toggleMenu\">\n\t\t\t<template #icon>\n\t\t\t\t<slot name=\"trigger\" />\n\t\t\t</template>\n\t\t</NcButton>\n\n\t\t<span\n\t\t\tv-if=\"description\"\n\t\t\t:id=\"descriptionId\"\n\t\t\tclass=\"header-menu__description hidden-visually\">\n\t\t\t{{ description }}\n\t\t</span>\n\n\t\t<!-- Visual triangle -->\n\t\t<div v-show=\"isOpened\" class=\"header-menu__caret\" />\n\n\t\t<!-- Menu opened content -->\n\t\t<div\n\t\t\tv-show=\"isOpened\"\n\t\t\t:id=\"`header-menu-${id}`\"\n\t\t\tclass=\"header-menu__wrapper\">\n\t\t\t<div ref=\"contentContainer\" class=\"header-menu__content\">\n\t\t\t\t<slot />\n\t\t\t</div>\n\t\t</div>\n\t</component>\n</template>\n\n<style lang=\"scss\" scoped>\n@use './header-menu__trigger.scss';\n\n// content inner and outer margin\n// Also used for menu top-right positioning\n$externalMargin: 8px;\n\n.header-menu {\n\t&__wrapper {\n\t\tposition: fixed;\n\t\tz-index: 2000;\n\t\ttop: var(--header-height);\n\t\tinset-inline-end: 0;\n\t\tbox-sizing: border-box;\n\t\tmargin: 0 $externalMargin;\n\t\tborder-radius: var(--border-radius-element);\n\t\tbackground-color: var(--color-main-background);\n\n\t\tfilter: drop-shadow(0 1px 5px var(--color-box-shadow));\n\t}\n\n\t&__caret {\n\t\tposition: absolute;\n\t\tz-index: 2001; // Because __wrapper is 2000.\n\t\tbottom: 0;\n\t\tinset-inline-start: calc(50% - 10px);\n\t\twidth: 0;\n\t\theight: 0;\n\t\tcontent: ' ';\n\t\tpointer-events: none;\n\t\tborder: 10px solid transparent;\n\t\tborder-bottom-color: var(--color-main-background);\n\t}\n\n\t&__content {\n\t\toverflow: auto;\n\t\twidth: 350px;\n\t\tmax-width: calc(100vw - 2 * $externalMargin);\n\t\tmin-height: calc(var(--default-clickable-area) * 1.5);\n\t\tmax-height: calc(100vh - var(--header-height) * 2);\n\t\t:deep(.empty-content) {\n\t\t\tmargin: 12vh 10px;\n\t\t}\n\t}\n}\n</style>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","id","isNav","_unref","_normalizeClass","_createVNode","ariaLabel","_renderSlot","description","_createElementBlock","_withDirectives","_createElementVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA,UAAM,OAAO;AAmBb,UAAM,gBAAgB,gBAAA;AAEtB,UAAM,YAAY,gBAAA;AAElB,UAAM,YAAY,IAAA;AAElB,UAAM,WAAW,IAAI,QAAA,IAAI;AAEzB,UAAM,aAAa,SAAS,MAAM,QAAA,QAAQ,QAAQ,KAAK;AAGvD,UAAM,0BAA0B,eAAe,kBAAkB;AAEjE,UAAM,oBAAo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|
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, renderSlot, Fragment, renderList, createBlock, createTextVNode, toDisplayString } from "vue";
|
|
3
|
-
import { N as NcKbd } from "./NcKbd-
|
|
3
|
+
import { N as NcKbd } from "./NcKbd-D6pM7aJM.mjs";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
5
5
|
const NO_LABEL_WARNING = "⚠️ NcHotKey must have a label or slot content";
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -58,4 +58,4 @@ const NcHotkey = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssMod
|
|
|
58
58
|
export {
|
|
59
59
|
NcHotkey as N
|
|
60
60
|
};
|
|
61
|
-
//# sourceMappingURL=NcHotkey-
|
|
61
|
+
//# sourceMappingURL=NcHotkey-Cya0WRKL.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcHotkey-
|
|
1
|
+
{"version":3,"file":"NcHotkey-Cya0WRKL.mjs","sources":["../../src/components/NcHotkey/NcHotkey.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { computed } from 'vue'\nimport NcKbd from '../NcKbd/NcKbd.vue'\n\nconst {\n\tlabel = undefined,\n\thotkey = undefined,\n} = defineProps<{\n\t/**\n\t * Label for the hotkey\n\t */\n\tlabel?: string\n\t/**\n\t * Hotkey combination string separated by space, for example, `Control Alt T` or `F2` (see `<NcKbd>` for supported key names)\n\t */\n\thotkey?: string\n}>()\n\ndefineSlots<{\n\t/**\n\t * Custom label content\n\t */\n\tdefault?: Slot\n\t/**\n\t * Custom hotkey content for an advanced hotkey layout with <NcKbd> components or other custom content\n\t */\n\thotkey?: Slot\n}>()\n\nconst symbols = computed(() => {\n\treturn hotkey?.split(/\\s+/).map((s) => s.trim())\n})\n\nconst NO_LABEL_WARNING = '⚠️ NcHotKey must have a label or slot content'\n</script>\n\n<template>\n\t<li :class=\"$style.hotkey\">\n\t\t<span role=\"term\" :class=\"$style.hotkey__keys\">\n\t\t\t<slot name=\"hotkey\">\n\t\t\t\t<NcKbd v-for=\"(symbol, index) in symbols\" :key=\"index\" :symbol />\n\t\t\t</slot>\n\t\t</span>\n\t\t<span role=\"definition\" :class=\"$style.hotkey__label\">\n\t\t\t<slot>\n\t\t\t\t{{ label || NO_LABEL_WARNING }}\n\t\t\t</slot>\n\t\t</span>\n\t</li>\n</template>\n\n<style lang=\"scss\" module>\n.hotkey {\n\t--form-element-label-offset: calc(var(--border-radius-element) + var(--default-grid-baseline));\n\tdisplay: flex;\n\tflex-direction: row-reverse;\n\talign-items: stretch;\n\tpadding-inline: var(--form-element-label-offset);\n\n\t&:first-child {\n\t\t.hotkey__label,\n\t\t.hotkey__keys {\n\t\t\tborder-block-start: none;\n\t\t}\n\t}\n\n}\n\n.hotkey__label,\n.hotkey__keys {\n\tdisplay: flex;\n\talign-items: center;\n\tpadding-block: calc(2 * var(--default-grid-baseline));\n\tborder-block-start: 1px solid var(--color-border);\n}\n\n.hotkey__label {\n\tflex: 1 1 200px;\n}\n\n.hotkey__keys {\n\tflex: 1 1 auto;\n\tflex-wrap: wrap;\n\tjustify-content: end;\n\trow-gap: calc(1 * var(--default-grid-baseline));\n}\n</style>\n"],"names":["_createElementBlock","_normalizeClass","$style","_createElementVNode","_renderSlot","_openBlock","_Fragment","_renderList","_createBlock","label"],"mappings":";;;AAwCA,MAAM,mBAAmB;;;;;;;;AAJzB,UAAM,UAAU,SAAS,MAAM;AAC9B,aAAO,QAAA,QAAQ,MAAM,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM;AAAA,IAChD,CAAC;;0BAMAA,mBAWK,MAAA;AAAA,QAXA,OAAKC,eAAEC,KAAAA,OAAO,MAAM;AAAA,MAAA;QACxBC,mBAIO,QAAA;AAAA,UAJD,MAAK;AAAA,UAAQ,OAAKF,eAAEC,KAAAA,OAAO,YAAY;AAAA,QAAA;UAC5CE,WAEO,2BAFP,MAEO;AAAA,aADNC,UAAA,IAAA,GAAAL,mBAAiEM,UAAA,MAAAC,WAAhC,QAAA,OAAO,CAAzB,QAAQ,UAAK;kCAA5BC,YAAiE,OAAA;AAAA,gBAAtB,KAAK;AAAA,gBAAQ;AAAA,cAAA;;;;QAG1DL,mBAIO,QAAA;AAAA,UAJD,MAAK;AAAA,UAAc,OAAKF,eAAEC,KAAAA,OAAO,aAAa;AAAA,QAAA;UACnDE,WAEO,4BAFP,MAEO;AAAA,YADHK,gBAAAA,gBAAAA,KAAAA,SAAS,gBAAgB,GAAA,CAAA;AAAA,UAAA;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/NcHotkeyList-gAZN0WIu.css';
|
|
2
2
|
import { defineComponent, createElementBlock, openBlock, normalizeClass, createElementVNode, toDisplayString, unref, renderSlot } from "vue";
|
|
3
|
-
import { r as register, a as t } from "./_l10n
|
|
3
|
+
import { r as register, a as t } from "./_l10n-CWKr1fUH.mjs";
|
|
4
4
|
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
6
6
|
register();
|
|
@@ -39,4 +39,4 @@ const NcHotkeyList = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cs
|
|
|
39
39
|
export {
|
|
40
40
|
NcHotkeyList as N
|
|
41
41
|
};
|
|
42
|
-
//# sourceMappingURL=NcHotkeyList-
|
|
42
|
+
//# sourceMappingURL=NcHotkeyList-B9C--U6a.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcHotkeyList-
|
|
1
|
+
{"version":3,"file":"NcHotkeyList-B9C--U6a.mjs","sources":["../../src/components/NcHotkeyList/NcHotkeyList.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\n\nimport { t } from '../../l10n.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\n\nconst {\n\tlabel = undefined,\n} = defineProps<{\n\t/**\n\t * Heading list label to use when there are multiple lists of shortcuts\n\t */\n\tlabel?: string\n}>()\n\ndefineSlots<{\n\t/**\n\t * Shortcuts described via <NcHotkey> components\n\t */\n\tdefault?: Slot\n}>()\n\nconst labelId = `NcHotkeyList_${createElementId()}`\n</script>\n\n<template>\n\t<div :class=\"$style.hotkeyList\">\n\t\t<div :id=\"labelId\" :class=\"[$style.hotkeyList__heading, { 'hidden-visually': !label }]\">\n\t\t\t{{ label || t('Keyboard shortcuts') }}\n\t\t</div>\n\t\t<ul :aria-labelledby=\"labelId\">\n\t\t\t<slot />\n\t\t</ul>\n\t</div>\n</template>\n\n<style module>\n.hotkeyList {\n\t--form-element-label-offset: calc(var(--border-radius-element) + var(--default-grid-baseline));\n}\n\n.hotkeyList__heading {\n\tfont-weight: bold;\n\tmargin-inline: var(--form-element-label-offset);\n}\n</style>\n\n<docs>\n## General\n\nList of keyboard shortcuts for the `<NcAppSettingsShortcutsSection>`.\n\n```vue\n<template>\n\t<NcHotkeyList>\n\t\t<NcHotkey label=\"New File\" hotkey=\"Ctrl N\" />\n\t\t<NcHotkey label=\"Open File\" hotkey=\"Ctrl O\" />\n\t\t<NcHotkey label=\"Save File\" hotkey=\"Ctrl S\" />\n\t</NcHotkeyList>\n</template>\n```\n\n## Groups\n\nThe hotkey list can have an optional heading label. This is useful when there are multiple groups of shortcuts in an app with many shortcuts.\n\n```vue\n<template>\n\t<section>\n\t\t<NcHotkeyList label=\"Actions\">\n\t\t\t<NcHotkey label=\"File actions\" hotkey=\"A\" />\n\t\t\t<NcHotkey label=\"Rename\" hotkey=\"F2\" />\n\t\t\t<NcHotkey label=\"Delete\" hotkey=\"Delete\" />\n\t\t\t<NcHotkey label=\"Add or remove favorite\" hotkey=\"S\" />\n\t\t\t<NcHotkey label=\"Manage tags\" hotkey=\"T\" />\n\t\t</NcHotkeyList>\n\n\t\t<NcHotkeyList label=\"Selection\">\n\t\t\t<NcHotkey label=\"Select all files\" hotkey=\"Control A\" />\n\t\t\t<NcHotkey label=\"Deselect all\" hotkey=\"Escape\" />\n\t\t\t<NcHotkey label=\"Select or deselect\" hotkey=\"Control Space\" />\n\t\t\t<NcHotkey label=\"Select a range\" hotkey=\"Control Shift Space\" />\n\t\t</NcHotkeyList>\n\n\t\t<NcHotkeyList label=\"Navigation\">\n\t\t\t<NcHotkey label=\"Go to parent folder\" hotkey=\"Alt ArrowUp\" />\n\t\t\t<NcHotkey label=\"Go to file above\" hotkey=\"ArrowUp\" />\n\t\t\t<NcHotkey label=\"Go to file below\" hotkey=\"ArrowDown\" />\n\t\t\t<NcHotkey label=\"Go left in grid\" hotkey=\"ArrowLeft\" />\n\t\t\t<NcHotkey label=\"Go right in grid\" hotkey=\"ArrowRight\" />\n\t\t</NcHotkeyList>\n\n\t\t<NcHotkeyList label=\"View\">\n\t\t\t<NcHotkey label=\"Toggle grid view\" hotkey=\"V\" />\n\t\t\t<NcHotkey label=\"Open file sidebar\" hotkey=\"D\" />\n\t\t\t<NcHotkey label=\"Show those shortcuts\" hotkey=\"?\" />\n\t\t</NcHotkeyList>\n\t</section>\n</template>\n```\n</docs>\n"],"names":["_createElementBlock","_normalizeClass","$style","_createElementVNode","label","_unref","_renderSlot"],"mappings":";;;;;;;;;;;AA2BA,UAAM,UAAU,gBAAgB,gBAAA,CAAiB;;0BAIhDA,mBAOM,OAAA;AAAA,QAPA,OAAKC,eAAEC,KAAAA,OAAO,UAAU;AAAA,MAAA;QAC7BC,mBAEM,OAAA;AAAA,UAFA,IAAI;AAAA,UAAU,OAAKF,eAAA,CAAGC,KAAAA,OAAO,2CAA2CE,KAAAA,OAAK,CAAA;AAAA,QAAA,GAC/EA,gBAAAA,KAAAA,SAASC,MAAA,CAAA,EAAC,oBAAA,CAAA,GAAA,CAAA;AAAA,QAEdF,mBAEK,MAAA,EAFA,mBAAiB,WAAO;AAAA,UAC5BG,WAAQ,KAAA,QAAA,SAAA;AAAA,QAAA;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../assets/NcIconSvgWrapper-
|
|
1
|
+
import '../assets/NcIconSvgWrapper-N3OwSN9O.css';
|
|
2
2
|
import { defineComponent, useCssVars, computed, warn, createElementBlock, openBlock, normalizeClass, createElementVNode } from "vue";
|
|
3
3
|
import DOMPurify from "dompurify";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
@@ -22,7 +22,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
},
|
|
23
23
|
setup(__props) {
|
|
24
24
|
useCssVars((_ctx) => ({
|
|
25
|
-
"
|
|
25
|
+
"fb515064": iconSize.value
|
|
26
26
|
}));
|
|
27
27
|
const props = __props;
|
|
28
28
|
const iconSize = computed(() => typeof props.size === "number" ? `${props.size}px` : props.size);
|
|
@@ -61,8 +61,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
-
const NcIconSvgWrapper = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
64
|
+
const NcIconSvgWrapper = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-aaedb1c3"]]);
|
|
65
65
|
export {
|
|
66
66
|
NcIconSvgWrapper as N
|
|
67
67
|
};
|
|
68
|
-
//# sourceMappingURL=NcIconSvgWrapper-
|
|
68
|
+
//# sourceMappingURL=NcIconSvgWrapper-BvLanNaW.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NcIconSvgWrapper-BvLanNaW.mjs","sources":["../../src/components/NcIconSvgWrapper/NcIconSvgWrapper.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Description\n\nRender raw SVG string icons.\n\n### Usage within `icon`-slot\n\n```vue\n<template>\n\t<div class=\"grid\">\n\t\t<NcButton aria-label=\"Close\">\n\t\t\t<template #icon>\n\t\t\t\t<NcIconSvgWrapper :svg=\"closeSvg\" name=\"Close\" />\n\t\t\t</template>\n\t\t</NcButton>\n\t\t<NcButton aria-label=\"Settings\">\n\t\t\t<template #icon>\n\t\t\t\t<NcIconSvgWrapper :svg=\"cogSvg\" name=\"Cog\" />\n\t\t\t</template>\n\t\t</NcButton>\n\t\t<NcButton aria-label=\"Add\">\n\t\t\t<template #icon>\n\t\t\t\t<NcIconSvgWrapper :svg=\"plusSvg\" name=\"Plus\" />\n\t\t\t</template>\n\t\t</NcButton>\n\t\t<NcButton aria-label=\"Send\">\n\t\t\t<template #icon>\n\t\t\t\t<NcIconSvgWrapper :path=\"mdiSendOutline\" name=\"Send\" />\n\t\t\t</template>\n\t\t</NcButton>\n\t\t<NcButton aria-label=\"Star\">\n\t\t\t<template #icon>\n\t\t\t\t<NcIconSvgWrapper :path=\"mdiStarOutline\" name=\"Star\" />\n\t\t\t</template>\n\t\t</NcButton>\n\t</div>\n</template>\n\n<script>\nimport closeSvg from '@mdi/svg/svg/close.svg?raw'\nimport cogSvg from '@mdi/svg/svg/cog-outline.svg?raw'\nimport plusSvg from '@mdi/svg/svg/plus.svg?raw'\nimport { mdiSendOutline } from '@mdi/js'\nimport { mdiStarOutline } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\t// These icons are static data, so you do not need to put them into `data` which will make them reactive\n\t\treturn {\n\t\t\tcloseSvg,\n\t\t\tcogSvg,\n\t\t\tplusSvg,\n\t\t\tmdiSendOutline,\n\t\t\tmdiStarOutline,\n\t\t}\n\t},\n}\n</script>\n\n<style>\n.grid {\n\tdisplay: grid;\n\tgrid-template-columns: repeat(5, max-content);\n\tgap: 10px;\n}\n</style>\n```\n\n### Inline usage inside text\n\n```vue\n<template>\n\t<p>\n\t\tThis is my <NcIconSvgWrapper inline :path=\"mdiStarOutline\" /> Favorite\n\t</p>\n</template>\n<script>\nimport { mdiStarOutline } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\treturn {\n\t\t\tmdiStarOutline,\n\t\t}\n\t},\n}\n</script>\n```\n\n### Directional usage\n\nThe `directional` property allows to enable a language direction aware icon.\nThis icon component can be used in places where an language direction aware icon should be used,\nfor example if an arrow pointing to the left it used it often points in the wrong direction for right-to-left languages.\nIn this cases this icon can be used which will always point into the logical \"start\" direction.\n\n```vue\n<template>\n\t<div class=\"wrapper\">\n\t\t<NcButton @click=\"isRtl = !isRtl\">Toggle RTL</NcButton>\n\t\t<div class=\"directional\" :dir=\"isRtl ? 'rtl' : 'ltr'\">\n\t\t\t<NcButton alignment=\"start\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcIconSvgWrapper directional :path=\"mdiChevronLeft\" />\n\t\t\t\t</template>\n\t\t\t\tPrevious\n\t\t\t</NcButton>\n\t\t\t<NcButton alignment=\"end-reverse\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcIconSvgWrapper directional :path=\"mdiChevronRight\" />\n\t\t\t\t</template>\n\t\t\t\tNext\n\t\t\t</NcButton>\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport { mdiChevronLeft, mdiChevronRight } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\treturn {\n\t\t\tmdiChevronLeft,\n\t\t\tmdiChevronRight,\n\t\t}\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tisRtl: false\n\t\t}\n\t},\n}\n</script>\n<style scoped>\n.wrapper {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: calc(2 * var(--default-grid-baseline));\n\tmax-width: 300px;\n}\n\n.directional {\n\tdisplay: flex;\n\tflex-direction: row;\n\tgap: calc(2 * var(--default-grid-baseline));\n}\n\n.directional * {\n\tflex: 1 50%;\n}\n</style>\n```\n</docs>\n\n<script setup lang=\"ts\">\nimport DOMPurify from 'dompurify'\nimport { computed, warn } from 'vue'\n\nconst props = withDefaults(defineProps<{\n\t/**\n\t * Make the icon directional, meaning it is langauge direction aware.\n\t * If the icon is placed in a right-to-left context it will be mirrored vertically.\n\t */\n\tdirectional?: boolean\n\n\t/**\n\t * Set if the icon should be used as inline content e.g. within text.\n\t * By default the icon is made a block element for use inside `icon`-slots.\n\t */\n\tinline?: boolean\n\n\t/**\n\t * Raw SVG string to render\n\t */\n\tsvg?: string\n\n\t/**\n\t * Label of the icon, used in aria-label\n\t */\n\tname?: string\n\n\t/**\n\t * Raw SVG path to render. Takes precedence over the SVG string in the `svg` prop.\n\t */\n\tpath?: string\n\n\t/**\n\t * Size of the icon to show. Only use if not using within an icon slot.\n\t * Defaults to 20px which is the Nextcloud icon size for all icon slots.\n\t */\n\tsize?: number | 'auto'\n}>(), {\n\tname: undefined,\n\tpath: '',\n\tsize: 20,\n\tsvg: '',\n})\n\n/**\n * Icon size used in CSS\n */\nconst iconSize = computed(() => typeof props.size === 'number' ? `${props.size}px` : props.size)\n\n/**\n * The sanitized SVG or undefined if path shall be used\n */\nconst cleanSvg = computed(() => {\n\tif (!props.svg || props.path) {\n\t\treturn\n\t}\n\n\tconst svg = DOMPurify.sanitize(props.svg)\n\n\tconst svgDocument = new DOMParser().parseFromString(svg, 'image/svg+xml')\n\n\tif (svgDocument.querySelector('parsererror')) {\n\t\twarn('SVG is not valid')\n\t\treturn ''\n\t}\n\n\tif (svgDocument.documentElement.id) {\n\t\tsvgDocument.documentElement.removeAttribute('id')\n\t}\n\n\treturn svgDocument.documentElement.outerHTML\n})\n</script>\n\n<template>\n\t<span\n\t\t:aria-hidden=\"name ? undefined : 'true'\"\n\t\t:aria-label=\"name || undefined\"\n\t\tclass=\"icon-vue\"\n\t\t:class=\"{\n\t\t\t'icon-vue--directional': directional,\n\t\t\t'icon-vue--inline': inline,\n\t\t}\"\n\t\trole=\"img\">\n\t\t<svg v-if=\"!cleanSvg\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t<path :d=\"path\" />\n\t\t</svg>\n\t\t<!-- eslint-disable-next-line vue/no-v-text-v-html-on-component,vue/no-v-html -->\n\t\t<span v-else v-html=\"cleanSvg\" />\n\t</span>\n</template>\n\n<style lang=\"scss\" scoped>\n.icon-vue {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tmin-width: var(--default-clickable-area);\n\tmin-height: var(--default-clickable-area);\n\topacity: 1;\n\n\t&#{&}--inline {\n\t\tdisplay: inline-flex !important;\n\t\tmin-width: fit-content;\n\t\tmin-height: fit-content;\n\t\tvertical-align: text-bottom;\n\t}\n\n\t// Icon svg wrapper\n\tspan {\n\t\tline-height: 0;\n\t}\n\n\t&:deep(svg) {\n\t\tfill: currentColor;\n\t\twidth: v-bind('iconSize');\n\t\theight: v-bind('iconSize');\n\t\tmax-width: v-bind('iconSize');\n\t\tmax-height: v-bind('iconSize');\n\t}\n\n\t&--directional:deep(svg:dir(rtl)) {\n\t\ttransform: scaleX(-1);\n\t}\n}\n</style>\n"],"names":["_createElementBlock","name","directional","inline","_openBlock","_createElementVNode","path"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAoKA,UAAM,QAAQ;AA2Cd,UAAM,WAAW,SAAS,MAAM,OAAO,MAAM,SAAS,WAAW,GAAG,MAAM,IAAI,OAAO,MAAM,IAAI;AAK/F,UAAM,WAAW,SAAS,MAAM;AAC/B,UAAI,CAAC,MAAM,OAAO,MAAM,MAAM;AAC7B;AAAA,MACD;AAEA,YAAM,MAAM,UAAU,SAAS,MAAM,GAAG;AAExC,YAAM,cAAc,IAAI,UAAA,EAAY,gBAAgB,KAAK,eAAe;AAExE,UAAI,YAAY,cAAc,aAAa,GAAG;AAC7C,aAAK,kBAAkB;AACvB,eAAO;AAAA,MACR;AAEA,UAAI,YAAY,gBAAgB,IAAI;AACnC,oBAAY,gBAAgB,gBAAgB,IAAI;AAAA,MACjD;AAEA,aAAO,YAAY,gBAAgB;AAAA,IACpC,CAAC;;0BAIAA,mBAcO,QAAA;AAAA,QAbL,eAAaC,KAAAA,OAAO,SAAS;AAAA,QAC7B,cAAYA,KAAAA,QAAQ;AAAA,QACrB,uBAAM,YAAU;AAAA,mCACsBC,KAAAA;AAAAA,8BAAoCC,KAAAA;AAAAA,QAAAA;QAI1E,MAAK;AAAA,MAAA;SACO,SAAA,SAAZC,aAAAJ,mBAEM,OAFN,YAEM;AAAA,UADLK,mBAAkB,QAAA,EAAX,GAAGC,KAAAA,QAAI,MAAA,GAAA,UAAA;AAAA,QAAA,oBAGfN,mBAAiC,QAAA;AAAA;UAApB,WAAQ,SAAA;AAAA,QAAA;;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../assets/NcInputConfirmCancel-BrdZEfr2.css';
|
|
2
2
|
import { I as IconArrowRight } from "./ArrowRight-DRKHUZMH.mjs";
|
|
3
3
|
import { I as IconClose } from "./Close-D6ngJ4t9.mjs";
|
|
4
|
-
import { r as register,
|
|
5
|
-
import { N as NcButton } from "./NcButton-
|
|
4
|
+
import { r as register, g as t14, a as t } from "./_l10n-CWKr1fUH.mjs";
|
|
5
|
+
import { N as NcButton } from "./NcButton-ZNHdqKQl.mjs";
|
|
6
6
|
import { resolveComponent, createElementBlock, openBlock, createElementVNode, withModifiers, withKeys, withDirectives, createVNode, vModelText, withCtx } from "vue";
|
|
7
7
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
8
8
|
register(t14);
|
|
@@ -120,4 +120,4 @@ const NcInputConfirmCancel = /* @__PURE__ */ _export_sfc(_sfc_main, [["render",
|
|
|
120
120
|
export {
|
|
121
121
|
NcInputConfirmCancel as N
|
|
122
122
|
};
|
|
123
|
-
//# sourceMappingURL=NcInputConfirmCancel-
|
|
123
|
+
//# sourceMappingURL=NcInputConfirmCancel-Brw2dsPI.mjs.map
|
package/dist/chunks/{NcInputConfirmCancel-BWJotcI2.mjs.map → NcInputConfirmCancel-Brw2dsPI.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcInputConfirmCancel-
|
|
1
|
+
{"version":3,"file":"NcInputConfirmCancel-Brw2dsPI.mjs","sources":["../../src/components/NcAppNavigationItem/NcInputConfirmCancel.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n# Usage\n\n```\n<NcInputConfirmCancel @confirm=\"alert('confirm')\" @cancel=\"alert('cancel')\" />\n```\n</docs>\n\n<template>\n\t<div class=\"app-navigation-input-confirm\">\n\t\t<form\n\t\t\t@submit.prevent=\"confirm\"\n\t\t\t@keydown.esc.exact.stop.prevent=\"cancel\"\n\t\t\t@click.stop.prevent>\n\t\t\t<input\n\t\t\t\tref=\"input\"\n\t\t\t\tv-model=\"valueModel\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tclass=\"app-navigation-input-confirm__input\"\n\t\t\t\t:placeholder=\"placeholder\">\n\n\t\t\t<NcButton\n\t\t\t\t:aria-label=\"labelConfirm\"\n\t\t\t\ttype=\"submit\"\n\t\t\t\tvariant=\"primary\"\n\t\t\t\t@click.stop.prevent=\"confirm\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconArrowRight :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcButton>\n\n\t\t\t<NcButton\n\t\t\t\t:aria-label=\"labelCancel\"\n\t\t\t\ttype=\"reset\"\n\t\t\t\t:variant=\"primary ? 'primary' : 'tertiary'\"\n\t\t\t\t@click.stop.prevent=\"cancel\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<IconClose :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcButton>\n\t\t</form>\n\t</div>\n</template>\n\n<script>\nimport IconArrowRight from 'vue-material-design-icons/ArrowRight.vue'\nimport IconClose from 'vue-material-design-icons/Close.vue'\nimport { t } from '../../l10n.ts'\nimport NcButton from '../NcButton/index.js'\n\nexport default {\n\tname: 'NcInputConfirmCancel',\n\n\tcomponents: {\n\t\tIconArrowRight,\n\t\tIconClose,\n\t\tNcButton,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * If this element is used on a primary element set to true for primary styling.\n\t\t */\n\t\tprimary: {\n\t\t\tdefault: false,\n\t\t\ttype: Boolean,\n\t\t},\n\n\t\t/**\n\t\t * Placeholder of the edit field\n\t\t */\n\t\tplaceholder: {\n\t\t\tdefault: '',\n\t\t\ttype: String,\n\t\t},\n\n\t\t/**\n\t\t * The current name (model value)\n\t\t */\n\t\tmodelValue: {\n\t\t\tdefault: '',\n\t\t\ttype: String,\n\t\t},\n\t},\n\n\temits: [\n\t\t'cancel',\n\t\t'confirm',\n\t\t'update:modelValue',\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\tlabelConfirm: t('Confirm changes'),\n\t\t\tlabelCancel: t('Cancel changes'),\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tvalueModel: {\n\t\t\tget() { return this.modelValue },\n\t\t\tset(newValue) {\n\t\t\t\tthis.$emit('update:modelValue', newValue)\n\t\t\t},\n\t\t},\n\t},\n\n\tmethods: {\n\t\tconfirm() {\n\t\t\tthis.$emit('confirm')\n\t\t},\n\n\t\tcancel() {\n\t\t\tthis.$emit('cancel')\n\t\t},\n\n\t\tfocusInput() {\n\t\t\tthis.$refs.input.focus()\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n$input-height: 34px;\n$input-padding: 7px;\n$input-margin: 5px;\n\n.app-navigation-input-confirm {\n\tflex: 1 0 100%;\n\twidth: 100%;\n\n\tform {\n\t\tdisplay: flex;\n\t}\n\n\t&__input {\n\t\theight: $input-height;\n\t\tflex: 1 1 100%;\n\t\tfont-size: 100% !important;\n\t\tmargin: $input-margin !important;\n\t\tmargin-inline-start: -1px - $input-padding !important;\n\t\tpadding: $input-padding !important;\n\n\t\t&:active,\n\t\t&:focus,\n\t\t&:hover {\n\t\t\toutline: none;\n\t\t\tbackground-color: var(--color-main-background);\n\t\t\tcolor: var(--color-main-text);\n\t\t\tborder-color: var(--color-primary-element);\n\t\t}\n\t}\n}\n</style>\n"],"names":["_openBlock","_createElementBlock","_createElementVNode","_createVNode"],"mappings":";;;;;;;AAuDA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EAEN,YAAY;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA;EAGD,OAAO;AAAA;AAAA;AAAA;AAAA,IAIN,SAAS;AAAA,MACR,SAAS;AAAA,MACT,MAAM;AAAA;;;;IAMP,aAAa;AAAA,MACZ,SAAS;AAAA,MACT,MAAM;AAAA;;;;IAMP,YAAY;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA;;EAIR,OAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA;EAGD,OAAO;AACN,WAAO;AAAA,MACN,cAAc,EAAE,iBAAiB;AAAA,MACjC,aAAa,EAAE,gBAAgB;AAAA,IAChC;AAAA,EACD;AAAA,EAEA,UAAU;AAAA,IACT,YAAY;AAAA,MACX,MAAM;AAAE,eAAO,KAAK;AAAA,MAAW;AAAA,MAC/B,IAAI,UAAU;AACb,aAAK,MAAM,qBAAqB,QAAQ;AAAA,MACzC;AAAA;;EAIF,SAAS;AAAA,IACR,UAAU;AACT,WAAK,MAAM,SAAS;AAAA,IACrB;AAAA,IAEA,SAAS;AACR,WAAK,MAAM,QAAQ;AAAA,IACpB;AAAA,IAEA,aAAa;AACZ,WAAK,MAAM,MAAM,MAAK;AAAA,IACvB;AAAA;AAEF;AA/GM,MAAA,aAAA,EAAA,OAAM,+BAA8B;;;;;;AAAzC,SAAAA,UAAA,GAAAC,mBAgCM,OAhCN,YAgCM;AAAA,IA/BLC,mBA8BO,QAAA;AAAA,MA7BL,+DAAgB,SAAA,WAAA,SAAA,QAAA,GAAA,IAAA,GAAO,CAAA,SAAA,CAAA;AAAA,MACvB,yEAAgC,SAAA,UAAA,SAAA,OAAA,GAAA,IAAA,GAAM,CAAA,SAAA,QAAA,SAAA,CAAA,GAAA,CAAA,KAAA,CAAA;AAAA,MACtC,iDAAD,MAAA;AAAA,MAAA,GAAmB,CAAA,QAAA,SAAA,CAAA;AAAA;qBACnBA,mBAK4B,SAAA;AAAA,QAJ3B,KAAI;AAAA,qEACK,SAAA,aAAU;AAAA,QACnB,MAAK;AAAA,QACL,OAAM;AAAA,QACL,aAAa,OAAA;AAAA;qBAHL,SAAA,UAAU;AAAA;MAKpBC,YAQW,qBAAA;AAAA,QAPT,cAAY,MAAA;AAAA,QACb,MAAK;AAAA,QACL,SAAQ;AAAA,QACP,uBAAoB,SAAA,SAAO,CAAA,QAAA,SAAA,CAAA;AAAA;QACjB,cACV,MAA6B;AAAA,UAA7BA,YAA6B,2BAAA,EAAZ,MAAM,GAAE,CAAA;AAAA;;;MAI3BA,YAQW,qBAAA;AAAA,QAPT,cAAY,MAAA;AAAA,QACb,MAAK;AAAA,QACJ,SAAS,OAAA,UAAO,YAAA;AAAA,QAChB,uBAAoB,SAAA,QAAM,CAAA,QAAA,SAAA,CAAA;AAAA;QAChB,cACV,MAAwB;AAAA,UAAxBA,YAAwB,sBAAA,EAAZ,MAAM,GAAE,CAAA;AAAA;;;;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import '../assets/NcInputField-
|
|
1
|
+
import '../assets/NcInputField-DCpslX7k.css';
|
|
2
2
|
import { defineComponent, mergeModels, useModel, useAttrs, useTemplateRef, computed, warn, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createCommentVNode, withDirectives, createBlock, mergeProps, toDisplayString, renderSlot, vShow, withCtx, createTextVNode } from "vue";
|
|
3
|
-
import { d as mdiCheck,
|
|
3
|
+
import { d as mdiCheck, f as mdiAlertCircleOutline } from "./mdi-HQ-WBPmL.mjs";
|
|
4
4
|
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
5
5
|
import { i as isLegacy } from "./legacy-DcjXBL_t.mjs";
|
|
6
|
-
import { N as NcButton } from "./NcButton-
|
|
7
|
-
import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-
|
|
6
|
+
import { N as NcButton } from "./NcButton-ZNHdqKQl.mjs";
|
|
7
|
+
import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-BvLanNaW.mjs";
|
|
8
8
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
9
9
|
const _hoisted_1 = { class: "input-field__main-wrapper" };
|
|
10
10
|
const _hoisted_2 = ["id", "aria-describedby", "disabled", "placeholder", "type", "value"];
|
|
@@ -141,7 +141,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
141
141
|
path: unref(mdiCheck)
|
|
142
142
|
}, null, 8, ["path"])) : (openBlock(), createBlock(unref(NcIconSvgWrapper), {
|
|
143
143
|
key: 1,
|
|
144
|
-
path: unref(
|
|
144
|
+
path: unref(mdiAlertCircleOutline)
|
|
145
145
|
}, null, 8, ["path"]))
|
|
146
146
|
])) : createCommentVNode("", true)
|
|
147
147
|
]),
|
|
@@ -153,11 +153,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
153
153
|
_ctx.success ? (openBlock(), createBlock(unref(NcIconSvgWrapper), {
|
|
154
154
|
key: 0,
|
|
155
155
|
class: "input-field__helper-text-message__icon",
|
|
156
|
-
path: unref(mdiCheck)
|
|
156
|
+
path: unref(mdiCheck),
|
|
157
|
+
inline: ""
|
|
157
158
|
}, null, 8, ["path"])) : _ctx.error ? (openBlock(), createBlock(unref(NcIconSvgWrapper), {
|
|
158
159
|
key: 1,
|
|
159
160
|
class: "input-field__helper-text-message__icon",
|
|
160
|
-
path: unref(
|
|
161
|
+
path: unref(mdiAlertCircleOutline),
|
|
162
|
+
inline: ""
|
|
161
163
|
}, null, 8, ["path"])) : createCommentVNode("", true),
|
|
162
164
|
createTextVNode(" " + toDisplayString(_ctx.helperText), 1)
|
|
163
165
|
], 8, _hoisted_6)) : createCommentVNode("", true)
|
|
@@ -165,8 +167,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
165
167
|
};
|
|
166
168
|
}
|
|
167
169
|
});
|
|
168
|
-
const NcInputField = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
170
|
+
const NcInputField = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3487c05a"]]);
|
|
169
171
|
export {
|
|
170
172
|
NcInputField as N
|
|
171
173
|
};
|
|
172
|
-
//# sourceMappingURL=NcInputField-
|
|
174
|
+
//# sourceMappingURL=NcInputField-z8wpYKt2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NcInputField-z8wpYKt2.mjs","sources":["../../src/components/NcInputField/NcInputField.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Description\n\nThis component is used by the other Fields components.\nIt extends and styles an HTMLInputElement.\n\nYou cannot use it as is. This is here for documentation purposes.\nSee the other field components.\n\nFor a list of all available props and attributes, please check the [HTMLInputElement documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attributes)\n\n</docs>\n\n<script setup lang=\"ts\">\nimport type { Slot } from 'vue'\nimport type { VueClassType } from '../../utils/VueTypes.ts'\n\nimport { mdiAlertCircleOutline, mdiCheck } from '@mdi/js'\nimport { computed, useAttrs, useTemplateRef, warn } from 'vue'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport { isLegacy } from '../../utils/legacy.ts'\nimport NcButton from '../NcButton/index.ts'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/index.ts'\n\nexport interface NcInputFieldProps {\n\t/**\n\t * Class to add to the root component.\n\t */\n\tclass?: VueClassType\n\n\t/**\n\t * Class to add to the input field.\n\t * Necessary to use NcInputField in the NcActionInput component.\n\t */\n\tinputClass?: VueClassType\n\n\t/**\n\t * HTML id of the input field\n\t */\n\tid?: string\n\n\t/**\n\t * The input label, always provide one for accessibility purposes.\n\t * On Nextcloud before version 32 this will also be used as a placeholder unless the placeholder\n\t * prop is populated with a different string.\n\t *\n\t * Note: If the background color is not `--color-main-background` consider using an external label instead (see `labelOutside`).\n\t */\n\tlabel?: string\n\n\t/**\n\t * Pass in true if you want to use an external label. This is useful\n\t * if you need a label that looks different from the one provided by\n\t * this component\n\t */\n\tlabelOutside?: boolean\n\n\t/**\n\t * The type of the input element\n\t */\n\ttype?: 'text' | 'password' | 'email' | 'tel' | 'url' | 'search' | 'number'\n\n\t/**\n\t * The placeholder of the input.\n\t * On Nextcloud before version 32 this would default to the `label` prop.\n\t * On Nextcloud 32 and on v9 of this library it will no longer have a default value.\n\t */\n\tplaceholder?: string\n\n\t/**\n\t * Controls whether to display the trailing button.\n\t */\n\tshowTrailingButton?: boolean\n\n\t/**\n\t * Label of the trailing button\n\t *\n\t * Required when showTrailingButton is set\n\t */\n\ttrailingButtonLabel?: string\n\n\t/**\n\t * Toggles the success state of the component. Adds a checkmark icon.\n\t */\n\tsuccess?: boolean\n\n\t/**\n\t * Toggles the error state of the component. Adds an error icon.\n\t */\n\terror?: boolean\n\n\t/**\n\t * Additional helper text message\n\t *\n\t * This will be displayed beneath the input field. In case the field is\n\t * also marked as having an error, the text will be displayed in red.\n\t */\n\thelperText?: string\n\n\t/**\n\t * Disable the input field\n\t */\n\tdisabled?: boolean\n\n\t/**\n\t * Specifies whether the input should have a pill form.\n\t * By default, input has rounded corners.\n\t */\n\tpill?: boolean\n}\n\ndefineOptions({\n\tinheritAttrs: false,\n})\n\n/**\n * The value of the input field\n * If type is 'number' and a number is passed as value than the type of `update:value` will also be 'number'\n */\nconst modelValue = defineModel<string | number>({ required: true })\n\nconst props = withDefaults(defineProps<NcInputFieldProps>(), {\n\tclass: '',\n\thelperText: '',\n\tid: () => createElementId(),\n\tinputClass: '',\n\tlabel: undefined,\n\tplaceholder: undefined,\n\ttrailingButtonLabel: undefined,\n\ttype: 'text',\n})\n\nconst emit = defineEmits<{\n\ttrailingButtonClick: [event: MouseEvent]\n}>()\n\ndefineSlots<{\n\t/**\n\t * Leading icon, set the size to 20.\n\t */\n\ticon?: Slot\n\n\t/**\n\t * Icon for the trailing button.\n\t */\n\t'trailing-button-icon'?: Slot\n}>()\n\n// public API\ndefineExpose({\n\tfocus,\n\tselect,\n})\n\nconst attrs = useAttrs()\n\nconst inputElement = useTemplateRef('input')\n\nconst hasTrailingIcon = computed(() => props.showTrailingButton || props.success)\n\nconst internalPlaceholder = computed(() => {\n\tif (props.placeholder) {\n\t\treturn props.placeholder\n\t}\n\tif (props.label) {\n\t\t// if there is a label we use it as fallback on legacy but on current we need\n\t\t// to pass at least an empty string as placeholder to make css `:placeholder-shown` work.\n\t\treturn isLegacy ? props.label : ''\n\t}\n\treturn undefined\n})\n\nconst isValidLabel = computed(() => {\n\tconst isValidLabel = props.label || props.labelOutside\n\tif (!isValidLabel) {\n\t\twarn('You need to add a label to the NcInputField component. Either use the prop label or use an external one, as per the example in the documentation.')\n\t}\n\treturn isValidLabel\n})\n\nconst ariaDescribedby = computed(() => {\n\tconst ariaDescribedby: string[] = []\n\tif (props.helperText) {\n\t\tariaDescribedby.push(`${props.id}-helper-text`)\n\t}\n\tif (attrs['aria-describedby']) {\n\t\tariaDescribedby.push(String(attrs['aria-describedby']))\n\t}\n\treturn ariaDescribedby.join(' ') || undefined\n})\n\n/**\n * Focus the input element\n *\n * @param options - Focus options\n * @public\n */\nfunction focus(options?: FocusOptions) {\n\tinputElement.value!.focus(options)\n}\n\n/**\n * Select all the text in the input\n *\n * @public\n */\nfunction select() {\n\tinputElement.value!.select()\n}\n\n/**\n * Handle the input event of the HTML input.\n * Parses numbers in case of numeric type.\n *\n * @param event - The input event\n */\nfunction handleInput(event: Event) {\n\tconst target = event.target as HTMLInputElement\n\tmodelValue.value = props.type === 'number' && typeof modelValue.value === 'number'\n\t\t? parseFloat(target.value)\n\t\t: target.value\n}\n</script>\n\n<template>\n\t<div\n\t\tclass=\"input-field\"\n\t\t:class=\"[{\n\t\t\t'input-field--disabled': disabled,\n\t\t\t'input-field--error': error,\n\t\t\t'input-field--label-outside': labelOutside || !isValidLabel,\n\t\t\t'input-field--leading-icon': !!$slots.icon,\n\t\t\t'input-field--trailing-icon': hasTrailingIcon,\n\t\t\t'input-field--pill': pill,\n\t\t\t'input-field--success': success,\n\t\t\t'input-field--legacy': isLegacy,\n\t\t}, $props.class]\">\n\t\t<div class=\"input-field__main-wrapper\">\n\t\t\t<input\n\t\t\t\tv-bind=\"$attrs\"\n\t\t\t\t:id\n\t\t\t\tref=\"input\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\taria-live=\"polite\"\n\t\t\t\tclass=\"input-field__input\"\n\t\t\t\t:class=\"inputClass\"\n\t\t\t\t:disabled\n\t\t\t\t:placeholder=\"internalPlaceholder\"\n\t\t\t\t:type\n\t\t\t\t:value=\"modelValue.toString()\"\n\t\t\t\t@input=\"handleInput\">\n\t\t\t<!-- Label -->\n\t\t\t<label\n\t\t\t\tv-if=\"!labelOutside && isValidLabel\"\n\t\t\t\tclass=\"input-field__label\"\n\t\t\t\t:for=\"id\">\n\t\t\t\t{{ label }}\n\t\t\t</label>\n\n\t\t\t<!-- Leading icon -->\n\t\t\t<div v-show=\"!!$slots.icon\" class=\"input-field__icon input-field__icon--leading\">\n\t\t\t\t<slot name=\"icon\" />\n\t\t\t</div>\n\n\t\t\t<!-- trailing button -->\n\t\t\t<NcButton\n\t\t\t\tv-if=\"showTrailingButton\"\n\t\t\t\tclass=\"input-field__trailing-button\"\n\t\t\t\t:aria-label=\"trailingButtonLabel\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\tvariant=\"tertiary-no-background\"\n\t\t\t\t@click=\"emit('trailingButtonClick', $event)\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<slot name=\"trailing-button-icon\" />\n\t\t\t\t</template>\n\t\t\t</NcButton>\n\n\t\t\t<!-- Success and error icons -->\n\t\t\t<div\n\t\t\t\tv-else-if=\"success || error\"\n\t\t\t\tclass=\"input-field__icon input-field__icon--trailing\">\n\t\t\t\t<NcIconSvgWrapper v-if=\"success\" :path=\"mdiCheck\" />\n\t\t\t\t<NcIconSvgWrapper v-else :path=\"mdiAlertCircleOutline\" />\n\t\t\t</div>\n\t\t</div>\n\t\t<p\n\t\t\tv-if=\"helperText\"\n\t\t\t:id=\"`${id}-helper-text`\"\n\t\t\tclass=\"input-field__helper-text-message\">\n\t\t\t<NcIconSvgWrapper\n\t\t\t\tv-if=\"success\"\n\t\t\t\tclass=\"input-field__helper-text-message__icon\"\n\t\t\t\t:path=\"mdiCheck\"\n\t\t\t\tinline />\n\t\t\t<NcIconSvgWrapper\n\t\t\t\tv-else-if=\"error\"\n\t\t\t\tclass=\"input-field__helper-text-message__icon\"\n\t\t\t\t:path=\"mdiAlertCircleOutline\"\n\t\t\t\tinline />\n\t\t\t{{ helperText }}\n\t\t</p>\n\t</div>\n</template>\n\n<style lang=\"scss\" scoped>\n\n.input-field {\n\t--input-border-color: var(--color-border-maxcontrast);\n\t--input-border-radius: var(--border-radius-element);\n\t// Used e.g. if border width differs between focused and unfocused we need to compensate to prevent jumping\n\t--input-border-width-offset: calc(var(--border-width-input-focused, 2px) - var(--border-width-input, 2px));\n\t// The padding before the input can start (leading button or border)\n\t--input-padding-start: var(--border-radius-element);\n\t// The padding where the input has to end (trailing button or border)\n\t--input-padding-end: var(--border-radius-element);\n\t// positional styles\n\tposition: relative;\n\twidth: 100%;\n\tmargin-block-start: 6px; // for the label in active state\n\n\t&--disabled {\n\t\topacity: 0.4;\n\t\tfilter: saturate(0.4);\n\t}\n\n\t// If there is no internal label we reset the margin reserved for it\n\t&--label-outside {\n\t\tmargin-block-start: 0;\n\t}\n\n\t&--leading-icon {\n\t\t--input-padding-start: calc(var(--default-clickable-area) - var(--default-grid-baseline));\n\t}\n\n\t&--trailing-icon {\n\t\t--input-padding-end: calc(var(--default-clickable-area) - var(--default-grid-baseline));\n\t}\n\n\t&--pill {\n\t\t--input-border-radius: var(--border-radius-pill);\n\t}\n\n\t&__main-wrapper {\n\t\theight: var(--default-clickable-area);\n\t\tpadding: var(--border-width-input, 2px);\n\t\tposition: relative;\n\n\t\t&:not(:has([disabled])):has(input:focus),\n\t\t&:not(:has([disabled])):has(input:active) {\n\t\t\tpadding: 0;\n\t\t}\n\t}\n\n\t&__input {\n\t\tbackground-color: var(--color-main-background);\n\t\tcolor: var(--color-main-text);\n\t\tborder: none;\n\t\tborder-radius: var(--input-border-radius);\n\t\tbox-shadow:\n\t\t\t0 -1px var(--input-border-color),\n\t\t\t0 0 0 1px color-mix(in srgb, var(--input-border-color), 65% transparent);\n\n\t\tcursor: pointer;\n\t\t-webkit-appearance: textfield !important;\n\t\t-moz-appearance: textfield !important;\n\t\tappearance: textfield !important;\n\n\t\tfont-size: var(--default-font-size);\n\t\ttext-overflow: ellipsis;\n\n\t\theight: 100% !important;\n\t\tmin-height: unset;\n\t\twidth: 100%;\n\t\tpadding-block: var(--input-border-width-offset);\n\t\tpadding-inline: calc(var(--input-padding-start) + var(--input-border-width-offset)) calc(var(--input-padding-end) + var(--input-border-width-offset));\n\n\t\t&::placeholder {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\n\t\t// prevent Blink and WebKit to add an additional button when type is set to search\n\t\t// we have our properly styled trailing button anyways.\n\t\t&::-webkit-search-cancel-button {\n\t\t\t// its a weird bug in Blink that this rule must not be grouped with the other selectors below.\n\t\t\t// otherwise it is not recognized by Blink\n\t\t\tdisplay: none;\n\t\t}\n\t\t&::-webkit-search-decoration,\n\t\t&::-webkit-search-results-button,\n\t\t&::-webkit-search-results-decoration,\n\t\t&::-ms-clear {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t&:hover:not([disabled]) {\n\t\t\tbox-shadow: 0 0 0 1px var(--input-border-color);;\n\t\t}\n\n\t\t&:active:not([disabled]),\n\t\t&:focus:not([disabled]) {\n\t\t\t--input-border-color: var(--color-main-text);\n\t\t\t// Reset padding offset when focused\n\t\t\t--input-border-width-offset: 0px;\n\t\t\tborder: var(--border-width-input-focused, 2px) solid var(--input-border-color);\n\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\t\t}\n\n\t\t&:focus + .input-field__label,\n\t\t&:hover:not(:placeholder-shown) + .input-field__label {\n\t\t\tcolor: var(--color-main-text);\n\t\t}\n\n\t\t&:focus {\n\t\t\tcursor: text;\n\t\t}\n\n\t\t&:disabled {\n\t\t\tcursor: default;\n\t\t}\n\n\t\t&:focus-visible {\n\t\t\tbox-shadow: unset !important; // Override server rules\n\t\t}\n\t}\n\n\t// Hide placeholder while not focussed -> show label instead (only if internal label is used)\n\t&:not(&--label-outside) &__input:not(:focus)::placeholder {\n\t\topacity: 0;\n\t}\n\n\t&__label {\n\t\t--input-label-font-size: var(--default-font-size);\n\t\tfont-size: var(--input-label-font-size);\n\n\t\tposition: absolute;\n\t\tmargin-inline: var(--input-padding-start) var(--input-padding-end);\n\t\tmax-width: fit-content;\n\t\tinset-block-start: calc((var(--default-clickable-area) - 1lh) / 2); // center the label vertically\n\t\tinset-inline: var(--border-width-input-focused, 2px);\n\n\t\t// Fix color so that users do not think the input already has content\n\t\tcolor: var(--color-text-maxcontrast);\n\t\t// only one line labels are allowed\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\t// forward events to input\n\t\tpointer-events: none;\n\t\t// Position transition\n\t\ttransition: height var(--animation-quick), inset-block-start var(--animation-quick), font-size var(--animation-quick), color var(--animation-quick), background-color var(--animation-quick) var(--animation-slow);\n\t}\n\n\t&__input:focus + &__label,\n\t&__input:not(:placeholder-shown) + &__label {\n\t\t--input-label-font-size: 13px; // minimum allowed font size for accessibility\n\t\tline-height: 1.5; // minimum allowed line height for accessibility\n\t\t// 1.5 * font-size = line-height; line-height / 2 for centering and make it negative as we need to move outside the element\n\t\tinset-block-start: calc(-1.5 * var(--input-label-font-size) / 2);\n\t\tfont-weight: 500;\n\t\tborder-radius: var(--default-grid-baseline) var(--default-grid-baseline) 0 0;\n\t\tbackground-color: var(--color-main-background);\n\t\tpadding-inline: var(--default-grid-baseline);\n\t\tmargin-inline: calc(var(--input-padding-start) - var(--default-grid-baseline)) calc(var(--input-padding-end) - var(--default-grid-baseline));\n\n\t\ttransition: height var(--animation-quick), inset-block-start var(--animation-quick), font-size var(--animation-quick), color var(--animation-quick);\n\t}\n\n\t&__icon {\n\t\tposition: absolute;\n\t\theight: var(--default-clickable-area);\n\t\twidth: var(--default-clickable-area);\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\topacity: 0.7;\n\n\t\tinset-block-end: 0;\n\n\t\t&--leading {\n\t\t\tinset-inline-start: 0px;\n\t\t}\n\n\t\t&--trailing {\n\t\t\tinset-inline-end: 0px;\n\t\t}\n\t}\n\n\t&__trailing-button {\n\t\t--button-size: calc(var(--default-clickable-area) - 2 * var(--border-width-input-focused, 2px)) !important;\n\t\t--button-radius: calc(var(--input-border-radius) - var(--border-width-input-focused, 2px)); // lower radius as size is smaller\n\n\t\t&.button-vue {\n\t\t\tposition: absolute;\n\t\t\ttop: var(--border-width-input-focused, 2px);\n\t\t\tinset-inline-end: var(--border-width-input-focused, 2px);\n\n\t\t\t&:focus-visible {\n\t\t\t\tbox-shadow: none !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__helper-text-message {\n\t\tpadding-block: 4px;\n\t\tpadding-inline: var(--border-radius-element);\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tcolor: var(--color-text-maxcontrast);\n\n\t\t&__icon {\n\t\t\tmargin-inline-end: 8px;\n\t\t}\n\t}\n\n\t&--error {\n\t\t.input-field__helper-text-message,\n\t\t.input-field__icon--trailing {\n\t\t\tcolor: var(--color-text-error, var(--color-error));\n\t\t}\n\t}\n\n\t&--error .input-field__input,\n\t&__input:user-invalid {\n\t\t--input-border-color: var(--color-border-error, var(--color-error)) !important; //Override hover border color\n\t\t&:focus-visible {\n\t\t\tbox-shadow: rgb(248, 250, 252) 0px 0px 0px 2px, var(--color-primary-element) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px\n\t\t}\n\t}\n\n\t&--success {\n\t\t.input-field__input {\n\t\t\t--input-border-color: var(--color-border-success, var(--color-success)) !important; //Override hover border color\n\t\t\t&:focus-visible {\n\t\t\t\tbox-shadow: rgb(248, 250, 252) 0px 0px 0px 2px, var(--color-primary-element) 0px 0px 0px 4px, rgba(0, 0, 0, 0.05) 0px 1px 2px 0px\n\t\t\t}\n\t\t}\n\t\t.input-field__helper-text-message__icon {\n\t\t\tcolor: var(--color-border-success, var(--color-success));\n\t\t}\n\t}\n\n\t&--legacy {\n\t\t.input-field__input {\n\t\t\tbox-shadow: 0 0 0 1px var(--input-border-color) inset;\n\t\t}\n\n\t\t.input-field__main-wrapper:hover:not(:has([disabled])) {\n\t\t\tpadding: 0;\n\n\t\t\t.input-field__input {\n\t\t\t\t--input-border-color: var(--color-main-text);\n\t\t\t\t// Reset padding offset when focused\n\t\t\t\t--input-border-width-offset: 0px;\n\t\t\t\tborder: var(--border-width-input-focused, 2px) solid var(--input-border-color);\n\t\t\t\tbox-shadow: 0 0 0 2px var(--color-main-background) !important;\n\t\t\t}\n\t\t}\n\t}\n}\n</style>\n"],"names":["_useModel","isValidLabel","ariaDescribedby","_createElementBlock","disabled","error","labelOutside","$slots","pill","success","_unref","$props","_createElementVNode","_mergeProps","id","inputClass","type","label","_withDirectives","_renderSlot","showTrailingButton","_createBlock","trailingButtonLabel","_openBlock","helperText","_createTextVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AApCe,WAAoC,KAAA,QAAA,wBAAA,CAAA,GAAA,QAAA,IAAA;AAAA,YAAA;;+CAM1BV,KAAAA,WAAWJ,KAAAA,SADvBkB,UAAA,GAAApB,mBAKM,OALN,YAKM;AAAA,YAFmBM,KAAAA,wBAAxBY,YAAoDX,MAAA,gBAAA,GAAA;AAAA;cAAlB,MAAMA,MAAA,QAAA;AAAA,YAAA,uCACxCW,YAAyDX,MAAA,gBAAA,GAAA;AAAA;cAA/B,MAAMA,MAAA,qBAAA;AAAA,YAAA;;;QAI3Bc,KAAAA,2BADPrB,mBAeI,KAAA;AAAA;UAbF,OAAOW,KAAAA,EAAE;AAAA,UACV,OAAM;AAAA,QAAA;UAECL,KAAAA,wBADPY,YAIUX,MAAA,gBAAA,GAAA;AAAA;YAFT,OAAM;AAAA,YACL,MAAMA,MAAA,QAAA;AAAA,YACP,QAAA;AAAA,UAAA,yBAEWL,KAAAA,sBADZgB,YAIUX,MAAA,gBAAA,GAAA;AAAA;YAFT,OAAM;AAAA,YACL,MAAMA,MAAA,qBAAA;AAAA,YACP,QAAA;AAAA,UAAA;UAASe,gBAAA,sBACPD,KAAAA,UAAU,GAAA,CAAA;AAAA,QAAA;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/NcKbd-BGW1_Jb7.css';
|
|
2
2
|
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString } from "vue";
|
|
3
|
-
import { r as register, a as t } from "./_l10n
|
|
3
|
+
import { r as register, a as t } from "./_l10n-CWKr1fUH.mjs";
|
|
4
4
|
import { i as isMac } from "./platform-CC2ecGvV.mjs";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
6
6
|
register();
|
|
@@ -50,4 +50,4 @@ const NcKbd = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModule
|
|
|
50
50
|
export {
|
|
51
51
|
NcKbd as N
|
|
52
52
|
};
|
|
53
|
-
//# sourceMappingURL=NcKbd-
|
|
53
|
+
//# sourceMappingURL=NcKbd-D6pM7aJM.mjs.map
|