oddsgate-ds 1.0.33 → 1.0.35
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 +5 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/styles/utilities.d.ts +1 -0
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/styles/utilities.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/atoms/FlexGrid/FlexGrid.theme.ts +1 -1
- package/src/components/organisms/CircularSlider/CircularSlider.component.tsx +3 -0
- package/src/components/organisms/CircularSlider/CircularSlider.stories.tsx +65 -0
- package/src/components/organisms/CircularSlider/CircularSlider.theme.ts +18 -0
- package/src/styles/utilities.ts +7 -2
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ export const StyledContainer = styled.div<IRowSC>`
|
|
|
17
17
|
z-index: 1;
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
${Object.keys(CONTAINER_NAMES)
|
|
20
|
+
${props => !props.$fluid && Object.keys(CONTAINER_NAMES)
|
|
21
21
|
.sort((k1, k2) => CONTAINER_NAMES.indexOf(k1) - CONTAINER_NAMES.indexOf(k2))
|
|
22
22
|
.map(k => config(CONTAINER_NAMES).mediaContainer[CONTAINER_NAMES[k]]`
|
|
23
23
|
max-width: ${grid_conf.container[CONTAINER_NAMES[k]]};
|
|
@@ -161,6 +161,9 @@ const CircularSlider = ({
|
|
|
161
161
|
|
|
162
162
|
return (
|
|
163
163
|
<StyledCircularSlider ref={slider as any} className={className} style={style}>
|
|
164
|
+
<svg viewBox="0 0 907 906" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
165
|
+
<path d="M887.551 584.892L904.187 504.729L531.591 461.981C531.824 459.769 532.012 457.775 531.984 455.735L906.794 468.208L902.047 386.545L531.043 441.754C530.798 439.669 530.336 437.54 529.829 435.627L895.322 350.347L869.628 272.699L525.63 422.1C524.69 420.097 523.922 418.356 522.981 416.353L853.852 239.821L808.868 171.277L515.038 404.535C513.792 402.92 512.328 401.26 510.82 399.817L784.811 143.459L723.799 88.9898L500.604 390.24C498.834 388.969 497.28 387.742 495.465 386.688L693.744 68.2895L620.714 31.439L483.014 380.262C481.154 379.424 479.032 378.757 477.127 378.136L585.693 19.4255L505.53 2.78951L462.783 375.385C460.571 375.152 458.576 374.964 456.537 374.993L469.01 0.182176L387.347 4.92974L442.556 375.933C440.471 376.179 438.342 376.641 436.429 377.148L351.149 11.6549L273.501 37.3486L422.902 381.346C420.899 382.286 419.158 383.055 417.155 383.995L240.361 53.2959L171.817 98.2799L405.12 391.893C403.505 393.14 401.846 394.603 400.403 396.112L144.261 122.166L89.7918 183.178L391.042 406.373C389.77 408.143 388.544 409.696 387.49 411.511L69.2632 213.494L32.4127 286.524L381.235 424.224C380.397 426.084 379.731 428.206 379.11 430.111L20.2275 321.283L3.59147 401.446L376.187 444.194C375.954 446.405 375.766 448.4 375.795 450.44L0.984138 437.967L5.73169 519.63L376.735 464.42C376.981 466.505 377.443 468.635 377.95 470.548L12.4569 555.828L38.1505 633.476L382.148 484.075C383.088 486.078 383.857 487.819 384.797 489.822L54.0979 666.616L99.0819 735.16L392.695 501.857C393.942 503.471 395.405 505.131 396.914 506.574L122.968 762.715L183.98 817.185L407.175 515.935C408.945 517.206 410.498 518.432 412.313 519.487L214.034 837.885L287.064 874.736L424.765 525.913C426.625 526.751 428.746 527.417 430.651 528.038L322.085 886.749L402.248 903.385L444.996 530.789C447.207 531.022 449.202 531.21 451.242 531.182L438.769 905.992L520.432 901.245L465.222 530.241C467.307 529.996 469.437 529.534 471.35 529.027L556.629 894.52L634.278 868.826L484.876 524.828C486.88 523.888 488.621 523.12 490.624 522.179L667.156 853.05L735.7 808.066L502.442 514.236C504.056 512.99 505.716 511.526 507.159 510.018L763.517 784.009L817.987 722.997L516.737 499.802C518.008 498.032 519.234 496.478 520.289 494.663L838.687 692.942L875.538 619.912L526.715 482.212C527.553 480.352 528.219 478.23 528.84 476.325L887.551 584.892Z" fill="#FC3151" />
|
|
166
|
+
</svg>
|
|
164
167
|
<StyledCircularSliderContent ref={contentHolder as any}>
|
|
165
168
|
<div>
|
|
166
169
|
<Heading tag="span" size="h2" className='color-primary50 fw-bold'>{slideContent?.name}</Heading>
|
|
@@ -64,6 +64,71 @@ export const Simple: StoryObj<ICircularSlider> = {
|
|
|
64
64
|
name: "My name 7",
|
|
65
65
|
role: "My role",
|
|
66
66
|
img: image
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "My name 9",
|
|
70
|
+
role: "My role",
|
|
71
|
+
img: image
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "My name 9",
|
|
75
|
+
role: "My role",
|
|
76
|
+
img: image
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "My name 10",
|
|
80
|
+
role: "My role",
|
|
81
|
+
img: image
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "My name 11",
|
|
85
|
+
role: "My role",
|
|
86
|
+
img: image
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: "My name 1§2",
|
|
90
|
+
role: "My role",
|
|
91
|
+
img: image
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: "My name 13",
|
|
95
|
+
role: "My role",
|
|
96
|
+
img: image
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "My name 14",
|
|
100
|
+
role: "My role",
|
|
101
|
+
img: image
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: "My name 15",
|
|
105
|
+
role: "My role",
|
|
106
|
+
img: image
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: "My name 16",
|
|
110
|
+
role: "My role",
|
|
111
|
+
img: image
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "My name 17",
|
|
115
|
+
role: "My role",
|
|
116
|
+
img: image
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: "My name 19",
|
|
120
|
+
role: "My role",
|
|
121
|
+
img: image
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "My name 19",
|
|
125
|
+
role: "My role",
|
|
126
|
+
img: image
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: "My name 20",
|
|
130
|
+
role: "My role",
|
|
131
|
+
img: image
|
|
67
132
|
}
|
|
68
133
|
]
|
|
69
134
|
}
|
|
@@ -2,9 +2,25 @@ import { ICircularSlider } from './CircularSlider.interface';
|
|
|
2
2
|
import styled from 'styled-components';
|
|
3
3
|
|
|
4
4
|
export const StyledCircularSlider = styled.div<ICircularSlider>`
|
|
5
|
+
position: relative;
|
|
5
6
|
width: 100%;
|
|
6
7
|
min-height: 100dvh;
|
|
7
8
|
overflow: hidden;
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
& > svg{
|
|
12
|
+
position:absolute;
|
|
13
|
+
top:50%;
|
|
14
|
+
left:0;
|
|
15
|
+
width:66.666%;
|
|
16
|
+
height:auto;
|
|
17
|
+
|
|
18
|
+
& path{
|
|
19
|
+
fill
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
transform: translate(-50%, -50%)
|
|
23
|
+
}
|
|
8
24
|
`;
|
|
9
25
|
|
|
10
26
|
export const StyledCircularSliderWrapper = styled.div<ICircularSlider>`
|
|
@@ -33,6 +49,8 @@ export const StyledCircularSliderSlide = styled.div<ICircularSlider>`
|
|
|
33
49
|
filter: brightness(70%);
|
|
34
50
|
|
|
35
51
|
& img{
|
|
52
|
+
height: 100%;
|
|
53
|
+
object-fit: cover;
|
|
36
54
|
pointer-events:none;
|
|
37
55
|
}
|
|
38
56
|
|
package/src/styles/utilities.ts
CHANGED
|
@@ -39,6 +39,7 @@ export const utilities: {
|
|
|
39
39
|
values?: {
|
|
40
40
|
[key: string]: string | number;
|
|
41
41
|
};
|
|
42
|
+
important?: boolean;
|
|
42
43
|
};
|
|
43
44
|
} = {
|
|
44
45
|
"align": {
|
|
@@ -62,6 +63,7 @@ export const utilities: {
|
|
|
62
63
|
flex: "flex",
|
|
63
64
|
none: "none"
|
|
64
65
|
},
|
|
66
|
+
important: true,
|
|
65
67
|
},
|
|
66
68
|
"position": {
|
|
67
69
|
property: "position",
|
|
@@ -71,6 +73,7 @@ export const utilities: {
|
|
|
71
73
|
sticky: "sticky",
|
|
72
74
|
fixed: "fixed"
|
|
73
75
|
},
|
|
76
|
+
important: true,
|
|
74
77
|
},
|
|
75
78
|
"width": {
|
|
76
79
|
responsive: true,
|
|
@@ -256,7 +259,8 @@ export const utilities: {
|
|
|
256
259
|
semibold: 600,
|
|
257
260
|
bold: 700,
|
|
258
261
|
black: 800
|
|
259
|
-
}
|
|
262
|
+
},
|
|
263
|
+
important: true,
|
|
260
264
|
},
|
|
261
265
|
"text-align": {
|
|
262
266
|
responsive: true,
|
|
@@ -304,11 +308,12 @@ export function generateUtilities(utility: string, breakpoint: string): string {
|
|
|
304
308
|
const className: string | undefined = utilities[utility]?.class || property;
|
|
305
309
|
const values: { [key: string]: string | number } | undefined = utilities[utility]?.values;
|
|
306
310
|
const responsive: boolean | undefined = utilities[utility]?.responsive;
|
|
311
|
+
const important: boolean | undefined = utilities[utility]?.important;
|
|
307
312
|
let cssSelector: string = "";
|
|
308
313
|
|
|
309
314
|
Object.keys(values || {}).map((key: string, i: number) => {
|
|
310
315
|
cssSelector += `.${`${className}-${key}`}{
|
|
311
|
-
${property}: ${values?.[key]};
|
|
316
|
+
${property}: ${values?.[key]}${important && " !important"};
|
|
312
317
|
}`;
|
|
313
318
|
});
|
|
314
319
|
|