@cronocode/react-box 1.7.3 → 1.7.5

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 ADDED
@@ -0,0 +1 @@
1
+ "use strict";const s=require("react"),u=require("./core.cjs");function d(t,n){const{tag:a="div",children:o,props:i,className:f,style:r}=t,m=u.useStyles(t,a==="svg"),v=s.useMemo(()=>u.classNames(m,f).join(" "),[t]),e={...i,className:v};r&&(e.style=r),n&&(e.ref=n);const[y,c]=s.useState(!1),l=typeof o=="function";return l&&(e.onMouseEnter=()=>c(!0),e.onMouseLeave=()=>c(!1)),s.createElement(a,e,l?o({isHover:y}):o)}const g=s.forwardRef(d);module.exports=g;
@@ -1,5 +1,5 @@
1
1
  import v, { forwardRef as d, useMemo as y, useState as g } from "react";
2
- import { u as p, c as N } from "./core.js";
2
+ import { u as p, c as N } from "./core.mjs";
3
3
  function x(s, o) {
4
4
  const { tag: a = "div", children: t, props: l, className: f, style: n } = s, u = p(s, a === "svg"), i = y(() => N(u, f).join(" "), [s]), e = { ...l, className: i };
5
5
  n && (e.style = n), o && (e.ref = o);
@@ -0,0 +1 @@
1
+ "use strict";const c=require("react/jsx-runtime"),g=require("react"),p=require("../box.cjs");require("../core.cjs");function u(e,r){const{viewBox:s="0 0 24 24",width:t="1.5rem",height:o,props:n,...i}=e;return c.jsx(p,{tag:"svg",ref:r,props:{...n,viewBox:s,width:t,height:o,xmlns:"http://www.w3.org/2000/svg",fill:"none"},...i})}const w=g.forwardRef(u);module.exports=w;
@@ -1,7 +1,7 @@
1
1
  import { jsx as m } from "react/jsx-runtime";
2
2
  import { forwardRef as f } from "react";
3
- import g from "../box.js";
4
- import "../core.js";
3
+ import g from "../box.mjs";
4
+ import "../core.mjs";
5
5
  function n(o, r) {
6
6
  const { viewBox: t = "0 0 24 24", width: s = "1.5rem", height: p, props: e, ...i } = o;
7
7
  return /* @__PURE__ */ m(
@@ -0,0 +1 @@
1
+ "use strict";const n=require("react/jsx-runtime"),r=require("react"),s=require("../box.cjs"),u=require("../utils.cjs");require("../core.cjs");const c=["type","onClick","disabled"];function i(t,e){const o=u.ObjectUtils.buildProps(t,c);return n.jsx(s,{ref:e,tag:"button",component:"button",...o})}const b=r.forwardRef(i);module.exports=b;
@@ -1,8 +1,8 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as p } from "react";
3
- import s from "../box.js";
4
- import { O as i } from "../utils.js";
5
- import "../core.js";
3
+ import s from "../box.mjs";
4
+ import { O as i } from "../utils.mjs";
5
+ import "../core.mjs";
6
6
  const m = ["type", "onClick", "disabled"];
7
7
  function e(o, t) {
8
8
  const r = i.buildProps(o, m);
@@ -0,0 +1 @@
1
+ "use strict";const e=require("react/jsx-runtime"),i=require("react"),t=require("../box.cjs"),c=require("../utils.cjs"),u=require("./flex.cjs");require("../core.cjs");const l=["name","onInput","onChange","disabled","autoFocus","readOnly","required","value","checked","defaultChecked"];function d(n,r){const{native:o}=n,s=c.ObjectUtils.buildProps(n,l,{type:"checkbox"});return e.jsxs(u,{inline:!0,position:"relative",children:[e.jsx(t,{ref:r,tag:"input",component:"checkbox",...s,appearance:o?void 0:"none"}),!o&&e.jsx(t,{position:"absolute",pointerEvents:"none",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"100%",viewBox:"0 0 20 20",children:e.jsx("g",{fill:"none",fillRule:"evenodd",children:e.jsx("path",{stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",d:"M6 10.15L8.5 13 14 7"})})})})]})}const a=i.forwardRef(d);module.exports=a;
@@ -1,9 +1,9 @@
1
1
  import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
2
  import { forwardRef as s } from "react";
3
- import t from "../box.js";
4
- import { O as a } from "../utils.js";
5
- import d from "./flex.js";
6
- import "../core.js";
3
+ import t from "../box.mjs";
4
+ import { O as a } from "../utils.mjs";
5
+ import d from "./flex.mjs";
6
+ import "../core.mjs";
7
7
  const l = [
8
8
  "name",
9
9
  "onInput",
@@ -0,0 +1 @@
1
+ "use strict";const s=require("react/jsx-runtime"),u=require("../box.cjs");require("react");require("../core.cjs");function c(e){if(!(e!=null&&e.length))return{rows:[],columns:[]};const i=Object.keys(e[0]);return{rows:e.map(r=>({dataRow:r,cells:i.map(n=>({key:n,value:r[n]}))})),columns:i.map(r=>({key:r}))}}function l(e){const{data:i}=e,r=c(i);return s.jsx(u,{display:"grid",b:1,borderRadius:1,children:r.columns.length===0?s.jsx(s.Fragment,{children:"empty grid"}):s.jsxs(s.Fragment,{children:[r.columns.map((n,t)=>s.jsx(u,{style:{gridColumn:t+1},children:n.key.toString()},n.key.toString())),r.rows.map((n,t)=>n.cells.map(o=>s.jsx(u,{children:o.value},o.key.toString()+t)))]})})}module.exports=l;
@@ -1,7 +1,7 @@
1
1
  import { jsx as o, Fragment as m, jsxs as u } from "react/jsx-runtime";
2
- import s from "../box.js";
2
+ import s from "../box.mjs";
3
3
  import "react";
4
- import "../core.js";
4
+ import "../core.mjs";
5
5
  function c(e) {
6
6
  if (!(e != null && e.length))
7
7
  return {
@@ -0,0 +1 @@
1
+ "use strict";const t=require("react/jsx-runtime"),i=require("react"),o=require("../box.cjs");require("../core.cjs");function c(e,r){const{inline:n,...s}=e;return t.jsx(o,{ref:r,display:n?"inline-flex":"flex",...s})}const u=i.forwardRef(c);module.exports=u;
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { forwardRef as f } from "react";
3
- import n from "../box.js";
4
- import "../core.js";
3
+ import n from "../box.mjs";
4
+ import "../core.mjs";
5
5
  function l(o, r) {
6
6
  const { inline: e, ...t } = o;
7
7
  return /* @__PURE__ */ i(n, { ref: r, display: e ? "inline-flex" : "flex", ...t });
@@ -0,0 +1 @@
1
+ "use strict";const m=require("react/jsx-runtime"),o=require("react"),a=require("../box.cjs"),f=require("../utils.cjs");require("../core.cjs");function l(r){const{onSubmit:s,props:n}=r,t=o.useRef(null),u=o.useCallback(e=>{e.preventDefault();const i=f.FormUtils.getFormEntries(t.current);s(i,e)},[]),c={...n,onSubmit:u,ref:t};return m.jsx(a,{tag:"form",...r,props:c})}module.exports=l;
@@ -1,8 +1,8 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import { useRef as p, useCallback as u } from "react";
3
- import a from "../box.js";
4
- import { F as c } from "../utils.js";
5
- import "../core.js";
3
+ import a from "../box.mjs";
4
+ import { F as c } from "../utils.mjs";
5
+ import "../core.mjs";
6
6
  function S(o) {
7
7
  const { onSubmit: m, props: n } = o, r = p(null), e = u((t) => {
8
8
  t.preventDefault();
@@ -0,0 +1 @@
1
+ "use strict";const s=require("react/jsx-runtime"),t=require("react"),o=require("../box.cjs");require("../core.cjs");function c(r,e){const{inline:i,...n}=r;return s.jsx(o,{ref:e,display:i?"inline-grid":"grid",...n})}const u=t.forwardRef(c);module.exports=u;
@@ -1,7 +1,7 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as d } from "react";
3
- import e from "../box.js";
4
- import "../core.js";
3
+ import e from "../box.mjs";
4
+ import "../core.mjs";
5
5
  function f(r, i) {
6
6
  const { inline: o, ...t } = r;
7
7
  return /* @__PURE__ */ n(e, { ref: i, display: o ? "inline-grid" : "grid", ...t });
@@ -0,0 +1 @@
1
+ "use strict";const r=require("react/jsx-runtime"),n=require("react"),u=require("../box.cjs"),s=require("../utils.cjs");require("../core.cjs");const i=["name","onInput","onChange","disabled","value","autoFocus","readOnly","required","checked","defaultChecked"];function c(e,t){const o=s.ObjectUtils.buildProps(e,i,{type:"radio"});return r.jsx(u,{ref:t,tag:"input",component:"radioButton",...o})}const a=n.forwardRef(c);module.exports=a;
@@ -1,8 +1,8 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
2
  import { forwardRef as n } from "react";
3
- import a from "../box.js";
4
- import { O as i } from "../utils.js";
5
- import "../core.js";
3
+ import a from "../box.mjs";
4
+ import { O as i } from "../utils.mjs";
5
+ import "../core.mjs";
6
6
  const d = [
7
7
  "name",
8
8
  "onInput",
@@ -0,0 +1 @@
1
+ "use strict";const n=require("react/jsx-runtime"),o=require("react"),a=require("../box.cjs"),s=require("../utils.cjs");require("../core.cjs");const u=["name","onInput","onChange","placeholder","disabled","value","defaultValue","rows","cols","autoFocus","maxLength","minLength","readOnly","required"];function c(e,t){const r=s.ObjectUtils.buildProps(e,u);return n.jsx(a,{ref:t,tag:"textarea",component:"textarea",...r})}const i=o.forwardRef(c);module.exports=i;
@@ -1,8 +1,8 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { forwardRef as a } from "react";
3
- import n from "../box.js";
4
- import { O as s } from "../utils.js";
5
- import "../core.js";
3
+ import n from "../box.mjs";
4
+ import { O as s } from "../utils.mjs";
5
+ import "../core.mjs";
6
6
  const m = [
7
7
  "name",
8
8
  "onInput",
@@ -0,0 +1 @@
1
+ "use strict";const r=require("react/jsx-runtime"),n=require("react"),s=require("../box.cjs"),u=require("../utils.cjs");require("../core.cjs");const a=["name","onInput","onChange","type","placeholder","disabled","defaultValue","autoFocus","readOnly","required","value","pattern"];function c(e,t){const o=u.ObjectUtils.buildProps(e,a);return r.jsx(s,{ref:t,tag:"input",component:"textbox",...o})}const i=n.forwardRef(c);module.exports=i;
@@ -1,8 +1,8 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { forwardRef as n } from "react";
3
- import a from "../box.js";
4
- import { O as p } from "../utils.js";
5
- import "../core.js";
3
+ import a from "../box.mjs";
4
+ import { O as p } from "../utils.mjs";
5
+ import "../core.mjs";
6
6
  const s = [
7
7
  "name",
8
8
  "onInput",
@@ -0,0 +1 @@
1
+ "use strict";const l=require("react/jsx-runtime"),h=require("react-dom"),f=require("../box.cjs"),s=require("react");require("../core.cjs");function v(){return s.useMemo(()=>{const i="crono-box";let r=document.getElementById(i);return r||(r=document.createElement("div"),r.id=i,document.body.appendChild(r)),r},[])}const a=2;function x(i){const{onPositionChange:r}=i,u=s.useRef(null),[e,p]=s.useState(),m=v(),w=s.useCallback((o,t)=>{const n=c=>{c.target.contains(o)&&t(o)};return document.addEventListener("scroll",n,{capture:!0}),()=>{document.removeEventListener("scroll",n,{capture:!0})}},[e]),b=s.useCallback((o,t)=>{const n=c=>{t(o)};return window.addEventListener("resize",n,{capture:!0}),()=>{window.removeEventListener("resize",n,{capture:!0})}},[e]),d=s.useCallback(o=>{const t=o.getBoundingClientRect(),n=Math.round((t.top+window.scrollY)*a)/a,c=Math.round((t.left+window.scrollX)*a)/a;((e==null?void 0:e.top)!==n||(e==null?void 0:e.left)!==c)&&(r==null||r({top:n,left:c}),p({top:n,left:c,width:t.width>0?t.width:void 0}))},[e]);return s.useLayoutEffect(()=>{if(u.current){d(u.current);const o=w(u.current,d),t=b(u.current,d);return()=>{o(),t()}}},[e]),l.jsxs(l.Fragment,{children:[l.jsx(f,{ref:u}),e&&h.createPortal(l.jsx(f,{position:"absolute",top:0,left:0,transition:"none",style:{transform:`translate(${e.left}px,${e.top}px)`,width:e.width},children:l.jsx(f,{position:"absolute",width:"fit",...i})}),m)]})}module.exports=x;
@@ -1,8 +1,8 @@
1
1
  import { jsxs as v, Fragment as b, jsx as a } from "react/jsx-runtime";
2
2
  import { createPortal as x } from "react-dom";
3
- import d from "../box.js";
3
+ import d from "../box.mjs";
4
4
  import { useMemo as E, useRef as C, useState as g, useCallback as f, useLayoutEffect as L } from "react";
5
- import "../core.js";
5
+ import "../core.mjs";
6
6
  function y() {
7
7
  return E(() => {
8
8
  const i = "crono-box";
package/core.cjs ADDED
@@ -0,0 +1,58 @@
1
+ "use strict";const j=require("react");var e;(u=>{(l=>{function m(s,n){return`${s}${n.replace("/","-")}`}l.fraction=m;function c(s){return[`${s} path`,`${s} circle`,`${s} rect`,`${s} line`]}l.svg=c})(u.ClassName||(u.ClassName={})),(l=>{function m(o,a){return`${a/4}rem`}l.rem=m;function c(o,a){return`${a}px`}l.px=c;function s(o,a){const[v,g]=a.split("/");return`${+v/+g*100}%`}l.fraction=s;function n(o,a){switch(a){case"fit":return"100%";case"fit-screen":return o.toLocaleLowerCase().includes("height")?"100vh":"100vw";default:return a}}l.widthHeight=n;function f(o){return(a,v)=>`var(--${o}${v});`}l.variables=f;function b(o){return(a,v)=>`var(--${o}${v});`}l.svgVariables=b;function h(o,a){return`repeat(${a},minmax(0,1fr))`}l.gridColumns=h;function p(o,a){return a==="full-row"?"1/-1":`span ${a}/span ${a}`}l.gridColumn=p;function V(o,a){return`${a}ms`}l.ms=V;function C(o,a){return`${a}deg`}l.rotate=C;function r(o,a){return a==="xAxis"?"-1 1":"1 -1"}l.flip=r})(u.Value||(u.Value={}))})(e||(e={}));const i=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,64,68,72,76,80,84,88,92,96,100],U=[-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-22,-24,-26,-28,-30,-32,-34,-36,-38,-40,-44,-48,-52,-56,-60,-64,-68,-72,-76,-80,-84,-88,-92,-96,-100],d=[...i,...U],L=["solid","dashed","dotted","double","groove","ridge","inset","outset","none","hidden"],A=["auto","hidden","scroll","visible"],w=["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"],x=["fit","fit-screen","auto","fit-content","max-content","min-content"],I=["auto","flex-start","flex-end","center","baseline","stretch"],t={display:{cssNames:["display"],values1:{values:["none","block","inline-block","flex","inline-flex","grid","inline-grid","contents"]},values2:{values:[]},values3:{values:[]}},inline:{cssNames:["display"],values1:{values:[!0]},values2:{values:[]},values3:{values:[]}},boxSizing:{cssNames:["box-sizing"],values1:{values:["border-box","content-box"]},values2:{values:[]},values3:{values:[]}},width:{cssNames:["width"],values1:{values:x,formatValue:e.Value.widthHeight},values2:{values:i,formatValue:e.Value.rem},values3:{values:w,formatValue:e.Value.fraction}},minWidth:{cssNames:["min-width"],values1:{values:x,formatValue:e.Value.widthHeight},values2:{values:i,formatValue:e.Value.rem},values3:{values:w,formatValue:e.Value.fraction}},maxWidth:{cssNames:["max-width"],values1:{values:x,formatValue:e.Value.widthHeight},values2:{values:i,formatValue:e.Value.rem},values3:{values:w,formatValue:e.Value.fraction}},height:{cssNames:["height"],values1:{values:x,formatValue:e.Value.widthHeight},values2:{values:i,formatValue:e.Value.rem},values3:{values:w,formatValue:e.Value.fraction}},minHeight:{cssNames:["min-height"],values1:{values:x,formatValue:e.Value.widthHeight},values2:{values:i,formatValue:e.Value.rem},values3:{values:w,formatValue:e.Value.fraction}},maxHeight:{cssNames:["max-height"],values1:{values:x,formatValue:e.Value.widthHeight},values2:{values:i,formatValue:e.Value.rem},values3:{values:w,formatValue:e.Value.fraction}},position:{cssNames:["position"],values1:{values:["static","relative","absolute","fixed","sticky"]},values2:{values:[]},values3:{values:[]}},top:{cssNames:["top"],values1:{values:d,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},right:{cssNames:["right"],values1:{values:d,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},bottom:{cssNames:["bottom"],values1:{values:d,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},left:{cssNames:["left"],values1:{values:d,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},inset:{cssNames:["inset"],values1:{values:d,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},margin:{cssNames:["margin"],values1:{values:d,formatValue:e.Value.rem},values2:{values:["auto"]},values3:{values:[]}},marginHorizontal:{cssNames:["margin-inline"],values1:{values:d,formatValue:e.Value.rem},values2:{values:["auto"]},values3:{values:[]}},marginVertical:{cssNames:["margin-block"],values1:{values:d,formatValue:e.Value.rem},values2:{values:["auto"]},values3:{values:[]}},marginTop:{cssNames:["margin-top"],values1:{values:d,formatValue:e.Value.rem},values2:{values:["auto"]},values3:{values:[]}},marginRight:{cssNames:["margin-right"],values1:{values:d,formatValue:e.Value.rem},values2:{values:["auto"]},values3:{values:[]}},marginBottom:{cssNames:["margin-bottom"],values1:{values:d,formatValue:e.Value.rem},values2:{values:["auto"]},values3:{values:[]}},marginLeft:{cssNames:["margin-left"],values1:{values:d,formatValue:e.Value.rem},values2:{values:["auto"]},values3:{values:[]}},padding:{cssNames:["padding"],values1:{values:d,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},paddingHorizontal:{cssNames:["padding-inline"],values1:{values:d,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},paddingVertical:{cssNames:["padding-block"],values1:{values:d,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},paddingTop:{cssNames:["padding-top"],values1:{values:d,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},paddingRight:{cssNames:["padding-right"],values1:{values:d,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},paddingBottom:{cssNames:["padding-bottom"],values1:{values:d,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},paddingLeft:{cssNames:["padding-left"],values1:{values:d,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},border:{cssNames:["border-width"],values1:{values:i,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},borderHorizontal:{cssNames:["border-inline-width"],values1:{values:d,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},borderVertical:{cssNames:["border-block-width"],values1:{values:d,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},borderTop:{cssNames:["border-top-width"],values1:{values:d,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},borderRight:{cssNames:["border-right-width"],values1:{values:d,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},borderBottom:{cssNames:["border-bottom-width"],values1:{values:d,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},borderLeft:{cssNames:["border-left-width"],values1:{values:d,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},borderStyle:{cssNames:["border-style"],values1:{values:L},values2:{values:[]},values3:{values:[]}},borderRadius:{cssNames:["border-radius"],values1:{values:i,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusTop:{cssNames:["border-top-left-radius","border-top-right-radius"],values1:{values:i,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusRight:{cssNames:["border-top-right-radius","border-bottom-right-radius"],values1:{values:i,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusBottom:{cssNames:["border-bottom-left-radius","border-bottom-right-radius"],values1:{values:i,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusLeft:{cssNames:["border-top-left-radius","border-bottom-left-radius"],values1:{values:i,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusTopLeft:{cssNames:["border-top-left-radius"],values1:{values:i,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusTopRight:{cssNames:["border-top-right-radius"],values1:{values:i,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusBottomLeft:{cssNames:["border-bottom-left-radius"],values1:{values:i,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},borderRadiusBottomRight:{cssNames:["border-bottom-right-radius"],values1:{values:i,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},cursor:{cssNames:["cursor"],values1:{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"]},values2:{values:[]},values3:{values:[]}},zIndex:{cssNames:["z-index"],values1:{values:[1,2,3,4,5,10,11,12,13,14,15,100,101,102,103,104,105,1e3,1001,1002,1003,1004,1005]},values2:{values:[]},values3:{values:[]}},overflow:{cssNames:["overflow"],values1:{values:A},values2:{values:[]},values3:{values:[]}},overflowX:{cssNames:["overflow-x"],values1:{values:A},values2:{values:[]},values3:{values:[]}},overflowY:{cssNames:["overflow-y"],values1:{values:A},values2:{values:[]},values3:{values:[]}},opacity:{cssNames:["opacity"],values1:{values:[0,.1,.2,.3,.4,.5,.6,.7,.8,.9,1]},values2:{values:[]},values3:{values:[]}},fontSize:{cssNames:["font-size"],values1:{values:i,formatValue:e.Value.px},values2:{values:["inherit"]},values3:{values:[]}},fontStyle:{cssNames:["font-style"],values1:{values:["italic","normal","oblique"]},values2:{values:[]},values3:{values:[]}},fontWeight:{cssNames:["font-weight"],values1:{values:[100,200,300,400,500,600,700,800,900]},values2:{values:[]},values3:{values:[]}},letterSpacing:{cssNames:["letter-spacing"],values1:{values:i,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},lineHeight:{cssNames:["line-height"],values1:{values:i,formatValue:e.Value.px},values2:{values:["font-size"],formatValue:()=>"1"},values3:{values:[]}},textDecoration:{cssNames:["text-decoration"],values1:{values:["none","underline","overline","line-through"]},values2:{values:[]},values3:{values:[]}},textTransform:{cssNames:["text-transform"],values1:{values:["none","capitalize","lowercase","uppercase"]},values2:{values:[]},values3:{values:[]}},textAlign:{cssNames:["text-align"],values1:{values:["left","right","center","justify"]},values2:{values:[]},values3:{values:[]}},flexWrap:{cssNames:["flex-wrap"],values1:{values:["nowrap","wrap","wrap-reverse"]},values2:{values:[]},values3:{values:[]}},justifyContent:{cssNames:["justify-content"],values1:{values:["start","end","flex-start","flex-end","center","left","right","space-between","space-around","space-evenly","stretch"]},values2:{values:[]},values3:{values:[]}},alignItems:{cssNames:["align-items"],values1:{values:["stretch","flex-start","flex-end","center","baseline","start","end","self-start","self-end"]},values2:{values:[]},values3:{values:[]}},alignContent:{cssNames:["align-content"],values1:{values:["flex-start","flex-end","center","space-between","space-around","space-evenly","stretch","start","end","baseline"]},values2:{values:[]},values3:{values:[]}},flex1:{cssNames:["flex"],values1:{values:[!0],formatValue:()=>"1"},values2:{values:[]},values3:{values:[]}},flexDirection:{cssNames:["flex-direction"],values1:{values:["row","row-reverse","column","column-reverse"]},values2:{values:[]},values3:{values:[]}},gap:{cssNames:["gap"],values1:{values:i,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},rowGap:{cssNames:["row-gap"],values1:{values:i,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},columnGap:{cssNames:["column-gap"],values1:{values:i,formatValue:e.Value.rem},values2:{values:[]},values3:{values:[]}},order:{cssNames:["order"],values1:{values:i},values2:{values:[]},values3:{values:[]}},flexGrow:{cssNames:["flex-grow"],values1:{values:i},values2:{values:[]},values3:{values:[]}},flexShrink:{cssNames:["flex-shrink"],values1:{values:i},values2:{values:[]},values3:{values:[]}},alignSelf:{cssNames:["align-self"],values1:{values:I},values2:{values:[]},values3:{values:[]}},justifySelf:{cssNames:["justify-self"],values1:{values:I},values2:{values:[]},values3:{values:[]}},gridColumns:{cssNames:["grid-template-columns"],values1:{values:i,formatValue:e.Value.gridColumns},values2:{values:[]},values3:{values:[]}},colSpan:{cssNames:["grid-column"],values1:{values:i,formatValue:e.Value.gridColumn},values2:{values:["full-row"],formatValue:e.Value.gridColumn},values3:{values:[]}},colStart:{cssNames:["grid-column-start"],values1:{values:i},values2:{values:[]},values3:{values:[]}},colEnd:{cssNames:["grid-column-end"],values1:{values:i},values2:{values:[]},values3:{values:[]}},outline:{cssNames:["outline-width"],values1:{values:i,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},outlineStyle:{cssNames:["outline-style"],values1:{values:L},values2:{values:[]},values3:{values:[]}},outlineOffset:{cssNames:["outline-offset"],values1:{values:i,formatValue:e.Value.px},values2:{values:[]},values3:{values:[]}},transition:{cssNames:["transition-property"],values1:{values:["none","all"]},values2:{values:[]},values3:{values:[]}},transitionDuration:{cssNames:["transition-duration"],values1:{values:[50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1e3],formatValue:e.Value.ms},values2:{values:[]},values3:{values:[]}},userSelect:{cssNames:["user-select"],values1:{values:["none","auto","text","all"]},values2:{values:[]},values3:{values:[]}},appearance:{cssNames:["appearance"],values1:{values:["none"]},values2:{values:[]},values3:{values:[]}},pointerEvents:{cssNames:["pointer-events"],values1:{values:["none","auto","all"]},values2:{values:[]},values3:{values:[]}},whiteSpace:{cssNames:["white-space"],values1:{values:["break-spaces","normal","nowrap","pre","pre-line","pre-wrap"]},values2:{values:[]},values3:{values:[]}},textOverflow:{cssNames:["text-overflow"],values1:{values:["clip","ellipsis"]},values2:{values:[]},values3:{values:[]}},rotate:{cssNames:["rotate"],values1:{values:[0,90,180,270,-90,-180,-270],formatValue:e.Value.rotate},values2:{values:[]},values3:{values:[]}},flip:{cssNames:["scale"],values1:{values:["xAxis","yAxis"],formatValue:e.Value.flip},values2:{values:[]},values3:{values:[]}}},_={shadow:{cssNames:["box-shadow"],formatValue:e.Value.variables("shadow")},background:{cssNames:["background"],formatValue:e.Value.variables("background")},color:{cssNames:["color"],formatValue:e.Value.variables("color")},bgColor:{cssNames:["background-color"],formatValue:e.Value.variables("color")},borderColor:{cssNames:["border-color"],formatValue:e.Value.variables("color")},outlineColor:{cssNames:["outline-color"],formatValue:e.Value.variables("color")}},D={fill:{cssNames:["fill"],formatValue:e.Value.svgVariables("color"),formatSelector:e.ClassName.svg},stroke:{cssNames:["stroke"],formatValue:e.Value.svgVariables("color"),formatSelector:e.ClassName.svg}},X=["H","F","A"],z={hover:{className:"_h"},focus:{className:"_f"}};Object.keys(_).forEach(u=>{t[u]=_[u],t[u].isThemeStyle=!0});Object.keys(D).forEach(u=>{t[u]=D[u],t[u].isThemeStyle=!0});const k={w:{...t.width,key:"width"},h:{...t.height,key:"height"},m:{...t.margin,key:"margin"},mx:{...t.marginHorizontal,key:"marginHorizontal"},my:{...t.marginVertical,key:"marginVertical"},mt:{...t.marginTop,key:"marginTop"},mr:{...t.marginRight,key:"marginRight"},mb:{...t.marginBottom,key:"marginBottom"},ml:{...t.marginLeft,key:"marginLeft"},p:{...t.padding,key:"padding"},px:{...t.paddingHorizontal,key:"paddingHorizontal"},py:{...t.paddingVertical,key:"paddingVertical"},pt:{...t.paddingTop,key:"paddingTop"},pr:{...t.paddingRight,key:"paddingRight"},pb:{...t.paddingBottom,key:"paddingBottom"},pl:{...t.paddingLeft,key:"paddingLeft"},b:{...t.border,key:"border"},bx:{...t.borderHorizontal,key:"borderHorizontal"},by:{...t.borderVertical,key:"borderVertical"},bt:{...t.borderTop,key:"borderTop"},br:{...t.borderRight,key:"borderRight"},bb:{...t.borderBottom,key:"borderBottom"},bl:{...t.borderLeft,key:"borderLeft"},jc:{...t.justifyContent,key:"justifyContent"},ai:{...t.alignItems,key:"alignItems"},ac:{...t.alignContent,key:"alignContent"},d:{...t.flexDirection,key:"flexDirection"}},Y=Object.keys(t),J=Object.keys(k);X.forEach(u=>{Y.forEach(l=>{t[`${l}${u}`]={...t[l]},t[`${l}${u}`].pseudoSuffix=u}),J.forEach(l=>{k[`${l}${u}`]={...k[l],key:`${k[l].key}${u}`},k[`${l}${u}`].pseudoSuffix=u})});class Q{constructor(){this._index=0,this._cache={}}getIdentity(l){return this._cache[l]||(this._cache[l]=this.getByIndex(this._index++)),this._cache[l]}getByIndex(l){const{first:m,next:c}=Z,s=l-m.length;if(s<0)return m[l];const n=Math.floor(s/c.length),f=s-n*c.length;return this.getByIndex(n)+c[f]}}const Z={first:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",next:"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"};var F;(u=>{u.boxClassName="_box",u.svgClassName="_svg";const l=`: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
+ html{font-size: 16px;font-family: Arial, sans-serif;}
3
+ body{margin: 0;line-height: var(--lineHeight);font-size: var(--fontSize);}
4
+ a,ul{all: unset;}
5
+ .${u.boxClassName}{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
+ .${u.svgClassName}{transition: all var(--svgTransitionTime);}.${u.svgClassName} path,.${u.svgClassName} circle,.${u.svgClassName} rect,.${u.svgClassName} line {transition: all var(--svgTransitionTime);}
7
+ `,m=new Q,c=Object.keys(t);let s=!1;const n=c.reduce((r,o)=>(r[o]=new Set,r),{});function f(r,o){if(r in t)return h(r,o);if(r in z)return z[r].className}u.get=f;function b(){if(s){console.info("%c💬Flush Dox Styles","color: #00ffff");let r=p([l]);r=p(r,"H"),r=p(r,"F"),r=p(r,"A");const o=C();o.innerHTML=r.join(""),s=!1}}u.flush=b;function h(r,o){var g;n[r].has(o)||(s=!0,n[r].add(o));const a=V(r,o),v=((g=a.formatClassName)==null?void 0:g.call(a,r,o))??`${r}${o}`;return`-${m.getIdentity(v)}`}function p(r,o){return Object.entries(n).filter(([v])=>{var g;return((g=t[v])==null?void 0:g.pseudoSuffix)===o}).reduce((v,[g,M])=>(M.forEach(H=>{var O;const y=V(g,H),N=`.${h(g,H)}`;let T=[];o?o==="H"?T=[...a(`${N}:hover`,y),...a(`.${z.hover.className}:hover>${N}`,y)]:o==="F"?T=[...a(`${N}:focus-within`,y),...a(`.${z.focus.className}:focus-within>${N}`,y)]:o==="A"&&(T=a(`${N}:active`,y)):T=a(N,y);const W=((O=y.formatValue)==null?void 0:O.call(y,g,H))??H,q=t[g].cssNames.map(G=>`${G}:${W};`).join("");v.push(`${T.join(",")}{${q}}`)}),v),r);function a(v,g){return g.formatSelector?g.formatSelector(v):[v]}}function V(r,o){const a=t[r];return a.isThemeStyle?a:a.values1.values.includes(o)?a.values1:a.values2.values.includes(o)?a.values2:a.values3}function C(){const r="crono-styles",a=typeof window<"u"&&typeof window.document<"u"?window.document:global.document;let v=a.getElementById(r);return v||(v=a.createElement("style"),v.setAttribute("id",r),v.setAttribute("type","text/css"),a.head.insertBefore(v,a.head.firstChild)),v}})(F||(F={}));const $=F,S={button:{styles:{display:"inline-block",p:3,cursor:"pointer",b:1,borderRadius:1},disabled:{cursor:"default"}},checkbox:{styles:{display:"inline-block",b:1,p:2}},radioButton:{styles:{display:"inline-block",b:1,p:2}},textbox:{styles:{display:"inline-block",b:1,borderRadius:1,p:3}},textarea:{styles:{display:"inline-block",b:1,borderRadius:1}}};var R;(u=>{u.Styles=S;function l(s){u.Styles=s,c()}u.setup=l;function m(s,n){const f=Object.entries(s.colors).map(([a,v])=>`--color${a}: ${v};`).join(`
8
+ `),b=Object.entries(s.shadows).map(([a,v])=>`--shadow${a}: ${v};`).join(`
9
+ `),h=Object.entries(s.backgrounds).map(([a,v])=>`--background${a}: ${v};`).join(`
10
+ `),p=[":root {"];f&&p.push(` ${f}`),b&&p.push(` ${b}`),h&&p.push(` ${h}`),p.push("}");const V=Object.keys(s.colors).map(a=>`'${a}'`).join(" | "),C=Object.keys(s.backgrounds).map(a=>`'${a}'`).join(" | "),r=Object.keys(s.shadows).map(a=>`'${a}'`).join(" | "),o=`import '@cronocode/react-box';
11
+
12
+ declare module '${(n==null?void 0:n.namespacePath)??"@cronocode/react-box/core/types"}' {
13
+ type ColorType = ${V};
14
+ type BackgroundType = ${C};
15
+ type ShadowType = ${r};
16
+
17
+ namespace Augmented {
18
+ interface BoxProps {
19
+ color?: ColorType;
20
+ colorH?: ColorType;
21
+ colorF?: ColorType;
22
+ colorA?: ColorType;
23
+ bgColor?: ColorType;
24
+ bgColorH?: ColorType;
25
+ bgColorF?: ColorType;
26
+ bgColorA?: ColorType;
27
+ borderColor?: ColorType;
28
+ borderColorH?: ColorType;
29
+ borderColorF?: ColorType;
30
+ borderColorA?: ColorType;
31
+ outlineColor?: ColorType;
32
+ outlineColorH?: ColorType;
33
+ outlineColorF?: ColorType;
34
+ outlineColorA?: ColorType;
35
+ background?: BackgroundType;
36
+ backgroundH?: BackgroundType;
37
+ backgroundF?: BackgroundType;
38
+ backgroundA?: BackgroundType;
39
+ shadow?: ShadowType;
40
+ shadowH?: ShadowType;
41
+ shadowF?: ShadowType;
42
+ shadowA?: ShadowType;
43
+ }
44
+
45
+ interface SvgProps {
46
+ fill?: ColorType;
47
+ fillH?: ColorType;
48
+ fillF?: ColorType;
49
+ fillA?: ColorType;
50
+ stroke?: ColorType;
51
+ strokeH?: ColorType;
52
+ strokeF?: ColorType;
53
+ strokeA?: ColorType;
54
+ }
55
+ }
56
+ }
57
+ `;return{variables:p.join(`
58
+ `),boxDts:o}}u.setupAugmentedProps=m;function c(){Object.keys(S).forEach(n=>{const f=u.Styles[n],b=S[n];f?(f.styles={...b.styles,...f.styles},f.disabled&&b.disabled&&(f.disabled={...b.disabled,...f.disabled})):u.Styles[n]=S[n]})}})(R||(R={}));const E=R;function K(u){const{clean:l,disabled:m,theme:c,component:s}=u;return j.useMemo(()=>{var b,h,p;if(l)return;let n=E.Styles[s]??((b=E.Styles.components)==null?void 0:b[s]);if(!n)return;let f=c?{...n.styles,...(h=n.themes)==null?void 0:h[c].styles}:n.styles;return m?c?{...f,...n.disabled,...(p=n.themes)==null?void 0:p[c].disabled}:{...f,...n.disabled}:f},[s,l,m,c])}const ee=typeof window<"u"&&typeof window.document<"u",se=ee?j.useLayoutEffect:j.useEffect;function ae(u,l){const m=K(u);return se($.flush,[u]),j.useMemo(()=>{const c=[l?$.svgClassName:$.boxClassName],s=m?{...B(m),...B(u)}:B(u);return"inline"in s&&(s.display==="block"?s.display="inline-block":s.display==="flex"?s.display="inline-flex":s.display==="grid"&&(s.display="inline-grid"),delete s.inline),"inlineH"in s&&(s.displayH==="block"?s.displayH="inline-block":s.displayH==="flex"?s.displayH="inline-flex":s.displayH==="grid"&&(s.displayH="inline-grid"),delete s.inlineH),"inlineF"in s&&(s.displayF==="block"?s.displayF="inline-block":s.displayF==="flex"?s.displayF="inline-flex":s.displayF==="grid"&&(s.displayF="inline-grid"),delete s.inlineF),"inlineA"in s&&(s.displayA==="block"?s.displayA="inline-block":s.displayA==="flex"?s.displayA="inline-flex":s.displayA==="grid"&&(s.displayA="inline-grid"),delete s.inlineA),Object.entries(s).forEach(([n,f])=>{c.push($.get(n,f))}),c},[u,m])}function B(u){const l={...u};return Object.keys(l).forEach(c=>{const s=k[c];s&&(s.key in l||(l[s.key]=l[c]),delete l[c])}),l}function P(...u){return u.reduce((l,m)=>m?typeof m=="string"?(l.push(m),l):Array.isArray(m)?(l.push(...P(...m)),l):(Object.entries(m).forEach(([c,s])=>{s&&l.push(c)}),l):l,[])}exports.StylesContext=$;exports.Theme=E;exports.classNames=P;exports.useStyles=ae;
@@ -1,68 +1,68 @@
1
- import { useMemo as P, useLayoutEffect as U, useEffect as X } from "react";
1
+ import { useMemo as D, useLayoutEffect as q, useEffect as U } from "react";
2
2
  var e;
3
3
  ((u) => {
4
- ((a) => {
5
- function c(s, n) {
4
+ ((l) => {
5
+ function m(s, n) {
6
6
  return `${s}${n.replace("/", "-")}`;
7
7
  }
8
- a.fraction = c;
9
- function v(s) {
8
+ l.fraction = m;
9
+ function c(s) {
10
10
  return [`${s} path`, `${s} circle`, `${s} rect`, `${s} line`];
11
11
  }
12
- a.svg = v;
13
- })(u.ClassName || (u.ClassName = {})), ((a) => {
14
- function c(t, l) {
15
- return `${l / 4}rem`;
12
+ l.svg = c;
13
+ })(u.ClassName || (u.ClassName = {})), ((l) => {
14
+ function m(o, a) {
15
+ return `${a / 4}rem`;
16
16
  }
17
- a.rem = c;
18
- function v(t, l) {
19
- return `${l}px`;
17
+ l.rem = m;
18
+ function c(o, a) {
19
+ return `${a}px`;
20
20
  }
21
- a.px = v;
22
- function s(t, l) {
23
- const [r, f] = l.split("/");
24
- return `${+r / +f * 100}%`;
21
+ l.px = c;
22
+ function s(o, a) {
23
+ const [v, g] = a.split("/");
24
+ return `${+v / +g * 100}%`;
25
25
  }
26
- a.fraction = s;
27
- function n(t, l) {
28
- switch (l) {
26
+ l.fraction = s;
27
+ function n(o, a) {
28
+ switch (a) {
29
29
  case "fit":
30
30
  return "100%";
31
31
  case "fit-screen":
32
- return t.toLocaleLowerCase().includes("height") ? "100vh" : "100vw";
32
+ return o.toLocaleLowerCase().includes("height") ? "100vh" : "100vw";
33
33
  default:
34
- return l;
34
+ return a;
35
35
  }
36
36
  }
37
- a.widthHeight = n;
38
- function d(t) {
39
- return (l, r) => `var(--${t}${r});`;
37
+ l.widthHeight = n;
38
+ function f(o) {
39
+ return (a, v) => `var(--${o}${v});`;
40
40
  }
41
- a.variables = d;
42
- function p(t) {
43
- return (l, r) => `var(--${t}${r});`;
41
+ l.variables = f;
42
+ function b(o) {
43
+ return (a, v) => `var(--${o}${v});`;
44
44
  }
45
- a.svgVariables = p;
46
- function h(t, l) {
47
- return `repeat(${l},minmax(0,1fr))`;
45
+ l.svgVariables = b;
46
+ function h(o, a) {
47
+ return `repeat(${a},minmax(0,1fr))`;
48
48
  }
49
- a.gridColumns = h;
50
- function g(t, l) {
51
- return l === "full-row" ? "1/-1" : `span ${l}/span ${l}`;
49
+ l.gridColumns = h;
50
+ function p(o, a) {
51
+ return a === "full-row" ? "1/-1" : `span ${a}/span ${a}`;
52
52
  }
53
- a.gridColumn = g;
54
- function V(t, l) {
55
- return `${l}ms`;
53
+ l.gridColumn = p;
54
+ function V(o, a) {
55
+ return `${a}ms`;
56
56
  }
57
- a.ms = V;
58
- function N(t, l) {
59
- return `${l}deg`;
57
+ l.ms = V;
58
+ function C(o, a) {
59
+ return `${a}deg`;
60
60
  }
61
- a.rotate = N;
62
- function T(t, l) {
63
- return l === "xAxis" ? "-1 1" : "1 -1";
61
+ l.rotate = C;
62
+ function r(o, a) {
63
+ return a === "xAxis" ? "-1 1" : "1 -1";
64
64
  }
65
- a.flip = T;
65
+ l.flip = r;
66
66
  })(u.Value || (u.Value = {}));
67
67
  })(e || (e = {}));
68
68
  const i = [
@@ -117,7 +117,7 @@ const i = [
117
117
  92,
118
118
  96,
119
119
  100
120
- ], Y = [
120
+ ], X = [
121
121
  -1,
122
122
  -2,
123
123
  -3,
@@ -163,7 +163,7 @@ const i = [
163
163
  -92,
164
164
  -96,
165
165
  -100
166
- ], m = [...i, ...Y], E = ["solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset", "none", "hidden"], A = ["auto", "hidden", "scroll", "visible"], x = [
166
+ ], d = [...i, ...X], O = ["solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset", "none", "hidden"], j = ["auto", "hidden", "scroll", "visible"], w = [
167
167
  "1/2",
168
168
  "1/3",
169
169
  "2/3",
@@ -190,7 +190,7 @@ const i = [
190
190
  "9/12",
191
191
  "10/12",
192
192
  "11/12"
193
- ], k = ["fit", "fit-screen", "auto", "fit-content", "max-content", "min-content"], L = ["auto", "flex-start", "flex-end", "center", "baseline", "stretch"], o = {
193
+ ], x = ["fit", "fit-screen", "auto", "fit-content", "max-content", "min-content"], R = ["auto", "flex-start", "flex-end", "center", "baseline", "stretch"], t = {
194
194
  /** The `display` CSS property sets whether an element is treated as a block or inline box and the layout used for its children, such as flow layout, grid or flex. */
195
195
  display: {
196
196
  cssNames: ["display"],
@@ -214,60 +214,60 @@ const i = [
214
214
  },
215
215
  width: {
216
216
  cssNames: ["width"],
217
- values1: { values: k, formatValue: e.Value.widthHeight },
217
+ values1: { values: x, formatValue: e.Value.widthHeight },
218
218
  values2: { values: i, formatValue: e.Value.rem },
219
219
  values3: {
220
- values: x,
220
+ values: w,
221
221
  formatValue: e.Value.fraction
222
222
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
223
223
  }
224
224
  },
225
225
  minWidth: {
226
226
  cssNames: ["min-width"],
227
- values1: { values: k, formatValue: e.Value.widthHeight },
227
+ values1: { values: x, formatValue: e.Value.widthHeight },
228
228
  values2: { values: i, formatValue: e.Value.rem },
229
229
  values3: {
230
- values: x,
230
+ values: w,
231
231
  formatValue: e.Value.fraction
232
232
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
233
233
  }
234
234
  },
235
235
  maxWidth: {
236
236
  cssNames: ["max-width"],
237
- values1: { values: k, formatValue: e.Value.widthHeight },
237
+ values1: { values: x, formatValue: e.Value.widthHeight },
238
238
  values2: { values: i, formatValue: e.Value.rem },
239
239
  values3: {
240
- values: x,
240
+ values: w,
241
241
  formatValue: e.Value.fraction
242
242
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
243
243
  }
244
244
  },
245
245
  height: {
246
246
  cssNames: ["height"],
247
- values1: { values: k, formatValue: e.Value.widthHeight },
247
+ values1: { values: x, formatValue: e.Value.widthHeight },
248
248
  values2: { values: i, formatValue: e.Value.rem },
249
249
  values3: {
250
- values: x,
250
+ values: w,
251
251
  formatValue: e.Value.fraction
252
252
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
253
253
  }
254
254
  },
255
255
  minHeight: {
256
256
  cssNames: ["min-height"],
257
- values1: { values: k, formatValue: e.Value.widthHeight },
257
+ values1: { values: x, formatValue: e.Value.widthHeight },
258
258
  values2: { values: i, formatValue: e.Value.rem },
259
259
  values3: {
260
- values: x,
260
+ values: w,
261
261
  formatValue: e.Value.fraction
262
262
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
263
263
  }
264
264
  },
265
265
  maxHeight: {
266
266
  cssNames: ["max-height"],
267
- values1: { values: k, formatValue: e.Value.widthHeight },
267
+ values1: { values: x, formatValue: e.Value.widthHeight },
268
268
  values2: { values: i, formatValue: e.Value.rem },
269
269
  values3: {
270
- values: x,
270
+ values: w,
271
271
  formatValue: e.Value.fraction
272
272
  // formatClassName: BoxStylesFormatters.ClassName.fraction,
273
273
  }
@@ -280,115 +280,115 @@ const i = [
280
280
  },
281
281
  top: {
282
282
  cssNames: ["top"],
283
- values1: { values: m, formatValue: e.Value.rem },
283
+ values1: { values: d, formatValue: e.Value.rem },
284
284
  values2: { values: [] },
285
285
  values3: { values: [] }
286
286
  },
287
287
  right: {
288
288
  cssNames: ["right"],
289
- values1: { values: m, formatValue: e.Value.rem },
289
+ values1: { values: d, formatValue: e.Value.rem },
290
290
  values2: { values: [] },
291
291
  values3: { values: [] }
292
292
  },
293
293
  bottom: {
294
294
  cssNames: ["bottom"],
295
- values1: { values: m, formatValue: e.Value.rem },
295
+ values1: { values: d, formatValue: e.Value.rem },
296
296
  values2: { values: [] },
297
297
  values3: { values: [] }
298
298
  },
299
299
  left: {
300
300
  cssNames: ["left"],
301
- values1: { values: m, formatValue: e.Value.rem },
301
+ values1: { values: d, formatValue: e.Value.rem },
302
302
  values2: { values: [] },
303
303
  values3: { values: [] }
304
304
  },
305
305
  inset: {
306
306
  cssNames: ["inset"],
307
- values1: { values: m, formatValue: e.Value.rem },
307
+ values1: { values: d, formatValue: e.Value.rem },
308
308
  values2: { values: [] },
309
309
  values3: { values: [] }
310
310
  },
311
311
  margin: {
312
312
  cssNames: ["margin"],
313
- values1: { values: m, formatValue: e.Value.rem },
313
+ values1: { values: d, formatValue: e.Value.rem },
314
314
  values2: { values: ["auto"] },
315
315
  values3: { values: [] }
316
316
  },
317
317
  marginHorizontal: {
318
318
  cssNames: ["margin-inline"],
319
- values1: { values: m, formatValue: e.Value.rem },
319
+ values1: { values: d, formatValue: e.Value.rem },
320
320
  values2: { values: ["auto"] },
321
321
  values3: { values: [] }
322
322
  },
323
323
  marginVertical: {
324
324
  cssNames: ["margin-block"],
325
- values1: { values: m, formatValue: e.Value.rem },
325
+ values1: { values: d, formatValue: e.Value.rem },
326
326
  values2: { values: ["auto"] },
327
327
  values3: { values: [] }
328
328
  },
329
329
  marginTop: {
330
330
  cssNames: ["margin-top"],
331
- values1: { values: m, formatValue: e.Value.rem },
331
+ values1: { values: d, formatValue: e.Value.rem },
332
332
  values2: { values: ["auto"] },
333
333
  values3: { values: [] }
334
334
  },
335
335
  marginRight: {
336
336
  cssNames: ["margin-right"],
337
- values1: { values: m, formatValue: e.Value.rem },
337
+ values1: { values: d, formatValue: e.Value.rem },
338
338
  values2: { values: ["auto"] },
339
339
  values3: { values: [] }
340
340
  },
341
341
  marginBottom: {
342
342
  cssNames: ["margin-bottom"],
343
- values1: { values: m, formatValue: e.Value.rem },
343
+ values1: { values: d, formatValue: e.Value.rem },
344
344
  values2: { values: ["auto"] },
345
345
  values3: { values: [] }
346
346
  },
347
347
  marginLeft: {
348
348
  cssNames: ["margin-left"],
349
- values1: { values: m, formatValue: e.Value.rem },
349
+ values1: { values: d, formatValue: e.Value.rem },
350
350
  values2: { values: ["auto"] },
351
351
  values3: { values: [] }
352
352
  },
353
353
  padding: {
354
354
  cssNames: ["padding"],
355
- values1: { values: m, formatValue: e.Value.rem },
355
+ values1: { values: d, formatValue: e.Value.rem },
356
356
  values2: { values: [] },
357
357
  values3: { values: [] }
358
358
  },
359
359
  paddingHorizontal: {
360
360
  cssNames: ["padding-inline"],
361
- values1: { values: m, formatValue: e.Value.rem },
361
+ values1: { values: d, formatValue: e.Value.rem },
362
362
  values2: { values: [] },
363
363
  values3: { values: [] }
364
364
  },
365
365
  paddingVertical: {
366
366
  cssNames: ["padding-block"],
367
- values1: { values: m, formatValue: e.Value.rem },
367
+ values1: { values: d, formatValue: e.Value.rem },
368
368
  values2: { values: [] },
369
369
  values3: { values: [] }
370
370
  },
371
371
  paddingTop: {
372
372
  cssNames: ["padding-top"],
373
- values1: { values: m, formatValue: e.Value.rem },
373
+ values1: { values: d, formatValue: e.Value.rem },
374
374
  values2: { values: [] },
375
375
  values3: { values: [] }
376
376
  },
377
377
  paddingRight: {
378
378
  cssNames: ["padding-right"],
379
- values1: { values: m, formatValue: e.Value.rem },
379
+ values1: { values: d, formatValue: e.Value.rem },
380
380
  values2: { values: [] },
381
381
  values3: { values: [] }
382
382
  },
383
383
  paddingBottom: {
384
384
  cssNames: ["padding-bottom"],
385
- values1: { values: m, formatValue: e.Value.rem },
385
+ values1: { values: d, formatValue: e.Value.rem },
386
386
  values2: { values: [] },
387
387
  values3: { values: [] }
388
388
  },
389
389
  paddingLeft: {
390
390
  cssNames: ["padding-left"],
391
- values1: { values: m, formatValue: e.Value.rem },
391
+ values1: { values: d, formatValue: e.Value.rem },
392
392
  values2: { values: [] },
393
393
  values3: { values: [] }
394
394
  },
@@ -400,43 +400,43 @@ const i = [
400
400
  },
401
401
  borderHorizontal: {
402
402
  cssNames: ["border-inline-width"],
403
- values1: { values: m, formatValue: e.Value.px },
403
+ values1: { values: d, formatValue: e.Value.px },
404
404
  values2: { values: [] },
405
405
  values3: { values: [] }
406
406
  },
407
407
  borderVertical: {
408
408
  cssNames: ["border-block-width"],
409
- values1: { values: m, formatValue: e.Value.px },
409
+ values1: { values: d, formatValue: e.Value.px },
410
410
  values2: { values: [] },
411
411
  values3: { values: [] }
412
412
  },
413
413
  borderTop: {
414
414
  cssNames: ["border-top-width"],
415
- values1: { values: m, formatValue: e.Value.px },
415
+ values1: { values: d, formatValue: e.Value.px },
416
416
  values2: { values: [] },
417
417
  values3: { values: [] }
418
418
  },
419
419
  borderRight: {
420
420
  cssNames: ["border-right-width"],
421
- values1: { values: m, formatValue: e.Value.px },
421
+ values1: { values: d, formatValue: e.Value.px },
422
422
  values2: { values: [] },
423
423
  values3: { values: [] }
424
424
  },
425
425
  borderBottom: {
426
426
  cssNames: ["border-bottom-width"],
427
- values1: { values: m, formatValue: e.Value.px },
427
+ values1: { values: d, formatValue: e.Value.px },
428
428
  values2: { values: [] },
429
429
  values3: { values: [] }
430
430
  },
431
431
  borderLeft: {
432
432
  cssNames: ["border-left-width"],
433
- values1: { values: m, formatValue: e.Value.px },
433
+ values1: { values: d, formatValue: e.Value.px },
434
434
  values2: { values: [] },
435
435
  values3: { values: [] }
436
436
  },
437
437
  borderStyle: {
438
438
  cssNames: ["border-style"],
439
- values1: { values: E },
439
+ values1: { values: O },
440
440
  values2: { values: [] },
441
441
  values3: { values: [] }
442
442
  },
@@ -549,19 +549,19 @@ const i = [
549
549
  },
550
550
  overflow: {
551
551
  cssNames: ["overflow"],
552
- values1: { values: A },
552
+ values1: { values: j },
553
553
  values2: { values: [] },
554
554
  values3: { values: [] }
555
555
  },
556
556
  overflowX: {
557
557
  cssNames: ["overflow-x"],
558
- values1: { values: A },
558
+ values1: { values: j },
559
559
  values2: { values: [] },
560
560
  values3: { values: [] }
561
561
  },
562
562
  overflowY: {
563
563
  cssNames: ["overflow-y"],
564
- values1: { values: A },
564
+ values1: { values: j },
565
565
  values2: { values: [] },
566
566
  values3: { values: [] }
567
567
  },
@@ -722,13 +722,13 @@ const i = [
722
722
  },
723
723
  alignSelf: {
724
724
  cssNames: ["align-self"],
725
- values1: { values: L },
725
+ values1: { values: R },
726
726
  values2: { values: [] },
727
727
  values3: { values: [] }
728
728
  },
729
729
  justifySelf: {
730
730
  cssNames: ["justify-self"],
731
- values1: { values: L },
731
+ values1: { values: R },
732
732
  values2: { values: [] },
733
733
  values3: { values: [] }
734
734
  },
@@ -764,7 +764,7 @@ const i = [
764
764
  },
765
765
  outlineStyle: {
766
766
  cssNames: ["outline-style"],
767
- values1: { values: E },
767
+ values1: { values: O },
768
768
  values2: { values: [] },
769
769
  values3: { values: [] }
770
770
  },
@@ -831,14 +831,14 @@ const i = [
831
831
  values2: { values: [] },
832
832
  values3: { values: [] }
833
833
  }
834
- }, I = {
834
+ }, L = {
835
835
  shadow: { cssNames: ["box-shadow"], formatValue: e.Value.variables("shadow") },
836
836
  background: { cssNames: ["background"], formatValue: e.Value.variables("background") },
837
837
  color: { cssNames: ["color"], formatValue: e.Value.variables("color") },
838
838
  bgColor: { cssNames: ["background-color"], formatValue: e.Value.variables("color") },
839
839
  borderColor: { cssNames: ["border-color"], formatValue: e.Value.variables("color") },
840
840
  outlineColor: { cssNames: ["outline-color"], formatValue: e.Value.variables("color") }
841
- }, _ = {
841
+ }, I = {
842
842
  fill: {
843
843
  cssNames: ["fill"],
844
844
  formatValue: e.Value.svgVariables("color"),
@@ -849,140 +849,142 @@ const i = [
849
849
  formatValue: e.Value.svgVariables("color"),
850
850
  formatSelector: e.ClassName.svg
851
851
  }
852
- }, J = ["H", "F", "A"], z = {
852
+ }, Y = ["H", "F", "A"], H = {
853
853
  hover: { className: "_h" },
854
854
  focus: { className: "_f" }
855
855
  };
856
- Object.keys(I).forEach((u) => {
857
- o[u] = I[u], o[u].isThemeStyle = !0;
856
+ Object.keys(L).forEach((u) => {
857
+ t[u] = L[u], t[u].isThemeStyle = !0;
858
858
  });
859
- Object.keys(_).forEach((u) => {
860
- o[u] = _[u], o[u].isThemeStyle = !0;
859
+ Object.keys(I).forEach((u) => {
860
+ t[u] = I[u], t[u].isThemeStyle = !0;
861
861
  });
862
- const C = {
863
- w: { ...o.width, key: "width" },
864
- h: { ...o.height, key: "height" },
865
- m: { ...o.margin, key: "margin" },
866
- mx: { ...o.marginHorizontal, key: "marginHorizontal" },
867
- my: { ...o.marginVertical, key: "marginVertical" },
868
- mt: { ...o.marginTop, key: "marginTop" },
869
- mr: { ...o.marginRight, key: "marginRight" },
870
- mb: { ...o.marginBottom, key: "marginBottom" },
871
- ml: { ...o.marginLeft, key: "marginLeft" },
872
- p: { ...o.padding, key: "padding" },
873
- px: { ...o.paddingHorizontal, key: "paddingHorizontal" },
874
- py: { ...o.paddingVertical, key: "paddingVertical" },
875
- pt: { ...o.paddingTop, key: "paddingTop" },
876
- pr: { ...o.paddingRight, key: "paddingRight" },
877
- pb: { ...o.paddingBottom, key: "paddingBottom" },
878
- pl: { ...o.paddingLeft, key: "paddingLeft" },
879
- b: { ...o.border, key: "border" },
880
- bx: { ...o.borderHorizontal, key: "borderHorizontal" },
881
- by: { ...o.borderVertical, key: "borderVertical" },
882
- bt: { ...o.borderTop, key: "borderTop" },
883
- br: { ...o.borderRight, key: "borderRight" },
884
- bb: { ...o.borderBottom, key: "borderBottom" },
885
- bl: { ...o.borderLeft, key: "borderLeft" },
886
- jc: { ...o.justifyContent, key: "justifyContent" },
887
- ai: { ...o.alignItems, key: "alignItems" },
888
- ac: { ...o.alignContent, key: "alignContent" },
889
- d: { ...o.flexDirection, key: "flexDirection" }
890
- }, Q = Object.keys(o), Z = Object.keys(C);
891
- J.forEach((u) => {
892
- Q.forEach((a) => {
893
- o[`${a}${u}`] = { ...o[a] }, o[`${a}${u}`].pseudoSuffix = u;
894
- }), Z.forEach((a) => {
895
- C[`${a}${u}`] = { ...C[a], key: `${C[a].key}${u}` }, C[`${a}${u}`].pseudoSuffix = u;
862
+ const k = {
863
+ w: { ...t.width, key: "width" },
864
+ h: { ...t.height, key: "height" },
865
+ m: { ...t.margin, key: "margin" },
866
+ mx: { ...t.marginHorizontal, key: "marginHorizontal" },
867
+ my: { ...t.marginVertical, key: "marginVertical" },
868
+ mt: { ...t.marginTop, key: "marginTop" },
869
+ mr: { ...t.marginRight, key: "marginRight" },
870
+ mb: { ...t.marginBottom, key: "marginBottom" },
871
+ ml: { ...t.marginLeft, key: "marginLeft" },
872
+ p: { ...t.padding, key: "padding" },
873
+ px: { ...t.paddingHorizontal, key: "paddingHorizontal" },
874
+ py: { ...t.paddingVertical, key: "paddingVertical" },
875
+ pt: { ...t.paddingTop, key: "paddingTop" },
876
+ pr: { ...t.paddingRight, key: "paddingRight" },
877
+ pb: { ...t.paddingBottom, key: "paddingBottom" },
878
+ pl: { ...t.paddingLeft, key: "paddingLeft" },
879
+ b: { ...t.border, key: "border" },
880
+ bx: { ...t.borderHorizontal, key: "borderHorizontal" },
881
+ by: { ...t.borderVertical, key: "borderVertical" },
882
+ bt: { ...t.borderTop, key: "borderTop" },
883
+ br: { ...t.borderRight, key: "borderRight" },
884
+ bb: { ...t.borderBottom, key: "borderBottom" },
885
+ bl: { ...t.borderLeft, key: "borderLeft" },
886
+ jc: { ...t.justifyContent, key: "justifyContent" },
887
+ ai: { ...t.alignItems, key: "alignItems" },
888
+ ac: { ...t.alignContent, key: "alignContent" },
889
+ d: { ...t.flexDirection, key: "flexDirection" }
890
+ }, J = Object.keys(t), Q = Object.keys(k);
891
+ Y.forEach((u) => {
892
+ J.forEach((l) => {
893
+ t[`${l}${u}`] = { ...t[l] }, t[`${l}${u}`].pseudoSuffix = u;
894
+ }), Q.forEach((l) => {
895
+ k[`${l}${u}`] = { ...k[l], key: `${k[l].key}${u}` }, k[`${l}${u}`].pseudoSuffix = u;
896
896
  });
897
897
  });
898
- class K {
898
+ class Z {
899
899
  constructor() {
900
900
  this._index = 0, this._cache = {};
901
901
  }
902
- getIdentity(a) {
903
- return this._cache[a] || (this._cache[a] = this.getByIndex(this._index++)), this._cache[a];
902
+ getIdentity(l) {
903
+ return this._cache[l] || (this._cache[l] = this.getByIndex(this._index++)), this._cache[l];
904
904
  }
905
- getByIndex(a) {
906
- const { first: c, next: v } = ee, s = a - c.length;
905
+ getByIndex(l) {
906
+ const { first: m, next: c } = K, s = l - m.length;
907
907
  if (s < 0)
908
- return c[a];
909
- const n = Math.floor(s / v.length), d = s - n * v.length;
910
- return this.getByIndex(n) + v[d];
908
+ return m[l];
909
+ const n = Math.floor(s / c.length), f = s - n * c.length;
910
+ return this.getByIndex(n) + c[f];
911
911
  }
912
912
  }
913
- const ee = {
913
+ const K = {
914
914
  first: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
915
915
  next: "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
916
916
  };
917
- var F;
917
+ var B;
918
918
  ((u) => {
919
919
  u.boxClassName = "_box", u.svgClassName = "_svg";
920
- const a = `: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;}}
920
+ const l = `: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;}}
921
921
  html{font-size: 16px;font-family: Arial, sans-serif;}
922
922
  body{margin: 0;line-height: var(--lineHeight);font-size: var(--fontSize);}
923
923
  a,ul{all: unset;}
924
924
  .${u.boxClassName}{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;}
925
925
  .${u.svgClassName}{transition: all var(--svgTransitionTime);}.${u.svgClassName} path,.${u.svgClassName} circle,.${u.svgClassName} rect,.${u.svgClassName} line {transition: all var(--svgTransitionTime);}
926
- `, c = new K(), v = Object.keys(o), s = T();
927
- let n = !1;
928
- const d = v.reduce(
929
- (t, l) => (t[l] = /* @__PURE__ */ new Set(), t),
926
+ `, m = new Z(), c = Object.keys(t);
927
+ let s = !1;
928
+ const n = c.reduce(
929
+ (r, o) => (r[o] = /* @__PURE__ */ new Set(), r),
930
930
  {}
931
931
  );
932
- function p(t, l) {
933
- if (t in o)
934
- return g(t, l);
935
- if (t in z)
936
- return z[t].className;
932
+ function f(r, o) {
933
+ if (r in t)
934
+ return h(r, o);
935
+ if (r in H)
936
+ return H[r].className;
937
937
  }
938
- u.get = p;
939
- function h() {
940
- if (n) {
938
+ u.get = f;
939
+ function b() {
940
+ if (s) {
941
941
  console.info("%c💬Flush Dox Styles", "color: #00ffff");
942
- let t = V([a]);
943
- t = V(t, "H"), t = V(t, "F"), t = V(t, "A"), s.innerHTML = t.join(""), n = !1;
942
+ let r = p([l]);
943
+ r = p(r, "H"), r = p(r, "F"), r = p(r, "A");
944
+ const o = C();
945
+ o.innerHTML = r.join(""), s = !1;
944
946
  }
945
947
  }
946
- u.flush = h;
947
- function g(t, l) {
948
- var b;
949
- d[t].has(l) || (n = !0, d[t].add(l));
950
- const r = N(t, l), f = ((b = r.formatClassName) == null ? void 0 : b.call(r, t, l)) ?? `${t}${l}`;
951
- return `-${c.getIdentity(f)}`;
948
+ u.flush = b;
949
+ function h(r, o) {
950
+ var g;
951
+ n[r].has(o) || (s = !0, n[r].add(o));
952
+ const a = V(r, o), v = ((g = a.formatClassName) == null ? void 0 : g.call(a, r, o)) ?? `${r}${o}`;
953
+ return `-${m.getIdentity(v)}`;
952
954
  }
953
- function V(t, l) {
954
- return Object.entries(d).filter(([f]) => {
955
- var b;
956
- return ((b = o[f]) == null ? void 0 : b.pseudoSuffix) === l;
957
- }).reduce((f, [b, W]) => (W.forEach((H) => {
958
- var R;
959
- const y = N(b, H), w = `.${g(b, H)}`;
960
- let $ = [];
961
- l ? l === "H" ? $ = [
962
- ...r(`${w}:hover`, y),
963
- ...r(`.${z.hover.className}:hover>${w}`, y)
964
- ] : l === "F" ? $ = [
965
- ...r(`${w}:focus-within`, y),
966
- ...r(`.${z.focus.className}:focus-within>${w}`, y)
967
- ] : l === "A" && ($ = r(`${w}:active`, y)) : $ = r(w, y);
968
- const G = ((R = y.formatValue) == null ? void 0 : R.call(y, b, H)) ?? H, M = o[b].cssNames.map((q) => `${q}:${G};`).join("");
969
- f.push(`${$.join(",")}{${M}}`);
970
- }), f), t);
971
- function r(f, b) {
972
- return b.formatSelector ? b.formatSelector(f) : [f];
955
+ function p(r, o) {
956
+ return Object.entries(n).filter(([v]) => {
957
+ var g;
958
+ return ((g = t[v]) == null ? void 0 : g.pseudoSuffix) === o;
959
+ }).reduce((v, [g, P]) => (P.forEach(($) => {
960
+ var E;
961
+ const y = V(g, $), N = `.${h(g, $)}`;
962
+ let T = [];
963
+ o ? o === "H" ? T = [
964
+ ...a(`${N}:hover`, y),
965
+ ...a(`.${H.hover.className}:hover>${N}`, y)
966
+ ] : o === "F" ? T = [
967
+ ...a(`${N}:focus-within`, y),
968
+ ...a(`.${H.focus.className}:focus-within>${N}`, y)
969
+ ] : o === "A" && (T = a(`${N}:active`, y)) : T = a(N, y);
970
+ const W = ((E = y.formatValue) == null ? void 0 : E.call(y, g, $)) ?? $, G = t[g].cssNames.map((M) => `${M}:${W};`).join("");
971
+ v.push(`${T.join(",")}{${G}}`);
972
+ }), v), r);
973
+ function a(v, g) {
974
+ return g.formatSelector ? g.formatSelector(v) : [v];
973
975
  }
974
976
  }
975
- function N(t, l) {
976
- const r = o[t];
977
- return r.isThemeStyle ? r : r.values1.values.includes(l) ? r.values1 : r.values2.values.includes(l) ? r.values2 : r.values3;
977
+ function V(r, o) {
978
+ const a = t[r];
979
+ return a.isThemeStyle ? a : a.values1.values.includes(o) ? a.values1 : a.values2.values.includes(o) ? a.values2 : a.values3;
978
980
  }
979
- function T() {
980
- const t = "crono-styles", r = typeof window < "u" && typeof window.document < "u" ? window.document : global.document;
981
- let f = r.getElementById(t);
982
- return f || (f = r.createElement("style"), f.setAttribute("id", t), f.setAttribute("type", "text/css"), r.head.insertBefore(f, r.head.firstChild)), f;
981
+ function C() {
982
+ const r = "crono-styles", a = typeof window < "u" && typeof window.document < "u" ? window.document : global.document;
983
+ let v = a.getElementById(r);
984
+ return v || (v = a.createElement("style"), v.setAttribute("id", r), v.setAttribute("type", "text/css"), a.head.insertBefore(v, a.head.firstChild)), v;
983
985
  }
984
- })(F || (F = {}));
985
- const S = F, j = {
986
+ })(B || (B = {}));
987
+ const z = B, S = {
986
988
  button: {
987
989
  styles: {
988
990
  display: "inline-block",
@@ -1025,25 +1027,25 @@ const S = F, j = {
1025
1027
  }
1026
1028
  }
1027
1029
  };
1028
- var O;
1030
+ var F;
1029
1031
  ((u) => {
1030
- u.Styles = j;
1031
- function a(s) {
1032
- u.Styles = s, v();
1032
+ u.Styles = S;
1033
+ function l(s) {
1034
+ u.Styles = s, c();
1033
1035
  }
1034
- u.setup = a;
1035
- function c(s, n) {
1036
- const d = Object.entries(s.colors).map(([l, r]) => `--color${l}: ${r};`).join(`
1037
- `), p = Object.entries(s.shadows).map(([l, r]) => `--shadow${l}: ${r};`).join(`
1038
- `), h = Object.entries(s.backgrounds).map(([l, r]) => `--background${l}: ${r};`).join(`
1039
- `), g = [":root {"];
1040
- d && g.push(` ${d}`), p && g.push(` ${p}`), h && g.push(` ${h}`), g.push("}");
1041
- const V = Object.keys(s.colors).map((l) => `'${l}'`).join(" | "), N = Object.keys(s.backgrounds).map((l) => `'${l}'`).join(" | "), T = Object.keys(s.shadows).map((l) => `'${l}'`).join(" | "), t = `import '@cronocode/react-box';
1036
+ u.setup = l;
1037
+ function m(s, n) {
1038
+ const f = Object.entries(s.colors).map(([a, v]) => `--color${a}: ${v};`).join(`
1039
+ `), b = Object.entries(s.shadows).map(([a, v]) => `--shadow${a}: ${v};`).join(`
1040
+ `), h = Object.entries(s.backgrounds).map(([a, v]) => `--background${a}: ${v};`).join(`
1041
+ `), p = [":root {"];
1042
+ f && p.push(` ${f}`), b && p.push(` ${b}`), h && p.push(` ${h}`), p.push("}");
1043
+ const V = Object.keys(s.colors).map((a) => `'${a}'`).join(" | "), C = Object.keys(s.backgrounds).map((a) => `'${a}'`).join(" | "), r = Object.keys(s.shadows).map((a) => `'${a}'`).join(" | "), o = `import '@cronocode/react-box';
1042
1044
 
1043
1045
  declare module '${(n == null ? void 0 : n.namespacePath) ?? "@cronocode/react-box/core/types"}' {
1044
1046
  type ColorType = ${V};
1045
- type BackgroundType = ${N};
1046
- type ShadowType = ${T};
1047
+ type BackgroundType = ${C};
1048
+ type ShadowType = ${r};
1047
1049
 
1048
1050
  namespace Augmented {
1049
1051
  interface BoxProps {
@@ -1087,58 +1089,58 @@ var O;
1087
1089
  }
1088
1090
  `;
1089
1091
  return {
1090
- variables: g.join(`
1092
+ variables: p.join(`
1091
1093
  `),
1092
- boxDts: t
1094
+ boxDts: o
1093
1095
  };
1094
1096
  }
1095
- u.setupAugmentedProps = c;
1096
- function v() {
1097
- Object.keys(j).forEach((n) => {
1098
- const d = u.Styles[n], p = j[n];
1099
- d ? (d.styles = { ...p.styles, ...d.styles }, d.disabled && p.disabled && (d.disabled = { ...p.disabled, ...d.disabled })) : u.Styles[n] = j[n];
1097
+ u.setupAugmentedProps = m;
1098
+ function c() {
1099
+ Object.keys(S).forEach((n) => {
1100
+ const f = u.Styles[n], b = S[n];
1101
+ f ? (f.styles = { ...b.styles, ...f.styles }, f.disabled && b.disabled && (f.disabled = { ...b.disabled, ...f.disabled })) : u.Styles[n] = S[n];
1100
1102
  });
1101
1103
  }
1102
- })(O || (O = {}));
1103
- const D = O;
1104
- function se(u) {
1105
- const { clean: a, disabled: c, theme: v, component: s } = u;
1106
- return P(() => {
1107
- var p, h, g;
1108
- if (a)
1104
+ })(F || (F = {}));
1105
+ const _ = F;
1106
+ function ee(u) {
1107
+ const { clean: l, disabled: m, theme: c, component: s } = u;
1108
+ return D(() => {
1109
+ var b, h, p;
1110
+ if (l)
1109
1111
  return;
1110
- let n = D.Styles[s] ?? ((p = D.Styles.components) == null ? void 0 : p[s]);
1112
+ let n = _.Styles[s] ?? ((b = _.Styles.components) == null ? void 0 : b[s]);
1111
1113
  if (!n)
1112
1114
  return;
1113
- let d = v ? { ...n.styles, ...(h = n.themes) == null ? void 0 : h[v].styles } : n.styles;
1114
- return c ? v ? { ...d, ...n.disabled, ...(g = n.themes) == null ? void 0 : g[v].disabled } : { ...d, ...n.disabled } : d;
1115
- }, [s, a, c, v]);
1115
+ let f = c ? { ...n.styles, ...(h = n.themes) == null ? void 0 : h[c].styles } : n.styles;
1116
+ return m ? c ? { ...f, ...n.disabled, ...(p = n.themes) == null ? void 0 : p[c].disabled } : { ...f, ...n.disabled } : f;
1117
+ }, [s, l, m, c]);
1116
1118
  }
1117
- const ae = typeof window < "u" && typeof window.document < "u", le = ae ? U : X;
1118
- function re(u, a) {
1119
- const c = se(u);
1120
- return le(S.flush, [u]), P(() => {
1121
- const v = [a ? S.svgClassName : S.boxClassName], s = c ? { ...B(c), ...B(u) } : B(u);
1122
- return "inline" in s && (s.display === "block" ? s.display = "inline-block" : s.display === "flex" ? s.display = "inline-flex" : s.display === "grid" && (s.display = "inline-grid"), delete s.inline), "inlineH" in s && (s.displayH === "block" ? s.displayH = "inline-block" : s.displayH === "flex" ? s.displayH = "inline-flex" : s.displayH === "grid" && (s.displayH = "inline-grid"), delete s.inlineH), "inlineF" in s && (s.displayF === "block" ? s.displayF = "inline-block" : s.displayF === "flex" ? s.displayF = "inline-flex" : s.displayF === "grid" && (s.displayF = "inline-grid"), delete s.inlineF), "inlineA" in s && (s.displayA === "block" ? s.displayA = "inline-block" : s.displayA === "flex" ? s.displayA = "inline-flex" : s.displayA === "grid" && (s.displayA = "inline-grid"), delete s.inlineA), Object.entries(s).forEach(([n, d]) => {
1123
- v.push(S.get(n, d));
1124
- }), v;
1125
- }, [u, c]);
1119
+ const se = typeof window < "u" && typeof window.document < "u", ae = se ? q : U;
1120
+ function oe(u, l) {
1121
+ const m = ee(u);
1122
+ return ae(z.flush, [u]), D(() => {
1123
+ const c = [l ? z.svgClassName : z.boxClassName], s = m ? { ...A(m), ...A(u) } : A(u);
1124
+ return "inline" in s && (s.display === "block" ? s.display = "inline-block" : s.display === "flex" ? s.display = "inline-flex" : s.display === "grid" && (s.display = "inline-grid"), delete s.inline), "inlineH" in s && (s.displayH === "block" ? s.displayH = "inline-block" : s.displayH === "flex" ? s.displayH = "inline-flex" : s.displayH === "grid" && (s.displayH = "inline-grid"), delete s.inlineH), "inlineF" in s && (s.displayF === "block" ? s.displayF = "inline-block" : s.displayF === "flex" ? s.displayF = "inline-flex" : s.displayF === "grid" && (s.displayF = "inline-grid"), delete s.inlineF), "inlineA" in s && (s.displayA === "block" ? s.displayA = "inline-block" : s.displayA === "flex" ? s.displayA = "inline-flex" : s.displayA === "grid" && (s.displayA = "inline-grid"), delete s.inlineA), Object.entries(s).forEach(([n, f]) => {
1125
+ c.push(z.get(n, f));
1126
+ }), c;
1127
+ }, [u, m]);
1126
1128
  }
1127
- function B(u) {
1128
- const a = { ...u };
1129
- return Object.keys(a).forEach((v) => {
1130
- const s = C[v];
1131
- s && (s.key in a || (a[s.key] = a[v]), delete a[v]);
1132
- }), a;
1129
+ function A(u) {
1130
+ const l = { ...u };
1131
+ return Object.keys(l).forEach((c) => {
1132
+ const s = k[c];
1133
+ s && (s.key in l || (l[s.key] = l[c]), delete l[c]);
1134
+ }), l;
1133
1135
  }
1134
- function ue(...u) {
1135
- return u.reduce((a, c) => c ? typeof c == "string" ? (a.push(c), a) : Array.isArray(c) ? (a.push(...ue(...c)), a) : (Object.entries(c).forEach(([v, s]) => {
1136
- s && a.push(v);
1137
- }), a) : a, []);
1136
+ function le(...u) {
1137
+ return u.reduce((l, m) => m ? typeof m == "string" ? (l.push(m), l) : Array.isArray(m) ? (l.push(...le(...m)), l) : (Object.entries(m).forEach(([c, s]) => {
1138
+ s && l.push(c);
1139
+ }), l) : l, []);
1138
1140
  }
1139
1141
  export {
1140
- S,
1141
- D as T,
1142
- ue as c,
1143
- re as u
1142
+ z as S,
1143
+ _ as T,
1144
+ le as c,
1145
+ oe as u
1144
1146
  };
package/package.json CHANGED
@@ -1,32 +1,32 @@
1
1
  {
2
2
  "name": "@cronocode/react-box",
3
- "version": "1.7.3",
3
+ "version": "1.7.5",
4
4
  "type": "module",
5
- "main": "./box.js",
6
- "module": "./box.js",
5
+ "main": "./box.cjs",
6
+ "module": "./box.mjs",
7
7
  "types": "./box.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
- "import": "./box.js",
11
- "require": "./box.js",
10
+ "import": "./box.mjs",
11
+ "require": "./box.cjs",
12
12
  "types": "./box.d.ts"
13
13
  },
14
14
  "./theme": {
15
- "import": "./theme.js",
16
- "require": "./theme.js",
15
+ "import": "./theme.mjs",
16
+ "require": "./theme.cjs",
17
17
  "types": "./theme.d.ts"
18
18
  },
19
19
  "./core/types": {
20
20
  "types": "./core/types.d.ts"
21
21
  },
22
22
  "./ssg": {
23
- "import": "./ssg.js",
24
- "require": "./ssg.js",
23
+ "import": "./ssg.mjs",
24
+ "require": "./ssg.cjs",
25
25
  "types": "./ssg.d.ts"
26
26
  },
27
27
  "./components/*": {
28
- "import": "./components/*.js",
29
- "require": "./components/*.js",
28
+ "import": "./components/*.mjs",
29
+ "require": "./components/*.cjs",
30
30
  "types": "./components/*.d.ts"
31
31
  }
32
32
  },
package/ssg.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./core.cjs");require("react");const{flush:t}=e.StylesContext;exports.flushStyles=t;
@@ -1,4 +1,4 @@
1
- import { S as t } from "./core.js";
1
+ import { S as t } from "./core.mjs";
2
2
  import "react";
3
3
  const { flush: e } = t;
4
4
  export {
package/theme.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./core.cjs");require("react");module.exports=e.Theme;
@@ -1,4 +1,4 @@
1
- import { T as m } from "./core.js";
1
+ import { T as m } from "./core.mjs";
2
2
  import "react";
3
3
  export {
4
4
  m as default
package/utils.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";var a;(f=>{function l(c,...s){const e={...c},o={};return s.forEach(r=>{r in e&&(o[r]=e[r],delete e[r])}),[o,e]}f.moveToTagProps=l;function p(c,s,e){const o={...c},r=o.props||{};return s.forEach(t=>{if(t in o){if(r[t]=o[t],t==="disabled")return;delete o[t]}}),e&&Object.entries(e).forEach(([t,n])=>{r[t]=n}),o.props=r,o}f.buildProps=p})(a||(a={}));const m=a;var h;(f=>{function l(c){const s=Array.from(c.elements).reduce((e,o)=>{const r=o.name;return r&&(e[r]||(e[r]=[]),e[r].push(o)),e},{});return Object.entries(s).reduce((e,[o,r])=>{if(r.length===1){const t=r[0];p(e,o,t.type==="checkbox"||t.type==="radio"?t.checked:t.value)}else{const t=r.reduce((n,i)=>(i.type==="checkbox"||i.type==="radio"?i.checked&&n.push(i.value):n.push(i.value),n),[]);p(e,o,t)}return e},{})}f.getFormEntries=l;function p(c,s,e){if(s.includes(".")){const o=s.split(".");let r=c;o.forEach((t,n)=>{if(o.length>n+1){const i=t.match(/^(.+)\[(\d)\]$/);if(i){const[,u,d]=i;r[u]=r[u]||[],r[u][d]=r[u][d]||{},r=r[u][d]}else r[t]=r[t]||{},r=r[t]}else r[t]=e})}else c[s]=e}})(h||(h={}));const P=h;exports.FormUtils=P;exports.ObjectUtils=m;
File without changes