@hero-design/rn 7.24.0 → 7.25.1
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 +2 -2
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +844 -751
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +845 -749
- package/package.json +6 -5
- package/rollup.config.js +1 -1
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +4 -4
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
- package/src/components/Attachment/StyledAttachment.tsx +44 -0
- package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +158 -0
- package/src/components/Attachment/__tests__/index.spec.tsx +59 -0
- package/src/components/Attachment/index.tsx +77 -0
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +3 -3
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Badge/Status.tsx +1 -1
- package/src/components/Badge/StyledBadge.tsx +8 -1
- package/src/components/Badge/__tests__/Badge.spec.tsx +9 -0
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +44 -0
- package/src/components/Badge/index.tsx +1 -1
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/BottomSheet/Header.tsx +2 -1
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +52 -52
- package/src/components/BottomSheet/index.tsx +4 -4
- package/src/components/Button/Button.tsx +0 -11
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +4 -4
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
- package/src/components/Button/LoadingIndicator/index.tsx +1 -1
- package/src/components/Button/StyledButton.tsx +24 -63
- package/src/components/Button/UtilityButton/__tests__/index.spec.tsx +2 -2
- package/src/components/Button/__tests__/Button.spec.tsx +10 -5
- package/src/components/Button/__tests__/StyledButton.spec.tsx +0 -70
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +301 -1206
- package/src/components/Calendar/CalendarRowItem.tsx +1 -4
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +5 -5
- package/src/components/Calendar/index.tsx +4 -3
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +1 -1
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +1 -1
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Checkbox/StyledCheckbox.tsx +7 -5
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +4 -12
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +95 -42
- package/src/components/Checkbox/index.tsx +4 -2
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/ContentNavigator/index.tsx +2 -1
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +28 -27
- package/src/components/Drawer/DragableDrawer/index.tsx +0 -2
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +1 -1
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/HeroIcon/index.tsx +5 -1
- package/src/components/Icon/IconList.ts +30 -3
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/List/BasicListItem.tsx +13 -8
- package/src/components/List/ListItem.tsx +8 -6
- package/src/components/List/StyledBasicListItem.tsx +2 -2
- package/src/components/List/StyledListItem.tsx +2 -2
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +24 -36
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +39 -59
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +40 -44
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +50 -50
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +6 -6
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +21 -21
- package/src/components/Progress/ProgressBar.tsx +1 -1
- package/src/components/Progress/ProgressCircle.tsx +1 -1
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +10 -10
- package/src/components/Progress/types.ts +7 -1
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +20 -32
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +30 -48
- package/src/components/RefreshControl/__tests__/index.spec.tsx +1 -3
- package/src/components/RefreshControl/index.tsx +4 -2
- package/src/components/RichTextEditor/MentionList.tsx +12 -3
- package/src/components/RichTextEditor/RichTextEditor.tsx +3 -4
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +4 -4
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +13 -20
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +146 -234
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +430 -650
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +11 -18
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +136 -224
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +409 -629
- package/src/components/Select/StyledOptionList.tsx +0 -1
- package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +1 -1
- package/src/components/Spinner/StyledSpinner.tsx +1 -2
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +4 -4
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +16 -16
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +1 -1
- package/src/components/Swipeable/index.tsx +14 -2
- package/src/components/Switch/SelectorSwitch/Option.tsx +1 -5
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +3 -3
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Switch/SelectorSwitch/__tests__/index.spec.tsx +1 -0
- package/src/components/Switch/SelectorSwitch/index.tsx +4 -1
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +1 -1
- package/src/components/Tabs/StyledTabs.tsx +1 -1
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +1 -1
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +2 -2
- package/src/components/TextInput/StyledTextInput.tsx +1 -0
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +11 -10
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +27 -14
- package/src/components/TextInput/index.tsx +1 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +28 -27
- package/src/components/Toast/Toast.tsx +0 -3
- package/src/components/Toast/ToastProvider.tsx +1 -0
- package/src/components/Toast/__tests__/index.spec.tsx +1 -1
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +12 -12
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +6 -6
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +4 -4
- package/src/emotion.d.ts +1 -0
- package/src/index.ts +6 -0
- package/src/theme/ThemeSwitcher.tsx +7 -1
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +87 -74
- package/src/theme/__tests__/ensureCompatibleWithV7.spec.tsx +13 -0
- package/src/theme/components/alert.ts +1 -1
- package/src/theme/components/attachment.ts +28 -0
- package/src/theme/components/avatar.ts +1 -1
- package/src/theme/components/badge.ts +2 -1
- package/src/theme/components/bottomNavigation.ts +1 -1
- package/src/theme/components/bottomSheet.ts +2 -2
- package/src/theme/components/button.ts +4 -20
- package/src/theme/components/calendar.ts +3 -3
- package/src/theme/components/card.ts +1 -1
- package/src/theme/components/checkbox.ts +2 -2
- package/src/theme/components/divider.ts +1 -1
- package/src/theme/components/drawer.ts +2 -2
- package/src/theme/components/empty.ts +3 -3
- package/src/theme/components/fab.ts +7 -7
- package/src/theme/components/icon.ts +4 -4
- package/src/theme/components/list.ts +0 -2
- package/src/theme/components/pinInput.ts +4 -4
- package/src/theme/components/progress.ts +6 -5
- package/src/theme/components/radio.ts +1 -1
- package/src/theme/components/richTextEditor.ts +2 -2
- package/src/theme/components/slider.ts +2 -2
- package/src/theme/components/switch.ts +4 -4
- package/src/theme/components/tabs.ts +6 -5
- package/src/theme/components/tag.ts +2 -2
- package/src/theme/components/textInput.ts +23 -28
- package/src/theme/components/toast.ts +3 -3
- package/src/theme/components/toolbar.ts +3 -3
- package/src/theme/components/typography.ts +7 -7
- package/src/theme/getTheme.ts +4 -1
- package/src/theme/global/colors/eBens.ts +23 -0
- package/src/theme/global/colors/global.ts +15 -6
- package/src/theme/global/colors/jobs.ts +15 -9
- package/src/theme/global/colors/legacySystemPalette.ts +6 -6
- package/src/theme/global/colors/swag.ts +32 -53
- package/src/theme/global/colors/types.ts +35 -15
- package/src/theme/global/colors/wallet.ts +23 -0
- package/src/theme/global/colors/work.ts +15 -9
- package/src/theme/global/index.ts +4 -0
- package/src/theme/index.ts +4 -0
- package/src/utils/functions.ts +2 -0
- package/src/utils/scale.ts +1 -1
- package/tsconfig.json +8 -2
- package/types/components/Accordion/StyledAccordion.d.ts +14 -14
- package/types/components/Alert/StyledAlert.d.ts +15 -15
- package/types/components/Attachment/StyledAttachment.d.ts +28 -0
- package/types/components/Attachment/index.d.ts +37 -0
- package/types/components/Avatar/StyledAvatar.d.ts +15 -15
- package/types/components/Avatar/index.d.ts +1 -1
- package/types/components/Badge/Status.d.ts +1 -1
- package/types/components/Badge/StyledBadge.d.ts +8 -8
- package/types/components/Badge/index.d.ts +1 -1
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +21 -21
- package/types/components/BottomSheet/Header.d.ts +1 -1
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +22 -22
- package/types/components/Box/StyledBox.d.ts +4 -4
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +7 -7
- package/types/components/Button/StyledButton.d.ts +15 -18
- package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +8 -8
- package/types/components/Calendar/StyledCalendar.d.ts +25 -25
- package/types/components/Calendar/helpers.d.ts +2 -2
- package/types/components/Card/DataCard/StyledDataCard.d.ts +6 -6
- package/types/components/Card/StyledCard.d.ts +7 -7
- package/types/components/Checkbox/StyledCheckbox.d.ts +16 -10
- package/types/components/Collapse/StyledCollapse.d.ts +8 -8
- package/types/components/ContentNavigator/StyledContentNavigator.d.ts +5 -5
- package/types/components/ContentNavigator/index.d.ts +2 -1
- package/types/components/DatePicker/StyledDatePicker.d.ts +3 -3
- package/types/components/Divider/StyledDivider.d.ts +5 -5
- package/types/components/Drawer/StyledDrawer.d.ts +19 -19
- package/types/components/Empty/StyledEmpty.d.ts +9 -9
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +11 -11
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +7 -7
- package/types/components/FAB/StyledFAB.d.ts +8 -8
- package/types/components/Icon/HeroIcon/index.d.ts +3 -3
- 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/List/StyledBasicListItem.d.ts +16 -16
- package/types/components/List/StyledListItem.d.ts +25 -25
- package/types/components/PinInput/StyledPinInput.d.ts +30 -30
- package/types/components/Progress/ProgressBar.d.ts +1 -1
- package/types/components/Progress/ProgressCircle.d.ts +1 -1
- package/types/components/Progress/StyledProgressBar.d.ts +5 -5
- package/types/components/Progress/StyledProgressCircle.d.ts +18 -18
- package/types/components/Progress/types.d.ts +1 -1
- package/types/components/Radio/StyledRadio.d.ts +9 -9
- package/types/components/RefreshControl/index.d.ts +1 -2
- package/types/components/RichTextEditor/EditorToolbar.d.ts +1 -1
- package/types/components/RichTextEditor/MentionList.d.ts +1 -1
- package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +6 -6
- package/types/components/RichTextEditor/StyledToolbar.d.ts +9 -9
- package/types/components/RichTextEditor/index.d.ts +2 -2
- package/types/components/SectionHeading/StyledHeading.d.ts +9 -9
- package/types/components/Select/MultiSelect/Option.d.ts +1 -1
- package/types/components/Select/SingleSelect/Option.d.ts +1 -1
- package/types/components/Select/StyledSelect.d.ts +11 -11
- package/types/components/Select/helpers.d.ts +1 -1
- package/types/components/Spinner/StyledSpinner.d.ts +12 -12
- package/types/components/Swipeable/StyledSwipeable.d.ts +3 -3
- package/types/components/Swipeable/index.d.ts +7 -3
- package/types/components/Switch/SelectorSwitch/Option.d.ts +3 -1
- package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +9 -9
- package/types/components/Switch/StyledSwitch.d.ts +5 -5
- package/types/components/Tabs/StyledScrollableTabs.d.ts +23 -23
- package/types/components/Tabs/StyledTabs.d.ts +22 -22
- package/types/components/Tag/StyledTag.d.ts +6 -6
- package/types/components/TextInput/StyledTextInput.d.ts +44 -44
- package/types/components/TextInput/index.d.ts +5 -5
- package/types/components/TimePicker/StyledTimePicker.d.ts +3 -3
- package/types/components/Toast/StyledToast.d.ts +17 -17
- package/types/components/Toolbar/StyledToolbar.d.ts +9 -9
- package/types/components/Typography/Text/StyledText.d.ts +3 -3
- package/types/index.d.ts +3 -2
- package/types/testHelpers/renderWithTheme.d.ts +1 -1
- package/types/theme/ThemeSwitcher.d.ts +2 -2
- package/types/theme/components/attachment.d.ts +21 -0
- package/types/theme/components/badge.d.ts +1 -0
- package/types/theme/components/button.d.ts +0 -15
- package/types/theme/components/list.d.ts +0 -1
- package/types/theme/components/progress.d.ts +1 -0
- package/types/theme/components/tabs.d.ts +1 -0
- package/types/theme/components/tag.d.ts +2 -2
- package/types/theme/components/textInput.d.ts +0 -5
- package/types/theme/getTheme.d.ts +2 -0
- package/types/theme/global/colors/eBens.d.ts +3 -0
- package/types/theme/global/colors/types.d.ts +23 -16
- package/types/theme/global/colors/wallet.d.ts +3 -0
- package/types/theme/global/index.d.ts +26 -12
- package/types/theme/index.d.ts +2 -2
- package/types/utils/functions.d.ts +1 -0
- package/types/utils/hooks.d.ts +1 -1
- package/assets/fonts/hero-icons.ttf +0 -0
- package/lib/assets/fonts/hero-icons.ttf +0 -0
- package/src/components/Icon/HeroIcon/fonts/hero-icons.ttf +0 -0
|
@@ -45,7 +45,6 @@ const StyledOptionList = <V, T extends OptionType<V>>({
|
|
|
45
45
|
keyExtractor={keyExtractor}
|
|
46
46
|
onEndReachedThreshold={0.1}
|
|
47
47
|
onEndReached={() => setOnEndReachedCalled(true)}
|
|
48
|
-
onScrollToIndexFailed={() => {}}
|
|
49
48
|
onMomentumScrollBegin={() => {
|
|
50
49
|
if (onEndReached && onEndReachedCalled && !loading) onEndReached();
|
|
51
50
|
setOnEndReachedCalled(false);
|
|
@@ -28,8 +28,7 @@ const StyledSpinnerDot = styled(View)<{
|
|
|
28
28
|
themeIntent: 'primary' | 'inverted';
|
|
29
29
|
}>(({ themePosition, themeSize, themeIntent, theme }) => {
|
|
30
30
|
const themeStyling = () => {
|
|
31
|
-
const backgroundColor =
|
|
32
|
-
theme.__hd__.spinner.colors.dot[themeIntent];
|
|
31
|
+
const backgroundColor = theme.__hd__.spinner.colors.dot[themeIntent];
|
|
33
32
|
const dotPadding = theme.__hd__.spinner.space.spinnerDotPadding[themeSize];
|
|
34
33
|
|
|
35
34
|
switch (themePosition) {
|
|
@@ -35,7 +35,7 @@ exports[`AnimatedSpinner renders correctly 1`] = `
|
|
|
35
35
|
style={
|
|
36
36
|
Array [
|
|
37
37
|
Object {
|
|
38
|
-
"backgroundColor": "#
|
|
38
|
+
"backgroundColor": "#401960",
|
|
39
39
|
"borderRadius": 999,
|
|
40
40
|
"height": 16,
|
|
41
41
|
"opacity": 0.9,
|
|
@@ -54,7 +54,7 @@ exports[`AnimatedSpinner renders correctly 1`] = `
|
|
|
54
54
|
style={
|
|
55
55
|
Array [
|
|
56
56
|
Object {
|
|
57
|
-
"backgroundColor": "#
|
|
57
|
+
"backgroundColor": "#401960",
|
|
58
58
|
"borderRadius": 999,
|
|
59
59
|
"height": 16,
|
|
60
60
|
"marginLeft": 8,
|
|
@@ -90,7 +90,7 @@ exports[`AnimatedSpinner renders correctly 1`] = `
|
|
|
90
90
|
style={
|
|
91
91
|
Array [
|
|
92
92
|
Object {
|
|
93
|
-
"backgroundColor": "#
|
|
93
|
+
"backgroundColor": "#401960",
|
|
94
94
|
"borderRadius": 999,
|
|
95
95
|
"height": 16,
|
|
96
96
|
"opacity": 0.45,
|
|
@@ -109,7 +109,7 @@ exports[`AnimatedSpinner renders correctly 1`] = `
|
|
|
109
109
|
style={
|
|
110
110
|
Array [
|
|
111
111
|
Object {
|
|
112
|
-
"backgroundColor": "#
|
|
112
|
+
"backgroundColor": "#401960",
|
|
113
113
|
"borderRadius": 999,
|
|
114
114
|
"height": 16,
|
|
115
115
|
"marginLeft": 8,
|
|
@@ -47,7 +47,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
|
|
|
47
47
|
style={
|
|
48
48
|
Array [
|
|
49
49
|
Object {
|
|
50
|
-
"backgroundColor": "#
|
|
50
|
+
"backgroundColor": "#401960",
|
|
51
51
|
"borderRadius": 999,
|
|
52
52
|
"height": 8,
|
|
53
53
|
"opacity": 0.9,
|
|
@@ -66,7 +66,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
|
|
|
66
66
|
style={
|
|
67
67
|
Array [
|
|
68
68
|
Object {
|
|
69
|
-
"backgroundColor": "#
|
|
69
|
+
"backgroundColor": "#401960",
|
|
70
70
|
"borderRadius": 999,
|
|
71
71
|
"height": 8,
|
|
72
72
|
"marginLeft": 4,
|
|
@@ -102,7 +102,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
|
|
|
102
102
|
style={
|
|
103
103
|
Array [
|
|
104
104
|
Object {
|
|
105
|
-
"backgroundColor": "#
|
|
105
|
+
"backgroundColor": "#401960",
|
|
106
106
|
"borderRadius": 999,
|
|
107
107
|
"height": 8,
|
|
108
108
|
"opacity": 0.45,
|
|
@@ -121,7 +121,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
|
|
|
121
121
|
style={
|
|
122
122
|
Array [
|
|
123
123
|
Object {
|
|
124
|
-
"backgroundColor": "#
|
|
124
|
+
"backgroundColor": "#401960",
|
|
125
125
|
"borderRadius": 999,
|
|
126
126
|
"height": 8,
|
|
127
127
|
"marginLeft": 4,
|
|
@@ -327,7 +327,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
|
|
|
327
327
|
style={
|
|
328
328
|
Array [
|
|
329
329
|
Object {
|
|
330
|
-
"backgroundColor": "#
|
|
330
|
+
"backgroundColor": "#401960",
|
|
331
331
|
"borderRadius": 999,
|
|
332
332
|
"height": 16,
|
|
333
333
|
"opacity": 0.9,
|
|
@@ -346,7 +346,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
|
|
|
346
346
|
style={
|
|
347
347
|
Array [
|
|
348
348
|
Object {
|
|
349
|
-
"backgroundColor": "#
|
|
349
|
+
"backgroundColor": "#401960",
|
|
350
350
|
"borderRadius": 999,
|
|
351
351
|
"height": 16,
|
|
352
352
|
"marginLeft": 8,
|
|
@@ -382,7 +382,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
|
|
|
382
382
|
style={
|
|
383
383
|
Array [
|
|
384
384
|
Object {
|
|
385
|
-
"backgroundColor": "#
|
|
385
|
+
"backgroundColor": "#401960",
|
|
386
386
|
"borderRadius": 999,
|
|
387
387
|
"height": 16,
|
|
388
388
|
"opacity": 0.45,
|
|
@@ -401,7 +401,7 @@ exports[`StyledSpinnerContainer renders correctly when intent is $themeIntent, a
|
|
|
401
401
|
style={
|
|
402
402
|
Array [
|
|
403
403
|
Object {
|
|
404
|
-
"backgroundColor": "#
|
|
404
|
+
"backgroundColor": "#401960",
|
|
405
405
|
"borderRadius": 999,
|
|
406
406
|
"height": 16,
|
|
407
407
|
"marginLeft": 8,
|
|
@@ -585,7 +585,7 @@ exports[`StyledSpinnerDot renders correctly when position is bottomLeft, size is
|
|
|
585
585
|
style={
|
|
586
586
|
Array [
|
|
587
587
|
Object {
|
|
588
|
-
"backgroundColor": "#
|
|
588
|
+
"backgroundColor": "#401960",
|
|
589
589
|
"borderRadius": 999,
|
|
590
590
|
"height": 16,
|
|
591
591
|
"opacity": 0.45,
|
|
@@ -625,7 +625,7 @@ exports[`StyledSpinnerDot renders correctly when position is bottomLeft, size is
|
|
|
625
625
|
style={
|
|
626
626
|
Array [
|
|
627
627
|
Object {
|
|
628
|
-
"backgroundColor": "#
|
|
628
|
+
"backgroundColor": "#401960",
|
|
629
629
|
"borderRadius": 999,
|
|
630
630
|
"height": 8,
|
|
631
631
|
"opacity": 0.45,
|
|
@@ -666,7 +666,7 @@ exports[`StyledSpinnerDot renders correctly when position is bottomRight, size i
|
|
|
666
666
|
style={
|
|
667
667
|
Array [
|
|
668
668
|
Object {
|
|
669
|
-
"backgroundColor": "#
|
|
669
|
+
"backgroundColor": "#401960",
|
|
670
670
|
"borderRadius": 999,
|
|
671
671
|
"height": 16,
|
|
672
672
|
"marginLeft": 8,
|
|
@@ -708,7 +708,7 @@ exports[`StyledSpinnerDot renders correctly when position is bottomRight, size i
|
|
|
708
708
|
style={
|
|
709
709
|
Array [
|
|
710
710
|
Object {
|
|
711
|
-
"backgroundColor": "#
|
|
711
|
+
"backgroundColor": "#401960",
|
|
712
712
|
"borderRadius": 999,
|
|
713
713
|
"height": 8,
|
|
714
714
|
"marginLeft": 4,
|
|
@@ -749,7 +749,7 @@ exports[`StyledSpinnerDot renders correctly when position is topLeft, size is me
|
|
|
749
749
|
style={
|
|
750
750
|
Array [
|
|
751
751
|
Object {
|
|
752
|
-
"backgroundColor": "#
|
|
752
|
+
"backgroundColor": "#401960",
|
|
753
753
|
"borderRadius": 999,
|
|
754
754
|
"height": 16,
|
|
755
755
|
"opacity": 0.9,
|
|
@@ -789,7 +789,7 @@ exports[`StyledSpinnerDot renders correctly when position is topLeft, size is sm
|
|
|
789
789
|
style={
|
|
790
790
|
Array [
|
|
791
791
|
Object {
|
|
792
|
-
"backgroundColor": "#
|
|
792
|
+
"backgroundColor": "#401960",
|
|
793
793
|
"borderRadius": 999,
|
|
794
794
|
"height": 8,
|
|
795
795
|
"opacity": 0.9,
|
|
@@ -830,7 +830,7 @@ exports[`StyledSpinnerDot renders correctly when position is topRight, size is m
|
|
|
830
830
|
style={
|
|
831
831
|
Array [
|
|
832
832
|
Object {
|
|
833
|
-
"backgroundColor": "#
|
|
833
|
+
"backgroundColor": "#401960",
|
|
834
834
|
"borderRadius": 999,
|
|
835
835
|
"height": 16,
|
|
836
836
|
"marginLeft": 8,
|
|
@@ -872,7 +872,7 @@ exports[`StyledSpinnerDot renders correctly when position is topRight, size is s
|
|
|
872
872
|
style={
|
|
873
873
|
Array [
|
|
874
874
|
Object {
|
|
875
|
-
"backgroundColor": "#
|
|
875
|
+
"backgroundColor": "#401960",
|
|
876
876
|
"borderRadius": 999,
|
|
877
877
|
"height": 8,
|
|
878
878
|
"marginLeft": 4,
|
|
@@ -56,7 +56,7 @@ exports[`Spinner renders correctly 1`] = `
|
|
|
56
56
|
style={
|
|
57
57
|
Array [
|
|
58
58
|
Object {
|
|
59
|
-
"backgroundColor": "#
|
|
59
|
+
"backgroundColor": "#401960",
|
|
60
60
|
"borderRadius": 999,
|
|
61
61
|
"height": 16,
|
|
62
62
|
"opacity": 0.9,
|
|
@@ -75,7 +75,7 @@ exports[`Spinner renders correctly 1`] = `
|
|
|
75
75
|
style={
|
|
76
76
|
Array [
|
|
77
77
|
Object {
|
|
78
|
-
"backgroundColor": "#
|
|
78
|
+
"backgroundColor": "#401960",
|
|
79
79
|
"borderRadius": 999,
|
|
80
80
|
"height": 16,
|
|
81
81
|
"marginLeft": 8,
|
|
@@ -111,7 +111,7 @@ exports[`Spinner renders correctly 1`] = `
|
|
|
111
111
|
style={
|
|
112
112
|
Array [
|
|
113
113
|
Object {
|
|
114
|
-
"backgroundColor": "#
|
|
114
|
+
"backgroundColor": "#401960",
|
|
115
115
|
"borderRadius": 999,
|
|
116
116
|
"height": 16,
|
|
117
117
|
"opacity": 0.45,
|
|
@@ -130,7 +130,7 @@ exports[`Spinner renders correctly 1`] = `
|
|
|
130
130
|
style={
|
|
131
131
|
Array [
|
|
132
132
|
Object {
|
|
133
|
-
"backgroundColor": "#
|
|
133
|
+
"backgroundColor": "#401960",
|
|
134
134
|
"borderRadius": 999,
|
|
135
135
|
"height": 16,
|
|
136
136
|
"marginLeft": 8,
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
ComponentProps,
|
|
3
|
+
ReactNode,
|
|
4
|
+
useCallback,
|
|
5
|
+
useEffect,
|
|
6
|
+
useRef,
|
|
7
|
+
} from 'react';
|
|
2
8
|
import { Animated, useWindowDimensions } from 'react-native';
|
|
3
|
-
import type { SwipeableProps as RnghSwipeableProps } from 'react-native-gesture-handler/Swipeable';
|
|
4
9
|
import {
|
|
5
10
|
Swipeable as RnghSwipeable,
|
|
6
11
|
GestureHandlerRootView,
|
|
@@ -9,6 +14,9 @@ import {
|
|
|
9
14
|
import SwipeableAction from './SwipeableAction';
|
|
10
15
|
|
|
11
16
|
type State = 'closed' | 'leftOpen' | 'rightOpen';
|
|
17
|
+
// We are supporting both v1 and v2 of RNGH at the same time.
|
|
18
|
+
// SwipeableProps is only exported in v2, so we have to use ComponentProps.
|
|
19
|
+
type RnghSwipeableProps = ComponentProps<typeof RnghSwipeable>;
|
|
12
20
|
export interface SwipeableProps
|
|
13
21
|
extends Pick<
|
|
14
22
|
RnghSwipeableProps,
|
|
@@ -53,6 +61,10 @@ export interface SwipeableProps
|
|
|
53
61
|
* By default, it will take up the whole width of the device.
|
|
54
62
|
*/
|
|
55
63
|
rightActionsWidth?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Testing ID of the component
|
|
66
|
+
*/
|
|
67
|
+
testID?: string;
|
|
56
68
|
}
|
|
57
69
|
|
|
58
70
|
const renderActions = (
|
|
@@ -46,11 +46,7 @@ const Option = <T,>({
|
|
|
46
46
|
return (
|
|
47
47
|
<StyledTextWrapper>
|
|
48
48
|
<OptionContent
|
|
49
|
-
content={
|
|
50
|
-
<Typography.Text fontSize="large" intent="inverted">
|
|
51
|
-
{text}
|
|
52
|
-
</Typography.Text>
|
|
53
|
-
}
|
|
49
|
+
content={<Typography.Text fontSize="large">{text}</Typography.Text>}
|
|
54
50
|
badge={badge}
|
|
55
51
|
/>
|
|
56
52
|
</StyledTextWrapper>
|
|
@@ -67,7 +67,7 @@ exports[`Option renders correctly when selected 1`] = `
|
|
|
67
67
|
Array [
|
|
68
68
|
Object {
|
|
69
69
|
"alignItems": "center",
|
|
70
|
-
"backgroundColor": "#
|
|
70
|
+
"backgroundColor": "#ffffff",
|
|
71
71
|
"borderRadius": 999,
|
|
72
72
|
"flex": 1,
|
|
73
73
|
"justifyContent": "center",
|
|
@@ -88,7 +88,7 @@ exports[`Option renders correctly when selected 1`] = `
|
|
|
88
88
|
style={
|
|
89
89
|
Array [
|
|
90
90
|
Object {
|
|
91
|
-
"color": "#
|
|
91
|
+
"color": "#001f23",
|
|
92
92
|
"fontFamily": "BeVietnamPro-Regular",
|
|
93
93
|
"fontSize": 16,
|
|
94
94
|
"letterSpacing": 0.48,
|
|
@@ -99,7 +99,7 @@ exports[`Option renders correctly when selected 1`] = `
|
|
|
99
99
|
}
|
|
100
100
|
themeFontSize="large"
|
|
101
101
|
themeFontWeight="regular"
|
|
102
|
-
themeIntent="
|
|
102
|
+
themeIntent="body"
|
|
103
103
|
>
|
|
104
104
|
My Dashboard
|
|
105
105
|
</Text>
|
|
@@ -30,7 +30,7 @@ exports[`SelectorSwitch renders correctly 1`] = `
|
|
|
30
30
|
Array [
|
|
31
31
|
Object {
|
|
32
32
|
"alignItems": "center",
|
|
33
|
-
"backgroundColor": "#
|
|
33
|
+
"backgroundColor": "#ffffff",
|
|
34
34
|
"borderRadius": 999,
|
|
35
35
|
"flex": 1,
|
|
36
36
|
"justifyContent": "center",
|
|
@@ -43,7 +43,7 @@ exports[`SelectorSwitch renders correctly 1`] = `
|
|
|
43
43
|
style={
|
|
44
44
|
Array [
|
|
45
45
|
Object {
|
|
46
|
-
"color": "#
|
|
46
|
+
"color": "#001f23",
|
|
47
47
|
"fontFamily": "BeVietnamPro-Regular",
|
|
48
48
|
"fontSize": 16,
|
|
49
49
|
"letterSpacing": 0.48,
|
|
@@ -54,7 +54,7 @@ exports[`SelectorSwitch renders correctly 1`] = `
|
|
|
54
54
|
}
|
|
55
55
|
themeFontSize="large"
|
|
56
56
|
themeFontWeight="regular"
|
|
57
|
-
themeIntent="
|
|
57
|
+
themeIntent="body"
|
|
58
58
|
>
|
|
59
59
|
My Dashboard
|
|
60
60
|
</Text>
|
|
@@ -47,7 +47,10 @@ const SelectorSwitch = <T,>({
|
|
|
47
47
|
style,
|
|
48
48
|
testID,
|
|
49
49
|
}: SelectorSwitchProps<T>): ReactElement => (
|
|
50
|
-
<TouchableWithoutFeedback
|
|
50
|
+
<TouchableWithoutFeedback
|
|
51
|
+
onPress={onPress !== undefined ? () => onPress(value) : undefined}
|
|
52
|
+
testID={testID}
|
|
53
|
+
>
|
|
51
54
|
<StyledWrapper style={style}>
|
|
52
55
|
{options.map((opt, index) => (
|
|
53
56
|
// eslint-disable-next-line react/no-array-index-key
|
|
@@ -39,7 +39,7 @@ const StyledIndicator = styled(Animated.View)<{ themeWidth: number }>(
|
|
|
39
39
|
({ theme, themeWidth }) => ({
|
|
40
40
|
width: themeWidth,
|
|
41
41
|
height: theme.__hd__.tabs.sizes.indicator,
|
|
42
|
-
backgroundColor: theme.__hd__.tabs.colors.
|
|
42
|
+
backgroundColor: theme.__hd__.tabs.colors.indicator,
|
|
43
43
|
position: 'absolute',
|
|
44
44
|
bottom: 0,
|
|
45
45
|
})
|
|
@@ -44,7 +44,7 @@ exports[`Tag has archived style when intent is primary 1`] = `
|
|
|
44
44
|
Array [
|
|
45
45
|
Object {
|
|
46
46
|
"backgroundColor": undefined,
|
|
47
|
-
"borderColor": "#
|
|
47
|
+
"borderColor": "#401960",
|
|
48
48
|
"borderRadius": 4,
|
|
49
49
|
"borderWidth": 1,
|
|
50
50
|
"paddingHorizontal": 8,
|
|
@@ -59,7 +59,7 @@ exports[`Tag has archived style when intent is primary 1`] = `
|
|
|
59
59
|
style={
|
|
60
60
|
Array [
|
|
61
61
|
Object {
|
|
62
|
-
"color": "#
|
|
62
|
+
"color": "#401960",
|
|
63
63
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
64
64
|
"fontSize": 12,
|
|
65
65
|
"includeFontPadding": false,
|
|
@@ -125,7 +125,7 @@ exports[`Label renders correctly with themeVariant readonly 1`] = `
|
|
|
125
125
|
},
|
|
126
126
|
Array [
|
|
127
127
|
Object {
|
|
128
|
-
"color": "#
|
|
128
|
+
"color": "#808f91",
|
|
129
129
|
},
|
|
130
130
|
undefined,
|
|
131
131
|
],
|
|
@@ -302,7 +302,7 @@ exports[`LabelInsideTextInput renders correctly with themeVariant readonly 1`] =
|
|
|
302
302
|
Object {
|
|
303
303
|
"alignContent": "center",
|
|
304
304
|
"alignItems": "center",
|
|
305
|
-
"color": "#
|
|
305
|
+
"color": "#808f91",
|
|
306
306
|
"fontSize": 14,
|
|
307
307
|
"textAlignVertical": "center",
|
|
308
308
|
},
|
|
@@ -332,7 +332,7 @@ exports[`StyledAsteriskLabel renders correctly with themeVariant default 1`] = `
|
|
|
332
332
|
},
|
|
333
333
|
Array [
|
|
334
334
|
Object {
|
|
335
|
-
"color": "#
|
|
335
|
+
"color": "#de350b",
|
|
336
336
|
},
|
|
337
337
|
undefined,
|
|
338
338
|
],
|
|
@@ -388,7 +388,7 @@ exports[`StyledAsteriskLabel renders correctly with themeVariant error 1`] = `
|
|
|
388
388
|
},
|
|
389
389
|
Array [
|
|
390
390
|
Object {
|
|
391
|
-
"color": "#
|
|
391
|
+
"color": "#de350b",
|
|
392
392
|
},
|
|
393
393
|
undefined,
|
|
394
394
|
],
|
|
@@ -416,7 +416,7 @@ exports[`StyledAsteriskLabel renders correctly with themeVariant filled 1`] = `
|
|
|
416
416
|
},
|
|
417
417
|
Array [
|
|
418
418
|
Object {
|
|
419
|
-
"color": "#
|
|
419
|
+
"color": "#de350b",
|
|
420
420
|
},
|
|
421
421
|
undefined,
|
|
422
422
|
],
|
|
@@ -464,7 +464,7 @@ exports[`StyledBorderBackDrop renders correctly when focused 1`] = `
|
|
|
464
464
|
style={
|
|
465
465
|
Array [
|
|
466
466
|
Object {
|
|
467
|
-
"borderColor": "#
|
|
467
|
+
"borderColor": "#de350b",
|
|
468
468
|
"borderRadius": 8,
|
|
469
469
|
"borderWidth": 2,
|
|
470
470
|
"bottom": 0,
|
|
@@ -530,7 +530,7 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant error 1`] = `
|
|
|
530
530
|
style={
|
|
531
531
|
Array [
|
|
532
532
|
Object {
|
|
533
|
-
"borderColor": "#
|
|
533
|
+
"borderColor": "#de350b",
|
|
534
534
|
"borderRadius": 8,
|
|
535
535
|
"borderWidth": 1,
|
|
536
536
|
"bottom": 0,
|
|
@@ -604,7 +604,7 @@ exports[`StyledErrorMessage renders correctly 1`] = `
|
|
|
604
604
|
},
|
|
605
605
|
Array [
|
|
606
606
|
Object {
|
|
607
|
-
"color": "#
|
|
607
|
+
"color": "#de350b",
|
|
608
608
|
"fontSize": 12,
|
|
609
609
|
"marginLeft": 4,
|
|
610
610
|
},
|
|
@@ -752,7 +752,7 @@ exports[`StyledMaxLengthMessage renders correctly with themeVariant error 1`] =
|
|
|
752
752
|
Array [
|
|
753
753
|
Object {
|
|
754
754
|
"alignSelf": "flex-end",
|
|
755
|
-
"color": "#
|
|
755
|
+
"color": "#de350b",
|
|
756
756
|
"flex": 1,
|
|
757
757
|
"flexGrow": 1,
|
|
758
758
|
"fontSize": 12,
|
|
@@ -820,7 +820,7 @@ exports[`StyledMaxLengthMessage renders correctly with themeVariant readonly 1`]
|
|
|
820
820
|
Array [
|
|
821
821
|
Object {
|
|
822
822
|
"alignSelf": "flex-end",
|
|
823
|
-
"color": "#
|
|
823
|
+
"color": "#808f91",
|
|
824
824
|
"flex": 1,
|
|
825
825
|
"flexGrow": 1,
|
|
826
826
|
"fontSize": 12,
|
|
@@ -849,6 +849,7 @@ exports[`StyledTextInput renders correctly 1`] = `
|
|
|
849
849
|
"flexGrow": 2,
|
|
850
850
|
"fontSize": 14,
|
|
851
851
|
"marginHorizontal": 8,
|
|
852
|
+
"paddingVertical": 0,
|
|
852
853
|
"textAlignVertical": "center",
|
|
853
854
|
},
|
|
854
855
|
undefined,
|