@cronocode/react-box 3.0.15 → 3.0.16

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,7 +1,7 @@
1
1
  import we, { useMemo as ee, useLayoutEffect as ce, useEffect as de, useState as fe, useContext as xe, useRef as Fe } from "react";
2
- import { jsx as x, jsxs as Ne } from "react/jsx-runtime";
2
+ import { jsx as p, jsxs as Ne } from "react/jsx-runtime";
3
3
  import Ce from "./box.mjs";
4
- import M from "./components/baseSvg.mjs";
4
+ import R from "./components/baseSvg.mjs";
5
5
  function me(...e) {
6
6
  return e.reduce((t, r) => r ? typeof r == "string" ? (t.push(r), t) : Array.isArray(r) ? (t.push(...me(...r)), t) : (Object.entries(r).forEach(([o, i]) => {
7
7
  i && t.push(o);
@@ -20,8 +20,8 @@ var a;
20
20
  }
21
21
  t.svg = o;
22
22
  })(e.ClassName || (e.ClassName = {})), ((t) => {
23
- function r(v, c, f = W) {
24
- return `${v / f}rem`;
23
+ function r(v, c, d = W) {
24
+ return `${v / d}rem`;
25
25
  }
26
26
  t.rem = r;
27
27
  function o(v) {
@@ -29,8 +29,8 @@ var a;
29
29
  }
30
30
  t.px = o;
31
31
  function i(v) {
32
- const [c, f] = v.split("/");
33
- return `${+c / +f * 100}%`;
32
+ const [c, d] = v.split("/");
33
+ return `${+c / +d * 100}%`;
34
34
  }
35
35
  t.fraction = i;
36
36
  function n(v, c) {
@@ -45,33 +45,33 @@ var a;
45
45
  }
46
46
  t.widthHeight = n;
47
47
  function u(v) {
48
- return (c, f) => `var(--${v}${f});`;
48
+ return (c, d) => `var(--${v}${d});`;
49
49
  }
50
50
  t.variables = u;
51
51
  function l(v) {
52
- return (c, f) => `var(--${v}${f});`;
52
+ return (c, d) => `var(--${v}${d});`;
53
53
  }
54
54
  t.svgVariables = l;
55
- function d(v, c) {
55
+ function f(v, c) {
56
56
  return `repeat(${c},minmax(0,1fr))`;
57
57
  }
58
- t.gridColumns = d;
59
- function b(v, c) {
58
+ t.gridColumns = f;
59
+ function g(v, c) {
60
60
  return c === "full-row" ? "1/-1" : `span ${c}/span ${c}`;
61
61
  }
62
- t.gridColumn = b;
62
+ t.gridColumn = g;
63
63
  function s(v, c) {
64
64
  return `${c}ms`;
65
65
  }
66
66
  t.ms = s;
67
- function h(v, c) {
67
+ function b(v, c) {
68
68
  return `${c}deg`;
69
69
  }
70
- t.rotate = h;
71
- function g(v, c) {
70
+ t.rotate = b;
71
+ function h(v, c) {
72
72
  return c === "xAxis" ? "-1 1" : "1 -1";
73
73
  }
74
- t.flip = g;
74
+ t.flip = h;
75
75
  })(e.Value || (e.Value = {}));
76
76
  })(a || (a = {}));
77
77
  var K;
@@ -372,7 +372,7 @@ var K;
372
372
  }
373
373
  e.getVariableValue = i;
374
374
  function n() {
375
- return Object.entries(r).map(([l, d]) => `--${l}: ${d};`).join("");
375
+ return Object.entries(r).map(([l, f]) => `--${l}: ${f};`).join("");
376
376
  }
377
377
  e.generateVariables = n;
378
378
  function u(l) {
@@ -1473,7 +1473,7 @@ const y = K, E = {
1473
1473
  hasChecked: ":has(:checked)",
1474
1474
  hasRequired: ":has(:required)",
1475
1475
  hasDisabled: ":has([disabled])"
1476
- }, H = {
1476
+ }, M = {
1477
1477
  indeterminate: ":indeterminate",
1478
1478
  checked: ":checked",
1479
1479
  required: ":required",
@@ -1481,7 +1481,7 @@ const y = K, E = {
1481
1481
  selected: '[aria-selected="true"]'
1482
1482
  }, Ve = {
1483
1483
  theme: ""
1484
- }, te = { ...ve, ...H, ...Ve }, ye = Object.entries(te).reduce(
1484
+ }, te = { ...ve, ...M, ...Ve }, ye = Object.entries(te).reduce(
1485
1485
  (e, [t], r) => (e[t] = Math.pow(2, r), e),
1486
1486
  {}
1487
1487
  ), G = Object.entries(te).reduce(
@@ -1498,7 +1498,7 @@ const y = K, E = {
1498
1498
  activeGroup: "active",
1499
1499
  disabledGroup: "disabled",
1500
1500
  theme: "theme"
1501
- }, k = {
1501
+ }, H = {
1502
1502
  /** Styles applied for small screens and larger. >= 640 */
1503
1503
  sm: 640,
1504
1504
  /** Styles applied for medium screens and larger. >= 768 */
@@ -1513,12 +1513,12 @@ const y = K, E = {
1513
1513
  var q;
1514
1514
  ((e) => {
1515
1515
  function t(n, u, l) {
1516
- const d = { ...n }, b = d.props || {};
1516
+ const f = { ...n }, g = f.props || {};
1517
1517
  return u.forEach((s) => {
1518
- s in d && (b[s] = d[s], delete d[s]);
1519
- }), l && Object.entries(l).forEach(([s, h]) => {
1520
- b[s] = h;
1521
- }), d.props = b, d;
1518
+ s in f && (g[s] = f[s], delete f[s]);
1519
+ }), l && Object.entries(l).forEach(([s, b]) => {
1520
+ g[s] = b;
1521
+ }), f.props = g, f;
1522
1522
  }
1523
1523
  e.buildProps = t;
1524
1524
  function r(n) {
@@ -1526,9 +1526,9 @@ var q;
1526
1526
  }
1527
1527
  e.isObject = r;
1528
1528
  function o(...n) {
1529
- return n.reduce((u, l) => (Object.keys(l ?? {}).forEach((d) => {
1530
- const b = u[d], s = l[d];
1531
- r(s) && "clean" in s && s.clean ? u[d] = s : d in H && typeof s == "boolean" || (d in H && Array.isArray(s) ? u[d] = o(b, s[1] ?? {}) : Array.isArray(b) && Array.isArray(s) ? u[d] = b.concat(...s) : r(b) && r(s) ? u[d] = o(b, s) : u[d] = s);
1529
+ return n.reduce((u, l) => (Object.keys(l ?? {}).forEach((f) => {
1530
+ const g = u[f], s = l[f];
1531
+ r(s) && "clean" in s && s.clean ? u[f] = s : f in M && typeof s == "boolean" || (f in M && Array.isArray(s) ? u[f] = o(g, s[1] ?? {}) : Array.isArray(g) && Array.isArray(s) ? u[f] = g.concat(...s) : r(g) && r(s) ? u[f] = o(g, s) : u[f] = s);
1532
1532
  }), u), {});
1533
1533
  }
1534
1534
  e.mergeDeep = o;
@@ -1579,10 +1579,6 @@ const ze = {
1579
1579
  color: "gray-400",
1580
1580
  borderColor: "gray-300"
1581
1581
  }
1582
- },
1583
- variants: {
1584
- test: {},
1585
- test2: {}
1586
1582
  }
1587
1583
  },
1588
1584
  textbox: {
@@ -1855,6 +1851,42 @@ const ze = {
1855
1851
  borderRadius: 1
1856
1852
  },
1857
1853
  children: {
1854
+ columnGroups: {
1855
+ styles: {
1856
+ p: 3,
1857
+ bb: 1,
1858
+ borderColor: "gray-400",
1859
+ color: "gray-400",
1860
+ gap: 2,
1861
+ ai: "center",
1862
+ height: 12
1863
+ },
1864
+ children: {
1865
+ item: {
1866
+ styles: {
1867
+ gap: 2,
1868
+ ai: "center",
1869
+ b: 1,
1870
+ borderColor: "gray-400",
1871
+ bgColor: "gray-100",
1872
+ borderRadius: 1,
1873
+ py: 1,
1874
+ pl: 2,
1875
+ pr: 1,
1876
+ color: "violet-950"
1877
+ },
1878
+ children: {
1879
+ icon: {
1880
+ styles: {
1881
+ width: 3,
1882
+ color: "gray-400",
1883
+ cursor: "pointer"
1884
+ }
1885
+ }
1886
+ }
1887
+ }
1888
+ }
1889
+ },
1858
1890
  header: {
1859
1891
  styles: {
1860
1892
  position: "sticky",
@@ -1921,8 +1953,8 @@ var X;
1921
1953
  return y.setUserVariables(o), Object.entries(i).forEach(([u, l]) => {
1922
1954
  E[u] = l;
1923
1955
  }), Object.entries(n).forEach(([u, l]) => {
1924
- const d = E[u];
1925
- E[u] = d ? [...l, ...d] : l;
1956
+ const f = E[u];
1957
+ E[u] = f ? [...l, ...f] : l;
1926
1958
  }), { extendedProps: i, extendedPropTypes: n };
1927
1959
  }
1928
1960
  e.extend = t, e.componentsStyles = ie;
@@ -1938,49 +1970,49 @@ function Ee(e) {
1938
1970
  if (t) return;
1939
1971
  const i = r == null ? void 0 : r.split(".");
1940
1972
  if (!i) return;
1941
- const n = i.reduce((d, b, s) => {
1942
- var h;
1943
- return s === 0 ? Ae.componentsStyles[b] : (h = d == null ? void 0 : d.children) == null ? void 0 : h[b];
1973
+ const n = i.reduce((f, g, s) => {
1974
+ var b;
1975
+ return s === 0 ? Ae.componentsStyles[g] : (b = f == null ? void 0 : f.children) == null ? void 0 : b[g];
1944
1976
  }, void 0);
1945
1977
  if (!n) return;
1946
1978
  if (!o) return n.styles;
1947
1979
  const u = me(o);
1948
1980
  if (u.length === 0) return n.styles;
1949
- const l = C.mergeDeep(...u.map((d) => {
1950
- var b;
1951
- return (b = n.variants) == null ? void 0 : b[d];
1981
+ const l = C.mergeDeep(...u.map((f) => {
1982
+ var g;
1983
+ return (g = n.variants) == null ? void 0 : g[f];
1952
1984
  }));
1953
1985
  return C.mergeDeep(n.styles, l);
1954
1986
  }, [t, r, o]);
1955
1987
  }
1956
- const Oe = new $e(), je = typeof window < "u" && typeof window.document < "u";
1988
+ const Oe = new $e(), Se = typeof window < "u" && typeof window.document < "u";
1957
1989
  var ue;
1958
- const he = typeof process == "object" && ((ue = process.env) == null ? void 0 : ue.NODE_ENV) === "test", Re = je && !he ? ce : de, be = "_b", j = "_s";
1959
- function Le(e, t) {
1960
- Re(R.flush, [e]);
1990
+ const be = typeof process == "object" && ((ue = process.env) == null ? void 0 : ue.NODE_ENV) === "test", je = Se && !be ? ce : de, ge = "_b", S = "_s";
1991
+ function _e(e, t) {
1992
+ je(j.flush, [e]);
1961
1993
  const r = Ee(e);
1962
1994
  return ee(() => {
1963
- const o = [t ? j : be], i = r ? C.mergeDeep(r, e) : e;
1964
- return R.addClassNames(i, o, []), o;
1995
+ const o = [t ? S : ge], i = r ? C.mergeDeep(r, e) : e;
1996
+ return j.addClassNames(i, o, []), o;
1965
1997
  }, [e, t, r]);
1966
1998
  }
1967
- var R;
1999
+ var j;
1968
2000
  ((e) => {
1969
2001
  let t = !0, r = {};
1970
- function o(s, h, g, v, c) {
1971
- Object.entries(s).forEach(([f, m]) => {
1972
- if (C.isKeyOf(f, E))
1973
- u(f, m, h, g, v, c);
1974
- else if (C.isKeyOf(f, ve))
1975
- o(m, h, [...g, f], v, c);
1976
- else if (C.isKeyOf(f, H)) {
2002
+ function o(s, b, h, v, c) {
2003
+ Object.entries(s).forEach(([d, m]) => {
2004
+ if (C.isKeyOf(d, E))
2005
+ u(d, m, b, h, v, c);
2006
+ else if (C.isKeyOf(d, ve))
2007
+ o(m, b, [...h, d], v, c);
2008
+ else if (C.isKeyOf(d, M)) {
1977
2009
  if (Array.isArray(m)) {
1978
2010
  const [F, N] = m;
1979
- o(N, h, [...g, f], v, c);
2011
+ o(N, b, [...h, d], v, c);
1980
2012
  }
1981
- C.isObject(m) && o(m, h, [...g, f], v, c);
1982
- } else C.isKeyOf(f, k) ? o(m, h, g, f, c) : C.isKeyOf(f, se) && Object.entries(m).forEach(([F, N]) => {
1983
- o(N, h, [...g, se[f]], v, F);
2013
+ C.isObject(m) && o(m, b, [...h, d], v, c);
2014
+ } else C.isKeyOf(d, H) ? o(m, b, h, d, c) : C.isKeyOf(d, se) && Object.entries(m).forEach(([F, N]) => {
2015
+ o(N, b, [...h, se[d]], v, F);
1984
2016
  });
1985
2017
  });
1986
2018
  }
@@ -1988,44 +2020,44 @@ var R;
1988
2020
  function i() {
1989
2021
  if (!t) return;
1990
2022
  console.debug("\x1B[36m%s\x1B[0m", "[react-box]: flush");
1991
- const s = Object.entries(E).reduce((f, [m], F) => (f[m] = F, f), {}), h = `: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;z-index:99999;}
2023
+ const s = Object.entries(E).reduce((d, [m], F) => (d[m] = F, d), {}), b = `: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;z-index:99999;}
1992
2024
  html{font-size: 16px;font-family: Arial, sans-serif;}
1993
2025
  body{margin: 0;line-height: var(--lineHeight);font-size: var(--fontSize);}
1994
2026
  a,ul{all: unset;}
1995
- .${be}{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;}
1996
- .${j}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;transition: all var(--svgTransitionTime);}.${j} path,.${j} circle,.${j} rect,.${j} line {transition: all var(--svgTransitionTime);}
1997
- `, g = Object.entries(r);
1998
- g.sort(
1999
- ([f], [m]) => (k[f] ?? 0) - (k[m] ?? 0)
2027
+ .${ge}{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;}
2028
+ .${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);}
2029
+ `, h = Object.entries(r);
2030
+ h.sort(
2031
+ ([d], [m]) => (H[d] ?? 0) - (H[m] ?? 0)
2000
2032
  );
2001
- const v = g.reduce(
2002
- (f, [m, F]) => (m !== "normal" && f.push(`@media(min-width: ${k[m]}px){`), Object.entries(F).forEach(([N, D]) => {
2003
- const { __parents: re, ...ge } = D, ae = Object.entries(ge);
2004
- ae.sort(([V], [S]) => s[V] - s[S]), ae.forEach(([V, S]) => {
2005
- S.forEach((z) => {
2006
- var B, L;
2007
- const p = E[V].find(($) => Array.isArray($.values) ? $.values.includes(z) : typeof z == typeof $.values);
2008
- if (!p) return;
2009
- const A = l(V, z, +N, m), U = G[+N].map(($) => te[$]).join(""), w = ((B = p.selector) == null ? void 0 : B.call(p, `.${A}`, U)) ?? `.${A}${U}`, I = Array.isArray(p.styleName) ? p.styleName : [p.styleName ?? V], _ = ((L = p.valueFormat) == null ? void 0 : L.call(p, z, y.getVariableValue)) ?? z;
2010
- f.push(`${w}{${I.map(($) => `${$}:${_}`).join(";")}}`);
2033
+ const v = h.reduce(
2034
+ (d, [m, F]) => (m !== "normal" && d.push(`@media(min-width: ${H[m]}px){`), Object.entries(F).forEach(([N, D]) => {
2035
+ const { __parents: re, ...he } = D, ae = Object.entries(he);
2036
+ ae.sort(([V], [B]) => s[V] - s[B]), ae.forEach(([V, B]) => {
2037
+ B.forEach((z) => {
2038
+ var T, k;
2039
+ const w = E[V].find(($) => Array.isArray($.values) ? $.values.includes(z) : typeof z == typeof $.values);
2040
+ if (!w) return;
2041
+ const A = l(V, z, +N, m), U = G[+N].map(($) => te[$]).join(""), x = ((T = w.selector) == null ? void 0 : T.call(w, `.${A}`, U)) ?? `.${A}${U}`, L = Array.isArray(w.styleName) ? w.styleName : [w.styleName ?? V], _ = ((k = w.valueFormat) == null ? void 0 : k.call(w, z, y.getVariableValue)) ?? z;
2042
+ d.push(`${x}{${L.map(($) => `${$}:${_}`).join(";")}}`);
2011
2043
  });
2012
- }), re && Object.entries(re).forEach(([V, S]) => {
2013
- const z = Object.entries(S);
2014
- z.sort(([O], [p]) => s[O] - s[p]), z.forEach(([O, p]) => {
2015
- p.forEach((A) => {
2044
+ }), re && Object.entries(re).forEach(([V, B]) => {
2045
+ const z = Object.entries(B);
2046
+ z.sort(([O], [w]) => s[O] - s[w]), z.forEach(([O, w]) => {
2047
+ w.forEach((A) => {
2016
2048
  var oe, le;
2017
- const w = E[O].find((T) => Array.isArray(T.values) ? T.values.includes(A) : typeof A == typeof T.values);
2018
- if (!w) return;
2019
- const I = l(O, A, +N, m, V), [_] = G[+N], B = _ === "theme" ? `.${V} .${I}` : `.${V}:${_} .${I}`, L = ((oe = w.selector) == null ? void 0 : oe.call(w, B, "")) ?? B, $ = Array.isArray(w.styleName) ? w.styleName : [w.styleName ?? O], pe = ((le = w.valueFormat) == null ? void 0 : le.call(w, A, y.getVariableValue)) ?? A;
2020
- f.push(`${L}{${$.map((T) => `${T}:${pe}`).join(";")}}`);
2049
+ const x = E[O].find((I) => Array.isArray(I.values) ? I.values.includes(A) : typeof A == typeof I.values);
2050
+ if (!x) return;
2051
+ const L = l(O, A, +N, m, V), [_] = G[+N], T = _ === "theme" ? `.${V} .${L}` : `.${V}:${_} .${L}`, k = ((oe = x.selector) == null ? void 0 : oe.call(x, T, "")) ?? T, $ = Array.isArray(x.styleName) ? x.styleName : [x.styleName ?? O], pe = ((le = x.valueFormat) == null ? void 0 : le.call(x, A, y.getVariableValue)) ?? A;
2052
+ d.push(`${k}{${$.map((I) => `${I}:${pe}`).join(";")}}`);
2021
2053
  });
2022
2054
  });
2023
2055
  });
2024
- }), m !== "normal" && f.push("}"), f),
2025
- [h]
2056
+ }), m !== "normal" && d.push("}"), d),
2057
+ [b]
2026
2058
  );
2027
2059
  v.unshift(`:root{${y.generateVariables()}}`);
2028
- const c = b();
2060
+ const c = g();
2029
2061
  c.innerHTML = v.join(""), t = !1;
2030
2062
  }
2031
2063
  e.flush = i;
@@ -2033,26 +2065,26 @@ a,ul{all: unset;}
2033
2065
  r = {};
2034
2066
  }
2035
2067
  e.clear = n;
2036
- function u(s, h, g, v, c = "normal", f) {
2037
- if (h == null) return;
2068
+ function u(s, b, h, v, c = "normal", d) {
2069
+ if (b == null) return;
2038
2070
  const m = v.reduce((N, D) => N + ye[D], 0);
2039
- r[c] ? r[c][m] ? r[c][m][s] || (r[c][m][s] = /* @__PURE__ */ new Set()) : r[c][m] = { [s]: /* @__PURE__ */ new Set() } : r[c] = { [m]: { [s]: /* @__PURE__ */ new Set() } }, f ? (r[c][m].__parents ? r[c][m].__parents[f] ? r[c][m].__parents[f][s] || (r[c][m].__parents[f][s] = /* @__PURE__ */ new Set()) : r[c][m].__parents[f] = { [s]: /* @__PURE__ */ new Set() } : r[c][m].__parents = { [f]: { [s]: /* @__PURE__ */ new Set() } }, r[c][m].__parents[f][s].has(h) || (r[c][m].__parents[f][s].add(h), t = !0)) : r[c][m][s].has(h) || (r[c][m][s].add(h), t = !0);
2040
- const F = l(s, h, m, c, f);
2041
- g.push(F);
2071
+ r[c] ? r[c][m] ? r[c][m][s] || (r[c][m][s] = /* @__PURE__ */ new Set()) : r[c][m] = { [s]: /* @__PURE__ */ new Set() } : r[c] = { [m]: { [s]: /* @__PURE__ */ new Set() } }, d ? (r[c][m].__parents ? r[c][m].__parents[d] ? r[c][m].__parents[d][s] || (r[c][m].__parents[d][s] = /* @__PURE__ */ new Set()) : r[c][m].__parents[d] = { [s]: /* @__PURE__ */ new Set() } : r[c][m].__parents = { [d]: { [s]: /* @__PURE__ */ new Set() } }, r[c][m].__parents[d][s].has(b) || (r[c][m].__parents[d][s].add(b), t = !0)) : r[c][m][s].has(b) || (r[c][m][s].add(b), t = !0);
2072
+ const F = l(s, b, m, c, d);
2073
+ h.push(F);
2042
2074
  }
2043
- function l(s, h, g, v, c) {
2044
- const f = G[g], m = `${v === "normal" ? "" : `${v}-`}${f.map((F) => `${F}-`).join("")}${c ? `${c}-` : ""}${s}-${h}`;
2045
- return he ? m : Oe.getIdentity(m);
2075
+ function l(s, b, h, v, c) {
2076
+ const d = G[h], m = `${v === "normal" ? "" : `${v}-`}${d.map((F) => `${F}-`).join("")}${c ? `${c}-` : ""}${s}-${b}`;
2077
+ return be ? m : Oe.getIdentity(m);
2046
2078
  }
2047
- const d = "crono-styles";
2048
- function b() {
2049
- let s = document.getElementById(d);
2050
- return s || (s = document.createElement("style"), s.setAttribute("id", d), s.setAttribute("type", "text/css"), document.head.insertBefore(s, document.head.firstChild)), s;
2079
+ const f = "crono-styles";
2080
+ function g() {
2081
+ let s = document.getElementById(f);
2082
+ return s || (s = document.createElement("style"), s.setAttribute("id", f), s.setAttribute("type", "text/css"), document.head.insertBefore(s, document.head.firstChild)), s;
2051
2083
  }
2052
- })(R || (R = {}));
2084
+ })(j || (j = {}));
2053
2085
  var ne;
2054
2086
  ((e) => {
2055
- e.flush = R.flush, e.clear = R.clear;
2087
+ e.flush = j.flush, e.clear = j.clear;
2056
2088
  })(ne || (ne = {}));
2057
2089
  const Y = we.createContext({ theme: "", setTheme: () => {
2058
2090
  } });
@@ -2064,7 +2096,7 @@ function Z(e) {
2064
2096
  return u.classList.add(i), () => {
2065
2097
  u.classList.remove(i);
2066
2098
  };
2067
- }, [i]), o === "local" ? /* @__PURE__ */ x(Y.Provider, { value: { theme: i, setTheme: n }, children: /* @__PURE__ */ x(Ce, { className: i, children: t }) }) : /* @__PURE__ */ x(Y.Provider, { value: { theme: i, setTheme: n }, children: t });
2099
+ }, [i]), o === "local" ? /* @__PURE__ */ p(Y.Provider, { value: { theme: i, setTheme: n }, children: /* @__PURE__ */ p(Ce, { className: i, children: t }) }) : /* @__PURE__ */ p(Y.Provider, { value: { theme: i, setTheme: n }, children: t });
2068
2100
  }
2069
2101
  ((e) => {
2070
2102
  function t() {
@@ -2073,13 +2105,13 @@ function Z(e) {
2073
2105
  }
2074
2106
  e.useTheme = t;
2075
2107
  })(Z || (Z = {}));
2076
- const ke = Z, Se = {
2108
+ const ke = Z, Re = {
2077
2109
  selected: "aria-selected"
2078
2110
  };
2079
2111
  var P;
2080
2112
  ((e) => {
2081
2113
  function t(r, o, i) {
2082
- r !== void 0 && r != null && (i[Se[o] ?? o] = Array.isArray(r) ? r[0] : r);
2114
+ r !== void 0 && r != null && (i[Re[o] ?? o] = Array.isArray(r) ? r[0] : r);
2083
2115
  }
2084
2116
  e.assignBooleanProp = t;
2085
2117
  })(P || (P = {}));
@@ -2158,39 +2190,33 @@ var J;
2158
2190
  })(J || (J = {}));
2159
2191
  const De = J;
2160
2192
  function Ue(e) {
2161
- const { node: t = null, event: r = "click", hideOnScroll: o = !1, hideOnResize: i = !1, hideOnEscape: n = !0 } = e ?? {}, [u, l] = fe(!1), d = Fe(null);
2193
+ const { node: t = null, event: r = "click", hideOnScroll: o = !1, hideOnResize: i = !1, hideOnEscape: n = !0 } = e ?? {}, [u, l] = fe(!1), f = Fe(null);
2162
2194
  return de(() => {
2163
- function b(c) {
2164
- const f = t ?? d.current;
2165
- (f == null ? void 0 : f.contains(c.target)) === !1 && l(!1);
2195
+ function g(c) {
2196
+ const d = t ?? f.current;
2197
+ (d == null ? void 0 : d.contains(c.target)) === !1 && l(!1);
2166
2198
  }
2167
2199
  function s() {
2168
2200
  l(!1);
2169
2201
  }
2170
- function h() {
2171
- l(!1);
2202
+ function b(c) {
2203
+ const d = t ?? f.current;
2204
+ (d == null ? void 0 : d.contains(c.target)) === !1 && l(!1);
2172
2205
  }
2173
- function g(c) {
2206
+ function h(c) {
2174
2207
  c.key === "Escape" && l(!1);
2175
2208
  }
2176
2209
  const v = new AbortController();
2177
- return u && (window.addEventListener(r, b, v), n && window.addEventListener("keydown", g, v), i && window.addEventListener("resize", s, v), o && window.addEventListener("scroll", h, v)), () => {
2210
+ return u && (window.addEventListener(r, g, v), n && window.addEventListener("keydown", h, v), i && window.addEventListener("resize", s, v), o && window.addEventListener("scroll", b, { signal: v.signal, capture: !0 })), () => {
2178
2211
  v.abort();
2179
2212
  };
2180
- }, [t, u]), [u, l, d];
2213
+ }, [t, u]), [u, l, f];
2181
2214
  }
2182
- function Ge() {
2183
- return ee(() => {
2184
- const e = "crono-box";
2185
- let t = document.getElementById(e);
2186
- return t || (t = document.createElement("div"), t.id = e, document.body.appendChild(t)), t;
2187
- }, []);
2215
+ function Ge(e) {
2216
+ return /* @__PURE__ */ p(R, { ...e, children: /* @__PURE__ */ p("path", { d: "M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z" }) });
2188
2217
  }
2189
2218
  function We(e) {
2190
- return /* @__PURE__ */ x(M, { ...e, children: /* @__PURE__ */ x("path", { d: "M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z" }) });
2191
- }
2192
- function Ke(e) {
2193
- return /* @__PURE__ */ x(M, { viewBox: "0 0 16 16", width: "18", ...e, children: /* @__PURE__ */ x(
2219
+ return /* @__PURE__ */ p(R, { viewBox: "0 0 16 16", width: "18", ...e, children: /* @__PURE__ */ p(
2194
2220
  "path",
2195
2221
  {
2196
2222
  strokeWidth: 4,
@@ -2198,26 +2224,30 @@ function Ke(e) {
2198
2224
  }
2199
2225
  ) });
2200
2226
  }
2227
+ function Ke(e) {
2228
+ return /* @__PURE__ */ Ne(R, { viewBox: "0 0 490.6 490.6", ...e, children: [
2229
+ /* @__PURE__ */ p("path", { d: "M151.549 145.274c0 23.39 9.145 50.385 24.462 72.214 17.389 24.78 39.376 38.427 61.911 38.427 22.534 0 44.521-13.647 61.91-38.428 15.317-21.828 24.462-48.824 24.462-72.213 0-47.626-38.746-86.372-86.372-86.372s-86.373 38.746-86.373 86.372zm86.373-71.372c39.354 0 71.372 32.018 71.372 71.372 0 20.118-8.33 44.487-21.74 63.598-14.29 20.364-32.38 32.043-49.632 32.043-17.252 0-35.342-11.679-49.632-32.043-13.41-19.11-21.741-43.479-21.741-63.598 0-39.355 32.018-71.372 71.373-71.372z" }),
2230
+ /* @__PURE__ */ p("path", { d: "M302.372 239.167a7.502 7.502 0 0 0-8.52 1.461c-16.775 16.728-36.117 25.569-55.935 25.569-19.821 0-39.158-8.841-55.923-25.567a7.5 7.5 0 0 0-8.521-1.463c-25.254 12.022-46.628 30.829-61.811 54.388-15.596 24.2-23.84 52.277-23.84 81.195v.121c0 2.116.894 4.134 2.461 5.556 40.492 36.722 92.922 56.945 147.633 56.945s107.141-20.224 147.632-56.945a7.499 7.499 0 0 0 2.462-5.556v-.121c0-28.918-8.242-56.995-23.834-81.194-15.179-23.561-36.551-42.368-61.804-54.389zm-64.454 183.205c-49.861 0-97.685-18.023-135.057-50.827.583-24.896 7.956-48.986 21.411-69.865 12.741-19.77 30.322-35.823 51.058-46.676 18.746 17.157 40.285 26.193 62.588 26.193 22.3 0 43.842-9.035 62.598-26.193 20.734 10.853 38.313 26.906 51.053 46.676 13.452 20.877 20.823 44.968 21.406 69.865-37.373 32.804-85.197 50.827-135.057 50.827z" }),
2231
+ /* @__PURE__ */ p("path", { d: "M455.077 243.89c-13.23-20.532-31.856-36.923-53.864-47.399a7.501 7.501 0 0 0-8.52 1.461c-14.312 14.271-30.79 21.815-47.654 21.815-9.142 0-18.184-2.205-26.873-6.553a7.5 7.5 0 0 0-6.712 13.414c10.793 5.401 22.093 8.139 33.586 8.139 19.335 0 38.004-7.737 54.288-22.437a116.088 116.088 0 0 1 43.141 39.685c11.445 17.763 17.756 38.243 18.338 59.416-18.524 16.158-40.553 28.449-63.91 35.634a7.5 7.5 0 0 0 4.41 14.338c26.509-8.154 51.435-22.362 72.082-41.088a7.499 7.499 0 0 0 2.462-5.556v-.105c-.001-25.204-7.185-49.674-20.774-70.764zM130.493 210.473c7.93 0 15.841-1.934 23.516-5.748a7.5 7.5 0 0 0-6.675-13.433c-5.582 2.774-11.248 4.18-16.841 4.18-14.541 0-29.836-9.914-41.964-27.2-11.449-16.318-18.562-37.112-18.562-54.266 0-33.375 27.152-60.527 60.526-60.527 15.752 0 30.67 6.022 42.006 16.958a7.499 7.499 0 0 0 10.604-.19 7.499 7.499 0 0 0-.19-10.604c-14.146-13.647-32.763-21.163-52.42-21.163-41.646 0-75.526 33.881-75.526 75.527 0 20.38 7.957 43.887 21.283 62.881 15.195 21.657 34.459 33.585 54.243 33.585z" }),
2232
+ /* @__PURE__ */ p("path", { d: "M61.034 340.143a175.333 175.333 0 0 1-45.989-29.004c.582-21.112 6.875-41.53 18.291-59.243a115.795 115.795 0 0 1 43.01-39.566c16.239 14.662 34.856 22.376 54.139 22.376 11.587 0 22.969-2.785 33.829-8.277a7.501 7.501 0 0 0-6.77-13.386c-8.742 4.421-17.846 6.663-27.059 6.663-16.811 0-33.238-7.522-47.504-21.754a7.501 7.501 0 0 0-8.521-1.462c-21.954 10.451-40.534 26.8-53.733 47.28C7.167 264.811 0 289.221 0 314.362v.103c0 2.116.894 4.134 2.461 5.556 15.629 14.174 33.338 25.579 52.634 33.897a7.481 7.481 0 0 0 2.966.615 7.503 7.503 0 0 0 2.973-14.39zM69.854 351.003c-2.671 6.443 4.532 12.832 10.617 9.387 3.238-1.834 4.683-5.937 3.227-9.385-2.407-6.145-11.378-5.952-13.844-.002z" }),
2233
+ /* @__PURE__ */ p("path", { d: "M83.698 351.005c.19.45-.18-.46 0 0zM303.345 70.438c11.336-10.936 26.254-16.958 42.006-16.958 33.374 0 60.526 27.152 60.526 60.527 0 17.154-7.112 37.947-18.563 54.266-12.128 17.286-27.424 27.2-41.964 27.2-5.593 0-11.259-1.406-16.841-4.18a7.5 7.5 0 0 0-6.676 13.433c7.675 3.814 15.587 5.748 23.517 5.748 19.783 0 39.048-11.927 54.243-33.585 13.327-18.994 21.283-42.501 21.283-62.881 0-41.646-33.881-75.527-75.526-75.527-19.657 0-38.273 7.516-52.42 21.163a7.5 7.5 0 0 0 10.415 10.794z" })
2234
+ ] });
2235
+ }
2201
2236
  function qe(e) {
2202
- return /* @__PURE__ */ x(M, { viewBox: "0 0 1024 1024", ...e, children: /* @__PURE__ */ x("path", { d: "M31.997 1023.957a31.699 31.699 0 0 1-22.611-9.386C3.328 1008.556 0 1000.493 0 991.96s3.328-16.596 9.386-22.611L328.25 650.484l-152.52-152.52a95.907 95.907 0 0 1-25.087-92.152 95.31 95.31 0 0 1 44.327-58.62l.896-.512a353.464 353.464 0 0 1 176.156-47.398c20.137 0 40.36 1.749 60.283 5.205L597.71 44.54A95.224 95.224 0 0 1 678.685.085c25.64 0 49.745 9.983 67.877 28.073l249.195 249.195a95.224 95.224 0 0 1 25.897 88.74 95.139 95.139 0 0 1-42.152 60.154L719.513 591.695a352.227 352.227 0 0 1-42.663 237.292A95.395 95.395 0 0 1 594 876.514a95.523 95.523 0 0 1-67.963-28.2L373.43 695.706 54.61 1014.614a31.912 31.912 0 0 1-22.612 9.343zm340.025-660.68c-50.64 0-100.685 13.566-144.798 39.207a31.57 31.57 0 0 0-14.676 19.497 31.699 31.699 0 0 0 8.362 30.675L571.344 803.09c6.059 6.059 14.122 9.386 22.697 9.386a31.699 31.699 0 0 0 27.56-15.785 287.421 287.421 0 0 0 31.06-212.676 31.997 31.997 0 0 1 13.907-34.471l278.59-177.266a31.57 31.57 0 0 0 14.037-20.051 31.699 31.699 0 0 0-8.618-29.566l-249.28-249.28a31.912 31.912 0 0 0-49.618 5.418l-177.308 278.59a31.827 31.827 0 0 1-34.472 13.908 293.778 293.778 0 0 0-67.877-8.02z" }) });
2237
+ return /* @__PURE__ */ p(R, { viewBox: "0 0 1024 1024", ...e, children: /* @__PURE__ */ p("path", { d: "M31.997 1023.957a31.699 31.699 0 0 1-22.611-9.386C3.328 1008.556 0 1000.493 0 991.96s3.328-16.596 9.386-22.611L328.25 650.484l-152.52-152.52a95.907 95.907 0 0 1-25.087-92.152 95.31 95.31 0 0 1 44.327-58.62l.896-.512a353.464 353.464 0 0 1 176.156-47.398c20.137 0 40.36 1.749 60.283 5.205L597.71 44.54A95.224 95.224 0 0 1 678.685.085c25.64 0 49.745 9.983 67.877 28.073l249.195 249.195a95.224 95.224 0 0 1 25.897 88.74 95.139 95.139 0 0 1-42.152 60.154L719.513 591.695a352.227 352.227 0 0 1-42.663 237.292A95.395 95.395 0 0 1 594 876.514a95.523 95.523 0 0 1-67.963-28.2L373.43 695.706 54.61 1014.614a31.912 31.912 0 0 1-22.612 9.343zm340.025-660.68c-50.64 0-100.685 13.566-144.798 39.207a31.57 31.57 0 0 0-14.676 19.497 31.699 31.699 0 0 0 8.362 30.675L571.344 803.09c6.059 6.059 14.122 9.386 22.697 9.386a31.699 31.699 0 0 0 27.56-15.785 287.421 287.421 0 0 0 31.06-212.676 31.997 31.997 0 0 1 13.907-34.471l278.59-177.266a31.57 31.57 0 0 0 14.037-20.051 31.699 31.699 0 0 0-8.618-29.566l-249.28-249.28a31.912 31.912 0 0 0-49.618 5.418l-177.308 278.59a31.827 31.827 0 0 1-34.472 13.908 293.778 293.778 0 0 0-67.877-8.02z" }) });
2203
2238
  }
2204
- function Xe(e) {
2205
- return /* @__PURE__ */ Ne(M, { viewBox: "0 0 490.6 490.6", ...e, children: [
2206
- /* @__PURE__ */ x(
2207
- "path",
2208
- {
2209
- d: "M326.8 187.25c14.8 0 26.8-12 26.8-26.8v-117c0-14.8-12-26.8-26.8-26.8h-163c-14.8 0-26.8 12-26.8 26.8v117c0 14.8 12 26.8 26.8 26.8h71.6v22.4h-22.9c-5.5 0-9.9 4.4-9.9 9.9s4.4 9.9 9.9 9.9h65.6c5.5 0 9.9-4.4 9.9-9.9s-4.4-9.9-9.9-9.9h-22.9v-22.4h71.6zm-163-19.8c-3.9 0-7-3.1-7-7v-117c0-3.9 3.1-7 7-7h162.9c3.9 0 7 3.1 7 7v117c0 3.9-3.1 7-7 7H163.8zM189.8 261.15h-163c-14.8 0-26.8 12-26.8 26.8v117c0 14.8 12 26.8 26.8 26.8h71.6v22.4H75.5c-5.5 0-9.9 4.4-9.9 9.9s4.4 9.9 9.9 9.9h65.6c5.5 0 9.9-4.4 9.9-9.9s-4.4-9.9-9.9-9.9h-22.9v-22.4h71.6c14.8 0 26.8-12 26.8-26.8v-117c0-14.7-12.1-26.8-26.8-26.8zm7 143.9c0 3.9-3.1 7-7 7h-163c-3.9 0-7-3.1-7-7v-117c0-3.9 3.1-7 7-7h162.9c3.9 0 7 3.1 7 7v117h.1zM463.8 261.15h-163c-14.8 0-26.8 12-26.8 26.8v117c0 14.8 12 26.8 26.8 26.8h71.6v22.4h-22.9c-5.5 0-9.9 4.4-9.9 9.9s4.4 9.9 9.9 9.9h65.6c5.5 0 9.9-4.4 9.9-9.9s-4.4-9.9-9.9-9.9h-22.9v-22.4h71.6c14.8 0 26.8-12 26.8-26.8v-117c0-14.7-12.1-26.8-26.8-26.8zm7 143.9c0 3.9-3.1 7-7 7h-163c-3.9 0-7-3.1-7-7v-117c0-3.9 3.1-7 7-7h162.9c3.9 0 7 3.1 7 7v117h.1z",
2210
- fill: "#2c2f33"
2211
- }
2212
- ),
2213
- /* @__PURE__ */ x(
2214
- "path",
2215
- {
2216
- d: "M27.7 86.25v133.3c0 5.5 4.4 9.9 9.9 9.9s9.9-4.4 9.9-9.9V96.15h53.4c5.5 0 9.9-4.4 9.9-9.9s-4.4-9.9-9.9-9.9H37.6c-5.4 0-9.9 4.5-9.9 9.9zM453 229.55c5.5 0 9.9-4.4 9.9-9.9V86.25c0-5.5-4.4-9.9-9.9-9.9h-63.3c-5.5 0-9.9 4.4-9.9 9.9s4.4 9.9 9.9 9.9h53.4v123.4c0 5.5 4.4 10 9.9 10z",
2217
- fill: "#3c92ca"
2218
- }
2219
- )
2220
- ] });
2239
+ function Xe() {
2240
+ return ee(() => {
2241
+ const e = "crono-box";
2242
+ let t = document.getElementById(e);
2243
+ return t || (t = document.createElement("div"), t.id = e, document.body.appendChild(t)), t;
2244
+ }, []);
2245
+ }
2246
+ function Ye(e) {
2247
+ return /* @__PURE__ */ p(R, { viewBox: "0 0 24 24", ...e, children: /* @__PURE__ */ p("path", { d: "M4.238 2.988a1.25 1.25 0 0 0-.87 2.147L10.231 12l-6.87 6.87a1.251 1.251 0 1 0 1.769 1.769L12 13.768l6.865 6.865a1.25 1.25 0 1 0 1.768-1.768L13.768 12l6.857-6.857a1.25 1.25 0 1 0-1.768-1.768L12 10.232 5.135 3.367a1.25 1.25 0 0 0-.897-.379z" }) });
2248
+ }
2249
+ function Ze(e) {
2250
+ return /* @__PURE__ */ p(R, { viewBox: "0 0 488.4 488.4", ...e, children: /* @__PURE__ */ p("path", { d: "M0 203.25c0 112.1 91.2 203.2 203.2 203.2 51.6 0 98.8-19.4 134.7-51.2l129.5 129.5c2.4 2.4 5.5 3.6 8.7 3.6s6.3-1.2 8.7-3.6c4.8-4.8 4.8-12.5 0-17.3l-129.6-129.5c31.8-35.9 51.2-83 51.2-134.7C406.4 91.15 315.2.05 203.2.05S0 91.15 0 203.25zm381.9 0c0 98.5-80.2 178.7-178.7 178.7s-178.7-80.2-178.7-178.7 80.2-178.7 178.7-178.7 178.7 80.1 178.7 178.7z" }) });
2221
2251
  }
2222
2252
  var Q;
2223
2253
  ((e) => {
@@ -2231,11 +2261,11 @@ var Q;
2231
2261
  );
2232
2262
  return Object.entries(i).reduce((n, [u, l]) => {
2233
2263
  if (l.length === 1) {
2234
- const d = l[0];
2235
- r(n, u, d.type === "checkbox" || d.type === "radio" ? d.checked : d.value);
2264
+ const f = l[0];
2265
+ r(n, u, f.type === "checkbox" || f.type === "radio" ? f.checked : f.value);
2236
2266
  } else {
2237
- const d = l.reduce((b, s) => (s.type === "checkbox" || s.type === "radio" ? s.checked && b.push(s.value) : b.push(s.value), b), []);
2238
- r(n, u, d);
2267
+ const f = l.reduce((g, s) => (s.type === "checkbox" || s.type === "radio" ? s.checked && g.push(s.value) : g.push(s.value), g), []);
2268
+ r(n, u, f);
2239
2269
  }
2240
2270
  return n;
2241
2271
  }, {});
@@ -2245,39 +2275,41 @@ var Q;
2245
2275
  if (i.includes(".")) {
2246
2276
  const u = i.split(".");
2247
2277
  let l = o;
2248
- u.forEach((d, b) => {
2249
- if (u.length > b + 1) {
2250
- const s = d.match(/^(.+)\[(\d)\]$/);
2278
+ u.forEach((f, g) => {
2279
+ if (u.length > g + 1) {
2280
+ const s = f.match(/^(.+)\[(\d)\]$/);
2251
2281
  if (s) {
2252
- const [, h, g] = s;
2253
- l[h] = l[h] || [], l[h][g] = l[h][g] || {}, l = l[h][g];
2282
+ const [, b, h] = s;
2283
+ l[b] = l[b] || [], l[b][h] = l[b][h] || {}, l = l[b][h];
2254
2284
  } else
2255
- l[d] = l[d] || {}, l = l[d];
2285
+ l[f] = l[f] || {}, l = l[f];
2256
2286
  } else
2257
- l[d] = n;
2287
+ l[f] = n;
2258
2288
  });
2259
2289
  } else
2260
2290
  o[i] = n;
2261
2291
  }
2262
2292
  })(Q || (Q = {}));
2263
- const Ye = Q;
2293
+ const Pe = Q;
2264
2294
  export {
2265
- We as A,
2295
+ Ge as A,
2266
2296
  Ae as B,
2267
- Ke as D,
2297
+ Ye as C,
2298
+ We as D,
2268
2299
  De as F,
2269
- Xe as G,
2300
+ Ke as G,
2270
2301
  C as O,
2271
2302
  qe as P,
2272
- ne as S,
2303
+ Ze as S,
2273
2304
  ke as T,
2274
2305
  y as V,
2275
2306
  He as a,
2276
2307
  Ue as b,
2277
2308
  me as c,
2278
2309
  W as d,
2279
- Ye as e,
2280
- Ge as f,
2310
+ Pe as e,
2311
+ Xe as f,
2312
+ ne as g,
2281
2313
  Me as m,
2282
- Le as u
2314
+ _e as u
2283
2315
  };
@@ -0,0 +1,2 @@
1
+ import { BaseSvgProps } from '../components/baseSvg';
2
+ export default function SearchIcon(props: BaseSvgProps): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cronocode/react-box",
3
- "version": "3.0.15",
3
+ "version": "3.0.16",
4
4
  "type": "module",
5
5
  "main": "./box.cjs",
6
6
  "module": "./box.mjs",
package/ssg.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { S as o } from "./core.mjs";
1
+ import { g as o } from "./core.mjs";
2
2
  import a from "react-dom/server";
3
3
  const t = {
4
4
  innerHTML: ""