@sikka/hawa 0.0.36 → 0.0.37

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.
Files changed (60) hide show
  1. package/es/index.es.js +1 -1
  2. package/lib/index.js +1 -1
  3. package/package.json +1 -1
  4. package/src/index.js +1 -0
  5. package/src/theme/HawaTheme.js +882 -0
  6. package/src/theme/index.js +2 -0
  7. package/storybook-static/0.a2c13f8ca8477800b11f.manager.bundle.js +2 -0
  8. package/storybook-static/{0.0d994c92.iframe.bundle.js.LICENSE.txt → 0.a2c13f8ca8477800b11f.manager.bundle.js.LICENSE.txt} +0 -0
  9. package/storybook-static/0.d94b248f.iframe.bundle.js +3 -0
  10. package/storybook-static/{4.0fcda1281dc1961dbe94.manager.bundle.js.LICENSE.txt → 0.d94b248f.iframe.bundle.js.LICENSE.txt} +0 -0
  11. package/storybook-static/0.d94b248f.iframe.bundle.js.map +1 -0
  12. package/storybook-static/1.37f89487.iframe.bundle.js +1 -0
  13. package/storybook-static/1.d522251f2377f7751924.manager.bundle.js +1 -0
  14. package/storybook-static/{2.430bf1e3.iframe.bundle.js → 2.89943a03.iframe.bundle.js} +1 -1
  15. package/storybook-static/5.a331b0a36ded1c541923.manager.bundle.js +2 -0
  16. package/storybook-static/5.a331b0a36ded1c541923.manager.bundle.js.LICENSE.txt +31 -0
  17. package/storybook-static/6.3a1fb0c3.iframe.bundle.js +3 -0
  18. package/storybook-static/6.3a1fb0c3.iframe.bundle.js.LICENSE.txt +31 -0
  19. package/storybook-static/6.3a1fb0c3.iframe.bundle.js.map +1 -0
  20. package/storybook-static/6.aee6c4935c69d480fc0d.manager.bundle.js +1 -0
  21. package/storybook-static/7.5b8a4de4b5fa42d8de02.manager.bundle.js +1 -0
  22. package/storybook-static/7.f33530b1.iframe.bundle.js +1 -0
  23. package/storybook-static/8.a3dec9c37e8951a17939.manager.bundle.js +2 -0
  24. package/storybook-static/{6.a6d45262f7e98f3f18d3.manager.bundle.js.LICENSE.txt → 8.a3dec9c37e8951a17939.manager.bundle.js.LICENSE.txt} +0 -0
  25. package/storybook-static/8.b569e86b.iframe.bundle.js +1 -0
  26. package/storybook-static/{8.76c3cbf398692028e834.manager.bundle.js → 9.d04fdaada645cd23cb4b.manager.bundle.js} +1 -1
  27. package/storybook-static/9.f9db5c90.iframe.bundle.js +3 -0
  28. package/storybook-static/{7.9ce807e3.iframe.bundle.js.LICENSE.txt → 9.f9db5c90.iframe.bundle.js.LICENSE.txt} +0 -0
  29. package/storybook-static/9.f9db5c90.iframe.bundle.js.map +1 -0
  30. package/storybook-static/iframe.html +19 -3
  31. package/storybook-static/index.html +2 -2
  32. package/storybook-static/main.1a0e1257.iframe.bundle.js +1 -0
  33. package/storybook-static/main.750dea0e0e515fd26844.manager.bundle.js +1 -0
  34. package/storybook-static/project.json +1 -0
  35. package/storybook-static/runtime~main.1bd817501fb34a0cb56b.manager.bundle.js +1 -0
  36. package/storybook-static/runtime~main.9be73be4.iframe.bundle.js +1 -0
  37. package/storybook-static/vendors~main.826e89a1.iframe.bundle.js +76 -0
  38. package/storybook-static/{vendors~main.3cf4a535.iframe.bundle.js.LICENSE.txt → vendors~main.826e89a1.iframe.bundle.js.LICENSE.txt} +15 -0
  39. package/storybook-static/vendors~main.826e89a1.iframe.bundle.js.map +1 -0
  40. package/storybook-static/vendors~main.ed8bc18573e141ab3b26.manager.bundle.js +2 -0
  41. package/storybook-static/{vendors~main.11281b487bf96f5ff19e.manager.bundle.js.LICENSE.txt → vendors~main.ed8bc18573e141ab3b26.manager.bundle.js.LICENSE.txt} +18 -18
  42. package/storybook-static/0.0d994c92.iframe.bundle.js +0 -3
  43. package/storybook-static/0.0d994c92.iframe.bundle.js.map +0 -1
  44. package/storybook-static/0.f47eb24a4893a96ec307.manager.bundle.js +0 -1
  45. package/storybook-static/1.aabc3f3a.iframe.bundle.js +0 -1
  46. package/storybook-static/4.0fcda1281dc1961dbe94.manager.bundle.js +0 -2
  47. package/storybook-static/5.63ab4f94d50a3acf080d.manager.bundle.js +0 -1
  48. package/storybook-static/6.13a534cb.iframe.bundle.js +0 -1
  49. package/storybook-static/6.a6d45262f7e98f3f18d3.manager.bundle.js +0 -2
  50. package/storybook-static/7.097710753af9a1c41b80.manager.bundle.js +0 -1
  51. package/storybook-static/7.9ce807e3.iframe.bundle.js +0 -3
  52. package/storybook-static/7.9ce807e3.iframe.bundle.js.map +0 -1
  53. package/storybook-static/8.1bf48ea7.iframe.bundle.js +0 -1
  54. package/storybook-static/main.3f5171ae.iframe.bundle.js +0 -1
  55. package/storybook-static/main.9d5968bcf15d21f5487c.manager.bundle.js +0 -1
  56. package/storybook-static/runtime~main.708d7ac1.iframe.bundle.js +0 -1
  57. package/storybook-static/runtime~main.c8dac23bc753439736f0.manager.bundle.js +0 -1
  58. package/storybook-static/vendors~main.11281b487bf96f5ff19e.manager.bundle.js +0 -2
  59. package/storybook-static/vendors~main.3cf4a535.iframe.bundle.js +0 -76
  60. package/storybook-static/vendors~main.3cf4a535.iframe.bundle.js.map +0 -1
