@sikka/hawa 0.0.35 → 0.0.38

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