@cronocode/react-box 0.3.7 → 0.3.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.
package/box.d.ts CHANGED
@@ -1,11 +1,14 @@
1
1
  import React from 'react';
2
- import { SizeType, ColorType, CursorType, FontSizeType, BaseFontColorType, BaseBgColorType, BaseBorderColorType, BackgroundType, ShadowType } from './css.variables';
2
+ import { SizeType, ColorType, CursorType, FontSizeType, BaseFontColorType, BaseBgColorType, BaseBorderColorType, BackgroundType, ShadowType, BaseOutlineColorType } from './css.variables';
3
3
  import { Hovered } from './types';
4
4
  import ClassNameUtils from './utils/className/classNameUtils';
5
5
  interface BoxDisplay {
6
6
  display?: 'none' | 'block' | 'inline-block' | 'flex' | 'inline-flex' | 'grid';
7
7
  inline?: boolean;
8
8
  }
9
+ interface BoxSizing {
10
+ boxSizing?: 'border-box' | 'content-box';
11
+ }
9
12
  interface BoxPosition {
10
13
  position?: 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky';
11
14
  inset?: SizeType;
@@ -39,6 +42,12 @@ interface BoxMargin {
39
42
  marginLeft?: SizeType | 'auto';
40
43
  ml?: SizeType | 'auto';
41
44
  }
45
+ declare type BoxBorderAndOutlineStyleType = 'solid' | 'dashed' | 'dotted' | 'double' | 'groove' | 'ridge' | 'inset' | 'outset' | 'none' | 'hidden';
46
+ interface BoxOutline {
47
+ outline?: SizeType;
48
+ outlineStyle?: BoxBorderAndOutlineStyleType;
49
+ outlineOffset?: SizeType;
50
+ }
42
51
  interface BoxBorder {
43
52
  border?: SizeType;
44
53
  b?: SizeType;
@@ -54,8 +63,8 @@ interface BoxBorder {
54
63
  bb?: SizeType;
55
64
  borderLeft?: SizeType;
56
65
  bl?: SizeType;
57
- borderStyle?: 'solid' | 'dashed' | 'dotted' | 'double';
58
- bStyle?: 'solid' | 'dashed' | 'dotted' | 'double';
66
+ borderStyle?: BoxBorderAndOutlineStyleType;
67
+ bStyle?: BoxBorderAndOutlineStyleType;
59
68
  borderRadius?: SizeType;
60
69
  bRadius?: SizeType;
61
70
  borderRadiusTop?: SizeType;
@@ -109,6 +118,8 @@ interface BoxColors {
109
118
  bColor?: ColorType | BaseBorderColorType;
110
119
  borderColorHover?: ColorType | BaseBorderColorType;
111
120
  bColorHover?: ColorType | BaseBorderColorType;
121
+ outlineColor?: ColorType | BaseOutlineColorType;
122
+ outlineColorHover?: ColorType | BaseOutlineColorType;
112
123
  }
113
124
  interface BoxCursor {
114
125
  cursor?: CursorType;
@@ -154,7 +165,7 @@ interface BoxFlex {
154
165
  interface BoxHover {
155
166
  hover?: boolean;
156
167
  }
157
- declare type BoxStyles = BoxDisplay & BoxPosition & BoxSize & BoxMargin & BoxBorder & BoxPadding & BoxShadow & BoxBackground & BoxColors & BoxCursor & BoxZIndex & BoxOverflow & BoxOpacity & BoxFont & BoxText & BoxFlex & BoxHover;
168
+ declare type BoxStyles = BoxDisplay & BoxSizing & BoxPosition & BoxSize & BoxMargin & BoxOutline & BoxBorder & BoxPadding & BoxShadow & BoxBackground & BoxColors & BoxCursor & BoxZIndex & BoxOverflow & BoxOpacity & BoxFont & BoxText & BoxFlex & BoxHover;
158
169
  declare type TagPropsType<TTag extends keyof React.ReactHTML> = Omit<React.ComponentProps<TTag>, 'className' | 'style'>;
159
170
  interface Props<TTag extends keyof React.ReactHTML> extends BoxStyles, Hovered<BoxStyles> {
160
171
  children?: React.ReactNode | ((props: {