@hero-design/rn 8.44.0-alpha.0 → 8.44.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/CHANGELOG.md +36 -0
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +2852 -2683
- package/jest-setup.ts +2 -0
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +2855 -2687
- package/package.json +23 -24
- package/rollup.config.js +0 -1
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +564 -384
- package/src/components/Accordion/__tests__/__snapshots__/StyledAccordion.spec.tsx.snap +76 -20
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +791 -605
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +848 -567
- package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +172 -110
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/StyledAvatarStack.spec.tsx.snap +138 -70
- package/src/components/Avatar/AvatarStack/__tests__/__snapshots__/index.spec.tsx.snap +745 -581
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +158 -57
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +273 -153
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +391 -223
- package/src/components/Badge/__tests__/__snapshots__/Status.spec.tsx.snap +119 -63
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +306 -242
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +317 -183
- package/src/components/Box/__tests__/__snapshots__/index.spec.tsx.snap +1042 -454
- package/src/components/Button/LoadingIndicator/StyledLoadingIndicator.tsx +6 -10
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +400 -140
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +1090 -880
- package/src/components/Button/StyledButton.tsx +4 -0
- package/src/components/Button/UtilityButton/__tests__/__snapshots__/index.spec.tsx.snap +196 -106
- package/src/components/Button/__tests__/__snapshots__/Button.spec.tsx.snap +1675 -1125
- package/src/components/Button/__tests__/__snapshots__/IconButton.spec.tsx.snap +71 -26
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +1651 -665
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +555 -330
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +265 -69
- package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +205 -65
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +36 -8
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +292 -124
- package/src/components/Carousel/CardCarousel.tsx +10 -7
- package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +486 -406
- package/src/components/Carousel/__tests__/__snapshots__/StyledCardCarousel.spec.tsx.snap +197 -70
- package/src/components/Carousel/__tests__/__snapshots__/StyledCarousel.spec.tsx.snap +41 -13
- package/src/components/Carousel/__tests__/__snapshots__/index.spec.tsx.snap +1742 -1526
- package/src/components/Carousel/__tests__/index.spec.tsx +50 -3
- package/src/components/Carousel/index.tsx +16 -22
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +404 -112
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +574 -334
- package/src/components/Chip/StyledChip.tsx +121 -0
- package/src/components/Chip/__tests__/__snapshots__/index.spec.tsx.snap +1483 -0
- package/src/components/Chip/__tests__/index.spec.tsx +136 -0
- package/src/components/Chip/index.tsx +82 -0
- package/src/components/Collapse/__tests__/__snapshots__/StyledCollapse.spec.tsx.snap +73 -17
- package/src/components/Collapse/__tests__/__snapshots__/index.spec.tsx.snap +94 -38
- package/src/components/Collapse/index.tsx +1 -1
- package/src/components/ContentNavigator/__tests__/__snapshots__/StyledContentNavigator.spec.tsx.snap +37 -9
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +424 -268
- package/src/components/DatePicker/__tests__/__snapshots__/DatePicker.spec.tsx.snap +622 -457
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +212 -157
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerCalendar.spec.tsx.snap +204 -149
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +483 -386
- package/src/components/Divider/__tests__/__snapshots__/StyledDivider.spec.tsx.snap +464 -128
- package/src/components/Drawer/DragableDrawer/__tests__/__snapshots__/index.spec.tsx.snap +97 -69
- package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +327 -192
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +169 -113
- package/src/components/Error/StyledError.tsx +2 -1
- package/src/components/Error/__tests__/__snapshots__/index.spec.tsx.snap +390 -262
- package/src/components/Error/__tests__/index.spec.tsx +9 -6
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +860 -723
- package/src/components/FAB/__tests__/__snapshots__/AnimatedFABIcon.spec.tsx.snap +98 -42
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +199 -99
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +293 -185
- package/src/components/HeroDesignProvider/__tests__/__snapshots__/index.spec.tsx.snap +45 -17
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +3 -0
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +158 -46
- package/src/components/Image/__tests__/__snapshots__/index.spec.tsx.snap +164 -52
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +242 -170
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +760 -588
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +272 -128
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +477 -193
- package/src/components/Modal/__tests__/__snapshots__/index.spec.tsx.snap +169 -0
- package/src/components/Modal/__tests__/index.spec.tsx +99 -0
- package/src/components/Modal/index.tsx +178 -82
- package/src/components/PageControl/__tests__/__snapshots__/index.spec.tsx.snap +84 -41
- package/src/components/PageControl/index.tsx +1 -0
- package/src/components/PinInput/__tests__/StyledPinInput.spec.tsx +9 -4
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +293 -153
- package/src/components/PinInput/__tests__/__snapshots__/StyledPinInput.spec.tsx.snap +15 -48
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +809 -697
- package/src/components/Portal/__tests__/PortalHost.spec.tsx +12 -14
- package/src/components/Portal/__tests__/__snapshots__/index.spec.tsx.snap +43 -15
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +743 -603
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +188 -116
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +257 -205
- package/src/components/Rate/__tests__/__snapshots__/index.spec.tsx.snap +864 -600
- package/src/components/RefreshControl/__tests__/__snapshots__/index.spec.tsx.snap +128 -44
- package/src/components/RichTextEditor/RichTextEditor.tsx +76 -38
- package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +5 -2
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +3 -3
- package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +413 -266
- package/src/components/RichTextEditor/__tests__/__snapshots__/MentionList.spec.tsx.snap +64 -35
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +403 -305
- package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +158 -46
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +394 -226
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +93 -57
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +2387 -2151
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +856 -174
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +7 -6
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +73 -37
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +2321 -2085
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +674 -150
- package/src/components/Skeleton/__tests__/__snapshots__/index.spec.tsx.snap +490 -294
- package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +117 -33
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +105 -77
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +1308 -636
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +121 -93
- package/src/components/Success/StyledSuccess.tsx +2 -1
- package/src/components/Success/__tests__/__snapshots__/index.spec.tsx.snap +388 -258
- package/src/components/Success/__tests__/index.spec.tsx +9 -6
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +210 -75
- package/src/components/Swipeable/__tests__/__snapshots__/index.spec.tsx.snap +58 -30
- package/src/components/Swipeable/index.tsx +3 -3
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +226 -114
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +146 -109
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +202 -62
- package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +132 -68
- package/src/components/Tabs/__tests__/SceneView.spec.tsx +7 -7
- package/src/components/Tabs/__tests__/__snapshots__/SceneView.spec.tsx.snap +206 -94
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +2217 -1962
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabsHeader.spec.tsx.snap +523 -455
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +121 -65
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +1641 -1398
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +554 -274
- package/src/components/TextInput/StyledTextInput.tsx +8 -31
- package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +0 -44
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +990 -711
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +3200 -2431
- package/src/components/TextInput/__tests__/index.spec.tsx +2 -2
- package/src/components/TextInput/index.tsx +113 -57
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +414 -304
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +686 -534
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +871 -573
- package/src/components/Toast/__tests__/__snapshots__/ToastContainer.spec.tsx.snap +180 -68
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +582 -426
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +683 -363
- package/src/components/Typography/Body/__tests__/__snapshots__/StyledBody.tsx.snap +704 -256
- package/src/components/Typography/Body/__tests__/__snapshots__/index.spec.tsx.snap +855 -323
- package/src/components/Typography/Caption/__tests__/__snapshots__/StyledCaption.spec.tsx.snap +430 -150
- package/src/components/Typography/Caption/__tests__/__snapshots__/index.spec.tsx.snap +572 -208
- package/src/components/Typography/Label/__tests__/__snapshots__/StyledLabel.tsx.snap +328 -104
- package/src/components/Typography/Label/__tests__/__snapshots__/index.spec.tsx.snap +462 -154
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +900 -340
- package/src/components/Typography/Title/__tests__/__snapshots__/StyledTitle.tsx.snap +880 -320
- package/src/components/Typography/Title/__tests__/__snapshots__/index.spec.tsx.snap +1035 -391
- package/src/index.ts +2 -2
- package/src/testHelpers/renderWithTheme.tsx +2 -2
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +40 -3
- package/src/theme/components/button.ts +0 -1
- package/src/theme/components/chip.ts +47 -0
- package/src/theme/components/textInput.ts +2 -2
- package/src/theme/getTheme.ts +3 -0
- package/testUtils/setup.tsx +0 -18
- package/tsconfig.json +4 -1
- package/types/components/Accordion/AccordionItem.d.ts +2 -1
- package/types/components/Accordion/index.d.ts +1 -1
- package/types/components/Attachment/index.d.ts +2 -1
- package/types/components/Avatar/Avatar.d.ts +2 -1
- package/types/components/Avatar/AvatarStack/index.d.ts +2 -2
- package/types/components/Avatar/index.d.ts +3 -2
- package/types/components/Badge/StyledBadge.d.ts +0 -4
- package/types/components/BottomSheet/Footer.d.ts +2 -1
- package/types/components/BottomSheet/Header.d.ts +2 -1
- package/types/components/BottomSheet/ScrollView.d.ts +1 -0
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +0 -4
- package/types/components/Box/index.d.ts +2 -1
- package/types/components/Button/IconButton.d.ts +2 -1
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +3 -3
- package/types/components/Button/LoadingIndicator/index.d.ts +2 -1
- package/types/components/Button/UtilityButton/index.d.ts +2 -1
- package/types/components/Calendar/CalendarRowItem.d.ts +2 -1
- package/types/components/Calendar/StyledCalendar.d.ts +1 -1
- package/types/components/Calendar/index.d.ts +2 -1
- package/types/components/Carousel/CardCarousel.d.ts +1 -1
- package/types/components/Carousel/CarouselItem.d.ts +2 -1
- package/types/components/Carousel/index.d.ts +2 -2
- package/types/components/Checkbox/index.d.ts +2 -1
- package/types/components/Chip/StyledChip.d.ts +31 -0
- package/types/components/Chip/index.d.ts +27 -0
- package/types/components/Collapse/StyledCollapse.d.ts +0 -2
- package/types/components/Collapse/index.d.ts +2 -1
- package/types/components/ContentNavigator/index.d.ts +2 -1
- package/types/components/DatePicker/DatePickerAndroid.d.ts +2 -1
- package/types/components/DatePicker/DatePickerCalendar.d.ts +2 -1
- package/types/components/DatePicker/DatePickerIOS.d.ts +2 -1
- package/types/components/DatePicker/index.d.ts +2 -1
- package/types/components/Divider/index.d.ts +2 -1
- package/types/components/Drawer/StyledDrawer.d.ts +0 -6
- package/types/components/Error/StyledError.d.ts +3 -9
- package/types/components/FAB/ActionGroup/ActionItem.d.ts +2 -1
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -4
- package/types/components/FAB/AnimatedFABIcon.d.ts +2 -1
- package/types/components/HeroDesignProvider/index.d.ts +2 -1
- package/types/components/Icon/AnimatedIcon.d.ts +2 -1
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +3 -2
- package/types/components/Icon/utils.d.ts +1 -1
- package/types/components/Image/index.d.ts +1 -0
- package/types/components/Modal/index.d.ts +12 -8
- package/types/components/PageControl/StyledPageControl.d.ts +0 -2
- package/types/components/PageControl/index.d.ts +2 -1
- package/types/components/PinInput/PinCell.d.ts +2 -1
- package/types/components/Portal/PortalHost.d.ts +1 -1
- package/types/components/Portal/PortalProvider.d.ts +1 -1
- package/types/components/Portal/index.d.ts +2 -2
- package/types/components/Progress/ProgressBar.d.ts +1 -0
- package/types/components/Progress/StyledProgressBar.d.ts +0 -2
- package/types/components/Progress/index.d.ts +1 -0
- package/types/components/Rate/StyledRate.d.ts +0 -2
- package/types/components/Rate/index.d.ts +2 -1
- package/types/components/RefreshControl/index.d.ts +2 -1
- package/types/components/RichTextEditor/EditorToolbar.d.ts +2 -1
- package/types/components/RichTextEditor/MentionList.d.ts +2 -1
- package/types/components/RichTextEditor/index.d.ts +2 -2
- package/types/components/Select/BaseOptionList.d.ts +1 -1
- package/types/components/Select/Footer.d.ts +2 -1
- package/types/components/Select/MultiSelect/Option.d.ts +2 -1
- package/types/components/Select/MultiSelect/OptionList.d.ts +2 -1
- package/types/components/Select/MultiSelect/index.d.ts +1 -1
- package/types/components/Select/SingleSelect/Option.d.ts +2 -1
- package/types/components/Select/SingleSelect/OptionList.d.ts +1 -1
- package/types/components/Select/SingleSelect/StyledSingleSelect.d.ts +2 -1
- package/types/components/Select/SingleSelect/index.d.ts +1 -1
- package/types/components/Select/helpers.d.ts +1 -2
- package/types/components/Select/index.d.ts +2 -1
- package/types/components/Skeleton/index.d.ts +2 -1
- package/types/components/Slider/index.d.ts +2 -1
- package/types/components/Spinner/AnimatedSpinner.d.ts +2 -1
- package/types/components/Success/StyledSuccess.d.ts +3 -7
- package/types/components/Swipeable/SwipeableAction.d.ts +2 -2
- package/types/components/Swipeable/index.d.ts +3 -3
- package/types/components/Switch/SelectorSwitch/Option.d.ts +2 -1
- package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +0 -6
- package/types/components/Switch/StyledSwitch.d.ts +0 -2
- package/types/components/Tabs/ActiveTabIndicator.d.ts +2 -1
- package/types/components/Tabs/SceneView.d.ts +1 -1
- package/types/components/Tabs/ScrollableTabs.d.ts +2 -1
- package/types/components/Tabs/ScrollableTabsHeader.d.ts +2 -1
- package/types/components/Tabs/StyledScrollableTabs.d.ts +0 -4
- package/types/components/Tabs/StyledTabs.d.ts +0 -4
- package/types/components/Tabs/TabWithBadge.d.ts +2 -2
- package/types/components/Tabs/index.d.ts +2 -1
- package/types/components/TextInput/StyledTextInput.d.ts +5 -25
- package/types/components/TextInput/index.d.ts +2 -1
- package/types/components/TimePicker/TimePickerAndroid.d.ts +2 -1
- package/types/components/TimePicker/TimePickerIOS.d.ts +2 -1
- package/types/components/TimePicker/index.d.ts +2 -1
- package/types/components/Toast/StyledToast.d.ts +0 -2
- package/types/components/Toast/Toast.d.ts +1 -0
- package/types/components/Toast/ToastProvider.d.ts +2 -1
- package/types/components/Toast/index.d.ts +1 -1
- package/types/components/Toolbar/ToolbarGroup.d.ts +2 -1
- package/types/components/Toolbar/ToolbarItem.d.ts +2 -1
- package/types/components/Toolbar/index.d.ts +3 -2
- package/types/components/Typography/Body/index.d.ts +2 -1
- package/types/components/Typography/Caption/index.d.ts +2 -1
- package/types/components/Typography/Label/index.d.ts +2 -1
- package/types/components/Typography/Text/index.d.ts +2 -1
- package/types/components/Typography/Title/index.d.ts +2 -1
- package/types/index.d.ts +2 -2
- package/types/testHelpers/renderWithTheme.d.ts +1 -0
- package/types/theme/ThemeSwitcher.d.ts +2 -2
- package/types/theme/components/button.d.ts +0 -1
- package/types/theme/components/chip.d.ts +40 -0
- package/types/theme/getTheme.d.ts +2 -0
- package/.turbo/turbo-publish:npm.log +0 -0
- package/src/components/Modal/ModalContentWrapper.tsx +0 -112
- package/src/components/Modal/ModalPresenter/ModalPresenter.tsx +0 -135
- package/src/components/Modal/ModalPresenter/index.tsx +0 -9
- package/src/components/Modal/ModalProvider.tsx +0 -8
- package/types/components/Modal/ModalContentWrapper.d.ts +0 -16
- package/types/components/Modal/ModalPresenter/ModalPresenter.d.ts +0 -34
- package/types/components/Modal/ModalPresenter/index.d.ts +0 -3
- package/types/components/Modal/ModalProvider.d.ts +0 -5
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
3
|
+
import { Wrapper } from '../../ContentNavigator/StyledContentNavigator';
|
|
3
4
|
import { StyledHiddenInput } from '../StyledPinInput';
|
|
4
5
|
|
|
5
6
|
describe('StyledHiddenInput', () => {
|
|
@@ -10,13 +11,17 @@ describe('StyledHiddenInput', () => {
|
|
|
10
11
|
${8} | ${432}
|
|
11
12
|
`(
|
|
12
13
|
'has correct width when pin length is $themePinLength',
|
|
13
|
-
({ themePinLength, width }) => {
|
|
14
|
+
async ({ themePinLength, width }) => {
|
|
14
15
|
const wrapper = renderWithTheme(
|
|
15
|
-
<StyledHiddenInput
|
|
16
|
+
<StyledHiddenInput
|
|
17
|
+
testID="hidden-input"
|
|
18
|
+
themePinLength={themePinLength}
|
|
19
|
+
/>
|
|
16
20
|
);
|
|
21
|
+
const hiddenInput = wrapper.getByTestId('hidden-input');
|
|
17
22
|
|
|
18
|
-
expect(
|
|
19
|
-
expect(
|
|
23
|
+
expect(hiddenInput).toHaveStyle({ width });
|
|
24
|
+
expect(Wrapper).toMatchSnapshot();
|
|
20
25
|
}
|
|
21
26
|
);
|
|
22
27
|
});
|
|
@@ -3,239 +3,379 @@
|
|
|
3
3
|
exports[`PinCell renders correctly when focused is false, state is default 1`] = `
|
|
4
4
|
<View
|
|
5
5
|
style={
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"borderColor": "#001f23",
|
|
10
|
-
"borderRadius": 8,
|
|
11
|
-
"borderWidth": 1,
|
|
12
|
-
"height": 48,
|
|
13
|
-
"justifyContent": "center",
|
|
14
|
-
"width": 40,
|
|
15
|
-
},
|
|
16
|
-
undefined,
|
|
17
|
-
]
|
|
6
|
+
{
|
|
7
|
+
"flex": 1,
|
|
8
|
+
}
|
|
18
9
|
}
|
|
19
|
-
themeFocused={false}
|
|
20
|
-
themeState="default"
|
|
21
10
|
>
|
|
22
|
-
<
|
|
23
|
-
allowFontScaling={false}
|
|
11
|
+
<View
|
|
24
12
|
style={
|
|
25
13
|
[
|
|
26
14
|
{
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
15
|
+
"alignItems": "center",
|
|
16
|
+
"borderColor": "#001f23",
|
|
17
|
+
"borderRadius": 8,
|
|
18
|
+
"borderWidth": 1,
|
|
19
|
+
"height": 48,
|
|
20
|
+
"justifyContent": "center",
|
|
21
|
+
"width": 40,
|
|
32
22
|
},
|
|
23
|
+
undefined,
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
themeFocused={false}
|
|
27
|
+
themeState="default"
|
|
28
|
+
>
|
|
29
|
+
<Text
|
|
30
|
+
allowFontScaling={false}
|
|
31
|
+
style={
|
|
33
32
|
[
|
|
34
33
|
{
|
|
35
34
|
"color": "#001f23",
|
|
35
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
36
|
+
"fontSize": 28,
|
|
37
|
+
"letterSpacing": 0.24,
|
|
38
|
+
"lineHeight": 36,
|
|
36
39
|
},
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
[
|
|
41
|
+
{
|
|
42
|
+
"color": "#001f23",
|
|
43
|
+
},
|
|
44
|
+
undefined,
|
|
45
|
+
],
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
themeIntent="body"
|
|
49
|
+
themeLevel="h3"
|
|
50
|
+
themeState="default"
|
|
51
|
+
themeTypeface="neutral"
|
|
52
|
+
>
|
|
53
|
+
1
|
|
54
|
+
</Text>
|
|
55
|
+
</View>
|
|
56
|
+
<View
|
|
57
|
+
pointerEvents="box-none"
|
|
58
|
+
position="bottom"
|
|
59
|
+
style={
|
|
60
|
+
[
|
|
61
|
+
{
|
|
62
|
+
"bottom": 0,
|
|
63
|
+
"elevation": 9999,
|
|
64
|
+
"flexDirection": "column-reverse",
|
|
65
|
+
"left": 0,
|
|
66
|
+
"paddingHorizontal": 24,
|
|
67
|
+
"paddingVertical": 16,
|
|
68
|
+
"position": "absolute",
|
|
69
|
+
"right": 0,
|
|
70
|
+
"top": 0,
|
|
71
|
+
},
|
|
72
|
+
undefined,
|
|
39
73
|
]
|
|
40
74
|
}
|
|
41
|
-
|
|
42
|
-
themeLevel="h3"
|
|
43
|
-
themeState="default"
|
|
44
|
-
themeTypeface="neutral"
|
|
45
|
-
>
|
|
46
|
-
1
|
|
47
|
-
</Text>
|
|
75
|
+
/>
|
|
48
76
|
</View>
|
|
49
77
|
`;
|
|
50
78
|
|
|
51
79
|
exports[`PinCell renders correctly when focused is false, state is disabled 1`] = `
|
|
52
80
|
<View
|
|
53
81
|
style={
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"borderColor": "#bfc1c5",
|
|
58
|
-
"borderRadius": 8,
|
|
59
|
-
"borderWidth": 1,
|
|
60
|
-
"height": 48,
|
|
61
|
-
"justifyContent": "center",
|
|
62
|
-
"width": 40,
|
|
63
|
-
},
|
|
64
|
-
undefined,
|
|
65
|
-
]
|
|
82
|
+
{
|
|
83
|
+
"flex": 1,
|
|
84
|
+
}
|
|
66
85
|
}
|
|
67
|
-
themeFocused={false}
|
|
68
|
-
themeState="disabled"
|
|
69
86
|
>
|
|
70
|
-
<
|
|
71
|
-
allowFontScaling={false}
|
|
87
|
+
<View
|
|
72
88
|
style={
|
|
73
89
|
[
|
|
74
90
|
{
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
91
|
+
"alignItems": "center",
|
|
92
|
+
"borderColor": "#bfc1c5",
|
|
93
|
+
"borderRadius": 8,
|
|
94
|
+
"borderWidth": 1,
|
|
95
|
+
"height": 48,
|
|
96
|
+
"justifyContent": "center",
|
|
97
|
+
"width": 40,
|
|
80
98
|
},
|
|
99
|
+
undefined,
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
themeFocused={false}
|
|
103
|
+
themeState="disabled"
|
|
104
|
+
>
|
|
105
|
+
<Text
|
|
106
|
+
allowFontScaling={false}
|
|
107
|
+
style={
|
|
81
108
|
[
|
|
82
109
|
{
|
|
83
|
-
"color": "#
|
|
110
|
+
"color": "#001f23",
|
|
111
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
112
|
+
"fontSize": 28,
|
|
113
|
+
"letterSpacing": 0.24,
|
|
114
|
+
"lineHeight": 36,
|
|
84
115
|
},
|
|
85
|
-
|
|
86
|
-
|
|
116
|
+
[
|
|
117
|
+
{
|
|
118
|
+
"color": "#bfc1c5",
|
|
119
|
+
},
|
|
120
|
+
undefined,
|
|
121
|
+
],
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
themeIntent="body"
|
|
125
|
+
themeLevel="h3"
|
|
126
|
+
themeState="disabled"
|
|
127
|
+
themeTypeface="neutral"
|
|
128
|
+
>
|
|
129
|
+
1
|
|
130
|
+
</Text>
|
|
131
|
+
</View>
|
|
132
|
+
<View
|
|
133
|
+
pointerEvents="box-none"
|
|
134
|
+
position="bottom"
|
|
135
|
+
style={
|
|
136
|
+
[
|
|
137
|
+
{
|
|
138
|
+
"bottom": 0,
|
|
139
|
+
"elevation": 9999,
|
|
140
|
+
"flexDirection": "column-reverse",
|
|
141
|
+
"left": 0,
|
|
142
|
+
"paddingHorizontal": 24,
|
|
143
|
+
"paddingVertical": 16,
|
|
144
|
+
"position": "absolute",
|
|
145
|
+
"right": 0,
|
|
146
|
+
"top": 0,
|
|
147
|
+
},
|
|
148
|
+
undefined,
|
|
87
149
|
]
|
|
88
150
|
}
|
|
89
|
-
|
|
90
|
-
themeLevel="h3"
|
|
91
|
-
themeState="disabled"
|
|
92
|
-
themeTypeface="neutral"
|
|
93
|
-
>
|
|
94
|
-
1
|
|
95
|
-
</Text>
|
|
151
|
+
/>
|
|
96
152
|
</View>
|
|
97
153
|
`;
|
|
98
154
|
|
|
99
155
|
exports[`PinCell renders correctly when focused is false, state is error 1`] = `
|
|
100
156
|
<View
|
|
101
157
|
style={
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
"borderColor": "#cb300a",
|
|
106
|
-
"borderRadius": 8,
|
|
107
|
-
"borderWidth": 1,
|
|
108
|
-
"height": 48,
|
|
109
|
-
"justifyContent": "center",
|
|
110
|
-
"width": 40,
|
|
111
|
-
},
|
|
112
|
-
undefined,
|
|
113
|
-
]
|
|
158
|
+
{
|
|
159
|
+
"flex": 1,
|
|
160
|
+
}
|
|
114
161
|
}
|
|
115
|
-
themeFocused={false}
|
|
116
|
-
themeState="error"
|
|
117
162
|
>
|
|
118
|
-
<
|
|
119
|
-
allowFontScaling={false}
|
|
163
|
+
<View
|
|
120
164
|
style={
|
|
121
165
|
[
|
|
122
166
|
{
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
167
|
+
"alignItems": "center",
|
|
168
|
+
"borderColor": "#cb300a",
|
|
169
|
+
"borderRadius": 8,
|
|
170
|
+
"borderWidth": 1,
|
|
171
|
+
"height": 48,
|
|
172
|
+
"justifyContent": "center",
|
|
173
|
+
"width": 40,
|
|
128
174
|
},
|
|
175
|
+
undefined,
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
themeFocused={false}
|
|
179
|
+
themeState="error"
|
|
180
|
+
>
|
|
181
|
+
<Text
|
|
182
|
+
allowFontScaling={false}
|
|
183
|
+
style={
|
|
129
184
|
[
|
|
130
185
|
{
|
|
131
|
-
"color": "#
|
|
186
|
+
"color": "#001f23",
|
|
187
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
188
|
+
"fontSize": 28,
|
|
189
|
+
"letterSpacing": 0.24,
|
|
190
|
+
"lineHeight": 36,
|
|
132
191
|
},
|
|
133
|
-
|
|
134
|
-
|
|
192
|
+
[
|
|
193
|
+
{
|
|
194
|
+
"color": "#cb300a",
|
|
195
|
+
},
|
|
196
|
+
undefined,
|
|
197
|
+
],
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
themeIntent="body"
|
|
201
|
+
themeLevel="h3"
|
|
202
|
+
themeState="error"
|
|
203
|
+
themeTypeface="neutral"
|
|
204
|
+
>
|
|
205
|
+
1
|
|
206
|
+
</Text>
|
|
207
|
+
</View>
|
|
208
|
+
<View
|
|
209
|
+
pointerEvents="box-none"
|
|
210
|
+
position="bottom"
|
|
211
|
+
style={
|
|
212
|
+
[
|
|
213
|
+
{
|
|
214
|
+
"bottom": 0,
|
|
215
|
+
"elevation": 9999,
|
|
216
|
+
"flexDirection": "column-reverse",
|
|
217
|
+
"left": 0,
|
|
218
|
+
"paddingHorizontal": 24,
|
|
219
|
+
"paddingVertical": 16,
|
|
220
|
+
"position": "absolute",
|
|
221
|
+
"right": 0,
|
|
222
|
+
"top": 0,
|
|
223
|
+
},
|
|
224
|
+
undefined,
|
|
135
225
|
]
|
|
136
226
|
}
|
|
137
|
-
|
|
138
|
-
themeLevel="h3"
|
|
139
|
-
themeState="error"
|
|
140
|
-
themeTypeface="neutral"
|
|
141
|
-
>
|
|
142
|
-
1
|
|
143
|
-
</Text>
|
|
227
|
+
/>
|
|
144
228
|
</View>
|
|
145
229
|
`;
|
|
146
230
|
|
|
147
231
|
exports[`PinCell renders correctly when focused is true, state is default 1`] = `
|
|
148
232
|
<View
|
|
149
233
|
style={
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
"borderColor": "#001f23",
|
|
154
|
-
"borderRadius": 8,
|
|
155
|
-
"borderWidth": 2,
|
|
156
|
-
"height": 48,
|
|
157
|
-
"justifyContent": "center",
|
|
158
|
-
"width": 40,
|
|
159
|
-
},
|
|
160
|
-
undefined,
|
|
161
|
-
]
|
|
234
|
+
{
|
|
235
|
+
"flex": 1,
|
|
236
|
+
}
|
|
162
237
|
}
|
|
163
|
-
themeFocused={true}
|
|
164
|
-
themeState="default"
|
|
165
238
|
>
|
|
166
|
-
<
|
|
167
|
-
allowFontScaling={false}
|
|
239
|
+
<View
|
|
168
240
|
style={
|
|
169
241
|
[
|
|
170
242
|
{
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
"
|
|
243
|
+
"alignItems": "center",
|
|
244
|
+
"borderColor": "#001f23",
|
|
245
|
+
"borderRadius": 8,
|
|
246
|
+
"borderWidth": 2,
|
|
247
|
+
"height": 48,
|
|
248
|
+
"justifyContent": "center",
|
|
249
|
+
"width": 40,
|
|
176
250
|
},
|
|
251
|
+
undefined,
|
|
252
|
+
]
|
|
253
|
+
}
|
|
254
|
+
themeFocused={true}
|
|
255
|
+
themeState="default"
|
|
256
|
+
>
|
|
257
|
+
<Text
|
|
258
|
+
allowFontScaling={false}
|
|
259
|
+
style={
|
|
177
260
|
[
|
|
178
261
|
{
|
|
179
262
|
"color": "#001f23",
|
|
263
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
264
|
+
"fontSize": 28,
|
|
265
|
+
"letterSpacing": 0.24,
|
|
266
|
+
"lineHeight": 36,
|
|
180
267
|
},
|
|
181
|
-
|
|
182
|
-
|
|
268
|
+
[
|
|
269
|
+
{
|
|
270
|
+
"color": "#001f23",
|
|
271
|
+
},
|
|
272
|
+
undefined,
|
|
273
|
+
],
|
|
274
|
+
]
|
|
275
|
+
}
|
|
276
|
+
themeIntent="body"
|
|
277
|
+
themeLevel="h3"
|
|
278
|
+
themeState="default"
|
|
279
|
+
themeTypeface="neutral"
|
|
280
|
+
>
|
|
281
|
+
1
|
|
282
|
+
</Text>
|
|
283
|
+
</View>
|
|
284
|
+
<View
|
|
285
|
+
pointerEvents="box-none"
|
|
286
|
+
position="bottom"
|
|
287
|
+
style={
|
|
288
|
+
[
|
|
289
|
+
{
|
|
290
|
+
"bottom": 0,
|
|
291
|
+
"elevation": 9999,
|
|
292
|
+
"flexDirection": "column-reverse",
|
|
293
|
+
"left": 0,
|
|
294
|
+
"paddingHorizontal": 24,
|
|
295
|
+
"paddingVertical": 16,
|
|
296
|
+
"position": "absolute",
|
|
297
|
+
"right": 0,
|
|
298
|
+
"top": 0,
|
|
299
|
+
},
|
|
300
|
+
undefined,
|
|
183
301
|
]
|
|
184
302
|
}
|
|
185
|
-
|
|
186
|
-
themeLevel="h3"
|
|
187
|
-
themeState="default"
|
|
188
|
-
themeTypeface="neutral"
|
|
189
|
-
>
|
|
190
|
-
1
|
|
191
|
-
</Text>
|
|
303
|
+
/>
|
|
192
304
|
</View>
|
|
193
305
|
`;
|
|
194
306
|
|
|
195
307
|
exports[`PinCell renders correctly when focused is true, state is error 1`] = `
|
|
196
308
|
<View
|
|
197
309
|
style={
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
"borderColor": "#cb300a",
|
|
202
|
-
"borderRadius": 8,
|
|
203
|
-
"borderWidth": 2,
|
|
204
|
-
"height": 48,
|
|
205
|
-
"justifyContent": "center",
|
|
206
|
-
"width": 40,
|
|
207
|
-
},
|
|
208
|
-
undefined,
|
|
209
|
-
]
|
|
310
|
+
{
|
|
311
|
+
"flex": 1,
|
|
312
|
+
}
|
|
210
313
|
}
|
|
211
|
-
themeFocused={true}
|
|
212
|
-
themeState="error"
|
|
213
314
|
>
|
|
214
|
-
<
|
|
215
|
-
allowFontScaling={false}
|
|
315
|
+
<View
|
|
216
316
|
style={
|
|
217
317
|
[
|
|
218
318
|
{
|
|
219
|
-
"
|
|
220
|
-
"
|
|
221
|
-
"
|
|
222
|
-
"
|
|
223
|
-
"
|
|
319
|
+
"alignItems": "center",
|
|
320
|
+
"borderColor": "#cb300a",
|
|
321
|
+
"borderRadius": 8,
|
|
322
|
+
"borderWidth": 2,
|
|
323
|
+
"height": 48,
|
|
324
|
+
"justifyContent": "center",
|
|
325
|
+
"width": 40,
|
|
224
326
|
},
|
|
327
|
+
undefined,
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
themeFocused={true}
|
|
331
|
+
themeState="error"
|
|
332
|
+
>
|
|
333
|
+
<Text
|
|
334
|
+
allowFontScaling={false}
|
|
335
|
+
style={
|
|
225
336
|
[
|
|
226
337
|
{
|
|
227
|
-
"color": "#
|
|
338
|
+
"color": "#001f23",
|
|
339
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
340
|
+
"fontSize": 28,
|
|
341
|
+
"letterSpacing": 0.24,
|
|
342
|
+
"lineHeight": 36,
|
|
228
343
|
},
|
|
229
|
-
|
|
230
|
-
|
|
344
|
+
[
|
|
345
|
+
{
|
|
346
|
+
"color": "#cb300a",
|
|
347
|
+
},
|
|
348
|
+
undefined,
|
|
349
|
+
],
|
|
350
|
+
]
|
|
351
|
+
}
|
|
352
|
+
themeIntent="body"
|
|
353
|
+
themeLevel="h3"
|
|
354
|
+
themeState="error"
|
|
355
|
+
themeTypeface="neutral"
|
|
356
|
+
>
|
|
357
|
+
1
|
|
358
|
+
</Text>
|
|
359
|
+
</View>
|
|
360
|
+
<View
|
|
361
|
+
pointerEvents="box-none"
|
|
362
|
+
position="bottom"
|
|
363
|
+
style={
|
|
364
|
+
[
|
|
365
|
+
{
|
|
366
|
+
"bottom": 0,
|
|
367
|
+
"elevation": 9999,
|
|
368
|
+
"flexDirection": "column-reverse",
|
|
369
|
+
"left": 0,
|
|
370
|
+
"paddingHorizontal": 24,
|
|
371
|
+
"paddingVertical": 16,
|
|
372
|
+
"position": "absolute",
|
|
373
|
+
"right": 0,
|
|
374
|
+
"top": 0,
|
|
375
|
+
},
|
|
376
|
+
undefined,
|
|
231
377
|
]
|
|
232
378
|
}
|
|
233
|
-
|
|
234
|
-
themeLevel="h3"
|
|
235
|
-
themeState="error"
|
|
236
|
-
themeTypeface="neutral"
|
|
237
|
-
>
|
|
238
|
-
1
|
|
239
|
-
</Text>
|
|
379
|
+
/>
|
|
240
380
|
</View>
|
|
241
381
|
`;
|
|
@@ -1,58 +1,25 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
3
|
exports[`StyledHiddenInput has correct width when pin length is 4 1`] = `
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"left": 0,
|
|
10
|
-
"opacity": 0,
|
|
11
|
-
"position": "absolute",
|
|
12
|
-
"top": 0,
|
|
13
|
-
"width": 208,
|
|
14
|
-
},
|
|
15
|
-
undefined,
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
themePinLength={4}
|
|
19
|
-
/>
|
|
4
|
+
{
|
|
5
|
+
"$$typeof": Symbol(react.forward_ref),
|
|
6
|
+
"render": [Function],
|
|
7
|
+
"withComponent": [Function],
|
|
8
|
+
}
|
|
20
9
|
`;
|
|
21
10
|
|
|
22
11
|
exports[`StyledHiddenInput has correct width when pin length is 6 1`] = `
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"left": 0,
|
|
29
|
-
"opacity": 0,
|
|
30
|
-
"position": "absolute",
|
|
31
|
-
"top": 0,
|
|
32
|
-
"width": 320,
|
|
33
|
-
},
|
|
34
|
-
undefined,
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
themePinLength={6}
|
|
38
|
-
/>
|
|
12
|
+
{
|
|
13
|
+
"$$typeof": Symbol(react.forward_ref),
|
|
14
|
+
"render": [Function],
|
|
15
|
+
"withComponent": [Function],
|
|
16
|
+
}
|
|
39
17
|
`;
|
|
40
18
|
|
|
41
19
|
exports[`StyledHiddenInput has correct width when pin length is 8 1`] = `
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"left": 0,
|
|
48
|
-
"opacity": 0,
|
|
49
|
-
"position": "absolute",
|
|
50
|
-
"top": 0,
|
|
51
|
-
"width": 432,
|
|
52
|
-
},
|
|
53
|
-
undefined,
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
themePinLength={8}
|
|
57
|
-
/>
|
|
20
|
+
{
|
|
21
|
+
"$$typeof": Symbol(react.forward_ref),
|
|
22
|
+
"render": [Function],
|
|
23
|
+
"withComponent": [Function],
|
|
24
|
+
}
|
|
58
25
|
`;
|