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