@@ -0,0 +1,882 @@
1
+ import { createTheme } from "@mui/material";
2
+ import { darken, lighten } from "@mui/material";
3
+
4
+ export const CreateHawaTheme = (
5
+ allBorderRadius,
6
+ primaryActionColor,
7
+ primaryLayoutColor,
8
+ primaryActionTextColor,
9
+ mainFont
10
+ ) =>
11
+ createTheme({
12
+ typography: { fontFamily: ["IBMPlex", "Roboto"].join(",") },
13
+ palette: {
14
+ primary: {
15
+ main: primaryActionColor
16
+ }
17
+ },
18
+ components: {
19
+ MuiStack: {
20
+ variants: [
21
+ {
22
+ props: { variants: "card" },
23
+ style: {
24
+ backgroundColor: primaryLayoutColor,
25
+ padding: 15,
26
+ // paddingLeft: 5,
27
+ // paddingRight: 5,
28
+ borderRadius: allBorderRadius
29
+ }
30
+ }
31
+ ]
32
+ },
33
+ MuiChip: {
34
+ styleOverrides: {
35
+ root: {
36
+ borderRadius: allBorderRadius
37
+ }
38
+ }
39
+ },
40
+ MuiSlider: {
41
+ styleOverrides: {
42
+ root: {
43
+ marginRight: 15,
44
+ marginLeft: 15,
45
+ minWidth: 50
46
+ }
47
+ }
48
+ },
49
+ MuiAccordion: {
50
+ styleOverrides: {
51
+ root: {
52
+ borderRadius: `${allBorderRadius}px !important`,
53
+ marginBottom: 10,
54
+ position: "unset",
55
+ "&.Mui-expanded": {
56
+ marginBottom: 10,
57
+ marginTop: 10
58
+ }
59
+ }
60
+ }
61
+ },
62
+ MuiDivider: {
63
+ styleOverrides: { root: { margin: 20 } }
64
+ },
65
+ MuiTableContainer: {
66
+ styleOverrides: {
67
+ root: {
68
+ backgroundColor: "white",
69
+ width: "100%",
70
+ borderRadius: allBorderRadius,
71
+ margin: 0
72
+ }
73
+ }
74
+ },
75
+ MuiTableCell: {
76
+ variants: [
77
+ {
78
+ props: { variants: "borderedLeft" },
79
+ style: { borderLeft: "1px solid #dddddd" }
80
+ },
81
+ {
82
+ props: { variants: "borderedRight" },
83
+ style: { borderRight: "1px solid #dddddd" }
84
+ }
85
+ ]
86
+ },
87
+ MuiTable: {
88
+ styleOverrides: { root: { borderRadius: allBorderRadius } }
89
+ },
90
+ MuiInputLabel: {
91
+ styleOverrides: {
92
+ root: {
93
+ marginBottom: 10,
94
+ marginTop: 10,
95
+ fontSize: 15
96
+ }
97
+ }
98
+ },
99
+ MuiFormControl: {
100
+ variants: [
101
+ {
102
+ props: { variants: "hawa" },
103
+ style: { width: "100%" }
104
+ }
105
+ ]
106
+ },
107
+ MuiTypography: {
108
+ styleOverrides: {},
109
+ variants: [
110
+ {
111
+ props: { variants: "validation" },
112
+ style: {
113
+ textAlign: "start",
114
+ whiteSpace: "nowrap",
115
+ fontFamily: mainFont,
116
+ color: "red",
117
+ fontSize: 13,
118
+ marginTop: 0
119
+ }
120
+ }
121
+ ]
122
+ },
123
+ MuiSelect: {
124
+ styleOverrides: {
125
+ root: {
126
+ backgroundColor: "white",
127
+ padding: "0px !important",
128
+ paddingRight: 10,
129
+ paddingLeft: 10,
130
+ borderRadius: allBorderRadius,
131
+ "&:hover": { outline: `1px solid ${primaryActionColor}` },
132
+ "&:focus": { outline: `1px solid ${primaryActionColor}` }
133
+ },
134
+ input: {
135
+ margin: 0,
136
+ border: "none",
137
+ padding: 10,
138
+ ":focus": { border: "none" }
139
+ }
140
+ }
141
+ },
142
+ MuiInput: {
143
+ styleOverrides: {
144
+ root: {
145
+ backgroundColor: "white",
146
+ paddingRight: 10,
147
+ paddingLeft: 10,
148
+ borderRadius: allBorderRadius,
149
+ "&:hover": { outline: `1px solid ${primaryActionColor}` },
150
+ "&:focus": { outline: `1px solid ${primaryActionColor}` }
151
+ },
152
+ input: {
153
+ margin: 0,
154
+ border: "none",
155
+ padding: 10,
156
+ ":focus": { border: "none" }
157
+ }
158
+ },
159
+ variants: [
160
+ {
161
+ props: { variants: "unscrollable" },
162
+ style: {
163
+ "& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button":
164
+ { display: "none" },
165
+ "& input[type=number]": { MozAppearance: "textfield" }
166
+ }
167
+ }
168
+ ]
169
+ },
170
+ MuiDialog: {
171
+ styleOverrides: {
172
+ paper: {
173
+ borderRadius: allBorderRadius,
174
+ backgroundColor: primaryLayoutColor,
175
+ minWidth: 300
176
+ }
177
+ }
178
+ },
179
+ MuiContainer: {
180
+ styleOverrides: {
181
+ root: {
182
+ display: "flex",
183
+ flexDirection: "column",
184
+ backgroundColor: primaryLayoutColor,
185
+ borderRadius: allBorderRadius,
186
+ paddingLeft: 20,
187
+ paddingRight: 20,
188
+ padding: 20
189
+ }
190
+ },
191
+ variants: [
192
+ {
193
+ props: { variants: "drop-area" },
194
+ style: {
195
+ display: "flex",
196
+ flexDirection: "column",
197
+ justifyContent: "center",
198
+ alignItems: "center",
199
+ backgroundColor: lighten(primaryLayoutColor, 0.3),
200
+ // fontSize: "2rem",
201
+ // padding: "0px !important",
202
+ // marginBottom: 10,
203
+ border: "1px dashed",
204
+ borderRadius: allBorderRadius,
205
+
206
+ ":-moz-drag-over": {
207
+ backgroundColor: "green"
208
+ }
209
+ }
210
+ },
211
+ {
212
+ props: { variants: "page-controls" },
213
+ style: {
214
+ background: "none",
215
+ fontSize: "2rem",
216
+ padding: "0px !important",
217
+ marginBottom: 10,
218
+ borderRadius: allBorderRadius
219
+ }
220
+ },
221
+ {
222
+ props: { variants: "auth" },
223
+ style: {
224
+ backgroundColor: primaryLayoutColor,
225
+ fontSize: "2rem",
226
+ padding: 20,
227
+ borderRadius: allBorderRadius
228
+ }
229
+ },
230
+ {
231
+ props: { variants: "plain" },
232
+ style: { background: "none" }
233
+ },
234
+
235
+ {
236
+ props: { variants: "panelTabs" },
237
+ style: {
238
+ display: "flex",
239
+ flexDirection: "row",
240
+ width: "fit-content",
241
+ justifyContent: "space-between",
242
+ backgroundColor: primaryLayoutColor,
243
+ alignItems: "center",
244
+ paddingLeft: "10px !important",
245
+ paddingRight: "10px !important",
246
+ padding: 10
247
+ }
248
+ },
249
+ {
250
+ props: { variants: "pricingTabs" },
251
+ style: {
252
+ display: "flex",
253
+ flexDirection: "row",
254
+ width: "fit-content",
255
+ justifyContent: "space-between",
256
+ backgroundColor: primaryLayoutColor,
257
+ alignItems: "center",
258
+ paddingLeft: "10px !important",
259
+ paddingRight: "10px !important",
260
+ padding: 10
261
+ }
262
+ },
263
+ {
264
+ props: { variants: "inSettings" },
265
+ style: {
266
+ display: "flex",
267
+ flexDirection: "row",
268
+ width: "fit-content",
269
+ height: 50,
270
+ marginRight: 0,
271
+ backgroundColor: "white",
272
+ padding: 5,
273
+ paddingLeft: "5px !important",
274
+ paddingRight: "5px !important"
275
+ }
276
+ },
277
+ {
278
+ props: { variants: "inPricing" },
279
+ style: {
280
+ display: "flex",
281
+ flexDirection: "row",
282
+ justifyContent: "space-between",
283
+ alignItems: "center",
284
+ width: "fit-content",
285
+ margin: 0,
286
+ height: 50,
287
+ marginRight: 0,
288
+ marginLeft: 0,
289
+ backgroundColor: primaryLayoutColor,
290
+ padding: 5,
291
+ paddingLeft: "5px !important",
292
+ paddingRight: "5px !important"
293
+ }
294
+ },
295
+ {
296
+ props: { variants: "settingsRow" },
297
+ style: {
298
+ display: "flex",
299
+ flexDirection: "row",
300
+ justifyContent: "space-between",
301
+ alignItems: "center",
302
+ borderRadius: allBorderRadius,
303
+ backgroundColor: lighten(primaryLayoutColor, 0.4),
304
+ height: 70,
305
+ marginTop: 10,
306
+ paddingLeft: "20px !important",
307
+ paddingRight: "10px !important"
308
+ }
309
+ },
310
+ {
311
+ props: { variants: "plan-card" },
312
+ style: {
313
+ display: "flex",
314
+ flexDirection: "column",
315
+ borderRadius: allBorderRadius,
316
+ border: `1px solid ${primaryLayoutColor}`,
317
+ backgroundColor: lighten(primaryLayoutColor, 0.4),
318
+ margin: 10,
319
+ width: 250,
320
+ maxWidth: 200,
321
+ paddingLeft: "0px !important",
322
+ paddingRight: "0px !important",
323
+ padding: 0
324
+ }
325
+ },
326
+ {
327
+ props: { variants: "selected-plan-card" },
328
+ style: {
329
+ display: "flex",
330
+ flexDirection: "column",
331
+ borderRadius: allBorderRadius,
332
+ border: `1px solid ${primaryActionColor}`,
333
+ backgroundColor: lighten(primaryActionColor, 0.4),
334
+ margin: 10,
335
+ width: 250,
336
+ maxWidth: 200,
337
+ paddingLeft: "0px !important",
338
+ paddingRight: "0px !important",
339
+ padding: 0
340
+ }
341
+ },
342
+ {
343
+ props: { variants: "plan-header" },
344
+ style: {
345
+ display: "flex",
346
+ flexDirection: "column",
347
+ position: "relative",
348
+ borderRadius: allBorderRadius,
349
+ borderBottomLeftRadius: 0,
350
+ borderBottomRightRadius: 0,
351
+ border: `1px solid ${primaryLayoutColor}`,
352
+ backgroundColor: "white",
353
+ margin: 0,
354
+ padding: 20
355
+ }
356
+ },
357
+ {
358
+ props: { variants: "card-container" },
359
+ style: {
360
+ display: "flex",
361
+ flexDirection: "column",
362
+ borderRadius: allBorderRadius,
363
+ border: `1px solid ${primaryLayoutColor}`,
364
+ margin: 0,
365
+ padding: "0px !important"
366
+ }
367
+ },
368
+ {
369
+ props: { variants: "card-header" },
370
+ style: {
371
+ display: "flex",
372
+ flexDirection: "column",
373
+ borderRadius: allBorderRadius,
374
+ borderBottomLeftRadius: 0,
375
+ borderBottomRightRadius: 0,
376
+ border: `1px solid ${primaryLayoutColor}`,
377
+ backgroundColor: "white",
378
+ margin: 0,
379
+ padding: "0px !important",
380
+ paddingLeft: "20px !important",
381
+ paddingRight: "20px !important"
382
+ }
383
+ },
384
+ {
385
+ props: { variants: "card-content" },
386
+ style: {
387
+ display: "flex",
388
+ flexDirection: "column",
389
+ borderRadius: allBorderRadius,
390
+ borderBottomLeftRadius: 0,
391
+ borderBottomRightRadius: 0,
392
+ border: `1px solid ${primaryLayoutColor}`,
393
+ margin: 0,
394
+ padding: "0px !important",
395
+ paddingLeft: "20px !important",
396
+ paddingRight: "20px !important"
397
+ }
398
+ },
399
+ {
400
+ props: { variants: "card-actions" },
401
+ style: {
402
+ display: "flex",
403
+ flexDirection: "row",
404
+ justifyContent: "flex-end",
405
+ border: `1px solid ${primaryLayoutColor}`,
406
+ margin: 0
407
+ }
408
+ },
409
+ {
410
+ props: { variants: "selected-plan-header" },
411
+ style: {
412
+ display: "flex",
413
+ flexDirection: "column",
414
+ borderRadius: allBorderRadius,
415
+ borderBottomLeftRadius: 0,
416
+ borderBottomRightRadius: 0,
417
+ border: `1px solid ${primaryLayoutColor}`,
418
+ backgroundColor: "white",
419
+ margin: 0,
420
+ padding: 20
421
+ }
422
+ },
423
+ {
424
+ props: { variants: "pricing" },
425
+ style: {
426
+ display: "flex",
427
+ flexDirection: "row",
428
+ maxWidth: "max-content",
429
+ width: "fit-content",
430
+ padding: 0,
431
+ paddingLeft: "0px !important",
432
+ paddingRight: "0px !important"
433
+ }
434
+ },
435
+ {
436
+ props: { variants: "appbar" },
437
+ style: {
438
+ boxShadow: "none",
439
+ display: "flex",
440
+ flexDirection: "column",
441
+ backgroundColor: "none !important",
442
+ background: "none !important",
443
+ padding: "0px !important",
444
+ paddingRight: "0px !important",
445
+ paddingLeft: "0px !important"
446
+ }
447
+ }
448
+ ]
449
+ },
450
+ MuiSnackbar: {
451
+ styleOverrides: {
452
+ root: { borderWidth: 10, borderRadius: allBorderRadius }
453
+ }
454
+ },
455
+ MuiButton: {
456
+ styleOverrides: {
457
+ root: {
458
+ textTransform: "uppercase",
459
+ borderRadius: allBorderRadius,
460
+ boxShadow: "none",
461
+ "&:hover": { boxShadow: "none" }
462
+ },
463
+ contained: { backgroundColor: primaryActionColor }
464
+ },
465
+ variants: [
466
+ {
467
+ props: { variants: "layout" },
468
+ style: {
469
+ backgroundColor: primaryLayoutColor,
470
+ "&:hover": {
471
+ backgroundColor: darken(primaryLayoutColor, 0.3),
472
+ color: "white"
473
+ }
474
+ }
475
+ },
476
+ {
477
+ props: { variants: "color-picker" },
478
+ style: ({ theme }) => ({
479
+ ...{
480
+ height: 40,
481
+ marginRight: 5,
482
+ marginLeft: 5,
483
+ backgroundColor: theme.palette.error.main,
484
+ color: primaryActionTextColor,
485
+ borderRadius: allBorderRadius,
486
+ "&:hover": {
487
+ backgroundColor: darken(theme.palette.error.main, 0.5),
488
+ color: "white"
489
+ }
490
+ }
491
+ })
492
+ },
493
+ {
494
+ props: { variants: "danger" },
495
+ style: ({ palette }) => ({
496
+ ...{
497
+ backgroundColor: palette.error.main,
498
+ color: primaryActionTextColor,
499
+ borderRadius: allBorderRadius,
500
+ "&:hover": {
501
+ backgroundColor: darken(palette.error.main, 0.5),
502
+ color: "white"
503
+ }
504
+ }
505
+ })
506
+ },
507
+ {
508
+ props: { variants: "last" },
509
+ style: {
510
+ backgroundColor: primaryActionColor,
511
+ color: primaryActionTextColor,
512
+ marginTop: 20,
513
+ borderRadius: allBorderRadius,
514
+ "&:hover": {
515
+ backgroundColor: darken(primaryActionColor, 0.5),
516
+ color: "white"
517
+ }
518
+ }
519
+ },
520
+ {
521
+ props: { variants: "withLogo" },
522
+ style: {
523
+ textTransform: "none",
524
+ border: `1px solid ${darken(primaryActionColor, 0.1)}`,
525
+ fontSize: "2rem",
526
+ backgroundColor: "white",
527
+ marginTop: 10,
528
+ padding: 10,
529
+ height: 50,
530
+ fontFamily: mainFont,
531
+ borderRadius: allBorderRadius
532
+ }
533
+ },
534
+ {
535
+ props: { variants: "selected" },
536
+ style: {
537
+ display: "flex",
538
+ flexDirection: "row",
539
+ width: "fit-content",
540
+ backgroundColor: primaryActionColor,
541
+ justifyContent: "space-between",
542
+ alignItems: "center",
543
+ margin: 0,
544
+ color: "white",
545
+ borderRadius: allBorderRadius,
546
+ "&:hover": {
547
+ backgroundColor: darken(primaryActionColor, 0.5),
548
+ color: "white"
549
+ }
550
+ }
551
+ },
552
+ {
553
+ props: { variants: "unselected" },
554
+ style: {
555
+ display: "flex",
556
+ flexDirection: "row",
557
+ width: "fit-content",
558
+ background: "none",
559
+ justifyContent: "space-between",
560
+ alignItems: "center",
561
+ margin: 0,
562
+ borderRadius: allBorderRadius
563
+ }
564
+ },
565
+ {
566
+ props: { variants: "adaptive-dark" },
567
+ style: {
568
+ backgroundColor: primaryActionColor,
569
+ height: 40,
570
+ color: primaryActionTextColor,
571
+ margin: 0,
572
+ borderRadius: allBorderRadius,
573
+ "&:hover": {
574
+ backgroundColor: darken(primaryActionColor, 0.4)
575
+ }
576
+ }
577
+ },
578
+ {
579
+ props: { variants: "adaptive-light" },
580
+ style: {
581
+ display: "flex",
582
+ flexDirection: "row",
583
+ width: "fit-content",
584
+ backgroundColor: primaryActionColor,
585
+ height: 50,
586
+ color: primaryActionTextColor,
587
+ justifyContent: "space-between",
588
+ alignItems: "center",
589
+ margin: 0,
590
+ borderRadius: allBorderRadius,
591
+ "&:hover": {
592
+ backgroundColor: darken(primaryActionColor, 0.4)
593
+ }
594
+ }
595
+ }
596
+ ]
597
+ },
598
+ MuiSwitch: {
599
+ styleOverrides: {
600
+ root: {
601
+ display: "flex",
602
+ flexDirection: "row",
603
+ alignItems: "center"
604
+ },
605
+ track: {
606
+ backgroundColor: "grey",
607
+ height: 20,
608
+ borderRadius: allBorderRadius
609
+ },
610
+ thumb: { borderRadius: allBorderRadius }
611
+ }
612
+ },
613
+ MuiAlert: {
614
+ styleOverrides: {
615
+ root: { borderRadius: allBorderRadius, marginBottom: 10 },
616
+
617
+ standardError: ({ theme }) => ({
618
+ ...{
619
+ backgroundColor: lighten(theme.palette.error.main, 0.8),
620
+ outline: `1px solid ${darken(theme.palette.error.main, 0.1)}`
621
+ }
622
+ }),
623
+ standardInfo: ({ theme }) => ({
624
+ ...{
625
+ backgroundColor: lighten(theme.palette.info.main, 0.8),
626
+ outline: `1px solid ${darken(theme.palette.info.main, 0.1)}`
627
+ }
628
+ }),
629
+ standardWarning: ({ theme }) => ({
630
+ ...{
631
+ backgroundColor: lighten(theme.palette.warning.main, 0.8),
632
+ outline: `1px solid ${darken(theme.palette.warning.main, 0.1)}`
633
+ }
634
+ }),
635
+ standardSuccess: ({ theme }) => ({
636
+ ...{
637
+ backgroundColor: lighten(theme.palette.success.main, 0.8),
638
+ outline: `1px solid ${darken(theme.palette.success.main, 0.1)}`
639
+ }
640
+ })
641
+ },
642
+ variants: [
643
+ {
644
+ props: { variants: "inContainer" },
645
+ style: { color: "black", borderRadius: allBorderRadius }
646
+ }
647
+ // {
648
+ // props: { variants: "offline" },
649
+ // style: ({ theme }) => ({
650
+ // ...{
651
+ // backgroundColor: lighten(theme.palette.error.main, 0.8),
652
+ // color: "black",
653
+ // borderRadius: allBorderRadius,
654
+ // outline: `1px solid ${theme.palette.error.main}`
655
+ // }
656
+ // })
657
+ // }
658
+ ]
659
+ },
660
+ MuiListItemButton: {
661
+ styleOverrides: {
662
+ root: {
663
+ margin: 5,
664
+ borderRadius: allBorderRadius,
665
+ "&:hover": { backgroundColor: primaryActionColor, color: "white" }
666
+ }
667
+ },
668
+ variants: [
669
+ {
670
+ props: { variants: "clicked" },
671
+ style: { backgroundColor: primaryActionColor, color: "white" }
672
+ }
673
+ ]
674
+ },
675
+ MuiToolbar: {
676
+ variants: [
677
+ {
678
+ props: { variants: "appbar" },
679
+ style: {
680
+ color: "black",
681
+ height: 60,
682
+ backgroundColor: "white",
683
+ display: "flex",
684
+ flexDirection: "row",
685
+ justifyContent: "space-between",
686
+ padding: 0
687
+ }
688
+ }
689
+ ]
690
+ },
691
+ MuiAppBar: {
692
+ styleOverrides: { root: { boxShadow: "none", color: "black" } },
693
+ variants: [
694
+ {
695
+ props: { variants: "appbar" },
696
+ style: {
697
+ color: "black",
698
+ margin: 0,
699
+ padding: 0,
700
+ background: "none"
701
+ }
702
+ }
703
+ ]
704
+ }
705
+ }
706
+ });
707
+
708
+ export const UpdateHawaTheme = (
709
+ theme,
710
+ allBorderRadius,
711
+ primaryActionColor,
712
+ primaryLayoutColor,
713
+ primaryActionTextColor,
714
+ mainFont
715
+ ) => {
716
+ theme.allBorderRadius = allBorderRadius;
717
+ theme.primaryActionColor = primaryActionColor;
718
+ theme.primaryLayoutColor = primaryLayoutColor;
719
+ theme.primaryActionTextColor = primaryActionTextColor;
720
+ theme.mainFont = mainFont;
721
+ theme.palette.primary.main = primaryActionColor;
722
+ theme.components.MuiStack.variants[0].style.borderRadius = allBorderRadius;
723
+ theme.components.MuiStack.variants[0].style.backgroundColor =
724
+ primaryLayoutColor;
725
+ theme.components.MuiChip.styleOverrides.root.borderRadius = allBorderRadius;
726
+ theme.components.MuiAccordion.styleOverrides.root.borderRadius = `${allBorderRadius}px !important`;
727
+ theme.components.MuiTableContainer.styleOverrides.root.borderRadius =
728
+ allBorderRadius;
729
+ theme.components.MuiTable.styleOverrides.root.borderRadius = allBorderRadius;
730
+ theme.components.MuiTypography.variants[0].style.fontFamily = mainFont;
731
+ theme.components.MuiSelect.styleOverrides.root.borderRadius = allBorderRadius;
732
+ theme.components.MuiSelect.styleOverrides.root[
733
+ "&:hover"
734
+ ].outline = `1px solid ${primaryActionColor}`;
735
+ theme.components.MuiSelect.styleOverrides.root[
736
+ "&:focus"
737
+ ].outline = `1px solid ${primaryActionColor}`;
738
+ theme.components.MuiInput.styleOverrides.root[
739
+ "&:hover"
740
+ ].outline = `1px solid ${primaryActionColor}`;
741
+ theme.components.MuiInput.styleOverrides.root[
742
+ "&:focus"
743
+ ].outline = `1px solid ${primaryActionColor}`;
744
+ theme.components.MuiDialog.styleOverrides.paper.borderRadius =
745
+ allBorderRadius;
746
+ theme.components.MuiDialog.styleOverrides.paper.backgroundColor =
747
+ primaryLayoutColor;
748
+ theme.components.MuiContainer.styleOverrides.root.backgroundColor =
749
+ primaryLayoutColor;
750
+ theme.components.MuiContainer.styleOverrides.root.borderRadius =
751
+ allBorderRadius;
752
+ theme.components.MuiContainer.variants[0].style.backgroundColor = lighten(
753
+ primaryLayoutColor,
754
+ 0.3
755
+ );
756
+ theme.components.MuiContainer.variants[0].style.borderRadius =
757
+ allBorderRadius;
758
+ theme.components.MuiContainer.variants[1].style.borderRadius =
759
+ allBorderRadius;
760
+ theme.components.MuiContainer.variants[2].style.borderRadius =
761
+ allBorderRadius;
762
+ theme.components.MuiContainer.variants[4].style.backgroundColor =
763
+ primaryLayoutColor;
764
+ theme.components.MuiContainer.variants[5].style.backgroundColor =
765
+ primaryLayoutColor;
766
+ theme.components.MuiContainer.variants[7].style.backgroundColor =
767
+ primaryLayoutColor;
768
+ theme.components.MuiContainer.variants[8].style.backgroundColor = lighten(
769
+ primaryLayoutColor,
770
+ 0.4
771
+ );
772
+ theme.components.MuiContainer.variants[8].style.borderRadius =
773
+ allBorderRadius;
774
+ theme.components.MuiContainer.variants[9].style.borderRadius =
775
+ allBorderRadius;
776
+ theme.components.MuiContainer.variants[9].style.border = `1px solid ${primaryLayoutColor}`;
777
+ theme.components.MuiContainer.variants[9].style.backgroundColor = lighten(
778
+ primaryLayoutColor,
779
+ 0.4
780
+ );
781
+ theme.components.MuiContainer.variants[10].style.backgroundColor = lighten(
782
+ primaryActionColor,
783
+ 0.4
784
+ );
785
+ theme.components.MuiContainer.variants[10].style.border = `1px solid ${primaryActionColor}`;
786
+ theme.components.MuiContainer.variants[10].style.borderRadius =
787
+ allBorderRadius;
788
+ theme.components.MuiContainer.variants[11].style.borderRadius =
789
+ allBorderRadius;
790
+ theme.components.MuiContainer.variants[11].style.border = `1px solid ${primaryLayoutColor}`;
791
+ (theme.components.MuiContainer.variants[12].style.border = `1px solid ${primaryLayoutColor}`),
792
+ (theme.components.MuiContainer.variants[12].style.borderRadius =
793
+ allBorderRadius);
794
+ theme.components.MuiContainer.variants[13].style.borderRadius =
795
+ allBorderRadius;
796
+ theme.components.MuiContainer.variants[13].style.border = `1px solid ${primaryLayoutColor}`;
797
+ theme.components.MuiContainer.variants[14].style.borderRadius =
798
+ allBorderRadius;
799
+ theme.components.MuiContainer.variants[15].style.border = `1px solid ${primaryLayoutColor}`;
800
+ theme.components.MuiContainer.variants[16].style.border = `1px solid ${primaryLayoutColor}`;
801
+ theme.components.MuiContainer.variants[16].style.borderRadius =
802
+ allBorderRadius;
803
+ theme.components.MuiSnackbar.styleOverrides.root.borderRadius =
804
+ allBorderRadius;
805
+ theme.components.MuiButton.styleOverrides.root.borderRadius = allBorderRadius;
806
+ theme.components.MuiButton.styleOverrides.contained.backgroundColor =
807
+ primaryActionColor;
808
+ theme.components.MuiButton.variants[0].style.backgroundColor =
809
+ primaryLayoutColor;
810
+ theme.components.MuiButton.variants[0].style["&:hover"].backgroundColor =
811
+ darken(primaryLayoutColor, 0.3);
812
+ theme.components.MuiButton.variants[1].style = ({ theme }) => ({
813
+ ...{
814
+ height: 40,
815
+ marginRight: 5,
816
+ marginLeft: 5,
817
+ backgroundColor: theme.palette.error.main,
818
+ color: primaryActionTextColor,
819
+ borderRadius: allBorderRadius,
820
+ "&:hover": {
821
+ backgroundColor: darken(theme.palette.error.main, 0.5),
822
+ color: "white"
823
+ }
824
+ }
825
+ });
826
+ theme.components.MuiButton.variants[2].style = ({ palette }) => ({
827
+ ...{
828
+ backgroundColor: palette.error.main,
829
+ color: primaryActionTextColor,
830
+ borderRadius: allBorderRadius,
831
+ "&:hover": {
832
+ backgroundColor: darken(palette.error.main, 0.5),
833
+ color: "white"
834
+ }
835
+ }
836
+ });
837
+ backgroundColor: primaryActionColor,
838
+ (theme.components.MuiButton.variants[3].style.backgroundColor =
839
+ primaryActionColor);
840
+ theme.components.MuiButton.variants[3].style.color = primaryActionTextColor;
841
+ theme.components.MuiButton.variants[3].style.borderRadius = allBorderRadius;
842
+ theme.components.MuiButton.variants[3].style["&:hover"].backgroundColor =
843
+ darken(primaryActionColor, 0.5);
844
+ theme.components.MuiButton.variants[4].style.border = `1px solid ${darken(
845
+ primaryActionColor,
846
+ 0.1
847
+ )}`;
848
+ theme.components.MuiButton.variants[4].style.fontFamily = mainFont;
849
+ theme.components.MuiButton.variants[4].style.borderRadius = allBorderRadius;
850
+ theme.components.MuiButton.variants[5].style.backgroundColor =
851
+ primaryActionColor;
852
+ theme.components.MuiButton.variants[5].style.borderRadius = allBorderRadius;
853
+ theme.components.MuiButton.variants[5].style["&:hover"].backgroundColor =
854
+ darken(primaryActionColor, 0.5);
855
+ theme.components.MuiButton.variants[6].style.borderRadius = allBorderRadius;
856
+ theme.components.MuiButton.variants[7].style.backgroundColor =
857
+ primaryActionColor;
858
+ theme.components.MuiButton.variants[7].style.color = primaryActionTextColor;
859
+ theme.components.MuiButton.variants[7].style.borderRadius = allBorderRadius;
860
+ theme.components.MuiButton.variants[7].style["&:hover"].backgroundColor =
861
+ darken(primaryActionColor, 0.4);
862
+ theme.components.MuiButton.variants[8].style.backgroundColor =
863
+ primaryActionColor;
864
+ theme.components.MuiButton.variants[8].style.color = primaryActionTextColor;
865
+ theme.components.MuiButton.variants[8].style.borderRadius = allBorderRadius;
866
+ theme.components.MuiButton.variants[8].style["&:hover"].backgroundColor =
867
+ darken(primaryActionColor, 0.4);
868
+ theme.components.MuiSwitch.styleOverrides.track.borderRadius =
869
+ allBorderRadius;
870
+ theme.components.MuiSwitch.styleOverrides.thumb.borderRadius =
871
+ allBorderRadius;
872
+ theme.components.MuiAlert.styleOverrides.root.borderRadius = allBorderRadius;
873
+ theme.components.MuiAlert.variants[0].style.borderRadius = allBorderRadius;
874
+ theme.components.MuiListItemButton.styleOverrides.root.borderRadius =
875
+ allBorderRadius;
876
+ theme.components.MuiListItemButton.styleOverrides.root[
877
+ "&:hover"
878
+ ].backgroundColor = primaryActionColor;
879
+ theme.components.MuiListItemButton.variants[0].style.backgroundColor =
880
+ primaryActionColor;
881
+ return theme;
882
+ };