oddsgate-ds 1.0.69 → 1.0.71

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oddsgate-ds",
3
- "version": "1.0.69",
3
+ "version": "1.0.71",
4
4
  "description": "Miew theme component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -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 sliderSize = 1;
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
- & path{
19
- fill
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(65%, -50%);
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:50%;
72
+ left:0%;
66
73
 
67
- width: 25%;
74
+ width: 50%;
68
75
  text-align: center;
69
76
 
70
77
  opacity: 0;
71
- transform: translate(-50%, 5%);
78
+ transform: translate(0%, 5%);
72
79
  transition: all 0.3s ease;
73
80
 
74
81
  &.active{
75
82
  opacity: 1;
76
- transform: translate(-50%, -50%);
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
 
@@ -314,7 +314,8 @@ export const utilities: {
314
314
  "radius": {
315
315
  property: "border-radius",
316
316
  class: "radius",
317
- values: radius
317
+ values: radius,
318
+ responsive: true,
318
319
  },
319
320
  "zIndex": {
320
321
  property: "z-index",