@purpurds/checkbox 5.30.1 → 5.32.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 +164 -164
- package/dist/checkbox.es.js.map +1 -1
- package/package.json +6 -6
package/dist/checkbox.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as z, jsx as h } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as g, Children as
|
|
2
|
+
import { forwardRef as g, Children as b, isValidElement as N, createElement as p, cloneElement as j, useEffect as A, Fragment as Y, useCallback as Z, createContext as V, useMemo as M, useContext as _e, useRef as $, useState as I, useLayoutEffect as ve, useReducer as ge } from "react";
|
|
3
3
|
import { flushSync as $e } from "react-dom";
|
|
4
4
|
function xe(e) {
|
|
5
5
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -15,8 +15,8 @@ var Q = { exports: {} };
|
|
|
15
15
|
var n = {}.hasOwnProperty;
|
|
16
16
|
function t() {
|
|
17
17
|
for (var r = "", o = 0; o < arguments.length; o++) {
|
|
18
|
-
var
|
|
19
|
-
|
|
18
|
+
var u = arguments[o];
|
|
19
|
+
u && (r = i(r, a.call(this, u)));
|
|
20
20
|
}
|
|
21
21
|
return r;
|
|
22
22
|
}
|
|
@@ -30,11 +30,11 @@ var Q = { exports: {} };
|
|
|
30
30
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
31
31
|
return r.toString();
|
|
32
32
|
var o = "";
|
|
33
|
-
for (var
|
|
34
|
-
n.call(r,
|
|
33
|
+
for (var u in r)
|
|
34
|
+
n.call(r, u) && r[u] && (o = i(o, this && this[u] || u));
|
|
35
35
|
return o;
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function i(r, o) {
|
|
38
38
|
return o ? r ? r + " " + o : r + o : r;
|
|
39
39
|
}
|
|
40
40
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
@@ -67,18 +67,18 @@ const Ne = /* @__PURE__ */ xe(ye), we = {
|
|
|
67
67
|
svg: n,
|
|
68
68
|
allyTitle: t,
|
|
69
69
|
className: a,
|
|
70
|
-
size:
|
|
70
|
+
size: i = Ce,
|
|
71
71
|
...r
|
|
72
72
|
}) => {
|
|
73
73
|
const o = Pe({
|
|
74
74
|
content: Oe(n.svg),
|
|
75
75
|
title: t
|
|
76
|
-
}),
|
|
76
|
+
}), u = Ae(a, G, `${G}--${i}`);
|
|
77
77
|
return /* @__PURE__ */ h(
|
|
78
78
|
"span",
|
|
79
79
|
{
|
|
80
80
|
"aria-label": t,
|
|
81
|
-
className:
|
|
81
|
+
className: u,
|
|
82
82
|
"data-testid": e,
|
|
83
83
|
dangerouslySetInnerHTML: { __html: o },
|
|
84
84
|
...r
|
|
@@ -100,8 +100,8 @@ var re = { exports: {} };
|
|
|
100
100
|
var n = {}.hasOwnProperty;
|
|
101
101
|
function t() {
|
|
102
102
|
for (var r = "", o = 0; o < arguments.length; o++) {
|
|
103
|
-
var
|
|
104
|
-
|
|
103
|
+
var u = arguments[o];
|
|
104
|
+
u && (r = i(r, a(u)));
|
|
105
105
|
}
|
|
106
106
|
return r;
|
|
107
107
|
}
|
|
@@ -115,11 +115,11 @@ var re = { exports: {} };
|
|
|
115
115
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
116
116
|
return r.toString();
|
|
117
117
|
var o = "";
|
|
118
|
-
for (var
|
|
119
|
-
n.call(r,
|
|
118
|
+
for (var u in r)
|
|
119
|
+
n.call(r, u) && r[u] && (o = i(o, u));
|
|
120
120
|
return o;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function i(r, o) {
|
|
123
123
|
return o ? r ? r + " " + o : r + o : r;
|
|
124
124
|
}
|
|
125
125
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
@@ -134,7 +134,7 @@ const je = /* @__PURE__ */ Ee(Me), K = {
|
|
|
134
134
|
children: n,
|
|
135
135
|
className: t,
|
|
136
136
|
relevant: a = "additions text",
|
|
137
|
-
...
|
|
137
|
+
...i
|
|
138
138
|
}) => /* @__PURE__ */ z(
|
|
139
139
|
"div",
|
|
140
140
|
{
|
|
@@ -142,7 +142,7 @@ const je = /* @__PURE__ */ Ee(Me), K = {
|
|
|
142
142
|
"data-testid": e,
|
|
143
143
|
"aria-live": "assertive",
|
|
144
144
|
"aria-relevant": a,
|
|
145
|
-
...
|
|
145
|
+
...i,
|
|
146
146
|
children: [
|
|
147
147
|
/* @__PURE__ */ h(ee, { svg: Se, size: "xs", className: K[`${X}__icon`] }),
|
|
148
148
|
n
|
|
@@ -163,8 +163,8 @@ var te = { exports: {} };
|
|
|
163
163
|
var n = {}.hasOwnProperty;
|
|
164
164
|
function t() {
|
|
165
165
|
for (var r = "", o = 0; o < arguments.length; o++) {
|
|
166
|
-
var
|
|
167
|
-
|
|
166
|
+
var u = arguments[o];
|
|
167
|
+
u && (r = i(r, a.call(this, u)));
|
|
168
168
|
}
|
|
169
169
|
return r;
|
|
170
170
|
}
|
|
@@ -178,11 +178,11 @@ var te = { exports: {} };
|
|
|
178
178
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
179
179
|
return r.toString();
|
|
180
180
|
var o = "";
|
|
181
|
-
for (var
|
|
182
|
-
n.call(r,
|
|
181
|
+
for (var u in r)
|
|
182
|
+
n.call(r, u) && r[u] && (o = i(o, this && this[u] || u));
|
|
183
183
|
return o;
|
|
184
184
|
}
|
|
185
|
-
function
|
|
185
|
+
function i(r, o) {
|
|
186
186
|
return o ? r ? r + " " + o : r + o : r;
|
|
187
187
|
}
|
|
188
188
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
@@ -220,18 +220,18 @@ const Le = /* @__PURE__ */ De(Ie), qe = {
|
|
|
220
220
|
svg: n,
|
|
221
221
|
allyTitle: t,
|
|
222
222
|
className: a,
|
|
223
|
-
size:
|
|
223
|
+
size: i = Ue,
|
|
224
224
|
...r
|
|
225
225
|
}) => {
|
|
226
226
|
const o = Fe({
|
|
227
227
|
content: Ze(n.svg),
|
|
228
228
|
title: t
|
|
229
|
-
}),
|
|
229
|
+
}), u = Te(a, W, `${W}--${i}`);
|
|
230
230
|
return /* @__PURE__ */ h(
|
|
231
231
|
"span",
|
|
232
232
|
{
|
|
233
233
|
"aria-label": t,
|
|
234
|
-
className:
|
|
234
|
+
className: u,
|
|
235
235
|
"data-testid": e,
|
|
236
236
|
dangerouslySetInnerHTML: { __html: o },
|
|
237
237
|
...r
|
|
@@ -257,12 +257,12 @@ function Ge(...e) {
|
|
|
257
257
|
);
|
|
258
258
|
}
|
|
259
259
|
const ne = /* @__PURE__ */ g((e, n) => {
|
|
260
|
-
const { children: t, ...a } = e,
|
|
260
|
+
const { children: t, ...a } = e, i = b.toArray(t), r = i.find(Xe);
|
|
261
261
|
if (r) {
|
|
262
|
-
const o = r.props.children,
|
|
262
|
+
const o = r.props.children, u = i.map((c) => c === r ? b.count(o) > 1 ? b.only(null) : /* @__PURE__ */ N(o) ? o.props.children : null : c);
|
|
263
263
|
return /* @__PURE__ */ p(U, k({}, a, {
|
|
264
264
|
ref: n
|
|
265
|
-
}), /* @__PURE__ */ N(o) ? /* @__PURE__ */ j(o, void 0,
|
|
265
|
+
}), /* @__PURE__ */ N(o) ? /* @__PURE__ */ j(o, void 0, u) : null);
|
|
266
266
|
}
|
|
267
267
|
return /* @__PURE__ */ p(U, k({}, a, {
|
|
268
268
|
ref: n
|
|
@@ -274,7 +274,7 @@ const U = /* @__PURE__ */ g((e, n) => {
|
|
|
274
274
|
return /* @__PURE__ */ N(t) ? /* @__PURE__ */ j(t, {
|
|
275
275
|
...We(a, t.props),
|
|
276
276
|
ref: n ? Ge(n, t.ref) : t.ref
|
|
277
|
-
}) :
|
|
277
|
+
}) : b.count(t) > 1 ? b.only(null) : null;
|
|
278
278
|
});
|
|
279
279
|
U.displayName = "SlotClone";
|
|
280
280
|
const Ke = ({ children: e }) => /* @__PURE__ */ p(Y, null, e);
|
|
@@ -286,14 +286,14 @@ function We(e, n) {
|
|
|
286
286
|
...n
|
|
287
287
|
};
|
|
288
288
|
for (const a in n) {
|
|
289
|
-
const
|
|
290
|
-
/^on[A-Z]/.test(a) ?
|
|
291
|
-
r(...o),
|
|
292
|
-
} :
|
|
293
|
-
...
|
|
289
|
+
const i = e[a], r = n[a];
|
|
290
|
+
/^on[A-Z]/.test(a) ? i && r ? t[a] = (...o) => {
|
|
291
|
+
r(...o), i(...o);
|
|
292
|
+
} : i && (t[a] = i) : a === "style" ? t[a] = {
|
|
293
|
+
...i,
|
|
294
294
|
...r
|
|
295
295
|
} : a === "className" && (t[a] = [
|
|
296
|
-
|
|
296
|
+
i,
|
|
297
297
|
r
|
|
298
298
|
].filter(Boolean).join(" "));
|
|
299
299
|
}
|
|
@@ -320,12 +320,12 @@ const Je = [
|
|
|
320
320
|
"svg",
|
|
321
321
|
"ul"
|
|
322
322
|
], Ye = Je.reduce((e, n) => {
|
|
323
|
-
const t = /* @__PURE__ */ g((a,
|
|
324
|
-
const { asChild: r, ...o } = a,
|
|
323
|
+
const t = /* @__PURE__ */ g((a, i) => {
|
|
324
|
+
const { asChild: r, ...o } = a, u = r ? ne : n;
|
|
325
325
|
return A(() => {
|
|
326
326
|
window[Symbol.for("radix-ui")] = !0;
|
|
327
|
-
}, []), /* @__PURE__ */ p(
|
|
328
|
-
ref:
|
|
327
|
+
}, []), /* @__PURE__ */ p(u, k({}, o, {
|
|
328
|
+
ref: i
|
|
329
329
|
}));
|
|
330
330
|
});
|
|
331
331
|
return t.displayName = `Primitive.${n}`, {
|
|
@@ -353,8 +353,8 @@ var oe = { exports: {} };
|
|
|
353
353
|
var n = {}.hasOwnProperty;
|
|
354
354
|
function t() {
|
|
355
355
|
for (var r = "", o = 0; o < arguments.length; o++) {
|
|
356
|
-
var
|
|
357
|
-
|
|
356
|
+
var u = arguments[o];
|
|
357
|
+
u && (r = i(r, a(u)));
|
|
358
358
|
}
|
|
359
359
|
return r;
|
|
360
360
|
}
|
|
@@ -368,11 +368,11 @@ var oe = { exports: {} };
|
|
|
368
368
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
369
369
|
return r.toString();
|
|
370
370
|
var o = "";
|
|
371
|
-
for (var
|
|
372
|
-
n.call(r,
|
|
371
|
+
for (var u in r)
|
|
372
|
+
n.call(r, u) && r[u] && (o = i(o, u));
|
|
373
373
|
return o;
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function i(r, o) {
|
|
376
376
|
return o ? r ? r + " " + o : r + o : r;
|
|
377
377
|
}
|
|
378
378
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
@@ -388,19 +388,19 @@ const nr = /* @__PURE__ */ rr(tr), q = {
|
|
|
388
388
|
className: n,
|
|
389
389
|
htmlFor: t,
|
|
390
390
|
"data-testid": a,
|
|
391
|
-
disabled:
|
|
391
|
+
disabled: i,
|
|
392
392
|
negative: r = !1,
|
|
393
393
|
...o
|
|
394
394
|
}) => {
|
|
395
|
-
const
|
|
395
|
+
const u = nr([
|
|
396
396
|
n,
|
|
397
397
|
q[B],
|
|
398
398
|
{
|
|
399
|
-
[q[`${B}--disabled`]]:
|
|
399
|
+
[q[`${B}--disabled`]]: i,
|
|
400
400
|
[q[`${B}--negative`]]: r
|
|
401
401
|
}
|
|
402
402
|
]);
|
|
403
|
-
return /* @__PURE__ */ h(er, { className:
|
|
403
|
+
return /* @__PURE__ */ h(er, { className: u, "data-testid": a, htmlFor: t, ...o, children: e });
|
|
404
404
|
};
|
|
405
405
|
function ar(e) {
|
|
406
406
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -416,8 +416,8 @@ var ae = { exports: {} };
|
|
|
416
416
|
var n = {}.hasOwnProperty;
|
|
417
417
|
function t() {
|
|
418
418
|
for (var r = "", o = 0; o < arguments.length; o++) {
|
|
419
|
-
var
|
|
420
|
-
|
|
419
|
+
var u = arguments[o];
|
|
420
|
+
u && (r = i(r, a(u)));
|
|
421
421
|
}
|
|
422
422
|
return r;
|
|
423
423
|
}
|
|
@@ -431,18 +431,18 @@ var ae = { exports: {} };
|
|
|
431
431
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
432
432
|
return r.toString();
|
|
433
433
|
var o = "";
|
|
434
|
-
for (var
|
|
435
|
-
n.call(r,
|
|
434
|
+
for (var u in r)
|
|
435
|
+
n.call(r, u) && r[u] && (o = i(o, u));
|
|
436
436
|
return o;
|
|
437
437
|
}
|
|
438
|
-
function
|
|
438
|
+
function i(r, o) {
|
|
439
439
|
return o ? r ? r + " " + o : r + o : r;
|
|
440
440
|
}
|
|
441
441
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
442
442
|
})();
|
|
443
443
|
})(ae);
|
|
444
|
-
var
|
|
445
|
-
const
|
|
444
|
+
var ur = ae.exports;
|
|
445
|
+
const ir = /* @__PURE__ */ ar(ur), O = {
|
|
446
446
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
447
447
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
448
448
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -468,29 +468,29 @@ const ur = /* @__PURE__ */ ar(ir), O = {
|
|
|
468
468
|
ADDITIONAL100MEDIUM: "additional-100-medium",
|
|
469
469
|
OVERLINE100: "overline-100",
|
|
470
470
|
OVERLINE200: "overline-200"
|
|
471
|
-
}, E = "purpur-paragraph",
|
|
471
|
+
}, E = "purpur-paragraph", ue = ({
|
|
472
472
|
["data-testid"]: e,
|
|
473
473
|
children: n,
|
|
474
474
|
className: t,
|
|
475
475
|
disabled: a,
|
|
476
|
-
enableHyphenation:
|
|
476
|
+
enableHyphenation: i = !1,
|
|
477
477
|
negative: r = !1,
|
|
478
478
|
variant: o = cr.PARAGRAPH100,
|
|
479
|
-
...
|
|
479
|
+
...u
|
|
480
480
|
}) => {
|
|
481
|
-
const c =
|
|
481
|
+
const c = ir([
|
|
482
482
|
t,
|
|
483
483
|
O[E],
|
|
484
484
|
O[`${E}--${o}`],
|
|
485
485
|
{
|
|
486
|
-
[O[`${E}--hyphens`]]:
|
|
486
|
+
[O[`${E}--hyphens`]]: i,
|
|
487
487
|
[O[`${E}--disabled`]]: a,
|
|
488
488
|
[O[`${E}--negative`]]: r
|
|
489
489
|
}
|
|
490
490
|
]);
|
|
491
|
-
return /* @__PURE__ */ h("p", { ...
|
|
491
|
+
return /* @__PURE__ */ h("p", { ...u, className: c, "data-testid": e, children: n });
|
|
492
492
|
};
|
|
493
|
-
|
|
493
|
+
ue.displayName = "Paragraph";
|
|
494
494
|
function w() {
|
|
495
495
|
return w = Object.assign ? Object.assign.bind() : function(e) {
|
|
496
496
|
for (var n = 1; n < arguments.length; n++) {
|
|
@@ -503,34 +503,34 @@ function w() {
|
|
|
503
503
|
function sr(e, n) {
|
|
504
504
|
typeof e == "function" ? e(n) : e != null && (e.current = n);
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function ie(...e) {
|
|
507
507
|
return (n) => e.forEach(
|
|
508
508
|
(t) => sr(t, n)
|
|
509
509
|
);
|
|
510
510
|
}
|
|
511
511
|
function ce(...e) {
|
|
512
|
-
return Z(
|
|
512
|
+
return Z(ie(...e), e);
|
|
513
513
|
}
|
|
514
514
|
function lr(e, n = []) {
|
|
515
515
|
let t = [];
|
|
516
516
|
function a(r, o) {
|
|
517
|
-
const
|
|
517
|
+
const u = /* @__PURE__ */ V(o), c = t.length;
|
|
518
518
|
t = [
|
|
519
519
|
...t,
|
|
520
520
|
o
|
|
521
521
|
];
|
|
522
522
|
function s(l) {
|
|
523
|
-
const { scope: f, children:
|
|
524
|
-
() =>
|
|
525
|
-
Object.values(
|
|
523
|
+
const { scope: f, children: _, ...v } = l, R = (f == null ? void 0 : f[e][c]) || u, x = M(
|
|
524
|
+
() => v,
|
|
525
|
+
Object.values(v)
|
|
526
526
|
);
|
|
527
527
|
return /* @__PURE__ */ p(R.Provider, {
|
|
528
528
|
value: x
|
|
529
|
-
},
|
|
529
|
+
}, _);
|
|
530
530
|
}
|
|
531
531
|
function d(l, f) {
|
|
532
|
-
const
|
|
533
|
-
if (
|
|
532
|
+
const _ = (f == null ? void 0 : f[e][c]) || u, v = _e(_);
|
|
533
|
+
if (v) return v;
|
|
534
534
|
if (o !== void 0) return o;
|
|
535
535
|
throw new Error(`\`${l}\` must be used within \`${r}\``);
|
|
536
536
|
}
|
|
@@ -539,27 +539,27 @@ function lr(e, n = []) {
|
|
|
539
539
|
d
|
|
540
540
|
];
|
|
541
541
|
}
|
|
542
|
-
const
|
|
542
|
+
const i = () => {
|
|
543
543
|
const r = t.map((o) => /* @__PURE__ */ V(o));
|
|
544
|
-
return function(
|
|
545
|
-
const c = (
|
|
544
|
+
return function(u) {
|
|
545
|
+
const c = (u == null ? void 0 : u[e]) || r;
|
|
546
546
|
return M(
|
|
547
547
|
() => ({
|
|
548
548
|
[`__scope${e}`]: {
|
|
549
|
-
...
|
|
549
|
+
...u,
|
|
550
550
|
[e]: c
|
|
551
551
|
}
|
|
552
552
|
}),
|
|
553
553
|
[
|
|
554
|
-
|
|
554
|
+
u,
|
|
555
555
|
c
|
|
556
556
|
]
|
|
557
557
|
);
|
|
558
558
|
};
|
|
559
559
|
};
|
|
560
|
-
return
|
|
560
|
+
return i.scopeName = e, [
|
|
561
561
|
a,
|
|
562
|
-
pr(
|
|
562
|
+
pr(i, ...n)
|
|
563
563
|
];
|
|
564
564
|
}
|
|
565
565
|
function pr(...e) {
|
|
@@ -567,16 +567,16 @@ function pr(...e) {
|
|
|
567
567
|
if (e.length === 1) return n;
|
|
568
568
|
const t = () => {
|
|
569
569
|
const a = e.map(
|
|
570
|
-
(
|
|
571
|
-
useScope:
|
|
572
|
-
scopeName:
|
|
570
|
+
(i) => ({
|
|
571
|
+
useScope: i(),
|
|
572
|
+
scopeName: i.scopeName
|
|
573
573
|
})
|
|
574
574
|
);
|
|
575
575
|
return function(r) {
|
|
576
|
-
const o = a.reduce((
|
|
576
|
+
const o = a.reduce((u, { useScope: c, scopeName: s }) => {
|
|
577
577
|
const l = c(r)[`__scope${s}`];
|
|
578
578
|
return {
|
|
579
|
-
...
|
|
579
|
+
...u,
|
|
580
580
|
...l
|
|
581
581
|
};
|
|
582
582
|
}, {});
|
|
@@ -593,8 +593,8 @@ function pr(...e) {
|
|
|
593
593
|
return t.scopeName = n.scopeName, t;
|
|
594
594
|
}
|
|
595
595
|
function J(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
596
|
-
return function(
|
|
597
|
-
if (e == null || e(
|
|
596
|
+
return function(i) {
|
|
597
|
+
if (e == null || e(i), t === !1 || !i.defaultPrevented) return n == null ? void 0 : n(i);
|
|
598
598
|
};
|
|
599
599
|
}
|
|
600
600
|
function se(e) {
|
|
@@ -611,19 +611,19 @@ function se(e) {
|
|
|
611
611
|
}
|
|
612
612
|
function dr({ prop: e, defaultProp: n, onChange: t = () => {
|
|
613
613
|
} }) {
|
|
614
|
-
const [a,
|
|
614
|
+
const [a, i] = fr({
|
|
615
615
|
defaultProp: n,
|
|
616
616
|
onChange: t
|
|
617
|
-
}), r = e !== void 0, o = r ? e : a,
|
|
617
|
+
}), r = e !== void 0, o = r ? e : a, u = se(t), c = Z((s) => {
|
|
618
618
|
if (r) {
|
|
619
619
|
const l = typeof s == "function" ? s(e) : s;
|
|
620
|
-
l !== e &&
|
|
621
|
-
} else
|
|
620
|
+
l !== e && u(l);
|
|
621
|
+
} else i(s);
|
|
622
622
|
}, [
|
|
623
623
|
r,
|
|
624
624
|
e,
|
|
625
|
-
|
|
626
|
-
|
|
625
|
+
i,
|
|
626
|
+
u
|
|
627
627
|
]);
|
|
628
628
|
return [
|
|
629
629
|
o,
|
|
@@ -631,12 +631,12 @@ function dr({ prop: e, defaultProp: n, onChange: t = () => {
|
|
|
631
631
|
];
|
|
632
632
|
}
|
|
633
633
|
function fr({ defaultProp: e, onChange: n }) {
|
|
634
|
-
const t = I(e), [a] = t,
|
|
634
|
+
const t = I(e), [a] = t, i = $(a), r = se(n);
|
|
635
635
|
return A(() => {
|
|
636
|
-
|
|
636
|
+
i.current !== a && (r(a), i.current = a);
|
|
637
637
|
}, [
|
|
638
638
|
a,
|
|
639
|
-
|
|
639
|
+
i,
|
|
640
640
|
r
|
|
641
641
|
]), t;
|
|
642
642
|
}
|
|
@@ -649,7 +649,7 @@ function hr(e) {
|
|
|
649
649
|
e
|
|
650
650
|
]);
|
|
651
651
|
}
|
|
652
|
-
const H = globalThis != null && globalThis.document ?
|
|
652
|
+
const H = globalThis != null && globalThis.document ? ve : () => {
|
|
653
653
|
};
|
|
654
654
|
function mr(e) {
|
|
655
655
|
const [n, t] = I(void 0);
|
|
@@ -659,18 +659,18 @@ function mr(e) {
|
|
|
659
659
|
width: e.offsetWidth,
|
|
660
660
|
height: e.offsetHeight
|
|
661
661
|
});
|
|
662
|
-
const a = new ResizeObserver((
|
|
663
|
-
if (!Array.isArray(
|
|
664
|
-
const r =
|
|
665
|
-
let o,
|
|
662
|
+
const a = new ResizeObserver((i) => {
|
|
663
|
+
if (!Array.isArray(i) || !i.length) return;
|
|
664
|
+
const r = i[0];
|
|
665
|
+
let o, u;
|
|
666
666
|
if ("borderBoxSize" in r) {
|
|
667
667
|
const c = r.borderBoxSize, s = Array.isArray(c) ? c[0] : c;
|
|
668
|
-
o = s.inlineSize,
|
|
668
|
+
o = s.inlineSize, u = s.blockSize;
|
|
669
669
|
} else
|
|
670
|
-
o = e.offsetWidth,
|
|
670
|
+
o = e.offsetWidth, u = e.offsetHeight;
|
|
671
671
|
t({
|
|
672
672
|
width: o,
|
|
673
|
-
height:
|
|
673
|
+
height: u
|
|
674
674
|
});
|
|
675
675
|
});
|
|
676
676
|
return a.observe(e, {
|
|
@@ -682,23 +682,23 @@ function mr(e) {
|
|
|
682
682
|
e
|
|
683
683
|
]), n;
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function br(e, n) {
|
|
686
686
|
return ge((t, a) => {
|
|
687
|
-
const
|
|
688
|
-
return
|
|
687
|
+
const i = n[t][a];
|
|
688
|
+
return i ?? t;
|
|
689
689
|
}, e);
|
|
690
690
|
}
|
|
691
691
|
const le = (e) => {
|
|
692
|
-
const { present: n, children: t } = e, a =
|
|
692
|
+
const { present: n, children: t } = e, a = _r(n), i = typeof t == "function" ? t({
|
|
693
693
|
present: a.isPresent
|
|
694
|
-
}) :
|
|
695
|
-
return typeof t == "function" || a.isPresent ? /* @__PURE__ */ j(
|
|
694
|
+
}) : b.only(t), r = ce(a.ref, i.ref);
|
|
695
|
+
return typeof t == "function" || a.isPresent ? /* @__PURE__ */ j(i, {
|
|
696
696
|
ref: r
|
|
697
697
|
}) : null;
|
|
698
698
|
};
|
|
699
699
|
le.displayName = "Presence";
|
|
700
|
-
function
|
|
701
|
-
const [n, t] = I(), a = $({}),
|
|
700
|
+
function _r(e) {
|
|
701
|
+
const [n, t] = I(), a = $({}), i = $(e), r = $("none"), o = e ? "mounted" : "unmounted", [u, c] = br(o, {
|
|
702
702
|
mounted: {
|
|
703
703
|
UNMOUNT: "unmounted",
|
|
704
704
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -713,14 +713,14 @@ function br(e) {
|
|
|
713
713
|
});
|
|
714
714
|
return A(() => {
|
|
715
715
|
const s = D(a.current);
|
|
716
|
-
r.current =
|
|
716
|
+
r.current = u === "mounted" ? s : "none";
|
|
717
717
|
}, [
|
|
718
|
-
|
|
718
|
+
u
|
|
719
719
|
]), H(() => {
|
|
720
|
-
const s = a.current, d =
|
|
720
|
+
const s = a.current, d = i.current;
|
|
721
721
|
if (d !== e) {
|
|
722
|
-
const f = r.current,
|
|
723
|
-
e ? c("MOUNT") :
|
|
722
|
+
const f = r.current, _ = D(s);
|
|
723
|
+
e ? c("MOUNT") : _ === "none" || (s == null ? void 0 : s.display) === "none" ? c("UNMOUNT") : c(d && f !== _ ? "ANIMATION_OUT" : "UNMOUNT"), i.current = e;
|
|
724
724
|
}
|
|
725
725
|
}, [
|
|
726
726
|
e,
|
|
@@ -728,8 +728,8 @@ function br(e) {
|
|
|
728
728
|
]), H(() => {
|
|
729
729
|
if (n) {
|
|
730
730
|
const s = (l) => {
|
|
731
|
-
const
|
|
732
|
-
l.target === n &&
|
|
731
|
+
const _ = D(a.current).includes(l.animationName);
|
|
732
|
+
l.target === n && _ && $e(
|
|
733
733
|
() => c("ANIMATION_END")
|
|
734
734
|
);
|
|
735
735
|
}, d = (l) => {
|
|
@@ -747,7 +747,7 @@ function br(e) {
|
|
|
747
747
|
isPresent: [
|
|
748
748
|
"mounted",
|
|
749
749
|
"unmountSuspended"
|
|
750
|
-
].includes(
|
|
750
|
+
].includes(u),
|
|
751
751
|
ref: Z((s) => {
|
|
752
752
|
s && (a.current = getComputedStyle(s)), t(s);
|
|
753
753
|
}, [])
|
|
@@ -757,12 +757,12 @@ function D(e) {
|
|
|
757
757
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
758
758
|
}
|
|
759
759
|
const pe = /* @__PURE__ */ g((e, n) => {
|
|
760
|
-
const { children: t, ...a } = e,
|
|
760
|
+
const { children: t, ...a } = e, i = b.toArray(t), r = i.find(gr);
|
|
761
761
|
if (r) {
|
|
762
|
-
const o = r.props.children,
|
|
762
|
+
const o = r.props.children, u = i.map((c) => c === r ? b.count(o) > 1 ? b.only(null) : /* @__PURE__ */ N(o) ? o.props.children : null : c);
|
|
763
763
|
return /* @__PURE__ */ p(F, w({}, a, {
|
|
764
764
|
ref: n
|
|
765
|
-
}), /* @__PURE__ */ N(o) ? /* @__PURE__ */ j(o, void 0,
|
|
765
|
+
}), /* @__PURE__ */ N(o) ? /* @__PURE__ */ j(o, void 0, u) : null);
|
|
766
766
|
}
|
|
767
767
|
return /* @__PURE__ */ p(F, w({}, a, {
|
|
768
768
|
ref: n
|
|
@@ -773,27 +773,27 @@ const F = /* @__PURE__ */ g((e, n) => {
|
|
|
773
773
|
const { children: t, ...a } = e;
|
|
774
774
|
return /* @__PURE__ */ N(t) ? /* @__PURE__ */ j(t, {
|
|
775
775
|
...$r(a, t.props),
|
|
776
|
-
ref: n ?
|
|
777
|
-
}) :
|
|
776
|
+
ref: n ? ie(n, t.ref) : t.ref
|
|
777
|
+
}) : b.count(t) > 1 ? b.only(null) : null;
|
|
778
778
|
});
|
|
779
779
|
F.displayName = "SlotClone";
|
|
780
|
-
const
|
|
780
|
+
const vr = ({ children: e }) => /* @__PURE__ */ p(Y, null, e);
|
|
781
781
|
function gr(e) {
|
|
782
|
-
return /* @__PURE__ */ N(e) && e.type ===
|
|
782
|
+
return /* @__PURE__ */ N(e) && e.type === vr;
|
|
783
783
|
}
|
|
784
784
|
function $r(e, n) {
|
|
785
785
|
const t = {
|
|
786
786
|
...n
|
|
787
787
|
};
|
|
788
788
|
for (const a in n) {
|
|
789
|
-
const
|
|
790
|
-
/^on[A-Z]/.test(a) ?
|
|
791
|
-
r(...
|
|
792
|
-
} :
|
|
793
|
-
...
|
|
789
|
+
const i = e[a], r = n[a];
|
|
790
|
+
/^on[A-Z]/.test(a) ? i && r ? t[a] = (...u) => {
|
|
791
|
+
r(...u), i(...u);
|
|
792
|
+
} : i && (t[a] = i) : a === "style" ? t[a] = {
|
|
793
|
+
...i,
|
|
794
794
|
...r
|
|
795
795
|
} : a === "className" && (t[a] = [
|
|
796
|
-
|
|
796
|
+
i,
|
|
797
797
|
r
|
|
798
798
|
].filter(Boolean).join(" "));
|
|
799
799
|
}
|
|
@@ -820,12 +820,12 @@ const xr = [
|
|
|
820
820
|
"svg",
|
|
821
821
|
"ul"
|
|
822
822
|
], de = xr.reduce((e, n) => {
|
|
823
|
-
const t = /* @__PURE__ */ g((a,
|
|
824
|
-
const { asChild: r, ...o } = a,
|
|
823
|
+
const t = /* @__PURE__ */ g((a, i) => {
|
|
824
|
+
const { asChild: r, ...o } = a, u = r ? pe : n;
|
|
825
825
|
return A(() => {
|
|
826
826
|
window[Symbol.for("radix-ui")] = !0;
|
|
827
|
-
}, []), /* @__PURE__ */ p(
|
|
828
|
-
ref:
|
|
827
|
+
}, []), /* @__PURE__ */ p(u, w({}, o, {
|
|
828
|
+
ref: i
|
|
829
829
|
}));
|
|
830
830
|
});
|
|
831
831
|
return t.displayName = `Primitive.${n}`, {
|
|
@@ -833,18 +833,18 @@ const xr = [
|
|
|
833
833
|
[n]: t
|
|
834
834
|
};
|
|
835
835
|
}, {}), fe = "Checkbox", [yr, zr] = lr(fe), [Nr, wr] = yr(fe), Sr = /* @__PURE__ */ g((e, n) => {
|
|
836
|
-
const { __scopeCheckbox: t, name: a, checked:
|
|
836
|
+
const { __scopeCheckbox: t, name: a, checked: i, defaultChecked: r, required: o, disabled: u, value: c = "on", onCheckedChange: s, ...d } = e, [l, f] = I(null), _ = ce(
|
|
837
837
|
n,
|
|
838
838
|
(m) => f(m)
|
|
839
|
-
),
|
|
840
|
-
prop:
|
|
839
|
+
), v = $(!1), R = l ? !!l.closest("form") : !0, [x = !1, L] = dr({
|
|
840
|
+
prop: i,
|
|
841
841
|
defaultProp: r,
|
|
842
842
|
onChange: s
|
|
843
|
-
}),
|
|
843
|
+
}), be = $(x);
|
|
844
844
|
return A(() => {
|
|
845
845
|
const m = l == null ? void 0 : l.form;
|
|
846
846
|
if (m) {
|
|
847
|
-
const P = () => L(
|
|
847
|
+
const P = () => L(be.current);
|
|
848
848
|
return m.addEventListener("reset", P), () => m.removeEventListener("reset", P);
|
|
849
849
|
}
|
|
850
850
|
}, [
|
|
@@ -853,46 +853,46 @@ const xr = [
|
|
|
853
853
|
]), /* @__PURE__ */ p(Nr, {
|
|
854
854
|
scope: t,
|
|
855
855
|
state: x,
|
|
856
|
-
disabled:
|
|
856
|
+
disabled: u
|
|
857
857
|
}, /* @__PURE__ */ p(de.button, w({
|
|
858
858
|
type: "button",
|
|
859
859
|
role: "checkbox",
|
|
860
860
|
"aria-checked": S(x) ? "mixed" : x,
|
|
861
861
|
"aria-required": o,
|
|
862
862
|
"data-state": he(x),
|
|
863
|
-
"data-disabled":
|
|
864
|
-
disabled:
|
|
863
|
+
"data-disabled": u ? "" : void 0,
|
|
864
|
+
disabled: u,
|
|
865
865
|
value: c
|
|
866
866
|
}, d, {
|
|
867
|
-
ref:
|
|
867
|
+
ref: _,
|
|
868
868
|
onKeyDown: J(e.onKeyDown, (m) => {
|
|
869
869
|
m.key === "Enter" && m.preventDefault();
|
|
870
870
|
}),
|
|
871
871
|
onClick: J(e.onClick, (m) => {
|
|
872
872
|
L(
|
|
873
873
|
(P) => S(P) ? !0 : !P
|
|
874
|
-
), R && (
|
|
874
|
+
), R && (v.current = m.isPropagationStopped(), v.current || m.stopPropagation());
|
|
875
875
|
})
|
|
876
876
|
})), R && /* @__PURE__ */ p(kr, {
|
|
877
877
|
control: l,
|
|
878
|
-
bubbles: !
|
|
878
|
+
bubbles: !v.current,
|
|
879
879
|
name: a,
|
|
880
880
|
value: c,
|
|
881
881
|
checked: x,
|
|
882
882
|
required: o,
|
|
883
|
-
disabled:
|
|
883
|
+
disabled: u,
|
|
884
884
|
style: {
|
|
885
885
|
transform: "translateX(-100%)"
|
|
886
886
|
}
|
|
887
887
|
}));
|
|
888
888
|
}), Ar = "CheckboxIndicator", Cr = /* @__PURE__ */ g((e, n) => {
|
|
889
|
-
const { __scopeCheckbox: t, forceMount: a, ...
|
|
889
|
+
const { __scopeCheckbox: t, forceMount: a, ...i } = e, r = wr(Ar, t);
|
|
890
890
|
return /* @__PURE__ */ p(le, {
|
|
891
891
|
present: a || S(r.state) || r.state === !0
|
|
892
892
|
}, /* @__PURE__ */ p(de.span, w({
|
|
893
893
|
"data-state": he(r.state),
|
|
894
894
|
"data-disabled": r.disabled ? "" : void 0
|
|
895
|
-
},
|
|
895
|
+
}, i, {
|
|
896
896
|
ref: n,
|
|
897
897
|
style: {
|
|
898
898
|
pointerEvents: "none",
|
|
@@ -900,7 +900,7 @@ const xr = [
|
|
|
900
900
|
}
|
|
901
901
|
})));
|
|
902
902
|
}), kr = (e) => {
|
|
903
|
-
const { control: n, checked: t, bubbles: a = !0, ...
|
|
903
|
+
const { control: n, checked: t, bubbles: a = !0, ...i } = e, r = $(null), o = hr(t), u = mr(n);
|
|
904
904
|
return A(() => {
|
|
905
905
|
const c = r.current, s = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(s, "checked").set;
|
|
906
906
|
if (o !== t && l) {
|
|
@@ -917,12 +917,12 @@ const xr = [
|
|
|
917
917
|
type: "checkbox",
|
|
918
918
|
"aria-hidden": !0,
|
|
919
919
|
defaultChecked: S(t) ? !1 : t
|
|
920
|
-
},
|
|
920
|
+
}, i, {
|
|
921
921
|
tabIndex: -1,
|
|
922
922
|
ref: r,
|
|
923
923
|
style: {
|
|
924
924
|
...e.style,
|
|
925
|
-
...
|
|
925
|
+
...u,
|
|
926
926
|
position: "absolute",
|
|
927
927
|
pointerEvents: "none",
|
|
928
928
|
opacity: 0,
|
|
@@ -951,8 +951,8 @@ var me = { exports: {} };
|
|
|
951
951
|
var n = {}.hasOwnProperty;
|
|
952
952
|
function t() {
|
|
953
953
|
for (var r = "", o = 0; o < arguments.length; o++) {
|
|
954
|
-
var
|
|
955
|
-
|
|
954
|
+
var u = arguments[o];
|
|
955
|
+
u && (r = i(r, a.call(this, u)));
|
|
956
956
|
}
|
|
957
957
|
return r;
|
|
958
958
|
}
|
|
@@ -966,11 +966,11 @@ var me = { exports: {} };
|
|
|
966
966
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
967
967
|
return r.toString();
|
|
968
968
|
var o = "";
|
|
969
|
-
for (var
|
|
970
|
-
n.call(r,
|
|
969
|
+
for (var u in r)
|
|
970
|
+
n.call(r, u) && r[u] && (o = i(o, this && this[u] || u));
|
|
971
971
|
return o;
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function i(r, o) {
|
|
974
974
|
return o ? r ? r + " " + o : r + o : r;
|
|
975
975
|
}
|
|
976
976
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
@@ -991,18 +991,18 @@ const jr = /* @__PURE__ */ Er(Mr), Rr = {
|
|
|
991
991
|
checked: n,
|
|
992
992
|
className: t,
|
|
993
993
|
error: a = !1,
|
|
994
|
-
errorText:
|
|
994
|
+
errorText: i,
|
|
995
995
|
label: r,
|
|
996
996
|
onChange: o,
|
|
997
|
-
...
|
|
997
|
+
...u
|
|
998
998
|
}, c) => {
|
|
999
|
-
const s =
|
|
999
|
+
const s = i && !n, d = a && !n;
|
|
1000
1000
|
return /* @__PURE__ */ z("div", { className: C([t, `${y}__wrapper`]), children: [
|
|
1001
1001
|
/* @__PURE__ */ z("div", { className: C([t, `${y}__container`]), children: [
|
|
1002
1002
|
/* @__PURE__ */ h(
|
|
1003
1003
|
Pr,
|
|
1004
1004
|
{
|
|
1005
|
-
...
|
|
1005
|
+
...u,
|
|
1006
1006
|
checked: n,
|
|
1007
1007
|
className: C([
|
|
1008
1008
|
y,
|
|
@@ -1034,15 +1034,15 @@ const jr = /* @__PURE__ */ Er(Mr), Rr = {
|
|
|
1034
1034
|
r && /* @__PURE__ */ h(
|
|
1035
1035
|
or,
|
|
1036
1036
|
{
|
|
1037
|
-
htmlFor:
|
|
1037
|
+
htmlFor: u.id,
|
|
1038
1038
|
"data-testid": e && `${e}-label`,
|
|
1039
|
-
disabled:
|
|
1039
|
+
disabled: u.disabled,
|
|
1040
1040
|
className: C(`${y}__label`),
|
|
1041
|
-
children: /* @__PURE__ */ h(
|
|
1041
|
+
children: /* @__PURE__ */ h(ue, { variant: "paragraph-100", disabled: u.disabled, children: `${u.required ? "* " : ""}${r}` })
|
|
1042
1042
|
}
|
|
1043
1043
|
)
|
|
1044
1044
|
] }),
|
|
1045
|
-
s && /* @__PURE__ */ h(Re, { "data-testid": e && `${e}-error-text`, children:
|
|
1045
|
+
s && /* @__PURE__ */ h(Re, { "data-testid": e && `${e}-error-text`, children: i })
|
|
1046
1046
|
] });
|
|
1047
1047
|
}, Ir = g(Dr);
|
|
1048
1048
|
Ir.displayName = "Checkbox";
|