@nextcloud/vue 9.0.0-rc.7 → 9.0.0-rc.8
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 +13 -2
- package/dist/assets/NcAssistantButton-owGSr0s0.css +54 -0
- package/dist/assets/NcAssistantContent-Ban7n3Bg.css +31 -0
- package/dist/assets/NcAssistantIcon-enm3hmNH.css +35 -0
- package/dist/assets/NcKbd-BGW1_Jb7.css +36 -0
- package/dist/chunks/{NcActionButton-DseKq57Q.mjs → NcActionButton-D8JTFCmI.mjs} +2 -2
- package/dist/chunks/{NcActionButton-DseKq57Q.mjs.map → NcActionButton-D8JTFCmI.mjs.map} +1 -1
- package/dist/chunks/{NcActionButtonGroup-eJGS5If0.mjs → NcActionButtonGroup-CGlX8G9k.mjs} +2 -2
- package/dist/chunks/{NcActionButtonGroup-eJGS5If0.mjs.map → NcActionButtonGroup-CGlX8G9k.mjs.map} +1 -1
- package/dist/chunks/{NcActionInput-Cby01w-7.mjs → NcActionInput-Cpc7x0jw.mjs} +6 -6
- package/dist/chunks/{NcActionInput-Cby01w-7.mjs.map → NcActionInput-Cpc7x0jw.mjs.map} +1 -1
- package/dist/chunks/{NcActionTextEditable-CoAscywz.mjs → NcActionTextEditable-S_T11-QF.mjs} +2 -2
- package/dist/chunks/{NcActionTextEditable-CoAscywz.mjs.map → NcActionTextEditable-S_T11-QF.mjs.map} +1 -1
- package/dist/chunks/{NcActions-BOqfKgN5.mjs → NcActions-C-9GKofj.mjs} +2 -2
- package/dist/chunks/{NcActions-BOqfKgN5.mjs.map → NcActions-C-9GKofj.mjs.map} +1 -1
- package/dist/chunks/{NcAppContent-CBiklfOg.mjs → NcAppContent-CP5xxOdG.mjs} +3 -3
- package/dist/chunks/{NcAppContent-CBiklfOg.mjs.map → NcAppContent-CP5xxOdG.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigation-VmhZBTF5.mjs → NcAppNavigation-OWHt-bzI.mjs} +3 -3
- package/dist/chunks/{NcAppNavigation-VmhZBTF5.mjs.map → NcAppNavigation-OWHt-bzI.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationCaption-zs07YHtS.mjs → NcAppNavigationCaption-BIiGAQjI.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationCaption-zs07YHtS.mjs.map → NcAppNavigationCaption-BIiGAQjI.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationItem-DpimA76Q.mjs → NcAppNavigationItem-Bhlr9-Yy.mjs} +7 -7
- package/dist/chunks/{NcAppNavigationItem-DpimA76Q.mjs.map → NcAppNavigationItem-Bhlr9-Yy.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationNewItem-CkWp0oFr.mjs → NcAppNavigationNewItem-K0PCYJ22.mjs} +2 -2
- package/dist/chunks/{NcAppNavigationNewItem-CkWp0oFr.mjs.map → NcAppNavigationNewItem-K0PCYJ22.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSearch-Cs14jpSe.mjs → NcAppNavigationSearch-kjDvgdYf.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationSearch-Cs14jpSe.mjs.map → NcAppNavigationSearch-kjDvgdYf.mjs.map} +1 -1
- package/dist/chunks/{NcAppNavigationSettings-D_u5pIPX.mjs → NcAppNavigationSettings-BQFluWDn.mjs} +3 -3
- package/dist/chunks/{NcAppNavigationSettings-D_u5pIPX.mjs.map → NcAppNavigationSettings-BQFluWDn.mjs.map} +1 -1
- package/dist/chunks/{NcAppSettingsDialog-Dy2SrGfl.mjs → NcAppSettingsDialog-ZKhCQoKY.mjs} +4 -4
- package/dist/chunks/{NcAppSettingsDialog-Dy2SrGfl.mjs.map → NcAppSettingsDialog-ZKhCQoKY.mjs.map} +1 -1
- package/dist/chunks/{NcAppSidebar-BNTlPC1G.mjs → NcAppSidebar-BoLgS15q.mjs} +5 -5
- package/dist/chunks/{NcAppSidebar-BNTlPC1G.mjs.map → NcAppSidebar-BoLgS15q.mjs.map} +1 -1
- package/dist/chunks/NcAssistantButton-Kwow0k_v.mjs +79 -0
- package/dist/chunks/NcAssistantButton-Kwow0k_v.mjs.map +1 -0
- package/dist/chunks/NcAssistantContent-Boi-0v_0.mjs +37 -0
- package/dist/chunks/NcAssistantContent-Boi-0v_0.mjs.map +1 -0
- package/dist/chunks/NcAssistantIcon-DY9tm4Sl.mjs +73 -0
- package/dist/chunks/NcAssistantIcon-DY9tm4Sl.mjs.map +1 -0
- package/dist/chunks/{NcAvatar-42dhVtul.mjs → NcAvatar-CPVozEHO.mjs} +6 -6
- package/dist/chunks/{NcAvatar-42dhVtul.mjs.map → NcAvatar-CPVozEHO.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumb-C86Yxww0.mjs → NcBreadcrumb-B-HF8Noh.mjs} +2 -2
- package/dist/chunks/{NcBreadcrumb-C86Yxww0.mjs.map → NcBreadcrumb-B-HF8Noh.mjs.map} +1 -1
- package/dist/chunks/{NcBreadcrumbs-BTFyDGO2.mjs → NcBreadcrumbs-nKqdFMy0.mjs} +4 -4
- package/dist/chunks/{NcBreadcrumbs-BTFyDGO2.mjs.map → NcBreadcrumbs-nKqdFMy0.mjs.map} +1 -1
- package/dist/chunks/{NcCheckboxRadioSwitch-iCknuL0_.mjs → NcCheckboxRadioSwitch-CRlf97Dl.mjs} +2 -2
- package/dist/chunks/{NcCheckboxRadioSwitch-iCknuL0_.mjs.map → NcCheckboxRadioSwitch-CRlf97Dl.mjs.map} +1 -1
- package/dist/chunks/{NcChip-Dplke0gD.mjs → NcChip-3ptRwyOJ.mjs} +5 -5
- package/dist/chunks/{NcChip-Dplke0gD.mjs.map → NcChip-3ptRwyOJ.mjs.map} +1 -1
- package/dist/chunks/{NcCollectionList-IC-VyCa-.mjs → NcCollectionList-CsJJr7Rh.mjs} +7 -7
- package/dist/chunks/{NcCollectionList-IC-VyCa-.mjs.map → NcCollectionList-CsJJr7Rh.mjs.map} +1 -1
- package/dist/chunks/{NcColorPicker-BPd1i3-9.mjs → NcColorPicker-87VzdyIQ.mjs} +4 -4
- package/dist/chunks/{NcColorPicker-BPd1i3-9.mjs.map → NcColorPicker-87VzdyIQ.mjs.map} +1 -1
- package/dist/chunks/{NcContent-BAiLhI_2.mjs → NcContent-DB9wS8js.mjs} +2 -2
- package/dist/chunks/{NcContent-BAiLhI_2.mjs.map → NcContent-DB9wS8js.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidget-P6DhIXT2.mjs → NcDashboardWidget-DyyqskXw.mjs} +5 -5
- package/dist/chunks/{NcDashboardWidget-P6DhIXT2.mjs.map → NcDashboardWidget-DyyqskXw.mjs.map} +1 -1
- package/dist/chunks/{NcDashboardWidgetItem-GGmhjTfk.mjs → NcDashboardWidgetItem-C96lNnd5.mjs} +4 -4
- package/dist/chunks/{NcDashboardWidgetItem-GGmhjTfk.mjs.map → NcDashboardWidgetItem-C96lNnd5.mjs.map} +1 -1
- package/dist/chunks/{NcDateTimePicker-DmeWERxv.mjs → NcDateTimePicker-D3sxU3Gr.mjs} +4 -4
- package/dist/chunks/{NcDateTimePicker-DmeWERxv.mjs.map → NcDateTimePicker-D3sxU3Gr.mjs.map} +1 -1
- package/dist/chunks/{NcDateTimePickerNative-BiU3SIRj.mjs → NcDateTimePickerNative-CzbBXsBL.mjs} +2 -2
- package/dist/chunks/{NcDateTimePickerNative-BiU3SIRj.mjs.map → NcDateTimePickerNative-CzbBXsBL.mjs.map} +1 -1
- package/dist/chunks/{NcDialog-DmKbeOcJ.mjs → NcDialog-Dh9AA41u.mjs} +3 -3
- package/dist/chunks/{NcDialog-DmKbeOcJ.mjs.map → NcDialog-Dh9AA41u.mjs.map} +1 -1
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-BvBSeEuo.mjs → NcDialogButton.vue_vue_type_script_setup_true_lang-C8cSUgHJ.mjs} +2 -2
- package/dist/chunks/{NcDialogButton.vue_vue_type_script_setup_true_lang-BvBSeEuo.mjs.map → NcDialogButton.vue_vue_type_script_setup_true_lang-C8cSUgHJ.mjs.map} +1 -1
- package/dist/chunks/{NcEmojiPicker-VUnUOWfg.mjs → NcEmojiPicker-CjRa0HIg.mjs} +6 -6
- package/dist/chunks/{NcEmojiPicker-VUnUOWfg.mjs.map → NcEmojiPicker-CjRa0HIg.mjs.map} +1 -1
- package/dist/chunks/{NcInputConfirmCancel-DC6lvX7Z.mjs → NcInputConfirmCancel-DXq3bo7Q.mjs} +3 -3
- package/dist/chunks/{NcInputConfirmCancel-DC6lvX7Z.mjs.map → NcInputConfirmCancel-DXq3bo7Q.mjs.map} +1 -1
- package/dist/chunks/{NcInputField-DugqxUR2.mjs → NcInputField-BWhRRLNR.mjs} +2 -2
- package/dist/chunks/{NcInputField-DugqxUR2.mjs.map → NcInputField-BWhRRLNR.mjs.map} +1 -1
- package/dist/chunks/NcKbd-CqQU-PZg.mjs +53 -0
- package/dist/chunks/NcKbd-CqQU-PZg.mjs.map +1 -0
- package/dist/chunks/{NcListItem-C2YXq4EL.mjs → NcListItem-DGiLAMD1.mjs} +2 -2
- package/dist/chunks/{NcListItem-C2YXq4EL.mjs.map → NcListItem-DGiLAMD1.mjs.map} +1 -1
- package/dist/chunks/{NcListItemIcon-Du1PyhkH.mjs → NcListItemIcon-rnITYj4f.mjs} +2 -2
- package/dist/chunks/{NcListItemIcon-Du1PyhkH.mjs.map → NcListItemIcon-rnITYj4f.mjs.map} +1 -1
- package/dist/chunks/{NcModal-Jb_FjSoh.mjs → NcModal-DKjyRKQe.mjs} +5 -5
- package/dist/chunks/{NcModal-Jb_FjSoh.mjs.map → NcModal-DKjyRKQe.mjs.map} +1 -1
- package/dist/chunks/{NcNoteCard-BBnJMdJu.mjs → NcNoteCard-glxPCBcu.mjs} +2 -2
- package/dist/chunks/{NcNoteCard-BBnJMdJu.mjs.map → NcNoteCard-glxPCBcu.mjs.map} +1 -1
- package/dist/chunks/{NcPasswordField-F-JcomYe.mjs → NcPasswordField-DhEpicKu.mjs} +4 -4
- package/dist/chunks/{NcPasswordField-F-JcomYe.mjs.map → NcPasswordField-DhEpicKu.mjs.map} +1 -1
- package/dist/chunks/{NcRelatedResourcesPanel-BpH5XQ76.mjs → NcRelatedResourcesPanel-BwgCfCFg.mjs} +5 -5
- package/dist/chunks/{NcRelatedResourcesPanel-BpH5XQ76.mjs.map → NcRelatedResourcesPanel-BwgCfCFg.mjs.map} +1 -1
- package/dist/chunks/{NcRichContenteditable-CknkQPrW.mjs → NcRichContenteditable-DOMXD-CS.mjs} +11 -11
- package/dist/chunks/{NcRichContenteditable-CknkQPrW.mjs.map → NcRichContenteditable-DOMXD-CS.mjs.map} +1 -1
- package/dist/chunks/{NcRichText-4S-Bcw6_.mjs → NcRichText-CJrRYUBW.mjs} +3 -3
- package/dist/chunks/{NcRichText-4S-Bcw6_.mjs.map → NcRichText-CJrRYUBW.mjs.map} +1 -1
- package/dist/chunks/{NcSelect-CqmU4nl3.mjs → NcSelect-CrWaLc3g.mjs} +3 -3
- package/dist/chunks/{NcSelect-CqmU4nl3.mjs.map → NcSelect-CrWaLc3g.mjs.map} +1 -1
- package/dist/chunks/{NcSelectTags-CcsDvt0V.mjs → NcSelectTags-CLiI4vpg.mjs} +3 -3
- package/dist/chunks/{NcSelectTags-CcsDvt0V.mjs.map → NcSelectTags-CLiI4vpg.mjs.map} +1 -1
- package/dist/chunks/{NcSelectUsers-BLzx7FTX.mjs → NcSelectUsers-a2UR2pv4.mjs} +3 -3
- package/dist/chunks/{NcSelectUsers-BLzx7FTX.mjs.map → NcSelectUsers-a2UR2pv4.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsInputText-BmOtUODF.mjs → NcSettingsInputText-YzmvMkAV.mjs} +3 -3
- package/dist/chunks/{NcSettingsInputText-BmOtUODF.mjs.map → NcSettingsInputText-YzmvMkAV.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSection-B1XS0NQu.mjs → NcSettingsSection-BKoxl0aj.mjs} +2 -2
- package/dist/chunks/{NcSettingsSection-B1XS0NQu.mjs.map → NcSettingsSection-BKoxl0aj.mjs.map} +1 -1
- package/dist/chunks/{NcSettingsSelectGroup-BmtDlJ3e.mjs → NcSettingsSelectGroup-CaU1cE30.mjs} +4 -4
- package/dist/chunks/{NcSettingsSelectGroup-BmtDlJ3e.mjs.map → NcSettingsSelectGroup-CaU1cE30.mjs.map} +1 -1
- package/dist/chunks/{NcTextArea-CLM4W-yg.mjs → NcTextArea-DeoDvFwH.mjs} +2 -2
- package/dist/chunks/{NcTextArea-CLM4W-yg.mjs.map → NcTextArea-DeoDvFwH.mjs.map} +1 -1
- package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-BN-Pgz4E.mjs → NcTextField.vue_vue_type_script_setup_true_lang-Deo569jY.mjs} +4 -4
- package/dist/chunks/{NcTextField.vue_vue_type_script_setup_true_lang-BN-Pgz4E.mjs.map → NcTextField.vue_vue_type_script_setup_true_lang-Deo569jY.mjs.map} +1 -1
- package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-CERjSiE5.mjs → NcTimezonePicker.vue_vue_type_script_setup_true_lang-NZWpDFzm.mjs} +3 -3
- package/dist/chunks/{NcTimezonePicker.vue_vue_type_script_setup_true_lang-CERjSiE5.mjs.map → NcTimezonePicker.vue_vue_type_script_setup_true_lang-NZWpDFzm.mjs.map} +1 -1
- package/dist/chunks/{NcUserBubble-CxGixaPY.mjs → NcUserBubble-LsKBmWoL.mjs} +2 -2
- package/dist/chunks/{NcUserBubble-CxGixaPY.mjs.map → NcUserBubble-LsKBmWoL.mjs.map} +1 -1
- package/dist/chunks/{NcUserStatusIcon-BUBFkE3m.mjs → NcUserStatusIcon-VcPl-lLQ.mjs} +3 -3
- package/dist/chunks/{NcUserStatusIcon-BUBFkE3m.mjs.map → NcUserStatusIcon-VcPl-lLQ.mjs.map} +1 -1
- package/dist/chunks/{_l10n-CiWgAjJZ.mjs → _l10n-C6k5LExr.mjs} +59 -59
- package/dist/chunks/_l10n-C6k5LExr.mjs.map +1 -0
- package/dist/chunks/{colors-C_np5wf3.mjs → colors-Dm63yanX.mjs} +2 -2
- package/dist/chunks/{colors-C_np5wf3.mjs.map → colors-Dm63yanX.mjs.map} +1 -1
- package/dist/chunks/{mdi-DXaZM2k3.mjs → mdi-D_GPbmUY.mjs} +16 -14
- package/dist/chunks/{mdi-DXaZM2k3.mjs.map → mdi-D_GPbmUY.mjs.map} +1 -1
- package/dist/chunks/platform-CC2ecGvV.mjs +5 -0
- package/dist/chunks/platform-CC2ecGvV.mjs.map +1 -0
- package/dist/chunks/{referencePickerModal-tSRu6940.mjs → referencePickerModal-mYCXgzX-.mjs} +12 -12
- package/dist/chunks/{referencePickerModal-tSRu6940.mjs.map → referencePickerModal-mYCXgzX-.mjs.map} +1 -1
- 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/index.mjs +1 -1
- package/dist/components/NcAppContent/index.mjs +1 -1
- package/dist/components/NcAppNavigation/index.mjs +1 -1
- package/dist/components/NcAppNavigationCaption/index.mjs +1 -1
- package/dist/components/NcAppNavigationItem/index.mjs +1 -1
- package/dist/components/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/index.mjs +1 -1
- package/dist/components/NcAppSidebar/index.mjs +1 -1
- package/dist/components/NcAssistantButton/NcAssistantButton.vue.d.ts +42 -0
- package/dist/components/NcAssistantButton/index.d.ts +5 -0
- package/dist/components/NcAssistantButton/index.mjs +5 -0
- package/dist/components/NcAssistantButton/index.mjs.map +1 -0
- package/dist/components/NcAssistantContent/NcAssistantContent.vue.d.ts +35 -0
- package/dist/components/NcAssistantContent/index.d.ts +5 -0
- package/dist/components/NcAssistantContent/index.mjs +5 -0
- package/dist/components/NcAssistantContent/index.mjs.map +1 -0
- package/dist/components/NcAssistantIcon/NcAssistantIcon.vue.d.ts +17 -0
- package/dist/components/NcAssistantIcon/index.d.ts +5 -0
- package/dist/components/NcAssistantIcon/index.mjs +5 -0
- package/dist/components/NcAssistantIcon/index.mjs.map +1 -0
- package/dist/components/NcAvatar/index.mjs +1 -1
- package/dist/components/NcBreadcrumb/index.mjs +1 -1
- package/dist/components/NcBreadcrumbs/index.mjs +1 -1
- package/dist/components/NcCheckboxRadioSwitch/index.mjs +1 -1
- package/dist/components/NcChip/index.mjs +1 -1
- 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/index.mjs +1 -1
- 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/NcInputField/index.mjs +1 -1
- package/dist/components/NcKbd/NcKbd.vue.d.ts +32 -0
- package/dist/components/NcKbd/index.d.ts +1 -0
- package/dist/components/NcKbd/index.mjs +5 -0
- package/dist/components/NcKbd/index.mjs.map +1 -0
- package/dist/components/NcListItem/index.mjs +1 -1
- 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/index.mjs +3 -3
- package/dist/components/NcSelect/index.mjs +1 -1
- package/dist/components/NcSelectTags/index.mjs +1 -1
- package/dist/components/NcSelectUsers/index.mjs +1 -1
- package/dist/components/NcSettingsInputText/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/index.d.ts +4 -0
- package/dist/composables/useFormatDateTime/index.mjs +1 -1
- package/dist/composables/useHotKey/index.mjs +1 -1
- package/dist/composables/useHotKey/index.mjs.map +1 -1
- package/dist/functions/reference/index.mjs +1 -1
- package/dist/functions/usernameToColor/index.mjs +1 -1
- package/dist/index.mjs +116 -108
- package/dist/index.mjs.map +1 -1
- package/dist/utils/platform.d.ts +1 -0
- package/package.json +2 -2
- package/dist/chunks/_l10n-CiWgAjJZ.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcAppNavigation-VmhZBTF5.mjs","sources":["../../src/components/NcAppNavigation/NcAppNavigationToggle.vue","../../src/components/NcAppNavigation/NcAppNavigation.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n -->\n\n<script setup lang=\"ts\">\nimport { mdiMenu, mdiMenuOpen } from '@mdi/js'\nimport { computed } from 'vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport { t } from '../../l10n.ts'\nimport NcButton from '../NcButton/index.ts'\n\n/**\n * Tracks whether the toggle has been clicked or not.\n * If it has been clicked, switches between the different MenuIcons\n * and emits a boolean indicating its opened status\n */\nconst open = defineModel<boolean>('open', { required: true })\n\nconst title = computed(() => open.value ? t('Close navigation') : t('Open navigation'))\n</script>\n\n<template>\n\t<div class=\"app-navigation-toggle-wrapper\">\n\t\t<NcButton\n\t\t\tclass=\"app-navigation-toggle\"\n\t\t\taria-controls=\"app-navigation-vue\"\n\t\t\t:aria-expanded=\"open ? 'true' : 'false'\"\n\t\t\t:aria-label=\"title\"\n\t\t\t:title\n\t\t\tvariant=\"tertiary\"\n\t\t\t@click=\"open = !open\">\n\t\t\t<template #icon>\n\t\t\t\t<NcIconSvgWrapper :path=\"open ? mdiMenuOpen : mdiMenu\" />\n\t\t\t</template>\n\t\t</NcButton>\n\t</div>\n</template>\n\n<style scoped lang=\"scss\">\n.app-navigation-toggle-wrapper {\n\tposition: absolute;\n\ttop: var(--app-navigation-padding);\n\tinset-inline-end: calc(0px - var(--app-navigation-padding));\n\tmargin-inline-end: calc(-1 * var(--default-clickable-area));\n}\n\nbutton.app-navigation-toggle {\n\tbackground-color: var(--color-main-background);\n}\n</style>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n```vue\n<template>\n\t<div class=\"styleguide-nc-content\">\n\t\t<NcAppNavigation>\n\t\t\t<template #search>\n\t\t\t\t<div class=\"navigation__header\">\n\t\t\t\t\t<NcAppNavigationSearch v-model=\"searchValue\" label=\"Search …\" />\n\t\t\t\t\t<NcActions>\n\t\t\t\t\t\t<NcActionButton close-after-click @click=\"showModal = true\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconCog />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\tApp settings (close after click)\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionButton @click=\"showModal = true\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconCog />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\tApp settings (handle only click)\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t</NcActions>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t\t<template #list>\n\t\t\t\t<NcAppNavigationItem v-for=\"item in items\" :key=\"item\" :name=\"item\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconCheck :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcAppNavigationItem>\n\t\t\t</template>\n\t\t\t<template #footer>\n\t\t\t\t<div class=\"navigation__footer\">\n\t\t\t\t\t<NcButton wide @click=\"showModal = true\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<IconCog />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\tApp settings\n\t\t\t\t\t</NcButton>\n\t\t\t\t\t<NcModal v-if=\"showModal\" name=\"Modal for focus-trap check\" @close=\"showModal = false\">\n\t\t\t\t\t\t<div class=\"modal-content\">\n\t\t\t\t\t\t\t<h4>Focus-trap should be locked inside the modal</h4>\n\t\t\t\t\t\t\t<NcTextField v-model=\"modalValue\" label=\"Focus me\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</NcModal>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t</NcAppNavigation>\n\t</div>\n</template>\n\n<script>\n\timport IconCheck from 'vue-material-design-icons/Check'\n\timport IconCog from 'vue-material-design-icons/Cog'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tIconCheck,\n\t\t\tIconCog,\n\t\t},\n\t\tprovide() {\n\t\t\treturn {\n\t\t\t\t'NcContent:setHasAppNavigation': () => {},\n\t\t\t}\n\t\t},\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\titems: Array.from({ length: 5 }, (v, i) => `Item ${i+1}`),\n\t\t\t\tsearchValue: '',\n\t\t\t\tmodalValue: '',\n\t\t\t\tshowModal: false,\n\t\t\t}\n\t\t},\n\t}\n</script>\n\n<style scoped>\n\t/* Mock NcContent */\n\t.styleguide-nc-content {\n\t\tposition: relative;\n\t\theight: 300px;\n\t\tbackground-color: var(--color-background-plain);\n\t\toverflow: hidden;\n\t}\n\n\t.navigation__header,\n\t.navigation__footer {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tgap: 4px;\n\t\tpadding: 4px;\n\t}\n\n\t.modal-content {\n\t\theight: 120px;\n\t\tpadding: 10px;\n\t}\n</style>\n```\n\nThe navigation bar can be open and closed from anywhere in the app using the\nnextcloud event bus.\n\n### Install the event bus package\n\n```bash\nnpm i -S @nextcloud/event-bus\n```\n\n### Usage\n\n#### Open the navigation\n\n```js static\nimport { emit } from '@nextcloud/event-bus'\nemit('toggle-navigation', {\n\topen: true,\n})\n```\n\n#### Close the navigation\n\n```js static\nimport { emit } from '@nextcloud/event-bus'\nemit('toggle-navigation', {\n\topen: false,\n})\n```\n\n</docs>\n\n<script setup lang=\"ts\">\nimport type { FocusTrap } from 'focus-trap'\nimport type { Slot } from 'vue'\n\nimport { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { createFocusTrap } from 'focus-trap'\nimport { inject, onMounted, onUnmounted, ref, useTemplateRef, warn, watch, watchEffect } from 'vue'\nimport NcAppNavigationList from '../NcAppNavigationList/NcAppNavigationList.vue'\nimport NcAppNavigationToggle from './NcAppNavigationToggle.vue'\nimport { useIsMobile } from '../../composables/useIsMobile/index.ts'\nimport { getTrapStack } from '../../utils/focusTrap.ts'\nimport { HAS_APP_NAVIGATION_KEY } from '../NcContent/constants.ts'\n\nconst props = defineProps<{\n\t/**\n\t * The aria label to describe the navigation\n\t */\n\tariaLabel?: string\n\n\t/**\n\t * aria-labelledby attribute to describe the navigation\n\t */\n\tariaLabelledby?: string\n}>()\n\ndefineSlots<{\n\t/**\n\t * The main content of the navigation.\n\t * If no list is passed to the `#list` slot, stretched vertically.\n\t */\n\tdefault?: Slot\n\t/**\n\t * Footer for e.g. `NcAppNavigationSettings`\n\t */\n\tfooter?: Slot\n\t/**\n\t * List for Navigation list items.\n\t * Stretched between the main content and the footer\n\t */\n\tlist?: Slot\n\t/**\n\t * For in-app search you can pass a `NcAppNavigationSearch` component as the slot content.\n\t */\n\tsearch?: Slot\n}>()\n\nlet focusTrap: FocusTrap\nconst setHasAppNavigation = inject(\n\tHAS_APP_NAVIGATION_KEY,\n\t() => warn('NcAppNavigation is not mounted inside NcContent, this is probably an error.'),\n\tfalse,\n)\n\nconst appNavigationContainer = useTemplateRef('app-navigation-container-key')\nconst isMobile = useIsMobile()\nconst open = ref(!isMobile.value)\n\nwatchEffect(() => {\n\tif (!props.ariaLabel && !props.ariaLabelledby) {\n\t\twarn('NcAppNavigation requires either `ariaLabel` or `ariaLabelledby` to be set for accessibility.')\n\t}\n})\n\nwatch(isMobile, () => {\n\topen.value = !isMobile.value\n})\n\nwatch(open, () => {\n\ttoggleFocusTrap()\n})\n\nonMounted(() => {\n\tsetHasAppNavigation(true)\n\tsubscribe('toggle-navigation', toggleNavigationByEventBus)\n\t// Emit an event with the initial state of the navigation\n\temit('navigation-toggled', {\n\t\topen: open.value,\n\t})\n\n\tfocusTrap = createFocusTrap(appNavigationContainer.value!, {\n\t\tallowOutsideClick: true,\n\t\tfallbackFocus: appNavigationContainer.value!,\n\t\ttrapStack: getTrapStack(),\n\t\tescapeDeactivates: false,\n\t})\n\ttoggleFocusTrap()\n})\n\nonUnmounted(() => {\n\tsetHasAppNavigation(false)\n\tunsubscribe('toggle-navigation', toggleNavigationByEventBus)\n\tfocusTrap.deactivate()\n})\n\n/**\n * Toggle the navigation\n *\n * @param state set the state instead of inverting the current one\n */\nfunction toggleNavigation(state?: boolean): void {\n\t// Early return if already in that state\n\tif (open.value === state) {\n\t\temit('navigation-toggled', {\n\t\t\topen: open.value,\n\t\t})\n\t\treturn\n\t}\n\n\topen.value = state === undefined ? !open.value : state\n\tconst bodyStyles = getComputedStyle(document.body)\n\tconst animationLength = parseInt(bodyStyles.getPropertyValue('--animation-quick')) || 100\n\n\tsetTimeout(() => {\n\t\temit('navigation-toggled', {\n\t\t\topen: open.value,\n\t\t})\n\t// We wait for 1.5 times the animation length to give the animation time to really finish.\n\t}, 1.5 * animationLength)\n}\n\n/**\n * Handler for the event-bus navigation event.\n *\n * @param context - The event bus context\n * @param context.open - The new navigation open state\n */\nfunction toggleNavigationByEventBus({ open }: { open: boolean }): void {\n\treturn toggleNavigation(open)\n}\n\n/**\n * Activate focus trap if it is currently needed, otherwise deactivate\n */\nfunction toggleFocusTrap(): void {\n\tif (isMobile.value && open.value) {\n\t\tfocusTrap.activate()\n\t} else {\n\t\tfocusTrap.deactivate()\n\t}\n}\n\n/**\n * Handle hotkey for closing the navigation.\n */\nfunction handleEsc(): void {\n\tif (isMobile.value) {\n\t\ttoggleNavigation(false)\n\t}\n}\n</script>\n\n<template>\n\t<div\n\t\tref=\"app-navigation-container-key\"\n\t\tclass=\"app-navigation\"\n\t\t:class=\"{ 'app-navigation--closed': !open }\">\n\t\t<nav\n\t\t\tid=\"app-navigation-vue\"\n\t\t\t:aria-hidden=\"open ? 'false' : 'true'\"\n\t\t\t:aria-label=\"ariaLabel || undefined\"\n\t\t\t:aria-labelledby=\"ariaLabelledby || undefined\"\n\t\t\tclass=\"app-navigation__content\"\n\t\t\t:inert=\"!open || undefined\"\n\t\t\t@keydown.esc=\"handleEsc\">\n\t\t\t<div class=\"app-navigation__search\">\n\t\t\t\t<slot name=\"search\" />\n\t\t\t</div>\n\n\t\t\t<div class=\"app-navigation__body\" :class=\"{ 'app-navigation__body--no-list': !$slots.list }\">\n\t\t\t\t<slot />\n\t\t\t</div>\n\n\t\t\t<NcAppNavigationList v-if=\"$slots.list\" class=\"app-navigation__list\">\n\t\t\t\t<slot name=\"list\" />\n\t\t\t</NcAppNavigationList>\n\n\t\t\t<slot name=\"footer\" />\n\t\t</nav>\n\t\t<NcAppNavigationToggle :open @update:open=\"toggleNavigation\" />\n\t</div>\n</template>\n\n<style lang=\"scss\">\n.app-navigation,\n.app-content {\n\t/** Distance of the app navigation toggle and the first navigation item to the top edge of the app content container */\n\t--app-navigation-padding: #{$app-navigation-padding};\n}\n</style>\n\n<style lang=\"scss\" scoped>\n.app-navigation {\n\t// Set scoped variable override\n\t// Using --color-text-maxcontrast as a fallback evaluates to an invalid value as it references itself in this scope instead of the variable defined higher up\n\t--color-text-maxcontrast: var(--color-text-maxcontrast-background-blur, var(--color-text-maxcontrast-default));\n\ttransition: transform var(--animation-quick), margin var(--animation-quick);\n\twidth: $navigation-width;\n\t// Left toggle button padding + toggle button + right padding from NcAppContent\n\t--app-navigation-max-width: calc(100vw - (var(--app-navigation-padding) + var(--default-clickable-area) + var(--default-grid-baseline)));\n\tmax-width: var(--app-navigation-max-width);\n\tposition: relative;\n\ttop: 0;\n\tinset-inline-start: 0;\n\tpadding: 0px;\n\t// Above NcAppContent\n\tz-index: 1800;\n\theight: 100%;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n\tflex-grow: 0;\n\tflex-shrink: 0;\n\tbackground-color: var(--color-main-background-blur, var(--color-main-background));\n\t-webkit-backdrop-filter: var(--filter-background-blur, none);\n\tbackdrop-filter: var(--filter-background-blur, none);\n\n\t&--closed {\n\t\tmargin-inline-start: calc(-1 * min($navigation-width, var(--app-navigation-max-width)));\n\t}\n\n\t&__search {\n\t\twidth: 100%;\n\t}\n\n\t&__body {\n\t\toverflow-y: scroll;\n\t}\n\n\t// For legacy purposes support passing a bare list to the content in #default slot and including #footer slot\n\t// Same styles as NcAppNavigationList\n\t&__content > ul {\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: var(--default-grid-baseline, 4px);\n\t\tpadding: var(--app-navigation-padding);\n\t}\n\n\t// Always stretch the navigation list\n\t& &__list {\n\t\theight: 100%;\n\t}\n\n\t// Stretch the main content if there is no stretched list\n\t&__body--no-list {\n\t\tflex: 1 1 auto;\n\t\toverflow: auto;\n\t\theight: 100%;\n\t}\n\n\t&__content {\n\t\theight: 100%;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n}\n\n// Add extra border for high contrast mode\n[data-themes*=\"highcontrast\"] {\n\t.app-navigation {\n\t\tborder-inline-end: 1px solid var(--color-border);\n\t}\n}\n\n// When on mobile, we make the navigation slide over the NcAppContent\n@media only screen and (max-width: $breakpoint-mobile) {\n\t.app-navigation {\n\t\tposition: absolute;\n\t\tborder-inline-end: 1px solid var(--color-border);\n\t}\n}\n\n// Put the toggle behind NcAppSidebar on small screens\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t.app-navigation {\n\t\tz-index: 1400;\n\t}\n}\n\n</style>\n"],"names":["_useModel","_openBlock","_createElementBlock","_hoisted_1","_createVNode","_unref","open","_normalizeClass","_createElementVNode","ariaLabel","ariaLabelledby","_renderSlot","$slots","_createBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiBA,UAAM,OAAOA,SAAoB,SAAC,MAA0B;AAE5D,UAAM,QAAQ,SAAS,MAAM,KAAK,QAAQ,EAAE,kBAAkB,IAAI,EAAE,iBAAiB,CAAC;;AAIrF,aAAAC,UAAA,GAAAC,mBAaM,OAbNC,cAaM;AAAA,QAZLC,YAWWC,MAAA,QAAA,GAAA;AAAA,UAVV,OAAM;AAAA,UACN,iBAAc;AAAA,UACb,iBAAe,KAAA,QAAI,SAAA;AAAA,UACnB,cAAY,MAAA;AAAA,UACZ,OAAA,MAAA;AAAA,UACD,SAAQ;AAAA,UACP,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,CAAA,WAAE,KAAA,QAAI,CAAI,KAAA;AAAA,QAAA;UACL,cACV,MAAyD;AAAA,YAAzDD,YAAyD,kBAAA;AAAA,cAAtC,MAAM,KAAA,QAAOC,MAAA,WAAA,IAAcA,MAAA,OAAA;AAAA,YAAA;;;;;;;;;;;;;;;;;;ACoHlD,UAAM,QAAQ;AAiCd,QAAI;AACJ,UAAM,sBAAsB;AAAA,MAC3B;AAAA,MACA,MAAM,KAAK,6EAA6E;AAAA,MACxF;AAAA,IAAA;AAGD,UAAM,yBAAyB,eAAe,8BAA8B;AAC5E,UAAM,WAAW,YAAA;AACjB,UAAM,OAAO,IAAI,CAAC,SAAS,KAAK;AAEhC,gBAAY,MAAM;AACjB,UAAI,CAAC,MAAM,aA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IACD;AAKA,aAAS,YAAkB;AAC1B,UAAI,SAAS,OAAO;AACnB,yBAAiB,KAAK;AAAA,MACvB;AAAA,IACD;;0BAICJ,mBA2BM,OAAA;AAAA,QA1BL,KAAI;AAAA,QACJ,OAAKK,eAAA,CAAC,kBAAgB,EAAA,0BAAA,CACe,KAAA,OAAI,CAAA;AAAA,MAAA;QACzCC,mBAqBM,OAAA;AAAA,UApBL,IAAG;AAAA,UACF,eAAa,KAAA,QAAI,UAAA;AAAA,UACjB,cAAYC,KAAAA,aAAa;AAAA,UACzB,mBAAiBC,KAAAA,kBAAkB;AAAA,UACpC,OAAM;AAAA,UACL,OAAK,CAAG,KAAA,SAAQ;AAAA,UAChB,oBAAa,WAAS,CAAA,KAAA,CAAA;AAAA,QAAA;UACvBF,mBAEM,OAFN,YAEM;AAAA,YADLG,WAAsB,KAAA,QAAA,UAAA,CAAA,GAAA,QAAA,IAAA;AAAA,UAAA;UAGvBH,mBAEM,OAAA;AAAA,YAFD,OAAKD,eAAA,CAAC,wBAAsB,EAAA,iCAAA,CAA6CK,KAAAA,OAAO,MAAI,CAAA;AAAA,UAAA;YACxFD,WAAQ,KAAA,QAAA,WAAA,CAAA,GAAA,QAAA,IAAA;AAAA,UAAA;UAGkBC,KAAAA,OAAO,qBAAlCC,YAEsB,qBAAA;AAAA;YAFkB,OAAM;AAAA,UAAA;6BAC7C,MAAoB;AAAA,cAApBF,WAAoB,KAAA,QAAA,QAAA,CAAA,GAAA,QAAA,IAAA;AAAA,YAAA;;;UAGrBA,WAAsB,KAAA,QAAA,UAAA,CAAA,GAAA,QAAA,IAAA;AAAA,QAAA;QAEvBP,YAA+D,uBAAA;AAAA,UAAvC,MAAA,KAAA;AAAA,UAAM,iBAAa;AAAA,QAAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"NcAppNavigation-OWHt-bzI.mjs","sources":["../../src/components/NcAppNavigation/NcAppNavigationToggle.vue","../../src/components/NcAppNavigation/NcAppNavigation.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n -->\n\n<script setup lang=\"ts\">\nimport { mdiMenu, mdiMenuOpen } from '@mdi/js'\nimport { computed } from 'vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport { t } from '../../l10n.ts'\nimport NcButton from '../NcButton/index.ts'\n\n/**\n * Tracks whether the toggle has been clicked or not.\n * If it has been clicked, switches between the different MenuIcons\n * and emits a boolean indicating its opened status\n */\nconst open = defineModel<boolean>('open', { required: true })\n\nconst title = computed(() => open.value ? t('Close navigation') : t('Open navigation'))\n</script>\n\n<template>\n\t<div class=\"app-navigation-toggle-wrapper\">\n\t\t<NcButton\n\t\t\tclass=\"app-navigation-toggle\"\n\t\t\taria-controls=\"app-navigation-vue\"\n\t\t\t:aria-expanded=\"open ? 'true' : 'false'\"\n\t\t\t:aria-label=\"title\"\n\t\t\t:title\n\t\t\tvariant=\"tertiary\"\n\t\t\t@click=\"open = !open\">\n\t\t\t<template #icon>\n\t\t\t\t<NcIconSvgWrapper :path=\"open ? mdiMenuOpen : mdiMenu\" />\n\t\t\t</template>\n\t\t</NcButton>\n\t</div>\n</template>\n\n<style scoped lang=\"scss\">\n.app-navigation-toggle-wrapper {\n\tposition: absolute;\n\ttop: var(--app-navigation-padding);\n\tinset-inline-end: calc(0px - var(--app-navigation-padding));\n\tmargin-inline-end: calc(-1 * var(--default-clickable-area));\n}\n\nbutton.app-navigation-toggle {\n\tbackground-color: var(--color-main-background);\n}\n</style>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n```vue\n<template>\n\t<div class=\"styleguide-nc-content\">\n\t\t<NcAppNavigation>\n\t\t\t<template #search>\n\t\t\t\t<div class=\"navigation__header\">\n\t\t\t\t\t<NcAppNavigationSearch v-model=\"searchValue\" label=\"Search …\" />\n\t\t\t\t\t<NcActions>\n\t\t\t\t\t\t<NcActionButton close-after-click @click=\"showModal = true\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconCog />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\tApp settings (close after click)\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionButton @click=\"showModal = true\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<IconCog />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\tApp settings (handle only click)\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t</NcActions>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t\t<template #list>\n\t\t\t\t<NcAppNavigationItem v-for=\"item in items\" :key=\"item\" :name=\"item\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<IconCheck :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t</NcAppNavigationItem>\n\t\t\t</template>\n\t\t\t<template #footer>\n\t\t\t\t<div class=\"navigation__footer\">\n\t\t\t\t\t<NcButton wide @click=\"showModal = true\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<IconCog />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\tApp settings\n\t\t\t\t\t</NcButton>\n\t\t\t\t\t<NcModal v-if=\"showModal\" name=\"Modal for focus-trap check\" @close=\"showModal = false\">\n\t\t\t\t\t\t<div class=\"modal-content\">\n\t\t\t\t\t\t\t<h4>Focus-trap should be locked inside the modal</h4>\n\t\t\t\t\t\t\t<NcTextField v-model=\"modalValue\" label=\"Focus me\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</NcModal>\n\t\t\t\t</div>\n\t\t\t</template>\n\t\t</NcAppNavigation>\n\t</div>\n</template>\n\n<script>\n\timport IconCheck from 'vue-material-design-icons/Check'\n\timport IconCog from 'vue-material-design-icons/Cog'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tIconCheck,\n\t\t\tIconCog,\n\t\t},\n\t\tprovide() {\n\t\t\treturn {\n\t\t\t\t'NcContent:setHasAppNavigation': () => {},\n\t\t\t}\n\t\t},\n\t\tdata() {\n\t\t\treturn {\n\t\t\t\titems: Array.from({ length: 5 }, (v, i) => `Item ${i+1}`),\n\t\t\t\tsearchValue: '',\n\t\t\t\tmodalValue: '',\n\t\t\t\tshowModal: false,\n\t\t\t}\n\t\t},\n\t}\n</script>\n\n<style scoped>\n\t/* Mock NcContent */\n\t.styleguide-nc-content {\n\t\tposition: relative;\n\t\theight: 300px;\n\t\tbackground-color: var(--color-background-plain);\n\t\toverflow: hidden;\n\t}\n\n\t.navigation__header,\n\t.navigation__footer {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tgap: 4px;\n\t\tpadding: 4px;\n\t}\n\n\t.modal-content {\n\t\theight: 120px;\n\t\tpadding: 10px;\n\t}\n</style>\n```\n\nThe navigation bar can be open and closed from anywhere in the app using the\nnextcloud event bus.\n\n### Install the event bus package\n\n```bash\nnpm i -S @nextcloud/event-bus\n```\n\n### Usage\n\n#### Open the navigation\n\n```js static\nimport { emit } from '@nextcloud/event-bus'\nemit('toggle-navigation', {\n\topen: true,\n})\n```\n\n#### Close the navigation\n\n```js static\nimport { emit } from '@nextcloud/event-bus'\nemit('toggle-navigation', {\n\topen: false,\n})\n```\n\n</docs>\n\n<script setup lang=\"ts\">\nimport type { FocusTrap } from 'focus-trap'\nimport type { Slot } from 'vue'\n\nimport { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { createFocusTrap } from 'focus-trap'\nimport { inject, onMounted, onUnmounted, ref, useTemplateRef, warn, watch, watchEffect } from 'vue'\nimport NcAppNavigationList from '../NcAppNavigationList/NcAppNavigationList.vue'\nimport NcAppNavigationToggle from './NcAppNavigationToggle.vue'\nimport { useIsMobile } from '../../composables/useIsMobile/index.ts'\nimport { getTrapStack } from '../../utils/focusTrap.ts'\nimport { HAS_APP_NAVIGATION_KEY } from '../NcContent/constants.ts'\n\nconst props = defineProps<{\n\t/**\n\t * The aria label to describe the navigation\n\t */\n\tariaLabel?: string\n\n\t/**\n\t * aria-labelledby attribute to describe the navigation\n\t */\n\tariaLabelledby?: string\n}>()\n\ndefineSlots<{\n\t/**\n\t * The main content of the navigation.\n\t * If no list is passed to the `#list` slot, stretched vertically.\n\t */\n\tdefault?: Slot\n\t/**\n\t * Footer for e.g. `NcAppNavigationSettings`\n\t */\n\tfooter?: Slot\n\t/**\n\t * List for Navigation list items.\n\t * Stretched between the main content and the footer\n\t */\n\tlist?: Slot\n\t/**\n\t * For in-app search you can pass a `NcAppNavigationSearch` component as the slot content.\n\t */\n\tsearch?: Slot\n}>()\n\nlet focusTrap: FocusTrap\nconst setHasAppNavigation = inject(\n\tHAS_APP_NAVIGATION_KEY,\n\t() => warn('NcAppNavigation is not mounted inside NcContent, this is probably an error.'),\n\tfalse,\n)\n\nconst appNavigationContainer = useTemplateRef('app-navigation-container-key')\nconst isMobile = useIsMobile()\nconst open = ref(!isMobile.value)\n\nwatchEffect(() => {\n\tif (!props.ariaLabel && !props.ariaLabelledby) {\n\t\twarn('NcAppNavigation requires either `ariaLabel` or `ariaLabelledby` to be set for accessibility.')\n\t}\n})\n\nwatch(isMobile, () => {\n\topen.value = !isMobile.value\n})\n\nwatch(open, () => {\n\ttoggleFocusTrap()\n})\n\nonMounted(() => {\n\tsetHasAppNavigation(true)\n\tsubscribe('toggle-navigation', toggleNavigationByEventBus)\n\t// Emit an event with the initial state of the navigation\n\temit('navigation-toggled', {\n\t\topen: open.value,\n\t})\n\n\tfocusTrap = createFocusTrap(appNavigationContainer.value!, {\n\t\tallowOutsideClick: true,\n\t\tfallbackFocus: appNavigationContainer.value!,\n\t\ttrapStack: getTrapStack(),\n\t\tescapeDeactivates: false,\n\t})\n\ttoggleFocusTrap()\n})\n\nonUnmounted(() => {\n\tsetHasAppNavigation(false)\n\tunsubscribe('toggle-navigation', toggleNavigationByEventBus)\n\tfocusTrap.deactivate()\n})\n\n/**\n * Toggle the navigation\n *\n * @param state set the state instead of inverting the current one\n */\nfunction toggleNavigation(state?: boolean): void {\n\t// Early return if already in that state\n\tif (open.value === state) {\n\t\temit('navigation-toggled', {\n\t\t\topen: open.value,\n\t\t})\n\t\treturn\n\t}\n\n\topen.value = state === undefined ? !open.value : state\n\tconst bodyStyles = getComputedStyle(document.body)\n\tconst animationLength = parseInt(bodyStyles.getPropertyValue('--animation-quick')) || 100\n\n\tsetTimeout(() => {\n\t\temit('navigation-toggled', {\n\t\t\topen: open.value,\n\t\t})\n\t// We wait for 1.5 times the animation length to give the animation time to really finish.\n\t}, 1.5 * animationLength)\n}\n\n/**\n * Handler for the event-bus navigation event.\n *\n * @param context - The event bus context\n * @param context.open - The new navigation open state\n */\nfunction toggleNavigationByEventBus({ open }: { open: boolean }): void {\n\treturn toggleNavigation(open)\n}\n\n/**\n * Activate focus trap if it is currently needed, otherwise deactivate\n */\nfunction toggleFocusTrap(): void {\n\tif (isMobile.value && open.value) {\n\t\tfocusTrap.activate()\n\t} else {\n\t\tfocusTrap.deactivate()\n\t}\n}\n\n/**\n * Handle hotkey for closing the navigation.\n */\nfunction handleEsc(): void {\n\tif (isMobile.value) {\n\t\ttoggleNavigation(false)\n\t}\n}\n</script>\n\n<template>\n\t<div\n\t\tref=\"app-navigation-container-key\"\n\t\tclass=\"app-navigation\"\n\t\t:class=\"{ 'app-navigation--closed': !open }\">\n\t\t<nav\n\t\t\tid=\"app-navigation-vue\"\n\t\t\t:aria-hidden=\"open ? 'false' : 'true'\"\n\t\t\t:aria-label=\"ariaLabel || undefined\"\n\t\t\t:aria-labelledby=\"ariaLabelledby || undefined\"\n\t\t\tclass=\"app-navigation__content\"\n\t\t\t:inert=\"!open || undefined\"\n\t\t\t@keydown.esc=\"handleEsc\">\n\t\t\t<div class=\"app-navigation__search\">\n\t\t\t\t<slot name=\"search\" />\n\t\t\t</div>\n\n\t\t\t<div class=\"app-navigation__body\" :class=\"{ 'app-navigation__body--no-list': !$slots.list }\">\n\t\t\t\t<slot />\n\t\t\t</div>\n\n\t\t\t<NcAppNavigationList v-if=\"$slots.list\" class=\"app-navigation__list\">\n\t\t\t\t<slot name=\"list\" />\n\t\t\t</NcAppNavigationList>\n\n\t\t\t<slot name=\"footer\" />\n\t\t</nav>\n\t\t<NcAppNavigationToggle :open @update:open=\"toggleNavigation\" />\n\t</div>\n</template>\n\n<style lang=\"scss\">\n.app-navigation,\n.app-content {\n\t/** Distance of the app navigation toggle and the first navigation item to the top edge of the app content container */\n\t--app-navigation-padding: #{$app-navigation-padding};\n}\n</style>\n\n<style lang=\"scss\" scoped>\n.app-navigation {\n\t// Set scoped variable override\n\t// Using --color-text-maxcontrast as a fallback evaluates to an invalid value as it references itself in this scope instead of the variable defined higher up\n\t--color-text-maxcontrast: var(--color-text-maxcontrast-background-blur, var(--color-text-maxcontrast-default));\n\ttransition: transform var(--animation-quick), margin var(--animation-quick);\n\twidth: $navigation-width;\n\t// Left toggle button padding + toggle button + right padding from NcAppContent\n\t--app-navigation-max-width: calc(100vw - (var(--app-navigation-padding) + var(--default-clickable-area) + var(--default-grid-baseline)));\n\tmax-width: var(--app-navigation-max-width);\n\tposition: relative;\n\ttop: 0;\n\tinset-inline-start: 0;\n\tpadding: 0px;\n\t// Above NcAppContent\n\tz-index: 1800;\n\theight: 100%;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n\tflex-grow: 0;\n\tflex-shrink: 0;\n\tbackground-color: var(--color-main-background-blur, var(--color-main-background));\n\t-webkit-backdrop-filter: var(--filter-background-blur, none);\n\tbackdrop-filter: var(--filter-background-blur, none);\n\n\t&--closed {\n\t\tmargin-inline-start: calc(-1 * min($navigation-width, var(--app-navigation-max-width)));\n\t}\n\n\t&__search {\n\t\twidth: 100%;\n\t}\n\n\t&__body {\n\t\toverflow-y: scroll;\n\t}\n\n\t// For legacy purposes support passing a bare list to the content in #default slot and including #footer slot\n\t// Same styles as NcAppNavigationList\n\t&__content > ul {\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: var(--default-grid-baseline, 4px);\n\t\tpadding: var(--app-navigation-padding);\n\t}\n\n\t// Always stretch the navigation list\n\t& &__list {\n\t\theight: 100%;\n\t}\n\n\t// Stretch the main content if there is no stretched list\n\t&__body--no-list {\n\t\tflex: 1 1 auto;\n\t\toverflow: auto;\n\t\theight: 100%;\n\t}\n\n\t&__content {\n\t\theight: 100%;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n}\n\n// Add extra border for high contrast mode\n[data-themes*=\"highcontrast\"] {\n\t.app-navigation {\n\t\tborder-inline-end: 1px solid var(--color-border);\n\t}\n}\n\n// When on mobile, we make the navigation slide over the NcAppContent\n@media only screen and (max-width: $breakpoint-mobile) {\n\t.app-navigation {\n\t\tposition: absolute;\n\t\tborder-inline-end: 1px solid var(--color-border);\n\t}\n}\n\n// Put the toggle behind NcAppSidebar on small screens\n@media only screen and (max-width: $breakpoint-small-mobile) {\n\t.app-navigation {\n\t\tz-index: 1400;\n\t}\n}\n\n</style>\n"],"names":["_useModel","_openBlock","_createElementBlock","_hoisted_1","_createVNode","_unref","open","_normalizeClass","_createElementVNode","ariaLabel","ariaLabelledby","_renderSlot","$slots","_createBlock"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiBA,UAAM,OAAOA,SAAoB,SAAC,MAA0B;AAE5D,UAAM,QAAQ,SAAS,MAAM,KAAK,QAAQ,EAAE,kBAAkB,IAAI,EAAE,iBAAiB,CAAC;;AAIrF,aAAAC,UAAA,GAAAC,mBAaM,OAbNC,cAaM;AAAA,QAZLC,YAWWC,MAAA,QAAA,GAAA;AAAA,UAVV,OAAM;AAAA,UACN,iBAAc;AAAA,UACb,iBAAe,KAAA,QAAI,SAAA;AAAA,UACnB,cAAY,MAAA;AAAA,UACZ,OAAA,MAA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A;YACxFD,WAAQ,KAAA,QAAA,WAAA,CAAA,GAAA,QAAA,IAAA;AAAA,UAAA;UAGkBC,KAAAA,OAAO,qBAAlCC,YAEsB,qBAAA;AAAA;YAFkB,OAAM;AAAA,UAAA;6BAC7C,MAAoB;AAAA,cAApBF,WAAoB,KAAA,QAAA,QAAA,CAAA,GAAA,QAAA,IAAA;AAAA,YAAA;;;UAGrBA,WAAsB,KAAA,QAAA,UAAA,CAAA,GAAA,QAAA,IAAA;AAAA,QAAA;QAEvBP,YAA+D,uBAAA;AAAA,UAAvC,MAAA,KAAA;AAAA,UAAM,iBAAa;AAAA,QAAA;;;;;;"}
|
package/dist/chunks/{NcAppNavigationCaption-zs07YHtS.mjs → NcAppNavigationCaption-BIiGAQjI.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../assets/NcAppNavigationCaption-HUg9fMCm.css';
|
|
2
|
-
import { N as NcActions } from "./NcActions-
|
|
2
|
+
import { N as NcActions } from "./NcActions-C-9GKofj.mjs";
|
|
3
3
|
import { resolveComponent, createBlock, openBlock, resolveDynamicComponent, normalizeClass, withCtx, createElementBlock, createCommentVNode, createTextVNode, toDisplayString, createVNode, normalizeProps, guardReactiveProps, renderSlot } from "vue";
|
|
4
4
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
5
5
|
const _sfc_main = {
|
|
@@ -97,4 +97,4 @@ const NcAppNavigationCaption = /* @__PURE__ */ _export_sfc(_sfc_main, [["render"
|
|
|
97
97
|
export {
|
|
98
98
|
NcAppNavigationCaption as N
|
|
99
99
|
};
|
|
100
|
-
//# sourceMappingURL=NcAppNavigationCaption-
|
|
100
|
+
//# sourceMappingURL=NcAppNavigationCaption-BIiGAQjI.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcAppNavigationCaption-
|
|
1
|
+
{"version":3,"file":"NcAppNavigationCaption-BIiGAQjI.mjs","sources":["../../src/components/NcAppNavigationCaption/NcAppNavigationCaption.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### Basic usage\n\n```vue\n\t<template>\n\t\t<div class=\"styleguide-nc-content\">\n\t\t\t<NcAppNavigation>\n\t\t\t\t<template #list>\n\t\t\t\t\t<NcAppNavigationCaption\n\t\t\t\t\t\tname=\"Your caption goes here\">\n\t\t\t\t\t\t<template #actions>\n\t\t\t\t\t\t\t<NcActionButton>\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<IconPlus :size=\"20\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\tThis is an action\n\t\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcAppNavigationCaption>\n\t\t\t\t</template>\n\t\t\t</NcAppNavigation>\n\t\t</div>\n\t</template>\n\t<script>\n\timport IconPlus from 'vue-material-design-icons/Plus.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tIconPlus,\n\t\t},\n\t}\n\t</script>\n\t<style scoped>\n\t\t/* Mock NcContent */\n\t\t.styleguide-nc-content {\n\t\t\tbackground-color: var(--color-background-plain);\n\t\t\toverflow: hidden;\n\t\t}\n\t</style>\n```\n\n### Element with a slot for custom actions icon\n```vue\n\t<template>\n\t\t<div class=\"styleguide-nc-content\">\n\t\t\t<NcAppNavigation>\n\t\t\t\t<template #list>\n\t\t\t\t\t<NcAppNavigationCaption\n\t\t\t\t\t\tname=\"Your caption goes here\">\n\t\t\t\t\t\t<template #actionsTriggerIcon>\n\t\t\t\t\t\t\t<IconPlus slot=\"icon\" :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<template #actions>\n\t\t\t\t\t\t\t<NcActionButton>\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<IconPencil :size=\"20\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\tRename\n\t\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t\t<NcActionButton>\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<IconDelete :size=\"20\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\tDelete\n\t\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t\t<NcActionButton>\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<IconArrowRight :size=\"20\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\tValidate\n\t\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t\t<NcActionButton>\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<IconDownload :size=\"20\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\tDownload\n\t\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcAppNavigationCaption>\n\t\t\t\t</template>\n\t\t\t</NcAppNavigation>\n\t\t</div>\n\t</template>\n\t<script>\n\t\timport IconArrowRight from 'vue-material-design-icons/ArrowRight.vue'\n\t\timport IconDelete from 'vue-material-design-icons/Delete.vue'\n\t\timport IconDownload from 'vue-material-design-icons/Download.vue'\n\t\timport IconPencil from 'vue-material-design-icons/Pencil.vue'\n\t\timport IconPlus from 'vue-material-design-icons/Plus.vue'\n\n\t\texport default {\n\t\t\tcomponents: {\n\t\t\t\tIconArrowRight,\n\t\t\t\tIconDelete,\n\t\t\t\tIconDownload,\n\t\t\t\tIconPencil,\n\t\t\t\tIconPlus,\n\t\t\t}\n\t\t}\n\t</script>\n\t<style scoped>\n\t\t/* Mock NcContent */\n\t\t.styleguide-nc-content {\n\t\t\tbackground-color: var(--color-background-plain);\n\t\t\toverflow: hidden;\n\t\t}\n\t</style>\n```\n\n### Element used as a heading\n```vue\n\t<template>\n\t\t<div class=\"styleguide-nc-content\">\n\t\t\t<NcAppNavigation>\n\t\t\t\t<!-- if you need multiple lists you can use it in the default slot like this: -->\n\t\t\t\t<NcAppNavigationCaption heading-id=\"people-heading\"\n\t\t\t\t\tis-heading\n\t\t\t\t\tname=\"People\" />\n\t\t\t\t<NcAppNavigationList aria-labelledby=\"people-heading\">\n\t\t\t\t\t<NcAppNavigationItem name=\"Emma\" />\n\t\t\t\t\t<NcAppNavigationItem name=\"Jane\" />\n\t\t\t\t\t<NcAppNavigationItem name=\"Jake\" />\n\t\t\t\t</NcAppNavigationList>\n\t\t\t\t<NcAppNavigationCaption heading-id=\"places-heading\"\n\t\t\t\t\tis-heading\n\t\t\t\t\tname=\"Places\" />\n\t\t\t\t<NcAppNavigationList aria-labelledby=\"places-heading\">\n\t\t\t\t\t<NcAppNavigationItem name=\"America\" />\n\t\t\t\t\t<NcAppNavigationItem name=\"Australia\" />\n\t\t\t\t\t<NcAppNavigationItem name=\"Europe\" />\n\t\t\t\t</NcAppNavigationList>\n\t\t\t</NcAppNavigation>\n\t\t</div>\n\t</template>\n\t<style scoped>\n\t\t/* Mock NcContent */\n\t\t.styleguide-nc-content {\n\t\t\tbackground-color: var(--color-background-plain);\n\t\t\toverflow: hidden;\n\t\t}\n\t</style>\n```\n\n</docs>\n\n<template>\n\t<component\n\t\t:is=\"wrapperTag\"\n\t\tclass=\"app-navigation-caption\"\n\t\t:class=\"{ 'app-navigation-caption--heading': isHeading }\">\n\t\t<!-- Name of the caption -->\n\t\t<component\n\t\t\t:is=\"captionTag\"\n\t\t\t:id=\"headingId\"\n\t\t\tclass=\"app-navigation-caption__name\">\n\t\t\t{{ name }}\n\t\t</component>\n\n\t\t<!-- Actions -->\n\t\t<div\n\t\t\tv-if=\"!!$slots.actions\"\n\t\t\tclass=\"app-navigation-caption__actions\">\n\t\t\t<NcActions v-bind=\"actionsProps\">\n\t\t\t\t<!-- @slot Slot for the actions menu -->\n\t\t\t\t<slot name=\"actions\" />\n\t\t\t\t<template #icon>\n\t\t\t\t\t<slot name=\"actionsTriggerIcon\" />\n\t\t\t\t</template>\n\t\t\t</NcActions>\n\t\t</div>\n\t</component>\n</template>\n\n<script>\nimport NcActions from '../NcActions/NcActions.vue'\n\nexport default {\n\tname: 'NcAppNavigationCaption',\n\n\tcomponents: {\n\t\tNcActions,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The text of the caption\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * `id` to set on the inner caption\n\t\t * Can be used for connecting the `NcActionCaption` with `NcActionList` using `aria-labelledby`.\n\t\t */\n\t\theadingId: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Enable when used as a heading\n\t\t * e.g. Before NcAppNavigationList\n\t\t */\n\t\tisHeading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * If `isHeading` is set, this defines the heading level that should be used\n\t\t */\n\t\theadingLevel: {\n\t\t\ttype: Number,\n\t\t\tdefault: 2,\n\t\t},\n\n\t\t/**\n\t\t * Any [NcActions](#/Components/NcActions?id=ncactions-1) prop\n\t\t */\n\t\t// Not an actual prop but needed to show in vue-styleguidist docs\n\n\t\t...NcActions.props,\n\t},\n\n\tcomputed: {\n\t\tactionsProps() {\n\t\t\tconst actionProps = Object.keys(NcActions.props)\n\t\t\tconst props = Object\n\t\t\t\t.entries(this.$props)\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\t\t\t\t.filter(([key, _value]) => actionProps.includes(key))\n\t\t\treturn Object.fromEntries(props)\n\t\t},\n\n\t\twrapperTag() {\n\t\t\treturn this.isHeading ? 'div' : 'li'\n\t\t},\n\n\t\tcaptionTag() {\n\t\t\t// Limit to at least h2 as h1 is considered invalid and reserved\n\t\t\tconst headingLevel = Math.max(2, this.headingLevel)\n\t\t\treturn this.isHeading ? `h${headingLevel}` : 'span'\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n.app-navigation-caption {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\n\t&--heading {\n\t\tpadding: var(--app-navigation-padding);\n\t\t&:not(:first-child):not(:last-child) {\n\t\t\tpadding: 0 var(--app-navigation-padding);\n\t\t}\n\t}\n\n\t&__name {\n\t\tfont-weight: bold;\n\t\tcolor: var(--color-main-text);\n\t\tfont-size: var(--default-font-size);\n\t\tline-height: var(--default-clickable-area);\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\tbox-shadow: none !important;\n\t\tflex-shrink: 0;\n\t\t// padding to align the name with the icon of app navigation items\n\t\tpadding-block: 0;\n\t\tpadding-inline: calc(var(--default-grid-baseline, 4px) * 2) 0;\n\t\tmargin-top: 0px;\n\t\tmargin-bottom: var(--default-grid-baseline);\n\t}\n\n\t&__actions {\n\t\tflex: 0 0 var(--default-clickable-area);\n\t}\n}\n\n// extra top space if it's not the first item on the list\n.app-navigation-caption:not(:first-child) {\n\tmargin-top: calc(var(--default-clickable-area) / 2);\n}\n</style>\n"],"names":["_openBlock","_createBlock","_resolveDynamicComponent","_normalizeClass","_createElementBlock","_createVNode","_renderSlot"],"mappings":";;;AAqLA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EAEN,YAAY;AAAA,IACX;AAAA;EAGD,OAAO;AAAA;AAAA;AAAA;AAAA,IAIN,MAAM;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA;;;;;IAOX,WAAW;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA;;;;;IAOV,WAAW;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMV,cAAc;AAAA,MACb,MAAM;AAAA,MACN,SAAS;AAAA;;;;;IAQV,GAAG,UAAU;AAAA;EAGd,UAAU;AAAA,IACT,eAAe;AACd,YAAM,cAAc,OAAO,KAAK,UAAU,KAAK;AAC/C,YAAM,QAAQ,OACZ,QAAQ,KAAK,MAAM,EAEnB,OAAO,CAAC,CAAC,KAAK,MAAM,MAAM,YAAY,SAAS,GAAG,CAAC;AACrD,aAAO,OAAO,YAAY,KAAK;AAAA,IAChC;AAAA,IAEA,aAAa;AACZ,aAAO,KAAK,YAAY,QAAQ;AAAA,IACjC;AAAA,IAEA,aAAa;AAEZ,YAAM,eAAe,KAAK,IAAI,GAAG,KAAK,YAAY;AAClD,aAAO,KAAK,YAAY,IAAI,YAAY,KAAK;AAAA,IAC9C;AAAA;AAEF;;;EArFG,OAAM;;;;AAfR,SAAAA,UAAA,GAAAC,YAwBYC,wBAvBN,SAAA,UAAU,GAAA;AAAA,IACf,OAAKC,eAAA,CAAC,0BAAwB,EAAA,mCACe,OAAA,WAAS,CAAA;AAAA;qBAEtD,MAKY;AAAA,OALZH,UAAA,GAAAC,YAKYC,wBAJN,SAAA,UAAU,GAAA;AAAA,QACd,IAAI,OAAA;AAAA,QACL,OAAM;AAAA;yBACN,MAAU;AAAA,0CAAP,OAAA,IAAI,GAAA,CAAA;AAAA;;;MAKC,CAAA,CAAA,KAAA,OAAO,WADhBF,aAAAI,mBAUM,OAVN,YAUM;AAAA,QAPLC,YAMY,wDANO,SAAA,YAAY,CAAA,GAAA;AAAA,UAGnB,cACV,MAAkC;AAAA,YAAlCC,WAAkC,KAAA,QAAA,sBAAA,CAAA,GAAA,QAAA,IAAA;AAAA;2BAFnC,MAAuB;AAAA,YAAvBA,WAAuB,KAAA,QAAA,WAAA,CAAA,GAAA,QAAA,IAAA;AAAA;;;;;;;;;"}
|
|
@@ -3,13 +3,13 @@ import { createElementBlock, openBlock, mergeProps, createElementVNode, createCo
|
|
|
3
3
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
4
4
|
import { C as ChevronDown } from "./ChevronDown-FiGpp0KT.mjs";
|
|
5
5
|
import { C as ChevronUp } from "./ChevronUp-DPXFp1ss.mjs";
|
|
6
|
-
import { r as register, x as
|
|
6
|
+
import { r as register, x as t21, a as t, y as t48, z as t22 } from "./_l10n-C6k5LExr.mjs";
|
|
7
7
|
import { N as NcButton } from "./NcButton-DkC5k3Lb.mjs";
|
|
8
|
-
import { N as NcInputConfirmCancel } from "./NcInputConfirmCancel-
|
|
8
|
+
import { N as NcInputConfirmCancel } from "./NcInputConfirmCancel-DXq3bo7Q.mjs";
|
|
9
9
|
import { useIsMobile } from "../composables/useIsMobile/index.mjs";
|
|
10
10
|
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
11
|
-
import { N as NcActionButton } from "./NcActionButton-
|
|
12
|
-
import { N as NcActions } from "./NcActions-
|
|
11
|
+
import { N as NcActionButton } from "./NcActionButton-D8JTFCmI.mjs";
|
|
12
|
+
import { N as NcActions } from "./NcActions-C-9GKofj.mjs";
|
|
13
13
|
import { N as NcLoadingIcon } from "./NcLoadingIcon-b_ajZ_nQ.mjs";
|
|
14
14
|
import { _ as _sfc_main$4 } from "./NcVNodes.vue_vue_type_script_lang-BqUHinRZ.mjs";
|
|
15
15
|
const _sfc_main$3 = {
|
|
@@ -98,7 +98,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
98
98
|
], 16, _hoisted_1$1);
|
|
99
99
|
}
|
|
100
100
|
const Undo = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
|
|
101
|
-
register(
|
|
101
|
+
register(t21);
|
|
102
102
|
const _sfc_main$1 = {
|
|
103
103
|
name: "NcAppNavigationIconCollapsible",
|
|
104
104
|
components: {
|
|
@@ -160,7 +160,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
160
160
|
}, 8, ["class", "aria-label", "variant", "onClick"]);
|
|
161
161
|
}
|
|
162
162
|
const NcAppNavigationIconCollapsible = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-e6236e50"]]);
|
|
163
|
-
register(
|
|
163
|
+
register(t22, t48);
|
|
164
164
|
const _sfc_main = {
|
|
165
165
|
name: "NcAppNavigationItem",
|
|
166
166
|
components: {
|
|
@@ -638,4 +638,4 @@ const NcAppNavigationItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _
|
|
|
638
638
|
export {
|
|
639
639
|
NcAppNavigationItem as N
|
|
640
640
|
};
|
|
641
|
-
//# sourceMappingURL=NcAppNavigationItem-
|
|
641
|
+
//# sourceMappingURL=NcAppNavigationItem-Bhlr9-Yy.mjs.map
|
package/dist/chunks/{NcAppNavigationItem-DpimA76Q.mjs.map → NcAppNavigationItem-Bhlr9-Yy.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcAppNavigationItem-DpimA76Q.mjs","sources":["../../node_modules/vue-material-design-icons/Pencil.vue","../../node_modules/vue-material-design-icons/Undo.vue","../../src/components/NcAppNavigationItem/NcAppNavigationIconCollapsible.vue","../../src/components/NcAppNavigationItem/NcAppNavigationItem.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon pencil-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"PencilIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon undo-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"UndoIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<!-- Button to expand or collapse children -->\n\t<NcButton\n\t\tclass=\"icon-collapse\"\n\t\t:class=\"{\n\t\t\t'icon-collapse--active': active,\n\t\t\t'icon-collapse--open': open,\n\t\t}\"\n\t\t:aria-label=\"labelButton\"\n\t\t:variant=\"active ? 'tertiary-on-primary' : 'tertiary'\"\n\t\t@click=\"onClick\">\n\t\t<template #icon>\n\t\t\t<ChevronUp\n\t\t\t\tv-if=\"open\"\n\t\t\t\t:size=\"20\" />\n\t\t\t<ChevronDown\n\t\t\t\tv-else\n\t\t\t\t:size=\"20\" />\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script>\nimport ChevronDown from 'vue-material-design-icons/ChevronDown.vue'\nimport ChevronUp from 'vue-material-design-icons/ChevronUp.vue'\nimport { t } from '../../l10n.ts'\nimport NcButton from '../NcButton/index.ts'\n\nexport default {\n\tname: 'NcAppNavigationIconCollapsible',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tChevronDown,\n\t\tChevronUp,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Is the list currently open (or collapsed)\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Is the navigation item currently active.\n\t\t */\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\temits: ['click'],\n\n\tcomputed: {\n\t\tlabelButton() {\n\t\t\treturn this.open ? t('Collapse menu') : t('Open menu')\n\t\t},\n\t},\n\n\tmethods: {\n\t\tonClick(e) {\n\t\t\tthis.$emit('click', e)\n\t\t},\n\t},\n\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.icon-collapse {\n\tposition: relative;\n\tinset-inline-end: 0;\n\n\t// the whole navigation item is hovered thus will have the hover color - to distinguish we need to set a different color here.\n\t&:hover {\n\t\tbackground-color: var(--color-background-dark) !important;\n\t}\n\t&--active:hover {\n\t\tbackground-color: var(--color-primary-element) !important;\n\t}\n}\n</style>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### Usage\n\n#### Simple element\n\n* With an icon:\n\n```vue\n\t<template>\n\t\t<ul>\n\t\t\t<NcAppNavigationItem name=\"My name\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Check :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcAppNavigationItem>\n\t\t</ul>\n\t</template>\n\t<script>\n\timport Check from 'vue-material-design-icons/Check.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tCheck,\n\t\t},\n\t}\n\t</script>\n```\n* With a spinning loader instead of the icon:\n\n```vue\n<ul>\n\t<NcAppNavigationItem name=\"Loading Item\" :loading=\"true\" />\n</ul>\n```\n* With an active state (only needed when not using `vue-router` and the `to` property, otherwise this is set automatically)\n\n```vue\n<ul>\n\t<NcAppNavigationItem name=\"Current page\" :active=\"true\" />\n</ul>\n```\n\n* Using different icons based on the active state (e.g. using vue-router and showing the filled variant for the current route):\n\n```vue\n<template>\n\t<ul>\n\t\t<NcAppNavigationItem name=\"Current page\" :active=\"true\">\n\t\t\t<template #icon=\"{ active }\">\n\t\t\t\t<NcIconSvgWrapper :path=\"active ? mdiFolder : mdiFolderOutline\" />\n\t\t\t</template>\n\t\t</NcAppNavigationItem>\n\t\t<NcAppNavigationItem name=\"Other page\">\n\t\t\t<template #icon=\"{ active }\">\n\t\t\t\t<NcIconSvgWrapper :path=\"active ? mdiFolder : mdiFolderOutline\" />\n\t\t\t</template>\n\t\t</NcAppNavigationItem>\n\t</ul>\n</template>\n<script>\nimport { mdiFolder, mdiFolderOutline } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\treturn {\n\t\t\tmdiFolder,\n\t\t\tmdiFolderOutline,\n\t\t}\n\t},\n}\n</script>\n```\n\n#### Element with actions\nWrap the children in a template. If you have more than 2 actions, a popover menu and a menu\nbutton will be automatically created.\n\n```vue\n\t<template>\n\t\t<div id=\"app-navigation-vue\"><!-- Just a wrapper necessary in the docs. Not needed when NcAppNavigation is correctly used as parent. -->\n\t\t\t<ul>\n\t\t\t\t<NcAppNavigationItem name=\"Item with actions\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Check :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t<template #actions>\n\t\t\t\t\t\t<NcActionButton @click=\"alert('Edit')\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\tEdit\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionButton @click=\"alert('Delete')\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\tDelete\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionLink name=\"Link\" href=\"https://nextcloud.com\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<OpenInNew :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcActionLink>\n\t\t\t\t\t</template>\n\t\t\t\t</NcAppNavigationItem>\n\t\t\t</ul>\n\t\t</div>\n\t</template>\n\t<script>\n\timport Check from 'vue-material-design-icons/Check.vue'\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport OpenInNew from 'vue-material-design-icons/OpenInNew.vue'\n\timport Pencil from 'vue-material-design-icons/Pencil.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tCheck,\n\t\t\tDelete,\n\t\t\tOpenInNew,\n\t\t\tPencil,\n\t\t},\n\t\tmethods: {\n\t\t\talert(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\n#### Element with counter\nJust nest the counter in a template within `<NcAppNavigationItem>` and add `#counter` to it.\n\n```vue\n\t<template>\n\t\t<ul>\n\t\t\t<NcAppNavigationItem name=\"Item with counter\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Folder :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t<template #counter>\n\t\t\t\t\t<NcCounterBubble :count=\"90\" />\n\t\t\t\t</template>\n\t\t\t</NcAppNavigationItem>\n\t\t</ul>\n\t</template>\n\t<script>\n\timport Folder from 'vue-material-design-icons/Folder.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tFolder,\n\t\t},\n\t}\n\t</script>\n```\n\n#### Element with children\n\nWrap the children in a template with the `slot` property and use the prop `allowCollapse` to choose wether to allow or\nprevent the user from collapsing the items.\n\n```vue\n\t<template>\n\t\t<ul>\n\t\t\t<NcAppNavigationItem name=\"Item with children\" :allowCollapse=\"true\" :open=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Folder :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t<template #counter>\n\t\t\t\t\t<NcCounterBubble :count=\"90\" />\n\t\t\t\t</template>\n\t\t\t\t<template #actions>\n\t\t\t\t\t<NcActionButton @click=\"alert('Edit')\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\tEdit\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t<NcActionButton @click=\"alert('Delete')\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\tDelete\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t<NcActionLink name=\"Link\" href=\"https://nextcloud.com\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<OpenInNew :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcActionLink>\n\t\t\t\t</template>\n\t\t\t\t<template #default>\n\t\t\t\t\t<NcAppNavigationItem name=\"AppNavigationItemChild1\" />\n\t\t\t\t\t<NcAppNavigationItem name=\"AppNavigationItemChild2\" />\n\t\t\t\t\t<NcAppNavigationItem name=\"AppNavigationItemChild3\" />\n\t\t\t\t\t<NcAppNavigationItem name=\"AppNavigationItemChild4\" />\n\t\t\t\t</template>\n\t\t\t</NcAppNavigationItem>\n\t\t</ul>\n\t</template>\n\t<script>\n\timport Folder from 'vue-material-design-icons/Folder.vue'\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport OpenInNew from 'vue-material-design-icons/OpenInNew.vue'\n\timport Pencil from 'vue-material-design-icons/Pencil.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tFolder,\n\t\t\tDelete,\n\t\t\tOpenInNew,\n\t\t\tPencil,\n\t\t},\n\t\tmethods: {\n\t\t\talert(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\n#### Editable element\nAdd the prop `:editable=true` and an edit placeholder if you need it. By default\nthe placeholder is the previous name of the element.\n\n```vue\n\t<template>\n\t\t<ul>\n\t\t\t<NcAppNavigationItem name=\"Editable Item\" :editable=\"true\"\n\t\t\t\teditPlaceholder=\"your_placeholder_here\" @update:name=\"function(value){alert(value)}\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Folder :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcAppNavigationItem>\n\t\t</ul>\n\t</template>\n\t<script>\n\timport Folder from 'vue-material-design-icons/Folder.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tFolder,\n\t\t},\n\t\tmethods: {\n\t\t\talert(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\n#### Undo element\nJust set the `undo` and `name` props. When clicking the undo button, an `undo` event is emitted.\n\n```vue\n\t<template>\n\t\t<ul>\n\t\t\t<NcAppNavigationItem :undo=\"true\" name=\"Deleted important entry\" @undo=\"alert('undo delete')\" />\n\t\t</ul>\n\t</template>\n\t<script>\n\texport default {\n\t\tmethods: {\n\t\t\talert(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\n#### Link element\nHref that start by http will be treated as external and opened in a new tab\n```\n<div>\n\t<ul>\n\t\t<NcAppNavigationItem name=\"Files\" href=\"/index.php/apps/files\" />\n\t\t<NcAppNavigationItem name=\"Nextcloud\" href=\"https://nextcloud.com\" />\n\t</ul>\n</div>\n```\n\n#### Custom title\n```\n<ul>\n\t<NcAppNavigationItem name=\"Nextcloud\" title=\"Open the Nextcloud website\" href=\"https://nextcloud.com\" />\n</ul>\n```\n\n#### Pinned element\nJust set the `pinned` prop.\n```\n<ul>\n\t<NcAppNavigationItem name=\"Pinned item\" :pinned=\"true\" />\n</ul>\n```\n</docs>\n\n<template>\n\t<li\n\t\t:id=\"id\"\n\t\t:class=\"{\n\t\t\t'app-navigation-entry--opened': opened,\n\t\t\t'app-navigation-entry--pinned': pinned,\n\t\t\t'app-navigation-entry--collapsible': allowCollapse && !!$slots.default,\n\t\t}\"\n\t\tclass=\"app-navigation-entry-wrapper\">\n\t\t<component\n\t\t\t:is=\"isRouterLink ? 'router-link' : 'NcVNodes'\"\n\t\t\tv-slot=\"{ href: routerLinkHref, navigate, isActive }\"\n\t\t\tv-bind=\"{ ...isRouterLink && { custom: true, to } }\">\n\t\t\t<div\n\t\t\t\tclass=\"app-navigation-entry\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'app-navigation-entry--editing': editingActive,\n\t\t\t\t\t'app-navigation-entry--deleted': undo,\n\t\t\t\t\tactive: (isActive && to) || active,\n\t\t\t\t}\">\n\t\t\t\t<!-- Icon and name -->\n\t\t\t\t<a\n\t\t\t\t\tv-if=\"!undo\"\n\t\t\t\t\tclass=\"app-navigation-entry-link\"\n\t\t\t\t\t:aria-current=\"active || (isActive && to) ? 'page' : undefined\"\n\t\t\t\t\t:aria-description=\"ariaDescription\"\n\t\t\t\t\t:aria-expanded=\"!!$slots.default ? opened.toString() : undefined\"\n\t\t\t\t\t:href=\"href || routerLinkHref || '#'\"\n\t\t\t\t\t:target=\"isExternal(href) ? '_blank' : undefined\"\n\t\t\t\t\t:title=\"title || name\"\n\t\t\t\t\t@blur=\"handleBlur\"\n\t\t\t\t\t@click=\"onClick($event, navigate, routerLinkHref)\"\n\t\t\t\t\t@focus=\"handleFocus\"\n\t\t\t\t\t@keydown.tab.exact=\"handleTab\">\n\n\t\t\t\t\t<!-- icon if not collapsible -->\n\t\t\t\t\t<!-- never show the icon over the collapsible if mobile -->\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"app-navigation-entry-icon\"\n\t\t\t\t\t\t:class=\"{ [icon]: icon }\">\n\t\t\t\t\t\t<NcLoadingIcon v-if=\"loading\" />\n\t\t\t\t\t\t<!-- @slot Slot for the optional leading icon. This slots get the `active`-slot attribute passed which is based on the vue-routers active route or the `active` prop. -->\n\t\t\t\t\t\t<slot v-else name=\"icon\" :active=\"active || (to && isActive)\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<span class=\"app-navigation-entry__name\" :class=\"{ 'hidden-visually': editingActive }\">\n\t\t\t\t\t\t{{ name }}\n\t\t\t\t\t</span>\n\t\t\t\t\t<div v-if=\"editingActive\" class=\"editingContainer\">\n\t\t\t\t\t\t<NcInputConfirmCancel\n\t\t\t\t\t\t\tref=\"editingInput\"\n\t\t\t\t\t\t\tv-model=\"editingValue\"\n\t\t\t\t\t\t\t:placeholder=\"editPlaceholder !== '' ? editPlaceholder : name\"\n\t\t\t\t\t\t\t:primary=\"(isActive && to) || active\"\n\t\t\t\t\t\t\t@cancel=\"cancelEditing\"\n\t\t\t\t\t\t\t@confirm=\"handleEditingDone\" />\n\t\t\t\t\t</div>\n\t\t\t\t</a>\n\n\t\t\t\t<!-- undo entry -->\n\t\t\t\t<div v-if=\"undo\" class=\"app-navigation-entry__deleted\">\n\t\t\t\t\t<div class=\"app-navigation-entry__deleted-description\">\n\t\t\t\t\t\t{{ name }}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Counter and Actions -->\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"(!!$slots.actions || !!$slots.counter || editable || undo) && !editingActive\"\n\t\t\t\t\tclass=\"app-navigation-entry__utils\"\n\t\t\t\t\t:class=\"{ 'app-navigation-entry__utils--display-actions': forceDisplayActions || menuOpenLocalValue || menuOpen }\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-if=\"!!$slots.counter\"\n\t\t\t\t\t\tclass=\"app-navigation-entry__counter-wrapper\">\n\t\t\t\t\t\t<!-- @slot Slot for the `NcCounterBubble` -->\n\t\t\t\t\t\t<slot name=\"counter\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<NcActions\n\t\t\t\t\t\tv-if=\"!!$slots.actions || (editable && !editingActive) || undo\"\n\t\t\t\t\t\tref=\"actions\"\n\t\t\t\t\t\tclass=\"app-navigation-entry__actions\"\n\t\t\t\t\t\tcontainer=\"#app-navigation-vue\"\n\t\t\t\t\t\t:boundaries-element=\"actionsBoundariesElement\"\n\t\t\t\t\t\t:inline=\"inlineActions\"\n\t\t\t\t\t\t:placement=\"menuPlacement\"\n\t\t\t\t\t\t:open=\"menuOpen\"\n\t\t\t\t\t\t:force-menu=\"forceMenu\"\n\t\t\t\t\t\t:default-icon=\"menuIcon\"\n\t\t\t\t\t\t:variant=\"(isActive && to) || active ? 'tertiary-on-primary' : 'tertiary'\"\n\t\t\t\t\t\t@update:open=\"onMenuToggle\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<!-- @slot Slot for the custom menu icon -->\n\t\t\t\t\t\t\t<slot name=\"menu-icon\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<NcActionButton\n\t\t\t\t\t\t\tv-if=\"editable && !editingActive\"\n\t\t\t\t\t\t\t:aria-label=\"editButtonAriaLabel\"\n\t\t\t\t\t\t\t@click=\"handleEdit\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ editLabel }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionButton\n\t\t\t\t\t\t\tv-if=\"undo\"\n\t\t\t\t\t\t\t:aria-label=\"undoButtonAriaLabel\"\n\t\t\t\t\t\t\t@click=\"handleUndo\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Undo :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<!-- @slot Slot for additional `NcAction*` -->\n\t\t\t\t\t\t<slot name=\"actions\" />\n\t\t\t\t\t</NcActions>\n\t\t\t\t</div>\n\t\t\t\t<NcAppNavigationIconCollapsible\n\t\t\t\t\tv-if=\"allowCollapse && !!$slots.default\"\n\t\t\t\t\t:active=\"(isActive && to) || active\"\n\t\t\t\t\t:open=\"opened\"\n\t\t\t\t\t@click.prevent.stop=\"toggleCollapse\" />\n\n\t\t\t\t<!-- @slot Slot for anything (virtual) that should be mounted in the component, like a related modal -->\n\t\t\t\t<slot name=\"extra\" />\n\t\t\t</div>\n\t\t</component>\n\t\t<!-- Children elements -->\n\t\t<ul v-if=\"canHaveChildren && !!$slots.default\" class=\"app-navigation-entry__children\">\n\t\t\t<!-- @slot Slot for children -->\n\t\t\t<slot />\n\t\t</ul>\n\t</li>\n</template>\n\n<script>\nimport Pencil from 'vue-material-design-icons/Pencil.vue'\nimport Undo from 'vue-material-design-icons/Undo.vue'\nimport NcAppNavigationIconCollapsible from './NcAppNavigationIconCollapsible.vue'\nimport NcInputConfirmCancel from './NcInputConfirmCancel.vue'\nimport { useIsMobile } from '../../composables/useIsMobile/index.js'\nimport { t } from '../../l10n.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport NcActionButton from '../NcActionButton/index.js'\nimport NcActions from '../NcActions/index.js'\nimport NcLoadingIcon from '../NcLoadingIcon/index.ts'\nimport NcVNodes from '../NcVNodes/index.ts'\n\nexport default {\n\tname: 'NcAppNavigationItem',\n\n\tcomponents: {\n\t\tNcActions,\n\t\tNcActionButton,\n\t\tNcAppNavigationIconCollapsible,\n\t\tNcInputConfirmCancel,\n\t\tNcLoadingIcon,\n\t\tNcVNodes,\n\t\tPencil,\n\t\tUndo,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * If you are not using vue-router you can use the property to set this item as the active navigation entry.\n\t\t * When using vue-router and the `to` property this is set automatically.\n\t\t */\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The main text content of the entry.\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * The title attribute of the element.\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * id attribute of the list item element\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => createElementId(),\n\t\t\tvalidator: (id) => id.trim() !== '',\n\t\t},\n\n\t\t/**\n\t\t * Refers to the icon on the left, this prop accepts a class\n\t\t * like 'icon-category-enabled'.\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Displays a loading animated icon on the left of the element\n\t\t * instead of the icon.\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Passing in a route will make the root element of this\n\t\t * component a `<router-link />` that points to that route.\n\t\t * By leaving this blank, the root element will be a `<li>`.\n\t\t */\n\t\tto: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * A direct link. This will be used as the `href` attribute.\n\t\t * This will ignore any `to` prop being defined.\n\t\t */\n\t\thref: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Gives the possibility to collapse the children elements into the\n\t\t * parent element (true) or expands the children elements (false).\n\t\t */\n\t\tallowCollapse: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Makes the name of the item editable by providing an `ActionButton`\n\t\t * component that toggles a form\n\t\t */\n\t\teditable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Only for 'editable' items, sets label for the edit action button.\n\t\t */\n\t\teditLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Only for items in 'editable' mode, sets the placeholder text for the editing form.\n\t\t */\n\t\teditPlaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Pins the item to the bottom left area, above the settings. Do not\n\t\t * place 'non-pinned' `AppnavigationItem` components below `pinned`\n\t\t * ones.\n\t\t */\n\t\tpinned: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Puts the item in the 'undo' state.\n\t\t */\n\t\tundo: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The navigation collapsible state (synced)\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The actions menu open state (synced)\n\t\t */\n\t\tmenuOpen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Force the actions to display in a three dot menu\n\t\t */\n\t\tforceMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The action's menu default icon\n\t\t */\n\t\tmenuIcon: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * The action's menu direction\n\t\t */\n\t\tmenuPlacement: {\n\t\t\ttype: String,\n\t\t\tdefault: 'bottom',\n\t\t},\n\n\t\t/**\n\t\t * Entry aria details\n\t\t */\n\t\tariaDescription: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * To be used only when the elements in the actions menu are very important\n\t\t */\n\t\tforceDisplayActions: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Number of action items outside the menu\n\t\t */\n\t\tinlineActions: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:menuOpen',\n\t\t'update:open',\n\t\t'update:name',\n\t\t'click',\n\t\t'undo',\n\t],\n\n\tsetup() {\n\t\treturn {\n\t\t\tisMobile: useIsMobile(),\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tactionsBoundariesElement: undefined,\n\t\t\teditingValue: '',\n\t\t\topened: this.open, // Collapsible state\n\t\t\teditingActive: false,\n\t\t\t/**\n\t\t\t * Tracks the open state of the actions menu\n\t\t\t */\n\t\t\tmenuOpenLocalValue: false,\n\t\t\tfocused: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tisRouterLink() {\n\t\t\treturn this.to && !this.href\n\t\t},\n\n\t\t// Checks if the component is already a children of another\n\t\t// instance of AppNavigationItem\n\t\tcanHaveChildren() {\n\t\t\tif (this.$parent.$options._componentTag === 'AppNavigationItem') {\n\t\t\t\treturn false\n\t\t\t} else {\n\t\t\t\treturn true\n\t\t\t}\n\t\t},\n\n\t\teditButtonAriaLabel() {\n\t\t\treturn this.editLabel ? this.editLabel : t('Edit item')\n\t\t},\n\n\t\tundoButtonAriaLabel() {\n\t\t\treturn t('Undo changes')\n\t\t},\n\t},\n\n\twatch: {\n\t\topen(newVal) {\n\t\t\tthis.opened = newVal\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.actionsBoundariesElement = document.querySelector('#content-vue') || undefined\n\t},\n\n\tmethods: {\n\t\t// sync opened menu state with prop\n\t\tonMenuToggle(state) {\n\t\t\tthis.$emit('update:menuOpen', state)\n\t\t\tthis.menuOpenLocalValue = state\n\t\t},\n\n\t\t// toggle the collapsible state\n\t\ttoggleCollapse() {\n\t\t\tthis.opened = !this.opened\n\t\t\tthis.$emit('update:open', this.opened)\n\t\t},\n\n\t\t/**\n\t\t * Handle link click\n\t\t *\n\t\t * @param {PointerEvent} event - Native click event\n\t\t * @param {Function} [navigate] - VueRouter link's navigate if any\n\t\t * @param {string} [routerLinkHref] - VueRouter link's href\n\t\t */\n\t\tonClick(event, navigate, routerLinkHref) {\n\t\t\t// Always forward native event\n\t\t\tthis.$emit('click', event)\n\t\t\t// Do not navigate with control keys - it is opening in a new tab\n\t\t\tif (event.metaKey || event.altKey || event.ctrlKey || event.shiftKey) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// Prevent default link behaviour if it's a router-link and navigate manually\n\t\t\tif (routerLinkHref) {\n\t\t\t\tnavigate?.(event)\n\t\t\t\tevent.preventDefault()\n\t\t\t}\n\t\t},\n\n\t\t// Edition methods\n\t\thandleEdit() {\n\t\t\tthis.editingValue = this.name\n\t\t\tthis.editingActive = true\n\t\t\tthis.onMenuToggle(false)\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.$refs.editingInput.focusInput()\n\t\t\t})\n\t\t},\n\n\t\tcancelEditing() {\n\t\t\tthis.editingActive = false\n\t\t},\n\n\t\thandleEditingDone() {\n\t\t\tthis.$emit('update:name', this.editingValue)\n\t\t\tthis.editingValue = ''\n\t\t\tthis.editingActive = false\n\t\t},\n\n\t\t// Undo methods\n\t\thandleUndo() {\n\t\t\tthis.$emit('undo')\n\t\t},\n\n\t\t/**\n\t\t * Show actions upon focus\n\t\t */\n\t\thandleFocus() {\n\t\t\tthis.focused = true\n\t\t},\n\n\t\thandleBlur() {\n\t\t\tthis.focused = false\n\t\t},\n\n\t\t/**\n\t\t * This method checks if the root element of the component is focused and\n\t\t * if that's the case it focuses the actions button if available\n\t\t *\n\t\t * @param {Event} e the keydown event\n\t\t */\n\t\thandleTab(e) {\n\t\t\t// If there is no actions menu, do nothing.\n\t\t\tif (!this.$refs.actions) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.focused) {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.$refs.actions.$refs.triggerButton.$el.focus()\n\t\t\t\tthis.focused = false\n\t\t\t} else {\n\t\t\t\tthis.$refs.actions.$refs.triggerButton.$el.blur()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Is this an external link\n\t\t *\n\t\t * @param {string} href The link to check\n\t\t * @return {boolean} Whether it is external or not\n\t\t */\n\t\tisExternal(href) {\n\t\t\t// Match any protocol\n\t\t\treturn href && href.match(/[a-z]+:\\/\\//i)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n@use '../../assets/NcAppNavigationItem.scss';\n</style>\n"],"names":["_sfc_main","_hoisted_3","_createElementBlock","_mergeProps","_createElementVNode","_openBlock","_createBlock","NcVNodes","_normalizeClass","_resolveDynamicComponent","_normalizeProps","_guardReactiveProps","_withCtx","_renderSlot","_createVNode","_toDisplayString","_createTextVNode"],"mappings":";;;;;;;;;;;;;AAoBA,MAAKA,cAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA;IAER,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA;IAEX,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACF;AACF;;;AAxBY,MAAAC,eAAA,EAAA,GAAE,sJAAqJ;;;sBAXjKC,mBAeO,QAfPC,WAAc,KAAA,QAAM;AAAA,IACb,eAAa,OAAA,QAAK,OAAA;AAAA,IAClB,cAAY,OAAA;AAAA,IACb,OAAM;AAAA,IACN,MAAK;AAAA,IACJ,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,YAAE,KAAA,MAAK,SAAU,MAAM;AAAA;kBACjCD,mBAQM,OAAA;AAAA,MARA,MAAM,OAAA;AAAA,MACP,OAAM;AAAA,MACL,OAAO,OAAA;AAAA,MACP,QAAQ,OAAA;AAAA,MACT,SAAQ;AAAA;MACXE,mBAEO,QAFPH,cAEO;AAAA,QADQ,OAAA,SAAbI,UAAA,GAAAH,mBAAuC,uCAAhB,OAAA,KAAK,GAAA,CAAA;;;;;;ACOpC,MAAKF,cAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA;IAER,WAAW;AAAA,MACT,MAAM;AAAA,MACN,SAAS;AAAA;IAEX,MAAM;AAAA,MACJ,MAAM;AAAA,MACN,SAAS;AAAA,IACX;AAAA,EACF;AACF;;;AAxBY,MAAAC,eAAA,EAAA,GAAE,6JAA4J;;;sBAXxKC,mBAeO,QAfPC,WAAc,KAAA,QAAM;AAAA,IACb,eAAa,OAAA,QAAK,OAAA;AAAA,IA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AAAA;;;;IAIb,SAAA,mBAAe,CAAA,CAAM,KAAA,OAAO,WAAtCR,aAAAH,mBAGK,MAHL,YAGK;AAAA,MADJW,WAAQ,KAAA,QAAA,WAAA,CAAA,GAAA,QAAA,IAAA;AAAA;;;;","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"NcAppNavigationItem-Bhlr9-Yy.mjs","sources":["../../node_modules/vue-material-design-icons/Pencil.vue","../../node_modules/vue-material-design-icons/Undo.vue","../../src/components/NcAppNavigationItem/NcAppNavigationIconCollapsible.vue","../../src/components/NcAppNavigationItem/NcAppNavigationItem.vue"],"sourcesContent":["<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon pencil-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"PencilIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"title ? null : 'true'\"\n :aria-label=\"title\"\n class=\"material-design-icon undo-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"UndoIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<template>\n\t<!-- Button to expand or collapse children -->\n\t<NcButton\n\t\tclass=\"icon-collapse\"\n\t\t:class=\"{\n\t\t\t'icon-collapse--active': active,\n\t\t\t'icon-collapse--open': open,\n\t\t}\"\n\t\t:aria-label=\"labelButton\"\n\t\t:variant=\"active ? 'tertiary-on-primary' : 'tertiary'\"\n\t\t@click=\"onClick\">\n\t\t<template #icon>\n\t\t\t<ChevronUp\n\t\t\t\tv-if=\"open\"\n\t\t\t\t:size=\"20\" />\n\t\t\t<ChevronDown\n\t\t\t\tv-else\n\t\t\t\t:size=\"20\" />\n\t\t</template>\n\t</NcButton>\n</template>\n\n<script>\nimport ChevronDown from 'vue-material-design-icons/ChevronDown.vue'\nimport ChevronUp from 'vue-material-design-icons/ChevronUp.vue'\nimport { t } from '../../l10n.ts'\nimport NcButton from '../NcButton/index.ts'\n\nexport default {\n\tname: 'NcAppNavigationIconCollapsible',\n\n\tcomponents: {\n\t\tNcButton,\n\t\tChevronDown,\n\t\tChevronUp,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * Is the list currently open (or collapsed)\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Is the navigation item currently active.\n\t\t */\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true,\n\t\t},\n\t},\n\n\temits: ['click'],\n\n\tcomputed: {\n\t\tlabelButton() {\n\t\t\treturn this.open ? t('Collapse menu') : t('Open menu')\n\t\t},\n\t},\n\n\tmethods: {\n\t\tonClick(e) {\n\t\t\tthis.$emit('click', e)\n\t\t},\n\t},\n\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.icon-collapse {\n\tposition: relative;\n\tinset-inline-end: 0;\n\n\t// the whole navigation item is hovered thus will have the hover color - to distinguish we need to set a different color here.\n\t&:hover {\n\t\tbackground-color: var(--color-background-dark) !important;\n\t}\n\t&--active:hover {\n\t\tbackground-color: var(--color-primary-element) !important;\n\t}\n}\n</style>\n","<!--\n - SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n\n### Usage\n\n#### Simple element\n\n* With an icon:\n\n```vue\n\t<template>\n\t\t<ul>\n\t\t\t<NcAppNavigationItem name=\"My name\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Check :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcAppNavigationItem>\n\t\t</ul>\n\t</template>\n\t<script>\n\timport Check from 'vue-material-design-icons/Check.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tCheck,\n\t\t},\n\t}\n\t</script>\n```\n* With a spinning loader instead of the icon:\n\n```vue\n<ul>\n\t<NcAppNavigationItem name=\"Loading Item\" :loading=\"true\" />\n</ul>\n```\n* With an active state (only needed when not using `vue-router` and the `to` property, otherwise this is set automatically)\n\n```vue\n<ul>\n\t<NcAppNavigationItem name=\"Current page\" :active=\"true\" />\n</ul>\n```\n\n* Using different icons based on the active state (e.g. using vue-router and showing the filled variant for the current route):\n\n```vue\n<template>\n\t<ul>\n\t\t<NcAppNavigationItem name=\"Current page\" :active=\"true\">\n\t\t\t<template #icon=\"{ active }\">\n\t\t\t\t<NcIconSvgWrapper :path=\"active ? mdiFolder : mdiFolderOutline\" />\n\t\t\t</template>\n\t\t</NcAppNavigationItem>\n\t\t<NcAppNavigationItem name=\"Other page\">\n\t\t\t<template #icon=\"{ active }\">\n\t\t\t\t<NcIconSvgWrapper :path=\"active ? mdiFolder : mdiFolderOutline\" />\n\t\t\t</template>\n\t\t</NcAppNavigationItem>\n\t</ul>\n</template>\n<script>\nimport { mdiFolder, mdiFolderOutline } from '@mdi/js'\n\nexport default {\n\tsetup() {\n\t\treturn {\n\t\t\tmdiFolder,\n\t\t\tmdiFolderOutline,\n\t\t}\n\t},\n}\n</script>\n```\n\n#### Element with actions\nWrap the children in a template. If you have more than 2 actions, a popover menu and a menu\nbutton will be automatically created.\n\n```vue\n\t<template>\n\t\t<div id=\"app-navigation-vue\"><!-- Just a wrapper necessary in the docs. Not needed when NcAppNavigation is correctly used as parent. -->\n\t\t\t<ul>\n\t\t\t\t<NcAppNavigationItem name=\"Item with actions\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Check :size=\"20\" />\n\t\t\t\t\t</template>\n\t\t\t\t\t<template #actions>\n\t\t\t\t\t\t<NcActionButton @click=\"alert('Edit')\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\tEdit\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionButton @click=\"alert('Delete')\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\tDelete\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionLink name=\"Link\" href=\"https://nextcloud.com\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<OpenInNew :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcActionLink>\n\t\t\t\t\t</template>\n\t\t\t\t</NcAppNavigationItem>\n\t\t\t</ul>\n\t\t</div>\n\t</template>\n\t<script>\n\timport Check from 'vue-material-design-icons/Check.vue'\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport OpenInNew from 'vue-material-design-icons/OpenInNew.vue'\n\timport Pencil from 'vue-material-design-icons/Pencil.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tCheck,\n\t\t\tDelete,\n\t\t\tOpenInNew,\n\t\t\tPencil,\n\t\t},\n\t\tmethods: {\n\t\t\talert(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\n#### Element with counter\nJust nest the counter in a template within `<NcAppNavigationItem>` and add `#counter` to it.\n\n```vue\n\t<template>\n\t\t<ul>\n\t\t\t<NcAppNavigationItem name=\"Item with counter\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Folder :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t<template #counter>\n\t\t\t\t\t<NcCounterBubble :count=\"90\" />\n\t\t\t\t</template>\n\t\t\t</NcAppNavigationItem>\n\t\t</ul>\n\t</template>\n\t<script>\n\timport Folder from 'vue-material-design-icons/Folder.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tFolder,\n\t\t},\n\t}\n\t</script>\n```\n\n#### Element with children\n\nWrap the children in a template with the `slot` property and use the prop `allowCollapse` to choose wether to allow or\nprevent the user from collapsing the items.\n\n```vue\n\t<template>\n\t\t<ul>\n\t\t\t<NcAppNavigationItem name=\"Item with children\" :allowCollapse=\"true\" :open=\"true\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Folder :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t\t<template #counter>\n\t\t\t\t\t<NcCounterBubble :count=\"90\" />\n\t\t\t\t</template>\n\t\t\t\t<template #actions>\n\t\t\t\t\t<NcActionButton @click=\"alert('Edit')\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\tEdit\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t<NcActionButton @click=\"alert('Delete')\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<Delete :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\tDelete\n\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t<NcActionLink name=\"Link\" href=\"https://nextcloud.com\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<OpenInNew :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcActionLink>\n\t\t\t\t</template>\n\t\t\t\t<template #default>\n\t\t\t\t\t<NcAppNavigationItem name=\"AppNavigationItemChild1\" />\n\t\t\t\t\t<NcAppNavigationItem name=\"AppNavigationItemChild2\" />\n\t\t\t\t\t<NcAppNavigationItem name=\"AppNavigationItemChild3\" />\n\t\t\t\t\t<NcAppNavigationItem name=\"AppNavigationItemChild4\" />\n\t\t\t\t</template>\n\t\t\t</NcAppNavigationItem>\n\t\t</ul>\n\t</template>\n\t<script>\n\timport Folder from 'vue-material-design-icons/Folder.vue'\n\timport Delete from 'vue-material-design-icons/Delete.vue'\n\timport OpenInNew from 'vue-material-design-icons/OpenInNew.vue'\n\timport Pencil from 'vue-material-design-icons/Pencil.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tFolder,\n\t\t\tDelete,\n\t\t\tOpenInNew,\n\t\t\tPencil,\n\t\t},\n\t\tmethods: {\n\t\t\talert(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\n#### Editable element\nAdd the prop `:editable=true` and an edit placeholder if you need it. By default\nthe placeholder is the previous name of the element.\n\n```vue\n\t<template>\n\t\t<ul>\n\t\t\t<NcAppNavigationItem name=\"Editable Item\" :editable=\"true\"\n\t\t\t\teditPlaceholder=\"your_placeholder_here\" @update:name=\"function(value){alert(value)}\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<Folder :size=\"20\" />\n\t\t\t\t</template>\n\t\t\t</NcAppNavigationItem>\n\t\t</ul>\n\t</template>\n\t<script>\n\timport Folder from 'vue-material-design-icons/Folder.vue'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tFolder,\n\t\t},\n\t\tmethods: {\n\t\t\talert(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\n#### Undo element\nJust set the `undo` and `name` props. When clicking the undo button, an `undo` event is emitted.\n\n```vue\n\t<template>\n\t\t<ul>\n\t\t\t<NcAppNavigationItem :undo=\"true\" name=\"Deleted important entry\" @undo=\"alert('undo delete')\" />\n\t\t</ul>\n\t</template>\n\t<script>\n\texport default {\n\t\tmethods: {\n\t\t\talert(msg) {\n\t\t\t\talert(msg)\n\t\t\t},\n\t\t},\n\t}\n\t</script>\n```\n\n#### Link element\nHref that start by http will be treated as external and opened in a new tab\n```\n<div>\n\t<ul>\n\t\t<NcAppNavigationItem name=\"Files\" href=\"/index.php/apps/files\" />\n\t\t<NcAppNavigationItem name=\"Nextcloud\" href=\"https://nextcloud.com\" />\n\t</ul>\n</div>\n```\n\n#### Custom title\n```\n<ul>\n\t<NcAppNavigationItem name=\"Nextcloud\" title=\"Open the Nextcloud website\" href=\"https://nextcloud.com\" />\n</ul>\n```\n\n#### Pinned element\nJust set the `pinned` prop.\n```\n<ul>\n\t<NcAppNavigationItem name=\"Pinned item\" :pinned=\"true\" />\n</ul>\n```\n</docs>\n\n<template>\n\t<li\n\t\t:id=\"id\"\n\t\t:class=\"{\n\t\t\t'app-navigation-entry--opened': opened,\n\t\t\t'app-navigation-entry--pinned': pinned,\n\t\t\t'app-navigation-entry--collapsible': allowCollapse && !!$slots.default,\n\t\t}\"\n\t\tclass=\"app-navigation-entry-wrapper\">\n\t\t<component\n\t\t\t:is=\"isRouterLink ? 'router-link' : 'NcVNodes'\"\n\t\t\tv-slot=\"{ href: routerLinkHref, navigate, isActive }\"\n\t\t\tv-bind=\"{ ...isRouterLink && { custom: true, to } }\">\n\t\t\t<div\n\t\t\t\tclass=\"app-navigation-entry\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t'app-navigation-entry--editing': editingActive,\n\t\t\t\t\t'app-navigation-entry--deleted': undo,\n\t\t\t\t\tactive: (isActive && to) || active,\n\t\t\t\t}\">\n\t\t\t\t<!-- Icon and name -->\n\t\t\t\t<a\n\t\t\t\t\tv-if=\"!undo\"\n\t\t\t\t\tclass=\"app-navigation-entry-link\"\n\t\t\t\t\t:aria-current=\"active || (isActive && to) ? 'page' : undefined\"\n\t\t\t\t\t:aria-description=\"ariaDescription\"\n\t\t\t\t\t:aria-expanded=\"!!$slots.default ? opened.toString() : undefined\"\n\t\t\t\t\t:href=\"href || routerLinkHref || '#'\"\n\t\t\t\t\t:target=\"isExternal(href) ? '_blank' : undefined\"\n\t\t\t\t\t:title=\"title || name\"\n\t\t\t\t\t@blur=\"handleBlur\"\n\t\t\t\t\t@click=\"onClick($event, navigate, routerLinkHref)\"\n\t\t\t\t\t@focus=\"handleFocus\"\n\t\t\t\t\t@keydown.tab.exact=\"handleTab\">\n\n\t\t\t\t\t<!-- icon if not collapsible -->\n\t\t\t\t\t<!-- never show the icon over the collapsible if mobile -->\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass=\"app-navigation-entry-icon\"\n\t\t\t\t\t\t:class=\"{ [icon]: icon }\">\n\t\t\t\t\t\t<NcLoadingIcon v-if=\"loading\" />\n\t\t\t\t\t\t<!-- @slot Slot for the optional leading icon. This slots get the `active`-slot attribute passed which is based on the vue-routers active route or the `active` prop. -->\n\t\t\t\t\t\t<slot v-else name=\"icon\" :active=\"active || (to && isActive)\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<span class=\"app-navigation-entry__name\" :class=\"{ 'hidden-visually': editingActive }\">\n\t\t\t\t\t\t{{ name }}\n\t\t\t\t\t</span>\n\t\t\t\t\t<div v-if=\"editingActive\" class=\"editingContainer\">\n\t\t\t\t\t\t<NcInputConfirmCancel\n\t\t\t\t\t\t\tref=\"editingInput\"\n\t\t\t\t\t\t\tv-model=\"editingValue\"\n\t\t\t\t\t\t\t:placeholder=\"editPlaceholder !== '' ? editPlaceholder : name\"\n\t\t\t\t\t\t\t:primary=\"(isActive && to) || active\"\n\t\t\t\t\t\t\t@cancel=\"cancelEditing\"\n\t\t\t\t\t\t\t@confirm=\"handleEditingDone\" />\n\t\t\t\t\t</div>\n\t\t\t\t</a>\n\n\t\t\t\t<!-- undo entry -->\n\t\t\t\t<div v-if=\"undo\" class=\"app-navigation-entry__deleted\">\n\t\t\t\t\t<div class=\"app-navigation-entry__deleted-description\">\n\t\t\t\t\t\t{{ name }}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<!-- Counter and Actions -->\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"(!!$slots.actions || !!$slots.counter || editable || undo) && !editingActive\"\n\t\t\t\t\tclass=\"app-navigation-entry__utils\"\n\t\t\t\t\t:class=\"{ 'app-navigation-entry__utils--display-actions': forceDisplayActions || menuOpenLocalValue || menuOpen }\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tv-if=\"!!$slots.counter\"\n\t\t\t\t\t\tclass=\"app-navigation-entry__counter-wrapper\">\n\t\t\t\t\t\t<!-- @slot Slot for the `NcCounterBubble` -->\n\t\t\t\t\t\t<slot name=\"counter\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<NcActions\n\t\t\t\t\t\tv-if=\"!!$slots.actions || (editable && !editingActive) || undo\"\n\t\t\t\t\t\tref=\"actions\"\n\t\t\t\t\t\tclass=\"app-navigation-entry__actions\"\n\t\t\t\t\t\tcontainer=\"#app-navigation-vue\"\n\t\t\t\t\t\t:boundaries-element=\"actionsBoundariesElement\"\n\t\t\t\t\t\t:inline=\"inlineActions\"\n\t\t\t\t\t\t:placement=\"menuPlacement\"\n\t\t\t\t\t\t:open=\"menuOpen\"\n\t\t\t\t\t\t:force-menu=\"forceMenu\"\n\t\t\t\t\t\t:default-icon=\"menuIcon\"\n\t\t\t\t\t\t:variant=\"(isActive && to) || active ? 'tertiary-on-primary' : 'tertiary'\"\n\t\t\t\t\t\t@update:open=\"onMenuToggle\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<!-- @slot Slot for the custom menu icon -->\n\t\t\t\t\t\t\t<slot name=\"menu-icon\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<NcActionButton\n\t\t\t\t\t\t\tv-if=\"editable && !editingActive\"\n\t\t\t\t\t\t\t:aria-label=\"editButtonAriaLabel\"\n\t\t\t\t\t\t\t@click=\"handleEdit\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Pencil :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t{{ editLabel }}\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<NcActionButton\n\t\t\t\t\t\t\tv-if=\"undo\"\n\t\t\t\t\t\t\t:aria-label=\"undoButtonAriaLabel\"\n\t\t\t\t\t\t\t@click=\"handleUndo\">\n\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t<Undo :size=\"20\" />\n\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t<!-- @slot Slot for additional `NcAction*` -->\n\t\t\t\t\t\t<slot name=\"actions\" />\n\t\t\t\t\t</NcActions>\n\t\t\t\t</div>\n\t\t\t\t<NcAppNavigationIconCollapsible\n\t\t\t\t\tv-if=\"allowCollapse && !!$slots.default\"\n\t\t\t\t\t:active=\"(isActive && to) || active\"\n\t\t\t\t\t:open=\"opened\"\n\t\t\t\t\t@click.prevent.stop=\"toggleCollapse\" />\n\n\t\t\t\t<!-- @slot Slot for anything (virtual) that should be mounted in the component, like a related modal -->\n\t\t\t\t<slot name=\"extra\" />\n\t\t\t</div>\n\t\t</component>\n\t\t<!-- Children elements -->\n\t\t<ul v-if=\"canHaveChildren && !!$slots.default\" class=\"app-navigation-entry__children\">\n\t\t\t<!-- @slot Slot for children -->\n\t\t\t<slot />\n\t\t</ul>\n\t</li>\n</template>\n\n<script>\nimport Pencil from 'vue-material-design-icons/Pencil.vue'\nimport Undo from 'vue-material-design-icons/Undo.vue'\nimport NcAppNavigationIconCollapsible from './NcAppNavigationIconCollapsible.vue'\nimport NcInputConfirmCancel from './NcInputConfirmCancel.vue'\nimport { useIsMobile } from '../../composables/useIsMobile/index.js'\nimport { t } from '../../l10n.ts'\nimport { createElementId } from '../../utils/createElementId.ts'\nimport NcActionButton from '../NcActionButton/index.js'\nimport NcActions from '../NcActions/index.js'\nimport NcLoadingIcon from '../NcLoadingIcon/index.ts'\nimport NcVNodes from '../NcVNodes/index.ts'\n\nexport default {\n\tname: 'NcAppNavigationItem',\n\n\tcomponents: {\n\t\tNcActions,\n\t\tNcActionButton,\n\t\tNcAppNavigationIconCollapsible,\n\t\tNcInputConfirmCancel,\n\t\tNcLoadingIcon,\n\t\tNcVNodes,\n\t\tPencil,\n\t\tUndo,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * If you are not using vue-router you can use the property to set this item as the active navigation entry.\n\t\t * When using vue-router and the `to` property this is set automatically.\n\t\t */\n\t\tactive: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The main text content of the entry.\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * The title attribute of the element.\n\t\t */\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * id attribute of the list item element\n\t\t */\n\t\tid: {\n\t\t\ttype: String,\n\t\t\tdefault: () => createElementId(),\n\t\t\tvalidator: (id) => id.trim() !== '',\n\t\t},\n\n\t\t/**\n\t\t * Refers to the icon on the left, this prop accepts a class\n\t\t * like 'icon-category-enabled'.\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Displays a loading animated icon on the left of the element\n\t\t * instead of the icon.\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Passing in a route will make the root element of this\n\t\t * component a `<router-link />` that points to that route.\n\t\t * By leaving this blank, the root element will be a `<li>`.\n\t\t */\n\t\tto: {\n\t\t\ttype: [String, Object],\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * A direct link. This will be used as the `href` attribute.\n\t\t * This will ignore any `to` prop being defined.\n\t\t */\n\t\thref: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * Gives the possibility to collapse the children elements into the\n\t\t * parent element (true) or expands the children elements (false).\n\t\t */\n\t\tallowCollapse: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Makes the name of the item editable by providing an `ActionButton`\n\t\t * component that toggles a form\n\t\t */\n\t\teditable: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Only for 'editable' items, sets label for the edit action button.\n\t\t */\n\t\teditLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Only for items in 'editable' mode, sets the placeholder text for the editing form.\n\t\t */\n\t\teditPlaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Pins the item to the bottom left area, above the settings. Do not\n\t\t * place 'non-pinned' `AppnavigationItem` components below `pinned`\n\t\t * ones.\n\t\t */\n\t\tpinned: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Puts the item in the 'undo' state.\n\t\t */\n\t\tundo: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The navigation collapsible state (synced)\n\t\t */\n\t\topen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The actions menu open state (synced)\n\t\t */\n\t\tmenuOpen: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Force the actions to display in a three dot menu\n\t\t */\n\t\tforceMenu: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * The action's menu default icon\n\t\t */\n\t\tmenuIcon: {\n\t\t\ttype: String,\n\t\t\tdefault: undefined,\n\t\t},\n\n\t\t/**\n\t\t * The action's menu direction\n\t\t */\n\t\tmenuPlacement: {\n\t\t\ttype: String,\n\t\t\tdefault: 'bottom',\n\t\t},\n\n\t\t/**\n\t\t * Entry aria details\n\t\t */\n\t\tariaDescription: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\n\t\t/**\n\t\t * To be used only when the elements in the actions menu are very important\n\t\t */\n\t\tforceDisplayActions: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Number of action items outside the menu\n\t\t */\n\t\tinlineActions: {\n\t\t\ttype: Number,\n\t\t\tdefault: 0,\n\t\t},\n\t},\n\n\temits: [\n\t\t'update:menuOpen',\n\t\t'update:open',\n\t\t'update:name',\n\t\t'click',\n\t\t'undo',\n\t],\n\n\tsetup() {\n\t\treturn {\n\t\t\tisMobile: useIsMobile(),\n\t\t}\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tactionsBoundariesElement: undefined,\n\t\t\teditingValue: '',\n\t\t\topened: this.open, // Collapsible state\n\t\t\teditingActive: false,\n\t\t\t/**\n\t\t\t * Tracks the open state of the actions menu\n\t\t\t */\n\t\t\tmenuOpenLocalValue: false,\n\t\t\tfocused: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\tisRouterLink() {\n\t\t\treturn this.to && !this.href\n\t\t},\n\n\t\t// Checks if the component is already a children of another\n\t\t// instance of AppNavigationItem\n\t\tcanHaveChildren() {\n\t\t\tif (this.$parent.$options._componentTag === 'AppNavigationItem') {\n\t\t\t\treturn false\n\t\t\t} else {\n\t\t\t\treturn true\n\t\t\t}\n\t\t},\n\n\t\teditButtonAriaLabel() {\n\t\t\treturn this.editLabel ? this.editLabel : t('Edit item')\n\t\t},\n\n\t\tundoButtonAriaLabel() {\n\t\t\treturn t('Undo changes')\n\t\t},\n\t},\n\n\twatch: {\n\t\topen(newVal) {\n\t\t\tthis.opened = newVal\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.actionsBoundariesElement = document.querySelector('#content-vue') || undefined\n\t},\n\n\tmethods: {\n\t\t// sync opened menu state with prop\n\t\tonMenuToggle(state) {\n\t\t\tthis.$emit('update:menuOpen', state)\n\t\t\tthis.menuOpenLocalValue = state\n\t\t},\n\n\t\t// toggle the collapsible state\n\t\ttoggleCollapse() {\n\t\t\tthis.opened = !this.opened\n\t\t\tthis.$emit('update:open', this.opened)\n\t\t},\n\n\t\t/**\n\t\t * Handle link click\n\t\t *\n\t\t * @param {PointerEvent} event - Native click event\n\t\t * @param {Function} [navigate] - VueRouter link's navigate if any\n\t\t * @param {string} [routerLinkHref] - VueRouter link's href\n\t\t */\n\t\tonClick(event, navigate, routerLinkHref) {\n\t\t\t// Always forward native event\n\t\t\tthis.$emit('click', event)\n\t\t\t// Do not navigate with control keys - it is opening in a new tab\n\t\t\tif (event.metaKey || event.altKey || event.ctrlKey || event.shiftKey) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// Prevent default link behaviour if it's a router-link and navigate manually\n\t\t\tif (routerLinkHref) {\n\t\t\t\tnavigate?.(event)\n\t\t\t\tevent.preventDefault()\n\t\t\t}\n\t\t},\n\n\t\t// Edition methods\n\t\thandleEdit() {\n\t\t\tthis.editingValue = this.name\n\t\t\tthis.editingActive = true\n\t\t\tthis.onMenuToggle(false)\n\t\t\tthis.$nextTick(() => {\n\t\t\t\tthis.$refs.editingInput.focusInput()\n\t\t\t})\n\t\t},\n\n\t\tcancelEditing() {\n\t\t\tthis.editingActive = false\n\t\t},\n\n\t\thandleEditingDone() {\n\t\t\tthis.$emit('update:name', this.editingValue)\n\t\t\tthis.editingValue = ''\n\t\t\tthis.editingActive = false\n\t\t},\n\n\t\t// Undo methods\n\t\thandleUndo() {\n\t\t\tthis.$emit('undo')\n\t\t},\n\n\t\t/**\n\t\t * Show actions upon focus\n\t\t */\n\t\thandleFocus() {\n\t\t\tthis.focused = true\n\t\t},\n\n\t\thandleBlur() {\n\t\t\tthis.focused = false\n\t\t},\n\n\t\t/**\n\t\t * This method checks if the root element of the component is focused and\n\t\t * if that's the case it focuses the actions button if available\n\t\t *\n\t\t * @param {Event} e the keydown event\n\t\t */\n\t\thandleTab(e) {\n\t\t\t// If there is no actions menu, do nothing.\n\t\t\tif (!this.$refs.actions) {\n\t\t\t\treturn\n\t\t\t}\n\t\t\tif (this.focused) {\n\t\t\t\te.preventDefault()\n\t\t\t\tthis.$refs.actions.$refs.triggerButton.$el.focus()\n\t\t\t\tthis.focused = false\n\t\t\t} else {\n\t\t\t\tthis.$refs.actions.$refs.triggerButton.$el.blur()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Is this an external link\n\t\t *\n\t\t * @param {string} href The link to check\n\t\t * @return {boolean} Whether it is external or not\n\t\t */\n\t\tisExternal(href) {\n\t\t\t// Match any protocol\n\t\t\treturn href && href.match(/[a-z]+:\\/\\//i)\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n@use '../../assets/NcAppNavigationItem.scss';\n</style>\n"],"names":["_sfc_main","_hoisted_3","_createElementBlock","_mergeProps","_createElementVNode","_openBlock","_createBlock","NcVNodes","_normalizeClass","_resolveDynamicComponent","_normalizeProps","_guardReactiveProps","_withCtx","_renderSlot","_createVNode","_toDisplayString","_createTextVNode"],"mappings":";;;;;;;;;;;;;AAoBA,MAAKA,cAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO,CAAC,OAAO;AAAA,EACf,OAAO;AAAA,IACL,OAAO;AAAA,MACL,MAAM;AAAA;IAER,WAAW;AAAA,MACT,MAAM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-K0PCYJ22.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../assets/NcAppNavigationNewItem-Dmdd1YSE.css';
|
|
2
|
-
import { N as NcInputConfirmCancel } from "./NcInputConfirmCancel-
|
|
2
|
+
import { N as NcInputConfirmCancel } from "./NcInputConfirmCancel-DXq3bo7Q.mjs";
|
|
3
3
|
import { N as NcLoadingIcon } from "./NcLoadingIcon-b_ajZ_nQ.mjs";
|
|
4
4
|
import { resolveComponent, createElementBlock, openBlock, normalizeClass, createElementVNode, createCommentVNode, createBlock, renderSlot, toDisplayString, createVNode } from "vue";
|
|
5
5
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
@@ -118,4 +118,4 @@ const NcAppNavigationNewItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render"
|
|
|
118
118
|
export {
|
|
119
119
|
NcAppNavigationNewItem as N
|
|
120
120
|
};
|
|
121
|
-
//# sourceMappingURL=NcAppNavigationNewItem-
|
|
121
|
+
//# sourceMappingURL=NcAppNavigationNewItem-K0PCYJ22.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcAppNavigationNewItem-
|
|
1
|
+
{"version":3,"file":"NcAppNavigationNewItem-K0PCYJ22.mjs","sources":["../../src/components/NcAppNavigationNewItem/NcAppNavigationNewItem.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Usage\n\n#### New Item element\n```vue\n\t<template>\n\t\t<NcAppNavigationNewItem name=\"New Item\" @new-item=\"function(value){alert(value)}\">\n\t\t\t<template #icon>\n\t\t\t\t<Plus :size=\"20\" />\n\t\t\t</template>\n\t\t</NcAppNavigationNewItem>\n\t</template>\n\t<script>\n\timport Plus from 'vue-material-design-icons/Plus'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tPlus,\n\t\t},\n\t}\n\t</script>\n```\n\n#### New Item element with a loading animation instead of the icon\n```vue\n\t<template>\n\t\t<NcAppNavigationNewItem name=\"New Item\" :loading=\"true\">\n\t\t\t<template #icon>\n\t\t\t\t<Plus :size=\"20\" />\n\t\t\t</template>\n\t\t</NcAppNavigationNewItem>\n\t</template>\n\t<script>\n\timport Plus from 'vue-material-design-icons/Plus'\n\n\texport default {\n\t\tcomponents: {\n\t\t\tPlus,\n\t\t},\n\t}\n\t</script>\n```\n</docs>\n\n<template>\n\t<li\n\t\tclass=\"app-navigation-entry\"\n\t\t:class=\"{\n\t\t\t'app-navigation-entry--newItemActive': newItemActive,\n\t\t}\">\n\t\t<!-- New Item -->\n\t\t<button class=\"app-navigation-entry-button\" @click=\"handleNewItem\">\n\t\t\t<span\n\t\t\t\tclass=\"app-navigation-entry-icon\"\n\t\t\t\t:class=\"{ [icon]: !loading }\">\n\t\t\t\t<NcLoadingIcon v-if=\"loading\" />\n\t\t\t\t<slot v-else name=\"icon\" />\n\t\t\t</span>\n\n\t\t\t<span v-if=\"!newItemActive\" class=\"app-navigation-new-item__name\" :title=\"name\">\n\t\t\t\t{{ name }}\n\t\t\t</span>\n\n\t\t\t<!-- new Item input -->\n\t\t\t<span v-if=\"newItemActive\" class=\"newItemContainer\">\n\t\t\t\t<NcInputConfirmCancel\n\t\t\t\t\tref=\"newItemInput\"\n\t\t\t\t\tv-model=\"newItemValue\"\n\t\t\t\t\t:placeholder=\"editPlaceholder !== '' ? editPlaceholder : name\"\n\t\t\t\t\t@cancel=\"cancelNewItem\"\n\t\t\t\t\t@confirm=\"handleNewItemDone\" />\n\t\t\t</span>\n\t\t</button>\n\t</li>\n</template>\n\n<script>\nimport NcInputConfirmCancel from '../NcAppNavigationItem/NcInputConfirmCancel.vue'\nimport NcLoadingIcon from '../NcLoadingIcon/index.ts'\n\nexport default {\n\tname: 'NcAppNavigationNewItem',\n\n\tcomponents: {\n\t\tNcInputConfirmCancel,\n\t\tNcLoadingIcon,\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The name of the element.\n\t\t */\n\t\tname: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\n\t\t/**\n\t\t * Refers to the icon on the left, this prop accepts a class\n\t\t * like 'icon-category-enabled'.\n\t\t */\n\t\ticon: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Displays a loading animated icon on the left of the element\n\t\t * instead of the icon.\n\t\t */\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\t/**\n\t\t * Only for 'editable' items, sets label for the edit action button.\n\t\t */\n\t\teditLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * Sets the placeholder text for the editing form.\n\t\t */\n\t\teditPlaceholder: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\temits: ['newItem'],\n\n\tdata() {\n\t\treturn {\n\t\t\tnewItemValue: '',\n\t\t\tnewItemActive: false,\n\t\t}\n\t},\n\n\tmethods: {\n\t\thandleNewItem() {\n\t\t\tif (!this.loading) {\n\t\t\t\tthis.newItemActive = true\n\t\t\t\tthis.$nextTick(() => {\n\t\t\t\t\tthis.$refs.newItemInput.focusInput()\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\n\t\tcancelNewItem() {\n\t\t\tthis.newItemActive = false\n\t\t},\n\n\t\thandleNewItemDone() {\n\t\t\tthis.$emit('newItem', this.newItemValue)\n\t\t\tthis.newItemValue = ''\n\t\t\tthis.newItemActive = false\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n@use '../../assets/NcAppNavigationItem.scss';\n\n.app-navigation-new-item__name {\n\toverflow: hidden;\n\tmax-width: 100%;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n\tpadding-inline-start: 7px;\n\tfont-size: 14px;\n}\n\n.newItemContainer {\n\twidth: calc(100% - var(--default-clickable-area));\n\tmargin: auto;\n}\n</style>\n"],"names":["_createElementBlock","_createElementVNode","_normalizeClass","_createBlock","_renderSlot","_openBlock","_createVNode"],"mappings":";;;;AAqFA,MAAK,YAAU;AAAA,EACd,MAAM;AAAA,EAEN,YAAY;AAAA,IACX;AAAA,IACA;AAAA;EAGD,OAAO;AAAA;AAAA;AAAA;AAAA,IAIN,MAAM;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA;;;;;IAOX,MAAM;AAAA,MACL,MAAM;AAAA,MACN,SAAS;AAAA;;;;;IAOV,SAAS;AAAA,MACR,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMV,WAAW;AAAA,MACV,MAAM;AAAA,MACN,SAAS;AAAA;;;;IAMV,iBAAiB;AAAA,MAChB,MAAM;AAAA,MACN,SAAS;AAAA;;EAIX,OAAO,CAAC,SAAS;AAAA,EAEjB,OAAO;AACN,WAAO;AAAA,MACN,cAAc;AAAA,MACd,eAAe;AAAA,IAChB;AAAA,EACD;AAAA,EAEA,SAAS;AAAA,IACR,gBAAgB;AACf,UAAI,CAAC,KAAK,SAAS;AAClB,aAAK,gBAAgB;AACrB,aAAK,UAAU,MAAM;AACpB,eAAK,MAAM,aAAa,WAAU;AAAA,QACnC,CAAC;AAAA,MACF;AAAA,IACD;AAAA,IAEA,gBAAgB;AACf,WAAK,gBAAgB;AAAA,IACtB;AAAA,IAEA,oBAAoB;AACnB,WAAK,MAAM,WAAW,KAAK,YAAY;AACvC,WAAK,eAAe;AACpB,WAAK,gBAAgB;AAAA,IACtB;AAAA;AAEF;;;;EAjG8B,OAAM;;;;;sBAnBnCA,mBA4BK,MAAA;AAAA,IA3BJ,uBAAM,wBAAsB;AAAA,6CACwB,MAAA;AAAA;;IAIpDC,mBAqBS,UAAA;AAAA,MArBD,OAAM;AAAA,MAA+B,gDAAO,SAAA,iBAAA,SAAA,cAAA,GAAA,IAAA;AAAA;MACnDA,mBAKO,QAAA;AAAA,QAJN,OAAKC,eAAA,CAAC,6BAA2B,EAAA,CACtB,OAAA,IAAI,IAAI,OAAA,SAAO,CAAA;AAAA;QACL,OAAA,wBAArBC,YAAgC,0BAAA,EAAA,KAAA,EAAA,CAAA,KAChCC,WAA2B,KAAA,QAAA,QAAA,EAAA,KAAA,EAAA,GAAA,QAAA,IAAA;AAAA;OAGf,MAAA,8BAAbJ,mBAEO,QAAA;AAAA;QAFqB,OAAM;AAAA,QAAiC,OAAO,OAAA;AAAA,yBACtE,OAAA,IAAI,GAAA,GAAA,UAAA;MAII,MAAA,iBAAZK,aAAAL,mBAOO,QAPP,YAOO;AAAA,QANNM,YAKgC,iCAAA;AAAA,UAJ/B,KAAI;AAAA,sBACK,MAAA;AAAA,uEAAA,MAAA,eAAY;AAAA,UACpB,aAAa,OAAA,oBAAe,KAAU,OAAA,kBAAkB,OAAA;AAAA,UACxD,UAAQ,SAAA;AAAA,UACR,WAAS,SAAA;AAAA;;;;;;"}
|
package/dist/chunks/{NcAppNavigationSearch-Cs14jpSe.mjs → NcAppNavigationSearch-kjDvgdYf.mjs}
RENAMED
|
@@ -2,8 +2,8 @@ import '../assets/NcAppNavigationSearch-CQamlS4X.css';
|
|
|
2
2
|
import { defineComponent, mergeModels, useModel, useSlots, ref, useTemplateRef, watch, createElementBlock, openBlock, normalizeClass, createVNode, createCommentVNode, unref, withCtx, renderSlot, nextTick } from "vue";
|
|
3
3
|
import { useFocusWithin } from "@vueuse/core";
|
|
4
4
|
import { I as IconClose } from "./Close-D6ngJ4t9.mjs";
|
|
5
|
-
import { N as NcInputField } from "./NcInputField-
|
|
6
|
-
import { r as register, a as t } from "./_l10n-
|
|
5
|
+
import { N as NcInputField } from "./NcInputField-BWhRRLNR.mjs";
|
|
6
|
+
import { r as register, a as t } from "./_l10n-C6k5LExr.mjs";
|
|
7
7
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
8
8
|
register();
|
|
9
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -101,4 +101,4 @@ const NcAppNavigationSearch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeI
|
|
|
101
101
|
export {
|
|
102
102
|
NcAppNavigationSearch as N
|
|
103
103
|
};
|
|
104
|
-
//# sourceMappingURL=NcAppNavigationSearch-
|
|
104
|
+
//# sourceMappingURL=NcAppNavigationSearch-kjDvgdYf.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcAppNavigationSearch-
|
|
1
|
+
{"version":3,"file":"NcAppNavigationSearch-kjDvgdYf.mjs","sources":["../../src/components/NcAppNavigationSearch/NcAppNavigationSearch.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n-->\n\n<docs>\n### Usage\n\n```vue\n<template>\n\t<div class=\"styleguide-wrapper\">\n\t\t<NcContent app-name=\"styleguide-app-navigation\" class=\"content-styleguidist\">\n\t\t\t<NcAppNavigation>\n\t\t\t\t<template #search>\n\t\t\t\t\t<NcAppNavigationSearch v-model=\"searchQuery\">\n\t\t\t\t\t\t<template #actions>\n\t\t\t\t\t\t\t<NcActions aria-label=\"Filters\">\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<IconFilter :size=\"20\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t<NcActionButton>\n\t\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t\t<IconAccount :size=\"20\" />\n\t\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t\tFilter by name\n\t\t\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t\t\t<NcActionButton>\n\t\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t\t<IconCalendarAccount :size=\"20\" />\n\t\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t\t\tFilter by year\n\t\t\t\t\t\t\t\t</NcActionButton>\n\t\t\t\t\t\t\t</NcActions>\n\t\t\t\t\t\t\t<NcButton aria-label=\"Search globally\" variant=\"tertiary\">\n\t\t\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t\t\t<IconSearchGlobal :size=\"20\" />\n\t\t\t\t\t\t\t\t</template>\n\t\t\t\t\t\t\t</NcButton>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcAppNavigationSearch>\n\t\t\t\t</template>\n\t\t\t\t<template #list>\n\t\t\t\t\t<NcAppNavigationItem name=\"First navigation entry\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<IconStar :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcAppNavigationItem>\n\t\t\t\t\t<NcAppNavigationItem name=\"Second navigation entry\">\n\t\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t\t<IconStar :size=\"20\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</NcAppNavigationItem>\n\t\t\t\t</template>\n\t\t\t</NcAppNavigation>\n\t\t\t<NcAppContent>\n\t\t\t\t<ul class=\"fake-content\">\n\t\t\t\t\t<li>Search query: {{ searchQuery }}</li>\n\t\t\t\t\t<li v-for=\"(item, index) in items\" :key=\"index\">\n\t\t\t\t\t\t{{ item }}\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</NcAppContent>\n\t\t</NcContent>\n\t</div>\n</template>\n<script>\nimport IconAccount from 'vue-material-design-icons/Account.vue'\nimport IconCalendarAccount from 'vue-material-design-icons/CalendarAccount.vue'\nimport IconFilter from 'vue-material-design-icons/Filter.vue'\nimport IconSearchGlobal from 'vue-material-design-icons/CloudSearch.vue'\nimport IconStar from 'vue-material-design-icons/Star.vue'\n\nconst exampleItem = ['Mary', 'Patricia', 'James', 'Michael']\n\nexport default {\n\tcomponents: {\n\t\tIconAccount,\n\t\tIconCalendarAccount,\n\t\tIconFilter,\n\t\tIconSearchGlobal,\n\t\tIconStar,\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tsearchQuery: '',\n\t\t}\n\t},\n\n\tcomputed: {\n\t\titems() {\n\t\t\treturn exampleItem.filter((item) => item.toLocaleLowerCase().includes(this.searchQuery.toLocaleLowerCase()))\n\t\t},\n\t},\n}\n</script>\n<style scoped>\n/* This styles just mock NcContent and NcAppContent */\n.content-styleguidist {\n\tposition: relative !important;\n\tmargin: 0 !important;\n\t/* prevent jumping */\n\tmin-height: 200px;\n}\n\n.content-styleguidist > * {\n\theight: auto;\n}\n\n.fake-content {\n\tpadding: var(--app-navigation-padding);\n\tpadding-top: calc(2 * var(--app-navigation-padding) + var(--default-clickable-area));\n}\n\n.styleguide-wrapper {\n\tbackground-color: var(--color-background-plain);\n\tpadding: var(--body-container-margin);\n}\n</style>\n```\n</docs>\n\n<template>\n\t<div\n\t\tclass=\"app-navigation-search\"\n\t\t:class=\"{\n\t\t\t'app-navigation-search--has-actions': hasActions(),\n\t\t}\">\n\t\t<NcInputField\n\t\t\tref=\"inputElement\"\n\t\t\tv-model=\"model\"\n\t\t\t:aria-label=\"label\"\n\t\t\tclass=\"app-navigation-search__input\"\n\t\t\tlabel-outside\n\t\t\t:placeholder=\"placeholder ?? label\"\n\t\t\tshow-trailing-button\n\t\t\t:trailing-button-label=\"t('Clear search')\"\n\t\t\ttype=\"search\"\n\t\t\t@trailing-button-click=\"onCloseSearch\">\n\t\t\t<template #trailing-button-icon>\n\t\t\t\t<IconClose :size=\"20\" />\n\t\t\t</template>\n\t\t</NcInputField>\n\t\t<div\n\t\t\tv-if=\"hasActions()\"\n\t\t\tref=\"actions-container-key\"\n\t\t\tclass=\"app-navigation-search__actions\"\n\t\t\t:class=\"{\n\t\t\t\t'app-navigation-search__actions--hidden': !showActions,\n\t\t\t\t'hidden-visually': hideActions,\n\t\t\t}\">\n\t\t\t<slot name=\"actions\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { useFocusWithin } from '@vueuse/core'\nimport { nextTick, ref, useSlots, useTemplateRef, watch } from 'vue'\nimport IconClose from 'vue-material-design-icons/Close.vue'\nimport NcInputField from '../NcInputField/NcInputField.vue'\nimport { t } from '../../l10n.ts'\n\n/**\n * Current search input\n */\nconst model = defineModel<string>({ default: '' })\n\ndefineProps({\n\t/**\n\t * Text used to label the search input\n\t */\n\tlabel: {\n\t\ttype: String,\n\t\tdefault: t('Search …'),\n\t},\n\n\t/**\n\t * Placeholder of the search input\n\t * By default the value of `label` is used.\n\t */\n\tplaceholder: {\n\t\ttype: String,\n\t\tdefault: null,\n\t},\n})\n\nconst slots = useSlots()\n\nconst inputElement = ref()\nconst { focused: inputHasFocus } = useFocusWithin(inputElement)\n\n/** Timeout used to define when the search input is fully expanded */\nconst transitionTimeout = Number.parseInt(window.getComputedStyle(window.document.body).getPropertyValue('--animation-quick')) || 100\n\nconst actionsContainer = useTemplateRef('actions-container-key')\nconst hasActions = () => !!slots.actions?.({})\nconst showActions = ref(true)\nconst timeoutId = ref()\n/** This is used to hide the actions after the transition is done */\nconst hideActions = ref(false)\nwatch(inputHasFocus, () => {\n\tshowActions.value = !inputHasFocus.value\n\twindow.clearTimeout(timeoutId.value)\n\tif (showActions.value) {\n\t\thideActions.value = false\n\t} else {\n\t\t// If the transition is done, we fully hide the actions visually\n\t\twindow.setTimeout(() => {\n\t\t\thideActions.value = !showActions.value\n\t\t}, transitionTimeout)\n\t}\n})\n\n/**\n * Handle close the search\n */\nfunction onCloseSearch() {\n\tmodel.value = ''\n\tif (hasActions()) {\n\t\tshowActions.value = true\n\t\tnextTick(() => actionsContainer.value?.querySelector('button')?.focus())\n\t}\n}\n</script>\n\n<style scoped lang=\"scss\">\n.app-navigation-search {\n\tdisplay: flex;\n\tgap: var(--app-navigation-padding);\n\tpadding: var(--app-navigation-padding);\n\n\t&--has-actions &__input {\n\t\tflex-grow: 1;\n\t\tz-index: 3;\n\t}\n\n\t&__actions {\n\t\tdisplay: flex;\n\t\tgap: var(--default-grid-baseline);\n\n\t\tmargin-inline-start: 0;\n\t\tmax-width: calc(2 * var(--default-clickable-area) + var(--default-grid-baseline));\n\t\tmax-height: var(--default-clickable-area);\n\n\t\ttransition: margin-inline-start var(--animation-quick);\n\n\t\t&--hidden {\n\t\t\tmargin-inline-start: calc(-1 * var(--default-clickable-area));\n\t\t}\n\t}\n}\n</style>\n"],"names":["_useModel","_createElementBlock","_createVNode","_unref","_renderSlot"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsKA,UAAM,QAAQA,SAAmB,SAAA,YAAgB;AAqBjD,UAAM,QAAQ,SAAA;AAEd,UAAM,eAAe,IAAA;AACrB,UAAM,EAAE,SAAS,kBAAkB,eAAe,YAAY;AAG9D,UAAM,oBAAoB,OAAO,SAAS,OAAO,iBAAiB,OAAO,SAAS,IAAI,EAAE,iBAAiB,mBAAmB,CAAC,KAAK;AAElI,UAAM,mBAAmB,eAAe,uBAAuB;AAC/D,UAAM,aAAa,MAAM,CAAC,CAAC,MAAM,UAAU,CAAA,CAAE;AAC7C,UAAM,cAAc,IAAI,IAAI;AAC5B,UAAM,YAAY,IAAA;AAElB,UAAM,cAAc,IAAI,KAAK;AAC7B,UAAM,eAAe,MAAM;AAC1B,kBAAY,QAAQ,CAAC,cAAc;AACnC,aAAO,aAAa,UAAU,KAAK;AACnC,UAAI,YAAY,OAAO;AACtB,oBAAY,QAAQ;AAAA,MACrB,OAAO;AAEN,eAAO,WAAW,MAAM;AACvB,sBAAY,QAAQ,CAAC,YAAY;AAAA,QAClC,GAAG,iBAAiB;AAAA,MACrB;AAAA,IACD,CAAC;AAKD,aAAS,gBAAgB;AACxB,YAAM,QAAQ;AACd,UAAI,cAAc;AACjB,oBAAY,QAAQ;AACpB,iBAAS,MAAM,iBAAiB,OAAO,cAAc,QAAQ,GAAG,OAAO;AAAA,MACxE;AAAA,IACD;;0BApGCC,mBA8BM,OAAA;AAAA,QA7BL,uBAAM,yBAAuB;AAAA,gDACsB,WAAA;AAAA,QAAU;;QAG7DC,YAce,cAAA;AAAA,mBAbV;AAAA,UAAJ,KAAI;AAAA,sBACK,MAAA;AAAA,uEAAA,MAAK,QAAA;AAAA,UACb,cAAY,QAAA;AAAA,UACb,OAAM;AAAA,UACN,iBAAA;AAAA,UACC,aAAa,QAAA,eAAe,QAAA;AAAA,UAC7B,wBAAA;AAAA,UACC,yBAAuBC,MAAA,CAAA,EAAC,cAAA;AAAA,UACzB,MAAK;AAAA,UACJ,uBAAuB;AAAA,QAAA;UACb,gCACV,MAAwB;AAAA,YAAxBD,YAAwB,WAAA,EAAZ,MAAM,IAAE;AAAA,UAAA;;;QAIf,6BADPD,mBASM,OAAA;AAAA;UAPL,KAAI;AAAA,UACJ,uBAAM,kCAAgC;AAAA,uDACmB,YAAA;AAAA,+BAAoC,YAAA;AAAA,UAAA;;UAI7FG,WAAuB,KAAA,QAAA,WAAA,CAAA,GAAA,QAAA,IAAA;AAAA,QAAA;;;;;;"}
|
package/dist/chunks/{NcAppNavigationSettings-D_u5pIPX.mjs → NcAppNavigationSettings-BQFluWDn.mjs}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import '../assets/NcAppNavigationSettings-Bt0dnsjR.css';
|
|
2
2
|
import { defineComponent, ref, useTemplateRef, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, createVNode, unref, withCtx, createTextVNode, toDisplayString, Transition, withDirectives, renderSlot, vShow } from "vue";
|
|
3
|
-
import {
|
|
3
|
+
import { u as mdiCog, v as mdiCogOutline } from "./mdi-D_GPbmUY.mjs";
|
|
4
4
|
import { onClickOutside } from "@vueuse/core";
|
|
5
5
|
import { N as NcButton } from "./NcButton-DkC5k3Lb.mjs";
|
|
6
6
|
import { N as NcIconSvgWrapper } from "./NcIconSvgWrapper-5AA93z-F.mjs";
|
|
7
|
-
import { r as register, a as t } from "./_l10n-
|
|
7
|
+
import { r as register, a as t } from "./_l10n-C6k5LExr.mjs";
|
|
8
8
|
import { c as createElementId } from "./createElementId-DhjFt1I9.mjs";
|
|
9
9
|
import { i as isLegacy } from "./legacy-DcjXBL_t.mjs";
|
|
10
10
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
@@ -95,4 +95,4 @@ const NcAppNavigationSettings = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssM
|
|
|
95
95
|
export {
|
|
96
96
|
NcAppNavigationSettings as N
|
|
97
97
|
};
|
|
98
|
-
//# sourceMappingURL=NcAppNavigationSettings-
|
|
98
|
+
//# sourceMappingURL=NcAppNavigationSettings-BQFluWDn.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcAppNavigationSettings-
|
|
1
|
+
{"version":3,"file":"NcAppNavigationSettings-BQFluWDn.mjs","sources":["../../src/components/NcAppNavigationSettings/NcAppNavigationSettings.vue"],"sourcesContent":["<!--\n - SPDX-FileCopyrightText: 2018 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 { mdiCog, mdiCogOutline } from '@mdi/js'\nimport { onClickOutside } from '@vueuse/core'\nimport { computed, ref, useTemplateRef } from 'vue'\nimport NcButton from '../NcButton/NcButton.vue'\nimport NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'\nimport { t } from '../../l10n.ts'\nimport { createElementId } from '../../utils/createElementId.js'\nimport { isLegacy } from '../../utils/legacy.ts'\n\nconst {\n\texcludeClickOutsideSelectors = [],\n\tname = t('Settings'),\n} = defineProps<{\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\t/**\n\t * Text of the button\n\t *\n\t * @default 'Settings'\n\t */\n\tname?: string\n}>()\n\ndefineSlots<{\n\t/**\n\t * Content of the accordion button (the settings).\n\t */\n\tdefault: Slot\n}>()\n\nconst contentId = createElementId()\n/**\n * Are the settings open\n */\nconst open = ref(false)\n\n// Close the menu when the user clicks outside of the container\nconst container = useTemplateRef('wrapperElement')\nconst ignore = computed(() => Array.isArray(excludeClickOutsideSelectors)\n\t? excludeClickOutsideSelectors\n\t: excludeClickOutsideSelectors.split(' '))\nonClickOutside(container, () => {\n\topen.value = false\n}, { ignore })\n</script>\n\n<template>\n\t<div ref=\"wrapperElement\" :class=\"$style.container\">\n\t\t<div :class=\"$style.header\">\n\t\t\t<NcButton\n\t\t\t\t:aria-controls=\"contentId\"\n\t\t\t\t:aria-expanded=\"open ? 'true' : 'false'\"\n\t\t\t\t:class=\"$style.button\"\n\t\t\t\talignment=\"start\"\n\t\t\t\tvariant=\"tertiary\"\n\t\t\t\twide\n\t\t\t\t@click=\"open = !open\">\n\t\t\t\t<template #icon>\n\t\t\t\t\t<NcIconSvgWrapper :path=\"isLegacy ? mdiCog : mdiCogOutline\" />\n\t\t\t\t</template>\n\t\t\t\t{{ name }}\n\t\t\t</NcButton>\n\t\t</div>\n\t\t<Transition\n\t\t\t:enter-active-class=\"$style.animationActive\"\n\t\t\t:leave-active-class=\"$style.animationActive\"\n\t\t\t:enter-from-class=\"$style.animationStop\"\n\t\t\t:leave-to-class=\"$style.animationStop\">\n\t\t\t<div\n\t\t\t\tv-show=\"open\"\n\t\t\t\t:id=\"contentId\"\n\t\t\t\t:class=\"$style.content\">\n\t\t\t\t<slot />\n\t\t\t</div>\n\t\t</Transition>\n\t</div>\n</template>\n\n<style module>\n.container {\n\tmargin-top: auto;\n\tpadding: var(--default-grid-baseline);\n}\n\n.header {\n\tmargin-block: 0 var(--default-grid-baseline);\n\tmargin-inline: var(--default-grid-baseline);\n}\n\n/* Overwrite the padding to match NcAppNavigationItem */\n.button {\n\tpadding-inline: 0 calc((var(--default-clickable-area) - 16px) / 2) !important;\n\n\t:global(.button-vue__text) {\n\t\tfont-weight: normal;\n\t}\n}\n\n.content {\n\tdisplay: block;\n\tpadding: 10px;\n\n\t/* prevent scrolled contents from stopping too early */\n\tmargin-bottom: calc(-1 * var(--default-grid-baseline));\n\n\t/* restrict height of settings and make scrollable */\n\tmax-height: 300px;\n\toverflow-y: auto;\n}\n\n.animationActive {\n\ttransition-duration: var(--animation-slow);\n\ttransition-property: max-height, padding;\n\toverflow-y: hidden !important;\n}\n\n.animationStop {\n\tmax-height: 0 !important;\n\tpadding: 0 10px !important;\n}\n</style>\n"],"names":["container","_createElementBlock","_normalizeClass","$style","_createElementVNode","_createVNode","_unref","_createTextVNode","name","_Transition","_renderSlot"],"mappings":";;;;;;;;;;;;;;;;;;AA0CA,UAAM,YAAY,gBAAA;AAIlB,UAAM,OAAO,IAAI,KAAK;AAGtB,UAAMA,aAAY,eAAe,gBAAgB;AACjD,UAAM,SAAS,SAAS,MAAM,MAAM,QAAQ,QAAA,4BAA4B,IACrE,QAAA,+BACA,QAAA,6BAA6B,MAAM,GAAG,CAAC;AAC1C,mBAAeA,YAAW,MAAM;AAC/B,WAAK,QAAQ;AAAA,IACd,GAAG,EAAE,QAAQ;;0BAIZC,mBA4BM,OAAA;AAAA,QA5BD,KAAI;AAAA,QAAkB,OAAKC,eAAEC,KAAAA,OAAO,SAAS;AAAA,MAAA;QACjDC,mBAcM,OAAA;AAAA,UAdA,OAAKF,eAAEC,KAAAA,OAAO,MAAM;AAAA,QAAA;UACzBE,YAYW,UAAA;AAAA,YAXT,iBAAeC,MAAA,SAAA;AAAA,YACf,iBAAe,KAAA,QAAI,SAAA;AAAA,YACnB,OAAKJ,eAAEC,KAAAA,OAAO,MAAM;AAAA,YACrB,WAAU;AAAA,YACV,SAAQ;AAAA,YACR,MAAA;AAAA,YACC,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAA,CAAA,WAAE,KAAA,QAAI,CAAI,KAAA;AAAA,UAAA;YACL,cACV,MAA8D;AAAA,cAA9DE,YAA8D,kBAAA;AAAA,gBAA3C,MAAMC,MAAA,QAAA,IAAWA,MAAA,MAAA,IAASA,MAAA,aAAA;AAAA,cAAA;;6BACnC,MACX;AAAA,cADWC,gBAAA,sBACRC,KAAAA,IAAI,GAAA,CAAA;AAAA,YAAA;;;;QAGTH,YAWaI,YAAA;AAAA,UAVX,sBAAoBN,KAAAA,OAAO;AAAA,UAC3B,sBAAoBA,KAAAA,OAAO;AAAA,UAC3B,oBAAkBA,KAAAA,OAAO;AAAA,UACzB,kBAAgBA,KAAAA,OAAO;AAAA,QAAA;2BACxB,MAKM;AAAA,2BALNC,mBAKM,OAAA;AAAA,cAHJ,IAAIE,MAAA,SAAA;AAAA,cACJ,OAAKJ,eAAEC,KAAAA,OAAO,OAAO;AAAA,YAAA;cACtBO,WAAQ,KAAA,QAAA,SAAA;AAAA,YAAA;sBAHA,KAAA,KAAI;AAAA,YAAA;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,11 +2,11 @@ import '../assets/NcAppSettingsDialog-CW1IxPWr.css';
|
|
|
2
2
|
import debounce from "debounce";
|
|
3
3
|
import { resolveComponent, createBlock, createCommentVNode, openBlock, mergeProps, createSlots, withCtx, createElementVNode, renderSlot, createElementBlock, Fragment, renderList, withKeys, withModifiers, normalizeClass, toDisplayString, warn } from "vue";
|
|
4
4
|
import { useIsMobile } from "../composables/useIsMobile/index.mjs";
|
|
5
|
-
import { r as register, g as
|
|
6
|
-
import { N as NcDialog } from "./NcDialog-
|
|
5
|
+
import { r as register, g as t45, a as t } from "./_l10n-C6k5LExr.mjs";
|
|
6
|
+
import { N as NcDialog } from "./NcDialog-Dh9AA41u.mjs";
|
|
7
7
|
import { _ as _sfc_main$1 } from "./NcVNodes.vue_vue_type_script_lang-BqUHinRZ.mjs";
|
|
8
8
|
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.mjs";
|
|
9
|
-
register(
|
|
9
|
+
register(t45);
|
|
10
10
|
const _sfc_main = {
|
|
11
11
|
name: "NcAppSettingsDialog",
|
|
12
12
|
components: {
|
|
@@ -258,4 +258,4 @@ const NcAppSettingsDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _
|
|
|
258
258
|
export {
|
|
259
259
|
NcAppSettingsDialog as N
|
|
260
260
|
};
|
|
261
|
-
//# sourceMappingURL=NcAppSettingsDialog-
|
|
261
|
+
//# sourceMappingURL=NcAppSettingsDialog-ZKhCQoKY.mjs.map
|