neatkit 0.8.0 → 0.9.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 (82) hide show
  1. package/dist/Boundary.cjs +1 -1
  2. package/dist/Boundary.js +29 -29
  3. package/dist/Button-BV5OUXpc.js +101 -0
  4. package/dist/Button-DU4j_IED.cjs +1 -0
  5. package/dist/Button.cjs +1 -1
  6. package/dist/Button.js +1 -1
  7. package/dist/Checkbox.cjs +1 -1
  8. package/dist/Checkbox.js +1 -1
  9. package/dist/{Code-JDb4VFl7.cjs → Code-B7s_rN0G.cjs} +1 -1
  10. package/dist/{Code-ClkozPlv.js → Code-Bp2X1k-g.js} +1 -4
  11. package/dist/Code.cjs +1 -1
  12. package/dist/Code.js +1 -1
  13. package/dist/Divider-C7XGlr26.cjs +1 -0
  14. package/dist/{Divider-BE15WVDI.js → Divider-DZgpYpr-.js} +1 -1
  15. package/dist/Divider.cjs +1 -1
  16. package/dist/Divider.js +1 -1
  17. package/dist/Icon-BIBzgznI.cjs +1 -0
  18. package/dist/{Icon-BoEUoOk7.js → Icon-CxK1wlGk.js} +98 -52
  19. package/dist/Icon.cjs +1 -1
  20. package/dist/Icon.js +1 -1
  21. package/dist/Input.cjs +1 -1
  22. package/dist/Input.js +1 -1
  23. package/dist/Markdown.cjs +1 -1
  24. package/dist/Markdown.js +108 -104
  25. package/dist/Modal.cjs +1 -1
  26. package/dist/Modal.js +1 -1
  27. package/dist/Popover.cjs +1 -1
  28. package/dist/Popover.js +147 -141
  29. package/dist/Select.cjs +1 -1
  30. package/dist/Select.js +2 -2
  31. package/dist/Sidebar.cjs +1 -1
  32. package/dist/Sidebar.js +310 -295
  33. package/dist/Table-CADupJEU.js +423 -0
  34. package/dist/Table-qetwZpTC.cjs +1 -0
  35. package/dist/Table.cjs +1 -1
  36. package/dist/Table.js +1 -1
  37. package/dist/{Tooltip-B4bajPtk.cjs → Tooltip-B2d5ss7S.cjs} +1 -1
  38. package/dist/{Tooltip-BVqdnKK_.js → Tooltip-BK64rkxV.js} +1 -1
  39. package/dist/Tooltip.cjs +1 -1
  40. package/dist/Tooltip.js +1 -1
  41. package/dist/albert-sans-cb3e34c4.woff2 +0 -0
  42. package/dist/components/Icon/icons/GearIcon.d.ts +11 -0
  43. package/dist/components/Icon/icons/ImageIcon.d.ts +11 -0
  44. package/dist/components/Icon/utils/registry.d.ts +2 -0
  45. package/dist/components/Sidebar/Sidebar.d.ts +6 -1
  46. package/dist/components/Sidebar/components/SidebarFooter.d.ts +5 -0
  47. package/dist/components/Sidebar/components/SidebarGroup.d.ts +5 -16
  48. package/dist/components/Sidebar/components/SidebarHeader.d.ts +29 -0
  49. package/dist/components/Sidebar/components/SidebarItem.d.ts +3 -0
  50. package/dist/components/Sidebar/components/SidebarPanel.d.ts +2 -2
  51. package/dist/components/Sidebar/hooks/usePresentation.d.ts +2 -2
  52. package/dist/components/Sidebar/index.d.ts +1 -1
  53. package/dist/components/Sidebar/utils/presentation.d.ts +12 -0
  54. package/dist/components/Sidebar/utils/state.d.ts +2 -2
  55. package/dist/components/Table/Table.d.ts +21 -209
  56. package/dist/components/Table/components/TableAction.d.ts +18 -0
  57. package/dist/components/Table/components/TableActionCell.d.ts +15 -0
  58. package/dist/components/Table/components/TableActionHeaderCell.d.ts +13 -0
  59. package/dist/components/Table/components/TableBody.d.ts +27 -0
  60. package/dist/components/Table/components/TableCell.d.ts +42 -0
  61. package/dist/components/Table/components/TableFoot.d.ts +19 -0
  62. package/dist/components/Table/components/TableHead.d.ts +19 -0
  63. package/dist/components/Table/components/TableHeaderCell.d.ts +23 -0
  64. package/dist/components/Table/components/TableRow.d.ts +67 -0
  65. package/dist/components/Table/hooks/useHorizontalOverflow.d.ts +25 -0
  66. package/dist/components/Table/utils/cell.d.ts +25 -0
  67. package/dist/components/Table/utils/children.d.ts +18 -0
  68. package/dist/components/Table/utils/trigger.d.ts +54 -0
  69. package/dist/floating-position-DIjh2wnP.cjs +1 -0
  70. package/dist/floating-position-DvR6e334.js +50 -0
  71. package/dist/style.css +1 -1
  72. package/dist/{useFloatingPosition-CMirP2-2.js → useFloatingPosition-B3ZC-v3v.js} +1 -1
  73. package/dist/{useFloatingPosition-BBEUHPqy.cjs → useFloatingPosition-GzkP9dCc.cjs} +1 -1
  74. package/package.json +2 -1
  75. package/dist/Button-Chv4O66e.js +0 -99
  76. package/dist/Button-DCKtFvSo.cjs +0 -1
  77. package/dist/Divider-CJYbFcSX.cjs +0 -1
  78. package/dist/Icon-DJ4BigRz.cjs +0 -1
  79. package/dist/Table-B30TBckZ.js +0 -402
  80. package/dist/Table-DceR12X9.cjs +0 -1
  81. package/dist/floating-position-5wJ5G5IT.js +0 -48
  82. package/dist/floating-position-Cy9xxdH4.cjs +0 -1
package/dist/Popover.js CHANGED
@@ -1,231 +1,237 @@
1
1
  "use client";
