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