@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
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),n=require("react"),u=require("../box.cjs");require("../box.module.css.cjs");require("../utils/utils.cjs");require("../theme.cjs");function o(e,r){const{inline:i}=e;return t.jsx(u.default,{ref:r,display:i?"inline-grid":"grid",...e})}const d=n.forwardRef(o);exports.default=d;
@@ -0,0 +1,4 @@
1
+ import Box from '../box';
2
+ type BoxProps<TTag extends keyof React.ReactHTML> = Omit<React.ComponentProps<typeof Box<TTag>>, 'ref'>;
3
+ declare const _default: <TTag extends keyof import("react").ReactHTML = "div">(props: BoxProps<TTag>) => JSX.Element;
4
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as m } from "react";
3
+ import n from "../box.mjs";
4
+ import "../box.module.css.mjs";
5
+ import "../utils/utils.mjs";
6
+ import "../theme.mjs";
7
+ function d(r, i) {
8
+ const { inline: o } = r;
9
+ return /* @__PURE__ */ t(n, { ref: i, display: o ? "inline-grid" : "grid", ...r });
10
+ }
11
+ const c = m(d);
12
+ export {
13
+ c as default
14
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cronocode/react-box",
3
- "version": "1.5.6",
3
+ "version": "1.5.9",
4
4
  "main": "./box.cjs",
5
5
  "module": "./box.mjs",
6
6
  "types": "./box.d.ts",
@@ -35,8 +35,8 @@
35
35
  "build:pages": "vite build ./pages --config ./pages.vite.config.ts --outDir ../dist --mode production",
36
36
  "preview": "vite preview",
37
37
  "build": "vite build",
38
+ "postbuild": "cp package.json dist & cp LICENSE dist & cp README.md dist & rm ./dist/index.d.ts & rm ./dist/index.js",
38
39
  "build:dev": "vite build --mode dev",
39
- "postbuild": "cp package.json dist & cp LICENSE dist & cp README.md dist & cp docs -r dist & rm ./dist/index.d.ts & rm ./dist/index.js",
40
40
  "compile": "tsc --noEmit --skipLibCheck",
41
41
  "test": "echo \"Error: no test specified\" && exit 1"
42
42
  },
@@ -55,8 +55,10 @@
55
55
  },
56
56
  "homepage": "https://github.com/cronocodesolutions/react-box#readme",
57
57
  "description": "",
58
+ "dependencies": {
59
+ "@cronocode/identity-factory": "^0.0.6"
60
+ },
58
61
  "devDependencies": {
59
- "@cronocode/identity-factory": "^0.0.6",
60
62
  "@rollup/pluginutils": "^5.0.2",
61
63
  "@types/node": "^18.15.7",
62
64
  "@types/postcss-mixins": "^9.0.0",
package/plugins.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function u(r){const _=Object.entries(r.colors).map(([o,l])=>`--color${o}: ${l};`).join(`
2
2
  `),t=Object.entries(r.shadows).map(([o,l])=>`--shadow${o}: ${l};`).join(`
3
- `),c=Object.entries(r.backgrounds).map(([o,l])=>`--background${o}: ${l};`).join(`
4
- `),e=[":root {"];_&&e.push(` ${_}`),t&&e.push(` ${t}`),c&&e.push(` ${c}`),e.push("}");const i=Object.keys(r.colors).map(o=>`
3
+ `),n=Object.entries(r.backgrounds).map(([o,l])=>`--background${o}: ${l};`).join(`
4
+ `),e=[":root {"];_&&e.push(` ${_}`),t&&e.push(` ${t}`),n&&e.push(` ${n}`),e.push("}");const c=Object.keys(r.colors).map(o=>`
5
5
  .color_${o},
6
6
  .color_h_${o}:hover,
7
7
  ._h:hover>.color_h_${o} {
@@ -120,7 +120,7 @@
120
120
  line {
121
121
  stroke: var(--color${o});
122
122
  }
123
- }`),n=Object.keys(r.shadows).map(o=>`
123
+ }`),i=Object.keys(r.shadows).map(o=>`
124
124
  .shadow_${o},
125
125
  .shadow_h_${o}:hover,
126
126
  ._h:hover>.shadow_h_${o} {
@@ -204,5 +204,6 @@ declare module '@cronocode/react-box/types' {
204
204
  }
205
205
  }
206
206
  `;return{themeCss:[e.join(`
207
- `),...i,...n,...h].join(`
208
- `),boxDts:p}}exports.boxTheme=u;
207
+ `),...c,...i,...h].join(`
208
+ `)+`
209
+ `,boxDts:p}}exports.boxTheme=u;
package/plugins.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  function u(r) {
2
2
  const _ = Object.entries(r.colors).map(([o, e]) => `--color${o}: ${e};`).join(`
3
3
  `), t = Object.entries(r.shadows).map(([o, e]) => `--shadow${o}: ${e};`).join(`
4
- `), c = Object.entries(r.backgrounds).map(([o, e]) => `--background${o}: ${e};`).join(`
4
+ `), n = Object.entries(r.backgrounds).map(([o, e]) => `--background${o}: ${e};`).join(`
5
5
  `), l = [":root {"];
6
- _ && l.push(` ${_}`), t && l.push(` ${t}`), c && l.push(` ${c}`), l.push("}");
7
- const n = Object.keys(r.colors).map((o) => `
6
+ _ && l.push(` ${_}`), t && l.push(` ${t}`), n && l.push(` ${n}`), l.push("}");
7
+ const c = Object.keys(r.colors).map((o) => `
8
8
  .color_${o},
9
9
  .color_h_${o}:hover,
10
10
  ._h:hover>.color_h_${o} {
@@ -209,8 +209,9 @@ declare module '@cronocode/react-box/types' {
209
209
  `;
210
210
  return {
211
211
  themeCss: [l.join(`
212
- `), ...n, ...i, ...h].join(`
213
- `),
212
+ `), ...c, ...i, ...h].join(`
213
+ `) + `
214
+ `,
214
215
  boxDts: p
215
216
  };
216
217
  }