Skip to content

Commit 18d4557

Browse files
committed
add basic typings for exported library functions
- StyleReset - Container - Row - Col - Div - iconPaths - Icon - Text - Button - Input - Textarea - Label - Checkbox - Radiobox - Switch - Image - Tag - Anchor - Collapse - Modal - SideDrawer - Notification - Dropdown - scrollTo - currentDevice - ThemeProvider
1 parent fa6a948 commit 18d4557

File tree

4 files changed

+384
-37
lines changed

4 files changed

+384
-37
lines changed

package.json

+38-37
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,40 @@
11
{
2-
"name": "atomize",
3-
"version": "1.0.21",
4-
"main": "index.js",
5-
"license": "MIT",
6-
"files": [
7-
"dist"
8-
],
9-
"scripts": {
10-
"start": "webpack-dev-server",
11-
"docs": "NODE_ENV=production webpack -p",
12-
"build": "babel src -d dist",
13-
"clean": "rm -rf dist",
14-
"dist": "yarn run clean && yarn run build"
15-
},
16-
"devDependencies": {
17-
"@babel/cli": "^7.4.4",
18-
"@babel/core": "^7.4.5",
19-
"@babel/preset-env": "^7.4.5",
20-
"@babel/preset-react": "^7.0.0",
21-
"babel-loader": "^8.0.6",
22-
"prism-react-renderer": "^0.1.6",
23-
"react": "^16.8.6",
24-
"react-dom": "^16.8.6",
25-
"react-transition-group": "^4.1.1",
26-
"styletron-engine-atomic": "^1.4.0",
27-
"styletron-react": "^5.2.0",
28-
"webpack": "^4.32.2",
29-
"webpack-cli": "^3.3.2",
30-
"webpack-dev-server": "^3.4.1"
31-
},
32-
"peerDependencies": {
33-
"react": ">= 16",
34-
"react-dom": ">= 16",
35-
"react-transition-group": ">= 4",
36-
"styletron-engine-atomic": "^1.4.0",
37-
"styletron-react": "^5.2.0"
38-
}
2+
"name": "atomize",
3+
"version": "1.0.21",
4+
"main": "index.js",
5+
"license": "MIT",
6+
"files": [
7+
"dist"
8+
],
9+
"scripts": {
10+
"start": "webpack-dev-server",
11+
"docs": "NODE_ENV=production webpack -p",
12+
"build": "babel src -d dist",
13+
"clean": "rm -rf dist",
14+
"dist": "yarn run clean && yarn run build"
15+
},
16+
"devDependencies": {
17+
"@babel/cli": "^7.4.4",
18+
"@babel/core": "^7.4.5",
19+
"@babel/preset-env": "^7.4.5",
20+
"@babel/preset-react": "^7.0.0",
21+
"@types/react": "^16.8.6",
22+
"babel-loader": "^8.0.6",
23+
"prism-react-renderer": "^0.1.6",
24+
"react": "^16.8.6",
25+
"react-dom": "^16.8.6",
26+
"react-transition-group": "^4.1.1",
27+
"styletron-engine-atomic": "^1.4.0",
28+
"styletron-react": "^5.2.0",
29+
"webpack": "^4.32.2",
30+
"webpack-cli": "^3.3.2",
31+
"webpack-dev-server": "^3.4.1"
32+
},
33+
"peerDependencies": {
34+
"react": ">= 16",
35+
"react-dom": ">= 16",
36+
"react-transition-group": ">= 4",
37+
"styletron-engine-atomic": "^1.4.0",
38+
"styletron-react": "^5.2.0"
39+
}
3940
}

src/typings/THEME.d.ts

