@chloe0592/pebble 0.1.4 → 0.1.6
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/index.d.ts +1 -0
- package/dist/pebble.es.js +379 -360
- package/dist/pebble.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/pebble.es.js
CHANGED
|
@@ -1,47 +1,54 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as _, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import v, { useId as R, useRef as F, useEffect as E, useState as H, useCallback as ne } from "react";
|
|
3
3
|
import { createPortal as le } from "react-dom";
|
|
4
|
-
const ie = "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
const ie = "_wrapper_ov9zv_1", ce = "_labelText_ov9zv_7", de = "_spinner_ov9zv_30", _e = "_track_ov9zv_39", pe = "_arc_ov9zv_47", ue = "_xs_ov9zv_53", he = "_sm_ov9zv_54", fe = "_md_ov9zv_55", me = "_lg_ov9zv_56", be = "_xl_ov9zv_57", I = {
|
|
5
|
+
wrapper: ie,
|
|
6
|
+
labelText: ce,
|
|
7
|
+
"label-xs": "_label-xs_ov9zv_14",
|
|
8
|
+
"label-sm": "_label-sm_ov9zv_15",
|
|
9
|
+
"label-md": "_label-md_ov9zv_16",
|
|
10
|
+
"label-lg": "_label-lg_ov9zv_17",
|
|
11
|
+
"label-xl": "_label-xl_ov9zv_18",
|
|
12
|
+
spinner: de,
|
|
13
|
+
"pb-spin": "_pb-spin_ov9zv_1",
|
|
14
|
+
track: _e,
|
|
15
|
+
"pb-pulse": "_pb-pulse_ov9zv_1",
|
|
16
|
+
arc: pe,
|
|
17
|
+
xs: ue,
|
|
18
|
+
sm: he,
|
|
19
|
+
md: fe,
|
|
20
|
+
lg: me,
|
|
21
|
+
xl: be
|
|
22
|
+
}, ve = {
|
|
16
23
|
xs: 12,
|
|
17
24
|
sm: 16,
|
|
18
25
|
md: 24,
|
|
19
26
|
lg: 32,
|
|
20
27
|
xl: 48
|
|
21
|
-
}, Q =
|
|
22
|
-
({ size:
|
|
23
|
-
const d =
|
|
24
|
-
return /* @__PURE__ */ u(
|
|
28
|
+
}, Q = v.forwardRef(
|
|
29
|
+
({ size: t = "md", label: e, className: o = "", color: n = "indigo" }, a) => {
|
|
30
|
+
const d = ve[t], l = R().replace(/:/g, ""), i = n === "white", h = i ? "rgba(255,255,255,0)" : "#6366f1", m = i ? "rgba(255,255,255,0.9)" : "#6366f1", p = i ? "rgba(255,255,255,0.9)" : "#a855f7", f = i ? "rgba(255,255,255,0.25)" : void 0, s = /* @__PURE__ */ _(
|
|
25
31
|
"svg",
|
|
26
32
|
{
|
|
27
33
|
ref: a,
|
|
28
|
-
className: [
|
|
34
|
+
className: [I.spinner, I[t], e ? "" : o].filter(Boolean).join(" "),
|
|
29
35
|
width: d,
|
|
30
36
|
height: d,
|
|
31
37
|
viewBox: "0 0 24 24",
|
|
32
38
|
fill: "none",
|
|
33
|
-
"aria-label": e,
|
|
39
|
+
"aria-label": e ?? "Loading…",
|
|
34
40
|
role: "status",
|
|
41
|
+
"aria-hidden": e ? !0 : void 0,
|
|
35
42
|
children: [
|
|
36
|
-
/* @__PURE__ */ r("defs", { children: /* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ r("defs", { children: /* @__PURE__ */ _("linearGradient", { id: l, x1: "12", y1: "3", x2: "21", y2: "12", gradientUnits: "userSpaceOnUse", children: [
|
|
37
44
|
/* @__PURE__ */ r("stop", { offset: "0%", stopColor: h, stopOpacity: "1" }),
|
|
38
45
|
/* @__PURE__ */ r("stop", { offset: "40%", stopColor: m, stopOpacity: "1" }),
|
|
39
|
-
/* @__PURE__ */ r("stop", { offset: "100%", stopColor:
|
|
46
|
+
/* @__PURE__ */ r("stop", { offset: "100%", stopColor: p, stopOpacity: "1" })
|
|
40
47
|
] }) }),
|
|
41
48
|
/* @__PURE__ */ r(
|
|
42
49
|
"circle",
|
|
43
50
|
{
|
|
44
|
-
className:
|
|
51
|
+
className: I.track,
|
|
45
52
|
cx: "12",
|
|
46
53
|
cy: "12",
|
|
47
54
|
r: "9",
|
|
@@ -52,7 +59,7 @@ const ie = "_spinner_10ctt_1", ce = "_track_10ctt_10", de = "_arc_10ctt_18", _e
|
|
|
52
59
|
/* @__PURE__ */ r(
|
|
53
60
|
"path",
|
|
54
61
|
{
|
|
55
|
-
className:
|
|
62
|
+
className: I.arc,
|
|
56
63
|
d: "M12 3a9 9 0 0 1 9 9",
|
|
57
64
|
strokeWidth: "2.5",
|
|
58
65
|
strokeLinecap: "round",
|
|
@@ -62,103 +69,115 @@ const ie = "_spinner_10ctt_1", ce = "_track_10ctt_10", de = "_arc_10ctt_18", _e
|
|
|
62
69
|
]
|
|
63
70
|
}
|
|
64
71
|
);
|
|
72
|
+
return e ? /* @__PURE__ */ _(
|
|
73
|
+
"span",
|
|
74
|
+
{
|
|
75
|
+
className: [I.wrapper, o].filter(Boolean).join(" "),
|
|
76
|
+
role: "status",
|
|
77
|
+
"aria-label": e,
|
|
78
|
+
children: [
|
|
79
|
+
s,
|
|
80
|
+
/* @__PURE__ */ r("span", { className: [I.labelText, I[`label-${t}`]].filter(Boolean).join(" "), children: e })
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
) : s;
|
|
65
84
|
}
|
|
66
85
|
);
|
|
67
86
|
Q.displayName = "Spinner";
|
|
68
|
-
const
|
|
69
|
-
button:
|
|
70
|
-
sm:
|
|
71
|
-
md:
|
|
72
|
-
lg:
|
|
73
|
-
primary:
|
|
74
|
-
secondary:
|
|
75
|
-
ghost:
|
|
76
|
-
outline:
|
|
77
|
-
danger:
|
|
78
|
-
fullWidth:
|
|
79
|
-
loading:
|
|
80
|
-
iconLeft:
|
|
87
|
+
const ge = "_button_s5t2n_1", ye = "_sm_s5t2n_47", xe = "_md_s5t2n_55", we = "_lg_s5t2n_62", ke = "_primary_s5t2n_73", Ne = "_secondary_s5t2n_108", $e = "_ghost_s5t2n_148", Be = "_outline_s5t2n_166", je = "_danger_s5t2n_187", ze = "_fullWidth_s5t2n_234", Re = "_loading_s5t2n_238", Te = "_iconLeft_s5t2n_244", Le = "_iconRight_s5t2n_245", Ie = "_label_s5t2n_258", z = {
|
|
88
|
+
button: ge,
|
|
89
|
+
sm: ye,
|
|
90
|
+
md: xe,
|
|
91
|
+
lg: we,
|
|
92
|
+
primary: ke,
|
|
93
|
+
secondary: Ne,
|
|
94
|
+
ghost: $e,
|
|
95
|
+
outline: Be,
|
|
96
|
+
danger: je,
|
|
97
|
+
fullWidth: ze,
|
|
98
|
+
loading: Re,
|
|
99
|
+
iconLeft: Te,
|
|
81
100
|
iconRight: Le,
|
|
82
101
|
label: Ie
|
|
83
|
-
}, Ce =
|
|
102
|
+
}, Ce = v.forwardRef(
|
|
84
103
|
({
|
|
85
|
-
variant:
|
|
104
|
+
variant: t = "primary",
|
|
86
105
|
size: e = "md",
|
|
87
|
-
isLoading:
|
|
88
|
-
leftIcon:
|
|
106
|
+
isLoading: o = !1,
|
|
107
|
+
leftIcon: n,
|
|
89
108
|
rightIcon: a,
|
|
90
109
|
fullWidth: d = !1,
|
|
91
110
|
children: l,
|
|
92
111
|
disabled: i,
|
|
93
112
|
className: h = "",
|
|
94
113
|
...m
|
|
95
|
-
},
|
|
114
|
+
}, p) => {
|
|
96
115
|
const f = [
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
d ?
|
|
101
|
-
|
|
116
|
+
z.button,
|
|
117
|
+
z[t],
|
|
118
|
+
z[e],
|
|
119
|
+
d ? z.fullWidth : "",
|
|
120
|
+
o ? z.loading : "",
|
|
102
121
|
h
|
|
103
122
|
].filter(Boolean).join(" ");
|
|
104
|
-
return /* @__PURE__ */
|
|
123
|
+
return /* @__PURE__ */ _(
|
|
105
124
|
"button",
|
|
106
125
|
{
|
|
107
|
-
ref:
|
|
126
|
+
ref: p,
|
|
108
127
|
className: f,
|
|
109
|
-
disabled: i ||
|
|
110
|
-
"aria-busy":
|
|
128
|
+
disabled: i || o,
|
|
129
|
+
"aria-busy": o || void 0,
|
|
111
130
|
...m,
|
|
112
131
|
children: [
|
|
113
|
-
|
|
132
|
+
o ? /* @__PURE__ */ r(
|
|
114
133
|
Q,
|
|
115
134
|
{
|
|
116
135
|
size: "sm",
|
|
117
136
|
label: "Loading",
|
|
118
|
-
color:
|
|
137
|
+
color: t === "primary" || t === "danger" ? "white" : "indigo"
|
|
119
138
|
}
|
|
120
|
-
) :
|
|
121
|
-
l && /* @__PURE__ */ r("span", { className:
|
|
122
|
-
!
|
|
139
|
+
) : n && /* @__PURE__ */ r("span", { className: z.iconLeft, "aria-hidden": "true", children: n }),
|
|
140
|
+
l && /* @__PURE__ */ r("span", { className: z.label, children: l }),
|
|
141
|
+
!o && a && /* @__PURE__ */ r("span", { className: z.iconRight, "aria-hidden": "true", children: a })
|
|
123
142
|
]
|
|
124
143
|
}
|
|
125
144
|
);
|
|
126
145
|
}
|
|
127
146
|
);
|
|
128
147
|
Ce.displayName = "Button";
|
|
129
|
-
const
|
|
130
|
-
wrapper:
|
|
131
|
-
label:
|
|
132
|
-
inputWrapper:
|
|
133
|
-
error:
|
|
134
|
-
disabled:
|
|
135
|
-
sm:
|
|
136
|
-
md:
|
|
137
|
-
lg:
|
|
138
|
-
input:
|
|
139
|
-
hasLeft:
|
|
140
|
-
hasRight:
|
|
141
|
-
iconLeft:
|
|
142
|
-
iconRight:
|
|
143
|
-
helperText:
|
|
144
|
-
errorText:
|
|
145
|
-
},
|
|
148
|
+
const We = "_wrapper_5z8qu_3", Se = "_label_5z8qu_10", Ee = "_inputWrapper_5z8qu_21", qe = "_error_5z8qu_39", Ae = "_disabled_5z8qu_39", De = "_sm_5z8qu_70", Oe = "_md_5z8qu_71", Me = "_lg_5z8qu_72", Pe = "_input_5z8qu_21", Fe = "_hasLeft_5z8qu_109", Ue = "_hasRight_5z8qu_110", Ve = "_iconLeft_5z8qu_114", Ge = "_iconRight_5z8qu_115", He = "_helperText_5z8qu_134", Ke = "_errorText_5z8qu_142", y = {
|
|
149
|
+
wrapper: We,
|
|
150
|
+
label: Se,
|
|
151
|
+
inputWrapper: Ee,
|
|
152
|
+
error: qe,
|
|
153
|
+
disabled: Ae,
|
|
154
|
+
sm: De,
|
|
155
|
+
md: Oe,
|
|
156
|
+
lg: Me,
|
|
157
|
+
input: Pe,
|
|
158
|
+
hasLeft: Fe,
|
|
159
|
+
hasRight: Ue,
|
|
160
|
+
iconLeft: Ve,
|
|
161
|
+
iconRight: Ge,
|
|
162
|
+
helperText: He,
|
|
163
|
+
errorText: Ke
|
|
164
|
+
}, Je = v.forwardRef(
|
|
146
165
|
({
|
|
147
|
-
label:
|
|
166
|
+
label: t,
|
|
148
167
|
helperText: e,
|
|
149
|
-
errorText:
|
|
150
|
-
leftIcon:
|
|
168
|
+
errorText: o,
|
|
169
|
+
leftIcon: n,
|
|
151
170
|
rightIcon: a,
|
|
152
171
|
size: d = "md",
|
|
153
172
|
className: l = "",
|
|
154
173
|
id: i,
|
|
155
174
|
disabled: h,
|
|
156
175
|
...m
|
|
157
|
-
},
|
|
158
|
-
const f =
|
|
159
|
-
return /* @__PURE__ */
|
|
160
|
-
|
|
161
|
-
/* @__PURE__ */
|
|
176
|
+
}, p) => {
|
|
177
|
+
const f = R(), s = i ?? f, x = `${s}-helper`, b = `${s}-error`, N = !!o, q = [N ? b : "", e ? x : ""].filter(Boolean).join(" ") || void 0;
|
|
178
|
+
return /* @__PURE__ */ _("div", { className: [y.wrapper, l].filter(Boolean).join(" "), children: [
|
|
179
|
+
t && /* @__PURE__ */ r("label", { htmlFor: s, className: y.label, children: t }),
|
|
180
|
+
/* @__PURE__ */ _(
|
|
162
181
|
"div",
|
|
163
182
|
{
|
|
164
183
|
className: [
|
|
@@ -168,16 +187,16 @@ const Te = "_wrapper_5z8qu_3", We = "_label_5z8qu_10", Se = "_inputWrapper_5z8qu
|
|
|
168
187
|
h ? y.disabled : ""
|
|
169
188
|
].filter(Boolean).join(" "),
|
|
170
189
|
children: [
|
|
171
|
-
|
|
190
|
+
n && /* @__PURE__ */ r("span", { className: y.iconLeft, "aria-hidden": "true", children: n }),
|
|
172
191
|
/* @__PURE__ */ r(
|
|
173
192
|
"input",
|
|
174
193
|
{
|
|
175
|
-
ref:
|
|
176
|
-
id:
|
|
177
|
-
className: [y.input,
|
|
194
|
+
ref: p,
|
|
195
|
+
id: s,
|
|
196
|
+
className: [y.input, n ? y.hasLeft : "", a ? y.hasRight : ""].filter(Boolean).join(" "),
|
|
178
197
|
disabled: h,
|
|
179
198
|
"aria-invalid": N || void 0,
|
|
180
|
-
"aria-describedby":
|
|
199
|
+
"aria-describedby": q,
|
|
181
200
|
...m
|
|
182
201
|
}
|
|
183
202
|
),
|
|
@@ -185,34 +204,34 @@ const Te = "_wrapper_5z8qu_3", We = "_label_5z8qu_10", Se = "_inputWrapper_5z8qu
|
|
|
185
204
|
]
|
|
186
205
|
}
|
|
187
206
|
),
|
|
188
|
-
N ? /* @__PURE__ */ r("p", { id: b, className: y.errorText, role: "alert", children:
|
|
207
|
+
N ? /* @__PURE__ */ r("p", { id: b, className: y.errorText, role: "alert", children: o }) : e ? /* @__PURE__ */ r("p", { id: x, className: y.helperText, children: e }) : null
|
|
189
208
|
] });
|
|
190
209
|
}
|
|
191
210
|
);
|
|
192
|
-
|
|
193
|
-
const
|
|
194
|
-
wrapper:
|
|
195
|
-
label:
|
|
196
|
-
textarea:
|
|
197
|
-
error:
|
|
198
|
-
disabled:
|
|
199
|
-
helperText:
|
|
200
|
-
errorText:
|
|
201
|
-
},
|
|
211
|
+
Je.displayName = "Input";
|
|
212
|
+
const Qe = "_wrapper_1566g_3", Xe = "_label_1566g_10", Ye = "_textarea_1566g_19", Ze = "_error_1566g_47", er = "_disabled_1566g_47", rr = "_helperText_1566g_82", or = "_errorText_1566g_90", C = {
|
|
213
|
+
wrapper: Qe,
|
|
214
|
+
label: Xe,
|
|
215
|
+
textarea: Ye,
|
|
216
|
+
error: Ze,
|
|
217
|
+
disabled: er,
|
|
218
|
+
helperText: rr,
|
|
219
|
+
errorText: or
|
|
220
|
+
}, tr = v.forwardRef(
|
|
202
221
|
({
|
|
203
|
-
label:
|
|
222
|
+
label: t,
|
|
204
223
|
helperText: e,
|
|
205
|
-
errorText:
|
|
206
|
-
resize:
|
|
224
|
+
errorText: o,
|
|
225
|
+
resize: n = "vertical",
|
|
207
226
|
className: a = "",
|
|
208
227
|
id: d,
|
|
209
228
|
disabled: l,
|
|
210
229
|
rows: i = 4,
|
|
211
230
|
...h
|
|
212
231
|
}, m) => {
|
|
213
|
-
const
|
|
214
|
-
return /* @__PURE__ */
|
|
215
|
-
|
|
232
|
+
const p = R(), f = d ?? p, s = `${f}-helper`, x = `${f}-error`, b = !!o, N = [b ? x : "", e ? s : ""].filter(Boolean).join(" ") || void 0;
|
|
233
|
+
return /* @__PURE__ */ _("div", { className: [C.wrapper, a].filter(Boolean).join(" "), children: [
|
|
234
|
+
t && /* @__PURE__ */ r("label", { htmlFor: f, className: C.label, children: t }),
|
|
216
235
|
/* @__PURE__ */ r(
|
|
217
236
|
"textarea",
|
|
218
237
|
{
|
|
@@ -220,83 +239,83 @@ const Ke = "_wrapper_1566g_3", Je = "_label_1566g_10", Qe = "_textarea_1566g_19"
|
|
|
220
239
|
id: f,
|
|
221
240
|
rows: i,
|
|
222
241
|
className: [
|
|
223
|
-
|
|
224
|
-
b ?
|
|
225
|
-
l ?
|
|
242
|
+
C.textarea,
|
|
243
|
+
b ? C.error : "",
|
|
244
|
+
l ? C.disabled : ""
|
|
226
245
|
].filter(Boolean).join(" "),
|
|
227
|
-
style: { resize:
|
|
246
|
+
style: { resize: n },
|
|
228
247
|
disabled: l,
|
|
229
248
|
"aria-invalid": b || void 0,
|
|
230
249
|
"aria-describedby": N,
|
|
231
250
|
...h
|
|
232
251
|
}
|
|
233
252
|
),
|
|
234
|
-
b ? /* @__PURE__ */ r("p", { id:
|
|
253
|
+
b ? /* @__PURE__ */ r("p", { id: x, className: C.errorText, role: "alert", children: o }) : e ? /* @__PURE__ */ r("p", { id: s, className: C.helperText, children: e }) : null
|
|
235
254
|
] });
|
|
236
255
|
}
|
|
237
256
|
);
|
|
238
|
-
|
|
239
|
-
const
|
|
240
|
-
backdrop:
|
|
257
|
+
tr.displayName = "Textarea";
|
|
258
|
+
const ar = "_backdrop_1v4s9_3", sr = "_dialog_1v4s9_17", nr = "_sm_1v4s9_37", lr = "_md_1v4s9_38", ir = "_lg_1v4s9_39", cr = "_full_1v4s9_40", dr = "_closeBtn_1v4s9_50", _r = "_header_1v4s9_92", pr = "_title_1v4s9_97", ur = "_description_1v4s9_107", hr = "_body_1v4s9_117", fr = "_footer_1v4s9_133", B = {
|
|
259
|
+
backdrop: ar,
|
|
241
260
|
"pb-backdrop-in": "_pb-backdrop-in_1v4s9_1",
|
|
242
|
-
dialog:
|
|
261
|
+
dialog: sr,
|
|
243
262
|
"pb-dialog-in": "_pb-dialog-in_1v4s9_1",
|
|
244
|
-
sm:
|
|
245
|
-
md:
|
|
246
|
-
lg:
|
|
247
|
-
full:
|
|
248
|
-
closeBtn:
|
|
249
|
-
header:
|
|
250
|
-
title:
|
|
251
|
-
description:
|
|
252
|
-
body:
|
|
253
|
-
footer:
|
|
254
|
-
},
|
|
255
|
-
isOpen:
|
|
263
|
+
sm: nr,
|
|
264
|
+
md: lr,
|
|
265
|
+
lg: ir,
|
|
266
|
+
full: cr,
|
|
267
|
+
closeBtn: dr,
|
|
268
|
+
header: _r,
|
|
269
|
+
title: pr,
|
|
270
|
+
description: ur,
|
|
271
|
+
body: hr,
|
|
272
|
+
footer: fr
|
|
273
|
+
}, mr = ({
|
|
274
|
+
isOpen: t,
|
|
256
275
|
onClose: e,
|
|
257
|
-
title:
|
|
258
|
-
description:
|
|
276
|
+
title: o,
|
|
277
|
+
description: n,
|
|
259
278
|
size: a = "md",
|
|
260
279
|
closeOnBackdrop: d = !0,
|
|
261
280
|
children: l,
|
|
262
281
|
footer: i,
|
|
263
282
|
className: h = ""
|
|
264
283
|
}) => {
|
|
265
|
-
const m =
|
|
266
|
-
return
|
|
267
|
-
if (!
|
|
268
|
-
const
|
|
269
|
-
if (!
|
|
270
|
-
const
|
|
284
|
+
const m = R(), p = R(), f = F(null);
|
|
285
|
+
return E(() => {
|
|
286
|
+
if (!t) return;
|
|
287
|
+
const s = f.current;
|
|
288
|
+
if (!s) return;
|
|
289
|
+
const x = s.querySelector(
|
|
271
290
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
272
291
|
);
|
|
273
|
-
|
|
274
|
-
}, [
|
|
275
|
-
if (!
|
|
276
|
-
const
|
|
277
|
-
|
|
292
|
+
x ? x.focus() : s.focus();
|
|
293
|
+
}, [t]), E(() => {
|
|
294
|
+
if (!t) return;
|
|
295
|
+
const s = (x) => {
|
|
296
|
+
x.key === "Escape" && e();
|
|
278
297
|
};
|
|
279
|
-
return document.addEventListener("keydown",
|
|
280
|
-
}, [
|
|
298
|
+
return document.addEventListener("keydown", s), () => document.removeEventListener("keydown", s);
|
|
299
|
+
}, [t, e]), E(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
281
300
|
document.body.style.overflow = "";
|
|
282
|
-
}), [
|
|
301
|
+
}), [t]), t ? le(
|
|
283
302
|
/* @__PURE__ */ r(
|
|
284
303
|
"div",
|
|
285
304
|
{
|
|
286
305
|
className: B.backdrop,
|
|
287
306
|
onClick: d ? e : void 0,
|
|
288
307
|
"aria-hidden": "true",
|
|
289
|
-
children: /* @__PURE__ */
|
|
308
|
+
children: /* @__PURE__ */ _(
|
|
290
309
|
"div",
|
|
291
310
|
{
|
|
292
311
|
ref: f,
|
|
293
312
|
role: "dialog",
|
|
294
313
|
"aria-modal": "true",
|
|
295
|
-
"aria-labelledby":
|
|
296
|
-
"aria-describedby":
|
|
314
|
+
"aria-labelledby": o ? m : void 0,
|
|
315
|
+
"aria-describedby": n ? p : void 0,
|
|
297
316
|
className: [B.dialog, B[a], h].filter(Boolean).join(" "),
|
|
298
317
|
tabIndex: -1,
|
|
299
|
-
onClick: (
|
|
318
|
+
onClick: (s) => s.stopPropagation(),
|
|
300
319
|
children: [
|
|
301
320
|
/* @__PURE__ */ r(
|
|
302
321
|
"button",
|
|
@@ -319,9 +338,9 @@ const tr = "_backdrop_1v4s9_3", or = "_dialog_1v4s9_17", ar = "_sm_1v4s9_37", sr
|
|
|
319
338
|
)
|
|
320
339
|
}
|
|
321
340
|
),
|
|
322
|
-
(
|
|
323
|
-
|
|
324
|
-
|
|
341
|
+
(o || n) && /* @__PURE__ */ _("div", { className: B.header, children: [
|
|
342
|
+
o && /* @__PURE__ */ r("h2", { id: m, className: B.title, children: o }),
|
|
343
|
+
n && /* @__PURE__ */ r("p", { id: p, className: B.description, children: n })
|
|
325
344
|
] }),
|
|
326
345
|
/* @__PURE__ */ r("div", { className: B.body, children: l }),
|
|
327
346
|
i && /* @__PURE__ */ r("div", { className: B.footer, children: i })
|
|
@@ -333,38 +352,38 @@ const tr = "_backdrop_1v4s9_3", or = "_dialog_1v4s9_17", ar = "_sm_1v4s9_37", sr
|
|
|
333
352
|
document.body
|
|
334
353
|
) : null;
|
|
335
354
|
};
|
|
336
|
-
|
|
337
|
-
const
|
|
338
|
-
card:
|
|
355
|
+
mr.displayName = "Modal";
|
|
356
|
+
const br = "_card_i6i72_3", vr = "_elevated_i6i72_25", gr = "_bordered_i6i72_36", yr = "_flat_i6i72_48", xr = "_hoverable_i6i72_60", wr = "_clickable_i6i72_68", kr = "_header_i6i72_96", Nr = "_body_i6i72_105", $r = "_footer_i6i72_112", W = {
|
|
357
|
+
card: br,
|
|
339
358
|
default: "_default_i6i72_15",
|
|
340
|
-
elevated:
|
|
341
|
-
bordered:
|
|
342
|
-
flat:
|
|
343
|
-
hoverable:
|
|
344
|
-
clickable:
|
|
345
|
-
header:
|
|
346
|
-
body:
|
|
347
|
-
footer:
|
|
348
|
-
}, X = ({ children:
|
|
359
|
+
elevated: vr,
|
|
360
|
+
bordered: gr,
|
|
361
|
+
flat: yr,
|
|
362
|
+
hoverable: xr,
|
|
363
|
+
clickable: wr,
|
|
364
|
+
header: kr,
|
|
365
|
+
body: Nr,
|
|
366
|
+
footer: $r
|
|
367
|
+
}, X = ({ children: t, className: e = "", ...o }) => /* @__PURE__ */ r("div", { className: [W.header, e].filter(Boolean).join(" "), ...o, children: t });
|
|
349
368
|
X.displayName = "Card.Header";
|
|
350
|
-
const Y = ({ children:
|
|
369
|
+
const Y = ({ children: t, className: e = "", ...o }) => /* @__PURE__ */ r("div", { className: [W.body, e].filter(Boolean).join(" "), ...o, children: t });
|
|
351
370
|
Y.displayName = "Card.Body";
|
|
352
|
-
const Z = ({ children:
|
|
371
|
+
const Z = ({ children: t, className: e = "", ...o }) => /* @__PURE__ */ r("div", { className: [W.footer, e].filter(Boolean).join(" "), ...o, children: t });
|
|
353
372
|
Z.displayName = "Card.Footer";
|
|
354
|
-
const U =
|
|
373
|
+
const U = v.forwardRef(
|
|
355
374
|
({
|
|
356
|
-
variant:
|
|
375
|
+
variant: t = "default",
|
|
357
376
|
hoverable: e = !1,
|
|
358
|
-
clickable:
|
|
359
|
-
children:
|
|
377
|
+
clickable: o = !1,
|
|
378
|
+
children: n,
|
|
360
379
|
className: a = "",
|
|
361
380
|
...d
|
|
362
381
|
}, l) => {
|
|
363
382
|
const i = [
|
|
364
383
|
W.card,
|
|
365
|
-
W[
|
|
384
|
+
W[t],
|
|
366
385
|
e ? W.hoverable : "",
|
|
367
|
-
|
|
386
|
+
o ? W.clickable : "",
|
|
368
387
|
a
|
|
369
388
|
].filter(Boolean).join(" ");
|
|
370
389
|
return /* @__PURE__ */ r(
|
|
@@ -372,10 +391,10 @@ const U = g.forwardRef(
|
|
|
372
391
|
{
|
|
373
392
|
ref: l,
|
|
374
393
|
className: i,
|
|
375
|
-
role:
|
|
376
|
-
tabIndex:
|
|
394
|
+
role: o ? "button" : void 0,
|
|
395
|
+
tabIndex: o ? 0 : void 0,
|
|
377
396
|
...d,
|
|
378
|
-
children:
|
|
397
|
+
children: n
|
|
379
398
|
}
|
|
380
399
|
);
|
|
381
400
|
}
|
|
@@ -384,82 +403,82 @@ U.displayName = "Card";
|
|
|
384
403
|
U.Header = X;
|
|
385
404
|
U.Body = Y;
|
|
386
405
|
U.Footer = Z;
|
|
387
|
-
const
|
|
388
|
-
badge:
|
|
389
|
-
sm:
|
|
390
|
-
md:
|
|
391
|
-
dot:
|
|
406
|
+
const Br = "_badge_1uusg_3", jr = "_sm_1uusg_20", zr = "_md_1uusg_25", Rr = "_dot_1uusg_32", Tr = "_primary_1uusg_56", Lr = "_success_1uusg_63", Ir = "_warning_1uusg_70", Cr = "_danger_1uusg_77", Wr = "_info_1uusg_84", M = {
|
|
407
|
+
badge: Br,
|
|
408
|
+
sm: jr,
|
|
409
|
+
md: zr,
|
|
410
|
+
dot: Rr,
|
|
392
411
|
default: "_default_1uusg_49",
|
|
393
|
-
primary:
|
|
412
|
+
primary: Tr,
|
|
394
413
|
success: Lr,
|
|
395
414
|
warning: Ir,
|
|
396
415
|
danger: Cr,
|
|
397
|
-
info:
|
|
398
|
-
},
|
|
416
|
+
info: Wr
|
|
417
|
+
}, Sr = v.forwardRef(
|
|
399
418
|
({
|
|
400
|
-
variant:
|
|
419
|
+
variant: t = "default",
|
|
401
420
|
size: e = "md",
|
|
402
|
-
dot:
|
|
403
|
-
children:
|
|
421
|
+
dot: o = !1,
|
|
422
|
+
children: n,
|
|
404
423
|
className: a = "",
|
|
405
424
|
...d
|
|
406
425
|
}, l) => {
|
|
407
426
|
const i = [
|
|
408
427
|
M.badge,
|
|
409
|
-
M[
|
|
428
|
+
M[t],
|
|
410
429
|
M[e],
|
|
411
|
-
|
|
430
|
+
o ? M.dot : "",
|
|
412
431
|
a
|
|
413
432
|
].filter(Boolean).join(" ");
|
|
414
|
-
return /* @__PURE__ */ r("span", { ref: l, className: i, ...d, children:
|
|
433
|
+
return /* @__PURE__ */ r("span", { ref: l, className: i, ...d, children: o ? null : n });
|
|
415
434
|
}
|
|
416
435
|
);
|
|
417
|
-
|
|
418
|
-
const
|
|
419
|
-
avatar:
|
|
420
|
-
xs:
|
|
421
|
-
sm:
|
|
422
|
-
md:
|
|
423
|
-
lg:
|
|
424
|
-
xl:
|
|
425
|
-
image:
|
|
426
|
-
initials:
|
|
427
|
-
fallbackIcon:
|
|
428
|
-
status:
|
|
436
|
+
Sr.displayName = "Badge";
|
|
437
|
+
const Er = "_avatar_n1f99_3", qr = "_xs_n1f99_25", Ar = "_sm_n1f99_26", Dr = "_md_n1f99_27", Or = "_lg_n1f99_28", Mr = "_xl_n1f99_29", Pr = "_image_n1f99_33", Fr = "_initials_n1f99_42", Ur = "_fallbackIcon_n1f99_57", Vr = "_status_n1f99_65", Gr = "_overflow_n1f99_95", Hr = "_group_n1f99_107", w = {
|
|
438
|
+
avatar: Er,
|
|
439
|
+
xs: qr,
|
|
440
|
+
sm: Ar,
|
|
441
|
+
md: Dr,
|
|
442
|
+
lg: Or,
|
|
443
|
+
xl: Mr,
|
|
444
|
+
image: Pr,
|
|
445
|
+
initials: Fr,
|
|
446
|
+
fallbackIcon: Ur,
|
|
447
|
+
status: Vr,
|
|
429
448
|
"status-online": "_status-online_n1f99_79",
|
|
430
449
|
"status-offline": "_status-offline_n1f99_83",
|
|
431
450
|
"status-busy": "_status-busy_n1f99_84",
|
|
432
451
|
"status-away": "_status-away_n1f99_88",
|
|
433
|
-
overflow:
|
|
434
|
-
group:
|
|
452
|
+
overflow: Gr,
|
|
453
|
+
group: Hr
|
|
435
454
|
};
|
|
436
|
-
function
|
|
437
|
-
const e =
|
|
455
|
+
function Kr(t) {
|
|
456
|
+
const e = t.trim().split(/\s+/);
|
|
438
457
|
return e.length === 1 ? e[0].charAt(0).toUpperCase() : (e[0].charAt(0) + e[e.length - 1].charAt(0)).toUpperCase();
|
|
439
458
|
}
|
|
440
|
-
const
|
|
441
|
-
({ src:
|
|
442
|
-
const [i, h] = H(!1), m =
|
|
443
|
-
return /* @__PURE__ */
|
|
459
|
+
const Jr = v.forwardRef(
|
|
460
|
+
({ src: t, alt: e = "", name: o, size: n = "md", status: a, className: d = "" }, l) => {
|
|
461
|
+
const [i, h] = H(!1), m = t && !i, p = o ? Kr(o) : null;
|
|
462
|
+
return /* @__PURE__ */ _(
|
|
444
463
|
"div",
|
|
445
464
|
{
|
|
446
465
|
ref: l,
|
|
447
|
-
className: [
|
|
448
|
-
"aria-label":
|
|
449
|
-
title:
|
|
466
|
+
className: [w.avatar, w[n], d].filter(Boolean).join(" "),
|
|
467
|
+
"aria-label": o ?? e,
|
|
468
|
+
title: o ?? e,
|
|
450
469
|
children: [
|
|
451
470
|
m ? /* @__PURE__ */ r(
|
|
452
471
|
"img",
|
|
453
472
|
{
|
|
454
|
-
src:
|
|
455
|
-
alt: e ||
|
|
456
|
-
className:
|
|
473
|
+
src: t,
|
|
474
|
+
alt: e || o || "",
|
|
475
|
+
className: w.image,
|
|
457
476
|
onError: () => h(!0)
|
|
458
477
|
}
|
|
459
|
-
) :
|
|
478
|
+
) : p ? /* @__PURE__ */ r("span", { className: w.initials, "aria-hidden": "true", children: p }) : /* @__PURE__ */ r(
|
|
460
479
|
"svg",
|
|
461
480
|
{
|
|
462
|
-
className:
|
|
481
|
+
className: w.fallbackIcon,
|
|
463
482
|
viewBox: "0 0 24 24",
|
|
464
483
|
fill: "currentColor",
|
|
465
484
|
"aria-hidden": "true",
|
|
@@ -469,7 +488,7 @@ const Hr = g.forwardRef(
|
|
|
469
488
|
a && /* @__PURE__ */ r(
|
|
470
489
|
"span",
|
|
471
490
|
{
|
|
472
|
-
className: [
|
|
491
|
+
className: [w.status, w[`status-${a}`]].join(" "),
|
|
473
492
|
"aria-label": a
|
|
474
493
|
}
|
|
475
494
|
)
|
|
@@ -478,136 +497,136 @@ const Hr = g.forwardRef(
|
|
|
478
497
|
);
|
|
479
498
|
}
|
|
480
499
|
);
|
|
481
|
-
|
|
482
|
-
const
|
|
483
|
-
children:
|
|
500
|
+
Jr.displayName = "Avatar";
|
|
501
|
+
const Qr = ({
|
|
502
|
+
children: t,
|
|
484
503
|
max: e,
|
|
485
|
-
size:
|
|
486
|
-
className:
|
|
504
|
+
size: o = "md",
|
|
505
|
+
className: n = ""
|
|
487
506
|
}) => {
|
|
488
|
-
const a =
|
|
489
|
-
return /* @__PURE__ */
|
|
507
|
+
const a = v.Children.toArray(t), d = e ? a.slice(0, e) : a, l = e && a.length > e ? a.length - e : 0;
|
|
508
|
+
return /* @__PURE__ */ _("div", { className: [w.group, n].filter(Boolean).join(" "), children: [
|
|
490
509
|
d,
|
|
491
|
-
l > 0 && /* @__PURE__ */ r("div", { className: [
|
|
510
|
+
l > 0 && /* @__PURE__ */ r("div", { className: [w.avatar, w[o], w.overflow].join(" "), children: /* @__PURE__ */ _("span", { className: w.initials, children: [
|
|
492
511
|
"+",
|
|
493
512
|
l
|
|
494
513
|
] }) })
|
|
495
514
|
] });
|
|
496
515
|
};
|
|
497
|
-
|
|
498
|
-
const
|
|
499
|
-
wrapper:
|
|
500
|
-
tooltip:
|
|
501
|
-
arrow:
|
|
502
|
-
top:
|
|
503
|
-
bottom:
|
|
504
|
-
left:
|
|
505
|
-
right:
|
|
506
|
-
},
|
|
507
|
-
content:
|
|
516
|
+
Qr.displayName = "AvatarGroup";
|
|
517
|
+
const Xr = "_wrapper_1vn80_8", Yr = "_tooltip_1vn80_17", Zr = "_arrow_1vn80_51", eo = "_top_1vn80_60", ro = "_bottom_1vn80_79", oo = "_left_1vn80_98", to = "_right_1vn80_117", P = {
|
|
518
|
+
wrapper: Xr,
|
|
519
|
+
tooltip: Yr,
|
|
520
|
+
arrow: Zr,
|
|
521
|
+
top: eo,
|
|
522
|
+
bottom: ro,
|
|
523
|
+
left: oo,
|
|
524
|
+
right: to
|
|
525
|
+
}, ao = ({
|
|
526
|
+
content: t,
|
|
508
527
|
placement: e = "top",
|
|
509
|
-
children:
|
|
510
|
-
className:
|
|
528
|
+
children: o,
|
|
529
|
+
className: n = ""
|
|
511
530
|
}) => {
|
|
512
|
-
const a =
|
|
531
|
+
const a = R(), d = v.cloneElement(o, {
|
|
513
532
|
"aria-describedby": a
|
|
514
533
|
});
|
|
515
|
-
return /* @__PURE__ */
|
|
534
|
+
return /* @__PURE__ */ _("div", { className: [P.wrapper, n].filter(Boolean).join(" "), children: [
|
|
516
535
|
d,
|
|
517
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ _(
|
|
518
537
|
"div",
|
|
519
538
|
{
|
|
520
539
|
id: a,
|
|
521
540
|
role: "tooltip",
|
|
522
541
|
className: [P.tooltip, P[e]].join(" "),
|
|
523
542
|
children: [
|
|
524
|
-
|
|
543
|
+
t,
|
|
525
544
|
/* @__PURE__ */ r("span", { className: P.arrow, "aria-hidden": "true" })
|
|
526
545
|
]
|
|
527
546
|
}
|
|
528
547
|
)
|
|
529
548
|
] });
|
|
530
549
|
};
|
|
531
|
-
|
|
532
|
-
const
|
|
533
|
-
wrapper:
|
|
534
|
-
wrapperOpen:
|
|
535
|
-
label:
|
|
536
|
-
triggerWrapper:
|
|
537
|
-
trigger:
|
|
538
|
-
open:
|
|
539
|
-
error:
|
|
540
|
-
disabled:
|
|
541
|
-
sm:
|
|
542
|
-
md:
|
|
543
|
-
lg:
|
|
544
|
-
triggerValue:
|
|
545
|
-
triggerPlaceholder:
|
|
546
|
-
chevron:
|
|
547
|
-
chevronOpen:
|
|
548
|
-
dropdown:
|
|
549
|
-
option:
|
|
550
|
-
optionDisabled:
|
|
551
|
-
optionSelected:
|
|
552
|
-
optionLabel:
|
|
553
|
-
checkmark:
|
|
554
|
-
helperText:
|
|
555
|
-
errorText:
|
|
550
|
+
ao.displayName = "Tooltip";
|
|
551
|
+
const so = "_wrapper_1rai7_3", no = "_wrapperOpen_1rai7_11", lo = "_label_1rai7_15", io = "_triggerWrapper_1rai7_26", co = "_trigger_1rai7_26", _o = "_open_1rai7_67", po = "_error_1rai7_74", uo = "_disabled_1rai7_81", ho = "_sm_1rai7_93", fo = "_md_1rai7_94", mo = "_lg_1rai7_95", bo = "_triggerValue_1rai7_99", vo = "_triggerPlaceholder_1rai7_106", go = "_chevron_1rai7_116", yo = "_chevronOpen_1rai7_127", xo = "_dropdown_1rai7_138", wo = "_option_1rai7_162", ko = "_optionDisabled_1rai7_176", No = "_optionSelected_1rai7_180", $o = "_optionLabel_1rai7_195", Bo = "_checkmark_1rai7_199", jo = "_helperText_1rai7_209", zo = "_errorText_1rai7_217", u = {
|
|
552
|
+
wrapper: so,
|
|
553
|
+
wrapperOpen: no,
|
|
554
|
+
label: lo,
|
|
555
|
+
triggerWrapper: io,
|
|
556
|
+
trigger: co,
|
|
557
|
+
open: _o,
|
|
558
|
+
error: po,
|
|
559
|
+
disabled: uo,
|
|
560
|
+
sm: ho,
|
|
561
|
+
md: fo,
|
|
562
|
+
lg: mo,
|
|
563
|
+
triggerValue: bo,
|
|
564
|
+
triggerPlaceholder: vo,
|
|
565
|
+
chevron: go,
|
|
566
|
+
chevronOpen: yo,
|
|
567
|
+
dropdown: xo,
|
|
568
|
+
option: wo,
|
|
569
|
+
optionDisabled: ko,
|
|
570
|
+
optionSelected: No,
|
|
571
|
+
optionLabel: $o,
|
|
572
|
+
checkmark: Bo,
|
|
573
|
+
helperText: jo,
|
|
574
|
+
errorText: zo
|
|
556
575
|
};
|
|
557
|
-
function
|
|
558
|
-
return
|
|
559
|
-
(e) =>
|
|
576
|
+
function Ro(t) {
|
|
577
|
+
return v.Children.toArray(t).filter(
|
|
578
|
+
(e) => v.isValidElement(e) && e.type === "option" && !e.props.disabled
|
|
560
579
|
).map((e) => ({
|
|
561
580
|
value: String(e.props.value ?? ""),
|
|
562
581
|
label: String(e.props.children ?? ""),
|
|
563
582
|
disabled: !!e.props.disabled
|
|
564
583
|
})).filter((e) => e.value !== "");
|
|
565
584
|
}
|
|
566
|
-
function
|
|
567
|
-
const e =
|
|
568
|
-
(
|
|
585
|
+
function To(t) {
|
|
586
|
+
const e = v.Children.toArray(t).find(
|
|
587
|
+
(o) => v.isValidElement(o) && o.type === "option" && (o.props.value === "" || o.props.value == null) && o.props.disabled
|
|
569
588
|
);
|
|
570
589
|
return e ? String(e.props.children) : void 0;
|
|
571
590
|
}
|
|
572
|
-
const
|
|
591
|
+
const Lo = v.forwardRef(
|
|
573
592
|
({
|
|
574
|
-
label:
|
|
593
|
+
label: t,
|
|
575
594
|
helperText: e,
|
|
576
|
-
errorText:
|
|
577
|
-
placeholder:
|
|
595
|
+
errorText: o,
|
|
596
|
+
placeholder: n,
|
|
578
597
|
size: a = "md",
|
|
579
598
|
className: d = "",
|
|
580
599
|
id: l,
|
|
581
600
|
disabled: i,
|
|
582
601
|
value: h,
|
|
583
602
|
defaultValue: m,
|
|
584
|
-
onChange:
|
|
603
|
+
onChange: p,
|
|
585
604
|
children: f
|
|
586
|
-
},
|
|
587
|
-
const
|
|
605
|
+
}, s) => {
|
|
606
|
+
const x = R(), b = l ?? x, N = `${b}-listbox`, q = `${b}-helper`, K = `${b}-error`, A = !!o, S = Ro(f), ee = n ?? To(f) ?? "Select…", [$, j] = H(!1), [re, oe] = H(
|
|
588
607
|
String(m ?? h ?? "")
|
|
589
|
-
),
|
|
590
|
-
J.current = c, typeof
|
|
608
|
+
), D = h !== void 0 ? String(h) : re, O = S.find((c) => c.value === D), V = F(null), J = F(null), te = (c) => {
|
|
609
|
+
J.current = c, typeof s == "function" ? s(c) : s && (s.current = c);
|
|
591
610
|
};
|
|
592
|
-
|
|
611
|
+
E(() => {
|
|
593
612
|
if (!$) return;
|
|
594
|
-
const c = (
|
|
595
|
-
V.current && !V.current.contains(
|
|
613
|
+
const c = (g) => {
|
|
614
|
+
V.current && !V.current.contains(g.target) && j(!1);
|
|
596
615
|
};
|
|
597
616
|
return document.addEventListener("pointerdown", c), () => document.removeEventListener("pointerdown", c);
|
|
598
617
|
}, [$]);
|
|
599
618
|
const G = ne(
|
|
600
619
|
(c) => {
|
|
601
|
-
var
|
|
602
|
-
h === void 0 &&
|
|
620
|
+
var g;
|
|
621
|
+
h === void 0 && oe(c), j(!1), (g = J.current) == null || g.focus(), p == null || p({ target: { value: c } });
|
|
603
622
|
},
|
|
604
|
-
[h,
|
|
623
|
+
[h, p]
|
|
605
624
|
), ae = (c) => {
|
|
606
625
|
if (!i)
|
|
607
626
|
switch (c.key) {
|
|
608
627
|
case "Enter":
|
|
609
628
|
case " ":
|
|
610
|
-
c.preventDefault(), j((
|
|
629
|
+
c.preventDefault(), j((g) => !g);
|
|
611
630
|
break;
|
|
612
631
|
case "Escape":
|
|
613
632
|
j(!1);
|
|
@@ -617,8 +636,8 @@ const Rt = g.forwardRef(
|
|
|
617
636
|
j(!0);
|
|
618
637
|
break;
|
|
619
638
|
}
|
|
620
|
-
const
|
|
621
|
-
|
|
639
|
+
const g = S.findIndex((L) => L.value === D), T = S.slice(g + 1).find((L) => !L.disabled);
|
|
640
|
+
T && G(T.value);
|
|
622
641
|
break;
|
|
623
642
|
}
|
|
624
643
|
case "ArrowUp": {
|
|
@@ -626,47 +645,47 @@ const Rt = g.forwardRef(
|
|
|
626
645
|
j(!0);
|
|
627
646
|
break;
|
|
628
647
|
}
|
|
629
|
-
const
|
|
630
|
-
|
|
648
|
+
const g = S.findIndex((L) => L.value === D), T = S.slice(0, g).reverse().find((L) => !L.disabled);
|
|
649
|
+
T && G(T.value);
|
|
631
650
|
break;
|
|
632
651
|
}
|
|
633
652
|
case "Tab":
|
|
634
653
|
j(!1);
|
|
635
654
|
break;
|
|
636
655
|
}
|
|
637
|
-
}, se = [
|
|
638
|
-
return /* @__PURE__ */
|
|
639
|
-
|
|
640
|
-
/* @__PURE__ */
|
|
641
|
-
/* @__PURE__ */
|
|
656
|
+
}, se = [A ? K : "", e ? q : ""].filter(Boolean).join(" ") || void 0;
|
|
657
|
+
return /* @__PURE__ */ _("div", { ref: V, className: [u.wrapper, $ ? u.wrapperOpen : "", d].filter(Boolean).join(" "), children: [
|
|
658
|
+
t && /* @__PURE__ */ r("label", { id: `${b}-label`, htmlFor: b, className: u.label, children: t }),
|
|
659
|
+
/* @__PURE__ */ _("div", { className: u.triggerWrapper, children: [
|
|
660
|
+
/* @__PURE__ */ _(
|
|
642
661
|
"button",
|
|
643
662
|
{
|
|
644
|
-
ref:
|
|
663
|
+
ref: te,
|
|
645
664
|
type: "button",
|
|
646
665
|
id: b,
|
|
647
666
|
role: "combobox",
|
|
648
667
|
"aria-haspopup": "listbox",
|
|
649
668
|
"aria-expanded": $,
|
|
650
669
|
"aria-controls": N,
|
|
651
|
-
"aria-labelledby":
|
|
670
|
+
"aria-labelledby": t ? `${b}-label` : void 0,
|
|
652
671
|
"aria-describedby": se,
|
|
653
|
-
"aria-invalid":
|
|
672
|
+
"aria-invalid": A || void 0,
|
|
654
673
|
disabled: i,
|
|
655
674
|
className: [
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
i ?
|
|
660
|
-
$ ?
|
|
675
|
+
u.trigger,
|
|
676
|
+
u[a],
|
|
677
|
+
A ? u.error : "",
|
|
678
|
+
i ? u.disabled : "",
|
|
679
|
+
$ ? u.open : ""
|
|
661
680
|
].filter(Boolean).join(" "),
|
|
662
681
|
onClick: () => !i && j((c) => !c),
|
|
663
682
|
onKeyDown: ae,
|
|
664
683
|
children: [
|
|
665
|
-
/* @__PURE__ */ r("span", { className:
|
|
684
|
+
/* @__PURE__ */ r("span", { className: O ? u.triggerValue : u.triggerPlaceholder, children: (O == null ? void 0 : O.label) ?? ee }),
|
|
666
685
|
/* @__PURE__ */ r(
|
|
667
686
|
"span",
|
|
668
687
|
{
|
|
669
|
-
className: [
|
|
688
|
+
className: [u.chevron, $ ? u.chevronOpen : ""].filter(Boolean).join(" "),
|
|
670
689
|
"aria-hidden": "true",
|
|
671
690
|
children: /* @__PURE__ */ r(
|
|
672
691
|
"svg",
|
|
@@ -692,27 +711,27 @@ const Rt = g.forwardRef(
|
|
|
692
711
|
{
|
|
693
712
|
id: N,
|
|
694
713
|
role: "listbox",
|
|
695
|
-
"aria-labelledby":
|
|
696
|
-
className:
|
|
714
|
+
"aria-labelledby": t ? `${b}-label` : void 0,
|
|
715
|
+
className: u.dropdown,
|
|
697
716
|
children: S.map((c) => {
|
|
698
|
-
const
|
|
699
|
-
return /* @__PURE__ */
|
|
717
|
+
const g = c.value === D;
|
|
718
|
+
return /* @__PURE__ */ _(
|
|
700
719
|
"li",
|
|
701
720
|
{
|
|
702
721
|
role: "option",
|
|
703
|
-
"aria-selected":
|
|
722
|
+
"aria-selected": g,
|
|
704
723
|
"aria-disabled": c.disabled,
|
|
705
724
|
className: [
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
c.disabled ?
|
|
725
|
+
u.option,
|
|
726
|
+
g ? u.optionSelected : "",
|
|
727
|
+
c.disabled ? u.optionDisabled : ""
|
|
709
728
|
].filter(Boolean).join(" "),
|
|
710
|
-
onPointerDown: (
|
|
711
|
-
|
|
729
|
+
onPointerDown: (T) => {
|
|
730
|
+
T.preventDefault(), c.disabled || G(c.value);
|
|
712
731
|
},
|
|
713
732
|
children: [
|
|
714
|
-
/* @__PURE__ */ r("span", { className:
|
|
715
|
-
|
|
733
|
+
/* @__PURE__ */ r("span", { className: u.optionLabel, children: c.label }),
|
|
734
|
+
g && /* @__PURE__ */ r("span", { className: u.checkmark, "aria-hidden": "true", children: /* @__PURE__ */ r(
|
|
716
735
|
"svg",
|
|
717
736
|
{
|
|
718
737
|
width: "14",
|
|
@@ -734,61 +753,61 @@ const Rt = g.forwardRef(
|
|
|
734
753
|
}
|
|
735
754
|
)
|
|
736
755
|
] }),
|
|
737
|
-
|
|
756
|
+
A ? /* @__PURE__ */ r("p", { id: K, className: u.errorText, role: "alert", children: o }) : e ? /* @__PURE__ */ r("p", { id: q, className: u.helperText, children: e }) : null
|
|
738
757
|
] });
|
|
739
758
|
}
|
|
740
759
|
);
|
|
741
|
-
|
|
742
|
-
const
|
|
743
|
-
wrapper:
|
|
744
|
-
checkboxRow:
|
|
745
|
-
sm:
|
|
746
|
-
checkboxBox:
|
|
747
|
-
label:
|
|
748
|
-
md:
|
|
749
|
-
checkboxOuter:
|
|
750
|
-
input:
|
|
751
|
-
checkmark:
|
|
752
|
-
dash:
|
|
753
|
-
disabled:
|
|
754
|
-
helperText:
|
|
755
|
-
},
|
|
760
|
+
Lo.displayName = "Select";
|
|
761
|
+
const Io = "_wrapper_cefjy_3", Co = "_checkboxRow_cefjy_10", Wo = "_sm_cefjy_18", So = "_checkboxBox_cefjy_18", Eo = "_label_cefjy_22", qo = "_md_cefjy_26", Ao = "_checkboxOuter_cefjy_36", Do = "_input_cefjy_46", Oo = "_checkmark_cefjy_142", Mo = "_dash_cefjy_143", Po = "_disabled_cefjy_174", Fo = "_helperText_cefjy_181", k = {
|
|
762
|
+
wrapper: Io,
|
|
763
|
+
checkboxRow: Co,
|
|
764
|
+
sm: Wo,
|
|
765
|
+
checkboxBox: So,
|
|
766
|
+
label: Eo,
|
|
767
|
+
md: qo,
|
|
768
|
+
checkboxOuter: Ao,
|
|
769
|
+
input: Do,
|
|
770
|
+
checkmark: Oo,
|
|
771
|
+
dash: Mo,
|
|
772
|
+
disabled: Po,
|
|
773
|
+
helperText: Fo
|
|
774
|
+
}, Uo = v.forwardRef(
|
|
756
775
|
({
|
|
757
|
-
label:
|
|
776
|
+
label: t,
|
|
758
777
|
indeterminate: e = !1,
|
|
759
|
-
size:
|
|
760
|
-
helperText:
|
|
778
|
+
size: o = "md",
|
|
779
|
+
helperText: n,
|
|
761
780
|
className: a = "",
|
|
762
781
|
id: d,
|
|
763
782
|
disabled: l,
|
|
764
783
|
...i
|
|
765
784
|
}, h) => {
|
|
766
|
-
const m =
|
|
767
|
-
return
|
|
768
|
-
|
|
769
|
-
}, [e,
|
|
785
|
+
const m = R(), p = d ?? m, f = F(null), s = h ?? f;
|
|
786
|
+
return E(() => {
|
|
787
|
+
s && "current" in s && s.current && (s.current.indeterminate = e);
|
|
788
|
+
}, [e, s]), /* @__PURE__ */ _(
|
|
770
789
|
"div",
|
|
771
790
|
{
|
|
772
|
-
className: [
|
|
791
|
+
className: [k.wrapper, k[o], l ? k.disabled : "", a].filter(Boolean).join(" "),
|
|
773
792
|
children: [
|
|
774
|
-
/* @__PURE__ */
|
|
775
|
-
/* @__PURE__ */
|
|
793
|
+
/* @__PURE__ */ _("div", { className: k.checkboxRow, children: [
|
|
794
|
+
/* @__PURE__ */ _("div", { className: k.checkboxOuter, children: [
|
|
776
795
|
/* @__PURE__ */ r(
|
|
777
796
|
"input",
|
|
778
797
|
{
|
|
779
|
-
ref:
|
|
780
|
-
id:
|
|
798
|
+
ref: s,
|
|
799
|
+
id: p,
|
|
781
800
|
type: "checkbox",
|
|
782
|
-
className:
|
|
801
|
+
className: k.input,
|
|
783
802
|
disabled: l,
|
|
784
803
|
...i
|
|
785
804
|
}
|
|
786
805
|
),
|
|
787
|
-
/* @__PURE__ */
|
|
806
|
+
/* @__PURE__ */ _("div", { className: k.checkboxBox, "aria-hidden": "true", children: [
|
|
788
807
|
/* @__PURE__ */ r(
|
|
789
808
|
"svg",
|
|
790
809
|
{
|
|
791
|
-
className:
|
|
810
|
+
className: k.checkmark,
|
|
792
811
|
viewBox: "0 0 12 12",
|
|
793
812
|
fill: "none",
|
|
794
813
|
children: /* @__PURE__ */ r(
|
|
@@ -806,7 +825,7 @@ const Lt = "_wrapper_cefjy_3", It = "_checkboxRow_cefjy_10", Ct = "_sm_cefjy_18"
|
|
|
806
825
|
/* @__PURE__ */ r(
|
|
807
826
|
"svg",
|
|
808
827
|
{
|
|
809
|
-
className:
|
|
828
|
+
className: k.dash,
|
|
810
829
|
viewBox: "0 0 12 12",
|
|
811
830
|
fill: "none",
|
|
812
831
|
children: /* @__PURE__ */ r(
|
|
@@ -822,26 +841,26 @@ const Lt = "_wrapper_cefjy_3", It = "_checkboxRow_cefjy_10", Ct = "_sm_cefjy_18"
|
|
|
822
841
|
)
|
|
823
842
|
] })
|
|
824
843
|
] }),
|
|
825
|
-
|
|
844
|
+
t && /* @__PURE__ */ r("label", { htmlFor: p, className: k.label, children: t })
|
|
826
845
|
] }),
|
|
827
|
-
|
|
846
|
+
n && /* @__PURE__ */ r("p", { className: k.helperText, children: n })
|
|
828
847
|
]
|
|
829
848
|
}
|
|
830
849
|
);
|
|
831
850
|
}
|
|
832
851
|
);
|
|
833
|
-
|
|
852
|
+
Uo.displayName = "Checkbox";
|
|
834
853
|
export {
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
854
|
+
Jr as Avatar,
|
|
855
|
+
Qr as AvatarGroup,
|
|
856
|
+
Sr as Badge,
|
|
838
857
|
Ce as Button,
|
|
839
858
|
U as Card,
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
859
|
+
Uo as Checkbox,
|
|
860
|
+
Je as Input,
|
|
861
|
+
mr as Modal,
|
|
862
|
+
Lo as Select,
|
|
844
863
|
Q as Spinner,
|
|
845
|
-
|
|
846
|
-
|
|
864
|
+
tr as Textarea,
|
|
865
|
+
ao as Tooltip
|
|
847
866
|
};
|