w-design-system 0.0.1
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/.storybook/main.ts +19 -0
- package/.storybook/preview.ts +14 -0
- package/README.md +46 -0
- package/README.old.md +1 -0
- package/dist/App.d.ts +5 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/App.js +9 -0
- package/dist/App.js.map +1 -0
- package/dist/App.test.d.ts +2 -0
- package/dist/App.test.d.ts.map +1 -0
- package/dist/App.test.js +9 -0
- package/dist/App.test.js.map +1 -0
- package/dist/assets/icon/index.d.ts +7 -0
- package/dist/assets/icon/index.d.ts.map +1 -0
- package/dist/assets/icon/index.js +7 -0
- package/dist/assets/icon/index.js.map +1 -0
- package/dist/components/Banner/index.d.ts +5 -0
- package/dist/components/Banner/index.d.ts.map +1 -0
- package/dist/components/Banner/index.js +33 -0
- package/dist/components/Banner/index.js.map +1 -0
- package/dist/components/Banner/stories.d.ts +7 -0
- package/dist/components/Banner/stories.d.ts.map +1 -0
- package/dist/components/Banner/stories.js +25 -0
- package/dist/components/Banner/stories.js.map +1 -0
- package/dist/components/Banner/styles.d.ts +4 -0
- package/dist/components/Banner/styles.d.ts.map +1 -0
- package/dist/components/Banner/styles.js +55 -0
- package/dist/components/Banner/styles.js.map +1 -0
- package/dist/components/Button /index.d.ts +5 -0
- package/dist/components/Button /index.d.ts.map +1 -0
- package/dist/components/Button /index.js +22 -0
- package/dist/components/Button /index.js.map +1 -0
- package/dist/components/Button /stories.d.ts +14 -0
- package/dist/components/Button /stories.d.ts.map +1 -0
- package/dist/components/Button /stories.js +88 -0
- package/dist/components/Button /stories.js.map +1 -0
- package/dist/components/Button /styles.d.ts +4 -0
- package/dist/components/Button /styles.d.ts.map +1 -0
- package/dist/components/Button /styles.js +194 -0
- package/dist/components/Button /styles.js.map +1 -0
- package/dist/components/Button /test.d.ts +2 -0
- package/dist/components/Button /test.d.ts.map +1 -0
- package/dist/components/Button /test.js +33 -0
- package/dist/components/Button /test.js.map +1 -0
- package/dist/components/ButtonRadiusIcon/index.d.ts +5 -0
- package/dist/components/ButtonRadiusIcon/index.d.ts.map +1 -0
- package/dist/components/ButtonRadiusIcon/index.js +26 -0
- package/dist/components/ButtonRadiusIcon/index.js.map +1 -0
- package/dist/components/ButtonRadiusIcon/stories.d.ts +8 -0
- package/dist/components/ButtonRadiusIcon/stories.d.ts.map +1 -0
- package/dist/components/ButtonRadiusIcon/stories.js +42 -0
- package/dist/components/ButtonRadiusIcon/stories.js.map +1 -0
- package/dist/components/ButtonRadiusIcon/styles.d.ts +4 -0
- package/dist/components/ButtonRadiusIcon/styles.d.ts.map +1 -0
- package/dist/components/ButtonRadiusIcon/styles.js +137 -0
- package/dist/components/ButtonRadiusIcon/styles.js.map +1 -0
- package/dist/components/ButtonRound/index.d.ts +5 -0
- package/dist/components/ButtonRound/index.d.ts.map +1 -0
- package/dist/components/ButtonRound/index.js +22 -0
- package/dist/components/ButtonRound/index.js.map +1 -0
- package/dist/components/ButtonRound/stories.d.ts +8 -0
- package/dist/components/ButtonRound/stories.d.ts.map +1 -0
- package/dist/components/ButtonRound/stories.js +44 -0
- package/dist/components/ButtonRound/stories.js.map +1 -0
- package/dist/components/ButtonRound/styles.d.ts +4 -0
- package/dist/components/ButtonRound/styles.d.ts.map +1 -0
- package/dist/components/ButtonRound/styles.js +134 -0
- package/dist/components/ButtonRound/styles.js.map +1 -0
- package/dist/components/IconWrapper/index.d.ts +12 -0
- package/dist/components/IconWrapper/index.d.ts.map +1 -0
- package/dist/components/IconWrapper/index.js +24 -0
- package/dist/components/IconWrapper/index.js.map +1 -0
- package/dist/components/Modal/index.d.ts +5 -0
- package/dist/components/Modal/index.d.ts.map +1 -0
- package/dist/components/Modal/index.js +32 -0
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/Modal/stories.d.ts +7 -0
- package/dist/components/Modal/stories.d.ts.map +1 -0
- package/dist/components/Modal/stories.js +24 -0
- package/dist/components/Modal/stories.js.map +1 -0
- package/dist/components/Modal/styles.d.ts +4 -0
- package/dist/components/Modal/styles.d.ts.map +1 -0
- package/dist/components/Modal/styles.js +48 -0
- package/dist/components/Modal/styles.js.map +1 -0
- package/dist/components/Paragraph/index.d.ts +11 -0
- package/dist/components/Paragraph/index.d.ts.map +1 -0
- package/dist/components/Paragraph/index.js +28 -0
- package/dist/components/Paragraph/index.js.map +1 -0
- package/dist/components/Paragraph/stories.d.ts +14 -0
- package/dist/components/Paragraph/stories.d.ts.map +1 -0
- package/dist/components/Paragraph/stories.js +95 -0
- package/dist/components/Paragraph/stories.js.map +1 -0
- package/dist/components/Tabs/index.d.ts +5 -0
- package/dist/components/Tabs/index.d.ts.map +1 -0
- package/dist/components/Tabs/index.js +14 -0
- package/dist/components/Tabs/index.js.map +1 -0
- package/dist/components/Tabs/stories.d.ts +7 -0
- package/dist/components/Tabs/stories.d.ts.map +1 -0
- package/dist/components/Tabs/stories.js +31 -0
- package/dist/components/Tabs/stories.js.map +1 -0
- package/dist/components/Tabs/styles.d.ts +6 -0
- package/dist/components/Tabs/styles.d.ts.map +1 -0
- package/dist/components/Tabs/styles.js +22 -0
- package/dist/components/Tabs/styles.js.map +1 -0
- package/dist/components/Themes/index.d.ts +79 -0
- package/dist/components/Themes/index.d.ts.map +1 -0
- package/dist/components/Themes/index.js +83 -0
- package/dist/components/Themes/index.js.map +1 -0
- package/dist/components/Title/index.d.ts +11 -0
- package/dist/components/Title/index.d.ts.map +1 -0
- package/dist/components/Title/index.js +18 -0
- package/dist/components/Title/index.js.map +1 -0
- package/dist/components/Title/stories.d.ts +9 -0
- package/dist/components/Title/stories.d.ts.map +1 -0
- package/dist/components/Title/stories.js +61 -0
- package/dist/components/Title/stories.js.map +1 -0
- package/dist/components/Types/index.d.ts +41 -0
- package/dist/components/Types/index.d.ts.map +1 -0
- package/dist/components/Types/index.js +2 -0
- package/dist/components/Types/index.js.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/prettier.config.d.ts +10 -0
- package/dist/prettier.config.d.ts.map +1 -0
- package/dist/prettier.config.js +13 -0
- package/dist/prettier.config.js.map +1 -0
- package/dist/reportWebVitals.d.ts +4 -0
- package/dist/reportWebVitals.d.ts.map +1 -0
- package/dist/reportWebVitals.js +14 -0
- package/dist/reportWebVitals.js.map +1 -0
- package/dist/setupTests.d.ts +2 -0
- package/dist/setupTests.d.ts.map +1 -0
- package/dist/setupTests.js +6 -0
- package/dist/setupTests.js.map +1 -0
- package/dist/src/globalStyles.d.ts +4 -0
- package/dist/src/globalStyles.d.ts.map +1 -0
- package/dist/src/globalStyles.js +10 -0
- package/dist/src/globalStyles.js.map +1 -0
- package/dist/stories/Button.d.ts +29 -0
- package/dist/stories/Button.d.ts.map +1 -0
- package/dist/stories/Button.js +22 -0
- package/dist/stories/Button.js.map +1 -0
- package/dist/stories/Button.stories.d.ts +25 -0
- package/dist/stories/Button.stories.d.ts.map +1 -0
- package/dist/stories/Button.stories.js +45 -0
- package/dist/stories/Button.stories.js.map +1 -0
- package/dist/stories/Header.d.ts +14 -0
- package/dist/stories/Header.d.ts.map +1 -0
- package/dist/stories/Header.js +21 -0
- package/dist/stories/Header.js.map +1 -0
- package/dist/stories/Header.stories.d.ts +20 -0
- package/dist/stories/Header.stories.d.ts.map +1 -0
- package/dist/stories/Header.stories.js +27 -0
- package/dist/stories/Header.stories.js.map +1 -0
- package/dist/stories/Page.d.ts +4 -0
- package/dist/stories/Page.d.ts.map +1 -0
- package/dist/stories/Page.js +38 -0
- package/dist/stories/Page.js.map +1 -0
- package/dist/stories/Page.stories.d.ts +14 -0
- package/dist/stories/Page.stories.d.ts.map +1 -0
- package/dist/stories/Page.stories.js +34 -0
- package/dist/stories/Page.stories.js.map +1 -0
- package/dist/types/App.d.ts +4 -0
- package/dist/types/App.test.d.ts +1 -0
- package/dist/types/assets/icon/index.d.ts +6 -0
- package/dist/types/components/Banner/index.d.ts +4 -0
- package/dist/types/components/Banner/stories.d.ts +6 -0
- package/dist/types/components/Banner/styles.d.ts +3 -0
- package/dist/types/components/Button /index.d.ts +4 -0
- package/dist/types/components/Button /stories.d.ts +13 -0
- package/dist/types/components/Button /styles.d.ts +3 -0
- package/dist/types/components/Button /test.d.ts +1 -0
- package/dist/types/components/ButtonRadiusIcon/index.d.ts +4 -0
- package/dist/types/components/ButtonRadiusIcon/stories.d.ts +7 -0
- package/dist/types/components/ButtonRadiusIcon/styles.d.ts +3 -0
- package/dist/types/components/ButtonRound/index.d.ts +4 -0
- package/dist/types/components/ButtonRound/stories.d.ts +7 -0
- package/dist/types/components/ButtonRound/styles.d.ts +3 -0
- package/dist/types/components/IconWrapper/index.d.ts +11 -0
- package/dist/types/components/Modal/index.d.ts +4 -0
- package/dist/types/components/Modal/stories.d.ts +6 -0
- package/dist/types/components/Modal/styles.d.ts +3 -0
- package/dist/types/components/Paragraph/index.d.ts +10 -0
- package/dist/types/components/Paragraph/stories.d.ts +13 -0
- package/dist/types/components/Tabs/index.d.ts +4 -0
- package/dist/types/components/Tabs/stories.d.ts +6 -0
- package/dist/types/components/Tabs/styles.d.ts +5 -0
- package/dist/types/components/Themes/index.d.ts +78 -0
- package/dist/types/components/Title/index.d.ts +10 -0
- package/dist/types/components/Title/stories.d.ts +8 -0
- package/dist/types/components/Types/index.d.ts +40 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/reportWebVitals.d.ts +3 -0
- package/dist/types/setupTests.d.ts +1 -0
- package/dist/types/src/globalStyles.d.ts +3 -0
- package/dist/types/stories/Button.d.ts +28 -0
- package/dist/types/stories/Button.stories.d.ts +24 -0
- package/dist/types/stories/Header.d.ts +13 -0
- package/dist/types/stories/Header.stories.d.ts +19 -0
- package/dist/types/stories/Page.d.ts +3 -0
- package/dist/types/stories/Page.stories.d.ts +13 -0
- package/dist/types/utils/constanst.d.ts +2 -0
- package/dist/utils/constanst.d.ts +3 -0
- package/dist/utils/constanst.d.ts.map +1 -0
- package/dist/utils/constanst.js +3 -0
- package/dist/utils/constanst.js.map +1 -0
- package/package.json +69 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/src/App.css +39 -0
- package/src/App.test.tsx +9 -0
- package/src/App.tsx +14 -0
- package/src/assets/icon/alert.svg +3 -0
- package/src/assets/icon/close.svg +10 -0
- package/src/assets/icon/comment.svg +10 -0
- package/src/assets/icon/doc-check.svg +10 -0
- package/src/assets/icon/image.svg +3 -0
- package/src/assets/icon/index.ts +6 -0
- package/src/assets/icon/svg.d.ts +4 -0
- package/src/components/Banner/index.tsx +49 -0
- package/src/components/Banner/stories.tsx +31 -0
- package/src/components/Banner/styles.ts +58 -0
- package/src/components/Button /index.tsx +33 -0
- package/src/components/Button /stories.tsx +98 -0
- package/src/components/Button /styles.ts +198 -0
- package/src/components/Button /test.tsx +36 -0
- package/src/components/ButtonRadiusIcon/index.tsx +24 -0
- package/src/components/ButtonRadiusIcon/stories.tsx +47 -0
- package/src/components/ButtonRadiusIcon/styles.ts +139 -0
- package/src/components/ButtonRound/index.tsx +27 -0
- package/src/components/ButtonRound/stories.tsx +50 -0
- package/src/components/ButtonRound/styles.ts +136 -0
- package/src/components/IconWrapper/index.tsx +45 -0
- package/src/components/Modal/index.tsx +32 -0
- package/src/components/Modal/stories.tsx +53 -0
- package/src/components/Modal/styles.ts +51 -0
- package/src/components/Paragraph/index.tsx +44 -0
- package/src/components/Paragraph/stories.tsx +107 -0
- package/src/components/Tabs/index.tsx +26 -0
- package/src/components/Tabs/stories.tsx +74 -0
- package/src/components/Tabs/styles.ts +23 -0
- package/src/components/Themes/index.ts +99 -0
- package/src/components/Title/index.tsx +35 -0
- package/src/components/Title/stories.tsx +70 -0
- package/src/components/Types/index.ts +45 -0
- package/src/components/index.ts +1 -0
- package/src/index.css +13 -0
- package/src/index.tsx +19 -0
- package/src/logo.svg +1 -0
- package/src/prettier.config.js +11 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/reportWebVitals.ts +16 -0
- package/src/setupTests.ts +5 -0
- package/src/src/globalStyles.ts +11 -0
- package/src/stories/Button.stories.ts +52 -0
- package/src/stories/Button.tsx +42 -0
- package/src/stories/Configure.mdx +364 -0
- package/src/stories/Header.stories.ts +33 -0
- package/src/stories/Header.tsx +56 -0
- package/src/stories/Page.stories.ts +32 -0
- package/src/stories/Page.tsx +73 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +69 -0
- package/src/utils/constanst.ts +2 -0
- package/tsconfig.json +38 -0
- package/webpack.config.js +12 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
export declare const spacing: {
|
|
2
|
+
space1: string;
|
|
3
|
+
space2: string;
|
|
4
|
+
space3: string;
|
|
5
|
+
space4: string;
|
|
6
|
+
space5: string;
|
|
7
|
+
space6: string;
|
|
8
|
+
space7: string;
|
|
9
|
+
space8: string;
|
|
10
|
+
space9: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const theme: {
|
|
13
|
+
zIndex: {
|
|
14
|
+
z1: number;
|
|
15
|
+
z2: number;
|
|
16
|
+
z3: number;
|
|
17
|
+
z4: number;
|
|
18
|
+
z5: number;
|
|
19
|
+
z6: number;
|
|
20
|
+
z7: number;
|
|
21
|
+
z8: number;
|
|
22
|
+
z9: number;
|
|
23
|
+
full: number;
|
|
24
|
+
};
|
|
25
|
+
spacing: {
|
|
26
|
+
space1: string;
|
|
27
|
+
space2: string;
|
|
28
|
+
space3: string;
|
|
29
|
+
space4: string;
|
|
30
|
+
space5: string;
|
|
31
|
+
space6: string;
|
|
32
|
+
space7: string;
|
|
33
|
+
space8: string;
|
|
34
|
+
space9: string;
|
|
35
|
+
};
|
|
36
|
+
colors: {
|
|
37
|
+
white: string;
|
|
38
|
+
black: string;
|
|
39
|
+
transparent: string;
|
|
40
|
+
cyan50: string;
|
|
41
|
+
cyan40: string;
|
|
42
|
+
cyan30: string;
|
|
43
|
+
cyan20: string;
|
|
44
|
+
cyan10: string;
|
|
45
|
+
mint40: string;
|
|
46
|
+
mint30: string;
|
|
47
|
+
mint20: string;
|
|
48
|
+
mint10: string;
|
|
49
|
+
honey40: string;
|
|
50
|
+
honey30: string;
|
|
51
|
+
honey20: string;
|
|
52
|
+
honey10: string;
|
|
53
|
+
red40: string;
|
|
54
|
+
red30: string;
|
|
55
|
+
red20: string;
|
|
56
|
+
red10: string;
|
|
57
|
+
shade50: string;
|
|
58
|
+
shade40: string;
|
|
59
|
+
shade30: string;
|
|
60
|
+
shade20: string;
|
|
61
|
+
shade10: string;
|
|
62
|
+
shade05: string;
|
|
63
|
+
yellow30: string;
|
|
64
|
+
yellow20: string;
|
|
65
|
+
yellow10: string;
|
|
66
|
+
};
|
|
67
|
+
fonts: string[];
|
|
68
|
+
title: {
|
|
69
|
+
medium: string;
|
|
70
|
+
large: string;
|
|
71
|
+
};
|
|
72
|
+
paragraph: {
|
|
73
|
+
'x-small': string;
|
|
74
|
+
small: string;
|
|
75
|
+
medium: string;
|
|
76
|
+
large: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Themes/index.ts"],"names":[],"mappings":"AAgDA,eAAO,MAAM,OAAO;;;;;;;;;;CAUnB,CAAA;AAeD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyBjB,CAAA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
const cyan = {
|
|
2
|
+
cyan50: '#001640',
|
|
3
|
+
cyan40: '#1A3D7F',
|
|
4
|
+
cyan30: '#025FDE',
|
|
5
|
+
cyan20: '#217EFD',
|
|
6
|
+
cyan10: '#EEF5FF',
|
|
7
|
+
};
|
|
8
|
+
const shades = {
|
|
9
|
+
shade50: '#333333',
|
|
10
|
+
shade40: '#666666',
|
|
11
|
+
shade30: '#999999',
|
|
12
|
+
shade20: '#EEEEEE',
|
|
13
|
+
shade10: '#EFF1F3',
|
|
14
|
+
shade05: '#FAFAFA',
|
|
15
|
+
};
|
|
16
|
+
const red = {
|
|
17
|
+
red40: '#981010',
|
|
18
|
+
red30: '#B41313',
|
|
19
|
+
red20: '#F3D9D9',
|
|
20
|
+
red10: '#F9EDED',
|
|
21
|
+
};
|
|
22
|
+
const honey = {
|
|
23
|
+
honey40: '#F77202',
|
|
24
|
+
honey30: '#F77202',
|
|
25
|
+
honey20: '#FCCEA7',
|
|
26
|
+
honey10: '#FDE3CC',
|
|
27
|
+
};
|
|
28
|
+
const yellow = {
|
|
29
|
+
yellow30: '#D08007',
|
|
30
|
+
yellow20: '#EFD3A8',
|
|
31
|
+
yellow10: '#FAF2E6',
|
|
32
|
+
};
|
|
33
|
+
const mint = {
|
|
34
|
+
mint40: '#059D2F',
|
|
35
|
+
mint30: '#06B737',
|
|
36
|
+
mint20: '#D7EFDE',
|
|
37
|
+
mint10: '#EBF8EF',
|
|
38
|
+
};
|
|
39
|
+
const white = '#FFFFFF';
|
|
40
|
+
const black = '#333333';
|
|
41
|
+
const transparent = 'transparent';
|
|
42
|
+
export const spacing = {
|
|
43
|
+
space1: '4px',
|
|
44
|
+
space2: '8px',
|
|
45
|
+
space3: '16px',
|
|
46
|
+
space4: '24px',
|
|
47
|
+
space5: '32px',
|
|
48
|
+
space6: '40px',
|
|
49
|
+
space7: '48px',
|
|
50
|
+
space8: '56px',
|
|
51
|
+
space9: '64px',
|
|
52
|
+
};
|
|
53
|
+
const zIndex = {
|
|
54
|
+
z1: 1,
|
|
55
|
+
z2: 2,
|
|
56
|
+
z3: 3,
|
|
57
|
+
z4: 4,
|
|
58
|
+
z5: 5,
|
|
59
|
+
z6: 6,
|
|
60
|
+
z7: 7,
|
|
61
|
+
z8: 8,
|
|
62
|
+
z9: 9,
|
|
63
|
+
full: 10000,
|
|
64
|
+
};
|
|
65
|
+
export const theme = {
|
|
66
|
+
zIndex,
|
|
67
|
+
spacing,
|
|
68
|
+
colors: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, yellow), shades), red), honey), mint), cyan), { white,
|
|
69
|
+
black,
|
|
70
|
+
transparent }),
|
|
71
|
+
fonts: ['Nunito Sans', 'Helvetica Neue', 'Helvetica', 'Arial', 'sans-serif'],
|
|
72
|
+
title: {
|
|
73
|
+
medium: '24px',
|
|
74
|
+
large: '34px',
|
|
75
|
+
},
|
|
76
|
+
paragraph: {
|
|
77
|
+
'x-small': '12px',
|
|
78
|
+
small: '14px',
|
|
79
|
+
medium: '16px',
|
|
80
|
+
large: '18px',
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Themes/index.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG;IACX,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;CAClB,CAAA;AAED,MAAM,MAAM,GAAG;IACb,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACnB,CAAA;AAED,MAAM,GAAG,GAAG;IACV,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,SAAS;CACjB,CAAA;AAED,MAAM,KAAK,GAAG;IACZ,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACnB,CAAA;AAED,MAAM,MAAM,GAAG;IACb,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;CACpB,CAAA;AAED,MAAM,IAAI,GAAG;IACX,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;CAClB,CAAA;AAED,MAAM,KAAK,GAAG,SAAS,CAAA;AACvB,MAAM,KAAK,GAAG,SAAS,CAAA;AACvB,MAAM,WAAW,GAAG,aAAa,CAAA;AAEjC,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;CACf,CAAA;AAED,MAAM,MAAM,GAAG;IACb,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,EAAE,EAAE,CAAC;IACL,IAAI,EAAE,KAAK;CACZ,CAAA;AAED,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,MAAM;IACN,OAAO;IACP,MAAM,wGACD,MAAM,GACN,MAAM,GACN,GAAG,GACH,KAAK,GACL,IAAI,GACJ,IAAI,KACP,KAAK;QACL,KAAK;QACL,WAAW,GACZ;IACD,KAAK,EAAE,CAAC,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,OAAO,EAAE,YAAY,CAAC;IAC5E,KAAK,EAAE;QACL,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;KACd;IACD,SAAS,EAAE;QACT,SAAS,EAAE,MAAM;QACjB,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;KACd;CACF,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ParagraphProps {
|
|
3
|
+
size: 'medium' | 'large';
|
|
4
|
+
bold?: boolean;
|
|
5
|
+
as?: 'h1' | 'h2' | 'h3';
|
|
6
|
+
color?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const Title: React.FC<ParagraphProps>;
|
|
10
|
+
export default Title;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Title/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,UAAU,cAAc;IACtB,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAA;IACxB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAgBD,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAMnC,CAAA;AAED,eAAe,KAAK,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { theme } from '../Themes';
|
|
4
|
+
const sizes = Object.assign({}, theme.title);
|
|
5
|
+
const TitleStyled = styled.p `
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
font-size: ${props => sizes[props.size]};
|
|
9
|
+
font-weight: ${props => (props.bold ? 800 : 400)};
|
|
10
|
+
line-height: 130%;
|
|
11
|
+
font-family: 'Nunito Sans', sans-serif;
|
|
12
|
+
color: ${props => props.color || 'inherit'}; // Aplicando a cor
|
|
13
|
+
`;
|
|
14
|
+
const Title = ({ size = 'medium', bold, as = 'h2', color, children }) => {
|
|
15
|
+
return (React.createElement(TitleStyled, { as: as, size: size, bold: bold, color: color }, children));
|
|
16
|
+
};
|
|
17
|
+
export default Title;
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Title/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,MAAM,MAAM,mBAAmB,CAAA;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAUjC,MAAM,KAAK,qBACN,KAAK,CAAC,KAAK,CACf,CAAA;AAED,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAgB;;;eAG7B,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;iBACxB,KAAK,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;;;WAGvC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,SAAS;CAC3C,CAAA;AAED,MAAM,KAAK,GAA6B,CAAC,EAAE,IAAI,GAAG,QAAQ,EAAE,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IAChG,OAAO,CACL,oBAAC,WAAW,IAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,IACtD,QAAQ,CACG,CACf,CAAA;AACH,CAAC,CAAA;AAED,eAAe,KAAK,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import Title from "./index";
|
|
3
|
+
declare const meta: Meta<typeof Title>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const LargeBoldTitle: Story;
|
|
7
|
+
export declare const MediumTitle: Story;
|
|
8
|
+
export declare const CustomColorTitle: Story;
|
|
9
|
+
//# sourceMappingURL=stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stories.d.ts","sourceRoot":"","sources":["../../../src/components/Title/stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,MAAM,SAAS,CAAC;AAI5B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CA4B5B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAGnC,eAAO,MAAM,cAAc,EAAE,KAQ5B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAQzB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAQ9B,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { theme } from '../Themes';
|
|
2
|
+
import Title from "./index";
|
|
3
|
+
const sizes = theme.title;
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Components/Title',
|
|
6
|
+
component: Title,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: 'centered',
|
|
9
|
+
},
|
|
10
|
+
argTypes: {
|
|
11
|
+
size: {
|
|
12
|
+
control: { type: 'select', options: ['medium', 'large'] },
|
|
13
|
+
description: 'Font size of the title',
|
|
14
|
+
},
|
|
15
|
+
bold: {
|
|
16
|
+
control: 'boolean',
|
|
17
|
+
description: 'Apply bold font weight',
|
|
18
|
+
},
|
|
19
|
+
as: {
|
|
20
|
+
control: { type: 'select', options: ['h1', 'h2', 'h3'] },
|
|
21
|
+
description: 'HTML element to render',
|
|
22
|
+
},
|
|
23
|
+
color: {
|
|
24
|
+
control: 'color',
|
|
25
|
+
description: 'Font color of the title',
|
|
26
|
+
},
|
|
27
|
+
children: {
|
|
28
|
+
control: 'text',
|
|
29
|
+
description: 'Content of the title',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
export default meta;
|
|
34
|
+
export const LargeBoldTitle = {
|
|
35
|
+
args: {
|
|
36
|
+
size: 'large',
|
|
37
|
+
bold: true,
|
|
38
|
+
as: 'h1',
|
|
39
|
+
color: '#1A3D7F',
|
|
40
|
+
children: 'Large Bold Title',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
export const MediumTitle = {
|
|
44
|
+
args: {
|
|
45
|
+
size: 'medium',
|
|
46
|
+
bold: false,
|
|
47
|
+
as: 'h2',
|
|
48
|
+
color: '#025FDE',
|
|
49
|
+
children: 'Medium Title',
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
export const CustomColorTitle = {
|
|
53
|
+
args: {
|
|
54
|
+
size: 'large',
|
|
55
|
+
bold: true,
|
|
56
|
+
as: 'h3',
|
|
57
|
+
color: '#FF5733',
|
|
58
|
+
children: 'Custom Color Title',
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
//# sourceMappingURL=stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../src/components/Title/stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;AAE1B,MAAM,IAAI,GAAuB;IAC7B,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE;QACR,MAAM,EAAE,UAAU;KACrB;IACD,QAAQ,EAAE;QACN,IAAI,EAAE;YACF,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE;YACzD,WAAW,EAAE,wBAAwB;SACxC;QACD,IAAI,EAAE;YACF,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,wBAAwB;SACxC;QACD,EAAE,EAAE;YACA,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE;YACxD,WAAW,EAAE,wBAAwB;SACxC;QACD,KAAK,EAAE;YACH,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,yBAAyB;SACzC;QACD,QAAQ,EAAE;YACN,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,sBAAsB;SACtC;KACJ;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,cAAc,GAAU;IACjC,IAAI,EAAE;QACF,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,IAAI;QACV,EAAE,EAAE,IAAI;QACR,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,kBAAkB;KAC/B;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAU;IAC9B,IAAI,EAAE;QACF,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,KAAK;QACX,EAAE,EAAE,IAAI;QACR,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,cAAc;KAC3B;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAU;IACnC,IAAI,EAAE;QACF,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,IAAI;QACV,EAAE,EAAE,IAAI;QACR,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,oBAAoB;KACjC;CACJ,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
type ColorsVariant = 'primary' | 'secondary' | 'success' | 'danger' | 'gray' | 'warning' | 'yellow';
|
|
3
|
+
type ColorsVariantBanner = 'notice' | 'success' | 'danger' | 'warning';
|
|
4
|
+
export interface ButtonTypes extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
+
variant?: ColorsVariant;
|
|
6
|
+
icon?: string;
|
|
7
|
+
radius?: boolean;
|
|
8
|
+
outline?: boolean;
|
|
9
|
+
halfLeft?: boolean;
|
|
10
|
+
halfRight?: boolean;
|
|
11
|
+
fullWidth?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ButtonRadiusIconTypes extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
14
|
+
variant?: ColorsVariant;
|
|
15
|
+
icon?: string;
|
|
16
|
+
subTitle?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ButtonRoundTypes extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
19
|
+
variant?: ColorsVariant;
|
|
20
|
+
icon?: string;
|
|
21
|
+
outline?: boolean;
|
|
22
|
+
badge?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface BannerTypes extends HTMLAttributes<HTMLDivElement> {
|
|
25
|
+
variant?: ColorsVariantBanner;
|
|
26
|
+
title?: string;
|
|
27
|
+
subTitle?: string;
|
|
28
|
+
onClick?: () => void;
|
|
29
|
+
}
|
|
30
|
+
export interface ModalTypes extends HTMLAttributes<HTMLDivElement> {
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
onClose: () => void;
|
|
33
|
+
footer?: ReactNode | ReactNode[];
|
|
34
|
+
}
|
|
35
|
+
export interface TabsTypes extends HTMLAttributes<HTMLDivElement> {
|
|
36
|
+
tabs: string[];
|
|
37
|
+
defaultActiveTab?: string;
|
|
38
|
+
onTabChange?: (activeTab: string) => void;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEvE,KAAK,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAA;AACnG,KAAK,mBAAmB,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAA;AACtE,MAAM,WAAW,WAAY,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC1E,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACpF,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IAC/E,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,WAAY,SAAQ,cAAc,CAAC,cAAc,CAAC;IACjE,OAAO,CAAC,EAAE,mBAAmB,CAAA;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,cAAc,CAAC;IAChE,QAAQ,EAAE,SAAS,CAAA;IACnB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,CAAA;CACjC;AAED,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC/D,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAA;CAC1C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Types/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom/client';
|
|
3
|
+
import './index.css';
|
|
4
|
+
import App from './App';
|
|
5
|
+
import reportWebVitals from './reportWebVitals';
|
|
6
|
+
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
7
|
+
root.render(React.createElement(React.StrictMode, null,
|
|
8
|
+
React.createElement(App, null)));
|
|
9
|
+
// If you want to start measuring performance in your app, pass a function
|
|
10
|
+
// to log results (for example: reportWebVitals(console.log))
|
|
11
|
+
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
|
12
|
+
reportWebVitals();
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,kBAAkB,CAAC;AACxC,OAAO,aAAa,CAAC;AACrB,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAEhD,MAAM,IAAI,GAAG,QAAQ,CAAC,UAAU,CAC9B,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAgB,CAC/C,CAAC;AACF,IAAI,CAAC,MAAM,CACT,oBAAC,KAAK,CAAC,UAAU;IACf,oBAAC,GAAG,OAAG,CACU,CACpB,CAAC;AAEF,0EAA0E;AAC1E,6DAA6D;AAC7D,0EAA0E;AAC1E,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const semi: boolean;
|
|
2
|
+
export const tabWidth: number;
|
|
3
|
+
export const singleQuote: boolean;
|
|
4
|
+
export const trailingComma: string;
|
|
5
|
+
export const arrowParens: string;
|
|
6
|
+
export const printWidth: number;
|
|
7
|
+
export const jsxSingleQuote: boolean;
|
|
8
|
+
export const jsxBracketSameLine: boolean;
|
|
9
|
+
export const bracketSpacing: boolean;
|
|
10
|
+
//# sourceMappingURL=prettier.config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prettier.config.d.ts","sourceRoot":"","sources":["../src/prettier.config.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = {
|
|
3
|
+
semi: false,
|
|
4
|
+
tabWidth: 2,
|
|
5
|
+
singleQuote: true,
|
|
6
|
+
trailingComma: 'all',
|
|
7
|
+
arrowParens: 'avoid',
|
|
8
|
+
printWidth: 120,
|
|
9
|
+
jsxSingleQuote: false,
|
|
10
|
+
jsxBracketSameLine: false,
|
|
11
|
+
bracketSpacing: true,
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=prettier.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prettier.config.js","sourceRoot":"","sources":["../src/prettier.config.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf,IAAI,EAAE,KAAK;IACX,QAAQ,EAAE,CAAC;IACX,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,KAAK;IACpB,WAAW,EAAE,OAAO;IACpB,UAAU,EAAE,GAAG;IACf,cAAc,EAAE,KAAK;IACrB,kBAAkB,EAAE,KAAK;IACzB,cAAc,EAAE,IAAI;CACrB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reportWebVitals.d.ts","sourceRoot":"","sources":["../src/reportWebVitals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE1C,QAAA,MAAM,eAAe,iBAAkB,aAAa,SAWnD,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const reportWebVitals = (onPerfEntry) => {
|
|
2
|
+
if (onPerfEntry && onPerfEntry instanceof Function) {
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
|
5
|
+
getCLS(onPerfEntry);
|
|
6
|
+
getFID(onPerfEntry);
|
|
7
|
+
getFCP(onPerfEntry);
|
|
8
|
+
getLCP(onPerfEntry);
|
|
9
|
+
getTTFB(onPerfEntry);
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export default reportWebVitals;
|
|
14
|
+
//# sourceMappingURL=reportWebVitals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reportWebVitals.js","sourceRoot":"","sources":["../src/reportWebVitals.ts"],"names":[],"mappings":"AAEA,MAAM,eAAe,GAAG,CAAC,WAA2B,EAAE,EAAE;IACtD,IAAI,WAAW,IAAI,WAAW,YAAY,QAAQ,EAAE;QAClD,aAAa;QACb,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE;YACxE,MAAM,CAAC,WAAW,CAAC,CAAA;YACnB,MAAM,CAAC,WAAW,CAAC,CAAA;YACnB,MAAM,CAAC,WAAW,CAAC,CAAA;YACnB,MAAM,CAAC,WAAW,CAAC,CAAA;YACnB,OAAO,CAAC,WAAW,CAAC,CAAA;QACtB,CAAC,CAAC,CAAA;KACH;AACH,CAAC,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupTests.d.ts","sourceRoot":"","sources":["../src/setupTests.ts"],"names":[],"mappings":"AAIA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
|
2
|
+
// allows you to do things like:
|
|
3
|
+
// expect(element).toHaveTextContent(/react/i)
|
|
4
|
+
// learn more: https://github.com/testing-library/jest-dom
|
|
5
|
+
import '@testing-library/jest-dom';
|
|
6
|
+
//# sourceMappingURL=setupTests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setupTests.js","sourceRoot":"","sources":["../src/setupTests.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,gCAAgC;AAChC,8CAA8C;AAC9C,0DAA0D;AAC1D,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globalStyles.d.ts","sourceRoot":"","sources":["../../src/src/globalStyles.ts"],"names":[],"mappings":";AAEA,QAAA,MAAM,WAAW,2FAMhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createGlobalStyle } from 'styled-components';
|
|
2
|
+
const GlobalStyle = createGlobalStyle `
|
|
3
|
+
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;700&display=swap');
|
|
4
|
+
|
|
5
|
+
body {
|
|
6
|
+
font-family: 'Nunito Sans', sans-serif;
|
|
7
|
+
}
|
|
8
|
+
`;
|
|
9
|
+
export default GlobalStyle;
|
|
10
|
+
//# sourceMappingURL=globalStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globalStyles.js","sourceRoot":"","sources":["../../src/src/globalStyles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,GAAG,iBAAiB,CAAA;;;;;;CAMpC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './button.css';
|
|
3
|
+
export interface ButtonTypes {
|
|
4
|
+
/**
|
|
5
|
+
* Is this the principal call to action on the page?
|
|
6
|
+
*/
|
|
7
|
+
primary?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* What background color to use
|
|
10
|
+
*/
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
/**
|
|
13
|
+
* How large should the button be?
|
|
14
|
+
*/
|
|
15
|
+
size?: 'small' | 'medium' | 'large';
|
|
16
|
+
/**
|
|
17
|
+
* Button contents
|
|
18
|
+
*/
|
|
19
|
+
label: string;
|
|
20
|
+
/**
|
|
21
|
+
* Optional click handler
|
|
22
|
+
*/
|
|
23
|
+
onClick?: () => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Primary UI component for user interaction
|
|
27
|
+
*/
|
|
28
|
+
export declare const Button: ({ primary, size, backgroundColor, label, ...props }: ButtonTypes) => React.JSX.Element;
|
|
29
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/stories/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,cAAc,CAAA;AAErB,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,MAAM,wDAA4E,WAAW,sBAYzG,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import './button.css';
|
|
14
|
+
/**
|
|
15
|
+
* Primary UI component for user interaction
|
|
16
|
+
*/
|
|
17
|
+
export const Button = (_a) => {
|
|
18
|
+
var { primary = false, size = 'medium', backgroundColor, label } = _a, props = __rest(_a, ["primary", "size", "backgroundColor", "label"]);
|
|
19
|
+
const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
|
|
20
|
+
return (React.createElement("button", Object.assign({ type: "button", className: ['storybook-button', `storybook-button--${size}`, mode].join(' '), style: { backgroundColor } }, props), label));
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/stories/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,cAAc,CAAA;AAyBrB;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAmF,EAAE,EAAE;QAAvF,EAAE,OAAO,GAAG,KAAK,EAAE,IAAI,GAAG,QAAQ,EAAE,eAAe,EAAE,KAAK,OAAyB,EAApB,KAAK,cAApE,+CAAsE,CAAF;IACzF,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,6BAA6B,CAAA;IAClF,OAAO,CACL,8CACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,CAAC,kBAAkB,EAAE,qBAAqB,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAC5E,KAAK,EAAE,EAAE,eAAe,EAAE,IACtB,KAAK,GAER,KAAK,CACC,CACV,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: ({ primary, size, backgroundColor, label, ...props }: import("./Button").ButtonTypes) => import("react").JSX.Element;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {
|
|
11
|
+
backgroundColor: {
|
|
12
|
+
control: "color";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
args: {
|
|
16
|
+
onClick: import("@vitest/spy").Mock<[], void>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
export declare const Primary: Story;
|
|
22
|
+
export declare const Secondary: Story;
|
|
23
|
+
export declare const Large: Story;
|
|
24
|
+
export declare const Small: Story;
|
|
25
|
+
//# sourceMappingURL=Button.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../src/stories/Button.stories.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;CAeqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAGnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { fn } from '@storybook/test';
|
|
2
|
+
import { Button } from './Button';
|
|
3
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Example/Button',
|
|
6
|
+
component: Button,
|
|
7
|
+
parameters: {
|
|
8
|
+
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
|
|
12
|
+
tags: ['autodocs'],
|
|
13
|
+
// More on argTypes: https://storybook.js.org/docs/api/argtypes
|
|
14
|
+
argTypes: {
|
|
15
|
+
backgroundColor: { control: 'color' },
|
|
16
|
+
},
|
|
17
|
+
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
|
|
18
|
+
args: { onClick: fn() },
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
|
|
22
|
+
export const Primary = {
|
|
23
|
+
args: {
|
|
24
|
+
primary: true,
|
|
25
|
+
label: 'Button',
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
export const Secondary = {
|
|
29
|
+
args: {
|
|
30
|
+
label: 'Button',
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
export const Large = {
|
|
34
|
+
args: {
|
|
35
|
+
size: 'large',
|
|
36
|
+
label: 'Button',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
export const Small = {
|
|
40
|
+
args: {
|
|
41
|
+
size: 'small',
|
|
42
|
+
label: 'Button',
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=Button.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.stories.js","sourceRoot":"","sources":["../../src/stories/Button.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,iGAAiG;AACjG,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,gBAAgB;IACvB,SAAS,EAAE,MAAM;IACjB,UAAU,EAAE;QACV,4HAA4H;QAC5H,MAAM,EAAE,UAAU;KACnB;IACD,0HAA0H;IAC1H,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,+DAA+D;IAC/D,QAAQ,EAAE;QACR,eAAe,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;KACtC;IACD,wJAAwJ;IACxJ,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE;CACM,CAAC;AAEhC,eAAe,IAAI,CAAC;AAGpB,wFAAwF;AACxF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,QAAQ;KAChB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,IAAI,EAAE;QACJ,KAAK,EAAE,QAAQ;KAChB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,QAAQ;KAChB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,QAAQ;KAChB;CACF,CAAC"}
|