oddsgate-ds 1.0.115 → 1.0.116
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/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/molecules/ProductCard/ProductCard.component.tsx +1 -1
- package/src/components/organisms/ProductsSlider/ProductsSlider.component.tsx +4 -4
- package/src/components/organisms/ProductsSlider/ProductsSlider.stories.tsx +0 -1
- package/src/components/organisms/ProductsSlider/ProductsSlider.theme.ts +21 -14
package/package.json
CHANGED
|
@@ -45,7 +45,7 @@ const ProductCard = ({
|
|
|
45
45
|
{secondRowTitle}
|
|
46
46
|
</Heading>
|
|
47
47
|
</StyledProductCardWrapper>
|
|
48
|
-
{description && <RichText tag='p' className='color-secondary50 mt-
|
|
48
|
+
{description && <RichText tag='p' className='color-secondary50 mt-4'>{description}</RichText>}
|
|
49
49
|
|
|
50
50
|
{linkElement}
|
|
51
51
|
</StyledProductCard>
|
|
@@ -55,7 +55,7 @@ const ProductsSlider = ({
|
|
|
55
55
|
let x = r * Math.cos(stepAngle * i - Math.PI / 2),
|
|
56
56
|
y = r * Math.sin(stepAngle * i - Math.PI / 2);
|
|
57
57
|
|
|
58
|
-
slides[i].style.transform = 'translate( ' + x + 'px, ' + y + 'px ) rotate( ' + (((stepAngle * 180 / Math.PI * i) + 90)) + 'deg )';
|
|
58
|
+
slides[i].style.transform = 'translate( ' + x + 'px, ' + y + 'px ) rotate( ' + (((stepAngle * 180 / Math.PI * i) + 90) - 90) + 'deg )';
|
|
59
59
|
// slides[i].style.transform = 'translate( ' + x + 'px, ' + y + 'px )';
|
|
60
60
|
};
|
|
61
61
|
}
|
|
@@ -66,14 +66,14 @@ const ProductsSlider = ({
|
|
|
66
66
|
|
|
67
67
|
wrapper.current.style.width = 2 * radius + 'px';
|
|
68
68
|
// wrapper.current.style.height = 2 * radius + 'px';
|
|
69
|
-
wrapper.current.style.height = '
|
|
69
|
+
wrapper.current.style.height = '530px';
|
|
70
70
|
|
|
71
71
|
let r = 2 * radius * (1 - slideSize);
|
|
72
72
|
slidesHolder.current.style.width = r + 'px'
|
|
73
73
|
slidesHolder.current.style.height = r + 'px';
|
|
74
74
|
slidesRepositioning(r / 2);
|
|
75
75
|
|
|
76
|
-
slidesSize = Math.min(2 * radius * slideSize, stepAngle * radius * (1 - slideSize) -
|
|
76
|
+
slidesSize = Math.min(2 * radius * slideSize, stepAngle * radius * (1 - slideSize) - 20);
|
|
77
77
|
slidesHolder.current.style.marginTop = slidesSize + 'px';
|
|
78
78
|
|
|
79
79
|
|
|
@@ -91,7 +91,7 @@ const ProductsSlider = ({
|
|
|
91
91
|
w = slider?.current ? slider?.current?.getBoundingClientRect().width : 0,
|
|
92
92
|
h = slider?.current ? slider?.current.getBoundingClientRect().height : 0;
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
radius = (w / 2) * sliderSize
|
|
95
95
|
|
|
96
96
|
setSize(Math.round(radius));
|
|
97
97
|
}, 250)
|
|
@@ -6,36 +6,44 @@ import styled from 'styled-components';
|
|
|
6
6
|
export const StyledProductsSlider = styled.div<IProductsSlider>`
|
|
7
7
|
position: relative;
|
|
8
8
|
width: 100%;
|
|
9
|
-
|
|
9
|
+
contain: paint;
|
|
10
10
|
`;
|
|
11
11
|
|
|
12
12
|
export const StyledProductsSliderWrapper = styled.div<IProductsSlider>`
|
|
13
13
|
position: relative;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
|
|
16
16
|
@media only screen and (min-width: ${responsiveMedia}) {
|
|
17
|
-
|
|
18
|
-
margin-right: 0;
|
|
19
|
-
transform: translate(-30%, 0%);
|
|
17
|
+
transform: translateX(-25%);
|
|
20
18
|
}
|
|
21
19
|
`;
|
|
22
20
|
|
|
23
21
|
export const StyledProductsSliderSlides = styled.div<IProductsSlider>`
|
|
22
|
+
position: relative;
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
align-items: center;
|
|
26
|
+
flex-flow: row wrap;
|
|
27
|
+
|
|
24
28
|
@media only screen and (min-width: ${responsiveMedia}) {
|
|
25
29
|
transform-origin: center;
|
|
26
|
-
display: flex;
|
|
27
|
-
justify-content: center;
|
|
28
|
-
align-items: center;
|
|
29
|
-
position: relative;
|
|
30
|
-
z-index: 100;
|
|
31
|
-
transform: rotate(0deg);
|
|
32
30
|
transition: all 0.6s;
|
|
31
|
+
transform: rotate(0deg);
|
|
32
|
+
z-index: 100;
|
|
33
33
|
}
|
|
34
34
|
`;
|
|
35
35
|
export const StyledProductsSliderSlide = styled.div<IProductsSlider>`
|
|
36
|
+
width: 100%;
|
|
37
|
+
padding: 0.5rem;
|
|
38
|
+
margin-bottom: 4rem;
|
|
39
|
+
|
|
40
|
+
@media only screen and (min-width: 560px) {
|
|
41
|
+
width: 50%;
|
|
42
|
+
}
|
|
36
43
|
@media only screen and (min-width: ${responsiveMedia}) {
|
|
37
44
|
position: absolute;
|
|
38
45
|
width: 26rem;
|
|
46
|
+
margin-bottom: 0;
|
|
39
47
|
transform-origin: center;
|
|
40
48
|
opacity: 0.4;
|
|
41
49
|
transition: .3s linear all;
|
|
@@ -45,7 +53,6 @@ export const StyledProductsSliderSlide = styled.div<IProductsSlider>`
|
|
|
45
53
|
width: 100%;
|
|
46
54
|
height: 100%;
|
|
47
55
|
pointer-events:none;
|
|
48
|
-
transform: rotate(-90deg);
|
|
49
56
|
}
|
|
50
57
|
|
|
51
58
|
&.active{
|
|
@@ -61,6 +68,6 @@ export const StyledProductsSliderContent = styled.div<IProductsSlider>`
|
|
|
61
68
|
border-radius: ${radius.md};
|
|
62
69
|
padding: 2rem;
|
|
63
70
|
margin: auto;
|
|
64
|
-
transform: translateY(
|
|
71
|
+
transform: translateY(-10vw);
|
|
65
72
|
`;
|
|
66
73
|
|