@cronocode/react-box 0.3.5 → 0.3.6

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
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- import { SizeType, ColorType, CursorType, FontSizeType } from './css.variables';
2
+ import { SizeType, ColorType, CursorType, FontSizeType, BaseFontColorType, BaseBgColorType, BaseBorderColorType, BackgroundType, ShadowType } from './css.variables';
3
+ import { Hovered } from './types';
3
4
  import ClassNameUtils from './utils/className/classNameUtils';
4
5
  interface BoxDisplay {
5
6
  display?: 'none' | 'block' | 'inline-block' | 'flex' | 'inline-flex' | 'grid';
@@ -90,17 +91,24 @@ interface BoxPadding {
90
91
  paddingLeft?: SizeType;
91
92
  pl?: SizeType;
92
93
  }
94
+ interface BoxShadow {
95
+ shadow?: ShadowType;
96
+ }
97
+ interface BoxBackground {
98
+ bg?: BackgroundType;
99
+ background?: BackgroundType;
100
+ }
93
101
  interface BoxColors {
94
- color?: ColorType;
95
- colorHover?: ColorType;
96
- backgroundColor?: ColorType;
97
- bgColor?: ColorType;
98
- backgroundColorHover?: ColorType;
99
- bgColorHover?: ColorType;
100
- borderColor?: ColorType;
101
- bColor?: ColorType;
102
- borderColorHover?: ColorType;
103
- bColorHover?: ColorType;
102
+ color?: ColorType | BaseFontColorType;
103
+ colorHover?: ColorType | BaseFontColorType;
104
+ backgroundColor?: ColorType | BaseBgColorType;
105
+ bgColor?: ColorType | BaseBgColorType;
106
+ backgroundColorHover?: ColorType | BaseBgColorType;
107
+ bgColorHover?: ColorType | BaseBgColorType;
108
+ borderColor?: ColorType | BaseBorderColorType;
109
+ bColor?: ColorType | BaseBorderColorType;
110
+ borderColorHover?: ColorType | BaseBorderColorType;
111
+ bColorHover?: ColorType | BaseBorderColorType;
104
112
  }
105
113
  interface BoxCursor {
106
114
  cursor?: CursorType;
@@ -146,7 +154,7 @@ interface BoxFlex {
146
154
  interface BoxHover {
147
155
  hover?: boolean;
148
156
  }
149
- declare type BoxStyles = BoxDisplay & BoxPosition & BoxSize & BoxMargin & BoxBorder & BoxPadding & BoxColors & BoxCursor & BoxZIndex & BoxOverflow & BoxOpacity & BoxFont & BoxText & BoxFlex & BoxHover;
157
+ declare type BoxStyles = BoxDisplay & BoxPosition & BoxSize & BoxMargin & BoxBorder & BoxPadding & BoxShadow & BoxBackground & BoxColors & BoxCursor & BoxZIndex & BoxOverflow & BoxOpacity & BoxFont & BoxText & BoxFlex & BoxHover;
150
158
  declare type TagPropsType<TTag extends keyof React.ReactHTML> = Omit<React.ComponentProps<TTag>, 'className' | 'style'>;
151
159
  interface Props<TTag extends keyof React.ReactHTML> extends BoxStyles, Hovered<BoxStyles> {
152
160
  children?: React.ReactNode | ((props: {