@cronocode/react-box 1.5.2 → 1.5.4
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.
- package/baseSvg.module.css.cjs +1 -1
- package/baseSvg.module.css.mjs +1 -1
- package/box.d.ts +1 -5
- package/box.module.css.cjs +1 -1
- package/box.module.css.mjs +1 -1
- package/components/baseSvg.d.ts +1 -5
- package/package.json +4 -1
- package/plugins.cjs +7 -11
- package/plugins.mjs +12 -16
- package/style.css +1 -1
- package/types.d.ts +14 -2
package/components/baseSvg.d.ts
CHANGED
|
@@ -4,11 +4,7 @@ import ClassNameUtils from '../utils/className/classNameUtils';
|
|
|
4
4
|
type AllSvgProps = React.SVGProps<SVGElement>;
|
|
5
5
|
type SvgPropsType = Omit<AllSvgProps, 'className' | 'style' | 'width' | 'height'>;
|
|
6
6
|
type SvgStyleType = Omit<React.CSSProperties, 'width' | 'height'>;
|
|
7
|
-
|
|
8
|
-
interface Props {
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
interface Props extends SvgStyles, Augmented.Props {
|
|
7
|
+
interface Props extends SvgStyles {
|
|
12
8
|
children?: React.ReactNode | ((props: {
|
|
13
9
|
isHover: boolean;
|
|
14
10
|
}) => React.ReactNode);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cronocode/react-box",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
4
4
|
"main": "./box.cjs",
|
|
5
5
|
"module": "./box.mjs",
|
|
6
6
|
"types": "./box.d.ts",
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
"require": "./theme.cjs",
|
|
17
17
|
"types": "./theme.d.ts"
|
|
18
18
|
},
|
|
19
|
+
"./types": {
|
|
20
|
+
"types": "./types.d.ts"
|
|
21
|
+
},
|
|
19
22
|
"./components/*": {
|
|
20
23
|
"import": "./components/*.mjs",
|
|
21
24
|
"require": "./components/*.cjs",
|
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
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
|
|
4
|
+
`),e=[":root {"];_&&e.push(` ${_}`),t&&e.push(` ${t}`),c&&e.push(` ${c}`),e.push("}");const i=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
|
-
}`),
|
|
123
|
+
}`),n=Object.keys(r.shadows).map(o=>`
|
|
124
124
|
.shadow_${o},
|
|
125
125
|
.shadow_h_${o}:hover,
|
|
126
126
|
._h:hover>.shadow_h_${o} {
|
|
@@ -148,15 +148,15 @@
|
|
|
148
148
|
|
|
149
149
|
.bg_a_${o}:active {
|
|
150
150
|
background: var(--background${o});
|
|
151
|
-
}`),s=Object.keys(r.colors).map(o=>`'${o}'`).join(" | "),$=Object.keys(r.backgrounds).map(o=>`'${o}'`).join(" | "),b=Object.keys(r.shadows).map(o=>`'${o}'`).join(" | "),p=`import {ColorType} from '@cronocode/react-box';
|
|
151
|
+
}`),s=Object.keys(r.colors).map(o=>`'${o}'`).join(" | "),$=Object.keys(r.backgrounds).map(o=>`'${o}'`).join(" | "),b=Object.keys(r.shadows).map(o=>`'${o}'`).join(" | "),p=`import {ColorType} from '@cronocode/react-box/types';
|
|
152
152
|
|
|
153
|
-
declare module '@cronocode/react-box' {
|
|
153
|
+
declare module '@cronocode/react-box/types' {
|
|
154
154
|
type ColorType = ${s};
|
|
155
155
|
type BackgroundType = ${$};
|
|
156
156
|
type ShadowType = ${b};
|
|
157
157
|
|
|
158
158
|
namespace Augmented {
|
|
159
|
-
interface
|
|
159
|
+
interface BoxProps {
|
|
160
160
|
color?: ColorType;
|
|
161
161
|
colorH?: ColorType;
|
|
162
162
|
colorF?: ColorType;
|
|
@@ -190,12 +190,8 @@ declare module '@cronocode/react-box' {
|
|
|
190
190
|
shadowF?: ShadowType;
|
|
191
191
|
shadowA?: ShadowType;
|
|
192
192
|
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
193
|
|
|
196
|
-
|
|
197
|
-
namespace Augmented {
|
|
198
|
-
interface Props {
|
|
194
|
+
interface SvgProps {
|
|
199
195
|
fill?: ColorType;
|
|
200
196
|
fillH?: ColorType;
|
|
201
197
|
fillF?: ColorType;
|
|
@@ -208,5 +204,5 @@ declare module '@cronocode/react-box/components/baseSvg' {
|
|
|
208
204
|
}
|
|
209
205
|
}
|
|
210
206
|
`;return{themeCss:[e.join(`
|
|
211
|
-
`),...n,...
|
|
207
|
+
`),...i,...n,...h].join(`
|
|
212
208
|
`),boxDts:p}}exports.boxTheme=u;
|
package/plugins.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function
|
|
2
|
-
const _ = Object.entries(r.colors).map(([o,
|
|
3
|
-
`), t = Object.entries(r.shadows).map(([o,
|
|
4
|
-
`), c = Object.entries(r.backgrounds).map(([o,
|
|
5
|
-
`),
|
|
6
|
-
_ &&
|
|
1
|
+
function C(r) {
|
|
2
|
+
const _ = Object.entries(r.colors).map(([o, e]) => `--color${o}: ${e};`).join(`
|
|
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(`
|
|
5
|
+
`), l = [":root {"];
|
|
6
|
+
_ && l.push(` ${_}`), t && l.push(` ${t}`), c && l.push(` ${c}`), l.push("}");
|
|
7
7
|
const n = Object.keys(r.colors).map((o) => `
|
|
8
8
|
.color_${o},
|
|
9
9
|
.color_h_${o}:hover,
|
|
@@ -151,15 +151,15 @@ function d(r) {
|
|
|
151
151
|
|
|
152
152
|
.bg_a_${o}:active {
|
|
153
153
|
background: var(--background${o});
|
|
154
|
-
}`), $ = Object.keys(r.colors).map((o) => `'${o}'`).join(" | "), s = Object.keys(r.backgrounds).map((o) => `'${o}'`).join(" | "), b = Object.keys(r.shadows).map((o) => `'${o}'`).join(" | "), p = `import {ColorType} from '@cronocode/react-box';
|
|
154
|
+
}`), $ = Object.keys(r.colors).map((o) => `'${o}'`).join(" | "), s = Object.keys(r.backgrounds).map((o) => `'${o}'`).join(" | "), b = Object.keys(r.shadows).map((o) => `'${o}'`).join(" | "), p = `import {ColorType} from '@cronocode/react-box/types';
|
|
155
155
|
|
|
156
|
-
declare module '@cronocode/react-box' {
|
|
156
|
+
declare module '@cronocode/react-box/types' {
|
|
157
157
|
type ColorType = ${$};
|
|
158
158
|
type BackgroundType = ${s};
|
|
159
159
|
type ShadowType = ${b};
|
|
160
160
|
|
|
161
161
|
namespace Augmented {
|
|
162
|
-
interface
|
|
162
|
+
interface BoxProps {
|
|
163
163
|
color?: ColorType;
|
|
164
164
|
colorH?: ColorType;
|
|
165
165
|
colorF?: ColorType;
|
|
@@ -193,12 +193,8 @@ declare module '@cronocode/react-box' {
|
|
|
193
193
|
shadowF?: ShadowType;
|
|
194
194
|
shadowA?: ShadowType;
|
|
195
195
|
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
196
|
|
|
199
|
-
|
|
200
|
-
namespace Augmented {
|
|
201
|
-
interface Props {
|
|
197
|
+
interface SvgProps {
|
|
202
198
|
fill?: ColorType;
|
|
203
199
|
fillH?: ColorType;
|
|
204
200
|
fillF?: ColorType;
|
|
@@ -212,12 +208,12 @@ declare module '@cronocode/react-box/components/baseSvg' {
|
|
|
212
208
|
}
|
|
213
209
|
`;
|
|
214
210
|
return {
|
|
215
|
-
themeCss: [
|
|
211
|
+
themeCss: [l.join(`
|
|
216
212
|
`), ...n, ...i, ...h].join(`
|
|
217
213
|
`),
|
|
218
214
|
boxDts: p
|
|
219
215
|
};
|
|
220
216
|
}
|
|
221
217
|
export {
|
|
222
|
-
|
|
218
|
+
C as boxTheme
|
|
223
219
|
};
|