@cronocode/react-box 1.4.3 → 1.4.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.
@@ -1 +1 @@
1
- "use strict";const t={base:"bDC",rotate0:"bDD",rotateH0:"bDE",hovertrue:"_h",rotate90:"bDF",rotateH90:"bDG",rotate180:"bDH",rotateH180:"bDI",rotate270:"bDJ",rotateH270:"bDK",flipxAxis:"bDL",flipHxAxis:"bDM",flipyAxis:"bDN",flipHyAxis:"bDO",rotateF0:"bDP",focustrue:"_f",rotateF90:"bDQ",rotateF180:"bDR",rotateF270:"bDS",flipFxAxis:"bDT",flipFyAxis:"bDU",rotateA0:"bDV",rotateA90:"bDW",rotateA180:"bDX",rotateA270:"bDY",flipAxAxis:"bDZ",flipAyAxis:"bD0"};exports.classes=t;
1
+ "use strict";const t={base:"a",rotate0:"b",rotateH0:"c",hovertrue:"_h",rotate90:"d",rotateH90:"e",rotate180:"f",rotateH180:"g",rotate270:"h",rotateH270:"i",flipxAxis:"j",flipHxAxis:"k",flipyAxis:"l",flipHyAxis:"m",rotateF0:"n",focustrue:"_f",rotateF90:"o",rotateF180:"p",rotateF270:"q",flipFxAxis:"r",flipFyAxis:"s",rotateA0:"t",rotateA90:"u",rotateA180:"v",rotateA270:"w",flipAxAxis:"x",flipAyAxis:"y"};exports.classes=t;
@@ -1,4 +1,4 @@
1
- const t = { base: "bDC", rotate0: "bDD", rotateH0: "bDE", hovertrue: "_h", rotate90: "bDF", rotateH90: "bDG", rotate180: "bDH", rotateH180: "bDI", rotate270: "bDJ", rotateH270: "bDK", flipxAxis: "bDL", flipHxAxis: "bDM", flipyAxis: "bDN", flipHyAxis: "bDO", rotateF0: "bDP", focustrue: "_f", rotateF90: "bDQ", rotateF180: "bDR", rotateF270: "bDS", flipFxAxis: "bDT", flipFyAxis: "bDU", rotateA0: "bDV", rotateA90: "bDW", rotateA180: "bDX", rotateA270: "bDY", flipAxAxis: "bDZ", flipAyAxis: "bD0" };
1
+ const t = { base: "a", rotate0: "b", rotateH0: "c", hovertrue: "_h", rotate90: "d", rotateH90: "e", rotate180: "f", rotateH180: "g", rotate270: "h", rotateH270: "i", flipxAxis: "j", flipHxAxis: "k", flipyAxis: "l", flipHyAxis: "m", rotateF0: "n", focustrue: "_f", rotateF90: "o", rotateF180: "p", rotateF270: "q", flipFxAxis: "r", flipFyAxis: "s", rotateA0: "t", rotateA90: "u", rotateA180: "v", rotateA270: "w", flipAxAxis: "x", flipAyAxis: "y" };
2
2
  export {
3
3
  t as c
4
4
  };
