oddsgate-ds 1.0.88 → 1.0.89

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.88",
3
+ "version": "1.0.89",
4
4
  "description": "Miew theme component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -42,7 +42,7 @@
42
42
  "@storybook/addon-essentials": "^8.1.5",
43
43
  "@storybook/addon-interactions": "^8.1.5",
44
44
  "@storybook/addon-links": "^8.1.5",
45
- "@storybook/addon-styling": "^1.3.2",
45
+ "@storybook/addon-styling": "^1.3.7",
46
46
  "@storybook/addon-webpack5-compiler-swc": "^1.0.3",
47
47
  "@storybook/blocks": "^8.1.5",
48
48
  "@storybook/react": "^8.1.5",
@@ -80,6 +80,7 @@
80
80
  "dependencies": {
81
81
  "@rollup/plugin-json": "^6.0.0",
82
82
  "@rollup/plugin-url": "^8.0.1",
83
+ "@washingtonpost/storybook-addon-web-vitals": "^0.3.0",
83
84
  "blaze-slider": "^1.9.3",
84
85
  "classnames": "^2.3.2",
85
86
  "formik": "^2.4.2",
@@ -113,6 +113,7 @@ export const StyledButton = styled.a<IButtonSC>`
113
113
  return css`
114
114
  ${fontSize('h5')};
115
115
  text-transform:uppercase;
116
+ padding: 0;
116
117
 
117
118
  ${props.$mode === "light" ? `
118
119
  color: ${colors.third50};
@@ -28,6 +28,7 @@ const CircularSlider = ({
28
28
  const contentHolder = useRef<HTMLDivElement>();
29
29
 
30
30
  const isMobile = isTouchDevice();
31
+ console.log(isMobile);
31
32
 
32
33
  const sliderSize = isMobile ? 2.6 : 1;
33
34
  const slideSize = isMobile ? 0.12 : 0.15;
@@ -54,6 +54,7 @@ export const StyledCircularSliderSlide = styled.div<ICircularSlider>`
54
54
  transform-origin: center;
55
55
  transition: .3s linear all;
56
56
  filter: brightness(70%);
57
+ cursor: pointer;
57
58
 
58
59
  & img{
59
60
  height: 100%;
@@ -1,11 +1,35 @@
1
+ import { useEffect, useRef, useState } from "react";
2
+
3
+ import { responsiveMedia } from "@/styles/variables";
4
+
1
5
  const isTouchDevice = () => {
2
- try {
3
- document.createEvent('TouchEvent');
4
- return true;
5
- } catch (e) {
6
- return false;
7
- }
6
+ const [dimensions, setDimensions] = useState({ width: 0, height: 0 });
7
+
8
+ useEffect(() => {
9
+ const observedElementRef = document.querySelector('body > main');
10
+ if (observedElementRef) {
11
+ const observer = new ResizeObserver((entries) => {
12
+ for (let entry of entries) {
13
+ setDimensions({
14
+ width: entry.contentRect.width,
15
+ height: entry.contentRect.height,
16
+ });
17
+ }
18
+ });
19
+
20
+ observer.observe(observedElementRef);
21
+
22
+ // Cleanup function
23
+ return () => {
24
+ observer.disconnect();
25
+ };
26
+ }
27
+ }, []);
28
+
29
+ console.log(dimensions);
30
+ return dimensions.width < parseInt(responsiveMedia);
8
31
  }
9
32
 
10
33
 
34
+
11
35
  export default isTouchDevice
@@ -184,6 +184,12 @@ export const utilities: {
184
184
  last: 6,
185
185
  },
186
186
  },
187
+ "gap": {
188
+ responsive: true,
189
+ property: "gap",
190
+ class: "gap",
191
+ values: spacers
192
+ },
187
193
  "margin": {
188
194
  responsive: true,
189
195
  property: "margin",