@noxickon/onyx 4.1.5 → 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.
Files changed (142) hide show
  1. package/AI-README.md +467 -103
  2. package/dist/_internal/styles/checkbox.variants.d.ts +5 -0
  3. package/dist/_internal/styles/index.d.ts +3 -0
  4. package/dist/_internal/styles/radio.variants.d.ts +5 -0
  5. package/dist/_internal/styles/switch.variants.d.ts +9 -0
  6. package/dist/_internal/types.d.ts +1 -0
  7. package/dist/_internal/utils/Portal/PortalContainerContext.d.ts +2 -0
  8. package/dist/_internal/utils/Portal/index.d.ts +1 -0
  9. package/dist/chunks/hooks-B58X4Fdh.js +46 -0
  10. package/dist/chunks/hooks-iUUmqFrq.js +7056 -0
  11. package/dist/chunks/ui-Bz7A98Kq.js +13 -0
  12. package/dist/chunks/ui-CezxuKW0.js +22994 -0
  13. package/dist/contexts/contexts.cjs.js +2 -2
  14. package/dist/contexts/contexts.es.js +55 -55
  15. package/dist/forms/Checkbox/Checkbox.stories.d.ts +10 -3
  16. package/dist/forms/Checkbox/index.d.ts +3 -3
  17. package/dist/forms/Checkbox/src/Checkbox.d.ts +1 -1
  18. package/dist/forms/Checkbox/src/Checkbox.types.d.ts +11 -4
  19. package/dist/forms/Checkbox/src/CheckboxGroup.d.ts +1 -1
  20. package/dist/forms/Checkbox/src/CheckboxGroupItem.d.ts +1 -1
  21. package/dist/forms/Checkbox/src/context/CheckboxGroupContext.types.d.ts +5 -2
  22. package/dist/forms/Input/Date/src/useDateInput.d.ts +2 -2
  23. package/dist/forms/Input/Number/src/Number.types.d.ts +4 -4
  24. package/dist/forms/Input/Number/src/context/NumberContext.types.d.ts +2 -2
  25. package/dist/forms/Input/Time/src/useTimeInput.d.ts +2 -2
  26. package/dist/forms/Radio/Radio.stories.d.ts +14 -3
  27. package/dist/forms/Radio/index.d.ts +2 -2
  28. package/dist/forms/Radio/src/Radio.types.d.ts +9 -7
  29. package/dist/forms/Radio/src/RadioGroup.d.ts +1 -1
  30. package/dist/forms/Radio/src/RadioGroupItem.d.ts +1 -1
  31. package/dist/forms/Radio/src/context/RadioGroupContext.types.d.ts +5 -2
  32. package/dist/forms/Select/Select.stories.d.ts +53 -4
  33. package/dist/forms/Select/index.d.ts +1 -1
  34. package/dist/forms/Select/src/Select.d.ts +1 -1
  35. package/dist/forms/Select/src/Select.types.d.ts +17 -5
  36. package/dist/forms/Switch/Switch.stories.d.ts +1 -0
  37. package/dist/forms/Switch/src/Switch.d.ts +1 -1
  38. package/dist/forms/Switch/src/Switch.types.d.ts +2 -0
  39. package/dist/hooks/hooks.cjs.js +1 -1
  40. package/dist/hooks/hooks.es.js +11 -10
  41. package/dist/hooks/index.d.ts +1 -0
  42. package/dist/hooks/useControllableState/src/useControllableState.types.d.ts +3 -6
  43. package/dist/hooks/useSort/UseSort.stories.d.ts +6 -0
  44. package/dist/hooks/useSort/index.d.ts +2 -0
  45. package/dist/hooks/useSort/src/useSort.d.ts +3 -0
  46. package/dist/hooks/useSort/src/useSort.types.d.ts +20 -0
  47. package/dist/hooks/useSort/test/useSort.test.d.ts +1 -0
  48. package/dist/layouts/layouts.cjs.js +1 -1
  49. package/dist/layouts/layouts.es.js +31 -32
  50. package/dist/legacy/index.d.ts +1 -0
  51. package/dist/legacy/legacy.cjs.js +1 -1
  52. package/dist/legacy/legacy.es.js +766 -604
  53. package/dist/legacy/ui/Floating/Floating.stories.d.ts +1 -1
  54. package/dist/legacy/ui/Floating/index.d.ts +1 -1
  55. package/dist/legacy/ui/Floating/src/Floating.types.d.ts +1 -1
  56. package/dist/legacy/ui/Floating/src/FloatingTrigger.d.ts +1 -1
  57. package/dist/legacy/ui/Toast/Toast.stories.d.ts +9 -0
  58. package/dist/legacy/ui/Toast/index.d.ts +5 -0
  59. package/dist/legacy/ui/Toast/src/Toast.d.ts +2 -0
  60. package/dist/legacy/ui/Toast/src/Toast.types.d.ts +29 -0
  61. package/dist/legacy/ui/Toast/src/ToastItem.d.ts +2 -0
  62. package/dist/legacy/ui/Toast/src/context/ToastContext.d.ts +2 -0
  63. package/dist/legacy/ui/Toast/src/context/ToastContext.types.d.ts +28 -0
  64. package/dist/legacy/ui/Toast/src/context/ToastProvider.d.ts +2 -0
  65. package/dist/legacy/ui/Toast/src/context/useToast.d.ts +2 -0
  66. package/dist/legacy/ui/Toast/test/Toast.test.d.ts +1 -0
  67. package/dist/onyx.cjs.js +1 -1
  68. package/dist/onyx.es.js +19 -18
  69. package/dist/pages/pages.cjs.js +1 -1
  70. package/dist/pages/pages.es.js +37 -37
  71. package/dist/routes/routes.cjs.js +1 -1
  72. package/dist/routes/routes.es.js +3 -3
  73. package/dist/styles.css +1 -0
  74. package/dist/ui/Breadcrumb/Breadcrumb.stories.d.ts +1 -1
  75. package/dist/ui/Breadcrumb/index.d.ts +1 -1
  76. package/dist/ui/Breadcrumb/src/Breadcrumb.types.d.ts +1 -1
  77. package/dist/ui/Breadcrumb/src/BreadcrumbLink.d.ts +1 -1
  78. package/dist/ui/Button/Button.stories.d.ts +2 -2
  79. package/dist/ui/Button/src/Button.d.ts +1 -1
  80. package/dist/ui/Button/src/Button.types.d.ts +1 -1
  81. package/dist/ui/Dropdown/Dropdown.stories.d.ts +23 -3
  82. package/dist/ui/Dropdown/index.d.ts +8 -2
  83. package/dist/ui/Dropdown/src/Dropdown.types.d.ts +31 -4
  84. package/dist/ui/Dropdown/src/DropdownCheckboxItem.d.ts +2 -0
  85. package/dist/ui/Dropdown/src/DropdownGroup.d.ts +2 -0
  86. package/dist/ui/Dropdown/src/DropdownRadioGroup.d.ts +2 -0
  87. package/dist/ui/Dropdown/src/DropdownRadioItem.d.ts +2 -0
  88. package/dist/ui/Dropdown/src/DropdownSubMenu.d.ts +2 -0
  89. package/dist/ui/Dropdown/src/DropdownSubMenuContent.d.ts +2 -0
  90. package/dist/ui/Dropdown/src/DropdownSubMenuTrigger.d.ts +2 -0
  91. package/dist/ui/Dropdown/src/DropdownTrigger.d.ts +1 -1
  92. package/dist/ui/Dropdown/src/context/DropdownContext.types.d.ts +2 -0
  93. package/dist/ui/Dropdown/src/context/DropdownRadioContext.d.ts +2 -0
  94. package/dist/ui/Dropdown/src/context/DropdownRadioContext.types.d.ts +5 -0
  95. package/dist/ui/Dropdown/src/context/DropdownSubMenuContext.d.ts +2 -0
  96. package/dist/ui/Dropdown/src/context/DropdownSubMenuContext.types.d.ts +14 -0
  97. package/dist/ui/Dropdown/src/context/useDropdownRadioContext.d.ts +1 -0
  98. package/dist/ui/Dropdown/src/context/useDropdownSubMenuContext.d.ts +1 -0
  99. package/dist/ui/HoverCard/HoverCard.stories.d.ts +1 -1
  100. package/dist/ui/HoverCard/index.d.ts +1 -1
  101. package/dist/ui/HoverCard/src/HoverCard.types.d.ts +1 -1
  102. package/dist/ui/HoverCard/src/HoverCardTrigger.d.ts +1 -1
  103. package/dist/ui/Link/Link.stories.d.ts +1 -1
  104. package/dist/ui/Link/src/Link.d.ts +1 -1
  105. package/dist/ui/Link/src/Link.types.d.ts +1 -1
  106. package/dist/ui/Pagination/Pagination.stories.d.ts +3 -3
  107. package/dist/ui/Pagination/index.d.ts +3 -3
  108. package/dist/ui/Pagination/src/Pagination.types.d.ts +3 -3
  109. package/dist/ui/Pagination/src/PaginationLink.d.ts +1 -1
  110. package/dist/ui/Pagination/src/PaginationNext.d.ts +1 -1
  111. package/dist/ui/Pagination/src/PaginationPrevious.d.ts +1 -1
  112. package/dist/ui/Popover/Popover.stories.d.ts +1 -1
  113. package/dist/ui/Popover/index.d.ts +1 -1
  114. package/dist/ui/Popover/src/Popover.types.d.ts +1 -1
  115. package/dist/ui/Popover/src/PopoverTrigger.d.ts +1 -1
  116. package/dist/ui/Popper/index.d.ts +1 -1
  117. package/dist/ui/Popper/src/Popper.types.d.ts +1 -1
  118. package/dist/ui/Popper/src/PopperAnchor.d.ts +1 -1
  119. package/dist/ui/Table/Table.stories.d.ts +7 -4
  120. package/dist/ui/Table/index.d.ts +3 -3
  121. package/dist/ui/Table/src/Table.d.ts +1 -1
  122. package/dist/ui/Table/src/Table.types.d.ts +8 -0
  123. package/dist/ui/Table/src/TableHead.d.ts +1 -1
  124. package/dist/ui/Table/src/TableRow.d.ts +1 -1
  125. package/dist/ui/Table/src/context/TableContext.types.d.ts +6 -0
  126. package/dist/ui/Toast/Toast.stories.d.ts +4 -2
  127. package/dist/ui/Toast/index.d.ts +1 -1
  128. package/dist/ui/Toast/src/Toast.d.ts +2 -2
  129. package/dist/ui/Toast/src/Toast.types.d.ts +23 -23
  130. package/dist/ui/Toast/src/context/ToastContext.types.d.ts +15 -23
  131. package/dist/ui/Toast/src/context/ToastProvider.d.ts +2 -2
  132. package/dist/ui/Toast/src/context/useToast.d.ts +2 -1
  133. package/dist/ui.css +1 -1
  134. package/dist/utils/utils.cjs.js +1 -1
  135. package/dist/utils/utils.es.js +6 -6
  136. package/package.json +17 -16
  137. package/dist/chunks/hooks-BMXCuU2h.js +0 -7318
  138. package/dist/chunks/hooks-H39lCrRt.js +0 -31
  139. package/dist/chunks/ui-Be695bGj.js +0 -20915
  140. package/dist/chunks/ui-DQDo-5EK.js +0 -9
  141. package/dist/ui/Dropdown/src/DropdownLabel.d.ts +0 -2
  142. package/dist/ui/Toast/src/ToastItem.d.ts +0 -2
