@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.
Files changed (3) hide show
  1. package/grid.d.ts +26 -20
  2. package/grid.js +2 -2
  3. 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
- $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
8
- $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
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
- $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
17
- $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
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
- $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
28
- $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
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
- $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
39
- $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
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
- $alignContent?: "end" | "start" | "center" | "space-between" | "space-around" | "space-evenly" | "stretch" | undefined;
48
- $alignItems?: "end" | "start" | "center" | "stretch" | "baseline" | undefined;
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('gap', props.$gap, toCssValue), props => createCssDeclaration('padding', props.$padding, toCssValue), props => createCssDeclaration('margin', props.$margin, toCssValue), props => createCssDeclaration('justify-content', props.$justifyContent), props => createCssDeclaration('justify-items', props.$justifyItems), props => createCssDeclaration('align-content', props.$alignContent), props => createCssDeclaration('align-items', props.$alignItems));
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"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/kit-helpers",
3
- "version": "4.3.3",
3
+ "version": "4.4.1",
4
4
  "description": "React component for build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",