package/box.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),c=require("./box.module.css.cjs.js"),d=require("./utils/utils.cjs.js"),j=require("./theme.cjs.js");function y(s,e){const{tag:t,children:o,props:n,className:m,style:u}=s,x=j.useTheme(s),$=a.useMemo(()=>{const i=m?d.ClassNameUtils.classNames(c.classes.box,m):[c.classes.box],T={...h(x),...h(s)};return Object.entries(T).forEach(([l,g])=>{const p=c.classes[l+g];p?i.push(p):l in d.themeClasses&&i.push(`${d.themeClasses[l]}${g}`)}),i.join(" ")},[s]),r={...n,className:$};u&&(r.style=u),e&&(r.ref=e);const[H,b]=a.useState(!1),f=typeof o=="function";return f&&(r.onMouseEnter=()=>b(!0),r.onMouseLeave=()=>b(!1)),a.createElement(t||"div",r,f?o({isHover:H}):o)}const C=a.forwardRef(y),N={m:"margin",mx:"marginHorizontal",my:"marginVertical",mt:"marginTop",mr:"marginRight",mb:"marginBottom",ml:"marginLeft",p:"padding",px:"paddingHorizontal",py:"paddingVertical",pt:"paddingTop",pr:"paddingRight",pb:"paddingBottom",pl:"paddingLeft",b:"border",bx:"borderHorizontal",by:"borderVertical",bt:"borderTop",br:"borderRight",bb:"borderBottom",bl:"borderLeft",jc:"justifyContent",ai:"alignItems",ac:"alignContent",d:"flexDirection"},P=Object.entries(N).reduce((s,[e,t])=>(s[e]=t,s[`${e}H`]=`${t}H`,s[`${e}F`]=`${t}F`,s[`${e}A`]=`${t}A`,s),{});function h(s){const e={...s};return Object.keys(e).forEach(o=>{const n=P[o];n&&(n in e||(e[n]=e[o]),delete e[o])}),e}exports.default=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react"),c=require("./box.module.css.cjs"),d=require("./utils/utils.cjs"),j=require("./theme.cjs");function y(s,e){const{tag:t,children:o,props:n,className:m,style:u}=s,x=j.useTheme(s),$=a.useMemo(()=>{const i=m?d.ClassNameUtils.classNames(c.classes.box,m):[c.classes.box],T={...h(x),...h(s)};return Object.entries(T).forEach(([l,g])=>{const p=c.classes[l+g];p?i.push(p):l in d.themeClasses&&i.push(`${d.themeClasses[l]}${g}`)}),i.join(" ")},[s]),r={...n,className:$};u&&(r.style=u),e&&(r.ref=e);const[H,b]=a.useState(!1),f=typeof o=="function";return f&&(r.onMouseEnter=()=>b(!0),r.onMouseLeave=()=>b(!1)),a.createElement(t||"div",r,f?o({isHover:H}):o)}const C=a.forwardRef(y),N={m:"margin",mx:"marginHorizontal",my:"marginVertical",mt:"marginTop",mr:"marginRight",mb:"marginBottom",ml:"marginLeft",p:"padding",px:"paddingHorizontal",py:"paddingVertical",pt:"paddingTop",pr:"paddingRight",pb:"paddingBottom",pl:"paddingLeft",b:"border",bx:"borderHorizontal",by:"borderVertical",bt:"borderTop",br:"borderRight",bb:"borderBottom",bl:"borderLeft",jc:"justifyContent",ai:"alignItems",ac:"alignContent",d:"flexDirection"},P=Object.entries(N).reduce((s,[e,t])=>(s[e]=t,s[`${e}H`]=`${t}H`,s[`${e}F`]=`${t}F`,s[`${e}A`]=`${t}A`,s),{});function h(s){const e={...s};return Object.keys(e).forEach(o=>{const n=P[o];n&&(n in e||(e[n]=e[o]),delete e[o])}),e}exports.default=C;
package/box.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import T, { forwardRef as j, useMemo as C, useState as N } from "react";
2
- import { c as m } from "./box.module.css.es.js";
3
- import { C as y, a as p } from "./utils/utils.es.js";
4
- import { useTheme as B } from "./theme.es.js";
2
+ import { c as m } from "./box.module.css.mjs";
3
+ import { C as y, a as p } from "./utils/utils.mjs";
4
+ import { useTheme as B } from "./theme.mjs";
5
5
  function P(t, e) {
6
6
  const { tag: s, children: o, props: n, className: l, style: c } = t, h = B(t), x = C(() => {
7
7
  const a = l ? y.classNames(m.box, l) : [m.box], H = { ...u(h), ...u(t) };