@@ -1,633 +1,632 @@
1
- import { jsx as g, jsxs as U, Fragment as ge } from "react/jsx-runtime";
2
- import { d as F, E as we, c as se, F as ye } from "../chunks/hooks-BMXCuU2h.js";
3
- import { useState as X, useRef as J, useEffect as q, createContext as le, useContext as oe, useId as Oe, useCallback as ae } from "react";
4
- import { Menu as Ee, X as Le } from "lucide-react";
5
- import { ag as z, g as ne, r as Q, ah as ce, n as de, L as Ne, ai as Se } from "../chunks/ui-Be695bGj.js";
6
- import { createPortal as Ce } from "react-dom";
7
- const ke = (i, e) => {
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 t = Math.floor((s + l) / 2);
11
- i[t] <= e ? s = t + 1 : l = t - 1;
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
- }, Pe = 5, Te = 16, Me = (i) => {
13
+ }, Me = 5, Ie = 16, Re = (n) => {
15
14
  const e = F.c(51), {
16
15
  count: s,
17
16
  estimateSize: l,
18
- gap: t,
19
- overscan: o,
17
+ gap: o,
18
+ overscan: t,
20
19
  scrollRef: r
21
- } = i, a = t === void 0 ? 0 : t, n = o === void 0 ? Pe : o, [d, u] = X(0), [c, f] = X(0), [x, h] = X(ze);
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 O = J(p), C = J(null);
25
- let L;
26
- e[1] !== l || e[2] !== x ? (L = (b) => {
27
- const m = x.get(b);
28
- return m !== void 0 ? m : typeof l == "function" ? l(b) : l;
29
- }, e[1] = l, e[2] = x, e[3] = L) : L = e[3];
30
- const v = L;
31
- let P;
32
- if (e[4] !== s || e[5] !== a || e[6] !== v) {
33
- const b = [];
34
- let m = 0;
35
- for (let w = 0; w < s; w++)
36
- b.push(m), m = m + (v(w) + (w < s - 1 ? a : 0));
37
- P = {
38
- offsets: b,
39
- totalSize: m
40
- }, e[4] = s, e[5] = a, e[6] = v, e[7] = P;
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
- P = e[7];
41
+ N = e[7];
43
42
  const {
44
- offsets: y,
45
- totalSize: k
46
- } = P;
47
- let j;
43
+ offsets: S,
44
+ totalSize: x
45
+ } = N;
46
+ let E;
48
47
  e: {
49
48
  if (s === 0) {
50
- let G;
51
- e[8] === Symbol.for("react.memo_cache_sentinel") ? (G = {
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] = G) : G = e[8], j = G;
53
+ }, e[8] = U) : U = e[8], E = U;
55
54
  break e;
56
55
  }
