@cronocode/react-box 1.5.3 → 1.5.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/box.d.ts CHANGED
@@ -4,11 +4,7 @@ import ClassNameUtils from './utils/className/classNameUtils';
4
4
  import { ThemeComponentProps } from './theme';
5
5
  type AllProps<TTag extends keyof React.ReactHTML> = React.ComponentProps<TTag>;
6
6
  type TagPropsType<TTag extends keyof React.ReactHTML> = Omit<AllProps<TTag>, 'className' | 'style' | 'ref'>;
7
- export declare namespace Augmented {
8
- interface Props {
9
- }
10
- }
11
- interface Props<TTag extends keyof React.ReactHTML> extends BoxStyles, ThemeComponentProps, Augmented.Props {
7
+ interface Props<TTag extends keyof React.ReactHTML> extends BoxStyles, ThemeComponentProps {
12
8
  children?: React.ReactNode | ((props: {
13
9
  isHover: boolean;
14
10
  }) => React.ReactNode);
@@ -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
- export declare namespace Augmented {
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",
3
+ "version": "1.5.5",
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 n=Object.keys(r.colors).map(o=>`
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
- }`),i=Object.keys(r.shadows).map(o=>`
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
+ }`),$=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 '@cronocode/react-box';
152
152
 
153
- declare module '@cronocode/react-box' {
154
- type ColorType = ${s};
155
- type BackgroundType = ${$};
153
+ declare module '@cronocode/react-box/types' {
154
+ type ColorType = ${$};
155
+ type BackgroundType = ${s};
156
156
  type ShadowType = ${b};
157
157
 
158
158
  namespace Augmented {
159
- interface Props {
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
- declare module '@cronocode/react-box/components/baseSvg' {
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,...i,...h].join(`
207
+ `),...i,...n,...h].join(`
212
208
  `),boxDts:p}}exports.boxTheme=u;
package/plugins.mjs CHANGED
@@ -1,9 +1,9 @@
1
- function d(r) {
2
- const _ = Object.entries(r.colors).map(([o, l]) => `--color${o}: ${l};`).join(`
3
- `), t = Object.entries(r.shadows).map(([o, l]) => `--shadow${o}: ${l};`).join(`
4
- `), c = Object.entries(r.backgrounds).map(([o, l]) => `--background${o}: ${l};`).join(`
5
- `), e = [":root {"];
6
- _ && e.push(` ${_}`), t && e.push(` ${t}`), c && e.push(` ${c}`), e.push("}");
1
+ function u(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 '@cronocode/react-box';
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 Props {
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
- declare module '@cronocode/react-box/components/baseSvg' {
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: [e.join(`
211
+ themeCss: [l.join(`
216
212
  `), ...n, ...i, ...h].join(`
217
213
  `),
218
214
  boxDts: p
219
215
  };
220
216
  }
221
217
  export {
222
- d as boxTheme
218
+ u as boxTheme
223
219
  };
package/types.d.ts CHANGED
@@ -217,12 +217,18 @@ interface BoxPointerEvents {
217
217
  pointerEvents?: PointerEventsType;
218
218
  }
219
219
  type BoxNormalStyles = BoxPseudoClasses & BoxDisplay & BoxSizing & BoxPosition & BoxSize & BoxMargin & BoxPadding & BoxBorder & BoxCursor & BoxZIndex & BoxOverflow & BoxOpacity & BoxFont & BoxText & BoxFlex & BoxOutline & BoxTransition & BoxUserSelect & BoxAppearance & BoxPointerEvents;
220
- export type BoxStyles = BoxNormalStyles & Hovered<BoxNormalStyles> & Focused<BoxNormalStyles> & Activated<BoxNormalStyles>;
220
+ export declare namespace Augmented {
221
+ interface BoxProps {
222
+ }
223
+ interface SvgProps {
224
+ }
225
+ }
226
+ export type BoxStyles = BoxNormalStyles & Hovered<BoxNormalStyles> & Focused<BoxNormalStyles> & Activated<BoxNormalStyles> & Augmented.BoxProps;
221
227
  export declare const themeClasses: Partial<Record<string, string>>;
222
228
  interface SvgNormalStyles {
223
229
  rotate?: 0 | 90 | 180 | 270 | -90 | -180 | -270;
224
230
  flip?: 'xAxis' | 'yAxis';
225
231
  }
226
- export type SvgStyles = SvgNormalStyles & Hovered<SvgNormalStyles> & Focused<SvgNormalStyles> & Activated<SvgNormalStyles>;
232
+ export type SvgStyles = SvgNormalStyles & Hovered<SvgNormalStyles> & Focused<SvgNormalStyles> & Activated<SvgNormalStyles> & Augmented.SvgProps;
227
233
  export declare const themeSvgClasses: Partial<Record<string, string>>;
228
234
  export {};