@pushwoosh/kit-helpers 4.8.0 → 4.8.1

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.
Files changed (2) hide show
  1. package/grid.d.ts +29 -15
  2. package/package.json +1 -1
package/grid.d.ts CHANGED
@@ -1,33 +1,47 @@
1
1
  type StrNum = string | number;
2
2
  export declare const toCssValue: (value: StrNum) => string;
3
+ type CssBoxSides<T> = {
4
+ top?: T;
5
+ right?: T;
6
+ bottom?: T;
7
+ left?: T;
8
+ } | {
9
+ horizontal: T;
10
+ top?: T;
11
+ bottom?: T;
12
+ } | {
13
+ vertical: T;
14
+ right?: T;
15
+ left?: T;
16
+ };
3
17
  export declare const GridContainer: import("styled-components").StyledComponent<"div", any, {
4
18
  $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
5
19
  $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
6
20
  $bgColor?: string | undefined;
7
- $border?: string | undefined;
21
+ $border?: string | CssBoxSides<string> | undefined;
8
22
  $borderRadius?: StrNum | undefined;
9
23
  $boxShadow?: string | undefined;
10
24
  $gap?: StrNum | undefined;
11
25
  $gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
12
26
  $justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
13
27
  $justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
14
- $margin?: StrNum | undefined;
15
- $padding?: StrNum | undefined;
28
+ $margin?: StrNum | CssBoxSides<StrNum> | undefined;
29
+ $padding?: StrNum | CssBoxSides<StrNum> | undefined;
16
30
  $placeItems?: "end" | "start" | "center" | "stretch" | undefined;
17
31
  }, never>;
18
32
  export declare const Columns: import("styled-components").StyledComponent<"div", any, {
19
33
  $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
20
34
  $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
21
35
  $bgColor?: string | undefined;
22
- $border?: string | undefined;
36
+ $border?: string | CssBoxSides<string> | undefined;
23
37
  $borderRadius?: StrNum | undefined;
24
38
  $boxShadow?: string | undefined;
25
39
  $gap?: StrNum | undefined;
26
40
  $gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
27
41
  $justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
28
42
  $justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
29
- $margin?: StrNum | undefined;
30
- $padding?: StrNum | undefined;
43
+ $margin?: StrNum | CssBoxSides<StrNum> | undefined;
44
+ $padding?: StrNum | CssBoxSides<StrNum> | undefined;
31
45
  $placeItems?: "end" | "start" | "center" | "stretch" | undefined;
32
46
  } & {
33
47
  $sizes: StrNum;
@@ -36,15 +50,15 @@ export declare const Rows: import("styled-components").StyledComponent<"div", an
36
50
  $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
37
51
  $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
38
52
  $bgColor?: string | undefined;
39
- $border?: string | undefined;
53
+ $border?: string | CssBoxSides<string> | undefined;
40
54
  $borderRadius?: StrNum | undefined;
41
55
  $boxShadow?: string | undefined;
42
56
  $gap?: StrNum | undefined;
43
57
  $gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
44
58
  $justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
45
59
  $justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
46
- $margin?: StrNum | undefined;
47
- $padding?: StrNum | undefined;
60
+ $margin?: StrNum | CssBoxSides<StrNum> | undefined;
61
+ $padding?: StrNum | CssBoxSides<StrNum> | undefined;
48
62
  $placeItems?: "end" | "start" | "center" | "stretch" | undefined;
49
63
  } & {
50
64
  $sizes: StrNum;
@@ -53,15 +67,15 @@ export declare const Horizontal: import("styled-components").StyledComponent<"di
53
67
  $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
54
68
  $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
55
69
  $bgColor?: string | undefined;
56
- $border?: string | undefined;
70
+ $border?: string | CssBoxSides<string> | undefined;
57
71
  $borderRadius?: StrNum | undefined;
58
72
  $boxShadow?: string | undefined;
59
73
  $gap?: StrNum | undefined;
60
74
  $gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
61
75
  $justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
62
76
  $justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
63
- $margin?: StrNum | undefined;
64
- $padding?: StrNum | undefined;
77
+ $margin?: StrNum | CssBoxSides<StrNum> | undefined;
78
+ $padding?: StrNum | CssBoxSides<StrNum> | undefined;
65
79
  $placeItems?: "end" | "start" | "center" | "stretch" | undefined;
66
80
  } & {
67
81
  $gridAutoFlow: string;
@@ -70,15 +84,15 @@ export declare const Vertical: import("styled-components").StyledComponent<"div"
70
84
  $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
71
85
  $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
72
86
  $bgColor?: string | undefined;
73
- $border?: string | undefined;
87
+ $border?: string | CssBoxSides<string> | undefined;
74
88
  $borderRadius?: StrNum | undefined;
75
89
  $boxShadow?: string | undefined;
76
90
  $gap?: StrNum | undefined;
77
91
  $gridAutoFlow?: "row" | "column" | "dense" | "row dense" | "column dense" | undefined;
78
92
  $justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
79
93
  $justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
80
- $margin?: StrNum | undefined;
81
- $padding?: StrNum | undefined;
94
+ $margin?: StrNum | CssBoxSides<StrNum> | undefined;
95
+ $padding?: StrNum | CssBoxSides<StrNum> | undefined;
82
96
  $placeItems?: "end" | "start" | "center" | "stretch" | undefined;
83
97
  } & {
84
98
  $gridAutoFlow: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/kit-helpers",
3
- "version": "4.8.0",
3
+ "version": "4.8.1",
4
4
  "description": "React component for build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",