@cronocode/react-box 1.5.6 → 1.5.9

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.
Files changed (40) hide show
  1. package/baseSvg.module.css.cjs +1 -1
  2. package/baseSvg.module.css.mjs +2 -2
  3. package/box.cjs +1 -1
  4. package/box.mjs +10 -10
  5. package/box.module.css.cjs +1 -1
  6. package/box.module.css.mjs +2 -2
  7. package/components/dataGrid.d.ts +2 -0
  8. package/components/dox.cjs +1 -0
  9. package/components/dox.d.ts +2 -0
  10. package/components/dox.mjs +877 -0
  11. package/components/grid.cjs +1 -0
  12. package/components/grid.d.ts +4 -0
  13. package/components/grid.mjs +14 -0
  14. package/package.json +5 -3
  15. package/plugins.cjs +6 -5
  16. package/plugins.mjs +6 -5
  17. package/style.css +1 -1
  18. package/theme.cjs +1 -1
  19. package/{src/theme.d.ts → theme.d.ts} +1 -1
  20. package/theme.mjs +2 -2
  21. package/{src/types.d.ts → types.d.ts} +48 -37
  22. package/utils/utils.cjs +1 -1
  23. package/utils/utils.mjs +90 -70
  24. package/src/components/dataGrid.d.ts +0 -13
  25. package/src/index.d.ts +0 -0
  26. /package/{src/box.d.ts → box.d.ts} +0 -0
  27. /package/{src/components → components}/baseSvg.d.ts +0 -0
  28. /package/{src/components → components}/button.d.ts +0 -0
  29. /package/{src/components → components}/checkbox.d.ts +0 -0
  30. /package/{src/components → components}/flex.d.ts +0 -0
  31. /package/{src/components → components}/form.d.ts +0 -0
  32. /package/{src/components → components}/radioButton.d.ts +0 -0
  33. /package/{src/components → components}/textarea.d.ts +0 -0
  34. /package/{src/components → components}/textbox.d.ts +0 -0
  35. /package/{src/components → components}/tooltip.d.ts +0 -0
  36. /package/{src/hooks → hooks}/usePortalContainer.d.ts +0 -0
  37. /package/{src/plugins.d.ts → plugins.d.ts} +0 -0
  38. /package/{src/utils → utils}/className/classNameUtils.d.ts +0 -0
  39. /package/{src/utils → utils}/form/formUtils.d.ts +0 -0
  40. /package/{src/utils → utils}/object/objectUtils.d.ts +0 -0
@@ -1 +1 @@
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
+ "use strict";const a={base:"cal",rotate0:"cam",rotateH0:"can",hovertrue:"_h",rotate90:"cao",rotateH90:"cap",rotate180:"caq",rotateH180:"car",rotate270:"cas",rotateH270:"cat",flipxAxis:"cau",flipHxAxis:"cav",flipyAxis:"caw",flipHyAxis:"cax",rotateF0:"cay",focustrue:"_f",rotateF90:"caz",rotateF180:"caA",rotateF270:"caB",flipFxAxis:"caC",flipFyAxis:"caD",rotateA0:"caE",rotateA90:"caF",rotateA180:"caG",rotateA270:"caH",flipAxAxis:"caI",flipAyAxis:"caJ"};exports.classes=a;
@@ -1,4 +1,4 @@
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" };
1
+ const a = { base: "cal", rotate0: "cam", rotateH0: "can", hovertrue: "_h", rotate90: "cao", rotateH90: "cap", rotate180: "caq", rotateH180: "car", rotate270: "cas", rotateH270: "cat", flipxAxis: "cau", flipHxAxis: "cav", flipyAxis: "caw", flipHyAxis: "cax", rotateF0: "cay", focustrue: "_f", rotateF90: "caz", rotateF180: "caA", rotateF270: "caB", flipFxAxis: "caC", flipFyAxis: "caD", rotateA0: "caE", rotateA90: "caF", rotateA180: "caG", rotateA270: "caH", flipAxAxis: "caI", flipAyAxis: "caJ" };
2
2
  export {
3
- t as c
3
+ a 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"),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;
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:u,style:b}=s,f=j.useTheme(s),$=a.useMemo(()=>{const i=u?d.ClassNameUtils.classNames(c.classes.box,u):[c.classes.box],T=f?{...m(f),...m(s)}:m(s);return Object.entries(T).forEach(([l,h])=>{const x=c.classes[l+h];x?i.push(x):l in d.themeClasses&&i.push(`${d.themeClasses[l]}${h}`)}),i.join(" ")},[s]),r={...n,className:$};b&&(r.style=b),e&&(r.ref=e);const[H,g]=a.useState(!1),p=typeof o=="function";return p&&(r.onMouseEnter=()=>g(!0),r.onMouseLeave=()=>g(!1)),a.createElement(t||"div",r,p?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 m(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,18 +1,18 @@
1
1
  import T, { forwardRef as j, useMemo as C, useState as N } from "react";
2
2
  import { c as m } from "./box.module.css.mjs";
3
- import { C as y, a as p } from "./utils/utils.mjs";
3
+ import { C as y, a as h } from "./utils/utils.mjs";
4
4
  import { useTheme as B } from "./theme.mjs";
5
5
  function P(t, e) {
6
- const { tag: s, children: o, props: n, className: l, style: c } = t, h = B(t), x = C(() => {
7
- const a = l ? y.classNames(m.box, l) : [m.box], H = { ...u(h), ...u(t) };
8
- return Object.entries(H).forEach(([i, b]) => {
9
- const g = m[i + b];
10
- g ? a.push(g) : i in p && a.push(`${p[i]}${b}`);
6
+ const { tag: s, children: o, props: n, className: c, style: d } = t, f = B(t), x = C(() => {
7
+ const a = c ? y.classNames(m.box, c) : [m.box], H = f ? { ...l(f), ...l(t) } : l(t);
8
+ return Object.entries(H).forEach(([i, p]) => {
9
+ const u = m[i + p];
10
+ u ? a.push(u) : i in h && a.push(`${h[i]}${p}`);
11
11
  }), a.join(" ");
12
12
  }, [t]), r = { ...n, className: x };
13
- c && (r.style = c), e && (r.ref = e);
14
- const [$, d] = N(!1), f = typeof o == "function";
15
- return f && (r.onMouseEnter = () => d(!0), r.onMouseLeave = () => d(!1)), T.createElement(s || "div", r, f ? o({ isHover: $ }) : o);
13
+ d && (r.style = d), e && (r.ref = e);
14
+ const [$, b] = N(!1), g = typeof o == "function";
15
+ return g && (r.onMouseEnter = () => b(!0), r.onMouseLeave = () => b(!1)), T.createElement(s || "div", r, g ? o({ isHover: $ }) : o);
16
16
  }
17
17
  const z = j(P), R = {
18
18
  m: "margin",
@@ -41,7 +41,7 @@ const z = j(P), R = {
41
41
  ac: "alignContent",
42
42
  d: "flexDirection"
43
43
  }, v = Object.entries(R).reduce((t, [e, s]) => (t[e] = s, t[`${e}H`] = `${s}H`, t[`${e}F`] = `${s}F`, t[`${e}A`] = `${s}A`, t), {});
44
- function u(t) {
44
+ function l(t) {
45
45
  const e = { ...t };
46
46
  return Object.keys(e).forEach((o) => {
47
47
  const n = v[o];