@nextcloud/vue
Version:
Nextcloud vue components
33 lines (32 loc) • 1.75 kB
JavaScript
import "../assets/index28.css";
import { N as a } from "../chunks/NcAppNavigationToggle-5aa396d7.mjs";
import e from "../Mixins/isMobile.mjs";
import { subscribe as s, emit as o, unsubscribe as g } from "@nextcloud/event-bus";
import { n as p } from "../chunks/_plugin-vue2_normalizer-5b4c43a4.mjs";
const l = { name: "NcAppNavigation", components: { NcAppNavigationToggle: a }, mixins: [e], data() {
return { open: !0 };
}, computed: { ariaHidden() {
return this.open ? "false" : "true";
} }, watch: { isMobile() {
this.open = !this.isMobile;
} }, mounted() {
s("toggle-navigation", this.toggleNavigationByEventBus), o("navigation-toggled", { open: this.open });
}, unmounted() {
g("toggle-navigation", this.toggleNavigationByEventBus);
}, methods: { toggleNavigation(t) {
this.open = typeof t > "u" ? !this.open : t;
const i = getComputedStyle(document.body), n = parseInt(i.getPropertyValue("--animation-quick")) || 100;
setTimeout(() => {
o("navigation-toggled", { open: this.open });
}, 1.5 * n);
}, toggleNavigationByEventBus({ open: t }) {
this.toggleNavigation(t);
} } };
var r = function() {
var t = this, i = t._self._c;
return i("div", { staticClass: "app-navigation", class: { "app-navigation--close": !t.open }, attrs: { id: "app-navigation-vue", role: "navigation", inert: !t.open || null } }, [i("NcAppNavigationToggle", { attrs: { open: t.open }, on: { "update:open": t.toggleNavigation } }), i("div", { staticClass: "app-navigation__content", attrs: { "aria-hidden": t.ariaHidden } }, [t._t("default"), i("ul", { staticClass: "app-navigation__list" }, [t._t("list")], 2), t._t("footer")], 2)], 1);
}, u = [], v = p(l, r, u, !1, null, "1ce9e281", null, null);
const f = v.exports;
export {
f as default
};