+153
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
const THEME = {
2+
colors: {
3+
black900: '#0A1F44',
4+
black800: '#14284B',
5+
black700: '#283A5B',
6+
black600: '#364766',
7+
black500: '#455571',
8+
black400: '#4E5D78',
9+
black300: '#596780',
10+
black200: '#627088',
11+
black100: '#717D92',
12+
13+
gray900: '#8A94A6',
14+
gray800: '#98A1B1',
15+
gray700: '#A7AEBB',
16+
gray600: '#B0B7C3',
17+
gray500: '#C9CED6',
18+
gray400: '#E1E4E8',
19+
gray300: '#F1F2F4',
20+
gray200: '#F7F8F9',
21+
gray100: '#FAFBFB',
22+
23+
brand900: '#FF584A',
24+
brand800: '#FE6C61',
25+
brand700: '#FF867E',
26+
brand600: '#FFA29B',
27+
brand500: '#FFBDB8',
28+
brand400: '#FFCAC6',
29+
brand300: '#FFD7D4',
30+
brand200: '#FFE4E3',
31+
brand100: '#FFEEED',
32+
33+
success900: '#136A4A',
34+
success800: '#23825F',
35+
success700: '#36AB80',
36+
success600: '#6FCAA8',
37+
success500: '#A9DCC9',
38+
success400: '#D0EDDF',
39+
success300: '#EAF7F1',
40+
success200: '#F5FBF8',
41+
success100: '#FAFDFC',
42+
43+
warning900: '#EF8511',
44+
warning800: '#F69D2C',
45+
warning700: '#F7AF22',
46+
warning600: '#FBC050',
47+
warning500: '#FBE0A1',
48+
warning400: '#FDEECB',
49+
warning300: '#FEF7E6',
50+
warning200: '#FEFAF1',
51+
warning100: '#FFFDF8',
52+
53+
danger900: '#A32801',
54+
danger800: '#D13A06',
55+
danger700: '#F4541D',
56+
danger600: '#F7926F',
57+
danger500: '#FABEAA',
58+
danger400: '#FCD7CA',
59+
danger300: '#FDE8E1',
60+
danger200: '#FEF6F3',
61+
danger100: '#FFFBFA',
62+
63+
info900: '#01408F',
64+
info800: '#026DD6',
65+
info700: '#0284FE',
66+
info600: '#4BA7FE',
67+
info500: '#83C3FE',
68+
info400: '#B3DAFF',
69+
info300: '#DCEEFF',
70+
info200: '#EEF7FF',
71+
info100: '#F8FBFF',
72+
73+
white: '#FFFFFF',
74+
black: '#000000',
75+
transparent: 'rgba(0,0,0,0)',
76+
77+
disabled: '#B0B7C3',
78+
light: '#A7AAB0',
79+
medium: '#505256',
80+
dark: '#000000',
81+
},
82+
83+
grid: {
84+
containerMaxWidth: {
85+
xs: '540px',
86+
sm: '720px',
87+
md: '960px',
88+
lg: '1156px',
89+
xl: '1200px',
90+
},
91+
gutterWidth: '16px',
92+
colCount: 12,
93+
},
94+
95+
shadows: {
96+
0: 'none',
97+
1: '0 0 1px 0 rgba(8, 11, 14, 0.06), 0 1px 1px 0 rgba(8, 11, 14, 0.1)',
98+
2: '0 0 1px 0 rgba(8, 11, 14, 0.06), 0 3px 3px -1px rgba(8, 11, 14, 0.1)',
99+
3: '0 0 1px 0 rgba(8, 11, 14, 0.06), 0 6px 6px -1px rgba(8, 11, 14, 0.1)',
100+
4: '0 0 1px 0 rgba(8, 11, 14, 0.06), 0 16px 16px -1px rgba(8, 11, 14, 0.1)',
101+
5: '0 0 1px 0 rgba(8, 11, 14, 0.06), 0 32px 40px -1px rgba(8, 11, 14, 0.1)',
102+
},
103+
104+
fontFamily: {
105+
primary:
106+
'"SF Pro Text", -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"',
107+
secondary: 'SF Pro Text',
108+
code: 'monospace',
109+
},
110+
111+
rounded: {
112+
0: '0px',
113+
xs: '2px',
114+
sm: '4px',
115+
md: '6px',
116+
lg: '8px',
117+
xl: '12px',
118+
circle: '1000rem',
119+
},
120+
121+
transition: {
122+
true: 'all 0.4s ease-in-out',
123+
},
124+
125+
textSize: {
126+
size: {
127+
tiny: '10px',
128+
caption: '12px',
129+
body: '14px',
130+
paragraph: '14px',
131+
subheader: '17px',
132+
title: '22px',
133+
heading: '26px',
134+
display1: '32px',
135+
display2: '40px',
136+
display3: '56px',
137+
},
138+
height: {
139+
tiny: '16px',
140+
caption: '20px',
141+
body: '24px',
142+
paragraph: '26px',
143+
subheader: '30px',
144+
title: '32px',
145+
heading: '40px',
146+
display1: '48px',
147+
display2: '48px',
148+
display3: '64px',
149+
},
150+
},
151+
}
152+
153+
export default THEME

0 commit comments

Comments
 (0)