@cronocode/react-box 3.0.7 → 3.0.9

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/core.mjs CHANGED
@@ -1,18 +1,19 @@
1
- import { useMemo as Q, useLayoutEffect as ce, useEffect as le, useState as fe, useRef as me } from "react";
2
- function ve(...e) {
3
- return e.reduce((t, r) => r ? typeof r == "string" ? (t.push(r), t) : Array.isArray(r) ? (t.push(...ve(...r)), t) : (Object.entries(r).forEach(([l, u]) => {
4
- u && t.push(l);
1
+ import ve, { useContext as se, useMemo as L, useLayoutEffect as be, useEffect as ie, useState as ne, useRef as ye } from "react";
2
+ import { jsx as ge } from "react/jsx-runtime";
3
+ function he(...e) {
4
+ return e.reduce((t, r) => r ? typeof r == "string" ? (t.push(r), t) : Array.isArray(r) ? (t.push(...he(...r)), t) : (Object.entries(r).forEach(([l, s]) => {
5
+ s && t.push(l);
5
6
  }), t) : t, []);
6
7
  }
7
- var n;
8
+ var u;
8
9
  ((e) => {
9
10
  ((t) => {
10
- function r(u, s) {
11
- return `${u}${s.replace("/", "-")}`;
11
+ function r(s, n) {
12
+ return `${s}${n.replace("/", "-")}`;
12
13
  }
13
14
  t.fraction = r;
14
- function l(u) {
15
- return [`${u} path`, `${u} circle`, `${u} rect`, `${u} line`];
15
+ function l(s) {
16
+ return [`${s} path`, `${s} circle`, `${s} rect`, `${s} line`];
16
17
  }
17
18
  t.svg = l;
18
19
  })(e.ClassName || (e.ClassName = {})), ((t) => {
@@ -24,12 +25,12 @@ var n;
24
25
  return `${b}px`;
25
26
  }
26
27
  t.px = l;
27
- function u(b, i) {
28
- const [m, c] = i.split("/");
29
- return `${+m / +c * 100}%`;
30
- }
31
- t.fraction = u;
32
28
  function s(b, i) {
29
+ const [m, f] = i.split("/");
30
+ return `${+m / +f * 100}%`;
31
+ }
32
+ t.fraction = s;
33
+ function n(b, i) {
33
34
  switch (i) {
34
35
  case "fit":
35
36
  return "100%";
@@ -39,7 +40,7 @@ var n;
39
40
  return i;
40
41
  }
41
42
  }
42
- t.widthHeight = s;
43
+ t.widthHeight = n;
43
44
  function d(b) {
44
45
  return (i, m) => `var(--${b}${m});`;
45
46
  }
@@ -48,10 +49,10 @@ var n;
48
49
  return (i, m) => `var(--${b}${m});`;
49
50
  }
50
51
  t.svgVariables = o;
51
- function f(b, i) {
52
+ function c(b, i) {
52
53
  return `repeat(${i},minmax(0,1fr))`;
53
54
  }
54
- t.gridColumns = f;
55
+ t.gridColumns = c;
55
56
  function y(b, i) {
56
57
  return i === "full-row" ? "1/-1" : `span ${i}/span ${i}`;
57
58
  }
@@ -69,8 +70,8 @@ var n;
69
70
  }
70
71
  t.flip = g;
71
72
  })(e.Value || (e.Value = {}));
72
- })(n || (n = {}));
73
- var W;
73
+ })(u || (u = {}));
74
+ var M;
74
75
  ((e) => {
75
76
  e.colors = {
76
77
  currentColor: "currentColor",
@@ -330,23 +331,26 @@ var W;
330
331
  none: "none",
331
332
  "bg-img-checked": `url("data:image/svg+xml,${encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' width='100%' viewBox='0 0 20 20'><path fill='none' stroke='#FFF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 10l3 3l6-6'/></svg>")}")`,
332
333
  "bg-img-indeterminate": `url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' width='100%' viewBox='0 0 20 20'><line stroke='${e.colors["violet-400"]}' x1='4' y1='10' x2='16' y2='10' stroke-width='1' /></svg>`)}")`,
333
- "bg-img-radio": `url("data:image/svg+xml,${encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' width='100%' viewBox='0 0 20 20'><circle fill='#FFF' cx='10' cy='10' r='5'/></svg>")}")`
334
+ "bg-img-radio": `url("data:image/svg+xml,${encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' width='100%' viewBox='0 0 20 20'><circle fill='#FFF' cx='10' cy='10' r='5'/></svg>")}")`,
335
+ "small-shadow": "rgba(0, 0, 0, 0.16) 0px 1px 4px",
336
+ "medium-shadow": "rgba(0, 0, 0, 0.24) 0px 3px 8px",
337
+ "large-shadow": "rgba(17, 17, 26, 0.1) 0px 4px 16px, rgba(17, 17, 26, 0.05) 0px 8px 32px"
334
338
  }, r = {};
335
339
  let l = {};
336
- function u(o) {
340
+ function s(o) {
337
341
  return o in l ? r[o] = l[o] : o in t ? r[o] = t[o] : o in e.colors ? r[o] = e.colors[o] : r[o] = o, `var(--${o})`;
338
342
  }
339
- e.getVariableValue = u;
340
- function s() {
341
- return Object.entries(r).map(([o, f]) => `--${o}: ${f};`).join("");
343
+ e.getVariableValue = s;
344
+ function n() {
345
+ return Object.entries(r).map(([o, c]) => `--${o}: ${c};`).join("");
342
346
  }
343
- e.generateVariables = s;
347
+ e.generateVariables = n;
344
348
  function d(o) {
345
349
  l = o;
346
350
  }
347
351
  e.setUserVariables = d;
348
- })(W || (W = {}));
349
- const N = W, E = {
352
+ })(M || (M = {}));
353
+ const N = M, E = {
350
354
  /** The appearance CSS property is used to display UI elements with platform-specific styling, based on the operating system's theme. */
351
355
  appearance: [
352
356
  {
@@ -358,7 +362,7 @@ const N = W, E = {
358
362
  {
359
363
  values: 0,
360
364
  styleName: "border-width",
361
- valueFormat: n.Value.px
365
+ valueFormat: u.Value.px
362
366
  }
363
367
  ],
364
368
  /** The border-width shorthand CSS property sets the width of an element's left and right border. */
@@ -366,7 +370,7 @@ const N = W, E = {
366
370
  {
367
371
  values: 0,
368
372
  styleName: "border-inline-width",
369
- valueFormat: n.Value.px
373
+ valueFormat: u.Value.px
370
374
  }
371
375
  ],
372
376
  /** The border-width shorthand CSS property sets the width of an element's top and bottom border. */
@@ -374,7 +378,7 @@ const N = W, E = {
374
378
  {
375
379
  values: 0,
376
380
  styleName: "border-block-width",
377
- valueFormat: n.Value.px
381
+ valueFormat: u.Value.px
378
382
  }
379
383
  ],
380
384
  /** The border-top-width CSS property sets the width of the top border of an element. */
@@ -382,7 +386,7 @@ const N = W, E = {
382
386
  {
383
387
  values: 0,
384
388
  styleName: "border-top-width",
385
- valueFormat: n.Value.px
389
+ valueFormat: u.Value.px
386
390
  }
387
391
  ],
388
392
  /** The border-right-width CSS property sets the width of the right border of an element. */
@@ -390,7 +394,7 @@ const N = W, E = {
390
394
  {
391
395
  values: 0,
392
396
  styleName: "border-right-width",
393
- valueFormat: n.Value.px
397
+ valueFormat: u.Value.px
394
398
  }
395
399
  ],
396
400
  /** The border-bottom-width CSS property sets the width of the bottom border of an element. */
@@ -398,7 +402,7 @@ const N = W, E = {
398
402
  {
399
403
  values: 0,
400
404
  styleName: "border-bottom-width",
401
- valueFormat: n.Value.px
405
+ valueFormat: u.Value.px
402
406
  }
403
407
  ],
404
408
  /** The border-left-width CSS property sets the width of the left border of an element. */
@@ -406,7 +410,7 @@ const N = W, E = {
406
410
  {
407
411
  values: 0,
408
412
  styleName: "border-left-width",
409
- valueFormat: n.Value.px
413
+ valueFormat: u.Value.px
410
414
  }
411
415
  ],
412
416
  /** The border-style shorthand CSS property sets the line style for all four sides of an element's border. */
@@ -421,7 +425,7 @@ const N = W, E = {
421
425
  {
422
426
  styleName: "border-radius",
423
427
  values: 0,
424
- valueFormat: n.Value.rem
428
+ valueFormat: u.Value.rem
425
429
  }
426
430
  ],
427
431
  /** The border-top-radius CSS property rounds the top corners of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. */
@@ -429,7 +433,7 @@ const N = W, E = {
429
433
  {
430
434
  values: 0,
431
435
  styleName: ["border-top-left-radius", "border-top-right-radius"],
432
- valueFormat: n.Value.rem
436
+ valueFormat: u.Value.rem
433
437
  }
434
438
  ],
435
439
  /** The border-right-radius CSS property rounds the right corners of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. */
@@ -437,7 +441,7 @@ const N = W, E = {
437
441
  {
438
442
  values: 0,
439
443
  styleName: ["border-top-right-radius", "border-bottom-right-radius"],
440
- valueFormat: n.Value.rem
444
+ valueFormat: u.Value.rem
441
445
  }
442
446
  ],
443
447
  /** The border-bottom-radius CSS property rounds the bottom corners of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. */
@@ -445,7 +449,7 @@ const N = W, E = {
445
449
  {
446
450
  values: 0,
447
451
  styleName: ["border-bottom-left-radius", "border-bottom-right-radius"],
448
- valueFormat: n.Value.rem
452
+ valueFormat: u.Value.rem
449
453
  }
450
454
  ],
451
455
  /** The border-left-radius CSS property rounds the left corners of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. */
@@ -453,7 +457,7 @@ const N = W, E = {
453
457
  {
454
458
  values: 0,
455
459
  styleName: ["border-top-left-radius", "border-bottom-left-radius"],
456
- valueFormat: n.Value.rem
460
+ valueFormat: u.Value.rem
457
461
  }
458
462
  ],
459
463
  /** The border-top-left-radius CSS property rounds the top-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. */
@@ -461,7 +465,7 @@ const N = W, E = {
461
465
  {
462
466
  values: 0,
463
467
  styleName: "border-top-left-radius",
464
- valueFormat: n.Value.rem
468
+ valueFormat: u.Value.rem
465
469
  }
466
470
  ],
467
471
  /** The border-top-right-radius CSS property rounds the top-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. */
@@ -469,7 +473,7 @@ const N = W, E = {
469
473
  {
470
474
  values: 0,
471
475
  styleName: "border-top-right-radius",
472
- valueFormat: n.Value.rem
476
+ valueFormat: u.Value.rem
473
477
  }
474
478
  ],
475
479
  /** The border-bottom-right-radius CSS property rounds the bottom-right corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. */
@@ -477,7 +481,7 @@ const N = W, E = {
477
481
  {
478
482
  values: 0,
479
483
  styleName: "border-bottom-right-radius",
480
- valueFormat: n.Value.rem
484
+ valueFormat: u.Value.rem
481
485
  }
482
486
  ],
483
487
  /** The border-bottom-left-radius CSS property rounds the bottom-left corner of an element by specifying the radius (or the radius of the semi-major and semi-minor axes) of the ellipse defining the curvature of the corner. */
@@ -485,7 +489,7 @@ const N = W, E = {
485
489
  {
486
490
  values: 0,
487
491
  styleName: "border-bottom-left-radius",
488
- valueFormat: n.Value.rem
492
+ valueFormat: u.Value.rem
489
493
  }
490
494
  ],
491
495
  /** The position CSS property sets how an element is positioned in a document. The top, right, bottom, and left properties determine the final location of positioned elements. */
@@ -498,35 +502,35 @@ const N = W, E = {
498
502
  top: [
499
503
  {
500
504
  values: 0,
501
- valueFormat: n.Value.rem
505
+ valueFormat: u.Value.rem
502
506
  }
503
507
  ],
504
508
  /** The right CSS property participates in specifying the horizontal position of a positioned element. This inset property has no effect on non-positioned elements. */
505
509
  right: [
506
510
  {
507
511
  values: 0,
508
- valueFormat: n.Value.rem
512
+ valueFormat: u.Value.rem
509
513
  }
510
514
  ],
511
515
  /** The bottom CSS property participates in setting the vertical position of a positioned element. This inset property has no effect on non-positioned elements. */
512
516
  bottom: [
513
517
  {
514
518
  values: 0,
515
- valueFormat: n.Value.rem
519
+ valueFormat: u.Value.rem
516
520
  }
517
521
  ],
518
522
  /** The left CSS property participates in specifying the horizontal position of a positioned element. This inset property has no effect on non-positioned elements. */
519
523
  left: [
520
524
  {
521
525
  values: 0,
522
- valueFormat: n.Value.rem
526
+ valueFormat: u.Value.rem
523
527
  }
524
528
  ],
525
529
  /** The inset CSS property is a shorthand that corresponds to the top, right, bottom, and/or left properties. It has the same multi-value syntax of the margin shorthand. */
526
530
  inset: [
527
531
  {
528
532
  values: 0,
529
- valueFormat: n.Value.rem
533
+ valueFormat: u.Value.rem
530
534
  }
531
535
  ],
532
536
  /** The `box-sizing` CSS property sets how the total width and height of an element is calculated. */
@@ -699,7 +703,7 @@ const N = W, E = {
699
703
  {
700
704
  styleName: "font-size",
701
705
  values: 0,
702
- valueFormat: n.Value.px
706
+ valueFormat: u.Value.px
703
707
  },
704
708
  {
705
709
  styleName: "font-size",
@@ -724,7 +728,7 @@ const N = W, E = {
724
728
  gap: [
725
729
  {
726
730
  values: 0,
727
- valueFormat: n.Value.rem
731
+ valueFormat: u.Value.rem
728
732
  }
729
733
  ],
730
734
  /** The row-gap CSS property sets the size of the gap (gutter) between an element's rows. */
@@ -732,7 +736,7 @@ const N = W, E = {
732
736
  {
733
737
  styleName: "row-gap",
734
738
  values: 0,
735
- valueFormat: n.Value.rem
739
+ valueFormat: u.Value.rem
736
740
  }
737
741
  ],
738
742
  /** The column-gap CSS property sets the size of the gap (gutter) between an element's columns. */
@@ -740,7 +744,7 @@ const N = W, E = {
740
744
  {
741
745
  styleName: "column-gap",
742
746
  values: 0,
743
- valueFormat: n.Value.rem
747
+ valueFormat: u.Value.rem
744
748
  }
745
749
  ],
746
750
  /** The order CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending order value and then by their source code order. Items not given an explicit order value are assigned the default value of 0. */
@@ -1065,7 +1069,7 @@ const N = W, E = {
1065
1069
  {
1066
1070
  styleName: "letter-spacing",
1067
1071
  values: 0,
1068
- valueFormat: n.Value.px
1072
+ valueFormat: u.Value.px
1069
1073
  }
1070
1074
  ],
1071
1075
  /** The line-height CSS property sets the height of a line box in horizontal writing modes. In vertical writing modes, it sets the width of a line box. It's commonly used to set the distance between lines of text. On block-level elements in horizontal writing modes, it specifies the preferred height of line boxes within the element, and on non-replaced inline elements, it specifies the height that is used to calculate line box height. */
@@ -1073,7 +1077,7 @@ const N = W, E = {
1073
1077
  {
1074
1078
  styleName: "line-height",
1075
1079
  values: 0,
1076
- valueFormat: n.Value.px
1080
+ valueFormat: u.Value.px
1077
1081
  },
1078
1082
  {
1079
1083
  styleName: "line-height",
@@ -1093,7 +1097,7 @@ const N = W, E = {
1093
1097
  {
1094
1098
  values: 0,
1095
1099
  styleName: "margin",
1096
- valueFormat: n.Value.rem
1100
+ valueFormat: u.Value.rem
1097
1101
  },
1098
1102
  {
1099
1103
  values: ["auto"],
@@ -1105,7 +1109,7 @@ const N = W, E = {
1105
1109
  {
1106
1110
  values: 0,
1107
1111
  styleName: "margin-inline",
1108
- valueFormat: n.Value.rem
1112
+ valueFormat: u.Value.rem
1109
1113
  },
1110
1114
  {
1111
1115
  values: ["auto"],
@@ -1117,7 +1121,7 @@ const N = W, E = {
1117
1121
  {
1118
1122
  values: 0,
1119
1123
  styleName: "margin-block",
1120
- valueFormat: n.Value.rem
1124
+ valueFormat: u.Value.rem
1121
1125
  },
1122
1126
  {
1123
1127
  values: ["auto"],
@@ -1129,7 +1133,7 @@ const N = W, E = {
1129
1133
  {
1130
1134
  values: 0,
1131
1135
  styleName: "margin-top",
1132
- valueFormat: n.Value.rem
1136
+ valueFormat: u.Value.rem
1133
1137
  },
1134
1138
  {
1135
1139
  values: ["auto"],
@@ -1141,7 +1145,7 @@ const N = W, E = {
1141
1145
  {
1142
1146
  values: 0,
1143
1147
  styleName: "margin-right",
1144
- valueFormat: n.Value.rem
1148
+ valueFormat: u.Value.rem
1145
1149
  },
1146
1150
  {
1147
1151
  values: ["auto"],
@@ -1153,7 +1157,7 @@ const N = W, E = {
1153
1157
  {
1154
1158
  values: 0,
1155
1159
  styleName: "margin-bottom",
1156
- valueFormat: n.Value.rem
1160
+ valueFormat: u.Value.rem
1157
1161
  },
1158
1162
  {
1159
1163
  values: ["auto"],
@@ -1165,7 +1169,7 @@ const N = W, E = {
1165
1169
  {
1166
1170
  values: 0,
1167
1171
  styleName: "margin-left",
1168
- valueFormat: n.Value.rem
1172
+ valueFormat: u.Value.rem
1169
1173
  },
1170
1174
  {
1171
1175
  values: ["auto"],
@@ -1177,7 +1181,7 @@ const N = W, E = {
1177
1181
  {
1178
1182
  values: 0,
1179
1183
  styleName: "padding",
1180
- valueFormat: n.Value.rem
1184
+ valueFormat: u.Value.rem
1181
1185
  }
1182
1186
  ],
1183
1187
  /** The padding-inline CSS shorthand property defines the logical inline start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. */
@@ -1185,7 +1189,7 @@ const N = W, E = {
1185
1189
  {
1186
1190
  values: 0,
1187
1191
  styleName: "padding-inline",
1188
- valueFormat: n.Value.rem
1192
+ valueFormat: u.Value.rem
1189
1193
  }
1190
1194
  ],
1191
1195
  /** The padding-block CSS shorthand property defines the logical block start and end padding of an element, which maps to physical padding properties depending on the element's writing mode, directionality, and text orientation. */
@@ -1193,7 +1197,7 @@ const N = W, E = {
1193
1197
  {
1194
1198
  values: 0,
1195
1199
  styleName: "padding-block",
1196
- valueFormat: n.Value.rem
1200
+ valueFormat: u.Value.rem
1197
1201
  }
1198
1202
  ],
1199
1203
  /** The padding-top CSS property sets the height of the padding area on the top of an element. */
@@ -1201,7 +1205,7 @@ const N = W, E = {
1201
1205
  {
1202
1206
  values: 0,
1203
1207
  styleName: "padding-top",
1204
- valueFormat: n.Value.rem
1208
+ valueFormat: u.Value.rem
1205
1209
  }
1206
1210
  ],
1207
1211
  /** The padding-right CSS property sets the width of the padding area on the right of an element. */
@@ -1209,7 +1213,7 @@ const N = W, E = {
1209
1213
  {
1210
1214
  values: 0,
1211
1215
  styleName: "padding-right",
1212
- valueFormat: n.Value.rem
1216
+ valueFormat: u.Value.rem
1213
1217
  }
1214
1218
  ],
1215
1219
  /** The padding-bottom CSS property sets the height of the padding area on the bottom of an element. */
@@ -1217,7 +1221,7 @@ const N = W, E = {
1217
1221
  {
1218
1222
  values: 0,
1219
1223
  styleName: "padding-bottom",
1220
- valueFormat: n.Value.rem
1224
+ valueFormat: u.Value.rem
1221
1225
  }
1222
1226
  ],
1223
1227
  /** The padding-left CSS property sets the width of the padding area to the left of an element. */
@@ -1225,7 +1229,7 @@ const N = W, E = {
1225
1229
  {
1226
1230
  values: 0,
1227
1231
  styleName: "padding-left",
1228
- valueFormat: n.Value.rem
1232
+ valueFormat: u.Value.rem
1229
1233
  }
1230
1234
  ],
1231
1235
  /** The object-fit CSS property sets how the content of a replaced element, such as an <img> or <video>, should be resized to fit its container. */
@@ -1246,7 +1250,7 @@ const N = W, E = {
1246
1250
  {
1247
1251
  styleName: "outline-width",
1248
1252
  values: 0,
1249
- valueFormat: n.Value.px
1253
+ valueFormat: u.Value.px
1250
1254
  }
1251
1255
  ],
1252
1256
  /** The outline-style CSS property sets the style of an element's outline. An outline is a line that is drawn around an element, outside the border. */
@@ -1261,7 +1265,7 @@ const N = W, E = {
1261
1265
  {
1262
1266
  styleName: "outline-offset",
1263
1267
  values: 0,
1264
- valueFormat: n.Value.px
1268
+ valueFormat: u.Value.px
1265
1269
  }
1266
1270
  ],
1267
1271
  /** The overflow CSS shorthand property sets the desired behavior when content does not fit in the element's padding box (overflows) in the horizontal and/or vertical direction. */
@@ -1512,8 +1516,22 @@ const N = W, E = {
1512
1516
  valueFormat: (e, t) => t(e),
1513
1517
  styleName: "background-image"
1514
1518
  }
1519
+ ],
1520
+ shadow: [
1521
+ {
1522
+ values: ["small-shadow", "medium-shadow", "large-shadow"],
1523
+ valueFormat: (e, t) => t(e),
1524
+ styleName: "box-shadow"
1525
+ }
1526
+ ],
1527
+ translateX: [
1528
+ {
1529
+ values: 0,
1530
+ valueFormat: (e) => `translateX(${e / 4}rem)`,
1531
+ styleName: "transform"
1532
+ }
1515
1533
  ]
1516
- }, se = {
1534
+ }, ue = {
1517
1535
  hover: ":hover",
1518
1536
  focus: ":focus-within",
1519
1537
  hasFocus: ":has(:focus)",
@@ -1532,58 +1550,63 @@ const N = W, E = {
1532
1550
  required: ":required",
1533
1551
  disabled: "[disabled]",
1534
1552
  selected: '[aria-selected="true"]'
1535
- }, Z = { ...se, ...U }, ie = Object.entries(Z).reduce(
1553
+ }, Z = { ...ue, ...U }, de = Object.entries(Z).reduce(
1536
1554
  (e, [t], r) => (e[t] = Math.pow(2, r), e),
1537
1555
  {}
1538
- ), D = Object.entries(Z).reduce(
1556
+ ), W = Object.entries(Z).reduce(
1539
1557
  (e, [t]) => {
1540
- const r = ie[t];
1541
- return Object.entries(e).forEach(([l, u]) => {
1542
- e[+l + r] = [...u, t];
1558
+ const r = de[t];
1559
+ return Object.entries(e).forEach(([l, s]) => {
1560
+ e[+l + r] = [...s, t];
1543
1561
  }), e;
1544
1562
  },
1545
1563
  { 0: [] }
1546
- ), K = {
1564
+ ), q = {
1547
1565
  hoverGroup: "hover",
1548
1566
  focusGroup: "focus",
1549
1567
  activeGroup: "active",
1550
1568
  disabledGroup: "disabled"
1551
1569
  }, H = {
1570
+ /** Styles applied for small screens and larger. >= 640 */
1552
1571
  sm: 640,
1572
+ /** Styles applied for medium screens and larger. >= 768 */
1553
1573
  md: 768,
1574
+ /** Styles applied for large screens and larger. >= 1024 */
1554
1575
  lg: 1024,
1576
+ /** Styles applied for extra-large screens and larger. >= 1280 */
1555
1577
  xl: 1280,
1578
+ /** Styles applied for 2x extra-large screens and larger. >= 1536 */
1556
1579
  xxl: 1536
1557
1580
  };
1558
- var q;
1581
+ var X;
1559
1582
  ((e) => {
1560
- function t(s, d, o) {
1561
- const f = { ...s }, y = f.props || {};
1583
+ function t(n, d, o) {
1584
+ const c = { ...n }, y = c.props || {};
1562
1585
  return d.forEach((a) => {
1563
- a in f && (y[a] = f[a], delete f[a]);
1586
+ a in c && (y[a] = c[a], delete c[a]);
1564
1587
  }), o && Object.entries(o).forEach(([a, v]) => {
1565
1588
  y[a] = v;
1566
- }), f.props = y, f;
1589
+ }), c.props = y, c;
1567
1590
  }
1568
1591
  e.buildProps = t;
1569
- function r(s) {
1570
- return !!s && typeof s == "object";
1592
+ function r(n) {
1593
+ return !!n && typeof n == "object";
1571
1594
  }
1572
1595
  e.isObject = r;
1573
- function l(...s) {
1574
- return s.reduce((d, o) => (Object.keys(o ?? {}).forEach((f) => {
1575
- const y = d[f], a = o[f];
1576
- f in U && typeof a == "boolean" || (f in U && Array.isArray(a) ? d[f] = l(y, a[1] ?? {}) : Array.isArray(y) && Array.isArray(a) ? d[f] = y.concat(...a) : r(y) && r(a) ? d[f] = l(y, a) : d[f] = a);
1596
+ function l(...n) {
1597
+ return n.reduce((d, o) => (Object.keys(o ?? {}).forEach((c) => {
1598
+ const y = d[c], a = o[c];
1599
+ c in U && typeof a == "boolean" || (c in U && Array.isArray(a) ? d[c] = l(y, a[1] ?? {}) : Array.isArray(y) && Array.isArray(a) ? d[c] = y.concat(...a) : r(y) && r(a) ? d[c] = l(y, a) : d[c] = a);
1577
1600
  }), d), {});
1578
1601
  }
1579
1602
  e.mergeDeep = l;
1580
- function u(s, d) {
1581
- return s in d;
1603
+ function s(n, d) {
1604
+ return n in d;
1582
1605
  }
1583
- e.isKeyOf = u;
1584
- })(q || (q = {}));
1585
- const C = q;
1586
- class be {
1606
+ e.isKeyOf = s;
1607
+ })(X || (X = {}));
1608
+ const C = X;
1609
+ class pe {
1587
1610
  constructor() {
1588
1611
  this._index = 0, this._cache = {};
1589
1612
  }
@@ -1591,506 +1614,547 @@ class be {
1591
1614
  return this._cache[t] || (this._cache[t] = this.getByIndex(this._index++)), this._cache[t];
1592
1615
  }
1593
1616
  getByIndex(t) {
1594
- const { first: r, next: l } = ye, u = t - r.length;
1595
- if (u < 0)
1617
+ const { first: r, next: l } = we, s = t - r.length;
1618
+ if (s < 0)
1596
1619
  return r[t];
1597
- const s = Math.floor(u / l.length), d = u - s * l.length;
1598
- return this.getByIndex(s) + l[d];
1620
+ const n = Math.floor(s / l.length), d = s - n * l.length;
1621
+ return this.getByIndex(n) + l[d];
1599
1622
  }
1600
1623
  }
1601
- const ye = {
1624
+ const we = {
1602
1625
  first: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
1603
1626
  next: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
1604
- };
1605
- var I;
1606
- ((e) => {
1607
- e.components = {};
1608
- })(I || (I = {}));
1609
- function ge(e) {
1610
- const { clean: t, theme: r, component: l } = e;
1611
- return Q(() => {
1612
- var d;
1627
+ }, _ = {
1628
+ button: {
1629
+ styles: {
1630
+ display: "inline-flex",
1631
+ color: "white",
1632
+ bgColor: "violet-500",
1633
+ borderColor: "violet-500",
1634
+ p: 3,
1635
+ cursor: "pointer",
1636
+ b: 1,
1637
+ borderRadius: 1,
1638
+ userSelect: "none",
1639
+ lineHeight: 20,
1640
+ hover: {
1641
+ bgColor: "violet-600",
1642
+ borderColor: "violet-600"
1643
+ },
1644
+ disabled: {
1645
+ cursor: "not-allowed",
1646
+ bgColor: "violet-50",
1647
+ color: "gray-400",
1648
+ borderColor: "gray-300"
1649
+ }
1650
+ }
1651
+ },
1652
+ textbox: {
1653
+ styles: {
1654
+ display: "inline-block",
1655
+ b: 1,
1656
+ borderColor: "violet-200",
1657
+ bgColor: "violet-50",
1658
+ color: "violet-950",
1659
+ borderRadius: 1,
1660
+ p: 3,
1661
+ transition: "none",
1662
+ lineHeight: 20,
1663
+ hover: {
1664
+ borderColor: "violet-300"
1665
+ },
1666
+ focus: {
1667
+ outline: 1,
1668
+ borderColor: "violet-500",
1669
+ outlineColor: "violet-500"
1670
+ },
1671
+ disabled: {
1672
+ cursor: "not-allowed",
1673
+ bgColor: "violet-50",
1674
+ color: "gray-400",
1675
+ borderColor: "gray-300"
1676
+ }
1677
+ }
1678
+ },
1679
+ textarea: {
1680
+ styles: {
1681
+ display: "inline-block",
1682
+ b: 1,
1683
+ borderColor: "violet-200",
1684
+ bgColor: "violet-50",
1685
+ color: "violet-950",
1686
+ borderRadius: 1,
1687
+ p: 3,
1688
+ transition: "none",
1689
+ hover: {
1690
+ borderColor: "violet-300"
1691
+ },
1692
+ focus: {
1693
+ outline: 1,
1694
+ borderColor: "violet-500",
1695
+ outlineColor: "violet-500"
1696
+ },
1697
+ disabled: {
1698
+ cursor: "not-allowed",
1699
+ bgColor: "violet-50",
1700
+ color: "gray-400",
1701
+ borderColor: "gray-300",
1702
+ resize: "none"
1703
+ }
1704
+ }
1705
+ },
1706
+ checkbox: {
1707
+ styles: {
1708
+ display: "inline-block",
1709
+ appearance: "none",
1710
+ b: 1,
1711
+ borderColor: "violet-300",
1712
+ borderRadius: 1,
1713
+ p: 2,
1714
+ cursor: "pointer",
1715
+ transition: "none",
1716
+ hover: {
1717
+ borderColor: "violet-500"
1718
+ },
1719
+ focus: {
1720
+ outline: 2,
1721
+ outlineOffset: 2,
1722
+ outlineColor: "violet-500"
1723
+ },
1724
+ checked: {
1725
+ bgColor: "violet-500",
1726
+ borderColor: "violet-500",
1727
+ bgImage: "bg-img-checked"
1728
+ },
1729
+ indeterminate: {
1730
+ color: "violet-500",
1731
+ bgImage: "bg-img-indeterminate"
1732
+ },
1733
+ disabled: {
1734
+ cursor: "not-allowed",
1735
+ bgColor: "violet-100",
1736
+ color: "gray-400",
1737
+ borderColor: "gray-300"
1738
+ }
1739
+ }
1740
+ },
1741
+ radioButton: {
1742
+ styles: {
1743
+ appearance: "none",
1744
+ b: 1,
1745
+ borderColor: "violet-300",
1746
+ borderRadius: 3,
1747
+ p: 2,
1748
+ cursor: "pointer",
1749
+ transition: "none",
1750
+ hover: {
1751
+ borderColor: "violet-500"
1752
+ },
1753
+ focus: {
1754
+ outline: 2,
1755
+ outlineOffset: 2,
1756
+ outlineColor: "violet-500"
1757
+ },
1758
+ checked: {
1759
+ bgColor: "violet-500",
1760
+ borderColor: "violet-500",
1761
+ bgImage: "bg-img-radio"
1762
+ },
1763
+ disabled: {
1764
+ cursor: "not-allowed",
1765
+ bgColor: "violet-100",
1766
+ color: "gray-400",
1767
+ borderColor: "violet-200"
1768
+ }
1769
+ }
1770
+ },
1771
+ dropdown: {
1772
+ styles: {
1773
+ display: "inline-flex",
1774
+ ai: "center",
1775
+ gap: 2,
1776
+ jc: "space-between",
1777
+ p: 3,
1778
+ cursor: "pointer",
1779
+ bgColor: "violet-50",
1780
+ color: "violet-950",
1781
+ b: 1,
1782
+ borderColor: "violet-200",
1783
+ borderRadius: 1,
1784
+ userSelect: "none",
1785
+ lineHeight: 20,
1786
+ minWidth: 40,
1787
+ transition: "none",
1788
+ hover: {
1789
+ borderColor: "violet-300"
1790
+ },
1791
+ focus: {
1792
+ outline: 1,
1793
+ borderColor: "violet-500",
1794
+ outlineColor: "violet-500"
1795
+ },
1796
+ disabled: {
1797
+ cursor: "not-allowed",
1798
+ bgColor: "violet-50",
1799
+ color: "gray-400",
1800
+ borderColor: "gray-300"
1801
+ }
1802
+ },
1803
+ children: {
1804
+ display: {
1805
+ styles: {
1806
+ whiteSpace: "nowrap",
1807
+ textOverflow: "ellipsis",
1808
+ overflow: "hidden"
1809
+ }
1810
+ },
1811
+ items: {
1812
+ styles: {
1813
+ display: "flex",
1814
+ d: "column",
1815
+ gap: 1,
1816
+ p: 1,
1817
+ b: 1,
1818
+ borderRadius: 1,
1819
+ position: "relative",
1820
+ top: 1,
1821
+ bgColor: "white",
1822
+ overflow: "auto",
1823
+ maxHeight: 62,
1824
+ borderColor: "violet-300",
1825
+ color: "violet-950",
1826
+ shadow: "medium-shadow"
1827
+ }
1828
+ },
1829
+ item: {
1830
+ styles: {
1831
+ display: "flex",
1832
+ width: "fit",
1833
+ p: 3,
1834
+ cursor: "pointer",
1835
+ borderRadius: 1,
1836
+ hover: {
1837
+ bgColor: "gray-100"
1838
+ },
1839
+ focus: {
1840
+ bgColor: "violet-50"
1841
+ },
1842
+ selected: {
1843
+ bgColor: "violet-50",
1844
+ cursor: "default",
1845
+ hover: {
1846
+ bgColor: "violet-100"
1847
+ }
1848
+ }
1849
+ },
1850
+ themes: {
1851
+ multiple: {
1852
+ selected: {
1853
+ cursor: "pointer"
1854
+ }
1855
+ }
1856
+ }
1857
+ },
1858
+ unselect: {
1859
+ styles: {
1860
+ display: "flex",
1861
+ width: "fit",
1862
+ p: 3,
1863
+ cursor: "pointer",
1864
+ lineHeight: 20,
1865
+ borderRadius: 1,
1866
+ color: "violet-400",
1867
+ hover: {
1868
+ bgColor: "violet-50"
1869
+ },
1870
+ focus: {
1871
+ bgColor: "violet-50"
1872
+ },
1873
+ selected: {
1874
+ bgColor: "violet-50",
1875
+ cursor: "default"
1876
+ }
1877
+ }
1878
+ },
1879
+ selectAll: {
1880
+ styles: {
1881
+ display: "flex",
1882
+ width: "fit",
1883
+ p: 3,
1884
+ cursor: "pointer",
1885
+ lineHeight: 20,
1886
+ borderRadius: 1,
1887
+ color: "violet-400",
1888
+ hover: {
1889
+ bgColor: "violet-50"
1890
+ },
1891
+ focus: {
1892
+ bgColor: "violet-50"
1893
+ },
1894
+ selected: {
1895
+ bgColor: "violet-50",
1896
+ cursor: "default"
1897
+ }
1898
+ }
1899
+ },
1900
+ emptyItem: {
1901
+ styles: {
1902
+ display: "flex",
1903
+ width: "fit",
1904
+ p: 3,
1905
+ cursor: "default",
1906
+ lineHeight: 20,
1907
+ borderRadius: 1,
1908
+ color: "violet-400"
1909
+ }
1910
+ }
1911
+ }
1912
+ }
1913
+ }, P = ve.createContext({ themeStyles: _, theme: "", setTheme: () => {
1914
+ } });
1915
+ function xe(e) {
1916
+ const { clean: t, theme: r, component: l } = e, { themeStyles: s } = se(P);
1917
+ return L(() => {
1918
+ var o;
1613
1919
  if (t) return;
1614
- const u = l == null ? void 0 : l.split(".");
1615
- if (!u) return;
1616
- const s = u.reduce((o, f, y) => {
1617
- var a, v;
1618
- return y === 0 ? (a = I.components) == null ? void 0 : a[f] : (v = o == null ? void 0 : o.children) == null ? void 0 : v[f];
1920
+ const n = l == null ? void 0 : l.split(".");
1921
+ if (!n) return;
1922
+ const d = n.reduce((c, y, a) => {
1923
+ var v;
1924
+ return a === 0 ? s == null ? void 0 : s[y] : (v = c == null ? void 0 : c.children) == null ? void 0 : v[y];
1619
1925
  }, void 0);
1620
- if (s)
1621
- return r ? C.mergeDeep(s.styles, ((d = s.themes) == null ? void 0 : d[r]) ?? {}) : s.styles;
1622
- }, [l, t, r]);
1926
+ if (d)
1927
+ return r ? C.mergeDeep(d.styles, ((o = d.themes) == null ? void 0 : o[r]) ?? {}) : d.styles;
1928
+ }, [l, t, r, s]);
1623
1929
  }
1624
- const he = new be(), pe = typeof window < "u" && typeof window.document < "u";
1625
- var ae;
1626
- const ne = typeof process == "object" && ((ae = process.env) == null ? void 0 : ae.NODE_ENV) === "test", we = pe && !ne ? ce : le, ue = "_b", A = "_s";
1627
- function Fe(e, t) {
1628
- we(S.flush, [e]);
1629
- const r = ge(e);
1630
- return Q(() => {
1631
- const l = [t ? A : ue], u = r ? C.mergeDeep(r, e) : e;
1632
- return S.addClassNames(u, l, []), l;
1930
+ const Ne = new pe(), Fe = typeof window < "u" && typeof window.document < "u";
1931
+ var le;
1932
+ const ce = typeof process == "object" && ((le = process.env) == null ? void 0 : le.NODE_ENV) === "test", $e = Fe && !ce ? be : ie, fe = "_b", A = "_s";
1933
+ function Ee(e, t) {
1934
+ $e(S.flush, [e]);
1935
+ const r = xe(e);
1936
+ return L(() => {
1937
+ const l = [t ? A : fe], s = r ? C.mergeDeep(r, e) : e;
1938
+ return S.addClassNames(s, l, []), l;
1633
1939
  }, [e, t, r]);
1634
1940
  }
1635
1941
  var S;
1636
1942
  ((e) => {
1637
1943
  let t = !0, r = {};
1638
1944
  function l(a, v, g, b, i) {
1639
- Object.entries(a).forEach(([m, c]) => {
1945
+ Object.entries(a).forEach(([m, f]) => {
1640
1946
  if (C.isKeyOf(m, E))
1641
- d(m, c, v, g, b, i);
1642
- else if (C.isKeyOf(m, se))
1643
- l(c, v, [...g, m], b, i);
1947
+ d(m, f, v, g, b, i);
1948
+ else if (C.isKeyOf(m, ue))
1949
+ l(f, v, [...g, m], b, i);
1644
1950
  else if (C.isKeyOf(m, U)) {
1645
- if (Array.isArray(c)) {
1646
- const [w, x] = c;
1951
+ if (Array.isArray(f)) {
1952
+ const [w, x] = f;
1647
1953
  l(x, v, [...g, m], b, i);
1648
1954
  }
1649
- C.isObject(c) && l(c, v, [...g, m], b, i);
1650
- } else C.isKeyOf(m, H) ? l(c, v, g, m, i) : C.isKeyOf(m, K) && (typeof c == "string" ? v.push(`${K[m]}-${c}`) : Object.entries(c).forEach(([w, x]) => {
1651
- l(x, v, [...g, K[m]], b, w);
1955
+ C.isObject(f) && l(f, v, [...g, m], b, i);
1956
+ } else C.isKeyOf(m, H) ? l(f, v, g, m, i) : C.isKeyOf(m, q) && (typeof f == "string" ? v.push(`${q[m]}-${f}`) : Object.entries(f).forEach(([w, x]) => {
1957
+ l(x, v, [...g, q[m]], b, w);
1652
1958
  }));
1653
1959
  });
1654
1960
  }
1655
1961
  e.addClassNames = l;
1656
- function u() {
1962
+ function s() {
1657
1963
  if (!t) return;
1658
1964
  console.debug("\x1B[36m%s\x1B[0m", "[react-box]: flush");
1659
- const a = Object.entries(E).reduce((m, [c], w) => (m[c] = w, m), {}), v = `: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;}
1965
+ const a = Object.entries(E).reduce((m, [f], w) => (m[f] = w, m), {}), v = `: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;}
1660
1966
  html{font-size: 16px;font-family: Arial, sans-serif;}
1661
1967
  body{margin: 0;line-height: var(--lineHeight);font-size: var(--fontSize);}
1662
1968
  a,ul{all: unset;}
1663
- .${ue}{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;}
1969
+ .${fe}{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;}
1664
1970
  .${A}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;transition: all var(--svgTransitionTime);}.${A} path,.${A} circle,.${A} rect,.${A} line {transition: all var(--svgTransitionTime);}
1665
1971
  `, g = Object.entries(r);
1666
1972
  g.sort(
1667
- ([m], [c]) => (H[m] ?? 0) - (H[c] ?? 0)
1973
+ ([m], [f]) => (H[m] ?? 0) - (H[f] ?? 0)
1668
1974
  );
1669
1975
  const b = g.reduce(
1670
- (m, [c, w]) => (c !== "normal" && m.push(`@media(min-width: ${H[c]}px){`), Object.entries(w).forEach(([x, G]) => {
1671
- const { __parents: P, ...de } = G, ee = Object.entries(de);
1672
- ee.sort(([F], [_]) => a[F] - a[_]), ee.forEach(([F, _]) => {
1673
- _.forEach((V) => {
1674
- var B, k;
1976
+ (m, [f, w]) => (f !== "normal" && m.push(`@media(min-width: ${H[f]}px){`), Object.entries(w).forEach(([x, D]) => {
1977
+ const { __parents: ee, ...me } = D, te = Object.entries(me);
1978
+ te.sort(([F], [T]) => a[F] - a[T]), te.forEach(([F, T]) => {
1979
+ T.forEach((V) => {
1980
+ var I, k;
1675
1981
  const h = E[F].find(($) => Array.isArray($.values) ? $.values.includes(V) : typeof V == typeof $.values);
1676
1982
  if (!h) return;
1677
- const z = o(F, V, +x, c), L = D[+x].map(($) => Z[$]).join(""), p = ((B = h.selector) == null ? void 0 : B.call(h, `.${z}`, L)) ?? `.${z}${L}`, T = Array.isArray(h.styleName) ? h.styleName : [h.styleName ?? F], O = ((k = h.valueFormat) == null ? void 0 : k.call(h, V, N.getVariableValue)) ?? V;
1678
- m.push(`${p}{${T.map(($) => `${$}:${O}`).join(";")}}`);
1983
+ const z = o(F, V, +x, f), K = W[+x].map(($) => Z[$]).join(""), p = ((I = h.selector) == null ? void 0 : I.call(h, `.${z}`, K)) ?? `.${z}${K}`, B = Array.isArray(h.styleName) ? h.styleName : [h.styleName ?? F], O = ((k = h.valueFormat) == null ? void 0 : k.call(h, V, N.getVariableValue)) ?? V;
1984
+ m.push(`${p}{${B.map(($) => `${$}:${O}`).join(";")}}`);
1679
1985
  });
1680
- }), P && Object.entries(P).forEach(([F, _]) => {
1681
- const V = Object.entries(_);
1986
+ }), ee && Object.entries(ee).forEach(([F, T]) => {
1987
+ const V = Object.entries(T);
1682
1988
  V.sort(([j], [h]) => a[j] - a[h]), V.forEach(([j, h]) => {
1683
1989
  h.forEach((z) => {
1684
- var te, re;
1990
+ var re, oe;
1685
1991
  const p = E[j].find((R) => Array.isArray(R.values) ? R.values.includes(z) : typeof z == typeof R.values);
1686
1992
  if (!p) return;
1687
- const T = o(j, z, +x, c, F), [O] = D[+x], B = ((te = p.selector) == null ? void 0 : te.call(p, `.${O}-${F}:${O} .${T}`, "")) ?? `.${O}-${F}:${O} .${T}`, k = Array.isArray(p.styleName) ? p.styleName : [p.styleName ?? j], $ = ((re = p.valueFormat) == null ? void 0 : re.call(p, z, N.getVariableValue)) ?? z;
1688
- m.push(`${B}{${k.map((R) => `${R}:${$}`).join(";")}}`);
1993
+ const B = o(j, z, +x, f, F), [O] = W[+x], I = ((re = p.selector) == null ? void 0 : re.call(p, `.${O}-${F}:${O} .${B}`, "")) ?? `.${O}-${F}:${O} .${B}`, k = Array.isArray(p.styleName) ? p.styleName : [p.styleName ?? j], $ = ((oe = p.valueFormat) == null ? void 0 : oe.call(p, z, N.getVariableValue)) ?? z;
1994
+ m.push(`${I}{${k.map((R) => `${R}:${$}`).join(";")}}`);
1689
1995
  });
1690
1996
  });
1691
1997
  });
1692
- }), c !== "normal" && m.push("}"), m),
1998
+ }), f !== "normal" && m.push("}"), m),
1693
1999
  [v]
1694
2000
  );
1695
2001
  b.unshift(`:root{${N.generateVariables()}}`);
1696
2002
  const i = y();
1697
2003
  i.innerHTML = b.join(""), t = !1;
1698
2004
  }
1699
- e.flush = u;
1700
- function s() {
2005
+ e.flush = s;
2006
+ function n() {
1701
2007
  r = {};
1702
2008
  }
1703
- e.clear = s;
2009
+ e.clear = n;
1704
2010
  function d(a, v, g, b, i = "normal", m) {
1705
2011
  if (v == null) return;
1706
- const c = b.reduce((x, G) => x + ie[G], 0);
1707
- r[i] ? r[i][c] ? r[i][c][a] || (r[i][c][a] = /* @__PURE__ */ new Set()) : r[i][c] = { [a]: /* @__PURE__ */ new Set() } : r[i] = { [c]: { [a]: /* @__PURE__ */ new Set() } }, m ? (r[i][c].__parents ? r[i][c].__parents[m] ? r[i][c].__parents[m][a] || (r[i][c].__parents[m][a] = /* @__PURE__ */ new Set()) : r[i][c].__parents[m] = { [a]: /* @__PURE__ */ new Set() } : r[i][c].__parents = { [m]: { [a]: /* @__PURE__ */ new Set() } }, r[i][c].__parents[m][a].has(v) || (r[i][c].__parents[m][a].add(v), t = !0)) : r[i][c][a].has(v) || (r[i][c][a].add(v), t = !0);
1708
- const w = o(a, v, c, i, m);
2012
+ const f = b.reduce((x, D) => x + de[D], 0);
2013
+ r[i] ? r[i][f] ? r[i][f][a] || (r[i][f][a] = /* @__PURE__ */ new Set()) : r[i][f] = { [a]: /* @__PURE__ */ new Set() } : r[i] = { [f]: { [a]: /* @__PURE__ */ new Set() } }, m ? (r[i][f].__parents ? r[i][f].__parents[m] ? r[i][f].__parents[m][a] || (r[i][f].__parents[m][a] = /* @__PURE__ */ new Set()) : r[i][f].__parents[m] = { [a]: /* @__PURE__ */ new Set() } : r[i][f].__parents = { [m]: { [a]: /* @__PURE__ */ new Set() } }, r[i][f].__parents[m][a].has(v) || (r[i][f].__parents[m][a].add(v), t = !0)) : r[i][f][a].has(v) || (r[i][f][a].add(v), t = !0);
2014
+ const w = o(a, v, f, i, m);
1709
2015
  g.push(w);
1710
2016
  }
1711
2017
  function o(a, v, g, b, i) {
1712
- const m = D[g], c = `${b === "normal" ? "" : `${b}-`}${m.map((w) => `${w}-`).join("")}${i ? `${i}-` : ""}${a}-${v}`;
1713
- return ne ? c : he.getIdentity(c);
2018
+ const m = W[g], f = `${b === "normal" ? "" : `${b}-`}${m.map((w) => `${w}-`).join("")}${i ? `${i}-` : ""}${a}-${v}`;
2019
+ return ce ? f : Ne.getIdentity(f);
1714
2020
  }
1715
- const f = "crono-styles";
2021
+ const c = "crono-styles";
1716
2022
  function y() {
1717
- let a = document.getElementById(f);
1718
- return a || (a = document.createElement("style"), a.setAttribute("id", f), a.setAttribute("type", "text/css"), document.head.insertBefore(a, document.head.firstChild)), a;
2023
+ let a = document.getElementById(c);
2024
+ return a || (a = document.createElement("style"), a.setAttribute("id", c), a.setAttribute("type", "text/css"), document.head.insertBefore(a, document.head.firstChild)), a;
1719
2025
  }
1720
2026
  })(S || (S = {}));
1721
- var oe;
2027
+ var ae;
1722
2028
  ((e) => {
1723
2029
  e.flush = S.flush, e.clear = S.clear;
1724
- })(oe || (oe = {}));
1725
- var M;
2030
+ })(ae || (ae = {}));
2031
+ var Y;
1726
2032
  ((e) => {
1727
- function t(r, l, u) {
1728
- return N.setUserVariables(r), Object.entries(l).forEach(([s, d]) => {
1729
- E[s] = d;
1730
- }), Object.entries(u).forEach(([s, d]) => {
1731
- const o = E[s];
1732
- E[s] = o ? [...d, ...o] : d;
1733
- }), { extendedProps: l, extendedPropTypes: u };
2033
+ function t(r, l, s) {
2034
+ return N.setUserVariables(r), Object.entries(l).forEach(([n, d]) => {
2035
+ E[n] = d;
2036
+ }), Object.entries(s).forEach(([n, d]) => {
2037
+ const o = E[n];
2038
+ E[n] = o ? [...d, ...o] : d;
2039
+ }), { extendedProps: l, extendedPropTypes: s };
1734
2040
  }
1735
2041
  e.extend = t;
1736
- })(M || (M = {}));
1737
- const $e = M;
1738
- var X;
2042
+ })(Y || (Y = {}));
2043
+ const je = Y;
2044
+ function G(e) {
2045
+ const { children: t, theme: r } = e, [l, s] = ne(r), n = L(() => {
2046
+ var a;
2047
+ const d = (a = G.userThemes) == null ? void 0 : a[l];
2048
+ if (!d) return _;
2049
+ const { components: o, ...c } = d, y = o ?? {};
2050
+ return Object.entries(c).forEach(([v, g]) => {
2051
+ y[v] = g;
2052
+ }), Object.keys(y).forEach((v) => {
2053
+ y[v].clean && v in _ && delete _[v];
2054
+ }), C.mergeDeep(_, y);
2055
+ }, [l]);
2056
+ return /* @__PURE__ */ ge(P.Provider, { value: { themeStyles: n, theme: l, setTheme: s }, children: t });
2057
+ }
1739
2058
  ((e) => {
1740
- const t = {
1741
- button: {
1742
- styles: {
1743
- display: "inline-flex",
1744
- color: "white",
1745
- bgColor: "violet-500",
1746
- borderColor: "violet-500",
1747
- p: 3,
1748
- cursor: "pointer",
1749
- b: 1,
1750
- borderRadius: 1,
1751
- userSelect: "none",
1752
- lineHeight: 20,
1753
- hover: {
1754
- bgColor: "violet-600",
1755
- borderColor: "violet-600"
1756
- },
1757
- disabled: {
1758
- cursor: "not-allowed",
1759
- bgColor: "violet-50",
1760
- color: "gray-400",
1761
- borderColor: "gray-300"
1762
- }
1763
- }
1764
- },
1765
- textbox: {
1766
- styles: {
1767
- display: "inline-block",
1768
- b: 1,
1769
- borderColor: "violet-200",
1770
- bgColor: "violet-50",
1771
- color: "violet-950",
1772
- borderRadius: 1,
1773
- p: 3,
1774
- transition: "none",
1775
- lineHeight: 20,
1776
- hover: {
1777
- borderColor: "violet-300"
1778
- },
1779
- focus: {
1780
- outline: 1,
1781
- borderColor: "violet-500",
1782
- outlineColor: "violet-500"
1783
- },
1784
- disabled: {
1785
- cursor: "not-allowed",
1786
- bgColor: "violet-50",
1787
- color: "gray-400",
1788
- borderColor: "gray-300"
1789
- }
1790
- }
1791
- },
1792
- textarea: {
1793
- styles: {
1794
- display: "inline-block",
1795
- b: 1,
1796
- borderColor: "violet-200",
1797
- bgColor: "violet-50",
1798
- color: "violet-950",
1799
- borderRadius: 1,
1800
- p: 3,
1801
- transition: "none",
1802
- hover: {
1803
- borderColor: "violet-300"
1804
- },
1805
- focus: {
1806
- outline: 1,
1807
- borderColor: "violet-500",
1808
- outlineColor: "violet-500"
1809
- },
1810
- disabled: {
1811
- cursor: "not-allowed",
1812
- bgColor: "violet-50",
1813
- color: "gray-400",
1814
- borderColor: "gray-300",
1815
- resize: "none"
1816
- }
1817
- }
1818
- },
1819
- checkbox: {
1820
- styles: {
1821
- display: "inline-block",
1822
- appearance: "none",
1823
- b: 1,
1824
- borderColor: "violet-300",
1825
- borderRadius: 1,
1826
- p: 2,
1827
- cursor: "pointer",
1828
- transition: "none",
1829
- hover: {
1830
- borderColor: "violet-500"
1831
- },
1832
- focus: {
1833
- outline: 2,
1834
- outlineOffset: 2,
1835
- outlineColor: "violet-500"
1836
- },
1837
- checked: {
1838
- bgColor: "violet-500",
1839
- borderColor: "violet-500",
1840
- bgImage: "bg-img-checked"
1841
- },
1842
- indeterminate: {
1843
- color: "violet-500",
1844
- bgImage: "bg-img-indeterminate"
1845
- },
1846
- disabled: {
1847
- cursor: "not-allowed",
1848
- bgColor: "violet-100",
1849
- color: "gray-400",
1850
- borderColor: "gray-300"
1851
- }
1852
- }
1853
- },
1854
- radioButton: {
1855
- styles: {
1856
- appearance: "none",
1857
- b: 1,
1858
- borderColor: "violet-300",
1859
- borderRadius: 3,
1860
- p: 2,
1861
- cursor: "pointer",
1862
- transition: "none",
1863
- hover: {
1864
- borderColor: "violet-500"
1865
- },
1866
- focus: {
1867
- outline: 2,
1868
- outlineOffset: 2,
1869
- outlineColor: "violet-500"
1870
- },
1871
- checked: {
1872
- bgColor: "violet-500",
1873
- borderColor: "violet-500",
1874
- bgImage: "bg-img-radio"
1875
- },
1876
- disabled: {
1877
- cursor: "not-allowed",
1878
- bgColor: "violet-100",
1879
- color: "gray-400",
1880
- borderColor: "violet-200"
1881
- }
1882
- }
1883
- },
1884
- dropdown: {
1885
- styles: {
1886
- display: "inline-flex",
1887
- ai: "center",
1888
- gap: 2,
1889
- jc: "space-between",
1890
- p: 3,
1891
- cursor: "pointer",
1892
- bgColor: "violet-50",
1893
- color: "violet-950",
1894
- b: 1,
1895
- borderColor: "violet-200",
1896
- borderRadius: 1,
1897
- userSelect: "none",
1898
- lineHeight: 20,
1899
- minWidth: 40,
1900
- transition: "none",
1901
- hover: {
1902
- borderColor: "violet-300"
1903
- },
1904
- focus: {
1905
- outline: 1,
1906
- borderColor: "violet-500",
1907
- outlineColor: "violet-500"
1908
- },
1909
- disabled: {
1910
- cursor: "not-allowed",
1911
- bgColor: "violet-50",
1912
- color: "gray-400",
1913
- borderColor: "gray-300"
1914
- }
1915
- },
1916
- children: {
1917
- items: {
1918
- styles: {
1919
- display: "flex",
1920
- d: "column",
1921
- gap: 1,
1922
- p: 1,
1923
- b: 1,
1924
- borderRadius: 1,
1925
- position: "relative",
1926
- top: 1,
1927
- bgColor: "white",
1928
- overflow: "auto",
1929
- maxHeight: 62,
1930
- borderColor: "violet-300",
1931
- color: "violet-950"
1932
- }
1933
- },
1934
- item: {
1935
- styles: {
1936
- display: "flex",
1937
- width: "fit",
1938
- p: 3,
1939
- cursor: "pointer",
1940
- borderRadius: 1,
1941
- hover: {
1942
- bgColor: "gray-100"
1943
- },
1944
- focus: {
1945
- bgColor: "violet-50"
1946
- },
1947
- selected: {
1948
- bgColor: "violet-50",
1949
- cursor: "default",
1950
- hover: {
1951
- bgColor: "violet-100"
1952
- }
1953
- }
1954
- },
1955
- themes: {
1956
- multiple: {
1957
- selected: {
1958
- cursor: "pointer"
1959
- }
1960
- }
1961
- }
1962
- },
1963
- unselectItem: {
1964
- styles: {
1965
- display: "flex",
1966
- width: "fit",
1967
- p: 3,
1968
- cursor: "pointer",
1969
- lineHeight: 20,
1970
- borderRadius: 1,
1971
- color: "violet-400",
1972
- hover: {
1973
- bgColor: "violet-50"
1974
- },
1975
- focus: {
1976
- bgColor: "violet-50"
1977
- },
1978
- selected: {
1979
- bgColor: "violet-50",
1980
- cursor: "default"
1981
- }
1982
- }
1983
- },
1984
- emptyItem: {
1985
- styles: {
1986
- display: "flex",
1987
- width: "fit",
1988
- p: 3,
1989
- cursor: "default",
1990
- lineHeight: 20,
1991
- borderRadius: 1,
1992
- color: "violet-400"
1993
- }
1994
- }
1995
- }
1996
- }
1997
- };
1998
- function r(l) {
1999
- const { components: u, ...s } = l, d = u ?? {};
2000
- Object.entries(s).forEach(([o, f]) => {
2001
- d[o] = f;
2002
- }), I.components = C.mergeDeep(t, d);
2059
+ e.userThemes = void 0;
2060
+ function t(l) {
2061
+ e.userThemes = l;
2003
2062
  }
2004
- e.setup = r, I.components = { ...t };
2005
- })(X || (X = {}));
2006
- const Ce = X, xe = {
2063
+ e.setup = t;
2064
+ function r() {
2065
+ const { theme: l, setTheme: s } = se(P);
2066
+ return [l, s];
2067
+ }
2068
+ e.useTheme = r;
2069
+ })(G || (G = {}));
2070
+ const Oe = G, Ce = {
2007
2071
  selected: "aria-selected"
2008
2072
  };
2009
- var Y;
2073
+ var J;
2010
2074
  ((e) => {
2011
- function t(r, l, u) {
2012
- r !== void 0 && r != null && (u[xe[l] ?? l] = Array.isArray(r) ? r[0] : r);
2075
+ function t(r, l, s) {
2076
+ r !== void 0 && r != null && (s[Ce[l] ?? l] = Array.isArray(r) ? r[0] : r);
2013
2077
  }
2014
2078
  e.assignBooleanProp = t;
2015
- })(Y || (Y = {}));
2016
- const Ve = Y;
2079
+ })(J || (J = {}));
2080
+ const Ae = J;
2017
2081
  Array.prototype.removeBy || (Array.prototype.removeBy = function(e) {
2018
2082
  return this.filter(e);
2019
2083
  });
2020
- function ze(e = null) {
2021
- const [t, r] = fe(!1), l = me(null);
2022
- return le(() => {
2023
- function u(d) {
2084
+ function Se(e = null) {
2085
+ const [t, r] = ne(!1), l = ye(null);
2086
+ return ie(() => {
2087
+ function s(d) {
2024
2088
  const o = e ?? l.current;
2025
2089
  (o == null ? void 0 : o.contains(d.target)) === !1 && r(!1);
2026
2090
  }
2027
- function s(d) {
2091
+ function n(d) {
2028
2092
  d.key === "Escape" && r(!1);
2029
2093
  }
2030
- return t && (window.addEventListener("mousedown", u), window.addEventListener("keydown", s)), () => {
2031
- window.removeEventListener("mousedown", u), window.removeEventListener("keydown", s);
2094
+ return t && (window.addEventListener("mousedown", s), window.addEventListener("keydown", n)), () => {
2095
+ window.removeEventListener("mousedown", s), window.removeEventListener("keydown", n);
2032
2096
  };
2033
2097
  }, [e, t]), [t, r, l];
2034
2098
  }
2035
- function Ee() {
2036
- return Q(() => {
2099
+ function Te() {
2100
+ return L(() => {
2037
2101
  const e = "crono-box";
2038
2102
  let t = document.getElementById(e);
2039
2103
  return t || (t = document.createElement("div"), t.id = e, document.body.appendChild(t)), t;
2040
2104
  }, []);
2041
2105
  }
2042
- var J;
2106
+ var Q;
2043
2107
  ((e) => {
2044
2108
  function t(l) {
2045
- const u = Array.from(l.elements).reduce(
2046
- (s, d) => {
2109
+ const s = Array.from(l.elements).reduce(
2110
+ (n, d) => {
2047
2111
  const o = d.name;
2048
- return o && (s[o] || (s[o] = []), s[o].push(d)), s;
2112
+ return o && (n[o] || (n[o] = []), n[o].push(d)), n;
2049
2113
  },
2050
2114
  {}
2051
2115
  );
2052
- return Object.entries(u).reduce((s, [d, o]) => {
2116
+ return Object.entries(s).reduce((n, [d, o]) => {
2053
2117
  if (o.length === 1) {
2054
- const f = o[0];
2055
- r(s, d, f.type === "checkbox" || f.type === "radio" ? f.checked : f.value);
2118
+ const c = o[0];
2119
+ r(n, d, c.type === "checkbox" || c.type === "radio" ? c.checked : c.value);
2056
2120
  } else {
2057
- const f = o.reduce((y, a) => (a.type === "checkbox" || a.type === "radio" ? a.checked && y.push(a.value) : y.push(a.value), y), []);
2058
- r(s, d, f);
2121
+ const c = o.reduce((y, a) => (a.type === "checkbox" || a.type === "radio" ? a.checked && y.push(a.value) : y.push(a.value), y), []);
2122
+ r(n, d, c);
2059
2123
  }
2060
- return s;
2124
+ return n;
2061
2125
  }, {});
2062
2126
  }
2063
2127
  e.getFormEntries = t;
2064
- function r(l, u, s) {
2065
- if (u.includes(".")) {
2066
- const d = u.split(".");
2128
+ function r(l, s, n) {
2129
+ if (s.includes(".")) {
2130
+ const d = s.split(".");
2067
2131
  let o = l;
2068
- d.forEach((f, y) => {
2132
+ d.forEach((c, y) => {
2069
2133
  if (d.length > y + 1) {
2070
- const a = f.match(/^(.+)\[(\d)\]$/);
2134
+ const a = c.match(/^(.+)\[(\d)\]$/);
2071
2135
  if (a) {
2072
2136
  const [, v, g] = a;
2073
2137
  o[v] = o[v] || [], o[v][g] = o[v][g] || {}, o = o[v][g];
2074
2138
  } else
2075
- o[f] = o[f] || {}, o = o[f];
2139
+ o[c] = o[c] || {}, o = o[c];
2076
2140
  } else
2077
- o[f] = s;
2141
+ o[c] = n;
2078
2142
  });
2079
2143
  } else
2080
- l[u] = s;
2144
+ l[s] = n;
2081
2145
  }
2082
- })(J || (J = {}));
2083
- const je = J;
2146
+ })(Q || (Q = {}));
2147
+ const Re = Q;
2084
2148
  export {
2085
- $e as B,
2086
- je as F,
2149
+ je as B,
2150
+ Re as F,
2087
2151
  C as O,
2088
- oe as S,
2089
- Ce as T,
2152
+ ae as S,
2153
+ Oe as T,
2090
2154
  N as V,
2091
- Ve as a,
2092
- ze as b,
2093
- ve as c,
2094
- Ee as d,
2095
- Fe as u
2155
+ Ae as a,
2156
+ Se as b,
2157
+ he as c,
2158
+ Te as d,
2159
+ Ee as u
2096
2160
  };