@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.d.ts +37 -0
- package/dist/blocks.js +495 -452
- package/dist/{drawer-DRv9k7lp.js → drawer-BjNHPqBr.js} +2 -2
- package/dist/forms.d.ts +192 -0
- package/dist/forms.js +625 -443
- package/dist/helpers-D23F5WBX.js +159 -0
- package/dist/{overlay-parts-CFeD8VN0.js → overlay-parts-BtD-Qj_k.js} +3 -3
- package/dist/primitive.d.ts +16 -3
- package/dist/primitive.js +16 -204
- package/dist/tooltip-60d7mYVa.js +378 -0
- package/dist/utils.js +1 -1
- package/package.json +2 -2
- package/dist/helpers-DTL6qrTe.js +0 -129
- package/dist/tooltip-BMKVL6jz.js +0 -170
package/dist/blocks.js
CHANGED
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
import { jsxs as b, jsx as
|
|
2
|
-
import { accordionStyles as L, avatarGroupStyles as
|
|
3
|
-
import { ChevronDownIcon as
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { u as
|
|
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 {
|
|
8
|
-
import { checkboxStyles as
|
|
9
|
-
import { a as
|
|
10
|
-
import { D as
|
|
11
|
-
import { overlayPartsStyles as
|
|
12
|
-
import { O as
|
|
13
|
-
const
|
|
14
|
-
function
|
|
15
|
-
const e =
|
|
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
|
|
21
|
-
const [d, u] =
|
|
22
|
-
|
|
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]),
|
|
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
|
-
},
|
|
31
|
-
return /* @__PURE__ */
|
|
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
|
-
...
|
|
37
|
+
...y,
|
|
38
38
|
...i,
|
|
39
39
|
children: [
|
|
40
40
|
e,
|
|
41
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ o("div", { className: L.content, children: s })
|
|
42
42
|
]
|
|
43
43
|
}
|
|
44
44
|
) });
|
|
45
45
|
}
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
({ children: e, right: t, clamp: a = 2, className:
|
|
50
|
-
const { isOpen: l, toggle: d } =
|
|
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,
|
|
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__ */
|
|
64
|
-
t && /* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
72
|
-
const
|
|
73
|
-
Summary:
|
|
74
|
-
}),
|
|
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:
|
|
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 =
|
|
86
|
-
return /* @__PURE__ */
|
|
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(
|
|
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
|
-
|
|
101
|
-
function
|
|
102
|
-
|
|
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
|
|
112
|
-
function
|
|
113
|
-
const e =
|
|
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
|
|
119
|
-
const i =
|
|
120
|
-
const
|
|
121
|
-
if (!
|
|
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
|
|
124
|
-
u(
|
|
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 = (
|
|
130
|
-
|
|
129
|
+
}, h = (v, N) => {
|
|
130
|
+
N && l.current.set(v, N);
|
|
131
131
|
};
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}, [e]),
|
|
135
|
-
const
|
|
136
|
-
return /* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */
|
|
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:
|
|
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
|
-
|
|
151
|
-
const
|
|
152
|
-
({ value: e, disabled: t = !1,
|
|
153
|
-
const { activeValue:
|
|
154
|
-
let
|
|
155
|
-
t ?
|
|
156
|
-
const
|
|
157
|
-
|
|
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__ */
|
|
162
|
+
return /* @__PURE__ */ o("li", { className: z.tabitem, children: /* @__PURE__ */ b(
|
|
160
163
|
"button",
|
|
161
164
|
{
|
|
162
|
-
ref:
|
|
163
|
-
className: c(
|
|
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":
|
|
169
|
+
"aria-selected": p,
|
|
167
170
|
"aria-controls": `tabs-panel-${e}`,
|
|
168
|
-
"data-state":
|
|
171
|
+
"data-state": y,
|
|
172
|
+
...N && { "data-icon-config": N },
|
|
169
173
|
disabled: t,
|
|
170
|
-
onClick:
|
|
171
|
-
children:
|
|
174
|
+
onClick: S,
|
|
175
|
+
children: [
|
|
176
|
+
a,
|
|
177
|
+
r,
|
|
178
|
+
s
|
|
179
|
+
]
|
|
172
180
|
}
|
|
173
181
|
) });
|
|
174
182
|
}
|
|
175
183
|
);
|
|
176
|
-
|
|
177
|
-
function
|
|
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
|
|
185
|
-
Item:
|
|
186
|
-
getPanelAttribute:
|
|
187
|
-
}),
|
|
188
|
-
({ icon: e, title: t, subtitle: a, action:
|
|
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__ */
|
|
199
|
-
/* @__PURE__ */
|
|
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__ */
|
|
202
|
-
|
|
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
|
-
|
|
208
|
-
const
|
|
209
|
-
({ layout: e, columns: t = "repeat(3, 1fr)", gap: a, children:
|
|
210
|
-
const u =
|
|
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__ */
|
|
221
|
+
return /* @__PURE__ */ o(
|
|
214
222
|
"dl",
|
|
215
223
|
{
|
|
216
224
|
ref: d,
|
|
217
|
-
className: c(
|
|
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:
|
|
233
|
+
children: s
|
|
226
234
|
}
|
|
227
235
|
);
|
|
228
236
|
}
|
|
229
237
|
);
|
|
230
|
-
|
|
231
|
-
const
|
|
232
|
-
({ title: e, area: t, children: a, className:
|
|
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(
|
|
244
|
+
className: c(s),
|
|
237
245
|
style: {
|
|
238
246
|
"--_area": t,
|
|
239
247
|
...r
|
|
240
248
|
},
|
|
241
249
|
...i,
|
|
242
250
|
children: [
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ o("dt", { children: e }),
|
|
252
|
+
/* @__PURE__ */ o("dd", { children: a })
|
|
245
253
|
]
|
|
246
254
|
}
|
|
247
255
|
)
|
|
248
256
|
);
|
|
249
|
-
|
|
250
|
-
const
|
|
251
|
-
Item:
|
|
252
|
-
}),
|
|
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:
|
|
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 =
|
|
271
|
+
const m = f({
|
|
264
272
|
align: a,
|
|
265
273
|
direction: t,
|
|
266
274
|
gap: e,
|
|
267
|
-
wrap:
|
|
275
|
+
wrap: s
|
|
268
276
|
});
|
|
269
|
-
return /* @__PURE__ */
|
|
277
|
+
return /* @__PURE__ */ o(
|
|
270
278
|
"div",
|
|
271
279
|
{
|
|
272
280
|
ref: u,
|
|
273
|
-
className: c(
|
|
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
|
-
|
|
284
|
-
function
|
|
285
|
-
const d =
|
|
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__ */
|
|
298
|
+
return /* @__PURE__ */ o(e === "button" ? "button" : "div", { ref: l, className: c(O.card, r), ...d, ...i, children: s });
|
|
291
299
|
}
|
|
292
|
-
const
|
|
293
|
-
|
|
300
|
+
const ce = n(
|
|
301
|
+
Gt
|
|
294
302
|
);
|
|
295
|
-
|
|
296
|
-
const
|
|
297
|
-
({ justify: e, gap: t, children: a, className:
|
|
298
|
-
const l =
|
|
299
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
303
|
-
const
|
|
304
|
-
({ align: e, gap: t, children: a, className:
|
|
305
|
-
const l =
|
|
306
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
310
|
-
const
|
|
311
|
-
({ justify: e, gap: t, children: a, className:
|
|
312
|
-
const l =
|
|
313
|
-
return /* @__PURE__ */
|
|
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
|
-
|
|
317
|
-
const
|
|
318
|
-
Body:
|
|
319
|
-
Footer:
|
|
320
|
-
Header:
|
|
321
|
-
}),
|
|
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:
|
|
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
|
|
342
|
+
const y = {
|
|
335
343
|
id: e,
|
|
336
344
|
closeOnClick: d,
|
|
337
345
|
onChange: l,
|
|
338
346
|
value: i
|
|
339
347
|
};
|
|
340
|
-
return /* @__PURE__ */
|
|
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:
|
|
351
|
+
className: C["menu-list"],
|
|
344
352
|
style: {
|
|
345
353
|
"--_max-height": `${a}px`,
|
|
346
|
-
"--_max-width": `${
|
|
354
|
+
"--_max-width": `${s}px`
|
|
347
355
|
},
|
|
348
356
|
children: u
|
|
349
357
|
}
|
|
350
358
|
) }) }) });
|
|
351
359
|
}
|
|
352
360
|
);
|
|
353
|
-
|
|
354
|
-
function
|
|
355
|
-
return
|
|
361
|
+
be.displayName = "Menu";
|
|
362
|
+
function Mt(e) {
|
|
363
|
+
return R.getTooltipTriggerProps({
|
|
356
364
|
id: e.id
|
|
357
365
|
});
|
|
358
366
|
}
|
|
359
|
-
function
|
|
360
|
-
|
|
367
|
+
function jt(e) {
|
|
368
|
+
R.close(e);
|
|
361
369
|
}
|
|
362
|
-
const
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
const
|
|
366
|
-
({ value: e, disabled: t = !1, leftIcon: a, rightIcon:
|
|
367
|
-
const m =
|
|
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 = (
|
|
378
|
+
}), h = (T) => {
|
|
371
379
|
if (t) {
|
|
372
|
-
|
|
380
|
+
T.preventDefault();
|
|
373
381
|
return;
|
|
374
382
|
}
|
|
375
|
-
m != null && m.onChange && e !== void 0 && m.onChange(e), i == null || i(
|
|
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(
|
|
389
|
+
className: c(C["menu-item"], l),
|
|
382
390
|
disabled: t,
|
|
383
|
-
...
|
|
391
|
+
...y,
|
|
384
392
|
...d,
|
|
385
393
|
onClick: h,
|
|
386
394
|
children: [
|
|
387
|
-
a ? /* @__PURE__ */
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
|
|
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
|
-
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
const
|
|
399
|
-
function
|
|
400
|
-
const e =
|
|
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
|
|
406
|
-
({ leftContent: e, rightContent: t, className: a, ...
|
|
407
|
-
const i =
|
|
408
|
-
return /* @__PURE__ */ b("div", { ref: r, className: c(
|
|
409
|
-
/* @__PURE__ */
|
|
410
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
415
|
-
const
|
|
416
|
-
|
|
417
|
-
const
|
|
418
|
-
|
|
419
|
-
const
|
|
420
|
-
|
|
421
|
-
const
|
|
422
|
-
|
|
423
|
-
const
|
|
424
|
-
({ as: e = "div", area: t, variant: a, className:
|
|
425
|
-
const d =
|
|
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__ */
|
|
436
|
+
return /* @__PURE__ */ o(
|
|
429
437
|
e,
|
|
430
438
|
{
|
|
431
439
|
ref: l,
|
|
432
|
-
className: c(
|
|
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
|
-
|
|
444
|
-
const
|
|
445
|
-
({ rowId: e, isMain: t = !1, checked: a, indeterminate:
|
|
446
|
-
const l =
|
|
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:
|
|
452
|
-
/* @__PURE__ */
|
|
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 ||
|
|
464
|
+
p && (p.indeterminate = m || s || !1, typeof i == "function" ? i(p) : i && (i.current = p));
|
|
457
465
|
},
|
|
458
466
|
type: "checkbox",
|
|
459
|
-
className:
|
|
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__ */
|
|
473
|
+
/* @__PURE__ */ o("span", { className: k.indicator })
|
|
466
474
|
] });
|
|
467
475
|
}
|
|
468
476
|
);
|
|
469
|
-
|
|
470
|
-
const
|
|
471
|
-
({ as: e = "div", title: t, subtitle: a, size:
|
|
472
|
-
/* @__PURE__ */
|
|
473
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
477
|
-
const
|
|
478
|
-
|
|
479
|
-
const
|
|
480
|
-
const
|
|
481
|
-
return /* @__PURE__ */ b("div", { ref: a, className: c(
|
|
482
|
-
/* @__PURE__ */
|
|
483
|
-
|
|
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(
|
|
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__ */
|
|
504
|
+
/* @__PURE__ */ o(D, { id: s, placement: "bottom", closeOnClick: !0, children: t })
|
|
497
505
|
] });
|
|
498
506
|
});
|
|
499
|
-
|
|
500
|
-
const
|
|
501
|
-
const [d, u] =
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
selected:
|
|
505
|
-
allSelected:
|
|
506
|
-
someSelected:
|
|
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
|
-
},
|
|
509
|
-
const
|
|
510
|
-
u(
|
|
511
|
-
selected:
|
|
512
|
-
allSelected:
|
|
513
|
-
someSelected:
|
|
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 = (
|
|
516
|
-
m.current.add(
|
|
517
|
-
},
|
|
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:
|
|
529
|
+
onSelectAll: y,
|
|
522
530
|
registerRowId: h
|
|
523
531
|
};
|
|
524
|
-
return /* @__PURE__ */
|
|
532
|
+
return /* @__PURE__ */ o(ye.Provider, { value: T, children: /* @__PURE__ */ o(
|
|
525
533
|
"div",
|
|
526
534
|
{
|
|
527
535
|
ref: l,
|
|
528
|
-
className: c(
|
|
536
|
+
className: c(B.table, a),
|
|
529
537
|
style: {
|
|
530
538
|
"--_columns": e,
|
|
531
|
-
...
|
|
539
|
+
...s
|
|
532
540
|
},
|
|
533
541
|
...i,
|
|
534
542
|
children: t
|
|
535
543
|
}
|
|
536
544
|
) });
|
|
537
545
|
});
|
|
538
|
-
|
|
539
|
-
const
|
|
540
|
-
Toolbar:
|
|
541
|
-
Header:
|
|
542
|
-
Body:
|
|
543
|
-
Footer:
|
|
544
|
-
Row:
|
|
545
|
-
Col:
|
|
546
|
-
Checkbox:
|
|
547
|
-
DoubleLine:
|
|
548
|
-
Action:
|
|
549
|
-
ActionItem:
|
|
550
|
-
}),
|
|
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:
|
|
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 =
|
|
570
|
+
const p = f({
|
|
563
571
|
align: a,
|
|
564
572
|
direction: t,
|
|
565
573
|
fluid: r,
|
|
566
574
|
gap: e,
|
|
567
|
-
wrap:
|
|
575
|
+
wrap: s
|
|
568
576
|
});
|
|
569
|
-
return /* @__PURE__ */
|
|
577
|
+
return /* @__PURE__ */ o(
|
|
570
578
|
"div",
|
|
571
579
|
{
|
|
572
580
|
ref: m,
|
|
573
|
-
className: c(
|
|
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
|
-
|
|
584
|
-
const
|
|
585
|
-
|
|
586
|
-
const
|
|
587
|
-
|
|
588
|
-
const
|
|
589
|
-
|
|
590
|
-
const
|
|
591
|
-
|
|
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:
|
|
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(
|
|
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
|
-
|
|
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
|
|
610
|
-
|
|
611
|
-
const
|
|
612
|
-
Centred:
|
|
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:
|
|
615
|
-
ListItem:
|
|
616
|
-
Trailing:
|
|
617
|
-
}),
|
|
618
|
-
|
|
619
|
-
const
|
|
620
|
-
|
|
621
|
-
const
|
|
622
|
-
|
|
623
|
-
const
|
|
624
|
-
|
|
625
|
-
const
|
|
626
|
-
({ label: e, icon: t, defaultExpanded: a = !0, isExpanded:
|
|
627
|
-
const [u, m] =
|
|
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(
|
|
643
|
+
className: c(g["sidebar-group"], l),
|
|
636
644
|
"data-expanded": p ? "" : void 0,
|
|
637
645
|
children: [
|
|
638
|
-
/* @__PURE__ */ b("button", { className:
|
|
639
|
-
t && /* @__PURE__ */
|
|
640
|
-
/* @__PURE__ */
|
|
641
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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
|
-
|
|
650
|
-
const
|
|
651
|
-
({ as: e = "button", active: t, disabled: a, icon:
|
|
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(
|
|
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
|
-
|
|
662
|
-
/* @__PURE__ */
|
|
663
|
-
r && /* @__PURE__ */
|
|
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
|
-
|
|
669
|
-
const
|
|
670
|
-
|
|
671
|
-
const
|
|
672
|
-
|
|
673
|
-
const
|
|
674
|
-
Body:
|
|
675
|
-
Divider:
|
|
676
|
-
Footer:
|
|
677
|
-
Group:
|
|
678
|
-
Header:
|
|
679
|
-
Item:
|
|
680
|
-
ItemList:
|
|
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
|
|
690
|
+
function Ot(e, t) {
|
|
683
691
|
return e === t;
|
|
684
692
|
}
|
|
685
|
-
const
|
|
686
|
-
|
|
687
|
-
const
|
|
688
|
-
({ as: e = "button", href: t, active: a = !1, disabled:
|
|
689
|
-
const p =
|
|
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:
|
|
692
|
-
}), h = (
|
|
693
|
-
if (
|
|
694
|
-
|
|
699
|
+
disabled: s
|
|
700
|
+
}), h = (N) => {
|
|
701
|
+
if (s) {
|
|
702
|
+
N.preventDefault();
|
|
695
703
|
return;
|
|
696
704
|
}
|
|
697
|
-
l == null || l(
|
|
698
|
-
},
|
|
699
|
-
className: c(
|
|
705
|
+
l == null || l(N);
|
|
706
|
+
}, T = {
|
|
707
|
+
className: c(j["bottom-bar-item"], d),
|
|
700
708
|
onClick: h,
|
|
701
709
|
ref: m,
|
|
702
|
-
...
|
|
710
|
+
...y,
|
|
703
711
|
...u
|
|
704
712
|
};
|
|
705
|
-
return p && (
|
|
706
|
-
r && /* @__PURE__ */
|
|
707
|
-
i && /* @__PURE__ */
|
|
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
|
-
|
|
712
|
-
const
|
|
713
|
-
Item:
|
|
714
|
-
}),
|
|
715
|
-
|
|
716
|
-
const
|
|
717
|
-
const r =
|
|
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__ */
|
|
728
|
+
return /* @__PURE__ */ o("div", { ref: s, className: c(x["app-layout-body"], t), ...r, children: a });
|
|
721
729
|
});
|
|
722
|
-
|
|
723
|
-
const
|
|
724
|
-
|
|
725
|
-
const
|
|
726
|
-
|
|
727
|
-
const
|
|
728
|
-
|
|
729
|
-
const
|
|
730
|
-
|
|
731
|
-
const
|
|
732
|
-
|
|
733
|
-
const
|
|
734
|
-
Body:
|
|
735
|
-
Footer:
|
|
736
|
-
Header:
|
|
737
|
-
Main:
|
|
738
|
-
SideLeft:
|
|
739
|
-
SideRight:
|
|
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
|
|
742
|
-
return /* @__PURE__ */
|
|
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(
|
|
754
|
+
className: c(V["form-group"], a),
|
|
747
755
|
style: {
|
|
748
756
|
"--_columns": e,
|
|
749
|
-
...
|
|
757
|
+
...s
|
|
750
758
|
},
|
|
751
759
|
...r,
|
|
752
760
|
children: t
|
|
753
761
|
}
|
|
754
762
|
);
|
|
755
763
|
}
|
|
756
|
-
const
|
|
757
|
-
|
|
758
|
-
const
|
|
759
|
-
({ area: e, children: t, className: a, style:
|
|
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(
|
|
771
|
+
className: c(V.field, a),
|
|
764
772
|
style: {
|
|
765
773
|
"--_area": e,
|
|
766
|
-
...
|
|
774
|
+
...s
|
|
767
775
|
},
|
|
768
776
|
...r,
|
|
769
777
|
children: t
|
|
770
778
|
}
|
|
771
779
|
)
|
|
772
780
|
);
|
|
773
|
-
|
|
774
|
-
const
|
|
775
|
-
|
|
776
|
-
const
|
|
777
|
-
Field:
|
|
778
|
-
Separator:
|
|
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
|
|
781
|
-
return /* @__PURE__ */
|
|
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
|
|
784
|
-
|
|
785
|
-
const
|
|
786
|
-
({ icon: e, children: t, className: a, "aria-label":
|
|
787
|
-
const d = `features-item-${
|
|
788
|
-
return /* @__PURE__ */ b("li", { ref: i, "aria-label":
|
|
789
|
-
e && /* @__PURE__ */
|
|
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
|
-
|
|
799
|
+
s && /* @__PURE__ */ o(R, { id: d, children: /* @__PURE__ */ o(R.Text, { children: s }) })
|
|
792
800
|
] });
|
|
793
801
|
}
|
|
794
802
|
);
|
|
795
|
-
|
|
796
|
-
const
|
|
797
|
-
Item:
|
|
798
|
-
}),
|
|
799
|
-
const e =
|
|
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
|
-
},
|
|
804
|
-
({ open: e, onOpenChange: t, size: a, position:
|
|
805
|
-
const u =
|
|
806
|
-
return /* @__PURE__ */
|
|
807
|
-
|
|
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 &&
|
|
820
|
+
className: c(e && ft.modal, i),
|
|
813
821
|
"data-modal": "",
|
|
814
822
|
...u,
|
|
815
823
|
...l,
|
|
816
|
-
children: /* @__PURE__ */
|
|
824
|
+
children: /* @__PURE__ */ o("div", { className: P.content, children: r })
|
|
817
825
|
}
|
|
818
826
|
) });
|
|
819
827
|
}
|
|
820
828
|
);
|
|
821
|
-
|
|
822
|
-
const
|
|
823
|
-
const { onClose:
|
|
824
|
-
return /* @__PURE__ */
|
|
825
|
-
|
|
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:
|
|
837
|
+
as: J,
|
|
830
838
|
"aria-label": "Close",
|
|
831
839
|
onClick: (i) => {
|
|
832
|
-
|
|
840
|
+
s(), e == null || e(i);
|
|
833
841
|
},
|
|
834
|
-
className:
|
|
842
|
+
className: P.closeButton,
|
|
835
843
|
...t
|
|
836
844
|
}
|
|
837
845
|
);
|
|
838
846
|
});
|
|
839
|
-
|
|
840
|
-
const
|
|
841
|
-
/* @__PURE__ */
|
|
842
|
-
e && /* @__PURE__ */
|
|
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
|
-
|
|
845
|
-
const
|
|
846
|
-
({ align: e = "end", children: t, className: a, ...
|
|
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(
|
|
858
|
+
className: c(P.footer, "modal-footer", a),
|
|
851
859
|
"data-modal-footer": "",
|
|
852
860
|
"data-align": e,
|
|
853
|
-
...
|
|
861
|
+
...s,
|
|
854
862
|
children: t
|
|
855
863
|
}
|
|
856
864
|
)
|
|
857
865
|
);
|
|
858
|
-
|
|
859
|
-
const
|
|
860
|
-
Body:
|
|
861
|
-
CloseButton:
|
|
862
|
-
Footer:
|
|
863
|
-
Header:
|
|
864
|
-
Title:
|
|
865
|
-
}),
|
|
866
|
-
const e =
|
|
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
|
-
},
|
|
871
|
-
({ open: e, onOpenChange: t, children: a, className:
|
|
872
|
-
|
|
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(
|
|
885
|
+
className: c(gt.bottomSheet, s),
|
|
878
886
|
...r,
|
|
879
|
-
children: /* @__PURE__ */
|
|
887
|
+
children: /* @__PURE__ */ o("div", { className: P.content, children: a })
|
|
880
888
|
}
|
|
881
889
|
) })
|
|
882
890
|
);
|
|
883
|
-
|
|
884
|
-
const
|
|
891
|
+
ct.displayName = "BottomSheet";
|
|
892
|
+
const dt = n(
|
|
885
893
|
({ onClick: e, ...t }, a) => {
|
|
886
|
-
const { onClose:
|
|
887
|
-
return /* @__PURE__ */
|
|
888
|
-
|
|
894
|
+
const { onClose: s } = Vt();
|
|
895
|
+
return /* @__PURE__ */ o(
|
|
896
|
+
W,
|
|
889
897
|
{
|
|
890
|
-
as:
|
|
898
|
+
as: J,
|
|
891
899
|
ref: a,
|
|
892
900
|
variant: "ghost",
|
|
893
901
|
"aria-label": "Close",
|
|
894
902
|
onClick: (i) => {
|
|
895
|
-
|
|
903
|
+
s(), e == null || e(i);
|
|
896
904
|
},
|
|
897
|
-
className:
|
|
905
|
+
className: P.closeButton,
|
|
898
906
|
...t
|
|
899
907
|
}
|
|
900
908
|
);
|
|
901
909
|
}
|
|
902
910
|
);
|
|
903
|
-
|
|
904
|
-
const
|
|
905
|
-
Body:
|
|
906
|
-
CloseButton:
|
|
907
|
-
Footer:
|
|
908
|
-
Header:
|
|
909
|
-
Title:
|
|
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
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
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
|
};
|