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,122 @@
1
+ import { IFormField } from './FormField.interface'
2
+ import { colors } from '@/styles/variables'
3
+ import { fontSize } from '@/styles/utilities'
4
+ import styled from 'styled-components'
5
+
6
+ export const StyledField = styled.input``
7
+
8
+ export const StyledFieldContainer = styled.div<IFormField>`
9
+ position: relative;
10
+ width: 100%;
11
+ margin-bottom: 2rem;
12
+
13
+ ${({ isCheckRadio }) =>
14
+ !isCheckRadio
15
+ ? `
16
+ & > div {
17
+ position: relative;
18
+ }
19
+
20
+ i {
21
+ position: absolute;
22
+ top: 50%;
23
+ left: 12px;
24
+ margin-top: -10px;
25
+
26
+ color: currentColor;
27
+
28
+ & + input,
29
+ & + select {
30
+ padding-left: 2.6rem;
31
+ }
32
+ }
33
+
34
+ label {
35
+ display: block;
36
+ }
37
+
38
+ &:has(select) {
39
+ & > div {
40
+ &::after {
41
+ content: '';
42
+ display: block;
43
+ position: absolute;
44
+ top: 50%;
45
+ right: 12px;
46
+ width: 16px;
47
+ height: 16px;
48
+ margin: 0 4px;
49
+ margin-top: -8px;
50
+ background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.33333 9.24435L11.016 5.33398L12 6.3788L7.33333 11.334L2.66667 6.3788L3.65065 5.33398L7.33333 9.24435Z' fill='%233C3B39'/%3E%3C/svg%3E%0A");
51
+ }
52
+ & input,
53
+ & select {
54
+ padding-right: 2.6rem;
55
+ }
56
+ }
57
+ }
58
+
59
+ input,
60
+ textarea,
61
+ select {
62
+ font-family: inherit;
63
+ ${fontSize('texts')};
64
+
65
+ border-radius: 8px;
66
+ border: 0;
67
+
68
+ padding: 12px;
69
+ background: transparent;
70
+ outline: none;
71
+ width: 100%;
72
+
73
+ border: 1px solid ${colors.primary70};
74
+
75
+ &:focus {
76
+ border: 1px solid ${colors.gray50};
77
+ }
78
+ }
79
+
80
+ select{
81
+ option{
82
+ color: ${colors.primary70};
83
+ }
84
+ }
85
+
86
+ //Clear search X
87
+ input[type="search"]::-webkit-search-decoration,
88
+ input[type="search"]::-webkit-search-cancel-button,
89
+ input[type="search"]::-webkit-search-results-button,
90
+ input[type="search"]::-webkit-search-results-decoration {
91
+ -webkit-appearance: none;
92
+ }
93
+
94
+ .style-dark & {
95
+ &:has(select) {
96
+ & > div {
97
+ &::after {
98
+ background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.33333 9.24435L11.016 5.33398L12 6.3788L7.33333 11.334L2.66667 6.3788L3.65065 5.33398L7.33333 9.24435Z' fill='%23fff'/%3E%3C/svg%3E%0A");
99
+ }
100
+ }
101
+ }
102
+
103
+ i {
104
+ color: ${colors.white};
105
+ }
106
+
107
+ & input,
108
+ & textarea,
109
+ & select {
110
+ color: ${colors.white};
111
+ border-color: ${colors.white};
112
+ }
113
+ }
114
+ `
115
+ : `
116
+ & > div{
117
+ display: flex;
118
+ flex-flow: row wrap;
119
+ gap: 1rem;
120
+ }
121
+ `}
122
+ `
@@ -0,0 +1 @@
1
+ export { default } from './FormField.component'
@@ -0,0 +1,17 @@
1
+ import { IHeading } from './Heading.interface';
2
+ import React from 'react';
3
+ import { StyledHeading } from './Heading.theme';
4
+
5
+ const Heading = ({ tag = "h3", size, className, ...props }: IHeading) => {
6
+ return (
7
+ <StyledHeading
8
+ as={tag as React.ElementType}
9
+ size={size}
10
+ className={className}
11
+ {...props}
12
+ />
13
+ );
14
+ };
15
+
16
+
17
+ export default Heading;
@@ -0,0 +1,21 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export enum typographyTags {
4
+ div = "div",
5
+ span = "span",
6
+ p = "p",
7
+ h1 = "h1",
8
+ h2 = "h2",
9
+ h3 = "h3",
10
+ h4 = "h4",
11
+ h5 = "h5",
12
+ h6 = "h6",
13
+ }
14
+
15
+ export type IHeading = {
16
+ tag?: keyof typeof typographyTags | string
17
+ size?: string
18
+ className?: string;
19
+ style?: CSSProperties
20
+ children?: React.ReactNode;
21
+ }
@@ -0,0 +1,17 @@
1
+ import styled, { css } from 'styled-components';
2
+
3
+ import { fontSize } from '@/styles/utilities';
4
+
5
+ import { IHeading } from './Heading.interface';
6
+
7
+ export const StyledHeading = styled.div<IHeading>`
8
+ display: block;
9
+
10
+ ${({ size }) => size && `
11
+ ${fontSize(size)}
12
+ `}
13
+
14
+ & a {
15
+ color: inherit
16
+ }
17
+ `;
@@ -0,0 +1 @@
1
+ export { default } from "./Heading.component";
@@ -0,0 +1,19 @@
1
+ import { IIcon } from './Icon.interface';
2
+ import React from 'react';
3
+ import { StyledIcon } from './Icon.theme';
4
+ import cn from 'classnames';
5
+
6
+ const Icon = ({ icon, className, onClick, ...props }: IIcon) => {
7
+ return (
8
+ <StyledIcon
9
+ className={cn(
10
+ icon,
11
+ className
12
+ )}
13
+ onClick={onClick}
14
+ {...props}
15
+ />
16
+ );
17
+ };
18
+
19
+ export default Icon
@@ -0,0 +1,8 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export type IIcon = {
4
+ icon?: string,
5
+ className?: string,
6
+ style?: CSSProperties
7
+ onClick?: () => void
8
+ }
@@ -0,0 +1,26 @@
1
+ import type { Meta, StoryObj } from '@storybook/react'
2
+
3
+ import { IIcon } from './Icon.interface'
4
+ import Icon from './Icon.component'
5
+ import React from 'react'
6
+ import { iconsList } from '@/helpers/getIcons'
7
+
8
+ // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
9
+ export default {
10
+ title: 'Components/Icon',
11
+ component: Icon,
12
+ tags: ['autodocs'],
13
+ argTypes: {
14
+ icon: {
15
+ options: Object.values(iconsList),
16
+ control: 'select'
17
+ }
18
+ }
19
+ } as Meta
20
+
21
+ export const Simple: StoryObj<IIcon> = {
22
+ render: args => <Icon {...args} />,
23
+ args: {
24
+ icon: iconsList[0]
25
+ }
26
+ }
@@ -0,0 +1,102 @@
1
+ import styled, { css } from 'styled-components';
2
+
3
+ import { IIcon } from './Icon.interface';
4
+
5
+ export const StyledIcon = styled.i<IIcon>`
6
+ color: currentColor;
7
+ font-size: 20px;
8
+ line-height: 1;
9
+
10
+ &::before {
11
+ display: block;
12
+ font-family: 'miewfont' !important;
13
+ speak: none;
14
+ font-style: normal;
15
+ font-weight: normal;
16
+ font-variant: normal;
17
+ text-transform: none;
18
+ line-height: 1;
19
+ webkit-font-smoothing: antialiased;
20
+ moz-osx-font-smoothing: grayscale
21
+ }
22
+
23
+
24
+ &.icon-whatsapp:before {
25
+ content: "\\e918";
26
+ }
27
+ &.icon-anchor:before {
28
+ content: "\\e900";
29
+ }
30
+ &.icon-behance:before {
31
+ content: "\\e901";
32
+ }
33
+ &.icon-chevron-down:before {
34
+ content: "\\e902";
35
+ }
36
+ &.icon-chevron-left:before {
37
+ content: "\\e903";
38
+ }
39
+ &.icon-chevron-right:before {
40
+ content: "\\e904";
41
+ }
42
+ &.icon-chevron-up:before {
43
+ content: "\\e905";
44
+ }
45
+ &.icon-close:before {
46
+ content: "\\e906";
47
+ }
48
+ &.icon-dribbble:before {
49
+ content: "\\e907";
50
+ }
51
+ &.icon-facebook:before {
52
+ content: "\\e908";
53
+ }
54
+ &.icon-forward-arrow:before {
55
+ content: "\\e909";
56
+ }
57
+ &.icon-github:before {
58
+ content: "\\e90a";
59
+ }
60
+ &.icon-gitlab:before {
61
+ content: "\\e90b";
62
+ }
63
+ &.icon-instagram:before {
64
+ content: "\\e90c";
65
+ }
66
+ &.icon-linkedin:before {
67
+ content: "\\e90d";
68
+ }
69
+ &.icon-location:before {
70
+ content: "\\e90e";
71
+ }
72
+ &.icon-medium:before {
73
+ content: "\\e90f";
74
+ }
75
+ &.icon-less:before {
76
+ content: "\\e910";
77
+ }
78
+ &.icon-more:before {
79
+ content: "\\e911";
80
+ }
81
+ &.icon-pinterest:before {
82
+ content: "\\e912";
83
+ }
84
+ &.icon-search:before {
85
+ content: "\\e913";
86
+ }
87
+ &.icon-tripadvisor:before {
88
+ content: "\\e914";
89
+ }
90
+ &.icon-tumblr:before {
91
+ content: "\\e915";
92
+ }
93
+ &.icon-twitter:before {
94
+ content: "\\e916";
95
+ }
96
+ &.icon-youtube:before {
97
+ content: "\\e917";
98
+ }
99
+
100
+
101
+
102
+ `;
@@ -0,0 +1 @@
1
+ export { default } from './Icon.component'
@@ -0,0 +1,42 @@
1
+ import { IImageWrapper } from './ImageWrapper.interface';
2
+ import React from 'react';
3
+ import { Overlay, StyledImageWrapper } from './ImageWrapper.theme';
4
+
5
+ const ImageWrapper = ({
6
+ aspectRatioHeight,
7
+ align,
8
+ caption,
9
+ href,
10
+ linkTarget,
11
+ rel,
12
+ className,
13
+ style,
14
+ children,
15
+ asBackground = false
16
+ }: IImageWrapper) => {
17
+ return (
18
+ <StyledImageWrapper $align={align} className={className} style={style}>
19
+ <span
20
+ className='d-block'
21
+ aria-hidden="true"
22
+ style={
23
+ aspectRatioHeight
24
+ ? { paddingBottom: `${aspectRatioHeight.toFixed(2)}%` }
25
+ : {}
26
+ }
27
+ ></span>
28
+ {children}
29
+ {!!caption && (
30
+ <figcaption>
31
+ <span>{caption}</span>
32
+ </figcaption>
33
+ )}
34
+ {!!href && (
35
+ <a className={'linker'} href={href} target={linkTarget} rel={rel}></a>
36
+ )}
37
+ {asBackground && <Overlay />}
38
+ </StyledImageWrapper>
39
+ )
40
+ }
41
+
42
+ export default ImageWrapper
@@ -0,0 +1,16 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export type IImageWrapper = {
4
+ aspectRatioHeight?: number
5
+ anchor?: string;
6
+ $align?: string;
7
+ align?: string;
8
+ caption?: string;
9
+ href?: string;
10
+ linkTarget?: string;
11
+ rel?: string;
12
+ className?: string;
13
+ style?: CSSProperties;
14
+ children?: React.ReactNode;
15
+ asBackground?: boolean;
16
+ }
@@ -0,0 +1,27 @@
1
+ import type { Meta, StoryObj } from '@storybook/react'
2
+
3
+ import React from 'react'
4
+
5
+ import ImageWrapper from './ImageWrapper.component'
6
+ import { IImageWrapper } from './ImageWrapper.interface'
7
+
8
+ // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
9
+ export default {
10
+ title: 'Components/ImageWrapper',
11
+ component: ImageWrapper
12
+ } as Meta
13
+
14
+ export const Simple: StoryObj<IImageWrapper> = {
15
+ render: args => (
16
+ <ImageWrapper {...args} style={{ maxWidth: '320px' }}>
17
+ <img
18
+ width="100%"
19
+ height="100%"
20
+ decoding="async"
21
+ src="/assets/placeholder.png"
22
+ alt="Empty state"
23
+ />
24
+ </ImageWrapper>
25
+ ),
26
+ args: {}
27
+ }
@@ -0,0 +1,51 @@
1
+ import styled, { css } from 'styled-components';
2
+
3
+ import { IImageWrapper } from './ImageWrapper.interface';
4
+
5
+ export const StyledImageWrapper = styled.picture<IImageWrapper>`
6
+
7
+ & picture{
8
+ position: relative;
9
+ }
10
+ & img{
11
+ object-fit:cover;
12
+ }
13
+
14
+ &.as-background{
15
+ position: absolute;
16
+ width: 100%;
17
+ height: 100%;
18
+ z-index: 0;
19
+ background: linear-gradient(0deg, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.50) 100%);
20
+
21
+ & img{
22
+ width: 100%;
23
+ height: 100%;
24
+ }
25
+ }
26
+
27
+ ${(props) => {
28
+ switch (props.$align) {
29
+ case "left": default:
30
+ return css` `;
31
+ case "center":
32
+ return css`
33
+ margin-left:auto;
34
+ margin-right:auto;
35
+ `;
36
+ case "right":
37
+ return css`
38
+ margin-right:auto;
39
+ `;
40
+ }
41
+ }}
42
+ `
43
+ export const Overlay = styled.div`
44
+ display: block;
45
+ background: linear-gradient(0deg, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.50) 100%);
46
+ position: absolute;
47
+ top: 0;
48
+ bottom: 0;
49
+ left: 0;
50
+ right: 0;
51
+ `
@@ -0,0 +1 @@
1
+ export { default } from "./ImageWrapper.component";
@@ -0,0 +1,26 @@
1
+ import { ILoader } from './Loader.interface'
2
+ import React from 'react'
3
+ import RichText from '../RichText/RichText.component'
4
+ import { StyledLoader } from '@/components/atoms/Loader/Loader.theme'
5
+
6
+ const Loader = ({
7
+ variant,
8
+ label,
9
+ children,
10
+ className,
11
+ style,
12
+ ...props
13
+ }: ILoader) => {
14
+ return (
15
+ <StyledLoader $variant={variant} className={className} style={style}>
16
+ <div></div>
17
+ {label && (
18
+ <RichText tag="p" className="mt-3">
19
+ {label}
20
+ </RichText>
21
+ )}
22
+ </StyledLoader>
23
+ )
24
+ }
25
+
26
+ export default Loader
@@ -0,0 +1,10 @@
1
+ import { CSSProperties } from 'react';
2
+
3
+ export interface ILoader {
4
+ variant?: string,
5
+ $variant?: string,
6
+ label?: string,
7
+ className?: string,
8
+ style?: CSSProperties
9
+ children?: React.ReactNode
10
+ }
@@ -0,0 +1,33 @@
1
+ import type { Meta, StoryObj } from '@storybook/react'
2
+
3
+ import { ILoader } from './Loader.interface'
4
+ import Loader from './Loader.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/Loader',
10
+ component: Loader,
11
+ tags: ['autodocs'],
12
+ // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
13
+ argTypes: {}
14
+ } as Meta
15
+
16
+ export const Light: StoryObj<ILoader> = {
17
+ render: args => <Loader {...args}></Loader>,
18
+ args: {
19
+ variant: 'light',
20
+ label: 'Loading...'
21
+ }
22
+ }
23
+ export const Dark: StoryObj<ILoader> = {
24
+ render: args => (
25
+ <div className="bg-primary70 color-white p-8">
26
+ <Loader {...args}></Loader>
27
+ </div>
28
+ ),
29
+ args: {
30
+ variant: 'dark',
31
+ label: 'Loading...'
32
+ }
33
+ }
@@ -0,0 +1,92 @@
1
+ import styled, { css } from 'styled-components';
2
+
3
+ import { ILoader } from './Loader.interface';
4
+ import { colors } from '@/styles/variables';
5
+
6
+ export const StyledLoader = styled.div<ILoader>`
7
+ display: inline-block;
8
+ text-align: center;
9
+
10
+ & > div {
11
+ position: relative;
12
+ width: 5rem;
13
+ height: 5rem;
14
+
15
+ &::before,
16
+ &::after {
17
+ content: '';
18
+ position: absolute;
19
+ top: 0;
20
+ left: 0;
21
+
22
+ width: 100%;
23
+ height: 100%;
24
+
25
+ border-radius: 50%;
26
+ }
27
+ &::before{
28
+ border-style: solid solid dotted dotted;
29
+
30
+ animation: rotation 2s linear infinite;
31
+ }
32
+ &::after {
33
+ top:50%;
34
+ left: 50%;
35
+
36
+ max-width: 2rem;
37
+ max-height: 2rem;
38
+
39
+ margin-top: -1rem;
40
+ margin-left: -1rem;
41
+
42
+ border-style: solid solid dotted;
43
+
44
+ animation: rotationBack 1s linear infinite;
45
+ transform-origin: center center;
46
+ }
47
+ }
48
+
49
+ ${(props) => {
50
+ switch (props.$variant) {
51
+ case "dark": default:
52
+ return css`
53
+ & > div {
54
+ &::before{
55
+ border: 3px dotted ${colors.white};
56
+ }
57
+ &::after {
58
+ border: 3px dotted ${colors.white};
59
+ }
60
+ }
61
+ `;
62
+ case "light":
63
+ return css`
64
+ & > div {
65
+ &::before{
66
+ border: 3px dotted ${colors.primary70};
67
+ }
68
+ &::after {
69
+ border: 3px dotted ${colors.primary70};
70
+ }
71
+ }
72
+ `;
73
+ }
74
+ }}
75
+
76
+ @keyframes rotation {
77
+ 0% {
78
+ transform: rotate(0deg);
79
+ }
80
+ 100% {
81
+ transform: rotate(360deg);
82
+ }
83
+ }
84
+ @keyframes rotationBack {
85
+ 0% {
86
+ transform: rotate(0deg);
87
+ }
88
+ 100% {
89
+ transform: rotate(-360deg);
90
+ }
91
+ }
92
+ `;
@@ -0,0 +1 @@
1
+ export { default } from './Loader.component'