@versaur/react 1.0.14 → 1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/blocks.js CHANGED
@@ -1,93 +1,93 @@
1
- import { jsxs as b, jsx as s } from "react/jsx-runtime";
2
- import { accordionStyles as L, avatarGroupStyles as mt, tabsStyles as M, noResultsStyles as I, attributeListStyles as ut, badgeGroupStyles as pt, cardStyles as D, menuStyles as G, tableStyles as S, buttonGroupStyles as bt, topBarStyles as R, sidebarStyles as y, bottomBarStyles as P, appLayoutStyles as w, formGroupStyles as _, featuresStyles as O, modalStyles as Nt, bottomSheetStyles as yt } from "@versaur/core/blocks";
3
- import { ChevronDownIcon as W, XIcon as X } from "@versaur/icons";
4
- import { createContext as x, forwardRef as n, useRef as z, useState as H, useEffect as k, useContext as F, useLayoutEffect as vt, useId as q } from "react";
5
- import { u as v, I as J, B as E } from "./helpers-DTL6qrTe.js";
1
+ import { jsxs as b, jsx as o } from "react/jsx-runtime";
2
+ import { accordionStyles as L, avatarGroupStyles as Nt, tabsStyles as z, noResultsStyles as I, attributeListStyles as yt, badgeGroupStyles as ht, cardStyles as O, menuStyles as C, tableStyles as B, buttonGroupStyles as vt, topBarStyles as w, sidebarStyles as g, bottomBarStyles as j, appLayoutStyles as x, formGroupStyles as V, featuresStyles as _, modalStyles as ft, bottomSheetStyles as gt, pageHeaderStyles as A } from "@versaur/core/blocks";
3
+ import { ChevronDownIcon as q, XIcon as J } from "@versaur/icons";
4
+ import { createContext as F, forwardRef as n, useRef as G, useState as M, useEffect as E, useContext as H, useLayoutEffect as Tt, useId as K } from "react";
5
+ import { u as f, I as Q, B as W } from "./helpers-D23F5WBX.js";
6
6
  import { c } from "./cx-B9vmfsc1.js";
