@flux-ui/dashboard 3.0.0-next.22 → 3.0.0-next.24

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.
Files changed (36) hide show
  1. package/dist/component/FluxDashboard.vue.d.ts +0 -1
  2. package/dist/component/FluxDashboardContent.vue.d.ts +0 -1
  3. package/dist/component/FluxDashboardHeader.vue.d.ts +1 -2
  4. package/dist/component/FluxDashboardMenu.vue.d.ts +1 -2
  5. package/dist/component/FluxDashboardNavigation.vue.d.ts +1 -2
  6. package/dist/component/FluxDashboardSide.vue.d.ts +0 -1
  7. package/dist/component/FluxDashboardTopBar.vue.d.ts +0 -1
  8. package/dist/component/index.d.ts +0 -1
  9. package/dist/composable/index.d.ts +0 -1
  10. package/dist/composable/useDashboardInjection.d.ts +0 -1
  11. package/dist/data/index.d.ts +0 -1
  12. package/dist/index.css +26 -26
  13. package/dist/index.d.ts +0 -1
  14. package/dist/index.js +298 -304
  15. package/dist/index.js.map +1 -1
  16. package/package.json +12 -11
  17. package/src/component/FluxDashboard.vue +2 -2
  18. package/src/composable/useDashboardInjection.ts +1 -1
  19. package/src/css/component/Dashboard.module.scss +5 -5
  20. package/src/css/component/DashboardContent.module.scss +1 -1
  21. package/src/css/component/DashboardNavigation.module.scss +11 -11
  22. package/src/css/component/DashboardPane.module.scss +6 -6
  23. package/src/css/component/DashboardTopBar.module.scss +2 -2
  24. package/tsconfig.json +4 -42
  25. package/dist/component/FluxDashboard.vue.d.ts.map +0 -1
  26. package/dist/component/FluxDashboardContent.vue.d.ts.map +0 -1
  27. package/dist/component/FluxDashboardHeader.vue.d.ts.map +0 -1
  28. package/dist/component/FluxDashboardMenu.vue.d.ts.map +0 -1
  29. package/dist/component/FluxDashboardNavigation.vue.d.ts.map +0 -1
  30. package/dist/component/FluxDashboardSide.vue.d.ts.map +0 -1
  31. package/dist/component/FluxDashboardTopBar.vue.d.ts.map +0 -1
  32. package/dist/component/index.d.ts.map +0 -1
  33. package/dist/composable/index.d.ts.map +0 -1
  34. package/dist/composable/useDashboardInjection.d.ts.map +0 -1
  35. package/dist/data/index.d.ts.map +0 -1
  36. package/dist/index.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -1,318 +1,312 @@
1
- import { ref, watch, unref, defineComponent, provide, createElementBlock, openBlock, normalizeClass, renderSlot, createElementVNode, inject, createBlock, withCtx, createCommentVNode, createVNode, toDisplayString, useSlots, resolveComponent, mergeProps, normalizeProps, guardReactiveProps, Fragment, renderList } from "vue";
1
+ import { Fragment, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, guardReactiveProps, inject, mergeProps, normalizeClass, normalizeProps, openBlock, provide, ref, renderList, renderSlot, resolveComponent, toDisplayString, unref, useSlots, watch, withCtx } from "vue";
2
2
  import { DateTime } from "luxon";
