beth-clarity 1.1.21 → 1.1.22
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.
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { jsx as n, jsxs as w, Fragment as ft } from "react/jsx-runtime";
|
|
2
|
+
import L, { useState as T, useRef as F, useEffect as I, forwardRef as ht, isValidElement as ae, createContext as Q, cloneElement as z, useContext as U, useMemo as te, useCallback as de, useLayoutEffect as yt } from "react";
|
|
3
|
+
import vt from "react-dom";
|
|
4
|
+
const Wt = ({
|
|
5
5
|
variant: e = "primary",
|
|
6
6
|
product: t,
|
|
7
|
-
tone:
|
|
8
|
-
size:
|
|
9
|
-
bgColor:
|
|
10
|
-
textColor:
|
|
7
|
+
tone: a,
|
|
8
|
+
size: s = "medium",
|
|
9
|
+
bgColor: r,
|
|
10
|
+
textColor: l,
|
|
11
11
|
children: d,
|
|
12
12
|
className: o = "",
|
|
13
|
-
rounded:
|
|
13
|
+
rounded: i = !1,
|
|
14
14
|
outlined: c = !1,
|
|
15
15
|
...p
|
|
16
16
|
}) => {
|
|
17
|
-
const v = "clarity-badge", m = !!
|
|
17
|
+
const v = "clarity-badge", m = !!r, f = t && a && !m;
|
|
18
18
|
let u = "";
|
|
19
19
|
m ? u = `${v}--custom-bg` : f ? u = `${v}--custom` : u = `${v}--${e}`;
|
|
20
20
|
const h = [
|
|
21
21
|
v,
|
|
22
22
|
u,
|
|
23
|
-
`${v}--${
|
|
24
|
-
|
|
23
|
+
`${v}--${s}`,
|
|
24
|
+
i ? `${v}--rounded` : "",
|
|
25
25
|
c ? `${v}--outlined` : "",
|
|
26
26
|
o
|
|
27
27
|
].filter(Boolean).join(" "), y = {};
|
|
28
|
-
m && (y.backgroundColor =
|
|
29
|
-
const b = f && t &&
|
|
30
|
-
"--custom-bg-color": `var(--clarity-${t}-${
|
|
31
|
-
"--custom-text-color":
|
|
28
|
+
m && (y.backgroundColor = r, l && (y.color = l));
|
|
29
|
+
const b = f && t && a ? {
|
|
30
|
+
"--custom-bg-color": `var(--clarity-${t}-${a})`,
|
|
31
|
+
"--custom-text-color": a && parseInt(a) >= 500 ? "white" : `var(--clarity-${t}-800)`
|
|
32
32
|
} : {};
|
|
33
|
-
return /* @__PURE__ */
|
|
33
|
+
return /* @__PURE__ */ n(
|
|
34
34
|
"span",
|
|
35
35
|
{
|
|
36
36
|
className: h,
|
|
@@ -42,7 +42,7 @@ const Dt = ({
|
|
|
42
42
|
children: d
|
|
43
43
|
}
|
|
44
44
|
);
|
|
45
|
-
},
|
|
45
|
+
}, we = {
|
|
46
46
|
fontFamily: {
|
|
47
47
|
sans: ["Inter", "system-ui", "sans-serif"],
|
|
48
48
|
mono: ["Fira Code", "monospace"]
|
|
@@ -69,102 +69,112 @@ const Dt = ({
|
|
|
69
69
|
wide: "0.025em",
|
|
70
70
|
wider: "0.05em"
|
|
71
71
|
}
|
|
72
|
-
},
|
|
72
|
+
}, fe = (e) => {
|
|
73
73
|
if (e) {
|
|
74
74
|
if (e.startsWith("#") || e.startsWith("rgb") || e.startsWith("hsl") || e === "transparent")
|
|
75
75
|
return e;
|
|
76
76
|
if (e.includes(".")) {
|
|
77
|
-
const [t,
|
|
78
|
-
return `var(--clarity-${t}-${
|
|
77
|
+
const [t, a] = e.split(".");
|
|
78
|
+
return `var(--clarity-${t}-${a})`;
|
|
79
79
|
}
|
|
80
80
|
return `var(--clarity-${e})`;
|
|
81
81
|
}
|
|
82
|
-
},
|
|
82
|
+
}, J = (e) => e !== void 0 ? `var(--clarity-spacing-${e})` : void 0, me = L.forwardRef(({
|
|
83
83
|
as: e,
|
|
84
84
|
children: t,
|
|
85
|
-
className:
|
|
86
|
-
display:
|
|
85
|
+
className: a,
|
|
86
|
+
display: s,
|
|
87
|
+
position: r,
|
|
87
88
|
flexDirection: l,
|
|
88
|
-
alignItems:
|
|
89
|
-
justifyContent:
|
|
90
|
-
gap:
|
|
91
|
-
m:
|
|
92
|
-
mt:
|
|
93
|
-
mr:
|
|
94
|
-
mb:
|
|
95
|
-
ml:
|
|
96
|
-
mx:
|
|
97
|
-
my:
|
|
98
|
-
p:
|
|
99
|
-
pt:
|
|
100
|
-
pr:
|
|
101
|
-
pb:
|
|
102
|
-
pl:
|
|
103
|
-
px:
|
|
104
|
-
py:
|
|
105
|
-
bg:
|
|
106
|
-
color:
|
|
107
|
-
fontSize:
|
|
108
|
-
fontWeight:
|
|
109
|
-
textAlign:
|
|
110
|
-
lineHeight:
|
|
111
|
-
letterSpacing:
|
|
112
|
-
borderRadius:
|
|
113
|
-
|
|
89
|
+
alignItems: d,
|
|
90
|
+
justifyContent: o,
|
|
91
|
+
gap: i,
|
|
92
|
+
m: c,
|
|
93
|
+
mt: p,
|
|
94
|
+
mr: v,
|
|
95
|
+
mb: m,
|
|
96
|
+
ml: f,
|
|
97
|
+
mx: u,
|
|
98
|
+
my: h,
|
|
99
|
+
p: y,
|
|
100
|
+
pt: b,
|
|
101
|
+
pr: N,
|
|
102
|
+
pb: B,
|
|
103
|
+
pl: x,
|
|
104
|
+
px: g,
|
|
105
|
+
py: $,
|
|
106
|
+
bg: E,
|
|
107
|
+
color: k,
|
|
108
|
+
fontSize: j,
|
|
109
|
+
fontWeight: S,
|
|
110
|
+
textAlign: A,
|
|
111
|
+
lineHeight: R,
|
|
112
|
+
letterSpacing: _,
|
|
113
|
+
borderRadius: V,
|
|
114
|
+
borderTopLeftRadius: P,
|
|
115
|
+
borderTopRightRadius: M,
|
|
116
|
+
borderBottomLeftRadius: q,
|
|
117
|
+
borderBottomRightRadius: Z,
|
|
118
|
+
boxShadow: W,
|
|
114
119
|
borderWidth: H,
|
|
115
|
-
borderTopWidth:
|
|
116
|
-
borderRightWidth:
|
|
117
|
-
borderBottomWidth:
|
|
118
|
-
borderLeftWidth:
|
|
119
|
-
borderXWidth:
|
|
120
|
-
borderYWidth:
|
|
121
|
-
borderColor:
|
|
122
|
-
...
|
|
123
|
-
},
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
126
|
-
const
|
|
127
|
-
return `${
|
|
128
|
-
},
|
|
129
|
-
display:
|
|
120
|
+
borderTopWidth: ee,
|
|
121
|
+
borderRightWidth: re,
|
|
122
|
+
borderBottomWidth: le,
|
|
123
|
+
borderLeftWidth: ie,
|
|
124
|
+
borderXWidth: C,
|
|
125
|
+
borderYWidth: O,
|
|
126
|
+
borderColor: G,
|
|
127
|
+
...D
|
|
128
|
+
}, X) => {
|
|
129
|
+
const dt = e || "div", oe = (pe, Ne) => {
|
|
130
|
+
if (pe === void 0 || pe === 0) return;
|
|
131
|
+
const ut = `var(--clarity-border-width-${pe})`, pt = Ne ? fe(Ne) : "currentColor";
|
|
132
|
+
return `${ut} solid ${pt}`;
|
|
133
|
+
}, mt = {
|
|
134
|
+
display: s,
|
|
135
|
+
position: r,
|
|
130
136
|
flexDirection: l,
|
|
131
|
-
alignItems:
|
|
132
|
-
justifyContent:
|
|
133
|
-
gap:
|
|
134
|
-
marginTop:
|
|
135
|
-
marginRight:
|
|
136
|
-
marginBottom:
|
|
137
|
-
marginLeft:
|
|
138
|
-
paddingTop:
|
|
139
|
-
paddingRight:
|
|
140
|
-
paddingBottom:
|
|
141
|
-
paddingLeft:
|
|
142
|
-
backgroundColor:
|
|
143
|
-
color:
|
|
144
|
-
fontSize:
|
|
145
|
-
fontWeight:
|
|
146
|
-
textAlign:
|
|
147
|
-
lineHeight:
|
|
148
|
-
letterSpacing:
|
|
149
|
-
borderRadius:
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
137
|
+
alignItems: d,
|
|
138
|
+
justifyContent: o,
|
|
139
|
+
gap: J(i),
|
|
140
|
+
marginTop: J(p ?? h ?? c),
|
|
141
|
+
marginRight: J(v ?? u ?? c),
|
|
142
|
+
marginBottom: J(m ?? h ?? c),
|
|
143
|
+
marginLeft: J(f ?? u ?? c),
|
|
144
|
+
paddingTop: J(b ?? $ ?? y),
|
|
145
|
+
paddingRight: J(N ?? g ?? y),
|
|
146
|
+
paddingBottom: J(B ?? $ ?? y),
|
|
147
|
+
paddingLeft: J(x ?? g ?? y),
|
|
148
|
+
backgroundColor: E ? fe(E) : void 0,
|
|
149
|
+
color: k ? fe(k) : void 0,
|
|
150
|
+
fontSize: j ? `var(--clarity-font-size-${j})` : void 0,
|
|
151
|
+
fontWeight: S ? we.fontWeight[S] : void 0,
|
|
152
|
+
textAlign: A,
|
|
153
|
+
lineHeight: R,
|
|
154
|
+
letterSpacing: _ ? we.letterSpacing[_] : void 0,
|
|
155
|
+
borderRadius: V ? `var(--clarity-radius-${V})` : void 0,
|
|
156
|
+
borderTopLeftRadius: P ? `var(--clarity-radius-${P})` : void 0,
|
|
157
|
+
borderTopRightRadius: M ? `var(--clarity-radius-${M})` : void 0,
|
|
158
|
+
borderBottomLeftRadius: q ? `var(--clarity-radius-${q})` : void 0,
|
|
159
|
+
borderBottomRightRadius: Z ? `var(--clarity-radius-${Z})` : void 0,
|
|
160
|
+
boxShadow: W ? `var(--clarity-shadow-${W})` : void 0,
|
|
161
|
+
border: oe(H, G),
|
|
162
|
+
borderTop: oe(ee ?? O),
|
|
163
|
+
borderRight: oe(re ?? C),
|
|
164
|
+
borderBottom: oe(le ?? O),
|
|
165
|
+
borderLeft: oe(ie ?? C)
|
|
156
166
|
};
|
|
157
|
-
return /* @__PURE__ */
|
|
158
|
-
}),
|
|
167
|
+
return /* @__PURE__ */ n(dt, { ref: X, className: `clarity-box ${a || ""}`.trim(), style: mt, ...D, children: t });
|
|
168
|
+
}), Ft = ({
|
|
159
169
|
variant: e = "primary",
|
|
160
170
|
size: t = "medium",
|
|
161
|
-
disabled:
|
|
162
|
-
loading:
|
|
163
|
-
children:
|
|
164
|
-
onClick:
|
|
171
|
+
disabled: a = !1,
|
|
172
|
+
loading: s = !1,
|
|
173
|
+
children: r,
|
|
174
|
+
onClick: l,
|
|
165
175
|
type: d = "button",
|
|
166
176
|
className: o = "",
|
|
167
|
-
title:
|
|
177
|
+
title: i,
|
|
168
178
|
customColor: c,
|
|
169
179
|
customColorHover: p,
|
|
170
180
|
...v
|
|
@@ -173,8 +183,8 @@ const Dt = ({
|
|
|
173
183
|
m,
|
|
174
184
|
!c && `${m}--${e}`,
|
|
175
185
|
`${m}--${t}`,
|
|
176
|
-
|
|
177
|
-
|
|
186
|
+
s && `${m}--loading`,
|
|
187
|
+
a && `${m}--disabled`,
|
|
178
188
|
o
|
|
179
189
|
].filter(Boolean).join(" "), u = {};
|
|
180
190
|
return c && (u["--button-bg"] = c, u["--button-hover-bg"] = p || `${c}E6`, u["--button-border"] = c, u["--button-hover-border"] = p || `${c}E6`, u["--button-fg"] = "#fff"), /* @__PURE__ */ w(
|
|
@@ -182,59 +192,59 @@ const Dt = ({
|
|
|
182
192
|
{
|
|
183
193
|
className: f,
|
|
184
194
|
style: u,
|
|
185
|
-
disabled:
|
|
186
|
-
onClick:
|
|
195
|
+
disabled: a || s,
|
|
196
|
+
onClick: l,
|
|
187
197
|
type: d,
|
|
188
|
-
title:
|
|
198
|
+
title: i,
|
|
189
199
|
...v,
|
|
190
200
|
children: [
|
|
191
|
-
|
|
192
|
-
|
|
201
|
+
s && /* @__PURE__ */ n("div", { className: `${m}__spinner` }),
|
|
202
|
+
r
|
|
193
203
|
]
|
|
194
204
|
}
|
|
195
205
|
);
|
|
196
|
-
},
|
|
206
|
+
}, Gt = ({
|
|
197
207
|
variant: e = "primary",
|
|
198
208
|
size: t = "medium",
|
|
199
|
-
filled:
|
|
200
|
-
items:
|
|
201
|
-
value:
|
|
202
|
-
multiple:
|
|
209
|
+
filled: a = !0,
|
|
210
|
+
items: s,
|
|
211
|
+
value: r,
|
|
212
|
+
multiple: l = !1,
|
|
203
213
|
disabled: d = !1,
|
|
204
214
|
onChange: o,
|
|
205
|
-
className:
|
|
215
|
+
className: i = "",
|
|
206
216
|
...c
|
|
207
217
|
}) => {
|
|
208
218
|
const p = "clarity-button-group", v = `${p}--${e}`, m = [
|
|
209
219
|
p,
|
|
210
220
|
v,
|
|
211
221
|
`${p}--${t}`,
|
|
212
|
-
!
|
|
222
|
+
!a && `${p}--outline`,
|
|
213
223
|
d && `${p}--disabled`,
|
|
214
|
-
|
|
224
|
+
i
|
|
215
225
|
].filter(Boolean).join(" "), f = (h) => {
|
|
216
226
|
if (d || !o) return;
|
|
217
|
-
const y =
|
|
227
|
+
const y = s.find((b) => b.id === h);
|
|
218
228
|
if (!(y != null && y.disabled))
|
|
219
|
-
if (
|
|
220
|
-
const b = Array.isArray(
|
|
229
|
+
if (l) {
|
|
230
|
+
const b = Array.isArray(r) ? r : [], N = b.includes(h) ? b.filter((B) => B !== h) : [...b, h];
|
|
221
231
|
o(N);
|
|
222
232
|
} else
|
|
223
233
|
o(h);
|
|
224
|
-
}, u = (h) =>
|
|
225
|
-
return /* @__PURE__ */
|
|
234
|
+
}, u = (h) => l ? Array.isArray(r) && r.includes(h) : r === h;
|
|
235
|
+
return /* @__PURE__ */ n(
|
|
226
236
|
"div",
|
|
227
237
|
{
|
|
228
238
|
className: m,
|
|
229
239
|
role: "group",
|
|
230
240
|
...c,
|
|
231
|
-
children:
|
|
241
|
+
children: s.map((h, y) => {
|
|
232
242
|
const b = u(h.id), N = [
|
|
233
243
|
`${p}__item`,
|
|
234
244
|
b && `${p}__item--selected`,
|
|
235
245
|
h.disabled && `${p}__item--disabled`,
|
|
236
246
|
y === 0 && `${p}__item--first`,
|
|
237
|
-
y ===
|
|
247
|
+
y === s.length - 1 && `${p}__item--last`
|
|
238
248
|
].filter(Boolean).join(" ");
|
|
239
249
|
return /* @__PURE__ */ w(
|
|
240
250
|
"button",
|
|
@@ -245,8 +255,8 @@ const Dt = ({
|
|
|
245
255
|
type: "button",
|
|
246
256
|
"aria-pressed": b,
|
|
247
257
|
children: [
|
|
248
|
-
h.icon && /* @__PURE__ */
|
|
249
|
-
/* @__PURE__ */
|
|
258
|
+
h.icon && /* @__PURE__ */ n("span", { className: `${p}__item-icon`, children: h.icon }),
|
|
259
|
+
/* @__PURE__ */ n("span", { className: `${p}__item-label`, children: h.label })
|
|
250
260
|
]
|
|
251
261
|
},
|
|
252
262
|
h.id
|
|
@@ -254,16 +264,16 @@ const Dt = ({
|
|
|
254
264
|
})
|
|
255
265
|
}
|
|
256
266
|
);
|
|
257
|
-
},
|
|
267
|
+
}, bt = L.forwardRef(({
|
|
258
268
|
variant: e,
|
|
259
269
|
size: t = "medium",
|
|
260
|
-
label:
|
|
261
|
-
helperText:
|
|
262
|
-
error:
|
|
263
|
-
errorMessage:
|
|
270
|
+
label: a,
|
|
271
|
+
helperText: s,
|
|
272
|
+
error: r = !1,
|
|
273
|
+
errorMessage: l,
|
|
264
274
|
startIcon: d,
|
|
265
275
|
endIcon: o,
|
|
266
|
-
className:
|
|
276
|
+
className: i = "",
|
|
267
277
|
disabled: c = !1,
|
|
268
278
|
value: p,
|
|
269
279
|
defaultValue: v,
|
|
@@ -271,33 +281,33 @@ const Dt = ({
|
|
|
271
281
|
onBlur: f,
|
|
272
282
|
...u
|
|
273
283
|
}, h) => {
|
|
274
|
-
const [y, b] = T(!1), [N, B] = T(!1), x =
|
|
275
|
-
|
|
284
|
+
const [y, b] = T(!1), [N, B] = T(!1), x = F(null);
|
|
285
|
+
L.useImperativeHandle(h, () => x.current), I(() => {
|
|
276
286
|
const k = x.current;
|
|
277
287
|
k && B(k.value.length > 0);
|
|
278
288
|
}, [p, v]);
|
|
279
|
-
const
|
|
289
|
+
const g = (k) => {
|
|
280
290
|
b(!0), m == null || m(k);
|
|
281
291
|
}, $ = (k) => {
|
|
282
292
|
b(!1), B(k.target.value.length > 0), f == null || f(k);
|
|
283
|
-
},
|
|
293
|
+
}, E = [
|
|
284
294
|
"clarity-input",
|
|
285
295
|
"clarity-input--outlined",
|
|
286
296
|
`clarity-input--${t}`,
|
|
287
297
|
e && `clarity-input--${e}`,
|
|
288
|
-
|
|
298
|
+
r && "clarity-input--error",
|
|
289
299
|
c && "clarity-input--disabled",
|
|
290
300
|
y && "clarity-input--focused",
|
|
291
301
|
N && "clarity-input--has-value",
|
|
292
302
|
d && "clarity-input--with-start-icon",
|
|
293
303
|
o && "clarity-input--with-end-icon",
|
|
294
|
-
|
|
304
|
+
i
|
|
295
305
|
].filter(Boolean).join(" ");
|
|
296
306
|
return /* @__PURE__ */ w("div", { className: "clarity-input-wrapper", children: [
|
|
297
|
-
/* @__PURE__ */ w("div", { className:
|
|
298
|
-
d && /* @__PURE__ */
|
|
307
|
+
/* @__PURE__ */ w("div", { className: E, children: [
|
|
308
|
+
d && /* @__PURE__ */ n("div", { className: "clarity-input__start-icon", children: d }),
|
|
299
309
|
/* @__PURE__ */ w("div", { className: "clarity-input__field", children: [
|
|
300
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ n(
|
|
301
311
|
"input",
|
|
302
312
|
{
|
|
303
313
|
ref: x,
|
|
@@ -305,29 +315,29 @@ const Dt = ({
|
|
|
305
315
|
disabled: c,
|
|
306
316
|
value: p,
|
|
307
317
|
defaultValue: v,
|
|
308
|
-
onFocus:
|
|
318
|
+
onFocus: g,
|
|
309
319
|
onBlur: $,
|
|
310
320
|
...u
|
|
311
321
|
}
|
|
312
322
|
),
|
|
313
|
-
|
|
323
|
+
a && /* @__PURE__ */ n("label", { className: "clarity-input__label", children: a })
|
|
314
324
|
] }),
|
|
315
|
-
o && /* @__PURE__ */
|
|
325
|
+
o && /* @__PURE__ */ n("div", { className: "clarity-input__end-icon", children: o })
|
|
316
326
|
] }),
|
|
317
|
-
(
|
|
327
|
+
(s || r && l) && /* @__PURE__ */ n("div", { className: "clarity-input__helper-text", children: r && l ? l : s })
|
|
318
328
|
] });
|
|
319
329
|
});
|
|
320
|
-
|
|
321
|
-
const
|
|
330
|
+
bt.displayName = "Input";
|
|
331
|
+
const Ct = L.forwardRef(({
|
|
322
332
|
variant: e,
|
|
323
333
|
size: t = "medium",
|
|
324
|
-
label:
|
|
325
|
-
helperText:
|
|
326
|
-
error:
|
|
327
|
-
errorMessage:
|
|
334
|
+
label: a,
|
|
335
|
+
helperText: s,
|
|
336
|
+
error: r = !1,
|
|
337
|
+
errorMessage: l,
|
|
328
338
|
startIcon: d,
|
|
329
339
|
endIcon: o,
|
|
330
|
-
className:
|
|
340
|
+
className: i = "",
|
|
331
341
|
disabled: c = !1,
|
|
332
342
|
value: p,
|
|
333
343
|
defaultValue: v,
|
|
@@ -339,37 +349,37 @@ const pt = E.forwardRef(({
|
|
|
339
349
|
resizable: b = !0,
|
|
340
350
|
...N
|
|
341
351
|
}, B) => {
|
|
342
|
-
const [x,
|
|
343
|
-
|
|
344
|
-
const
|
|
345
|
-
|
|
352
|
+
const [x, g] = T(!1), [$, E] = T(!1), k = F(null);
|
|
353
|
+
L.useImperativeHandle(B, () => k.current), I(() => {
|
|
354
|
+
const _ = k.current;
|
|
355
|
+
_ && E(_.value.length > 0);
|
|
346
356
|
}, [p, v]);
|
|
347
|
-
const j = (
|
|
348
|
-
|
|
349
|
-
},
|
|
350
|
-
|
|
357
|
+
const j = (_) => {
|
|
358
|
+
g(!0), m == null || m(_);
|
|
359
|
+
}, S = (_) => {
|
|
360
|
+
g(!1), E(_.target.value.length > 0), f == null || f(_);
|
|
351
361
|
}, A = [
|
|
352
362
|
"clarity-textarea",
|
|
353
363
|
"clarity-textarea--outlined",
|
|
354
364
|
`clarity-textarea--${t}`,
|
|
355
365
|
e && `clarity-textarea--${e}`,
|
|
356
|
-
|
|
366
|
+
r && "clarity-textarea--error",
|
|
357
367
|
c && "clarity-textarea--disabled",
|
|
358
368
|
x && "clarity-textarea--focused",
|
|
359
369
|
$ && "clarity-textarea--has-value",
|
|
360
370
|
d && "clarity-textarea--with-start-icon",
|
|
361
371
|
o && "clarity-textarea--with-end-icon",
|
|
362
|
-
|
|
363
|
-
].filter(Boolean).join(" "),
|
|
372
|
+
i
|
|
373
|
+
].filter(Boolean).join(" "), R = {
|
|
364
374
|
resize: b ? "vertical" : "none",
|
|
365
375
|
minHeight: h ? `${h}px` : void 0,
|
|
366
376
|
maxHeight: y ? `${y}px` : void 0
|
|
367
377
|
};
|
|
368
378
|
return /* @__PURE__ */ w("div", { className: "clarity-textarea-wrapper", children: [
|
|
369
379
|
/* @__PURE__ */ w("div", { className: A, children: [
|
|
370
|
-
d && /* @__PURE__ */
|
|
380
|
+
d && /* @__PURE__ */ n("div", { className: "clarity-textarea__start-icon", children: d }),
|
|
371
381
|
/* @__PURE__ */ w("div", { className: "clarity-textarea__field", children: [
|
|
372
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ n(
|
|
373
383
|
"textarea",
|
|
374
384
|
{
|
|
375
385
|
ref: k,
|
|
@@ -378,30 +388,30 @@ const pt = E.forwardRef(({
|
|
|
378
388
|
value: p,
|
|
379
389
|
defaultValue: v,
|
|
380
390
|
onFocus: j,
|
|
381
|
-
onBlur:
|
|
391
|
+
onBlur: S,
|
|
382
392
|
rows: u,
|
|
383
|
-
style:
|
|
393
|
+
style: R,
|
|
384
394
|
...N
|
|
385
395
|
}
|
|
386
396
|
),
|
|
387
|
-
|
|
397
|
+
a && /* @__PURE__ */ n("label", { className: "clarity-textarea__label", children: a })
|
|
388
398
|
] }),
|
|
389
|
-
o && /* @__PURE__ */
|
|
399
|
+
o && /* @__PURE__ */ n("div", { className: "clarity-textarea__end-icon", children: o })
|
|
390
400
|
] }),
|
|
391
|
-
(
|
|
401
|
+
(s || r && l) && /* @__PURE__ */ n("div", { className: "clarity-textarea__helper-text", children: r && l ? l : s })
|
|
392
402
|
] });
|
|
393
403
|
});
|
|
394
|
-
|
|
395
|
-
const
|
|
404
|
+
Ct.displayName = "Textarea";
|
|
405
|
+
const Nt = L.forwardRef(({
|
|
396
406
|
variant: e,
|
|
397
407
|
size: t = "medium",
|
|
398
|
-
label:
|
|
399
|
-
helperText:
|
|
400
|
-
error:
|
|
401
|
-
errorMessage:
|
|
408
|
+
label: a,
|
|
409
|
+
helperText: s,
|
|
410
|
+
error: r = !1,
|
|
411
|
+
errorMessage: l,
|
|
402
412
|
startIcon: d,
|
|
403
413
|
endIcon: o,
|
|
404
|
-
className:
|
|
414
|
+
className: i = "",
|
|
405
415
|
disabled: c = !1,
|
|
406
416
|
value: p,
|
|
407
417
|
defaultValue: v,
|
|
@@ -414,94 +424,94 @@ const ft = E.forwardRef(({
|
|
|
414
424
|
isSearchable: N = !1,
|
|
415
425
|
...B
|
|
416
426
|
}, x) => {
|
|
417
|
-
const [
|
|
418
|
-
|
|
419
|
-
p !== void 0 &&
|
|
420
|
-
}, [p]),
|
|
421
|
-
const C = (
|
|
422
|
-
|
|
427
|
+
const [g, $] = T(!1), [E, k] = T(!1), [j, S] = T(p || v || ""), [A, R] = T(""), _ = F(null), V = F(null);
|
|
428
|
+
L.useImperativeHandle(x, () => _.current), I(() => {
|
|
429
|
+
p !== void 0 && S(p);
|
|
430
|
+
}, [p]), I(() => {
|
|
431
|
+
const C = (O) => {
|
|
432
|
+
_.current && !_.current.contains(O.target) && ($(!1), k(!1), f == null || f());
|
|
423
433
|
};
|
|
424
434
|
return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
|
|
425
435
|
}, [f]);
|
|
426
|
-
const
|
|
436
|
+
const P = N && A ? h.filter(
|
|
427
437
|
(C) => C.label.toLowerCase().includes(A.toLowerCase())
|
|
428
|
-
) : h,
|
|
429
|
-
c || ($(!
|
|
438
|
+
) : h, M = () => {
|
|
439
|
+
c || ($(!g), k(!g), g ? (f == null || f(), N && R("")) : (m == null || m(), N && setTimeout(() => {
|
|
430
440
|
var C;
|
|
431
441
|
(C = V.current) == null || C.focus();
|
|
432
442
|
}, 0)));
|
|
433
443
|
}, q = (C) => {
|
|
434
|
-
C.disabled || (
|
|
435
|
-
},
|
|
436
|
-
|
|
437
|
-
},
|
|
438
|
-
C.key === "Escape" ? ($(!1), k(!1),
|
|
439
|
-
},
|
|
440
|
-
C.stopPropagation(),
|
|
441
|
-
},
|
|
444
|
+
C.disabled || (S(C.value), $(!1), k(!1), R(""), u == null || u(C.value), f == null || f());
|
|
445
|
+
}, Z = (C) => {
|
|
446
|
+
R(C.target.value);
|
|
447
|
+
}, W = (C) => {
|
|
448
|
+
C.key === "Escape" ? ($(!1), k(!1), R("")) : C.key === "Enter" && P.length > 0 && P[0] && q(P[0]);
|
|
449
|
+
}, H = h.find((C) => C.value === j), ee = j !== "" && j !== void 0, re = (C) => {
|
|
450
|
+
C.stopPropagation(), S(""), u == null || u("");
|
|
451
|
+
}, le = ee || E || y || N && A, ie = [
|
|
442
452
|
"clarity-select",
|
|
443
453
|
"clarity-select--outlined",
|
|
444
454
|
`clarity-select--${t}`,
|
|
445
455
|
e && `clarity-select--${e}`,
|
|
446
|
-
|
|
456
|
+
r && "clarity-select--error",
|
|
447
457
|
c && "clarity-select--disabled",
|
|
448
|
-
(
|
|
449
|
-
|
|
450
|
-
|
|
458
|
+
(E || g) && "clarity-select--focused",
|
|
459
|
+
le && "clarity-select--label-up",
|
|
460
|
+
g && "clarity-select--open",
|
|
451
461
|
N && "clarity-select--searchable",
|
|
452
462
|
d && "clarity-select--with-start-icon",
|
|
453
463
|
(o || b) && "clarity-select--with-end-icon",
|
|
454
|
-
|
|
464
|
+
i
|
|
455
465
|
].filter(Boolean).join(" ");
|
|
456
466
|
return /* @__PURE__ */ w("div", { className: "clarity-select-wrapper", children: [
|
|
457
467
|
/* @__PURE__ */ w(
|
|
458
468
|
"div",
|
|
459
469
|
{
|
|
460
|
-
ref:
|
|
470
|
+
ref: _,
|
|
461
471
|
className: ie,
|
|
462
|
-
onClick: N ? void 0 :
|
|
472
|
+
onClick: N ? void 0 : M,
|
|
463
473
|
role: "combobox",
|
|
464
|
-
"aria-expanded":
|
|
474
|
+
"aria-expanded": g,
|
|
465
475
|
"aria-haspopup": "listbox",
|
|
466
476
|
tabIndex: c || N ? -1 : 0,
|
|
467
477
|
...B,
|
|
468
478
|
children: [
|
|
469
|
-
d && /* @__PURE__ */
|
|
479
|
+
d && /* @__PURE__ */ n("div", { className: "clarity-select__start-icon", children: d }),
|
|
470
480
|
/* @__PURE__ */ w("div", { className: "clarity-select__field", children: [
|
|
471
|
-
N ? /* @__PURE__ */
|
|
481
|
+
N ? /* @__PURE__ */ n(
|
|
472
482
|
"input",
|
|
473
483
|
{
|
|
474
484
|
ref: V,
|
|
475
485
|
type: "text",
|
|
476
486
|
className: "clarity-select__search-input",
|
|
477
|
-
value:
|
|
478
|
-
onChange:
|
|
479
|
-
onKeyDown:
|
|
487
|
+
value: g ? A : H ? H.label : "",
|
|
488
|
+
onChange: Z,
|
|
489
|
+
onKeyDown: W,
|
|
480
490
|
onFocus: () => {
|
|
481
|
-
|
|
491
|
+
g || ($(!0), k(!0), m == null || m());
|
|
482
492
|
},
|
|
483
|
-
placeholder:
|
|
493
|
+
placeholder: H ? H.label : y,
|
|
484
494
|
disabled: c,
|
|
485
|
-
readOnly: !
|
|
495
|
+
readOnly: !g
|
|
486
496
|
}
|
|
487
|
-
) : /* @__PURE__ */
|
|
488
|
-
|
|
497
|
+
) : /* @__PURE__ */ n("div", { className: "clarity-select__display", children: H ? H.label : y }),
|
|
498
|
+
a && /* @__PURE__ */ n("label", { className: "clarity-select__label", children: a })
|
|
489
499
|
] }),
|
|
490
|
-
b &&
|
|
500
|
+
b && ee && /* @__PURE__ */ n(
|
|
491
501
|
"button",
|
|
492
502
|
{
|
|
493
503
|
type: "button",
|
|
494
504
|
className: "clarity-select__clear-button",
|
|
495
|
-
onClick:
|
|
505
|
+
onClick: re,
|
|
496
506
|
"aria-label": "Limpar seleção",
|
|
497
|
-
children: /* @__PURE__ */
|
|
507
|
+
children: /* @__PURE__ */ n(
|
|
498
508
|
"svg",
|
|
499
509
|
{
|
|
500
510
|
width: "16",
|
|
501
511
|
height: "16",
|
|
502
512
|
viewBox: "0 0 16 16",
|
|
503
513
|
fill: "none",
|
|
504
|
-
children: /* @__PURE__ */
|
|
514
|
+
children: /* @__PURE__ */ n(
|
|
505
515
|
"path",
|
|
506
516
|
{
|
|
507
517
|
d: "M12 4L4 12M4 4L12 12",
|
|
@@ -515,12 +525,12 @@ const ft = E.forwardRef(({
|
|
|
515
525
|
)
|
|
516
526
|
}
|
|
517
527
|
),
|
|
518
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ n(
|
|
519
529
|
"div",
|
|
520
530
|
{
|
|
521
531
|
className: "clarity-select__end-icon",
|
|
522
|
-
onClick: N ?
|
|
523
|
-
children: o || /* @__PURE__ */
|
|
532
|
+
onClick: N ? M : void 0,
|
|
533
|
+
children: o || /* @__PURE__ */ n(
|
|
524
534
|
"svg",
|
|
525
535
|
{
|
|
526
536
|
className: "clarity-select__arrow",
|
|
@@ -528,7 +538,7 @@ const ft = E.forwardRef(({
|
|
|
528
538
|
height: "16",
|
|
529
539
|
viewBox: "0 0 16 16",
|
|
530
540
|
fill: "none",
|
|
531
|
-
children: /* @__PURE__ */
|
|
541
|
+
children: /* @__PURE__ */ n(
|
|
532
542
|
"path",
|
|
533
543
|
{
|
|
534
544
|
d: "M4 6L8 10L12 6",
|
|
@@ -542,7 +552,7 @@ const ft = E.forwardRef(({
|
|
|
542
552
|
)
|
|
543
553
|
}
|
|
544
554
|
),
|
|
545
|
-
|
|
555
|
+
g && /* @__PURE__ */ n("div", { className: "clarity-select__dropdown", children: /* @__PURE__ */ n("ul", { className: "clarity-select__options", role: "listbox", children: P.length > 0 ? P.map((C) => /* @__PURE__ */ n(
|
|
546
556
|
"li",
|
|
547
557
|
{
|
|
548
558
|
className: [
|
|
@@ -556,24 +566,24 @@ const ft = E.forwardRef(({
|
|
|
556
566
|
children: C.label
|
|
557
567
|
},
|
|
558
568
|
C.value
|
|
559
|
-
)) : /* @__PURE__ */
|
|
569
|
+
)) : /* @__PURE__ */ n("li", { className: "clarity-select__option clarity-select__option--no-results", children: "Nenhum resultado encontrado" }) }) })
|
|
560
570
|
]
|
|
561
571
|
}
|
|
562
572
|
),
|
|
563
|
-
(
|
|
573
|
+
(s || r && l) && /* @__PURE__ */ n("div", { className: "clarity-select__helper-text", children: r && l ? l : s })
|
|
564
574
|
] });
|
|
565
575
|
});
|
|
566
|
-
|
|
567
|
-
const
|
|
576
|
+
Nt.displayName = "Select";
|
|
577
|
+
const wt = ht(({
|
|
568
578
|
options: e = [],
|
|
569
579
|
value: t = [],
|
|
570
|
-
onChange:
|
|
571
|
-
placeholder:
|
|
572
|
-
label:
|
|
573
|
-
helperText:
|
|
580
|
+
onChange: a,
|
|
581
|
+
placeholder: s = "Selecione opções",
|
|
582
|
+
label: r,
|
|
583
|
+
helperText: l,
|
|
574
584
|
error: d = !1,
|
|
575
585
|
errorMessage: o,
|
|
576
|
-
disabled:
|
|
586
|
+
disabled: i = !1,
|
|
577
587
|
variant: c = "primary",
|
|
578
588
|
size: p = "medium",
|
|
579
589
|
maxSelectedLabels: v = 3,
|
|
@@ -585,65 +595,65 @@ const ht = ct(({
|
|
|
585
595
|
"data-testid": b,
|
|
586
596
|
...N
|
|
587
597
|
}, B) => {
|
|
588
|
-
const [x,
|
|
589
|
-
|
|
598
|
+
const [x, g] = T(!1), [$, E] = T(""), [k, j] = T(!1), S = F(null), A = F(null), R = F(null), _ = (C) => {
|
|
599
|
+
S.current = C, B && (typeof B == "function" ? B(C) : B.current = C);
|
|
590
600
|
};
|
|
591
|
-
|
|
592
|
-
const C = (
|
|
593
|
-
|
|
601
|
+
I(() => {
|
|
602
|
+
const C = (O) => {
|
|
603
|
+
S.current && !S.current.contains(O.target) && (g(!1), j(!1), E(""));
|
|
594
604
|
};
|
|
595
605
|
return document.addEventListener("click", C), () => document.removeEventListener("click", C);
|
|
596
606
|
}, []);
|
|
597
607
|
const V = e.filter(
|
|
598
608
|
(C) => C.label.toLowerCase().includes($.toLowerCase())
|
|
599
|
-
),
|
|
600
|
-
|
|
609
|
+
), P = () => {
|
|
610
|
+
i || (g(!x), j(!x), x ? E("") : setTimeout(() => {
|
|
601
611
|
var C;
|
|
602
612
|
(C = A.current) == null || C.focus();
|
|
603
613
|
}, 100));
|
|
604
|
-
},
|
|
605
|
-
if (
|
|
614
|
+
}, M = (C, O) => {
|
|
615
|
+
if (i)
|
|
606
616
|
return;
|
|
607
|
-
|
|
617
|
+
O && (O.stopPropagation(), O.preventDefault());
|
|
608
618
|
const G = t.includes(C);
|
|
609
|
-
let
|
|
610
|
-
G ?
|
|
611
|
-
}, q = (C,
|
|
612
|
-
if (
|
|
613
|
-
const G = t.filter((
|
|
614
|
-
|
|
615
|
-
},
|
|
616
|
-
C.stopPropagation(), !
|
|
617
|
-
},
|
|
618
|
-
|
|
619
|
-
},
|
|
620
|
-
C.key === "Escape" && (
|
|
621
|
-
},
|
|
619
|
+
let D;
|
|
620
|
+
G ? D = t.filter((X) => X !== C) : D = [...t, C], a && a(D);
|
|
621
|
+
}, q = (C, O) => {
|
|
622
|
+
if (O.stopPropagation(), i) return;
|
|
623
|
+
const G = t.filter((D) => D !== C);
|
|
624
|
+
a == null || a(G);
|
|
625
|
+
}, Z = (C) => {
|
|
626
|
+
C.stopPropagation(), !i && (a == null || a([]));
|
|
627
|
+
}, W = (C) => {
|
|
628
|
+
E(C.target.value);
|
|
629
|
+
}, H = (C) => {
|
|
630
|
+
C.key === "Escape" && (g(!1), j(!1), E(""));
|
|
631
|
+
}, ee = k || x || t.length > 0, re = () => {
|
|
622
632
|
if (t.length === 0) return null;
|
|
623
633
|
const C = t.map(
|
|
624
|
-
(
|
|
625
|
-
).filter(Boolean),
|
|
634
|
+
(D) => e.find((X) => X.value === D)
|
|
635
|
+
).filter(Boolean), O = C.slice(0, v), G = C.length - v;
|
|
626
636
|
return /* @__PURE__ */ w("div", { className: "clarity-multiselect__chips", children: [
|
|
627
|
-
|
|
628
|
-
/* @__PURE__ */
|
|
629
|
-
!
|
|
637
|
+
O.map((D) => /* @__PURE__ */ w("div", { className: "clarity-multiselect__chip", children: [
|
|
638
|
+
/* @__PURE__ */ n("span", { className: "clarity-multiselect__chip-label", children: D.label }),
|
|
639
|
+
!i && /* @__PURE__ */ n(
|
|
630
640
|
"button",
|
|
631
641
|
{
|
|
632
642
|
type: "button",
|
|
633
643
|
className: "clarity-multiselect__chip-remove",
|
|
634
|
-
onClick: (
|
|
635
|
-
"aria-label": `Remover ${
|
|
644
|
+
onClick: (X) => q(D.value, X),
|
|
645
|
+
"aria-label": `Remover ${D.label}`,
|
|
636
646
|
children: "×"
|
|
637
647
|
}
|
|
638
648
|
)
|
|
639
|
-
] },
|
|
649
|
+
] }, D.value)),
|
|
640
650
|
G > 0 && /* @__PURE__ */ w("div", { className: "clarity-multiselect__chip clarity-multiselect__chip--count", children: [
|
|
641
651
|
"+",
|
|
642
652
|
G,
|
|
643
653
|
" mais"
|
|
644
654
|
] })
|
|
645
655
|
] });
|
|
646
|
-
},
|
|
656
|
+
}, le = [
|
|
647
657
|
"clarity-multiselect-wrapper",
|
|
648
658
|
f
|
|
649
659
|
].filter(Boolean).join(" "), ie = [
|
|
@@ -652,16 +662,16 @@ const ht = ct(({
|
|
|
652
662
|
`clarity-multiselect--${p}`,
|
|
653
663
|
x && "clarity-multiselect--open",
|
|
654
664
|
k && "clarity-multiselect--focused",
|
|
655
|
-
|
|
665
|
+
ee && "clarity-multiselect--label-up",
|
|
656
666
|
d && "clarity-multiselect--error",
|
|
657
|
-
|
|
667
|
+
i && "clarity-multiselect--disabled",
|
|
658
668
|
t.length > 0 && "clarity-multiselect--has-value"
|
|
659
669
|
].filter(Boolean).join(" ");
|
|
660
|
-
return /* @__PURE__ */ w("div", { className:
|
|
670
|
+
return /* @__PURE__ */ w("div", { className: le, children: [
|
|
661
671
|
/* @__PURE__ */ w(
|
|
662
672
|
"div",
|
|
663
673
|
{
|
|
664
|
-
ref:
|
|
674
|
+
ref: _,
|
|
665
675
|
className: ie,
|
|
666
676
|
"data-testid": b,
|
|
667
677
|
...N,
|
|
@@ -670,25 +680,25 @@ const ht = ct(({
|
|
|
670
680
|
"div",
|
|
671
681
|
{
|
|
672
682
|
className: "clarity-multiselect__field",
|
|
673
|
-
onClick:
|
|
683
|
+
onClick: P,
|
|
674
684
|
children: [
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
y && /* @__PURE__ */
|
|
685
|
+
r && /* @__PURE__ */ w("label", { className: "clarity-multiselect__label", children: [
|
|
686
|
+
r,
|
|
687
|
+
y && /* @__PURE__ */ n("span", { className: "clarity-multiselect__required", children: "*" })
|
|
678
688
|
] }),
|
|
679
|
-
/* @__PURE__ */
|
|
689
|
+
/* @__PURE__ */ n("div", { className: "clarity-multiselect__content", children: t.length > 0 ? re() : /* @__PURE__ */ n("span", { className: "clarity-multiselect__placeholder", children: s }) }),
|
|
680
690
|
/* @__PURE__ */ w("div", { className: "clarity-multiselect__icons", children: [
|
|
681
|
-
t.length > 0 && !
|
|
691
|
+
t.length > 0 && !i && /* @__PURE__ */ n(
|
|
682
692
|
"button",
|
|
683
693
|
{
|
|
684
694
|
type: "button",
|
|
685
695
|
className: "clarity-multiselect__clear-button",
|
|
686
|
-
onClick:
|
|
696
|
+
onClick: Z,
|
|
687
697
|
"aria-label": "Limpar seleção",
|
|
688
698
|
children: "×"
|
|
689
699
|
}
|
|
690
700
|
),
|
|
691
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ n("div", { className: "clarity-multiselect__dropdown-icon", children: /* @__PURE__ */ n("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ n(
|
|
692
702
|
"path",
|
|
693
703
|
{
|
|
694
704
|
d: "M4 6L8 10L12 6",
|
|
@@ -702,8 +712,8 @@ const ht = ct(({
|
|
|
702
712
|
]
|
|
703
713
|
}
|
|
704
714
|
),
|
|
705
|
-
x && /* @__PURE__ */ w("div", { ref:
|
|
706
|
-
/* @__PURE__ */
|
|
715
|
+
x && /* @__PURE__ */ w("div", { ref: R, className: "clarity-multiselect__dropdown", children: [
|
|
716
|
+
/* @__PURE__ */ n("div", { className: "clarity-multiselect__search", children: /* @__PURE__ */ n(
|
|
707
717
|
"input",
|
|
708
718
|
{
|
|
709
719
|
ref: A,
|
|
@@ -711,26 +721,26 @@ const ht = ct(({
|
|
|
711
721
|
className: "clarity-multiselect__search-input",
|
|
712
722
|
placeholder: "Buscar opções...",
|
|
713
723
|
value: $,
|
|
714
|
-
onChange:
|
|
715
|
-
onKeyDown:
|
|
724
|
+
onChange: W,
|
|
725
|
+
onKeyDown: H
|
|
716
726
|
}
|
|
717
727
|
) }),
|
|
718
|
-
/* @__PURE__ */
|
|
719
|
-
const
|
|
728
|
+
/* @__PURE__ */ n("ul", { className: "clarity-multiselect__options", children: V.length > 0 ? V.map((C) => {
|
|
729
|
+
const O = t.includes(C.value), G = C.disabled || i;
|
|
720
730
|
return /* @__PURE__ */ w(
|
|
721
731
|
"li",
|
|
722
732
|
{
|
|
723
733
|
className: [
|
|
724
734
|
"clarity-multiselect__option",
|
|
725
|
-
|
|
735
|
+
O && "clarity-multiselect__option--selected",
|
|
726
736
|
G && "clarity-multiselect__option--disabled"
|
|
727
737
|
].filter(Boolean).join(" "),
|
|
728
|
-
onClick: (
|
|
738
|
+
onClick: (D) => !G && M(C.value, D),
|
|
729
739
|
children: [
|
|
730
|
-
/* @__PURE__ */
|
|
740
|
+
/* @__PURE__ */ n("div", { className: "clarity-multiselect__option-checkbox", children: /* @__PURE__ */ n("div", { className: [
|
|
731
741
|
"clarity-multiselect__checkbox",
|
|
732
|
-
|
|
733
|
-
].filter(Boolean).join(" "), children:
|
|
742
|
+
O && "clarity-multiselect__checkbox--checked"
|
|
743
|
+
].filter(Boolean).join(" "), children: O && /* @__PURE__ */ n("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ n(
|
|
734
744
|
"path",
|
|
735
745
|
{
|
|
736
746
|
d: "M2 6L5 9L10 3",
|
|
@@ -740,88 +750,88 @@ const ht = ct(({
|
|
|
740
750
|
strokeLinejoin: "round"
|
|
741
751
|
}
|
|
742
752
|
) }) }) }),
|
|
743
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ n("span", { className: "clarity-multiselect__option-label", children: C.label })
|
|
744
754
|
]
|
|
745
755
|
},
|
|
746
756
|
C.value
|
|
747
757
|
);
|
|
748
|
-
}) : /* @__PURE__ */
|
|
758
|
+
}) : /* @__PURE__ */ n("li", { className: "clarity-multiselect__option clarity-multiselect__option--no-results", children: "Nenhum resultado encontrado" }) })
|
|
749
759
|
] })
|
|
750
760
|
]
|
|
751
761
|
}
|
|
752
762
|
),
|
|
753
|
-
(
|
|
763
|
+
(l || d && o) && /* @__PURE__ */ n("div", { className: "clarity-multiselect__helper", children: d && o ? /* @__PURE__ */ n("span", { className: "clarity-multiselect__error-message", children: o }) : l && /* @__PURE__ */ n("span", { className: "clarity-multiselect__helper-text", children: l }) })
|
|
754
764
|
] });
|
|
755
765
|
});
|
|
756
|
-
|
|
757
|
-
const
|
|
758
|
-
const e =
|
|
766
|
+
wt.displayName = "MultiSelect";
|
|
767
|
+
const ge = Q(null), _e = () => {
|
|
768
|
+
const e = U(ge);
|
|
759
769
|
if (!e)
|
|
760
770
|
throw new Error("useModal must be used within a Modal provider");
|
|
761
771
|
return e;
|
|
762
|
-
},
|
|
772
|
+
}, $e = ({
|
|
763
773
|
children: e,
|
|
764
774
|
className: t = "",
|
|
765
|
-
title:
|
|
775
|
+
title: a
|
|
766
776
|
}) => {
|
|
767
|
-
const { onClose:
|
|
777
|
+
const { onClose: s, variant: r, showCloseButton: l } = _e(), d = [
|
|
768
778
|
"clarity-modal-header",
|
|
769
779
|
t,
|
|
770
|
-
|
|
780
|
+
r && `clarity-modal-header--${r}`
|
|
771
781
|
].filter(Boolean).join(" "), o = [
|
|
772
782
|
"clarity-modal-close",
|
|
773
|
-
|
|
783
|
+
r && `clarity-modal-close--${r}`
|
|
774
784
|
].filter(Boolean).join(" ");
|
|
775
785
|
return /* @__PURE__ */ w("div", { className: d, children: [
|
|
776
|
-
|
|
786
|
+
a && /* @__PURE__ */ n("h2", { className: "clarity-modal-title", children: a }),
|
|
777
787
|
e,
|
|
778
|
-
|
|
779
|
-
|
|
788
|
+
l && /* @__PURE__ */ n("button", { className: o, onClick: (i) => {
|
|
789
|
+
i.stopPropagation(), s();
|
|
780
790
|
}, children: "×" })
|
|
781
791
|
] });
|
|
782
792
|
};
|
|
783
|
-
|
|
784
|
-
const
|
|
785
|
-
|
|
786
|
-
const
|
|
787
|
-
/* @__PURE__ */
|
|
793
|
+
$e.displayName = "Modal.Header";
|
|
794
|
+
const ke = ({ children: e, className: t = "" }) => /* @__PURE__ */ n("div", { className: `clarity-modal-content ${t}`, children: e });
|
|
795
|
+
ke.displayName = "Modal.Content";
|
|
796
|
+
const xe = ({ children: e, className: t = "" }) => /* @__PURE__ */ w("div", { className: `clarity-modal-footer ${t}`, children: [
|
|
797
|
+
/* @__PURE__ */ n("div", { className: "clarity-modal-scroll-indicator" }),
|
|
788
798
|
e
|
|
789
799
|
] });
|
|
790
|
-
|
|
791
|
-
const
|
|
792
|
-
onClick: (
|
|
793
|
-
var
|
|
794
|
-
t == null || t(), (
|
|
800
|
+
xe.displayName = "Modal.Footer";
|
|
801
|
+
const Te = ({ children: e, onClick: t }) => z(e, {
|
|
802
|
+
onClick: (a) => {
|
|
803
|
+
var s, r;
|
|
804
|
+
t == null || t(), (r = (s = e.props).onClick) == null || r.call(s, a);
|
|
795
805
|
}
|
|
796
806
|
});
|
|
797
|
-
|
|
798
|
-
const
|
|
799
|
-
const { onClose: t } =
|
|
807
|
+
Te.displayName = "Modal.Trigger";
|
|
808
|
+
const Be = ({ children: e }) => {
|
|
809
|
+
const { onClose: t } = _e();
|
|
800
810
|
return z(e, {
|
|
801
|
-
onClick: (
|
|
802
|
-
var
|
|
803
|
-
t(), (
|
|
811
|
+
onClick: (a) => {
|
|
812
|
+
var s, r;
|
|
813
|
+
t(), (r = (s = e.props).onClick) == null || r.call(s, a);
|
|
804
814
|
}
|
|
805
815
|
});
|
|
806
816
|
};
|
|
807
|
-
|
|
808
|
-
const
|
|
817
|
+
Be.displayName = "Modal.Close";
|
|
818
|
+
const Y = ({
|
|
809
819
|
isOpen: e,
|
|
810
820
|
onClose: t,
|
|
811
|
-
onOpen:
|
|
812
|
-
children:
|
|
813
|
-
className:
|
|
814
|
-
variant:
|
|
821
|
+
onOpen: a,
|
|
822
|
+
children: s,
|
|
823
|
+
className: r = "",
|
|
824
|
+
variant: l,
|
|
815
825
|
size: d = "medium",
|
|
816
826
|
showCloseButton: o = !0,
|
|
817
|
-
closeOnOverlayClick:
|
|
827
|
+
closeOnOverlayClick: i = !0
|
|
818
828
|
}) => {
|
|
819
829
|
const [c, p] = T(!1), m = e !== void 0 ? e : c, f = t || (() => {
|
|
820
830
|
p(!1);
|
|
821
831
|
});
|
|
822
|
-
|
|
823
|
-
m && (
|
|
824
|
-
}, [m,
|
|
832
|
+
I(() => {
|
|
833
|
+
m && (a == null || a());
|
|
834
|
+
}, [m, a]), I(() => {
|
|
825
835
|
const N = (B) => {
|
|
826
836
|
B.key === "Escape" && f();
|
|
827
837
|
};
|
|
@@ -830,242 +840,242 @@ const K = ({
|
|
|
830
840
|
};
|
|
831
841
|
}, [m, f]);
|
|
832
842
|
const u = (N) => {
|
|
833
|
-
|
|
834
|
-
}, h =
|
|
835
|
-
(N) =>
|
|
836
|
-
), y =
|
|
837
|
-
(N) =>
|
|
838
|
-
), b = ["clarity-modal",
|
|
839
|
-
return /* @__PURE__ */ w(
|
|
843
|
+
i && N.target === N.currentTarget && f();
|
|
844
|
+
}, h = L.Children.toArray(s).find(
|
|
845
|
+
(N) => ae(N) && N.type.displayName === "Modal.Trigger"
|
|
846
|
+
), y = L.Children.toArray(s).filter(
|
|
847
|
+
(N) => ae(N) && N.type.displayName !== "Modal.Trigger"
|
|
848
|
+
), b = ["clarity-modal", r, `clarity-modal--${d}`].filter(Boolean).join(" ");
|
|
849
|
+
return /* @__PURE__ */ w(ge.Provider, { value: { onClose: f, variant: l, showCloseButton: o }, children: [
|
|
840
850
|
h && z(h, { onClick: () => p(!0) }),
|
|
841
|
-
m && /* @__PURE__ */
|
|
851
|
+
m && /* @__PURE__ */ n("div", { className: "clarity-modal-overlay", onClick: u, children: /* @__PURE__ */ n("div", { className: b, children: y }) })
|
|
842
852
|
] });
|
|
843
853
|
};
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
const
|
|
851
|
-
const e =
|
|
854
|
+
Y.Header = $e;
|
|
855
|
+
Y.Content = ke;
|
|
856
|
+
Y.Footer = xe;
|
|
857
|
+
Y.Trigger = Te;
|
|
858
|
+
Y.Close = Be;
|
|
859
|
+
Y.displayName = "Modal";
|
|
860
|
+
const je = Q(void 0), zt = () => {
|
|
861
|
+
const e = U(je);
|
|
852
862
|
if (!e)
|
|
853
863
|
throw new Error("useToast must be used within a ToastProvider");
|
|
854
864
|
return e;
|
|
855
|
-
},
|
|
865
|
+
}, gt = ({ id: e, message: t, variant: a, duration: s, onClose: r, invertColors: l }) => {
|
|
856
866
|
const [d, o] = T("entering");
|
|
857
|
-
|
|
867
|
+
I(() => {
|
|
858
868
|
const c = setTimeout(() => {
|
|
859
869
|
o("visible");
|
|
860
870
|
}, 10), p = setTimeout(() => {
|
|
861
871
|
o("exiting");
|
|
862
|
-
},
|
|
863
|
-
|
|
864
|
-
},
|
|
872
|
+
}, s * 1e3 - 300), v = setTimeout(() => {
|
|
873
|
+
r(e);
|
|
874
|
+
}, s * 1e3);
|
|
865
875
|
return () => {
|
|
866
876
|
clearTimeout(c), clearTimeout(p), clearTimeout(v);
|
|
867
877
|
};
|
|
868
|
-
}, [e,
|
|
869
|
-
const
|
|
878
|
+
}, [e, s, r]);
|
|
879
|
+
const i = [
|
|
870
880
|
"cl-toast",
|
|
871
|
-
|
|
872
|
-
|
|
881
|
+
a,
|
|
882
|
+
l ? "colored-background" : "",
|
|
873
883
|
`cl-toast-${d}`
|
|
874
884
|
].filter(Boolean).join(" ");
|
|
875
|
-
return /* @__PURE__ */ w("div", { className:
|
|
876
|
-
/* @__PURE__ */
|
|
877
|
-
/* @__PURE__ */
|
|
878
|
-
/* @__PURE__ */
|
|
885
|
+
return /* @__PURE__ */ w("div", { className: i, children: [
|
|
886
|
+
/* @__PURE__ */ n("div", { className: "cl-toast-message", children: t }),
|
|
887
|
+
/* @__PURE__ */ n("button", { onClick: () => o("exiting"), className: "cl-toast-close-button", children: "×" }),
|
|
888
|
+
/* @__PURE__ */ n(
|
|
879
889
|
"div",
|
|
880
890
|
{
|
|
881
891
|
className: "cl-toast-progress-bar",
|
|
882
|
-
style: { animationDuration: `${
|
|
892
|
+
style: { animationDuration: `${s}s` }
|
|
883
893
|
}
|
|
884
894
|
)
|
|
885
895
|
] });
|
|
886
|
-
},
|
|
887
|
-
const [t,
|
|
896
|
+
}, Ut = ({ children: e }) => {
|
|
897
|
+
const [t, a] = T([]), s = te(() => {
|
|
888
898
|
if (typeof document < "u") {
|
|
889
|
-
const
|
|
890
|
-
return
|
|
899
|
+
const i = document.createElement("div");
|
|
900
|
+
return i.id = "toast-portal-root", i;
|
|
891
901
|
}
|
|
892
902
|
return null;
|
|
893
903
|
}, []);
|
|
894
|
-
|
|
895
|
-
if (
|
|
896
|
-
return document.body.appendChild(
|
|
897
|
-
document.body.removeChild(
|
|
904
|
+
I(() => {
|
|
905
|
+
if (s)
|
|
906
|
+
return document.body.appendChild(s), () => {
|
|
907
|
+
document.body.removeChild(s);
|
|
898
908
|
};
|
|
899
|
-
}, [
|
|
900
|
-
const
|
|
909
|
+
}, [s]);
|
|
910
|
+
const r = de((i) => {
|
|
901
911
|
const p = {
|
|
902
912
|
id: (/* @__PURE__ */ new Date()).toISOString() + Math.random(),
|
|
903
913
|
// duration: 5,
|
|
904
914
|
// position: 'right-top',
|
|
905
|
-
...
|
|
915
|
+
...i
|
|
906
916
|
};
|
|
907
|
-
|
|
917
|
+
a((v) => {
|
|
908
918
|
const m = [p, ...v];
|
|
909
919
|
return m.length > 4 ? m.slice(0, 4) : m;
|
|
910
920
|
});
|
|
911
|
-
}, []),
|
|
912
|
-
|
|
913
|
-
}, []), d = te(() => t.reduce((
|
|
914
|
-
return /* @__PURE__ */ w(
|
|
921
|
+
}, []), l = de((i) => {
|
|
922
|
+
a((c) => c.filter((p) => p.id !== i));
|
|
923
|
+
}, []), d = te(() => t.reduce((i, c) => (i[c.position] || (i[c.position] = []), i[c.position].push(c), i), {}), [t]), o = te(() => ({ show: r }), [r]);
|
|
924
|
+
return /* @__PURE__ */ w(je.Provider, { value: o, children: [
|
|
915
925
|
e,
|
|
916
|
-
|
|
917
|
-
Object.entries(d).map(([
|
|
918
|
-
|
|
926
|
+
s && vt.createPortal(
|
|
927
|
+
Object.entries(d).map(([i, c]) => /* @__PURE__ */ n("div", { className: `cl-toast-container ${i}`, children: c.map((p) => /* @__PURE__ */ n(gt, { ...p, onClose: l }, p.id)) }, i)),
|
|
928
|
+
s
|
|
919
929
|
)
|
|
920
930
|
] });
|
|
921
|
-
},
|
|
922
|
-
const e =
|
|
931
|
+
}, Le = Q(null), Ee = () => {
|
|
932
|
+
const e = U(Le);
|
|
923
933
|
if (!e)
|
|
924
934
|
throw new Error("useOffcanvas must be used within an Offcanvas provider");
|
|
925
935
|
return e;
|
|
926
|
-
},
|
|
936
|
+
}, Se = ({
|
|
927
937
|
children: e,
|
|
928
938
|
className: t = ""
|
|
929
939
|
}) => {
|
|
930
|
-
const { onClose:
|
|
940
|
+
const { onClose: a, variant: s, showCloseButton: r, title: l } = Ee(), d = [
|
|
931
941
|
"clarity-offcanvas-header",
|
|
932
942
|
t
|
|
933
943
|
].filter(Boolean).join(" "), o = [
|
|
934
944
|
"clarity-offcanvas-close",
|
|
935
|
-
|
|
936
|
-
].filter(Boolean).join(" "),
|
|
945
|
+
s && `clarity-offcanvas-close--${s}`
|
|
946
|
+
].filter(Boolean).join(" "), i = [
|
|
937
947
|
"clarity-offcanvas-title",
|
|
938
|
-
|
|
948
|
+
s && `clarity-offcanvas-title--${s}`
|
|
939
949
|
].filter(Boolean).join(" ");
|
|
940
950
|
return /* @__PURE__ */ w("div", { className: d, children: [
|
|
941
|
-
|
|
951
|
+
l && /* @__PURE__ */ n("h2", { className: i, children: l }),
|
|
942
952
|
e,
|
|
943
|
-
|
|
944
|
-
c.stopPropagation(),
|
|
953
|
+
r && /* @__PURE__ */ n("button", { className: o, onClick: (c) => {
|
|
954
|
+
c.stopPropagation(), a();
|
|
945
955
|
}, children: "×" })
|
|
946
956
|
] });
|
|
947
957
|
};
|
|
948
|
-
|
|
949
|
-
const
|
|
950
|
-
|
|
951
|
-
const
|
|
952
|
-
onClick: (
|
|
953
|
-
var
|
|
954
|
-
t == null || t(), (
|
|
958
|
+
Se.displayName = "Offcanvas.Header";
|
|
959
|
+
const Re = ({ children: e, className: t = "" }) => /* @__PURE__ */ n("div", { className: `clarity-offcanvas-content ${t}`, children: e });
|
|
960
|
+
Re.displayName = "Offcanvas.Content";
|
|
961
|
+
const Oe = ({ children: e, onClick: t, variant: a }) => z(e, {
|
|
962
|
+
onClick: (s) => {
|
|
963
|
+
var r, l;
|
|
964
|
+
t == null || t(), (l = (r = e.props).onClick) == null || l.call(r, s);
|
|
955
965
|
},
|
|
956
|
-
variant:
|
|
966
|
+
variant: a
|
|
957
967
|
});
|
|
958
|
-
|
|
959
|
-
const
|
|
960
|
-
|
|
961
|
-
const
|
|
962
|
-
const { onClose: t } =
|
|
968
|
+
Oe.displayName = "Offcanvas.Trigger";
|
|
969
|
+
const he = ({ children: e, className: t = "" }) => /* @__PURE__ */ n("div", { className: `clarity-offcanvas-footer ${t}`, children: e });
|
|
970
|
+
he.displayName = "Offcanvas.Footer";
|
|
971
|
+
const Ie = ({ children: e }) => {
|
|
972
|
+
const { onClose: t } = Ee();
|
|
963
973
|
return z(e, {
|
|
964
|
-
onClick: (
|
|
965
|
-
var
|
|
966
|
-
t(), (
|
|
974
|
+
onClick: (a) => {
|
|
975
|
+
var s, r;
|
|
976
|
+
t(), (r = (s = e.props).onClick) == null || r.call(s, a);
|
|
967
977
|
}
|
|
968
978
|
});
|
|
969
979
|
};
|
|
970
|
-
|
|
971
|
-
const
|
|
980
|
+
Ie.displayName = "Offcanvas.Close";
|
|
981
|
+
const se = ({
|
|
972
982
|
isOpen: e,
|
|
973
983
|
onClose: t,
|
|
974
|
-
onOpen:
|
|
975
|
-
children:
|
|
976
|
-
className:
|
|
977
|
-
variant:
|
|
984
|
+
onOpen: a,
|
|
985
|
+
children: s,
|
|
986
|
+
className: r = "",
|
|
987
|
+
variant: l,
|
|
978
988
|
placement: d = "right",
|
|
979
989
|
closeOnOverlayClick: o = !0,
|
|
980
|
-
showCloseButton:
|
|
990
|
+
showCloseButton: i = !0,
|
|
981
991
|
title: c
|
|
982
992
|
}) => {
|
|
983
|
-
const [p, v] = T(!1), [m, f] = T(!1), [u, h] = T(!1), y = e !== void 0, b = y ? e : p, N =
|
|
993
|
+
const [p, v] = T(!1), [m, f] = T(!1), [u, h] = T(!1), y = e !== void 0, b = y ? e : p, N = de(() => {
|
|
984
994
|
t ? t() : v(!1);
|
|
985
|
-
}, [t]), B =
|
|
986
|
-
y || v(!0),
|
|
987
|
-
}, [y,
|
|
988
|
-
|
|
995
|
+
}, [t]), B = de(() => {
|
|
996
|
+
y || v(!0), a == null || a();
|
|
997
|
+
}, [y, a]);
|
|
998
|
+
I(() => {
|
|
989
999
|
if (b) {
|
|
990
1000
|
h(!0);
|
|
991
|
-
const
|
|
1001
|
+
const _ = setTimeout(() => {
|
|
992
1002
|
f(!0);
|
|
993
1003
|
}, 50);
|
|
994
|
-
return () => clearTimeout(
|
|
1004
|
+
return () => clearTimeout(_);
|
|
995
1005
|
} else {
|
|
996
1006
|
f(!1);
|
|
997
|
-
const
|
|
1007
|
+
const _ = setTimeout(() => {
|
|
998
1008
|
h(!1);
|
|
999
1009
|
}, 300);
|
|
1000
|
-
return () => clearTimeout(
|
|
1010
|
+
return () => clearTimeout(_);
|
|
1001
1011
|
}
|
|
1002
|
-
}, [b]),
|
|
1003
|
-
const
|
|
1012
|
+
}, [b]), I(() => {
|
|
1013
|
+
const _ = (V) => {
|
|
1004
1014
|
V.key === "Escape" && N();
|
|
1005
1015
|
};
|
|
1006
|
-
return b ? (document.addEventListener("keydown",
|
|
1007
|
-
document.removeEventListener("keydown",
|
|
1016
|
+
return b ? (document.addEventListener("keydown", _), document.body.style.overflow = "hidden") : (document.removeEventListener("keydown", _), document.body.style.overflow = "unset"), () => {
|
|
1017
|
+
document.removeEventListener("keydown", _), document.body.style.overflow = "unset";
|
|
1008
1018
|
};
|
|
1009
1019
|
}, [b, N]);
|
|
1010
|
-
const x = (
|
|
1011
|
-
o &&
|
|
1012
|
-
},
|
|
1013
|
-
let $,
|
|
1014
|
-
|
|
1015
|
-
if (
|
|
1016
|
-
if (
|
|
1017
|
-
$ =
|
|
1018
|
-
else if (
|
|
1019
|
-
|
|
1020
|
-
else if (
|
|
1021
|
-
k =
|
|
1022
|
-
const
|
|
1023
|
-
k = z(k, { children:
|
|
1024
|
-
} else
|
|
1025
|
-
}),
|
|
1026
|
-
children: /* @__PURE__ */ w(
|
|
1020
|
+
const x = (_) => {
|
|
1021
|
+
o && _.target === _.currentTarget && N();
|
|
1022
|
+
}, g = L.Children.toArray(s);
|
|
1023
|
+
let $, E, k, j, S;
|
|
1024
|
+
g.forEach((_) => {
|
|
1025
|
+
if (ae(_))
|
|
1026
|
+
if (_.type.displayName === "Offcanvas.Trigger")
|
|
1027
|
+
$ = _;
|
|
1028
|
+
else if (_.type.displayName === "Offcanvas.Header")
|
|
1029
|
+
E = _;
|
|
1030
|
+
else if (_.type.displayName === "Offcanvas.Content") {
|
|
1031
|
+
k = _;
|
|
1032
|
+
const P = L.Children.toArray(k.props.children).filter((M) => ae(M) && M.type.displayName === "Offcanvas.Close" ? (S = M, !1) : !0);
|
|
1033
|
+
k = z(k, { children: P });
|
|
1034
|
+
} else _.type.displayName === "Offcanvas.Footer" && (j = _);
|
|
1035
|
+
}), S && (j ? j = z(j, {
|
|
1036
|
+
children: /* @__PURE__ */ w(ft, { children: [
|
|
1027
1037
|
j.props.children,
|
|
1028
|
-
|
|
1038
|
+
S
|
|
1029
1039
|
] })
|
|
1030
|
-
}) : j = /* @__PURE__ */
|
|
1040
|
+
}) : j = /* @__PURE__ */ n(he, { children: S }));
|
|
1031
1041
|
const A = [
|
|
1032
1042
|
"clarity-offcanvas",
|
|
1033
|
-
|
|
1043
|
+
r,
|
|
1034
1044
|
`clarity-offcanvas--${d}`,
|
|
1035
|
-
|
|
1045
|
+
l && `clarity-offcanvas--${l}`,
|
|
1036
1046
|
m ? "clarity-offcanvas--open" : "clarity-offcanvas--closed"
|
|
1037
|
-
].filter(Boolean).join(" "),
|
|
1047
|
+
].filter(Boolean).join(" "), R = [
|
|
1038
1048
|
"clarity-offcanvas-overlay",
|
|
1039
1049
|
m ? "clarity-offcanvas-overlay--visible" : ""
|
|
1040
1050
|
].filter(Boolean).join(" ");
|
|
1041
|
-
return /* @__PURE__ */ w(
|
|
1042
|
-
$ && z($, { onClick: B, variant:
|
|
1051
|
+
return /* @__PURE__ */ w(Le.Provider, { value: { onClose: N, variant: l, showCloseButton: i, placement: d, title: c }, children: [
|
|
1052
|
+
$ && z($, { onClick: B, variant: l }),
|
|
1043
1053
|
u && // Only render if shouldRender is true
|
|
1044
|
-
/* @__PURE__ */
|
|
1045
|
-
|
|
1054
|
+
/* @__PURE__ */ n("div", { className: R, onClick: x, children: /* @__PURE__ */ w("div", { className: A, children: [
|
|
1055
|
+
E,
|
|
1046
1056
|
k,
|
|
1047
|
-
j && /* @__PURE__ */
|
|
1057
|
+
j && /* @__PURE__ */ n("div", { className: "clarity-offcanvas-scroll-indicator" }),
|
|
1048
1058
|
" ",
|
|
1049
1059
|
j
|
|
1050
1060
|
] }) })
|
|
1051
1061
|
] });
|
|
1052
1062
|
};
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
const
|
|
1063
|
+
se.Header = Se;
|
|
1064
|
+
se.Content = Re;
|
|
1065
|
+
se.Footer = he;
|
|
1066
|
+
se.Trigger = Oe;
|
|
1067
|
+
se.Close = Ie;
|
|
1068
|
+
se.displayName = "Offcanvas";
|
|
1069
|
+
const _t = L.forwardRef(({
|
|
1060
1070
|
type: e,
|
|
1061
1071
|
variant: t = "primary",
|
|
1062
|
-
size:
|
|
1063
|
-
label:
|
|
1064
|
-
helperText:
|
|
1065
|
-
error:
|
|
1072
|
+
size: a = "medium",
|
|
1073
|
+
label: s,
|
|
1074
|
+
helperText: r,
|
|
1075
|
+
error: l = !1,
|
|
1066
1076
|
errorMessage: d,
|
|
1067
1077
|
labelPosition: o = "right",
|
|
1068
|
-
className:
|
|
1078
|
+
className: i = "",
|
|
1069
1079
|
disabled: c = !1,
|
|
1070
1080
|
checked: p,
|
|
1071
1081
|
id: v,
|
|
@@ -1075,23 +1085,23 @@ const vt = E.forwardRef(({
|
|
|
1075
1085
|
"clarity-check-input-wrapper",
|
|
1076
1086
|
`clarity-check-input-wrapper--${o}`,
|
|
1077
1087
|
c && "clarity-check-input-wrapper--disabled",
|
|
1078
|
-
|
|
1088
|
+
l && "clarity-check-input-wrapper--error"
|
|
1079
1089
|
].filter(Boolean).join(" "), y = [
|
|
1080
1090
|
"clarity-check-input",
|
|
1081
1091
|
`clarity-check-input--${e}`,
|
|
1082
|
-
`clarity-check-input--${
|
|
1092
|
+
`clarity-check-input--${a}`,
|
|
1083
1093
|
t && `clarity-check-input--${t}`,
|
|
1084
|
-
|
|
1094
|
+
l && "clarity-check-input--error",
|
|
1085
1095
|
c && "clarity-check-input--disabled",
|
|
1086
|
-
|
|
1096
|
+
i
|
|
1087
1097
|
].filter(Boolean).join(" "), b = [
|
|
1088
1098
|
"clarity-check-input__label",
|
|
1089
|
-
`clarity-check-input__label--${
|
|
1099
|
+
`clarity-check-input__label--${a}`,
|
|
1090
1100
|
c && "clarity-check-input__label--disabled"
|
|
1091
1101
|
].filter(Boolean).join(" ");
|
|
1092
1102
|
return /* @__PURE__ */ w("div", { className: "clarity-check-input-container", children: [
|
|
1093
1103
|
/* @__PURE__ */ w("label", { className: h, htmlFor: u, children: [
|
|
1094
|
-
/* @__PURE__ */
|
|
1104
|
+
/* @__PURE__ */ n(
|
|
1095
1105
|
"input",
|
|
1096
1106
|
{
|
|
1097
1107
|
ref: f,
|
|
@@ -1104,14 +1114,14 @@ const vt = E.forwardRef(({
|
|
|
1104
1114
|
}
|
|
1105
1115
|
),
|
|
1106
1116
|
/* @__PURE__ */ w("div", { className: "clarity-check-input__custom", children: [
|
|
1107
|
-
e === "checkbox" && /* @__PURE__ */
|
|
1117
|
+
e === "checkbox" && /* @__PURE__ */ n(
|
|
1108
1118
|
"svg",
|
|
1109
1119
|
{
|
|
1110
1120
|
className: "clarity-check-input__icon",
|
|
1111
1121
|
viewBox: "0 0 16 16",
|
|
1112
1122
|
fill: "none",
|
|
1113
1123
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1114
|
-
children: /* @__PURE__ */
|
|
1124
|
+
children: /* @__PURE__ */ n(
|
|
1115
1125
|
"path",
|
|
1116
1126
|
{
|
|
1117
1127
|
d: "M13.5 4.5L6 12L2.5 8.5",
|
|
@@ -1123,24 +1133,24 @@ const vt = E.forwardRef(({
|
|
|
1123
1133
|
)
|
|
1124
1134
|
}
|
|
1125
1135
|
),
|
|
1126
|
-
e === "radio" && /* @__PURE__ */
|
|
1136
|
+
e === "radio" && /* @__PURE__ */ n("div", { className: "clarity-check-input__radio-dot" })
|
|
1127
1137
|
] }),
|
|
1128
|
-
|
|
1138
|
+
s && /* @__PURE__ */ n("span", { className: b, children: s })
|
|
1129
1139
|
] }),
|
|
1130
|
-
(
|
|
1140
|
+
(r || l && d) && /* @__PURE__ */ n("div", { className: "clarity-check-input__helper-text", children: l && d ? d : r })
|
|
1131
1141
|
] });
|
|
1132
1142
|
});
|
|
1133
|
-
|
|
1134
|
-
const
|
|
1143
|
+
_t.displayName = "CheckInput";
|
|
1144
|
+
const $t = L.forwardRef(({
|
|
1135
1145
|
variant: e = "primary",
|
|
1136
1146
|
size: t = "medium",
|
|
1137
|
-
label:
|
|
1138
|
-
helperText:
|
|
1139
|
-
error:
|
|
1140
|
-
errorMessage:
|
|
1147
|
+
label: a,
|
|
1148
|
+
helperText: s,
|
|
1149
|
+
error: r = !1,
|
|
1150
|
+
errorMessage: l,
|
|
1141
1151
|
labelPosition: d = "right",
|
|
1142
1152
|
className: o = "",
|
|
1143
|
-
disabled:
|
|
1153
|
+
disabled: i = !1,
|
|
1144
1154
|
checked: c,
|
|
1145
1155
|
id: p,
|
|
1146
1156
|
...v
|
|
@@ -1148,131 +1158,131 @@ const bt = E.forwardRef(({
|
|
|
1148
1158
|
const f = p || `input-switch-${Math.random().toString(36).substr(2, 9)}`, u = [
|
|
1149
1159
|
"clarity-input-switch-wrapper",
|
|
1150
1160
|
`clarity-input-switch-wrapper--${d}`,
|
|
1151
|
-
|
|
1152
|
-
|
|
1161
|
+
i && "clarity-input-switch-wrapper--disabled",
|
|
1162
|
+
r && "clarity-input-switch-wrapper--error"
|
|
1153
1163
|
].filter(Boolean).join(" "), h = [
|
|
1154
1164
|
"clarity-input-switch",
|
|
1155
1165
|
`clarity-input-switch--${t}`,
|
|
1156
1166
|
e && `clarity-input-switch--${e}`,
|
|
1157
|
-
|
|
1158
|
-
|
|
1167
|
+
r && "clarity-input-switch--error",
|
|
1168
|
+
i && "clarity-input-switch--disabled",
|
|
1159
1169
|
o
|
|
1160
1170
|
].filter(Boolean).join(" "), y = [
|
|
1161
1171
|
"clarity-input-switch__label",
|
|
1162
1172
|
`clarity-input-switch__label--${t}`,
|
|
1163
|
-
|
|
1173
|
+
i && "clarity-input-switch__label--disabled"
|
|
1164
1174
|
].filter(Boolean).join(" ");
|
|
1165
1175
|
return /* @__PURE__ */ w("div", { className: "clarity-input-switch-container", children: [
|
|
1166
1176
|
/* @__PURE__ */ w("label", { className: u, htmlFor: f, children: [
|
|
1167
|
-
/* @__PURE__ */
|
|
1177
|
+
/* @__PURE__ */ n(
|
|
1168
1178
|
"input",
|
|
1169
1179
|
{
|
|
1170
1180
|
ref: m,
|
|
1171
1181
|
id: f,
|
|
1172
1182
|
type: "checkbox",
|
|
1173
1183
|
className: h,
|
|
1174
|
-
disabled:
|
|
1184
|
+
disabled: i,
|
|
1175
1185
|
checked: c,
|
|
1176
1186
|
...v
|
|
1177
1187
|
}
|
|
1178
1188
|
),
|
|
1179
|
-
/* @__PURE__ */
|
|
1180
|
-
|
|
1189
|
+
/* @__PURE__ */ n("div", { className: "clarity-input-switch__track", children: /* @__PURE__ */ n("div", { className: "clarity-input-switch__thumb" }) }),
|
|
1190
|
+
a && /* @__PURE__ */ n("span", { className: y, children: a })
|
|
1181
1191
|
] }),
|
|
1182
|
-
(
|
|
1192
|
+
(s || r && l) && /* @__PURE__ */ n("div", { className: "clarity-input-switch__helper-text", children: r && l ? l : s })
|
|
1183
1193
|
] });
|
|
1184
1194
|
});
|
|
1185
|
-
|
|
1186
|
-
const
|
|
1187
|
-
const e =
|
|
1195
|
+
$t.displayName = "InputSwitch";
|
|
1196
|
+
const De = Q(null), ye = () => {
|
|
1197
|
+
const e = U(De);
|
|
1188
1198
|
if (!e)
|
|
1189
1199
|
throw new Error("useConfirmationDialog must be used within a ConfirmationDialog provider");
|
|
1190
1200
|
return e;
|
|
1191
|
-
},
|
|
1192
|
-
const { variant:
|
|
1193
|
-
return /* @__PURE__ */
|
|
1201
|
+
}, Ae = ({ children: e, className: t = "" }) => {
|
|
1202
|
+
const { variant: a } = ye(), s = `clarity-confirmation-dialog-header ${t} clarity-confirmation-dialog-header--${a}`;
|
|
1203
|
+
return /* @__PURE__ */ n("div", { className: s, children: e });
|
|
1194
1204
|
};
|
|
1195
|
-
|
|
1196
|
-
const
|
|
1197
|
-
|
|
1198
|
-
const
|
|
1199
|
-
|
|
1200
|
-
const
|
|
1205
|
+
Ae.displayName = "ConfirmationDialog.Header";
|
|
1206
|
+
const Pe = ({ children: e, className: t = "" }) => /* @__PURE__ */ n("div", { className: `clarity-confirmation-dialog-content ${t}`, children: e });
|
|
1207
|
+
Pe.displayName = "ConfirmationDialog.Content";
|
|
1208
|
+
const Ve = ({ children: e, className: t = "" }) => /* @__PURE__ */ n("div", { className: `clarity-confirmation-dialog-footer ${t}`, children: e });
|
|
1209
|
+
Ve.displayName = "ConfirmationDialog.Footer";
|
|
1210
|
+
const He = ({ children: e }) => z(e, {
|
|
1201
1211
|
onClick: (t) => {
|
|
1202
|
-
var
|
|
1203
|
-
(
|
|
1212
|
+
var a, s;
|
|
1213
|
+
(s = (a = e.props).onClick) == null || s.call(a, t);
|
|
1204
1214
|
}
|
|
1205
1215
|
});
|
|
1206
|
-
|
|
1207
|
-
const
|
|
1208
|
-
const { onClose: t } =
|
|
1216
|
+
He.displayName = "ConfirmationDialog.Trigger";
|
|
1217
|
+
const Me = ({ children: e }) => {
|
|
1218
|
+
const { onClose: t } = ye();
|
|
1209
1219
|
return z(e, {
|
|
1210
|
-
onClick: (
|
|
1211
|
-
var
|
|
1212
|
-
t(), (
|
|
1220
|
+
onClick: (a) => {
|
|
1221
|
+
var s, r;
|
|
1222
|
+
t(), (r = (s = e.props).onClick) == null || r.call(s, a);
|
|
1213
1223
|
}
|
|
1214
1224
|
});
|
|
1215
1225
|
};
|
|
1216
|
-
|
|
1217
|
-
const
|
|
1218
|
-
const { onConfirm: t } =
|
|
1226
|
+
Me.displayName = "ConfirmationDialog.Close";
|
|
1227
|
+
const We = ({ children: e }) => {
|
|
1228
|
+
const { onConfirm: t } = ye();
|
|
1219
1229
|
return z(e, {
|
|
1220
|
-
onClick: (
|
|
1221
|
-
var
|
|
1222
|
-
t(), (
|
|
1230
|
+
onClick: (a) => {
|
|
1231
|
+
var s, r;
|
|
1232
|
+
t(), (r = (s = e.props).onClick) == null || r.call(s, a);
|
|
1223
1233
|
}
|
|
1224
1234
|
});
|
|
1225
1235
|
};
|
|
1226
|
-
|
|
1227
|
-
const
|
|
1236
|
+
We.displayName = "ConfirmationDialog.Confirm";
|
|
1237
|
+
const K = ({
|
|
1228
1238
|
isOpen: e,
|
|
1229
1239
|
onClose: t,
|
|
1230
|
-
onConfirm:
|
|
1231
|
-
variant:
|
|
1232
|
-
children:
|
|
1240
|
+
onConfirm: a,
|
|
1241
|
+
variant: s = "clarity-primary",
|
|
1242
|
+
children: r
|
|
1233
1243
|
}) => {
|
|
1234
|
-
const [
|
|
1244
|
+
const [l, d] = T(!1), o = e !== void 0, i = o ? e : l, c = () => {
|
|
1235
1245
|
o || d(!0);
|
|
1236
1246
|
}, p = () => {
|
|
1237
1247
|
t ? t() : d(!1);
|
|
1238
1248
|
}, v = () => {
|
|
1239
|
-
|
|
1249
|
+
a && a(), p();
|
|
1240
1250
|
};
|
|
1241
|
-
|
|
1251
|
+
I(() => {
|
|
1242
1252
|
const h = (y) => {
|
|
1243
1253
|
y.key === "Escape" && p();
|
|
1244
1254
|
};
|
|
1245
|
-
return
|
|
1255
|
+
return i ? (document.addEventListener("keydown", h), document.body.style.overflow = "hidden") : document.body.style.overflow = "unset", () => {
|
|
1246
1256
|
document.removeEventListener("keydown", h), document.body.style.overflow = "unset";
|
|
1247
1257
|
};
|
|
1248
|
-
}, [
|
|
1249
|
-
const m =
|
|
1250
|
-
(h) =>
|
|
1251
|
-
), f =
|
|
1252
|
-
(h) =>
|
|
1253
|
-
), u = `clarity-confirmation-dialog clarity-confirmation-dialog--${
|
|
1254
|
-
return /* @__PURE__ */ w(
|
|
1258
|
+
}, [i, p]);
|
|
1259
|
+
const m = L.Children.toArray(r).find(
|
|
1260
|
+
(h) => ae(h) && h.type.displayName === "ConfirmationDialog.Trigger"
|
|
1261
|
+
), f = L.Children.toArray(r).filter(
|
|
1262
|
+
(h) => ae(h) && h.type.displayName !== "ConfirmationDialog.Trigger"
|
|
1263
|
+
), u = `clarity-confirmation-dialog clarity-confirmation-dialog--${s}`;
|
|
1264
|
+
return /* @__PURE__ */ w(De.Provider, { value: { variant: s, onClose: p, onConfirm: v, onOpen: c }, children: [
|
|
1255
1265
|
m,
|
|
1256
|
-
|
|
1266
|
+
i && /* @__PURE__ */ n("div", { className: "clarity-modal-overlay", children: /* @__PURE__ */ n("div", { className: u, children: f }) })
|
|
1257
1267
|
] });
|
|
1258
1268
|
};
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
const
|
|
1269
|
+
K.Header = Ae;
|
|
1270
|
+
K.Content = Pe;
|
|
1271
|
+
K.Footer = Ve;
|
|
1272
|
+
K.Trigger = He;
|
|
1273
|
+
K.Close = Me;
|
|
1274
|
+
K.Confirm = We;
|
|
1275
|
+
K.displayName = "ConfirmationDialog";
|
|
1276
|
+
const qt = ({
|
|
1267
1277
|
variant: e = "primary",
|
|
1268
1278
|
size: t = "medium",
|
|
1269
|
-
disabled:
|
|
1270
|
-
loading:
|
|
1271
|
-
children:
|
|
1272
|
-
onClick:
|
|
1279
|
+
disabled: a = !1,
|
|
1280
|
+
loading: s = !1,
|
|
1281
|
+
children: r,
|
|
1282
|
+
onClick: l,
|
|
1273
1283
|
type: d = "button",
|
|
1274
1284
|
className: o = "",
|
|
1275
|
-
"aria-label":
|
|
1285
|
+
"aria-label": i,
|
|
1276
1286
|
title: c,
|
|
1277
1287
|
customColor: p,
|
|
1278
1288
|
customColorHover: v,
|
|
@@ -1282,229 +1292,229 @@ const Mt = ({
|
|
|
1282
1292
|
f,
|
|
1283
1293
|
!p && `${f}--${e}`,
|
|
1284
1294
|
`${f}--${t}`,
|
|
1285
|
-
|
|
1286
|
-
|
|
1295
|
+
s && `${f}--loading`,
|
|
1296
|
+
a && `${f}--disabled`,
|
|
1287
1297
|
o
|
|
1288
1298
|
].filter(Boolean).join(" "), h = {};
|
|
1289
1299
|
return p && (h["--button-icon-bg"] = p, h["--button-icon-hover-bg"] = v || `${p}E6`), /* @__PURE__ */ w(
|
|
1290
1300
|
"button",
|
|
1291
1301
|
{
|
|
1292
1302
|
className: u,
|
|
1293
|
-
disabled:
|
|
1294
|
-
onClick:
|
|
1303
|
+
disabled: a || s,
|
|
1304
|
+
onClick: l,
|
|
1295
1305
|
type: d,
|
|
1296
|
-
"aria-label":
|
|
1306
|
+
"aria-label": i,
|
|
1297
1307
|
title: c,
|
|
1298
1308
|
style: h,
|
|
1299
1309
|
...m,
|
|
1300
1310
|
children: [
|
|
1301
|
-
|
|
1302
|
-
!
|
|
1311
|
+
s && /* @__PURE__ */ n("div", { className: `${f}__spinner` }),
|
|
1312
|
+
!s && r
|
|
1303
1313
|
]
|
|
1304
1314
|
}
|
|
1305
1315
|
);
|
|
1306
|
-
},
|
|
1316
|
+
}, Jt = ({
|
|
1307
1317
|
variant: e = "primary",
|
|
1308
1318
|
product: t,
|
|
1309
|
-
tone:
|
|
1310
|
-
hoverTone:
|
|
1311
|
-
size:
|
|
1312
|
-
disabled:
|
|
1319
|
+
tone: a,
|
|
1320
|
+
hoverTone: s,
|
|
1321
|
+
size: r = "medium",
|
|
1322
|
+
disabled: l = !1,
|
|
1313
1323
|
children: d,
|
|
1314
1324
|
onClick: o,
|
|
1315
|
-
href:
|
|
1325
|
+
href: i,
|
|
1316
1326
|
target: c,
|
|
1317
1327
|
rel: p,
|
|
1318
1328
|
className: v = "",
|
|
1319
1329
|
...m
|
|
1320
1330
|
}) => {
|
|
1321
|
-
const f = "clarity-button-link", u = t &&
|
|
1331
|
+
const f = "clarity-button-link", u = t && a, h = u ? `${f}--custom` : `${f}--${e}`, y = [
|
|
1322
1332
|
f,
|
|
1323
1333
|
h,
|
|
1324
|
-
`${f}--${
|
|
1325
|
-
|
|
1334
|
+
`${f}--${r}`,
|
|
1335
|
+
l && `${f}--disabled`,
|
|
1326
1336
|
v
|
|
1327
1337
|
].filter(Boolean).join(" "), b = (B) => {
|
|
1328
1338
|
const x = parseInt(B);
|
|
1329
1339
|
return x >= 800 ? "900" : x >= 700 ? "800" : x >= 600 ? "700" : x >= 500 ? "600" : x >= 400 ? "500" : x >= 300 ? "400" : x >= 200 ? "300" : "200";
|
|
1330
1340
|
}, N = u ? {
|
|
1331
|
-
"--custom-color": `var(--clarity-${t}-${
|
|
1332
|
-
"--custom-hover-color": `var(--clarity-${t}-${
|
|
1341
|
+
"--custom-color": `var(--clarity-${t}-${a})`,
|
|
1342
|
+
"--custom-hover-color": `var(--clarity-${t}-${s || b(a)})`
|
|
1333
1343
|
} : {};
|
|
1334
|
-
return
|
|
1344
|
+
return i ? /* @__PURE__ */ n(
|
|
1335
1345
|
"a",
|
|
1336
1346
|
{
|
|
1337
|
-
href:
|
|
1347
|
+
href: i,
|
|
1338
1348
|
target: c,
|
|
1339
1349
|
rel: p || (c === "_blank" ? "noopener noreferrer" : void 0),
|
|
1340
1350
|
className: y,
|
|
1341
1351
|
style: N,
|
|
1342
|
-
onClick:
|
|
1352
|
+
onClick: l ? void 0 : o,
|
|
1343
1353
|
...m,
|
|
1344
1354
|
children: d
|
|
1345
1355
|
}
|
|
1346
|
-
) : /* @__PURE__ */
|
|
1356
|
+
) : /* @__PURE__ */ n(
|
|
1347
1357
|
"button",
|
|
1348
1358
|
{
|
|
1349
1359
|
className: y,
|
|
1350
1360
|
style: N,
|
|
1351
|
-
disabled:
|
|
1361
|
+
disabled: l,
|
|
1352
1362
|
onClick: o,
|
|
1353
1363
|
...m,
|
|
1354
1364
|
children: d
|
|
1355
1365
|
}
|
|
1356
1366
|
);
|
|
1357
|
-
},
|
|
1358
|
-
const e =
|
|
1367
|
+
}, Fe = Q(void 0), Ge = () => {
|
|
1368
|
+
const e = U(Fe);
|
|
1359
1369
|
if (!e)
|
|
1360
1370
|
throw new Error("Accordion components must be used within an Accordion");
|
|
1361
1371
|
return e;
|
|
1362
|
-
},
|
|
1372
|
+
}, kt = ({
|
|
1363
1373
|
variant: e = "primary",
|
|
1364
1374
|
product: t,
|
|
1365
|
-
tone:
|
|
1366
|
-
hoverTone:
|
|
1367
|
-
defaultActiveKey:
|
|
1368
|
-
alwaysOpen:
|
|
1375
|
+
tone: a,
|
|
1376
|
+
hoverTone: s,
|
|
1377
|
+
defaultActiveKey: r,
|
|
1378
|
+
alwaysOpen: l = !1,
|
|
1369
1379
|
flush: d = !1,
|
|
1370
1380
|
className: o = "",
|
|
1371
|
-
children:
|
|
1381
|
+
children: i,
|
|
1372
1382
|
onSelect: c,
|
|
1373
1383
|
...p
|
|
1374
1384
|
}) => {
|
|
1375
|
-
const [v, m] = T(() =>
|
|
1385
|
+
const [v, m] = T(() => r ? Array.isArray(r) ? r : [r] : []), f = (g) => {
|
|
1376
1386
|
let $;
|
|
1377
|
-
|
|
1378
|
-
}, u = "clarity-accordion", h = t &&
|
|
1387
|
+
l ? $ = v.includes(g) ? v.filter((E) => E !== g) : [...v, g] : $ = v.includes(g) ? [] : [g], m($), c && c(v.includes(g) ? null : g, {});
|
|
1388
|
+
}, u = "clarity-accordion", h = t && a, y = h ? `${u}--custom` : `${u}--${e}`, b = [
|
|
1379
1389
|
u,
|
|
1380
1390
|
y,
|
|
1381
1391
|
d && `${u}--flush`,
|
|
1382
1392
|
o
|
|
1383
|
-
].filter(Boolean).join(" "), N = (
|
|
1384
|
-
const $ = parseInt(
|
|
1393
|
+
].filter(Boolean).join(" "), N = (g) => {
|
|
1394
|
+
const $ = parseInt(g);
|
|
1385
1395
|
return $ >= 800 ? "900" : $ >= 700 ? "800" : $ >= 600 ? "700" : $ >= 500 ? "600" : $ >= 400 ? "500" : $ >= 300 ? "400" : $ >= 200 ? "300" : "200";
|
|
1386
1396
|
}, B = h ? {
|
|
1387
|
-
"--custom-border-color": `var(--clarity-${t}-${
|
|
1388
|
-
"--custom-header-color": `var(--clarity-${t}-${
|
|
1389
|
-
"--custom-hover-color": `var(--clarity-${t}-${
|
|
1397
|
+
"--custom-border-color": `var(--clarity-${t}-${a})`,
|
|
1398
|
+
"--custom-header-color": `var(--clarity-${t}-${a})`,
|
|
1399
|
+
"--custom-hover-color": `var(--clarity-${t}-${s || N(a)})`
|
|
1390
1400
|
} : {}, x = {
|
|
1391
1401
|
activeKeys: v,
|
|
1392
1402
|
toggleItem: f,
|
|
1393
|
-
alwaysOpen:
|
|
1403
|
+
alwaysOpen: l,
|
|
1394
1404
|
variant: e,
|
|
1395
1405
|
product: t,
|
|
1396
|
-
tone:
|
|
1397
|
-
hoverTone:
|
|
1406
|
+
tone: a,
|
|
1407
|
+
hoverTone: s,
|
|
1398
1408
|
flush: d
|
|
1399
1409
|
};
|
|
1400
|
-
return /* @__PURE__ */
|
|
1401
|
-
},
|
|
1410
|
+
return /* @__PURE__ */ n(Fe.Provider, { value: x, children: /* @__PURE__ */ n("div", { className: b, style: B, ...p, children: i }) });
|
|
1411
|
+
}, xt = ({
|
|
1402
1412
|
eventKey: e,
|
|
1403
1413
|
disabled: t = !1,
|
|
1404
|
-
className:
|
|
1405
|
-
children:
|
|
1406
|
-
...
|
|
1414
|
+
className: a = "",
|
|
1415
|
+
children: s,
|
|
1416
|
+
...r
|
|
1407
1417
|
}) => {
|
|
1408
|
-
const { activeKeys:
|
|
1418
|
+
const { activeKeys: l } = Ge(), d = "clarity-accordion", o = l.includes(e), i = [
|
|
1409
1419
|
`${d}__item`,
|
|
1410
1420
|
o && `${d}__item--active`,
|
|
1411
1421
|
t && `${d}__item--disabled`,
|
|
1412
|
-
|
|
1422
|
+
a
|
|
1413
1423
|
].filter(Boolean).join(" ");
|
|
1414
|
-
return /* @__PURE__ */
|
|
1424
|
+
return /* @__PURE__ */ n("div", { className: i, ...r, children: L.Children.map(s, (c) => L.isValidElement(c) ? L.cloneElement(c, {
|
|
1415
1425
|
...c.props,
|
|
1416
1426
|
eventKey: e,
|
|
1417
1427
|
disabled: t,
|
|
1418
1428
|
isActive: o
|
|
1419
1429
|
}) : c) });
|
|
1420
|
-
},
|
|
1430
|
+
}, Tt = ({
|
|
1421
1431
|
className: e = "",
|
|
1422
1432
|
children: t,
|
|
1423
|
-
onClick:
|
|
1424
|
-
eventKey:
|
|
1425
|
-
disabled:
|
|
1426
|
-
isActive:
|
|
1433
|
+
onClick: a,
|
|
1434
|
+
eventKey: s,
|
|
1435
|
+
disabled: r = !1,
|
|
1436
|
+
isActive: l = !1,
|
|
1427
1437
|
...d
|
|
1428
1438
|
}) => {
|
|
1429
|
-
const { toggleItem: o } =
|
|
1430
|
-
!
|
|
1439
|
+
const { toggleItem: o } = Ge(), i = "clarity-accordion", c = (p) => {
|
|
1440
|
+
!r && s && o(s), a == null || a(p);
|
|
1431
1441
|
};
|
|
1432
1442
|
return /* @__PURE__ */ w(
|
|
1433
1443
|
"button",
|
|
1434
1444
|
{
|
|
1435
|
-
className: [`${
|
|
1445
|
+
className: [`${i}__header`, e].filter(Boolean).join(" "),
|
|
1436
1446
|
onClick: c,
|
|
1437
|
-
disabled:
|
|
1438
|
-
"aria-expanded":
|
|
1439
|
-
"aria-controls":
|
|
1447
|
+
disabled: r,
|
|
1448
|
+
"aria-expanded": l,
|
|
1449
|
+
"aria-controls": s ? `${i}-collapse-${s}` : void 0,
|
|
1440
1450
|
...d,
|
|
1441
1451
|
children: [
|
|
1442
|
-
/* @__PURE__ */
|
|
1443
|
-
/* @__PURE__ */
|
|
1452
|
+
/* @__PURE__ */ n("span", { className: `${i}__title`, children: t }),
|
|
1453
|
+
/* @__PURE__ */ n("span", { className: `${i}__icon`, children: /* @__PURE__ */ n(
|
|
1444
1454
|
"svg",
|
|
1445
1455
|
{
|
|
1446
1456
|
width: "16",
|
|
1447
1457
|
height: "16",
|
|
1448
1458
|
viewBox: "0 0 16 16",
|
|
1449
1459
|
fill: "currentColor",
|
|
1450
|
-
className:
|
|
1451
|
-
children: /* @__PURE__ */
|
|
1460
|
+
className: l ? `${i}__icon--rotated` : "",
|
|
1461
|
+
children: /* @__PURE__ */ n("path", { d: "M4.646 6.646a.5.5 0 0 1 .708 0L8 9.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3a.5.5 0 0 1-.708 0l-3-3a.5.5 0 0 1 0-.708z" })
|
|
1452
1462
|
}
|
|
1453
1463
|
) })
|
|
1454
1464
|
]
|
|
1455
1465
|
}
|
|
1456
1466
|
);
|
|
1457
|
-
},
|
|
1467
|
+
}, Bt = ({
|
|
1458
1468
|
className: e = "",
|
|
1459
1469
|
children: t,
|
|
1460
|
-
eventKey:
|
|
1461
|
-
isActive:
|
|
1462
|
-
...
|
|
1470
|
+
eventKey: a,
|
|
1471
|
+
isActive: s = !1,
|
|
1472
|
+
...r
|
|
1463
1473
|
}) => {
|
|
1464
|
-
const
|
|
1465
|
-
return /* @__PURE__ */
|
|
1474
|
+
const l = "clarity-accordion";
|
|
1475
|
+
return /* @__PURE__ */ n(
|
|
1466
1476
|
"div",
|
|
1467
1477
|
{
|
|
1468
|
-
id:
|
|
1478
|
+
id: a ? `${l}-collapse-${a}` : void 0,
|
|
1469
1479
|
className: [
|
|
1470
|
-
`${
|
|
1471
|
-
|
|
1480
|
+
`${l}__collapse`,
|
|
1481
|
+
s && `${l}__collapse--show`
|
|
1472
1482
|
].filter(Boolean).join(" "),
|
|
1473
|
-
children: /* @__PURE__ */
|
|
1483
|
+
children: /* @__PURE__ */ n("div", { className: [`${l}__body`, e].filter(Boolean).join(" "), ...r, children: t })
|
|
1474
1484
|
}
|
|
1475
1485
|
);
|
|
1476
|
-
},
|
|
1477
|
-
Item:
|
|
1478
|
-
Header:
|
|
1479
|
-
Body:
|
|
1480
|
-
}),
|
|
1486
|
+
}, Qt = Object.assign(kt, {
|
|
1487
|
+
Item: xt,
|
|
1488
|
+
Header: Tt,
|
|
1489
|
+
Body: Bt
|
|
1490
|
+
}), ze = Q(
|
|
1481
1491
|
void 0
|
|
1482
|
-
),
|
|
1483
|
-
const e =
|
|
1492
|
+
), Ue = () => {
|
|
1493
|
+
const e = U(ze);
|
|
1484
1494
|
if (!e)
|
|
1485
1495
|
throw new Error("useDropdown must be used within a DropdownProvider");
|
|
1486
1496
|
return e;
|
|
1487
|
-
},
|
|
1488
|
-
const { setIsOpen: t, triggerRef:
|
|
1489
|
-
return /* @__PURE__ */
|
|
1497
|
+
}, jt = ({ children: e }) => {
|
|
1498
|
+
const { setIsOpen: t, triggerRef: a } = Ue();
|
|
1499
|
+
return /* @__PURE__ */ n(
|
|
1490
1500
|
"button",
|
|
1491
1501
|
{
|
|
1492
1502
|
type: "button",
|
|
1493
|
-
ref:
|
|
1503
|
+
ref: a,
|
|
1494
1504
|
className: "dropdown__trigger",
|
|
1495
|
-
onClick: () => t((
|
|
1505
|
+
onClick: () => t((s) => !s),
|
|
1496
1506
|
"aria-haspopup": "true",
|
|
1497
1507
|
children: e
|
|
1498
1508
|
}
|
|
1499
1509
|
);
|
|
1500
|
-
},
|
|
1501
|
-
const { isOpen: t, contentRef:
|
|
1502
|
-
return t ? /* @__PURE__ */
|
|
1503
|
-
},
|
|
1504
|
-
const [
|
|
1505
|
-
return
|
|
1506
|
-
if (
|
|
1507
|
-
const p =
|
|
1510
|
+
}, Lt = ({ children: e }) => {
|
|
1511
|
+
const { isOpen: t, contentRef: a, styles: s } = Ue();
|
|
1512
|
+
return t ? /* @__PURE__ */ n("div", { ref: a, className: "dropdown__content", style: s, children: e }) : null;
|
|
1513
|
+
}, Et = ({ children: e }) => /* @__PURE__ */ n("div", { className: "dropdown__menu", children: e }), St = ({ as: e, children: t, ...a }) => /* @__PURE__ */ n(e || "a", { ...a, className: "dropdown__item", children: t }), Rt = () => /* @__PURE__ */ n("hr", { className: "dropdown__separator" }), ce = ({ title: e, position: t = "bottom", children: a }) => {
|
|
1514
|
+
const [s, r] = T(!1), [l, d] = T({}), o = F(null), i = F(null), c = F(null);
|
|
1515
|
+
return yt(() => {
|
|
1516
|
+
if (s) {
|
|
1517
|
+
const p = i.current, v = c.current;
|
|
1508
1518
|
if (!p || !v) return;
|
|
1509
1519
|
const m = p.getBoundingClientRect(), f = v.getBoundingClientRect(), u = window.innerHeight, h = window.innerWidth;
|
|
1510
1520
|
let y = t;
|
|
@@ -1527,108 +1537,108 @@ const Mt = ({
|
|
|
1527
1537
|
}
|
|
1528
1538
|
d(b);
|
|
1529
1539
|
}
|
|
1530
|
-
}, [
|
|
1540
|
+
}, [s, t]), I(() => {
|
|
1531
1541
|
const p = (v) => {
|
|
1532
|
-
o.current && !o.current.contains(v.target) &&
|
|
1542
|
+
o.current && !o.current.contains(v.target) && r(!1);
|
|
1533
1543
|
};
|
|
1534
1544
|
return document.addEventListener("mousedown", p), () => {
|
|
1535
1545
|
document.removeEventListener("mousedown", p);
|
|
1536
1546
|
};
|
|
1537
|
-
}, []), /* @__PURE__ */
|
|
1547
|
+
}, []), /* @__PURE__ */ n(ze.Provider, { value: { isOpen: s, setIsOpen: r, triggerRef: i, contentRef: c, styles: l }, children: /* @__PURE__ */ n(
|
|
1538
1548
|
"div",
|
|
1539
1549
|
{
|
|
1540
1550
|
ref: o,
|
|
1541
1551
|
className: "dropdown",
|
|
1542
1552
|
title: e,
|
|
1543
|
-
children:
|
|
1553
|
+
children: a
|
|
1544
1554
|
}
|
|
1545
1555
|
) });
|
|
1546
1556
|
};
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
const
|
|
1553
|
-
const e =
|
|
1557
|
+
ce.Trigger = jt;
|
|
1558
|
+
ce.Content = Lt;
|
|
1559
|
+
ce.Menu = Et;
|
|
1560
|
+
ce.Item = St;
|
|
1561
|
+
ce.Separator = Rt;
|
|
1562
|
+
const qe = Q(null), Je = () => {
|
|
1563
|
+
const e = U(qe);
|
|
1554
1564
|
if (!e)
|
|
1555
1565
|
throw new Error("useTabs must be used within a Tabs provider");
|
|
1556
1566
|
return e;
|
|
1557
|
-
},
|
|
1558
|
-
const { activeTab:
|
|
1567
|
+
}, Qe = ({ id: e, label: t, className: a = "" }) => {
|
|
1568
|
+
const { activeTab: s, setActiveTab: r, variant: l, orientation: d } = Je(), o = s === e, i = [
|
|
1559
1569
|
"clarity-tab",
|
|
1560
|
-
|
|
1570
|
+
a,
|
|
1561
1571
|
o ? "active" : "",
|
|
1562
|
-
o ? `variant-${
|
|
1572
|
+
o ? `variant-${l}` : "",
|
|
1563
1573
|
`orientation-${d}`
|
|
1564
1574
|
].filter(Boolean).join(" ");
|
|
1565
|
-
return /* @__PURE__ */
|
|
1575
|
+
return /* @__PURE__ */ n(
|
|
1566
1576
|
"button",
|
|
1567
1577
|
{
|
|
1568
|
-
className:
|
|
1569
|
-
onClick: () =>
|
|
1578
|
+
className: i,
|
|
1579
|
+
onClick: () => r(e),
|
|
1570
1580
|
role: "tab",
|
|
1571
1581
|
"aria-selected": o,
|
|
1572
|
-
children: /* @__PURE__ */
|
|
1582
|
+
children: /* @__PURE__ */ n("span", { className: "clarity-tab-label", children: t })
|
|
1573
1583
|
}
|
|
1574
1584
|
);
|
|
1575
1585
|
};
|
|
1576
|
-
|
|
1577
|
-
const
|
|
1578
|
-
const { activeTab:
|
|
1579
|
-
visibility:
|
|
1586
|
+
Qe.displayName = "Tabs.Tab";
|
|
1587
|
+
const Ze = ({ id: e, children: t, className: a = "" }) => {
|
|
1588
|
+
const { activeTab: s } = Je(), r = s === e, l = {
|
|
1589
|
+
visibility: r ? "visible" : "hidden",
|
|
1580
1590
|
gridArea: "1 / 1"
|
|
1581
1591
|
};
|
|
1582
|
-
return
|
|
1592
|
+
return r || (l.pointerEvents = "none"), /* @__PURE__ */ n("div", { className: `clarity-tab-content ${a}`, role: "tabpanel", style: l, children: t });
|
|
1583
1593
|
};
|
|
1584
|
-
|
|
1585
|
-
const
|
|
1594
|
+
Ze.displayName = "Tabs.Content";
|
|
1595
|
+
const ve = ({
|
|
1586
1596
|
children: e,
|
|
1587
1597
|
defaultTab: t,
|
|
1588
|
-
variant:
|
|
1589
|
-
orientation:
|
|
1590
|
-
className:
|
|
1591
|
-
useUrl:
|
|
1598
|
+
variant: a = "primary",
|
|
1599
|
+
orientation: s = "horizontal",
|
|
1600
|
+
className: r = "",
|
|
1601
|
+
useUrl: l = !1
|
|
1592
1602
|
}) => {
|
|
1593
|
-
const d = () => window.location.hash.replace("#", ""), [o,
|
|
1594
|
-
|
|
1595
|
-
if (
|
|
1603
|
+
const d = () => window.location.hash.replace("#", ""), [o, i] = T(() => l && d() || t);
|
|
1604
|
+
I(() => {
|
|
1605
|
+
if (l) {
|
|
1596
1606
|
const m = () => {
|
|
1597
1607
|
const f = d();
|
|
1598
|
-
f &&
|
|
1608
|
+
f && i(f);
|
|
1599
1609
|
};
|
|
1600
1610
|
return window.addEventListener("hashchange", m), () => {
|
|
1601
1611
|
window.removeEventListener("hashchange", m);
|
|
1602
1612
|
};
|
|
1603
1613
|
}
|
|
1604
|
-
}, [
|
|
1614
|
+
}, [l]);
|
|
1605
1615
|
const c = (m) => {
|
|
1606
|
-
|
|
1616
|
+
l && (window.location.hash = String(m)), i(m);
|
|
1607
1617
|
}, p = te(() => ({
|
|
1608
1618
|
activeTab: o,
|
|
1609
1619
|
setActiveTab: c,
|
|
1610
|
-
variant:
|
|
1611
|
-
orientation:
|
|
1612
|
-
}), [o,
|
|
1620
|
+
variant: a,
|
|
1621
|
+
orientation: s
|
|
1622
|
+
}), [o, a, s]), v = [
|
|
1613
1623
|
"clarity-tabs-container",
|
|
1614
|
-
|
|
1615
|
-
`orientation-${
|
|
1624
|
+
r,
|
|
1625
|
+
`orientation-${s}`
|
|
1616
1626
|
].filter(Boolean).join(" ");
|
|
1617
|
-
return /* @__PURE__ */
|
|
1627
|
+
return /* @__PURE__ */ n(qe.Provider, { value: p, children: /* @__PURE__ */ n("div", { className: v, children: e }) });
|
|
1618
1628
|
};
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
const
|
|
1629
|
+
ve.Tab = Qe;
|
|
1630
|
+
ve.Content = Ze;
|
|
1631
|
+
ve.displayName = "Tabs";
|
|
1632
|
+
const Zt = ({
|
|
1623
1633
|
content: e,
|
|
1624
1634
|
position: t = "top",
|
|
1625
|
-
variant:
|
|
1626
|
-
product:
|
|
1627
|
-
tone:
|
|
1628
|
-
bgColor:
|
|
1635
|
+
variant: a = "primary",
|
|
1636
|
+
product: s,
|
|
1637
|
+
tone: r,
|
|
1638
|
+
bgColor: l,
|
|
1629
1639
|
textColor: d,
|
|
1630
1640
|
children: o,
|
|
1631
|
-
className:
|
|
1641
|
+
className: i = "",
|
|
1632
1642
|
disabled: c = !1,
|
|
1633
1643
|
delay: p = 200,
|
|
1634
1644
|
hideDelay: v = 100,
|
|
@@ -1636,242 +1646,242 @@ const Gt = ({
|
|
|
1636
1646
|
arrow: f = !0,
|
|
1637
1647
|
...u
|
|
1638
1648
|
}) => {
|
|
1639
|
-
const [h, y] = T(!1), [b, N] = T(null), B =
|
|
1649
|
+
const [h, y] = T(!1), [b, N] = T(null), B = F(null), x = F(null), g = "clarity-tooltip", $ = !!l, E = s && r && !$;
|
|
1640
1650
|
let k = "";
|
|
1641
|
-
$ ? k = `${
|
|
1651
|
+
$ ? k = `${g}__content--custom-bg` : E ? k = `${g}__content--custom` : k = `${g}__content--${a}`;
|
|
1642
1652
|
const j = [
|
|
1643
|
-
|
|
1644
|
-
`${
|
|
1645
|
-
|
|
1646
|
-
].filter(Boolean).join(" "),
|
|
1647
|
-
`${
|
|
1653
|
+
g,
|
|
1654
|
+
`${g}--${t}`,
|
|
1655
|
+
i
|
|
1656
|
+
].filter(Boolean).join(" "), S = [
|
|
1657
|
+
`${g}__content`,
|
|
1648
1658
|
k,
|
|
1649
|
-
f && `${
|
|
1650
|
-
].filter(Boolean).join(" "), A = {},
|
|
1651
|
-
$ &&
|
|
1652
|
-
const
|
|
1659
|
+
f && `${g}__content--arrow`
|
|
1660
|
+
].filter(Boolean).join(" "), A = {}, R = {};
|
|
1661
|
+
$ && l && (R["--tooltip-bg-color"] = l), d && (R["--tooltip-text-color"] = d), E && s && r && (R["--tooltip-product"] = s, R["--tooltip-tone"] = r);
|
|
1662
|
+
const _ = {
|
|
1653
1663
|
...A,
|
|
1654
|
-
...Object.keys(
|
|
1664
|
+
...Object.keys(R).length > 0 ? R : {}
|
|
1655
1665
|
}, V = () => {
|
|
1656
1666
|
if (c) return;
|
|
1657
1667
|
b && clearTimeout(b);
|
|
1658
|
-
const
|
|
1668
|
+
const H = setTimeout(() => {
|
|
1659
1669
|
y(!0);
|
|
1660
1670
|
}, p);
|
|
1661
|
-
N(
|
|
1662
|
-
},
|
|
1671
|
+
N(H);
|
|
1672
|
+
}, P = () => {
|
|
1663
1673
|
b && clearTimeout(b);
|
|
1664
|
-
const
|
|
1674
|
+
const H = setTimeout(() => {
|
|
1665
1675
|
y(!1);
|
|
1666
1676
|
}, v);
|
|
1667
|
-
N(
|
|
1668
|
-
},
|
|
1677
|
+
N(H);
|
|
1678
|
+
}, M = () => {
|
|
1669
1679
|
c || y(!h);
|
|
1670
1680
|
}, q = () => {
|
|
1671
1681
|
c || V();
|
|
1672
|
-
},
|
|
1673
|
-
|
|
1682
|
+
}, Z = () => {
|
|
1683
|
+
P();
|
|
1674
1684
|
};
|
|
1675
|
-
|
|
1685
|
+
I(() => () => {
|
|
1676
1686
|
b && clearTimeout(b);
|
|
1677
1687
|
}, [b]);
|
|
1678
|
-
const
|
|
1679
|
-
return m === "hover" ? (
|
|
1688
|
+
const W = {};
|
|
1689
|
+
return m === "hover" ? (W.onMouseEnter = V, W.onMouseLeave = P) : m === "click" ? W.onClick = M : m === "focus" && (W.onFocus = q, W.onBlur = Z), /* @__PURE__ */ w(
|
|
1680
1690
|
"div",
|
|
1681
1691
|
{
|
|
1682
1692
|
ref: x,
|
|
1683
|
-
className: `${
|
|
1684
|
-
...
|
|
1693
|
+
className: `${g}__trigger`,
|
|
1694
|
+
...W,
|
|
1685
1695
|
...u,
|
|
1686
1696
|
children: [
|
|
1687
1697
|
o,
|
|
1688
|
-
h && /* @__PURE__ */
|
|
1698
|
+
h && /* @__PURE__ */ n(
|
|
1689
1699
|
"div",
|
|
1690
1700
|
{
|
|
1691
1701
|
ref: B,
|
|
1692
1702
|
className: j,
|
|
1693
|
-
style:
|
|
1703
|
+
style: _,
|
|
1694
1704
|
role: "tooltip",
|
|
1695
1705
|
"aria-hidden": !h,
|
|
1696
|
-
children: /* @__PURE__ */
|
|
1706
|
+
children: /* @__PURE__ */ n("div", { className: S, children: e })
|
|
1697
1707
|
}
|
|
1698
1708
|
)
|
|
1699
1709
|
]
|
|
1700
1710
|
}
|
|
1701
1711
|
);
|
|
1702
|
-
},
|
|
1703
|
-
const e =
|
|
1712
|
+
}, Xe = Q(null), ne = () => {
|
|
1713
|
+
const e = U(Xe);
|
|
1704
1714
|
if (!e)
|
|
1705
1715
|
throw new Error("useCommand must be used within a Command provider");
|
|
1706
1716
|
return e;
|
|
1707
|
-
},
|
|
1717
|
+
}, Ye = ({
|
|
1708
1718
|
children: e,
|
|
1709
1719
|
className: t = "",
|
|
1710
|
-
variant:
|
|
1711
|
-
emptyText:
|
|
1712
|
-
inputPlaceholder:
|
|
1713
|
-
...
|
|
1720
|
+
variant: a = "secondary",
|
|
1721
|
+
emptyText: s = "No results found.",
|
|
1722
|
+
inputPlaceholder: r = "Search...",
|
|
1723
|
+
...l
|
|
1714
1724
|
}) => {
|
|
1715
|
-
const [d, o] = T(""), [
|
|
1725
|
+
const [d, o] = T(""), [i, c] = T(null), [p, v] = T(!1), m = [
|
|
1716
1726
|
"clarity-command",
|
|
1717
|
-
`clarity-command--${
|
|
1727
|
+
`clarity-command--${a}`,
|
|
1718
1728
|
t
|
|
1719
1729
|
].filter(Boolean).join(" "), f = te(() => ({
|
|
1720
1730
|
searchTerm: d,
|
|
1721
1731
|
setSearchTerm: o,
|
|
1722
|
-
value:
|
|
1732
|
+
value: i,
|
|
1723
1733
|
setValue: c,
|
|
1724
|
-
variant:
|
|
1734
|
+
variant: a,
|
|
1725
1735
|
texts: {
|
|
1726
|
-
empty:
|
|
1727
|
-
inputPlaceholder:
|
|
1736
|
+
empty: s,
|
|
1737
|
+
inputPlaceholder: r
|
|
1728
1738
|
},
|
|
1729
1739
|
isOpen: p,
|
|
1730
1740
|
setIsOpen: v
|
|
1731
|
-
}), [d,
|
|
1732
|
-
return /* @__PURE__ */
|
|
1741
|
+
}), [d, i, a, s, r, p]);
|
|
1742
|
+
return /* @__PURE__ */ n(Xe.Provider, { value: f, children: /* @__PURE__ */ n("div", { className: m, ...l, children: e }) });
|
|
1733
1743
|
};
|
|
1734
|
-
|
|
1735
|
-
const
|
|
1736
|
-
const { setIsOpen:
|
|
1737
|
-
|
|
1744
|
+
Ye.displayName = "Command";
|
|
1745
|
+
const Ke = ({ placeholder: e = "Search...", variant: t, onClick: a }) => {
|
|
1746
|
+
const { setIsOpen: s, variant: r } = ne(), [l, d] = T(!1);
|
|
1747
|
+
I(() => {
|
|
1738
1748
|
d(/Mac|iPod|iPhone|iPad/.test(navigator.platform));
|
|
1739
1749
|
}, []);
|
|
1740
|
-
const
|
|
1750
|
+
const i = [
|
|
1741
1751
|
"clarity-command-button",
|
|
1742
|
-
`clarity-command-button--${t ||
|
|
1752
|
+
`clarity-command-button--${t || r}`
|
|
1743
1753
|
].filter(Boolean).join(" ");
|
|
1744
|
-
return /* @__PURE__ */ w("button", { className:
|
|
1745
|
-
|
|
1754
|
+
return /* @__PURE__ */ w("button", { className: i, onClick: (p) => {
|
|
1755
|
+
s(!0), a == null || a(p);
|
|
1746
1756
|
}, children: [
|
|
1747
|
-
/* @__PURE__ */
|
|
1757
|
+
/* @__PURE__ */ n("span", { children: e }),
|
|
1748
1758
|
/* @__PURE__ */ w("kbd", { className: "clarity-command-shortcut", children: [
|
|
1749
|
-
|
|
1759
|
+
l ? "⌘" : "Ctrl+",
|
|
1750
1760
|
"K"
|
|
1751
1761
|
] })
|
|
1752
1762
|
] });
|
|
1753
1763
|
};
|
|
1754
|
-
|
|
1755
|
-
const
|
|
1756
|
-
const { isOpen:
|
|
1757
|
-
return
|
|
1758
|
-
const
|
|
1759
|
-
d.key === "k" && (d.metaKey || d.ctrlKey) && (d.preventDefault(),
|
|
1764
|
+
Ke.displayName = "Command.Button";
|
|
1765
|
+
const et = ({ children: e, ...t }) => {
|
|
1766
|
+
const { isOpen: a, setIsOpen: s, variant: r } = ne();
|
|
1767
|
+
return I(() => {
|
|
1768
|
+
const l = (d) => {
|
|
1769
|
+
d.key === "k" && (d.metaKey || d.ctrlKey) && (d.preventDefault(), s(!a));
|
|
1760
1770
|
};
|
|
1761
|
-
return document.addEventListener("keydown",
|
|
1762
|
-
}, [
|
|
1771
|
+
return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
|
|
1772
|
+
}, [a, s]), /* @__PURE__ */ n(Y, { isOpen: a, onClose: () => s(!1), size: "large", closeOnOverlayClick: !0, children: /* @__PURE__ */ n("div", { className: `clarity-command--${r}`, children: e }) });
|
|
1763
1773
|
};
|
|
1764
|
-
|
|
1765
|
-
const
|
|
1766
|
-
const { searchTerm:
|
|
1767
|
-
|
|
1774
|
+
et.displayName = "Command.Dialog";
|
|
1775
|
+
const tt = ({ className: e = "", ...t }) => {
|
|
1776
|
+
const { searchTerm: a, setSearchTerm: s, variant: r, texts: l, isOpen: d } = ne(), o = F(null);
|
|
1777
|
+
I(() => {
|
|
1768
1778
|
var c;
|
|
1769
1779
|
d && ((c = o.current) == null || c.focus());
|
|
1770
1780
|
}, [d]);
|
|
1771
|
-
const
|
|
1781
|
+
const i = [
|
|
1772
1782
|
"clarity-command-input",
|
|
1773
|
-
`clarity-command-input--${
|
|
1783
|
+
`clarity-command-input--${r}`,
|
|
1774
1784
|
e
|
|
1775
1785
|
].filter(Boolean).join(" ");
|
|
1776
|
-
return /* @__PURE__ */
|
|
1786
|
+
return /* @__PURE__ */ n("div", { className: "clarity-command-input__wrapper", children: /* @__PURE__ */ n(
|
|
1777
1787
|
"input",
|
|
1778
1788
|
{
|
|
1779
1789
|
ref: o,
|
|
1780
|
-
className:
|
|
1781
|
-
value:
|
|
1782
|
-
onChange: (c) =>
|
|
1783
|
-
placeholder: t.placeholder ||
|
|
1790
|
+
className: i,
|
|
1791
|
+
value: a,
|
|
1792
|
+
onChange: (c) => s(c.target.value),
|
|
1793
|
+
placeholder: t.placeholder || l.inputPlaceholder,
|
|
1784
1794
|
...t
|
|
1785
1795
|
}
|
|
1786
1796
|
) });
|
|
1787
1797
|
};
|
|
1788
|
-
|
|
1789
|
-
const
|
|
1790
|
-
const { searchTerm:
|
|
1791
|
-
let
|
|
1792
|
-
const
|
|
1798
|
+
tt.displayName = "Command.Input";
|
|
1799
|
+
const at = ({ children: e, className: t = "", ...a }) => {
|
|
1800
|
+
const { searchTerm: s } = ne();
|
|
1801
|
+
let r = !1;
|
|
1802
|
+
const l = (i) => L.Children.toArray(i).map((c) => {
|
|
1793
1803
|
var v;
|
|
1794
|
-
if (!
|
|
1804
|
+
if (!L.isValidElement(c)) return c;
|
|
1795
1805
|
const p = c.type.displayName;
|
|
1796
1806
|
if (p === "Command.Empty")
|
|
1797
1807
|
return null;
|
|
1798
1808
|
if (p === "Command.Item")
|
|
1799
|
-
return (((v = c.props.children) == null ? void 0 : v.toString().toLowerCase()) || "").includes(
|
|
1809
|
+
return (((v = c.props.children) == null ? void 0 : v.toString().toLowerCase()) || "").includes(s.toLowerCase()) ? (r = !0, c) : null;
|
|
1800
1810
|
if (p === "Command.Group") {
|
|
1801
|
-
const m =
|
|
1802
|
-
return
|
|
1811
|
+
const m = l(c.props.children);
|
|
1812
|
+
return L.Children.toArray(m).some((u) => L.isValidElement(u) && u.type.displayName === "Command.Item") ? L.cloneElement(c, { ...c.props, children: m }) : null;
|
|
1803
1813
|
}
|
|
1804
1814
|
return c;
|
|
1805
|
-
}).filter(Boolean), d =
|
|
1806
|
-
return /* @__PURE__ */ w("div", { className: o, ...
|
|
1815
|
+
}).filter(Boolean), d = l(e), o = ["clarity-command-list", t].filter(Boolean).join(" ");
|
|
1816
|
+
return /* @__PURE__ */ w("div", { className: o, ...a, children: [
|
|
1807
1817
|
d,
|
|
1808
|
-
!
|
|
1818
|
+
!r && /* @__PURE__ */ n(be, {})
|
|
1809
1819
|
] });
|
|
1810
1820
|
};
|
|
1811
|
-
|
|
1812
|
-
const
|
|
1813
|
-
const { texts:
|
|
1814
|
-
return /* @__PURE__ */
|
|
1821
|
+
at.displayName = "Command.List";
|
|
1822
|
+
const be = ({ children: e, className: t = "", ...a }) => {
|
|
1823
|
+
const { texts: s } = ne(), r = ["clarity-command-empty", t].filter(Boolean).join(" ");
|
|
1824
|
+
return /* @__PURE__ */ n("div", { className: r, ...a, children: e || a.emptyText || s.empty });
|
|
1815
1825
|
};
|
|
1816
|
-
|
|
1817
|
-
const
|
|
1818
|
-
const
|
|
1819
|
-
return /* @__PURE__ */
|
|
1826
|
+
be.displayName = "Command.Empty";
|
|
1827
|
+
const st = ({ children: e, className: t = "", ...a }) => {
|
|
1828
|
+
const s = ["clarity-command-group", t].filter(Boolean).join(" ");
|
|
1829
|
+
return /* @__PURE__ */ n("div", { className: s, ...a, children: e });
|
|
1820
1830
|
};
|
|
1821
|
-
|
|
1822
|
-
const
|
|
1823
|
-
const { setValue:
|
|
1824
|
-
return /* @__PURE__ */
|
|
1831
|
+
st.displayName = "Command.Group";
|
|
1832
|
+
const nt = ({ children: e, className: t = "", ...a }) => {
|
|
1833
|
+
const { setValue: s, variant: r } = ne(), l = ["clarity-command-item", `clarity-command-item--${r}`, t].filter(Boolean).join(" ");
|
|
1834
|
+
return /* @__PURE__ */ n("div", { className: l, onClick: () => s((e == null ? void 0 : e.toString()) || ""), ...a, children: e });
|
|
1825
1835
|
};
|
|
1826
|
-
|
|
1827
|
-
const
|
|
1828
|
-
const
|
|
1829
|
-
return /* @__PURE__ */
|
|
1836
|
+
nt.displayName = "Command.Item";
|
|
1837
|
+
const rt = ({ className: e = "", ...t }) => {
|
|
1838
|
+
const a = ["clarity-command-separator", e].filter(Boolean).join(" ");
|
|
1839
|
+
return /* @__PURE__ */ n("hr", { className: a, ...t });
|
|
1830
1840
|
};
|
|
1831
|
-
|
|
1832
|
-
const
|
|
1833
|
-
const
|
|
1834
|
-
return /* @__PURE__ */
|
|
1841
|
+
rt.displayName = "Command.Separator";
|
|
1842
|
+
const lt = ({ children: e, className: t = "", ...a }) => {
|
|
1843
|
+
const s = ["clarity-command-shortcut", t].filter(Boolean).join(" ");
|
|
1844
|
+
return /* @__PURE__ */ n("span", { className: s, ...a, children: e });
|
|
1835
1845
|
};
|
|
1836
|
-
|
|
1837
|
-
const
|
|
1838
|
-
Button:
|
|
1839
|
-
Dialog:
|
|
1840
|
-
Input:
|
|
1841
|
-
List:
|
|
1842
|
-
Empty:
|
|
1843
|
-
Group:
|
|
1844
|
-
Item:
|
|
1845
|
-
Separator:
|
|
1846
|
-
Shortcut:
|
|
1847
|
-
}),
|
|
1848
|
-
const
|
|
1846
|
+
lt.displayName = "Command.Shortcut";
|
|
1847
|
+
const Xt = Object.assign(Ye, {
|
|
1848
|
+
Button: Ke,
|
|
1849
|
+
Dialog: et,
|
|
1850
|
+
Input: tt,
|
|
1851
|
+
List: at,
|
|
1852
|
+
Empty: be,
|
|
1853
|
+
Group: st,
|
|
1854
|
+
Item: nt,
|
|
1855
|
+
Separator: rt,
|
|
1856
|
+
Shortcut: lt
|
|
1857
|
+
}), Ot = ({ columns: e, viewMode: t }) => {
|
|
1858
|
+
const a = Array.from({ length: 5 }, (s, r) => r);
|
|
1849
1859
|
return t === "card" ? /* @__PURE__ */ w("div", { className: "card-view-wrapper is-loading", children: [
|
|
1850
|
-
/* @__PURE__ */
|
|
1851
|
-
/* @__PURE__ */
|
|
1852
|
-
] }) : /* @__PURE__ */
|
|
1853
|
-
/* @__PURE__ */
|
|
1854
|
-
/* @__PURE__ */
|
|
1860
|
+
/* @__PURE__ */ n("div", { className: "skeleton card-view-header" }),
|
|
1861
|
+
/* @__PURE__ */ n("div", { className: "card-view-body", children: a.map((s) => /* @__PURE__ */ n("div", { className: "skeleton card-view-row" }, s)) })
|
|
1862
|
+
] }) : /* @__PURE__ */ n("div", { className: "table-wrapper is-loading", children: /* @__PURE__ */ w("table", { children: [
|
|
1863
|
+
/* @__PURE__ */ n("thead", { children: /* @__PURE__ */ n("tr", { className: "table-row", children: e.map((s) => /* @__PURE__ */ n("th", { className: "table-header-cell", children: /* @__PURE__ */ n("div", { className: "skeleton skeleton-text" }) }, s.key)) }) }),
|
|
1864
|
+
/* @__PURE__ */ n("tbody", { children: a.map((s) => /* @__PURE__ */ n("tr", { className: "table-row", children: e.map((r) => /* @__PURE__ */ n("td", { className: "table-cell", children: /* @__PURE__ */ n("div", { className: "skeleton skeleton-text" }) }, r.key)) }, s)) })
|
|
1855
1865
|
] }) });
|
|
1856
|
-
},
|
|
1866
|
+
}, Yt = ({
|
|
1857
1867
|
variant: e = "secondary",
|
|
1858
1868
|
columns: t,
|
|
1859
|
-
data:
|
|
1860
|
-
viewMode:
|
|
1861
|
-
isScrollable:
|
|
1862
|
-
isLoading:
|
|
1869
|
+
data: a,
|
|
1870
|
+
viewMode: s = "table",
|
|
1871
|
+
isScrollable: r = !1,
|
|
1872
|
+
isLoading: l = !1
|
|
1863
1873
|
}) => {
|
|
1864
|
-
const [d, o] = T(null), [
|
|
1874
|
+
const [d, o] = T(null), [i, c] = T("none"), p = (u) => {
|
|
1865
1875
|
u.sortable && (d === u.key ? c((h) => h === "asc" ? "desc" : h === "desc" ? "none" : "asc") : (o(u.key), c("asc")));
|
|
1866
|
-
}, v = te(() =>
|
|
1876
|
+
}, v = te(() => i === "none" || !d ? a : [...a].sort((u, h) => {
|
|
1867
1877
|
const y = u[d], b = h[d];
|
|
1868
|
-
return y < b ?
|
|
1869
|
-
}), [
|
|
1870
|
-
if (
|
|
1871
|
-
return /* @__PURE__ */
|
|
1872
|
-
const f = `table-variant-${e} ${
|
|
1873
|
-
return
|
|
1874
|
-
/* @__PURE__ */
|
|
1878
|
+
return y < b ? i === "asc" ? -1 : 1 : y > b ? i === "asc" ? 1 : -1 : 0;
|
|
1879
|
+
}), [a, d, i]), m = (u) => u.sortable ? d !== u.key || i === "none" ? /* @__PURE__ */ n("span", { className: "sort-icon", children: "↕" }) : i === "asc" ? /* @__PURE__ */ n("span", { className: "sort-icon", children: "↑" }) : /* @__PURE__ */ n("span", { className: "sort-icon", children: "↓" }) : null;
|
|
1880
|
+
if (l)
|
|
1881
|
+
return /* @__PURE__ */ n(Ot, { columns: t, viewMode: s });
|
|
1882
|
+
const f = `table-variant-${e} ${r ? "is-scrollable" : ""}`;
|
|
1883
|
+
return s === "card" ? /* @__PURE__ */ w("div", { className: `card-view-wrapper ${f}`, children: [
|
|
1884
|
+
/* @__PURE__ */ n("div", { className: `card-view-header table-header-cell-${e}`, children: t.map((u) => /* @__PURE__ */ w(
|
|
1875
1885
|
"div",
|
|
1876
1886
|
{
|
|
1877
1887
|
className: `card-view-header-cell ${u.sortable ? "sortable" : ""}`,
|
|
@@ -1884,9 +1894,9 @@ const zt = Object.assign(Je, {
|
|
|
1884
1894
|
},
|
|
1885
1895
|
u.key
|
|
1886
1896
|
)) }),
|
|
1887
|
-
/* @__PURE__ */
|
|
1888
|
-
] }) : /* @__PURE__ */
|
|
1889
|
-
/* @__PURE__ */
|
|
1897
|
+
/* @__PURE__ */ n("div", { className: "card-view-body", children: v.map((u, h) => /* @__PURE__ */ n("div", { className: `card-view-row table-row-${e}`, children: t.map((y) => /* @__PURE__ */ n("div", { className: `card-view-cell ${y.align ? `table-cell-align-${y.align}` : ""}`, style: { minWidth: y.minWidth }, children: y.render ? y.render(u) : u[y.key] }, y.key)) }, h)) })
|
|
1898
|
+
] }) : /* @__PURE__ */ n("div", { className: `table-wrapper ${f}`, children: /* @__PURE__ */ w("table", { children: [
|
|
1899
|
+
/* @__PURE__ */ n("thead", { className: "table-header", children: /* @__PURE__ */ n("tr", { className: "table-row", children: t.map((u) => /* @__PURE__ */ w(
|
|
1890
1900
|
"th",
|
|
1891
1901
|
{
|
|
1892
1902
|
className: `table-header-cell ${u.sortable ? "sortable" : ""} table-header-cell-${e}`,
|
|
@@ -1899,25 +1909,25 @@ const zt = Object.assign(Je, {
|
|
|
1899
1909
|
},
|
|
1900
1910
|
u.key
|
|
1901
1911
|
)) }) }),
|
|
1902
|
-
/* @__PURE__ */
|
|
1912
|
+
/* @__PURE__ */ n("tbody", { children: v.map((u, h) => /* @__PURE__ */ n("tr", { className: `table-row table-row-${e}`, children: t.map((y) => /* @__PURE__ */ n("td", { className: `table-cell ${y.align ? `table-cell-align-${y.align}` : ""}`, style: { minWidth: y.minWidth }, children: y.render ? y.render(u) : u[y.key] }, y.key)) }, h)) })
|
|
1903
1913
|
] }) });
|
|
1904
|
-
},
|
|
1914
|
+
}, Kt = ({
|
|
1905
1915
|
variant: e = "primary",
|
|
1906
1916
|
product: t,
|
|
1907
|
-
tone:
|
|
1908
|
-
size:
|
|
1909
|
-
color:
|
|
1910
|
-
className:
|
|
1917
|
+
tone: a,
|
|
1918
|
+
size: s = "medium",
|
|
1919
|
+
color: r,
|
|
1920
|
+
className: l = "",
|
|
1911
1921
|
"aria-label": d = "Carregando...",
|
|
1912
1922
|
...o
|
|
1913
1923
|
}) => {
|
|
1914
|
-
const
|
|
1915
|
-
|
|
1916
|
-
`${
|
|
1924
|
+
const i = "clarity-spinner", v = r ? `${i}--custom` : t && a ? `${i}--custom` : `${i}--${e}`, m = [
|
|
1925
|
+
i,
|
|
1926
|
+
`${i}--${s}`,
|
|
1917
1927
|
v,
|
|
1918
|
-
|
|
1928
|
+
l
|
|
1919
1929
|
].filter(Boolean).join(" "), f = {};
|
|
1920
|
-
return
|
|
1930
|
+
return r ? f["--spinner-color"] = r : t && a && (f["--spinner-color"] = `var(--clarity-${t}-${a})`), /* @__PURE__ */ n(
|
|
1921
1931
|
"div",
|
|
1922
1932
|
{
|
|
1923
1933
|
className: m,
|
|
@@ -1925,16 +1935,16 @@ const zt = Object.assign(Je, {
|
|
|
1925
1935
|
role: "status",
|
|
1926
1936
|
"aria-label": d,
|
|
1927
1937
|
...o,
|
|
1928
|
-
children: /* @__PURE__ */
|
|
1938
|
+
children: /* @__PURE__ */ n("div", { className: `${i}__container`, children: /* @__PURE__ */ n(
|
|
1929
1939
|
"svg",
|
|
1930
1940
|
{
|
|
1931
|
-
className: `${
|
|
1941
|
+
className: `${i}__svg`,
|
|
1932
1942
|
viewBox: "0 0 50 50",
|
|
1933
1943
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1934
|
-
children: /* @__PURE__ */
|
|
1944
|
+
children: /* @__PURE__ */ n(
|
|
1935
1945
|
"circle",
|
|
1936
1946
|
{
|
|
1937
|
-
className: `${
|
|
1947
|
+
className: `${i}__circle`,
|
|
1938
1948
|
cx: "25",
|
|
1939
1949
|
cy: "25",
|
|
1940
1950
|
r: "20",
|
|
@@ -1946,35 +1956,35 @@ const zt = Object.assign(Je, {
|
|
|
1946
1956
|
) })
|
|
1947
1957
|
}
|
|
1948
1958
|
);
|
|
1949
|
-
},
|
|
1959
|
+
}, It = ({
|
|
1950
1960
|
className: e = "",
|
|
1951
1961
|
noGutters: t,
|
|
1952
|
-
justify:
|
|
1953
|
-
align:
|
|
1954
|
-
children:
|
|
1955
|
-
as:
|
|
1962
|
+
justify: a,
|
|
1963
|
+
align: s,
|
|
1964
|
+
children: r,
|
|
1965
|
+
as: l = "div",
|
|
1956
1966
|
...d
|
|
1957
1967
|
}) => {
|
|
1958
1968
|
const o = [
|
|
1959
1969
|
"clarity-row",
|
|
1960
1970
|
t ? "clarity-row--no-gutters" : "",
|
|
1961
|
-
|
|
1962
|
-
|
|
1971
|
+
a ? `clarity-row--justify-${a}` : "",
|
|
1972
|
+
s ? `clarity-row--align-${s}` : "",
|
|
1963
1973
|
e
|
|
1964
1974
|
].filter(Boolean).join(" ");
|
|
1965
|
-
return
|
|
1975
|
+
return L.createElement(l, { className: o, ...d }, r);
|
|
1966
1976
|
};
|
|
1967
|
-
|
|
1968
|
-
const
|
|
1977
|
+
It.displayName = "Row";
|
|
1978
|
+
const Dt = (e) => `${e / 12 * 100}%`, At = (e) => `${e / 12 * 100}%`, Pt = ({
|
|
1969
1979
|
className: e = "",
|
|
1970
1980
|
xs: t,
|
|
1971
|
-
sm:
|
|
1972
|
-
md:
|
|
1973
|
-
lg:
|
|
1974
|
-
xl:
|
|
1981
|
+
sm: a,
|
|
1982
|
+
md: s,
|
|
1983
|
+
lg: r,
|
|
1984
|
+
xl: l,
|
|
1975
1985
|
xxl: d,
|
|
1976
1986
|
offset: o,
|
|
1977
|
-
children:
|
|
1987
|
+
children: i,
|
|
1978
1988
|
as: c = "div",
|
|
1979
1989
|
style: p,
|
|
1980
1990
|
...v
|
|
@@ -1982,39 +1992,74 @@ const Et = (e) => `${e / 12 * 100}%`, Lt = (e) => `${e / 12 * 100}%`, St = ({
|
|
|
1982
1992
|
const m = { ...p }, f = (y, b) => {
|
|
1983
1993
|
if (b === void 0) return;
|
|
1984
1994
|
const N = `--clarity-col-width-${y}`;
|
|
1985
|
-
m[N] = typeof b == "number" ?
|
|
1995
|
+
m[N] = typeof b == "number" ? Dt(b) : "auto";
|
|
1986
1996
|
}, u = (y, b) => {
|
|
1987
1997
|
if (b === void 0) return;
|
|
1988
1998
|
const N = `--clarity-col-offset-${y}`;
|
|
1989
|
-
m[N] =
|
|
1999
|
+
m[N] = At(b);
|
|
1990
2000
|
};
|
|
1991
|
-
f("xs", t), f("sm",
|
|
2001
|
+
f("xs", t), f("sm", a), f("md", s), f("lg", r), f("xl", l), f("xxl", d), u("xs", o == null ? void 0 : o.xs), u("sm", o == null ? void 0 : o.sm), u("md", o == null ? void 0 : o.md), u("lg", o == null ? void 0 : o.lg), u("xl", o == null ? void 0 : o.xl), u("xxl", o == null ? void 0 : o.xxl);
|
|
1992
2002
|
const h = ["clarity-col", e].filter(Boolean).join(" ");
|
|
1993
|
-
return
|
|
2003
|
+
return L.createElement(c, { className: h, style: m, ...v }, i);
|
|
2004
|
+
};
|
|
2005
|
+
Pt.displayName = "Col";
|
|
2006
|
+
const Ce = Q({}), it = ({ children: e, className: t, ...a }) => {
|
|
2007
|
+
const { borderRadius: s } = U(Ce);
|
|
2008
|
+
return /* @__PURE__ */ n(
|
|
2009
|
+
me,
|
|
2010
|
+
{
|
|
2011
|
+
as: "header",
|
|
2012
|
+
p: 4,
|
|
2013
|
+
borderBottomWidth: 1,
|
|
2014
|
+
borderColor: "gray.200",
|
|
2015
|
+
className: t,
|
|
2016
|
+
borderTopLeftRadius: s,
|
|
2017
|
+
borderTopRightRadius: s,
|
|
2018
|
+
...a,
|
|
2019
|
+
children: e
|
|
2020
|
+
}
|
|
2021
|
+
);
|
|
2022
|
+
};
|
|
2023
|
+
it.displayName = "Card.Header";
|
|
2024
|
+
const ot = ({ children: e, className: t, ...a }) => /* @__PURE__ */ n(me, { p: 4, className: t, ...a, children: e });
|
|
2025
|
+
ot.displayName = "Card.Content";
|
|
2026
|
+
const ct = ({ children: e, className: t, ...a }) => {
|
|
2027
|
+
const { borderRadius: s } = U(Ce);
|
|
2028
|
+
return /* @__PURE__ */ n(
|
|
2029
|
+
me,
|
|
2030
|
+
{
|
|
2031
|
+
as: "footer",
|
|
2032
|
+
p: 4,
|
|
2033
|
+
borderTopWidth: 1,
|
|
2034
|
+
borderColor: "gray.200",
|
|
2035
|
+
display: "flex",
|
|
2036
|
+
justifyContent: "flex-end",
|
|
2037
|
+
gap: 3,
|
|
2038
|
+
className: t,
|
|
2039
|
+
borderBottomLeftRadius: s,
|
|
2040
|
+
borderBottomRightRadius: s,
|
|
2041
|
+
...a,
|
|
2042
|
+
children: e
|
|
2043
|
+
}
|
|
2044
|
+
);
|
|
1994
2045
|
};
|
|
1995
|
-
|
|
1996
|
-
const
|
|
1997
|
-
|
|
1998
|
-
const nt = ({ children: e, className: t, ...s }) => /* @__PURE__ */ a(de, { p: 4, className: t, ...s, children: e });
|
|
1999
|
-
nt.displayName = "Card.Content";
|
|
2000
|
-
const lt = ({ children: e, className: t, ...s }) => /* @__PURE__ */ a(de, { as: "footer", p: 4, borderTopWidth: 1, borderColor: "gray.200", display: "flex", justifyContent: "flex-end", gap: 3, className: t, ...s, children: e });
|
|
2001
|
-
lt.displayName = "Card.Footer";
|
|
2002
|
-
const me = ({ children: e, bg: t = "white", ...s }) => /* @__PURE__ */ a(
|
|
2003
|
-
de,
|
|
2046
|
+
ct.displayName = "Card.Footer";
|
|
2047
|
+
const ue = ({ children: e, bg: t = "white", borderRadius: a = 3, ...s }) => /* @__PURE__ */ n(Ce.Provider, { value: { borderRadius: a }, children: /* @__PURE__ */ n(
|
|
2048
|
+
me,
|
|
2004
2049
|
{
|
|
2005
2050
|
bg: t,
|
|
2006
|
-
borderRadius:
|
|
2051
|
+
borderRadius: a,
|
|
2007
2052
|
boxShadow: 1,
|
|
2008
2053
|
overflow: "hidden",
|
|
2009
2054
|
...s,
|
|
2010
2055
|
children: e
|
|
2011
2056
|
}
|
|
2012
|
-
);
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
const
|
|
2057
|
+
) });
|
|
2058
|
+
ue.Header = it;
|
|
2059
|
+
ue.Content = ot;
|
|
2060
|
+
ue.Footer = ct;
|
|
2061
|
+
ue.displayName = "Card";
|
|
2062
|
+
const ea = {
|
|
2018
2063
|
primary: {
|
|
2019
2064
|
50: "#f0f9ff",
|
|
2020
2065
|
100: "#e0f2fe",
|
|
@@ -2063,7 +2108,7 @@ const Jt = {
|
|
|
2063
2108
|
800: "#065f46",
|
|
2064
2109
|
900: "#064e3b"
|
|
2065
2110
|
}
|
|
2066
|
-
},
|
|
2111
|
+
}, ta = {
|
|
2067
2112
|
xs: "4px",
|
|
2068
2113
|
sm: "8px",
|
|
2069
2114
|
md: "16px",
|
|
@@ -2071,38 +2116,38 @@ const Jt = {
|
|
|
2071
2116
|
xl: "32px",
|
|
2072
2117
|
"2xl": "48px",
|
|
2073
2118
|
"3xl": "64px"
|
|
2074
|
-
},
|
|
2119
|
+
}, aa = (...e) => e.filter(Boolean).join(" "), sa = () => Math.random().toString(36).substr(2, 9);
|
|
2075
2120
|
export {
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2121
|
+
Qt as Accordion,
|
|
2122
|
+
Wt as Badge,
|
|
2123
|
+
me as Box,
|
|
2124
|
+
Ft as Button,
|
|
2125
|
+
Gt as ButtonGroup,
|
|
2126
|
+
qt as ButtonIcon,
|
|
2127
|
+
Jt as ButtonLink,
|
|
2128
|
+
ue as Card,
|
|
2129
|
+
_t as CheckInput,
|
|
2130
|
+
Pt as Col,
|
|
2131
|
+
Xt as Command,
|
|
2132
|
+
K as ConfirmationDialog,
|
|
2133
|
+
ce as Dropdown,
|
|
2134
|
+
bt as Input,
|
|
2135
|
+
$t as InputSwitch,
|
|
2136
|
+
Y as Modal,
|
|
2137
|
+
wt as MultiSelect,
|
|
2138
|
+
se as Offcanvas,
|
|
2139
|
+
It as Row,
|
|
2140
|
+
Nt as Select,
|
|
2141
|
+
Kt as Spinner,
|
|
2142
|
+
Yt as Table,
|
|
2143
|
+
ve as Tabs,
|
|
2144
|
+
Ct as Textarea,
|
|
2145
|
+
Ut as ToastProvider,
|
|
2146
|
+
Zt as Tooltip,
|
|
2147
|
+
aa as cn,
|
|
2148
|
+
ea as colors,
|
|
2149
|
+
sa as generateId,
|
|
2150
|
+
ta as spacing,
|
|
2151
|
+
we as typography,
|
|
2152
|
+
zt as useToast
|
|
2108
2153
|
};
|