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