@fabio.caffarello/react-design-system 1.10.5 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components-B08xLmiA.cjs +689 -0
- package/dist/components-B08xLmiA.cjs.map +1 -0
- package/dist/{components-BTUibx0r.js → components-DEuqI-ld.js} +3446 -3504
- package/dist/components-DEuqI-ld.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +357 -364
- package/dist/primitives/index.cjs +1 -1
- package/dist/primitives/index.cjs.map +1 -1
- package/dist/primitives/index.js +973 -981
- package/dist/primitives/index.js.map +1 -1
- package/dist/providers/index.cjs +1 -1
- package/dist/providers/index.js +1 -1
- package/dist/tokens/index.cjs +1 -1
- package/dist/tokens/index.cjs.map +1 -1
- package/dist/tokens/index.js +1602 -98
- package/dist/tokens/index.js.map +1 -1
- package/dist/ui/index.d.ts +0 -4
- package/dist/ui/tokens/TokenVisualizations.d.ts +0 -4
- package/dist/ui/tokens/index.d.ts +0 -5
- package/package.json +1 -1
- package/dist/components-BTUibx0r.js.map +0 -1
- package/dist/components-znqlol8t.cjs +0 -690
- package/dist/components-znqlol8t.cjs.map +0 -1
- package/dist/tokens-DcAT-mPY.js +0 -2140
- package/dist/tokens-DcAT-mPY.js.map +0 -1
- package/dist/tokens-Dul82Bn_.cjs +0 -2
- package/dist/tokens-Dul82Bn_.cjs.map +0 -1
- package/dist/ui/tokens/colors.d.ts +0 -122
- package/dist/ui/tokens/gradients.d.ts +0 -56
- package/dist/ui/tokens/themes/dark.d.ts +0 -42
- package/dist/ui/tokens/themes/light.d.ts +0 -42
- package/dist/ui/tokens/tokens.factory.d.ts +0 -98
package/dist/primitives/index.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
for (var
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
var C = (
|
|
14
|
-
var
|
|
15
|
-
for (var
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
for (var
|
|
19
|
-
|
|
20
|
-
return
|
|
1
|
+
var ke = Object.defineProperty, Se = Object.defineProperties;
|
|
2
|
+
var Ee = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var ue = Object.getOwnPropertySymbols;
|
|
4
|
+
var pe = Object.prototype.hasOwnProperty, xe = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var ge = (m, s, t) => s in m ? ke(m, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : m[s] = t, N = (m, s) => {
|
|
6
|
+
for (var t in s || (s = {}))
|
|
7
|
+
pe.call(s, t) && ge(m, t, s[t]);
|
|
8
|
+
if (ue)
|
|
9
|
+
for (var t of ue(s))
|
|
10
|
+
xe.call(s, t) && ge(m, t, s[t]);
|
|
11
|
+
return m;
|
|
12
|
+
}, R = (m, s) => Se(m, Ee(s));
|
|
13
|
+
var C = (m, s) => {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var r in m)
|
|
16
|
+
pe.call(m, r) && s.indexOf(r) < 0 && (t[r] = m[r]);
|
|
17
|
+
if (m != null && ue)
|
|
18
|
+
for (var r of ue(m))
|
|
19
|
+
s.indexOf(r) < 0 && xe.call(m, r) && (t[r] = m[r]);
|
|
20
|
+
return t;
|
|
21
21
|
};
|
|
22
|
-
import {
|
|
23
|
-
import { c as e, j as a,
|
|
24
|
-
import { forwardRef as O, memo as
|
|
25
|
-
function
|
|
26
|
-
var o =
|
|
27
|
-
variant:
|
|
28
|
-
className:
|
|
29
|
-
} = o,
|
|
22
|
+
import { getRadiusClass as z, getSpacingClass as u, getTypographyClasses as T, getTypographySize as E, getTypographyWeight as ie, getZIndexClass as $e, getBorderWidthClass as Le, getSwitchClasses as Fe, getAnimationClass as fe } from "../tokens/index.js";
|
|
23
|
+
import { c as e, j as a, L as Ve, a as H, X as he, E as Re, b as Ce, C as Ae } from "../components-DEuqI-ld.js";
|
|
24
|
+
import { forwardRef as O, memo as U, useMemo as d, useState as Y, useCallback as _, useRef as te, useEffect as ae, isValidElement as we, cloneElement as je, Children as Me } from "react";
|
|
25
|
+
function cr(r) {
|
|
26
|
+
var o = r, {
|
|
27
|
+
variant: m = "info",
|
|
28
|
+
className: s
|
|
29
|
+
} = o, t = C(o, [
|
|
30
30
|
"variant",
|
|
31
31
|
"className"
|
|
32
32
|
]);
|
|
33
|
-
const
|
|
33
|
+
const i = {
|
|
34
34
|
warning: e("bg-warning-bg", "text-warning-dark", "border-warning"),
|
|
35
35
|
error: e("bg-error-bg", "text-error-dark", "border-error"),
|
|
36
36
|
info: e("bg-info-bg", "text-info-dark", "border-info")
|
|
37
37
|
};
|
|
38
38
|
return /* @__PURE__ */ a.jsx(
|
|
39
39
|
"div",
|
|
40
|
-
|
|
40
|
+
N({
|
|
41
41
|
role: "alert",
|
|
42
42
|
className: e(
|
|
43
43
|
"border",
|
|
44
44
|
u("base", "px"),
|
|
45
45
|
u("sm", "py"),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
z("lg"),
|
|
47
|
+
i[m],
|
|
48
|
+
s
|
|
49
49
|
)
|
|
50
|
-
},
|
|
50
|
+
}, t)
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
const Ie = {
|
|
@@ -96,15 +96,15 @@ const Ie = {
|
|
|
96
96
|
};
|
|
97
97
|
function ze(x, p) {
|
|
98
98
|
var g = x, {
|
|
99
|
-
variant:
|
|
100
|
-
bold:
|
|
101
|
-
italic:
|
|
102
|
-
className:
|
|
99
|
+
variant: m = "paragraph",
|
|
100
|
+
bold: s,
|
|
101
|
+
italic: t,
|
|
102
|
+
className: r,
|
|
103
103
|
as: o,
|
|
104
|
-
color:
|
|
104
|
+
color: i,
|
|
105
105
|
colorRole: n = "neutral",
|
|
106
106
|
colorShade: c = "dark"
|
|
107
|
-
} = g,
|
|
107
|
+
} = g, b = C(g, [
|
|
108
108
|
"variant",
|
|
109
109
|
"bold",
|
|
110
110
|
"italic",
|
|
@@ -114,12 +114,12 @@ function ze(x, p) {
|
|
|
114
114
|
"colorRole",
|
|
115
115
|
"colorShade"
|
|
116
116
|
]);
|
|
117
|
-
const
|
|
117
|
+
const l = [];
|
|
118
118
|
let f;
|
|
119
119
|
if (o)
|
|
120
120
|
f = o;
|
|
121
121
|
else
|
|
122
|
-
switch (
|
|
122
|
+
switch (m) {
|
|
123
123
|
case "heading":
|
|
124
124
|
f = "h2";
|
|
125
125
|
break;
|
|
@@ -131,9 +131,9 @@ function ze(x, p) {
|
|
|
131
131
|
f = "p";
|
|
132
132
|
break;
|
|
133
133
|
}
|
|
134
|
-
return
|
|
134
|
+
return m === "heading" ? l.push(T("h2")) : m === "body" || m === "paragraph" ? l.push(T("body")) : m === "bodySmall" ? l.push(T("bodySmall")) : m === "bodyLarge" ? l.push(T("bodyLarge")) : m === "caption" ? l.push(T("caption")) : m === "label" ? l.push(T("label")) : l.push(T("body")), s && l.push("font-bold"), t && l.push("italic"), l.push(Ie[n][c]), /* @__PURE__ */ a.jsx(f, N({ ref: p, className: e(...l, r) }, b));
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const dr = O(ze), De = H("motion-safe:animate-spin", {
|
|
137
137
|
variants: {
|
|
138
138
|
size: {
|
|
139
139
|
sm: "h-4 w-4",
|
|
@@ -143,20 +143,20 @@ const bt = O(ze), Pe = H("motion-safe:animate-spin", {
|
|
|
143
143
|
variant: {
|
|
144
144
|
primary: "text-fg-brand",
|
|
145
145
|
secondary: "text-fg-brand-secondary",
|
|
146
|
-
neutral:
|
|
146
|
+
neutral: "text-fg-secondary"
|
|
147
147
|
}
|
|
148
148
|
},
|
|
149
149
|
defaultVariants: {
|
|
150
150
|
size: "md",
|
|
151
151
|
variant: "primary"
|
|
152
152
|
}
|
|
153
|
-
}),
|
|
153
|
+
}), Ne = U(function(n) {
|
|
154
154
|
var c = n, {
|
|
155
|
-
size:
|
|
156
|
-
variant:
|
|
157
|
-
label:
|
|
155
|
+
size: s = "md",
|
|
156
|
+
variant: t = "primary",
|
|
157
|
+
label: r,
|
|
158
158
|
className: o = ""
|
|
159
|
-
} = c,
|
|
159
|
+
} = c, i = C(c, [
|
|
160
160
|
"size",
|
|
161
161
|
"variant",
|
|
162
162
|
"label",
|
|
@@ -164,46 +164,46 @@ const bt = O(ze), Pe = H("motion-safe:animate-spin", {
|
|
|
164
164
|
]);
|
|
165
165
|
return /* @__PURE__ */ a.jsxs(
|
|
166
166
|
"div",
|
|
167
|
-
|
|
167
|
+
R(N({
|
|
168
168
|
className: e("inline-flex", "items-center", o),
|
|
169
169
|
role: "status",
|
|
170
|
-
"aria-label":
|
|
170
|
+
"aria-label": r || "Loading",
|
|
171
171
|
"aria-live": "polite"
|
|
172
|
-
},
|
|
172
|
+
}, i), {
|
|
173
173
|
children: [
|
|
174
174
|
/* @__PURE__ */ a.jsx(
|
|
175
|
-
|
|
175
|
+
Ve,
|
|
176
176
|
{
|
|
177
|
-
className: e(
|
|
177
|
+
className: e(De({ size: s, variant: t })),
|
|
178
178
|
"aria-hidden": "true"
|
|
179
179
|
}
|
|
180
180
|
),
|
|
181
|
-
|
|
181
|
+
r && /* @__PURE__ */ a.jsx(
|
|
182
182
|
"span",
|
|
183
183
|
{
|
|
184
184
|
className: e(
|
|
185
185
|
u("sm", "ml"),
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
E("bodySmall"),
|
|
187
|
+
"text-fg-secondary",
|
|
188
188
|
"sr-only"
|
|
189
189
|
),
|
|
190
|
-
children:
|
|
190
|
+
children: r
|
|
191
191
|
}
|
|
192
192
|
)
|
|
193
193
|
]
|
|
194
194
|
})
|
|
195
195
|
);
|
|
196
196
|
});
|
|
197
|
-
|
|
198
|
-
const
|
|
197
|
+
Ne.displayName = "Spinner";
|
|
198
|
+
const Te = H(
|
|
199
199
|
// Base classes
|
|
200
200
|
e(
|
|
201
201
|
"inline-flex",
|
|
202
202
|
"items-center",
|
|
203
203
|
"justify-center",
|
|
204
|
-
|
|
204
|
+
T("button").split(" ")[2] || "font-medium",
|
|
205
205
|
// Extract font-medium
|
|
206
|
-
|
|
206
|
+
z("md"),
|
|
207
207
|
"transition-colors",
|
|
208
208
|
"focus:outline-none",
|
|
209
209
|
"focus:ring-2",
|
|
@@ -234,23 +234,23 @@ const Be = H(
|
|
|
234
234
|
),
|
|
235
235
|
outline: e(
|
|
236
236
|
"border-2",
|
|
237
|
-
|
|
237
|
+
"border-line-default",
|
|
238
238
|
"bg-transparent",
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
239
|
+
"text-fg-primary",
|
|
240
|
+
"hover:bg-surface-hover",
|
|
241
|
+
"focus:ring-line-focus"
|
|
242
242
|
),
|
|
243
243
|
ghost: e(
|
|
244
244
|
"bg-transparent",
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
245
|
+
"text-fg-primary",
|
|
246
|
+
"hover:bg-surface-hover",
|
|
247
|
+
"focus:ring-line-focus"
|
|
248
248
|
),
|
|
249
249
|
iconOnly: e(
|
|
250
250
|
"bg-transparent",
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
251
|
+
"text-fg-primary",
|
|
252
|
+
"hover:bg-surface-hover",
|
|
253
|
+
"focus:ring-line-focus",
|
|
254
254
|
"p-0"
|
|
255
255
|
)
|
|
256
256
|
},
|
|
@@ -258,19 +258,19 @@ const Be = H(
|
|
|
258
258
|
sm: e(
|
|
259
259
|
u("md", "px"),
|
|
260
260
|
u("1.5", "py"),
|
|
261
|
-
|
|
261
|
+
E("bodySmall"),
|
|
262
262
|
u("1.5", "gap")
|
|
263
263
|
),
|
|
264
264
|
md: e(
|
|
265
265
|
u("base", "px"),
|
|
266
266
|
u("sm", "py"),
|
|
267
|
-
|
|
267
|
+
E("body"),
|
|
268
268
|
u("sm", "gap")
|
|
269
269
|
),
|
|
270
270
|
lg: e(
|
|
271
271
|
u("lg", "px"),
|
|
272
272
|
u("md", "py"),
|
|
273
|
-
|
|
273
|
+
E("bodyLarge"),
|
|
274
274
|
u("2.5", "gap")
|
|
275
275
|
)
|
|
276
276
|
}
|
|
@@ -299,35 +299,35 @@ const Be = H(
|
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
);
|
|
302
|
-
function
|
|
303
|
-
children:
|
|
304
|
-
position:
|
|
302
|
+
function ye({
|
|
303
|
+
children: m,
|
|
304
|
+
position: s
|
|
305
305
|
}) {
|
|
306
|
-
return
|
|
306
|
+
return m ? /* @__PURE__ */ a.jsx(
|
|
307
307
|
"span",
|
|
308
308
|
{
|
|
309
|
-
className: `inline-flex items-center ${
|
|
310
|
-
children:
|
|
309
|
+
className: `inline-flex items-center ${s === "left" ? "mr-0" : "ml-0"}`,
|
|
310
|
+
children: m
|
|
311
311
|
}
|
|
312
312
|
) : null;
|
|
313
313
|
}
|
|
314
|
-
const
|
|
315
|
-
O(function(
|
|
316
|
-
var
|
|
317
|
-
variant:
|
|
318
|
-
size:
|
|
319
|
-
isLoading:
|
|
314
|
+
const me = U(
|
|
315
|
+
O(function(j, h) {
|
|
316
|
+
var S = j, {
|
|
317
|
+
variant: s = "primary",
|
|
318
|
+
size: t = "md",
|
|
319
|
+
isLoading: r = !1,
|
|
320
320
|
loadingText: o,
|
|
321
|
-
loadingIcon:
|
|
321
|
+
loadingIcon: i,
|
|
322
322
|
leftIcon: n,
|
|
323
323
|
rightIcon: c,
|
|
324
|
-
fullWidth:
|
|
324
|
+
fullWidth: b = !1,
|
|
325
325
|
as: p = "button",
|
|
326
326
|
className: x = "",
|
|
327
327
|
disabled: g = !1,
|
|
328
|
-
children:
|
|
328
|
+
children: l,
|
|
329
329
|
"aria-label": f
|
|
330
|
-
} =
|
|
330
|
+
} = S, y = C(S, [
|
|
331
331
|
"variant",
|
|
332
332
|
"size",
|
|
333
333
|
"isLoading",
|
|
@@ -342,96 +342,96 @@ const pe = _(
|
|
|
342
342
|
"children",
|
|
343
343
|
"aria-label"
|
|
344
344
|
]);
|
|
345
|
-
const
|
|
345
|
+
const k = d(
|
|
346
346
|
() => e(
|
|
347
|
-
|
|
348
|
-
variant:
|
|
349
|
-
size:
|
|
347
|
+
Te({
|
|
348
|
+
variant: s,
|
|
349
|
+
size: t
|
|
350
350
|
}),
|
|
351
|
-
|
|
351
|
+
b && "w-full",
|
|
352
352
|
x
|
|
353
353
|
),
|
|
354
|
-
[
|
|
355
|
-
),
|
|
356
|
-
() =>
|
|
357
|
-
[
|
|
358
|
-
),
|
|
359
|
-
() =>
|
|
360
|
-
[
|
|
361
|
-
), v = d(() =>
|
|
362
|
-
() =>
|
|
363
|
-
[
|
|
364
|
-
),
|
|
365
|
-
() =>
|
|
366
|
-
[
|
|
367
|
-
), P = p === "button" && !y.type ? "button" : void 0,
|
|
368
|
-
className:
|
|
369
|
-
disabled: g ||
|
|
370
|
-
"aria-busy":
|
|
371
|
-
"aria-label":
|
|
372
|
-
"aria-disabled": g ||
|
|
354
|
+
[s, t, b, x]
|
|
355
|
+
), L = d(
|
|
356
|
+
() => s === "iconOnly" || !l && (n || c),
|
|
357
|
+
[s, l, n, c]
|
|
358
|
+
), A = d(
|
|
359
|
+
() => L && !f && !l ? "Button" : f,
|
|
360
|
+
[L, f, l]
|
|
361
|
+
), v = d(() => s === "error" ? "primary" : s === "primary" || s === "secondary" ? "neutral" : "primary", [s]), F = d(
|
|
362
|
+
() => t === "sm" ? "sm" : t === "lg" ? "lg" : "md",
|
|
363
|
+
[t]
|
|
364
|
+
), W = d(
|
|
365
|
+
() => i || /* @__PURE__ */ a.jsx(Ne, { size: F, variant: v }),
|
|
366
|
+
[i, F, v]
|
|
367
|
+
), P = p === "button" && !y.type ? "button" : void 0, Z = N(N({
|
|
368
|
+
className: k,
|
|
369
|
+
disabled: g || r,
|
|
370
|
+
"aria-busy": r,
|
|
371
|
+
"aria-label": A,
|
|
372
|
+
"aria-disabled": g || r
|
|
373
373
|
}, P ? { type: P } : {}), y);
|
|
374
|
-
return /* @__PURE__ */ a.jsx(p,
|
|
375
|
-
|
|
374
|
+
return /* @__PURE__ */ a.jsx(p, R(N({ ref: h }, Z), { children: r ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
375
|
+
W,
|
|
376
376
|
o && /* @__PURE__ */ a.jsx("span", { className: "ml-2", children: o }),
|
|
377
|
-
!o &&
|
|
377
|
+
!o && l && /* @__PURE__ */ a.jsx("span", { className: "ml-2 opacity-0", children: l })
|
|
378
378
|
] }) : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
379
|
-
n && /* @__PURE__ */ a.jsx(
|
|
380
|
-
|
|
381
|
-
c && /* @__PURE__ */ a.jsx(
|
|
379
|
+
n && /* @__PURE__ */ a.jsx(ye, { position: "left", children: n }),
|
|
380
|
+
l,
|
|
381
|
+
c && /* @__PURE__ */ a.jsx(ye, { position: "right", children: c })
|
|
382
382
|
] }) }));
|
|
383
383
|
})
|
|
384
384
|
);
|
|
385
|
-
|
|
386
|
-
const
|
|
387
|
-
error:
|
|
388
|
-
success:
|
|
389
|
-
helperText:
|
|
385
|
+
me.displayName = "Button";
|
|
386
|
+
const Pe = U(function({
|
|
387
|
+
error: s,
|
|
388
|
+
success: t,
|
|
389
|
+
helperText: r,
|
|
390
390
|
errorId: o,
|
|
391
|
-
helperId:
|
|
391
|
+
helperId: i
|
|
392
392
|
}) {
|
|
393
393
|
const n = d(
|
|
394
394
|
() => e(
|
|
395
395
|
u("xs", "mt"),
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
!
|
|
396
|
+
T("caption"),
|
|
397
|
+
s && "text-fg-error",
|
|
398
|
+
t && "text-fg-success",
|
|
399
|
+
!s && !t && "text-fg-secondary"
|
|
400
400
|
),
|
|
401
|
-
[
|
|
401
|
+
[s, t]
|
|
402
402
|
), c = d(
|
|
403
|
-
() =>
|
|
404
|
-
[
|
|
403
|
+
() => r || (s ? "Error" : t ? "Success" : ""),
|
|
404
|
+
[r, s, t]
|
|
405
405
|
);
|
|
406
406
|
return /* @__PURE__ */ a.jsx(
|
|
407
407
|
"div",
|
|
408
408
|
{
|
|
409
|
-
id: o ||
|
|
409
|
+
id: o || i,
|
|
410
410
|
className: n,
|
|
411
|
-
role:
|
|
411
|
+
role: s || t ? "alert" : void 0,
|
|
412
412
|
children: c
|
|
413
413
|
}
|
|
414
414
|
);
|
|
415
|
-
}),
|
|
416
|
-
O(function(
|
|
417
|
-
var
|
|
418
|
-
id:
|
|
419
|
-
label:
|
|
420
|
-
error:
|
|
415
|
+
}), Be = U(
|
|
416
|
+
O(function(L, k) {
|
|
417
|
+
var A = L, {
|
|
418
|
+
id: s,
|
|
419
|
+
label: t,
|
|
420
|
+
error: r = !1,
|
|
421
421
|
success: o = !1,
|
|
422
|
-
helperText:
|
|
422
|
+
helperText: i,
|
|
423
423
|
size: n = "md",
|
|
424
424
|
variant: c = "outlined",
|
|
425
|
-
leftIcon:
|
|
425
|
+
leftIcon: b,
|
|
426
426
|
rightIcon: p,
|
|
427
427
|
showClearButton: x = !1,
|
|
428
428
|
onClear: g,
|
|
429
|
-
className:
|
|
429
|
+
className: l = "",
|
|
430
430
|
disabled: f = !1,
|
|
431
431
|
type: y = "text",
|
|
432
|
-
value:
|
|
433
|
-
onChange:
|
|
434
|
-
} =
|
|
432
|
+
value: h,
|
|
433
|
+
onChange: j
|
|
434
|
+
} = A, S = C(A, [
|
|
435
435
|
"id",
|
|
436
436
|
"label",
|
|
437
437
|
"error",
|
|
@@ -450,37 +450,37 @@ const Oe = _(function({
|
|
|
450
450
|
"onChange"
|
|
451
451
|
]);
|
|
452
452
|
const v = d(
|
|
453
|
-
() =>
|
|
454
|
-
[
|
|
455
|
-
),
|
|
456
|
-
() =>
|
|
457
|
-
[
|
|
458
|
-
),
|
|
459
|
-
() =>
|
|
460
|
-
[
|
|
461
|
-
), [P,
|
|
462
|
-
() =>
|
|
463
|
-
[
|
|
453
|
+
() => s || `input-${Math.random().toString(36).substr(2, 9)}`,
|
|
454
|
+
[s]
|
|
455
|
+
), F = d(
|
|
456
|
+
() => r ? `${v}-error` : void 0,
|
|
457
|
+
[r, v]
|
|
458
|
+
), W = d(
|
|
459
|
+
() => i ? `${v}-helper` : void 0,
|
|
460
|
+
[i, v]
|
|
461
|
+
), [P, Z] = Y(!1), V = d(() => y === "password", [y]), w = d(
|
|
462
|
+
() => V && P ? "text" : y,
|
|
463
|
+
[V, P, y]
|
|
464
464
|
), B = d(
|
|
465
|
-
() =>
|
|
466
|
-
[
|
|
467
|
-
),
|
|
468
|
-
() =>
|
|
469
|
-
[
|
|
470
|
-
),
|
|
471
|
-
() => x &&
|
|
472
|
-
[x,
|
|
473
|
-
),
|
|
474
|
-
() =>
|
|
475
|
-
[
|
|
476
|
-
), re =
|
|
477
|
-
(
|
|
478
|
-
[
|
|
465
|
+
() => r ? "error" : o ? "success" : "default",
|
|
466
|
+
[r, o]
|
|
467
|
+
), $ = d(
|
|
468
|
+
() => h != null && h !== "",
|
|
469
|
+
[h]
|
|
470
|
+
), M = d(
|
|
471
|
+
() => x && $ && !f,
|
|
472
|
+
[x, $, f]
|
|
473
|
+
), ne = d(() => "focus:border-line-focus", []), le = d(() => "focus:border-error", []), ce = d(() => "focus:border-success", []), de = d(
|
|
474
|
+
() => ne.replace("focus:border-", "focus:ring-"),
|
|
475
|
+
[ne]
|
|
476
|
+
), re = _(
|
|
477
|
+
(D) => D === "error" ? le.replace("focus:border-", "focus:ring-") : ce.replace("focus:border-", "focus:ring-"),
|
|
478
|
+
[le, ce]
|
|
479
479
|
), se = H(
|
|
480
480
|
// Base classes
|
|
481
481
|
e(
|
|
482
482
|
"w-full",
|
|
483
|
-
|
|
483
|
+
z("md"),
|
|
484
484
|
"transition-colors",
|
|
485
485
|
"focus:outline-none",
|
|
486
486
|
"focus:ring-2",
|
|
@@ -494,36 +494,36 @@ const Oe = _(function({
|
|
|
494
494
|
default: e(
|
|
495
495
|
"border-0",
|
|
496
496
|
"border-b-2",
|
|
497
|
-
|
|
497
|
+
"border-line-default",
|
|
498
498
|
"focus:border-line-focus"
|
|
499
499
|
),
|
|
500
500
|
outlined: e(
|
|
501
501
|
"border",
|
|
502
|
-
|
|
502
|
+
"border-line-default",
|
|
503
503
|
"focus:border-line-focus"
|
|
504
504
|
),
|
|
505
505
|
filled: e(
|
|
506
|
-
|
|
506
|
+
"bg-surface-muted",
|
|
507
507
|
"border-0",
|
|
508
|
-
"focus:bg-
|
|
508
|
+
"focus:bg-surface-base",
|
|
509
509
|
"focus:ring-2",
|
|
510
|
-
|
|
510
|
+
de
|
|
511
511
|
)
|
|
512
512
|
},
|
|
513
513
|
size: {
|
|
514
514
|
sm: e(
|
|
515
515
|
"h-8",
|
|
516
|
-
|
|
516
|
+
E("bodySmall"),
|
|
517
517
|
u("md", "px")
|
|
518
518
|
),
|
|
519
519
|
md: e(
|
|
520
520
|
"h-10",
|
|
521
|
-
|
|
521
|
+
E("body"),
|
|
522
522
|
u("base", "px")
|
|
523
523
|
),
|
|
524
524
|
lg: e(
|
|
525
525
|
"h-12",
|
|
526
|
-
|
|
526
|
+
E("bodyLarge"),
|
|
527
527
|
u("lg", "px")
|
|
528
528
|
)
|
|
529
529
|
},
|
|
@@ -547,49 +547,49 @@ const Oe = _(function({
|
|
|
547
547
|
state: "default"
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
),
|
|
550
|
+
), K = d(
|
|
551
551
|
() => e(
|
|
552
552
|
se({ variant: c, size: n, state: B }),
|
|
553
553
|
// Icon padding - specific values for icon positioning
|
|
554
|
-
|
|
555
|
-
(p ||
|
|
556
|
-
|
|
554
|
+
b && (n === "sm" ? "pl-9" : n === "lg" ? "pl-12" : "pl-10"),
|
|
555
|
+
(p || M || V) && (n === "sm" ? "pr-9" : n === "lg" ? "pr-12" : "pr-10"),
|
|
556
|
+
l
|
|
557
557
|
),
|
|
558
558
|
[
|
|
559
559
|
c,
|
|
560
560
|
n,
|
|
561
561
|
B,
|
|
562
|
-
|
|
562
|
+
b,
|
|
563
563
|
p,
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
564
|
+
M,
|
|
565
|
+
V,
|
|
566
|
+
l
|
|
567
567
|
]
|
|
568
|
-
),
|
|
568
|
+
), ee = d(
|
|
569
569
|
() => e(
|
|
570
570
|
"block",
|
|
571
|
-
|
|
571
|
+
T("label"),
|
|
572
572
|
u("xs", "mb"),
|
|
573
573
|
f && "opacity-50"
|
|
574
574
|
),
|
|
575
575
|
[f]
|
|
576
|
-
),
|
|
576
|
+
), Q = d(
|
|
577
577
|
() => n === "sm" ? "h-4 w-4" : n === "lg" ? "h-5 w-5" : "h-4 w-4",
|
|
578
578
|
[n]
|
|
579
|
-
),
|
|
579
|
+
), oe = d(
|
|
580
580
|
() => n === "sm" ? "top-2" : n === "lg" ? "top-3.5" : "top-2.5",
|
|
581
581
|
[n]
|
|
582
|
-
),
|
|
583
|
-
(
|
|
584
|
-
var
|
|
585
|
-
if (
|
|
582
|
+
), I = _(
|
|
583
|
+
(D) => {
|
|
584
|
+
var J;
|
|
585
|
+
if (D.stopPropagation(), g)
|
|
586
586
|
g();
|
|
587
|
-
else if (
|
|
588
|
-
const
|
|
589
|
-
if (
|
|
590
|
-
const
|
|
591
|
-
target:
|
|
592
|
-
currentTarget:
|
|
587
|
+
else if (j) {
|
|
588
|
+
const G = (J = D.currentTarget.closest(".relative")) == null ? void 0 : J.querySelector("input");
|
|
589
|
+
if (G) {
|
|
590
|
+
const X = {
|
|
591
|
+
target: G,
|
|
592
|
+
currentTarget: G,
|
|
593
593
|
bubbles: !0,
|
|
594
594
|
cancelable: !0,
|
|
595
595
|
defaultPrevented: !1,
|
|
@@ -604,97 +604,97 @@ const Oe = _(function({
|
|
|
604
604
|
},
|
|
605
605
|
timeStamp: Date.now()
|
|
606
606
|
};
|
|
607
|
-
Object.defineProperty(
|
|
607
|
+
Object.defineProperty(X.target, "value", {
|
|
608
608
|
value: "",
|
|
609
609
|
writable: !0
|
|
610
|
-
}), Object.defineProperty(
|
|
610
|
+
}), Object.defineProperty(X.currentTarget, "value", {
|
|
611
611
|
value: "",
|
|
612
612
|
writable: !0
|
|
613
|
-
}),
|
|
613
|
+
}), j(X);
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
616
|
},
|
|
617
|
-
[g,
|
|
618
|
-
), q =
|
|
619
|
-
|
|
617
|
+
[g, j]
|
|
618
|
+
), q = _(() => {
|
|
619
|
+
Z((D) => !D);
|
|
620
620
|
}, []);
|
|
621
621
|
return /* @__PURE__ */ a.jsxs("div", { className: "w-full", children: [
|
|
622
|
-
|
|
622
|
+
t && /* @__PURE__ */ a.jsx("label", { htmlFor: v, className: ee, children: t }),
|
|
623
623
|
/* @__PURE__ */ a.jsxs("div", { className: "relative", children: [
|
|
624
|
-
|
|
624
|
+
b && /* @__PURE__ */ a.jsx(
|
|
625
625
|
"div",
|
|
626
626
|
{
|
|
627
|
-
className: `absolute left-3 ${
|
|
628
|
-
children: /* @__PURE__ */ a.jsx("div", { className:
|
|
627
|
+
className: `absolute left-3 ${oe} text-fg-secondary opacity-60 pointer-events-none`,
|
|
628
|
+
children: /* @__PURE__ */ a.jsx("div", { className: Q, children: b })
|
|
629
629
|
}
|
|
630
630
|
),
|
|
631
631
|
/* @__PURE__ */ a.jsx(
|
|
632
632
|
"input",
|
|
633
|
-
|
|
633
|
+
N({
|
|
634
634
|
id: v,
|
|
635
|
-
ref:
|
|
636
|
-
type:
|
|
637
|
-
className:
|
|
635
|
+
ref: k,
|
|
636
|
+
type: w,
|
|
637
|
+
className: K,
|
|
638
638
|
disabled: f,
|
|
639
|
-
value:
|
|
640
|
-
onChange:
|
|
641
|
-
"aria-invalid":
|
|
642
|
-
"aria-required":
|
|
643
|
-
"aria-describedby":
|
|
639
|
+
value: h,
|
|
640
|
+
onChange: j,
|
|
641
|
+
"aria-invalid": r,
|
|
642
|
+
"aria-required": S.required,
|
|
643
|
+
"aria-describedby": F || W,
|
|
644
644
|
suppressHydrationWarning: !0
|
|
645
|
-
},
|
|
645
|
+
}, S)
|
|
646
646
|
),
|
|
647
647
|
/* @__PURE__ */ a.jsxs("div", { className: "absolute right-3 top-0 bottom-0 flex items-center gap-1", children: [
|
|
648
|
-
|
|
649
|
-
|
|
648
|
+
M && /* @__PURE__ */ a.jsx(
|
|
649
|
+
me,
|
|
650
650
|
{
|
|
651
651
|
variant: "ghost",
|
|
652
652
|
size: "sm",
|
|
653
|
-
onClick:
|
|
653
|
+
onClick: I,
|
|
654
654
|
className: "h-auto p-1",
|
|
655
655
|
"aria-label": "Clear input",
|
|
656
|
-
children: /* @__PURE__ */ a.jsx(
|
|
656
|
+
children: /* @__PURE__ */ a.jsx(he, { className: Q })
|
|
657
657
|
}
|
|
658
658
|
),
|
|
659
|
-
|
|
660
|
-
|
|
659
|
+
V && /* @__PURE__ */ a.jsx(
|
|
660
|
+
me,
|
|
661
661
|
{
|
|
662
662
|
variant: "ghost",
|
|
663
663
|
size: "sm",
|
|
664
664
|
onClick: q,
|
|
665
665
|
className: "h-auto p-1",
|
|
666
666
|
"aria-label": P ? "Hide password" : "Show password",
|
|
667
|
-
children: P ? /* @__PURE__ */ a.jsx(Re, { className:
|
|
667
|
+
children: P ? /* @__PURE__ */ a.jsx(Re, { className: Q }) : /* @__PURE__ */ a.jsx(Ce, { className: Q })
|
|
668
668
|
}
|
|
669
669
|
),
|
|
670
|
-
p && !
|
|
670
|
+
p && !M && !V && /* @__PURE__ */ a.jsx(
|
|
671
671
|
"div",
|
|
672
672
|
{
|
|
673
|
-
className:
|
|
673
|
+
className: `text-fg-secondary opacity-60 pointer-events-none ${Q}`,
|
|
674
674
|
children: p
|
|
675
675
|
}
|
|
676
676
|
)
|
|
677
677
|
] })
|
|
678
678
|
] }),
|
|
679
|
-
(
|
|
680
|
-
|
|
679
|
+
(r || o || i) && /* @__PURE__ */ a.jsx(
|
|
680
|
+
Pe,
|
|
681
681
|
{
|
|
682
|
-
error:
|
|
682
|
+
error: r,
|
|
683
683
|
success: o,
|
|
684
|
-
helperText:
|
|
685
|
-
errorId:
|
|
686
|
-
helperId:
|
|
684
|
+
helperText: i,
|
|
685
|
+
errorId: F,
|
|
686
|
+
helperId: W
|
|
687
687
|
}
|
|
688
688
|
)
|
|
689
689
|
] });
|
|
690
690
|
})
|
|
691
691
|
);
|
|
692
|
-
|
|
693
|
-
function
|
|
694
|
-
href:
|
|
695
|
-
active:
|
|
692
|
+
Be.displayName = "Input";
|
|
693
|
+
function Oe({
|
|
694
|
+
href: m,
|
|
695
|
+
active: s
|
|
696
696
|
}) {
|
|
697
|
-
const
|
|
697
|
+
const t = d(() => s !== void 0 ? s : !1, [s]), r = d(() => {
|
|
698
698
|
try {
|
|
699
699
|
const o = (
|
|
700
700
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
@@ -706,11 +706,11 @@ function He({
|
|
|
706
706
|
}
|
|
707
707
|
}, []);
|
|
708
708
|
return {
|
|
709
|
-
isActive:
|
|
710
|
-
NextLink:
|
|
709
|
+
isActive: t,
|
|
710
|
+
NextLink: r
|
|
711
711
|
};
|
|
712
712
|
}
|
|
713
|
-
const
|
|
713
|
+
const qe = H(
|
|
714
714
|
// Base classes
|
|
715
715
|
e(
|
|
716
716
|
"inline-flex",
|
|
@@ -728,13 +728,13 @@ const _e = H(
|
|
|
728
728
|
variants: {
|
|
729
729
|
variant: {
|
|
730
730
|
default: e(
|
|
731
|
-
|
|
731
|
+
"text-fg-primary",
|
|
732
732
|
"hover:opacity-80",
|
|
733
733
|
"focus-visible:opacity-100",
|
|
734
734
|
"focus:ring-line-brand"
|
|
735
735
|
),
|
|
736
736
|
underline: e(
|
|
737
|
-
|
|
737
|
+
"text-fg-primary",
|
|
738
738
|
"hover:opacity-80",
|
|
739
739
|
"focus-visible:opacity-100",
|
|
740
740
|
"border-b-2",
|
|
@@ -743,10 +743,10 @@ const _e = H(
|
|
|
743
743
|
"focus:ring-line-brand"
|
|
744
744
|
),
|
|
745
745
|
background: e(
|
|
746
|
-
|
|
747
|
-
|
|
746
|
+
"text-fg-primary",
|
|
747
|
+
"hover:bg-surface-hover",
|
|
748
748
|
"rounded-md",
|
|
749
|
-
|
|
749
|
+
z("md"),
|
|
750
750
|
"focus:ring-line-brand"
|
|
751
751
|
)
|
|
752
752
|
},
|
|
@@ -754,17 +754,17 @@ const _e = H(
|
|
|
754
754
|
sm: e(
|
|
755
755
|
u("sm", "px"),
|
|
756
756
|
u("xs", "py"),
|
|
757
|
-
|
|
757
|
+
E("bodySmall")
|
|
758
758
|
),
|
|
759
759
|
md: e(
|
|
760
760
|
u("base", "px"),
|
|
761
761
|
u("sm", "py"),
|
|
762
|
-
|
|
762
|
+
E("body")
|
|
763
763
|
),
|
|
764
764
|
lg: e(
|
|
765
765
|
u("lg", "px"),
|
|
766
766
|
u("md", "py"),
|
|
767
|
-
|
|
767
|
+
E("bodyLarge")
|
|
768
768
|
)
|
|
769
769
|
}
|
|
770
770
|
},
|
|
@@ -806,17 +806,17 @@ const _e = H(
|
|
|
806
806
|
]
|
|
807
807
|
}
|
|
808
808
|
);
|
|
809
|
-
function
|
|
810
|
-
var f =
|
|
811
|
-
href:
|
|
812
|
-
children:
|
|
813
|
-
active:
|
|
814
|
-
disabled:
|
|
809
|
+
function ur(l) {
|
|
810
|
+
var f = l, {
|
|
811
|
+
href: m,
|
|
812
|
+
children: s,
|
|
813
|
+
active: t,
|
|
814
|
+
disabled: r = !1,
|
|
815
815
|
variant: o = "default",
|
|
816
|
-
size:
|
|
816
|
+
size: i = "md",
|
|
817
817
|
as: n,
|
|
818
818
|
className: c,
|
|
819
|
-
"aria-label":
|
|
819
|
+
"aria-label": b,
|
|
820
820
|
onClick: p,
|
|
821
821
|
onKeyDown: x
|
|
822
822
|
} = f, g = C(f, [
|
|
@@ -832,82 +832,82 @@ function mt(i) {
|
|
|
832
832
|
"onClick",
|
|
833
833
|
"onKeyDown"
|
|
834
834
|
]);
|
|
835
|
-
const y = d(() =>
|
|
835
|
+
const y = d(() => t !== void 0 ? t : !1, [t]), { NextLink: h } = Oe({ href: m, active: y }), j = n || h || "a", S = d(() => {
|
|
836
836
|
if (!y) return "";
|
|
837
837
|
switch (o) {
|
|
838
838
|
case "underline":
|
|
839
|
-
return e("border-b-2", "border-line-brand", "text-fg-brand");
|
|
839
|
+
return e("border-b-2", "border-line-brand", "text-fg-brand-emphasis");
|
|
840
840
|
case "background":
|
|
841
|
-
return e("bg-
|
|
841
|
+
return e("bg-surface-brand-muted", "text-fg-brand-emphasis");
|
|
842
842
|
case "default":
|
|
843
843
|
default:
|
|
844
|
-
return e("text-fg-brand", "font-semibold");
|
|
844
|
+
return e("text-fg-brand-emphasis", "font-semibold");
|
|
845
845
|
}
|
|
846
|
-
}, [y, o]),
|
|
846
|
+
}, [y, o]), k = _(
|
|
847
847
|
(v) => {
|
|
848
|
-
if (
|
|
848
|
+
if (r) {
|
|
849
849
|
v.preventDefault(), v.stopPropagation();
|
|
850
850
|
return;
|
|
851
851
|
}
|
|
852
852
|
p == null || p(v);
|
|
853
853
|
},
|
|
854
|
-
[
|
|
855
|
-
),
|
|
854
|
+
[r, p]
|
|
855
|
+
), L = _(
|
|
856
856
|
(v) => {
|
|
857
|
-
if (
|
|
857
|
+
if (r) {
|
|
858
858
|
(v.key === "Enter" || v.key === " ") && (v.preventDefault(), v.stopPropagation());
|
|
859
859
|
return;
|
|
860
860
|
}
|
|
861
861
|
x == null || x(v);
|
|
862
862
|
},
|
|
863
|
-
[
|
|
864
|
-
),
|
|
865
|
-
const v =
|
|
863
|
+
[r, x]
|
|
864
|
+
), A = d(() => {
|
|
865
|
+
const v = N({
|
|
866
866
|
className: e(
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
867
|
+
qe({ variant: o, size: i }),
|
|
868
|
+
S,
|
|
869
|
+
r && "opacity-50 cursor-not-allowed pointer-events-none",
|
|
870
870
|
c
|
|
871
871
|
),
|
|
872
872
|
"aria-current": y ? "page" : void 0,
|
|
873
|
-
"aria-disabled":
|
|
874
|
-
"aria-label":
|
|
875
|
-
tabIndex:
|
|
876
|
-
onClick:
|
|
877
|
-
onKeyDown:
|
|
873
|
+
"aria-disabled": r ? !0 : void 0,
|
|
874
|
+
"aria-label": b,
|
|
875
|
+
tabIndex: r ? -1 : void 0,
|
|
876
|
+
onClick: k,
|
|
877
|
+
onKeyDown: L,
|
|
878
878
|
"data-active": y,
|
|
879
|
-
"data-disabled":
|
|
879
|
+
"data-disabled": r
|
|
880
880
|
}, g);
|
|
881
|
-
return
|
|
882
|
-
href:
|
|
883
|
-
}) :
|
|
884
|
-
href:
|
|
881
|
+
return h && !n ? R(N({}, v), {
|
|
882
|
+
href: r ? void 0 : m
|
|
883
|
+
}) : R(N({}, v), {
|
|
884
|
+
href: r ? void 0 : m
|
|
885
885
|
});
|
|
886
886
|
}, [
|
|
887
887
|
o,
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
888
|
+
i,
|
|
889
|
+
S,
|
|
890
|
+
r,
|
|
891
891
|
c,
|
|
892
892
|
y,
|
|
893
|
-
m,
|
|
894
|
-
E,
|
|
895
|
-
S,
|
|
896
893
|
b,
|
|
897
|
-
|
|
894
|
+
k,
|
|
895
|
+
L,
|
|
896
|
+
m,
|
|
897
|
+
h,
|
|
898
898
|
n,
|
|
899
899
|
g
|
|
900
900
|
]);
|
|
901
|
-
return /* @__PURE__ */ a.jsx(
|
|
901
|
+
return /* @__PURE__ */ a.jsx(j, R(N({}, A), { children: s }));
|
|
902
902
|
}
|
|
903
|
-
const
|
|
903
|
+
const He = H(
|
|
904
904
|
// Base classes
|
|
905
905
|
e(
|
|
906
906
|
"inline-flex",
|
|
907
907
|
"items-center",
|
|
908
908
|
"justify-center",
|
|
909
909
|
ie("label"),
|
|
910
|
-
|
|
910
|
+
z("md"),
|
|
911
911
|
"border"
|
|
912
912
|
),
|
|
913
913
|
{
|
|
@@ -925,17 +925,17 @@ const We = H(
|
|
|
925
925
|
sm: e(
|
|
926
926
|
u("1.5", "px"),
|
|
927
927
|
u("0.5", "py"),
|
|
928
|
-
|
|
928
|
+
E("caption")
|
|
929
929
|
),
|
|
930
930
|
md: e(
|
|
931
931
|
u("sm", "px"),
|
|
932
932
|
u("xs", "py"),
|
|
933
|
-
|
|
933
|
+
E("caption")
|
|
934
934
|
),
|
|
935
935
|
lg: e(
|
|
936
936
|
u("sm", "px"),
|
|
937
937
|
u("xs", "py"),
|
|
938
|
-
|
|
938
|
+
E("bodySmall")
|
|
939
939
|
)
|
|
940
940
|
},
|
|
941
941
|
style: {
|
|
@@ -968,21 +968,28 @@ const We = H(
|
|
|
968
968
|
{
|
|
969
969
|
variant: "neutral",
|
|
970
970
|
style: "solid",
|
|
971
|
-
class: e(
|
|
972
|
-
h("neutral", "light", "bg"),
|
|
973
|
-
h("neutral", "dark", "text"),
|
|
974
|
-
h("neutral", "DEFAULT", "border")
|
|
975
|
-
)
|
|
971
|
+
class: e("bg-surface-muted", "text-fg-primary", "border-line-default")
|
|
976
972
|
},
|
|
977
973
|
{
|
|
978
974
|
variant: "primary",
|
|
979
975
|
style: "solid",
|
|
980
|
-
class: e(
|
|
976
|
+
class: e(
|
|
977
|
+
"bg-surface-brand",
|
|
978
|
+
"text-fg-brand-emphasis",
|
|
979
|
+
"border-line-brand"
|
|
980
|
+
)
|
|
981
981
|
},
|
|
982
982
|
{
|
|
983
983
|
variant: "secondary",
|
|
984
984
|
style: "solid",
|
|
985
|
-
|
|
985
|
+
// bg-pink-300: secondary solid badge — no semantic equivalent
|
|
986
|
+
// (would shift 2 shades to bg-surface-secondary). Kept literal until
|
|
987
|
+
// secondary brand surface palette expands beyond DEFAULT.
|
|
988
|
+
class: e(
|
|
989
|
+
"bg-pink-300",
|
|
990
|
+
"text-fg-brand-secondary-emphasis",
|
|
991
|
+
"border-line-secondary"
|
|
992
|
+
)
|
|
986
993
|
},
|
|
987
994
|
// Outline style variants
|
|
988
995
|
{
|
|
@@ -1008,11 +1015,7 @@ const We = H(
|
|
|
1008
1015
|
{
|
|
1009
1016
|
variant: "neutral",
|
|
1010
1017
|
style: "outline",
|
|
1011
|
-
class: e(
|
|
1012
|
-
"bg-transparent",
|
|
1013
|
-
h("neutral", "DEFAULT", "border"),
|
|
1014
|
-
h("neutral", "DEFAULT", "text")
|
|
1015
|
-
)
|
|
1018
|
+
class: e("bg-transparent", "border-line-default", "text-fg-secondary")
|
|
1016
1019
|
},
|
|
1017
1020
|
{
|
|
1018
1021
|
variant: "primary",
|
|
@@ -1035,14 +1038,14 @@ const We = H(
|
|
|
1035
1038
|
style: "solid"
|
|
1036
1039
|
}
|
|
1037
1040
|
}
|
|
1038
|
-
),
|
|
1039
|
-
O(function(p,
|
|
1041
|
+
), Ue = U(
|
|
1042
|
+
O(function(p, b) {
|
|
1040
1043
|
var x = p, {
|
|
1041
|
-
variant:
|
|
1042
|
-
size:
|
|
1043
|
-
style:
|
|
1044
|
+
variant: s = "neutral",
|
|
1045
|
+
size: t = "md",
|
|
1046
|
+
style: r = "solid",
|
|
1044
1047
|
className: o = "",
|
|
1045
|
-
children:
|
|
1048
|
+
children: i,
|
|
1046
1049
|
"aria-label": n
|
|
1047
1050
|
} = x, c = C(x, [
|
|
1048
1051
|
"variant",
|
|
@@ -1053,75 +1056,75 @@ const We = H(
|
|
|
1053
1056
|
"aria-label"
|
|
1054
1057
|
]);
|
|
1055
1058
|
const g = d(
|
|
1056
|
-
() => e(
|
|
1057
|
-
[
|
|
1058
|
-
),
|
|
1059
|
+
() => e(He({ variant: s, size: t, style: r }), o),
|
|
1060
|
+
[s, t, r, o]
|
|
1061
|
+
), l = d(() => {
|
|
1059
1062
|
if (n) return n;
|
|
1060
|
-
if (typeof
|
|
1061
|
-
if (typeof
|
|
1062
|
-
const f =
|
|
1063
|
+
if (typeof i == "string") return i;
|
|
1064
|
+
if (typeof i == "object" && i !== null && "props" in i) {
|
|
1065
|
+
const f = i.props;
|
|
1063
1066
|
if (f != null && f.children && typeof f.children == "string")
|
|
1064
1067
|
return f.children;
|
|
1065
1068
|
}
|
|
1066
|
-
}, [n,
|
|
1069
|
+
}, [n, i]);
|
|
1067
1070
|
return /* @__PURE__ */ a.jsx(
|
|
1068
1071
|
"span",
|
|
1069
|
-
|
|
1070
|
-
ref:
|
|
1072
|
+
R(N({
|
|
1073
|
+
ref: b,
|
|
1071
1074
|
role: "status",
|
|
1072
|
-
"aria-label":
|
|
1075
|
+
"aria-label": l,
|
|
1073
1076
|
className: g
|
|
1074
1077
|
}, c), {
|
|
1075
|
-
children:
|
|
1078
|
+
children: i
|
|
1076
1079
|
})
|
|
1077
1080
|
);
|
|
1078
1081
|
})
|
|
1079
1082
|
);
|
|
1080
|
-
|
|
1081
|
-
const
|
|
1082
|
-
error:
|
|
1083
|
-
success:
|
|
1084
|
-
helperText:
|
|
1083
|
+
Ue.displayName = "Badge";
|
|
1084
|
+
const _e = U(function({
|
|
1085
|
+
error: s,
|
|
1086
|
+
success: t,
|
|
1087
|
+
helperText: r,
|
|
1085
1088
|
errorId: o,
|
|
1086
|
-
helperId:
|
|
1089
|
+
helperId: i
|
|
1087
1090
|
}) {
|
|
1088
1091
|
const n = d(
|
|
1089
1092
|
() => e(
|
|
1090
1093
|
u("xs", "mt"),
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
!
|
|
1094
|
+
T("caption"),
|
|
1095
|
+
s && "text-fg-error",
|
|
1096
|
+
t && "text-fg-success",
|
|
1097
|
+
!s && !t && "text-fg-secondary"
|
|
1095
1098
|
),
|
|
1096
|
-
[
|
|
1099
|
+
[s, t]
|
|
1097
1100
|
), c = d(
|
|
1098
|
-
() =>
|
|
1099
|
-
[
|
|
1101
|
+
() => r || (s ? "Error" : t ? "Success" : ""),
|
|
1102
|
+
[r, s, t]
|
|
1100
1103
|
);
|
|
1101
1104
|
return /* @__PURE__ */ a.jsx(
|
|
1102
1105
|
"div",
|
|
1103
1106
|
{
|
|
1104
|
-
id: o ||
|
|
1107
|
+
id: o || i,
|
|
1105
1108
|
className: n,
|
|
1106
|
-
role:
|
|
1109
|
+
role: s || t ? "alert" : void 0,
|
|
1107
1110
|
children: c
|
|
1108
1111
|
}
|
|
1109
1112
|
);
|
|
1110
|
-
}),
|
|
1113
|
+
}), We = U(
|
|
1111
1114
|
O(function(y, f) {
|
|
1112
|
-
var
|
|
1113
|
-
options:
|
|
1114
|
-
optionGroups:
|
|
1115
|
-
placeholder:
|
|
1115
|
+
var h = y, {
|
|
1116
|
+
options: s = [],
|
|
1117
|
+
optionGroups: t,
|
|
1118
|
+
placeholder: r,
|
|
1116
1119
|
label: o,
|
|
1117
|
-
error:
|
|
1120
|
+
error: i = !1,
|
|
1118
1121
|
success: n = !1,
|
|
1119
1122
|
helperText: c,
|
|
1120
|
-
size:
|
|
1123
|
+
size: b = "md",
|
|
1121
1124
|
className: p = "",
|
|
1122
1125
|
disabled: x = !1,
|
|
1123
1126
|
id: g
|
|
1124
|
-
} =
|
|
1127
|
+
} = h, l = C(h, [
|
|
1125
1128
|
"options",
|
|
1126
1129
|
"optionGroups",
|
|
1127
1130
|
"placeholder",
|
|
@@ -1134,26 +1137,26 @@ const Ze = _(function({
|
|
|
1134
1137
|
"disabled",
|
|
1135
1138
|
"id"
|
|
1136
1139
|
]);
|
|
1137
|
-
const
|
|
1140
|
+
const j = d(
|
|
1138
1141
|
() => g || `select-${Math.random().toString(36).substr(2, 9)}`,
|
|
1139
1142
|
[g]
|
|
1140
|
-
),
|
|
1141
|
-
() =>
|
|
1142
|
-
[
|
|
1143
|
-
),
|
|
1144
|
-
() => c ? `${
|
|
1145
|
-
[c,
|
|
1146
|
-
),
|
|
1147
|
-
(
|
|
1148
|
-
[
|
|
1149
|
-
),
|
|
1143
|
+
), S = d(
|
|
1144
|
+
() => i ? `${j}-error` : void 0,
|
|
1145
|
+
[i, j]
|
|
1146
|
+
), k = d(
|
|
1147
|
+
() => c ? `${j}-helper` : void 0,
|
|
1148
|
+
[c, j]
|
|
1149
|
+
), L = d(() => "focus:border-line-focus", []), A = d(() => "focus:border-error", []), v = d(() => "focus:border-success", []), F = _(
|
|
1150
|
+
(w) => w === "error" ? A.replace("focus:border-", "focus:ring-") : w === "success" ? v.replace("focus:border-", "focus:ring-") : L.replace("focus:border-", "focus:ring-"),
|
|
1151
|
+
[A, v, L]
|
|
1152
|
+
), W = H(
|
|
1150
1153
|
// Base classes
|
|
1151
1154
|
e(
|
|
1152
1155
|
"block",
|
|
1153
1156
|
"w-full",
|
|
1154
|
-
|
|
1157
|
+
z("md"),
|
|
1155
1158
|
"border",
|
|
1156
|
-
"bg-
|
|
1159
|
+
"bg-surface-base",
|
|
1157
1160
|
"transition-colors",
|
|
1158
1161
|
"focus:outline-none",
|
|
1159
1162
|
"focus:ring-2",
|
|
@@ -1166,27 +1169,24 @@ const Ze = _(function({
|
|
|
1166
1169
|
size: {
|
|
1167
1170
|
sm: e(
|
|
1168
1171
|
"h-8",
|
|
1169
|
-
|
|
1172
|
+
E("bodySmall"),
|
|
1170
1173
|
u("md", "px")
|
|
1171
1174
|
),
|
|
1172
1175
|
md: e(
|
|
1173
1176
|
"h-10",
|
|
1174
|
-
|
|
1177
|
+
E("body"),
|
|
1175
1178
|
u("base", "px")
|
|
1176
1179
|
),
|
|
1177
1180
|
lg: e(
|
|
1178
1181
|
"h-12",
|
|
1179
|
-
|
|
1182
|
+
E("bodyLarge"),
|
|
1180
1183
|
u("lg", "px")
|
|
1181
1184
|
)
|
|
1182
1185
|
},
|
|
1183
1186
|
state: {
|
|
1184
|
-
default: e(
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
),
|
|
1188
|
-
error: e("border-error", D("error")),
|
|
1189
|
-
success: e("border-success", D("success"))
|
|
1187
|
+
default: e("border-line-default", F()),
|
|
1188
|
+
error: e("border-error", F("error")),
|
|
1189
|
+
success: e("border-success", F("success"))
|
|
1190
1190
|
}
|
|
1191
1191
|
},
|
|
1192
1192
|
defaultVariants: {
|
|
@@ -1195,75 +1195,75 @@ const Ze = _(function({
|
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
1197
|
), P = d(
|
|
1198
|
-
() =>
|
|
1199
|
-
[
|
|
1200
|
-
),
|
|
1201
|
-
() => e(
|
|
1202
|
-
[
|
|
1203
|
-
),
|
|
1198
|
+
() => i ? "error" : n ? "success" : "default",
|
|
1199
|
+
[i, n]
|
|
1200
|
+
), Z = d(
|
|
1201
|
+
() => e(W({ size: b, state: P }), p),
|
|
1202
|
+
[b, P, p]
|
|
1203
|
+
), V = d(
|
|
1204
1204
|
() => e(
|
|
1205
1205
|
"block",
|
|
1206
|
-
|
|
1206
|
+
T("label"),
|
|
1207
1207
|
u("xs", "mb"),
|
|
1208
1208
|
x && "opacity-50"
|
|
1209
1209
|
),
|
|
1210
1210
|
[x]
|
|
1211
1211
|
);
|
|
1212
1212
|
return /* @__PURE__ */ a.jsxs("div", { className: "w-full", children: [
|
|
1213
|
-
o && /* @__PURE__ */ a.jsx("label", { htmlFor:
|
|
1213
|
+
o && /* @__PURE__ */ a.jsx("label", { htmlFor: j, className: V, children: o }),
|
|
1214
1214
|
/* @__PURE__ */ a.jsxs(
|
|
1215
1215
|
"select",
|
|
1216
|
-
|
|
1217
|
-
id:
|
|
1216
|
+
R(N({
|
|
1217
|
+
id: j,
|
|
1218
1218
|
ref: f,
|
|
1219
|
-
className:
|
|
1219
|
+
className: Z,
|
|
1220
1220
|
disabled: x,
|
|
1221
|
-
"aria-invalid":
|
|
1222
|
-
"aria-required":
|
|
1223
|
-
"aria-describedby":
|
|
1224
|
-
},
|
|
1221
|
+
"aria-invalid": i,
|
|
1222
|
+
"aria-required": l.required,
|
|
1223
|
+
"aria-describedby": S || k
|
|
1224
|
+
}, l), {
|
|
1225
1225
|
children: [
|
|
1226
|
-
|
|
1227
|
-
|
|
1226
|
+
r && /* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, children: r }),
|
|
1227
|
+
t && t.length > 0 ? t.map((w, B) => /* @__PURE__ */ a.jsx("optgroup", { label: w.label, children: (w.options || []).map(($) => /* @__PURE__ */ a.jsx(
|
|
1228
1228
|
"option",
|
|
1229
1229
|
{
|
|
1230
|
-
value:
|
|
1231
|
-
disabled:
|
|
1232
|
-
children:
|
|
1230
|
+
value: $.value,
|
|
1231
|
+
disabled: $.disabled,
|
|
1232
|
+
children: $.label
|
|
1233
1233
|
},
|
|
1234
|
-
|
|
1235
|
-
)) }, B)) : (
|
|
1234
|
+
$.value
|
|
1235
|
+
)) }, B)) : (s || []).map((w) => /* @__PURE__ */ a.jsx(
|
|
1236
1236
|
"option",
|
|
1237
1237
|
{
|
|
1238
|
-
value:
|
|
1239
|
-
disabled:
|
|
1240
|
-
children:
|
|
1238
|
+
value: w.value,
|
|
1239
|
+
disabled: w.disabled,
|
|
1240
|
+
children: w.label
|
|
1241
1241
|
},
|
|
1242
|
-
|
|
1242
|
+
w.value
|
|
1243
1243
|
))
|
|
1244
1244
|
]
|
|
1245
1245
|
})
|
|
1246
1246
|
),
|
|
1247
|
-
(
|
|
1248
|
-
|
|
1247
|
+
(i || n || c) && /* @__PURE__ */ a.jsx(
|
|
1248
|
+
_e,
|
|
1249
1249
|
{
|
|
1250
|
-
error:
|
|
1250
|
+
error: i,
|
|
1251
1251
|
success: n,
|
|
1252
1252
|
helperText: c,
|
|
1253
|
-
errorId:
|
|
1254
|
-
helperId:
|
|
1253
|
+
errorId: S,
|
|
1254
|
+
helperId: k
|
|
1255
1255
|
}
|
|
1256
1256
|
)
|
|
1257
1257
|
] });
|
|
1258
1258
|
})
|
|
1259
1259
|
);
|
|
1260
|
-
|
|
1261
|
-
const
|
|
1262
|
-
O(function(n,
|
|
1263
|
-
var c = n, { error:
|
|
1264
|
-
const
|
|
1265
|
-
() =>
|
|
1266
|
-
[
|
|
1260
|
+
We.displayName = "Select";
|
|
1261
|
+
const Xe = U(
|
|
1262
|
+
O(function(n, i) {
|
|
1263
|
+
var c = n, { error: s = !1, resize: t = "vertical", className: r = "" } = c, o = C(c, ["error", "resize", "className"]);
|
|
1264
|
+
const b = d(() => "focus:border-line-focus", []), p = d(() => "focus:border-error", []), x = d(
|
|
1265
|
+
() => s ? p.replace("focus:border-", "focus:ring-") : b.replace("focus:border-", "focus:ring-"),
|
|
1266
|
+
[s, p, b]
|
|
1267
1267
|
), g = d(
|
|
1268
1268
|
() => ({
|
|
1269
1269
|
none: "resize-none",
|
|
@@ -1272,48 +1272,48 @@ const Qe = _(
|
|
|
1272
1272
|
vertical: "resize-y"
|
|
1273
1273
|
}),
|
|
1274
1274
|
[]
|
|
1275
|
-
),
|
|
1275
|
+
), l = d(
|
|
1276
1276
|
() => e(
|
|
1277
1277
|
"block",
|
|
1278
1278
|
"w-full",
|
|
1279
|
-
|
|
1279
|
+
z("md"),
|
|
1280
1280
|
u("base", "px"),
|
|
1281
1281
|
u("md", "py"),
|
|
1282
1282
|
"border",
|
|
1283
|
-
|
|
1283
|
+
E("body"),
|
|
1284
1284
|
"focus:outline-none",
|
|
1285
1285
|
"focus:ring-2",
|
|
1286
1286
|
"focus:ring-offset-2",
|
|
1287
|
-
g[
|
|
1288
|
-
|
|
1289
|
-
|
|
1287
|
+
g[t],
|
|
1288
|
+
s ? e("border-error", x) : e("border-line-default", x),
|
|
1289
|
+
r
|
|
1290
1290
|
),
|
|
1291
|
-
[
|
|
1291
|
+
[t, g, s, x, r]
|
|
1292
1292
|
), f = d(
|
|
1293
|
-
() =>
|
|
1294
|
-
[
|
|
1293
|
+
() => s && o.id ? `${o.id}-error` : void 0,
|
|
1294
|
+
[s, o.id]
|
|
1295
1295
|
);
|
|
1296
1296
|
return /* @__PURE__ */ a.jsx(
|
|
1297
1297
|
"textarea",
|
|
1298
|
-
|
|
1299
|
-
ref:
|
|
1300
|
-
className:
|
|
1301
|
-
"aria-invalid":
|
|
1298
|
+
N({
|
|
1299
|
+
ref: i,
|
|
1300
|
+
className: l,
|
|
1301
|
+
"aria-invalid": s,
|
|
1302
1302
|
"aria-describedby": f
|
|
1303
1303
|
}, o)
|
|
1304
1304
|
);
|
|
1305
1305
|
})
|
|
1306
1306
|
);
|
|
1307
|
-
|
|
1308
|
-
const
|
|
1309
|
-
O(function(n,
|
|
1310
|
-
var c = n, { variant:
|
|
1311
|
-
const
|
|
1307
|
+
Xe.displayName = "Textarea";
|
|
1308
|
+
const Ze = U(
|
|
1309
|
+
O(function(n, i) {
|
|
1310
|
+
var c = n, { variant: s = "default", className: t = "", children: r } = c, o = C(c, ["variant", "className", "children"]);
|
|
1311
|
+
const b = d(
|
|
1312
1312
|
() => e(
|
|
1313
1313
|
"block",
|
|
1314
|
-
|
|
1314
|
+
E("label"),
|
|
1315
1315
|
ie("label"),
|
|
1316
|
-
|
|
1316
|
+
"text-fg-primary"
|
|
1317
1317
|
),
|
|
1318
1318
|
[]
|
|
1319
1319
|
), p = d(
|
|
@@ -1322,58 +1322,56 @@ const Ye = _(
|
|
|
1322
1322
|
required: e(
|
|
1323
1323
|
"after:content-['*']",
|
|
1324
1324
|
`after:${u("0.5", "ml")}`,
|
|
1325
|
-
"after:text-
|
|
1326
|
-
// error DEFAULT color
|
|
1325
|
+
"after:text-fg-error"
|
|
1327
1326
|
),
|
|
1328
1327
|
optional: e(
|
|
1329
1328
|
"after:content-['(optional)']",
|
|
1330
1329
|
"after:ml-1",
|
|
1331
1330
|
// xs spacing = 1 (4px) - note: test expects ml-1, not ml-0.5
|
|
1332
|
-
"after:text-
|
|
1333
|
-
// neutral DEFAULT color
|
|
1331
|
+
"after:text-fg-tertiary",
|
|
1334
1332
|
"after:font-normal"
|
|
1335
1333
|
)
|
|
1336
1334
|
}),
|
|
1337
1335
|
[]
|
|
1338
1336
|
), x = d(
|
|
1339
|
-
() => e(
|
|
1340
|
-
[
|
|
1337
|
+
() => e(b, p[s], t),
|
|
1338
|
+
[b, p, s, t]
|
|
1341
1339
|
);
|
|
1342
|
-
return /* @__PURE__ */ a.jsx("label",
|
|
1340
|
+
return /* @__PURE__ */ a.jsx("label", R(N({ ref: i, className: x }, o), { children: r }));
|
|
1343
1341
|
})
|
|
1344
1342
|
);
|
|
1345
|
-
|
|
1346
|
-
function
|
|
1347
|
-
var
|
|
1348
|
-
message:
|
|
1349
|
-
id:
|
|
1350
|
-
className:
|
|
1351
|
-
} =
|
|
1343
|
+
Ze.displayName = "Label";
|
|
1344
|
+
function fr(o) {
|
|
1345
|
+
var i = o, {
|
|
1346
|
+
message: m,
|
|
1347
|
+
id: s,
|
|
1348
|
+
className: t = ""
|
|
1349
|
+
} = i, r = C(i, [
|
|
1352
1350
|
"message",
|
|
1353
1351
|
"id",
|
|
1354
1352
|
"className"
|
|
1355
1353
|
]);
|
|
1356
1354
|
const n = [
|
|
1357
1355
|
u("xs", "mt"),
|
|
1358
|
-
|
|
1356
|
+
E("bodySmall"),
|
|
1359
1357
|
"text-fg-error",
|
|
1360
1358
|
"flex",
|
|
1361
1359
|
"items-center",
|
|
1362
1360
|
u("xs", "gap")
|
|
1363
|
-
], c = e(...n,
|
|
1364
|
-
return /* @__PURE__ */ a.jsxs("div",
|
|
1365
|
-
/* @__PURE__ */ a.jsx(
|
|
1366
|
-
/* @__PURE__ */ a.jsx("span", { children:
|
|
1361
|
+
], c = e(...n, t);
|
|
1362
|
+
return /* @__PURE__ */ a.jsxs("div", R(N({ role: "alert", id: s, className: c, "aria-live": "polite" }, r), { children: [
|
|
1363
|
+
/* @__PURE__ */ a.jsx(Ae, { className: "h-4 w-4 shrink-0", "aria-hidden": "true" }),
|
|
1364
|
+
/* @__PURE__ */ a.jsx("span", { children: m })
|
|
1367
1365
|
] }));
|
|
1368
1366
|
}
|
|
1369
|
-
function
|
|
1370
|
-
var p =
|
|
1371
|
-
content:
|
|
1372
|
-
children:
|
|
1373
|
-
position:
|
|
1374
|
-
delay:
|
|
1367
|
+
function mr(b) {
|
|
1368
|
+
var p = b, {
|
|
1369
|
+
content: m,
|
|
1370
|
+
children: s,
|
|
1371
|
+
position: t = "top",
|
|
1372
|
+
delay: r = 200,
|
|
1375
1373
|
className: o = "",
|
|
1376
|
-
"aria-label":
|
|
1374
|
+
"aria-label": i,
|
|
1377
1375
|
preservePositioning: n = !1
|
|
1378
1376
|
} = p, c = C(p, [
|
|
1379
1377
|
"content",
|
|
@@ -1384,47 +1382,47 @@ function pt(m) {
|
|
|
1384
1382
|
"aria-label",
|
|
1385
1383
|
"preservePositioning"
|
|
1386
1384
|
]);
|
|
1387
|
-
const [x, g] =
|
|
1388
|
-
const
|
|
1385
|
+
const [x, g] = Y(!1), l = te(null), f = te(null), y = te(null), h = `tooltip-${Math.random().toString(36).substr(2, 9)}`, j = () => {
|
|
1386
|
+
const V = setTimeout(() => {
|
|
1389
1387
|
g(!0);
|
|
1390
|
-
},
|
|
1391
|
-
|
|
1392
|
-
}, L = () => {
|
|
1393
|
-
i.current && (clearTimeout(i.current), i.current = null), g(!1);
|
|
1394
|
-
}, E = () => {
|
|
1395
|
-
g(!0);
|
|
1388
|
+
}, r);
|
|
1389
|
+
l.current = V;
|
|
1396
1390
|
}, S = () => {
|
|
1391
|
+
l.current && (clearTimeout(l.current), l.current = null), g(!1);
|
|
1392
|
+
}, k = () => {
|
|
1393
|
+
g(!0);
|
|
1394
|
+
}, L = () => {
|
|
1397
1395
|
g(!1);
|
|
1398
|
-
},
|
|
1399
|
-
var
|
|
1400
|
-
|
|
1396
|
+
}, A = (V) => {
|
|
1397
|
+
var w;
|
|
1398
|
+
V.key === "Escape" && (g(!1), (w = y.current) == null || w.blur());
|
|
1401
1399
|
};
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
}, []),
|
|
1400
|
+
ae(() => () => {
|
|
1401
|
+
l.current && (clearTimeout(l.current), l.current = null);
|
|
1402
|
+
}, []), ae(() => {
|
|
1405
1403
|
if (!x) return;
|
|
1406
|
-
const
|
|
1407
|
-
f.current && !f.current.contains(
|
|
1404
|
+
const V = (w) => {
|
|
1405
|
+
f.current && !f.current.contains(w.target) && y.current && !y.current.contains(w.target) && g(!1);
|
|
1408
1406
|
};
|
|
1409
|
-
return document.addEventListener("mousedown",
|
|
1410
|
-
document.removeEventListener("mousedown",
|
|
1407
|
+
return document.addEventListener("mousedown", V), () => {
|
|
1408
|
+
document.removeEventListener("mousedown", V);
|
|
1411
1409
|
};
|
|
1412
1410
|
}, [x]);
|
|
1413
|
-
const v = (
|
|
1414
|
-
top: "border-t-
|
|
1415
|
-
bottom: "border-b-
|
|
1416
|
-
left: "border-l-
|
|
1417
|
-
right: "border-r-
|
|
1418
|
-
})[
|
|
1411
|
+
const v = (V) => ({
|
|
1412
|
+
top: "border-t-surface-inverse",
|
|
1413
|
+
bottom: "border-b-surface-inverse",
|
|
1414
|
+
left: "border-l-surface-inverse",
|
|
1415
|
+
right: "border-r-surface-inverse"
|
|
1416
|
+
})[V], F = H(
|
|
1419
1417
|
e(
|
|
1420
1418
|
"absolute",
|
|
1421
|
-
|
|
1419
|
+
$e("tooltip"),
|
|
1422
1420
|
u("sm", "px"),
|
|
1423
1421
|
u("xs", "py"),
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1422
|
+
E("caption"),
|
|
1423
|
+
"text-fg-inverse",
|
|
1424
|
+
"bg-surface-inverse",
|
|
1425
|
+
z("md"),
|
|
1428
1426
|
"shadow-lg",
|
|
1429
1427
|
"whitespace-nowrap"
|
|
1430
1428
|
),
|
|
@@ -1465,12 +1463,12 @@ function pt(m) {
|
|
|
1465
1463
|
position: "top"
|
|
1466
1464
|
}
|
|
1467
1465
|
}
|
|
1468
|
-
),
|
|
1466
|
+
), W = H(
|
|
1469
1467
|
e(
|
|
1470
1468
|
"absolute",
|
|
1471
1469
|
"w-0",
|
|
1472
1470
|
"h-0",
|
|
1473
|
-
|
|
1471
|
+
Le("thick"),
|
|
1474
1472
|
"border-transparent"
|
|
1475
1473
|
),
|
|
1476
1474
|
{
|
|
@@ -1510,62 +1508,62 @@ function pt(m) {
|
|
|
1510
1508
|
position: "top"
|
|
1511
1509
|
}
|
|
1512
1510
|
}
|
|
1513
|
-
), P =
|
|
1514
|
-
const
|
|
1515
|
-
return
|
|
1516
|
-
ref: (
|
|
1517
|
-
y.current =
|
|
1511
|
+
), P = we(s) ? (() => {
|
|
1512
|
+
const V = s, w = V.props, B = w.ref;
|
|
1513
|
+
return je(V, {
|
|
1514
|
+
ref: ($) => {
|
|
1515
|
+
y.current = $, typeof B == "function" ? B($) : B && typeof B == "object" && "current" in B && (B.current = $);
|
|
1518
1516
|
},
|
|
1519
|
-
"aria-describedby": x ?
|
|
1520
|
-
onMouseEnter: (
|
|
1521
|
-
var
|
|
1522
|
-
|
|
1517
|
+
"aria-describedby": x ? h : w["aria-describedby"],
|
|
1518
|
+
onMouseEnter: ($) => {
|
|
1519
|
+
var M;
|
|
1520
|
+
j(), (M = w.onMouseEnter) == null || M.call(w, $);
|
|
1523
1521
|
},
|
|
1524
|
-
onMouseLeave: (
|
|
1525
|
-
var
|
|
1526
|
-
|
|
1522
|
+
onMouseLeave: ($) => {
|
|
1523
|
+
var M;
|
|
1524
|
+
S(), (M = w.onMouseLeave) == null || M.call(w, $);
|
|
1527
1525
|
},
|
|
1528
|
-
onFocus: (
|
|
1529
|
-
var
|
|
1530
|
-
|
|
1526
|
+
onFocus: ($) => {
|
|
1527
|
+
var M;
|
|
1528
|
+
k(), (M = w.onFocus) == null || M.call(w, $);
|
|
1531
1529
|
},
|
|
1532
|
-
onBlur: (
|
|
1533
|
-
var
|
|
1534
|
-
|
|
1530
|
+
onBlur: ($) => {
|
|
1531
|
+
var M;
|
|
1532
|
+
L(), (M = w.onBlur) == null || M.call(w, $);
|
|
1535
1533
|
},
|
|
1536
|
-
onKeyDown: (
|
|
1537
|
-
var
|
|
1538
|
-
|
|
1534
|
+
onKeyDown: ($) => {
|
|
1535
|
+
var M;
|
|
1536
|
+
A($), (M = w.onKeyDown) == null || M.call(w, $);
|
|
1539
1537
|
}
|
|
1540
1538
|
});
|
|
1541
|
-
})() :
|
|
1542
|
-
return /* @__PURE__ */ a.jsxs("div",
|
|
1539
|
+
})() : s, Z = n ? e("static", "inline-block", o) : e("relative", "inline-block", o);
|
|
1540
|
+
return /* @__PURE__ */ a.jsxs("div", R(N({ className: Z }, c), { children: [
|
|
1543
1541
|
P,
|
|
1544
1542
|
x && /* @__PURE__ */ a.jsxs(
|
|
1545
1543
|
"div",
|
|
1546
1544
|
{
|
|
1547
1545
|
ref: f,
|
|
1548
|
-
id:
|
|
1549
|
-
className: e(
|
|
1546
|
+
id: h,
|
|
1547
|
+
className: e(F({ position: t })),
|
|
1550
1548
|
role: "tooltip",
|
|
1551
1549
|
"aria-live": "polite",
|
|
1552
1550
|
children: [
|
|
1553
|
-
|
|
1554
|
-
/* @__PURE__ */ a.jsx("div", { className: e(
|
|
1551
|
+
m,
|
|
1552
|
+
/* @__PURE__ */ a.jsx("div", { className: e(W({ position: t })), "aria-hidden": "true" })
|
|
1555
1553
|
]
|
|
1556
1554
|
}
|
|
1557
1555
|
)
|
|
1558
1556
|
] }));
|
|
1559
1557
|
}
|
|
1560
|
-
function
|
|
1561
|
-
var
|
|
1562
|
-
variant:
|
|
1563
|
-
width:
|
|
1564
|
-
height:
|
|
1565
|
-
lines:
|
|
1558
|
+
function br(c) {
|
|
1559
|
+
var b = c, {
|
|
1560
|
+
variant: m = "text",
|
|
1561
|
+
width: s,
|
|
1562
|
+
height: t,
|
|
1563
|
+
lines: r = 1,
|
|
1566
1564
|
className: o = "",
|
|
1567
|
-
"aria-label":
|
|
1568
|
-
} =
|
|
1565
|
+
"aria-label": i
|
|
1566
|
+
} = b, n = C(b, [
|
|
1569
1567
|
"variant",
|
|
1570
1568
|
"width",
|
|
1571
1569
|
"height",
|
|
@@ -1575,87 +1573,87 @@ function xt(c) {
|
|
|
1575
1573
|
]);
|
|
1576
1574
|
const p = [
|
|
1577
1575
|
"motion-safe:animate-pulse",
|
|
1578
|
-
|
|
1579
|
-
|
|
1576
|
+
"bg-surface-muted",
|
|
1577
|
+
z("sm")
|
|
1580
1578
|
], x = {
|
|
1581
1579
|
text: "h-4",
|
|
1582
1580
|
card: "h-32",
|
|
1583
1581
|
list: "h-12",
|
|
1584
1582
|
circle: "rounded-full"
|
|
1585
|
-
}, g = e(...p, x[
|
|
1586
|
-
|
|
1587
|
-
const f =
|
|
1588
|
-
return
|
|
1583
|
+
}, g = e(...p, x[m], o), l = {};
|
|
1584
|
+
s && (l.width = s), t && (l.height = t);
|
|
1585
|
+
const f = i || `Loading ${m} content`;
|
|
1586
|
+
return m === "text" && r > 1 ? /* @__PURE__ */ a.jsx(
|
|
1589
1587
|
"div",
|
|
1590
|
-
|
|
1588
|
+
R(N({
|
|
1591
1589
|
className: u("sm", "space-y"),
|
|
1592
1590
|
role: "status",
|
|
1593
1591
|
"aria-busy": "true",
|
|
1594
1592
|
"aria-label": f
|
|
1595
1593
|
}, n), {
|
|
1596
|
-
children: Array.from({ length:
|
|
1594
|
+
children: Array.from({ length: r }).map((y, h) => /* @__PURE__ */ a.jsx(
|
|
1597
1595
|
"div",
|
|
1598
1596
|
{
|
|
1599
1597
|
className: g,
|
|
1600
|
-
style:
|
|
1598
|
+
style: h === r - 1 ? { width: "75%" } : l,
|
|
1601
1599
|
"aria-hidden": "true"
|
|
1602
1600
|
},
|
|
1603
|
-
|
|
1601
|
+
h
|
|
1604
1602
|
))
|
|
1605
1603
|
})
|
|
1606
1604
|
) : /* @__PURE__ */ a.jsx(
|
|
1607
1605
|
"div",
|
|
1608
|
-
|
|
1606
|
+
N({
|
|
1609
1607
|
className: g,
|
|
1610
|
-
style:
|
|
1608
|
+
style: l,
|
|
1611
1609
|
role: "status",
|
|
1612
1610
|
"aria-busy": "true",
|
|
1613
1611
|
"aria-label": f
|
|
1614
1612
|
}, n)
|
|
1615
1613
|
);
|
|
1616
1614
|
}
|
|
1617
|
-
function
|
|
1618
|
-
defaultOpen:
|
|
1619
|
-
open:
|
|
1620
|
-
onOpenChange:
|
|
1621
|
-
storageKey:
|
|
1615
|
+
function Je({
|
|
1616
|
+
defaultOpen: m = !0,
|
|
1617
|
+
open: s,
|
|
1618
|
+
onOpenChange: t,
|
|
1619
|
+
storageKey: r
|
|
1622
1620
|
}) {
|
|
1623
|
-
const o =
|
|
1624
|
-
if (
|
|
1625
|
-
const x = localStorage.getItem(
|
|
1621
|
+
const o = _(() => {
|
|
1622
|
+
if (r && typeof window != "undefined") {
|
|
1623
|
+
const x = localStorage.getItem(r);
|
|
1626
1624
|
if (x !== null)
|
|
1627
1625
|
return x === "true";
|
|
1628
1626
|
}
|
|
1629
|
-
return
|
|
1630
|
-
}, [
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
}, [
|
|
1634
|
-
const
|
|
1627
|
+
return m;
|
|
1628
|
+
}, [m, r]), [i, n] = Y(o), c = s !== void 0 ? s : i;
|
|
1629
|
+
ae(() => {
|
|
1630
|
+
r && typeof window != "undefined" && s === void 0 && localStorage.setItem(r, String(i));
|
|
1631
|
+
}, [i, r, s]);
|
|
1632
|
+
const b = _(
|
|
1635
1633
|
(x) => {
|
|
1636
|
-
|
|
1634
|
+
s === void 0 && n(x), t == null || t(x);
|
|
1637
1635
|
},
|
|
1638
|
-
[
|
|
1639
|
-
), p =
|
|
1640
|
-
|
|
1641
|
-
}, [c,
|
|
1636
|
+
[s, t]
|
|
1637
|
+
), p = _(() => {
|
|
1638
|
+
b(!c);
|
|
1639
|
+
}, [c, b]);
|
|
1642
1640
|
return {
|
|
1643
1641
|
isOpen: c,
|
|
1644
1642
|
toggle: p,
|
|
1645
|
-
setOpen:
|
|
1643
|
+
setOpen: b
|
|
1646
1644
|
};
|
|
1647
1645
|
}
|
|
1648
|
-
function
|
|
1646
|
+
function gr(x) {
|
|
1649
1647
|
var g = x, {
|
|
1650
|
-
children:
|
|
1651
|
-
trigger:
|
|
1652
|
-
defaultOpen:
|
|
1653
|
-
open:
|
|
1648
|
+
children: m,
|
|
1649
|
+
trigger: s,
|
|
1650
|
+
defaultOpen: t = !0,
|
|
1651
|
+
open: r,
|
|
1654
1652
|
onOpenChange: o,
|
|
1655
|
-
disabled:
|
|
1653
|
+
disabled: i = !1,
|
|
1656
1654
|
duration: n = 200,
|
|
1657
1655
|
storageKey: c,
|
|
1658
|
-
className:
|
|
1656
|
+
className: b = ""
|
|
1659
1657
|
} = g, p = C(g, [
|
|
1660
1658
|
"children",
|
|
1661
1659
|
"trigger",
|
|
@@ -1667,37 +1665,37 @@ function yt(x) {
|
|
|
1667
1665
|
"storageKey",
|
|
1668
1666
|
"className"
|
|
1669
1667
|
]);
|
|
1670
|
-
const { isOpen:
|
|
1671
|
-
defaultOpen:
|
|
1672
|
-
open:
|
|
1668
|
+
const { isOpen: l, toggle: f } = Je({
|
|
1669
|
+
defaultOpen: t,
|
|
1670
|
+
open: r,
|
|
1673
1671
|
onOpenChange: o,
|
|
1674
1672
|
storageKey: c
|
|
1675
|
-
}), y =
|
|
1676
|
-
|
|
1677
|
-
y.current &&
|
|
1678
|
-
}, [
|
|
1679
|
-
if (!
|
|
1680
|
-
const
|
|
1681
|
-
y.current &&
|
|
1673
|
+
}), y = te(null), [h, j] = Y(l ? "auto" : 0);
|
|
1674
|
+
ae(() => {
|
|
1675
|
+
y.current && j(l ? y.current.scrollHeight : 0);
|
|
1676
|
+
}, [l, m]), ae(() => {
|
|
1677
|
+
if (!l || !y.current) return;
|
|
1678
|
+
const k = new ResizeObserver(() => {
|
|
1679
|
+
y.current && l && j(y.current.scrollHeight);
|
|
1682
1680
|
});
|
|
1683
|
-
return
|
|
1684
|
-
|
|
1681
|
+
return k.observe(y.current), () => {
|
|
1682
|
+
k.disconnect();
|
|
1685
1683
|
};
|
|
1686
|
-
}, [
|
|
1687
|
-
const
|
|
1688
|
-
return /* @__PURE__ */ a.jsxs("div",
|
|
1684
|
+
}, [l]);
|
|
1685
|
+
const S = `collapsible-content-${Math.random().toString(36).substr(2, 9)}`;
|
|
1686
|
+
return /* @__PURE__ */ a.jsxs("div", R(N({ className: b }, p), { children: [
|
|
1689
1687
|
/* @__PURE__ */ a.jsx(
|
|
1690
1688
|
"button",
|
|
1691
1689
|
{
|
|
1692
1690
|
type: "button",
|
|
1693
1691
|
onClick: f,
|
|
1694
|
-
onKeyDown: (
|
|
1695
|
-
(
|
|
1692
|
+
onKeyDown: (k) => {
|
|
1693
|
+
(k.key === "Enter" || k.key === " ") && (k.preventDefault(), i || f());
|
|
1696
1694
|
},
|
|
1697
|
-
disabled:
|
|
1698
|
-
"aria-expanded":
|
|
1699
|
-
"aria-controls":
|
|
1700
|
-
"aria-disabled":
|
|
1695
|
+
disabled: i,
|
|
1696
|
+
"aria-expanded": l,
|
|
1697
|
+
"aria-controls": S,
|
|
1698
|
+
"aria-disabled": i,
|
|
1701
1699
|
className: e(
|
|
1702
1700
|
"w-full",
|
|
1703
1701
|
"text-left",
|
|
@@ -1705,38 +1703,38 @@ function yt(x) {
|
|
|
1705
1703
|
"focus:ring-2",
|
|
1706
1704
|
"focus:ring-line-brand",
|
|
1707
1705
|
"focus:ring-offset-2",
|
|
1708
|
-
|
|
1706
|
+
z("md")
|
|
1709
1707
|
),
|
|
1710
|
-
children:
|
|
1708
|
+
children: s
|
|
1711
1709
|
}
|
|
1712
1710
|
),
|
|
1713
1711
|
/* @__PURE__ */ a.jsx(
|
|
1714
1712
|
"div",
|
|
1715
1713
|
{
|
|
1716
|
-
id:
|
|
1714
|
+
id: S,
|
|
1717
1715
|
ref: y,
|
|
1718
1716
|
style: {
|
|
1719
|
-
height: typeof
|
|
1717
|
+
height: typeof h == "number" ? `${h}px` : h,
|
|
1720
1718
|
overflow: "hidden",
|
|
1721
1719
|
transition: `height ${n}ms ease-in-out`
|
|
1722
1720
|
},
|
|
1723
|
-
"aria-hidden": !
|
|
1724
|
-
children: /* @__PURE__ */ a.jsx("div", { children:
|
|
1721
|
+
"aria-hidden": !l,
|
|
1722
|
+
children: /* @__PURE__ */ a.jsx("div", { children: m })
|
|
1725
1723
|
}
|
|
1726
1724
|
)
|
|
1727
1725
|
] }));
|
|
1728
1726
|
}
|
|
1729
|
-
const
|
|
1727
|
+
const Qe = U(
|
|
1730
1728
|
O(function(x, p) {
|
|
1731
1729
|
var g = x, {
|
|
1732
|
-
id:
|
|
1733
|
-
label:
|
|
1734
|
-
error:
|
|
1730
|
+
id: s,
|
|
1731
|
+
label: t,
|
|
1732
|
+
error: r = !1,
|
|
1735
1733
|
helperText: o,
|
|
1736
|
-
className:
|
|
1734
|
+
className: i = "",
|
|
1737
1735
|
disabled: n = !1,
|
|
1738
1736
|
indeterminate: c = !1
|
|
1739
|
-
} = g,
|
|
1737
|
+
} = g, b = C(g, [
|
|
1740
1738
|
"id",
|
|
1741
1739
|
"label",
|
|
1742
1740
|
"error",
|
|
@@ -1745,93 +1743,93 @@ const Ke = _(
|
|
|
1745
1743
|
"disabled",
|
|
1746
1744
|
"indeterminate"
|
|
1747
1745
|
]);
|
|
1748
|
-
const
|
|
1749
|
-
() =>
|
|
1750
|
-
[
|
|
1746
|
+
const l = d(
|
|
1747
|
+
() => s || `checkbox-${Math.random().toString(36).substr(2, 9)}`,
|
|
1748
|
+
[s]
|
|
1751
1749
|
), f = d(
|
|
1752
|
-
() =>
|
|
1753
|
-
[
|
|
1750
|
+
() => r ? `${l}-error` : void 0,
|
|
1751
|
+
[r, l]
|
|
1754
1752
|
), y = d(
|
|
1755
|
-
() => o ? `${
|
|
1756
|
-
[o,
|
|
1757
|
-
),
|
|
1758
|
-
() =>
|
|
1759
|
-
[
|
|
1760
|
-
),
|
|
1753
|
+
() => o ? `${l}-helper` : void 0,
|
|
1754
|
+
[o, l]
|
|
1755
|
+
), h = d(() => "focus:border-line-focus", []), j = d(() => "focus:border-error", []), S = d(
|
|
1756
|
+
() => r ? j.replace("focus:border-", "focus:ring-") : h.replace("focus:border-", "focus:ring-"),
|
|
1757
|
+
[r, j, h]
|
|
1758
|
+
), k = d(
|
|
1761
1759
|
() => e(
|
|
1762
1760
|
"h-4",
|
|
1763
1761
|
"w-4",
|
|
1764
|
-
|
|
1762
|
+
z("sm"),
|
|
1765
1763
|
"border",
|
|
1766
|
-
|
|
1764
|
+
"border-line-default",
|
|
1767
1765
|
"text-fg-brand",
|
|
1768
1766
|
"focus:ring-2",
|
|
1769
|
-
|
|
1767
|
+
S,
|
|
1770
1768
|
"focus:ring-offset-2",
|
|
1771
1769
|
"disabled:opacity-50",
|
|
1772
1770
|
"disabled:cursor-not-allowed",
|
|
1773
1771
|
"cursor-pointer",
|
|
1774
|
-
|
|
1775
|
-
|
|
1772
|
+
r && "border-error",
|
|
1773
|
+
i
|
|
1776
1774
|
),
|
|
1777
|
-
[
|
|
1778
|
-
),
|
|
1775
|
+
[S, r, i]
|
|
1776
|
+
), L = d(
|
|
1779
1777
|
() => e(
|
|
1780
|
-
|
|
1778
|
+
T("label"),
|
|
1781
1779
|
u("sm", "ml"),
|
|
1782
1780
|
n ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
1783
1781
|
),
|
|
1784
1782
|
[n]
|
|
1785
|
-
),
|
|
1786
|
-
(
|
|
1787
|
-
|
|
1783
|
+
), A = te(null), v = _(
|
|
1784
|
+
(F) => {
|
|
1785
|
+
A.current = F, typeof p == "function" ? p(F) : p && (p.current = F), F && (F.indeterminate = c);
|
|
1788
1786
|
},
|
|
1789
1787
|
[p, c]
|
|
1790
1788
|
);
|
|
1791
|
-
return
|
|
1792
|
-
|
|
1789
|
+
return ae(() => {
|
|
1790
|
+
A.current && (A.current.indeterminate = c);
|
|
1793
1791
|
}, [c]), /* @__PURE__ */ a.jsxs("div", { className: e("flex", "flex-col", u("sm", "my")), children: [
|
|
1794
1792
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center", children: [
|
|
1795
1793
|
/* @__PURE__ */ a.jsx(
|
|
1796
1794
|
"input",
|
|
1797
|
-
|
|
1795
|
+
N({
|
|
1798
1796
|
type: "checkbox",
|
|
1799
|
-
id:
|
|
1797
|
+
id: l,
|
|
1800
1798
|
ref: v,
|
|
1801
|
-
className:
|
|
1799
|
+
className: k,
|
|
1802
1800
|
disabled: n,
|
|
1803
|
-
"aria-invalid":
|
|
1801
|
+
"aria-invalid": r,
|
|
1804
1802
|
"aria-describedby": f || y || void 0,
|
|
1805
|
-
"aria-label":
|
|
1806
|
-
},
|
|
1803
|
+
"aria-label": t ? void 0 : "Checkbox"
|
|
1804
|
+
}, b)
|
|
1807
1805
|
),
|
|
1808
|
-
|
|
1806
|
+
t && /* @__PURE__ */ a.jsx("label", { htmlFor: l, className: L, children: t })
|
|
1809
1807
|
] }),
|
|
1810
|
-
(
|
|
1808
|
+
(r || o) && /* @__PURE__ */ a.jsx(
|
|
1811
1809
|
"div",
|
|
1812
1810
|
{
|
|
1813
1811
|
id: f || y,
|
|
1814
1812
|
className: e(
|
|
1815
1813
|
u("xs", "mt"),
|
|
1816
|
-
|
|
1817
|
-
|
|
1814
|
+
T("caption"),
|
|
1815
|
+
r ? "text-fg-error" : "text-fg-secondary"
|
|
1818
1816
|
),
|
|
1819
|
-
role:
|
|
1820
|
-
children:
|
|
1817
|
+
role: r ? "alert" : void 0,
|
|
1818
|
+
children: r ? o || "This field has an error" : o
|
|
1821
1819
|
}
|
|
1822
1820
|
)
|
|
1823
1821
|
] });
|
|
1824
1822
|
})
|
|
1825
1823
|
);
|
|
1826
|
-
|
|
1827
|
-
const
|
|
1828
|
-
O(function(p,
|
|
1824
|
+
Qe.displayName = "Checkbox";
|
|
1825
|
+
const Ye = U(
|
|
1826
|
+
O(function(p, b) {
|
|
1829
1827
|
var x = p, {
|
|
1830
|
-
id:
|
|
1831
|
-
label:
|
|
1832
|
-
error:
|
|
1828
|
+
id: s,
|
|
1829
|
+
label: t,
|
|
1830
|
+
error: r = !1,
|
|
1833
1831
|
helperText: o,
|
|
1834
|
-
className:
|
|
1832
|
+
className: i = "",
|
|
1835
1833
|
disabled: n = !1
|
|
1836
1834
|
} = x, c = C(x, [
|
|
1837
1835
|
"id",
|
|
@@ -1842,37 +1840,37 @@ const et = _(
|
|
|
1842
1840
|
"disabled"
|
|
1843
1841
|
]);
|
|
1844
1842
|
const g = d(
|
|
1845
|
-
() =>
|
|
1846
|
-
[
|
|
1847
|
-
),
|
|
1848
|
-
() =>
|
|
1849
|
-
[
|
|
1843
|
+
() => s || `radio-${Math.random().toString(36).substr(2, 9)}`,
|
|
1844
|
+
[s]
|
|
1845
|
+
), l = d(
|
|
1846
|
+
() => r ? `${g}-error` : void 0,
|
|
1847
|
+
[r, g]
|
|
1850
1848
|
), f = d(
|
|
1851
1849
|
() => o ? `${g}-helper` : void 0,
|
|
1852
1850
|
[o, g]
|
|
1853
|
-
), y = d(() => "focus:border-line-focus", []),
|
|
1854
|
-
() =>
|
|
1855
|
-
[
|
|
1856
|
-
),
|
|
1851
|
+
), y = d(() => "focus:border-line-focus", []), h = d(() => "focus:border-error", []), j = d(
|
|
1852
|
+
() => r ? h.replace("focus:border-", "focus:ring-") : y.replace("focus:border-", "focus:ring-"),
|
|
1853
|
+
[r, h, y]
|
|
1854
|
+
), S = d(
|
|
1857
1855
|
() => e(
|
|
1858
1856
|
"h-4",
|
|
1859
1857
|
"w-4",
|
|
1860
1858
|
"border",
|
|
1861
|
-
|
|
1859
|
+
"border-line-default",
|
|
1862
1860
|
"text-fg-brand",
|
|
1863
1861
|
"focus:ring-2",
|
|
1864
|
-
|
|
1862
|
+
j,
|
|
1865
1863
|
"focus:ring-offset-2",
|
|
1866
1864
|
"disabled:opacity-50",
|
|
1867
1865
|
"disabled:cursor-not-allowed",
|
|
1868
1866
|
"cursor-pointer",
|
|
1869
|
-
|
|
1870
|
-
|
|
1867
|
+
r && "border-error",
|
|
1868
|
+
i
|
|
1871
1869
|
),
|
|
1872
|
-
[
|
|
1873
|
-
),
|
|
1870
|
+
[j, r, i]
|
|
1871
|
+
), k = d(
|
|
1874
1872
|
() => e(
|
|
1875
|
-
|
|
1873
|
+
T("label"),
|
|
1876
1874
|
u("sm", "ml"),
|
|
1877
1875
|
n ? "opacity-50 cursor-not-allowed" : "cursor-pointer"
|
|
1878
1876
|
),
|
|
@@ -1882,37 +1880,37 @@ const et = _(
|
|
|
1882
1880
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center", children: [
|
|
1883
1881
|
/* @__PURE__ */ a.jsx(
|
|
1884
1882
|
"input",
|
|
1885
|
-
|
|
1883
|
+
N({
|
|
1886
1884
|
type: "radio",
|
|
1887
1885
|
id: g,
|
|
1888
|
-
ref:
|
|
1889
|
-
className:
|
|
1886
|
+
ref: b,
|
|
1887
|
+
className: S,
|
|
1890
1888
|
disabled: n,
|
|
1891
|
-
"aria-invalid":
|
|
1892
|
-
"aria-describedby":
|
|
1893
|
-
"aria-label":
|
|
1889
|
+
"aria-invalid": r,
|
|
1890
|
+
"aria-describedby": l || f || void 0,
|
|
1891
|
+
"aria-label": t ? void 0 : "Radio button"
|
|
1894
1892
|
}, c)
|
|
1895
1893
|
),
|
|
1896
|
-
|
|
1894
|
+
t && /* @__PURE__ */ a.jsx("label", { htmlFor: g, className: k, children: t })
|
|
1897
1895
|
] }),
|
|
1898
|
-
(
|
|
1896
|
+
(r || o) && /* @__PURE__ */ a.jsx(
|
|
1899
1897
|
"div",
|
|
1900
1898
|
{
|
|
1901
|
-
id:
|
|
1899
|
+
id: l || f,
|
|
1902
1900
|
className: e(
|
|
1903
1901
|
u("xs", "mt"),
|
|
1904
|
-
|
|
1905
|
-
|
|
1902
|
+
T("caption"),
|
|
1903
|
+
r ? "text-fg-error" : "text-fg-secondary"
|
|
1906
1904
|
),
|
|
1907
|
-
role:
|
|
1908
|
-
children:
|
|
1905
|
+
role: r ? "alert" : void 0,
|
|
1906
|
+
children: r ? o || "This field has an error" : o
|
|
1909
1907
|
}
|
|
1910
1908
|
)
|
|
1911
1909
|
] });
|
|
1912
1910
|
})
|
|
1913
1911
|
);
|
|
1914
|
-
|
|
1915
|
-
const
|
|
1912
|
+
Ye.displayName = "Radio";
|
|
1913
|
+
const Ge = H("w-full", {
|
|
1916
1914
|
variants: {
|
|
1917
1915
|
size: {
|
|
1918
1916
|
sm: "h-1",
|
|
@@ -1920,19 +1918,19 @@ const tt = H("w-full", {
|
|
|
1920
1918
|
lg: "h-3"
|
|
1921
1919
|
},
|
|
1922
1920
|
variant: {
|
|
1923
|
-
primary:
|
|
1924
|
-
secondary:
|
|
1925
|
-
success: "bg-
|
|
1926
|
-
error: "bg-
|
|
1927
|
-
warning: "bg-
|
|
1928
|
-
info: "bg-
|
|
1921
|
+
primary: "bg-surface-muted",
|
|
1922
|
+
secondary: "bg-surface-muted",
|
|
1923
|
+
success: "bg-success-bg-emphasis",
|
|
1924
|
+
error: "bg-error-bg-emphasis",
|
|
1925
|
+
warning: "bg-warning-bg-emphasis",
|
|
1926
|
+
info: "bg-info-bg-emphasis"
|
|
1929
1927
|
}
|
|
1930
1928
|
},
|
|
1931
1929
|
defaultVariants: {
|
|
1932
1930
|
size: "md",
|
|
1933
1931
|
variant: "primary"
|
|
1934
1932
|
}
|
|
1935
|
-
}),
|
|
1933
|
+
}), ve = H("transition-all", {
|
|
1936
1934
|
variants: {
|
|
1937
1935
|
variant: {
|
|
1938
1936
|
primary: "bg-surface-brand",
|
|
@@ -1946,17 +1944,17 @@ const tt = H("w-full", {
|
|
|
1946
1944
|
defaultVariants: {
|
|
1947
1945
|
variant: "primary"
|
|
1948
1946
|
}
|
|
1949
|
-
}),
|
|
1950
|
-
var
|
|
1951
|
-
value:
|
|
1952
|
-
max:
|
|
1953
|
-
variant:
|
|
1947
|
+
}), Ke = O(function(g, x) {
|
|
1948
|
+
var l = g, {
|
|
1949
|
+
value: s,
|
|
1950
|
+
max: t = 100,
|
|
1951
|
+
variant: r = "primary",
|
|
1954
1952
|
size: o = "md",
|
|
1955
|
-
showLabel:
|
|
1953
|
+
showLabel: i = !1,
|
|
1956
1954
|
label: n,
|
|
1957
1955
|
"aria-label": c,
|
|
1958
|
-
className:
|
|
1959
|
-
} =
|
|
1956
|
+
className: b = ""
|
|
1957
|
+
} = l, p = C(l, [
|
|
1960
1958
|
"value",
|
|
1961
1959
|
"max",
|
|
1962
1960
|
"variant",
|
|
@@ -1966,9 +1964,9 @@ const tt = H("w-full", {
|
|
|
1966
1964
|
"aria-label",
|
|
1967
1965
|
"className"
|
|
1968
1966
|
]);
|
|
1969
|
-
const f =
|
|
1970
|
-
return /* @__PURE__ */ a.jsxs("div",
|
|
1971
|
-
|
|
1967
|
+
const f = s === void 0, y = f ? void 0 : Math.min(Math.max(s / t * 100, 0), 100), h = c || (f ? "Loading in progress" : `Progress: ${y == null ? void 0 : y.toFixed(0)}%`);
|
|
1968
|
+
return /* @__PURE__ */ a.jsxs("div", R(N({ ref: x, className: e("w-full", b) }, p), { children: [
|
|
1969
|
+
i && (n || !f) && /* @__PURE__ */ a.jsxs(
|
|
1972
1970
|
"div",
|
|
1973
1971
|
{
|
|
1974
1972
|
className: e(
|
|
@@ -1982,9 +1980,9 @@ const tt = H("w-full", {
|
|
|
1982
1980
|
"span",
|
|
1983
1981
|
{
|
|
1984
1982
|
className: e(
|
|
1985
|
-
|
|
1983
|
+
E("bodySmall"),
|
|
1986
1984
|
ie("label"),
|
|
1987
|
-
|
|
1985
|
+
"text-fg-primary"
|
|
1988
1986
|
),
|
|
1989
1987
|
children: n
|
|
1990
1988
|
}
|
|
@@ -1993,8 +1991,8 @@ const tt = H("w-full", {
|
|
|
1993
1991
|
"span",
|
|
1994
1992
|
{
|
|
1995
1993
|
className: e(
|
|
1996
|
-
|
|
1997
|
-
|
|
1994
|
+
E("bodySmall"),
|
|
1995
|
+
"text-fg-secondary"
|
|
1998
1996
|
),
|
|
1999
1997
|
children: [
|
|
2000
1998
|
y.toFixed(0),
|
|
@@ -2010,16 +2008,16 @@ const tt = H("w-full", {
|
|
|
2010
2008
|
{
|
|
2011
2009
|
role: "progressbar",
|
|
2012
2010
|
"aria-valuemin": f ? void 0 : 0,
|
|
2013
|
-
"aria-valuemax": f ? void 0 :
|
|
2014
|
-
"aria-valuenow": f ? void 0 :
|
|
2015
|
-
"aria-label":
|
|
2011
|
+
"aria-valuemax": f ? void 0 : t,
|
|
2012
|
+
"aria-valuenow": f ? void 0 : s,
|
|
2013
|
+
"aria-label": h,
|
|
2016
2014
|
"aria-busy": f,
|
|
2017
2015
|
className: e(
|
|
2018
2016
|
"relative",
|
|
2019
2017
|
"w-full",
|
|
2020
2018
|
"overflow-hidden",
|
|
2021
|
-
|
|
2022
|
-
|
|
2019
|
+
Ge({ size: o, variant: r }),
|
|
2020
|
+
z("full")
|
|
2023
2021
|
),
|
|
2024
2022
|
children: f ? /* @__PURE__ */ a.jsx(
|
|
2025
2023
|
"div",
|
|
@@ -2029,8 +2027,8 @@ const tt = H("w-full", {
|
|
|
2029
2027
|
"top-0",
|
|
2030
2028
|
"left-0",
|
|
2031
2029
|
"bottom-0",
|
|
2032
|
-
|
|
2033
|
-
|
|
2030
|
+
ve({ variant: r }),
|
|
2031
|
+
z("full"),
|
|
2034
2032
|
"motion-reduce:animate-none"
|
|
2035
2033
|
),
|
|
2036
2034
|
style: {
|
|
@@ -2043,8 +2041,8 @@ const tt = H("w-full", {
|
|
|
2043
2041
|
{
|
|
2044
2042
|
className: e(
|
|
2045
2043
|
"h-full",
|
|
2046
|
-
|
|
2047
|
-
|
|
2044
|
+
ve({ variant: r }),
|
|
2045
|
+
z("full"),
|
|
2048
2046
|
"transition-all",
|
|
2049
2047
|
"duration-300",
|
|
2050
2048
|
"ease-out"
|
|
@@ -2059,18 +2057,18 @@ const tt = H("w-full", {
|
|
|
2059
2057
|
)
|
|
2060
2058
|
] }));
|
|
2061
2059
|
});
|
|
2062
|
-
|
|
2063
|
-
const
|
|
2064
|
-
O(function(
|
|
2065
|
-
var f =
|
|
2066
|
-
size:
|
|
2067
|
-
label:
|
|
2068
|
-
description:
|
|
2060
|
+
Ke.displayName = "Progress";
|
|
2061
|
+
const er = U(
|
|
2062
|
+
O(function(l, g) {
|
|
2063
|
+
var f = l, {
|
|
2064
|
+
size: s = "md",
|
|
2065
|
+
label: t,
|
|
2066
|
+
description: r,
|
|
2069
2067
|
error: o = !1,
|
|
2070
|
-
className:
|
|
2068
|
+
className: i = "",
|
|
2071
2069
|
disabled: n = !1,
|
|
2072
2070
|
checked: c,
|
|
2073
|
-
onChange:
|
|
2071
|
+
onChange: b,
|
|
2074
2072
|
id: p
|
|
2075
2073
|
} = f, x = C(f, [
|
|
2076
2074
|
"size",
|
|
@@ -2086,16 +2084,16 @@ const st = _(
|
|
|
2086
2084
|
const y = d(
|
|
2087
2085
|
() => p || `switch-${Math.random().toString(36).substr(2, 9)}`,
|
|
2088
2086
|
[p]
|
|
2089
|
-
),
|
|
2090
|
-
() =>
|
|
2091
|
-
[s, y]
|
|
2092
|
-
), N = d(
|
|
2093
|
-
() => t ? `${y}-description` : void 0,
|
|
2087
|
+
), h = d(
|
|
2088
|
+
() => t ? `${y}-label` : void 0,
|
|
2094
2089
|
[t, y]
|
|
2095
|
-
),
|
|
2090
|
+
), j = d(
|
|
2091
|
+
() => r ? `${y}-description` : void 0,
|
|
2092
|
+
[r, y]
|
|
2093
|
+
), S = d(() => Fe(s), [s]), k = d(
|
|
2096
2094
|
() => "focus:border-line-focus".replace("focus:border-", "focus:ring-"),
|
|
2097
2095
|
[]
|
|
2098
|
-
),
|
|
2096
|
+
), L = d(
|
|
2099
2097
|
() => e(
|
|
2100
2098
|
"relative",
|
|
2101
2099
|
"inline-flex",
|
|
@@ -2104,31 +2102,31 @@ const st = _(
|
|
|
2104
2102
|
"rounded-full",
|
|
2105
2103
|
"border-2",
|
|
2106
2104
|
"border-transparent",
|
|
2107
|
-
|
|
2105
|
+
fe("base"),
|
|
2108
2106
|
"focus:outline-none",
|
|
2109
2107
|
"focus:ring-2",
|
|
2110
|
-
|
|
2108
|
+
k,
|
|
2111
2109
|
"focus:ring-offset-2",
|
|
2112
|
-
|
|
2113
|
-
c ? "bg-surface-brand" :
|
|
2110
|
+
S.track,
|
|
2111
|
+
c ? "bg-surface-brand" : "bg-surface-muted",
|
|
2114
2112
|
o && !c && "border-error",
|
|
2115
2113
|
n && "opacity-50 cursor-not-allowed",
|
|
2116
|
-
|
|
2114
|
+
i
|
|
2117
2115
|
),
|
|
2118
|
-
[
|
|
2119
|
-
),
|
|
2116
|
+
[k, S.track, c, o, n, i]
|
|
2117
|
+
), A = d(
|
|
2120
2118
|
() => e(
|
|
2121
2119
|
"pointer-events-none",
|
|
2122
2120
|
"inline-block",
|
|
2123
2121
|
"rounded-full",
|
|
2124
|
-
"bg-
|
|
2122
|
+
"bg-surface-base",
|
|
2125
2123
|
"shadow",
|
|
2126
2124
|
"transform",
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
c ?
|
|
2125
|
+
fe("base"),
|
|
2126
|
+
S.thumb,
|
|
2127
|
+
c ? S.translate : "translate-x-0"
|
|
2130
2128
|
),
|
|
2131
|
-
[
|
|
2129
|
+
[S.thumb, S.translate, c]
|
|
2132
2130
|
);
|
|
2133
2131
|
return /* @__PURE__ */ a.jsxs("div", { className: e("flex", "items-start", u("md", "gap")), children: [
|
|
2134
2132
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center", children: [
|
|
@@ -2136,102 +2134,99 @@ const st = _(
|
|
|
2136
2134
|
"button",
|
|
2137
2135
|
{
|
|
2138
2136
|
type: "button",
|
|
2139
|
-
className:
|
|
2137
|
+
className: L,
|
|
2140
2138
|
role: "switch",
|
|
2141
2139
|
"aria-checked": c,
|
|
2142
|
-
"aria-labelledby":
|
|
2143
|
-
"aria-describedby":
|
|
2140
|
+
"aria-labelledby": h,
|
|
2141
|
+
"aria-describedby": j,
|
|
2144
2142
|
disabled: n,
|
|
2145
|
-
onClick:
|
|
2143
|
+
onClick: _(
|
|
2146
2144
|
(v) => {
|
|
2147
|
-
if (!n &&
|
|
2148
|
-
const
|
|
2149
|
-
target:
|
|
2150
|
-
currentTarget:
|
|
2145
|
+
if (!n && b) {
|
|
2146
|
+
const F = R(N({}, v), {
|
|
2147
|
+
target: R(N({}, v.target), { checked: !c }),
|
|
2148
|
+
currentTarget: R(N({}, v.currentTarget), { checked: !c })
|
|
2151
2149
|
});
|
|
2152
|
-
|
|
2150
|
+
b(F);
|
|
2153
2151
|
}
|
|
2154
2152
|
},
|
|
2155
|
-
[n,
|
|
2153
|
+
[n, b, c]
|
|
2156
2154
|
),
|
|
2157
|
-
onKeyDown:
|
|
2155
|
+
onKeyDown: _(
|
|
2158
2156
|
(v) => {
|
|
2159
|
-
if ((v.key === "Enter" || v.key === " ") && !n &&
|
|
2157
|
+
if ((v.key === "Enter" || v.key === " ") && !n && b) {
|
|
2160
2158
|
v.preventDefault();
|
|
2161
|
-
const
|
|
2162
|
-
target:
|
|
2163
|
-
currentTarget:
|
|
2159
|
+
const F = R(N({}, v), {
|
|
2160
|
+
target: R(N({}, v.target), { checked: !c }),
|
|
2161
|
+
currentTarget: R(N({}, v.currentTarget), { checked: !c })
|
|
2164
2162
|
});
|
|
2165
|
-
|
|
2163
|
+
b(F);
|
|
2166
2164
|
}
|
|
2167
2165
|
},
|
|
2168
|
-
[n,
|
|
2166
|
+
[n, b, c]
|
|
2169
2167
|
),
|
|
2170
|
-
children: /* @__PURE__ */ a.jsx("span", { className:
|
|
2168
|
+
children: /* @__PURE__ */ a.jsx("span", { className: A })
|
|
2171
2169
|
}
|
|
2172
2170
|
),
|
|
2173
2171
|
/* @__PURE__ */ a.jsx(
|
|
2174
2172
|
"input",
|
|
2175
|
-
|
|
2173
|
+
N({
|
|
2176
2174
|
ref: g,
|
|
2177
2175
|
type: "checkbox",
|
|
2178
2176
|
id: y,
|
|
2179
2177
|
checked: c,
|
|
2180
|
-
onChange:
|
|
2178
|
+
onChange: b,
|
|
2181
2179
|
disabled: n,
|
|
2182
2180
|
className: "sr-only",
|
|
2183
2181
|
"aria-hidden": "true"
|
|
2184
2182
|
}, x)
|
|
2185
2183
|
)
|
|
2186
2184
|
] }),
|
|
2187
|
-
(
|
|
2188
|
-
|
|
2185
|
+
(t || r) && /* @__PURE__ */ a.jsxs("div", { className: "flex-1", children: [
|
|
2186
|
+
t && /* @__PURE__ */ a.jsx(
|
|
2189
2187
|
"label",
|
|
2190
2188
|
{
|
|
2191
|
-
id:
|
|
2189
|
+
id: h,
|
|
2192
2190
|
htmlFor: y,
|
|
2193
2191
|
className: e(
|
|
2194
2192
|
"block",
|
|
2195
|
-
|
|
2193
|
+
E("bodySmall"),
|
|
2196
2194
|
ie("label"),
|
|
2197
|
-
o ? "text-fg-error" :
|
|
2195
|
+
o ? "text-fg-error" : "text-fg-primary",
|
|
2198
2196
|
n ? "opacity-50" : "cursor-pointer"
|
|
2199
2197
|
),
|
|
2200
|
-
children:
|
|
2198
|
+
children: t
|
|
2201
2199
|
}
|
|
2202
2200
|
),
|
|
2203
|
-
|
|
2201
|
+
r && /* @__PURE__ */ a.jsx(
|
|
2204
2202
|
"p",
|
|
2205
2203
|
{
|
|
2206
|
-
id:
|
|
2204
|
+
id: j,
|
|
2207
2205
|
className: e(
|
|
2208
2206
|
u("xs", "mt"),
|
|
2209
|
-
|
|
2210
|
-
o ? "text-fg-error" :
|
|
2207
|
+
E("bodySmall"),
|
|
2208
|
+
o ? "text-fg-error" : "text-fg-secondary"
|
|
2211
2209
|
),
|
|
2212
|
-
children:
|
|
2210
|
+
children: r
|
|
2213
2211
|
}
|
|
2214
2212
|
)
|
|
2215
2213
|
] })
|
|
2216
2214
|
] });
|
|
2217
2215
|
})
|
|
2218
2216
|
);
|
|
2219
|
-
|
|
2220
|
-
const
|
|
2221
|
-
var n =
|
|
2222
|
-
orientation:
|
|
2223
|
-
variant:
|
|
2224
|
-
className:
|
|
2217
|
+
er.displayName = "Switch";
|
|
2218
|
+
const rr = U(function(i) {
|
|
2219
|
+
var n = i, {
|
|
2220
|
+
orientation: s = "horizontal",
|
|
2221
|
+
variant: t = "solid",
|
|
2222
|
+
className: r = ""
|
|
2225
2223
|
} = n, o = C(n, [
|
|
2226
2224
|
"orientation",
|
|
2227
2225
|
"variant",
|
|
2228
2226
|
"className"
|
|
2229
2227
|
]);
|
|
2230
2228
|
const c = d(() => {
|
|
2231
|
-
const
|
|
2232
|
-
"border-0",
|
|
2233
|
-
h("neutral", "DEFAULT", "border")
|
|
2234
|
-
], p = {
|
|
2229
|
+
const b = ["border-0", "border-line-default"], p = {
|
|
2235
2230
|
horizontal: "w-full border-t",
|
|
2236
2231
|
vertical: "h-full border-l self-stretch"
|
|
2237
2232
|
}, x = {
|
|
@@ -2240,46 +2235,46 @@ const at = _(function(l) {
|
|
|
2240
2235
|
dotted: "border-dotted"
|
|
2241
2236
|
};
|
|
2242
2237
|
return e(
|
|
2243
|
-
...
|
|
2244
|
-
p[
|
|
2245
|
-
x[
|
|
2246
|
-
|
|
2238
|
+
...b,
|
|
2239
|
+
p[s],
|
|
2240
|
+
x[t],
|
|
2241
|
+
r
|
|
2247
2242
|
);
|
|
2248
|
-
}, [
|
|
2249
|
-
return
|
|
2243
|
+
}, [s, t, r]);
|
|
2244
|
+
return s === "vertical" ? /* @__PURE__ */ a.jsx(
|
|
2250
2245
|
"div",
|
|
2251
|
-
|
|
2246
|
+
N({
|
|
2252
2247
|
className: c,
|
|
2253
2248
|
role: "separator",
|
|
2254
2249
|
"aria-orientation": "vertical"
|
|
2255
2250
|
}, o)
|
|
2256
2251
|
) : /* @__PURE__ */ a.jsx(
|
|
2257
2252
|
"hr",
|
|
2258
|
-
|
|
2253
|
+
N({
|
|
2259
2254
|
className: c,
|
|
2260
2255
|
role: "separator",
|
|
2261
2256
|
"aria-orientation": "horizontal"
|
|
2262
2257
|
}, o)
|
|
2263
2258
|
);
|
|
2264
2259
|
});
|
|
2265
|
-
|
|
2266
|
-
const
|
|
2267
|
-
var
|
|
2268
|
-
value:
|
|
2269
|
-
defaultValue:
|
|
2270
|
-
min:
|
|
2260
|
+
rr.displayName = "Separator";
|
|
2261
|
+
const sr = O(function(S, j) {
|
|
2262
|
+
var k = S, {
|
|
2263
|
+
value: s,
|
|
2264
|
+
defaultValue: t,
|
|
2265
|
+
min: r = 0,
|
|
2271
2266
|
max: o = 100,
|
|
2272
|
-
step:
|
|
2267
|
+
step: i = 1,
|
|
2273
2268
|
variant: n = "single",
|
|
2274
2269
|
size: c = "md",
|
|
2275
|
-
disabled:
|
|
2270
|
+
disabled: b = !1,
|
|
2276
2271
|
showValue: p = !1,
|
|
2277
2272
|
marks: x = [],
|
|
2278
2273
|
onChange: g,
|
|
2279
|
-
onValueChange:
|
|
2274
|
+
onValueChange: l,
|
|
2280
2275
|
label: f,
|
|
2281
2276
|
className: y = ""
|
|
2282
|
-
} =
|
|
2277
|
+
} = k, h = C(k, [
|
|
2283
2278
|
"value",
|
|
2284
2279
|
"defaultValue",
|
|
2285
2280
|
"min",
|
|
@@ -2295,39 +2290,39 @@ const nt = O(function(L, N) {
|
|
|
2295
2290
|
"label",
|
|
2296
2291
|
"className"
|
|
2297
2292
|
]);
|
|
2298
|
-
const
|
|
2299
|
-
|
|
2300
|
-
), [
|
|
2301
|
-
if (!
|
|
2302
|
-
const q =
|
|
2293
|
+
const L = te(null), [A, v] = Y(
|
|
2294
|
+
t || (n === "range" ? [r, o] : r)
|
|
2295
|
+
), [F, W] = Y(!1), [P, Z] = Y(null), V = s !== void 0, w = V ? s : A, B = (I) => (I - r) / (o - r) * 100, $ = (I) => {
|
|
2296
|
+
if (!L.current) return r;
|
|
2297
|
+
const q = L.current.getBoundingClientRect(), D = Math.max(
|
|
2303
2298
|
0,
|
|
2304
|
-
Math.min(1, (
|
|
2305
|
-
),
|
|
2306
|
-
return Math.round(
|
|
2307
|
-
},
|
|
2308
|
-
if (
|
|
2309
|
-
|
|
2310
|
-
const
|
|
2311
|
-
if (!
|
|
2312
|
-
const
|
|
2313
|
-
|
|
2314
|
-
},
|
|
2315
|
-
|
|
2299
|
+
Math.min(1, (I - q.left) / q.width)
|
|
2300
|
+
), J = r + D * (o - r);
|
|
2301
|
+
return Math.round(J / i) * i;
|
|
2302
|
+
}, M = (I, q = "min") => {
|
|
2303
|
+
if (b) return;
|
|
2304
|
+
I.preventDefault(), W(!0), Z(q);
|
|
2305
|
+
const D = (G) => {
|
|
2306
|
+
if (!L.current) return;
|
|
2307
|
+
const X = $(G.clientX);
|
|
2308
|
+
ne(X, q);
|
|
2309
|
+
}, J = () => {
|
|
2310
|
+
W(!1), Z(null), document.removeEventListener("mousemove", D), document.removeEventListener("mouseup", J);
|
|
2316
2311
|
};
|
|
2317
|
-
document.addEventListener("mousemove",
|
|
2318
|
-
},
|
|
2319
|
-
const
|
|
2312
|
+
document.addEventListener("mousemove", D), document.addEventListener("mouseup", J);
|
|
2313
|
+
}, ne = (I, q = "min") => {
|
|
2314
|
+
const D = Math.max(r, Math.min(o, I));
|
|
2320
2315
|
if (n === "range") {
|
|
2321
|
-
const [
|
|
2322
|
-
let
|
|
2323
|
-
q === "min" ?
|
|
2316
|
+
const [J, G] = Array.isArray(w) ? w : [r, o];
|
|
2317
|
+
let X;
|
|
2318
|
+
q === "min" ? X = [Math.min(D, G), G] : X = [J, Math.max(D, J)], V || v(X), g == null || g(X), l == null || l(X);
|
|
2324
2319
|
} else
|
|
2325
|
-
|
|
2326
|
-
},
|
|
2327
|
-
if (
|
|
2328
|
-
const q =
|
|
2329
|
-
|
|
2330
|
-
},
|
|
2320
|
+
V || v(D), g == null || g(D), l == null || l(D);
|
|
2321
|
+
}, le = (I) => {
|
|
2322
|
+
if (b || F) return;
|
|
2323
|
+
const q = $(I.clientX);
|
|
2324
|
+
ne(q);
|
|
2325
|
+
}, ce = () => "focus:ring-line-brand ring-offset-2", de = H(e("relative", "cursor-pointer"), {
|
|
2331
2326
|
variants: {
|
|
2332
2327
|
size: {
|
|
2333
2328
|
sm: "h-1",
|
|
@@ -2353,7 +2348,7 @@ const nt = O(function(L, N) {
|
|
|
2353
2348
|
"shadow-md",
|
|
2354
2349
|
"cursor-grab",
|
|
2355
2350
|
"active:cursor-grabbing",
|
|
2356
|
-
|
|
2351
|
+
fe("base"),
|
|
2357
2352
|
"-translate-x-1/2",
|
|
2358
2353
|
"-translate-y-1/2",
|
|
2359
2354
|
"top-1/2"
|
|
@@ -2366,7 +2361,7 @@ const nt = O(function(L, N) {
|
|
|
2366
2361
|
lg: "w-5 h-5"
|
|
2367
2362
|
},
|
|
2368
2363
|
active: {
|
|
2369
|
-
true:
|
|
2364
|
+
true: ce(),
|
|
2370
2365
|
false: ""
|
|
2371
2366
|
}
|
|
2372
2367
|
},
|
|
@@ -2375,16 +2370,16 @@ const nt = O(function(L, N) {
|
|
|
2375
2370
|
active: !1
|
|
2376
2371
|
}
|
|
2377
2372
|
}
|
|
2378
|
-
), se = typeof
|
|
2379
|
-
return /* @__PURE__ */ a.jsxs("div",
|
|
2373
|
+
), se = typeof w == "number" ? w : w[0], K = Array.isArray(w) ? w[0] : r, ee = Array.isArray(w) ? w[1] : se, Q = B(K), oe = B(ee);
|
|
2374
|
+
return /* @__PURE__ */ a.jsxs("div", R(N({ ref: j, className: e("w-full", y) }, h), { children: [
|
|
2380
2375
|
f && /* @__PURE__ */ a.jsxs(
|
|
2381
2376
|
"label",
|
|
2382
2377
|
{
|
|
2383
2378
|
className: e(
|
|
2384
2379
|
"block",
|
|
2385
|
-
|
|
2380
|
+
E("bodySmall"),
|
|
2386
2381
|
ie("label"),
|
|
2387
|
-
|
|
2382
|
+
"text-fg-primary",
|
|
2388
2383
|
u("sm", "mb")
|
|
2389
2384
|
),
|
|
2390
2385
|
children: [
|
|
@@ -2392,11 +2387,8 @@ const nt = O(function(L, N) {
|
|
|
2392
2387
|
p && /* @__PURE__ */ a.jsx(
|
|
2393
2388
|
"span",
|
|
2394
2389
|
{
|
|
2395
|
-
className: e(
|
|
2396
|
-
|
|
2397
|
-
h("neutral", "DEFAULT", "text")
|
|
2398
|
-
),
|
|
2399
|
-
children: n === "range" ? `${ee} - ${te}` : se
|
|
2390
|
+
className: e(u("sm", "ml"), "text-fg-secondary"),
|
|
2391
|
+
children: n === "range" ? `${K} - ${ee}` : se
|
|
2400
2392
|
}
|
|
2401
2393
|
)
|
|
2402
2394
|
]
|
|
@@ -2405,18 +2397,18 @@ const nt = O(function(L, N) {
|
|
|
2405
2397
|
/* @__PURE__ */ a.jsxs(
|
|
2406
2398
|
"div",
|
|
2407
2399
|
{
|
|
2408
|
-
ref:
|
|
2400
|
+
ref: L,
|
|
2409
2401
|
className: e(
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2402
|
+
de({ size: c, disabled: b }),
|
|
2403
|
+
"bg-surface-muted",
|
|
2404
|
+
z("full")
|
|
2413
2405
|
),
|
|
2414
|
-
onClick:
|
|
2406
|
+
onClick: le,
|
|
2415
2407
|
role: n === "range" ? void 0 : "slider",
|
|
2416
|
-
"aria-valuemin": n === "range" ? void 0 :
|
|
2408
|
+
"aria-valuemin": n === "range" ? void 0 : r,
|
|
2417
2409
|
"aria-valuemax": n === "range" ? void 0 : o,
|
|
2418
2410
|
"aria-valuenow": n === "range" ? void 0 : se,
|
|
2419
|
-
"aria-disabled": n === "range" ? void 0 :
|
|
2411
|
+
"aria-disabled": n === "range" ? void 0 : b,
|
|
2420
2412
|
"aria-label": n === "range" ? void 0 : f,
|
|
2421
2413
|
children: [
|
|
2422
2414
|
/* @__PURE__ */ a.jsx(
|
|
@@ -2424,19 +2416,19 @@ const nt = O(function(L, N) {
|
|
|
2424
2416
|
{
|
|
2425
2417
|
className: e(
|
|
2426
2418
|
"absolute",
|
|
2427
|
-
|
|
2419
|
+
de({ size: c }),
|
|
2428
2420
|
"bg-surface-brand",
|
|
2429
|
-
|
|
2430
|
-
|
|
2421
|
+
z("full"),
|
|
2422
|
+
fe("base")
|
|
2431
2423
|
),
|
|
2432
2424
|
style: {
|
|
2433
|
-
left: `${
|
|
2434
|
-
width: `${
|
|
2425
|
+
left: `${Q}%`,
|
|
2426
|
+
width: `${oe - Q}%`
|
|
2435
2427
|
}
|
|
2436
2428
|
}
|
|
2437
2429
|
),
|
|
2438
|
-
x.map((
|
|
2439
|
-
const q = B(
|
|
2430
|
+
x.map((I) => {
|
|
2431
|
+
const q = B(I);
|
|
2440
2432
|
return /* @__PURE__ */ a.jsx(
|
|
2441
2433
|
"div",
|
|
2442
2434
|
{
|
|
@@ -2444,8 +2436,8 @@ const nt = O(function(L, N) {
|
|
|
2444
2436
|
"absolute",
|
|
2445
2437
|
"w-1",
|
|
2446
2438
|
"h-1",
|
|
2447
|
-
|
|
2448
|
-
|
|
2439
|
+
"bg-line-strong",
|
|
2440
|
+
z("full"),
|
|
2449
2441
|
"-translate-x-1/2"
|
|
2450
2442
|
),
|
|
2451
2443
|
style: {
|
|
@@ -2454,7 +2446,7 @@ const nt = O(function(L, N) {
|
|
|
2454
2446
|
transform: "translate(-50%, -50%)"
|
|
2455
2447
|
}
|
|
2456
2448
|
},
|
|
2457
|
-
|
|
2449
|
+
I
|
|
2458
2450
|
);
|
|
2459
2451
|
}),
|
|
2460
2452
|
n === "range" ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -2464,12 +2456,12 @@ const nt = O(function(L, N) {
|
|
|
2464
2456
|
className: e(
|
|
2465
2457
|
re({ size: c, active: P === "min" })
|
|
2466
2458
|
),
|
|
2467
|
-
style: { left: `${
|
|
2468
|
-
onMouseDown: (
|
|
2459
|
+
style: { left: `${Q}%` },
|
|
2460
|
+
onMouseDown: (I) => M(I, "min"),
|
|
2469
2461
|
role: "slider",
|
|
2470
|
-
"aria-valuemin":
|
|
2471
|
-
"aria-valuemax":
|
|
2472
|
-
"aria-valuenow":
|
|
2462
|
+
"aria-valuemin": r,
|
|
2463
|
+
"aria-valuemax": ee,
|
|
2464
|
+
"aria-valuenow": K
|
|
2473
2465
|
}
|
|
2474
2466
|
),
|
|
2475
2467
|
/* @__PURE__ */ a.jsx(
|
|
@@ -2478,35 +2470,35 @@ const nt = O(function(L, N) {
|
|
|
2478
2470
|
className: e(
|
|
2479
2471
|
re({ size: c, active: P === "max" })
|
|
2480
2472
|
),
|
|
2481
|
-
style: { left: `${
|
|
2482
|
-
onMouseDown: (
|
|
2473
|
+
style: { left: `${oe}%` },
|
|
2474
|
+
onMouseDown: (I) => M(I, "max"),
|
|
2483
2475
|
role: "slider",
|
|
2484
|
-
"aria-valuemin":
|
|
2476
|
+
"aria-valuemin": K,
|
|
2485
2477
|
"aria-valuemax": o,
|
|
2486
|
-
"aria-valuenow":
|
|
2478
|
+
"aria-valuenow": ee
|
|
2487
2479
|
}
|
|
2488
2480
|
)
|
|
2489
2481
|
] }) : /* @__PURE__ */ a.jsx(
|
|
2490
2482
|
"div",
|
|
2491
2483
|
{
|
|
2492
|
-
className: e(re({ size: c, active:
|
|
2493
|
-
style: { left: `${
|
|
2494
|
-
onMouseDown: (
|
|
2484
|
+
className: e(re({ size: c, active: F })),
|
|
2485
|
+
style: { left: `${oe}%` },
|
|
2486
|
+
onMouseDown: (I) => M(I)
|
|
2495
2487
|
}
|
|
2496
2488
|
),
|
|
2497
2489
|
p && !f && /* @__PURE__ */ a.jsx("div", { className: "absolute -top-6 left-0 right-0 flex justify-center", children: /* @__PURE__ */ a.jsx(
|
|
2498
2490
|
"span",
|
|
2499
2491
|
{
|
|
2500
2492
|
className: e(
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
"bg-
|
|
2493
|
+
E("caption"),
|
|
2494
|
+
"text-fg-secondary",
|
|
2495
|
+
"bg-surface-overlay",
|
|
2504
2496
|
u("sm", "px"),
|
|
2505
2497
|
u("xs", "py"),
|
|
2506
|
-
|
|
2498
|
+
z("md"),
|
|
2507
2499
|
"shadow"
|
|
2508
2500
|
),
|
|
2509
|
-
children: n === "range" ? `${
|
|
2501
|
+
children: n === "range" ? `${K} - ${ee}` : se
|
|
2510
2502
|
}
|
|
2511
2503
|
) })
|
|
2512
2504
|
]
|
|
@@ -2514,34 +2506,34 @@ const nt = O(function(L, N) {
|
|
|
2514
2506
|
)
|
|
2515
2507
|
] }));
|
|
2516
2508
|
});
|
|
2517
|
-
|
|
2518
|
-
const
|
|
2509
|
+
sr.displayName = "Slider";
|
|
2510
|
+
const tr = H(
|
|
2519
2511
|
// Base classes
|
|
2520
2512
|
e(
|
|
2521
2513
|
"inline-flex",
|
|
2522
2514
|
"items-center",
|
|
2523
2515
|
"font-medium",
|
|
2524
|
-
|
|
2516
|
+
z("full"),
|
|
2525
2517
|
u("xs", "gap")
|
|
2526
2518
|
),
|
|
2527
2519
|
{
|
|
2528
2520
|
variants: {
|
|
2529
2521
|
variant: {
|
|
2530
2522
|
default: e(
|
|
2531
|
-
|
|
2532
|
-
|
|
2523
|
+
"bg-surface-muted",
|
|
2524
|
+
"text-fg-primary",
|
|
2533
2525
|
"border",
|
|
2534
|
-
|
|
2526
|
+
"border-line-default"
|
|
2535
2527
|
),
|
|
2536
2528
|
outlined: e(
|
|
2537
2529
|
"bg-transparent",
|
|
2538
|
-
|
|
2530
|
+
"text-fg-primary",
|
|
2539
2531
|
"border",
|
|
2540
|
-
|
|
2532
|
+
"border-line-default"
|
|
2541
2533
|
),
|
|
2542
2534
|
filled: e(
|
|
2543
2535
|
"bg-surface-brand",
|
|
2544
|
-
"text-
|
|
2536
|
+
"text-fg-inverse",
|
|
2545
2537
|
"border",
|
|
2546
2538
|
"border-transparent"
|
|
2547
2539
|
)
|
|
@@ -2550,23 +2542,23 @@ const ot = H(
|
|
|
2550
2542
|
sm: e(
|
|
2551
2543
|
u("xs", "px"),
|
|
2552
2544
|
u("xs", "py"),
|
|
2553
|
-
|
|
2545
|
+
E("caption")
|
|
2554
2546
|
),
|
|
2555
2547
|
md: e(
|
|
2556
2548
|
u("sm", "px"),
|
|
2557
2549
|
u("xs", "py"),
|
|
2558
|
-
|
|
2550
|
+
E("bodySmall")
|
|
2559
2551
|
),
|
|
2560
2552
|
lg: e(
|
|
2561
2553
|
u("md", "px"),
|
|
2562
2554
|
u("sm", "py"),
|
|
2563
|
-
|
|
2555
|
+
E("body")
|
|
2564
2556
|
)
|
|
2565
2557
|
},
|
|
2566
2558
|
selected: {
|
|
2567
2559
|
true: e(
|
|
2568
2560
|
"bg-surface-brand",
|
|
2569
|
-
"text-
|
|
2561
|
+
"text-fg-inverse",
|
|
2570
2562
|
"border",
|
|
2571
2563
|
"border-line-brand"
|
|
2572
2564
|
),
|
|
@@ -2604,16 +2596,16 @@ const ot = H(
|
|
|
2604
2596
|
disabled: !1
|
|
2605
2597
|
}
|
|
2606
2598
|
}
|
|
2607
|
-
),
|
|
2599
|
+
), ar = O(function(f, l) {
|
|
2608
2600
|
var y = f, {
|
|
2609
|
-
children:
|
|
2610
|
-
variant:
|
|
2611
|
-
size:
|
|
2601
|
+
children: s,
|
|
2602
|
+
variant: t = "default",
|
|
2603
|
+
size: r = "md",
|
|
2612
2604
|
onRemove: o,
|
|
2613
|
-
selected:
|
|
2605
|
+
selected: i = !1,
|
|
2614
2606
|
disabled: n = !1,
|
|
2615
2607
|
className: c = "",
|
|
2616
|
-
"aria-label":
|
|
2608
|
+
"aria-label": b,
|
|
2617
2609
|
onClick: p,
|
|
2618
2610
|
tabIndex: x
|
|
2619
2611
|
} = y, g = C(y, [
|
|
@@ -2628,37 +2620,37 @@ const ot = H(
|
|
|
2628
2620
|
"onClick",
|
|
2629
2621
|
"tabIndex"
|
|
2630
2622
|
]);
|
|
2631
|
-
const
|
|
2632
|
-
if (
|
|
2633
|
-
if (typeof
|
|
2634
|
-
if (typeof
|
|
2635
|
-
const v =
|
|
2623
|
+
const h = p !== void 0 || i !== !1 && i !== void 0, j = i ? "option" : h ? "button" : void 0, k = (() => {
|
|
2624
|
+
if (b) return b;
|
|
2625
|
+
if (typeof s == "string") return s;
|
|
2626
|
+
if (typeof s == "object" && s !== null && "props" in s) {
|
|
2627
|
+
const v = s.props;
|
|
2636
2628
|
if (v != null && v.children && typeof v.children == "string")
|
|
2637
2629
|
return v.children;
|
|
2638
2630
|
}
|
|
2639
|
-
})(),
|
|
2631
|
+
})(), L = j === "button" && !k, A = (v) => {
|
|
2640
2632
|
n || (v.key === "Enter" || v.key === " ") && (v.preventDefault(), p && p());
|
|
2641
2633
|
};
|
|
2642
2634
|
return /* @__PURE__ */ a.jsxs(
|
|
2643
2635
|
"div",
|
|
2644
|
-
|
|
2645
|
-
ref:
|
|
2636
|
+
R(N({
|
|
2637
|
+
ref: l,
|
|
2646
2638
|
className: e(
|
|
2647
|
-
|
|
2639
|
+
tr({ variant: t, size: r, selected: i, disabled: n }),
|
|
2648
2640
|
o && u("xs", "pr"),
|
|
2649
|
-
|
|
2641
|
+
h && !n && "cursor-pointer focus:outline-none focus:ring-2 focus:ring-line-focus focus:ring-offset-2",
|
|
2650
2642
|
c
|
|
2651
2643
|
),
|
|
2652
|
-
role:
|
|
2653
|
-
"aria-selected":
|
|
2644
|
+
role: j,
|
|
2645
|
+
"aria-selected": i ? !0 : void 0,
|
|
2654
2646
|
"aria-disabled": n,
|
|
2655
|
-
"aria-label":
|
|
2656
|
-
tabIndex: x !== void 0 ? x :
|
|
2647
|
+
"aria-label": L ? "Chip" : b || (j === "button" ? k : void 0),
|
|
2648
|
+
tabIndex: x !== void 0 ? x : h && !n ? 0 : void 0,
|
|
2657
2649
|
onClick: n ? void 0 : p,
|
|
2658
|
-
onKeyDown:
|
|
2650
|
+
onKeyDown: A
|
|
2659
2651
|
}, g), {
|
|
2660
2652
|
children: [
|
|
2661
|
-
/* @__PURE__ */ a.jsx("span", { children:
|
|
2653
|
+
/* @__PURE__ */ a.jsx("span", { children: s }),
|
|
2662
2654
|
o && !n && /* @__PURE__ */ a.jsx(
|
|
2663
2655
|
"button",
|
|
2664
2656
|
{
|
|
@@ -2668,34 +2660,34 @@ const ot = H(
|
|
|
2668
2660
|
},
|
|
2669
2661
|
className: e(
|
|
2670
2662
|
u("xs", "ml"),
|
|
2671
|
-
"hover:bg-
|
|
2672
|
-
|
|
2663
|
+
"hover:bg-tint-hover",
|
|
2664
|
+
z("full"),
|
|
2673
2665
|
u("xs", "p"),
|
|
2674
2666
|
"transition-colors",
|
|
2675
2667
|
"focus:outline-none",
|
|
2676
2668
|
"focus:ring-2",
|
|
2677
|
-
"focus:ring-
|
|
2669
|
+
"focus:ring-line-focus",
|
|
2678
2670
|
"focus:ring-offset-1"
|
|
2679
2671
|
),
|
|
2680
|
-
"aria-label": `Remove ${
|
|
2681
|
-
children: /* @__PURE__ */ a.jsx(
|
|
2672
|
+
"aria-label": `Remove ${k || "chip"}`,
|
|
2673
|
+
children: /* @__PURE__ */ a.jsx(he, { className: "h-3 w-3", "aria-hidden": "true" })
|
|
2682
2674
|
}
|
|
2683
2675
|
)
|
|
2684
2676
|
]
|
|
2685
2677
|
})
|
|
2686
2678
|
);
|
|
2687
2679
|
});
|
|
2688
|
-
|
|
2689
|
-
const
|
|
2680
|
+
ar.displayName = "Chip";
|
|
2681
|
+
const be = O(function(x, p) {
|
|
2690
2682
|
var g = x, {
|
|
2691
|
-
src:
|
|
2692
|
-
alt:
|
|
2693
|
-
fallback:
|
|
2683
|
+
src: s,
|
|
2684
|
+
alt: t,
|
|
2685
|
+
fallback: r,
|
|
2694
2686
|
size: o = "md",
|
|
2695
|
-
variant:
|
|
2687
|
+
variant: i = "circle",
|
|
2696
2688
|
"aria-label": n,
|
|
2697
2689
|
className: c = ""
|
|
2698
|
-
} = g,
|
|
2690
|
+
} = g, b = C(g, [
|
|
2699
2691
|
"src",
|
|
2700
2692
|
"alt",
|
|
2701
2693
|
"fallback",
|
|
@@ -2704,20 +2696,20 @@ const xe = O(function(x, p) {
|
|
|
2704
2696
|
"aria-label",
|
|
2705
2697
|
"className"
|
|
2706
2698
|
]);
|
|
2707
|
-
const [
|
|
2699
|
+
const [l, f] = Y(!1), [y, h] = Y(!1), j = {
|
|
2708
2700
|
xs: "h-6 w-6 text-xs",
|
|
2709
2701
|
sm: "h-8 w-8 text-sm",
|
|
2710
2702
|
md: "h-10 w-10 text-base",
|
|
2711
2703
|
lg: "h-12 w-12 text-lg",
|
|
2712
2704
|
xl: "h-16 w-16 text-xl"
|
|
2713
|
-
},
|
|
2705
|
+
}, S = {
|
|
2714
2706
|
circle: "rounded-full",
|
|
2715
2707
|
square: "rounded-none",
|
|
2716
2708
|
rounded: "rounded-md"
|
|
2717
|
-
},
|
|
2709
|
+
}, k = !s || l, L = typeof r == "string" ? r.toUpperCase().slice(0, 2) : r, A = n || t || "User avatar";
|
|
2718
2710
|
return /* @__PURE__ */ a.jsxs(
|
|
2719
2711
|
"div",
|
|
2720
|
-
|
|
2712
|
+
R(N({
|
|
2721
2713
|
ref: p,
|
|
2722
2714
|
className: e(
|
|
2723
2715
|
"relative",
|
|
@@ -2727,38 +2719,38 @@ const xe = O(function(x, p) {
|
|
|
2727
2719
|
"shrink-0",
|
|
2728
2720
|
"font-medium",
|
|
2729
2721
|
"overflow-hidden",
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2722
|
+
j[o],
|
|
2723
|
+
S[i],
|
|
2724
|
+
"bg-surface-muted",
|
|
2725
|
+
"text-fg-primary",
|
|
2734
2726
|
c
|
|
2735
2727
|
),
|
|
2736
2728
|
role: "img",
|
|
2737
|
-
"aria-label":
|
|
2738
|
-
},
|
|
2729
|
+
"aria-label": A
|
|
2730
|
+
}, b), {
|
|
2739
2731
|
children: [
|
|
2740
|
-
!
|
|
2732
|
+
!k && s && /* @__PURE__ */ a.jsx(
|
|
2741
2733
|
"img",
|
|
2742
2734
|
{
|
|
2743
|
-
src:
|
|
2744
|
-
alt:
|
|
2735
|
+
src: s,
|
|
2736
|
+
alt: t || "",
|
|
2745
2737
|
className: e(
|
|
2746
2738
|
"w-full",
|
|
2747
2739
|
"h-full",
|
|
2748
2740
|
"object-cover",
|
|
2749
|
-
|
|
2741
|
+
i === "circle" ? "rounded-full" : i === "square" ? "rounded-none" : "rounded-md",
|
|
2750
2742
|
y ? "opacity-100" : "opacity-0",
|
|
2751
2743
|
"transition-opacity",
|
|
2752
2744
|
"duration-200"
|
|
2753
2745
|
),
|
|
2754
|
-
onLoad: () =>
|
|
2746
|
+
onLoad: () => h(!0),
|
|
2755
2747
|
onError: () => {
|
|
2756
|
-
f(!0),
|
|
2748
|
+
f(!0), h(!1);
|
|
2757
2749
|
},
|
|
2758
2750
|
"aria-hidden": "true"
|
|
2759
2751
|
}
|
|
2760
2752
|
),
|
|
2761
|
-
|
|
2753
|
+
k && /* @__PURE__ */ a.jsx(
|
|
2762
2754
|
"span",
|
|
2763
2755
|
{
|
|
2764
2756
|
className: e(
|
|
@@ -2767,26 +2759,26 @@ const xe = O(function(x, p) {
|
|
|
2767
2759
|
"justify-center",
|
|
2768
2760
|
"w-full",
|
|
2769
2761
|
"h-full",
|
|
2770
|
-
|
|
2762
|
+
i === "circle" ? "rounded-full" : i === "square" ? "rounded-none" : "rounded-md"
|
|
2771
2763
|
),
|
|
2772
2764
|
"aria-hidden": "true",
|
|
2773
|
-
children:
|
|
2765
|
+
children: L || "?"
|
|
2774
2766
|
}
|
|
2775
2767
|
)
|
|
2776
2768
|
]
|
|
2777
2769
|
})
|
|
2778
2770
|
);
|
|
2779
2771
|
});
|
|
2780
|
-
|
|
2781
|
-
function
|
|
2782
|
-
var
|
|
2783
|
-
children:
|
|
2784
|
-
max:
|
|
2785
|
-
size:
|
|
2786
|
-
variant:
|
|
2772
|
+
be.displayName = "Avatar";
|
|
2773
|
+
function pr(c) {
|
|
2774
|
+
var b = c, {
|
|
2775
|
+
children: m,
|
|
2776
|
+
max: s = 3,
|
|
2777
|
+
size: t = "md",
|
|
2778
|
+
variant: r = "circle",
|
|
2787
2779
|
spacing: o = "md",
|
|
2788
|
-
className:
|
|
2789
|
-
} =
|
|
2780
|
+
className: i = ""
|
|
2781
|
+
} = b, n = C(b, [
|
|
2790
2782
|
"children",
|
|
2791
2783
|
"max",
|
|
2792
2784
|
"size",
|
|
@@ -2799,45 +2791,45 @@ function vt(c) {
|
|
|
2799
2791
|
sm: "-space-x-1",
|
|
2800
2792
|
md: "-space-x-2",
|
|
2801
2793
|
lg: "-space-x-3"
|
|
2802
|
-
}, x = Me.toArray(
|
|
2794
|
+
}, x = Me.toArray(m).filter(Boolean), g = x.slice(0, s), l = x.length - s;
|
|
2803
2795
|
return /* @__PURE__ */ a.jsxs(
|
|
2804
2796
|
"div",
|
|
2805
|
-
|
|
2806
|
-
className: e("flex", "items-center", p[o],
|
|
2797
|
+
R(N({
|
|
2798
|
+
className: e("flex", "items-center", p[o], i),
|
|
2807
2799
|
role: "group",
|
|
2808
2800
|
"aria-label": `${x.length} avatars`
|
|
2809
2801
|
}, n), {
|
|
2810
2802
|
children: [
|
|
2811
2803
|
g.map((f, y) => {
|
|
2812
|
-
let
|
|
2813
|
-
if (
|
|
2814
|
-
const
|
|
2815
|
-
|
|
2804
|
+
let h = f;
|
|
2805
|
+
if (we(f) && f.type === be) {
|
|
2806
|
+
const j = f.props;
|
|
2807
|
+
h = je(
|
|
2816
2808
|
f,
|
|
2817
2809
|
{
|
|
2818
|
-
size:
|
|
2819
|
-
variant:
|
|
2810
|
+
size: j.size || t,
|
|
2811
|
+
variant: j.variant || r
|
|
2820
2812
|
}
|
|
2821
2813
|
);
|
|
2822
2814
|
}
|
|
2823
2815
|
return /* @__PURE__ */ a.jsx(
|
|
2824
2816
|
"div",
|
|
2825
2817
|
{
|
|
2826
|
-
className: "ring-2 ring-
|
|
2818
|
+
className: "ring-2 ring-surface-base",
|
|
2827
2819
|
style: { zIndex: x.length - y },
|
|
2828
|
-
children:
|
|
2820
|
+
children: h
|
|
2829
2821
|
},
|
|
2830
2822
|
y
|
|
2831
2823
|
);
|
|
2832
2824
|
}),
|
|
2833
|
-
|
|
2834
|
-
|
|
2825
|
+
l > 0 && /* @__PURE__ */ a.jsx(
|
|
2826
|
+
be,
|
|
2835
2827
|
{
|
|
2836
|
-
size:
|
|
2837
|
-
variant:
|
|
2838
|
-
fallback: `+${
|
|
2839
|
-
"aria-label": `${
|
|
2840
|
-
className: "ring-2 ring-
|
|
2828
|
+
size: t,
|
|
2829
|
+
variant: r,
|
|
2830
|
+
fallback: `+${l}`,
|
|
2831
|
+
"aria-label": `${l} more avatars`,
|
|
2832
|
+
className: "ring-2 ring-surface-base",
|
|
2841
2833
|
style: { zIndex: 0 }
|
|
2842
2834
|
}
|
|
2843
2835
|
)
|
|
@@ -2846,29 +2838,29 @@ function vt(c) {
|
|
|
2846
2838
|
);
|
|
2847
2839
|
}
|
|
2848
2840
|
export {
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2841
|
+
be as Avatar,
|
|
2842
|
+
pr as AvatarGroup,
|
|
2843
|
+
Ue as Badge,
|
|
2844
|
+
me as Button,
|
|
2845
|
+
Qe as Checkbox,
|
|
2846
|
+
ar as Chip,
|
|
2847
|
+
gr as Collapsible,
|
|
2848
|
+
fr as ErrorMessage,
|
|
2849
|
+
cr as Info,
|
|
2850
|
+
Be as Input,
|
|
2851
|
+
Ze as Label,
|
|
2852
|
+
ur as NavLink,
|
|
2853
|
+
Ke as Progress,
|
|
2854
|
+
Ye as Radio,
|
|
2855
|
+
We as Select,
|
|
2856
|
+
rr as Separator,
|
|
2857
|
+
br as Skeleton,
|
|
2858
|
+
sr as Slider,
|
|
2859
|
+
Ne as Spinner,
|
|
2860
|
+
er as Switch,
|
|
2861
|
+
dr as Text,
|
|
2862
|
+
Xe as Textarea,
|
|
2863
|
+
mr as Tooltip,
|
|
2864
|
+
Oe as useNavLink
|
|
2873
2865
|
};
|
|
2874
2866
|
//# sourceMappingURL=index.js.map
|