oddsgate-ds 1.0.70 → 1.0.72
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 +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/atoms/Separator/Separator.component.d.ts +2 -2
- package/dist/cjs/types/components/atoms/Separator/Separator.interface.d.ts +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/atoms/Separator/Separator.component.d.ts +2 -2
- package/dist/esm/types/components/atoms/Separator/Separator.interface.d.ts +1 -0
- package/dist/types.d.ts +2 -1
- package/package.json +1 -1
- package/src/components/atoms/Separator/Separator.component.tsx +6 -5
- package/src/components/atoms/Separator/Separator.interface.tsx +1 -0
- package/src/components/atoms/Separator/Separator.stories.tsx +2 -1
- package/src/components/organisms/CircularSlider/CircularSlider.component.tsx +6 -2
- package/src/components/organisms/CircularSlider/CircularSlider.theme.ts +27 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { ISeparator } from './Separator.interface';
|
|
3
|
-
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const Separator: ({ type, color, height, margin, ...props }: ISeparator) => React.JSX.Element;
|
|
4
4
|
export default Separator;
|
package/dist/types.d.ts
CHANGED
|
@@ -169,13 +169,14 @@ declare const Spacer: ({ id, color, customHeight, height, className, ...props }:
|
|
|
169
169
|
|
|
170
170
|
type ISeparator = {
|
|
171
171
|
color?: string;
|
|
172
|
+
type?: string;
|
|
172
173
|
margin?: string;
|
|
173
174
|
height?: string;
|
|
174
175
|
className?: string;
|
|
175
176
|
style?: CSSProperties;
|
|
176
177
|
};
|
|
177
178
|
|
|
178
|
-
declare const Separator: ({
|
|
179
|
+
declare const Separator: ({ type, color, height, margin, ...props }: ISeparator) => React__default.JSX.Element;
|
|
179
180
|
|
|
180
181
|
interface IFlexBase {
|
|
181
182
|
className?: string;
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
1
|
import { ISeparator } from './Separator.interface';
|
|
2
|
+
import React from 'react';
|
|
4
3
|
import { StyledSeparator } from './Separator.theme';
|
|
5
4
|
|
|
6
|
-
const Separator = ({
|
|
5
|
+
const Separator = ({ type, color, height, margin, ...props }: ISeparator) => {
|
|
7
6
|
return (
|
|
8
7
|
<StyledSeparator
|
|
8
|
+
|
|
9
9
|
style={{
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
borderColor: color ? color : ``,
|
|
11
|
+
borderWidth: height,
|
|
12
|
+
borderStyle: type,
|
|
12
13
|
margin: margin ? margin : ''
|
|
13
14
|
}}
|
|
14
15
|
{...props}
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
|
|
10
10
|
import Heading from '@/components/atoms/Heading/Heading.component';
|
|
11
11
|
import { ICircularSlider } from './CircularSlider.interface'
|
|
12
|
+
import isTouchDevice from '@/helpers/isTouchDevice';
|
|
12
13
|
|
|
13
14
|
const CircularSlider = ({
|
|
14
15
|
content,
|
|
@@ -25,9 +26,12 @@ const CircularSlider = ({
|
|
|
25
26
|
const slidesHolder = useRef<HTMLDivElement>();
|
|
26
27
|
const contentHolder = useRef<HTMLDivElement>();
|
|
27
28
|
|
|
28
|
-
const
|
|
29
|
-
const slideSize = 0.15;
|
|
29
|
+
const isMobile = isTouchDevice();
|
|
30
30
|
|
|
31
|
+
const sliderSize = isMobile ? 2.6 : 1;
|
|
32
|
+
const slideSize = isMobile ? 0.12 : 0.15;
|
|
33
|
+
|
|
34
|
+
console.log(isMobile);
|
|
31
35
|
|
|
32
36
|
//force 12 items
|
|
33
37
|
if (content && content.length < 12) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ICircularSlider } from './CircularSlider.interface';
|
|
2
|
+
import { responsiveMedia } from '@/styles/variables';
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
|
|
4
5
|
export const StyledCircularSlider = styled.div<ICircularSlider>`
|
|
@@ -7,19 +8,20 @@ export const StyledCircularSlider = styled.div<ICircularSlider>`
|
|
|
7
8
|
min-height: 100dvh;
|
|
8
9
|
overflow: hidden;
|
|
9
10
|
|
|
10
|
-
|
|
11
11
|
& > svg{
|
|
12
|
+
display: none;
|
|
12
13
|
position:absolute;
|
|
13
14
|
top:50%;
|
|
14
15
|
left:0;
|
|
15
16
|
width:66.666%;
|
|
16
17
|
height:auto;
|
|
18
|
+
transform: translate(-50%, -50%)
|
|
19
|
+
}
|
|
17
20
|
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
@media only screen and (min-width: ${responsiveMedia}) {
|
|
22
|
+
& > svg{
|
|
23
|
+
display: block;
|
|
20
24
|
}
|
|
21
|
-
|
|
22
|
-
transform: translate(-50%, -50%)
|
|
23
25
|
}
|
|
24
26
|
`;
|
|
25
27
|
|
|
@@ -30,7 +32,12 @@ export const StyledCircularSliderWrapper = styled.div<ICircularSlider>`
|
|
|
30
32
|
margin: 0 auto;
|
|
31
33
|
margin-right: 0;
|
|
32
34
|
top: 50%;
|
|
33
|
-
transform: translate(
|
|
35
|
+
transform: translate(23%, -50%);
|
|
36
|
+
|
|
37
|
+
@media only screen and (min-width: ${responsiveMedia}) {
|
|
38
|
+
transform: translate(65%, -50%);
|
|
39
|
+
|
|
40
|
+
}
|
|
34
41
|
`;
|
|
35
42
|
|
|
36
43
|
export const StyledCircularSliderSlides = styled.div<ICircularSlider>`
|
|
@@ -62,18 +69,28 @@ export const StyledCircularSliderSlide = styled.div<ICircularSlider>`
|
|
|
62
69
|
export const StyledCircularSliderContent = styled.div<ICircularSlider>`
|
|
63
70
|
position: absolute;
|
|
64
71
|
top: 50%;
|
|
65
|
-
left:
|
|
72
|
+
left:0%;
|
|
66
73
|
|
|
67
|
-
width:
|
|
74
|
+
width: 50%;
|
|
68
75
|
text-align: center;
|
|
69
76
|
|
|
70
77
|
opacity: 0;
|
|
71
|
-
transform: translate(
|
|
78
|
+
transform: translate(0%, 5%);
|
|
72
79
|
transition: all 0.3s ease;
|
|
73
80
|
|
|
74
81
|
&.active{
|
|
75
82
|
opacity: 1;
|
|
76
|
-
transform: translate(
|
|
83
|
+
transform: translate(0%, -50%);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@media only screen and (min-width: ${responsiveMedia}) {
|
|
87
|
+
left:50%;
|
|
88
|
+
width: 25%;
|
|
89
|
+
transform: translate(-50%, 5%);
|
|
90
|
+
|
|
91
|
+
&.active{
|
|
92
|
+
transform: translate(-50%, -50%);
|
|
93
|
+
}
|
|
77
94
|
}
|
|
78
95
|
`;
|
|
79
96
|
|