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