@cronocode/react-box 3.0.6 → 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/components/dataGrid.cjs +1 -1
- package/components/dataGrid.mjs +11 -11
- package/components/dropdown.cjs +1 -1
- package/components/dropdown.d.ts +16 -16
- package/components/dropdown.mjs +123 -89
- package/core/boxStyles.d.ts +8 -0
- package/core.cjs +3 -3
- package/core.mjs +182 -161
- package/package.json +1 -1
package/array.d.ts
ADDED
package/components/dataGrid.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime");require("react");const
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime");require("react");const o=require("../box.cjs"),c=require("./grid.cjs");function g(u){const{data:e,def:d}=u,{rowKey:r,columns:i}=d;return i.length===0?(console.error("Cannot render grid without column definitions"),null):n.jsx(o,{component:"dataGrid",children:n.jsxs(c,{b:1,borderRadius:1,children:[i.map((t,s)=>n.jsx(o,{style:{gridColumn:s+1},children:t.key.toString()},s)),((e==null?void 0:e.length)??0)===0&&n.jsx(o,{children:"Empty table"}),((e==null?void 0:e.length)??0)>0&&n.jsx(n.Fragment,{children:e==null?void 0:e.map((t,s)=>{const m=r?typeof r=="function"?r(t):t[r]:s;return n.jsx(c,{style:{gridTemplateRows:"subgrid"},children:i.map((h,l)=>n.jsxs(o,{style:{gridColumn:l+1},children:["tes ",l]},l))},m)})})]})})}module.exports=g;
|
package/components/dataGrid.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
1
|
+
import { jsx as n, jsxs as c, Fragment as h } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import
|
|
3
|
+
import i from "../box.mjs";
|
|
4
4
|
import s from "./grid.mjs";
|
|
5
|
-
function x(
|
|
6
|
-
const { data: r, def: u } =
|
|
7
|
-
return
|
|
8
|
-
|
|
9
|
-
((r == null ? void 0 : r.length) ?? 0) === 0 && /* @__PURE__ */ n(
|
|
10
|
-
((r == null ? void 0 : r.length) ?? 0) > 0 && /* @__PURE__ */ n(
|
|
11
|
-
const p =
|
|
12
|
-
return /* @__PURE__ */ n(s, { style: { gridTemplateRows: "subgrid" }, children:
|
|
5
|
+
function x(d) {
|
|
6
|
+
const { data: r, def: u } = d, { rowKey: e, columns: l } = u;
|
|
7
|
+
return l.length === 0 ? (console.error("Cannot render grid without column definitions"), null) : /* @__PURE__ */ n(i, { component: "dataGrid", children: /* @__PURE__ */ c(s, { b: 1, borderRadius: 1, children: [
|
|
8
|
+
l.map((o, t) => /* @__PURE__ */ n(i, { style: { gridColumn: t + 1 }, children: o.key.toString() }, t)),
|
|
9
|
+
((r == null ? void 0 : r.length) ?? 0) === 0 && /* @__PURE__ */ n(i, { children: "Empty table" }),
|
|
10
|
+
((r == null ? void 0 : r.length) ?? 0) > 0 && /* @__PURE__ */ n(h, { children: r == null ? void 0 : r.map((o, t) => {
|
|
11
|
+
const p = e ? typeof e == "function" ? e(o) : o[e] : t;
|
|
12
|
+
return /* @__PURE__ */ n(s, { style: { gridTemplateRows: "subgrid" }, children: l.map((f, m) => /* @__PURE__ */ c(i, { style: { gridColumn: m + 1 }, children: [
|
|
13
13
|
"tes ",
|
|
14
14
|
m
|
|
15
|
-
] })) }, p);
|
|
15
|
+
] }, m)) }, p);
|
|
16
16
|
}) })
|
|
17
17
|
] }) });
|
|
18
18
|
}
|
package/components/dropdown.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),n=require("react"),w=require("../box.cjs"),U=require("./textbox.cjs"),C=require("./flex.cjs"),J=require("../core.cjs"),Y=require("./baseSvg.cjs"),k=require("./tooltip.cjs"),W=require("./button.cjs");function $(p,a){const{name:s,defaultValue:y,multiple:l,isSearchable:d,searchPlaceholder:V,children:v,onChange:i,...E}=p,[c,g]=n.useState(Array.isArray(y)?y:y?[y]:[]),[j,P]=n.useState(""),[m,R,D]=J.useVisibility(),M=n.useRef(null),A=n.useRef(null),[_,H]=n.useState(0),I=n.useMemo(()=>_>window.innerHeight/2,[_]),L=n.useMemo(()=>{var e;return I?((e=D.current)==null?void 0:e.getBoundingClientRect().height)??0:0},[I,D]),u=n.useMemo(()=>Array.isArray(v)?v:[v],[v]),f=n.useMemo(()=>u.filter(e=>{var t;return((t=e.type)==null?void 0:t.componentName)!=="DropdownItem"?!1:d&&j?N(e).toLowerCase().includes(j.toLowerCase()):!0}),[d,j,u]),h=n.useMemo(()=>u.find(e=>{var t;return((t=e.type)==null?void 0:t.componentName)==="DropdownUnselectItem"}),[u]),S=n.useMemo(()=>u.find(e=>{var t;return((t=e.type)==null?void 0:t.componentName)==="DropdownEmptyItem"}),[u]),O=n.useMemo(()=>u.find(e=>{var t;return((t=e.type)==null?void 0:t.componentName)==="DropdownDisplay"}),[u]),B=n.useMemo(()=>{if(O)return O.props.children(c);const e=f.filter(o=>c.includes(o.props.value));if(l&&e.length>1)return e.map(o=>N(o)).join(", ");const t=e.at(0);return(t==null?void 0:t.props.children)??(t==null?void 0:t.props.value)??(h==null?void 0:h.props.children)},[l,f,h,c]),T=n.useCallback((e,t)=>{if(!t)g([]),i==null||i(void 0,[]);else if(l){const o=c.filter(q=>q!==t.props.value);o.length===c.length&&o.push(t.props.value),g(o),i==null||i(t.props.value,o)}else g([t.props.value]),i==null||i(t.props.value,[t.props.value]);l?(e.stopPropagation(),setTimeout(()=>{var o;return(o=M.current)==null?void 0:o.focus()},0)):(R(!1),setTimeout(()=>{var o;return(o=D.current)==null?void 0:o.focus()},0))},[l,c,g]);return n.useEffect(()=>{m?setTimeout(()=>{var e,t,o;(e=M.current)==null||e.focus(),(o=(t=A.current)==null?void 0:t.querySelector('[aria-selected="true"]'))==null||o.scrollIntoView({block:"nearest"})},0):P("")},[m]),r.jsxs(w,{width:"fit-content",children:[c.map(e=>r.jsx(U,{ref:a,name:s,type:"hidden",value:JSON.stringify(e)??""},JSON.stringify(e))),r.jsxs(W,{ref:D,component:"dropdown",...E,props:{onMouseDown:()=>R(e=>!e),tabIndex:0},children:[d&&r.jsx(U,{display:m&&d?"block":"none",clean:!0,flex1:!0,width:1,minHeight:5,placeholder:V,value:j,onChange:e=>P(e.target.value),ref:M,props:{onMouseDown:e=>{m&&d&&e.stopPropagation()}}}),r.jsx(C,{display:m&&d?"none":"flex",flex1:!0,minHeight:5,children:B}),r.jsx(w,{children:r.jsx(Y,{viewBox:"0 0 10 6",width:"0.6rem",rotate:m?180:0,children:r.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 1 4 4 4-4"})})})]}),m&&r.jsx(k,{ref:A,top:I?void 0:0,bottom:I?2:void 0,style:{transform:`translateY(-${L}px)`},onPositionChange:e=>H(e.top),children:(f.length>0||S)&&r.jsxs(w,{component:"dropdown.items",children:[h&&f.length>0&&r.jsx(w,{component:"dropdown.unselectItem",selected:c.length===0,...h.props,props:{onMouseDown:e=>T(e)}}),f.map(e=>{const{value:t,...o}=e.props;return r.jsx(w,{component:"dropdown.item",theme:l?"multiple":"single",selected:c.includes(t),...o,props:{onMouseDown:q=>T(q,e)}},t)}),f.length===0&&S&&r.jsx(w,{component:"dropdown.emptyItem",...S.props})]})})]})}function b(p){const a=s=>null;return a.componentName=p,a}const x=n.forwardRef($);x.Item=b("DropdownItem");x.UnselectItem=b("DropdownUnselectItem");x.EmptyItem=b("DropdownEmptyItem");x.Display=b("DropdownDisplay");function N(p){var a;if(p==null)return"";if(typeof p=="object"){const s=(a=p.props)==null?void 0:a.children;return s==null?"":typeof s=="object"?(Array.isArray(s)?s:[s]).map(l=>N(l)).join(""):s.toString()}return p.toString()}module.exports=x;
|
package/components/dropdown.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { Ref } from 'react';
|
|
2
2
|
import { BoxProps } from '../box';
|
|
3
|
-
interface DropdownItemProps<TVal> extends BoxProps {
|
|
4
|
-
value: TVal;
|
|
5
|
-
onClick?: (e: React.MouseEvent) => void;
|
|
6
|
-
}
|
|
7
3
|
interface Props<TVal> extends BoxProps {
|
|
8
4
|
name?: string;
|
|
9
|
-
|
|
5
|
+
defaultValue?: TVal | TVal[];
|
|
6
|
+
multiple?: boolean;
|
|
10
7
|
isSearchable?: boolean;
|
|
11
8
|
searchPlaceholder?: string;
|
|
12
|
-
onChange?: (value: TVal) => void;
|
|
13
|
-
|
|
9
|
+
onChange?: (value: Maybe<TVal>, values: TVal[]) => void;
|
|
10
|
+
}
|
|
11
|
+
interface DropdownItemProps<TVal> extends BoxProps {
|
|
12
|
+
value: TVal;
|
|
13
|
+
}
|
|
14
|
+
interface DropdownDisplayProps<TVal> extends Omit<BoxProps, 'children'> {
|
|
15
|
+
children: (selectedValues: TVal[]) => React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
interface DropdownType {
|
|
18
|
+
<TVal>(props: Props<TVal>, ref: Ref<HTMLInputElement>): React.ReactNode;
|
|
19
|
+
Item: <TVal>(props: DropdownItemProps<TVal>) => React.ReactNode;
|
|
20
|
+
UnselectItem: (props: BoxProps) => React.ReactNode;
|
|
21
|
+
EmptyItem: (props: BoxProps) => React.ReactNode;
|
|
22
|
+
Display: <TVal>(props: DropdownDisplayProps<TVal>) => React.ReactNode;
|
|
14
23
|
}
|
|
15
|
-
declare function DropdownImpl<TVal>(props: Props<TVal>, ref: Ref<HTMLInputElement>): React.ReactNode;
|
|
16
|
-
declare function DropdownItem<TVal>(props: DropdownItemProps<TVal>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
declare function DropdownNullItem<TVal>(props: Omit<DropdownItemProps<TVal>, 'value'>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
declare function DropdownNoItems<TVal>(props: Omit<DropdownItemProps<TVal>, 'value'>): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
type DropdownType = typeof DropdownImpl & {
|
|
20
|
-
Item: typeof DropdownItem;
|
|
21
|
-
NullItem: typeof DropdownNullItem;
|
|
22
|
-
NoItems: typeof DropdownNoItems;
|
|
23
|
-
};
|
|
24
24
|
declare const Dropdown: DropdownType;
|
|
25
25
|
export default Dropdown;
|
package/components/dropdown.mjs
CHANGED
|
@@ -1,106 +1,140 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { b as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
), [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
(o
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
import { jsxs as T, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as F, useState as A, useRef as H, useMemo as a, useCallback as W, useEffect as _ } from "react";
|
|
3
|
+
import w from "../box.mjs";
|
|
4
|
+
import L from "./textbox.mjs";
|
|
5
|
+
import $ from "./flex.mjs";
|
|
6
|
+
import { b as z } from "../core.mjs";
|
|
7
|
+
import G from "./baseSvg.mjs";
|
|
8
|
+
import Q from "./tooltip.mjs";
|
|
9
|
+
import X from "./button.mjs";
|
|
10
|
+
function Z(s, u) {
|
|
11
|
+
const { name: r, defaultValue: y, multiple: l, isSearchable: d, searchPlaceholder: C, children: v, onChange: p, ...J } = s, [i, g] = A(Array.isArray(y) ? y : y ? [y] : []), [D, M] = A(""), [m, O, I] = z(), N = H(null), R = H(null), [U, Y] = A(0), x = a(() => U > window.innerHeight / 2, [U]), k = a(() => {
|
|
12
|
+
var e;
|
|
13
|
+
return x ? ((e = I.current) == null ? void 0 : e.getBoundingClientRect().height) ?? 0 : 0;
|
|
14
|
+
}, [x, I]), c = a(() => Array.isArray(v) ? v : [v], [v]), f = a(() => c.filter((e) => {
|
|
15
|
+
var o;
|
|
16
|
+
return ((o = e.type) == null ? void 0 : o.componentName) !== "DropdownItem" ? !1 : d && D ? B(e).toLowerCase().includes(D.toLowerCase()) : !0;
|
|
17
|
+
}), [d, D, c]), h = a(() => c.find((e) => {
|
|
18
|
+
var o;
|
|
19
|
+
return ((o = e.type) == null ? void 0 : o.componentName) === "DropdownUnselectItem";
|
|
20
|
+
}), [c]), P = a(() => c.find((e) => {
|
|
21
|
+
var o;
|
|
22
|
+
return ((o = e.type) == null ? void 0 : o.componentName) === "DropdownEmptyItem";
|
|
23
|
+
}), [c]), V = a(() => c.find((e) => {
|
|
24
|
+
var o;
|
|
25
|
+
return ((o = e.type) == null ? void 0 : o.componentName) === "DropdownDisplay";
|
|
26
|
+
}), [c]), q = a(() => {
|
|
27
|
+
if (V) return V.props.children(i);
|
|
28
|
+
const e = f.filter((t) => i.includes(t.props.value));
|
|
29
|
+
if (l && e.length > 1)
|
|
30
|
+
return e.map((t) => B(t)).join(", ");
|
|
31
|
+
const o = e.at(0);
|
|
32
|
+
return (o == null ? void 0 : o.props.children) ?? (o == null ? void 0 : o.props.value) ?? (h == null ? void 0 : h.props.children);
|
|
33
|
+
}, [l, f, h, i]), E = W(
|
|
34
|
+
(e, o) => {
|
|
35
|
+
if (!o)
|
|
36
|
+
g([]), p == null || p(void 0, []);
|
|
37
|
+
else if (l) {
|
|
38
|
+
const t = i.filter((j) => j !== o.props.value);
|
|
39
|
+
t.length === i.length && t.push(o.props.value), g(t), p == null || p(o.props.value, t);
|
|
40
|
+
} else
|
|
41
|
+
g([o.props.value]), p == null || p(o.props.value, [o.props.value]);
|
|
42
|
+
l ? (e.stopPropagation(), setTimeout(() => {
|
|
43
|
+
var t;
|
|
44
|
+
return (t = N.current) == null ? void 0 : t.focus();
|
|
45
|
+
}, 0)) : (O(!1), setTimeout(() => {
|
|
46
|
+
var t;
|
|
47
|
+
return (t = I.current) == null ? void 0 : t.focus();
|
|
48
|
+
}, 0));
|
|
49
|
+
},
|
|
50
|
+
[l, i, g]
|
|
51
|
+
);
|
|
52
|
+
return _(() => {
|
|
53
|
+
m ? setTimeout(() => {
|
|
54
|
+
var e, o, t;
|
|
55
|
+
(e = N.current) == null || e.focus(), (t = (o = R.current) == null ? void 0 : o.querySelector('[aria-selected="true"]')) == null || t.scrollIntoView({ block: "nearest" });
|
|
56
|
+
}, 0) : M("");
|
|
57
|
+
}, [m]), /* @__PURE__ */ T(w, { width: "fit-content", children: [
|
|
58
|
+
i.map((e) => /* @__PURE__ */ n(L, { ref: u, name: r, type: "hidden", value: JSON.stringify(e) ?? "" }, JSON.stringify(e))),
|
|
59
|
+
/* @__PURE__ */ T(X, { ref: I, component: "dropdown", ...J, props: { onMouseDown: () => O((e) => !e), tabIndex: 0 }, children: [
|
|
60
|
+
d && /* @__PURE__ */ n(
|
|
61
|
+
L,
|
|
42
62
|
{
|
|
43
|
-
display:
|
|
63
|
+
display: m && d ? "block" : "none",
|
|
44
64
|
clean: !0,
|
|
45
65
|
flex1: !0,
|
|
46
66
|
width: 1,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
67
|
+
minHeight: 5,
|
|
68
|
+
placeholder: C,
|
|
69
|
+
value: D,
|
|
70
|
+
onChange: (e) => M(e.target.value),
|
|
71
|
+
ref: N,
|
|
51
72
|
props: {
|
|
52
|
-
onMouseDown: (
|
|
53
|
-
|
|
73
|
+
onMouseDown: (e) => {
|
|
74
|
+
m && d && e.stopPropagation();
|
|
54
75
|
}
|
|
55
76
|
}
|
|
56
77
|
}
|
|
57
78
|
),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ n($, { display: m && d ? "none" : "flex", flex1: !0, minHeight: 5, children: q }),
|
|
80
|
+
/* @__PURE__ */ n(w, { children: /* @__PURE__ */ n(G, { viewBox: "0 0 10 6", width: "0.6rem", rotate: m ? 180 : 0, children: /* @__PURE__ */ n("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "m1 1 4 4 4-4" }) }) })
|
|
60
81
|
] }),
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
m && /* @__PURE__ */ n(
|
|
83
|
+
Q,
|
|
84
|
+
{
|
|
85
|
+
ref: R,
|
|
86
|
+
top: x ? void 0 : 0,
|
|
87
|
+
bottom: x ? 2 : void 0,
|
|
88
|
+
style: { transform: `translateY(-${k}px)` },
|
|
89
|
+
onPositionChange: (e) => Y(e.top),
|
|
90
|
+
children: (f.length > 0 || P) && /* @__PURE__ */ T(w, { component: "dropdown.items", children: [
|
|
91
|
+
h && f.length > 0 && /* @__PURE__ */ n(
|
|
92
|
+
w,
|
|
93
|
+
{
|
|
94
|
+
component: "dropdown.unselectItem",
|
|
95
|
+
selected: i.length === 0,
|
|
96
|
+
...h.props,
|
|
97
|
+
props: { onMouseDown: (e) => E(e) }
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
f.map((e) => {
|
|
101
|
+
const { value: o, ...t } = e.props;
|
|
102
|
+
return /* @__PURE__ */ n(
|
|
103
|
+
w,
|
|
104
|
+
{
|
|
105
|
+
component: "dropdown.item",
|
|
106
|
+
theme: l ? "multiple" : "single",
|
|
107
|
+
selected: i.includes(o),
|
|
108
|
+
...t,
|
|
109
|
+
props: { onMouseDown: (j) => E(j, e) }
|
|
110
|
+
},
|
|
111
|
+
o
|
|
112
|
+
);
|
|
113
|
+
}),
|
|
114
|
+
f.length === 0 && P && /* @__PURE__ */ n(w, { component: "dropdown.emptyItem", ...P.props })
|
|
115
|
+
] })
|
|
116
|
+
}
|
|
117
|
+
)
|
|
77
118
|
] });
|
|
78
119
|
}
|
|
79
|
-
function
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
N.componentName = "DropdownItem";
|
|
83
|
-
function v(n) {
|
|
84
|
-
return /* @__PURE__ */ s(x, { component: "dropdown.nullItem", ...n, props: { onMouseDown: n.onClick } });
|
|
85
|
-
}
|
|
86
|
-
v.componentName = "DropdownNullItem";
|
|
87
|
-
function H(n) {
|
|
88
|
-
return /* @__PURE__ */ s(f, { component: "dropdown.noItems", ...n });
|
|
120
|
+
function b(s) {
|
|
121
|
+
const u = (r) => null;
|
|
122
|
+
return u.componentName = s, u;
|
|
89
123
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
function
|
|
96
|
-
var
|
|
97
|
-
if (
|
|
98
|
-
if (typeof
|
|
99
|
-
const
|
|
100
|
-
return
|
|
124
|
+
const S = F(Z);
|
|
125
|
+
S.Item = b("DropdownItem");
|
|
126
|
+
S.UnselectItem = b("DropdownUnselectItem");
|
|
127
|
+
S.EmptyItem = b("DropdownEmptyItem");
|
|
128
|
+
S.Display = b("DropdownDisplay");
|
|
129
|
+
function B(s) {
|
|
130
|
+
var u;
|
|
131
|
+
if (s == null) return "";
|
|
132
|
+
if (typeof s == "object") {
|
|
133
|
+
const r = (u = s.props) == null ? void 0 : u.children;
|
|
134
|
+
return r == null ? "" : typeof r == "object" ? (Array.isArray(r) ? r : [r]).map((l) => B(l)).join("") : r.toString();
|
|
101
135
|
}
|
|
102
|
-
return
|
|
136
|
+
return s.toString();
|
|
103
137
|
}
|
|
104
138
|
export {
|
|
105
|
-
|
|
139
|
+
S as default
|
|
106
140
|
};
|
package/core/boxStyles.d.ts
CHANGED
|
@@ -701,6 +701,14 @@ export declare const cssStyles: {
|
|
|
701
701
|
valueFormat: (value: string, getVariableValue: (name: string) => string) => string;
|
|
702
702
|
styleName: string;
|
|
703
703
|
}[];
|
|
704
|
+
fill: {
|
|
705
|
+
values: Variables.ColorType[];
|
|
706
|
+
valueFormat: (value: string, getVariableValue: (name: string) => string) => string;
|
|
707
|
+
}[];
|
|
708
|
+
stroke: {
|
|
709
|
+
values: Variables.ColorType[];
|
|
710
|
+
valueFormat: (value: string, getVariableValue: (name: string) => string) => string;
|
|
711
|
+
}[];
|
|
704
712
|
bgImage: {
|
|
705
713
|
values: readonly ["none", "bg-img-checked", "bg-img-indeterminate", "bg-img-radio"];
|
|
706
714
|
valueFormat: (value: string, getVariableValue: (name: string) => string) => string;
|
package/core.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";const E=require("react");function le(...e){return e.reduce((t,r)=>r?typeof r=="string"?(t.push(r),t):Array.isArray(r)?(t.push(...le(...r)),t):(Object.entries(r).forEach(([a,d])=>{d&&t.push(a)}),t):t,[])}var n;(e=>{(t=>{function r(d,s){return`${d}${s.replace("/","-")}`}t.fraction=r;function a(d){return[`${d} path`,`${d} circle`,`${d} rect`,`${d} line`]}t.svg=a})(e.ClassName||(e.ClassName={})),(t=>{function r(b){return`${b/4}rem`}t.rem=r;function a(b){return`${b}px`}t.px=a;function d(b,i){const[m,c]=i.split("/");return`${+m/+c*100}%`}t.fraction=d;function s(b,i){switch(i){case"fit":return"100%";case"fit-screen":return b.toLocaleLowerCase().includes("height")?"100vh":"100vw";default:return i}}t.widthHeight=s;function f(b){return(i,m)=>`var(--${b}${m});`}t.variables=f;function o(b){return(i,m)=>`var(--${b}${m});`}t.svgVariables=o;function u(b,i){return`repeat(${i},minmax(0,1fr))`}t.gridColumns=u;function y(b,i){return i==="full-row"?"1/-1":`span ${i}/span ${i}`}t.gridColumn=y;function l(b,i){return`${i}ms`}t.ms=l;function v(b,i){return`${i}deg`}t.rotate=v;function g(b,i){return i==="xAxis"?"-1 1":"1 -1"}t.flip=g})(e.Value||(e.Value={}))})(n||(n={}));var W;(e=>{e.colors={currentColor:"currentColor",transparent:"transparent",green:"green",red:"red",blue:"blue",gray:"gray",black:"#000",white:"#fff","slate-50":"#f8fafc","slate-100":"#f1f5f9","slate-200":"#e2e8f0","slate-300":"#cbd5e1","slate-400":"#94a3b8","slate-500":"#64748b","slate-600":"#475569","slate-700":"#334155","slate-800":"#1e293b","slate-900":"#0f172a","slate-950":"#020617","gray-50":"#f9fafb","gray-100":"#f3f4f6","gray-200":"#e5e7eb","gray-300":"#d1d5db","gray-400":"#9ca3af","gray-500":"#6b7280","gray-600":"#4b5563","gray-700":"#374151","gray-800":"#1f2937","gray-900":"#111827","gray-950":"#030712","zinc-50":"#fafafa","zinc-100":"#f4f4f5","zinc-200":"#e4e4e7","zinc-300":"#d4d4d8","zinc-400":"#a1a1aa","zinc-500":"#71717a","zinc-600":"#52525b","zinc-700":"#3f3f46","zinc-800":"#27272a","zinc-900":"#18181b","zinc-950":"#09090b","neutral-50":"#fafafa","neutral-100":"#f5f5f5","neutral-200":"#e5e5e5","neutral-300":"#d4d4d4","neutral-400":"#a3a3a3","neutral-500":"#737373","neutral-600":"#525252","neutral-700":"#404040","neutral-800":"#262626","neutral-900":"#171717","neutral-950":"#0a0a0a","stone-50":"#fafaf9","stone-100":"#f5f5f4","stone-200":"#e7e5e4","stone-300":"#d6d3d1","stone-400":"#a8a29e","stone-500":"#78716c","stone-600":"#57534e","stone-700":"#44403c","stone-800":"#292524","stone-900":"#1c1917","stone-950":"#0c0a09","red-50":"#fef2f2","red-100":"#fee2e2","red-200":"#fecaca","red-300":"#fca5a5","red-400":"#f87171","red-500":"#ef4444","red-600":"#dc2626","red-700":"#b91c1c","red-800":"#991b1b","red-900":"#7f1d1d","red-950":"#450a0a","orange-50":"#fff7ed","orange-100":"#ffedd5","orange-200":"#fed7aa","orange-300":"#fdba74","orange-400":"#fb923c","orange-500":"#f97316","orange-600":"#ea580c","orange-700":"#c2410c","orange-800":"#9a3412","orange-900":"#7c2d12","orange-950":"#431407","amber-50":"#fffbeb","amber-100":"#fef3c7","amber-200":"#fde68a","amber-300":"#fcd34d","amber-400":"#fbbf24","amber-500":"#f59e0b","amber-600":"#d97706","amber-700":"#b45309","amber-800":"#92400e","amber-900":"#78350f","amber-950":"#451a03","yellow-50":"#fefce8","yellow-100":"#fef9c3","yellow-200":"#fef08a","yellow-300":"#fde047","yellow-400":"#facc15","yellow-500":"#eab308","yellow-600":"#ca8a04","yellow-700":"#a16207","yellow-800":"#854d0e","yellow-900":"#713f12","yellow-950":"#422006","lime-50":"#f7fee7","lime-100":"#ecfccb","lime-200":"#d9f99d","lime-300":"#bef264","lime-400":"#a3e635","lime-500":"#84cc16","lime-600":"#65a30d","lime-700":"#4d7c0f","lime-800":"#3f6212","lime-900":"#365314","lime-950":"#1a2e05","green-50":"#f0fdf4","green-100":"#dcfce7","green-200":"#bbf7d0","green-300":"#86efac","green-400":"#4ade80","green-500":"#22c55e","green-600":"#16a34a","green-700":"#15803d","green-800":"#166534","green-900":"#14532d","green-950":"#052e16","emerald-50":"#ecfdf5","emerald-100":"#d1fae5","emerald-200":"#a7f3d0","emerald-300":"#6ee7b7","emerald-400":"#34d399","emerald-500":"#10b981","emerald-600":"#059669","emerald-700":"#047857","emerald-800":"#065f46","emerald-900":"#064e3b","emerald-950":"#022c22","teal-50":"#f0fdfa","teal-100":"#ccfbf1","teal-200":"#99f6e4","teal-300":"#5eead4","teal-400":"#2dd4bf","teal-500":"#14b8a6","teal-600":"#0d9488","teal-700":"#0f766e","teal-800":"#115e59","teal-900":"#134e4a","teal-950":"#042f2e","cyan-50":"#ecfeff","cyan-100":"#cffafe","cyan-200":"#a5f3fc","cyan-300":"#67e8f9","cyan-400":"#22d3ee","cyan-500":"#06b6d4","cyan-600":"#0891b2","cyan-700":"#0e7490","cyan-800":"#155e75","cyan-900":"#164e63","cyan-950":"#083344","sky-50":"#f0f9ff","sky-100":"#e0f2fe","sky-200":"#bae6fd","sky-300":"#7dd3fc","sky-400":"#38bdf8","sky-500":"#0ea5e9","sky-600":"#0284c7","sky-700":"#0369a1","sky-800":"#075985","sky-900":"#0c4a6e","sky-950":"#082f49","blue-50":"#eff6ff","blue-100":"#dbeafe","blue-200":"#bfdbfe","blue-300":"#93c5fd","blue-400":"#60a5fa","blue-500":"#3b82f6","blue-600":"#2563eb","blue-700":"#1d4ed8","blue-800":"#1e40af","blue-900":"#1e3a8a","blue-950":"#172554","indigo-50":"#eef2ff","indigo-100":"#e0e7ff","indigo-200":"#c7d2fe","indigo-300":"#a5b4fc","indigo-400":"#818cf8","indigo-500":"#6366f1","indigo-600":"#4f46e5","indigo-700":"#4338ca","indigo-800":"#3730a3","indigo-900":"#312e81","indigo-950":"#1e1b4b","violet-50":"#f5f3ff","violet-100":"#ede9fe","violet-200":"#ddd6fe","violet-300":"#c4b5fd","violet-400":"#a78bfa","violet-500":"#8b5cf6","violet-600":"#7c3aed","violet-700":"#6d28d9","violet-800":"#5b21b6","violet-900":"#4c1d95","violet-950":"#2e1065",vi:"#7949FF","purple-50":"#faf5ff","purple-100":"#f3e8ff","purple-200":"#e9d5ff","purple-300":"#d8b4fe","purple-400":"#c084fc","purple-500":"#a855f7","purple-600":"#9333ea","purple-700":"#7e22ce","purple-800":"#6b21a8","purple-900":"#581c87","purple-950":"#3b0764","fuchsia-50":"#fdf4ff","fuchsia-100":"#fae8ff","fuchsia-200":"#f5d0fe","fuchsia-300":"#f0abfc","fuchsia-400":"#e879f9","fuchsia-500":"#d946ef","fuchsia-600":"#c026d3","fuchsia-700":"#a21caf","fuchsia-800":"#86198f","fuchsia-900":"#701a75","fuchsia-950":"#4a044e","pink-50":"#fdf2f8","pink-100":"#fce7f3","pink-200":"#fbcfe8","pink-300":"#f9a8d4","pink-400":"#f472b6","pink-500":"#ec4899","pink-600":"#db2777","pink-700":"#be185d","pink-800":"#9d174d","pink-900":"#831843","pink-950":"#500724","rose-50":"#fff1f2","rose-100":"#ffe4e6","rose-200":"#fecdd3","rose-300":"#fda4af","rose-400":"#fb7185","rose-500":"#f43f5e","rose-600":"#e11d48","rose-700":"#be123c","rose-800":"#9f1239","rose-900":"#881337","rose-950":"#4c0519"};const t={inherit:"inherit",none:"none","bg-img-checked":`url("data:image/svg+xml,${encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' width='100%' viewBox='0 0 20 20'><path fill='none' stroke='#FFF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 10l3 3l6-6'/></svg>")}")`,"bg-img-indeterminate":`url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' width='100%' viewBox='0 0 20 20'><line stroke='${e.colors["violet-400"]}' x1='4' y1='10' x2='16' y2='10' stroke-width='1' /></svg>`)}")`,"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>")}")`},r={};let a={};function d(o){return o in a?r[o]=a[o]:o in t?r[o]=t[o]:o in e.colors?r[o]=e.colors[o]:r[o]=o,`var(--${o})`}e.getVariableValue=d;function s(){return Object.entries(r).map(([o,u])=>`--${o}: ${u};`).join("")}e.generateVariables=s;function f(o){a=o}e.setUserVariables=f})(W||(W={}));const C=W,j={appearance:[{values:["none","auto","menulist-button","textfield","button","checkbox"]}],b:[{values:0,styleName:"border-width",valueFormat:n.Value.px}],bx:[{values:0,styleName:"border-inline-width",valueFormat:n.Value.px}],by:[{values:0,styleName:"border-block-width",valueFormat:n.Value.px}],bt:[{values:0,styleName:"border-top-width",valueFormat:n.Value.px}],br:[{values:0,styleName:"border-right-width",valueFormat:n.Value.px}],bb:[{values:0,styleName:"border-bottom-width",valueFormat:n.Value.px}],bl:[{values:0,styleName:"border-left-width",valueFormat:n.Value.px}],borderStyle:[{styleName:"border-style",values:["solid","dashed","dotted","double","groove","ridge","inset","outset","none","hidden"]}],borderRadius:[{styleName:"border-radius",values:0,valueFormat:n.Value.rem}],borderRadiusTop:[{values:0,styleName:["border-top-left-radius","border-top-right-radius"],valueFormat:n.Value.rem}],borderRadiusRight:[{values:0,styleName:["border-top-right-radius","border-bottom-right-radius"],valueFormat:n.Value.rem}],borderRadiusBottom:[{values:0,styleName:["border-bottom-left-radius","border-bottom-right-radius"],valueFormat:n.Value.rem}],borderRadiusLeft:[{values:0,styleName:["border-top-left-radius","border-bottom-left-radius"],valueFormat:n.Value.rem}],borderRadiusTopLeft:[{values:0,styleName:"border-top-left-radius",valueFormat:n.Value.rem}],borderRadiusTopRight:[{values:0,styleName:"border-top-right-radius",valueFormat:n.Value.rem}],borderRadiusBottomRight:[{values:0,styleName:"border-bottom-right-radius",valueFormat:n.Value.rem}],borderRadiusBottomLeft:[{values:0,styleName:"border-bottom-left-radius",valueFormat:n.Value.rem}],position:[{values:["static","relative","absolute","fixed","sticky"]}],top:[{values:0,valueFormat:n.Value.rem}],right:[{values:0,valueFormat:n.Value.rem}],bottom:[{values:0,valueFormat:n.Value.rem}],left:[{values:0,valueFormat:n.Value.rem}],inset:[{values:0,valueFormat:n.Value.rem}],boxSizing:[{values:["border-box","content-box"],styleName:"box-sizing"}],contentVisibility:[{values:["visible","hidden"],styleName:"content-visibility"}],cursor:[{values:["auto","default","none","context-menu","help","pointer","progress","wait","cell","crosshair","text","vertical-text","alias","copy","move","no-drop","not-allowed","e-resize","n-resize","ne-resize","nw-resize","s-resize","se-resize","sw-resize","w-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","col-resize","row-resize","all-scroll","zoom-in","zoom-out","grab","grabbing"]}],display:[{values:["none","block","inline-block","flex","inline-flex","grid","inline-grid","contents"]}],inline:[{values:[!0],styleName:"display",valueFormat:()=>"inline-block"}],jc:[{styleName:"justify-content",values:["start","end","flex-start","flex-end","center","left","right","space-between","space-around","space-evenly","stretch"]}],ai:[{styleName:"align-items",values:["stretch","flex-start","flex-end","center","baseline","start","end","self-start","self-end"]}],alignContent:[{styleName:"align-content",values:["flex-start","flex-end","center","space-between","space-around","space-evenly","stretch","start","end","baseline"]}],flex1:[{styleName:"flex",values:[!0],valueFormat:()=>"1"}],d:[{styleName:"flex-direction",values:["row","row-reverse","column","column-reverse"]}],flexWrap:[{styleName:"flex-wrap",values:["nowrap","wrap","wrap-reverse"]}],flexGrow:[{styleName:"flex-grow",values:0}],flexShrink:[{styleName:"flex-shrink",values:0}],alignSelf:[{styleName:"align-self",values:["auto","flex-start","flex-end","center","baseline","stretch"]}],justifySelf:[{styleName:"justify-self",values:["auto","flex-start","flex-end","center","baseline","stretch"]}],fontSize:[{styleName:"font-size",values:0,valueFormat:n.Value.px},{styleName:"font-size",values:["inherit"]}],fontStyle:[{styleName:"font-style",values:["italic","normal","oblique"]}],fontWeight:[{styleName:"font-weight",values:[100,200,300,400,500,600,700,800,900]}],gap:[{values:0,valueFormat:n.Value.rem}],rowGap:[{styleName:"row-gap",values:0,valueFormat:n.Value.rem}],columnGap:[{styleName:"column-gap",values:0,valueFormat:n.Value.rem}],order:[{styleName:"order",values:0}],height:[{values:0,valueFormat:e=>`${e/4}rem`},{values:["fit"],valueFormat:()=>"100%"},{values:["fit-screen"],valueFormat:()=>"100vh"},{values:["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"],valueFormat:e=>{const[t,r]=e.split("/");return`${+t/+r*100}%`}},{values:["auto","fit-content","max-content","min-content"]}],minHeight:[{styleName:"min-height",values:0,valueFormat:e=>`${e/4}rem`},{styleName:"min-height",values:["fit"],valueFormat:()=>"100%"},{styleName:"min-height",values:["fit-screen"],valueFormat:()=>"100vh"},{styleName:"min-height",values:["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"],valueFormat:e=>{const[t,r]=e.split("/");return`${+t/+r*100}%`}},{styleName:"min-height",values:["auto","fit-content","max-content","min-content"]}],maxHeight:[{styleName:"max-height",values:0,valueFormat:e=>`${e/4}rem`},{styleName:"max-height",values:["fit"],valueFormat:()=>"100%"},{styleName:"max-height",values:["fit-screen"],valueFormat:()=>"100vh"},{styleName:"max-height",values:["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"],valueFormat:e=>{const[t,r]=e.split("/");return`${+t/+r*100}%`}},{styleName:"max-height",values:["auto","fit-content","max-content","min-content"]}],width:[{values:0,valueFormat:e=>`${e/4}rem`},{values:["fit"],valueFormat:()=>"100%"},{values:["fit-screen"],valueFormat:()=>"100vw"},{values:["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"],valueFormat:e=>{const[t,r]=e.split("/");return`${+t/+r*100}%`}},{values:["auto","fit-content","max-content","min-content"]}],minWidth:[{styleName:"min-width",values:0,valueFormat:e=>`${e/4}rem`},{styleName:"min-width",values:["fit"],valueFormat:()=>"100%"},{styleName:"min-width",values:["fit-screen"],valueFormat:()=>"100vw"},{styleName:"min-width",values:["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"],valueFormat:e=>{const[t,r]=e.split("/");return`${+t/+r*100}%`}},{styleName:"min-width",values:["auto","fit-content","max-content","min-content"]}],maxWidth:[{styleName:"max-width",values:0,valueFormat:e=>`${e/4}rem`},{styleName:"max-width",values:["fit"],valueFormat:()=>"100%"},{styleName:"max-width",values:["fit-screen"],valueFormat:()=>"100vw"},{styleName:"max-width",values:["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"],valueFormat:e=>{const[t,r]=e.split("/");return`${+t/+r*100}%`}},{styleName:"max-width",values:["auto","fit-content","max-content","min-content"]}],letterSpacing:[{styleName:"letter-spacing",values:0,valueFormat:n.Value.px}],lineHeight:[{styleName:"line-height",values:0,valueFormat:n.Value.px},{styleName:"line-height",values:["font-size"],valueFormat:e=>"1"}],listStyle:[{styleName:"list-style",values:["square","inside","outside","none"]}],m:[{values:0,styleName:"margin",valueFormat:n.Value.rem},{values:["auto"],styleName:"margin"}],mx:[{values:0,styleName:"margin-inline",valueFormat:n.Value.rem},{values:["auto"],styleName:"margin-inline"}],my:[{values:0,styleName:"margin-block",valueFormat:n.Value.rem},{values:["auto"],styleName:"margin-block"}],mt:[{values:0,styleName:"margin-top",valueFormat:n.Value.rem},{values:["auto"],styleName:"margin-top"}],mr:[{values:0,styleName:"margin-right",valueFormat:n.Value.rem},{values:["auto"],styleName:"margin-right"}],mb:[{values:0,styleName:"margin-bottom",valueFormat:n.Value.rem},{values:["auto"],styleName:"margin-bottom"}],ml:[{values:0,styleName:"margin-left",valueFormat:n.Value.rem},{values:["auto"],styleName:"margin-left"}],p:[{values:0,styleName:"padding",valueFormat:n.Value.rem}],px:[{values:0,styleName:"padding-inline",valueFormat:n.Value.rem}],py:[{values:0,styleName:"padding-block",valueFormat:n.Value.rem}],pt:[{values:0,styleName:"padding-top",valueFormat:n.Value.rem}],pr:[{values:0,styleName:"padding-right",valueFormat:n.Value.rem}],pb:[{values:0,styleName:"padding-bottom",valueFormat:n.Value.rem}],pl:[{values:0,styleName:"padding-left",valueFormat:n.Value.rem}],objectFit:[{styleName:"object-fit",values:["fill","contain","cover","scale-down","none"]}],opacity:[{values:[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1]}],outline:[{styleName:"outline-width",values:0,valueFormat:n.Value.px}],outlineStyle:[{styleName:"outline-style",values:["solid","dashed","dotted","double","groove","ridge","inset","outset","none","hidden"]}],outlineOffset:[{styleName:"outline-offset",values:0,valueFormat:n.Value.px}],overflow:[{values:["auto","hidden","scroll","visible"]}],overflowX:[{styleName:"overflow-x",values:["auto","hidden","scroll","visible"]}],overflowY:[{styleName:"overflow-y",values:["auto","hidden","scroll","visible"]}],pointerEvents:[{styleName:"pointer-events",values:["none","auto","all"]}],resize:[{values:["none","both","horizontal","vertical","block","inline"]}],rotate:[{values:[0,90,180,270,-90,-180,-270],valueFormat:e=>`${e}deg`}],flip:[{styleName:"scale",values:["xAxis","yAxis"],valueFormat:e=>e==="xAxis"?"-1 1":"1 -1"}],textAlign:[{styleName:"text-align",values:["left","right","center","justify"]}],textDecoration:[{styleName:"text-decoration",values:["none","underline","overline","line-through"]}],textOverflow:[{styleName:"text-overflow",values:["clip","ellipsis"]}],textTransform:[{styleName:"text-transform",values:["none","capitalize","lowercase","uppercase"]}],textWrap:[{styleName:"text-wrap",values:["wrap","nowrap","balance","pretty"]}],transition:[{styleName:"transition-property",values:["none","all"]}],transitionDuration:[{styleName:"transition-duration",values:[50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1e3],valueFormat:e=>`${e}ms`}],userSelect:[{styleName:"user-select",values:["none","auto","text","all"]}],visibility:[{styleName:"visibility",values:["visible","hidden","collapse"]}],whiteSpace:[{styleName:"white-space",values:["break-spaces","normal","nowrap","pre","pre-line","pre-wrap"]}],zIndex:[{styleName:"z-index",values:[1,2,3,4,5,10,11,12,13,14,15,100,101,102,103,104,105,1e3,1001,1002,1003,1004,1005]}],gridTemplateColumns:[{styleName:"grid-template-columns",values:0,valueFormat:e=>`repeat(${e},minmax(0,1fr))`},{styleName:"grid-template-columns",values:["subgrid"]}],gridTemplateRows:[{styleName:"grid-template-rows",values:0,valueFormat:e=>`repeat(${e},minmax(0,1fr))`},{styleName:"grid-template-rows",values:["subgrid"]}],colSpan:[{styleName:"grid-column",values:0,valueFormat:e=>`span ${e}/span ${e}`},{styleName:"grid-column",values:["full-row"],valueFormat:()=>"1/-1"}],gridColumnStart:[{styleName:"grid-column-start",values:0}],gridColumnEnd:[{styleName:"grid-column-end",values:0}],gridRow:[{styleName:"grid-row",values:0,valueFormat:e=>`span ${e}/span ${e}`},{styleName:"grid-row",values:["full-column"],valueFormat:()=>"1/-1"}],gridRowStart:[{styleName:"grid-row-start",values:0}],gridRowEnd:[{styleName:"grid-row-end",values:0}],color:[{values:Object.keys(C.colors),valueFormat:(e,t)=>t(e)}],bgColor:[{values:Object.keys(C.colors),valueFormat:(e,t)=>t(e),styleName:"background-color"}],borderColor:[{values:Object.keys(C.colors),valueFormat:(e,t)=>t(e),styleName:"border-color"}],outlineColor:[{values:Object.keys(C.colors),valueFormat:(e,t)=>t(e),styleName:"outline-color"}],bgImage:[{values:["none","bg-img-checked","bg-img-indeterminate","bg-img-radio"],valueFormat:(e,t)=>t(e),styleName:"background-image"}]},ae={hover:":hover",focus:":focus-within",hasFocus:":has(:focus)",active:":active",valid:":user-valid",hasValid:":has(:valid)",invalid:":user-invalid",hasInvalid:":has(:user-invalid)",optional:":optional",hasChecked:":has(:checked)",hasRequired:":has(:required)",hasDisabled:":has([disabled])"},L={indeterminate:":indeterminate",checked:":checked",required:":required",disabled:"[disabled]",selected:'[aria-selected="true"]'},Z={...ae,...L},se=Object.entries(Z).reduce((e,[t],r)=>(e[t]=Math.pow(2,r),e),{}),q=Object.entries(Z).reduce((e,[t])=>{const r=se[t];return Object.entries(e).forEach(([a,d])=>{e[+a+r]=[...d,t]}),e},{0:[]}),K={hoverGroup:"hover",focusGroup:"focus",activeGroup:"active",disabledGroup:"disabled"},U={sm:640,md:768,lg:1024,xl:1280,xxl:1536};var M;(e=>{function t(s,f,o){const u={...s},y=u.props||{};return f.forEach(l=>{l in u&&(y[l]=u[l],delete u[l])}),o&&Object.entries(o).forEach(([l,v])=>{y[l]=v}),u.props=y,u}e.buildProps=t;function r(s){return!!s&&typeof s=="object"}e.isObject=r;function a(...s){return s.reduce((f,o)=>(Object.keys(o??{}).forEach(u=>{const y=f[u],l=o[u];u in L&&typeof l=="boolean"||(u in L&&Array.isArray(l)?f[u]=a(y,l[1]??{}):Array.isArray(y)&&Array.isArray(l)?f[u]=y.concat(...l):r(y)&&r(l)?f[u]=a(y,l):f[u]=l)}),f),{})}e.mergeDeep=a;function d(s,f){return s in f}e.isKeyOf=d})(M||(M={}));const N=M;class de{constructor(){this._index=0,this._cache={}}getIdentity(t){return this._cache[t]||(this._cache[t]=this.getByIndex(this._index++)),this._cache[t]}getByIndex(t){const{first:r,next:a}=ce,d=t-r.length;if(d<0)return r[t];const s=Math.floor(d/a.length),f=d-s*a.length;return this.getByIndex(s)+a[f]}}const ce={first:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",next:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"};var T;(e=>{e.components={}})(T||(T={}));function fe(e){const{clean:t,theme:r,component:a}=e;return E.useMemo(()=>{var f;if(t)return;const d=a==null?void 0:a.split(".");if(!d)return;const s=d.reduce((o,u,y)=>{var l,v;return y===0?(l=T.components)==null?void 0:l[u]:(v=o==null?void 0:o.children)==null?void 0:v[u]},void 0);if(s)return r?N.mergeDeep(s.styles,((f=s.themes)==null?void 0:f[r])??{}):s.styles},[a,t,r])}const me=new de,ve=typeof window<"u"&&typeof window.document<"u";var oe;const ie=typeof process=="object"&&((oe=process.env)==null?void 0:oe.NODE_ENV)==="test",be=ve&&!ie?E.useLayoutEffect:E.useEffect,ne="_b",A="_s";function ye(e,t){be(_.flush,[e]);const r=fe(e);return E.useMemo(()=>{const a=[t?A:ne],d=r?N.mergeDeep(r,e):e;return _.addClassNames(d,a,[]),a},[e,t,r])}var _;(e=>{let t=!0,r={};function a(l,v,g,b,i){Object.entries(l).forEach(([m,c])=>{if(N.isKeyOf(m,j))f(m,c,v,g,b,i);else if(N.isKeyOf(m,ae))a(c,v,[...g,m],b,i);else if(N.isKeyOf(m,L)){if(Array.isArray(c)){const[w,x]=c;a(x,v,[...g,m],b,i)}N.isObject(c)&&a(c,v,[...g,m],b,i)}else N.isKeyOf(m,U)?a(c,v,g,m,i):N.isKeyOf(m,K)&&(typeof c=="string"?v.push(`${K[m]}-${c}`):Object.entries(c).forEach(([w,x])=>{a(x,v,[...g,K[m]],b,w)}))})}e.addClassNames=a;function d(){if(!t)return;console.debug("\x1B[36m%s\x1B[0m","[react-box]: flush");const l=Object.entries(j).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;}
|
|
1
|
+
"use strict";const E=require("react");function le(...e){return e.reduce((t,r)=>r?typeof r=="string"?(t.push(r),t):Array.isArray(r)?(t.push(...le(...r)),t):(Object.entries(r).forEach(([a,u])=>{u&&t.push(a)}),t):t,[])}var n;(e=>{(t=>{function r(u,s){return`${u}${s.replace("/","-")}`}t.fraction=r;function a(u){return[`${u} path`,`${u} circle`,`${u} rect`,`${u} line`]}t.svg=a})(e.ClassName||(e.ClassName={})),(t=>{function r(b){return`${b/4}rem`}t.rem=r;function a(b){return`${b}px`}t.px=a;function u(b,i){const[m,d]=i.split("/");return`${+m/+d*100}%`}t.fraction=u;function s(b,i){switch(i){case"fit":return"100%";case"fit-screen":return b.toLocaleLowerCase().includes("height")?"100vh":"100vw";default:return i}}t.widthHeight=s;function c(b){return(i,m)=>`var(--${b}${m});`}t.variables=c;function o(b){return(i,m)=>`var(--${b}${m});`}t.svgVariables=o;function f(b,i){return`repeat(${i},minmax(0,1fr))`}t.gridColumns=f;function y(b,i){return i==="full-row"?"1/-1":`span ${i}/span ${i}`}t.gridColumn=y;function l(b,i){return`${i}ms`}t.ms=l;function v(b,i){return`${i}deg`}t.rotate=v;function g(b,i){return i==="xAxis"?"-1 1":"1 -1"}t.flip=g})(e.Value||(e.Value={}))})(n||(n={}));var W;(e=>{e.colors={currentColor:"currentColor",transparent:"transparent",green:"green",red:"red",blue:"blue",gray:"gray",black:"#000",white:"#fff","slate-50":"#f8fafc","slate-100":"#f1f5f9","slate-200":"#e2e8f0","slate-300":"#cbd5e1","slate-400":"#94a3b8","slate-500":"#64748b","slate-600":"#475569","slate-700":"#334155","slate-800":"#1e293b","slate-900":"#0f172a","slate-950":"#020617","gray-50":"#f9fafb","gray-100":"#f3f4f6","gray-200":"#e5e7eb","gray-300":"#d1d5db","gray-400":"#9ca3af","gray-500":"#6b7280","gray-600":"#4b5563","gray-700":"#374151","gray-800":"#1f2937","gray-900":"#111827","gray-950":"#030712","zinc-50":"#fafafa","zinc-100":"#f4f4f5","zinc-200":"#e4e4e7","zinc-300":"#d4d4d8","zinc-400":"#a1a1aa","zinc-500":"#71717a","zinc-600":"#52525b","zinc-700":"#3f3f46","zinc-800":"#27272a","zinc-900":"#18181b","zinc-950":"#09090b","neutral-50":"#fafafa","neutral-100":"#f5f5f5","neutral-200":"#e5e5e5","neutral-300":"#d4d4d4","neutral-400":"#a3a3a3","neutral-500":"#737373","neutral-600":"#525252","neutral-700":"#404040","neutral-800":"#262626","neutral-900":"#171717","neutral-950":"#0a0a0a","stone-50":"#fafaf9","stone-100":"#f5f5f4","stone-200":"#e7e5e4","stone-300":"#d6d3d1","stone-400":"#a8a29e","stone-500":"#78716c","stone-600":"#57534e","stone-700":"#44403c","stone-800":"#292524","stone-900":"#1c1917","stone-950":"#0c0a09","red-50":"#fef2f2","red-100":"#fee2e2","red-200":"#fecaca","red-300":"#fca5a5","red-400":"#f87171","red-500":"#ef4444","red-600":"#dc2626","red-700":"#b91c1c","red-800":"#991b1b","red-900":"#7f1d1d","red-950":"#450a0a","orange-50":"#fff7ed","orange-100":"#ffedd5","orange-200":"#fed7aa","orange-300":"#fdba74","orange-400":"#fb923c","orange-500":"#f97316","orange-600":"#ea580c","orange-700":"#c2410c","orange-800":"#9a3412","orange-900":"#7c2d12","orange-950":"#431407","amber-50":"#fffbeb","amber-100":"#fef3c7","amber-200":"#fde68a","amber-300":"#fcd34d","amber-400":"#fbbf24","amber-500":"#f59e0b","amber-600":"#d97706","amber-700":"#b45309","amber-800":"#92400e","amber-900":"#78350f","amber-950":"#451a03","yellow-50":"#fefce8","yellow-100":"#fef9c3","yellow-200":"#fef08a","yellow-300":"#fde047","yellow-400":"#facc15","yellow-500":"#eab308","yellow-600":"#ca8a04","yellow-700":"#a16207","yellow-800":"#854d0e","yellow-900":"#713f12","yellow-950":"#422006","lime-50":"#f7fee7","lime-100":"#ecfccb","lime-200":"#d9f99d","lime-300":"#bef264","lime-400":"#a3e635","lime-500":"#84cc16","lime-600":"#65a30d","lime-700":"#4d7c0f","lime-800":"#3f6212","lime-900":"#365314","lime-950":"#1a2e05","green-50":"#f0fdf4","green-100":"#dcfce7","green-200":"#bbf7d0","green-300":"#86efac","green-400":"#4ade80","green-500":"#22c55e","green-600":"#16a34a","green-700":"#15803d","green-800":"#166534","green-900":"#14532d","green-950":"#052e16","emerald-50":"#ecfdf5","emerald-100":"#d1fae5","emerald-200":"#a7f3d0","emerald-300":"#6ee7b7","emerald-400":"#34d399","emerald-500":"#10b981","emerald-600":"#059669","emerald-700":"#047857","emerald-800":"#065f46","emerald-900":"#064e3b","emerald-950":"#022c22","teal-50":"#f0fdfa","teal-100":"#ccfbf1","teal-200":"#99f6e4","teal-300":"#5eead4","teal-400":"#2dd4bf","teal-500":"#14b8a6","teal-600":"#0d9488","teal-700":"#0f766e","teal-800":"#115e59","teal-900":"#134e4a","teal-950":"#042f2e","cyan-50":"#ecfeff","cyan-100":"#cffafe","cyan-200":"#a5f3fc","cyan-300":"#67e8f9","cyan-400":"#22d3ee","cyan-500":"#06b6d4","cyan-600":"#0891b2","cyan-700":"#0e7490","cyan-800":"#155e75","cyan-900":"#164e63","cyan-950":"#083344","sky-50":"#f0f9ff","sky-100":"#e0f2fe","sky-200":"#bae6fd","sky-300":"#7dd3fc","sky-400":"#38bdf8","sky-500":"#0ea5e9","sky-600":"#0284c7","sky-700":"#0369a1","sky-800":"#075985","sky-900":"#0c4a6e","sky-950":"#082f49","blue-50":"#eff6ff","blue-100":"#dbeafe","blue-200":"#bfdbfe","blue-300":"#93c5fd","blue-400":"#60a5fa","blue-500":"#3b82f6","blue-600":"#2563eb","blue-700":"#1d4ed8","blue-800":"#1e40af","blue-900":"#1e3a8a","blue-950":"#172554","indigo-50":"#eef2ff","indigo-100":"#e0e7ff","indigo-200":"#c7d2fe","indigo-300":"#a5b4fc","indigo-400":"#818cf8","indigo-500":"#6366f1","indigo-600":"#4f46e5","indigo-700":"#4338ca","indigo-800":"#3730a3","indigo-900":"#312e81","indigo-950":"#1e1b4b","violet-50":"#f5f3ff","violet-100":"#ede9fe","violet-200":"#ddd6fe","violet-300":"#c4b5fd","violet-400":"#a78bfa","violet-500":"#8b5cf6","violet-600":"#7c3aed","violet-700":"#6d28d9","violet-800":"#5b21b6","violet-900":"#4c1d95","violet-950":"#2e1065",vi:"#7949FF","purple-50":"#faf5ff","purple-100":"#f3e8ff","purple-200":"#e9d5ff","purple-300":"#d8b4fe","purple-400":"#c084fc","purple-500":"#a855f7","purple-600":"#9333ea","purple-700":"#7e22ce","purple-800":"#6b21a8","purple-900":"#581c87","purple-950":"#3b0764","fuchsia-50":"#fdf4ff","fuchsia-100":"#fae8ff","fuchsia-200":"#f5d0fe","fuchsia-300":"#f0abfc","fuchsia-400":"#e879f9","fuchsia-500":"#d946ef","fuchsia-600":"#c026d3","fuchsia-700":"#a21caf","fuchsia-800":"#86198f","fuchsia-900":"#701a75","fuchsia-950":"#4a044e","pink-50":"#fdf2f8","pink-100":"#fce7f3","pink-200":"#fbcfe8","pink-300":"#f9a8d4","pink-400":"#f472b6","pink-500":"#ec4899","pink-600":"#db2777","pink-700":"#be185d","pink-800":"#9d174d","pink-900":"#831843","pink-950":"#500724","rose-50":"#fff1f2","rose-100":"#ffe4e6","rose-200":"#fecdd3","rose-300":"#fda4af","rose-400":"#fb7185","rose-500":"#f43f5e","rose-600":"#e11d48","rose-700":"#be123c","rose-800":"#9f1239","rose-900":"#881337","rose-950":"#4c0519"};const t={inherit:"inherit",none:"none","bg-img-checked":`url("data:image/svg+xml,${encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' width='100%' viewBox='0 0 20 20'><path fill='none' stroke='#FFF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 10l3 3l6-6'/></svg>")}")`,"bg-img-indeterminate":`url("data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' width='100%' viewBox='0 0 20 20'><line stroke='${e.colors["violet-400"]}' x1='4' y1='10' x2='16' y2='10' stroke-width='1' /></svg>`)}")`,"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>")}")`},r={};let a={};function u(o){return o in a?r[o]=a[o]:o in t?r[o]=t[o]:o in e.colors?r[o]=e.colors[o]:r[o]=o,`var(--${o})`}e.getVariableValue=u;function s(){return Object.entries(r).map(([o,f])=>`--${o}: ${f};`).join("")}e.generateVariables=s;function c(o){a=o}e.setUserVariables=c})(W||(W={}));const w=W,j={appearance:[{values:["none","auto","menulist-button","textfield","button","checkbox"]}],b:[{values:0,styleName:"border-width",valueFormat:n.Value.px}],bx:[{values:0,styleName:"border-inline-width",valueFormat:n.Value.px}],by:[{values:0,styleName:"border-block-width",valueFormat:n.Value.px}],bt:[{values:0,styleName:"border-top-width",valueFormat:n.Value.px}],br:[{values:0,styleName:"border-right-width",valueFormat:n.Value.px}],bb:[{values:0,styleName:"border-bottom-width",valueFormat:n.Value.px}],bl:[{values:0,styleName:"border-left-width",valueFormat:n.Value.px}],borderStyle:[{styleName:"border-style",values:["solid","dashed","dotted","double","groove","ridge","inset","outset","none","hidden"]}],borderRadius:[{styleName:"border-radius",values:0,valueFormat:n.Value.rem}],borderRadiusTop:[{values:0,styleName:["border-top-left-radius","border-top-right-radius"],valueFormat:n.Value.rem}],borderRadiusRight:[{values:0,styleName:["border-top-right-radius","border-bottom-right-radius"],valueFormat:n.Value.rem}],borderRadiusBottom:[{values:0,styleName:["border-bottom-left-radius","border-bottom-right-radius"],valueFormat:n.Value.rem}],borderRadiusLeft:[{values:0,styleName:["border-top-left-radius","border-bottom-left-radius"],valueFormat:n.Value.rem}],borderRadiusTopLeft:[{values:0,styleName:"border-top-left-radius",valueFormat:n.Value.rem}],borderRadiusTopRight:[{values:0,styleName:"border-top-right-radius",valueFormat:n.Value.rem}],borderRadiusBottomRight:[{values:0,styleName:"border-bottom-right-radius",valueFormat:n.Value.rem}],borderRadiusBottomLeft:[{values:0,styleName:"border-bottom-left-radius",valueFormat:n.Value.rem}],position:[{values:["static","relative","absolute","fixed","sticky"]}],top:[{values:0,valueFormat:n.Value.rem}],right:[{values:0,valueFormat:n.Value.rem}],bottom:[{values:0,valueFormat:n.Value.rem}],left:[{values:0,valueFormat:n.Value.rem}],inset:[{values:0,valueFormat:n.Value.rem}],boxSizing:[{values:["border-box","content-box"],styleName:"box-sizing"}],contentVisibility:[{values:["visible","hidden"],styleName:"content-visibility"}],cursor:[{values:["auto","default","none","context-menu","help","pointer","progress","wait","cell","crosshair","text","vertical-text","alias","copy","move","no-drop","not-allowed","e-resize","n-resize","ne-resize","nw-resize","s-resize","se-resize","sw-resize","w-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","col-resize","row-resize","all-scroll","zoom-in","zoom-out","grab","grabbing"]}],display:[{values:["none","block","inline-block","flex","inline-flex","grid","inline-grid","contents"]}],inline:[{values:[!0],styleName:"display",valueFormat:()=>"inline-block"}],jc:[{styleName:"justify-content",values:["start","end","flex-start","flex-end","center","left","right","space-between","space-around","space-evenly","stretch"]}],ai:[{styleName:"align-items",values:["stretch","flex-start","flex-end","center","baseline","start","end","self-start","self-end"]}],alignContent:[{styleName:"align-content",values:["flex-start","flex-end","center","space-between","space-around","space-evenly","stretch","start","end","baseline"]}],flex1:[{styleName:"flex",values:[!0],valueFormat:()=>"1"}],d:[{styleName:"flex-direction",values:["row","row-reverse","column","column-reverse"]}],flexWrap:[{styleName:"flex-wrap",values:["nowrap","wrap","wrap-reverse"]}],flexGrow:[{styleName:"flex-grow",values:0}],flexShrink:[{styleName:"flex-shrink",values:0}],alignSelf:[{styleName:"align-self",values:["auto","flex-start","flex-end","center","baseline","stretch"]}],justifySelf:[{styleName:"justify-self",values:["auto","flex-start","flex-end","center","baseline","stretch"]}],fontSize:[{styleName:"font-size",values:0,valueFormat:n.Value.px},{styleName:"font-size",values:["inherit"]}],fontStyle:[{styleName:"font-style",values:["italic","normal","oblique"]}],fontWeight:[{styleName:"font-weight",values:[100,200,300,400,500,600,700,800,900]}],gap:[{values:0,valueFormat:n.Value.rem}],rowGap:[{styleName:"row-gap",values:0,valueFormat:n.Value.rem}],columnGap:[{styleName:"column-gap",values:0,valueFormat:n.Value.rem}],order:[{styleName:"order",values:0}],height:[{values:0,valueFormat:e=>`${e/4}rem`},{values:["fit"],valueFormat:()=>"100%"},{values:["fit-screen"],valueFormat:()=>"100vh"},{values:["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"],valueFormat:e=>{const[t,r]=e.split("/");return`${+t/+r*100}%`}},{values:["auto","fit-content","max-content","min-content"]}],minHeight:[{styleName:"min-height",values:0,valueFormat:e=>`${e/4}rem`},{styleName:"min-height",values:["fit"],valueFormat:()=>"100%"},{styleName:"min-height",values:["fit-screen"],valueFormat:()=>"100vh"},{styleName:"min-height",values:["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"],valueFormat:e=>{const[t,r]=e.split("/");return`${+t/+r*100}%`}},{styleName:"min-height",values:["auto","fit-content","max-content","min-content"]}],maxHeight:[{styleName:"max-height",values:0,valueFormat:e=>`${e/4}rem`},{styleName:"max-height",values:["fit"],valueFormat:()=>"100%"},{styleName:"max-height",values:["fit-screen"],valueFormat:()=>"100vh"},{styleName:"max-height",values:["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"],valueFormat:e=>{const[t,r]=e.split("/");return`${+t/+r*100}%`}},{styleName:"max-height",values:["auto","fit-content","max-content","min-content"]}],width:[{values:0,valueFormat:e=>`${e/4}rem`},{values:["fit"],valueFormat:()=>"100%"},{values:["fit-screen"],valueFormat:()=>"100vw"},{values:["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"],valueFormat:e=>{const[t,r]=e.split("/");return`${+t/+r*100}%`}},{values:["auto","fit-content","max-content","min-content"]}],minWidth:[{styleName:"min-width",values:0,valueFormat:e=>`${e/4}rem`},{styleName:"min-width",values:["fit"],valueFormat:()=>"100%"},{styleName:"min-width",values:["fit-screen"],valueFormat:()=>"100vw"},{styleName:"min-width",values:["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"],valueFormat:e=>{const[t,r]=e.split("/");return`${+t/+r*100}%`}},{styleName:"min-width",values:["auto","fit-content","max-content","min-content"]}],maxWidth:[{styleName:"max-width",values:0,valueFormat:e=>`${e/4}rem`},{styleName:"max-width",values:["fit"],valueFormat:()=>"100%"},{styleName:"max-width",values:["fit-screen"],valueFormat:()=>"100vw"},{styleName:"max-width",values:["1/2","1/3","2/3","1/4","2/4","3/4","1/5","2/5","3/5","4/5","1/6","2/6","3/6","4/6","5/6","1/12","2/12","3/12","4/12","5/12","6/12","7/12","8/12","9/12","10/12","11/12"],valueFormat:e=>{const[t,r]=e.split("/");return`${+t/+r*100}%`}},{styleName:"max-width",values:["auto","fit-content","max-content","min-content"]}],letterSpacing:[{styleName:"letter-spacing",values:0,valueFormat:n.Value.px}],lineHeight:[{styleName:"line-height",values:0,valueFormat:n.Value.px},{styleName:"line-height",values:["font-size"],valueFormat:e=>"1"}],listStyle:[{styleName:"list-style",values:["square","inside","outside","none"]}],m:[{values:0,styleName:"margin",valueFormat:n.Value.rem},{values:["auto"],styleName:"margin"}],mx:[{values:0,styleName:"margin-inline",valueFormat:n.Value.rem},{values:["auto"],styleName:"margin-inline"}],my:[{values:0,styleName:"margin-block",valueFormat:n.Value.rem},{values:["auto"],styleName:"margin-block"}],mt:[{values:0,styleName:"margin-top",valueFormat:n.Value.rem},{values:["auto"],styleName:"margin-top"}],mr:[{values:0,styleName:"margin-right",valueFormat:n.Value.rem},{values:["auto"],styleName:"margin-right"}],mb:[{values:0,styleName:"margin-bottom",valueFormat:n.Value.rem},{values:["auto"],styleName:"margin-bottom"}],ml:[{values:0,styleName:"margin-left",valueFormat:n.Value.rem},{values:["auto"],styleName:"margin-left"}],p:[{values:0,styleName:"padding",valueFormat:n.Value.rem}],px:[{values:0,styleName:"padding-inline",valueFormat:n.Value.rem}],py:[{values:0,styleName:"padding-block",valueFormat:n.Value.rem}],pt:[{values:0,styleName:"padding-top",valueFormat:n.Value.rem}],pr:[{values:0,styleName:"padding-right",valueFormat:n.Value.rem}],pb:[{values:0,styleName:"padding-bottom",valueFormat:n.Value.rem}],pl:[{values:0,styleName:"padding-left",valueFormat:n.Value.rem}],objectFit:[{styleName:"object-fit",values:["fill","contain","cover","scale-down","none"]}],opacity:[{values:[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1]}],outline:[{styleName:"outline-width",values:0,valueFormat:n.Value.px}],outlineStyle:[{styleName:"outline-style",values:["solid","dashed","dotted","double","groove","ridge","inset","outset","none","hidden"]}],outlineOffset:[{styleName:"outline-offset",values:0,valueFormat:n.Value.px}],overflow:[{values:["auto","hidden","scroll","visible"]}],overflowX:[{styleName:"overflow-x",values:["auto","hidden","scroll","visible"]}],overflowY:[{styleName:"overflow-y",values:["auto","hidden","scroll","visible"]}],pointerEvents:[{styleName:"pointer-events",values:["none","auto","all"]}],resize:[{values:["none","both","horizontal","vertical","block","inline"]}],rotate:[{values:[0,90,180,270,-90,-180,-270],valueFormat:e=>`${e}deg`}],flip:[{styleName:"scale",values:["xAxis","yAxis"],valueFormat:e=>e==="xAxis"?"-1 1":"1 -1"}],textAlign:[{styleName:"text-align",values:["left","right","center","justify"]}],textDecoration:[{styleName:"text-decoration",values:["none","underline","overline","line-through"]}],textOverflow:[{styleName:"text-overflow",values:["clip","ellipsis"]}],textTransform:[{styleName:"text-transform",values:["none","capitalize","lowercase","uppercase"]}],textWrap:[{styleName:"text-wrap",values:["wrap","nowrap","balance","pretty"]}],transition:[{styleName:"transition-property",values:["none","all"]}],transitionDuration:[{styleName:"transition-duration",values:[50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1e3],valueFormat:e=>`${e}ms`}],userSelect:[{styleName:"user-select",values:["none","auto","text","all"]}],visibility:[{styleName:"visibility",values:["visible","hidden","collapse"]}],whiteSpace:[{styleName:"white-space",values:["break-spaces","normal","nowrap","pre","pre-line","pre-wrap"]}],zIndex:[{styleName:"z-index",values:[1,2,3,4,5,10,11,12,13,14,15,100,101,102,103,104,105,1e3,1001,1002,1003,1004,1005]}],gridTemplateColumns:[{styleName:"grid-template-columns",values:0,valueFormat:e=>`repeat(${e},minmax(0,1fr))`},{styleName:"grid-template-columns",values:["subgrid"]}],gridTemplateRows:[{styleName:"grid-template-rows",values:0,valueFormat:e=>`repeat(${e},minmax(0,1fr))`},{styleName:"grid-template-rows",values:["subgrid"]}],colSpan:[{styleName:"grid-column",values:0,valueFormat:e=>`span ${e}/span ${e}`},{styleName:"grid-column",values:["full-row"],valueFormat:()=>"1/-1"}],gridColumnStart:[{styleName:"grid-column-start",values:0}],gridColumnEnd:[{styleName:"grid-column-end",values:0}],gridRow:[{styleName:"grid-row",values:0,valueFormat:e=>`span ${e}/span ${e}`},{styleName:"grid-row",values:["full-column"],valueFormat:()=>"1/-1"}],gridRowStart:[{styleName:"grid-row-start",values:0}],gridRowEnd:[{styleName:"grid-row-end",values:0}],color:[{values:Object.keys(w.colors),valueFormat:(e,t)=>t(e)}],bgColor:[{values:Object.keys(w.colors),valueFormat:(e,t)=>t(e),styleName:"background-color"}],borderColor:[{values:Object.keys(w.colors),valueFormat:(e,t)=>t(e),styleName:"border-color"}],outlineColor:[{values:Object.keys(w.colors),valueFormat:(e,t)=>t(e),styleName:"outline-color"}],fill:[{values:Object.keys(w.colors),valueFormat:(e,t)=>t(e)}],stroke:[{values:Object.keys(w.colors),valueFormat:(e,t)=>t(e)}],bgImage:[{values:["none","bg-img-checked","bg-img-indeterminate","bg-img-radio"],valueFormat:(e,t)=>t(e),styleName:"background-image"}]},ae={hover:":hover",focus:":focus-within",hasFocus:":has(:focus)",active:":active",valid:":user-valid",hasValid:":has(:valid)",invalid:":user-invalid",hasInvalid:":has(:user-invalid)",optional:":optional",hasChecked:":has(:checked)",hasRequired:":has(:required)",hasDisabled:":has([disabled])"},G={indeterminate:":indeterminate",checked:":checked",required:":required",disabled:"[disabled]",selected:'[aria-selected="true"]'},Z={...ae,...G},se=Object.entries(Z).reduce((e,[t],r)=>(e[t]=Math.pow(2,r),e),{}),q=Object.entries(Z).reduce((e,[t])=>{const r=se[t];return Object.entries(e).forEach(([a,u])=>{e[+a+r]=[...u,t]}),e},{0:[]}),K={hoverGroup:"hover",focusGroup:"focus",activeGroup:"active",disabledGroup:"disabled"},U={sm:640,md:768,lg:1024,xl:1280,xxl:1536};var M;(e=>{function t(s,c,o){const f={...s},y=f.props||{};return c.forEach(l=>{l in f&&(y[l]=f[l],delete f[l])}),o&&Object.entries(o).forEach(([l,v])=>{y[l]=v}),f.props=y,f}e.buildProps=t;function r(s){return!!s&&typeof s=="object"}e.isObject=r;function a(...s){return s.reduce((c,o)=>(Object.keys(o??{}).forEach(f=>{const y=c[f],l=o[f];f in G&&typeof l=="boolean"||(f in G&&Array.isArray(l)?c[f]=a(y,l[1]??{}):Array.isArray(y)&&Array.isArray(l)?c[f]=y.concat(...l):r(y)&&r(l)?c[f]=a(y,l):c[f]=l)}),c),{})}e.mergeDeep=a;function u(s,c){return s in c}e.isKeyOf=u})(M||(M={}));const F=M;class ce{constructor(){this._index=0,this._cache={}}getIdentity(t){return this._cache[t]||(this._cache[t]=this.getByIndex(this._index++)),this._cache[t]}getByIndex(t){const{first:r,next:a}=de,u=t-r.length;if(u<0)return r[t];const s=Math.floor(u/a.length),c=u-s*a.length;return this.getByIndex(s)+a[c]}}const de={first:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",next:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"};var I;(e=>{e.components={}})(I||(I={}));function fe(e){const{clean:t,theme:r,component:a}=e;return E.useMemo(()=>{var c;if(t)return;const u=a==null?void 0:a.split(".");if(!u)return;const s=u.reduce((o,f,y)=>{var l,v;return y===0?(l=I.components)==null?void 0:l[f]:(v=o==null?void 0:o.children)==null?void 0:v[f]},void 0);if(s)return r?F.mergeDeep(s.styles,((c=s.themes)==null?void 0:c[r])??{}):s.styles},[a,t,r])}const me=new ce,ve=typeof window<"u"&&typeof window.document<"u";var oe;const ie=typeof process=="object"&&((oe=process.env)==null?void 0:oe.NODE_ENV)==="test",be=ve&&!ie?E.useLayoutEffect:E.useEffect,ne="_b",S="_s";function ye(e,t){be(_.flush,[e]);const r=fe(e);return E.useMemo(()=>{const a=[t?S:ne],u=r?F.mergeDeep(r,e):e;return _.addClassNames(u,a,[]),a},[e,t,r])}var _;(e=>{let t=!0,r={};function a(l,v,g,b,i){Object.entries(l).forEach(([m,d])=>{if(F.isKeyOf(m,j))c(m,d,v,g,b,i);else if(F.isKeyOf(m,ae))a(d,v,[...g,m],b,i);else if(F.isKeyOf(m,G)){if(Array.isArray(d)){const[x,N]=d;a(N,v,[...g,m],b,i)}F.isObject(d)&&a(d,v,[...g,m],b,i)}else F.isKeyOf(m,U)?a(d,v,g,m,i):F.isKeyOf(m,K)&&(typeof d=="string"?v.push(`${K[m]}-${d}`):Object.entries(d).forEach(([x,N])=>{a(N,v,[...g,K[m]],b,x)}))})}e.addClassNames=a;function u(){if(!t)return;console.debug("\x1B[36m%s\x1B[0m","[react-box]: flush");const l=Object.entries(j).reduce((m,[d],x)=>(m[d]=x,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;}
|
|
2
2
|
html{font-size: 16px;font-family: Arial, sans-serif;}
|
|
3
3
|
body{margin: 0;line-height: var(--lineHeight);font-size: var(--fontSize);}
|
|
4
4
|
a,ul{all: unset;}
|
|
5
5
|
.${ne}{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;}
|
|
6
|
-
.${
|
|
7
|
-
`,g=Object.entries(r);g.sort(([m],[
|
|
6
|
+
.${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);}
|
|
7
|
+
`,g=Object.entries(r);g.sort(([m],[d])=>(U[m]??0)-(U[d]??0));const b=g.reduce((m,[d,x])=>(d!=="normal"&&m.push(`@media(min-width: ${U[d]}px){`),Object.entries(x).forEach(([N,L])=>{const{__parents:P,...ue}=L,ee=Object.entries(ue);ee.sort(([$],[R])=>l[$]-l[R]),ee.forEach(([$,R])=>{R.forEach(V=>{var k,H;const h=j[$].find(C=>Array.isArray(C.values)?C.values.includes(V):typeof V==typeof C.values);if(!h)return;const z=o($,V,+N,d),D=q[+N].map(C=>Z[C]).join(""),p=((k=h.selector)==null?void 0:k.call(h,`.${z}`,D))??`.${z}${D}`,T=Array.isArray(h.styleName)?h.styleName:[h.styleName??$],A=((H=h.valueFormat)==null?void 0:H.call(h,V,w.getVariableValue))??V;m.push(`${p}{${T.map(C=>`${C}:${A}`).join(";")}}`)})}),P&&Object.entries(P).forEach(([$,R])=>{const V=Object.entries(R);V.sort(([O],[h])=>l[O]-l[h]),V.forEach(([O,h])=>{h.forEach(z=>{var te,re;const p=j[O].find(B=>Array.isArray(B.values)?B.values.includes(z):typeof z==typeof B.values);if(!p)return;const T=o(O,z,+N,d,$),[A]=q[+N],k=((te=p.selector)==null?void 0:te.call(p,`.${A}-${$}:${A} .${T}`,""))??`.${A}-${$}:${A} .${T}`,H=Array.isArray(p.styleName)?p.styleName:[p.styleName??O],C=((re=p.valueFormat)==null?void 0:re.call(p,z,w.getVariableValue))??z;m.push(`${k}{${H.map(B=>`${B}:${C}`).join(";")}}`)})})})}),d!=="normal"&&m.push("}"),m),[v]);b.unshift(`:root{${w.generateVariables()}}`);const i=y();i.innerHTML=b.join(""),t=!1}e.flush=u;function s(){r={}}e.clear=s;function c(l,v,g,b,i="normal",m){if(v==null)return;const d=b.reduce((N,L)=>N+se[L],0);r[i]?r[i][d]?r[i][d][l]||(r[i][d][l]=new Set):r[i][d]={[l]:new Set}:r[i]={[d]:{[l]:new Set}},m?(r[i][d].__parents?r[i][d].__parents[m]?r[i][d].__parents[m][l]||(r[i][d].__parents[m][l]=new Set):r[i][d].__parents[m]={[l]:new Set}:r[i][d].__parents={[m]:{[l]:new Set}},r[i][d].__parents[m][l].has(v)||(r[i][d].__parents[m][l].add(v),t=!0)):r[i][d][l].has(v)||(r[i][d][l].add(v),t=!0);const x=o(l,v,d,i,m);g.push(x)}function o(l,v,g,b,i){const m=q[g],d=`${b==="normal"?"":`${b}-`}${m.map(x=>`${x}-`).join("")}${i?`${i}-`:""}${l}-${v}`;return ie?d:me.getIdentity(d)}const f="crono-styles";function y(){let l=document.getElementById(f);return l||(l=document.createElement("style"),l.setAttribute("id",f),l.setAttribute("type","text/css"),document.head.insertBefore(l,document.head.firstChild)),l}})(_||(_={}));exports.StylesContext=void 0;(e=>{e.flush=_.flush,e.clear=_.clear})(exports.StylesContext||(exports.StylesContext={}));var X;(e=>{function t(r,a,u){return w.setUserVariables(r),Object.entries(a).forEach(([s,c])=>{j[s]=c}),Object.entries(u).forEach(([s,c])=>{const o=j[s];j[s]=o?[...c,...o]:c}),{extendedProps:a,extendedPropTypes:u}}e.extend=t})(X||(X={}));const ge=X;var Y;(e=>{const t={button:{styles:{display:"inline-flex",color:"white",bgColor:"violet-500",borderColor:"violet-500",p:3,cursor:"pointer",b:1,borderRadius:1,userSelect:"none",lineHeight:20,hover:{bgColor:"violet-600",borderColor:"violet-600"},disabled:{cursor:"not-allowed",bgColor:"violet-50",color:"gray-400",borderColor:"gray-300"}}},textbox:{styles:{display:"inline-block",b:1,borderColor:"violet-200",bgColor:"violet-50",color:"violet-950",borderRadius:1,p:3,transition:"none",lineHeight:20,hover:{borderColor:"violet-300"},focus:{outline:1,borderColor:"violet-500",outlineColor:"violet-500"},disabled:{cursor:"not-allowed",bgColor:"violet-50",color:"gray-400",borderColor:"gray-300"}}},textarea:{styles:{display:"inline-block",b:1,borderColor:"violet-200",bgColor:"violet-50",color:"violet-950",borderRadius:1,p:3,transition:"none",hover:{borderColor:"violet-300"},focus:{outline:1,borderColor:"violet-500",outlineColor:"violet-500"},disabled:{cursor:"not-allowed",bgColor:"violet-50",color:"gray-400",borderColor:"gray-300",resize:"none"}}},checkbox:{styles:{display:"inline-block",appearance:"none",b:1,borderColor:"violet-300",borderRadius:1,p:2,cursor:"pointer",transition:"none",hover:{borderColor:"violet-500"},focus:{outline:2,outlineOffset:2,outlineColor:"violet-500"},checked:{bgColor:"violet-500",borderColor:"violet-500",bgImage:"bg-img-checked"},indeterminate:{color:"violet-500",bgImage:"bg-img-indeterminate"},disabled:{cursor:"not-allowed",bgColor:"violet-100",color:"gray-400",borderColor:"gray-300"}}},radioButton:{styles:{appearance:"none",b:1,borderColor:"violet-300",borderRadius:3,p:2,cursor:"pointer",transition:"none",hover:{borderColor:"violet-500"},focus:{outline:2,outlineOffset:2,outlineColor:"violet-500"},checked:{bgColor:"violet-500",borderColor:"violet-500",bgImage:"bg-img-radio"},disabled:{cursor:"not-allowed",bgColor:"violet-100",color:"gray-400",borderColor:"violet-200"}}},dropdown:{styles:{display:"inline-flex",ai:"center",gap:2,jc:"space-between",p:3,cursor:"pointer",bgColor:"violet-50",color:"violet-950",b:1,borderColor:"violet-200",borderRadius:1,userSelect:"none",lineHeight:20,minWidth:40,transition:"none",hover:{borderColor:"violet-300"},focus:{outline:1,borderColor:"violet-500",outlineColor:"violet-500"},disabled:{cursor:"not-allowed",bgColor:"violet-50",color:"gray-400",borderColor:"gray-300"}},children:{items:{styles:{display:"flex",d:"column",gap:1,p:1,b:1,borderRadius:1,position:"relative",top:1,bgColor:"white",overflow:"auto",maxHeight:62,borderColor:"violet-300",color:"violet-950"}},item:{styles:{display:"flex",width:"fit",p:3,cursor:"pointer",borderRadius:1,hover:{bgColor:"gray-100"},focus:{bgColor:"violet-50"},selected:{bgColor:"violet-50",cursor:"default",hover:{bgColor:"violet-100"}}},themes:{multiple:{selected:{cursor:"pointer"}}}},unselectItem:{styles:{display:"flex",width:"fit",p:3,cursor:"pointer",lineHeight:20,borderRadius:1,color:"violet-400",hover:{bgColor:"violet-50"},focus:{bgColor:"violet-50"},selected:{bgColor:"violet-50",cursor:"default"}}},emptyItem:{styles:{display:"flex",width:"fit",p:3,cursor:"default",lineHeight:20,borderRadius:1,color:"violet-400"}}}}};function r(a){const{components:u,...s}=a,c=u??{};Object.entries(s).forEach(([o,f])=>{c[o]=f}),I.components=F.mergeDeep(t,c)}e.setup=r,I.components={...t}})(Y||(Y={}));const he=Y,pe={selected:"aria-selected"};var J;(e=>{function t(r,a,u){r!==void 0&&r!=null&&(u[pe[a]??a]=Array.isArray(r)?r[0]:r)}e.assignBooleanProp=t})(J||(J={}));const we=J;Array.prototype.removeBy||(Array.prototype.removeBy=function(e){return this.filter(e)});function xe(e=null){const[t,r]=E.useState(!1),a=E.useRef(null);return E.useEffect(()=>{function u(c){const o=e??a.current;(o==null?void 0:o.contains(c.target))===!1&&r(!1)}function s(c){c.key==="Escape"&&r(!1)}return t&&(window.addEventListener("mousedown",u),window.addEventListener("keydown",s)),()=>{window.removeEventListener("mousedown",u),window.removeEventListener("keydown",s)}},[e,t]),[t,r,a]}function Ne(){return E.useMemo(()=>{const e="crono-box";let t=document.getElementById(e);return t||(t=document.createElement("div"),t.id=e,document.body.appendChild(t)),t},[])}var Q;(e=>{function t(a){const u=Array.from(a.elements).reduce((s,c)=>{const o=c.name;return o&&(s[o]||(s[o]=[]),s[o].push(c)),s},{});return Object.entries(u).reduce((s,[c,o])=>{if(o.length===1){const f=o[0];r(s,c,f.type==="checkbox"||f.type==="radio"?f.checked:f.value)}else{const f=o.reduce((y,l)=>(l.type==="checkbox"||l.type==="radio"?l.checked&&y.push(l.value):y.push(l.value),y),[]);r(s,c,f)}return s},{})}e.getFormEntries=t;function r(a,u,s){if(u.includes(".")){const c=u.split(".");let o=a;c.forEach((f,y)=>{if(c.length>y+1){const l=f.match(/^(.+)\[(\d)\]$/);if(l){const[,v,g]=l;o[v]=o[v]||[],o[v][g]=o[v][g]||{},o=o[v][g]}else o[f]=o[f]||{},o=o[f]}else o[f]=s})}else a[u]=s}})(Q||(Q={}));const Fe=Q;exports.BoxExtends=ge;exports.BoxUtils=we;exports.FormUtils=Fe;exports.ObjectUtils=F;exports.Theme=he;exports.Variables=w;exports.classNames=le;exports.usePortalContainer=Ne;exports.useStyles=ye;exports.useVisibility=xe;
|
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,22 +40,22 @@ 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 =
|
|
46
|
+
t.variables = d;
|
|
47
47
|
function o(b) {
|
|
48
48
|
return (i, m) => `var(--${b}${m});`;
|
|
49
49
|
}
|
|
50
50
|
t.svgVariables = o;
|
|
51
|
-
function
|
|
51
|
+
function f(b, i) {
|
|
52
52
|
return `repeat(${i},minmax(0,1fr))`;
|
|
53
53
|
}
|
|
54
|
-
t.gridColumns =
|
|
55
|
-
function
|
|
54
|
+
t.gridColumns = f;
|
|
55
|
+
function y(b, i) {
|
|
56
56
|
return i === "full-row" ? "1/-1" : `span ${i}/span ${i}`;
|
|
57
57
|
}
|
|
58
|
-
t.gridColumn =
|
|
58
|
+
t.gridColumn = y;
|
|
59
59
|
function a(b, i) {
|
|
60
60
|
return `${i}ms`;
|
|
61
61
|
}
|
|
@@ -64,10 +64,10 @@ var n;
|
|
|
64
64
|
return `${i}deg`;
|
|
65
65
|
}
|
|
66
66
|
t.rotate = v;
|
|
67
|
-
function
|
|
67
|
+
function g(b, i) {
|
|
68
68
|
return i === "xAxis" ? "-1 1" : "1 -1";
|
|
69
69
|
}
|
|
70
|
-
t.flip =
|
|
70
|
+
t.flip = g;
|
|
71
71
|
})(e.Value || (e.Value = {}));
|
|
72
72
|
})(n || (n = {}));
|
|
73
73
|
var W;
|
|
@@ -333,20 +333,20 @@ var W;
|
|
|
333
333
|
"bg-img-radio": `url("data:image/svg+xml,${encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' width='100%' viewBox='0 0 20 20'><circle fill='#FFF' cx='10' cy='10' r='5'/></svg>")}")`
|
|
334
334
|
}, r = {};
|
|
335
335
|
let l = {};
|
|
336
|
-
function
|
|
336
|
+
function u(o) {
|
|
337
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})`;
|
|
338
338
|
}
|
|
339
|
-
e.getVariableValue =
|
|
339
|
+
e.getVariableValue = u;
|
|
340
340
|
function s() {
|
|
341
|
-
return Object.entries(r).map(([o,
|
|
341
|
+
return Object.entries(r).map(([o, f]) => `--${o}: ${f};`).join("");
|
|
342
342
|
}
|
|
343
343
|
e.generateVariables = s;
|
|
344
|
-
function
|
|
344
|
+
function d(o) {
|
|
345
345
|
l = o;
|
|
346
346
|
}
|
|
347
|
-
e.setUserVariables =
|
|
347
|
+
e.setUserVariables = d;
|
|
348
348
|
})(W || (W = {}));
|
|
349
|
-
const
|
|
349
|
+
const N = W, E = {
|
|
350
350
|
/** The appearance CSS property is used to display UI elements with platform-specific styling, based on the operating system's theme. */
|
|
351
351
|
appearance: [
|
|
352
352
|
{
|
|
@@ -1469,31 +1469,43 @@ const z = W, E = {
|
|
|
1469
1469
|
],
|
|
1470
1470
|
color: [
|
|
1471
1471
|
{
|
|
1472
|
-
values: Object.keys(
|
|
1472
|
+
values: Object.keys(N.colors),
|
|
1473
1473
|
valueFormat: (e, t) => t(e)
|
|
1474
1474
|
}
|
|
1475
1475
|
],
|
|
1476
1476
|
bgColor: [
|
|
1477
1477
|
{
|
|
1478
|
-
values: Object.keys(
|
|
1478
|
+
values: Object.keys(N.colors),
|
|
1479
1479
|
valueFormat: (e, t) => t(e),
|
|
1480
1480
|
styleName: "background-color"
|
|
1481
1481
|
}
|
|
1482
1482
|
],
|
|
1483
1483
|
borderColor: [
|
|
1484
1484
|
{
|
|
1485
|
-
values: Object.keys(
|
|
1485
|
+
values: Object.keys(N.colors),
|
|
1486
1486
|
valueFormat: (e, t) => t(e),
|
|
1487
1487
|
styleName: "border-color"
|
|
1488
1488
|
}
|
|
1489
1489
|
],
|
|
1490
1490
|
outlineColor: [
|
|
1491
1491
|
{
|
|
1492
|
-
values: Object.keys(
|
|
1492
|
+
values: Object.keys(N.colors),
|
|
1493
1493
|
valueFormat: (e, t) => t(e),
|
|
1494
1494
|
styleName: "outline-color"
|
|
1495
1495
|
}
|
|
1496
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
|
+
],
|
|
1497
1509
|
bgImage: [
|
|
1498
1510
|
{
|
|
1499
1511
|
values: ["none", "bg-img-checked", "bg-img-indeterminate", "bg-img-radio"],
|
|
@@ -1514,20 +1526,20 @@ const z = W, E = {
|
|
|
1514
1526
|
hasChecked: ":has(:checked)",
|
|
1515
1527
|
hasRequired: ":has(:required)",
|
|
1516
1528
|
hasDisabled: ":has([disabled])"
|
|
1517
|
-
},
|
|
1529
|
+
}, U = {
|
|
1518
1530
|
indeterminate: ":indeterminate",
|
|
1519
1531
|
checked: ":checked",
|
|
1520
1532
|
required: ":required",
|
|
1521
1533
|
disabled: "[disabled]",
|
|
1522
1534
|
selected: '[aria-selected="true"]'
|
|
1523
|
-
}, Z = { ...se, ...
|
|
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: [] }
|
|
@@ -1536,7 +1548,7 @@ const z = W, E = {
|
|
|
1536
1548
|
focusGroup: "focus",
|
|
1537
1549
|
activeGroup: "active",
|
|
1538
1550
|
disabledGroup: "disabled"
|
|
1539
|
-
},
|
|
1551
|
+
}, H = {
|
|
1540
1552
|
sm: 640,
|
|
1541
1553
|
md: 768,
|
|
1542
1554
|
lg: 1024,
|
|
@@ -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
|
-
a in
|
|
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]);
|
|
1552
1564
|
}), o && Object.entries(o).forEach(([a, v]) => {
|
|
1553
|
-
|
|
1554
|
-
}),
|
|
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
|
|
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,14 +1591,14 @@ 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 } =
|
|
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
|
-
const
|
|
1601
|
+
const ye = {
|
|
1590
1602
|
first: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
1591
1603
|
next: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
|
1592
1604
|
};
|
|
@@ -1594,19 +1606,19 @@ var I;
|
|
|
1594
1606
|
((e) => {
|
|
1595
1607
|
e.components = {};
|
|
1596
1608
|
})(I || (I = {}));
|
|
1597
|
-
function
|
|
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 =
|
|
1614
|
+
const u = l == null ? void 0 : l.split(".");
|
|
1615
|
+
if (!u) return;
|
|
1616
|
+
const s = u.reduce((o, f, y) => {
|
|
1605
1617
|
var a, v;
|
|
1606
|
-
return
|
|
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";
|
|
@@ -1614,34 +1626,34 @@ var ae;
|
|
|
1614
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";
|
|
1615
1627
|
function Fe(e, t) {
|
|
1616
1628
|
we(S.flush, [e]);
|
|
1617
|
-
const r =
|
|
1629
|
+
const r = ge(e);
|
|
1618
1630
|
return Q(() => {
|
|
1619
|
-
const l = [t ? A : ue],
|
|
1620
|
-
return S.addClassNames(
|
|
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
1635
|
var S;
|
|
1624
1636
|
((e) => {
|
|
1625
1637
|
let t = !0, r = {};
|
|
1626
|
-
function l(a, v,
|
|
1638
|
+
function l(a, v, g, b, i) {
|
|
1627
1639
|
Object.entries(a).forEach(([m, c]) => {
|
|
1628
|
-
if (
|
|
1629
|
-
|
|
1630
|
-
else if (
|
|
1631
|
-
l(c, v, [...
|
|
1632
|
-
else if (
|
|
1640
|
+
if (C.isKeyOf(m, E))
|
|
1641
|
+
d(m, c, v, g, b, i);
|
|
1642
|
+
else if (C.isKeyOf(m, se))
|
|
1643
|
+
l(c, v, [...g, m], b, i);
|
|
1644
|
+
else if (C.isKeyOf(m, U)) {
|
|
1633
1645
|
if (Array.isArray(c)) {
|
|
1634
1646
|
const [w, x] = c;
|
|
1635
|
-
l(x, v, [...
|
|
1647
|
+
l(x, v, [...g, m], b, i);
|
|
1636
1648
|
}
|
|
1637
|
-
|
|
1638
|
-
} else
|
|
1639
|
-
l(x, v, [...
|
|
1649
|
+
C.isObject(c) && l(c, v, [...g, m], b, i);
|
|
1650
|
+
} else C.isKeyOf(m, H) ? l(c, v, g, m, i) : C.isKeyOf(m, K) && (typeof c == "string" ? v.push(`${K[m]}-${c}`) : Object.entries(c).forEach(([w, x]) => {
|
|
1651
|
+
l(x, v, [...g, K[m]], b, w);
|
|
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
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;}
|
|
@@ -1650,60 +1662,60 @@ 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
|
-
`,
|
|
1654
|
-
|
|
1655
|
-
([m], [c]) => (
|
|
1665
|
+
`, g = Object.entries(r);
|
|
1666
|
+
g.sort(
|
|
1667
|
+
([m], [c]) => (H[m] ?? 0) - (H[c] ?? 0)
|
|
1656
1668
|
);
|
|
1657
|
-
const b =
|
|
1658
|
-
(m, [c, w]) => (c !== "normal" && m.push(`@media(min-width: ${
|
|
1659
|
-
const { __parents: P, ...de } =
|
|
1660
|
-
ee.sort(([
|
|
1661
|
-
_.forEach((
|
|
1662
|
-
var B,
|
|
1663
|
-
const h = E[
|
|
1669
|
+
const b = g.reduce(
|
|
1670
|
+
(m, [c, w]) => (c !== "normal" && m.push(`@media(min-width: ${H[c]}px){`), Object.entries(w).forEach(([x, G]) => {
|
|
1671
|
+
const { __parents: P, ...de } = G, ee = Object.entries(de);
|
|
1672
|
+
ee.sort(([F], [_]) => a[F] - a[_]), ee.forEach(([F, _]) => {
|
|
1673
|
+
_.forEach((V) => {
|
|
1674
|
+
var B, k;
|
|
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}{${T.map((
|
|
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((R) => Array.isArray(R.values) ? R.values.includes(
|
|
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 T = o(j,
|
|
1676
|
-
m.push(`${B}{${
|
|
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{${
|
|
1684
|
-
const i =
|
|
1695
|
+
b.unshift(`:root{${N.generateVariables()}}`);
|
|
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,
|
|
1706
|
+
const c = b.reduce((x, G) => x + ie[G], 0);
|
|
1695
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);
|
|
1696
1708
|
const w = o(a, v, c, i, m);
|
|
1697
|
-
|
|
1709
|
+
g.push(w);
|
|
1698
1710
|
}
|
|
1699
|
-
function o(a, v,
|
|
1700
|
-
const m = D[
|
|
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
|
|
1704
|
-
function
|
|
1705
|
-
let a = document.getElementById(
|
|
1706
|
-
return a || (a = document.createElement("style"), a.setAttribute("id",
|
|
1715
|
+
const f = "crono-styles";
|
|
1716
|
+
function y() {
|
|
1717
|
+
let a = document.getElementById(f);
|
|
1718
|
+
return a || (a = document.createElement("style"), a.setAttribute("id", f), a.setAttribute("type", "text/css"), document.head.insertBefore(a, document.head.firstChild)), a;
|
|
1707
1719
|
}
|
|
1708
1720
|
})(S || (S = {}));
|
|
1709
1721
|
var oe;
|
|
@@ -1712,13 +1724,13 @@ var oe;
|
|
|
1712
1724
|
})(oe || (oe = {}));
|
|
1713
1725
|
var M;
|
|
1714
1726
|
((e) => {
|
|
1715
|
-
function t(r, l,
|
|
1716
|
-
return
|
|
1717
|
-
E[s] =
|
|
1718
|
-
}), Object.entries(
|
|
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]) => {
|
|
1719
1731
|
const o = E[s];
|
|
1720
|
-
E[s] = o ? [...
|
|
1721
|
-
}), { extendedProps: l, extendedPropTypes:
|
|
1732
|
+
E[s] = o ? [...d, ...o] : d;
|
|
1733
|
+
}), { extendedProps: l, extendedPropTypes: u };
|
|
1722
1734
|
}
|
|
1723
1735
|
e.extend = t;
|
|
1724
1736
|
})(M || (M = {}));
|
|
@@ -1925,21 +1937,30 @@ var X;
|
|
|
1925
1937
|
width: "fit",
|
|
1926
1938
|
p: 3,
|
|
1927
1939
|
cursor: "pointer",
|
|
1928
|
-
lineHeight: 20,
|
|
1929
1940
|
borderRadius: 1,
|
|
1930
1941
|
hover: {
|
|
1931
|
-
bgColor: "
|
|
1942
|
+
bgColor: "gray-100"
|
|
1932
1943
|
},
|
|
1933
1944
|
focus: {
|
|
1934
1945
|
bgColor: "violet-50"
|
|
1935
1946
|
},
|
|
1936
1947
|
selected: {
|
|
1937
1948
|
bgColor: "violet-50",
|
|
1938
|
-
cursor: "default"
|
|
1949
|
+
cursor: "default",
|
|
1950
|
+
hover: {
|
|
1951
|
+
bgColor: "violet-100"
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
},
|
|
1955
|
+
themes: {
|
|
1956
|
+
multiple: {
|
|
1957
|
+
selected: {
|
|
1958
|
+
cursor: "pointer"
|
|
1959
|
+
}
|
|
1939
1960
|
}
|
|
1940
1961
|
}
|
|
1941
1962
|
},
|
|
1942
|
-
|
|
1963
|
+
unselectItem: {
|
|
1943
1964
|
styles: {
|
|
1944
1965
|
display: "flex",
|
|
1945
1966
|
width: "fit",
|
|
@@ -1960,7 +1981,7 @@ var X;
|
|
|
1960
1981
|
}
|
|
1961
1982
|
}
|
|
1962
1983
|
},
|
|
1963
|
-
|
|
1984
|
+
emptyItem: {
|
|
1964
1985
|
styles: {
|
|
1965
1986
|
display: "flex",
|
|
1966
1987
|
width: "fit",
|
|
@@ -1975,10 +1996,10 @@ var X;
|
|
|
1975
1996
|
}
|
|
1976
1997
|
};
|
|
1977
1998
|
function r(l) {
|
|
1978
|
-
const { components:
|
|
1979
|
-
Object.entries(s).forEach(([o,
|
|
1980
|
-
|
|
1981
|
-
}), I.components =
|
|
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);
|
|
1982
2003
|
}
|
|
1983
2004
|
e.setup = r, I.components = { ...t };
|
|
1984
2005
|
})(X || (X = {}));
|
|
@@ -1987,89 +2008,89 @@ const Ce = X, xe = {
|
|
|
1987
2008
|
};
|
|
1988
2009
|
var Y;
|
|
1989
2010
|
((e) => {
|
|
1990
|
-
function t(r, l,
|
|
1991
|
-
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);
|
|
1992
2013
|
}
|
|
1993
2014
|
e.assignBooleanProp = t;
|
|
1994
2015
|
})(Y || (Y = {}));
|
|
1995
2016
|
const Ve = Y;
|
|
1996
|
-
|
|
1997
|
-
return
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
return t || (t = document.createElement("div"), t.id = e, document.body.appendChild(t)), t;
|
|
2001
|
-
}, []);
|
|
2002
|
-
}
|
|
2003
|
-
function Ee(e = null) {
|
|
2017
|
+
Array.prototype.removeBy || (Array.prototype.removeBy = function(e) {
|
|
2018
|
+
return this.filter(e);
|
|
2019
|
+
});
|
|
2020
|
+
function ze(e = null) {
|
|
2004
2021
|
const [t, r] = fe(!1), l = me(null);
|
|
2005
2022
|
return le(() => {
|
|
2006
|
-
function d
|
|
2007
|
-
const
|
|
2008
|
-
(
|
|
2009
|
-
}
|
|
2010
|
-
function s() {
|
|
2011
|
-
r(!1);
|
|
2023
|
+
function u(d) {
|
|
2024
|
+
const o = e ?? l.current;
|
|
2025
|
+
(o == null ? void 0 : o.contains(d.target)) === !1 && r(!1);
|
|
2012
2026
|
}
|
|
2013
|
-
function
|
|
2014
|
-
|
|
2027
|
+
function s(d) {
|
|
2028
|
+
d.key === "Escape" && r(!1);
|
|
2015
2029
|
}
|
|
2016
|
-
return t && (window.addEventListener("mousedown",
|
|
2017
|
-
window.removeEventListener("mousedown",
|
|
2030
|
+
return t && (window.addEventListener("mousedown", u), window.addEventListener("keydown", s)), () => {
|
|
2031
|
+
window.removeEventListener("mousedown", u), window.removeEventListener("keydown", s);
|
|
2018
2032
|
};
|
|
2019
2033
|
}, [e, t]), [t, r, l];
|
|
2020
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
|
+
}
|
|
2021
2042
|
var J;
|
|
2022
2043
|
((e) => {
|
|
2023
2044
|
function t(l) {
|
|
2024
|
-
const
|
|
2025
|
-
(s,
|
|
2026
|
-
const o =
|
|
2027
|
-
return o && (s[o] || (s[o] = []), s[o].push(
|
|
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;
|
|
2028
2049
|
},
|
|
2029
2050
|
{}
|
|
2030
2051
|
);
|
|
2031
|
-
return Object.entries(
|
|
2052
|
+
return Object.entries(u).reduce((s, [d, o]) => {
|
|
2032
2053
|
if (o.length === 1) {
|
|
2033
|
-
const
|
|
2034
|
-
r(s,
|
|
2054
|
+
const f = o[0];
|
|
2055
|
+
r(s, d, f.type === "checkbox" || f.type === "radio" ? f.checked : f.value);
|
|
2035
2056
|
} else {
|
|
2036
|
-
const
|
|
2037
|
-
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);
|
|
2038
2059
|
}
|
|
2039
2060
|
return s;
|
|
2040
2061
|
}, {});
|
|
2041
2062
|
}
|
|
2042
2063
|
e.getFormEntries = t;
|
|
2043
|
-
function r(l,
|
|
2044
|
-
if (
|
|
2045
|
-
const
|
|
2064
|
+
function r(l, u, s) {
|
|
2065
|
+
if (u.includes(".")) {
|
|
2066
|
+
const d = u.split(".");
|
|
2046
2067
|
let o = l;
|
|
2047
|
-
|
|
2048
|
-
if (
|
|
2049
|
-
const a =
|
|
2068
|
+
d.forEach((f, y) => {
|
|
2069
|
+
if (d.length > y + 1) {
|
|
2070
|
+
const a = f.match(/^(.+)\[(\d)\]$/);
|
|
2050
2071
|
if (a) {
|
|
2051
|
-
const [, v,
|
|
2052
|
-
o[v] = o[v] || [], o[v][
|
|
2072
|
+
const [, v, g] = a;
|
|
2073
|
+
o[v] = o[v] || [], o[v][g] = o[v][g] || {}, o = o[v][g];
|
|
2053
2074
|
} else
|
|
2054
|
-
o[
|
|
2075
|
+
o[f] = o[f] || {}, o = o[f];
|
|
2055
2076
|
} else
|
|
2056
|
-
o[
|
|
2077
|
+
o[f] = s;
|
|
2057
2078
|
});
|
|
2058
2079
|
} else
|
|
2059
|
-
l[
|
|
2080
|
+
l[u] = s;
|
|
2060
2081
|
}
|
|
2061
2082
|
})(J || (J = {}));
|
|
2062
2083
|
const je = J;
|
|
2063
2084
|
export {
|
|
2064
2085
|
$e as B,
|
|
2065
2086
|
je as F,
|
|
2066
|
-
|
|
2087
|
+
C as O,
|
|
2067
2088
|
oe as S,
|
|
2068
2089
|
Ce as T,
|
|
2069
|
-
|
|
2090
|
+
N as V,
|
|
2070
2091
|
Ve as a,
|
|
2071
|
-
|
|
2092
|
+
ze as b,
|
|
2072
2093
|
ve as c,
|
|
2073
|
-
|
|
2094
|
+
Ee as d,
|
|
2074
2095
|
Fe as u
|
|
2075
2096
|
};
|