oddsgate-ds 1.0.82 → 1.0.83

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.
@@ -3,4 +3,5 @@ import { ISlider } from './Slider.interface';
3
3
  declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react").ReactRenderer, import("@storybook/types").Args>;
4
4
  export default _default;
5
5
  export declare const Simple: StoryObj<ISlider>;
6
+ export declare const LessSliders: StoryObj<ISlider>;
6
7
  export declare const MobileOnly: StoryObj<ISlider>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oddsgate-ds",
3
- "version": "1.0.82",
3
+ "version": "1.0.83",
4
4
  "description": "Miew theme component library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -5,19 +5,28 @@ import Card from '../Card/Card.component';
5
5
  import { IEventsCard } from './EventsCard.interface';
6
6
 
7
7
  export const StyledEventsCard = styled(Card) <IEventsCard>`
8
- padding: 0;
8
+ padding: 1rem;
9
+ border-radius: ${radius.md};
10
+ transition: all 0.3s;
9
11
 
10
12
  picture{
11
13
  border-radius: 100%;
14
+ & img{
15
+ opacity: 1 !important;
16
+ }
12
17
  }
13
18
  & figcaption{
14
19
  color: ${colors.third10};
15
- padding:0;
20
+ padding:1rem;
16
21
  margin-top: 1rem;
17
22
  }
18
23
 
19
24
  &:hover{
25
+ background-color: ${colors.third10};
20
26
 
27
+ & figcaption{
28
+ color: ${colors.secondary50};
29
+ }
21
30
  }
22
31
  `;
23
32
 
@@ -20,6 +20,12 @@ export const StyledNewsCard = styled(Card) <INewsCard>`
20
20
  z-index: 10;
21
21
  }
22
22
 
23
+ & picture{
24
+ & img{
25
+ opacity: 1 !important;
26
+ }
27
+ }
28
+
23
29
  & figcaption{
24
30
 
25
31
  }
@@ -33,8 +33,8 @@ const Slider = ({
33
33
  const setConfig = () => {
34
34
  if (sliderRef?.current) sliderRef.current.destroy()
35
35
  responsiveCSS = `
36
- --slides-to-show: ${slidesToShow ? slidesToShow : 4};
37
- --slide-gap: ${spacing ? spacing : '1rem'};
36
+ --slides-to-show: ${slidesToShow ? slidesToShow : 4} !important;
37
+ --slide-gap: ${spacing ? spacing : '1rem'} !important;
38
38
  `
39
39
 
40
40
  if (mediaQueries) {
@@ -111,7 +111,6 @@ const Slider = ({
111
111
  setConfig();
112
112
  }
113
113
 
114
-
115
114
  return (
116
115
  <StyledSlider
117
116
  $responsiveCSS={responsiveCSS}
@@ -73,6 +73,37 @@ export const Simple: StoryObj<ISlider> = {
73
73
  }
74
74
 
75
75
 
76
+
77
+ export const LessSliders: StoryObj<ISlider> = {
78
+ render: args => (
79
+ <div
80
+ style={{
81
+ margin: 'auto'
82
+ }}
83
+ >
84
+ <Slider
85
+ slidesToShow={4}
86
+ slidesToScroll={1}
87
+ infinite={false}
88
+ spacing={'1rem'}
89
+ mediaQueries={{
90
+ 900: {
91
+ slidesToShow: 2
92
+ },
93
+ 500: {
94
+ slidesToShow: 1
95
+ }
96
+ }}
97
+ {...args}
98
+ >
99
+ <div>{image}</div>
100
+ <div>{image}</div>
101
+ </Slider>
102
+ </div>
103
+ ),
104
+ }
105
+
106
+
76
107
  export const MobileOnly: StoryObj<ISlider> = {
77
108
  render: args => (
78
109
  <div
@@ -4,8 +4,7 @@ import styled, { css } from 'styled-components';
4
4
  import { ISlider } from './Slider.interface';
5
5
 
6
6
  const SliderStyles = `
7
- //vendor styles
8
- .blaze-slider {
7
+ .blaze-slider {
9
8
  /* default config */
10
9
  --slides-to-show: 1;
11
10
  --slide-gap: 1rem;
@@ -106,31 +105,6 @@ const SliderStyles = `
106
105
  opacity: 0.5;
107
106
  cursor:not-allowed;
108
107
  }
109
-
110
- ${({ $responsiveCSS }) => $responsiveCSS && `
111
- ${$responsiveCSS};
112
- `}
113
-
114
- ${({ $mobileOnly }) => $mobileOnly && `
115
- @media only screen and (min-width: ${responsiveMedia}) {
116
- .blaze-track{
117
- flex-flow: row wrap;
118
- width: 100% !important;
119
- max-width: 100% !important;
120
- transform: none !important;
121
- gap: 0 !important;
122
-
123
- &>div{
124
- width: 100% !important;
125
- }
126
- }
127
-
128
- .blaze-arrows,
129
- .blaze-controls{
130
- display:none;
131
- }
132
- }
133
- `}
134
108
  }
135
109
  `;
136
110
 
@@ -162,4 +136,10 @@ export const StyledSlider = styled.div<ISlider>`
162
136
 
163
137
  ${SliderStyles}
164
138
  `)}
139
+
140
+ ${({ $responsiveCSS }) => $responsiveCSS && `
141
+ .blaze-slider {
142
+ ${$responsiveCSS};
143
+ }
144
+ `}
165
145
  `;