@cronocode/react-box 1.8.0 → 1.8.2
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/box.cjs +1 -1
- package/box.d.ts +5 -2
- package/box.mjs +8 -8
- package/components/baseSvg.d.ts +2 -3
- package/components/button.cjs +1 -1
- package/components/button.d.ts +1 -1
- package/components/button.mjs +7 -7
- package/components/checkbox.cjs +1 -1
- package/components/checkbox.d.ts +6 -6
- package/components/checkbox.mjs +11 -20
- package/components/radioButton.cjs +1 -1
- package/components/radioButton.d.ts +1 -1
- package/components/radioButton.mjs +4 -15
- package/components/textarea.cjs +1 -1
- package/components/textarea.d.ts +1 -1
- package/components/textarea.mjs +7 -8
- package/components/textbox.cjs +1 -1
- package/components/textbox.d.ts +1 -1
- package/components/textbox.mjs +5 -6
- package/core/boxStyles.d.ts +97 -476
- package/core/boxStylesFormatters.d.ts +12 -12
- package/core/stylesContext.d.ts +1 -1
- package/core/theme.d.ts +15 -17
- package/core/types.d.ts +12 -4
- package/core/useTheme.d.ts +0 -1
- package/core.cjs +25 -61
- package/core.mjs +304 -348
- package/package.json +1 -1
- package/utils/object/objectUtils.d.ts +0 -1
- package/utils.cjs +1 -1
- package/utils.mjs +43 -54
package/core.mjs
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import { useMemo as
|
|
1
|
+
import { useMemo as P, useLayoutEffect as G, useEffect as M } from "react";
|
|
2
2
|
var e;
|
|
3
|
-
((
|
|
4
|
-
((
|
|
5
|
-
function
|
|
6
|
-
return `${a}${
|
|
3
|
+
((u) => {
|
|
4
|
+
((r) => {
|
|
5
|
+
function m(a, b) {
|
|
6
|
+
return `${a}${b.replace("/", "-")}`;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
function
|
|
8
|
+
r.fraction = m;
|
|
9
|
+
function n(a) {
|
|
10
10
|
return [`${a} path`, `${a} circle`, `${a} rect`, `${a} line`];
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
})(
|
|
14
|
-
function
|
|
15
|
-
return `${
|
|
12
|
+
r.svg = n;
|
|
13
|
+
})(u.ClassName || (u.ClassName = {})), ((r) => {
|
|
14
|
+
function m(l, s) {
|
|
15
|
+
return `${s / 4}rem`;
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
return `${
|
|
17
|
+
r.rem = m;
|
|
18
|
+
function n(l, s) {
|
|
19
|
+
return `${s}px`;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
function a(
|
|
23
|
-
const [t, N] =
|
|
21
|
+
r.px = n;
|
|
22
|
+
function a(l, s) {
|
|
23
|
+
const [t, N] = s.split("/");
|
|
24
24
|
return `${+t / +N * 100}%`;
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
function
|
|
28
|
-
switch (
|
|
26
|
+
r.fraction = a;
|
|
27
|
+
function b(l, s) {
|
|
28
|
+
switch (s) {
|
|
29
29
|
case "fit":
|
|
30
30
|
return "100%";
|
|
31
31
|
case "fit-screen":
|
|
32
|
-
return
|
|
32
|
+
return l.toLocaleLowerCase().includes("height") ? "100vh" : "100vw";
|
|
33
33
|
default:
|
|
34
|
-
return
|
|
34
|
+
return s;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
|
|
38
|
-
function
|
|
39
|
-
return (
|
|
37
|
+
r.widthHeight = b;
|
|
38
|
+
function V(l) {
|
|
39
|
+
return (s, t) => `var(--${l}${t});`;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
function
|
|
43
|
-
return (
|
|
41
|
+
r.variables = V;
|
|
42
|
+
function $(l) {
|
|
43
|
+
return (s, t) => `var(--${l}${t});`;
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
function
|
|
47
|
-
return `repeat(${
|
|
45
|
+
r.svgVariables = $;
|
|
46
|
+
function v(l, s) {
|
|
47
|
+
return `repeat(${s},minmax(0,1fr))`;
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
function
|
|
51
|
-
return
|
|
49
|
+
r.gridColumns = v;
|
|
50
|
+
function d(l, s) {
|
|
51
|
+
return s === "full-row" ? "1/-1" : `span ${s}/span ${s}`;
|
|
52
52
|
}
|
|
53
|
-
|
|
54
|
-
function
|
|
55
|
-
return `${
|
|
53
|
+
r.gridColumn = d;
|
|
54
|
+
function c(l, s) {
|
|
55
|
+
return `${s}ms`;
|
|
56
56
|
}
|
|
57
|
-
|
|
58
|
-
function
|
|
59
|
-
return `${
|
|
57
|
+
r.ms = c;
|
|
58
|
+
function p(l, s) {
|
|
59
|
+
return `${s}deg`;
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
function h(
|
|
63
|
-
return
|
|
61
|
+
r.rotate = p;
|
|
62
|
+
function h(l, s) {
|
|
63
|
+
return s === "xAxis" ? "-1 1" : "1 -1";
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
})(
|
|
65
|
+
r.flip = h;
|
|
66
|
+
})(u.Value || (u.Value = {}));
|
|
67
67
|
})(e || (e = {}));
|
|
68
68
|
const i = [
|
|
69
69
|
0,
|
|
@@ -116,8 +116,15 @@ const i = [
|
|
|
116
116
|
88,
|
|
117
117
|
92,
|
|
118
118
|
96,
|
|
119
|
-
100
|
|
120
|
-
|
|
119
|
+
100,
|
|
120
|
+
120,
|
|
121
|
+
140,
|
|
122
|
+
160,
|
|
123
|
+
180,
|
|
124
|
+
200,
|
|
125
|
+
250,
|
|
126
|
+
300
|
|
127
|
+
], U = [
|
|
121
128
|
-1,
|
|
122
129
|
-2,
|
|
123
130
|
-3,
|
|
@@ -163,7 +170,7 @@ const i = [
|
|
|
163
170
|
-92,
|
|
164
171
|
-96,
|
|
165
172
|
-100
|
|
166
|
-
],
|
|
173
|
+
], f = [...i, ...U], B = ["solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset", "none", "hidden"], H = ["auto", "hidden", "scroll", "visible"], C = [
|
|
167
174
|
"1/2",
|
|
168
175
|
"1/3",
|
|
169
176
|
"2/3",
|
|
@@ -190,7 +197,7 @@ const i = [
|
|
|
190
197
|
"9/12",
|
|
191
198
|
"10/12",
|
|
192
199
|
"11/12"
|
|
193
|
-
],
|
|
200
|
+
], j = ["fit", "fit-screen", "auto", "fit-content", "max-content", "min-content"], F = ["auto", "flex-start", "flex-end", "center", "baseline", "stretch"], w = {
|
|
194
201
|
/** The `display` CSS property sets whether an element is treated as a block or inline box and the layout used for its children, such as flow layout, grid or flex. */
|
|
195
202
|
display: {
|
|
196
203
|
cssNames: ["display"],
|
|
@@ -214,60 +221,60 @@ const i = [
|
|
|
214
221
|
},
|
|
215
222
|
width: {
|
|
216
223
|
cssNames: ["width"],
|
|
217
|
-
values1: { values:
|
|
224
|
+
values1: { values: j, formatValue: e.Value.widthHeight },
|
|
218
225
|
values2: { values: i, formatValue: e.Value.rem },
|
|
219
226
|
values3: {
|
|
220
|
-
values:
|
|
227
|
+
values: C,
|
|
221
228
|
formatValue: e.Value.fraction
|
|
222
229
|
// formatClassName: BoxStylesFormatters.ClassName.fraction,
|
|
223
230
|
}
|
|
224
231
|
},
|
|
225
232
|
minWidth: {
|
|
226
233
|
cssNames: ["min-width"],
|
|
227
|
-
values1: { values:
|
|
234
|
+
values1: { values: j, formatValue: e.Value.widthHeight },
|
|
228
235
|
values2: { values: i, formatValue: e.Value.rem },
|
|
229
236
|
values3: {
|
|
230
|
-
values:
|
|
237
|
+
values: C,
|
|
231
238
|
formatValue: e.Value.fraction
|
|
232
239
|
// formatClassName: BoxStylesFormatters.ClassName.fraction,
|
|
233
240
|
}
|
|
234
241
|
},
|
|
235
242
|
maxWidth: {
|
|
236
243
|
cssNames: ["max-width"],
|
|
237
|
-
values1: { values:
|
|
244
|
+
values1: { values: j, formatValue: e.Value.widthHeight },
|
|
238
245
|
values2: { values: i, formatValue: e.Value.rem },
|
|
239
246
|
values3: {
|
|
240
|
-
values:
|
|
247
|
+
values: C,
|
|
241
248
|
formatValue: e.Value.fraction
|
|
242
249
|
// formatClassName: BoxStylesFormatters.ClassName.fraction,
|
|
243
250
|
}
|
|
244
251
|
},
|
|
245
252
|
height: {
|
|
246
253
|
cssNames: ["height"],
|
|
247
|
-
values1: { values:
|
|
254
|
+
values1: { values: j, formatValue: e.Value.widthHeight },
|
|
248
255
|
values2: { values: i, formatValue: e.Value.rem },
|
|
249
256
|
values3: {
|
|
250
|
-
values:
|
|
257
|
+
values: C,
|
|
251
258
|
formatValue: e.Value.fraction
|
|
252
259
|
// formatClassName: BoxStylesFormatters.ClassName.fraction,
|
|
253
260
|
}
|
|
254
261
|
},
|
|
255
262
|
minHeight: {
|
|
256
263
|
cssNames: ["min-height"],
|
|
257
|
-
values1: { values:
|
|
264
|
+
values1: { values: j, formatValue: e.Value.widthHeight },
|
|
258
265
|
values2: { values: i, formatValue: e.Value.rem },
|
|
259
266
|
values3: {
|
|
260
|
-
values:
|
|
267
|
+
values: C,
|
|
261
268
|
formatValue: e.Value.fraction
|
|
262
269
|
// formatClassName: BoxStylesFormatters.ClassName.fraction,
|
|
263
270
|
}
|
|
264
271
|
},
|
|
265
272
|
maxHeight: {
|
|
266
273
|
cssNames: ["max-height"],
|
|
267
|
-
values1: { values:
|
|
274
|
+
values1: { values: j, formatValue: e.Value.widthHeight },
|
|
268
275
|
values2: { values: i, formatValue: e.Value.rem },
|
|
269
276
|
values3: {
|
|
270
|
-
values:
|
|
277
|
+
values: C,
|
|
271
278
|
formatValue: e.Value.fraction
|
|
272
279
|
// formatClassName: BoxStylesFormatters.ClassName.fraction,
|
|
273
280
|
}
|
|
@@ -280,163 +287,163 @@ const i = [
|
|
|
280
287
|
},
|
|
281
288
|
top: {
|
|
282
289
|
cssNames: ["top"],
|
|
283
|
-
values1: { values:
|
|
290
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
284
291
|
values2: { values: [] },
|
|
285
292
|
values3: { values: [] }
|
|
286
293
|
},
|
|
287
294
|
right: {
|
|
288
295
|
cssNames: ["right"],
|
|
289
|
-
values1: { values:
|
|
296
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
290
297
|
values2: { values: [] },
|
|
291
298
|
values3: { values: [] }
|
|
292
299
|
},
|
|
293
300
|
bottom: {
|
|
294
301
|
cssNames: ["bottom"],
|
|
295
|
-
values1: { values:
|
|
302
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
296
303
|
values2: { values: [] },
|
|
297
304
|
values3: { values: [] }
|
|
298
305
|
},
|
|
299
306
|
left: {
|
|
300
307
|
cssNames: ["left"],
|
|
301
|
-
values1: { values:
|
|
308
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
302
309
|
values2: { values: [] },
|
|
303
310
|
values3: { values: [] }
|
|
304
311
|
},
|
|
305
312
|
inset: {
|
|
306
313
|
cssNames: ["inset"],
|
|
307
|
-
values1: { values:
|
|
314
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
308
315
|
values2: { values: [] },
|
|
309
316
|
values3: { values: [] }
|
|
310
317
|
},
|
|
311
|
-
|
|
318
|
+
m: {
|
|
312
319
|
cssNames: ["margin"],
|
|
313
|
-
values1: { values:
|
|
320
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
314
321
|
values2: { values: ["auto"] },
|
|
315
322
|
values3: { values: [] }
|
|
316
323
|
},
|
|
317
|
-
|
|
324
|
+
mx: {
|
|
318
325
|
cssNames: ["margin-inline"],
|
|
319
|
-
values1: { values:
|
|
326
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
320
327
|
values2: { values: ["auto"] },
|
|
321
328
|
values3: { values: [] }
|
|
322
329
|
},
|
|
323
|
-
|
|
330
|
+
my: {
|
|
324
331
|
cssNames: ["margin-block"],
|
|
325
|
-
values1: { values:
|
|
332
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
326
333
|
values2: { values: ["auto"] },
|
|
327
334
|
values3: { values: [] }
|
|
328
335
|
},
|
|
329
|
-
|
|
336
|
+
mt: {
|
|
330
337
|
cssNames: ["margin-top"],
|
|
331
|
-
values1: { values:
|
|
338
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
332
339
|
values2: { values: ["auto"] },
|
|
333
340
|
values3: { values: [] }
|
|
334
341
|
},
|
|
335
|
-
|
|
342
|
+
mr: {
|
|
336
343
|
cssNames: ["margin-right"],
|
|
337
|
-
values1: { values:
|
|
344
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
338
345
|
values2: { values: ["auto"] },
|
|
339
346
|
values3: { values: [] }
|
|
340
347
|
},
|
|
341
|
-
|
|
348
|
+
mb: {
|
|
342
349
|
cssNames: ["margin-bottom"],
|
|
343
|
-
values1: { values:
|
|
350
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
344
351
|
values2: { values: ["auto"] },
|
|
345
352
|
values3: { values: [] }
|
|
346
353
|
},
|
|
347
|
-
|
|
354
|
+
ml: {
|
|
348
355
|
cssNames: ["margin-left"],
|
|
349
|
-
values1: { values:
|
|
356
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
350
357
|
values2: { values: ["auto"] },
|
|
351
358
|
values3: { values: [] }
|
|
352
359
|
},
|
|
353
|
-
|
|
360
|
+
p: {
|
|
354
361
|
cssNames: ["padding"],
|
|
355
|
-
values1: { values:
|
|
362
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
356
363
|
values2: { values: [] },
|
|
357
364
|
values3: { values: [] }
|
|
358
365
|
},
|
|
359
|
-
|
|
366
|
+
px: {
|
|
360
367
|
cssNames: ["padding-inline"],
|
|
361
|
-
values1: { values:
|
|
368
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
362
369
|
values2: { values: [] },
|
|
363
370
|
values3: { values: [] }
|
|
364
371
|
},
|
|
365
|
-
|
|
372
|
+
py: {
|
|
366
373
|
cssNames: ["padding-block"],
|
|
367
|
-
values1: { values:
|
|
374
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
368
375
|
values2: { values: [] },
|
|
369
376
|
values3: { values: [] }
|
|
370
377
|
},
|
|
371
|
-
|
|
378
|
+
pt: {
|
|
372
379
|
cssNames: ["padding-top"],
|
|
373
|
-
values1: { values:
|
|
380
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
374
381
|
values2: { values: [] },
|
|
375
382
|
values3: { values: [] }
|
|
376
383
|
},
|
|
377
|
-
|
|
384
|
+
pr: {
|
|
378
385
|
cssNames: ["padding-right"],
|
|
379
|
-
values1: { values:
|
|
386
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
380
387
|
values2: { values: [] },
|
|
381
388
|
values3: { values: [] }
|
|
382
389
|
},
|
|
383
|
-
|
|
390
|
+
pb: {
|
|
384
391
|
cssNames: ["padding-bottom"],
|
|
385
|
-
values1: { values:
|
|
392
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
386
393
|
values2: { values: [] },
|
|
387
394
|
values3: { values: [] }
|
|
388
395
|
},
|
|
389
|
-
|
|
396
|
+
pl: {
|
|
390
397
|
cssNames: ["padding-left"],
|
|
391
|
-
values1: { values:
|
|
398
|
+
values1: { values: f, formatValue: e.Value.rem },
|
|
392
399
|
values2: { values: [] },
|
|
393
400
|
values3: { values: [] }
|
|
394
401
|
},
|
|
395
|
-
|
|
402
|
+
b: {
|
|
396
403
|
cssNames: ["border-width"],
|
|
397
404
|
values1: { values: i, formatValue: e.Value.px },
|
|
398
405
|
values2: { values: [] },
|
|
399
406
|
values3: { values: [] }
|
|
400
407
|
},
|
|
401
|
-
|
|
408
|
+
bx: {
|
|
402
409
|
cssNames: ["border-inline-width"],
|
|
403
|
-
values1: { values:
|
|
410
|
+
values1: { values: f, formatValue: e.Value.px },
|
|
404
411
|
values2: { values: [] },
|
|
405
412
|
values3: { values: [] }
|
|
406
413
|
},
|
|
407
|
-
|
|
414
|
+
by: {
|
|
408
415
|
cssNames: ["border-block-width"],
|
|
409
|
-
values1: { values:
|
|
416
|
+
values1: { values: f, formatValue: e.Value.px },
|
|
410
417
|
values2: { values: [] },
|
|
411
418
|
values3: { values: [] }
|
|
412
419
|
},
|
|
413
|
-
|
|
420
|
+
bt: {
|
|
414
421
|
cssNames: ["border-top-width"],
|
|
415
|
-
values1: { values:
|
|
422
|
+
values1: { values: f, formatValue: e.Value.px },
|
|
416
423
|
values2: { values: [] },
|
|
417
424
|
values3: { values: [] }
|
|
418
425
|
},
|
|
419
|
-
|
|
426
|
+
br: {
|
|
420
427
|
cssNames: ["border-right-width"],
|
|
421
|
-
values1: { values:
|
|
428
|
+
values1: { values: f, formatValue: e.Value.px },
|
|
422
429
|
values2: { values: [] },
|
|
423
430
|
values3: { values: [] }
|
|
424
431
|
},
|
|
425
|
-
|
|
432
|
+
bb: {
|
|
426
433
|
cssNames: ["border-bottom-width"],
|
|
427
|
-
values1: { values:
|
|
434
|
+
values1: { values: f, formatValue: e.Value.px },
|
|
428
435
|
values2: { values: [] },
|
|
429
436
|
values3: { values: [] }
|
|
430
437
|
},
|
|
431
|
-
|
|
438
|
+
bl: {
|
|
432
439
|
cssNames: ["border-left-width"],
|
|
433
|
-
values1: { values:
|
|
440
|
+
values1: { values: f, formatValue: e.Value.px },
|
|
434
441
|
values2: { values: [] },
|
|
435
442
|
values3: { values: [] }
|
|
436
443
|
},
|
|
437
444
|
borderStyle: {
|
|
438
445
|
cssNames: ["border-style"],
|
|
439
|
-
values1: { values:
|
|
446
|
+
values1: { values: B },
|
|
440
447
|
values2: { values: [] },
|
|
441
448
|
values3: { values: [] }
|
|
442
449
|
},
|
|
@@ -549,19 +556,19 @@ const i = [
|
|
|
549
556
|
},
|
|
550
557
|
overflow: {
|
|
551
558
|
cssNames: ["overflow"],
|
|
552
|
-
values1: { values:
|
|
559
|
+
values1: { values: H },
|
|
553
560
|
values2: { values: [] },
|
|
554
561
|
values3: { values: [] }
|
|
555
562
|
},
|
|
556
563
|
overflowX: {
|
|
557
564
|
cssNames: ["overflow-x"],
|
|
558
|
-
values1: { values:
|
|
565
|
+
values1: { values: H },
|
|
559
566
|
values2: { values: [] },
|
|
560
567
|
values3: { values: [] }
|
|
561
568
|
},
|
|
562
569
|
overflowY: {
|
|
563
570
|
cssNames: ["overflow-y"],
|
|
564
|
-
values1: { values:
|
|
571
|
+
values1: { values: H },
|
|
565
572
|
values2: { values: [] },
|
|
566
573
|
values3: { values: [] }
|
|
567
574
|
},
|
|
@@ -625,7 +632,7 @@ const i = [
|
|
|
625
632
|
values2: { values: [] },
|
|
626
633
|
values3: { values: [] }
|
|
627
634
|
},
|
|
628
|
-
|
|
635
|
+
jc: {
|
|
629
636
|
cssNames: ["justify-content"],
|
|
630
637
|
values1: {
|
|
631
638
|
values: [
|
|
@@ -645,7 +652,7 @@ const i = [
|
|
|
645
652
|
values2: { values: [] },
|
|
646
653
|
values3: { values: [] }
|
|
647
654
|
},
|
|
648
|
-
|
|
655
|
+
ai: {
|
|
649
656
|
cssNames: ["align-items"],
|
|
650
657
|
values1: {
|
|
651
658
|
values: ["stretch", "flex-start", "flex-end", "center", "baseline", "start", "end", "self-start", "self-end"]
|
|
@@ -678,7 +685,7 @@ const i = [
|
|
|
678
685
|
values2: { values: [] },
|
|
679
686
|
values3: { values: [] }
|
|
680
687
|
},
|
|
681
|
-
|
|
688
|
+
d: {
|
|
682
689
|
cssNames: ["flex-direction"],
|
|
683
690
|
values1: { values: ["row", "row-reverse", "column", "column-reverse"] },
|
|
684
691
|
values2: { values: [] },
|
|
@@ -722,13 +729,13 @@ const i = [
|
|
|
722
729
|
},
|
|
723
730
|
alignSelf: {
|
|
724
731
|
cssNames: ["align-self"],
|
|
725
|
-
values1: { values:
|
|
732
|
+
values1: { values: F },
|
|
726
733
|
values2: { values: [] },
|
|
727
734
|
values3: { values: [] }
|
|
728
735
|
},
|
|
729
736
|
justifySelf: {
|
|
730
737
|
cssNames: ["justify-self"],
|
|
731
|
-
values1: { values:
|
|
738
|
+
values1: { values: F },
|
|
732
739
|
values2: { values: [] },
|
|
733
740
|
values3: { values: [] }
|
|
734
741
|
},
|
|
@@ -764,7 +771,7 @@ const i = [
|
|
|
764
771
|
},
|
|
765
772
|
outlineStyle: {
|
|
766
773
|
cssNames: ["outline-style"],
|
|
767
|
-
values1: { values:
|
|
774
|
+
values1: { values: B },
|
|
768
775
|
values2: { values: [] },
|
|
769
776
|
values3: { values: [] }
|
|
770
777
|
},
|
|
@@ -831,7 +838,7 @@ const i = [
|
|
|
831
838
|
values2: { values: [] },
|
|
832
839
|
values3: { values: [] }
|
|
833
840
|
}
|
|
834
|
-
},
|
|
841
|
+
}, R = {
|
|
835
842
|
shadow: { cssNames: ["box-shadow"], formatValue: e.Value.variables("shadow") },
|
|
836
843
|
background: { cssNames: ["background"], formatValue: e.Value.variables("background") },
|
|
837
844
|
backgroundImage: { cssNames: ["background-image"], formatValue: e.Value.variables("backgroundImage") },
|
|
@@ -839,7 +846,7 @@ const i = [
|
|
|
839
846
|
bgColor: { cssNames: ["background-color"], formatValue: e.Value.variables("color") },
|
|
840
847
|
borderColor: { cssNames: ["border-color"], formatValue: e.Value.variables("color") },
|
|
841
848
|
outlineColor: { cssNames: ["outline-color"], formatValue: e.Value.variables("color") }
|
|
842
|
-
},
|
|
849
|
+
}, _ = {
|
|
843
850
|
fill: {
|
|
844
851
|
cssNames: ["fill"],
|
|
845
852
|
formatValue: e.Value.svgVariables("color"),
|
|
@@ -850,147 +857,128 @@ const i = [
|
|
|
850
857
|
formatValue: e.Value.svgVariables("color"),
|
|
851
858
|
formatSelector: e.ClassName.svg
|
|
852
859
|
}
|
|
853
|
-
},
|
|
860
|
+
}, X = ["H", "F", "A", "Checked", "Indeterminate", "Valid", "Invalid", "Required", "Optional"], Y = [
|
|
861
|
+
"H",
|
|
862
|
+
"F",
|
|
863
|
+
"A",
|
|
864
|
+
"Checked",
|
|
865
|
+
"Indeterminate",
|
|
866
|
+
"Valid",
|
|
867
|
+
"Invalid",
|
|
868
|
+
"Required",
|
|
869
|
+
"Optional",
|
|
870
|
+
"Disabled"
|
|
871
|
+
], z = {
|
|
854
872
|
hover: { className: "_h" },
|
|
855
873
|
focus: { className: "_f" }
|
|
856
874
|
};
|
|
857
|
-
Object.keys(
|
|
858
|
-
|
|
875
|
+
Object.keys(R).forEach((u) => {
|
|
876
|
+
w[u] = R[u], w[u].isThemeStyle = !0;
|
|
859
877
|
});
|
|
860
|
-
Object.keys(
|
|
861
|
-
|
|
878
|
+
Object.keys(_).forEach((u) => {
|
|
879
|
+
w[u] = _[u], w[u].isThemeStyle = !0;
|
|
862
880
|
});
|
|
863
|
-
const
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
mx: { ...r.marginHorizontal, key: "marginHorizontal" },
|
|
868
|
-
my: { ...r.marginVertical, key: "marginVertical" },
|
|
869
|
-
mt: { ...r.marginTop, key: "marginTop" },
|
|
870
|
-
mr: { ...r.marginRight, key: "marginRight" },
|
|
871
|
-
mb: { ...r.marginBottom, key: "marginBottom" },
|
|
872
|
-
ml: { ...r.marginLeft, key: "marginLeft" },
|
|
873
|
-
p: { ...r.padding, key: "padding" },
|
|
874
|
-
px: { ...r.paddingHorizontal, key: "paddingHorizontal" },
|
|
875
|
-
py: { ...r.paddingVertical, key: "paddingVertical" },
|
|
876
|
-
pt: { ...r.paddingTop, key: "paddingTop" },
|
|
877
|
-
pr: { ...r.paddingRight, key: "paddingRight" },
|
|
878
|
-
pb: { ...r.paddingBottom, key: "paddingBottom" },
|
|
879
|
-
pl: { ...r.paddingLeft, key: "paddingLeft" },
|
|
880
|
-
b: { ...r.border, key: "border" },
|
|
881
|
-
bx: { ...r.borderHorizontal, key: "borderHorizontal" },
|
|
882
|
-
by: { ...r.borderVertical, key: "borderVertical" },
|
|
883
|
-
bt: { ...r.borderTop, key: "borderTop" },
|
|
884
|
-
br: { ...r.borderRight, key: "borderRight" },
|
|
885
|
-
bb: { ...r.borderBottom, key: "borderBottom" },
|
|
886
|
-
bl: { ...r.borderLeft, key: "borderLeft" },
|
|
887
|
-
jc: { ...r.justifyContent, key: "justifyContent" },
|
|
888
|
-
ai: { ...r.alignItems, key: "alignItems" },
|
|
889
|
-
ac: { ...r.alignContent, key: "alignContent" },
|
|
890
|
-
d: { ...r.flexDirection, key: "flexDirection" }
|
|
891
|
-
}, Q = Object.keys(r), Z = Object.keys(z);
|
|
892
|
-
J.forEach((s) => {
|
|
893
|
-
Q.forEach((l) => {
|
|
894
|
-
r[`${l}${s}`] = { ...r[l] }, r[`${l}${s}`].pseudoSuffix = s;
|
|
895
|
-
}), Z.forEach((l) => {
|
|
896
|
-
z[`${l}${s}`] = { ...z[l], key: `${z[l].key}${s}` }, z[`${l}${s}`].pseudoSuffix = s;
|
|
881
|
+
const J = Object.keys(w);
|
|
882
|
+
Y.forEach((u) => {
|
|
883
|
+
J.forEach((r) => {
|
|
884
|
+
w[`${r}${u}`] = { ...w[r] }, w[`${r}${u}`].pseudoSuffix = u;
|
|
897
885
|
});
|
|
898
886
|
});
|
|
899
|
-
class
|
|
887
|
+
class Q {
|
|
900
888
|
constructor() {
|
|
901
889
|
this._index = 0, this._cache = {};
|
|
902
890
|
}
|
|
903
|
-
getIdentity(
|
|
904
|
-
return this._cache[
|
|
891
|
+
getIdentity(r) {
|
|
892
|
+
return this._cache[r] || (this._cache[r] = this.getByIndex(this._index++)), this._cache[r];
|
|
905
893
|
}
|
|
906
|
-
getByIndex(
|
|
907
|
-
const { first:
|
|
894
|
+
getByIndex(r) {
|
|
895
|
+
const { first: m, next: n } = Z, a = r - m.length;
|
|
908
896
|
if (a < 0)
|
|
909
|
-
return
|
|
910
|
-
const
|
|
911
|
-
return this.getByIndex(
|
|
897
|
+
return m[r];
|
|
898
|
+
const b = Math.floor(a / n.length), V = a - b * n.length;
|
|
899
|
+
return this.getByIndex(b) + n[V];
|
|
912
900
|
}
|
|
913
901
|
}
|
|
914
|
-
const
|
|
902
|
+
const Z = {
|
|
915
903
|
first: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
916
904
|
next: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
|
917
905
|
};
|
|
918
|
-
var
|
|
919
|
-
((
|
|
920
|
-
|
|
921
|
-
const
|
|
906
|
+
var A;
|
|
907
|
+
((u) => {
|
|
908
|
+
u.boxClassName = "_box", u.svgClassName = "_svg", u.cronoStylesElementId = "crono-styles";
|
|
909
|
+
const r = `:root{--borderColor: black;--outlineColor: black;--lineHeight: 1.2;--fontSize: 14px;--transitionTime: 0.25s;--svgTransitionTime: 0.3s;#crono-box {position: absolute;top: 0;left: 0;height: 0;}}
|
|
922
910
|
html{font-size: 16px;font-family: Arial, sans-serif;}
|
|
923
911
|
body{margin: 0;line-height: var(--lineHeight);font-size: var(--fontSize);}
|
|
924
912
|
a,ul{all: unset;}
|
|
925
|
-
.${
|
|
926
|
-
.${
|
|
927
|
-
`,
|
|
928
|
-
let a = !0,
|
|
929
|
-
(
|
|
913
|
+
.${u.boxClassName}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;background-color: initial;transition: all var(--transitionTime);box-sizing: border-box;font-family: inherit;font-size: inherit;}
|
|
914
|
+
.${u.svgClassName}{transition: all var(--svgTransitionTime);}.${u.svgClassName} path,.${u.svgClassName} circle,.${u.svgClassName} rect,.${u.svgClassName} line {transition: all var(--svgTransitionTime);}
|
|
915
|
+
`, m = new Q(), n = Object.keys(w);
|
|
916
|
+
let a = !0, b = n.reduce(
|
|
917
|
+
(l, s) => (l[s] = /* @__PURE__ */ new Set(), l),
|
|
930
918
|
{}
|
|
931
919
|
);
|
|
932
|
-
function
|
|
933
|
-
if (
|
|
934
|
-
return
|
|
935
|
-
if (
|
|
936
|
-
return
|
|
920
|
+
function V(l, s) {
|
|
921
|
+
if (l in w)
|
|
922
|
+
return d(l, s);
|
|
923
|
+
if (l in z)
|
|
924
|
+
return z[l].className;
|
|
937
925
|
}
|
|
938
|
-
|
|
939
|
-
function
|
|
926
|
+
u.get = V;
|
|
927
|
+
function $() {
|
|
940
928
|
if (a) {
|
|
941
|
-
let
|
|
942
|
-
|
|
943
|
-
const
|
|
944
|
-
|
|
929
|
+
let l = c([r]);
|
|
930
|
+
l = c(l, "H"), l = c(l, "F"), l = c(l, "A"), l = c(l, "Checked"), l = c(l, "Indeterminate"), l = c(l, "Valid"), l = c(l, "Invalid"), l = c(l, "Required"), l = c(l, "Disabled");
|
|
931
|
+
const s = h();
|
|
932
|
+
s.innerHTML = l.join(""), a = !1;
|
|
945
933
|
}
|
|
946
934
|
}
|
|
947
|
-
|
|
948
|
-
function
|
|
949
|
-
|
|
950
|
-
(
|
|
935
|
+
u.flush = $;
|
|
936
|
+
function v() {
|
|
937
|
+
b = n.reduce(
|
|
938
|
+
(l, s) => (l[s] = /* @__PURE__ */ new Set(), l),
|
|
951
939
|
{}
|
|
952
940
|
);
|
|
953
941
|
}
|
|
954
|
-
|
|
955
|
-
function
|
|
956
|
-
var
|
|
957
|
-
|
|
958
|
-
const t =
|
|
959
|
-
return
|
|
942
|
+
u.clear = v;
|
|
943
|
+
function d(l, s) {
|
|
944
|
+
var y;
|
|
945
|
+
b[l].has(s) || (a = !0, b[l].add(s));
|
|
946
|
+
const t = p(l, s), N = ((y = t.formatClassName) == null ? void 0 : y.call(t, l, s)) ?? `${l}${s}`;
|
|
947
|
+
return m.getIdentity(N);
|
|
960
948
|
}
|
|
961
|
-
function
|
|
962
|
-
return Object.entries(
|
|
963
|
-
var
|
|
964
|
-
return ((
|
|
965
|
-
}).reduce((N, [
|
|
949
|
+
function c(l, s) {
|
|
950
|
+
return Object.entries(b).filter(([N]) => {
|
|
951
|
+
var y;
|
|
952
|
+
return ((y = w[N]) == null ? void 0 : y.pseudoSuffix) === s;
|
|
953
|
+
}).reduce((N, [y, I]) => (I.forEach((k) => {
|
|
966
954
|
var E;
|
|
967
|
-
const
|
|
968
|
-
let
|
|
969
|
-
|
|
970
|
-
...t(`${
|
|
971
|
-
...t(`.${
|
|
972
|
-
] :
|
|
973
|
-
...t(`${
|
|
974
|
-
...t(`.${
|
|
975
|
-
] :
|
|
976
|
-
const
|
|
977
|
-
N.push(`${
|
|
978
|
-
}), N),
|
|
979
|
-
function t(N,
|
|
980
|
-
return
|
|
955
|
+
const o = p(y, k), g = `.${d(y, k)}`;
|
|
956
|
+
let x = [];
|
|
957
|
+
s ? s === "H" ? x = [
|
|
958
|
+
...t(`${g}:hover`, o),
|
|
959
|
+
...t(`.${z.hover.className}:hover>${g}`, o)
|
|
960
|
+
] : s === "F" ? x = [
|
|
961
|
+
...t(`${g}:focus-within`, o),
|
|
962
|
+
...t(`.${z.focus.className}:focus-within>${g}`, o)
|
|
963
|
+
] : s === "A" ? x = t(`${g}:active`, o) : s === "Checked" ? x = t(`${g}:checked`, o) : s === "Indeterminate" ? x = t(`${g}:indeterminate`, o) : s === "Valid" ? x = t(`${g}:valid`, o) : s === "Invalid" ? x = t(`${g}:invalid`, o) : s === "Required" ? x = t(`${g}:required`, o) : s === "Optional" ? x = t(`${g}:optional`, o) : s === "Disabled" && (x = t(`${g}:disabled`, o)) : x = t(g, o);
|
|
964
|
+
const q = ((E = o.formatValue) == null ? void 0 : E.call(o, y, k)) ?? k, L = w[y].cssNames.map((W) => `${W}:${q};`).join("");
|
|
965
|
+
N.push(`${x.join(",")}{${L}}`);
|
|
966
|
+
}), N), l);
|
|
967
|
+
function t(N, y) {
|
|
968
|
+
return y.formatSelector ? y.formatSelector(N) : [N];
|
|
981
969
|
}
|
|
982
970
|
}
|
|
983
|
-
function
|
|
984
|
-
const t =
|
|
985
|
-
return t.isThemeStyle ? t : t.values1.values.includes(
|
|
971
|
+
function p(l, s) {
|
|
972
|
+
const t = w[l];
|
|
973
|
+
return t.isThemeStyle ? t : t.values1.values.includes(s) ? t.values1 : t.values2.values.includes(s) ? t.values2 : t.values3;
|
|
986
974
|
}
|
|
987
975
|
function h() {
|
|
988
|
-
const
|
|
989
|
-
let t =
|
|
990
|
-
return t || (t =
|
|
976
|
+
const s = typeof window < "u" && typeof window.document < "u" ? window.document : global.document;
|
|
977
|
+
let t = s.getElementById(u.cronoStylesElementId);
|
|
978
|
+
return t || (t = s.createElement("style"), t.setAttribute("id", u.cronoStylesElementId), t.setAttribute("type", "text/css"), s.head.insertBefore(t, s.head.firstChild)), t;
|
|
991
979
|
}
|
|
992
|
-
})(
|
|
993
|
-
const
|
|
980
|
+
})(A || (A = {}));
|
|
981
|
+
const S = A, T = {
|
|
994
982
|
button: {
|
|
995
983
|
styles: {
|
|
996
984
|
display: "inline-block",
|
|
@@ -998,10 +986,10 @@ const A = F, j = {
|
|
|
998
986
|
cursor: "pointer",
|
|
999
987
|
b: 1,
|
|
1000
988
|
borderRadius: 1,
|
|
1001
|
-
userSelect: "none"
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
989
|
+
userSelect: "none",
|
|
990
|
+
disabled: {
|
|
991
|
+
cursor: "default"
|
|
992
|
+
}
|
|
1005
993
|
}
|
|
1006
994
|
},
|
|
1007
995
|
checkbox: {
|
|
@@ -1033,158 +1021,126 @@ const A = F, j = {
|
|
|
1033
1021
|
}
|
|
1034
1022
|
};
|
|
1035
1023
|
var O;
|
|
1036
|
-
((
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
a(n), s.Styles = n, v();
|
|
1024
|
+
((u) => {
|
|
1025
|
+
function r(v) {
|
|
1026
|
+
b(v), $(v), u.Styles = v, a();
|
|
1040
1027
|
}
|
|
1041
|
-
|
|
1042
|
-
function
|
|
1043
|
-
const
|
|
1044
|
-
`), p = Object.entries(
|
|
1045
|
-
`),
|
|
1046
|
-
`),
|
|
1047
|
-
`),
|
|
1048
|
-
|
|
1049
|
-
const
|
|
1028
|
+
u.setup = r;
|
|
1029
|
+
function m(v, d) {
|
|
1030
|
+
const c = Object.entries(v.colors).map(([o, g]) => `--color${o}: ${g};`).join(`
|
|
1031
|
+
`), p = Object.entries(v.shadows).map(([o, g]) => `--shadow${o}: ${g};`).join(`
|
|
1032
|
+
`), h = Object.entries(v.backgrounds).map(([o, g]) => `--background${o}: ${g};`).join(`
|
|
1033
|
+
`), l = Object.entries(v.backgroundImages).map(([o, g]) => `--backgroundImage${o}: ${g};`).join(`
|
|
1034
|
+
`), s = [":root {"];
|
|
1035
|
+
c && s.push(` ${c}`), p && s.push(` ${p}`), h && s.push(` ${h}`), l && s.push(` ${l}`), s.push("}");
|
|
1036
|
+
const t = Object.keys(v.colors).map((o) => `'${o}'`).join(" | "), N = Object.keys(v.backgrounds).map((o) => `'${o}'`).join(" | "), y = Object.keys(v.backgroundImages).map((o) => `'${o}'`).join(" | "), I = Object.keys(v.shadows).map((o) => `'${o}'`).join(" | "), k = `import '@cronocode/react-box';
|
|
1050
1037
|
|
|
1051
|
-
declare module '${(
|
|
1052
|
-
type ColorType = ${
|
|
1053
|
-
type BackgroundType = ${
|
|
1054
|
-
type BackgroundImageType = ${
|
|
1055
|
-
type ShadowType = ${
|
|
1038
|
+
declare module '${(d == null ? void 0 : d.namespacePath) ?? "@cronocode/react-box/core/types"}' {
|
|
1039
|
+
type ColorType = ${t};
|
|
1040
|
+
type BackgroundType = ${N};
|
|
1041
|
+
type BackgroundImageType = ${y};
|
|
1042
|
+
type ShadowType = ${I};
|
|
1056
1043
|
|
|
1057
1044
|
namespace Augmented {
|
|
1058
1045
|
interface BoxProps {
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
bgColorF?: ColorType;
|
|
1067
|
-
bgColorA?: ColorType;
|
|
1068
|
-
bgColorC?: ColorType;
|
|
1069
|
-
borderColor?: ColorType;
|
|
1070
|
-
borderColorH?: ColorType;
|
|
1071
|
-
borderColorF?: ColorType;
|
|
1072
|
-
borderColorA?: ColorType;
|
|
1073
|
-
borderColorC?: ColorType;
|
|
1074
|
-
outlineColor?: ColorType;
|
|
1075
|
-
outlineColorH?: ColorType;
|
|
1076
|
-
outlineColorF?: ColorType;
|
|
1077
|
-
outlineColorA?: ColorType;
|
|
1078
|
-
outlineColorC?: ColorType;
|
|
1079
|
-
background?: BackgroundType;
|
|
1080
|
-
backgroundH?: BackgroundType;
|
|
1081
|
-
backgroundF?: BackgroundType;
|
|
1082
|
-
backgroundA?: BackgroundType;
|
|
1083
|
-
backgroundC?: BackgroundType;
|
|
1084
|
-
backgroundImage?: BackgroundImageType;
|
|
1085
|
-
backgroundImageH?: BackgroundImageType;
|
|
1086
|
-
backgroundImageF?: BackgroundImageType;
|
|
1087
|
-
backgroundImageA?: BackgroundImageType;
|
|
1088
|
-
backgroundImageC?: BackgroundImageType;
|
|
1089
|
-
shadow?: ShadowType;
|
|
1090
|
-
shadowH?: ShadowType;
|
|
1091
|
-
shadowF?: ShadowType;
|
|
1092
|
-
shadowF?: ShadowType;
|
|
1093
|
-
shadowA?: ShadowType;
|
|
1094
|
-
shadowC?: ShadowType;
|
|
1046
|
+
${n("color", "ColorType")}
|
|
1047
|
+
${n("bgColor", "ColorType")}
|
|
1048
|
+
${n("borderColor", "ColorType")}
|
|
1049
|
+
${n("outlineColor", "ColorType")}
|
|
1050
|
+
${n("background", "BackgroundType")}
|
|
1051
|
+
${n("backgroundImage", "BackgroundImageType")}
|
|
1052
|
+
${n("shadow", "ShadowType")}
|
|
1095
1053
|
}
|
|
1096
1054
|
|
|
1097
1055
|
interface SvgProps {
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
fillF?: ColorType;
|
|
1101
|
-
fillA?: ColorType;
|
|
1102
|
-
fillC?: ColorType;
|
|
1103
|
-
stroke?: ColorType;
|
|
1104
|
-
strokeH?: ColorType;
|
|
1105
|
-
strokeF?: ColorType;
|
|
1106
|
-
strokeA?: ColorType;
|
|
1107
|
-
strokeC?: ColorType;
|
|
1056
|
+
${n("fill", "ColorType")}
|
|
1057
|
+
${n("stroke", "ColorType")}
|
|
1108
1058
|
}
|
|
1109
1059
|
}
|
|
1110
1060
|
}
|
|
1111
1061
|
`;
|
|
1112
1062
|
return {
|
|
1113
|
-
variables:
|
|
1063
|
+
variables: s.join(`
|
|
1114
1064
|
`),
|
|
1115
|
-
boxDts:
|
|
1065
|
+
boxDts: k
|
|
1116
1066
|
};
|
|
1117
1067
|
}
|
|
1118
|
-
|
|
1119
|
-
function v
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1068
|
+
u.setupAugmentedProps = m;
|
|
1069
|
+
function n(v, d) {
|
|
1070
|
+
const c = X.map((p) => ` ${v}${p}?: ${d};`);
|
|
1071
|
+
return c.unshift(` ${v}?: ${d};`), c.join(`
|
|
1072
|
+
`);
|
|
1073
|
+
}
|
|
1074
|
+
function a() {
|
|
1075
|
+
b(T), $(T), Object.keys(T).forEach((d) => {
|
|
1076
|
+
const c = u.Styles[d], p = T[d];
|
|
1077
|
+
c ? c.styles = { ...p.styles, ...c.styles } : u.Styles[d] = T[d];
|
|
1123
1078
|
});
|
|
1124
1079
|
}
|
|
1125
|
-
function
|
|
1126
|
-
if (!
|
|
1080
|
+
function b(v) {
|
|
1081
|
+
if (!v.components)
|
|
1127
1082
|
return;
|
|
1128
|
-
const
|
|
1129
|
-
for (const
|
|
1130
|
-
const p =
|
|
1083
|
+
const d = Object.keys(v.components);
|
|
1084
|
+
for (const c of d) {
|
|
1085
|
+
const p = v.components[c], h = V(c, p);
|
|
1131
1086
|
delete p.children;
|
|
1132
|
-
for (const
|
|
1133
|
-
const [
|
|
1134
|
-
|
|
1087
|
+
for (const l of h) {
|
|
1088
|
+
const [s, t] = l;
|
|
1089
|
+
v.components[s] = t;
|
|
1135
1090
|
}
|
|
1136
1091
|
}
|
|
1137
1092
|
}
|
|
1138
|
-
function
|
|
1139
|
-
if (!
|
|
1093
|
+
function V(v, d) {
|
|
1094
|
+
if (!d.children)
|
|
1140
1095
|
return [];
|
|
1141
|
-
const
|
|
1142
|
-
for (const
|
|
1143
|
-
const
|
|
1144
|
-
p.push(...
|
|
1096
|
+
const c = Object.keys(d.children), p = [];
|
|
1097
|
+
for (const h of c) {
|
|
1098
|
+
const l = `${v}.${h}`, s = d.children[h], t = V(l, s);
|
|
1099
|
+
p.push(...t), delete s.children, p.push([l, s]);
|
|
1145
1100
|
}
|
|
1146
1101
|
return p;
|
|
1147
1102
|
}
|
|
1103
|
+
function $(v) {
|
|
1104
|
+
const { components: d, ...c } = v, p = Object.values(c);
|
|
1105
|
+
d && p.push(...Object.values(d));
|
|
1106
|
+
for (const h of p)
|
|
1107
|
+
"disabled" in h.styles && (Object.entries(h.styles.disabled).map(([l, s]) => {
|
|
1108
|
+
h.styles[`${l}Disabled`] = s;
|
|
1109
|
+
}), delete h.styles.disabled);
|
|
1110
|
+
}
|
|
1148
1111
|
})(O || (O = {}));
|
|
1149
|
-
const
|
|
1150
|
-
function
|
|
1151
|
-
const { clean:
|
|
1152
|
-
return
|
|
1153
|
-
var
|
|
1154
|
-
if (
|
|
1112
|
+
const D = O;
|
|
1113
|
+
function K(u) {
|
|
1114
|
+
const { clean: r, theme: m, component: n } = u;
|
|
1115
|
+
return P(() => {
|
|
1116
|
+
var b, V;
|
|
1117
|
+
if (r)
|
|
1155
1118
|
return;
|
|
1156
|
-
let
|
|
1157
|
-
if (
|
|
1158
|
-
return;
|
|
1159
|
-
|
|
1160
|
-
return c ? v ? { ...n, ...d.disabled, ...(p = d.themes) == null ? void 0 : p[v].disabled } : { ...n, ...d.disabled } : n;
|
|
1161
|
-
}, [a, l, c, v]);
|
|
1162
|
-
}
|
|
1163
|
-
const se = typeof window < "u" && typeof window.document < "u", le = se ? U : X;
|
|
1164
|
-
function te(s, l) {
|
|
1165
|
-
const c = ae(s);
|
|
1166
|
-
return le(A.flush, [s]), W(() => {
|
|
1167
|
-
const v = [l ? A.svgClassName : A.boxClassName], a = c ? { ...B(c), ...B(s) } : B(s);
|
|
1168
|
-
return "inline" in a && (a.display === "block" || !a.display ? a.display = "inline-block" : a.display === "flex" ? a.display = "inline-flex" : a.display === "grid" && (a.display = "inline-grid"), delete a.inline), "inlineH" in a && (a.displayH === "block" || !a.displayH ? a.displayH = "inline-block" : a.displayH === "flex" ? a.displayH = "inline-flex" : a.displayH === "grid" && (a.displayH = "inline-grid"), delete a.inlineH), "inlineF" in a && (a.displayF === "block" || !a.displayF ? a.displayF = "inline-block" : a.displayF === "flex" ? a.displayF = "inline-flex" : a.displayF === "grid" && (a.displayF = "inline-grid"), delete a.inlineF), "inlineA" in a && (a.displayA === "block" || !a.displayA ? a.displayA = "inline-block" : a.displayA === "flex" ? a.displayA = "inline-flex" : a.displayA === "grid" && (a.displayA = "inline-grid"), delete a.inlineA), Object.entries(a).forEach(([d, n]) => {
|
|
1169
|
-
v.push(A.get(d, n));
|
|
1170
|
-
}), v;
|
|
1171
|
-
}, [s, c]);
|
|
1119
|
+
let a = D.Styles[n] ?? ((b = D.Styles.components) == null ? void 0 : b[n]);
|
|
1120
|
+
if (a)
|
|
1121
|
+
return m ? { ...a.styles, ...(V = a.themes) == null ? void 0 : V[m].styles } : a.styles;
|
|
1122
|
+
}, [n, r, m]);
|
|
1172
1123
|
}
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1124
|
+
const ee = typeof window < "u" && typeof window.document < "u", se = ee ? G : M;
|
|
1125
|
+
function te(u, r) {
|
|
1126
|
+
const m = K(u);
|
|
1127
|
+
return se(S.flush, [u]), P(() => {
|
|
1128
|
+
const n = [r ? S.svgClassName : S.boxClassName], a = m ? { ...m, ...u } : { ...u };
|
|
1129
|
+
return Array.isArray(a.disabled) && (Object.entries(a.disabled[1]).forEach(([b, V]) => {
|
|
1130
|
+
a[`${b}Disabled`] = V;
|
|
1131
|
+
}), delete a.disabled), "inline" in a && (a.display === "block" || !a.display ? a.display = "inline-block" : a.display === "flex" ? a.display = "inline-flex" : a.display === "grid" && (a.display = "inline-grid"), delete a.inline), "inlineH" in a && (a.displayH === "block" || !a.displayH ? a.displayH = "inline-block" : a.displayH === "flex" ? a.displayH = "inline-flex" : a.displayH === "grid" && (a.displayH = "inline-grid"), delete a.inlineH), "inlineF" in a && (a.displayF === "block" || !a.displayF ? a.displayF = "inline-block" : a.displayF === "flex" ? a.displayF = "inline-flex" : a.displayF === "grid" && (a.displayF = "inline-grid"), delete a.inlineF), "inlineA" in a && (a.displayA === "block" || !a.displayA ? a.displayA = "inline-block" : a.displayA === "flex" ? a.displayA = "inline-flex" : a.displayA === "grid" && (a.displayA = "inline-grid"), delete a.inlineA), Object.entries(a).forEach(([b, V]) => {
|
|
1132
|
+
n.push(S.get(b, V));
|
|
1133
|
+
}), n;
|
|
1134
|
+
}, [u, m]);
|
|
1179
1135
|
}
|
|
1180
|
-
function
|
|
1181
|
-
return
|
|
1182
|
-
a &&
|
|
1183
|
-
}),
|
|
1136
|
+
function ae(...u) {
|
|
1137
|
+
return u.reduce((r, m) => m ? typeof m == "string" ? (r.push(m), r) : Array.isArray(m) ? (r.push(...ae(...m)), r) : (Object.entries(m).forEach(([n, a]) => {
|
|
1138
|
+
a && r.push(n);
|
|
1139
|
+
}), r) : r, []);
|
|
1184
1140
|
}
|
|
1185
1141
|
export {
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1142
|
+
S,
|
|
1143
|
+
D as T,
|
|
1144
|
+
ae as c,
|
|
1189
1145
|
te as u
|
|
1190
1146
|
};
|