@growth-angels/ds-core 1.17.1 → 1.18.0
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/dist/layout/Container/Container.js +4 -3
- package/dist/layout/Container/Container.types.d.ts +2 -0
- package/dist/layout/Grid/Grid.js +3 -3
- package/dist/layout/Grid/Grid.types.d.ts +2 -0
- package/package.json +1 -1
- package/src/layout/Container/Container.tsx +4 -3
- package/src/layout/Container/Container.types.ts +2 -0
- package/src/layout/Grid/Grid.tsx +3 -3
- package/src/layout/Grid/Grid.types.ts +2 -0
- package/src/organisms/Carousel/Carousel.scss +4 -3
- package/src/utils/_spacings.scss +14 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
export const Container = (props) => {
|
|
3
|
-
const { size, children, style, padding, margin, stretch, id } = props;
|
|
3
|
+
const { size, children, style, padding, margin, stretch, id, paddingPosition, marginPosition } = props;
|
|
4
|
+
console.log("Container props", props);
|
|
4
5
|
const classes = [
|
|
5
6
|
"ga-ds-container",
|
|
6
7
|
`ga-ds-container--${size}`,
|
|
7
|
-
...(padding ? [`ga-ds-util-padding--${padding}`] : []),
|
|
8
|
-
...(margin ? [`ga-ds-util-margin--${margin}`] : []),
|
|
8
|
+
...(padding ? [`ga-ds-util-padding${paddingPosition ? `-${paddingPosition}` : ""}--${padding}`] : []),
|
|
9
|
+
...(margin ? [`ga-ds-util-margin${marginPosition ? `-${marginPosition}` : ""}--${margin}`] : []),
|
|
9
10
|
...(stretch ? [`ga-ds-container-stretch--${stretch}`] : []),
|
|
10
11
|
...(props.extraClassNames || []),
|
|
11
12
|
];
|
package/dist/layout/Grid/Grid.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
export const Grid = (props) => {
|
|
3
|
-
const { children, alignItems, justifyContent, extraClassNames, padding, margin } = props;
|
|
3
|
+
const { children, alignItems, justifyContent, extraClassNames, padding, margin, paddingPosition, marginPosition } = props;
|
|
4
4
|
const classNames = [
|
|
5
5
|
"ga-ds-grid",
|
|
6
|
-
...(padding ? [`ga-ds-util-padding--${padding}`] : []),
|
|
7
|
-
...(margin ? [`ga-ds-util-margin--${margin}`] : []),
|
|
6
|
+
...(padding ? [`ga-ds-util-padding${paddingPosition ? `-${paddingPosition}` : ""}--${padding}`] : []),
|
|
7
|
+
...(margin ? [`ga-ds-util-margin${marginPosition ? `-${marginPosition}` : ""}--${margin}`] : []),
|
|
8
8
|
...(extraClassNames || []),
|
|
9
9
|
];
|
|
10
10
|
return (_jsx("div", { className: classNames.join(" "), style: { ...(alignItems !== "none" && { alignItems }), ...(justifyContent !== "none" && { justifyContent }) }, children: children }));
|
|
@@ -2,6 +2,8 @@ import { WordpressDefault } from "../../global.types";
|
|
|
2
2
|
export interface GridAttributes {
|
|
3
3
|
alignItems: 'flex-start' | 'center' | 'flex-end' | 'none';
|
|
4
4
|
justifyContent: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'none';
|
|
5
|
+
paddingPosition?: 'top' | 'bottom';
|
|
6
|
+
marginPosition?: 'top' | 'bottom';
|
|
5
7
|
}
|
|
6
8
|
export interface GridProps extends WordpressDefault, GridAttributes {
|
|
7
9
|
children: React.ReactNode | React.ReactNode[];
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { ContainerProps } from "./Container.types"
|
|
2
2
|
|
|
3
3
|
export const Container = (props: ContainerProps) => {
|
|
4
|
-
const { size, children, style, padding, margin, stretch, id } = props
|
|
4
|
+
const { size, children, style, padding, margin, stretch, id, paddingPosition, marginPosition } = props
|
|
5
|
+
console.log("Container props", props)
|
|
5
6
|
const classes = [
|
|
6
7
|
"ga-ds-container",
|
|
7
8
|
`ga-ds-container--${size}`,
|
|
8
|
-
...(padding ? [`ga-ds-util-padding--${padding}`] : []),
|
|
9
|
-
...(margin ? [`ga-ds-util-margin--${margin}`] : []),
|
|
9
|
+
...(padding ? [`ga-ds-util-padding${paddingPosition ? `-${paddingPosition}` : ""}--${padding}`] : []),
|
|
10
|
+
...(margin ? [`ga-ds-util-margin${marginPosition ? `-${marginPosition}` : ""}--${margin}`] : []),
|
|
10
11
|
...(stretch ? [`ga-ds-container-stretch--${stretch}`] : []),
|
|
11
12
|
...(props.extraClassNames || []),
|
|
12
13
|
]
|
|
@@ -8,4 +8,6 @@ export interface ContainerProps extends WordpressDefault, React.HTMLAttributes<H
|
|
|
8
8
|
stretch?:ContainerStretch
|
|
9
9
|
children: React.ReactNode | React.ReactNode[];
|
|
10
10
|
style?: React.CSSProperties;
|
|
11
|
+
paddingPosition?: "top" | "bottom";
|
|
12
|
+
marginPosition?: "top" | "bottom";
|
|
11
13
|
}
|
package/src/layout/Grid/Grid.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { GridProps } from "./Grid.types"
|
|
2
2
|
export const Grid = (props: GridProps): JSX.Element => {
|
|
3
|
-
const { children, alignItems, justifyContent, extraClassNames, padding, margin } = props
|
|
3
|
+
const { children, alignItems, justifyContent, extraClassNames, padding, margin, paddingPosition, marginPosition } = props
|
|
4
4
|
const classNames = [
|
|
5
5
|
"ga-ds-grid",
|
|
6
|
-
...(padding ? [`ga-ds-util-padding--${padding}`] : []),
|
|
7
|
-
...(margin ? [`ga-ds-util-margin--${margin}`] : []),
|
|
6
|
+
...(padding ? [`ga-ds-util-padding${paddingPosition ? `-${paddingPosition}` : ""}--${padding}`] : []),
|
|
7
|
+
...(margin ? [`ga-ds-util-margin${marginPosition ? `-${marginPosition}` : ""}--${margin}`] : []),
|
|
8
8
|
...(extraClassNames || []),
|
|
9
9
|
]
|
|
10
10
|
|
|
@@ -3,6 +3,8 @@ import { WordpressDefault } from "../../global.types";
|
|
|
3
3
|
export interface GridAttributes {
|
|
4
4
|
alignItems: 'flex-start' | 'center' | 'flex-end' | 'none'
|
|
5
5
|
justifyContent: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'none'
|
|
6
|
+
paddingPosition?: 'top' | 'bottom'
|
|
7
|
+
marginPosition?: 'top' | 'bottom'
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
export interface GridProps extends WordpressDefault, GridAttributes {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
&__track {
|
|
12
12
|
--ga-ds-slides-per-view: 1;
|
|
13
13
|
display: grid;
|
|
14
|
-
grid-auto-flow: column;
|
|
14
|
+
grid-auto-flow: column;
|
|
15
15
|
grid-auto-columns: calc(
|
|
16
16
|
(100% - (var(--ga-ds-space-between, 1rem) * (var(--ga-ds-slides-per-view, 3) - 1))) / var(--ga-ds-slides-per-view, 3)
|
|
17
17
|
);
|
|
@@ -72,13 +72,14 @@
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
&__dots {
|
|
75
|
+
--dot-size: 1rem;
|
|
75
76
|
display: flex;
|
|
76
77
|
gap: var(--ga-ds-gap, 1rem);
|
|
77
78
|
|
|
78
79
|
.ga-ds-carousel__dot {
|
|
79
80
|
display: block;
|
|
80
|
-
width:
|
|
81
|
-
height:
|
|
81
|
+
width: var(--dot-size);
|
|
82
|
+
height: var(--dot-size);
|
|
82
83
|
border-radius: 50%;
|
|
83
84
|
background-color: #e2e2e2;
|
|
84
85
|
|
package/src/utils/_spacings.scss
CHANGED
|
@@ -5,6 +5,14 @@ $spacingsMap: ("xsmall", "small", "medium", "large", "xlarge");
|
|
|
5
5
|
padding-top: var(--ga-spacings-padding-#{$value});
|
|
6
6
|
padding-bottom: var(--ga-spacings-padding-#{$value});
|
|
7
7
|
}
|
|
8
|
+
|
|
9
|
+
.ga-ds-util-padding-top--#{$value} {
|
|
10
|
+
padding-top: var(--ga-spacings-padding-#{$value});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ga-ds-util-padding-bottom--#{$value} {
|
|
14
|
+
padding-bottom: var(--ga-spacings-padding-#{$value});
|
|
15
|
+
}
|
|
8
16
|
}
|
|
9
17
|
|
|
10
18
|
$marginsMap: ("small", "medium", "large");
|
|
@@ -14,4 +22,10 @@ $marginsMap: ("small", "medium", "large");
|
|
|
14
22
|
margin-top: var(--ga-spacings-margin-#{$value});
|
|
15
23
|
margin-bottom: var(--ga-spacings-margin-#{$value});
|
|
16
24
|
}
|
|
25
|
+
.ga-ds-util-margin-top--#{$value} {
|
|
26
|
+
margin-top: var(--ga-spacings-margin-#{$value});
|
|
27
|
+
}
|
|
28
|
+
.ga-ds-util-margin-bottom--#{$value} {
|
|
29
|
+
margin-bottom: var(--ga-spacings-margin-#{$value});
|
|
30
|
+
}
|
|
17
31
|
}
|