@cronocode/react-box 3.0.7 → 3.0.8

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,526 @@ 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
+ }, R = {
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
+ unselectItem: {
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
+ emptyItem: {
1880
+ styles: {
1881
+ display: "flex",
1882
+ width: "fit",
1883
+ p: 3,
1884
+ cursor: "default",
1885
+ lineHeight: 20,
1886
+ borderRadius: 1,
1887
+ color: "violet-400"
1888
+ }
1889
+ }
1890
+ }
1891
+ }
1892
+ }, P = ve.createContext({ themeStyles: R, theme: "", setTheme: () => {
1893
+ } });
1894
+ function xe(e) {
1895
+ const { clean: t, theme: r, component: l } = e, { themeStyles: s } = se(P);
1896
+ return L(() => {
1897
+ var o;
1613
1898
  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];
1899
+ const n = l == null ? void 0 : l.split(".");
1900
+ if (!n) return;
1901
+ const d = n.reduce((c, y, a) => {
1902
+ var v;
1903
+ return a === 0 ? s == null ? void 0 : s[y] : (v = c == null ? void 0 : c.children) == null ? void 0 : v[y];
1619
1904
  }, 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]);
1905
+ if (d)
1906
+ return r ? C.mergeDeep(d.styles, ((o = d.themes) == null ? void 0 : o[r]) ?? {}) : d.styles;
1907
+ }, [l, t, r, s]);
1623
1908
  }
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;
1909
+ const Ne = new pe(), Fe = typeof window < "u" && typeof window.document < "u";
1910
+ var le;
1911
+ const ce = typeof process == "object" && ((le = process.env) == null ? void 0 : le.NODE_ENV) === "test", $e = Fe && !ce ? be : ie, fe = "_b", S = "_s";
1912
+ function Ee(e, t) {
1913
+ $e(A.flush, [e]);
1914
+ const r = xe(e);
1915
+ return L(() => {
1916
+ const l = [t ? S : fe], s = r ? C.mergeDeep(r, e) : e;
1917
+ return A.addClassNames(s, l, []), l;
1633
1918
  }, [e, t, r]);
1634
1919
  }
1635
- var S;
1920
+ var A;
1636
1921
  ((e) => {
1637
1922
  let t = !0, r = {};
1638
1923
  function l(a, v, g, b, i) {
1639
- Object.entries(a).forEach(([m, c]) => {
1924
+ Object.entries(a).forEach(([m, f]) => {
1640
1925
  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);
1926
+ d(m, f, v, g, b, i);
1927
+ else if (C.isKeyOf(m, ue))
1928
+ l(f, v, [...g, m], b, i);
1644
1929
  else if (C.isKeyOf(m, U)) {
1645
- if (Array.isArray(c)) {
1646
- const [w, x] = c;
1930
+ if (Array.isArray(f)) {
1931
+ const [w, x] = f;
1647
1932
  l(x, v, [...g, m], b, i);
1648
1933
  }
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);
1934
+ C.isObject(f) && l(f, v, [...g, m], b, i);
1935
+ } 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]) => {
1936
+ l(x, v, [...g, q[m]], b, w);
1652
1937
  }));
1653
1938
  });
1654
1939
  }
1655
1940
  e.addClassNames = l;
1656
- function u() {
1941
+ function s() {
1657
1942
  if (!t) return;
1658
1943
  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;}
1944
+ 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
1945
  html{font-size: 16px;font-family: Arial, sans-serif;}
1661
1946
  body{margin: 0;line-height: var(--lineHeight);font-size: var(--fontSize);}
1662
1947
  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;}
