oddsgate-ds 1.0.94 → 1.0.95

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.94",
3
+ "version": "1.0.95",
4
4
  "description": "Miew theme component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -29,9 +29,6 @@ const CircularSlider = ({
29
29
 
30
30
  const isMobile = useMediaMatch();
31
31
 
32
- const sliderSize = isMobile ? 2.6 : 1;
33
- const slideSize = isMobile ? 0.12 : 0.15;
34
-
35
32
  //force 12 items
36
33
  if (content && content.length < 12) {
37
34
  let counter = 0;
@@ -58,7 +55,6 @@ const CircularSlider = ({
58
55
  let currentSlide = 0;
59
56
 
60
57
  slidesHolder.current.style.transitionDuration = animationDuration + 'ms';
61
-
62
58
  const slidesRepositioning = (r) => {
63
59
  for (let i = 0; i < slides.length; i++) {
64
60
 
@@ -72,6 +68,8 @@ const CircularSlider = ({
72
68
  const setSize = (radius: number) => {
73
69
  if (!wrapper.current || !slidesHolder.current) return //bail out;
74
70
 
71
+ const slideSize = isMobile ? 0.12 : 0.15;
72
+
75
73
  wrapper.current.style.width = 2 * radius + 'px';
76
74
  wrapper.current.style.height = 2 * radius + 'px';
77
75
 
@@ -90,6 +88,8 @@ const CircularSlider = ({
90
88
  }
91
89
 
92
90
  const sliderResize = debounce(() => {
91
+ const sliderSize = isMobile ? 2.6 : 1;
92
+
93
93
  let radius,
94
94
  w = slider?.current ? slider?.current?.getBoundingClientRect().width : 0,
95
95
  h = slider?.current ? slider?.current.getBoundingClientRect().height : 0;
@@ -162,7 +162,7 @@ const CircularSlider = ({
162
162
 
163
163
  window.removeEventListener('resize', sliderResize)
164
164
  }
165
- }, [])
165
+ }, [isMobile])
166
166
 
167
167
  if (!content) return <></>
168
168
 
@@ -60,6 +60,7 @@ export const StyledCircularSliderSlide = styled.div<ICircularSlider>`
60
60
  height: 100%;
61
61
  object-fit: cover;
62
62
  pointer-events:none;
63
+ filter: grayscale(100%);
63
64
  }
64
65
 
65
66
  &.active{
@@ -29,6 +29,7 @@ const Tabs = ({ id, title, menu, vertical, className, style }: ITabs) => {
29
29
  heights.push(child?.offsetHeight as number)
30
30
  })
31
31
  tabsContent.current.style.height = `${Math.max(...heights)}px`;
32
+ window.dispatchEvent(new Event('resize'));
32
33
  }, 250)
33
34
 
34
35
  useEffect(()=>{