57
- let b, m;
58
- if (e[9] !== s || e[10] !== a || e[11] !== v || e[12] !== y || e[13] !== d || e[14] !== c) {
59
- m = ke(y, d), b = m;
60
- let G = 0;
61
- for (; b < s && G < c; )
62
- G = G + (v(b) + a), b++;
63
- e[9] = s, e[10] = a, e[11] = v, e[12] = y, e[13] = d, e[14] = c, e[15] = b, e[16] = m;
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
- b = e[15], m = e[16];
66
- const w = m - n, M = s - 1;
67
- let S;
68
- e[17] !== w || e[18] !== M ? (S = se(w, 0, M), e[17] = w, e[18] = M, e[19] = S) : S = e[19];
69
- const I = b + n;
70
- let A;
71
- e[20] !== s || e[21] !== I ? (A = se(I, 0, s), e[20] = s, e[21] = I, e[22] = A) : A = e[22];
72
- let K;
73
- e[23] !== A || e[24] !== S ? (K = {
74
- start: S,
75
- end: A
76
- }, e[23] = A, e[24] = S, e[25] = K) : K = e[25], j = K;
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 _ = j;
79
- let D;
77
+ const L = E;
78
+ let R;
80
79
  e: {
81
80
  if (s === 0) {
82
- let m;
83
- e[26] === Symbol.for("react.memo_cache_sentinel") ? (m = [], e[26] = m) : m = e[26], D = m;
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 b;
87
- if (e[27] !== v || e[28] !== y || e[29] !== _.end || e[30] !== _.start) {
88
- let m;
89
- e[32] !== v || e[33] !== y ? (m = (w) => ({
90
- index: w,
91
- start: y[w],
92
- size: v(w)
93
- }), e[32] = v, e[33] = y, e[34] = m) : m = e[34], b = we(_.start, _.end).map(m), e[27] = v, e[28] = y, e[29] = _.end, e[30] = _.start, e[31] = b;
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
- b = e[31];
96
- D = b;
94
+ g = e[31];
95
+ R = g;
97
96
  }
98
- const T = D;
99
- let R;
100
- e[35] === Symbol.for("react.memo_cache_sentinel") ? (R = (b) => (m) => {
101
- if (!m) {
102
- const S = O.current.get(b);
103
- S && (C.current?.unobserve(S), O.current.delete(b));
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 w = O.current.get(b);
107
- w !== m && (w && C.current?.unobserve(w), C.current?.observe(m), O.current.set(b, m));
108
- const M = m.getBoundingClientRect().height;
109
- h((S) => {
110
- if (S.get(b) === M)
111
- return S;
112
- const I = new Map(S);
113
- return I.set(b, M), I;
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] = R) : R = e[35];
116
- const V = R;
117
- let $;
118
- e[36] !== s || e[37] !== v || e[38] !== y || e[39] !== r || e[40] !== k ? ($ = (b, m) => {
119
- const w = m === void 0 ? {} : m, {
120
- align: M,
121
- behavior: S
122
- } = w, I = M === void 0 ? "start" : M, A = S === void 0 ? "auto" : S, K = r.current;
123
- if (!K || b < 0 || b >= s)
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 G = y[b], re = v(b), te = K.clientHeight;
124
+ const U = S[g], re = b(g), oe = q.clientHeight;
126
125
  let ee;
127
- e: switch (I) {
126
+ e: switch (j) {
128
127
  case "center": {
129
- ee = G - te / 2 + re / 2;
128
+ ee = U - oe / 2 + re / 2;
130
129
  break e;
131
130
  }
132
131
  case "end": {
133
- ee = G - te + re;
132
+ ee = U - oe + re;
134
133
  break e;
135
134
  }
136
135
  default:
137
- ee = G;
136
+ ee = U;
138
137
  }
139
- K.scrollTo({
140
- top: se(ee, 0, k - te),
141
- behavior: A
138
+ q.scrollTo({
139
+ top: le(ee, 0, x - oe),
140
+ behavior: Y
142
141
  });
143
- }, e[36] = s, e[37] = v, e[38] = y, e[39] = r, e[40] = k, e[41] = $) : $ = e[41];
144
- const E = $;
145
- let N, B;
146
- e[42] !== r ? (N = () => {
147
- const b = r.current;
148
- if (!b)
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 m = ye(() => {
151
- u(b.scrollTop);
152
- }, Te), w = () => {
153
- f(b.clientHeight);
149
+ const v = Se(() => {
150
+ u(g.scrollTop);
151
+ }, Ie), T = () => {
152
+ d(g.clientHeight);
154
153
  };
155
- w(), b.addEventListener("scroll", m, {
154
+ T(), g.addEventListener("scroll", v, {
156
155
  passive: !0
157
156
  });
158
- const M = new ResizeObserver(w);
159
- return M.observe(b), () => {
160
- b.removeEventListener("scroll", m), m.cancel(), M.disconnect();
157
+ const A = new ResizeObserver(T);
158
+ return A.observe(g), () => {
159
+ g.removeEventListener("scroll", v), v.cancel(), A.disconnect();
161
160
  };
162
- }, B = [r], e[42] = r, e[43] = N, e[44] = B) : (N = e[43], B = e[44]), q(N, B);
163
- let H, Y;
164
- e[45] === Symbol.for("react.memo_cache_sentinel") ? (H = () => (C.current = new ResizeObserver((b) => {
165
- const m = [];
166
- b.forEach((w) => {
167
- const M = w.target, S = [...O.current.entries()].find((I) => {
168
- const [, A] = I;
169
- return A === M;
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
- S !== void 0 && m.push([S, w.contentRect.height]);
172
- }), m.length > 0 && h((w) => {
173
- let M = !1;
174
- const S = new Map(w);
175
- for (const [I, A] of m)
176
- w.get(I) !== A && (S.set(I, A), M = !0);
177
- return M ? S : w;
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
- C.current?.disconnect(), C.current = null;
181
- }), Y = [], e[45] = H, e[46] = Y) : (H = e[45], Y = e[46]), q(H, Y);
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] !== E || e[48] !== k || e[49] !== T ? (W = {
184
- virtualItems: T,
185
- totalSize: k,
186
- measureElement: V,
187
- scrollToIndex: E
188
- }, e[47] = E, e[48] = k, e[49] = T, e[50] = W) : W = e[50], W;
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 ze() {
189
+ function He() {
191
190
  return /* @__PURE__ */ new Map();
192
191
  }
193
- const rt = (i) => {
192
+ const pt = (n) => {
194
193
  const e = F.c(28);
195
- let s, l, t, o, r, a, n;
196
- e[0] !== i ? ({
194
+ let s, l, o, t, r, c, i;
195
+ e[0] !== n ? ({
197
196
  brand: s,
198
197
  children: l,
199
- className: t,
200
- hasSidebar: a,
198
+ className: o,
199
+ hasSidebar: c,
201
200
  navClassName: r,
202
- toggleSidebar: n,
203
- ...o
204
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t, e[4] = o, e[5] = r, e[6] = a, e[7] = n) : (s = e[1], l = e[2], t = e[3], o = e[4], r = e[5], a = e[6], n = e[7]);
205
- const d = a === void 0 ? !1 : a;
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] !== t ? (u = z("sticky top-0 z-10 max-h-15 min-h-15 bg-card", t), e[8] = t, e[9] = u) : u = e[9];
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[12] !== d || e[13] !== n ? (f = d ? /* @__PURE__ */ g(ne, { "aria-label": "Open menu", "data-ox-slot": "header-toggle", variant: "ghost", onClick: n, children: /* @__PURE__ */ g(Q, { icon: Ee }) }) : null, e[12] = d, e[13] = n, e[14] = f) : f = e[14];
212
- let x;
213
- e[15] !== s ? (x = s ? /* @__PURE__ */ g("div", { children: s }) : null, e[15] = s, e[16] = x) : x = e[16];
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] !== f || e[18] !== x ? (h = /* @__PURE__ */ U("div", { className: "flex items-center gap-[17px]", children: [
216
- f,
217
- x
218
- ] }), e[17] = f, e[18] = x, e[19] = h) : h = e[19];
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] !== c || e[22] !== h ? (p = /* @__PURE__ */ U("nav", { className: c, children: [
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] = c, e[22] = h, e[23] = p) : p = e[23];
224
- let O;
225
- return e[24] !== o || e[25] !== u || e[26] !== p ? (O = /* @__PURE__ */ g("header", { className: u, "data-ox-slot": "header", ...o, children: p }), e[24] = o, e[25] = u, e[26] = p, e[27] = O) : O = e[27], O;
226
- }, at = (i) => {
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, t, o, r, a, n;
229
- e[0] !== i ? ({
227
+ let s, l, o, t, r, c, i;
228
+ e[0] !== n ? ({
230
229
  children: s,
231
230
  className: l,
232
- color: a,
233
- icon: o,
231
+ color: c,
232
+ icon: t,
234
233
  subtitle: r,
235
- title: n,
236
- ...t
237
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t, e[4] = o, e[5] = r, e[6] = a, e[7] = n) : (s = e[1], l = e[2], t = e[3], o = e[4], r = e[5], a = e[6], n = e[7]);
238
- const d = a === void 0 ? "purple" : a, u = n || r || o, c = u ? "main-headline" : void 0;
239
- let f;
240
- e[8] !== l ? (f = z("w-full p-6", l), e[8] = l, e[9] = f) : f = e[9];
241
- let x;
242
- e[10] !== d || e[11] !== u || e[12] !== o || e[13] !== r || e[14] !== n ? (x = u ? /* @__PURE__ */ g("div", { className: "mb-8 border-b border-border pb-6", children: /* @__PURE__ */ U("div", { className: "flex items-center gap-4", children: [
243
- o ? /* @__PURE__ */ g(Q.Box, { color: d, size: "2xl", children: /* @__PURE__ */ g(Q, { icon: o }) }) : null,
244
- /* @__PURE__ */ U("div", { children: [
245
- n ? /* @__PURE__ */ g("h2", { id: "main-headline", className: "text-xl font-semibold text-foreground", "data-ox-slot": "main-headline", children: n }) : null,
246
- r && /* @__PURE__ */ g("p", { className: "mt-1 text-sm", children: r })
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] = d, e[11] = u, e[12] = o, e[13] = r, e[14] = n, e[15] = x) : x = e[15];
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] !== t || e[18] !== c || e[19] !== f || e[20] !== x ? (h = /* @__PURE__ */ U("main", { "aria-labelledby": c, className: f, "data-ox-slot": "main-content", ...t, children: [
251
- x,
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] = t, e[18] = c, e[19] = f, e[20] = x, e[21] = h) : h = e[21], h;
254
- }, fe = "group ox-focus-ring items-center rounded-lg text-sm transition-colors text-left col-span-2 grid grid-cols-subgrid", ue = "size-10 justify-center", he = "h-10 w-full px-2", me = "bg-sidebar-accent text-sidebar-accent-foreground", _e = "h-15", be = le(void 0), $e = (i) => {
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, t, o, r, a, n;
257
- e[0] !== i ? ({
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: a,
262
- mobileCollapsed: n,
263
- onClose: o,
264
- ...t
265
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t, e[4] = o, e[5] = r, e[6] = a, e[7] = n) : (s = e[1], l = e[2], t = e[3], o = e[4], r = e[5], a = e[6], n = e[7]);
266
- const d = r === void 0 ? !1 : r, u = a === void 0 ? !1 : a, c = n === void 0 ? !0 : n, [f, x] = X(window.innerWidth < ce), h = f ? c : d;
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] !== f ? (p = {
267
+ e[8] !== h || e[9] !== d ? (p = {
269
268
  collapsed: h,
270
- isMobile: f
271
- }, e[8] = h, e[9] = f, e[10] = p) : p = e[10];
272
- const O = p;
273
- let C, L;
274
- e[11] === Symbol.for("react.memo_cache_sentinel") ? (C = () => {
275
- const y = () => {
276
- x(window.innerWidth < ce);
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 y(), window.addEventListener("resize", y), () => {
279
- window.removeEventListener("resize", y);
277
+ return S(), window.addEventListener("resize", S), () => {
278
+ window.removeEventListener("resize", S);
280
279
  };
281
- }, L = [], e[11] = C, e[12] = L) : (C = e[11], L = e[12]), q(C, L);
282
- let v;
283
- e[13] !== s || e[14] !== l || e[15] !== t || e[16] !== h || e[17] !== u || e[18] !== f || e[19] !== o ? (v = f ? /* @__PURE__ */ g(de, { open: !h, onOpenChange: (y) => !y && o?.(), children: /* @__PURE__ */ g(de.Content, { closeOnOutsideClick: o !== void 0, side: "left", children: /* @__PURE__ */ U("nav", { "aria-label": "Mobile navigation", className: z("flex h-screen w-full flex-col bg-sidebar", l), role: "navigation", ...t, "data-ox-slot": "sidebar", children: [
284
- o ? /* @__PURE__ */ g("div", { className: z("flex h-15 items-center gap-[17px] px-4", _e), children: /* @__PURE__ */ g(ne, { "aria-label": "Close sidebar", size: "md", variant: "ghost", onClick: o, children: /* @__PURE__ */ g(Q, { icon: Le }) }) }) : null,
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__ */ g("nav", { "aria-label": "Desktop navigation", className: z("sticky box-content flex flex-col overflow-y-auto bg-sidebar", {
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", ...t, "data-ox-slot": "sidebar", children: s }), e[13] = s, e[14] = l, e[15] = t, e[16] = h, e[17] = u, e[18] = f, e[19] = o, e[20] = v) : v = e[20];
292
- let P;
293
- return e[21] !== O || e[22] !== v ? (P = /* @__PURE__ */ g(be.Provider, { value: O, children: v }), e[21] = O, e[22] = v, e[23] = P) : P = e[23], P;
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 i = oe(be);
296
- if (!i)
294
+ const n = se(xe);
295
+ if (!n)
297
296
  throw new Error("useSidebar must be used within a SidebarProvider");
298
- return i;
299
- }, He = (i) => {
297
+ return n;
298
+ }, Be = (n) => {
300
299
  const e = F.c(12);
301
- let s, l, t;
302
- e[0] !== i ? ({
300
+ let s, l, o;
301
+ e[0] !== n ? ({
303
302
  children: s,
304
303
  className: l,
305
- ...t
306
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t) : (s = e[1], l = e[2], t = e[3]);
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: o,
307
+ collapsed: t,
309
308
  isMobile: r
310
- } = Z(), a = o && !r, n = !o || r;
311
- let d;
312
- e[4] !== l || e[5] !== a || e[6] !== n ? (d = z("grid flex-1 content-start gap-y-1 overflow-y-auto p-4", {
313
- "grid-cols-1 place-items-center": a,
314
- "grid-cols-[auto_1fr]": n
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] = a, e[6] = n, e[7] = d) : d = e[7];
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] !== t || e[10] !== d ? (u = /* @__PURE__ */ g("div", { className: d, ...t, "data-ox-slot": "sidebar-body", children: s }), e[8] = s, e[9] = t, e[10] = d, e[11] = u) : u = e[11], u;
318
- }, Ie = (i) => {
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, t, o, r;
321
- e[0] !== i ? ({
322
- active: o,
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
- ...t
327
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t, e[4] = o, e[5] = r) : (s = e[1], l = e[2], t = e[3], o = e[4], r = e[5]);
328
- const a = o === void 0 ? !1 : o, n = r === void 0 ? !1 : r, {
329
- collapsed: d
330
- } = Z(), u = !d, c = a && !n;
331
- let f;
332
- e[6] !== l || e[7] !== d || e[8] !== n || e[9] !== u || e[10] !== c ? (f = z("enabled:cursor-pointer enabled:text-sidebar-foreground enabled:hover:bg-sidebar-accent enabled:hover:text-sidebar-accent-foreground", fe, {
333
- [ue]: d,
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
- [me]: c,
336
- "disabled:ox-default-disabled": n
337
- }, l), e[6] = l, e[7] = d, e[8] = n, e[9] = u, e[10] = c, e[11] = f) : f = e[11];
338
- const x = a ? "active" : "inactive";
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] !== n || e[14] !== t || e[15] !== f || e[16] !== x ? (h = /* @__PURE__ */ g("button", { className: f, disabled: n, type: "button", ...t, "data-ox-slot": "sidebar-button", "data-ox-state": x, children: s }), e[12] = s, e[13] = n, e[14] = t, e[15] = f, e[16] = x, e[17] = h) : h = e[17], h;
341
- }, Fe = (i) => {
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, t;
344
- e[0] !== i ? ({
342
+ let s, l, o;
343
+ e[0] !== n ? ({
345
344
  children: s,
346
345
  className: l,
347
- ...t
348
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t) : (s = e[1], l = e[2], t = e[3]);
349
- let o;
350
- e[4] !== l ? (o = z("p-4", l), e[4] = l, e[5] = o) : o = e[5];
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] !== t || e[8] !== o ? (r = /* @__PURE__ */ g("div", { className: o, ...t, "data-ox-slot": "sidebar-footer", children: s }), e[6] = s, e[7] = t, e[8] = o, e[9] = r) : r = e[9], r;
353
- }, Re = (i) => {
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, t, o;
356
- e[0] !== i ? ({
354
+ let s, l, o, t;
355
+ e[0] !== n ? ({
357
356
  children: s,
358
357
  className: l,
359
- headline: o,
360
- ...t
361
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t, e[4] = o) : (s = e[1], l = e[2], t = e[3], o = e[4]);
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: a
363
+ isMobile: c
365
364
  } = Z();
366
- let n;
367
- e[5] !== l ? (n = z("contents", l), e[5] = l, e[6] = n) : n = e[6];
368
- const d = r && !a;
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] !== d ? (u = z("col-span-full mt-4 mb-2 block cursor-default text-xs text-muted-foreground", {
371
- invisible: d
372
- }), e[7] = d, e[8] = u) : u = e[8];
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
- return e[12] !== s || e[13] !== t || e[14] !== n || e[15] !== c ? (f = /* @__PURE__ */ U("div", { className: n, ...t, "data-ox-slot": "sidebar-group", children: [
377
- c,
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] = t, e[14] = n, e[15] = c, e[16] = f) : f = e[16], f;
380
- }, Be = (i) => {
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, t;
383
- e[0] !== i ? ({
381
+ let s, l, o;
382
+ e[0] !== n ? ({
384
383
  children: s,
385
384
  className: l,
386
- ...t
387
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t) : (s = e[1], l = e[2], t = e[3]);
388
- let o;
389
- e[4] !== l ? (o = z("flex h-15 items-center px-4", l), e[4] = l, e[5] = o) : o = e[5];
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] !== t || e[8] !== o ? (r = /* @__PURE__ */ g("div", { className: o, ...t, "data-ox-slot": "sidebar-header", children: s }), e[6] = s, e[7] = t, e[8] = o, e[9] = r) : r = e[9], r;
392
- }, Ae = (i) => {
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, t, o, r, a;
395
- e[0] !== i ? ({
393
+ let s, l, o, t, r, c;
394
+ e[0] !== n ? ({
396
395
  children: s,
397
396
  className: l,
398
- icon: t,
399
- path: o,
400
- size: a,
397
+ icon: o,
398
+ path: t,
399
+ size: c,
401
400
  ...r
402
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t, e[4] = o, e[5] = r, e[6] = a) : (s = e[1], l = e[2], t = e[3], o = e[4], r = e[5], a = e[6]);
403
- const n = a === void 0 ? "md" : a, {
404
- collapsed: d
405
- } = Z(), u = !d;
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
- return e[10] !== s || e[11] !== t || e[12] !== o || e[13] !== r || e[14] !== n || e[15] !== c ? (f = /* @__PURE__ */ g(Q, { className: c, icon: t, path: o, size: n, ...r, children: s }), e[10] = s, e[11] = t, e[12] = o, e[13] = r, e[14] = n, e[15] = c, e[16] = f) : f = e[16], f;
412
- }, je = (i) => {
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, t;
415
- e[0] !== i ? ({
413
+ let s, l, o;
414
+ e[0] !== n ? ({
416
415
  children: s,
417
416
  className: l,
418
- ...t
419
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t) : (s = e[1], l = e[2], t = e[3]);
420
- let o;
421
- e[4] !== l ? (o = z("overflow-hidden text-ellipsis", l), e[4] = l, e[5] = o) : o = e[5];
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] !== t || e[8] !== o ? (r = /* @__PURE__ */ g("span", { className: o, ...t, "data-ox-slot": "sidebar-label", children: s }), e[6] = s, e[7] = t, e[8] = o, e[9] = r) : r = e[9], r;
424
- }, De = (i) => {
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, t, o, r, a;
427
- e[0] !== i ? ({
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: a,
432
- href: o,
433
- ...t
434
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t, e[4] = o, e[5] = r, e[6] = a) : (s = e[1], l = e[2], t = e[3], o = e[4], r = e[5], a = e[6]);
435
- const n = r === void 0 ? !1 : r, d = a === void 0 ? !1 : a, {
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(), c = n ? "page" : void 0, f = !u, x = n && !d, h = !n && !d;
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] !== d || e[10] !== f || e[11] !== x || e[12] !== h ? (p = z(fe, {
440
- [ue]: u,
441
- [he]: f,
442
- [me]: x,
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": d
445
- }, l), e[7] = l, e[8] = u, e[9] = d, e[10] = f, e[11] = x, e[12] = h, e[13] = p) : p = e[13];
446
- const O = d ? void 0 : o, C = d ? Ve : void 0, L = n ? "active" : "inactive";
447
- let v;
448
- return e[14] !== s || e[15] !== t || e[16] !== L || e[17] !== c || e[18] !== p || e[19] !== O || e[20] !== C ? (v = /* @__PURE__ */ g("a", { "aria-current": c, className: p, href: O, role: "link", onClick: C, ...t, "data-ox-slot": "sidebar-link", "data-ox-state": L, children: s }), e[14] = s, e[15] = t, e[16] = L, e[17] = c, e[18] = p, e[19] = O, e[20] = C, e[21] = v) : v = e[21], v;
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 Ve(i) {
451
- return i.preventDefault();
449
+ function qe(n) {
450
+ return n.preventDefault();
452
451
  }
453
- const ct = Object.assign($e, {
454
- Body: He,
455
- Button: Ie,
456
- Footer: Fe,
457
- Group: Re,
458
- Header: Be,
459
- Icon: Ae,
460
- Label: je,
461
- Link: De
462
- }), xe = le(null), ie = () => {
463
- const i = oe(xe);
464
- if (!i)
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 i;
467
- }, Ye = 5, Ge = (i) => {
465
+ return n;
466
+ }, Ke = 5, Xe = (n) => {
468
467
  const e = F.c(65);
469
- let s, l, t, o, r, a, n, d, u, c, f, x, h, p, O;
470
- e[0] !== i ? ({
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: t,
472
+ data: o,
474
473
  estimateSize: r,
475
- gap: c,
476
- getItemKey: a,
477
- hasNextPage: f,
478
- isError: x,
474
+ gap: f,
475
+ getItemKey: c,
476
+ hasNextPage: d,
477
+ isError: m,
479
478
  isLoading: h,
480
479
  loadMoreThreshold: p,
481
- onLoadMore: n,
482
- overscan: O,
483
- renderItem: d,
480
+ onLoadMore: i,
481
+ overscan: w,
482
+ renderItem: a,
484
483
  style: u,
485
- ...o
486
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t, e[4] = o, e[5] = r, e[6] = a, e[7] = n, e[8] = d, e[9] = u, e[10] = c, e[11] = f, e[12] = x, e[13] = h, e[14] = p, e[15] = O) : (s = e[1], l = e[2], t = e[3], o = e[4], r = e[5], a = e[6], n = e[7], d = e[8], u = e[9], c = e[10], f = e[11], x = e[12], h = e[13], p = e[14], O = e[15]);
487
- const C = c === void 0 ? 0 : c, L = f === void 0 ? !1 : f, v = x === void 0 ? !1 : x, P = h === void 0 ? !1 : h, y = p === void 0 ? Ye : p, k = O === void 0 ? 5 : O, j = J(null);
488
- let _;
489
- e[16] !== t.length || e[17] !== r || e[18] !== C || e[19] !== k ? (_ = {
490
- count: t.length,
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: j,
493
- overscan: k,
494
- gap: C
495
- }, e[16] = t.length, e[17] = r, e[18] = C, e[19] = k, e[20] = _) : _ = e[20];
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: D,
498
- totalSize: T,
499
- virtualItems: R
500
- } = Me(_);
501
- let V;
502
- e[21] !== R ? (V = R.at(-1), e[21] = R, e[22] = V) : V = e[22];
503
- const $ = V;
504
- let E, N;
505
- e[23] !== t.length || e[24] !== L || e[25] !== v || e[26] !== P || e[27] !== $ || e[28] !== y || e[29] !== n ? (N = () => {
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
- $.index >= t.length - y && L && !P && !v && n && n();
509
- }, E = [$, t.length, L, P, v, y, n], e[23] = t.length, e[24] = L, e[25] = v, e[26] = P, e[27] = $, e[28] = y, e[29] = n, e[30] = E, e[31] = N) : (E = e[30], N = e[31]), q(N, E);
510
- let B;
511
- e[32] !== t.length || e[33] !== L || e[34] !== v || e[35] !== P || e[36] !== n ? (B = {
512
- isLoading: P,
513
- isError: v,
514
- hasNextPage: L,
515
- itemCount: t.length,
516
- onRetry: n
517
- }, e[32] = t.length, e[33] = L, e[34] = v, e[35] = P, e[36] = n, e[37] = B) : B = e[37];
518
- const H = B;
519
- let Y;
520
- e[38] !== l ? (Y = z("relative overflow-auto", l), e[38] = l, e[39] = Y) : Y = e[39];
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] !== T ? (W = {
523
- height: T
524
- }, e[40] = T, e[41] = W) : W = e[41];
525
- let b;
526
- if (e[42] !== t || e[43] !== a || e[44] !== D || e[45] !== d || e[46] !== R) {
527
- let S;
528
- e[48] !== t || e[49] !== a || e[50] !== D || e[51] !== d ? (S = (I) => {
529
- const A = t[I.index], K = a(A, I.index);
530
- return /* @__PURE__ */ g("div", { "data-index": I.index, "data-ox-slot": "endless-list-item", ref: D(I.index), style: {
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(${I.start}px)`
536
- }, children: d(A, I.index) }, K);
537
- }, e[48] = t, e[49] = a, e[50] = D, e[51] = d, e[52] = S) : S = e[52], b = R.map(S), e[42] = t, e[43] = a, e[44] = D, e[45] = d, e[46] = R, e[47] = b;
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
- b = e[47];
540
- let m;
541
- e[53] !== W || e[54] !== b ? (m = /* @__PURE__ */ g("div", { className: "relative w-full", style: W, children: b }), e[53] = W, e[54] = b, e[55] = m) : m = e[55];
542
- let w;
543
- e[56] !== s || e[57] !== o || e[58] !== u || e[59] !== Y || e[60] !== m ? (w = /* @__PURE__ */ U("div", { className: Y, "data-ox-slot": "endless-list", ref: j, style: u, ...o, children: [
544
- m,
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] = o, e[58] = u, e[59] = Y, e[60] = m, e[61] = w) : w = e[61];
547
- let M;
548
- return e[62] !== H || e[63] !== w ? (M = /* @__PURE__ */ g(xe.Provider, { value: H, children: w }), e[62] = H, e[63] = w, e[64] = M) : M = e[64], M;
549
- }, We = (i) => {
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, t;
552
- e[0] !== i ? ({
550
+ let s, l, o;
551
+ e[0] !== n ? ({
553
552
  children: s,
554
553
  className: l,
555
- ...t
556
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t) : (s = e[1], l = e[2], t = e[3]);
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: o,
557
+ isLoading: t,
559
558
  itemCount: r
560
559
  } = ie();
561
- if (r > 0 || o)
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[4] !== l ? (a = z("flex items-center justify-center py-8 text-muted-foreground", l), e[4] = l, e[5] = a) : a = e[5];
565
- const n = s ?? "No items to display";
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, t, o;
571
- e[0] !== i ? ({
569
+ let s, l, o, t;
570
+ e[0] !== n ? ({
572
571
  children: s,
573
572
  className: l,
574
- onRetry: o,
575
- ...t
576
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t, e[4] = o) : (s = e[1], l = e[2], t = e[3], o = e[4]);
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: a
578
+ onRetry: c
580
579
  } = ie();
581
580
  if (!r)
582
581
  return null;
583
- const n = o ?? a;
584
- let d;
585
- e[5] !== l ? (d = z("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] = d) : d = e[6];
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] !== n ? (u = s ?? /* @__PURE__ */ U(ge, { children: [
588
- /* @__PURE__ */ g("span", { className: "text-sm text-destructive", children: "Failed to load items" }),
589
- n && /* @__PURE__ */ g(ne, { size: "sm", variant: "secondary", onClick: n, children: "Retry" })
590
- ] }), e[7] = s, e[8] = n, e[9] = u) : u = e[9];
591
- let c;
592
- return e[10] !== t || e[11] !== d || e[12] !== u ? (c = /* @__PURE__ */ g("div", { className: d, "data-ox-slot": "endless-list-error", ...t, children: u }), e[10] = t, e[11] = d, e[12] = u, e[13] = c) : c = e[13], c;
593
- }, Ue = (i) => {
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, t;
596
- e[0] !== i ? ({
594
+ let s, l, o;
595
+ e[0] !== n ? ({
597
596
  children: s,
598
597
  className: l,
599
- ...t
600
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t) : (s = e[1], l = e[2], t = e[3]);
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: o,
601
+ hasNextPage: t,
603
602
  isLoading: r
604
603
  } = ie();
605
- if (!r || !o)
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[4] !== l ? (a = z("sticky bottom-0 flex items-center justify-center bg-background/80 py-4 backdrop-blur-sm", l), e[4] = l, e[5] = a) : a = e[5];
609
- let n;
610
- e[6] !== s ? (n = s ?? /* @__PURE__ */ g(Ne, { size: "md" }), e[6] = s, e[7] = n) : n = e[7];
611
- let d;
612
- return e[8] !== t || e[9] !== a || e[10] !== n ? (d = /* @__PURE__ */ g("div", { className: a, "data-ox-slot": "endless-list-loader", ...t, children: n }), e[8] = t, e[9] = a, e[10] = n, e[11] = d) : d = e[11], d;
613
- }, dt = Object.assign(Ge, {
614
- Empty: We,
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
- o = i.left, r = i.top - e.height - t;
620
+ t = n.left, r = n.top - e.height - o;
622
621
  break;
623
622
  case "bottom":
624
- o = i.left, r = i.bottom + t;
623
+ t = n.left, r = n.bottom + o;
625
624
  break;
626
625
  case "left":
627
- o = i.left - e.width - t, r = i.top;
626
+ t = n.left - e.width - o, r = n.top;
628
627
  break;
629
628
  case "right":
630
- o = i.right + t, r = i.top;
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
- o = i.left + (i.width - e.width) / 2;
637
+ t = n.left + (n.width - e.width) / 2;
639
638
  break;
640
639
  case "end":
641
- o = i.right - e.width;
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 = i.top + (i.height - e.height) / 2;
648
+ r = n.top + (n.height - e.height) / 2;
650
649
  break;
651
650
  case "end":
652
- r = i.bottom - e.height;
651
+ r = n.bottom - e.height;
653
652
  break;
654
653
  }
655
654
  return {
656
- x: o,
655
+ x: t,
657
656
  y: r
658
657
  };
659
- }, Xe = ({
660
- align: i = "center",
658
+ }, tt = ({
659
+ align: n = "center",
661
660
  animationDuration: e = 0,
662
661
  ariaHaspopup: s,
663
662
  children: l,
664
- defaultOpen: t = !1,
665
- disabled: o = !1,
663
+ defaultOpen: o = !1,
664
+ disabled: t = !1,
666
665
  hoverDelay: r = 0,
667
- id: a,
668
- offset: n = 8,
669
- onOpenChange: d,
666
+ id: c,
667
+ offset: i = 8,
668
+ onOpenChange: a,
670
669
  open: u,
671
- position: c = "top",
672
- trigger: f = "hover",
673
- useAriaControls: x = !0
670
+ position: f = "top",
671
+ trigger: d = "hover",
672
+ useAriaControls: m = !0
674
673
  }) => {
675
- const h = Oe(), [p, O] = X(t), [C, L] = X(!1), [v, P] = X(!1), y = J(null), k = J(null), j = J(null), _ = u !== void 0, T = o ? !1 : _ ? u : p, R = a || h, V = ae((E) => {
676
- o || (!E && T ? (L(!0), setTimeout(() => {
677
- d?.(!1), _ || O(!1), L(!1);
678
- }, e)) : (d?.(E), _ || O(E)));
679
- }, [o, _, d, T, e]), $ = ae(() => {
680
- if (!y.current || !k.current || !T) return;
681
- const E = y.current.getBoundingClientRect(), N = k.current.getBoundingClientRect(), B = {
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 H = c;
686
- c === "top" && E.top < N.height + n ? H = "bottom" : c === "bottom" && E.bottom + N.height + n > B.height ? H = "top" : c === "left" && E.left < N.width + n ? H = "right" : c === "right" && E.right + N.width + n > B.width && (H = "left");
687
- const Y = qe(E, N, H, i, n);
688
- k.current && (k.current.style.left = `${Y.x}px`, k.current.style.top = `${Y.y}px`, k.current.style.visibility = "visible", k.current.dataset.oxSide = H, P(!0));
689
- }, [T, c, i, n]);
690
- return q(() => {
691
- T || P(!1);
692
- }, [T]), q(() => () => {
693
- j.current && clearTimeout(j.current);
694
- }, []), q(() => {
695
- if (!T || f !== "click") return;
696
- const E = (N) => {
697
- y.current && !y.current.contains(N.target) && k.current && !k.current.contains(N.target) && V(!1);
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", E), () => document.removeEventListener("mousedown", E);
700
- }, [T, V, f]), q(() => {
701
- if (T) {
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 E = () => $(), N = () => $();
706
- return window.addEventListener("resize", E), window.addEventListener("scroll", N, !0), () => {
707
- window.removeEventListener("resize", E), window.removeEventListener("scroll", N, !0);
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
- }, [T, c, i, n, $]), /* @__PURE__ */ g(pe.Provider, { value: {
709
+ }, [k, f, n, i, P]), /* @__PURE__ */ y(ve.Provider, { value: {
711
710
  ariaHaspopup: s,
712
- closing: C,
713
- contentRef: k,
714
- disabled: o,
711
+ closing: _,
712
+ contentRef: x,
713
+ disabled: t,
715
714
  hoverDelay: r,
716
- hoverTimeoutRef: j,
717
- id: R,
718
- isPositioned: v,
719
- open: T,
720
- setOpen: V,
721
- trigger: f,
722
- triggerRef: y,
723
- useAriaControls: x
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 ve() {
727
- const i = oe(pe);
728
- if (i === void 0)
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 i;
729
+ return n;
731
730
  }
732
- const Je = (i) => i ? "open" : "closed", Qe = (i) => {
731
+ const st = (n) => n ? "open" : "closed", ot = (n) => {
733
732
  const e = F.c(19);
734
- let s, l, t, o, r;
735
- e[0] !== i ? ({
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: o,
740
- ...t
741
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t, e[4] = o, e[5] = r) : (s = e[1], l = e[2], t = e[3], o = e[4], r = e[5]);
742
- const a = r === void 0 ? !0 : r, {
743
- closing: n,
744
- contentRef: d,
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: c,
747
- open: f
748
- } = ve();
749
- let x;
750
- e[6] !== s || e[7] !== l || e[8] !== n || e[9] !== d || e[10] !== t || e[11] !== u || e[12] !== c || e[13] !== f || e[14] !== o ? (x = f || n ? /* @__PURE__ */ g("div", { id: u, "aria-hidden": !f && !n, className: z("fixed z-50", l), "data-ox-slot": "floating-content", "data-ox-state": n ? "closing" : Je(f), ref: d, style: {
751
- ...o,
752
- visibility: c ? "visible" : "hidden"
753
- }, ...t, children: s }) : null, e[6] = s, e[7] = l, e[8] = n, e[9] = d, e[10] = t, e[11] = u, e[12] = c, e[13] = f, e[14] = o, e[15] = x) : x = e[15];
754
- const h = x;
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] !== a ? (p = a && typeof document < "u" ? Ce(h, document.body) : h, e[16] = h, e[17] = a, e[18] = p) : p = e[18], p;
757
- }, Ze = Se("OxFloatingTrigger", "div"), et = (i) => {
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, t, o;
760
- e[0] !== i ? ({
761
- asChild: s,
762
- children: l,
763
- className: t,
758
+ let s, l, o, t;
759
+ e[0] !== n ? ({
760
+ asSlot: t,
761
+ children: s,
762
+ className: l,
764
763
  ...o
765
- } = i, e[0] = i, e[1] = s, e[2] = l, e[3] = t, e[4] = o) : (s = e[1], l = e[2], t = e[3], o = e[4]);
766
- const {
767
- ariaHaspopup: r,
768
- hoverDelay: a,
769
- hoverTimeoutRef: n,
770
- id: d,
771
- open: u,
772
- setOpen: c,
773
- trigger: f,
774
- triggerRef: x,
775
- useAriaControls: h
776
- } = ve();
777
- let p;
778
- e[5] !== a || e[6] !== n || e[7] !== c || e[8] !== f ? (p = () => {
779
- f === "hover" && (n.current && clearTimeout(n.current), a > 0 ? n.current = globalThis.setTimeout(() => {
780
- c(!0);
781
- }, a) : c(!0));
782
- }, e[5] = a, e[6] = n, e[7] = c, e[8] = f, e[9] = p) : p = e[9];
783
- const O = p;
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[10] !== n || e[11] !== c || e[12] !== f ? (C = () => {
786
- f === "hover" && (n.current && (clearTimeout(n.current), n.current = null), c(!1));
787
- }, e[10] = n, e[11] = c, e[12] = f, e[13] = C) : C = e[13];
788
- const L = C;
789
- let v;
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": V,
812
- ref: x,
813
- onBlur: _,
814
- onClick: P,
815
- onFocus: k,
816
- onMouseEnter: O,
817
- onMouseLeave: L,
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] = 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, e[36] = $) : $ = e[36];
820
- const E = $;
821
- if (s) {
822
- let H;
823
- return e[37] !== l || e[38] !== t || e[39] !== E ? (H = /* @__PURE__ */ g(Ze, { className: t, ...E, children: l }), e[37] = l, e[38] = t, e[39] = E, e[40] = H) : H = e[40], H;
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 N;
826
- e[41] !== t ? (N = z("w-full", t), e[41] = t, e[42] = N) : N = e[42];
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] !== l || e[44] !== N || e[45] !== E ? (B = /* @__PURE__ */ g("div", { className: N, ...E, children: l }), e[43] = l, e[44] = N, e[45] = E, e[46] = B) : B = e[46], B;
829
- }, ft = Object.assign(Xe, {
830
- Content: Qe,
831
- Trigger: et
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
- dt as OxEndlessList,
835
- ft as OxFloating,
836
- pe as OxFloatingContext,
837
- rt as OxLegacyHeader,
838
- at as OxLegacyMainContent,
839
- ct as OxLegacySidebar,
840
- ve as useOxFloatingContext,
841
- Me as useVirtualList
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
  };