@hero-design/rn 7.24.0 → 7.25.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 +2 -2
- package/assets/fonts/hero-icons.ttf +0 -0
- package/es/index.js +845 -752
- package/lib/assets/fonts/hero-icons.ttf +0 -0
- package/lib/index.js +846 -750
- package/package.json +6 -5
- 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 +14 -9
- 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/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
|
@@ -6,10 +6,7 @@ import {
|
|
|
6
6
|
StyledMark,
|
|
7
7
|
} from './StyledCalendar';
|
|
8
8
|
|
|
9
|
-
const getCellVariant = (
|
|
10
|
-
isSelected: boolean = false,
|
|
11
|
-
isCurrent: boolean = false
|
|
12
|
-
) => {
|
|
9
|
+
const getCellVariant = (isSelected = false, isCurrent = false) => {
|
|
13
10
|
if (isSelected) return 'selected';
|
|
14
11
|
if (isCurrent) return 'current';
|
|
15
12
|
|
|
@@ -65,7 +65,7 @@ exports[`CalendarRowItem renders correctly 1`] = `
|
|
|
65
65
|
style={
|
|
66
66
|
Array [
|
|
67
67
|
Object {
|
|
68
|
-
"backgroundColor": "#
|
|
68
|
+
"backgroundColor": "#401960",
|
|
69
69
|
"borderRadius": 999,
|
|
70
70
|
"bottom": "10%",
|
|
71
71
|
"height": 4,
|
|
@@ -147,7 +147,7 @@ exports[`CalendarRowItem renders correctly 2`] = `
|
|
|
147
147
|
style={
|
|
148
148
|
Array [
|
|
149
149
|
Object {
|
|
150
|
-
"backgroundColor": "#
|
|
150
|
+
"backgroundColor": "#401960",
|
|
151
151
|
"borderRadius": 999,
|
|
152
152
|
"bottom": "10%",
|
|
153
153
|
"height": 4,
|
|
@@ -195,7 +195,7 @@ exports[`CalendarRowItem renders correctly when is current date 1`] = `
|
|
|
195
195
|
style={
|
|
196
196
|
Object {
|
|
197
197
|
"alignItems": "center",
|
|
198
|
-
"backgroundColor": "#
|
|
198
|
+
"backgroundColor": "#401960",
|
|
199
199
|
"borderColor": "#001f23",
|
|
200
200
|
"borderRadius": 999,
|
|
201
201
|
"borderWidth": 0,
|
|
@@ -277,7 +277,7 @@ exports[`CalendarRowItem renders correctly when selected, and is current date eq
|
|
|
277
277
|
style={
|
|
278
278
|
Object {
|
|
279
279
|
"alignItems": "center",
|
|
280
|
-
"backgroundColor": "#
|
|
280
|
+
"backgroundColor": "#401960",
|
|
281
281
|
"borderColor": "#001f23",
|
|
282
282
|
"borderRadius": 999,
|
|
283
283
|
"borderWidth": 0,
|
|
@@ -359,7 +359,7 @@ exports[`CalendarRowItem renders correctly when selected, and is current date eq
|
|
|
359
359
|
style={
|
|
360
360
|
Object {
|
|
361
361
|
"alignItems": "center",
|
|
362
|
-
"backgroundColor": "#
|
|
362
|
+
"backgroundColor": "#401960",
|
|
363
363
|
"borderColor": "#001f23",
|
|
364
364
|
"borderRadius": 999,
|
|
365
365
|
"borderWidth": 0,
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
} from './StyledCalendar';
|
|
13
13
|
import CalendarRowItem from './CalendarRowItem';
|
|
14
14
|
import { getValidDate, initArray, isEqDate } from './helpers';
|
|
15
|
+
import { noop } from '../../utils/functions';
|
|
15
16
|
|
|
16
17
|
const DAYS_OF_WEEK = ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'];
|
|
17
18
|
// Sunday first column => 0
|
|
@@ -69,9 +70,9 @@ const Calendar = ({
|
|
|
69
70
|
value,
|
|
70
71
|
visibleDate,
|
|
71
72
|
onChange,
|
|
72
|
-
onPreviousPress =
|
|
73
|
-
onNextPress =
|
|
74
|
-
onTitlePress =
|
|
73
|
+
onPreviousPress = noop,
|
|
74
|
+
onNextPress = noop,
|
|
75
|
+
onTitlePress = noop,
|
|
75
76
|
minDate,
|
|
76
77
|
maxDate,
|
|
77
78
|
markedDates = [],
|
|
@@ -27,18 +27,20 @@ export const StyledDescription = styled(Typography.Text)(({ theme }) => ({
|
|
|
27
27
|
flex: 1,
|
|
28
28
|
}));
|
|
29
29
|
|
|
30
|
+
export const StyledCheckboxContainer = styled(View)(({ theme }) => ({
|
|
31
|
+
height: theme.__hd__.checkbox.sizes.icon,
|
|
32
|
+
width: theme.__hd__.checkbox.sizes.icon,
|
|
33
|
+
overflow: 'hidden',
|
|
34
|
+
}));
|
|
35
|
+
|
|
30
36
|
export const StyledCheckbox = styled(View)<{ themeDisabled: boolean }>(
|
|
31
37
|
({ theme, themeDisabled }) => ({
|
|
32
|
-
|
|
33
|
-
justifyContent: 'center',
|
|
34
|
-
height: theme.__hd__.checkbox.sizes.icon,
|
|
35
|
-
width: theme.__hd__.checkbox.sizes.icon,
|
|
38
|
+
flex: 1,
|
|
36
39
|
borderRadius: theme.__hd__.checkbox.radii.icon,
|
|
37
40
|
borderWidth: theme.__hd__.checkbox.borderWidths.icon,
|
|
38
41
|
borderColor: themeDisabled
|
|
39
42
|
? theme.__hd__.checkbox.colors.disabledBorder
|
|
40
43
|
: theme.__hd__.checkbox.colors.default,
|
|
41
|
-
overflow: 'hidden',
|
|
42
44
|
})
|
|
43
45
|
);
|
|
44
46
|
|
|
@@ -8,11 +8,7 @@ exports[`StyledCheckbox renders correctly when disabled is false 1`] = `
|
|
|
8
8
|
"borderColor": "#001f23",
|
|
9
9
|
"borderRadius": 4,
|
|
10
10
|
"borderWidth": 2,
|
|
11
|
-
"
|
|
12
|
-
"height": 24,
|
|
13
|
-
"justifyContent": "center",
|
|
14
|
-
"overflow": "hidden",
|
|
15
|
-
"width": 24,
|
|
11
|
+
"flex": 1,
|
|
16
12
|
},
|
|
17
13
|
undefined,
|
|
18
14
|
]
|
|
@@ -26,14 +22,10 @@ exports[`StyledCheckbox renders correctly when disabled is true 1`] = `
|
|
|
26
22
|
style={
|
|
27
23
|
Array [
|
|
28
24
|
Object {
|
|
29
|
-
"borderColor": "#
|
|
25
|
+
"borderColor": "#bfc1c5",
|
|
30
26
|
"borderRadius": 4,
|
|
31
27
|
"borderWidth": 2,
|
|
32
|
-
"
|
|
33
|
-
"height": 24,
|
|
34
|
-
"justifyContent": "center",
|
|
35
|
-
"overflow": "hidden",
|
|
36
|
-
"width": 24,
|
|
28
|
+
"flex": 1,
|
|
37
29
|
},
|
|
38
30
|
undefined,
|
|
39
31
|
]
|
|
@@ -105,7 +97,7 @@ exports[`StyledWrapper renders correctly when disabled is true, withBorder is tr
|
|
|
105
97
|
onStartShouldSetResponder={[Function]}
|
|
106
98
|
style={
|
|
107
99
|
Object {
|
|
108
|
-
"borderColor": "#
|
|
100
|
+
"borderColor": "#bfc1c5",
|
|
109
101
|
"borderRadius": 8,
|
|
110
102
|
"borderWidth": 1,
|
|
111
103
|
"flexDirection": "row",
|
|
@@ -24,20 +24,29 @@ exports[`Checkbox renders correctly when checked is false and there is no descri
|
|
|
24
24
|
style={
|
|
25
25
|
Array [
|
|
26
26
|
Object {
|
|
27
|
-
"borderColor": "#001f23",
|
|
28
|
-
"borderRadius": 4,
|
|
29
|
-
"borderWidth": 2,
|
|
30
|
-
"flexDirection": "row",
|
|
31
27
|
"height": 24,
|
|
32
|
-
"justifyContent": "center",
|
|
33
28
|
"overflow": "hidden",
|
|
34
29
|
"width": 24,
|
|
35
30
|
},
|
|
36
31
|
undefined,
|
|
37
32
|
]
|
|
38
33
|
}
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
>
|
|
35
|
+
<View
|
|
36
|
+
style={
|
|
37
|
+
Array [
|
|
38
|
+
Object {
|
|
39
|
+
"borderColor": "#001f23",
|
|
40
|
+
"borderRadius": 4,
|
|
41
|
+
"borderWidth": 2,
|
|
42
|
+
"flex": 1,
|
|
43
|
+
},
|
|
44
|
+
undefined,
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
themeDisabled={false}
|
|
48
|
+
/>
|
|
49
|
+
</View>
|
|
41
50
|
</View>
|
|
42
51
|
`;
|
|
43
52
|
|
|
@@ -65,19 +74,13 @@ exports[`Checkbox renders correctly when checked is true and there is no descrip
|
|
|
65
74
|
style={
|
|
66
75
|
Array [
|
|
67
76
|
Object {
|
|
68
|
-
"borderColor": "#001f23",
|
|
69
|
-
"borderRadius": 4,
|
|
70
|
-
"borderWidth": 2,
|
|
71
|
-
"flexDirection": "row",
|
|
72
77
|
"height": 24,
|
|
73
|
-
"justifyContent": "center",
|
|
74
78
|
"overflow": "hidden",
|
|
75
79
|
"width": 24,
|
|
76
80
|
},
|
|
77
81
|
undefined,
|
|
78
82
|
]
|
|
79
83
|
}
|
|
80
|
-
themeDisabled={false}
|
|
81
84
|
>
|
|
82
85
|
<HeroIcon
|
|
83
86
|
name="box-check"
|
|
@@ -100,6 +103,20 @@ exports[`Checkbox renders correctly when checked is true and there is no descrip
|
|
|
100
103
|
themeIntent="text"
|
|
101
104
|
themeSize="medium"
|
|
102
105
|
/>
|
|
106
|
+
<View
|
|
107
|
+
style={
|
|
108
|
+
Array [
|
|
109
|
+
Object {
|
|
110
|
+
"borderColor": "#001f23",
|
|
111
|
+
"borderRadius": 4,
|
|
112
|
+
"borderWidth": 2,
|
|
113
|
+
"flex": 1,
|
|
114
|
+
},
|
|
115
|
+
undefined,
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
themeDisabled={false}
|
|
119
|
+
/>
|
|
103
120
|
</View>
|
|
104
121
|
</View>
|
|
105
122
|
`;
|
|
@@ -153,20 +170,29 @@ exports[`Checkbox renders correctly when disabled is false, withBorder is false
|
|
|
153
170
|
style={
|
|
154
171
|
Array [
|
|
155
172
|
Object {
|
|
156
|
-
"borderColor": "#001f23",
|
|
157
|
-
"borderRadius": 4,
|
|
158
|
-
"borderWidth": 2,
|
|
159
|
-
"flexDirection": "row",
|
|
160
173
|
"height": 24,
|
|
161
|
-
"justifyContent": "center",
|
|
162
174
|
"overflow": "hidden",
|
|
163
175
|
"width": 24,
|
|
164
176
|
},
|
|
165
177
|
undefined,
|
|
166
178
|
]
|
|
167
179
|
}
|
|
168
|
-
|
|
169
|
-
|
|
180
|
+
>
|
|
181
|
+
<View
|
|
182
|
+
style={
|
|
183
|
+
Array [
|
|
184
|
+
Object {
|
|
185
|
+
"borderColor": "#001f23",
|
|
186
|
+
"borderRadius": 4,
|
|
187
|
+
"borderWidth": 2,
|
|
188
|
+
"flex": 1,
|
|
189
|
+
},
|
|
190
|
+
undefined,
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
themeDisabled={false}
|
|
194
|
+
/>
|
|
195
|
+
</View>
|
|
170
196
|
</View>
|
|
171
197
|
`;
|
|
172
198
|
|
|
@@ -223,20 +249,29 @@ exports[`Checkbox renders correctly when disabled is false, withBorder is true 1
|
|
|
223
249
|
style={
|
|
224
250
|
Array [
|
|
225
251
|
Object {
|
|
226
|
-
"borderColor": "#001f23",
|
|
227
|
-
"borderRadius": 4,
|
|
228
|
-
"borderWidth": 2,
|
|
229
|
-
"flexDirection": "row",
|
|
230
252
|
"height": 24,
|
|
231
|
-
"justifyContent": "center",
|
|
232
253
|
"overflow": "hidden",
|
|
233
254
|
"width": 24,
|
|
234
255
|
},
|
|
235
256
|
undefined,
|
|
236
257
|
]
|
|
237
258
|
}
|
|
238
|
-
|
|
239
|
-
|
|
259
|
+
>
|
|
260
|
+
<View
|
|
261
|
+
style={
|
|
262
|
+
Array [
|
|
263
|
+
Object {
|
|
264
|
+
"borderColor": "#001f23",
|
|
265
|
+
"borderRadius": 4,
|
|
266
|
+
"borderWidth": 2,
|
|
267
|
+
"flex": 1,
|
|
268
|
+
},
|
|
269
|
+
undefined,
|
|
270
|
+
]
|
|
271
|
+
}
|
|
272
|
+
themeDisabled={false}
|
|
273
|
+
/>
|
|
274
|
+
</View>
|
|
240
275
|
</View>
|
|
241
276
|
`;
|
|
242
277
|
|
|
@@ -289,20 +324,29 @@ exports[`Checkbox renders correctly when disabled is true, withBorder is false 1
|
|
|
289
324
|
style={
|
|
290
325
|
Array [
|
|
291
326
|
Object {
|
|
292
|
-
"borderColor": "#4d6265",
|
|
293
|
-
"borderRadius": 4,
|
|
294
|
-
"borderWidth": 2,
|
|
295
|
-
"flexDirection": "row",
|
|
296
327
|
"height": 24,
|
|
297
|
-
"justifyContent": "center",
|
|
298
328
|
"overflow": "hidden",
|
|
299
329
|
"width": 24,
|
|
300
330
|
},
|
|
301
331
|
undefined,
|
|
302
332
|
]
|
|
303
333
|
}
|
|
304
|
-
|
|
305
|
-
|
|
334
|
+
>
|
|
335
|
+
<View
|
|
336
|
+
style={
|
|
337
|
+
Array [
|
|
338
|
+
Object {
|
|
339
|
+
"borderColor": "#bfc1c5",
|
|
340
|
+
"borderRadius": 4,
|
|
341
|
+
"borderWidth": 2,
|
|
342
|
+
"flex": 1,
|
|
343
|
+
},
|
|
344
|
+
undefined,
|
|
345
|
+
]
|
|
346
|
+
}
|
|
347
|
+
themeDisabled={true}
|
|
348
|
+
/>
|
|
349
|
+
</View>
|
|
306
350
|
</View>
|
|
307
351
|
`;
|
|
308
352
|
|
|
@@ -321,7 +365,7 @@ exports[`Checkbox renders correctly when disabled is true, withBorder is true 1`
|
|
|
321
365
|
onStartShouldSetResponder={[Function]}
|
|
322
366
|
style={
|
|
323
367
|
Object {
|
|
324
|
-
"borderColor": "#
|
|
368
|
+
"borderColor": "#bfc1c5",
|
|
325
369
|
"borderRadius": 8,
|
|
326
370
|
"borderWidth": 1,
|
|
327
371
|
"flexDirection": "row",
|
|
@@ -359,19 +403,28 @@ exports[`Checkbox renders correctly when disabled is true, withBorder is true 1`
|
|
|
359
403
|
style={
|
|
360
404
|
Array [
|
|
361
405
|
Object {
|
|
362
|
-
"borderColor": "#4d6265",
|
|
363
|
-
"borderRadius": 4,
|
|
364
|
-
"borderWidth": 2,
|
|
365
|
-
"flexDirection": "row",
|
|
366
406
|
"height": 24,
|
|
367
|
-
"justifyContent": "center",
|
|
368
407
|
"overflow": "hidden",
|
|
369
408
|
"width": 24,
|
|
370
409
|
},
|
|
371
410
|
undefined,
|
|
372
411
|
]
|
|
373
412
|
}
|
|
374
|
-
|
|
375
|
-
|
|
413
|
+
>
|
|
414
|
+
<View
|
|
415
|
+
style={
|
|
416
|
+
Array [
|
|
417
|
+
Object {
|
|
418
|
+
"borderColor": "#bfc1c5",
|
|
419
|
+
"borderRadius": 4,
|
|
420
|
+
"borderWidth": 2,
|
|
421
|
+
"flex": 1,
|
|
422
|
+
},
|
|
423
|
+
undefined,
|
|
424
|
+
]
|
|
425
|
+
}
|
|
426
|
+
themeDisabled={true}
|
|
427
|
+
/>
|
|
428
|
+
</View>
|
|
376
429
|
</View>
|
|
377
430
|
`;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
import {
|
|
4
4
|
StyledCheckbox,
|
|
5
|
+
StyledCheckboxContainer,
|
|
5
6
|
StyledCheckMark,
|
|
6
7
|
StyledDescription,
|
|
7
8
|
StyledWrapper,
|
|
@@ -60,7 +61,7 @@ const Checkbox = ({
|
|
|
60
61
|
{description}
|
|
61
62
|
</StyledDescription>
|
|
62
63
|
)}
|
|
63
|
-
<
|
|
64
|
+
<StyledCheckboxContainer>
|
|
64
65
|
{checked && (
|
|
65
66
|
<StyledCheckMark
|
|
66
67
|
icon="box-check"
|
|
@@ -68,7 +69,8 @@ const Checkbox = ({
|
|
|
68
69
|
testID="check-mark"
|
|
69
70
|
/>
|
|
70
71
|
)}
|
|
71
|
-
|
|
72
|
+
<StyledCheckbox themeDisabled={disabled} />
|
|
73
|
+
</StyledCheckboxContainer>
|
|
72
74
|
</StyledWrapper>
|
|
73
75
|
);
|
|
74
76
|
|
|
@@ -146,7 +146,7 @@ exports[`rendering renders correctly when icon buttons are disabled 1`] = `
|
|
|
146
146
|
style={
|
|
147
147
|
Array [
|
|
148
148
|
Object {
|
|
149
|
-
"color": "#
|
|
149
|
+
"color": "#bfc1c5",
|
|
150
150
|
"fontSize": 24,
|
|
151
151
|
},
|
|
152
152
|
undefined,
|
|
@@ -205,7 +205,7 @@ exports[`rendering renders correctly when icon buttons are disabled 1`] = `
|
|
|
205
205
|
style={
|
|
206
206
|
Array [
|
|
207
207
|
Object {
|
|
208
|
-
"color": "#
|
|
208
|
+
"color": "#bfc1c5",
|
|
209
209
|
"fontSize": 24,
|
|
210
210
|
},
|
|
211
211
|
undefined,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { ReactElement } from 'react';
|
|
2
3
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
4
|
import { Value, Wrapper } from './StyledContentNavigator';
|
|
4
5
|
import Button from '../Button';
|
|
@@ -7,7 +8,7 @@ interface ContentNavigatorProps {
|
|
|
7
8
|
/**
|
|
8
9
|
* The navigator's content value.
|
|
9
10
|
*/
|
|
10
|
-
value: number | string;
|
|
11
|
+
value: number | string | ReactElement;
|
|
11
12
|
/**
|
|
12
13
|
* Handler to handle press event of previous icon.
|
|
13
14
|
*/
|
|
@@ -61,14 +62,18 @@ function ContentNavigator({
|
|
|
61
62
|
disabled={previousDisabled}
|
|
62
63
|
testID="previous-icon-button"
|
|
63
64
|
/>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
65
|
+
{typeof value === 'string' || typeof value === 'number' ? (
|
|
66
|
+
<Value
|
|
67
|
+
fontWeight="semi-bold"
|
|
68
|
+
fontSize={fontSize}
|
|
69
|
+
onPress={onPress}
|
|
70
|
+
testID="content-navigator-value"
|
|
71
|
+
>
|
|
72
|
+
{value}
|
|
73
|
+
</Value>
|
|
74
|
+
) : (
|
|
75
|
+
value
|
|
76
|
+
)}
|
|
72
77
|
<Button.Icon
|
|
73
78
|
icon="arrow-right"
|
|
74
79
|
onPress={onNextPress}
|
|
@@ -139,6 +139,7 @@ exports[`DatePickerIOS renders correctly 1`] = `
|
|
|
139
139
|
"flexGrow": 2,
|
|
140
140
|
"fontSize": 14,
|
|
141
141
|
"marginHorizontal": 8,
|
|
142
|
+
"paddingVertical": 0,
|
|
142
143
|
"textAlignVertical": "center",
|
|
143
144
|
},
|
|
144
145
|
Object {
|
|
@@ -252,32 +253,6 @@ exports[`DatePickerIOS renders correctly 1`] = `
|
|
|
252
253
|
]
|
|
253
254
|
}
|
|
254
255
|
>
|
|
255
|
-
<View
|
|
256
|
-
accessible={true}
|
|
257
|
-
collapsable={false}
|
|
258
|
-
focusable={true}
|
|
259
|
-
nativeID="animatedComponent"
|
|
260
|
-
onBlur={[Function]}
|
|
261
|
-
onClick={[Function]}
|
|
262
|
-
onFocus={[Function]}
|
|
263
|
-
onResponderGrant={[Function]}
|
|
264
|
-
onResponderMove={[Function]}
|
|
265
|
-
onResponderRelease={[Function]}
|
|
266
|
-
onResponderTerminate={[Function]}
|
|
267
|
-
onResponderTerminationRequest={[Function]}
|
|
268
|
-
onStartShouldSetResponder={[Function]}
|
|
269
|
-
style={
|
|
270
|
-
Object {
|
|
271
|
-
"backgroundColor": "#001f23",
|
|
272
|
-
"bottom": 0,
|
|
273
|
-
"left": 0,
|
|
274
|
-
"opacity": 0.48,
|
|
275
|
-
"position": "absolute",
|
|
276
|
-
"right": 0,
|
|
277
|
-
"top": 0,
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
/>
|
|
281
256
|
<View
|
|
282
257
|
onLayout={[Function]}
|
|
283
258
|
style={
|
|
@@ -295,6 +270,32 @@ exports[`DatePickerIOS renders correctly 1`] = `
|
|
|
295
270
|
]
|
|
296
271
|
}
|
|
297
272
|
>
|
|
273
|
+
<View
|
|
274
|
+
accessible={true}
|
|
275
|
+
collapsable={false}
|
|
276
|
+
focusable={true}
|
|
277
|
+
nativeID="animatedComponent"
|
|
278
|
+
onBlur={[Function]}
|
|
279
|
+
onClick={[Function]}
|
|
280
|
+
onFocus={[Function]}
|
|
281
|
+
onResponderGrant={[Function]}
|
|
282
|
+
onResponderMove={[Function]}
|
|
283
|
+
onResponderRelease={[Function]}
|
|
284
|
+
onResponderTerminate={[Function]}
|
|
285
|
+
onResponderTerminationRequest={[Function]}
|
|
286
|
+
onStartShouldSetResponder={[Function]}
|
|
287
|
+
style={
|
|
288
|
+
Object {
|
|
289
|
+
"backgroundColor": "#001f23",
|
|
290
|
+
"bottom": 0,
|
|
291
|
+
"left": 0,
|
|
292
|
+
"opacity": 0.48,
|
|
293
|
+
"position": "absolute",
|
|
294
|
+
"right": 0,
|
|
295
|
+
"top": 0,
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
/>
|
|
298
299
|
<RCTSafeAreaView
|
|
299
300
|
collapsable={false}
|
|
300
301
|
emulateUnlessSupported={true}
|
|
@@ -503,7 +504,7 @@ exports[`DatePickerIOS renders correctly 1`] = `
|
|
|
503
504
|
style={
|
|
504
505
|
Array [
|
|
505
506
|
Object {
|
|
506
|
-
"color": "#
|
|
507
|
+
"color": "#401960",
|
|
507
508
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
508
509
|
"fontSize": 16,
|
|
509
510
|
"letterSpacing": 0.48,
|
|
@@ -37,7 +37,7 @@ exports[`Empty renders empty state content correctly 1`] = `
|
|
|
37
37
|
style={
|
|
38
38
|
Array [
|
|
39
39
|
Object {
|
|
40
|
-
"color": "#
|
|
40
|
+
"color": "#bfc1c5",
|
|
41
41
|
"fontFamily": "BeVietnamPro-Light",
|
|
42
42
|
"fontSize": 16,
|
|
43
43
|
"textAlign": "center",
|
|
@@ -104,7 +104,7 @@ exports[`Empty renders empty state with image correctly 1`] = `
|
|
|
104
104
|
style={
|
|
105
105
|
Array [
|
|
106
106
|
Object {
|
|
107
|
-
"color": "#
|
|
107
|
+
"color": "#bfc1c5",
|
|
108
108
|
"fontFamily": "BeVietnamPro-Light",
|
|
109
109
|
"fontSize": 16,
|
|
110
110
|
"textAlign": "center",
|