@movable/ui 0.1.0 → 0.1.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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- ## [0.1.0](https://github.com/movableink/ui/compare/0.1.0-alpha.1...0.1.0) (2023-09-19)
3
+ ## [0.1.1](https://github.com/movableink/ui/compare/0.1.0-alpha.1...0.1.1) (2023-10-13)
4
4
 
5
5
  ## [0.1.0-alpha.1](https://github.com/movableink/ui/compare/0.1.0-alpha.0...0.1.0-alpha.1) (2023-09-19)
6
6
 
package/README.md CHANGED
@@ -3,11 +3,32 @@
3
3
  This repo contains the shared components for our frontend applications. Using this [react component library guide](https://prateeksurana.me/blog/react-component-library-using-storybook-7/#compiling-the-library-using-rollup)
4
4
 
5
5
  ## Local Development
6
+
6
7
  ### Installation
7
8
 
8
9
  1. Ensure you have [`volta`](https://volta.sh) installed on your computer
9
10
  2. Clone the repo
10
- 3. `npm install`
11
+ 3. `npm install` (note: `npm`, not `yarn`)
12
+
13
+ ### Linking to local Studio
14
+
15
+ 1. `@movable/ui`: `npm run watch`
16
+
17
+ 2. `front-end/packages/studio` (after making the change below): `yarn`, then `yarn dev`, `yarn test:dev`, or similar
18
+
19
+ ```js
20
+ // front-end/packages/studio/package.json
21
+
22
+ {
23
+ // ...
24
+ "devDependencies": {
25
+ "@movable/ui": "link:./path/to/ui"
26
+ // ...
27
+ }
28
+ // ...
29
+ }
30
+ ```
31
+
11
32
  ## Conventional Commits
12
33
 
13
34
  This repo has [conventional-commits](https://www.conventionalcommits.org/en/v1.0.0/#summary) We lint for this both pre-commit and on PR actions. It is **required** and will not pass without it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movable/ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Movable Ink's shared MUI components and MUI theme for our vite applications",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
@@ -8,6 +8,7 @@
8
8
  "scripts": {
9
9
  "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
10
10
  "build": "rollup -c",
11
+ "watch": "rollup -c -w",
11
12
  "release": "release-it",
12
13
  "prepare": "husky install"
13
14
  },
package/src/theme.ts CHANGED
@@ -2,10 +2,13 @@ import {
2
2
  blue,
3
3
  green,
4
4
  grey,
5
+ indigo,
5
6
  lightBlue,
7
+ lightGreen,
6
8
  orange,
7
9
  purple,
8
10
  red,
11
+ yellow,
9
12
  } from '@mui/material/colors';
10
13
  import { ThemeOptions, alpha, createTheme } from '@mui/material/styles';
11
14
 
@@ -15,6 +18,56 @@ declare module '@mui/material/styles' {
15
18
  }
16
19
  interface Palette {
17
20
  focusVisible: string;
21
+ blue50: string;
22
+ blue100: string;
23
+ blue200: string;
24
+ blue300: string;
25
+ blue400: string;
26
+ blue500: string;
27
+ blue600: string;
28
+ blue700: string;
29
+ blue800: string;
30
+ blue900: string;
31
+ indigo50: string;
32
+ indigo100: string;
33
+ indigo200: string;
34
+ indigo300: string;
35
+ indigo400: string;
36
+ indigo500: string;
37
+ indigo600: string;
38
+ indigo700: string;
39
+ indigo800: string;
40
+ indigo900: string;
41
+ green50: string;
42
+ green100: string;
43
+ green200: string;
44
+ green300: string;
45
+ green400: string;
46
+ green500: string;
47
+ green600: string;
48
+ green700: string;
49
+ green800: string;
50
+ green900: string;
51
+ lightBlue50: string;
52
+ lightBlue100: string;
53
+ lightBlue200: string;
54
+ lightBlue300: string;
55
+ lightBlue400: string;
56
+ lightBlue500: string;
57
+ lightBlue600: string;
58
+ lightBlue700: string;
59
+ lightBlue800: string;
60
+ lightBlue900: string;
61
+ lightGreen50: string;
62
+ lightGreen100: string;
63
+ lightGreen200: string;
64
+ lightGreen300: string;
65
+ lightGreen400: string;
66
+ lightGreen500: string;
67
+ lightGreen600: string;
68
+ lightGreen700: string;
69
+ lightGreen800: string;
70
+ lightGreen900: string;
18
71
  neutral50: string;
19
72
  neutral100: string;
20
73
  neutral200: string;
@@ -29,16 +82,36 @@ declare module '@mui/material/styles' {
29
82
  neutralA200: string;
30
83
  neutralA400: string;
31
84
  neutralA700: string;
32
- blue50: string;
33
- blue100: string;
34
- blue200: string;
35
- blue300: string;
36
- blue400: string;
37
- blue500: string;
38
- blue600: string;
39
- blue700: string;
40
- blue800: string;
41
- blue900: string;
85
+ orange50: string;
86
+ orange100: string;
87
+ orange200: string;
88
+ orange300: string;
89
+ orange400: string;
90
+ orange500: string;
91
+ orange600: string;
92
+ orange700: string;
93
+ orange800: string;
94
+ orange900: string;
95
+ purple50: string;
96
+ purple100: string;
97
+ purple200: string;
98
+ purple300: string;
99
+ purple400: string;
100
+ purple500: string;
101
+ purple600: string;
102
+ purple700: string;
103
+ purple800: string;
104
+ purple900: string;
105
+ yellow50: string;
106
+ yellow100: string;
107
+ yellow200: string;
108
+ yellow300: string;
109
+ yellow400: string;
110
+ yellow500: string;
111
+ yellow600: string;
112
+ yellow700: string;
113
+ yellow800: string;
114
+ yellow900: string;
42
115
  }
43
116
  interface PalletteOptions {
44
117
  focusVisible: string;
@@ -67,7 +140,51 @@ declare module '@mui/material/styles' {
67
140
 
68
141
  // TODO [Low]: put in /shared folder
69
142
  const theme = createTheme({
143
+ typography: {
144
+ fontFamily: ['Inter', 'Roboto', 'sans-serif'].join(','),
145
+ },
146
+
70
147
  components: {
148
+ MuiButton: {
149
+ styleOverrides: {
150
+ root: {
151
+ textTransform: 'capitalize',
152
+ },
153
+ textPrimary: {
154
+ color: blue[400],
155
+ },
156
+ outlinedInherit: {
157
+ borderColor: alpha(grey[900], 0.03),
158
+ },
159
+ },
160
+ },
161
+
162
+ MuiChip: {
163
+ styleOverrides: {
164
+ filledPrimary: {
165
+ backgroundColor: blue[50],
166
+ color: blue[900],
167
+ '.MuiChip-deleteIcon': {
168
+ color: blue[800],
169
+ '&:hover': {
170
+ color: blue[900],
171
+ },
172
+ '&:active': {
173
+ color: blue[900],
174
+ },
175
+ },
176
+ },
177
+ filledSuccess: {
178
+ backgroundColor: green[50],
179
+ color: green[900],
180
+ },
181
+ filledError: {
182
+ backgroundColor: red[50],
183
+ color: blue[900],
184
+ },
185
+ },
186
+ },
187
+
71
188
  MuiDataGrid: {
72
189
  styleOverrides: {
73
190
  root: {
@@ -89,20 +206,18 @@ const theme = createTheme({
89
206
  '.MuiDataGrid-toolbarContainer svg': {
90
207
  color: grey[700],
91
208
  },
209
+ '.MuiDataGrid-cell:focus': {
210
+ outline: 'none',
211
+ },
92
212
  },
93
213
  },
94
214
  },
95
215
 
96
- MuiButton: {
216
+ MuiLink: {
97
217
  styleOverrides: {
98
218
  root: {
99
- textTransform: 'capitalize',
100
- },
101
- textPrimary: {
102
219
  color: blue[400],
103
- },
104
- outlinedInherit: {
105
- borderColor: alpha(grey[900], 0.03),
220
+ textDecoration: 'none',
106
221
  },
107
222
  },
108
223
  },
@@ -128,41 +243,6 @@ const theme = createTheme({
128
243
  },
129
244
  },
130
245
  },
131
-
132
- MuiLink: {
133
- styleOverrides: {
134
- root: {
135
- color: blue[400],
136
- textDecoration: 'none',
137
- },
138
- },
139
- },
140
-
141
- MuiChip: {
142
- styleOverrides: {
143
- filledPrimary: {
144
- backgroundColor: blue[50],
145
- color: blue[900],
146
- '.MuiChip-deleteIcon': {
147
- color: blue[800],
148
- '&:hover': {
149
- color: blue[900],
150
- },
151
- '&:active': {
152
- color: blue[900],
153
- },
154
- },
155
- },
156
- filledSuccess: {
157
- backgroundColor: green[50],
158
- color: green[900],
159
- },
160
- filledError: {
161
- backgroundColor: red[50],
162
- color: blue[900],
163
- },
164
- },
165
- },
166
246
  },
167
247
 
168
248
  palette: {
@@ -174,6 +254,61 @@ const theme = createTheme({
174
254
 
175
255
  focusVisible: alpha(blue[700], 0.3),
176
256
 
257
+ blue50: blue[50],
258
+ blue100: blue[100],
259
+ blue200: blue[200],
260
+ blue300: blue[300],
261
+ blue400: blue[400],
262
+ blue500: blue[500],
263
+ blue600: blue[600],
264
+ blue700: blue[700],
265
+ blue800: blue[800],
266
+ blue900: blue[900],
267
+
268
+ indigo50: indigo[50],
269
+ indigo100: indigo[100],
270
+ indigo200: indigo[200],
271
+ indigo300: indigo[300],
272
+ indigo400: indigo[400],
273
+ indigo500: indigo[500],
274
+ indigo600: indigo[600],
275
+ indigo700: indigo[700],
276
+ indigo800: indigo[800],
277
+ indigo900: indigo[900],
278
+
279
+ green50: green[50],
280
+ green100: green[100],
281
+ green200: green[200],
282
+ green300: green[300],
283
+ green400: green[400],
284
+ green500: green[500],
285
+ green600: green[600],
286
+ green700: green[700],
287
+ green800: green[800],
288
+ green900: green[900],
289
+
290
+ lightBlue50: lightBlue[50],
291
+ lightBlue100: lightBlue[100],
292
+ lightBlue200: lightBlue[200],
293
+ lightBlue300: lightBlue[300],
294
+ lightBlue400: lightBlue[400],
295
+ lightBlue500: lightBlue[500],
296
+ lightBlue600: lightBlue[600],
297
+ lightBlue700: lightBlue[700],
298
+ lightBlue800: lightBlue[800],
299
+ lightBlue900: lightBlue[900],
300
+
301
+ lightGreen50: lightGreen[50],
302
+ lightGreen100: lightGreen[100],
303
+ lightGreen200: lightGreen[200],
304
+ lightGreen300: lightGreen[300],
305
+ lightGreen400: lightGreen[400],
306
+ lightGreen500: lightGreen[500],
307
+ lightGreen600: lightGreen[600],
308
+ lightGreen700: lightGreen[700],
309
+ lightGreen800: lightGreen[800],
310
+ lightGreen900: lightGreen[900],
311
+
177
312
  neutral50: grey[50],
178
313
  neutral100: grey[100],
179
314
  neutral200: grey[200],
@@ -189,16 +324,38 @@ const theme = createTheme({
189
324
  neutralA400: grey['A400'],
190
325
  neutralA700: grey['A700'],
191
326
 
192
- blue50: blue[50],
193
- blue100: blue[100],
194
- blue200: blue[200],
195
- blue300: blue[300],
196
- blue400: blue[400],
197
- blue500: blue[500],
198
- blue600: blue[600],
199
- blue700: blue[700],
200
- blue800: blue[800],
201
- blue900: blue[900],
327
+ orange50: orange[50],
328
+ orange100: orange[100],
329
+ orange200: orange[200],
330
+ orange300: orange[300],
331
+ orange400: orange[400],
332
+ orange500: orange[500],
333
+ orange600: orange[600],
334
+ orange700: orange[700],
335
+ orange800: orange[800],
336
+ orange900: orange[900],
337
+
338
+ purple50: purple[50],
339
+ purple100: purple[100],
340
+ purple200: purple[200],
341
+ purple300: purple[300],
342
+ purple400: purple[400],
343
+ purple500: purple[500],
344
+ purple600: purple[600],
345
+ purple700: purple[700],
346
+ purple800: purple[800],
347
+ purple900: purple[900],
348
+
349
+ yellow50: yellow[50],
350
+ yellow100: yellow[100],
351
+ yellow200: yellow[200],
352
+ yellow300: yellow[300],
353
+ yellow400: yellow[400],
354
+ yellow500: yellow[500],
355
+ yellow600: yellow[600],
356
+ yellow700: yellow[700],
357
+ yellow800: yellow[800],
358
+ yellow900: yellow[900],
202
359
  // todo: add rest of colors. see https://www.figma.com/file/9yr8neepsdgLbiFADaR6M2/MI----Library-Base?type=design&node-id=477-93017&t=wf27RohUWMM0z3UH-0
203
360
 
204
361
  primary: {