@cronocode/react-box 3.0.5 → 3.0.6
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/box.cjs +1 -1
- package/box.mjs +13 -13
- package/components/dropdown.cjs +1 -1
- package/components/dropdown.d.ts +6 -2
- package/components/dropdown.mjs +86 -59
- package/components/tooltip.cjs +1 -1
- package/components/tooltip.d.ts +2 -2
- package/components/tooltip.mjs +16 -14
- package/core/boxStyles.d.ts +4 -2
- package/core/variables.d.ts +1 -2
- package/core.cjs +2 -2
- package/core.mjs +162 -119
- package/package.json +1 -1
package/box.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const o=require("react"),e=require("./core.cjs");function h(a,l){const{tag:c="div",children:n,props:m,className:p,style:i,disabled:x,required:B,checked:g,selected:f}=a,v=e.useStyles(a,c==="svg"),r=o.useMemo(()=>{const b=e.classNames(v,p).join(" "),s={...m,className:b};return e.BoxUtils.assignBooleanProp(x,"disabled",s),e.BoxUtils.assignBooleanProp(B,"required",s),e.BoxUtils.assignBooleanProp(g,"checked",s),e.BoxUtils.assignBooleanProp(f,"selected",s),i&&(s.style=i),l&&(s.ref=l),s},[a]),[P,u]=o.useState(!1),d=typeof n=="function";return d&&(r.onMouseEnter=()=>u(!0),r.onMouseLeave=()=>u(!1)),o.createElement(c,r,d?n({isHover:P}):n)}const t=o.memo(o.forwardRef(h));t.extend=e.BoxExtends.extend;t.themeSetup=e.Theme.setup;t.getVariableValue=e.Variables.getVariableValue;module.exports=t;
|
package/box.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import V, { memo as b, forwardRef as h, useMemo as y, useState as
|
|
2
|
-
import { B as
|
|
3
|
-
function
|
|
4
|
-
const { tag: l = "div", children:
|
|
5
|
-
const
|
|
1
|
+
import V, { memo as b, forwardRef as h, useMemo as y, useState as N } from "react";
|
|
2
|
+
import { B as S, T as C, V as E, u as H, c as M, a as s } from "./core.mjs";
|
|
3
|
+
function T(a, r) {
|
|
4
|
+
const { tag: l = "div", children: o, props: d, className: m, style: c, disabled: p, required: f, checked: g, selected: B } = a, x = H(a, l === "svg"), t = y(() => {
|
|
5
|
+
const P = M(x, m).join(" "), e = {
|
|
6
6
|
...d,
|
|
7
|
-
className:
|
|
7
|
+
className: P
|
|
8
8
|
};
|
|
9
|
-
return
|
|
10
|
-
}, [
|
|
11
|
-
return u && (
|
|
9
|
+
return s.assignBooleanProp(p, "disabled", e), s.assignBooleanProp(f, "required", e), s.assignBooleanProp(g, "checked", e), s.assignBooleanProp(B, "selected", e), c && (e.style = c), r && (e.ref = r), e;
|
|
10
|
+
}, [a]), [v, i] = N(!1), u = typeof o == "function";
|
|
11
|
+
return u && (t.onMouseEnter = () => i(!0), t.onMouseLeave = () => i(!1)), V.createElement(l, t, u ? o({ isHover: v }) : o);
|
|
12
12
|
}
|
|
13
|
-
const n = b(h(
|
|
14
|
-
n.extend =
|
|
15
|
-
n.themeSetup =
|
|
16
|
-
n.getVariableValue =
|
|
13
|
+
const n = b(h(T));
|
|
14
|
+
n.extend = S.extend;
|
|
15
|
+
n.themeSetup = C.setup;
|
|
16
|
+
n.getVariableValue = E.getVariableValue;
|
|
17
17
|
export {
|
|
18
18
|
n as default
|
|
19
19
|
};
|
package/components/dropdown.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),c=require("react"),h=require("../box.cjs"),O=require("./tooltip.cjs"),P=require("./baseSvg.cjs"),E=require("../core.cjs"),A=require("./textbox.cjs"),U=require("./flex.cjs"),y=require("./button.cjs");function W(n,m){var g;const{children:o,name:N,isSearchable:p,searchPlaceholder:L,onChange:x,selectedValue:T}=n,[a,b]=c.useState(""),f=c.useMemo(()=>(Array.isArray(o)?o:[o]).filter(s=>{var r;return((r=s.type)==null?void 0:r.componentName)!=="DropdownItem"?!1:p&&a?_(s).toLowerCase().includes(a.toLowerCase()):!0}),[p,a,o]),l=c.useMemo(()=>(Array.isArray(o)?o:[o]).find(s=>{var r;return((r=s.type)==null?void 0:r.componentName)==="DropdownNullItem"}),[p,a,o]),v=c.useMemo(()=>(Array.isArray(o)?o:[o]).find(s=>{var r;return((r=s.type)==null?void 0:r.componentName)==="DropdownNoItems"}),[p,a,o]),[u,B]=c.useState(f.find(e=>e.props.value===T)),[i,j,V]=E.useVisibility(),k=c.useRef(null),C=c.useRef(null),q=c.useRef(null),H=c.useCallback(()=>{j(e=>!e)},[j]),S=c.useCallback((e,s)=>{var r,d;B(s),j(!1),(d=(r=s.props).onClick)==null||d.call(r,e),x==null||x(s.props.value),setTimeout(()=>{var R;return(R=C.current)==null?void 0:R.focus()},0)},[]);return c.useEffect(()=>{i?setTimeout(()=>{var e,s,r;(e=k.current)==null||e.focus(),(r=(s=q.current)==null?void 0:s.querySelector('[aria-selected="true"]'))==null||r.scrollIntoView({block:"nearest"})},0):b("")},[i]),t.jsxs(h,{ref:V,width:"fit-content",children:[t.jsx(A,{ref:m,name:N,type:"hidden",value:((g=u==null?void 0:u.props)==null?void 0:g.value)??""}),t.jsxs(y,{ref:C,component:"dropdown",...n,props:{onMouseDown:H},children:[p&&t.jsx(A,{display:i&&p?"block":"none",clean:!0,flex1:!0,width:1,placeholder:L,value:a,onChange:e=>b(e.target.value),ref:k,props:{onMouseDown:e=>{i&&p&&e.stopPropagation()}}}),t.jsx(U,{display:i&&p?"none":"flex",children:(u==null?void 0:u.props.children)??(u==null?void 0:u.props.value)??(l==null?void 0:l.props.children)??t.jsx(h,{height:5})}),t.jsx(P,{viewBox:"0 0 10 6",width:"0.6rem",rotate:i?180:0,children:t.jsx("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"m1 1 4 4 4-4"})})]}),i&&t.jsx(O,{ref:q,children:(f.length>0||l||v)&&t.jsxs(h,{component:"dropdown.items",children:[l&&t.jsx(D,{...l.props,selected:!u,onClick:e=>S(e,l)}),f.map((e,s)=>{var r;return t.jsx(I,{...e.props,selected:e===u,onClick:d=>S(d,e)},(r=e.props.value)==null?void 0:r.toString())}),f.length===0&&!l&&v]})})]})}function I(n){return t.jsx(y,{component:"dropdown.item",...n,props:{onMouseDown:n.onClick}})}I.componentName="DropdownItem";function D(n){return t.jsx(y,{component:"dropdown.nullItem",...n,props:{onMouseDown:n.onClick}})}D.componentName="DropdownNullItem";function M(n){return t.jsx(h,{component:"dropdown.noItems",...n})}M.componentName="DropdownNoItems";const w=c.forwardRef(W);w.Item=I;w.NullItem=D;w.NoItems=M;function _(n){var m;if(n==null)return"";if(typeof n=="object"){const o=(m=n.props)==null?void 0:m.children;return o==null?"":typeof o=="object"?(Array.isArray(o)?o:[o]).map(p=>_(p)).join(""):o.toString()}return n.toString()}module.exports=w;
|
package/components/dropdown.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Ref } from 'react';
|
|
|
2
2
|
import { BoxProps } from '../box';
|
|
3
3
|
interface DropdownItemProps<TVal> extends BoxProps {
|
|
4
4
|
value: TVal;
|
|
5
|
-
onClick?: () => void;
|
|
5
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
6
6
|
}
|
|
7
7
|
interface Props<TVal> extends BoxProps {
|
|
8
8
|
name?: string;
|
|
@@ -12,10 +12,14 @@ interface Props<TVal> extends BoxProps {
|
|
|
12
12
|
onChange?: (value: TVal) => void;
|
|
13
13
|
selectedValue?: TVal;
|
|
14
14
|
}
|
|
15
|
-
declare function DropdownImpl<TVal>(props: Props<TVal>, ref: Ref<
|
|
15
|
+
declare function DropdownImpl<TVal>(props: Props<TVal>, ref: Ref<HTMLInputElement>): React.ReactNode;
|
|
16
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;
|
|
17
19
|
type DropdownType = typeof DropdownImpl & {
|
|
18
20
|
Item: typeof DropdownItem;
|
|
21
|
+
NullItem: typeof DropdownNullItem;
|
|
22
|
+
NoItems: typeof DropdownNoItems;
|
|
19
23
|
};
|
|
20
24
|
declare const Dropdown: DropdownType;
|
|
21
25
|
export default Dropdown;
|
package/components/dropdown.mjs
CHANGED
|
@@ -1,79 +1,106 @@
|
|
|
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
|
-
var
|
|
12
|
-
const { children:
|
|
13
|
-
var
|
|
14
|
-
return ((
|
|
15
|
-
}), [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { jsxs as y, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as W, useState as R, useMemo as I, useRef as D, useCallback as L, useEffect as z } from "react";
|
|
3
|
+
import f from "../box.mjs";
|
|
4
|
+
import G from "./tooltip.mjs";
|
|
5
|
+
import J from "./baseSvg.mjs";
|
|
6
|
+
import { b as Q } from "../core.mjs";
|
|
7
|
+
import V from "./textbox.mjs";
|
|
8
|
+
import X from "./flex.mjs";
|
|
9
|
+
import x from "./button.mjs";
|
|
10
|
+
function Y(n, m) {
|
|
11
|
+
var T;
|
|
12
|
+
const { children: e, name: C, isSearchable: c, searchPlaceholder: P, onChange: h, selectedValue: q } = n, [a, b] = R(""), d = I(() => (Array.isArray(e) ? e : [e]).filter((t) => {
|
|
13
|
+
var r;
|
|
14
|
+
return ((r = t.type) == null ? void 0 : r.componentName) !== "DropdownItem" ? !1 : c && a ? O(t).toLowerCase().includes(a.toLowerCase()) : !0;
|
|
15
|
+
}), [c, a, e]), l = I(() => (Array.isArray(e) ? e : [e]).find((t) => {
|
|
16
|
+
var r;
|
|
17
|
+
return ((r = t.type) == null ? void 0 : r.componentName) === "DropdownNullItem";
|
|
18
|
+
}), [c, a, e]), g = I(() => (Array.isArray(e) ? e : [e]).find((t) => {
|
|
19
|
+
var r;
|
|
20
|
+
return ((r = t.type) == null ? void 0 : r.componentName) === "DropdownNoItems";
|
|
21
|
+
}), [c, a, e]), [p, E] = R(
|
|
22
|
+
d.find((o) => o.props.value === q)
|
|
23
|
+
), [i, w, F] = Q(), S = D(null), A = D(null), j = D(null), U = L(() => {
|
|
24
|
+
w((o) => !o);
|
|
25
|
+
}, [w]), B = L((o, t) => {
|
|
26
|
+
var r, u;
|
|
27
|
+
E(t), w(!1), (u = (r = t.props).onClick) == null || u.call(r, o), h == null || h(t.props.value), setTimeout(() => {
|
|
28
|
+
var M;
|
|
29
|
+
return (M = A.current) == null ? void 0 : M.focus();
|
|
30
|
+
}, 0);
|
|
25
31
|
}, []);
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
var o;
|
|
29
|
-
|
|
30
|
-
}, 0) :
|
|
31
|
-
}, [
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
c &&
|
|
35
|
-
|
|
32
|
+
return z(() => {
|
|
33
|
+
i ? setTimeout(() => {
|
|
34
|
+
var o, t, r;
|
|
35
|
+
(o = S.current) == null || o.focus(), (r = (t = j.current) == null ? void 0 : t.querySelector('[aria-selected="true"]')) == null || r.scrollIntoView({ block: "nearest" });
|
|
36
|
+
}, 0) : b("");
|
|
37
|
+
}, [i]), /* @__PURE__ */ y(f, { ref: F, width: "fit-content", children: [
|
|
38
|
+
/* @__PURE__ */ s(V, { ref: m, name: C, type: "hidden", value: ((T = p == null ? void 0 : p.props) == null ? void 0 : T.value) ?? "" }),
|
|
39
|
+
/* @__PURE__ */ y(x, { ref: A, component: "dropdown", ...n, props: { onMouseDown: U }, children: [
|
|
40
|
+
c && /* @__PURE__ */ s(
|
|
41
|
+
V,
|
|
36
42
|
{
|
|
43
|
+
display: i && c ? "block" : "none",
|
|
37
44
|
clean: !0,
|
|
38
45
|
flex1: !0,
|
|
39
46
|
width: 1,
|
|
40
|
-
placeholder:
|
|
41
|
-
value:
|
|
42
|
-
onChange: (o) =>
|
|
43
|
-
ref:
|
|
47
|
+
placeholder: P,
|
|
48
|
+
value: a,
|
|
49
|
+
onChange: (o) => b(o.target.value),
|
|
50
|
+
ref: S,
|
|
44
51
|
props: {
|
|
45
52
|
onMouseDown: (o) => {
|
|
46
|
-
|
|
53
|
+
i && c && o.stopPropagation();
|
|
47
54
|
}
|
|
48
55
|
}
|
|
49
56
|
}
|
|
50
|
-
)
|
|
51
|
-
/* @__PURE__ */
|
|
57
|
+
),
|
|
58
|
+
/* @__PURE__ */ s(X, { display: i && c ? "none" : "flex", children: (p == null ? void 0 : p.props.children) ?? (p == null ? void 0 : p.props.value) ?? (l == null ? void 0 : l.props.children) ?? /* @__PURE__ */ s(f, { height: 5 }) }),
|
|
59
|
+
/* @__PURE__ */ s(J, { viewBox: "0 0 10 6", width: "0.6rem", rotate: i ? 180 : 0, children: /* @__PURE__ */ s("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "m1 1 4 4 4-4" }) })
|
|
52
60
|
] }),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
i && /* @__PURE__ */ s(G, { ref: j, children: (d.length > 0 || l || g) && /* @__PURE__ */ y(f, { component: "dropdown.items", children: [
|
|
62
|
+
l && /* @__PURE__ */ s(v, { ...l.props, selected: !p, onClick: (o) => B(o, l) }),
|
|
63
|
+
d.map((o, t) => {
|
|
64
|
+
var r;
|
|
65
|
+
return /* @__PURE__ */ s(
|
|
66
|
+
N,
|
|
67
|
+
{
|
|
68
|
+
...o.props,
|
|
69
|
+
selected: o === p,
|
|
70
|
+
onClick: (u) => B(u, o)
|
|
71
|
+
},
|
|
72
|
+
(r = o.props.value) == null ? void 0 : r.toString()
|
|
73
|
+
);
|
|
57
74
|
}),
|
|
58
|
-
|
|
75
|
+
d.length === 0 && !l && g
|
|
59
76
|
] }) })
|
|
60
77
|
] });
|
|
61
78
|
}
|
|
62
|
-
function
|
|
63
|
-
return /* @__PURE__ */
|
|
79
|
+
function N(n) {
|
|
80
|
+
return /* @__PURE__ */ s(x, { component: "dropdown.item", ...n, props: { onMouseDown: n.onClick } });
|
|
64
81
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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 });
|
|
89
|
+
}
|
|
90
|
+
H.componentName = "DropdownNoItems";
|
|
91
|
+
const k = W(Y);
|
|
92
|
+
k.Item = N;
|
|
93
|
+
k.NullItem = v;
|
|
94
|
+
k.NoItems = H;
|
|
95
|
+
function O(n) {
|
|
96
|
+
var m;
|
|
97
|
+
if (n == null) return "";
|
|
98
|
+
if (typeof n == "object") {
|
|
99
|
+
const e = (m = n.props) == null ? void 0 : m.children;
|
|
100
|
+
return e == null ? "" : typeof e == "object" ? (Array.isArray(e) ? e : [e]).map((c) => O(c)).join("") : e.toString();
|
|
74
101
|
}
|
|
75
|
-
return
|
|
102
|
+
return n.toString();
|
|
76
103
|
}
|
|
77
104
|
export {
|
|
78
|
-
|
|
105
|
+
k as default
|
|
79
106
|
};
|
package/components/tooltip.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),x=require("react-dom"),d=require("../box.cjs"),n=require("react"),b=require("../core.cjs"),l=2;function R(f,p){const{onPositionChange:u}=f,c=n.useRef(null),[t,w]=n.useState(),h=b.usePortalContainer(),m=n.useCallback((o,e)=>{const r=s=>{s.target.contains(o)&&e(o)};return document.addEventListener("scroll",r,{capture:!0}),()=>{document.removeEventListener("scroll",r,{capture:!0})}},[t]),v=n.useCallback((o,e)=>{const r=s=>{e(o)};return window.addEventListener("resize",r,{capture:!0}),()=>{window.removeEventListener("resize",r,{capture:!0})}},[t]),a=n.useCallback(o=>{const e=o.getBoundingClientRect(),r=Math.round((e.top+window.scrollY)*l)/l,s=Math.round((e.left+window.scrollX)*l)/l;((t==null?void 0:t.top)!==r||(t==null?void 0:t.left)!==s)&&(u==null||u({top:r,left:s}),w({top:r,left:s,width:e.width>0?e.width:void 0}))},[t]);return n.useLayoutEffect(()=>{if(c.current){a(c.current);const o=m(c.current,a),e=v(c.current,a);return()=>{o(),e()}}},[t]),i.jsxs(i.Fragment,{children:[i.jsx(d,{ref:c}),t&&x.createPortal(i.jsx(d,{ref:p,position:"absolute",top:0,left:0,transition:"none",style:{transform:`translate(${t.left}px,${t.top}px)`,width:t.width},children:i.jsx(d,{position:"absolute",width:"fit",...f})}),h)]})}const C=n.forwardRef(R);module.exports=C;
|
package/components/tooltip.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ interface Props extends BoxProps {
|
|
|
5
5
|
left: number;
|
|
6
6
|
}): void;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
export
|
|
8
|
+
declare const _default: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export default _default;
|
package/components/tooltip.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createPortal as
|
|
1
|
+
import { jsxs as x, Fragment as b, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { createPortal as E } from "react-dom";
|
|
3
3
|
import u from "../box.mjs";
|
|
4
|
-
import { useRef as
|
|
5
|
-
import { d as
|
|
4
|
+
import { forwardRef as L, useRef as R, useState as g, useCallback as d, useLayoutEffect as z } from "react";
|
|
5
|
+
import { d as C } from "../core.mjs";
|
|
6
6
|
const i = 2;
|
|
7
|
-
function
|
|
8
|
-
const { onPositionChange: c } = f, s =
|
|
7
|
+
function D(f, p) {
|
|
8
|
+
const { onPositionChange: c } = f, s = R(null), [t, m] = g(), w = C(), h = d(
|
|
9
9
|
(o, e) => {
|
|
10
10
|
const r = (n) => {
|
|
11
11
|
n.target.contains(o) && e(o);
|
|
@@ -15,7 +15,7 @@ function y(f) {
|
|
|
15
15
|
};
|
|
16
16
|
},
|
|
17
17
|
[t]
|
|
18
|
-
),
|
|
18
|
+
), v = d(
|
|
19
19
|
(o, e) => {
|
|
20
20
|
const r = (n) => {
|
|
21
21
|
e(o);
|
|
@@ -28,24 +28,25 @@ function y(f) {
|
|
|
28
28
|
), l = d(
|
|
29
29
|
(o) => {
|
|
30
30
|
const e = o.getBoundingClientRect(), r = Math.round((e.top + window.scrollY) * i) / i, n = Math.round((e.left + window.scrollX) * i) / i;
|
|
31
|
-
((t == null ? void 0 : t.top) !== r || (t == null ? void 0 : t.left) !== n) && (c == null || c({ top: r, left: n }),
|
|
31
|
+
((t == null ? void 0 : t.top) !== r || (t == null ? void 0 : t.left) !== n) && (c == null || c({ top: r, left: n }), m({ top: r, left: n, width: e.width > 0 ? e.width : void 0 }));
|
|
32
32
|
},
|
|
33
33
|
[t]
|
|
34
34
|
);
|
|
35
|
-
return
|
|
35
|
+
return z(() => {
|
|
36
36
|
if (s.current) {
|
|
37
37
|
l(s.current);
|
|
38
|
-
const o =
|
|
38
|
+
const o = h(s.current, l), e = v(s.current, l);
|
|
39
39
|
return () => {
|
|
40
40
|
o(), e();
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
}, [t]), /* @__PURE__ */
|
|
43
|
+
}, [t]), /* @__PURE__ */ x(b, { children: [
|
|
44
44
|
/* @__PURE__ */ a(u, { ref: s }),
|
|
45
|
-
t &&
|
|
45
|
+
t && E(
|
|
46
46
|
/* @__PURE__ */ a(
|
|
47
47
|
u,
|
|
48
48
|
{
|
|
49
|
+
ref: p,
|
|
49
50
|
position: "absolute",
|
|
50
51
|
top: 0,
|
|
51
52
|
left: 0,
|
|
@@ -54,10 +55,11 @@ function y(f) {
|
|
|
54
55
|
children: /* @__PURE__ */ a(u, { position: "absolute", width: "fit", ...f })
|
|
55
56
|
}
|
|
56
57
|
),
|
|
57
|
-
|
|
58
|
+
w
|
|
58
59
|
)
|
|
59
60
|
] });
|
|
60
61
|
}
|
|
62
|
+
const M = L(D);
|
|
61
63
|
export {
|
|
62
|
-
|
|
64
|
+
M as default
|
|
63
65
|
};
|
package/core/boxStyles.d.ts
CHANGED
|
@@ -726,12 +726,14 @@ export declare const pseudo2: {
|
|
|
726
726
|
checked: string;
|
|
727
727
|
required: string;
|
|
728
728
|
disabled: string;
|
|
729
|
+
selected: string;
|
|
729
730
|
};
|
|
730
731
|
export declare const pseudoClasses: {
|
|
731
732
|
indeterminate: string;
|
|
732
733
|
checked: string;
|
|
733
734
|
required: string;
|
|
734
735
|
disabled: string;
|
|
736
|
+
selected: string;
|
|
735
737
|
hover: string;
|
|
736
738
|
focus: string;
|
|
737
739
|
hasFocus: string;
|
|
@@ -745,9 +747,9 @@ export declare const pseudoClasses: {
|
|
|
745
747
|
hasRequired: string;
|
|
746
748
|
hasDisabled: string;
|
|
747
749
|
};
|
|
748
|
-
export declare const pseudoClassesWeight: Record<"indeterminate" | "checked" | "required" | "disabled" | "hover" | "focus" | "hasFocus" | "active" | "valid" | "hasValid" | "invalid" | "hasInvalid" | "optional" | "hasChecked" | "hasRequired" | "hasDisabled", number>;
|
|
750
|
+
export declare const pseudoClassesWeight: Record<"indeterminate" | "checked" | "required" | "disabled" | "selected" | "hover" | "focus" | "hasFocus" | "active" | "valid" | "hasValid" | "invalid" | "hasInvalid" | "optional" | "hasChecked" | "hasRequired" | "hasDisabled", number>;
|
|
749
751
|
export declare const pseudoClassesByWeight: {
|
|
750
|
-
[key: number]: ("indeterminate" | "checked" | "required" | "disabled" | "hover" | "focus" | "hasFocus" | "active" | "valid" | "hasValid" | "invalid" | "hasInvalid" | "optional" | "hasChecked" | "hasRequired" | "hasDisabled")[];
|
|
752
|
+
[key: number]: ("indeterminate" | "checked" | "required" | "disabled" | "selected" | "hover" | "focus" | "hasFocus" | "active" | "valid" | "hasValid" | "invalid" | "hasInvalid" | "optional" | "hasChecked" | "hasRequired" | "hasDisabled")[];
|
|
751
753
|
};
|
|
752
754
|
export declare const pseudoGroupClasses: {
|
|
753
755
|
hoverGroup: "hover";
|
package/core/variables.d.ts
CHANGED
|
@@ -196,7 +196,6 @@ declare namespace Variables {
|
|
|
196
196
|
'indigo-900': string;
|
|
197
197
|
'indigo-950': string;
|
|
198
198
|
'violet-50': string;
|
|
199
|
-
'violet-XX': string;
|
|
200
199
|
'violet-100': string;
|
|
201
200
|
'violet-200': string;
|
|
202
201
|
'violet-300': string;
|
|
@@ -253,7 +252,7 @@ declare namespace Variables {
|
|
|
253
252
|
'rose-900': string;
|
|
254
253
|
'rose-950': string;
|
|
255
254
|
};
|
|
256
|
-
type ColorType = keyof typeof colors;
|
|
255
|
+
type ColorType = keyof typeof colors | 'none';
|
|
257
256
|
function getVariableValue(name: string): string;
|
|
258
257
|
function generateVariables(): string;
|
|
259
258
|
function setUserVariables(variables: Record<string, string>): void;
|
package/core.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";const E=require("react");function ae(...e){return e.reduce((t,r)=>r?typeof r=="string"?(t.push(r),t):Array.isArray(r)?(t.push(...ae(...r)),t):(Object.entries(r).forEach(([l,d])=>{d&&t.push(l)}),t):t,[])}var n;(e=>{(t=>{function r(d,s){return`${d}${s.replace("/","-")}`}t.fraction=r;function l(d){return[`${d} path`,`${d} circle`,`${d} rect`,`${d} line`]}t.svg=l})(e.ClassName||(e.ClassName={})),(t=>{function r(b){return`${b/4}rem`}t.rem=r;function l(b){return`${b}px`}t.px=l;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 a(b,i){return`${i}ms`}t.ms=a;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-XX":"#9747FF","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 l={};function d(o){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})`}e.getVariableValue=d;function s(){return Object.entries(r).map(([o,u])=>`--${o}: ${u};`).join("")}e.generateVariables=s;function f(o){l=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"}]},le={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]"},Z={...le,...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(([l,d])=>{e[+l+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(a=>{a in u&&(y[a]=u[a],delete u[a])}),o&&Object.entries(o).forEach(([a,v])=>{y[a]=v}),u.props=y,u}e.buildProps=t;function r(s){return!!s&&typeof s=="object"}e.isObject=r;function l(...s){return s.reduce((f,o)=>(Object.keys(o??{}).forEach(u=>{const y=f[u],a=o[u];u in L&&typeof a=="boolean"||(u in L&&Array.isArray(a)?f[u]=l(y,a[1]??{}):Array.isArray(y)&&Array.isArray(a)?f[u]=y.concat(...a):r(y)&&r(a)?f[u]=l(y,a):f[u]=a)}),f),{})}e.mergeDeep=l;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:l}=ce,d=t-r.length;if(d<0)return r[t];const s=Math.floor(d/l.length),f=d-s*l.length;return this.getByIndex(s)+l[f]}}const ce={first:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",next:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"};var B;(e=>{e.components={}})(B||(B={}));function fe(e){const{clean:t,theme:r,component:l}=e;return E.useMemo(()=>{var f;if(t)return;const d=l==null?void 0:l.split(".");if(!d)return;const s=d.reduce((o,u,y)=>{var a,v;return y===0?(a=B.components)==null?void 0:a[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},[l,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 l=[t?A:ne],d=r?N.mergeDeep(r,e):e;return _.addClassNames(d,l,[]),l},[e,t,r])}var _;(e=>{let t=!0,r={};function l(a,v,g,b,i){Object.entries(a).forEach(([m,c])=>{if(N.isKeyOf(m,j))f(m,c,v,g,b,i);else if(N.isKeyOf(m,le))l(c,v,[...g,m],b,i);else if(N.isKeyOf(m,L)){if(Array.isArray(c)){const[w,x]=c;l(x,v,[...g,m],b,i)}N.isObject(c)&&l(c,v,[...g,m],b,i)}else N.isKeyOf(m,U)?l(c,v,g,m,i):N.isKeyOf(m,K)&&(typeof c=="string"?v.push(`${K[m]}-${c}`):Object.entries(c).forEach(([w,x])=>{l(x,v,[...g,K[m]],b,w)}))})}e.addClassNames=l;function d(){if(!t)return;console.debug("\x1B[36m%s\x1B[0m","[react-box]: flush");const a=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,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;}
|
|
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
6
|
.${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);}
|
|
7
|
-
`,g=Object.entries(r);g.sort(([m],[c])=>(U[m]??0)-(U[c]??0));const b=g.reduce((m,[c,w])=>(c!=="normal"&&m.push(`@media(min-width: ${U[c]}px){`),Object.entries(w).forEach(([x,G])=>{const{__parents:P,...ue}=G,ee=Object.entries(ue);ee.sort(([F],[R])=>
|
|
7
|
+
`,g=Object.entries(r);g.sort(([m],[c])=>(U[m]??0)-(U[c]??0));const b=g.reduce((m,[c,w])=>(c!=="normal"&&m.push(`@media(min-width: ${U[c]}px){`),Object.entries(w).forEach(([x,G])=>{const{__parents:P,...ue}=G,ee=Object.entries(ue);ee.sort(([F],[R])=>l[F]-l[R]),ee.forEach(([F,R])=>{R.forEach(V=>{var H,k;const h=j[F].find($=>Array.isArray($.values)?$.values.includes(V):typeof V==typeof $.values);if(!h)return;const z=o(F,V,+x,c),D=q[+x].map($=>Z[$]).join(""),p=((H=h.selector)==null?void 0:H.call(h,`.${z}`,D))??`.${z}${D}`,B=Array.isArray(h.styleName)?h.styleName:[h.styleName??F],S=((k=h.valueFormat)==null?void 0:k.call(h,V,C.getVariableValue))??V;m.push(`${p}{${B.map($=>`${$}:${S}`).join(";")}}`)})}),P&&Object.entries(P).forEach(([F,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(I=>Array.isArray(I.values)?I.values.includes(z):typeof z==typeof I.values);if(!p)return;const B=o(O,z,+x,c,F),[S]=q[+x],H=((te=p.selector)==null?void 0:te.call(p,`.${S}-${F}:${S} .${B}`,""))??`.${S}-${F}:${S} .${B}`,k=Array.isArray(p.styleName)?p.styleName:[p.styleName??O],$=((re=p.valueFormat)==null?void 0:re.call(p,z,C.getVariableValue))??z;m.push(`${H}{${k.map(I=>`${I}:${$}`).join(";")}}`)})})})}),c!=="normal"&&m.push("}"),m),[v]);b.unshift(`:root{${C.generateVariables()}}`);const i=y();i.innerHTML=b.join(""),t=!1}e.flush=d;function s(){r={}}e.clear=s;function f(l,v,g,b,i="normal",m){if(v==null)return;const c=b.reduce((x,G)=>x+se[G],0);r[i]?r[i][c]?r[i][c][l]||(r[i][c][l]=new Set):r[i][c]={[l]:new Set}:r[i]={[c]:{[l]:new Set}},m?(r[i][c].__parents?r[i][c].__parents[m]?r[i][c].__parents[m][l]||(r[i][c].__parents[m][l]=new Set):r[i][c].__parents[m]={[l]:new Set}:r[i][c].__parents={[m]:{[l]:new Set}},r[i][c].__parents[m][l].has(v)||(r[i][c].__parents[m][l].add(v),t=!0)):r[i][c][l].has(v)||(r[i][c][l].add(v),t=!0);const w=o(l,v,c,i,m);g.push(w)}function o(l,v,g,b,i){const m=q[g],c=`${b==="normal"?"":`${b}-`}${m.map(w=>`${w}-`).join("")}${i?`${i}-`:""}${l}-${v}`;return ie?c:me.getIdentity(c)}const u="crono-styles";function y(){let l=document.getElementById(u);return l||(l=document.createElement("style"),l.setAttribute("id",u),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,d){return C.setUserVariables(r),Object.entries(a).forEach(([s,f])=>{j[s]=f}),Object.entries(d).forEach(([s,f])=>{const o=j[s];j[s]=o?[...f,...o]:f}),{extendedProps:a,extendedPropTypes:d}}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",lineHeight:20,borderRadius:1,hover:{bgColor:"violet-50"},focus:{bgColor:"violet-50"},selected:{bgColor:"violet-50",cursor:"default"}}},nullItem:{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"}}},noItems:{styles:{display:"flex",width:"fit",p:3,cursor:"default",lineHeight:20,borderRadius:1,color:"violet-400"}}}}};function r(a){const{components:d,...s}=a,f=d??{};Object.entries(s).forEach(([o,u])=>{f[o]=u}),T.components=N.mergeDeep(t,f)}e.setup=r,T.components={...t}})(Y||(Y={}));const he=Y,pe={selected:"aria-selected"};var J;(e=>{function t(r,a,d){r!==void 0&&r!=null&&(d[pe[a]??a]=Array.isArray(r)?r[0]:r)}e.assignBooleanProp=t})(J||(J={}));const we=J;function xe(){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},[])}function Ne(e=null){const[t,r]=E.useState(!1),a=E.useRef(null);return E.useEffect(()=>{function d(o){const u=e??a.current;(u==null?void 0:u.contains(o.target))===!1&&r(!1)}function s(){r(!1)}function f(o){o.key==="Escape"&&r(!1)}return t&&(window.addEventListener("mousedown",d),window.addEventListener("resize",s),window.addEventListener("keydown",f)),()=>{window.removeEventListener("mousedown",d),window.removeEventListener("resize",s),window.removeEventListener("keydown",f)}},[e,t]),[t,r,a]}var Q;(e=>{function t(a){const d=Array.from(a.elements).reduce((s,f)=>{const o=f.name;return o&&(s[o]||(s[o]=[]),s[o].push(f)),s},{});return Object.entries(d).reduce((s,[f,o])=>{if(o.length===1){const u=o[0];r(s,f,u.type==="checkbox"||u.type==="radio"?u.checked:u.value)}else{const u=o.reduce((y,l)=>(l.type==="checkbox"||l.type==="radio"?l.checked&&y.push(l.value):y.push(l.value),y),[]);r(s,f,u)}return s},{})}e.getFormEntries=t;function r(a,d,s){if(d.includes(".")){const f=d.split(".");let o=a;f.forEach((u,y)=>{if(f.length>y+1){const l=u.match(/^(.+)\[(\d)\]$/);if(l){const[,v,g]=l;o[v]=o[v]||[],o[v][g]=o[v][g]||{},o=o[v][g]}else o[u]=o[u]||{},o=o[u]}else o[u]=s})}else a[d]=s}})(Q||(Q={}));const Fe=Q;exports.BoxExtends=ge;exports.BoxUtils=we;exports.FormUtils=Fe;exports.ObjectUtils=N;exports.Theme=he;exports.Variables=C;exports.classNames=le;exports.usePortalContainer=xe;exports.useStyles=ye;exports.useVisibility=Ne;
|
package/core.mjs
CHANGED
|
@@ -44,30 +44,30 @@ var n;
|
|
|
44
44
|
return (i, m) => `var(--${b}${m});`;
|
|
45
45
|
}
|
|
46
46
|
t.variables = f;
|
|
47
|
-
function
|
|
47
|
+
function o(b) {
|
|
48
48
|
return (i, m) => `var(--${b}${m});`;
|
|
49
49
|
}
|
|
50
|
-
t.svgVariables =
|
|
50
|
+
t.svgVariables = o;
|
|
51
51
|
function u(b, i) {
|
|
52
52
|
return `repeat(${i},minmax(0,1fr))`;
|
|
53
53
|
}
|
|
54
54
|
t.gridColumns = u;
|
|
55
|
-
function
|
|
55
|
+
function g(b, i) {
|
|
56
56
|
return i === "full-row" ? "1/-1" : `span ${i}/span ${i}`;
|
|
57
57
|
}
|
|
58
|
-
t.gridColumn =
|
|
59
|
-
function
|
|
58
|
+
t.gridColumn = g;
|
|
59
|
+
function a(b, i) {
|
|
60
60
|
return `${i}ms`;
|
|
61
61
|
}
|
|
62
|
-
t.ms =
|
|
62
|
+
t.ms = a;
|
|
63
63
|
function v(b, i) {
|
|
64
64
|
return `${i}deg`;
|
|
65
65
|
}
|
|
66
66
|
t.rotate = v;
|
|
67
|
-
function
|
|
67
|
+
function y(b, i) {
|
|
68
68
|
return i === "xAxis" ? "-1 1" : "1 -1";
|
|
69
69
|
}
|
|
70
|
-
t.flip =
|
|
70
|
+
t.flip = y;
|
|
71
71
|
})(e.Value || (e.Value = {}));
|
|
72
72
|
})(n || (n = {}));
|
|
73
73
|
var W;
|
|
@@ -269,7 +269,6 @@ var W;
|
|
|
269
269
|
"indigo-900": "#312e81",
|
|
270
270
|
"indigo-950": "#1e1b4b",
|
|
271
271
|
"violet-50": "#f5f3ff",
|
|
272
|
-
"violet-XX": "#9747FF",
|
|
273
272
|
"violet-100": "#ede9fe",
|
|
274
273
|
"violet-200": "#ddd6fe",
|
|
275
274
|
"violet-300": "#c4b5fd",
|
|
@@ -334,16 +333,16 @@ var W;
|
|
|
334
333
|
"bg-img-radio": `url("data:image/svg+xml,${encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' width='100%' viewBox='0 0 20 20'><circle fill='#FFF' cx='10' cy='10' r='5'/></svg>")}")`
|
|
335
334
|
}, r = {};
|
|
336
335
|
let l = {};
|
|
337
|
-
function d(
|
|
338
|
-
return
|
|
336
|
+
function d(o) {
|
|
337
|
+
return o in l ? r[o] = l[o] : o in t ? r[o] = t[o] : o in e.colors ? r[o] = e.colors[o] : r[o] = o, `var(--${o})`;
|
|
339
338
|
}
|
|
340
339
|
e.getVariableValue = d;
|
|
341
340
|
function s() {
|
|
342
|
-
return Object.entries(r).map(([
|
|
341
|
+
return Object.entries(r).map(([o, u]) => `--${o}: ${u};`).join("");
|
|
343
342
|
}
|
|
344
343
|
e.generateVariables = s;
|
|
345
|
-
function f(
|
|
346
|
-
l =
|
|
344
|
+
function f(o) {
|
|
345
|
+
l = o;
|
|
347
346
|
}
|
|
348
347
|
e.setUserVariables = f;
|
|
349
348
|
})(W || (W = {}));
|
|
@@ -1519,7 +1518,8 @@ const z = W, E = {
|
|
|
1519
1518
|
indeterminate: ":indeterminate",
|
|
1520
1519
|
checked: ":checked",
|
|
1521
1520
|
required: ":required",
|
|
1522
|
-
disabled: "[disabled]"
|
|
1521
|
+
disabled: "[disabled]",
|
|
1522
|
+
selected: '[aria-selected="true"]'
|
|
1523
1523
|
}, Z = { ...se, ...L }, ie = Object.entries(Z).reduce(
|
|
1524
1524
|
(e, [t], r) => (e[t] = Math.pow(2, r), e),
|
|
1525
1525
|
{}
|
|
@@ -1536,7 +1536,7 @@ const z = W, E = {
|
|
|
1536
1536
|
focusGroup: "focus",
|
|
1537
1537
|
activeGroup: "active",
|
|
1538
1538
|
disabledGroup: "disabled"
|
|
1539
|
-
},
|
|
1539
|
+
}, k = {
|
|
1540
1540
|
sm: 640,
|
|
1541
1541
|
md: 768,
|
|
1542
1542
|
lg: 1024,
|
|
@@ -1545,13 +1545,13 @@ const z = W, E = {
|
|
|
1545
1545
|
};
|
|
1546
1546
|
var q;
|
|
1547
1547
|
((e) => {
|
|
1548
|
-
function t(s, f,
|
|
1549
|
-
const u = { ...s },
|
|
1550
|
-
return f.forEach((
|
|
1551
|
-
|
|
1552
|
-
}),
|
|
1553
|
-
|
|
1554
|
-
}), u.props =
|
|
1548
|
+
function t(s, f, o) {
|
|
1549
|
+
const u = { ...s }, g = u.props || {};
|
|
1550
|
+
return f.forEach((a) => {
|
|
1551
|
+
a in u && (g[a] = u[a], delete u[a]);
|
|
1552
|
+
}), o && Object.entries(o).forEach(([a, v]) => {
|
|
1553
|
+
g[a] = v;
|
|
1554
|
+
}), u.props = g, u;
|
|
1555
1555
|
}
|
|
1556
1556
|
e.buildProps = t;
|
|
1557
1557
|
function r(s) {
|
|
@@ -1559,9 +1559,9 @@ var q;
|
|
|
1559
1559
|
}
|
|
1560
1560
|
e.isObject = r;
|
|
1561
1561
|
function l(...s) {
|
|
1562
|
-
return s.reduce((f,
|
|
1563
|
-
const
|
|
1564
|
-
u in L && typeof
|
|
1562
|
+
return s.reduce((f, o) => (Object.keys(o ?? {}).forEach((u) => {
|
|
1563
|
+
const g = f[u], a = o[u];
|
|
1564
|
+
u in L && typeof a == "boolean" || (u in L && Array.isArray(a) ? f[u] = l(g, a[1] ?? {}) : Array.isArray(g) && Array.isArray(a) ? f[u] = g.concat(...a) : r(g) && r(a) ? f[u] = l(g, a) : f[u] = a);
|
|
1565
1565
|
}), f), {});
|
|
1566
1566
|
}
|
|
1567
1567
|
e.mergeDeep = l;
|
|
@@ -1579,64 +1579,64 @@ class be {
|
|
|
1579
1579
|
return this._cache[t] || (this._cache[t] = this.getByIndex(this._index++)), this._cache[t];
|
|
1580
1580
|
}
|
|
1581
1581
|
getByIndex(t) {
|
|
1582
|
-
const { first: r, next: l } =
|
|
1582
|
+
const { first: r, next: l } = ge, d = t - r.length;
|
|
1583
1583
|
if (d < 0)
|
|
1584
1584
|
return r[t];
|
|
1585
1585
|
const s = Math.floor(d / l.length), f = d - s * l.length;
|
|
1586
1586
|
return this.getByIndex(s) + l[f];
|
|
1587
1587
|
}
|
|
1588
1588
|
}
|
|
1589
|
-
const
|
|
1589
|
+
const ge = {
|
|
1590
1590
|
first: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
|
|
1591
1591
|
next: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
|
|
1592
1592
|
};
|
|
1593
|
-
var
|
|
1593
|
+
var I;
|
|
1594
1594
|
((e) => {
|
|
1595
1595
|
e.components = {};
|
|
1596
|
-
})(
|
|
1597
|
-
function
|
|
1596
|
+
})(I || (I = {}));
|
|
1597
|
+
function ye(e) {
|
|
1598
1598
|
const { clean: t, theme: r, component: l } = e;
|
|
1599
1599
|
return Q(() => {
|
|
1600
1600
|
var f;
|
|
1601
1601
|
if (t) return;
|
|
1602
1602
|
const d = l == null ? void 0 : l.split(".");
|
|
1603
1603
|
if (!d) return;
|
|
1604
|
-
const s = d.reduce((
|
|
1605
|
-
var
|
|
1606
|
-
return
|
|
1604
|
+
const s = d.reduce((o, u, g) => {
|
|
1605
|
+
var a, v;
|
|
1606
|
+
return g === 0 ? (a = I.components) == null ? void 0 : a[u] : (v = o == null ? void 0 : o.children) == null ? void 0 : v[u];
|
|
1607
1607
|
}, void 0);
|
|
1608
1608
|
if (s)
|
|
1609
1609
|
return r ? $.mergeDeep(s.styles, ((f = s.themes) == null ? void 0 : f[r]) ?? {}) : s.styles;
|
|
1610
1610
|
}, [l, t, r]);
|
|
1611
1611
|
}
|
|
1612
1612
|
const he = new be(), pe = typeof window < "u" && typeof window.document < "u";
|
|
1613
|
-
var
|
|
1614
|
-
const ne = typeof process == "object" && ((
|
|
1615
|
-
function
|
|
1616
|
-
we(
|
|
1617
|
-
const r =
|
|
1613
|
+
var ae;
|
|
1614
|
+
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
|
+
function Fe(e, t) {
|
|
1616
|
+
we(S.flush, [e]);
|
|
1617
|
+
const r = ye(e);
|
|
1618
1618
|
return Q(() => {
|
|
1619
|
-
const l = [t ?
|
|
1620
|
-
return
|
|
1619
|
+
const l = [t ? A : ue], d = r ? $.mergeDeep(r, e) : e;
|
|
1620
|
+
return S.addClassNames(d, l, []), l;
|
|
1621
1621
|
}, [e, t, r]);
|
|
1622
1622
|
}
|
|
1623
|
-
var
|
|
1623
|
+
var S;
|
|
1624
1624
|
((e) => {
|
|
1625
1625
|
let t = !0, r = {};
|
|
1626
|
-
function l(
|
|
1627
|
-
Object.entries(
|
|
1626
|
+
function l(a, v, y, b, i) {
|
|
1627
|
+
Object.entries(a).forEach(([m, c]) => {
|
|
1628
1628
|
if ($.isKeyOf(m, E))
|
|
1629
|
-
f(m, c, v,
|
|
1629
|
+
f(m, c, v, y, b, i);
|
|
1630
1630
|
else if ($.isKeyOf(m, se))
|
|
1631
|
-
l(c, v, [...
|
|
1631
|
+
l(c, v, [...y, m], b, i);
|
|
1632
1632
|
else if ($.isKeyOf(m, L)) {
|
|
1633
1633
|
if (Array.isArray(c)) {
|
|
1634
1634
|
const [w, x] = c;
|
|
1635
|
-
l(x, v, [...
|
|
1635
|
+
l(x, v, [...y, m], b, i);
|
|
1636
1636
|
}
|
|
1637
|
-
$.isObject(c) && l(c, v, [...
|
|
1638
|
-
} else $.isKeyOf(m,
|
|
1639
|
-
l(x, v, [...
|
|
1637
|
+
$.isObject(c) && l(c, v, [...y, m], b, i);
|
|
1638
|
+
} else $.isKeyOf(m, k) ? l(c, v, y, m, i) : $.isKeyOf(m, K) && (typeof c == "string" ? v.push(`${K[m]}-${c}`) : Object.entries(c).forEach(([w, x]) => {
|
|
1639
|
+
l(x, v, [...y, K[m]], b, w);
|
|
1640
1640
|
}));
|
|
1641
1641
|
});
|
|
1642
1642
|
}
|
|
@@ -1644,36 +1644,36 @@ var A;
|
|
|
1644
1644
|
function d() {
|
|
1645
1645
|
if (!t) return;
|
|
1646
1646
|
console.debug("\x1B[36m%s\x1B[0m", "[react-box]: flush");
|
|
1647
|
-
const
|
|
1647
|
+
const a = Object.entries(E).reduce((m, [c], w) => (m[c] = w, m), {}), v = `:root{--borderColor: black;--outlineColor: black;--lineHeight: 1.2;--fontSize: 14px;--transitionTime: 0.25s;--svgTransitionTime: 0.3s;}#crono-box {position: absolute;top: 0;left: 0;height: 0;}
|
|
1648
1648
|
html{font-size: 16px;font-family: Arial, sans-serif;}
|
|
1649
1649
|
body{margin: 0;line-height: var(--lineHeight);font-size: var(--fontSize);}
|
|
1650
1650
|
a,ul{all: unset;}
|
|
1651
1651
|
.${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
|
-
.${
|
|
1653
|
-
`,
|
|
1654
|
-
|
|
1655
|
-
([m], [c]) => (
|
|
1652
|
+
.${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
|
+
`, y = Object.entries(r);
|
|
1654
|
+
y.sort(
|
|
1655
|
+
([m], [c]) => (k[m] ?? 0) - (k[c] ?? 0)
|
|
1656
1656
|
);
|
|
1657
|
-
const b =
|
|
1658
|
-
(m, [c, w]) => (c !== "normal" && m.push(`@media(min-width: ${
|
|
1657
|
+
const b = y.reduce(
|
|
1658
|
+
(m, [c, w]) => (c !== "normal" && m.push(`@media(min-width: ${k[c]}px){`), Object.entries(w).forEach(([x, U]) => {
|
|
1659
1659
|
const { __parents: P, ...de } = U, ee = Object.entries(de);
|
|
1660
|
-
ee.sort(([N], [_]) =>
|
|
1660
|
+
ee.sort(([N], [_]) => a[N] - a[_]), ee.forEach(([N, _]) => {
|
|
1661
1661
|
_.forEach((C) => {
|
|
1662
|
-
var B,
|
|
1662
|
+
var B, H;
|
|
1663
1663
|
const h = E[N].find((F) => Array.isArray(F.values) ? F.values.includes(C) : typeof C == typeof F.values);
|
|
1664
1664
|
if (!h) return;
|
|
1665
|
-
const V =
|
|
1666
|
-
m.push(`${p}{${
|
|
1665
|
+
const V = o(N, C, +x, c), G = D[+x].map((F) => Z[F]).join(""), p = ((B = h.selector) == null ? void 0 : B.call(h, `.${V}`, G)) ?? `.${V}${G}`, T = Array.isArray(h.styleName) ? h.styleName : [h.styleName ?? N], O = ((H = h.valueFormat) == null ? void 0 : H.call(h, C, z.getVariableValue)) ?? C;
|
|
1666
|
+
m.push(`${p}{${T.map((F) => `${F}:${O}`).join(";")}}`);
|
|
1667
1667
|
});
|
|
1668
1668
|
}), P && Object.entries(P).forEach(([N, _]) => {
|
|
1669
1669
|
const C = Object.entries(_);
|
|
1670
|
-
C.sort(([j], [h]) =>
|
|
1670
|
+
C.sort(([j], [h]) => a[j] - a[h]), C.forEach(([j, h]) => {
|
|
1671
1671
|
h.forEach((V) => {
|
|
1672
1672
|
var te, re;
|
|
1673
|
-
const p = E[j].find((
|
|
1673
|
+
const p = E[j].find((R) => Array.isArray(R.values) ? R.values.includes(V) : typeof V == typeof R.values);
|
|
1674
1674
|
if (!p) return;
|
|
1675
|
-
const
|
|
1676
|
-
m.push(`${B}{${
|
|
1675
|
+
const T = o(j, V, +x, c, N), [O] = D[+x], B = ((te = p.selector) == null ? void 0 : te.call(p, `.${O}-${N}:${O} .${T}`, "")) ?? `.${O}-${N}:${O} .${T}`, H = Array.isArray(p.styleName) ? p.styleName : [p.styleName ?? j], F = ((re = p.valueFormat) == null ? void 0 : re.call(p, V, z.getVariableValue)) ?? V;
|
|
1676
|
+
m.push(`${B}{${H.map((R) => `${R}:${F}`).join(";")}}`);
|
|
1677
1677
|
});
|
|
1678
1678
|
});
|
|
1679
1679
|
});
|
|
@@ -1681,7 +1681,7 @@ a,ul{all: unset;}
|
|
|
1681
1681
|
[v]
|
|
1682
1682
|
);
|
|
1683
1683
|
b.unshift(`:root{${z.generateVariables()}}`);
|
|
1684
|
-
const i =
|
|
1684
|
+
const i = g();
|
|
1685
1685
|
i.innerHTML = b.join(""), t = !1;
|
|
1686
1686
|
}
|
|
1687
1687
|
e.flush = d;
|
|
@@ -1689,40 +1689,40 @@ a,ul{all: unset;}
|
|
|
1689
1689
|
r = {};
|
|
1690
1690
|
}
|
|
1691
1691
|
e.clear = s;
|
|
1692
|
-
function f(
|
|
1692
|
+
function f(a, v, y, b, i = "normal", m) {
|
|
1693
1693
|
if (v == null) return;
|
|
1694
1694
|
const c = b.reduce((x, U) => x + ie[U], 0);
|
|
1695
|
-
r[i] ? r[i][c] ? r[i][c][
|
|
1696
|
-
const w = a
|
|
1697
|
-
|
|
1695
|
+
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
|
+
const w = o(a, v, c, i, m);
|
|
1697
|
+
y.push(w);
|
|
1698
1698
|
}
|
|
1699
|
-
function a
|
|
1700
|
-
const m = D[
|
|
1699
|
+
function o(a, v, y, b, i) {
|
|
1700
|
+
const m = D[y], c = `${b === "normal" ? "" : `${b}-`}${m.map((w) => `${w}-`).join("")}${i ? `${i}-` : ""}${a}-${v}`;
|
|
1701
1701
|
return ne ? c : he.getIdentity(c);
|
|
1702
1702
|
}
|
|
1703
1703
|
const u = "crono-styles";
|
|
1704
|
-
function
|
|
1705
|
-
let
|
|
1706
|
-
return
|
|
1704
|
+
function g() {
|
|
1705
|
+
let a = document.getElementById(u);
|
|
1706
|
+
return a || (a = document.createElement("style"), a.setAttribute("id", u), a.setAttribute("type", "text/css"), document.head.insertBefore(a, document.head.firstChild)), a;
|
|
1707
1707
|
}
|
|
1708
|
-
})(
|
|
1709
|
-
var
|
|
1708
|
+
})(S || (S = {}));
|
|
1709
|
+
var oe;
|
|
1710
1710
|
((e) => {
|
|
1711
|
-
e.flush =
|
|
1712
|
-
})(
|
|
1711
|
+
e.flush = S.flush, e.clear = S.clear;
|
|
1712
|
+
})(oe || (oe = {}));
|
|
1713
1713
|
var M;
|
|
1714
1714
|
((e) => {
|
|
1715
1715
|
function t(r, l, d) {
|
|
1716
1716
|
return z.setUserVariables(r), Object.entries(l).forEach(([s, f]) => {
|
|
1717
1717
|
E[s] = f;
|
|
1718
1718
|
}), Object.entries(d).forEach(([s, f]) => {
|
|
1719
|
-
const
|
|
1720
|
-
E[s] =
|
|
1719
|
+
const o = E[s];
|
|
1720
|
+
E[s] = o ? [...f, ...o] : f;
|
|
1721
1721
|
}), { extendedProps: l, extendedPropTypes: d };
|
|
1722
1722
|
}
|
|
1723
1723
|
e.extend = t;
|
|
1724
1724
|
})(M || (M = {}));
|
|
1725
|
-
const
|
|
1725
|
+
const $e = M;
|
|
1726
1726
|
var X;
|
|
1727
1727
|
((e) => {
|
|
1728
1728
|
const t = {
|
|
@@ -1737,6 +1737,7 @@ var X;
|
|
|
1737
1737
|
b: 1,
|
|
1738
1738
|
borderRadius: 1,
|
|
1739
1739
|
userSelect: "none",
|
|
1740
|
+
lineHeight: 20,
|
|
1740
1741
|
hover: {
|
|
1741
1742
|
bgColor: "violet-600",
|
|
1742
1743
|
borderColor: "violet-600"
|
|
@@ -1759,6 +1760,7 @@ var X;
|
|
|
1759
1760
|
borderRadius: 1,
|
|
1760
1761
|
p: 3,
|
|
1761
1762
|
transition: "none",
|
|
1763
|
+
lineHeight: 20,
|
|
1762
1764
|
hover: {
|
|
1763
1765
|
borderColor: "violet-300"
|
|
1764
1766
|
},
|
|
@@ -1902,6 +1904,9 @@ var X;
|
|
|
1902
1904
|
children: {
|
|
1903
1905
|
items: {
|
|
1904
1906
|
styles: {
|
|
1907
|
+
display: "flex",
|
|
1908
|
+
d: "column",
|
|
1909
|
+
gap: 1,
|
|
1905
1910
|
p: 1,
|
|
1906
1911
|
b: 1,
|
|
1907
1912
|
borderRadius: 1,
|
|
@@ -1927,48 +1932,86 @@ var X;
|
|
|
1927
1932
|
},
|
|
1928
1933
|
focus: {
|
|
1929
1934
|
bgColor: "violet-50"
|
|
1935
|
+
},
|
|
1936
|
+
selected: {
|
|
1937
|
+
bgColor: "violet-50",
|
|
1938
|
+
cursor: "default"
|
|
1930
1939
|
}
|
|
1931
1940
|
}
|
|
1941
|
+
},
|
|
1942
|
+
nullItem: {
|
|
1943
|
+
styles: {
|
|
1944
|
+
display: "flex",
|
|
1945
|
+
width: "fit",
|
|
1946
|
+
p: 3,
|
|
1947
|
+
cursor: "pointer",
|
|
1948
|
+
lineHeight: 20,
|
|
1949
|
+
borderRadius: 1,
|
|
1950
|
+
color: "violet-400",
|
|
1951
|
+
hover: {
|
|
1952
|
+
bgColor: "violet-50"
|
|
1953
|
+
},
|
|
1954
|
+
focus: {
|
|
1955
|
+
bgColor: "violet-50"
|
|
1956
|
+
},
|
|
1957
|
+
selected: {
|
|
1958
|
+
bgColor: "violet-50",
|
|
1959
|
+
cursor: "default"
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
},
|
|
1963
|
+
noItems: {
|
|
1964
|
+
styles: {
|
|
1965
|
+
display: "flex",
|
|
1966
|
+
width: "fit",
|
|
1967
|
+
p: 3,
|
|
1968
|
+
cursor: "default",
|
|
1969
|
+
lineHeight: 20,
|
|
1970
|
+
borderRadius: 1,
|
|
1971
|
+
color: "violet-400"
|
|
1972
|
+
}
|
|
1932
1973
|
}
|
|
1933
1974
|
}
|
|
1934
1975
|
}
|
|
1935
1976
|
};
|
|
1936
1977
|
function r(l) {
|
|
1937
1978
|
const { components: d, ...s } = l, f = d ?? {};
|
|
1938
|
-
Object.entries(s).forEach(([
|
|
1939
|
-
f[
|
|
1940
|
-
}),
|
|
1979
|
+
Object.entries(s).forEach(([o, u]) => {
|
|
1980
|
+
f[o] = u;
|
|
1981
|
+
}), I.components = $.mergeDeep(t, f);
|
|
1941
1982
|
}
|
|
1942
|
-
e.setup = r,
|
|
1983
|
+
e.setup = r, I.components = { ...t };
|
|
1943
1984
|
})(X || (X = {}));
|
|
1944
|
-
const
|
|
1985
|
+
const Ce = X, xe = {
|
|
1986
|
+
selected: "aria-selected"
|
|
1987
|
+
};
|
|
1945
1988
|
var Y;
|
|
1946
1989
|
((e) => {
|
|
1947
1990
|
function t(r, l, d) {
|
|
1948
|
-
r !== void 0 && r != null && (d[l] = Array.isArray(r) ? r[0] : r);
|
|
1991
|
+
r !== void 0 && r != null && (d[xe[l] ?? l] = Array.isArray(r) ? r[0] : r);
|
|
1949
1992
|
}
|
|
1950
1993
|
e.assignBooleanProp = t;
|
|
1951
1994
|
})(Y || (Y = {}));
|
|
1952
|
-
const
|
|
1953
|
-
function
|
|
1995
|
+
const Ve = Y;
|
|
1996
|
+
function ze() {
|
|
1954
1997
|
return Q(() => {
|
|
1955
1998
|
const e = "crono-box";
|
|
1956
1999
|
let t = document.getElementById(e);
|
|
1957
2000
|
return t || (t = document.createElement("div"), t.id = e, document.body.appendChild(t)), t;
|
|
1958
2001
|
}, []);
|
|
1959
2002
|
}
|
|
1960
|
-
function
|
|
2003
|
+
function Ee(e = null) {
|
|
1961
2004
|
const [t, r] = fe(!1), l = me(null);
|
|
1962
2005
|
return le(() => {
|
|
1963
|
-
function d(
|
|
2006
|
+
function d(o) {
|
|
1964
2007
|
const u = e ?? l.current;
|
|
1965
|
-
(u == null ? void 0 : u.contains(
|
|
2008
|
+
(u == null ? void 0 : u.contains(o.target)) === !1 && r(!1);
|
|
1966
2009
|
}
|
|
1967
2010
|
function s() {
|
|
1968
2011
|
r(!1);
|
|
1969
2012
|
}
|
|
1970
|
-
function f(
|
|
1971
|
-
|
|
2013
|
+
function f(o) {
|
|
2014
|
+
o.key === "Escape" && r(!1);
|
|
1972
2015
|
}
|
|
1973
2016
|
return t && (window.addEventListener("mousedown", d), window.addEventListener("resize", s), window.addEventListener("keydown", f)), () => {
|
|
1974
2017
|
window.removeEventListener("mousedown", d), window.removeEventListener("resize", s), window.removeEventListener("keydown", f);
|
|
@@ -1980,17 +2023,17 @@ var J;
|
|
|
1980
2023
|
function t(l) {
|
|
1981
2024
|
const d = Array.from(l.elements).reduce(
|
|
1982
2025
|
(s, f) => {
|
|
1983
|
-
const
|
|
1984
|
-
return
|
|
2026
|
+
const o = f.name;
|
|
2027
|
+
return o && (s[o] || (s[o] = []), s[o].push(f)), s;
|
|
1985
2028
|
},
|
|
1986
2029
|
{}
|
|
1987
2030
|
);
|
|
1988
|
-
return Object.entries(d).reduce((s, [f,
|
|
1989
|
-
if (
|
|
1990
|
-
const u =
|
|
2031
|
+
return Object.entries(d).reduce((s, [f, o]) => {
|
|
2032
|
+
if (o.length === 1) {
|
|
2033
|
+
const u = o[0];
|
|
1991
2034
|
r(s, f, u.type === "checkbox" || u.type === "radio" ? u.checked : u.value);
|
|
1992
2035
|
} else {
|
|
1993
|
-
const u =
|
|
2036
|
+
const u = o.reduce((g, a) => (a.type === "checkbox" || a.type === "radio" ? a.checked && g.push(a.value) : g.push(a.value), g), []);
|
|
1994
2037
|
r(s, f, u);
|
|
1995
2038
|
}
|
|
1996
2039
|
return s;
|
|
@@ -2000,33 +2043,33 @@ var J;
|
|
|
2000
2043
|
function r(l, d, s) {
|
|
2001
2044
|
if (d.includes(".")) {
|
|
2002
2045
|
const f = d.split(".");
|
|
2003
|
-
let
|
|
2004
|
-
f.forEach((u,
|
|
2005
|
-
if (f.length >
|
|
2006
|
-
const
|
|
2007
|
-
if (
|
|
2008
|
-
const [, v,
|
|
2009
|
-
|
|
2046
|
+
let o = l;
|
|
2047
|
+
f.forEach((u, g) => {
|
|
2048
|
+
if (f.length > g + 1) {
|
|
2049
|
+
const a = u.match(/^(.+)\[(\d)\]$/);
|
|
2050
|
+
if (a) {
|
|
2051
|
+
const [, v, y] = a;
|
|
2052
|
+
o[v] = o[v] || [], o[v][y] = o[v][y] || {}, o = o[v][y];
|
|
2010
2053
|
} else
|
|
2011
|
-
|
|
2054
|
+
o[u] = o[u] || {}, o = o[u];
|
|
2012
2055
|
} else
|
|
2013
|
-
|
|
2056
|
+
o[u] = s;
|
|
2014
2057
|
});
|
|
2015
2058
|
} else
|
|
2016
2059
|
l[d] = s;
|
|
2017
2060
|
}
|
|
2018
2061
|
})(J || (J = {}));
|
|
2019
|
-
const
|
|
2062
|
+
const je = J;
|
|
2020
2063
|
export {
|
|
2021
|
-
|
|
2022
|
-
|
|
2064
|
+
$e as B,
|
|
2065
|
+
je as F,
|
|
2023
2066
|
$ as O,
|
|
2024
|
-
|
|
2025
|
-
|
|
2067
|
+
oe as S,
|
|
2068
|
+
Ce as T,
|
|
2026
2069
|
z as V,
|
|
2027
|
-
|
|
2028
|
-
|
|
2070
|
+
Ve as a,
|
|
2071
|
+
Ee as b,
|
|
2029
2072
|
ve as c,
|
|
2030
|
-
|
|
2031
|
-
|
|
2073
|
+
ze as d,
|
|
2074
|
+
Fe as u
|
|
2032
2075
|
};
|