@hero-design/rn 8.0.0-rc.0 → 8.0.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/.eslintrc.js +2 -1
- package/.turbo/turbo-build.log +9 -9
- package/assets/fonts/{RebondGrotesque-Regular.otf → RebondGrotesque.otf} +0 -0
- package/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/es/index.js +437 -617
- package/lib/assets/fonts/hero-icons-mobile.ttf +0 -0
- package/lib/index.js +436 -616
- package/package.json +9 -7
- package/src/components/Alert/StyledAlert.tsx +2 -3
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +6 -12
- package/src/components/Alert/index.tsx +3 -23
- package/src/components/BottomSheet/StyledBottomSheet.tsx +0 -1
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +4 -6
- package/src/components/Box/__tests__/__snapshots__/index.spec.tsx.snap +4 -26
- package/src/components/Button/Button.tsx +7 -16
- package/src/components/Button/StyledButton.tsx +0 -46
- package/src/components/Button/__tests__/Button.spec.tsx +10 -11
- package/src/components/Button/__tests__/StyledButton.spec.tsx +0 -3
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +0 -91
- package/src/components/Card/StyledCard.tsx +2 -11
- package/src/components/Card/__tests__/StyledCard.spec.tsx +2 -14
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +0 -32
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +0 -4
- package/src/components/Card/__tests__/index.spec.tsx +1 -13
- package/src/components/Card/index.tsx +5 -26
- package/src/components/DatePicker/DatePickerAndroid.tsx +4 -0
- package/src/components/DatePicker/DatePickerIOS.tsx +9 -11
- package/src/components/DatePicker/__tests__/DatePicker.spec.tsx +4 -0
- package/src/components/DatePicker/__tests__/DatePickerAndroid.spec.tsx +4 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +3 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +31 -12
- package/src/components/DatePicker/types.ts +8 -0
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +0 -8
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +5 -7
- package/src/components/Progress/ProgressCircle.tsx +1 -1
- package/src/components/Select/Footer.tsx +2 -7
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +120 -50
- package/src/components/Select/MultiSelect/index.tsx +1 -20
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +5 -0
- package/src/components/Select/SingleSelect/index.tsx +5 -24
- package/src/components/Select/StyledSelect.tsx +1 -12
- package/src/components/Select/types.ts +1 -11
- package/src/components/Switch/StyledSwitch.tsx +7 -12
- package/src/components/Switch/__tests__/StyledSwitch.spec.tsx +2 -2
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +10 -15
- package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +8 -12
- package/src/components/Switch/index.tsx +6 -22
- package/src/components/Tabs/ScrollableTabs.tsx +1 -6
- package/src/components/Tabs/TabWithBadge.tsx +1 -15
- package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +3 -1
- package/src/components/Tabs/__tests__/TabWithBadge.spec.tsx +0 -12
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +4 -3
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +0 -70
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +1 -2
- package/src/components/Tabs/__tests__/index.spec.tsx +3 -1
- package/src/components/Tabs/index.tsx +12 -24
- package/src/components/Tag/StyledTag.tsx +0 -1
- package/src/components/Tag/__tests__/Tag.spec.tsx +0 -9
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +0 -40
- package/src/components/Tag/index.tsx +3 -16
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +12 -0
- package/src/components/TextInput/__tests__/index.spec.tsx +4 -2
- package/src/components/TextInput/index.tsx +7 -1
- package/src/components/TimePicker/TimePickerIOS.tsx +5 -11
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +31 -12
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +1 -1
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +9 -72
- package/src/theme/components/bottomSheet.ts +2 -3
- package/src/theme/components/select.ts +1 -5
- package/src/theme/components/switch.ts +4 -14
- package/src/theme/components/tag.ts +0 -2
- package/src/theme/global/colors/swag.ts +1 -20
- package/src/theme/global/colors/types.ts +1 -58
- package/src/theme/global/typography.ts +1 -1
- package/src/utils/hooks.ts +1 -1
- package/types/components/Accordion/AccordionItem.d.ts +0 -0
- package/types/components/Accordion/StyledAccordion.d.ts +0 -0
- package/types/components/Accordion/index.d.ts +0 -0
- package/types/components/Alert/StyledAlert.d.ts +0 -1
- package/types/components/Alert/index.d.ts +1 -6
- package/types/components/Attachment/StyledAttachment.d.ts +0 -0
- package/types/components/Attachment/index.d.ts +0 -0
- package/types/components/Avatar/Avatar.d.ts +0 -0
- package/types/components/Avatar/AvatarStack/StyledAvatarStack.d.ts +0 -0
- package/types/components/Avatar/AvatarStack/index.d.ts +0 -0
- package/types/components/Avatar/AvatarStack/utils.d.ts +0 -0
- package/types/components/Avatar/StyledAvatar.d.ts +0 -0
- package/types/components/Avatar/index.d.ts +0 -0
- package/types/components/Badge/Status.d.ts +0 -0
- package/types/components/Badge/StyledBadge.d.ts +0 -0
- package/types/components/Badge/index.d.ts +0 -0
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +0 -0
- package/types/components/BottomNavigation/index.d.ts +0 -0
- package/types/components/BottomSheet/Footer.d.ts +0 -0
- package/types/components/BottomSheet/Header.d.ts +0 -0
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +0 -0
- package/types/components/BottomSheet/index.d.ts +0 -0
- package/types/components/Box/StyledBox.d.ts +0 -0
- package/types/components/Box/config.d.ts +0 -0
- package/types/components/Box/index.d.ts +0 -0
- package/types/components/Box/types.d.ts +0 -0
- package/types/components/Button/Button.d.ts +2 -3
- package/types/components/Button/IconButton.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +0 -0
- package/types/components/Button/LoadingIndicator/index.d.ts +0 -0
- package/types/components/Button/StyledButton.d.ts +1 -1
- package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +0 -0
- package/types/components/Button/UtilityButton/index.d.ts +0 -0
- package/types/components/Button/index.d.ts +0 -0
- package/types/components/Calendar/CalendarRowItem.d.ts +0 -0
- package/types/components/Calendar/StyledCalendar.d.ts +0 -0
- package/types/components/Calendar/helpers.d.ts +0 -0
- package/types/components/Calendar/index.d.ts +0 -0
- package/types/components/Card/DataCard/StyledDataCard.d.ts +0 -0
- package/types/components/Card/DataCard/index.d.ts +0 -0
- package/types/components/Card/StyledCard.d.ts +1 -8
- package/types/components/Card/index.d.ts +2 -8
- package/types/components/Checkbox/StyledCheckbox.d.ts +0 -0
- package/types/components/Checkbox/index.d.ts +0 -0
- package/types/components/Collapse/StyledCollapse.d.ts +0 -0
- package/types/components/Collapse/index.d.ts +0 -0
- package/types/components/ContentNavigator/StyledContentNavigator.d.ts +0 -0
- package/types/components/ContentNavigator/index.d.ts +0 -0
- package/types/components/DatePicker/DatePickerAndroid.d.ts +1 -1
- package/types/components/DatePicker/DatePickerIOS.d.ts +1 -1
- package/types/components/DatePicker/StyledDatePicker.d.ts +0 -0
- package/types/components/DatePicker/index.d.ts +0 -0
- package/types/components/DatePicker/types.d.ts +8 -0
- package/types/components/Divider/StyledDivider.d.ts +0 -0
- package/types/components/Divider/index.d.ts +0 -0
- package/types/components/Drawer/DragableDrawer/helpers.d.ts +0 -0
- package/types/components/Drawer/DragableDrawer/index.d.ts +0 -0
- package/types/components/Drawer/StyledDrawer.d.ts +0 -0
- package/types/components/Drawer/index.d.ts +0 -0
- package/types/components/Empty/StyledEmpty.d.ts +0 -0
- package/types/components/Empty/index.d.ts +0 -0
- package/types/components/FAB/ActionGroup/ActionItem.d.ts +0 -0
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +0 -0
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +0 -0
- package/types/components/FAB/ActionGroup/index.d.ts +0 -0
- package/types/components/FAB/AnimatedFABIcon.d.ts +0 -0
- package/types/components/FAB/FAB.d.ts +0 -0
- package/types/components/FAB/StyledFAB.d.ts +0 -0
- package/types/components/FAB/index.d.ts +0 -0
- package/types/components/Icon/AnimatedIcon.d.ts +0 -0
- package/types/components/Icon/HeroIcon/index.d.ts +0 -0
- 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/Image/index.d.ts +0 -0
- package/types/components/List/BasicListItem.d.ts +0 -0
- package/types/components/List/ListItem.d.ts +0 -0
- package/types/components/List/StyledBasicListItem.d.ts +0 -0
- package/types/components/List/StyledListItem.d.ts +0 -0
- package/types/components/List/index.d.ts +0 -0
- package/types/components/PinInput/PinCell.d.ts +0 -0
- package/types/components/PinInput/StyledPinInput.d.ts +0 -0
- package/types/components/PinInput/index.d.ts +0 -0
- package/types/components/Progress/ProgressBar.d.ts +0 -0
- package/types/components/Progress/ProgressCircle.d.ts +0 -0
- package/types/components/Progress/StyledProgressBar.d.ts +0 -0
- package/types/components/Progress/StyledProgressCircle.d.ts +0 -0
- package/types/components/Progress/__tests__/index.spec.d.ts +0 -0
- package/types/components/Progress/constants.d.ts +0 -0
- package/types/components/Progress/index.d.ts +0 -0
- package/types/components/Progress/types.d.ts +0 -0
- package/types/components/Radio/Radio.d.ts +0 -0
- package/types/components/Radio/RadioGroup.d.ts +0 -0
- package/types/components/Radio/StyledRadio.d.ts +0 -0
- package/types/components/Radio/index.d.ts +0 -0
- package/types/components/Radio/types.d.ts +0 -0
- package/types/components/RefreshControl/index.d.ts +0 -0
- package/types/components/RichTextEditor/EditorEvent.d.ts +0 -0
- package/types/components/RichTextEditor/EditorToolbar.d.ts +0 -0
- package/types/components/RichTextEditor/MentionList.d.ts +0 -0
- package/types/components/RichTextEditor/RichTextEditor.d.ts +0 -0
- package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +0 -0
- package/types/components/RichTextEditor/StyledToolbar.d.ts +0 -0
- package/types/components/RichTextEditor/__mocks__/heroEditorApp.d.ts +0 -0
- package/types/components/RichTextEditor/constants.d.ts +0 -0
- package/types/components/RichTextEditor/heroEditorApp.d.ts +0 -0
- package/types/components/RichTextEditor/index.d.ts +0 -0
- package/types/components/RichTextEditor/types.d.ts +0 -0
- package/types/components/RichTextEditor/utils/events.d.ts +0 -0
- package/types/components/RichTextEditor/utils/rnWebView.d.ts +0 -0
- package/types/components/SectionHeading/StyledHeading.d.ts +0 -0
- package/types/components/SectionHeading/index.d.ts +0 -0
- package/types/components/Select/BaseOptionList.d.ts +0 -0
- package/types/components/Select/Footer.d.ts +0 -0
- package/types/components/Select/MultiSelect/Option.d.ts +0 -0
- package/types/components/Select/MultiSelect/OptionList.d.ts +0 -0
- package/types/components/Select/MultiSelect/index.d.ts +1 -1
- package/types/components/Select/SingleSelect/Option.d.ts +0 -0
- package/types/components/Select/SingleSelect/OptionList.d.ts +0 -0
- package/types/components/Select/SingleSelect/StyledSingleSelect.d.ts +0 -0
- package/types/components/Select/SingleSelect/index.d.ts +1 -1
- package/types/components/Select/StyledSelect.d.ts +1 -5
- package/types/components/Select/helpers.d.ts +0 -0
- package/types/components/Select/index.d.ts +1 -1
- package/types/components/Select/types.d.ts +1 -11
- package/types/components/Slider/index.d.ts +0 -0
- package/types/components/Spinner/AnimatedSpinner.d.ts +0 -0
- package/types/components/Spinner/StyledSpinner.d.ts +0 -0
- package/types/components/Spinner/index.d.ts +0 -0
- package/types/components/Swipeable/StyledSwipeable.d.ts +0 -0
- package/types/components/Swipeable/SwipeableAction.d.ts +0 -0
- package/types/components/Swipeable/index.d.ts +0 -0
- package/types/components/Switch/SelectorSwitch/Option.d.ts +0 -0
- package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +0 -0
- package/types/components/Switch/SelectorSwitch/index.d.ts +0 -0
- package/types/components/Switch/StyledSwitch.d.ts +0 -4
- package/types/components/Switch/index.d.ts +1 -6
- package/types/components/Tabs/ActiveTabIndicator.d.ts +0 -0
- package/types/components/Tabs/ScrollableTabs.d.ts +0 -0
- package/types/components/Tabs/StyledScrollableTabs.d.ts +0 -0
- package/types/components/Tabs/StyledTabs.d.ts +0 -0
- package/types/components/Tabs/TabWithBadge.d.ts +1 -2
- package/types/components/Tabs/index.d.ts +2 -3
- package/types/components/Tabs/utils.d.ts +0 -0
- package/types/components/Tag/StyledTag.d.ts +1 -1
- package/types/components/Tag/index.d.ts +2 -2
- package/types/components/TextInput/StyledTextInput.d.ts +0 -0
- package/types/components/TextInput/index.d.ts +0 -0
- package/types/components/TimePicker/StyledTimePicker.d.ts +0 -0
- package/types/components/TimePicker/TimePickerAndroid.d.ts +0 -0
- package/types/components/TimePicker/TimePickerIOS.d.ts +0 -0
- package/types/components/TimePicker/index.d.ts +0 -0
- package/types/components/TimePicker/types.d.ts +0 -0
- package/types/components/Toast/StyledToast.d.ts +0 -0
- package/types/components/Toast/Toast.d.ts +0 -0
- package/types/components/Toast/ToastContainer.d.ts +0 -0
- package/types/components/Toast/ToastContext.d.ts +0 -0
- package/types/components/Toast/ToastProvider.d.ts +0 -0
- package/types/components/Toast/index.d.ts +0 -0
- package/types/components/Toast/types.d.ts +0 -0
- package/types/components/Toolbar/StyledToolbar.d.ts +0 -0
- package/types/components/Toolbar/ToolbarGroup.d.ts +0 -0
- package/types/components/Toolbar/ToolbarItem.d.ts +0 -0
- package/types/components/Toolbar/index.d.ts +0 -0
- package/types/components/Typography/Text/StyledText.d.ts +0 -0
- package/types/components/Typography/Text/index.d.ts +0 -0
- package/types/components/Typography/index.d.ts +0 -0
- package/types/index.d.ts +0 -0
- package/types/testHelpers/renderWithTheme.d.ts +0 -0
- package/types/theme/ThemeProvider.d.ts +0 -0
- package/types/theme/ThemeSwitcher.d.ts +0 -0
- package/types/theme/components/accordion.d.ts +0 -0
- package/types/theme/components/alert.d.ts +0 -0
- package/types/theme/components/attachment.d.ts +0 -0
- package/types/theme/components/avatar.d.ts +0 -0
- package/types/theme/components/badge.d.ts +0 -0
- package/types/theme/components/bottomNavigation.d.ts +0 -0
- package/types/theme/components/bottomSheet.d.ts +0 -1
- package/types/theme/components/button.d.ts +0 -0
- package/types/theme/components/calendar.d.ts +0 -0
- package/types/theme/components/card.d.ts +0 -0
- package/types/theme/components/checkbox.d.ts +0 -0
- package/types/theme/components/contentNavigator.d.ts +0 -0
- package/types/theme/components/datePicker.d.ts +0 -0
- package/types/theme/components/divider.d.ts +0 -0
- package/types/theme/components/drawer.d.ts +0 -0
- package/types/theme/components/empty.d.ts +0 -0
- package/types/theme/components/fab.d.ts +0 -0
- package/types/theme/components/icon.d.ts +0 -0
- package/types/theme/components/image.d.ts +0 -0
- package/types/theme/components/list.d.ts +0 -0
- package/types/theme/components/pinInput.d.ts +0 -0
- package/types/theme/components/progress.d.ts +0 -0
- package/types/theme/components/radio.d.ts +0 -0
- package/types/theme/components/refreshControl.d.ts +0 -0
- package/types/theme/components/richTextEditor.d.ts +0 -0
- package/types/theme/components/sectionHeading.d.ts +0 -0
- package/types/theme/components/select.d.ts +0 -3
- package/types/theme/components/slider.d.ts +0 -0
- package/types/theme/components/spinner.d.ts +0 -0
- package/types/theme/components/swipeable.d.ts +0 -0
- package/types/theme/components/switch.d.ts +4 -14
- package/types/theme/components/tabs.d.ts +0 -0
- package/types/theme/components/tag.d.ts +0 -2
- package/types/theme/components/textInput.d.ts +0 -0
- package/types/theme/components/timePicker.d.ts +0 -0
- package/types/theme/components/toast.d.ts +0 -0
- package/types/theme/components/toolbar.d.ts +0 -0
- package/types/theme/components/typography.d.ts +0 -0
- package/types/theme/getTheme.d.ts +0 -0
- package/types/theme/global/borders.d.ts +0 -0
- package/types/theme/global/colors/eBens.d.ts +0 -0
- package/types/theme/global/colors/global.d.ts +0 -0
- package/types/theme/global/colors/jobs.d.ts +0 -0
- package/types/theme/global/colors/swag.d.ts +0 -0
- package/types/theme/global/colors/types.d.ts +1 -52
- package/types/theme/global/colors/wallet.d.ts +0 -0
- package/types/theme/global/colors/work.d.ts +0 -0
- package/types/theme/global/index.d.ts +0 -47
- package/types/theme/global/scale.d.ts +0 -0
- package/types/theme/global/sizes.d.ts +0 -0
- package/types/theme/global/space.d.ts +0 -0
- package/types/theme/global/typography.d.ts +0 -0
- package/types/theme/index.d.ts +0 -0
- package/types/types.d.ts +0 -0
- package/types/utils/functions.d.ts +0 -0
- package/types/utils/helpers.d.ts +0 -0
- package/types/utils/hooks.d.ts +0 -0
- package/types/utils/scale.d.ts +0 -0
- package/.expo/README.md +0 -15
- package/.expo/packager-info.json +0 -10
- package/.expo/prebuild/cached-packages.json +0 -4
- package/.expo/settings.json +0 -10
- package/.expo/xcodebuild-error.log +0 -2
- package/.expo/xcodebuild.log +0 -11199
- package/.turbo/turbo-build:types.log +0 -2
- package/.turbo/turbo-build:watch.log +0 -1
- package/.turbo/turbo-lint.log +0 -96
- package/.turbo/turbo-test.log +0 -909
- package/src/components/Select/__tests__/StyledSelect.spec.tsx +0 -14
- package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +0 -29
- package/src/theme/__tests__/ensureCompatibleWithV7.spec.tsx +0 -13
- package/src/theme/global/colors/legacySystemPalette.ts +0 -53
- package/types/components/Accordion/utils.d.ts +0 -1
- package/types/components/Select/StyledOptionList.d.ts +0 -12
- package/types/theme/global/colors/legacySystemPalette.d.ts +0 -3
- package/types/theme/utils.d.ts +0 -2
|
@@ -142,6 +142,7 @@ Array [
|
|
|
142
142
|
onBlur={[Function]}
|
|
143
143
|
onChangeText={[Function]}
|
|
144
144
|
onFocus={[Function]}
|
|
145
|
+
placeholder=" "
|
|
145
146
|
pointerEvents="none"
|
|
146
147
|
style={
|
|
147
148
|
Array [
|
|
@@ -1277,9 +1278,8 @@ Array [
|
|
|
1277
1278
|
"alignItems": "center",
|
|
1278
1279
|
"flexDirection": "row",
|
|
1279
1280
|
"justifyContent": "flex-end",
|
|
1280
|
-
"
|
|
1281
|
-
"
|
|
1282
|
-
"paddingVertical": 16,
|
|
1281
|
+
"paddingHorizontal": 12,
|
|
1282
|
+
"paddingVertical": 2,
|
|
1283
1283
|
},
|
|
1284
1284
|
undefined,
|
|
1285
1285
|
]
|
|
@@ -1297,32 +1297,46 @@ Array [
|
|
|
1297
1297
|
onStartShouldSetResponder={[Function]}
|
|
1298
1298
|
style={
|
|
1299
1299
|
Object {
|
|
1300
|
+
"alignItems": "center",
|
|
1301
|
+
"borderWidth": 0,
|
|
1302
|
+
"flexDirection": "row",
|
|
1303
|
+
"justifyContent": "center",
|
|
1300
1304
|
"opacity": 1,
|
|
1305
|
+
"padding": 16,
|
|
1301
1306
|
}
|
|
1302
1307
|
}
|
|
1303
1308
|
>
|
|
1304
1309
|
<Text
|
|
1310
|
+
disabled={false}
|
|
1311
|
+
ellipsizeMode="tail"
|
|
1312
|
+
numberOfLines={1}
|
|
1305
1313
|
style={
|
|
1306
1314
|
Array [
|
|
1307
1315
|
Object {
|
|
1308
1316
|
"color": "#001f23",
|
|
1309
|
-
"fontFamily": "BeVietnamPro-
|
|
1310
|
-
"fontSize":
|
|
1311
|
-
"letterSpacing": 0.
|
|
1312
|
-
"lineHeight":
|
|
1317
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
1318
|
+
"fontSize": 14,
|
|
1319
|
+
"letterSpacing": 0.42,
|
|
1320
|
+
"lineHeight": 22,
|
|
1313
1321
|
},
|
|
1314
1322
|
Array [
|
|
1315
1323
|
Object {
|
|
1316
|
-
"color": "#
|
|
1324
|
+
"color": "#401960",
|
|
1325
|
+
"flexShrink": 1,
|
|
1326
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
1327
|
+
"fontSize": 16,
|
|
1328
|
+
"lineHeight": 24,
|
|
1329
|
+
"textAlign": "center",
|
|
1317
1330
|
},
|
|
1318
1331
|
undefined,
|
|
1319
1332
|
],
|
|
1320
1333
|
]
|
|
1321
1334
|
}
|
|
1322
|
-
themeFontSize="
|
|
1323
|
-
themeFontWeight="
|
|
1335
|
+
themeFontSize="medium"
|
|
1336
|
+
themeFontWeight="regular"
|
|
1324
1337
|
themeIntent="body"
|
|
1325
1338
|
themeTypeface="neutral"
|
|
1339
|
+
themeVariant="text-primary"
|
|
1326
1340
|
>
|
|
1327
1341
|
Confirm
|
|
1328
1342
|
</Text>
|
|
@@ -1475,6 +1489,7 @@ Array [
|
|
|
1475
1489
|
onBlur={[Function]}
|
|
1476
1490
|
onChangeText={[Function]}
|
|
1477
1491
|
onFocus={[Function]}
|
|
1492
|
+
placeholder=" "
|
|
1478
1493
|
pointerEvents="none"
|
|
1479
1494
|
style={
|
|
1480
1495
|
Array [
|
|
@@ -2788,9 +2803,8 @@ Array [
|
|
|
2788
2803
|
"alignItems": "center",
|
|
2789
2804
|
"flexDirection": "row",
|
|
2790
2805
|
"justifyContent": "flex-end",
|
|
2791
|
-
"
|
|
2792
|
-
"
|
|
2793
|
-
"paddingVertical": 16,
|
|
2806
|
+
"paddingHorizontal": 12,
|
|
2807
|
+
"paddingVertical": 2,
|
|
2794
2808
|
},
|
|
2795
2809
|
undefined,
|
|
2796
2810
|
]
|
|
@@ -2810,32 +2824,46 @@ Array [
|
|
|
2810
2824
|
onStartShouldSetResponder={[Function]}
|
|
2811
2825
|
style={
|
|
2812
2826
|
Object {
|
|
2827
|
+
"alignItems": "center",
|
|
2828
|
+
"borderWidth": 0,
|
|
2829
|
+
"flexDirection": "row",
|
|
2830
|
+
"justifyContent": "center",
|
|
2813
2831
|
"opacity": 1,
|
|
2832
|
+
"padding": 16,
|
|
2814
2833
|
}
|
|
2815
2834
|
}
|
|
2816
2835
|
>
|
|
2817
2836
|
<Text
|
|
2837
|
+
disabled={false}
|
|
2838
|
+
ellipsizeMode="tail"
|
|
2839
|
+
numberOfLines={1}
|
|
2818
2840
|
style={
|
|
2819
2841
|
Array [
|
|
2820
2842
|
Object {
|
|
2821
2843
|
"color": "#001f23",
|
|
2822
|
-
"fontFamily": "BeVietnamPro-
|
|
2823
|
-
"fontSize":
|
|
2824
|
-
"letterSpacing": 0.
|
|
2825
|
-
"lineHeight":
|
|
2844
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
2845
|
+
"fontSize": 14,
|
|
2846
|
+
"letterSpacing": 0.42,
|
|
2847
|
+
"lineHeight": 22,
|
|
2826
2848
|
},
|
|
2827
2849
|
Array [
|
|
2828
2850
|
Object {
|
|
2829
|
-
"color": "#
|
|
2851
|
+
"color": "#401960",
|
|
2852
|
+
"flexShrink": 1,
|
|
2853
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
2854
|
+
"fontSize": 16,
|
|
2855
|
+
"lineHeight": 24,
|
|
2856
|
+
"textAlign": "center",
|
|
2830
2857
|
},
|
|
2831
2858
|
undefined,
|
|
2832
2859
|
],
|
|
2833
2860
|
]
|
|
2834
2861
|
}
|
|
2835
|
-
themeFontSize="
|
|
2836
|
-
themeFontWeight="
|
|
2862
|
+
themeFontSize="medium"
|
|
2863
|
+
themeFontWeight="regular"
|
|
2837
2864
|
themeIntent="body"
|
|
2838
2865
|
themeTypeface="neutral"
|
|
2866
|
+
themeVariant="text-primary"
|
|
2839
2867
|
>
|
|
2840
2868
|
Confirm
|
|
2841
2869
|
</Text>
|
|
@@ -2986,6 +3014,7 @@ Array [
|
|
|
2986
3014
|
onBlur={[Function]}
|
|
2987
3015
|
onChangeText={[Function]}
|
|
2988
3016
|
onFocus={[Function]}
|
|
3017
|
+
placeholder=" "
|
|
2989
3018
|
pointerEvents="none"
|
|
2990
3019
|
style={
|
|
2991
3020
|
Array [
|
|
@@ -4280,9 +4309,8 @@ Array [
|
|
|
4280
4309
|
"alignItems": "center",
|
|
4281
4310
|
"flexDirection": "row",
|
|
4282
4311
|
"justifyContent": "flex-end",
|
|
4283
|
-
"
|
|
4284
|
-
"
|
|
4285
|
-
"paddingVertical": 16,
|
|
4312
|
+
"paddingHorizontal": 12,
|
|
4313
|
+
"paddingVertical": 2,
|
|
4286
4314
|
},
|
|
4287
4315
|
undefined,
|
|
4288
4316
|
]
|
|
@@ -4300,32 +4328,46 @@ Array [
|
|
|
4300
4328
|
onStartShouldSetResponder={[Function]}
|
|
4301
4329
|
style={
|
|
4302
4330
|
Object {
|
|
4331
|
+
"alignItems": "center",
|
|
4332
|
+
"borderWidth": 0,
|
|
4333
|
+
"flexDirection": "row",
|
|
4334
|
+
"justifyContent": "center",
|
|
4303
4335
|
"opacity": 1,
|
|
4336
|
+
"padding": 16,
|
|
4304
4337
|
}
|
|
4305
4338
|
}
|
|
4306
4339
|
>
|
|
4307
4340
|
<Text
|
|
4341
|
+
disabled={false}
|
|
4342
|
+
ellipsizeMode="tail"
|
|
4343
|
+
numberOfLines={1}
|
|
4308
4344
|
style={
|
|
4309
4345
|
Array [
|
|
4310
4346
|
Object {
|
|
4311
4347
|
"color": "#001f23",
|
|
4312
|
-
"fontFamily": "BeVietnamPro-
|
|
4313
|
-
"fontSize":
|
|
4314
|
-
"letterSpacing": 0.
|
|
4315
|
-
"lineHeight":
|
|
4348
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
4349
|
+
"fontSize": 14,
|
|
4350
|
+
"letterSpacing": 0.42,
|
|
4351
|
+
"lineHeight": 22,
|
|
4316
4352
|
},
|
|
4317
4353
|
Array [
|
|
4318
4354
|
Object {
|
|
4319
|
-
"color": "#
|
|
4355
|
+
"color": "#401960",
|
|
4356
|
+
"flexShrink": 1,
|
|
4357
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
4358
|
+
"fontSize": 16,
|
|
4359
|
+
"lineHeight": 24,
|
|
4360
|
+
"textAlign": "center",
|
|
4320
4361
|
},
|
|
4321
4362
|
undefined,
|
|
4322
4363
|
],
|
|
4323
4364
|
]
|
|
4324
4365
|
}
|
|
4325
|
-
themeFontSize="
|
|
4326
|
-
themeFontWeight="
|
|
4366
|
+
themeFontSize="medium"
|
|
4367
|
+
themeFontWeight="regular"
|
|
4327
4368
|
themeIntent="body"
|
|
4328
4369
|
themeTypeface="neutral"
|
|
4370
|
+
themeVariant="text-primary"
|
|
4329
4371
|
>
|
|
4330
4372
|
Confirm
|
|
4331
4373
|
</Text>
|
|
@@ -4478,6 +4520,7 @@ Array [
|
|
|
4478
4520
|
onBlur={[Function]}
|
|
4479
4521
|
onChangeText={[Function]}
|
|
4480
4522
|
onFocus={[Function]}
|
|
4523
|
+
placeholder=" "
|
|
4481
4524
|
pointerEvents="none"
|
|
4482
4525
|
style={
|
|
4483
4526
|
Array [
|
|
@@ -5805,9 +5848,8 @@ Array [
|
|
|
5805
5848
|
"alignItems": "center",
|
|
5806
5849
|
"flexDirection": "row",
|
|
5807
5850
|
"justifyContent": "flex-end",
|
|
5808
|
-
"
|
|
5809
|
-
"
|
|
5810
|
-
"paddingVertical": 16,
|
|
5851
|
+
"paddingHorizontal": 12,
|
|
5852
|
+
"paddingVertical": 2,
|
|
5811
5853
|
},
|
|
5812
5854
|
undefined,
|
|
5813
5855
|
]
|
|
@@ -5827,32 +5869,46 @@ Array [
|
|
|
5827
5869
|
onStartShouldSetResponder={[Function]}
|
|
5828
5870
|
style={
|
|
5829
5871
|
Object {
|
|
5872
|
+
"alignItems": "center",
|
|
5873
|
+
"borderWidth": 0,
|
|
5874
|
+
"flexDirection": "row",
|
|
5875
|
+
"justifyContent": "center",
|
|
5830
5876
|
"opacity": 1,
|
|
5877
|
+
"padding": 16,
|
|
5831
5878
|
}
|
|
5832
5879
|
}
|
|
5833
5880
|
>
|
|
5834
5881
|
<Text
|
|
5882
|
+
disabled={false}
|
|
5883
|
+
ellipsizeMode="tail"
|
|
5884
|
+
numberOfLines={1}
|
|
5835
5885
|
style={
|
|
5836
5886
|
Array [
|
|
5837
5887
|
Object {
|
|
5838
5888
|
"color": "#001f23",
|
|
5839
|
-
"fontFamily": "BeVietnamPro-
|
|
5840
|
-
"fontSize":
|
|
5841
|
-
"letterSpacing": 0.
|
|
5842
|
-
"lineHeight":
|
|
5889
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
5890
|
+
"fontSize": 14,
|
|
5891
|
+
"letterSpacing": 0.42,
|
|
5892
|
+
"lineHeight": 22,
|
|
5843
5893
|
},
|
|
5844
5894
|
Array [
|
|
5845
5895
|
Object {
|
|
5846
|
-
"color": "#
|
|
5896
|
+
"color": "#401960",
|
|
5897
|
+
"flexShrink": 1,
|
|
5898
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
5899
|
+
"fontSize": 16,
|
|
5900
|
+
"lineHeight": 24,
|
|
5901
|
+
"textAlign": "center",
|
|
5847
5902
|
},
|
|
5848
5903
|
undefined,
|
|
5849
5904
|
],
|
|
5850
5905
|
]
|
|
5851
5906
|
}
|
|
5852
|
-
themeFontSize="
|
|
5853
|
-
themeFontWeight="
|
|
5907
|
+
themeFontSize="medium"
|
|
5908
|
+
themeFontWeight="regular"
|
|
5854
5909
|
themeIntent="body"
|
|
5855
5910
|
themeTypeface="neutral"
|
|
5911
|
+
themeVariant="text-primary"
|
|
5856
5912
|
>
|
|
5857
5913
|
Confirm
|
|
5858
5914
|
</Text>
|
|
@@ -6003,6 +6059,7 @@ Array [
|
|
|
6003
6059
|
onBlur={[Function]}
|
|
6004
6060
|
onChangeText={[Function]}
|
|
6005
6061
|
onFocus={[Function]}
|
|
6062
|
+
placeholder=" "
|
|
6006
6063
|
pointerEvents="none"
|
|
6007
6064
|
style={
|
|
6008
6065
|
Array [
|
|
@@ -6939,9 +6996,8 @@ Array [
|
|
|
6939
6996
|
"alignItems": "center",
|
|
6940
6997
|
"flexDirection": "row",
|
|
6941
6998
|
"justifyContent": "flex-end",
|
|
6942
|
-
"
|
|
6943
|
-
"
|
|
6944
|
-
"paddingVertical": 16,
|
|
6999
|
+
"paddingHorizontal": 12,
|
|
7000
|
+
"paddingVertical": 2,
|
|
6945
7001
|
},
|
|
6946
7002
|
undefined,
|
|
6947
7003
|
]
|
|
@@ -6959,32 +7015,46 @@ Array [
|
|
|
6959
7015
|
onStartShouldSetResponder={[Function]}
|
|
6960
7016
|
style={
|
|
6961
7017
|
Object {
|
|
7018
|
+
"alignItems": "center",
|
|
7019
|
+
"borderWidth": 0,
|
|
7020
|
+
"flexDirection": "row",
|
|
7021
|
+
"justifyContent": "center",
|
|
6962
7022
|
"opacity": 1,
|
|
7023
|
+
"padding": 16,
|
|
6963
7024
|
}
|
|
6964
7025
|
}
|
|
6965
7026
|
>
|
|
6966
7027
|
<Text
|
|
7028
|
+
disabled={false}
|
|
7029
|
+
ellipsizeMode="tail"
|
|
7030
|
+
numberOfLines={1}
|
|
6967
7031
|
style={
|
|
6968
7032
|
Array [
|
|
6969
7033
|
Object {
|
|
6970
7034
|
"color": "#001f23",
|
|
6971
|
-
"fontFamily": "BeVietnamPro-
|
|
6972
|
-
"fontSize":
|
|
6973
|
-
"letterSpacing": 0.
|
|
6974
|
-
"lineHeight":
|
|
7035
|
+
"fontFamily": "BeVietnamPro-Regular",
|
|
7036
|
+
"fontSize": 14,
|
|
7037
|
+
"letterSpacing": 0.42,
|
|
7038
|
+
"lineHeight": 22,
|
|
6975
7039
|
},
|
|
6976
7040
|
Array [
|
|
6977
7041
|
Object {
|
|
6978
|
-
"color": "#
|
|
7042
|
+
"color": "#401960",
|
|
7043
|
+
"flexShrink": 1,
|
|
7044
|
+
"fontFamily": "BeVietnamPro-SemiBold",
|
|
7045
|
+
"fontSize": 16,
|
|
7046
|
+
"lineHeight": 24,
|
|
7047
|
+
"textAlign": "center",
|
|
6979
7048
|
},
|
|
6980
7049
|
undefined,
|
|
6981
7050
|
],
|
|
6982
7051
|
]
|
|
6983
7052
|
}
|
|
6984
|
-
themeFontSize="
|
|
6985
|
-
themeFontWeight="
|
|
7053
|
+
themeFontSize="medium"
|
|
7054
|
+
themeFontWeight="regular"
|
|
6986
7055
|
themeIntent="body"
|
|
6987
7056
|
themeTypeface="neutral"
|
|
7057
|
+
themeVariant="text-primary"
|
|
6988
7058
|
>
|
|
6989
7059
|
Confirm
|
|
6990
7060
|
</Text>
|
|
@@ -4,7 +4,6 @@ import type {
|
|
|
4
4
|
TextInputProps as NativeTextInputProps,
|
|
5
5
|
} from 'react-native';
|
|
6
6
|
import { TouchableOpacity, View } from 'react-native';
|
|
7
|
-
import { useDeprecation } from '../../../utils/hooks';
|
|
8
7
|
import BottomSheet from '../../BottomSheet';
|
|
9
8
|
import Box from '../../Box';
|
|
10
9
|
import TextInput from '../../TextInput';
|
|
@@ -56,7 +55,6 @@ function MultiSelect<V, T extends OptionType<V>>({
|
|
|
56
55
|
loading = false,
|
|
57
56
|
inputProps,
|
|
58
57
|
onConfirm,
|
|
59
|
-
onDimiss,
|
|
60
58
|
onDismiss,
|
|
61
59
|
onEndReached,
|
|
62
60
|
onQueryChange,
|
|
@@ -68,7 +66,6 @@ function MultiSelect<V, T extends OptionType<V>>({
|
|
|
68
66
|
editable = true,
|
|
69
67
|
disabled = false,
|
|
70
68
|
required,
|
|
71
|
-
numberOfLines,
|
|
72
69
|
style,
|
|
73
70
|
testID,
|
|
74
71
|
value,
|
|
@@ -84,21 +81,6 @@ function MultiSelect<V, T extends OptionType<V>>({
|
|
|
84
81
|
.map((opt) => opt.text)
|
|
85
82
|
.join(', ');
|
|
86
83
|
|
|
87
|
-
useDeprecation(
|
|
88
|
-
"Select's onDimiss is deprecated and will be removed in the next major release. Please use onDismiss instead.",
|
|
89
|
-
onDimiss !== undefined
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
useDeprecation(
|
|
93
|
-
"Select's numberOfLines is deprecated and will be removed in the next major release. Please use inputProps.numberOfLines instead.",
|
|
94
|
-
numberOfLines !== undefined
|
|
95
|
-
);
|
|
96
|
-
|
|
97
|
-
useDeprecation(
|
|
98
|
-
"Select's inputProps.required is deprecated and will be removed in the next major release. Please use Select's required prop instead.",
|
|
99
|
-
inputProps?.required !== undefined
|
|
100
|
-
);
|
|
101
|
-
|
|
102
84
|
useEffect(() => {
|
|
103
85
|
setSelectingValue(value);
|
|
104
86
|
}, [open]);
|
|
@@ -116,7 +98,6 @@ function MultiSelect<V, T extends OptionType<V>>({
|
|
|
116
98
|
}
|
|
117
99
|
<View pointerEvents="none">
|
|
118
100
|
<TextInput
|
|
119
|
-
numberOfLines={numberOfLines}
|
|
120
101
|
{...inputProps}
|
|
121
102
|
label={label}
|
|
122
103
|
value={displayedValue}
|
|
@@ -141,7 +122,7 @@ function MultiSelect<V, T extends OptionType<V>>({
|
|
|
141
122
|
<BottomSheet
|
|
142
123
|
open={open}
|
|
143
124
|
onRequestClose={() => setOpen(false)}
|
|
144
|
-
onDismiss={onDismiss
|
|
125
|
+
onDismiss={onDismiss}
|
|
145
126
|
header={label}
|
|
146
127
|
style={{
|
|
147
128
|
paddingBottom: isKeyboardVisible ? keyboardHeight : 0,
|
|
@@ -142,6 +142,7 @@ Array [
|
|
|
142
142
|
onBlur={[Function]}
|
|
143
143
|
onChangeText={[Function]}
|
|
144
144
|
onFocus={[Function]}
|
|
145
|
+
placeholder=" "
|
|
145
146
|
pointerEvents="none"
|
|
146
147
|
style={
|
|
147
148
|
Array [
|
|
@@ -1402,6 +1403,7 @@ Array [
|
|
|
1402
1403
|
onBlur={[Function]}
|
|
1403
1404
|
onChangeText={[Function]}
|
|
1404
1405
|
onFocus={[Function]}
|
|
1406
|
+
placeholder=" "
|
|
1405
1407
|
pointerEvents="none"
|
|
1406
1408
|
style={
|
|
1407
1409
|
Array [
|
|
@@ -2785,6 +2787,7 @@ Array [
|
|
|
2785
2787
|
onBlur={[Function]}
|
|
2786
2788
|
onChangeText={[Function]}
|
|
2787
2789
|
onFocus={[Function]}
|
|
2790
|
+
placeholder=" "
|
|
2788
2791
|
pointerEvents="none"
|
|
2789
2792
|
style={
|
|
2790
2793
|
Array [
|
|
@@ -4151,6 +4154,7 @@ Array [
|
|
|
4151
4154
|
onBlur={[Function]}
|
|
4152
4155
|
onChangeText={[Function]}
|
|
4153
4156
|
onFocus={[Function]}
|
|
4157
|
+
placeholder=" "
|
|
4154
4158
|
pointerEvents="none"
|
|
4155
4159
|
style={
|
|
4156
4160
|
Array [
|
|
@@ -5548,6 +5552,7 @@ Array [
|
|
|
5548
5552
|
onBlur={[Function]}
|
|
5549
5553
|
onChangeText={[Function]}
|
|
5550
5554
|
onFocus={[Function]}
|
|
5555
|
+
placeholder=" "
|
|
5551
5556
|
pointerEvents="none"
|
|
5552
5557
|
style={
|
|
5553
5558
|
Array [
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import { TouchableOpacity, View } from 'react-native';
|
|
1
|
+
import React, { useRef, useState } from 'react';
|
|
3
2
|
import type {
|
|
4
3
|
SectionList,
|
|
5
4
|
TextInputProps as NativeTextInputProps,
|
|
6
5
|
} from 'react-native';
|
|
6
|
+
import { TouchableOpacity, View } from 'react-native';
|
|
7
7
|
import BottomSheet from '../../BottomSheet';
|
|
8
|
-
import OptionList from './OptionList';
|
|
9
8
|
import TextInput from '../../TextInput';
|
|
10
|
-
import { StyledSearchBar } from '../StyledSelect';
|
|
11
9
|
import {
|
|
12
10
|
getScrollParams,
|
|
13
11
|
toFlatOptions,
|
|
14
12
|
toSections,
|
|
15
13
|
useKeyboard,
|
|
16
14
|
} from '../helpers';
|
|
15
|
+
import { StyledSearchBar } from '../StyledSelect';
|
|
17
16
|
import type { OptionType, SectionType, SelectProps } from '../types';
|
|
18
|
-
import
|
|
17
|
+
import OptionList from './OptionList';
|
|
19
18
|
|
|
20
19
|
export interface SingleSelectProps<V, T extends OptionType<V> = OptionType<V>>
|
|
21
20
|
extends SelectProps<V, T> {
|
|
@@ -41,7 +40,6 @@ const SingleSelect = <V, T extends OptionType<V>>({
|
|
|
41
40
|
loading = false,
|
|
42
41
|
inputProps,
|
|
43
42
|
onConfirm,
|
|
44
|
-
onDimiss,
|
|
45
43
|
onDismiss,
|
|
46
44
|
onEndReached,
|
|
47
45
|
onQueryChange,
|
|
@@ -53,7 +51,6 @@ const SingleSelect = <V, T extends OptionType<V>>({
|
|
|
53
51
|
editable = true,
|
|
54
52
|
disabled = false,
|
|
55
53
|
required,
|
|
56
|
-
numberOfLines,
|
|
57
54
|
style,
|
|
58
55
|
testID,
|
|
59
56
|
value,
|
|
@@ -65,21 +62,6 @@ const SingleSelect = <V, T extends OptionType<V>>({
|
|
|
65
62
|
const flatOptions = toFlatOptions(options);
|
|
66
63
|
const displayedValue = flatOptions.find((opt) => value === opt.value)?.text;
|
|
67
64
|
|
|
68
|
-
useDeprecation(
|
|
69
|
-
"Select's onDimiss is deprecated and will be removed in the next major release. Please use onDismiss instead.",
|
|
70
|
-
onDimiss !== undefined
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
useDeprecation(
|
|
74
|
-
"Select's numberOfLines is deprecated and will be removed in the next major release. Please use inputProps.numberOfLines instead.",
|
|
75
|
-
numberOfLines !== undefined
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
useDeprecation(
|
|
79
|
-
"Select's inputProps.required is deprecated and will be removed in the next major release. Please use Select's required prop instead.",
|
|
80
|
-
inputProps?.required !== undefined
|
|
81
|
-
);
|
|
82
|
-
|
|
83
65
|
return (
|
|
84
66
|
<>
|
|
85
67
|
<View
|
|
@@ -93,7 +75,6 @@ const SingleSelect = <V, T extends OptionType<V>>({
|
|
|
93
75
|
}
|
|
94
76
|
<View pointerEvents="none">
|
|
95
77
|
<TextInput
|
|
96
|
-
numberOfLines={numberOfLines}
|
|
97
78
|
{...inputProps}
|
|
98
79
|
label={label}
|
|
99
80
|
value={displayedValue}
|
|
@@ -118,7 +99,7 @@ const SingleSelect = <V, T extends OptionType<V>>({
|
|
|
118
99
|
<BottomSheet
|
|
119
100
|
open={open}
|
|
120
101
|
onRequestClose={() => setOpen(false)}
|
|
121
|
-
onDismiss={onDismiss
|
|
102
|
+
onDismiss={onDismiss}
|
|
122
103
|
header={label}
|
|
123
104
|
style={{
|
|
124
105
|
paddingBottom: isKeyboardVisible ? keyboardHeight : 0,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SectionList, View } from 'react-native';
|
|
2
2
|
import styled from '@emotion/native';
|
|
3
|
-
import Typography from '../Typography';
|
|
4
3
|
|
|
5
4
|
const SectionSpacer = styled(View)(({ theme }) => ({
|
|
6
5
|
marginTop: theme.__hd__.select.space.sectionSpacing,
|
|
@@ -10,10 +9,6 @@ const OptionSpacer = styled(View)(({ theme }) => ({
|
|
|
10
9
|
marginTop: theme.__hd__.select.space.optionSpacing,
|
|
11
10
|
}));
|
|
12
11
|
|
|
13
|
-
const FooterText = styled(Typography.Text)(({ theme }) => ({
|
|
14
|
-
color: theme.__hd__.select.colors.footerText,
|
|
15
|
-
}));
|
|
16
|
-
|
|
17
12
|
const StyledSearchBar = styled(View)(({ theme }) => ({
|
|
18
13
|
marginTop: theme.__hd__.select.space.searchBarMarginTopSpacing,
|
|
19
14
|
paddingHorizontal: theme.__hd__.select.space.searchBarHorizontalSpacing,
|
|
@@ -24,10 +19,4 @@ const StyledSectionList = styled(SectionList)(({ theme }) => ({
|
|
|
24
19
|
paddingHorizontal: theme.__hd__.select.space.optionListHorizontalPadding,
|
|
25
20
|
})) as unknown as typeof SectionList;
|
|
26
21
|
|
|
27
|
-
export {
|
|
28
|
-
SectionSpacer,
|
|
29
|
-
OptionSpacer,
|
|
30
|
-
FooterText,
|
|
31
|
-
StyledSearchBar,
|
|
32
|
-
StyledSectionList,
|
|
33
|
-
};
|
|
22
|
+
export { SectionSpacer, OptionSpacer, StyledSearchBar, StyledSectionList };
|
|
@@ -64,11 +64,6 @@ export interface SelectProps<V, T extends OptionType<V>>
|
|
|
64
64
|
* Search bar onChangeText event handler
|
|
65
65
|
*/
|
|
66
66
|
onQueryChange?: (value: string) => void;
|
|
67
|
-
/**
|
|
68
|
-
* @deprecated due to typo.
|
|
69
|
-
* Please use onDismiss instead.
|
|
70
|
-
*/
|
|
71
|
-
onDimiss?: () => void;
|
|
72
67
|
/**
|
|
73
68
|
* Event handler when selection dismiss
|
|
74
69
|
*/
|
|
@@ -86,7 +81,7 @@ export interface SelectProps<V, T extends OptionType<V>>
|
|
|
86
81
|
* Required is deprecated and will be removed in the next major release.
|
|
87
82
|
* Please use the outer required instead.
|
|
88
83
|
*/
|
|
89
|
-
inputProps?: Pick<TextInputProps, 'loading' | '
|
|
84
|
+
inputProps?: Pick<TextInputProps, 'loading' | 'numberOfLines'>;
|
|
90
85
|
/**
|
|
91
86
|
* Field label.
|
|
92
87
|
*/
|
|
@@ -99,9 +94,4 @@ export interface SelectProps<V, T extends OptionType<V>>
|
|
|
99
94
|
* Testing id of the component.
|
|
100
95
|
*/
|
|
101
96
|
testID?: string;
|
|
102
|
-
/**
|
|
103
|
-
* @deprecated
|
|
104
|
-
* Please use inputProps.numberOfLines instead.
|
|
105
|
-
*/
|
|
106
|
-
numberOfLines?: number;
|
|
107
97
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import styled from '@emotion/native';
|
|
2
2
|
import { Animated, View } from 'react-native';
|
|
3
3
|
|
|
4
|
-
type ThemeSize = 'small' | 'medium';
|
|
5
|
-
|
|
6
4
|
export type Variant =
|
|
7
5
|
| 'checked'
|
|
8
6
|
| 'unchecked'
|
|
@@ -11,22 +9,19 @@ export type Variant =
|
|
|
11
9
|
|
|
12
10
|
const StyledWrapper = styled(View)<{
|
|
13
11
|
themeVariant: Variant;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
paddingHorizontal: theme.__hd__.switch.spaces[themeSize],
|
|
12
|
+
}>(({ theme, themeVariant }) => ({
|
|
13
|
+
height: theme.__hd__.switch.sizes.height,
|
|
14
|
+
width: theme.__hd__.switch.sizes.width,
|
|
15
|
+
paddingHorizontal: theme.__hd__.switch.spaces.paddingHorizontal,
|
|
19
16
|
borderRadius: theme.__hd__.switch.radii.rounded,
|
|
20
17
|
backgroundColor: theme.__hd__.switch.colors.backgroundColors[themeVariant],
|
|
21
18
|
display: 'flex',
|
|
22
19
|
justifyContent: 'center',
|
|
23
20
|
}));
|
|
24
21
|
|
|
25
|
-
const StyledKnot = styled(Animated.View)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
width: theme.__hd__.switch.sizes.thumbs[themeSize],
|
|
29
|
-
height: theme.__hd__.switch.sizes.thumbs[themeSize],
|
|
22
|
+
const StyledKnot = styled(Animated.View)(({ theme }) => ({
|
|
23
|
+
width: theme.__hd__.switch.sizes.thumb,
|
|
24
|
+
height: theme.__hd__.switch.sizes.thumb,
|
|
30
25
|
backgroundColor: theme.__hd__.switch.colors.thumb,
|
|
31
26
|
borderRadius: theme.__hd__.switch.radii.rounded,
|
|
32
27
|
}));
|
|
@@ -11,7 +11,7 @@ describe('StyledWrapper', () => {
|
|
|
11
11
|
${'disabled-checked'}
|
|
12
12
|
`('renders correct style with variant $variant', ({ variant }) => {
|
|
13
13
|
const { toJSON } = renderWithTheme(
|
|
14
|
-
<StyledWrapper themeVariant={variant}
|
|
14
|
+
<StyledWrapper themeVariant={variant} />
|
|
15
15
|
);
|
|
16
16
|
expect(toJSON()).toMatchSnapshot();
|
|
17
17
|
});
|
|
@@ -19,7 +19,7 @@ describe('StyledWrapper', () => {
|
|
|
19
19
|
|
|
20
20
|
describe('StyledKnot', () => {
|
|
21
21
|
it('renders correct style', () => {
|
|
22
|
-
const { toJSON } = renderWithTheme(<StyledKnot
|
|
22
|
+
const { toJSON } = renderWithTheme(<StyledKnot />);
|
|
23
23
|
expect(toJSON()).toMatchSnapshot();
|
|
24
24
|
});
|
|
25
25
|
});
|