@flux-ui/dashboard 3.0.0-next.0 → 3.0.0-next.2
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/dist/component/FluxDashboard.vue.d.ts +13 -6
- package/dist/component/FluxDashboard.vue.d.ts.map +1 -1
- package/dist/component/FluxDashboardContent.vue.d.ts.map +1 -1
- package/dist/component/FluxDashboardHeader.vue.d.ts.map +1 -1
- package/dist/component/FluxDashboardMenu.vue.d.ts.map +1 -1
- package/dist/component/FluxDashboardNavigation.vue.d.ts.map +1 -1
- package/dist/component/FluxDashboardTopBar.vue.d.ts.map +1 -1
- package/dist/data/index.d.ts +1 -0
- package/dist/data/index.d.ts.map +1 -1
- package/dist/flux-dashboard.css +1 -1
- package/dist/flux-dashboard.js +150 -112
- package/dist/flux-dashboard.js.map +1 -1
- package/package.json +4 -4
- package/src/component/FluxDashboard.vue +29 -9
- package/src/component/FluxDashboardContent.vue +5 -2
- package/src/component/FluxDashboardHeader.vue +5 -1
- package/src/component/FluxDashboardMenu.vue +5 -2
- package/src/component/FluxDashboardNavigation.vue +33 -17
- package/src/component/FluxDashboardSide.vue +1 -1
- package/src/component/FluxDashboardTopBar.vue +5 -2
- package/src/css/component/Dashboard.module.scss +36 -294
- package/src/css/component/DashboardContent.module.scss +44 -0
- package/src/css/component/DashboardNavigation.module.scss +259 -0
- package/src/css/component/DashboardPane.module.scss +83 -0
- package/src/css/component/DashboardTopBar.module.scss +55 -0
- package/src/data/index.ts +1 -0
|
@@ -1,11 +1,18 @@
|
|
|
1
|
+
import { VNode } from 'vue';
|
|
1
2
|
declare function __VLS_template(): {
|
|
2
3
|
attrs: Partial<{}>;
|
|
3
|
-
slots: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
side
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
default(): VNode;
|
|
6
|
+
header(): VNode;
|
|
7
|
+
navigation(): VNode;
|
|
8
|
+
menu(): VNode;
|
|
9
|
+
side(): VNode;
|
|
10
|
+
}> & {
|
|
11
|
+
default(): VNode;
|
|
12
|
+
header(): VNode;
|
|
13
|
+
navigation(): VNode;
|
|
14
|
+
menu(): VNode;
|
|
15
|
+
side(): VNode;
|
|
9
16
|
};
|
|
10
17
|
refs: {};
|
|
11
18
|
rootEl: HTMLDivElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FluxDashboard.vue.d.ts","sourceRoot":"","sources":["../../src/component/FluxDashboard.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FluxDashboard.vue.d.ts","sourceRoot":"","sources":["../../src/component/FluxDashboard.vue"],"names":[],"mappings":"AAoDI,OAAO,EAAgB,KAAK,EAAS,MAAM,KAAK,CAAC;AAqCrD,iBAAS,cAAc;WA4BT,OAAO,IAA6B;;mBA5D/B,KAAK;kBACN,KAAK;sBACD,KAAK;gBACX,KAAK;gBACL,KAAK;;mBAJF,KAAK;kBACN,KAAK;sBACD,KAAK;gBACX,KAAK;gBACL,KAAK;;;;EA6DpB;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0RAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FluxDashboardContent.vue.d.ts","sourceRoot":"","sources":["../../src/component/FluxDashboardContent.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FluxDashboardContent.vue.d.ts","sourceRoot":"","sources":["../../src/component/FluxDashboardContent.vue"],"names":[],"mappings":"AAuBA,iBAAS,cAAc;WAuBT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,uRAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FluxDashboardHeader.vue.d.ts","sourceRoot":"","sources":["../../src/component/FluxDashboardHeader.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FluxDashboardHeader.vue.d.ts","sourceRoot":"","sources":["../../src/component/FluxDashboardHeader.vue"],"names":[],"mappings":"AAsCI,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAInD,KAAK,WAAW,GAAG;IACf,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAON,iBAAS,cAAc;WA0DT,OAAO,IAA6B;;uBAXvB,GAAG;qBACJ,GAAG;;;;EAe5B;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FluxDashboardMenu.vue.d.ts","sourceRoot":"","sources":["../../src/component/FluxDashboardMenu.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FluxDashboardMenu.vue.d.ts","sourceRoot":"","sources":["../../src/component/FluxDashboardMenu.vue"],"names":[],"mappings":"AAyCI,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAKnD,KAAK,WAAW,GAAG;IACf,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC;IAC7B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CAC1B,CAAC;AAON,iBAAS,cAAc;WA8DT,OAAO,IAA6B;;iCAZb,GAAG;+BACJ,GAAG;yBACT,GAAG;;;;EAehC;AAaD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0SAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FluxDashboardNavigation.vue.d.ts","sourceRoot":"","sources":["../../src/component/FluxDashboardNavigation.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FluxDashboardNavigation.vue.d.ts","sourceRoot":"","sources":["../../src/component/FluxDashboardNavigation.vue"],"names":[],"mappings":"AA+DI,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAQ7C,KAAK,WAAW,GAAG;IACf,YAAY,CAAC,EAAE,MAAM,CAAA;CACxB,CAAC;AAeN,iBAAS,cAAc;WAyFT,OAAO,IAA6B;;mBApG/B,GAAG;iBACL,GAAG;;mBADD,GAAG;iBACL,GAAG;;;;EAwGnB;AAYD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,kSAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FluxDashboardTopBar.vue.d.ts","sourceRoot":"","sources":["../../src/component/FluxDashboardTopBar.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FluxDashboardTopBar.vue.d.ts","sourceRoot":"","sources":["../../src/component/FluxDashboardTopBar.vue"],"names":[],"mappings":"AAuBA,iBAAS,cAAc;WAuBT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,uRAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
package/dist/data/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { InjectionKey, Ref } from 'vue';
|
|
2
2
|
export declare const FluxDashboardInjectionKey: InjectionKey<FluxDashboardInjection>;
|
|
3
3
|
export type FluxDashboardInjection = {
|
|
4
|
+
readonly isMenuCollapsed: Ref<boolean>;
|
|
4
5
|
readonly isNavigationCollapsed: Ref<boolean>;
|
|
5
6
|
};
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/data/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/data/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE7C,eAAO,MAAM,yBAAyB,EAAE,YAAY,CAAC,sBAAsB,CAAY,CAAC;AAExF,MAAM,MAAM,sBAAsB,GAAG;IACjC,QAAQ,CAAC,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;CAChD,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/data/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE7C,eAAO,MAAM,yBAAyB,EAAE,YAAY,CAAC,sBAAsB,CAAY,CAAC;AAExF,MAAM,MAAM,sBAAsB,GAAG;IACjC,QAAQ,CAAC,eAAe,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACvC,QAAQ,CAAC,qBAAqB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;CAChD,CAAC"}
|
package/dist/flux-dashboard.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
:root{--dashboard-background: rgb(var(--gray-0));--dashboard-duration: .36s;--dashboard-navigation-background: rgb(var(--primary-11));--dashboard-navigation-foreground: rgb(var(--primary-0))}[dark]{--dashboard-navigation-background: color-mix(in srgb, rgb(var(--gray-0)), black 50%)}body:has(.root>.dashboard){background:var(--dashboard-background)}.dashboard{min-height:100dvh}.is-resizing,.is-resizing *{animation:none!important;transition:none!important}@media (min-width: 1024px){.dashboard{display:grid;grid-template-columns:minmax(0,1fr);transition:padding-left var(--dashboard-duration) var(--swift-out)}.dashboard:has(>.dashboard-navigation){padding-left:300px}.dashboard:has(>.dashboard-navigation-collapsed){padding-left:84px}.dashboard:has(>.dashboard-header){grid-template-rows:auto minmax(0,1fr)}.dashboard:has(>.dashboard-menu){grid-template-columns:300px minmax(0,1fr)}.dashboard:has(>.dashboard-side){grid-template-columns:minmax(0,1fr) 300px}.dashboard:has(>.dashboard-menu):has(>.dashboard-side){grid-template-columns:300px minmax(0,1fr) 300px}}@media (max-width: 1023.98px){.dashboard{display:flex;padding-top:84px;flex-flow:column}}.dashboard-content{display:flex;padding:0 30px;flex-flow:column;flex-grow:1}.dashboard-content>:is(.calendar,.table){margin-left:-30px;margin-right:-30px;height:calc(100dvh - 84px);flex-grow:1}.dashboard-content>.calendar{border-left:0;border-right:0;border-radius:0}.dashboard-content>.calendar .calendar-actions{padding-left:30px;padding-right:30px}.dashboard-content>.table{border-top:1px solid rgb(var(--gray-2))}.dashboard-content>.table .table-cell:first-child .table-cell-content{padding-left:30px}.dashboard-content>.table .table-cell:last-child .table-cell-content{padding-right:30px}@media (max-width: 1023.98px){.dashboard-content-collapsed{display:none}}.dashboard-top-bar{position:sticky;display:flex;top:0;height:84px;padding-left:30px;padding-right:30px;align-items:center;flex-flow:row;gap:15px;background:rgb(var(--gray-0)/.9);-webkit-backdrop-filter:blur(10px) saturate(180%);backdrop-filter:blur(10px) saturate(180%);z-index:100}.dashboard-top-bar>h1{font-size:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-top-bar>.icon{color:var(--foreground-prominent)}.dashboard-top-bar>.separator{height:24px}.dashboard-header:not(.route-transition-enter-active):not(.route-transition-leave-active){transition:box-shadow var(--dashboard-duration) var(--swift-out)}.dashboard-header-scrolled{box-shadow:var(--shadow-md)}[dark] .dashboard-header-scrolled{box-shadow:0 1px rgb(var(--gray-1)),var(--shadow-md)}@media (max-width: 1023.98px){.dashboard>.dashboard-top-bar{top:84px}.dashboard>.dashboard-top-bar-collapsed{display:none}}.dashboard-pane{background:rgb(var(--gray-1));overflow:auto;z-index:200}.dashboard-pane .menu-sub-header{background:linear-gradient(to bottom,rgb(var(--gray-1)) 75%,transparent)}.dashboard-pane .dashboard-top-bar{background:rgb(var(--gray-1)/.9)}.dashboard-pane .filter{--background: rgb(var(--gray-1));max-height:calc(100dvh - 84px);margin-top:-9px;padding:9px 18px 18px;width:100%}.dashboard-pane .filter .filter-header{margin-left:-18px;margin-right:-18px;padding-left:18px;padding-right:18px}.dashboard-pane .filter .menu{font-size:14px}.dashboard-pane .filter .menu-item-command{font-size:12px}.dashboard-pane .filter .menu-item-icon{font-size:16px}.dashboard-pane .filter .menu>:where(.divider,.separator){margin-left:-18px;margin-right:-18px}.dashboard-menu{border-right:1px solid rgb(var(--gray-2))}.dashboard-menu-body{padding:0 18px 30px}.dashboard-side{border-left:1px solid rgb(var(--gray-2))}@media (min-width: 1024px){.dashboard-pane{position:sticky;top:0;height:100dvh;grid-row:1/span 2}}@media (max-width: 1023.98px){.dashboard-menu{height:calc(100dvh - 84px)}.dashboard-menu-collapsed{display:none}}.dashboard-navigation{position:fixed;display:flex;top:0;left:0;background:var(--dashboard-navigation-background);color:var(--dashboard-navigation-foreground);z-index:750}.dashboard-navigation .divider{margin:3px 15px}.dashboard-navigation .divider-line{background:rgb(var(--primary-10))}.dashboard-navigation .menu{flex-grow:1}.dashboard-navigation .menu-item{height:54px;min-width:54px;padding:15px;gap:21px;color:var(--dashboard-navigation-foreground);overflow:hidden}@media (hover: hover){.dashboard-navigation .menu-item:hover{background:rgb(var(--primary-10))}}.dashboard-navigation .menu-item:active{background:rgb(var(--primary-9))}.dashboard-navigation .menu-item-highlighted{background:rgb(var(--primary-10)/.5)}.dashboard-navigation .menu-item-icon{color:var(--dashboard-navigation-foreground);font-size:24px}.dashboard-navigation .menu-item-label{transition:var(--dashboard-duration) var(--swift-out);transition-property:filter,opacity,translate;white-space:nowrap}[dark] .dashboard-navigation .divider-line{background:rgb(var(--gray-2))}@media (hover: hover){[dark] .dashboard-navigation .menu-item:hover{background:rgb(var(--gray-2))}}[dark] .dashboard-navigation .menu-item:active{background:rgb(var(--gray-3))}[dark] .dashboard-navigation .menu-item-highlighted{background:rgb(var(--gray-1))}.dashboard-navigation-logo{display:flex;height:54px;width:54px;align-items:center;justify-content:center}.dashboard-navigation-logo :is(svg){max-height:48px;max-width:48px;width:100%}.dashboard-navigation-rounding-fix{position:absolute;display:block;height:var(--radius);width:var(--radius);content:"";background:var(--dashboard-navigation-background);transition:left var(--dashboard-duration) var(--swift-out)}.dashboard-navigation-rounding-fix:before{position:absolute;display:block;top:0;right:0;bottom:0;left:0;content:"";background:rgb(var(--gray-1))}.dashboard:not(:has(.dashboard-menu)) .dashboard-navigation-rounding-fix:before{background:rgb(var(--gray-0))}@media (min-width: 1024px){.dashboard-navigation{height:100dvh;width:300px;padding:15px;flex-flow:column;gap:15px;transition:width var(--dashboard-duration) var(--swift-out)}.dashboard-navigation-collapsed{width:84px}.dashboard-navigation-collapsed .menu-item-label{filter:blur(6px);opacity:0;translate:-12px 0}.dashboard-navigation-header{display:flex}.dashboard-navigation-header .menu-item{display:none}.dashboard-navigation-nav{display:flex;flex-flow:column;flex-grow:1}.dashboard-navigation-rounding-fix{left:100%}.dashboard-navigation-rounding-fix:first-of-type{top:0}.dashboard-navigation-rounding-fix:first-of-type:before{border-top-left-radius:var(--radius)}.dashboard-navigation-rounding-fix:not(:first-of-type){bottom:0}.dashboard-navigation-rounding-fix:not(:first-of-type):before{border-bottom-left-radius:var(--radius)}}@media (max-width: 1023.98px){.dashboard-navigation{width:100dvw;height:84px}.dashboard-navigation:after{position:fixed;display:block;top:0;right:0;bottom:0;left:0;width:100dvw;height:100dvh;content:"";background:rgb(var(--gray-3)/.5);-webkit-backdrop-filter:blur(3px) saturate(180%);backdrop-filter:blur(3px) saturate(180%);transition:var(--dashboard-duration) var(--swift-out);transition-property:background,backdrop-filter;z-index:1900}.dashboard-navigation-header{display:flex;width:inherit;height:inherit;padding:0 15px;align-items:center;flex-flow:row;justify-content:space-between}.dashboard-navigation-header .menu-item{align-self:center;justify-content:center}.dashboard-navigation-nav{position:fixed;display:flex;top:0;left:0;width:min(300px,100dvw - 42px);height:100dvh;padding:15px;flex-flow:column;background:var(--dashboard-navigation-background);transition:translate var(--dashboard-duration) var(--swift-out);z-index:2000}.dashboard-navigation-rounding-fix{position:fixed;top:84px;z-index:750}.dashboard-navigation-rounding-fix:first-of-type{left:0}.dashboard-navigation-rounding-fix:first-of-type:before{border-top-left-radius:var(--radius)}.dashboard-navigation-rounding-fix:not(:first-of-type){right:0}.dashboard-navigation-rounding-fix:not(:first-of-type):before{border-top-right-radius:var(--radius)}.dashboard-navigation-collapsed:after{background:transparent;-webkit-backdrop-filter:none;backdrop-filter:none;pointer-events:none}.dashboard-navigation-collapsed .dashboard-navigation-nav{pointer-events:none;translate:-100% 0}}
|
package/dist/flux-dashboard.js
CHANGED
|
@@ -1,179 +1,217 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { DateTime as
|
|
3
|
-
import { FluxIcon as
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { ref as g, watch as F, unref as e, defineComponent as b, provide as E, createElementBlock as u, openBlock as i, normalizeClass as l, renderSlot as r, inject as x, createBlock as $, withCtx as C, createCommentVNode as _, createVNode as h, toDisplayString as y, createElementVNode as v, useSlots as R, resolveComponent as A, mergeProps as j, normalizeProps as O, guardReactiveProps as P, Fragment as V, renderList as J } from "vue";
|
|
2
|
+
import { DateTime as T } from "luxon";
|
|
3
|
+
import { FluxIcon as w, FluxSpacer as S, FluxMenuItem as k } from "@flux-ui/components";
|
|
4
|
+
function K(n, s, a, o = { passive: !0 }) {
|
|
5
|
+
F(n, (t, d, c) => {
|
|
6
|
+
t && (t.addEventListener(s, a, o), c(() => t.removeEventListener(s, a)));
|
|
7
|
+
}, { immediate: !0 });
|
|
8
|
+
}
|
|
9
|
+
function H(n, s) {
|
|
10
|
+
let a = `flux/${n}`, o = g(t() ?? s);
|
|
11
|
+
function t() {
|
|
12
|
+
if (a in localStorage) {
|
|
13
|
+
let d = JSON.parse(localStorage.getItem(a));
|
|
14
|
+
return Array.isArray(d) && d[0] === "DateTime" && (d = T.fromISO(d[1])), d;
|
|
10
15
|
}
|
|
11
16
|
return null;
|
|
12
17
|
}
|
|
13
|
-
return
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
}),
|
|
18
|
+
return F(o, (d) => {
|
|
19
|
+
let c = d;
|
|
20
|
+
T.isDateTime(d) && (c = ["DateTime", d.toISO({ includeOffset: !0, extendedZone: !0 })]), localStorage.setItem(a, JSON.stringify(c));
|
|
21
|
+
}), o;
|
|
22
|
+
}
|
|
23
|
+
function Z(n) {
|
|
24
|
+
let s = g(0), a = g(0);
|
|
25
|
+
return n || (n = g(document)), K(n, "scroll", () => {
|
|
26
|
+
let o = e(n);
|
|
27
|
+
o instanceof Document && (o = o.scrollingElement), s.value = (o == null ? void 0 : o.scrollLeft) ?? 0, a.value = (o == null ? void 0 : o.scrollTop) ?? 0;
|
|
28
|
+
}), { x: s, y: a };
|
|
17
29
|
}
|
|
18
|
-
const
|
|
30
|
+
const z = Symbol(), q = "root", G = "dashboard", Q = "is-resizing", U = "dashboard-navigation", W = "dashboard-navigation-collapsed", X = "dashboard-header", Y = "dashboard-menu", aa = "dashboard-side", L = { root: q, dashboard: G, isResizing: Q, dashboardNavigation: U, dashboardNavigationCollapsed: W, dashboardHeader: X, dashboardMenu: Y, dashboardSide: aa }, Ua = /* @__PURE__ */ b({
|
|
19
31
|
__name: "FluxDashboard",
|
|
20
|
-
setup(
|
|
21
|
-
const a = H("dashboard-navigation-collapsed", !0);
|
|
22
|
-
return
|
|
32
|
+
setup(n) {
|
|
33
|
+
const s = H("dashboard-menu-collapsed", !0), a = H("dashboard-navigation-collapsed", !0), o = g(!1);
|
|
34
|
+
return E(z, {
|
|
35
|
+
isMenuCollapsed: s,
|
|
23
36
|
isNavigationCollapsed: a
|
|
24
|
-
}), (
|
|
25
|
-
|
|
37
|
+
}), F(a, (t, d, c) => {
|
|
38
|
+
let m;
|
|
39
|
+
function M() {
|
|
40
|
+
clearTimeout(m), o.value = !0, m = setTimeout(() => o.value = !1, 10);
|
|
41
|
+
}
|
|
42
|
+
window.addEventListener("resize", M, { passive: !0 }), c(() => window.removeEventListener("resize", M));
|
|
43
|
+
}, { immediate: !0 }), (t, d) => (i(), u("div", {
|
|
44
|
+
class: l([e(L).dashboard, o.value && e(L).isResizing])
|
|
26
45
|
}, [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
n(e.$slots, "header"),
|
|
33
|
-
n(e.$slots, "default")
|
|
34
|
-
], 2),
|
|
35
|
-
n(e.$slots, "side")
|
|
46
|
+
r(t.$slots, "navigation"),
|
|
47
|
+
r(t.$slots, "menu"),
|
|
48
|
+
r(t.$slots, "header"),
|
|
49
|
+
r(t.$slots, "default"),
|
|
50
|
+
r(t.$slots, "side")
|
|
36
51
|
], 2));
|
|
37
52
|
}
|
|
38
|
-
})
|
|
53
|
+
});
|
|
54
|
+
function N() {
|
|
55
|
+
const n = x(z);
|
|
56
|
+
if (!n)
|
|
57
|
+
throw new Error("[Flux] useDashboardInjection() was used outside a FluxDashboard component.");
|
|
58
|
+
return n;
|
|
59
|
+
}
|
|
60
|
+
const ea = "dashboard-content", oa = "calendar", sa = "table", na = "calendar-actions", ta = "table-cell", da = "table-cell-content", ra = "dashboard-content-collapsed", B = { dashboardContent: ea, calendar: oa, table: sa, calendarActions: na, tableCell: ta, tableCellContent: da, dashboardContentCollapsed: ra }, Wa = /* @__PURE__ */ b({
|
|
39
61
|
__name: "FluxDashboardContent",
|
|
40
|
-
setup(
|
|
41
|
-
|
|
42
|
-
|
|
62
|
+
setup(n) {
|
|
63
|
+
const { isMenuCollapsed: s } = N();
|
|
64
|
+
return (a, o) => (i(), u("main", {
|
|
65
|
+
class: l([e(B).dashboardContent, !e(s) && e(B).dashboardContentCollapsed])
|
|
43
66
|
}, [
|
|
44
|
-
|
|
67
|
+
r(a.$slots, "default")
|
|
45
68
|
], 2));
|
|
46
69
|
}
|
|
47
|
-
}),
|
|
70
|
+
}), ia = "dashboard-top-bar", la = "icon", ca = "separator", ua = "dashboard-header", ha = "route-transition-enter-active", ba = "route-transition-leave-active", ma = "dashboard", pa = "dashboard-top-bar-collapsed", va = "dashboard-header-scrolled dashboard-header", f = { dashboardTopBar: ia, icon: la, separator: ca, dashboardHeader: ua, routeTransitionEnterActive: ha, routeTransitionLeaveActive: ba, dashboard: ma, dashboardTopBarCollapsed: pa, dashboardHeaderScrolled: va }, I = /* @__PURE__ */ b({
|
|
48
71
|
__name: "FluxDashboardTopBar",
|
|
49
|
-
setup(
|
|
50
|
-
|
|
51
|
-
|
|
72
|
+
setup(n) {
|
|
73
|
+
const { isMenuCollapsed: s } = N();
|
|
74
|
+
return (a, o) => (i(), u("header", {
|
|
75
|
+
class: l([e(f).dashboardTopBar, !e(s) && e(f).dashboardTopBarCollapsed])
|
|
52
76
|
}, [
|
|
53
|
-
|
|
77
|
+
r(a.$slots, "default")
|
|
54
78
|
], 2));
|
|
55
79
|
}
|
|
56
|
-
}), ga = { key: 1 },
|
|
80
|
+
}), ga = { key: 1 }, Xa = /* @__PURE__ */ b({
|
|
57
81
|
__name: "FluxDashboardHeader",
|
|
58
82
|
props: {
|
|
59
83
|
icon: {},
|
|
60
84
|
title: {}
|
|
61
85
|
},
|
|
62
|
-
setup(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
86
|
+
setup(n) {
|
|
87
|
+
const { y: s } = Z();
|
|
88
|
+
return (a, o) => (i(), $(I, {
|
|
89
|
+
class: l(e(s) > 0 ? e(f).dashboardHeaderScrolled : e(f).dashboardHeader)
|
|
90
|
+
}, {
|
|
91
|
+
default: C(() => [
|
|
92
|
+
r(a.$slots, "start"),
|
|
93
|
+
a.icon ? (i(), $(e(w), {
|
|
67
94
|
key: 0,
|
|
68
95
|
name: a.icon
|
|
69
|
-
}, null, 8, ["name"])) :
|
|
70
|
-
a.title ? (
|
|
71
|
-
|
|
72
|
-
|
|
96
|
+
}, null, 8, ["name"])) : _("", !0),
|
|
97
|
+
a.title ? (i(), u("h1", ga, y(a.title), 1)) : _("", !0),
|
|
98
|
+
h(e(S)),
|
|
99
|
+
r(a.$slots, "end")
|
|
73
100
|
]),
|
|
74
101
|
_: 3
|
|
75
|
-
}));
|
|
102
|
+
}, 8, ["class"]));
|
|
76
103
|
}
|
|
77
|
-
}), Na = /* @__PURE__ */
|
|
104
|
+
}), fa = "dashboard-pane", $a = "menu-sub-header", _a = "dashboard-top-bar", Ca = "filter", Na = "filter-header", Da = "menu", Fa = "menu-item-command", ya = "menu-item-icon", Sa = "divider", Ia = "separator", Ma = "dashboard-menu-body", Ta = "dashboard-menu-collapsed", ka = "dashboard-menu dashboard-pane", Ha = "dashboard-side dashboard-pane", D = { dashboardPane: fa, menuSubHeader: $a, dashboardTopBar: _a, filter: Ca, filterHeader: Na, menu: Da, menuItemCommand: Fa, menuItemIcon: ya, divider: Sa, separator: Ia, dashboardMenuBody: Ma, dashboardMenuCollapsed: Ta, dashboardMenu: ka, dashboardSide: Ha }, Ya = /* @__PURE__ */ b({
|
|
78
105
|
__name: "FluxDashboardMenu",
|
|
79
106
|
props: {
|
|
80
107
|
icon: {},
|
|
81
108
|
title: {}
|
|
82
109
|
},
|
|
83
|
-
setup(
|
|
84
|
-
|
|
85
|
-
|
|
110
|
+
setup(n) {
|
|
111
|
+
const { isMenuCollapsed: s } = N();
|
|
112
|
+
return (a, o) => (i(), u("aside", {
|
|
113
|
+
class: l([e(D).dashboardMenu, e(s) && e(D).dashboardMenuCollapsed])
|
|
86
114
|
}, [
|
|
87
|
-
|
|
88
|
-
default:
|
|
89
|
-
|
|
90
|
-
a.icon ? (
|
|
115
|
+
h(I, null, {
|
|
116
|
+
default: C(() => [
|
|
117
|
+
r(a.$slots, "top-bar-start"),
|
|
118
|
+
a.icon ? (i(), $(e(w), {
|
|
91
119
|
key: 0,
|
|
92
120
|
name: a.icon
|
|
93
|
-
}, null, 8, ["name"])) :
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
121
|
+
}, null, 8, ["name"])) : _("", !0),
|
|
122
|
+
v("h1", null, y(a.title), 1),
|
|
123
|
+
h(e(S)),
|
|
124
|
+
r(a.$slots, "top-bar-end")
|
|
97
125
|
]),
|
|
98
126
|
_: 3
|
|
99
127
|
}),
|
|
100
|
-
|
|
101
|
-
class:
|
|
128
|
+
v("div", {
|
|
129
|
+
class: l(e(D).dashboardMenuBody)
|
|
102
130
|
}, [
|
|
103
|
-
|
|
131
|
+
r(a.$slots, "default")
|
|
104
132
|
], 2)
|
|
105
133
|
], 2));
|
|
106
134
|
}
|
|
107
|
-
})
|
|
108
|
-
function fa() {
|
|
109
|
-
const r = B(y);
|
|
110
|
-
if (!r)
|
|
111
|
-
throw new Error("[Flux] useDashboardInjection() was used outside a FluxDashboard component.");
|
|
112
|
-
return r;
|
|
113
|
-
}
|
|
114
|
-
const ya = /* @__PURE__ */ c({
|
|
135
|
+
}), La = "dashboard-navigation", Ba = "divider", wa = "divider-line", za = "menu", Ea = "menu-item", xa = "menu-item-highlighted", Ra = "menu-item-icon", Aa = "menu-item-label", ja = "dashboard-navigation-logo", Oa = "dashboard-navigation-rounding-fix", Pa = "dashboard", Va = "dashboard-menu", Ja = "dashboard-navigation-header", Ka = "dashboard-navigation-nav", Za = "dashboard-navigation-collapsed dashboard-navigation", p = { dashboardNavigation: La, divider: Ba, dividerLine: wa, menu: za, menuItem: Ea, menuItemHighlighted: xa, menuItemIcon: Ra, menuItemLabel: Aa, dashboardNavigationLogo: ja, dashboardNavigationRoundingFix: Oa, dashboard: Pa, dashboardMenu: Va, dashboardNavigationHeader: Ja, dashboardNavigationNav: Ka, dashboardNavigationCollapsed: Za }, ae = /* @__PURE__ */ b({
|
|
115
136
|
inheritAttrs: !1,
|
|
116
137
|
__name: "FluxDashboardNavigation",
|
|
117
138
|
props: {
|
|
118
139
|
logoLocation: {}
|
|
119
140
|
},
|
|
120
|
-
setup(
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
141
|
+
setup(n) {
|
|
142
|
+
const s = R(), {
|
|
143
|
+
isMenuCollapsed: a,
|
|
144
|
+
isNavigationCollapsed: o
|
|
145
|
+
} = N();
|
|
146
|
+
return (t, d) => {
|
|
147
|
+
const c = A("router-link");
|
|
148
|
+
return i(), u("nav", j(t.$attrs, {
|
|
149
|
+
class: e(o) ? e(p).dashboardNavigationCollapsed : e(p).dashboardNavigation
|
|
150
|
+
}), [
|
|
151
|
+
v("header", {
|
|
152
|
+
class: l(e(p).dashboardNavigationHeader)
|
|
153
|
+
}, [
|
|
154
|
+
h(e(k), {
|
|
155
|
+
"icon-leading": "bars",
|
|
156
|
+
onClick: d[0] || (d[0] = (m) => o.value = !e(o))
|
|
157
|
+
}),
|
|
158
|
+
s.logo ? (i(), $(c, {
|
|
133
159
|
key: 0,
|
|
134
|
-
class:
|
|
135
|
-
to:
|
|
160
|
+
class: l(e(p).dashboardNavigationLogo),
|
|
161
|
+
to: t.logoLocation || "/"
|
|
136
162
|
}, {
|
|
137
|
-
default:
|
|
138
|
-
|
|
163
|
+
default: C(() => [
|
|
164
|
+
r(t.$slots, "logo", O(P({ isNavigationCollapsed: e(o) })))
|
|
139
165
|
]),
|
|
140
166
|
_: 3
|
|
141
|
-
}, 8, ["class", "to"])) :
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
167
|
+
}, 8, ["class", "to"])) : _("", !0),
|
|
168
|
+
h(e(k), {
|
|
169
|
+
"icon-leading": "ellipsis-h",
|
|
170
|
+
onClick: d[1] || (d[1] = (m) => a.value = !e(a))
|
|
171
|
+
})
|
|
172
|
+
], 2),
|
|
173
|
+
(i(), u(V, null, J(2, (m) => v("div", {
|
|
174
|
+
key: m,
|
|
175
|
+
class: l(e(p).dashboardNavigationRoundingFix)
|
|
176
|
+
}, null, 2)), 64)),
|
|
177
|
+
v("main", {
|
|
178
|
+
class: l(e(p).dashboardNavigationNav)
|
|
179
|
+
}, [
|
|
180
|
+
r(t.$slots, "default")
|
|
181
|
+
], 2)
|
|
182
|
+
], 16);
|
|
145
183
|
};
|
|
146
184
|
}
|
|
147
|
-
}),
|
|
185
|
+
}), ee = /* @__PURE__ */ b({
|
|
148
186
|
__name: "FluxDashboardSide",
|
|
149
187
|
props: {
|
|
150
188
|
title: {}
|
|
151
189
|
},
|
|
152
|
-
setup(
|
|
153
|
-
return (
|
|
154
|
-
class:
|
|
190
|
+
setup(n) {
|
|
191
|
+
return (s, a) => (i(), u("aside", {
|
|
192
|
+
class: l(e(f).dashboardSide)
|
|
155
193
|
}, [
|
|
156
|
-
|
|
157
|
-
default:
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
194
|
+
h(I, null, {
|
|
195
|
+
default: C(() => [
|
|
196
|
+
r(s.$slots, "top-bar-start"),
|
|
197
|
+
v("h1", null, y(s.title), 1),
|
|
198
|
+
h(e(S)),
|
|
199
|
+
r(s.$slots, "top-bar-end")
|
|
162
200
|
]),
|
|
163
201
|
_: 3
|
|
164
202
|
}),
|
|
165
|
-
|
|
203
|
+
r(s.$slots, "default")
|
|
166
204
|
], 2));
|
|
167
205
|
}
|
|
168
206
|
});
|
|
169
207
|
export {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
208
|
+
Ua as FluxDashboard,
|
|
209
|
+
Wa as FluxDashboardContent,
|
|
210
|
+
Xa as FluxDashboardHeader,
|
|
211
|
+
z as FluxDashboardInjectionKey,
|
|
212
|
+
Ya as FluxDashboardMenu,
|
|
213
|
+
ae as FluxDashboardNavigation,
|
|
214
|
+
ee as FluxDashboardSide,
|
|
215
|
+
N as useDashboardInjection
|
|
178
216
|
};
|
|
179
217
|
//# sourceMappingURL=flux-dashboard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flux-dashboard.js","sources":["../../internals/dist/flux-internals.js","../src/data/index.ts","../src/component/FluxDashboard.vue","../src/composable/useDashboardInjection.ts","../src/component/FluxDashboardNavigation.vue"],"sourcesContent":["import{computed as E,ref as O,unref as b}from\"vue\";function C(e,t){let o=O(!1),r=O(e),s=E(()=>{let c=[],m=b(r).month,h=b(r).startOf(\"month\");do c.push(h),h=h.plus({day:1});while(h.month===m);let y=c[0],T=c[c.length-1];for(let x=1;x<y.weekday;++x)c.unshift(y.minus({day:x}));for(let x=T.weekday+1;x<=7;++x)c.push(T.plus({day:x-T.weekday}));while(c.length/7<6){let x=c[c.length-1];for(let A=1;A<=7;++A)c.push(x.plus({day:A}))}return c}),n=E(()=>b(s).slice(0,7).map((c)=>c.toLocaleString({weekday:t?.weekDayLength??\"short\"}))),i=E(()=>b(r).plus({month:1})),a=E(()=>b(r).minus({month:1})),f=E(()=>b(r).toLocaleString({month:t?.monthLength??\"long\"})),l=E(()=>b(r).year.toString());function u(c){o.value=r.value>c,r.value=c}function v(){u(b(r).plus({month:1}))}function L(){u(b(r).minus({month:1}))}return{isTransitioningToPast:o,viewDate:r,viewDateNext:i,viewDatePrevious:a,viewMonth:f,viewYear:l,dates:s,days:n,setViewDate:u,nextMonth:v,previousMonth:L}}import{computed as ue,unref as de}from\"vue\";function _(e,t){return{months:ue(()=>{let r=[],s=de(e),n=s.startOf(\"year\");while(n.month<=12&&n.year===s.year)r.push({date:n,label:n.toLocaleString({month:t})}),n=n.plus({months:1});return r})}}import{computed as me,ref as xe,unref as N,watch as be}from\"vue\";function U(e,t=10){let o=xe(0),r=me(()=>{let i=N(e).year,a=[],f=i-i%t+N(o)*t;for(let l=0;l<t;++l)a.push(f+l);return a});function s(){++o.value}function n(){--o.value}return be(e,()=>o.value=0),{years:r,next:s,previous:n}}import{onMounted as ke,onUnmounted as He,ref as De,unref as G,watchEffect as Ae}from\"vue\";import{Fragment as he}from\"vue\";function P(e){let t=[];for(let o of e){if(o.type===he&&Array.isArray(o.children)){t.push(...o.children);continue}t.push(o)}return t}import{isHtmlElement as ye}from\"@basmilius/utils\";var Te=[\"a:not([disabled])\",\"button:not([disabled])\",\"input[type=checkbox]:not([disabled])\",\"input[type=radio]:not([disabled])\",\"input[type=text]:not([disabled])\",'[tabindex]:not([disabled]):not([tabindex=\"-1\"])'].join(\",\");function d(e){return Array.from(e.querySelectorAll(Te)).filter(ye).filter((t)=>t.offsetWidth>0||t.offsetHeight>0||t===document.activeElement)}function M(e,t,o){let r=d(e),s=r.indexOf(t);if(s===-1)return null;let n=ge(r);ve(n,s,o);let i=Ee(s,o,n,r);if(!i){if(o===\"up\"||o===\"left\")i=r[s-1];if(o===\"down\"||o===\"right\")i=r[s+1]}return i}function ve(e,t,o){let r=e[t];e.forEach((s)=>{let n=s.center;switch(o){case\"up\":n={x:n.x,y:s.top+s.height};break;case\"down\":n={x:n.x,y:s.top};break;case\"left\":n={x:s.left+s.width,y:n.y};break;case\"right\":n={x:s.left,y:n.y};break}s.distance=Math.sqrt(Math.pow(r.center.x-n.x,2)+Math.pow(r.center.y-n.y,2))})}function Ee(e,t,o,r){let s=o[e],n=[];switch(t){case\"up\":n=o.map((a,f)=>f===e||a.top+a.height>s.top?Number.MAX_SAFE_INTEGER:a.distance);break;case\"down\":n=o.map((a,f)=>f===e||a.top<s.top+s.height?Number.MAX_SAFE_INTEGER:a.distance);break;case\"left\":n=o.map((a,f)=>f===e||a.left+a.width>s.left?Number.MAX_SAFE_INTEGER:a.distance);break;case\"right\":n=o.map((a,f)=>f===e||a.left<s.left+s.width?Number.MAX_SAFE_INTEGER:a.distance);break}let i=n.indexOf(Math.min(...n));if(n[i]!==Number.MAX_SAFE_INTEGER)return r[i];return null}function ge(e){return e.map((t)=>t.getBoundingClientRect()).map((t)=>({height:t.height,width:t.width,top:t.top,left:t.left,right:t.right,bottom:t.bottom,center:{x:t.left+t.width/2,y:t.top+t.height/2},distance:0}))}function K(e){let t=\"UnknownComponent\";if(e.type&&e.type.__name)t=e.type.__name;return t}import{camelCase as we}from\"lodash-es\";function z(e){return Object.fromEntries(Object.entries(e.props??{}).map(([t,o])=>[we(t),o]))}function B(e,t){if(!e.exposed||!(t in e.exposed))throw new Error(`'${t}' was not exposed by the component.`);return e.exposed[t]}import{isHtmlElement as Le}from\"@basmilius/utils\";function R(e,t,o=void 0){let r=d(e),s=o||document.activeElement;if(!s||!Le(s))return r[0]||void 0;let n=r.indexOf(s);return r[n+t]||void 0}function F(e){return Array.from(e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])')).filter((t)=>!t.hasAttribute(\"disabled\")||t.getAttribute(\"disabled\")!==\"true\").filter((t)=>!t.hasAttribute(\"aria-disabled\")||t.getAttribute(\"aria-disabled\")!==\"true\")}import{isHtmlElement as Me}from\"@basmilius/utils\";import{unref as Re}from\"vue\";function p(e){let t=Re(e);if(Me(t))return t;return t?.$el}function V(...e){console.warn(\"[Flux]\",...e)}function g(e,t,o=!1){let r=Fe(e),s=t.compareDocumentPosition(e),n;if(s&&Node.DOCUMENT_POSITION_PRECEDING||o)n=r.firstChild();else n=r.lastChild();(n!==null?n:e).focus()}function Fe(e){return document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:(t)=>t.tabIndex>=0&&!t.disabled?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP})}class q{get active(){return this.current?.isEnabled??!1}get current(){return this.#e[this.#e.length-1]??null}#t=[];#e=[];add(e,t,o=!0){let r={id:e,setEnabled:t,isEnabled:!0};if(this.current&&this.toggle(this.current,!1),this.#e.push(r),o)this.toggle(r,!0),this.emit()}remove(e){let t=this.#e.find((s)=>s.id===e);t&&this.toggle(t,!1);let r=this.current?.id===e;this.#e=this.#e.filter((s)=>s.id!==e),r&&this.current&&this.toggle(this.current,!0),this.emit()}emit(){this.#t.forEach((e)=>e(this.active,this.#e))}subscribe(e){return this.#t.push(e),e(this.active,this.#e),()=>this.#t=this.#t.filter((t)=>t!==e)}toggle(e,t){e.setEnabled(t),e.isEnabled=t}}var w=new q;var W=!globalThis.document;function X(e,t,o){let r=De([]);ke(()=>{document.addEventListener(\"pointerdown\",s)}),He(()=>{document.removeEventListener(\"pointerdown\",s)});function s(n){if(!G(t))return;!G(r).some((a)=>a.contains(n.target))&&o(n)}Ae(()=>{let n=[];(Array.isArray(e)?e:[e]).forEach((i)=>{let a=p(i);a&&n.push(a)}),r.value=n})}import{computed as Ie,getCurrentInstance as Se}from\"vue\";function Y(){let e=Se();return Ie(()=>e?.uid??(e?.proxy)._uid??0)}import{customRef as Oe,isRef as j,ref as Ce,watch as _e}from\"vue\";function Z(e,t,o=!1){let r=Ce(j(e)?e.value:e),s=Oe((n,i)=>({get(){return n(),r.value},set:Ne((a)=>{r.value=a,i()},t,o)}));if(j(e))_e(e,(n)=>s.value=n);return s}function Ne(e,t,o=!1){let r;return(...s)=>{if(o&&!r)e(...s);clearTimeout(r),r=setTimeout(()=>requestAnimationFrame(()=>e(...s)),t)}}import{onScopeDispose as Ue,watch as Pe}from\"vue\";function $(e,t,o,r={passive:!0}){let s,n=Pe(()=>p(e),(a)=>{if(s?.(),!a)return;a.addEventListener(t,o,r),s=()=>a.removeEventListener(t,o)});function i(){s?.(),n()}Ue(i)}import{onMounted as Ke,onUnmounted as ze,ref as Be,unref as Ve}from\"vue\";function J(e,t){let o=Be();Ke(()=>{s()}),ze(()=>{clearTimeout(o.value)});function r(){o.value=setTimeout(()=>requestAnimationFrame(s),Ve(e))}function s(){r(),t()}}import{ref as qe,watch as We}from\"vue\";function Q(e,t={}){let o=qe(t.initial??!1);return We(e,(r,s,n)=>{let i=p(e);if(!i)return;let a=new IntersectionObserver((f)=>o.value=f[0]?.isIntersecting??!1,t);a.observe(i),n(()=>a.disconnect())},{immediate:!0}),o}import{onScopeDispose as Ge,watch as Xe}from\"vue\";function k(e,t,o){o??={attributes:!0};let r,s=Xe(()=>p(e),(a)=>{if(n(),!a)return;r=new MutationObserver(t),r.observe(a,o)},{immediate:!0});function n(){if(!r)return;r.disconnect(),r=void 0}function i(){n(),s()}Ge(i)}import{DateTime as ee}from\"luxon\";import{ref as Ye,watch as je}from\"vue\";function te(e,t){let o=`flux/${e}`,r=Ye(s()??t);function s(){if(o in localStorage){let n=JSON.parse(localStorage.getItem(o));if(Array.isArray(n)&&n[0]===\"DateTime\")n=ee.fromISO(n[1]);return n}return null}return je(r,(n)=>{let i=n;if(ee.isDateTime(n))i=[\"DateTime\",n.toISO({includeOffset:!0,extendedZone:!0})];localStorage.setItem(o,JSON.stringify(i))}),r}import{ref as se,watch as ae}from\"vue\";import{onMounted as Ze,onUnmounted as $e,ref as oe,unref as ne}from\"vue\";var Je=0;function H(e=!1){let t=oe(`focus-trap-${++Je}`),o=oe(!1);return Ze(()=>w.add(ne(t),(r)=>o.value=r,e)),$e(()=>w.remove(ne(t))),o}import{onUnmounted as Qe,ref as et,unref as re}from\"vue\";function D(e){let t=et(document.activeElement);Qe(()=>{if(re(e))return;requestAnimationFrame(()=>re(t)?.focus())})}function ie(e,t={}){if(W)return;let{disable:o=se(!1),disableReturn:r=se(!1),attachTo:s=null}=t,n=H(!o);D(r),ae(e,(i,a,f)=>{let l=p(e),u=s||document;if(n.value&&l&&document.activeElement&&!l.contains(document.activeElement)&&!l.querySelector(\"[autofocus]\"))g(l,document.activeElement,!0);function v(c){if(!n.value||!l)return;let m=c.target||document.body;if(l.contains(m))return;c.preventDefault(),c.stopImmediatePropagation(),g(l,m)}function L(c){if(!n.value||!l)return;if(!c.relatedTarget||c.relatedTarget===document.body)c.preventDefault(),l.focus();let m=c.target||document.body;if(l.contains(m))return;g(l,m)}if(u.addEventListener(\"focusin\",v,{capture:!0}),u.addEventListener(\"focusout\",L,{capture:!0}),l){let c=d(l),m=c.findIndex((T)=>T.classList.contains(\"is-active\")),h=c.findIndex((T)=>!T.hasAttribute(\"aria-disabled\")),y=c[0];if(m>-1)y=c[m];if(h>-1)y=c[h];if(y)y.focus()}f(()=>{u.removeEventListener(\"focusin\",v),u.removeEventListener(\"focusout\",L)})},{immediate:!0}),ae(()=>o,()=>{let i=p(e);if(n.value=!o,o||!i)return;let a=d(i);if(a.includes(document.activeElement))return;a[0]?.focus()},{immediate:!0})}import{onMounted as tt,onUnmounted as ot,ref as nt}from\"vue\";function ce(e){let t=nt(null);tt(()=>t.value=w.subscribe(e)),ot(()=>t.value?.())}import{watch as rt}from\"vue\";function le(e,{cycle:t=!0,direction:o=\"bidirectional\"}={}){k(e,()=>s(r(),!1));function r(){let i=p(e),a=d(i),f=a.findIndex((u)=>u.classList.contains(\"is-active\")),l=a.findIndex((u)=>!u.hasAttribute(\"aria-disabled\"));if(f>-1)return f;if(l>-1)return l;return 0}function s(i,a=!0){let f=p(e),l=d(f);l.forEach((u,v)=>u.tabIndex=v===i?0:-1),a&&l[i]?.focus()}function n(i){let a=p(e),f=d(a);if([\"Enter\",\" \"].includes(i.key))return;switch(o){case\"bidirectional\":st(i,a,f,s);break;case\"horizontal\":case\"vertical\":at(i,a,t,o,f,s);break}}rt(e,(i,a,f)=>{let l=p(e);if(!l)return;l.addEventListener(\"keydown\",n),s(r(),!1),f(()=>l.removeEventListener(\"keydown\",n))},{immediate:!0})}function st(e,t,o,r){let s;switch(e.key){case\"ArrowUp\":s=\"up\";break;case\"ArrowDown\":s=\"down\";break;case\"ArrowLeft\":s=\"left\";break;case\"ArrowRight\":s=\"right\";break;default:return}let n=M(t,document.activeElement,s);if(n)r(o.indexOf(n));e.preventDefault()}function at(e,t,o,r,s,n){let i;if(e.key===(r===\"horizontal\"?\"ArrowLeft\":\"ArrowUp\"))i=-1;else if(e.key===(r===\"horizontal\"?\"ArrowRight\":\"ArrowDown\"))i=1;else return;let a=R(t,i);if(a)n(s.indexOf(a));else if(o)n(i===1?0:s.length-1);e.preventDefault()}var Jo=\"#f8fafc\",Qo=\"#f1f5f9\",en=\"#e2e8f0\",tn=\"#cbd5e1\",on=\"#94a3b8\",nn=\"#64748b\",rn=\"#475569\",sn=\"#334155\",an=\"#1e293b\",cn=\"#0f172a\",ln=\"#020617\",fn=\"#f9fafb\",pn=\"#f3f4f6\",un=\"#e5e7eb\",dn=\"#d1d5db\",mn=\"#9ca3af\",xn=\"#6b7280\",bn=\"#4b5563\",hn=\"#374151\",yn=\"#1f2937\",Tn=\"#111827\",vn=\"#030712\",En=\"#fafafa\",gn=\"#f4f4f5\",wn=\"#e4e4e7\",Ln=\"#d4d4d8\",Mn=\"#a1a1aa\",Rn=\"#71717a\",Fn=\"#52525b\",kn=\"#3f3f46\",Hn=\"#27272a\",Dn=\"#18181b\",An=\"#09090b\",In=\"#fafafa\",Sn=\"#f5f5f5\",On=\"#e5e5e5\",Cn=\"#d4d4d4\",_n=\"#a3a3a3\",Nn=\"#737373\",Un=\"#525252\",Pn=\"#404040\",Kn=\"#262626\",zn=\"#171717\",Bn=\"#0a0a0a\",Vn=\"#fafaf9\",qn=\"#f5f5f4\",Wn=\"#e7e5e4\",Gn=\"#d6d3d1\",Xn=\"#a8a29e\",Yn=\"#78716c\",jn=\"#57534e\",Zn=\"#44403c\",$n=\"#292524\",Jn=\"#1c1917\",Qn=\"#0c0a09\",er=\"#fef2f2\",tr=\"#fee2e2\",or=\"#fecaca\",nr=\"#fca5a5\",rr=\"#f87171\",sr=\"#ef4444\",ar=\"#dc2626\",ir=\"#b91c1c\",cr=\"#991b1b\",lr=\"#7f1d1d\",fr=\"#450a0a\",pr=\"#fff7ed\",ur=\"#ffedd5\",dr=\"#fed7aa\",mr=\"#fdba74\",xr=\"#fb923c\",br=\"#f97316\",hr=\"#ea580c\",yr=\"#c2410c\",Tr=\"#9a3412\",vr=\"#7c2d12\",Er=\"#431407\",gr=\"#fffbeb\",wr=\"#fef3c7\",Lr=\"#fde68a\",Mr=\"#fcd34d\",Rr=\"#fbbf24\",Fr=\"#f59e0b\",kr=\"#d97706\",Hr=\"#b45309\",Dr=\"#92400e\",Ar=\"#78350f\",Ir=\"#451a03\",Sr=\"#fefce8\",Or=\"#fef9c3\",Cr=\"#fef08a\",_r=\"#fde047\",Nr=\"#facc15\",Ur=\"#eab308\",Pr=\"#ca8a04\",Kr=\"#a16207\",zr=\"#854d0e\",Br=\"#713f12\",Vr=\"#422006\",qr=\"#f7fee7\",Wr=\"#ecfccb\",Gr=\"#d9f99d\",Xr=\"#bef264\",Yr=\"#a3e635\",jr=\"#84cc16\",Zr=\"#65a30d\",$r=\"#4d7c0f\",Jr=\"#3f6212\",Qr=\"#365314\",es=\"#1a2e05\",ts=\"#f0fdf4\",os=\"#dcfce7\",ns=\"#bbf7d0\",rs=\"#86efac\",ss=\"#4ade80\",as=\"#22c55e\",is=\"#16a34a\",cs=\"#15803d\",ls=\"#166534\",fs=\"#14532d\",ps=\"#052e16\",us=\"#ecfdf5\",ds=\"#d1fae5\",ms=\"#a7f3d0\",xs=\"#6ee7b7\",bs=\"#34d399\",hs=\"#10b981\",ys=\"#059669\",Ts=\"#047857\",vs=\"#065f46\",Es=\"#064e3b\",gs=\"#022c22\",ws=\"#f0fdfa\",Ls=\"#ccfbf1\",Ms=\"#99f6e4\",Rs=\"#5eead4\",Fs=\"#2dd4bf\",ks=\"#14b8a6\",Hs=\"#0d9488\",Ds=\"#0f766e\",As=\"#115e59\",Is=\"#134e4a\",Ss=\"#042f2e\",Os=\"#ecfeff\",Cs=\"#cffafe\",_s=\"#a5f3fc\",Ns=\"#67e8f9\",Us=\"#22d3ee\",Ps=\"#06b6d4\",Ks=\"#0891b2\",zs=\"#0e7490\",Bs=\"#155e75\",Vs=\"#164e63\",qs=\"#083344\",Ws=\"#f0f9ff\",Gs=\"#e0f2fe\",Xs=\"#bae6fd\",Ys=\"#7dd3fc\",js=\"#38bdf8\",Zs=\"#0ea5e9\",$s=\"#0284c7\",Js=\"#0369a1\",Qs=\"#075985\",ea=\"#0c4a6e\",ta=\"#082f49\",oa=\"#eff6ff\",na=\"#dbeafe\",ra=\"#bfdbfe\",sa=\"#93c5fd\",aa=\"#60a5fa\",ia=\"#3b82f6\",ca=\"#2563eb\",la=\"#1d4ed8\",fa=\"#1e40af\",pa=\"#1e3a8a\",ua=\"#172554\",da=\"#eef2ff\",ma=\"#e0e7ff\",xa=\"#c7d2fe\",ba=\"#a5b4fc\",ha=\"#818cf8\",ya=\"#6366f1\",Ta=\"#4f46e5\",va=\"#4338ca\",Ea=\"#3730a3\",ga=\"#312e81\",wa=\"#1e1b4b\",La=\"#f5f3ff\",Ma=\"#ede9fe\",Ra=\"#ddd6fe\",Fa=\"#c4b5fd\",ka=\"#a78bfa\",Ha=\"#8b5cf6\",Da=\"#7c3aed\",Aa=\"#6d28d9\",Ia=\"#5b21b6\",Sa=\"#4c1d95\",Oa=\"#2e1065\",Ca=\"#faf5ff\",_a=\"#f3e8ff\",Na=\"#e9d5ff\",Ua=\"#d8b4fe\",Pa=\"#c084fc\",Ka=\"#a855f7\",za=\"#9333ea\",Ba=\"#7e22ce\",Va=\"#6b21a8\",qa=\"#581c87\",Wa=\"#3b0764\",Ga=\"#fdf4ff\",Xa=\"#fae8ff\",Ya=\"#f5d0fe\",ja=\"#f0abfc\",Za=\"#e879f9\",$a=\"#d946ef\",Ja=\"#c026d3\",Qa=\"#a21caf\",ei=\"#86198f\",ti=\"#701a75\",oi=\"#4a044e\",ni=\"#fdf2f8\",ri=\"#fce7f3\",si=\"#fbcfe8\",ai=\"#f9a8d4\",ii=\"#f472b6\",ci=\"#ec4899\",li=\"#db2777\",fi=\"#be185d\",pi=\"#9d174d\",ui=\"#831843\",di=\"#500724\",mi=\"#fff1f2\",xi=\"#ffe4e6\",bi=\"#fecdd3\",hi=\"#fda4af\",yi=\"#fb7185\",Ti=\"#f43f5e\",vi=\"#e11d48\",Ei=\"#be123c\",gi=\"#9f1239\",wi=\"#881337\",Li=\"#4c0519\";class fe{#t;#e;constructor(e){this.#e=[],this.#t=e,this.onKeyDown=this.onKeyDown.bind(this)}focusElement(e,t=!0){if(!this.#e[e])return;for(let o=0;o<this.#e.length;++o)this.#e[o].tabIndex=o===e?0:-1;if(t)this.#e[e]?.focus()}register(){this.#e=F(this.#t),this.#t.addEventListener(\"keydown\",this.onKeyDown),this.focusElement(0,!1)}unregister(){this.#t.removeEventListener(\"keydown\",this.onKeyDown)}onKeyDown(e){let t=this.#t.querySelector('[tabindex=\"0\"]'),o=this.#e.findIndex((r)=>r===t)??0;switch(e.key){case\"ArrowUp\":case\"ArrowLeft\":this.focusElement(o-1);break;case\"ArrowDown\":case\"ArrowRight\":this.focusElement(o+1);break;default:return}e.preventDefault(),e.stopPropagation()}}var it={beforeUnmount(e){I.get(e)?.unregister(),I.delete(e)},mounted(e){let t=new fe(e);t.register(),I.set(e,t)}},I=new WeakMap;class pe{#t;#e;constructor(e){this.#t=e,this.#e=new MutationObserver(this.onMutation.bind(this))}register(){this.#e.observe(this.#t,{childList:!0,subtree:!0}),requestAnimationFrame(this.onMutation.bind(this))}unregister(){this.#e.disconnect()}onMutation(){let{height:e}=getComputedStyle(this.#t);this.#t.style.height=\"auto\";let{height:t}=getComputedStyle(this.#t);if(this.#t.style.height=e,t===e)return;getComputedStyle(this.#t),requestAnimationFrame(()=>requestAnimationFrame(()=>this.#t.style.height=t))}}var ct={beforeUnmount(e){S.get(e)?.unregister(),S.delete(e)},mounted(e){let t=new pe(e);t.register(),S.set(e,t)}},S=new WeakMap;export{An as zinc950,Dn as zinc900,Hn as zinc800,kn as zinc700,Fn as zinc600,Rn as zinc500,En as zinc50,Mn as zinc400,Ln as zinc300,wn as zinc200,gn as zinc100,Vr as yellow950,Br as yellow900,zr as yellow800,Kr as yellow700,Pr as yellow600,Ur as yellow500,Sr as yellow50,Nr as yellow400,_r as yellow300,Cr as yellow200,Or as yellow100,g as wrapFocus,V as warn,Oa as violet950,Sa as violet900,Ia as violet800,Aa as violet700,Da as violet600,Ha as violet500,La as violet50,ka as violet400,Fa as violet300,Ra as violet200,Ma as violet100,ct as vHeightTransition,it as vFocusTrap,te as useRemembered,k as useMutationObserver,J as useInterval,Q as useInView,le as useFocusZone,ce as useFocusTrapSubscription,D as useFocusTrapReturn,H as useFocusTrapLock,ie as useFocusTrap,$ as useEventListener,Z as useDebouncedRef,Y as useComponentId,X as useClickOutside,U as useCalendarYearSwitcher,_ as useCalendarMonthSwitcher,C as useCalendar,p as unrefTemplateElement,Ss as teal950,Is as teal900,As as teal800,Ds as teal700,Hs as teal600,ks as teal500,ws as teal50,Fs as teal400,Rs as teal300,Ms as teal200,Ls as teal100,Qn as stone950,Jn as stone900,$n as stone800,Zn as stone700,jn as stone600,Yn as stone500,Vn as stone50,Xn as stone400,Gn as stone300,Wn as stone200,qn as stone100,ln as slate950,cn as slate900,an as slate800,sn as slate700,rn as slate600,nn as slate500,Jo as slate50,on as slate400,tn as slate300,en as slate200,Qo as slate100,ta as sky950,ea as sky900,Qs as sky800,Js as sky700,$s as sky600,Zs as sky500,Ws as sky50,js as sky400,Ys as sky300,Xs as sky200,Gs as sky100,Li as rose950,wi as rose900,gi as rose800,Ei as rose700,vi as rose600,Ti as rose500,mi as rose50,yi as rose400,hi as rose300,bi as rose200,xi as rose100,fr as red950,lr as red900,cr as red800,ir as red700,ar as red600,sr as red500,er as red50,rr as red400,nr as red300,or as red200,tr as red100,Wa as purple950,qa as purple900,Va as purple800,Ba as purple700,za as purple600,Ka as purple500,Ca as purple50,Pa as purple400,Ua as purple300,Na as purple200,_a as purple100,di as pink950,ui as pink900,pi as pink800,fi as pink700,li as pink600,ci as pink500,ni as pink50,ii as pink400,ai as pink300,si as pink200,ri as pink100,Er as orange950,vr as orange900,Tr as orange800,yr as orange700,hr as orange600,br as orange500,pr as orange50,xr as orange400,mr as orange300,dr as orange200,ur as orange100,Bn as neutral950,zn as neutral900,Kn as neutral800,Pn as neutral700,Un as neutral600,Nn as neutral500,In as neutral50,_n as neutral400,Cn as neutral300,On as neutral200,Sn as neutral100,es as lime950,Qr as lime900,Jr as lime800,$r as lime700,Zr as lime600,jr as lime500,qr as lime50,Yr as lime400,Xr as lime300,Gr as lime200,Wr as lime100,W as isSSR,wa as indigo950,ga as indigo900,Ea as indigo800,va as indigo700,Ta as indigo600,ya as indigo500,da as indigo50,ha as indigo400,ba as indigo300,xa as indigo200,ma as indigo100,ps as green950,fs as green900,ls as green800,cs as green700,is as green600,as as green500,ts as green50,ss as green400,rs as green300,ns as green200,os as green100,vn as gray950,Tn as gray900,yn as gray800,hn as gray700,bn as gray600,xn as gray500,fn as gray50,mn as gray400,dn as gray300,un as gray200,pn as gray100,F as getKeyboardFocusableElements,d as getFocusableElements,R as getFocusableElement,B as getExposedRef,z as getComponentProps,K as getComponentName,M as getBidirectionalFocusElement,oi as fuchsia950,ti as fuchsia900,ei as fuchsia800,Qa as fuchsia700,Ja as fuchsia600,$a as fuchsia500,Ga as fuchsia50,Za as fuchsia400,ja as fuchsia300,Ya as fuchsia200,Xa as fuchsia100,P as flattenVNodeTree,gs as emerald950,Es as emerald900,vs as emerald800,Ts as emerald700,ys as emerald600,hs as emerald500,us as emerald50,bs as emerald400,xs as emerald300,ms as emerald200,ds as emerald100,qs as cyan950,Vs as cyan900,Bs as cyan800,zs as cyan700,Ks as cyan600,Ps as cyan500,Os as cyan50,Us as cyan400,Ns as cyan300,_s as cyan200,Cs as cyan100,ua as blue950,pa as blue900,fa as blue800,la as blue700,ca as blue600,ia as blue500,oa as blue50,aa as blue400,sa as blue300,ra as blue200,na as blue100,Ir as amber950,Ar as amber900,Dr as amber800,Hr as amber700,kr as amber600,Fr as amber500,gr as amber50,Rr as amber400,Mr as amber300,Lr as amber200,wr as amber100,w as FOCUS_TRAP_LOCKS};\n\n//# debugId=B2DEA7799817199364756E2164756E21\n//# sourceMappingURL=flux-internals.js.map\n","import type { InjectionKey, Ref } from 'vue';\n\nexport const FluxDashboardInjectionKey: InjectionKey<FluxDashboardInjection> = Symbol();\n\nexport type FluxDashboardInjection = {\n readonly isNavigationCollapsed: Ref<boolean>;\n};\n","<template>\n <div :class=\"$style.dashboard\">\n <slot name=\"navigation\"/>\n\n <slot name=\"menu\"/>\n\n <div :class=\"$style.dashboardBody\">\n <slot name=\"header\"/>\n <slot/>\n </div>\n\n <slot name=\"side\"/>\n </div>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { useRemembered } from '@flux-ui/internals';\n import { provide } from 'vue';\n import { FluxDashboardInjectionKey } from '$fluxDashboard/data';\n import $style from '$fluxDashboard/css/component/Dashboard.module.scss';\n\n const isNavigationCollapsed = useRemembered('dashboard-navigation-collapsed', true);\n\n provide(FluxDashboardInjectionKey, {\n isNavigationCollapsed\n });\n</script>\n","import { inject } from 'vue';\nimport { FluxDashboardInjection, FluxDashboardInjectionKey } from '$fluxDashboard/data';\n\nexport default function (): FluxDashboardInjection {\n const injection = inject(FluxDashboardInjectionKey);\n\n if (!injection) {\n throw new Error('[Flux] useDashboardInjection() was used outside a FluxDashboard component.');\n }\n\n return injection;\n}\n","<template>\n <div\n v-for=\"index of 2\"\n :key=\"index\"\n :class=\"isNavigationCollapsed ? $style.dashboardNavigationRoundingFixCollapsed : $style.dashboardNavigationRoundingFix\"/>\n\n <nav\n v-bind=\"$attrs\"\n :class=\"isNavigationCollapsed ? $style.dashboardNavigationCollapsed : $style.dashboardNavigation\">\n <router-link\n v-if=\"slots.logo\"\n :class=\"$style.dashboardNavigationLogo\"\n :to=\"logoLocation || '/'\">\n <slot\n name=\"logo\"\n v-bind=\"{isNavigationCollapsed}\"/>\n </router-link>\n\n <slot/>\n </nav>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import type { FluxTo } from '@flux-ui/types';\n import { useDashboardInjection } from '$fluxDashboard/composable';\n import $style from '$fluxDashboard/css/component/Dashboard.module.scss';\n\n defineOptions({\n inheritAttrs: false\n });\n\n defineProps<{\n logoLocation?: FluxTo\n }>();\n\n const slots = defineSlots<{\n default(): any;\n logo?(): any;\n }>();\n\n const {isNavigationCollapsed} = useDashboardInjection();\n</script>\n"],"names":["te","e","t","o","r","Ye","s","n","ee","je","i","FluxDashboardInjectionKey","isNavigationCollapsed","useRemembered","provide","useDashboardInjection","injection","inject","slots","_useSlots"],"mappings":";;;AAAgmO,SAASA,EAAGC,GAAEC,GAAE;AAAC,MAAIC,IAAE,QAAQF,CAAC,IAAGG,IAAEC,EAAGC,OAAKJ,CAAC;AAAE,WAASI,IAAG;AAAC,QAAGH,KAAK,cAAa;AAAC,UAAII,IAAE,KAAK,MAAM,aAAa,QAAQJ,CAAC,CAAC;AAAE,aAAG,MAAM,QAAQI,CAAC,KAAGA,EAAE,CAAC,MAAI,eAAWA,IAAEC,EAAG,QAAQD,EAAE,CAAC,CAAC,IAASA;AAAA,IAAC;AAAC,WAAO;AAAA,EAAI;AAAC,SAAOE,EAAGL,GAAE,CAACG,MAAI;AAAC,QAAIG,IAAEH;AAAE,IAAGC,EAAG,WAAWD,CAAC,MAAEG,IAAE,CAAC,YAAWH,EAAE,MAAM,EAAC,eAAc,IAAG,cAAa,GAAE,CAAC,CAAC,IAAE,aAAa,QAAQJ,GAAE,KAAK,UAAUO,CAAC,CAAC;AAAA,EAAC,CAAC,GAAEN;AAAC;ACE37O,MAAMO,IAAkE,OAAO;;;ACqB5E,UAAAC,IAAwBC,EAAc,kCAAkC,EAAI;AAElF,WAAAC,EAAQH,GAA2B;AAAA,MAC/B,uBAAAC;AAAA,IAAA,CACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxB8C,SAAAG,KAAA;AACzC,QAAAC,IAAYC,EAAON,CAAyB;AAElD,MAAI,CAACK;AACK,UAAA,IAAI,MAAM,4EAA4E;AAGzF,SAAAA;AACX;;;;;;;;AC0BI,UAAME,IAAQC,EAGV,GAEE,EAAC,uBAAAP,EAAqB,IAAIG,GAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"flux-dashboard.js","sources":["../../internals/dist/flux-internals.js","../src/data/index.ts","../src/component/FluxDashboard.vue","../src/composable/useDashboardInjection.ts","../src/component/FluxDashboardContent.vue","../src/component/FluxDashboardTopBar.vue","../src/component/FluxDashboardHeader.vue","../src/component/FluxDashboardMenu.vue","../src/component/FluxDashboardNavigation.vue"],"sourcesContent":["import{computed as E,ref as _,unref as b}from\"vue\";function N(e,t){let o=_(!1),n=_(e),s=E(()=>{let c=[],m=b(n).month,h=b(n).startOf(\"month\");do c.push(h),h=h.plus({day:1});while(h.month===m);let y=c[0],T=c[c.length-1];for(let x=1;x<y.weekday;++x)c.unshift(y.minus({day:x}));for(let x=T.weekday+1;x<=7;++x)c.push(T.plus({day:x-T.weekday}));while(c.length/7<6){let x=c[c.length-1];for(let S=1;S<=7;++S)c.push(x.plus({day:S}))}return c}),r=E(()=>b(s).slice(0,7).map((c)=>c.toLocaleString({weekday:t?.weekDayLength??\"short\"}))),i=E(()=>b(n).plus({month:1})),a=E(()=>b(n).minus({month:1})),f=E(()=>b(n).toLocaleString({month:t?.monthLength??\"long\"})),l=E(()=>b(n).year.toString());function u(c){o.value=n.value>c,n.value=c}function v(){u(b(n).plus({month:1}))}function L(){u(b(n).minus({month:1}))}return{isTransitioningToPast:o,viewDate:n,viewDateNext:i,viewDatePrevious:a,viewMonth:f,viewYear:l,dates:s,days:r,setViewDate:u,nextMonth:v,previousMonth:L}}import{computed as me,unref as xe}from\"vue\";function U(e,t){return{months:me(()=>{let n=[],s=xe(e),r=s.startOf(\"year\");while(r.month<=12&&r.year===s.year)n.push({date:r,label:r.toLocaleString({month:t})}),r=r.plus({months:1});return n})}}import{computed as be,ref as he,unref as P,watch as ye}from\"vue\";function K(e,t=10){let o=he(0),n=be(()=>{let i=P(e).year,a=[],f=i-i%t+P(o)*t;for(let l=0;l<t;++l)a.push(f+l);return a});function s(){++o.value}function r(){--o.value}return ye(e,()=>o.value=0),{years:n,next:s,previous:r}}import{onMounted as De,onUnmounted as Ae,ref as Se,unref as Y,watchEffect as Ie}from\"vue\";import{Fragment as Te}from\"vue\";function z(e){let t=[];for(let o of e){if(o.type===Te&&Array.isArray(o.children)){t.push(...o.children);continue}t.push(o)}return t}import{isHtmlElement as ve}from\"@basmilius/utils\";var Ee=[\"a:not([disabled])\",\"button:not([disabled])\",\"input[type=checkbox]:not([disabled])\",\"input[type=radio]:not([disabled])\",\"input[type=text]:not([disabled])\",'[tabindex]:not([disabled]):not([tabindex=\"-1\"])'].join(\",\");function d(e){return Array.from(e.querySelectorAll(Ee)).filter(ve).filter((t)=>t.offsetWidth>0||t.offsetHeight>0||t===document.activeElement)}function M(e,t,o){let n=d(e),s=n.indexOf(t);if(s===-1)return null;let r=Le(n);ge(r,s,o);let i=we(s,o,r,n);if(!i){if(o===\"up\"||o===\"left\")i=n[s-1];if(o===\"down\"||o===\"right\")i=n[s+1]}return i}function ge(e,t,o){let n=e[t];e.forEach((s)=>{let r=s.center;switch(o){case\"up\":r={x:r.x,y:s.top+s.height};break;case\"down\":r={x:r.x,y:s.top};break;case\"left\":r={x:s.left+s.width,y:r.y};break;case\"right\":r={x:s.left,y:r.y};break}s.distance=Math.sqrt(Math.pow(n.center.x-r.x,2)+Math.pow(n.center.y-r.y,2))})}function we(e,t,o,n){let s=o[e],r=[];switch(t){case\"up\":r=o.map((a,f)=>f===e||a.top+a.height>s.top?Number.MAX_SAFE_INTEGER:a.distance);break;case\"down\":r=o.map((a,f)=>f===e||a.top<s.top+s.height?Number.MAX_SAFE_INTEGER:a.distance);break;case\"left\":r=o.map((a,f)=>f===e||a.left+a.width>s.left?Number.MAX_SAFE_INTEGER:a.distance);break;case\"right\":r=o.map((a,f)=>f===e||a.left<s.left+s.width?Number.MAX_SAFE_INTEGER:a.distance);break}let i=r.indexOf(Math.min(...r));if(r[i]!==Number.MAX_SAFE_INTEGER)return n[i];return null}function Le(e){return e.map((t)=>t.getBoundingClientRect()).map((t)=>({height:t.height,width:t.width,top:t.top,left:t.left,right:t.right,bottom:t.bottom,center:{x:t.left+t.width/2,y:t.top+t.height/2},distance:0}))}function B(e){let t=\"UnknownComponent\";if(e.type&&e.type.__name)t=e.type.__name;return t}import{camelCase as Me}from\"lodash-es\";function V(e){return Object.fromEntries(Object.entries(e.props??{}).map(([t,o])=>[Me(t),o]))}function q(e,t){if(!e.exposed||!(t in e.exposed))throw new Error(`'${t}' was not exposed by the component.`);return e.exposed[t]}import{isHtmlElement as Re}from\"@basmilius/utils\";function R(e,t,o=void 0){let n=d(e),s=o||document.activeElement;if(!s||!Re(s))return n[0]||void 0;let r=n.indexOf(s);return n[r+t]||void 0}function F(e){return Array.from(e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])')).filter((t)=>!t.hasAttribute(\"disabled\")||t.getAttribute(\"disabled\")!==\"true\").filter((t)=>!t.hasAttribute(\"aria-disabled\")||t.getAttribute(\"aria-disabled\")!==\"true\")}import{isHtmlElement as Fe}from\"@basmilius/utils\";import{unref as ke}from\"vue\";function p(e){let t=ke(e);if(Fe(t))return t;return t?.$el}function W(...e){console.warn(\"[Flux]\",...e)}function g(e,t,o=!1){let n=He(e),s=t.compareDocumentPosition(e),r;if(s&&Node.DOCUMENT_POSITION_PRECEDING||o)r=n.firstChild();else r=n.lastChild();(r!==null?r:e).focus()}function He(e){return document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:(t)=>t.tabIndex>=0&&!t.disabled?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP})}class G{get active(){return this.current?.isEnabled??!1}get current(){return this.#e[this.#e.length-1]??null}#t=[];#e=[];add(e,t,o=!0){let n={id:e,setEnabled:t,isEnabled:!0};if(this.current&&this.toggle(this.current,!1),this.#e.push(n),o)this.toggle(n,!0),this.emit()}remove(e){let t=this.#e.find((s)=>s.id===e);t&&this.toggle(t,!1);let n=this.current?.id===e;this.#e=this.#e.filter((s)=>s.id!==e),n&&this.current&&this.toggle(this.current,!0),this.emit()}emit(){this.#t.forEach((e)=>e(this.active,this.#e))}subscribe(e){return this.#t.push(e),e(this.active,this.#e),()=>this.#t=this.#t.filter((t)=>t!==e)}toggle(e,t){e.setEnabled(t),e.isEnabled=t}}var w=new G;var X=!globalThis.document;function j(e,t,o){let n=Se([]);De(()=>{document.addEventListener(\"pointerdown\",s)}),Ae(()=>{document.removeEventListener(\"pointerdown\",s)});function s(r){if(!Y(t))return;!Y(n).some((a)=>a.contains(r.target))&&o(r)}Ie(()=>{let r=[];(Array.isArray(e)?e:[e]).forEach((i)=>{let a=p(i);a&&r.push(a)}),n.value=r})}import{computed as Oe,getCurrentInstance as Ce}from\"vue\";function Z(){let e=Ce();return Oe(()=>e?.uid??(e?.proxy)._uid??0)}import{customRef as _e,isRef as $,ref as Ne,watch as Ue}from\"vue\";function J(e,t,o=!1){let n=Ne($(e)?e.value:e),s=_e((r,i)=>({get(){return r(),n.value},set:Pe((a)=>{n.value=a,i()},t,o)}));if($(e))Ue(e,(r)=>s.value=r);return s}function Pe(e,t,o=!1){let n;return(...s)=>{if(o&&!n)e(...s);clearTimeout(n),n=setTimeout(()=>requestAnimationFrame(()=>e(...s)),t)}}import{watch as Ke}from\"vue\";function k(e,t,o,n={passive:!0}){Ke(e,(s,r,i)=>{if(!s)return;s.addEventListener(t,o,n),i(()=>s.removeEventListener(t,o))},{immediate:!0})}import{onMounted as ze,onUnmounted as Be,ref as Ve,unref as qe}from\"vue\";function Q(e,t){let o=Ve();ze(()=>{s()}),Be(()=>{clearTimeout(o.value)});function n(){o.value=setTimeout(()=>requestAnimationFrame(s),qe(e))}function s(){n(),t()}}import{ref as We,watch as Ge}from\"vue\";function ee(e,t={}){let o=We(t.initial??!1);return Ge(e,(n,s,r)=>{let i=p(e);if(!i)return;let a=new IntersectionObserver((f)=>o.value=f[0]?.isIntersecting??!1,t);a.observe(i),r(()=>a.disconnect())},{immediate:!0}),o}import{onScopeDispose as Xe,watch as Ye}from\"vue\";function H(e,t,o){o??={attributes:!0};let n,s=Ye(()=>p(e),(a)=>{if(r(),!a)return;n=new MutationObserver(t),n.observe(a,o)},{immediate:!0});function r(){if(!n)return;n.disconnect(),n=void 0}function i(){r(),s()}Xe(i)}import{DateTime as te}from\"luxon\";import{ref as je,watch as Ze}from\"vue\";function oe(e,t){let o=`flux/${e}`,n=je(s()??t);function s(){if(o in localStorage){let r=JSON.parse(localStorage.getItem(o));if(Array.isArray(r)&&r[0]===\"DateTime\")r=te.fromISO(r[1]);return r}return null}return Ze(n,(r)=>{let i=r;if(te.isDateTime(r))i=[\"DateTime\",r.toISO({includeOffset:!0,extendedZone:!0})];localStorage.setItem(o,JSON.stringify(i))}),n}import{ref as I,unref as $e}from\"vue\";function ne(e){let t=I(0),o=I(0);if(!e)e=I(document);return k(e,\"scroll\",()=>{let n=$e(e);if(n instanceof Document)n=n.scrollingElement;t.value=n?.scrollLeft??0,o.value=n?.scrollTop??0}),{x:t,y:o}}import{ref as ie,watch as ce}from\"vue\";import{onMounted as Je,onUnmounted as Qe,ref as re,unref as se}from\"vue\";var et=0;function D(e=!1){let t=re(`focus-trap-${++et}`),o=re(!1);return Je(()=>w.add(se(t),(n)=>o.value=n,e)),Qe(()=>w.remove(se(t))),o}import{onUnmounted as tt,ref as ot,unref as ae}from\"vue\";function A(e){let t=ot(document.activeElement);tt(()=>{if(ae(e))return;requestAnimationFrame(()=>ae(t)?.focus())})}function le(e,t={}){if(X)return;let{disable:o=ie(!1),disableReturn:n=ie(!1),attachTo:s=null}=t,r=D(!o);A(n),ce(e,(i,a,f)=>{let l=p(e),u=s||document;if(r.value&&l&&document.activeElement&&!l.contains(document.activeElement)&&!l.querySelector(\"[autofocus]\"))g(l,document.activeElement,!0);function v(c){if(!r.value||!l)return;let m=c.target||document.body;if(l.contains(m))return;c.preventDefault(),c.stopImmediatePropagation(),g(l,m)}function L(c){if(!r.value||!l)return;if(!c.relatedTarget||c.relatedTarget===document.body)c.preventDefault(),l.focus();let m=c.target||document.body;if(l.contains(m))return;g(l,m)}if(u.addEventListener(\"focusin\",v,{capture:!0}),u.addEventListener(\"focusout\",L,{capture:!0}),l){let c=d(l),m=c.findIndex((T)=>T.classList.contains(\"is-active\")),h=c.findIndex((T)=>!T.hasAttribute(\"aria-disabled\")),y=c[0];if(m>-1)y=c[m];if(h>-1)y=c[h];if(y)y.focus()}f(()=>{u.removeEventListener(\"focusin\",v),u.removeEventListener(\"focusout\",L)})},{immediate:!0}),ce(()=>o,()=>{let i=p(e);if(r.value=!o,o||!i)return;let a=d(i);if(a.includes(document.activeElement))return;a[0]?.focus()},{immediate:!0})}import{onMounted as nt,onUnmounted as rt,ref as st}from\"vue\";function fe(e){let t=st(null);nt(()=>t.value=w.subscribe(e)),rt(()=>t.value?.())}import{watch as at}from\"vue\";function pe(e,{cycle:t=!0,direction:o=\"bidirectional\"}={}){H(e,()=>s(n(),!1));function n(){let i=p(e),a=d(i),f=a.findIndex((u)=>u.classList.contains(\"is-active\")),l=a.findIndex((u)=>!u.hasAttribute(\"aria-disabled\"));if(f>-1)return f;if(l>-1)return l;return 0}function s(i,a=!0){let f=p(e),l=d(f);l.forEach((u,v)=>u.tabIndex=v===i?0:-1),a&&l[i]?.focus()}function r(i){let a=p(e),f=d(a);if([\"Enter\",\" \"].includes(i.key))return;switch(o){case\"bidirectional\":it(i,a,f,s);break;case\"horizontal\":case\"vertical\":ct(i,a,t,o,f,s);break}}at(e,(i,a,f)=>{let l=p(e);if(!l)return;l.addEventListener(\"keydown\",r),s(n(),!1),f(()=>l.removeEventListener(\"keydown\",r))},{immediate:!0})}function it(e,t,o,n){let s;switch(e.key){case\"ArrowUp\":s=\"up\";break;case\"ArrowDown\":s=\"down\";break;case\"ArrowLeft\":s=\"left\";break;case\"ArrowRight\":s=\"right\";break;default:return}let r=M(t,document.activeElement,s);if(r)n(o.indexOf(r));e.preventDefault()}function ct(e,t,o,n,s,r){let i;if(e.key===(n===\"horizontal\"?\"ArrowLeft\":\"ArrowUp\"))i=-1;else if(e.key===(n===\"horizontal\"?\"ArrowRight\":\"ArrowDown\"))i=1;else return;let a=R(t,i);if(a)r(s.indexOf(a));else if(o)r(i===1?0:s.length-1);e.preventDefault()}var nn=\"#f8fafc\",rn=\"#f1f5f9\",sn=\"#e2e8f0\",an=\"#cbd5e1\",cn=\"#94a3b8\",ln=\"#64748b\",fn=\"#475569\",pn=\"#334155\",un=\"#1e293b\",dn=\"#0f172a\",mn=\"#020617\",xn=\"#f9fafb\",bn=\"#f3f4f6\",hn=\"#e5e7eb\",yn=\"#d1d5db\",Tn=\"#9ca3af\",vn=\"#6b7280\",En=\"#4b5563\",gn=\"#374151\",wn=\"#1f2937\",Ln=\"#111827\",Mn=\"#030712\",Rn=\"#fafafa\",Fn=\"#f4f4f5\",kn=\"#e4e4e7\",Hn=\"#d4d4d8\",Dn=\"#a1a1aa\",An=\"#71717a\",Sn=\"#52525b\",In=\"#3f3f46\",On=\"#27272a\",Cn=\"#18181b\",_n=\"#09090b\",Nn=\"#fafafa\",Un=\"#f5f5f5\",Pn=\"#e5e5e5\",Kn=\"#d4d4d4\",zn=\"#a3a3a3\",Bn=\"#737373\",Vn=\"#525252\",qn=\"#404040\",Wn=\"#262626\",Gn=\"#171717\",Xn=\"#0a0a0a\",Yn=\"#fafaf9\",jn=\"#f5f5f4\",Zn=\"#e7e5e4\",$n=\"#d6d3d1\",Jn=\"#a8a29e\",Qn=\"#78716c\",er=\"#57534e\",tr=\"#44403c\",or=\"#292524\",nr=\"#1c1917\",rr=\"#0c0a09\",sr=\"#fef2f2\",ar=\"#fee2e2\",ir=\"#fecaca\",cr=\"#fca5a5\",lr=\"#f87171\",fr=\"#ef4444\",pr=\"#dc2626\",ur=\"#b91c1c\",dr=\"#991b1b\",mr=\"#7f1d1d\",xr=\"#450a0a\",br=\"#fff7ed\",hr=\"#ffedd5\",yr=\"#fed7aa\",Tr=\"#fdba74\",vr=\"#fb923c\",Er=\"#f97316\",gr=\"#ea580c\",wr=\"#c2410c\",Lr=\"#9a3412\",Mr=\"#7c2d12\",Rr=\"#431407\",Fr=\"#fffbeb\",kr=\"#fef3c7\",Hr=\"#fde68a\",Dr=\"#fcd34d\",Ar=\"#fbbf24\",Sr=\"#f59e0b\",Ir=\"#d97706\",Or=\"#b45309\",Cr=\"#92400e\",_r=\"#78350f\",Nr=\"#451a03\",Ur=\"#fefce8\",Pr=\"#fef9c3\",Kr=\"#fef08a\",zr=\"#fde047\",Br=\"#facc15\",Vr=\"#eab308\",qr=\"#ca8a04\",Wr=\"#a16207\",Gr=\"#854d0e\",Xr=\"#713f12\",Yr=\"#422006\",jr=\"#f7fee7\",Zr=\"#ecfccb\",$r=\"#d9f99d\",Jr=\"#bef264\",Qr=\"#a3e635\",es=\"#84cc16\",ts=\"#65a30d\",os=\"#4d7c0f\",ns=\"#3f6212\",rs=\"#365314\",ss=\"#1a2e05\",as=\"#f0fdf4\",is=\"#dcfce7\",cs=\"#bbf7d0\",ls=\"#86efac\",fs=\"#4ade80\",ps=\"#22c55e\",us=\"#16a34a\",ds=\"#15803d\",ms=\"#166534\",xs=\"#14532d\",bs=\"#052e16\",hs=\"#ecfdf5\",ys=\"#d1fae5\",Ts=\"#a7f3d0\",vs=\"#6ee7b7\",Es=\"#34d399\",gs=\"#10b981\",ws=\"#059669\",Ls=\"#047857\",Ms=\"#065f46\",Rs=\"#064e3b\",Fs=\"#022c22\",ks=\"#f0fdfa\",Hs=\"#ccfbf1\",Ds=\"#99f6e4\",As=\"#5eead4\",Ss=\"#2dd4bf\",Is=\"#14b8a6\",Os=\"#0d9488\",Cs=\"#0f766e\",_s=\"#115e59\",Ns=\"#134e4a\",Us=\"#042f2e\",Ps=\"#ecfeff\",Ks=\"#cffafe\",zs=\"#a5f3fc\",Bs=\"#67e8f9\",Vs=\"#22d3ee\",qs=\"#06b6d4\",Ws=\"#0891b2\",Gs=\"#0e7490\",Xs=\"#155e75\",Ys=\"#164e63\",js=\"#083344\",Zs=\"#f0f9ff\",$s=\"#e0f2fe\",Js=\"#bae6fd\",Qs=\"#7dd3fc\",ea=\"#38bdf8\",ta=\"#0ea5e9\",oa=\"#0284c7\",na=\"#0369a1\",ra=\"#075985\",sa=\"#0c4a6e\",aa=\"#082f49\",ia=\"#eff6ff\",ca=\"#dbeafe\",la=\"#bfdbfe\",fa=\"#93c5fd\",pa=\"#60a5fa\",ua=\"#3b82f6\",da=\"#2563eb\",ma=\"#1d4ed8\",xa=\"#1e40af\",ba=\"#1e3a8a\",ha=\"#172554\",ya=\"#eef2ff\",Ta=\"#e0e7ff\",va=\"#c7d2fe\",Ea=\"#a5b4fc\",ga=\"#818cf8\",wa=\"#6366f1\",La=\"#4f46e5\",Ma=\"#4338ca\",Ra=\"#3730a3\",Fa=\"#312e81\",ka=\"#1e1b4b\",Ha=\"#f5f3ff\",Da=\"#ede9fe\",Aa=\"#ddd6fe\",Sa=\"#c4b5fd\",Ia=\"#a78bfa\",Oa=\"#8b5cf6\",Ca=\"#7c3aed\",_a=\"#6d28d9\",Na=\"#5b21b6\",Ua=\"#4c1d95\",Pa=\"#2e1065\",Ka=\"#faf5ff\",za=\"#f3e8ff\",Ba=\"#e9d5ff\",Va=\"#d8b4fe\",qa=\"#c084fc\",Wa=\"#a855f7\",Ga=\"#9333ea\",Xa=\"#7e22ce\",Ya=\"#6b21a8\",ja=\"#581c87\",Za=\"#3b0764\",$a=\"#fdf4ff\",Ja=\"#fae8ff\",Qa=\"#f5d0fe\",ei=\"#f0abfc\",ti=\"#e879f9\",oi=\"#d946ef\",ni=\"#c026d3\",ri=\"#a21caf\",si=\"#86198f\",ai=\"#701a75\",ii=\"#4a044e\",ci=\"#fdf2f8\",li=\"#fce7f3\",fi=\"#fbcfe8\",pi=\"#f9a8d4\",ui=\"#f472b6\",di=\"#ec4899\",mi=\"#db2777\",xi=\"#be185d\",bi=\"#9d174d\",hi=\"#831843\",yi=\"#500724\",Ti=\"#fff1f2\",vi=\"#ffe4e6\",Ei=\"#fecdd3\",gi=\"#fda4af\",wi=\"#fb7185\",Li=\"#f43f5e\",Mi=\"#e11d48\",Ri=\"#be123c\",Fi=\"#9f1239\",ki=\"#881337\",Hi=\"#4c0519\";class ue{#t;#e;constructor(e){this.#e=[],this.#t=e,this.onKeyDown=this.onKeyDown.bind(this)}focusElement(e,t=!0){if(!this.#e[e])return;for(let o=0;o<this.#e.length;++o)this.#e[o].tabIndex=o===e?0:-1;if(t)this.#e[e]?.focus()}register(){this.#e=F(this.#t),this.#t.addEventListener(\"keydown\",this.onKeyDown),this.focusElement(0,!1)}unregister(){this.#t.removeEventListener(\"keydown\",this.onKeyDown)}onKeyDown(e){let t=this.#t.querySelector('[tabindex=\"0\"]'),o=this.#e.findIndex((n)=>n===t)??0;switch(e.key){case\"ArrowUp\":case\"ArrowLeft\":this.focusElement(o-1);break;case\"ArrowDown\":case\"ArrowRight\":this.focusElement(o+1);break;default:return}e.preventDefault(),e.stopPropagation()}}var lt={beforeUnmount(e){O.get(e)?.unregister(),O.delete(e)},mounted(e){let t=new ue(e);t.register(),O.set(e,t)}},O=new WeakMap;class de{#t;#e;constructor(e){this.#t=e,this.#e=new MutationObserver(this.onMutation.bind(this))}register(){this.#e.observe(this.#t,{childList:!0,subtree:!0}),requestAnimationFrame(this.onMutation.bind(this))}unregister(){this.#e.disconnect()}onMutation(){let{height:e}=getComputedStyle(this.#t);this.#t.style.height=\"auto\";let{height:t}=getComputedStyle(this.#t);if(this.#t.style.height=e,t===e)return;getComputedStyle(this.#t),requestAnimationFrame(()=>requestAnimationFrame(()=>this.#t.style.height=t))}}var ft={beforeUnmount(e){C.get(e)?.unregister(),C.delete(e)},mounted(e){let t=new de(e);t.register(),C.set(e,t)}},C=new WeakMap;export{_n as zinc950,Cn as zinc900,On as zinc800,In as zinc700,Sn as zinc600,An as zinc500,Rn as zinc50,Dn as zinc400,Hn as zinc300,kn as zinc200,Fn as zinc100,Yr as yellow950,Xr as yellow900,Gr as yellow800,Wr as yellow700,qr as yellow600,Vr as yellow500,Ur as yellow50,Br as yellow400,zr as yellow300,Kr as yellow200,Pr as yellow100,g as wrapFocus,W as warn,Pa as violet950,Ua as violet900,Na as violet800,_a as violet700,Ca as violet600,Oa as violet500,Ha as violet50,Ia as violet400,Sa as violet300,Aa as violet200,Da as violet100,ft as vHeightTransition,lt as vFocusTrap,ne as useScrollPosition,oe as useRemembered,H as useMutationObserver,Q as useInterval,ee as useInView,pe as useFocusZone,fe as useFocusTrapSubscription,A as useFocusTrapReturn,D as useFocusTrapLock,le as useFocusTrap,k as useEventListener,J as useDebouncedRef,Z as useComponentId,j as useClickOutside,K as useCalendarYearSwitcher,U as useCalendarMonthSwitcher,N as useCalendar,p as unrefTemplateElement,Us as teal950,Ns as teal900,_s as teal800,Cs as teal700,Os as teal600,Is as teal500,ks as teal50,Ss as teal400,As as teal300,Ds as teal200,Hs as teal100,rr as stone950,nr as stone900,or as stone800,tr as stone700,er as stone600,Qn as stone500,Yn as stone50,Jn as stone400,$n as stone300,Zn as stone200,jn as stone100,mn as slate950,dn as slate900,un as slate800,pn as slate700,fn as slate600,ln as slate500,nn as slate50,cn as slate400,an as slate300,sn as slate200,rn as slate100,aa as sky950,sa as sky900,ra as sky800,na as sky700,oa as sky600,ta as sky500,Zs as sky50,ea as sky400,Qs as sky300,Js as sky200,$s as sky100,Hi as rose950,ki as rose900,Fi as rose800,Ri as rose700,Mi as rose600,Li as rose500,Ti as rose50,wi as rose400,gi as rose300,Ei as rose200,vi as rose100,xr as red950,mr as red900,dr as red800,ur as red700,pr as red600,fr as red500,sr as red50,lr as red400,cr as red300,ir as red200,ar as red100,Za as purple950,ja as purple900,Ya as purple800,Xa as purple700,Ga as purple600,Wa as purple500,Ka as purple50,qa as purple400,Va as purple300,Ba as purple200,za as purple100,yi as pink950,hi as pink900,bi as pink800,xi as pink700,mi as pink600,di as pink500,ci as pink50,ui as pink400,pi as pink300,fi as pink200,li as pink100,Rr as orange950,Mr as orange900,Lr as orange800,wr as orange700,gr as orange600,Er as orange500,br as orange50,vr as orange400,Tr as orange300,yr as orange200,hr as orange100,Xn as neutral950,Gn as neutral900,Wn as neutral800,qn as neutral700,Vn as neutral600,Bn as neutral500,Nn as neutral50,zn as neutral400,Kn as neutral300,Pn as neutral200,Un as neutral100,ss as lime950,rs as lime900,ns as lime800,os as lime700,ts as lime600,es as lime500,jr as lime50,Qr as lime400,Jr as lime300,$r as lime200,Zr as lime100,X as isSSR,ka as indigo950,Fa as indigo900,Ra as indigo800,Ma as indigo700,La as indigo600,wa as indigo500,ya as indigo50,ga as indigo400,Ea as indigo300,va as indigo200,Ta as indigo100,bs as green950,xs as green900,ms as green800,ds as green700,us as green600,ps as green500,as as green50,fs as green400,ls as green300,cs as green200,is as green100,Mn as gray950,Ln as gray900,wn as gray800,gn as gray700,En as gray600,vn as gray500,xn as gray50,Tn as gray400,yn as gray300,hn as gray200,bn as gray100,F as getKeyboardFocusableElements,d as getFocusableElements,R as getFocusableElement,q as getExposedRef,V as getComponentProps,B as getComponentName,M as getBidirectionalFocusElement,ii as fuchsia950,ai as fuchsia900,si as fuchsia800,ri as fuchsia700,ni as fuchsia600,oi as fuchsia500,$a as fuchsia50,ti as fuchsia400,ei as fuchsia300,Qa as fuchsia200,Ja as fuchsia100,z as flattenVNodeTree,Fs as emerald950,Rs as emerald900,Ms as emerald800,Ls as emerald700,ws as emerald600,gs as emerald500,hs as emerald50,Es as emerald400,vs as emerald300,Ts as emerald200,ys as emerald100,js as cyan950,Ys as cyan900,Xs as cyan800,Gs as cyan700,Ws as cyan600,qs as cyan500,Ps as cyan50,Vs as cyan400,Bs as cyan300,zs as cyan200,Ks as cyan100,ha as blue950,ba as blue900,xa as blue800,ma as blue700,da as blue600,ua as blue500,ia as blue50,pa as blue400,fa as blue300,la as blue200,ca as blue100,Nr as amber950,_r as amber900,Cr as amber800,Or as amber700,Ir as amber600,Sr as amber500,Fr as amber50,Ar as amber400,Dr as amber300,Hr as amber200,kr as amber100,w as FOCUS_TRAP_LOCKS};\n\n//# debugId=07CE9B4444A7CBFE64756E2164756E21\n//# sourceMappingURL=flux-internals.js.map\n","import type { InjectionKey, Ref } from 'vue';\n\nexport const FluxDashboardInjectionKey: InjectionKey<FluxDashboardInjection> = Symbol();\n\nexport type FluxDashboardInjection = {\n readonly isMenuCollapsed: Ref<boolean>;\n readonly isNavigationCollapsed: Ref<boolean>;\n};\n","<template>\n <div :class=\"[$style.dashboard, isResizing && $style.isResizing]\">\n <slot name=\"navigation\"/>\n <slot name=\"menu\"/>\n <slot name=\"header\"/>\n <slot/>\n <slot name=\"side\"/>\n </div>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { useRemembered } from '@flux-ui/internals';\n import { provide, ref, VNode, watch } from 'vue';\n import { FluxDashboardInjectionKey } from '$fluxDashboard/data';\n import $style from '$fluxDashboard/css/component/Dashboard.module.scss';\n\n defineSlots<{\n default(): VNode;\n header(): VNode;\n navigation(): VNode;\n menu(): VNode;\n side(): VNode;\n }>();\n\n const isMenuCollapsed = useRemembered('dashboard-menu-collapsed', true);\n const isNavigationCollapsed = useRemembered('dashboard-navigation-collapsed', true);\n const isResizing = ref(false);\n\n provide(FluxDashboardInjectionKey, {\n isMenuCollapsed,\n isNavigationCollapsed\n });\n\n watch(isNavigationCollapsed, (_, __, onCleanup) => {\n let timeout: NodeJS.Timeout;\n\n function onResize(): void {\n clearTimeout(timeout);\n isResizing.value = true;\n timeout = setTimeout(() => isResizing.value = false, 10);\n }\n\n window.addEventListener('resize', onResize, {passive: true});\n\n onCleanup(() => window.removeEventListener('resize', onResize));\n }, {immediate: true});\n</script>\n","import { inject } from 'vue';\nimport { FluxDashboardInjection, FluxDashboardInjectionKey } from '$fluxDashboard/data';\n\nexport default function (): FluxDashboardInjection {\n const injection = inject(FluxDashboardInjectionKey);\n\n if (!injection) {\n throw new Error('[Flux] useDashboardInjection() was used outside a FluxDashboard component.');\n }\n\n return injection;\n}\n","<template>\n <main :class=\"[$style.dashboardContent, !isMenuCollapsed && $style.dashboardContentCollapsed]\">\n <slot/>\n </main>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { useDashboardInjection } from '$fluxDashboard/composable';\n import $style from '$fluxDashboard/css/component/DashboardContent.module.scss';\n\n const {isMenuCollapsed} = useDashboardInjection();\n</script>\n","<template>\n <header :class=\"[$style.dashboardTopBar, !isMenuCollapsed && $style.dashboardTopBarCollapsed]\">\n <slot/>\n </header>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { useDashboardInjection } from '$fluxDashboard/composable';\n import $style from '$fluxDashboard/css/component/DashboardTopBar.module.scss';\n\n const {isMenuCollapsed} = useDashboardInjection();\n</script>\n","<template>\n <FluxDashboardTopBar :class=\"y > 0 ? $style.dashboardHeaderScrolled : $style.dashboardHeader\">\n <slot name=\"start\"/>\n\n <FluxIcon\n v-if=\"icon\"\n :name=\"icon\"/>\n\n <h1 v-if=\"title\">\n {{ title }}\n </h1>\n\n <FluxSpacer/>\n\n <slot name=\"end\"/>\n </FluxDashboardTopBar>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxIcon, FluxSpacer } from '@flux-ui/components';\n import { useScrollPosition } from '@flux-ui/internals';\n import type { FluxIconName } from '@flux-ui/types';\n import FluxDashboardTopBar from './FluxDashboardTopBar.vue';\n import $style from '$fluxDashboard/css/component/DashboardTopBar.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n readonly title?: string;\n }>();\n\n const {y} = useScrollPosition();\n</script>\n","<template>\n <aside :class=\"[$style.dashboardMenu, isMenuCollapsed && $style.dashboardMenuCollapsed]\">\n <FluxDashboardTopBar>\n <slot name=\"top-bar-start\"/>\n\n <FluxIcon\n v-if=\"icon\"\n :name=\"icon\"/>\n\n <h1>{{ title }}</h1>\n\n <FluxSpacer/>\n\n <slot name=\"top-bar-end\"/>\n </FluxDashboardTopBar>\n\n <div :class=\"$style.dashboardMenuBody\">\n <slot/>\n </div>\n </aside>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxIcon, FluxSpacer } from '@flux-ui/components';\n import type { FluxIconName } from '@flux-ui/types';\n import { useDashboardInjection } from '$fluxDashboard/composable';\n import FluxDashboardTopBar from './FluxDashboardTopBar.vue';\n import $style from '$fluxDashboard/css/component/DashboardPane.module.scss';\n\n defineProps<{\n readonly icon?: FluxIconName;\n readonly title: string;\n }>();\n\n const {isMenuCollapsed} = useDashboardInjection();\n</script>\n","<template>\n <nav\n v-bind=\"$attrs\"\n :class=\"isNavigationCollapsed ? $style.dashboardNavigationCollapsed : $style.dashboardNavigation\">\n <header :class=\"$style.dashboardNavigationHeader\">\n <FluxMenuItem\n icon-leading=\"bars\"\n @click=\"isNavigationCollapsed = !isNavigationCollapsed\"/>\n\n <router-link\n v-if=\"slots.logo\"\n :class=\"$style.dashboardNavigationLogo\"\n :to=\"logoLocation || '/'\">\n <slot\n name=\"logo\"\n v-bind=\"{isNavigationCollapsed}\"/>\n </router-link>\n\n <FluxMenuItem\n icon-leading=\"ellipsis-h\"\n @click=\"isMenuCollapsed = !isMenuCollapsed\"/>\n </header>\n\n <div\n v-for=\"index of 2\"\n :key=\"index\"\n :class=\"$style.dashboardNavigationRoundingFix\"/>\n\n <main :class=\"$style.dashboardNavigationNav\">\n <slot/>\n </main>\n </nav>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxMenuItem } from '@flux-ui/components';\n import type { FluxTo } from '@flux-ui/types';\n import { useDashboardInjection } from '$fluxDashboard/composable';\n import $style from '$fluxDashboard/css/component/DashboardNavigation.module.scss';\n\n defineOptions({\n inheritAttrs: false\n });\n\n defineProps<{\n logoLocation?: FluxTo\n }>();\n\n const slots = defineSlots<{\n default(): any;\n logo?(): any;\n }>();\n\n const {\n isMenuCollapsed,\n isNavigationCollapsed\n } = useDashboardInjection();\n</script>\n"],"names":["k","e","t","o","n","Ke","s","r","i","oe","je","te","Ze","ne","I","$e","FluxDashboardInjectionKey","isMenuCollapsed","useRemembered","isNavigationCollapsed","isResizing","ref","provide","watch","_","__","onCleanup","timeout","onResize","useDashboardInjection","injection","inject","y","useScrollPosition","slots","_useSlots"],"mappings":";;;AAAsmM,SAASA,EAAEC,GAAEC,GAAEC,GAAEC,IAAE,EAAC,SAAQ,GAAE,GAAE;AAACC,EAAAA,EAAGJ,GAAE,CAACK,GAAEC,GAAEC,MAAI;AAAC,IAAIF,MAASA,EAAE,iBAAiBJ,GAAEC,GAAEC,CAAC,GAAEI,EAAE,MAAIF,EAAE,oBAAoBJ,GAAEC,CAAC,CAAC;AAAA,EAAC,GAAE,EAAC,WAAU,GAAE,CAAC;AAAC;AAA+zB,SAASM,EAAGR,GAAEC,GAAE;AAAC,MAAIC,IAAE,QAAQF,CAAC,IAAGG,IAAEM,EAAGJ,EAAC,KAAIJ,CAAC;AAAE,WAASI,IAAG;AAAC,QAAGH,KAAK,cAAa;AAAC,UAAII,IAAE,KAAK,MAAM,aAAa,QAAQJ,CAAC,CAAC;AAAE,aAAG,MAAM,QAAQI,CAAC,KAAGA,EAAE,CAAC,MAAI,eAAWA,IAAEI,EAAG,QAAQJ,EAAE,CAAC,CAAC,IAASA;AAAA,IAAC;AAAC,WAAO;AAAA,EAAI;AAAC,SAAOK,EAAGR,GAAE,CAACG,MAAI;AAAC,QAAIC,IAAED;AAAE,IAAGI,EAAG,WAAWJ,CAAC,MAAEC,IAAE,CAAC,YAAWD,EAAE,MAAM,EAAC,eAAc,IAAG,cAAa,GAAE,CAAC,CAAC,IAAE,aAAa,QAAQJ,GAAE,KAAK,UAAUK,CAAC,CAAC;AAAA,EAAC,CAAC,GAAEJ;AAAC;AAAuC,SAASS,EAAGZ,GAAE;AAAC,MAAIC,IAAEY,EAAE,CAAC,GAAEX,IAAEW,EAAE,CAAC;AAAE,SAAIb,MAAEA,IAAEa,EAAE,QAAQ,IAASd,EAAEC,GAAE,UAAS,MAAI;AAAC,QAAIG,IAAEW,EAAGd,CAAC;AAAE,IAAGG,aAAa,aAASA,IAAEA,EAAE,mBAAiBF,EAAE,SAAME,KAAA,gBAAAA,EAAG,eAAY,GAAED,EAAE,SAAMC,KAAA,gBAAAA,EAAG,cAAW;AAAA,EAAC,CAAC,GAAE,EAAC,GAAEF,GAAE,GAAEC,EAAC;AAAC;ACEpnP,MAAMa,IAAkE,OAAO;;;ACwB5E,UAAAC,IAAkBC,EAAc,4BAA4B,EAAI,GAChEC,IAAwBD,EAAc,kCAAkC,EAAI,GAC5EE,IAAaC,EAAI,EAAK;AAE5B,WAAAC,EAAQN,GAA2B;AAAA,MAC/B,iBAAAC;AAAA,MACA,uBAAAE;AAAA,IAAA,CACH,GAEDI,EAAMJ,GAAuB,CAACK,GAAGC,GAAIC,MAAc;AAC3C,UAAAC;AAEJ,eAASC,IAAiB;AACtB,qBAAaD,CAAO,GACpBP,EAAW,QAAQ,IACnBO,IAAU,WAAW,MAAMP,EAAW,QAAQ,IAAO,EAAE;AAAA,MAAA;AAG3D,aAAO,iBAAiB,UAAUQ,GAAU,EAAC,SAAS,IAAK,GAE3DF,EAAU,MAAM,OAAO,oBAAoB,UAAUE,CAAQ,CAAC;AAAA,IAAA,GAC/D,EAAC,WAAW,IAAK;;;;;;;;;;;AC5C2B,SAAAC,IAAA;AACzC,QAAAC,IAAYC,EAAOf,CAAyB;AAElD,MAAI,CAACc;AACK,UAAA,IAAI,MAAM,4EAA4E;AAGzF,SAAAA;AACX;;;;ACCU,UAAA,EAAC,iBAAAb,EAAe,IAAIY,EAAsB;;;;;;;;;;ACA1C,UAAA,EAAC,iBAAAZ,EAAe,IAAIY,EAAsB;;;;;;;;;;;;;;ACoB1C,UAAA,EAAC,GAAAG,EAAC,IAAIC,EAAkB;;;;;;;;;;;;;;;;;;;;;;;;ACIxB,UAAA,EAAC,iBAAAhB,EAAe,IAAIY,EAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACchD,UAAMK,IAAQC,EAGV,GAEE;AAAA,MACF,iBAAAlB;AAAA,MACA,uBAAAE;AAAA,QACAU,EAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|