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
package/src/index.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as variables from './styles/variables';
|
|
2
|
+
|
|
3
|
+
//atoms
|
|
4
|
+
export { default as ImageWrapper } from './components/atoms/ImageWrapper'
|
|
5
|
+
export { default as Heading } from './components/atoms/Heading'
|
|
6
|
+
export { default as RichText } from './components/atoms/RichText'
|
|
7
|
+
export { default as Button } from './components/atoms/Button'
|
|
8
|
+
export { default as Spacer } from './components/atoms/Spacer'
|
|
9
|
+
export { default as Separator } from './components/atoms/Separator'
|
|
10
|
+
export { default as Flex } from './components/atoms/Flex'
|
|
11
|
+
export { default as Icon } from './components/atoms/Icon'
|
|
12
|
+
export { default as Chip } from './components/atoms/Chip'
|
|
13
|
+
export { default as Quote } from './components/atoms/Quote'
|
|
14
|
+
export { default as Video } from './components/atoms/Video'
|
|
15
|
+
export { default as VideoEmbed } from './components/atoms/VideoEmbed'
|
|
16
|
+
export { Row as Row } from './components/atoms/FlexGrid'
|
|
17
|
+
export { Column as Column } from './components/atoms/FlexGrid'
|
|
18
|
+
export { default as FormField } from './components/atoms/FormField'
|
|
19
|
+
export { default as CheckRadioField } from './components/atoms/FormField/CheckRadioField'
|
|
20
|
+
export { default as Loader } from './components/atoms/Loader'
|
|
21
|
+
export { default as EmptyState } from './components/atoms/EmptyState'
|
|
22
|
+
export { default as CloseButton } from './components/atoms/CloseButton'
|
|
23
|
+
export { default as ScrollingNav } from './components/atoms/ScrollingNav'
|
|
24
|
+
export { default as Marquee } from './components/atoms/Marquee'
|
|
25
|
+
|
|
26
|
+
//common
|
|
27
|
+
export { default as PortalComponent } from './components/common/PortalComponent'
|
|
28
|
+
|
|
29
|
+
//molecules
|
|
30
|
+
export { Accordion as Accordion } from './components/molecules/Accordion'
|
|
31
|
+
export { AccordionItem as AccordionItem } from './components/molecules/Accordion'
|
|
32
|
+
export { default as Modal } from './components/molecules/Modal'
|
|
33
|
+
export { default as OffCanvas } from './components/molecules/OffCanvas'
|
|
34
|
+
export { default as Dropdown } from './components/molecules/Dropdown'
|
|
35
|
+
export { DropdownItem as DropdownItem } from './components/molecules/Dropdown'
|
|
36
|
+
export { default as ShareModal } from './components/molecules/ShareModal'
|
|
37
|
+
export { default as IconBox } from './components/molecules/IconBox'
|
|
38
|
+
export { default as IconTitle } from './components/molecules/IconTitle'
|
|
39
|
+
export { default as BlogCard } from './components/molecules/BlogCard'
|
|
40
|
+
export { default as TeamCard } from './components/molecules/TeamCard'
|
|
41
|
+
export { default as ProjectCard } from './components/molecules/ProjectCard'
|
|
42
|
+
// //organisms
|
|
43
|
+
export { default as Slider } from './components/organisms/Slider'
|
|
44
|
+
export { default as Cover } from './components/organisms/Cover'
|
|
45
|
+
|
|
46
|
+
export { iconsList } from './helpers/getIcons'
|
|
47
|
+
|
|
48
|
+
export { default as GlobalStyles } from './styles/Global'
|
|
49
|
+
|
|
50
|
+
export { default as clickOutSideToClose } from './helpers/clickOutsideToClose'
|
|
51
|
+
|
|
52
|
+
export { variables };
|
|
53
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const reportWebVitals = onPerfEntry => {
|
|
2
|
+
if (onPerfEntry && onPerfEntry instanceof Function) {
|
|
3
|
+
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
|
4
|
+
getCLS(onPerfEntry);
|
|
5
|
+
getFID(onPerfEntry);
|
|
6
|
+
getFCP(onPerfEntry);
|
|
7
|
+
getLCP(onPerfEntry);
|
|
8
|
+
getTTFB(onPerfEntry);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default reportWebVitals;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import Flex from '@/components/atoms/Flex'
|
|
4
|
+
import React from 'react'
|
|
5
|
+
import { colors } from '@/styles/variables'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Documentation/Colors',
|
|
9
|
+
tags: ['autodocs']
|
|
10
|
+
} as Meta
|
|
11
|
+
|
|
12
|
+
export const Colors: StoryObj = {
|
|
13
|
+
render: args => (
|
|
14
|
+
<div style={{ width: '100%' }}>
|
|
15
|
+
<Flex direction={'row'} wrap={'wrap'} style={{ gap: '4px' }}>
|
|
16
|
+
{colors &&
|
|
17
|
+
Object.keys(colors).map((color, i) => (
|
|
18
|
+
<div
|
|
19
|
+
key={`color-${i}`}
|
|
20
|
+
style={{
|
|
21
|
+
background: `var(--color-${color})`,
|
|
22
|
+
width: '100px',
|
|
23
|
+
height: '75px'
|
|
24
|
+
}}
|
|
25
|
+
>
|
|
26
|
+
<span>{color}</span>
|
|
27
|
+
</div>
|
|
28
|
+
))}
|
|
29
|
+
</Flex>
|
|
30
|
+
</div>
|
|
31
|
+
),
|
|
32
|
+
args: {}
|
|
33
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import Heading from '@/components/atoms/Heading'
|
|
4
|
+
import React from 'react'
|
|
5
|
+
import { typography } from '@/styles/variables'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: 'Documentation/Typography',
|
|
9
|
+
tags: ['autodocs']
|
|
10
|
+
} as Meta
|
|
11
|
+
|
|
12
|
+
export const Typography: StoryObj = {
|
|
13
|
+
render: args => (
|
|
14
|
+
<div style={{ width: '100%' }}>
|
|
15
|
+
{typography &&
|
|
16
|
+
Object.keys(typography).map((typo, i) => (
|
|
17
|
+
<Heading key={`typo-${i}`} tag={'span'} size={typo}>
|
|
18
|
+
Lorem ipsum
|
|
19
|
+
</Heading>
|
|
20
|
+
))}
|
|
21
|
+
</div>
|
|
22
|
+
),
|
|
23
|
+
args: {}
|
|
24
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import Flex from '@/components/atoms/Flex'
|
|
4
|
+
import Heading from '@/components/atoms/Heading'
|
|
5
|
+
import Icon from '@/components/atoms/Icon'
|
|
6
|
+
import React from 'react'
|
|
7
|
+
import Spacer from '@/components/atoms/Spacer'
|
|
8
|
+
import { iconsList } from '@/helpers/getIcons'
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
title: 'Documentation/Icons',
|
|
12
|
+
tags: ['autodocs']
|
|
13
|
+
} as Meta
|
|
14
|
+
|
|
15
|
+
export const Icons: StoryObj = {
|
|
16
|
+
render: args => (
|
|
17
|
+
<div style={{ width: '100%' }}>
|
|
18
|
+
<div>
|
|
19
|
+
<Heading size={'h4'}>How To:</Heading>
|
|
20
|
+
<ol style={{ paddingLeft: '20px' }}>
|
|
21
|
+
<li>
|
|
22
|
+
Create your font at{' '}
|
|
23
|
+
<a href="https://icomoon.io/" target="_blank">
|
|
24
|
+
Icomoon
|
|
25
|
+
</a>
|
|
26
|
+
</li>
|
|
27
|
+
<li>Download your font</li>
|
|
28
|
+
<li>
|
|
29
|
+
Replace <em>/src/iconList.json</em> content with{' '}
|
|
30
|
+
<em>selection.json</em> content
|
|
31
|
+
</li>
|
|
32
|
+
<li>
|
|
33
|
+
Replace all the files from <em>/public/fonts/</em> with{' '}
|
|
34
|
+
<em>fonts/</em> from the zip
|
|
35
|
+
</li>
|
|
36
|
+
<li>
|
|
37
|
+
Replace all css rules in <em>/src/styles/Icon</em> with the new ones
|
|
38
|
+
from style.css
|
|
39
|
+
</li>
|
|
40
|
+
<li>Bump DS version</li>
|
|
41
|
+
<li>Move miewfont folder to nextjs public folder</li>
|
|
42
|
+
</ol>
|
|
43
|
+
</div>
|
|
44
|
+
<Spacer height={6} />
|
|
45
|
+
<span className="d-block h4 mb-adapt-4">
|
|
46
|
+
<strong>There are {Object.values(iconsList).length} icons</strong>
|
|
47
|
+
</span>
|
|
48
|
+
<Spacer height={3} />
|
|
49
|
+
<Flex direction={'row'} wrap={'wrap'} style={{ gap: '4px' }}>
|
|
50
|
+
{iconsList &&
|
|
51
|
+
iconsList.map((icon, i) => (
|
|
52
|
+
<span
|
|
53
|
+
key={i}
|
|
54
|
+
style={{
|
|
55
|
+
width: '16.666%',
|
|
56
|
+
border: '1px solid rgb(229, 229, 229)',
|
|
57
|
+
textAlign: 'center'
|
|
58
|
+
}}
|
|
59
|
+
>
|
|
60
|
+
<Icon icon={icon} style={{ fontSize: '3rem', padding: '2rem' }} />
|
|
61
|
+
<Heading
|
|
62
|
+
size={'h6'}
|
|
63
|
+
style={{ background: 'rgb(244, 244, 244)', lineHeight: '3em' }}
|
|
64
|
+
>
|
|
65
|
+
{icon}
|
|
66
|
+
</Heading>
|
|
67
|
+
</span>
|
|
68
|
+
))}
|
|
69
|
+
</Flex>
|
|
70
|
+
</div>
|
|
71
|
+
),
|
|
72
|
+
args: {}
|
|
73
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import React from 'react'
|
|
4
|
+
import RichText from '@/components/atoms/RichText'
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Documentation/JWT',
|
|
8
|
+
tags: ['autodocs']
|
|
9
|
+
} as Meta
|
|
10
|
+
|
|
11
|
+
export const JWT: StoryObj = {
|
|
12
|
+
render: args => (
|
|
13
|
+
<div style={{ width: '100%' }}>
|
|
14
|
+
<p>Generate token to enter in .env file</p>
|
|
15
|
+
|
|
16
|
+
<code style={{ display: 'block', margin: '24px 0' }}>
|
|
17
|
+
<RichText>
|
|
18
|
+
{`
|
|
19
|
+
mutation LoginUser {
|
|
20
|
+
login( input: {
|
|
21
|
+
clientMutationId: "uniqueId",
|
|
22
|
+
username: "your_login",
|
|
23
|
+
password: "your password"
|
|
24
|
+
} ) {
|
|
25
|
+
authToken
|
|
26
|
+
user {
|
|
27
|
+
id
|
|
28
|
+
name
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`}
|
|
33
|
+
</RichText>
|
|
34
|
+
</code>
|
|
35
|
+
<p>
|
|
36
|
+
Then generate a salt to use in wp-config define var
|
|
37
|
+
<br />
|
|
38
|
+
https://api.wordpress.org/secret-key/1.1/salt/
|
|
39
|
+
</p>
|
|
40
|
+
|
|
41
|
+
<code style={{ display: 'block', margin: '24px 0' }}>
|
|
42
|
+
<RichText>
|
|
43
|
+
{`
|
|
44
|
+
mutation RefreshAuthToken {
|
|
45
|
+
refreshJwtAuthToken(
|
|
46
|
+
input: {
|
|
47
|
+
clientMutationId: "uniqueId"
|
|
48
|
+
jwtRefreshToken: "your_refresh_token",
|
|
49
|
+
}) {
|
|
50
|
+
authToken
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
`}
|
|
54
|
+
</RichText>
|
|
55
|
+
</code>
|
|
56
|
+
<p>Refresh code</p>
|
|
57
|
+
</div>
|
|
58
|
+
),
|
|
59
|
+
args: {}
|
|
60
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
2
|
+
|
|
3
|
+
import Flex from '@/components/atoms/Flex'
|
|
4
|
+
import Heading from '@/components/atoms/Heading'
|
|
5
|
+
import React from 'react'
|
|
6
|
+
import { grid_conf } from '@/styles/variables'
|
|
7
|
+
import { utilities } from '@/styles/utilities'
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
title: 'Documentation/Utilities',
|
|
11
|
+
tags: ['autodocs']
|
|
12
|
+
} as Meta
|
|
13
|
+
|
|
14
|
+
export const Utilities: StoryObj = {
|
|
15
|
+
render: args => (
|
|
16
|
+
<div style={{ width: '100%' }}>
|
|
17
|
+
<Flex
|
|
18
|
+
direction={'row'}
|
|
19
|
+
align={'center'}
|
|
20
|
+
wrap={'wrap'}
|
|
21
|
+
style={{ gap: '4px' }}
|
|
22
|
+
>
|
|
23
|
+
{Object.keys(utilities).map((utility, i) => {
|
|
24
|
+
const property = utilities[utility]?.property
|
|
25
|
+
const className = utilities[utility]?.class || property
|
|
26
|
+
const values = utilities[utility]?.values
|
|
27
|
+
const responsive = utilities[utility]?.responsive
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div key={`utilities-${i}`} className={'w-100 mb-6'}>
|
|
31
|
+
<Heading tag="span" size="texts" style={{ fontWeight: 700 }}>
|
|
32
|
+
{utility}
|
|
33
|
+
</Heading>
|
|
34
|
+
<pre>
|
|
35
|
+
<code>
|
|
36
|
+
{Object.keys(values as object).map((key, i) => {
|
|
37
|
+
if (!values) return <></>
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<>
|
|
41
|
+
<span key={`utility-${i}`}>
|
|
42
|
+
{`.${`${className}-${key}`}{${property}: ${
|
|
43
|
+
values[key]
|
|
44
|
+
};}`}
|
|
45
|
+
<br />
|
|
46
|
+
</span>
|
|
47
|
+
{responsive && (
|
|
48
|
+
<span>
|
|
49
|
+
{`.${className}-md-${key}{@media (min-width: ${grid_conf.breakpoints.$md}){ ${property}: ${values[key]};}}`}
|
|
50
|
+
<br />
|
|
51
|
+
</span>
|
|
52
|
+
)}
|
|
53
|
+
</>
|
|
54
|
+
)
|
|
55
|
+
})}
|
|
56
|
+
</code>
|
|
57
|
+
</pre>
|
|
58
|
+
</div>
|
|
59
|
+
)
|
|
60
|
+
})}
|
|
61
|
+
</Flex>
|
|
62
|
+
</div>
|
|
63
|
+
),
|
|
64
|
+
args: {}
|
|
65
|
+
}
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import {
|
|
2
|
+
colors,
|
|
3
|
+
desktop_width,
|
|
4
|
+
fontName,
|
|
5
|
+
mobile_width,
|
|
6
|
+
radius,
|
|
7
|
+
responsiveMedia,
|
|
8
|
+
shadows,
|
|
9
|
+
spaces,
|
|
10
|
+
tablet_width,
|
|
11
|
+
typography,
|
|
12
|
+
zIndexes,
|
|
13
|
+
} from '@/styles/variables'
|
|
14
|
+
import { fontSize, generateUtilities, utilities } from './utilities';
|
|
15
|
+
|
|
16
|
+
import { createGlobalStyle } from 'styled-components';
|
|
17
|
+
import resetStyles from './reset';
|
|
18
|
+
|
|
19
|
+
const GlobalStyles = createGlobalStyle`
|
|
20
|
+
:root {
|
|
21
|
+
--body-fontName: ${fontName};
|
|
22
|
+
--body-fontFamily: "${fontName}", sans-serif;
|
|
23
|
+
|
|
24
|
+
--responsiveMedia: ${responsiveMedia};
|
|
25
|
+
|
|
26
|
+
${Object.keys(colors).map(
|
|
27
|
+
(color, i) => `--color-${color}: ${Object.values(colors)[i]};`
|
|
28
|
+
)}
|
|
29
|
+
|
|
30
|
+
${Object.keys(typography).map(
|
|
31
|
+
(typo, i) => `--fontSize-${typo}: ${Object.values(typography)[i].size};`
|
|
32
|
+
)}
|
|
33
|
+
|
|
34
|
+
${Object.keys(spaces).map(
|
|
35
|
+
(space, i) => `--space-${space}: ${Object.values(spaces)[i]};`
|
|
36
|
+
)}
|
|
37
|
+
|
|
38
|
+
${Object.keys(shadows).map(
|
|
39
|
+
(shadow, i) => `--shadow-${shadow}: ${Object.values(shadows)[i]};`
|
|
40
|
+
)}
|
|
41
|
+
|
|
42
|
+
${Object.keys(radius).map(
|
|
43
|
+
(radial, i) => `--radius-${radial}: ${Object.values(radius)[i]};`
|
|
44
|
+
)}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
${resetStyles}
|
|
48
|
+
|
|
49
|
+
@font-face {
|
|
50
|
+
font-family: "miewfont";
|
|
51
|
+
src: url("/fonts/miewfont/miewfont.ttf");
|
|
52
|
+
src: url("/fonts/miewfont/miewfont.eot#iefix") format("embedded-opentype"),
|
|
53
|
+
url("/fonts/miewfont/miewfont.ttf") format("truetype"),
|
|
54
|
+
url("/fonts/miewfont/miewfont.woff") format("woff"),
|
|
55
|
+
url("/fonts/miewfont/miewfont.svg#miewfont") format("svg");
|
|
56
|
+
font-weight: normal;
|
|
57
|
+
font-style: normal;
|
|
58
|
+
font-display: swap;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
*,
|
|
62
|
+
*:after,
|
|
63
|
+
*:before {
|
|
64
|
+
box-sizing: border-box;
|
|
65
|
+
text-decoration: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
html,
|
|
69
|
+
body {
|
|
70
|
+
background: transparent;
|
|
71
|
+
min-height: 100%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
html {
|
|
75
|
+
font-size: clamp(14px, calc(100vw / ${mobile_width} * 14), 16px); //reset font size for mobile
|
|
76
|
+
line-height: 1;
|
|
77
|
+
|
|
78
|
+
color: var(--color-gray90);
|
|
79
|
+
background: var(--color-white);
|
|
80
|
+
|
|
81
|
+
@media only screen and (min-width: 580px) { //reset font size for tablet
|
|
82
|
+
font-size: clamp(14px, calc(100vw / ${tablet_width} * 14), 16px) ;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@media only screen and (min-width: ${responsiveMedia}) { //reset font size for desktop
|
|
86
|
+
font-size: clamp(14px, calc(100vw / ${desktop_width} * 16), 16px) ;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@media only screen and (min-width: 1680px) { //reset font size for retina
|
|
90
|
+
//Needed for retina screens
|
|
91
|
+
font-size: 16px;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
body {
|
|
96
|
+
position: relative;
|
|
97
|
+
|
|
98
|
+
font-family: var(--body-fontFamily);
|
|
99
|
+
${fontSize('texts')};
|
|
100
|
+
|
|
101
|
+
-webkit-overflow-scrolling: touch;
|
|
102
|
+
|
|
103
|
+
-webkit-font-smoothing: antialiased !important;
|
|
104
|
+
-moz-osx-font-smoothing: grayscale;
|
|
105
|
+
text-rendering: optimizeLegibility !important;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
a {
|
|
109
|
+
color: inherit;
|
|
110
|
+
outline: none;
|
|
111
|
+
text-decoration: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
img,
|
|
115
|
+
picture {
|
|
116
|
+
display: block;
|
|
117
|
+
max-width: 100%;
|
|
118
|
+
height: auto;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
picture{
|
|
122
|
+
position: relative;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
svg {
|
|
126
|
+
display: inline-block;
|
|
127
|
+
vertical-align: middle;
|
|
128
|
+
max-width: 100%;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
textarea {
|
|
132
|
+
resize: none;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
strong {
|
|
136
|
+
font-weight: 700;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
em {
|
|
140
|
+
font-style: italic;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
p a {
|
|
144
|
+
color: var(--color-secondary);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
hr {
|
|
148
|
+
border: 0;
|
|
149
|
+
border-top: 1px solid;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
pre {
|
|
153
|
+
font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;
|
|
154
|
+
clear: both;
|
|
155
|
+
color: #fff;
|
|
156
|
+
background: #1b1b1b;
|
|
157
|
+
padding: 0;
|
|
158
|
+
-moz-tab-size: 2;
|
|
159
|
+
-o-tab-size: 2;
|
|
160
|
+
tab-size: 2;
|
|
161
|
+
-ms-word-break: normal;
|
|
162
|
+
word-break: normal;
|
|
163
|
+
-webkit-hyphens: none;
|
|
164
|
+
-ms-hyphens: none;
|
|
165
|
+
hyphens: none;
|
|
166
|
+
position: relative;
|
|
167
|
+
line-height: 28px;
|
|
168
|
+
border-radius: 8px;
|
|
169
|
+
overflow: hidden;
|
|
170
|
+
|
|
171
|
+
& code {
|
|
172
|
+
background: none;
|
|
173
|
+
white-space: pre;
|
|
174
|
+
-webkit-overflow-scrolling: touch;
|
|
175
|
+
overflow-x: scroll;
|
|
176
|
+
display: block;
|
|
177
|
+
max-width: 100%;
|
|
178
|
+
min-width: 100px;
|
|
179
|
+
font-size: 16px;
|
|
180
|
+
padding: 15px 20px 12px 22px;
|
|
181
|
+
line-height: 1.75;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
select{
|
|
186
|
+
-webkit-appearance:none;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.ios,
|
|
190
|
+
.ios * {
|
|
191
|
+
// causes dom events events to be fired
|
|
192
|
+
cursor: pointer;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
/***************** TYPOGRAPHY *****************/
|
|
197
|
+
${Object.keys(typography).map(
|
|
198
|
+
(typo, i) =>
|
|
199
|
+
`.${typo}{
|
|
200
|
+
${fontSize(typo)}
|
|
201
|
+
}`
|
|
202
|
+
)}
|
|
203
|
+
|
|
204
|
+
p, li{
|
|
205
|
+
${fontSize('texts')}
|
|
206
|
+
}
|
|
207
|
+
/***************** LAYOUT *****************/
|
|
208
|
+
#progress-bar {
|
|
209
|
+
display: block;
|
|
210
|
+
position: fixed;
|
|
211
|
+
top: 0;
|
|
212
|
+
left: 0;
|
|
213
|
+
|
|
214
|
+
height: 0.2rem;
|
|
215
|
+
width: 100%;
|
|
216
|
+
|
|
217
|
+
background: var(--color-secondary-70);
|
|
218
|
+
|
|
219
|
+
z-index: ${zIndexes.progress};
|
|
220
|
+
|
|
221
|
+
transition: all 0.1s $ease-out-expo;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
#__next {
|
|
225
|
+
width: 100%;
|
|
226
|
+
height: 100%;
|
|
227
|
+
// overflow-x: hidden;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.main-page {
|
|
231
|
+
position: relative;
|
|
232
|
+
display: flex;
|
|
233
|
+
flex-flow: row wrap;
|
|
234
|
+
min-height: 100%;
|
|
235
|
+
|
|
236
|
+
z-index: ${zIndexes.content};
|
|
237
|
+
transition: all 1.3s $ease-out-expo;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.main-content {
|
|
241
|
+
position: relative;
|
|
242
|
+
width: 100%;
|
|
243
|
+
align-self: flex-start;
|
|
244
|
+
overflow-x: hidden;
|
|
245
|
+
z-index: 1;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.no-scroll{
|
|
249
|
+
overflow:hidden;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.preview-box {
|
|
253
|
+
position: fixed;
|
|
254
|
+
top: 12px;
|
|
255
|
+
left: 50%;
|
|
256
|
+
|
|
257
|
+
padding: 12px 22px;
|
|
258
|
+
|
|
259
|
+
color: var(--color-primary70);
|
|
260
|
+
background: var(--color-white);
|
|
261
|
+
box-shadow: 0px 2px 16px rgba(${colors.black}, 0.05);
|
|
262
|
+
border-radius: 50px;
|
|
263
|
+
|
|
264
|
+
transform: translateX(-50%);
|
|
265
|
+
z-index: ${zIndexes.preloader};
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.textEllipsis{
|
|
269
|
+
display: -webkit-box !important;
|
|
270
|
+
-webkit-box-orient: vertical;
|
|
271
|
+
-webkit-line-clamp: 2;
|
|
272
|
+
|
|
273
|
+
overflow: hidden;
|
|
274
|
+
text-overflow: ellipsis;
|
|
275
|
+
white-space: break-spaces;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.linker{
|
|
279
|
+
position: absolute;
|
|
280
|
+
top: 0;
|
|
281
|
+
left: 0;
|
|
282
|
+
width: 100%;
|
|
283
|
+
height: 100%;
|
|
284
|
+
|
|
285
|
+
text-indent: -200%;
|
|
286
|
+
white-space: nowrap;
|
|
287
|
+
font-size: 0;
|
|
288
|
+
opacity: 0;
|
|
289
|
+
z-index: 103;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
${Object.keys(utilities).map((util, i) => `${generateUtilities(util, '')}`)}
|
|
293
|
+
`
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
export default GlobalStyles;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
import { css } from 'styled-components';
|
|
5
|
+
import { grid_conf } from '@/styles/variables';
|
|
6
|
+
|
|
7
|
+
const BASE_CONF = grid_conf
|
|
8
|
+
|
|
9
|
+
const configCache: { container: any; breakpoints: any; media: any; }[] = []
|
|
10
|
+
const makeCacheId = () => JSON.stringify({})
|
|
11
|
+
const resolveConfig = () => {
|
|
12
|
+
const conf = {
|
|
13
|
+
...BASE_CONF,
|
|
14
|
+
container: {
|
|
15
|
+
...BASE_CONF.container as object,
|
|
16
|
+
},
|
|
17
|
+
breakpoints: {
|
|
18
|
+
...BASE_CONF.breakpoints as object,
|
|
19
|
+
},
|
|
20
|
+
media: {},
|
|
21
|
+
mediaContainer: {}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
conf.media = Object.keys(conf.breakpoints).reduce((media, breakpoint) => {
|
|
25
|
+
const breakpointWidth = conf.breakpoints[breakpoint]
|
|
26
|
+
media[breakpoint] = makeMedia(
|
|
27
|
+
[conf.mediaQuery, breakpoint !== 0 && `(min-width: ${breakpointWidth})`]
|
|
28
|
+
.filter(Boolean)
|
|
29
|
+
.join(' and ')
|
|
30
|
+
)
|
|
31
|
+
return media
|
|
32
|
+
}, {})
|
|
33
|
+
|
|
34
|
+
conf.mediaContainer = Object.keys(conf.container).reduce((media, container) => {
|
|
35
|
+
const containerWidth = conf.container[container]
|
|
36
|
+
media[container] = makeMedia(
|
|
37
|
+
[conf.mediaQuery, container !== 0 && `(min-width: ${containerWidth})`]
|
|
38
|
+
.filter(Boolean)
|
|
39
|
+
.join(' and ')
|
|
40
|
+
)
|
|
41
|
+
return media
|
|
42
|
+
}, {})
|
|
43
|
+
|
|
44
|
+
return conf
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const DIMENSION_NAMES = Object.keys(BASE_CONF.breakpoints)
|
|
48
|
+
export const CONTAINER_NAMES = Object.keys(BASE_CONF.container)
|
|
49
|
+
|
|
50
|
+
export default function config(props) {
|
|
51
|
+
const cacheId = makeCacheId(props)
|
|
52
|
+
if (configCache[0] === cacheId) {
|
|
53
|
+
return configCache[1]
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const conf = resolveConfig(props)
|
|
57
|
+
|
|
58
|
+
configCache[0] = cacheId
|
|
59
|
+
configCache[1] = conf
|
|
60
|
+
|
|
61
|
+
return conf
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function makeMedia(media) {
|
|
65
|
+
return (...args) => css`
|
|
66
|
+
@media ${media} {
|
|
67
|
+
${css(...args)}
|
|
68
|
+
}
|
|
69
|
+
`
|
|
70
|
+
}
|