@sikka/hawa 0.0.55 → 0.0.57

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