1664
- .${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);}
1948
+ .${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;}
1949
+ .${S}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;transition: all var(--svgTransitionTime);}.${S} path,.${S} circle,.${S} rect,.${S} line {transition: all var(--svgTransitionTime);}
1665
1950
  `, g = Object.entries(r);
1666
1951
  g.sort(
1667
- ([m], [c]) => (H[m] ?? 0) - (H[c] ?? 0)
1952
+ ([m], [f]) => (H[m] ?? 0) - (H[f] ?? 0)
1668
1953
  );
1669
1954
  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;
1955
+ (m, [f, w]) => (f !== "normal" && m.push(`@media(min-width: ${H[f]}px){`), Object.entries(w).forEach(([x, D]) => {
1956
+ const { __parents: ee, ...me } = D, te = Object.entries(me);
1957
+ te.sort(([F], [T]) => a[F] - a[T]), te.forEach(([F, T]) => {
1958
+ T.forEach((V) => {
1959
+ var I, k;
1675
1960
  const h = E[F].find(($) => Array.isArray($.values) ? $.values.includes(V) : typeof V == typeof $.values);
1676
1961
  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(";")}}`);
1962
+ 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;
1963
+ m.push(`${p}{${B.map(($) => `${$}:${O}`).join(";")}}`);
1679
1964
  });
