@kb.ui/react 0.12.2 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/components/Button/Button.d.ts +3 -1
- package/dist/components/CopyableText/CopyableText.d.ts +3 -1
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/FilterChip/FilterChip.d.ts +29 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +15 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +12 -0
- package/dist/components/Toolbar/Toolbar.d.ts +1 -0
- package/dist/components/TreeList/TreeList.d.ts +27 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +905 -672
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/docs/components/Button.md +6 -0
- package/docs/components/CopyableText.md +5 -1
- package/docs/components/Dialog.md +4 -2
- package/docs/components/FilterChip.md +74 -0
- package/docs/components/ToggleButton.md +55 -0
- package/docs/components/ToggleGroup.md +59 -0
- package/docs/components/TreeList.md +64 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20,10 +20,13 @@ import { RadioGroup as F } from "@base-ui/react/radio-group";
|
|
|
20
20
|
import { ScrollArea as I } from "@base-ui/react/scroll-area";
|
|
21
21
|
import { Tabs as L } from "@base-ui/react/tabs";
|
|
22
22
|
import { Toast as R } from "@base-ui/react/toast";
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
23
|
+
import { Toggle as z } from "@base-ui/react/toggle";
|
|
24
|
+
import { DirectionProvider as B } from "@base-ui/react/direction-provider";
|
|
25
|
+
import { ToggleGroup as V } from "@base-ui/react/toggle-group";
|
|
26
|
+
import { Toolbar as H } from "@base-ui/react/toolbar";
|
|
27
|
+
import { Tooltip as U } from "@base-ui/react/tooltip";
|
|
25
28
|
//#region src/utils/CollapsiblePanel.tsx
|
|
26
|
-
function
|
|
29
|
+
function W({ nativeProps: e, state: n, render: r }) {
|
|
27
30
|
let a = !n.open && !e.hidden;
|
|
28
31
|
return t({
|
|
29
32
|
props: {
|
|
@@ -35,12 +38,12 @@ function V({ nativeProps: e, state: n, render: r }) {
|
|
|
35
38
|
}
|
|
36
39
|
//#endregion
|
|
37
40
|
//#region src/utils/kb.ts
|
|
38
|
-
function
|
|
41
|
+
function G(e, t = {}, n) {
|
|
39
42
|
let r = { className: v(`kb-${e}`, n) };
|
|
40
43
|
for (let [e, n] of Object.entries(t)) n !== void 0 && n !== !1 && (r[`data-${e}`] = n === !0 ? "" : n);
|
|
41
44
|
return r;
|
|
42
45
|
}
|
|
43
|
-
function
|
|
46
|
+
function K(e, t) {
|
|
44
47
|
let n = t !== void 0 && t !== !1 && t !== "false", r = e || n;
|
|
45
48
|
return {
|
|
46
49
|
invalid: r,
|
|
@@ -49,35 +52,35 @@ function U(e, t) {
|
|
|
49
52
|
}
|
|
50
53
|
//#endregion
|
|
51
54
|
//#region src/components/Accordion/Accordion.tsx
|
|
52
|
-
function
|
|
55
|
+
function q({ className: t, ...n }) {
|
|
53
56
|
return /* @__PURE__ */ b(e.Root, {
|
|
54
57
|
...n,
|
|
55
|
-
...
|
|
58
|
+
...G("accordion", {}, t)
|
|
56
59
|
});
|
|
57
60
|
}
|
|
58
|
-
function
|
|
61
|
+
function J({ className: t, ...n }) {
|
|
59
62
|
return /* @__PURE__ */ b(e.Item, {
|
|
60
63
|
...n,
|
|
61
|
-
...
|
|
64
|
+
...G("accordion-item", {}, t)
|
|
62
65
|
});
|
|
63
66
|
}
|
|
64
|
-
function
|
|
67
|
+
function ee({ className: t, ...n }) {
|
|
65
68
|
return /* @__PURE__ */ b(e.Header, {
|
|
66
69
|
...n,
|
|
67
|
-
...
|
|
70
|
+
...G("accordion-header", {}, t)
|
|
68
71
|
});
|
|
69
72
|
}
|
|
70
|
-
function
|
|
73
|
+
function Y({ className: t, ...n }) {
|
|
71
74
|
return /* @__PURE__ */ b(e.Trigger, {
|
|
72
75
|
...n,
|
|
73
|
-
...
|
|
76
|
+
...G("accordion-trigger", {}, t)
|
|
74
77
|
});
|
|
75
78
|
}
|
|
76
|
-
function
|
|
79
|
+
function X({ className: t, children: n, render: r, ...i }) {
|
|
77
80
|
return /* @__PURE__ */ b(e.Panel, {
|
|
78
81
|
...i,
|
|
79
|
-
...
|
|
80
|
-
render: (e, t) => /* @__PURE__ */ b(
|
|
82
|
+
...G("accordion-panel", {}, t),
|
|
83
|
+
render: (e, t) => /* @__PURE__ */ b(W, {
|
|
81
84
|
nativeProps: e,
|
|
82
85
|
state: t,
|
|
83
86
|
render: r
|
|
@@ -88,26 +91,26 @@ function J({ className: t, children: n, render: r, ...i }) {
|
|
|
88
91
|
})
|
|
89
92
|
});
|
|
90
93
|
}
|
|
91
|
-
var
|
|
92
|
-
Item:
|
|
93
|
-
Header:
|
|
94
|
-
Trigger:
|
|
95
|
-
Panel:
|
|
94
|
+
var te = Object.assign(q, {
|
|
95
|
+
Item: J,
|
|
96
|
+
Header: ee,
|
|
97
|
+
Trigger: Y,
|
|
98
|
+
Panel: X
|
|
96
99
|
});
|
|
97
100
|
//#endregion
|
|
98
101
|
//#region src/components/Image/Image.tsx
|
|
99
|
-
function
|
|
100
|
-
return /* @__PURE__ */ b(
|
|
102
|
+
function ne(e) {
|
|
103
|
+
return /* @__PURE__ */ b(re, { ...e }, JSON.stringify([
|
|
101
104
|
e.src,
|
|
102
105
|
e.srcSet,
|
|
103
106
|
e.sizes
|
|
104
107
|
]));
|
|
105
108
|
}
|
|
106
|
-
function
|
|
109
|
+
function re({ src: e, srcSet: t, sizes: n, width: r, height: i, loading: a, decoding: o = "async", crossOrigin: s, referrerPolicy: c, fetchPriority: l, onLoad: u, onError: d, alt: f, ratio: p = "landscape", fit: m = "cover", position: h, fallback: g, className: v, classNames: y, style: S, ...C }) {
|
|
107
110
|
let w = !!(e?.trim() || t?.trim()), [T, E] = _("loading"), D = Number(r) > 0 && Number(i) > 0 ? `${r} / ${i}` : void 0;
|
|
108
111
|
return /* @__PURE__ */ x("span", {
|
|
109
112
|
...C,
|
|
110
|
-
...
|
|
113
|
+
...G("image", {
|
|
111
114
|
ratio: p,
|
|
112
115
|
fit: m,
|
|
113
116
|
state: w ? T : "empty"
|
|
@@ -120,7 +123,7 @@ function X({ src: e, srcSet: t, sizes: n, width: r, height: i, loading: a, decod
|
|
|
120
123
|
...S
|
|
121
124
|
},
|
|
122
125
|
children: [/* @__PURE__ */ b("span", {
|
|
123
|
-
...
|
|
126
|
+
...G("image-fallback", {}, y?.fallback),
|
|
124
127
|
"aria-hidden": "true",
|
|
125
128
|
children: g ?? /* @__PURE__ */ x("svg", {
|
|
126
129
|
viewBox: "0 0 32 32",
|
|
@@ -145,7 +148,7 @@ function X({ src: e, srcSet: t, sizes: n, width: r, height: i, loading: a, decod
|
|
|
145
148
|
]
|
|
146
149
|
})
|
|
147
150
|
}), w && /* @__PURE__ */ b("img", {
|
|
148
|
-
...
|
|
151
|
+
...G("image-image", {}, y?.image),
|
|
149
152
|
src: e?.trim() || void 0,
|
|
150
153
|
srcSet: t?.trim() || void 0,
|
|
151
154
|
sizes: n,
|
|
@@ -173,19 +176,19 @@ function X({ src: e, srcSet: t, sizes: n, width: r, height: i, loading: a, decod
|
|
|
173
176
|
}
|
|
174
177
|
//#endregion
|
|
175
178
|
//#region src/components/Avatar/Avatar.tsx
|
|
176
|
-
function
|
|
179
|
+
function ie({ name: e, initials: t, decorative: n = !1, size: r = "md", shape: i = "circle", src: a, srcSet: o, sizes: s, loading: c, onLoad: l, onError: u, className: d, classNames: f, ...p }) {
|
|
177
180
|
let m = e.trim().split(/\s+/).filter(Boolean), h = [m[0], ...m.length > 1 ? [m.at(-1)] : []].map((e) => Array.from(e ?? "")[0] ?? "").join("").toLocaleUpperCase();
|
|
178
181
|
return /* @__PURE__ */ b("span", {
|
|
179
182
|
...p,
|
|
180
|
-
...
|
|
183
|
+
...G("avatar", {
|
|
181
184
|
size: r,
|
|
182
185
|
shape: i
|
|
183
186
|
}, f?.root ?? d),
|
|
184
187
|
role: "img",
|
|
185
188
|
"aria-label": n ? void 0 : p["aria-label"] ?? (e.trim() || "Unknown person"),
|
|
186
189
|
"aria-hidden": n ? !0 : p["aria-hidden"],
|
|
187
|
-
children: /* @__PURE__ */ b(
|
|
188
|
-
...
|
|
190
|
+
children: /* @__PURE__ */ b(ne, {
|
|
191
|
+
...G("avatar-media", {}, f?.media),
|
|
189
192
|
src: a,
|
|
190
193
|
srcSet: o,
|
|
191
194
|
sizes: s,
|
|
@@ -195,7 +198,7 @@ function te({ name: e, initials: t, decorative: n = !1, size: r = "md", shape: i
|
|
|
195
198
|
alt: "",
|
|
196
199
|
ratio: "square",
|
|
197
200
|
fallback: /* @__PURE__ */ b("span", {
|
|
198
|
-
...
|
|
201
|
+
...G("avatar-initials", {}, f?.initials),
|
|
199
202
|
children: t?.trim() || h || "?"
|
|
200
203
|
})
|
|
201
204
|
})
|
|
@@ -203,10 +206,10 @@ function te({ name: e, initials: t, decorative: n = !1, size: r = "md", shape: i
|
|
|
203
206
|
}
|
|
204
207
|
//#endregion
|
|
205
208
|
//#region src/components/Badge/Badge.tsx
|
|
206
|
-
function
|
|
209
|
+
function ae({ tone: e = "neutral", appearance: t = "chip", mono: n = !1, preserveCase: r = !1, className: i, ...a }) {
|
|
207
210
|
return /* @__PURE__ */ b("span", {
|
|
208
211
|
...a,
|
|
209
|
-
...
|
|
212
|
+
...G("badge", {
|
|
210
213
|
tone: e,
|
|
211
214
|
appearance: t,
|
|
212
215
|
mono: n,
|
|
@@ -215,23 +218,148 @@ function ne({ tone: e = "neutral", appearance: t = "chip", mono: n = !1, preserv
|
|
|
215
218
|
});
|
|
216
219
|
}
|
|
217
220
|
//#endregion
|
|
218
|
-
//#region src/components/
|
|
219
|
-
|
|
221
|
+
//#region src/components/Spinner/Spinner.tsx
|
|
222
|
+
var oe = [
|
|
223
|
+
5,
|
|
224
|
+
12,
|
|
225
|
+
19
|
|
226
|
+
], se = [
|
|
227
|
+
3.5,
|
|
228
|
+
8.25,
|
|
229
|
+
13,
|
|
230
|
+
17.75
|
|
231
|
+
], ce = s(function({ label: e = "Loading", showLabel: t = !1, decorative: n = !1, size: r = "md", tone: i = "accent", variant: a = "ring", appearance: o = "plain", className: s, classNames: c, ...l }, u) {
|
|
232
|
+
return /* @__PURE__ */ x("span", {
|
|
233
|
+
ref: u,
|
|
234
|
+
role: n ? void 0 : "status",
|
|
235
|
+
"aria-live": n ? void 0 : "polite",
|
|
236
|
+
"aria-hidden": n ? "true" : void 0,
|
|
237
|
+
...l,
|
|
238
|
+
...G("spinner", {
|
|
239
|
+
size: r,
|
|
240
|
+
tone: i,
|
|
241
|
+
variant: a,
|
|
242
|
+
appearance: o,
|
|
243
|
+
"show-label": t
|
|
244
|
+
}, c?.root ?? s),
|
|
245
|
+
children: [/* @__PURE__ */ x("svg", {
|
|
246
|
+
viewBox: "0 0 24 24",
|
|
247
|
+
"aria-hidden": "true",
|
|
248
|
+
focusable: "false",
|
|
249
|
+
className: v("kb-spinner-icon", c?.icon),
|
|
250
|
+
children: [
|
|
251
|
+
a === "ring" && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("circle", {
|
|
252
|
+
cx: "12",
|
|
253
|
+
cy: "12",
|
|
254
|
+
r: "9.5",
|
|
255
|
+
className: v("kb-spinner-track", c?.track)
|
|
256
|
+
}), /* @__PURE__ */ b("path", {
|
|
257
|
+
d: "M12 2.5a9.5 9.5 0 1 1 0 19a9.5 9.5 0 1 1 0 -19",
|
|
258
|
+
pathLength: 100,
|
|
259
|
+
className: v("kb-spinner-arc", c?.arc)
|
|
260
|
+
})] }),
|
|
261
|
+
a === "orbit" && /* @__PURE__ */ x(y, { children: [
|
|
262
|
+
/* @__PURE__ */ b("circle", {
|
|
263
|
+
cx: "12",
|
|
264
|
+
cy: "12",
|
|
265
|
+
r: "9.5",
|
|
266
|
+
className: v("kb-spinner-track", c?.track)
|
|
267
|
+
}),
|
|
268
|
+
/* @__PURE__ */ b("circle", {
|
|
269
|
+
cx: "12",
|
|
270
|
+
cy: "12",
|
|
271
|
+
r: "5.5",
|
|
272
|
+
className: v("kb-spinner-track", c?.track)
|
|
273
|
+
}),
|
|
274
|
+
/* @__PURE__ */ b("path", {
|
|
275
|
+
d: "M12 2.5a9.5 9.5 0 1 1 0 19a9.5 9.5 0 1 1 0 -19",
|
|
276
|
+
pathLength: 100,
|
|
277
|
+
className: v("kb-spinner-arc", c?.arc)
|
|
278
|
+
}),
|
|
279
|
+
/* @__PURE__ */ b("path", {
|
|
280
|
+
d: "M12 17.5a5.5 5.5 0 1 1 0 -11a5.5 5.5 0 1 1 0 11",
|
|
281
|
+
pathLength: 100,
|
|
282
|
+
className: v("kb-spinner-arc", c?.arc)
|
|
283
|
+
}),
|
|
284
|
+
/* @__PURE__ */ b("circle", {
|
|
285
|
+
cx: "12",
|
|
286
|
+
cy: "12",
|
|
287
|
+
r: "1.75",
|
|
288
|
+
className: v("kb-spinner-core", c?.core)
|
|
289
|
+
})
|
|
290
|
+
] }),
|
|
291
|
+
a === "dots" && oe.map((e) => /* @__PURE__ */ b("circle", {
|
|
292
|
+
cx: e,
|
|
293
|
+
cy: "12",
|
|
294
|
+
r: "2.25",
|
|
295
|
+
className: v("kb-spinner-dot", c?.dot)
|
|
296
|
+
}, e)),
|
|
297
|
+
a === "bars" && se.map((e) => /* @__PURE__ */ b("rect", {
|
|
298
|
+
x: e,
|
|
299
|
+
y: "5",
|
|
300
|
+
width: "2.5",
|
|
301
|
+
height: "14",
|
|
302
|
+
rx: "1.25",
|
|
303
|
+
className: v("kb-spinner-bar", c?.bar)
|
|
304
|
+
}, e))
|
|
305
|
+
]
|
|
306
|
+
}), !n && /* @__PURE__ */ b("span", {
|
|
307
|
+
className: v("kb-spinner-label", !t && "kb-sr-only", c?.label),
|
|
308
|
+
children: e
|
|
309
|
+
})]
|
|
310
|
+
});
|
|
311
|
+
}), le = {
|
|
312
|
+
"aria-busy": !0,
|
|
313
|
+
"aria-disabled": !0
|
|
314
|
+
};
|
|
315
|
+
function ue(e) {
|
|
316
|
+
return /* @__PURE__ */ x(y, { children: [e, /* @__PURE__ */ b(ce, {
|
|
317
|
+
className: "kb-button-spinner",
|
|
318
|
+
decorative: !0,
|
|
319
|
+
size: "sm",
|
|
320
|
+
tone: "current"
|
|
321
|
+
})] });
|
|
322
|
+
}
|
|
323
|
+
function de(e) {
|
|
324
|
+
e.preventDefault(), e.stopPropagation();
|
|
325
|
+
}
|
|
326
|
+
function fe(e, t) {
|
|
327
|
+
let r = c(e) ? e : n.toArray(e)[0];
|
|
328
|
+
return c(r) ? i(r, {
|
|
329
|
+
...le,
|
|
330
|
+
onClickCapture: de,
|
|
331
|
+
onAuxClickCapture: de,
|
|
332
|
+
children: ue(r.props.children === void 0 ? t : r.props.children)
|
|
333
|
+
}) : e;
|
|
334
|
+
}
|
|
335
|
+
function Z({ variant: e = "primary", size: t = "md", className: n, loading: r = !1, ...i }) {
|
|
336
|
+
let a = G("button", {
|
|
337
|
+
variant: e,
|
|
338
|
+
size: t,
|
|
339
|
+
loading: r
|
|
340
|
+
}, n);
|
|
341
|
+
if (!r) return /* @__PURE__ */ b(S, {
|
|
342
|
+
...i,
|
|
343
|
+
...a
|
|
344
|
+
});
|
|
345
|
+
let { children: o, disabled: s, focusableWhenDisabled: c, render: l, ...u } = i, d = typeof l == "function" ? (e, t) => fe(l(e, t), o) : l && fe(l, o);
|
|
220
346
|
return /* @__PURE__ */ b(S, {
|
|
221
|
-
...
|
|
222
|
-
...
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
347
|
+
...u,
|
|
348
|
+
...a,
|
|
349
|
+
...le,
|
|
350
|
+
disabled: !0,
|
|
351
|
+
focusableWhenDisabled: !s || c,
|
|
352
|
+
render: d,
|
|
353
|
+
children: d ? o : ue(o)
|
|
226
354
|
});
|
|
227
355
|
}
|
|
228
356
|
//#endregion
|
|
229
357
|
//#region src/components/Callout/Callout.tsx
|
|
230
|
-
function
|
|
358
|
+
function pe({ classNames: e, tone: t = "neutral", title: n, icon: r, actions: i, live: a = !1, className: o, children: s, ...c }) {
|
|
231
359
|
return /* @__PURE__ */ x("div", {
|
|
232
360
|
...c,
|
|
233
361
|
...a ? { role: "status" } : {},
|
|
234
|
-
...
|
|
362
|
+
...G("callout", { tone: t }, o),
|
|
235
363
|
children: [r == null ? null : /* @__PURE__ */ b("span", {
|
|
236
364
|
className: v("kb-callout-icon", e?.icon),
|
|
237
365
|
"aria-hidden": "true",
|
|
@@ -257,26 +385,26 @@ function re({ classNames: e, tone: t = "neutral", title: n, icon: r, actions: i,
|
|
|
257
385
|
}
|
|
258
386
|
//#endregion
|
|
259
387
|
//#region src/components/Card/Card.tsx
|
|
260
|
-
function
|
|
388
|
+
function me({ as: e, appearance: t = "outlined", className: n, ...r }) {
|
|
261
389
|
return o(e ?? "article", {
|
|
262
390
|
...r,
|
|
263
|
-
...
|
|
391
|
+
...G("card", { appearance: t }, n)
|
|
264
392
|
});
|
|
265
393
|
}
|
|
266
394
|
//#endregion
|
|
267
395
|
//#region src/components/Checkbox/Checkbox.tsx
|
|
268
|
-
function
|
|
396
|
+
function he({ classNames: e, label: t, checked: n, onCheckedChange: r, indeterminate: i = !1, visuallyHidden: a, description: o, error: s, disabled: c, readOnly: l, className: u, controlClassName: d, id: h, ref: _, style: y, "aria-invalid": S, ...C }) {
|
|
269
397
|
let w = f(), T = h ?? w, E = g(null);
|
|
270
398
|
p(_, () => E.current), m(() => {
|
|
271
399
|
E.current && (E.current.indeterminate = i);
|
|
272
400
|
});
|
|
273
|
-
let { invalid: D, ariaInvalid: O } =
|
|
401
|
+
let { invalid: D, ariaInvalid: O } = K(!!s, S), k = [
|
|
274
402
|
o ? `${T}-description` : null,
|
|
275
403
|
s ? `${T}-error` : null,
|
|
276
404
|
C["aria-describedby"]
|
|
277
405
|
].filter(Boolean).join(" ") || void 0, A = Object.fromEntries(Object.entries(y ?? {}).filter(([e]) => e.startsWith("--")));
|
|
278
406
|
return /* @__PURE__ */ x("div", {
|
|
279
|
-
...
|
|
407
|
+
...G("checkbox", {
|
|
280
408
|
disabled: c,
|
|
281
409
|
invalid: D
|
|
282
410
|
}, u),
|
|
@@ -338,7 +466,7 @@ function ae({ classNames: e, label: t, checked: n, onCheckedChange: r, indetermi
|
|
|
338
466
|
}
|
|
339
467
|
//#endregion
|
|
340
468
|
//#region src/utils/useClipboard.ts
|
|
341
|
-
function
|
|
469
|
+
function ge(e, { disabled: t = !1, feedbackDuration: n = 2e3, onCopy: r, onCopyError: i }) {
|
|
342
470
|
let [a, o] = _({
|
|
343
471
|
value: e,
|
|
344
472
|
disabled: t,
|
|
@@ -394,7 +522,7 @@ function oe(e, { disabled: t = !1, feedbackDuration: n = 2e3, onCopy: r, onCopyE
|
|
|
394
522
|
}
|
|
395
523
|
//#endregion
|
|
396
524
|
//#region src/components/Code/tokenize.ts
|
|
397
|
-
var
|
|
525
|
+
var _e = {
|
|
398
526
|
tsx: "TSX",
|
|
399
527
|
ts: "TS",
|
|
400
528
|
typescript: "TS",
|
|
@@ -411,10 +539,10 @@ var se = {
|
|
|
411
539
|
plain: void 0,
|
|
412
540
|
text: void 0
|
|
413
541
|
};
|
|
414
|
-
function
|
|
415
|
-
if (e) return e in
|
|
542
|
+
function ve(e) {
|
|
543
|
+
if (e) return e in _e ? _e[e] : String(e).toUpperCase();
|
|
416
544
|
}
|
|
417
|
-
var
|
|
545
|
+
var ye = /* @__PURE__ */ new Set(/* @__PURE__ */ "as.async.await.break.case.catch.class.const.continue.default.delete.do.else.enum.export.extends.false.finally.for.from.function.if.implements.import.in.infer.instanceof.interface.keyof.let.new.null.of.private.protected.public.readonly.return.satisfies.static.super.switch.this.throw.true.try.type.typeof.undefined.var.void.while.yield".split(".")), be = /* @__PURE__ */ new Set(/* @__PURE__ */ "Array.Boolean.CSSProperties.ComponentProps.Date.Error.Exclude.Extract.HTMLButtonElement.HTMLDivElement.HTMLElement.HTMLInputElement.Map.NonNullable.Number.Omit.Parameters.Partial.Pick.Promise.ReactElement.ReactNode.Readonly.ReadonlyArray.Record.Ref.RegExp.Required.ReturnType.Set.String.Symbol.any.bigint.boolean.never.number.object.string.symbol.unknown".split(".")), xe = /* @__PURE__ */ new Set([
|
|
418
546
|
"await",
|
|
419
547
|
"case",
|
|
420
548
|
"delete",
|
|
@@ -428,7 +556,7 @@ var le = /* @__PURE__ */ new Set(/* @__PURE__ */ "as.async.await.break.case.catc
|
|
|
428
556
|
"typeof",
|
|
429
557
|
"void",
|
|
430
558
|
"yield"
|
|
431
|
-
]),
|
|
559
|
+
]), Se = /* @__PURE__ */ new Set([
|
|
432
560
|
"as",
|
|
433
561
|
"class",
|
|
434
562
|
"enum",
|
|
@@ -437,7 +565,7 @@ var le = /* @__PURE__ */ new Set(/* @__PURE__ */ "as.async.await.break.case.catc
|
|
|
437
565
|
"interface",
|
|
438
566
|
"satisfies",
|
|
439
567
|
"type"
|
|
440
|
-
]),
|
|
568
|
+
]), Ce = /* @__PURE__ */ new Set(/* @__PURE__ */ "!important.absolute. anywhere.auto.baseline.block.bold.border-box.both.break-spaces.center.clone.column.contain.content-box.currentColor.dashed.dotted.ease.ease-in.ease-in-out.ease-out.end.fixed.flex.grid.hidden.inberg.inherit.initial.inline.inline-block.inline-flex.inset.italic.linear.max-content.min-content.none.normal.nowrap.pointer.relative.revert.row. scroll.slice.solid.space-between.start.static.sticky. stretch.tabular-nums.transparent.unset.uppercase.visible.wrap".split(".")), we = /* @__PURE__ */ new Set([
|
|
441
569
|
"case",
|
|
442
570
|
"do",
|
|
443
571
|
"done",
|
|
@@ -462,10 +590,10 @@ var le = /* @__PURE__ */ new Set(/* @__PURE__ */ "as.async.await.break.case.catc
|
|
|
462
590
|
"until",
|
|
463
591
|
"while"
|
|
464
592
|
]);
|
|
465
|
-
function
|
|
593
|
+
function Te(e) {
|
|
466
594
|
return e !== void 0 && /[A-Za-z_$]/.test(e);
|
|
467
595
|
}
|
|
468
|
-
function
|
|
596
|
+
function Ee(e) {
|
|
469
597
|
return e !== void 0 && /[\w$]/.test(e);
|
|
470
598
|
}
|
|
471
599
|
function Q(e, t, n) {
|
|
@@ -481,7 +609,7 @@ function Q(e, t, n) {
|
|
|
481
609
|
}
|
|
482
610
|
return e.length;
|
|
483
611
|
}
|
|
484
|
-
function
|
|
612
|
+
function De(e, t) {
|
|
485
613
|
let n = 1, r = t + 1;
|
|
486
614
|
for (; r < e.length && n > 0;) {
|
|
487
615
|
let t = e[r];
|
|
@@ -495,7 +623,7 @@ function _e(e, t) {
|
|
|
495
623
|
}
|
|
496
624
|
return r - 1;
|
|
497
625
|
}
|
|
498
|
-
function
|
|
626
|
+
function Oe(e, t = 0) {
|
|
499
627
|
let n = [], r = 0, i = "", a = "", o = 0, s = (e, r, i) => {
|
|
500
628
|
r > e && n.push([
|
|
501
629
|
t + e,
|
|
@@ -507,11 +635,11 @@ function ve(e, t = 0) {
|
|
|
507
635
|
let c = e.charAt(r);
|
|
508
636
|
if (o > 0) {
|
|
509
637
|
if (c === "{") {
|
|
510
|
-
let i =
|
|
511
|
-
n.push(...
|
|
638
|
+
let i = De(e, r), a = i > r ? i : e.length;
|
|
639
|
+
n.push(...Oe(e.slice(r + 1, a), t + r + 1)), r = i < e.length ? i + 1 : e.length;
|
|
512
640
|
continue;
|
|
513
641
|
}
|
|
514
|
-
if (c !== "<" || e[r + 1] !== "/" && e[r + 1] !== ">" && !
|
|
642
|
+
if (c !== "<" || e[r + 1] !== "/" && e[r + 1] !== ">" && !Te(e[r + 1])) {
|
|
515
643
|
r += 1;
|
|
516
644
|
continue;
|
|
517
645
|
}
|
|
@@ -547,8 +675,8 @@ function ve(e, t = 0) {
|
|
|
547
675
|
}
|
|
548
676
|
if (r === "$" && e[c + 1] === "{") {
|
|
549
677
|
s(o, c + 2, "string");
|
|
550
|
-
let r =
|
|
551
|
-
n.push(...
|
|
678
|
+
let r = De(e, c + 1), i = r >= c + 2 ? r : e.length, a = e.slice(c + 2, i);
|
|
679
|
+
n.push(...Oe(a, t + c + 2)), r < e.length && e[r] === "}" ? (o = r, c = r + 1) : (o = e.length, c = e.length);
|
|
552
680
|
} else c += 1;
|
|
553
681
|
}
|
|
554
682
|
}
|
|
@@ -566,7 +694,7 @@ function ve(e, t = 0) {
|
|
|
566
694
|
e[r] === ">" && (s(r, r + 1, "operator"), r += 1), o = Math.max(0, o - 1), a = ">", i = "";
|
|
567
695
|
continue;
|
|
568
696
|
}
|
|
569
|
-
if (c === "<" &&
|
|
697
|
+
if (c === "<" && Te(e[r + 1]) && (o !== 0 || !Ee(a) || xe.has(i))) {
|
|
570
698
|
s(r, r + 1, "operator"), r += 1;
|
|
571
699
|
let c = /^[A-Za-z_$][\w$.-]*/.exec(e.slice(r));
|
|
572
700
|
c && (s(r, r + c[0].length, "tag"), r += c[0].length);
|
|
@@ -590,8 +718,8 @@ function ve(e, t = 0) {
|
|
|
590
718
|
continue;
|
|
591
719
|
}
|
|
592
720
|
if (e[r] === "{") {
|
|
593
|
-
let i =
|
|
594
|
-
n.push(...
|
|
721
|
+
let i = De(e, r), a = i > r ? i : e.length;
|
|
722
|
+
n.push(...Oe(e.slice(r + 1, a), t + r + 1)), r = i < e.length ? i + 1 : e.length;
|
|
595
723
|
continue;
|
|
596
724
|
}
|
|
597
725
|
if (e[r] === "=") {
|
|
@@ -610,9 +738,9 @@ function ve(e, t = 0) {
|
|
|
610
738
|
s(r, r + t, "number"), a = e.charAt(r + t - 1), i = "", r += t;
|
|
611
739
|
continue;
|
|
612
740
|
}
|
|
613
|
-
if (
|
|
741
|
+
if (Te(c)) {
|
|
614
742
|
let t = /^[A-Za-z_$][\w$]*/.exec(e.slice(r)), n = t ? t[0] : c, o = r + n.length, l = e.slice(o), u = /^\s*(?:<[^>\n]+>\s*)?\(/.test(l), d = (a === "{" || a === ",") && /^\s*:(?!:)/.test(l);
|
|
615
|
-
a === "." ? s(r, o, u ? "function" : "property") : d ? s(r, o, "property") :
|
|
743
|
+
a === "." ? s(r, o, u ? "function" : "property") : d ? s(r, o, "property") : ye.has(n) ? s(r, o, "keyword") : be.has(n) || Se.has(i) || a === ":" && /^[A-Z]/.test(n) || a === "<" && /^[A-Z]/.test(n) ? s(r, o, "type") : u ? s(r, o, "function") : /^[A-Z]/.test(n) && s(r, o, "type"), a = n.charAt(n.length - 1), i = n, r = o;
|
|
616
744
|
continue;
|
|
617
745
|
}
|
|
618
746
|
let u = /^(?:=>|===|!==|==|!=|<=|>=|&&|\|\||\?\?|\?\.|\.\.\.|[+\-*/%=<>!&|^~?:])/.exec(e.slice(r));
|
|
@@ -623,7 +751,7 @@ function ve(e, t = 0) {
|
|
|
623
751
|
}
|
|
624
752
|
return n;
|
|
625
753
|
}
|
|
626
|
-
function
|
|
754
|
+
function ke(e) {
|
|
627
755
|
let t = [], n = 0, r = 0, i = !1, a = (e, n, r) => {
|
|
628
756
|
n > e && t.push([
|
|
629
757
|
e,
|
|
@@ -708,11 +836,11 @@ function ye(e) {
|
|
|
708
836
|
}
|
|
709
837
|
}
|
|
710
838
|
let p = /^!?[A-Za-z_-][\w-]*/.exec(e.slice(n));
|
|
711
|
-
p ? (
|
|
839
|
+
p ? (Ce.has(p[0]) && a(n, n + p[0].length, "keyword"), n += p[0].length) : n += 1;
|
|
712
840
|
}
|
|
713
841
|
return t;
|
|
714
842
|
}
|
|
715
|
-
function
|
|
843
|
+
function Ae(e) {
|
|
716
844
|
let t = [], n = 0, r = (e, n, r) => {
|
|
717
845
|
n > e && t.push([
|
|
718
846
|
e,
|
|
@@ -758,7 +886,7 @@ function be(e) {
|
|
|
758
886
|
} else n += 1;
|
|
759
887
|
return t;
|
|
760
888
|
}
|
|
761
|
-
function
|
|
889
|
+
function je(e) {
|
|
762
890
|
let t = [], n = 0;
|
|
763
891
|
for (; n < e.length;) {
|
|
764
892
|
let r = e.charAt(n);
|
|
@@ -793,7 +921,7 @@ function xe(e) {
|
|
|
793
921
|
}
|
|
794
922
|
return t;
|
|
795
923
|
}
|
|
796
|
-
function
|
|
924
|
+
function Me(e) {
|
|
797
925
|
let t = [], n = 0, r = !0;
|
|
798
926
|
for (; n < e.length;) {
|
|
799
927
|
let i = e.charAt(n);
|
|
@@ -862,7 +990,7 @@ function Se(e) {
|
|
|
862
990
|
let l = /^[A-Za-z_][\w./-]*/.exec(e.slice(n));
|
|
863
991
|
if (l) {
|
|
864
992
|
let e = l[0];
|
|
865
|
-
|
|
993
|
+
we.has(e) ? (t.push([
|
|
866
994
|
n,
|
|
867
995
|
n + e.length,
|
|
868
996
|
"keyword"
|
|
@@ -875,22 +1003,22 @@ function Se(e) {
|
|
|
875
1003
|
}
|
|
876
1004
|
return t;
|
|
877
1005
|
}
|
|
878
|
-
function
|
|
1006
|
+
function Ne(e, t = "tsx") {
|
|
879
1007
|
if (!e || t === "plain" || t === "text") return [];
|
|
880
1008
|
switch (t) {
|
|
881
|
-
case "css": return
|
|
882
|
-
case "html": return
|
|
883
|
-
case "json": return
|
|
1009
|
+
case "css": return ke(e);
|
|
1010
|
+
case "html": return Ae(e);
|
|
1011
|
+
case "json": return je(e);
|
|
884
1012
|
case "bash":
|
|
885
1013
|
case "sh":
|
|
886
1014
|
case "shell":
|
|
887
|
-
case "shellscript": return
|
|
888
|
-
default: return
|
|
1015
|
+
case "shellscript": return Me(e);
|
|
1016
|
+
default: return Oe(e);
|
|
889
1017
|
}
|
|
890
1018
|
}
|
|
891
1019
|
//#endregion
|
|
892
1020
|
//#region src/components/Code/Code.tsx
|
|
893
|
-
function
|
|
1021
|
+
function Pe(e, t, n) {
|
|
894
1022
|
if (!e || n.length === 0) return e;
|
|
895
1023
|
let r = t + e.length, i = [], a = 0;
|
|
896
1024
|
for (let [o, s, c] of n) {
|
|
@@ -904,13 +1032,13 @@ function we(e, t, n) {
|
|
|
904
1032
|
}
|
|
905
1033
|
return a === 0 ? e : (a < e.length && i.push(e.slice(a)), i);
|
|
906
1034
|
}
|
|
907
|
-
function
|
|
908
|
-
let B = f(), [V,
|
|
1035
|
+
function Fe({ ref: e, block: t, language: n, title: i, copyable: a, onCopy: o, onCopyError: s, disabled: c = !1, feedbackDuration: l, copyLabel: u = "Copy code", copyingLabel: p = "Copying…", copiedLabel: m = "Copied", copyErrorLabel: h = "Copy failed", successMessage: S = "Code copied to clipboard", errorMessage: C = "Failed to copy code. Select and copy the text manually.", lineNumbers: w = !1, startLine: T = 1, highlightLines: E, minLines: D, collapsible: O = !1, collapsedLines: k, defaultCollapsed: A = !1, collapsed: j, onCollapsedChange: M, maxHeight: N, tokens: P, classNames: F, className: I, style: L, children: R, ...z }) {
|
|
1036
|
+
let B = f(), [V, H] = _(A), U = typeof R == "string" ? R : "", W = ge(U, {
|
|
909
1037
|
disabled: c,
|
|
910
1038
|
feedbackDuration: l,
|
|
911
1039
|
onCopy: o,
|
|
912
1040
|
onCopyError: s
|
|
913
|
-
}), K =
|
|
1041
|
+
}), K = W.state, [q, J] = _(void 0), ee = g(null), Y = D !== void 0 && D > 0 ? Math.floor(D) : void 0, X = k !== void 0 && k > 0 ? Math.floor(k) : O && Y !== void 0 ? Y : void 0;
|
|
914
1042
|
d(() => {
|
|
915
1043
|
if (!O) return;
|
|
916
1044
|
let e = ee.current;
|
|
@@ -929,69 +1057,69 @@ function Te({ ref: e, block: t, language: n, title: i, copyable: a, onCopy: o, o
|
|
|
929
1057
|
ref: e,
|
|
930
1058
|
title: i,
|
|
931
1059
|
style: L,
|
|
932
|
-
...
|
|
1060
|
+
...G("code", {}, I),
|
|
933
1061
|
children: R
|
|
934
1062
|
});
|
|
935
|
-
let
|
|
1063
|
+
let re = O ? j ?? V : !1, ie = a ?? !0, ae = ve(n), oe = !!(i || ae), se = !!(O || ie), ce = oe || se, le = typeof R == "string" ? P ?? Ne(U, n ?? "tsx") : [], ue = typeof R == "string" ? U.split("\n") : [], de = E && E.length > 0 ? new Set(E) : void 0, fe = typeof R == "string" && Y !== void 0 && Y > ue.length ? Y - ue.length : 0, Z = N !== void 0 || Y !== void 0 || X !== void 0 || O && q !== void 0 ? {
|
|
936
1064
|
...L,
|
|
937
1065
|
...N === void 0 ? null : { "--_code-max-height": typeof N == "number" ? `${N}px` : N },
|
|
938
1066
|
...Y === void 0 ? null : { "--_code-min-lines": String(Y) },
|
|
939
1067
|
...X === void 0 ? null : { "--_code-collapsed-lines": String(X) },
|
|
940
1068
|
...O && q !== void 0 ? { "--_code-expanded-max-height": `${q}px` } : null
|
|
941
|
-
} : L,
|
|
942
|
-
let e = !
|
|
943
|
-
j === void 0 &&
|
|
944
|
-
},
|
|
1069
|
+
} : L, pe = () => {
|
|
1070
|
+
let e = !re;
|
|
1071
|
+
j === void 0 && H(e), M?.(e);
|
|
1072
|
+
}, me = {
|
|
945
1073
|
idle: u,
|
|
946
1074
|
pending: p,
|
|
947
1075
|
copied: m,
|
|
948
1076
|
failed: h
|
|
949
|
-
}[K],
|
|
1077
|
+
}[K], he = K === "copied" ? S : K === "failed" ? C : K === "pending" ? p : "", _e = 0;
|
|
950
1078
|
return /* @__PURE__ */ x("div", {
|
|
951
1079
|
...z,
|
|
952
1080
|
ref: e,
|
|
953
|
-
style:
|
|
954
|
-
...
|
|
1081
|
+
style: Z,
|
|
1082
|
+
...G("code", {
|
|
955
1083
|
block: !0,
|
|
956
1084
|
"line-numbers": w || void 0,
|
|
957
1085
|
"min-lines": Y !== void 0 || void 0,
|
|
958
1086
|
collapsible: O || void 0,
|
|
959
|
-
collapsed:
|
|
1087
|
+
collapsed: re || void 0,
|
|
960
1088
|
"collapsed-lines": X !== void 0 || void 0,
|
|
961
1089
|
language: n || void 0
|
|
962
1090
|
}, I),
|
|
963
1091
|
children: [
|
|
964
|
-
|
|
1092
|
+
ce ? /* @__PURE__ */ x("div", {
|
|
965
1093
|
className: v("kb-code-header", F?.header),
|
|
966
|
-
children: [
|
|
1094
|
+
children: [oe ? /* @__PURE__ */ x("div", {
|
|
967
1095
|
className: v("kb-code-meta", F?.meta),
|
|
968
1096
|
children: [i ? /* @__PURE__ */ b("span", {
|
|
969
1097
|
className: v("kb-code-title", F?.title),
|
|
970
1098
|
children: i
|
|
971
|
-
}) : null,
|
|
1099
|
+
}) : null, ae ? /* @__PURE__ */ b("span", {
|
|
972
1100
|
className: v("kb-code-language", F?.language),
|
|
973
|
-
children:
|
|
1101
|
+
children: ae
|
|
974
1102
|
}) : null]
|
|
975
1103
|
}) : null, se ? /* @__PURE__ */ x("div", {
|
|
976
1104
|
className: v("kb-code-actions", F?.actions),
|
|
977
1105
|
children: [O ? /* @__PURE__ */ x("button", {
|
|
978
1106
|
type: "button",
|
|
979
1107
|
className: v("kb-code-toggle", F?.toggle),
|
|
980
|
-
"aria-expanded": !
|
|
1108
|
+
"aria-expanded": !re,
|
|
981
1109
|
"aria-controls": B,
|
|
982
|
-
onClick:
|
|
1110
|
+
onClick: pe,
|
|
983
1111
|
children: [/* @__PURE__ */ b("svg", {
|
|
984
1112
|
"aria-hidden": "true",
|
|
985
1113
|
viewBox: "0 0 16 16",
|
|
986
1114
|
children: /* @__PURE__ */ b("path", { d: "M4.5 6.25 8 9.75l3.5-3.5" })
|
|
987
|
-
}),
|
|
988
|
-
}) : null,
|
|
1115
|
+
}), re ? "Expand code" : "Collapse code"]
|
|
1116
|
+
}) : null, ie ? /* @__PURE__ */ x("button", {
|
|
989
1117
|
type: "button",
|
|
990
1118
|
className: v("kb-code-copy", F?.copy),
|
|
991
1119
|
"data-copy-state": K,
|
|
992
|
-
disabled:
|
|
1120
|
+
disabled: W.disabled,
|
|
993
1121
|
"aria-disabled": K === "pending" || void 0,
|
|
994
|
-
onClick: () => void
|
|
1122
|
+
onClick: () => void W.copy(),
|
|
995
1123
|
children: [K === "copied" ? /* @__PURE__ */ b("svg", {
|
|
996
1124
|
"aria-hidden": "true",
|
|
997
1125
|
viewBox: "0 0 16 16",
|
|
@@ -1010,16 +1138,16 @@ function Te({ ref: e, block: t, language: n, title: i, copyable: a, onCopy: o, o
|
|
|
1010
1138
|
height: "7.5",
|
|
1011
1139
|
rx: "1.5"
|
|
1012
1140
|
}), /* @__PURE__ */ b("path", { d: "M10.5 5.5V4a1.5 1.5 0 0 0-1.5-1.5H4A1.5 1.5 0 0 0 2.5 4v5A1.5 1.5 0 0 0 4 10.5h1.5" })]
|
|
1013
|
-
}),
|
|
1141
|
+
}), me]
|
|
1014
1142
|
}) : null]
|
|
1015
1143
|
}) : null]
|
|
1016
1144
|
}) : null,
|
|
1017
|
-
|
|
1145
|
+
ie ? /* @__PURE__ */ b("span", {
|
|
1018
1146
|
role: "status",
|
|
1019
1147
|
"aria-live": "polite",
|
|
1020
1148
|
"aria-atomic": "true",
|
|
1021
1149
|
className: v("kb-code-feedback", K !== "failed" && "kb-sr-only", F?.feedback),
|
|
1022
|
-
children:
|
|
1150
|
+
children: he
|
|
1023
1151
|
}) : null,
|
|
1024
1152
|
/* @__PURE__ */ b("section", {
|
|
1025
1153
|
id: B,
|
|
@@ -1031,10 +1159,10 @@ function Te({ ref: e, block: t, language: n, title: i, copyable: a, onCopy: o, o
|
|
|
1031
1159
|
className: v("kb-code-pre", F?.pre),
|
|
1032
1160
|
children: /* @__PURE__ */ b("code", {
|
|
1033
1161
|
className: v("kb-code-content", F?.content),
|
|
1034
|
-
children: typeof R == "string" ? /* @__PURE__ */ x(y, { children: [
|
|
1162
|
+
children: typeof R == "string" ? /* @__PURE__ */ x(y, { children: [ue.map((e, t) => {
|
|
1035
1163
|
let n = _e;
|
|
1036
1164
|
_e += e.length + 1;
|
|
1037
|
-
let i = T + t, a =
|
|
1165
|
+
let i = T + t, a = de?.has(i) ?? !1;
|
|
1038
1166
|
return /* @__PURE__ */ x(r, { children: [t > 0 ? "\n" : null, /* @__PURE__ */ x("span", {
|
|
1039
1167
|
className: v("kb-code-line", F?.line),
|
|
1040
1168
|
"data-highlighted": a ? "" : void 0,
|
|
@@ -1044,11 +1172,11 @@ function Te({ ref: e, block: t, language: n, title: i, copyable: a, onCopy: o, o
|
|
|
1044
1172
|
"aria-hidden": "true"
|
|
1045
1173
|
}) : null, /* @__PURE__ */ b("span", {
|
|
1046
1174
|
className: v("kb-code-line-text", F?.lineText),
|
|
1047
|
-
children:
|
|
1175
|
+
children: Pe(e, n, le)
|
|
1048
1176
|
})]
|
|
1049
1177
|
})] }, i);
|
|
1050
|
-
}),
|
|
1051
|
-
let n = T +
|
|
1178
|
+
}), fe > 0 ? Array.from({ length: fe }, (e, t) => {
|
|
1179
|
+
let n = T + ue.length + t, r = de?.has(n) ?? !1;
|
|
1052
1180
|
return /* @__PURE__ */ x("span", {
|
|
1053
1181
|
className: v("kb-code-line", F?.line),
|
|
1054
1182
|
"data-highlighted": r ? "" : void 0,
|
|
@@ -1068,8 +1196,8 @@ function Te({ ref: e, block: t, language: n, title: i, copyable: a, onCopy: o, o
|
|
|
1068
1196
|
}
|
|
1069
1197
|
//#endregion
|
|
1070
1198
|
//#region src/components/CodeBlock/CodeBlock.tsx
|
|
1071
|
-
function
|
|
1072
|
-
return /* @__PURE__ */ b(
|
|
1199
|
+
function Ie({ className: e, ...t }) {
|
|
1200
|
+
return /* @__PURE__ */ b(Fe, {
|
|
1073
1201
|
...t,
|
|
1074
1202
|
block: !0,
|
|
1075
1203
|
className: v("kb-codeblock", e)
|
|
@@ -1077,10 +1205,10 @@ function Ee({ className: e, ...t }) {
|
|
|
1077
1205
|
}
|
|
1078
1206
|
//#endregion
|
|
1079
1207
|
//#region src/components/Input/Input.tsx
|
|
1080
|
-
function
|
|
1081
|
-
let { invalid: f, ariaInvalid: p } =
|
|
1208
|
+
function Le({ classNames: e, label: t, visuallyHidden: n, description: r, error: i, size: a = "md", disabled: o, className: s, startContent: c, endContent: l, "aria-invalid": u, ...d }) {
|
|
1209
|
+
let { invalid: f, ariaInvalid: p } = K(!!i, u);
|
|
1082
1210
|
return /* @__PURE__ */ x(C.Root, {
|
|
1083
|
-
...
|
|
1211
|
+
...G("input", {
|
|
1084
1212
|
size: a,
|
|
1085
1213
|
invalid: f,
|
|
1086
1214
|
"start-adornment": !!c,
|
|
@@ -1126,10 +1254,10 @@ function De({ classNames: e, label: t, visuallyHidden: n, description: r, error:
|
|
|
1126
1254
|
}
|
|
1127
1255
|
//#endregion
|
|
1128
1256
|
//#region src/components/Select/Select.tsx
|
|
1129
|
-
function
|
|
1257
|
+
function Re({ classNames: e, label: t, value: n, onValueChange: r, options: i, placeholder: a = "Choose an option", description: o, error: s, disabled: c = !1, readOnly: l = !1, name: u, className: d, controlClassName: m, popupClassName: h, container: y, ref: S, "aria-describedby": C, "aria-invalid": w, ...E }) {
|
|
1130
1258
|
let D = f(), O = g(null), k = g(null), A = g(null), j = g("keyboard"), [M, N] = _(!1);
|
|
1131
1259
|
p(S, () => O.current);
|
|
1132
|
-
let { invalid: P, ariaInvalid: F } =
|
|
1260
|
+
let { invalid: P, ariaInvalid: F } = K(!!s, w), I = i.length === 0, L = c || I, R = [o, I && "No options available"].filter(Boolean).join(" ") || void 0, z = [
|
|
1133
1261
|
R ? `${D}-description` : null,
|
|
1134
1262
|
s ? `${D}-error` : null,
|
|
1135
1263
|
C
|
|
@@ -1137,7 +1265,7 @@ function Oe({ classNames: e, label: t, value: n, onValueChange: r, options: i, p
|
|
|
1137
1265
|
return /* @__PURE__ */ x("div", {
|
|
1138
1266
|
...E,
|
|
1139
1267
|
ref: O,
|
|
1140
|
-
...
|
|
1268
|
+
...G("select", {
|
|
1141
1269
|
disabled: L,
|
|
1142
1270
|
invalid: P
|
|
1143
1271
|
}, d),
|
|
@@ -1249,15 +1377,15 @@ function Oe({ classNames: e, label: t, value: n, onValueChange: r, options: i, p
|
|
|
1249
1377
|
}
|
|
1250
1378
|
//#endregion
|
|
1251
1379
|
//#region src/components/Collection/useCollection.ts
|
|
1252
|
-
function
|
|
1380
|
+
function ze(e, t) {
|
|
1253
1381
|
if (!Number.isSafeInteger(e) || e < 1) throw RangeError(`${t} must be a positive safe integer`);
|
|
1254
1382
|
return e;
|
|
1255
1383
|
}
|
|
1256
|
-
function
|
|
1257
|
-
if (
|
|
1384
|
+
function Be(e, t) {
|
|
1385
|
+
if (ze(t, "pageSize"), !Number.isSafeInteger(e) || e < 0) throw RangeError("totalItems must be a non-negative safe integer");
|
|
1258
1386
|
return Math.max(1, Math.ceil(e / t));
|
|
1259
1387
|
}
|
|
1260
|
-
function
|
|
1388
|
+
function Ve(e) {
|
|
1261
1389
|
let { items: t, getKey: n, isItemDisabled: r, matches: i, compare: a } = e, [o, s] = _(() => ({
|
|
1262
1390
|
query: "",
|
|
1263
1391
|
filters: {},
|
|
@@ -1267,7 +1395,7 @@ function je(e) {
|
|
|
1267
1395
|
selectedKeys: [],
|
|
1268
1396
|
...e.defaultState
|
|
1269
1397
|
})), c = (o) => {
|
|
1270
|
-
|
|
1398
|
+
ze(o.page, "page"), ze(o.pageSize, "pageSize");
|
|
1271
1399
|
let s = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Set();
|
|
1272
1400
|
for (let e of t) {
|
|
1273
1401
|
let t = n(e);
|
|
@@ -1279,7 +1407,7 @@ function je(e) {
|
|
|
1279
1407
|
let e = o.sort;
|
|
1280
1408
|
l = [...l].sort((t, n) => a(t, n, e) * (e.direction === "ascending" ? 1 : -1));
|
|
1281
1409
|
}
|
|
1282
|
-
let u = e.mode === "server" ? e.totalItems : l.length, d =
|
|
1410
|
+
let u = e.mode === "server" ? e.totalItems : l.length, d = Be(u, o.pageSize), f = {
|
|
1283
1411
|
...o,
|
|
1284
1412
|
page: Math.min(o.page, d),
|
|
1285
1413
|
selectedKeys: [...new Set(o.selectedKeys)].filter((t) => !c.has(t) && (e.mode === "server" || s.has(t)))
|
|
@@ -1364,16 +1492,16 @@ function je(e) {
|
|
|
1364
1492
|
}
|
|
1365
1493
|
//#endregion
|
|
1366
1494
|
//#region src/components/Collection/Collection.tsx
|
|
1367
|
-
function
|
|
1495
|
+
function He({ page: e, pageSize: t, totalItems: n, onPageChange: r, onPageSizeChange: i, pageSizes: a = [
|
|
1368
1496
|
10,
|
|
1369
1497
|
25,
|
|
1370
1498
|
50
|
|
1371
1499
|
], disabled: o, className: s, ...c }) {
|
|
1372
|
-
let l =
|
|
1373
|
-
for (let e of d)
|
|
1500
|
+
let l = Be(n, t), u = Math.min(ze(e, "page"), l), d = [.../* @__PURE__ */ new Set([t, ...a])].sort((e, t) => e - t);
|
|
1501
|
+
for (let e of d) ze(e, "pageSizes");
|
|
1374
1502
|
return /* @__PURE__ */ x("nav", {
|
|
1375
1503
|
...c,
|
|
1376
|
-
...
|
|
1504
|
+
...G("collection-pagination", {}, s),
|
|
1377
1505
|
"aria-label": c["aria-label"] ?? "Collection pagination",
|
|
1378
1506
|
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x("span", { children: [
|
|
1379
1507
|
n ? (u - 1) * t + 1 : 0,
|
|
@@ -1382,7 +1510,7 @@ function Me({ page: e, pageSize: t, totalItems: n, onPageChange: r, onPageSizeCh
|
|
|
1382
1510
|
" ",
|
|
1383
1511
|
"of ",
|
|
1384
1512
|
n
|
|
1385
|
-
] }), i && /* @__PURE__ */ b(
|
|
1513
|
+
] }), i && /* @__PURE__ */ b(Re, {
|
|
1386
1514
|
label: "Rows per page",
|
|
1387
1515
|
disabled: !!o,
|
|
1388
1516
|
value: String(t),
|
|
@@ -1425,7 +1553,7 @@ function Me({ page: e, pageSize: t, totalItems: n, onPageChange: r, onPageSizeCh
|
|
|
1425
1553
|
] })]
|
|
1426
1554
|
});
|
|
1427
1555
|
}
|
|
1428
|
-
function
|
|
1556
|
+
function Ue({ selectedKeys: e, actions: t, onClear: n, onSuccess: r, onPendingChange: i, disabled: a, className: o, ...s }) {
|
|
1429
1557
|
let [c, l] = _(null), [u, f] = _(!1);
|
|
1430
1558
|
d(() => {
|
|
1431
1559
|
u && e.length === 0 && f(!1);
|
|
@@ -1449,7 +1577,7 @@ function Ne({ selectedKeys: e, actions: t, onClear: n, onSuccess: r, onPendingCh
|
|
|
1449
1577
|
};
|
|
1450
1578
|
return /* @__PURE__ */ x("fieldset", {
|
|
1451
1579
|
...s,
|
|
1452
|
-
...
|
|
1580
|
+
...G("collection-bulk", { pending: c !== null }, o),
|
|
1453
1581
|
"aria-label": s["aria-label"] ?? "Selection actions",
|
|
1454
1582
|
children: [
|
|
1455
1583
|
/* @__PURE__ */ x("span", {
|
|
@@ -1485,8 +1613,8 @@ function Ne({ selectedKeys: e, actions: t, onClear: n, onSuccess: r, onPendingCh
|
|
|
1485
1613
|
]
|
|
1486
1614
|
});
|
|
1487
1615
|
}
|
|
1488
|
-
function
|
|
1489
|
-
let [O, k] = _(!1), A = o || !!s || O, j =
|
|
1616
|
+
function We({ label: e, getItemLabel: t, columns: n, filters: r = [], bulkActions: i = [], selectable: a = !0, loading: o = !1, error: s, empty: c = "No matching records", toolbar: l, classNames: u, className: d, items: p, getKey: m, isItemDisabled: h, matches: g, compare: y, mode: S, totalItems: C, state: w, defaultState: T, onStateChange: E, ...D }) {
|
|
1617
|
+
let [O, k] = _(!1), A = o || !!s || O, j = Ve({
|
|
1490
1618
|
items: p,
|
|
1491
1619
|
getKey: m,
|
|
1492
1620
|
isItemDisabled: h,
|
|
@@ -1502,7 +1630,7 @@ function Pe({ label: e, getItemLabel: t, columns: n, filters: r = [], bulkAction
|
|
|
1502
1630
|
}), M = f(), N = (e) => v(`kb-collection-${e}`, u?.[e]), { state: P } = j, F = new Set(P.selectedKeys);
|
|
1503
1631
|
return /* @__PURE__ */ x("section", {
|
|
1504
1632
|
...D,
|
|
1505
|
-
...
|
|
1633
|
+
...G("collection", {
|
|
1506
1634
|
loading: o,
|
|
1507
1635
|
pending: O
|
|
1508
1636
|
}, d),
|
|
@@ -1512,7 +1640,7 @@ function Pe({ label: e, getItemLabel: t, columns: n, filters: r = [], bulkAction
|
|
|
1512
1640
|
/* @__PURE__ */ x("div", {
|
|
1513
1641
|
className: N("toolbar"),
|
|
1514
1642
|
children: [
|
|
1515
|
-
(g || S === "server") && /* @__PURE__ */ b(
|
|
1643
|
+
(g || S === "server") && /* @__PURE__ */ b(Le, {
|
|
1516
1644
|
type: "search",
|
|
1517
1645
|
label: `Search ${e}`,
|
|
1518
1646
|
value: P.query,
|
|
@@ -1521,7 +1649,7 @@ function Pe({ label: e, getItemLabel: t, columns: n, filters: r = [], bulkAction
|
|
|
1521
1649
|
}),
|
|
1522
1650
|
/* @__PURE__ */ b("div", {
|
|
1523
1651
|
className: N("filters"),
|
|
1524
|
-
children: r.map((e) => /* @__PURE__ */ b(
|
|
1652
|
+
children: r.map((e) => /* @__PURE__ */ b(Re, {
|
|
1525
1653
|
label: e.label,
|
|
1526
1654
|
disabled: A,
|
|
1527
1655
|
value: P.filters[e.key] ? `option:${P.filters[e.key]}` : "all",
|
|
@@ -1538,7 +1666,7 @@ function Pe({ label: e, getItemLabel: t, columns: n, filters: r = [], bulkAction
|
|
|
1538
1666
|
l
|
|
1539
1667
|
]
|
|
1540
1668
|
}),
|
|
1541
|
-
a && /* @__PURE__ */ b(
|
|
1669
|
+
a && /* @__PURE__ */ b(Ue, {
|
|
1542
1670
|
className: u?.bulk,
|
|
1543
1671
|
selectedKeys: P.selectedKeys,
|
|
1544
1672
|
actions: i,
|
|
@@ -1570,7 +1698,7 @@ function Pe({ label: e, getItemLabel: t, columns: n, filters: r = [], bulkAction
|
|
|
1570
1698
|
/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ x("tr", { children: [a && /* @__PURE__ */ b("th", {
|
|
1571
1699
|
className: N("head"),
|
|
1572
1700
|
scope: "col",
|
|
1573
|
-
children: /* @__PURE__ */ b(
|
|
1701
|
+
children: /* @__PURE__ */ b(he, {
|
|
1574
1702
|
label: "Select this page",
|
|
1575
1703
|
visuallyHidden: !0,
|
|
1576
1704
|
checked: j.pageSelection === "all",
|
|
@@ -1612,7 +1740,7 @@ function Pe({ label: e, getItemLabel: t, columns: n, filters: r = [], bulkAction
|
|
|
1612
1740
|
"data-selected": i || void 0,
|
|
1613
1741
|
children: [a && /* @__PURE__ */ b("td", {
|
|
1614
1742
|
className: N("cell"),
|
|
1615
|
-
children: /* @__PURE__ */ b(
|
|
1743
|
+
children: /* @__PURE__ */ b(he, {
|
|
1616
1744
|
label: `Select ${t(e)}`,
|
|
1617
1745
|
visuallyHidden: !0,
|
|
1618
1746
|
checked: i,
|
|
@@ -1632,7 +1760,7 @@ function Pe({ label: e, getItemLabel: t, columns: n, filters: r = [], bulkAction
|
|
|
1632
1760
|
]
|
|
1633
1761
|
})
|
|
1634
1762
|
}),
|
|
1635
|
-
/* @__PURE__ */ b(
|
|
1763
|
+
/* @__PURE__ */ b(He, {
|
|
1636
1764
|
id: `${M}-pagination`,
|
|
1637
1765
|
className: u?.pagination,
|
|
1638
1766
|
"aria-label": `${e} pagination`,
|
|
@@ -1646,17 +1774,17 @@ function Pe({ label: e, getItemLabel: t, columns: n, filters: r = [], bulkAction
|
|
|
1646
1774
|
]
|
|
1647
1775
|
});
|
|
1648
1776
|
}
|
|
1649
|
-
var
|
|
1650
|
-
Pagination:
|
|
1651
|
-
BulkActions:
|
|
1777
|
+
var Ge = Object.assign(We, {
|
|
1778
|
+
Pagination: He,
|
|
1779
|
+
BulkActions: Ue
|
|
1652
1780
|
});
|
|
1653
1781
|
//#endregion
|
|
1654
1782
|
//#region src/components/CollectionList/CollectionList.tsx
|
|
1655
|
-
function
|
|
1783
|
+
function Ke({ as: e, density: t = "comfortable", dividers: n = !0, className: r, ...i }) {
|
|
1656
1784
|
return o(e ?? "ul", {
|
|
1657
1785
|
...i,
|
|
1658
1786
|
role: i.role ?? "list",
|
|
1659
|
-
...
|
|
1787
|
+
...G("collectionlist", {
|
|
1660
1788
|
density: t,
|
|
1661
1789
|
dividers: n,
|
|
1662
1790
|
ordered: e === "ol"
|
|
@@ -1668,11 +1796,11 @@ function Ie({ as: e, density: t = "comfortable", dividers: n = !0, className: r,
|
|
|
1668
1796
|
function $(e) {
|
|
1669
1797
|
return e != null && typeof e != "boolean" && e !== "";
|
|
1670
1798
|
}
|
|
1671
|
-
function
|
|
1799
|
+
function qe({ title: e, description: t, leading: n, metadata: r, actions: i, selected: a = !1, classNames: o, className: s, ...c }) {
|
|
1672
1800
|
let l = $(r) || $(i);
|
|
1673
1801
|
return /* @__PURE__ */ b("li", {
|
|
1674
1802
|
...c,
|
|
1675
|
-
...
|
|
1803
|
+
...G("collectionrow", {
|
|
1676
1804
|
selected: a,
|
|
1677
1805
|
leading: $(n),
|
|
1678
1806
|
aside: l
|
|
@@ -1710,13 +1838,13 @@ function Le({ title: e, description: t, leading: n, metadata: r, actions: i, sel
|
|
|
1710
1838
|
}
|
|
1711
1839
|
//#endregion
|
|
1712
1840
|
//#region src/components/MultiSelect/MultiSelect.tsx
|
|
1713
|
-
var
|
|
1841
|
+
var Je = (e) => `Remove ${e.label}`, Ye = {
|
|
1714
1842
|
"aria-readonly": void 0,
|
|
1715
1843
|
"aria-disabled": void 0
|
|
1716
|
-
},
|
|
1717
|
-
let L = f(), R = g(null), z = M ?? `${L}-input`, B = `${L}-label`, V = `${L}-desc`,
|
|
1844
|
+
}, Xe = s(function({ label: e, options: t, value: n, onValueChange: r, placeholder: i, emptyMessage: a = "No matching options", size: o = "md", description: s, error: c, invalid: l, disabled: u = !1, readOnly: d = !1, required: p = !1, name: m, open: _, defaultOpen: y, onOpenChange: S, inputValue: C, onInputValueChange: w, removeLabel: T = Je, clearLabel: D, toggleLabel: O, container: k, className: A, classNames: j, id: M, "aria-describedby": N, "aria-invalid": P, ...F }, I) {
|
|
1845
|
+
let L = f(), R = g(null), z = M ?? `${L}-input`, B = `${L}-label`, V = `${L}-desc`, H = `${L}-err`, U = !!c, { invalid: W, ariaInvalid: q } = K(!!l || U, P), J = !!s, ee = [
|
|
1718
1846
|
J ? V : null,
|
|
1719
|
-
|
|
1847
|
+
U ? H : null,
|
|
1720
1848
|
N
|
|
1721
1849
|
].filter(Boolean).join(" ") || void 0, Y = h(() => E.createItems(t, {
|
|
1722
1850
|
getValue: (e) => e.value,
|
|
@@ -1745,9 +1873,9 @@ var Re = (e) => `Remove ${e.label}`, ze = {
|
|
|
1745
1873
|
children: /* @__PURE__ */ x("div", {
|
|
1746
1874
|
...F,
|
|
1747
1875
|
ref: R,
|
|
1748
|
-
...
|
|
1876
|
+
...G("multiselect", {
|
|
1749
1877
|
size: o,
|
|
1750
|
-
invalid:
|
|
1878
|
+
invalid: W,
|
|
1751
1879
|
disabled: u,
|
|
1752
1880
|
readonly: d,
|
|
1753
1881
|
required: p
|
|
@@ -1766,7 +1894,7 @@ var Re = (e) => `Remove ${e.label}`, ze = {
|
|
|
1766
1894
|
"aria-label": `${e} selections`,
|
|
1767
1895
|
className: v("kb-multiselect-chips", j?.chips),
|
|
1768
1896
|
children: [ne.map((e) => /* @__PURE__ */ x(E.Chip, {
|
|
1769
|
-
...
|
|
1897
|
+
...Ye,
|
|
1770
1898
|
className: v("kb-multiselect-chip", j?.chip),
|
|
1771
1899
|
children: [/* @__PURE__ */ b("span", {
|
|
1772
1900
|
className: v("kb-multiselect-chip-label", j?.chipLabel),
|
|
@@ -1845,30 +1973,30 @@ var Re = (e) => `Remove ${e.label}`, ze = {
|
|
|
1845
1973
|
className: v("kb-multiselect-description", j?.description),
|
|
1846
1974
|
children: s
|
|
1847
1975
|
}),
|
|
1848
|
-
|
|
1849
|
-
id:
|
|
1976
|
+
U && /* @__PURE__ */ b("p", {
|
|
1977
|
+
id: H,
|
|
1850
1978
|
className: v("kb-multiselect-error", j?.error),
|
|
1851
1979
|
children: c
|
|
1852
1980
|
})
|
|
1853
1981
|
]
|
|
1854
1982
|
})
|
|
1855
1983
|
});
|
|
1856
|
-
}),
|
|
1984
|
+
}), Ze = s(function(e, t) {
|
|
1857
1985
|
if (e.multiple) {
|
|
1858
1986
|
let { multiple: n, ...r } = e;
|
|
1859
|
-
return /* @__PURE__ */ b(
|
|
1987
|
+
return /* @__PURE__ */ b(Xe, {
|
|
1860
1988
|
...r,
|
|
1861
1989
|
ref: t
|
|
1862
1990
|
});
|
|
1863
1991
|
}
|
|
1864
|
-
return /* @__PURE__ */ b(
|
|
1992
|
+
return /* @__PURE__ */ b(Qe, {
|
|
1865
1993
|
...e,
|
|
1866
1994
|
ref: t
|
|
1867
1995
|
});
|
|
1868
|
-
}),
|
|
1869
|
-
let L = f(), R = g(null), z = j ?? `${L}-input`, B = `${L}-label`, V = `${L}-desc`,
|
|
1996
|
+
}), Qe = s(function({ label: e, options: t, value: n, onValueChange: r, placeholder: i, emptyMessage: a = "No matching options", size: o = "md", description: s, error: c, invalid: l, disabled: u = !1, readOnly: d = !1, required: p = !1, name: m, open: _, defaultOpen: y, onOpenChange: S, inputValue: C, onInputValueChange: w, clearLabel: T, toggleLabel: D, container: O, className: k, classNames: A, id: j, multiple: M, "aria-describedby": N, "aria-invalid": P, ...F }, I) {
|
|
1997
|
+
let L = f(), R = g(null), z = j ?? `${L}-input`, B = `${L}-label`, V = `${L}-desc`, H = `${L}-err`, U = !!c, { invalid: W, ariaInvalid: q } = K(!!l || U, P), J = !!s, ee = [
|
|
1870
1998
|
J ? V : null,
|
|
1871
|
-
|
|
1999
|
+
U ? H : null,
|
|
1872
2000
|
N
|
|
1873
2001
|
].filter(Boolean).join(" ") || void 0, Y = h(() => E.createItems(t, {
|
|
1874
2002
|
getValue: (e) => e.value,
|
|
@@ -1896,9 +2024,9 @@ var Re = (e) => `Remove ${e.label}`, ze = {
|
|
|
1896
2024
|
children: /* @__PURE__ */ x("div", {
|
|
1897
2025
|
...F,
|
|
1898
2026
|
ref: R,
|
|
1899
|
-
...
|
|
2027
|
+
...G("combobox", {
|
|
1900
2028
|
size: o,
|
|
1901
|
-
invalid:
|
|
2029
|
+
invalid: W,
|
|
1902
2030
|
disabled: u,
|
|
1903
2031
|
readonly: d,
|
|
1904
2032
|
required: p
|
|
@@ -1977,8 +2105,8 @@ var Re = (e) => `Remove ${e.label}`, ze = {
|
|
|
1977
2105
|
className: v("kb-combobox-description", A?.description),
|
|
1978
2106
|
children: s
|
|
1979
2107
|
}),
|
|
1980
|
-
|
|
1981
|
-
id:
|
|
2108
|
+
U && /* @__PURE__ */ b("p", {
|
|
2109
|
+
id: H,
|
|
1982
2110
|
className: v("kb-combobox-error", A?.error),
|
|
1983
2111
|
children: c
|
|
1984
2112
|
})
|
|
@@ -1988,75 +2116,75 @@ var Re = (e) => `Remove ${e.label}`, ze = {
|
|
|
1988
2116
|
});
|
|
1989
2117
|
//#endregion
|
|
1990
2118
|
//#region src/components/Dialog/Dialog.tsx
|
|
1991
|
-
function
|
|
2119
|
+
function $e(e) {
|
|
1992
2120
|
return /* @__PURE__ */ b(D.Root, { ...e });
|
|
1993
2121
|
}
|
|
1994
|
-
function
|
|
2122
|
+
function et(e) {
|
|
1995
2123
|
return /* @__PURE__ */ b(D.Trigger, { ...e });
|
|
1996
2124
|
}
|
|
1997
|
-
function
|
|
2125
|
+
function tt(e) {
|
|
1998
2126
|
return /* @__PURE__ */ b(D.Close, { ...e });
|
|
1999
2127
|
}
|
|
2000
|
-
function
|
|
2128
|
+
function nt({ className: e, ...t }) {
|
|
2001
2129
|
return /* @__PURE__ */ b(D.Title, {
|
|
2002
2130
|
...t,
|
|
2003
2131
|
className: v("kb-dialog-title", e)
|
|
2004
2132
|
});
|
|
2005
2133
|
}
|
|
2006
|
-
function
|
|
2134
|
+
function rt({ className: e, ...t }) {
|
|
2007
2135
|
return /* @__PURE__ */ b(D.Description, {
|
|
2008
2136
|
...t,
|
|
2009
2137
|
className: v("kb-dialog-description", e)
|
|
2010
2138
|
});
|
|
2011
2139
|
}
|
|
2012
|
-
function
|
|
2140
|
+
function it({ className: e, ...t }) {
|
|
2013
2141
|
return /* @__PURE__ */ b("div", {
|
|
2014
2142
|
...t,
|
|
2015
2143
|
className: v("kb-dialog-actions", e)
|
|
2016
2144
|
});
|
|
2017
2145
|
}
|
|
2018
|
-
function
|
|
2146
|
+
function at({ className: e, ...t }) {
|
|
2019
2147
|
return /* @__PURE__ */ b("div", {
|
|
2020
2148
|
...t,
|
|
2021
2149
|
className: v("kb-dialog-header", e)
|
|
2022
2150
|
});
|
|
2023
2151
|
}
|
|
2024
|
-
function
|
|
2152
|
+
function ot({ className: e, ...t }) {
|
|
2025
2153
|
return /* @__PURE__ */ b("div", {
|
|
2026
2154
|
...t,
|
|
2027
2155
|
className: v("kb-dialog-body", e)
|
|
2028
2156
|
});
|
|
2029
2157
|
}
|
|
2030
|
-
function
|
|
2158
|
+
function st({ className: e, ...t }) {
|
|
2031
2159
|
return /* @__PURE__ */ b("div", {
|
|
2032
2160
|
...t,
|
|
2033
2161
|
className: v("kb-dialog-footer", e)
|
|
2034
2162
|
});
|
|
2035
2163
|
}
|
|
2036
|
-
function
|
|
2037
|
-
let c = n != null && n !== "", l = r != null && r !== "", u = /* @__PURE__ */ x(y, { children: [c ? /* @__PURE__ */ b(
|
|
2164
|
+
function ct({ layout: e = "center", classNames: t, title: n, description: r, container: i, children: a, className: o, ...s }) {
|
|
2165
|
+
let c = n != null && n !== "", l = r != null && r !== "", u = /* @__PURE__ */ x(y, { children: [c ? /* @__PURE__ */ b(nt, { children: n }) : null, l ? /* @__PURE__ */ b(rt, { children: r }) : null] });
|
|
2038
2166
|
return /* @__PURE__ */ x(D.Portal, {
|
|
2039
2167
|
container: i,
|
|
2040
2168
|
children: [/* @__PURE__ */ b(D.Backdrop, { className: v("kb-dialog-backdrop", t?.backdrop) }), /* @__PURE__ */ x(D.Popup, {
|
|
2041
2169
|
...s,
|
|
2042
2170
|
"data-layout": e,
|
|
2043
2171
|
className: v("kb-dialog-popup", o),
|
|
2044
|
-
children: [e === "drawer" && (c || l) ? /* @__PURE__ */ b(
|
|
2172
|
+
children: [e === "drawer" && (c || l) ? /* @__PURE__ */ b(at, { children: u }) : u, a]
|
|
2045
2173
|
})]
|
|
2046
2174
|
});
|
|
2047
2175
|
}
|
|
2048
|
-
var
|
|
2049
|
-
Trigger:
|
|
2050
|
-
Content:
|
|
2051
|
-
Title:
|
|
2052
|
-
Description:
|
|
2053
|
-
Close:
|
|
2054
|
-
Actions:
|
|
2055
|
-
Header:
|
|
2056
|
-
Body:
|
|
2057
|
-
Footer:
|
|
2058
|
-
}),
|
|
2059
|
-
function
|
|
2176
|
+
var lt = Object.assign($e, {
|
|
2177
|
+
Trigger: et,
|
|
2178
|
+
Content: ct,
|
|
2179
|
+
Title: nt,
|
|
2180
|
+
Description: rt,
|
|
2181
|
+
Close: tt,
|
|
2182
|
+
Actions: it,
|
|
2183
|
+
Header: at,
|
|
2184
|
+
Body: ot,
|
|
2185
|
+
Footer: st
|
|
2186
|
+
}), ut = "The action did not complete. Try again.";
|
|
2187
|
+
function dt({ title: e, description: t, details: n, onConfirm: r, onConfirmed: i, confirmLabel: a, pendingLabel: o, cancelLabel: s = "Cancel", errorMessage: c = ut, open: l, defaultOpen: u = !1, onOpenChange: f, finalFocus: p, container: m, classNames: h, className: y, children: S, render: C = /* @__PURE__ */ b(Z, { variant: "danger" }), ...w }) {
|
|
2060
2188
|
let [T, E] = _(u), [D, O] = _(!1), [k, A] = _(null), j = g(null), M = g(!1), N = g(!1), P = g(!0), F = l ?? T, I = g(F), L = g(i), [R, z] = _(0);
|
|
2061
2189
|
d(() => {
|
|
2062
2190
|
I.current = F, L.current = i;
|
|
@@ -2081,8 +2209,8 @@ function tt({ title: e, description: t, details: n, onConfirm: r, onConfirmed: i
|
|
|
2081
2209
|
}
|
|
2082
2210
|
}
|
|
2083
2211
|
}
|
|
2084
|
-
let
|
|
2085
|
-
return /* @__PURE__ */ x(
|
|
2212
|
+
let H = a ?? S, U = k && (typeof c == "function" ? c(k.reason) : c);
|
|
2213
|
+
return /* @__PURE__ */ x(lt, {
|
|
2086
2214
|
open: F,
|
|
2087
2215
|
disablePointerDismissal: !0,
|
|
2088
2216
|
onOpenChange: (e, t) => {
|
|
@@ -2091,12 +2219,12 @@ function tt({ title: e, description: t, details: n, onConfirm: r, onConfirmed: i
|
|
|
2091
2219
|
onOpenChangeComplete: (e) => {
|
|
2092
2220
|
N.current && (N.current = !1, e || z((e) => e + 1));
|
|
2093
2221
|
},
|
|
2094
|
-
children: [/* @__PURE__ */ b(
|
|
2222
|
+
children: [/* @__PURE__ */ b(lt.Trigger, {
|
|
2095
2223
|
...w,
|
|
2096
2224
|
render: C,
|
|
2097
2225
|
className: y,
|
|
2098
2226
|
children: S
|
|
2099
|
-
}), /* @__PURE__ */ x(
|
|
2227
|
+
}), /* @__PURE__ */ x(lt.Content, {
|
|
2100
2228
|
title: e,
|
|
2101
2229
|
description: t,
|
|
2102
2230
|
initialFocus: j,
|
|
@@ -2104,19 +2232,19 @@ function tt({ title: e, description: t, details: n, onConfirm: r, onConfirmed: i
|
|
|
2104
2232
|
...p === void 0 ? {} : { finalFocus: p },
|
|
2105
2233
|
...m === void 0 ? {} : { container: m },
|
|
2106
2234
|
...h?.backdrop ? { classNames: { backdrop: h.backdrop } } : {},
|
|
2107
|
-
...
|
|
2235
|
+
...G("confirmaction", { pending: D }, h?.popup),
|
|
2108
2236
|
children: [
|
|
2109
2237
|
n == null ? null : /* @__PURE__ */ b("div", {
|
|
2110
2238
|
className: v("kb-confirmaction-details", h?.details),
|
|
2111
2239
|
children: n
|
|
2112
2240
|
}),
|
|
2113
|
-
k ? /* @__PURE__ */ b(
|
|
2241
|
+
k ? /* @__PURE__ */ b(pe, {
|
|
2114
2242
|
tone: "danger",
|
|
2115
2243
|
role: "alert",
|
|
2116
2244
|
className: v("kb-confirmaction-error", h?.error),
|
|
2117
|
-
children:
|
|
2245
|
+
children: U
|
|
2118
2246
|
}) : null,
|
|
2119
|
-
/* @__PURE__ */ x(
|
|
2247
|
+
/* @__PURE__ */ x(lt.Actions, { children: [/* @__PURE__ */ b(lt.Close, {
|
|
2120
2248
|
ref: j,
|
|
2121
2249
|
render: /* @__PURE__ */ b(Z, {
|
|
2122
2250
|
variant: "ghost",
|
|
@@ -2129,7 +2257,7 @@ function tt({ title: e, description: t, details: n, onConfirm: r, onConfirmed: i
|
|
|
2129
2257
|
disabled: D,
|
|
2130
2258
|
focusableWhenDisabled: !0,
|
|
2131
2259
|
onClick: () => void V(),
|
|
2132
|
-
children: D ? o ??
|
|
2260
|
+
children: D ? o ?? H : H
|
|
2133
2261
|
})] })
|
|
2134
2262
|
]
|
|
2135
2263
|
})]
|
|
@@ -2137,11 +2265,11 @@ function tt({ title: e, description: t, details: n, onConfirm: r, onConfirmed: i
|
|
|
2137
2265
|
}
|
|
2138
2266
|
//#endregion
|
|
2139
2267
|
//#region src/components/Container/Container.tsx
|
|
2140
|
-
function
|
|
2268
|
+
function ft({ as: e, size: t = "lg", gutter: n = !0, className: r, ...i }) {
|
|
2141
2269
|
return o(e ?? "div", {
|
|
2142
2270
|
...i,
|
|
2143
2271
|
"data-gutter": void 0,
|
|
2144
|
-
...
|
|
2272
|
+
...G("container", {
|
|
2145
2273
|
size: t,
|
|
2146
2274
|
gutter: n ? void 0 : "none"
|
|
2147
2275
|
}, r)
|
|
@@ -2149,27 +2277,27 @@ function nt({ as: e, size: t = "lg", gutter: n = !0, className: r, ...i }) {
|
|
|
2149
2277
|
}
|
|
2150
2278
|
//#endregion
|
|
2151
2279
|
//#region src/components/Link/Link.tsx
|
|
2152
|
-
var
|
|
2153
|
-
function
|
|
2154
|
-
return /* @__PURE__ */ b(
|
|
2280
|
+
var pt = a("a");
|
|
2281
|
+
function mt({ component: e, children: t }) {
|
|
2282
|
+
return /* @__PURE__ */ b(pt.Provider, {
|
|
2155
2283
|
value: e,
|
|
2156
2284
|
children: t
|
|
2157
2285
|
});
|
|
2158
2286
|
}
|
|
2159
|
-
function
|
|
2160
|
-
return u(
|
|
2287
|
+
function ht() {
|
|
2288
|
+
return u(pt);
|
|
2161
2289
|
}
|
|
2162
|
-
function
|
|
2163
|
-
let n =
|
|
2290
|
+
function gt({ className: e, ...t }) {
|
|
2291
|
+
let n = ht();
|
|
2164
2292
|
return /* @__PURE__ */ b(n, {
|
|
2165
2293
|
...t,
|
|
2166
|
-
...
|
|
2294
|
+
...G("link", {}, e)
|
|
2167
2295
|
});
|
|
2168
2296
|
}
|
|
2169
|
-
var
|
|
2297
|
+
var _t = Object.assign(gt, { Provider: mt });
|
|
2170
2298
|
//#endregion
|
|
2171
2299
|
//#region src/components/CopyableText/content.tsx
|
|
2172
|
-
function
|
|
2300
|
+
function vt(e, t) {
|
|
2173
2301
|
let n = (typeof t == "string" ? [t] : t ?? []).filter(Boolean), r = [], i = 0;
|
|
2174
2302
|
for (; i < e.length;) {
|
|
2175
2303
|
let t;
|
|
@@ -2187,7 +2315,7 @@ function ct(e, t) {
|
|
|
2187
2315
|
}
|
|
2188
2316
|
return r;
|
|
2189
2317
|
}
|
|
2190
|
-
function
|
|
2318
|
+
function yt(e) {
|
|
2191
2319
|
let t = [];
|
|
2192
2320
|
for (let n of e.matchAll(/(?:https?:\/\/|www\.)[^\s<>"'`\p{Cc}\u2018\u2019\u201c\u201d]+/giu)) {
|
|
2193
2321
|
if (/[a-z0-9@_.-]/i.test(e[n.index - 1] ?? "")) continue;
|
|
@@ -2221,7 +2349,7 @@ function lt(e) {
|
|
|
2221
2349
|
}
|
|
2222
2350
|
return t.sort((e, t) => e.start - t.start);
|
|
2223
2351
|
}
|
|
2224
|
-
var
|
|
2352
|
+
var bt = {
|
|
2225
2353
|
ts: "ts",
|
|
2226
2354
|
tsx: "tsx",
|
|
2227
2355
|
typescript: "ts",
|
|
@@ -2237,11 +2365,11 @@ var ut = {
|
|
|
2237
2365
|
text: "plain",
|
|
2238
2366
|
plain: "plain"
|
|
2239
2367
|
};
|
|
2240
|
-
function
|
|
2368
|
+
function xt(e) {
|
|
2241
2369
|
let t = e.trim(), n = /^```([^\s`]*)[^\S\r\n]*\r?\n[\s\S]*\r?\n```$/.exec(t);
|
|
2242
2370
|
if (n) {
|
|
2243
2371
|
let e = n[1]?.toLowerCase() ?? "";
|
|
2244
|
-
return Object.hasOwn(
|
|
2372
|
+
return Object.hasOwn(bt, e) ? bt[e] : "plain";
|
|
2245
2373
|
}
|
|
2246
2374
|
if (/^[{[]/.test(t)) try {
|
|
2247
2375
|
return JSON.parse(t), "json";
|
|
@@ -2252,8 +2380,8 @@ function dt(e) {
|
|
|
2252
2380
|
if (/^(?:(?:\$\s+)?(?:bun|npm|pnpm|yarn)\s+(?:add|install|run|test|exec|dlx|build)\b|(?:\$\s+)?git\s+(?:status|diff|log|add|commit|push|pull|fetch|checkout|switch|clone)\b|(?:\$\s+)?curl\s+(?:-|https?:\/\/))/.test(t)) return "bash";
|
|
2253
2381
|
if (/^(?:[.#@][\w-]|[a-z][\w-]*[\s:#.])[\s\S]*\{\s*[\w-]+\s*:/i.test(t)) return "css";
|
|
2254
2382
|
}
|
|
2255
|
-
function
|
|
2256
|
-
let n =
|
|
2383
|
+
function St(e, t) {
|
|
2384
|
+
let n = vt(e, t.highlight);
|
|
2257
2385
|
if (!t.linkify && !t.detectCode && !t.codeLanguage && n.length === 0) return e;
|
|
2258
2386
|
let r = (r, i) => {
|
|
2259
2387
|
if (r >= i) return null;
|
|
@@ -2272,7 +2400,7 @@ function ft(e, t) {
|
|
|
2272
2400
|
let o = n, s = i, c = e.slice(n, i);
|
|
2273
2401
|
c.trim().startsWith("```") && c.includes("\n") ? (o = n + c.indexOf("\n") + 1, s = n + c.lastIndexOf("```")) : c.startsWith("`") && c.endsWith("`") && (o += 1, --s);
|
|
2274
2402
|
let l = [r(n, o)], u = o;
|
|
2275
|
-
for (let [t, n, i] of
|
|
2403
|
+
for (let [t, n, i] of Ne(e.slice(o, s), a)) {
|
|
2276
2404
|
let e = o + t, a = o + n;
|
|
2277
2405
|
e > u && l.push(r(u, e)), l.push(/* @__PURE__ */ b("span", {
|
|
2278
2406
|
"data-syntax": i,
|
|
@@ -2289,14 +2417,14 @@ function ft(e, t) {
|
|
|
2289
2417
|
let a = t.detectCode ? [...e.matchAll(/`([^`\r\n]+)`/g)].map((e) => ({
|
|
2290
2418
|
start: e.index,
|
|
2291
2419
|
end: e.index + e[0].length
|
|
2292
|
-
})) : [], o = t.linkify ?
|
|
2420
|
+
})) : [], o = t.linkify ? yt(e).filter((e) => !a.some((t) => e.start < t.end && e.end > t.start)) : [], s = [...a.map((e) => ({
|
|
2293
2421
|
...e,
|
|
2294
2422
|
kind: "code"
|
|
2295
2423
|
})), ...o.map((e) => ({
|
|
2296
2424
|
...e,
|
|
2297
2425
|
kind: "link"
|
|
2298
2426
|
}))].sort((e, t) => e.start - t.start), c = [], l = 0;
|
|
2299
|
-
for (let n of s) c.push(r(l, n.start)), n.kind === "code" ? c.push(i(n.start, n.end,
|
|
2427
|
+
for (let n of s) c.push(r(l, n.start)), n.kind === "code" ? c.push(i(n.start, n.end, xt(e.slice(n.start + 1, n.end - 1)) ?? "plain")) : c.push(/* @__PURE__ */ b(_t, {
|
|
2300
2428
|
href: n.href,
|
|
2301
2429
|
className: v("kb-copyabletext-link", t.linkClassName),
|
|
2302
2430
|
children: r(n.start, n.end)
|
|
@@ -2305,100 +2433,101 @@ function ft(e, t) {
|
|
|
2305
2433
|
}
|
|
2306
2434
|
//#endregion
|
|
2307
2435
|
//#region src/components/CopyableText/CopyableText.tsx
|
|
2308
|
-
function
|
|
2309
|
-
let
|
|
2436
|
+
function Ct({ value: e, label: t, appearance: n = "field", size: r = "md", copySize: i = r, mono: a = !0, tone: o = "neutral", truncate: s = !1, expandLabel: c = "Show full value", collapseLabel: l = "Show less", highlight: u, linkify: p, format: m = "auto", language: h, copyLabel: g = "Copy", copyingLabel: y = "Copying…", copiedLabel: S = "Copied", copyErrorLabel: C = "Retry copy", successMessage: w = "Copied to clipboard", errorMessage: T = "Copy failed. Select and copy the text manually.", disabled: E, feedbackDuration: D, onCopy: O, onCopyError: k, className: A, classNames: j, children: M, ...N }) {
|
|
2437
|
+
let P = f(), F = m === "text" ? void 0 : h ?? (m === "code" ? "tsx" : xt(e)), [I, L] = _({
|
|
2310
2438
|
value: e,
|
|
2311
2439
|
open: !1
|
|
2312
|
-
}),
|
|
2313
|
-
d(() =>
|
|
2440
|
+
}), R = s && I.value === e && I.open;
|
|
2441
|
+
d(() => L({
|
|
2314
2442
|
value: e,
|
|
2315
2443
|
open: !1
|
|
2316
2444
|
}), [e]);
|
|
2317
|
-
let
|
|
2318
|
-
disabled:
|
|
2319
|
-
feedbackDuration:
|
|
2320
|
-
onCopy:
|
|
2445
|
+
let z = ge(e, {
|
|
2446
|
+
disabled: E,
|
|
2447
|
+
feedbackDuration: D,
|
|
2448
|
+
onCopy: O,
|
|
2321
2449
|
onCopyError: (t) => {
|
|
2322
|
-
|
|
2450
|
+
L({
|
|
2323
2451
|
value: e,
|
|
2324
2452
|
open: !0
|
|
2325
|
-
}),
|
|
2453
|
+
}), k?.(t);
|
|
2326
2454
|
}
|
|
2327
|
-
}),
|
|
2328
|
-
idle:
|
|
2329
|
-
pending:
|
|
2330
|
-
copied:
|
|
2331
|
-
failed:
|
|
2332
|
-
}[
|
|
2455
|
+
}), B = {
|
|
2456
|
+
idle: g,
|
|
2457
|
+
pending: y,
|
|
2458
|
+
copied: S,
|
|
2459
|
+
failed: C
|
|
2460
|
+
}[z.state];
|
|
2333
2461
|
return /* @__PURE__ */ x("span", {
|
|
2334
|
-
...
|
|
2335
|
-
...
|
|
2462
|
+
...N,
|
|
2463
|
+
...G("copyabletext", {
|
|
2336
2464
|
appearance: n,
|
|
2337
|
-
format:
|
|
2465
|
+
format: F ? "code" : "text",
|
|
2338
2466
|
size: r,
|
|
2339
|
-
mono:
|
|
2340
|
-
tone:
|
|
2341
|
-
expandable:
|
|
2342
|
-
expanded:
|
|
2343
|
-
truncate:
|
|
2344
|
-
disabled:
|
|
2345
|
-
"copy-state":
|
|
2346
|
-
},
|
|
2467
|
+
mono: a,
|
|
2468
|
+
tone: o,
|
|
2469
|
+
expandable: s,
|
|
2470
|
+
expanded: R,
|
|
2471
|
+
truncate: s && !R,
|
|
2472
|
+
disabled: z.disabled,
|
|
2473
|
+
"copy-state": z.state
|
|
2474
|
+
}, A),
|
|
2347
2475
|
children: [
|
|
2348
2476
|
t ? /* @__PURE__ */ b("span", {
|
|
2349
|
-
className: v("kb-copyabletext-label",
|
|
2477
|
+
className: v("kb-copyabletext-label", j?.label),
|
|
2350
2478
|
children: t
|
|
2351
2479
|
}) : null,
|
|
2352
2480
|
/* @__PURE__ */ b("span", {
|
|
2353
|
-
className: v("kb-copyabletext-value",
|
|
2354
|
-
id:
|
|
2355
|
-
children:
|
|
2356
|
-
highlight:
|
|
2357
|
-
linkify: (
|
|
2358
|
-
detectCode:
|
|
2359
|
-
codeLanguage:
|
|
2360
|
-
codeClassName:
|
|
2361
|
-
highlightClassName:
|
|
2362
|
-
linkClassName:
|
|
2481
|
+
className: v("kb-copyabletext-value", j?.value),
|
|
2482
|
+
id: P,
|
|
2483
|
+
children: M != null && !R && z.state !== "failed" ? M : St(e, {
|
|
2484
|
+
highlight: u,
|
|
2485
|
+
linkify: (p ?? m !== "text") && (!s || R),
|
|
2486
|
+
detectCode: m !== "text",
|
|
2487
|
+
codeLanguage: F,
|
|
2488
|
+
codeClassName: j?.code,
|
|
2489
|
+
highlightClassName: j?.highlight,
|
|
2490
|
+
linkClassName: j?.link
|
|
2363
2491
|
})
|
|
2364
2492
|
}),
|
|
2365
2493
|
/* @__PURE__ */ x("span", {
|
|
2366
|
-
className: v("kb-copyabletext-actions",
|
|
2367
|
-
children: [
|
|
2494
|
+
className: v("kb-copyabletext-actions", j?.actions),
|
|
2495
|
+
children: [s ? /* @__PURE__ */ b("button", {
|
|
2368
2496
|
type: "button",
|
|
2369
|
-
className: v("kb-copyabletext-toggle",
|
|
2370
|
-
"aria-expanded":
|
|
2371
|
-
"aria-controls":
|
|
2372
|
-
onClick: () =>
|
|
2497
|
+
className: v("kb-copyabletext-toggle", j?.toggle),
|
|
2498
|
+
"aria-expanded": R,
|
|
2499
|
+
"aria-controls": P,
|
|
2500
|
+
onClick: () => L({
|
|
2373
2501
|
value: e,
|
|
2374
|
-
open: !
|
|
2502
|
+
open: !R
|
|
2375
2503
|
}),
|
|
2376
|
-
children:
|
|
2504
|
+
children: R ? l : c
|
|
2377
2505
|
}) : null, /* @__PURE__ */ b("button", {
|
|
2378
2506
|
type: "button",
|
|
2379
|
-
className: v("kb-copyabletext-copy",
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2507
|
+
className: v("kb-copyabletext-copy", j?.copy),
|
|
2508
|
+
"data-size": i,
|
|
2509
|
+
disabled: z.disabled,
|
|
2510
|
+
"aria-disabled": z.state === "pending" || void 0,
|
|
2511
|
+
onClick: () => void z.copy(),
|
|
2512
|
+
children: B
|
|
2384
2513
|
})]
|
|
2385
2514
|
}),
|
|
2386
2515
|
/* @__PURE__ */ b("span", {
|
|
2387
2516
|
role: "status",
|
|
2388
2517
|
"aria-live": "polite",
|
|
2389
2518
|
"aria-atomic": "true",
|
|
2390
|
-
className: v("kb-copyabletext-feedback",
|
|
2391
|
-
children:
|
|
2519
|
+
className: v("kb-copyabletext-feedback", z.state !== "failed" && "kb-sr-only", j?.feedback),
|
|
2520
|
+
children: z.state === "copied" ? w : z.state === "failed" ? T : z.state === "pending" ? y : ""
|
|
2392
2521
|
})
|
|
2393
2522
|
]
|
|
2394
2523
|
});
|
|
2395
2524
|
}
|
|
2396
2525
|
//#endregion
|
|
2397
2526
|
//#region src/components/Dashboard/Dashboard.tsx
|
|
2398
|
-
var
|
|
2527
|
+
var wt = ({ ref: e, header: t, metrics: n, primary: r, secondary: i, className: a, classNames: o, ...s }) => /* @__PURE__ */ x("div", {
|
|
2399
2528
|
...s,
|
|
2400
2529
|
ref: e,
|
|
2401
|
-
...
|
|
2530
|
+
...G("dashboard", {}, a),
|
|
2402
2531
|
children: [
|
|
2403
2532
|
t ? /* @__PURE__ */ b("div", {
|
|
2404
2533
|
className: v("kb-dashboard-header", o?.header),
|
|
@@ -2422,58 +2551,58 @@ var mt = ({ ref: e, header: t, metrics: n, primary: r, secondary: i, className:
|
|
|
2422
2551
|
});
|
|
2423
2552
|
//#endregion
|
|
2424
2553
|
//#region src/components/DescriptionList/DescriptionList.tsx
|
|
2425
|
-
function
|
|
2554
|
+
function Tt({ layout: e = "responsive", density: t = "comfortable", dividers: n = !0, className: r, ...i }) {
|
|
2426
2555
|
return /* @__PURE__ */ b("dl", {
|
|
2427
2556
|
...i,
|
|
2428
|
-
...
|
|
2557
|
+
...G("descriptionlist", {
|
|
2429
2558
|
layout: e,
|
|
2430
2559
|
density: t,
|
|
2431
2560
|
dividers: n
|
|
2432
2561
|
}, r)
|
|
2433
2562
|
});
|
|
2434
2563
|
}
|
|
2435
|
-
function
|
|
2564
|
+
function Et({ className: e, ...t }) {
|
|
2436
2565
|
return /* @__PURE__ */ b("div", {
|
|
2437
2566
|
...t,
|
|
2438
|
-
...
|
|
2567
|
+
...G("descriptionlist-item", {}, e)
|
|
2439
2568
|
});
|
|
2440
2569
|
}
|
|
2441
|
-
function
|
|
2570
|
+
function Dt({ className: e, ...t }) {
|
|
2442
2571
|
return /* @__PURE__ */ b("dt", {
|
|
2443
2572
|
...t,
|
|
2444
|
-
...
|
|
2573
|
+
...G("descriptionlist-term", {}, e)
|
|
2445
2574
|
});
|
|
2446
2575
|
}
|
|
2447
|
-
function
|
|
2576
|
+
function Ot({ className: e, ...t }) {
|
|
2448
2577
|
return /* @__PURE__ */ b("dd", {
|
|
2449
2578
|
...t,
|
|
2450
|
-
...
|
|
2579
|
+
...G("descriptionlist-detail", {}, e)
|
|
2451
2580
|
});
|
|
2452
2581
|
}
|
|
2453
|
-
var
|
|
2454
|
-
Item:
|
|
2455
|
-
Term:
|
|
2456
|
-
Detail:
|
|
2582
|
+
var kt = Object.assign(Tt, {
|
|
2583
|
+
Item: Et,
|
|
2584
|
+
Term: Dt,
|
|
2585
|
+
Detail: Ot
|
|
2457
2586
|
});
|
|
2458
2587
|
//#endregion
|
|
2459
2588
|
//#region src/components/Disclosure/Disclosure.tsx
|
|
2460
|
-
function
|
|
2589
|
+
function At({ className: e, ...t }) {
|
|
2461
2590
|
return /* @__PURE__ */ b(O.Root, {
|
|
2462
2591
|
...t,
|
|
2463
|
-
...
|
|
2592
|
+
...G("disclosure", {}, e)
|
|
2464
2593
|
});
|
|
2465
2594
|
}
|
|
2466
|
-
function
|
|
2595
|
+
function jt({ className: e, ...t }) {
|
|
2467
2596
|
return /* @__PURE__ */ b(O.Trigger, {
|
|
2468
2597
|
...t,
|
|
2469
|
-
...
|
|
2598
|
+
...G("disclosure-trigger", {}, e)
|
|
2470
2599
|
});
|
|
2471
2600
|
}
|
|
2472
|
-
function
|
|
2601
|
+
function Mt({ className: e, children: t, render: n, ...r }) {
|
|
2473
2602
|
return /* @__PURE__ */ b(O.Panel, {
|
|
2474
2603
|
...r,
|
|
2475
|
-
...
|
|
2476
|
-
render: (e, t) => /* @__PURE__ */ b(
|
|
2604
|
+
...G("disclosure-panel", {}, e),
|
|
2605
|
+
render: (e, t) => /* @__PURE__ */ b(W, {
|
|
2477
2606
|
nativeProps: e,
|
|
2478
2607
|
state: t,
|
|
2479
2608
|
render: n
|
|
@@ -2484,20 +2613,20 @@ function St({ className: e, children: t, render: n, ...r }) {
|
|
|
2484
2613
|
})
|
|
2485
2614
|
});
|
|
2486
2615
|
}
|
|
2487
|
-
var
|
|
2488
|
-
Trigger:
|
|
2489
|
-
Panel:
|
|
2490
|
-
}),
|
|
2616
|
+
var Nt = Object.assign(At, {
|
|
2617
|
+
Trigger: jt,
|
|
2618
|
+
Panel: Mt
|
|
2619
|
+
}), Pt = {
|
|
2491
2620
|
2: "h2",
|
|
2492
2621
|
3: "h3",
|
|
2493
2622
|
4: "h4"
|
|
2494
2623
|
};
|
|
2495
|
-
function
|
|
2496
|
-
let h =
|
|
2624
|
+
function Ft({ title: e, description: t, eyebrow: n, icon: r, actions: i, footer: a, headingLevel: o = 3, size: s = "md", variant: c = "surface", tone: l = "neutral", live: u = !1, className: d, classNames: f, children: p, ...m }) {
|
|
2625
|
+
let h = Pt[o];
|
|
2497
2626
|
return /* @__PURE__ */ x("div", {
|
|
2498
2627
|
...m,
|
|
2499
2628
|
...u ? { role: "status" } : {},
|
|
2500
|
-
...
|
|
2629
|
+
...G("emptystate", {
|
|
2501
2630
|
size: s,
|
|
2502
2631
|
variant: c,
|
|
2503
2632
|
tone: l
|
|
@@ -2542,14 +2671,14 @@ function Tt({ title: e, description: t, eyebrow: n, icon: r, actions: i, footer:
|
|
|
2542
2671
|
}
|
|
2543
2672
|
//#endregion
|
|
2544
2673
|
//#region src/components/ErrorSummary/ErrorSummary.tsx
|
|
2545
|
-
var
|
|
2674
|
+
var It = [
|
|
2546
2675
|
"input:not(:disabled):not([type='hidden']):not([hidden]):not([tabindex='-1']):not([aria-hidden='true'])",
|
|
2547
2676
|
"textarea:not(:disabled):not([hidden]):not([tabindex='-1']):not([aria-hidden='true'])",
|
|
2548
2677
|
"select:not(:disabled):not([hidden]):not([tabindex='-1']):not([aria-hidden='true'])",
|
|
2549
2678
|
"button:not(:disabled):not([hidden]):not([tabindex='-1']):not([aria-hidden='true'])",
|
|
2550
2679
|
"[tabindex]:not([tabindex='-1']):not(:disabled):not([hidden]):not([aria-hidden='true']):not([aria-disabled='true'])"
|
|
2551
2680
|
].join(", ");
|
|
2552
|
-
function
|
|
2681
|
+
function Lt(e, t) {
|
|
2553
2682
|
if (!t.startsWith("#") || t.length < 2) return !1;
|
|
2554
2683
|
let n = t.slice(1), r = n;
|
|
2555
2684
|
try {
|
|
@@ -2559,10 +2688,10 @@ function Dt(e, t) {
|
|
|
2559
2688
|
}
|
|
2560
2689
|
let i = e.getElementById(r);
|
|
2561
2690
|
if (!i) return !1;
|
|
2562
|
-
let a = i.matches(
|
|
2691
|
+
let a = i.matches(It) ? i : i.querySelector(It) ?? (i.hasAttribute("tabindex") && !i.matches(":disabled") && !i.hidden ? i : null);
|
|
2563
2692
|
return a ? (a.focus(), a.scrollIntoView?.({ block: "nearest" }), !0) : !1;
|
|
2564
2693
|
}
|
|
2565
|
-
var
|
|
2694
|
+
var Rt = ({ ref: e, title: t = "There is a problem", description: n, items: r, headingLevel: i = 2, onItemSelect: a, tabIndex: o = -1, className: s, classNames: c, "aria-labelledby": l, "aria-describedby": u, ...d }) => {
|
|
2566
2695
|
let p = f();
|
|
2567
2696
|
if (r.length === 0) return null;
|
|
2568
2697
|
let m = d.id ?? `kb-errorsummary-${p}`, h = `${m}-title`, g = n ? `${m}-description` : void 0, _ = l ?? h, y = [g, u].filter(Boolean).join(" ") || void 0, S = `h${i}`, C = /* @__PURE__ */ new Map();
|
|
@@ -2573,7 +2702,7 @@ var Ot = ({ ref: e, title: t = "There is a problem", description: n, items: r, h
|
|
|
2573
2702
|
tabIndex: o,
|
|
2574
2703
|
"aria-labelledby": _,
|
|
2575
2704
|
"aria-describedby": y,
|
|
2576
|
-
...
|
|
2705
|
+
...G("errorsummary", {}, s),
|
|
2577
2706
|
children: [
|
|
2578
2707
|
/* @__PURE__ */ b(S, {
|
|
2579
2708
|
id: h,
|
|
@@ -2597,7 +2726,7 @@ var Ot = ({ ref: e, title: t = "There is a problem", description: n, items: r, h
|
|
|
2597
2726
|
href: e.href,
|
|
2598
2727
|
className: v("kb-errorsummary-link", c?.link),
|
|
2599
2728
|
onClick: (t) => {
|
|
2600
|
-
a?.(e.href, t), !t.defaultPrevented &&
|
|
2729
|
+
a?.(e.href, t), !t.defaultPrevented && Lt(t.currentTarget.ownerDocument, e.href) && t.preventDefault();
|
|
2601
2730
|
},
|
|
2602
2731
|
children: e.label
|
|
2603
2732
|
})
|
|
@@ -2606,8 +2735,8 @@ var Ot = ({ ref: e, title: t = "There is a problem", description: n, items: r, h
|
|
|
2606
2735
|
})
|
|
2607
2736
|
]
|
|
2608
2737
|
});
|
|
2609
|
-
},
|
|
2610
|
-
let p = f(), m = d.id ?? `kb-fieldset-${p}`, h = !!i, { invalid: g, ariaInvalid: _ } =
|
|
2738
|
+
}, zt = ({ ref: e, legend: t, visuallyHidden: n, description: r, error: i, disabled: a, className: o, classNames: s, children: c, "aria-describedby": l, "aria-invalid": u, ...d }) => {
|
|
2739
|
+
let p = f(), m = d.id ?? `kb-fieldset-${p}`, h = !!i, { invalid: g, ariaInvalid: _ } = K(h, u), y = r ? `${m}-description` : void 0, S = h ? `${m}-error` : void 0, C = [
|
|
2611
2740
|
y,
|
|
2612
2741
|
S,
|
|
2613
2742
|
l
|
|
@@ -2618,7 +2747,7 @@ var Ot = ({ ref: e, title: t = "There is a problem", description: n, items: r, h
|
|
|
2618
2747
|
disabled: a,
|
|
2619
2748
|
"aria-invalid": _,
|
|
2620
2749
|
"aria-describedby": C,
|
|
2621
|
-
...
|
|
2750
|
+
...G("fieldset", {
|
|
2622
2751
|
disabled: !!a,
|
|
2623
2752
|
invalid: g
|
|
2624
2753
|
}, o),
|
|
@@ -2643,11 +2772,11 @@ var Ot = ({ ref: e, title: t = "There is a problem", description: n, items: r, h
|
|
|
2643
2772
|
}) : null
|
|
2644
2773
|
]
|
|
2645
2774
|
});
|
|
2646
|
-
},
|
|
2647
|
-
function
|
|
2648
|
-
let L = f(), R = g(null), z = g(null), B = g(/* @__PURE__ */ new Map()), V = g(null), [
|
|
2775
|
+
}, Bt = (e) => `Remove ${e.name}`, Vt = (e) => `${e.name} removed.`, Ht = (e) => `${e} ${e === 1 ? "file" : "files"} selected.`;
|
|
2776
|
+
function Ut({ classNames: e, label: t, items: n, onFiles: r, onRemove: i, accept: a, multiple: o = !0, disabled: s = !1, readOnly: c = !1, description: l, error: u, visuallyHidden: d, chooseLabel: h = "Choose files", emptyMessage: S = "No files added.", removeLabel: C = Bt, removedMessage: w = Vt, selectionMessage: T = Ht, renderItem: E, triggerClassName: D, listClassName: O, itemClassName: k, inputRef: A, triggerRef: j, className: M, onBlurCapture: N, "aria-describedby": P, "aria-invalid": F, ...I }) {
|
|
2777
|
+
let L = f(), R = g(null), z = g(null), B = g(/* @__PURE__ */ new Map()), V = g(null), [H, U] = _("");
|
|
2649
2778
|
p(A, () => R.current), p(j, () => z.current);
|
|
2650
|
-
let { invalid:
|
|
2779
|
+
let { invalid: W, ariaInvalid: q } = K(!!u, F), J = s || c, ee = [
|
|
2651
2780
|
l ? `${L}-description` : null,
|
|
2652
2781
|
u ? `${L}-error` : null,
|
|
2653
2782
|
P
|
|
@@ -2661,17 +2790,17 @@ function Nt({ classNames: e, label: t, items: n, onFiles: r, onRemove: i, accept
|
|
|
2661
2790
|
let t = n[Math.min(e.index, n.length - 1)];
|
|
2662
2791
|
(t ? B.current.get(t.id) : z.current)?.focus();
|
|
2663
2792
|
}
|
|
2664
|
-
|
|
2793
|
+
U(w(e.item));
|
|
2665
2794
|
}, [
|
|
2666
2795
|
n,
|
|
2667
2796
|
J,
|
|
2668
2797
|
w
|
|
2669
2798
|
]), /* @__PURE__ */ x("div", {
|
|
2670
2799
|
...I,
|
|
2671
|
-
...
|
|
2800
|
+
...G("fileinput", {
|
|
2672
2801
|
disabled: s,
|
|
2673
2802
|
readonly: c,
|
|
2674
|
-
invalid:
|
|
2803
|
+
invalid: W
|
|
2675
2804
|
}, M),
|
|
2676
2805
|
onBlurCapture: (e) => {
|
|
2677
2806
|
V.current?.button.isSameNode(e.target) && e.relatedTarget !== V.current.button && (V.current = null), N?.(e);
|
|
@@ -2694,7 +2823,7 @@ function Nt({ classNames: e, label: t, items: n, onFiles: r, onRemove: i, accept
|
|
|
2694
2823
|
let t = e.currentTarget;
|
|
2695
2824
|
try {
|
|
2696
2825
|
let e = Array.from(t.files ?? []);
|
|
2697
|
-
!J && e.length && (r(e),
|
|
2826
|
+
!J && e.length && (r(e), U(T(e.length)));
|
|
2698
2827
|
} finally {
|
|
2699
2828
|
t.value = "";
|
|
2700
2829
|
}
|
|
@@ -2775,25 +2904,69 @@ function Nt({ classNames: e, label: t, items: n, onFiles: r, onRemove: i, accept
|
|
|
2775
2904
|
"aria-live": "polite",
|
|
2776
2905
|
"aria-atomic": "true",
|
|
2777
2906
|
className: "kb-sr-only",
|
|
2778
|
-
children:
|
|
2907
|
+
children: H
|
|
2779
2908
|
})
|
|
2780
2909
|
]
|
|
2781
2910
|
});
|
|
2782
2911
|
}
|
|
2783
2912
|
//#endregion
|
|
2913
|
+
//#region src/components/FilterChip/FilterChip.tsx
|
|
2914
|
+
function Wt({ label: e, selected: t, onSelectedChange: n, onRemove: r, removeLabel: i = `Remove ${e}`, disabled: a = !1, className: o, classNames: s, "aria-pressed": c, ...l }) {
|
|
2915
|
+
let u = /* @__PURE__ */ b("span", {
|
|
2916
|
+
className: v("kb-filterchip-label", s?.label),
|
|
2917
|
+
children: e
|
|
2918
|
+
});
|
|
2919
|
+
return /* @__PURE__ */ x("span", {
|
|
2920
|
+
...l,
|
|
2921
|
+
...G("filterchip", {
|
|
2922
|
+
selected: t,
|
|
2923
|
+
disabled: a
|
|
2924
|
+
}, s?.root ?? o),
|
|
2925
|
+
children: [n ? /* @__PURE__ */ x("button", {
|
|
2926
|
+
className: v("kb-filterchip-select", s?.select),
|
|
2927
|
+
type: "button",
|
|
2928
|
+
"aria-pressed": t,
|
|
2929
|
+
disabled: a,
|
|
2930
|
+
onClick: () => n(!t),
|
|
2931
|
+
children: [/* @__PURE__ */ b("svg", {
|
|
2932
|
+
"aria-hidden": "true",
|
|
2933
|
+
className: v("kb-filterchip-indicator", s?.indicator),
|
|
2934
|
+
viewBox: "0 0 16 16",
|
|
2935
|
+
fill: "none",
|
|
2936
|
+
stroke: "currentColor",
|
|
2937
|
+
strokeWidth: "2",
|
|
2938
|
+
children: /* @__PURE__ */ b("path", { d: "m3 8 3 3 7-7" })
|
|
2939
|
+
}), u]
|
|
2940
|
+
}) : u, r ? /* @__PURE__ */ b("button", {
|
|
2941
|
+
className: v("kb-filterchip-remove", s?.remove),
|
|
2942
|
+
type: "button",
|
|
2943
|
+
"aria-label": i,
|
|
2944
|
+
disabled: a,
|
|
2945
|
+
onClick: () => r(),
|
|
2946
|
+
children: /* @__PURE__ */ b("svg", {
|
|
2947
|
+
"aria-hidden": "true",
|
|
2948
|
+
viewBox: "0 0 16 16",
|
|
2949
|
+
stroke: "currentColor",
|
|
2950
|
+
strokeWidth: "2",
|
|
2951
|
+
children: /* @__PURE__ */ b("path", { d: "m4 4 8 8m0-8-8 8" })
|
|
2952
|
+
})
|
|
2953
|
+
}) : null]
|
|
2954
|
+
});
|
|
2955
|
+
}
|
|
2956
|
+
//#endregion
|
|
2784
2957
|
//#region src/components/FormActions/FormActions.tsx
|
|
2785
|
-
var
|
|
2958
|
+
var Gt = ({ ref: e, align: t = "end", divider: n = !1, className: r, children: i, ...a }) => /* @__PURE__ */ b("div", {
|
|
2786
2959
|
...a,
|
|
2787
2960
|
ref: e,
|
|
2788
|
-
...
|
|
2961
|
+
...G("formactions", {
|
|
2789
2962
|
align: t,
|
|
2790
2963
|
divider: n
|
|
2791
2964
|
}, r),
|
|
2792
2965
|
children: i
|
|
2793
|
-
}),
|
|
2966
|
+
}), Kt = ({ ref: e, header: t, actions: n, actionsAlign: r = "end", width: i = "md", className: a, classNames: o, children: s, ...c }) => /* @__PURE__ */ x("form", {
|
|
2794
2967
|
...c,
|
|
2795
2968
|
ref: e,
|
|
2796
|
-
...
|
|
2969
|
+
...G("form", { width: i }, a),
|
|
2797
2970
|
children: [
|
|
2798
2971
|
t ? /* @__PURE__ */ b("div", {
|
|
2799
2972
|
className: v("kb-form-header", o?.header),
|
|
@@ -2803,14 +2976,14 @@ var Pt = ({ ref: e, align: t = "end", divider: n = !1, className: r, children: i
|
|
|
2803
2976
|
className: v("kb-form-body", o?.body),
|
|
2804
2977
|
children: s
|
|
2805
2978
|
}),
|
|
2806
|
-
n ? /* @__PURE__ */ b(
|
|
2979
|
+
n ? /* @__PURE__ */ b(Gt, {
|
|
2807
2980
|
align: r,
|
|
2808
2981
|
divider: !0,
|
|
2809
2982
|
className: v("kb-form-actions", o?.actions),
|
|
2810
2983
|
children: n
|
|
2811
2984
|
}) : null
|
|
2812
2985
|
]
|
|
2813
|
-
}),
|
|
2986
|
+
}), qt = {
|
|
2814
2987
|
1: "xl",
|
|
2815
2988
|
2: "lg",
|
|
2816
2989
|
3: "md",
|
|
@@ -2818,16 +2991,16 @@ var Pt = ({ ref: e, align: t = "end", divider: n = !1, className: r, children: i
|
|
|
2818
2991
|
5: "sm",
|
|
2819
2992
|
6: "sm"
|
|
2820
2993
|
};
|
|
2821
|
-
function
|
|
2994
|
+
function Jt({ level: e = 2, size: t = qt[e], className: n, ...r }) {
|
|
2822
2995
|
return o(`h${e}`, {
|
|
2823
2996
|
...r,
|
|
2824
|
-
...
|
|
2997
|
+
...G("heading", { size: t }, n)
|
|
2825
2998
|
});
|
|
2826
2999
|
}
|
|
2827
3000
|
//#endregion
|
|
2828
3001
|
//#region src/components/FormSection/FormSection.tsx
|
|
2829
|
-
var
|
|
2830
|
-
let g = f(), _ = h.id ?? `kb-formsection-${g}`, y = !!i, { invalid: S, ariaInvalid: C } =
|
|
3002
|
+
var Yt = ({ ref: e, title: t, headingLevel: n = 2, description: r, error: i, actions: a, actionsAlign: o = "end", layout: s, disabled: c, className: l, classNames: u, children: d, "aria-describedby": p, "aria-invalid": m, ...h }) => {
|
|
3003
|
+
let g = f(), _ = h.id ?? `kb-formsection-${g}`, y = !!i, { invalid: S, ariaInvalid: C } = K(y, m), w = `${_}-title`, T = r ? `${_}-description` : void 0, E = y ? `${_}-error` : void 0, D = [
|
|
2831
3004
|
T,
|
|
2832
3005
|
E,
|
|
2833
3006
|
p
|
|
@@ -2839,14 +3012,14 @@ var Rt = ({ ref: e, title: t, headingLevel: n = 2, description: r, error: i, act
|
|
|
2839
3012
|
disabled: c,
|
|
2840
3013
|
"aria-invalid": C,
|
|
2841
3014
|
"aria-describedby": D,
|
|
2842
|
-
...
|
|
3015
|
+
...G("formsection", {
|
|
2843
3016
|
layout: s,
|
|
2844
3017
|
disabled: !!c,
|
|
2845
3018
|
invalid: S
|
|
2846
3019
|
}, l),
|
|
2847
3020
|
children: [/* @__PURE__ */ x("div", {
|
|
2848
3021
|
className: v("kb-formsection-header", u?.header),
|
|
2849
|
-
children: [/* @__PURE__ */ b(
|
|
3022
|
+
children: [/* @__PURE__ */ b(Jt, {
|
|
2850
3023
|
level: n,
|
|
2851
3024
|
size: "md",
|
|
2852
3025
|
id: w,
|
|
@@ -2869,7 +3042,7 @@ var Rt = ({ ref: e, title: t, headingLevel: n = 2, description: r, error: i, act
|
|
|
2869
3042
|
className: v("kb-formsection-error", u?.error),
|
|
2870
3043
|
children: i
|
|
2871
3044
|
}) : null,
|
|
2872
|
-
a ? /* @__PURE__ */ b(
|
|
3045
|
+
a ? /* @__PURE__ */ b(Gt, {
|
|
2873
3046
|
align: o,
|
|
2874
3047
|
className: v("kb-formsection-actions", u?.actions),
|
|
2875
3048
|
children: a
|
|
@@ -2880,10 +3053,10 @@ var Rt = ({ ref: e, title: t, headingLevel: n = 2, description: r, error: i, act
|
|
|
2880
3053
|
};
|
|
2881
3054
|
//#endregion
|
|
2882
3055
|
//#region src/components/Grid/Grid.tsx
|
|
2883
|
-
function
|
|
3056
|
+
function Xt({ as: e, layout: t = "auto", columns: n, minItemWidth: r, gap: i, align: a, className: s, ...c }) {
|
|
2884
3057
|
return o(e ?? "div", {
|
|
2885
3058
|
...c,
|
|
2886
|
-
...
|
|
3059
|
+
...G("grid", {
|
|
2887
3060
|
layout: t,
|
|
2888
3061
|
columns: n === void 0 ? void 0 : String(n),
|
|
2889
3062
|
"min-item-width": r,
|
|
@@ -2894,15 +3067,15 @@ function zt({ as: e, layout: t = "auto", columns: n, minItemWidth: r, gap: i, al
|
|
|
2894
3067
|
}
|
|
2895
3068
|
//#endregion
|
|
2896
3069
|
//#region src/components/Gallery/Gallery.tsx
|
|
2897
|
-
function
|
|
2898
|
-
return n.toArray(e).some((e) => c(e) && e.type === r ?
|
|
3070
|
+
function Zt(e) {
|
|
3071
|
+
return n.toArray(e).some((e) => c(e) && e.type === r ? Zt(e.props.children) : !0);
|
|
2899
3072
|
}
|
|
2900
|
-
function
|
|
2901
|
-
let l = i != null && !
|
|
3073
|
+
function Qt({ ref: e, header: t, filters: n, itemsLabel: r, empty: i, className: a, classNames: o, children: s, ...c }) {
|
|
3074
|
+
let l = i != null && !Zt(s);
|
|
2902
3075
|
return /* @__PURE__ */ x("div", {
|
|
2903
3076
|
...c,
|
|
2904
3077
|
ref: e,
|
|
2905
|
-
...
|
|
3078
|
+
...G("gallery", {}, a),
|
|
2906
3079
|
children: [
|
|
2907
3080
|
t == null ? null : /* @__PURE__ */ b("div", {
|
|
2908
3081
|
className: v("kb-gallery-header", o?.header),
|
|
@@ -2915,7 +3088,7 @@ function Vt({ ref: e, header: t, filters: n, itemsLabel: r, empty: i, className:
|
|
|
2915
3088
|
l ? /* @__PURE__ */ b("div", {
|
|
2916
3089
|
className: v("kb-gallery-empty", o?.empty),
|
|
2917
3090
|
children: i
|
|
2918
|
-
}) : /* @__PURE__ */ b(
|
|
3091
|
+
}) : /* @__PURE__ */ b(Xt, {
|
|
2919
3092
|
as: "ul",
|
|
2920
3093
|
gap: "lg",
|
|
2921
3094
|
"aria-label": r,
|
|
@@ -2925,19 +3098,19 @@ function Vt({ ref: e, header: t, filters: n, itemsLabel: r, empty: i, className:
|
|
|
2925
3098
|
]
|
|
2926
3099
|
});
|
|
2927
3100
|
}
|
|
2928
|
-
function
|
|
3101
|
+
function $t({ featured: e, className: t, ...n }) {
|
|
2929
3102
|
return /* @__PURE__ */ b("li", {
|
|
2930
3103
|
...n,
|
|
2931
|
-
...
|
|
3104
|
+
...G("gallery-item", { featured: e }, t)
|
|
2932
3105
|
});
|
|
2933
3106
|
}
|
|
2934
|
-
var
|
|
3107
|
+
var en = Object.assign(Qt, { Item: $t });
|
|
2935
3108
|
//#endregion
|
|
2936
3109
|
//#region src/components/Inline/Inline.tsx
|
|
2937
|
-
function
|
|
3110
|
+
function tn({ as: e, gap: t = "md", align: n = "center", justify: r = "start", className: i, ...a }) {
|
|
2938
3111
|
return o(e ?? "div", {
|
|
2939
3112
|
...a,
|
|
2940
|
-
...
|
|
3113
|
+
...G("inline", {
|
|
2941
3114
|
gap: t,
|
|
2942
3115
|
align: n,
|
|
2943
3116
|
justify: r
|
|
@@ -2946,8 +3119,8 @@ function Wt({ as: e, gap: t = "md", align: n = "center", justify: r = "start", c
|
|
|
2946
3119
|
}
|
|
2947
3120
|
//#endregion
|
|
2948
3121
|
//#region src/components/Menu/Menu.tsx
|
|
2949
|
-
var
|
|
2950
|
-
function
|
|
3122
|
+
var nn = a(!1);
|
|
3123
|
+
function rn({ onOpenChange: e, ...t }) {
|
|
2951
3124
|
let [n, r] = _(!1);
|
|
2952
3125
|
return d(() => {
|
|
2953
3126
|
if (!n) return;
|
|
@@ -2956,7 +3129,7 @@ function Kt({ onOpenChange: e, ...t }) {
|
|
|
2956
3129
|
capture: !0,
|
|
2957
3130
|
once: !0
|
|
2958
3131
|
}), () => document.removeEventListener("keydown", e, !0);
|
|
2959
|
-
}, [n]), /* @__PURE__ */ b(
|
|
3132
|
+
}, [n]), /* @__PURE__ */ b(nn.Provider, {
|
|
2960
3133
|
value: n,
|
|
2961
3134
|
children: /* @__PURE__ */ b(k.Root, {
|
|
2962
3135
|
...t,
|
|
@@ -2967,15 +3140,15 @@ function Kt({ onOpenChange: e, ...t }) {
|
|
|
2967
3140
|
})
|
|
2968
3141
|
});
|
|
2969
3142
|
}
|
|
2970
|
-
function
|
|
2971
|
-
let t = u(
|
|
3143
|
+
function an(e) {
|
|
3144
|
+
let t = u(nn);
|
|
2972
3145
|
return /* @__PURE__ */ b(k.Trigger, {
|
|
2973
3146
|
...e,
|
|
2974
3147
|
"data-kb-menu-trigger": "",
|
|
2975
3148
|
"data-pointer-focus": t || void 0
|
|
2976
3149
|
});
|
|
2977
3150
|
}
|
|
2978
|
-
function
|
|
3151
|
+
function on({ side: e = "bottom", align: t = "start", className: n, container: r, ...i }) {
|
|
2979
3152
|
return /* @__PURE__ */ b(k.Portal, {
|
|
2980
3153
|
container: r,
|
|
2981
3154
|
children: /* @__PURE__ */ b(k.Positioner, {
|
|
@@ -2989,28 +3162,28 @@ function Jt({ side: e = "bottom", align: t = "start", className: n, container: r
|
|
|
2989
3162
|
})
|
|
2990
3163
|
});
|
|
2991
3164
|
}
|
|
2992
|
-
function
|
|
3165
|
+
function sn({ className: e, ...t }) {
|
|
2993
3166
|
return /* @__PURE__ */ b(k.Item, {
|
|
2994
3167
|
...t,
|
|
2995
3168
|
className: v("kb-menu-item", e)
|
|
2996
3169
|
});
|
|
2997
3170
|
}
|
|
2998
|
-
function
|
|
3171
|
+
function cn({ className: e, ...t }) {
|
|
2999
3172
|
return /* @__PURE__ */ b(A, {
|
|
3000
3173
|
...t,
|
|
3001
3174
|
className: v("kb-menu-separator", e)
|
|
3002
3175
|
});
|
|
3003
3176
|
}
|
|
3004
|
-
var
|
|
3005
|
-
Trigger:
|
|
3006
|
-
Content:
|
|
3007
|
-
Item:
|
|
3008
|
-
Separator:
|
|
3177
|
+
var ln = Object.assign(rn, {
|
|
3178
|
+
Trigger: an,
|
|
3179
|
+
Content: on,
|
|
3180
|
+
Item: sn,
|
|
3181
|
+
Separator: cn
|
|
3009
3182
|
});
|
|
3010
3183
|
//#endregion
|
|
3011
3184
|
//#region src/components/NumberField/NumberField.tsx
|
|
3012
|
-
function
|
|
3013
|
-
let M = f(), { invalid: N, ariaInvalid: P } =
|
|
3185
|
+
function un({ classNames: e, label: t, value: n, onValueChange: r, min: i, max: a, step: o = 1, locale: s, name: c, form: l, required: u, disabled: d = !1, readOnly: p = !1, visuallyHidden: m, description: h, error: g, size: _ = "md", inputClassName: y, groupClassName: S, inputRef: C, inputProps: w, decrementLabel: T = `Decrease ${t}`, incrementLabel: E = `Increase ${t}`, className: D, "aria-describedby": O, "aria-invalid": k, ...A }) {
|
|
3186
|
+
let M = f(), { invalid: N, ariaInvalid: P } = K(!!g, w?.["aria-invalid"] ?? k), F = [
|
|
3014
3187
|
h ? `${M}-description` : null,
|
|
3015
3188
|
g ? `${M}-error` : null,
|
|
3016
3189
|
O,
|
|
@@ -3018,7 +3191,7 @@ function Qt({ classNames: e, label: t, value: n, onValueChange: r, min: i, max:
|
|
|
3018
3191
|
].filter(Boolean).join(" ") || void 0;
|
|
3019
3192
|
return /* @__PURE__ */ x("div", {
|
|
3020
3193
|
...A,
|
|
3021
|
-
...
|
|
3194
|
+
...G("numberfield", {
|
|
3022
3195
|
size: _,
|
|
3023
3196
|
disabled: d,
|
|
3024
3197
|
readonly: p,
|
|
@@ -3089,16 +3262,16 @@ function Qt({ classNames: e, label: t, value: n, onValueChange: r, min: i, max:
|
|
|
3089
3262
|
}
|
|
3090
3263
|
//#endregion
|
|
3091
3264
|
//#region src/components/PageHeader/PageHeader.tsx
|
|
3092
|
-
var
|
|
3265
|
+
var dn = {
|
|
3093
3266
|
1: "h1",
|
|
3094
3267
|
2: "h2",
|
|
3095
3268
|
3: "h3"
|
|
3096
3269
|
};
|
|
3097
|
-
function
|
|
3098
|
-
let p =
|
|
3270
|
+
function fn({ title: e, description: t, eyebrow: n, navigation: r, meta: i, actions: a, headingLevel: o = 1, size: s = "md", divider: c = !1, className: l, classNames: u, children: d, ...f }) {
|
|
3271
|
+
let p = dn[o];
|
|
3099
3272
|
return /* @__PURE__ */ x("div", {
|
|
3100
3273
|
...f,
|
|
3101
|
-
...
|
|
3274
|
+
...G("pageheader", {
|
|
3102
3275
|
size: s,
|
|
3103
3276
|
divider: c
|
|
3104
3277
|
}, l),
|
|
@@ -3145,18 +3318,18 @@ function en({ title: e, description: t, eyebrow: n, navigation: r, meta: i, acti
|
|
|
3145
3318
|
}
|
|
3146
3319
|
//#endregion
|
|
3147
3320
|
//#region src/components/Panel/Panel.tsx
|
|
3148
|
-
var
|
|
3149
|
-
function
|
|
3150
|
-
let p =
|
|
3321
|
+
var pn = a(!1), mn = a(!1), hn = a("column"), gn = (e) => e?.previousElementSibling;
|
|
3322
|
+
function _n({ tone: e = "default", rail: t = "none", density: n = "standard", opaque: r = !1, collapsible: i = !1, open: a, defaultOpen: o, onOpenChange: s, className: c, children: l, ref: d, ...f }) {
|
|
3323
|
+
let p = G("panel", {
|
|
3151
3324
|
tone: e,
|
|
3152
3325
|
rail: t,
|
|
3153
3326
|
density: n,
|
|
3154
|
-
nested: u(
|
|
3327
|
+
nested: u(pn),
|
|
3155
3328
|
opaque: r,
|
|
3156
3329
|
collapsible: i
|
|
3157
|
-
}, c), m = /* @__PURE__ */ b(
|
|
3330
|
+
}, c), m = /* @__PURE__ */ b(pn, {
|
|
3158
3331
|
value: !0,
|
|
3159
|
-
children: /* @__PURE__ */ x(
|
|
3332
|
+
children: /* @__PURE__ */ x(mn, {
|
|
3160
3333
|
value: i,
|
|
3161
3334
|
children: [
|
|
3162
3335
|
/* @__PURE__ */ b("span", {
|
|
@@ -3188,59 +3361,59 @@ function on({ tone: e = "default", rail: t = "none", density: n = "standard", op
|
|
|
3188
3361
|
children: m
|
|
3189
3362
|
});
|
|
3190
3363
|
}
|
|
3191
|
-
function
|
|
3364
|
+
function vn({ className: e, ...t }) {
|
|
3192
3365
|
return /* @__PURE__ */ b("header", {
|
|
3193
3366
|
...t,
|
|
3194
3367
|
className: v("kb-panel-header", e)
|
|
3195
3368
|
});
|
|
3196
3369
|
}
|
|
3197
|
-
function
|
|
3370
|
+
function yn({ className: e, ...t }) {
|
|
3198
3371
|
return /* @__PURE__ */ b("div", {
|
|
3199
3372
|
...t,
|
|
3200
3373
|
className: v("kb-panel-toolbar", e)
|
|
3201
3374
|
});
|
|
3202
3375
|
}
|
|
3203
|
-
function
|
|
3204
|
-
let n = u(
|
|
3376
|
+
function bn({ className: e, ...t }) {
|
|
3377
|
+
let n = u(mn), r = v("kb-panel-body", e);
|
|
3205
3378
|
return b(n ? O.Panel : "div", {
|
|
3206
3379
|
...t,
|
|
3207
3380
|
className: r
|
|
3208
3381
|
});
|
|
3209
3382
|
}
|
|
3210
|
-
function
|
|
3383
|
+
function xn({ className: e, ...t }) {
|
|
3211
3384
|
return /* @__PURE__ */ b("footer", {
|
|
3212
3385
|
...t,
|
|
3213
3386
|
className: v("kb-panel-footer", e)
|
|
3214
3387
|
});
|
|
3215
3388
|
}
|
|
3216
|
-
function
|
|
3389
|
+
function Sn({ className: e, ...t }) {
|
|
3217
3390
|
return /* @__PURE__ */ b("div", {
|
|
3218
3391
|
...t,
|
|
3219
3392
|
className: v("kb-panel-well", e)
|
|
3220
3393
|
});
|
|
3221
3394
|
}
|
|
3222
|
-
function
|
|
3395
|
+
function Cn({ className: e, ...t }) {
|
|
3223
3396
|
return /* @__PURE__ */ b(O.Trigger, {
|
|
3224
3397
|
...t,
|
|
3225
3398
|
className: v("kb-panel-toggle", e)
|
|
3226
3399
|
});
|
|
3227
3400
|
}
|
|
3228
|
-
function
|
|
3229
|
-
return /* @__PURE__ */ b(
|
|
3401
|
+
function wn({ direction: e = "column", className: t, ...n }) {
|
|
3402
|
+
return /* @__PURE__ */ b(hn, {
|
|
3230
3403
|
value: e,
|
|
3231
3404
|
children: /* @__PURE__ */ b("div", {
|
|
3232
3405
|
...n,
|
|
3233
|
-
...
|
|
3406
|
+
...G("panel-group", { direction: e }, t)
|
|
3234
3407
|
})
|
|
3235
3408
|
});
|
|
3236
3409
|
}
|
|
3237
|
-
function
|
|
3238
|
-
let y = u(
|
|
3410
|
+
function Tn({ size: e, defaultSize: t = 50, min: n = 10, max: r = 90, step: i = 5, onSizeChange: a, className: o, ref: s, onKeyDown: c, onPointerDown: l, onPointerMove: d, onPointerUp: p, onPointerCancel: h, ...v }) {
|
|
3411
|
+
let y = u(hn) === "row", x = (e) => Math.min(r, Math.max(n, e)), [S, C] = _(t), w = x(e ?? S), [T, E] = _(), [D, O] = _(!1), k = g(w), A = g(null), j = f();
|
|
3239
3412
|
m(() => {
|
|
3240
|
-
let e =
|
|
3413
|
+
let e = gn(A.current);
|
|
3241
3414
|
e && (e.id ||= j, E(e.id));
|
|
3242
3415
|
}, [j]), m(() => {
|
|
3243
|
-
|
|
3416
|
+
gn(A.current)?.style.setProperty("--kb-panel-size", `${w}%`);
|
|
3244
3417
|
}, [w]);
|
|
3245
3418
|
let M = (t) => {
|
|
3246
3419
|
let n = x(t);
|
|
@@ -3259,7 +3432,7 @@ function mn({ size: e, defaultSize: t = 50, min: n = 10, max: r = 90, step: i =
|
|
|
3259
3432
|
l?.(e), !(e.defaultPrevented || e.button !== 0) && (e.preventDefault(), e.currentTarget.setPointerCapture?.(e.pointerId), O(!0));
|
|
3260
3433
|
}, I = (e) => {
|
|
3261
3434
|
d?.(e);
|
|
3262
|
-
let t = A.current?.parentElement?.getBoundingClientRect(), n =
|
|
3435
|
+
let t = A.current?.parentElement?.getBoundingClientRect(), n = gn(A.current)?.getBoundingClientRect();
|
|
3263
3436
|
if (!D || !t || !n) return;
|
|
3264
3437
|
let r = y ? e.clientX - n.left : e.clientY - n.top, i = y ? t.width : t.height;
|
|
3265
3438
|
i > 0 && M(Math.round(r / i * 1e3) / 10);
|
|
@@ -3288,64 +3461,64 @@ function mn({ size: e, defaultSize: t = 50, min: n = 10, max: r = 90, step: i =
|
|
|
3288
3461
|
onPointerCancel: (e) => {
|
|
3289
3462
|
h?.(e), L(e);
|
|
3290
3463
|
},
|
|
3291
|
-
...
|
|
3464
|
+
...G("panel-handle", {
|
|
3292
3465
|
orientation: y ? "vertical" : "horizontal",
|
|
3293
3466
|
dragging: D
|
|
3294
3467
|
}, o)
|
|
3295
3468
|
});
|
|
3296
3469
|
}
|
|
3297
|
-
var
|
|
3298
|
-
Header:
|
|
3299
|
-
Toolbar:
|
|
3300
|
-
Body:
|
|
3301
|
-
Footer:
|
|
3302
|
-
Well:
|
|
3303
|
-
Toggle:
|
|
3304
|
-
Group:
|
|
3305
|
-
Handle:
|
|
3470
|
+
var En = Object.assign(_n, {
|
|
3471
|
+
Header: vn,
|
|
3472
|
+
Toolbar: yn,
|
|
3473
|
+
Body: bn,
|
|
3474
|
+
Footer: xn,
|
|
3475
|
+
Well: Sn,
|
|
3476
|
+
Toggle: Cn,
|
|
3477
|
+
Group: wn,
|
|
3478
|
+
Handle: Tn
|
|
3306
3479
|
});
|
|
3307
3480
|
//#endregion
|
|
3308
3481
|
//#region src/components/Popover/Popover.tsx
|
|
3309
|
-
function
|
|
3482
|
+
function Dn(e) {
|
|
3310
3483
|
return /* @__PURE__ */ b(M.Root, { ...e });
|
|
3311
3484
|
}
|
|
3312
|
-
function
|
|
3485
|
+
function On(e) {
|
|
3313
3486
|
return /* @__PURE__ */ b(M.Trigger, { ...e });
|
|
3314
3487
|
}
|
|
3315
|
-
function
|
|
3488
|
+
function kn(e) {
|
|
3316
3489
|
return /* @__PURE__ */ b(M.Close, { ...e });
|
|
3317
3490
|
}
|
|
3318
|
-
function
|
|
3491
|
+
function An({ className: e, ...t }) {
|
|
3319
3492
|
return /* @__PURE__ */ b(M.Title, {
|
|
3320
3493
|
...t,
|
|
3321
|
-
...
|
|
3494
|
+
...G("popover-title", {}, e)
|
|
3322
3495
|
});
|
|
3323
3496
|
}
|
|
3324
|
-
function
|
|
3497
|
+
function jn({ className: e, ...t }) {
|
|
3325
3498
|
return /* @__PURE__ */ b(M.Description, {
|
|
3326
3499
|
...t,
|
|
3327
|
-
...
|
|
3500
|
+
...G("popover-description", {}, e)
|
|
3328
3501
|
});
|
|
3329
3502
|
}
|
|
3330
|
-
function
|
|
3503
|
+
function Mn({ className: e, ...t }) {
|
|
3331
3504
|
return /* @__PURE__ */ b("div", {
|
|
3332
3505
|
...t,
|
|
3333
|
-
...
|
|
3506
|
+
...G("popover-header", {}, e)
|
|
3334
3507
|
});
|
|
3335
3508
|
}
|
|
3336
|
-
function
|
|
3509
|
+
function Nn({ className: e, ...t }) {
|
|
3337
3510
|
return /* @__PURE__ */ b("div", {
|
|
3338
3511
|
...t,
|
|
3339
|
-
...
|
|
3512
|
+
...G("popover-body", {}, e)
|
|
3340
3513
|
});
|
|
3341
3514
|
}
|
|
3342
|
-
function
|
|
3515
|
+
function Pn({ className: e, ...t }) {
|
|
3343
3516
|
return /* @__PURE__ */ b("div", {
|
|
3344
3517
|
...t,
|
|
3345
|
-
...
|
|
3518
|
+
...G("popover-footer", {}, e)
|
|
3346
3519
|
});
|
|
3347
3520
|
}
|
|
3348
|
-
function
|
|
3521
|
+
function Fn({ title: e, description: t, container: n, side: r = "bottom", align: i = "start", sideOffset: a = 6, positionerProps: o, classNames: s, className: c, children: l, ...u }) {
|
|
3349
3522
|
let d = e != null && e !== "", f = t != null && t !== "";
|
|
3350
3523
|
return /* @__PURE__ */ b(M.Portal, {
|
|
3351
3524
|
container: n,
|
|
@@ -3357,30 +3530,30 @@ function wn({ title: e, description: t, container: n, side: r = "bottom", align:
|
|
|
3357
3530
|
className: v("kb-popover-positioner", s?.positioner),
|
|
3358
3531
|
children: /* @__PURE__ */ x(M.Popup, {
|
|
3359
3532
|
...u,
|
|
3360
|
-
...
|
|
3361
|
-
children: [d || f ? /* @__PURE__ */ x(
|
|
3533
|
+
...G("popover", {}, c),
|
|
3534
|
+
children: [d || f ? /* @__PURE__ */ x(Mn, { children: [d ? /* @__PURE__ */ b(An, { children: e }) : null, f ? /* @__PURE__ */ b(jn, { children: t }) : null] }) : null, l]
|
|
3362
3535
|
})
|
|
3363
3536
|
})
|
|
3364
3537
|
});
|
|
3365
3538
|
}
|
|
3366
|
-
var
|
|
3367
|
-
Trigger:
|
|
3368
|
-
Content:
|
|
3369
|
-
Title:
|
|
3370
|
-
Description:
|
|
3371
|
-
Close:
|
|
3372
|
-
Header:
|
|
3373
|
-
Body:
|
|
3374
|
-
Footer:
|
|
3539
|
+
var In = Object.assign(Dn, {
|
|
3540
|
+
Trigger: On,
|
|
3541
|
+
Content: Fn,
|
|
3542
|
+
Title: An,
|
|
3543
|
+
Description: jn,
|
|
3544
|
+
Close: kn,
|
|
3545
|
+
Header: Mn,
|
|
3546
|
+
Body: Nn,
|
|
3547
|
+
Footer: Pn
|
|
3375
3548
|
});
|
|
3376
3549
|
//#endregion
|
|
3377
3550
|
//#region src/components/Progress/Progress.tsx
|
|
3378
|
-
function
|
|
3551
|
+
function Ln({ classNames: e, label: t, value: n, valueText: r, className: i, ...a }) {
|
|
3379
3552
|
return /* @__PURE__ */ x(N.Root, {
|
|
3380
3553
|
...a,
|
|
3381
3554
|
value: n,
|
|
3382
3555
|
...r ? { getAriaValueText: () => r } : {},
|
|
3383
|
-
...
|
|
3556
|
+
...G("progress", {}, i),
|
|
3384
3557
|
children: [/* @__PURE__ */ x("div", {
|
|
3385
3558
|
className: v("kb-progress-head", e?.head),
|
|
3386
3559
|
children: [/* @__PURE__ */ b(N.Label, {
|
|
@@ -3398,8 +3571,8 @@ function En({ classNames: e, label: t, value: n, valueText: r, className: i, ...
|
|
|
3398
3571
|
}
|
|
3399
3572
|
//#endregion
|
|
3400
3573
|
//#region src/components/RadioGroup/RadioGroup.tsx
|
|
3401
|
-
var
|
|
3402
|
-
function
|
|
3574
|
+
var Rn = a(null);
|
|
3575
|
+
function zn({ segmented: e, className: t, children: n }) {
|
|
3403
3576
|
let r = g(null), [i, a] = _(null);
|
|
3404
3577
|
return m(() => {
|
|
3405
3578
|
let t = r.current;
|
|
@@ -3445,8 +3618,8 @@ function On({ segmented: e, className: t, children: n }) {
|
|
|
3445
3618
|
}), n]
|
|
3446
3619
|
});
|
|
3447
3620
|
}
|
|
3448
|
-
function
|
|
3449
|
-
let i = u(
|
|
3621
|
+
function Bn({ checked: e, disabled: t, customTabIndex: n, ...r }) {
|
|
3622
|
+
let i = u(Rn), a = i?.update, o = i?.remove, s = f(), c = !t && (n === void 0 || n >= 0);
|
|
3450
3623
|
m(() => () => {
|
|
3451
3624
|
o?.(s);
|
|
3452
3625
|
}, [o, s]), m(() => {
|
|
@@ -3471,8 +3644,8 @@ function kn({ checked: e, disabled: t, customTabIndex: n, ...r }) {
|
|
|
3471
3644
|
}
|
|
3472
3645
|
});
|
|
3473
3646
|
}
|
|
3474
|
-
function
|
|
3475
|
-
let T = f(), { invalid: E, ariaInvalid: D } =
|
|
3647
|
+
function Vn({ classNames: e, label: t, value: n, onValueChange: r, disabled: i = !1, appearance: a = "standard", selectionMotion: o = "slide", selectionTone: s = "primary", name: c, description: u, error: d, visuallyHidden: p, className: m, children: h, onFocusCapture: y, onBlurCapture: S, "aria-invalid": C, ...w }) {
|
|
3648
|
+
let T = f(), { invalid: E, ariaInvalid: D } = K(!!d, C), O = g(null), [k, A] = _(!1), j = l((e) => {
|
|
3476
3649
|
O.current = e;
|
|
3477
3650
|
}, []), [M, N] = _(() => /* @__PURE__ */ new Map()), P = l((e, t) => {
|
|
3478
3651
|
N((n) => {
|
|
@@ -3490,7 +3663,7 @@ function An({ classNames: e, label: t, value: n, onValueChange: r, disabled: i =
|
|
|
3490
3663
|
d ? `${T}-error` : null,
|
|
3491
3664
|
w["aria-describedby"]
|
|
3492
3665
|
].filter(Boolean).join(" ") || void 0;
|
|
3493
|
-
return /* @__PURE__ */ b(
|
|
3666
|
+
return /* @__PURE__ */ b(Rn.Provider, {
|
|
3494
3667
|
value: {
|
|
3495
3668
|
target: R,
|
|
3496
3669
|
update: P,
|
|
@@ -3512,7 +3685,7 @@ function An({ classNames: e, label: t, value: n, onValueChange: r, disabled: i =
|
|
|
3512
3685
|
},
|
|
3513
3686
|
disabled: i,
|
|
3514
3687
|
...c ? { name: c } : {},
|
|
3515
|
-
...
|
|
3688
|
+
...G("radiogroup", {
|
|
3516
3689
|
invalid: E,
|
|
3517
3690
|
disabled: i,
|
|
3518
3691
|
appearance: a,
|
|
@@ -3528,7 +3701,7 @@ function An({ classNames: e, label: t, value: n, onValueChange: r, disabled: i =
|
|
|
3528
3701
|
id: `${T}-label`,
|
|
3529
3702
|
children: t
|
|
3530
3703
|
}),
|
|
3531
|
-
/* @__PURE__ */ b(
|
|
3704
|
+
/* @__PURE__ */ b(zn, {
|
|
3532
3705
|
segmented: a === "segmented",
|
|
3533
3706
|
className: e?.options,
|
|
3534
3707
|
children: h
|
|
@@ -3547,13 +3720,13 @@ function An({ classNames: e, label: t, value: n, onValueChange: r, disabled: i =
|
|
|
3547
3720
|
})
|
|
3548
3721
|
});
|
|
3549
3722
|
}
|
|
3550
|
-
function
|
|
3723
|
+
function Hn({ classNames: e, className: t, children: n, controlClassName: r, ...i }) {
|
|
3551
3724
|
return /* @__PURE__ */ x("label", {
|
|
3552
3725
|
className: v("kb-radiogroup-item", e?.item, t),
|
|
3553
3726
|
children: [/* @__PURE__ */ b(P.Root, {
|
|
3554
3727
|
...i,
|
|
3555
3728
|
className: v("kb-radiogroup-control", e?.control, r),
|
|
3556
|
-
render: (e, t) => /* @__PURE__ */ b(
|
|
3729
|
+
render: (e, t) => /* @__PURE__ */ b(Bn, {
|
|
3557
3730
|
...e,
|
|
3558
3731
|
checked: t.checked,
|
|
3559
3732
|
disabled: t.disabled,
|
|
@@ -3566,10 +3739,10 @@ function jn({ classNames: e, className: t, children: n, controlClassName: r, ...
|
|
|
3566
3739
|
})]
|
|
3567
3740
|
});
|
|
3568
3741
|
}
|
|
3569
|
-
var
|
|
3742
|
+
var Un = Object.assign(Vn, { Item: Hn });
|
|
3570
3743
|
//#endregion
|
|
3571
3744
|
//#region src/components/ScrollArea/ScrollArea.tsx
|
|
3572
|
-
function
|
|
3745
|
+
function Wn({ classNames: e, label: t, maxHeight: n, className: r, style: i, children: a, ...o }) {
|
|
3573
3746
|
let s = n ? { "--_scrollarea-max-height": n } : {};
|
|
3574
3747
|
return /* @__PURE__ */ x(I.Root, {
|
|
3575
3748
|
...o,
|
|
@@ -3577,7 +3750,7 @@ function Nn({ classNames: e, label: t, maxHeight: n, className: r, style: i, chi
|
|
|
3577
3750
|
...s,
|
|
3578
3751
|
...typeof i == "object" ? i : {}
|
|
3579
3752
|
},
|
|
3580
|
-
...
|
|
3753
|
+
...G("scrollarea", {}, r),
|
|
3581
3754
|
children: [/* @__PURE__ */ b(I.Viewport, {
|
|
3582
3755
|
className: v("kb-scrollarea-viewport", e?.viewport),
|
|
3583
3756
|
tabIndex: 0,
|
|
@@ -3593,10 +3766,10 @@ function Nn({ classNames: e, label: t, maxHeight: n, className: r, style: i, chi
|
|
|
3593
3766
|
}
|
|
3594
3767
|
//#endregion
|
|
3595
3768
|
//#region src/components/Separator/Separator.tsx
|
|
3596
|
-
function
|
|
3769
|
+
function Gn({ orientation: e = "horizontal", decorative: t = !1, className: n, ...r }) {
|
|
3597
3770
|
return /* @__PURE__ */ b("hr", {
|
|
3598
3771
|
...r,
|
|
3599
|
-
...
|
|
3772
|
+
...G("separator", { orientation: e }, n),
|
|
3600
3773
|
role: t ? "none" : void 0,
|
|
3601
3774
|
"aria-hidden": t ? !0 : void 0,
|
|
3602
3775
|
"aria-orientation": t ? void 0 : e
|
|
@@ -3604,10 +3777,10 @@ function Pn({ orientation: e = "horizontal", decorative: t = !1, className: n, .
|
|
|
3604
3777
|
}
|
|
3605
3778
|
//#endregion
|
|
3606
3779
|
//#region src/components/Settings/Settings.tsx
|
|
3607
|
-
var
|
|
3780
|
+
var Kn = ({ ref: e, header: t, className: n, classNames: r, children: i, ...a }) => /* @__PURE__ */ x("div", {
|
|
3608
3781
|
...a,
|
|
3609
3782
|
ref: e,
|
|
3610
|
-
...
|
|
3783
|
+
...G("settings", {}, n),
|
|
3611
3784
|
children: [t ? /* @__PURE__ */ b("div", {
|
|
3612
3785
|
className: v("kb-settings-header", r?.header),
|
|
3613
3786
|
children: t
|
|
@@ -3618,11 +3791,11 @@ var Fn = ({ ref: e, header: t, className: n, classNames: r, children: i, ...a })
|
|
|
3618
3791
|
});
|
|
3619
3792
|
//#endregion
|
|
3620
3793
|
//#region src/components/Skeleton/Skeleton.tsx
|
|
3621
|
-
function
|
|
3794
|
+
function qn(e) {
|
|
3622
3795
|
if (e !== void 0) return typeof e == "number" ? `${e}px` : e;
|
|
3623
3796
|
}
|
|
3624
|
-
var
|
|
3625
|
-
let g = e === "auto" && p != null && typeof p != "boolean", _ = e === "auto" && !g ? "text" : e, y = o && !g, S = o && g, C = _ === "text" ? Math.max(1, Math.trunc(n)) : 1, w =
|
|
3797
|
+
var Jn = s(function({ variant: e = "text", size: t = "md", lines: n = 1, animated: r = !0, animation: i = "shimmer", tone: a = "default", loading: o = !0, label: s = "Loading", width: c, height: l, style: u, className: d, classNames: f, children: p, ...m }, h) {
|
|
3798
|
+
let g = e === "auto" && p != null && typeof p != "boolean", _ = e === "auto" && !g ? "text" : e, y = o && !g, S = o && g, C = _ === "text" ? Math.max(1, Math.trunc(n)) : 1, w = qn(c), T = qn(l), E = r && i !== "none", D = w === void 0 ? u : {
|
|
3626
3799
|
...u,
|
|
3627
3800
|
inlineSize: w
|
|
3628
3801
|
}, O = T === void 0 ? void 0 : { blockSize: T }, k = Array.from({ length: C }, (e, t) => t);
|
|
@@ -3632,7 +3805,7 @@ var Ln = s(function({ variant: e = "text", size: t = "md", lines: n = 1, animate
|
|
|
3632
3805
|
"aria-busy": S ? "true" : void 0,
|
|
3633
3806
|
style: D,
|
|
3634
3807
|
...m,
|
|
3635
|
-
...
|
|
3808
|
+
...G("skeleton", {
|
|
3636
3809
|
variant: _,
|
|
3637
3810
|
size: t,
|
|
3638
3811
|
tone: a,
|
|
@@ -3654,103 +3827,14 @@ var Ln = s(function({ variant: e = "text", size: t = "md", lines: n = 1, animate
|
|
|
3654
3827
|
children: s
|
|
3655
3828
|
}) : null]
|
|
3656
3829
|
});
|
|
3657
|
-
}), Rn = [
|
|
3658
|
-
5,
|
|
3659
|
-
12,
|
|
3660
|
-
19
|
|
3661
|
-
], zn = [
|
|
3662
|
-
3.5,
|
|
3663
|
-
8.25,
|
|
3664
|
-
13,
|
|
3665
|
-
17.75
|
|
3666
|
-
], Bn = s(function({ label: e = "Loading", showLabel: t = !1, decorative: n = !1, size: r = "md", tone: i = "accent", variant: a = "ring", appearance: o = "plain", className: s, classNames: c, ...l }, u) {
|
|
3667
|
-
return /* @__PURE__ */ x("span", {
|
|
3668
|
-
ref: u,
|
|
3669
|
-
role: n ? void 0 : "status",
|
|
3670
|
-
"aria-live": n ? void 0 : "polite",
|
|
3671
|
-
"aria-hidden": n ? "true" : void 0,
|
|
3672
|
-
...l,
|
|
3673
|
-
...H("spinner", {
|
|
3674
|
-
size: r,
|
|
3675
|
-
tone: i,
|
|
3676
|
-
variant: a,
|
|
3677
|
-
appearance: o,
|
|
3678
|
-
"show-label": t
|
|
3679
|
-
}, c?.root ?? s),
|
|
3680
|
-
children: [/* @__PURE__ */ x("svg", {
|
|
3681
|
-
viewBox: "0 0 24 24",
|
|
3682
|
-
"aria-hidden": "true",
|
|
3683
|
-
focusable: "false",
|
|
3684
|
-
className: v("kb-spinner-icon", c?.icon),
|
|
3685
|
-
children: [
|
|
3686
|
-
a === "ring" && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("circle", {
|
|
3687
|
-
cx: "12",
|
|
3688
|
-
cy: "12",
|
|
3689
|
-
r: "9.5",
|
|
3690
|
-
className: v("kb-spinner-track", c?.track)
|
|
3691
|
-
}), /* @__PURE__ */ b("path", {
|
|
3692
|
-
d: "M12 2.5a9.5 9.5 0 1 1 0 19a9.5 9.5 0 1 1 0 -19",
|
|
3693
|
-
pathLength: 100,
|
|
3694
|
-
className: v("kb-spinner-arc", c?.arc)
|
|
3695
|
-
})] }),
|
|
3696
|
-
a === "orbit" && /* @__PURE__ */ x(y, { children: [
|
|
3697
|
-
/* @__PURE__ */ b("circle", {
|
|
3698
|
-
cx: "12",
|
|
3699
|
-
cy: "12",
|
|
3700
|
-
r: "9.5",
|
|
3701
|
-
className: v("kb-spinner-track", c?.track)
|
|
3702
|
-
}),
|
|
3703
|
-
/* @__PURE__ */ b("circle", {
|
|
3704
|
-
cx: "12",
|
|
3705
|
-
cy: "12",
|
|
3706
|
-
r: "5.5",
|
|
3707
|
-
className: v("kb-spinner-track", c?.track)
|
|
3708
|
-
}),
|
|
3709
|
-
/* @__PURE__ */ b("path", {
|
|
3710
|
-
d: "M12 2.5a9.5 9.5 0 1 1 0 19a9.5 9.5 0 1 1 0 -19",
|
|
3711
|
-
pathLength: 100,
|
|
3712
|
-
className: v("kb-spinner-arc", c?.arc)
|
|
3713
|
-
}),
|
|
3714
|
-
/* @__PURE__ */ b("path", {
|
|
3715
|
-
d: "M12 17.5a5.5 5.5 0 1 1 0 -11a5.5 5.5 0 1 1 0 11",
|
|
3716
|
-
pathLength: 100,
|
|
3717
|
-
className: v("kb-spinner-arc", c?.arc)
|
|
3718
|
-
}),
|
|
3719
|
-
/* @__PURE__ */ b("circle", {
|
|
3720
|
-
cx: "12",
|
|
3721
|
-
cy: "12",
|
|
3722
|
-
r: "1.75",
|
|
3723
|
-
className: v("kb-spinner-core", c?.core)
|
|
3724
|
-
})
|
|
3725
|
-
] }),
|
|
3726
|
-
a === "dots" && Rn.map((e) => /* @__PURE__ */ b("circle", {
|
|
3727
|
-
cx: e,
|
|
3728
|
-
cy: "12",
|
|
3729
|
-
r: "2.25",
|
|
3730
|
-
className: v("kb-spinner-dot", c?.dot)
|
|
3731
|
-
}, e)),
|
|
3732
|
-
a === "bars" && zn.map((e) => /* @__PURE__ */ b("rect", {
|
|
3733
|
-
x: e,
|
|
3734
|
-
y: "5",
|
|
3735
|
-
width: "2.5",
|
|
3736
|
-
height: "14",
|
|
3737
|
-
rx: "1.25",
|
|
3738
|
-
className: v("kb-spinner-bar", c?.bar)
|
|
3739
|
-
}, e))
|
|
3740
|
-
]
|
|
3741
|
-
}), !n && /* @__PURE__ */ b("span", {
|
|
3742
|
-
className: v("kb-spinner-label", !t && "kb-sr-only", c?.label),
|
|
3743
|
-
children: e
|
|
3744
|
-
})]
|
|
3745
|
-
});
|
|
3746
3830
|
});
|
|
3747
3831
|
//#endregion
|
|
3748
3832
|
//#region src/components/Split/Split.tsx
|
|
3749
|
-
function
|
|
3833
|
+
function Yn({ as: e, ratio: t = "equal", collapse: r = "md", gap: i = "md", align: a = "stretch", className: s, classNames: c, children: l, ...u }) {
|
|
3750
3834
|
let d = v("kb-split-track", c?.track);
|
|
3751
3835
|
return o(e ?? "div", {
|
|
3752
3836
|
...u,
|
|
3753
|
-
...
|
|
3837
|
+
...G("split", {
|
|
3754
3838
|
ratio: t,
|
|
3755
3839
|
collapse: r,
|
|
3756
3840
|
gap: i,
|
|
@@ -3763,10 +3847,10 @@ function Vn({ as: e, ratio: t = "equal", collapse: r = "md", gap: i = "md", alig
|
|
|
3763
3847
|
}
|
|
3764
3848
|
//#endregion
|
|
3765
3849
|
//#region src/components/Stack/Stack.tsx
|
|
3766
|
-
function
|
|
3850
|
+
function Xn({ as: e, gap: t = "md", align: n = "stretch", justify: r = "start", className: i, ...a }) {
|
|
3767
3851
|
return o(e ?? "div", {
|
|
3768
3852
|
...a,
|
|
3769
|
-
...
|
|
3853
|
+
...G("stack", {
|
|
3770
3854
|
gap: t,
|
|
3771
3855
|
align: n,
|
|
3772
3856
|
justify: r
|
|
@@ -3775,10 +3859,10 @@ function Hn({ as: e, gap: t = "md", align: n = "stretch", justify: r = "start",
|
|
|
3775
3859
|
}
|
|
3776
3860
|
//#endregion
|
|
3777
3861
|
//#region src/components/Stat/Stat.tsx
|
|
3778
|
-
function
|
|
3862
|
+
function Zn({ classNames: e, label: t, value: n, size: r = "md", className: i, ...a }) {
|
|
3779
3863
|
return /* @__PURE__ */ x("div", {
|
|
3780
3864
|
...a,
|
|
3781
|
-
...
|
|
3865
|
+
...G("stat", { size: r }, i),
|
|
3782
3866
|
children: [/* @__PURE__ */ b("span", {
|
|
3783
3867
|
className: v("kb-stat-label", e?.label),
|
|
3784
3868
|
children: t
|
|
@@ -3790,25 +3874,25 @@ function Un({ classNames: e, label: t, value: n, size: r = "md", className: i, .
|
|
|
3790
3874
|
}
|
|
3791
3875
|
//#endregion
|
|
3792
3876
|
//#region src/components/StatsRow/StatsRow.tsx
|
|
3793
|
-
function
|
|
3877
|
+
function Qn({ appearance: e = "plain", className: t, ...n }) {
|
|
3794
3878
|
return /* @__PURE__ */ b("ul", {
|
|
3795
3879
|
role: "list",
|
|
3796
3880
|
...n,
|
|
3797
|
-
...
|
|
3881
|
+
...G("statsrow", { appearance: e }, t)
|
|
3798
3882
|
});
|
|
3799
3883
|
}
|
|
3800
|
-
var
|
|
3884
|
+
var $n = {
|
|
3801
3885
|
up: "M8 3.5 13 10H3z",
|
|
3802
3886
|
down: "M8 12.5 3 6h10z",
|
|
3803
3887
|
flat: "M3 7h10v2H3z"
|
|
3804
3888
|
};
|
|
3805
|
-
function
|
|
3889
|
+
function er({ label: e, value: t, change: n, trend: r, tone: i = "neutral", context: a, link: o, className: s, classNames: c, ...l }) {
|
|
3806
3890
|
let u = n != null || a != null;
|
|
3807
3891
|
return /* @__PURE__ */ x("li", {
|
|
3808
3892
|
...l,
|
|
3809
|
-
...
|
|
3893
|
+
...G("statsrow-item", {}, s),
|
|
3810
3894
|
children: [
|
|
3811
|
-
/* @__PURE__ */ b(
|
|
3895
|
+
/* @__PURE__ */ b(Zn, {
|
|
3812
3896
|
label: e,
|
|
3813
3897
|
value: t,
|
|
3814
3898
|
className: c?.stat,
|
|
@@ -3827,7 +3911,7 @@ function Kn({ label: e, value: t, change: n, trend: r, tone: i = "neutral", cont
|
|
|
3827
3911
|
"aria-hidden": "true",
|
|
3828
3912
|
focusable: "false",
|
|
3829
3913
|
children: /* @__PURE__ */ b("path", {
|
|
3830
|
-
d:
|
|
3914
|
+
d: $n[r],
|
|
3831
3915
|
fill: "currentColor"
|
|
3832
3916
|
})
|
|
3833
3917
|
}), n]
|
|
@@ -3846,14 +3930,14 @@ function Kn({ label: e, value: t, change: n, trend: r, tone: i = "neutral", cont
|
|
|
3846
3930
|
]
|
|
3847
3931
|
});
|
|
3848
3932
|
}
|
|
3849
|
-
var
|
|
3933
|
+
var tr = Object.assign(Qn, { Item: er });
|
|
3850
3934
|
//#endregion
|
|
3851
3935
|
//#region src/components/Status/Status.tsx
|
|
3852
|
-
function
|
|
3936
|
+
function nr({ classNames: e, tone: t = "neutral", appearance: n = "plain", icon: r, live: i = !1, compact: a = !1, className: o, children: s, ...c }) {
|
|
3853
3937
|
return /* @__PURE__ */ x("span", {
|
|
3854
3938
|
...c,
|
|
3855
3939
|
...i ? { role: "status" } : {},
|
|
3856
|
-
...
|
|
3940
|
+
...G("status", {
|
|
3857
3941
|
tone: t,
|
|
3858
3942
|
appearance: n,
|
|
3859
3943
|
compact: a
|
|
@@ -3870,10 +3954,10 @@ function Jn({ classNames: e, tone: t = "neutral", appearance: n = "plain", icon:
|
|
|
3870
3954
|
}
|
|
3871
3955
|
//#endregion
|
|
3872
3956
|
//#region src/components/SupportingPane/SupportingPane.tsx
|
|
3873
|
-
var
|
|
3957
|
+
var rr = ({ ref: e, aside: t, asideLabel: n, asideLabelledBy: r, className: i, classNames: a, children: o, ...s }) => /* @__PURE__ */ x("div", {
|
|
3874
3958
|
...s,
|
|
3875
3959
|
ref: e,
|
|
3876
|
-
...
|
|
3960
|
+
...G("supportingpane", {}, i),
|
|
3877
3961
|
children: [/* @__PURE__ */ b("div", {
|
|
3878
3962
|
className: v("kb-supportingpane-main", a?.main),
|
|
3879
3963
|
children: o
|
|
@@ -3886,19 +3970,19 @@ var Yn = ({ ref: e, aside: t, asideLabel: n, asideLabelledBy: r, className: i, c
|
|
|
3886
3970
|
});
|
|
3887
3971
|
//#endregion
|
|
3888
3972
|
//#region src/components/Switch/Switch.tsx
|
|
3889
|
-
function
|
|
3973
|
+
function ir({ classNames: e, label: t, checked: n, onCheckedChange: r, size: i, tone: a, offTone: o, onTone: s, offColor: c, onColor: l, description: u, error: d, visuallyHidden: p, offIcon: m, onIcon: h, controlClassName: g, className: _, style: y, id: S, disabled: C, readOnly: w, "aria-describedby": T, "aria-invalid": E, ...D }) {
|
|
3890
3974
|
let O = {
|
|
3891
3975
|
...Object.fromEntries(Object.entries(y ?? {}).filter(([e]) => e.startsWith("--"))),
|
|
3892
3976
|
...c ? { "--kb-switch-off-color": c } : {},
|
|
3893
3977
|
...l ? { "--kb-switch-on-color": l } : {}
|
|
3894
|
-
}, k = c ? "custom" : o, A = l ? "custom" : s ?? a ?? "accent", j = f(), M = S ?? `kb-switch-${j}`, { invalid: N, ariaInvalid: P } =
|
|
3978
|
+
}, k = c ? "custom" : o, A = l ? "custom" : s ?? a ?? "accent", j = f(), M = S ?? `kb-switch-${j}`, { invalid: N, ariaInvalid: P } = K(!!d, E), F = `${M}-description`, I = `${M}-error`, L = [
|
|
3895
3979
|
T,
|
|
3896
3980
|
u && F,
|
|
3897
3981
|
d && I
|
|
3898
3982
|
].filter(Boolean).join(" ") || void 0;
|
|
3899
3983
|
return /* @__PURE__ */ x("div", {
|
|
3900
3984
|
style: O,
|
|
3901
|
-
...
|
|
3985
|
+
...G("switch", {
|
|
3902
3986
|
size: i,
|
|
3903
3987
|
"off-tone": k,
|
|
3904
3988
|
"on-tone": A,
|
|
@@ -3965,17 +4049,17 @@ function Xn({ classNames: e, label: t, checked: n, onCheckedChange: r, size: i,
|
|
|
3965
4049
|
}
|
|
3966
4050
|
//#endregion
|
|
3967
4051
|
//#region src/components/Table/Table.tsx
|
|
3968
|
-
function
|
|
4052
|
+
function ar({ density: e = "comfortable", stickyHeader: t = !1, layout: n = "auto", className: r, ...i }) {
|
|
3969
4053
|
return /* @__PURE__ */ b("table", {
|
|
3970
4054
|
...i,
|
|
3971
|
-
...
|
|
4055
|
+
...G("table", {
|
|
3972
4056
|
density: e,
|
|
3973
4057
|
"sticky-header": t,
|
|
3974
4058
|
layout: n
|
|
3975
4059
|
}, r)
|
|
3976
4060
|
});
|
|
3977
4061
|
}
|
|
3978
|
-
function
|
|
4062
|
+
function or(e, t) {
|
|
3979
4063
|
let n = [...e.querySelectorAll(".kb-table")].find((n) => n.contains(t) && n.closest(".kb-table-scroll") === e);
|
|
3980
4064
|
if (!n) return;
|
|
3981
4065
|
let r = e.getBoundingClientRect(), i = r.left + e.clientLeft, a = r.top + e.clientTop, o;
|
|
@@ -3993,58 +4077,58 @@ function Qn(e, t) {
|
|
|
3993
4077
|
let u = n.tHead, d = u && n.hasAttribute("data-sticky-header") && !u.contains(t) ? Math.max(a, u.getBoundingClientRect().bottom) : a, f = a + e.clientHeight, p = t.getBoundingClientRect();
|
|
3994
4078
|
c > s && (p.left < s ? e.scrollLeft += Math.floor(p.left - s) : p.right > c && (e.scrollLeft += Math.ceil(p.right - c))), f > d && (p.top < d ? e.scrollTop += Math.floor(p.top - d) : p.bottom > f && (e.scrollTop += Math.ceil(p.bottom - f)));
|
|
3995
4079
|
}
|
|
3996
|
-
function
|
|
4080
|
+
function sr({ label: e, maxHeight: t, onFocus: n, className: r, style: i, ...a }) {
|
|
3997
4081
|
return /* @__PURE__ */ b("section", {
|
|
3998
4082
|
...a,
|
|
3999
4083
|
"aria-label": e,
|
|
4000
4084
|
tabIndex: a.tabIndex ?? 0,
|
|
4001
|
-
...
|
|
4085
|
+
...G("table-scroll", {}, r),
|
|
4002
4086
|
style: {
|
|
4003
4087
|
maxHeight: t,
|
|
4004
4088
|
...i
|
|
4005
4089
|
},
|
|
4006
4090
|
onFocus: (e) => {
|
|
4007
|
-
n?.(e), !e.defaultPrevented && e.target instanceof HTMLElement &&
|
|
4091
|
+
n?.(e), !e.defaultPrevented && e.target instanceof HTMLElement && or(e.currentTarget, e.target);
|
|
4008
4092
|
}
|
|
4009
4093
|
});
|
|
4010
4094
|
}
|
|
4011
|
-
function
|
|
4095
|
+
function cr({ className: e, ...t }) {
|
|
4012
4096
|
return /* @__PURE__ */ b("caption", {
|
|
4013
4097
|
...t,
|
|
4014
|
-
...
|
|
4098
|
+
...G("table-caption", {}, e)
|
|
4015
4099
|
});
|
|
4016
4100
|
}
|
|
4017
|
-
function
|
|
4101
|
+
function lr({ className: e, ...t }) {
|
|
4018
4102
|
return /* @__PURE__ */ b("thead", {
|
|
4019
4103
|
...t,
|
|
4020
|
-
...
|
|
4104
|
+
...G("table-head", {}, e)
|
|
4021
4105
|
});
|
|
4022
4106
|
}
|
|
4023
|
-
function
|
|
4107
|
+
function ur({ className: e, ...t }) {
|
|
4024
4108
|
return /* @__PURE__ */ b("tbody", {
|
|
4025
4109
|
...t,
|
|
4026
|
-
...
|
|
4110
|
+
...G("table-body", {}, e)
|
|
4027
4111
|
});
|
|
4028
4112
|
}
|
|
4029
|
-
function
|
|
4113
|
+
function dr({ className: e, ...t }) {
|
|
4030
4114
|
return /* @__PURE__ */ b("tfoot", {
|
|
4031
4115
|
...t,
|
|
4032
|
-
...
|
|
4116
|
+
...G("table-foot", {}, e)
|
|
4033
4117
|
});
|
|
4034
4118
|
}
|
|
4035
|
-
function
|
|
4119
|
+
function fr({ selected: e = !1, className: t, ...n }) {
|
|
4036
4120
|
return /* @__PURE__ */ b("tr", {
|
|
4037
4121
|
...n,
|
|
4038
|
-
...
|
|
4122
|
+
...G("table-row", { selected: e }, t)
|
|
4039
4123
|
});
|
|
4040
4124
|
}
|
|
4041
|
-
function
|
|
4125
|
+
function pr({ align: e = "start", sticky: t, sortDirection: n, onSortChange: r, sortDisabled: i, className: a, classNames: o, children: s, scope: c = "col", "aria-sort": l, ...u }) {
|
|
4042
4126
|
let d = n ?? (l === "ascending" || l === "descending" ? l : "none");
|
|
4043
4127
|
return /* @__PURE__ */ b("th", {
|
|
4044
4128
|
...u,
|
|
4045
4129
|
scope: c,
|
|
4046
4130
|
"aria-sort": n === "none" ? void 0 : n ?? l,
|
|
4047
|
-
...
|
|
4131
|
+
...G("table-columnheader", {
|
|
4048
4132
|
align: e,
|
|
4049
4133
|
sticky: t,
|
|
4050
4134
|
sortable: !!r
|
|
@@ -4052,59 +4136,59 @@ function ar({ align: e = "start", sticky: t, sortDirection: n, onSortChange: r,
|
|
|
4052
4136
|
children: r ? /* @__PURE__ */ x("button", {
|
|
4053
4137
|
type: "button",
|
|
4054
4138
|
disabled: i,
|
|
4055
|
-
...
|
|
4139
|
+
...G("table-sort-button", {}, o?.sortButton),
|
|
4056
4140
|
onClick: () => r(d === "ascending" ? "descending" : "ascending"),
|
|
4057
4141
|
children: [s, /* @__PURE__ */ b("span", {
|
|
4058
4142
|
"aria-hidden": "true",
|
|
4059
|
-
...
|
|
4143
|
+
...G("table-sort-icon", {}, o?.sortIcon),
|
|
4060
4144
|
children: d === "ascending" ? "↑" : d === "descending" ? "↓" : "⇅"
|
|
4061
4145
|
})]
|
|
4062
4146
|
}) : s
|
|
4063
4147
|
});
|
|
4064
4148
|
}
|
|
4065
|
-
function
|
|
4149
|
+
function mr({ align: e = "start", sticky: t, scope: n = "row", className: r, ...i }) {
|
|
4066
4150
|
return /* @__PURE__ */ b("th", {
|
|
4067
4151
|
...i,
|
|
4068
4152
|
scope: n,
|
|
4069
|
-
...
|
|
4153
|
+
...G("table-rowheader", {
|
|
4070
4154
|
align: e,
|
|
4071
4155
|
sticky: t
|
|
4072
4156
|
}, r)
|
|
4073
4157
|
});
|
|
4074
4158
|
}
|
|
4075
|
-
function
|
|
4159
|
+
function hr({ align: e = "start", sticky: t, className: n, ...r }) {
|
|
4076
4160
|
return /* @__PURE__ */ b("td", {
|
|
4077
4161
|
...r,
|
|
4078
|
-
...
|
|
4162
|
+
...G("table-cell", {
|
|
4079
4163
|
align: e,
|
|
4080
4164
|
sticky: t
|
|
4081
4165
|
}, n)
|
|
4082
4166
|
});
|
|
4083
4167
|
}
|
|
4084
|
-
function
|
|
4168
|
+
function gr({ className: e, ...t }) {
|
|
4085
4169
|
return /* @__PURE__ */ b("div", {
|
|
4086
4170
|
...t,
|
|
4087
|
-
...
|
|
4088
|
-
});
|
|
4089
|
-
}
|
|
4090
|
-
var
|
|
4091
|
-
ScrollContainer:
|
|
4092
|
-
Caption:
|
|
4093
|
-
Head:
|
|
4094
|
-
Body:
|
|
4095
|
-
Foot:
|
|
4096
|
-
Row:
|
|
4097
|
-
ColumnHeader:
|
|
4098
|
-
RowHeader:
|
|
4099
|
-
Cell:
|
|
4100
|
-
SelectionCheckbox:
|
|
4101
|
-
RowActions:
|
|
4102
|
-
}),
|
|
4171
|
+
...G("table-rowactions", {}, e)
|
|
4172
|
+
});
|
|
4173
|
+
}
|
|
4174
|
+
var _r = Object.assign(ar, {
|
|
4175
|
+
ScrollContainer: sr,
|
|
4176
|
+
Caption: cr,
|
|
4177
|
+
Head: lr,
|
|
4178
|
+
Body: ur,
|
|
4179
|
+
Foot: dr,
|
|
4180
|
+
Row: fr,
|
|
4181
|
+
ColumnHeader: pr,
|
|
4182
|
+
RowHeader: mr,
|
|
4183
|
+
Cell: hr,
|
|
4184
|
+
SelectionCheckbox: he,
|
|
4185
|
+
RowActions: gr
|
|
4186
|
+
}), vr = a({
|
|
4103
4187
|
variant: "line",
|
|
4104
4188
|
size: "md",
|
|
4105
4189
|
orientation: "horizontal"
|
|
4106
|
-
}),
|
|
4107
|
-
let { classNames: r, variant: i, size: a, orientation: o } = u(
|
|
4190
|
+
}), yr = s(function({ className: e, ...t }, n) {
|
|
4191
|
+
let { classNames: r, variant: i, size: a, orientation: o } = u(vr);
|
|
4108
4192
|
return /* @__PURE__ */ b(L.Indicator, {
|
|
4109
4193
|
...t,
|
|
4110
4194
|
"data-variant": i,
|
|
@@ -4113,8 +4197,8 @@ var lr = Object.assign(Zn, {
|
|
|
4113
4197
|
ref: n,
|
|
4114
4198
|
className: v("kb-tabs-indicator", r?.indicator, e)
|
|
4115
4199
|
});
|
|
4116
|
-
}),
|
|
4117
|
-
let { classNames: l, variant: d, size: f, orientation: p } = u(
|
|
4200
|
+
}), br = s(function({ activateOnFocus: e = !0, loopFocus: t = !0, showIndicator: r = !0, className: i, children: a, ...o }, s) {
|
|
4201
|
+
let { classNames: l, variant: d, size: f, orientation: p } = u(vr), m = n.toArray(a).some((e) => c(e) && e.type === yr);
|
|
4118
4202
|
return /* @__PURE__ */ x(L.List, {
|
|
4119
4203
|
...o,
|
|
4120
4204
|
"data-variant": d,
|
|
@@ -4124,10 +4208,10 @@ var lr = Object.assign(Zn, {
|
|
|
4124
4208
|
activateOnFocus: e,
|
|
4125
4209
|
loopFocus: t,
|
|
4126
4210
|
className: v("kb-tabs-list", l?.list, i),
|
|
4127
|
-
children: [a, r && !m ? /* @__PURE__ */ b(
|
|
4211
|
+
children: [a, r && !m ? /* @__PURE__ */ b(yr, {}) : null]
|
|
4128
4212
|
});
|
|
4129
|
-
}),
|
|
4130
|
-
let { classNames: c, variant: l, size: d, orientation: f } = u(
|
|
4213
|
+
}), xr = s(function({ value: e, disabled: t = !1, icon: n, badge: r, className: i, children: a, ...o }, s) {
|
|
4214
|
+
let { classNames: c, variant: l, size: d, orientation: f } = u(vr);
|
|
4131
4215
|
return /* @__PURE__ */ x(L.Tab, {
|
|
4132
4216
|
...o,
|
|
4133
4217
|
"data-variant": l,
|
|
@@ -4153,8 +4237,8 @@ var lr = Object.assign(Zn, {
|
|
|
4153
4237
|
})
|
|
4154
4238
|
]
|
|
4155
4239
|
});
|
|
4156
|
-
}),
|
|
4157
|
-
let { classNames: o, variant: s, size: c, orientation: l } = u(
|
|
4240
|
+
}), Sr = s(function({ value: e, keepMounted: t = !1, className: n, children: r, ...i }, a) {
|
|
4241
|
+
let { classNames: o, variant: s, size: c, orientation: l } = u(vr);
|
|
4158
4242
|
return /* @__PURE__ */ b(L.Panel, {
|
|
4159
4243
|
...i,
|
|
4160
4244
|
"data-variant": s,
|
|
@@ -4166,8 +4250,8 @@ var lr = Object.assign(Zn, {
|
|
|
4166
4250
|
className: v("kb-tabs-panel", o?.panel, n),
|
|
4167
4251
|
children: r
|
|
4168
4252
|
});
|
|
4169
|
-
}),
|
|
4170
|
-
return /* @__PURE__ */ b(
|
|
4253
|
+
}), Cr = s(function({ value: e, defaultValue: t, onValueChange: n, orientation: r = "horizontal", variant: i = "line", size: a = "md", className: o, classNames: s, children: c, ...l }, u) {
|
|
4254
|
+
return /* @__PURE__ */ b(vr.Provider, {
|
|
4171
4255
|
value: {
|
|
4172
4256
|
classNames: s,
|
|
4173
4257
|
variant: i,
|
|
@@ -4187,18 +4271,18 @@ var lr = Object.assign(Zn, {
|
|
|
4187
4271
|
children: c
|
|
4188
4272
|
})
|
|
4189
4273
|
});
|
|
4190
|
-
}),
|
|
4191
|
-
List:
|
|
4192
|
-
Tab:
|
|
4193
|
-
Indicator:
|
|
4194
|
-
Panel:
|
|
4274
|
+
}), wr = Object.assign(Cr, {
|
|
4275
|
+
List: br,
|
|
4276
|
+
Tab: xr,
|
|
4277
|
+
Indicator: yr,
|
|
4278
|
+
Panel: Sr
|
|
4195
4279
|
});
|
|
4196
4280
|
//#endregion
|
|
4197
4281
|
//#region src/components/Text/Text.tsx
|
|
4198
|
-
function
|
|
4282
|
+
function Tr({ as: e, size: t = "md", tone: n = "default", className: r, ...i }) {
|
|
4199
4283
|
return o(e ?? "p", {
|
|
4200
4284
|
...i,
|
|
4201
|
-
...
|
|
4285
|
+
...G("text", {
|
|
4202
4286
|
size: t,
|
|
4203
4287
|
tone: n
|
|
4204
4288
|
}, r)
|
|
@@ -4206,14 +4290,14 @@ function _r({ as: e, size: t = "md", tone: n = "default", className: r, ...i })
|
|
|
4206
4290
|
}
|
|
4207
4291
|
//#endregion
|
|
4208
4292
|
//#region src/components/Textarea/Textarea.tsx
|
|
4209
|
-
var
|
|
4210
|
-
let y = f(), S = t ?? `kb-textarea-${y}`, { invalid: C, ariaInvalid: w } =
|
|
4293
|
+
var Er = ({ ref: e, id: t, label: n, visuallyHidden: r, description: i, error: a, resize: o = "vertical", rows: s = 4, disabled: c, readOnly: l, onChange: u, onValueChange: d, className: p, classNames: m, "aria-describedby": h, "aria-invalid": g, ..._ }) => {
|
|
4294
|
+
let y = f(), S = t ?? `kb-textarea-${y}`, { invalid: C, ariaInvalid: w } = K(!!a, g), T = i ? `${S}-description` : void 0, E = a ? `${S}-error` : void 0, D = [
|
|
4211
4295
|
T,
|
|
4212
4296
|
E,
|
|
4213
4297
|
h
|
|
4214
4298
|
].filter(Boolean).join(" ") || void 0;
|
|
4215
4299
|
return /* @__PURE__ */ x("div", {
|
|
4216
|
-
...
|
|
4300
|
+
...G("textarea", {
|
|
4217
4301
|
resize: o,
|
|
4218
4302
|
invalid: C,
|
|
4219
4303
|
disabled: c,
|
|
@@ -4254,13 +4338,13 @@ var vr = ({ ref: e, id: t, label: n, visuallyHidden: r, description: i, error: a
|
|
|
4254
4338
|
};
|
|
4255
4339
|
//#endregion
|
|
4256
4340
|
//#region src/components/Thumbnail/Thumbnail.tsx
|
|
4257
|
-
function
|
|
4341
|
+
function Dr({ src: e, alt: t, ratio: n, fit: r, position: i, fallback: a, caption: o, description: s, imageProps: c, className: l, classNames: u, ...d }) {
|
|
4258
4342
|
let p = f(), m = o != null && o !== !1;
|
|
4259
4343
|
return /* @__PURE__ */ x("figure", {
|
|
4260
4344
|
...d,
|
|
4261
|
-
...
|
|
4345
|
+
...G("thumbnail", {}, u?.root ?? l),
|
|
4262
4346
|
"aria-labelledby": d["aria-labelledby"] ?? (d["aria-label"] ? void 0 : m ? p : void 0),
|
|
4263
|
-
children: [/* @__PURE__ */ b(
|
|
4347
|
+
children: [/* @__PURE__ */ b(ne, {
|
|
4264
4348
|
...c,
|
|
4265
4349
|
src: e,
|
|
4266
4350
|
alt: t,
|
|
@@ -4273,13 +4357,13 @@ function yr({ src: e, alt: t, ratio: n, fit: r, position: i, fallback: a, captio
|
|
|
4273
4357
|
root: v("kb-thumbnail-media", u?.media, c?.classNames?.root ?? c?.className)
|
|
4274
4358
|
}
|
|
4275
4359
|
}), (m || s != null) && /* @__PURE__ */ x("figcaption", {
|
|
4276
|
-
...
|
|
4360
|
+
...G("thumbnail-caption", {}, u?.caption),
|
|
4277
4361
|
children: [m && /* @__PURE__ */ b("span", {
|
|
4278
4362
|
id: p,
|
|
4279
|
-
...
|
|
4363
|
+
...G("thumbnail-title", {}, u?.title),
|
|
4280
4364
|
children: o
|
|
4281
4365
|
}), s != null && /* @__PURE__ */ b("span", {
|
|
4282
|
-
...
|
|
4366
|
+
...G("thumbnail-description", {}, u?.description),
|
|
4283
4367
|
children: s
|
|
4284
4368
|
})]
|
|
4285
4369
|
})]
|
|
@@ -4287,37 +4371,37 @@ function yr({ src: e, alt: t, ratio: n, fit: r, position: i, fallback: a, captio
|
|
|
4287
4371
|
}
|
|
4288
4372
|
//#endregion
|
|
4289
4373
|
//#region src/components/Toast/Toast.tsx
|
|
4290
|
-
function
|
|
4374
|
+
function Or() {
|
|
4291
4375
|
return R.createToastManager();
|
|
4292
4376
|
}
|
|
4293
|
-
function
|
|
4377
|
+
function kr() {
|
|
4294
4378
|
return R.useToastManager();
|
|
4295
4379
|
}
|
|
4296
|
-
function
|
|
4380
|
+
function Ar({ className: e, ...t }) {
|
|
4297
4381
|
return /* @__PURE__ */ b(R.Content, {
|
|
4298
4382
|
...t,
|
|
4299
4383
|
className: v("kb-toast-content", e)
|
|
4300
4384
|
});
|
|
4301
4385
|
}
|
|
4302
|
-
function
|
|
4386
|
+
function jr({ className: e, ...t }) {
|
|
4303
4387
|
return /* @__PURE__ */ b(R.Title, {
|
|
4304
4388
|
...t,
|
|
4305
4389
|
className: v("kb-toast-title", e)
|
|
4306
4390
|
});
|
|
4307
4391
|
}
|
|
4308
|
-
function
|
|
4392
|
+
function Mr({ className: e, ...t }) {
|
|
4309
4393
|
return /* @__PURE__ */ b(R.Description, {
|
|
4310
4394
|
...t,
|
|
4311
4395
|
className: v("kb-toast-description", e)
|
|
4312
4396
|
});
|
|
4313
4397
|
}
|
|
4314
|
-
function
|
|
4398
|
+
function Nr({ className: e, ...t }) {
|
|
4315
4399
|
return /* @__PURE__ */ b(R.Action, {
|
|
4316
4400
|
...t,
|
|
4317
4401
|
className: v("kb-toast-action", e)
|
|
4318
4402
|
});
|
|
4319
4403
|
}
|
|
4320
|
-
function
|
|
4404
|
+
function Pr({ className: e, ...t }) {
|
|
4321
4405
|
return /* @__PURE__ */ b(R.Close, {
|
|
4322
4406
|
"aria-label": "Dismiss notification",
|
|
4323
4407
|
"aria-hidden": !1,
|
|
@@ -4325,25 +4409,25 @@ function Er({ className: e, ...t }) {
|
|
|
4325
4409
|
className: v("kb-toast-close", e)
|
|
4326
4410
|
});
|
|
4327
4411
|
}
|
|
4328
|
-
function
|
|
4412
|
+
function Fr(e) {
|
|
4329
4413
|
return e === "error" ? "danger" : e === "loading" ? "info" : e === "info" || e === "success" || e === "warning" || e === "danger" ? e : "neutral";
|
|
4330
4414
|
}
|
|
4331
|
-
function
|
|
4415
|
+
function Ir({ toast: e, tone: t = Fr(e.type), closeLabel: n = "Dismiss notification", classNames: r, className: i, children: a, ...o }) {
|
|
4332
4416
|
return /* @__PURE__ */ b(R.Root, {
|
|
4333
4417
|
...o,
|
|
4334
4418
|
toast: e,
|
|
4335
|
-
...
|
|
4336
|
-
children: a === void 0 ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ x(
|
|
4419
|
+
...G("toast", { tone: t }, i),
|
|
4420
|
+
children: a === void 0 ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ x(Ar, {
|
|
4337
4421
|
className: r?.content,
|
|
4338
4422
|
children: [
|
|
4339
|
-
/* @__PURE__ */ b(
|
|
4423
|
+
/* @__PURE__ */ b(jr, {
|
|
4340
4424
|
className: r?.title,
|
|
4341
4425
|
children: e.title ?? e.description
|
|
4342
4426
|
}),
|
|
4343
|
-
e.title != null && /* @__PURE__ */ b(
|
|
4344
|
-
/* @__PURE__ */ b(
|
|
4427
|
+
e.title != null && /* @__PURE__ */ b(Mr, { className: r?.description }),
|
|
4428
|
+
/* @__PURE__ */ b(Nr, { className: r?.action })
|
|
4345
4429
|
]
|
|
4346
|
-
}), /* @__PURE__ */ b(
|
|
4430
|
+
}), /* @__PURE__ */ b(Pr, {
|
|
4347
4431
|
className: r?.close,
|
|
4348
4432
|
"aria-label": n,
|
|
4349
4433
|
children: /* @__PURE__ */ b("span", {
|
|
@@ -4353,42 +4437,70 @@ function Or({ toast: e, tone: t = Dr(e.type), closeLabel: n = "Dismiss notificat
|
|
|
4353
4437
|
})] }) : a
|
|
4354
4438
|
});
|
|
4355
4439
|
}
|
|
4356
|
-
function
|
|
4357
|
-
let { toasts: o } =
|
|
4440
|
+
function Lr({ placement: e = "bottom-end", container: t, renderToast: n, className: r, children: i, ...a }) {
|
|
4441
|
+
let { toasts: o } = kr(), s = /* @__PURE__ */ b(R.Viewport, {
|
|
4358
4442
|
...a,
|
|
4359
|
-
...
|
|
4360
|
-
children: i === void 0 ? o.map((e) => n ? n(e) : /* @__PURE__ */ b(
|
|
4443
|
+
...G("toast-viewport", { placement: e }, r),
|
|
4444
|
+
children: i === void 0 ? o.map((e) => n ? n(e) : /* @__PURE__ */ b(Ir, { toast: e }, e.id)) : i
|
|
4361
4445
|
});
|
|
4362
4446
|
return e === "inline" ? s : /* @__PURE__ */ b(R.Portal, {
|
|
4363
4447
|
container: t,
|
|
4364
4448
|
children: s
|
|
4365
4449
|
});
|
|
4366
4450
|
}
|
|
4367
|
-
var
|
|
4451
|
+
var Rr = Object.assign(Ir, {
|
|
4368
4452
|
Provider: R.Provider,
|
|
4369
|
-
Viewport:
|
|
4370
|
-
Content:
|
|
4371
|
-
Title:
|
|
4372
|
-
Description:
|
|
4373
|
-
Action:
|
|
4374
|
-
Close:
|
|
4453
|
+
Viewport: Lr,
|
|
4454
|
+
Content: Ar,
|
|
4455
|
+
Title: jr,
|
|
4456
|
+
Description: Mr,
|
|
4457
|
+
Action: Nr,
|
|
4458
|
+
Close: Pr
|
|
4375
4459
|
});
|
|
4376
4460
|
//#endregion
|
|
4461
|
+
//#region src/components/ToggleButton/ToggleButton.tsx
|
|
4462
|
+
function zr({ children: e, className: t, disabled: n, hidden: r, size: i = "md", "aria-pressed": a, form: o, nativeButton: s, render: c, role: l, type: u, ...d }) {
|
|
4463
|
+
return /* @__PURE__ */ x(z, {
|
|
4464
|
+
...d,
|
|
4465
|
+
hidden: r,
|
|
4466
|
+
disabled: n || r,
|
|
4467
|
+
...G("togglebutton", { size: i }, t),
|
|
4468
|
+
children: [/* @__PURE__ */ b("span", {
|
|
4469
|
+
className: "kb-togglebutton-indicator",
|
|
4470
|
+
children: /* @__PURE__ */ b("svg", {
|
|
4471
|
+
"aria-hidden": "true",
|
|
4472
|
+
viewBox: "0 0 16 16",
|
|
4473
|
+
fill: "none",
|
|
4474
|
+
stroke: "currentColor",
|
|
4475
|
+
strokeWidth: "2",
|
|
4476
|
+
children: /* @__PURE__ */ b("path", { d: "m3 8 3 3 7-7" })
|
|
4477
|
+
})
|
|
4478
|
+
}), /* @__PURE__ */ b("span", {
|
|
4479
|
+
className: "kb-togglebutton-label",
|
|
4480
|
+
children: e
|
|
4481
|
+
})]
|
|
4482
|
+
});
|
|
4483
|
+
}
|
|
4484
|
+
//#endregion
|
|
4377
4485
|
//#region src/components/Toolbar/Toolbar.tsx
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4486
|
+
var Br = a(!1);
|
|
4487
|
+
function Vr({ className: e, ...t }) {
|
|
4488
|
+
return /* @__PURE__ */ b(Br.Provider, {
|
|
4489
|
+
value: !0,
|
|
4490
|
+
children: /* @__PURE__ */ b(H.Root, {
|
|
4491
|
+
...t,
|
|
4492
|
+
className: v("kb-toolbar", e)
|
|
4493
|
+
})
|
|
4382
4494
|
});
|
|
4383
4495
|
}
|
|
4384
|
-
function
|
|
4385
|
-
return /* @__PURE__ */ b(
|
|
4496
|
+
function Hr({ className: e, ...t }) {
|
|
4497
|
+
return /* @__PURE__ */ b(H.Group, {
|
|
4386
4498
|
...t,
|
|
4387
4499
|
className: v("kb-toolbar-group", e)
|
|
4388
4500
|
});
|
|
4389
4501
|
}
|
|
4390
|
-
function
|
|
4391
|
-
return /* @__PURE__ */ b(
|
|
4502
|
+
function Ur({ variant: e = "ghost", className: t, ...n }) {
|
|
4503
|
+
return /* @__PURE__ */ b(H.Button, {
|
|
4392
4504
|
...n,
|
|
4393
4505
|
render: /* @__PURE__ */ b(Z, {
|
|
4394
4506
|
variant: e,
|
|
@@ -4397,29 +4509,73 @@ function Nr({ variant: e = "ghost", className: t, ...n }) {
|
|
|
4397
4509
|
})
|
|
4398
4510
|
});
|
|
4399
4511
|
}
|
|
4400
|
-
function
|
|
4401
|
-
return /* @__PURE__ */ b(
|
|
4512
|
+
function Wr({ className: e, ...t }) {
|
|
4513
|
+
return /* @__PURE__ */ b(H.Separator, {
|
|
4402
4514
|
...t,
|
|
4403
4515
|
className: v("kb-toolbar-separator", e)
|
|
4404
4516
|
});
|
|
4405
4517
|
}
|
|
4406
|
-
var
|
|
4407
|
-
Group:
|
|
4408
|
-
Button:
|
|
4409
|
-
Separator:
|
|
4518
|
+
var Gr = Object.assign(Vr, {
|
|
4519
|
+
Group: Hr,
|
|
4520
|
+
Button: Ur,
|
|
4521
|
+
Separator: Wr
|
|
4410
4522
|
});
|
|
4411
4523
|
//#endregion
|
|
4524
|
+
//#region src/components/ToggleGroup/ToggleGroup.tsx
|
|
4525
|
+
function Kr(e) {
|
|
4526
|
+
let { altKey: t, ctrlKey: n, metaKey: r, shiftKey: i, key: a, currentTarget: o } = e;
|
|
4527
|
+
if (t || n || r || i || a !== "Home" && a !== "End") return;
|
|
4528
|
+
let s = Array.from(o.querySelectorAll(".kb-togglebutton:enabled")).filter((e) => e.closest(".kb-togglegroup") === o), c = a === "Home" ? s[0] : s.at(-1);
|
|
4529
|
+
c && (e.preventDefault(), e.stopPropagation(), c.focus());
|
|
4530
|
+
}
|
|
4531
|
+
function qr({ className: e, dir: t, disabled: n, loopFocus: r, onKeyDown: i, orientation: a = "horizontal", ref: o, "aria-orientation": s, render: c, role: l, ...d }) {
|
|
4532
|
+
let f = u(Br), p = g(null), [h, v] = _("ltr"), y = t === "rtl" || t === "ltr" ? t : void 0;
|
|
4533
|
+
m(() => {
|
|
4534
|
+
let e = p.current;
|
|
4535
|
+
if (f || y || !e) return;
|
|
4536
|
+
let t = () => v(e.matches(":dir(rtl)") ? "rtl" : "ltr");
|
|
4537
|
+
t();
|
|
4538
|
+
let n = new MutationObserver(t);
|
|
4539
|
+
for (let t = e; t; t = t.parentElement) n.observe(t, { attributeFilter: ["dir"] });
|
|
4540
|
+
return () => n.disconnect();
|
|
4541
|
+
}, [y, f]);
|
|
4542
|
+
let x = /* @__PURE__ */ b(V, {
|
|
4543
|
+
...d,
|
|
4544
|
+
ref: o,
|
|
4545
|
+
disabled: n,
|
|
4546
|
+
dir: t,
|
|
4547
|
+
orientation: a,
|
|
4548
|
+
multiple: !0,
|
|
4549
|
+
onKeyDown: f ? i : (e) => {
|
|
4550
|
+
i?.(e), !e.defaultPrevented && !e.baseUIHandlerPrevented && Kr(e);
|
|
4551
|
+
},
|
|
4552
|
+
render: /* @__PURE__ */ b("div", { ref: p }),
|
|
4553
|
+
...G("togglegroup", { orientation: a }, e)
|
|
4554
|
+
});
|
|
4555
|
+
return f ? x : /* @__PURE__ */ b(B, {
|
|
4556
|
+
direction: y ?? h,
|
|
4557
|
+
children: /* @__PURE__ */ b(H.Root, {
|
|
4558
|
+
disabled: n,
|
|
4559
|
+
loopFocus: r,
|
|
4560
|
+
orientation: a,
|
|
4561
|
+
role: "group",
|
|
4562
|
+
"aria-orientation": void 0,
|
|
4563
|
+
render: x
|
|
4564
|
+
})
|
|
4565
|
+
});
|
|
4566
|
+
}
|
|
4567
|
+
//#endregion
|
|
4412
4568
|
//#region src/components/Tooltip/Tooltip.tsx
|
|
4413
|
-
function
|
|
4414
|
-
return /* @__PURE__ */ x(
|
|
4569
|
+
function Jr({ content: e, children: t, side: n = "top", delay: r = 400, container: i, className: a, ref: o }) {
|
|
4570
|
+
return /* @__PURE__ */ x(U.Root, { children: [/* @__PURE__ */ b(U.Trigger, {
|
|
4415
4571
|
delay: r,
|
|
4416
4572
|
render: t
|
|
4417
|
-
}), /* @__PURE__ */ b(
|
|
4573
|
+
}), /* @__PURE__ */ b(U.Portal, {
|
|
4418
4574
|
container: i,
|
|
4419
|
-
children: /* @__PURE__ */ b(
|
|
4575
|
+
children: /* @__PURE__ */ b(U.Positioner, {
|
|
4420
4576
|
side: n,
|
|
4421
4577
|
sideOffset: 6,
|
|
4422
|
-
children: /* @__PURE__ */ b(
|
|
4578
|
+
children: /* @__PURE__ */ b(U.Popup, {
|
|
4423
4579
|
ref: o,
|
|
4424
4580
|
className: v("kb-tooltip", a),
|
|
4425
4581
|
children: e
|
|
@@ -4428,6 +4584,83 @@ function Ir({ content: e, children: t, side: n = "top", delay: r = 400, containe
|
|
|
4428
4584
|
})] });
|
|
4429
4585
|
}
|
|
4430
4586
|
//#endregion
|
|
4431
|
-
|
|
4587
|
+
//#region src/components/TreeList/TreeList.tsx
|
|
4588
|
+
var Yr = 4;
|
|
4589
|
+
function Xr({ item: e, depth: t, maxVisualDepth: n, expanded: r, onToggle: i, classNames: a }) {
|
|
4590
|
+
let o = f(), s = g(null), c = g(!1);
|
|
4591
|
+
if (!e.children?.length) return /* @__PURE__ */ b("li", {
|
|
4592
|
+
...G("treelist-item", {}, a?.item),
|
|
4593
|
+
children: /* @__PURE__ */ b("div", {
|
|
4594
|
+
...G("treelist-label", {}, a?.label),
|
|
4595
|
+
children: e.label
|
|
4596
|
+
})
|
|
4597
|
+
});
|
|
4598
|
+
let l = r.has(e.id);
|
|
4599
|
+
return /* @__PURE__ */ x(O.Root, {
|
|
4600
|
+
open: l,
|
|
4601
|
+
render: /* @__PURE__ */ b("li", {}),
|
|
4602
|
+
...G("treelist-item", {}, a?.item),
|
|
4603
|
+
children: [/* @__PURE__ */ b("button", {
|
|
4604
|
+
type: "button",
|
|
4605
|
+
"aria-expanded": l,
|
|
4606
|
+
"aria-controls": o,
|
|
4607
|
+
onPointerDown: (e) => {
|
|
4608
|
+
c.current = l && e.button === 0 && !!s.current?.contains(e.currentTarget.ownerDocument.activeElement);
|
|
4609
|
+
},
|
|
4610
|
+
onPointerCancel: () => {
|
|
4611
|
+
c.current = !1;
|
|
4612
|
+
},
|
|
4613
|
+
onClick: (t) => {
|
|
4614
|
+
let n = t.currentTarget, { activeElement: r, body: a } = n.ownerDocument, o = t.detail > 0 && c.current && r === a;
|
|
4615
|
+
c.current = !1, l && (o || s.current?.contains(r)) && n.focus(), i(e.id);
|
|
4616
|
+
},
|
|
4617
|
+
...G("treelist-trigger", {}, a?.trigger),
|
|
4618
|
+
children: /* @__PURE__ */ b("span", {
|
|
4619
|
+
...G("treelist-label", {}, a?.label),
|
|
4620
|
+
children: e.label
|
|
4621
|
+
})
|
|
4622
|
+
}), /* @__PURE__ */ b(O.Panel, {
|
|
4623
|
+
id: o,
|
|
4624
|
+
keepMounted: !0,
|
|
4625
|
+
render: /* @__PURE__ */ b("ul", {
|
|
4626
|
+
ref: s,
|
|
4627
|
+
role: "list",
|
|
4628
|
+
inert: !l,
|
|
4629
|
+
"aria-hidden": !l || void 0
|
|
4630
|
+
}),
|
|
4631
|
+
...G("treelist-branch", { capped: t >= n }, a?.branch),
|
|
4632
|
+
children: e.children.map((e) => /* @__PURE__ */ b(Xr, {
|
|
4633
|
+
item: e,
|
|
4634
|
+
depth: t + 1,
|
|
4635
|
+
maxVisualDepth: n,
|
|
4636
|
+
expanded: r,
|
|
4637
|
+
onToggle: i,
|
|
4638
|
+
classNames: a
|
|
4639
|
+
}, e.id))
|
|
4640
|
+
})]
|
|
4641
|
+
});
|
|
4642
|
+
}
|
|
4643
|
+
function Zr({ items: e, expandedIds: t, defaultExpandedIds: n, onExpandedChange: r, maxVisualDepth: i = Yr, className: a, classNames: o, ...s }) {
|
|
4644
|
+
let [c, l] = _(() => new Set(n)), u = t === void 0 ? c : new Set(t), d = Number.isFinite(i) ? Math.max(0, Math.floor(i)) : Yr;
|
|
4645
|
+
function f(e) {
|
|
4646
|
+
let n = new Set(u);
|
|
4647
|
+
n.delete(e) || n.add(e), t === void 0 && l(n), r?.([...n]);
|
|
4648
|
+
}
|
|
4649
|
+
return /* @__PURE__ */ b("ul", {
|
|
4650
|
+
...s,
|
|
4651
|
+
role: s.role ?? "list",
|
|
4652
|
+
...G("treelist", {}, o?.root ?? a),
|
|
4653
|
+
children: e.map((e) => /* @__PURE__ */ b(Xr, {
|
|
4654
|
+
item: e,
|
|
4655
|
+
depth: 0,
|
|
4656
|
+
maxVisualDepth: d,
|
|
4657
|
+
expanded: u,
|
|
4658
|
+
onToggle: f,
|
|
4659
|
+
classNames: o
|
|
4660
|
+
}, e.id))
|
|
4661
|
+
});
|
|
4662
|
+
}
|
|
4663
|
+
//#endregion
|
|
4664
|
+
export { te as Accordion, ie as Avatar, ae as Badge, Z as Button, pe as Callout, me as Card, he as Checkbox, Fe as Code, Ie as CodeBlock, Ge as Collection, Ke as CollectionList, qe as CollectionRow, Ze as Combobox, dt as ConfirmAction, ft as Container, Ct as CopyableText, wt as Dashboard, kt as DescriptionList, lt as Dialog, Nt as Disclosure, Ft as EmptyState, Rt as ErrorSummary, zt as Fieldset, Ut as FileInput, Wt as FilterChip, Kt as Form, Gt as FormActions, Yt as FormSection, en as Gallery, Xt as Grid, Jt as Heading, ne as Image, tn as Inline, Le as Input, _t as Link, ln as Menu, Xe as MultiSelect, un as NumberField, fn as PageHeader, En as Panel, In as Popover, Ln as Progress, Un as RadioGroup, Wn as ScrollArea, Re as Select, Gn as Separator, Kn as Settings, Jn as Skeleton, ce as Spinner, Yn as Split, Xn as Stack, Zn as Stat, tr as StatsRow, nr as Status, rr as SupportingPane, ir as Switch, _r as Table, wr as Tabs, Tr as Text, Er as Textarea, Dr as Thumbnail, Rr as Toast, zr as ToggleButton, qr as ToggleGroup, Gr as Toolbar, Jr as Tooltip, Zr as TreeList, Or as createToastManager, G as kb, Ne as tokenizeCode, Ve as useCollection, ht as useLinkComponent, kr as useToastManager };
|
|
4432
4665
|
|
|
4433
4666
|
//# sourceMappingURL=index.js.map
|