@hero-design/rn 8.81.1 → 8.81.3-alpha.0
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/CHANGELOG.md +12 -0
- package/es/index.js +54 -27
- package/lib/index.js +54 -27
- package/package.json +3 -4
- package/src/components/TimePicker/TimePickerIOS.tsx +5 -1
- package/src/components/Toast/StyledToast.tsx +22 -1
- package/src/components/Toast/Toast.tsx +7 -17
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +117 -27
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +16 -6
- package/src/theme/components/toast.ts +16 -6
- package/stats/8.81.2/rn-stats.html +4844 -0
- package/types/components/Toast/StyledToast.d.ts +15 -1
- package/types/theme/components/toast.d.ts +16 -6
- package/.turbo/turbo-build.log +0 -7
|
@@ -12,7 +12,7 @@ exports[`Toast Icon render custom icon correctly 1`] = `
|
|
|
12
12
|
collapsable={false}
|
|
13
13
|
style={
|
|
14
14
|
{
|
|
15
|
-
"backgroundColor": "#
|
|
15
|
+
"backgroundColor": "#ecf0ff",
|
|
16
16
|
"borderRadius": 0,
|
|
17
17
|
"elevation": 3,
|
|
18
18
|
"flexDirection": "row",
|
|
@@ -71,7 +71,12 @@ exports[`Toast Icon render custom icon correctly 1`] = `
|
|
|
71
71
|
"color": "#001f23",
|
|
72
72
|
"fontSize": 20,
|
|
73
73
|
},
|
|
74
|
-
|
|
74
|
+
[
|
|
75
|
+
{
|
|
76
|
+
"color": "#355bfb",
|
|
77
|
+
},
|
|
78
|
+
undefined,
|
|
79
|
+
],
|
|
75
80
|
]
|
|
76
81
|
}
|
|
77
82
|
themeIntent="text"
|
|
@@ -100,7 +105,12 @@ exports[`Toast Icon render custom icon correctly 1`] = `
|
|
|
100
105
|
"letterSpacing": 0.48,
|
|
101
106
|
"lineHeight": 22,
|
|
102
107
|
},
|
|
103
|
-
|
|
108
|
+
[
|
|
109
|
+
{
|
|
110
|
+
"color": "#355bfb",
|
|
111
|
+
},
|
|
112
|
+
undefined,
|
|
113
|
+
],
|
|
104
114
|
]
|
|
105
115
|
}
|
|
106
116
|
themeIntent="body"
|
|
@@ -147,7 +157,7 @@ exports[`Toast renders correctly when intent is error 1`] = `
|
|
|
147
157
|
collapsable={false}
|
|
148
158
|
style={
|
|
149
159
|
{
|
|
150
|
-
"backgroundColor": "#
|
|
160
|
+
"backgroundColor": "#fcebe7",
|
|
151
161
|
"borderRadius": 0,
|
|
152
162
|
"elevation": 3,
|
|
153
163
|
"flexDirection": "row",
|
|
@@ -206,7 +216,12 @@ exports[`Toast renders correctly when intent is error 1`] = `
|
|
|
206
216
|
"color": "#001f23",
|
|
207
217
|
"fontSize": 20,
|
|
208
218
|
},
|
|
209
|
-
|
|
219
|
+
[
|
|
220
|
+
{
|
|
221
|
+
"color": "#cb300a",
|
|
222
|
+
},
|
|
223
|
+
undefined,
|
|
224
|
+
],
|
|
210
225
|
]
|
|
211
226
|
}
|
|
212
227
|
themeIntent="text"
|
|
@@ -235,7 +250,12 @@ exports[`Toast renders correctly when intent is error 1`] = `
|
|
|
235
250
|
"letterSpacing": 0.48,
|
|
236
251
|
"lineHeight": 22,
|
|
237
252
|
},
|
|
238
|
-
|
|
253
|
+
[
|
|
254
|
+
{
|
|
255
|
+
"color": "#cb300a",
|
|
256
|
+
},
|
|
257
|
+
undefined,
|
|
258
|
+
],
|
|
239
259
|
]
|
|
240
260
|
}
|
|
241
261
|
themeIntent="body"
|
|
@@ -294,7 +314,12 @@ exports[`Toast renders correctly when intent is error 1`] = `
|
|
|
294
314
|
"letterSpacing": 0.24,
|
|
295
315
|
"lineHeight": 22,
|
|
296
316
|
},
|
|
297
|
-
|
|
317
|
+
[
|
|
318
|
+
{
|
|
319
|
+
"color": "#cb300a",
|
|
320
|
+
},
|
|
321
|
+
undefined,
|
|
322
|
+
],
|
|
298
323
|
]
|
|
299
324
|
}
|
|
300
325
|
themeIntent="body"
|
|
@@ -340,7 +365,7 @@ exports[`Toast renders correctly when intent is info 1`] = `
|
|
|
340
365
|
collapsable={false}
|
|
341
366
|
style={
|
|
342
367
|
{
|
|
343
|
-
"backgroundColor": "#
|
|
368
|
+
"backgroundColor": "#ecf0ff",
|
|
344
369
|
"borderRadius": 0,
|
|
345
370
|
"elevation": 3,
|
|
346
371
|
"flexDirection": "row",
|
|
@@ -399,7 +424,12 @@ exports[`Toast renders correctly when intent is info 1`] = `
|
|
|
399
424
|
"color": "#001f23",
|
|
400
425
|
"fontSize": 20,
|
|
401
426
|
},
|
|
402
|
-
|
|
427
|
+
[
|
|
428
|
+
{
|
|
429
|
+
"color": "#355bfb",
|
|
430
|
+
},
|
|
431
|
+
undefined,
|
|
432
|
+
],
|
|
403
433
|
]
|
|
404
434
|
}
|
|
405
435
|
themeIntent="text"
|
|
@@ -428,7 +458,12 @@ exports[`Toast renders correctly when intent is info 1`] = `
|
|
|
428
458
|
"letterSpacing": 0.48,
|
|
429
459
|
"lineHeight": 22,
|
|
430
460
|
},
|
|
431
|
-
|
|
461
|
+
[
|
|
462
|
+
{
|
|
463
|
+
"color": "#355bfb",
|
|
464
|
+
},
|
|
465
|
+
undefined,
|
|
466
|
+
],
|
|
432
467
|
]
|
|
433
468
|
}
|
|
434
469
|
themeIntent="body"
|
|
@@ -487,7 +522,12 @@ exports[`Toast renders correctly when intent is info 1`] = `
|
|
|
487
522
|
"letterSpacing": 0.24,
|
|
488
523
|
"lineHeight": 22,
|
|
489
524
|
},
|
|
490
|
-
|
|
525
|
+
[
|
|
526
|
+
{
|
|
527
|
+
"color": "#355bfb",
|
|
528
|
+
},
|
|
529
|
+
undefined,
|
|
530
|
+
],
|
|
491
531
|
]
|
|
492
532
|
}
|
|
493
533
|
themeIntent="body"
|
|
@@ -594,7 +634,12 @@ exports[`Toast renders correctly when intent is notification 1`] = `
|
|
|
594
634
|
"letterSpacing": 0.48,
|
|
595
635
|
"lineHeight": 22,
|
|
596
636
|
},
|
|
597
|
-
|
|
637
|
+
[
|
|
638
|
+
{
|
|
639
|
+
"color": "#001f23",
|
|
640
|
+
},
|
|
641
|
+
undefined,
|
|
642
|
+
],
|
|
598
643
|
]
|
|
599
644
|
}
|
|
600
645
|
themeIntent="body"
|
|
@@ -653,7 +698,12 @@ exports[`Toast renders correctly when intent is notification 1`] = `
|
|
|
653
698
|
"letterSpacing": 0.24,
|
|
654
699
|
"lineHeight": 22,
|
|
655
700
|
},
|
|
656
|
-
|
|
701
|
+
[
|
|
702
|
+
{
|
|
703
|
+
"color": "#001f23",
|
|
704
|
+
},
|
|
705
|
+
undefined,
|
|
706
|
+
],
|
|
657
707
|
]
|
|
658
708
|
}
|
|
659
709
|
themeIntent="body"
|
|
@@ -754,16 +804,21 @@ exports[`Toast renders correctly when intent is snackbar 1`] = `
|
|
|
754
804
|
style={
|
|
755
805
|
[
|
|
756
806
|
{
|
|
757
|
-
"color": "#
|
|
807
|
+
"color": "#001f23",
|
|
758
808
|
"fontFamily": "BeVietnamPro-Regular",
|
|
759
809
|
"fontSize": 14,
|
|
760
810
|
"letterSpacing": 0.48,
|
|
761
811
|
"lineHeight": 22,
|
|
762
812
|
},
|
|
763
|
-
|
|
813
|
+
[
|
|
814
|
+
{
|
|
815
|
+
"color": "#ffffff",
|
|
816
|
+
},
|
|
817
|
+
undefined,
|
|
818
|
+
],
|
|
764
819
|
]
|
|
765
820
|
}
|
|
766
|
-
themeIntent="
|
|
821
|
+
themeIntent="body"
|
|
767
822
|
themeTypeface="neutral"
|
|
768
823
|
themeVariant="small"
|
|
769
824
|
>
|
|
@@ -813,16 +868,21 @@ exports[`Toast renders correctly when intent is snackbar 1`] = `
|
|
|
813
868
|
style={
|
|
814
869
|
[
|
|
815
870
|
{
|
|
816
|
-
"color": "#
|
|
871
|
+
"color": "#001f23",
|
|
817
872
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
818
873
|
"fontSize": 14,
|
|
819
874
|
"letterSpacing": 0.24,
|
|
820
875
|
"lineHeight": 22,
|
|
821
876
|
},
|
|
822
|
-
|
|
877
|
+
[
|
|
878
|
+
{
|
|
879
|
+
"color": "#ffffff",
|
|
880
|
+
},
|
|
881
|
+
undefined,
|
|
882
|
+
],
|
|
823
883
|
]
|
|
824
884
|
}
|
|
825
|
-
themeIntent="
|
|
885
|
+
themeIntent="body"
|
|
826
886
|
themeTypeface="neutral"
|
|
827
887
|
themeVariant="small-bold"
|
|
828
888
|
>
|
|
@@ -865,7 +925,7 @@ exports[`Toast renders correctly when intent is success 1`] = `
|
|
|
865
925
|
collapsable={false}
|
|
866
926
|
style={
|
|
867
927
|
{
|
|
868
|
-
"backgroundColor": "#
|
|
928
|
+
"backgroundColor": "#f0fef4",
|
|
869
929
|
"borderRadius": 0,
|
|
870
930
|
"elevation": 3,
|
|
871
931
|
"flexDirection": "row",
|
|
@@ -924,7 +984,12 @@ exports[`Toast renders correctly when intent is success 1`] = `
|
|
|
924
984
|
"color": "#001f23",
|
|
925
985
|
"fontSize": 20,
|
|
926
986
|
},
|
|
927
|
-
|
|
987
|
+
[
|
|
988
|
+
{
|
|
989
|
+
"color": "#017d6d",
|
|
990
|
+
},
|
|
991
|
+
undefined,
|
|
992
|
+
],
|
|
928
993
|
]
|
|
929
994
|
}
|
|
930
995
|
themeIntent="text"
|
|
@@ -953,7 +1018,12 @@ exports[`Toast renders correctly when intent is success 1`] = `
|
|
|
953
1018
|
"letterSpacing": 0.48,
|
|
954
1019
|
"lineHeight": 22,
|
|
955
1020
|
},
|
|
956
|
-
|
|
1021
|
+
[
|
|
1022
|
+
{
|
|
1023
|
+
"color": "#017d6d",
|
|
1024
|
+
},
|
|
1025
|
+
undefined,
|
|
1026
|
+
],
|
|
957
1027
|
]
|
|
958
1028
|
}
|
|
959
1029
|
themeIntent="body"
|
|
@@ -1012,7 +1082,12 @@ exports[`Toast renders correctly when intent is success 1`] = `
|
|
|
1012
1082
|
"letterSpacing": 0.24,
|
|
1013
1083
|
"lineHeight": 22,
|
|
1014
1084
|
},
|
|
1015
|
-
|
|
1085
|
+
[
|
|
1086
|
+
{
|
|
1087
|
+
"color": "#017d6d",
|
|
1088
|
+
},
|
|
1089
|
+
undefined,
|
|
1090
|
+
],
|
|
1016
1091
|
]
|
|
1017
1092
|
}
|
|
1018
1093
|
themeIntent="body"
|
|
@@ -1058,7 +1133,7 @@ exports[`Toast renders correctly when intent is warning 1`] = `
|
|
|
1058
1133
|
collapsable={false}
|
|
1059
1134
|
style={
|
|
1060
1135
|
{
|
|
1061
|
-
"backgroundColor": "#
|
|
1136
|
+
"backgroundColor": "#fff6eb",
|
|
1062
1137
|
"borderRadius": 0,
|
|
1063
1138
|
"elevation": 3,
|
|
1064
1139
|
"flexDirection": "row",
|
|
@@ -1117,7 +1192,12 @@ exports[`Toast renders correctly when intent is warning 1`] = `
|
|
|
1117
1192
|
"color": "#001f23",
|
|
1118
1193
|
"fontSize": 20,
|
|
1119
1194
|
},
|
|
1120
|
-
|
|
1195
|
+
[
|
|
1196
|
+
{
|
|
1197
|
+
"color": "#ac5d00",
|
|
1198
|
+
},
|
|
1199
|
+
undefined,
|
|
1200
|
+
],
|
|
1121
1201
|
]
|
|
1122
1202
|
}
|
|
1123
1203
|
themeIntent="text"
|
|
@@ -1146,7 +1226,12 @@ exports[`Toast renders correctly when intent is warning 1`] = `
|
|
|
1146
1226
|
"letterSpacing": 0.48,
|
|
1147
1227
|
"lineHeight": 22,
|
|
1148
1228
|
},
|
|
1149
|
-
|
|
1229
|
+
[
|
|
1230
|
+
{
|
|
1231
|
+
"color": "#ac5d00",
|
|
1232
|
+
},
|
|
1233
|
+
undefined,
|
|
1234
|
+
],
|
|
1150
1235
|
]
|
|
1151
1236
|
}
|
|
1152
1237
|
themeIntent="body"
|
|
@@ -1205,7 +1290,12 @@ exports[`Toast renders correctly when intent is warning 1`] = `
|
|
|
1205
1290
|
"letterSpacing": 0.24,
|
|
1206
1291
|
"lineHeight": 22,
|
|
1207
1292
|
},
|
|
1208
|
-
|
|
1293
|
+
[
|
|
1294
|
+
{
|
|
1295
|
+
"color": "#ac5d00",
|
|
1296
|
+
},
|
|
1297
|
+
undefined,
|
|
1298
|
+
],
|
|
1209
1299
|
]
|
|
1210
1300
|
}
|
|
1211
1301
|
themeIntent="body"
|
|
@@ -1277,13 +1277,23 @@ exports[`theme returns correct theme object 1`] = `
|
|
|
1277
1277
|
"base": 1,
|
|
1278
1278
|
},
|
|
1279
1279
|
"colors": {
|
|
1280
|
+
"backgrounds": {
|
|
1281
|
+
"error": "#fcebe7",
|
|
1282
|
+
"info": "#ecf0ff",
|
|
1283
|
+
"notification": "#ffffff",
|
|
1284
|
+
"snackbar": "#001f23",
|
|
1285
|
+
"success": "#f0fef4",
|
|
1286
|
+
"warning": "#fff6eb",
|
|
1287
|
+
},
|
|
1280
1288
|
"divider": "#e8e9ea",
|
|
1281
|
-
"
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1289
|
+
"texts": {
|
|
1290
|
+
"error": "#cb300a",
|
|
1291
|
+
"info": "#355bfb",
|
|
1292
|
+
"notification": "#001f23",
|
|
1293
|
+
"snackbar": "#ffffff",
|
|
1294
|
+
"success": "#017d6d",
|
|
1295
|
+
"warning": "#ac5d00",
|
|
1296
|
+
},
|
|
1287
1297
|
},
|
|
1288
1298
|
"radii": {
|
|
1289
1299
|
"default": 16,
|
|
@@ -2,12 +2,22 @@ import type { GlobalTheme } from '../global';
|
|
|
2
2
|
|
|
3
3
|
const getToastTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
backgrounds: {
|
|
6
|
+
success: theme.colors.successSurface,
|
|
7
|
+
warning: theme.colors.warningSurface,
|
|
8
|
+
error: theme.colors.errorSurface,
|
|
9
|
+
info: theme.colors.infoSurface,
|
|
10
|
+
notification: theme.colors.defaultGlobalSurface,
|
|
11
|
+
snackbar: theme.colors.darkGlobalSurface,
|
|
12
|
+
},
|
|
13
|
+
texts: {
|
|
14
|
+
success: theme.colors.onSuccessSurface,
|
|
15
|
+
warning: theme.colors.onWarningSurface,
|
|
16
|
+
error: theme.colors.onErrorSurface,
|
|
17
|
+
info: theme.colors.onInfoSurface,
|
|
18
|
+
notification: theme.colors.onDefaultGlobalSurface,
|
|
19
|
+
snackbar: theme.colors.onDarkGlobalSurface,
|
|
20
|
+
},
|
|
11
21
|
divider: theme.colors.secondaryOutline,
|
|
12
22
|
};
|
|
13
23
|
|