@cronocode/react-box 3.0.11 → 3.0.13
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/README.md +8 -7
- package/box.cjs +1 -1
- package/box.d.ts +8 -9
- package/box.mjs +16 -16
- package/components/button.d.ts +7 -6
- package/components/checkbox.d.ts +5 -3
- package/components/dataGrid.cjs +1 -1
- package/components/dataGrid.mjs +4 -4
- package/components/dropdown.cjs +1 -1
- package/components/dropdown.mjs +34 -23
- package/components/flex.d.ts +2 -1
- package/components/form.cjs +1 -1
- package/components/form.mjs +8 -5
- package/components/grid.d.ts +2 -1
- package/components/radioButton.cjs +1 -1
- package/components/radioButton.d.ts +7 -6
- package/components/radioButton.mjs +9 -9
- package/components/semantics.cjs +1 -1
- package/components/semantics.d.ts +27 -25
- package/components/semantics.mjs +26 -25
- package/components/textarea.d.ts +7 -6
- package/components/textbox.d.ts +7 -6
- package/components/tooltip.d.ts +1 -1
- package/core/boxStyles.d.ts +4 -2
- package/core/extends/boxComponents.d.ts +306 -0
- package/core/{boxExtends.d.ts → extends/boxExtends.d.ts} +4 -1
- package/core/extends/useComponents.d.ts +2 -0
- package/core/theme/theme.d.ts +1 -3
- package/core/theme/themeContext.d.ts +2 -4
- package/core/useStyles.d.ts +3 -3
- package/core.cjs +4 -4
- package/core.mjs +237 -230
- package/package.json +1 -1
- package/types.d.ts +46 -6
- package/components/label.cjs +0 -1
- package/components/label.d.ts +0 -5
- package/components/label.mjs +0 -10
- package/core/theme/defaultTheme.d.ts +0 -3
- package/core/theme/themeContract.d.ts +0 -25
- package/core/theme/useTheme.d.ts +0 -2
package/core.mjs
CHANGED
|
@@ -1,77 +1,78 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsx as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import ye, { useMemo as Q, useLayoutEffect as ie, useEffect as ne, useState as ue, useContext as ge, useRef as he } from "react";
|
|
2
|
+
import { jsx as G } from "react/jsx-runtime";
|
|
3
|
+
import pe from "./box.mjs";
|
|
4
|
+
function we(...e) {
|
|
5
|
+
return e.reduce((t, r) => r ? typeof r == "string" ? (t.push(r), t) : Array.isArray(r) ? (t.push(...we(...r)), t) : (Object.entries(r).forEach(([l, s]) => {
|
|
6
|
+
s && t.push(l);
|
|
6
7
|
}), t) : t, []);
|
|
7
8
|
}
|
|
8
9
|
var u;
|
|
9
10
|
((e) => {
|
|
10
11
|
((t) => {
|
|
11
|
-
function r(
|
|
12
|
-
return `${
|
|
12
|
+
function r(s, n) {
|
|
13
|
+
return `${s}${n.replace("/", "-")}`;
|
|
13
14
|
}
|
|
14
15
|
t.fraction = r;
|
|
15
|
-
function l(
|
|
16
|
-
return [`${
|
|
16
|
+
function l(s) {
|
|
17
|
+
return [`${s} path`, `${s} circle`, `${s} rect`, `${s} line`];
|
|
17
18
|
}
|
|
18
19
|
t.svg = l;
|
|
19
20
|
})(e.ClassName || (e.ClassName = {})), ((t) => {
|
|
20
|
-
function r(b,
|
|
21
|
-
return `${b /
|
|
21
|
+
function r(b, i, f = 4) {
|
|
22
|
+
return `${b / f}rem`;
|
|
22
23
|
}
|
|
23
24
|
t.rem = r;
|
|
24
25
|
function l(b) {
|
|
25
26
|
return `${b}px`;
|
|
26
27
|
}
|
|
27
28
|
t.px = l;
|
|
28
|
-
function
|
|
29
|
-
const [
|
|
30
|
-
return `${+
|
|
29
|
+
function s(b, i) {
|
|
30
|
+
const [f, m] = i.split("/");
|
|
31
|
+
return `${+f / +m * 100}%`;
|
|
31
32
|
}
|
|
32
|
-
t.fraction =
|
|
33
|
-
function n(b,
|
|
34
|
-
switch (
|
|
33
|
+
t.fraction = s;
|
|
34
|
+
function n(b, i) {
|
|
35
|
+
switch (i) {
|
|
35
36
|
case "fit":
|
|
36
37
|
return "100%";
|
|
37
38
|
case "fit-screen":
|
|
38
39
|
return b.toLocaleLowerCase().includes("height") ? "100vh" : "100vw";
|
|
39
40
|
default:
|
|
40
|
-
return
|
|
41
|
+
return i;
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
t.widthHeight = n;
|
|
44
45
|
function d(b) {
|
|
45
|
-
return (
|
|
46
|
+
return (i, f) => `var(--${b}${f});`;
|
|
46
47
|
}
|
|
47
48
|
t.variables = d;
|
|
48
|
-
function
|
|
49
|
-
return (
|
|
49
|
+
function a(b) {
|
|
50
|
+
return (i, f) => `var(--${b}${f});`;
|
|
50
51
|
}
|
|
51
|
-
t.svgVariables =
|
|
52
|
-
function
|
|
53
|
-
return `repeat(${
|
|
52
|
+
t.svgVariables = a;
|
|
53
|
+
function c(b, i) {
|
|
54
|
+
return `repeat(${i},minmax(0,1fr))`;
|
|
54
55
|
}
|
|
55
|
-
t.gridColumns =
|
|
56
|
-
function y(b,
|
|
57
|
-
return
|
|
56
|
+
t.gridColumns = c;
|
|
57
|
+
function y(b, i) {
|
|
58
|
+
return i === "full-row" ? "1/-1" : `span ${i}/span ${i}`;
|
|
58
59
|
}
|
|
59
60
|
t.gridColumn = y;
|
|
60
|
-
function
|
|
61
|
-
return `${
|
|
61
|
+
function o(b, i) {
|
|
62
|
+
return `${i}ms`;
|
|
62
63
|
}
|
|
63
|
-
t.ms =
|
|
64
|
-
function v(b,
|
|
65
|
-
return `${
|
|
64
|
+
t.ms = o;
|
|
65
|
+
function v(b, i) {
|
|
66
|
+
return `${i}deg`;
|
|
66
67
|
}
|
|
67
68
|
t.rotate = v;
|
|
68
|
-
function g(b,
|
|
69
|
-
return
|
|
69
|
+
function g(b, i) {
|
|
70
|
+
return i === "xAxis" ? "-1 1" : "1 -1";
|
|
70
71
|
}
|
|
71
72
|
t.flip = g;
|
|
72
73
|
})(e.Value || (e.Value = {}));
|
|
73
74
|
})(u || (u = {}));
|
|
74
|
-
var
|
|
75
|
+
var K;
|
|
75
76
|
((e) => {
|
|
76
77
|
e.colors = {
|
|
77
78
|
currentColor: "currentColor",
|
|
@@ -337,20 +338,20 @@ var M;
|
|
|
337
338
|
"large-shadow": "rgba(17, 17, 26, 0.1) 0px 4px 16px, rgba(17, 17, 26, 0.05) 0px 8px 32px"
|
|
338
339
|
}, r = {};
|
|
339
340
|
let l = {};
|
|
340
|
-
function
|
|
341
|
-
return
|
|
341
|
+
function s(a) {
|
|
342
|
+
return a in l ? r[a] = l[a] : a in t ? r[a] = t[a] : a in e.colors ? r[a] = e.colors[a] : r[a] = a, `var(--${a})`;
|
|
342
343
|
}
|
|
343
|
-
e.getVariableValue =
|
|
344
|
+
e.getVariableValue = s;
|
|
344
345
|
function n() {
|
|
345
|
-
return Object.entries(r).map(([
|
|
346
|
+
return Object.entries(r).map(([a, c]) => `--${a}: ${c};`).join("");
|
|
346
347
|
}
|
|
347
348
|
e.generateVariables = n;
|
|
348
|
-
function d(
|
|
349
|
-
l =
|
|
349
|
+
function d(a) {
|
|
350
|
+
l = a;
|
|
350
351
|
}
|
|
351
352
|
e.setUserVariables = d;
|
|
352
|
-
})(
|
|
353
|
-
const N =
|
|
353
|
+
})(K || (K = {}));
|
|
354
|
+
const N = K, j = {
|
|
354
355
|
/** The appearance CSS property is used to display UI elements with platform-specific styling, based on the operating system's theme. */
|
|
355
356
|
appearance: [
|
|
356
357
|
{
|
|
@@ -1531,7 +1532,7 @@ const N = M, E = {
|
|
|
1531
1532
|
styleName: "transform"
|
|
1532
1533
|
}
|
|
1533
1534
|
]
|
|
1534
|
-
},
|
|
1535
|
+
}, ce = {
|
|
1535
1536
|
hover: ":hover",
|
|
1536
1537
|
focus: ":focus-within",
|
|
1537
1538
|
hasFocus: ":has(:focus)",
|
|
@@ -1544,29 +1545,32 @@ const N = M, E = {
|
|
|
1544
1545
|
hasChecked: ":has(:checked)",
|
|
1545
1546
|
hasRequired: ":has(:required)",
|
|
1546
1547
|
hasDisabled: ":has([disabled])"
|
|
1547
|
-
},
|
|
1548
|
+
}, H = {
|
|
1548
1549
|
indeterminate: ":indeterminate",
|
|
1549
1550
|
checked: ":checked",
|
|
1550
1551
|
required: ":required",
|
|
1551
1552
|
disabled: "[disabled]",
|
|
1552
1553
|
selected: '[aria-selected="true"]'
|
|
1553
|
-
},
|
|
1554
|
+
}, xe = {
|
|
1555
|
+
theme: ""
|
|
1556
|
+
}, Z = { ...ce, ...H, ...xe }, de = Object.entries(Z).reduce(
|
|
1554
1557
|
(e, [t], r) => (e[t] = Math.pow(2, r), e),
|
|
1555
1558
|
{}
|
|
1556
|
-
),
|
|
1559
|
+
), D = Object.entries(Z).reduce(
|
|
1557
1560
|
(e, [t]) => {
|
|
1558
1561
|
const r = de[t];
|
|
1559
|
-
return Object.entries(e).forEach(([l,
|
|
1560
|
-
e[+l + r] = [...
|
|
1562
|
+
return Object.entries(e).forEach(([l, s]) => {
|
|
1563
|
+
e[+l + r] = [...s, t];
|
|
1561
1564
|
}), e;
|
|
1562
1565
|
},
|
|
1563
1566
|
{ 0: [] }
|
|
1564
|
-
),
|
|
1567
|
+
), oe = {
|
|
1565
1568
|
hoverGroup: "hover",
|
|
1566
1569
|
focusGroup: "focus",
|
|
1567
1570
|
activeGroup: "active",
|
|
1568
|
-
disabledGroup: "disabled"
|
|
1569
|
-
|
|
1571
|
+
disabledGroup: "disabled",
|
|
1572
|
+
theme: "theme"
|
|
1573
|
+
}, B = {
|
|
1570
1574
|
/** Styles applied for small screens and larger. >= 640 */
|
|
1571
1575
|
sm: 640,
|
|
1572
1576
|
/** Styles applied for medium screens and larger. >= 768 */
|
|
@@ -1578,15 +1582,15 @@ const N = M, E = {
|
|
|
1578
1582
|
/** Styles applied for 2x extra-large screens and larger. >= 1536 */
|
|
1579
1583
|
xxl: 1536
|
|
1580
1584
|
};
|
|
1581
|
-
var
|
|
1585
|
+
var W;
|
|
1582
1586
|
((e) => {
|
|
1583
|
-
function t(n, d,
|
|
1584
|
-
const
|
|
1585
|
-
return d.forEach((
|
|
1586
|
-
|
|
1587
|
-
}),
|
|
1588
|
-
y[
|
|
1589
|
-
}),
|
|
1587
|
+
function t(n, d, a) {
|
|
1588
|
+
const c = { ...n }, y = c.props || {};
|
|
1589
|
+
return d.forEach((o) => {
|
|
1590
|
+
o in c && (y[o] = c[o], delete c[o]);
|
|
1591
|
+
}), a && Object.entries(a).forEach(([o, v]) => {
|
|
1592
|
+
y[o] = v;
|
|
1593
|
+
}), c.props = y, c;
|
|
1590
1594
|
}
|
|
1591
1595
|
e.buildProps = t;
|
|
1592
1596
|
function r(n) {
|
|
@@ -1594,19 +1598,19 @@ var X;
|
|
|
1594
1598
|
}
|
|
1595
1599
|
e.isObject = r;
|
|
1596
1600
|
function l(...n) {
|
|
1597
|
-
return n.reduce((d,
|
|
1598
|
-
const y = d[
|
|
1599
|
-
|
|
1601
|
+
return n.reduce((d, a) => (Object.keys(a ?? {}).forEach((c) => {
|
|
1602
|
+
const y = d[c], o = a[c];
|
|
1603
|
+
r(o) && "clean" in o && o.clean ? d[c] = o : c in H && typeof o == "boolean" || (c in H && Array.isArray(o) ? d[c] = l(y, o[1] ?? {}) : Array.isArray(y) && Array.isArray(o) ? d[c] = y.concat(...o) : r(y) && r(o) ? d[c] = l(y, o) : d[c] = o);
|
|
1600
1604
|
}), d), {});
|
|
1601
1605
|
}
|
|
1602
1606
|
e.mergeDeep = l;
|
|
1603
|
-
function
|
|
1607
|
+
function s(n, d) {
|
|
1604
1608
|
return n in d;
|
|
1605
1609
|
}
|
|
1606
|
-
e.isKeyOf =
|
|
1607
|
-
})(
|
|
1608
|
-
const
|
|
1609
|
-
class
|
|
1610
|
+
e.isKeyOf = s;
|
|
1611
|
+
})(W || (W = {}));
|
|
1612
|
+
const $ = W;
|
|
1613
|
+
class Ne {
|
|
1610
1614
|
constructor() {
|
|
1611
1615
|
this._index = 0, this._cache = {};
|
|
1612
1616
|
}
|
|
@@ -1614,17 +1618,17 @@ class pe {
|
|
|
1614
1618
|
return this._cache[t] || (this._cache[t] = this.getByIndex(this._index++)), this._cache[t];
|
|
1615
1619
|
}
|
|
1616
1620
|
getByIndex(t) {
|
|
1617
|
-
const { first: r, next: l } =
|
|
1618
|
-
if (
|
|
1621
|
+
const { first: r, next: l } = Fe, s = t - r.length;
|
|
1622
|
+
if (s < 0)
|
|
1619
1623
|
return r[t];
|
|
1620
|
-
const n = Math.floor(
|
|
1624
|
+
const n = Math.floor(s / l.length), d = s - n * l.length;
|
|
1621
1625
|
return this.getByIndex(n) + l[d];
|
|
1622
1626
|
}
|
|
1623
1627
|
}
|
|
1624
|
-
const
|
|
1628
|
+
const Fe = {
|
|
1625
1629
|
first: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
1626
1630
|
next: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
|
1627
|
-
},
|
|
1631
|
+
}, ae = {
|
|
1628
1632
|
button: {
|
|
1629
1633
|
styles: {
|
|
1630
1634
|
display: "inline-flex",
|
|
@@ -1647,6 +1651,10 @@ const we = {
|
|
|
1647
1651
|
color: "gray-400",
|
|
1648
1652
|
borderColor: "gray-300"
|
|
1649
1653
|
}
|
|
1654
|
+
},
|
|
1655
|
+
variants: {
|
|
1656
|
+
test: {},
|
|
1657
|
+
test2: {}
|
|
1650
1658
|
}
|
|
1651
1659
|
},
|
|
1652
1660
|
textbox: {
|
|
@@ -1847,7 +1855,7 @@ const we = {
|
|
|
1847
1855
|
}
|
|
1848
1856
|
}
|
|
1849
1857
|
},
|
|
1850
|
-
|
|
1858
|
+
variants: {
|
|
1851
1859
|
multiple: {
|
|
1852
1860
|
selected: {
|
|
1853
1861
|
cursor: "pointer"
|
|
@@ -1909,252 +1917,251 @@ const we = {
|
|
|
1909
1917
|
}
|
|
1910
1918
|
}
|
|
1911
1919
|
}
|
|
1920
|
+
},
|
|
1921
|
+
label: { styles: {} },
|
|
1922
|
+
datagrid: { styles: {} }
|
|
1923
|
+
};
|
|
1924
|
+
var q;
|
|
1925
|
+
((e) => {
|
|
1926
|
+
function t(l, s, n) {
|
|
1927
|
+
return N.setUserVariables(l), Object.entries(s).forEach(([d, a]) => {
|
|
1928
|
+
j[d] = a;
|
|
1929
|
+
}), Object.entries(n).forEach(([d, a]) => {
|
|
1930
|
+
const c = j[d];
|
|
1931
|
+
j[d] = c ? [...a, ...c] : a;
|
|
1932
|
+
}), { extendedProps: s, extendedPropTypes: n };
|
|
1912
1933
|
}
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1934
|
+
e.extend = t, e.componentsStyles = ae;
|
|
1935
|
+
function r(l) {
|
|
1936
|
+
return e.componentsStyles = $.mergeDeep(ae, l), l;
|
|
1937
|
+
}
|
|
1938
|
+
e.components = r;
|
|
1939
|
+
})(q || (q = {}));
|
|
1940
|
+
const Ce = q;
|
|
1941
|
+
function $e(e) {
|
|
1942
|
+
const { clean: t, component: r, variant: l } = e;
|
|
1943
|
+
return Q(() => {
|
|
1944
|
+
var a;
|
|
1919
1945
|
if (t) return;
|
|
1920
|
-
const
|
|
1921
|
-
if (!
|
|
1922
|
-
const
|
|
1946
|
+
const s = r == null ? void 0 : r.split(".");
|
|
1947
|
+
if (!s) return;
|
|
1948
|
+
const n = s.reduce((c, y, o) => {
|
|
1923
1949
|
var v;
|
|
1924
|
-
return
|
|
1950
|
+
return o === 0 ? Ce.componentsStyles[y] : (v = c == null ? void 0 : c.children) == null ? void 0 : v[y];
|
|
1925
1951
|
}, void 0);
|
|
1926
|
-
if (
|
|
1927
|
-
|
|
1928
|
-
|
|
1952
|
+
if (!n) return;
|
|
1953
|
+
const d = (a = n.variants) == null ? void 0 : a[l];
|
|
1954
|
+
return d ? $.mergeDeep(n.styles, d) : n.styles;
|
|
1955
|
+
}, [t, r, l]);
|
|
1929
1956
|
}
|
|
1930
|
-
const
|
|
1931
|
-
var
|
|
1932
|
-
const
|
|
1933
|
-
function
|
|
1934
|
-
|
|
1935
|
-
const r =
|
|
1936
|
-
return
|
|
1937
|
-
const l = [t ?
|
|
1938
|
-
return S.addClassNames(
|
|
1957
|
+
const Ve = new Ne(), ze = typeof window < "u" && typeof window.document < "u";
|
|
1958
|
+
var se;
|
|
1959
|
+
const fe = typeof process == "object" && ((se = process.env) == null ? void 0 : se.NODE_ENV) === "test", je = ze && !fe ? ie : ne, me = "_b", O = "_s";
|
|
1960
|
+
function Te(e, t) {
|
|
1961
|
+
je(S.flush, [e]);
|
|
1962
|
+
const r = $e(e);
|
|
1963
|
+
return Q(() => {
|
|
1964
|
+
const l = [t ? O : me], s = r ? $.mergeDeep(r, e) : e;
|
|
1965
|
+
return S.addClassNames(s, l, []), l;
|
|
1939
1966
|
}, [e, t, r]);
|
|
1940
1967
|
}
|
|
1941
1968
|
var S;
|
|
1942
1969
|
((e) => {
|
|
1943
1970
|
let t = !0, r = {};
|
|
1944
|
-
function l(
|
|
1945
|
-
Object.entries(
|
|
1946
|
-
if (
|
|
1947
|
-
d(
|
|
1948
|
-
else if (
|
|
1949
|
-
l(m, v, [...g,
|
|
1950
|
-
else if (
|
|
1971
|
+
function l(o, v, g, b, i) {
|
|
1972
|
+
Object.entries(o).forEach(([f, m]) => {
|
|
1973
|
+
if ($.isKeyOf(f, j))
|
|
1974
|
+
d(f, m, v, g, b, i);
|
|
1975
|
+
else if ($.isKeyOf(f, ce))
|
|
1976
|
+
l(m, v, [...g, f], b, i);
|
|
1977
|
+
else if ($.isKeyOf(f, H)) {
|
|
1951
1978
|
if (Array.isArray(m)) {
|
|
1952
1979
|
const [w, x] = m;
|
|
1953
|
-
l(x, v, [...g,
|
|
1980
|
+
l(x, v, [...g, f], b, i);
|
|
1954
1981
|
}
|
|
1955
|
-
|
|
1956
|
-
} else
|
|
1957
|
-
l(x, v, [...g,
|
|
1958
|
-
})
|
|
1982
|
+
$.isObject(m) && l(m, v, [...g, f], b, i);
|
|
1983
|
+
} else $.isKeyOf(f, B) ? l(m, v, g, f, i) : $.isKeyOf(f, oe) && Object.entries(m).forEach(([w, x]) => {
|
|
1984
|
+
l(x, v, [...g, oe[f]], b, w);
|
|
1985
|
+
});
|
|
1959
1986
|
});
|
|
1960
1987
|
}
|
|
1961
1988
|
e.addClassNames = l;
|
|
1962
|
-
function
|
|
1989
|
+
function s() {
|
|
1963
1990
|
if (!t) return;
|
|
1964
1991
|
console.debug("\x1B[36m%s\x1B[0m", "[react-box]: flush");
|
|
1965
|
-
const
|
|
1992
|
+
const o = Object.entries(j).reduce((f, [m], w) => (f[m] = w, f), {}), 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;}
|
|
1966
1993
|
html{font-size: 16px;font-family: Arial, sans-serif;}
|
|
1967
1994
|
body{margin: 0;line-height: var(--lineHeight);font-size: var(--fontSize);}
|
|
1968
1995
|
a,ul{all: unset;}
|
|
1969
|
-
.${
|
|
1970
|
-
.${
|
|
1996
|
+
.${me}{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;}
|
|
1997
|
+
.${O}{display: block;border: 0 solid var(--borderColor);outline: 0px solid var(--outlineColor);margin: 0;padding: 0;transition: all var(--svgTransitionTime);}.${O} path,.${O} circle,.${O} rect,.${O} line {transition: all var(--svgTransitionTime);}
|
|
1971
1998
|
`, g = Object.entries(r);
|
|
1972
1999
|
g.sort(
|
|
1973
|
-
([
|
|
2000
|
+
([f], [m]) => (B[f] ?? 0) - (B[m] ?? 0)
|
|
1974
2001
|
);
|
|
1975
2002
|
const b = g.reduce(
|
|
1976
|
-
(
|
|
1977
|
-
const { __parents:
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
var
|
|
1981
|
-
const h =
|
|
2003
|
+
(f, [m, w]) => (m !== "normal" && f.push(`@media(min-width: ${B[m]}px){`), Object.entries(w).forEach(([x, L]) => {
|
|
2004
|
+
const { __parents: P, ...ve } = L, ee = Object.entries(ve);
|
|
2005
|
+
ee.sort(([F], [A]) => o[F] - o[A]), ee.forEach(([F, A]) => {
|
|
2006
|
+
A.forEach((V) => {
|
|
2007
|
+
var T, I;
|
|
2008
|
+
const h = j[F].find((C) => Array.isArray(C.values) ? C.values.includes(V) : typeof V == typeof C.values);
|
|
1982
2009
|
if (!h) return;
|
|
1983
|
-
const z =
|
|
1984
|
-
|
|
2010
|
+
const z = a(F, V, +x, m), U = D[+x].map((C) => Z[C]).join(""), p = ((T = h.selector) == null ? void 0 : T.call(h, `.${z}`, U)) ?? `.${z}${U}`, R = Array.isArray(h.styleName) ? h.styleName : [h.styleName ?? F], k = ((I = h.valueFormat) == null ? void 0 : I.call(h, V, N.getVariableValue)) ?? V;
|
|
2011
|
+
f.push(`${p}{${R.map((C) => `${C}:${k}`).join(";")}}`);
|
|
1985
2012
|
});
|
|
1986
|
-
}),
|
|
1987
|
-
const V = Object.entries(
|
|
1988
|
-
V.sort(([
|
|
2013
|
+
}), P && Object.entries(P).forEach(([F, A]) => {
|
|
2014
|
+
const V = Object.entries(A);
|
|
2015
|
+
V.sort(([E], [h]) => o[E] - o[h]), V.forEach(([E, h]) => {
|
|
1989
2016
|
h.forEach((z) => {
|
|
1990
|
-
var
|
|
1991
|
-
const p = E
|
|
2017
|
+
var te, re;
|
|
2018
|
+
const p = j[E].find((_) => Array.isArray(_.values) ? _.values.includes(z) : typeof z == typeof _.values);
|
|
1992
2019
|
if (!p) return;
|
|
1993
|
-
const
|
|
1994
|
-
|
|
2020
|
+
const R = a(E, z, +x, m, F), [k] = D[+x], T = k === "theme" ? `.${F} .${R}` : `.${F}:${k} .${R}`, I = ((te = p.selector) == null ? void 0 : te.call(p, T, "")) ?? T, C = Array.isArray(p.styleName) ? p.styleName : [p.styleName ?? E], be = ((re = p.valueFormat) == null ? void 0 : re.call(p, z, N.getVariableValue)) ?? z;
|
|
2021
|
+
f.push(`${I}{${C.map((_) => `${_}:${be}`).join(";")}}`);
|
|
1995
2022
|
});
|
|
1996
2023
|
});
|
|
1997
2024
|
});
|
|
1998
|
-
}), m !== "normal" &&
|
|
2025
|
+
}), m !== "normal" && f.push("}"), f),
|
|
1999
2026
|
[v]
|
|
2000
2027
|
);
|
|
2001
2028
|
b.unshift(`:root{${N.generateVariables()}}`);
|
|
2002
|
-
const
|
|
2003
|
-
|
|
2029
|
+
const i = y();
|
|
2030
|
+
i.innerHTML = b.join(""), t = !1;
|
|
2004
2031
|
}
|
|
2005
|
-
e.flush =
|
|
2032
|
+
e.flush = s;
|
|
2006
2033
|
function n() {
|
|
2007
2034
|
r = {};
|
|
2008
2035
|
}
|
|
2009
2036
|
e.clear = n;
|
|
2010
|
-
function d(
|
|
2037
|
+
function d(o, v, g, b, i = "normal", f) {
|
|
2011
2038
|
if (v == null) return;
|
|
2012
|
-
const m = b.reduce((x,
|
|
2013
|
-
r[
|
|
2014
|
-
const w = o
|
|
2039
|
+
const m = b.reduce((x, L) => x + de[L], 0);
|
|
2040
|
+
r[i] ? r[i][m] ? r[i][m][o] || (r[i][m][o] = /* @__PURE__ */ new Set()) : r[i][m] = { [o]: /* @__PURE__ */ new Set() } : r[i] = { [m]: { [o]: /* @__PURE__ */ new Set() } }, f ? (r[i][m].__parents ? r[i][m].__parents[f] ? r[i][m].__parents[f][o] || (r[i][m].__parents[f][o] = /* @__PURE__ */ new Set()) : r[i][m].__parents[f] = { [o]: /* @__PURE__ */ new Set() } : r[i][m].__parents = { [f]: { [o]: /* @__PURE__ */ new Set() } }, r[i][m].__parents[f][o].has(v) || (r[i][m].__parents[f][o].add(v), t = !0)) : r[i][m][o].has(v) || (r[i][m][o].add(v), t = !0);
|
|
2041
|
+
const w = a(o, v, m, i, f);
|
|
2015
2042
|
g.push(w);
|
|
2016
2043
|
}
|
|
2017
|
-
function o
|
|
2018
|
-
const
|
|
2019
|
-
return
|
|
2044
|
+
function a(o, v, g, b, i) {
|
|
2045
|
+
const f = D[g], m = `${b === "normal" ? "" : `${b}-`}${f.map((w) => `${w}-`).join("")}${i ? `${i}-` : ""}${o}-${v}`;
|
|
2046
|
+
return fe ? m : Ve.getIdentity(m);
|
|
2020
2047
|
}
|
|
2021
|
-
const
|
|
2048
|
+
const c = "crono-styles";
|
|
2022
2049
|
function y() {
|
|
2023
|
-
let
|
|
2024
|
-
return
|
|
2050
|
+
let o = document.getElementById(c);
|
|
2051
|
+
return o || (o = document.createElement("style"), o.setAttribute("id", c), o.setAttribute("type", "text/css"), document.head.insertBefore(o, document.head.firstChild)), o;
|
|
2025
2052
|
}
|
|
2026
2053
|
})(S || (S = {}));
|
|
2027
|
-
var
|
|
2054
|
+
var le;
|
|
2028
2055
|
((e) => {
|
|
2029
2056
|
e.flush = S.flush, e.clear = S.clear;
|
|
2030
|
-
})(
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
})(Y || (Y = {}));
|
|
2043
|
-
const je = Y;
|
|
2044
|
-
function G(e) {
|
|
2045
|
-
const { children: t, theme: r } = e, [l, i] = ne(r), n = L(() => {
|
|
2046
|
-
var a;
|
|
2047
|
-
const d = (a = G.userThemes) == null ? void 0 : a[l];
|
|
2048
|
-
if (!d) return R;
|
|
2049
|
-
const { components: o, ...f } = d, y = o ?? {};
|
|
2050
|
-
return Object.entries(f).forEach(([v, g]) => {
|
|
2051
|
-
y[v] = g;
|
|
2052
|
-
}), Object.keys(y).forEach((v) => {
|
|
2053
|
-
y[v].clean && v in R && delete R[v];
|
|
2054
|
-
}), C.mergeDeep(R, y);
|
|
2055
|
-
}, [l]);
|
|
2056
|
-
return /* @__PURE__ */ ge(P.Provider, { value: { themeStyles: n, theme: l, setTheme: i }, children: t });
|
|
2057
|
+
})(le || (le = {}));
|
|
2058
|
+
const M = ye.createContext({ theme: "", setTheme: () => {
|
|
2059
|
+
} });
|
|
2060
|
+
function X(e) {
|
|
2061
|
+
const { children: t, theme: r, use: l = "local" } = e, [s, n] = ue(r);
|
|
2062
|
+
return ie(() => {
|
|
2063
|
+
if (l === "local") return;
|
|
2064
|
+
const d = document.documentElement;
|
|
2065
|
+
return d.classList.add(s), () => {
|
|
2066
|
+
d.classList.remove(s);
|
|
2067
|
+
};
|
|
2068
|
+
}, [s]), l === "local" ? /* @__PURE__ */ G(M.Provider, { value: { theme: s, setTheme: n }, children: /* @__PURE__ */ G(pe, { className: s, children: t }) }) : /* @__PURE__ */ G(M.Provider, { value: { theme: s, setTheme: n }, children: t });
|
|
2057
2069
|
}
|
|
2058
2070
|
((e) => {
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
}
|
|
2063
|
-
e.setup = t;
|
|
2064
|
-
function r() {
|
|
2065
|
-
const { theme: l, setTheme: i } = se(P);
|
|
2066
|
-
return [l, i];
|
|
2071
|
+
function t() {
|
|
2072
|
+
const { theme: r, setTheme: l } = ge(M);
|
|
2073
|
+
return [r, l];
|
|
2067
2074
|
}
|
|
2068
|
-
e.useTheme =
|
|
2069
|
-
})(
|
|
2070
|
-
const
|
|
2075
|
+
e.useTheme = t;
|
|
2076
|
+
})(X || (X = {}));
|
|
2077
|
+
const _e = X, Ee = {
|
|
2071
2078
|
selected: "aria-selected"
|
|
2072
2079
|
};
|
|
2073
|
-
var
|
|
2080
|
+
var Y;
|
|
2074
2081
|
((e) => {
|
|
2075
|
-
function t(r, l,
|
|
2076
|
-
r !== void 0 && r != null && (
|
|
2082
|
+
function t(r, l, s) {
|
|
2083
|
+
r !== void 0 && r != null && (s[Ee[l] ?? l] = Array.isArray(r) ? r[0] : r);
|
|
2077
2084
|
}
|
|
2078
2085
|
e.assignBooleanProp = t;
|
|
2079
|
-
})(
|
|
2080
|
-
const
|
|
2086
|
+
})(Y || (Y = {}));
|
|
2087
|
+
const Re = Y;
|
|
2081
2088
|
Array.prototype.removeBy || (Array.prototype.removeBy = function(e) {
|
|
2082
2089
|
return this.filter(e);
|
|
2083
2090
|
});
|
|
2084
|
-
function
|
|
2085
|
-
const [t, r] =
|
|
2086
|
-
return
|
|
2087
|
-
function
|
|
2088
|
-
const
|
|
2089
|
-
(
|
|
2091
|
+
function ke(e = null) {
|
|
2092
|
+
const [t, r] = ue(!1), l = he(null);
|
|
2093
|
+
return ne(() => {
|
|
2094
|
+
function s(d) {
|
|
2095
|
+
const a = e ?? l.current;
|
|
2096
|
+
(a == null ? void 0 : a.contains(d.target)) === !1 && r(!1);
|
|
2090
2097
|
}
|
|
2091
2098
|
function n(d) {
|
|
2092
2099
|
d.key === "Escape" && r(!1);
|
|
2093
2100
|
}
|
|
2094
|
-
return t && (window.addEventListener("click",
|
|
2095
|
-
window.removeEventListener("click",
|
|
2101
|
+
return t && (window.addEventListener("click", s), window.addEventListener("keydown", n)), () => {
|
|
2102
|
+
window.removeEventListener("click", s), window.removeEventListener("keydown", n);
|
|
2096
2103
|
};
|
|
2097
2104
|
}, [e, t]), [t, r, l];
|
|
2098
2105
|
}
|
|
2099
|
-
function
|
|
2100
|
-
return
|
|
2106
|
+
function Ie() {
|
|
2107
|
+
return Q(() => {
|
|
2101
2108
|
const e = "crono-box";
|
|
2102
2109
|
let t = document.getElementById(e);
|
|
2103
2110
|
return t || (t = document.createElement("div"), t.id = e, document.body.appendChild(t)), t;
|
|
2104
2111
|
}, []);
|
|
2105
2112
|
}
|
|
2106
|
-
var
|
|
2113
|
+
var J;
|
|
2107
2114
|
((e) => {
|
|
2108
2115
|
function t(l) {
|
|
2109
|
-
const
|
|
2116
|
+
const s = Array.from(l.elements).reduce(
|
|
2110
2117
|
(n, d) => {
|
|
2111
|
-
const
|
|
2112
|
-
return
|
|
2118
|
+
const a = d.name;
|
|
2119
|
+
return a && (n[a] || (n[a] = []), n[a].push(d)), n;
|
|
2113
2120
|
},
|
|
2114
2121
|
{}
|
|
2115
2122
|
);
|
|
2116
|
-
return Object.entries(
|
|
2117
|
-
if (
|
|
2118
|
-
const
|
|
2119
|
-
r(n, d,
|
|
2123
|
+
return Object.entries(s).reduce((n, [d, a]) => {
|
|
2124
|
+
if (a.length === 1) {
|
|
2125
|
+
const c = a[0];
|
|
2126
|
+
r(n, d, c.type === "checkbox" || c.type === "radio" ? c.checked : c.value);
|
|
2120
2127
|
} else {
|
|
2121
|
-
const
|
|
2122
|
-
r(n, d,
|
|
2128
|
+
const c = a.reduce((y, o) => (o.type === "checkbox" || o.type === "radio" ? o.checked && y.push(o.value) : y.push(o.value), y), []);
|
|
2129
|
+
r(n, d, c);
|
|
2123
2130
|
}
|
|
2124
2131
|
return n;
|
|
2125
2132
|
}, {});
|
|
2126
2133
|
}
|
|
2127
2134
|
e.getFormEntries = t;
|
|
2128
|
-
function r(l,
|
|
2129
|
-
if (
|
|
2130
|
-
const d =
|
|
2131
|
-
let
|
|
2132
|
-
d.forEach((
|
|
2135
|
+
function r(l, s, n) {
|
|
2136
|
+
if (s.includes(".")) {
|
|
2137
|
+
const d = s.split(".");
|
|
2138
|
+
let a = l;
|
|
2139
|
+
d.forEach((c, y) => {
|
|
2133
2140
|
if (d.length > y + 1) {
|
|
2134
|
-
const
|
|
2135
|
-
if (
|
|
2136
|
-
const [, v, g] =
|
|
2137
|
-
|
|
2141
|
+
const o = c.match(/^(.+)\[(\d)\]$/);
|
|
2142
|
+
if (o) {
|
|
2143
|
+
const [, v, g] = o;
|
|
2144
|
+
a[v] = a[v] || [], a[v][g] = a[v][g] || {}, a = a[v][g];
|
|
2138
2145
|
} else
|
|
2139
|
-
|
|
2146
|
+
a[c] = a[c] || {}, a = a[c];
|
|
2140
2147
|
} else
|
|
2141
|
-
|
|
2148
|
+
a[c] = n;
|
|
2142
2149
|
});
|
|
2143
2150
|
} else
|
|
2144
|
-
l[
|
|
2151
|
+
l[s] = n;
|
|
2145
2152
|
}
|
|
2146
|
-
})(
|
|
2147
|
-
const
|
|
2153
|
+
})(J || (J = {}));
|
|
2154
|
+
const Be = J;
|
|
2148
2155
|
export {
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2156
|
+
Ce as B,
|
|
2157
|
+
Be as F,
|
|
2158
|
+
$ as O,
|
|
2159
|
+
le as S,
|
|
2160
|
+
_e as T,
|
|
2154
2161
|
N as V,
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2162
|
+
Re as a,
|
|
2163
|
+
ke as b,
|
|
2164
|
+
we as c,
|
|
2165
|
+
Ie as d,
|
|
2166
|
+
Te as u
|
|
2160
2167
|
};
|