@versaur/react 1.0.18 → 1.0.20
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.d.ts +27 -0
- package/dist/blocks.js +158 -162
- package/dist/forms.d.ts +36 -25
- package/dist/forms.js +495 -531
- package/dist/hooks.d.ts +89 -0
- package/dist/hooks.js +10 -0
- package/dist/use-breakpoints-DGKHJ-Jb.js +44 -0
- package/dist/use-resize-observer-DLkpn8HX.js +14 -0
- package/dist/utils.js +20 -56
- package/package.json +8 -3
package/dist/blocks.js
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
import { jsxs as b, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { accordionStyles as L, avatarGroupStyles as Nt, tabsStyles as
|
|
2
|
+
import { accordionStyles as L, avatarGroupStyles as Nt, tabsStyles as G, noResultsStyles as I, attributeListStyles as yt, badgeGroupStyles as ht, cardStyles as $, menuStyles as C, tableStyles as B, buttonGroupStyles as ft, topBarStyles as w, sidebarStyles as g, bottomBarStyles as j, appLayoutStyles as x, formGroupStyles as E, featuresStyles as _, modalStyles as vt, bottomSheetStyles as gt, pageContentStyles as Tt, pageHeaderStyles as A } from "@versaur/core/blocks";
|
|
3
3
|
import { ChevronDownIcon as q, XIcon as J } from "@versaur/icons";
|
|
4
|
-
import { createContext as F, forwardRef as n, useRef as
|
|
5
|
-
import { u as
|
|
4
|
+
import { createContext as F, forwardRef as n, useRef as M, useState as z, useEffect as X, useContext as H, useLayoutEffect as St, useId as K } from "react";
|
|
5
|
+
import { u as v, I as Q, B as V } from "./helpers-D23F5WBX.js";
|
|
6
6
|
import { c } from "./cx-B9vmfsc1.js";
|
|
7
|
-
import { e as U, d as R, c as
|
|
7
|
+
import { e as U, d as R, c as Bt, H as At, T as Rt } from "./tooltip-60d7mYVa.js";
|
|
8
|
+
import { u as wt } from "./use-resize-observer-DLkpn8HX.js";
|
|
8
9
|
import { checkboxStyles as k } from "@versaur/core/forms";
|
|
9
10
|
import { a as Y } from "./drawer-BjNHPqBr.js";
|
|
10
|
-
import { D as
|
|
11
|
+
import { D as Ta } from "./drawer-BjNHPqBr.js";
|
|
11
12
|
import { overlayPartsStyles as P } from "@versaur/core/utils";
|
|
12
|
-
import { O as Z, b as ee, c as
|
|
13
|
+
import { O as Z, b as ee, c as xt, a as It } from "./overlay-parts-BtD-Qj_k.js";
|
|
13
14
|
const te = F(void 0);
|
|
14
|
-
function
|
|
15
|
+
function Lt() {
|
|
15
16
|
const e = H(te);
|
|
16
17
|
if (!e)
|
|
17
18
|
throw new Error("Accordion.Summary must be used within an Accordion component");
|
|
18
19
|
return e;
|
|
19
20
|
}
|
|
20
|
-
function
|
|
21
|
-
const [d, u] =
|
|
22
|
-
|
|
21
|
+
function Ft({ summary: e, open: t, onOpenChange: a, children: s, className: r, ...i }, l) {
|
|
22
|
+
const [d, u] = z(t ?? !1), m = M(null);
|
|
23
|
+
X(() => {
|
|
23
24
|
t !== void 0 && u(t);
|
|
24
|
-
}, [t]),
|
|
25
|
+
}, [t]), X(() => {
|
|
25
26
|
m.current && (m.current.open = d);
|
|
26
27
|
}, [d]);
|
|
27
28
|
const p = () => {
|
|
28
29
|
const h = !d;
|
|
29
30
|
u(h), a == null || a(h);
|
|
30
|
-
}, y =
|
|
31
|
+
}, y = v({ open: d ? "" : void 0 });
|
|
31
32
|
return /* @__PURE__ */ o(te.Provider, { value: { isOpen: d, toggle: p }, children: /* @__PURE__ */ b(
|
|
32
33
|
"details",
|
|
33
34
|
{
|
|
@@ -43,11 +44,11 @@ function It({ summary: e, open: t, onOpenChange: a, children: s, className: r, .
|
|
|
43
44
|
}
|
|
44
45
|
) });
|
|
45
46
|
}
|
|
46
|
-
const ae = n(
|
|
47
|
+
const ae = n(Ft);
|
|
47
48
|
ae.displayName = "Accordion";
|
|
48
49
|
const se = n(
|
|
49
50
|
({ children: e, right: t, clamp: a = 2, className: s, ...r }, i) => {
|
|
50
|
-
const { isOpen: l, toggle: d } =
|
|
51
|
+
const { isOpen: l, toggle: d } = Lt(), u = M(null), m = (p) => {
|
|
51
52
|
p.preventDefault(), !(u.current && u.current.contains(p.target)) && d();
|
|
52
53
|
};
|
|
53
54
|
return /* @__PURE__ */ b(
|
|
@@ -69,9 +70,9 @@ const se = n(
|
|
|
69
70
|
}
|
|
70
71
|
);
|
|
71
72
|
se.displayName = "Accordion.Summary";
|
|
72
|
-
const
|
|
73
|
+
const ra = Object.assign(ae, {
|
|
73
74
|
Summary: se
|
|
74
|
-
}),
|
|
75
|
+
}), Ht = n(
|
|
75
76
|
({
|
|
76
77
|
direction: e = "horizontal",
|
|
77
78
|
size: t = "md",
|
|
@@ -82,7 +83,7 @@ const aa = Object.assign(ae, {
|
|
|
82
83
|
className: l,
|
|
83
84
|
...d
|
|
84
85
|
}, u) => {
|
|
85
|
-
const m =
|
|
86
|
+
const m = v({ align: a, direction: e, size: t, wrap: s });
|
|
86
87
|
return /* @__PURE__ */ o(
|
|
87
88
|
"div",
|
|
88
89
|
{
|
|
@@ -97,48 +98,38 @@ const aa = Object.assign(ae, {
|
|
|
97
98
|
);
|
|
98
99
|
}
|
|
99
100
|
);
|
|
100
|
-
|
|
101
|
-
function Ft(e, t) {
|
|
102
|
-
E(() => {
|
|
103
|
-
if (!e.current)
|
|
104
|
-
return;
|
|
105
|
-
const a = new ResizeObserver(t);
|
|
106
|
-
return a.observe(e.current), () => {
|
|
107
|
-
a.disconnect();
|
|
108
|
-
};
|
|
109
|
-
}, [e, t]);
|
|
110
|
-
}
|
|
101
|
+
Ht.displayName = "AvatarGroup";
|
|
111
102
|
const oe = F(void 0);
|
|
112
|
-
function
|
|
103
|
+
function Pt() {
|
|
113
104
|
const e = H(oe);
|
|
114
105
|
if (!e)
|
|
115
106
|
throw new Error("Tabs.Item must be used within a Tabs component");
|
|
116
107
|
return e;
|
|
117
108
|
}
|
|
118
109
|
const re = n(({ value: e, onChange: t, children: a, className: s }, r) => {
|
|
119
|
-
const i =
|
|
120
|
-
const
|
|
121
|
-
if (!
|
|
110
|
+
const i = M(null), l = M(/* @__PURE__ */ new Map()), [d, u] = z(0), [m, p] = z(0), y = () => {
|
|
111
|
+
const f = l.current.get(e);
|
|
112
|
+
if (!f || !i.current)
|
|
122
113
|
return;
|
|
123
|
-
const N = i.current.getBoundingClientRect(), S =
|
|
124
|
-
u(
|
|
114
|
+
const N = i.current.getBoundingClientRect(), S = f.getBoundingClientRect(), O = S.left - N.left + i.current.scrollLeft, { width: bt } = S;
|
|
115
|
+
u(O), p(bt), f.scrollIntoView({
|
|
125
116
|
behavior: "smooth",
|
|
126
117
|
block: "nearest",
|
|
127
118
|
inline: "center"
|
|
128
119
|
});
|
|
129
|
-
}, h = (
|
|
130
|
-
N && l.current.set(
|
|
120
|
+
}, h = (f, N) => {
|
|
121
|
+
N && l.current.set(f, N);
|
|
131
122
|
};
|
|
132
|
-
|
|
123
|
+
St(() => {
|
|
133
124
|
y();
|
|
134
|
-
}, [e]),
|
|
135
|
-
const T =
|
|
136
|
-
return /* @__PURE__ */ o(oe.Provider, { value: { activeValue: e, onChange: t, registerTrigger: h }, children: /* @__PURE__ */ b("nav", { ref: U(r, i), className: c(
|
|
137
|
-
/* @__PURE__ */ o("ul", { className:
|
|
125
|
+
}, [e]), wt(i, y);
|
|
126
|
+
const T = v({});
|
|
127
|
+
return /* @__PURE__ */ o(oe.Provider, { value: { activeValue: e, onChange: t, registerTrigger: h }, children: /* @__PURE__ */ b("nav", { ref: U(r, i), className: c(G.tabs, s), ...T, children: [
|
|
128
|
+
/* @__PURE__ */ o("ul", { className: G.tablist, role: "tablist", children: a }),
|
|
138
129
|
/* @__PURE__ */ o(
|
|
139
130
|
"div",
|
|
140
131
|
{
|
|
141
|
-
className:
|
|
132
|
+
className: G["tabs-thumb"],
|
|
142
133
|
style: {
|
|
143
134
|
left: `${d}px`,
|
|
144
135
|
width: `${m}px`
|
|
@@ -150,20 +141,20 @@ const re = n(({ value: e, onChange: t, children: a, className: s }, r) => {
|
|
|
150
141
|
re.displayName = "Tabs";
|
|
151
142
|
const ie = n(
|
|
152
143
|
({ value: e, disabled: t = !1, leftIcon: a, rightIcon: s, children: r, className: i }, l) => {
|
|
153
|
-
const { activeValue: d, onChange: u, registerTrigger: m } =
|
|
144
|
+
const { activeValue: d, onChange: u, registerTrigger: m } = Pt(), p = d === e;
|
|
154
145
|
let y;
|
|
155
146
|
t ? y = "disabled" : p ? y = "active" : y = "default";
|
|
156
|
-
const h = !!a, T = !!s,
|
|
147
|
+
const h = !!a, T = !!s, f = !!r;
|
|
157
148
|
let N;
|
|
158
|
-
h && T &&
|
|
149
|
+
h && T && f ? N = "both-text" : h && f ? N = "left-text" : T && f ? N = "right-text" : h && T ? N = "both" : h ? N = "left" : T && (N = "right");
|
|
159
150
|
const S = () => {
|
|
160
151
|
t || u(e);
|
|
161
152
|
};
|
|
162
|
-
return /* @__PURE__ */ o("li", { className:
|
|
153
|
+
return /* @__PURE__ */ o("li", { className: G.tabitem, children: /* @__PURE__ */ b(
|
|
163
154
|
"button",
|
|
164
155
|
{
|
|
165
|
-
ref: U(l, (
|
|
166
|
-
className: c(
|
|
156
|
+
ref: U(l, (O) => m(e, O)),
|
|
157
|
+
className: c(G.trigger, i),
|
|
167
158
|
role: "tab",
|
|
168
159
|
id: `tabs-trigger-${e}`,
|
|
169
160
|
"aria-selected": p,
|
|
@@ -182,17 +173,17 @@ const ie = n(
|
|
|
182
173
|
}
|
|
183
174
|
);
|
|
184
175
|
ie.displayName = "Tabs.Item";
|
|
185
|
-
function
|
|
176
|
+
function Ct(e) {
|
|
186
177
|
return {
|
|
187
178
|
"aria-labelledby": `tabs-trigger-${e}`,
|
|
188
179
|
id: `tabs-panel-${e}`,
|
|
189
180
|
role: "tabpanel"
|
|
190
181
|
};
|
|
191
182
|
}
|
|
192
|
-
const
|
|
183
|
+
const ia = Object.assign(re, {
|
|
193
184
|
Item: ie,
|
|
194
|
-
getPanelAttribute:
|
|
195
|
-
}),
|
|
185
|
+
getPanelAttribute: Ct
|
|
186
|
+
}), Gt = n(
|
|
196
187
|
({ icon: e, title: t, subtitle: a, action: s, className: r, ...i }, l) => /* @__PURE__ */ b(
|
|
197
188
|
"section",
|
|
198
189
|
{
|
|
@@ -212,10 +203,10 @@ const sa = Object.assign(re, {
|
|
|
212
203
|
}
|
|
213
204
|
)
|
|
214
205
|
);
|
|
215
|
-
|
|
206
|
+
Gt.displayName = "NoResults";
|
|
216
207
|
const le = n(
|
|
217
208
|
({ layout: e, columns: t = "repeat(3, 1fr)", gap: a, children: s, className: r, style: i, ...l }, d) => {
|
|
218
|
-
const u =
|
|
209
|
+
const u = v({
|
|
219
210
|
layout: e
|
|
220
211
|
});
|
|
221
212
|
return /* @__PURE__ */ o(
|
|
@@ -255,9 +246,9 @@ const ne = n(
|
|
|
255
246
|
)
|
|
256
247
|
);
|
|
257
248
|
ne.displayName = "AttributeList.Item";
|
|
258
|
-
const
|
|
249
|
+
const la = Object.assign(le, {
|
|
259
250
|
Item: ne
|
|
260
|
-
}),
|
|
251
|
+
}), Mt = n(
|
|
261
252
|
({
|
|
262
253
|
gap: e = "md",
|
|
263
254
|
direction: t = "horizontal",
|
|
@@ -268,7 +259,7 @@ const oa = Object.assign(le, {
|
|
|
268
259
|
className: l,
|
|
269
260
|
...d
|
|
270
261
|
}, u) => {
|
|
271
|
-
const m =
|
|
262
|
+
const m = v({
|
|
272
263
|
align: a,
|
|
273
264
|
direction: t,
|
|
274
265
|
gap: e,
|
|
@@ -288,41 +279,41 @@ const oa = Object.assign(le, {
|
|
|
288
279
|
);
|
|
289
280
|
}
|
|
290
281
|
);
|
|
291
|
-
|
|
292
|
-
function
|
|
293
|
-
const d =
|
|
282
|
+
Mt.displayName = "BadgeGroup";
|
|
283
|
+
function zt({ as: e = "div", size: t = "md", border: a, children: s, className: r, ...i }, l) {
|
|
284
|
+
const d = v({
|
|
294
285
|
border: a,
|
|
295
286
|
interactive: e === "button" ? "true" : "false",
|
|
296
287
|
size: t
|
|
297
288
|
});
|
|
298
|
-
return /* @__PURE__ */ o(e === "button" ? "button" : "div", { ref: l, className: c(
|
|
289
|
+
return /* @__PURE__ */ o(e === "button" ? "button" : "div", { ref: l, className: c($.card, r), ...d, ...i, children: s });
|
|
299
290
|
}
|
|
300
291
|
const ce = n(
|
|
301
|
-
|
|
292
|
+
zt
|
|
302
293
|
);
|
|
303
294
|
ce.displayName = "Card";
|
|
304
295
|
const de = n(
|
|
305
296
|
({ justify: e, gap: t, children: a, className: s, ...r }, i) => {
|
|
306
|
-
const l =
|
|
307
|
-
return /* @__PURE__ */ o("div", { ref: i, className: c(
|
|
297
|
+
const l = v({ gap: t, justify: e });
|
|
298
|
+
return /* @__PURE__ */ o("div", { ref: i, className: c($.header, s), ...l, ...r, children: a });
|
|
308
299
|
}
|
|
309
300
|
);
|
|
310
301
|
de.displayName = "Card.Header";
|
|
311
302
|
const me = n(
|
|
312
303
|
({ align: e, gap: t, children: a, className: s, ...r }, i) => {
|
|
313
|
-
const l =
|
|
314
|
-
return /* @__PURE__ */ o("div", { ref: i, className: c(
|
|
304
|
+
const l = v({ align: e, gap: t });
|
|
305
|
+
return /* @__PURE__ */ o("div", { ref: i, className: c($.body, s), ...l, ...r, children: a });
|
|
315
306
|
}
|
|
316
307
|
);
|
|
317
308
|
me.displayName = "Card.Body";
|
|
318
309
|
const ue = n(
|
|
319
310
|
({ justify: e, gap: t, children: a, className: s, ...r }, i) => {
|
|
320
|
-
const l =
|
|
321
|
-
return /* @__PURE__ */ o("div", { ref: i, className: c(
|
|
311
|
+
const l = v({ gap: t, justify: e });
|
|
312
|
+
return /* @__PURE__ */ o("div", { ref: i, className: c($.footer, s), ...l, ...r, children: a });
|
|
322
313
|
}
|
|
323
314
|
);
|
|
324
315
|
ue.displayName = "Card.Footer";
|
|
325
|
-
const
|
|
316
|
+
const na = Object.assign(ce, {
|
|
326
317
|
Body: me,
|
|
327
318
|
Footer: ue,
|
|
328
319
|
Header: de
|
|
@@ -359,20 +350,20 @@ const ra = Object.assign(ce, {
|
|
|
359
350
|
}
|
|
360
351
|
);
|
|
361
352
|
be.displayName = "Menu";
|
|
362
|
-
function
|
|
353
|
+
function jt(e) {
|
|
363
354
|
return R.getTooltipTriggerProps({
|
|
364
355
|
id: e.id
|
|
365
356
|
});
|
|
366
357
|
}
|
|
367
|
-
function
|
|
358
|
+
function Dt(e) {
|
|
368
359
|
R.close(e);
|
|
369
360
|
}
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
-
|
|
361
|
+
const W = be;
|
|
362
|
+
W.getTriggerProps = jt;
|
|
363
|
+
W.close = Dt;
|
|
373
364
|
const Ne = n(
|
|
374
365
|
({ 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 =
|
|
366
|
+
const m = H(pe), p = m != null && m.onChange && e !== void 0 ? m.value === e : !1, y = v({
|
|
376
367
|
active: p,
|
|
377
368
|
disabled: t
|
|
378
369
|
}), h = (T) => {
|
|
@@ -401,7 +392,7 @@ const Ne = n(
|
|
|
401
392
|
}
|
|
402
393
|
);
|
|
403
394
|
Ne.displayName = "Menu.Item";
|
|
404
|
-
const D =
|
|
395
|
+
const D = W;
|
|
405
396
|
D.Item = Ne;
|
|
406
397
|
const ye = F(void 0);
|
|
407
398
|
function he() {
|
|
@@ -410,7 +401,7 @@ function he() {
|
|
|
410
401
|
throw new Error("useTableProvider must be used within a Table component");
|
|
411
402
|
return e;
|
|
412
403
|
}
|
|
413
|
-
const
|
|
404
|
+
const fe = n(
|
|
414
405
|
({ leftContent: e, rightContent: t, className: a, ...s }, r) => {
|
|
415
406
|
const i = he(), l = typeof e == "function" ? e(i.selectedRows) : e, d = typeof t == "function" ? t(i.selectedRows) : t;
|
|
416
407
|
return /* @__PURE__ */ b("div", { ref: r, className: c(B.toolbar, a), ...s, children: [
|
|
@@ -419,9 +410,9 @@ const ve = n(
|
|
|
419
410
|
] });
|
|
420
411
|
}
|
|
421
412
|
);
|
|
422
|
-
|
|
423
|
-
const
|
|
424
|
-
|
|
413
|
+
fe.displayName = "Table.Toolbar";
|
|
414
|
+
const ve = n(({ className: e, ...t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(B.header, e), ...t }));
|
|
415
|
+
ve.displayName = "Table.Header";
|
|
425
416
|
const ge = n(({ className: e, ...t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(B.body, e), ...t }));
|
|
426
417
|
ge.displayName = "Table.Body";
|
|
427
418
|
const Te = n(({ className: e, ...t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(B.footer, e), ...t }));
|
|
@@ -430,7 +421,7 @@ const Se = n(({ className: e, ...t }, a) => /* @__PURE__ */ o("div", { ref: a, c
|
|
|
430
421
|
Se.displayName = "Table.Row";
|
|
431
422
|
const Be = n(
|
|
432
423
|
({ as: e = "div", area: t, variant: a, className: s, style: r, ...i }, l) => {
|
|
433
|
-
const d =
|
|
424
|
+
const d = v({
|
|
434
425
|
variant: a
|
|
435
426
|
});
|
|
436
427
|
return /* @__PURE__ */ o(
|
|
@@ -488,7 +479,7 @@ const xe = n(({ icon: e, children: t }, a) => {
|
|
|
488
479
|
const s = K(), r = D.getTriggerProps({ id: s });
|
|
489
480
|
return /* @__PURE__ */ b("div", { ref: a, className: c(B.action), children: [
|
|
490
481
|
/* @__PURE__ */ o(
|
|
491
|
-
|
|
482
|
+
V,
|
|
492
483
|
{
|
|
493
484
|
...r,
|
|
494
485
|
as: e,
|
|
@@ -506,22 +497,22 @@ const xe = n(({ icon: e, children: t }, a) => {
|
|
|
506
497
|
});
|
|
507
498
|
xe.displayName = "Table.Action";
|
|
508
499
|
const Ie = n(({ columns: e, children: t, className: a, style: s, onSelectionChange: r, ...i }, l) => {
|
|
509
|
-
const [d, u] =
|
|
500
|
+
const [d, u] = z(/* @__PURE__ */ new Set()), m = M(/* @__PURE__ */ new Set()), p = (f, N) => {
|
|
510
501
|
const S = new Set(d);
|
|
511
|
-
N ? S.add(
|
|
502
|
+
N ? S.add(f) : S.delete(f), u(S), r == null || r({
|
|
512
503
|
selected: S,
|
|
513
504
|
allSelected: S.size === m.current.size && m.current.size > 0,
|
|
514
505
|
someSelected: S.size > 0
|
|
515
506
|
});
|
|
516
|
-
}, y = (
|
|
517
|
-
const S = N ? new Set(
|
|
507
|
+
}, y = (f, N) => {
|
|
508
|
+
const S = N ? new Set(f) : /* @__PURE__ */ new Set();
|
|
518
509
|
u(S), r == null || r({
|
|
519
510
|
selected: S,
|
|
520
511
|
allSelected: N,
|
|
521
512
|
someSelected: N
|
|
522
513
|
});
|
|
523
|
-
}, h = (
|
|
524
|
-
m.current.add(
|
|
514
|
+
}, h = (f) => {
|
|
515
|
+
m.current.add(f);
|
|
525
516
|
}, T = {
|
|
526
517
|
selectedRows: d,
|
|
527
518
|
allRowIds: m.current,
|
|
@@ -544,9 +535,9 @@ const Ie = n(({ columns: e, children: t, className: a, style: s, onSelectionChan
|
|
|
544
535
|
) });
|
|
545
536
|
});
|
|
546
537
|
Ie.displayName = "Table";
|
|
547
|
-
const
|
|
548
|
-
Toolbar:
|
|
549
|
-
Header:
|
|
538
|
+
const ca = Object.assign(Ie, {
|
|
539
|
+
Toolbar: fe,
|
|
540
|
+
Header: ve,
|
|
550
541
|
Body: ge,
|
|
551
542
|
Footer: Te,
|
|
552
543
|
Row: Se,
|
|
@@ -555,7 +546,7 @@ const ia = Object.assign(Ie, {
|
|
|
555
546
|
DoubleLine: Re,
|
|
556
547
|
Action: xe,
|
|
557
548
|
ActionItem: we
|
|
558
|
-
}),
|
|
549
|
+
}), $t = n(
|
|
559
550
|
({
|
|
560
551
|
gap: e = "md",
|
|
561
552
|
direction: t = "horizontal",
|
|
@@ -567,7 +558,7 @@ const ia = Object.assign(Ie, {
|
|
|
567
558
|
className: d,
|
|
568
559
|
...u
|
|
569
560
|
}, m) => {
|
|
570
|
-
const p =
|
|
561
|
+
const p = v({
|
|
571
562
|
align: a,
|
|
572
563
|
direction: t,
|
|
573
564
|
fluid: r,
|
|
@@ -578,7 +569,7 @@ const ia = Object.assign(Ie, {
|
|
|
578
569
|
"div",
|
|
579
570
|
{
|
|
580
571
|
ref: m,
|
|
581
|
-
className: c(
|
|
572
|
+
className: c(ft["button-group"], d),
|
|
582
573
|
role: "group",
|
|
583
574
|
"aria-label": i,
|
|
584
575
|
...p,
|
|
@@ -588,7 +579,7 @@ const ia = Object.assign(Ie, {
|
|
|
588
579
|
);
|
|
589
580
|
}
|
|
590
581
|
);
|
|
591
|
-
|
|
582
|
+
$t.displayName = "ButtonGroup";
|
|
592
583
|
const Le = n(({ children: e, className: t, ...a }, s) => /* @__PURE__ */ o("div", { ref: s, className: c(w["top-bar"], t), ...a, children: e }));
|
|
593
584
|
Le.displayName = "TopBar";
|
|
594
585
|
const Fe = n(({ children: e, className: t, ...a }, s) => /* @__PURE__ */ o("div", { ref: s, className: c(w["top-bar-leading"], t), ...a, children: e }));
|
|
@@ -614,25 +605,25 @@ const Ce = n(
|
|
|
614
605
|
)
|
|
615
606
|
);
|
|
616
607
|
Ce.displayName = "TopBar.Item";
|
|
617
|
-
const
|
|
618
|
-
|
|
619
|
-
const
|
|
608
|
+
const Ge = n(({ children: e, className: t, ...a }, s) => /* @__PURE__ */ o("div", { ref: s, className: c(w["top-bar-list-item"], t), ...a, children: e }));
|
|
609
|
+
Ge.displayName = "TopBar.ListItem";
|
|
610
|
+
const da = Object.assign(Le, {
|
|
620
611
|
Centred: He,
|
|
621
612
|
Item: Ce,
|
|
622
613
|
Leading: Fe,
|
|
623
|
-
ListItem:
|
|
614
|
+
ListItem: Ge,
|
|
624
615
|
Trailing: Pe
|
|
625
|
-
}),
|
|
626
|
-
|
|
627
|
-
const
|
|
628
|
-
|
|
616
|
+
}), Me = n(({ children: e, className: t }, a) => /* @__PURE__ */ o("aside", { ref: a, className: c(g.sidebar, t), children: e }));
|
|
617
|
+
Me.displayName = "Sidebar";
|
|
618
|
+
const ze = n(({ children: e, className: t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(g["sidebar-header"], t), children: e }));
|
|
619
|
+
ze.displayName = "Sidebar.Header";
|
|
629
620
|
const je = n(({ children: e, className: t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(g["sidebar-body"], t), children: e }));
|
|
630
621
|
je.displayName = "Sidebar.Body";
|
|
631
622
|
const De = n(({ children: e, className: t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(g["sidebar-footer"], t), children: e }));
|
|
632
623
|
De.displayName = "Sidebar.Footer";
|
|
633
|
-
const
|
|
624
|
+
const $e = n(
|
|
634
625
|
({ label: e, icon: t, defaultExpanded: a = !0, isExpanded: s, onExpandedChange: r, children: i, className: l }, d) => {
|
|
635
|
-
const [u, m] =
|
|
626
|
+
const [u, m] = z(a), p = s !== void 0 ? s : u, y = () => {
|
|
636
627
|
const h = !p;
|
|
637
628
|
m(h), r == null || r(h);
|
|
638
629
|
};
|
|
@@ -654,8 +645,8 @@ const Oe = n(
|
|
|
654
645
|
);
|
|
655
646
|
}
|
|
656
647
|
);
|
|
657
|
-
|
|
658
|
-
const
|
|
648
|
+
$e.displayName = "Sidebar.Group";
|
|
649
|
+
const Oe = n(
|
|
659
650
|
({ as: e = "button", active: t, disabled: a, icon: s, action: r, className: i, children: l, ...d }, u) => /* @__PURE__ */ b(
|
|
660
651
|
e,
|
|
661
652
|
{
|
|
@@ -673,18 +664,18 @@ const $e = n(
|
|
|
673
664
|
}
|
|
674
665
|
)
|
|
675
666
|
);
|
|
676
|
-
|
|
667
|
+
Oe.displayName = "Sidebar.Item";
|
|
677
668
|
const ke = n(({ children: e, className: t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(g["sidebar-item-list"], t), children: e }));
|
|
678
669
|
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(
|
|
670
|
+
const _e = n(({ className: e }, t) => /* @__PURE__ */ o("div", { ref: t, className: c(g["sidebar-divider"], e), children: /* @__PURE__ */ o(Bt, {}) }));
|
|
680
671
|
_e.displayName = "Sidebar.Divider";
|
|
681
|
-
const
|
|
672
|
+
const ma = Object.assign(Me, {
|
|
682
673
|
Body: je,
|
|
683
674
|
Divider: _e,
|
|
684
675
|
Footer: De,
|
|
685
|
-
Group:
|
|
686
|
-
Header:
|
|
687
|
-
Item:
|
|
676
|
+
Group: $e,
|
|
677
|
+
Header: ze,
|
|
678
|
+
Item: Oe,
|
|
688
679
|
ItemList: ke
|
|
689
680
|
});
|
|
690
681
|
function Ot(e, t) {
|
|
@@ -694,7 +685,7 @@ const Ee = n(({ children: e, className: t, ...a }, s) => /* @__PURE__ */ o("nav"
|
|
|
694
685
|
Ee.displayName = "BottomBar";
|
|
695
686
|
const Ve = n(
|
|
696
687
|
({ 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 =
|
|
688
|
+
const p = Ot(e, "a"), y = v({
|
|
698
689
|
active: a,
|
|
699
690
|
disabled: s
|
|
700
691
|
}), h = (N) => {
|
|
@@ -717,12 +708,12 @@ const Ve = n(
|
|
|
717
708
|
}
|
|
718
709
|
);
|
|
719
710
|
Ve.displayName = "BottomBar.Item";
|
|
720
|
-
const
|
|
711
|
+
const ua = Object.assign(Ee, {
|
|
721
712
|
Item: Ve
|
|
722
713
|
}), We = n(({ className: e, children: t }, a) => /* @__PURE__ */ o("div", { ref: a, className: c(x["app-layout"], e), children: t }));
|
|
723
714
|
We.displayName = "AppLayout";
|
|
724
715
|
const Xe = n(({ centered: e, className: t, children: a }, s) => {
|
|
725
|
-
const r =
|
|
716
|
+
const r = v({
|
|
726
717
|
centered: e
|
|
727
718
|
});
|
|
728
719
|
return /* @__PURE__ */ o("div", { ref: s, className: c(x["app-layout-body"], t), ...r, children: a });
|
|
@@ -738,7 +729,7 @@ const Qe = n(({ className: e, children: t }, a) => /* @__PURE__ */ o("aside", {
|
|
|
738
729
|
Qe.displayName = "AppLayout.SideRight";
|
|
739
730
|
const Ue = n(({ className: e, children: t }, a) => /* @__PURE__ */ o("footer", { ref: a, className: c(x["app-layout-footer"], e), children: t }));
|
|
740
731
|
Ue.displayName = "AppLayout.Footer";
|
|
741
|
-
const
|
|
732
|
+
const pa = Object.assign(We, {
|
|
742
733
|
Body: Xe,
|
|
743
734
|
Footer: Ue,
|
|
744
735
|
Header: qe,
|
|
@@ -746,12 +737,12 @@ const da = Object.assign(We, {
|
|
|
746
737
|
SideLeft: Ke,
|
|
747
738
|
SideRight: Qe
|
|
748
739
|
});
|
|
749
|
-
function
|
|
740
|
+
function kt({ columns: e = "1fr", children: t, className: a, style: s, ...r }, i) {
|
|
750
741
|
return /* @__PURE__ */ o(
|
|
751
742
|
"form",
|
|
752
743
|
{
|
|
753
744
|
ref: i,
|
|
754
|
-
className: c(
|
|
745
|
+
className: c(E["form-group"], a),
|
|
755
746
|
style: {
|
|
756
747
|
"--_columns": e,
|
|
757
748
|
...s
|
|
@@ -761,14 +752,14 @@ function $t({ columns: e = "1fr", children: t, className: a, style: s, ...r }, i
|
|
|
761
752
|
}
|
|
762
753
|
);
|
|
763
754
|
}
|
|
764
|
-
const Ye = n(
|
|
755
|
+
const Ye = n(kt);
|
|
765
756
|
Ye.displayName = "FormGroup";
|
|
766
757
|
const Ze = n(
|
|
767
758
|
({ area: e, children: t, className: a, style: s, ...r }, i) => /* @__PURE__ */ o(
|
|
768
759
|
"div",
|
|
769
760
|
{
|
|
770
761
|
ref: i,
|
|
771
|
-
className: c(
|
|
762
|
+
className: c(E.field, a),
|
|
772
763
|
style: {
|
|
773
764
|
"--_area": e,
|
|
774
765
|
...s
|
|
@@ -779,16 +770,16 @@ const Ze = n(
|
|
|
779
770
|
)
|
|
780
771
|
);
|
|
781
772
|
Ze.displayName = "FormGroup.Field";
|
|
782
|
-
const et = n(({ className: e, ...t }, a) => /* @__PURE__ */ o("hr", { ref: a, className: c(
|
|
773
|
+
const et = n(({ className: e, ...t }, a) => /* @__PURE__ */ o("hr", { ref: a, className: c(E.separator, e), ...t }));
|
|
783
774
|
et.displayName = "FormGroup.Separator";
|
|
784
|
-
const
|
|
775
|
+
const ba = Object.assign(Ye, {
|
|
785
776
|
Field: Ze,
|
|
786
777
|
Separator: et
|
|
787
778
|
});
|
|
788
|
-
function
|
|
779
|
+
function _t({ direction: e = "column", children: t, className: a, ...s }, r) {
|
|
789
780
|
return /* @__PURE__ */ o("ul", { ref: r, className: c(_.features, a), "data-direction": e, ...s, children: t });
|
|
790
781
|
}
|
|
791
|
-
const tt = n(
|
|
782
|
+
const tt = n(_t);
|
|
792
783
|
tt.displayName = "Features";
|
|
793
784
|
const at = n(
|
|
794
785
|
({ icon: e, children: t, className: a, "aria-label": s, ...r }, i) => {
|
|
@@ -801,23 +792,23 @@ const at = n(
|
|
|
801
792
|
}
|
|
802
793
|
);
|
|
803
794
|
at.displayName = "Features.Item";
|
|
804
|
-
const
|
|
795
|
+
const Et = Object.assign(tt, {
|
|
805
796
|
Item: at
|
|
806
|
-
}),
|
|
797
|
+
}), Na = Et, st = F(void 0), Vt = () => {
|
|
807
798
|
const e = H(st);
|
|
808
799
|
if (!e)
|
|
809
800
|
throw new Error("Modal subcomponents must be used within Modal");
|
|
810
801
|
return e;
|
|
811
802
|
}, ot = n(
|
|
812
803
|
({ open: e, onOpenChange: t, size: a, position: s, children: r, className: i, ...l }, d) => {
|
|
813
|
-
const u =
|
|
804
|
+
const u = v({ size: a, position: s });
|
|
814
805
|
return /* @__PURE__ */ o(st.Provider, { value: { onClose: () => t == null ? void 0 : t(!1) }, children: /* @__PURE__ */ o(
|
|
815
806
|
Y,
|
|
816
807
|
{
|
|
817
808
|
ref: d,
|
|
818
809
|
isOpen: e,
|
|
819
810
|
onOpenChange: t,
|
|
820
|
-
className: c(e &&
|
|
811
|
+
className: c(e && vt.modal, i),
|
|
821
812
|
"data-modal": "",
|
|
822
813
|
...u,
|
|
823
814
|
...l,
|
|
@@ -828,9 +819,9 @@ const _t = Object.assign(tt, {
|
|
|
828
819
|
);
|
|
829
820
|
ot.displayName = "Modal";
|
|
830
821
|
const rt = n(({ onClick: e, ...t }, a) => {
|
|
831
|
-
const { onClose: s } =
|
|
822
|
+
const { onClose: s } = Vt();
|
|
832
823
|
return /* @__PURE__ */ o(
|
|
833
|
-
|
|
824
|
+
V,
|
|
834
825
|
{
|
|
835
826
|
ref: a,
|
|
836
827
|
variant: "ghost",
|
|
@@ -864,13 +855,13 @@ const lt = n(
|
|
|
864
855
|
)
|
|
865
856
|
);
|
|
866
857
|
lt.displayName = "Modal.Footer";
|
|
867
|
-
const
|
|
858
|
+
const ya = Object.assign(ot, {
|
|
868
859
|
Body: ee,
|
|
869
860
|
CloseButton: rt,
|
|
870
861
|
Footer: lt,
|
|
871
862
|
Header: it,
|
|
872
863
|
Title: Z
|
|
873
|
-
}), nt = F(void 0),
|
|
864
|
+
}), nt = F(void 0), Wt = () => {
|
|
874
865
|
const e = H(nt);
|
|
875
866
|
if (!e)
|
|
876
867
|
throw new Error("BottomSheet subcomponents must be used within BottomSheet");
|
|
@@ -891,9 +882,9 @@ const pa = Object.assign(ot, {
|
|
|
891
882
|
ct.displayName = "BottomSheet";
|
|
892
883
|
const dt = n(
|
|
893
884
|
({ onClick: e, ...t }, a) => {
|
|
894
|
-
const { onClose: s } =
|
|
885
|
+
const { onClose: s } = Wt();
|
|
895
886
|
return /* @__PURE__ */ o(
|
|
896
|
-
|
|
887
|
+
V,
|
|
897
888
|
{
|
|
898
889
|
as: J,
|
|
899
890
|
ref: a,
|
|
@@ -909,13 +900,17 @@ const dt = n(
|
|
|
909
900
|
}
|
|
910
901
|
);
|
|
911
902
|
dt.displayName = "BottomSheet.CloseButton";
|
|
912
|
-
const
|
|
903
|
+
const ha = Object.assign(ct, {
|
|
913
904
|
Body: ee,
|
|
914
905
|
CloseButton: dt,
|
|
915
|
-
Footer:
|
|
916
|
-
Header:
|
|
906
|
+
Footer: It,
|
|
907
|
+
Header: xt,
|
|
917
908
|
Title: Z
|
|
918
|
-
}),
|
|
909
|
+
}), Xt = n(
|
|
910
|
+
({ children: e, className: t, ...a }, s) => /* @__PURE__ */ o("div", { ref: s, className: c(Tt.content, t), ...a, children: e })
|
|
911
|
+
);
|
|
912
|
+
Xt.displayName = "PageContent";
|
|
913
|
+
const mt = n(
|
|
919
914
|
({ title: e, subtitle: t, supplementary: a, className: s, ...r }, i) => /* @__PURE__ */ b("header", { ref: i, className: c(A.header, s), ...r, children: [
|
|
920
915
|
e,
|
|
921
916
|
t,
|
|
@@ -925,12 +920,12 @@ const ba = Object.assign(ct, {
|
|
|
925
920
|
mt.displayName = "PageHeader";
|
|
926
921
|
const ut = n(
|
|
927
922
|
({ action: e, additionalInfo: t, className: a, children: s, ...r }, i) => {
|
|
928
|
-
const l =
|
|
923
|
+
const l = v({
|
|
929
924
|
action: e ? "true" : "false",
|
|
930
925
|
"additional-info": t ? "true" : "false"
|
|
931
926
|
});
|
|
932
927
|
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(
|
|
928
|
+
/* @__PURE__ */ o("div", { className: A["title-inner"], children: /* @__PURE__ */ o(At, { as: "h1", size: "xl", weight: "bold", intent: "default", className: A.heading, children: s }) }),
|
|
934
929
|
(e || t) && /* @__PURE__ */ b("div", { className: A["title-right"], children: [
|
|
935
930
|
t && /* @__PURE__ */ o("div", { className: A["additional-info"], children: t }),
|
|
936
931
|
e && /* @__PURE__ */ o("div", { className: A.action, children: e })
|
|
@@ -941,35 +936,36 @@ const ut = n(
|
|
|
941
936
|
ut.displayName = "PageHeader.Title";
|
|
942
937
|
const pt = n(
|
|
943
938
|
({ additionalInfo: e, className: t, children: a, ...s }, r) => /* @__PURE__ */ b("div", { ref: r, className: c(A.subtitle, t), ...s, children: [
|
|
944
|
-
/* @__PURE__ */ o(
|
|
939
|
+
/* @__PURE__ */ o(Rt, { as: "p", size: "base", weight: "normal", intent: "default", className: A["subtitle-text"], children: a }),
|
|
945
940
|
e && /* @__PURE__ */ o("div", { className: A["subtitle-additional-info"], children: e })
|
|
946
941
|
] })
|
|
947
942
|
);
|
|
948
943
|
pt.displayName = "PageHeader.Subtitle";
|
|
949
|
-
const
|
|
944
|
+
const fa = Object.assign(mt, {
|
|
950
945
|
Title: ut,
|
|
951
946
|
Subtitle: pt
|
|
952
947
|
});
|
|
953
948
|
export {
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
949
|
+
ra as Accordion,
|
|
950
|
+
pa as AppLayout,
|
|
951
|
+
la as AttributeList,
|
|
952
|
+
Ht as AvatarGroup,
|
|
953
|
+
Mt as BadgeGroup,
|
|
954
|
+
ua as BottomBar,
|
|
955
|
+
ha as BottomSheet,
|
|
956
|
+
$t as ButtonGroup,
|
|
957
|
+
na as Card,
|
|
963
958
|
Y as Dialog,
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
959
|
+
Ta as Drawer,
|
|
960
|
+
Na as Features,
|
|
961
|
+
ba as FormGroup,
|
|
967
962
|
D as Menu,
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
963
|
+
ya as Modal,
|
|
964
|
+
Gt as NoResults,
|
|
965
|
+
Xt as PageContent,
|
|
966
|
+
fa as PageHeader,
|
|
967
|
+
ma as Sidebar,
|
|
968
|
+
ca as Table,
|
|
969
|
+
ia as Tabs,
|
|
970
|
+
da as TopBar
|
|
975
971
|
};
|