oddsgate-ds 1.0.2
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/. babelrc +3 -0
- package/.cache/storybook/default/dev-server/a5a8bf6e622aef57065c6498611f40c911543d7d-3920d97c51b8ad2521918fb1205babd22b0ed3d7 +1 -0
- package/.cache/storybook/default/dev-server/a5a8bf6e622aef57065c6498611f40c911543d7d-43fdebe5fc35e4e9fabee9a83c7faea931b05ea0 +1 -0
- package/.cache/storybook/default/dev-server/a5a8bf6e622aef57065c6498611f40c911543d7d-f086b87885981c04ce7a583ff90a49313de83de7 +1 -0
- package/.eslintrc.cjs +14 -0
- package/.storybook/main.ts +28 -0
- package/.storybook/preview.ts +22 -0
- package/README.md +30 -0
- package/package.json +63 -0
- package/public/assets/components/quotes.svg +3 -0
- package/public/assets/empty-state.svg +19 -0
- package/public/assets/placeholder.png +0 -0
- package/public/assets/video.mp4 +0 -0
- package/public/fonts/miewfont/miewfont.eot +0 -0
- package/public/fonts/miewfont/miewfont.svg +35 -0
- package/public/fonts/miewfont/miewfont.ttf +0 -0
- package/public/fonts/miewfont/miewfont.woff +0 -0
- package/src/components/atoms/Button/Button.component.tsx +48 -0
- package/src/components/atoms/Button/Button.interface.ts +29 -0
- package/src/components/atoms/Button/Button.stories.tsx +58 -0
- package/src/components/atoms/Button/Button.theme.ts +126 -0
- package/src/components/atoms/Button/index.ts +1 -0
- package/src/components/atoms/Chip/Chip.component.tsx +26 -0
- package/src/components/atoms/Chip/Chip.interface.ts +10 -0
- package/src/components/atoms/Chip/Chip.stories.tsx +34 -0
- package/src/components/atoms/Chip/Chip.theme.ts +47 -0
- package/src/components/atoms/Chip/index.ts +1 -0
- package/src/components/atoms/CloseButton/CloseButton.component.tsx +17 -0
- package/src/components/atoms/CloseButton/CloseButton.interface.ts +9 -0
- package/src/components/atoms/CloseButton/CloseButton.stories.tsx +24 -0
- package/src/components/atoms/CloseButton/CloseButton.theme.ts +66 -0
- package/src/components/atoms/CloseButton/index.ts +1 -0
- package/src/components/atoms/EmptyState/EmptyState.component.tsx +27 -0
- package/src/components/atoms/EmptyState/EmptyState.interface.ts +10 -0
- package/src/components/atoms/EmptyState/EmptyState.stories.tsx +34 -0
- package/src/components/atoms/EmptyState/EmptyState.theme.ts +27 -0
- package/src/components/atoms/EmptyState/index.ts +1 -0
- package/src/components/atoms/Flex/Flex.component.tsx +30 -0
- package/src/components/atoms/Flex/Flex.interface.ts +22 -0
- package/src/components/atoms/Flex/Flex.theme.ts +11 -0
- package/src/components/atoms/Flex/index.ts +1 -0
- package/src/components/atoms/FlexGrid/FlexGrid.component.tsx +61 -0
- package/src/components/atoms/FlexGrid/FlexGrid.interface.ts +55 -0
- package/src/components/atoms/FlexGrid/FlexGrid.stories.tsx +55 -0
- package/src/components/atoms/FlexGrid/FlexGrid.theme.ts +79 -0
- package/src/components/atoms/FlexGrid/index.ts +1 -0
- package/src/components/atoms/FormField/CheckRadioField/CheckRadioField.component.tsx +22 -0
- package/src/components/atoms/FormField/CheckRadioField/CheckRadioField.interface.tsx +6 -0
- package/src/components/atoms/FormField/CheckRadioField/CheckRadioField.theme.ts +126 -0
- package/src/components/atoms/FormField/CheckRadioField/index.ts +1 -0
- package/src/components/atoms/FormField/FormField.component.tsx +37 -0
- package/src/components/atoms/FormField/FormField.interface.ts +9 -0
- package/src/components/atoms/FormField/FormField.stories.tsx +499 -0
- package/src/components/atoms/FormField/FormField.theme.tsx +122 -0
- package/src/components/atoms/FormField/index.ts +1 -0
- package/src/components/atoms/Heading/Heading.component.tsx +17 -0
- package/src/components/atoms/Heading/Heading.interface.tsx +21 -0
- package/src/components/atoms/Heading/Heading.theme.ts +17 -0
- package/src/components/atoms/Heading/index.ts +1 -0
- package/src/components/atoms/Icon/Icon.component.tsx +19 -0
- package/src/components/atoms/Icon/Icon.interface.ts +8 -0
- package/src/components/atoms/Icon/Icon.stories.tsx +26 -0
- package/src/components/atoms/Icon/Icon.theme.ts +102 -0
- package/src/components/atoms/Icon/index.ts +1 -0
- package/src/components/atoms/ImageWrapper/ImageWrapper.component.tsx +42 -0
- package/src/components/atoms/ImageWrapper/ImageWrapper.interface.ts +16 -0
- package/src/components/atoms/ImageWrapper/ImageWrapper.stories.tsx +27 -0
- package/src/components/atoms/ImageWrapper/ImageWrapper.theme.ts +51 -0
- package/src/components/atoms/ImageWrapper/index.ts +1 -0
- package/src/components/atoms/Loader/Loader.component.tsx +26 -0
- package/src/components/atoms/Loader/Loader.interface.ts +10 -0
- package/src/components/atoms/Loader/Loader.stories.tsx +33 -0
- package/src/components/atoms/Loader/Loader.theme.ts +92 -0
- package/src/components/atoms/Loader/index.ts +1 -0
- package/src/components/atoms/Marquee/Marquee.component.tsx +130 -0
- package/src/components/atoms/Marquee/Marquee.interface.ts +8 -0
- package/src/components/atoms/Marquee/Marquee.stories.tsx +20 -0
- package/src/components/atoms/Marquee/Marquee.theme.ts +42 -0
- package/src/components/atoms/Marquee/index.ts +1 -0
- package/src/components/atoms/Quote/Quote.component.tsx +29 -0
- package/src/components/atoms/Quote/Quote.interface.ts +10 -0
- package/src/components/atoms/Quote/Quote.stories.tsx +25 -0
- package/src/components/atoms/Quote/Quote.theme.ts +26 -0
- package/src/components/atoms/Quote/index.ts +1 -0
- package/src/components/atoms/RichText/RichText.component.tsx +31 -0
- package/src/components/atoms/RichText/RichText.interface.ts +11 -0
- package/src/components/atoms/RichText/RichText.stories.tsx +73 -0
- package/src/components/atoms/RichText/RichText.theme.ts +32 -0
- package/src/components/atoms/RichText/index.ts +1 -0
- package/src/components/atoms/ScrollingNav/ScrollingNav.component.tsx +18 -0
- package/src/components/atoms/ScrollingNav/ScrollingNav.interface.ts +8 -0
- package/src/components/atoms/ScrollingNav/ScrollingNav.stories.tsx +44 -0
- package/src/components/atoms/ScrollingNav/ScrollingNav.theme.ts +55 -0
- package/src/components/atoms/ScrollingNav/index.ts +1 -0
- package/src/components/atoms/Separator/Separator.component.tsx +19 -0
- package/src/components/atoms/Separator/Separator.interface.tsx +9 -0
- package/src/components/atoms/Separator/Separator.stories.tsx +28 -0
- package/src/components/atoms/Separator/Separator.theme.ts +12 -0
- package/src/components/atoms/Separator/index.ts +1 -0
- package/src/components/atoms/SocialLinks/SocialLinks.component.tsx +35 -0
- package/src/components/atoms/SocialLinks/SocialLinks.interface.ts +8 -0
- package/src/components/atoms/SocialLinks/SocialLinks.stories.tsx +36 -0
- package/src/components/atoms/SocialLinks/SocialLinks.theme.ts +52 -0
- package/src/components/atoms/SocialLinks/index.ts +1 -0
- package/src/components/atoms/Spacer/Spacer.component.tsx +27 -0
- package/src/components/atoms/Spacer/Spacer.interface.ts +11 -0
- package/src/components/atoms/Spacer/Spacer.stories.tsx +28 -0
- package/src/components/atoms/Spacer/Spacer.theme.ts +8 -0
- package/src/components/atoms/Spacer/index.ts +1 -0
- package/src/components/atoms/Video/Video.component.tsx +116 -0
- package/src/components/atoms/Video/Video.interface.ts +13 -0
- package/src/components/atoms/Video/Video.stories.tsx +37 -0
- package/src/components/atoms/Video/Video.theme.ts +44 -0
- package/src/components/atoms/Video/index.ts +1 -0
- package/src/components/atoms/VideoEmbed/VideoEmbed.component.tsx +109 -0
- package/src/components/atoms/VideoEmbed/VideoEmbed.interface.ts +13 -0
- package/src/components/atoms/VideoEmbed/VideoEmbed.stories.tsx +23 -0
- package/src/components/atoms/VideoEmbed/VideoEmbed.theme.ts +45 -0
- package/src/components/atoms/VideoEmbed/index.ts +1 -0
- package/src/components/common/PortalComponent/PortalComponent.tsx +48 -0
- package/src/components/common/PortalComponent/index.ts +1 -0
- package/src/components/molecules/Accordion/Accordion.component.tsx +58 -0
- package/src/components/molecules/Accordion/Accordion.interface.ts +15 -0
- package/src/components/molecules/Accordion/Accordion.stories.tsx +100 -0
- package/src/components/molecules/Accordion/Accordion.theme.ts +66 -0
- package/src/components/molecules/Accordion/index.ts +1 -0
- package/src/components/molecules/BlogCard/BlogCard.component.tsx +48 -0
- package/src/components/molecules/BlogCard/BlogCard.interface.ts +10 -0
- package/src/components/molecules/BlogCard/BlogCard.stories.tsx +37 -0
- package/src/components/molecules/BlogCard/BlogCard.theme.ts +63 -0
- package/src/components/molecules/BlogCard/index.ts +1 -0
- package/src/components/molecules/Card/Card.component.tsx +15 -0
- package/src/components/molecules/Card/Card.interface.ts +10 -0
- package/src/components/molecules/Card/Card.theme.ts +53 -0
- package/src/components/molecules/Card/index.ts +1 -0
- package/src/components/molecules/Dropdown/Dropdown.component.tsx +67 -0
- package/src/components/molecules/Dropdown/Dropdown.interface.ts +26 -0
- package/src/components/molecules/Dropdown/Dropdown.stories.tsx +54 -0
- package/src/components/molecules/Dropdown/Dropdown.theme.ts +50 -0
- package/src/components/molecules/Dropdown/index.ts +1 -0
- package/src/components/molecules/IconBox/IconBox.component.tsx +29 -0
- package/src/components/molecules/IconBox/IconBox.interface.tsx +10 -0
- package/src/components/molecules/IconBox/IconBox.stories.tsx +23 -0
- package/src/components/molecules/IconBox/IconBox.theme.ts +25 -0
- package/src/components/molecules/IconBox/index.ts +1 -0
- package/src/components/molecules/IconTitle/IconTitle.component.tsx +24 -0
- package/src/components/molecules/IconTitle/IconTitle.interface.tsx +10 -0
- package/src/components/molecules/IconTitle/IconTitle.stories.tsx +49 -0
- package/src/components/molecules/IconTitle/IconTitle.theme.ts +10 -0
- package/src/components/molecules/IconTitle/index.ts +1 -0
- package/src/components/molecules/Modal/Modal.component.tsx +70 -0
- package/src/components/molecules/Modal/Modal.interface.ts +11 -0
- package/src/components/molecules/Modal/Modal.stories.tsx +57 -0
- package/src/components/molecules/Modal/Modal.theme.ts +55 -0
- package/src/components/molecules/Modal/index.ts +1 -0
- package/src/components/molecules/OffCanvas/OffCanvas.component.tsx +55 -0
- package/src/components/molecules/OffCanvas/OffCanvas.interface.ts +12 -0
- package/src/components/molecules/OffCanvas/OffCanvas.stories.tsx +55 -0
- package/src/components/molecules/OffCanvas/OffCanvas.theme.ts +50 -0
- package/src/components/molecules/OffCanvas/index.ts +1 -0
- package/src/components/molecules/ProjectCard/ProjectCard.component.tsx +45 -0
- package/src/components/molecules/ProjectCard/ProjectCard.interface.ts +8 -0
- package/src/components/molecules/ProjectCard/ProjectCard.stories.tsx +72 -0
- package/src/components/molecules/ProjectCard/ProjectCard.theme.ts +61 -0
- package/src/components/molecules/ProjectCard/index.ts +1 -0
- package/src/components/molecules/ShareModal/ShareModal.component.tsx +166 -0
- package/src/components/molecules/ShareModal/ShareModal.interface.ts +9 -0
- package/src/components/molecules/ShareModal/ShareModal.stories.tsx +33 -0
- package/src/components/molecules/ShareModal/ShareModal.theme.ts +101 -0
- package/src/components/molecules/ShareModal/index.ts +1 -0
- package/src/components/molecules/TeamCard/TeamCard.component.tsx +31 -0
- package/src/components/molecules/TeamCard/TeamCard.interface.ts +7 -0
- package/src/components/molecules/TeamCard/TeamCard.stories.tsx +33 -0
- package/src/components/molecules/TeamCard/TeamCard.theme.ts +12 -0
- package/src/components/molecules/TeamCard/index.ts +1 -0
- package/src/components/organisms/Cover/Cover.component.tsx +46 -0
- package/src/components/organisms/Cover/Cover.interface.ts +14 -0
- package/src/components/organisms/Cover/Cover.stories.tsx +97 -0
- package/src/components/organisms/Cover/Cover.theme.ts +49 -0
- package/src/components/organisms/Cover/index.ts +1 -0
- package/src/components/organisms/Slider/Slider.component.tsx +145 -0
- package/src/components/organisms/Slider/Slider.interface.ts +17 -0
- package/src/components/organisms/Slider/Slider.stories.tsx +73 -0
- package/src/components/organisms/Slider/Slider.theme.ts +125 -0
- package/src/components/organisms/Slider/Slider.utils.tsx +19 -0
- package/src/components/organisms/Slider/index.ts +1 -0
- package/src/helpers/clickOutsideToClose.tsx +17 -0
- package/src/helpers/getIcons.ts +5 -0
- package/src/helpers/useMediaQuery.tsx +24 -0
- package/src/helpers/uuid.ts +5 -0
- package/src/iconsList.json +1 -0
- package/src/index.ts +53 -0
- package/src/reportWebVitals.js +13 -0
- package/src/stories/Documentation/Colors.stories.tsx +33 -0
- package/src/stories/Documentation/Headings.stories.tsx +24 -0
- package/src/stories/Documentation/Icons.stories.tsx +73 -0
- package/src/stories/Documentation/JWT.stories.tsx +60 -0
- package/src/stories/Documentation/Utilities.stories.tsx +65 -0
- package/src/styles/Global.ts +296 -0
- package/src/styles/grid.ts +70 -0
- package/src/styles/reset.ts +47 -0
- package/src/styles/utilities.ts +326 -0
- package/src/styles/variables.ts +168 -0
- package/tsconfig.json +29 -0
- package/tsconfig.node.json +11 -0
- package/vite.config.ts +87 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import Heading from '../Heading/Heading.component'
|
|
2
|
+
import { IMarquee } from './Marquee.interface'
|
|
3
|
+
import React from 'react'
|
|
4
|
+
import { StyledMarquee } from './Marquee.theme'
|
|
5
|
+
import cn from 'classnames'
|
|
6
|
+
import styled from 'styled-components'
|
|
7
|
+
|
|
8
|
+
const Marquee = ({ text, className, onClick, ...props }: IMarquee) => {
|
|
9
|
+
return (
|
|
10
|
+
<Div3>
|
|
11
|
+
<Img
|
|
12
|
+
loading="lazy"
|
|
13
|
+
srcSet="..."
|
|
14
|
+
/>
|
|
15
|
+
<Div4>
|
|
16
|
+
<Div5>
|
|
17
|
+
<Div6>
|
|
18
|
+
Transports
|
|
19
|
+
<br />& Infrastructers{" "}
|
|
20
|
+
</Div6>
|
|
21
|
+
<Div7>
|
|
22
|
+
<Img2
|
|
23
|
+
loading="lazy"
|
|
24
|
+
srcSet="..."
|
|
25
|
+
/>
|
|
26
|
+
</Div7>
|
|
27
|
+
</Div5>
|
|
28
|
+
</Div4>
|
|
29
|
+
</Div3>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const Div = styled.div`
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
const Div2 = styled.div`
|
|
39
|
+
align-items: flex-start;
|
|
40
|
+
align-self: end;
|
|
41
|
+
display: flex;
|
|
42
|
+
margin-top: 100px;
|
|
43
|
+
width: 417px;
|
|
44
|
+
max-width: 100%;
|
|
45
|
+
flex-grow: 1;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
const Div3 = styled.div`
|
|
50
|
+
disply: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
border-radius: 10px;
|
|
53
|
+
align-self: stretch;
|
|
54
|
+
position: relative;
|
|
55
|
+
display: flex;
|
|
56
|
+
aspect-ratio: 1.2337278106508875;
|
|
57
|
+
flex-grow: 1;
|
|
58
|
+
padding-top: 8px;
|
|
59
|
+
padding-right: 17px;
|
|
60
|
+
padding-bottom: 16px;
|
|
61
|
+
padding-left: 16px;
|
|
62
|
+
`;
|
|
63
|
+
|
|
64
|
+
const Img = styled.img`
|
|
65
|
+
position: absolute;
|
|
66
|
+
height: 100%;
|
|
67
|
+
width: 100%;
|
|
68
|
+
object-fit: cover;
|
|
69
|
+
object-position: center;
|
|
70
|
+
`;
|
|
71
|
+
|
|
72
|
+
const Div4 = styled.div`
|
|
73
|
+
position: relative;
|
|
74
|
+
justify-content: flex-end;
|
|
75
|
+
align-items: flex-end;
|
|
76
|
+
border-bottom: 1px solid var(--White, #fff);
|
|
77
|
+
align-self: stretch;
|
|
78
|
+
display: flex;
|
|
79
|
+
padding-top: 40px;
|
|
80
|
+
padding-bottom: 24px;
|
|
81
|
+
flex-direction: column;
|
|
82
|
+
`;
|
|
83
|
+
|
|
84
|
+
const Div5 = styled.div`
|
|
85
|
+
align-self: stretch;
|
|
86
|
+
display: flex;
|
|
87
|
+
margin-top: 192px;
|
|
88
|
+
align-items: flex-start;
|
|
89
|
+
justify-content: space-between;
|
|
90
|
+
gap: 20px;
|
|
91
|
+
`;
|
|
92
|
+
|
|
93
|
+
const Div6 = styled.div`
|
|
94
|
+
align-self: start;
|
|
95
|
+
color: #fff;
|
|
96
|
+
font-feature-settings: "clig" off, "liga" off;
|
|
97
|
+
font-family: Noto Sans, sans-serif;
|
|
98
|
+
font-size: 24px;
|
|
99
|
+
font-weight: 300;
|
|
100
|
+
line-height: 120%;
|
|
101
|
+
max-width: 324px;
|
|
102
|
+
flex-grow: 1;
|
|
103
|
+
flex-basis: auto;
|
|
104
|
+
`;
|
|
105
|
+
|
|
106
|
+
const Div7 = styled.div`
|
|
107
|
+
justify-content: center;
|
|
108
|
+
align-items: center;
|
|
109
|
+
border-radius: 100px;
|
|
110
|
+
background-color: var(--Soft-Green, #f2f1ef);
|
|
111
|
+
align-self: start;
|
|
112
|
+
display: flex;
|
|
113
|
+
margin-top: 18px;
|
|
114
|
+
width: 40px;
|
|
115
|
+
max-width: 100%;
|
|
116
|
+
padding-top: 3px;
|
|
117
|
+
padding-right: 3px;
|
|
118
|
+
padding-bottom: 3px;
|
|
119
|
+
padding-left: 3px;
|
|
120
|
+
flex-direction: column;
|
|
121
|
+
`;
|
|
122
|
+
|
|
123
|
+
const Img2 = styled.img`
|
|
124
|
+
aspect-ratio: 1;
|
|
125
|
+
object-fit: cover;
|
|
126
|
+
object-position: center;
|
|
127
|
+
width: 34px;
|
|
128
|
+
`;
|
|
129
|
+
|
|
130
|
+
export default Marquee
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import { IMarquee } from './Marquee.interface'
|
|
4
|
+
import Marquee from './Marquee.component'
|
|
5
|
+
import React from 'react'
|
|
6
|
+
|
|
7
|
+
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Components/Marquee',
|
|
10
|
+
component: Marquee,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
argTypes: {}
|
|
13
|
+
} as Meta
|
|
14
|
+
|
|
15
|
+
export const Simple: StoryObj<IMarquee> = {
|
|
16
|
+
render: args => <Marquee {...args} />,
|
|
17
|
+
args: {
|
|
18
|
+
text: 'People • Sustainability • Efficiency • Innovation'
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { colors, radius } from '@/styles/variables';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { IMarquee } from './Marquee.interface';
|
|
5
|
+
|
|
6
|
+
export const StyledMarquee = styled.div<IMarquee>`
|
|
7
|
+
position: relative;
|
|
8
|
+
top: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
width: 100%;
|
|
11
|
+
contain: paint;
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
|
|
14
|
+
--offset: 20vw;
|
|
15
|
+
--move-initial: calc(-25% + var(--offset));
|
|
16
|
+
--move-final: calc(-50% + var(--offset));
|
|
17
|
+
|
|
18
|
+
color: ${colors.white};
|
|
19
|
+
background-color: ${colors.primary70};
|
|
20
|
+
border-radius: ${radius.md};
|
|
21
|
+
|
|
22
|
+
padding: 8px 0;
|
|
23
|
+
|
|
24
|
+
& > div{
|
|
25
|
+
position: relative;
|
|
26
|
+
display: flex;
|
|
27
|
+
width: fit-content;
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
transform: translate3d(var(--move-initial), 0, 0);
|
|
30
|
+
animation: marquee 5s linear infinite;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@keyframes marquee {
|
|
34
|
+
0% {
|
|
35
|
+
transform: translate3d(var(--move-initial), 0, 0);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
100% {
|
|
39
|
+
transform: translate3d(var(--move-final), 0, 0);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Marquee.component'
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import RichText from '../RichText';
|
|
4
|
+
import { IQuote } from './Quote.interface';
|
|
5
|
+
import { StyledQuote } from './Quote.theme';
|
|
6
|
+
|
|
7
|
+
const Quote = ({
|
|
8
|
+
id,
|
|
9
|
+
value,
|
|
10
|
+
citation,
|
|
11
|
+
className,
|
|
12
|
+
children,
|
|
13
|
+
...props
|
|
14
|
+
}: IQuote) => {
|
|
15
|
+
return (
|
|
16
|
+
<StyledQuote id={id} {...props}>
|
|
17
|
+
<blockquote>
|
|
18
|
+
<RichText tag="div">{value}</RichText>
|
|
19
|
+
</blockquote>
|
|
20
|
+
{!!citation && (
|
|
21
|
+
<figcaption>
|
|
22
|
+
~ <RichText tag="span">{citation}</RichText>
|
|
23
|
+
</figcaption>
|
|
24
|
+
)}
|
|
25
|
+
</StyledQuote>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default Quote
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import { IQuote } from './Quote.interface'
|
|
4
|
+
import Quote from './Quote.component'
|
|
5
|
+
import React from 'react'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Components/Quote',
|
|
9
|
+
component: Quote,
|
|
10
|
+
tags: ['autodocs']
|
|
11
|
+
} as Meta
|
|
12
|
+
|
|
13
|
+
export const Simple: StoryObj<IQuote> = {
|
|
14
|
+
render: args => <Quote {...args} />,
|
|
15
|
+
args: {
|
|
16
|
+
value:
|
|
17
|
+
'"There are seasons in every country when noise and impudence pass current for worth; and in popular commotions especially, the clamors of interested and factious men are often mistaken for patriotism."'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export const WithCitation: StoryObj<IQuote> = {
|
|
21
|
+
args: {
|
|
22
|
+
...Simple.args,
|
|
23
|
+
citation: 'Jeffery Smith, 28'
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { colors, spaces, typography } from '@/styles/variables';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { IQuote } from './Quote.interface';
|
|
5
|
+
import { fontSize } from '@/styles/utilities';
|
|
6
|
+
|
|
7
|
+
export const StyledQuote = styled.div<IQuote>`
|
|
8
|
+
color: currentColor;
|
|
9
|
+
margin-bottom: ${spaces[2]};
|
|
10
|
+
padding: 0 ${spaces[4]};
|
|
11
|
+
${fontSize('texts')};
|
|
12
|
+
border-left: 2px solid ${colors.gray50};
|
|
13
|
+
|
|
14
|
+
& blockquote {
|
|
15
|
+
margin-left: 0;
|
|
16
|
+
margin-bottom: ${spaces[2]};
|
|
17
|
+
|
|
18
|
+
& p {
|
|
19
|
+
margin-bottom: 0;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
& figcaption {
|
|
24
|
+
font-weight: bold
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Quote.component";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { IRichText } from './RichText.interface';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { StyledRichText } from './RichText.theme';
|
|
4
|
+
import { typographyTags } from '../Heading/Heading.interface';
|
|
5
|
+
import xss from 'xss';
|
|
6
|
+
|
|
7
|
+
const RichText = ({
|
|
8
|
+
id,
|
|
9
|
+
tag = 'div',
|
|
10
|
+
attributes,
|
|
11
|
+
className,
|
|
12
|
+
style,
|
|
13
|
+
children,
|
|
14
|
+
...props
|
|
15
|
+
}: IRichText) => {
|
|
16
|
+
return (
|
|
17
|
+
<StyledRichText
|
|
18
|
+
id={id}
|
|
19
|
+
as={typographyTags[tag]}
|
|
20
|
+
className={className}
|
|
21
|
+
style={style}
|
|
22
|
+
dangerouslySetInnerHTML={{
|
|
23
|
+
__html: xss(children, {
|
|
24
|
+
stripIgnoreTagBody: ['script']
|
|
25
|
+
})
|
|
26
|
+
}}
|
|
27
|
+
/>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default RichText
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { typographyTags } from '../Heading/Heading.interface';
|
|
3
|
+
|
|
4
|
+
export type IRichText = {
|
|
5
|
+
id?: string;
|
|
6
|
+
tag?: keyof typeof typographyTags;
|
|
7
|
+
attributes?: object;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
children?: any;
|
|
11
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import { IRichText } from './RichText.interface'
|
|
4
|
+
import React from 'react'
|
|
5
|
+
import RichText from '@/components/atoms/RichText'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Components/RichText',
|
|
9
|
+
component: RichText,
|
|
10
|
+
tags: ['autodocs']
|
|
11
|
+
} as Meta
|
|
12
|
+
|
|
13
|
+
export const Simple: StoryObj<IRichText> = {
|
|
14
|
+
render: args => (
|
|
15
|
+
<RichText {...args}>
|
|
16
|
+
{`Example mixed content <strong>with bold text</strong> and <a href="https://example.com">linked content</a>.`}
|
|
17
|
+
</RichText>
|
|
18
|
+
),
|
|
19
|
+
args: {
|
|
20
|
+
tag: 'p'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const List: StoryObj<IRichText> = {
|
|
25
|
+
render: args => (
|
|
26
|
+
<RichText {...args}>
|
|
27
|
+
{`<h1>H1</h1>
|
|
28
|
+
<h2>H2</h2>
|
|
29
|
+
<h3>H3</h3>
|
|
30
|
+
<h3>H3</h3>
|
|
31
|
+
<h4>H4</h4>
|
|
32
|
+
<h5>H5</h5>
|
|
33
|
+
<h6>H6</h6>
|
|
34
|
+
<p>Paragraph tag <strong>with</strong> <a href="https://example.com">linked content</a>.</p>
|
|
35
|
+
<ul>
|
|
36
|
+
<li>UL List item 1</li>
|
|
37
|
+
<li>UL List item 2
|
|
38
|
+
<ul>
|
|
39
|
+
<li>UL List item 1</li>
|
|
40
|
+
<li>UL List item 2</li>
|
|
41
|
+
<li>UL List item 3</li>
|
|
42
|
+
</ul>
|
|
43
|
+
</li>
|
|
44
|
+
<li>UL List item 3</li>
|
|
45
|
+
</ul>
|
|
46
|
+
<ol>
|
|
47
|
+
<li>OL List item 1</li>
|
|
48
|
+
<li>OL List item 2
|
|
49
|
+
<ol>
|
|
50
|
+
<li>OL List item 1</li>
|
|
51
|
+
<li>OL List item 2</li>
|
|
52
|
+
<li>OL List item 3</li>
|
|
53
|
+
</ol>
|
|
54
|
+
</li>
|
|
55
|
+
<li>OL List item 3</li>
|
|
56
|
+
</ol>`}
|
|
57
|
+
</RichText>
|
|
58
|
+
),
|
|
59
|
+
args: {
|
|
60
|
+
tag: 'div'
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export const Heading: StoryObj<IRichText> = {
|
|
65
|
+
render: args => (
|
|
66
|
+
<RichText {...args}>
|
|
67
|
+
{`This heading has <strong>Bold Content</strong> and <i>Italics</i>`}
|
|
68
|
+
</RichText>
|
|
69
|
+
),
|
|
70
|
+
args: {
|
|
71
|
+
tag: 'h2'
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { colors, spaces, typography } from '@/styles/variables';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
|
|
4
|
+
import { IRichText } from './RichText.interface';
|
|
5
|
+
import { fontSize } from '@/styles/utilities';
|
|
6
|
+
|
|
7
|
+
export const StyledRichText = styled.div<IRichText>`
|
|
8
|
+
& p {
|
|
9
|
+
margin: 0;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
ol, ul {
|
|
13
|
+
padding-left: 16px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
& ol{
|
|
17
|
+
list-style: decimal;
|
|
18
|
+
}
|
|
19
|
+
& ul{
|
|
20
|
+
list-style: disc;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.dropCap{
|
|
24
|
+
&::first-letter {
|
|
25
|
+
float: left;
|
|
26
|
+
margin-right: ${spaces[4]};
|
|
27
|
+
${fontSize('h2')};
|
|
28
|
+
font-weight: bold;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./RichText.component";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IScrollingNav } from './ScrollingNav.interface'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { StyledScrollingNav } from '@/components/atoms/ScrollingNav/ScrollingNav.theme'
|
|
4
|
+
|
|
5
|
+
const ScrollingNav = ({
|
|
6
|
+
align,
|
|
7
|
+
children,
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}: IScrollingNav) => {
|
|
11
|
+
return (
|
|
12
|
+
<StyledScrollingNav align={align} className={className} {...props}>
|
|
13
|
+
{children}
|
|
14
|
+
</StyledScrollingNav>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default ScrollingNav
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import Chip from '@/components/atoms/Chip'
|
|
4
|
+
import { IScrollingNav } from './ScrollingNav.interface'
|
|
5
|
+
import React from 'react'
|
|
6
|
+
import ScrollingNav from './ScrollingNav.component'
|
|
7
|
+
|
|
8
|
+
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
9
|
+
export default {
|
|
10
|
+
title: 'Components/ScrollingNav',
|
|
11
|
+
component: ScrollingNav,
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
// More on argTypes: https://storybook.js.org/docs/react/api/argtypes
|
|
14
|
+
argTypes: {}
|
|
15
|
+
} as Meta
|
|
16
|
+
|
|
17
|
+
export const Simple: StoryObj<IScrollingNav> = {
|
|
18
|
+
render: args => (
|
|
19
|
+
<ScrollingNav {...args}>
|
|
20
|
+
<Chip variant={'light'} hover={true}>
|
|
21
|
+
Item 1
|
|
22
|
+
</Chip>
|
|
23
|
+
<Chip variant={'light'} hover={true}>
|
|
24
|
+
Item 2
|
|
25
|
+
</Chip>
|
|
26
|
+
<Chip variant={'light'} hover={true}>
|
|
27
|
+
Item 3
|
|
28
|
+
</Chip>
|
|
29
|
+
<Chip variant={'light'} hover={true}>
|
|
30
|
+
Item 4
|
|
31
|
+
</Chip>
|
|
32
|
+
<Chip variant={'light'} hover={true}>
|
|
33
|
+
Item 5
|
|
34
|
+
</Chip>
|
|
35
|
+
<Chip variant={'light'} hover={true}>
|
|
36
|
+
Item 6
|
|
37
|
+
</Chip>
|
|
38
|
+
<Chip variant={'light'} hover={true}>
|
|
39
|
+
Item 7
|
|
40
|
+
</Chip>
|
|
41
|
+
</ScrollingNav>
|
|
42
|
+
),
|
|
43
|
+
args: {}
|
|
44
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
import { IScrollingNav } from './ScrollingNav.interface';
|
|
4
|
+
import { colors } from '@/styles/variables';
|
|
5
|
+
|
|
6
|
+
export const StyledScrollingNav = styled.div<IScrollingNav>`
|
|
7
|
+
position: relative;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
gap: 1rem;
|
|
12
|
+
padding-bottom: 12px;
|
|
13
|
+
|
|
14
|
+
-webkit-overflow-scrolling: touch;
|
|
15
|
+
overflow-x: auto;
|
|
16
|
+
overflow-y: visible;
|
|
17
|
+
text-align: center;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
|
|
20
|
+
-webkit-backface-visibility: hidden;
|
|
21
|
+
backface-visibility: hidden;
|
|
22
|
+
|
|
23
|
+
-ms-overflow-style: auto;
|
|
24
|
+
|
|
25
|
+
& > div {
|
|
26
|
+
&:first-child {
|
|
27
|
+
margin-left: auto !important;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:last-child {
|
|
31
|
+
margin-right: auto !important;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
${(props) => {
|
|
36
|
+
switch (props.align) {
|
|
37
|
+
case "left":
|
|
38
|
+
return css`
|
|
39
|
+
& > div {
|
|
40
|
+
&:first-child {
|
|
41
|
+
margin-left: 0 !important;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
45
|
+
case "right":
|
|
46
|
+
return css`
|
|
47
|
+
& > div {
|
|
48
|
+
&:last-child {
|
|
49
|
+
margin-right: 0 !important;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
}
|
|
54
|
+
}}
|
|
55
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ScrollingNav.component'
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { ISeparator } from './Separator.interface';
|
|
4
|
+
import { StyledSeparator } from './Separator.theme';
|
|
5
|
+
|
|
6
|
+
const Separator = ({ color, margin, height, ...props }: ISeparator) => {
|
|
7
|
+
return (
|
|
8
|
+
<StyledSeparator
|
|
9
|
+
style={{
|
|
10
|
+
backgroundColor: color ? color : ``,
|
|
11
|
+
height: height,
|
|
12
|
+
margin: margin ? margin : ''
|
|
13
|
+
}}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default Separator
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import { ISeparator } from '../Separator/Separator.interface'
|
|
4
|
+
import React from 'react'
|
|
5
|
+
import Separator from '../Separator/Separator.component'
|
|
6
|
+
|
|
7
|
+
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
|
|
8
|
+
export default {
|
|
9
|
+
title: 'Components/Separator',
|
|
10
|
+
component: Separator,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
// argTypes: {
|
|
13
|
+
// height: {
|
|
14
|
+
// control: 'text'
|
|
15
|
+
// },
|
|
16
|
+
// color: {
|
|
17
|
+
// control: 'colorpicker'
|
|
18
|
+
// }
|
|
19
|
+
// }
|
|
20
|
+
} as Meta
|
|
21
|
+
|
|
22
|
+
export const Simple: StoryObj<ISeparator> = {
|
|
23
|
+
render: args => <Separator {...args} />,
|
|
24
|
+
args: {
|
|
25
|
+
height: '5px',
|
|
26
|
+
color: '#000'
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
|
|
3
|
+
import { ISeparator } from './Separator.interface';
|
|
4
|
+
|
|
5
|
+
export const StyledSeparator = styled.div<ISeparator>`
|
|
6
|
+
display: block;
|
|
7
|
+
border: none;
|
|
8
|
+
width: 100%;
|
|
9
|
+
|
|
10
|
+
margin: ${props => props.margin ? `var(--space-${props.margin}) 0` : ""};
|
|
11
|
+
`;
|
|
12
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from "./Separator.component";
|