@noxickon/onyx 4.0.8 → 4.1.0
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/AI-README.md +119 -0
- package/dist/chunks/{hooks-CNgb50x1.js → hooks-BHARFCd8.js} +8 -8
- package/dist/chunks/{hooks-6tQOArBm.js → hooks-HgSTVeVG.js} +172 -163
- package/dist/chunks/{ui-BTr-wu1B.js → ui-CrovNVis.js} +5317 -4952
- package/dist/chunks/ui-DMqTyCSX.js +9 -0
- package/dist/contexts/contexts.cjs.js +1 -1
- package/dist/contexts/contexts.es.js +30 -30
- package/dist/forms/Combobox/Combobox.stories.d.ts +9 -0
- package/dist/forms/Combobox/index.d.ts +10 -0
- package/dist/forms/Combobox/src/Combobox.d.ts +2 -0
- package/dist/forms/Combobox/src/Combobox.types.d.ts +56 -0
- package/dist/forms/Combobox/src/ComboboxContent.d.ts +2 -0
- package/dist/forms/Combobox/src/ComboboxEmpty.d.ts +2 -0
- package/dist/forms/Combobox/src/ComboboxLoading.d.ts +2 -0
- package/dist/forms/Combobox/src/ComboboxOption.d.ts +2 -0
- package/dist/forms/Combobox/src/ComboboxOptions.d.ts +2 -0
- package/dist/forms/Combobox/src/ComboboxSearch.d.ts +2 -0
- package/dist/forms/Combobox/src/ComboboxTrigger.d.ts +2 -0
- package/dist/forms/Combobox/src/context/ComboboxContext.d.ts +2 -0
- package/dist/forms/Combobox/src/context/useComboboxContext.d.ts +1 -0
- package/dist/forms/index.d.ts +1 -0
- package/dist/hooks/hooks.cjs.js +1 -1
- package/dist/hooks/hooks.es.js +10 -9
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useDebounce/index.d.ts +1 -0
- package/dist/hooks/useDebounce/src/useDebounce.d.ts +1 -0
- package/dist/layouts/Sidebar/src/Sidebar.types.d.ts +1 -0
- package/dist/layouts/layouts.cjs.js +1 -1
- package/dist/layouts/layouts.es.js +188 -187
- package/dist/legacy/legacy.cjs.js +1 -1
- package/dist/legacy/legacy.es.js +4 -4
- package/dist/onyx.cjs.js +1 -1
- package/dist/onyx.es.js +53 -52
- package/dist/pages/pages.cjs.js +1 -1
- package/dist/pages/pages.es.js +5 -5
- package/dist/routes/routes.cjs.js +1 -1
- package/dist/routes/routes.es.js +1 -1
- package/dist/styles.css +10 -0
- package/dist/ui.css +1 -1
- package/dist/utils/utils.cjs.js +1 -1
- package/dist/utils/utils.es.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/ui-sjbZNsCv.js +0 -9
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsx as f, jsxs as
|
|
3
|
-
import { d as b } from "../chunks/hooks-
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { ChevronDown as
|
|
6
|
-
const
|
|
1
|
+
import { ag as x, n as _, r as T, I as G, e as H, H as D, aj as F, ah as R } from "../chunks/ui-CrovNVis.js";
|
|
2
|
+
import { jsx as f, jsxs as K } from "react/jsx-runtime";
|
|
3
|
+
import { d as b } from "../chunks/hooks-HgSTVeVG.js";
|
|
4
|
+
import { createContext as j, useContext as B, useState as w, useEffect as W } from "react";
|
|
5
|
+
import { ChevronDown as q, PanelLeft as J } from "lucide-react";
|
|
6
|
+
const ye = (r) => {
|
|
7
7
|
const e = b.c(11);
|
|
8
8
|
let t, s, l;
|
|
9
9
|
e[0] !== r ? ({
|
|
@@ -13,12 +13,12 @@ const $e = (r) => {
|
|
|
13
13
|
} = r, e[0] = r, e[1] = t, e[2] = s, e[3] = l) : (t = e[1], s = e[2], l = e[3]);
|
|
14
14
|
const {
|
|
15
15
|
isMobile: o
|
|
16
|
-
} =
|
|
16
|
+
} = k(), n = o ? "grid-cols-1" : "grid-cols-[auto_1fr]";
|
|
17
17
|
let a;
|
|
18
18
|
e[4] !== s || e[5] !== n ? (a = x("mx-auto grid min-h-screen max-w-16xl bg-transparent", n, s), e[4] = s, e[5] = n, e[6] = a) : a = e[6];
|
|
19
|
-
let
|
|
20
|
-
return e[7] !== t || e[8] !== l || e[9] !== a ? (
|
|
21
|
-
},
|
|
19
|
+
let c;
|
|
20
|
+
return e[7] !== t || e[8] !== l || e[9] !== a ? (c = /* @__PURE__ */ f("div", { className: a, ...l, "data-ox-slot": "app-layout", children: t }), e[7] = t, e[8] = l, e[9] = a, e[10] = c) : c = e[10], c;
|
|
21
|
+
}, Q = (r) => {
|
|
22
22
|
const e = b.c(10);
|
|
23
23
|
let t, s, l;
|
|
24
24
|
e[0] !== r ? ({
|
|
@@ -30,7 +30,7 @@ const $e = (r) => {
|
|
|
30
30
|
e[4] !== s ? (o = x("flex flex-col overflow-y-auto", s), e[4] = s, e[5] = o) : o = e[5];
|
|
31
31
|
let n;
|
|
32
32
|
return e[6] !== t || e[7] !== l || e[8] !== o ? (n = /* @__PURE__ */ f("main", { className: o, ...l, "data-ox-slot": "main-content", children: t }), e[6] = t, e[7] = l, e[8] = o, e[9] = n) : n = e[9], n;
|
|
33
|
-
},
|
|
33
|
+
}, U = (r) => {
|
|
34
34
|
const e = b.c(10);
|
|
35
35
|
let t, s, l;
|
|
36
36
|
e[0] !== r ? ({
|
|
@@ -42,7 +42,7 @@ const $e = (r) => {
|
|
|
42
42
|
e[4] !== s ? (o = x("flex-1 overflow-y-auto p-6", s), e[4] = s, e[5] = o) : o = e[5];
|
|
43
43
|
let n;
|
|
44
44
|
return e[6] !== t || e[7] !== l || e[8] !== o ? (n = /* @__PURE__ */ f("div", { className: o, ...l, "data-ox-slot": "main-content-body", children: t }), e[6] = t, e[7] = l, e[8] = o, e[9] = n) : n = e[9], n;
|
|
45
|
-
},
|
|
45
|
+
}, V = (r) => {
|
|
46
46
|
const e = b.c(10);
|
|
47
47
|
let t, s, l;
|
|
48
48
|
e[0] !== r ? ({
|
|
@@ -54,18 +54,18 @@ const $e = (r) => {
|
|
|
54
54
|
e[4] !== s ? (o = x("shrink-0 px-6 py-4", s), e[4] = s, e[5] = o) : o = e[5];
|
|
55
55
|
let n;
|
|
56
56
|
return e[6] !== t || e[7] !== l || e[8] !== o ? (n = /* @__PURE__ */ f("div", { className: o, ...l, "data-ox-slot": "main-content-header", children: t }), e[6] = t, e[7] = l, e[8] = o, e[9] = n) : n = e[9], n;
|
|
57
|
-
},
|
|
58
|
-
Header:
|
|
59
|
-
Body:
|
|
60
|
-
}),
|
|
61
|
-
function
|
|
62
|
-
const r =
|
|
57
|
+
}, we = Object.assign(Q, {
|
|
58
|
+
Header: V,
|
|
59
|
+
Body: U
|
|
60
|
+
}), A = j(void 0);
|
|
61
|
+
function k() {
|
|
62
|
+
const r = B(A);
|
|
63
63
|
if (!r)
|
|
64
64
|
throw new Error("useOxSidebar must be used within a SidebarProvider");
|
|
65
65
|
return r;
|
|
66
66
|
}
|
|
67
|
-
const
|
|
68
|
-
const e = b.c(
|
|
67
|
+
const X = (r) => {
|
|
68
|
+
const e = b.c(20);
|
|
69
69
|
let t, s, l;
|
|
70
70
|
e[0] !== r ? ({
|
|
71
71
|
children: t,
|
|
@@ -76,24 +76,20 @@ const q = 256, J = (r) => {
|
|
|
76
76
|
isMobile: o,
|
|
77
77
|
mobileOpen: n,
|
|
78
78
|
toggleSidebar: a
|
|
79
|
-
} =
|
|
79
|
+
} = k();
|
|
80
80
|
if (o) {
|
|
81
|
+
let u;
|
|
82
|
+
e[4] !== s ? (u = x("flex h-full flex-col bg-sidebar", s), e[4] = s, e[5] = u) : u = e[5];
|
|
81
83
|
let d;
|
|
82
|
-
e[
|
|
84
|
+
e[6] !== t || e[7] !== l || e[8] !== u ? (d = /* @__PURE__ */ f(_.Content, { closeOnOutsideClick: !0, side: "left", children: /* @__PURE__ */ f("aside", { className: u, ...l, "data-ox-slot": "sidebar", children: t }) }), e[6] = t, e[7] = l, e[8] = u, e[9] = d) : d = e[9];
|
|
83
85
|
let m;
|
|
84
|
-
e[
|
|
85
|
-
let p;
|
|
86
|
-
return e[10] !== n || e[11] !== m || e[12] !== a ? (p = /* @__PURE__ */ f(M, { open: n, onOpenChange: a, children: m }), e[10] = n, e[11] = m, e[12] = a, e[13] = p) : p = e[13], p;
|
|
86
|
+
return e[10] !== n || e[11] !== d || e[12] !== a ? (m = /* @__PURE__ */ f(_, { open: n, onOpenChange: a, children: d }), e[10] = n, e[11] = d, e[12] = a, e[13] = m) : m = e[13], m;
|
|
87
87
|
}
|
|
88
|
-
let i;
|
|
89
|
-
e[14] !== s ? (i = x("sticky top-0 flex h-screen flex-col overflow-y-auto border-r border-sidebar-border bg-sidebar", s), e[14] = s, e[15] = i) : i = e[15];
|
|
90
88
|
let c;
|
|
91
|
-
e[
|
|
92
|
-
|
|
93
|
-
}, e[16] = c) :
|
|
94
|
-
|
|
95
|
-
return e[17] !== t || e[18] !== l || e[19] !== i ? (u = /* @__PURE__ */ f("aside", { className: i, style: c, ...l, "data-ox-slot": "sidebar", children: t }), e[17] = t, e[18] = l, e[19] = i, e[20] = u) : u = e[20], u;
|
|
96
|
-
}, Q = (r) => {
|
|
89
|
+
e[14] !== s ? (c = x("sticky top-0 flex h-screen w-[256px] flex-col overflow-y-auto border-r border-sidebar-border bg-sidebar", s), e[14] = s, e[15] = c) : c = e[15];
|
|
90
|
+
let i;
|
|
91
|
+
return e[16] !== t || e[17] !== l || e[18] !== c ? (i = /* @__PURE__ */ f("aside", { className: c, ...l, "data-ox-slot": "sidebar", children: t }), e[16] = t, e[17] = l, e[18] = c, e[19] = i) : i = e[19], i;
|
|
92
|
+
}, Y = (r) => {
|
|
97
93
|
const e = b.c(10);
|
|
98
94
|
let t, s, l;
|
|
99
95
|
e[0] !== r ? ({
|
|
@@ -105,7 +101,7 @@ const q = 256, J = (r) => {
|
|
|
105
101
|
e[4] !== s ? (o = x("flex-1 overflow-y-auto p-2", s), e[4] = s, e[5] = o) : o = e[5];
|
|
106
102
|
let n;
|
|
107
103
|
return e[6] !== t || e[7] !== l || e[8] !== o ? (n = /* @__PURE__ */ f("div", { className: o, ...l, "data-ox-slot": "sidebar-content", children: t }), e[6] = t, e[7] = l, e[8] = o, e[9] = n) : n = e[9], n;
|
|
108
|
-
},
|
|
104
|
+
}, Z = (r) => {
|
|
109
105
|
const e = b.c(10);
|
|
110
106
|
let t, s, l;
|
|
111
107
|
e[0] !== r ? ({
|
|
@@ -114,10 +110,10 @@ const q = 256, J = (r) => {
|
|
|
114
110
|
...l
|
|
115
111
|
} = r, e[0] = r, e[1] = t, e[2] = s, e[3] = l) : (t = e[1], s = e[2], l = e[3]);
|
|
116
112
|
let o;
|
|
117
|
-
e[4] !== s ? (o = x("flex shrink-0 flex-col p-2", s), e[4] = s, e[5] = o) : o = e[5];
|
|
113
|
+
e[4] !== s ? (o = x("flex h-16 shrink-0 flex-col justify-center p-2", s), e[4] = s, e[5] = o) : o = e[5];
|
|
118
114
|
let n;
|
|
119
115
|
return e[6] !== t || e[7] !== l || e[8] !== o ? (n = /* @__PURE__ */ f("div", { className: o, ...l, "data-ox-slot": "sidebar-footer", children: t }), e[6] = t, e[7] = l, e[8] = o, e[9] = n) : n = e[9], n;
|
|
120
|
-
},
|
|
116
|
+
}, ee = (r) => {
|
|
121
117
|
const e = b.c(10);
|
|
122
118
|
let t, s, l;
|
|
123
119
|
e[0] !== r ? ({
|
|
@@ -129,7 +125,7 @@ const q = 256, J = (r) => {
|
|
|
129
125
|
e[4] !== s ? (o = x("flex flex-wrap items-center gap-2", '**:data-[ox-slot="sidebar-group-content"]:w-full', s), e[4] = s, e[5] = o) : o = e[5];
|
|
130
126
|
let n;
|
|
131
127
|
return e[6] !== t || e[7] !== l || e[8] !== o ? (n = /* @__PURE__ */ f("div", { className: o, ...l, "data-ox-slot": "sidebar-group", children: t }), e[6] = t, e[7] = l, e[8] = o, e[9] = n) : n = e[9], n;
|
|
132
|
-
},
|
|
128
|
+
}, te = (r) => {
|
|
133
129
|
const e = b.c(10);
|
|
134
130
|
let t, s, l;
|
|
135
131
|
e[0] !== r ? ({
|
|
@@ -141,7 +137,7 @@ const q = 256, J = (r) => {
|
|
|
141
137
|
e[4] !== s ? (o = x("mr-1.5 inline-flex size-6 shrink-0 items-center justify-center rounded-md", "enabled:cursor-pointer enabled:text-muted-foreground enabled:hover:bg-sidebar-accent enabled:hover:text-sidebar-foreground", "ox-focus-ring disabled:ox-default-disabled", s), e[4] = s, e[5] = o) : o = e[5];
|
|
142
138
|
let n;
|
|
143
139
|
return e[6] !== t || e[7] !== l || e[8] !== o ? (n = /* @__PURE__ */ f("button", { className: o, type: "button", ...l, "data-ox-slot": "sidebar-group-action", children: t }), e[6] = t, e[7] = l, e[8] = o, e[9] = n) : n = e[9], n;
|
|
144
|
-
},
|
|
140
|
+
}, se = (r) => {
|
|
145
141
|
const e = b.c(10);
|
|
146
142
|
let t, s, l;
|
|
147
143
|
e[0] !== r ? ({
|
|
@@ -153,7 +149,7 @@ const q = 256, J = (r) => {
|
|
|
153
149
|
e[4] !== s ? (o = x(s), e[4] = s, e[5] = o) : o = e[5];
|
|
154
150
|
let n;
|
|
155
151
|
return e[6] !== t || e[7] !== l || e[8] !== o ? (n = /* @__PURE__ */ f("div", { className: o, ...l, "data-ox-slot": "sidebar-group-content", children: t }), e[6] = t, e[7] = l, e[8] = o, e[9] = n) : n = e[9], n;
|
|
156
|
-
},
|
|
152
|
+
}, le = (r) => {
|
|
157
153
|
const e = b.c(10);
|
|
158
154
|
let t, s, l;
|
|
159
155
|
e[0] !== r ? ({
|
|
@@ -165,7 +161,7 @@ const q = 256, J = (r) => {
|
|
|
165
161
|
e[4] !== s ? (o = x("flex flex-1 items-center pl-2 text-xs font-medium text-muted-foreground", s), e[4] = s, e[5] = o) : o = e[5];
|
|
166
162
|
let n;
|
|
167
163
|
return e[6] !== t || e[7] !== l || e[8] !== o ? (n = /* @__PURE__ */ f("div", { className: o, ...l, "data-ox-slot": "sidebar-group-label", children: t }), e[6] = t, e[7] = l, e[8] = o, e[9] = n) : n = e[9], n;
|
|
168
|
-
},
|
|
164
|
+
}, oe = (r) => {
|
|
169
165
|
const e = b.c(10);
|
|
170
166
|
let t, s, l;
|
|
171
167
|
e[0] !== r ? ({
|
|
@@ -174,10 +170,10 @@ const q = 256, J = (r) => {
|
|
|
174
170
|
...l
|
|
175
171
|
} = r, e[0] = r, e[1] = t, e[2] = s, e[3] = l) : (t = e[1], s = e[2], l = e[3]);
|
|
176
172
|
let o;
|
|
177
|
-
e[4] !== s ? (o = x("flex shrink-0 flex-col p-2", s), e[4] = s, e[5] = o) : o = e[5];
|
|
173
|
+
e[4] !== s ? (o = x("flex h-16 shrink-0 flex-col justify-center p-2", s), e[4] = s, e[5] = o) : o = e[5];
|
|
178
174
|
let n;
|
|
179
175
|
return e[6] !== t || e[7] !== l || e[8] !== o ? (n = /* @__PURE__ */ f("div", { className: o, ...l, "data-ox-slot": "sidebar-header", children: t }), e[6] = t, e[7] = l, e[8] = o, e[9] = n) : n = e[9], n;
|
|
180
|
-
},
|
|
176
|
+
}, ne = (r) => {
|
|
181
177
|
const e = b.c(10);
|
|
182
178
|
let t, s, l;
|
|
183
179
|
e[0] !== r ? ({
|
|
@@ -189,7 +185,7 @@ const q = 256, J = (r) => {
|
|
|
189
185
|
e[4] !== s ? (o = x("flex flex-col items-stretch gap-1", s), e[4] = s, e[5] = o) : o = e[5];
|
|
190
186
|
let n;
|
|
191
187
|
return e[6] !== t || e[7] !== l || e[8] !== o ? (n = /* @__PURE__ */ f("ul", { className: o, ...l, "data-ox-slot": "sidebar-menu", children: t }), e[6] = t, e[7] = l, e[8] = o, e[9] = n) : n = e[9], n;
|
|
192
|
-
},
|
|
188
|
+
}, re = (r) => {
|
|
193
189
|
const e = b.c(10);
|
|
194
190
|
let t, s, l;
|
|
195
191
|
e[0] !== r ? ({
|
|
@@ -201,12 +197,12 @@ const q = 256, J = (r) => {
|
|
|
201
197
|
e[4] !== s ? (o = x("inline-flex size-9 shrink-0 items-center justify-center rounded-lg border border-transparent", "enabled:cursor-pointer enabled:bg-transparent enabled:text-sidebar-foreground enabled:hover:bg-sidebar-accent", "ox-focus-ring disabled:ox-default-disabled", s), e[4] = s, e[5] = o) : o = e[5];
|
|
202
198
|
let n;
|
|
203
199
|
return e[6] !== t || e[7] !== l || e[8] !== o ? (n = /* @__PURE__ */ f("button", { className: o, type: "button", ...l, "data-ox-slot": "sidebar-menu-action", children: t }), e[6] = t, e[7] = l, e[8] = o, e[9] = n) : n = e[9], n;
|
|
204
|
-
},
|
|
205
|
-
const r =
|
|
200
|
+
}, L = j(void 0), I = () => {
|
|
201
|
+
const r = B(L);
|
|
206
202
|
if (!r)
|
|
207
203
|
throw new Error("useMenuItemContext must be used within MenuItemProvider");
|
|
208
204
|
return r;
|
|
209
|
-
},
|
|
205
|
+
}, E = (r) => {
|
|
210
206
|
const e = b.c(7), {
|
|
211
207
|
className: t,
|
|
212
208
|
icon: s,
|
|
@@ -216,108 +212,113 @@ const q = 256, J = (r) => {
|
|
|
216
212
|
let n;
|
|
217
213
|
e[0] !== t ? (n = x("shrink-0", t), e[0] = t, e[1] = n) : n = e[1];
|
|
218
214
|
let a;
|
|
219
|
-
return e[2] !== s || e[3] !== l || e[4] !== o || e[5] !== n ? (a = /* @__PURE__ */ f(
|
|
220
|
-
},
|
|
221
|
-
const e = b.c(
|
|
222
|
-
let t, s, l, o, n, a;
|
|
215
|
+
return e[2] !== s || e[3] !== l || e[4] !== o || e[5] !== n ? (a = /* @__PURE__ */ f(T, { className: n, icon: s, path: l, placeholder: o, size: "md" }), e[2] = s, e[3] = l, e[4] = o, e[5] = n, e[6] = a) : a = e[6], a;
|
|
216
|
+
}, ae = (r) => "href" in r, z = "flex h-9 flex-1 items-center gap-2 rounded-lg border border-transparent bg-transparent px-2 text-left text-sm ox-focus-ring", ie = (r) => {
|
|
217
|
+
const e = b.c(27);
|
|
218
|
+
let t, s, l, o, n, a, c;
|
|
223
219
|
e[0] !== r ? ({
|
|
224
220
|
children: t,
|
|
225
221
|
className: s,
|
|
226
222
|
disabled: a,
|
|
227
223
|
href: l,
|
|
224
|
+
isActive: c,
|
|
228
225
|
onClick: o,
|
|
229
226
|
...n
|
|
230
|
-
} = r, e[0] = r, e[1] = t, e[2] = s, e[3] = l, e[4] = o, e[5] = n, e[6] = a) : (t = e[1], s = e[2], l = e[3], o = e[4], n = e[5], a = e[6]);
|
|
231
|
-
const i = a === void 0 ? !1 : a, {
|
|
232
|
-
hasSub:
|
|
233
|
-
toggleOpen:
|
|
234
|
-
} =
|
|
235
|
-
let
|
|
236
|
-
e[
|
|
237
|
-
"
|
|
227
|
+
} = r, e[0] = r, e[1] = t, e[2] = s, e[3] = l, e[4] = o, e[5] = n, e[6] = a, e[7] = c) : (t = e[1], s = e[2], l = e[3], o = e[4], n = e[5], a = e[6], c = e[7]);
|
|
228
|
+
const i = a === void 0 ? !1 : a, u = c === void 0 ? !1 : c, {
|
|
229
|
+
hasSub: d,
|
|
230
|
+
toggleOpen: m
|
|
231
|
+
} = I(), g = u && !i, v = !i;
|
|
232
|
+
let p;
|
|
233
|
+
e[8] !== s || e[9] !== i || e[10] !== g || e[11] !== v ? (p = x(z, {
|
|
234
|
+
"bg-sidebar-accent font-medium": g,
|
|
235
|
+
"cursor-pointer text-sidebar-foreground hover:bg-sidebar-accent": v,
|
|
238
236
|
"ox-default-disabled": i
|
|
239
|
-
}, s), e[
|
|
240
|
-
const
|
|
241
|
-
let
|
|
242
|
-
e[
|
|
237
|
+
}, s), e[8] = s, e[9] = i, e[10] = g, e[11] = v, e[12] = p) : p = e[12];
|
|
238
|
+
const h = p;
|
|
239
|
+
let O;
|
|
240
|
+
e[13] !== i || e[14] !== d || e[15] !== o || e[16] !== m ? (O = (y) => {
|
|
243
241
|
if (i) {
|
|
244
|
-
|
|
242
|
+
y.preventDefault();
|
|
245
243
|
return;
|
|
246
244
|
}
|
|
247
|
-
if (
|
|
248
|
-
|
|
245
|
+
if (d) {
|
|
246
|
+
y.preventDefault(), m();
|
|
249
247
|
return;
|
|
250
248
|
}
|
|
251
|
-
o?.(
|
|
252
|
-
}, e[
|
|
253
|
-
const
|
|
249
|
+
o?.(y);
|
|
250
|
+
}, e[13] = i, e[14] = d, e[15] = o, e[16] = m, e[17] = O) : O = e[17];
|
|
251
|
+
const $ = O, C = u ? "page" : void 0, M = i ? "true" : void 0, P = i ? void 0 : l, S = u || void 0;
|
|
254
252
|
let N;
|
|
255
|
-
return e[
|
|
256
|
-
},
|
|
257
|
-
const e = b.c(
|
|
258
|
-
let t, s, l, o, n, a;
|
|
253
|
+
return e[18] !== t || e[19] !== $ || e[20] !== h || e[21] !== n || e[22] !== S || e[23] !== C || e[24] !== M || e[25] !== P ? (N = /* @__PURE__ */ f("a", { "aria-current": C, "aria-disabled": M, className: h, href: P, onClick: $, ...n, "data-ox-active": S, "data-ox-slot": "sidebar-menu-button", children: t }), e[18] = t, e[19] = $, e[20] = h, e[21] = n, e[22] = S, e[23] = C, e[24] = M, e[25] = P, e[26] = N) : N = e[26], N;
|
|
254
|
+
}, ce = (r) => {
|
|
255
|
+
const e = b.c(28);
|
|
256
|
+
let t, s, l, o, n, a, c;
|
|
259
257
|
e[0] !== r ? ({
|
|
260
258
|
children: t,
|
|
261
259
|
className: s,
|
|
262
260
|
disabled: n,
|
|
261
|
+
isActive: a,
|
|
263
262
|
onClick: l,
|
|
264
|
-
type:
|
|
263
|
+
type: c,
|
|
265
264
|
...o
|
|
266
|
-
} = r, e[0] = r, e[1] = t, e[2] = s, e[3] = l, e[4] = o, e[5] = n, e[6] = a) : (t = e[1], s = e[2], l = e[3], o = e[4], n = e[5], a = e[6]);
|
|
267
|
-
const i = n === void 0 ? !1 : n,
|
|
268
|
-
hasSub:
|
|
269
|
-
isOpen:
|
|
270
|
-
toggleOpen:
|
|
271
|
-
} =
|
|
272
|
-
let p;
|
|
273
|
-
e[7] !== s ? (p = x(B, "enabled:cursor-pointer enabled:text-sidebar-foreground enabled:hover:bg-sidebar-accent", "disabled:ox-default-disabled", s), e[7] = s, e[8] = p) : p = e[8];
|
|
274
|
-
const S = p;
|
|
265
|
+
} = r, e[0] = r, e[1] = t, e[2] = s, e[3] = l, e[4] = o, e[5] = n, e[6] = a, e[7] = c) : (t = e[1], s = e[2], l = e[3], o = e[4], n = e[5], a = e[6], c = e[7]);
|
|
266
|
+
const i = n === void 0 ? !1 : n, u = a === void 0 ? !1 : a, d = c === void 0 ? "button" : c, {
|
|
267
|
+
hasSub: m,
|
|
268
|
+
isOpen: g,
|
|
269
|
+
toggleOpen: v
|
|
270
|
+
} = I(), p = u && !i;
|
|
275
271
|
let h;
|
|
276
|
-
e[
|
|
277
|
-
|
|
278
|
-
|
|
272
|
+
e[8] !== s || e[9] !== p ? (h = x(z, "enabled:cursor-pointer enabled:text-sidebar-foreground enabled:hover:bg-sidebar-accent", "disabled:ox-default-disabled", {
|
|
273
|
+
"bg-sidebar-accent font-medium": p
|
|
274
|
+
}, s), e[8] = s, e[9] = p, e[10] = h) : h = e[10];
|
|
275
|
+
const O = h;
|
|
276
|
+
let $;
|
|
277
|
+
e[11] !== m || e[12] !== l || e[13] !== v ? ($ = (y) => {
|
|
278
|
+
if (m) {
|
|
279
|
+
v();
|
|
279
280
|
return;
|
|
280
281
|
}
|
|
281
|
-
l?.(
|
|
282
|
-
}, e[
|
|
283
|
-
const
|
|
284
|
-
let
|
|
285
|
-
e[
|
|
286
|
-
"rotate-180":
|
|
287
|
-
}), icon:
|
|
282
|
+
l?.(y);
|
|
283
|
+
}, e[11] = m, e[12] = l, e[13] = v, e[14] = $) : $ = e[14];
|
|
284
|
+
const C = $, M = u ? "page" : void 0, P = u || void 0;
|
|
285
|
+
let S;
|
|
286
|
+
e[15] !== m || e[16] !== g ? (S = m ? /* @__PURE__ */ f(E, { className: x("ml-auto transition-transform duration-200", {
|
|
287
|
+
"rotate-180": g
|
|
288
|
+
}), icon: q }) : null, e[15] = m, e[16] = g, e[17] = S) : S = e[17];
|
|
288
289
|
let N;
|
|
289
|
-
return e[
|
|
290
|
+
return e[18] !== O || e[19] !== t || e[20] !== i || e[21] !== C || e[22] !== o || e[23] !== M || e[24] !== P || e[25] !== S || e[26] !== d ? (N = /* @__PURE__ */ K("button", { "aria-current": M, className: O, disabled: i, type: d, onClick: C, ...o, "data-ox-active": P, "data-ox-slot": "sidebar-menu-button", children: [
|
|
290
291
|
t,
|
|
291
|
-
|
|
292
|
-
] }), e[
|
|
293
|
-
},
|
|
292
|
+
S
|
|
293
|
+
] }), e[18] = O, e[19] = t, e[20] = i, e[21] = C, e[22] = o, e[23] = M, e[24] = P, e[25] = S, e[26] = d, e[27] = N) : N = e[27], N;
|
|
294
|
+
}, de = (r) => {
|
|
294
295
|
const e = b.c(2);
|
|
295
296
|
let t;
|
|
296
|
-
return e[0] !== r ? (t =
|
|
297
|
+
return e[0] !== r ? (t = ae(r) ? /* @__PURE__ */ f(ie, { ...r }) : /* @__PURE__ */ f(ce, { ...r }), e[0] = r, e[1] = t) : t = e[1], t;
|
|
297
298
|
};
|
|
298
|
-
function
|
|
299
|
+
function fe(r) {
|
|
299
300
|
const e = b.c(7), {
|
|
300
301
|
children: t,
|
|
301
302
|
defaultOpen: s,
|
|
302
303
|
hasSub: l
|
|
303
|
-
} = r, o = s === void 0 ? !1 : s, n = l === void 0 ? !1 : l, [a,
|
|
304
|
-
let
|
|
305
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
306
|
-
const u =
|
|
304
|
+
} = r, o = s === void 0 ? !1 : s, n = l === void 0 ? !1 : l, [a, c] = w(o);
|
|
305
|
+
let i;
|
|
306
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = () => c(ue), e[0] = i) : i = e[0];
|
|
307
|
+
const u = i;
|
|
307
308
|
let d;
|
|
308
309
|
e[1] !== n || e[2] !== a ? (d = {
|
|
309
310
|
hasSub: n,
|
|
310
311
|
isOpen: a,
|
|
311
|
-
setIsOpen:
|
|
312
|
+
setIsOpen: c,
|
|
312
313
|
toggleOpen: u
|
|
313
314
|
}, e[1] = n, e[2] = a, e[3] = d) : d = e[3];
|
|
314
315
|
let m;
|
|
315
|
-
return e[4] !== t || e[5] !== d ? (m = /* @__PURE__ */ f(
|
|
316
|
+
return e[4] !== t || e[5] !== d ? (m = /* @__PURE__ */ f(L.Provider, { value: d, children: t }), e[4] = t, e[5] = d, e[6] = m) : m = e[6], m;
|
|
316
317
|
}
|
|
317
|
-
function
|
|
318
|
+
function ue(r) {
|
|
318
319
|
return !r;
|
|
319
320
|
}
|
|
320
|
-
const
|
|
321
|
+
const be = (r) => {
|
|
321
322
|
const e = b.c(16);
|
|
322
323
|
let t, s, l, o, n;
|
|
323
324
|
e[0] !== r ? ({
|
|
@@ -327,22 +328,22 @@ const ce = (r) => {
|
|
|
327
328
|
hasSub: n,
|
|
328
329
|
...l
|
|
329
330
|
} = r, e[0] = r, e[1] = t, e[2] = s, e[3] = l, e[4] = o, e[5] = n) : (t = e[1], s = e[2], l = e[3], o = e[4], n = e[5]);
|
|
330
|
-
const a = o === void 0 ? !1 : o,
|
|
331
|
-
let
|
|
332
|
-
e[6] !== s ? (
|
|
331
|
+
const a = o === void 0 ? !1 : o, c = n === void 0 ? !1 : n;
|
|
332
|
+
let i;
|
|
333
|
+
e[6] !== s ? (i = x("group flex flex-wrap items-center gap-x-2", s), e[6] = s, e[7] = i) : i = e[7];
|
|
333
334
|
let u;
|
|
334
|
-
e[8] !== t || e[9] !== l || e[10] !==
|
|
335
|
+
e[8] !== t || e[9] !== l || e[10] !== i ? (u = /* @__PURE__ */ f("li", { className: i, ...l, "data-ox-slot": "sidebar-menu-item", children: t }), e[8] = t, e[9] = l, e[10] = i, e[11] = u) : u = e[11];
|
|
335
336
|
let d;
|
|
336
|
-
return e[12] !== a || e[13] !==
|
|
337
|
-
},
|
|
337
|
+
return e[12] !== a || e[13] !== c || e[14] !== u ? (d = /* @__PURE__ */ f(fe, { defaultOpen: a, hasSub: c, children: u }), e[12] = a, e[13] = c, e[14] = u, e[15] = d) : d = e[15], d;
|
|
338
|
+
}, me = (r) => {
|
|
338
339
|
const e = b.c(4), {
|
|
339
340
|
className: t
|
|
340
341
|
} = r;
|
|
341
342
|
let s;
|
|
342
343
|
e[0] !== t ? (s = x("h-9 w-full", t), e[0] = t, e[1] = s) : s = e[1];
|
|
343
344
|
let l;
|
|
344
|
-
return e[2] !== s ? (l = /* @__PURE__ */ f(
|
|
345
|
-
},
|
|
345
|
+
return e[2] !== s ? (l = /* @__PURE__ */ f(G, { className: s }), e[2] = s, e[3] = l) : l = e[3], l;
|
|
346
|
+
}, xe = (r) => {
|
|
346
347
|
const e = b.c(13);
|
|
347
348
|
let t, s, l;
|
|
348
349
|
e[0] !== r ? ({
|
|
@@ -352,14 +353,14 @@ const ce = (r) => {
|
|
|
352
353
|
} = r, e[0] = r, e[1] = t, e[2] = s, e[3] = l) : (t = e[1], s = e[2], l = e[3]);
|
|
353
354
|
const {
|
|
354
355
|
isOpen: o
|
|
355
|
-
} =
|
|
356
|
+
} = I(), n = o ? "open" : "closed";
|
|
356
357
|
let a;
|
|
357
|
-
e[4] !== s ? (a = x("
|
|
358
|
-
let i;
|
|
359
|
-
e[6] !== t || e[7] !== l || e[8] !== a ? (i = /* @__PURE__ */ f("ul", { className: a, ...l, "data-ox-slot": "sidebar-menu-sub", children: t }), e[6] = t, e[7] = l, e[8] = a, e[9] = i) : i = e[9];
|
|
358
|
+
e[4] !== s ? (a = x("ml-4.5 flex flex-col gap-1 border-l border-sidebar-border py-0.5 pl-2.5", s), e[4] = s, e[5] = a) : a = e[5];
|
|
360
359
|
let c;
|
|
361
|
-
|
|
362
|
-
|
|
360
|
+
e[6] !== t || e[7] !== l || e[8] !== a ? (c = /* @__PURE__ */ f("ul", { className: a, ...l, "data-ox-slot": "sidebar-menu-sub", children: t }), e[6] = t, e[7] = l, e[8] = a, e[9] = c) : c = e[9];
|
|
361
|
+
let i;
|
|
362
|
+
return e[10] !== n || e[11] !== c ? (i = /* @__PURE__ */ f("div", { className: "ox-sidebar-submenu w-content grid w-full", "data-ox-slot": "sidebar-menu-sub-wrapper", "data-ox-state": n, children: c }), e[10] = n, e[11] = c, e[12] = i) : i = e[12], i;
|
|
363
|
+
}, pe = (r) => {
|
|
363
364
|
const e = b.c(16);
|
|
364
365
|
let t, s, l, o;
|
|
365
366
|
e[0] !== r ? ({
|
|
@@ -372,13 +373,13 @@ const ce = (r) => {
|
|
|
372
373
|
e[5] !== s ? (n = x(["flex h-8 flex-1 cursor-pointer items-center gap-2", "rounded-lg border border-transparent bg-transparent px-2", "text-left text-sm text-sidebar-foreground", "hover:bg-sidebar-accent"], "ox-focus-ring", s), e[5] = s, e[6] = n) : n = e[6];
|
|
373
374
|
const a = n;
|
|
374
375
|
if (o) {
|
|
375
|
-
const
|
|
376
|
+
const i = l;
|
|
376
377
|
let u;
|
|
377
|
-
return e[7] !== a || e[8] !== t || e[9] !== o || e[10] !==
|
|
378
|
+
return e[7] !== a || e[8] !== t || e[9] !== o || e[10] !== i ? (u = /* @__PURE__ */ f("a", { className: a, href: o, ...i, "data-ox-slot": "sidebar-menu-sub-button", children: t }), e[7] = a, e[8] = t, e[9] = o, e[10] = i, e[11] = u) : u = e[11], u;
|
|
378
379
|
}
|
|
379
|
-
let
|
|
380
|
-
return e[12] !== a || e[13] !== t || e[14] !== l ? (
|
|
381
|
-
},
|
|
380
|
+
let c;
|
|
381
|
+
return e[12] !== a || e[13] !== t || e[14] !== l ? (c = /* @__PURE__ */ f("button", { className: a, type: "button", ...l, "data-ox-slot": "sidebar-menu-sub-button", children: t }), e[12] = a, e[13] = t, e[14] = l, e[15] = c) : c = e[15], c;
|
|
382
|
+
}, he = (r) => {
|
|
382
383
|
const e = b.c(10);
|
|
383
384
|
let t, s, l;
|
|
384
385
|
e[0] !== r ? ({
|
|
@@ -390,7 +391,7 @@ const ce = (r) => {
|
|
|
390
391
|
e[4] !== s ? (o = x("flex items-center gap-2", s), e[4] = s, e[5] = o) : o = e[5];
|
|
391
392
|
let n;
|
|
392
393
|
return e[6] !== t || e[7] !== l || e[8] !== o ? (n = /* @__PURE__ */ f("li", { className: o, ...l, "data-ox-slot": "sidebar-menu-sub-item", children: t }), e[6] = t, e[7] = l, e[8] = o, e[9] = n) : n = e[9], n;
|
|
393
|
-
},
|
|
394
|
+
}, ge = (r) => {
|
|
394
395
|
const e = b.c(5), {
|
|
395
396
|
children: t,
|
|
396
397
|
className: s
|
|
@@ -398,8 +399,8 @@ const ce = (r) => {
|
|
|
398
399
|
let l;
|
|
399
400
|
e[0] !== s ? (l = x("ml-auto", s), e[0] = s, e[1] = l) : l = e[1];
|
|
400
401
|
let o;
|
|
401
|
-
return e[2] !== t || e[3] !== l ? (o = /* @__PURE__ */ f(
|
|
402
|
-
},
|
|
402
|
+
return e[2] !== t || e[3] !== l ? (o = /* @__PURE__ */ f(H, { className: l, children: t }), e[2] = t, e[3] = l, e[4] = o) : o = e[4], o;
|
|
403
|
+
}, Oe = (r) => {
|
|
403
404
|
const e = b.c(6);
|
|
404
405
|
let t, s;
|
|
405
406
|
e[0] !== r ? ({
|
|
@@ -407,97 +408,97 @@ const ce = (r) => {
|
|
|
407
408
|
...s
|
|
408
409
|
} = r, e[0] = r, e[1] = t, e[2] = s) : (t = e[1], s = e[2]);
|
|
409
410
|
let l;
|
|
410
|
-
return e[3] !== t || e[4] !== s ? (l = /* @__PURE__ */ f(
|
|
411
|
-
},
|
|
411
|
+
return e[3] !== t || e[4] !== s ? (l = /* @__PURE__ */ f(D, { className: t, ...s }), e[3] = t, e[4] = s, e[5] = l) : l = e[5], l;
|
|
412
|
+
}, Se = (r) => {
|
|
412
413
|
const e = b.c(12), {
|
|
413
414
|
className: t,
|
|
414
415
|
onClick: s
|
|
415
416
|
} = r, {
|
|
416
417
|
isMobile: l,
|
|
417
418
|
toggleSidebar: o
|
|
418
|
-
} =
|
|
419
|
+
} = k();
|
|
419
420
|
let n;
|
|
420
421
|
e[0] !== l || e[1] !== s || e[2] !== o ? (n = () => {
|
|
421
422
|
l ? o() : s && s();
|
|
422
423
|
}, e[0] = l, e[1] = s, e[2] = o, e[3] = n) : n = e[3];
|
|
423
|
-
const a = n,
|
|
424
|
-
let
|
|
425
|
-
e[4] !== t || e[5] !==
|
|
426
|
-
"ox-focus-ring cursor-pointer hover:bg-sidebar-accent":
|
|
427
|
-
}, t), e[4] = t, e[5] =
|
|
428
|
-
const u = !
|
|
424
|
+
const a = n, c = l || s;
|
|
425
|
+
let i;
|
|
426
|
+
e[4] !== t || e[5] !== c ? (i = x("inline-flex size-8 items-center justify-center rounded-lg", "border border-transparent bg-transparent text-sidebar-foreground", {
|
|
427
|
+
"ox-focus-ring cursor-pointer hover:bg-sidebar-accent": c
|
|
428
|
+
}, t), e[4] = t, e[5] = c, e[6] = i) : i = e[6];
|
|
429
|
+
const u = !c;
|
|
429
430
|
let d;
|
|
430
|
-
e[7] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ f(
|
|
431
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ f(F, { icon: J, size: "md" }), e[7] = d) : d = e[7];
|
|
431
432
|
let m;
|
|
432
|
-
return e[8] !== a || e[9] !==
|
|
433
|
+
return e[8] !== a || e[9] !== i || e[10] !== u ? (m = /* @__PURE__ */ f("button", { "aria-label": "Toggle sidebar", className: i, "data-ox-slot": "sidebar-trigger", disabled: u, type: "button", onClick: a, children: d }), e[8] = a, e[9] = i, e[10] = u, e[11] = m) : m = e[11], m;
|
|
433
434
|
};
|
|
434
|
-
function
|
|
435
|
+
function ke(r) {
|
|
435
436
|
const e = b.c(11), {
|
|
436
437
|
children: t
|
|
437
|
-
} = r, [s, l] =
|
|
438
|
-
let a,
|
|
438
|
+
} = r, [s, l] = w(!1), [o, n] = w(!1);
|
|
439
|
+
let a, c;
|
|
439
440
|
e[0] === Symbol.for("react.memo_cache_sentinel") ? (a = () => {
|
|
440
|
-
const
|
|
441
|
-
n(window.innerWidth <
|
|
441
|
+
const O = () => {
|
|
442
|
+
n(window.innerWidth < R);
|
|
442
443
|
};
|
|
443
|
-
return
|
|
444
|
-
},
|
|
445
|
-
let
|
|
446
|
-
e[2] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
444
|
+
return O(), window.addEventListener("resize", O), () => window.removeEventListener("resize", O);
|
|
445
|
+
}, c = [], e[0] = a, e[1] = c) : (a = e[0], c = e[1]), W(a, c);
|
|
446
|
+
let i;
|
|
447
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (i = () => {
|
|
447
448
|
l(!0);
|
|
448
|
-
}, e[2] =
|
|
449
|
-
const u =
|
|
449
|
+
}, e[2] = i) : i = e[2];
|
|
450
|
+
const u = i;
|
|
450
451
|
let d;
|
|
451
452
|
e[3] === Symbol.for("react.memo_cache_sentinel") ? (d = () => {
|
|
452
453
|
l(!1);
|
|
453
454
|
}, e[3] = d) : d = e[3];
|
|
454
455
|
const m = d;
|
|
456
|
+
let g;
|
|
457
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (g = () => {
|
|
458
|
+
l(ve);
|
|
459
|
+
}, e[4] = g) : g = e[4];
|
|
460
|
+
const v = g;
|
|
455
461
|
let p;
|
|
456
|
-
e[
|
|
457
|
-
l(he);
|
|
458
|
-
}, e[4] = p) : p = e[4];
|
|
459
|
-
const S = p;
|
|
460
|
-
let h;
|
|
461
|
-
e[5] !== o || e[6] !== s ? (h = {
|
|
462
|
+
e[5] !== o || e[6] !== s ? (p = {
|
|
462
463
|
closeSidebar: m,
|
|
463
464
|
isMobile: o,
|
|
464
465
|
mobileOpen: s,
|
|
465
466
|
openSidebar: u,
|
|
466
|
-
toggleSidebar:
|
|
467
|
-
}, e[5] = o, e[6] = s, e[7] =
|
|
468
|
-
let
|
|
469
|
-
return e[8] !== t || e[9] !==
|
|
467
|
+
toggleSidebar: v
|
|
468
|
+
}, e[5] = o, e[6] = s, e[7] = p) : p = e[7];
|
|
469
|
+
let h;
|
|
470
|
+
return e[8] !== t || e[9] !== p ? (h = /* @__PURE__ */ f(A.Provider, { value: p, children: t }), e[8] = t, e[9] = p, e[10] = h) : h = e[10], h;
|
|
470
471
|
}
|
|
471
|
-
function
|
|
472
|
+
function ve(r) {
|
|
472
473
|
return !r;
|
|
473
474
|
}
|
|
474
|
-
const
|
|
475
|
-
Content: Q,
|
|
476
|
-
Footer: U,
|
|
477
|
-
Header: ee,
|
|
478
|
-
Separator: xe,
|
|
479
|
-
Trigger: pe
|
|
480
|
-
}), Pe = Object.assign(te, {
|
|
481
|
-
Action: se,
|
|
482
|
-
Button: re,
|
|
483
|
-
Icon: _,
|
|
484
|
-
Item: ce,
|
|
485
|
-
Skeleton: de,
|
|
486
|
-
Sub: fe,
|
|
487
|
-
SubButton: ue,
|
|
488
|
-
SubItem: be,
|
|
489
|
-
Tag: me
|
|
490
|
-
}), we = Object.assign(V, {
|
|
491
|
-
Action: X,
|
|
475
|
+
const Ie = Object.assign(X, {
|
|
492
476
|
Content: Y,
|
|
493
|
-
|
|
477
|
+
Footer: Z,
|
|
478
|
+
Header: oe,
|
|
479
|
+
Separator: Oe,
|
|
480
|
+
Trigger: Se
|
|
481
|
+
}), _e = Object.assign(ne, {
|
|
482
|
+
Action: re,
|
|
483
|
+
Button: de,
|
|
484
|
+
Icon: E,
|
|
485
|
+
Item: be,
|
|
486
|
+
Skeleton: me,
|
|
487
|
+
Sub: xe,
|
|
488
|
+
SubButton: pe,
|
|
489
|
+
SubItem: he,
|
|
490
|
+
Tag: ge
|
|
491
|
+
}), je = Object.assign(ee, {
|
|
492
|
+
Action: te,
|
|
493
|
+
Content: se,
|
|
494
|
+
Label: le
|
|
494
495
|
});
|
|
495
496
|
export {
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
497
|
+
ye as OxAppLayout,
|
|
498
|
+
we as OxMainContent,
|
|
499
|
+
Ie as OxSidebar,
|
|
500
|
+
je as OxSidebarGroup,
|
|
501
|
+
_e as OxSidebarMenu,
|
|
502
|
+
ke as OxSidebarProvider,
|
|
503
|
+
k as useOxSidebar
|
|
503
504
|
};
|