@purpurds/checkbox 5.14.0 → 5.15.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 +7 -7
- package/dist/checkbox.cjs.js.map +1 -1
- package/dist/checkbox.es.js +236 -258
- package/dist/checkbox.es.js.map +1 -1
- package/package.json +6 -6
package/dist/checkbox.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { flushSync as
|
|
4
|
-
function
|
|
1
|
+
import { jsxs as T, jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g, Children as v, isValidElement as y, createElement as p, cloneElement as j, useEffect as C, Fragment as Q, useCallback as Z, createContext as V, useMemo as M, useContext as _e, useRef as $, useState as L, useLayoutEffect as be, useReducer as ge } from "react";
|
|
3
|
+
import { flushSync as $e } from "react-dom";
|
|
4
|
+
function xe(e) {
|
|
5
5
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
6
|
}
|
|
7
|
-
var
|
|
7
|
+
var ee = { exports: {} };
|
|
8
8
|
/*!
|
|
9
9
|
Copyright (c) 2018 Jed Watson.
|
|
10
10
|
Licensed under the MIT License (MIT), see
|
|
@@ -39,9 +39,9 @@ var te = { exports: {} };
|
|
|
39
39
|
}
|
|
40
40
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
41
41
|
})();
|
|
42
|
-
})(
|
|
43
|
-
var
|
|
44
|
-
const
|
|
42
|
+
})(ee);
|
|
43
|
+
var ye = ee.exports;
|
|
44
|
+
const Ne = /* @__PURE__ */ xe(ye), we = {
|
|
45
45
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
46
46
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
47
47
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -49,20 +49,20 @@ const Se = /* @__PURE__ */ Ne(we), Ae = {
|
|
|
49
49
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
50
50
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
51
51
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
52
|
-
},
|
|
52
|
+
}, Se = {
|
|
53
53
|
name: "error-filled",
|
|
54
54
|
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>',
|
|
55
55
|
keywords: ["error-filled"],
|
|
56
56
|
category: "status"
|
|
57
|
-
},
|
|
57
|
+
}, Ae = Ne.bind(we), G = "purpur-icon", Ce = "md", Pe = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), ke = ({ content: e = "", title: n } = {}) => {
|
|
58
58
|
const t = [
|
|
59
59
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
60
60
|
{ name: "fill", value: "currentColor" },
|
|
61
61
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
62
62
|
n ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
63
63
|
], a = n ? `<title>${n}</title>` : "";
|
|
64
|
-
return `<svg ${
|
|
65
|
-
},
|
|
64
|
+
return `<svg ${Pe(t)}>${a}${e}</svg>`;
|
|
65
|
+
}, Oe = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Ee = ({
|
|
66
66
|
["data-testid"]: e,
|
|
67
67
|
svg: n,
|
|
68
68
|
allyTitle: t,
|
|
@@ -70,10 +70,10 @@ const Se = /* @__PURE__ */ Ne(we), Ae = {
|
|
|
70
70
|
size: u = Ce,
|
|
71
71
|
...r
|
|
72
72
|
}) => {
|
|
73
|
-
const o =
|
|
74
|
-
content:
|
|
73
|
+
const o = ke({
|
|
74
|
+
content: Oe(n.svg),
|
|
75
75
|
title: t
|
|
76
|
-
}), i =
|
|
76
|
+
}), i = Ae(a, G, `${G}--${u}`);
|
|
77
77
|
return /* @__PURE__ */ f(
|
|
78
78
|
"span",
|
|
79
79
|
{
|
|
@@ -85,10 +85,10 @@ const Se = /* @__PURE__ */ Ne(we), Ae = {
|
|
|
85
85
|
}
|
|
86
86
|
);
|
|
87
87
|
};
|
|
88
|
-
function
|
|
88
|
+
function Me(e) {
|
|
89
89
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
90
90
|
}
|
|
91
|
-
var
|
|
91
|
+
var re = { exports: {} };
|
|
92
92
|
/*!
|
|
93
93
|
Copyright (c) 2018 Jed Watson.
|
|
94
94
|
Licensed under the MIT License (MIT), see
|
|
@@ -123,35 +123,35 @@ var ne = { exports: {} };
|
|
|
123
123
|
}
|
|
124
124
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
125
125
|
})();
|
|
126
|
-
})(
|
|
127
|
-
var
|
|
128
|
-
const
|
|
126
|
+
})(re);
|
|
127
|
+
var je = re.exports;
|
|
128
|
+
const Re = /* @__PURE__ */ Me(je), K = {
|
|
129
129
|
"purpur-field-error-text": "_purpur-field-error-text_1u768_1",
|
|
130
130
|
"purpur-field-error-text__icon": "_purpur-field-error-text__icon_1u768_12"
|
|
131
|
-
},
|
|
131
|
+
}, X = "purpur-field-error-text", De = ({
|
|
132
132
|
["data-testid"]: e,
|
|
133
133
|
children: n,
|
|
134
134
|
className: t,
|
|
135
135
|
relevant: a = "additions text",
|
|
136
136
|
...u
|
|
137
|
-
}) => /* @__PURE__ */
|
|
137
|
+
}) => /* @__PURE__ */ T(
|
|
138
138
|
"div",
|
|
139
139
|
{
|
|
140
|
-
className:
|
|
140
|
+
className: Re([t, K[X]]),
|
|
141
141
|
"data-testid": e,
|
|
142
142
|
"aria-live": "assertive",
|
|
143
143
|
"aria-relevant": a,
|
|
144
144
|
...u,
|
|
145
145
|
children: [
|
|
146
|
-
/* @__PURE__ */ f(
|
|
146
|
+
/* @__PURE__ */ f(Ee, { svg: Se, size: "xs", className: K[`${X}__icon`] }),
|
|
147
147
|
n
|
|
148
148
|
]
|
|
149
149
|
}
|
|
150
150
|
);
|
|
151
|
-
function
|
|
151
|
+
function Le(e) {
|
|
152
152
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
153
153
|
}
|
|
154
|
-
var
|
|
154
|
+
var te = { exports: {} };
|
|
155
155
|
/*!
|
|
156
156
|
Copyright (c) 2018 Jed Watson.
|
|
157
157
|
Licensed under the MIT License (MIT), see
|
|
@@ -186,9 +186,9 @@ var oe = { exports: {} };
|
|
|
186
186
|
}
|
|
187
187
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
188
188
|
})();
|
|
189
|
-
})(
|
|
190
|
-
var
|
|
191
|
-
const
|
|
189
|
+
})(te);
|
|
190
|
+
var qe = te.exports;
|
|
191
|
+
const Ie = /* @__PURE__ */ Le(qe), Be = {
|
|
192
192
|
"purpur-icon": "_purpur-icon_8u1lq_1",
|
|
193
193
|
"purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
|
|
194
194
|
"purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
|
|
@@ -196,36 +196,36 @@ const ze = /* @__PURE__ */ Ie(Be), Te = {
|
|
|
196
196
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
197
197
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
198
198
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
199
|
-
},
|
|
199
|
+
}, ze = {
|
|
200
200
|
name: "checkmark-bold",
|
|
201
201
|
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>',
|
|
202
202
|
keywords: ["checkmark-bold"],
|
|
203
203
|
category: "utility"
|
|
204
|
-
},
|
|
204
|
+
}, Te = {
|
|
205
205
|
name: "minus-bold",
|
|
206
206
|
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>',
|
|
207
207
|
keywords: ["minus-bold"],
|
|
208
208
|
category: "utility"
|
|
209
|
-
},
|
|
209
|
+
}, Ue = Ie.bind(Be), W = "purpur-icon", He = "md", Fe = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), Ze = ({ content: e = "", title: n } = {}) => {
|
|
210
210
|
const t = [
|
|
211
211
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
212
212
|
{ name: "fill", value: "currentColor" },
|
|
213
213
|
{ name: "viewBox", value: "0 0 24 24" },
|
|
214
214
|
n ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
|
|
215
215
|
], a = n ? `<title>${n}</title>` : "";
|
|
216
|
-
return `<svg ${
|
|
217
|
-
},
|
|
216
|
+
return `<svg ${Fe(t)}>${a}${e}</svg>`;
|
|
217
|
+
}, Ve = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), J = ({
|
|
218
218
|
["data-testid"]: e,
|
|
219
219
|
svg: n,
|
|
220
220
|
allyTitle: t,
|
|
221
221
|
className: a,
|
|
222
|
-
size: u =
|
|
222
|
+
size: u = He,
|
|
223
223
|
...r
|
|
224
224
|
}) => {
|
|
225
|
-
const o =
|
|
226
|
-
content:
|
|
225
|
+
const o = Ze({
|
|
226
|
+
content: Ve(n.svg),
|
|
227
227
|
title: t
|
|
228
|
-
}), i =
|
|
228
|
+
}), i = Ue(a, W, `${W}--${u}`);
|
|
229
229
|
return /* @__PURE__ */ f(
|
|
230
230
|
"span",
|
|
231
231
|
{
|
|
@@ -237,60 +237,49 @@ const ze = /* @__PURE__ */ Ie(Be), Te = {
|
|
|
237
237
|
}
|
|
238
238
|
);
|
|
239
239
|
};
|
|
240
|
-
function
|
|
241
|
-
return
|
|
240
|
+
function P() {
|
|
241
|
+
return P = Object.assign ? Object.assign.bind() : function(e) {
|
|
242
242
|
for (var n = 1; n < arguments.length; n++) {
|
|
243
243
|
var t = arguments[n];
|
|
244
|
-
for (var a in t)
|
|
245
|
-
Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
|
|
244
|
+
for (var a in t) ({}).hasOwnProperty.call(t, a) && (e[a] = t[a]);
|
|
246
245
|
}
|
|
247
246
|
return e;
|
|
248
|
-
},
|
|
247
|
+
}, P.apply(null, arguments);
|
|
249
248
|
}
|
|
250
|
-
function
|
|
251
|
-
return j = Object.assign ? Object.assign.bind() : function(e) {
|
|
252
|
-
for (var n = 1; n < arguments.length; n++) {
|
|
253
|
-
var t = arguments[n];
|
|
254
|
-
for (var a in t)
|
|
255
|
-
Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
|
|
256
|
-
}
|
|
257
|
-
return e;
|
|
258
|
-
}, j.apply(this, arguments);
|
|
259
|
-
}
|
|
260
|
-
function Xe(e, n) {
|
|
249
|
+
function Ge(e, n) {
|
|
261
250
|
typeof e == "function" ? e(n) : e != null && (e.current = n);
|
|
262
251
|
}
|
|
263
|
-
function
|
|
252
|
+
function Ke(...e) {
|
|
264
253
|
return (n) => e.forEach(
|
|
265
|
-
(t) =>
|
|
254
|
+
(t) => Ge(t, n)
|
|
266
255
|
);
|
|
267
256
|
}
|
|
268
|
-
const
|
|
269
|
-
const { children: t, ...a } = e, u = v.toArray(t), r = u.find(
|
|
257
|
+
const ne = /* @__PURE__ */ g((e, n) => {
|
|
258
|
+
const { children: t, ...a } = e, u = v.toArray(t), r = u.find(We);
|
|
270
259
|
if (r) {
|
|
271
|
-
const o = r.props.children, i = u.map((c) => c === r ? v.count(o) > 1 ? v.only(null) : /* @__PURE__ */
|
|
272
|
-
return /* @__PURE__ */ p(
|
|
260
|
+
const o = r.props.children, i = u.map((c) => c === r ? v.count(o) > 1 ? v.only(null) : /* @__PURE__ */ y(o) ? o.props.children : null : c);
|
|
261
|
+
return /* @__PURE__ */ p(U, P({}, a, {
|
|
273
262
|
ref: n
|
|
274
|
-
}), /* @__PURE__ */
|
|
263
|
+
}), /* @__PURE__ */ y(o) ? /* @__PURE__ */ j(o, void 0, i) : null);
|
|
275
264
|
}
|
|
276
|
-
return /* @__PURE__ */ p(
|
|
265
|
+
return /* @__PURE__ */ p(U, P({}, a, {
|
|
277
266
|
ref: n
|
|
278
267
|
}), t);
|
|
279
268
|
});
|
|
280
|
-
|
|
281
|
-
const
|
|
269
|
+
ne.displayName = "Slot";
|
|
270
|
+
const U = /* @__PURE__ */ g((e, n) => {
|
|
282
271
|
const { children: t, ...a } = e;
|
|
283
|
-
return /* @__PURE__ */
|
|
284
|
-
...
|
|
285
|
-
ref: n ?
|
|
272
|
+
return /* @__PURE__ */ y(t) ? /* @__PURE__ */ j(t, {
|
|
273
|
+
...Je(a, t.props),
|
|
274
|
+
ref: n ? Ke(n, t.ref) : t.ref
|
|
286
275
|
}) : v.count(t) > 1 ? v.only(null) : null;
|
|
287
276
|
});
|
|
288
|
-
|
|
289
|
-
const
|
|
290
|
-
function
|
|
291
|
-
return /* @__PURE__ */
|
|
277
|
+
U.displayName = "SlotClone";
|
|
278
|
+
const Xe = ({ children: e }) => /* @__PURE__ */ p(Q, null, e);
|
|
279
|
+
function We(e) {
|
|
280
|
+
return /* @__PURE__ */ y(e) && e.type === Xe;
|
|
292
281
|
}
|
|
293
|
-
function
|
|
282
|
+
function Je(e, n) {
|
|
294
283
|
const t = {
|
|
295
284
|
...n
|
|
296
285
|
};
|
|
@@ -311,7 +300,7 @@ function Qe(e, n) {
|
|
|
311
300
|
...t
|
|
312
301
|
};
|
|
313
302
|
}
|
|
314
|
-
const
|
|
303
|
+
const Ye = [
|
|
315
304
|
"a",
|
|
316
305
|
"button",
|
|
317
306
|
"div",
|
|
@@ -328,12 +317,12 @@ const er = [
|
|
|
328
317
|
"span",
|
|
329
318
|
"svg",
|
|
330
319
|
"ul"
|
|
331
|
-
],
|
|
332
|
-
const t = /* @__PURE__ */
|
|
333
|
-
const { asChild: r, ...o } = a, i = r ?
|
|
334
|
-
return
|
|
320
|
+
], Qe = Ye.reduce((e, n) => {
|
|
321
|
+
const t = /* @__PURE__ */ g((a, u) => {
|
|
322
|
+
const { asChild: r, ...o } = a, i = r ? ne : n;
|
|
323
|
+
return C(() => {
|
|
335
324
|
window[Symbol.for("radix-ui")] = !0;
|
|
336
|
-
}, []), /* @__PURE__ */ p(i,
|
|
325
|
+
}, []), /* @__PURE__ */ p(i, P({}, o, {
|
|
337
326
|
ref: u
|
|
338
327
|
}));
|
|
339
328
|
});
|
|
@@ -341,17 +330,17 @@ const er = [
|
|
|
341
330
|
...e,
|
|
342
331
|
[n]: t
|
|
343
332
|
};
|
|
344
|
-
}, {}),
|
|
333
|
+
}, {}), er = /* @__PURE__ */ g((e, n) => /* @__PURE__ */ p(Qe.label, P({}, e, {
|
|
345
334
|
ref: n,
|
|
346
335
|
onMouseDown: (t) => {
|
|
347
336
|
var a;
|
|
348
337
|
(a = e.onMouseDown) === null || a === void 0 || a.call(e, t), !t.defaultPrevented && t.detail > 1 && t.preventDefault();
|
|
349
338
|
}
|
|
350
|
-
}))),
|
|
351
|
-
function
|
|
339
|
+
}))), rr = er;
|
|
340
|
+
function tr(e) {
|
|
352
341
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
353
342
|
}
|
|
354
|
-
var
|
|
343
|
+
var oe = { exports: {} };
|
|
355
344
|
/*!
|
|
356
345
|
Copyright (c) 2018 Jed Watson.
|
|
357
346
|
Licensed under the MIT License (MIT), see
|
|
@@ -386,13 +375,13 @@ var ie = { exports: {} };
|
|
|
386
375
|
}
|
|
387
376
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
388
377
|
})();
|
|
389
|
-
})(
|
|
390
|
-
var
|
|
391
|
-
const
|
|
378
|
+
})(oe);
|
|
379
|
+
var nr = oe.exports;
|
|
380
|
+
const or = /* @__PURE__ */ tr(nr), I = {
|
|
392
381
|
"purpur-label": "_purpur-label_12cfi_1",
|
|
393
382
|
"purpur-label--negative": "_purpur-label--negative_12cfi_9",
|
|
394
383
|
"purpur-label--disabled": "_purpur-label--disabled_12cfi_12"
|
|
395
|
-
},
|
|
384
|
+
}, B = "purpur-label", ar = ({
|
|
396
385
|
children: e,
|
|
397
386
|
className: n,
|
|
398
387
|
htmlFor: t,
|
|
@@ -401,20 +390,20 @@ const ir = /* @__PURE__ */ or(ar), B = {
|
|
|
401
390
|
negative: r = !1,
|
|
402
391
|
...o
|
|
403
392
|
}) => {
|
|
404
|
-
const i =
|
|
393
|
+
const i = or([
|
|
405
394
|
n,
|
|
406
|
-
B
|
|
395
|
+
I[B],
|
|
407
396
|
{
|
|
408
|
-
[
|
|
409
|
-
[
|
|
397
|
+
[I[`${B}--disabled`]]: u,
|
|
398
|
+
[I[`${B}--negative`]]: r
|
|
410
399
|
}
|
|
411
400
|
]);
|
|
412
|
-
return /* @__PURE__ */ f(
|
|
401
|
+
return /* @__PURE__ */ f(rr, { className: i, "data-testid": a, htmlFor: t, ...o, children: e });
|
|
413
402
|
};
|
|
414
|
-
function
|
|
403
|
+
function ir(e) {
|
|
415
404
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
416
405
|
}
|
|
417
|
-
var
|
|
406
|
+
var ae = { exports: {} };
|
|
418
407
|
/*!
|
|
419
408
|
Copyright (c) 2018 Jed Watson.
|
|
420
409
|
Licensed under the MIT License (MIT), see
|
|
@@ -449,9 +438,9 @@ var ue = { exports: {} };
|
|
|
449
438
|
}
|
|
450
439
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
451
440
|
})();
|
|
452
|
-
})(
|
|
453
|
-
var
|
|
454
|
-
const
|
|
441
|
+
})(ae);
|
|
442
|
+
var ur = ae.exports;
|
|
443
|
+
const cr = /* @__PURE__ */ ir(ur), O = {
|
|
455
444
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
456
445
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
457
446
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -466,7 +455,7 @@ const lr = /* @__PURE__ */ cr(sr), P = {
|
|
|
466
455
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
467
456
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
468
457
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
469
|
-
},
|
|
458
|
+
}, sr = {
|
|
470
459
|
PARAGRAPH100: "paragraph-100",
|
|
471
460
|
PARAGRAPH100MEDIUM: "paragraph-100-medium",
|
|
472
461
|
PARAGRAPH100BOLD: "paragraph-100-bold",
|
|
@@ -477,70 +466,69 @@ const lr = /* @__PURE__ */ cr(sr), P = {
|
|
|
477
466
|
ADDITIONAL100MEDIUM: "additional-100-medium",
|
|
478
467
|
OVERLINE100: "overline-100",
|
|
479
468
|
OVERLINE200: "overline-200"
|
|
480
|
-
},
|
|
469
|
+
}, E = "purpur-paragraph", ie = ({
|
|
481
470
|
["data-testid"]: e,
|
|
482
471
|
children: n,
|
|
483
472
|
className: t,
|
|
484
473
|
disabled: a,
|
|
485
474
|
enableHyphenation: u = !1,
|
|
486
475
|
negative: r = !1,
|
|
487
|
-
variant: o =
|
|
476
|
+
variant: o = sr.PARAGRAPH100,
|
|
488
477
|
...i
|
|
489
478
|
}) => {
|
|
490
|
-
const c =
|
|
479
|
+
const c = cr([
|
|
491
480
|
t,
|
|
492
|
-
|
|
493
|
-
|
|
481
|
+
O[E],
|
|
482
|
+
O[`${E}--${o}`],
|
|
494
483
|
{
|
|
495
|
-
[
|
|
496
|
-
[
|
|
497
|
-
[
|
|
484
|
+
[O[`${E}--hyphens`]]: u,
|
|
485
|
+
[O[`${E}--disabled`]]: a,
|
|
486
|
+
[O[`${E}--negative`]]: r
|
|
498
487
|
}
|
|
499
488
|
]);
|
|
500
489
|
return /* @__PURE__ */ f("p", { ...i, className: c, "data-testid": e, children: n });
|
|
501
490
|
};
|
|
502
|
-
|
|
503
|
-
function
|
|
504
|
-
return
|
|
491
|
+
ie.displayName = "Paragraph";
|
|
492
|
+
function N() {
|
|
493
|
+
return N = Object.assign ? Object.assign.bind() : function(e) {
|
|
505
494
|
for (var n = 1; n < arguments.length; n++) {
|
|
506
495
|
var t = arguments[n];
|
|
507
|
-
for (var a in t)
|
|
508
|
-
Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
|
|
496
|
+
for (var a in t) ({}).hasOwnProperty.call(t, a) && (e[a] = t[a]);
|
|
509
497
|
}
|
|
510
498
|
return e;
|
|
511
|
-
},
|
|
499
|
+
}, N.apply(null, arguments);
|
|
512
500
|
}
|
|
513
|
-
function
|
|
501
|
+
function lr(e, n) {
|
|
514
502
|
typeof e == "function" ? e(n) : e != null && (e.current = n);
|
|
515
503
|
}
|
|
516
|
-
function
|
|
504
|
+
function ue(...e) {
|
|
517
505
|
return (n) => e.forEach(
|
|
518
|
-
(t) =>
|
|
506
|
+
(t) => lr(t, n)
|
|
519
507
|
);
|
|
520
508
|
}
|
|
521
|
-
function
|
|
522
|
-
return
|
|
509
|
+
function ce(...e) {
|
|
510
|
+
return Z(ue(...e), e);
|
|
523
511
|
}
|
|
524
|
-
function
|
|
512
|
+
function pr(e, n = []) {
|
|
525
513
|
let t = [];
|
|
526
514
|
function a(r, o) {
|
|
527
|
-
const i = /* @__PURE__ */
|
|
515
|
+
const i = /* @__PURE__ */ V(o), c = t.length;
|
|
528
516
|
t = [
|
|
529
517
|
...t,
|
|
530
518
|
o
|
|
531
519
|
];
|
|
532
520
|
function s(l) {
|
|
533
|
-
const { scope: d, children:
|
|
534
|
-
() =>
|
|
535
|
-
Object.values(
|
|
521
|
+
const { scope: d, children: _, ...b } = l, R = (d == null ? void 0 : d[e][c]) || i, x = M(
|
|
522
|
+
() => b,
|
|
523
|
+
Object.values(b)
|
|
536
524
|
);
|
|
537
|
-
return /* @__PURE__ */ p(
|
|
538
|
-
value:
|
|
539
|
-
},
|
|
525
|
+
return /* @__PURE__ */ p(R.Provider, {
|
|
526
|
+
value: x
|
|
527
|
+
}, _);
|
|
540
528
|
}
|
|
541
529
|
function h(l, d) {
|
|
542
|
-
const
|
|
543
|
-
if (
|
|
530
|
+
const _ = (d == null ? void 0 : d[e][c]) || i, b = _e(_);
|
|
531
|
+
if (b) return b;
|
|
544
532
|
if (o !== void 0) return o;
|
|
545
533
|
throw new Error(`\`${l}\` must be used within \`${r}\``);
|
|
546
534
|
}
|
|
@@ -550,10 +538,10 @@ function fr(e, n = []) {
|
|
|
550
538
|
];
|
|
551
539
|
}
|
|
552
540
|
const u = () => {
|
|
553
|
-
const r = t.map((o) => /* @__PURE__ */
|
|
541
|
+
const r = t.map((o) => /* @__PURE__ */ V(o));
|
|
554
542
|
return function(i) {
|
|
555
543
|
const c = (i == null ? void 0 : i[e]) || r;
|
|
556
|
-
return
|
|
544
|
+
return M(
|
|
557
545
|
() => ({
|
|
558
546
|
[`__scope${e}`]: {
|
|
559
547
|
...i,
|
|
@@ -569,10 +557,10 @@ function fr(e, n = []) {
|
|
|
569
557
|
};
|
|
570
558
|
return u.scopeName = e, [
|
|
571
559
|
a,
|
|
572
|
-
|
|
560
|
+
dr(u, ...n)
|
|
573
561
|
];
|
|
574
562
|
}
|
|
575
|
-
function
|
|
563
|
+
function dr(...e) {
|
|
576
564
|
const n = e[0];
|
|
577
565
|
if (e.length === 1) return n;
|
|
578
566
|
const t = () => {
|
|
@@ -590,7 +578,7 @@ function hr(...e) {
|
|
|
590
578
|
...l
|
|
591
579
|
};
|
|
592
580
|
}, {});
|
|
593
|
-
return
|
|
581
|
+
return M(
|
|
594
582
|
() => ({
|
|
595
583
|
[`__scope${n.scopeName}`]: o
|
|
596
584
|
}),
|
|
@@ -602,16 +590,16 @@ function hr(...e) {
|
|
|
602
590
|
};
|
|
603
591
|
return t.scopeName = n.scopeName, t;
|
|
604
592
|
}
|
|
605
|
-
function
|
|
593
|
+
function Y(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
606
594
|
return function(u) {
|
|
607
595
|
if (e == null || e(u), t === !1 || !u.defaultPrevented) return n == null ? void 0 : n(u);
|
|
608
596
|
};
|
|
609
597
|
}
|
|
610
|
-
function
|
|
598
|
+
function se(e) {
|
|
611
599
|
const n = $(e);
|
|
612
|
-
return
|
|
600
|
+
return C(() => {
|
|
613
601
|
n.current = e;
|
|
614
|
-
}),
|
|
602
|
+
}), M(
|
|
615
603
|
() => (...t) => {
|
|
616
604
|
var a;
|
|
617
605
|
return (a = n.current) === null || a === void 0 ? void 0 : a.call(n, ...t);
|
|
@@ -619,12 +607,12 @@ function pe(e) {
|
|
|
619
607
|
[]
|
|
620
608
|
);
|
|
621
609
|
}
|
|
622
|
-
function
|
|
610
|
+
function fr({ prop: e, defaultProp: n, onChange: t = () => {
|
|
623
611
|
} }) {
|
|
624
|
-
const [a, u] =
|
|
612
|
+
const [a, u] = hr({
|
|
625
613
|
defaultProp: n,
|
|
626
614
|
onChange: t
|
|
627
|
-
}), r = e !== void 0, o = r ? e : a, i =
|
|
615
|
+
}), r = e !== void 0, o = r ? e : a, i = se(t), c = Z((s) => {
|
|
628
616
|
if (r) {
|
|
629
617
|
const l = typeof s == "function" ? s(e) : s;
|
|
630
618
|
l !== e && i(l);
|
|
@@ -640,9 +628,9 @@ function mr({ prop: e, defaultProp: n, onChange: t = () => {
|
|
|
640
628
|
c
|
|
641
629
|
];
|
|
642
630
|
}
|
|
643
|
-
function
|
|
644
|
-
const t = L(e), [a] = t, u = $(a), r =
|
|
645
|
-
return
|
|
631
|
+
function hr({ defaultProp: e, onChange: n }) {
|
|
632
|
+
const t = L(e), [a] = t, u = $(a), r = se(n);
|
|
633
|
+
return C(() => {
|
|
646
634
|
u.current !== a && (r(a), u.current = a);
|
|
647
635
|
}, [
|
|
648
636
|
a,
|
|
@@ -650,20 +638,20 @@ function vr({ defaultProp: e, onChange: n }) {
|
|
|
650
638
|
r
|
|
651
639
|
]), t;
|
|
652
640
|
}
|
|
653
|
-
function
|
|
641
|
+
function mr(e) {
|
|
654
642
|
const n = $({
|
|
655
643
|
value: e,
|
|
656
644
|
previous: e
|
|
657
645
|
});
|
|
658
|
-
return
|
|
646
|
+
return M(() => (n.current.value !== e && (n.current.previous = n.current.value, n.current.value = e), n.current.previous), [
|
|
659
647
|
e
|
|
660
648
|
]);
|
|
661
649
|
}
|
|
662
|
-
const
|
|
650
|
+
const H = globalThis != null && globalThis.document ? be : () => {
|
|
663
651
|
};
|
|
664
|
-
function
|
|
652
|
+
function vr(e) {
|
|
665
653
|
const [n, t] = L(void 0);
|
|
666
|
-
return
|
|
654
|
+
return H(() => {
|
|
667
655
|
if (e) {
|
|
668
656
|
t({
|
|
669
657
|
width: e.offsetWidth,
|
|
@@ -693,21 +681,21 @@ function gr(e) {
|
|
|
693
681
|
]), n;
|
|
694
682
|
}
|
|
695
683
|
function _r(e, n) {
|
|
696
|
-
return
|
|
684
|
+
return ge((t, a) => {
|
|
697
685
|
const u = n[t][a];
|
|
698
686
|
return u ?? t;
|
|
699
687
|
}, e);
|
|
700
688
|
}
|
|
701
|
-
const
|
|
702
|
-
const { present: n, children: t } = e, a =
|
|
689
|
+
const le = (e) => {
|
|
690
|
+
const { present: n, children: t } = e, a = br(n), u = typeof t == "function" ? t({
|
|
703
691
|
present: a.isPresent
|
|
704
|
-
}) : v.only(t), r =
|
|
705
|
-
return typeof t == "function" || a.isPresent ? /* @__PURE__ */
|
|
692
|
+
}) : v.only(t), r = ce(a.ref, u.ref);
|
|
693
|
+
return typeof t == "function" || a.isPresent ? /* @__PURE__ */ j(u, {
|
|
706
694
|
ref: r
|
|
707
695
|
}) : null;
|
|
708
696
|
};
|
|
709
|
-
|
|
710
|
-
function
|
|
697
|
+
le.displayName = "Presence";
|
|
698
|
+
function br(e) {
|
|
711
699
|
const [n, t] = L(), a = $({}), u = $(e), r = $("none"), o = e ? "mounted" : "unmounted", [i, c] = _r(o, {
|
|
712
700
|
mounted: {
|
|
713
701
|
UNMOUNT: "unmounted",
|
|
@@ -721,29 +709,29 @@ function $r(e) {
|
|
|
721
709
|
MOUNT: "mounted"
|
|
722
710
|
}
|
|
723
711
|
});
|
|
724
|
-
return
|
|
725
|
-
const s =
|
|
712
|
+
return C(() => {
|
|
713
|
+
const s = D(a.current);
|
|
726
714
|
r.current = i === "mounted" ? s : "none";
|
|
727
715
|
}, [
|
|
728
716
|
i
|
|
729
|
-
]),
|
|
717
|
+
]), H(() => {
|
|
730
718
|
const s = a.current, h = u.current;
|
|
731
719
|
if (h !== e) {
|
|
732
|
-
const d = r.current,
|
|
733
|
-
e ? c("MOUNT") :
|
|
720
|
+
const d = r.current, _ = D(s);
|
|
721
|
+
e ? c("MOUNT") : _ === "none" || (s == null ? void 0 : s.display) === "none" ? c("UNMOUNT") : c(h && d !== _ ? "ANIMATION_OUT" : "UNMOUNT"), u.current = e;
|
|
734
722
|
}
|
|
735
723
|
}, [
|
|
736
724
|
e,
|
|
737
725
|
c
|
|
738
|
-
]),
|
|
726
|
+
]), H(() => {
|
|
739
727
|
if (n) {
|
|
740
728
|
const s = (l) => {
|
|
741
|
-
const
|
|
742
|
-
l.target === n &&
|
|
729
|
+
const _ = D(a.current).includes(l.animationName);
|
|
730
|
+
l.target === n && _ && $e(
|
|
743
731
|
() => c("ANIMATION_END")
|
|
744
732
|
);
|
|
745
733
|
}, h = (l) => {
|
|
746
|
-
l.target === n && (r.current =
|
|
734
|
+
l.target === n && (r.current = D(a.current));
|
|
747
735
|
};
|
|
748
736
|
return n.addEventListener("animationstart", h), n.addEventListener("animationcancel", s), n.addEventListener("animationend", s), () => {
|
|
749
737
|
n.removeEventListener("animationstart", h), n.removeEventListener("animationcancel", s), n.removeEventListener("animationend", s);
|
|
@@ -758,50 +746,40 @@ function $r(e) {
|
|
|
758
746
|
"mounted",
|
|
759
747
|
"unmountSuspended"
|
|
760
748
|
].includes(i),
|
|
761
|
-
ref:
|
|
749
|
+
ref: Z((s) => {
|
|
762
750
|
s && (a.current = getComputedStyle(s)), t(s);
|
|
763
751
|
}, [])
|
|
764
752
|
};
|
|
765
753
|
}
|
|
766
|
-
function
|
|
754
|
+
function D(e) {
|
|
767
755
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
768
756
|
}
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
for (var n = 1; n < arguments.length; n++) {
|
|
772
|
-
var t = arguments[n];
|
|
773
|
-
for (var a in t)
|
|
774
|
-
Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
|
|
775
|
-
}
|
|
776
|
-
return e;
|
|
777
|
-
}, M.apply(this, arguments);
|
|
778
|
-
}
|
|
779
|
-
const fe = /* @__PURE__ */ _((e, n) => {
|
|
780
|
-
const { children: t, ...a } = e, u = v.toArray(t), r = u.find(xr);
|
|
757
|
+
const pe = /* @__PURE__ */ g((e, n) => {
|
|
758
|
+
const { children: t, ...a } = e, u = v.toArray(t), r = u.find($r);
|
|
781
759
|
if (r) {
|
|
782
|
-
const o = r.props.children, i = u.map((c) => c === r ? v.count(o) > 1 ? v.only(null) : /* @__PURE__ */
|
|
783
|
-
return /* @__PURE__ */ p(
|
|
760
|
+
const o = r.props.children, i = u.map((c) => c === r ? v.count(o) > 1 ? v.only(null) : /* @__PURE__ */ y(o) ? o.props.children : null : c);
|
|
761
|
+
return /* @__PURE__ */ p(F, N({}, a, {
|
|
784
762
|
ref: n
|
|
785
|
-
}), /* @__PURE__ */
|
|
763
|
+
}), /* @__PURE__ */ y(o) ? /* @__PURE__ */ j(o, void 0, i) : null);
|
|
786
764
|
}
|
|
787
|
-
return /* @__PURE__ */ p(
|
|
765
|
+
return /* @__PURE__ */ p(F, N({}, a, {
|
|
788
766
|
ref: n
|
|
789
767
|
}), t);
|
|
790
768
|
});
|
|
791
|
-
|
|
792
|
-
const
|
|
769
|
+
pe.displayName = "Slot";
|
|
770
|
+
const F = /* @__PURE__ */ g((e, n) => {
|
|
793
771
|
const { children: t, ...a } = e;
|
|
794
|
-
return /* @__PURE__ */
|
|
795
|
-
...
|
|
796
|
-
ref: n ?
|
|
772
|
+
return /* @__PURE__ */ y(t) ? /* @__PURE__ */ j(t, {
|
|
773
|
+
...xr(a, t.props),
|
|
774
|
+
ref: n ? ue(n, t.ref) : t.ref
|
|
797
775
|
}) : v.count(t) > 1 ? v.only(null) : null;
|
|
798
776
|
});
|
|
799
|
-
|
|
800
|
-
const
|
|
801
|
-
function
|
|
802
|
-
return /* @__PURE__ */
|
|
777
|
+
F.displayName = "SlotClone";
|
|
778
|
+
const gr = ({ children: e }) => /* @__PURE__ */ p(Q, null, e);
|
|
779
|
+
function $r(e) {
|
|
780
|
+
return /* @__PURE__ */ y(e) && e.type === gr;
|
|
803
781
|
}
|
|
804
|
-
function
|
|
782
|
+
function xr(e, n) {
|
|
805
783
|
const t = {
|
|
806
784
|
...n
|
|
807
785
|
};
|
|
@@ -822,7 +800,7 @@ function Nr(e, n) {
|
|
|
822
800
|
...t
|
|
823
801
|
};
|
|
824
802
|
}
|
|
825
|
-
const
|
|
803
|
+
const yr = [
|
|
826
804
|
"a",
|
|
827
805
|
"button",
|
|
828
806
|
"div",
|
|
@@ -839,12 +817,12 @@ const wr = [
|
|
|
839
817
|
"span",
|
|
840
818
|
"svg",
|
|
841
819
|
"ul"
|
|
842
|
-
],
|
|
843
|
-
const t = /* @__PURE__ */
|
|
844
|
-
const { asChild: r, ...o } = a, i = r ?
|
|
845
|
-
return
|
|
820
|
+
], de = yr.reduce((e, n) => {
|
|
821
|
+
const t = /* @__PURE__ */ g((a, u) => {
|
|
822
|
+
const { asChild: r, ...o } = a, i = r ? pe : n;
|
|
823
|
+
return C(() => {
|
|
846
824
|
window[Symbol.for("radix-ui")] = !0;
|
|
847
|
-
}, []), /* @__PURE__ */ p(i,
|
|
825
|
+
}, []), /* @__PURE__ */ p(i, N({}, o, {
|
|
848
826
|
ref: u
|
|
849
827
|
}));
|
|
850
828
|
});
|
|
@@ -852,65 +830,65 @@ const wr = [
|
|
|
852
830
|
...e,
|
|
853
831
|
[n]: t
|
|
854
832
|
};
|
|
855
|
-
}, {}),
|
|
856
|
-
const { __scopeCheckbox: t, name: a, checked: u, defaultChecked: r, required: o, disabled: i, value: c = "on", onCheckedChange: s, ...h } = e, [l, d] = L(null),
|
|
833
|
+
}, {}), fe = "Checkbox", [Nr, Br] = pr(fe), [wr, Sr] = Nr(fe), Ar = /* @__PURE__ */ g((e, n) => {
|
|
834
|
+
const { __scopeCheckbox: t, name: a, checked: u, defaultChecked: r, required: o, disabled: i, value: c = "on", onCheckedChange: s, ...h } = e, [l, d] = L(null), _ = ce(
|
|
857
835
|
n,
|
|
858
836
|
(m) => d(m)
|
|
859
|
-
),
|
|
837
|
+
), b = $(!1), R = l ? !!l.closest("form") : !0, [x = !1, q] = fr({
|
|
860
838
|
prop: u,
|
|
861
839
|
defaultProp: r,
|
|
862
840
|
onChange: s
|
|
863
|
-
}),
|
|
864
|
-
return
|
|
841
|
+
}), ve = $(x);
|
|
842
|
+
return C(() => {
|
|
865
843
|
const m = l == null ? void 0 : l.form;
|
|
866
844
|
if (m) {
|
|
867
|
-
const
|
|
868
|
-
return m.addEventListener("reset",
|
|
845
|
+
const k = () => q(ve.current);
|
|
846
|
+
return m.addEventListener("reset", k), () => m.removeEventListener("reset", k);
|
|
869
847
|
}
|
|
870
848
|
}, [
|
|
871
849
|
l,
|
|
872
|
-
|
|
873
|
-
]), /* @__PURE__ */ p(
|
|
850
|
+
q
|
|
851
|
+
]), /* @__PURE__ */ p(wr, {
|
|
874
852
|
scope: t,
|
|
875
|
-
state:
|
|
853
|
+
state: x,
|
|
876
854
|
disabled: i
|
|
877
|
-
}, /* @__PURE__ */ p(
|
|
855
|
+
}, /* @__PURE__ */ p(de.button, N({
|
|
878
856
|
type: "button",
|
|
879
857
|
role: "checkbox",
|
|
880
|
-
"aria-checked":
|
|
858
|
+
"aria-checked": A(x) ? "mixed" : x,
|
|
881
859
|
"aria-required": o,
|
|
882
|
-
"data-state":
|
|
860
|
+
"data-state": he(x),
|
|
883
861
|
"data-disabled": i ? "" : void 0,
|
|
884
862
|
disabled: i,
|
|
885
863
|
value: c
|
|
886
864
|
}, h, {
|
|
887
|
-
ref:
|
|
888
|
-
onKeyDown:
|
|
865
|
+
ref: _,
|
|
866
|
+
onKeyDown: Y(e.onKeyDown, (m) => {
|
|
889
867
|
m.key === "Enter" && m.preventDefault();
|
|
890
868
|
}),
|
|
891
|
-
onClick:
|
|
892
|
-
|
|
893
|
-
(
|
|
894
|
-
),
|
|
869
|
+
onClick: Y(e.onClick, (m) => {
|
|
870
|
+
q(
|
|
871
|
+
(k) => A(k) ? !0 : !k
|
|
872
|
+
), R && (b.current = m.isPropagationStopped(), b.current || m.stopPropagation());
|
|
895
873
|
})
|
|
896
|
-
})),
|
|
874
|
+
})), R && /* @__PURE__ */ p(kr, {
|
|
897
875
|
control: l,
|
|
898
|
-
bubbles: !
|
|
876
|
+
bubbles: !b.current,
|
|
899
877
|
name: a,
|
|
900
878
|
value: c,
|
|
901
|
-
checked:
|
|
879
|
+
checked: x,
|
|
902
880
|
required: o,
|
|
903
881
|
disabled: i,
|
|
904
882
|
style: {
|
|
905
883
|
transform: "translateX(-100%)"
|
|
906
884
|
}
|
|
907
885
|
}));
|
|
908
|
-
}), Cr = "CheckboxIndicator",
|
|
909
|
-
const { __scopeCheckbox: t, forceMount: a, ...u } = e, r =
|
|
910
|
-
return /* @__PURE__ */ p(
|
|
911
|
-
present: a ||
|
|
912
|
-
}, /* @__PURE__ */ p(
|
|
913
|
-
"data-state":
|
|
886
|
+
}), Cr = "CheckboxIndicator", Pr = /* @__PURE__ */ g((e, n) => {
|
|
887
|
+
const { __scopeCheckbox: t, forceMount: a, ...u } = e, r = Sr(Cr, t);
|
|
888
|
+
return /* @__PURE__ */ p(le, {
|
|
889
|
+
present: a || A(r.state) || r.state === !0
|
|
890
|
+
}, /* @__PURE__ */ p(de.span, N({
|
|
891
|
+
"data-state": he(r.state),
|
|
914
892
|
"data-disabled": r.disabled ? "" : void 0
|
|
915
893
|
}, u, {
|
|
916
894
|
ref: n,
|
|
@@ -919,24 +897,24 @@ const wr = [
|
|
|
919
897
|
...e.style
|
|
920
898
|
}
|
|
921
899
|
})));
|
|
922
|
-
}),
|
|
923
|
-
const { control: n, checked: t, bubbles: a = !0, ...u } = e, r = $(null), o =
|
|
924
|
-
return
|
|
900
|
+
}), kr = (e) => {
|
|
901
|
+
const { control: n, checked: t, bubbles: a = !0, ...u } = e, r = $(null), o = mr(t), i = vr(n);
|
|
902
|
+
return C(() => {
|
|
925
903
|
const c = r.current, s = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(s, "checked").set;
|
|
926
904
|
if (o !== t && l) {
|
|
927
905
|
const d = new Event("click", {
|
|
928
906
|
bubbles: a
|
|
929
907
|
});
|
|
930
|
-
c.indeterminate =
|
|
908
|
+
c.indeterminate = A(t), l.call(c, A(t) ? !1 : t), c.dispatchEvent(d);
|
|
931
909
|
}
|
|
932
910
|
}, [
|
|
933
911
|
o,
|
|
934
912
|
t,
|
|
935
913
|
a
|
|
936
|
-
]), /* @__PURE__ */ p("input",
|
|
914
|
+
]), /* @__PURE__ */ p("input", N({
|
|
937
915
|
type: "checkbox",
|
|
938
916
|
"aria-hidden": !0,
|
|
939
|
-
defaultChecked:
|
|
917
|
+
defaultChecked: A(t) ? !1 : t
|
|
940
918
|
}, u, {
|
|
941
919
|
tabIndex: -1,
|
|
942
920
|
ref: r,
|
|
@@ -950,17 +928,17 @@ const wr = [
|
|
|
950
928
|
}
|
|
951
929
|
}));
|
|
952
930
|
};
|
|
953
|
-
function
|
|
931
|
+
function A(e) {
|
|
954
932
|
return e === "indeterminate";
|
|
955
933
|
}
|
|
956
|
-
function
|
|
957
|
-
return
|
|
934
|
+
function he(e) {
|
|
935
|
+
return A(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
958
936
|
}
|
|
959
|
-
const
|
|
960
|
-
function
|
|
937
|
+
const Or = Ar, Er = Pr;
|
|
938
|
+
function Mr(e) {
|
|
961
939
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
962
940
|
}
|
|
963
|
-
var
|
|
941
|
+
var me = { exports: {} };
|
|
964
942
|
/*!
|
|
965
943
|
Copyright (c) 2018 Jed Watson.
|
|
966
944
|
Licensed under the MIT License (MIT), see
|
|
@@ -995,9 +973,9 @@ var be = { exports: {} };
|
|
|
995
973
|
}
|
|
996
974
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
997
975
|
})();
|
|
998
|
-
})(
|
|
999
|
-
var
|
|
1000
|
-
const
|
|
976
|
+
})(me);
|
|
977
|
+
var jr = me.exports;
|
|
978
|
+
const z = /* @__PURE__ */ Mr(jr), w = {
|
|
1001
979
|
"purpur-checkbox": "_purpur-checkbox_10fl8_1",
|
|
1002
980
|
"purpur-checkbox__box": "_purpur-checkbox__box_10fl8_7",
|
|
1003
981
|
"purpur-checkbox--error": "_purpur-checkbox--error_10fl8_16",
|
|
@@ -1005,7 +983,7 @@ const T = /* @__PURE__ */ Rr(Dr), N = {
|
|
|
1005
983
|
"purpur-checkbox__label": "_purpur-checkbox__label_10fl8_70",
|
|
1006
984
|
"purpur-checkbox__wrapper": "_purpur-checkbox__wrapper_10fl8_73",
|
|
1007
985
|
"purpur-checkbox__container": "_purpur-checkbox__container_10fl8_79"
|
|
1008
|
-
},
|
|
986
|
+
}, zr = ["indeterminate", !0, !1], S = "purpur-checkbox", Rr = ({
|
|
1009
987
|
["data-testid"]: e,
|
|
1010
988
|
checked: n,
|
|
1011
989
|
className: t,
|
|
@@ -1015,53 +993,53 @@ const T = /* @__PURE__ */ Rr(Dr), N = {
|
|
|
1015
993
|
...o
|
|
1016
994
|
}, i) => {
|
|
1017
995
|
const c = a && !n;
|
|
1018
|
-
return /* @__PURE__ */
|
|
1019
|
-
/* @__PURE__ */
|
|
996
|
+
return /* @__PURE__ */ T("div", { className: z([t, w[`${S}__wrapper`]]), children: [
|
|
997
|
+
/* @__PURE__ */ T("div", { className: z([t, w[`${S}__container`]]), children: [
|
|
1020
998
|
/* @__PURE__ */ f(
|
|
1021
|
-
|
|
999
|
+
Or,
|
|
1022
1000
|
{
|
|
1023
1001
|
...o,
|
|
1024
1002
|
checked: n,
|
|
1025
|
-
className:
|
|
1026
|
-
[
|
|
1003
|
+
className: z(w[S], {
|
|
1004
|
+
[w[`${S}--error`]]: c
|
|
1027
1005
|
}),
|
|
1028
1006
|
"data-testid": e,
|
|
1029
1007
|
onCheckedChange: r,
|
|
1030
1008
|
ref: i,
|
|
1031
|
-
children: /* @__PURE__ */ f("span", { className:
|
|
1032
|
-
|
|
1009
|
+
children: /* @__PURE__ */ f("span", { className: w[`${S}__box`], children: /* @__PURE__ */ f(Er, { className: w[`${S}__indicator`], children: n === "indeterminate" ? /* @__PURE__ */ f(
|
|
1010
|
+
J,
|
|
1033
1011
|
{
|
|
1034
1012
|
"data-testid": e && `${e}-checked-icon`,
|
|
1035
1013
|
size: "xs",
|
|
1036
|
-
svg:
|
|
1014
|
+
svg: Te
|
|
1037
1015
|
}
|
|
1038
1016
|
) : /* @__PURE__ */ f(
|
|
1039
|
-
|
|
1017
|
+
J,
|
|
1040
1018
|
{
|
|
1041
1019
|
"data-testid": e && `${e}-indeterminate-icon`,
|
|
1042
1020
|
size: "xs",
|
|
1043
|
-
svg:
|
|
1021
|
+
svg: ze
|
|
1044
1022
|
}
|
|
1045
1023
|
) }) })
|
|
1046
1024
|
}
|
|
1047
1025
|
),
|
|
1048
1026
|
u && /* @__PURE__ */ f(
|
|
1049
|
-
|
|
1027
|
+
ar,
|
|
1050
1028
|
{
|
|
1051
1029
|
htmlFor: o.id,
|
|
1052
1030
|
"data-testid": e && `${e}-label`,
|
|
1053
1031
|
disabled: o.disabled,
|
|
1054
|
-
className:
|
|
1055
|
-
children: /* @__PURE__ */ f(
|
|
1032
|
+
className: w[`${S}__label`],
|
|
1033
|
+
children: /* @__PURE__ */ f(ie, { variant: "paragraph-100", disabled: o.disabled, children: `${o.required ? "* " : ""}${u}` })
|
|
1056
1034
|
}
|
|
1057
1035
|
)
|
|
1058
1036
|
] }),
|
|
1059
|
-
c && /* @__PURE__ */ f(
|
|
1037
|
+
c && /* @__PURE__ */ f(De, { "data-testid": e && `${e}-error-text`, children: a })
|
|
1060
1038
|
] });
|
|
1061
|
-
},
|
|
1062
|
-
|
|
1039
|
+
}, Dr = g(Rr);
|
|
1040
|
+
Dr.displayName = "Checkbox";
|
|
1063
1041
|
export {
|
|
1064
|
-
|
|
1065
|
-
|
|
1042
|
+
Dr as Checkbox,
|
|
1043
|
+
zr as checkedState
|
|
1066
1044
|
};
|
|
1067
1045
|
//# sourceMappingURL=checkbox.es.js.map
|