@cronocode/react-box 1.4.4 → 1.4.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.
- package/baseSvg.module.css.cjs +1 -1
- package/baseSvg.module.css.mjs +1 -1
- package/box.module.css.cjs +1 -1
- package/box.module.css.mjs +1 -1
- package/package.json +1 -1
- package/plugins.cjs +15 -20
- package/plugins.d.ts +0 -1
- package/plugins.mjs +18 -24
- package/style.css +1 -1
package/package.json
CHANGED
package/plugins.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function
|
|
2
|
-
`),
|
|
3
|
-
`),
|
|
4
|
-
`),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function p(r){const l=Object.entries(r.colors).map(([o,e])=>`--color${o}: ${e};`).join(`
|
|
2
|
+
`),_=Object.entries(r.shadows).map(([o,e])=>`--shadow${o}: ${e};`).join(`
|
|
3
|
+
`),t=Object.entries(r.backgrounds).map(([o,e])=>`--background${o}: ${e};`).join(`
|
|
4
|
+
`),c=`:root {
|
|
5
|
+
${l}
|
|
5
6
|
${_}
|
|
6
|
-
${
|
|
7
|
-
|
|
8
|
-
}`,$=Object.keys(r.colors).map(o=>`
|
|
7
|
+
${t}
|
|
8
|
+
}`,n=Object.keys(r.colors).map(o=>`
|
|
9
9
|
.color_${o},
|
|
10
10
|
.color_h_${o}:hover,
|
|
11
11
|
._h:hover>.color_h_${o} {
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
line {
|
|
125
125
|
stroke: var(--color${o});
|
|
126
126
|
}
|
|
127
|
-
}`),
|
|
127
|
+
}`),i=Object.keys(r.shadows).map(o=>`
|
|
128
128
|
.shadow_${o},
|
|
129
129
|
.shadow_h_${o}:hover,
|
|
130
130
|
._h:hover>.shadow_h_${o} {
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
|
|
139
139
|
.shadow_a_${o}:active {
|
|
140
140
|
box-shadow: var(--shadow${o});
|
|
141
|
-
}`)
|
|
141
|
+
}`),$=Object.keys(r.backgrounds).map(o=>`
|
|
142
142
|
.bg_${o},
|
|
143
143
|
.bg_h_${o}:hover,
|
|
144
144
|
._h:hover>.bg_h_${o} {
|
|
@@ -152,12 +152,12 @@
|
|
|
152
152
|
|
|
153
153
|
.bg_a_${o}:active {
|
|
154
154
|
background: var(--background${o});
|
|
155
|
-
}`),
|
|
155
|
+
}`),h=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(" | "),d=`import {ColorType} from '@cronocode/react-box';
|
|
156
156
|
|
|
157
157
|
declare module '@cronocode/react-box' {
|
|
158
|
-
type ColorType = ${
|
|
159
|
-
type BackgroundType = ${
|
|
160
|
-
type ShadowType = ${
|
|
158
|
+
type ColorType = ${h};
|
|
159
|
+
type BackgroundType = ${s};
|
|
160
|
+
type ShadowType = ${b};
|
|
161
161
|
|
|
162
162
|
namespace Augmented {
|
|
163
163
|
interface Props {
|
|
@@ -196,13 +196,8 @@ declare module '@cronocode/react-box' {
|
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
`,d=`import '@cronocode/react-box/components/baseSvg';
|
|
200
199
|
|
|
201
200
|
declare module '@cronocode/react-box/components/baseSvg' {
|
|
202
|
-
type ColorType = ${l};
|
|
203
|
-
type BackgroundType = ${t};
|
|
204
|
-
type ShadowType = ${c};
|
|
205
|
-
|
|
206
201
|
namespace Augmented {
|
|
207
202
|
interface Props {
|
|
208
203
|
fill?: ColorType;
|
|
@@ -216,5 +211,5 @@ declare module '@cronocode/react-box/components/baseSvg' {
|
|
|
216
211
|
}
|
|
217
212
|
}
|
|
218
213
|
}
|
|
219
|
-
`;return{themeCss:[
|
|
220
|
-
`),boxDts:
|
|
214
|
+
`;return{themeCss:[c,...n,...i,...$].join(`
|
|
215
|
+
`),boxDts:d}}exports.boxTheme=p;
|
package/plugins.d.ts
CHANGED
package/plugins.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
function
|
|
2
|
-
const
|
|
3
|
-
`),
|
|
4
|
-
`),
|
|
5
|
-
`),
|
|
6
|
-
${
|
|
7
|
-
${
|
|
8
|
-
${
|
|
9
|
-
}`,
|
|
1
|
+
function p(r) {
|
|
2
|
+
const l = Object.entries(r.colors).map(([o, e]) => `--color${o}: ${e};`).join(`
|
|
3
|
+
`), _ = Object.entries(r.shadows).map(([o, e]) => `--shadow${o}: ${e};`).join(`
|
|
4
|
+
`), t = Object.entries(r.backgrounds).map(([o, e]) => `--background${o}: ${e};`).join(`
|
|
5
|
+
`), c = `:root {
|
|
6
|
+
${l}
|
|
7
|
+
${_}
|
|
8
|
+
${t}
|
|
9
|
+
}`, n = Object.keys(r.colors).map((o) => `
|
|
10
10
|
.color_${o},
|
|
11
11
|
.color_h_${o}:hover,
|
|
12
12
|
._h:hover>.color_h_${o} {
|
|
@@ -125,7 +125,7 @@ function C(r) {
|
|
|
125
125
|
line {
|
|
126
126
|
stroke: var(--color${o});
|
|
127
127
|
}
|
|
128
|
-
}`),
|
|
128
|
+
}`), i = Object.keys(r.shadows).map((o) => `
|
|
129
129
|
.shadow_${o},
|
|
130
130
|
.shadow_h_${o}:hover,
|
|
131
131
|
._h:hover>.shadow_h_${o} {
|
|
@@ -139,7 +139,7 @@ function C(r) {
|
|
|
139
139
|
|
|
140
140
|
.shadow_a_${o}:active {
|
|
141
141
|
box-shadow: var(--shadow${o});
|
|
142
|
-
}`),
|
|
142
|
+
}`), $ = Object.keys(r.backgrounds).map((o) => `
|
|
143
143
|
.bg_${o},
|
|
144
144
|
.bg_h_${o}:hover,
|
|
145
145
|
._h:hover>.bg_h_${o} {
|
|
@@ -153,12 +153,12 @@ function C(r) {
|
|
|
153
153
|
|
|
154
154
|
.bg_a_${o}:active {
|
|
155
155
|
background: var(--background${o});
|
|
156
|
-
}`),
|
|
156
|
+
}`), h = 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(" | "), d = `import {ColorType} from '@cronocode/react-box';
|
|
157
157
|
|
|
158
158
|
declare module '@cronocode/react-box' {
|
|
159
|
-
type ColorType = ${
|
|
160
|
-
type BackgroundType = ${
|
|
161
|
-
type ShadowType = ${
|
|
159
|
+
type ColorType = ${h};
|
|
160
|
+
type BackgroundType = ${s};
|
|
161
|
+
type ShadowType = ${b};
|
|
162
162
|
|
|
163
163
|
namespace Augmented {
|
|
164
164
|
interface Props {
|
|
@@ -197,13 +197,8 @@ declare module '@cronocode/react-box' {
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
`, d = `import '@cronocode/react-box/components/baseSvg';
|
|
201
200
|
|
|
202
201
|
declare module '@cronocode/react-box/components/baseSvg' {
|
|
203
|
-
type ColorType = ${l};
|
|
204
|
-
type BackgroundType = ${t};
|
|
205
|
-
type ShadowType = ${_};
|
|
206
|
-
|
|
207
202
|
namespace Augmented {
|
|
208
203
|
interface Props {
|
|
209
204
|
fill?: ColorType;
|
|
@@ -219,12 +214,11 @@ declare module '@cronocode/react-box/components/baseSvg' {
|
|
|
219
214
|
}
|
|
220
215
|
`;
|
|
221
216
|
return {
|
|
222
|
-
themeCss: [
|
|
217
|
+
themeCss: [c, ...n, ...i, ...$].join(`
|
|
223
218
|
`),
|
|
224
|
-
boxDts:
|
|
225
|
-
baseSvgDts: d
|
|
219
|
+
boxDts: d
|
|
226
220
|
};
|
|
227
221
|
}
|
|
228
222
|
export {
|
|
229
|
-
|
|
223
|
+
p as boxTheme
|
|
230
224
|
};
|