@noxickon/onyx 4.1.6 → 5.0.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 +467 -103
- package/dist/_internal/styles/checkbox.variants.d.ts +5 -0
- package/dist/_internal/styles/index.d.ts +3 -0
- package/dist/_internal/styles/radio.variants.d.ts +5 -0
- package/dist/_internal/styles/switch.variants.d.ts +9 -0
- package/dist/_internal/types.d.ts +1 -0
- package/dist/chunks/hooks-B58X4Fdh.js +46 -0
- package/dist/chunks/hooks-iUUmqFrq.js +7056 -0
- package/dist/chunks/ui-Bz7A98Kq.js +13 -0
- package/dist/chunks/ui-CezxuKW0.js +22994 -0
- package/dist/contexts/contexts.cjs.js +2 -2
- package/dist/contexts/contexts.es.js +55 -55
- package/dist/forms/Checkbox/Checkbox.stories.d.ts +10 -3
- package/dist/forms/Checkbox/index.d.ts +3 -3
- package/dist/forms/Checkbox/src/Checkbox.d.ts +1 -1
- package/dist/forms/Checkbox/src/Checkbox.types.d.ts +11 -4
- package/dist/forms/Checkbox/src/CheckboxGroup.d.ts +1 -1
- package/dist/forms/Checkbox/src/CheckboxGroupItem.d.ts +1 -1
- package/dist/forms/Checkbox/src/context/CheckboxGroupContext.types.d.ts +5 -2
- package/dist/forms/Input/Date/src/useDateInput.d.ts +2 -2
- package/dist/forms/Input/Number/src/Number.types.d.ts +4 -4
- package/dist/forms/Input/Number/src/context/NumberContext.types.d.ts +2 -2
- package/dist/forms/Input/Time/src/useTimeInput.d.ts +2 -2
- package/dist/forms/Radio/Radio.stories.d.ts +14 -3
- package/dist/forms/Radio/index.d.ts +2 -2
- package/dist/forms/Radio/src/Radio.types.d.ts +9 -7
- package/dist/forms/Radio/src/RadioGroup.d.ts +1 -1
- package/dist/forms/Radio/src/RadioGroupItem.d.ts +1 -1
- package/dist/forms/Radio/src/context/RadioGroupContext.types.d.ts +5 -2
- package/dist/forms/Select/Select.stories.d.ts +53 -4
- package/dist/forms/Select/index.d.ts +1 -1
- package/dist/forms/Select/src/Select.d.ts +1 -1
- package/dist/forms/Select/src/Select.types.d.ts +17 -5
- package/dist/forms/Switch/Switch.stories.d.ts +1 -0
- package/dist/forms/Switch/src/Switch.d.ts +1 -1
- package/dist/forms/Switch/src/Switch.types.d.ts +2 -0
- package/dist/hooks/hooks.cjs.js +1 -1
- package/dist/hooks/hooks.es.js +11 -10
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useControllableState/src/useControllableState.types.d.ts +3 -6
- package/dist/hooks/useSort/UseSort.stories.d.ts +6 -0
- package/dist/hooks/useSort/index.d.ts +2 -0
- package/dist/hooks/useSort/src/useSort.d.ts +3 -0
- package/dist/hooks/useSort/src/useSort.types.d.ts +20 -0
- package/dist/hooks/useSort/test/useSort.test.d.ts +1 -0
- package/dist/layouts/layouts.cjs.js +1 -1
- package/dist/layouts/layouts.es.js +31 -32
- package/dist/legacy/index.d.ts +1 -0
- package/dist/legacy/legacy.cjs.js +1 -1
- package/dist/legacy/legacy.es.js +766 -604
- package/dist/legacy/ui/Floating/Floating.stories.d.ts +1 -1
- package/dist/legacy/ui/Floating/index.d.ts +1 -1
- package/dist/legacy/ui/Floating/src/Floating.types.d.ts +1 -1
- package/dist/legacy/ui/Floating/src/FloatingTrigger.d.ts +1 -1
- package/dist/legacy/ui/Toast/Toast.stories.d.ts +9 -0
- package/dist/legacy/ui/Toast/index.d.ts +5 -0
- package/dist/legacy/ui/Toast/src/Toast.d.ts +2 -0
- package/dist/legacy/ui/Toast/src/Toast.types.d.ts +29 -0
- package/dist/legacy/ui/Toast/src/ToastItem.d.ts +2 -0
- package/dist/legacy/ui/Toast/src/context/ToastContext.d.ts +2 -0
- package/dist/legacy/ui/Toast/src/context/ToastContext.types.d.ts +28 -0
- package/dist/legacy/ui/Toast/src/context/ToastProvider.d.ts +2 -0
- package/dist/legacy/ui/Toast/src/context/useToast.d.ts +2 -0
- package/dist/legacy/ui/Toast/test/Toast.test.d.ts +1 -0
- package/dist/onyx.cjs.js +1 -1
- package/dist/onyx.es.js +19 -18
- package/dist/pages/pages.cjs.js +1 -1
- package/dist/pages/pages.es.js +37 -37
- package/dist/routes/routes.cjs.js +1 -1
- package/dist/routes/routes.es.js +3 -3
- package/dist/styles.css +1 -0
- package/dist/ui/Breadcrumb/Breadcrumb.stories.d.ts +1 -1
- package/dist/ui/Breadcrumb/index.d.ts +1 -1
- package/dist/ui/Breadcrumb/src/Breadcrumb.types.d.ts +1 -1
- package/dist/ui/Breadcrumb/src/BreadcrumbLink.d.ts +1 -1
- package/dist/ui/Button/Button.stories.d.ts +2 -2
- package/dist/ui/Button/src/Button.d.ts +1 -1
- package/dist/ui/Button/src/Button.types.d.ts +1 -1
- package/dist/ui/Dropdown/Dropdown.stories.d.ts +23 -3
- package/dist/ui/Dropdown/index.d.ts +8 -2
- package/dist/ui/Dropdown/src/Dropdown.types.d.ts +31 -4
- package/dist/ui/Dropdown/src/DropdownCheckboxItem.d.ts +2 -0
- package/dist/ui/Dropdown/src/DropdownGroup.d.ts +2 -0
- package/dist/ui/Dropdown/src/DropdownRadioGroup.d.ts +2 -0
- package/dist/ui/Dropdown/src/DropdownRadioItem.d.ts +2 -0
- package/dist/ui/Dropdown/src/DropdownSubMenu.d.ts +2 -0
- package/dist/ui/Dropdown/src/DropdownSubMenuContent.d.ts +2 -0
- package/dist/ui/Dropdown/src/DropdownSubMenuTrigger.d.ts +2 -0
- package/dist/ui/Dropdown/src/DropdownTrigger.d.ts +1 -1
- package/dist/ui/Dropdown/src/context/DropdownContext.types.d.ts +2 -0
- package/dist/ui/Dropdown/src/context/DropdownRadioContext.d.ts +2 -0
- package/dist/ui/Dropdown/src/context/DropdownRadioContext.types.d.ts +5 -0
- package/dist/ui/Dropdown/src/context/DropdownSubMenuContext.d.ts +2 -0
- package/dist/ui/Dropdown/src/context/DropdownSubMenuContext.types.d.ts +14 -0
- package/dist/ui/Dropdown/src/context/useDropdownRadioContext.d.ts +1 -0
- package/dist/ui/Dropdown/src/context/useDropdownSubMenuContext.d.ts +1 -0
- package/dist/ui/HoverCard/HoverCard.stories.d.ts +1 -1
- package/dist/ui/HoverCard/index.d.ts +1 -1
- package/dist/ui/HoverCard/src/HoverCard.types.d.ts +1 -1
- package/dist/ui/HoverCard/src/HoverCardTrigger.d.ts +1 -1
- package/dist/ui/Link/Link.stories.d.ts +1 -1
- package/dist/ui/Link/src/Link.d.ts +1 -1
- package/dist/ui/Link/src/Link.types.d.ts +1 -1
- package/dist/ui/Pagination/Pagination.stories.d.ts +3 -3
- package/dist/ui/Pagination/index.d.ts +3 -3
- package/dist/ui/Pagination/src/Pagination.types.d.ts +3 -3
- package/dist/ui/Pagination/src/PaginationLink.d.ts +1 -1
- package/dist/ui/Pagination/src/PaginationNext.d.ts +1 -1
- package/dist/ui/Pagination/src/PaginationPrevious.d.ts +1 -1
- package/dist/ui/Popover/Popover.stories.d.ts +1 -1
- package/dist/ui/Popover/index.d.ts +1 -1
- package/dist/ui/Popover/src/Popover.types.d.ts +1 -1
- package/dist/ui/Popover/src/PopoverTrigger.d.ts +1 -1
- package/dist/ui/Popper/index.d.ts +1 -1
- package/dist/ui/Popper/src/Popper.types.d.ts +1 -1
- package/dist/ui/Popper/src/PopperAnchor.d.ts +1 -1
- package/dist/ui/Table/Table.stories.d.ts +7 -4
- package/dist/ui/Table/index.d.ts +3 -3
- package/dist/ui/Table/src/Table.d.ts +1 -1
- package/dist/ui/Table/src/Table.types.d.ts +8 -0
- package/dist/ui/Table/src/TableHead.d.ts +1 -1
- package/dist/ui/Table/src/TableRow.d.ts +1 -1
- package/dist/ui/Table/src/context/TableContext.types.d.ts +6 -0
- package/dist/ui/Toast/Toast.stories.d.ts +4 -2
- package/dist/ui/Toast/index.d.ts +1 -1
- package/dist/ui/Toast/src/Toast.d.ts +2 -2
- package/dist/ui/Toast/src/Toast.types.d.ts +23 -23
- package/dist/ui/Toast/src/context/ToastContext.types.d.ts +15 -23
- package/dist/ui/Toast/src/context/ToastProvider.d.ts +2 -2
- package/dist/ui/Toast/src/context/useToast.d.ts +2 -1
- package/dist/ui.css +1 -1
- package/dist/utils/utils.cjs.js +1 -1
- package/dist/utils/utils.es.js +6 -6
- package/package.json +17 -16
- package/dist/chunks/hooks-BMXCuU2h.js +0 -7318
- package/dist/chunks/hooks-H39lCrRt.js +0 -31
- package/dist/chunks/ui-BBpe54MX.js +0 -9
- package/dist/chunks/ui-DaY9hD0b.js +0 -20924
- package/dist/ui/Dropdown/src/DropdownLabel.d.ts +0 -2
- package/dist/ui/Toast/src/ToastItem.d.ts +0 -2
package/dist/legacy/legacy.es.js
CHANGED
|
@@ -1,633 +1,632 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import { useState as X, useRef as
|
|
4
|
-
import { Menu as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
let s = 0, l = i.length - 1;
|
|
1
|
+
import { jsx as y, jsxs as G, Fragment as we } from "react/jsx-runtime";
|
|
2
|
+
import { c as F, aB as Oe, aC as le, aD as Se, av as H, t as ne, N as J, aA as ae, E as ce, a8 as Ne, aE as Ee, ax as Le, ay as Ce, aF as Te, aG as ke } from "../chunks/ui-CezxuKW0.js";
|
|
3
|
+
import { useState as X, useRef as Q, useEffect as K, createContext as te, useContext as se, useId as _e, useCallback as de } from "react";
|
|
4
|
+
import { Menu as Pe, X as ze } from "lucide-react";
|
|
5
|
+
import { createPortal as fe } from "react-dom";
|
|
6
|
+
const $e = (n, e) => {
|
|
7
|
+
let s = 0, l = n.length - 1;
|
|
9
8
|
for (; s <= l; ) {
|
|
10
|
-
const
|
|
11
|
-
|
|
9
|
+
const o = Math.floor((s + l) / 2);
|
|
10
|
+
n[o] <= e ? s = o + 1 : l = o - 1;
|
|
12
11
|
}
|
|
13
12
|
return Math.max(0, s - 1);
|
|
14
|
-
},
|
|
13
|
+
}, Me = 5, Ie = 16, Re = (n) => {
|
|
15
14
|
const e = F.c(51), {
|
|
16
15
|
count: s,
|
|
17
16
|
estimateSize: l,
|
|
18
|
-
gap:
|
|
19
|
-
overscan:
|
|
17
|
+
gap: o,
|
|
18
|
+
overscan: t,
|
|
20
19
|
scrollRef: r
|
|
21
|
-
} =
|
|
20
|
+
} = n, c = o === void 0 ? 0 : o, i = t === void 0 ? Me : t, [a, u] = X(0), [f, d] = X(0), [m, h] = X(He);
|
|
22
21
|
let p;
|
|
23
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ new Map(), e[0] = p) : p = e[0];
|
|
24
|
-
const
|
|
25
|
-
let
|
|
26
|
-
e[1] !== l || e[2] !==
|
|
27
|
-
const
|
|
28
|
-
return
|
|
29
|
-
}, e[1] = l, e[2] =
|
|
30
|
-
const
|
|
31
|
-
let
|
|
32
|
-
if (e[4] !== s || e[5] !==
|
|
33
|
-
const
|
|
34
|
-
let
|
|
35
|
-
for (let
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
offsets:
|
|
39
|
-
totalSize:
|
|
40
|
-
}, e[4] = s, e[5] =
|
|
22
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ new Map(), e[0] = p) : p = e[0];
|
|
23
|
+
const w = Q(p), _ = Q(null);
|
|
24
|
+
let O;
|
|
25
|
+
e[1] !== l || e[2] !== m ? (O = (g) => {
|
|
26
|
+
const v = m.get(g);
|
|
27
|
+
return v !== void 0 ? v : typeof l == "function" ? l(g) : l;
|
|
28
|
+
}, e[1] = l, e[2] = m, e[3] = O) : O = e[3];
|
|
29
|
+
const b = O;
|
|
30
|
+
let N;
|
|
31
|
+
if (e[4] !== s || e[5] !== c || e[6] !== b) {
|
|
32
|
+
const g = [];
|
|
33
|
+
let v = 0;
|
|
34
|
+
for (let T = 0; T < s; T++)
|
|
35
|
+
g.push(v), v = v + (b(T) + (T < s - 1 ? c : 0));
|
|
36
|
+
N = {
|
|
37
|
+
offsets: g,
|
|
38
|
+
totalSize: v
|
|
39
|
+
}, e[4] = s, e[5] = c, e[6] = b, e[7] = N;
|
|
41
40
|
} else
|
|
42
|
-
|
|
41
|
+
N = e[7];
|
|
43
42
|
const {
|
|
44
|
-
offsets:
|
|
45
|
-
totalSize:
|
|
46
|
-
} =
|
|
47
|
-
let
|
|
43
|
+
offsets: S,
|
|
44
|
+
totalSize: x
|
|
45
|
+
} = N;
|
|
46
|
+
let E;
|
|
48
47
|
e: {
|
|
49
48
|
if (s === 0) {
|
|
50
|
-
let
|
|
51
|
-
e[8] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
49
|
+
let U;
|
|
50
|
+
e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (U = {
|
|
52
51
|
start: 0,
|
|
53
52
|
end: 0
|
|
54
|
-
}, e[8] =
|
|
53
|
+
}, e[8] = U) : U = e[8], E = U;
|
|
55
54
|
break e;
|
|
56
55
|
}
|
|
57
|
-
let
|
|
58
|
-
if (e[9] !== s || e[10] !==
|
|
59
|
-
|
|
60
|
-
let
|
|
61
|
-
for (;
|
|
62
|
-
|
|
63
|
-
e[9] = s, e[10] =
|
|
56
|
+
let g, v;
|
|
57
|
+
if (e[9] !== s || e[10] !== c || e[11] !== b || e[12] !== S || e[13] !== a || e[14] !== f) {
|
|
58
|
+
v = $e(S, a), g = v;
|
|
59
|
+
let U = 0;
|
|
60
|
+
for (; g < s && U < f; )
|
|
61
|
+
U = U + (b(g) + c), g++;
|
|
62
|
+
e[9] = s, e[10] = c, e[11] = b, e[12] = S, e[13] = a, e[14] = f, e[15] = g, e[16] = v;
|
|
64
63
|
} else
|
|
65
|
-
|
|
66
|
-
const
|
|
67
|
-
let
|
|
68
|
-
e[17] !==
|
|
69
|
-
const
|
|
70
|
-
let
|
|
71
|
-
e[20] !== s || e[21] !==
|
|
72
|
-
let
|
|
73
|
-
e[23] !==
|
|
74
|
-
start:
|
|
75
|
-
end:
|
|
76
|
-
}, e[23] =
|
|
64
|
+
g = e[15], v = e[16];
|
|
65
|
+
const T = v - i, A = s - 1;
|
|
66
|
+
let $;
|
|
67
|
+
e[17] !== T || e[18] !== A ? ($ = le(T, 0, A), e[17] = T, e[18] = A, e[19] = $) : $ = e[19];
|
|
68
|
+
const j = g + i;
|
|
69
|
+
let Y;
|
|
70
|
+
e[20] !== s || e[21] !== j ? (Y = le(j, 0, s), e[20] = s, e[21] = j, e[22] = Y) : Y = e[22];
|
|
71
|
+
let q;
|
|
72
|
+
e[23] !== Y || e[24] !== $ ? (q = {
|
|
73
|
+
start: $,
|
|
74
|
+
end: Y
|
|
75
|
+
}, e[23] = Y, e[24] = $, e[25] = q) : q = e[25], E = q;
|
|
77
76
|
}
|
|
78
|
-
const
|
|
79
|
-
let
|
|
77
|
+
const L = E;
|
|
78
|
+
let R;
|
|
80
79
|
e: {
|
|
81
80
|
if (s === 0) {
|
|
82
|
-
let
|
|
83
|
-
e[26] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
81
|
+
let v;
|
|
82
|
+
e[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = [], e[26] = v) : v = e[26], R = v;
|
|
84
83
|
break e;
|
|
85
84
|
}
|
|
86
|
-
let
|
|
87
|
-
if (e[27] !==
|
|
88
|
-
let
|
|
89
|
-
e[32] !==
|
|
90
|
-
index:
|
|
91
|
-
start:
|
|
92
|
-
size:
|
|
93
|
-
}), e[32] =
|
|
85
|
+
let g;
|
|
86
|
+
if (e[27] !== b || e[28] !== S || e[29] !== L.end || e[30] !== L.start) {
|
|
87
|
+
let v;
|
|
88
|
+
e[32] !== b || e[33] !== S ? (v = (T) => ({
|
|
89
|
+
index: T,
|
|
90
|
+
start: S[T],
|
|
91
|
+
size: b(T)
|
|
92
|
+
}), e[32] = b, e[33] = S, e[34] = v) : v = e[34], g = Oe(L.start, L.end).map(v), e[27] = b, e[28] = S, e[29] = L.end, e[30] = L.start, e[31] = g;
|
|
94
93
|
} else
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
g = e[31];
|
|
95
|
+
R = g;
|
|
97
96
|
}
|
|
98
|
-
const
|
|
99
|
-
let
|
|
100
|
-
e[35] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
101
|
-
if (!
|
|
102
|
-
const
|
|
103
|
-
|
|
97
|
+
const k = R;
|
|
98
|
+
let M;
|
|
99
|
+
e[35] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = (g) => (v) => {
|
|
100
|
+
if (!v) {
|
|
101
|
+
const $ = w.current.get(g);
|
|
102
|
+
$ && (_.current?.unobserve($), w.current.delete(g));
|
|
104
103
|
return;
|
|
105
104
|
}
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
h((
|
|
110
|
-
if (
|
|
111
|
-
return
|
|
112
|
-
const
|
|
113
|
-
return
|
|
105
|
+
const T = w.current.get(g);
|
|
106
|
+
T !== v && (T && _.current?.unobserve(T), _.current?.observe(v), w.current.set(g, v));
|
|
107
|
+
const A = v.getBoundingClientRect().height;
|
|
108
|
+
h(($) => {
|
|
109
|
+
if ($.get(g) === A)
|
|
110
|
+
return $;
|
|
111
|
+
const j = new Map($);
|
|
112
|
+
return j.set(g, A), j;
|
|
114
113
|
});
|
|
115
|
-
}, e[35] =
|
|
116
|
-
const
|
|
117
|
-
let
|
|
118
|
-
e[36] !== s || e[37] !==
|
|
119
|
-
const
|
|
120
|
-
align:
|
|
121
|
-
behavior:
|
|
122
|
-
} =
|
|
123
|
-
if (!
|
|
114
|
+
}, e[35] = M) : M = e[35];
|
|
115
|
+
const I = M;
|
|
116
|
+
let P;
|
|
117
|
+
e[36] !== s || e[37] !== b || e[38] !== S || e[39] !== r || e[40] !== x ? (P = (g, v) => {
|
|
118
|
+
const T = v === void 0 ? {} : v, {
|
|
119
|
+
align: A,
|
|
120
|
+
behavior: $
|
|
121
|
+
} = T, j = A === void 0 ? "start" : A, Y = $ === void 0 ? "auto" : $, q = r.current;
|
|
122
|
+
if (!q || g < 0 || g >= s)
|
|
124
123
|
return;
|
|
125
|
-
const
|
|
124
|
+
const U = S[g], re = b(g), oe = q.clientHeight;
|
|
126
125
|
let ee;
|
|
127
|
-
e: switch (
|
|
126
|
+
e: switch (j) {
|
|
128
127
|
case "center": {
|
|
129
|
-
ee =
|
|
128
|
+
ee = U - oe / 2 + re / 2;
|
|
130
129
|
break e;
|
|
131
130
|
}
|
|
132
131
|
case "end": {
|
|
133
|
-
ee =
|
|
132
|
+
ee = U - oe + re;
|
|
134
133
|
break e;
|
|
135
134
|
}
|
|
136
135
|
default:
|
|
137
|
-
ee =
|
|
136
|
+
ee = U;
|
|
138
137
|
}
|
|
139
|
-
|
|
140
|
-
top:
|
|
141
|
-
behavior:
|
|
138
|
+
q.scrollTo({
|
|
139
|
+
top: le(ee, 0, x - oe),
|
|
140
|
+
behavior: Y
|
|
142
141
|
});
|
|
143
|
-
}, e[36] = s, e[37] =
|
|
144
|
-
const
|
|
145
|
-
let
|
|
146
|
-
e[42] !== r ? (
|
|
147
|
-
const
|
|
148
|
-
if (!
|
|
142
|
+
}, e[36] = s, e[37] = b, e[38] = S, e[39] = r, e[40] = x, e[41] = P) : P = e[41];
|
|
143
|
+
const C = P;
|
|
144
|
+
let z, D;
|
|
145
|
+
e[42] !== r ? (z = () => {
|
|
146
|
+
const g = r.current;
|
|
147
|
+
if (!g)
|
|
149
148
|
return;
|
|
150
|
-
const
|
|
151
|
-
u(
|
|
152
|
-
},
|
|
153
|
-
|
|
149
|
+
const v = Se(() => {
|
|
150
|
+
u(g.scrollTop);
|
|
151
|
+
}, Ie), T = () => {
|
|
152
|
+
d(g.clientHeight);
|
|
154
153
|
};
|
|
155
|
-
|
|
154
|
+
T(), g.addEventListener("scroll", v, {
|
|
156
155
|
passive: !0
|
|
157
156
|
});
|
|
158
|
-
const
|
|
159
|
-
return
|
|
160
|
-
|
|
157
|
+
const A = new ResizeObserver(T);
|
|
158
|
+
return A.observe(g), () => {
|
|
159
|
+
g.removeEventListener("scroll", v), v.cancel(), A.disconnect();
|
|
161
160
|
};
|
|
162
|
-
},
|
|
163
|
-
let
|
|
164
|
-
e[45] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
const
|
|
168
|
-
const [,
|
|
169
|
-
return
|
|
161
|
+
}, D = [r], e[42] = r, e[43] = z, e[44] = D) : (z = e[43], D = e[44]), K(z, D);
|
|
162
|
+
let B, V;
|
|
163
|
+
e[45] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (B = () => (_.current = new ResizeObserver((g) => {
|
|
164
|
+
const v = [];
|
|
165
|
+
g.forEach((T) => {
|
|
166
|
+
const A = T.target, $ = [...w.current.entries()].find((j) => {
|
|
167
|
+
const [, Y] = j;
|
|
168
|
+
return Y === A;
|
|
170
169
|
})?.[0];
|
|
171
|
-
|
|
172
|
-
}),
|
|
173
|
-
let
|
|
174
|
-
const
|
|
175
|
-
for (const [
|
|
176
|
-
|
|
177
|
-
return
|
|
170
|
+
$ !== void 0 && v.push([$, T.contentRect.height]);
|
|
171
|
+
}), v.length > 0 && h((T) => {
|
|
172
|
+
let A = !1;
|
|
173
|
+
const $ = new Map(T);
|
|
174
|
+
for (const [j, Y] of v)
|
|
175
|
+
T.get(j) !== Y && ($.set(j, Y), A = !0);
|
|
176
|
+
return A ? $ : T;
|
|
178
177
|
});
|
|
179
178
|
}), () => {
|
|
180
|
-
|
|
181
|
-
}),
|
|
179
|
+
_.current?.disconnect(), _.current = null;
|
|
180
|
+
}), V = [], e[45] = B, e[46] = V) : (B = e[45], V = e[46]), K(B, V);
|
|
182
181
|
let W;
|
|
183
|
-
return e[47] !==
|
|
184
|
-
virtualItems:
|
|
185
|
-
totalSize:
|
|
186
|
-
measureElement:
|
|
187
|
-
scrollToIndex:
|
|
188
|
-
}, e[47] =
|
|
182
|
+
return e[47] !== C || e[48] !== x || e[49] !== k ? (W = {
|
|
183
|
+
virtualItems: k,
|
|
184
|
+
totalSize: x,
|
|
185
|
+
measureElement: I,
|
|
186
|
+
scrollToIndex: C
|
|
187
|
+
}, e[47] = C, e[48] = x, e[49] = k, e[50] = W) : W = e[50], W;
|
|
189
188
|
};
|
|
190
|
-
function
|
|
189
|
+
function He() {
|
|
191
190
|
return /* @__PURE__ */ new Map();
|
|
192
191
|
}
|
|
193
|
-
const
|
|
192
|
+
const pt = (n) => {
|
|
194
193
|
const e = F.c(28);
|
|
195
|
-
let s, l,
|
|
196
|
-
e[0] !==
|
|
194
|
+
let s, l, o, t, r, c, i;
|
|
195
|
+
e[0] !== n ? ({
|
|
197
196
|
brand: s,
|
|
198
197
|
children: l,
|
|
199
|
-
className:
|
|
200
|
-
hasSidebar:
|
|
198
|
+
className: o,
|
|
199
|
+
hasSidebar: c,
|
|
201
200
|
navClassName: r,
|
|
202
|
-
toggleSidebar:
|
|
203
|
-
...
|
|
204
|
-
} =
|
|
205
|
-
const
|
|
201
|
+
toggleSidebar: i,
|
|
202
|
+
...t
|
|
203
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o, e[4] = t, e[5] = r, e[6] = c, e[7] = i) : (s = e[1], l = e[2], o = e[3], t = e[4], r = e[5], c = e[6], i = e[7]);
|
|
204
|
+
const a = c === void 0 ? !1 : c;
|
|
206
205
|
let u;
|
|
207
|
-
e[8] !==
|
|
208
|
-
let c;
|
|
209
|
-
e[10] !== r ? (c = z("mx-auto flex max-w-10xl items-center justify-between px-4 py-2.5", r), e[10] = r, e[11] = c) : c = e[11];
|
|
206
|
+
e[8] !== o ? (u = H("sticky top-0 z-10 max-h-15 min-h-15 bg-card", o), e[8] = o, e[9] = u) : u = e[9];
|
|
210
207
|
let f;
|
|
211
|
-
e[
|
|
212
|
-
let
|
|
213
|
-
e[
|
|
208
|
+
e[10] !== r ? (f = H("mx-auto flex max-w-10xl items-center justify-between px-4 py-2.5", r), e[10] = r, e[11] = f) : f = e[11];
|
|
209
|
+
let d;
|
|
210
|
+
e[12] !== a || e[13] !== i ? (d = a ? /* @__PURE__ */ y(ne, { "aria-label": "Open menu", "data-ox-slot": "header-toggle", variant: "ghost", onClick: i, children: /* @__PURE__ */ y(J, { icon: Pe }) }) : null, e[12] = a, e[13] = i, e[14] = d) : d = e[14];
|
|
211
|
+
let m;
|
|
212
|
+
e[15] !== s ? (m = s ? /* @__PURE__ */ y("div", { children: s }) : null, e[15] = s, e[16] = m) : m = e[16];
|
|
214
213
|
let h;
|
|
215
|
-
e[17] !==
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
] }), e[17] =
|
|
214
|
+
e[17] !== d || e[18] !== m ? (h = /* @__PURE__ */ G("div", { className: "flex items-center gap-[17px]", children: [
|
|
215
|
+
d,
|
|
216
|
+
m
|
|
217
|
+
] }), e[17] = d, e[18] = m, e[19] = h) : h = e[19];
|
|
219
218
|
let p;
|
|
220
|
-
e[20] !== l || e[21] !==
|
|
219
|
+
e[20] !== l || e[21] !== f || e[22] !== h ? (p = /* @__PURE__ */ G("nav", { className: f, children: [
|
|
221
220
|
h,
|
|
222
221
|
l
|
|
223
|
-
] }), e[20] = l, e[21] =
|
|
224
|
-
let
|
|
225
|
-
return e[24] !==
|
|
226
|
-
},
|
|
222
|
+
] }), e[20] = l, e[21] = f, e[22] = h, e[23] = p) : p = e[23];
|
|
223
|
+
let w;
|
|
224
|
+
return e[24] !== t || e[25] !== u || e[26] !== p ? (w = /* @__PURE__ */ y("header", { className: u, "data-ox-slot": "header", ...t, children: p }), e[24] = t, e[25] = u, e[26] = p, e[27] = w) : w = e[27], w;
|
|
225
|
+
}, xt = (n) => {
|
|
227
226
|
const e = F.c(22);
|
|
228
|
-
let s, l,
|
|
229
|
-
e[0] !==
|
|
227
|
+
let s, l, o, t, r, c, i;
|
|
228
|
+
e[0] !== n ? ({
|
|
230
229
|
children: s,
|
|
231
230
|
className: l,
|
|
232
|
-
color:
|
|
233
|
-
icon:
|
|
231
|
+
color: c,
|
|
232
|
+
icon: t,
|
|
234
233
|
subtitle: r,
|
|
235
|
-
title:
|
|
236
|
-
...
|
|
237
|
-
} =
|
|
238
|
-
const
|
|
239
|
-
let
|
|
240
|
-
e[8] !== l ? (
|
|
241
|
-
let
|
|
242
|
-
e[10] !==
|
|
243
|
-
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
-
|
|
246
|
-
r && /* @__PURE__ */
|
|
234
|
+
title: i,
|
|
235
|
+
...o
|
|
236
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o, e[4] = t, e[5] = r, e[6] = c, e[7] = i) : (s = e[1], l = e[2], o = e[3], t = e[4], r = e[5], c = e[6], i = e[7]);
|
|
237
|
+
const a = c === void 0 ? "purple" : c, u = i || r || t, f = u ? "main-headline" : void 0;
|
|
238
|
+
let d;
|
|
239
|
+
e[8] !== l ? (d = H("w-full p-6", l), e[8] = l, e[9] = d) : d = e[9];
|
|
240
|
+
let m;
|
|
241
|
+
e[10] !== a || e[11] !== u || e[12] !== t || e[13] !== r || e[14] !== i ? (m = u ? /* @__PURE__ */ y("div", { className: "mb-8 border-b border-border pb-6", children: /* @__PURE__ */ G("div", { className: "flex items-center gap-4", children: [
|
|
242
|
+
t ? /* @__PURE__ */ y(J.Box, { color: a, size: "2xl", children: /* @__PURE__ */ y(J, { icon: t }) }) : null,
|
|
243
|
+
/* @__PURE__ */ G("div", { children: [
|
|
244
|
+
i ? /* @__PURE__ */ y("h2", { id: "main-headline", className: "text-xl font-semibold text-foreground", "data-ox-slot": "main-headline", children: i }) : null,
|
|
245
|
+
r && /* @__PURE__ */ y("p", { className: "mt-1 text-sm", children: r })
|
|
247
246
|
] })
|
|
248
|
-
] }) }) : null, e[10] =
|
|
247
|
+
] }) }) : null, e[10] = a, e[11] = u, e[12] = t, e[13] = r, e[14] = i, e[15] = m) : m = e[15];
|
|
249
248
|
let h;
|
|
250
|
-
return e[16] !== s || e[17] !==
|
|
251
|
-
|
|
249
|
+
return e[16] !== s || e[17] !== o || e[18] !== f || e[19] !== d || e[20] !== m ? (h = /* @__PURE__ */ G("main", { "aria-labelledby": f, className: d, "data-ox-slot": "main-content", ...o, children: [
|
|
250
|
+
m,
|
|
252
251
|
s
|
|
253
|
-
] }), e[16] = s, e[17] =
|
|
254
|
-
},
|
|
252
|
+
] }), e[16] = s, e[17] = o, e[18] = f, e[19] = d, e[20] = m, e[21] = h) : h = e[21], h;
|
|
253
|
+
}, ue = "group ox-focus-ring items-center rounded-lg text-sm transition-colors text-left col-span-2 grid grid-cols-subgrid", me = "size-10 justify-center", he = "h-10 w-full px-2", pe = "bg-sidebar-accent text-sidebar-accent-foreground", Ae = "h-15", xe = te(void 0), Fe = (n) => {
|
|
255
254
|
const e = F.c(24);
|
|
256
|
-
let s, l,
|
|
257
|
-
e[0] !==
|
|
255
|
+
let s, l, o, t, r, c, i;
|
|
256
|
+
e[0] !== n ? ({
|
|
258
257
|
children: s,
|
|
259
258
|
className: l,
|
|
260
259
|
desktopCollapsed: r,
|
|
261
|
-
hasHeader:
|
|
262
|
-
mobileCollapsed:
|
|
263
|
-
onClose:
|
|
264
|
-
...
|
|
265
|
-
} =
|
|
266
|
-
const
|
|
260
|
+
hasHeader: c,
|
|
261
|
+
mobileCollapsed: i,
|
|
262
|
+
onClose: t,
|
|
263
|
+
...o
|
|
264
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o, e[4] = t, e[5] = r, e[6] = c, e[7] = i) : (s = e[1], l = e[2], o = e[3], t = e[4], r = e[5], c = e[6], i = e[7]);
|
|
265
|
+
const a = r === void 0 ? !1 : r, u = c === void 0 ? !1 : c, f = i === void 0 ? !0 : i, [d, m] = X(window.innerWidth < ae), h = d ? f : a;
|
|
267
266
|
let p;
|
|
268
|
-
e[8] !== h || e[9] !==
|
|
267
|
+
e[8] !== h || e[9] !== d ? (p = {
|
|
269
268
|
collapsed: h,
|
|
270
|
-
isMobile:
|
|
271
|
-
}, e[8] = h, e[9] =
|
|
272
|
-
const
|
|
273
|
-
let
|
|
274
|
-
e[11] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
275
|
-
const
|
|
276
|
-
|
|
269
|
+
isMobile: d
|
|
270
|
+
}, e[8] = h, e[9] = d, e[10] = p) : p = e[10];
|
|
271
|
+
const w = p;
|
|
272
|
+
let _, O;
|
|
273
|
+
e[11] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (_ = () => {
|
|
274
|
+
const S = () => {
|
|
275
|
+
m(window.innerWidth < ae);
|
|
277
276
|
};
|
|
278
|
-
return
|
|
279
|
-
window.removeEventListener("resize",
|
|
277
|
+
return S(), window.addEventListener("resize", S), () => {
|
|
278
|
+
window.removeEventListener("resize", S);
|
|
280
279
|
};
|
|
281
|
-
},
|
|
282
|
-
let
|
|
283
|
-
e[13] !== s || e[14] !== l || e[15] !==
|
|
284
|
-
|
|
280
|
+
}, O = [], e[11] = _, e[12] = O) : (_ = e[11], O = e[12]), K(_, O);
|
|
281
|
+
let b;
|
|
282
|
+
e[13] !== s || e[14] !== l || e[15] !== o || e[16] !== h || e[17] !== u || e[18] !== d || e[19] !== t ? (b = d ? /* @__PURE__ */ y(ce, { open: !h, onOpenChange: (S) => !S && t?.(), children: /* @__PURE__ */ y(ce.Content, { closeOnOutsideClick: t !== void 0, side: "left", children: /* @__PURE__ */ G("nav", { "aria-label": "Mobile navigation", className: H("flex h-screen w-full flex-col bg-sidebar", l), role: "navigation", ...o, "data-ox-slot": "sidebar", children: [
|
|
283
|
+
t ? /* @__PURE__ */ y("div", { className: H("flex h-15 items-center gap-[17px] px-4", Ae), children: /* @__PURE__ */ y(ne, { "aria-label": "Close sidebar", size: "md", variant: "ghost", onClick: t, children: /* @__PURE__ */ y(J, { icon: ze }) }) }) : null,
|
|
285
284
|
s
|
|
286
|
-
] }) }) }) : /* @__PURE__ */
|
|
285
|
+
] }) }) }) : /* @__PURE__ */ y("nav", { "aria-label": "Desktop navigation", className: H("sticky box-content flex flex-col overflow-y-auto bg-sidebar", {
|
|
287
286
|
"top-0 h-screen": !u,
|
|
288
287
|
"viewport-minus-header top-15": u,
|
|
289
288
|
'max-w-[72px] min-w-[72px] **:data-[ox-slot="sidebar-label"]:hidden': h,
|
|
290
289
|
"max-w-[256px] min-w-[256px]": !h
|
|
291
|
-
}, l), role: "navigation", ...
|
|
292
|
-
let
|
|
293
|
-
return e[21] !==
|
|
290
|
+
}, l), role: "navigation", ...o, "data-ox-slot": "sidebar", children: s }), e[13] = s, e[14] = l, e[15] = o, e[16] = h, e[17] = u, e[18] = d, e[19] = t, e[20] = b) : b = e[20];
|
|
291
|
+
let N;
|
|
292
|
+
return e[21] !== w || e[22] !== b ? (N = /* @__PURE__ */ y(xe.Provider, { value: w, children: b }), e[21] = w, e[22] = b, e[23] = N) : N = e[23], N;
|
|
294
293
|
}, Z = () => {
|
|
295
|
-
const
|
|
296
|
-
if (!
|
|
294
|
+
const n = se(xe);
|
|
295
|
+
if (!n)
|
|
297
296
|
throw new Error("useSidebar must be used within a SidebarProvider");
|
|
298
|
-
return
|
|
299
|
-
},
|
|
297
|
+
return n;
|
|
298
|
+
}, Be = (n) => {
|
|
300
299
|
const e = F.c(12);
|
|
301
|
-
let s, l,
|
|
302
|
-
e[0] !==
|
|
300
|
+
let s, l, o;
|
|
301
|
+
e[0] !== n ? ({
|
|
303
302
|
children: s,
|
|
304
303
|
className: l,
|
|
305
|
-
...
|
|
306
|
-
} =
|
|
304
|
+
...o
|
|
305
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o) : (s = e[1], l = e[2], o = e[3]);
|
|
307
306
|
const {
|
|
308
|
-
collapsed:
|
|
307
|
+
collapsed: t,
|
|
309
308
|
isMobile: r
|
|
310
|
-
} = Z(),
|
|
311
|
-
let
|
|
312
|
-
e[4] !== l || e[5] !==
|
|
313
|
-
"grid-cols-1 place-items-center":
|
|
314
|
-
"grid-cols-[auto_1fr]":
|
|
315
|
-
}, "**: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=icon]:col-start-(--ox-menu-icon-col) **:data-[ox-slot=icon]:justify-self-center", "**:data-[ox-slot=sidebar-label]:col-start-(--ox-menu-label-col)", l), e[4] = l, e[5] =
|
|
309
|
+
} = Z(), c = t && !r, i = !t || r;
|
|
310
|
+
let a;
|
|
311
|
+
e[4] !== l || e[5] !== c || e[6] !== i ? (a = H("grid flex-1 content-start gap-y-1 overflow-y-auto p-4", {
|
|
312
|
+
"grid-cols-1 place-items-center": c,
|
|
313
|
+
"grid-cols-[auto_1fr]": i
|
|
314
|
+
}, "**: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=icon]:col-start-(--ox-menu-icon-col) **:data-[ox-slot=icon]:justify-self-center", "**:data-[ox-slot=sidebar-label]:col-start-(--ox-menu-label-col)", l), e[4] = l, e[5] = c, e[6] = i, e[7] = a) : a = e[7];
|
|
316
315
|
let u;
|
|
317
|
-
return e[8] !== s || e[9] !==
|
|
318
|
-
},
|
|
316
|
+
return e[8] !== s || e[9] !== o || e[10] !== a ? (u = /* @__PURE__ */ y("div", { className: a, ...o, "data-ox-slot": "sidebar-body", children: s }), e[8] = s, e[9] = o, e[10] = a, e[11] = u) : u = e[11], u;
|
|
317
|
+
}, je = (n) => {
|
|
319
318
|
const e = F.c(18);
|
|
320
|
-
let s, l,
|
|
321
|
-
e[0] !==
|
|
322
|
-
active:
|
|
319
|
+
let s, l, o, t, r;
|
|
320
|
+
e[0] !== n ? ({
|
|
321
|
+
active: t,
|
|
323
322
|
children: s,
|
|
324
323
|
className: l,
|
|
325
324
|
disabled: r,
|
|
326
|
-
...
|
|
327
|
-
} =
|
|
328
|
-
const
|
|
329
|
-
collapsed:
|
|
330
|
-
} = Z(), u = !
|
|
331
|
-
let
|
|
332
|
-
e[6] !== l || e[7] !==
|
|
333
|
-
[
|
|
325
|
+
...o
|
|
326
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o, e[4] = t, e[5] = r) : (s = e[1], l = e[2], o = e[3], t = e[4], r = e[5]);
|
|
327
|
+
const c = t === void 0 ? !1 : t, i = r === void 0 ? !1 : r, {
|
|
328
|
+
collapsed: a
|
|
329
|
+
} = Z(), u = !a, f = c && !i;
|
|
330
|
+
let d;
|
|
331
|
+
e[6] !== l || e[7] !== a || e[8] !== i || e[9] !== u || e[10] !== f ? (d = H("enabled:cursor-pointer enabled:text-sidebar-foreground enabled:hover:bg-sidebar-accent enabled:hover:text-sidebar-accent-foreground", ue, {
|
|
332
|
+
[me]: a,
|
|
334
333
|
[he]: u,
|
|
335
|
-
[
|
|
336
|
-
"disabled:ox-default-disabled":
|
|
337
|
-
}, l), e[6] = l, e[7] =
|
|
338
|
-
const
|
|
334
|
+
[pe]: f,
|
|
335
|
+
"disabled:ox-default-disabled": i
|
|
336
|
+
}, l), e[6] = l, e[7] = a, e[8] = i, e[9] = u, e[10] = f, e[11] = d) : d = e[11];
|
|
337
|
+
const m = c ? "active" : "inactive";
|
|
339
338
|
let h;
|
|
340
|
-
return e[12] !== s || e[13] !==
|
|
341
|
-
},
|
|
339
|
+
return e[12] !== s || e[13] !== i || e[14] !== o || e[15] !== d || e[16] !== m ? (h = /* @__PURE__ */ y("button", { className: d, disabled: i, type: "button", ...o, "data-ox-slot": "sidebar-button", "data-ox-state": m, children: s }), e[12] = s, e[13] = i, e[14] = o, e[15] = d, e[16] = m, e[17] = h) : h = e[17], h;
|
|
340
|
+
}, De = (n) => {
|
|
342
341
|
const e = F.c(10);
|
|
343
|
-
let s, l,
|
|
344
|
-
e[0] !==
|
|
342
|
+
let s, l, o;
|
|
343
|
+
e[0] !== n ? ({
|
|
345
344
|
children: s,
|
|
346
345
|
className: l,
|
|
347
|
-
...
|
|
348
|
-
} =
|
|
349
|
-
let
|
|
350
|
-
e[4] !== l ? (
|
|
346
|
+
...o
|
|
347
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o) : (s = e[1], l = e[2], o = e[3]);
|
|
348
|
+
let t;
|
|
349
|
+
e[4] !== l ? (t = H("p-4", l), e[4] = l, e[5] = t) : t = e[5];
|
|
351
350
|
let r;
|
|
352
|
-
return e[6] !== s || e[7] !==
|
|
353
|
-
},
|
|
351
|
+
return e[6] !== s || e[7] !== o || e[8] !== t ? (r = /* @__PURE__ */ y("div", { className: t, ...o, "data-ox-slot": "sidebar-footer", children: s }), e[6] = s, e[7] = o, e[8] = t, e[9] = r) : r = e[9], r;
|
|
352
|
+
}, Ve = (n) => {
|
|
354
353
|
const e = F.c(17);
|
|
355
|
-
let s, l,
|
|
356
|
-
e[0] !==
|
|
354
|
+
let s, l, o, t;
|
|
355
|
+
e[0] !== n ? ({
|
|
357
356
|
children: s,
|
|
358
357
|
className: l,
|
|
359
|
-
headline:
|
|
360
|
-
...
|
|
361
|
-
} =
|
|
358
|
+
headline: t,
|
|
359
|
+
...o
|
|
360
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o, e[4] = t) : (s = e[1], l = e[2], o = e[3], t = e[4]);
|
|
362
361
|
const {
|
|
363
362
|
collapsed: r,
|
|
364
|
-
isMobile:
|
|
363
|
+
isMobile: c
|
|
365
364
|
} = Z();
|
|
366
|
-
let
|
|
367
|
-
e[5] !== l ? (
|
|
368
|
-
const
|
|
365
|
+
let i;
|
|
366
|
+
e[5] !== l ? (i = H("contents", l), e[5] = l, e[6] = i) : i = e[6];
|
|
367
|
+
const a = r && !c;
|
|
369
368
|
let u;
|
|
370
|
-
e[7] !==
|
|
371
|
-
invisible:
|
|
372
|
-
}), e[7] =
|
|
373
|
-
let c;
|
|
374
|
-
e[9] !== o || e[10] !== u ? (c = /* @__PURE__ */ g("h3", { className: u, children: o }), e[9] = o, e[10] = u, e[11] = c) : c = e[11];
|
|
369
|
+
e[7] !== a ? (u = H("col-span-full mt-4 mb-2 block cursor-default text-xs text-muted-foreground", {
|
|
370
|
+
invisible: a
|
|
371
|
+
}), e[7] = a, e[8] = u) : u = e[8];
|
|
375
372
|
let f;
|
|
376
|
-
|
|
377
|
-
|
|
373
|
+
e[9] !== t || e[10] !== u ? (f = /* @__PURE__ */ y("h3", { className: u, children: t }), e[9] = t, e[10] = u, e[11] = f) : f = e[11];
|
|
374
|
+
let d;
|
|
375
|
+
return e[12] !== s || e[13] !== o || e[14] !== i || e[15] !== f ? (d = /* @__PURE__ */ G("div", { className: i, ...o, "data-ox-slot": "sidebar-group", children: [
|
|
376
|
+
f,
|
|
378
377
|
s
|
|
379
|
-
] }), e[12] = s, e[13] =
|
|
380
|
-
},
|
|
378
|
+
] }), e[12] = s, e[13] = o, e[14] = i, e[15] = f, e[16] = d) : d = e[16], d;
|
|
379
|
+
}, Ye = (n) => {
|
|
381
380
|
const e = F.c(10);
|
|
382
|
-
let s, l,
|
|
383
|
-
e[0] !==
|
|
381
|
+
let s, l, o;
|
|
382
|
+
e[0] !== n ? ({
|
|
384
383
|
children: s,
|
|
385
384
|
className: l,
|
|
386
|
-
...
|
|
387
|
-
} =
|
|
388
|
-
let
|
|
389
|
-
e[4] !== l ? (
|
|
385
|
+
...o
|
|
386
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o) : (s = e[1], l = e[2], o = e[3]);
|
|
387
|
+
let t;
|
|
388
|
+
e[4] !== l ? (t = H("flex h-15 items-center px-4", l), e[4] = l, e[5] = t) : t = e[5];
|
|
390
389
|
let r;
|
|
391
|
-
return e[6] !== s || e[7] !==
|
|
392
|
-
},
|
|
390
|
+
return e[6] !== s || e[7] !== o || e[8] !== t ? (r = /* @__PURE__ */ y("div", { className: t, ...o, "data-ox-slot": "sidebar-header", children: s }), e[6] = s, e[7] = o, e[8] = t, e[9] = r) : r = e[9], r;
|
|
391
|
+
}, Ge = (n) => {
|
|
393
392
|
const e = F.c(17);
|
|
394
|
-
let s, l,
|
|
395
|
-
e[0] !==
|
|
393
|
+
let s, l, o, t, r, c;
|
|
394
|
+
e[0] !== n ? ({
|
|
396
395
|
children: s,
|
|
397
396
|
className: l,
|
|
398
|
-
icon:
|
|
399
|
-
path:
|
|
400
|
-
size:
|
|
397
|
+
icon: o,
|
|
398
|
+
path: t,
|
|
399
|
+
size: c,
|
|
401
400
|
...r
|
|
402
|
-
} =
|
|
403
|
-
const
|
|
404
|
-
collapsed:
|
|
405
|
-
} = Z(), u = !
|
|
406
|
-
let c;
|
|
407
|
-
e[7] !== l || e[8] !== u ? (c = z("shrink-0 text-current", {
|
|
408
|
-
"mr-2": u
|
|
409
|
-
}, l), e[7] = l, e[8] = u, e[9] = c) : c = e[9];
|
|
401
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o, e[4] = t, e[5] = r, e[6] = c) : (s = e[1], l = e[2], o = e[3], t = e[4], r = e[5], c = e[6]);
|
|
402
|
+
const i = c === void 0 ? "md" : c, {
|
|
403
|
+
collapsed: a
|
|
404
|
+
} = Z(), u = !a;
|
|
410
405
|
let f;
|
|
411
|
-
|
|
412
|
-
|
|
406
|
+
e[7] !== l || e[8] !== u ? (f = H("shrink-0 text-current", {
|
|
407
|
+
"mr-2": u
|
|
408
|
+
}, l), e[7] = l, e[8] = u, e[9] = f) : f = e[9];
|
|
409
|
+
let d;
|
|
410
|
+
return e[10] !== s || e[11] !== o || e[12] !== t || e[13] !== r || e[14] !== i || e[15] !== f ? (d = /* @__PURE__ */ y(J, { className: f, icon: o, path: t, size: i, ...r, children: s }), e[10] = s, e[11] = o, e[12] = t, e[13] = r, e[14] = i, e[15] = f, e[16] = d) : d = e[16], d;
|
|
411
|
+
}, Ue = (n) => {
|
|
413
412
|
const e = F.c(10);
|
|
414
|
-
let s, l,
|
|
415
|
-
e[0] !==
|
|
413
|
+
let s, l, o;
|
|
414
|
+
e[0] !== n ? ({
|
|
416
415
|
children: s,
|
|
417
416
|
className: l,
|
|
418
|
-
...
|
|
419
|
-
} =
|
|
420
|
-
let
|
|
421
|
-
e[4] !== l ? (
|
|
417
|
+
...o
|
|
418
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o) : (s = e[1], l = e[2], o = e[3]);
|
|
419
|
+
let t;
|
|
420
|
+
e[4] !== l ? (t = H("overflow-hidden text-ellipsis", l), e[4] = l, e[5] = t) : t = e[5];
|
|
422
421
|
let r;
|
|
423
|
-
return e[6] !== s || e[7] !==
|
|
424
|
-
},
|
|
422
|
+
return e[6] !== s || e[7] !== o || e[8] !== t ? (r = /* @__PURE__ */ y("span", { className: t, ...o, "data-ox-slot": "sidebar-label", children: s }), e[6] = s, e[7] = o, e[8] = t, e[9] = r) : r = e[9], r;
|
|
423
|
+
}, We = (n) => {
|
|
425
424
|
const e = F.c(22);
|
|
426
|
-
let s, l,
|
|
427
|
-
e[0] !==
|
|
425
|
+
let s, l, o, t, r, c;
|
|
426
|
+
e[0] !== n ? ({
|
|
428
427
|
active: r,
|
|
429
428
|
children: s,
|
|
430
429
|
className: l,
|
|
431
|
-
disabled:
|
|
432
|
-
href:
|
|
433
|
-
...
|
|
434
|
-
} =
|
|
435
|
-
const
|
|
430
|
+
disabled: c,
|
|
431
|
+
href: t,
|
|
432
|
+
...o
|
|
433
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o, e[4] = t, e[5] = r, e[6] = c) : (s = e[1], l = e[2], o = e[3], t = e[4], r = e[5], c = e[6]);
|
|
434
|
+
const i = r === void 0 ? !1 : r, a = c === void 0 ? !1 : c, {
|
|
436
435
|
collapsed: u
|
|
437
|
-
} = Z(),
|
|
436
|
+
} = Z(), f = i ? "page" : void 0, d = !u, m = i && !a, h = !i && !a;
|
|
438
437
|
let p;
|
|
439
|
-
e[7] !== l || e[8] !== u || e[9] !==
|
|
440
|
-
[
|
|
441
|
-
[he]:
|
|
442
|
-
[
|
|
438
|
+
e[7] !== l || e[8] !== u || e[9] !== a || e[10] !== d || e[11] !== m || e[12] !== h ? (p = H(ue, {
|
|
439
|
+
[me]: u,
|
|
440
|
+
[he]: d,
|
|
441
|
+
[pe]: m,
|
|
443
442
|
"cursor-pointer text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground": h,
|
|
444
|
-
"ox-default-disabled":
|
|
445
|
-
}, l), e[7] = l, e[8] = u, e[9] =
|
|
446
|
-
const
|
|
447
|
-
let
|
|
448
|
-
return e[14] !== s || e[15] !==
|
|
443
|
+
"ox-default-disabled": a
|
|
444
|
+
}, l), e[7] = l, e[8] = u, e[9] = a, e[10] = d, e[11] = m, e[12] = h, e[13] = p) : p = e[13];
|
|
445
|
+
const w = a ? void 0 : t, _ = a ? qe : void 0, O = i ? "active" : "inactive";
|
|
446
|
+
let b;
|
|
447
|
+
return e[14] !== s || e[15] !== o || e[16] !== O || e[17] !== f || e[18] !== p || e[19] !== w || e[20] !== _ ? (b = /* @__PURE__ */ y("a", { "aria-current": f, className: p, href: w, role: "link", onClick: _, ...o, "data-ox-slot": "sidebar-link", "data-ox-state": O, children: s }), e[14] = s, e[15] = o, e[16] = O, e[17] = f, e[18] = p, e[19] = w, e[20] = _, e[21] = b) : b = e[21], b;
|
|
449
448
|
};
|
|
450
|
-
function
|
|
451
|
-
return
|
|
449
|
+
function qe(n) {
|
|
450
|
+
return n.preventDefault();
|
|
452
451
|
}
|
|
453
|
-
const
|
|
454
|
-
Body:
|
|
455
|
-
Button:
|
|
456
|
-
Footer:
|
|
457
|
-
Group:
|
|
458
|
-
Header:
|
|
459
|
-
Icon:
|
|
460
|
-
Label:
|
|
461
|
-
Link:
|
|
462
|
-
}),
|
|
463
|
-
const
|
|
464
|
-
if (!
|
|
452
|
+
const bt = Object.assign(Fe, {
|
|
453
|
+
Body: Be,
|
|
454
|
+
Button: je,
|
|
455
|
+
Footer: De,
|
|
456
|
+
Group: Ve,
|
|
457
|
+
Header: Ye,
|
|
458
|
+
Icon: Ge,
|
|
459
|
+
Label: Ue,
|
|
460
|
+
Link: We
|
|
461
|
+
}), be = te(null), ie = () => {
|
|
462
|
+
const n = se(be);
|
|
463
|
+
if (!n)
|
|
465
464
|
throw new Error("EndlessList compound components must be used within OxEndlessList");
|
|
466
|
-
return
|
|
467
|
-
},
|
|
465
|
+
return n;
|
|
466
|
+
}, Ke = 5, Xe = (n) => {
|
|
468
467
|
const e = F.c(65);
|
|
469
|
-
let s, l,
|
|
470
|
-
e[0] !==
|
|
468
|
+
let s, l, o, t, r, c, i, a, u, f, d, m, h, p, w;
|
|
469
|
+
e[0] !== n ? ({
|
|
471
470
|
children: s,
|
|
472
471
|
className: l,
|
|
473
|
-
data:
|
|
472
|
+
data: o,
|
|
474
473
|
estimateSize: r,
|
|
475
|
-
gap:
|
|
476
|
-
getItemKey:
|
|
477
|
-
hasNextPage:
|
|
478
|
-
isError:
|
|
474
|
+
gap: f,
|
|
475
|
+
getItemKey: c,
|
|
476
|
+
hasNextPage: d,
|
|
477
|
+
isError: m,
|
|
479
478
|
isLoading: h,
|
|
480
479
|
loadMoreThreshold: p,
|
|
481
|
-
onLoadMore:
|
|
482
|
-
overscan:
|
|
483
|
-
renderItem:
|
|
480
|
+
onLoadMore: i,
|
|
481
|
+
overscan: w,
|
|
482
|
+
renderItem: a,
|
|
484
483
|
style: u,
|
|
485
|
-
...
|
|
486
|
-
} =
|
|
487
|
-
const
|
|
488
|
-
let
|
|
489
|
-
e[16] !==
|
|
490
|
-
count:
|
|
484
|
+
...t
|
|
485
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o, e[4] = t, e[5] = r, e[6] = c, e[7] = i, e[8] = a, e[9] = u, e[10] = f, e[11] = d, e[12] = m, e[13] = h, e[14] = p, e[15] = w) : (s = e[1], l = e[2], o = e[3], t = e[4], r = e[5], c = e[6], i = e[7], a = e[8], u = e[9], f = e[10], d = e[11], m = e[12], h = e[13], p = e[14], w = e[15]);
|
|
486
|
+
const _ = f === void 0 ? 0 : f, O = d === void 0 ? !1 : d, b = m === void 0 ? !1 : m, N = h === void 0 ? !1 : h, S = p === void 0 ? Ke : p, x = w === void 0 ? 5 : w, E = Q(null);
|
|
487
|
+
let L;
|
|
488
|
+
e[16] !== o.length || e[17] !== r || e[18] !== _ || e[19] !== x ? (L = {
|
|
489
|
+
count: o.length,
|
|
491
490
|
estimateSize: r,
|
|
492
|
-
scrollRef:
|
|
493
|
-
overscan:
|
|
494
|
-
gap:
|
|
495
|
-
}, e[16] =
|
|
491
|
+
scrollRef: E,
|
|
492
|
+
overscan: x,
|
|
493
|
+
gap: _
|
|
494
|
+
}, e[16] = o.length, e[17] = r, e[18] = _, e[19] = x, e[20] = L) : L = e[20];
|
|
496
495
|
const {
|
|
497
|
-
measureElement:
|
|
498
|
-
totalSize:
|
|
499
|
-
virtualItems:
|
|
500
|
-
} =
|
|
501
|
-
let
|
|
502
|
-
e[21] !==
|
|
503
|
-
const
|
|
504
|
-
let
|
|
505
|
-
e[23] !==
|
|
506
|
-
if (
|
|
496
|
+
measureElement: R,
|
|
497
|
+
totalSize: k,
|
|
498
|
+
virtualItems: M
|
|
499
|
+
} = Re(L);
|
|
500
|
+
let I;
|
|
501
|
+
e[21] !== M ? (I = M.at(-1), e[21] = M, e[22] = I) : I = e[22];
|
|
502
|
+
const P = I;
|
|
503
|
+
let C, z;
|
|
504
|
+
e[23] !== o.length || e[24] !== O || e[25] !== b || e[26] !== N || e[27] !== P || e[28] !== S || e[29] !== i ? (z = () => {
|
|
505
|
+
if (!P)
|
|
507
506
|
return;
|
|
508
|
-
|
|
509
|
-
},
|
|
510
|
-
let
|
|
511
|
-
e[32] !==
|
|
512
|
-
isLoading:
|
|
513
|
-
isError:
|
|
514
|
-
hasNextPage:
|
|
515
|
-
itemCount:
|
|
516
|
-
onRetry:
|
|
517
|
-
}, e[32] =
|
|
518
|
-
const
|
|
519
|
-
let
|
|
520
|
-
e[38] !== l ? (
|
|
507
|
+
P.index >= o.length - S && O && !N && !b && i && i();
|
|
508
|
+
}, C = [P, o.length, O, N, b, S, i], e[23] = o.length, e[24] = O, e[25] = b, e[26] = N, e[27] = P, e[28] = S, e[29] = i, e[30] = C, e[31] = z) : (C = e[30], z = e[31]), K(z, C);
|
|
509
|
+
let D;
|
|
510
|
+
e[32] !== o.length || e[33] !== O || e[34] !== b || e[35] !== N || e[36] !== i ? (D = {
|
|
511
|
+
isLoading: N,
|
|
512
|
+
isError: b,
|
|
513
|
+
hasNextPage: O,
|
|
514
|
+
itemCount: o.length,
|
|
515
|
+
onRetry: i
|
|
516
|
+
}, e[32] = o.length, e[33] = O, e[34] = b, e[35] = N, e[36] = i, e[37] = D) : D = e[37];
|
|
517
|
+
const B = D;
|
|
518
|
+
let V;
|
|
519
|
+
e[38] !== l ? (V = H("relative overflow-auto", l), e[38] = l, e[39] = V) : V = e[39];
|
|
521
520
|
let W;
|
|
522
|
-
e[40] !==
|
|
523
|
-
height:
|
|
524
|
-
}, e[40] =
|
|
525
|
-
let
|
|
526
|
-
if (e[42] !==
|
|
527
|
-
let
|
|
528
|
-
e[48] !==
|
|
529
|
-
const
|
|
530
|
-
return /* @__PURE__ */
|
|
521
|
+
e[40] !== k ? (W = {
|
|
522
|
+
height: k
|
|
523
|
+
}, e[40] = k, e[41] = W) : W = e[41];
|
|
524
|
+
let g;
|
|
525
|
+
if (e[42] !== o || e[43] !== c || e[44] !== R || e[45] !== a || e[46] !== M) {
|
|
526
|
+
let $;
|
|
527
|
+
e[48] !== o || e[49] !== c || e[50] !== R || e[51] !== a ? ($ = (j) => {
|
|
528
|
+
const Y = o[j.index], q = c(Y, j.index);
|
|
529
|
+
return /* @__PURE__ */ y("div", { "data-index": j.index, "data-ox-slot": "endless-list-item", ref: R(j.index), style: {
|
|
531
530
|
position: "absolute",
|
|
532
531
|
top: 0,
|
|
533
532
|
left: 0,
|
|
534
533
|
width: "100%",
|
|
535
|
-
transform: `translateY(${
|
|
536
|
-
}, children:
|
|
537
|
-
}, e[48] =
|
|
534
|
+
transform: `translateY(${j.start}px)`
|
|
535
|
+
}, children: a(Y, j.index) }, q);
|
|
536
|
+
}, e[48] = o, e[49] = c, e[50] = R, e[51] = a, e[52] = $) : $ = e[52], g = M.map($), e[42] = o, e[43] = c, e[44] = R, e[45] = a, e[46] = M, e[47] = g;
|
|
538
537
|
} else
|
|
539
|
-
|
|
540
|
-
let
|
|
541
|
-
e[53] !== W || e[54] !==
|
|
542
|
-
let
|
|
543
|
-
e[56] !== s || e[57] !==
|
|
544
|
-
|
|
538
|
+
g = e[47];
|
|
539
|
+
let v;
|
|
540
|
+
e[53] !== W || e[54] !== g ? (v = /* @__PURE__ */ y("div", { className: "relative w-full", style: W, children: g }), e[53] = W, e[54] = g, e[55] = v) : v = e[55];
|
|
541
|
+
let T;
|
|
542
|
+
e[56] !== s || e[57] !== t || e[58] !== u || e[59] !== V || e[60] !== v ? (T = /* @__PURE__ */ G("div", { className: V, "data-ox-slot": "endless-list", ref: E, style: u, ...t, children: [
|
|
543
|
+
v,
|
|
545
544
|
s
|
|
546
|
-
] }), e[56] = s, e[57] =
|
|
547
|
-
let
|
|
548
|
-
return e[62] !==
|
|
549
|
-
},
|
|
545
|
+
] }), e[56] = s, e[57] = t, e[58] = u, e[59] = V, e[60] = v, e[61] = T) : T = e[61];
|
|
546
|
+
let A;
|
|
547
|
+
return e[62] !== B || e[63] !== T ? (A = /* @__PURE__ */ y(be.Provider, { value: B, children: T }), e[62] = B, e[63] = T, e[64] = A) : A = e[64], A;
|
|
548
|
+
}, Je = (n) => {
|
|
550
549
|
const e = F.c(10);
|
|
551
|
-
let s, l,
|
|
552
|
-
e[0] !==
|
|
550
|
+
let s, l, o;
|
|
551
|
+
e[0] !== n ? ({
|
|
553
552
|
children: s,
|
|
554
553
|
className: l,
|
|
555
|
-
...
|
|
556
|
-
} =
|
|
554
|
+
...o
|
|
555
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o) : (s = e[1], l = e[2], o = e[3]);
|
|
557
556
|
const {
|
|
558
|
-
isLoading:
|
|
557
|
+
isLoading: t,
|
|
559
558
|
itemCount: r
|
|
560
559
|
} = ie();
|
|
561
|
-
if (r > 0 ||
|
|
560
|
+
if (r > 0 || t)
|
|
562
561
|
return null;
|
|
562
|
+
let c;
|
|
563
|
+
e[4] !== l ? (c = H("flex items-center justify-center py-8 text-muted-foreground", l), e[4] = l, e[5] = c) : c = e[5];
|
|
564
|
+
const i = s ?? "No items to display";
|
|
563
565
|
let a;
|
|
564
|
-
e[
|
|
565
|
-
|
|
566
|
-
let d;
|
|
567
|
-
return e[6] !== t || e[7] !== a || e[8] !== n ? (d = /* @__PURE__ */ g("div", { className: a, "data-ox-slot": "endless-list-empty", ...t, children: n }), e[6] = t, e[7] = a, e[8] = n, e[9] = d) : d = e[9], d;
|
|
568
|
-
}, Ke = (i) => {
|
|
566
|
+
return e[6] !== o || e[7] !== c || e[8] !== i ? (a = /* @__PURE__ */ y("div", { className: c, "data-ox-slot": "endless-list-empty", ...o, children: i }), e[6] = o, e[7] = c, e[8] = i, e[9] = a) : a = e[9], a;
|
|
567
|
+
}, Qe = (n) => {
|
|
569
568
|
const e = F.c(14);
|
|
570
|
-
let s, l,
|
|
571
|
-
e[0] !==
|
|
569
|
+
let s, l, o, t;
|
|
570
|
+
e[0] !== n ? ({
|
|
572
571
|
children: s,
|
|
573
572
|
className: l,
|
|
574
|
-
onRetry:
|
|
575
|
-
...
|
|
576
|
-
} =
|
|
573
|
+
onRetry: t,
|
|
574
|
+
...o
|
|
575
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o, e[4] = t) : (s = e[1], l = e[2], o = e[3], t = e[4]);
|
|
577
576
|
const {
|
|
578
577
|
isError: r,
|
|
579
|
-
onRetry:
|
|
578
|
+
onRetry: c
|
|
580
579
|
} = ie();
|
|
581
580
|
if (!r)
|
|
582
581
|
return null;
|
|
583
|
-
const
|
|
584
|
-
let
|
|
585
|
-
e[5] !== l ? (
|
|
582
|
+
const i = t ?? c;
|
|
583
|
+
let a;
|
|
584
|
+
e[5] !== l ? (a = H("sticky bottom-0 flex flex-col items-center justify-center gap-2 bg-background/80 py-4 backdrop-blur-sm", l), e[5] = l, e[6] = a) : a = e[6];
|
|
586
585
|
let u;
|
|
587
|
-
e[7] !== s || e[8] !==
|
|
588
|
-
/* @__PURE__ */
|
|
589
|
-
|
|
590
|
-
] }), e[7] = s, e[8] =
|
|
591
|
-
let
|
|
592
|
-
return e[10] !==
|
|
593
|
-
},
|
|
586
|
+
e[7] !== s || e[8] !== i ? (u = s ?? /* @__PURE__ */ G(we, { children: [
|
|
587
|
+
/* @__PURE__ */ y("span", { className: "text-sm text-destructive", children: "Failed to load items" }),
|
|
588
|
+
i && /* @__PURE__ */ y(ne, { size: "sm", variant: "secondary", onClick: i, children: "Retry" })
|
|
589
|
+
] }), e[7] = s, e[8] = i, e[9] = u) : u = e[9];
|
|
590
|
+
let f;
|
|
591
|
+
return e[10] !== o || e[11] !== a || e[12] !== u ? (f = /* @__PURE__ */ y("div", { className: a, "data-ox-slot": "endless-list-error", ...o, children: u }), e[10] = o, e[11] = a, e[12] = u, e[13] = f) : f = e[13], f;
|
|
592
|
+
}, Ze = (n) => {
|
|
594
593
|
const e = F.c(12);
|
|
595
|
-
let s, l,
|
|
596
|
-
e[0] !==
|
|
594
|
+
let s, l, o;
|
|
595
|
+
e[0] !== n ? ({
|
|
597
596
|
children: s,
|
|
598
597
|
className: l,
|
|
599
|
-
...
|
|
600
|
-
} =
|
|
598
|
+
...o
|
|
599
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o) : (s = e[1], l = e[2], o = e[3]);
|
|
601
600
|
const {
|
|
602
|
-
hasNextPage:
|
|
601
|
+
hasNextPage: t,
|
|
603
602
|
isLoading: r
|
|
604
603
|
} = ie();
|
|
605
|
-
if (!r || !
|
|
604
|
+
if (!r || !t)
|
|
606
605
|
return null;
|
|
606
|
+
let c;
|
|
607
|
+
e[4] !== l ? (c = H("sticky bottom-0 flex items-center justify-center bg-background/80 py-4 backdrop-blur-sm", l), e[4] = l, e[5] = c) : c = e[5];
|
|
608
|
+
let i;
|
|
609
|
+
e[6] !== s ? (i = s ?? /* @__PURE__ */ y(Ne, { size: "md" }), e[6] = s, e[7] = i) : i = e[7];
|
|
607
610
|
let a;
|
|
608
|
-
e[
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
},
|
|
614
|
-
|
|
615
|
-
Error: Ke,
|
|
616
|
-
Loader: Ue
|
|
617
|
-
}), pe = le(void 0), qe = (i, e, s, l, t) => {
|
|
618
|
-
let o = 0, r = 0;
|
|
611
|
+
return e[8] !== o || e[9] !== c || e[10] !== i ? (a = /* @__PURE__ */ y("div", { className: c, "data-ox-slot": "endless-list-loader", ...o, children: i }), e[8] = o, e[9] = c, e[10] = i, e[11] = a) : a = e[11], a;
|
|
612
|
+
}, vt = Object.assign(Xe, {
|
|
613
|
+
Empty: Je,
|
|
614
|
+
Error: Qe,
|
|
615
|
+
Loader: Ze
|
|
616
|
+
}), ve = te(void 0), et = (n, e, s, l, o) => {
|
|
617
|
+
let t = 0, r = 0;
|
|
619
618
|
switch (s) {
|
|
620
619
|
case "top":
|
|
621
|
-
|
|
620
|
+
t = n.left, r = n.top - e.height - o;
|
|
622
621
|
break;
|
|
623
622
|
case "bottom":
|
|
624
|
-
|
|
623
|
+
t = n.left, r = n.bottom + o;
|
|
625
624
|
break;
|
|
626
625
|
case "left":
|
|
627
|
-
|
|
626
|
+
t = n.left - e.width - o, r = n.top;
|
|
628
627
|
break;
|
|
629
628
|
case "right":
|
|
630
|
-
|
|
629
|
+
t = n.right + o, r = n.top;
|
|
631
630
|
break;
|
|
632
631
|
}
|
|
633
632
|
if (s === "top" || s === "bottom")
|
|
@@ -635,10 +634,10 @@ const ct = Object.assign($e, {
|
|
|
635
634
|
case "start":
|
|
636
635
|
break;
|
|
637
636
|
case "center":
|
|
638
|
-
|
|
637
|
+
t = n.left + (n.width - e.width) / 2;
|
|
639
638
|
break;
|
|
640
639
|
case "end":
|
|
641
|
-
|
|
640
|
+
t = n.right - e.width;
|
|
642
641
|
break;
|
|
643
642
|
}
|
|
644
643
|
else if (s === "left" || s === "right")
|
|
@@ -646,197 +645,360 @@ const ct = Object.assign($e, {
|
|
|
646
645
|
case "start":
|
|
647
646
|
break;
|
|
648
647
|
case "center":
|
|
649
|
-
r =
|
|
648
|
+
r = n.top + (n.height - e.height) / 2;
|
|
650
649
|
break;
|
|
651
650
|
case "end":
|
|
652
|
-
r =
|
|
651
|
+
r = n.bottom - e.height;
|
|
653
652
|
break;
|
|
654
653
|
}
|
|
655
654
|
return {
|
|
656
|
-
x:
|
|
655
|
+
x: t,
|
|
657
656
|
y: r
|
|
658
657
|
};
|
|
659
|
-
},
|
|
660
|
-
align:
|
|
658
|
+
}, tt = ({
|
|
659
|
+
align: n = "center",
|
|
661
660
|
animationDuration: e = 0,
|
|
662
661
|
ariaHaspopup: s,
|
|
663
662
|
children: l,
|
|
664
|
-
defaultOpen:
|
|
665
|
-
disabled:
|
|
663
|
+
defaultOpen: o = !1,
|
|
664
|
+
disabled: t = !1,
|
|
666
665
|
hoverDelay: r = 0,
|
|
667
|
-
id:
|
|
668
|
-
offset:
|
|
669
|
-
onOpenChange:
|
|
666
|
+
id: c,
|
|
667
|
+
offset: i = 8,
|
|
668
|
+
onOpenChange: a,
|
|
670
669
|
open: u,
|
|
671
|
-
position:
|
|
672
|
-
trigger:
|
|
673
|
-
useAriaControls:
|
|
670
|
+
position: f = "top",
|
|
671
|
+
trigger: d = "hover",
|
|
672
|
+
useAriaControls: m = !0
|
|
674
673
|
}) => {
|
|
675
|
-
const h =
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
}, e)) : (
|
|
679
|
-
}, [
|
|
680
|
-
if (!
|
|
681
|
-
const
|
|
674
|
+
const h = _e(), [p, w] = X(o), [_, O] = X(!1), [b, N] = X(!1), S = Q(null), x = Q(null), E = Q(null), L = u !== void 0, k = t ? !1 : L ? u : p, M = c || h, I = de((C) => {
|
|
675
|
+
t || (!C && k ? (O(!0), setTimeout(() => {
|
|
676
|
+
a?.(!1), L || w(!1), O(!1);
|
|
677
|
+
}, e)) : (a?.(C), L || w(C)));
|
|
678
|
+
}, [t, L, a, k, e]), P = de(() => {
|
|
679
|
+
if (!S.current || !x.current || !k) return;
|
|
680
|
+
const C = S.current.getBoundingClientRect(), z = x.current.getBoundingClientRect(), D = {
|
|
682
681
|
width: window.innerWidth,
|
|
683
682
|
height: window.innerHeight
|
|
684
683
|
};
|
|
685
|
-
let
|
|
686
|
-
|
|
687
|
-
const
|
|
688
|
-
|
|
689
|
-
}, [
|
|
690
|
-
return
|
|
691
|
-
|
|
692
|
-
}, [
|
|
693
|
-
|
|
694
|
-
}, []),
|
|
695
|
-
if (!
|
|
696
|
-
const
|
|
697
|
-
|
|
684
|
+
let B = f;
|
|
685
|
+
f === "top" && C.top < z.height + i ? B = "bottom" : f === "bottom" && C.bottom + z.height + i > D.height ? B = "top" : f === "left" && C.left < z.width + i ? B = "right" : f === "right" && C.right + z.width + i > D.width && (B = "left");
|
|
686
|
+
const V = et(C, z, B, n, i);
|
|
687
|
+
x.current && (x.current.style.left = `${V.x}px`, x.current.style.top = `${V.y}px`, x.current.style.visibility = "visible", x.current.dataset.oxSide = B, N(!0));
|
|
688
|
+
}, [k, f, n, i]);
|
|
689
|
+
return K(() => {
|
|
690
|
+
k || N(!1);
|
|
691
|
+
}, [k]), K(() => () => {
|
|
692
|
+
E.current && clearTimeout(E.current);
|
|
693
|
+
}, []), K(() => {
|
|
694
|
+
if (!k || d !== "click") return;
|
|
695
|
+
const C = (z) => {
|
|
696
|
+
S.current && !S.current.contains(z.target) && x.current && !x.current.contains(z.target) && I(!1);
|
|
698
697
|
};
|
|
699
|
-
return document.addEventListener("mousedown",
|
|
700
|
-
}, [
|
|
701
|
-
if (
|
|
698
|
+
return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
|
|
699
|
+
}, [k, I, d]), K(() => {
|
|
700
|
+
if (k) {
|
|
702
701
|
requestAnimationFrame(() => {
|
|
703
|
-
|
|
702
|
+
P();
|
|
704
703
|
});
|
|
705
|
-
const
|
|
706
|
-
return window.addEventListener("resize",
|
|
707
|
-
window.removeEventListener("resize",
|
|
704
|
+
const C = () => P(), z = () => P();
|
|
705
|
+
return window.addEventListener("resize", C), window.addEventListener("scroll", z, !0), () => {
|
|
706
|
+
window.removeEventListener("resize", C), window.removeEventListener("scroll", z, !0);
|
|
708
707
|
};
|
|
709
708
|
}
|
|
710
|
-
}, [
|
|
709
|
+
}, [k, f, n, i, P]), /* @__PURE__ */ y(ve.Provider, { value: {
|
|
711
710
|
ariaHaspopup: s,
|
|
712
|
-
closing:
|
|
713
|
-
contentRef:
|
|
714
|
-
disabled:
|
|
711
|
+
closing: _,
|
|
712
|
+
contentRef: x,
|
|
713
|
+
disabled: t,
|
|
715
714
|
hoverDelay: r,
|
|
716
|
-
hoverTimeoutRef:
|
|
717
|
-
id:
|
|
718
|
-
isPositioned:
|
|
719
|
-
open:
|
|
720
|
-
setOpen:
|
|
721
|
-
trigger:
|
|
722
|
-
triggerRef:
|
|
723
|
-
useAriaControls:
|
|
715
|
+
hoverTimeoutRef: E,
|
|
716
|
+
id: M,
|
|
717
|
+
isPositioned: b,
|
|
718
|
+
open: k,
|
|
719
|
+
setOpen: I,
|
|
720
|
+
trigger: d,
|
|
721
|
+
triggerRef: S,
|
|
722
|
+
useAriaControls: m
|
|
724
723
|
}, children: l });
|
|
725
724
|
};
|
|
726
|
-
function
|
|
727
|
-
const
|
|
728
|
-
if (
|
|
725
|
+
function ge() {
|
|
726
|
+
const n = se(ve);
|
|
727
|
+
if (n === void 0)
|
|
729
728
|
throw new Error("Floating components must be used within an OxFloating provider");
|
|
730
|
-
return
|
|
729
|
+
return n;
|
|
731
730
|
}
|
|
732
|
-
const
|
|
731
|
+
const st = (n) => n ? "open" : "closed", ot = (n) => {
|
|
733
732
|
const e = F.c(19);
|
|
734
|
-
let s, l,
|
|
735
|
-
e[0] !==
|
|
733
|
+
let s, l, o, t, r;
|
|
734
|
+
e[0] !== n ? ({
|
|
736
735
|
children: s,
|
|
737
736
|
className: l,
|
|
738
737
|
portal: r,
|
|
739
|
-
style:
|
|
740
|
-
...
|
|
741
|
-
} =
|
|
742
|
-
const
|
|
743
|
-
closing:
|
|
744
|
-
contentRef:
|
|
738
|
+
style: t,
|
|
739
|
+
...o
|
|
740
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o, e[4] = t, e[5] = r) : (s = e[1], l = e[2], o = e[3], t = e[4], r = e[5]);
|
|
741
|
+
const c = r === void 0 ? !0 : r, {
|
|
742
|
+
closing: i,
|
|
743
|
+
contentRef: a,
|
|
745
744
|
id: u,
|
|
746
|
-
isPositioned:
|
|
747
|
-
open:
|
|
748
|
-
} =
|
|
749
|
-
let
|
|
750
|
-
e[6] !== s || e[7] !== l || e[8] !==
|
|
751
|
-
...
|
|
752
|
-
visibility:
|
|
753
|
-
}, ...
|
|
754
|
-
const h =
|
|
745
|
+
isPositioned: f,
|
|
746
|
+
open: d
|
|
747
|
+
} = ge();
|
|
748
|
+
let m;
|
|
749
|
+
e[6] !== s || e[7] !== l || e[8] !== i || e[9] !== a || e[10] !== o || e[11] !== u || e[12] !== f || e[13] !== d || e[14] !== t ? (m = d || i ? /* @__PURE__ */ y("div", { id: u, "aria-hidden": !d && !i, className: H("fixed z-50", l), "data-ox-slot": "floating-content", "data-ox-state": i ? "closing" : st(d), ref: a, style: {
|
|
750
|
+
...t,
|
|
751
|
+
visibility: f ? "visible" : "hidden"
|
|
752
|
+
}, ...o, children: s }) : null, e[6] = s, e[7] = l, e[8] = i, e[9] = a, e[10] = o, e[11] = u, e[12] = f, e[13] = d, e[14] = t, e[15] = m) : m = e[15];
|
|
753
|
+
const h = m;
|
|
755
754
|
let p;
|
|
756
|
-
return e[16] !== h || e[17] !==
|
|
757
|
-
},
|
|
755
|
+
return e[16] !== h || e[17] !== c ? (p = c && typeof document < "u" ? fe(h, document.body) : h, e[16] = h, e[17] = c, e[18] = p) : p = e[18], p;
|
|
756
|
+
}, lt = Ee("OxFloatingTrigger", "div"), nt = (n) => {
|
|
758
757
|
const e = F.c(47);
|
|
759
|
-
let s, l,
|
|
760
|
-
e[0] !==
|
|
761
|
-
|
|
762
|
-
children:
|
|
763
|
-
className:
|
|
758
|
+
let s, l, o, t;
|
|
759
|
+
e[0] !== n ? ({
|
|
760
|
+
asSlot: t,
|
|
761
|
+
children: s,
|
|
762
|
+
className: l,
|
|
764
763
|
...o
|
|
765
|
-
} =
|
|
766
|
-
const {
|
|
767
|
-
ariaHaspopup:
|
|
768
|
-
hoverDelay:
|
|
769
|
-
hoverTimeoutRef:
|
|
770
|
-
id:
|
|
771
|
-
open:
|
|
772
|
-
setOpen:
|
|
773
|
-
trigger:
|
|
774
|
-
triggerRef:
|
|
775
|
-
useAriaControls:
|
|
776
|
-
} =
|
|
777
|
-
let
|
|
778
|
-
e[5] !==
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
},
|
|
782
|
-
}, e[5] =
|
|
783
|
-
const
|
|
764
|
+
} = n, e[0] = n, e[1] = s, e[2] = l, e[3] = o, e[4] = t) : (s = e[1], l = e[2], o = e[3], t = e[4]);
|
|
765
|
+
const r = t === void 0 ? !1 : t, {
|
|
766
|
+
ariaHaspopup: c,
|
|
767
|
+
hoverDelay: i,
|
|
768
|
+
hoverTimeoutRef: a,
|
|
769
|
+
id: u,
|
|
770
|
+
open: f,
|
|
771
|
+
setOpen: d,
|
|
772
|
+
trigger: m,
|
|
773
|
+
triggerRef: h,
|
|
774
|
+
useAriaControls: p
|
|
775
|
+
} = ge();
|
|
776
|
+
let w;
|
|
777
|
+
e[5] !== i || e[6] !== a || e[7] !== d || e[8] !== m ? (w = () => {
|
|
778
|
+
m === "hover" && (a.current && clearTimeout(a.current), i > 0 ? a.current = globalThis.setTimeout(() => {
|
|
779
|
+
d(!0);
|
|
780
|
+
}, i) : d(!0));
|
|
781
|
+
}, e[5] = i, e[6] = a, e[7] = d, e[8] = m, e[9] = w) : w = e[9];
|
|
782
|
+
const _ = w;
|
|
783
|
+
let O;
|
|
784
|
+
e[10] !== a || e[11] !== d || e[12] !== m ? (O = () => {
|
|
785
|
+
m === "hover" && (a.current && (clearTimeout(a.current), a.current = null), d(!1));
|
|
786
|
+
}, e[10] = a, e[11] = d, e[12] = m, e[13] = O) : O = e[13];
|
|
787
|
+
const b = O;
|
|
788
|
+
let N;
|
|
789
|
+
e[14] !== f || e[15] !== d || e[16] !== m ? (N = () => {
|
|
790
|
+
m === "click" && d(!f);
|
|
791
|
+
}, e[14] = f, e[15] = d, e[16] = m, e[17] = N) : N = e[17];
|
|
792
|
+
const S = N;
|
|
793
|
+
let x;
|
|
794
|
+
e[18] !== d || e[19] !== m ? (x = () => {
|
|
795
|
+
m === "focus" && d(!0);
|
|
796
|
+
}, e[18] = d, e[19] = m, e[20] = x) : x = e[20];
|
|
797
|
+
const E = x;
|
|
798
|
+
let L;
|
|
799
|
+
e[21] !== d || e[22] !== m ? (L = () => {
|
|
800
|
+
m === "focus" && d(!1);
|
|
801
|
+
}, e[21] = d, e[22] = m, e[23] = L) : L = e[23];
|
|
802
|
+
const R = L, k = p && f ? u : void 0, M = !p && f ? u : void 0, I = p ? f : void 0, P = f ? "open" : "closed";
|
|
784
803
|
let C;
|
|
785
|
-
e[
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
e[14] !== u || e[15] !== c || e[16] !== f ? (v = () => {
|
|
791
|
-
f === "click" && c(!u);
|
|
792
|
-
}, e[14] = u, e[15] = c, e[16] = f, e[17] = v) : v = e[17];
|
|
793
|
-
const P = v;
|
|
794
|
-
let y;
|
|
795
|
-
e[18] !== c || e[19] !== f ? (y = () => {
|
|
796
|
-
f === "focus" && c(!0);
|
|
797
|
-
}, e[18] = c, e[19] = f, e[20] = y) : y = e[20];
|
|
798
|
-
const k = y;
|
|
799
|
-
let j;
|
|
800
|
-
e[21] !== c || e[22] !== f ? (j = () => {
|
|
801
|
-
f === "focus" && c(!1);
|
|
802
|
-
}, e[21] = c, e[22] = f, e[23] = j) : j = e[23];
|
|
803
|
-
const _ = j, D = h && u ? d : void 0, T = !h && u ? d : void 0, R = h ? u : void 0, V = u ? "open" : "closed";
|
|
804
|
-
let $;
|
|
805
|
-
e[24] !== r || e[25] !== o || e[26] !== _ || e[27] !== P || e[28] !== k || e[29] !== O || e[30] !== L || e[31] !== D || e[32] !== T || e[33] !== R || e[34] !== V || e[35] !== x ? ($ = {
|
|
806
|
-
"aria-controls": D,
|
|
807
|
-
"aria-describedby": T,
|
|
808
|
-
"aria-expanded": R,
|
|
809
|
-
"aria-haspopup": r,
|
|
804
|
+
e[24] !== c || e[25] !== o || e[26] !== R || e[27] !== S || e[28] !== E || e[29] !== _ || e[30] !== b || e[31] !== P || e[32] !== k || e[33] !== M || e[34] !== I || e[35] !== h ? (C = {
|
|
805
|
+
"aria-controls": k,
|
|
806
|
+
"aria-describedby": M,
|
|
807
|
+
"aria-expanded": I,
|
|
808
|
+
"aria-haspopup": c,
|
|
810
809
|
"data-ox-slot": "floating-trigger",
|
|
811
|
-
"data-ox-state":
|
|
812
|
-
ref:
|
|
813
|
-
onBlur:
|
|
814
|
-
onClick:
|
|
815
|
-
onFocus:
|
|
816
|
-
onMouseEnter:
|
|
817
|
-
onMouseLeave:
|
|
810
|
+
"data-ox-state": P,
|
|
811
|
+
ref: h,
|
|
812
|
+
onBlur: R,
|
|
813
|
+
onClick: S,
|
|
814
|
+
onFocus: E,
|
|
815
|
+
onMouseEnter: _,
|
|
816
|
+
onMouseLeave: b,
|
|
818
817
|
...o
|
|
819
|
-
}, e[24] =
|
|
820
|
-
const
|
|
821
|
-
if (
|
|
822
|
-
let
|
|
823
|
-
return e[37] !==
|
|
818
|
+
}, e[24] = c, e[25] = o, e[26] = R, e[27] = S, e[28] = E, e[29] = _, e[30] = b, e[31] = P, e[32] = k, e[33] = M, e[34] = I, e[35] = h, e[36] = C) : C = e[36];
|
|
819
|
+
const z = C;
|
|
820
|
+
if (r) {
|
|
821
|
+
let V;
|
|
822
|
+
return e[37] !== s || e[38] !== l || e[39] !== z ? (V = /* @__PURE__ */ y(lt, { className: l, ...z, children: s }), e[37] = s, e[38] = l, e[39] = z, e[40] = V) : V = e[40], V;
|
|
824
823
|
}
|
|
825
|
-
let
|
|
826
|
-
e[41] !==
|
|
824
|
+
let D;
|
|
825
|
+
e[41] !== l ? (D = H("w-full", l), e[41] = l, e[42] = D) : D = e[42];
|
|
827
826
|
let B;
|
|
828
|
-
return e[43] !==
|
|
829
|
-
},
|
|
830
|
-
Content:
|
|
831
|
-
Trigger:
|
|
832
|
-
})
|
|
827
|
+
return e[43] !== s || e[44] !== D || e[45] !== z ? (B = /* @__PURE__ */ y("div", { className: D, ...z, children: s }), e[43] = s, e[44] = D, e[45] = z, e[46] = B) : B = e[46], B;
|
|
828
|
+
}, gt = Object.assign(tt, {
|
|
829
|
+
Content: ot,
|
|
830
|
+
Trigger: nt
|
|
831
|
+
}), ye = te(null), yt = (n) => {
|
|
832
|
+
const e = F.c(15), {
|
|
833
|
+
align: s,
|
|
834
|
+
children: l,
|
|
835
|
+
maxToasts: o,
|
|
836
|
+
position: t
|
|
837
|
+
} = n, r = s === void 0 ? "right" : s, c = o === void 0 ? 3 : o, i = t === void 0 ? "top" : t;
|
|
838
|
+
let a;
|
|
839
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = [], e[0] = a) : a = e[0];
|
|
840
|
+
const [u, f] = X(a);
|
|
841
|
+
let d;
|
|
842
|
+
e[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = (x) => {
|
|
843
|
+
f((E) => E.map((L) => L.id === x ? {
|
|
844
|
+
...L,
|
|
845
|
+
isRemoving: !0
|
|
846
|
+
} : L)), setTimeout(() => {
|
|
847
|
+
f((E) => Le(E, (L) => L.id === x));
|
|
848
|
+
}, 200);
|
|
849
|
+
}, e[1] = d) : d = e[1];
|
|
850
|
+
const m = d;
|
|
851
|
+
let h;
|
|
852
|
+
e[2] !== c ? (h = (x, E, L, R) => {
|
|
853
|
+
const k = Ce(), M = L?.duration ?? 5e3, I = {
|
|
854
|
+
id: k,
|
|
855
|
+
title: x,
|
|
856
|
+
type: E,
|
|
857
|
+
duration: M,
|
|
858
|
+
description: L?.description,
|
|
859
|
+
icon: L?.icon,
|
|
860
|
+
color: L?.color,
|
|
861
|
+
customContent: R
|
|
862
|
+
};
|
|
863
|
+
return f((P) => Te([I, ...P], c)), M > 0 && setTimeout(() => {
|
|
864
|
+
m(k);
|
|
865
|
+
}, M), k;
|
|
866
|
+
}, e[2] = c, e[3] = h) : h = e[3];
|
|
867
|
+
const p = h;
|
|
868
|
+
let w;
|
|
869
|
+
e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = (x) => {
|
|
870
|
+
x ? m(x) : f([]);
|
|
871
|
+
}, e[4] = w) : w = e[4];
|
|
872
|
+
const _ = w;
|
|
873
|
+
let O;
|
|
874
|
+
e[5] !== p ? (O = Object.assign((x, E) => p(x, "default", E), {
|
|
875
|
+
success: (x, E) => p(x, "success", E),
|
|
876
|
+
destructive: (x, E) => p(x, "destructive", E),
|
|
877
|
+
warning: (x, E) => p(x, "warning", E),
|
|
878
|
+
info: (x, E) => p(x, "info", E),
|
|
879
|
+
custom: (x, E) => p("", "default", {
|
|
880
|
+
duration: E?.duration
|
|
881
|
+
}, x),
|
|
882
|
+
dismiss: _
|
|
883
|
+
}), e[5] = p, e[6] = O) : O = e[6];
|
|
884
|
+
const b = O;
|
|
885
|
+
let N;
|
|
886
|
+
e[7] !== r || e[8] !== i || e[9] !== u ? (N = /* @__PURE__ */ y(ct, { align: r, position: i, toasts: u, onRemove: m }), e[7] = r, e[8] = i, e[9] = u, e[10] = N) : N = e[10];
|
|
887
|
+
let S;
|
|
888
|
+
return e[11] !== l || e[12] !== N || e[13] !== b ? (S = /* @__PURE__ */ G(ye.Provider, { value: b, children: [
|
|
889
|
+
l,
|
|
890
|
+
N
|
|
891
|
+
] }), e[11] = l, e[12] = N, e[13] = b, e[14] = S) : S = e[14], S;
|
|
892
|
+
}, wt = () => {
|
|
893
|
+
const n = se(ye);
|
|
894
|
+
if (!n)
|
|
895
|
+
throw new Error("useOxLegacyToast must be used within a OxLegacyToastProvider");
|
|
896
|
+
return n;
|
|
897
|
+
}, it = (n) => {
|
|
898
|
+
const e = F.c(48), {
|
|
899
|
+
index: s,
|
|
900
|
+
onRemove: l,
|
|
901
|
+
position: o,
|
|
902
|
+
toast: t
|
|
903
|
+
} = n, r = t.icon ?? ke[t.type].icon, [c, i] = X(!0);
|
|
904
|
+
let a, u;
|
|
905
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (a = () => {
|
|
906
|
+
const I = setTimeout(() => i(!1), 50);
|
|
907
|
+
return () => clearTimeout(I);
|
|
908
|
+
}, u = [], e[0] = a, e[1] = u) : (a = e[0], u = e[1]), K(a, u);
|
|
909
|
+
const f = s * 8, d = 1 - s * 0.05;
|
|
910
|
+
let m;
|
|
911
|
+
e[2] !== s || e[3] !== c || e[4] !== o || e[5] !== d || e[6] !== f || e[7] !== t.isRemoving ? (m = () => {
|
|
912
|
+
const P = c ? o === "top" ? -16 : 16 : 0, C = t.isRemoving || c ? 0 : 1;
|
|
913
|
+
return o === "top" ? {
|
|
914
|
+
top: `${f + P}px`,
|
|
915
|
+
transform: `scale(${d})`,
|
|
916
|
+
zIndex: 30 - s,
|
|
917
|
+
opacity: C
|
|
918
|
+
} : {
|
|
919
|
+
top: `${-f + P}px`,
|
|
920
|
+
transform: `scale(${d})`,
|
|
921
|
+
zIndex: 30 - s,
|
|
922
|
+
opacity: C
|
|
923
|
+
};
|
|
924
|
+
}, e[2] = s, e[3] = c, e[4] = o, e[5] = d, e[6] = f, e[7] = t.isRemoving, e[8] = m) : m = e[8];
|
|
925
|
+
const h = m;
|
|
926
|
+
if (t.customContent) {
|
|
927
|
+
let I;
|
|
928
|
+
e[9] !== h ? (I = h(), e[9] = h, e[10] = I) : I = e[10];
|
|
929
|
+
let P;
|
|
930
|
+
e[11] !== l || e[12] !== t.id ? (P = () => l(t.id), e[11] = l, e[12] = t.id, e[13] = P) : P = e[13];
|
|
931
|
+
let C;
|
|
932
|
+
return e[14] !== I || e[15] !== P || e[16] !== t.customContent ? (C = /* @__PURE__ */ y("div", { className: "pointer-events-auto absolute w-full cursor-pointer rounded-lg border border-border bg-card transition-all duration-300 ease-out md:w-[320px]", "data-ox-slot": "toast-item", role: "status", style: I, onClick: P, children: t.customContent }), e[14] = I, e[15] = P, e[16] = t.customContent, e[17] = C) : C = e[17], C;
|
|
933
|
+
}
|
|
934
|
+
const p = t.description ? `${t.id}-desc` : void 0;
|
|
935
|
+
let w;
|
|
936
|
+
e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = H("pointer-events-auto absolute", "flex w-full items-center gap-3 md:w-[320px]", '[&_svg:not([class*="size-"])]:size-5 [&>svg]:text-current', "cursor-pointer", "rounded-lg border border-border bg-card p-4", "transition-all duration-300 ease-out"), e[18] = w) : w = e[18];
|
|
937
|
+
const _ = t.type === "destructive" || t.type === "warning" ? "alert" : "status";
|
|
938
|
+
let O;
|
|
939
|
+
e[19] !== h ? (O = h(), e[19] = h, e[20] = O) : O = e[20];
|
|
940
|
+
let b;
|
|
941
|
+
e[21] !== l || e[22] !== t.id ? (b = () => l(t.id), e[21] = l, e[22] = t.id, e[23] = b) : b = e[23];
|
|
942
|
+
let N;
|
|
943
|
+
e[24] !== t.type ? (N = /* @__PURE__ */ G("span", { className: "sr-only", children: [
|
|
944
|
+
t.type,
|
|
945
|
+
" notification:"
|
|
946
|
+
] }), e[24] = t.type, e[25] = N) : N = e[25];
|
|
947
|
+
const S = t.color ?? t.type;
|
|
948
|
+
let x;
|
|
949
|
+
e[26] !== r || e[27] !== t.path ? (x = /* @__PURE__ */ y(J, { icon: r, path: t.path }), e[26] = r, e[27] = t.path, e[28] = x) : x = e[28];
|
|
950
|
+
let E;
|
|
951
|
+
e[29] !== S || e[30] !== x ? (E = /* @__PURE__ */ y(J.Box, { color: S, size: "md", children: x }), e[29] = S, e[30] = x, e[31] = E) : E = e[31];
|
|
952
|
+
let L;
|
|
953
|
+
e[32] !== t.title ? (L = /* @__PURE__ */ y("div", { className: "text-xs font-medium text-foreground", children: t.title }), e[32] = t.title, e[33] = L) : L = e[33];
|
|
954
|
+
let R;
|
|
955
|
+
e[34] !== t.description || e[35] !== t.id ? (R = t.description ? /* @__PURE__ */ y("p", { id: `${t.id}-desc`, className: "mt-1 text-xs", children: t.description }) : null, e[34] = t.description, e[35] = t.id, e[36] = R) : R = e[36];
|
|
956
|
+
let k;
|
|
957
|
+
e[37] !== L || e[38] !== R ? (k = /* @__PURE__ */ G("div", { className: "flex-1", children: [
|
|
958
|
+
L,
|
|
959
|
+
R
|
|
960
|
+
] }), e[37] = L, e[38] = R, e[39] = k) : k = e[39];
|
|
961
|
+
let M;
|
|
962
|
+
return e[40] !== E || e[41] !== k || e[42] !== p || e[43] !== _ || e[44] !== O || e[45] !== b || e[46] !== N ? (M = /* @__PURE__ */ G("div", { "aria-describedby": p, className: w, "data-ox-slot": "toast-item", role: _, style: O, onClick: b, children: [
|
|
963
|
+
N,
|
|
964
|
+
E,
|
|
965
|
+
k
|
|
966
|
+
] }), e[40] = E, e[41] = k, e[42] = p, e[43] = _, e[44] = O, e[45] = b, e[46] = N, e[47] = M) : M = e[47], M;
|
|
967
|
+
}, rt = {
|
|
968
|
+
left: "left-1/2 -translate-x-1/2 md:translate-none md:left-4",
|
|
969
|
+
center: "left-1/2 -translate-x-1/2",
|
|
970
|
+
right: "left-1/2 -translate-x-1/2 md:translate-none md:left-auto md:right-4"
|
|
971
|
+
}, at = {
|
|
972
|
+
top: "top-4",
|
|
973
|
+
bottom: "bottom-24"
|
|
974
|
+
}, ct = (n) => {
|
|
975
|
+
const e = F.c(13), {
|
|
976
|
+
align: s,
|
|
977
|
+
onRemove: l,
|
|
978
|
+
position: o,
|
|
979
|
+
toasts: t
|
|
980
|
+
} = n, r = rt[s], c = at[o];
|
|
981
|
+
let i;
|
|
982
|
+
e[0] !== r || e[1] !== c ? (i = H("pointer-events-none fixed z-50 w-11/12 md:w-[320px]", r, c), e[0] = r, e[1] = c, e[2] = i) : i = e[2];
|
|
983
|
+
let a;
|
|
984
|
+
if (e[3] !== l || e[4] !== o || e[5] !== t) {
|
|
985
|
+
let f;
|
|
986
|
+
e[7] !== l || e[8] !== o ? (f = (d, m) => /* @__PURE__ */ y(it, { index: m, position: o, toast: d, onRemove: l }, d.id), e[7] = l, e[8] = o, e[9] = f) : f = e[9], a = t.map(f), e[3] = l, e[4] = o, e[5] = t, e[6] = a;
|
|
987
|
+
} else
|
|
988
|
+
a = e[6];
|
|
989
|
+
let u;
|
|
990
|
+
return e[10] !== i || e[11] !== a ? (u = fe(/* @__PURE__ */ y("div", { "aria-atomic": "false", "aria-label": "Notifications", "aria-live": "polite", className: i, "data-ox-slot": "toast-container", role: "region", children: a }), document.body), e[10] = i, e[11] = a, e[12] = u) : u = e[12], u;
|
|
991
|
+
};
|
|
833
992
|
export {
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
993
|
+
vt as OxEndlessList,
|
|
994
|
+
gt as OxFloating,
|
|
995
|
+
ve as OxFloatingContext,
|
|
996
|
+
pt as OxLegacyHeader,
|
|
997
|
+
xt as OxLegacyMainContent,
|
|
998
|
+
bt as OxLegacySidebar,
|
|
999
|
+
ct as OxLegacyToast,
|
|
1000
|
+
yt as OxLegacyToastProvider,
|
|
1001
|
+
ge as useOxFloatingContext,
|
|
1002
|
+
wt as useOxLegacyToast,
|
|
1003
|
+
Re as useVirtualList
|
|
842
1004
|
};
|