2
- import { jsxs as re, Fragment as Se, jsx as T } from "react/jsx-runtime";
3
- import { forwardRef as Fe, Fragment as Le, useId as Ne, useContext as Be, useState as K, useRef as b, useReducer as _e, useMemo as Ke, useCallback as v, useEffect as j, cloneElement as je } from "react";
4
- import { m as qe } from "./aria-CeA9QfD1.js";
5
- import { u as ze } from "./effects-D5CWf-Pl.js";
6
- import { g as Ae, a as ne } from "./reference-CXMr27nM.js";
7
- import { F as te, c as Me, b as $e, d as He, e as Ve, P as Ue } from "./usePresence-CqegYqy4.js";
8
- import { u as Ge } from "./useFloatingPosition-CMirP2-2.js";
9
- import { u as Je } from "./useFocusTrap-DhVnlboe.js";
10
- import { S as Qe } from "./Surface-vEFsZC12.js";
11
- function We(o) {
2
+ import { jsxs as ne, Fragment as Le, jsx as I } from "react/jsx-runtime";
3
+ import { forwardRef as Ne, Fragment as Be, useId as _e, useContext as Ke, useState as q, useRef as v, useReducer as je, useMemo as qe, useCallback as y, useEffect as z, cloneElement as ze } from "react";
4
+ import { m as Ae } from "./aria-CeA9QfD1.js";
5
+ import { u as Me } from "./effects-D5CWf-Pl.js";
6
+ import { g as $e, a as se } from "./reference-CXMr27nM.js";
7
+ import { F as oe, c as He, b as Ve, d as Ue, e as Ge, P as Je } from "./usePresence-CqegYqy4.js";
8
+ import { u as Qe } from "./useFloatingPosition-B3ZC-v3v.js";
9
+ import { u as We } from "./useFocusTrap-DhVnlboe.js";
10
+ import { S as Xe } from "./Surface-vEFsZC12.js";
11
+ function Ye(o) {
12
12
  const { inert: a, panelElement: i } = o;
13
- return ze(() => {
13
+ return Me(() => {
14
14
  i && (i.inert = a);
15
15
  }, [a, i]), null;
16
16
  }
17
- function Xe(o, a, i) {
18
- a.current = o, ne(i, o);
17
+ function Ze(o, a, i) {
18
+ a.current = o, se(i, o);
19
19
  }
20
- function Ye(o, a, i) {
21
- a.current = o, ne(i, o);
20
+ function er(o, a, i) {
21
+ a.current = o, se(i, o);
22
22
  }
23
- function Ze(o) {
23
+ function rr(o) {
24
24
  const a = o.tagName.toLowerCase();
25
25
  return o.getAttribute("role") === "button" && a !== "button" ? !1 : ["button", "input", "select", "summary", "textarea"].includes(a) ? !0 : a === "a" && o.hasAttribute("href");
26
26
  }
27
- function er(o) {
27
+ function tr(o) {
28
28
  return o === "grid" || o === "listbox" || o === "menu" || o === "tree" ? o : "dialog";
29
29
  }
30
- const dr = Fe(function(a, i) {
30
+ const pr = Ne(function(a, i) {
31
31
  const {
32
- "aria-label": q,
33
- "aria-labelledby": oe,
34
- autoFocus: D = !0,
35
- children: se,
36
- className: ae,
37
- closeOnEscape: ie = !0,
38
- closeOnOutsideInteraction: ce = !0,
39
- defaultOpen: le = !1,
40
- disabled: I = !1,
41
- initialFocusReference: y,
42
- onEscapeKeyDown: ue,
43
- onOpenChange: R,
44
- onPointerDownOutside: x,
45
- open: z,
46
- placement: A = "bottom",
47
- restoreFocus: S = !0,
48
- role: M = "dialog",
49
- style: $,
50
- tabIndex: de,
51
- trapFocus: p = !1,
32
+ "aria-label": A,
33
+ "aria-labelledby": ae,
34
+ autoFocus: F = !0,
35
+ children: ie,
36
+ className: ce,
37
+ closeOnEscape: le = !0,
38
+ closeOnOutsideInteraction: ue = !0,
39
+ defaultOpen: de = !1,
40
+ disabled: R = !1,
41
+ initialFocusReference: h,
42
+ onEscapeKeyDown: fe,
43
+ onOpenChange: x,
44
+ onPointerDownOutside: k,
45
+ open: M,
46
+ placement: $ = "bottom",
47
+ restoreFocus: L = !0,
48
+ role: H = "dialog",
49
+ style: V,
50
+ tabIndex: pe,
51
+ trapFocus: m = !1,
52
52
  trigger: l,
53
- ...fe
53
+ ...me
54
54
  } = a;
55
- if (l.type === Le)
55
+ if (l.type === Be)
56
56
  throw new Error("Popover requires a single non-Fragment trigger");
57
- const H = Ne(), pe = Be(te), V = `${H}-popover`, n = l.props, U = Ae(l), G = n.id ?? `${H}-trigger`, h = I || n.disabled === !0 || n["aria-disabled"] === !0 || n["aria-disabled"] === "true", P = z !== void 0, [me, ge] = K(le), r = P ? z : me, k = Me(r), J = b(null), Q = b(null), F = b("programmatic"), L = b(null), W = b(r), O = b(null), [be, ve] = _e(
57
+ const U = _e(), ge = Ke(oe), G = `${U}-popover`, n = l.props, J = $e(l), Q = n.id ?? `${U}-trigger`, P = R || n.disabled === !0 || n["aria-disabled"] === !0 || n["aria-disabled"] === "true", E = M !== void 0, [be, ve] = q(de), r = E ? M : be, O = He(r), W = v(null), X = v(null), N = v("programmatic"), B = v(null), Y = v(r), T = v(null), [ye, he] = je(
58
58
  (e) => e + 1,
59
59
  0
60
- ), [c, ye] = K(null), [u, he] = K(null), s = (c == null ? void 0 : c.ownerDocument) ?? (typeof document > "u" ? null : document), w = $e("Popover").boundaryElement, C = He(k.present, w), Pe = Ke(
61
- () => [J, Q],
60
+ ), [c, Pe] = q(null), [u, Ee] = q(null), s = (c == null ? void 0 : c.ownerDocument) ?? (typeof document > "u" ? null : document), w = Ve("Popover").boundaryElement, C = Ue(O.present, w), Te = qe(
61
+ () => [W, X],
62
62
  []
63
- ), d = Ge(
64
- k.present,
65
- A,
63
+ ), d = Qe(
64
+ O.present,
65
+ $,
66
66
  c,
67
67
  u,
68
68
  w
69
- ), Ee = v(
69
+ ), Ie = y(
70
70
  (e) => {
71
- Ye(
71
+ er(
72
72
  e,
73
- J,
74
- U
75
- ), ye(e);
73
+ W,
74
+ J
75
+ ), Pe(e);
76
76
  },
77
- [U]
78
- ), Te = v(
77
+ [J]
78
+ ), Re = y(
79
79
  (e) => {
80
- Xe(
80
+ Ze(
81
81
  e,
82
- Q,
82
+ X,
83
83
  i
84
- ), he(e);
84
+ ), Ee(e);
85
85
  },
86
86
  [i]
87
- ), f = v((e, t) => {
88
- r !== e && (P ? (L.current = {
87
+ ), f = y((e, t) => {
88
+ r !== e && (E ? (B.current = {
89
89
  open: e,
90
90
  reason: t
91
- }, ve()) : (F.current = t, ge(e)), R == null || R(e, t));
92
- }, [P, R, r]), Ie = v(() => {
91
+ }, he()) : (N.current = t, ve(e)), x == null || x(e, t));
92
+ }, [E, x, r]), xe = y(() => {
93
93
  f(!1, "escape");
94
- }, [f]), Re = v(() => {
94
+ }, [f]), ke = y(() => {
95
95
  f(!1, "outside");
96
- }, [f]), xe = v((e) => {
97
- var E;
98
- if (x == null || x(e), e.defaultPrevented) return;
99
- const t = (E = s == null ? void 0 : s.defaultView) == null ? void 0 : E.HTMLElement;
100
- O.current = t ? e.composedPath().find(
101
- (g) => g instanceof t && g.tabIndex >= 0
102
- ) ?? e.target : e.target;
103
- }, [x, s]);
104
- Ve({
96
+ }, [f]), Oe = y((e) => {
97
+ var p;
98
+ if (k == null || k(e), e.defaultPrevented) return;
99
+ const t = (p = s == null ? void 0 : s.defaultView) == null ? void 0 : p.HTMLElement;
100
+ t ? T.current = e.composedPath().find(
101
+ (b) => b instanceof t && b.tabIndex >= 0
102
+ ) ?? e.target : T.current = e.target;
103
+ }, [k, s]);
104
+ Ge({
105
105
  boundary: w,
106
106
  active: r,
107
- boundaries: Pe,
108
- dismissOnEscape: ie,
109
- dismissOnPointerDownOutside: ce,
107
+ boundaries: Te,
108
+ dismissOnEscape: le,
109
+ dismissOnPointerDownOutside: ue,
110
110
  layerId: C.id,
111
- onEscapeDismiss: Ie,
112
- onEscapeKeyDown: ue,
113
- onPointerDownOutside: xe,
114
- onPointerDownOutsideDismiss: Re,
111
+ onEscapeDismiss: xe,
112
+ onEscapeKeyDown: fe,
113
+ onPointerDownOutside: Oe,
114
+ onPointerDownOutsideDismiss: ke,
115
115
  ownerDocument: s
116
116
  });
117
- const ke = Je({
117
+ const we = We({
118
118
  boundary: w,
119
- active: r && p,
120
- autoFocus: D,
119
+ active: r && m,
120
+ autoFocus: F,
121
121
  container: u,
122
- initialFocusReference: y,
122
+ initialFocusReference: h,
123
123
  layerId: C.id,
124
- restoreFocus: S
124
+ restoreFocus: L
125
125
  });
126
- j(() => {
127
- if (!r || p || !D || !u) return;
126
+ z(() => {
127
+ if (!r || m || !F || !u) return;
128
128
  let e = !0;
129
129
  return Promise.resolve().then(() => {
130
130
  if (!e) return;
131
- const t = y == null ? void 0 : y.current;
131
+ const t = h == null ? void 0 : h.current;
132
132
  (t && u.contains(t) ? t : u).focus({ preventScroll: !0 });
133
133
  }), () => {
134
134
  e = !1;
135
135
  };
136
- }, [D, y, r, u, p]), j(() => {
137
- var ee;
138
- const e = W.current;
139
- W.current = r;
140
- const t = L.current, E = P ? e !== r && (t == null ? void 0 : t.open) === r ? t.reason : "programmatic" : F.current;
141
- if (L.current = null, r) {
142
- F.current = "programmatic", O.current = null;
136
+ }, [F, h, r, u, m]), z(() => {
137
+ var te;
138
+ const e = Y.current;
139
+ Y.current = r;
140
+ const t = B.current;
141
+ let p = N.current;
142
+ if (E && (p = "programmatic", e !== r && (t == null ? void 0 : t.open) === r && (p = t.reason)), B.current = null, r) {
143
+ N.current = "programmatic", T.current = null;
143
144
  return;
144
145
  }
145
- const g = s == null ? void 0 : s.activeElement, B = O.current, _ = (ee = s == null ? void 0 : s.defaultView) == null ? void 0 : ee.HTMLElement, De = E === "outside" && _ && B instanceof _ && g instanceof _ && (B === g || B.contains(g));
146
- e && !p && S && !De && (c == null || c.focus({ preventScroll: !0 })), O.current = null;
146
+ const b = s == null ? void 0 : s.activeElement, K = T.current, j = (te = s == null ? void 0 : s.defaultView) == null ? void 0 : te.HTMLElement, Fe = p === "outside" && j && K instanceof j && b instanceof j && (K === b || K.contains(b));
147
+ e && !m && L && !Fe && (c == null || c.focus({ preventScroll: !0 })), T.current = null;
147
148
  }, [
148
- be,
149
- P,
149
+ ye,
150
+ E,
150
151
  r,
151
152
  s,
152
- S,
153
- p,
153
+ L,
154
+ m,
154
155
  c
155
- ]), j(() => {
156
- I && r && f(!1, "programmatic");
157
- }, [I, r, f]);
158
- function Oe(e) {
156
+ ]), z(() => {
157
+ R && r && f(!1, "programmatic");
158
+ }, [R, r, f]);
159
+ function Ce(e) {
159
160
  var t;
160
- if (h) {
161
+ if (P) {
161
162
  e.preventDefault(), e.stopPropagation();
162
163
  return;
163
164
  }
164
165
  (t = n.onClick) == null || t.call(n, e), !e.defaultPrevented && f(!r, "trigger");
165
166
  }
166
- function we(e) {
167
+ function De(e) {
167
168
  var t;
168
- (t = n.onKeyDown) == null || t.call(n, e), !(e.defaultPrevented || h || Ze(e.currentTarget) || e.key !== "Enter" && e.key !== " ") && (e.preventDefault(), e.currentTarget.click());
169
+ (t = n.onKeyDown) == null || t.call(n, e), !(e.defaultPrevented || P || rr(e.currentTarget) || e.key !== "Enter" && e.key !== " ") && (e.preventDefault(), e.currentTarget.click());
169
170
  }
170
- if (I) return l;
171
- const N = typeof l.type == "string", m = N ? l.type : null, X = m === "a" && typeof n.href == "string", Y = N && !(m === "button" || m === "input" || m === "select" || m === "summary" || m === "textarea" || X), Z = X && h, Ce = je(
171
+ if (R) return l;
172
+ const _ = typeof l.type == "string", g = _ ? l.type : null, Z = g === "a" && typeof n.href == "string", ee = _ && !(g === "button" || g === "input" || g === "select" || g === "summary" || g === "textarea" || Z), re = Z && P;
173
+ let D = n.role;
174
+ D === void 0 && (re ? D = "link" : ee && (D = "button"));
175
+ let S = n.tabIndex;
176
+ S === void 0 && ee && (S = 0), P && (S = -1);
177
+ const Se = ze(
172
178
  l,
173
179
  {
174
- "aria-controls": r ? qe(n["aria-controls"], V) : n["aria-controls"],
180
+ "aria-controls": r ? Ae(n["aria-controls"], G) : n["aria-controls"],
175
181
  "aria-expanded": r,
176
- "aria-haspopup": n["aria-haspopup"] ?? er(M),
177
- "aria-disabled": h ? !0 : n["aria-disabled"],
182
+ "aria-haspopup": n["aria-haspopup"] ?? tr(H),
183
+ "aria-disabled": P ? !0 : n["aria-disabled"],
178
184
  className: [n.className, "nk-popover__trigger"].filter(Boolean).join(" "),
179
- href: Z ? void 0 : n.href,
180
- id: G,
181
- onClick: Oe,
182
- onKeyDown: N ? we : n.onKeyDown,
183
- ref: Ee,
184
- role: n.role ?? (Z ? "link" : Y ? "button" : void 0),
185
- tabIndex: h ? -1 : n.tabIndex ?? (Y ? 0 : void 0)
185
+ href: re ? void 0 : n.href,
186
+ id: Q,
187
+ onClick: Ce,
188
+ onKeyDown: _ ? De : n.onKeyDown,
189
+ ref: Ie,
190
+ role: D,
191
+ tabIndex: S
186
192
  }
187
193
  );
188
- return /* @__PURE__ */ re(Se, { children: [
189
- Ce,
190
- /* @__PURE__ */ T(
191
- te.Provider,
194
+ return /* @__PURE__ */ ne(Le, { children: [
195
+ Se,
196
+ /* @__PURE__ */ I(
197
+ oe.Provider,
192
198
  {
193
- value: r && p ? ke : pe,
194
- children: k.present && s ? /* @__PURE__ */ T(Ue, { children: /* @__PURE__ */ re(
195
- Qe,
199
+ value: r && m ? we : ge,
200
+ children: O.present && s ? /* @__PURE__ */ I(Je, { children: /* @__PURE__ */ ne(
201
+ Xe,
196
202
  {
197
- ...fe,
198
- ref: Te,
203
+ ...me,
204
+ ref: Re,
199
205
  "aria-hidden": r ? void 0 : !0,
200
- "aria-label": r ? q : void 0,
201
- "aria-labelledby": r ? oe ?? (q === void 0 ? G : void 0) : void 0,
202
- className: ["nk-popover", ae].filter(Boolean).join(" "),
203
- "data-placement": (d == null ? void 0 : d.placement) ?? A,
204
- "data-state": k.state === "closing" ? "closing" : "open",
205
- id: V,
206
- role: r ? M : void 0,
206
+ "aria-label": r ? A : void 0,
207
+ "aria-labelledby": r ? ae ?? (A === void 0 ? Q : void 0) : void 0,
208
+ className: ["nk-popover", ce].filter(Boolean).join(" "),
209
+ "data-placement": (d == null ? void 0 : d.placement) ?? $,
210
+ "data-state": O.state === "closing" ? "closing" : "open",
211
+ id: G,
212
+ role: r ? H : void 0,
207
213
  style: d ? {
208
- ...$,
214
+ ...V,
209
215
  "--nk-popover-arrow-offset": `${d.arrowOffset}px`,
210
216
  left: d.left,
211
217
  top: d.top,
212
218
  zIndex: C.zIndex
213
219
  } : {
214
- ...$,
220
+ ...V,
215
221
  visibility: "hidden",
216
222
  zIndex: C.zIndex
217
223
  },
218
- tabIndex: de ?? -1,
224
+ tabIndex: pe ?? -1,
219
225
  children: [
220
- /* @__PURE__ */ T(
221
- We,
226
+ /* @__PURE__ */ I(
227
+ Ye,
222
228
  {
223
229
  inert: !r,
224
230
  panelElement: u
225
231
  }
226
232
  ),
227
- /* @__PURE__ */ T("span", { "aria-hidden": "true", className: "nk-popover__arrow" }),
228
- /* @__PURE__ */ T("div", { className: "nk-popover__content", children: se })
233
+ /* @__PURE__ */ I("span", { "aria-hidden": "true", className: "nk-popover__arrow" }),
234
+ /* @__PURE__ */ I("div", { className: "nk-popover__content", children: ie })
229
235
  ]
230
236
  }
231
237
  ) }) : null
@@ -234,5 +240,5 @@ const dr = Fe(function(a, i) {
234
240
  ] });
235
241
  });
236
242
  export {
237
- dr as default
243
+ pr as default
238
244
  };
package/dist/Select.cjs CHANGED
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),a=require("react"),J=require("./aria-Bntn6ad_.cjs"),$=require("./Icon-DJ4BigRz.cjs"),O=require("./usePresence-B5RYv4e1.cjs"),ke=require("./floating-position-Cy9xxdH4.cjs"),q=8,B=4,ge=160,Ee=72;function _e(n,t,s){const i=s.bottom-n.bottom-B-q,h=n.top-s.top-B-q,d=i<ge&&h>i,c=Math.max(Ee,d?h:i),m=Math.max(n.width,(t==null?void 0:t.width)??n.width),u=s.left+q,w=Math.min(Math.max(u,n.left),Math.max(u,s.right-q-m)),r=d?Math.max(s.top+q,n.top-B-Math.min((t==null?void 0:t.height)??c,c)):n.bottom+B;return{left:w,maxHeight:c,minWidth:n.width,top:r}}function se(n,t,s){if(n.length===0)return-1;for(let i=1;i<=n.length;i+=1){const h=(t+s*i+n.length)%n.length;if(!n[h].disabled)return h}return-1}function De(n,t,s){for(let i=1;i<=n.length;i+=1){const h=(s+i+n.length)%n.length,d=n[h];if(!d.disabled&&d.label.toLocaleLowerCase().startsWith(t))return h}return-1}function Se(n){const t=new Set;n.forEach(s=>{if(t.has(s.value))throw new Error("Select option values must be unique");t.add(s.value)})}function Re(n,t,s){t.current=n,typeof s=="function"?s(n):s&&(s.current=n)}function je(n){const{"aria-invalid":t,children:s,className:i,defaultValue:h,disabled:d=!1,forwardedReference:c,invalid:m=!1,placeholder:u,style:w,value:r,...k}=n,b=J.resolveAriaInvalid(m,t),x=m||J.hasInvalidState(t);return o.jsxs("span",{className:["nk-select",i].filter(Boolean).join(" "),"data-disabled":d||void 0,"data-invalid":x||void 0,"data-mode":"native",style:w,children:[o.jsxs("select",{...k,ref:c,"aria-invalid":b,className:"nk-select__control",defaultValue:r===void 0?h??(u!==void 0?"":void 0):void 0,disabled:d,value:r,children:[u!==void 0?o.jsx("option",{disabled:!0,value:"",children:u}):null,s]}),o.jsx($.Icon,{className:"nk-select__icon",type:"chevron-down"})]})}function Oe(n,t,s,i){const[h,d]=a.useState(null);return a.useEffect(()=>{if(!n||!t||!i){d(null);return}const c=t.ownerDocument.defaultView;if(!c)return;const m=c;function u(){const k=t==null?void 0:t.getBoundingClientRect(),b=i==null?void 0:i.getBoundingClientRect();if(!k||!b||!i)return;const x=_e(k,s==null?void 0:s.getBoundingClientRect(),ke.getVisibleBounds(b,m.innerWidth,m.innerHeight));d({...x,left:x.left-b.left-i.clientLeft+i.scrollLeft,top:x.top-b.top-i.clientTop+i.scrollTop})}u(),m.addEventListener("scroll",u,!0),m.addEventListener("resize",u);const w=m.ResizeObserver,r=w?new w(u):null;return r==null||r.observe(t),r==null||r.observe(i),s&&(r==null||r.observe(s)),()=>{m.removeEventListener("scroll",u,!0),m.removeEventListener("resize",u),r==null||r.disconnect()}},[n,i,s,t]),h}function Le(n){const{active:t,closeOnEscape:s,closeOnOutsideInteraction:i,highlightedIndex:h,id:d,listboxReference:c,onEscapeDismiss:m,onEscapeKeyDown:u,onHighlight:w,onOutsideDismiss:r,onPointerDownOutside:k,onSelect:b,options:x,ownerDocument:M,position:D,selectedValue:S,state:L,triggerReference:G}=n,v=a.useRef(null),K=O.useBoundary("Select").boundaryElement,R=O.useOverlayLayer(!0,K),U=a.useMemo(()=>[G,v],[G]),X=a.useCallback(f=>{v.current=f,c(f)},[c]);return O.useDismissableLayer({active:t,boundaries:U,boundary:K,dismissOnEscape:s,dismissOnPointerDownOutside:i,layerId:R.id,onEscapeDismiss:m,onEscapeKeyDown:u,onPointerDownOutside:k,onPointerDownOutsideDismiss:r,ownerDocument:M}),o.jsx("div",{"aria-hidden":t?void 0:!0,"aria-labelledby":d,className:"nk-select__listbox","data-state":L,id:`${d}-listbox`,ref:X,role:"listbox",style:D?{left:D.left,maxHeight:D.maxHeight,minWidth:D.minWidth,top:D.top,zIndex:R.zIndex}:{visibility:"hidden",zIndex:R.zIndex},children:x.map((f,H)=>o.jsxs("div",{"aria-disabled":f.disabled||void 0,"aria-selected":f.value===S,className:"nk-select__option","data-highlighted":H===h||void 0,"data-selected":f.value===S||void 0,id:`${d}-option-${H}`,onPointerDown:Z=>{Z.preventDefault(),f.disabled||b(f)},onPointerMove:()=>{f.disabled||w(H)},role:"option",children:[f.icon?o.jsx($.Icon,{type:f.icon}):null,o.jsx("span",{className:"nk-select__option-label",children:f.label}),f.value===S?o.jsx($.Icon,{className:"nk-select__check",type:"checkmark"}):null]},f.value))})}function Pe(n){var oe;const{"aria-invalid":t,className:s,closeOnEscape:i=!0,closeOnOutsideInteraction:h=!0,defaultValue:d="",disabled:c=!1,displayOverride:m,form:u,forwardedReference:w,id:r,invalid:k=!1,name:b,onChange:x,onClick:M,onEscapeKeyDown:D,onKeyDown:S,onOpenChange:L,onPointerDownOutside:G,options:v,placeholder:K,required:R=!1,style:U,value:X,width:f,...H}=n;Se(v);const Z=a.useId(),P=r??Z,g=a.useRef(null),le=a.useRef(null),C=a.useRef(null),F=a.useRef(""),[A,ce]=a.useState(null),[p,re]=a.useState(!1),[E,V]=a.useState(-1),[de,ie]=a.useState(d),N=X!==void 0,j=N?X:de,ue=v.find(e=>e.value===j),fe=k||J.hasInvalidState(t),he=J.resolveAriaInvalid(k,t),ee=O.usePresence(p),W=((oe=g.current)==null?void 0:oe.ownerDocument)??(typeof document>"u"?null:document),me=O.useBoundary("Select").boundaryElement,ve=Oe(ee.present,g.current,A,me),pe=f===void 0?U:{...U,width:f},Q=m??ue,Ie=a.useCallback(e=>{Re(e,g,w)},[w]),I=a.useCallback(e=>{p!==e&&(re(e),L==null||L(e))},[L,p]),z=a.useCallback((e=1)=>{const l=v.findIndex(_=>_.value===j&&!_.disabled),y=e===1?-1:v.length;V(l>=0?l:se(v,y,e)),I(!0)},[v,j,I]),ae=a.useCallback(e=>{var l;c||e.disabled||(N||ie(e.value),I(!1),(l=g.current)==null||l.focus(),x==null||x(e.value))},[c,N,x,I]),xe=a.useCallback(()=>{var e;I(!1),(e=g.current)==null||e.focus()},[I]),ye=a.useCallback(()=>{I(!1)},[I]);function we(e){M==null||M(e),!(e.defaultPrevented||c)&&(p?I(!1):z())}function be(e){if(S==null||S(e),!(e.defaultPrevented||c)){if(e.key==="ArrowDown"||e.key==="ArrowUp"){e.preventDefault();const l=e.key==="ArrowDown"?1:-1;p?V(y=>se(v,y,l)):z(l);return}if(e.key==="Home"||e.key==="End"){if(e.preventDefault(),!p)z(e.key==="Home"?1:-1);else{const l=e.key==="Home"?1:-1,y=l===1?-1:v.length;V(se(v,y,l))}return}if(e.key==="Enter"||e.key===" "){e.preventDefault();const l=v[E];p&&l?ae(l):p||z();return}if(e.key==="Tab"){I(!1);return}if(e.key.length===1&&!e.altKey&&!e.ctrlKey&&!e.metaKey){const l=e.currentTarget.ownerDocument.defaultView;if(!l)return;const y=e.key.toLocaleLowerCase(),_=F.current+y,te=Array.from(_).every(ne=>ne===y);F.current=te?y:_,C.current!==null&&l.clearTimeout(C.current),C.current=l.setTimeout(()=>{F.current="",C.current=null},500);const T=De(v,F.current,E);T>=0&&(e.preventDefault(),p||I(!0),V(T))}}}return a.useEffect(()=>{c&&I(!1)},[c,I]),a.useEffect(()=>{var e;if(p&&E>=0){const l=W==null?void 0:W.getElementById(`${P}-option-${E}`);l&&(A!=null&&A.contains(l))&&((e=l.scrollIntoView)==null||e.call(l,{block:"nearest"}))}},[E,P,A,p]),a.useEffect(()=>{var y;const e=(y=g.current)==null?void 0:y.form;if(!e)return;function l(){const _=le.current,te=N?j:d;if(_){const T=Array.from(_.options),ne=T.find(Y=>Y.value===te)??T[0];T.forEach(Y=>{Y.defaultSelected=Y===ne})}N||ie(d),I(!1)}return e.addEventListener("reset",l),()=>e.removeEventListener("reset",l)},[d,u,N,j,I]),a.useEffect(()=>()=>{var l;const e=(l=g.current)==null?void 0:l.ownerDocument.defaultView;e&&C.current!==null&&e.clearTimeout(C.current)},[]),o.jsxs("span",{className:["nk-select",s].filter(Boolean).join(" "),"data-disabled":c||void 0,"data-invalid":fe||void 0,"data-mode":"custom","data-open":p||void 0,style:pe,children:[o.jsxs("button",{...H,ref:Ie,"aria-activedescendant":p&&E>=0?`${P}-option-${E}`:void 0,"aria-controls":`${P}-listbox`,"aria-expanded":p,"aria-haspopup":"listbox","aria-invalid":he,"aria-required":R||void 0,"aria-autocomplete":"none",className:"nk-select__trigger",disabled:c,form:u,id:P,onClick:we,onKeyDown:be,role:"combobox",type:"button",children:[Q?o.jsxs("span",{className:"nk-select__value",children:[Q.icon?o.jsx($.Icon,{type:Q.icon}):null,o.jsx("span",{className:"nk-select__value-label",children:Q.label})]}):o.jsx("span",{className:"nk-select__placeholder",children:K}),o.jsx($.Icon,{className:"nk-select__icon",type:"chevron-down"})]}),b||R?o.jsxs("select",{ref:le,"aria-hidden":"true",className:"nk-select__form-control",disabled:c,form:u,name:b,onChange:()=>{},onInvalid:e=>{var l;e.preventDefault(),(l=g.current)==null||l.focus()},required:R,tabIndex:-1,value:j,children:[o.jsx("option",{value:""}),v.map(e=>o.jsx("option",{disabled:e.disabled,value:e.value,children:e.label},e.value))]}):null,ee.present&&W?o.jsx(O.Portal,{children:o.jsx(Le,{active:p,closeOnEscape:i,closeOnOutsideInteraction:h,highlightedIndex:E,id:P,listboxReference:ce,onEscapeDismiss:xe,onEscapeKeyDown:D,onHighlight:V,onOutsideDismiss:ye,onPointerDownOutside:G,onSelect:ae,options:v,ownerDocument:W,position:ve,selectedValue:j,state:ee.state==="closing"?"closing":"open",triggerReference:g})}):null]})}const Ce=a.forwardRef(function(t,s){const{options:i}=t;return O.useBoundary("Select"),i!==void 0?o.jsx(Pe,{...t,forwardedReference:s}):o.jsx(je,{...t,forwardedReference:s})});exports.default=Ce;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),a=require("react"),J=require("./aria-Bntn6ad_.cjs"),$=require("./Icon-BIBzgznI.cjs"),O=require("./usePresence-B5RYv4e1.cjs"),ke=require("./floating-position-DIjh2wnP.cjs"),q=8,B=4,ge=160,Ee=72;function _e(n,t,s){const i=s.bottom-n.bottom-B-q,h=n.top-s.top-B-q,d=i<ge&&h>i,c=Math.max(Ee,d?h:i),m=Math.max(n.width,(t==null?void 0:t.width)??n.width),u=s.left+q,w=Math.min(Math.max(u,n.left),Math.max(u,s.right-q-m)),r=d?Math.max(s.top+q,n.top-B-Math.min((t==null?void 0:t.height)??c,c)):n.bottom+B;return{left:w,maxHeight:c,minWidth:n.width,top:r}}function se(n,t,s){if(n.length===0)return-1;for(let i=1;i<=n.length;i+=1){const h=(t+s*i+n.length)%n.length;if(!n[h].disabled)return h}return-1}function De(n,t,s){for(let i=1;i<=n.length;i+=1){const h=(s+i+n.length)%n.length,d=n[h];if(!d.disabled&&d.label.toLocaleLowerCase().startsWith(t))return h}return-1}function Se(n){const t=new Set;n.forEach(s=>{if(t.has(s.value))throw new Error("Select option values must be unique");t.add(s.value)})}function Re(n,t,s){t.current=n,typeof s=="function"?s(n):s&&(s.current=n)}function je(n){const{"aria-invalid":t,children:s,className:i,defaultValue:h,disabled:d=!1,forwardedReference:c,invalid:m=!1,placeholder:u,style:w,value:r,...k}=n,b=J.resolveAriaInvalid(m,t),x=m||J.hasInvalidState(t);return o.jsxs("span",{className:["nk-select",i].filter(Boolean).join(" "),"data-disabled":d||void 0,"data-invalid":x||void 0,"data-mode":"native",style:w,children:[o.jsxs("select",{...k,ref:c,"aria-invalid":b,className:"nk-select__control",defaultValue:r===void 0?h??(u!==void 0?"":void 0):void 0,disabled:d,value:r,children:[u!==void 0?o.jsx("option",{disabled:!0,value:"",children:u}):null,s]}),o.jsx($.Icon,{className:"nk-select__icon",type:"chevron-down"})]})}function Oe(n,t,s,i){const[h,d]=a.useState(null);return a.useEffect(()=>{if(!n||!t||!i){d(null);return}const c=t.ownerDocument.defaultView;if(!c)return;const m=c;function u(){const k=t==null?void 0:t.getBoundingClientRect(),b=i==null?void 0:i.getBoundingClientRect();if(!k||!b||!i)return;const x=_e(k,s==null?void 0:s.getBoundingClientRect(),ke.getVisibleBounds(b,m.innerWidth,m.innerHeight));d({...x,left:x.left-b.left-i.clientLeft+i.scrollLeft,top:x.top-b.top-i.clientTop+i.scrollTop})}u(),m.addEventListener("scroll",u,!0),m.addEventListener("resize",u);const w=m.ResizeObserver,r=w?new w(u):null;return r==null||r.observe(t),r==null||r.observe(i),s&&(r==null||r.observe(s)),()=>{m.removeEventListener("scroll",u,!0),m.removeEventListener("resize",u),r==null||r.disconnect()}},[n,i,s,t]),h}function Le(n){const{active:t,closeOnEscape:s,closeOnOutsideInteraction:i,highlightedIndex:h,id:d,listboxReference:c,onEscapeDismiss:m,onEscapeKeyDown:u,onHighlight:w,onOutsideDismiss:r,onPointerDownOutside:k,onSelect:b,options:x,ownerDocument:M,position:D,selectedValue:S,state:L,triggerReference:G}=n,v=a.useRef(null),K=O.useBoundary("Select").boundaryElement,R=O.useOverlayLayer(!0,K),U=a.useMemo(()=>[G,v],[G]),X=a.useCallback(f=>{v.current=f,c(f)},[c]);return O.useDismissableLayer({active:t,boundaries:U,boundary:K,dismissOnEscape:s,dismissOnPointerDownOutside:i,layerId:R.id,onEscapeDismiss:m,onEscapeKeyDown:u,onPointerDownOutside:k,onPointerDownOutsideDismiss:r,ownerDocument:M}),o.jsx("div",{"aria-hidden":t?void 0:!0,"aria-labelledby":d,className:"nk-select__listbox","data-state":L,id:`${d}-listbox`,ref:X,role:"listbox",style:D?{left:D.left,maxHeight:D.maxHeight,minWidth:D.minWidth,top:D.top,zIndex:R.zIndex}:{visibility:"hidden",zIndex:R.zIndex},children:x.map((f,H)=>o.jsxs("div",{"aria-disabled":f.disabled||void 0,"aria-selected":f.value===S,className:"nk-select__option","data-highlighted":H===h||void 0,"data-selected":f.value===S||void 0,id:`${d}-option-${H}`,onPointerDown:Z=>{Z.preventDefault(),f.disabled||b(f)},onPointerMove:()=>{f.disabled||w(H)},role:"option",children:[f.icon?o.jsx($.Icon,{type:f.icon}):null,o.jsx("span",{className:"nk-select__option-label",children:f.label}),f.value===S?o.jsx($.Icon,{className:"nk-select__check",type:"checkmark"}):null]},f.value))})}function Pe(n){var oe;const{"aria-invalid":t,className:s,closeOnEscape:i=!0,closeOnOutsideInteraction:h=!0,defaultValue:d="",disabled:c=!1,displayOverride:m,form:u,forwardedReference:w,id:r,invalid:k=!1,name:b,onChange:x,onClick:M,onEscapeKeyDown:D,onKeyDown:S,onOpenChange:L,onPointerDownOutside:G,options:v,placeholder:K,required:R=!1,style:U,value:X,width:f,...H}=n;Se(v);const Z=a.useId(),P=r??Z,g=a.useRef(null),le=a.useRef(null),C=a.useRef(null),F=a.useRef(""),[A,ce]=a.useState(null),[p,re]=a.useState(!1),[E,V]=a.useState(-1),[de,ie]=a.useState(d),N=X!==void 0,j=N?X:de,ue=v.find(e=>e.value===j),fe=k||J.hasInvalidState(t),he=J.resolveAriaInvalid(k,t),ee=O.usePresence(p),W=((oe=g.current)==null?void 0:oe.ownerDocument)??(typeof document>"u"?null:document),me=O.useBoundary("Select").boundaryElement,ve=Oe(ee.present,g.current,A,me),pe=f===void 0?U:{...U,width:f},Q=m??ue,Ie=a.useCallback(e=>{Re(e,g,w)},[w]),I=a.useCallback(e=>{p!==e&&(re(e),L==null||L(e))},[L,p]),z=a.useCallback((e=1)=>{const l=v.findIndex(_=>_.value===j&&!_.disabled),y=e===1?-1:v.length;V(l>=0?l:se(v,y,e)),I(!0)},[v,j,I]),ae=a.useCallback(e=>{var l;c||e.disabled||(N||ie(e.value),I(!1),(l=g.current)==null||l.focus(),x==null||x(e.value))},[c,N,x,I]),xe=a.useCallback(()=>{var e;I(!1),(e=g.current)==null||e.focus()},[I]),ye=a.useCallback(()=>{I(!1)},[I]);function we(e){M==null||M(e),!(e.defaultPrevented||c)&&(p?I(!1):z())}function be(e){if(S==null||S(e),!(e.defaultPrevented||c)){if(e.key==="ArrowDown"||e.key==="ArrowUp"){e.preventDefault();const l=e.key==="ArrowDown"?1:-1;p?V(y=>se(v,y,l)):z(l);return}if(e.key==="Home"||e.key==="End"){if(e.preventDefault(),!p)z(e.key==="Home"?1:-1);else{const l=e.key==="Home"?1:-1,y=l===1?-1:v.length;V(se(v,y,l))}return}if(e.key==="Enter"||e.key===" "){e.preventDefault();const l=v[E];p&&l?ae(l):p||z();return}if(e.key==="Tab"){I(!1);return}if(e.key.length===1&&!e.altKey&&!e.ctrlKey&&!e.metaKey){const l=e.currentTarget.ownerDocument.defaultView;if(!l)return;const y=e.key.toLocaleLowerCase(),_=F.current+y,te=Array.from(_).every(ne=>ne===y);F.current=te?y:_,C.current!==null&&l.clearTimeout(C.current),C.current=l.setTimeout(()=>{F.current="",C.current=null},500);const T=De(v,F.current,E);T>=0&&(e.preventDefault(),p||I(!0),V(T))}}}return a.useEffect(()=>{c&&I(!1)},[c,I]),a.useEffect(()=>{var e;if(p&&E>=0){const l=W==null?void 0:W.getElementById(`${P}-option-${E}`);l&&(A!=null&&A.contains(l))&&((e=l.scrollIntoView)==null||e.call(l,{block:"nearest"}))}},[E,P,A,p]),a.useEffect(()=>{var y;const e=(y=g.current)==null?void 0:y.form;if(!e)return;function l(){const _=le.current,te=N?j:d;if(_){const T=Array.from(_.options),ne=T.find(Y=>Y.value===te)??T[0];T.forEach(Y=>{Y.defaultSelected=Y===ne})}N||ie(d),I(!1)}return e.addEventListener("reset",l),()=>e.removeEventListener("reset",l)},[d,u,N,j,I]),a.useEffect(()=>()=>{var l;const e=(l=g.current)==null?void 0:l.ownerDocument.defaultView;e&&C.current!==null&&e.clearTimeout(C.current)},[]),o.jsxs("span",{className:["nk-select",s].filter(Boolean).join(" "),"data-disabled":c||void 0,"data-invalid":fe||void 0,"data-mode":"custom","data-open":p||void 0,style:pe,children:[o.jsxs("button",{...H,ref:Ie,"aria-activedescendant":p&&E>=0?`${P}-option-${E}`:void 0,"aria-controls":`${P}-listbox`,"aria-expanded":p,"aria-haspopup":"listbox","aria-invalid":he,"aria-required":R||void 0,"aria-autocomplete":"none",className:"nk-select__trigger",disabled:c,form:u,id:P,onClick:we,onKeyDown:be,role:"combobox",type:"button",children:[Q?o.jsxs("span",{className:"nk-select__value",children:[Q.icon?o.jsx($.Icon,{type:Q.icon}):null,o.jsx("span",{className:"nk-select__value-label",children:Q.label})]}):o.jsx("span",{className:"nk-select__placeholder",children:K}),o.jsx($.Icon,{className:"nk-select__icon",type:"chevron-down"})]}),b||R?o.jsxs("select",{ref:le,"aria-hidden":"true",className:"nk-select__form-control",disabled:c,form:u,name:b,onChange:()=>{},onInvalid:e=>{var l;e.preventDefault(),(l=g.current)==null||l.focus()},required:R,tabIndex:-1,value:j,children:[o.jsx("option",{value:""}),v.map(e=>o.jsx("option",{disabled:e.disabled,value:e.value,children:e.label},e.value))]}):null,ee.present&&W?o.jsx(O.Portal,{children:o.jsx(Le,{active:p,closeOnEscape:i,closeOnOutsideInteraction:h,highlightedIndex:E,id:P,listboxReference:ce,onEscapeDismiss:xe,onEscapeKeyDown:D,onHighlight:V,onOutsideDismiss:ye,onPointerDownOutside:G,onSelect:ae,options:v,ownerDocument:W,position:ve,selectedValue:j,state:ee.state==="closing"?"closing":"open",triggerReference:g})}):null]})}const Ce=a.forwardRef(function(t,s){const{options:i}=t;return O.useBoundary("Select"),i!==void 0?o.jsx(Pe,{...t,forwardedReference:s}):o.jsx(je,{...t,forwardedReference:s})});exports.default=Ce;
package/dist/Select.js CHANGED
@@ -2,9 +2,9 @@
2
2
  import { jsx as h, jsxs as S } from "react/jsx-runtime";
3
3
  import { forwardRef as Oe, useId as xe, useRef as K, useState as j, useCallback as R, useEffect as U, useMemo as Re } from "react";
4
4
  import { h as ue, r as fe } from "./aria-CeA9QfD1.js";
5
- import { I as X } from "./Icon-BoEUoOk7.js";
5
+ import { I as X } from "./Icon-CxK1wlGk.js";
6
6
  import { b as oe, c as Se, P as Ne, d as Pe, e as Te } from "./usePresence-CqegYqy4.js";
7
- import { g as He } from "./floating-position-5wJ5G5IT.js";
7
+ import { g as He } from "./floating-position-DvR6e334.js";
8
8
  const G = 8, ee = 4, Ce = 160, Me = 72;
9
9
  function Ve(n, t, l) {
10
10
  const a = l.bottom - n.bottom - ee - G, u = n.top - l.top - ee - G, c = a < Ce && u > a, o = Math.max(
package/dist/Sidebar.cjs CHANGED
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),s=require("react"),I=require("./effects-D85L_7zM.cjs"),q=require("./reference-C2guRuR0.cjs"),_=require("./usePresence-B5RYv4e1.cjs"),L=require("./Text-DWYlIcPj.cjs"),H=require("./Button-DCKtFvSo.cjs"),Q=require("./useFocusTrap-BrFZdMqQ.cjs"),V=require("./useScrollLock-Dy8MZaSn.cjs"),W=require("./aria-Bntn6ad_.cjs"),X=require("./Avatar-Belo7qAY.cjs"),Y=require("./Spinner-BXgw60UC.cjs"),Z=require("./Tooltip-B4bajPtk.cjs"),ee=require("./units-PzuiQNnw.cjs"),ne=s.forwardRef(function(r,e){const{children:n,className:u,...c}=r;return o.jsx("div",{...c,ref:e,className:["nk-sidebar__footer",u].filter(Boolean).join(" "),children:n})}),P=new WeakMap;function J(i){const r=P.get(i);if(r)return r;const e={listeners:new Set,owner:null,state:void 0};return P.set(i,e),e}function re(i,r,e){const n=J(i);return n.owner!==null&&n.owner!==r?!1:(n.owner=r,n.state=e,n.listeners.forEach(u=>u()),!0)}function se(i,r){const e=P.get(i);!e||e.owner!==r||(e.owner=null,e.state=void 0,e.listeners.forEach(n=>n()))}function te(i){var r;return i?(r=P.get(i))==null?void 0:r.state:void 0}function ae(i,r){if(!i)return()=>{};const e=J(i);return e.listeners.add(r),()=>{e.listeners.delete(r)}}const ie=()=>{};function F(i){const r=_.useBoundary(i).boundaryElement,e=s.useCallback(u=>ae(r,u),[r]),n=s.useCallback(()=>te(r),[r]);return s.useSyncExternalStore(e,n,ie)}const oe=s.forwardRef(function(r,e){const{"aria-label":n,"aria-labelledby":u,children:c,className:f,label:b,presentation:h="both",...m}=r,g=F("Sidebar.Group"),v=`${s.useId()}-label`,l=(g==null?void 0:g.presentation)==="overlay"?"overlay":"inline",p=b!=null&&typeof b!="boolean"&&(typeof b!="string"||b.trim()!=="");if(h!=="both"&&h!==l)return null;const t=u??(n===void 0&&p?v:void 0),a=!!(n??t);return s.createElement(a?"nav":"div",{...m,ref:e,"aria-label":n,"aria-labelledby":t,className:["nk-sidebar__group",f].filter(Boolean).join(" ")},p?o.jsx(L.Text,{as:"h2",className:"nk-sidebar__group-label",id:v,size:"subtitle",weight:"medium",children:b}):null,o.jsx("ul",{className:"nk-sidebar__list",children:c}))}),le=s.forwardRef(function(r,e){const{active:n=!1,as:u,children:c,className:f,disabled:b=!1,icon:h,onClick:m,type:g,...v}=r,l=F("Sidebar.Item"),p=u??"button",t=p==="button",a=v,d=a.href!==void 0||a.to!==void 0;function k(y){if(b){y.preventDefault();return}m==null||m(y),l!=null&&l.open&&l.presentation==="overlay"&&!y.defaultPrevented&&l.requestOpenChange(!1,"item")}return o.jsx("li",{className:"nk-sidebar__item-container",children:o.jsx(H.Button,{...v,ref:e,"aria-current":n?d?"page":"true":void 0,as:p,className:["nk-sidebar__item",f].filter(Boolean).join(" "),"data-active":n||void 0,disabled:b,fullWidth:!0,href:a.href,icon:h,onClick:k,shape:"rectangle",textAlignment:"left",type:t?g??"button":g,variant:"ghost",children:o.jsx("span",{className:"nk-sidebar__item-label",children:c})})})});function K(i){const{"aria-label":r,"aria-labelledby":e,children:n,className:u,top:c,open:f,panelId:b,panelReference:h,presentation:m,side:g,state:v,style:l,width:p,...t}=i,a=m==="overlay",d=r??(e===void 0?"Sidebar":void 0),k=a&&f,y=p===void 0&&c===void 0?l:{...l,...c===void 0?void 0:{"--nk-sidebar-top-offset":c},...p===void 0?void 0:{"--nk-sidebar-width":p}};return o.jsx("aside",{...t,ref:h,"aria-hidden":a&&!f?!0:void 0,"aria-label":a&&!f?void 0:d,"aria-labelledby":a&&!f?void 0:e,"aria-modal":k?"true":void 0,className:["nk-sidebar",u].filter(Boolean).join(" "),"data-responsive":m==="pending"||void 0,"data-side":g,"data-state":v,"data-variant":a?"overlay":"inline",id:b,role:k?"dialog":void 0,style:y,tabIndex:a?-1:void 0,children:o.jsx("div",{className:"nk-sidebar__body",children:n})})}function ce(i){const{boundaries:r,initialFocusReference:e,lockScroll:n,ownerDocument:u,panelReference:c,presenceState:f,restoreFocus:b,sidebar:h,side:m,...g}=i,{id:v,open:l,requestOpenChange:p}=h,t=s.useContext(_.FocusScopeContext),a=s.useRef(null),[d,k]=s.useState(null),y=_.useBoundary("Sidebar").boundaryElement,E=_.useOverlayLayer(!0,y),O=s.useCallback(x=>{a.current=x,c(x),k(x)},[c]);I.useIsomorphicLayoutEffect(()=>{d&&(d.inert=!l)},[l,d]);const T=s.useCallback(()=>{p(!1,"escape")},[p]),j=s.useCallback(()=>{p(!1,"outside")},[p]);_.useDismissableLayer({boundary:y,active:l,boundaries:r,dismissOnEscape:!0,dismissOnPointerDownOutside:!0,layerId:E.id,onEscapeDismiss:T,onPointerDownOutsideDismiss:j,ownerDocument:u});const N=Q.useFocusTrap({boundary:y,active:l,container:d,initialFocusReference:e??a,layerId:E.id,restoreFocus:b});return V.useScrollLock(n&&l,u,y),o.jsx(_.FocusScopeContext.Provider,{value:l?N:t,children:o.jsx("div",{className:"nk-sidebar__overlay","data-side":m,"data-state":f,role:"presentation",style:{zIndex:E.zIndex},children:o.jsx(K,{...g,open:l,panelId:v,panelReference:O,presentation:"overlay",side:m,state:f})})})}function de(i){const{children:r}=i;if(r.type===s.Fragment)throw new Error("Sidebar.Trigger requires a single non-Fragment child");const e=F("Sidebar.Trigger"),n=r.props,u=q.getElementReference(r),c=e==null?void 0:e.registerTrigger,f=e==null?void 0:e.unregisterTrigger,b=s.useRef(null),h=s.useCallback(a=>{const d=b.current;d&&d!==a&&(f==null||f(d)),b.current=a,a&&(c==null||c(a)),q.assignElementReference(u,a)},[u,c,f]),m=s.useCallback(a=>{var d;(d=n.onClick)==null||d.call(n,a),!(a.defaultPrevented||!e)&&e.requestOpenChange(!e.open,"trigger")},[n,e]);if(!e)return null;const{id:g,open:v,presentation:l,variant:p}=e,t=v&&l==="overlay";return s.cloneElement(r,{"aria-controls":t?W.mergeIdentifiers(n["aria-controls"],g):n["aria-controls"],"aria-expanded":v,"aria-haspopup":n["aria-haspopup"]??"dialog",className:[n.className,"nk-sidebar__trigger"].filter(Boolean).join(" "),"data-sidebar-variant":p,onClick:m,ref:h})}const ue=s.forwardRef(function(r,e){const{actions:n,className:u,description:c,image:f,loading:b=!1,name:h,onClick:m,...g}=r,v=c!=null&&typeof c!="boolean",l=o.jsxs(o.Fragment,{children:[o.jsx(X.Avatar,{alt:h,"aria-hidden":!0,className:"nk-sidebar__user-avatar",image:f}),o.jsxs("span",{className:"nk-sidebar__user-text",children:[o.jsx(L.Text,{as:"span",className:"nk-sidebar__user-name",children:h}),v?o.jsx(L.Text,{as:"span",className:"nk-sidebar__user-description",size:"caption",tone:"muted",children:c}):null]})]});return o.jsx("div",{...g,ref:e,className:["nk-sidebar__user",u].filter(Boolean).join(" "),children:b?o.jsx(Y.Spinner,{className:"nk-sidebar__user-spinner",size:16}):o.jsxs(o.Fragment,{children:[m?o.jsx("button",{className:"nk-sidebar__user-details",onClick:m,type:"button",children:l}):o.jsx("div",{className:"nk-sidebar__user-details",children:l}),n!==void 0&&n.length>0?o.jsx("div",{className:"nk-sidebar__user-actions",children:n.map(p=>{const{"aria-label":t,icon:a,label:d,...k}=p;return o.jsx(Z.Tooltip2,{content:d,children:o.jsx(H.Button,{...k,"aria-label":t??d,className:"nk-sidebar__user-action",icon:a,shape:"rectangle",type:"button",variant:"ghost"})},d)})}):null]})})}),be=()=>()=>{},$=()=>{};function pe(i,r){const e=i==="responsive"?r:void 0,n=s.useSyncExternalStore((e==null?void 0:e.subscribe)??be,(e==null?void 0:e.read)??$,$);return i!=="responsive"?i:n===void 0?"pending":n>=ee.breakpoint("md")?"inline":"overlay"}const fe=s.forwardRef(function(r,e){var G;const{defaultOpen:n=!1,initialFocusReference:u,top:c,lockScroll:f=!0,onOpenChange:b,open:h,restoreFocus:m=!0,side:g="start",variant:v="responsive",width:l,...p}=r,t=_.useBoundary("Sidebar"),a=`${s.useId()}-sidebar`,d=s.useRef(Symbol("nk-sidebar")).current,k=s.useRef(null),y=pe(v,t==null?void 0:t.width),E=h!==void 0,[O,T]=s.useState(n),j=E?h:O,N=s.useRef(b);I.useIsomorphicLayoutEffect(()=>{N.current=b});const x=s.useCallback((S,R)=>{var C;j!==S&&(E||T(S),(C=N.current)==null||C.call(N,S,R))},[E,j]),D=s.useCallback(S=>{k.current=S,q.assignElementReference(e??void 0,S)},[e]),w=s.useMemo(()=>[k],[]),A=s.useCallback(S=>{w.push({current:S})},[w]),M=s.useCallback(S=>{const R=w.findIndex(C=>C.current===S);R>0&&w.splice(R,1)},[w]),B=s.useMemo(()=>({id:a,open:j,presentation:y,registerTrigger:A,requestOpenChange:x,unregisterTrigger:M,variant:v}),[j,a,y,A,x,M,v]);I.useIsomorphicLayoutEffect(()=>{const S=t==null?void 0:t.boundaryElement;if(!S)return;if(re(S,d,B)===!1)throw new Error("A Boundary supports one Sidebar. Neatkit resolves Trigger, Group, and Item interactions against the single Sidebar published to the nearest Boundary, so give each Sidebar a Boundary of its own.")},[t==null?void 0:t.boundaryElement,d,B]),I.useIsomorphicLayoutEffect(()=>{const S=t==null?void 0:t.boundaryElement;if(S)return()=>se(S,d)},[t==null?void 0:t.boundaryElement,d]),s.useEffect(()=>{y==="inline"&&x(!1,"variant")},[y,x]);const U=_.usePresence(j&&y==="overlay"),z=((G=t==null?void 0:t.boundaryElement)==null?void 0:G.ownerDocument)??(typeof document>"u"?null:document);return y!=="overlay"?o.jsx(K,{...p,top:c,open:!1,panelId:a,panelReference:D,presentation:y,side:g,width:l}):!U.present||!z?null:o.jsx(_.Portal,{children:o.jsx(ce,{...p,initialFocusReference:u,lockScroll:f,ownerDocument:z,presenceState:U.state==="closing"?"closing":"open",boundaries:w,panelReference:D,restoreFocus:m,sidebar:B,side:g,width:l})})}),me=Object.assign(fe,{Footer:ne,Group:oe,Item:le,Trigger:de,User:ue});exports.default=me;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react/jsx-runtime"),t=require("react"),C=require("./effects-D85L_7zM.cjs"),L=require("./reference-C2guRuR0.cjs"),x=require("./usePresence-B5RYv4e1.cjs"),D=require("./Text-DWYlIcPj.cjs"),J=require("./Button-DU4j_IED.cjs"),V=require("./useFocusTrap-BrFZdMqQ.cjs"),W=require("./useScrollLock-Dy8MZaSn.cjs"),X=require("./aria-Bntn6ad_.cjs"),Y=require("./Avatar-Belo7qAY.cjs"),Z=require("./Spinner-BXgw60UC.cjs"),ee=require("./Tooltip-B2d5ss7S.cjs"),ne=require("./units-PzuiQNnw.cjs"),B=new WeakMap;function K(s){const n=B.get(s);if(n)return n;const e={listeners:new Set,owner:null,state:void 0};return B.set(s,e),e}function re(s,n,e){const r=K(s);return r.owner!==null&&r.owner!==n?!1:(r.owner=n,r.state=e,r.listeners.forEach(p=>p()),!0)}function te(s,n){const e=B.get(s);!e||e.owner!==n||(e.owner=null,e.state=void 0,e.listeners.forEach(r=>r()))}function se(s){var n;return s?(n=B.get(s))==null?void 0:n.state:void 0}function ae(s,n){if(!s)return()=>{};const e=K(s);return e.listeners.add(n),()=>{e.listeners.delete(n)}}const ie=()=>{};function P(s){const n=x.useBoundary(s).boundaryElement,e=t.useCallback(p=>ae(n,p),[n]),r=t.useCallback(()=>se(n),[n]);return t.useSyncExternalStore(e,r,ie)}function O(s,n){return s==="both"||s===(n==="overlay"?"overlay":"inline")}const oe=t.forwardRef(function(n,e){const{children:r,className:p,presentation:c="both",...b}=n,o=P("Sidebar.Footer");return O(c,o==null?void 0:o.presentation)?i.jsx("div",{...b,ref:e,className:["nk-sidebar__footer",p].filter(Boolean).join(" "),children:r}):null}),le=t.forwardRef(function(n,e){const{"aria-label":r,"aria-labelledby":p,children:c,className:b,label:o,presentation:S="both",...v}=n,g=P("Sidebar.Group"),y=`${t.useId()}-label`,f=o!=null&&typeof o!="boolean"&&(typeof o!="string"||o.trim()!=="");if(!O(S,g==null?void 0:g.presentation))return null;const l=p??(r===void 0&&f?y:void 0),a=!!(r??l);return t.createElement(a?"nav":"div",{...v,ref:e,"aria-label":r,"aria-labelledby":l,className:["nk-sidebar__group",b].filter(Boolean).join(" ")},f?i.jsx(D.Text,{as:"h2",className:"nk-sidebar__group-label",id:y,size:"subtitle",weight:"medium",children:o}):null,i.jsx("ul",{className:"nk-sidebar__list",children:c}))}),ce=t.forwardRef(function(n,e){const{children:r,className:p,presentation:c="both",...b}=n,o=P("Sidebar.Header");return O(c,o==null?void 0:o.presentation)?i.jsx("div",{...b,ref:e,className:["nk-sidebar__header",p].filter(Boolean).join(" "),children:r}):null}),ue=t.forwardRef(function(n,e){const{active:r=!1,as:p,children:c,className:b,disabled:o=!1,icon:S,onClick:v,presentation:g="both",type:y,...f}=n,l=P("Sidebar.Item"),a=p??"button",u=a==="button",d=f,k=d.href!==void 0||d.to!==void 0;function m(_){if(o){_.preventDefault();return}v==null||v(_),l!=null&&l.open&&l.presentation==="overlay"&&!_.defaultPrevented&&l.requestOpenChange(!1,"item")}return O(g,l==null?void 0:l.presentation)?i.jsx("li",{className:"nk-sidebar__item-container",children:i.jsx(J.Button,{...f,ref:e,"aria-current":r?k?"page":"true":void 0,as:a,className:["nk-sidebar__item",b].filter(Boolean).join(" "),"data-active":r||void 0,disabled:o,fullWidth:!0,href:d.href,icon:S,onClick:m,shape:"rectangle",textAlignment:"left",type:u?y??"button":y,variant:"ghost",children:i.jsx("span",{className:"nk-sidebar__item-label",children:c})})}):null});function Q(s){const{"aria-label":n,"aria-labelledby":e,children:r,className:p,top:c,open:b,panelId:o,panelReference:S,presentation:v,side:g,state:y,style:f,width:l,...a}=s,u=v==="overlay",d=n??(e===void 0?"Sidebar":void 0),k=u&&b;let m=f;return(l!==void 0||c!==void 0)&&(m={...f},c!==void 0&&(m["--nk-sidebar-top-offset"]=c),l!==void 0&&(m["--nk-sidebar-width"]=l)),i.jsx("aside",{...a,ref:S,"aria-hidden":u&&!b?!0:void 0,"aria-label":u&&!b?void 0:d,"aria-labelledby":u&&!b?void 0:e,"aria-modal":k?"true":void 0,className:["nk-sidebar",p].filter(Boolean).join(" "),"data-responsive":v==="pending"||void 0,"data-side":g,"data-state":y,"data-variant":u?"overlay":"inline",id:o,role:k?"dialog":void 0,style:m,tabIndex:u?-1:void 0,children:i.jsx("div",{className:"nk-sidebar__body",children:r})})}function de(s){const{boundaries:n,initialFocusReference:e,lockScroll:r,ownerDocument:p,panelReference:c,presenceState:b,restoreFocus:o,sidebar:S,side:v,...g}=s,{id:y,open:f,requestOpenChange:l}=S,a=t.useContext(x.FocusScopeContext),u=t.useRef(null),[d,k]=t.useState(null),m=x.useBoundary("Sidebar").boundaryElement,_=x.useOverlayLayer(!0,m),T=t.useCallback(E=>{u.current=E,c(E),k(E)},[c]);C.useIsomorphicLayoutEffect(()=>{d&&(d.inert=!f)},[f,d]);const q=t.useCallback(()=>{l(!1,"escape")},[l]),j=t.useCallback(()=>{l(!1,"outside")},[l]);x.useDismissableLayer({boundary:m,active:f,boundaries:n,dismissOnEscape:!0,dismissOnPointerDownOutside:!0,layerId:_.id,onEscapeDismiss:q,onPointerDownOutsideDismiss:j,ownerDocument:p});const N=V.useFocusTrap({boundary:m,active:f,container:d,initialFocusReference:e??u,layerId:_.id,restoreFocus:o});return W.useScrollLock(r&&f,p,m),i.jsx(x.FocusScopeContext.Provider,{value:f?N:a,children:i.jsx("div",{className:"nk-sidebar__overlay","data-side":v,"data-state":b,role:"presentation",style:{zIndex:_.zIndex},children:i.jsx(Q,{...g,open:f,panelId:y,panelReference:T,presentation:"overlay",side:v,state:b})})})}function be(s){const{children:n}=s;if(n.type===t.Fragment)throw new Error("Sidebar.Trigger requires a single non-Fragment child");const e=P("Sidebar.Trigger"),r=n.props,p=L.getElementReference(n),c=e==null?void 0:e.registerTrigger,b=e==null?void 0:e.unregisterTrigger,o=t.useRef(null),S=t.useCallback(u=>{const d=o.current;d&&d!==u&&(b==null||b(d)),o.current=u,u&&(c==null||c(u)),L.assignElementReference(p,u)},[p,c,b]),v=t.useCallback(u=>{var d;(d=r.onClick)==null||d.call(r,u),!(u.defaultPrevented||!e)&&e.requestOpenChange(!e.open,"trigger")},[r,e]);if(!e)return null;const{id:g,open:y,presentation:f,variant:l}=e,a=y&&f==="overlay";return t.cloneElement(n,{"aria-controls":a?X.mergeIdentifiers(r["aria-controls"],g):r["aria-controls"],"aria-expanded":y,"aria-haspopup":r["aria-haspopup"]??"dialog",className:[r.className,"nk-sidebar__trigger"].filter(Boolean).join(" "),"data-sidebar-variant":l,onClick:v,ref:S})}const fe=t.forwardRef(function(n,e){const{actions:r,className:p,description:c,image:b,loading:o=!1,name:S,onClick:v,...g}=n,y=c!=null&&typeof c!="boolean",f=i.jsxs(i.Fragment,{children:[i.jsx(Y.Avatar,{alt:S,"aria-hidden":!0,className:"nk-sidebar__user-avatar",image:b}),i.jsxs("span",{className:"nk-sidebar__user-text",children:[i.jsx(D.Text,{as:"span",className:"nk-sidebar__user-name",children:S}),y?i.jsx(D.Text,{as:"span",className:"nk-sidebar__user-description",size:"caption",tone:"muted",children:c}):null]})]});return i.jsx("div",{...g,ref:e,className:["nk-sidebar__user",p].filter(Boolean).join(" "),children:o?i.jsx(Z.Spinner,{className:"nk-sidebar__user-spinner",size:16}):i.jsxs(i.Fragment,{children:[v?i.jsx("button",{className:"nk-sidebar__user-details",onClick:v,type:"button",children:f}):i.jsx("div",{className:"nk-sidebar__user-details",children:f}),r!==void 0&&r.length>0?i.jsx("div",{className:"nk-sidebar__user-actions",children:r.map(l=>{const{"aria-label":a,icon:u,label:d,...k}=l;return i.jsx(ee.Tooltip2,{content:d,children:i.jsx(J.Button,{...k,"aria-label":a??d,className:"nk-sidebar__user-action",icon:u,shape:"rectangle",type:"button",variant:"ghost"})},d)})}):null]})})}),pe=()=>()=>{},$=()=>{};function me(s,n){const e=s==="responsive"?n:void 0,r=t.useSyncExternalStore((e==null?void 0:e.subscribe)??pe,(e==null?void 0:e.read)??$,$);return s!=="responsive"?s:r===void 0?"pending":r>=ne.breakpoint("md")?"inline":"overlay"}const ve=t.forwardRef(function(n,e){var H;const{defaultOpen:r=!1,initialFocusReference:p,top:c,lockScroll:b=!0,onOpenChange:o,open:S,restoreFocus:v=!0,side:g="start",variant:y="responsive",width:f,...l}=n,a=x.useBoundary("Sidebar"),u=`${t.useId()}-sidebar`,d=t.useRef(Symbol("nk-sidebar")).current,k=t.useRef(null),m=me(y,a==null?void 0:a.width),_=S!==void 0,[T,q]=t.useState(r),j=_?S:T,N=t.useRef(o);C.useIsomorphicLayoutEffect(()=>{N.current=o});const E=t.useCallback((h,R)=>{var I;j!==h&&(_||q(h),(I=N.current)==null||I.call(N,h,R))},[_,j]),A=t.useCallback(h=>{k.current=h,L.assignElementReference(e??void 0,h)},[e]),w=t.useMemo(()=>[k],[]),M=t.useCallback(h=>{w.push({current:h})},[w]),U=t.useCallback(h=>{const R=w.findIndex(I=>I.current===h);R>0&&w.splice(R,1)},[w]),F=t.useMemo(()=>({id:u,open:j,presentation:m,registerTrigger:M,requestOpenChange:E,unregisterTrigger:U,variant:y}),[j,u,m,M,E,U,y]);C.useIsomorphicLayoutEffect(()=>{const h=a==null?void 0:a.boundaryElement;if(!h)return;if(re(h,d,F)===!1)throw new Error("A Boundary supports one Sidebar. Neatkit resolves Trigger, Group, and Item interactions against the single Sidebar published to the nearest Boundary, so give each Sidebar a Boundary of its own.")},[a==null?void 0:a.boundaryElement,d,F]),C.useIsomorphicLayoutEffect(()=>{const h=a==null?void 0:a.boundaryElement;if(h)return()=>te(h,d)},[a==null?void 0:a.boundaryElement,d]),t.useEffect(()=>{m==="inline"&&E(!1,"variant")},[m,E]);const z=x.usePresence(j&&m==="overlay"),G=((H=a==null?void 0:a.boundaryElement)==null?void 0:H.ownerDocument)??(typeof document>"u"?null:document);return m!=="overlay"?i.jsx(Q,{...l,top:c,open:!1,panelId:u,panelReference:A,presentation:m,side:g,width:f}):!z.present||!G?null:i.jsx(x.Portal,{children:i.jsx(de,{...l,initialFocusReference:p,lockScroll:b,ownerDocument:G,presenceState:z.state==="closing"?"closing":"open",boundaries:w,panelReference:A,restoreFocus:v,sidebar:F,side:g,width:f})})}),ye=Object.assign(ve,{Footer:oe,Group:le,Header:ce,Item:ue,Trigger:be,User:fe});exports.default=ye;