@cronocode/react-box 0.2.5 → 0.2.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.
@@ -1 +1,29 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../box.js"),c=require("react/jsx-runtime");require("react");require("../utils/utils.js");function l(t){const{props:e,onClick:r,type:o,disabled:n}=t,s={onClick:r,type:o||"button",disabled:n,...e},u={...t,props:s};return c.jsx(i.default,{tag:"button",cursor:"pointer",display:"inline-block",...u})}exports.default=l;
1
+ import e from "../box.js";
2
+ import { jsx as a } from "react/jsx-runtime";
3
+ import "react";
4
+ import "../utils/utils.js";
5
+ function b(o) {
6
+ const {
7
+ props: t,
8
+ onClick: r,
9
+ type: n,
10
+ disabled: p
11
+ } = o, s = {
12
+ onClick: r,
13
+ type: n || "button",
14
+ disabled: p,
15
+ ...t
16
+ }, i = {
17
+ ...o,
18
+ props: s
19
+ };
20
+ return /* @__PURE__ */ a(e, {
21
+ tag: "button",
22
+ cursor: "pointer",
23
+ display: "inline-block",
24
+ ...i
25
+ });
26
+ }
27
+ export {
28
+ b as default
29
+ };
@@ -1 +1,31 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../box.js"),c=require("react/jsx-runtime");require("react");require("../utils/utils.js");function f(e){const{wrap:t,jc:r,ai:i,ac:n,d:l,grow:s,shrink:u,as:a}=e;return c.jsx(o.default,{display:"flex",flexWrap:t,justifyContent:r,alignItems:i,alignContent:n,direction:l,flexGrow:s,flexShrink:u,alignSelf:a,...e})}exports.default=f;
1
+ import x from "../box.js";
2
+ import { jsx as m } from "react/jsx-runtime";
3
+ import "react";
4
+ import "../utils/utils.js";
5
+ function g(t) {
6
+ const {
7
+ wrap: i,
8
+ jc: r,
9
+ ai: n,
10
+ ac: o,
11
+ d: e,
12
+ grow: a,
13
+ shrink: l,
14
+ as: f
15
+ } = t;
16
+ return /* @__PURE__ */ m(x, {
17
+ display: "flex",
18
+ flexWrap: i,
19
+ justifyContent: r,
20
+ alignItems: n,
21
+ alignContent: o,
22
+ direction: e,
23
+ flexGrow: a,
24
+ flexShrink: l,
25
+ alignSelf: f,
26
+ ...t
27
+ });
28
+ }
29
+ export {
30
+ g as default
31
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cronocode/react-box",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "main": "./box.js",
5
5
  "module": "./box.js",
6
6
  "types": "./box.d.ts",
package/utils/utils.js CHANGED
@@ -1 +1,13 @@
1
- "use strict";var s;(u=>{function i(...f){return f.reduce((r,t)=>typeof t=="string"?(r.push(t),r):Array.isArray(t)?(r.push(...i(...t)),r):(Object.entries(t).forEach(([c,h])=>{h&&r.push(c)}),r),[])}u.classNames=i})(s||(s={}));const n=s;exports.ClassNameUtils=n;
1
+ var i;
2
+ ((f) => {
3
+ function s(...o) {
4
+ return o.reduce((r, t) => typeof t == "string" ? (r.push(t), r) : Array.isArray(t) ? (r.push(...s(...t)), r) : (Object.entries(t).forEach(([p, u]) => {
5
+ u && r.push(p);
6
+ }), r), []);
7
+ }
8
+ f.classNames = s;
9
+ })(i || (i = {}));
10
+ const h = i;
11
+ export {
12
+ h as C
13
+ };