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