7
- import { c as K, T as A, H as ht } from "./tooltip-BMKVL6jz.js";
8
- import { checkboxStyles as $ } from "@versaur/core/forms";
9
- import { a as Q } from "./drawer-DRv9k7lp.js";
10
- import { D as ma } from "./drawer-DRv9k7lp.js";
11
- import { overlayPartsStyles as C } from "@versaur/core/utils";
12
- import { O as U, a as Y, b as ft, c as gt } from "./overlay-parts-CFeD8VN0.js";
13
- const Z = x(void 0);
14
- function Tt() {
15
- const e = F(Z);
7
+ import { e as U, d as R, c as St, H as Bt, T as At } from "./tooltip-60d7mYVa.js";
8
+ import { checkboxStyles as k } from "@versaur/core/forms";
9
+ import { a as Y } from "./drawer-BjNHPqBr.js";
10
+ import { D as va } from "./drawer-BjNHPqBr.js";
11
+ import { overlayPartsStyles as P } from "@versaur/core/utils";
12
+ import { O as Z, b as ee, c as Rt, a as wt } from "./overlay-parts-BtD-Qj_k.js";
13
+ const te = F(void 0);
14
+ function xt() {
15
+ const e = H(te);
16
16
  if (!e)
17
17
  throw new Error("Accordion.Summary must be used within an Accordion component");
18
18
  return e;
19
19
  }
20
- function St({ summary: e, open: t, onOpenChange: a, children: o, className: r, ...i }, l) {
21
- const [d, u] = H(t ?? !1), m = z(null);
22
- k(() => {
20
+ function It({ summary: e, open: t, onOpenChange: a, children: s, className: r, ...i }, l) {
21
+ const [d, u] = M(t ?? !1), m = G(null);
22
+ E(() => {
23
23
  t !== void 0 && u(t);
24
- }, [t]), k(() => {
24
+ }, [t]), E(() => {
25
25
  m.current && (m.current.open = d);
26
26
  }, [d]);
27
27
  const p = () => {
28
28
  const h = !d;
29
29
  u(h), a == null || a(h);
30
- }, N = v({ open: d ? "" : void 0 });
31
- return /* @__PURE__ */ s(Z.Provider, { value: { isOpen: d, toggle: p }, children: /* @__PURE__ */ b(
30
+ }, y = f({ open: d ? "" : void 0 });
31
+ return /* @__PURE__ */ o(te.Provider, { value: { isOpen: d, toggle: p }, children: /* @__PURE__ */ b(
32
32
  "details",
33
33
  {
34
34
  ref: l || m,
35
35
  className: c(L.item, r),
36
36
  open: d,
37
- ...N,
37
+ ...y,
38
38
  ...i,
39
39
  children: [
40
40
  e,
41
- /* @__PURE__ */ s("div", { className: L.content, children: o })
41
+ /* @__PURE__ */ o("div", { className: L.content, children: s })
42
42
  ]
43
43
  }
44
44
  ) });
45
45
  }
46
- const ee = n(St);
47
- ee.displayName = "Accordion";
48
- const te = n(
49
- ({ children: e, right: t, clamp: a = 2, className: o, ...r }, i) => {
50
- const { isOpen: l, toggle: d } = Tt(), u = z(null), m = (p) => {
46
+ const ae = n(It);
47
+ ae.displayName = "Accordion";
48
+ const se = n(
49
+ ({ children: e, right: t, clamp: a = 2, className: s, ...r }, i) => {
50
+ const { isOpen: l, toggle: d } = xt(), u = G(null), m = (p) => {
51
51
  p.preventDefault(), !(u.current && u.current.contains(p.target)) && d();
52
52
  };
53
53
  return /* @__PURE__ */ b(
54
54
  "summary",
55
55
  {
56
56
  ref: i,
57
- className: c(L.trigger, o),
57
+ className: c(L.trigger, s),
58
58
  onClick: m,
59
59
  role: "button",
60
60
  "aria-expanded": l,
61
61
  ...r,
62
62
  children: [
63
- /* @__PURE__ */ s("span", { className: L.label, style: { "--_clamp": a }, children: e }),
64
- t && /* @__PURE__ */ s("span", { ref: u, className: L.right, children: t }),
65
- /* @__PURE__ */ s("span", { className: L.chevron, children: /* @__PURE__ */ s(W, { width: 20, height: 20 }) })
63
+ /* @__PURE__ */ o("span", { className: L.label, style: { "--_clamp": a }, children: e }),
64
+ t && /* @__PURE__ */ o("span", { ref: u, className: L.right, children: t }),
65
+ /* @__PURE__ */ o("span", { className: L.chevron, children: /* @__PURE__ */ o(q, { width: 20, height: 20 }) })
66
66
  ]
67
67
  }
68
68
  );
69
69
  }
70
70
  );
71
- te.displayName = "Accordion.Summary";
72
- const Qt = Object.assign(ee, {
73
- Summary: te
74
- }), Bt = n(
71
+ se.displayName = "Accordion.Summary";
72
+ const aa = Object.assign(ae, {
73
+ Summary: se
74
+ }), Lt = n(
75
75
  ({
76
76
  direction: e = "horizontal",
77
77
  size: t = "md",
78
78
  align: a = "center",
79
- wrap: o = "nowrap",
79
+ wrap: s = "nowrap",
80
80
  "aria-label": r = "Avatar group",
81
81
  children: i,
82
82
  className: l,
83
83
  ...d
84
84
  }, u) => {
85
- const m = v({ align: a, direction: e, size: t, wrap: o });
86
- return /* @__PURE__ */ s(
85
+ const m = f({ align: a, direction: e, size: t, wrap: s });
86
+ return /* @__PURE__ */ o(
87
87
  "div",
88
88
  {
89
89
  ref: u,
90
- className: c(mt["avatar-group"], l),
90
+ className: c(Nt["avatar-group"], l),
91
91
  role: "group",
92
92
  "aria-label": r,
93
93
  ...m,
@@ -97,9 +97,9 @@ const Qt = Object.assign(ee, {
97
97
  );
98
98
  }
99
99
  );
100
- Bt.displayName = "AvatarGroup";
101
- function At(e, t) {
102
- k(() => {
100
+ Lt.displayName = "AvatarGroup";
101
+ function Ft(e, t) {
102
+ E(() => {
103
103
  if (!e.current)
104
104
  return;
105
105
  const a = new ResizeObserver(t);
@@ -108,37 +108,37 @@ function At(e, t) {
108
108
  };
109
109
  }, [e, t]);
110
110
  }
111
- const ae = x(void 0);
112
- function Rt() {
113
- const e = F(ae);
111
+ const oe = F(void 0);
112
+ function Ht() {
113
+ const e = H(oe);
114
114
  if (!e)
115
115
  throw new Error("Tabs.Item must be used within a Tabs component");
116
116
  return e;
117
117
  }
118
- const se = n(({ value: e, onChange: t, children: a, className: o }, r) => {
119
- const i = z(null), l = z(/* @__PURE__ */ new Map()), [d, u] = H(0), [m, p] = H(0), N = () => {
120
- const f = l.current.get(e);
121
- if (!f || !i.current)
118
+ const re = n(({ value: e, onChange: t, children: a, className: s }, r) => {
119
+ const i = G(null), l = G(/* @__PURE__ */ new Map()), [d, u] = M(0), [m, p] = M(0), y = () => {
120
+ const v = l.current.get(e);
121
+ if (!v || !i.current)
122
122
  return;
123
- const g = i.current.getBoundingClientRect(), T = f.getBoundingClientRect(), ct = T.left - g.left + i.current.scrollLeft, { width: dt } = T;
124
- u(ct), p(dt), f.scrollIntoView({
123
+ const N = i.current.getBoundingClientRect(), S = v.getBoundingClientRect(), $ = S.left - N.left + i.current.scrollLeft, { width: bt } = S;
124
+ u($), p(bt), v.scrollIntoView({
125
125
  behavior: "smooth",
126
126
  block: "nearest",
127
127
  inline: "center"
128
128
  });
129
- }, h = (f, g) => {
130
- g && l.current.set(f, g);
129
+ }, h = (v, N) => {
130
+ N && l.current.set(v, N);
131
131
  };
132
- vt(() => {
133
- N();
134
- }, [e]), At(i, N);
135
- const B = v({});
136
- return /* @__PURE__ */ s(ae.Provider, { value: { activeValue: e, onChange: t, registerTrigger: h }, children: /* @__PURE__ */ b("nav", { ref: K(r, i), className: c(M.tabs, o), ...B, children: [
137
- /* @__PURE__ */ s("ul", { className: M.tablist, role: "tablist", children: a }),
138
- /* @__PURE__ */ s(
132
+ Tt(() => {
133
+ y();
134
+ }, [e]), Ft(i, y);
135
+ const T = f({});
136
+ return /* @__PURE__ */ o(oe.Provider, { value: { activeValue: e, onChange: t, registerTrigger: h }, children: /* @__PURE__ */ b("nav", { ref: U(r, i), className: c(z.tabs, s), ...T, children: [
137
+ /* @__PURE__ */ o("ul", { className: z.tablist, role: "tablist", children: a }),
138
+ /* @__PURE__ */ o(
139
139
  "div",
140
140
  {
141
- className: M["tabs-thumb"],
141
+ className: z["tabs-thumb"],
142
142
  style: {
143
143
  left: `${d}px`,
144
144
  width: `${m}px`
@@ -147,45 +147,53 @@ const se = n(({ value: e, onChange: t, children: a, className: o }, r) => {
147
147
  )
148
148
  ] }) });
149
149
  });
150
- se.displayName = "Tabs";
151
- const oe = n(
152
- ({ value: e, disabled: t = !1, children: a, className: o }, r) => {
153
- const { activeValue: i, onChange: l, registerTrigger: d } = Rt(), u = i === e;
154
- let m;
155
- t ? m = "disabled" : u ? m = "active" : m = "default";
156
- const p = () => {
157
- t || l(e);
150
+ re.displayName = "Tabs";
151
+ const ie = n(
152
+ ({ value: e, disabled: t = !1, leftIcon: a, rightIcon: s, children: r, className: i }, l) => {
153
+ const { activeValue: d, onChange: u, registerTrigger: m } = Ht(), p = d === e;
154
+ let y;
155
+ t ? y = "disabled" : p ? y = "active" : y = "default";
156
+ const h = !!a, T = !!s, v = !!r;
157
+ let N;
158
+ h && T && v ? N = "both-text" : h && v ? N = "left-text" : T && v ? N = "right-text" : h && T ? N = "both" : h ? N = "left" : T && (N = "right");
159
+ const S = () => {
160
+ t || u(e);
158
161
  };
159
- return /* @__PURE__ */ s("li", { className: M.tabitem, children: /* @__PURE__ */ s(
162
+ return /* @__PURE__ */ o("li", { className: z.tabitem, children: /* @__PURE__ */ b(
160
163
  "button",
161
164
  {
162
- ref: K(r, (N) => d(e, N)),
163
- className: c(M.trigger, o),
165
+ ref: U(l, ($) => m(e, $)),
166
+ className: c(z.trigger, i),
164
167
  role: "tab",
165
168
  id: `tabs-trigger-${e}`,
166
- "aria-selected": u,
169
+ "aria-selected": p,
167
170
  "aria-controls": `tabs-panel-${e}`,
168
- "data-state": m,
171
+ "data-state": y,
172
+ ...N && { "data-icon-config": N },
169
173
  disabled: t,
170
- onClick: p,
171
- children: a
174
+ onClick: S,
175
+ children: [
176
+ a,
177
+ r,
178
+ s
179
+ ]
172
180
  }
173
181
  ) });
174
182
  }
175
183
  );
176
- oe.displayName = "Tabs.Item";
177
- function wt(e) {
184
+ ie.displayName = "Tabs.Item";
185
+ function Pt(e) {
178
186
  return {
179
187
  "aria-labelledby": `tabs-trigger-${e}`,
180
188
  id: `tabs-panel-${e}`,
181
189
  role: "tabpanel"
182
190
  };
183
191
  }
184
- const Ut = Object.assign(se, {
185
- Item: oe,
186
- getPanelAttribute: wt
187
- }), It = n(
188
- ({ icon: e, title: t, subtitle: a, action: o, className: r, ...i }, l) => /* @__PURE__ */ b(
192
+ const sa = Object.assign(re, {
193
+ Item: ie,
194
+ getPanelAttribute: Pt
195
+ }), Ct = n(
196
+ ({ icon: e, title: t, subtitle: a, action: s, className: r, ...i }, l) => /* @__PURE__ */ b(
189
197
  "section",
190
198
  {
191
199
  ref: l,
@@ -195,26 +203,26 @@ const Ut = Object.assign(se, {
195
203
  ...i,
196
204
  children: [
197
205
  /* @__PURE__ */ b("header", { className: I["no-results-header"], children: [
198
- /* @__PURE__ */ s("div", { className: I["no-results-icon"], children: /* @__PURE__ */ s(J, { as: e, color: "inherit", "aria-hidden": "true" }) }),
199
- /* @__PURE__ */ s("h5", { className: I["no-results-title"], children: t })
206
+ /* @__PURE__ */ o("div", { className: I["no-results-icon"], children: /* @__PURE__ */ o(Q, { as: e, color: "inherit", "aria-hidden": "true" }) }),
207
+ /* @__PURE__ */ o("h5", { className: I["no-results-title"], children: t })
200
208
  ] }),
201
- a && /* @__PURE__ */ s("p", { className: I["no-results-subtitle"], children: a }),
202
- o && /* @__PURE__ */ s("div", { className: I["no-results-action"], role: "group", "aria-label": "Available actions", children: o })
209
+ a && /* @__PURE__ */ o("p", { className: I["no-results-subtitle"], children: a }),
210
+ s && /* @__PURE__ */ o("div", { className: I["no-results-action"], role: "group", "aria-label": "Available actions", children: s })
203
211
  ]
204
212
  }
205
213
  )
206
214
  );
207
- It.displayName = "NoResults";
208
- const re = n(
209
- ({ layout: e, columns: t = "repeat(3, 1fr)", gap: a, children: o, className: r, style: i, ...l }, d) => {
210
- const u = v({
215
+ Ct.displayName = "NoResults";
216
+ const le = n(
217
+ ({ layout: e, columns: t = "repeat(3, 1fr)", gap: a, children: s, className: r, style: i, ...l }, d) => {
218
+ const u = f({
211
219
  layout: e
212
220
  });
213
- return /* @__PURE__ */ s(
221
+ return /* @__PURE__ */ o(
214
222
  "dl",
215
223
  {
216
224
  ref: d,
217
- className: c(ut["attribute-list"], r),
225
+ className: c(yt["attribute-list"], r),
218
226
  ...u,
219
227
  style: {
220
228
  "--_columns": t,
@@ -222,55 +230,55 @@ const re = n(
222
230
  ...i
223
231
  },
224
232
  ...l,
225
- children: o
233
+ children: s
226
234
  }
227
235
  );
228
236
  }
229
237
  );
230
- re.displayName = "AttributeList";
231
- const ie = n(
232
- ({ title: e, area: t, children: a, className: o, style: r, ...i }, l) => /* @__PURE__ */ b(
238
+ le.displayName = "AttributeList";
239
+ const ne = n(
240
+ ({ title: e, area: t, children: a, className: s, style: r, ...i }, l) => /* @__PURE__ */ b(
233
241
  "div",
234
242
  {
235
243
  ref: l,
236
- className: c(o),
244
+ className: c(s),
237
245
  style: {
238
246
  "--_area": t,
239
247
  ...r
240
248
  },
241
249
  ...i,
242
250
  children: [
243
- /* @__PURE__ */ s("dt", { children: e }),
244
- /* @__PURE__ */ s("dd", { children: a })
251
+ /* @__PURE__ */ o("dt", { children: e }),
252
+ /* @__PURE__ */ o("dd", { children: a })
245
253
  ]
246
254
  }
247
255
  )
248
256
  );
249
- ie.displayName = "AttributeList.Item";
250
- const Yt = Object.assign(re, {
251
- Item: ie
252
- }), Lt = n(
257
+ ne.displayName = "AttributeList.Item";
258
+ const oa = Object.assign(le, {
259
+ Item: ne
260
+ }), zt = n(
253
261
  ({
254
262
  gap: e = "md",
255
263
  direction: t = "horizontal",
256
264
  align: a = "center",
257
- wrap: o = "nowrap",
265
+ wrap: s = "nowrap",
258
266
  "aria-label": r = "Badge group",
259
267
  children: i,
260
268
  className: l,
261
269
  ...d
262
270
  }, u) => {
263
- const m = v({
271
+ const m = f({
264
272
  align: a,
265
273
  direction: t,
266
274
  gap: e,
267
- wrap: o
275
+ wrap: s
268
276
  });
269
- return /* @__PURE__ */ s(
277
+ return /* @__PURE__ */ o(
270
278
  "div",
271
279
  {
272
280
  ref: u,
273
- className: c(pt["badge-group"], l),
281
+ className: c(ht["badge-group"], l),
274
282
  role: "group",
275
283
  "aria-label": r,
276
284
  ...m,
@@ -280,50 +288,50 @@ const Yt = Object.assign(re, {
280
288
  );
281
289
  }
282
290
  );
283
- Lt.displayName = "BadgeGroup";
284
- function xt({ as: e = "div", size: t = "md", border: a, children: o, className: r, ...i }, l) {
285
- const d = v({
291
+ zt.displayName = "BadgeGroup";
292
+ function Gt({ as: e = "div", size: t = "md", border: a, children: s, className: r, ...i }, l) {
293
+ const d = f({
286
294
  border: a,
287
295
  interactive: e === "button" ? "true" : "false",
288
296
  size: t
289
297
  });
290
- return /* @__PURE__ */ s(e === "button" ? "button" : "div", { ref: l, className: c(D.card, r), ...d, ...i, children: o });
298
+ return /* @__PURE__ */ o(e === "button" ? "button" : "div", { ref: l, className: c(O.card, r), ...d, ...i, children: s });
291
299
  }
292
- const le = n(
293
- xt
300
+ const ce = n(
301
+ Gt
294
302
  );
295
- le.displayName = "Card";
296
- const ne = n(
297
- ({ justify: e, gap: t, children: a, className: o, ...r }, i) => {
298
- const l = v({ gap: t, justify: e });
299
- return /* @__PURE__ */ s("div", { ref: i, className: c(D.header, o), ...l, ...r, children: a });
303
+ ce.displayName = "Card";
304
+ const de = n(
305
+ ({ justify: e, gap: t, children: a, className: s, ...r }, i) => {
306
+ const l = f({ gap: t, justify: e });
307
+ return /* @__PURE__ */ o("div", { ref: i, className: c(O.header, s), ...l, ...r, children: a });
300
308
  }
301
309
  );
302
- ne.displayName = "Card.Header";
303
- const ce = n(
304
- ({ align: e, gap: t, children: a, className: o, ...r }, i) => {
305
- const l = v({ align: e, gap: t });
306
- return /* @__PURE__ */ s("div", { ref: i, className: c(D.body, o), ...l, ...r, children: a });
310
+ de.displayName = "Card.Header";
311
+ const me = n(
312
+ ({ align: e, gap: t, children: a, className: s, ...r }, i) => {
313
+ const l = f({ align: e, gap: t });
314
+ return /* @__PURE__ */ o("div", { ref: i, className: c(O.body, s), ...l, ...r, children: a });
307
315
  }
308
316
  );
309
- ce.displayName = "Card.Body";
310
- const de = n(
311
- ({ justify: e, gap: t, children: a, className: o, ...r }, i) => {
312
- const l = v({ gap: t, justify: e });
313
- return /* @__PURE__ */ s("div", { ref: i, className: c(D.footer, o), ...l, ...r, children: a });
317
+ me.displayName = "Card.Body";
318
+ const ue = n(
319
+ ({ justify: e, gap: t, children: a, className: s, ...r }, i) => {
320
+ const l = f({ gap: t, justify: e });
321
+ return /* @__PURE__ */ o("div", { ref: i, className: c(O.footer, s), ...l, ...r, children: a });
314
322
  }
315
323
  );
316
- de.displayName = "Card.Footer";
317
- const Zt = Object.assign(le, {
318
- Body: ce,
319
- Footer: de,
320
- Header: ne
321
- }), me = x(void 0), ue = n(
324
+ ue.displayName = "Card.Footer";
325
+ const ra = Object.assign(ce, {
326
+ Body: me,
327
+ Footer: ue,
328
+ Header: de
329
+ }), pe = F(void 0), be = n(
322
330
  ({
323
331
  id: e,
324
332
  placement: t,
325
333
  maxHeight: a = 400,
326
- maxWidth: o = 320,
334
+ maxWidth: s = 320,
327
335
  gap: r = 8,
328
336
  value: i,
329
337
  onChange: l,
@@ -331,105 +339,105 @@ const Zt = Object.assign(le, {
331
339
  children: u,
332
340
  ...m
333
341
  }, p) => {
334
- const N = {
342
+ const y = {
335
343
  id: e,
336
344
  closeOnClick: d,
337
345
  onChange: l,
338
346
  value: i
339
347
  };
340
- return /* @__PURE__ */ s("div", { ref: p, ...m, children: /* @__PURE__ */ s(me.Provider, { value: N, children: /* @__PURE__ */ s(A, { id: e, placement: t, gap: r, type: "persisted", children: /* @__PURE__ */ s(
348
+ return /* @__PURE__ */ o("div", { ref: p, ...m, children: /* @__PURE__ */ o(pe.Provider, { value: y, children: /* @__PURE__ */ o(R, { id: e, placement: t, gap: r, type: "persisted", children: /* @__PURE__ */ o(
341
349
  "div",
342
350
  {
343
- className: G["menu-list"],
351
+ className: C["menu-list"],
344
352
  style: {
345
353
  "--_max-height": `${a}px`,
346
- "--_max-width": `${o}px`
354
+ "--_max-width": `${s}px`
347
355
  },
348
356
  children: u
349
357
  }
350
358
  ) }) }) });
351
359
  }
352
360
  );
353
- ue.displayName = "Menu";
354
- function Ft(e) {
355
- return A.getTooltipTriggerProps({
361
+ be.displayName = "Menu";
362
+ function Mt(e) {
363
+ return R.getTooltipTriggerProps({
356
364
  id: e.id
357
365
  });
358
366
  }
359
- function Ct(e) {
360
- A.close(e);
367
+ function jt(e) {
368
+ R.close(e);
361
369
  }
362
- const V = ue;
363
- V.getTriggerProps = Ft;
364
- V.close = Ct;
365
- const pe = n(
366
- ({ value: e, disabled: t = !1, leftIcon: a, rightIcon: o, children: r, onClick: i, className: l, ...d }, u) => {
367
- const m = F(me), p = m != null && m.onChange && e !== void 0 ? m.value === e : !1, N = v({
370
+ const X = be;
371
+ X.getTriggerProps = Mt;
372
+ X.close = jt;
373
+ const Ne = n(
374
+ ({ value: e, disabled: t = !1, leftIcon: a, rightIcon: s, children: r, onClick: i, className: l, ...d }, u) => {
375
+ const m = H(pe), p = m != null && m.onChange && e !== void 0 ? m.value === e : !1, y = f({
368
376
  active: p,
369
377
  disabled: t
370
- }), h = (B) => {
378
+ }), h = (T) => {
371
379
  if (t) {
372
- B.preventDefault();
380
+ T.preventDefault();
373
381
  return;
374
382
  }
375
- m != null && m.onChange && e !== void 0 && m.onChange(e), i == null || i(B), m != null && m.closeOnClick && (m != null && m.id) && A.close({ id: m.id });
383
+ m != null && m.onChange && e !== void 0 && m.onChange(e), i == null || i(T), m != null && m.closeOnClick && (m != null && m.id) && R.close({ id: m.id });
376
384
  };
377
385
  return /* @__PURE__ */ b(
378
386
  "button",
379
387
  {
380
388
  ref: u,
381
- className: c(G["menu-item"], l),
389
+ className: c(C["menu-item"], l),
382
390
  disabled: t,
383
- ...N,
391
+ ...y,
384
392
  ...d,
385
393
  onClick: h,
386
394
  children: [
387
- a ? /* @__PURE__ */ s("span", { className: G["menu-item-icon"], children: a }) : null,
388
- /* @__PURE__ */ s("span", { className: G["menu-item-label"], children: r }),
389
- o ? /* @__PURE__ */ s("span", { className: G["menu-item-icon"], children: o }) : null
395
+ a ? /* @__PURE__ */ o("span", { className: C["menu-item-icon"], children: a }) : null,
396
+ /* @__PURE__ */ o("span", { className: C["menu-item-label"], children: r }),
397
+ s ? /* @__PURE__ */ o("span", { className: C["menu-item-icon"], children: s }) : null
390
398
  ]
391
399
  }
392
400
  );
393
401
  }
394
402
  );
395
- pe.displayName = "Menu.Item";
396
- const j = V;
397
- j.Item = pe;
398
- const be = x(void 0);
399
- function Ne() {
400
- const e = F(be);
403
+ Ne.displayName = "Menu.Item";
404
+ const D = X;
405
+ D.Item = Ne;
406
+ const ye = F(void 0);
407
+ function he() {
408
+ const e = H(ye);
401
409
  if (!e)
402
410
  throw new Error("useTableProvider must be used within a Table component");
403
411
  return e;
404
412
  }
405
- const ye = n(
406
- ({ leftContent: e, rightContent: t, className: a, ...o }, r) => {
407
- const i = Ne(), l = typeof e == "function" ? e(i.selectedRows) : e, d = typeof t == "function" ? t(i.selectedRows) : t;
408
- return /* @__PURE__ */ b("div", { ref: r, className: c(S.toolbar, a), ...o, children: [
409
- /* @__PURE__ */ s("div", { children: l }),
410
- /* @__PURE__ */ s("div", { children: d })
413
+ const ve = n(
414
+ ({ leftContent: e, rightContent: t, className: a, ...s }, r) => {
415
+ const i = he(), l = typeof e == "function" ? e(i.selectedRows) : e, d = typeof t == "function" ? t(i.selectedRows) : t;
416
+ return /* @__PURE__ */ b("div", { ref: r, className: c(B.toolbar, a), ...s, children: [
417
+ /* @__PURE__ */ o("div", { children: l }),
418
+ /* @__PURE__ */ o("div", { children: d })
411
419
  ] });
412
420
  }
413
421
  );
414
- ye.displayName = "Table.Toolbar";
415
- const ve = n(({ className: e, ...t }, a) => /* @__PURE__ */ s("div", { ref: a, className: c(S.header, e), ...t }));
416
- ve.displayName = "Table.Header";
417
- const he = n(({ className: e, ...t }, a) => /* @__PURE__ */ s("div", { ref: a, className: c(S.body, e), ...t }));
418
- he.displayName = "Table.Body";
419
- const fe = n(({ className: e, ...t }, a) => /* @__PURE__ */ s("div", { ref: a, className: c(S.footer, e), ...t }));
420
- fe.displayName = "Table.Footer";
421
- const ge = n(({ className: e, ...t }, a) => /* @__PURE__ */ s("div", { ref: a, className: c(S.row, e), ...t }));
422
- ge.displayName = "Table.Row";
423
- const Te = n(
424
- ({ as: e = "div", area: t, variant: a, className: o, style: r, ...i }, l) => {
425
- const d = v({
422
+ ve.displayName = "Table.Toolbar";
423
+ const fe = n(({ className: e, ...t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(B.header, e), ...t }));
424
+ fe.displayName = "Table.Header";
425
+ const ge = n(({ className: e, ...t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(B.body, e), ...t }));
426
+ ge.displayName = "Table.Body";
427
+ const Te = n(({ className: e, ...t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(B.footer, e), ...t }));
428
+ Te.displayName = "Table.Footer";
429
+ const Se = n(({ className: e, ...t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(B.row, e), ...t }));
430
+ Se.displayName = "Table.Row";
431
+ const Be = n(
432
+ ({ as: e = "div", area: t, variant: a, className: s, style: r, ...i }, l) => {
433
+ const d = f({
426
434
  variant: a
427
435
  });
428
- return /* @__PURE__ */ s(
436
+ return /* @__PURE__ */ o(
429
437
  e,
430
438
  {
431
439
  ref: l,
432
- className: c(S.col, o),
440
+ className: c(B.col, s),
433
441
  style: {
434
442
  "--_area": t,
435
443
  ...r
@@ -440,52 +448,52 @@ const Te = n(
440
448
  );
441
449
  }
442
450
  );
443
- Te.displayName = "Table.Col";
444
- const Se = n(
445
- ({ rowId: e, isMain: t = !1, checked: a, indeterminate: o, onChange: r }, i) => {
446
- const l = Ne(), d = t ? l.selectedRows.size === l.allRowIds.size && l.allRowIds.size > 0 : e !== void 0 && l.selectedRows.has(e);
451
+ Be.displayName = "Table.Col";
452
+ const Ae = n(
453
+ ({ rowId: e, isMain: t = !1, checked: a, indeterminate: s, onChange: r }, i) => {
454
+ const l = he(), d = t ? l.selectedRows.size === l.allRowIds.size && l.allRowIds.size > 0 : e !== void 0 && l.selectedRows.has(e);
447
455
  !t && e !== void 0 && l.registerRowId(e);
448
456
  const u = (p) => {
449
457
  t ? l.onSelectAll(Array.from(l.allRowIds), p.target.checked) : e !== void 0 && l.onSelectionChange(e, p.target.checked), r == null || r(p.target.checked);
450
458
  }, m = t && l.selectedRows.size > 0 && l.selectedRows.size < l.allRowIds.size;
451
- return /* @__PURE__ */ b("label", { className: $.checkbox, children: [
452
- /* @__PURE__ */ s(
459
+ return /* @__PURE__ */ b("label", { className: k.checkbox, children: [
460
+ /* @__PURE__ */ o(
453
461
  "input",
454
462
  {
455
463
  ref: (p) => {
456
- p && (p.indeterminate = m || o || !1, typeof i == "function" ? i(p) : i && (i.current = p));
464
+ p && (p.indeterminate = m || s || !1, typeof i == "function" ? i(p) : i && (i.current = p));
457
465
  },
458
466
  type: "checkbox",
459
- className: $.input,
467
+ className: k.input,
460
468
  checked: a !== void 0 ? a : d,
461
469
  onChange: u,
462
470
  "aria-label": t ? "Select all rows" : `Select row ${e}`
463
471
  }
464
472
  ),
465
- /* @__PURE__ */ s("span", { className: $.indicator })
473
+ /* @__PURE__ */ o("span", { className: k.indicator })
466
474
  ] });
467
475
  }
468
476
  );
469
- Se.displayName = "Table.Checkbox";
470
- const Be = n(
471
- ({ as: e = "div", title: t, subtitle: a, size: o = "md", className: r, ...i }, l) => /* @__PURE__ */ b(e, { ref: l, className: c(S.col, r), "data-variant": "double-line", ...i, children: [
472
- /* @__PURE__ */ s("div", { className: S["double-line-title"], "data-size": o, children: t }),
473
- /* @__PURE__ */ s("div", { className: S["double-line-subtitle"], "data-size": o, children: a })
477
+ Ae.displayName = "Table.Checkbox";
478
+ const Re = n(
479
+ ({ as: e = "div", title: t, subtitle: a, size: s = "md", className: r, ...i }, l) => /* @__PURE__ */ b(e, { ref: l, className: c(B.col, r), "data-variant": "double-line", ...i, children: [
480
+ /* @__PURE__ */ o("div", { className: B["double-line-title"], "data-size": s, children: t }),
481
+ /* @__PURE__ */ o("div", { className: B["double-line-subtitle"], "data-size": s, children: a })
474
482
  ] })
475
483
  );
476
- Be.displayName = "Table.DoubleLine";
477
- const Ae = j.Item;
478
- Ae.displayName = "Table.ActionItem";
479
- const Re = n(({ icon: e, children: t }, a) => {
480
- const o = q(), r = j.getTriggerProps({ id: o });
481
- return /* @__PURE__ */ b("div", { ref: a, className: c(S.action), children: [
482
- /* @__PURE__ */ s(
483
- E,
484
+ Re.displayName = "Table.DoubleLine";
485
+ const we = D.Item;
486
+ we.displayName = "Table.ActionItem";
487
+ const xe = n(({ icon: e, children: t }, a) => {
488
+ const s = K(), r = D.getTriggerProps({ id: s });
489
+ return /* @__PURE__ */ b("div", { ref: a, className: c(B.action), children: [
490
+ /* @__PURE__ */ o(
491
+ W,
484
492
  {
485
493
  ...r,
486
494
  as: e,
487
495
  variant: "ghost",
488
- className: c(S["action-trigger"]),
496
+ className: c(B["action-trigger"]),
489
497
  "aria-label": "Actions",
490
498
  onClick: (i) => {
491
499
  i.stopPropagation();
@@ -493,84 +501,84 @@ const Re = n(({ icon: e, children: t }, a) => {
493
501
  size: "small"
494
502
  }
495
503
  ),
496
- /* @__PURE__ */ s(j, { id: o, placement: "bottom", closeOnClick: !0, children: t })
504
+ /* @__PURE__ */ o(D, { id: s, placement: "bottom", closeOnClick: !0, children: t })
497
505
  ] });
498
506
  });
499
- Re.displayName = "Table.Action";
500
- const we = n(({ columns: e, children: t, className: a, style: o, onSelectionChange: r, ...i }, l) => {
501
- const [d, u] = H(/* @__PURE__ */ new Set()), m = z(/* @__PURE__ */ new Set()), p = (f, g) => {
502
- const T = new Set(d);
503
- g ? T.add(f) : T.delete(f), u(T), r == null || r({
504
- selected: T,
505
- allSelected: T.size === m.current.size && m.current.size > 0,
506
- someSelected: T.size > 0
507
+ xe.displayName = "Table.Action";
508
+ const Ie = n(({ columns: e, children: t, className: a, style: s, onSelectionChange: r, ...i }, l) => {
509
+ const [d, u] = M(/* @__PURE__ */ new Set()), m = G(/* @__PURE__ */ new Set()), p = (v, N) => {
510
+ const S = new Set(d);
511
+ N ? S.add(v) : S.delete(v), u(S), r == null || r({
512
+ selected: S,
513
+ allSelected: S.size === m.current.size && m.current.size > 0,
514
+ someSelected: S.size > 0
507
515
  });
508
- }, N = (f, g) => {
509
- const T = g ? new Set(f) : /* @__PURE__ */ new Set();
510
- u(T), r == null || r({
511
- selected: T,
512
- allSelected: g,
513
- someSelected: g
516
+ }, y = (v, N) => {
517
+ const S = N ? new Set(v) : /* @__PURE__ */ new Set();
518
+ u(S), r == null || r({
519
+ selected: S,
520
+ allSelected: N,
521
+ someSelected: N
514
522
  });
515
- }, h = (f) => {
516
- m.current.add(f);
517
- }, B = {
523
+ }, h = (v) => {
524
+ m.current.add(v);
525
+ }, T = {
518
526
  selectedRows: d,
519
527
  allRowIds: m.current,
520
528
  onSelectionChange: p,
521
- onSelectAll: N,
529
+ onSelectAll: y,
522
530
  registerRowId: h
523
531
  };
524
- return /* @__PURE__ */ s(be.Provider, { value: B, children: /* @__PURE__ */ s(
532
+ return /* @__PURE__ */ o(ye.Provider, { value: T, children: /* @__PURE__ */ o(
525
533
  "div",
526
534
  {
527
535
  ref: l,
528
- className: c(S.table, a),
536
+ className: c(B.table, a),
529
537
  style: {
530
538
  "--_columns": e,
531
- ...o
539
+ ...s
532
540
  },
533
541
  ...i,
534
542
  children: t
535
543
  }
536
544
  ) });
537
545
  });
538
- we.displayName = "Table";
539
- const ea = Object.assign(we, {
540
- Toolbar: ye,
541
- Header: ve,
542
- Body: he,
543
- Footer: fe,
544
- Row: ge,
545
- Col: Te,
546
- Checkbox: Se,
547
- DoubleLine: Be,
548
- Action: Re,
549
- ActionItem: Ae
550
- }), Gt = n(
546
+ Ie.displayName = "Table";
547
+ const ia = Object.assign(Ie, {
548
+ Toolbar: ve,
549
+ Header: fe,
550
+ Body: ge,
551
+ Footer: Te,
552
+ Row: Se,
553
+ Col: Be,
554
+ Checkbox: Ae,
555
+ DoubleLine: Re,
556
+ Action: xe,
557
+ ActionItem: we
558
+ }), Dt = n(
551
559
  ({
552
560
  gap: e = "md",
553
561
  direction: t = "horizontal",
554
562
  align: a = "center",
555
- wrap: o = "nowrap",
563
+ wrap: s = "nowrap",
556
564
  fluid: r = !1,
557
565
  "aria-label": i = "Button group",
558
566
  children: l,
559
567
  className: d,
560
568
  ...u
561
569
  }, m) => {
562
- const p = v({
570
+ const p = f({
563
571
  align: a,
564
572
  direction: t,
565
573
  fluid: r,
566
574
  gap: e,
567
- wrap: o
575
+ wrap: s
568
576
  });
569
- return /* @__PURE__ */ s(
577
+ return /* @__PURE__ */ o(
570
578
  "div",
571
579
  {
572
580
  ref: m,
573
- className: c(bt["button-group"], d),
581
+ className: c(vt["button-group"], d),
574
582
  role: "group",
575
583
  "aria-label": i,
576
584
  ...p,
@@ -580,51 +588,51 @@ const ea = Object.assign(we, {
580
588
  );
581
589
  }
582
590
  );
583
- Gt.displayName = "ButtonGroup";
584
- const Ie = n(({ children: e, className: t, ...a }, o) => /* @__PURE__ */ s("div", { ref: o, className: c(R["top-bar"], t), ...a, children: e }));
585
- Ie.displayName = "TopBar";
586
- const Le = n(({ children: e, className: t, ...a }, o) => /* @__PURE__ */ s("div", { ref: o, className: c(R["top-bar-leading"], t), ...a, children: e }));
587
- Le.displayName = "TopBar.Leading";
588
- const xe = n(({ children: e, className: t, ...a }, o) => /* @__PURE__ */ s("div", { ref: o, className: c(R["top-bar-centred"], t), ...a, children: e }));
589
- xe.displayName = "TopBar.Centred";
590
- const Fe = n(({ children: e, className: t, ...a }, o) => /* @__PURE__ */ s("div", { ref: o, className: c(R["top-bar-trailing"], t), ...a, children: e }));
591
- Fe.displayName = "TopBar.Trailing";
591
+ Dt.displayName = "ButtonGroup";
592
+ const Le = n(({ children: e, className: t, ...a }, s) => /* @__PURE__ */ o("div", { ref: s, className: c(w["top-bar"], t), ...a, children: e }));
593
+ Le.displayName = "TopBar";
594
+ const Fe = n(({ children: e, className: t, ...a }, s) => /* @__PURE__ */ o("div", { ref: s, className: c(w["top-bar-leading"], t), ...a, children: e }));
595
+ Fe.displayName = "TopBar.Leading";
596
+ const He = n(({ children: e, className: t, ...a }, s) => /* @__PURE__ */ o("div", { ref: s, className: c(w["top-bar-centred"], t), ...a, children: e }));
597
+ He.displayName = "TopBar.Centred";
598
+ const Pe = n(({ children: e, className: t, ...a }, s) => /* @__PURE__ */ o("div", { ref: s, className: c(w["top-bar-trailing"], t), ...a, children: e }));
599
+ Pe.displayName = "TopBar.Trailing";
592
600
  const Ce = n(
593
- ({ as: e = "button", active: t, disabled: a, icon: o, className: r, children: i, ...l }, d) => /* @__PURE__ */ b(
601
+ ({ as: e = "button", active: t, disabled: a, icon: s, className: r, children: i, ...l }, d) => /* @__PURE__ */ b(
594
602
  e,
595
603
  {
596
604
  ref: d,
597
- className: c(R["top-bar-item"], r),
605
+ className: c(w["top-bar-item"], r),
598
606
  "data-active": t ? "" : void 0,
599
607
  "data-disabled": a ? "" : void 0,
600
608
  ...l,
601
609
  children: [
602
- o && /* @__PURE__ */ s("span", { className: R["top-bar-item-icon"], children: o }),
610
+ s && /* @__PURE__ */ o("span", { className: w["top-bar-item-icon"], children: s }),
603
611
  i
604
612
  ]
605
613
  }
606
614
  )
607
615
  );
608
616
  Ce.displayName = "TopBar.Item";
609
- const Ge = n(({ children: e, className: t, ...a }, o) => /* @__PURE__ */ s("div", { ref: o, className: c(R["top-bar-list-item"], t), ...a, children: e }));
610
- Ge.displayName = "TopBar.ListItem";
611
- const ta = Object.assign(Ie, {
612
- Centred: xe,
617
+ const ze = n(({ children: e, className: t, ...a }, s) => /* @__PURE__ */ o("div", { ref: s, className: c(w["top-bar-list-item"], t), ...a, children: e }));
618
+ ze.displayName = "TopBar.ListItem";
619
+ const la = Object.assign(Le, {
620
+ Centred: He,
613
621
  Item: Ce,
614
- Leading: Le,
615
- ListItem: Ge,
616
- Trailing: Fe
617
- }), Me = n(({ children: e, className: t }, a) => /* @__PURE__ */ s("aside", { ref: a, className: c(y.sidebar, t), children: e }));
618
- Me.displayName = "Sidebar";
619
- const ze = n(({ children: e, className: t }, a) => /* @__PURE__ */ s("div", { ref: a, className: c(y["sidebar-header"], t), children: e }));
620
- ze.displayName = "Sidebar.Header";
621
- const He = n(({ children: e, className: t }, a) => /* @__PURE__ */ s("div", { ref: a, className: c(y["sidebar-body"], t), children: e }));
622
- He.displayName = "Sidebar.Body";
623
- const Pe = n(({ children: e, className: t }, a) => /* @__PURE__ */ s("div", { ref: a, className: c(y["sidebar-footer"], t), children: e }));
624
- Pe.displayName = "Sidebar.Footer";
625
- const je = n(
626
- ({ label: e, icon: t, defaultExpanded: a = !0, isExpanded: o, onExpandedChange: r, children: i, className: l }, d) => {
627
- const [u, m] = H(a), p = o !== void 0 ? o : u, N = () => {
622
+ Leading: Fe,
623
+ ListItem: ze,
624
+ Trailing: Pe
625
+ }), Ge = n(({ children: e, className: t }, a) => /* @__PURE__ */ o("aside", { ref: a, className: c(g.sidebar, t), children: e }));
626
+ Ge.displayName = "Sidebar";
627
+ const Me = n(({ children: e, className: t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(g["sidebar-header"], t), children: e }));
628
+ Me.displayName = "Sidebar.Header";
629
+ const je = n(({ children: e, className: t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(g["sidebar-body"], t), children: e }));
630
+ je.displayName = "Sidebar.Body";
631
+ const De = n(({ children: e, className: t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(g["sidebar-footer"], t), children: e }));
632
+ De.displayName = "Sidebar.Footer";
633
+ const Oe = n(
634
+ ({ label: e, icon: t, defaultExpanded: a = !0, isExpanded: s, onExpandedChange: r, children: i, className: l }, d) => {
635
+ const [u, m] = M(a), p = s !== void 0 ? s : u, y = () => {
628
636
  const h = !p;
629
637
  m(h), r == null || r(h);
630
638
  };
@@ -632,301 +640,336 @@ const je = n(
632
640
  "div",
633
641
  {
634
642
  ref: d,
635
- className: c(y["sidebar-group"], l),
643
+ className: c(g["sidebar-group"], l),
636
644
  "data-expanded": p ? "" : void 0,
637
645
  children: [
638
- /* @__PURE__ */ b("button", { className: y["sidebar-group-header"], onClick: N, "aria-expanded": p, children: [
639
- t && /* @__PURE__ */ s("span", { children: t }),
640
- /* @__PURE__ */ s("span", { className: y["sidebar-group-label"], children: e }),
641
- /* @__PURE__ */ s(J, { as: W, className: y["sidebar-group-chevron"], size: "sm" })
646
+ /* @__PURE__ */ b("button", { className: g["sidebar-group-header"], onClick: y, "aria-expanded": p, children: [
647
+ t && /* @__PURE__ */ o("span", { children: t }),
648
+ /* @__PURE__ */ o("span", { className: g["sidebar-group-label"], children: e }),
649
+ /* @__PURE__ */ o(Q, { as: q, className: g["sidebar-group-chevron"], size: "sm" })
642
650
  ] }),
643
- /* @__PURE__ */ s("div", { className: y["sidebar-group-content"], children: /* @__PURE__ */ s("div", { children: i }) })
651
+ /* @__PURE__ */ o("div", { className: g["sidebar-group-content"], children: /* @__PURE__ */ o("div", { children: i }) })
644
652
  ]
645
653
  }
646
654
  );
647
655
  }
648
656
  );
649
- je.displayName = "Sidebar.Group";
650
- const De = n(
651
- ({ as: e = "button", active: t, disabled: a, icon: o, action: r, className: i, children: l, ...d }, u) => /* @__PURE__ */ b(
657
+ Oe.displayName = "Sidebar.Group";
658
+ const $e = n(
659
+ ({ as: e = "button", active: t, disabled: a, icon: s, action: r, className: i, children: l, ...d }, u) => /* @__PURE__ */ b(
652
660
  e,
653
661
  {
654
662
  ref: u,
655
- className: c(y["sidebar-item"], i),
663
+ className: c(g["sidebar-item"], i),
656
664
  "data-active": t ? "" : void 0,
657
665
  "data-disabled": a ? "" : void 0,
658
666
  "data-action": r ? "" : void 0,
659
667
  ...d,
660
668
  children: [
661
- o && /* @__PURE__ */ s("span", { className: y["sidebar-item-icon"], children: o }),
662
- /* @__PURE__ */ s("span", { className: y["sidebar-item-text"], children: l }),
663
- r && /* @__PURE__ */ s("span", { className: y["sidebar-item-action"], children: r })
669
+ s && /* @__PURE__ */ o("span", { className: g["sidebar-item-icon"], children: s }),
670
+ /* @__PURE__ */ o("span", { className: g["sidebar-item-text"], children: l }),
671
+ r && /* @__PURE__ */ o("span", { className: g["sidebar-item-action"], children: r })
664
672
  ]
665
673
  }
666
674
  )
667
675
  );
668
- De.displayName = "Sidebar.Item";
669
- const $e = n(({ children: e, className: t }, a) => /* @__PURE__ */ s("div", { ref: a, className: c(y["sidebar-item-list"], t), children: e }));
670
- $e.displayName = "Sidebar.ItemList";
671
- const Oe = n(({ className: e }, t) => /* @__PURE__ */ s("div", { ref: t, className: c(y["sidebar-divider"], e), children: /* @__PURE__ */ s(ht, {}) }));
672
- Oe.displayName = "Sidebar.Divider";
673
- const aa = Object.assign(Me, {
674
- Body: He,
675
- Divider: Oe,
676
- Footer: Pe,
677
- Group: je,
678
- Header: ze,
679
- Item: De,
680
- ItemList: $e
676
+ $e.displayName = "Sidebar.Item";
677
+ const ke = n(({ children: e, className: t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(g["sidebar-item-list"], t), children: e }));
678
+ ke.displayName = "Sidebar.ItemList";
679
+ const _e = n(({ className: e }, t) => /* @__PURE__ */ o("div", { ref: t, className: c(g["sidebar-divider"], e), children: /* @__PURE__ */ o(St, {}) }));
680
+ _e.displayName = "Sidebar.Divider";
681
+ const na = Object.assign(Ge, {
682
+ Body: je,
683
+ Divider: _e,
684
+ Footer: De,
685
+ Group: Oe,
686
+ Header: Me,
687
+ Item: $e,
688
+ ItemList: ke
681
689
  });
682
- function Mt(e, t) {
690
+ function Ot(e, t) {
683
691
  return e === t;
684
692
  }
685
- const ke = n(({ children: e, className: t, ...a }, o) => /* @__PURE__ */ s("nav", { ref: o, className: c(P["bottom-bar"], t), ...a, children: e }));
686
- ke.displayName = "BottomBar";
687
- const _e = n(
688
- ({ as: e = "button", href: t, active: a = !1, disabled: o = !1, icon: r, children: i, onClick: l, className: d, ...u }, m) => {
689
- const p = Mt(e, "a"), N = v({
693
+ const Ee = n(({ children: e, className: t, ...a }, s) => /* @__PURE__ */ o("nav", { ref: s, className: c(j["bottom-bar"], t), ...a, children: e }));
694
+ Ee.displayName = "BottomBar";
695
+ const Ve = n(
696
+ ({ as: e = "button", href: t, active: a = !1, disabled: s = !1, icon: r, children: i, onClick: l, className: d, ...u }, m) => {
697
+ const p = Ot(e, "a"), y = f({
690
698
  active: a,
691
- disabled: o
692
- }), h = (g) => {
693
- if (o) {
694
- g.preventDefault();
699
+ disabled: s
700
+ }), h = (N) => {
701
+ if (s) {
702
+ N.preventDefault();
695
703
  return;
696
704
  }
697
- l == null || l(g);
698
- }, B = {
699
- className: c(P["bottom-bar-item"], d),
705
+ l == null || l(N);
706
+ }, T = {
707
+ className: c(j["bottom-bar-item"], d),
700
708
  onClick: h,
701
709
  ref: m,
702
- ...N,
710
+ ...y,
703
711
  ...u
704
712
  };
705
- return p && (B.href = t), /* @__PURE__ */ b(e || "button", { ...B, children: [
706
- r && /* @__PURE__ */ s("span", { className: P["bottom-bar-item-icon"], children: r }),
707
- i && /* @__PURE__ */ s("span", { className: P["bottom-bar-item-text"], children: i })
713
+ return p && (T.href = t), /* @__PURE__ */ b(e || "button", { ...T, children: [
714
+ r && /* @__PURE__ */ o("span", { className: j["bottom-bar-item-icon"], children: r }),
715
+ i && /* @__PURE__ */ o("span", { className: j["bottom-bar-item-text"], children: i })
708
716
  ] });
709
717
  }
710
718
  );
711
- _e.displayName = "BottomBar.Item";
712
- const sa = Object.assign(ke, {
713
- Item: _e
714
- }), Ee = n(({ className: e, children: t }, a) => /* @__PURE__ */ s("div", { ref: a, className: c(w["app-layout"], e), children: t }));
715
- Ee.displayName = "AppLayout";
716
- const Ve = n(({ centered: e, className: t, children: a }, o) => {
717
- const r = v({
719
+ Ve.displayName = "BottomBar.Item";
720
+ const ca = Object.assign(Ee, {
721
+ Item: Ve
722
+ }), We = n(({ className: e, children: t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(x["app-layout"], e), children: t }));
723
+ We.displayName = "AppLayout";
724
+ const Xe = n(({ centered: e, className: t, children: a }, s) => {
725
+ const r = f({
718
726
  centered: e
719
727
  });
720
- return /* @__PURE__ */ s("div", { ref: o, className: c(w["app-layout-body"], t), ...r, children: a });
728
+ return /* @__PURE__ */ o("div", { ref: s, className: c(x["app-layout-body"], t), ...r, children: a });
721
729
  });
722
- Ve.displayName = "AppLayout.Body";
723
- const We = n(({ className: e, children: t }, a) => /* @__PURE__ */ s("header", { ref: a, className: c(w["app-layout-header"], e), children: t }));
724
- We.displayName = "AppLayout.Header";
725
- const Xe = n(({ className: e, children: t }, a) => /* @__PURE__ */ s("main", { ref: a, className: c(w["app-layout-main"], e), children: t }));
726
- Xe.displayName = "AppLayout.Main";
727
- const qe = n(({ className: e, children: t }, a) => /* @__PURE__ */ s("aside", { ref: a, className: c(w["app-layout-side-left"], e), children: t }));
728
- qe.displayName = "AppLayout.SideLeft";
729
- const Je = n(({ className: e, children: t }, a) => /* @__PURE__ */ s("aside", { ref: a, className: c(w["app-layout-side-right"], e), children: t }));
730
- Je.displayName = "AppLayout.SideRight";
731
- const Ke = n(({ className: e, children: t }, a) => /* @__PURE__ */ s("footer", { ref: a, className: c(w["app-layout-footer"], e), children: t }));
732
- Ke.displayName = "AppLayout.Footer";
733
- const oa = Object.assign(Ee, {
734
- Body: Ve,
735
- Footer: Ke,
736
- Header: We,
737
- Main: Xe,
738
- SideLeft: qe,
739
- SideRight: Je
730
+ Xe.displayName = "AppLayout.Body";
731
+ const qe = n(({ className: e, children: t }, a) => /* @__PURE__ */ o("header", { ref: a, className: c(x["app-layout-header"], e), children: t }));
732
+ qe.displayName = "AppLayout.Header";
733
+ const Je = n(({ className: e, children: t }, a) => /* @__PURE__ */ o("main", { ref: a, className: c(x["app-layout-main"], e), children: t }));
734
+ Je.displayName = "AppLayout.Main";
735
+ const Ke = n(({ className: e, children: t }, a) => /* @__PURE__ */ o("aside", { ref: a, className: c(x["app-layout-side-left"], e), children: t }));
736
+ Ke.displayName = "AppLayout.SideLeft";
737
+ const Qe = n(({ className: e, children: t }, a) => /* @__PURE__ */ o("aside", { ref: a, className: c(x["app-layout-side-right"], e), children: t }));
738
+ Qe.displayName = "AppLayout.SideRight";
739
+ const Ue = n(({ className: e, children: t }, a) => /* @__PURE__ */ o("footer", { ref: a, className: c(x["app-layout-footer"], e), children: t }));
740
+ Ue.displayName = "AppLayout.Footer";
741
+ const da = Object.assign(We, {
742
+ Body: Xe,
743
+ Footer: Ue,
744
+ Header: qe,
745
+ Main: Je,
746
+ SideLeft: Ke,
747
+ SideRight: Qe
740
748
  });
741
- function zt({ columns: e = "1fr", children: t, className: a, style: o, ...r }, i) {
742
- return /* @__PURE__ */ s(
749
+ function $t({ columns: e = "1fr", children: t, className: a, style: s, ...r }, i) {
750
+ return /* @__PURE__ */ o(
743
751
  "form",
744
752
  {
745
753
  ref: i,
746
- className: c(_["form-group"], a),
754
+ className: c(V["form-group"], a),
747
755
  style: {
748
756
  "--_columns": e,
749
- ...o
757
+ ...s
750
758
  },
751
759
  ...r,
752
760
  children: t
753
761
  }
754
762
  );
755
763
  }
756
- const Qe = n(zt);
757
- Qe.displayName = "FormGroup";
758
- const Ue = n(
759
- ({ area: e, children: t, className: a, style: o, ...r }, i) => /* @__PURE__ */ s(
764
+ const Ye = n($t);
765
+ Ye.displayName = "FormGroup";
766
+ const Ze = n(
767
+ ({ area: e, children: t, className: a, style: s, ...r }, i) => /* @__PURE__ */ o(
760
768
  "div",
761
769
  {
762
770
  ref: i,
763
- className: c(_.field, a),
771
+ className: c(V.field, a),
764
772
  style: {
765
773
  "--_area": e,
766
- ...o
774
+ ...s
767
775
  },
768
776
  ...r,
769
777
  children: t
770
778
  }
771
779
  )
772
780
  );
773
- Ue.displayName = "FormGroup.Field";
774
- const Ye = n(({ className: e, ...t }, a) => /* @__PURE__ */ s("hr", { ref: a, className: c(_.separator, e), ...t }));
775
- Ye.displayName = "FormGroup.Separator";
776
- const ra = Object.assign(Qe, {
777
- Field: Ue,
778
- Separator: Ye
781
+ Ze.displayName = "FormGroup.Field";
782
+ const et = n(({ className: e, ...t }, a) => /* @__PURE__ */ o("hr", { ref: a, className: c(V.separator, e), ...t }));
783
+ et.displayName = "FormGroup.Separator";
784
+ const ma = Object.assign(Ye, {
785
+ Field: Ze,
786
+ Separator: et
779
787
  });
780
- function Ht({ direction: e = "column", children: t, className: a, ...o }, r) {
781
- return /* @__PURE__ */ s("ul", { ref: r, className: c(O.features, a), "data-direction": e, ...o, children: t });
788
+ function kt({ direction: e = "column", children: t, className: a, ...s }, r) {
789
+ return /* @__PURE__ */ o("ul", { ref: r, className: c(_.features, a), "data-direction": e, ...s, children: t });
782
790
  }
783
- const Ze = n(Ht);
784
- Ze.displayName = "Features";
785
- const et = n(
786
- ({ icon: e, children: t, className: a, "aria-label": o, ...r }, i) => {
787
- const d = `features-item-${q()}`, u = o ? A.getTooltipTriggerProps({ id: d }) : {};
788
- return /* @__PURE__ */ b("li", { ref: i, "aria-label": o, className: c(O.item, a), ...u, ...r, children: [
789
- e && /* @__PURE__ */ s("span", { className: O.icon, children: e }),
791
+ const tt = n(kt);
792
+ tt.displayName = "Features";
793
+ const at = n(
794
+ ({ icon: e, children: t, className: a, "aria-label": s, ...r }, i) => {
795
+ const d = `features-item-${K()}`, u = s ? R.getTooltipTriggerProps({ id: d }) : {};
796
+ return /* @__PURE__ */ b("li", { ref: i, "aria-label": s, className: c(_.item, a), ...u, ...r, children: [
797
+ e && /* @__PURE__ */ o("span", { className: _.icon, children: e }),
790
798
  t,
791
- o && /* @__PURE__ */ s(A, { id: d, children: /* @__PURE__ */ s(A.Text, { children: o }) })
799
+ s && /* @__PURE__ */ o(R, { id: d, children: /* @__PURE__ */ o(R.Text, { children: s }) })
792
800
  ] });
793
801
  }
794
802
  );
795
- et.displayName = "Features.Item";
796
- const Pt = Object.assign(Ze, {
797
- Item: et
798
- }), ia = Pt, tt = x(void 0), jt = () => {
799
- const e = F(tt);
803
+ at.displayName = "Features.Item";
804
+ const _t = Object.assign(tt, {
805
+ Item: at
806
+ }), ua = _t, st = F(void 0), Et = () => {
807
+ const e = H(st);
800
808
  if (!e)
801
809
  throw new Error("Modal subcomponents must be used within Modal");
802
810
  return e;
803
- }, at = n(
804
- ({ open: e, onOpenChange: t, size: a, position: o, children: r, className: i, ...l }, d) => {
805
- const u = v({ size: a, position: o });
806
- return /* @__PURE__ */ s(tt.Provider, { value: { onClose: () => t == null ? void 0 : t(!1) }, children: /* @__PURE__ */ s(
807
- Q,
811
+ }, ot = n(
812
+ ({ open: e, onOpenChange: t, size: a, position: s, children: r, className: i, ...l }, d) => {
813
+ const u = f({ size: a, position: s });
814
+ return /* @__PURE__ */ o(st.Provider, { value: { onClose: () => t == null ? void 0 : t(!1) }, children: /* @__PURE__ */ o(
815
+ Y,
808
816
  {
809
817
  ref: d,
810
818
  isOpen: e,
811
819
  onOpenChange: t,
812
- className: c(e && Nt.modal, i),
820
+ className: c(e && ft.modal, i),
813
821
  "data-modal": "",
814
822
  ...u,
815
823
  ...l,
816
- children: /* @__PURE__ */ s("div", { className: C.content, children: r })
824
+ children: /* @__PURE__ */ o("div", { className: P.content, children: r })
817
825
  }
818
826
  ) });
819
827
  }
820
828
  );
821
- at.displayName = "Modal";
822
- const st = n(({ onClick: e, ...t }, a) => {
823
- const { onClose: o } = jt();
824
- return /* @__PURE__ */ s(
825
- E,
829
+ ot.displayName = "Modal";
830
+ const rt = n(({ onClick: e, ...t }, a) => {
831
+ const { onClose: s } = Et();
832
+ return /* @__PURE__ */ o(
833
+ W,
826
834
  {
827
835
  ref: a,
828
836
  variant: "ghost",
829
- as: X,
837
+ as: J,
830
838
  "aria-label": "Close",
831
839
  onClick: (i) => {
832
- o(), e == null || e(i);
840
+ s(), e == null || e(i);
833
841
  },
834
- className: C.closeButton,
842
+ className: P.closeButton,
835
843
  ...t
836
844
  }
837
845
  );
838
846
  });
839
- st.displayName = "Modal.CloseButton";
840
- const ot = n(({ action: e, children: t, className: a, ...o }, r) => /* @__PURE__ */ b("div", { ref: r, className: c(C.header, "modal-header", a), "data-modal-header": "", ...o, children: [
841
- /* @__PURE__ */ s("div", { children: t }),
842
- e && /* @__PURE__ */ s("div", { className: "modal-header-action", children: e })
847
+ rt.displayName = "Modal.CloseButton";
848
+ const it = n(({ action: e, children: t, className: a, ...s }, r) => /* @__PURE__ */ b("div", { ref: r, className: c(P.header, "modal-header", a), "data-modal-header": "", ...s, children: [
849
+ /* @__PURE__ */ o("div", { children: t }),
850
+ e && /* @__PURE__ */ o("div", { className: "modal-header-action", children: e })
843
851
  ] }));
844
- ot.displayName = "Modal.Header";
845
- const rt = n(
846
- ({ align: e = "end", children: t, className: a, ...o }, r) => /* @__PURE__ */ s(
852
+ it.displayName = "Modal.Header";
853
+ const lt = n(
854
+ ({ align: e = "end", children: t, className: a, ...s }, r) => /* @__PURE__ */ o(
847
855
  "div",
848
856
  {
849
857
  ref: r,
850
- className: c(C.footer, "modal-footer", a),
858
+ className: c(P.footer, "modal-footer", a),
851
859
  "data-modal-footer": "",
852
860
  "data-align": e,
853
- ...o,
861
+ ...s,
854
862
  children: t
855
863
  }
856
864
  )
857
865
  );
858
- rt.displayName = "Modal.Footer";
859
- const la = Object.assign(at, {
860
- Body: Y,
861
- CloseButton: st,
862
- Footer: rt,
863
- Header: ot,
864
- Title: U
865
- }), it = x(void 0), Dt = () => {
866
- const e = F(it);
866
+ lt.displayName = "Modal.Footer";
867
+ const pa = Object.assign(ot, {
868
+ Body: ee,
869
+ CloseButton: rt,
870
+ Footer: lt,
871
+ Header: it,
872
+ Title: Z
873
+ }), nt = F(void 0), Vt = () => {
874
+ const e = H(nt);
867
875
  if (!e)
868
876
  throw new Error("BottomSheet subcomponents must be used within BottomSheet");
869
877
  return e;
870
- }, lt = n(
871
- ({ open: e, onOpenChange: t, children: a, className: o, ...r }, i) => /* @__PURE__ */ s(it.Provider, { value: { onClose: () => t == null ? void 0 : t(!1) }, children: /* @__PURE__ */ s(
872
- Q,
878
+ }, ct = n(
879
+ ({ open: e, onOpenChange: t, children: a, className: s, ...r }, i) => /* @__PURE__ */ o(nt.Provider, { value: { onClose: () => t == null ? void 0 : t(!1) }, children: /* @__PURE__ */ o(
880
+ Y,
873
881
  {
874
882
  ref: i,
875
883
  isOpen: e,
876
884
  onOpenChange: t,
877
- className: c(yt.bottomSheet, o),
885
+ className: c(gt.bottomSheet, s),
878
886
  ...r,
879
- children: /* @__PURE__ */ s("div", { className: C.content, children: a })
887
+ children: /* @__PURE__ */ o("div", { className: P.content, children: a })
880
888
  }
881
889
  ) })
882
890
  );
883
- lt.displayName = "BottomSheet";
884
- const nt = n(
891
+ ct.displayName = "BottomSheet";
892
+ const dt = n(
885
893
  ({ onClick: e, ...t }, a) => {
886
- const { onClose: o } = Dt();
887
- return /* @__PURE__ */ s(
888
- E,
894
+ const { onClose: s } = Vt();
895
+ return /* @__PURE__ */ o(
896
+ W,
889
897
  {
890
- as: X,
898
+ as: J,
891
899
  ref: a,
892
900
  variant: "ghost",
893
901
  "aria-label": "Close",
894
902
  onClick: (i) => {
895
- o(), e == null || e(i);
903
+ s(), e == null || e(i);
896
904
  },
897
- className: C.closeButton,
905
+ className: P.closeButton,
898
906
  ...t
899
907
  }
900
908
  );
901
909
  }
902
910
  );
903
- nt.displayName = "BottomSheet.CloseButton";
904
- const na = Object.assign(lt, {
905
- Body: Y,
906
- CloseButton: nt,
907
- Footer: gt,
908
- Header: ft,
909
- Title: U
911
+ dt.displayName = "BottomSheet.CloseButton";
912
+ const ba = Object.assign(ct, {
913
+ Body: ee,
914
+ CloseButton: dt,
915
+ Footer: wt,
916
+ Header: Rt,
917
+ Title: Z
918
+ }), mt = n(
919
+ ({ title: e, subtitle: t, supplementary: a, className: s, ...r }, i) => /* @__PURE__ */ b("header", { ref: i, className: c(A.header, s), ...r, children: [
920
+ e,
921
+ t,
922
+ a && /* @__PURE__ */ o("div", { className: A.supplementary, children: a })
923
+ ] })
924
+ );
925
+ mt.displayName = "PageHeader";
926
+ const ut = n(
927
+ ({ action: e, additionalInfo: t, className: a, children: s, ...r }, i) => {
928
+ const l = f({
929
+ action: e ? "true" : "false",
930
+ "additional-info": t ? "true" : "false"
931
+ });
932
+ return /* @__PURE__ */ b("div", { ref: i, className: c(A.title, a), ...l, ...r, children: [
933
+ /* @__PURE__ */ o("div", { className: A["title-inner"], children: /* @__PURE__ */ o(Bt, { as: "h1", size: "xl", weight: "bold", intent: "default", className: A.heading, children: s }) }),
934
+ (e || t) && /* @__PURE__ */ b("div", { className: A["title-right"], children: [
935
+ t && /* @__PURE__ */ o("div", { className: A["additional-info"], children: t }),
936
+ e && /* @__PURE__ */ o("div", { className: A.action, children: e })
937
+ ] })
938
+ ] });
939
+ }
940
+ );
941
+ ut.displayName = "PageHeader.Title";
942
+ const pt = n(
943
+ ({ additionalInfo: e, className: t, children: a, ...s }, r) => /* @__PURE__ */ b("div", { ref: r, className: c(A.subtitle, t), ...s, children: [
944
+ /* @__PURE__ */ o(At, { as: "p", size: "base", weight: "normal", intent: "default", className: A["subtitle-text"], children: a }),
945
+ e && /* @__PURE__ */ o("div", { className: A["subtitle-additional-info"], children: e })
946
+ ] })
947
+ );
948
+ pt.displayName = "PageHeader.Subtitle";
949
+ const Na = Object.assign(mt, {
950
+ Title: ut,
951
+ Subtitle: pt
910
952
  });
911
953
  export {
912
- Qt as Accordion,
913
- oa as AppLayout,
914
- Yt as AttributeList,
915
- Bt as AvatarGroup,
916
- Lt as BadgeGroup,
917
- sa as BottomBar,
918
- na as BottomSheet,
919
- Gt as ButtonGroup,
920
- Zt as Card,
921
- Q as Dialog,
922
- ma as Drawer,
923
- ia as Features,
924
- ra as FormGroup,
925
- j as Menu,
926
- la as Modal,
927
- It as NoResults,
928
- aa as Sidebar,
929
- ea as Table,
930
- Ut as Tabs,
931
- ta as TopBar
954
+ aa as Accordion,
955
+ da as AppLayout,
956
+ oa as AttributeList,
957
+ Lt as AvatarGroup,
958
+ zt as BadgeGroup,
959
+ ca as BottomBar,
960
+ ba as BottomSheet,
961
+ Dt as ButtonGroup,
962
+ ra as Card,
963
+ Y as Dialog,
964
+ va as Drawer,
965
+ ua as Features,
966
+ ma as FormGroup,
967
+ D as Menu,
968
+ pa as Modal,
969
+ Ct as NoResults,
970
+ Na as PageHeader,
971
+ na as Sidebar,
972
+ ia as Table,
973
+ sa as Tabs,
974
+ la as TopBar
932
975
  };