@sleeperhq/mini-core 1.2.4 → 1.2.6
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/index.ts +2 -2
- package/package.json +1 -1
- package/src/styles/fonts.ts +174 -0
- package/src/styles/index.ts +2 -0
- package/src/styles/theme.ts +69 -0
- package/src/packages/index.ts +0 -4
package/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as Sleeper from './src/components';
|
|
2
2
|
import DevServer from './src/dev_server';
|
|
3
3
|
import * as Types from './src/types';
|
|
4
|
-
import './src/
|
|
4
|
+
import {Fonts, Theme} from './src/styles';
|
|
5
5
|
|
|
6
|
-
export {Sleeper, DevServer, Types};
|
|
6
|
+
export {Sleeper, DevServer, Types, Fonts, Theme};
|
package/package.json
CHANGED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
const SHARED = {
|
|
2
|
+
INTER_EXTRALIGHT: 'Inter-ExtraLight',
|
|
3
|
+
INTER_THIN: 'Inter-Thin',
|
|
4
|
+
INTER_LIGHT: 'Inter-Light',
|
|
5
|
+
INTER_REGULAR: 'Inter-Regular',
|
|
6
|
+
INTER_MEDIUM: 'Inter-Medium',
|
|
7
|
+
INTER_SEMIBOLD: 'Inter-SemiBold',
|
|
8
|
+
INTER_BOLD: 'Inter-Bold',
|
|
9
|
+
INTER_BLACK: 'Inter-Black',
|
|
10
|
+
INTER_EXTRABOLD: 'Inter-ExtraBold',
|
|
11
|
+
|
|
12
|
+
POPPINS_THIN: 'Poppins-Thin',
|
|
13
|
+
POPPINS_LIGHT: 'Poppins-Light',
|
|
14
|
+
POPPINS_REGULAR: 'Poppins-Regular',
|
|
15
|
+
POPPINS_MEDIUM: 'Poppins-Medium',
|
|
16
|
+
POPPINS_SEMIBOLD: 'Poppins-SemiBold',
|
|
17
|
+
POPPINS_BOLD: 'Poppins-Bold',
|
|
18
|
+
POPPINS_BLACK: 'Poppins-Black',
|
|
19
|
+
POPPINS_EXTRABOLD: 'Poppins-ExtraBold',
|
|
20
|
+
} as const;
|
|
21
|
+
|
|
22
|
+
const Fonts = {
|
|
23
|
+
THIN: 'Lato-Thin',
|
|
24
|
+
LIGHT: 'Lato-Light',
|
|
25
|
+
REGULAR: 'Lato-Regular',
|
|
26
|
+
MEDIUM: 'Lato-Medium',
|
|
27
|
+
BOLD: 'Lato-Bold',
|
|
28
|
+
HEAVY: 'Lato-Heavy',
|
|
29
|
+
BLACK: 'Lato-Black',
|
|
30
|
+
|
|
31
|
+
MULI_THIN: 'Muli-ExtraLight',
|
|
32
|
+
MULI_LIGHT: 'Muli-Light',
|
|
33
|
+
MULI_REGULAR: 'Muli-Regular',
|
|
34
|
+
MULI_MEDIUM: 'Muli-SemiBold',
|
|
35
|
+
MULI_BOLD: 'Muli-Bold',
|
|
36
|
+
MULI_BLACK: 'Muli-Black',
|
|
37
|
+
MULI_EXTRABOLD: 'Muli-ExtraBold',
|
|
38
|
+
|
|
39
|
+
OSWALD__EXTRA_LIGHT: 'Oswald-ExtraLight',
|
|
40
|
+
OSWALD_LIGHT: 'Oswald-Light',
|
|
41
|
+
OSWALD_REGULAR: 'Oswald-Regular',
|
|
42
|
+
OSWALD_MEDIUM: 'Oswald-Medium',
|
|
43
|
+
OSWALD_SEMIBOLD: 'Oswald-SemiBold',
|
|
44
|
+
OSWALD_BOLD: 'Oswald-Bold',
|
|
45
|
+
|
|
46
|
+
DRUK_SUPERITALIC: 'Druk-SuperItalic',
|
|
47
|
+
CHANEY_EXTENDED: 'Chaney-Extended',
|
|
48
|
+
|
|
49
|
+
...SHARED,
|
|
50
|
+
|
|
51
|
+
Styles: {
|
|
52
|
+
H1: {
|
|
53
|
+
fontFamily: SHARED.POPPINS_EXTRABOLD,
|
|
54
|
+
fontSize: 32,
|
|
55
|
+
// lineHeight: 48,
|
|
56
|
+
},
|
|
57
|
+
H2: {
|
|
58
|
+
fontFamily: SHARED.POPPINS_EXTRABOLD,
|
|
59
|
+
fontSize: 28,
|
|
60
|
+
// lineHeight: 48,
|
|
61
|
+
},
|
|
62
|
+
H3: {
|
|
63
|
+
fontFamily: SHARED.POPPINS_BOLD,
|
|
64
|
+
fontSize: 24,
|
|
65
|
+
// lineHeight: 32,
|
|
66
|
+
},
|
|
67
|
+
H4: {
|
|
68
|
+
fontFamily: SHARED.POPPINS_BOLD,
|
|
69
|
+
fontSize: 20,
|
|
70
|
+
// lineHeight: 26,
|
|
71
|
+
},
|
|
72
|
+
Title: {
|
|
73
|
+
fontFamily: SHARED.POPPINS_SEMIBOLD,
|
|
74
|
+
fontSize: 18,
|
|
75
|
+
// lineHeight: 24,
|
|
76
|
+
},
|
|
77
|
+
Subhead: {
|
|
78
|
+
fontFamily: SHARED.POPPINS_SEMIBOLD,
|
|
79
|
+
fontSize: 16,
|
|
80
|
+
// lineHeight: 20,
|
|
81
|
+
},
|
|
82
|
+
Menu: {
|
|
83
|
+
fontFamily: SHARED.POPPINS_SEMIBOLD,
|
|
84
|
+
fontSize: 12,
|
|
85
|
+
// lineHeight: 16,
|
|
86
|
+
letterSpacing: 0.5,
|
|
87
|
+
},
|
|
88
|
+
ButtonLarge: {
|
|
89
|
+
fontFamily: SHARED.POPPINS_SEMIBOLD,
|
|
90
|
+
fontSize: 14,
|
|
91
|
+
// lineHeight: 16, // Cuts off the text at 14
|
|
92
|
+
letterSpacing: 1,
|
|
93
|
+
},
|
|
94
|
+
ButtonSmall: {
|
|
95
|
+
fontFamily: SHARED.POPPINS_SEMIBOLD,
|
|
96
|
+
fontSize: 12,
|
|
97
|
+
// lineHeight: 14, // Cuts off the text at 12
|
|
98
|
+
letterSpacing: 1,
|
|
99
|
+
},
|
|
100
|
+
TextCtaLarge: {
|
|
101
|
+
fontFamily: SHARED.POPPINS_SEMIBOLD,
|
|
102
|
+
fontSize: 14,
|
|
103
|
+
// lineHeight: 14,
|
|
104
|
+
letterSpacing: 1,
|
|
105
|
+
},
|
|
106
|
+
TextCtaSmall: {
|
|
107
|
+
fontFamily: SHARED.POPPINS_SEMIBOLD,
|
|
108
|
+
fontSize: 12,
|
|
109
|
+
// lineHeight: 12,
|
|
110
|
+
letterSpacing: 1,
|
|
111
|
+
},
|
|
112
|
+
Body1: {
|
|
113
|
+
fontFamily: SHARED.INTER_REGULAR,
|
|
114
|
+
fontSize: 16,
|
|
115
|
+
// lineHeight: 20,
|
|
116
|
+
letterSpacing: -0.15,
|
|
117
|
+
},
|
|
118
|
+
Body1Bold: {
|
|
119
|
+
fontFamily: SHARED.INTER_SEMIBOLD,
|
|
120
|
+
fontSize: 16,
|
|
121
|
+
// lineHeight: 20,
|
|
122
|
+
letterSpacing: -0.15,
|
|
123
|
+
},
|
|
124
|
+
Body2: {
|
|
125
|
+
fontFamily: SHARED.INTER_REGULAR,
|
|
126
|
+
fontSize: 14,
|
|
127
|
+
// lineHeight: 18,
|
|
128
|
+
letterSpacing: -0.25,
|
|
129
|
+
},
|
|
130
|
+
Body2Bold: {
|
|
131
|
+
fontFamily: SHARED.INTER_SEMIBOLD,
|
|
132
|
+
fontSize: 14,
|
|
133
|
+
// lineHeight: 18,
|
|
134
|
+
letterSpacing: -0.25,
|
|
135
|
+
},
|
|
136
|
+
Body3: {
|
|
137
|
+
fontFamily: SHARED.INTER_REGULAR,
|
|
138
|
+
fontSize: 12,
|
|
139
|
+
// lineHeight: 16,
|
|
140
|
+
letterSpacing: -0.15,
|
|
141
|
+
},
|
|
142
|
+
Body3Bold: {
|
|
143
|
+
fontFamily: SHARED.INTER_SEMIBOLD,
|
|
144
|
+
fontSize: 12,
|
|
145
|
+
// lineHeight: 16,
|
|
146
|
+
letterSpacing: -0.25,
|
|
147
|
+
},
|
|
148
|
+
Caption1: {
|
|
149
|
+
fontFamily: SHARED.INTER_REGULAR,
|
|
150
|
+
fontSize: 10,
|
|
151
|
+
// lineHeight: 12,
|
|
152
|
+
letterSpacing: -0.25,
|
|
153
|
+
},
|
|
154
|
+
Caption1Bold: {
|
|
155
|
+
fontFamily: SHARED.INTER_BOLD,
|
|
156
|
+
fontSize: 10,
|
|
157
|
+
// lineHeight: 12,
|
|
158
|
+
letterSpacing: -0.15,
|
|
159
|
+
},
|
|
160
|
+
Overline: {
|
|
161
|
+
fontFamily: SHARED.POPPINS_BOLD,
|
|
162
|
+
fontSize: 10,
|
|
163
|
+
letterSpacing: 0.25,
|
|
164
|
+
},
|
|
165
|
+
Footnote: {
|
|
166
|
+
fontFamily: SHARED.INTER_REGULAR,
|
|
167
|
+
fontSize: 9,
|
|
168
|
+
// lineHeight: 12,
|
|
169
|
+
letterSpacing: -0.25,
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
} as const;
|
|
173
|
+
|
|
174
|
+
export default Fonts;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
const Theme = {
|
|
2
|
+
name: 'dark',
|
|
3
|
+
|
|
4
|
+
backgroundBase: '#030616',
|
|
5
|
+
backgroundDark: '#15182d',
|
|
6
|
+
backgroundCard: '#252942',
|
|
7
|
+
backgroundIce: '#fbfbfb',
|
|
8
|
+
backgroundWhite: '#ffffff',
|
|
9
|
+
|
|
10
|
+
primaryText: '#ffffff',
|
|
11
|
+
secondaryText: '#a3bbd3', // gray300
|
|
12
|
+
|
|
13
|
+
gray100: '#eef2f7',
|
|
14
|
+
gray200: '#d8e2ed',
|
|
15
|
+
gray300: '#a3bbd3',
|
|
16
|
+
gray400: '#606f8c',
|
|
17
|
+
gray500: '#4a5870',
|
|
18
|
+
gray600: '#344054',
|
|
19
|
+
|
|
20
|
+
aqua: '#00baff',
|
|
21
|
+
blue: '#046ae0',
|
|
22
|
+
cypress: '#019494',
|
|
23
|
+
green: '#45e8a7',
|
|
24
|
+
lavender: '#b8bfff',
|
|
25
|
+
lilac: '#bd66ff',
|
|
26
|
+
mint: '#00ceb8',
|
|
27
|
+
orange: '#ff5c00',
|
|
28
|
+
pink: '#ff7db6',
|
|
29
|
+
purple: '#6e7df5',
|
|
30
|
+
red: '#ff2b6d',
|
|
31
|
+
salmon: '#ff6086',
|
|
32
|
+
yam: '#8e66ff',
|
|
33
|
+
yellow: '#ffae58',
|
|
34
|
+
white: '#ffffff',
|
|
35
|
+
black: '#000000',
|
|
36
|
+
dark: '#022047',
|
|
37
|
+
|
|
38
|
+
gradients: {
|
|
39
|
+
// The `LinearGradient` component explicitly expects an array of color string, so casting in advance.
|
|
40
|
+
primary: ['#4ce2a7', '#00b7b3'] as string[],
|
|
41
|
+
success: ['#4ce2b8', '#07c5ff'] as string[],
|
|
42
|
+
cheer: ['#ffaa7f', '#ff3a6e'] as string[],
|
|
43
|
+
alert: ['#ffae58', '#ff4542'] as string[],
|
|
44
|
+
purple: ['#89a5fb', '#635ee4'] as string[],
|
|
45
|
+
lilac: ['#db84ff', '#9139ff'] as string[],
|
|
46
|
+
blue: ['#7cdaf9', '#5e73e4'] as string[],
|
|
47
|
+
gray: ['#e6effa', '#a3bbd3'] as string[],
|
|
48
|
+
darkgray: ['#a3bbd3', '#3a465b'] as string[],
|
|
49
|
+
background: ['#55609f', '#101c5a'] as string[],
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
getColorForSport(sport: string) {
|
|
53
|
+
if (sport === 'cbb') {
|
|
54
|
+
return Theme.orange;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (sport === 'nba') {
|
|
58
|
+
return Theme.yellow;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (sport === 'lcs' || sport === 'lol') {
|
|
62
|
+
return Theme.aqua;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return Theme.mint;
|
|
66
|
+
},
|
|
67
|
+
} as const;
|
|
68
|
+
|
|
69
|
+
export default Theme;
|
package/src/packages/index.ts
DELETED