@hero-design/rn 8.27.0 → 8.27.2
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/.turbo/turbo-build.log +1 -1
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +319 -311
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +319 -311
- package/package.json +5 -5
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +6 -6
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +2 -2
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +2 -2
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +2 -2
- package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +3 -17
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +1065 -557
- package/src/components/FAB/ActionGroup/__tests__/index.spec.tsx +15 -9
- package/src/components/FAB/ActionGroup/index.tsx +35 -97
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +1 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +10 -10
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +10 -10
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +10 -10
- package/src/components/TextInput/index.tsx +1 -1
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +2 -2
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +2 -2
- package/src/components/Toolbar/StyledToolbar.tsx +23 -2
- package/src/components/Toolbar/ToolbarGroup.tsx +3 -4
- package/src/components/Toolbar/ToolbarItem.tsx +75 -19
- package/src/components/Toolbar/__tests__/ToolbarItem.spec.tsx +39 -22
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +318 -186
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +280 -135
- package/src/components/Typography/Text/StyledText.tsx +2 -1
- package/src/components/Typography/Text/index.tsx +2 -1
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +11 -2
- package/src/theme/components/fab.ts +0 -1
- package/src/theme/components/toolbar.ts +14 -2
- package/src/theme/components/typography.ts +1 -0
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +1 -7
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/Icon/utils.d.ts +1 -1
- package/types/components/Toolbar/StyledToolbar.d.ts +11 -1
- package/types/components/Typography/Text/StyledText.d.ts +1 -1
- package/types/components/Typography/Text/index.d.ts +1 -1
- package/types/theme/components/fab.d.ts +0 -1
- package/types/theme/components/toolbar.d.ts +9 -0
- package/types/theme/components/typography.d.ts +1 -0
|
@@ -20,53 +20,76 @@ exports[`ToolbarItems renders correctly when disabled 1`] = `
|
|
|
20
20
|
style={
|
|
21
21
|
Object {
|
|
22
22
|
"alignItems": "center",
|
|
23
|
+
"flexDirection": "row",
|
|
24
|
+
"height": 64,
|
|
23
25
|
"opacity": 1,
|
|
24
|
-
"paddingHorizontal":
|
|
26
|
+
"paddingHorizontal": 8,
|
|
25
27
|
"paddingVertical": 8,
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
>
|
|
29
|
-
<
|
|
30
|
-
name="home"
|
|
31
|
+
<View
|
|
31
32
|
style={
|
|
32
33
|
Array [
|
|
33
34
|
Object {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
35
|
+
"alignItems": "center",
|
|
36
|
+
"backgroundColor": "#ece8ef",
|
|
37
|
+
"borderRadius": 24,
|
|
38
|
+
"flexDirection": "row",
|
|
39
|
+
"justifyContent": "center",
|
|
40
|
+
"padding": 12,
|
|
36
41
|
},
|
|
37
42
|
undefined,
|
|
38
43
|
]
|
|
39
44
|
}
|
|
40
|
-
testID="toolbar-item-icon-home"
|
|
41
|
-
themeIntent="disabled-text"
|
|
42
|
-
themeSize="medium"
|
|
43
|
-
/>
|
|
44
|
-
<Text
|
|
45
|
-
allowFontScaling={false}
|
|
46
|
-
numberOfLines={1}
|
|
47
|
-
style={
|
|
48
|
-
Array [
|
|
49
|
-
Object {
|
|
50
|
-
"color": "#4d6265",
|
|
51
|
-
"fontFamily": "BeVietnamPro-SemiBold",
|
|
52
|
-
"fontSize": 12,
|
|
53
|
-
"letterSpacing": 0.36,
|
|
54
|
-
"lineHeight": 20,
|
|
55
|
-
},
|
|
56
|
-
undefined,
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
themeFontSize="small"
|
|
60
|
-
themeFontWeight="semi-bold"
|
|
61
|
-
themeIntent="subdued"
|
|
62
|
-
themeTypeface="neutral"
|
|
63
45
|
>
|
|
64
|
-
|
|
65
|
-
|
|
46
|
+
<HeroIcon
|
|
47
|
+
name="home"
|
|
48
|
+
style={
|
|
49
|
+
Array [
|
|
50
|
+
Object {
|
|
51
|
+
"color": "#bfc1c5",
|
|
52
|
+
"fontSize": 24,
|
|
53
|
+
},
|
|
54
|
+
undefined,
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
testID="toolbar-item-icon-home"
|
|
58
|
+
themeIntent="disabled-text"
|
|
59
|
+
themeSize="medium"
|
|
60
|
+
/>
|
|
61
|
+
<Text
|
|
62
|
+
allowFontScaling={false}
|
|
63
|
+
numberOfLines={1}
|
|
64
|
+
style={
|
|
65
|
+
Array [
|
|
66
|
+
Object {
|
|
67
|
+
"color": "#4d6265",
|
|
68
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
69
|
+
"fontSize": 16,
|
|
70
|
+
"letterSpacing": 0.48,
|
|
71
|
+
"lineHeight": 24,
|
|
72
|
+
},
|
|
73
|
+
Array [
|
|
74
|
+
Object {
|
|
75
|
+
"marginLeft": 8,
|
|
76
|
+
},
|
|
77
|
+
undefined,
|
|
78
|
+
],
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
themeFontSize="large"
|
|
82
|
+
themeFontWeight="semi-bold"
|
|
83
|
+
themeIntent="subdued"
|
|
84
|
+
themeTypeface="neutral"
|
|
85
|
+
>
|
|
86
|
+
Action
|
|
87
|
+
</Text>
|
|
88
|
+
</View>
|
|
66
89
|
</View>
|
|
67
90
|
`;
|
|
68
91
|
|
|
69
|
-
exports[`ToolbarItems renders correctly when intent is danger 1`] = `
|
|
92
|
+
exports[`ToolbarItems renders correctly when intent is danger, icon is undefined, label is Discard and disabled is false 1`] = `
|
|
70
93
|
<View
|
|
71
94
|
accessibilityState={
|
|
72
95
|
Object {
|
|
@@ -86,27 +109,14 @@ exports[`ToolbarItems renders correctly when intent is danger 1`] = `
|
|
|
86
109
|
style={
|
|
87
110
|
Object {
|
|
88
111
|
"alignItems": "center",
|
|
112
|
+
"flexDirection": "row",
|
|
113
|
+
"height": 64,
|
|
89
114
|
"opacity": 1,
|
|
90
|
-
"paddingHorizontal":
|
|
115
|
+
"paddingHorizontal": 8,
|
|
91
116
|
"paddingVertical": 8,
|
|
92
117
|
}
|
|
93
118
|
}
|
|
94
119
|
>
|
|
95
|
-
<HeroIcon
|
|
96
|
-
name="home"
|
|
97
|
-
style={
|
|
98
|
-
Array [
|
|
99
|
-
Object {
|
|
100
|
-
"color": "#de350b",
|
|
101
|
-
"fontSize": 24,
|
|
102
|
-
},
|
|
103
|
-
undefined,
|
|
104
|
-
]
|
|
105
|
-
}
|
|
106
|
-
testID="toolbar-item-icon-home"
|
|
107
|
-
themeIntent="danger"
|
|
108
|
-
themeSize="medium"
|
|
109
|
-
/>
|
|
110
120
|
<Text
|
|
111
121
|
allowFontScaling={false}
|
|
112
122
|
numberOfLines={1}
|
|
@@ -115,24 +125,24 @@ exports[`ToolbarItems renders correctly when intent is danger 1`] = `
|
|
|
115
125
|
Object {
|
|
116
126
|
"color": "#f46363",
|
|
117
127
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
118
|
-
"fontSize":
|
|
119
|
-
"letterSpacing": 0.
|
|
120
|
-
"lineHeight":
|
|
128
|
+
"fontSize": 16,
|
|
129
|
+
"letterSpacing": 0.48,
|
|
130
|
+
"lineHeight": 24,
|
|
121
131
|
},
|
|
122
132
|
undefined,
|
|
123
133
|
]
|
|
124
134
|
}
|
|
125
|
-
themeFontSize="
|
|
135
|
+
themeFontSize="large"
|
|
126
136
|
themeFontWeight="semi-bold"
|
|
127
137
|
themeIntent="danger"
|
|
128
138
|
themeTypeface="neutral"
|
|
129
139
|
>
|
|
130
|
-
|
|
140
|
+
Discard
|
|
131
141
|
</Text>
|
|
132
142
|
</View>
|
|
133
143
|
`;
|
|
134
144
|
|
|
135
|
-
exports[`ToolbarItems renders correctly when intent is info 1`] = `
|
|
145
|
+
exports[`ToolbarItems renders correctly when intent is info, icon is undefined, label is Save and disabled is false 1`] = `
|
|
136
146
|
<View
|
|
137
147
|
accessibilityState={
|
|
138
148
|
Object {
|
|
@@ -152,27 +162,14 @@ exports[`ToolbarItems renders correctly when intent is info 1`] = `
|
|
|
152
162
|
style={
|
|
153
163
|
Object {
|
|
154
164
|
"alignItems": "center",
|
|
165
|
+
"flexDirection": "row",
|
|
166
|
+
"height": 64,
|
|
155
167
|
"opacity": 1,
|
|
156
|
-
"paddingHorizontal":
|
|
168
|
+
"paddingHorizontal": 8,
|
|
157
169
|
"paddingVertical": 8,
|
|
158
170
|
}
|
|
159
171
|
}
|
|
160
172
|
>
|
|
161
|
-
<HeroIcon
|
|
162
|
-
name="home"
|
|
163
|
-
style={
|
|
164
|
-
Array [
|
|
165
|
-
Object {
|
|
166
|
-
"color": "#b5c3fd",
|
|
167
|
-
"fontSize": 24,
|
|
168
|
-
},
|
|
169
|
-
undefined,
|
|
170
|
-
]
|
|
171
|
-
}
|
|
172
|
-
testID="toolbar-item-icon-home"
|
|
173
|
-
themeIntent="info"
|
|
174
|
-
themeSize="medium"
|
|
175
|
-
/>
|
|
176
173
|
<Text
|
|
177
174
|
allowFontScaling={false}
|
|
178
175
|
numberOfLines={1}
|
|
@@ -181,24 +178,24 @@ exports[`ToolbarItems renders correctly when intent is info 1`] = `
|
|
|
181
178
|
Object {
|
|
182
179
|
"color": "#4568fb",
|
|
183
180
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
184
|
-
"fontSize":
|
|
185
|
-
"letterSpacing": 0.
|
|
186
|
-
"lineHeight":
|
|
181
|
+
"fontSize": 16,
|
|
182
|
+
"letterSpacing": 0.48,
|
|
183
|
+
"lineHeight": 24,
|
|
187
184
|
},
|
|
188
185
|
undefined,
|
|
189
186
|
]
|
|
190
187
|
}
|
|
191
|
-
themeFontSize="
|
|
188
|
+
themeFontSize="large"
|
|
192
189
|
themeFontWeight="semi-bold"
|
|
193
190
|
themeIntent="info"
|
|
194
191
|
themeTypeface="neutral"
|
|
195
192
|
>
|
|
196
|
-
|
|
193
|
+
Save
|
|
197
194
|
</Text>
|
|
198
195
|
</View>
|
|
199
196
|
`;
|
|
200
197
|
|
|
201
|
-
exports[`ToolbarItems renders correctly when intent is primary 1`] = `
|
|
198
|
+
exports[`ToolbarItems renders correctly when intent is primary, icon is ai-outlined, label is Try again and disabled is false 1`] = `
|
|
202
199
|
<View
|
|
203
200
|
accessibilityState={
|
|
204
201
|
Object {
|
|
@@ -218,53 +215,165 @@ exports[`ToolbarItems renders correctly when intent is primary 1`] = `
|
|
|
218
215
|
style={
|
|
219
216
|
Object {
|
|
220
217
|
"alignItems": "center",
|
|
218
|
+
"flexDirection": "row",
|
|
219
|
+
"height": 64,
|
|
221
220
|
"opacity": 1,
|
|
222
|
-
"paddingHorizontal":
|
|
221
|
+
"paddingHorizontal": 8,
|
|
223
222
|
"paddingVertical": 8,
|
|
224
223
|
}
|
|
225
224
|
}
|
|
226
225
|
>
|
|
227
|
-
<
|
|
228
|
-
name="home"
|
|
226
|
+
<View
|
|
229
227
|
style={
|
|
230
228
|
Array [
|
|
231
229
|
Object {
|
|
232
|
-
"
|
|
233
|
-
"
|
|
230
|
+
"alignItems": "center",
|
|
231
|
+
"backgroundColor": "#ece8ef",
|
|
232
|
+
"borderRadius": 24,
|
|
233
|
+
"flexDirection": "row",
|
|
234
|
+
"justifyContent": "center",
|
|
235
|
+
"padding": 12,
|
|
234
236
|
},
|
|
235
237
|
undefined,
|
|
236
238
|
]
|
|
237
239
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
240
|
+
>
|
|
241
|
+
<HeroIcon
|
|
242
|
+
name="ai-outlined"
|
|
243
|
+
style={
|
|
244
|
+
Array [
|
|
245
|
+
Object {
|
|
246
|
+
"color": "#401960",
|
|
247
|
+
"fontSize": 24,
|
|
248
|
+
},
|
|
249
|
+
undefined,
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
testID="toolbar-item-icon-ai-outlined"
|
|
253
|
+
themeIntent="primary"
|
|
254
|
+
themeSize="medium"
|
|
255
|
+
/>
|
|
256
|
+
<Text
|
|
257
|
+
allowFontScaling={false}
|
|
258
|
+
numberOfLines={1}
|
|
259
|
+
style={
|
|
260
|
+
Array [
|
|
261
|
+
Object {
|
|
262
|
+
"color": "#401960",
|
|
263
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
264
|
+
"fontSize": 16,
|
|
265
|
+
"letterSpacing": 0.48,
|
|
266
|
+
"lineHeight": 24,
|
|
267
|
+
},
|
|
268
|
+
Array [
|
|
269
|
+
Object {
|
|
270
|
+
"marginLeft": 8,
|
|
271
|
+
},
|
|
272
|
+
undefined,
|
|
273
|
+
],
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
themeFontSize="large"
|
|
277
|
+
themeFontWeight="semi-bold"
|
|
278
|
+
themeIntent="primary"
|
|
279
|
+
themeTypeface="neutral"
|
|
280
|
+
>
|
|
281
|
+
Try again
|
|
282
|
+
</Text>
|
|
283
|
+
</View>
|
|
284
|
+
</View>
|
|
285
|
+
`;
|
|
286
|
+
|
|
287
|
+
exports[`ToolbarItems renders correctly when intent is primary, icon is ai-outlined, label is Try again and disabled is true 1`] = `
|
|
288
|
+
<View
|
|
289
|
+
accessibilityState={
|
|
290
|
+
Object {
|
|
291
|
+
"disabled": true,
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
accessible={true}
|
|
295
|
+
collapsable={false}
|
|
296
|
+
focusable={true}
|
|
297
|
+
onClick={[Function]}
|
|
298
|
+
onResponderGrant={[Function]}
|
|
299
|
+
onResponderMove={[Function]}
|
|
300
|
+
onResponderRelease={[Function]}
|
|
301
|
+
onResponderTerminate={[Function]}
|
|
302
|
+
onResponderTerminationRequest={[Function]}
|
|
303
|
+
onStartShouldSetResponder={[Function]}
|
|
304
|
+
style={
|
|
305
|
+
Object {
|
|
306
|
+
"alignItems": "center",
|
|
307
|
+
"flexDirection": "row",
|
|
308
|
+
"height": 64,
|
|
309
|
+
"opacity": 1,
|
|
310
|
+
"paddingHorizontal": 8,
|
|
311
|
+
"paddingVertical": 8,
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
>
|
|
315
|
+
<View
|
|
245
316
|
style={
|
|
246
317
|
Array [
|
|
247
318
|
Object {
|
|
248
|
-
"
|
|
249
|
-
"
|
|
250
|
-
"
|
|
251
|
-
"
|
|
252
|
-
"
|
|
319
|
+
"alignItems": "center",
|
|
320
|
+
"backgroundColor": "#ece8ef",
|
|
321
|
+
"borderRadius": 24,
|
|
322
|
+
"flexDirection": "row",
|
|
323
|
+
"justifyContent": "center",
|
|
324
|
+
"padding": 12,
|
|
253
325
|
},
|
|
254
326
|
undefined,
|
|
255
327
|
]
|
|
256
328
|
}
|
|
257
|
-
themeFontSize="small"
|
|
258
|
-
themeFontWeight="semi-bold"
|
|
259
|
-
themeIntent="primary"
|
|
260
|
-
themeTypeface="neutral"
|
|
261
329
|
>
|
|
262
|
-
|
|
263
|
-
|
|
330
|
+
<HeroIcon
|
|
331
|
+
name="ai-outlined"
|
|
332
|
+
style={
|
|
333
|
+
Array [
|
|
334
|
+
Object {
|
|
335
|
+
"color": "#bfc1c5",
|
|
336
|
+
"fontSize": 24,
|
|
337
|
+
},
|
|
338
|
+
undefined,
|
|
339
|
+
]
|
|
340
|
+
}
|
|
341
|
+
testID="toolbar-item-icon-ai-outlined"
|
|
342
|
+
themeIntent="disabled-text"
|
|
343
|
+
themeSize="medium"
|
|
344
|
+
/>
|
|
345
|
+
<Text
|
|
346
|
+
allowFontScaling={false}
|
|
347
|
+
numberOfLines={1}
|
|
348
|
+
style={
|
|
349
|
+
Array [
|
|
350
|
+
Object {
|
|
351
|
+
"color": "#4d6265",
|
|
352
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
353
|
+
"fontSize": 16,
|
|
354
|
+
"letterSpacing": 0.48,
|
|
355
|
+
"lineHeight": 24,
|
|
356
|
+
},
|
|
357
|
+
Array [
|
|
358
|
+
Object {
|
|
359
|
+
"marginLeft": 8,
|
|
360
|
+
},
|
|
361
|
+
undefined,
|
|
362
|
+
],
|
|
363
|
+
]
|
|
364
|
+
}
|
|
365
|
+
themeFontSize="large"
|
|
366
|
+
themeFontWeight="semi-bold"
|
|
367
|
+
themeIntent="subdued"
|
|
368
|
+
themeTypeface="neutral"
|
|
369
|
+
>
|
|
370
|
+
Try again
|
|
371
|
+
</Text>
|
|
372
|
+
</View>
|
|
264
373
|
</View>
|
|
265
374
|
`;
|
|
266
375
|
|
|
267
|
-
exports[`ToolbarItems renders correctly when intent is
|
|
376
|
+
exports[`ToolbarItems renders correctly when intent is primary, icon is ai-outlined, label is undefined and disabled is false 1`] = `
|
|
268
377
|
<View
|
|
269
378
|
accessibilityState={
|
|
270
379
|
Object {
|
|
@@ -284,27 +393,76 @@ exports[`ToolbarItems renders correctly when intent is success 1`] = `
|
|
|
284
393
|
style={
|
|
285
394
|
Object {
|
|
286
395
|
"alignItems": "center",
|
|
396
|
+
"flexDirection": "row",
|
|
397
|
+
"height": 64,
|
|
287
398
|
"opacity": 1,
|
|
288
|
-
"paddingHorizontal":
|
|
399
|
+
"paddingHorizontal": 8,
|
|
289
400
|
"paddingVertical": 8,
|
|
290
401
|
}
|
|
291
402
|
}
|
|
292
403
|
>
|
|
293
|
-
<
|
|
294
|
-
name="home"
|
|
404
|
+
<View
|
|
295
405
|
style={
|
|
296
406
|
Array [
|
|
297
407
|
Object {
|
|
298
|
-
"
|
|
299
|
-
"
|
|
408
|
+
"alignItems": "center",
|
|
409
|
+
"backgroundColor": "#ece8ef",
|
|
410
|
+
"borderRadius": 24,
|
|
411
|
+
"flexDirection": "row",
|
|
412
|
+
"justifyContent": "center",
|
|
413
|
+
"padding": 12,
|
|
300
414
|
},
|
|
301
415
|
undefined,
|
|
302
416
|
]
|
|
303
417
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
418
|
+
>
|
|
419
|
+
<HeroIcon
|
|
420
|
+
name="ai-outlined"
|
|
421
|
+
style={
|
|
422
|
+
Array [
|
|
423
|
+
Object {
|
|
424
|
+
"color": "#401960",
|
|
425
|
+
"fontSize": 24,
|
|
426
|
+
},
|
|
427
|
+
undefined,
|
|
428
|
+
]
|
|
429
|
+
}
|
|
430
|
+
testID="toolbar-item-icon-ai-outlined"
|
|
431
|
+
themeIntent="primary"
|
|
432
|
+
themeSize="medium"
|
|
433
|
+
/>
|
|
434
|
+
</View>
|
|
435
|
+
</View>
|
|
436
|
+
`;
|
|
437
|
+
|
|
438
|
+
exports[`ToolbarItems renders correctly when intent is success, icon is undefined, label is Save and disabled is false 1`] = `
|
|
439
|
+
<View
|
|
440
|
+
accessibilityState={
|
|
441
|
+
Object {
|
|
442
|
+
"disabled": false,
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
accessible={true}
|
|
446
|
+
collapsable={false}
|
|
447
|
+
focusable={true}
|
|
448
|
+
onClick={[Function]}
|
|
449
|
+
onResponderGrant={[Function]}
|
|
450
|
+
onResponderMove={[Function]}
|
|
451
|
+
onResponderRelease={[Function]}
|
|
452
|
+
onResponderTerminate={[Function]}
|
|
453
|
+
onResponderTerminationRequest={[Function]}
|
|
454
|
+
onStartShouldSetResponder={[Function]}
|
|
455
|
+
style={
|
|
456
|
+
Object {
|
|
457
|
+
"alignItems": "center",
|
|
458
|
+
"flexDirection": "row",
|
|
459
|
+
"height": 64,
|
|
460
|
+
"opacity": 1,
|
|
461
|
+
"paddingHorizontal": 8,
|
|
462
|
+
"paddingVertical": 8,
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
>
|
|
308
466
|
<Text
|
|
309
467
|
allowFontScaling={false}
|
|
310
468
|
numberOfLines={1}
|
|
@@ -313,24 +471,24 @@ exports[`ToolbarItems renders correctly when intent is success 1`] = `
|
|
|
313
471
|
Object {
|
|
314
472
|
"color": "#5ace7d",
|
|
315
473
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
316
|
-
"fontSize":
|
|
317
|
-
"letterSpacing": 0.
|
|
318
|
-
"lineHeight":
|
|
474
|
+
"fontSize": 16,
|
|
475
|
+
"letterSpacing": 0.48,
|
|
476
|
+
"lineHeight": 24,
|
|
319
477
|
},
|
|
320
478
|
undefined,
|
|
321
479
|
]
|
|
322
480
|
}
|
|
323
|
-
themeFontSize="
|
|
481
|
+
themeFontSize="large"
|
|
324
482
|
themeFontWeight="semi-bold"
|
|
325
483
|
themeIntent="success"
|
|
326
484
|
themeTypeface="neutral"
|
|
327
485
|
>
|
|
328
|
-
|
|
486
|
+
Save
|
|
329
487
|
</Text>
|
|
330
488
|
</View>
|
|
331
489
|
`;
|
|
332
490
|
|
|
333
|
-
exports[`ToolbarItems renders correctly when intent is warning 1`] = `
|
|
491
|
+
exports[`ToolbarItems renders correctly when intent is warning, icon is undefined, label is Warning and disabled is false 1`] = `
|
|
334
492
|
<View
|
|
335
493
|
accessibilityState={
|
|
336
494
|
Object {
|
|
@@ -350,27 +508,14 @@ exports[`ToolbarItems renders correctly when intent is warning 1`] = `
|
|
|
350
508
|
style={
|
|
351
509
|
Object {
|
|
352
510
|
"alignItems": "center",
|
|
511
|
+
"flexDirection": "row",
|
|
512
|
+
"height": 64,
|
|
353
513
|
"opacity": 1,
|
|
354
|
-
"paddingHorizontal":
|
|
514
|
+
"paddingHorizontal": 8,
|
|
355
515
|
"paddingVertical": 8,
|
|
356
516
|
}
|
|
357
517
|
}
|
|
358
518
|
>
|
|
359
|
-
<HeroIcon
|
|
360
|
-
name="home"
|
|
361
|
-
style={
|
|
362
|
-
Array [
|
|
363
|
-
Object {
|
|
364
|
-
"color": "#ffbe71",
|
|
365
|
-
"fontSize": 24,
|
|
366
|
-
},
|
|
367
|
-
undefined,
|
|
368
|
-
]
|
|
369
|
-
}
|
|
370
|
-
testID="toolbar-item-icon-home"
|
|
371
|
-
themeIntent="warning"
|
|
372
|
-
themeSize="medium"
|
|
373
|
-
/>
|
|
374
519
|
<Text
|
|
375
520
|
allowFontScaling={false}
|
|
376
521
|
numberOfLines={1}
|
|
@@ -379,19 +524,19 @@ exports[`ToolbarItems renders correctly when intent is warning 1`] = `
|
|
|
379
524
|
Object {
|
|
380
525
|
"color": "#ffbe71",
|
|
381
526
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
382
|
-
"fontSize":
|
|
383
|
-
"letterSpacing": 0.
|
|
384
|
-
"lineHeight":
|
|
527
|
+
"fontSize": 16,
|
|
528
|
+
"letterSpacing": 0.48,
|
|
529
|
+
"lineHeight": 24,
|
|
385
530
|
},
|
|
386
531
|
undefined,
|
|
387
532
|
]
|
|
388
533
|
}
|
|
389
|
-
themeFontSize="
|
|
534
|
+
themeFontSize="large"
|
|
390
535
|
themeFontWeight="semi-bold"
|
|
391
536
|
themeIntent="warning"
|
|
392
537
|
themeTypeface="neutral"
|
|
393
538
|
>
|
|
394
|
-
|
|
539
|
+
Warning
|
|
395
540
|
</Text>
|
|
396
541
|
</View>
|
|
397
542
|
`;
|
|
@@ -30,7 +30,8 @@ const StyledText = styled(Text)<{
|
|
|
30
30
|
| 'warning'
|
|
31
31
|
| 'danger'
|
|
32
32
|
| 'inverted'
|
|
33
|
-
| 'archived'
|
|
33
|
+
| 'archived'
|
|
34
|
+
| 'disabled';
|
|
34
35
|
themeTypeface: 'neutral' | 'playful';
|
|
35
36
|
}>(({ themeFontSize, themeFontWeight, themeIntent, themeTypeface, theme }) => {
|
|
36
37
|
const sizeStyles = {
|
|
@@ -512,7 +512,6 @@ Object {
|
|
|
512
512
|
"containerPadding": 20,
|
|
513
513
|
"headerTextMarginBottom": 24,
|
|
514
514
|
"headerTextMarginRight": 24,
|
|
515
|
-
"internalFABMarginBottom": 24,
|
|
516
515
|
"titleMarginHorizontal": 8,
|
|
517
516
|
},
|
|
518
517
|
},
|
|
@@ -1067,13 +1066,22 @@ Object {
|
|
|
1067
1066
|
"danger": "#ffbe71",
|
|
1068
1067
|
"disabled": "#bfc1c5",
|
|
1069
1068
|
"error": "#f46363",
|
|
1069
|
+
"iconButtonBackground": "#ece8ef",
|
|
1070
1070
|
"info": "#b5c3fd",
|
|
1071
1071
|
"primary": "#401960",
|
|
1072
1072
|
"secondary": "#795e90",
|
|
1073
1073
|
"success": "#5ace7d",
|
|
1074
1074
|
},
|
|
1075
|
+
"radii": Object {
|
|
1076
|
+
"iconButtonWrapperBorderRadius": 24,
|
|
1077
|
+
},
|
|
1078
|
+
"sizes": Object {
|
|
1079
|
+
"itemWrapperHeight": 64,
|
|
1080
|
+
},
|
|
1075
1081
|
"space": Object {
|
|
1076
|
-
"horizontalPadding":
|
|
1082
|
+
"horizontalPadding": 8,
|
|
1083
|
+
"iconButtonLabelMarginLeft": 8,
|
|
1084
|
+
"iconButtonWrapperPadding": 12,
|
|
1077
1085
|
"verticalPadding": 8,
|
|
1078
1086
|
},
|
|
1079
1087
|
},
|
|
@@ -1082,6 +1090,7 @@ Object {
|
|
|
1082
1090
|
"archived": "#737479",
|
|
1083
1091
|
"body": "#001f23",
|
|
1084
1092
|
"danger": "#f46363",
|
|
1093
|
+
"disabled": "#bfc1c5",
|
|
1085
1094
|
"info": "#4568fb",
|
|
1086
1095
|
"inverted": "#ffffff",
|
|
1087
1096
|
"primary": "#401960",
|
|
@@ -58,7 +58,6 @@ const getFABTheme = (theme: GlobalTheme) => {
|
|
|
58
58
|
headerTextMarginBottom: theme.space.large,
|
|
59
59
|
containerPadding: theme.space.large - theme.space.xsmall,
|
|
60
60
|
titleMarginHorizontal: theme.space.small,
|
|
61
|
-
internalFABMarginBottom: theme.space.large,
|
|
62
61
|
};
|
|
63
62
|
|
|
64
63
|
const radii = {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { scale } from '../../utils/scale';
|
|
1
2
|
import type { GlobalTheme } from '../global';
|
|
2
3
|
|
|
3
4
|
const getToolbarTheme = (theme: GlobalTheme) => {
|
|
@@ -11,18 +12,29 @@ const getToolbarTheme = (theme: GlobalTheme) => {
|
|
|
11
12
|
danger: theme.colors.warning,
|
|
12
13
|
error: theme.colors.error,
|
|
13
14
|
disabled: theme.colors.disabledOnDefaultGlobalSurface,
|
|
15
|
+
iconButtonBackground: theme.colors.highlightedSurface,
|
|
14
16
|
};
|
|
15
17
|
|
|
16
18
|
const space = {
|
|
17
19
|
verticalPadding: theme.space.small,
|
|
18
|
-
horizontalPadding: theme.space.
|
|
20
|
+
horizontalPadding: theme.space.small,
|
|
21
|
+
iconButtonLabelMarginLeft: theme.space.small,
|
|
22
|
+
iconButtonWrapperPadding: theme.space.smallMedium,
|
|
19
23
|
};
|
|
20
24
|
|
|
21
25
|
const borderWidths = {
|
|
22
26
|
default: theme.borderWidths.base,
|
|
23
27
|
};
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
const sizes = {
|
|
30
|
+
itemWrapperHeight: scale(64),
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const radii = {
|
|
34
|
+
iconButtonWrapperBorderRadius: theme.radii.xxxlarge,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
return { colors, space, borderWidths, sizes, radii };
|
|
26
38
|
};
|
|
27
39
|
|
|
28
40
|
export default getToolbarTheme;
|