oddsgate-ds 1.0.102 → 1.0.103
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/components/organisms/CircularSlider/CircularSlider.component.d.ts +1 -1
- package/dist/cjs/types/components/organisms/CircularSlider/CircularSlider.interface.d.ts +1 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/organisms/CircularSlider/CircularSlider.component.d.ts +1 -1
- package/dist/esm/types/components/organisms/CircularSlider/CircularSlider.interface.d.ts +1 -0
- package/dist/types.d.ts +2 -1
- package/package.json +1 -1
- package/src/components/atoms/Button/Button.component.tsx +1 -1
- package/src/components/atoms/Button/Button.theme.ts +5 -1
- package/src/components/molecules/BlogCard/BlogCard.component.tsx +1 -1
- package/src/components/molecules/EventsCard/EventsCard.component.tsx +1 -1
- package/src/components/molecules/NewsCard/NewsCard.component.tsx +1 -1
- package/src/components/organisms/CircularSlider/CircularSlider.component.tsx +6 -4
- package/src/components/organisms/CircularSlider/CircularSlider.interface.ts +2 -1
- package/src/components/organisms/CircularSlider/CircularSlider.stories.tsx +3 -1
- package/src/components/organisms/CircularSlider/CircularSlider.theme.ts +19 -16
- package/src/styles/variables.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ICircularSlider } from './CircularSlider.interface';
|
|
3
|
-
declare const CircularSlider: ({ content, style, className, }: ICircularSlider) => React.JSX.Element;
|
|
3
|
+
declare const CircularSlider: ({ cta, content, style, className, }: ICircularSlider) => React.JSX.Element;
|
|
4
4
|
export default CircularSlider;
|
package/dist/types.d.ts
CHANGED
|
@@ -629,9 +629,10 @@ type ICircularSlider = {
|
|
|
629
629
|
role?: string;
|
|
630
630
|
img?: React.ReactNode;
|
|
631
631
|
}[];
|
|
632
|
+
cta?: React.ReactNode;
|
|
632
633
|
};
|
|
633
634
|
|
|
634
|
-
declare const CircularSlider: ({ content, style, className, }: ICircularSlider) => React__default.JSX.Element;
|
|
635
|
+
declare const CircularSlider: ({ cta, content, style, className, }: ICircularSlider) => React__default.JSX.Element;
|
|
635
636
|
|
|
636
637
|
declare const iconsList: string[];
|
|
637
638
|
|
package/package.json
CHANGED
|
@@ -37,7 +37,7 @@ export const StyledButton = styled.a<IButtonSC>`
|
|
|
37
37
|
case "primary": default:
|
|
38
38
|
return css`
|
|
39
39
|
${fontSize('h4')};
|
|
40
|
-
padding:
|
|
40
|
+
padding: 0.8rem 1.6rem;
|
|
41
41
|
border-radius: 50px;
|
|
42
42
|
text-transform:uppercase;
|
|
43
43
|
|
|
@@ -70,6 +70,10 @@ export const StyledButton = styled.a<IButtonSC>`
|
|
|
70
70
|
transform: scale(1) translateX(0) translateY(-50%);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
+
|
|
74
|
+
@media only screen and (max-width: ${responsiveMedia}) {
|
|
75
|
+
padding: 2rem 2.8rem;
|
|
76
|
+
}
|
|
73
77
|
`;
|
|
74
78
|
case "secondary":
|
|
75
79
|
return css`
|
|
@@ -23,7 +23,7 @@ const BlogCard = ({
|
|
|
23
23
|
variant={variant}
|
|
24
24
|
imageElement={
|
|
25
25
|
<>
|
|
26
|
-
{category && <Chip variant='light'>{category}</Chip>}
|
|
26
|
+
{category && <Chip variant='light' className='font-redhat'>{category}</Chip>}
|
|
27
27
|
<ImageWrapper aspectRatioHeight={63}>{imageElement}</ImageWrapper>
|
|
28
28
|
</>
|
|
29
29
|
}
|
|
@@ -23,7 +23,7 @@ const EventsCard = ({
|
|
|
23
23
|
<ImageWrapper aspectRatioHeight={100}>{imageElement}</ImageWrapper>
|
|
24
24
|
}
|
|
25
25
|
>
|
|
26
|
-
{category && <Chip variant='dark' className='mb-5'>{category}</Chip>}
|
|
26
|
+
{category && <Chip variant='dark' className='mb-5 font-redhat'>{category}</Chip>}
|
|
27
27
|
<Heading tag={'h3'} size={'h4'} className={'fw-bold textEllipsis'}>
|
|
28
28
|
{title}
|
|
29
29
|
</Heading>
|
|
@@ -21,7 +21,7 @@ const NewsCard = ({
|
|
|
21
21
|
$variant={variant}
|
|
22
22
|
imageElement={
|
|
23
23
|
<>
|
|
24
|
-
{category && <Chip variant='light'>{category}</Chip>}
|
|
24
|
+
{category && <Chip variant='light' className='font-redhat'>{category}</Chip>}
|
|
25
25
|
<ImageWrapper aspectRatioHeight={63}>{imageElement}</ImageWrapper>
|
|
26
26
|
</>
|
|
27
27
|
}
|
|
@@ -13,6 +13,7 @@ import { debounce } from '@/helpers/events';
|
|
|
13
13
|
import useMediaMatch from '@/helpers/useMediaMatch';
|
|
14
14
|
|
|
15
15
|
const CircularSlider = ({
|
|
16
|
+
cta,
|
|
16
17
|
content,
|
|
17
18
|
style,
|
|
18
19
|
className,
|
|
@@ -47,7 +48,7 @@ const CircularSlider = ({
|
|
|
47
48
|
|
|
48
49
|
let slidesSize = 0;
|
|
49
50
|
|
|
50
|
-
let currentAngle = -90;
|
|
51
|
+
let currentAngle = isMobile ? -180 : -90;
|
|
51
52
|
|
|
52
53
|
const stepAngle = 2 * Math.PI / slidesHolder?.current?.children.length;
|
|
53
54
|
// const stepAngle = 0.52;
|
|
@@ -71,13 +72,13 @@ const CircularSlider = ({
|
|
|
71
72
|
const slideSize = isMobile ? 0.12 : 0.15;
|
|
72
73
|
|
|
73
74
|
wrapper.current.style.width = 2 * radius + 'px';
|
|
74
|
-
wrapper.current.style.height =
|
|
75
|
+
wrapper.current.style.height = 2 * radius + 'px';
|
|
75
76
|
|
|
76
77
|
let r = 2 * radius * (1 - slideSize);
|
|
77
78
|
slidesHolder.current.style.width = slidesHolder.current.style.height = r + 'px';
|
|
78
79
|
slidesRepositioning(r / 2);
|
|
79
80
|
|
|
80
|
-
slidesHolder.current.style.marginTop = radius * slideSize + 'px';
|
|
81
|
+
slidesHolder.current.style.marginTop = (isMobile ? 0 : (radius * slideSize)) + 'px';
|
|
81
82
|
|
|
82
83
|
slidesSize = Math.min(2 * radius * slideSize, stepAngle * radius * (1 - slideSize) - 50);
|
|
83
84
|
|
|
@@ -172,10 +173,11 @@ const CircularSlider = ({
|
|
|
172
173
|
<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" />
|
|
173
174
|
</svg>
|
|
174
175
|
<StyledCircularSliderContent ref={contentHolder as any}>
|
|
175
|
-
<div>
|
|
176
|
+
<div className='mb-4'>
|
|
176
177
|
<Heading tag="span" size="h2" className='color-primary50 fw-bold'>{slideContent?.name}</Heading>
|
|
177
178
|
<Heading tag="span" size="h4" className='color-secondary50'>{slideContent?.role}</Heading>
|
|
178
179
|
</div>
|
|
180
|
+
{cta}
|
|
179
181
|
</StyledCircularSliderContent>
|
|
180
182
|
<StyledCircularSliderWrapper ref={wrapper as any}>
|
|
181
183
|
<StyledCircularSliderSlides ref={slidesHolder as any}>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
2
|
|
|
3
|
+
import Button from '@/components/atoms/Button/Button.component'
|
|
3
4
|
import CircularSlider from './CircularSlider.component'
|
|
4
5
|
import { ICircularSlider } from './CircularSlider.interface'
|
|
5
6
|
import React from 'react'
|
|
@@ -23,8 +24,9 @@ const image = (
|
|
|
23
24
|
)
|
|
24
25
|
|
|
25
26
|
export const Simple: StoryObj<ICircularSlider> = {
|
|
26
|
-
render: args => <CircularSlider {...args}></CircularSlider>,
|
|
27
|
+
render: args => <div style={{ width: "100%", height: "200dvh" }}><CircularSlider {...args}></CircularSlider></div>,
|
|
27
28
|
args: {
|
|
29
|
+
cta: <Button variant={'secondary'}>Join the Team</Button>,
|
|
28
30
|
content: [
|
|
29
31
|
{
|
|
30
32
|
name: 'My name 1',
|
|
@@ -5,6 +5,7 @@ import styled from 'styled-components';
|
|
|
5
5
|
export const StyledCircularSlider = styled.div<ICircularSlider>`
|
|
6
6
|
position: relative;
|
|
7
7
|
width: 100%;
|
|
8
|
+
height: 100%;
|
|
8
9
|
min-height: 100dvh;
|
|
9
10
|
overflow: hidden;
|
|
10
11
|
|
|
@@ -31,12 +32,11 @@ export const StyledCircularSliderWrapper = styled.div<ICircularSlider>`
|
|
|
31
32
|
justify-content: center;
|
|
32
33
|
margin: 0 auto;
|
|
33
34
|
margin-right: 0;
|
|
34
|
-
|
|
35
|
-
transform: translate(23%, -50%);
|
|
35
|
+
transform: translate(-30%, -80%);
|
|
36
36
|
|
|
37
37
|
@media only screen and (min-width: ${responsiveMedia}) {
|
|
38
|
+
top: 50%;
|
|
38
39
|
transform: translate(65%, -50%);
|
|
39
|
-
|
|
40
40
|
}
|
|
41
41
|
`;
|
|
42
42
|
|
|
@@ -47,7 +47,11 @@ export const StyledCircularSliderSlides = styled.div<ICircularSlider>`
|
|
|
47
47
|
align-items: center;
|
|
48
48
|
position: relative;
|
|
49
49
|
z-index: 100;
|
|
50
|
-
transform: rotate(-
|
|
50
|
+
transform: rotate(-180deg);
|
|
51
|
+
|
|
52
|
+
@media only screen and (min-width: ${responsiveMedia}) {
|
|
53
|
+
transform: rotate(-90deg);
|
|
54
|
+
}
|
|
51
55
|
`;
|
|
52
56
|
export const StyledCircularSliderSlide = styled.div<ICircularSlider>`
|
|
53
57
|
position: absolute;
|
|
@@ -71,28 +75,27 @@ export const StyledCircularSliderSlide = styled.div<ICircularSlider>`
|
|
|
71
75
|
export const StyledCircularSliderContent = styled.div<ICircularSlider>`
|
|
72
76
|
position: absolute;
|
|
73
77
|
top: 50%;
|
|
74
|
-
left:
|
|
78
|
+
left:50%;
|
|
75
79
|
|
|
76
80
|
width: 50%;
|
|
77
81
|
text-align: center;
|
|
78
82
|
|
|
79
|
-
|
|
80
|
-
transform: translate(0%, 5%);
|
|
81
|
-
transition: all 0.3s ease;
|
|
83
|
+
transform: translate(-50%, -50%);
|
|
82
84
|
|
|
85
|
+
&>div{
|
|
86
|
+
opacity: 0;
|
|
87
|
+
transform: translate(0%, 5%);
|
|
88
|
+
transition: all 0.3s ease;
|
|
89
|
+
}
|
|
83
90
|
&.active{
|
|
84
|
-
|
|
85
|
-
|
|
91
|
+
&>div{
|
|
92
|
+
opacity: 1;
|
|
93
|
+
transform: translate(0%, 0%);
|
|
94
|
+
}
|
|
86
95
|
}
|
|
87
96
|
|
|
88
97
|
@media only screen and (min-width: ${responsiveMedia}) {
|
|
89
|
-
left:50%;
|
|
90
98
|
width: 25%;
|
|
91
|
-
transform: translate(-50%, 5%);
|
|
92
|
-
|
|
93
|
-
&.active{
|
|
94
|
-
transform: translate(-50%, -50%);
|
|
95
|
-
}
|
|
96
99
|
}
|
|
97
100
|
`;
|
|
98
101
|
|