@noxickon/onyx 1.0.5 → 1.2.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/dist/animations.css +25 -72
- package/dist/chunks/{hooks-B6Ov6Z0O.js → hooks-CUNBk2tZ.js} +2719 -2417
- package/dist/chunks/hooks-UiKjBucd.js +47 -0
- package/dist/chunks/ui-BohXdfTx.js +20 -0
- package/dist/chunks/ui-D6kNTsYs.js +20744 -0
- package/dist/contexts/contexts.cjs.js +2 -2
- package/dist/contexts/contexts.es.js +172 -140
- package/dist/hooks/hooks.cjs.js +1 -1
- package/dist/hooks/hooks.es.js +2 -2
- package/dist/index.d.ts +249 -210
- package/dist/layouts/layouts.cjs.js +1 -1
- package/dist/layouts/layouts.es.js +749 -673
- package/dist/layouts.d.ts +46 -36
- package/dist/onyx.cjs.js +1 -1
- package/dist/onyx.es.js +36 -34
- package/dist/pages/pages.cjs.js +2 -2
- package/dist/pages/pages.es.js +120 -94
- package/dist/pages.d.ts +2 -2
- package/dist/routes/routes.cjs.js +1 -1
- package/dist/routes/routes.es.js +36 -27
- package/dist/shared.css +15 -10
- 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 +4 -3
- package/dist/chunks/hooks-BGvU5VHk.js +0 -27
- package/dist/chunks/ui-CZGrB58H.js +0 -20
- package/dist/chunks/ui-Dmzl3_Y3.js +0 -20368
|
@@ -1,689 +1,765 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsx as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
1
|
+
import { a0 as p, e as M, a2 as B, i as I, m as L, a3 as Q, c as U, w as X, v as Z } from "../chunks/ui-D6kNTsYs.js";
|
|
2
|
+
import { jsx as b, jsxs as C } from "react/jsx-runtime";
|
|
3
|
+
import { d as g } from "../chunks/hooks-CUNBk2tZ.js";
|
|
4
|
+
import { createContext as z, useState as E, useEffect as j, useContext as T } from "react";
|
|
5
|
+
const Ye = (n) => {
|
|
6
|
+
const e = g.c(28);
|
|
7
|
+
let t, l, s, o, a, i, r;
|
|
8
|
+
e[0] !== n ? ({
|
|
9
|
+
brand: t,
|
|
10
|
+
children: l,
|
|
11
|
+
className: s,
|
|
12
|
+
hasSidebar: i,
|
|
13
|
+
navClassName: a,
|
|
14
|
+
toggleSidebar: r,
|
|
15
|
+
...o
|
|
16
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s, e[4] = o, e[5] = a, e[6] = i, e[7] = r) : (t = e[1], l = e[2], s = e[3], o = e[4], a = e[5], i = e[6], r = e[7]);
|
|
17
|
+
const c = i === void 0 ? !1 : i;
|
|
18
|
+
let d;
|
|
19
|
+
e[8] !== s ? (d = p("sticky top-0 z-10 max-h-15 min-h-15 bg-gray-100", s), e[8] = s, e[9] = d) : d = e[9];
|
|
20
|
+
let f;
|
|
21
|
+
e[10] !== a ? (f = p("mx-auto flex max-w-10xl items-center justify-between px-4 py-2.5", a), e[10] = a, e[11] = f) : f = e[11];
|
|
22
|
+
let u;
|
|
23
|
+
e[12] !== c || e[13] !== r ? (u = c ? /* @__PURE__ */ b(M, { "aria-label": "Open menu", "data-ox-slot": "header-toggle", size: "md", variant: "ghost", onClick: r, children: /* @__PURE__ */ b(M.Icon, { path: "mdiMenu" }) }) : null, e[12] = c, e[13] = r, e[14] = u) : u = e[14];
|
|
24
|
+
let m;
|
|
25
|
+
e[15] !== t ? (m = t ? /* @__PURE__ */ b("div", { children: t }) : null, e[15] = t, e[16] = m) : m = e[16];
|
|
26
|
+
let x;
|
|
27
|
+
e[17] !== u || e[18] !== m ? (x = /* @__PURE__ */ C("div", { className: "flex items-center gap-[17px]", children: [
|
|
28
|
+
u,
|
|
29
|
+
m
|
|
30
|
+
] }), e[17] = u, e[18] = m, e[19] = x) : x = e[19];
|
|
31
|
+
let h;
|
|
32
|
+
e[20] !== l || e[21] !== f || e[22] !== x ? (h = /* @__PURE__ */ C("nav", { className: f, children: [
|
|
33
|
+
x,
|
|
34
|
+
l
|
|
35
|
+
] }), e[20] = l, e[21] = f, e[22] = x, e[23] = h) : h = e[23];
|
|
36
|
+
let v;
|
|
37
|
+
return e[24] !== o || e[25] !== d || e[26] !== h ? (v = /* @__PURE__ */ b("header", { className: d, "data-ox-slot": "header", ...o, children: h }), e[24] = o, e[25] = d, e[26] = h, e[27] = v) : v = e[27], v;
|
|
38
|
+
}, G = "group ox-gray-inset-focus items-center rounded-lg text-sm transition-colors text-left col-span-2 grid grid-cols-subgrid", R = "size-10 justify-center", W = "h-10 w-full px-2", Y = "bg-gray-300 text-gray-1200", ee = "h-15", F = z(void 0), te = (n) => {
|
|
39
|
+
const e = g.c(24);
|
|
40
|
+
let t, l, s, o, a, i, r;
|
|
41
|
+
e[0] !== n ? ({
|
|
42
|
+
children: t,
|
|
43
|
+
className: l,
|
|
44
|
+
desktopCollapsed: a,
|
|
45
|
+
hasHeader: i,
|
|
46
|
+
mobileCollapsed: r,
|
|
47
|
+
onClose: o,
|
|
48
|
+
...s
|
|
49
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s, e[4] = o, e[5] = a, e[6] = i, e[7] = r) : (t = e[1], l = e[2], s = e[3], o = e[4], a = e[5], i = e[6], r = e[7]);
|
|
50
|
+
const c = a === void 0 ? !1 : a, d = i === void 0 ? !1 : i, f = r === void 0 ? !0 : r, [u, m] = E(window.innerWidth < B), x = u ? f : c;
|
|
51
|
+
let h;
|
|
52
|
+
e[8] !== x || e[9] !== u ? (h = {
|
|
53
|
+
collapsed: x,
|
|
54
|
+
isMobile: u
|
|
55
|
+
}, e[8] = x, e[9] = u, e[10] = h) : h = e[10];
|
|
56
|
+
const v = h;
|
|
57
|
+
let S, y;
|
|
58
|
+
e[11] === Symbol.for("react.memo_cache_sentinel") ? (S = () => {
|
|
59
|
+
const $ = () => {
|
|
60
|
+
m(window.innerWidth < B);
|
|
61
61
|
};
|
|
62
|
-
return
|
|
63
|
-
window.removeEventListener("resize",
|
|
62
|
+
return $(), window.addEventListener("resize", $), () => {
|
|
63
|
+
window.removeEventListener("resize", $);
|
|
64
64
|
};
|
|
65
|
-
}, []
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"aria-label": "Desktop navigation",
|
|
82
|
-
className: n(
|
|
83
|
-
"sticky box-content flex flex-col overflow-y-auto bg-gray-100",
|
|
84
|
-
{
|
|
85
|
-
"top-0 h-screen": !r,
|
|
86
|
-
"viewport-minus-header top-15": r,
|
|
87
|
-
'max-w-18 min-w-18 [&_[data-ox-slot="sidebar-label"]]:hidden': x,
|
|
88
|
-
"min-w-64 max-w-64": !x
|
|
89
|
-
},
|
|
90
|
-
a
|
|
91
|
-
),
|
|
92
|
-
"data-ox-slot": "sidebar",
|
|
93
|
-
role: "navigation",
|
|
94
|
-
...l,
|
|
95
|
-
children: e
|
|
96
|
-
}
|
|
97
|
-
) });
|
|
98
|
-
}, p = () => {
|
|
99
|
-
const e = C(z);
|
|
100
|
-
if (!e)
|
|
65
|
+
}, y = [], e[11] = S, e[12] = y) : (S = e[11], y = e[12]), j(S, y);
|
|
66
|
+
let N;
|
|
67
|
+
e[13] !== t || e[14] !== l || e[15] !== s || e[16] !== x || e[17] !== d || e[18] !== u || e[19] !== o ? (N = u ? /* @__PURE__ */ b(I, { open: !x, onOpenChange: ($) => !$ && o?.(), children: /* @__PURE__ */ b(I.Content, { closeOnOutsideClick: o !== void 0, side: "left", children: /* @__PURE__ */ C("nav", { "aria-label": "Mobile navigation", className: p("flex h-screen w-full flex-col bg-gray-100", l), "data-ox-slot": "sidebar", role: "navigation", ...s, children: [
|
|
68
|
+
o ? /* @__PURE__ */ b("div", { className: p("flex h-15 items-center gap-[17px] px-4", ee), children: /* @__PURE__ */ b(M, { "aria-label": "Close sidebar", size: "md", variant: "ghost", onClick: o, children: /* @__PURE__ */ b(M.Icon, { path: "mdiClose" }) }) }) : null,
|
|
69
|
+
t
|
|
70
|
+
] }) }) }) : /* @__PURE__ */ b("nav", { "aria-label": "Desktop navigation", className: p("sticky box-content flex flex-col overflow-y-auto bg-gray-100", {
|
|
71
|
+
"top-0 h-screen": !d,
|
|
72
|
+
"viewport-minus-header top-15": d,
|
|
73
|
+
'max-w-18 min-w-18 [&_[data-ox-slot="sidebar-label"]]:hidden': x,
|
|
74
|
+
"max-w-64 min-w-64": !x
|
|
75
|
+
}, l), "data-ox-slot": "sidebar", role: "navigation", ...s, children: t }), e[13] = t, e[14] = l, e[15] = s, e[16] = x, e[17] = d, e[18] = u, e[19] = o, e[20] = N) : N = e[20];
|
|
76
|
+
let P;
|
|
77
|
+
return e[21] !== v || e[22] !== N ? (P = /* @__PURE__ */ b(F.Provider, { value: v, children: N }), e[21] = v, e[22] = N, e[23] = P) : P = e[23], P;
|
|
78
|
+
}, k = () => {
|
|
79
|
+
const n = T(F);
|
|
80
|
+
if (!n)
|
|
101
81
|
throw new Error("useSidebar must be used within a SidebarProvider");
|
|
102
|
-
return
|
|
103
|
-
},
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
})
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
);
|
|
155
|
-
|
|
156
|
-
children: e,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
{
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
{
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
{
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
82
|
+
return n;
|
|
83
|
+
}, le = (n) => {
|
|
84
|
+
const e = g.c(12);
|
|
85
|
+
let t, l, s;
|
|
86
|
+
e[0] !== n ? ({
|
|
87
|
+
children: t,
|
|
88
|
+
className: l,
|
|
89
|
+
...s
|
|
90
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
91
|
+
const {
|
|
92
|
+
collapsed: o,
|
|
93
|
+
isMobile: a
|
|
94
|
+
} = k(), i = o && !a, r = !o || a;
|
|
95
|
+
let c;
|
|
96
|
+
e[4] !== l || e[5] !== i || e[6] !== r ? (c = p("grid flex-1 content-start gap-y-1 overflow-y-auto p-4", {
|
|
97
|
+
"grid-cols-1 place-items-center": i,
|
|
98
|
+
"grid-cols-[auto_1fr]": r
|
|
99
|
+
}, '[&_[data-ox-slot="sidebar-link"]]:col-span-2 [&_[data-ox-slot="sidebar-link"]]:grid [&_[data-ox-slot="sidebar-link"]]:grid-cols-subgrid', '[&_[data-ox-slot="sidebar-button"]]:col-span-2 [&_[data-ox-slot="sidebar-button"]]:grid [&_[data-ox-slot="sidebar-button"]]:grid-cols-subgrid', '[&_[data-ox-slot="sidebar-icon"]]:[grid-column-start:var(--ox-menu-icon-col)] [&_[data-ox-slot="sidebar-icon"]]:justify-self-center', '[&_[data-ox-slot="sidebar-label"]]:[grid-column-start:var(--ox-menu-label-col)]', l), e[4] = l, e[5] = i, e[6] = r, e[7] = c) : c = e[7];
|
|
100
|
+
let d;
|
|
101
|
+
return e[8] !== t || e[9] !== s || e[10] !== c ? (d = /* @__PURE__ */ b("div", { className: c, "data-ox-slot": "sidebar-body", ...s, children: t }), e[8] = t, e[9] = s, e[10] = c, e[11] = d) : d = e[11], d;
|
|
102
|
+
}, se = (n) => {
|
|
103
|
+
const e = g.c(18);
|
|
104
|
+
let t, l, s, o, a;
|
|
105
|
+
e[0] !== n ? ({
|
|
106
|
+
active: o,
|
|
107
|
+
children: t,
|
|
108
|
+
className: l,
|
|
109
|
+
disabled: a,
|
|
110
|
+
...s
|
|
111
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s, e[4] = o, e[5] = a) : (t = e[1], l = e[2], s = e[3], o = e[4], a = e[5]);
|
|
112
|
+
const i = o === void 0 ? !1 : o, r = a === void 0 ? !1 : a, {
|
|
113
|
+
collapsed: c
|
|
114
|
+
} = k(), d = !c, f = i && !r;
|
|
115
|
+
let u;
|
|
116
|
+
e[6] !== l || e[7] !== c || e[8] !== r || e[9] !== d || e[10] !== f ? (u = p("enabled:cursor-pointer enabled:text-gray-1000 enabled:hover:bg-gray-300 enabled:hover:text-gray-1200", G, {
|
|
117
|
+
[R]: c,
|
|
118
|
+
[W]: d,
|
|
119
|
+
[Y]: f,
|
|
120
|
+
"disabled:ox-default-disabled": r
|
|
121
|
+
}, l), e[6] = l, e[7] = c, e[8] = r, e[9] = d, e[10] = f, e[11] = u) : u = e[11];
|
|
122
|
+
const m = i ? "active" : "inactive";
|
|
123
|
+
let x;
|
|
124
|
+
return e[12] !== t || e[13] !== r || e[14] !== s || e[15] !== u || e[16] !== m ? (x = /* @__PURE__ */ b("button", { className: u, "data-ox-slot": "sidebar-button", disabled: r, type: "button", ...s, "data-ox-state": m, children: t }), e[12] = t, e[13] = r, e[14] = s, e[15] = u, e[16] = m, e[17] = x) : x = e[17], x;
|
|
125
|
+
}, oe = (n) => {
|
|
126
|
+
const e = g.c(10);
|
|
127
|
+
let t, l, s;
|
|
128
|
+
e[0] !== n ? ({
|
|
129
|
+
children: t,
|
|
130
|
+
className: l,
|
|
131
|
+
...s
|
|
132
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
133
|
+
let o;
|
|
134
|
+
e[4] !== l ? (o = p("p-4", l), e[4] = l, e[5] = o) : o = e[5];
|
|
135
|
+
let a;
|
|
136
|
+
return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "sidebar-footer", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
|
|
137
|
+
}, ae = (n) => {
|
|
138
|
+
const e = g.c(17);
|
|
139
|
+
let t, l, s, o;
|
|
140
|
+
e[0] !== n ? ({
|
|
141
|
+
children: t,
|
|
142
|
+
className: l,
|
|
143
|
+
headline: o,
|
|
144
|
+
...s
|
|
145
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s, e[4] = o) : (t = e[1], l = e[2], s = e[3], o = e[4]);
|
|
146
|
+
const {
|
|
147
|
+
collapsed: a,
|
|
148
|
+
isMobile: i
|
|
149
|
+
} = k();
|
|
150
|
+
let r;
|
|
151
|
+
e[5] !== l ? (r = p("contents", l), e[5] = l, e[6] = r) : r = e[6];
|
|
152
|
+
const c = a && !i;
|
|
153
|
+
let d;
|
|
154
|
+
e[7] !== c ? (d = p("col-span-full mt-4 mb-2 block cursor-default text-xs text-gray-1000", {
|
|
155
|
+
invisible: c
|
|
156
|
+
}), e[7] = c, e[8] = d) : d = e[8];
|
|
157
|
+
let f;
|
|
158
|
+
e[9] !== o || e[10] !== d ? (f = /* @__PURE__ */ b("h3", { className: d, children: o }), e[9] = o, e[10] = d, e[11] = f) : f = e[11];
|
|
159
|
+
let u;
|
|
160
|
+
return e[12] !== t || e[13] !== s || e[14] !== r || e[15] !== f ? (u = /* @__PURE__ */ C("div", { className: r, "data-ox-slot": "sidebar-group", ...s, children: [
|
|
161
|
+
f,
|
|
162
|
+
t
|
|
163
|
+
] }), e[12] = t, e[13] = s, e[14] = r, e[15] = f, e[16] = u) : u = e[16], u;
|
|
164
|
+
}, ne = (n) => {
|
|
165
|
+
const e = g.c(10);
|
|
166
|
+
let t, l, s;
|
|
167
|
+
e[0] !== n ? ({
|
|
168
|
+
children: t,
|
|
169
|
+
className: l,
|
|
170
|
+
...s
|
|
171
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
172
|
+
let o;
|
|
173
|
+
e[4] !== l ? (o = p("flex h-15 items-center px-4", l), e[4] = l, e[5] = o) : o = e[5];
|
|
174
|
+
let a;
|
|
175
|
+
return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "sidebar-header", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
|
|
176
|
+
}, re = (n) => {
|
|
177
|
+
const e = g.c(11);
|
|
178
|
+
let t, l, s;
|
|
179
|
+
e[0] !== n ? ({
|
|
180
|
+
className: t,
|
|
181
|
+
size: s,
|
|
182
|
+
...l
|
|
183
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
184
|
+
const o = s === void 0 ? 0.8 : s, {
|
|
185
|
+
collapsed: a
|
|
186
|
+
} = k(), i = !a;
|
|
187
|
+
let r;
|
|
188
|
+
e[4] !== t || e[5] !== i ? (r = p("shrink-0 text-current", {
|
|
189
|
+
"mr-2": i
|
|
190
|
+
}, t), e[4] = t, e[5] = i, e[6] = r) : r = e[6];
|
|
191
|
+
let c;
|
|
192
|
+
return e[7] !== l || e[8] !== o || e[9] !== r ? (c = /* @__PURE__ */ b(L, { className: r, "data-ox-slot": "sidebar-icon", size: o, ...l }), e[7] = l, e[8] = o, e[9] = r, e[10] = c) : c = e[10], c;
|
|
193
|
+
}, ie = (n) => {
|
|
194
|
+
const e = g.c(10);
|
|
195
|
+
let t, l, s;
|
|
196
|
+
e[0] !== n ? ({
|
|
197
|
+
children: t,
|
|
198
|
+
className: l,
|
|
199
|
+
...s
|
|
200
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
201
|
+
let o;
|
|
202
|
+
e[4] !== l ? (o = p("overflow-hidden text-ellipsis", l), e[4] = l, e[5] = o) : o = e[5];
|
|
203
|
+
let a;
|
|
204
|
+
return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("span", { className: o, "data-ox-slot": "sidebar-label", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
|
|
205
|
+
}, ce = (n) => {
|
|
206
|
+
const e = g.c(22);
|
|
207
|
+
let t, l, s, o, a, i;
|
|
208
|
+
e[0] !== n ? ({
|
|
209
|
+
active: a,
|
|
210
|
+
children: t,
|
|
211
|
+
className: l,
|
|
212
|
+
disabled: i,
|
|
213
|
+
href: o,
|
|
214
|
+
...s
|
|
215
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s, e[4] = o, e[5] = a, e[6] = i) : (t = e[1], l = e[2], s = e[3], o = e[4], a = e[5], i = e[6]);
|
|
216
|
+
const r = a === void 0 ? !1 : a, c = i === void 0 ? !1 : i, {
|
|
217
|
+
collapsed: d
|
|
218
|
+
} = k(), f = r ? "page" : void 0, u = !d, m = r && !c, x = !r && !c;
|
|
219
|
+
let h;
|
|
220
|
+
e[7] !== l || e[8] !== d || e[9] !== c || e[10] !== u || e[11] !== m || e[12] !== x ? (h = p(G, {
|
|
221
|
+
[R]: d,
|
|
222
|
+
[W]: u,
|
|
223
|
+
[Y]: m,
|
|
224
|
+
"cursor-pointer text-gray-1000 hover:bg-gray-300 hover:text-gray-1200": x,
|
|
225
|
+
"ox-default-disabled": c
|
|
226
|
+
}, l), e[7] = l, e[8] = d, e[9] = c, e[10] = u, e[11] = m, e[12] = x, e[13] = h) : h = e[13];
|
|
227
|
+
const v = c ? void 0 : o, S = c ? de : void 0, y = r ? "active" : "inactive";
|
|
228
|
+
let N;
|
|
229
|
+
return e[14] !== t || e[15] !== s || e[16] !== y || e[17] !== f || e[18] !== h || e[19] !== v || e[20] !== S ? (N = /* @__PURE__ */ b("a", { "aria-current": f, className: h, "data-ox-slot": "sidebar-link", href: v, role: "link", onClick: S, ...s, "data-ox-state": y, children: t }), e[14] = t, e[15] = s, e[16] = y, e[17] = f, e[18] = h, e[19] = v, e[20] = S, e[21] = N) : N = e[21], N;
|
|
230
|
+
};
|
|
231
|
+
function de(n) {
|
|
232
|
+
return n.preventDefault();
|
|
233
|
+
}
|
|
234
|
+
const w = te;
|
|
235
|
+
w.Body = le;
|
|
236
|
+
w.Button = se;
|
|
237
|
+
w.Footer = oe;
|
|
238
|
+
w.Group = ae;
|
|
239
|
+
w.Header = ne;
|
|
240
|
+
w.Icon = re;
|
|
241
|
+
w.Label = ie;
|
|
242
|
+
w.Link = ce;
|
|
243
|
+
const Fe = (n) => {
|
|
244
|
+
const e = g.c(22);
|
|
245
|
+
let t, l, s, o, a, i, r;
|
|
246
|
+
e[0] !== n ? ({
|
|
247
|
+
children: t,
|
|
248
|
+
className: l,
|
|
249
|
+
color: i,
|
|
250
|
+
icon: o,
|
|
251
|
+
subtitle: a,
|
|
252
|
+
title: r,
|
|
253
|
+
...s
|
|
254
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s, e[4] = o, e[5] = a, e[6] = i, e[7] = r) : (t = e[1], l = e[2], s = e[3], o = e[4], a = e[5], i = e[6], r = e[7]);
|
|
255
|
+
const c = i === void 0 ? "purple" : i, d = r || a || o, f = Q[c], u = d ? "main-headline" : void 0;
|
|
256
|
+
let m;
|
|
257
|
+
e[8] !== l ? (m = p("w-full p-6", l), e[8] = l, e[9] = m) : m = e[9];
|
|
258
|
+
let x;
|
|
259
|
+
e[10] !== d || e[11] !== o || e[12] !== f || e[13] !== a || e[14] !== r ? (x = d ? /* @__PURE__ */ b("div", { className: "mb-8 border-b border-gray-400 pb-6", children: /* @__PURE__ */ C("div", { className: "flex items-center gap-4", children: [
|
|
260
|
+
o ? /* @__PURE__ */ b("div", { className: p("rounded-lg border p-3", f.border, f.background), children: /* @__PURE__ */ b(L, { className: f.text, path: o, size: 1.41 }) }) : null,
|
|
261
|
+
/* @__PURE__ */ C("div", { children: [
|
|
262
|
+
r ? /* @__PURE__ */ b("h2", { id: "main-headline", className: "text-xl font-semibold text-gray-1200", "data-ox-slot": "main-headline", children: r }) : null,
|
|
263
|
+
a && /* @__PURE__ */ b("p", { className: "mt-1 text-sm", children: a })
|
|
264
|
+
] })
|
|
265
|
+
] }) }) : null, e[10] = d, e[11] = o, e[12] = f, e[13] = a, e[14] = r, e[15] = x) : x = e[15];
|
|
266
|
+
let h;
|
|
267
|
+
return e[16] !== t || e[17] !== s || e[18] !== u || e[19] !== m || e[20] !== x ? (h = /* @__PURE__ */ C("main", { "aria-labelledby": u, className: m, "data-ox-slot": "main-content", ...s, children: [
|
|
268
|
+
x,
|
|
269
|
+
t
|
|
270
|
+
] }), e[16] = t, e[17] = s, e[18] = u, e[19] = m, e[20] = x, e[21] = h) : h = e[21], h;
|
|
271
|
+
}, Ve = (n) => {
|
|
272
|
+
const e = g.c(11);
|
|
273
|
+
let t, l, s;
|
|
274
|
+
e[0] !== n ? ({
|
|
275
|
+
children: t,
|
|
276
|
+
className: l,
|
|
277
|
+
...s
|
|
278
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
279
|
+
const {
|
|
280
|
+
isMobile: o
|
|
281
|
+
} = H(), a = o ? "grid-cols-1" : "grid-cols-[auto_1fr]";
|
|
282
|
+
let i;
|
|
283
|
+
e[4] !== l || e[5] !== a ? (i = p("mx-auto grid min-h-screen max-w-16xl bg-transparent", a, l), e[4] = l, e[5] = a, e[6] = i) : i = e[6];
|
|
284
|
+
let r;
|
|
285
|
+
return e[7] !== t || e[8] !== s || e[9] !== i ? (r = /* @__PURE__ */ b("div", { className: i, "data-ox-slot": "app-layout", ...s, children: t }), e[7] = t, e[8] = s, e[9] = i, e[10] = r) : r = e[10], r;
|
|
286
|
+
}, fe = (n) => {
|
|
287
|
+
const e = g.c(10);
|
|
288
|
+
let t, l, s;
|
|
289
|
+
e[0] !== n ? ({
|
|
290
|
+
children: t,
|
|
291
|
+
className: l,
|
|
292
|
+
...s
|
|
293
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
294
|
+
let o;
|
|
295
|
+
e[4] !== l ? (o = p("flex flex-col overflow-y-auto", l), e[4] = l, e[5] = o) : o = e[5];
|
|
296
|
+
let a;
|
|
297
|
+
return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("main", { className: o, "data-ox-slot": "main-content", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
|
|
298
|
+
}, ue = (n) => {
|
|
299
|
+
const e = g.c(10);
|
|
300
|
+
let t, l, s;
|
|
301
|
+
e[0] !== n ? ({
|
|
302
|
+
children: t,
|
|
303
|
+
className: l,
|
|
304
|
+
...s
|
|
305
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
306
|
+
let o;
|
|
307
|
+
e[4] !== l ? (o = p("flex-1 overflow-y-auto px-6 py-6", l), e[4] = l, e[5] = o) : o = e[5];
|
|
308
|
+
let a;
|
|
309
|
+
return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "main-content-body", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
|
|
310
|
+
}, be = (n) => {
|
|
311
|
+
const e = g.c(10);
|
|
312
|
+
let t, l, s;
|
|
313
|
+
e[0] !== n ? ({
|
|
314
|
+
children: t,
|
|
315
|
+
className: l,
|
|
316
|
+
...s
|
|
317
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
318
|
+
let o;
|
|
319
|
+
e[4] !== l ? (o = p("flex-shrink-0 border-b border-gray-400 bg-gray-100 px-6 py-4", l), e[4] = l, e[5] = o) : o = e[5];
|
|
320
|
+
let a;
|
|
321
|
+
return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "main-content-header", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
|
|
322
|
+
}, Ke = Object.assign(fe, {
|
|
323
|
+
Header: be,
|
|
324
|
+
Body: ue
|
|
325
|
+
}), V = z(void 0);
|
|
326
|
+
function H() {
|
|
327
|
+
const n = T(V);
|
|
328
|
+
if (!n)
|
|
330
329
|
throw new Error("useOxSidebar must be used within a SidebarProvider");
|
|
331
|
-
return
|
|
330
|
+
return n;
|
|
332
331
|
}
|
|
333
|
-
const
|
|
334
|
-
const
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
}, ne = ({ children: e, className: a, ...t }) => /* @__PURE__ */ o(
|
|
354
|
-
"div",
|
|
355
|
-
{
|
|
356
|
-
className: n("flex-1 overflow-y-auto p-2", a),
|
|
357
|
-
"data-ox-slot": "sidebar-content",
|
|
358
|
-
...t,
|
|
359
|
-
children: e
|
|
332
|
+
const me = 256, xe = (n) => {
|
|
333
|
+
const e = g.c(21);
|
|
334
|
+
let t, l, s;
|
|
335
|
+
e[0] !== n ? ({
|
|
336
|
+
children: t,
|
|
337
|
+
className: l,
|
|
338
|
+
...s
|
|
339
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
340
|
+
const {
|
|
341
|
+
isMobile: o,
|
|
342
|
+
mobileOpen: a,
|
|
343
|
+
toggleSidebar: i
|
|
344
|
+
} = H();
|
|
345
|
+
if (o) {
|
|
346
|
+
let f;
|
|
347
|
+
e[4] !== l ? (f = p("flex h-full flex-col bg-gray-150", l), e[4] = l, e[5] = f) : f = e[5];
|
|
348
|
+
let u;
|
|
349
|
+
e[6] !== t || e[7] !== s || e[8] !== f ? (u = /* @__PURE__ */ b(I.Content, { closeOnOutsideClick: !0, side: "left", children: /* @__PURE__ */ b("aside", { className: f, "data-ox-slot": "sidebar", ...s, children: t }) }), e[6] = t, e[7] = s, e[8] = f, e[9] = u) : u = e[9];
|
|
350
|
+
let m;
|
|
351
|
+
return e[10] !== a || e[11] !== u || e[12] !== i ? (m = /* @__PURE__ */ b(I, { open: a, onOpenChange: i, children: u }), e[10] = a, e[11] = u, e[12] = i, e[13] = m) : m = e[13], m;
|
|
360
352
|
}
|
|
361
|
-
|
|
362
|
-
"
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
children:
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
children: e,
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
className:
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
"
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
children:
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
353
|
+
let r;
|
|
354
|
+
e[14] !== l ? (r = p("sticky top-0 flex h-screen flex-col overflow-y-auto bg-gray-150", l), e[14] = l, e[15] = r) : r = e[15];
|
|
355
|
+
let c;
|
|
356
|
+
e[16] === Symbol.for("react.memo_cache_sentinel") ? (c = {
|
|
357
|
+
width: me
|
|
358
|
+
}, e[16] = c) : c = e[16];
|
|
359
|
+
let d;
|
|
360
|
+
return e[17] !== t || e[18] !== s || e[19] !== r ? (d = /* @__PURE__ */ b("aside", { className: r, "data-ox-slot": "sidebar", style: c, ...s, children: t }), e[17] = t, e[18] = s, e[19] = r, e[20] = d) : d = e[20], d;
|
|
361
|
+
}, pe = (n) => {
|
|
362
|
+
const e = g.c(10);
|
|
363
|
+
let t, l, s;
|
|
364
|
+
e[0] !== n ? ({
|
|
365
|
+
children: t,
|
|
366
|
+
className: l,
|
|
367
|
+
...s
|
|
368
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
369
|
+
let o;
|
|
370
|
+
e[4] !== l ? (o = p("flex-1 overflow-y-auto p-2", l), e[4] = l, e[5] = o) : o = e[5];
|
|
371
|
+
let a;
|
|
372
|
+
return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "sidebar-content", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
|
|
373
|
+
}, he = (n) => {
|
|
374
|
+
const e = g.c(10);
|
|
375
|
+
let t, l, s;
|
|
376
|
+
e[0] !== n ? ({
|
|
377
|
+
children: t,
|
|
378
|
+
className: l,
|
|
379
|
+
...s
|
|
380
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
381
|
+
let o;
|
|
382
|
+
e[4] !== l ? (o = p("flex shrink-0 flex-col p-2", l), e[4] = l, e[5] = o) : o = e[5];
|
|
383
|
+
let a;
|
|
384
|
+
return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "sidebar-footer", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
|
|
385
|
+
}, ge = (n) => {
|
|
386
|
+
const e = g.c(10);
|
|
387
|
+
let t, l, s;
|
|
388
|
+
e[0] !== n ? ({
|
|
389
|
+
children: t,
|
|
390
|
+
className: l,
|
|
391
|
+
...s
|
|
392
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
393
|
+
let o;
|
|
394
|
+
e[4] !== l ? (o = p("flex flex-wrap items-center gap-2", '[&_[data-ox-slot="sidebar-group-content"]]:w-full', l), e[4] = l, e[5] = o) : o = e[5];
|
|
395
|
+
let a;
|
|
396
|
+
return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "sidebar-group", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
|
|
397
|
+
}, ve = (n) => {
|
|
398
|
+
const e = g.c(10);
|
|
399
|
+
let t, l, s;
|
|
400
|
+
e[0] !== n ? ({
|
|
401
|
+
children: t,
|
|
402
|
+
className: l,
|
|
403
|
+
...s
|
|
404
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
405
|
+
let o;
|
|
406
|
+
e[4] !== l ? (o = p("mr-1.5 inline-flex size-6 shrink-0 items-center justify-center rounded-md", "enabled:cursor-pointer enabled:text-gray-900 enabled:hover:bg-gray-300 enabled:hover:text-gray-1200", "ox-gray-outset-focus disabled:ox-default-disabled", l), e[4] = l, e[5] = o) : o = e[5];
|
|
407
|
+
let a;
|
|
408
|
+
return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("button", { className: o, "data-ox-slot": "sidebar-group-action", type: "button", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
|
|
409
|
+
}, Se = (n) => {
|
|
410
|
+
const e = g.c(10);
|
|
411
|
+
let t, l, s;
|
|
412
|
+
e[0] !== n ? ({
|
|
413
|
+
children: t,
|
|
414
|
+
className: l,
|
|
415
|
+
...s
|
|
416
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
417
|
+
let o;
|
|
418
|
+
e[4] !== l ? (o = p(l), e[4] = l, e[5] = o) : o = e[5];
|
|
419
|
+
let a;
|
|
420
|
+
return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "sidebar-group-content", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
|
|
421
|
+
}, ye = (n) => {
|
|
422
|
+
const e = g.c(10);
|
|
423
|
+
let t, l, s;
|
|
424
|
+
e[0] !== n ? ({
|
|
425
|
+
children: t,
|
|
426
|
+
className: l,
|
|
427
|
+
...s
|
|
428
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
429
|
+
let o;
|
|
430
|
+
e[4] !== l ? (o = p("flex flex-1 items-center pl-2 text-xs font-medium text-gray-900", l), e[4] = l, e[5] = o) : o = e[5];
|
|
431
|
+
let a;
|
|
432
|
+
return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "sidebar-group-label", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
|
|
433
|
+
}, Ne = (n) => {
|
|
434
|
+
const e = g.c(10);
|
|
435
|
+
let t, l, s;
|
|
436
|
+
e[0] !== n ? ({
|
|
437
|
+
children: t,
|
|
438
|
+
className: l,
|
|
439
|
+
...s
|
|
440
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
441
|
+
let o;
|
|
442
|
+
e[4] !== l ? (o = p("flex shrink-0 flex-col p-2", l), e[4] = l, e[5] = o) : o = e[5];
|
|
443
|
+
let a;
|
|
444
|
+
return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("div", { className: o, "data-ox-slot": "sidebar-header", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
|
|
445
|
+
}, Oe = (n) => {
|
|
446
|
+
const e = g.c(10);
|
|
447
|
+
let t, l, s;
|
|
448
|
+
e[0] !== n ? ({
|
|
449
|
+
children: t,
|
|
450
|
+
className: l,
|
|
451
|
+
...s
|
|
452
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
453
|
+
let o;
|
|
454
|
+
e[4] !== l ? (o = p("flex flex-col items-stretch gap-1", l), e[4] = l, e[5] = o) : o = e[5];
|
|
455
|
+
let a;
|
|
456
|
+
return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("ul", { className: o, "data-ox-slot": "sidebar-menu", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
|
|
457
|
+
}, Ce = (n) => {
|
|
458
|
+
const e = g.c(10);
|
|
459
|
+
let t, l, s;
|
|
460
|
+
e[0] !== n ? ({
|
|
461
|
+
children: t,
|
|
462
|
+
className: l,
|
|
463
|
+
...s
|
|
464
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
465
|
+
let o;
|
|
466
|
+
e[4] !== l ? (o = p("inline-flex size-9 shrink-0 items-center justify-center rounded-lg border border-transparent", "enabled:cursor-pointer enabled:bg-transparent enabled:text-gray-1200 enabled:hover:bg-gray-300", "ox-gray-outset-focus disabled:ox-default-disabled", l), e[4] = l, e[5] = o) : o = e[5];
|
|
467
|
+
let a;
|
|
468
|
+
return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("button", { className: o, "data-ox-slot": "sidebar-menu-action", type: "button", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
|
|
469
|
+
}, we = (n) => {
|
|
470
|
+
const e = g.c(5), {
|
|
471
|
+
children: t,
|
|
472
|
+
className: l
|
|
473
|
+
} = n;
|
|
474
|
+
let s;
|
|
475
|
+
e[0] !== l ? (s = p("ml-auto", l), e[0] = l, e[1] = s) : s = e[1];
|
|
476
|
+
let o;
|
|
477
|
+
return e[2] !== t || e[3] !== s ? (o = /* @__PURE__ */ b(U, { className: s, "data-ox-slot": "sidebar-menu-badge", size: "sm", children: t }), e[2] = t, e[3] = s, e[4] = o) : o = e[4], o;
|
|
478
|
+
}, K = z(void 0), A = () => {
|
|
479
|
+
const n = T(K);
|
|
480
|
+
if (!n)
|
|
452
481
|
throw new Error("useMenuItemContext must be used within MenuItemProvider");
|
|
453
|
-
return
|
|
454
|
-
},
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
),
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
}
|
|
491
|
-
);
|
|
492
|
-
const S = (u) => {
|
|
493
|
-
l && c(), s && s(u);
|
|
494
|
-
};
|
|
495
|
-
return /* @__PURE__ */ m(
|
|
496
|
-
"button",
|
|
497
|
-
{
|
|
498
|
-
className: n(
|
|
499
|
-
x,
|
|
500
|
-
"enabled:text-gray-1200 enabled:cursor-pointer enabled:hover:bg-gray-300",
|
|
501
|
-
"disabled:ox-default-disabled"
|
|
502
|
-
),
|
|
503
|
-
"data-ox-slot": "sidebar-menu-button",
|
|
504
|
-
disabled: t,
|
|
505
|
-
type: "button",
|
|
506
|
-
onClick: S,
|
|
507
|
-
...i,
|
|
508
|
-
children: [
|
|
509
|
-
e,
|
|
510
|
-
l ? /* @__PURE__ */ o(
|
|
511
|
-
j,
|
|
512
|
-
{
|
|
513
|
-
className: n("ml-auto transition-transform duration-200", { "rotate-180": d }),
|
|
514
|
-
path: "mdiChevronDown"
|
|
515
|
-
}
|
|
516
|
-
) : null
|
|
517
|
-
]
|
|
518
|
-
}
|
|
519
|
-
);
|
|
520
|
-
};
|
|
521
|
-
function pe({
|
|
522
|
-
children: e,
|
|
523
|
-
defaultOpen: a = !1,
|
|
524
|
-
hasSub: t = !1
|
|
525
|
-
}) {
|
|
526
|
-
const [r, s] = y(a), i = () => s((l) => !l);
|
|
527
|
-
return /* @__PURE__ */ o(H.Provider, { value: { hasSub: t, isOpen: r, setIsOpen: s, toggleOpen: i }, children: e });
|
|
528
|
-
}
|
|
529
|
-
const fe = ({
|
|
530
|
-
children: e,
|
|
531
|
-
className: a,
|
|
532
|
-
defaultOpen: t = !1,
|
|
533
|
-
hasSub: r = !1,
|
|
534
|
-
...s
|
|
535
|
-
}) => /* @__PURE__ */ o(pe, { defaultOpen: t, hasSub: r, children: /* @__PURE__ */ o(
|
|
536
|
-
"li",
|
|
537
|
-
{
|
|
538
|
-
className: n("group flex flex-wrap items-center gap-x-2", a),
|
|
539
|
-
"data-ox-slot": "sidebar-menu-item",
|
|
540
|
-
...s,
|
|
541
|
-
children: e
|
|
542
|
-
}
|
|
543
|
-
) }), he = ({ className: e }) => /* @__PURE__ */ o(P, { className: e, "data-ox-slot": "sidebar-menu-skeleton", fullWidth: !0, height: 36 }), ve = ({ children: e, className: a, ...t }) => {
|
|
544
|
-
const { isOpen: r } = D();
|
|
545
|
-
return /* @__PURE__ */ o(
|
|
546
|
-
"div",
|
|
547
|
-
{
|
|
548
|
-
className: "ox-sidebar-submenu w-content grid w-full",
|
|
549
|
-
"data-ox-slot": "sidebar-menu-sub-wrapper",
|
|
550
|
-
"data-ox-state": r ? "open" : "closed",
|
|
551
|
-
children: /* @__PURE__ */ o(
|
|
552
|
-
"ul",
|
|
553
|
-
{
|
|
554
|
-
className: n(
|
|
555
|
-
"ml-4.5 flex flex-col gap-1 border-l border-gray-400 py-0.5 pl-2.5",
|
|
556
|
-
a
|
|
557
|
-
),
|
|
558
|
-
"data-ox-slot": "sidebar-menu-sub",
|
|
559
|
-
...t,
|
|
560
|
-
children: e
|
|
561
|
-
}
|
|
562
|
-
)
|
|
482
|
+
return n;
|
|
483
|
+
}, q = (n) => {
|
|
484
|
+
const e = g.c(6), {
|
|
485
|
+
className: t,
|
|
486
|
+
path: l,
|
|
487
|
+
placeholder: s
|
|
488
|
+
} = n;
|
|
489
|
+
let o;
|
|
490
|
+
e[0] !== t ? (o = p("shrink-0", t), e[0] = t, e[1] = o) : o = e[1];
|
|
491
|
+
let a;
|
|
492
|
+
return e[2] !== l || e[3] !== s || e[4] !== o ? (a = /* @__PURE__ */ b(L, { className: o, "data-ox-slot": "sidebar-menu-icon", path: l, placeholder: s, size: 0.8 }), e[2] = l, e[3] = s, e[4] = o, e[5] = a) : a = e[5], a;
|
|
493
|
+
}, $e = (n) => "href" in n, J = "flex h-9 flex-1 items-center gap-2 rounded-lg border border-transparent bg-transparent px-2 text-left text-sm ox-gray-outset-focus", ke = (n) => {
|
|
494
|
+
const e = g.c(23);
|
|
495
|
+
let t, l, s, o, a, i;
|
|
496
|
+
e[0] !== n ? ({
|
|
497
|
+
children: t,
|
|
498
|
+
className: l,
|
|
499
|
+
disabled: i,
|
|
500
|
+
href: s,
|
|
501
|
+
onClick: o,
|
|
502
|
+
...a
|
|
503
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s, e[4] = o, e[5] = a, e[6] = i) : (t = e[1], l = e[2], s = e[3], o = e[4], a = e[5], i = e[6]);
|
|
504
|
+
const r = i === void 0 ? !1 : i, {
|
|
505
|
+
hasSub: c,
|
|
506
|
+
toggleOpen: d
|
|
507
|
+
} = A(), f = !r;
|
|
508
|
+
let u;
|
|
509
|
+
e[7] !== l || e[8] !== r || e[9] !== f ? (u = p(J, {
|
|
510
|
+
"cursor-pointer text-gray-1200 hover:bg-gray-300": f,
|
|
511
|
+
"ox-default-disabled": r
|
|
512
|
+
}, l), e[7] = l, e[8] = r, e[9] = f, e[10] = u) : u = e[10];
|
|
513
|
+
const m = u;
|
|
514
|
+
let x;
|
|
515
|
+
e[11] !== r || e[12] !== c || e[13] !== o || e[14] !== d ? (x = (N) => {
|
|
516
|
+
if (r) {
|
|
517
|
+
N.preventDefault();
|
|
518
|
+
return;
|
|
563
519
|
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
className: a,
|
|
568
|
-
href: t,
|
|
569
|
-
...r
|
|
570
|
-
}) => {
|
|
571
|
-
const s = n(
|
|
572
|
-
"text-gray-1200 flex h-8 flex-1 cursor-pointer items-center gap-2 rounded-lg border border-transparent bg-transparent px-2 text-left text-sm hover:bg-gray-300",
|
|
573
|
-
"ox-gray-outset-focus",
|
|
574
|
-
a
|
|
575
|
-
);
|
|
576
|
-
return t ? /* @__PURE__ */ o(
|
|
577
|
-
"a",
|
|
578
|
-
{
|
|
579
|
-
className: s,
|
|
580
|
-
"data-ox-slot": "sidebar-menu-sub-button",
|
|
581
|
-
href: t,
|
|
582
|
-
...r,
|
|
583
|
-
children: e
|
|
520
|
+
if (c) {
|
|
521
|
+
N.preventDefault(), d();
|
|
522
|
+
return;
|
|
584
523
|
}
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
524
|
+
o?.(N);
|
|
525
|
+
}, e[11] = r, e[12] = c, e[13] = o, e[14] = d, e[15] = x) : x = e[15];
|
|
526
|
+
const h = x, v = r ? "true" : void 0, S = r ? void 0 : s;
|
|
527
|
+
let y;
|
|
528
|
+
return e[16] !== t || e[17] !== h || e[18] !== m || e[19] !== a || e[20] !== v || e[21] !== S ? (y = /* @__PURE__ */ b("a", { "aria-disabled": v, className: m, "data-ox-slot": "sidebar-menu-button", href: S, onClick: h, ...a, children: t }), e[16] = t, e[17] = h, e[18] = m, e[19] = a, e[20] = v, e[21] = S, e[22] = y) : y = e[22], y;
|
|
529
|
+
}, _e = (n) => {
|
|
530
|
+
const e = g.c(24);
|
|
531
|
+
let t, l, s, o, a, i;
|
|
532
|
+
e[0] !== n ? ({
|
|
533
|
+
children: t,
|
|
534
|
+
className: l,
|
|
535
|
+
disabled: a,
|
|
536
|
+
onClick: s,
|
|
537
|
+
type: i,
|
|
538
|
+
...o
|
|
539
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s, e[4] = o, e[5] = a, e[6] = i) : (t = e[1], l = e[2], s = e[3], o = e[4], a = e[5], i = e[6]);
|
|
540
|
+
const r = a === void 0 ? !1 : a, c = i === void 0 ? "button" : i, {
|
|
541
|
+
hasSub: d,
|
|
542
|
+
isOpen: f,
|
|
543
|
+
toggleOpen: u
|
|
544
|
+
} = A();
|
|
545
|
+
let m;
|
|
546
|
+
e[7] !== l ? (m = p(J, "enabled:cursor-pointer enabled:text-gray-1200 enabled:hover:bg-gray-300", "disabled:ox-default-disabled", l), e[7] = l, e[8] = m) : m = e[8];
|
|
547
|
+
const x = m;
|
|
548
|
+
let h;
|
|
549
|
+
e[9] !== d || e[10] !== s || e[11] !== u ? (h = (N) => {
|
|
550
|
+
if (d) {
|
|
551
|
+
u();
|
|
552
|
+
return;
|
|
593
553
|
}
|
|
594
|
-
|
|
595
|
-
},
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
"
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
554
|
+
s?.(N);
|
|
555
|
+
}, e[9] = d, e[10] = s, e[11] = u, e[12] = h) : h = e[12];
|
|
556
|
+
const v = h;
|
|
557
|
+
let S;
|
|
558
|
+
e[13] !== d || e[14] !== f ? (S = d ? /* @__PURE__ */ b(q, { className: p("ml-auto transition-transform duration-200", {
|
|
559
|
+
"rotate-180": f
|
|
560
|
+
}), path: "mdiChevronDown" }) : null, e[13] = d, e[14] = f, e[15] = S) : S = e[15];
|
|
561
|
+
let y;
|
|
562
|
+
return e[16] !== x || e[17] !== t || e[18] !== r || e[19] !== v || e[20] !== o || e[21] !== S || e[22] !== c ? (y = /* @__PURE__ */ C("button", { className: x, "data-ox-slot": "sidebar-menu-button", disabled: r, type: c, onClick: v, ...o, children: [
|
|
563
|
+
t,
|
|
564
|
+
S
|
|
565
|
+
] }), e[16] = x, e[17] = t, e[18] = r, e[19] = v, e[20] = o, e[21] = S, e[22] = c, e[23] = y) : y = e[23], y;
|
|
566
|
+
}, Pe = (n) => {
|
|
567
|
+
const e = g.c(2);
|
|
568
|
+
let t;
|
|
569
|
+
return e[0] !== n ? (t = $e(n) ? /* @__PURE__ */ b(ke, { ...n }) : /* @__PURE__ */ b(_e, { ...n }), e[0] = n, e[1] = t) : t = e[1], t;
|
|
570
|
+
};
|
|
571
|
+
function Me(n) {
|
|
572
|
+
const e = g.c(7), {
|
|
573
|
+
children: t,
|
|
574
|
+
defaultOpen: l,
|
|
575
|
+
hasSub: s
|
|
576
|
+
} = n, o = l === void 0 ? !1 : l, a = s === void 0 ? !1 : s, [i, r] = E(o);
|
|
577
|
+
let c;
|
|
578
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (c = () => r(Ie), e[0] = c) : c = e[0];
|
|
579
|
+
const d = c;
|
|
580
|
+
let f;
|
|
581
|
+
e[1] !== a || e[2] !== i ? (f = {
|
|
582
|
+
hasSub: a,
|
|
583
|
+
isOpen: i,
|
|
584
|
+
setIsOpen: r,
|
|
585
|
+
toggleOpen: d
|
|
586
|
+
}, e[1] = a, e[2] = i, e[3] = f) : f = e[3];
|
|
587
|
+
let u;
|
|
588
|
+
return e[4] !== t || e[5] !== f ? (u = /* @__PURE__ */ b(K.Provider, { value: f, children: t }), e[4] = t, e[5] = f, e[6] = u) : u = e[6], u;
|
|
589
|
+
}
|
|
590
|
+
function Ie(n) {
|
|
591
|
+
return !n;
|
|
592
|
+
}
|
|
593
|
+
const Ee = (n) => {
|
|
594
|
+
const e = g.c(16);
|
|
595
|
+
let t, l, s, o, a;
|
|
596
|
+
e[0] !== n ? ({
|
|
597
|
+
children: t,
|
|
598
|
+
className: l,
|
|
599
|
+
defaultOpen: o,
|
|
600
|
+
hasSub: a,
|
|
601
|
+
...s
|
|
602
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s, e[4] = o, e[5] = a) : (t = e[1], l = e[2], s = e[3], o = e[4], a = e[5]);
|
|
603
|
+
const i = o === void 0 ? !1 : o, r = a === void 0 ? !1 : a;
|
|
604
|
+
let c;
|
|
605
|
+
e[6] !== l ? (c = p("group flex flex-wrap items-center gap-x-2", l), e[6] = l, e[7] = c) : c = e[7];
|
|
606
|
+
let d;
|
|
607
|
+
e[8] !== t || e[9] !== s || e[10] !== c ? (d = /* @__PURE__ */ b("li", { className: c, "data-ox-slot": "sidebar-menu-item", ...s, children: t }), e[8] = t, e[9] = s, e[10] = c, e[11] = d) : d = e[11];
|
|
608
|
+
let f;
|
|
609
|
+
return e[12] !== i || e[13] !== r || e[14] !== d ? (f = /* @__PURE__ */ b(Me, { defaultOpen: i, hasSub: r, children: d }), e[12] = i, e[13] = r, e[14] = d, e[15] = f) : f = e[15], f;
|
|
610
|
+
}, Le = (n) => {
|
|
611
|
+
const e = g.c(2), {
|
|
612
|
+
className: t
|
|
613
|
+
} = n;
|
|
614
|
+
let l;
|
|
615
|
+
return e[0] !== t ? (l = /* @__PURE__ */ b(X, { className: t, "data-ox-slot": "sidebar-menu-skeleton", fullWidth: !0, height: 36 }), e[0] = t, e[1] = l) : l = e[1], l;
|
|
616
|
+
}, Be = (n) => {
|
|
617
|
+
const e = g.c(13);
|
|
618
|
+
let t, l, s;
|
|
619
|
+
e[0] !== n ? ({
|
|
620
|
+
children: t,
|
|
621
|
+
className: l,
|
|
622
|
+
...s
|
|
623
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
624
|
+
const {
|
|
625
|
+
isOpen: o
|
|
626
|
+
} = A(), a = o ? "open" : "closed";
|
|
627
|
+
let i;
|
|
628
|
+
e[4] !== l ? (i = p("ml-4.5 flex flex-col gap-1 border-l border-gray-400 py-0.5 pl-2.5", l), e[4] = l, e[5] = i) : i = e[5];
|
|
629
|
+
let r;
|
|
630
|
+
e[6] !== t || e[7] !== s || e[8] !== i ? (r = /* @__PURE__ */ b("ul", { className: i, "data-ox-slot": "sidebar-menu-sub", ...s, children: t }), e[6] = t, e[7] = s, e[8] = i, e[9] = r) : r = e[9];
|
|
631
|
+
let c;
|
|
632
|
+
return e[10] !== a || e[11] !== r ? (c = /* @__PURE__ */ b("div", { className: "ox-sidebar-submenu w-content grid w-full", "data-ox-slot": "sidebar-menu-sub-wrapper", "data-ox-state": a, children: r }), e[10] = a, e[11] = r, e[12] = c) : c = e[12], c;
|
|
633
|
+
}, ze = (n) => {
|
|
634
|
+
const e = g.c(16);
|
|
635
|
+
let t, l, s, o;
|
|
636
|
+
e[0] !== n ? ({
|
|
637
|
+
children: t,
|
|
638
|
+
className: l,
|
|
639
|
+
href: o,
|
|
640
|
+
...s
|
|
641
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s, e[4] = o) : (t = e[1], l = e[2], s = e[3], o = e[4]);
|
|
642
|
+
let a;
|
|
643
|
+
e[5] !== l ? (a = p("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-gray-1200 hover:bg-gray-300", "ox-gray-outset-focus", l), e[5] = l, e[6] = a) : a = e[6];
|
|
644
|
+
const i = a;
|
|
645
|
+
if (o) {
|
|
646
|
+
const c = s;
|
|
647
|
+
let d;
|
|
648
|
+
return e[7] !== i || e[8] !== t || e[9] !== o || e[10] !== c ? (d = /* @__PURE__ */ b("a", { className: i, "data-ox-slot": "sidebar-menu-sub-button", href: o, ...c, children: t }), e[7] = i, e[8] = t, e[9] = o, e[10] = c, e[11] = d) : d = e[11], d;
|
|
606
649
|
}
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
);
|
|
650
|
+
let r;
|
|
651
|
+
return e[12] !== i || e[13] !== t || e[14] !== s ? (r = /* @__PURE__ */ b("button", { className: i, "data-ox-slot": "sidebar-menu-sub-button", type: "button", ...s, children: t }), e[12] = i, e[13] = t, e[14] = s, e[15] = r) : r = e[15], r;
|
|
652
|
+
}, Te = (n) => {
|
|
653
|
+
const e = g.c(10);
|
|
654
|
+
let t, l, s;
|
|
655
|
+
e[0] !== n ? ({
|
|
656
|
+
children: t,
|
|
657
|
+
className: l,
|
|
658
|
+
...s
|
|
659
|
+
} = n, e[0] = n, e[1] = t, e[2] = l, e[3] = s) : (t = e[1], l = e[2], s = e[3]);
|
|
660
|
+
let o;
|
|
661
|
+
e[4] !== l ? (o = p("flex items-center gap-2", l), e[4] = l, e[5] = o) : o = e[5];
|
|
662
|
+
let a;
|
|
663
|
+
return e[6] !== t || e[7] !== s || e[8] !== o ? (a = /* @__PURE__ */ b("li", { className: o, "data-ox-slot": "sidebar-menu-sub-item", ...s, children: t }), e[6] = t, e[7] = s, e[8] = o, e[9] = a) : a = e[9], a;
|
|
664
|
+
}, He = (n) => {
|
|
665
|
+
const e = g.c(6);
|
|
666
|
+
let t, l;
|
|
667
|
+
e[0] !== n ? ({
|
|
668
|
+
className: t,
|
|
669
|
+
...l
|
|
670
|
+
} = n, e[0] = n, e[1] = t, e[2] = l) : (t = e[1], l = e[2]);
|
|
671
|
+
let s;
|
|
672
|
+
return e[3] !== t || e[4] !== l ? (s = /* @__PURE__ */ b(Z, { className: t, "data-ox-slot": "sidebar-separator", ...l }), e[3] = t, e[4] = l, e[5] = s) : s = e[5], s;
|
|
673
|
+
}, Ae = (n) => {
|
|
674
|
+
const e = g.c(12), {
|
|
675
|
+
className: t,
|
|
676
|
+
onClick: l
|
|
677
|
+
} = n, {
|
|
678
|
+
isMobile: s,
|
|
679
|
+
toggleSidebar: o
|
|
680
|
+
} = H();
|
|
681
|
+
let a;
|
|
682
|
+
e[0] !== s || e[1] !== l || e[2] !== o ? (a = () => {
|
|
683
|
+
s ? o() : l && l();
|
|
684
|
+
}, e[0] = s, e[1] = l, e[2] = o, e[3] = a) : a = e[3];
|
|
685
|
+
const i = a, r = s || l;
|
|
686
|
+
let c;
|
|
687
|
+
e[4] !== t || e[5] !== r ? (c = p("inline-flex size-8 items-center justify-center rounded-lg", "border border-transparent bg-transparent text-gray-1200", {
|
|
688
|
+
"ox-gray-outset-focus cursor-pointer hover:bg-gray-300": r
|
|
689
|
+
}, t), e[4] = t, e[5] = r, e[6] = c) : c = e[6];
|
|
690
|
+
const d = !r;
|
|
691
|
+
let f;
|
|
692
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ b(L, { path: "mdiDockLeft", size: 0.8 }), e[7] = f) : f = e[7];
|
|
693
|
+
let u;
|
|
694
|
+
return e[8] !== i || e[9] !== c || e[10] !== d ? (u = /* @__PURE__ */ b("button", { "aria-label": "Toggle sidebar", className: c, "data-ox-slot": "sidebar-trigger", disabled: d, type: "button", onClick: i, children: f }), e[8] = i, e[9] = c, e[10] = d, e[11] = u) : u = e[11], u;
|
|
630
695
|
};
|
|
631
|
-
function
|
|
632
|
-
const
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
696
|
+
function qe(n) {
|
|
697
|
+
const e = g.c(11), {
|
|
698
|
+
children: t
|
|
699
|
+
} = n, [l, s] = E(!1), [o, a] = E(!1);
|
|
700
|
+
let i, r;
|
|
701
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (i = () => {
|
|
702
|
+
const S = () => {
|
|
703
|
+
a(window.innerWidth < B);
|
|
636
704
|
};
|
|
637
|
-
return
|
|
638
|
-
}, []);
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
705
|
+
return S(), window.addEventListener("resize", S), () => window.removeEventListener("resize", S);
|
|
706
|
+
}, r = [], e[0] = i, e[1] = r) : (i = e[0], r = e[1]), j(i, r);
|
|
707
|
+
let c;
|
|
708
|
+
e[2] === Symbol.for("react.memo_cache_sentinel") ? (c = () => {
|
|
709
|
+
s(!0);
|
|
710
|
+
}, e[2] = c) : c = e[2];
|
|
711
|
+
const d = c;
|
|
712
|
+
let f;
|
|
713
|
+
e[3] === Symbol.for("react.memo_cache_sentinel") ? (f = () => {
|
|
714
|
+
s(!1);
|
|
715
|
+
}, e[3] = f) : f = e[3];
|
|
716
|
+
const u = f;
|
|
717
|
+
let m;
|
|
718
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (m = () => {
|
|
719
|
+
s(De);
|
|
720
|
+
}, e[4] = m) : m = e[4];
|
|
721
|
+
const x = m;
|
|
722
|
+
let h;
|
|
723
|
+
e[5] !== o || e[6] !== l ? (h = {
|
|
724
|
+
closeSidebar: u,
|
|
725
|
+
isMobile: o,
|
|
726
|
+
mobileOpen: l,
|
|
727
|
+
openSidebar: d,
|
|
728
|
+
toggleSidebar: x
|
|
729
|
+
}, e[5] = o, e[6] = l, e[7] = h) : h = e[7];
|
|
730
|
+
let v;
|
|
731
|
+
return e[8] !== t || e[9] !== h ? (v = /* @__PURE__ */ b(V.Provider, { value: h, children: t }), e[8] = t, e[9] = h, e[10] = v) : v = e[10], v;
|
|
732
|
+
}
|
|
733
|
+
function De(n) {
|
|
734
|
+
return !n;
|
|
659
735
|
}
|
|
660
|
-
const
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
736
|
+
const _ = xe, O = Oe, D = ge;
|
|
737
|
+
_.Header = Ne;
|
|
738
|
+
_.Content = pe;
|
|
739
|
+
_.Footer = he;
|
|
740
|
+
_.Separator = He;
|
|
741
|
+
_.Trigger = Ae;
|
|
742
|
+
O.Item = Ee;
|
|
743
|
+
O.Button = Pe;
|
|
744
|
+
O.Icon = q;
|
|
745
|
+
O.Badge = we;
|
|
746
|
+
O.Action = Ce;
|
|
747
|
+
O.Skeleton = Le;
|
|
748
|
+
O.Sub = Be;
|
|
749
|
+
O.SubItem = Te;
|
|
750
|
+
O.SubButton = ze;
|
|
751
|
+
D.Label = ye;
|
|
752
|
+
D.Action = ve;
|
|
753
|
+
D.Content = Se;
|
|
678
754
|
export {
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
755
|
+
Ve as OxAppLayout,
|
|
756
|
+
Ye as OxLegacyHeader,
|
|
757
|
+
Fe as OxLegacyMainContent,
|
|
758
|
+
w as OxLegacySidebar,
|
|
759
|
+
Ke as OxMainContent,
|
|
760
|
+
_ as OxSidebar,
|
|
761
|
+
D as OxSidebarGroup,
|
|
762
|
+
O as OxSidebarMenu,
|
|
763
|
+
qe as OxSidebarProvider,
|
|
764
|
+
H as useOxSidebar
|
|
689
765
|
};
|