@nextcloud/vue 8.9.0 → 8.9.1
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 +6 -0
- package/dist/Components/NcAppNavigation.cjs +1 -1
- package/dist/Components/NcAppNavigation.mjs +1 -1
- package/dist/Components/NcAppNavigationList.cjs +6 -6
- package/dist/Components/NcAppNavigationList.cjs.map +1 -1
- package/dist/Components/NcAppNavigationList.mjs +6 -6
- package/dist/Components/NcAppNavigationList.mjs.map +1 -1
- package/dist/Components/NcDateTimePicker.cjs +2 -2
- package/dist/Components/NcDateTimePicker.mjs +2 -2
- package/dist/Components/NcDateTimePickerNative.cjs +1 -1
- package/dist/Components/NcDateTimePickerNative.mjs +1 -1
- package/dist/Components/NcModal.cjs +1 -1
- package/dist/Components/NcModal.mjs +1 -1
- package/dist/assets/{NcAppNavigation-D4ZBCJrI.css → NcAppNavigation-D2eVie5R.css} +8 -18
- package/dist/assets/{NcAppNavigationList-Bj9PwL4X.css → NcAppNavigationList-BGig8-Dj.css} +7 -3
- package/dist/assets/{NcDateTimePicker-BChLYJ5X.css → NcDateTimePicker-C3D1hmlB.css} +10 -10
- package/dist/chunks/{NcAppNavigation-BRtyTvKt.mjs → NcAppNavigation-C1Qe3lsk.mjs} +16 -16
- package/dist/chunks/NcAppNavigation-C1Qe3lsk.mjs.map +1 -0
- package/dist/chunks/{NcAppNavigation-DMxORgkV.cjs → NcAppNavigation-C423R_m2.cjs} +15 -15
- package/dist/chunks/NcAppNavigation-C423R_m2.cjs.map +1 -0
- package/dist/chunks/{ScopeComponent-LxI8YPnR.mjs → ScopeComponent-DFDrMcn0.mjs} +1 -1
- package/dist/chunks/{ScopeComponent-LxI8YPnR.mjs.map → ScopeComponent-DFDrMcn0.mjs.map} +1 -1
- package/dist/chunks/{ScopeComponent-CSd5rNUA.cjs → ScopeComponent-DXQGLon_.cjs} +1 -1
- package/dist/chunks/{ScopeComponent-CSd5rNUA.cjs.map → ScopeComponent-DXQGLon_.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunks/NcAppNavigation-BRtyTvKt.mjs.map +0 -1
- package/dist/chunks/NcAppNavigation-DMxORgkV.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [v8.9.1](https://github.com/nextcloud-libraries/nextcloud-vue/tree/v8.9.1) (2024-03-06)
|
|
6
|
+
[Full Changelog](https://github.com/nextcloud-libraries/nextcloud-vue/compare/v8.9.0...v8.9.1)
|
|
7
|
+
|
|
8
|
+
### 🐛 Fixed bugs
|
|
9
|
+
* fix: Revert "fix(NcAppNavigation): Wrap app navigation default slot with scrollable container" by @Pytal in https://github.com/nextcloud-libraries/nextcloud-vue/pull/5355
|
|
10
|
+
|
|
5
11
|
## [v8.9.0](https://github.com/nextcloud-libraries/nextcloud-vue/tree/v8.9.0) (2024-03-06)
|
|
6
12
|
[Full Changelog](https://github.com/nextcloud-libraries/nextcloud-vue/compare/v8.8.1...v8.9.0)
|
|
7
13
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
require('../assets/NcAppNavigationList-
|
|
1
|
+
require('../assets/NcAppNavigationList-BGig8-Dj.css');
|
|
2
2
|
"use strict";
|
|
3
|
-
const
|
|
3
|
+
const e = require("../chunks/_plugin-vue2_normalizer-GXKvuwrq.cjs"), s = {
|
|
4
4
|
name: "NcAppNavigationList"
|
|
5
5
|
};
|
|
6
|
-
var
|
|
6
|
+
var a = function() {
|
|
7
7
|
var n = this, t = n._self._c;
|
|
8
8
|
return t("ul", { staticClass: "app-navigation-list" }, [n._t("default")], 2);
|
|
9
|
-
}, i = [], r = /* @__PURE__ */
|
|
10
|
-
e,
|
|
9
|
+
}, i = [], r = /* @__PURE__ */ e.normalizeComponent(
|
|
11
10
|
s,
|
|
11
|
+
a,
|
|
12
12
|
i,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"d44f8d4b",
|
|
16
16
|
null,
|
|
17
17
|
null
|
|
18
18
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcAppNavigationList.cjs","sources":["../../src/components/NcAppNavigationList/NcAppNavigationList.vue"],"sourcesContent":["<!--\n - @copyright 2024 Christopher Ng <chrng8@gmail.com>\n -\n - @author Christopher Ng <chrng8@gmail.com>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n-->\n\n<docs>\n### Description\n\nList wrapper for use in NcAppNavigation.\n\n#### Example\n\nUsage with NcAppNavigationCaption as a heading.\n\n```vue\n<NcAppNavigation>\n\t<NcAppNavigationList>\n\t\t<NcAppNavigationItem name=\"First\" />\n\t\t<NcAppNavigationItem name=\"Second\" />\n\t\t<NcAppNavigationItem name=\"Third\" />\n\t</NcAppNavigationList>\n\t<NcAppNavigationCaption name=\"Sections\" is-heading />\n\t<NcAppNavigationList>\n\t\t<NcAppNavigationItem name=\"Foo\" />\n\t\t<NcAppNavigationItem name=\"Bar\" />\n\t\t<NcAppNavigationItem name=\"Baz\" />\n\t</NcAppNavigationList>\n</NcAppNavigation>\n```\n</docs>\n\n<template>\n\t<ul class=\"app-navigation-list\">\n\t\t<slot />\n\t</ul>\n</template>\n\n<script>\nexport default {\n\tname: 'NcAppNavigationList',\n}\n</script>\n\n<style lang=\"scss\" scoped>\nul.app-navigation-list { // Increase specificity over NcAppNavigation styles\n\tposition: relative;\n\theight: fit-content;\n\twidth: 100%;\n\toverflow:
|
|
1
|
+
{"version":3,"file":"NcAppNavigationList.cjs","sources":["../../src/components/NcAppNavigationList/NcAppNavigationList.vue"],"sourcesContent":["<!--\n - @copyright 2024 Christopher Ng <chrng8@gmail.com>\n -\n - @author Christopher Ng <chrng8@gmail.com>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n-->\n\n<docs>\n### Description\n\nList wrapper for use in NcAppNavigation.\n\n#### Example\n\nUsage with NcAppNavigationCaption as a heading.\n\n```vue\n<NcAppNavigation>\n\t<NcAppNavigationList>\n\t\t<NcAppNavigationItem name=\"First\" />\n\t\t<NcAppNavigationItem name=\"Second\" />\n\t\t<NcAppNavigationItem name=\"Third\" />\n\t</NcAppNavigationList>\n\t<NcAppNavigationCaption name=\"Sections\" is-heading />\n\t<NcAppNavigationList>\n\t\t<NcAppNavigationItem name=\"Foo\" />\n\t\t<NcAppNavigationItem name=\"Bar\" />\n\t\t<NcAppNavigationItem name=\"Baz\" />\n\t</NcAppNavigationList>\n</NcAppNavigation>\n```\n</docs>\n\n<template>\n\t<ul class=\"app-navigation-list\">\n\t\t<slot />\n\t</ul>\n</template>\n\n<script>\nexport default {\n\tname: 'NcAppNavigationList',\n}\n</script>\n\n<style lang=\"scss\" scoped>\nul.app-navigation-list { // Increase specificity over NcAppNavigation styles\n\tposition: relative;\n\theight: fit-content;\n\twidth: 100%;\n\toverflow: unset;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--default-grid-baseline, 4px);\n\tpadding: var(--app-navigation-padding);\n\n\t&:nth-last-of-type(2) {\n\t\t// Fill remaining space before NcAppNavigation footer\n\t\theight: 100%;\n\t\toverflow: auto;\n\t}\n}\n</style>\n"],"names":["_sfc_main"],"mappings":";qEAuDAA,IAAA;AAAA,EACA,MAAA;AACA;;;;;;;;;;;;;;;;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import '../assets/NcAppNavigationList-
|
|
2
|
-
import { n as
|
|
1
|
+
import '../assets/NcAppNavigationList-BGig8-Dj.css';
|
|
2
|
+
import { n as a } from "../chunks/_plugin-vue2_normalizer-Bj5bLKV4.mjs";
|
|
3
3
|
const s = {
|
|
4
4
|
name: "NcAppNavigationList"
|
|
5
5
|
};
|
|
6
6
|
var e = function() {
|
|
7
|
-
var
|
|
8
|
-
return
|
|
9
|
-
}, i = [], r = /* @__PURE__ */
|
|
7
|
+
var n = this, t = n._self._c;
|
|
8
|
+
return t("ul", { staticClass: "app-navigation-list" }, [n._t("default")], 2);
|
|
9
|
+
}, i = [], r = /* @__PURE__ */ a(
|
|
10
10
|
s,
|
|
11
11
|
e,
|
|
12
12
|
i,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"d44f8d4b",
|
|
16
16
|
null,
|
|
17
17
|
null
|
|
18
18
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NcAppNavigationList.mjs","sources":["../../src/components/NcAppNavigationList/NcAppNavigationList.vue"],"sourcesContent":["<!--\n - @copyright 2024 Christopher Ng <chrng8@gmail.com>\n -\n - @author Christopher Ng <chrng8@gmail.com>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n-->\n\n<docs>\n### Description\n\nList wrapper for use in NcAppNavigation.\n\n#### Example\n\nUsage with NcAppNavigationCaption as a heading.\n\n```vue\n<NcAppNavigation>\n\t<NcAppNavigationList>\n\t\t<NcAppNavigationItem name=\"First\" />\n\t\t<NcAppNavigationItem name=\"Second\" />\n\t\t<NcAppNavigationItem name=\"Third\" />\n\t</NcAppNavigationList>\n\t<NcAppNavigationCaption name=\"Sections\" is-heading />\n\t<NcAppNavigationList>\n\t\t<NcAppNavigationItem name=\"Foo\" />\n\t\t<NcAppNavigationItem name=\"Bar\" />\n\t\t<NcAppNavigationItem name=\"Baz\" />\n\t</NcAppNavigationList>\n</NcAppNavigation>\n```\n</docs>\n\n<template>\n\t<ul class=\"app-navigation-list\">\n\t\t<slot />\n\t</ul>\n</template>\n\n<script>\nexport default {\n\tname: 'NcAppNavigationList',\n}\n</script>\n\n<style lang=\"scss\" scoped>\nul.app-navigation-list { // Increase specificity over NcAppNavigation styles\n\tposition: relative;\n\theight: fit-content;\n\twidth: 100%;\n\toverflow:
|
|
1
|
+
{"version":3,"file":"NcAppNavigationList.mjs","sources":["../../src/components/NcAppNavigationList/NcAppNavigationList.vue"],"sourcesContent":["<!--\n - @copyright 2024 Christopher Ng <chrng8@gmail.com>\n -\n - @author Christopher Ng <chrng8@gmail.com>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n-->\n\n<docs>\n### Description\n\nList wrapper for use in NcAppNavigation.\n\n#### Example\n\nUsage with NcAppNavigationCaption as a heading.\n\n```vue\n<NcAppNavigation>\n\t<NcAppNavigationList>\n\t\t<NcAppNavigationItem name=\"First\" />\n\t\t<NcAppNavigationItem name=\"Second\" />\n\t\t<NcAppNavigationItem name=\"Third\" />\n\t</NcAppNavigationList>\n\t<NcAppNavigationCaption name=\"Sections\" is-heading />\n\t<NcAppNavigationList>\n\t\t<NcAppNavigationItem name=\"Foo\" />\n\t\t<NcAppNavigationItem name=\"Bar\" />\n\t\t<NcAppNavigationItem name=\"Baz\" />\n\t</NcAppNavigationList>\n</NcAppNavigation>\n```\n</docs>\n\n<template>\n\t<ul class=\"app-navigation-list\">\n\t\t<slot />\n\t</ul>\n</template>\n\n<script>\nexport default {\n\tname: 'NcAppNavigationList',\n}\n</script>\n\n<style lang=\"scss\" scoped>\nul.app-navigation-list { // Increase specificity over NcAppNavigation styles\n\tposition: relative;\n\theight: fit-content;\n\twidth: 100%;\n\toverflow: unset;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--default-grid-baseline, 4px);\n\tpadding: var(--app-navigation-padding);\n\n\t&:nth-last-of-type(2) {\n\t\t// Fill remaining space before NcAppNavigation footer\n\t\theight: 100%;\n\t\toverflow: auto;\n\t}\n}\n</style>\n"],"names":["_sfc_main"],"mappings":";AAuDA,MAAAA,IAAA;AAAA,EACA,MAAA;AACA;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
require('../assets/NcDateTimePicker-
|
|
1
|
+
require('../assets/NcDateTimePicker-C3D1hmlB.css');
|
|
2
2
|
"use strict";
|
|
3
|
-
const r = require("../chunks/_l10n-B986q8RC.cjs"), p = require("../chunks/GenRandomId-B2O1GMbH.cjs"), d = require("../chunks/NcTimezonePicker-C-Ci2IuC.cjs"), m = require("../chunks/NcPopover-h-t7Dnjk.cjs"), i = require("../chunks/_plugin-vue2_normalizer-GXKvuwrq.cjs"), o = require("@nextcloud/l10n"), f = require("vue2-datepicker"), h = require("../chunks/ScopeComponent-
|
|
3
|
+
const r = require("../chunks/_l10n-B986q8RC.cjs"), p = require("../chunks/GenRandomId-B2O1GMbH.cjs"), d = require("../chunks/NcTimezonePicker-C-Ci2IuC.cjs"), m = require("../chunks/NcPopover-h-t7Dnjk.cjs"), i = require("../chunks/_plugin-vue2_normalizer-GXKvuwrq.cjs"), o = require("@nextcloud/l10n"), f = require("vue2-datepicker"), h = require("../chunks/ScopeComponent-DXQGLon_.cjs"), _ = (n) => n && n.__esModule ? n : { default: n }, g = /* @__PURE__ */ _(f);
|
|
4
4
|
r.register(r.t33);
|
|
5
5
|
const v = {
|
|
6
6
|
name: "CalendarBlankIcon",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../assets/NcDateTimePicker-
|
|
1
|
+
import '../assets/NcDateTimePicker-C3D1hmlB.css';
|
|
2
2
|
import { r as c, F as u, a as l } from "../chunks/_l10n-D8Scz3mH.mjs";
|
|
3
3
|
import { G as p } from "../chunks/GenRandomId-BW3iYFf9.mjs";
|
|
4
4
|
import { N as m } from "../chunks/NcTimezonePicker-gvp9MAcg.mjs";
|
|
@@ -6,7 +6,7 @@ import { N as d } from "../chunks/NcPopover--V3R3EKV.mjs";
|
|
|
6
6
|
import { n as o } from "../chunks/_plugin-vue2_normalizer-Bj5bLKV4.mjs";
|
|
7
7
|
import { getMonthNames as f, getMonthNamesShort as h, getDayNames as _, getDayNamesShort as g, getDayNamesMin as y, getFirstDay as v } from "@nextcloud/l10n";
|
|
8
8
|
import C from "vue2-datepicker";
|
|
9
|
-
import { S as k } from "../chunks/ScopeComponent-
|
|
9
|
+
import { S as k } from "../chunks/ScopeComponent-DFDrMcn0.mjs";
|
|
10
10
|
c(u);
|
|
11
11
|
const w = {
|
|
12
12
|
name: "CalendarBlankIcon",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require('../assets/NcDateTimePickerNative-DnLJu29_.css');
|
|
2
2
|
"use strict";
|
|
3
|
-
const c = require("../chunks/_plugin-vue2_normalizer-GXKvuwrq.cjs"), h = require("../chunks/ScopeComponent-
|
|
3
|
+
const c = require("../chunks/_plugin-vue2_normalizer-GXKvuwrq.cjs"), h = require("../chunks/ScopeComponent-DXQGLon_.cjs"), f = ["date", "datetime-local", "month", "time", "week"], y = {
|
|
4
4
|
name: "NcDateTimePickerNative",
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '../assets/NcDateTimePickerNative-DnLJu29_.css';
|
|
2
2
|
import { n as f } from "../chunks/_plugin-vue2_normalizer-Bj5bLKV4.mjs";
|
|
3
|
-
import { S as h } from "../chunks/ScopeComponent-
|
|
3
|
+
import { S as h } from "../chunks/ScopeComponent-DFDrMcn0.mjs";
|
|
4
4
|
const p = ["date", "datetime-local", "month", "time", "week"], c = {
|
|
5
5
|
name: "NcDateTimePickerNative",
|
|
6
6
|
inheritAttrs: !1,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require('../assets/NcModal-CwgrmxSg.css');
|
|
2
2
|
"use strict";
|
|
3
|
-
const u = require("../chunks/ScopeComponent-
|
|
3
|
+
const u = require("../chunks/ScopeComponent-DXQGLon_.cjs"), r = require("../chunks/focusTrap-xauhLvvr.cjs"), i = require("../chunks/_l10n-B986q8RC.cjs"), d = require("../chunks/GenRandomId-B2O1GMbH.cjs"), h = require("../chunks/NcActions-Dfkog_G0.cjs"), p = require("./NcButton.cjs");
|
|
4
4
|
require("../Directives/Tooltip.cjs");
|
|
5
5
|
const l = require("../chunks/_plugin-vue2_normalizer-GXKvuwrq.cjs"), f = require("../chunks/ChevronRight-BAJhNawb.cjs"), m = require("../chunks/Close-DBfrdXMw.cjs"), _ = require("focus-trap"), y = require("@vueuse/core"), w = require("floating-vue");
|
|
6
6
|
i.register(i.t16, i.t30);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../assets/NcModal-CwgrmxSg.css';
|
|
2
|
-
import { S as c } from "../chunks/ScopeComponent-
|
|
2
|
+
import { S as c } from "../chunks/ScopeComponent-DFDrMcn0.mjs";
|
|
3
3
|
import { g as r } from "../chunks/focusTrap-Be9GEB5C.mjs";
|
|
4
4
|
import { r as u, D as d, E as p, a as i } from "../chunks/_l10n-D8Scz3mH.mjs";
|
|
5
5
|
import { G as h } from "../chunks/GenRandomId-BW3iYFf9.mjs";
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
32
|
*
|
|
33
33
|
*/
|
|
34
|
-
.material-design-icon[data-v-
|
|
34
|
+
.material-design-icon[data-v-bddd2251] {
|
|
35
35
|
display: flex;
|
|
36
36
|
align-self: center;
|
|
37
37
|
justify-self: center;
|
|
38
38
|
align-items: center;
|
|
39
39
|
justify-content: center;
|
|
40
40
|
}
|
|
41
|
-
.app-navigation[data-v-
|
|
41
|
+
.app-navigation[data-v-bddd2251] {
|
|
42
42
|
--color-text-maxcontrast: var(--color-text-maxcontrast-background-blur, var(--color-text-maxcontrast-default));
|
|
43
43
|
transition: transform var(--animation-quick), margin var(--animation-quick);
|
|
44
44
|
width: 300px;
|
|
@@ -60,22 +60,12 @@
|
|
|
60
60
|
-webkit-backdrop-filter: var(--filter-background-blur, none);
|
|
61
61
|
backdrop-filter: var(--filter-background-blur, none);
|
|
62
62
|
}
|
|
63
|
-
.app-navigation--close[data-v-
|
|
63
|
+
.app-navigation--close[data-v-bddd2251] {
|
|
64
64
|
transform: translate(-100%);
|
|
65
65
|
position: absolute;
|
|
66
66
|
}
|
|
67
|
-
.app-
|
|
68
|
-
|
|
69
|
-
height: 100%;
|
|
70
|
-
width: 100%;
|
|
71
|
-
overflow-x: hidden;
|
|
72
|
-
overflow-y: auto;
|
|
73
|
-
box-sizing: border-box;
|
|
74
|
-
display: flex;
|
|
75
|
-
flex-direction: column;
|
|
76
|
-
}
|
|
77
|
-
.app-navigation__content > ul[data-v-8f240f6a],
|
|
78
|
-
.app-navigation__list[data-v-8f240f6a] {
|
|
67
|
+
.app-navigation__content > ul[data-v-bddd2251],
|
|
68
|
+
.app-navigation__list[data-v-bddd2251] {
|
|
79
69
|
position: relative;
|
|
80
70
|
height: 100%;
|
|
81
71
|
width: 100%;
|
|
@@ -87,16 +77,16 @@
|
|
|
87
77
|
gap: var(--default-grid-baseline, 4px);
|
|
88
78
|
padding: var(--app-navigation-padding);
|
|
89
79
|
}
|
|
90
|
-
.app-navigation__content[data-v-
|
|
80
|
+
.app-navigation__content[data-v-bddd2251] {
|
|
91
81
|
height: 100%;
|
|
92
82
|
display: flex;
|
|
93
83
|
flex-direction: column;
|
|
94
84
|
}
|
|
95
|
-
[data-themes*=highcontrast] .app-navigation[data-v-
|
|
85
|
+
[data-themes*=highcontrast] .app-navigation[data-v-bddd2251] {
|
|
96
86
|
border-right: 1px solid var(--color-border);
|
|
97
87
|
}
|
|
98
88
|
@media only screen and (max-width: 1024px) {
|
|
99
|
-
.app-navigation[data-v-
|
|
89
|
+
.app-navigation[data-v-bddd2251]:not(.app-navigation--close) {
|
|
100
90
|
position: absolute;
|
|
101
91
|
}
|
|
102
92
|
}
|
|
@@ -20,21 +20,25 @@
|
|
|
20
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
.material-design-icon[data-v-
|
|
23
|
+
.material-design-icon[data-v-d44f8d4b] {
|
|
24
24
|
display: flex;
|
|
25
25
|
align-self: center;
|
|
26
26
|
justify-self: center;
|
|
27
27
|
align-items: center;
|
|
28
28
|
justify-content: center;
|
|
29
29
|
}
|
|
30
|
-
ul.app-navigation-list[data-v-
|
|
30
|
+
ul.app-navigation-list[data-v-d44f8d4b] {
|
|
31
31
|
position: relative;
|
|
32
32
|
height: fit-content;
|
|
33
33
|
width: 100%;
|
|
34
|
-
overflow:
|
|
34
|
+
overflow: unset;
|
|
35
35
|
box-sizing: border-box;
|
|
36
36
|
display: flex;
|
|
37
37
|
flex-direction: column;
|
|
38
38
|
gap: var(--default-grid-baseline, 4px);
|
|
39
39
|
padding: var(--app-navigation-padding);
|
|
40
40
|
}
|
|
41
|
+
ul.app-navigation-list[data-v-d44f8d4b]:nth-last-of-type(2) {
|
|
42
|
+
height: 100%;
|
|
43
|
+
overflow: auto;
|
|
44
|
+
}
|
|
@@ -424,32 +424,32 @@
|
|
|
424
424
|
color: #ccc;
|
|
425
425
|
background-color: #f3f3f3;
|
|
426
426
|
}
|
|
427
|
-
.mx-datepicker[data-v-
|
|
427
|
+
.mx-datepicker[data-v-07a5dfb] {
|
|
428
428
|
-webkit-user-select: none;
|
|
429
429
|
user-select: none;
|
|
430
430
|
color: var(--color-main-text);
|
|
431
431
|
}
|
|
432
|
-
.mx-datepicker[data-v-
|
|
432
|
+
.mx-datepicker[data-v-07a5dfb] svg {
|
|
433
433
|
fill: var(--color-main-text);
|
|
434
434
|
}
|
|
435
|
-
.mx-datepicker[data-v-
|
|
435
|
+
.mx-datepicker[data-v-07a5dfb] .mx-input-wrapper .mx-input {
|
|
436
436
|
width: 100%;
|
|
437
437
|
border: 2px solid var(--color-border-maxcontrast);
|
|
438
438
|
background-color: var(--color-main-background);
|
|
439
439
|
background-clip: content-box;
|
|
440
440
|
}
|
|
441
|
-
.mx-datepicker[data-v-
|
|
442
|
-
.mx-datepicker[data-v-
|
|
443
|
-
.mx-datepicker[data-v-
|
|
441
|
+
.mx-datepicker[data-v-07a5dfb] .mx-input-wrapper .mx-input:active:not(.disabled),
|
|
442
|
+
.mx-datepicker[data-v-07a5dfb] .mx-input-wrapper .mx-input:hover:not(.disabled),
|
|
443
|
+
.mx-datepicker[data-v-07a5dfb] .mx-input-wrapper .mx-input:focus:not(.disabled) {
|
|
444
444
|
border-color: var(--color-primary-element);
|
|
445
445
|
}
|
|
446
|
-
.mx-datepicker[data-v-
|
|
447
|
-
.mx-datepicker[data-v-
|
|
446
|
+
.mx-datepicker[data-v-07a5dfb] .mx-input-wrapper:disabled,
|
|
447
|
+
.mx-datepicker[data-v-07a5dfb] .mx-input-wrapper.disabled {
|
|
448
448
|
cursor: not-allowed;
|
|
449
449
|
opacity: .7;
|
|
450
450
|
}
|
|
451
|
-
.mx-datepicker[data-v-
|
|
452
|
-
.mx-datepicker[data-v-
|
|
451
|
+
.mx-datepicker[data-v-07a5dfb] .mx-input-wrapper .mx-icon-calendar,
|
|
452
|
+
.mx-datepicker[data-v-07a5dfb] .mx-input-wrapper .mx-icon-clear {
|
|
453
453
|
color: var(--color-text-lighter);
|
|
454
454
|
}
|
|
455
455
|
.mx-datepicker-main {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import '../assets/NcAppNavigation-
|
|
1
|
+
import '../assets/NcAppNavigation-D2eVie5R.css';
|
|
2
2
|
import { useIsMobile as n } from "../Composables/useIsMobile.mjs";
|
|
3
3
|
import { g as s } from "./focusTrap-Be9GEB5C.mjs";
|
|
4
|
-
import { subscribe as p, emit as o, unsubscribe as
|
|
5
|
-
import { createFocusTrap as
|
|
4
|
+
import { subscribe as p, emit as o, unsubscribe as r } from "@nextcloud/event-bus";
|
|
5
|
+
import { createFocusTrap as l } from "focus-trap";
|
|
6
6
|
import { N as g } from "./NcAppNavigationToggle-BZxbkhCr.mjs";
|
|
7
7
|
import c from "vue";
|
|
8
8
|
import { n as u } from "./_plugin-vue2_normalizer-Bj5bLKV4.mjs";
|
|
@@ -56,7 +56,7 @@ const d = {
|
|
|
56
56
|
mounted() {
|
|
57
57
|
this.setHasAppNavigation(!0), p("toggle-navigation", this.toggleNavigationByEventBus), o("navigation-toggled", {
|
|
58
58
|
open: this.open
|
|
59
|
-
}), this.focusTrap =
|
|
59
|
+
}), this.focusTrap = l(this.$refs.appNavigationContainer, {
|
|
60
60
|
allowOutsideClick: !0,
|
|
61
61
|
fallbackFocus: this.$refs.appNavigationContainer,
|
|
62
62
|
trapStack: s(),
|
|
@@ -64,7 +64,7 @@ const d = {
|
|
|
64
64
|
}), this.toggleFocusTrap();
|
|
65
65
|
},
|
|
66
66
|
unmounted() {
|
|
67
|
-
this.setHasAppNavigation(!1),
|
|
67
|
+
this.setHasAppNavigation(!1), r("toggle-navigation", this.toggleNavigationByEventBus), this.focusTrap.deactivate();
|
|
68
68
|
},
|
|
69
69
|
methods: {
|
|
70
70
|
/**
|
|
@@ -72,23 +72,23 @@ const d = {
|
|
|
72
72
|
*
|
|
73
73
|
* @param {boolean} [state] set the state instead of inverting the current one
|
|
74
74
|
*/
|
|
75
|
-
toggleNavigation(
|
|
76
|
-
if (this.open ===
|
|
75
|
+
toggleNavigation(a) {
|
|
76
|
+
if (this.open === a) {
|
|
77
77
|
o("navigation-toggled", {
|
|
78
78
|
open: this.open
|
|
79
79
|
});
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
this.open = typeof
|
|
83
|
-
const t = getComputedStyle(document.body),
|
|
82
|
+
this.open = typeof a > "u" ? !this.open : a;
|
|
83
|
+
const t = getComputedStyle(document.body), e = parseInt(t.getPropertyValue("--animation-quick")) || 100;
|
|
84
84
|
setTimeout(() => {
|
|
85
85
|
o("navigation-toggled", {
|
|
86
86
|
open: this.open
|
|
87
87
|
});
|
|
88
|
-
}, 1.5 *
|
|
88
|
+
}, 1.5 * e);
|
|
89
89
|
},
|
|
90
|
-
toggleNavigationByEventBus({ open:
|
|
91
|
-
this.toggleNavigation(
|
|
90
|
+
toggleNavigationByEventBus({ open: a }) {
|
|
91
|
+
this.toggleNavigation(a);
|
|
92
92
|
},
|
|
93
93
|
/**
|
|
94
94
|
* Activate focus trap if it is currently needed, otherwise deactivate
|
|
@@ -102,17 +102,17 @@ const d = {
|
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
104
|
var f = function() {
|
|
105
|
-
var t = this,
|
|
106
|
-
return
|
|
105
|
+
var t = this, e = t._self._c;
|
|
106
|
+
return e("div", { ref: "appNavigationContainer", staticClass: "app-navigation", class: { "app-navigation--close": !t.open } }, [e("nav", { staticClass: "app-navigation__content", attrs: { id: "app-navigation-vue", "aria-hidden": t.open ? "false" : "true", "aria-label": t.ariaLabel || void 0, "aria-labelledby": t.ariaLabelledby || void 0, inert: !t.open || void 0 }, on: { keydown: function(i) {
|
|
107
107
|
return !i.type.indexOf("key") && t._k(i.keyCode, "esc", 27, i.key, ["Esc", "Escape"]) ? null : t.handleEsc.apply(null, arguments);
|
|
108
|
-
} } }, [t
|
|
108
|
+
} } }, [t._t("default"), t.$scopedSlots.list ? e("ul", { staticClass: "app-navigation__list" }, [t._t("list")], 2) : t._e(), t._t("footer")], 2), e("NcAppNavigationToggle", { attrs: { open: t.open }, on: { "update:open": t.toggleNavigation } })], 1);
|
|
109
109
|
}, v = [], h = /* @__PURE__ */ u(
|
|
110
110
|
d,
|
|
111
111
|
f,
|
|
112
112
|
v,
|
|
113
113
|
!1,
|
|
114
114
|
null,
|
|
115
|
-
"
|
|
115
|
+
"bddd2251",
|
|
116
116
|
null,
|
|
117
117
|
null
|
|
118
118
|
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NcAppNavigation-C1Qe3lsk.mjs","sources":["../../src/components/NcAppNavigation/NcAppNavigation.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n -\n - @author Christoph Wurst <christoph@winzerhof-wurst.at>\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n<docs>\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<template>\n\t<div ref=\"appNavigationContainer\"\n\t\tclass=\"app-navigation\"\n\t\t:class=\"{'app-navigation--close':!open }\">\n\t\t<nav id=\"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<slot />\n\t\t\t<!-- List for Navigation li-items -->\n\t\t\t<ul v-if=\"$scopedSlots.list\" class=\"app-navigation__list\">\n\t\t\t\t<slot name=\"list\" />\n\t\t\t</ul>\n\n\t\t\t<!-- Footer for e.g. AppNavigationSettings -->\n\t\t\t<slot name=\"footer\" />\n\t\t</nav>\n\t\t<NcAppNavigationToggle :open=\"open\" @update:open=\"toggleNavigation\" />\n\t</div>\n</template>\n\n<script>\nimport { useIsMobile } from '../../composables/useIsMobile/index.js'\nimport { getTrapStack } from '../../utils/focusTrap.js'\nimport { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { createFocusTrap } from 'focus-trap'\n\nimport NcAppNavigationToggle from '../NcAppNavigationToggle/index.js'\nimport Vue from 'vue'\n\nexport default {\n\tname: 'NcAppNavigation',\n\n\tcomponents: {\n\t\tNcAppNavigationToggle,\n\t},\n\n\t// Injected from NcContent\n\tinject: {\n\t\tsetHasAppNavigation: {\n\t\t\tdefault: () => () => Vue.util.warn('NcAppNavigation is not mounted inside NcContent, this is probably an error.'),\n\t\t\tfrom: 'NcContent:setHasAppNavigation',\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The aria label to describe the navigation\n\t\t */\n\t\tariaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-labelledby attribute to describe the navigation\n\t\t */\n\t\tariaLabelledby: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\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\topen: !this.isMobile,\n\t\t\tfocusTrap: null,\n\t\t}\n\t},\n\n\twatch: {\n\t\tisMobile() {\n\t\t\tthis.open = !this.isMobile\n\t\t\tthis.toggleFocusTrap()\n\t\t},\n\t\topen() {\n\t\t\tthis.toggleFocusTrap()\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.setHasAppNavigation(true)\n\t\tsubscribe('toggle-navigation', this.toggleNavigationByEventBus)\n\t\t// Emit an event with the initial state of the navigation\n\t\temit('navigation-toggled', {\n\t\t\topen: this.open,\n\t\t})\n\n\t\tthis.focusTrap = createFocusTrap(this.$refs.appNavigationContainer, {\n\t\t\tallowOutsideClick: true,\n\t\t\tfallbackFocus: this.$refs.appNavigationContainer,\n\t\t\ttrapStack: getTrapStack(),\n\t\t\tescapeDeactivates: false,\n\t\t})\n\t\tthis.toggleFocusTrap()\n\t},\n\tunmounted() {\n\t\tthis.setHasAppNavigation(false)\n\t\tunsubscribe('toggle-navigation', this.toggleNavigationByEventBus)\n\t\tthis.focusTrap.deactivate()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Toggle the navigation\n\t\t *\n\t\t * @param {boolean} [state] set the state instead of inverting the current one\n\t\t */\n\t\ttoggleNavigation(state) {\n\t\t\t// Early return if alreay in that state\n\t\t\tif (this.open === state) {\n\t\t\t\temit('navigation-toggled', {\n\t\t\t\t\topen: this.open,\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.open = (typeof state === 'undefined') ? !this.open : state\n\t\t\tconst bodyStyles = getComputedStyle(document.body)\n\t\t\tconst animationLength = parseInt(bodyStyles.getPropertyValue('--animation-quick')) || 100\n\n\t\t\tsetTimeout(() => {\n\t\t\t\temit('navigation-toggled', {\n\t\t\t\t\topen: this.open,\n\t\t\t\t})\n\t\t\t// We wait for 1.5 times the animation length to give the animation time to really finish.\n\t\t\t}, 1.5 * animationLength)\n\t\t},\n\n\t\ttoggleNavigationByEventBus({ open }) {\n\t\t\tthis.toggleNavigation(open)\n\t\t},\n\n\t\t/**\n\t\t * Activate focus trap if it is currently needed, otherwise deactivate\n\t\t */\n\t\ttoggleFocusTrap() {\n\t\t\tif (this.isMobile && this.open) {\n\t\t\t\tthis.focusTrap.activate()\n\t\t\t} else {\n\t\t\t\tthis.focusTrap.deactivate()\n\t\t\t}\n\t\t},\n\n\t\thandleEsc() {\n\t\t\tif (this.isMobile) {\n\t\t\t\tthis.toggleNavigation(false)\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n.app-navigation,\n.app-content {\n\t/** Distance of the app naviation 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\tmax-width: calc(100vw - (var(--app-navigation-padding) + var(--default-clickable-area) + var(--default-grid-baseline)));\n\tposition: relative;\n\ttop: 0;\n\tleft: 0;\n\tpadding: 0px;\n\t// Above appcontent\n\tz-index: 1800;\n\theight: 100%;\n\tbox-sizing: border-box;\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&--close {\n\t\ttransform: translateX(-100%);\n\t\tposition: absolute;\n\t}\n\n\t&__content > ul,\n\t&__list {\n\t\tposition: relative;\n\t\theight: 100%;\n\t\twidth: 100%;\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\tbox-sizing: border-box;\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\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-right: 1px solid var(--color-border);\n\t}\n}\n\n// When on mobile, we make the navigation slide over the appcontent\n@media only screen and (max-width: $breakpoint-mobile) {\n\t.app-navigation:not(.app-navigation--close) {\n\t\tposition: absolute;\n\t}\n}\n</style>\n"],"names":["_sfc_main","NcAppNavigationToggle","Vue","useIsMobile","subscribe","emit","createFocusTrap","getTrapStack","unsubscribe","state","bodyStyles","animationLength","open"],"mappings":";;;;;;;AAwFA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,uBAAAC;AAAA,EACA;AAAA;AAAA,EAGA,QAAA;AAAA,IACA,qBAAA;AAAA,MACA,SAAA,MAAA,MAAAC,EAAA,KAAA,KAAA,6EAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,QAAA;AACA,WAAA;AAAA,MACA,UAAAC,EAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,MAAA,CAAA,KAAA;AAAA,MACA,WAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,WAAA;AACA,WAAA,OAAA,CAAA,KAAA,UACA,KAAA,gBAAA;AAAA,IACA;AAAA,IACA,OAAA;AACA,WAAA,gBAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,SAAA,oBAAA,EAAA,GACAC,EAAA,qBAAA,KAAA,0BAAA,GAEAC,EAAA,sBAAA;AAAA,MACA,MAAA,KAAA;AAAA,IACA,CAAA,GAEA,KAAA,YAAAC,EAAA,KAAA,MAAA,wBAAA;AAAA,MACA,mBAAA;AAAA,MACA,eAAA,KAAA,MAAA;AAAA,MACA,WAAAC,EAAA;AAAA,MACA,mBAAA;AAAA,IACA,CAAA,GACA,KAAA,gBAAA;AAAA,EACA;AAAA,EACA,YAAA;AACA,SAAA,oBAAA,EAAA,GACAC,EAAA,qBAAA,KAAA,0BAAA,GACA,KAAA,UAAA,WAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,iBAAAC,GAAA;AAEA,UAAA,KAAA,SAAAA,GAAA;AACA,QAAAJ,EAAA,sBAAA;AAAA,UACA,MAAA,KAAA;AAAA,QACA,CAAA;AACA;AAAA,MACA;AAEA,WAAA,OAAA,OAAAI,IAAA,MAAA,CAAA,KAAA,OAAAA;AACA,YAAAC,IAAA,iBAAA,SAAA,IAAA,GACAC,IAAA,SAAAD,EAAA,iBAAA,mBAAA,CAAA,KAAA;AAEA,iBAAA,MAAA;AACA,QAAAL,EAAA,sBAAA;AAAA,UACA,MAAA,KAAA;AAAA,QACA,CAAA;AAAA,MAEA,GAAA,MAAAM,CAAA;AAAA,IACA;AAAA,IAEA,2BAAA,EAAA,MAAAC,KAAA;AACA,WAAA,iBAAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,kBAAA;AACA,MAAA,KAAA,YAAA,KAAA,OACA,KAAA,UAAA,SAAA,IAEA,KAAA,UAAA,WAAA;AAAA,IAEA;AAAA,IAEA,YAAA;AACA,MAAA,KAAA,YACA,KAAA,iBAAA,EAAA;AAAA,IAEA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
require('../assets/NcAppNavigation-
|
|
1
|
+
require('../assets/NcAppNavigation-D2eVie5R.css');
|
|
2
2
|
"use strict";
|
|
3
|
-
const o = require("../Composables/useIsMobile.cjs"), s = require("./focusTrap-xauhLvvr.cjs"), i = require("@nextcloud/event-bus"), p = require("focus-trap"), l = require("./NcAppNavigationToggle-DDChOnAq.cjs"), r = require("vue"), g = require("./_plugin-vue2_normalizer-GXKvuwrq.cjs"), u = (
|
|
3
|
+
const o = require("../Composables/useIsMobile.cjs"), s = require("./focusTrap-xauhLvvr.cjs"), i = require("@nextcloud/event-bus"), p = require("focus-trap"), l = require("./NcAppNavigationToggle-DDChOnAq.cjs"), r = require("vue"), g = require("./_plugin-vue2_normalizer-GXKvuwrq.cjs"), u = (t) => t && t.__esModule ? t : { default: t }, c = /* @__PURE__ */ u(r), d = {
|
|
4
4
|
name: "NcAppNavigation",
|
|
5
5
|
components: {
|
|
6
6
|
NcAppNavigationToggle: l.NcAppNavigationToggle
|
|
@@ -66,23 +66,23 @@ const o = require("../Composables/useIsMobile.cjs"), s = require("./focusTrap-xa
|
|
|
66
66
|
*
|
|
67
67
|
* @param {boolean} [state] set the state instead of inverting the current one
|
|
68
68
|
*/
|
|
69
|
-
toggleNavigation(
|
|
70
|
-
if (this.open ===
|
|
69
|
+
toggleNavigation(t) {
|
|
70
|
+
if (this.open === t) {
|
|
71
71
|
i.emit("navigation-toggled", {
|
|
72
72
|
open: this.open
|
|
73
73
|
});
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
|
-
this.open = typeof
|
|
77
|
-
const
|
|
76
|
+
this.open = typeof t > "u" ? !this.open : t;
|
|
77
|
+
const e = getComputedStyle(document.body), a = parseInt(e.getPropertyValue("--animation-quick")) || 100;
|
|
78
78
|
setTimeout(() => {
|
|
79
79
|
i.emit("navigation-toggled", {
|
|
80
80
|
open: this.open
|
|
81
81
|
});
|
|
82
82
|
}, 1.5 * a);
|
|
83
83
|
},
|
|
84
|
-
toggleNavigationByEventBus({ open:
|
|
85
|
-
this.toggleNavigation(
|
|
84
|
+
toggleNavigationByEventBus({ open: t }) {
|
|
85
|
+
this.toggleNavigation(t);
|
|
86
86
|
},
|
|
87
87
|
/**
|
|
88
88
|
* Activate focus trap if it is currently needed, otherwise deactivate
|
|
@@ -96,19 +96,19 @@ const o = require("../Composables/useIsMobile.cjs"), s = require("./focusTrap-xa
|
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
var v = function() {
|
|
99
|
-
var
|
|
100
|
-
return a("div", { ref: "appNavigationContainer", staticClass: "app-navigation", class: { "app-navigation--close": !
|
|
101
|
-
return !n.type.indexOf("key") &&
|
|
102
|
-
} } }, [
|
|
99
|
+
var e = this, a = e._self._c;
|
|
100
|
+
return a("div", { ref: "appNavigationContainer", staticClass: "app-navigation", class: { "app-navigation--close": !e.open } }, [a("nav", { staticClass: "app-navigation__content", attrs: { id: "app-navigation-vue", "aria-hidden": e.open ? "false" : "true", "aria-label": e.ariaLabel || void 0, "aria-labelledby": e.ariaLabelledby || void 0, inert: !e.open || void 0 }, on: { keydown: function(n) {
|
|
101
|
+
return !n.type.indexOf("key") && e._k(n.keyCode, "esc", 27, n.key, ["Esc", "Escape"]) ? null : e.handleEsc.apply(null, arguments);
|
|
102
|
+
} } }, [e._t("default"), e.$scopedSlots.list ? a("ul", { staticClass: "app-navigation__list" }, [e._t("list")], 2) : e._e(), e._t("footer")], 2), a("NcAppNavigationToggle", { attrs: { open: e.open }, on: { "update:open": e.toggleNavigation } })], 1);
|
|
103
103
|
}, f = [], h = /* @__PURE__ */ g.normalizeComponent(
|
|
104
104
|
d,
|
|
105
105
|
v,
|
|
106
106
|
f,
|
|
107
107
|
!1,
|
|
108
108
|
null,
|
|
109
|
-
"
|
|
109
|
+
"bddd2251",
|
|
110
110
|
null,
|
|
111
111
|
null
|
|
112
112
|
);
|
|
113
|
-
const
|
|
114
|
-
exports.NcAppNavigation =
|
|
113
|
+
const N = h.exports;
|
|
114
|
+
exports.NcAppNavigation = N;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NcAppNavigation-C423R_m2.cjs","sources":["../../src/components/NcAppNavigation/NcAppNavigation.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n -\n - @author Christoph Wurst <christoph@winzerhof-wurst.at>\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n<docs>\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<template>\n\t<div ref=\"appNavigationContainer\"\n\t\tclass=\"app-navigation\"\n\t\t:class=\"{'app-navigation--close':!open }\">\n\t\t<nav id=\"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<slot />\n\t\t\t<!-- List for Navigation li-items -->\n\t\t\t<ul v-if=\"$scopedSlots.list\" class=\"app-navigation__list\">\n\t\t\t\t<slot name=\"list\" />\n\t\t\t</ul>\n\n\t\t\t<!-- Footer for e.g. AppNavigationSettings -->\n\t\t\t<slot name=\"footer\" />\n\t\t</nav>\n\t\t<NcAppNavigationToggle :open=\"open\" @update:open=\"toggleNavigation\" />\n\t</div>\n</template>\n\n<script>\nimport { useIsMobile } from '../../composables/useIsMobile/index.js'\nimport { getTrapStack } from '../../utils/focusTrap.js'\nimport { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { createFocusTrap } from 'focus-trap'\n\nimport NcAppNavigationToggle from '../NcAppNavigationToggle/index.js'\nimport Vue from 'vue'\n\nexport default {\n\tname: 'NcAppNavigation',\n\n\tcomponents: {\n\t\tNcAppNavigationToggle,\n\t},\n\n\t// Injected from NcContent\n\tinject: {\n\t\tsetHasAppNavigation: {\n\t\t\tdefault: () => () => Vue.util.warn('NcAppNavigation is not mounted inside NcContent, this is probably an error.'),\n\t\t\tfrom: 'NcContent:setHasAppNavigation',\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The aria label to describe the navigation\n\t\t */\n\t\tariaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-labelledby attribute to describe the navigation\n\t\t */\n\t\tariaLabelledby: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\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\topen: !this.isMobile,\n\t\t\tfocusTrap: null,\n\t\t}\n\t},\n\n\twatch: {\n\t\tisMobile() {\n\t\t\tthis.open = !this.isMobile\n\t\t\tthis.toggleFocusTrap()\n\t\t},\n\t\topen() {\n\t\t\tthis.toggleFocusTrap()\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.setHasAppNavigation(true)\n\t\tsubscribe('toggle-navigation', this.toggleNavigationByEventBus)\n\t\t// Emit an event with the initial state of the navigation\n\t\temit('navigation-toggled', {\n\t\t\topen: this.open,\n\t\t})\n\n\t\tthis.focusTrap = createFocusTrap(this.$refs.appNavigationContainer, {\n\t\t\tallowOutsideClick: true,\n\t\t\tfallbackFocus: this.$refs.appNavigationContainer,\n\t\t\ttrapStack: getTrapStack(),\n\t\t\tescapeDeactivates: false,\n\t\t})\n\t\tthis.toggleFocusTrap()\n\t},\n\tunmounted() {\n\t\tthis.setHasAppNavigation(false)\n\t\tunsubscribe('toggle-navigation', this.toggleNavigationByEventBus)\n\t\tthis.focusTrap.deactivate()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Toggle the navigation\n\t\t *\n\t\t * @param {boolean} [state] set the state instead of inverting the current one\n\t\t */\n\t\ttoggleNavigation(state) {\n\t\t\t// Early return if alreay in that state\n\t\t\tif (this.open === state) {\n\t\t\t\temit('navigation-toggled', {\n\t\t\t\t\topen: this.open,\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.open = (typeof state === 'undefined') ? !this.open : state\n\t\t\tconst bodyStyles = getComputedStyle(document.body)\n\t\t\tconst animationLength = parseInt(bodyStyles.getPropertyValue('--animation-quick')) || 100\n\n\t\t\tsetTimeout(() => {\n\t\t\t\temit('navigation-toggled', {\n\t\t\t\t\topen: this.open,\n\t\t\t\t})\n\t\t\t// We wait for 1.5 times the animation length to give the animation time to really finish.\n\t\t\t}, 1.5 * animationLength)\n\t\t},\n\n\t\ttoggleNavigationByEventBus({ open }) {\n\t\t\tthis.toggleNavigation(open)\n\t\t},\n\n\t\t/**\n\t\t * Activate focus trap if it is currently needed, otherwise deactivate\n\t\t */\n\t\ttoggleFocusTrap() {\n\t\t\tif (this.isMobile && this.open) {\n\t\t\t\tthis.focusTrap.activate()\n\t\t\t} else {\n\t\t\t\tthis.focusTrap.deactivate()\n\t\t\t}\n\t\t},\n\n\t\thandleEsc() {\n\t\t\tif (this.isMobile) {\n\t\t\t\tthis.toggleNavigation(false)\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n.app-navigation,\n.app-content {\n\t/** Distance of the app naviation 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\tmax-width: calc(100vw - (var(--app-navigation-padding) + var(--default-clickable-area) + var(--default-grid-baseline)));\n\tposition: relative;\n\ttop: 0;\n\tleft: 0;\n\tpadding: 0px;\n\t// Above appcontent\n\tz-index: 1800;\n\theight: 100%;\n\tbox-sizing: border-box;\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&--close {\n\t\ttransform: translateX(-100%);\n\t\tposition: absolute;\n\t}\n\n\t&__content > ul,\n\t&__list {\n\t\tposition: relative;\n\t\theight: 100%;\n\t\twidth: 100%;\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\tbox-sizing: border-box;\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\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-right: 1px solid var(--color-border);\n\t}\n}\n\n// When on mobile, we make the navigation slide over the appcontent\n@media only screen and (max-width: $breakpoint-mobile) {\n\t.app-navigation:not(.app-navigation--close) {\n\t\tposition: absolute;\n\t}\n}\n</style>\n"],"names":["_sfc_main","NcAppNavigationToggle","Vue","useIsMobile","subscribe","emit","createFocusTrap","getTrapStack","unsubscribe","state","bodyStyles","animationLength","open"],"mappings":";2WAwFAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,uBAAAC,EAAA;AAAA,EACA;AAAA;AAAA,EAGA,QAAA;AAAA,IACA,qBAAA;AAAA,MACA,SAAA,MAAA,MAAAC,EAAAA,QAAA,KAAA,KAAA,6EAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,QAAA;AACA,WAAA;AAAA,MACA,UAAAC,EAAAA,YAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,MAAA,CAAA,KAAA;AAAA,MACA,WAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,WAAA;AACA,WAAA,OAAA,CAAA,KAAA,UACA,KAAA,gBAAA;AAAA,IACA;AAAA,IACA,OAAA;AACA,WAAA,gBAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,SAAA,oBAAA,EAAA,GACAC,YAAA,qBAAA,KAAA,0BAAA,GAEAC,EAAAA,KAAA,sBAAA;AAAA,MACA,MAAA,KAAA;AAAA,IACA,CAAA,GAEA,KAAA,YAAAC,EAAAA,gBAAA,KAAA,MAAA,wBAAA;AAAA,MACA,mBAAA;AAAA,MACA,eAAA,KAAA,MAAA;AAAA,MACA,WAAAC,EAAAA,aAAA;AAAA,MACA,mBAAA;AAAA,IACA,CAAA,GACA,KAAA,gBAAA;AAAA,EACA;AAAA,EACA,YAAA;AACA,SAAA,oBAAA,EAAA,GACAC,cAAA,qBAAA,KAAA,0BAAA,GACA,KAAA,UAAA,WAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,iBAAAC,GAAA;AAEA,UAAA,KAAA,SAAAA,GAAA;AACAJ,QAAAA,EAAAA,KAAA,sBAAA;AAAA,UACA,MAAA,KAAA;AAAA,QACA,CAAA;AACA;AAAA,MACA;AAEA,WAAA,OAAA,OAAAI,IAAA,MAAA,CAAA,KAAA,OAAAA;AACA,YAAAC,IAAA,iBAAA,SAAA,IAAA,GACAC,IAAA,SAAAD,EAAA,iBAAA,mBAAA,CAAA,KAAA;AAEA,iBAAA,MAAA;AACAL,QAAAA,EAAAA,KAAA,sBAAA;AAAA,UACA,MAAA,KAAA;AAAA,QACA,CAAA;AAAA,MAEA,GAAA,MAAAM,CAAA;AAAA,IACA;AAAA,IAEA,2BAAA,EAAA,MAAAC,KAAA;AACA,WAAA,iBAAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,kBAAA;AACA,MAAA,KAAA,YAAA,KAAA,OACA,KAAA,UAAA,SAAA,IAEA,KAAA,UAAA,WAAA;AAAA,IAEA;AAAA,IAEA,YAAA;AACA,MAAA,KAAA,YACA,KAAA,iBAAA,EAAA;AAAA,IAEA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
const e = (t) => {
|
|
23
23
|
t.mounted ? Array.isArray(t.mounted) || (t.mounted = [t.mounted]) : t.mounted = [], t.mounted.push(function() {
|
|
24
|
-
this.$el.setAttribute("data-v-
|
|
24
|
+
this.$el.setAttribute("data-v-07a5dfb", "");
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
27
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScopeComponent-
|
|
1
|
+
{"version":3,"file":"ScopeComponent-DFDrMcn0.mjs","sources":["../../src/utils/ScopeComponent.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nconst ScopeComponent = (Component) => {\n\t// Init mounted vue if none\n\tif (!Component.mounted) {\n\t\tComponent.mounted = []\n\t} else if (!Array.isArray(Component.mounted)) {\n\t\tComponent.mounted = [Component.mounted]\n\t}\n\n\t// Inject root scoping function\n\tComponent.mounted.push(function() {\n\t\tthis.$el.setAttribute(`data-v-${SCOPE_VERSION}`, '')\n\t})\n}\n\nexport default ScopeComponent\n"],"names":["ScopeComponent","Component"],"mappings":"AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBK,MAACA,IAAiB,CAACC,MAAc;AAErC,EAAKA,EAAU,UAEH,MAAM,QAAQA,EAAU,OAAO,MAC1CA,EAAU,UAAU,CAACA,EAAU,OAAO,KAFtCA,EAAU,UAAU,CAAE,GAMvBA,EAAU,QAAQ,KAAK,WAAW;AACjC,SAAK,IAAI,aAAa,kBAA2B,EAAE;AAAA,EACrD,CAAE;AACF;"}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*/
|
|
23
23
|
const e = (t) => {
|
|
24
24
|
t.mounted ? Array.isArray(t.mounted) || (t.mounted = [t.mounted]) : t.mounted = [], t.mounted.push(function() {
|
|
25
|
-
this.$el.setAttribute("data-v-
|
|
25
|
+
this.$el.setAttribute("data-v-07a5dfb", "");
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
28
|
exports.ScopeComponent = e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScopeComponent-
|
|
1
|
+
{"version":3,"file":"ScopeComponent-DXQGLon_.cjs","sources":["../../src/utils/ScopeComponent.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nconst ScopeComponent = (Component) => {\n\t// Init mounted vue if none\n\tif (!Component.mounted) {\n\t\tComponent.mounted = []\n\t} else if (!Array.isArray(Component.mounted)) {\n\t\tComponent.mounted = [Component.mounted]\n\t}\n\n\t// Inject root scoping function\n\tComponent.mounted.push(function() {\n\t\tthis.$el.setAttribute(`data-v-${SCOPE_VERSION}`, '')\n\t})\n}\n\nexport default ScopeComponent\n"],"names":["ScopeComponent","Component"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBK,MAACA,IAAiB,CAACC,MAAc;AAErC,EAAKA,EAAU,UAEH,MAAM,QAAQA,EAAU,OAAO,MAC1CA,EAAU,UAAU,CAACA,EAAU,OAAO,KAFtCA,EAAU,UAAU,CAAE,GAMvBA,EAAU,QAAQ,KAAK,WAAW;AACjC,SAAK,IAAI,aAAa,kBAA2B,EAAE;AAAA,EACrD,CAAE;AACF;;"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require('./assets/NcRichText-BMe-xENJ.css');
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
-
const p = require("./Components/NcActionButton.cjs"), l = require("./chunks/NcActionButtonGroup-BdxkXNwc.cjs"), g = require("./Components/NcActionCaption.cjs"), d = require("./Components/NcActionCheckbox.cjs"), A = require("./chunks/NcActionInput-D308ZntG.cjs"), m = require("./Components/NcActionLink.cjs"), S = require("./Components/NcActionRadio.cjs"), C = require("./Components/NcActionRouter.cjs"), b = require("./chunks/NcActions-Dfkog_G0.cjs"), q = require("./Components/NcActionSeparator.cjs"), I = require("./Components/NcActionText.cjs"), v = require("./Components/NcActionTextEditable.cjs"), P = require("./chunks/NcAppContent-kqYjKpzU.cjs"), T = require("./Components/NcAppContentDetails.cjs"), k = require("./Components/NcAppContentList.cjs"), h = require("./chunks/NcAppNavigation-
|
|
4
|
+
const p = require("./Components/NcActionButton.cjs"), l = require("./chunks/NcActionButtonGroup-BdxkXNwc.cjs"), g = require("./Components/NcActionCaption.cjs"), d = require("./Components/NcActionCheckbox.cjs"), A = require("./chunks/NcActionInput-D308ZntG.cjs"), m = require("./Components/NcActionLink.cjs"), S = require("./Components/NcActionRadio.cjs"), C = require("./Components/NcActionRouter.cjs"), b = require("./chunks/NcActions-Dfkog_G0.cjs"), q = require("./Components/NcActionSeparator.cjs"), I = require("./Components/NcActionText.cjs"), v = require("./Components/NcActionTextEditable.cjs"), P = require("./chunks/NcAppContent-kqYjKpzU.cjs"), T = require("./Components/NcAppContentDetails.cjs"), k = require("./Components/NcAppContentList.cjs"), h = require("./chunks/NcAppNavigation-C423R_m2.cjs"), B = require("./chunks/NcAppNavigationCaption-BKchbDsJ.cjs"), _ = require("./Components/NcAppNavigationIconBullet.cjs"), R = require("./chunks/NcAppNavigationItem-CABF2T4q.cjs"), D = require("./Components/NcAppNavigationList.cjs"), x = require("./Components/NcAppNavigationNew.cjs"), L = require("./chunks/NcAppNavigationNewItem-t45tM5u1.cjs"), M = require("./chunks/NcAppNavigationSettings-CBeUiVLk.cjs"), E = require("./Components/NcAppNavigationSpacer.cjs"), F = require("./chunks/NcAppSettingsDialog-EUys9Os_.cjs"), W = require("./Components/NcAppSettingsSection.cjs"), w = require("./chunks/NcAppSidebar-Du-IRmEO.cjs"), y = require("./Components/NcAppSidebarTab.cjs"), s = require("./chunks/NcAvatar-BEet_8fB.cjs"), j = require("./chunks/NcBreadcrumb-DVXsgQkE.cjs"), O = require("./chunks/NcBreadcrumbs-DkgzO9f5.cjs"), f = require("./Components/NcButton.cjs"), G = require("./chunks/NcCheckboxRadioSwitch-Dt96X5bR.cjs"), H = require("./chunks/NcColorPicker-BVqwn1Fr.cjs"), U = require("./chunks/NcContent-Bmeq8hLO.cjs"), z = require("./Components/NcCounterBubble.cjs"), V = require("./chunks/NcDashboardWidget-DArU3jbL.cjs"), K = require("./chunks/NcDashboardWidgetItem-BAhzcFfs.cjs"), a = require("./chunks/NcDateTime-Dl0XztMt.cjs"), J = require("./Components/NcDateTimePicker.cjs"), Q = require("./Components/NcDateTimePickerNative.cjs"), X = require("./chunks/NcDialog-C6nYgBDF.cjs"), Y = require("./chunks/NcDialogButton-D7ibBxsQ.cjs"), Z = require("./chunks/NcEmojiPicker-BCdoIKXJ.cjs"), $ = require("./Components/NcEmptyContent.cjs"), ee = require("./Components/NcGuestContent.cjs"), te = require("./chunks/NcHeaderMenu-BUeI4DGP.cjs"), ce = require("./chunks/index-Cke9rKBg.cjs"), ie = require("./chunks/NcIconSvgWrapper-kIn1eQyv.cjs"), oe = require("./chunks/NcListItem-wxqWqs4s.cjs"), ne = require("./chunks/NcListItemIcon-DfdkSCin.cjs"), re = require("./Components/NcLoadingIcon.cjs"), Ne = require("./Components/NcModal.cjs"), se = require("./Components/NcNoteCard.cjs"), ae = require("./chunks/NcPasswordField-BgNcvN0V.cjs"), ue = require("./chunks/NcPopover-h-t7Dnjk.cjs"), pe = require("./chunks/NcProgressBar-BYk5hfPI.cjs"), le = require("./chunks/NcRelatedResourcesPanel-Cp8Au2iI.cjs"), u = require("./chunks/index-CIsMzBte.cjs"), r = require("./chunks/NcRichContenteditable-hT5m_2tr.cjs"), ge = require("./chunks/NcRichText-BWX8BLVh.cjs"), e = require("./chunks/index-Bh9FEWbr.cjs");
|
|
5
5
|
require("unist-util-visit");
|
|
6
6
|
require("unist-builder");
|
|
7
7
|
require("@nextcloud/router");
|
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import u from "./Components/NcActionTextEditable.mjs";
|
|
|
14
14
|
import { N as d } from "./chunks/NcAppContent-BDwOdxJE.mjs";
|
|
15
15
|
import g from "./Components/NcAppContentDetails.mjs";
|
|
16
16
|
import A from "./Components/NcAppContentList.mjs";
|
|
17
|
-
import { N as S } from "./chunks/NcAppNavigation-
|
|
17
|
+
import { N as S } from "./chunks/NcAppNavigation-C1Qe3lsk.mjs";
|
|
18
18
|
import { N as b } from "./chunks/NcAppNavigationCaption-DsT6O4Hx.mjs";
|
|
19
19
|
import v from "./Components/NcAppNavigationIconBullet.mjs";
|
|
20
20
|
import { N as T } from "./chunks/NcAppNavigationItem-bjPcEx5D.mjs";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NcAppNavigation-BRtyTvKt.mjs","sources":["../../src/components/NcAppNavigation/NcAppNavigation.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n -\n - @author Christoph Wurst <christoph@winzerhof-wurst.at>\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n<docs>\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<template>\n\t<div ref=\"appNavigationContainer\"\n\t\tclass=\"app-navigation\"\n\t\t:class=\"{'app-navigation--close':!open }\">\n\t\t<nav id=\"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 v-if=\"$scopedSlots.default\" class=\"app-navigation__body\">\n\t\t\t\t<!-- @slot Content within the nav, do NOT add NcModal/NcDialog inside this slot -->\n\t\t\t\t<slot />\n\t\t\t</div>\n\n\t\t\t<!-- List for Navigation li-items -->\n\t\t\t<ul v-if=\"$scopedSlots.list\" class=\"app-navigation__list\">\n\t\t\t\t<slot name=\"list\" />\n\t\t\t</ul>\n\n\t\t\t<!-- Footer for e.g. AppNavigationSettings -->\n\t\t\t<slot name=\"footer\" />\n\t\t</nav>\n\t\t<NcAppNavigationToggle :open=\"open\" @update:open=\"toggleNavigation\" />\n\t</div>\n</template>\n\n<script>\nimport { useIsMobile } from '../../composables/useIsMobile/index.js'\nimport { getTrapStack } from '../../utils/focusTrap.js'\nimport { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { createFocusTrap } from 'focus-trap'\n\nimport NcAppNavigationToggle from '../NcAppNavigationToggle/index.js'\nimport Vue from 'vue'\n\nexport default {\n\tname: 'NcAppNavigation',\n\n\tcomponents: {\n\t\tNcAppNavigationToggle,\n\t},\n\n\t// Injected from NcContent\n\tinject: {\n\t\tsetHasAppNavigation: {\n\t\t\tdefault: () => () => Vue.util.warn('NcAppNavigation is not mounted inside NcContent, this is probably an error.'),\n\t\t\tfrom: 'NcContent:setHasAppNavigation',\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The aria label to describe the navigation\n\t\t */\n\t\tariaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-labelledby attribute to describe the navigation\n\t\t */\n\t\tariaLabelledby: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\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\topen: !this.isMobile,\n\t\t\tfocusTrap: null,\n\t\t}\n\t},\n\n\twatch: {\n\t\tisMobile() {\n\t\t\tthis.open = !this.isMobile\n\t\t\tthis.toggleFocusTrap()\n\t\t},\n\t\topen() {\n\t\t\tthis.toggleFocusTrap()\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.setHasAppNavigation(true)\n\t\tsubscribe('toggle-navigation', this.toggleNavigationByEventBus)\n\t\t// Emit an event with the initial state of the navigation\n\t\temit('navigation-toggled', {\n\t\t\topen: this.open,\n\t\t})\n\n\t\tthis.focusTrap = createFocusTrap(this.$refs.appNavigationContainer, {\n\t\t\tallowOutsideClick: true,\n\t\t\tfallbackFocus: this.$refs.appNavigationContainer,\n\t\t\ttrapStack: getTrapStack(),\n\t\t\tescapeDeactivates: false,\n\t\t})\n\t\tthis.toggleFocusTrap()\n\t},\n\tunmounted() {\n\t\tthis.setHasAppNavigation(false)\n\t\tunsubscribe('toggle-navigation', this.toggleNavigationByEventBus)\n\t\tthis.focusTrap.deactivate()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Toggle the navigation\n\t\t *\n\t\t * @param {boolean} [state] set the state instead of inverting the current one\n\t\t */\n\t\ttoggleNavigation(state) {\n\t\t\t// Early return if alreay in that state\n\t\t\tif (this.open === state) {\n\t\t\t\temit('navigation-toggled', {\n\t\t\t\t\topen: this.open,\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.open = (typeof state === 'undefined') ? !this.open : state\n\t\t\tconst bodyStyles = getComputedStyle(document.body)\n\t\t\tconst animationLength = parseInt(bodyStyles.getPropertyValue('--animation-quick')) || 100\n\n\t\t\tsetTimeout(() => {\n\t\t\t\temit('navigation-toggled', {\n\t\t\t\t\topen: this.open,\n\t\t\t\t})\n\t\t\t// We wait for 1.5 times the animation length to give the animation time to really finish.\n\t\t\t}, 1.5 * animationLength)\n\t\t},\n\n\t\ttoggleNavigationByEventBus({ open }) {\n\t\t\tthis.toggleNavigation(open)\n\t\t},\n\n\t\t/**\n\t\t * Activate focus trap if it is currently needed, otherwise deactivate\n\t\t */\n\t\ttoggleFocusTrap() {\n\t\t\tif (this.isMobile && this.open) {\n\t\t\t\tthis.focusTrap.activate()\n\t\t\t} else {\n\t\t\t\tthis.focusTrap.deactivate()\n\t\t\t}\n\t\t},\n\n\t\thandleEsc() {\n\t\t\tif (this.isMobile) {\n\t\t\t\tthis.toggleNavigation(false)\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n.app-navigation,\n.app-content {\n\t/** Distance of the app naviation 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\tmax-width: calc(100vw - (var(--app-navigation-padding) + var(--default-clickable-area) + var(--default-grid-baseline)));\n\tposition: relative;\n\ttop: 0;\n\tleft: 0;\n\tpadding: 0px;\n\t// Above appcontent\n\tz-index: 1800;\n\theight: 100%;\n\tbox-sizing: border-box;\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&--close {\n\t\ttransform: translateX(-100%);\n\t\tposition: absolute;\n\t}\n\n\t&__body {\n\t\tposition: relative;\n\t\theight: 100%;\n\t\twidth: 100%;\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\tbox-sizing: border-box;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n\n\t&__content > ul,\n\t&__list {\n\t\tposition: relative;\n\t\theight: 100%;\n\t\twidth: 100%;\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\tbox-sizing: border-box;\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\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-right: 1px solid var(--color-border);\n\t}\n}\n\n// When on mobile, we make the navigation slide over the appcontent\n@media only screen and (max-width: $breakpoint-mobile) {\n\t.app-navigation:not(.app-navigation--close) {\n\t\tposition: absolute;\n\t}\n}\n</style>\n"],"names":["_sfc_main","NcAppNavigationToggle","Vue","useIsMobile","subscribe","emit","createFocusTrap","getTrapStack","unsubscribe","state","bodyStyles","animationLength","open"],"mappings":";;;;;;;AA4FA,MAAAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,uBAAAC;AAAA,EACA;AAAA;AAAA,EAGA,QAAA;AAAA,IACA,qBAAA;AAAA,MACA,SAAA,MAAA,MAAAC,EAAA,KAAA,KAAA,6EAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,QAAA;AACA,WAAA;AAAA,MACA,UAAAC,EAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,MAAA,CAAA,KAAA;AAAA,MACA,WAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,WAAA;AACA,WAAA,OAAA,CAAA,KAAA,UACA,KAAA,gBAAA;AAAA,IACA;AAAA,IACA,OAAA;AACA,WAAA,gBAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,SAAA,oBAAA,EAAA,GACAC,EAAA,qBAAA,KAAA,0BAAA,GAEAC,EAAA,sBAAA;AAAA,MACA,MAAA,KAAA;AAAA,IACA,CAAA,GAEA,KAAA,YAAAC,EAAA,KAAA,MAAA,wBAAA;AAAA,MACA,mBAAA;AAAA,MACA,eAAA,KAAA,MAAA;AAAA,MACA,WAAAC,EAAA;AAAA,MACA,mBAAA;AAAA,IACA,CAAA,GACA,KAAA,gBAAA;AAAA,EACA;AAAA,EACA,YAAA;AACA,SAAA,oBAAA,EAAA,GACAC,EAAA,qBAAA,KAAA,0BAAA,GACA,KAAA,UAAA,WAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,iBAAAC,GAAA;AAEA,UAAA,KAAA,SAAAA,GAAA;AACA,QAAAJ,EAAA,sBAAA;AAAA,UACA,MAAA,KAAA;AAAA,QACA,CAAA;AACA;AAAA,MACA;AAEA,WAAA,OAAA,OAAAI,IAAA,MAAA,CAAA,KAAA,OAAAA;AACA,YAAAC,IAAA,iBAAA,SAAA,IAAA,GACAC,IAAA,SAAAD,EAAA,iBAAA,mBAAA,CAAA,KAAA;AAEA,iBAAA,MAAA;AACA,QAAAL,EAAA,sBAAA;AAAA,UACA,MAAA,KAAA;AAAA,QACA,CAAA;AAAA,MAEA,GAAA,MAAAM,CAAA;AAAA,IACA;AAAA,IAEA,2BAAA,EAAA,MAAAC,KAAA;AACA,WAAA,iBAAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,kBAAA;AACA,MAAA,KAAA,YAAA,KAAA,OACA,KAAA,UAAA,SAAA,IAEA,KAAA,UAAA,WAAA;AAAA,IAEA;AAAA,IAEA,YAAA;AACA,MAAA,KAAA,YACA,KAAA,iBAAA,EAAA;AAAA,IAEA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NcAppNavigation-DMxORgkV.cjs","sources":["../../src/components/NcAppNavigation/NcAppNavigation.vue"],"sourcesContent":["<!--\n - @copyright Copyright (c) 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n -\n - @author Christoph Wurst <christoph@winzerhof-wurst.at>\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n - @author Marco Ambrosini <marcoambrosini@icloud.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n<docs>\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<template>\n\t<div ref=\"appNavigationContainer\"\n\t\tclass=\"app-navigation\"\n\t\t:class=\"{'app-navigation--close':!open }\">\n\t\t<nav id=\"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 v-if=\"$scopedSlots.default\" class=\"app-navigation__body\">\n\t\t\t\t<!-- @slot Content within the nav, do NOT add NcModal/NcDialog inside this slot -->\n\t\t\t\t<slot />\n\t\t\t</div>\n\n\t\t\t<!-- List for Navigation li-items -->\n\t\t\t<ul v-if=\"$scopedSlots.list\" class=\"app-navigation__list\">\n\t\t\t\t<slot name=\"list\" />\n\t\t\t</ul>\n\n\t\t\t<!-- Footer for e.g. AppNavigationSettings -->\n\t\t\t<slot name=\"footer\" />\n\t\t</nav>\n\t\t<NcAppNavigationToggle :open=\"open\" @update:open=\"toggleNavigation\" />\n\t</div>\n</template>\n\n<script>\nimport { useIsMobile } from '../../composables/useIsMobile/index.js'\nimport { getTrapStack } from '../../utils/focusTrap.js'\nimport { emit, subscribe, unsubscribe } from '@nextcloud/event-bus'\nimport { createFocusTrap } from 'focus-trap'\n\nimport NcAppNavigationToggle from '../NcAppNavigationToggle/index.js'\nimport Vue from 'vue'\n\nexport default {\n\tname: 'NcAppNavigation',\n\n\tcomponents: {\n\t\tNcAppNavigationToggle,\n\t},\n\n\t// Injected from NcContent\n\tinject: {\n\t\tsetHasAppNavigation: {\n\t\t\tdefault: () => () => Vue.util.warn('NcAppNavigation is not mounted inside NcContent, this is probably an error.'),\n\t\t\tfrom: 'NcContent:setHasAppNavigation',\n\t\t},\n\t},\n\n\tprops: {\n\t\t/**\n\t\t * The aria label to describe the navigation\n\t\t */\n\t\tariaLabel: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\n\t\t/**\n\t\t * aria-labelledby attribute to describe the navigation\n\t\t */\n\t\tariaLabelledby: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\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\topen: !this.isMobile,\n\t\t\tfocusTrap: null,\n\t\t}\n\t},\n\n\twatch: {\n\t\tisMobile() {\n\t\t\tthis.open = !this.isMobile\n\t\t\tthis.toggleFocusTrap()\n\t\t},\n\t\topen() {\n\t\t\tthis.toggleFocusTrap()\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.setHasAppNavigation(true)\n\t\tsubscribe('toggle-navigation', this.toggleNavigationByEventBus)\n\t\t// Emit an event with the initial state of the navigation\n\t\temit('navigation-toggled', {\n\t\t\topen: this.open,\n\t\t})\n\n\t\tthis.focusTrap = createFocusTrap(this.$refs.appNavigationContainer, {\n\t\t\tallowOutsideClick: true,\n\t\t\tfallbackFocus: this.$refs.appNavigationContainer,\n\t\t\ttrapStack: getTrapStack(),\n\t\t\tescapeDeactivates: false,\n\t\t})\n\t\tthis.toggleFocusTrap()\n\t},\n\tunmounted() {\n\t\tthis.setHasAppNavigation(false)\n\t\tunsubscribe('toggle-navigation', this.toggleNavigationByEventBus)\n\t\tthis.focusTrap.deactivate()\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * Toggle the navigation\n\t\t *\n\t\t * @param {boolean} [state] set the state instead of inverting the current one\n\t\t */\n\t\ttoggleNavigation(state) {\n\t\t\t// Early return if alreay in that state\n\t\t\tif (this.open === state) {\n\t\t\t\temit('navigation-toggled', {\n\t\t\t\t\topen: this.open,\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tthis.open = (typeof state === 'undefined') ? !this.open : state\n\t\t\tconst bodyStyles = getComputedStyle(document.body)\n\t\t\tconst animationLength = parseInt(bodyStyles.getPropertyValue('--animation-quick')) || 100\n\n\t\t\tsetTimeout(() => {\n\t\t\t\temit('navigation-toggled', {\n\t\t\t\t\topen: this.open,\n\t\t\t\t})\n\t\t\t// We wait for 1.5 times the animation length to give the animation time to really finish.\n\t\t\t}, 1.5 * animationLength)\n\t\t},\n\n\t\ttoggleNavigationByEventBus({ open }) {\n\t\t\tthis.toggleNavigation(open)\n\t\t},\n\n\t\t/**\n\t\t * Activate focus trap if it is currently needed, otherwise deactivate\n\t\t */\n\t\ttoggleFocusTrap() {\n\t\t\tif (this.isMobile && this.open) {\n\t\t\t\tthis.focusTrap.activate()\n\t\t\t} else {\n\t\t\t\tthis.focusTrap.deactivate()\n\t\t\t}\n\t\t},\n\n\t\thandleEsc() {\n\t\t\tif (this.isMobile) {\n\t\t\t\tthis.toggleNavigation(false)\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n.app-navigation,\n.app-content {\n\t/** Distance of the app naviation 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\tmax-width: calc(100vw - (var(--app-navigation-padding) + var(--default-clickable-area) + var(--default-grid-baseline)));\n\tposition: relative;\n\ttop: 0;\n\tleft: 0;\n\tpadding: 0px;\n\t// Above appcontent\n\tz-index: 1800;\n\theight: 100%;\n\tbox-sizing: border-box;\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&--close {\n\t\ttransform: translateX(-100%);\n\t\tposition: absolute;\n\t}\n\n\t&__body {\n\t\tposition: relative;\n\t\theight: 100%;\n\t\twidth: 100%;\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\tbox-sizing: border-box;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t}\n\n\t&__content > ul,\n\t&__list {\n\t\tposition: relative;\n\t\theight: 100%;\n\t\twidth: 100%;\n\t\toverflow-x: hidden;\n\t\toverflow-y: auto;\n\t\tbox-sizing: border-box;\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\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-right: 1px solid var(--color-border);\n\t}\n}\n\n// When on mobile, we make the navigation slide over the appcontent\n@media only screen and (max-width: $breakpoint-mobile) {\n\t.app-navigation:not(.app-navigation--close) {\n\t\tposition: absolute;\n\t}\n}\n</style>\n"],"names":["_sfc_main","NcAppNavigationToggle","Vue","useIsMobile","subscribe","emit","createFocusTrap","getTrapStack","unsubscribe","state","bodyStyles","animationLength","open"],"mappings":";2WA4FAA,IAAA;AAAA,EACA,MAAA;AAAA,EAEA,YAAA;AAAA,IACA,uBAAAC,EAAA;AAAA,EACA;AAAA;AAAA,EAGA,QAAA;AAAA,IACA,qBAAA;AAAA,MACA,SAAA,MAAA,MAAAC,EAAAA,QAAA,KAAA,KAAA,6EAAA;AAAA,MACA,MAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA;AAAA;AAAA;AAAA,IAIA,WAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,gBAAA;AAAA,MACA,MAAA;AAAA,MACA,SAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,QAAA;AACA,WAAA;AAAA,MACA,UAAAC,EAAAA,YAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AACA,WAAA;AAAA,MACA,MAAA,CAAA,KAAA;AAAA,MACA,WAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,OAAA;AAAA,IACA,WAAA;AACA,WAAA,OAAA,CAAA,KAAA,UACA,KAAA,gBAAA;AAAA,IACA;AAAA,IACA,OAAA;AACA,WAAA,gBAAA;AAAA,IACA;AAAA,EACA;AAAA,EAEA,UAAA;AACA,SAAA,oBAAA,EAAA,GACAC,YAAA,qBAAA,KAAA,0BAAA,GAEAC,EAAAA,KAAA,sBAAA;AAAA,MACA,MAAA,KAAA;AAAA,IACA,CAAA,GAEA,KAAA,YAAAC,EAAAA,gBAAA,KAAA,MAAA,wBAAA;AAAA,MACA,mBAAA;AAAA,MACA,eAAA,KAAA,MAAA;AAAA,MACA,WAAAC,EAAAA,aAAA;AAAA,MACA,mBAAA;AAAA,IACA,CAAA,GACA,KAAA,gBAAA;AAAA,EACA;AAAA,EACA,YAAA;AACA,SAAA,oBAAA,EAAA,GACAC,cAAA,qBAAA,KAAA,0BAAA,GACA,KAAA,UAAA,WAAA;AAAA,EACA;AAAA,EAEA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,iBAAAC,GAAA;AAEA,UAAA,KAAA,SAAAA,GAAA;AACAJ,QAAAA,EAAAA,KAAA,sBAAA;AAAA,UACA,MAAA,KAAA;AAAA,QACA,CAAA;AACA;AAAA,MACA;AAEA,WAAA,OAAA,OAAAI,IAAA,MAAA,CAAA,KAAA,OAAAA;AACA,YAAAC,IAAA,iBAAA,SAAA,IAAA,GACAC,IAAA,SAAAD,EAAA,iBAAA,mBAAA,CAAA,KAAA;AAEA,iBAAA,MAAA;AACAL,QAAAA,EAAAA,KAAA,sBAAA;AAAA,UACA,MAAA,KAAA;AAAA,QACA,CAAA;AAAA,MAEA,GAAA,MAAAM,CAAA;AAAA,IACA;AAAA,IAEA,2BAAA,EAAA,MAAAC,KAAA;AACA,WAAA,iBAAAA,CAAA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,IAKA,kBAAA;AACA,MAAA,KAAA,YAAA,KAAA,OACA,KAAA,UAAA,SAAA,IAEA,KAAA,UAAA,WAAA;AAAA,IAEA;AAAA,IAEA,YAAA;AACA,MAAA,KAAA,YACA,KAAA,iBAAA,EAAA;AAAA,IAEA;AAAA,EACA;AACA;;;;;;;;;;;;;;;;;;"}
|