@purpurds/checkbox 5.16.1 → 5.18.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 +4 -4
- package/dist/checkbox.cjs.js +7 -7
- package/dist/checkbox.cjs.js.map +1 -1
- package/dist/checkbox.d.ts +5 -0
- package/dist/checkbox.d.ts.map +1 -1
- package/dist/checkbox.es.js +253 -247
- package/dist/checkbox.es.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +6 -6
- package/src/checkbox.module.scss +3 -3
- package/src/checkbox.stories.tsx +3 -0
- package/src/checkbox.tsx +21 -9
package/dist/checkbox.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as g, Children as v, isValidElement as
|
|
3
|
-
import { flushSync as
|
|
4
|
-
function
|
|
1
|
+
import { jsxs as z, jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g, Children as v, isValidElement as N, createElement as p, cloneElement as j, useEffect as A, Fragment as Y, useCallback as F, createContext as Z, useMemo as M, useContext as ve, useRef as $, useState as L, useLayoutEffect as be, useReducer as _e } from "react";
|
|
3
|
+
import { flushSync as ge } from "react-dom";
|
|
4
|
+
function $e(e) {
|
|
5
5
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
6
|
}
|
|
7
|
-
var
|
|
7
|
+
var Q = { exports: {} };
|
|
8
8
|
/*!
|
|
9
9
|
Copyright (c) 2018 Jed Watson.
|
|
10
10
|
Licensed under the MIT License (MIT), see
|
|
@@ -39,9 +39,9 @@ var ee = { exports: {} };
|
|
|
39
39
|
}
|
|
40
40
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
41
41
|
})();
|
|
42
|
-
})(
|
|
43
|
-
var
|
|
44
|
-
const
|
|
42
|
+
})(Q);
|
|
43
|
+
var xe = Q.exports;
|
|
44
|
+
const ye = /* @__PURE__ */ $e(xe), Ne = {
|
|
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,32 +49,32 @@ const Ne = /* @__PURE__ */ xe(ye), we = {
|
|
|
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
|
+
}, we = {
|
|
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
|
+
}, Se = ye.bind(Ne), V = "purpur-icon", Ae = "md", Ce = (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 ${Ce(t)}>${a}${e}</svg>`;
|
|
65
|
+
}, Pe = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Oe = ({
|
|
66
66
|
["data-testid"]: e,
|
|
67
67
|
svg: n,
|
|
68
68
|
allyTitle: t,
|
|
69
69
|
className: a,
|
|
70
|
-
size: u =
|
|
70
|
+
size: u = Ae,
|
|
71
71
|
...r
|
|
72
72
|
}) => {
|
|
73
73
|
const o = ke({
|
|
74
|
-
content:
|
|
74
|
+
content: Pe(n.svg),
|
|
75
75
|
title: t
|
|
76
|
-
}), i =
|
|
77
|
-
return /* @__PURE__ */
|
|
76
|
+
}), i = Se(a, V, `${V}--${u}`);
|
|
77
|
+
return /* @__PURE__ */ h(
|
|
78
78
|
"span",
|
|
79
79
|
{
|
|
80
80
|
"aria-label": t,
|
|
@@ -85,10 +85,10 @@ const Ne = /* @__PURE__ */ xe(ye), we = {
|
|
|
85
85
|
}
|
|
86
86
|
);
|
|
87
87
|
};
|
|
88
|
-
function
|
|
88
|
+
function Ee(e) {
|
|
89
89
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
90
90
|
}
|
|
91
|
-
var
|
|
91
|
+
var ee = { exports: {} };
|
|
92
92
|
/*!
|
|
93
93
|
Copyright (c) 2018 Jed Watson.
|
|
94
94
|
Licensed under the MIT License (MIT), see
|
|
@@ -123,35 +123,35 @@ var re = { exports: {} };
|
|
|
123
123
|
}
|
|
124
124
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
125
125
|
})();
|
|
126
|
-
})(
|
|
127
|
-
var
|
|
128
|
-
const
|
|
126
|
+
})(ee);
|
|
127
|
+
var Me = ee.exports;
|
|
128
|
+
const je = /* @__PURE__ */ Ee(Me), G = {
|
|
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
|
+
}, K = "purpur-field-error-text", Re = ({
|
|
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__ */ z(
|
|
138
138
|
"div",
|
|
139
139
|
{
|
|
140
|
-
className:
|
|
140
|
+
className: je([t, G[K]]),
|
|
141
141
|
"data-testid": e,
|
|
142
142
|
"aria-live": "assertive",
|
|
143
143
|
"aria-relevant": a,
|
|
144
144
|
...u,
|
|
145
145
|
children: [
|
|
146
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ h(Oe, { svg: we, size: "xs", className: G[`${K}__icon`] }),
|
|
147
147
|
n
|
|
148
148
|
]
|
|
149
149
|
}
|
|
150
150
|
);
|
|
151
|
-
function
|
|
151
|
+
function De(e) {
|
|
152
152
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
153
153
|
}
|
|
154
|
-
var
|
|
154
|
+
var re = { exports: {} };
|
|
155
155
|
/*!
|
|
156
156
|
Copyright (c) 2018 Jed Watson.
|
|
157
157
|
Licensed under the MIT License (MIT), see
|
|
@@ -186,9 +186,9 @@ var te = { exports: {} };
|
|
|
186
186
|
}
|
|
187
187
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
188
188
|
})();
|
|
189
|
-
})(
|
|
190
|
-
var
|
|
191
|
-
const
|
|
189
|
+
})(re);
|
|
190
|
+
var Le = re.exports;
|
|
191
|
+
const qe = /* @__PURE__ */ De(Le), Ie = {
|
|
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,37 +196,37 @@ const Ie = /* @__PURE__ */ Le(qe), Be = {
|
|
|
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
|
+
}, Be = {
|
|
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
|
+
}, ze = {
|
|
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
|
+
}, Te = qe.bind(Ie), X = "purpur-icon", Ue = "md", He = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), Fe = ({ 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 ${He(t)}>${a}${e}</svg>`;
|
|
217
|
+
}, Ze = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), W = ({
|
|
218
218
|
["data-testid"]: e,
|
|
219
219
|
svg: n,
|
|
220
220
|
allyTitle: t,
|
|
221
221
|
className: a,
|
|
222
|
-
size: u =
|
|
222
|
+
size: u = Ue,
|
|
223
223
|
...r
|
|
224
224
|
}) => {
|
|
225
|
-
const o =
|
|
226
|
-
content:
|
|
225
|
+
const o = Fe({
|
|
226
|
+
content: Ze(n.svg),
|
|
227
227
|
title: t
|
|
228
|
-
}), i =
|
|
229
|
-
return /* @__PURE__ */
|
|
228
|
+
}), i = Te(a, X, `${X}--${u}`);
|
|
229
|
+
return /* @__PURE__ */ h(
|
|
230
230
|
"span",
|
|
231
231
|
{
|
|
232
232
|
"aria-label": t,
|
|
@@ -237,49 +237,49 @@ const Ie = /* @__PURE__ */ Le(qe), Be = {
|
|
|
237
237
|
}
|
|
238
238
|
);
|
|
239
239
|
};
|
|
240
|
-
function
|
|
241
|
-
return
|
|
240
|
+
function k() {
|
|
241
|
+
return k = Object.assign ? Object.assign.bind() : function(e) {
|
|
242
242
|
for (var n = 1; n < arguments.length; n++) {
|
|
243
243
|
var t = arguments[n];
|
|
244
244
|
for (var a in t) ({}).hasOwnProperty.call(t, a) && (e[a] = t[a]);
|
|
245
245
|
}
|
|
246
246
|
return e;
|
|
247
|
-
},
|
|
247
|
+
}, k.apply(null, arguments);
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function Ve(e, n) {
|
|
250
250
|
typeof e == "function" ? e(n) : e != null && (e.current = n);
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function Ge(...e) {
|
|
253
253
|
return (n) => e.forEach(
|
|
254
|
-
(t) =>
|
|
254
|
+
(t) => Ve(t, n)
|
|
255
255
|
);
|
|
256
256
|
}
|
|
257
|
-
const
|
|
258
|
-
const { children: t, ...a } = e, u = v.toArray(t), r = u.find(
|
|
257
|
+
const te = /* @__PURE__ */ g((e, n) => {
|
|
258
|
+
const { children: t, ...a } = e, u = v.toArray(t), r = u.find(Xe);
|
|
259
259
|
if (r) {
|
|
260
|
-
const o = r.props.children, i = u.map((c) => c === r ? v.count(o) > 1 ? v.only(null) : /* @__PURE__ */
|
|
261
|
-
return /* @__PURE__ */ p(
|
|
260
|
+
const o = r.props.children, i = u.map((c) => c === r ? v.count(o) > 1 ? v.only(null) : /* @__PURE__ */ N(o) ? o.props.children : null : c);
|
|
261
|
+
return /* @__PURE__ */ p(T, k({}, a, {
|
|
262
262
|
ref: n
|
|
263
|
-
}), /* @__PURE__ */
|
|
263
|
+
}), /* @__PURE__ */ N(o) ? /* @__PURE__ */ j(o, void 0, i) : null);
|
|
264
264
|
}
|
|
265
|
-
return /* @__PURE__ */ p(
|
|
265
|
+
return /* @__PURE__ */ p(T, k({}, a, {
|
|
266
266
|
ref: n
|
|
267
267
|
}), t);
|
|
268
268
|
});
|
|
269
|
-
|
|
270
|
-
const
|
|
269
|
+
te.displayName = "Slot";
|
|
270
|
+
const T = /* @__PURE__ */ g((e, n) => {
|
|
271
271
|
const { children: t, ...a } = e;
|
|
272
|
-
return /* @__PURE__ */
|
|
273
|
-
...
|
|
274
|
-
ref: n ?
|
|
272
|
+
return /* @__PURE__ */ N(t) ? /* @__PURE__ */ j(t, {
|
|
273
|
+
...We(a, t.props),
|
|
274
|
+
ref: n ? Ge(n, t.ref) : t.ref
|
|
275
275
|
}) : v.count(t) > 1 ? v.only(null) : null;
|
|
276
276
|
});
|
|
277
|
-
|
|
278
|
-
const
|
|
279
|
-
function
|
|
280
|
-
return /* @__PURE__ */
|
|
277
|
+
T.displayName = "SlotClone";
|
|
278
|
+
const Ke = ({ children: e }) => /* @__PURE__ */ p(Y, null, e);
|
|
279
|
+
function Xe(e) {
|
|
280
|
+
return /* @__PURE__ */ N(e) && e.type === Ke;
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function We(e, n) {
|
|
283
283
|
const t = {
|
|
284
284
|
...n
|
|
285
285
|
};
|
|
@@ -300,7 +300,7 @@ function Je(e, n) {
|
|
|
300
300
|
...t
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
|
-
const
|
|
303
|
+
const Je = [
|
|
304
304
|
"a",
|
|
305
305
|
"button",
|
|
306
306
|
"div",
|
|
@@ -317,12 +317,12 @@ const Ye = [
|
|
|
317
317
|
"span",
|
|
318
318
|
"svg",
|
|
319
319
|
"ul"
|
|
320
|
-
],
|
|
320
|
+
], Ye = Je.reduce((e, n) => {
|
|
321
321
|
const t = /* @__PURE__ */ g((a, u) => {
|
|
322
|
-
const { asChild: r, ...o } = a, i = r ?
|
|
323
|
-
return
|
|
322
|
+
const { asChild: r, ...o } = a, i = r ? te : n;
|
|
323
|
+
return A(() => {
|
|
324
324
|
window[Symbol.for("radix-ui")] = !0;
|
|
325
|
-
}, []), /* @__PURE__ */ p(i,
|
|
325
|
+
}, []), /* @__PURE__ */ p(i, k({}, o, {
|
|
326
326
|
ref: u
|
|
327
327
|
}));
|
|
328
328
|
});
|
|
@@ -330,17 +330,17 @@ const Ye = [
|
|
|
330
330
|
...e,
|
|
331
331
|
[n]: t
|
|
332
332
|
};
|
|
333
|
-
}, {}),
|
|
333
|
+
}, {}), Qe = /* @__PURE__ */ g((e, n) => /* @__PURE__ */ p(Ye.label, k({}, e, {
|
|
334
334
|
ref: n,
|
|
335
335
|
onMouseDown: (t) => {
|
|
336
336
|
var a;
|
|
337
337
|
(a = e.onMouseDown) === null || a === void 0 || a.call(e, t), !t.defaultPrevented && t.detail > 1 && t.preventDefault();
|
|
338
338
|
}
|
|
339
|
-
}))),
|
|
340
|
-
function
|
|
339
|
+
}))), er = Qe;
|
|
340
|
+
function rr(e) {
|
|
341
341
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
342
342
|
}
|
|
343
|
-
var
|
|
343
|
+
var ne = { exports: {} };
|
|
344
344
|
/*!
|
|
345
345
|
Copyright (c) 2018 Jed Watson.
|
|
346
346
|
Licensed under the MIT License (MIT), see
|
|
@@ -375,13 +375,13 @@ var oe = { exports: {} };
|
|
|
375
375
|
}
|
|
376
376
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
377
377
|
})();
|
|
378
|
-
})(
|
|
379
|
-
var
|
|
380
|
-
const
|
|
378
|
+
})(ne);
|
|
379
|
+
var tr = ne.exports;
|
|
380
|
+
const nr = /* @__PURE__ */ rr(tr), I = {
|
|
381
381
|
"purpur-label": "_purpur-label_12cfi_1",
|
|
382
382
|
"purpur-label--negative": "_purpur-label--negative_12cfi_9",
|
|
383
383
|
"purpur-label--disabled": "_purpur-label--disabled_12cfi_12"
|
|
384
|
-
}, B = "purpur-label",
|
|
384
|
+
}, B = "purpur-label", or = ({
|
|
385
385
|
children: e,
|
|
386
386
|
className: n,
|
|
387
387
|
htmlFor: t,
|
|
@@ -390,7 +390,7 @@ const or = /* @__PURE__ */ tr(nr), I = {
|
|
|
390
390
|
negative: r = !1,
|
|
391
391
|
...o
|
|
392
392
|
}) => {
|
|
393
|
-
const i =
|
|
393
|
+
const i = nr([
|
|
394
394
|
n,
|
|
395
395
|
I[B],
|
|
396
396
|
{
|
|
@@ -398,12 +398,12 @@ const or = /* @__PURE__ */ tr(nr), I = {
|
|
|
398
398
|
[I[`${B}--negative`]]: r
|
|
399
399
|
}
|
|
400
400
|
]);
|
|
401
|
-
return /* @__PURE__ */
|
|
401
|
+
return /* @__PURE__ */ h(er, { className: i, "data-testid": a, htmlFor: t, ...o, children: e });
|
|
402
402
|
};
|
|
403
|
-
function
|
|
403
|
+
function ar(e) {
|
|
404
404
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
405
405
|
}
|
|
406
|
-
var
|
|
406
|
+
var oe = { exports: {} };
|
|
407
407
|
/*!
|
|
408
408
|
Copyright (c) 2018 Jed Watson.
|
|
409
409
|
Licensed under the MIT License (MIT), see
|
|
@@ -438,9 +438,9 @@ var ae = { exports: {} };
|
|
|
438
438
|
}
|
|
439
439
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
440
440
|
})();
|
|
441
|
-
})(
|
|
442
|
-
var
|
|
443
|
-
const
|
|
441
|
+
})(oe);
|
|
442
|
+
var ir = oe.exports;
|
|
443
|
+
const ur = /* @__PURE__ */ ar(ir), O = {
|
|
444
444
|
"purpur-paragraph": "_purpur-paragraph_1rh57_1",
|
|
445
445
|
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
|
|
446
446
|
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
|
|
@@ -455,7 +455,7 @@ const cr = /* @__PURE__ */ ir(ur), O = {
|
|
|
455
455
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
456
456
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
457
457
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
458
|
-
},
|
|
458
|
+
}, cr = {
|
|
459
459
|
PARAGRAPH100: "paragraph-100",
|
|
460
460
|
PARAGRAPH100MEDIUM: "paragraph-100-medium",
|
|
461
461
|
PARAGRAPH100BOLD: "paragraph-100-bold",
|
|
@@ -466,17 +466,17 @@ const cr = /* @__PURE__ */ ir(ur), O = {
|
|
|
466
466
|
ADDITIONAL100MEDIUM: "additional-100-medium",
|
|
467
467
|
OVERLINE100: "overline-100",
|
|
468
468
|
OVERLINE200: "overline-200"
|
|
469
|
-
}, E = "purpur-paragraph",
|
|
469
|
+
}, E = "purpur-paragraph", ae = ({
|
|
470
470
|
["data-testid"]: e,
|
|
471
471
|
children: n,
|
|
472
472
|
className: t,
|
|
473
473
|
disabled: a,
|
|
474
474
|
enableHyphenation: u = !1,
|
|
475
475
|
negative: r = !1,
|
|
476
|
-
variant: o =
|
|
476
|
+
variant: o = cr.PARAGRAPH100,
|
|
477
477
|
...i
|
|
478
478
|
}) => {
|
|
479
|
-
const c =
|
|
479
|
+
const c = ur([
|
|
480
480
|
t,
|
|
481
481
|
O[E],
|
|
482
482
|
O[`${E}--${o}`],
|
|
@@ -486,59 +486,59 @@ const cr = /* @__PURE__ */ ir(ur), O = {
|
|
|
486
486
|
[O[`${E}--negative`]]: r
|
|
487
487
|
}
|
|
488
488
|
]);
|
|
489
|
-
return /* @__PURE__ */
|
|
489
|
+
return /* @__PURE__ */ h("p", { ...i, className: c, "data-testid": e, children: n });
|
|
490
490
|
};
|
|
491
|
-
|
|
492
|
-
function
|
|
493
|
-
return
|
|
491
|
+
ae.displayName = "Paragraph";
|
|
492
|
+
function w() {
|
|
493
|
+
return w = Object.assign ? Object.assign.bind() : function(e) {
|
|
494
494
|
for (var n = 1; n < arguments.length; n++) {
|
|
495
495
|
var t = arguments[n];
|
|
496
496
|
for (var a in t) ({}).hasOwnProperty.call(t, a) && (e[a] = t[a]);
|
|
497
497
|
}
|
|
498
498
|
return e;
|
|
499
|
-
},
|
|
499
|
+
}, w.apply(null, arguments);
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function sr(e, n) {
|
|
502
502
|
typeof e == "function" ? e(n) : e != null && (e.current = n);
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function ie(...e) {
|
|
505
505
|
return (n) => e.forEach(
|
|
506
|
-
(t) =>
|
|
506
|
+
(t) => sr(t, n)
|
|
507
507
|
);
|
|
508
508
|
}
|
|
509
|
-
function
|
|
510
|
-
return
|
|
509
|
+
function ue(...e) {
|
|
510
|
+
return F(ie(...e), e);
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function lr(e, n = []) {
|
|
513
513
|
let t = [];
|
|
514
514
|
function a(r, o) {
|
|
515
|
-
const i = /* @__PURE__ */
|
|
515
|
+
const i = /* @__PURE__ */ Z(o), c = t.length;
|
|
516
516
|
t = [
|
|
517
517
|
...t,
|
|
518
518
|
o
|
|
519
519
|
];
|
|
520
520
|
function s(l) {
|
|
521
|
-
const { scope:
|
|
522
|
-
() =>
|
|
523
|
-
Object.values(
|
|
521
|
+
const { scope: f, children: b, ..._ } = l, R = (f == null ? void 0 : f[e][c]) || i, x = M(
|
|
522
|
+
() => _,
|
|
523
|
+
Object.values(_)
|
|
524
524
|
);
|
|
525
525
|
return /* @__PURE__ */ p(R.Provider, {
|
|
526
526
|
value: x
|
|
527
|
-
},
|
|
527
|
+
}, b);
|
|
528
528
|
}
|
|
529
|
-
function
|
|
530
|
-
const
|
|
531
|
-
if (
|
|
529
|
+
function d(l, f) {
|
|
530
|
+
const b = (f == null ? void 0 : f[e][c]) || i, _ = ve(b);
|
|
531
|
+
if (_) return _;
|
|
532
532
|
if (o !== void 0) return o;
|
|
533
533
|
throw new Error(`\`${l}\` must be used within \`${r}\``);
|
|
534
534
|
}
|
|
535
535
|
return s.displayName = r + "Provider", [
|
|
536
536
|
s,
|
|
537
|
-
|
|
537
|
+
d
|
|
538
538
|
];
|
|
539
539
|
}
|
|
540
540
|
const u = () => {
|
|
541
|
-
const r = t.map((o) => /* @__PURE__ */
|
|
541
|
+
const r = t.map((o) => /* @__PURE__ */ Z(o));
|
|
542
542
|
return function(i) {
|
|
543
543
|
const c = (i == null ? void 0 : i[e]) || r;
|
|
544
544
|
return M(
|
|
@@ -557,10 +557,10 @@ function pr(e, n = []) {
|
|
|
557
557
|
};
|
|
558
558
|
return u.scopeName = e, [
|
|
559
559
|
a,
|
|
560
|
-
|
|
560
|
+
pr(u, ...n)
|
|
561
561
|
];
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function pr(...e) {
|
|
564
564
|
const n = e[0];
|
|
565
565
|
if (e.length === 1) return n;
|
|
566
566
|
const t = () => {
|
|
@@ -590,14 +590,14 @@ function dr(...e) {
|
|
|
590
590
|
};
|
|
591
591
|
return t.scopeName = n.scopeName, t;
|
|
592
592
|
}
|
|
593
|
-
function
|
|
593
|
+
function J(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
594
594
|
return function(u) {
|
|
595
595
|
if (e == null || e(u), t === !1 || !u.defaultPrevented) return n == null ? void 0 : n(u);
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function ce(e) {
|
|
599
599
|
const n = $(e);
|
|
600
|
-
return
|
|
600
|
+
return A(() => {
|
|
601
601
|
n.current = e;
|
|
602
602
|
}), M(
|
|
603
603
|
() => (...t) => {
|
|
@@ -607,12 +607,12 @@ function se(e) {
|
|
|
607
607
|
[]
|
|
608
608
|
);
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function dr({ prop: e, defaultProp: n, onChange: t = () => {
|
|
611
611
|
} }) {
|
|
612
|
-
const [a, u] =
|
|
612
|
+
const [a, u] = fr({
|
|
613
613
|
defaultProp: n,
|
|
614
614
|
onChange: t
|
|
615
|
-
}), r = e !== void 0, o = r ? e : a, i =
|
|
615
|
+
}), r = e !== void 0, o = r ? e : a, i = ce(t), c = F((s) => {
|
|
616
616
|
if (r) {
|
|
617
617
|
const l = typeof s == "function" ? s(e) : s;
|
|
618
618
|
l !== e && i(l);
|
|
@@ -628,9 +628,9 @@ function fr({ prop: e, defaultProp: n, onChange: t = () => {
|
|
|
628
628
|
c
|
|
629
629
|
];
|
|
630
630
|
}
|
|
631
|
-
function
|
|
632
|
-
const t = L(e), [a] = t, u = $(a), r =
|
|
633
|
-
return
|
|
631
|
+
function fr({ defaultProp: e, onChange: n }) {
|
|
632
|
+
const t = L(e), [a] = t, u = $(a), r = ce(n);
|
|
633
|
+
return A(() => {
|
|
634
634
|
u.current !== a && (r(a), u.current = a);
|
|
635
635
|
}, [
|
|
636
636
|
a,
|
|
@@ -638,7 +638,7 @@ function hr({ defaultProp: e, onChange: n }) {
|
|
|
638
638
|
r
|
|
639
639
|
]), t;
|
|
640
640
|
}
|
|
641
|
-
function
|
|
641
|
+
function hr(e) {
|
|
642
642
|
const n = $({
|
|
643
643
|
value: e,
|
|
644
644
|
previous: e
|
|
@@ -647,11 +647,11 @@ function mr(e) {
|
|
|
647
647
|
e
|
|
648
648
|
]);
|
|
649
649
|
}
|
|
650
|
-
const
|
|
650
|
+
const U = globalThis != null && globalThis.document ? be : () => {
|
|
651
651
|
};
|
|
652
|
-
function
|
|
652
|
+
function mr(e) {
|
|
653
653
|
const [n, t] = L(void 0);
|
|
654
|
-
return
|
|
654
|
+
return U(() => {
|
|
655
655
|
if (e) {
|
|
656
656
|
t({
|
|
657
657
|
width: e.offsetWidth,
|
|
@@ -680,23 +680,23 @@ function vr(e) {
|
|
|
680
680
|
e
|
|
681
681
|
]), n;
|
|
682
682
|
}
|
|
683
|
-
function
|
|
684
|
-
return
|
|
683
|
+
function vr(e, n) {
|
|
684
|
+
return _e((t, a) => {
|
|
685
685
|
const u = n[t][a];
|
|
686
686
|
return u ?? t;
|
|
687
687
|
}, e);
|
|
688
688
|
}
|
|
689
|
-
const
|
|
689
|
+
const se = (e) => {
|
|
690
690
|
const { present: n, children: t } = e, a = br(n), u = typeof t == "function" ? t({
|
|
691
691
|
present: a.isPresent
|
|
692
|
-
}) : v.only(t), r =
|
|
692
|
+
}) : v.only(t), r = ue(a.ref, u.ref);
|
|
693
693
|
return typeof t == "function" || a.isPresent ? /* @__PURE__ */ j(u, {
|
|
694
694
|
ref: r
|
|
695
695
|
}) : null;
|
|
696
696
|
};
|
|
697
|
-
|
|
697
|
+
se.displayName = "Presence";
|
|
698
698
|
function br(e) {
|
|
699
|
-
const [n, t] = L(), a = $({}), u = $(e), r = $("none"), o = e ? "mounted" : "unmounted", [i, c] =
|
|
699
|
+
const [n, t] = L(), a = $({}), u = $(e), r = $("none"), o = e ? "mounted" : "unmounted", [i, c] = vr(o, {
|
|
700
700
|
mounted: {
|
|
701
701
|
UNMOUNT: "unmounted",
|
|
702
702
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -709,32 +709,32 @@ function br(e) {
|
|
|
709
709
|
MOUNT: "mounted"
|
|
710
710
|
}
|
|
711
711
|
});
|
|
712
|
-
return
|
|
712
|
+
return A(() => {
|
|
713
713
|
const s = D(a.current);
|
|
714
714
|
r.current = i === "mounted" ? s : "none";
|
|
715
715
|
}, [
|
|
716
716
|
i
|
|
717
|
-
]),
|
|
718
|
-
const s = a.current,
|
|
719
|
-
if (
|
|
720
|
-
const
|
|
721
|
-
e ? c("MOUNT") :
|
|
717
|
+
]), U(() => {
|
|
718
|
+
const s = a.current, d = u.current;
|
|
719
|
+
if (d !== e) {
|
|
720
|
+
const f = r.current, b = D(s);
|
|
721
|
+
e ? c("MOUNT") : b === "none" || (s == null ? void 0 : s.display) === "none" ? c("UNMOUNT") : c(d && f !== b ? "ANIMATION_OUT" : "UNMOUNT"), u.current = e;
|
|
722
722
|
}
|
|
723
723
|
}, [
|
|
724
724
|
e,
|
|
725
725
|
c
|
|
726
|
-
]),
|
|
726
|
+
]), U(() => {
|
|
727
727
|
if (n) {
|
|
728
728
|
const s = (l) => {
|
|
729
|
-
const
|
|
730
|
-
l.target === n &&
|
|
729
|
+
const b = D(a.current).includes(l.animationName);
|
|
730
|
+
l.target === n && b && ge(
|
|
731
731
|
() => c("ANIMATION_END")
|
|
732
732
|
);
|
|
733
|
-
},
|
|
733
|
+
}, d = (l) => {
|
|
734
734
|
l.target === n && (r.current = D(a.current));
|
|
735
735
|
};
|
|
736
|
-
return n.addEventListener("animationstart",
|
|
737
|
-
n.removeEventListener("animationstart",
|
|
736
|
+
return n.addEventListener("animationstart", d), n.addEventListener("animationcancel", s), n.addEventListener("animationend", s), () => {
|
|
737
|
+
n.removeEventListener("animationstart", d), n.removeEventListener("animationcancel", s), n.removeEventListener("animationend", s);
|
|
738
738
|
};
|
|
739
739
|
} else
|
|
740
740
|
c("ANIMATION_END");
|
|
@@ -746,7 +746,7 @@ function br(e) {
|
|
|
746
746
|
"mounted",
|
|
747
747
|
"unmountSuspended"
|
|
748
748
|
].includes(i),
|
|
749
|
-
ref:
|
|
749
|
+
ref: F((s) => {
|
|
750
750
|
s && (a.current = getComputedStyle(s)), t(s);
|
|
751
751
|
}, [])
|
|
752
752
|
};
|
|
@@ -754,32 +754,32 @@ function br(e) {
|
|
|
754
754
|
function D(e) {
|
|
755
755
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
756
756
|
}
|
|
757
|
-
const
|
|
758
|
-
const { children: t, ...a } = e, u = v.toArray(t), r = u.find(
|
|
757
|
+
const le = /* @__PURE__ */ g((e, n) => {
|
|
758
|
+
const { children: t, ...a } = e, u = v.toArray(t), r = u.find(gr);
|
|
759
759
|
if (r) {
|
|
760
|
-
const o = r.props.children, i = u.map((c) => c === r ? v.count(o) > 1 ? v.only(null) : /* @__PURE__ */
|
|
761
|
-
return /* @__PURE__ */ p(
|
|
760
|
+
const o = r.props.children, i = u.map((c) => c === r ? v.count(o) > 1 ? v.only(null) : /* @__PURE__ */ N(o) ? o.props.children : null : c);
|
|
761
|
+
return /* @__PURE__ */ p(H, w({}, a, {
|
|
762
762
|
ref: n
|
|
763
|
-
}), /* @__PURE__ */
|
|
763
|
+
}), /* @__PURE__ */ N(o) ? /* @__PURE__ */ j(o, void 0, i) : null);
|
|
764
764
|
}
|
|
765
|
-
return /* @__PURE__ */ p(
|
|
765
|
+
return /* @__PURE__ */ p(H, w({}, a, {
|
|
766
766
|
ref: n
|
|
767
767
|
}), t);
|
|
768
768
|
});
|
|
769
|
-
|
|
770
|
-
const
|
|
769
|
+
le.displayName = "Slot";
|
|
770
|
+
const H = /* @__PURE__ */ g((e, n) => {
|
|
771
771
|
const { children: t, ...a } = e;
|
|
772
|
-
return /* @__PURE__ */
|
|
773
|
-
|
|
774
|
-
ref: n ?
|
|
772
|
+
return /* @__PURE__ */ N(t) ? /* @__PURE__ */ j(t, {
|
|
773
|
+
...$r(a, t.props),
|
|
774
|
+
ref: n ? ie(n, t.ref) : t.ref
|
|
775
775
|
}) : v.count(t) > 1 ? v.only(null) : null;
|
|
776
776
|
});
|
|
777
|
-
|
|
778
|
-
const
|
|
779
|
-
function
|
|
780
|
-
return /* @__PURE__ */
|
|
777
|
+
H.displayName = "SlotClone";
|
|
778
|
+
const _r = ({ children: e }) => /* @__PURE__ */ p(Y, null, e);
|
|
779
|
+
function gr(e) {
|
|
780
|
+
return /* @__PURE__ */ N(e) && e.type === _r;
|
|
781
781
|
}
|
|
782
|
-
function
|
|
782
|
+
function $r(e, n) {
|
|
783
783
|
const t = {
|
|
784
784
|
...n
|
|
785
785
|
};
|
|
@@ -800,7 +800,7 @@ function xr(e, n) {
|
|
|
800
800
|
...t
|
|
801
801
|
};
|
|
802
802
|
}
|
|
803
|
-
const
|
|
803
|
+
const xr = [
|
|
804
804
|
"a",
|
|
805
805
|
"button",
|
|
806
806
|
"div",
|
|
@@ -817,12 +817,12 @@ const yr = [
|
|
|
817
817
|
"span",
|
|
818
818
|
"svg",
|
|
819
819
|
"ul"
|
|
820
|
-
],
|
|
820
|
+
], pe = xr.reduce((e, n) => {
|
|
821
821
|
const t = /* @__PURE__ */ g((a, u) => {
|
|
822
|
-
const { asChild: r, ...o } = a, i = r ?
|
|
823
|
-
return
|
|
822
|
+
const { asChild: r, ...o } = a, i = r ? le : n;
|
|
823
|
+
return A(() => {
|
|
824
824
|
window[Symbol.for("radix-ui")] = !0;
|
|
825
|
-
}, []), /* @__PURE__ */ p(i,
|
|
825
|
+
}, []), /* @__PURE__ */ p(i, w({}, o, {
|
|
826
826
|
ref: u
|
|
827
827
|
}));
|
|
828
828
|
});
|
|
@@ -830,50 +830,50 @@ const yr = [
|
|
|
830
830
|
...e,
|
|
831
831
|
[n]: t
|
|
832
832
|
};
|
|
833
|
-
}, {}),
|
|
834
|
-
const { __scopeCheckbox: t, name: a, checked: u, defaultChecked: r, required: o, disabled: i, value: c = "on", onCheckedChange: s, ...
|
|
833
|
+
}, {}), de = "Checkbox", [yr, zr] = lr(de), [Nr, wr] = yr(de), Sr = /* @__PURE__ */ g((e, n) => {
|
|
834
|
+
const { __scopeCheckbox: t, name: a, checked: u, defaultChecked: r, required: o, disabled: i, value: c = "on", onCheckedChange: s, ...d } = e, [l, f] = L(null), b = ue(
|
|
835
835
|
n,
|
|
836
|
-
(m) =>
|
|
837
|
-
),
|
|
836
|
+
(m) => f(m)
|
|
837
|
+
), _ = $(!1), R = l ? !!l.closest("form") : !0, [x = !1, q] = dr({
|
|
838
838
|
prop: u,
|
|
839
839
|
defaultProp: r,
|
|
840
840
|
onChange: s
|
|
841
|
-
}),
|
|
842
|
-
return
|
|
841
|
+
}), me = $(x);
|
|
842
|
+
return A(() => {
|
|
843
843
|
const m = l == null ? void 0 : l.form;
|
|
844
844
|
if (m) {
|
|
845
|
-
const
|
|
846
|
-
return m.addEventListener("reset",
|
|
845
|
+
const P = () => q(me.current);
|
|
846
|
+
return m.addEventListener("reset", P), () => m.removeEventListener("reset", P);
|
|
847
847
|
}
|
|
848
848
|
}, [
|
|
849
849
|
l,
|
|
850
850
|
q
|
|
851
|
-
]), /* @__PURE__ */ p(
|
|
851
|
+
]), /* @__PURE__ */ p(Nr, {
|
|
852
852
|
scope: t,
|
|
853
853
|
state: x,
|
|
854
854
|
disabled: i
|
|
855
|
-
}, /* @__PURE__ */ p(
|
|
855
|
+
}, /* @__PURE__ */ p(pe.button, w({
|
|
856
856
|
type: "button",
|
|
857
857
|
role: "checkbox",
|
|
858
|
-
"aria-checked":
|
|
858
|
+
"aria-checked": S(x) ? "mixed" : x,
|
|
859
859
|
"aria-required": o,
|
|
860
|
-
"data-state":
|
|
860
|
+
"data-state": fe(x),
|
|
861
861
|
"data-disabled": i ? "" : void 0,
|
|
862
862
|
disabled: i,
|
|
863
863
|
value: c
|
|
864
|
-
},
|
|
865
|
-
ref:
|
|
866
|
-
onKeyDown:
|
|
864
|
+
}, d, {
|
|
865
|
+
ref: b,
|
|
866
|
+
onKeyDown: J(e.onKeyDown, (m) => {
|
|
867
867
|
m.key === "Enter" && m.preventDefault();
|
|
868
868
|
}),
|
|
869
|
-
onClick:
|
|
869
|
+
onClick: J(e.onClick, (m) => {
|
|
870
870
|
q(
|
|
871
|
-
(
|
|
872
|
-
), R && (
|
|
871
|
+
(P) => S(P) ? !0 : !P
|
|
872
|
+
), R && (_.current = m.isPropagationStopped(), _.current || m.stopPropagation());
|
|
873
873
|
})
|
|
874
874
|
})), R && /* @__PURE__ */ p(kr, {
|
|
875
875
|
control: l,
|
|
876
|
-
bubbles: !
|
|
876
|
+
bubbles: !_.current,
|
|
877
877
|
name: a,
|
|
878
878
|
value: c,
|
|
879
879
|
checked: x,
|
|
@@ -883,12 +883,12 @@ const yr = [
|
|
|
883
883
|
transform: "translateX(-100%)"
|
|
884
884
|
}
|
|
885
885
|
}));
|
|
886
|
-
}),
|
|
887
|
-
const { __scopeCheckbox: t, forceMount: a, ...u } = e, r =
|
|
888
|
-
return /* @__PURE__ */ p(
|
|
889
|
-
present: a ||
|
|
890
|
-
}, /* @__PURE__ */ p(
|
|
891
|
-
"data-state":
|
|
886
|
+
}), Ar = "CheckboxIndicator", Cr = /* @__PURE__ */ g((e, n) => {
|
|
887
|
+
const { __scopeCheckbox: t, forceMount: a, ...u } = e, r = wr(Ar, t);
|
|
888
|
+
return /* @__PURE__ */ p(se, {
|
|
889
|
+
present: a || S(r.state) || r.state === !0
|
|
890
|
+
}, /* @__PURE__ */ p(pe.span, w({
|
|
891
|
+
"data-state": fe(r.state),
|
|
892
892
|
"data-disabled": r.disabled ? "" : void 0
|
|
893
893
|
}, u, {
|
|
894
894
|
ref: n,
|
|
@@ -898,23 +898,23 @@ const yr = [
|
|
|
898
898
|
}
|
|
899
899
|
})));
|
|
900
900
|
}), kr = (e) => {
|
|
901
|
-
const { control: n, checked: t, bubbles: a = !0, ...u } = e, r = $(null), o =
|
|
902
|
-
return
|
|
901
|
+
const { control: n, checked: t, bubbles: a = !0, ...u } = e, r = $(null), o = hr(t), i = mr(n);
|
|
902
|
+
return A(() => {
|
|
903
903
|
const c = r.current, s = window.HTMLInputElement.prototype, l = Object.getOwnPropertyDescriptor(s, "checked").set;
|
|
904
904
|
if (o !== t && l) {
|
|
905
|
-
const
|
|
905
|
+
const f = new Event("click", {
|
|
906
906
|
bubbles: a
|
|
907
907
|
});
|
|
908
|
-
c.indeterminate =
|
|
908
|
+
c.indeterminate = S(t), l.call(c, S(t) ? !1 : t), c.dispatchEvent(f);
|
|
909
909
|
}
|
|
910
910
|
}, [
|
|
911
911
|
o,
|
|
912
912
|
t,
|
|
913
913
|
a
|
|
914
|
-
]), /* @__PURE__ */ p("input",
|
|
914
|
+
]), /* @__PURE__ */ p("input", w({
|
|
915
915
|
type: "checkbox",
|
|
916
916
|
"aria-hidden": !0,
|
|
917
|
-
defaultChecked:
|
|
917
|
+
defaultChecked: S(t) ? !1 : t
|
|
918
918
|
}, u, {
|
|
919
919
|
tabIndex: -1,
|
|
920
920
|
ref: r,
|
|
@@ -928,17 +928,17 @@ const yr = [
|
|
|
928
928
|
}
|
|
929
929
|
}));
|
|
930
930
|
};
|
|
931
|
-
function
|
|
931
|
+
function S(e) {
|
|
932
932
|
return e === "indeterminate";
|
|
933
933
|
}
|
|
934
|
-
function
|
|
935
|
-
return
|
|
934
|
+
function fe(e) {
|
|
935
|
+
return S(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
936
936
|
}
|
|
937
|
-
const
|
|
938
|
-
function
|
|
937
|
+
const Pr = Sr, Or = Cr;
|
|
938
|
+
function Er(e) {
|
|
939
939
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
940
940
|
}
|
|
941
|
-
var
|
|
941
|
+
var he = { exports: {} };
|
|
942
942
|
/*!
|
|
943
943
|
Copyright (c) 2018 Jed Watson.
|
|
944
944
|
Licensed under the MIT License (MIT), see
|
|
@@ -950,22 +950,22 @@ var me = { exports: {} };
|
|
|
950
950
|
function t() {
|
|
951
951
|
for (var r = "", o = 0; o < arguments.length; o++) {
|
|
952
952
|
var i = arguments[o];
|
|
953
|
-
i && (r = u(r, a(i)));
|
|
953
|
+
i && (r = u(r, a.call(this, i)));
|
|
954
954
|
}
|
|
955
955
|
return r;
|
|
956
956
|
}
|
|
957
957
|
function a(r) {
|
|
958
958
|
if (typeof r == "string" || typeof r == "number")
|
|
959
|
-
return r;
|
|
959
|
+
return this && this[r] || r;
|
|
960
960
|
if (typeof r != "object")
|
|
961
961
|
return "";
|
|
962
962
|
if (Array.isArray(r))
|
|
963
|
-
return t.apply(
|
|
963
|
+
return t.apply(this, r);
|
|
964
964
|
if (r.toString !== Object.prototype.toString && !r.toString.toString().includes("[native code]"))
|
|
965
965
|
return r.toString();
|
|
966
966
|
var o = "";
|
|
967
967
|
for (var i in r)
|
|
968
|
-
n.call(r, i) && r[i] && (o = u(o, i));
|
|
968
|
+
n.call(r, i) && r[i] && (o = u(o, this && this[i] || i));
|
|
969
969
|
return o;
|
|
970
970
|
}
|
|
971
971
|
function u(r, o) {
|
|
@@ -973,73 +973,79 @@ var me = { exports: {} };
|
|
|
973
973
|
}
|
|
974
974
|
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
975
975
|
})();
|
|
976
|
-
})(
|
|
977
|
-
var
|
|
978
|
-
const
|
|
979
|
-
"purpur-checkbox": "_purpur-
|
|
980
|
-
"purpur-checkbox__box": "_purpur-
|
|
981
|
-
"purpur-checkbox--error": "_purpur-checkbox--
|
|
982
|
-
"purpur-
|
|
983
|
-
"purpur-
|
|
984
|
-
"purpur-
|
|
985
|
-
"purpur-
|
|
986
|
-
|
|
976
|
+
})(he);
|
|
977
|
+
var Mr = he.exports;
|
|
978
|
+
const jr = /* @__PURE__ */ Er(Mr), Rr = {
|
|
979
|
+
"purpur-checkbox": "_purpur-checkbox_m4999_1",
|
|
980
|
+
"purpur-checkbox__box": "_purpur-checkbox__box_m4999_7",
|
|
981
|
+
"purpur-checkbox--error": "_purpur-checkbox--error_m4999_16",
|
|
982
|
+
"purpur-checkbox--error-checkbox": "_purpur-checkbox--error-checkbox_m4999_16",
|
|
983
|
+
"purpur-checkbox__indicator": "_purpur-checkbox__indicator_m4999_59",
|
|
984
|
+
"purpur-checkbox__label": "_purpur-checkbox__label_m4999_70",
|
|
985
|
+
"purpur-checkbox__wrapper": "_purpur-checkbox__wrapper_m4999_73",
|
|
986
|
+
"purpur-checkbox__container": "_purpur-checkbox__container_m4999_79"
|
|
987
|
+
}, C = jr.bind(Rr), Tr = ["indeterminate", !0, !1], y = "purpur-checkbox", Dr = ({
|
|
987
988
|
["data-testid"]: e,
|
|
988
989
|
checked: n,
|
|
989
990
|
className: t,
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
991
|
+
error: a = !1,
|
|
992
|
+
errorText: u,
|
|
993
|
+
label: r,
|
|
994
|
+
onChange: o,
|
|
995
|
+
...i
|
|
996
|
+
}, c) => {
|
|
997
|
+
const s = u && !n, d = a && !n;
|
|
998
|
+
return /* @__PURE__ */ z("div", { className: C([t, `${y}__wrapper`]), children: [
|
|
999
|
+
/* @__PURE__ */ z("div", { className: C([t, `${y}__container`]), children: [
|
|
1000
|
+
/* @__PURE__ */ h(
|
|
1001
|
+
Pr,
|
|
1000
1002
|
{
|
|
1001
|
-
...
|
|
1003
|
+
...i,
|
|
1002
1004
|
checked: n,
|
|
1003
|
-
className:
|
|
1004
|
-
|
|
1005
|
-
|
|
1005
|
+
className: C([
|
|
1006
|
+
y,
|
|
1007
|
+
{
|
|
1008
|
+
[`${y}--error`]: s,
|
|
1009
|
+
[`${y}--error-checkbox`]: d
|
|
1010
|
+
}
|
|
1011
|
+
]),
|
|
1006
1012
|
"data-testid": e,
|
|
1007
|
-
onCheckedChange:
|
|
1008
|
-
ref:
|
|
1009
|
-
children: /* @__PURE__ */
|
|
1010
|
-
|
|
1013
|
+
onCheckedChange: o,
|
|
1014
|
+
ref: c,
|
|
1015
|
+
children: /* @__PURE__ */ h("span", { className: C(`${y}__box`), children: /* @__PURE__ */ h(Or, { className: C(`${y}__indicator`), children: n === "indeterminate" ? /* @__PURE__ */ h(
|
|
1016
|
+
W,
|
|
1011
1017
|
{
|
|
1012
1018
|
"data-testid": e && `${e}-checked-icon`,
|
|
1013
1019
|
size: "xs",
|
|
1014
|
-
svg:
|
|
1020
|
+
svg: ze
|
|
1015
1021
|
}
|
|
1016
|
-
) : /* @__PURE__ */
|
|
1017
|
-
|
|
1022
|
+
) : /* @__PURE__ */ h(
|
|
1023
|
+
W,
|
|
1018
1024
|
{
|
|
1019
1025
|
"data-testid": e && `${e}-indeterminate-icon`,
|
|
1020
1026
|
size: "xs",
|
|
1021
|
-
svg:
|
|
1027
|
+
svg: Be
|
|
1022
1028
|
}
|
|
1023
1029
|
) }) })
|
|
1024
1030
|
}
|
|
1025
1031
|
),
|
|
1026
|
-
|
|
1027
|
-
|
|
1032
|
+
r && /* @__PURE__ */ h(
|
|
1033
|
+
or,
|
|
1028
1034
|
{
|
|
1029
|
-
htmlFor:
|
|
1035
|
+
htmlFor: i.id,
|
|
1030
1036
|
"data-testid": e && `${e}-label`,
|
|
1031
|
-
disabled:
|
|
1032
|
-
className:
|
|
1033
|
-
children: /* @__PURE__ */
|
|
1037
|
+
disabled: i.disabled,
|
|
1038
|
+
className: C(`${y}__label`),
|
|
1039
|
+
children: /* @__PURE__ */ h(ae, { variant: "paragraph-100", disabled: i.disabled, children: `${i.required ? "* " : ""}${r}` })
|
|
1034
1040
|
}
|
|
1035
1041
|
)
|
|
1036
1042
|
] }),
|
|
1037
|
-
|
|
1043
|
+
s && /* @__PURE__ */ h(Re, { "data-testid": e && `${e}-error-text`, children: u })
|
|
1038
1044
|
] });
|
|
1039
|
-
},
|
|
1040
|
-
|
|
1045
|
+
}, Lr = g(Dr);
|
|
1046
|
+
Lr.displayName = "Checkbox";
|
|
1041
1047
|
export {
|
|
1042
|
-
|
|
1043
|
-
|
|
1048
|
+
Lr as Checkbox,
|
|
1049
|
+
Tr as checkedState
|
|
1044
1050
|
};
|
|
1045
1051
|
//# sourceMappingURL=checkbox.es.js.map
|