@cronocode/react-box 0.2.2 → 0.2.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,41 +1 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
- var __hasOwnProp = Object.prototype.hasOwnProperty;
4
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
7
- for (var prop in b || (b = {}))
8
- if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
10
- if (__getOwnPropSymbols)
11
- for (var prop of __getOwnPropSymbols(b)) {
12
- if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- }
15
- return a;
16
- };
17
- import Box from "../box.js";
18
- import { j as jsx } from "../chunk/jsx-runtime-8434466e.js";
19
- import "react";
20
- function Button(props) {
21
- const {
22
- props: tagProps,
23
- onClick,
24
- type,
25
- disabled
26
- } = props;
27
- const newTagProps = __spreadValues(__spreadValues({}, {
28
- onClick,
29
- type: type || "button",
30
- disabled
31
- }), tagProps);
32
- const newProps = __spreadValues(__spreadValues({}, props), {
33
- props: newTagProps
34
- });
35
- return /* @__PURE__ */ jsx(Box, __spreadValues({
36
- tag: "button",
37
- cursor: "pointer",
38
- display: "inline-block"
39
- }, newProps));
40
- }
41
- export { Button as default };
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,43 +1 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
- var __hasOwnProp = Object.prototype.hasOwnProperty;
4
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
7
- for (var prop in b || (b = {}))
8
- if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
10
- if (__getOwnPropSymbols)
11
- for (var prop of __getOwnPropSymbols(b)) {
12
- if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- }
15
- return a;
16
- };
17
- import Box from "../box.js";
18
- import { j as jsx } from "../chunk/jsx-runtime-8434466e.js";
19
- import "react";
20
- function Flex(props) {
21
- const {
22
- wrap,
23
- jc,
24
- ai,
25
- ac,
26
- d,
27
- grow,
28
- shrink,
29
- as
30
- } = props;
31
- return /* @__PURE__ */ jsx(Box, __spreadValues({
32
- display: "flex",
33
- flexWrap: wrap,
34
- justifyContent: jc,
35
- alignItems: ai,
36
- alignContent: ac,
37
- direction: d,
38
- flexGrow: grow,
39
- flexShrink: shrink,
40
- alignSelf: as
41
- }, props));
42
- }
43
- export { Flex as default };
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cronocode/react-box",
3
- "version": "0.2.2",
3
+ "version": "0.2.5",
4
4
  "main": "./box.js",
5
5
  "module": "./box.js",
6
6
  "types": "./box.d.ts",
@@ -10,7 +10,7 @@
10
10
  "require": "./box.js",
11
11
  "types": "./box.d.ts"
12
12
  },
13
- "./styles.css": "./styles.css",
13
+ "./style.css": "./style.css",
14
14
  "./components/*": {
15
15
  "import": "./components/*.js",
16
16
  "require": "./components/*.js",
@@ -20,7 +20,7 @@
20
20
  "scripts": {
21
21
  "dev": "vite ./dev --config ./vite.config.ts",
22
22
  "build": "vite build",
23
- "postbuild": "cp package.json dist & cp LICENSE dist",
23
+ "postbuild": "cp package.json dist & cp LICENSE dist & rm ./dist/index.d.ts & rm ./dist/index.js",
24
24
  "compile": "tsc --noEmit --skipLibCheck",
25
25
  "test": "echo \"Error: no test specified\" && exit 1"
26
26
  },
@@ -41,9 +41,9 @@
41
41
  "description": "",
42
42
  "devDependencies": {
43
43
  "@cronocode/identity-factory": "^0.0.6",
44
- "@types/node": "^18.7.6",
45
- "@types/react": "^18.0.17",
46
- "@vitejs/plugin-react": "^1.3.2",
44
+ "@types/node": "^18.7.14",
45
+ "@types/react": "^18.0.18",
46
+ "@vitejs/plugin-react": "^2.0.1",
47
47
  "autoprefixer": "^10.4.8",
48
48
  "postcss": "^8.4.16",
49
49
  "postcss-calc": "^8.2.4",
@@ -52,8 +52,8 @@
52
52
  "prettier": "^2.7.1",
53
53
  "react": "^18.1.0",
54
54
  "react-dom": "^18.2.0",
55
- "typescript": "^4.7.4",
56
- "vite": "^2.9.14",
55
+ "typescript": "^4.8.2",
56
+ "vite": "^3.0.9",
57
57
  "vite-plugin-dts": "^1.4.1"
58
58
  }
59
59
  }
File without changes
package/utils/utils.js ADDED
@@ -0,0 +1 @@
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,33 +0,0 @@
1
- import React from "react";
2
- var jsxRuntime = { exports: {} };
3
- var reactJsxRuntime_production_min = {};
4
- /**
5
- * @license React
6
- * react-jsx-runtime.production.min.js
7
- *
8
- * Copyright (c) Facebook, Inc. and its affiliates.
9
- *
10
- * This source code is licensed under the MIT license found in the
11
- * LICENSE file in the root directory of this source tree.
12
- */
13
- var f = React, k = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, n = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: true, ref: true, __self: true, __source: true };
14
- function q(c, a, g) {
15
- var b, d = {}, e = null, h = null;
16
- g !== void 0 && (e = "" + g);
17
- a.key !== void 0 && (e = "" + a.key);
18
- a.ref !== void 0 && (h = a.ref);
19
- for (b in a)
20
- m.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
21
- if (c && c.defaultProps)
22
- for (b in a = c.defaultProps, a)
23
- d[b] === void 0 && (d[b] = a[b]);
24
- return { $$typeof: k, type: c, key: e, ref: h, props: d, _owner: n.current };
25
- }
26
- reactJsxRuntime_production_min.Fragment = l;
27
- reactJsxRuntime_production_min.jsx = q;
28
- reactJsxRuntime_production_min.jsxs = q;
29
- {
30
- jsxRuntime.exports = reactJsxRuntime_production_min;
31
- }
32
- const jsx = jsxRuntime.exports.jsx;
33
- export { jsx as j };