@hero-design/rn 7.23.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 +1364 -9239
- package/lib/assets/fonts/hero-icons.ttf +0 -0
- package/lib/index.js +1368 -9238
- package/package.json +7 -4
- package/rollup.config.js +1 -0
- 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 +2 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +29 -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/Empty/index.tsx +1 -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/fonts/hero-icons.ttf +0 -0
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -0
- package/src/components/Icon/HeroIcon/index.tsx +3 -7
- package/src/components/Icon/IconList.ts +36 -6
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Icon/index.tsx +1 -0
- 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 +4 -8
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +6 -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 +154 -238
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +435 -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 +144 -228
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +414 -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/AnimatedSpinner.tsx +22 -7
- package/src/components/Spinner/StyledSpinner.tsx +15 -11
- package/src/components/Spinner/__tests__/AnimatedSpinner.spec.tsx +3 -1
- package/src/components/Spinner/__tests__/StyledSpinner.spec.tsx +42 -31
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +12 -8
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +543 -83
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +12 -8
- package/src/components/Spinner/index.tsx +6 -1
- package/src/components/Swipeable/StyledSwipeable.tsx +11 -0
- package/src/components/Swipeable/SwipeableAction.tsx +45 -0
- package/src/components/Swipeable/__tests__/SwipeableAction.spec.tsx +37 -0
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +130 -0
- package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +33 -0
- package/src/components/Swipeable/__tests__/index.spec.tsx +34 -0
- package/src/components/Swipeable/index.tsx +160 -0
- 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 +7 -12
- package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +12 -6
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +31 -146
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +40 -14
- package/src/components/TextInput/__tests__/index.spec.tsx +114 -124
- package/src/components/TextInput/index.tsx +8 -6
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +2 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +29 -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 +10 -0
- package/src/theme/ThemeSwitcher.tsx +7 -1
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +96 -78
- 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/spinner.ts +4 -1
- package/src/theme/components/swipeable.ts +13 -0
- 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 -33
- 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 +7 -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 -10
- 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 -11
- package/src/theme/global/index.ts +4 -0
- package/src/theme/index.ts +4 -0
- package/src/types.ts +2 -0
- package/src/utils/functions.ts +2 -0
- package/src/utils/scale.ts +1 -1
- package/testUtils/setup.tsx +13 -0
- 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/Empty/index.d.ts +1 -2
- 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 +4 -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/AnimatedSpinner.d.ts +2 -1
- package/types/components/Spinner/StyledSpinner.d.ts +13 -12
- package/types/components/Spinner/index.d.ts +5 -1
- package/types/components/Swipeable/StyledSwipeable.d.ts +10 -0
- package/types/components/Swipeable/SwipeableAction.d.ts +27 -0
- package/types/components/Swipeable/index.d.ts +45 -0
- 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 +46 -45
- package/types/components/TextInput/index.d.ts +6 -6
- 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 +4 -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/spinner.d.ts +4 -1
- package/types/theme/components/swipeable.d.ts +9 -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 -10
- package/types/theme/getTheme.d.ts +4 -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/types.d.ts +2 -1
- package/types/utils/functions.d.ts +1 -0
- package/types/utils/hooks.d.ts +1 -1
- package/src/components/Icon/HeroIcon/selection.json +0 -7029
|
@@ -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,
|
|
@@ -2,13 +2,7 @@ import { TextInput, View, StyleSheet } from 'react-native';
|
|
|
2
2
|
import styled from '@emotion/native';
|
|
3
3
|
import Typography from '../Typography';
|
|
4
4
|
|
|
5
|
-
export type Variant =
|
|
6
|
-
| 'default'
|
|
7
|
-
| 'filled'
|
|
8
|
-
| 'focused'
|
|
9
|
-
| 'disabled'
|
|
10
|
-
| 'readonly'
|
|
11
|
-
| 'error';
|
|
5
|
+
export type Variant = 'default' | 'filled' | 'disabled' | 'readonly' | 'error';
|
|
12
6
|
|
|
13
7
|
const StyledContainer = styled(View)(({ theme }) => ({
|
|
14
8
|
width: '100%',
|
|
@@ -95,16 +89,17 @@ const StyledTextInput = styled(TextInput)(({ theme }) => ({
|
|
|
95
89
|
alignSelf: 'stretch',
|
|
96
90
|
flexGrow: 2,
|
|
97
91
|
marginHorizontal: theme.__hd__.textInput.space.inputHorizontalMargin,
|
|
92
|
+
paddingVertical: 0,
|
|
98
93
|
}));
|
|
99
94
|
|
|
100
95
|
const StyledBorderBackDrop = styled(View)<{
|
|
101
96
|
themeVariant: Variant;
|
|
102
|
-
|
|
97
|
+
themeFocused: boolean;
|
|
98
|
+
}>(({ theme, themeFocused, themeVariant }) => ({
|
|
103
99
|
...StyleSheet.absoluteFillObject,
|
|
104
|
-
borderWidth:
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
: theme.__hd__.textInput.borderWidths.container.normal,
|
|
100
|
+
borderWidth: themeFocused
|
|
101
|
+
? theme.__hd__.textInput.borderWidths.container.focused
|
|
102
|
+
: theme.__hd__.textInput.borderWidths.container.normal,
|
|
108
103
|
borderRadius: theme.__hd__.textInput.radii.container,
|
|
109
104
|
borderColor:
|
|
110
105
|
theme.__hd__.textInput.colors.borders[themeVariant] ??
|
|
@@ -18,7 +18,6 @@ describe('Label', () => {
|
|
|
18
18
|
themeVariant
|
|
19
19
|
${'default'}
|
|
20
20
|
${'filled'}
|
|
21
|
-
${'focused'}
|
|
22
21
|
${'error'}
|
|
23
22
|
${'disabled'}
|
|
24
23
|
${'readonly'}
|
|
@@ -35,7 +34,6 @@ describe('LabelInsideTextInput', () => {
|
|
|
35
34
|
themeVariant
|
|
36
35
|
${'default'}
|
|
37
36
|
${'filled'}
|
|
38
|
-
${'focused'}
|
|
39
37
|
${'error'}
|
|
40
38
|
${'disabled'}
|
|
41
39
|
${'readonly'}
|
|
@@ -66,7 +64,6 @@ describe('StyledAsteriskLabel', () => {
|
|
|
66
64
|
themeVariant
|
|
67
65
|
${'default'}
|
|
68
66
|
${'filled'}
|
|
69
|
-
${'focused'}
|
|
70
67
|
${'error'}
|
|
71
68
|
${'disabled'}
|
|
72
69
|
${'readonly'}
|
|
@@ -105,7 +102,6 @@ describe('StyledMaxLengthMessage', () => {
|
|
|
105
102
|
themeVariant
|
|
106
103
|
${'default'}
|
|
107
104
|
${'filled'}
|
|
108
|
-
${'focused'}
|
|
109
105
|
${'error'}
|
|
110
106
|
${'disabled'}
|
|
111
107
|
${'readonly'}
|
|
@@ -138,7 +134,6 @@ describe('StyledBorderBackDrop', () => {
|
|
|
138
134
|
themeVariant
|
|
139
135
|
${'default'}
|
|
140
136
|
${'filled'}
|
|
141
|
-
${'focused'}
|
|
142
137
|
${'error'}
|
|
143
138
|
${'disabled'}
|
|
144
139
|
${'readonly'}
|
|
@@ -146,12 +141,23 @@ describe('StyledBorderBackDrop', () => {
|
|
|
146
141
|
'renders correctly with themeVariant $themeVariant',
|
|
147
142
|
({ themeVariant }): void => {
|
|
148
143
|
const { toJSON } = renderWithTheme(
|
|
149
|
-
<StyledBorderBackDrop
|
|
144
|
+
<StyledBorderBackDrop
|
|
145
|
+
themeVariant={themeVariant}
|
|
146
|
+
themeFocused={false}
|
|
147
|
+
/>
|
|
150
148
|
);
|
|
151
149
|
|
|
152
150
|
expect(toJSON()).toMatchSnapshot();
|
|
153
151
|
}
|
|
154
152
|
);
|
|
153
|
+
|
|
154
|
+
it('renders correctly when focused', (): void => {
|
|
155
|
+
const { toJSON } = renderWithTheme(
|
|
156
|
+
<StyledBorderBackDrop themeVariant="error" themeFocused />
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
expect(toJSON()).toMatchSnapshot();
|
|
160
|
+
});
|
|
155
161
|
});
|
|
156
162
|
|
|
157
163
|
describe('StyledTextInput', () => {
|
|
@@ -112,34 +112,6 @@ exports[`Label renders correctly with themeVariant filled 1`] = `
|
|
|
112
112
|
</Text>
|
|
113
113
|
`;
|
|
114
114
|
|
|
115
|
-
exports[`Label renders correctly with themeVariant focused 1`] = `
|
|
116
|
-
<Text
|
|
117
|
-
style={
|
|
118
|
-
Array [
|
|
119
|
-
Object {
|
|
120
|
-
"color": "#001f23",
|
|
121
|
-
"fontFamily": "BeVietnamPro-Regular",
|
|
122
|
-
"fontSize": 14,
|
|
123
|
-
"letterSpacing": 0.42,
|
|
124
|
-
"lineHeight": 22,
|
|
125
|
-
},
|
|
126
|
-
Array [
|
|
127
|
-
Object {
|
|
128
|
-
"color": "#001f23",
|
|
129
|
-
},
|
|
130
|
-
undefined,
|
|
131
|
-
],
|
|
132
|
-
]
|
|
133
|
-
}
|
|
134
|
-
themeFontSize="medium"
|
|
135
|
-
themeFontWeight="regular"
|
|
136
|
-
themeIntent="body"
|
|
137
|
-
themeVariant="focused"
|
|
138
|
-
>
|
|
139
|
-
Label
|
|
140
|
-
</Text>
|
|
141
|
-
`;
|
|
142
|
-
|
|
143
115
|
exports[`Label renders correctly with themeVariant readonly 1`] = `
|
|
144
116
|
<Text
|
|
145
117
|
style={
|
|
@@ -153,7 +125,7 @@ exports[`Label renders correctly with themeVariant readonly 1`] = `
|
|
|
153
125
|
},
|
|
154
126
|
Array [
|
|
155
127
|
Object {
|
|
156
|
-
"color": "#
|
|
128
|
+
"color": "#808f91",
|
|
157
129
|
},
|
|
158
130
|
undefined,
|
|
159
131
|
],
|
|
@@ -315,38 +287,6 @@ exports[`LabelInsideTextInput renders correctly with themeVariant filled 1`] = `
|
|
|
315
287
|
</Text>
|
|
316
288
|
`;
|
|
317
289
|
|
|
318
|
-
exports[`LabelInsideTextInput renders correctly with themeVariant focused 1`] = `
|
|
319
|
-
<Text
|
|
320
|
-
style={
|
|
321
|
-
Array [
|
|
322
|
-
Object {
|
|
323
|
-
"color": "#001f23",
|
|
324
|
-
"fontFamily": "BeVietnamPro-Regular",
|
|
325
|
-
"fontSize": 14,
|
|
326
|
-
"letterSpacing": 0.42,
|
|
327
|
-
"lineHeight": 22,
|
|
328
|
-
},
|
|
329
|
-
Array [
|
|
330
|
-
Object {
|
|
331
|
-
"alignContent": "center",
|
|
332
|
-
"alignItems": "center",
|
|
333
|
-
"color": "#001f23",
|
|
334
|
-
"fontSize": 14,
|
|
335
|
-
"textAlignVertical": "center",
|
|
336
|
-
},
|
|
337
|
-
undefined,
|
|
338
|
-
],
|
|
339
|
-
]
|
|
340
|
-
}
|
|
341
|
-
themeFontSize="medium"
|
|
342
|
-
themeFontWeight="regular"
|
|
343
|
-
themeIntent="body"
|
|
344
|
-
themeVariant="focused"
|
|
345
|
-
>
|
|
346
|
-
Label
|
|
347
|
-
</Text>
|
|
348
|
-
`;
|
|
349
|
-
|
|
350
290
|
exports[`LabelInsideTextInput renders correctly with themeVariant readonly 1`] = `
|
|
351
291
|
<Text
|
|
352
292
|
style={
|
|
@@ -362,7 +302,7 @@ exports[`LabelInsideTextInput renders correctly with themeVariant readonly 1`] =
|
|
|
362
302
|
Object {
|
|
363
303
|
"alignContent": "center",
|
|
364
304
|
"alignItems": "center",
|
|
365
|
-
"color": "#
|
|
305
|
+
"color": "#808f91",
|
|
366
306
|
"fontSize": 14,
|
|
367
307
|
"textAlignVertical": "center",
|
|
368
308
|
},
|
|
@@ -392,7 +332,7 @@ exports[`StyledAsteriskLabel renders correctly with themeVariant default 1`] = `
|
|
|
392
332
|
},
|
|
393
333
|
Array [
|
|
394
334
|
Object {
|
|
395
|
-
"color": "#
|
|
335
|
+
"color": "#de350b",
|
|
396
336
|
},
|
|
397
337
|
undefined,
|
|
398
338
|
],
|
|
@@ -448,7 +388,7 @@ exports[`StyledAsteriskLabel renders correctly with themeVariant error 1`] = `
|
|
|
448
388
|
},
|
|
449
389
|
Array [
|
|
450
390
|
Object {
|
|
451
|
-
"color": "#
|
|
391
|
+
"color": "#de350b",
|
|
452
392
|
},
|
|
453
393
|
undefined,
|
|
454
394
|
],
|
|
@@ -476,7 +416,7 @@ exports[`StyledAsteriskLabel renders correctly with themeVariant filled 1`] = `
|
|
|
476
416
|
},
|
|
477
417
|
Array [
|
|
478
418
|
Object {
|
|
479
|
-
"color": "#
|
|
419
|
+
"color": "#de350b",
|
|
480
420
|
},
|
|
481
421
|
undefined,
|
|
482
422
|
],
|
|
@@ -491,34 +431,6 @@ exports[`StyledAsteriskLabel renders correctly with themeVariant filled 1`] = `
|
|
|
491
431
|
</Text>
|
|
492
432
|
`;
|
|
493
433
|
|
|
494
|
-
exports[`StyledAsteriskLabel renders correctly with themeVariant focused 1`] = `
|
|
495
|
-
<Text
|
|
496
|
-
style={
|
|
497
|
-
Array [
|
|
498
|
-
Object {
|
|
499
|
-
"color": "#001f23",
|
|
500
|
-
"fontFamily": "BeVietnamPro-Regular",
|
|
501
|
-
"fontSize": 14,
|
|
502
|
-
"letterSpacing": 0.42,
|
|
503
|
-
"lineHeight": 22,
|
|
504
|
-
},
|
|
505
|
-
Array [
|
|
506
|
-
Object {
|
|
507
|
-
"color": "#f46363",
|
|
508
|
-
},
|
|
509
|
-
undefined,
|
|
510
|
-
],
|
|
511
|
-
]
|
|
512
|
-
}
|
|
513
|
-
themeFontSize="medium"
|
|
514
|
-
themeFontWeight="regular"
|
|
515
|
-
themeIntent="body"
|
|
516
|
-
themeVariant="focused"
|
|
517
|
-
>
|
|
518
|
-
*
|
|
519
|
-
</Text>
|
|
520
|
-
`;
|
|
521
|
-
|
|
522
434
|
exports[`StyledAsteriskLabel renders correctly with themeVariant readonly 1`] = `
|
|
523
435
|
<Text
|
|
524
436
|
style={
|
|
@@ -547,14 +459,14 @@ exports[`StyledAsteriskLabel renders correctly with themeVariant readonly 1`] =
|
|
|
547
459
|
</Text>
|
|
548
460
|
`;
|
|
549
461
|
|
|
550
|
-
exports[`StyledBorderBackDrop renders correctly
|
|
462
|
+
exports[`StyledBorderBackDrop renders correctly when focused 1`] = `
|
|
551
463
|
<View
|
|
552
464
|
style={
|
|
553
465
|
Array [
|
|
554
466
|
Object {
|
|
555
|
-
"borderColor": "#
|
|
467
|
+
"borderColor": "#de350b",
|
|
556
468
|
"borderRadius": 8,
|
|
557
|
-
"borderWidth":
|
|
469
|
+
"borderWidth": 2,
|
|
558
470
|
"bottom": 0,
|
|
559
471
|
"left": 0,
|
|
560
472
|
"position": "absolute",
|
|
@@ -564,16 +476,17 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant default 1`] =
|
|
|
564
476
|
undefined,
|
|
565
477
|
]
|
|
566
478
|
}
|
|
567
|
-
|
|
479
|
+
themeFocused={true}
|
|
480
|
+
themeVariant="error"
|
|
568
481
|
/>
|
|
569
482
|
`;
|
|
570
483
|
|
|
571
|
-
exports[`StyledBorderBackDrop renders correctly with themeVariant
|
|
484
|
+
exports[`StyledBorderBackDrop renders correctly with themeVariant default 1`] = `
|
|
572
485
|
<View
|
|
573
486
|
style={
|
|
574
487
|
Array [
|
|
575
488
|
Object {
|
|
576
|
-
"borderColor": "#
|
|
489
|
+
"borderColor": "#001f23",
|
|
577
490
|
"borderRadius": 8,
|
|
578
491
|
"borderWidth": 1,
|
|
579
492
|
"bottom": 0,
|
|
@@ -585,16 +498,17 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant disabled 1`] =
|
|
|
585
498
|
undefined,
|
|
586
499
|
]
|
|
587
500
|
}
|
|
588
|
-
|
|
501
|
+
themeFocused={false}
|
|
502
|
+
themeVariant="default"
|
|
589
503
|
/>
|
|
590
504
|
`;
|
|
591
505
|
|
|
592
|
-
exports[`StyledBorderBackDrop renders correctly with themeVariant
|
|
506
|
+
exports[`StyledBorderBackDrop renders correctly with themeVariant disabled 1`] = `
|
|
593
507
|
<View
|
|
594
508
|
style={
|
|
595
509
|
Array [
|
|
596
510
|
Object {
|
|
597
|
-
"borderColor": "#
|
|
511
|
+
"borderColor": "#bfc1c5",
|
|
598
512
|
"borderRadius": 8,
|
|
599
513
|
"borderWidth": 1,
|
|
600
514
|
"bottom": 0,
|
|
@@ -606,16 +520,17 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant error 1`] = `
|
|
|
606
520
|
undefined,
|
|
607
521
|
]
|
|
608
522
|
}
|
|
609
|
-
|
|
523
|
+
themeFocused={false}
|
|
524
|
+
themeVariant="disabled"
|
|
610
525
|
/>
|
|
611
526
|
`;
|
|
612
527
|
|
|
613
|
-
exports[`StyledBorderBackDrop renders correctly with themeVariant
|
|
528
|
+
exports[`StyledBorderBackDrop renders correctly with themeVariant error 1`] = `
|
|
614
529
|
<View
|
|
615
530
|
style={
|
|
616
531
|
Array [
|
|
617
532
|
Object {
|
|
618
|
-
"borderColor": "#
|
|
533
|
+
"borderColor": "#de350b",
|
|
619
534
|
"borderRadius": 8,
|
|
620
535
|
"borderWidth": 1,
|
|
621
536
|
"bottom": 0,
|
|
@@ -627,18 +542,19 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant filled 1`] = `
|
|
|
627
542
|
undefined,
|
|
628
543
|
]
|
|
629
544
|
}
|
|
630
|
-
|
|
545
|
+
themeFocused={false}
|
|
546
|
+
themeVariant="error"
|
|
631
547
|
/>
|
|
632
548
|
`;
|
|
633
549
|
|
|
634
|
-
exports[`StyledBorderBackDrop renders correctly with themeVariant
|
|
550
|
+
exports[`StyledBorderBackDrop renders correctly with themeVariant filled 1`] = `
|
|
635
551
|
<View
|
|
636
552
|
style={
|
|
637
553
|
Array [
|
|
638
554
|
Object {
|
|
639
555
|
"borderColor": "#001f23",
|
|
640
556
|
"borderRadius": 8,
|
|
641
|
-
"borderWidth":
|
|
557
|
+
"borderWidth": 1,
|
|
642
558
|
"bottom": 0,
|
|
643
559
|
"left": 0,
|
|
644
560
|
"position": "absolute",
|
|
@@ -648,7 +564,8 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant focused 1`] =
|
|
|
648
564
|
undefined,
|
|
649
565
|
]
|
|
650
566
|
}
|
|
651
|
-
|
|
567
|
+
themeFocused={false}
|
|
568
|
+
themeVariant="filled"
|
|
652
569
|
/>
|
|
653
570
|
`;
|
|
654
571
|
|
|
@@ -669,6 +586,7 @@ exports[`StyledBorderBackDrop renders correctly with themeVariant readonly 1`] =
|
|
|
669
586
|
undefined,
|
|
670
587
|
]
|
|
671
588
|
}
|
|
589
|
+
themeFocused={false}
|
|
672
590
|
themeVariant="readonly"
|
|
673
591
|
/>
|
|
674
592
|
`;
|
|
@@ -686,7 +604,7 @@ exports[`StyledErrorMessage renders correctly 1`] = `
|
|
|
686
604
|
},
|
|
687
605
|
Array [
|
|
688
606
|
Object {
|
|
689
|
-
"color": "#
|
|
607
|
+
"color": "#de350b",
|
|
690
608
|
"fontSize": 12,
|
|
691
609
|
"marginLeft": 4,
|
|
692
610
|
},
|
|
@@ -834,7 +752,7 @@ exports[`StyledMaxLengthMessage renders correctly with themeVariant error 1`] =
|
|
|
834
752
|
Array [
|
|
835
753
|
Object {
|
|
836
754
|
"alignSelf": "flex-end",
|
|
837
|
-
"color": "#
|
|
755
|
+
"color": "#de350b",
|
|
838
756
|
"flex": 1,
|
|
839
757
|
"flexGrow": 1,
|
|
840
758
|
"fontSize": 12,
|
|
@@ -888,40 +806,6 @@ exports[`StyledMaxLengthMessage renders correctly with themeVariant filled 1`] =
|
|
|
888
806
|
</Text>
|
|
889
807
|
`;
|
|
890
808
|
|
|
891
|
-
exports[`StyledMaxLengthMessage renders correctly with themeVariant focused 1`] = `
|
|
892
|
-
<Text
|
|
893
|
-
style={
|
|
894
|
-
Array [
|
|
895
|
-
Object {
|
|
896
|
-
"color": "#001f23",
|
|
897
|
-
"fontFamily": "BeVietnamPro-Regular",
|
|
898
|
-
"fontSize": 14,
|
|
899
|
-
"letterSpacing": 0.42,
|
|
900
|
-
"lineHeight": 22,
|
|
901
|
-
},
|
|
902
|
-
Array [
|
|
903
|
-
Object {
|
|
904
|
-
"alignSelf": "flex-end",
|
|
905
|
-
"color": "#001f23",
|
|
906
|
-
"flex": 1,
|
|
907
|
-
"flexGrow": 1,
|
|
908
|
-
"fontSize": 12,
|
|
909
|
-
"marginRight": 4,
|
|
910
|
-
"textAlign": "right",
|
|
911
|
-
},
|
|
912
|
-
undefined,
|
|
913
|
-
],
|
|
914
|
-
]
|
|
915
|
-
}
|
|
916
|
-
themeFontSize="medium"
|
|
917
|
-
themeFontWeight="regular"
|
|
918
|
-
themeIntent="body"
|
|
919
|
-
themeVariant="focused"
|
|
920
|
-
>
|
|
921
|
-
100/255
|
|
922
|
-
</Text>
|
|
923
|
-
`;
|
|
924
|
-
|
|
925
809
|
exports[`StyledMaxLengthMessage renders correctly with themeVariant readonly 1`] = `
|
|
926
810
|
<Text
|
|
927
811
|
style={
|
|
@@ -936,7 +820,7 @@ exports[`StyledMaxLengthMessage renders correctly with themeVariant readonly 1`]
|
|
|
936
820
|
Array [
|
|
937
821
|
Object {
|
|
938
822
|
"alignSelf": "flex-end",
|
|
939
|
-
"color": "#
|
|
823
|
+
"color": "#808f91",
|
|
940
824
|
"flex": 1,
|
|
941
825
|
"flexGrow": 1,
|
|
942
826
|
"fontSize": 12,
|
|
@@ -965,6 +849,7 @@ exports[`StyledTextInput renders correctly 1`] = `
|
|
|
965
849
|
"flexGrow": 2,
|
|
966
850
|
"fontSize": 14,
|
|
967
851
|
"marginHorizontal": 8,
|
|
852
|
+
"paddingVertical": 0,
|
|
968
853
|
"textAlignVertical": "center",
|
|
969
854
|
},
|
|
970
855
|
undefined,
|