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.
Files changed (206) hide show
  1. package/. babelrc +3 -0
  2. package/.cache/storybook/default/dev-server/a5a8bf6e622aef57065c6498611f40c911543d7d-3920d97c51b8ad2521918fb1205babd22b0ed3d7 +1 -0
  3. package/.cache/storybook/default/dev-server/a5a8bf6e622aef57065c6498611f40c911543d7d-43fdebe5fc35e4e9fabee9a83c7faea931b05ea0 +1 -0
  4. package/.cache/storybook/default/dev-server/a5a8bf6e622aef57065c6498611f40c911543d7d-f086b87885981c04ce7a583ff90a49313de83de7 +1 -0
  5. package/.eslintrc.cjs +14 -0
  6. package/.storybook/main.ts +28 -0
  7. package/.storybook/preview.ts +22 -0
  8. package/README.md +30 -0
  9. package/package.json +63 -0
  10. package/public/assets/components/quotes.svg +3 -0
  11. package/public/assets/empty-state.svg +19 -0
  12. package/public/assets/placeholder.png +0 -0
  13. package/public/assets/video.mp4 +0 -0
  14. package/public/fonts/miewfont/miewfont.eot +0 -0
  15. package/public/fonts/miewfont/miewfont.svg +35 -0
  16. package/public/fonts/miewfont/miewfont.ttf +0 -0
  17. package/public/fonts/miewfont/miewfont.woff +0 -0
  18. package/src/components/atoms/Button/Button.component.tsx +48 -0
  19. package/src/components/atoms/Button/Button.interface.ts +29 -0
  20. package/src/components/atoms/Button/Button.stories.tsx +58 -0
  21. package/src/components/atoms/Button/Button.theme.ts +126 -0
  22. package/src/components/atoms/Button/index.ts +1 -0
  23. package/src/components/atoms/Chip/Chip.component.tsx +26 -0
  24. package/src/components/atoms/Chip/Chip.interface.ts +10 -0
  25. package/src/components/atoms/Chip/Chip.stories.tsx +34 -0
  26. package/src/components/atoms/Chip/Chip.theme.ts +47 -0
  27. package/src/components/atoms/Chip/index.ts +1 -0
  28. package/src/components/atoms/CloseButton/CloseButton.component.tsx +17 -0
  29. package/src/components/atoms/CloseButton/CloseButton.interface.ts +9 -0
  30. package/src/components/atoms/CloseButton/CloseButton.stories.tsx +24 -0
  31. package/src/components/atoms/CloseButton/CloseButton.theme.ts +66 -0
  32. package/src/components/atoms/CloseButton/index.ts +1 -0
  33. package/src/components/atoms/EmptyState/EmptyState.component.tsx +27 -0
  34. package/src/components/atoms/EmptyState/EmptyState.interface.ts +10 -0
  35. package/src/components/atoms/EmptyState/EmptyState.stories.tsx +34 -0
  36. package/src/components/atoms/EmptyState/EmptyState.theme.ts +27 -0
  37. package/src/components/atoms/EmptyState/index.ts +1 -0
  38. package/src/components/atoms/Flex/Flex.component.tsx +30 -0
  39. package/src/components/atoms/Flex/Flex.interface.ts +22 -0
  40. package/src/components/atoms/Flex/Flex.theme.ts +11 -0
  41. package/src/components/atoms/Flex/index.ts +1 -0
  42. package/src/components/atoms/FlexGrid/FlexGrid.component.tsx +61 -0
  43. package/src/components/atoms/FlexGrid/FlexGrid.interface.ts +55 -0
  44. package/src/components/atoms/FlexGrid/FlexGrid.stories.tsx +55 -0
  45. package/src/components/atoms/FlexGrid/FlexGrid.theme.ts +79 -0
  46. package/src/components/atoms/FlexGrid/index.ts +1 -0
  47. package/src/components/atoms/FormField/CheckRadioField/CheckRadioField.component.tsx +22 -0
  48. package/src/components/atoms/FormField/CheckRadioField/CheckRadioField.interface.tsx +6 -0
  49. package/src/components/atoms/FormField/CheckRadioField/CheckRadioField.theme.ts +126 -0
  50. package/src/components/atoms/FormField/CheckRadioField/index.ts +1 -0
  51. package/src/components/atoms/FormField/FormField.component.tsx +37 -0
  52. package/src/components/atoms/FormField/FormField.interface.ts +9 -0
  53. package/src/components/atoms/FormField/FormField.stories.tsx +499 -0
  54. package/src/components/atoms/FormField/FormField.theme.tsx +122 -0
  55. package/src/components/atoms/FormField/index.ts +1 -0
  56. package/src/components/atoms/Heading/Heading.component.tsx +17 -0
  57. package/src/components/atoms/Heading/Heading.interface.tsx +21 -0
  58. package/src/components/atoms/Heading/Heading.theme.ts +17 -0
  59. package/src/components/atoms/Heading/index.ts +1 -0
  60. package/src/components/atoms/Icon/Icon.component.tsx +19 -0
  61. package/src/components/atoms/Icon/Icon.interface.ts +8 -0
  62. package/src/components/atoms/Icon/Icon.stories.tsx +26 -0
  63. package/src/components/atoms/Icon/Icon.theme.ts +102 -0
  64. package/src/components/atoms/Icon/index.ts +1 -0
  65. package/src/components/atoms/ImageWrapper/ImageWrapper.component.tsx +42 -0
  66. package/src/components/atoms/ImageWrapper/ImageWrapper.interface.ts +16 -0
  67. package/src/components/atoms/ImageWrapper/ImageWrapper.stories.tsx +27 -0
  68. package/src/components/atoms/ImageWrapper/ImageWrapper.theme.ts +51 -0
  69. package/src/components/atoms/ImageWrapper/index.ts +1 -0
  70. package/src/components/atoms/Loader/Loader.component.tsx +26 -0
  71. package/src/components/atoms/Loader/Loader.interface.ts +10 -0
  72. package/src/components/atoms/Loader/Loader.stories.tsx +33 -0
  73. package/src/components/atoms/Loader/Loader.theme.ts +92 -0
  74. package/src/components/atoms/Loader/index.ts +1 -0
  75. package/src/components/atoms/Marquee/Marquee.component.tsx +130 -0
  76. package/src/components/atoms/Marquee/Marquee.interface.ts +8 -0
  77. package/src/components/atoms/Marquee/Marquee.stories.tsx +20 -0
  78. package/src/components/atoms/Marquee/Marquee.theme.ts +42 -0
  79. package/src/components/atoms/Marquee/index.ts +1 -0
  80. package/src/components/atoms/Quote/Quote.component.tsx +29 -0
  81. package/src/components/atoms/Quote/Quote.interface.ts +10 -0
  82. package/src/components/atoms/Quote/Quote.stories.tsx +25 -0
  83. package/src/components/atoms/Quote/Quote.theme.ts +26 -0
  84. package/src/components/atoms/Quote/index.ts +1 -0
  85. package/src/components/atoms/RichText/RichText.component.tsx +31 -0
  86. package/src/components/atoms/RichText/RichText.interface.ts +11 -0
  87. package/src/components/atoms/RichText/RichText.stories.tsx +73 -0
  88. package/src/components/atoms/RichText/RichText.theme.ts +32 -0
  89. package/src/components/atoms/RichText/index.ts +1 -0
  90. package/src/components/atoms/ScrollingNav/ScrollingNav.component.tsx +18 -0
  91. package/src/components/atoms/ScrollingNav/ScrollingNav.interface.ts +8 -0
  92. package/src/components/atoms/ScrollingNav/ScrollingNav.stories.tsx +44 -0
  93. package/src/components/atoms/ScrollingNav/ScrollingNav.theme.ts +55 -0
  94. package/src/components/atoms/ScrollingNav/index.ts +1 -0
  95. package/src/components/atoms/Separator/Separator.component.tsx +19 -0
  96. package/src/components/atoms/Separator/Separator.interface.tsx +9 -0
  97. package/src/components/atoms/Separator/Separator.stories.tsx +28 -0
  98. package/src/components/atoms/Separator/Separator.theme.ts +12 -0
  99. package/src/components/atoms/Separator/index.ts +1 -0
  100. package/src/components/atoms/SocialLinks/SocialLinks.component.tsx +35 -0
  101. package/src/components/atoms/SocialLinks/SocialLinks.interface.ts +8 -0
  102. package/src/components/atoms/SocialLinks/SocialLinks.stories.tsx +36 -0
  103. package/src/components/atoms/SocialLinks/SocialLinks.theme.ts +52 -0
  104. package/src/components/atoms/SocialLinks/index.ts +1 -0
  105. package/src/components/atoms/Spacer/Spacer.component.tsx +27 -0
  106. package/src/components/atoms/Spacer/Spacer.interface.ts +11 -0
  107. package/src/components/atoms/Spacer/Spacer.stories.tsx +28 -0
  108. package/src/components/atoms/Spacer/Spacer.theme.ts +8 -0
  109. package/src/components/atoms/Spacer/index.ts +1 -0
  110. package/src/components/atoms/Video/Video.component.tsx +116 -0
  111. package/src/components/atoms/Video/Video.interface.ts +13 -0
  112. package/src/components/atoms/Video/Video.stories.tsx +37 -0
  113. package/src/components/atoms/Video/Video.theme.ts +44 -0
  114. package/src/components/atoms/Video/index.ts +1 -0
  115. package/src/components/atoms/VideoEmbed/VideoEmbed.component.tsx +109 -0
  116. package/src/components/atoms/VideoEmbed/VideoEmbed.interface.ts +13 -0
  117. package/src/components/atoms/VideoEmbed/VideoEmbed.stories.tsx +23 -0
  118. package/src/components/atoms/VideoEmbed/VideoEmbed.theme.ts +45 -0
  119. package/src/components/atoms/VideoEmbed/index.ts +1 -0
  120. package/src/components/common/PortalComponent/PortalComponent.tsx +48 -0
  121. package/src/components/common/PortalComponent/index.ts +1 -0
  122. package/src/components/molecules/Accordion/Accordion.component.tsx +58 -0
  123. package/src/components/molecules/Accordion/Accordion.interface.ts +15 -0
  124. package/src/components/molecules/Accordion/Accordion.stories.tsx +100 -0
  125. package/src/components/molecules/Accordion/Accordion.theme.ts +66 -0
  126. package/src/components/molecules/Accordion/index.ts +1 -0
  127. package/src/components/molecules/BlogCard/BlogCard.component.tsx +48 -0
  128. package/src/components/molecules/BlogCard/BlogCard.interface.ts +10 -0
  129. package/src/components/molecules/BlogCard/BlogCard.stories.tsx +37 -0
  130. package/src/components/molecules/BlogCard/BlogCard.theme.ts +63 -0
  131. package/src/components/molecules/BlogCard/index.ts +1 -0
  132. package/src/components/molecules/Card/Card.component.tsx +15 -0
  133. package/src/components/molecules/Card/Card.interface.ts +10 -0
  134. package/src/components/molecules/Card/Card.theme.ts +53 -0
  135. package/src/components/molecules/Card/index.ts +1 -0
  136. package/src/components/molecules/Dropdown/Dropdown.component.tsx +67 -0
  137. package/src/components/molecules/Dropdown/Dropdown.interface.ts +26 -0
  138. package/src/components/molecules/Dropdown/Dropdown.stories.tsx +54 -0
  139. package/src/components/molecules/Dropdown/Dropdown.theme.ts +50 -0
  140. package/src/components/molecules/Dropdown/index.ts +1 -0
  141. package/src/components/molecules/IconBox/IconBox.component.tsx +29 -0
  142. package/src/components/molecules/IconBox/IconBox.interface.tsx +10 -0
  143. package/src/components/molecules/IconBox/IconBox.stories.tsx +23 -0
  144. package/src/components/molecules/IconBox/IconBox.theme.ts +25 -0
  145. package/src/components/molecules/IconBox/index.ts +1 -0
  146. package/src/components/molecules/IconTitle/IconTitle.component.tsx +24 -0
  147. package/src/components/molecules/IconTitle/IconTitle.interface.tsx +10 -0
  148. package/src/components/molecules/IconTitle/IconTitle.stories.tsx +49 -0
  149. package/src/components/molecules/IconTitle/IconTitle.theme.ts +10 -0
  150. package/src/components/molecules/IconTitle/index.ts +1 -0
  151. package/src/components/molecules/Modal/Modal.component.tsx +70 -0
  152. package/src/components/molecules/Modal/Modal.interface.ts +11 -0
  153. package/src/components/molecules/Modal/Modal.stories.tsx +57 -0
  154. package/src/components/molecules/Modal/Modal.theme.ts +55 -0
  155. package/src/components/molecules/Modal/index.ts +1 -0
  156. package/src/components/molecules/OffCanvas/OffCanvas.component.tsx +55 -0
  157. package/src/components/molecules/OffCanvas/OffCanvas.interface.ts +12 -0
  158. package/src/components/molecules/OffCanvas/OffCanvas.stories.tsx +55 -0
  159. package/src/components/molecules/OffCanvas/OffCanvas.theme.ts +50 -0
  160. package/src/components/molecules/OffCanvas/index.ts +1 -0
  161. package/src/components/molecules/ProjectCard/ProjectCard.component.tsx +45 -0
  162. package/src/components/molecules/ProjectCard/ProjectCard.interface.ts +8 -0
  163. package/src/components/molecules/ProjectCard/ProjectCard.stories.tsx +72 -0
  164. package/src/components/molecules/ProjectCard/ProjectCard.theme.ts +61 -0
  165. package/src/components/molecules/ProjectCard/index.ts +1 -0
  166. package/src/components/molecules/ShareModal/ShareModal.component.tsx +166 -0
  167. package/src/components/molecules/ShareModal/ShareModal.interface.ts +9 -0
  168. package/src/components/molecules/ShareModal/ShareModal.stories.tsx +33 -0
  169. package/src/components/molecules/ShareModal/ShareModal.theme.ts +101 -0
  170. package/src/components/molecules/ShareModal/index.ts +1 -0
  171. package/src/components/molecules/TeamCard/TeamCard.component.tsx +31 -0
  172. package/src/components/molecules/TeamCard/TeamCard.interface.ts +7 -0
  173. package/src/components/molecules/TeamCard/TeamCard.stories.tsx +33 -0
  174. package/src/components/molecules/TeamCard/TeamCard.theme.ts +12 -0
  175. package/src/components/molecules/TeamCard/index.ts +1 -0
  176. package/src/components/organisms/Cover/Cover.component.tsx +46 -0
  177. package/src/components/organisms/Cover/Cover.interface.ts +14 -0
  178. package/src/components/organisms/Cover/Cover.stories.tsx +97 -0
  179. package/src/components/organisms/Cover/Cover.theme.ts +49 -0
  180. package/src/components/organisms/Cover/index.ts +1 -0
  181. package/src/components/organisms/Slider/Slider.component.tsx +145 -0
  182. package/src/components/organisms/Slider/Slider.interface.ts +17 -0
  183. package/src/components/organisms/Slider/Slider.stories.tsx +73 -0
  184. package/src/components/organisms/Slider/Slider.theme.ts +125 -0
  185. package/src/components/organisms/Slider/Slider.utils.tsx +19 -0
  186. package/src/components/organisms/Slider/index.ts +1 -0
  187. package/src/helpers/clickOutsideToClose.tsx +17 -0
  188. package/src/helpers/getIcons.ts +5 -0
  189. package/src/helpers/useMediaQuery.tsx +24 -0
  190. package/src/helpers/uuid.ts +5 -0
  191. package/src/iconsList.json +1 -0
  192. package/src/index.ts +53 -0
  193. package/src/reportWebVitals.js +13 -0
  194. package/src/stories/Documentation/Colors.stories.tsx +33 -0
  195. package/src/stories/Documentation/Headings.stories.tsx +24 -0
  196. package/src/stories/Documentation/Icons.stories.tsx +73 -0
  197. package/src/stories/Documentation/JWT.stories.tsx +60 -0
  198. package/src/stories/Documentation/Utilities.stories.tsx +65 -0
  199. package/src/styles/Global.ts +296 -0
  200. package/src/styles/grid.ts +70 -0
  201. package/src/styles/reset.ts +47 -0
  202. package/src/styles/utilities.ts +326 -0
  203. package/src/styles/variables.ts +168 -0
  204. package/tsconfig.json +29 -0
  205. package/tsconfig.node.json +11 -0
  206. package/vite.config.ts +87 -0
