@flux-ui/dashboard 3.0.0-next.0 → 3.0.0-next.10
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/README.md +11 -40
- 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/index.css +1 -0
- package/dist/index.js +221 -0
- package/dist/index.js.map +1 -0
- package/package.json +15 -16
- package/src/component/FluxDashboard.vue +28 -4
- 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 +39 -294
- package/src/css/component/DashboardContent.module.scss +48 -0
- package/src/css/component/DashboardNavigation.module.scss +259 -0
- package/src/css/component/DashboardPane.module.scss +84 -0
- package/src/css/component/DashboardTopBar.module.scss +55 -0
- package/src/data/index.ts +1 -0
- package/dist/flux-dashboard.css +0 -1
- package/dist/flux-dashboard.js +0 -179
- package/dist/flux-dashboard.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,45 +1,16 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@flux-ui/dashboard`
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
targets Vue 3+. Please read the following instructions and checks in order to proceed.
|
|
3
|
+
Contains Flux UI components for creating dashboards.
|
|
5
4
|
|
|
6
|
-
##
|
|
5
|
+
## ⭐️ Prerequisites
|
|
7
6
|
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
- The internal package is available under `@flux-ui/internals`.
|
|
7
|
+
- Bun >= 1.2.13
|
|
8
|
+
- Node >= 23
|
|
11
9
|
|
|
12
|
-
##
|
|
10
|
+
## 🚀 Getting started
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
- Use `pnpm build` to build a production bundle.
|
|
20
|
-
- Use `pnpm link` to link the dist folder of flux to your global node_modules.
|
|
21
|
-
|
|
22
|
-
## 🪵 Git
|
|
23
|
-
|
|
24
|
-
All commit messages and branches will be in English.
|
|
25
|
-
|
|
26
|
-
### Branches
|
|
27
|
-
|
|
28
|
-
- **Main** — Contains the latest stable release and is the exact source that is running in production.
|
|
29
|
-
- **Develop** — Contains the latest staging release that is marked for deployment and is the exact source that is running on staging.
|
|
30
|
-
- **Feature branches** — Any feature should have its own feature branch. Once complete, the branch should be merged into the _develop_ branch and the feature branch should be deleted.
|
|
31
|
-
- **Bugfix branches** — When a bug is found, it should be fixed within a bugfix branch. Once complete the branch should be merged into the _develop_ branch and the feature branch should be deleted.
|
|
32
|
-
|
|
33
|
-
### Commit messages
|
|
34
|
-
|
|
35
|
-
Commit messages are bound to the following templates:
|
|
36
|
-
|
|
37
|
-
- `<type>: <message> `
|
|
38
|
-
- `<type>(<feature>): <message>`
|
|
39
|
-
- `<type>(<feature>): <message> [<issue-number>]`
|
|
40
|
-
|
|
41
|
-
#### Examples
|
|
42
|
-
|
|
43
|
-
- `feat(expandable): adds header slot to expandable.`
|
|
44
|
-
- `feat(expandable): adds header slot to expandable. [FLUX-123]`
|
|
45
|
-
- `chore: adds vue 3 build target.`
|
|
12
|
+
1. Make sure that the monorepo of Flux is used.
|
|
13
|
+
2. Run `bun install` in the root of the project.
|
|
14
|
+
3. Run `bun --cwd packages/dashboard build` to build the project.
|
|
15
|
+
4. To link Flux Dashboard globally, using Bun, run `bun link --cwd packages/dashboard`.
|
|
16
|
+
- In another project, use `link:@flux-ui/dashboard` as the dependency version in `package.json`.
|
|
@@ -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":"AAwDI,OAAO,EAAgB,KAAK,EAAS,MAAM,KAAK,CAAC;AAqCrD,iBAAS,cAAc;WA+BT,OAAO,IAA6B;;mBA/D/B,KAAK;mBACL,KAAK;uBACD,KAAK;iBACX,KAAK;iBACL,KAAK;;mBAJH,KAAK;mBACL,KAAK;uBACD,KAAK;iBACX,KAAK;iBACL,KAAK;;;;EAgErB;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/index.css
ADDED
|
@@ -0,0 +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}.dashboard-mount{flex-flow:column;align-items:stretch;display:flex}.is-resizing,.is-resizing *{transition:none!important;animation:none!important}@media (min-width:1024px){.dashboard{transition:padding-left var(--dashboard-duration)var(--swift-out);grid-template-rows:minmax(0,1fr);grid-template-columns:auto minmax(0,1fr) auto;display:grid}.dashboard:has(>.dashboard-navigation){padding-left:300px}.dashboard:has(>.dashboard-navigation-collapsed){padding-left:84px}.dashboard .dashboard-mount{grid-column:2}.dashboard .dashboard-menu{grid-column:1}.dashboard .dashboard-side{grid-column:3}}@media (max-width:1023.98px){.dashboard{flex-flow:column;padding-top:84px;display:flex}}.notice+.dashboard-content{padding-top:30px}.dashboard-content{flex-flow:column;flex-grow:1;padding:0 30px;display:flex}.dashboard-content>:is(.calendar,.table){flex-grow:1;height:calc(100dvh - 84px);margin-left:-30px;margin-right:-30px}.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{background:rgb(var(--gray-0)/.9);-webkit-backdrop-filter:blur(10px)saturate(180%);backdrop-filter:blur(10px)saturate(180%);z-index:100;flex-flow:row;align-items:center;gap:15px;height:84px;padding-left:30px;padding-right:30px;display:flex;position:sticky;top:0}.dashboard-top-bar>h1{text-overflow:ellipsis;white-space:nowrap;font-size:18px;overflow:hidden}.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 0 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));z-index:200;overflow:auto}.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));width:100%;max-height:calc(100dvh - 84px);margin-top:-9px;padding:9px 18px 18px}.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{grid-row:1/span 2;width:300px;height:100dvh;position:sticky;top:0}}@media (max-width:1023.98px){.dashboard-menu{height:calc(100dvh - 84px)}.dashboard-menu-collapsed{display:none}}.dashboard-navigation{background:var(--dashboard-navigation-background);color:var(--dashboard-navigation-foreground);z-index:750;display:flex;position:fixed;top:0;left:0}.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{min-width:54px;height:54px;color:var(--dashboard-navigation-foreground);gap:21px;padding:15px;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);white-space:nowrap;transition-property:filter,opacity,translate}[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{justify-content:center;align-items:center;width:54px;height:54px;display:flex}.dashboard-navigation-logo :is(svg){width:100%;max-width:48px;max-height:48px}.dashboard-navigation-rounding-fix{height:var(--radius);width:var(--radius);content:"";background:var(--dashboard-navigation-background);transition:left var(--dashboard-duration)var(--swift-out);display:block;position:absolute}.dashboard-navigation-rounding-fix:before{content:"";background:rgb(var(--gray-1));display:block;position:absolute;inset:0}.dashboard:not(:has(.dashboard-menu)) .dashboard-navigation-rounding-fix:before{background:rgb(var(--gray-0))}@media (min-width:1024px){.dashboard-navigation{width:300px;height:100dvh;transition:width var(--dashboard-duration)var(--swift-out);flex-flow:column;gap:15px;padding:15px}.dashboard-navigation-collapsed{width:84px}.dashboard-navigation-collapsed .menu-item-label{filter:blur(6px);opacity:0;translate:-12px}.dashboard-navigation-header{display:flex}.dashboard-navigation-header .menu-item{display:none}.dashboard-navigation-nav{flex-flow:column;flex-grow:1;display:flex}.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{content:"";background:rgb(var(--gray-3)/.5);-webkit-backdrop-filter:blur(3px)saturate(180%);backdrop-filter:blur(3px)saturate(180%);width:100dvw;height:100dvh;transition:var(--dashboard-duration)var(--swift-out);z-index:1900;transition-property:background,-webkit-backdrop-filter,backdrop-filter;display:block;position:fixed;inset:0}.dashboard-navigation-header{width:inherit;height:inherit;flex-flow:row;justify-content:space-between;align-items:center;padding:0 15px;display:flex}.dashboard-navigation-header .menu-item{justify-content:center;align-self:center}.dashboard-navigation-nav{background:var(--dashboard-navigation-background);width:min(300px,100dvw - 42px);height:100dvh;transition:translate var(--dashboard-duration)var(--swift-out);z-index:2000;flex-flow:column;padding:15px;display:flex;position:fixed;top:0;left:0}.dashboard-navigation-rounding-fix{z-index:750;position:fixed;top:84px}.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{-webkit-backdrop-filter:none;backdrop-filter:none;pointer-events:none;background:0 0}.dashboard-navigation-collapsed .dashboard-navigation-nav{pointer-events:none;translate:-100%}}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { ref as g, watch as y, unref as a, defineComponent as m, provide as E, createElementBlock as u, openBlock as l, normalizeClass as i, renderSlot as r, createElementVNode as h, inject as x, createBlock as $, withCtx as N, createCommentVNode as _, createVNode as b, toDisplayString as S, 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 k } from "luxon";
|
|
3
|
+
import { FluxIcon as w, FluxSpacer as M, FluxMenuItem as L } from "@flux-ui/components";
|
|
4
|
+
function K(n, e, o, s = { passive: !0 }) {
|
|
5
|
+
y(n, (t, d, c) => {
|
|
6
|
+
t && (t.addEventListener(e, o, s), c(() => t.removeEventListener(e, o)));
|
|
7
|
+
}, { immediate: !0 });
|
|
8
|
+
}
|
|
9
|
+
function B(n, e) {
|
|
10
|
+
let o = `flux/${n}`, s = g(t() ?? e);
|
|
11
|
+
function t() {
|
|
12
|
+
if (o in localStorage) {
|
|
13
|
+
let d = JSON.parse(localStorage.getItem(o));
|
|
14
|
+
return Array.isArray(d) && d[0] === "DateTime" && (d = k.fromISO(d[1])), d;
|
|
15
|
+
}
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
return y(s, (d) => {
|
|
19
|
+
let c = d;
|
|
20
|
+
k.isDateTime(d) && (c = ["DateTime", d.toISO({ includeOffset: !0, extendedZone: !0 })]), localStorage.setItem(o, JSON.stringify(c));
|
|
21
|
+
}), s;
|
|
22
|
+
}
|
|
23
|
+
function Z(n) {
|
|
24
|
+
let e = g(0), o = g(0);
|
|
25
|
+
return n || (n = g(document)), K(n, "scroll", () => {
|
|
26
|
+
let s = a(n);
|
|
27
|
+
s instanceof Document && (s = s.scrollingElement), e.value = s?.scrollLeft ?? 0, o.value = s?.scrollTop ?? 0;
|
|
28
|
+
}), { x: e, y: o };
|
|
29
|
+
}
|
|
30
|
+
const z = Symbol(), q = "root", G = "dashboard", Q = "dashboard-mount", U = "is-resizing", W = "dashboard-navigation", X = "dashboard-navigation-collapsed", Y = "dashboard-menu", aa = "dashboard-side", F = { root: q, dashboard: G, dashboardMount: Q, isResizing: U, dashboardNavigation: W, dashboardNavigationCollapsed: X, dashboardMenu: Y, dashboardSide: aa }, Wa = /* @__PURE__ */ m({
|
|
31
|
+
__name: "FluxDashboard",
|
|
32
|
+
setup(n) {
|
|
33
|
+
const e = B("dashboard-menu-collapsed", !0), o = B("dashboard-navigation-collapsed", !0), s = g(!1);
|
|
34
|
+
return E(z, {
|
|
35
|
+
isMenuCollapsed: e,
|
|
36
|
+
isNavigationCollapsed: o
|
|
37
|
+
}), y(o, (t, d, c) => {
|
|
38
|
+
let p;
|
|
39
|
+
function T() {
|
|
40
|
+
clearTimeout(p), s.value = !0, p = setTimeout(() => s.value = !1, 10);
|
|
41
|
+
}
|
|
42
|
+
window.addEventListener("resize", T, { passive: !0 }), c(() => window.removeEventListener("resize", T));
|
|
43
|
+
}, { immediate: !0 }), (t, d) => (l(), u("div", {
|
|
44
|
+
class: i([a(F).dashboard, s.value && a(F).isResizing])
|
|
45
|
+
}, [
|
|
46
|
+
r(t.$slots, "navigation"),
|
|
47
|
+
r(t.$slots, "menu"),
|
|
48
|
+
h("div", {
|
|
49
|
+
class: i(a(F).dashboardMount)
|
|
50
|
+
}, [
|
|
51
|
+
r(t.$slots, "header"),
|
|
52
|
+
r(t.$slots, "default")
|
|
53
|
+
], 2),
|
|
54
|
+
r(t.$slots, "side")
|
|
55
|
+
], 2));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
function D() {
|
|
59
|
+
const n = x(z);
|
|
60
|
+
if (!n)
|
|
61
|
+
throw new Error("[Flux] useDashboardInjection() was used outside a FluxDashboard component.");
|
|
62
|
+
return n;
|
|
63
|
+
}
|
|
64
|
+
const oa = "notice", ea = "dashboard-content", sa = "calendar", na = "table", ta = "calendar-actions", da = "table-cell", ra = "table-cell-content", ia = "dashboard-content-collapsed", H = { notice: oa, dashboardContent: ea, calendar: sa, table: na, calendarActions: ta, tableCell: da, tableCellContent: ra, dashboardContentCollapsed: ia }, Xa = /* @__PURE__ */ m({
|
|
65
|
+
__name: "FluxDashboardContent",
|
|
66
|
+
setup(n) {
|
|
67
|
+
const { isMenuCollapsed: e } = D();
|
|
68
|
+
return (o, s) => (l(), u("main", {
|
|
69
|
+
class: i([a(H).dashboardContent, !a(e) && a(H).dashboardContentCollapsed])
|
|
70
|
+
}, [
|
|
71
|
+
r(o.$slots, "default")
|
|
72
|
+
], 2));
|
|
73
|
+
}
|
|
74
|
+
}), la = "dashboard-top-bar", ca = "icon", ua = "separator", ha = "dashboard-header", ba = "route-transition-enter-active", ma = "route-transition-leave-active", pa = "dashboard-header-scrolled dashboard-header", va = "dashboard", ga = "dashboard-top-bar-collapsed", C = { dashboardTopBar: la, icon: ca, separator: ua, dashboardHeader: ha, routeTransitionEnterActive: ba, routeTransitionLeaveActive: ma, dashboardHeaderScrolled: pa, dashboard: va, dashboardTopBarCollapsed: ga }, I = /* @__PURE__ */ m({
|
|
75
|
+
__name: "FluxDashboardTopBar",
|
|
76
|
+
setup(n) {
|
|
77
|
+
const { isMenuCollapsed: e } = D();
|
|
78
|
+
return (o, s) => (l(), u("header", {
|
|
79
|
+
class: i([a(C).dashboardTopBar, !a(e) && a(C).dashboardTopBarCollapsed])
|
|
80
|
+
}, [
|
|
81
|
+
r(o.$slots, "default")
|
|
82
|
+
], 2));
|
|
83
|
+
}
|
|
84
|
+
}), fa = { key: 1 }, Ya = /* @__PURE__ */ m({
|
|
85
|
+
__name: "FluxDashboardHeader",
|
|
86
|
+
props: {
|
|
87
|
+
icon: {},
|
|
88
|
+
title: {}
|
|
89
|
+
},
|
|
90
|
+
setup(n) {
|
|
91
|
+
const { y: e } = Z();
|
|
92
|
+
return (o, s) => (l(), $(I, {
|
|
93
|
+
class: i(a(e) > 0 ? a(C).dashboardHeaderScrolled : a(C).dashboardHeader)
|
|
94
|
+
}, {
|
|
95
|
+
default: N(() => [
|
|
96
|
+
r(o.$slots, "start"),
|
|
97
|
+
o.icon ? (l(), $(a(w), {
|
|
98
|
+
key: 0,
|
|
99
|
+
name: o.icon
|
|
100
|
+
}, null, 8, ["name"])) : _("", !0),
|
|
101
|
+
o.title ? (l(), u("h1", fa, S(o.title), 1)) : _("", !0),
|
|
102
|
+
b(a(M)),
|
|
103
|
+
r(o.$slots, "end")
|
|
104
|
+
]),
|
|
105
|
+
_: 3
|
|
106
|
+
}, 8, ["class"]));
|
|
107
|
+
}
|
|
108
|
+
}), $a = "dashboard-pane", _a = "menu-sub-header", Ca = "dashboard-top-bar", Na = "filter", Da = "filter-header", Fa = "menu", ya = "menu-item-command", Sa = "menu-item-icon", Ma = "divider", Ia = "separator", Ta = "dashboard-menu dashboard-pane", ka = "dashboard-menu-body", La = "dashboard-side dashboard-pane", Ba = "dashboard-menu-collapsed", f = { dashboardPane: $a, menuSubHeader: _a, dashboardTopBar: Ca, filter: Na, filterHeader: Da, menu: Fa, menuItemCommand: ya, menuItemIcon: Sa, divider: Ma, separator: Ia, dashboardMenu: Ta, dashboardMenuBody: ka, dashboardSide: La, dashboardMenuCollapsed: Ba }, ao = /* @__PURE__ */ m({
|
|
109
|
+
__name: "FluxDashboardMenu",
|
|
110
|
+
props: {
|
|
111
|
+
icon: {},
|
|
112
|
+
title: {}
|
|
113
|
+
},
|
|
114
|
+
setup(n) {
|
|
115
|
+
const { isMenuCollapsed: e } = D();
|
|
116
|
+
return (o, s) => (l(), u("aside", {
|
|
117
|
+
class: i([a(f).dashboardMenu, a(e) && a(f).dashboardMenuCollapsed])
|
|
118
|
+
}, [
|
|
119
|
+
b(I, null, {
|
|
120
|
+
default: N(() => [
|
|
121
|
+
r(o.$slots, "top-bar-start"),
|
|
122
|
+
o.icon ? (l(), $(a(w), {
|
|
123
|
+
key: 0,
|
|
124
|
+
name: o.icon
|
|
125
|
+
}, null, 8, ["name"])) : _("", !0),
|
|
126
|
+
h("h1", null, S(o.title), 1),
|
|
127
|
+
b(a(M)),
|
|
128
|
+
r(o.$slots, "top-bar-end")
|
|
129
|
+
]),
|
|
130
|
+
_: 3
|
|
131
|
+
}),
|
|
132
|
+
h("div", {
|
|
133
|
+
class: i(a(f).dashboardMenuBody)
|
|
134
|
+
}, [
|
|
135
|
+
r(o.$slots, "default")
|
|
136
|
+
], 2)
|
|
137
|
+
], 2));
|
|
138
|
+
}
|
|
139
|
+
}), Ha = "dashboard-navigation", wa = "divider", za = "divider-line", Ea = "menu", xa = "menu-item", Ra = "menu-item-highlighted", Aa = "menu-item-icon", ja = "menu-item-label", Oa = "dashboard-navigation-collapsed dashboard-navigation", Pa = "dashboard-navigation-logo", Va = "dashboard-navigation-rounding-fix", Ja = "dashboard", Ka = "dashboard-menu", Za = "dashboard-navigation-header", qa = "dashboard-navigation-nav", v = { dashboardNavigation: Ha, divider: wa, dividerLine: za, menu: Ea, menuItem: xa, menuItemHighlighted: Ra, menuItemIcon: Aa, menuItemLabel: ja, dashboardNavigationCollapsed: Oa, dashboardNavigationLogo: Pa, dashboardNavigationRoundingFix: Va, dashboard: Ja, dashboardMenu: Ka, dashboardNavigationHeader: Za, dashboardNavigationNav: qa }, oo = /* @__PURE__ */ m({
|
|
140
|
+
inheritAttrs: !1,
|
|
141
|
+
__name: "FluxDashboardNavigation",
|
|
142
|
+
props: {
|
|
143
|
+
logoLocation: {}
|
|
144
|
+
},
|
|
145
|
+
setup(n) {
|
|
146
|
+
const e = R(), {
|
|
147
|
+
isMenuCollapsed: o,
|
|
148
|
+
isNavigationCollapsed: s
|
|
149
|
+
} = D();
|
|
150
|
+
return (t, d) => {
|
|
151
|
+
const c = A("router-link");
|
|
152
|
+
return l(), u("nav", j(t.$attrs, {
|
|
153
|
+
class: a(s) ? a(v).dashboardNavigationCollapsed : a(v).dashboardNavigation
|
|
154
|
+
}), [
|
|
155
|
+
h("header", {
|
|
156
|
+
class: i(a(v).dashboardNavigationHeader)
|
|
157
|
+
}, [
|
|
158
|
+
b(a(L), {
|
|
159
|
+
"icon-leading": "bars",
|
|
160
|
+
onClick: d[0] || (d[0] = (p) => s.value = !a(s))
|
|
161
|
+
}),
|
|
162
|
+
e.logo ? (l(), $(c, {
|
|
163
|
+
key: 0,
|
|
164
|
+
class: i(a(v).dashboardNavigationLogo),
|
|
165
|
+
to: t.logoLocation || "/"
|
|
166
|
+
}, {
|
|
167
|
+
default: N(() => [
|
|
168
|
+
r(t.$slots, "logo", O(P({ isNavigationCollapsed: a(s) })))
|
|
169
|
+
]),
|
|
170
|
+
_: 3
|
|
171
|
+
}, 8, ["class", "to"])) : _("", !0),
|
|
172
|
+
b(a(L), {
|
|
173
|
+
"icon-leading": "ellipsis-h",
|
|
174
|
+
onClick: d[1] || (d[1] = (p) => o.value = !a(o))
|
|
175
|
+
})
|
|
176
|
+
], 2),
|
|
177
|
+
(l(), u(V, null, J(2, (p) => h("div", {
|
|
178
|
+
key: p,
|
|
179
|
+
class: i(a(v).dashboardNavigationRoundingFix)
|
|
180
|
+
}, null, 2)), 64)),
|
|
181
|
+
h("main", {
|
|
182
|
+
class: i(a(v).dashboardNavigationNav)
|
|
183
|
+
}, [
|
|
184
|
+
r(t.$slots, "default")
|
|
185
|
+
], 2)
|
|
186
|
+
], 16);
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
}), eo = /* @__PURE__ */ m({
|
|
190
|
+
__name: "FluxDashboardSide",
|
|
191
|
+
props: {
|
|
192
|
+
title: {}
|
|
193
|
+
},
|
|
194
|
+
setup(n) {
|
|
195
|
+
return (e, o) => (l(), u("aside", {
|
|
196
|
+
class: i(a(f).dashboardSide)
|
|
197
|
+
}, [
|
|
198
|
+
b(I, null, {
|
|
199
|
+
default: N(() => [
|
|
200
|
+
r(e.$slots, "top-bar-start"),
|
|
201
|
+
h("h1", null, S(e.title), 1),
|
|
202
|
+
b(a(M)),
|
|
203
|
+
r(e.$slots, "top-bar-end")
|
|
204
|
+
]),
|
|
205
|
+
_: 3
|
|
206
|
+
}),
|
|
207
|
+
r(e.$slots, "default")
|
|
208
|
+
], 2));
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
export {
|
|
212
|
+
Wa as FluxDashboard,
|
|
213
|
+
Xa as FluxDashboardContent,
|
|
214
|
+
Ya as FluxDashboardHeader,
|
|
215
|
+
z as FluxDashboardInjectionKey,
|
|
216
|
+
ao as FluxDashboardMenu,
|
|
217
|
+
oo as FluxDashboardNavigation,
|
|
218
|
+
eo as FluxDashboardSide,
|
|
219
|
+
D as useDashboardInjection
|
|
220
|
+
};
|
|
221
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../internals/dist/index.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","../src/component/FluxDashboardSide.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=87BCF3546FF8C71064756E2164756E21\n//# sourceMappingURL=index.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\n <div :class=\"$style.dashboardMount\">\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, 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","<template>\n <aside :class=\"$style.dashboardSide\">\n <FluxDashboardTopBar>\n <slot name=\"top-bar-start\"/>\n\n <h1>{{ title }}</h1>\n\n <FluxSpacer/>\n\n <slot name=\"top-bar-end\"/>\n </FluxDashboardTopBar>\n\n <slot/>\n </aside>\n</template>\n\n<script\n lang=\"ts\"\n setup>\n import { FluxSpacer } from '@flux-ui/components';\n import FluxDashboardTopBar from './FluxDashboardTopBar.vue';\n import $style from '$fluxDashboard/css/component/DashboardPane.module.scss';\n\n defineProps<{\n readonly title: string;\n }>();\n</script>\n"],"names":["k","e","t","n","Ke","s","r","i","oe","je","te","Ze","ne","I","$e","FluxDashboardInjectionKey","isMenuCollapsed","useRemembered","isNavigationCollapsed","isResizing","ref","provide","watch","_","__","onCleanup","timeout","onResize","_createElementBlock","_normalizeClass","_unref","$style","_renderSlot","_ctx","_createElementVNode","useDashboardInjection","injection","inject","y","useScrollPosition","_createBlock","FluxDashboardTopBar","icon","FluxIcon","title","_openBlock","_createVNode","FluxSpacer","slots","_useSlots","_mergeProps","FluxMenuItem","_cache","$event","_component_router_link","logoLocation","_Fragment","_renderList","index"],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flux-ui/dashboard",
|
|
3
3
|
"description": "Contains components to create dashboards with Flux UI.",
|
|
4
|
-
"version": "3.0.0-next.
|
|
4
|
+
"version": "3.0.0-next.10",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/basmilius",
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "vue-tsc && vite build",
|
|
27
|
-
"dev": "vite build --watch"
|
|
28
|
-
"prepublishOnly": "cp ../../README.md ."
|
|
27
|
+
"dev": "vite build --watch"
|
|
29
28
|
},
|
|
30
29
|
"engines": {
|
|
31
30
|
"node": ">=23"
|
|
@@ -33,9 +32,9 @@
|
|
|
33
32
|
"exports": {
|
|
34
33
|
".": {
|
|
35
34
|
"types": "./dist/index.d.ts",
|
|
36
|
-
"default": "./dist/
|
|
35
|
+
"default": "./dist/index.js"
|
|
37
36
|
},
|
|
38
|
-
"./style.css": "./dist/
|
|
37
|
+
"./style.css": "./dist/index.css"
|
|
39
38
|
},
|
|
40
39
|
"publishConfig": {
|
|
41
40
|
"access": "public",
|
|
@@ -46,23 +45,23 @@
|
|
|
46
45
|
"src",
|
|
47
46
|
"tsconfig.json"
|
|
48
47
|
],
|
|
49
|
-
"main": "./dist/
|
|
50
|
-
"module": "./dist/
|
|
48
|
+
"main": "./dist/index.js",
|
|
49
|
+
"module": "./dist/index.js",
|
|
51
50
|
"types": "./dist/index.d.ts",
|
|
52
51
|
"typings": "./dist/index.d.ts",
|
|
53
52
|
"sideEffects": false,
|
|
54
53
|
"dependencies": {
|
|
55
|
-
"@flux-ui/components": "3.0.0-next.
|
|
56
|
-
"@flux-ui/internals": "3.0.0-next.
|
|
57
|
-
"vue": "^3.5.
|
|
54
|
+
"@flux-ui/components": "3.0.0-next.10",
|
|
55
|
+
"@flux-ui/internals": "3.0.0-next.10",
|
|
56
|
+
"vue": "^3.5.17"
|
|
58
57
|
},
|
|
59
58
|
"devDependencies": {
|
|
60
|
-
"@basmilius/vite-
|
|
61
|
-
"@types/node": "^
|
|
62
|
-
"@vitejs/plugin-vue": "^
|
|
63
|
-
"sass-embedded": "^1.
|
|
59
|
+
"@basmilius/vite-preset": "^2.4.0",
|
|
60
|
+
"@types/node": "^24.0.4",
|
|
61
|
+
"@vitejs/plugin-vue": "^6.0.0",
|
|
62
|
+
"sass-embedded": "^1.89.2",
|
|
64
63
|
"typescript": "^5.8.3",
|
|
65
|
-
"vite": "^
|
|
66
|
-
"vue-tsc": "^2.2.
|
|
64
|
+
"vite": "^7.0.0",
|
|
65
|
+
"vue-tsc": "^2.2.10"
|
|
67
66
|
}
|
|
68
67
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="$style.dashboard">
|
|
2
|
+
<div :class="[$style.dashboard, isResizing && $style.isResizing]">
|
|
3
3
|
<slot name="navigation"/>
|
|
4
|
-
|
|
5
4
|
<slot name="menu"/>
|
|
6
5
|
|
|
7
|
-
<div :class="$style.
|
|
6
|
+
<div :class="$style.dashboardMount">
|
|
8
7
|
<slot name="header"/>
|
|
9
8
|
<slot/>
|
|
10
9
|
</div>
|
|
@@ -17,13 +16,38 @@
|
|
|
17
16
|
lang="ts"
|
|
18
17
|
setup>
|
|
19
18
|
import { useRemembered } from '@flux-ui/internals';
|
|
20
|
-
import { provide } from 'vue';
|
|
19
|
+
import { provide, ref, VNode, watch } from 'vue';
|
|
21
20
|
import { FluxDashboardInjectionKey } from '$fluxDashboard/data';
|
|
22
21
|
import $style from '$fluxDashboard/css/component/Dashboard.module.scss';
|
|
23
22
|
|
|
23
|
+
defineSlots<{
|
|
24
|
+
default(): VNode;
|
|
25
|
+
header?(): VNode;
|
|
26
|
+
navigation?(): VNode;
|
|
27
|
+
menu?(): VNode;
|
|
28
|
+
side?(): VNode;
|
|
29
|
+
}>();
|
|
30
|
+
|
|
31
|
+
const isMenuCollapsed = useRemembered('dashboard-menu-collapsed', true);
|
|
24
32
|
const isNavigationCollapsed = useRemembered('dashboard-navigation-collapsed', true);
|
|
33
|
+
const isResizing = ref(false);
|
|
25
34
|
|
|
26
35
|
provide(FluxDashboardInjectionKey, {
|
|
36
|
+
isMenuCollapsed,
|
|
27
37
|
isNavigationCollapsed
|
|
28
38
|
});
|
|
39
|
+
|
|
40
|
+
watch(isNavigationCollapsed, (_, __, onCleanup) => {
|
|
41
|
+
let timeout: NodeJS.Timeout;
|
|
42
|
+
|
|
43
|
+
function onResize(): void {
|
|
44
|
+
clearTimeout(timeout);
|
|
45
|
+
isResizing.value = true;
|
|
46
|
+
timeout = setTimeout(() => isResizing.value = false, 10);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
window.addEventListener('resize', onResize, {passive: true});
|
|
50
|
+
|
|
51
|
+
onCleanup(() => window.removeEventListener('resize', onResize));
|
|
52
|
+
}, {immediate: true});
|
|
29
53
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<main :class="$style.dashboardContent">
|
|
2
|
+
<main :class="[$style.dashboardContent, !isMenuCollapsed && $style.dashboardContentCollapsed]">
|
|
3
3
|
<slot/>
|
|
4
4
|
</main>
|
|
5
5
|
</template>
|
|
@@ -7,5 +7,8 @@
|
|
|
7
7
|
<script
|
|
8
8
|
lang="ts"
|
|
9
9
|
setup>
|
|
10
|
-
import
|
|
10
|
+
import { useDashboardInjection } from '$fluxDashboard/composable';
|
|
11
|
+
import $style from '$fluxDashboard/css/component/DashboardContent.module.scss';
|
|
12
|
+
|
|
13
|
+
const {isMenuCollapsed} = useDashboardInjection();
|
|
11
14
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<FluxDashboardTopBar>
|
|
2
|
+
<FluxDashboardTopBar :class="y > 0 ? $style.dashboardHeaderScrolled : $style.dashboardHeader">
|
|
3
3
|
<slot name="start"/>
|
|
4
4
|
|
|
5
5
|
<FluxIcon
|
|
@@ -20,11 +20,15 @@
|
|
|
20
20
|
lang="ts"
|
|
21
21
|
setup>
|
|
22
22
|
import { FluxIcon, FluxSpacer } from '@flux-ui/components';
|
|
23
|
+
import { useScrollPosition } from '@flux-ui/internals';
|
|
23
24
|
import type { FluxIconName } from '@flux-ui/types';
|
|
24
25
|
import FluxDashboardTopBar from './FluxDashboardTopBar.vue';
|
|
26
|
+
import $style from '$fluxDashboard/css/component/DashboardTopBar.module.scss';
|
|
25
27
|
|
|
26
28
|
defineProps<{
|
|
27
29
|
readonly icon?: FluxIconName;
|
|
28
30
|
readonly title?: string;
|
|
29
31
|
}>();
|
|
32
|
+
|
|
33
|
+
const {y} = useScrollPosition();
|
|
30
34
|
</script>
|