@cronocode/react-box 1.7.7 → 1.7.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,4 +1,4 @@
1
- import { useMemo as D, useLayoutEffect as q, useEffect as U } from "react";
1
+ import { useMemo as P, useLayoutEffect as U, useEffect as X } from "react";
2
2
  var e;
3
3
  ((l) => {
4
4
  ((u) => {
@@ -20,8 +20,8 @@ var e;
20
20
  }
21
21
  u.px = v;
22
22
  function s(t, a) {
23
- const [d, g] = a.split("/");
24
- return `${+d / +g * 100}%`;
23
+ const [r, b] = a.split("/");
24
+ return `${+r / +b * 100}%`;
25
25
  }
26
26
  u.fraction = s;
27
27
  function n(t, a) {
@@ -35,14 +35,14 @@ var e;
35
35
  }
36
36
  }
37
37
  u.widthHeight = n;
38
- function f(t) {
39
- return (a, d) => `var(--${t}${d});`;
38
+ function d(t) {
39
+ return (a, r) => `var(--${t}${r});`;
40
40
  }
41
- u.variables = f;
42
- function b(t) {
43
- return (a, d) => `var(--${t}${d});`;
41
+ u.variables = d;
42
+ function f(t) {
43
+ return (a, r) => `var(--${t}${r});`;
44
44
  }
45
- u.svgVariables = b;
45
+ u.svgVariables = f;
46
46
  function h(t, a) {
47
47
  return `repeat(${a},minmax(0,1fr))`;
48
48
  }
@@ -55,17 +55,17 @@ var e;
55
55
  return `${a}ms`;
56
56
  }
57
57
  u.ms = V;
58
- function C(t, a) {
58
+ function N(t, a) {
59
59
  return `${a}deg`;
60
60
  }
61
- u.rotate = C;
62
- function i(t, a) {
61
+ u.rotate = N;
62
+ function T(t, a) {
63
63
  return a === "xAxis" ? "-1 1" : "1 -1";
64
64
  }
65
- u.flip = i;
65
+ u.flip = T;
66
66
  })(l.Value || (l.Value = {}));
67
67
  })(e || (e = {}));
68
- const r = [
68
+ const i = [
69
69
  0,
70
70
  1,
71
71
  2,
@@ -117,7 +117,7 @@ const r = [
117
117
  92,
118
118
  96,
119
119
  100
120
- ], X = [
120
+ ], Y = [
121
121
  -1,
122
122
  -2,
123
123
  -3,
@@ -163,7 +163,7 @@ const r = [
163
163
  -92,
164
164
  -96,
165
165
  -100
166
- ], m = [...r, ...X], O = ["solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset", "none", "hidden"], j = ["auto", "hidden", "scroll", "visible"], w = [
166
+ ], m = [...i, ...Y], R = ["solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset", "none", "hidden"], A = ["auto", "hidden", "scroll", "visible"], x = [
167
167
  "1/2",
168
168
  "1/3",
169
169
  "2/3",
@@ -190,7 +190,7 @@ const r = [
190
190
  "9/12",
191
191
  "10/12",
192
192
  "11/12"
193
- ], x = ["fit", "fit-screen", "auto", "fit-content", "max-content", "min-content"], R = ["auto", "flex-start", "flex-end", "center", "baseline", "stretch"], o = {
193
+ ], k = ["fit", "fit-screen", "auto", "fit-content", "max-content", "min-content"], I = ["auto", "flex-start", "flex-end", "center", "baseline", "stretch"], o = {
194
194
  /** The `display` CSS property sets whether an element is treated as a block or inline box and the layout used for its children, such as flow layout, grid or flex. */
195
195
  display: {
196
196
  cssNames: ["display"],
@@ -214,60 +214,60 @@ const r = [
214
214
  },
215
215
  width: {
216
216
  cssNames: ["width"],
217
- values1: { values: x, formatValue: e.Value.widthHeight },
218
- values2: { values: r, formatValue: e.Value.rem },
217
+ values1: { values: k, formatValue: e.Value.widthHeight },
218
+ values2: { values: i, formatValue: e.Value.rem },
219
219
  values3: {
220
- values: w,
220
+ values: x,
221
221
  formatValue: e.Value.fraction
222
222
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
223
223
  }
224
224
  },
225
225
  minWidth: {
226
226
  cssNames: ["min-width"],
227
- values1: { values: x, formatValue: e.Value.widthHeight },
228
- values2: { values: r, formatValue: e.Value.rem },
227
+ values1: { values: k, formatValue: e.Value.widthHeight },
228
+ values2: { values: i, formatValue: e.Value.rem },
229
229
  values3: {
230
- values: w,
230
+ values: x,
231
231
  formatValue: e.Value.fraction
232
232
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
233
233
  }
234
234
  },
235
235
  maxWidth: {
236
236
  cssNames: ["max-width"],
237
- values1: { values: x, formatValue: e.Value.widthHeight },
238
- values2: { values: r, formatValue: e.Value.rem },
237
+ values1: { values: k, formatValue: e.Value.widthHeight },
238
+ values2: { values: i, formatValue: e.Value.rem },
239
239
  values3: {
240
- values: w,
240
+ values: x,
241
241
  formatValue: e.Value.fraction
242
242
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
243
243
  }
244
244
  },
245
245
  height: {
246
246
  cssNames: ["height"],
247
- values1: { values: x, formatValue: e.Value.widthHeight },
248
- values2: { values: r, formatValue: e.Value.rem },
247
+ values1: { values: k, formatValue: e.Value.widthHeight },
248
+ values2: { values: i, formatValue: e.Value.rem },
249
249
  values3: {
250
- values: w,
250
+ values: x,
251
251
  formatValue: e.Value.fraction
252
252
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
253
253
  }
254
254
  },
255
255
  minHeight: {
256
256
  cssNames: ["min-height"],
257
- values1: { values: x, formatValue: e.Value.widthHeight },
258
- values2: { values: r, formatValue: e.Value.rem },
257
+ values1: { values: k, formatValue: e.Value.widthHeight },
258
+ values2: { values: i, formatValue: e.Value.rem },
259
259
  values3: {
260
- values: w,
260
+ values: x,
261
261
  formatValue: e.Value.fraction
262
262
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
263
263
  }
264
264
  },
265
265
  maxHeight: {
266
266
  cssNames: ["max-height"],
267
- values1: { values: x, formatValue: e.Value.widthHeight },
268
- values2: { values: r, formatValue: e.Value.rem },
267
+ values1: { values: k, formatValue: e.Value.widthHeight },
268
+ values2: { values: i, formatValue: e.Value.rem },
269
269
  values3: {
270
- values: w,
270
+ values: x,
271
271
  formatValue: e.Value.fraction
272
272
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
273
273
  }
@@ -394,7 +394,7 @@ const r = [
394
394
  },
395
395
  border: {
396
396
  cssNames: ["border-width"],
397
- values1: { values: r, formatValue: e.Value.px },
397
+ values1: { values: i, formatValue: e.Value.px },
398
398
  values2: { values: [] },
399
399
  values3: { values: [] }
400
400
  },
@@ -436,61 +436,61 @@ const r = [
436
436
  },
437
437
  borderStyle: {
438
438
  cssNames: ["border-style"],
439
- values1: { values: O },
439
+ values1: { values: R },
440
440
  values2: { values: [] },
441
441
  values3: { values: [] }
442
442
  },
443
443
  borderRadius: {
444
444
  cssNames: ["border-radius"],
445
- values1: { values: r, formatValue: e.Value.rem },
445
+ values1: { values: i, formatValue: e.Value.rem },
446
446
  values2: { values: [] },
447
447
  values3: { values: [] }
448
448
  },
449
449
  borderRadiusTop: {
450
450
  cssNames: ["border-top-left-radius", "border-top-right-radius"],
451
- values1: { values: r, formatValue: e.Value.rem },
451
+ values1: { values: i, formatValue: e.Value.rem },
452
452
  values2: { values: [] },
453
453
  values3: { values: [] }
454
454
  },
455
455
  borderRadiusRight: {
456
456
  cssNames: ["border-top-right-radius", "border-bottom-right-radius"],
457
- values1: { values: r, formatValue: e.Value.rem },
457
+ values1: { values: i, formatValue: e.Value.rem },
458
458
  values2: { values: [] },
459
459
  values3: { values: [] }
460
460
  },
461
461
  borderRadiusBottom: {
462
462
  cssNames: ["border-bottom-left-radius", "border-bottom-right-radius"],
463
- values1: { values: r, formatValue: e.Value.rem },
463
+ values1: { values: i, formatValue: e.Value.rem },
464
464
  values2: { values: [] },
465
465
  values3: { values: [] }
466
466
  },
467
467
  borderRadiusLeft: {
468
468
  cssNames: ["border-top-left-radius", "border-bottom-left-radius"],
469
- values1: { values: r, formatValue: e.Value.rem },
469
+ values1: { values: i, formatValue: e.Value.rem },
470
470
  values2: { values: [] },
471
471
  values3: { values: [] }
472
472
  },
473
473
  borderRadiusTopLeft: {
474
474
  cssNames: ["border-top-left-radius"],
475
- values1: { values: r, formatValue: e.Value.rem },
475
+ values1: { values: i, formatValue: e.Value.rem },
476
476
  values2: { values: [] },
477
477
  values3: { values: [] }
478
478
  },
479
479
  borderRadiusTopRight: {
480
480
  cssNames: ["border-top-right-radius"],
481
- values1: { values: r, formatValue: e.Value.rem },
481
+ values1: { values: i, formatValue: e.Value.rem },
482
482
  values2: { values: [] },
483
483
  values3: { values: [] }
484
484
  },
485
485
  borderRadiusBottomLeft: {
486
486
  cssNames: ["border-bottom-left-radius"],
487
- values1: { values: r, formatValue: e.Value.rem },
487
+ values1: { values: i, formatValue: e.Value.rem },
488
488
  values2: { values: [] },
489
489
  values3: { values: [] }
490
490
  },
491
491
  borderRadiusBottomRight: {
492
492
  cssNames: ["border-bottom-right-radius"],
493
- values1: { values: r, formatValue: e.Value.rem },
493
+ values1: { values: i, formatValue: e.Value.rem },
494
494
  values2: { values: [] },
495
495
  values3: { values: [] }
496
496
  },
@@ -549,19 +549,19 @@ const r = [
549
549
  },
550
550
  overflow: {
551
551
  cssNames: ["overflow"],
552
- values1: { values: j },
552
+ values1: { values: A },
553
553
  values2: { values: [] },
554
554
  values3: { values: [] }
555
555
  },
556
556
  overflowX: {
557
557
  cssNames: ["overflow-x"],
558
- values1: { values: j },
558
+ values1: { values: A },
559
559
  values2: { values: [] },
560
560
  values3: { values: [] }
561
561
  },
562
562
  overflowY: {
563
563
  cssNames: ["overflow-y"],
564
- values1: { values: j },
564
+ values1: { values: A },
565
565
  values2: { values: [] },
566
566
  values3: { values: [] }
567
567
  },
@@ -573,7 +573,7 @@ const r = [
573
573
  },
574
574
  fontSize: {
575
575
  cssNames: ["font-size"],
576
- values1: { values: r, formatValue: e.Value.px },
576
+ values1: { values: i, formatValue: e.Value.px },
577
577
  values2: { values: ["inherit"] },
578
578
  values3: { values: [] }
579
579
  },
@@ -591,13 +591,13 @@ const r = [
591
591
  },
592
592
  letterSpacing: {
593
593
  cssNames: ["letter-spacing"],
594
- values1: { values: r, formatValue: e.Value.px },
594
+ values1: { values: i, formatValue: e.Value.px },
595
595
  values2: { values: [] },
596
596
  values3: { values: [] }
597
597
  },
598
598
  lineHeight: {
599
599
  cssNames: ["line-height"],
600
- values1: { values: r, formatValue: e.Value.px },
600
+ values1: { values: i, formatValue: e.Value.px },
601
601
  values2: { values: ["font-size"], formatValue: () => "1" },
602
602
  values3: { values: [] }
603
603
  },
@@ -686,91 +686,91 @@ const r = [
686
686
  },
687
687
  gap: {
688
688
  cssNames: ["gap"],
689
- values1: { values: r, formatValue: e.Value.rem },
689
+ values1: { values: i, formatValue: e.Value.rem },
690
690
  values2: { values: [] },
691
691
  values3: { values: [] }
692
692
  },
693
693
  rowGap: {
694
694
  cssNames: ["row-gap"],
695
- values1: { values: r, formatValue: e.Value.rem },
695
+ values1: { values: i, formatValue: e.Value.rem },
696
696
  values2: { values: [] },
697
697
  values3: { values: [] }
698
698
  },
699
699
  columnGap: {
700
700
  cssNames: ["column-gap"],
701
- values1: { values: r, formatValue: e.Value.rem },
701
+ values1: { values: i, formatValue: e.Value.rem },
702
702
  values2: { values: [] },
703
703
  values3: { values: [] }
704
704
  },
705
705
  order: {
706
706
  cssNames: ["order"],
707
- values1: { values: r },
707
+ values1: { values: i },
708
708
  values2: { values: [] },
709
709
  values3: { values: [] }
710
710
  },
711
711
  flexGrow: {
712
712
  cssNames: ["flex-grow"],
713
- values1: { values: r },
713
+ values1: { values: i },
714
714
  values2: { values: [] },
715
715
  values3: { values: [] }
716
716
  },
717
717
  flexShrink: {
718
718
  cssNames: ["flex-shrink"],
719
- values1: { values: r },
719
+ values1: { values: i },
720
720
  values2: { values: [] },
721
721
  values3: { values: [] }
722
722
  },
723
723
  alignSelf: {
724
724
  cssNames: ["align-self"],
725
- values1: { values: R },
725
+ values1: { values: I },
726
726
  values2: { values: [] },
727
727
  values3: { values: [] }
728
728
  },
729
729
  justifySelf: {
730
730
  cssNames: ["justify-self"],
731
- values1: { values: R },
731
+ values1: { values: I },
732
732
  values2: { values: [] },
733
733
  values3: { values: [] }
734
734
  },
735
735
  gridColumns: {
736
736
  cssNames: ["grid-template-columns"],
737
- values1: { values: r, formatValue: e.Value.gridColumns },
737
+ values1: { values: i, formatValue: e.Value.gridColumns },
738
738
  values2: { values: [] },
739
739
  values3: { values: [] }
740
740
  },
741
741
  colSpan: {
742
742
  cssNames: ["grid-column"],
743
- values1: { values: r, formatValue: e.Value.gridColumn },
743
+ values1: { values: i, formatValue: e.Value.gridColumn },
744
744
  values2: { values: ["full-row"], formatValue: e.Value.gridColumn },
745
745
  values3: { values: [] }
746
746
  },
747
747
  colStart: {
748
748
  cssNames: ["grid-column-start"],
749
- values1: { values: r },
749
+ values1: { values: i },
750
750
  values2: { values: [] },
751
751
  values3: { values: [] }
752
752
  },
753
753
  colEnd: {
754
754
  cssNames: ["grid-column-end"],
755
- values1: { values: r },
755
+ values1: { values: i },
756
756
  values2: { values: [] },
757
757
  values3: { values: [] }
758
758
  },
759
759
  outline: {
760
760
  cssNames: ["outline-width"],
761
- values1: { values: r, formatValue: e.Value.px },
761
+ values1: { values: i, formatValue: e.Value.px },
762
762
  values2: { values: [] },
763
763
  values3: { values: [] }
764
764
  },
765
765
  outlineStyle: {
766
766
  cssNames: ["outline-style"],
767
- values1: { values: O },
767
+ values1: { values: R },
768
768
  values2: { values: [] },
769
769
  values3: { values: [] }
770
770
  },
771
771
  outlineOffset: {
772
772
  cssNames: ["outline-offset"],
773
- values1: { values: r, formatValue: e.Value.px },
773
+ values1: { values: i, formatValue: e.Value.px },
774
774
  values2: { values: [] },
775
775
  values3: { values: [] }
776
776
  },
@@ -831,14 +831,14 @@ const r = [
831
831
  values2: { values: [] },
832
832
  values3: { values: [] }
833
833
  }
834
- }, I = {
834
+ }, L = {
835
835
  shadow: { cssNames: ["box-shadow"], formatValue: e.Value.variables("shadow") },
836
836
  background: { cssNames: ["background"], formatValue: e.Value.variables("background") },
837
837
  color: { cssNames: ["color"], formatValue: e.Value.variables("color") },
838
838
  bgColor: { cssNames: ["background-color"], formatValue: e.Value.variables("color") },
839
839
  borderColor: { cssNames: ["border-color"], formatValue: e.Value.variables("color") },
840
840
  outlineColor: { cssNames: ["outline-color"], formatValue: e.Value.variables("color") }
841
- }, L = {
841
+ }, _ = {
842
842
  fill: {
843
843
  cssNames: ["fill"],
844
844
  formatValue: e.Value.svgVariables("color"),
@@ -849,17 +849,17 @@ const r = [
849
849
  formatValue: e.Value.svgVariables("color"),
850
850
  formatSelector: e.ClassName.svg
851
851
  }
852
- }, Y = ["H", "F", "A"], H = {
852
+ }, J = ["H", "F", "A"], z = {
853
853
  hover: { className: "_h" },
854
854
  focus: { className: "_f" }
855
855
  };
856
- Object.keys(I).forEach((l) => {
857
- o[l] = I[l], o[l].isThemeStyle = !0;
858
- });
859
856
  Object.keys(L).forEach((l) => {
860
857
  o[l] = L[l], o[l].isThemeStyle = !0;
861
858
  });
862
- const k = {
859
+ Object.keys(_).forEach((l) => {
860
+ o[l] = _[l], o[l].isThemeStyle = !0;
861
+ });
862
+ const C = {
863
863
  w: { ...o.width, key: "width" },
864
864
  h: { ...o.height, key: "height" },
865
865
  m: { ...o.margin, key: "margin" },
@@ -887,15 +887,15 @@ const k = {
887
887
  ai: { ...o.alignItems, key: "alignItems" },
888
888
  ac: { ...o.alignContent, key: "alignContent" },
889
889
  d: { ...o.flexDirection, key: "flexDirection" }
890
- }, J = Object.keys(o), Q = Object.keys(k);
891
- Y.forEach((l) => {
892
- J.forEach((u) => {
890
+ }, Q = Object.keys(o), Z = Object.keys(C);
891
+ J.forEach((l) => {
892
+ Q.forEach((u) => {
893
893
  o[`${u}${l}`] = { ...o[u] }, o[`${u}${l}`].pseudoSuffix = l;
894
- }), Q.forEach((u) => {
895
- k[`${u}${l}`] = { ...k[u], key: `${k[u].key}${l}` }, k[`${u}${l}`].pseudoSuffix = l;
894
+ }), Z.forEach((u) => {
895
+ C[`${u}${l}`] = { ...C[u], key: `${C[u].key}${l}` }, C[`${u}${l}`].pseudoSuffix = l;
896
896
  });
897
897
  });
898
- class Z {
898
+ class K {
899
899
  constructor() {
900
900
  this._index = 0, this._cache = {};
901
901
  }
@@ -903,18 +903,18 @@ class Z {
903
903
  return this._cache[u] || (this._cache[u] = this.getByIndex(this._index++)), this._cache[u];
904
904
  }
905
905
  getByIndex(u) {
906
- const { first: c, next: v } = K, s = u - c.length;
906
+ const { first: c, next: v } = ee, s = u - c.length;
907
907
  if (s < 0)
908
908
  return c[u];
909
- const n = Math.floor(s / v.length), f = s - n * v.length;
910
- return this.getByIndex(n) + v[f];
909
+ const n = Math.floor(s / v.length), d = s - n * v.length;
910
+ return this.getByIndex(n) + v[d];
911
911
  }
912
912
  }
913
- const K = {
913
+ const ee = {
914
914
  first: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
915
915
  next: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
916
916
  };
917
- var B;
917
+ var E;
918
918
  ((l) => {
919
919
  l.boxClassName = "_box", l.svgClassName = "_svg", l.cronoStylesElementId = "crono-styles";
920
920
  const u = `: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;}}
@@ -923,68 +923,74 @@ body{margin: 0;line-height: var(--lineHeight);font-size: var(--fontSize);}
923
923
  a,ul{all: unset;}
924
924
  .${l.boxClassName}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;background-color: initial;transition: all var(--transitionTime);box-sizing: border-box;font-family: inherit;font-size: inherit;}
925
925
  .${l.svgClassName}{transition: all var(--svgTransitionTime);}.${l.svgClassName} path,.${l.svgClassName} circle,.${l.svgClassName} rect,.${l.svgClassName} line {transition: all var(--svgTransitionTime);}
926
- `, c = new Z(), v = Object.keys(o);
927
- let s = !1;
928
- const n = v.reduce(
929
- (i, t) => (i[t] = /* @__PURE__ */ new Set(), i),
926
+ `, c = new K(), v = Object.keys(o);
927
+ let s = !1, n = v.reduce(
928
+ (t, a) => (t[a] = /* @__PURE__ */ new Set(), t),
930
929
  {}
931
930
  );
932
- function f(i, t) {
933
- if (i in o)
934
- return h(i, t);
935
- if (i in H)
936
- return H[i].className;
931
+ function d(t, a) {
932
+ if (t in o)
933
+ return p(t, a);
934
+ if (t in z)
935
+ return z[t].className;
937
936
  }
938
- l.get = f;
939
- function b() {
937
+ l.get = d;
938
+ function f() {
940
939
  if (s) {
941
940
  console.info("%c💬Flush Dox Styles", "color: #00ffff");
942
- let i = p([u]);
943
- i = p(i, "H"), i = p(i, "F"), i = p(i, "A");
944
- const t = C();
945
- t.innerHTML = i.join(""), s = !1;
941
+ let t = V([u]);
942
+ t = V(t, "H"), t = V(t, "F"), t = V(t, "A");
943
+ const a = T();
944
+ a.innerHTML = t.join(""), s = !1;
946
945
  }
947
946
  }
948
- l.flush = b;
949
- function h(i, t) {
947
+ l.flush = f;
948
+ function h() {
949
+ n = v.reduce(
950
+ (t, a) => (t[a] = /* @__PURE__ */ new Set(), t),
951
+ {}
952
+ );
953
+ }
954
+ l.clear = h;
955
+ function p(t, a) {
950
956
  var g;
951
- n[i].has(t) || (s = !0, n[i].add(t));
952
- const a = V(i, t), d = ((g = a.formatClassName) == null ? void 0 : g.call(a, i, t)) ?? `${i}${t}`;
953
- return c.getIdentity(d);
957
+ n[t].has(a) || (s = !0, n[t].add(a));
958
+ const r = N(t, a), b = ((g = r.formatClassName) == null ? void 0 : g.call(r, t, a)) ?? `${t}${a}`;
959
+ return c.getIdentity(b);
954
960
  }
955
- function p(i, t) {
956
- return Object.entries(n).filter(([d]) => {
961
+ function V(t, a) {
962
+ return Object.entries(n).filter(([b]) => {
957
963
  var g;
958
- return ((g = o[d]) == null ? void 0 : g.pseudoSuffix) === t;
959
- }).reduce((d, [g, P]) => (P.forEach(($) => {
960
- var F;
961
- const y = V(g, $), N = `.${h(g, $)}`;
962
- let T = [];
963
- t ? t === "H" ? T = [
964
- ...a(`${N}:hover`, y),
965
- ...a(`.${H.hover.className}:hover>${N}`, y)
966
- ] : t === "F" ? T = [
967
- ...a(`${N}:focus-within`, y),
968
- ...a(`.${H.focus.className}:focus-within>${N}`, y)
969
- ] : t === "A" && (T = a(`${N}:active`, y)) : T = a(N, y);
970
- const W = ((F = y.formatValue) == null ? void 0 : F.call(y, g, $)) ?? $, G = o[g].cssNames.map((M) => `${M}:${W};`).join("");
971
- d.push(`${T.join(",")}{${G}}`);
972
- }), d), i);
973
- function a(d, g) {
974
- return g.formatSelector ? g.formatSelector(d) : [d];
964
+ return ((g = o[b]) == null ? void 0 : g.pseudoSuffix) === a;
965
+ }).reduce((b, [g, W]) => (W.forEach((H) => {
966
+ var O;
967
+ const y = N(g, H), w = `.${p(g, H)}`;
968
+ let $ = [];
969
+ a ? a === "H" ? $ = [
970
+ ...r(`${w}:hover`, y),
971
+ ...r(`.${z.hover.className}:hover>${w}`, y)
972
+ ] : a === "F" ? $ = [
973
+ ...r(`${w}:focus-within`, y),
974
+ ...r(`.${z.focus.className}:focus-within>${w}`, y)
975
+ ] : a === "A" && ($ = r(`${w}:active`, y)) : $ = r(w, y);
976
+ const G = ((O = y.formatValue) == null ? void 0 : O.call(y, g, H)) ?? H, M = o[g].cssNames.map((q) => `${q}:${G};`).join("");
977
+ b.push(`${$.join(",")}{${M}}`);
978
+ }), b), t);
979
+ function r(b, g) {
980
+ return g.formatSelector ? g.formatSelector(b) : [b];
975
981
  }
976
982
  }
977
- function V(i, t) {
978
- const a = o[i];
979
- return a.isThemeStyle ? a : a.values1.values.includes(t) ? a.values1 : a.values2.values.includes(t) ? a.values2 : a.values3;
983
+ function N(t, a) {
984
+ const r = o[t];
985
+ return r.isThemeStyle ? r : r.values1.values.includes(a) ? r.values1 : r.values2.values.includes(a) ? r.values2 : r.values3;
980
986
  }
981
- function C() {
982
- const t = typeof window < "u" && typeof window.document < "u" ? window.document : global.document;
983
- let a = t.getElementById(l.cronoStylesElementId);
984
- return a || (a = t.createElement("style"), a.setAttribute("id", l.cronoStylesElementId), a.setAttribute("type", "text/css"), t.head.insertBefore(a, t.head.firstChild)), a;
987
+ function T() {
988
+ const a = typeof window < "u" && typeof window.document < "u" ? window.document : global.document;
989
+ let r = a.getElementById(l.cronoStylesElementId);
990
+ return r || (r = a.createElement("style"), r.setAttribute("id", l.cronoStylesElementId), r.setAttribute("type", "text/css"), a.head.insertBefore(r, a.head.firstChild)), r;
985
991
  }
986
- })(B || (B = {}));
987
- const z = B, S = {
992
+ })(E || (E = {}));
993
+ const S = E, j = {
988
994
  button: {
989
995
  styles: {
990
996
  display: "inline-block",
@@ -1027,25 +1033,25 @@ const z = B, S = {
1027
1033
  }
1028
1034
  }
1029
1035
  };
1030
- var E;
1036
+ var F;
1031
1037
  ((l) => {
1032
- l.Styles = S;
1038
+ l.Styles = j;
1033
1039
  function u(s) {
1034
1040
  l.Styles = s, v();
1035
1041
  }
1036
1042
  l.setup = u;
1037
1043
  function c(s, n) {
1038
- const f = Object.entries(s.colors).map(([a, d]) => `--color${a}: ${d};`).join(`
1039
- `), b = Object.entries(s.shadows).map(([a, d]) => `--shadow${a}: ${d};`).join(`
1040
- `), h = Object.entries(s.backgrounds).map(([a, d]) => `--background${a}: ${d};`).join(`
1044
+ const d = Object.entries(s.colors).map(([a, r]) => `--color${a}: ${r};`).join(`
1045
+ `), f = Object.entries(s.shadows).map(([a, r]) => `--shadow${a}: ${r};`).join(`
1046
+ `), h = Object.entries(s.backgrounds).map(([a, r]) => `--background${a}: ${r};`).join(`
1041
1047
  `), p = [":root {"];
1042
- f && p.push(` ${f}`), b && p.push(` ${b}`), h && p.push(` ${h}`), p.push("}");
1043
- const V = Object.keys(s.colors).map((a) => `'${a}'`).join(" | "), C = Object.keys(s.backgrounds).map((a) => `'${a}'`).join(" | "), i = Object.keys(s.shadows).map((a) => `'${a}'`).join(" | "), t = `import '@cronocode/react-box';
1048
+ d && p.push(` ${d}`), f && p.push(` ${f}`), h && p.push(` ${h}`), p.push("}");
1049
+ const V = Object.keys(s.colors).map((a) => `'${a}'`).join(" | "), N = Object.keys(s.backgrounds).map((a) => `'${a}'`).join(" | "), T = Object.keys(s.shadows).map((a) => `'${a}'`).join(" | "), t = `import '@cronocode/react-box';
1044
1050
 
1045
1051
  declare module '${(n == null ? void 0 : n.namespacePath) ?? "@cronocode/react-box/core/types"}' {
1046
1052
  type ColorType = ${V};
1047
- type BackgroundType = ${C};
1048
- type ShadowType = ${i};
1053
+ type BackgroundType = ${N};
1054
+ type ShadowType = ${T};
1049
1055
 
1050
1056
  namespace Augmented {
1051
1057
  interface BoxProps {
@@ -1096,51 +1102,51 @@ var E;
1096
1102
  }
1097
1103
  l.setupAugmentedProps = c;
1098
1104
  function v() {
1099
- Object.keys(S).forEach((n) => {
1100
- const f = l.Styles[n], b = S[n];
1101
- f ? (f.styles = { ...b.styles, ...f.styles }, f.disabled && b.disabled && (f.disabled = { ...b.disabled, ...f.disabled })) : l.Styles[n] = S[n];
1105
+ Object.keys(j).forEach((n) => {
1106
+ const d = l.Styles[n], f = j[n];
1107
+ d ? (d.styles = { ...f.styles, ...d.styles }, d.disabled && f.disabled && (d.disabled = { ...f.disabled, ...d.disabled })) : l.Styles[n] = j[n];
1102
1108
  });
1103
1109
  }
1104
- })(E || (E = {}));
1105
- const _ = E;
1106
- function ee(l) {
1110
+ })(F || (F = {}));
1111
+ const D = F;
1112
+ function se(l) {
1107
1113
  const { clean: u, disabled: c, theme: v, component: s } = l;
1108
- return D(() => {
1109
- var b, h, p;
1114
+ return P(() => {
1115
+ var f, h, p;
1110
1116
  if (u)
1111
1117
  return;
1112
- let n = _.Styles[s] ?? ((b = _.Styles.components) == null ? void 0 : b[s]);
1118
+ let n = D.Styles[s] ?? ((f = D.Styles.components) == null ? void 0 : f[s]);
1113
1119
  if (!n)
1114
1120
  return;
1115
- let f = v ? { ...n.styles, ...(h = n.themes) == null ? void 0 : h[v].styles } : n.styles;
1116
- return c ? v ? { ...f, ...n.disabled, ...(p = n.themes) == null ? void 0 : p[v].disabled } : { ...f, ...n.disabled } : f;
1121
+ let d = v ? { ...n.styles, ...(h = n.themes) == null ? void 0 : h[v].styles } : n.styles;
1122
+ return c ? v ? { ...d, ...n.disabled, ...(p = n.themes) == null ? void 0 : p[v].disabled } : { ...d, ...n.disabled } : d;
1117
1123
  }, [s, u, c, v]);
1118
1124
  }
1119
- const se = typeof window < "u" && typeof window.document < "u", ae = se ? q : U;
1120
- function oe(l, u) {
1121
- const c = ee(l);
1122
- return ae(z.flush, [l]), D(() => {
1123
- const v = [u ? z.svgClassName : z.boxClassName], s = c ? { ...A(c), ...A(l) } : A(l);
1124
- return "inline" in s && (s.display === "block" || !s.display ? s.display = "inline-block" : s.display === "flex" ? s.display = "inline-flex" : s.display === "grid" && (s.display = "inline-grid"), delete s.inline), "inlineH" in s && (s.displayH === "block" || !s.displayH ? s.displayH = "inline-block" : s.displayH === "flex" ? s.displayH = "inline-flex" : s.displayH === "grid" && (s.displayH = "inline-grid"), delete s.inlineH), "inlineF" in s && (s.displayF === "block" || !s.displayF ? s.displayF = "inline-block" : s.displayF === "flex" ? s.displayF = "inline-flex" : s.displayF === "grid" && (s.displayF = "inline-grid"), delete s.inlineF), "inlineA" in s && (s.displayA === "block" || !s.displayA ? s.displayA = "inline-block" : s.displayA === "flex" ? s.displayA = "inline-flex" : s.displayA === "grid" && (s.displayA = "inline-grid"), delete s.inlineA), Object.entries(s).forEach(([n, f]) => {
1125
- v.push(z.get(n, f));
1125
+ const ae = typeof window < "u" && typeof window.document < "u", le = ae ? U : X;
1126
+ function re(l, u) {
1127
+ const c = se(l);
1128
+ return le(S.flush, [l]), P(() => {
1129
+ const v = [u ? S.svgClassName : S.boxClassName], s = c ? { ...B(c), ...B(l) } : B(l);
1130
+ return "inline" in s && (s.display === "block" || !s.display ? s.display = "inline-block" : s.display === "flex" ? s.display = "inline-flex" : s.display === "grid" && (s.display = "inline-grid"), delete s.inline), "inlineH" in s && (s.displayH === "block" || !s.displayH ? s.displayH = "inline-block" : s.displayH === "flex" ? s.displayH = "inline-flex" : s.displayH === "grid" && (s.displayH = "inline-grid"), delete s.inlineH), "inlineF" in s && (s.displayF === "block" || !s.displayF ? s.displayF = "inline-block" : s.displayF === "flex" ? s.displayF = "inline-flex" : s.displayF === "grid" && (s.displayF = "inline-grid"), delete s.inlineF), "inlineA" in s && (s.displayA === "block" || !s.displayA ? s.displayA = "inline-block" : s.displayA === "flex" ? s.displayA = "inline-flex" : s.displayA === "grid" && (s.displayA = "inline-grid"), delete s.inlineA), Object.entries(s).forEach(([n, d]) => {
1131
+ v.push(S.get(n, d));
1126
1132
  }), v;
1127
1133
  }, [l, c]);
1128
1134
  }
1129
- function A(l) {
1135
+ function B(l) {
1130
1136
  const u = { ...l };
1131
1137
  return Object.keys(u).forEach((v) => {
1132
- const s = k[v];
1138
+ const s = C[v];
1133
1139
  s && (s.key in u || (u[s.key] = u[v]), delete u[v]);
1134
1140
  }), u;
1135
1141
  }
1136
- function le(...l) {
1137
- return l.reduce((u, c) => c ? typeof c == "string" ? (u.push(c), u) : Array.isArray(c) ? (u.push(...le(...c)), u) : (Object.entries(c).forEach(([v, s]) => {
1142
+ function ue(...l) {
1143
+ return l.reduce((u, c) => c ? typeof c == "string" ? (u.push(c), u) : Array.isArray(c) ? (u.push(...ue(...c)), u) : (Object.entries(c).forEach(([v, s]) => {
1138
1144
  s && u.push(v);
1139
1145
  }), u) : u, []);
1140
1146
  }
1141
1147
  export {
1142
- z as S,
1143
- _ as T,
1144
- le as c,
1145
- oe as u
1148
+ S,
1149
+ D as T,
1150
+ ue as c,
1151
+ re as u
1146
1152
  };