@sikka/hawa 0.0.37 → 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.
- package/.github/workflows/hawa-publish-push.yml +2 -1
- package/README.md +1 -1
- package/es/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/src/elements/HawaSnackbar.js +11 -8
- package/src/elements/PinInput.js +141 -0
- package/src/styles.css +4 -0
- package/src/styles.scss +3 -1
- package/src/theme/HawaTheme.js +84 -45
- package/src/util.js +11 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/{main.1a0e1257.iframe.bundle.js → main.2a7fa838.iframe.bundle.js} +1 -1
- package/storybook-static/project.json +1 -1
package/src/styles.scss
CHANGED
package/src/theme/HawaTheme.js
CHANGED
|
@@ -19,7 +19,7 @@ export const CreateHawaTheme = (
|
|
|
19
19
|
MuiStack: {
|
|
20
20
|
variants: [
|
|
21
21
|
{
|
|
22
|
-
props: {
|
|
22
|
+
props: { variant: "card" },
|
|
23
23
|
style: {
|
|
24
24
|
backgroundColor: primaryLayoutColor,
|
|
25
25
|
padding: 15,
|
|
@@ -75,11 +75,11 @@ export const CreateHawaTheme = (
|
|
|
75
75
|
MuiTableCell: {
|
|
76
76
|
variants: [
|
|
77
77
|
{
|
|
78
|
-
props: {
|
|
78
|
+
props: { variant: "borderedLeft" },
|
|
79
79
|
style: { borderLeft: "1px solid #dddddd" }
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
|
-
props: {
|
|
82
|
+
props: { variant: "borderedRight" },
|
|
83
83
|
style: { borderRight: "1px solid #dddddd" }
|
|
84
84
|
}
|
|
85
85
|
]
|
|
@@ -99,7 +99,7 @@ export const CreateHawaTheme = (
|
|
|
99
99
|
MuiFormControl: {
|
|
100
100
|
variants: [
|
|
101
101
|
{
|
|
102
|
-
props: {
|
|
102
|
+
props: { variant: "hawa" },
|
|
103
103
|
style: { width: "100%" }
|
|
104
104
|
}
|
|
105
105
|
]
|
|
@@ -108,7 +108,7 @@ export const CreateHawaTheme = (
|
|
|
108
108
|
styleOverrides: {},
|
|
109
109
|
variants: [
|
|
110
110
|
{
|
|
111
|
-
props: {
|
|
111
|
+
props: { variant: "validation" },
|
|
112
112
|
style: {
|
|
113
113
|
textAlign: "start",
|
|
114
114
|
whiteSpace: "nowrap",
|
|
@@ -147,24 +147,36 @@ export const CreateHawaTheme = (
|
|
|
147
147
|
paddingLeft: 10,
|
|
148
148
|
borderRadius: allBorderRadius,
|
|
149
149
|
"&:hover": { outline: `1px solid ${primaryActionColor}` },
|
|
150
|
-
"&:focus": { outline: `1px solid ${primaryActionColor}` }
|
|
150
|
+
"&:focus": { outline: `1px solid ${primaryActionColor}` },
|
|
151
151
|
},
|
|
152
152
|
input: {
|
|
153
153
|
margin: 0,
|
|
154
154
|
border: "none",
|
|
155
155
|
padding: 10,
|
|
156
|
-
":focus": { border: "none" }
|
|
156
|
+
":focus": { border: "none" },
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
159
|
variants: [
|
|
160
160
|
{
|
|
161
|
-
props: {
|
|
161
|
+
props: { variant: "unscrollable" },
|
|
162
162
|
style: {
|
|
163
163
|
"& input::-webkit-outer-spin-button, & input::-webkit-inner-spin-button":
|
|
164
164
|
{ display: "none" },
|
|
165
165
|
"& input[type=number]": { MozAppearance: "textfield" }
|
|
166
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
|
+
},
|
|
167
178
|
}
|
|
179
|
+
|
|
168
180
|
]
|
|
169
181
|
},
|
|
170
182
|
MuiDialog: {
|
|
@@ -190,7 +202,7 @@ export const CreateHawaTheme = (
|
|
|
190
202
|
},
|
|
191
203
|
variants: [
|
|
192
204
|
{
|
|
193
|
-
props: {
|
|
205
|
+
props: { variant: "drop-area" },
|
|
194
206
|
style: {
|
|
195
207
|
display: "flex",
|
|
196
208
|
flexDirection: "column",
|
|
@@ -209,7 +221,7 @@ export const CreateHawaTheme = (
|
|
|
209
221
|
}
|
|
210
222
|
},
|
|
211
223
|
{
|
|
212
|
-
props: {
|
|
224
|
+
props: { variant: "page-controls" },
|
|
213
225
|
style: {
|
|
214
226
|
background: "none",
|
|
215
227
|
fontSize: "2rem",
|
|
@@ -219,7 +231,7 @@ export const CreateHawaTheme = (
|
|
|
219
231
|
}
|
|
220
232
|
},
|
|
221
233
|
{
|
|
222
|
-
props: {
|
|
234
|
+
props: { variant: "auth" },
|
|
223
235
|
style: {
|
|
224
236
|
backgroundColor: primaryLayoutColor,
|
|
225
237
|
fontSize: "2rem",
|
|
@@ -228,12 +240,12 @@ export const CreateHawaTheme = (
|
|
|
228
240
|
}
|
|
229
241
|
},
|
|
230
242
|
{
|
|
231
|
-
props: {
|
|
243
|
+
props: { variant: "plain" },
|
|
232
244
|
style: { background: "none" }
|
|
233
245
|
},
|
|
234
246
|
|
|
235
247
|
{
|
|
236
|
-
props: {
|
|
248
|
+
props: { variant: "panelTabs" },
|
|
237
249
|
style: {
|
|
238
250
|
display: "flex",
|
|
239
251
|
flexDirection: "row",
|
|
@@ -247,7 +259,7 @@ export const CreateHawaTheme = (
|
|
|
247
259
|
}
|
|
248
260
|
},
|
|
249
261
|
{
|
|
250
|
-
props: {
|
|
262
|
+
props: { variant: "pricingTabs" },
|
|
251
263
|
style: {
|
|
252
264
|
display: "flex",
|
|
253
265
|
flexDirection: "row",
|
|
@@ -261,7 +273,7 @@ export const CreateHawaTheme = (
|
|
|
261
273
|
}
|
|
262
274
|
},
|
|
263
275
|
{
|
|
264
|
-
props: {
|
|
276
|
+
props: { variant: "inSettings" },
|
|
265
277
|
style: {
|
|
266
278
|
display: "flex",
|
|
267
279
|
flexDirection: "row",
|
|
@@ -275,7 +287,7 @@ export const CreateHawaTheme = (
|
|
|
275
287
|
}
|
|
276
288
|
},
|
|
277
289
|
{
|
|
278
|
-
props: {
|
|
290
|
+
props: { variant: "inPricing" },
|
|
279
291
|
style: {
|
|
280
292
|
display: "flex",
|
|
281
293
|
flexDirection: "row",
|
|
@@ -293,7 +305,7 @@ export const CreateHawaTheme = (
|
|
|
293
305
|
}
|
|
294
306
|
},
|
|
295
307
|
{
|
|
296
|
-
props: {
|
|
308
|
+
props: { variant: "settingsRow" },
|
|
297
309
|
style: {
|
|
298
310
|
display: "flex",
|
|
299
311
|
flexDirection: "row",
|
|
@@ -308,7 +320,7 @@ export const CreateHawaTheme = (
|
|
|
308
320
|
}
|
|
309
321
|
},
|
|
310
322
|
{
|
|
311
|
-
props: {
|
|
323
|
+
props: { variant: "plan-card" },
|
|
312
324
|
style: {
|
|
313
325
|
display: "flex",
|
|
314
326
|
flexDirection: "column",
|
|
@@ -324,7 +336,7 @@ export const CreateHawaTheme = (
|
|
|
324
336
|
}
|
|
325
337
|
},
|
|
326
338
|
{
|
|
327
|
-
props: {
|
|
339
|
+
props: { variant: "selected-plan-card" },
|
|
328
340
|
style: {
|
|
329
341
|
display: "flex",
|
|
330
342
|
flexDirection: "column",
|
|
@@ -340,7 +352,7 @@ export const CreateHawaTheme = (
|
|
|
340
352
|
}
|
|
341
353
|
},
|
|
342
354
|
{
|
|
343
|
-
props: {
|
|
355
|
+
props: { variant: "plan-header" },
|
|
344
356
|
style: {
|
|
345
357
|
display: "flex",
|
|
346
358
|
flexDirection: "column",
|
|
@@ -355,7 +367,7 @@ export const CreateHawaTheme = (
|
|
|
355
367
|
}
|
|
356
368
|
},
|
|
357
369
|
{
|
|
358
|
-
props: {
|
|
370
|
+
props: { variant: "card-container" },
|
|
359
371
|
style: {
|
|
360
372
|
display: "flex",
|
|
361
373
|
flexDirection: "column",
|
|
@@ -366,7 +378,7 @@ export const CreateHawaTheme = (
|
|
|
366
378
|
}
|
|
367
379
|
},
|
|
368
380
|
{
|
|
369
|
-
props: {
|
|
381
|
+
props: { variant: "card-header" },
|
|
370
382
|
style: {
|
|
371
383
|
display: "flex",
|
|
372
384
|
flexDirection: "column",
|
|
@@ -382,7 +394,7 @@ export const CreateHawaTheme = (
|
|
|
382
394
|
}
|
|
383
395
|
},
|
|
384
396
|
{
|
|
385
|
-
props: {
|
|
397
|
+
props: { variant: "card-content" },
|
|
386
398
|
style: {
|
|
387
399
|
display: "flex",
|
|
388
400
|
flexDirection: "column",
|
|
@@ -397,7 +409,7 @@ export const CreateHawaTheme = (
|
|
|
397
409
|
}
|
|
398
410
|
},
|
|
399
411
|
{
|
|
400
|
-
props: {
|
|
412
|
+
props: { variant: "card-actions" },
|
|
401
413
|
style: {
|
|
402
414
|
display: "flex",
|
|
403
415
|
flexDirection: "row",
|
|
@@ -407,7 +419,7 @@ export const CreateHawaTheme = (
|
|
|
407
419
|
}
|
|
408
420
|
},
|
|
409
421
|
{
|
|
410
|
-
props: {
|
|
422
|
+
props: { variant: "selected-plan-header" },
|
|
411
423
|
style: {
|
|
412
424
|
display: "flex",
|
|
413
425
|
flexDirection: "column",
|
|
@@ -421,7 +433,7 @@ export const CreateHawaTheme = (
|
|
|
421
433
|
}
|
|
422
434
|
},
|
|
423
435
|
{
|
|
424
|
-
props: {
|
|
436
|
+
props: { variant: "pricing" },
|
|
425
437
|
style: {
|
|
426
438
|
display: "flex",
|
|
427
439
|
flexDirection: "row",
|
|
@@ -433,7 +445,7 @@ export const CreateHawaTheme = (
|
|
|
433
445
|
}
|
|
434
446
|
},
|
|
435
447
|
{
|
|
436
|
-
props: {
|
|
448
|
+
props: { variant: "appbar" },
|
|
437
449
|
style: {
|
|
438
450
|
boxShadow: "none",
|
|
439
451
|
display: "flex",
|
|
@@ -464,7 +476,7 @@ export const CreateHawaTheme = (
|
|
|
464
476
|
},
|
|
465
477
|
variants: [
|
|
466
478
|
{
|
|
467
|
-
props: {
|
|
479
|
+
props: { variant: "layout" },
|
|
468
480
|
style: {
|
|
469
481
|
backgroundColor: primaryLayoutColor,
|
|
470
482
|
"&:hover": {
|
|
@@ -474,7 +486,7 @@ export const CreateHawaTheme = (
|
|
|
474
486
|
}
|
|
475
487
|
},
|
|
476
488
|
{
|
|
477
|
-
props: {
|
|
489
|
+
props: { variant: "color-picker" },
|
|
478
490
|
style: ({ theme }) => ({
|
|
479
491
|
...{
|
|
480
492
|
height: 40,
|
|
@@ -491,21 +503,21 @@ export const CreateHawaTheme = (
|
|
|
491
503
|
})
|
|
492
504
|
},
|
|
493
505
|
{
|
|
494
|
-
props: {
|
|
495
|
-
style: ({
|
|
506
|
+
props: { variant: "danger" },
|
|
507
|
+
style: ({ theme }) => ({
|
|
496
508
|
...{
|
|
497
|
-
backgroundColor: palette.error.main,
|
|
509
|
+
backgroundColor: theme.palette.error.main,
|
|
498
510
|
color: primaryActionTextColor,
|
|
499
511
|
borderRadius: allBorderRadius,
|
|
500
512
|
"&:hover": {
|
|
501
|
-
backgroundColor: darken(palette.error.main, 0.5),
|
|
513
|
+
backgroundColor: darken(theme.palette.error.main, 0.5),
|
|
502
514
|
color: "white"
|
|
503
515
|
}
|
|
504
516
|
}
|
|
505
517
|
})
|
|
506
518
|
},
|
|
507
519
|
{
|
|
508
|
-
props: {
|
|
520
|
+
props: { variant: "last" },
|
|
509
521
|
style: {
|
|
510
522
|
backgroundColor: primaryActionColor,
|
|
511
523
|
color: primaryActionTextColor,
|
|
@@ -518,7 +530,7 @@ export const CreateHawaTheme = (
|
|
|
518
530
|
}
|
|
519
531
|
},
|
|
520
532
|
{
|
|
521
|
-
props: {
|
|
533
|
+
props: { variant: "withLogo" },
|
|
522
534
|
style: {
|
|
523
535
|
textTransform: "none",
|
|
524
536
|
border: `1px solid ${darken(primaryActionColor, 0.1)}`,
|
|
@@ -532,7 +544,7 @@ export const CreateHawaTheme = (
|
|
|
532
544
|
}
|
|
533
545
|
},
|
|
534
546
|
{
|
|
535
|
-
props: {
|
|
547
|
+
props: { variant: "selected" },
|
|
536
548
|
style: {
|
|
537
549
|
display: "flex",
|
|
538
550
|
flexDirection: "row",
|
|
@@ -550,7 +562,7 @@ export const CreateHawaTheme = (
|
|
|
550
562
|
}
|
|
551
563
|
},
|
|
552
564
|
{
|
|
553
|
-
props: {
|
|
565
|
+
props: { variant: "unselected" },
|
|
554
566
|
style: {
|
|
555
567
|
display: "flex",
|
|
556
568
|
flexDirection: "row",
|
|
@@ -563,7 +575,7 @@ export const CreateHawaTheme = (
|
|
|
563
575
|
}
|
|
564
576
|
},
|
|
565
577
|
{
|
|
566
|
-
props: {
|
|
578
|
+
props: { variant: "adaptive-dark" },
|
|
567
579
|
style: {
|
|
568
580
|
backgroundColor: primaryActionColor,
|
|
569
581
|
height: 40,
|
|
@@ -576,7 +588,7 @@ export const CreateHawaTheme = (
|
|
|
576
588
|
}
|
|
577
589
|
},
|
|
578
590
|
{
|
|
579
|
-
props: {
|
|
591
|
+
props: { variant: "adaptive-light" },
|
|
580
592
|
style: {
|
|
581
593
|
display: "flex",
|
|
582
594
|
flexDirection: "row",
|
|
@@ -641,11 +653,11 @@ export const CreateHawaTheme = (
|
|
|
641
653
|
},
|
|
642
654
|
variants: [
|
|
643
655
|
{
|
|
644
|
-
props: {
|
|
656
|
+
props: { variant: "inContainer" },
|
|
645
657
|
style: { color: "black", borderRadius: allBorderRadius }
|
|
646
658
|
}
|
|
647
659
|
// {
|
|
648
|
-
// props: {
|
|
660
|
+
// props: { variant: "offline" },
|
|
649
661
|
// style: ({ theme }) => ({
|
|
650
662
|
// ...{
|
|
651
663
|
// backgroundColor: lighten(theme.palette.error.main, 0.8),
|
|
@@ -667,7 +679,7 @@ export const CreateHawaTheme = (
|
|
|
667
679
|
},
|
|
668
680
|
variants: [
|
|
669
681
|
{
|
|
670
|
-
props: {
|
|
682
|
+
props: { variant: "clicked" },
|
|
671
683
|
style: { backgroundColor: primaryActionColor, color: "white" }
|
|
672
684
|
}
|
|
673
685
|
]
|
|
@@ -675,7 +687,7 @@ export const CreateHawaTheme = (
|
|
|
675
687
|
MuiToolbar: {
|
|
676
688
|
variants: [
|
|
677
689
|
{
|
|
678
|
-
props: {
|
|
690
|
+
props: { variant: "appbar" },
|
|
679
691
|
style: {
|
|
680
692
|
color: "black",
|
|
681
693
|
height: 60,
|
|
@@ -692,7 +704,7 @@ export const CreateHawaTheme = (
|
|
|
692
704
|
styleOverrides: { root: { boxShadow: "none", color: "black" } },
|
|
693
705
|
variants: [
|
|
694
706
|
{
|
|
695
|
-
props: {
|
|
707
|
+
props: { variant: "appbar" },
|
|
696
708
|
style: {
|
|
697
709
|
color: "black",
|
|
698
710
|
margin: 0,
|
|
@@ -701,7 +713,34 @@ export const CreateHawaTheme = (
|
|
|
701
713
|
}
|
|
702
714
|
}
|
|
703
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
|
+
]
|
|
704
742
|
}
|
|
743
|
+
|
|
705
744
|
}
|
|
706
745
|
});
|
|
707
746
|
|
|
@@ -878,5 +917,5 @@ export const UpdateHawaTheme = (
|
|
|
878
917
|
].backgroundColor = primaryActionColor;
|
|
879
918
|
theme.components.MuiListItemButton.variants[0].style.backgroundColor =
|
|
880
919
|
primaryActionColor;
|
|
881
|
-
|
|
920
|
+
return theme;
|
|
882
921
|
};
|
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.826e89a1.iframe.bundle.js"></script><script src="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.826e89a1.iframe.bundle.js"></script><script src="main.2a7fa838.iframe.bundle.js"></script></body></html>
|