1680
- }), P && Object.entries(P).forEach(([F, _]) => {
1681
- const V = Object.entries(_);
1965
+ }), ee && Object.entries(ee).forEach(([F, T]) => {
1966
+ const V = Object.entries(T);
1682
1967
  V.sort(([j], [h]) => a[j] - a[h]), V.forEach(([j, h]) => {
1683
1968
  h.forEach((z) => {
1684
- var te, re;
1685
- const p = E[j].find((R) => Array.isArray(R.values) ? R.values.includes(z) : typeof z == typeof R.values);
1969
+ var re, oe;
1970
+ const p = E[j].find((_) => Array.isArray(_.values) ? _.values.includes(z) : typeof z == typeof _.values);
1686
1971
  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(";")}}`);
1972
+ 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;
1973
+ m.push(`${I}{${k.map((_) => `${_}:${$}`).join(";")}}`);
1689
1974
  });
1690
1975
  });
1691
1976
  });
1692
- }), c !== "normal" && m.push("}"), m),
1977
+ }), f !== "normal" && m.push("}"), m),
1693
1978
  [v]
1694
1979
  );
1695
1980
  b.unshift(`:root{${N.generateVariables()}}`);
1696
1981
  const i = y();
1697
1982
  i.innerHTML = b.join(""), t = !1;
1698
1983
  }
1699
- e.flush = u;
1700
- function s() {
1984
+ e.flush = s;
1985
+ function n() {
1701
1986
  r = {};
1702
1987
  }
1703
- e.clear = s;
1988
+ e.clear = n;
1704
1989
  function d(a, v, g, b, i = "normal", m) {
1705
1990
  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);
1991
+ const f = b.reduce((x, D) => x + de[D], 0);
1992
+ 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);
1993
+ const w = o(a, v, f, i, m);
1709
1994
  g.push(w);
1710
1995
  }
1711
1996
  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);
1997
+ const m = W[g], f = `${b === "normal" ? "" : `${b}-`}${m.map((w) => `${w}-`).join("")}${i ? `${i}-` : ""}${a}-${v}`;
1998
+ return ce ? f : Ne.getIdentity(f);
1714
1999
  }
1715
- const f = "crono-styles";
2000
+ const c = "crono-styles";
1716
2001
  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;
2002
+ let a = document.getElementById(c);
2003
+ return a || (a = document.createElement("style"), a.setAttribute("id", c), a.setAttribute("type", "text/css"), document.head.insertBefore(a, document.head.firstChild)), a;
1719
2004
  }
1720
- })(S || (S = {}));
1721
- var oe;
2005
+ })(A || (A = {}));
2006
+ var ae;
1722
2007
  ((e) => {
1723
- e.flush = S.flush, e.clear = S.clear;
1724
- })(oe || (oe = {}));
1725
- var M;
2008
+ e.flush = A.flush, e.clear = A.clear;
2009
+ })(ae || (ae = {}));
2010
+ var Y;
1726
2011
  ((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 };
2012
+ function t(r, l, s) {
2013
+ return N.setUserVariables(r), Object.entries(l).forEach(([n, d]) => {
2014
+ E[n] = d;
2015
+ }), Object.entries(s).forEach(([n, d]) => {
2016
+ const o = E[n];
2017
+ E[n] = o ? [...d, ...o] : d;
2018
+ }), { extendedProps: l, extendedPropTypes: s };
1734
2019
  }
1735
2020
  e.extend = t;
1736
- })(M || (M = {}));
1737
- const $e = M;
1738
- var X;
2021
+ })(Y || (Y = {}));
2022
+ const je = Y;
2023
+ function G(e) {
2024
+ const { children: t, theme: r } = e, [l, s] = ne(r), n = L(() => {
2025
+ var a;
2026
+ const d = (a = G.userThemes) == null ? void 0 : a[l];
2027
+ if (!d) return R;
2028
+ const { components: o, ...c } = d, y = o ?? {};
2029
+ return Object.entries(c).forEach(([v, g]) => {
2030
+ y[v] = g;
2031
+ }), Object.keys(y).forEach((v) => {
2032
+ y[v].clean && v in R && delete R[v];
2033
+ }), C.mergeDeep(R, y);
2034
+ }, [l]);
2035
+ return /* @__PURE__ */ ge(P.Provider, { value: { themeStyles: n, theme: l, setTheme: s }, children: t });
2036
+ }
1739
2037
  ((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);
2038
+ e.userThemes = void 0;
2039
+ function t(l) {
2040
+ e.userThemes = l;
2003
2041
  }
2004
- e.setup = r, I.components = { ...t };
2005
- })(X || (X = {}));
2006
- const Ce = X, xe = {
2042
+ e.setup = t;
2043
+ function r() {
2044
+ const { theme: l, setTheme: s } = se(P);
2045
+ return [l, s];
2046
+ }
2047
+ e.useTheme = r;
2048
+ })(G || (G = {}));
2049
+ const Oe = G, Ce = {
2007
2050
  selected: "aria-selected"
2008
2051
  };
2009
- var Y;
2052
+ var J;
2010
2053
  ((e) => {
2011
- function t(r, l, u) {
2012
- r !== void 0 && r != null && (u[xe[l] ?? l] = Array.isArray(r) ? r[0] : r);
2054
+ function t(r, l, s) {
2055
+ r !== void 0 && r != null && (s[Ce[l] ?? l] = Array.isArray(r) ? r[0] : r);
2013
2056
  }
2014
2057
  e.assignBooleanProp = t;
2015
- })(Y || (Y = {}));
2016
- const Ve = Y;
2058
+ })(J || (J = {}));
2059
+ const Se = J;
2017
2060
  Array.prototype.removeBy || (Array.prototype.removeBy = function(e) {
2018
2061
  return this.filter(e);
2019
2062
  });
2020
- function ze(e = null) {
2021
- const [t, r] = fe(!1), l = me(null);
2022
- return le(() => {
2023
- function u(d) {
2063
+ function Ae(e = null) {
2064
+ const [t, r] = ne(!1), l = ye(null);
2065
+ return ie(() => {
2066
+ function s(d) {
2024
2067
  const o = e ?? l.current;
2025
2068
  (o == null ? void 0 : o.contains(d.target)) === !1 && r(!1);
2026
2069
  }
2027
- function s(d) {
2070
+ function n(d) {
2028
2071
  d.key === "Escape" && r(!1);
2029
2072
  }
2030
- return t && (window.addEventListener("mousedown", u), window.addEventListener("keydown", s)), () => {
2031
- window.removeEventListener("mousedown", u), window.removeEventListener("keydown", s);
2073
+ return t && (window.addEventListener("mousedown", s), window.addEventListener("keydown", n)), () => {
2074
+ window.removeEventListener("mousedown", s), window.removeEventListener("keydown", n);
2032
2075
  };
2033
2076
  }, [e, t]), [t, r, l];
2034
2077
  }
2035
- function Ee() {
2036
- return Q(() => {
2078
+ function Te() {
2079
+ return L(() => {
2037
2080
  const e = "crono-box";
2038
2081
  let t = document.getElementById(e);
2039
2082
  return t || (t = document.createElement("div"), t.id = e, document.body.appendChild(t)), t;
2040
2083
  }, []);
2041
2084
  }
2042
- var J;
2085
+ var Q;
2043
2086
  ((e) => {
2044
2087
  function t(l) {
2045
- const u = Array.from(l.elements).reduce(
2046
- (s, d) => {
2088
+ const s = Array.from(l.elements).reduce(
2089
+ (n, d) => {
2047
2090
  const o = d.name;
2048
- return o && (s[o] || (s[o] = []), s[o].push(d)), s;
2091
+ return o && (n[o] || (n[o] = []), n[o].push(d)), n;
2049
2092
  },
2050
2093
  {}
2051
2094
  );
2052
- return Object.entries(u).reduce((s, [d, o]) => {
2095
+ return Object.entries(s).reduce((n, [d, o]) => {
2053
2096
  if (o.length === 1) {
2054
- const f = o[0];
2055
- r(s, d, f.type === "checkbox" || f.type === "radio" ? f.checked : f.value);
2097
+ const c = o[0];
2098
+ r(n, d, c.type === "checkbox" || c.type === "radio" ? c.checked : c.value);
2056
2099
  } 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);
2100
+ const c = o.reduce((y, a) => (a.type === "checkbox" || a.type === "radio" ? a.checked && y.push(a.value) : y.push(a.value), y), []);
2101
+ r(n, d, c);
2059
2102
  }
2060
- return s;
2103
+ return n;
2061
2104
  }, {});
2062
2105
  }
2063
2106
  e.getFormEntries = t;
2064
- function r(l, u, s) {
2065
- if (u.includes(".")) {
2066
- const d = u.split(".");
2107
+ function r(l, s, n) {
2108
+ if (s.includes(".")) {
2109
+ const d = s.split(".");
2067
2110
  let o = l;
2068
- d.forEach((f, y) => {
2111
+ d.forEach((c, y) => {
2069
2112
  if (d.length > y + 1) {
2070
- const a = f.match(/^(.+)\[(\d)\]$/);
2113
+ const a = c.match(/^(.+)\[(\d)\]$/);
2071
2114
  if (a) {
2072
2115
  const [, v, g] = a;
2073
2116
  o[v] = o[v] || [], o[v][g] = o[v][g] || {}, o = o[v][g];
2074
2117
  } else
2075
- o[f] = o[f] || {}, o = o[f];
2118
+ o[c] = o[c] || {}, o = o[c];
2076
2119
  } else
2077
- o[f] = s;
2120
+ o[c] = n;
2078
2121
  });
2079
2122
  } else
2080
- l[u] = s;
2123
+ l[s] = n;
2081
2124
  }
2082
- })(J || (J = {}));
2083
- const je = J;
2125
+ })(Q || (Q = {}));
2126
+ const _e = Q;
2084
2127
  export {
2085
- $e as B,
2086
- je as F,
2128
+ je as B,
2129
+ _e as F,
2087
2130
  C as O,
2088
- oe as S,
2089
- Ce as T,
2131
+ ae as S,
2132
+ Oe as T,
2090
2133
  N as V,
2091
- Ve as a,
2092
- ze as b,
2093
- ve as c,
2094
- Ee as d,
2095
- Fe as u
2134
+ Se as a,
2135
+ Ae as b,
2136
+ he as c,
2137
+ Te as d,
2138
+ Ee as u
2096
2139
  };