3
- import { FluxIcon, FluxSpacer, FluxMenuItem } from "@flux-ui/components";
4
- function k(e, t, o, n = { passive: true }) {
5
- watch(e, (s, r, a) => {
6
- if (!s) return;
7
- s.addEventListener(t, o, n), a(() => s.removeEventListener(t, o));
8
- }, { immediate: true });
3
+ import { FluxIcon, FluxMenuItem, FluxSpacer } from "@flux-ui/components";
4
+ [
5
+ "a:not([disabled])",
6
+ "button:not([disabled])",
7
+ "input[type=checkbox]:not([disabled])",
8
+ "input[type=radio]:not([disabled])",
9
+ "input[type=text]:not([disabled])",
10
+ "[tabindex]:not([disabled]):not([tabindex=\"-1\"])"
11
+ ].join(",");
12
+ var X = class {
13
+ get active() {
14
+ return this.current?.isEnabled ?? !1;
15
+ }
16
+ get current() {
17
+ return this.#e[this.#e.length - 1] ?? null;
18
+ }
19
+ #t = [];
20
+ #e = [];
21
+ add(e, t, n = !0) {
22
+ let o = {
23
+ id: e,
24
+ setEnabled: t,
25
+ isEnabled: !0
26
+ };
27
+ if (this.current && this.toggle(this.current, !1), this.#e.push(o), n) this.toggle(o, !0), this.emit();
28
+ }
29
+ remove(e) {
30
+ let t = this.#e.find((s) => s.id === e);
31
+ t && this.toggle(t, !1);
32
+ let o = this.current?.id === e;
33
+ this.#e = this.#e.filter((s) => s.id !== e), o && this.current && this.toggle(this.current, !0), this.emit();
34
+ }
35
+ emit() {
36
+ this.#t.forEach((e) => e(this.active, this.#e));
37
+ }
38
+ subscribe(e) {
39
+ return this.#t.push(e), e(this.active, this.#e), () => this.#t = this.#t.filter((t) => t !== e);
40
+ }
41
+ toggle(e, t) {
42
+ e.setEnabled(t), e.isEnabled = t;
43
+ }
44
+ };
45
+ new X();
46
+ globalThis.document;
47
+ function k(e, t, n, o = { passive: !0 }) {
48
+ watch(e, (s, r, a) => {
49
+ if (!s) return;
50
+ s.addEventListener(t, n, o), a(() => s.removeEventListener(t, n));
51
+ }, { immediate: !0 });
9
52
  }
10
53
  function ne(e, t) {
11
- let o = `flux/${e}`, n = ref(s() ?? t);
12
- function s() {
13
- if (o in localStorage) {
14
- let r = JSON.parse(localStorage.getItem(o));
15
- if (Array.isArray(r) && r[0] === "DateTime") r = DateTime.fromISO(r[1]);
16
- return r;
17
- }
18
- return null;
19
- }
20
- return watch(n, (r) => {
21
- let a = r;
22
- if (DateTime.isDateTime(r)) a = ["DateTime", r.toISO({ includeOffset: true, extendedZone: true })];
23
- localStorage.setItem(o, JSON.stringify(a));
24
- }), n;
54
+ let n = `flux/${e}`, o = ref(s() ?? t);
55
+ function s() {
56
+ if (n in localStorage) {
57
+ let r = JSON.parse(localStorage.getItem(n));
58
+ if (Array.isArray(r) && r[0] === "DateTime") r = DateTime.fromISO(r[1]);
59
+ return r;
60
+ }
61
+ return null;
62
+ }
63
+ return watch(o, (r) => {
64
+ let a = r;
65
+ if (DateTime.isDateTime(r)) a = ["DateTime", r.toISO({
66
+ includeOffset: !0,
67
+ extendedZone: !0
68
+ })];
69
+ localStorage.setItem(n, JSON.stringify(a));
70
+ }), o;
25
71
  }
26
- function re(e) {
27
- let t = ref(0), o = ref(0);
28
- if (!e) e = ref(document);
29
- return k(e, "scroll", () => {
30
- let n = unref(e);
31
- if (n instanceof Document) n = n.scrollingElement;
32
- t.value = n?.scrollLeft ?? 0, o.value = n?.scrollTop ?? 0;
33
- }), { x: t, y: o };
72
+ function se(e) {
73
+ let t = ref(0), n = ref(0);
74
+ if (!e) e = ref(document);
75
+ return k(e, "scroll", () => {
76
+ let o = unref(e);
77
+ if (o instanceof Document) o = o.scrollingElement;
78
+ t.value = o?.scrollLeft ?? 0, n.value = o?.scrollTop ?? 0;
79
+ }), {
80
+ x: t,
81
+ y: n
82
+ };
34
83
  }
35
84
  const FluxDashboardInjectionKey = Symbol();
36
- const root = `root`;
37
- const dashboard$2 = `dashboard`;
38
- const dashboardMount = `dashboard-mount`;
39
- const isResizing = `is-resizing`;
40
- const dashboardNavigation$1 = `dashboard-navigation`;
41
- const dashboardNavigationCollapsed$1 = `dashboard-navigation-collapsed`;
42
- const dashboardMenu$2 = `dashboard-menu`;
43
- const dashboardSide$1 = `dashboard-side`;
44
- const $style$4 = { root, dashboard: dashboard$2, dashboardMount, isResizing, dashboardNavigation: dashboardNavigation$1, dashboardNavigationCollapsed: dashboardNavigationCollapsed$1, dashboardMenu: dashboardMenu$2, dashboardSide: dashboardSide$1 };
45
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
46
- __name: "FluxDashboard",
47
- setup(__props) {
48
- const isMenuCollapsed = ne("dashboard-menu-collapsed", true);
49
- const isNavigationCollapsed = ne("dashboard-navigation-collapsed", true);
50
- const isResizing2 = ref(false);
51
- provide(FluxDashboardInjectionKey, {
52
- isMenuCollapsed,
53
- isNavigationCollapsed
54
- });
55
- watch(isNavigationCollapsed, (_, __, onCleanup) => {
56
- let timeout;
57
- function onResize() {
58
- clearTimeout(timeout);
59
- isResizing2.value = true;
60
- timeout = setTimeout(() => isResizing2.value = false, 10);
61
- }
62
- window.addEventListener("resize", onResize, { passive: true });
63
- onCleanup(() => window.removeEventListener("resize", onResize));
64
- }, { immediate: true });
65
- return (_ctx, _cache) => {
66
- return openBlock(), createElementBlock("div", {
67
- class: normalizeClass([unref($style$4).dashboard, isResizing2.value && unref($style$4).isResizing])
68
- }, [
69
- renderSlot(_ctx.$slots, "navigation"),
70
- renderSlot(_ctx.$slots, "menu"),
71
- createElementVNode("div", {
72
- class: normalizeClass(unref($style$4).dashboardMount)
73
- }, [
74
- renderSlot(_ctx.$slots, "header"),
75
- renderSlot(_ctx.$slots, "default")
76
- ], 2),
77
- renderSlot(_ctx.$slots, "side")
78
- ], 2);
79
- };
80
- }
85
+ var Dashboard_module_default = {
86
+ root: `root`,
87
+ dashboard: `dashboard`,
88
+ dashboardMount: `dashboard-mount`,
89
+ isResizing: `is-resizing`,
90
+ dashboardNavigation: `dashboard-navigation`,
91
+ dashboardNavigationCollapsed: `dashboard-navigation-collapsed`,
92
+ dashboardMenu: `dashboard-menu`,
93
+ dashboardSide: `dashboard-side`
94
+ };
95
+ var FluxDashboard_default = /* @__PURE__ */ defineComponent({
96
+ __name: "FluxDashboard",
97
+ setup(__props) {
98
+ const isMenuCollapsed = ne("dashboard-menu-collapsed", true);
99
+ const isNavigationCollapsed = ne("dashboard-navigation-collapsed", true);
100
+ const isResizing = ref(false);
101
+ provide(FluxDashboardInjectionKey, {
102
+ isMenuCollapsed,
103
+ isNavigationCollapsed
104
+ });
105
+ watch(isNavigationCollapsed, (_, __, onCleanup) => {
106
+ let timeout;
107
+ function onResize() {
108
+ clearTimeout(timeout);
109
+ isResizing.value = true;
110
+ timeout = setTimeout(() => isResizing.value = false, 10);
111
+ }
112
+ window.addEventListener("resize", onResize, { passive: true });
113
+ onCleanup(() => window.removeEventListener("resize", onResize));
114
+ }, { immediate: true });
115
+ return (_ctx, _cache) => {
116
+ return openBlock(), createElementBlock("div", { class: normalizeClass([unref(Dashboard_module_default).dashboard, isResizing.value && unref(Dashboard_module_default).isResizing]) }, [
117
+ renderSlot(_ctx.$slots, "navigation"),
118
+ renderSlot(_ctx.$slots, "menu"),
119
+ createElementVNode("div", { class: normalizeClass(unref(Dashboard_module_default).dashboardMount) }, [renderSlot(_ctx.$slots, "header"), renderSlot(_ctx.$slots, "default")], 2),
120
+ renderSlot(_ctx.$slots, "side")
121
+ ], 2);
122
+ };
123
+ }
81
124
  });
82
- function useDashboardInjection() {
83
- const injection = inject(FluxDashboardInjectionKey);
84
- if (!injection) {
85
- throw new Error("[Flux] useDashboardInjection() was used outside a FluxDashboard component.");
86
- }
87
- return injection;
125
+ function useDashboardInjection_default() {
126
+ const injection = inject(FluxDashboardInjectionKey);
127
+ if (!injection) throw new Error("[Flux] useDashboardInjection() was used outside a FluxDashboard component.");
128
+ return injection;
88
129
  }
89
- const notice = `notice`;
90
- const dashboardContent = `dashboard-content`;
91
- const calendar = `calendar`;
92
- const table = `table`;
93
- const calendarActions = `calendar-actions`;
94
- const tableCell = `table-cell`;
95
- const tableCellContent = `table-cell-content`;
96
- const dashboardContentCollapsed = `dashboard-content-collapsed`;
97
- const $style$3 = { notice, dashboardContent, calendar, table, calendarActions, tableCell, tableCellContent, dashboardContentCollapsed };
98
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
99
- __name: "FluxDashboardContent",
100
- setup(__props) {
101
- const { isMenuCollapsed } = useDashboardInjection();
102
- return (_ctx, _cache) => {
103
- return openBlock(), createElementBlock("main", {
104
- class: normalizeClass([unref($style$3).dashboardContent, !unref(isMenuCollapsed) && unref($style$3).dashboardContentCollapsed])
105
- }, [
106
- renderSlot(_ctx.$slots, "default")
107
- ], 2);
108
- };
109
- }
130
+ var DashboardContent_module_default = {
131
+ notice: `notice`,
132
+ dashboardContent: `dashboard-content`,
133
+ calendar: `calendar`,
134
+ table: `table`,
135
+ calendarActions: `calendar-actions`,
136
+ tableCell: `table-cell`,
137
+ tableCellContent: `table-cell-content`,
138
+ dashboardContentCollapsed: `dashboard-content-collapsed`
139
+ };
140
+ var FluxDashboardContent_default = /* @__PURE__ */ defineComponent({
141
+ __name: "FluxDashboardContent",
142
+ setup(__props) {
143
+ const { isMenuCollapsed } = useDashboardInjection_default();
144
+ return (_ctx, _cache) => {
145
+ return openBlock(), createElementBlock("main", { class: normalizeClass([unref(DashboardContent_module_default).dashboardContent, !unref(isMenuCollapsed) && unref(DashboardContent_module_default).dashboardContentCollapsed]) }, [renderSlot(_ctx.$slots, "default")], 2);
146
+ };
147
+ }
110
148
  });
111
- const dashboardTopBar$1 = `dashboard-top-bar`;
112
- const icon = `icon`;
113
- const separator$1 = `separator`;
114
- const dashboardHeader = `dashboard-header`;
115
- const routeTransitionEnterActive = `route-transition-enter-active`;
116
- const routeTransitionLeaveActive = `route-transition-leave-active`;
117
- const dashboardHeaderScrolled = `dashboard-header-scrolled dashboard-header`;
118
- const dashboard$1 = `dashboard`;
119
- const dashboardTopBarCollapsed = `dashboard-top-bar-collapsed`;
120
- const $style$2 = { dashboardTopBar: dashboardTopBar$1, icon, separator: separator$1, dashboardHeader, routeTransitionEnterActive, routeTransitionLeaveActive, dashboardHeaderScrolled, dashboard: dashboard$1, dashboardTopBarCollapsed };
121
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
122
- __name: "FluxDashboardTopBar",
123
- setup(__props) {
124
- const { isMenuCollapsed } = useDashboardInjection();
125
- return (_ctx, _cache) => {
126
- return openBlock(), createElementBlock("header", {
127
- class: normalizeClass([unref($style$2).dashboardTopBar, !unref(isMenuCollapsed) && unref($style$2).dashboardTopBarCollapsed])
128
- }, [
129
- renderSlot(_ctx.$slots, "default")
130
- ], 2);
131
- };
132
- }
149
+ var DashboardTopBar_module_default = {
150
+ dashboardTopBar: `dashboard-top-bar`,
151
+ icon: `icon`,
152
+ separator: `separator`,
153
+ dashboardHeader: `dashboard-header`,
154
+ routeTransitionEnterActive: `route-transition-enter-active`,
155
+ routeTransitionLeaveActive: `route-transition-leave-active`,
156
+ dashboardHeaderScrolled: `dashboard-header-scrolled dashboard-header`,
157
+ dashboard: `dashboard`,
158
+ dashboardTopBarCollapsed: `dashboard-top-bar-collapsed`
159
+ };
160
+ var FluxDashboardTopBar_default = /* @__PURE__ */ defineComponent({
161
+ __name: "FluxDashboardTopBar",
162
+ setup(__props) {
163
+ const { isMenuCollapsed } = useDashboardInjection_default();
164
+ return (_ctx, _cache) => {
165
+ return openBlock(), createElementBlock("header", { class: normalizeClass([unref(DashboardTopBar_module_default).dashboardTopBar, !unref(isMenuCollapsed) && unref(DashboardTopBar_module_default).dashboardTopBarCollapsed]) }, [renderSlot(_ctx.$slots, "default")], 2);
166
+ };
167
+ }
133
168
  });
134
- const _hoisted_1$1 = { key: 1 };
135
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
136
- __name: "FluxDashboardHeader",
137
- props: {
138
- icon: {},
139
- title: {}
140
- },
141
- setup(__props) {
142
- const { y } = re();
143
- return (_ctx, _cache) => {
144
- return openBlock(), createBlock(_sfc_main$4, {
145
- class: normalizeClass(unref(y) > 0 ? unref($style$2).dashboardHeaderScrolled : unref($style$2).dashboardHeader)
146
- }, {
147
- default: withCtx(() => [
148
- renderSlot(_ctx.$slots, "start"),
149
- __props.icon ? (openBlock(), createBlock(unref(FluxIcon), {
150
- key: 0,
151
- name: __props.icon
152
- }, null, 8, ["name"])) : createCommentVNode("", true),
153
- __props.title ? (openBlock(), createElementBlock("h1", _hoisted_1$1, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
154
- createVNode(unref(FluxSpacer)),
155
- renderSlot(_ctx.$slots, "end")
156
- ]),
157
- _: 3
158
- }, 8, ["class"]);
159
- };
160
- }
169
+ var _hoisted_1$1 = { key: 1 };
170
+ var FluxDashboardHeader_default = /* @__PURE__ */ defineComponent({
171
+ __name: "FluxDashboardHeader",
172
+ props: {
173
+ icon: {},
174
+ title: {}
175
+ },
176
+ setup(__props) {
177
+ const { y } = se();
178
+ return (_ctx, _cache) => {
179
+ return openBlock(), createBlock(FluxDashboardTopBar_default, { class: normalizeClass(unref(y) > 0 ? unref(DashboardTopBar_module_default).dashboardHeaderScrolled : unref(DashboardTopBar_module_default).dashboardHeader) }, {
180
+ default: withCtx(() => [
181
+ renderSlot(_ctx.$slots, "start"),
182
+ __props.icon ? (openBlock(), createBlock(unref(FluxIcon), {
183
+ key: 0,
184
+ name: __props.icon
185
+ }, null, 8, ["name"])) : createCommentVNode("", true),
186
+ __props.title ? (openBlock(), createElementBlock("h1", _hoisted_1$1, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
187
+ createVNode(unref(FluxSpacer)),
188
+ renderSlot(_ctx.$slots, "end")
189
+ ]),
190
+ _: 3
191
+ }, 8, ["class"]);
192
+ };
193
+ }
161
194
  });
162
- const dashboardPane = `dashboard-pane`;
163
- const menuSubHeader = `menu-sub-header`;
164
- const dashboardTopBar = `dashboard-top-bar`;
165
- const filter = `filter`;
166
- const filterHeader = `filter-header`;
167
- const menu$1 = `menu`;
168
- const menuItemCommand = `menu-item-command`;
169
- const menuItemIcon$1 = `menu-item-icon`;
170
- const divider$1 = `divider`;
171
- const separator = `separator`;
172
- const dashboardMenu$1 = `dashboard-menu dashboard-pane`;
173
- const dashboardMenuBody = `dashboard-menu-body`;
174
- const dashboardSide = `dashboard-side dashboard-pane`;
175
- const dashboardMenuCollapsed = `dashboard-menu-collapsed`;
176
- const $style$1 = { dashboardPane, menuSubHeader, dashboardTopBar, filter, filterHeader, menu: menu$1, menuItemCommand, menuItemIcon: menuItemIcon$1, divider: divider$1, separator, dashboardMenu: dashboardMenu$1, dashboardMenuBody, dashboardSide, dashboardMenuCollapsed };
177
- const _hoisted_1 = { key: 1 };
178
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
179
- __name: "FluxDashboardMenu",
180
- props: {
181
- icon: {},
182
- title: {}
183
- },
184
- setup(__props) {
185
- const { isMenuCollapsed } = useDashboardInjection();
186
- return (_ctx, _cache) => {
187
- return openBlock(), createElementBlock("aside", {
188
- class: normalizeClass([unref($style$1).dashboardMenu, unref(isMenuCollapsed) && unref($style$1).dashboardMenuCollapsed])
189
- }, [
190
- createVNode(_sfc_main$4, null, {
191
- default: withCtx(() => [
192
- renderSlot(_ctx.$slots, "top-bar-start"),
193
- __props.icon ? (openBlock(), createBlock(unref(FluxIcon), {
194
- key: 0,
195
- name: __props.icon
196
- }, null, 8, ["name"])) : createCommentVNode("", true),
197
- __props.title ? (openBlock(), createElementBlock("h1", _hoisted_1, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
198
- createVNode(unref(FluxSpacer)),
199
- renderSlot(_ctx.$slots, "top-bar-end")
200
- ]),
201
- _: 3
202
- }),
203
- createElementVNode("div", {
204
- class: normalizeClass(unref($style$1).dashboardMenuBody)
205
- }, [
206
- renderSlot(_ctx.$slots, "default")
207
- ], 2)
208
- ], 2);
209
- };
210
- }
195
+ var DashboardPane_module_default = {
196
+ dashboardPane: `dashboard-pane`,
197
+ menuSubHeader: `menu-sub-header`,
198
+ dashboardTopBar: `dashboard-top-bar`,
199
+ filter: `filter`,
200
+ filterHeader: `filter-header`,
201
+ menu: `menu`,
202
+ menuItemCommand: `menu-item-command`,
203
+ menuItemIcon: `menu-item-icon`,
204
+ divider: `divider`,
205
+ separator: `separator`,
206
+ dashboardMenu: `dashboard-menu dashboard-pane`,
207
+ dashboardMenuBody: `dashboard-menu-body`,
208
+ dashboardSide: `dashboard-side dashboard-pane`,
209
+ dashboardMenuCollapsed: `dashboard-menu-collapsed`
210
+ };
211
+ var _hoisted_1 = { key: 1 };
212
+ var FluxDashboardMenu_default = /* @__PURE__ */ defineComponent({
213
+ __name: "FluxDashboardMenu",
214
+ props: {
215
+ icon: {},
216
+ title: {}
217
+ },
218
+ setup(__props) {
219
+ const { isMenuCollapsed } = useDashboardInjection_default();
220
+ return (_ctx, _cache) => {
221
+ return openBlock(), createElementBlock("aside", { class: normalizeClass([unref(DashboardPane_module_default).dashboardMenu, unref(isMenuCollapsed) && unref(DashboardPane_module_default).dashboardMenuCollapsed]) }, [createVNode(FluxDashboardTopBar_default, null, {
222
+ default: withCtx(() => [
223
+ renderSlot(_ctx.$slots, "top-bar-start"),
224
+ __props.icon ? (openBlock(), createBlock(unref(FluxIcon), {
225
+ key: 0,
226
+ name: __props.icon
227
+ }, null, 8, ["name"])) : createCommentVNode("", true),
228
+ __props.title ? (openBlock(), createElementBlock("h1", _hoisted_1, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
229
+ createVNode(unref(FluxSpacer)),
230
+ renderSlot(_ctx.$slots, "top-bar-end")
231
+ ]),
232
+ _: 3
233
+ }), createElementVNode("div", { class: normalizeClass(unref(DashboardPane_module_default).dashboardMenuBody) }, [renderSlot(_ctx.$slots, "default")], 2)], 2);
234
+ };
235
+ }
211
236
  });
212
- const dashboardNavigation = `dashboard-navigation`;
213
- const divider = `divider`;
214
- const dividerLine = `divider-line`;
215
- const menu = `menu`;
216
- const menuItem = `menu-item`;
217
- const menuItemHighlighted = `menu-item-highlighted`;
218
- const menuItemIcon = `menu-item-icon`;
219
- const menuItemLabel = `menu-item-label`;
220
- const dashboardNavigationCollapsed = `dashboard-navigation-collapsed dashboard-navigation`;
221
- const dashboardNavigationLogo = `dashboard-navigation-logo`;
222
- const dashboardNavigationRoundingFix = `dashboard-navigation-rounding-fix`;
223
- const dashboard = `dashboard`;
224
- const dashboardMenu = `dashboard-menu`;
225
- const dashboardNavigationHeader = `dashboard-navigation-header`;
226
- const dashboardNavigationNav = `dashboard-navigation-nav`;
227
- const $style = { dashboardNavigation, divider, dividerLine, menu, menuItem, menuItemHighlighted, menuItemIcon, menuItemLabel, dashboardNavigationCollapsed, dashboardNavigationLogo, dashboardNavigationRoundingFix, dashboard, dashboardMenu, dashboardNavigationHeader, dashboardNavigationNav };
228
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
229
- ...{
230
- inheritAttrs: false
231
- },
232
- __name: "FluxDashboardNavigation",
233
- props: {
234
- logoLocation: {}
235
- },
236
- setup(__props) {
237
- const slots = useSlots();
238
- const {
239
- isMenuCollapsed,
240
- isNavigationCollapsed
241
- } = useDashboardInjection();
242
- return (_ctx, _cache) => {
243
- const _component_router_link = resolveComponent("router-link");
244
- return openBlock(), createElementBlock("nav", mergeProps(_ctx.$attrs, {
245
- class: unref(isNavigationCollapsed) ? unref($style).dashboardNavigationCollapsed : unref($style).dashboardNavigation
246
- }), [
247
- createElementVNode("header", {
248
- class: normalizeClass(unref($style).dashboardNavigationHeader)
249
- }, [
250
- createVNode(unref(FluxMenuItem), {
251
- "icon-leading": "bars",
252
- onClick: _cache[0] || (_cache[0] = ($event) => isNavigationCollapsed.value = !unref(isNavigationCollapsed))
253
- }),
254
- slots.logo ? (openBlock(), createBlock(_component_router_link, {
255
- key: 0,
256
- class: normalizeClass(unref($style).dashboardNavigationLogo),
257
- to: __props.logoLocation || "/"
258
- }, {
259
- default: withCtx(() => [
260
- renderSlot(_ctx.$slots, "logo", normalizeProps(guardReactiveProps({ isNavigationCollapsed: unref(isNavigationCollapsed) })))
261
- ]),
262
- _: 3
263
- }, 8, ["class", "to"])) : createCommentVNode("", true),
264
- createVNode(unref(FluxMenuItem), {
265
- "icon-leading": "ellipsis-h",
266
- onClick: _cache[1] || (_cache[1] = ($event) => isMenuCollapsed.value = !unref(isMenuCollapsed))
267
- })
268
- ], 2),
269
- (openBlock(), createElementBlock(Fragment, null, renderList(2, (index) => {
270
- return createElementVNode("div", {
271
- key: index,
272
- class: normalizeClass(unref($style).dashboardNavigationRoundingFix)
273
- }, null, 2);
274
- }), 64)),
275
- createElementVNode("main", {
276
- class: normalizeClass(unref($style).dashboardNavigationNav)
277
- }, [
278
- renderSlot(_ctx.$slots, "default")
279
- ], 2)
280
- ], 16);
281
- };
282
- }
237
+ var DashboardNavigation_module_default = {
238
+ dashboardNavigation: `dashboard-navigation`,
239
+ divider: `divider`,
240
+ dividerLine: `divider-line`,
241
+ menu: `menu`,
242
+ menuItem: `menu-item`,
243
+ menuItemHighlighted: `menu-item-highlighted`,
244
+ menuItemIcon: `menu-item-icon`,
245
+ menuItemLabel: `menu-item-label`,
246
+ dashboardNavigationCollapsed: `dashboard-navigation-collapsed dashboard-navigation`,
247
+ dashboardNavigationLogo: `dashboard-navigation-logo`,
248
+ dashboardNavigationRoundingFix: `dashboard-navigation-rounding-fix`,
249
+ dashboard: `dashboard`,
250
+ dashboardMenu: `dashboard-menu`,
251
+ dashboardNavigationHeader: `dashboard-navigation-header`,
252
+ dashboardNavigationNav: `dashboard-navigation-nav`
253
+ };
254
+ var FluxDashboardNavigation_default = /* @__PURE__ */ defineComponent({
255
+ inheritAttrs: false,
256
+ __name: "FluxDashboardNavigation",
257
+ props: { logoLocation: {} },
258
+ setup(__props, { attrs: $attrs }) {
259
+ const slots = useSlots();
260
+ const { isMenuCollapsed, isNavigationCollapsed } = useDashboardInjection_default();
261
+ return (_ctx, _cache) => {
262
+ const _component_router_link = resolveComponent("router-link");
263
+ return openBlock(), createElementBlock("nav", mergeProps($attrs, { class: unref(isNavigationCollapsed) ? unref(DashboardNavigation_module_default).dashboardNavigationCollapsed : unref(DashboardNavigation_module_default).dashboardNavigation }), [
264
+ createElementVNode("header", { class: normalizeClass(unref(DashboardNavigation_module_default).dashboardNavigationHeader) }, [
265
+ createVNode(unref(FluxMenuItem), {
266
+ "icon-leading": "bars",
267
+ onClick: _cache[0] || (_cache[0] = ($event) => isNavigationCollapsed.value = !unref(isNavigationCollapsed))
268
+ }),
269
+ slots.logo ? (openBlock(), createBlock(_component_router_link, {
270
+ key: 0,
271
+ class: normalizeClass(unref(DashboardNavigation_module_default).dashboardNavigationLogo),
272
+ to: __props.logoLocation || "/"
273
+ }, {
274
+ default: withCtx(() => [renderSlot(_ctx.$slots, "logo", normalizeProps(guardReactiveProps({ isNavigationCollapsed: unref(isNavigationCollapsed) })))]),
275
+ _: 3
276
+ }, 8, ["class", "to"])) : createCommentVNode("", true),
277
+ createVNode(unref(FluxMenuItem), {
278
+ "icon-leading": "ellipsis-h",
279
+ onClick: _cache[1] || (_cache[1] = ($event) => isMenuCollapsed.value = !unref(isMenuCollapsed))
280
+ })
281
+ ], 2),
282
+ (openBlock(), createElementBlock(Fragment, null, renderList(2, (index) => {
283
+ return createElementVNode("div", {
284
+ key: index,
285
+ class: normalizeClass(unref(DashboardNavigation_module_default).dashboardNavigationRoundingFix)
286
+ }, null, 2);
287
+ }), 64)),
288
+ createElementVNode("main", { class: normalizeClass(unref(DashboardNavigation_module_default).dashboardNavigationNav) }, [renderSlot(_ctx.$slots, "default")], 2)
289
+ ], 16);
290
+ };
291
+ }
283
292
  });
284
- const _sfc_main = /* @__PURE__ */ defineComponent({
285
- __name: "FluxDashboardSide",
286
- props: {
287
- title: {}
288
- },
289
- setup(__props) {
290
- return (_ctx, _cache) => {
291
- return openBlock(), createElementBlock("aside", {
292
- class: normalizeClass(unref($style$1).dashboardSide)
293
- }, [
294
- createVNode(_sfc_main$4, null, {
295
- default: withCtx(() => [
296
- renderSlot(_ctx.$slots, "top-bar-start"),
297
- createElementVNode("h1", null, toDisplayString(__props.title), 1),
298
- createVNode(unref(FluxSpacer)),
299
- renderSlot(_ctx.$slots, "top-bar-end")
300
- ]),
301
- _: 3
302
- }),
303
- renderSlot(_ctx.$slots, "default")
304
- ], 2);
305
- };
306
- }
293
+ var FluxDashboardSide_default = /* @__PURE__ */ defineComponent({
294
+ __name: "FluxDashboardSide",
295
+ props: { title: {} },
296
+ setup(__props) {
297
+ return (_ctx, _cache) => {
298
+ return openBlock(), createElementBlock("aside", { class: normalizeClass(unref(DashboardPane_module_default).dashboardSide) }, [createVNode(FluxDashboardTopBar_default, null, {
299
+ default: withCtx(() => [
300
+ renderSlot(_ctx.$slots, "top-bar-start"),
301
+ createElementVNode("h1", null, toDisplayString(__props.title), 1),
302
+ createVNode(unref(FluxSpacer)),
303
+ renderSlot(_ctx.$slots, "top-bar-end")
304
+ ]),
305
+ _: 3
306
+ }), renderSlot(_ctx.$slots, "default")], 2);
307
+ };
308
+ }
307
309
  });
308
- export {
309
- _sfc_main$6 as FluxDashboard,
310
- _sfc_main$5 as FluxDashboardContent,
311
- _sfc_main$3 as FluxDashboardHeader,
312
- FluxDashboardInjectionKey,
313
- _sfc_main$2 as FluxDashboardMenu,
314
- _sfc_main$1 as FluxDashboardNavigation,
315
- _sfc_main as FluxDashboardSide,
316
- useDashboardInjection
317
- };
318
- //# sourceMappingURL=index.js.map
310
+ export { FluxDashboard_default as FluxDashboard, FluxDashboardContent_default as FluxDashboardContent, FluxDashboardHeader_default as FluxDashboardHeader, FluxDashboardInjectionKey, FluxDashboardMenu_default as FluxDashboardMenu, FluxDashboardNavigation_default as FluxDashboardNavigation, FluxDashboardSide_default as FluxDashboardSide, useDashboardInjection_default as useDashboardInjection };
311
+
312
+ //# sourceMappingURL=index.js.map