@pushwoosh/kit-helpers 4.3.3 → 4.4.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.
- package/grid.d.ts +26 -20
- package/grid.js +2 -2
- package/package.json +1 -1
package/grid.d.ts
CHANGED
|
@@ -1,49 +1,55 @@
|
|
|
1
|
+
export declare const toCssValue: (value: number | string) => string;
|
|
1
2
|
export declare const GridContainer: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
+
$alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
4
|
+
$alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
2
5
|
$gap?: string | number | undefined;
|
|
3
|
-
$padding?: string | number | undefined;
|
|
4
|
-
$margin?: string | number | undefined;
|
|
5
6
|
$justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
6
7
|
$justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
7
|
-
$
|
|
8
|
-
$
|
|
8
|
+
$margin?: string | number | undefined;
|
|
9
|
+
$padding?: string | number | undefined;
|
|
10
|
+
$placeItems?: "end" | "start" | "center" | "stretch" | undefined;
|
|
9
11
|
}, never>;
|
|
10
12
|
export declare const Columns: import("styled-components").StyledComponent<"div", any, {
|
|
13
|
+
$alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
14
|
+
$alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
11
15
|
$gap?: string | number | undefined;
|
|
12
|
-
$padding?: string | number | undefined;
|
|
13
|
-
$margin?: string | number | undefined;
|
|
14
16
|
$justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
15
17
|
$justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
16
|
-
$
|
|
17
|
-
$
|
|
18
|
+
$margin?: string | number | undefined;
|
|
19
|
+
$padding?: string | number | undefined;
|
|
20
|
+
$placeItems?: "end" | "start" | "center" | "stretch" | undefined;
|
|
18
21
|
} & {
|
|
19
22
|
$sizes: number | string;
|
|
20
23
|
}, never>;
|
|
21
24
|
export declare const Rows: import("styled-components").StyledComponent<"div", any, {
|
|
25
|
+
$alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
26
|
+
$alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
22
27
|
$gap?: string | number | undefined;
|
|
23
|
-
$padding?: string | number | undefined;
|
|
24
|
-
$margin?: string | number | undefined;
|
|
25
28
|
$justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
26
29
|
$justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
27
|
-
$
|
|
28
|
-
$
|
|
30
|
+
$margin?: string | number | undefined;
|
|
31
|
+
$padding?: string | number | undefined;
|
|
32
|
+
$placeItems?: "end" | "start" | "center" | "stretch" | undefined;
|
|
29
33
|
} & {
|
|
30
34
|
$sizes: number | string;
|
|
31
35
|
}, never>;
|
|
32
36
|
export declare const Horizontal: import("styled-components").StyledComponent<"div", any, {
|
|
37
|
+
$alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
38
|
+
$alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
33
39
|
$gap?: string | number | undefined;
|
|
34
|
-
$padding?: string | number | undefined;
|
|
35
|
-
$margin?: string | number | undefined;
|
|
36
40
|
$justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
37
41
|
$justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
38
|
-
$
|
|
39
|
-
$
|
|
42
|
+
$margin?: string | number | undefined;
|
|
43
|
+
$padding?: string | number | undefined;
|
|
44
|
+
$placeItems?: "end" | "start" | "center" | "stretch" | undefined;
|
|
40
45
|
}, never>;
|
|
41
46
|
export declare const Vertical: import("styled-components").StyledComponent<"div", any, {
|
|
47
|
+
$alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
48
|
+
$alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
42
49
|
$gap?: string | number | undefined;
|
|
43
|
-
$padding?: string | number | undefined;
|
|
44
|
-
$margin?: string | number | undefined;
|
|
45
50
|
$justifyContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
|
|
46
51
|
$justifyItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
|
|
47
|
-
$
|
|
48
|
-
$
|
|
52
|
+
$margin?: string | number | undefined;
|
|
53
|
+
$padding?: string | number | undefined;
|
|
54
|
+
$placeItems?: "end" | "start" | "center" | "stretch" | undefined;
|
|
49
55
|
}, never>;
|
package/grid.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
const isNumber = value => typeof value === 'number';
|
|
3
|
-
const toCssValue = value => isNumber(value) ? `${value}px` : value;
|
|
3
|
+
export const toCssValue = value => isNumber(value) ? `${value}px` : value;
|
|
4
4
|
const gridTemplate = value => isNumber(value) ? `repeat(${value}, 1fr)` : value;
|
|
5
5
|
const createCssDeclaration = (property, value, valueConvert) => {
|
|
6
6
|
if (value !== undefined) {
|
|
@@ -11,7 +11,7 @@ const createCssDeclaration = (property, value, valueConvert) => {
|
|
|
11
11
|
export const GridContainer = styled.div.withConfig({
|
|
12
12
|
displayName: "GridContainer",
|
|
13
13
|
componentId: "sc-1mpmh7u-0"
|
|
14
|
-
})(["display:grid;", " ", " ", " ", " ", " ", " ", ""], props => createCssDeclaration('
|
|
14
|
+
})(["display:grid;", " ", " ", " ", " ", " ", " ", " ", ""], props => createCssDeclaration('align-content', props.$alignContent), props => createCssDeclaration('align-items', props.$alignItems), props => createCssDeclaration('gap', props.$gap, toCssValue), props => createCssDeclaration('justify-content', props.$justifyContent), props => createCssDeclaration('justify-items', props.$justifyItems), props => createCssDeclaration('margin', props.$margin, toCssValue), props => createCssDeclaration('padding', props.$padding, toCssValue), props => createCssDeclaration('place-items', props.$placeItems));
|
|
15
15
|
export const Columns = styled(GridContainer).withConfig({
|
|
16
16
|
displayName: "Columns",
|
|
17
17
|
componentId: "sc-1mpmh7u-1"
|