@learningpool/ui 2.1.0 → 2.3.0

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/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "components",
10
10
  "ui"
11
11
  ],
12
- "version": "2.1.0",
12
+ "version": "2.3.0",
13
13
  "private": false,
14
14
  "main": "index.js",
15
15
  "module": "index.js",
package/utils/theme.d.ts CHANGED
@@ -1,94 +1,6 @@
1
- export declare const defaultTheme: {
2
- typography: {
3
- h1: {
4
- fontFamily: string;
5
- };
6
- h2: {
7
- fontFamily: string;
8
- };
9
- h3: {
10
- fontFamily: string;
11
- };
12
- h4: {
13
- fontFamily: string;
14
- };
15
- h5: {
16
- fontFamily: string;
17
- };
18
- h6: {
19
- fontFamily: string;
20
- };
21
- subtitle1: {
22
- fontFamily: string;
23
- };
24
- subtitle2: {
25
- fontFamily: string;
26
- };
27
- body1: {
28
- fontFamily: string;
29
- };
30
- body2: {
31
- fontFamily: string;
32
- };
33
- button: {
34
- fontWeight: number;
35
- fontFamily: string;
36
- };
37
- caption: {
38
- fontFamily: string;
39
- };
40
- overline: {
41
- fontFamily: string;
42
- };
43
- fontFamily: string;
44
- };
45
- };
46
- export declare const lightTheme: {
47
- palette: {
48
- primary: {
49
- main: string;
50
- };
51
- secondary: {
52
- main: "#2196f3";
53
- };
54
- divider: string;
55
- text: {
56
- primary: string;
57
- };
58
- navigation: {
59
- background: string;
60
- };
61
- contrastThreshold: number;
62
- };
63
- };
64
- export declare const darkTheme: {
65
- palette: {
66
- primary: {
67
- 50: "#fff8e1";
68
- 100: "#ffecb3";
69
- 200: "#ffe082";
70
- 300: "#ffd54f";
71
- 400: "#ffca28";
72
- 500: "#ffc107";
73
- 600: "#ffb300";
74
- 700: "#ffa000";
75
- 800: "#ff8f00";
76
- 900: "#ff6f00";
77
- A100: "#ffe57f";
78
- A200: "#ffd740";
79
- A400: "#ffc400";
80
- A700: "#ffab00";
81
- };
82
- divider: string;
83
- text: {
84
- primary: string;
85
- };
86
- navigation: {
87
- background: string;
88
- };
89
- contrastThreshold: number;
90
- };
91
- };
1
+ export declare const defaultTheme: import("@mui/material/styles").Theme;
2
+ export declare const darkTheme: import("@mui/material/styles").Theme;
3
+ export declare const lightTheme: import("@mui/material/styles").Theme;
92
4
  export declare const motion: {
93
5
  ease: string;
94
6
  easeOut: string;
package/utils/theme.js CHANGED
@@ -1,14 +1,15 @@
1
- import { amber, blue } from '@mui/material/colors';
1
+ import { lightBlue, orange } from '@mui/material/colors';
2
+ import { createTheme } from '@mui/material/styles';
3
+ const DEFAULT_FONT_FAMILY = '"Roboto", "Helvetica", "Arial", sans-serif';
2
4
  const DEFAULT_HEADER_TYPOGRAPHY = {
3
- fontFamily: '"Roboto", "Helvetica", "Arial", sans-serif'
5
+ fontFamily: DEFAULT_FONT_FAMILY
4
6
  };
5
7
  const DEFAULT_BODY_TYPOGRAPHY = {
6
- fontFamily: '"Roboto", "Helvetica", "Arial", sans-serif'
8
+ fontFamily: DEFAULT_FONT_FAMILY
7
9
  };
8
- // @TODO: Discuss this with the experience design team, according to the UUI Figma
9
- export const defaultTheme = {
10
+ export const defaultTheme = createTheme({
10
11
  typography: {
11
- ...DEFAULT_BODY_TYPOGRAPHY,
12
+ fontFamily: DEFAULT_FONT_FAMILY,
12
13
  h1: DEFAULT_HEADER_TYPOGRAPHY,
13
14
  h2: DEFAULT_HEADER_TYPOGRAPHY,
14
15
  h3: DEFAULT_HEADER_TYPOGRAPHY,
@@ -20,30 +21,28 @@ export const defaultTheme = {
20
21
  body1: DEFAULT_BODY_TYPOGRAPHY,
21
22
  body2: DEFAULT_BODY_TYPOGRAPHY,
22
23
  button: {
23
- ...DEFAULT_BODY_TYPOGRAPHY,
24
- fontWeight: 700
24
+ fontFamily: DEFAULT_FONT_FAMILY,
25
+ fontSize: '1rem',
26
+ fontWeight: 500,
27
+ textTransform: 'none'
25
28
  },
26
29
  caption: DEFAULT_BODY_TYPOGRAPHY,
27
30
  overline: DEFAULT_BODY_TYPOGRAPHY
28
- }
29
- // overrides: {
30
- // MuiCssBaseline: {
31
- // '@global': {
32
- // '.MuiAvatarGroup-root .MuiAvatar-root:first-of-type': {
33
- // backgroundColor: '#eee',
34
- // color: '#333'
35
- // }
36
- // }
37
- // }
38
- // }
39
- };
40
- export const lightTheme = {
31
+ },
41
32
  palette: {
42
33
  primary: {
43
34
  main: '#0077cc'
44
35
  },
45
36
  secondary: {
46
- main: blue[500]
37
+ main: '#003366'
38
+ },
39
+ warning: {
40
+ main: orange[800],
41
+ contrastText: '#fff'
42
+ },
43
+ info: {
44
+ main: lightBlue[700],
45
+ contrastText: '#fff'
47
46
  },
48
47
  divider: 'rgba(0, 0, 0, 0.075)',
49
48
  text: {
@@ -54,20 +53,101 @@ export const lightTheme = {
54
53
  },
55
54
  contrastThreshold: 4.5
56
55
  }
57
- };
58
- export const darkTheme = {
56
+ });
57
+ export const darkTheme = createTheme({
58
+ typography: {
59
+ fontFamily: DEFAULT_FONT_FAMILY,
60
+ h1: DEFAULT_HEADER_TYPOGRAPHY,
61
+ h2: DEFAULT_HEADER_TYPOGRAPHY,
62
+ h3: DEFAULT_HEADER_TYPOGRAPHY,
63
+ h4: DEFAULT_HEADER_TYPOGRAPHY,
64
+ h5: DEFAULT_HEADER_TYPOGRAPHY,
65
+ h6: DEFAULT_HEADER_TYPOGRAPHY,
66
+ subtitle1: DEFAULT_BODY_TYPOGRAPHY,
67
+ subtitle2: DEFAULT_BODY_TYPOGRAPHY,
68
+ body1: DEFAULT_BODY_TYPOGRAPHY,
69
+ body2: DEFAULT_BODY_TYPOGRAPHY,
70
+ button: {
71
+ fontFamily: DEFAULT_FONT_FAMILY,
72
+ fontSize: '1rem',
73
+ fontWeight: 500,
74
+ textTransform: 'none'
75
+ },
76
+ caption: DEFAULT_BODY_TYPOGRAPHY,
77
+ overline: DEFAULT_BODY_TYPOGRAPHY
78
+ },
59
79
  palette: {
60
- primary: amber,
80
+ primary: {
81
+ main: '#000000'
82
+ },
83
+ secondary: {
84
+ main: '#333333'
85
+ },
86
+ warning: {
87
+ main: orange[800],
88
+ contrastText: '#fff'
89
+ },
90
+ info: {
91
+ main: lightBlue[700],
92
+ contrastText: '#fff'
93
+ },
61
94
  divider: 'rgba(255, 255, 255, 0.075)',
62
95
  text: {
63
96
  primary: 'rgba(255,255,255,0.95)'
64
97
  },
65
98
  navigation: {
66
- background: '#212121'
99
+ background: '#000'
67
100
  },
68
101
  contrastThreshold: 4.5
69
102
  }
70
- };
103
+ });
104
+ export const lightTheme = createTheme({
105
+ typography: {
106
+ fontFamily: DEFAULT_FONT_FAMILY,
107
+ h1: DEFAULT_HEADER_TYPOGRAPHY,
108
+ h2: DEFAULT_HEADER_TYPOGRAPHY,
109
+ h3: DEFAULT_HEADER_TYPOGRAPHY,
110
+ h4: DEFAULT_HEADER_TYPOGRAPHY,
111
+ h5: DEFAULT_HEADER_TYPOGRAPHY,
112
+ h6: DEFAULT_HEADER_TYPOGRAPHY,
113
+ subtitle1: DEFAULT_BODY_TYPOGRAPHY,
114
+ subtitle2: DEFAULT_BODY_TYPOGRAPHY,
115
+ body1: DEFAULT_BODY_TYPOGRAPHY,
116
+ body2: DEFAULT_BODY_TYPOGRAPHY,
117
+ button: {
118
+ fontFamily: DEFAULT_FONT_FAMILY,
119
+ fontSize: '1rem',
120
+ fontWeight: 500,
121
+ textTransform: 'none'
122
+ },
123
+ caption: DEFAULT_BODY_TYPOGRAPHY,
124
+ overline: DEFAULT_BODY_TYPOGRAPHY
125
+ },
126
+ palette: {
127
+ primary: {
128
+ main: '#ffffff'
129
+ },
130
+ secondary: {
131
+ main: '#cccccc'
132
+ },
133
+ warning: {
134
+ main: orange[800],
135
+ contrastText: '#fff'
136
+ },
137
+ info: {
138
+ main: lightBlue[700],
139
+ contrastText: '#fff'
140
+ },
141
+ divider: 'rgba(0, 0, 0, 0.075)',
142
+ text: {
143
+ primary: 'rgba(0,0,0,0.95)'
144
+ },
145
+ navigation: {
146
+ background: '#fff'
147
+ },
148
+ contrastThreshold: 4.5
149
+ }
150
+ });
71
151
  export const motion = {
72
152
  ease: 'cubic-bezier(0.4, 0.0, 0.2, 1)',
73
153
  easeOut: 'cubic-bezier(0.0, 0.0, 0.2, 1)',