@@ -0,0 +1,72 @@
1
+ import { Column, Row } from './../../atoms/FlexGrid'
2
+ import type { Meta, StoryObj } from '@storybook/react'
3
+
4
+ import { IProjectCard } from './ProjectCard.interface'
5
+ import ProjectCard from './ProjectCard.component'
6
+ import React from 'react'
7
+
8
+ // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
9
+ export default {
10
+ title: 'Components/ProjectCard',
11
+ component: ProjectCard,
12
+ tags: ['autodocs']
13
+ } as Meta
14
+
15
+ const image = (
16
+ <img
17
+ width="100%"
18
+ height="100%"
19
+ sizes="100vw"
20
+ decoding="async"
21
+ src="/assets/placeholder.png"
22
+ alt="Empty state"
23
+ />
24
+ )
25
+
26
+ export const Simple: StoryObj<IProjectCard> = {
27
+ render: args => (
28
+ <Row>
29
+ <Column md={4}>
30
+ <ProjectCard {...args}></ProjectCard>
31
+ </Column>
32
+ <Column md={4}>
33
+ <ProjectCard {...args}></ProjectCard>
34
+ </Column>
35
+ <Column md={4}>
36
+ <ProjectCard {...args}></ProjectCard>
37
+ </Column>
38
+
39
+ <Column md={6}>
40
+ <ProjectCard variant="featured" {...args}></ProjectCard>
41
+ </Column>
42
+ <Column md={6}>
43
+ <ProjectCard variant="featured" {...args}></ProjectCard>
44
+ </Column>
45
+
46
+ <Column md={4}>
47
+ <ProjectCard {...args}></ProjectCard>
48
+ </Column>
49
+ <Column md={4}>
50
+ <ProjectCard {...args}></ProjectCard>
51
+ </Column>
52
+ <Column md={4}>
53
+ <ProjectCard {...args}></ProjectCard>
54
+ </Column>
55
+
56
+ <Column md={8}>
57
+ <ProjectCard variant="featured" {...args}></ProjectCard>
58
+ </Column>
59
+
60
+ <Column md={4}>
61
+ <ProjectCard {...args}></ProjectCard>
62
+ </Column>
63
+ </Row>
64
+ ),
65
+ args: {
66
+ category: 'Document type',
67
+ title: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
68
+ imageElement: image,
69
+ buttonLabel: 'Download',
70
+ linkElement: <a href="#" className="linker"></a>
71
+ }
72
+ }
@@ -0,0 +1,61 @@
1
+ import styled, { css } from 'styled-components';
2
+
3
+ import Card from '../Card/Card.component';
4
+ import { IProjectCard } from './ProjectCard.interface';
5
+ import { colors } from '@/styles/variables';
6
+
7
+ export const StyledProjectCard = styled(Card) <IProjectCard>`
8
+ & picture{
9
+ &:before{
10
+ content: '';
11
+ position: absolute;
12
+ top: 0;
13
+ left: 0;
14
+ width: 100%;
15
+ height: 100%;
16
+ background: rgba(0,0,0,0.5);
17
+ z-index: 1;
18
+ }
19
+ }
20
+
21
+ & figcaption{
22
+ position: absolute;
23
+ top: 0;
24
+ left: 0;
25
+ width: 100%;
26
+ height: 100%;
27
+ display: flex;
28
+ align-items: flex-end;
29
+ padding: 1rem;
30
+ color: ${colors.white};
31
+ z-index: 2;
32
+
33
+ & i{
34
+ min-width: 3rem;
35
+ height: 3rem;
36
+ line-height: 3rem;
37
+ font-size: 2.6rem;
38
+
39
+ border-radius: 50px;
40
+ color: ${colors.primary10};
41
+ background-color: ${colors.primary30};
42
+
43
+ transition: all 0.3s linear;
44
+ transform: rotateZ(-45deg);
45
+ transform-origin: center center;
46
+ text-align: center;
47
+
48
+ &::before{
49
+ line-height: inherit;
50
+ }
51
+ }
52
+ }
53
+
54
+ &:hover{
55
+ & figcaption{
56
+ & i{
57
+ transform: rotateZ(0);
58
+ }
59
+ }
60
+ }
61
+ `;
@@ -0,0 +1 @@
1
+ export { default } from "./ProjectCard.component";
@@ -0,0 +1,166 @@
1
+ import React, { useEffect, useState } from 'react'
2
+ import { StyledInput, StyledMessage, StyledModal } from './ShareModal.theme'
3
+
4
+ import Flex from '../../atoms/Flex'
5
+ import Heading from '../../atoms/Heading'
6
+ import { IShareModal } from './ShareModal.interface'
7
+ import Icon from '../../atoms/Icon'
8
+ import Modal from '../Modal'
9
+
10
+ type mapTypes = {
11
+ [key: string]: string
12
+ }
13
+
14
+ const ShareModal = ({
15
+ siteTitle,
16
+ title,
17
+ label,
18
+ url,
19
+ copyText,
20
+ open,
21
+ onClose,
22
+ ...props
23
+ }: IShareModal) => {
24
+ const [copied, setCopied] = useState(false)
25
+
26
+ useEffect(() => {
27
+ const timeOut = setTimeout(() => {
28
+ setCopied(false)
29
+ }, 1500)
30
+
31
+ return () => clearTimeout(timeOut)
32
+ }, [copied])
33
+
34
+ const escapeHtml = (text: string) => {
35
+ if (!text) return ''
36
+
37
+ const map: mapTypes = {
38
+ '&': '&amp;',
39
+ '<': '&lt;',
40
+ '>': '&gt;',
41
+ '"': '&quot;',
42
+ "'": '&#039;'
43
+ }
44
+
45
+ return text?.replace(/[&<>"']/g, function (m: string) {
46
+ return map[m]
47
+ })
48
+ }
49
+
50
+ const copyToClipboard = (text?: string) => {
51
+ text && navigator.clipboard.writeText(text)
52
+ }
53
+
54
+ if (!url) return <></>
55
+
56
+ url = url.replace(/([^:]\/)\/+/g, '$1')
57
+
58
+ const shareTitle = title && encodeURIComponent(escapeHtml(title))
59
+ const shareUrl = url && encodeURIComponent(url)
60
+
61
+ const facebookURL = `https://www.facebook.com/sharer/sharer.php?u=${shareUrl}&t=${shareTitle}`
62
+ const twitterURL = `https://twitter.com/intent/tweet?text=${shareTitle}&url=${shareUrl}`
63
+ const linkedInURL = `https://www.linkedin.com/shareArticle?mini=true&url=${shareUrl}&title=${shareTitle}`
64
+ const whatsappURL = `https://api.whatsapp.com/send?text=${shareUrl}`
65
+ const emailURL = `mailto:?subject=${siteTitle} - ${shareTitle}&body=${shareUrl}`
66
+
67
+ return (
68
+ <Modal title={label} open={open} onClose={onClose}>
69
+ <StyledModal {...props}>
70
+ <Flex align={'center'} justify={'space-between'} wrap={'wrap'}>
71
+ <a
72
+ className="social-link"
73
+ aria-label="Facebook"
74
+ href={facebookURL}
75
+ target="_blank"
76
+ rel="noreferrer"
77
+ >
78
+ <div>
79
+ <Icon icon="icon-facebook" />
80
+ </div>
81
+ <Heading
82
+ size={'captions'}
83
+ tag={'span'}
84
+ style={{ marginTop: 'var(--space-3)' }}
85
+ >
86
+ Facebook
87
+ </Heading>
88
+ </a>
89
+ <a
90
+ className="social-link"
91
+ href={twitterURL}
92
+ target="_blank"
93
+ aria-label="Twitter"
94
+ rel="noreferrer"
95
+ >
96
+ <div>
97
+ <Icon icon="icon-twitter" />
98
+ </div>
99
+ <Heading
100
+ size={'captions'}
101
+ tag={'span'}
102
+ style={{ marginTop: 'var(--space-3)' }}
103
+ >
104
+ Twitter
105
+ </Heading>
106
+ </a>
107
+ <a
108
+ className="social-link"
109
+ href={linkedInURL}
110
+ target="_blank"
111
+ aria-label="Linked In"
112
+ rel="noreferrer"
113
+ >
114
+ <div>
115
+ <Icon icon="icon-linkedin" />
116
+ </div>
117
+ <Heading
118
+ size={'captions'}
119
+ tag={'span'}
120
+ style={{ marginTop: 'var(--space-3)' }}
121
+ >
122
+ LinkedIn
123
+ </Heading>
124
+ </a>
125
+ <a
126
+ className="social-link"
127
+ href={whatsappURL}
128
+ target="_blank"
129
+ aria-label="WhatsApp"
130
+ rel="noreferrer"
131
+ >
132
+ <div>
133
+ <Icon icon="icon-whatsapp" />
134
+ </div>
135
+ <Heading
136
+ size={'captions'}
137
+ tag={'span'}
138
+ style={{ marginTop: 'var(--space-3)' }}
139
+ >
140
+ WhatsApp
141
+ </Heading>
142
+ </a>
143
+ </Flex>
144
+ <div style={{ marginTop: 'var(--space-5)' }}>
145
+ <StyledInput
146
+ onClick={() => {
147
+ copyToClipboard(url)
148
+ setCopied(true)
149
+ }}
150
+ >
151
+ <span>{url}</span>
152
+ <Icon icon="icon-link" />
153
+ </StyledInput>
154
+ <StyledMessage
155
+ className={copied ? 'active' : ''}
156
+ style={{ textAlign: 'center' }}
157
+ >
158
+ {copyText}
159
+ </StyledMessage>
160
+ </div>
161
+ </StyledModal>
162
+ </Modal>
163
+ )
164
+ }
165
+
166
+ export default ShareModal
@@ -0,0 +1,9 @@
1
+ export type IShareModal = {
2
+ siteTitle?: string
3
+ title?: string
4
+ url?: string
5
+ label?: string
6
+ copyText?: string
7
+ open?: boolean
8
+ onClose?: () => void
9
+ }
@@ -0,0 +1,33 @@
1
+ import type { Meta, StoryObj } from '@storybook/react'
2
+ import React, { useState } from 'react'
3
+
4
+ import Button from '../../atoms/Button/Button.component'
5
+ import { IShareModal } from './ShareModal.interface'
6
+ import ShareModal from './ShareModal.component'
7
+
8
+ export default {
9
+ title: 'Components/ShareModal',
10
+ component: ShareModal,
11
+ tags: ['autodocs']
12
+ } as Meta
13
+
14
+ export const Simple: StoryObj<IShareModal> = {
15
+ render: args => {
16
+ const [isOpen, setIsOpen] = useState(false)
17
+ return (
18
+ <>
19
+ <Button variant="primary" onClick={() => setIsOpen(true)}>
20
+ Open
21
+ </Button>
22
+ <ShareModal {...args} open={isOpen} onClose={() => setIsOpen(false)} />
23
+ </>
24
+ )
25
+ },
26
+ args: {
27
+ siteTitle: 'Miewtheme DS',
28
+ title: 'Design system',
29
+ url: 'https://miew.pt/',
30
+ label: 'Share',
31
+ copyText: 'Copied to clipboard!'
32
+ }
33
+ }
@@ -0,0 +1,101 @@
1
+ import { colors, radius, responsiveMedia, spaces, typography } from '@/styles/variables';
2
+ import styled, { css } from 'styled-components';
3
+
4
+ import { IShareModal } from './ShareModal.interface';
5
+ import { fontSize } from '@/styles/utilities';
6
+
7
+ export const StyledModal = styled.div<IShareModal>`
8
+ & a {
9
+ display: inline-block;
10
+ width: 50%;
11
+
12
+ text-decoration: none;
13
+ text-align: center;
14
+ padding: ${spaces[3]};
15
+
16
+ & > div {
17
+ display: flex;
18
+ width: 3.2rem;
19
+ height: 3.2rem;
20
+ line-height: 3.2rem;
21
+ border-radius: 50%;
22
+ color: ${colors.white};
23
+ background: ${colors.primary70};
24
+ margin: auto;
25
+ transition: all 0.3s ease;
26
+
27
+ & i {
28
+ color: currentColor;
29
+ font-size: 1.6rem;
30
+ margin: auto;
31
+ }
32
+ };
33
+
34
+ &:hover {
35
+ & > div {
36
+ background: ${colors.primary10}
37
+ }
38
+ };
39
+
40
+ @media only screen and (min-width: ${responsiveMedia}) {
41
+ width: 25%;
42
+ }
43
+ }
44
+ `;
45
+
46
+ export const StyledInput = styled.div<IShareModal>`
47
+ position: relative;
48
+ background: ${colors.white};
49
+ border: 1px solid ${colors.primary20};
50
+ border-radius: 6px;
51
+ padding: ${spaces[2]} ${spaces[3]};
52
+ cursor: pointer;
53
+
54
+ & span {
55
+ color: ${colors.gray90};
56
+ display: block;
57
+ overflow: hidden;
58
+ text-overflow: ellipsis;
59
+ white-space: nowrap;
60
+ max-width: 90%;
61
+ };
62
+
63
+ & i {
64
+ position: absolute;
65
+ top: 50%;
66
+ right: ${spaces[2]};
67
+ color: ${colors.black};
68
+ font-size: 18px;
69
+ transform: translateY(-50%)
70
+ }
71
+ `;
72
+
73
+ export const StyledMessage = styled.div<IShareModal>`
74
+ position: absolute;
75
+ bottom: 1.5rem;
76
+ left: 50%;
77
+
78
+ display: inline-block;
79
+ vertical-align: top;
80
+
81
+ color: ${colors.white};
82
+ background-color: ${colors.primary70};
83
+
84
+ cursor: pointer;
85
+ padding: ${spaces[2]} ${spaces[4]};
86
+ ${fontSize('texts')};
87
+
88
+ border-radius: ${radius.lg};
89
+
90
+ opacity: 0;
91
+ visibility: hidden;
92
+ transform: translate(-50%, 3rem);
93
+ transition: all 0.3s ease;
94
+
95
+ &.active {
96
+ opacity: 1;
97
+ visibility: visible;
98
+ transform: translate(-50%, 0)
99
+ }
100
+ `;
101
+
@@ -0,0 +1 @@
1
+ export { default } from './ShareModal.component'
@@ -0,0 +1,31 @@
1
+ import Heading from '@/components/atoms/Heading'
2
+ import { ITeamCard } from './TeamCard.interface'
3
+ import ImageWrapper from '@/components/atoms/ImageWrapper'
4
+ import React from 'react'
5
+ import SocialLinks from '@/components/atoms/SocialLinks/SocialLinks.component'
6
+ import { StyledTeamCard } from './TeamCard.theme'
7
+
8
+ const TeamCard = ({
9
+ title,
10
+ imageElement,
11
+ role,
12
+ description,
13
+ ...props
14
+ }: ITeamCard) => {
15
+ return (
16
+ <StyledTeamCard
17
+ imageElement={
18
+ <ImageWrapper aspectRatioHeight={78}>{imageElement}</ImageWrapper>
19
+ }
20
+ >
21
+ <Heading tag={'span'} size={'captions'} className={'text-uppercase mt-4'}>
22
+ {role}
23
+ </Heading>
24
+ <Heading tag={'span'} size={'h6'} className={'fw-light mt-2'}>
25
+ {title}
26
+ </Heading>
27
+ </StyledTeamCard>
28
+ )
29
+ }
30
+
31
+ export default TeamCard
@@ -0,0 +1,7 @@
1
+ import { ICard } from '../Card/Card.interface';
2
+
3
+ export interface ITeamCard extends ICard {
4
+ title?: string
5
+ role?: string,
6
+ description?: string | React.ReactElement
7
+ }
@@ -0,0 +1,33 @@
1
+ import type { Meta, StoryObj } from '@storybook/react'
2
+
3
+ import { ITeamCard } from './TeamCard.interface'
4
+ import React from 'react'
5
+ import TeamCard from './TeamCard.component'
6
+
7
+ // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
8
+ export default {
9
+ title: 'Components/TeamCard',
10
+ component: TeamCard,
11
+ tags: ['autodocs']
12
+ } as Meta
13
+
14
+ const image = (
15
+ <img
16
+ width="100%"
17
+ height="100%"
18
+ sizes="100vw"
19
+ decoding="async"
20
+ src="/assets/placeholder.png"
21
+ alt="Empty state"
22
+ />
23
+ )
24
+
25
+ export const Simple: StoryObj<ITeamCard> = {
26
+ render: args => <TeamCard {...args} style={{ maxWidth: '220px' }}></TeamCard>,
27
+ args: {
28
+ role: 'Lorem ipsum',
29
+ title: 'Lorem ipsum',
30
+ imageElement: image,
31
+ description: 'Cras vel facilisis tellus'
32
+ }
33
+ }
@@ -0,0 +1,12 @@
1
+ import styled, { css } from 'styled-components';
2
+
3
+ import Card from '../Card/Card.component';
4
+ import { ITeamCard } from './TeamCard.interface';
5
+ import { colors } from '@/styles/variables';
6
+
7
+ export const StyledTeamCard = styled(Card) <ITeamCard>`
8
+ overflow: hidden;
9
+ margin-bottom: 24px;
10
+ pointer-events: none;
11
+ `;
12
+
@@ -0,0 +1 @@
1
+ export { default } from "./TeamCard.component";
@@ -0,0 +1,46 @@
1
+ import {
2
+ StyledCover,
3
+ StyledCoverContent,
4
+ StyledCoverOverlay
5
+ } from './Cover.theme'
6
+ import { flexAlign, flexJustify } from '@/components/atoms/Flex/Flex.interface'
7
+
8
+ import { ICover } from './Cover.interface'
9
+ import React from 'react'
10
+ import cn from 'classnames'
11
+
12
+ const Cover = ({
13
+ minHeight,
14
+ contentPosition,
15
+ imageElement,
16
+ overlayOpacity,
17
+ overlayColor,
18
+ style,
19
+ className,
20
+ children
21
+ }: ICover) => {
22
+ let alignClass = contentPosition
23
+ ? contentPosition.split(' ')
24
+ : ['center', 'center']
25
+
26
+ return (
27
+ <StyledCover
28
+ className={cn(
29
+ `align-items-${alignClass[0]}`,
30
+ `justify-content-${alignClass[0]}`,
31
+ className
32
+ )}
33
+ style={{ ...style, minHeight: minHeight || undefined }}
34
+ >
35
+ {imageElement}
36
+ {overlayColor && overlayOpacity && (
37
+ <StyledCoverOverlay
38
+ style={{ backgroundColor: overlayColor, opacity: overlayOpacity }}
39
+ ></StyledCoverOverlay>
40
+ )}
41
+ <StyledCoverContent>{children}</StyledCoverContent>
42
+ </StyledCover>
43
+ )
44
+ }
45
+
46
+ export default Cover
@@ -0,0 +1,14 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export type ICover = {
4
+ id?: string;
5
+ anchor?: string;
6
+ minHeight?: string;
7
+ contentPosition?: string;
8
+ imageElement?: React.ReactElement
9
+ overlayOpacity?: number;
10
+ overlayColor?: string;
11
+ className?: string;
12
+ style?: CSSProperties;
13
+ children?: React.ReactNode
14
+ }