@cronocode/react-box 3.0.5 → 3.0.7
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/array.d.ts +6 -0
- package/box.cjs +1 -1
- package/box.mjs +13 -13
- package/components/dataGrid.cjs +1 -1
- package/components/dataGrid.mjs +11 -11
- package/components/dropdown.cjs +1 -1
- package/components/dropdown.d.ts +16 -12
- package/components/dropdown.mjs +123 -62
- package/components/tooltip.cjs +1 -1
- package/components/tooltip.d.ts +2 -2
- package/components/tooltip.mjs +16 -14
- package/core/boxStyles.d.ts +12 -2
- package/core/variables.d.ts +1 -2
- package/core.cjs +3 -3
- package/core.mjs +240 -176
- package/package.json +1 -1
package/core.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { useMemo as Q, useLayoutEffect as ce, useEffect as le, useState as fe, useRef as me } from "react";
|
|
2
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,
|
|
4
|
-
|
|
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);
|
|
5
5
|
}), t) : t, []);
|
|
6
6
|
}
|
|
7
7
|
var n;
|
|
8
8
|
((e) => {
|
|
9
9
|
((t) => {
|
|
10
|
-
function r(
|
|
11
|
-
return `${
|
|
10
|
+
function r(u, s) {
|
|
11
|
+
return `${u}${s.replace("/", "-")}`;
|
|
12
12
|
}
|
|
13
13
|
t.fraction = r;
|
|
14
|
-
function l(
|
|
15
|
-
return [`${
|
|
14
|
+
function l(u) {
|
|
15
|
+
return [`${u} path`, `${u} circle`, `${u} rect`, `${u} line`];
|
|
16
16
|
}
|
|
17
17
|
t.svg = l;
|
|
18
18
|
})(e.ClassName || (e.ClassName = {})), ((t) => {
|
|
@@ -24,11 +24,11 @@ var n;
|
|
|
24
24
|
return `${b}px`;
|
|
25
25
|
}
|
|
26
26
|
t.px = l;
|
|
27
|
-
function
|
|
27
|
+
function u(b, i) {
|
|
28
28
|
const [m, c] = i.split("/");
|
|
29
29
|
return `${+m / +c * 100}%`;
|
|
30
30
|
}
|
|
31
|
-
t.fraction =
|
|
31
|
+
t.fraction = u;
|
|
32
32
|
function s(b, i) {
|
|
33
33
|
switch (i) {
|
|
34
34
|
case "fit":
|
|
@@ -40,26 +40,26 @@ var n;
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
t.widthHeight = s;
|
|
43
|
-
function
|
|
43
|
+
function d(b) {
|
|
44
44
|
return (i, m) => `var(--${b}${m});`;
|
|
45
45
|
}
|
|
46
|
-
t.variables =
|
|
47
|
-
function
|
|
46
|
+
t.variables = d;
|
|
47
|
+
function o(b) {
|
|
48
48
|
return (i, m) => `var(--${b}${m});`;
|
|
49
49
|
}
|
|
50
|
-
t.svgVariables =
|
|
51
|
-
function
|
|
50
|
+
t.svgVariables = o;
|
|
51
|
+
function f(b, i) {
|
|
52
52
|
return `repeat(${i},minmax(0,1fr))`;
|
|
53
53
|
}
|
|
54
|
-
t.gridColumns =
|
|
54
|
+
t.gridColumns = f;
|
|
55
55
|
function y(b, i) {
|
|
56
56
|
return i === "full-row" ? "1/-1" : `span ${i}/span ${i}`;
|
|
57
57
|
}
|
|
58
58
|
t.gridColumn = y;
|
|
59
|
-
function
|
|
59
|
+
function a(b, i) {
|
|
60
60
|
return `${i}ms`;
|
|
61
61
|
}
|
|
62
|
-
t.ms =
|
|
62
|
+
t.ms = a;
|
|
63
63
|
function v(b, i) {
|
|
64
64
|
return `${i}deg`;
|
|
65
65
|
}
|
|
@@ -269,7 +269,6 @@ var W;
|
|
|
269
269
|
"indigo-900": "#312e81",
|
|
270
270
|
"indigo-950": "#1e1b4b",
|
|
271
271
|
"violet-50": "#f5f3ff",
|
|
272
|
-
"violet-XX": "#9747FF",
|
|
273
272
|
"violet-100": "#ede9fe",
|
|
274
273
|
"violet-200": "#ddd6fe",
|
|
275
274
|
"violet-300": "#c4b5fd",
|
|
@@ -334,20 +333,20 @@ var W;
|
|
|
334
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>")}")`
|
|
335
334
|
}, r = {};
|
|
336
335
|
let l = {};
|
|
337
|
-
function
|
|
338
|
-
return
|
|
336
|
+
function u(o) {
|
|
337
|
+
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})`;
|
|
339
338
|
}
|
|
340
|
-
e.getVariableValue =
|
|
339
|
+
e.getVariableValue = u;
|
|
341
340
|
function s() {
|
|
342
|
-
return Object.entries(r).map(([
|
|
341
|
+
return Object.entries(r).map(([o, f]) => `--${o}: ${f};`).join("");
|
|
343
342
|
}
|
|
344
343
|
e.generateVariables = s;
|
|
345
|
-
function
|
|
346
|
-
l =
|
|
344
|
+
function d(o) {
|
|
345
|
+
l = o;
|
|
347
346
|
}
|
|
348
|
-
e.setUserVariables =
|
|
347
|
+
e.setUserVariables = d;
|
|
349
348
|
})(W || (W = {}));
|
|
350
|
-
const
|
|
349
|
+
const N = W, E = {
|
|
351
350
|
/** The appearance CSS property is used to display UI elements with platform-specific styling, based on the operating system's theme. */
|
|
352
351
|
appearance: [
|
|
353
352
|
{
|
|
@@ -1470,31 +1469,43 @@ const z = W, E = {
|
|
|
1470
1469
|
],
|
|
1471
1470
|
color: [
|
|
1472
1471
|
{
|
|
1473
|
-
values: Object.keys(
|
|
1472
|
+
values: Object.keys(N.colors),
|
|
1474
1473
|
valueFormat: (e, t) => t(e)
|
|
1475
1474
|
}
|
|
1476
1475
|
],
|
|
1477
1476
|
bgColor: [
|
|
1478
1477
|
{
|
|
1479
|
-
values: Object.keys(
|
|
1478
|
+
values: Object.keys(N.colors),
|
|
1480
1479
|
valueFormat: (e, t) => t(e),
|
|
1481
1480
|
styleName: "background-color"
|
|
1482
1481
|
}
|
|
1483
1482
|
],
|
|
1484
1483
|
borderColor: [
|
|
1485
1484
|
{
|
|
1486
|
-
values: Object.keys(
|
|
1485
|
+
values: Object.keys(N.colors),
|
|
1487
1486
|
valueFormat: (e, t) => t(e),
|
|
1488
1487
|
styleName: "border-color"
|
|
1489
1488
|
}
|
|
1490
1489
|
],
|
|
1491
1490
|
outlineColor: [
|
|
1492
1491
|
{
|
|
1493
|
-
values: Object.keys(
|
|
1492
|
+
values: Object.keys(N.colors),
|
|
1494
1493
|
valueFormat: (e, t) => t(e),
|
|
1495
1494
|
styleName: "outline-color"
|
|
1496
1495
|
}
|
|
1497
1496
|
],
|
|
1497
|
+
fill: [
|
|
1498
|
+
{
|
|
1499
|
+
values: Object.keys(N.colors),
|
|
1500
|
+
valueFormat: (e, t) => t(e)
|
|
1501
|
+
}
|
|
1502
|
+
],
|
|
1503
|
+
stroke: [
|
|
1504
|
+
{
|
|
1505
|
+
values: Object.keys(N.colors),
|
|
1506
|
+
valueFormat: (e, t) => t(e)
|
|
1507
|
+
}
|
|
1508
|
+
],
|
|
1498
1509
|
bgImage: [
|
|
1499
1510
|
{
|
|
1500
1511
|
values: ["none", "bg-img-checked", "bg-img-indeterminate", "bg-img-radio"],
|
|
@@ -1515,19 +1526,20 @@ const z = W, E = {
|
|
|
1515
1526
|
hasChecked: ":has(:checked)",
|
|
1516
1527
|
hasRequired: ":has(:required)",
|
|
1517
1528
|
hasDisabled: ":has([disabled])"
|
|
1518
|
-
},
|
|
1529
|
+
}, U = {
|
|
1519
1530
|
indeterminate: ":indeterminate",
|
|
1520
1531
|
checked: ":checked",
|
|
1521
1532
|
required: ":required",
|
|
1522
|
-
disabled: "[disabled]"
|
|
1523
|
-
|
|
1533
|
+
disabled: "[disabled]",
|
|
1534
|
+
selected: '[aria-selected="true"]'
|
|
1535
|
+
}, Z = { ...se, ...U }, ie = Object.entries(Z).reduce(
|
|
1524
1536
|
(e, [t], r) => (e[t] = Math.pow(2, r), e),
|
|
1525
1537
|
{}
|
|
1526
1538
|
), D = Object.entries(Z).reduce(
|
|
1527
1539
|
(e, [t]) => {
|
|
1528
1540
|
const r = ie[t];
|
|
1529
|
-
return Object.entries(e).forEach(([l,
|
|
1530
|
-
e[+l + r] = [...
|
|
1541
|
+
return Object.entries(e).forEach(([l, u]) => {
|
|
1542
|
+
e[+l + r] = [...u, t];
|
|
1531
1543
|
}), e;
|
|
1532
1544
|
},
|
|
1533
1545
|
{ 0: [] }
|
|
@@ -1545,13 +1557,13 @@ const z = W, E = {
|
|
|
1545
1557
|
};
|
|
1546
1558
|
var q;
|
|
1547
1559
|
((e) => {
|
|
1548
|
-
function t(s,
|
|
1549
|
-
const
|
|
1550
|
-
return
|
|
1551
|
-
|
|
1552
|
-
}),
|
|
1553
|
-
y[
|
|
1554
|
-
}),
|
|
1560
|
+
function t(s, d, o) {
|
|
1561
|
+
const f = { ...s }, y = f.props || {};
|
|
1562
|
+
return d.forEach((a) => {
|
|
1563
|
+
a in f && (y[a] = f[a], delete f[a]);
|
|
1564
|
+
}), o && Object.entries(o).forEach(([a, v]) => {
|
|
1565
|
+
y[a] = v;
|
|
1566
|
+
}), f.props = y, f;
|
|
1555
1567
|
}
|
|
1556
1568
|
e.buildProps = t;
|
|
1557
1569
|
function r(s) {
|
|
@@ -1559,18 +1571,18 @@ var q;
|
|
|
1559
1571
|
}
|
|
1560
1572
|
e.isObject = r;
|
|
1561
1573
|
function l(...s) {
|
|
1562
|
-
return s.reduce((
|
|
1563
|
-
const y = f
|
|
1564
|
-
|
|
1565
|
-
}),
|
|
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);
|
|
1577
|
+
}), d), {});
|
|
1566
1578
|
}
|
|
1567
1579
|
e.mergeDeep = l;
|
|
1568
|
-
function
|
|
1569
|
-
return s in
|
|
1580
|
+
function u(s, d) {
|
|
1581
|
+
return s in d;
|
|
1570
1582
|
}
|
|
1571
|
-
e.isKeyOf =
|
|
1583
|
+
e.isKeyOf = u;
|
|
1572
1584
|
})(q || (q = {}));
|
|
1573
|
-
const
|
|
1585
|
+
const C = q;
|
|
1574
1586
|
class be {
|
|
1575
1587
|
constructor() {
|
|
1576
1588
|
this._index = 0, this._cache = {};
|
|
@@ -1579,150 +1591,150 @@ class be {
|
|
|
1579
1591
|
return this._cache[t] || (this._cache[t] = this.getByIndex(this._index++)), this._cache[t];
|
|
1580
1592
|
}
|
|
1581
1593
|
getByIndex(t) {
|
|
1582
|
-
const { first: r, next: l } = ye,
|
|
1583
|
-
if (
|
|
1594
|
+
const { first: r, next: l } = ye, u = t - r.length;
|
|
1595
|
+
if (u < 0)
|
|
1584
1596
|
return r[t];
|
|
1585
|
-
const s = Math.floor(
|
|
1586
|
-
return this.getByIndex(s) + l[
|
|
1597
|
+
const s = Math.floor(u / l.length), d = u - s * l.length;
|
|
1598
|
+
return this.getByIndex(s) + l[d];
|
|
1587
1599
|
}
|
|
1588
1600
|
}
|
|
1589
1601
|
const ye = {
|
|
1590
1602
|
first: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
1591
1603
|
next: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
|
1592
1604
|
};
|
|
1593
|
-
var
|
|
1605
|
+
var I;
|
|
1594
1606
|
((e) => {
|
|
1595
1607
|
e.components = {};
|
|
1596
|
-
})(
|
|
1608
|
+
})(I || (I = {}));
|
|
1597
1609
|
function ge(e) {
|
|
1598
1610
|
const { clean: t, theme: r, component: l } = e;
|
|
1599
1611
|
return Q(() => {
|
|
1600
|
-
var
|
|
1612
|
+
var d;
|
|
1601
1613
|
if (t) return;
|
|
1602
|
-
const
|
|
1603
|
-
if (!
|
|
1604
|
-
const s =
|
|
1605
|
-
var
|
|
1606
|
-
return y === 0 ? (
|
|
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];
|
|
1607
1619
|
}, void 0);
|
|
1608
1620
|
if (s)
|
|
1609
|
-
return r ?
|
|
1621
|
+
return r ? C.mergeDeep(s.styles, ((d = s.themes) == null ? void 0 : d[r]) ?? {}) : s.styles;
|
|
1610
1622
|
}, [l, t, r]);
|
|
1611
1623
|
}
|
|
1612
1624
|
const he = new be(), pe = typeof window < "u" && typeof window.document < "u";
|
|
1613
|
-
var
|
|
1614
|
-
const ne = typeof process == "object" && ((
|
|
1615
|
-
function
|
|
1616
|
-
we(
|
|
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]);
|
|
1617
1629
|
const r = ge(e);
|
|
1618
1630
|
return Q(() => {
|
|
1619
|
-
const l = [t ?
|
|
1620
|
-
return
|
|
1631
|
+
const l = [t ? A : ue], u = r ? C.mergeDeep(r, e) : e;
|
|
1632
|
+
return S.addClassNames(u, l, []), l;
|
|
1621
1633
|
}, [e, t, r]);
|
|
1622
1634
|
}
|
|
1623
|
-
var
|
|
1635
|
+
var S;
|
|
1624
1636
|
((e) => {
|
|
1625
1637
|
let t = !0, r = {};
|
|
1626
|
-
function l(
|
|
1627
|
-
Object.entries(
|
|
1628
|
-
if (
|
|
1629
|
-
|
|
1630
|
-
else if (
|
|
1638
|
+
function l(a, v, g, b, i) {
|
|
1639
|
+
Object.entries(a).forEach(([m, c]) => {
|
|
1640
|
+
if (C.isKeyOf(m, E))
|
|
1641
|
+
d(m, c, v, g, b, i);
|
|
1642
|
+
else if (C.isKeyOf(m, se))
|
|
1631
1643
|
l(c, v, [...g, m], b, i);
|
|
1632
|
-
else if (
|
|
1644
|
+
else if (C.isKeyOf(m, U)) {
|
|
1633
1645
|
if (Array.isArray(c)) {
|
|
1634
1646
|
const [w, x] = c;
|
|
1635
1647
|
l(x, v, [...g, m], b, i);
|
|
1636
1648
|
}
|
|
1637
|
-
|
|
1638
|
-
} else
|
|
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]) => {
|
|
1639
1651
|
l(x, v, [...g, K[m]], b, w);
|
|
1640
1652
|
}));
|
|
1641
1653
|
});
|
|
1642
1654
|
}
|
|
1643
1655
|
e.addClassNames = l;
|
|
1644
|
-
function
|
|
1656
|
+
function u() {
|
|
1645
1657
|
if (!t) return;
|
|
1646
1658
|
console.debug("\x1B[36m%s\x1B[0m", "[react-box]: flush");
|
|
1647
|
-
const
|
|
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;}
|
|
1648
1660
|
html{font-size: 16px;font-family: Arial, sans-serif;}
|
|
1649
1661
|
body{margin: 0;line-height: var(--lineHeight);font-size: var(--fontSize);}
|
|
1650
1662
|
a,ul{all: unset;}
|
|
1651
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;}
|
|
1652
|
-
.${
|
|
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);}
|
|
1653
1665
|
`, g = Object.entries(r);
|
|
1654
1666
|
g.sort(
|
|
1655
1667
|
([m], [c]) => (H[m] ?? 0) - (H[c] ?? 0)
|
|
1656
1668
|
);
|
|
1657
1669
|
const b = g.reduce(
|
|
1658
|
-
(m, [c, w]) => (c !== "normal" && m.push(`@media(min-width: ${H[c]}px){`), Object.entries(w).forEach(([x,
|
|
1659
|
-
const { __parents: P, ...de } =
|
|
1660
|
-
ee.sort(([
|
|
1661
|
-
_.forEach((
|
|
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) => {
|
|
1662
1674
|
var B, k;
|
|
1663
|
-
const h = E[
|
|
1675
|
+
const h = E[F].find(($) => Array.isArray($.values) ? $.values.includes(V) : typeof V == typeof $.values);
|
|
1664
1676
|
if (!h) return;
|
|
1665
|
-
const
|
|
1666
|
-
m.push(`${p}{${
|
|
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(";")}}`);
|
|
1667
1679
|
});
|
|
1668
|
-
}), P && Object.entries(P).forEach(([
|
|
1669
|
-
const
|
|
1670
|
-
|
|
1671
|
-
h.forEach((
|
|
1680
|
+
}), P && Object.entries(P).forEach(([F, _]) => {
|
|
1681
|
+
const V = Object.entries(_);
|
|
1682
|
+
V.sort(([j], [h]) => a[j] - a[h]), V.forEach(([j, h]) => {
|
|
1683
|
+
h.forEach((z) => {
|
|
1672
1684
|
var te, re;
|
|
1673
|
-
const p = E[j].find((
|
|
1685
|
+
const p = E[j].find((R) => Array.isArray(R.values) ? R.values.includes(z) : typeof z == typeof R.values);
|
|
1674
1686
|
if (!p) return;
|
|
1675
|
-
const
|
|
1676
|
-
m.push(`${B}{${k.map((
|
|
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(";")}}`);
|
|
1677
1689
|
});
|
|
1678
1690
|
});
|
|
1679
1691
|
});
|
|
1680
1692
|
}), c !== "normal" && m.push("}"), m),
|
|
1681
1693
|
[v]
|
|
1682
1694
|
);
|
|
1683
|
-
b.unshift(`:root{${
|
|
1695
|
+
b.unshift(`:root{${N.generateVariables()}}`);
|
|
1684
1696
|
const i = y();
|
|
1685
1697
|
i.innerHTML = b.join(""), t = !1;
|
|
1686
1698
|
}
|
|
1687
|
-
e.flush =
|
|
1699
|
+
e.flush = u;
|
|
1688
1700
|
function s() {
|
|
1689
1701
|
r = {};
|
|
1690
1702
|
}
|
|
1691
1703
|
e.clear = s;
|
|
1692
|
-
function
|
|
1704
|
+
function d(a, v, g, b, i = "normal", m) {
|
|
1693
1705
|
if (v == null) return;
|
|
1694
|
-
const c = b.reduce((x,
|
|
1695
|
-
r[i] ? r[i][c] ? r[i][c][
|
|
1696
|
-
const w = a
|
|
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);
|
|
1697
1709
|
g.push(w);
|
|
1698
1710
|
}
|
|
1699
|
-
function a
|
|
1700
|
-
const m = D[g], c = `${b === "normal" ? "" : `${b}-`}${m.map((w) => `${w}-`).join("")}${i ? `${i}-` : ""}${
|
|
1711
|
+
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}`;
|
|
1701
1713
|
return ne ? c : he.getIdentity(c);
|
|
1702
1714
|
}
|
|
1703
|
-
const
|
|
1715
|
+
const f = "crono-styles";
|
|
1704
1716
|
function y() {
|
|
1705
|
-
let
|
|
1706
|
-
return
|
|
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;
|
|
1707
1719
|
}
|
|
1708
|
-
})(
|
|
1709
|
-
var
|
|
1720
|
+
})(S || (S = {}));
|
|
1721
|
+
var oe;
|
|
1710
1722
|
((e) => {
|
|
1711
|
-
e.flush =
|
|
1712
|
-
})(
|
|
1723
|
+
e.flush = S.flush, e.clear = S.clear;
|
|
1724
|
+
})(oe || (oe = {}));
|
|
1713
1725
|
var M;
|
|
1714
1726
|
((e) => {
|
|
1715
|
-
function t(r, l,
|
|
1716
|
-
return
|
|
1717
|
-
E[s] =
|
|
1718
|
-
}), Object.entries(
|
|
1719
|
-
const
|
|
1720
|
-
E[s] =
|
|
1721
|
-
}), { extendedProps: l, extendedPropTypes:
|
|
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 };
|
|
1722
1734
|
}
|
|
1723
1735
|
e.extend = t;
|
|
1724
1736
|
})(M || (M = {}));
|
|
1725
|
-
const
|
|
1737
|
+
const $e = M;
|
|
1726
1738
|
var X;
|
|
1727
1739
|
((e) => {
|
|
1728
1740
|
const t = {
|
|
@@ -1737,6 +1749,7 @@ var X;
|
|
|
1737
1749
|
b: 1,
|
|
1738
1750
|
borderRadius: 1,
|
|
1739
1751
|
userSelect: "none",
|
|
1752
|
+
lineHeight: 20,
|
|
1740
1753
|
hover: {
|
|
1741
1754
|
bgColor: "violet-600",
|
|
1742
1755
|
borderColor: "violet-600"
|
|
@@ -1759,6 +1772,7 @@ var X;
|
|
|
1759
1772
|
borderRadius: 1,
|
|
1760
1773
|
p: 3,
|
|
1761
1774
|
transition: "none",
|
|
1775
|
+
lineHeight: 20,
|
|
1762
1776
|
hover: {
|
|
1763
1777
|
borderColor: "violet-300"
|
|
1764
1778
|
},
|
|
@@ -1902,6 +1916,9 @@ var X;
|
|
|
1902
1916
|
children: {
|
|
1903
1917
|
items: {
|
|
1904
1918
|
styles: {
|
|
1919
|
+
display: "flex",
|
|
1920
|
+
d: "column",
|
|
1921
|
+
gap: 1,
|
|
1905
1922
|
p: 1,
|
|
1906
1923
|
b: 1,
|
|
1907
1924
|
borderRadius: 1,
|
|
@@ -1915,6 +1932,35 @@ var X;
|
|
|
1915
1932
|
}
|
|
1916
1933
|
},
|
|
1917
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: {
|
|
1918
1964
|
styles: {
|
|
1919
1965
|
display: "flex",
|
|
1920
1966
|
width: "fit",
|
|
@@ -1922,111 +1968,129 @@ var X;
|
|
|
1922
1968
|
cursor: "pointer",
|
|
1923
1969
|
lineHeight: 20,
|
|
1924
1970
|
borderRadius: 1,
|
|
1971
|
+
color: "violet-400",
|
|
1925
1972
|
hover: {
|
|
1926
1973
|
bgColor: "violet-50"
|
|
1927
1974
|
},
|
|
1928
1975
|
focus: {
|
|
1929
1976
|
bgColor: "violet-50"
|
|
1977
|
+
},
|
|
1978
|
+
selected: {
|
|
1979
|
+
bgColor: "violet-50",
|
|
1980
|
+
cursor: "default"
|
|
1930
1981
|
}
|
|
1931
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
|
+
}
|
|
1932
1994
|
}
|
|
1933
1995
|
}
|
|
1934
1996
|
}
|
|
1935
1997
|
};
|
|
1936
1998
|
function r(l) {
|
|
1937
|
-
const { components:
|
|
1938
|
-
Object.entries(s).forEach(([
|
|
1939
|
-
|
|
1940
|
-
}),
|
|
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);
|
|
1941
2003
|
}
|
|
1942
|
-
e.setup = r,
|
|
2004
|
+
e.setup = r, I.components = { ...t };
|
|
1943
2005
|
})(X || (X = {}));
|
|
1944
|
-
const
|
|
2006
|
+
const Ce = X, xe = {
|
|
2007
|
+
selected: "aria-selected"
|
|
2008
|
+
};
|
|
1945
2009
|
var Y;
|
|
1946
2010
|
((e) => {
|
|
1947
|
-
function t(r, l,
|
|
1948
|
-
r !== void 0 && r != null && (
|
|
2011
|
+
function t(r, l, u) {
|
|
2012
|
+
r !== void 0 && r != null && (u[xe[l] ?? l] = Array.isArray(r) ? r[0] : r);
|
|
1949
2013
|
}
|
|
1950
2014
|
e.assignBooleanProp = t;
|
|
1951
2015
|
})(Y || (Y = {}));
|
|
1952
|
-
const
|
|
1953
|
-
|
|
1954
|
-
return
|
|
1955
|
-
|
|
1956
|
-
let t = document.getElementById(e);
|
|
1957
|
-
return t || (t = document.createElement("div"), t.id = e, document.body.appendChild(t)), t;
|
|
1958
|
-
}, []);
|
|
1959
|
-
}
|
|
2016
|
+
const Ve = Y;
|
|
2017
|
+
Array.prototype.removeBy || (Array.prototype.removeBy = function(e) {
|
|
2018
|
+
return this.filter(e);
|
|
2019
|
+
});
|
|
1960
2020
|
function ze(e = null) {
|
|
1961
2021
|
const [t, r] = fe(!1), l = me(null);
|
|
1962
2022
|
return le(() => {
|
|
1963
|
-
function d
|
|
1964
|
-
const
|
|
1965
|
-
(
|
|
1966
|
-
}
|
|
1967
|
-
function s() {
|
|
1968
|
-
r(!1);
|
|
2023
|
+
function u(d) {
|
|
2024
|
+
const o = e ?? l.current;
|
|
2025
|
+
(o == null ? void 0 : o.contains(d.target)) === !1 && r(!1);
|
|
1969
2026
|
}
|
|
1970
|
-
function
|
|
1971
|
-
|
|
2027
|
+
function s(d) {
|
|
2028
|
+
d.key === "Escape" && r(!1);
|
|
1972
2029
|
}
|
|
1973
|
-
return t && (window.addEventListener("mousedown",
|
|
1974
|
-
window.removeEventListener("mousedown",
|
|
2030
|
+
return t && (window.addEventListener("mousedown", u), window.addEventListener("keydown", s)), () => {
|
|
2031
|
+
window.removeEventListener("mousedown", u), window.removeEventListener("keydown", s);
|
|
1975
2032
|
};
|
|
1976
2033
|
}, [e, t]), [t, r, l];
|
|
1977
2034
|
}
|
|
2035
|
+
function Ee() {
|
|
2036
|
+
return Q(() => {
|
|
2037
|
+
const e = "crono-box";
|
|
2038
|
+
let t = document.getElementById(e);
|
|
2039
|
+
return t || (t = document.createElement("div"), t.id = e, document.body.appendChild(t)), t;
|
|
2040
|
+
}, []);
|
|
2041
|
+
}
|
|
1978
2042
|
var J;
|
|
1979
2043
|
((e) => {
|
|
1980
2044
|
function t(l) {
|
|
1981
|
-
const
|
|
1982
|
-
(s,
|
|
1983
|
-
const
|
|
1984
|
-
return
|
|
2045
|
+
const u = Array.from(l.elements).reduce(
|
|
2046
|
+
(s, d) => {
|
|
2047
|
+
const o = d.name;
|
|
2048
|
+
return o && (s[o] || (s[o] = []), s[o].push(d)), s;
|
|
1985
2049
|
},
|
|
1986
2050
|
{}
|
|
1987
2051
|
);
|
|
1988
|
-
return Object.entries(
|
|
1989
|
-
if (
|
|
1990
|
-
const
|
|
1991
|
-
r(s,
|
|
2052
|
+
return Object.entries(u).reduce((s, [d, o]) => {
|
|
2053
|
+
if (o.length === 1) {
|
|
2054
|
+
const f = o[0];
|
|
2055
|
+
r(s, d, f.type === "checkbox" || f.type === "radio" ? f.checked : f.value);
|
|
1992
2056
|
} else {
|
|
1993
|
-
const
|
|
1994
|
-
r(s,
|
|
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);
|
|
1995
2059
|
}
|
|
1996
2060
|
return s;
|
|
1997
2061
|
}, {});
|
|
1998
2062
|
}
|
|
1999
2063
|
e.getFormEntries = t;
|
|
2000
|
-
function r(l,
|
|
2001
|
-
if (
|
|
2002
|
-
const
|
|
2003
|
-
let
|
|
2004
|
-
|
|
2005
|
-
if (
|
|
2006
|
-
const
|
|
2007
|
-
if (
|
|
2008
|
-
const [, v, g] =
|
|
2009
|
-
|
|
2064
|
+
function r(l, u, s) {
|
|
2065
|
+
if (u.includes(".")) {
|
|
2066
|
+
const d = u.split(".");
|
|
2067
|
+
let o = l;
|
|
2068
|
+
d.forEach((f, y) => {
|
|
2069
|
+
if (d.length > y + 1) {
|
|
2070
|
+
const a = f.match(/^(.+)\[(\d)\]$/);
|
|
2071
|
+
if (a) {
|
|
2072
|
+
const [, v, g] = a;
|
|
2073
|
+
o[v] = o[v] || [], o[v][g] = o[v][g] || {}, o = o[v][g];
|
|
2010
2074
|
} else
|
|
2011
|
-
|
|
2075
|
+
o[f] = o[f] || {}, o = o[f];
|
|
2012
2076
|
} else
|
|
2013
|
-
|
|
2077
|
+
o[f] = s;
|
|
2014
2078
|
});
|
|
2015
2079
|
} else
|
|
2016
|
-
l[
|
|
2080
|
+
l[u] = s;
|
|
2017
2081
|
}
|
|
2018
2082
|
})(J || (J = {}));
|
|
2019
|
-
const
|
|
2083
|
+
const je = J;
|
|
2020
2084
|
export {
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2085
|
+
$e as B,
|
|
2086
|
+
je as F,
|
|
2087
|
+
C as O,
|
|
2088
|
+
oe as S,
|
|
2089
|
+
Ce as T,
|
|
2090
|
+
N as V,
|
|
2091
|
+
Ve as a,
|
|
2028
2092
|
ze as b,
|
|
2029
2093
|
ve as c,
|
|
2030
|
-
|
|
2031
|
-
|
|
2094
|
+
Ee as d,
|
|
2095
|
+
Fe as u
|
|
2032
2096
|
};
|