@purpurds/checkbox 8.8.0 → 8.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LICENSE.txt +5 -5
- package/dist/checkbox.cjs.js +1 -29
- package/dist/checkbox.cjs.js.map +1 -1
- package/dist/checkbox.es.js +241 -282
- package/dist/checkbox.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +24 -24
package/dist/checkbox.es.js
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import { jsxs as S, jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
|
-
import { forwardRef as
|
|
3
|
+
import { forwardRef as _e } from "react";
|
|
4
4
|
import "react-dom";
|
|
5
|
-
function
|
|
5
|
+
function ge(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Licensed under the MIT License (MIT), see
|
|
12
|
-
http://jedwatson.github.io/classnames
|
|
13
|
-
*/
|
|
14
|
-
var q;
|
|
15
|
-
function _e() {
|
|
16
|
-
return q || (q = 1, (function(e) {
|
|
8
|
+
var q = { exports: {} }, z;
|
|
9
|
+
function ve() {
|
|
10
|
+
return z || (z = 1, (function(e) {
|
|
17
11
|
(function() {
|
|
18
12
|
var t = {}.hasOwnProperty;
|
|
19
13
|
function n() {
|
|
@@ -42,10 +36,10 @@ function _e() {
|
|
|
42
36
|
}
|
|
43
37
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
44
38
|
})();
|
|
45
|
-
})(
|
|
39
|
+
})(q)), q.exports;
|
|
46
40
|
}
|
|
47
|
-
var
|
|
48
|
-
const
|
|
41
|
+
var ye = ve();
|
|
42
|
+
const be = /* @__PURE__ */ ge(ye), xe = {
|
|
49
43
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
50
44
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
51
45
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -53,40 +47,34 @@ const ve = /* @__PURE__ */ me(ge), be = {
|
|
|
53
47
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
54
48
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
55
49
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
56
|
-
},
|
|
50
|
+
}, $e = be.bind(xe), B = "purpur-icon", we = "md", Se = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), Ce = ({ content: e = "", title: t } = {}) => {
|
|
57
51
|
const n = [
|
|
58
52
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
59
53
|
{ name: "fill", value: "currentColor" },
|
|
60
54
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
61
55
|
t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
62
56
|
], a = t ? `<title>${t}</title>` : "";
|
|
63
|
-
return `<svg ${
|
|
64
|
-
},
|
|
65
|
-
const r =
|
|
66
|
-
content:
|
|
57
|
+
return `<svg ${Se(n)}>${a}${e}</svg>`;
|
|
58
|
+
}, Ne = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), te = ({ svg: e, allyTitle: t, className: n, size: a = we, ...i }) => {
|
|
59
|
+
const r = Ce({
|
|
60
|
+
content: Ne(e.svg),
|
|
67
61
|
title: t
|
|
68
|
-
}), o =
|
|
62
|
+
}), o = $e(B, `${B}--${a}`, n);
|
|
69
63
|
return /* @__PURE__ */ p("span", { className: o, dangerouslySetInnerHTML: { __html: r }, ...i });
|
|
70
64
|
};
|
|
71
|
-
|
|
72
|
-
const
|
|
65
|
+
te.displayName = "Icon";
|
|
66
|
+
const ke = {
|
|
73
67
|
name: "error-filled",
|
|
74
68
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 24" fill="currentColor"><path fill-rule="evenodd" d="M14.268 3.5c-.77-1.333-2.694-1.333-3.464 0l-8.66 15c-.77 1.333.192 3 1.732 3h17.32c1.54 0 2.502-1.667 1.733-3l-8.66-15Zm-.694 5.067-.247 6.876h-1.566l-.247-6.876a1.03 1.03 0 1 1 2.06 0Zm.212 8.917c0 .649-.585 1.234-1.25 1.234-.648 0-1.25-.585-1.25-1.234 0-.633.602-1.234 1.25-1.234.665 0 1.25.601 1.25 1.234Z" clip-rule="evenodd"/></svg>',
|
|
75
69
|
keywords: ["error-filled"],
|
|
76
70
|
category: "status"
|
|
77
71
|
};
|
|
78
|
-
function
|
|
72
|
+
function Oe(e) {
|
|
79
73
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
80
74
|
}
|
|
81
|
-
var
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
Licensed under the MIT License (MIT), see
|
|
85
|
-
http://jedwatson.github.io/classnames
|
|
86
|
-
*/
|
|
87
|
-
var W;
|
|
88
|
-
function ke() {
|
|
89
|
-
return W || (W = 1, (function(e) {
|
|
75
|
+
var W = { exports: {} }, L;
|
|
76
|
+
function Pe() {
|
|
77
|
+
return L || (L = 1, (function(e) {
|
|
90
78
|
(function() {
|
|
91
79
|
var t = {}.hasOwnProperty;
|
|
92
80
|
function n() {
|
|
@@ -115,14 +103,14 @@ function ke() {
|
|
|
115
103
|
}
|
|
116
104
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
117
105
|
})();
|
|
118
|
-
})(
|
|
106
|
+
})(W)), W.exports;
|
|
119
107
|
}
|
|
120
|
-
var
|
|
121
|
-
const
|
|
108
|
+
var Ae = Pe();
|
|
109
|
+
const Re = /* @__PURE__ */ Oe(Ae), Ee = {
|
|
122
110
|
"purpur-field-error-text": "_purpur-field-error-text_u1cy2_1",
|
|
123
111
|
"purpur-field-error-text--negative": "_purpur-field-error-text--negative_u1cy2_11",
|
|
124
112
|
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_u1cy2_14"
|
|
125
|
-
},
|
|
113
|
+
}, H = Re.bind(Ee), A = "purpur-field-error-text", Me = ({
|
|
126
114
|
children: e,
|
|
127
115
|
className: t,
|
|
128
116
|
negative: n = !1,
|
|
@@ -131,29 +119,23 @@ const Pe = /* @__PURE__ */ Ne(Oe), Ae = {
|
|
|
131
119
|
}) => /* @__PURE__ */ S(
|
|
132
120
|
"div",
|
|
133
121
|
{
|
|
134
|
-
className:
|
|
135
|
-
[`${
|
|
122
|
+
className: H(t, A, {
|
|
123
|
+
[`${A}--negative`]: n
|
|
136
124
|
}),
|
|
137
125
|
"aria-live": "assertive",
|
|
138
126
|
"aria-relevant": a,
|
|
139
127
|
...i,
|
|
140
128
|
children: [
|
|
141
|
-
/* @__PURE__ */ p(
|
|
129
|
+
/* @__PURE__ */ p(te, { svg: ke, size: "xs", className: H(`${A}__icon`) }),
|
|
142
130
|
e
|
|
143
131
|
]
|
|
144
132
|
}
|
|
145
133
|
);
|
|
146
|
-
function
|
|
134
|
+
function je(e) {
|
|
147
135
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
148
136
|
}
|
|
149
|
-
var T = { exports: {} };
|
|
150
|
-
|
|
151
|
-
Copyright (c) 2018 Jed Watson.
|
|
152
|
-
Licensed under the MIT License (MIT), see
|
|
153
|
-
http://jedwatson.github.io/classnames
|
|
154
|
-
*/
|
|
155
|
-
var U;
|
|
156
|
-
function Me() {
|
|
137
|
+
var T = { exports: {} }, U;
|
|
138
|
+
function De() {
|
|
157
139
|
return U || (U = 1, (function(e) {
|
|
158
140
|
(function() {
|
|
159
141
|
var t = {}.hasOwnProperty;
|
|
@@ -185,12 +167,12 @@ function Me() {
|
|
|
185
167
|
})();
|
|
186
168
|
})(T)), T.exports;
|
|
187
169
|
}
|
|
188
|
-
var
|
|
189
|
-
const
|
|
170
|
+
var Ie = De();
|
|
171
|
+
const qe = /* @__PURE__ */ je(Ie), ze = {
|
|
190
172
|
"purpur-field-helper-text": "_purpur-field-helper-text_11nsh_1",
|
|
191
173
|
"purpur-field-helper-text--disabled": "_purpur-field-helper-text--disabled_11nsh_9",
|
|
192
174
|
"purpur-field-helper-text--negative": "_purpur-field-helper-text--negative_11nsh_12"
|
|
193
|
-
},
|
|
175
|
+
}, Be = qe.bind(ze), R = "purpur-field-helper-text", We = ({
|
|
194
176
|
children: e,
|
|
195
177
|
className: t,
|
|
196
178
|
disabled: n,
|
|
@@ -198,23 +180,17 @@ const De = /* @__PURE__ */ Ee(je), Ie = {
|
|
|
198
180
|
negative: i,
|
|
199
181
|
...r
|
|
200
182
|
}) => {
|
|
201
|
-
const o =
|
|
202
|
-
[`${
|
|
203
|
-
[`${
|
|
183
|
+
const o = Be(t, R, {
|
|
184
|
+
[`${R}--disabled`]: n,
|
|
185
|
+
[`${R}--negative`]: i
|
|
204
186
|
});
|
|
205
187
|
return /* @__PURE__ */ p("span", { id: a, className: o, ...r, children: e });
|
|
206
188
|
};
|
|
207
|
-
function
|
|
189
|
+
function Le(e) {
|
|
208
190
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
209
191
|
}
|
|
210
|
-
var V = { exports: {} };
|
|
211
|
-
|
|
212
|
-
Copyright (c) 2018 Jed Watson.
|
|
213
|
-
Licensed under the MIT License (MIT), see
|
|
214
|
-
http://jedwatson.github.io/classnames
|
|
215
|
-
*/
|
|
216
|
-
var F;
|
|
217
|
-
function We() {
|
|
192
|
+
var V = { exports: {} }, F;
|
|
193
|
+
function He() {
|
|
218
194
|
return F || (F = 1, (function(e) {
|
|
219
195
|
(function() {
|
|
220
196
|
var t = {}.hasOwnProperty;
|
|
@@ -246,8 +222,8 @@ function We() {
|
|
|
246
222
|
})();
|
|
247
223
|
})(V)), V.exports;
|
|
248
224
|
}
|
|
249
|
-
var
|
|
250
|
-
const
|
|
225
|
+
var Te = He();
|
|
226
|
+
const Ue = /* @__PURE__ */ Le(Te), Ve = {
|
|
251
227
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
252
228
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
253
229
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -255,58 +231,67 @@ const Te = /* @__PURE__ */ ze(Le), Ue = {
|
|
|
255
231
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
256
232
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
257
233
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
258
|
-
},
|
|
234
|
+
}, Fe = Ue.bind(Ve), Z = "purpur-icon", Ze = "md", Ke = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), Ge = ({ content: e = "", title: t } = {}) => {
|
|
259
235
|
const n = [
|
|
260
236
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
261
237
|
{ name: "fill", value: "currentColor" },
|
|
262
238
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
263
239
|
t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
264
240
|
], a = t ? `<title>${t}</title>` : "";
|
|
265
|
-
return `<svg ${
|
|
266
|
-
},
|
|
267
|
-
const r =
|
|
268
|
-
content:
|
|
241
|
+
return `<svg ${Ke(n)}>${a}${e}</svg>`;
|
|
242
|
+
}, Xe = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), j = ({ svg: e, allyTitle: t, className: n, size: a = Ze, ...i }) => {
|
|
243
|
+
const r = Ge({
|
|
244
|
+
content: Xe(e.svg),
|
|
269
245
|
title: t
|
|
270
|
-
}), o =
|
|
246
|
+
}), o = Fe(Z, `${Z}--${a}`, n);
|
|
271
247
|
return /* @__PURE__ */ p("span", { className: o, dangerouslySetInnerHTML: { __html: r }, ...i });
|
|
272
248
|
};
|
|
273
|
-
|
|
274
|
-
const
|
|
249
|
+
j.displayName = "Icon";
|
|
250
|
+
const Je = {
|
|
275
251
|
name: "checkmark-bold",
|
|
276
252
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M21.243 4.176a2 2 0 0 1 .324 2.81l-10.45 13.176a2.092 2.092 0 0 1-3.118.18l-5.413-5.413A2 2 0 1 1 5.414 12.1l3.9 3.9 9.118-11.5a2 2 0 0 1 2.81-.324Z" clip-rule="evenodd"/></svg>',
|
|
277
253
|
keywords: ["checkmark-bold"],
|
|
278
254
|
category: "utility"
|
|
279
|
-
},
|
|
255
|
+
}, Qe = {
|
|
280
256
|
name: "minus-bold",
|
|
281
257
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M3 12c0-1.105.711-2 1.588-2h14.824c.877 0 1.588.895 1.588 2s-.711 2-1.588 2H4.588C3.711 14 3 13.105 3 12Z" clip-rule="evenodd"/></svg>',
|
|
282
258
|
keywords: ["minus-bold"],
|
|
283
259
|
category: "utility"
|
|
284
260
|
};
|
|
285
|
-
function
|
|
261
|
+
function K(e, t) {
|
|
286
262
|
if (typeof e == "function")
|
|
287
263
|
return e(t);
|
|
288
264
|
e != null && (e.current = t);
|
|
289
265
|
}
|
|
290
|
-
function
|
|
266
|
+
function Ye(...e) {
|
|
291
267
|
return (t) => {
|
|
292
268
|
let n = !1;
|
|
293
269
|
const a = e.map((i) => {
|
|
294
|
-
const r =
|
|
270
|
+
const r = K(i, t);
|
|
295
271
|
return !n && typeof r == "function" && (n = !0), r;
|
|
296
272
|
});
|
|
297
273
|
if (n)
|
|
298
274
|
return () => {
|
|
299
275
|
for (let i = 0; i < a.length; i++) {
|
|
300
276
|
const r = a[i];
|
|
301
|
-
typeof r == "function" ? r() :
|
|
277
|
+
typeof r == "function" ? r() : K(e[i], null);
|
|
302
278
|
}
|
|
303
279
|
};
|
|
304
280
|
};
|
|
305
281
|
}
|
|
282
|
+
var er = Symbol.for("react.lazy"), O = s[" use ".trim().toString()];
|
|
283
|
+
function rr(e) {
|
|
284
|
+
return typeof e == "object" && e !== null && "then" in e;
|
|
285
|
+
}
|
|
286
|
+
function ne(e) {
|
|
287
|
+
return e != null && typeof e == "object" && "$$typeof" in e && e.$$typeof === er && "_payload" in e && rr(e._payload);
|
|
288
|
+
}
|
|
306
289
|
// @__NO_SIDE_EFFECTS__
|
|
307
|
-
function
|
|
308
|
-
const t = /* @__PURE__ */
|
|
309
|
-
|
|
290
|
+
function tr(e) {
|
|
291
|
+
const t = /* @__PURE__ */ nr(e), n = s.forwardRef((a, i) => {
|
|
292
|
+
let { children: r, ...o } = a;
|
|
293
|
+
ne(r) && typeof O == "function" && (r = O(r._payload));
|
|
294
|
+
const u = s.Children.toArray(r), c = u.find(ir);
|
|
310
295
|
if (c) {
|
|
311
296
|
const l = c.props.children, d = u.map((f) => f === c ? s.Children.count(l) > 1 ? s.Children.only(null) : s.isValidElement(l) ? l.props.children : null : f);
|
|
312
297
|
return /* @__PURE__ */ p(t, { ...o, ref: i, children: s.isValidElement(l) ? s.cloneElement(l, void 0, d) : null });
|
|
@@ -316,22 +301,22 @@ function Qe(e) {
|
|
|
316
301
|
return n.displayName = `${e}.Slot`, n;
|
|
317
302
|
}
|
|
318
303
|
// @__NO_SIDE_EFFECTS__
|
|
319
|
-
function
|
|
304
|
+
function nr(e) {
|
|
320
305
|
const t = s.forwardRef((n, a) => {
|
|
321
|
-
|
|
322
|
-
if (s.isValidElement(i)) {
|
|
323
|
-
const o =
|
|
324
|
-
return i.type !== s.Fragment && (u.ref = a ?
|
|
306
|
+
let { children: i, ...r } = n;
|
|
307
|
+
if (ne(i) && typeof O == "function" && (i = O(i._payload)), s.isValidElement(i)) {
|
|
308
|
+
const o = ur(i), u = ar(r, i.props);
|
|
309
|
+
return i.type !== s.Fragment && (u.ref = a ? Ye(a, o) : o), s.cloneElement(i, u);
|
|
325
310
|
}
|
|
326
311
|
return s.Children.count(i) > 1 ? s.Children.only(null) : null;
|
|
327
312
|
});
|
|
328
313
|
return t.displayName = `${e}.SlotClone`, t;
|
|
329
314
|
}
|
|
330
|
-
var
|
|
331
|
-
function
|
|
332
|
-
return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
315
|
+
var or = Symbol("radix.slottable");
|
|
316
|
+
function ir(e) {
|
|
317
|
+
return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === or;
|
|
333
318
|
}
|
|
334
|
-
function
|
|
319
|
+
function ar(e, t) {
|
|
335
320
|
const n = { ...t };
|
|
336
321
|
for (const a in t) {
|
|
337
322
|
const i = e[a], r = t[a];
|
|
@@ -342,12 +327,11 @@ function tr(e, t) {
|
|
|
342
327
|
}
|
|
343
328
|
return { ...e, ...n };
|
|
344
329
|
}
|
|
345
|
-
function
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
return i ? e.ref : (a = (n = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : n.get, i = a && "isReactWarning" in a && a.isReactWarning, i ? e.props.ref : e.props.ref || e.ref);
|
|
330
|
+
function ur(e) {
|
|
331
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
332
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
349
333
|
}
|
|
350
|
-
var
|
|
334
|
+
var sr = [
|
|
351
335
|
"a",
|
|
352
336
|
"button",
|
|
353
337
|
"div",
|
|
@@ -365,37 +349,30 @@ var or = [
|
|
|
365
349
|
"span",
|
|
366
350
|
"svg",
|
|
367
351
|
"ul"
|
|
368
|
-
],
|
|
369
|
-
const n = /* @__PURE__ */
|
|
352
|
+
], cr = sr.reduce((e, t) => {
|
|
353
|
+
const n = /* @__PURE__ */ tr(`Primitive.${t}`), a = s.forwardRef((i, r) => {
|
|
370
354
|
const { asChild: o, ...u } = i, c = o ? n : t;
|
|
371
355
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(c, { ...u, ref: r });
|
|
372
356
|
});
|
|
373
357
|
return a.displayName = `Primitive.${t}`, { ...e, [t]: a };
|
|
374
|
-
}, {}),
|
|
375
|
-
|
|
358
|
+
}, {}), lr = "Label", oe = s.forwardRef((e, t) => /* @__PURE__ */ p(
|
|
359
|
+
cr.label,
|
|
376
360
|
{
|
|
377
361
|
...e,
|
|
378
362
|
ref: t,
|
|
379
363
|
onMouseDown: (n) => {
|
|
380
|
-
|
|
381
|
-
n.target.closest("button, input, select, textarea") || ((a = e.onMouseDown) == null || a.call(e, n), !n.defaultPrevented && n.detail > 1 && n.preventDefault());
|
|
364
|
+
n.target.closest("button, input, select, textarea") || (e.onMouseDown?.(n), !n.defaultPrevented && n.detail > 1 && n.preventDefault());
|
|
382
365
|
}
|
|
383
366
|
}
|
|
384
367
|
));
|
|
385
|
-
|
|
386
|
-
var
|
|
387
|
-
function
|
|
368
|
+
oe.displayName = lr;
|
|
369
|
+
var pr = oe;
|
|
370
|
+
function fr(e) {
|
|
388
371
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
389
372
|
}
|
|
390
|
-
var
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
Licensed under the MIT License (MIT), see
|
|
394
|
-
http://jedwatson.github.io/classnames
|
|
395
|
-
*/
|
|
396
|
-
var G;
|
|
397
|
-
function cr() {
|
|
398
|
-
return G || (G = 1, (function(e) {
|
|
373
|
+
var G = { exports: {} }, X;
|
|
374
|
+
function dr() {
|
|
375
|
+
return X || (X = 1, (function(e) {
|
|
399
376
|
(function() {
|
|
400
377
|
var t = {}.hasOwnProperty;
|
|
401
378
|
function n() {
|
|
@@ -424,38 +401,32 @@ function cr() {
|
|
|
424
401
|
}
|
|
425
402
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
426
403
|
})();
|
|
427
|
-
})(
|
|
404
|
+
})(G)), G.exports;
|
|
428
405
|
}
|
|
429
|
-
var
|
|
430
|
-
const
|
|
406
|
+
var hr = dr();
|
|
407
|
+
const mr = /* @__PURE__ */ fr(hr), _r = {
|
|
431
408
|
"purpur-label": "_purpur-label_1x80u_1",
|
|
432
409
|
"purpur-label--negative": "_purpur-label--negative_1x80u_8",
|
|
433
410
|
"purpur-label--disabled": "_purpur-label--disabled_1x80u_11"
|
|
434
|
-
},
|
|
411
|
+
}, gr = mr.bind(_r), E = "purpur-label", vr = ({
|
|
435
412
|
children: e,
|
|
436
413
|
className: t,
|
|
437
414
|
disabled: n,
|
|
438
415
|
negative: a = !1,
|
|
439
416
|
...i
|
|
440
417
|
}) => {
|
|
441
|
-
const r =
|
|
442
|
-
[`${
|
|
443
|
-
[`${
|
|
418
|
+
const r = gr(t, E, {
|
|
419
|
+
[`${E}--disabled`]: n,
|
|
420
|
+
[`${E}--negative`]: a
|
|
444
421
|
});
|
|
445
|
-
return /* @__PURE__ */ p(
|
|
422
|
+
return /* @__PURE__ */ p(pr, { className: r, ...i, children: e });
|
|
446
423
|
};
|
|
447
|
-
function
|
|
424
|
+
function yr(e) {
|
|
448
425
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
449
426
|
}
|
|
450
|
-
var
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
Licensed under the MIT License (MIT), see
|
|
454
|
-
http://jedwatson.github.io/classnames
|
|
455
|
-
*/
|
|
456
|
-
var J;
|
|
457
|
-
function _r() {
|
|
458
|
-
return J || (J = 1, (function(e) {
|
|
427
|
+
var J = { exports: {} }, Q;
|
|
428
|
+
function br() {
|
|
429
|
+
return Q || (Q = 1, (function(e) {
|
|
459
430
|
(function() {
|
|
460
431
|
var t = {}.hasOwnProperty;
|
|
461
432
|
function n() {
|
|
@@ -484,10 +455,10 @@ function _r() {
|
|
|
484
455
|
}
|
|
485
456
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
486
457
|
})();
|
|
487
|
-
})(
|
|
458
|
+
})(J)), J.exports;
|
|
488
459
|
}
|
|
489
|
-
var
|
|
490
|
-
const
|
|
460
|
+
var xr = br();
|
|
461
|
+
const $r = /* @__PURE__ */ yr(xr), wr = {
|
|
491
462
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
492
463
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
493
464
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -502,63 +473,61 @@ const vr = /* @__PURE__ */ mr(gr), br = {
|
|
|
502
473
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
503
474
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
504
475
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
505
|
-
},
|
|
476
|
+
}, Sr = $r.bind(wr), Cr = {
|
|
506
477
|
PARAGRAPH100: "paragraph-100"
|
|
507
|
-
}, N = "purpur-paragraph",
|
|
478
|
+
}, N = "purpur-paragraph", ie = ({
|
|
508
479
|
children: e,
|
|
509
480
|
className: t,
|
|
510
481
|
disabled: n,
|
|
511
482
|
enableHyphenation: a = !1,
|
|
512
483
|
negative: i = !1,
|
|
513
|
-
variant: r =
|
|
484
|
+
variant: r = Cr.PARAGRAPH100,
|
|
514
485
|
...o
|
|
515
486
|
}) => {
|
|
516
|
-
const u =
|
|
487
|
+
const u = Sr(t, N, `${N}--${r}`, {
|
|
517
488
|
[`${N}--hyphens`]: a,
|
|
518
489
|
[`${N}--disabled`]: n,
|
|
519
490
|
[`${N}--negative`]: i
|
|
520
491
|
});
|
|
521
492
|
return /* @__PURE__ */ p("p", { ...o, className: u, children: e });
|
|
522
493
|
};
|
|
523
|
-
|
|
524
|
-
function
|
|
494
|
+
ie.displayName = "Paragraph";
|
|
495
|
+
function Y(e, t) {
|
|
525
496
|
if (typeof e == "function")
|
|
526
497
|
return e(t);
|
|
527
498
|
e != null && (e.current = t);
|
|
528
499
|
}
|
|
529
|
-
function
|
|
500
|
+
function ae(...e) {
|
|
530
501
|
return (t) => {
|
|
531
502
|
let n = !1;
|
|
532
503
|
const a = e.map((i) => {
|
|
533
|
-
const r =
|
|
504
|
+
const r = Y(i, t);
|
|
534
505
|
return !n && typeof r == "function" && (n = !0), r;
|
|
535
506
|
});
|
|
536
507
|
if (n)
|
|
537
508
|
return () => {
|
|
538
509
|
for (let i = 0; i < a.length; i++) {
|
|
539
510
|
const r = a[i];
|
|
540
|
-
typeof r == "function" ? r() :
|
|
511
|
+
typeof r == "function" ? r() : Y(e[i], null);
|
|
541
512
|
}
|
|
542
513
|
};
|
|
543
514
|
};
|
|
544
515
|
}
|
|
545
|
-
function
|
|
546
|
-
return s.useCallback(
|
|
516
|
+
function ue(...e) {
|
|
517
|
+
return s.useCallback(ae(...e), e);
|
|
547
518
|
}
|
|
548
|
-
function
|
|
519
|
+
function Nr(e, t = []) {
|
|
549
520
|
let n = [];
|
|
550
521
|
function a(r, o) {
|
|
551
522
|
const u = s.createContext(o), c = n.length;
|
|
552
523
|
n = [...n, o];
|
|
553
524
|
const l = (f) => {
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
return /* @__PURE__ */ p(v.Provider, { value: w, children: m });
|
|
525
|
+
const { scope: m, children: h, ..._ } = f, b = m?.[e]?.[c] || u, $ = s.useMemo(() => _, Object.values(_));
|
|
526
|
+
return /* @__PURE__ */ p(b.Provider, { value: $, children: h });
|
|
557
527
|
};
|
|
558
528
|
l.displayName = r + "Provider";
|
|
559
|
-
function d(f,
|
|
560
|
-
|
|
561
|
-
const m = ((v = h == null ? void 0 : h[e]) == null ? void 0 : v[c]) || u, _ = s.useContext(m);
|
|
529
|
+
function d(f, m) {
|
|
530
|
+
const h = m?.[e]?.[c] || u, _ = s.useContext(h);
|
|
562
531
|
if (_) return _;
|
|
563
532
|
if (o !== void 0) return o;
|
|
564
533
|
throw new Error(`\`${f}\` must be used within \`${r}\``);
|
|
@@ -568,16 +537,16 @@ function $r(e, t = []) {
|
|
|
568
537
|
const i = () => {
|
|
569
538
|
const r = n.map((o) => s.createContext(o));
|
|
570
539
|
return function(u) {
|
|
571
|
-
const c =
|
|
540
|
+
const c = u?.[e] || r;
|
|
572
541
|
return s.useMemo(
|
|
573
542
|
() => ({ [`__scope${e}`]: { ...u, [e]: c } }),
|
|
574
543
|
[u, c]
|
|
575
544
|
);
|
|
576
545
|
};
|
|
577
546
|
};
|
|
578
|
-
return i.scopeName = e, [a,
|
|
547
|
+
return i.scopeName = e, [a, kr(i, ...t)];
|
|
579
548
|
}
|
|
580
|
-
function
|
|
549
|
+
function kr(...e) {
|
|
581
550
|
const t = e[0];
|
|
582
551
|
if (e.length === 1) return t;
|
|
583
552
|
const n = () => {
|
|
@@ -595,28 +564,25 @@ function wr(...e) {
|
|
|
595
564
|
};
|
|
596
565
|
return n.scopeName = t.scopeName, n;
|
|
597
566
|
}
|
|
598
|
-
function
|
|
567
|
+
function ee(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
599
568
|
return function(i) {
|
|
600
|
-
if (e
|
|
601
|
-
return t
|
|
569
|
+
if (e?.(i), n === !1 || !i.defaultPrevented)
|
|
570
|
+
return t?.(i);
|
|
602
571
|
};
|
|
603
572
|
}
|
|
604
|
-
function
|
|
573
|
+
function se(e) {
|
|
605
574
|
const t = s.useRef(e);
|
|
606
575
|
return s.useEffect(() => {
|
|
607
576
|
t.current = e;
|
|
608
|
-
}), s.useMemo(() => (...n) =>
|
|
609
|
-
var a;
|
|
610
|
-
return (a = t.current) == null ? void 0 : a.call(t, ...n);
|
|
611
|
-
}, []);
|
|
577
|
+
}), s.useMemo(() => (...n) => t.current?.(...n), []);
|
|
612
578
|
}
|
|
613
|
-
function
|
|
579
|
+
function Or({
|
|
614
580
|
prop: e,
|
|
615
581
|
defaultProp: t,
|
|
616
582
|
onChange: n = () => {
|
|
617
583
|
}
|
|
618
584
|
}) {
|
|
619
|
-
const [a, i] =
|
|
585
|
+
const [a, i] = Pr({ defaultProp: t, onChange: n }), r = e !== void 0, o = r ? e : a, u = se(n), c = s.useCallback(
|
|
620
586
|
(l) => {
|
|
621
587
|
if (r) {
|
|
622
588
|
const f = typeof l == "function" ? l(e) : l;
|
|
@@ -628,24 +594,24 @@ function Sr({
|
|
|
628
594
|
);
|
|
629
595
|
return [o, c];
|
|
630
596
|
}
|
|
631
|
-
function
|
|
597
|
+
function Pr({
|
|
632
598
|
defaultProp: e,
|
|
633
599
|
onChange: t
|
|
634
600
|
}) {
|
|
635
|
-
const n = s.useState(e), [a] = n, i = s.useRef(a), r =
|
|
601
|
+
const n = s.useState(e), [a] = n, i = s.useRef(a), r = se(t);
|
|
636
602
|
return s.useEffect(() => {
|
|
637
603
|
i.current !== a && (r(a), i.current = a);
|
|
638
604
|
}, [a, i, r]), n;
|
|
639
605
|
}
|
|
640
|
-
function
|
|
606
|
+
function Ar(e) {
|
|
641
607
|
const t = s.useRef({ value: e, previous: e });
|
|
642
608
|
return s.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
|
|
643
609
|
}
|
|
644
|
-
var
|
|
610
|
+
var D = globalThis?.document ? s.useLayoutEffect : () => {
|
|
645
611
|
};
|
|
646
|
-
function
|
|
612
|
+
function Rr(e) {
|
|
647
613
|
const [t, n] = s.useState(void 0);
|
|
648
|
-
return
|
|
614
|
+
return D(() => {
|
|
649
615
|
if (e) {
|
|
650
616
|
n({ width: e.offsetWidth, height: e.offsetHeight });
|
|
651
617
|
const a = new ResizeObserver((i) => {
|
|
@@ -665,16 +631,16 @@ function kr(e) {
|
|
|
665
631
|
n(void 0);
|
|
666
632
|
}, [e]), t;
|
|
667
633
|
}
|
|
668
|
-
function
|
|
634
|
+
function Er(e, t) {
|
|
669
635
|
return s.useReducer((n, a) => t[n][a] ?? n, e);
|
|
670
636
|
}
|
|
671
|
-
var
|
|
672
|
-
const { present: t, children: n } = e, a =
|
|
637
|
+
var ce = (e) => {
|
|
638
|
+
const { present: t, children: n } = e, a = Mr(t), i = typeof n == "function" ? n({ present: a.isPresent }) : s.Children.only(n), r = ue(a.ref, jr(i));
|
|
673
639
|
return typeof n == "function" || a.isPresent ? s.cloneElement(i, { ref: r }) : null;
|
|
674
640
|
};
|
|
675
|
-
|
|
676
|
-
function
|
|
677
|
-
const [t, n] = s.useState(), a = s.useRef({}), i = s.useRef(e), r = s.useRef("none"), o = e ? "mounted" : "unmounted", [u, c] =
|
|
641
|
+
ce.displayName = "Presence";
|
|
642
|
+
function Mr(e) {
|
|
643
|
+
const [t, n] = s.useState(), a = s.useRef({}), i = s.useRef(e), r = s.useRef("none"), o = e ? "mounted" : "unmounted", [u, c] = Er(o, {
|
|
678
644
|
mounted: {
|
|
679
645
|
UNMOUNT: "unmounted",
|
|
680
646
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -690,28 +656,28 @@ function Pr(e) {
|
|
|
690
656
|
return s.useEffect(() => {
|
|
691
657
|
const l = k(a.current);
|
|
692
658
|
r.current = u === "mounted" ? l : "none";
|
|
693
|
-
}, [u]),
|
|
659
|
+
}, [u]), D(() => {
|
|
694
660
|
const l = a.current, d = i.current;
|
|
695
661
|
if (d !== e) {
|
|
696
|
-
const
|
|
697
|
-
e ? c("MOUNT") :
|
|
662
|
+
const m = r.current, h = k(l);
|
|
663
|
+
e ? c("MOUNT") : h === "none" || l?.display === "none" ? c("UNMOUNT") : c(d && m !== h ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
|
|
698
664
|
}
|
|
699
|
-
}, [e, c]),
|
|
665
|
+
}, [e, c]), D(() => {
|
|
700
666
|
if (t) {
|
|
701
667
|
let l;
|
|
702
|
-
const d = t.ownerDocument.defaultView ?? window, f = (
|
|
703
|
-
const
|
|
704
|
-
if (
|
|
705
|
-
const
|
|
668
|
+
const d = t.ownerDocument.defaultView ?? window, f = (h) => {
|
|
669
|
+
const b = k(a.current).includes(h.animationName);
|
|
670
|
+
if (h.target === t && b && (c("ANIMATION_END"), !i.current)) {
|
|
671
|
+
const $ = t.style.animationFillMode;
|
|
706
672
|
t.style.animationFillMode = "forwards", l = d.setTimeout(() => {
|
|
707
|
-
t.style.animationFillMode === "forwards" && (t.style.animationFillMode =
|
|
673
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = $);
|
|
708
674
|
});
|
|
709
675
|
}
|
|
710
|
-
},
|
|
711
|
-
|
|
676
|
+
}, m = (h) => {
|
|
677
|
+
h.target === t && (r.current = k(a.current));
|
|
712
678
|
};
|
|
713
|
-
return t.addEventListener("animationstart",
|
|
714
|
-
d.clearTimeout(l), t.removeEventListener("animationstart",
|
|
679
|
+
return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
|
|
680
|
+
d.clearTimeout(l), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
|
|
715
681
|
};
|
|
716
682
|
} else
|
|
717
683
|
c("ANIMATION_END");
|
|
@@ -723,17 +689,16 @@ function Pr(e) {
|
|
|
723
689
|
};
|
|
724
690
|
}
|
|
725
691
|
function k(e) {
|
|
726
|
-
return
|
|
692
|
+
return e?.animationName || "none";
|
|
727
693
|
}
|
|
728
|
-
function
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
return n ? e.ref : (t = (i = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : i.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
694
|
+
function jr(e) {
|
|
695
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
696
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
732
697
|
}
|
|
733
698
|
// @__NO_SIDE_EFFECTS__
|
|
734
|
-
function
|
|
735
|
-
const t = /* @__PURE__ */
|
|
736
|
-
const { children: r, ...o } = a, u = s.Children.toArray(r), c = u.find(
|
|
699
|
+
function Dr(e) {
|
|
700
|
+
const t = /* @__PURE__ */ Ir(e), n = s.forwardRef((a, i) => {
|
|
701
|
+
const { children: r, ...o } = a, u = s.Children.toArray(r), c = u.find(zr);
|
|
737
702
|
if (c) {
|
|
738
703
|
const l = c.props.children, d = u.map((f) => f === c ? s.Children.count(l) > 1 ? s.Children.only(null) : s.isValidElement(l) ? l.props.children : null : f);
|
|
739
704
|
return /* @__PURE__ */ p(t, { ...o, ref: i, children: s.isValidElement(l) ? s.cloneElement(l, void 0, d) : null });
|
|
@@ -743,22 +708,22 @@ function Rr(e) {
|
|
|
743
708
|
return n.displayName = `${e}.Slot`, n;
|
|
744
709
|
}
|
|
745
710
|
// @__NO_SIDE_EFFECTS__
|
|
746
|
-
function
|
|
711
|
+
function Ir(e) {
|
|
747
712
|
const t = s.forwardRef((n, a) => {
|
|
748
713
|
const { children: i, ...r } = n;
|
|
749
714
|
if (s.isValidElement(i)) {
|
|
750
|
-
const o =
|
|
751
|
-
return i.type !== s.Fragment && (u.ref = a ?
|
|
715
|
+
const o = Wr(i), u = Br(r, i.props);
|
|
716
|
+
return i.type !== s.Fragment && (u.ref = a ? ae(a, o) : o), s.cloneElement(i, u);
|
|
752
717
|
}
|
|
753
718
|
return s.Children.count(i) > 1 ? s.Children.only(null) : null;
|
|
754
719
|
});
|
|
755
720
|
return t.displayName = `${e}.SlotClone`, t;
|
|
756
721
|
}
|
|
757
|
-
var
|
|
758
|
-
function
|
|
759
|
-
return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
722
|
+
var qr = Symbol("radix.slottable");
|
|
723
|
+
function zr(e) {
|
|
724
|
+
return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === qr;
|
|
760
725
|
}
|
|
761
|
-
function
|
|
726
|
+
function Br(e, t) {
|
|
762
727
|
const n = { ...t };
|
|
763
728
|
for (const a in t) {
|
|
764
729
|
const i = e[a], r = t[a];
|
|
@@ -768,12 +733,11 @@ function Dr(e, t) {
|
|
|
768
733
|
}
|
|
769
734
|
return { ...e, ...n };
|
|
770
735
|
}
|
|
771
|
-
function
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
return n ? e.ref : (t = (i = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : i.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
736
|
+
function Wr(e) {
|
|
737
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
738
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
775
739
|
}
|
|
776
|
-
var
|
|
740
|
+
var Lr = [
|
|
777
741
|
"a",
|
|
778
742
|
"button",
|
|
779
743
|
"div",
|
|
@@ -790,13 +754,13 @@ var qr = [
|
|
|
790
754
|
"span",
|
|
791
755
|
"svg",
|
|
792
756
|
"ul"
|
|
793
|
-
],
|
|
794
|
-
const n = /* @__PURE__ */
|
|
757
|
+
], le = Lr.reduce((e, t) => {
|
|
758
|
+
const n = /* @__PURE__ */ Dr(`Primitive.${t}`), a = s.forwardRef((i, r) => {
|
|
795
759
|
const { asChild: o, ...u } = i, c = o ? n : t;
|
|
796
760
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(c, { ...u, ref: r });
|
|
797
761
|
});
|
|
798
762
|
return a.displayName = `Primitive.${t}`, { ...e, [t]: a };
|
|
799
|
-
}, {}),
|
|
763
|
+
}, {}), I = "Checkbox", [Hr] = Nr(I), [Tr, Ur] = Hr(I), pe = s.forwardRef(
|
|
800
764
|
(e, t) => {
|
|
801
765
|
const {
|
|
802
766
|
__scopeCheckbox: n,
|
|
@@ -809,65 +773,65 @@ var qr = [
|
|
|
809
773
|
onCheckedChange: l,
|
|
810
774
|
form: d,
|
|
811
775
|
...f
|
|
812
|
-
} = e, [
|
|
776
|
+
} = e, [m, h] = s.useState(null), _ = ue(t, (g) => h(g)), b = s.useRef(!1), $ = m ? d || !!m.closest("form") : !0, [w = !1, P] = Or({
|
|
813
777
|
prop: i,
|
|
814
778
|
defaultProp: r,
|
|
815
779
|
onChange: l
|
|
816
|
-
}),
|
|
780
|
+
}), me = s.useRef(w);
|
|
817
781
|
return s.useEffect(() => {
|
|
818
|
-
const g =
|
|
782
|
+
const g = m?.form;
|
|
819
783
|
if (g) {
|
|
820
|
-
const C = () =>
|
|
784
|
+
const C = () => P(me.current);
|
|
821
785
|
return g.addEventListener("reset", C), () => g.removeEventListener("reset", C);
|
|
822
786
|
}
|
|
823
|
-
}, [
|
|
787
|
+
}, [m, P]), /* @__PURE__ */ S(Tr, { scope: n, state: w, disabled: u, children: [
|
|
824
788
|
/* @__PURE__ */ p(
|
|
825
|
-
|
|
789
|
+
le.button,
|
|
826
790
|
{
|
|
827
791
|
type: "button",
|
|
828
792
|
role: "checkbox",
|
|
829
|
-
"aria-checked":
|
|
793
|
+
"aria-checked": y(w) ? "mixed" : w,
|
|
830
794
|
"aria-required": o,
|
|
831
|
-
"data-state":
|
|
795
|
+
"data-state": he(w),
|
|
832
796
|
"data-disabled": u ? "" : void 0,
|
|
833
797
|
disabled: u,
|
|
834
798
|
value: c,
|
|
835
799
|
...f,
|
|
836
800
|
ref: _,
|
|
837
|
-
onKeyDown:
|
|
801
|
+
onKeyDown: ee(e.onKeyDown, (g) => {
|
|
838
802
|
g.key === "Enter" && g.preventDefault();
|
|
839
803
|
}),
|
|
840
|
-
onClick:
|
|
841
|
-
|
|
804
|
+
onClick: ee(e.onClick, (g) => {
|
|
805
|
+
P((C) => y(C) ? !0 : !C), $ && (b.current = g.isPropagationStopped(), b.current || g.stopPropagation());
|
|
842
806
|
})
|
|
843
807
|
}
|
|
844
808
|
),
|
|
845
|
-
|
|
846
|
-
|
|
809
|
+
$ && /* @__PURE__ */ p(
|
|
810
|
+
Vr,
|
|
847
811
|
{
|
|
848
|
-
control:
|
|
849
|
-
bubbles: !
|
|
812
|
+
control: m,
|
|
813
|
+
bubbles: !b.current,
|
|
850
814
|
name: a,
|
|
851
815
|
value: c,
|
|
852
|
-
checked:
|
|
816
|
+
checked: w,
|
|
853
817
|
required: o,
|
|
854
818
|
disabled: u,
|
|
855
819
|
form: d,
|
|
856
820
|
style: { transform: "translateX(-100%)" },
|
|
857
|
-
defaultChecked:
|
|
821
|
+
defaultChecked: y(r) ? !1 : r
|
|
858
822
|
}
|
|
859
823
|
)
|
|
860
824
|
] });
|
|
861
825
|
}
|
|
862
826
|
);
|
|
863
|
-
|
|
864
|
-
var
|
|
827
|
+
pe.displayName = I;
|
|
828
|
+
var fe = "CheckboxIndicator", de = s.forwardRef(
|
|
865
829
|
(e, t) => {
|
|
866
|
-
const { __scopeCheckbox: n, forceMount: a, ...i } = e, r =
|
|
867
|
-
return /* @__PURE__ */ p(
|
|
868
|
-
|
|
830
|
+
const { __scopeCheckbox: n, forceMount: a, ...i } = e, r = Ur(fe, n);
|
|
831
|
+
return /* @__PURE__ */ p(ce, { present: a || y(r.state) || r.state === !0, children: /* @__PURE__ */ p(
|
|
832
|
+
le.span,
|
|
869
833
|
{
|
|
870
|
-
"data-state":
|
|
834
|
+
"data-state": he(r.state),
|
|
871
835
|
"data-disabled": r.disabled ? "" : void 0,
|
|
872
836
|
...i,
|
|
873
837
|
ref: t,
|
|
@@ -876,17 +840,17 @@ var le = "CheckboxIndicator", pe = s.forwardRef(
|
|
|
876
840
|
) });
|
|
877
841
|
}
|
|
878
842
|
);
|
|
879
|
-
|
|
880
|
-
var
|
|
881
|
-
const { control: t, checked: n, bubbles: a = !0, defaultChecked: i, ...r } = e, o = s.useRef(null), u =
|
|
843
|
+
de.displayName = fe;
|
|
844
|
+
var Vr = (e) => {
|
|
845
|
+
const { control: t, checked: n, bubbles: a = !0, defaultChecked: i, ...r } = e, o = s.useRef(null), u = Ar(n), c = Rr(t);
|
|
882
846
|
s.useEffect(() => {
|
|
883
|
-
const d = o.current, f = window.HTMLInputElement.prototype,
|
|
884
|
-
if (u !== n &&
|
|
847
|
+
const d = o.current, f = window.HTMLInputElement.prototype, h = Object.getOwnPropertyDescriptor(f, "checked").set;
|
|
848
|
+
if (u !== n && h) {
|
|
885
849
|
const _ = new Event("click", { bubbles: a });
|
|
886
|
-
d.indeterminate =
|
|
850
|
+
d.indeterminate = y(n), h.call(d, y(n) ? !1 : n), d.dispatchEvent(_);
|
|
887
851
|
}
|
|
888
852
|
}, [u, n, a]);
|
|
889
|
-
const l = s.useRef(
|
|
853
|
+
const l = s.useRef(y(n) ? !1 : n);
|
|
890
854
|
return /* @__PURE__ */ p(
|
|
891
855
|
"input",
|
|
892
856
|
{
|
|
@@ -907,25 +871,20 @@ var Lr = (e) => {
|
|
|
907
871
|
}
|
|
908
872
|
);
|
|
909
873
|
};
|
|
910
|
-
function
|
|
874
|
+
function y(e) {
|
|
911
875
|
return e === "indeterminate";
|
|
912
876
|
}
|
|
913
|
-
function
|
|
914
|
-
return
|
|
877
|
+
function he(e) {
|
|
878
|
+
return y(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
915
879
|
}
|
|
916
|
-
var
|
|
917
|
-
function
|
|
880
|
+
var Fr = pe, Zr = de;
|
|
881
|
+
function Kr(e) {
|
|
918
882
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
919
883
|
}
|
|
920
|
-
var
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
http://jedwatson.github.io/classnames
|
|
925
|
-
*/
|
|
926
|
-
var ee;
|
|
927
|
-
function Fr() {
|
|
928
|
-
return ee || (ee = 1, (function(e) {
|
|
884
|
+
var M = { exports: {} };
|
|
885
|
+
var re;
|
|
886
|
+
function Gr() {
|
|
887
|
+
return re || (re = 1, (function(e) {
|
|
929
888
|
(function() {
|
|
930
889
|
var t = {}.hasOwnProperty;
|
|
931
890
|
function n() {
|
|
@@ -954,10 +913,10 @@ function Fr() {
|
|
|
954
913
|
}
|
|
955
914
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
956
915
|
})();
|
|
957
|
-
})(
|
|
916
|
+
})(M)), M.exports;
|
|
958
917
|
}
|
|
959
|
-
var
|
|
960
|
-
const
|
|
918
|
+
var Xr = Gr();
|
|
919
|
+
const Jr = /* @__PURE__ */ Kr(Xr), Qr = {
|
|
961
920
|
"purpur-checkbox": "_purpur-checkbox_150ck_1",
|
|
962
921
|
"purpur-checkbox__box": "_purpur-checkbox__box_150ck_7",
|
|
963
922
|
"purpur-checkbox--error": "_purpur-checkbox--error_150ck_16",
|
|
@@ -966,7 +925,7 @@ const Hr = /* @__PURE__ */ Vr(Zr), Kr = {
|
|
|
966
925
|
"purpur-checkbox__label-container": "_purpur-checkbox__label-container_150ck_70",
|
|
967
926
|
"purpur-checkbox__wrapper": "_purpur-checkbox__wrapper_150ck_76",
|
|
968
927
|
"purpur-checkbox__container": "_purpur-checkbox__container_150ck_82"
|
|
969
|
-
},
|
|
928
|
+
}, x = Jr.bind(Qr), nt = ["indeterminate", !0, !1], v = "purpur-checkbox", Yr = _e(
|
|
970
929
|
({
|
|
971
930
|
["data-testid"]: e,
|
|
972
931
|
checked: t,
|
|
@@ -979,57 +938,57 @@ const Hr = /* @__PURE__ */ Vr(Zr), Kr = {
|
|
|
979
938
|
...c
|
|
980
939
|
}, l) => {
|
|
981
940
|
const d = i && !t, f = a && !t;
|
|
982
|
-
return /* @__PURE__ */ S("div", { className:
|
|
983
|
-
/* @__PURE__ */ S("div", { className:
|
|
941
|
+
return /* @__PURE__ */ S("div", { className: x([`${v}__wrapper`, n]), children: [
|
|
942
|
+
/* @__PURE__ */ S("div", { className: x([`${v}__container`, n]), children: [
|
|
984
943
|
/* @__PURE__ */ p(
|
|
985
|
-
|
|
944
|
+
Fr,
|
|
986
945
|
{
|
|
987
946
|
...c,
|
|
988
947
|
checked: t,
|
|
989
|
-
className:
|
|
990
|
-
|
|
948
|
+
className: x([
|
|
949
|
+
v,
|
|
991
950
|
{
|
|
992
|
-
[`${
|
|
993
|
-
[`${
|
|
951
|
+
[`${v}--error`]: d,
|
|
952
|
+
[`${v}--error-checkbox`]: f
|
|
994
953
|
}
|
|
995
954
|
]),
|
|
996
955
|
"data-testid": e,
|
|
997
956
|
onCheckedChange: u,
|
|
998
957
|
ref: l,
|
|
999
|
-
children: /* @__PURE__ */ p("span", { className:
|
|
1000
|
-
|
|
958
|
+
children: /* @__PURE__ */ p("span", { className: x(`${v}__box`), children: /* @__PURE__ */ p(Zr, { className: x(`${v}__indicator`), children: t === "indeterminate" ? /* @__PURE__ */ p(
|
|
959
|
+
j,
|
|
1001
960
|
{
|
|
1002
961
|
"data-testid": e && `${e}-checked-icon`,
|
|
1003
962
|
size: "xs",
|
|
1004
|
-
svg:
|
|
963
|
+
svg: Qe
|
|
1005
964
|
}
|
|
1006
965
|
) : /* @__PURE__ */ p(
|
|
1007
|
-
|
|
966
|
+
j,
|
|
1008
967
|
{
|
|
1009
968
|
"data-testid": e && `${e}-indeterminate-icon`,
|
|
1010
969
|
size: "xs",
|
|
1011
|
-
svg:
|
|
970
|
+
svg: Je
|
|
1012
971
|
}
|
|
1013
972
|
) }) })
|
|
1014
973
|
}
|
|
1015
974
|
),
|
|
1016
|
-
/* @__PURE__ */ S("span", { className:
|
|
975
|
+
/* @__PURE__ */ S("span", { className: x(`${v}__label-container`), children: [
|
|
1017
976
|
r && /* @__PURE__ */ p(
|
|
1018
|
-
|
|
977
|
+
vr,
|
|
1019
978
|
{
|
|
1020
979
|
htmlFor: c.id,
|
|
1021
980
|
"data-testid": e && `${e}-label`,
|
|
1022
981
|
disabled: c.disabled,
|
|
1023
|
-
children: /* @__PURE__ */ S(
|
|
982
|
+
children: /* @__PURE__ */ S(ie, { variant: "paragraph-100", disabled: c.disabled, children: [
|
|
1024
983
|
c.required && /* @__PURE__ */ p("span", { "aria-hidden": !0, children: "* " }),
|
|
1025
984
|
r
|
|
1026
985
|
] })
|
|
1027
986
|
}
|
|
1028
987
|
),
|
|
1029
988
|
o && /* @__PURE__ */ p(
|
|
1030
|
-
|
|
989
|
+
We,
|
|
1031
990
|
{
|
|
1032
|
-
className:
|
|
991
|
+
className: x(`${v}__helper`),
|
|
1033
992
|
"data-testid": e && `${e}-helper-text`,
|
|
1034
993
|
disabled: c.disabled,
|
|
1035
994
|
id: `${c.id}-helper-text`,
|
|
@@ -1038,13 +997,13 @@ const Hr = /* @__PURE__ */ Vr(Zr), Kr = {
|
|
|
1038
997
|
)
|
|
1039
998
|
] })
|
|
1040
999
|
] }),
|
|
1041
|
-
d && /* @__PURE__ */ p(
|
|
1000
|
+
d && /* @__PURE__ */ p(Me, { "data-testid": e && `${e}-error-text`, children: i })
|
|
1042
1001
|
] });
|
|
1043
1002
|
}
|
|
1044
1003
|
);
|
|
1045
|
-
|
|
1004
|
+
Yr.displayName = "Checkbox";
|
|
1046
1005
|
export {
|
|
1047
|
-
|
|
1048
|
-
|
|
1006
|
+
Yr as Checkbox,
|
|
1007
|
+
nt as checkedState
|
|
1049
1008
|
};
|
|
1050
1009
|
//# sourceMappingURL=checkbox.es.js.map
|