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