@sikka/hawa 0.0.37 → 0.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/hawa-publish-push.yml +4 -2
- package/.github/workflows/hawa-publish.yml +3 -1
- package/README.md +2 -1
- package/es/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +5 -3
- package/src/Hooks.js +61 -0
- package/src/blocks/AuthForms/CodeConfirmation.js +94 -0
- package/src/blocks/AuthForms/index.js +1 -0
- package/src/blocks/Misc/NotFound.js +47 -0
- package/src/blocks/Misc/index.js +1 -0
- package/src/blocks/Pricing/PricingPlans.js +3 -3
- package/src/elements/HawaChip.js +6 -0
- package/src/elements/{HawaRadio.js → HawaPanelTabs.js} +3 -2
- package/src/elements/HawaSettingsRow.js +2 -2
- package/src/elements/HawaSnackbar.js +11 -8
- package/src/elements/PinInput.js +141 -0
- package/src/elements/index.js +2 -2
- package/src/index.js +1 -0
- package/src/layout/HawaAppBar.js +0 -1
- package/src/styles.css +4 -0
- package/src/styles.scss +3 -1
- package/src/theme/HawaTheme.js +91 -46
- package/src/util.js +11 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.066fa5c5.iframe.bundle.js +1 -0
- package/storybook-static/project.json +1 -1
- package/storybook-static/{vendors~main.826e89a1.iframe.bundle.js → vendors~main.40879e99.iframe.bundle.js} +2 -2
- package/storybook-static/{vendors~main.826e89a1.iframe.bundle.js.LICENSE.txt → vendors~main.40879e99.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.40879e99.iframe.bundle.js.map +1 -0
- package/src/elements/HawaTextArea.js +0 -26
- package/storybook-static/main.1a0e1257.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.826e89a1.iframe.bundle.js.map +0 -1
package/src/theme/HawaTheme.js
CHANGED
|
@@ -6,20 +6,27 @@ export const CreateHawaTheme = (
|
|
|
6
6
|
primaryActionColor,
|
|
7
7
|
primaryLayoutColor,
|
|
8
8
|
primaryActionTextColor,
|
|
9
|
-
mainFont
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
mainFont,
|
|
10
|
+
breakpointsValues
|
|
11
|
+
) => {
|
|
12
|
+
console.log("achra achraf", breakpointsValues);
|
|
13
|
+
return createTheme({
|
|
12
14
|
typography: { fontFamily: ["IBMPlex", "Roboto"].join(",") },
|
|
13
15
|
palette: {
|
|
14
16
|
primary: {
|
|
15
17
|
main: primaryActionColor
|
|
16
18
|
}
|
|
17
19
|
},
|
|
20
|
+
breakpoints: {
|
|
21
|
+
values: breakpointsValues
|
|
22
|
+
? breakpointsValues
|
|
23
|
+
: { xs: 0, sm: 600, md: 900, lg: 1200, xl: 1536 }
|
|
24
|
+
},
|
|
18
25
|
components: {
|
|
19
26
|
MuiStack: {
|
|
20
27
|
variants: [
|
|
21
28
|
{
|
|
22
|
-
props: {
|
|
29
|
+
props: { variant: "card" },
|
|
23
30
|
style: {
|
|
24
31
|
backgroundColor: primaryLayoutColor,
|
|
25
32
|
padding: 15,
|
|
@@ -75,11 +82,11 @@ export const CreateHawaTheme = (
|
|
|
75
82
|
MuiTableCell: {
|
|
76
83
|
variants: [
|
|
77
84
|
{
|
|
78
|
-
props: {
|
|
85
|
+
props: { variant: "borderedLeft" },
|
|
79
86
|
style: { borderLeft: "1px solid #dddddd" }
|
|
80
87
|
},
|
|
81
88
|
{
|
|
82
|
-
props: {
|
|
89
|
+
props: { variant: "borderedRight" },
|
|
83
90
|
style: { borderRight: "1px solid #dddddd" }
|
|
84
91
|
}
|
|
85
92
|
]
|
|
@@ -99,7 +106,7 @@ export const CreateHawaTheme = (
|
|
|
99
106
|
MuiFormControl: {
|
|
100
107
|
variants: [
|
|
101
108
|
{
|
|
102
|
-
props: {
|
|
109
|
+
props: { variant: "hawa" },
|
|
103
110
|
style: { width: "100%" }
|
|
104
111
|
}
|
|
105
112
|
]
|
|
@@ -108,7 +115,7 @@ export const CreateHawaTheme = (
|
|
|
108
115
|
styleOverrides: {},
|
|
109
116
|
variants: [
|
|
110
117
|
{
|
|
111
|
-
props: {
|
|
118
|
+
props: { variant: "validation" },
|
|
112
119
|
style: {
|
|
113
120
|
textAlign: "start",
|
|
114
121
|
whiteSpace: "nowrap",
|
|
@@ -158,12 +165,23 @@ export const CreateHawaTheme = (
|
|
|
158
165
|
},
|
|
159
166
|
variants: [
|
|
160
167
|
{
|
|
161
|
-
props: {
|
|
168
|
+
props: { variant: "unscrollable" },
|
|
162
169
|
style: {
|
|
163
170
|
"& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button":
|
|
164
171
|
{ display: "none" },
|
|
165
172
|
"& input[type=number]": { MozAppearance: "textfield" }
|
|
166
173
|
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
props: { variant: "pin" },
|
|
177
|
+
style: {
|
|
178
|
+
height: 60,
|
|
179
|
+
width: 50,
|
|
180
|
+
textAlign: "center",
|
|
181
|
+
"& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button":
|
|
182
|
+
{ display: "none" },
|
|
183
|
+
"& input[type=number]": { MozAppearance: "textfield" }
|
|
184
|
+
}
|
|
167
185
|
}
|
|
168
186
|
]
|
|
169
187
|
},
|
|
@@ -190,7 +208,7 @@ export const CreateHawaTheme = (
|
|
|
190
208
|
},
|
|
191
209
|
variants: [
|
|
192
210
|
{
|
|
193
|
-
props: {
|
|
211
|
+
props: { variant: "drop-area" },
|
|
194
212
|
style: {
|
|
195
213
|
display: "flex",
|
|
196
214
|
flexDirection: "column",
|
|
@@ -209,7 +227,7 @@ export const CreateHawaTheme = (
|
|
|
209
227
|
}
|
|
210
228
|
},
|
|
211
229
|
{
|
|
212
|
-
props: {
|
|
230
|
+
props: { variant: "page-controls" },
|
|
213
231
|
style: {
|
|
214
232
|
background: "none",
|
|
215
233
|
fontSize: "2rem",
|
|
@@ -219,7 +237,7 @@ export const CreateHawaTheme = (
|
|
|
219
237
|
}
|
|
220
238
|
},
|
|
221
239
|
{
|
|
222
|
-
props: {
|
|
240
|
+
props: { variant: "auth" },
|
|
223
241
|
style: {
|
|
224
242
|
backgroundColor: primaryLayoutColor,
|
|
225
243
|
fontSize: "2rem",
|
|
@@ -228,12 +246,12 @@ export const CreateHawaTheme = (
|
|
|
228
246
|
}
|
|
229
247
|
},
|
|
230
248
|
{
|
|
231
|
-
props: {
|
|
249
|
+
props: { variant: "plain" },
|
|
232
250
|
style: { background: "none" }
|
|
233
251
|
},
|
|
234
252
|
|
|
235
253
|
{
|
|
236
|
-
props: {
|
|
254
|
+
props: { variant: "panelTabs" },
|
|
237
255
|
style: {
|
|
238
256
|
display: "flex",
|
|
239
257
|
flexDirection: "row",
|
|
@@ -247,7 +265,7 @@ export const CreateHawaTheme = (
|
|
|
247
265
|
}
|
|
248
266
|
},
|
|
249
267
|
{
|
|
250
|
-
props: {
|
|
268
|
+
props: { variant: "pricingTabs" },
|
|
251
269
|
style: {
|
|
252
270
|
display: "flex",
|
|
253
271
|
flexDirection: "row",
|
|
@@ -261,7 +279,7 @@ export const CreateHawaTheme = (
|
|
|
261
279
|
}
|
|
262
280
|
},
|
|
263
281
|
{
|
|
264
|
-
props: {
|
|
282
|
+
props: { variant: "inSettings" },
|
|
265
283
|
style: {
|
|
266
284
|
display: "flex",
|
|
267
285
|
flexDirection: "row",
|
|
@@ -275,7 +293,7 @@ export const CreateHawaTheme = (
|
|
|
275
293
|
}
|
|
276
294
|
},
|
|
277
295
|
{
|
|
278
|
-
props: {
|
|
296
|
+
props: { variant: "inPricing" },
|
|
279
297
|
style: {
|
|
280
298
|
display: "flex",
|
|
281
299
|
flexDirection: "row",
|
|
@@ -293,7 +311,7 @@ export const CreateHawaTheme = (
|
|
|
293
311
|
}
|
|
294
312
|
},
|
|
295
313
|
{
|
|
296
|
-
props: {
|
|
314
|
+
props: { variant: "settingsRow" },
|
|
297
315
|
style: {
|
|
298
316
|
display: "flex",
|
|
299
317
|
flexDirection: "row",
|
|
@@ -308,7 +326,7 @@ export const CreateHawaTheme = (
|
|
|
308
326
|
}
|
|
309
327
|
},
|
|
310
328
|
{
|
|
311
|
-
props: {
|
|
329
|
+
props: { variant: "plan-card" },
|
|
312
330
|
style: {
|
|
313
331
|
display: "flex",
|
|
314
332
|
flexDirection: "column",
|
|
@@ -324,7 +342,7 @@ export const CreateHawaTheme = (
|
|
|
324
342
|
}
|
|
325
343
|
},
|
|
326
344
|
{
|
|
327
|
-
props: {
|
|
345
|
+
props: { variant: "selected-plan-card" },
|
|
328
346
|
style: {
|
|
329
347
|
display: "flex",
|
|
330
348
|
flexDirection: "column",
|
|
@@ -340,7 +358,7 @@ export const CreateHawaTheme = (
|
|
|
340
358
|
}
|
|
341
359
|
},
|
|
342
360
|
{
|
|
343
|
-
props: {
|
|
361
|
+
props: { variant: "plan-header" },
|
|
344
362
|
style: {
|
|
345
363
|
display: "flex",
|
|
346
364
|
flexDirection: "column",
|
|
@@ -355,7 +373,7 @@ export const CreateHawaTheme = (
|
|
|
355
373
|
}
|
|
356
374
|
},
|
|
357
375
|
{
|
|
358
|
-
props: {
|
|
376
|
+
props: { variant: "card-container" },
|
|
359
377
|
style: {
|
|
360
378
|
display: "flex",
|
|
361
379
|
flexDirection: "column",
|
|
@@ -366,7 +384,7 @@ export const CreateHawaTheme = (
|
|
|
366
384
|
}
|
|
367
385
|
},
|
|
368
386
|
{
|
|
369
|
-
props: {
|
|
387
|
+
props: { variant: "card-header" },
|
|
370
388
|
style: {
|
|
371
389
|
display: "flex",
|
|
372
390
|
flexDirection: "column",
|
|
@@ -382,7 +400,7 @@ export const CreateHawaTheme = (
|
|
|
382
400
|
}
|
|
383
401
|
},
|
|
384
402
|
{
|
|
385
|
-
props: {
|
|
403
|
+
props: { variant: "card-content" },
|
|
386
404
|
style: {
|
|
387
405
|
display: "flex",
|
|
388
406
|
flexDirection: "column",
|
|
@@ -397,7 +415,7 @@ export const CreateHawaTheme = (
|
|
|
397
415
|
}
|
|
398
416
|
},
|
|
399
417
|
{
|
|
400
|
-
props: {
|
|
418
|
+
props: { variant: "card-actions" },
|
|
401
419
|
style: {
|
|
402
420
|
display: "flex",
|
|
403
421
|
flexDirection: "row",
|
|
@@ -407,7 +425,7 @@ export const CreateHawaTheme = (
|
|
|
407
425
|
}
|
|
408
426
|
},
|
|
409
427
|
{
|
|
410
|
-
props: {
|
|
428
|
+
props: { variant: "selected-plan-header" },
|
|
411
429
|
style: {
|
|
412
430
|
display: "flex",
|
|
413
431
|
flexDirection: "column",
|
|
@@ -421,7 +439,7 @@ export const CreateHawaTheme = (
|
|
|
421
439
|
}
|
|
422
440
|
},
|
|
423
441
|
{
|
|
424
|
-
props: {
|
|
442
|
+
props: { variant: "pricing" },
|
|
425
443
|
style: {
|
|
426
444
|
display: "flex",
|
|
427
445
|
flexDirection: "row",
|
|
@@ -433,7 +451,7 @@ export const CreateHawaTheme = (
|
|
|
433
451
|
}
|
|
434
452
|
},
|
|
435
453
|
{
|
|
436
|
-
props: {
|
|
454
|
+
props: { variant: "appbar" },
|
|
437
455
|
style: {
|
|
438
456
|
boxShadow: "none",
|
|
439
457
|
display: "flex",
|
|
@@ -464,7 +482,7 @@ export const CreateHawaTheme = (
|
|
|
464
482
|
},
|
|
465
483
|
variants: [
|
|
466
484
|
{
|
|
467
|
-
props: {
|
|
485
|
+
props: { variant: "layout" },
|
|
468
486
|
style: {
|
|
469
487
|
backgroundColor: primaryLayoutColor,
|
|
470
488
|
"&:hover": {
|
|
@@ -474,7 +492,7 @@ export const CreateHawaTheme = (
|
|
|
474
492
|
}
|
|
475
493
|
},
|
|
476
494
|
{
|
|
477
|
-
props: {
|
|
495
|
+
props: { variant: "color-picker" },
|
|
478
496
|
style: ({ theme }) => ({
|
|
479
497
|
...{
|
|
480
498
|
height: 40,
|
|
@@ -491,21 +509,21 @@ export const CreateHawaTheme = (
|
|
|
491
509
|
})
|
|
492
510
|
},
|
|
493
511
|
{
|
|
494
|
-
props: {
|
|
495
|
-
style: ({
|
|
512
|
+
props: { variant: "danger" },
|
|
513
|
+
style: ({ theme }) => ({
|
|
496
514
|
...{
|
|
497
|
-
backgroundColor: palette.error.main,
|
|
515
|
+
backgroundColor: theme.palette.error.main,
|
|
498
516
|
color: primaryActionTextColor,
|
|
499
517
|
borderRadius: allBorderRadius,
|
|
500
518
|
"&:hover": {
|
|
501
|
-
backgroundColor: darken(palette.error.main, 0.5),
|
|
519
|
+
backgroundColor: darken(theme.palette.error.main, 0.5),
|
|
502
520
|
color: "white"
|
|
503
521
|
}
|
|
504
522
|
}
|
|
505
523
|
})
|
|
506
524
|
},
|
|
507
525
|
{
|
|
508
|
-
props: {
|
|
526
|
+
props: { variant: "last" },
|
|
509
527
|
style: {
|
|
510
528
|
backgroundColor: primaryActionColor,
|
|
511
529
|
color: primaryActionTextColor,
|
|
@@ -518,7 +536,7 @@ export const CreateHawaTheme = (
|
|
|
518
536
|
}
|
|
519
537
|
},
|
|
520
538
|
{
|
|
521
|
-
props: {
|
|
539
|
+
props: { variant: "withLogo" },
|
|
522
540
|
style: {
|
|
523
541
|
textTransform: "none",
|
|
524
542
|
border: `1px solid ${darken(primaryActionColor, 0.1)}`,
|
|
@@ -532,7 +550,7 @@ export const CreateHawaTheme = (
|
|
|
532
550
|
}
|
|
533
551
|
},
|
|
534
552
|
{
|
|
535
|
-
props: {
|
|
553
|
+
props: { variant: "selected" },
|
|
536
554
|
style: {
|
|
537
555
|
display: "flex",
|
|
538
556
|
flexDirection: "row",
|
|
@@ -550,7 +568,7 @@ export const CreateHawaTheme = (
|
|
|
550
568
|
}
|
|
551
569
|
},
|
|
552
570
|
{
|
|
553
|
-
props: {
|
|
571
|
+
props: { variant: "unselected" },
|
|
554
572
|
style: {
|
|
555
573
|
display: "flex",
|
|
556
574
|
flexDirection: "row",
|
|
@@ -563,7 +581,7 @@ export const CreateHawaTheme = (
|
|
|
563
581
|
}
|
|
564
582
|
},
|
|
565
583
|
{
|
|
566
|
-
props: {
|
|
584
|
+
props: { variant: "adaptive-dark" },
|
|
567
585
|
style: {
|
|
568
586
|
backgroundColor: primaryActionColor,
|
|
569
587
|
height: 40,
|
|
@@ -576,7 +594,7 @@ export const CreateHawaTheme = (
|
|
|
576
594
|
}
|
|
577
595
|
},
|
|
578
596
|
{
|
|
579
|
-
props: {
|
|
597
|
+
props: { variant: "adaptive-light" },
|
|
580
598
|
style: {
|
|
581
599
|
display: "flex",
|
|
582
600
|
flexDirection: "row",
|
|
@@ -641,11 +659,11 @@ export const CreateHawaTheme = (
|
|
|
641
659
|
},
|
|
642
660
|
variants: [
|
|
643
661
|
{
|
|
644
|
-
props: {
|
|
662
|
+
props: { variant: "inContainer" },
|
|
645
663
|
style: { color: "black", borderRadius: allBorderRadius }
|
|
646
664
|
}
|
|
647
665
|
// {
|
|
648
|
-
// props: {
|
|
666
|
+
// props: { variant: "offline" },
|
|
649
667
|
// style: ({ theme }) => ({
|
|
650
668
|
// ...{
|
|
651
669
|
// backgroundColor: lighten(theme.palette.error.main, 0.8),
|
|
@@ -667,7 +685,7 @@ export const CreateHawaTheme = (
|
|
|
667
685
|
},
|
|
668
686
|
variants: [
|
|
669
687
|
{
|
|
670
|
-
props: {
|
|
688
|
+
props: { variant: "clicked" },
|
|
671
689
|
style: { backgroundColor: primaryActionColor, color: "white" }
|
|
672
690
|
}
|
|
673
691
|
]
|
|
@@ -675,7 +693,7 @@ export const CreateHawaTheme = (
|
|
|
675
693
|
MuiToolbar: {
|
|
676
694
|
variants: [
|
|
677
695
|
{
|
|
678
|
-
props: {
|
|
696
|
+
props: { variant: "appbar" },
|
|
679
697
|
style: {
|
|
680
698
|
color: "black",
|
|
681
699
|
height: 60,
|
|
@@ -692,7 +710,7 @@ export const CreateHawaTheme = (
|
|
|
692
710
|
styleOverrides: { root: { boxShadow: "none", color: "black" } },
|
|
693
711
|
variants: [
|
|
694
712
|
{
|
|
695
|
-
props: {
|
|
713
|
+
props: { variant: "appbar" },
|
|
696
714
|
style: {
|
|
697
715
|
color: "black",
|
|
698
716
|
margin: 0,
|
|
@@ -701,9 +719,36 @@ export const CreateHawaTheme = (
|
|
|
701
719
|
}
|
|
702
720
|
}
|
|
703
721
|
]
|
|
722
|
+
},
|
|
723
|
+
|
|
724
|
+
MuiTextField: {
|
|
725
|
+
styleOverrides: {
|
|
726
|
+
root: {
|
|
727
|
+
backgroundColor: "white",
|
|
728
|
+
paddingRight: 10,
|
|
729
|
+
paddingLeft: 10,
|
|
730
|
+
borderRadius: allBorderRadius,
|
|
731
|
+
"&:hover": { outline: `1px solid ${primaryActionColor}` },
|
|
732
|
+
"&:focus": { outline: `1px solid ${primaryActionColor}` }
|
|
733
|
+
}
|
|
734
|
+
},
|
|
735
|
+
variants: [
|
|
736
|
+
{
|
|
737
|
+
props: { variant: "pinInput" },
|
|
738
|
+
style: {
|
|
739
|
+
height: 60,
|
|
740
|
+
width: 50,
|
|
741
|
+
textAlign: "center",
|
|
742
|
+
"& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button":
|
|
743
|
+
{ display: "none" },
|
|
744
|
+
"& input[type=number]": { MozAppearance: "textfield" }
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
]
|
|
704
748
|
}
|
|
705
749
|
}
|
|
706
750
|
});
|
|
751
|
+
};
|
|
707
752
|
|
|
708
753
|
export const UpdateHawaTheme = (
|
|
709
754
|
theme,
|
|
@@ -878,5 +923,5 @@ export const UpdateHawaTheme = (
|
|
|
878
923
|
].backgroundColor = primaryActionColor;
|
|
879
924
|
theme.components.MuiListItemButton.variants[0].style.backgroundColor =
|
|
880
925
|
primaryActionColor;
|
|
881
|
-
|
|
926
|
+
return theme;
|
|
882
927
|
};
|
package/src/util.js
CHANGED
|
@@ -16,5 +16,15 @@ const getTextColor = (backColor) => {
|
|
|
16
16
|
return "#ffffff";
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
|
+
const replaceAt = function (string, index, replacement) {
|
|
20
|
+
// if (replacement == "" || replacement == " ") {
|
|
21
|
+
// return (
|
|
22
|
+
// string.substring(0, index) +
|
|
23
|
+
// string.substring(index + replacement.length )
|
|
24
|
+
// );
|
|
25
|
+
// }
|
|
26
|
+
const replaced = string.substring(0, index) + replacement + string.substring(index + 1)
|
|
27
|
+
return replaced
|
|
28
|
+
};
|
|
19
29
|
|
|
20
|
-
export { hexToRgb, getTextColor };
|
|
30
|
+
export { hexToRgb, getTextColor, replaceAt };
|
|
@@ -361,4 +361,4 @@
|
|
|
361
361
|
|
|
362
362
|
|
|
363
363
|
|
|
364
|
-
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$"}];</script><script src="runtime~main.9be73be4.iframe.bundle.js"></script><script src="vendors~main.
|
|
364
|
+
window['STORIES'] = [{"titlePrefix":"","directory":"./src","files":"**/*.stories.mdx","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.mdx)$"},{"titlePrefix":"","directory":"./src","files":"**/*.stories.@(js|jsx|ts|tsx)","importPathMatcher":"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(js|jsx|ts|tsx))$"}];</script><script src="runtime~main.9be73be4.iframe.bundle.js"></script><script src="vendors~main.40879e99.iframe.bundle.js"></script><script src="main.066fa5c5.iframe.bundle.js"></script></body></html>
|