@hero-design/rn 8.52.0 → 8.52.2-rc2.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +26 -0
- package/es/index.js +399 -709
- package/lib/index.js +397 -708
- package/package.json +7 -7
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +0 -4
- package/src/components/Accordion/__tests__/__snapshots__/StyledAccordion.spec.tsx.snap +0 -2
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +0 -7
- package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +0 -2
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +0 -3
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +0 -6
- package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +0 -2
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +32 -21
- package/src/components/BottomSheet/index.tsx +1 -1
- package/src/components/Box/__tests__/__snapshots__/index.spec.tsx.snap +0 -21
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +0 -10
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +0 -10
- package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +0 -16
- package/src/components/Button/__tests__/__snapshots__/IconButton.spec.tsx.snap +0 -1
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +0 -32
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +0 -5
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +0 -7
- package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +0 -5
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +0 -1
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +0 -6
- package/src/components/Carousel/CardCarousel.tsx +1 -5
- package/src/components/Carousel/StyledCardCarousel.tsx +1 -16
- package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +92 -174
- package/src/components/Carousel/__tests__/__snapshots__/StyledCardCarousel.spec.tsx.snap +0 -4
- package/src/components/Carousel/__tests__/__snapshots__/StyledCarousel.spec.tsx.snap +0 -1
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +1 -803
- package/src/components/Carousel/__tests__/index.spec.tsx +37 -47
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +0 -8
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +0 -6
- package/src/components/Checkbox/index.tsx +1 -13
- package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +0 -12
- package/src/components/Collapse/__tests__/__snapshots__/StyledCollapse.spec.tsx.snap +0 -2
- package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
- package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +0 -1
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +0 -15
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +0 -1
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +0 -1
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +309 -329
- package/src/components/Divider/__tests__/__snapshots__/StyledDivider.spec.tsx.snap +0 -12
- package/src/components/Drawer/DragableDrawer/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
- package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
- package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
- package/src/components/Error/index.tsx +3 -20
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
- package/src/components/FAB/ActionGroup/index.tsx +1 -14
- package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +0 -2
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +0 -3
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
- package/src/components/HeroDesignProvider/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
- package/src/components/Image/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +0 -2
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +0 -4
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +0 -4
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +0 -9
- package/src/components/Modal/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
- package/src/components/PageControl/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +0 -5
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
- package/src/components/Portal/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +0 -5
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +0 -2
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +0 -1
- package/src/components/Rate/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
- package/src/components/RefreshControl/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
- package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +0 -1
- package/src/components/RichTextEditor/__tests__/__snapshots__/MentionList.spec.tsx.snap +0 -1
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +0 -2
- package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +0 -4
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +0 -6
- package/src/components/SectionHeading/__tests__/index.spec.tsx +0 -1
- package/src/components/SectionHeading/index.tsx +32 -57
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +0 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +0 -4
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +128 -42
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +0 -1
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +0 -4
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +96 -35
- package/src/components/Skeleton/__tests__/__snapshots__/index.spec.tsx.snap +0 -7
- package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +0 -1
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +0 -24
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
- package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +0 -3
- package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +0 -4
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +0 -1
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +0 -5
- package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +0 -2
- package/src/components/Tabs/__tests__/SceneView.spec.tsx +1 -1
- package/src/components/Tabs/__tests__/__snapshots__/SceneView.spec.tsx.snap +0 -4
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +0 -3
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +0 -1
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +0 -2
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +0 -3
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +0 -10
- package/src/components/Tag/index.tsx +0 -12
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +0 -21
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +0 -17
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +0 -2
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +309 -330
- package/src/components/Toast/StyledToast.tsx +7 -9
- package/src/components/Toast/Toast.tsx +1 -4
- package/src/components/Toast/ToastContainer.tsx +2 -6
- package/src/components/Toast/ToastContext.ts +2 -5
- package/src/components/Toast/ToastProvider.tsx +2 -19
- package/src/components/Toast/__tests__/ToastContainer.spec.tsx +12 -15
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +0 -7
- package/src/components/Toast/__tests__/__snapshots__/ToastContainer.spec.tsx.snap +6 -14
- package/src/components/Toast/types.ts +1 -5
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +0 -3
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +0 -8
- package/src/components/Typography/Body/__tests__/__snapshots__/StyledBody.tsx.snap +0 -16
- package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +0 -19
- package/src/components/Typography/Caption/__tests__/__snapshots__/StyledCaption.spec.tsx.snap +0 -10
- package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +0 -13
- package/src/components/Typography/Label/__tests__/__snapshots__/StyledLabel.tsx.snap +0 -8
- package/src/components/Typography/Label/__tests__/__snapshots__/index.spec.tsx.snap +0 -11
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +0 -20
- package/src/components/Typography/Title/__tests__/__snapshots__/StyledTitle.tsx.snap +0 -20
- package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +0 -23
- package/src/index.ts +0 -2
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +0 -112
- package/src/theme/components/badge.ts +1 -28
- package/src/theme/components/button.ts +0 -24
- package/src/theme/components/cardCarousel.ts +1 -8
- package/src/theme/components/carousel.ts +1 -28
- package/src/theme/components/empty.ts +1 -23
- package/src/theme/components/error.ts +1 -32
- package/src/theme/components/fab.ts +2 -13
- package/src/theme/components/pinInput.ts +0 -32
- package/src/theme/components/success.ts +1 -23
- package/src/theme/components/tag.ts +1 -28
- package/src/theme/components/textInput.ts +0 -5
- package/src/theme/getTheme.ts +18 -21
- package/src/types.ts +0 -2
- package/types/components/Carousel/StyledCardCarousel.d.ts +1 -7
- package/types/components/Checkbox/index.d.ts +1 -6
- package/types/components/Error/index.d.ts +3 -9
- package/types/components/FAB/ActionGroup/index.d.ts +0 -5
- package/types/components/SectionHeading/index.d.ts +1 -11
- package/types/components/Tag/index.d.ts +1 -6
- package/types/components/Toast/StyledToast.d.ts +0 -2
- package/types/components/Toast/ToastContext.d.ts +2 -2
- package/types/components/Toast/ToastProvider.d.ts +1 -1
- package/types/components/Toast/index.d.ts +1 -1
- package/types/components/Toast/types.d.ts +1 -5
- package/types/index.d.ts +1 -2
- package/types/theme/components/badge.d.ts +0 -24
- package/types/theme/components/button.d.ts +0 -20
- package/types/theme/components/cardCarousel.d.ts +0 -10
- package/types/theme/components/carousel.d.ts +0 -24
- package/types/theme/components/empty.d.ts +0 -19
- package/types/theme/components/error.d.ts +0 -27
- package/types/theme/components/fab.d.ts +8 -19
- package/types/theme/components/pinInput.d.ts +0 -27
- package/types/theme/components/success.d.ts +0 -19
- package/types/theme/components/tag.d.ts +0 -24
- package/types/theme/components/textInput.d.ts +0 -5
- package/types/theme/getTheme.d.ts +18 -20
- package/types/types.d.ts +1 -2
- package/src/components/BottomNavigation/StyledBottomNavigation.tsx +0 -60
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +0 -413
- package/src/components/BottomNavigation/__tests__/index.spec.tsx +0 -97
- package/src/components/BottomNavigation/index.tsx +0 -166
- package/src/theme/components/bottomNavigation.ts +0 -27
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -52
- package/types/components/BottomNavigation/index.d.ts +0 -45
- package/types/theme/components/bottomNavigation.d.ts +0 -23
|
@@ -24,7 +24,6 @@ exports[`Divider has large marginHorizontal style 1`] = `
|
|
|
24
24
|
/>
|
|
25
25
|
<View
|
|
26
26
|
pointerEvents="box-none"
|
|
27
|
-
position="bottom"
|
|
28
27
|
style={
|
|
29
28
|
[
|
|
30
29
|
{
|
|
@@ -69,7 +68,6 @@ exports[`Divider has large marginVertical style 1`] = `
|
|
|
69
68
|
/>
|
|
70
69
|
<View
|
|
71
70
|
pointerEvents="box-none"
|
|
72
|
-
position="bottom"
|
|
73
71
|
style={
|
|
74
72
|
[
|
|
75
73
|
{
|
|
@@ -114,7 +112,6 @@ exports[`Divider has medium marginHorizontal style 1`] = `
|
|
|
114
112
|
/>
|
|
115
113
|
<View
|
|
116
114
|
pointerEvents="box-none"
|
|
117
|
-
position="bottom"
|
|
118
115
|
style={
|
|
119
116
|
[
|
|
120
117
|
{
|
|
@@ -159,7 +156,6 @@ exports[`Divider has medium marginVertical style 1`] = `
|
|
|
159
156
|
/>
|
|
160
157
|
<View
|
|
161
158
|
pointerEvents="box-none"
|
|
162
|
-
position="bottom"
|
|
163
159
|
style={
|
|
164
160
|
[
|
|
165
161
|
{
|
|
@@ -204,7 +200,6 @@ exports[`Divider has small marginHorizontal style 1`] = `
|
|
|
204
200
|
/>
|
|
205
201
|
<View
|
|
206
202
|
pointerEvents="box-none"
|
|
207
|
-
position="bottom"
|
|
208
203
|
style={
|
|
209
204
|
[
|
|
210
205
|
{
|
|
@@ -249,7 +244,6 @@ exports[`Divider has small marginVertical style 1`] = `
|
|
|
249
244
|
/>
|
|
250
245
|
<View
|
|
251
246
|
pointerEvents="box-none"
|
|
252
|
-
position="bottom"
|
|
253
247
|
style={
|
|
254
248
|
[
|
|
255
249
|
{
|
|
@@ -292,7 +286,6 @@ exports[`Divider has undefined marginHorizontal style 1`] = `
|
|
|
292
286
|
/>
|
|
293
287
|
<View
|
|
294
288
|
pointerEvents="box-none"
|
|
295
|
-
position="bottom"
|
|
296
289
|
style={
|
|
297
290
|
[
|
|
298
291
|
{
|
|
@@ -335,7 +328,6 @@ exports[`Divider has undefined marginVertical style 1`] = `
|
|
|
335
328
|
/>
|
|
336
329
|
<View
|
|
337
330
|
pointerEvents="box-none"
|
|
338
|
-
position="bottom"
|
|
339
331
|
style={
|
|
340
332
|
[
|
|
341
333
|
{
|
|
@@ -380,7 +372,6 @@ exports[`Divider has xlarge marginHorizontal style 1`] = `
|
|
|
380
372
|
/>
|
|
381
373
|
<View
|
|
382
374
|
pointerEvents="box-none"
|
|
383
|
-
position="bottom"
|
|
384
375
|
style={
|
|
385
376
|
[
|
|
386
377
|
{
|
|
@@ -425,7 +416,6 @@ exports[`Divider has xlarge marginVertical style 1`] = `
|
|
|
425
416
|
/>
|
|
426
417
|
<View
|
|
427
418
|
pointerEvents="box-none"
|
|
428
|
-
position="bottom"
|
|
429
419
|
style={
|
|
430
420
|
[
|
|
431
421
|
{
|
|
@@ -470,7 +460,6 @@ exports[`Divider has xsmall marginHorizontal style 1`] = `
|
|
|
470
460
|
/>
|
|
471
461
|
<View
|
|
472
462
|
pointerEvents="box-none"
|
|
473
|
-
position="bottom"
|
|
474
463
|
style={
|
|
475
464
|
[
|
|
476
465
|
{
|
|
@@ -515,7 +504,6 @@ exports[`Divider has xsmall marginVertical style 1`] = `
|
|
|
515
504
|
/>
|
|
516
505
|
<View
|
|
517
506
|
pointerEvents="box-none"
|
|
518
|
-
position="bottom"
|
|
519
507
|
style={
|
|
520
508
|
[
|
|
521
509
|
{
|
|
@@ -103,7 +103,6 @@ exports[`Drawer renders correctly in invisible state 1`] = `
|
|
|
103
103
|
</View>
|
|
104
104
|
<View
|
|
105
105
|
pointerEvents="box-none"
|
|
106
|
-
position="bottom"
|
|
107
106
|
style={
|
|
108
107
|
[
|
|
109
108
|
{
|
|
@@ -227,7 +226,6 @@ exports[`Drawer renders correctly in visible state 1`] = `
|
|
|
227
226
|
</View>
|
|
228
227
|
<View
|
|
229
228
|
pointerEvents="box-none"
|
|
230
|
-
position="bottom"
|
|
231
229
|
style={
|
|
232
230
|
[
|
|
233
231
|
{
|
|
@@ -351,7 +349,6 @@ exports[`Drawer renders correctly with no backdrop 1`] = `
|
|
|
351
349
|
</View>
|
|
352
350
|
<View
|
|
353
351
|
pointerEvents="box-none"
|
|
354
|
-
position="bottom"
|
|
355
352
|
style={
|
|
356
353
|
[
|
|
357
354
|
{
|
|
@@ -80,7 +80,6 @@ exports[`Empty renders empty state content correctly 1`] = `
|
|
|
80
80
|
</View>
|
|
81
81
|
<View
|
|
82
82
|
pointerEvents="box-none"
|
|
83
|
-
position="bottom"
|
|
84
83
|
style={
|
|
85
84
|
[
|
|
86
85
|
{
|
|
@@ -196,7 +195,6 @@ exports[`Empty renders empty state with image correctly 1`] = `
|
|
|
196
195
|
</View>
|
|
197
196
|
<View
|
|
198
197
|
pointerEvents="box-none"
|
|
199
|
-
position="bottom"
|
|
200
198
|
style={
|
|
201
199
|
[
|
|
202
200
|
{
|
|
@@ -125,7 +125,6 @@ exports[`Error renders error screen with custom image element correctly 1`] = `
|
|
|
125
125
|
</View>
|
|
126
126
|
<View
|
|
127
127
|
pointerEvents="box-none"
|
|
128
|
-
position="bottom"
|
|
129
128
|
style={
|
|
130
129
|
[
|
|
131
130
|
{
|
|
@@ -279,7 +278,6 @@ exports[`Error renders error screen with image correctly 1`] = `
|
|
|
279
278
|
</View>
|
|
280
279
|
<View
|
|
281
280
|
pointerEvents="box-none"
|
|
282
|
-
position="bottom"
|
|
283
281
|
style={
|
|
284
282
|
[
|
|
285
283
|
{
|
|
@@ -466,7 +464,6 @@ exports[`Error renders full screen error page correctly 1`] = `
|
|
|
466
464
|
</View>
|
|
467
465
|
<View
|
|
468
466
|
pointerEvents="box-none"
|
|
469
|
-
position="bottom"
|
|
470
467
|
style={
|
|
471
468
|
[
|
|
472
469
|
{
|
|
@@ -581,7 +578,6 @@ exports[`Error renders title only correctly 1`] = `
|
|
|
581
578
|
</View>
|
|
582
579
|
<View
|
|
583
580
|
pointerEvents="box-none"
|
|
584
|
-
position="bottom"
|
|
585
581
|
style={
|
|
586
582
|
[
|
|
587
583
|
{
|
|
@@ -7,9 +7,10 @@ import React, {
|
|
|
7
7
|
} from 'react';
|
|
8
8
|
import type {
|
|
9
9
|
ImageSourcePropType,
|
|
10
|
-
ViewProps,
|
|
11
10
|
ImageProps as RNImageProps,
|
|
11
|
+
ViewProps,
|
|
12
12
|
} from 'react-native';
|
|
13
|
+
import { ImageProps } from '../Image/index';
|
|
13
14
|
import {
|
|
14
15
|
ErrorVariant,
|
|
15
16
|
StyledErrorButtonContainer,
|
|
@@ -23,16 +24,8 @@ import {
|
|
|
23
24
|
StyledErrorModal,
|
|
24
25
|
StyledErrorTitle,
|
|
25
26
|
} from './StyledError';
|
|
26
|
-
import { useDeprecation } from '../../utils/hooks';
|
|
27
|
-
import { ImageProps } from '../Image/index';
|
|
28
27
|
|
|
29
28
|
interface ErrorProps extends ViewProps {
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated use conditional rendering instead
|
|
32
|
-
*
|
|
33
|
-
* Visibility of the error
|
|
34
|
-
*/
|
|
35
|
-
visible?: boolean;
|
|
36
29
|
/**
|
|
37
30
|
* Variant of the error
|
|
38
31
|
*/
|
|
@@ -160,7 +153,6 @@ const ErrorPage = ({
|
|
|
160
153
|
* @return {*} {ReactElement}
|
|
161
154
|
*/
|
|
162
155
|
const Error = ({
|
|
163
|
-
visible = true,
|
|
164
156
|
variant = 'in-page',
|
|
165
157
|
title,
|
|
166
158
|
description,
|
|
@@ -172,12 +164,7 @@ const Error = ({
|
|
|
172
164
|
onSecondaryCtaPress,
|
|
173
165
|
...nativeProps
|
|
174
166
|
}: ErrorProps): ReactElement => {
|
|
175
|
-
|
|
176
|
-
`Visible prop is deprecated. Use conditional rendering instead`,
|
|
177
|
-
visible
|
|
178
|
-
);
|
|
179
|
-
|
|
180
|
-
const [isVisible, setIsVisible] = useState(visible);
|
|
167
|
+
const [isVisible, setIsVisible] = useState(true);
|
|
181
168
|
const [ctaPressed, setCtaPressed] = useState<onCloseCallbackType>(null);
|
|
182
169
|
|
|
183
170
|
const onCloseModal = useCallback(() => {
|
|
@@ -190,10 +177,6 @@ const Error = ({
|
|
|
190
177
|
setCtaPressed(null);
|
|
191
178
|
}, [ctaPressed, onCtaPress, onSecondaryCtaPress]);
|
|
192
179
|
|
|
193
|
-
useEffect(() => {
|
|
194
|
-
setIsVisible(visible);
|
|
195
|
-
}, [visible]);
|
|
196
|
-
|
|
197
180
|
// These useEffect lines prevents race condition error when callback contains navigation logic
|
|
198
181
|
useEffect(() => {
|
|
199
182
|
if (ctaPressed) {
|
|
@@ -168,7 +168,6 @@ exports[`ActionGroup has active false 1`] = `
|
|
|
168
168
|
</View>
|
|
169
169
|
<View
|
|
170
170
|
pointerEvents="box-none"
|
|
171
|
-
position="bottom"
|
|
172
171
|
style={
|
|
173
172
|
[
|
|
174
173
|
{
|
|
@@ -1097,7 +1096,6 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
1097
1096
|
</View>
|
|
1098
1097
|
<View
|
|
1099
1098
|
pointerEvents="box-none"
|
|
1100
|
-
position="bottom"
|
|
1101
1099
|
style={
|
|
1102
1100
|
[
|
|
1103
1101
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef, useRef } from 'react';
|
|
2
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { Animated,
|
|
3
|
+
import { Animated, Modal, Platform } from 'react-native';
|
|
4
4
|
import type { IconName } from '../../Icon';
|
|
5
5
|
import type { ActionItemProps } from './ActionItem';
|
|
6
6
|
import ActionItem from './ActionItem';
|
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
|
|
15
15
|
import Box from '../../Box';
|
|
16
16
|
import { FABHandles } from '../FAB';
|
|
17
|
-
import { useDeprecation } from '../../../utils/hooks';
|
|
18
17
|
|
|
19
18
|
export type ActionGroupHandles = {
|
|
20
19
|
showFAB: () => void;
|
|
@@ -23,12 +22,6 @@ export type ActionGroupHandles = {
|
|
|
23
22
|
};
|
|
24
23
|
|
|
25
24
|
export interface ActionGroupProps {
|
|
26
|
-
/**
|
|
27
|
-
* @deprecated headerTitle will be removed in the next major release.
|
|
28
|
-
* Title of the action group header.
|
|
29
|
-
*/
|
|
30
|
-
headerTitle?: string;
|
|
31
|
-
|
|
32
25
|
/**
|
|
33
26
|
* This function is called on pressing the FAB button.
|
|
34
27
|
* */
|
|
@@ -71,7 +64,6 @@ export interface ActionGroupProps {
|
|
|
71
64
|
const ActionGroup = forwardRef<ActionGroupHandles, ActionGroupProps>(
|
|
72
65
|
(
|
|
73
66
|
{
|
|
74
|
-
headerTitle,
|
|
75
67
|
onPress,
|
|
76
68
|
active,
|
|
77
69
|
style,
|
|
@@ -83,11 +75,6 @@ const ActionGroup = forwardRef<ActionGroupHandles, ActionGroupProps>(
|
|
|
83
75
|
},
|
|
84
76
|
ref
|
|
85
77
|
) => {
|
|
86
|
-
useDeprecation(
|
|
87
|
-
`FAB.ActionGroup's headerTitle prop will be removed in the next major release. Please remove it.`,
|
|
88
|
-
headerTitle !== undefined
|
|
89
|
-
);
|
|
90
|
-
|
|
91
78
|
const fabRef = useRef<FABHandles>(null);
|
|
92
79
|
const tranlateXAnimation = useRef<Animated.Value>(
|
|
93
80
|
new Animated.Value(active ? 1 : 0)
|
|
@@ -45,7 +45,6 @@ exports[`AnimatedFABIcon renders correctly when isActive is false 1`] = `
|
|
|
45
45
|
</View>
|
|
46
46
|
<View
|
|
47
47
|
pointerEvents="box-none"
|
|
48
|
-
position="bottom"
|
|
49
48
|
style={
|
|
50
49
|
[
|
|
51
50
|
{
|
|
@@ -111,7 +110,6 @@ exports[`AnimatedFABIcon renders correctly when isActive is true 1`] = `
|
|
|
111
110
|
</View>
|
|
112
111
|
<View
|
|
113
112
|
pointerEvents="box-none"
|
|
114
|
-
position="bottom"
|
|
115
113
|
style={
|
|
116
114
|
[
|
|
117
115
|
{
|
|
@@ -72,7 +72,6 @@ exports[`StyledFAB renders correctly 1`] = `
|
|
|
72
72
|
</View>
|
|
73
73
|
<View
|
|
74
74
|
pointerEvents="box-none"
|
|
75
|
-
position="bottom"
|
|
76
75
|
style={
|
|
77
76
|
[
|
|
78
77
|
{
|
|
@@ -165,7 +164,6 @@ exports[`StyledFAB renders correctly 2`] = `
|
|
|
165
164
|
</View>
|
|
166
165
|
<View
|
|
167
166
|
pointerEvents="box-none"
|
|
168
|
-
position="bottom"
|
|
169
167
|
style={
|
|
170
168
|
[
|
|
171
169
|
{
|
|
@@ -218,7 +216,6 @@ exports[`StyledFABIcon renders correctly 1`] = `
|
|
|
218
216
|
/>
|
|
219
217
|
<View
|
|
220
218
|
pointerEvents="box-none"
|
|
221
|
-
position="bottom"
|
|
222
219
|
style={
|
|
223
220
|
[
|
|
224
221
|
{
|
|
@@ -83,7 +83,6 @@ exports[`FAB when animated is false renders StyledFABIcon 1`] = `
|
|
|
83
83
|
</View>
|
|
84
84
|
<View
|
|
85
85
|
pointerEvents="box-none"
|
|
86
|
-
position="bottom"
|
|
87
86
|
style={
|
|
88
87
|
[
|
|
89
88
|
{
|
|
@@ -217,7 +216,6 @@ exports[`FAB when animated is true renders animatedFABIcon 1`] = `
|
|
|
217
216
|
</View>
|
|
218
217
|
<View
|
|
219
218
|
pointerEvents="box-none"
|
|
220
|
-
position="bottom"
|
|
221
219
|
style={
|
|
222
220
|
[
|
|
223
221
|
{
|
|
@@ -366,7 +364,6 @@ exports[`FAB when title has value renders correctly 1`] = `
|
|
|
366
364
|
</View>
|
|
367
365
|
<View
|
|
368
366
|
pointerEvents="box-none"
|
|
369
|
-
position="bottom"
|
|
370
367
|
style={
|
|
371
368
|
[
|
|
372
369
|
{
|
|
@@ -37,7 +37,6 @@ exports[`HeroDesignProvider renders children correctly 1`] = `
|
|
|
37
37
|
</Text>
|
|
38
38
|
<View
|
|
39
39
|
pointerEvents="box-none"
|
|
40
|
-
position="bottom"
|
|
41
40
|
style={
|
|
42
41
|
[
|
|
43
42
|
{
|
|
@@ -58,7 +57,6 @@ exports[`HeroDesignProvider renders children correctly 1`] = `
|
|
|
58
57
|
</View>
|
|
59
58
|
<View
|
|
60
59
|
pointerEvents="box-none"
|
|
61
|
-
position="bottom"
|
|
62
60
|
style={
|
|
63
61
|
[
|
|
64
62
|
{
|
|
@@ -37,7 +37,6 @@ exports[`Icon render correctly with spin prop 1`] = `
|
|
|
37
37
|
</View>
|
|
38
38
|
<View
|
|
39
39
|
pointerEvents="box-none"
|
|
40
|
-
position="bottom"
|
|
41
40
|
style={
|
|
42
41
|
[
|
|
43
42
|
{
|
|
@@ -82,7 +81,6 @@ exports[`Icon renders correctly 1`] = `
|
|
|
82
81
|
/>
|
|
83
82
|
<View
|
|
84
83
|
pointerEvents="box-none"
|
|
85
|
-
position="bottom"
|
|
86
84
|
style={
|
|
87
85
|
[
|
|
88
86
|
{
|
|
@@ -127,7 +125,6 @@ exports[`Icon renders correctly with color and size 1`] = `
|
|
|
127
125
|
/>
|
|
128
126
|
<View
|
|
129
127
|
pointerEvents="box-none"
|
|
130
|
-
position="bottom"
|
|
131
128
|
style={
|
|
132
129
|
[
|
|
133
130
|
{
|
|
@@ -172,7 +169,6 @@ exports[`Icon renders correctly with intent 1`] = `
|
|
|
172
169
|
/>
|
|
173
170
|
<View
|
|
174
171
|
pointerEvents="box-none"
|
|
175
|
-
position="bottom"
|
|
176
172
|
style={
|
|
177
173
|
[
|
|
178
174
|
{
|
|
@@ -27,7 +27,6 @@ exports[`Image renders correctly when rounded is false 1`] = `
|
|
|
27
27
|
/>
|
|
28
28
|
<View
|
|
29
29
|
pointerEvents="box-none"
|
|
30
|
-
position="bottom"
|
|
31
30
|
style={
|
|
32
31
|
[
|
|
33
32
|
{
|
|
@@ -75,7 +74,6 @@ exports[`Image renders correctly when rounded is true 1`] = `
|
|
|
75
74
|
/>
|
|
76
75
|
<View
|
|
77
76
|
pointerEvents="box-none"
|
|
78
|
-
position="bottom"
|
|
79
77
|
style={
|
|
80
78
|
[
|
|
81
79
|
{
|
|
@@ -123,7 +121,6 @@ exports[`Image renders correctly when size is 6xlarge 1`] = `
|
|
|
123
121
|
/>
|
|
124
122
|
<View
|
|
125
123
|
pointerEvents="box-none"
|
|
126
|
-
position="bottom"
|
|
127
124
|
style={
|
|
128
125
|
[
|
|
129
126
|
{
|
|
@@ -171,7 +168,6 @@ exports[`Image renders correctly when size is 15xlarge 1`] = `
|
|
|
171
168
|
/>
|
|
172
169
|
<View
|
|
173
170
|
pointerEvents="box-none"
|
|
174
|
-
position="bottom"
|
|
175
171
|
style={
|
|
176
172
|
[
|
|
177
173
|
{
|
|
@@ -149,7 +149,6 @@ exports[`BasicListItem when suffix and prefix are icon name renders correctly 1`
|
|
|
149
149
|
</View>
|
|
150
150
|
<View
|
|
151
151
|
pointerEvents="box-none"
|
|
152
|
-
position="bottom"
|
|
153
152
|
style={
|
|
154
153
|
[
|
|
155
154
|
{
|
|
@@ -321,7 +320,6 @@ exports[`BasicListItem when suffix and prefix are react element renders correctl
|
|
|
321
320
|
</View>
|
|
322
321
|
<View
|
|
323
322
|
pointerEvents="box-none"
|
|
324
|
-
position="bottom"
|
|
325
323
|
style={
|
|
326
324
|
[
|
|
327
325
|
{
|
|
@@ -354,7 +354,6 @@ exports[`ListItem renders correctly ListItem with children 1`] = `
|
|
|
354
354
|
</View>
|
|
355
355
|
<View
|
|
356
356
|
pointerEvents="box-none"
|
|
357
|
-
position="bottom"
|
|
358
357
|
style={
|
|
359
358
|
[
|
|
360
359
|
{
|
|
@@ -519,7 +518,6 @@ exports[`ListItem renders correctly ListItem with icon 1`] = `
|
|
|
519
518
|
</View>
|
|
520
519
|
<View
|
|
521
520
|
pointerEvents="box-none"
|
|
522
|
-
position="bottom"
|
|
523
521
|
style={
|
|
524
522
|
[
|
|
525
523
|
{
|
|
@@ -679,7 +677,6 @@ exports[`ListItem renders correctly ListItem with leading status 1`] = `
|
|
|
679
677
|
</View>
|
|
680
678
|
<View
|
|
681
679
|
pointerEvents="box-none"
|
|
682
|
-
position="bottom"
|
|
683
680
|
style={
|
|
684
681
|
[
|
|
685
682
|
{
|
|
@@ -977,7 +974,6 @@ exports[`ListItem renders correctly ListItem with prefix suffix is React.Element
|
|
|
977
974
|
</View>
|
|
978
975
|
<View
|
|
979
976
|
pointerEvents="box-none"
|
|
980
|
-
position="bottom"
|
|
981
977
|
style={
|
|
982
978
|
[
|
|
983
979
|
{
|
|
@@ -63,7 +63,6 @@ exports[`StyledListItemContainer renders correctly themeSelected false themeDisa
|
|
|
63
63
|
</View>
|
|
64
64
|
<View
|
|
65
65
|
pointerEvents="box-none"
|
|
66
|
-
position="bottom"
|
|
67
66
|
style={
|
|
68
67
|
[
|
|
69
68
|
{
|
|
@@ -147,7 +146,6 @@ exports[`StyledListItemContainer renders correctly themeSelected false themeDisa
|
|
|
147
146
|
</View>
|
|
148
147
|
<View
|
|
149
148
|
pointerEvents="box-none"
|
|
150
|
-
position="bottom"
|
|
151
149
|
style={
|
|
152
150
|
[
|
|
153
151
|
{
|
|
@@ -231,7 +229,6 @@ exports[`StyledListItemContainer renders correctly themeSelected true themeDisab
|
|
|
231
229
|
</View>
|
|
232
230
|
<View
|
|
233
231
|
pointerEvents="box-none"
|
|
234
|
-
position="bottom"
|
|
235
232
|
style={
|
|
236
233
|
[
|
|
237
234
|
{
|
|
@@ -315,7 +312,6 @@ exports[`StyledListItemContainer renders correctly themeSelected true themeDisab
|
|
|
315
312
|
</View>
|
|
316
313
|
<View
|
|
317
314
|
pointerEvents="box-none"
|
|
318
|
-
position="bottom"
|
|
319
315
|
style={
|
|
320
316
|
[
|
|
321
317
|
{
|
|
@@ -24,7 +24,6 @@ exports[`LeadingStatus renders correctly themeLeadingStausIntent archived 1`] =
|
|
|
24
24
|
/>
|
|
25
25
|
<View
|
|
26
26
|
pointerEvents="box-none"
|
|
27
|
-
position="bottom"
|
|
28
27
|
style={
|
|
29
28
|
[
|
|
30
29
|
{
|
|
@@ -69,7 +68,6 @@ exports[`LeadingStatus renders correctly themeLeadingStausIntent danger 1`] = `
|
|
|
69
68
|
/>
|
|
70
69
|
<View
|
|
71
70
|
pointerEvents="box-none"
|
|
72
|
-
position="bottom"
|
|
73
71
|
style={
|
|
74
72
|
[
|
|
75
73
|
{
|
|
@@ -114,7 +112,6 @@ exports[`LeadingStatus renders correctly themeLeadingStausIntent info 1`] = `
|
|
|
114
112
|
/>
|
|
115
113
|
<View
|
|
116
114
|
pointerEvents="box-none"
|
|
117
|
-
position="bottom"
|
|
118
115
|
style={
|
|
119
116
|
[
|
|
120
117
|
{
|
|
@@ -159,7 +156,6 @@ exports[`LeadingStatus renders correctly themeLeadingStausIntent success 1`] = `
|
|
|
159
156
|
/>
|
|
160
157
|
<View
|
|
161
158
|
pointerEvents="box-none"
|
|
162
|
-
position="bottom"
|
|
163
159
|
style={
|
|
164
160
|
[
|
|
165
161
|
{
|
|
@@ -204,7 +200,6 @@ exports[`LeadingStatus renders correctly themeLeadingStausIntent warning 1`] = `
|
|
|
204
200
|
/>
|
|
205
201
|
<View
|
|
206
202
|
pointerEvents="box-none"
|
|
207
|
-
position="bottom"
|
|
208
203
|
style={
|
|
209
204
|
[
|
|
210
205
|
{
|
|
@@ -295,7 +290,6 @@ exports[`ListItemContainer renders correctly themeSelected false themeVariant ca
|
|
|
295
290
|
</View>
|
|
296
291
|
<View
|
|
297
292
|
pointerEvents="box-none"
|
|
298
|
-
position="bottom"
|
|
299
293
|
style={
|
|
300
294
|
[
|
|
301
295
|
{
|
|
@@ -377,7 +371,6 @@ exports[`ListItemContainer renders correctly themeSelected false themeVariant fu
|
|
|
377
371
|
</View>
|
|
378
372
|
<View
|
|
379
373
|
pointerEvents="box-none"
|
|
380
|
-
position="bottom"
|
|
381
374
|
style={
|
|
382
375
|
[
|
|
383
376
|
{
|
|
@@ -468,7 +461,6 @@ exports[`ListItemContainer renders correctly themeSelected true themeVariant car
|
|
|
468
461
|
</View>
|
|
469
462
|
<View
|
|
470
463
|
pointerEvents="box-none"
|
|
471
|
-
position="bottom"
|
|
472
464
|
style={
|
|
473
465
|
[
|
|
474
466
|
{
|
|
@@ -550,7 +542,6 @@ exports[`ListItemContainer renders correctly themeSelected true themeVariant ful
|
|
|
550
542
|
</View>
|
|
551
543
|
<View
|
|
552
544
|
pointerEvents="box-none"
|
|
553
|
-
position="bottom"
|
|
554
545
|
style={
|
|
555
546
|
[
|
|
556
547
|
{
|
|
@@ -63,7 +63,6 @@ exports[`Modal renders correctly 1`] = `
|
|
|
63
63
|
</View>
|
|
64
64
|
<View
|
|
65
65
|
pointerEvents="box-none"
|
|
66
|
-
position="bottom"
|
|
67
66
|
style={
|
|
68
67
|
[
|
|
69
68
|
{
|
|
@@ -147,7 +146,6 @@ exports[`Modal renders correctly with transparent 1`] = `
|
|
|
147
146
|
</View>
|
|
148
147
|
<View
|
|
149
148
|
pointerEvents="box-none"
|
|
150
|
-
position="bottom"
|
|
151
149
|
style={
|
|
152
150
|
[
|
|
153
151
|
{
|
|
@@ -55,7 +55,6 @@ exports[`PinCell renders correctly when focused is false, state is default 1`] =
|
|
|
55
55
|
</View>
|
|
56
56
|
<View
|
|
57
57
|
pointerEvents="box-none"
|
|
58
|
-
position="bottom"
|
|
59
58
|
style={
|
|
60
59
|
[
|
|
61
60
|
{
|
|
@@ -131,7 +130,6 @@ exports[`PinCell renders correctly when focused is false, state is disabled 1`]
|
|
|
131
130
|
</View>
|
|
132
131
|
<View
|
|
133
132
|
pointerEvents="box-none"
|
|
134
|
-
position="bottom"
|
|
135
133
|
style={
|
|
136
134
|
[
|
|
137
135
|
{
|
|
@@ -207,7 +205,6 @@ exports[`PinCell renders correctly when focused is false, state is error 1`] = `
|
|
|
207
205
|
</View>
|
|
208
206
|
<View
|
|
209
207
|
pointerEvents="box-none"
|
|
210
|
-
position="bottom"
|
|
211
208
|
style={
|
|
212
209
|
[
|
|
213
210
|
{
|
|
@@ -283,7 +280,6 @@ exports[`PinCell renders correctly when focused is true, state is default 1`] =
|
|
|
283
280
|
</View>
|
|
284
281
|
<View
|
|
285
282
|
pointerEvents="box-none"
|
|
286
|
-
position="bottom"
|
|
287
283
|
style={
|
|
288
284
|
[
|
|
289
285
|
{
|
|
@@ -359,7 +355,6 @@ exports[`PinCell renders correctly when focused is true, state is error 1`] = `
|
|
|
359
355
|
</View>
|
|
360
356
|
<View
|
|
361
357
|
pointerEvents="box-none"
|
|
362
|
-
position="bottom"
|
|
363
358
|
style={
|
|
364
359
|
[
|
|
365
360
|
{
|
|
@@ -233,7 +233,6 @@ exports[`rendering renders correctly 1`] = `
|
|
|
233
233
|
</View>
|
|
234
234
|
<View
|
|
235
235
|
pointerEvents="box-none"
|
|
236
|
-
position="bottom"
|
|
237
236
|
style={
|
|
238
237
|
[
|
|
239
238
|
{
|
|
@@ -487,7 +486,6 @@ exports[`rendering renders correctly when disabled 1`] = `
|
|
|
487
486
|
</View>
|
|
488
487
|
<View
|
|
489
488
|
pointerEvents="box-none"
|
|
490
|
-
position="bottom"
|
|
491
489
|
style={
|
|
492
490
|
[
|
|
493
491
|
{
|
|
@@ -859,7 +857,6 @@ exports[`rendering renders correctly when length is 6 and secure is false 1`] =
|
|
|
859
857
|
</View>
|
|
860
858
|
<View
|
|
861
859
|
pointerEvents="box-none"
|
|
862
|
-
position="bottom"
|
|
863
860
|
style={
|
|
864
861
|
[
|
|
865
862
|
{
|
|
@@ -1166,7 +1163,6 @@ exports[`rendering renders correctly when there is error 1`] = `
|
|
|
1166
1163
|
</View>
|
|
1167
1164
|
<View
|
|
1168
1165
|
pointerEvents="box-none"
|
|
1169
|
-
position="bottom"
|
|
1170
1166
|
style={
|
|
1171
1167
|
[
|
|
1172
1168
|
{
|