@hero-design/rn 8.12.0-rc.0 → 8.12.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 +9 -9
- package/es/index.js +57 -18
- package/lib/index.js +57 -18
- package/package.json +5 -5
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +17 -3
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +17 -3
- package/src/components/List/BasicListItem.tsx +6 -0
- package/src/components/List/ListItem.tsx +6 -0
- 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 +22 -18
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +32 -28
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +44 -36
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +50 -46
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +22 -18
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +33 -27
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +4 -0
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +11 -9
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +132 -108
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +232 -139
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +20 -0
- package/src/components/Select/MultiSelect/index.tsx +1 -1
- package/src/components/Select/SingleSelect/OptionList.tsx +8 -1
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +11 -9
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +136 -112
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +235 -142
- package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +15 -0
- package/src/components/Select/SingleSelect/index.tsx +1 -1
- package/src/components/TextInput/StyledTextInput.tsx +3 -0
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +466 -28
- package/src/components/TextInput/__tests__/index.spec.tsx +32 -0
- package/src/components/TextInput/index.tsx +32 -4
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +34 -6
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +34 -6
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +3 -3
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +3 -3
- package/src/theme/ThemeSwitcher.tsx +6 -3
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +4 -3
- package/src/theme/components/textInput.ts +1 -0
- package/src/theme/components/typography.ts +3 -3
- package/src/theme/global/colors/__tests__/__snapshots__/swagDark.spec.ts.snap +3 -3
- package/src/theme/global/colors/swagDark.ts +3 -3
- 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 -0
- package/types/components/Alert/index.d.ts +0 -0
- 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/BottomSheetContext.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/ScrollView.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 +0 -0
- 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 +0 -0
- 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 +0 -0
- package/types/components/Card/index.d.ts +0 -0
- package/types/components/Carousel/CardCarousel.d.ts +0 -0
- package/types/components/Carousel/CarouselItem.d.ts +0 -0
- package/types/components/Carousel/StyledCardCarousel.d.ts +0 -0
- package/types/components/Carousel/StyledCarousel.d.ts +0 -0
- package/types/components/Carousel/contants.d.ts +0 -0
- package/types/components/Carousel/index.d.ts +0 -0
- package/types/components/Carousel/types.d.ts +0 -0
- 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 +0 -0
- package/types/components/DatePicker/DatePickerIOS.d.ts +0 -0
- 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 +0 -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 +0 -0
- package/types/components/Icon/index.d.ts +0 -0
- package/types/components/Icon/utils.d.ts +0 -0
- 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 +3 -3
- package/types/components/List/StyledListItem.d.ts +3 -3
- package/types/components/List/index.d.ts +0 -0
- package/types/components/PageControl/StyledPageControl.d.ts +0 -0
- package/types/components/PageControl/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 +0 -0
- package/types/components/Select/SingleSelect/Option.d.ts +0 -0
- package/types/components/Select/SingleSelect/OptionList.d.ts +1 -1
- package/types/components/Select/SingleSelect/StyledSingleSelect.d.ts +0 -0
- package/types/components/Select/SingleSelect/index.d.ts +0 -0
- package/types/components/Select/StyledSelect.d.ts +0 -0
- package/types/components/Select/helpers.d.ts +0 -0
- package/types/components/Select/index.d.ts +0 -0
- package/types/components/Select/types.d.ts +0 -0
- 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 -0
- package/types/components/Switch/index.d.ts +0 -0
- 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 +0 -0
- package/types/components/Tabs/index.d.ts +0 -0
- package/types/components/Tabs/utils.d.ts +0 -0
- package/types/components/Tag/StyledTag.d.ts +0 -0
- package/types/components/Tag/index.d.ts +0 -0
- 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 +2 -2
- 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 -0
- 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/cardCarousel.d.ts +0 -0
- package/types/theme/components/carousel.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/pageControl.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 -0
- 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 +0 -0
- package/types/theme/components/tabs.d.ts +0 -0
- package/types/theme/components/tag.d.ts +0 -0
- package/types/theme/components/textInput.d.ts +1 -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/globalDark.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/swagDark.d.ts +0 -0
- package/types/theme/global/colors/types.d.ts +0 -0
- 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 -0
- 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/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
[
|
|
2
|
-
[
|
|
3
|
-
[
|
|
4
|
-
[
|
|
5
|
-
[
|
|
6
|
-
[
|
|
7
|
-
[
|
|
8
|
-
[
|
|
9
|
-
[
|
|
1
|
+
[33m@hero-design/rn:build[0m: cache hit, replaying output [2m11519c5263d6ba02[0m
|
|
2
|
+
[33m@hero-design/rn:build: [0m$ yarn build:js && yarn build:types
|
|
3
|
+
[33m@hero-design/rn:build: [0m$ rollup -c
|
|
4
|
+
[33m@hero-design/rn:build: [0m[36m
|
|
5
|
+
[33m@hero-design/rn:build: [0m[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
6
|
+
[33m@hero-design/rn:build: [0m[1m[33m(!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.[39m[22m
|
|
7
|
+
[33m@hero-design/rn:build: [0m[1m[33m(!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/root/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning[39m[22m
|
|
8
|
+
[33m@hero-design/rn:build: [0m[32mcreated [1mlib/index.js, es/index.js[22m in [1m31.5s[22m[39m
|
|
9
|
+
[33m@hero-design/rn:build: [0m$ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
|
package/es/index.js
CHANGED
|
@@ -1274,7 +1274,10 @@ var palette$2 = Object.assign(Object.assign({}, palette$8), {
|
|
|
1274
1274
|
violetLight90: violet1.lighten90,
|
|
1275
1275
|
violet: violet1.base,
|
|
1276
1276
|
mauve: mauve.base,
|
|
1277
|
+
mauveLight15: mauve.lighten15,
|
|
1277
1278
|
mauveLight30: mauve.lighten30,
|
|
1279
|
+
mauveLight40: mauve.lighten40,
|
|
1280
|
+
mauveDark65: mauve.darken65,
|
|
1278
1281
|
maasstrichtBlueLight10: maasstrichtBlue.lighten10,
|
|
1279
1282
|
maasstrichtBlueDark20: maasstrichtBlue.darken20
|
|
1280
1283
|
});
|
|
@@ -1403,11 +1406,11 @@ var globalPalette = {
|
|
|
1403
1406
|
var swagDarkBrandSystemPalette = {
|
|
1404
1407
|
primary: palette$2.mauve,
|
|
1405
1408
|
onPrimary: palette$2.maasstrichtBlue,
|
|
1406
|
-
secondary: palette$2.
|
|
1409
|
+
secondary: palette$2.mauveLight40,
|
|
1407
1410
|
onSecondary: palette$2.maasstrichtBlue,
|
|
1408
1411
|
defaultSurface: palette$2.maasstrichtBlue,
|
|
1409
|
-
highlightedSurface: palette$2.
|
|
1410
|
-
pressedSurface: palette$2.
|
|
1412
|
+
highlightedSurface: palette$2.mauveDark65,
|
|
1413
|
+
pressedSurface: palette$2.mauveLight15,
|
|
1411
1414
|
decorativePrimary: palette$2.maasstrichtBlue,
|
|
1412
1415
|
decorativePrimarySurface: palette$2.maasstrichtBlueLight10
|
|
1413
1416
|
};
|
|
@@ -2671,6 +2674,7 @@ var getTagTheme = function getTagTheme(theme) {
|
|
|
2671
2674
|
var getTextInputTheme = function getTextInputTheme(theme) {
|
|
2672
2675
|
var colors = {
|
|
2673
2676
|
labelBackground: theme.colors.defaultGlobalSurface,
|
|
2677
|
+
containerBackground: theme.colors.defaultGlobalSurface,
|
|
2674
2678
|
asterisks: {
|
|
2675
2679
|
"default": theme.colors.onErrorSurface,
|
|
2676
2680
|
error: theme.colors.onErrorSurface,
|
|
@@ -2841,9 +2845,9 @@ var getTypographyTheme = function getTypographyTheme(theme) {
|
|
|
2841
2845
|
primary: theme.colors.primary,
|
|
2842
2846
|
secondary: theme.colors.secondary,
|
|
2843
2847
|
info: theme.colors.onInfoSurface,
|
|
2844
|
-
danger: theme.colors.
|
|
2845
|
-
warning: theme.colors.
|
|
2846
|
-
success: theme.colors.
|
|
2848
|
+
danger: theme.colors.error,
|
|
2849
|
+
warning: theme.colors.warning,
|
|
2850
|
+
success: theme.colors.success,
|
|
2847
2851
|
inverted: theme.colors.onDarkGlobalSurface,
|
|
2848
2852
|
archived: theme.colors.onArchivedSurface
|
|
2849
2853
|
};
|
|
@@ -11431,7 +11435,9 @@ var StyledTextInputContainer = index$a(View)(function (_ref13) {
|
|
|
11431
11435
|
return {
|
|
11432
11436
|
flexDirection: 'row',
|
|
11433
11437
|
alignItems: 'center',
|
|
11434
|
-
padding: theme.__hd__.textInput.space.containerPadding
|
|
11438
|
+
padding: theme.__hd__.textInput.space.containerPadding,
|
|
11439
|
+
backgroundColor: theme.__hd__.textInput.colors.containerBackground,
|
|
11440
|
+
borderRadius: theme.__hd__.textInput.radii.container
|
|
11435
11441
|
};
|
|
11436
11442
|
});
|
|
11437
11443
|
var StyledTextInputAndLabelContainer = index$a(View)(function () {
|
|
@@ -11565,8 +11571,24 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
11565
11571
|
}, [textStyle]),
|
|
11566
11572
|
borderStyle = _useMemo.borderStyle,
|
|
11567
11573
|
textStyleWithoutBorderStyle = _useMemo.textStyleWithoutBorderStyle;
|
|
11574
|
+
var _useMemo2 = useMemo(function () {
|
|
11575
|
+
var _flattenTextStyle$bac;
|
|
11576
|
+
if (!style) {
|
|
11577
|
+
return {
|
|
11578
|
+
backgroundColor: theme.__hd__.textInput.colors.containerBackground
|
|
11579
|
+
};
|
|
11580
|
+
}
|
|
11581
|
+
var flattenTextStyle = StyleSheet$1.flatten(style);
|
|
11582
|
+
return {
|
|
11583
|
+
backgroundColor: (_flattenTextStyle$bac = flattenTextStyle.backgroundColor) !== null && _flattenTextStyle$bac !== void 0 ? _flattenTextStyle$bac : theme.__hd__.textInput.colors.containerBackground,
|
|
11584
|
+
styleWithoutBackgroundColor: omit(['backgroundColor'], flattenTextStyle)
|
|
11585
|
+
};
|
|
11586
|
+
}, [style, theme]),
|
|
11587
|
+
backgroundColor = _useMemo2.backgroundColor,
|
|
11588
|
+
styleWithoutBackgroundColor = _useMemo2.styleWithoutBackgroundColor;
|
|
11568
11589
|
var nativeInputProps = _objectSpread2(_objectSpread2({
|
|
11569
11590
|
style: StyleSheet$1.flatten([{
|
|
11591
|
+
backgroundColor: backgroundColor,
|
|
11570
11592
|
color: theme.__hd__.textInput.colors.text
|
|
11571
11593
|
}, textStyleWithoutBorderStyle]),
|
|
11572
11594
|
testID: 'text-input',
|
|
@@ -11598,15 +11620,22 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
11598
11620
|
placeholder: isFocused || label === undefined ? nativeProps.placeholder : EMPTY_PLACEHOLDER_VALUE
|
|
11599
11621
|
});
|
|
11600
11622
|
return /*#__PURE__*/React.createElement(StyledContainer$3, {
|
|
11601
|
-
style:
|
|
11623
|
+
style: styleWithoutBackgroundColor,
|
|
11602
11624
|
pointerEvents: variant === 'disabled' || variant === 'readonly' ? 'none' : 'auto',
|
|
11603
11625
|
testID: testID
|
|
11604
11626
|
}, /*#__PURE__*/React.createElement(StyledTextInputContainer, null, /*#__PURE__*/React.createElement(StyledBorderBackDrop, {
|
|
11605
11627
|
themeFocused: isFocused,
|
|
11606
11628
|
themeVariant: variant,
|
|
11607
|
-
|
|
11629
|
+
testID: "text-input-border",
|
|
11630
|
+
style: [{
|
|
11631
|
+
backgroundColor: backgroundColor
|
|
11632
|
+
}, borderStyle]
|
|
11608
11633
|
}), (isFocused || label && !isEmptyValue) && /*#__PURE__*/React.createElement(StyledLabelContainer, {
|
|
11609
|
-
pointerEvents: "none"
|
|
11634
|
+
pointerEvents: "none",
|
|
11635
|
+
testID: "label-container",
|
|
11636
|
+
style: {
|
|
11637
|
+
backgroundColor: backgroundColor
|
|
11638
|
+
}
|
|
11610
11639
|
}, required && /*#__PURE__*/React.createElement(StyledAsteriskLabel, {
|
|
11611
11640
|
themeVariant: variant,
|
|
11612
11641
|
fontSize: "small"
|
|
@@ -11614,7 +11643,10 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
|
11614
11643
|
nativeID: accessibilityLabelledBy,
|
|
11615
11644
|
testID: "input-label",
|
|
11616
11645
|
fontSize: "small",
|
|
11617
|
-
themeVariant: variant
|
|
11646
|
+
themeVariant: variant,
|
|
11647
|
+
style: {
|
|
11648
|
+
backgroundColor: backgroundColor
|
|
11649
|
+
}
|
|
11618
11650
|
}, label)), typeof prefix === 'string' ? /*#__PURE__*/React.createElement(Icon, {
|
|
11619
11651
|
intent: variant === 'disabled' ? 'disabled-text' : 'text',
|
|
11620
11652
|
testID: "input-prefix",
|
|
@@ -12434,7 +12466,7 @@ var index$6 = Object.assign(FAB, {
|
|
|
12434
12466
|
ActionGroup: ActionGroup
|
|
12435
12467
|
});
|
|
12436
12468
|
|
|
12437
|
-
var StyledListItemContainer$1 = index$a(
|
|
12469
|
+
var StyledListItemContainer$1 = index$a(TouchableHighlight)(function (_ref) {
|
|
12438
12470
|
var theme = _ref.theme,
|
|
12439
12471
|
_ref$themeSelected = _ref.themeSelected,
|
|
12440
12472
|
themeSelected = _ref$themeSelected === void 0 ? false : _ref$themeSelected,
|
|
@@ -12520,13 +12552,15 @@ var ListItem = function ListItem(_ref) {
|
|
|
12520
12552
|
onPress = _ref.onPress,
|
|
12521
12553
|
_ref$disabled = _ref.disabled,
|
|
12522
12554
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
|
12555
|
+
var theme = useTheme();
|
|
12523
12556
|
return /*#__PURE__*/React.createElement(StyledListItemContainer$1, {
|
|
12524
12557
|
style: style,
|
|
12525
12558
|
testID: testID,
|
|
12526
12559
|
themeSelected: selected,
|
|
12527
12560
|
themeVariant: variant,
|
|
12528
12561
|
onPress: onPress,
|
|
12529
|
-
disabled: disabled
|
|
12562
|
+
disabled: disabled,
|
|
12563
|
+
underlayColor: theme.__hd__.list.colors.checkedListItemContainerBackground
|
|
12530
12564
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, leadingStatus && /*#__PURE__*/React.createElement(StyledLeadingStatus, {
|
|
12531
12565
|
themeLeadingStatusIntent: leadingStatus,
|
|
12532
12566
|
testID: "leadingStatus"
|
|
@@ -12568,7 +12602,7 @@ var StyledTitleContainer = index$a(View)(function () {
|
|
|
12568
12602
|
flex: 1
|
|
12569
12603
|
};
|
|
12570
12604
|
});
|
|
12571
|
-
var StyledListItemContainer = index$a(
|
|
12605
|
+
var StyledListItemContainer = index$a(TouchableHighlight)(function (_ref3) {
|
|
12572
12606
|
var theme = _ref3.theme,
|
|
12573
12607
|
themeSelected = _ref3.themeSelected,
|
|
12574
12608
|
themeDisabled = _ref3.themeDisabled;
|
|
@@ -12594,13 +12628,15 @@ var BasicListItem = function BasicListItem(_ref) {
|
|
|
12594
12628
|
_ref$disabled = _ref.disabled,
|
|
12595
12629
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
12596
12630
|
onPress = _ref.onPress;
|
|
12631
|
+
var theme = useTheme();
|
|
12597
12632
|
return /*#__PURE__*/React.createElement(StyledListItemContainer, {
|
|
12598
12633
|
style: style,
|
|
12599
12634
|
testID: testID,
|
|
12600
12635
|
themeSelected: selected,
|
|
12601
12636
|
themeDisabled: disabled,
|
|
12602
12637
|
onPress: onPress,
|
|
12603
|
-
disabled: disabled
|
|
12638
|
+
disabled: disabled,
|
|
12639
|
+
underlayColor: theme.__hd__.list.colors.checkedListItemContainerBackground
|
|
12604
12640
|
}, /*#__PURE__*/React.createElement(React.Fragment, null, prefix && /*#__PURE__*/React.createElement(StyledPrefixContainer, null, typeof prefix === 'string' ? /*#__PURE__*/React.createElement(Icon, {
|
|
12605
12641
|
icon: prefix,
|
|
12606
12642
|
intent: disabled ? 'disabled-text' : 'primary'
|
|
@@ -13812,7 +13848,7 @@ function MultiSelect(_ref) {
|
|
|
13812
13848
|
pointerEvents: "none",
|
|
13813
13849
|
style: style,
|
|
13814
13850
|
testID: testID,
|
|
13815
|
-
renderInputValue: renderSelectedValue !== undefined ? function (props) {
|
|
13851
|
+
renderInputValue: renderSelectedValue !== undefined && (displayedValue === null || displayedValue === void 0 ? void 0 : displayedValue.length) > 0 ? function (props) {
|
|
13816
13852
|
return renderSelectedValue(value, props);
|
|
13817
13853
|
} : undefined
|
|
13818
13854
|
}))))), /*#__PURE__*/React.createElement(BottomSheet$1, {
|
|
@@ -13939,7 +13975,10 @@ var OptionList = function OptionList(_ref) {
|
|
|
13939
13975
|
onQueryChange: onQueryChange,
|
|
13940
13976
|
sections: sections,
|
|
13941
13977
|
renderItem: renderItem,
|
|
13942
|
-
sectionListRef: sectionListRef
|
|
13978
|
+
sectionListRef: sectionListRef,
|
|
13979
|
+
style: _objectSpread2({}, onQueryChange ? {
|
|
13980
|
+
height: Dimensions.get('screen').height
|
|
13981
|
+
} : {})
|
|
13943
13982
|
}, rest));
|
|
13944
13983
|
};
|
|
13945
13984
|
|
|
@@ -13999,7 +14038,7 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
13999
14038
|
pointerEvents: "none",
|
|
14000
14039
|
style: style,
|
|
14001
14040
|
testID: testID,
|
|
14002
|
-
renderInputValue: renderSelectedValue !== undefined ? function (props) {
|
|
14041
|
+
renderInputValue: renderSelectedValue !== undefined && !!displayedValue ? function (props) {
|
|
14003
14042
|
return renderSelectedValue(value, props);
|
|
14004
14043
|
} : undefined
|
|
14005
14044
|
}))))), /*#__PURE__*/React.createElement(BottomSheet$1, {
|
package/lib/index.js
CHANGED
|
@@ -1303,7 +1303,10 @@ var palette$2 = Object.assign(Object.assign({}, palette$8), {
|
|
|
1303
1303
|
violetLight90: violet1.lighten90,
|
|
1304
1304
|
violet: violet1.base,
|
|
1305
1305
|
mauve: mauve.base,
|
|
1306
|
+
mauveLight15: mauve.lighten15,
|
|
1306
1307
|
mauveLight30: mauve.lighten30,
|
|
1308
|
+
mauveLight40: mauve.lighten40,
|
|
1309
|
+
mauveDark65: mauve.darken65,
|
|
1307
1310
|
maasstrichtBlueLight10: maasstrichtBlue.lighten10,
|
|
1308
1311
|
maasstrichtBlueDark20: maasstrichtBlue.darken20
|
|
1309
1312
|
});
|
|
@@ -1432,11 +1435,11 @@ var globalPalette = {
|
|
|
1432
1435
|
var swagDarkBrandSystemPalette = {
|
|
1433
1436
|
primary: palette$2.mauve,
|
|
1434
1437
|
onPrimary: palette$2.maasstrichtBlue,
|
|
1435
|
-
secondary: palette$2.
|
|
1438
|
+
secondary: palette$2.mauveLight40,
|
|
1436
1439
|
onSecondary: palette$2.maasstrichtBlue,
|
|
1437
1440
|
defaultSurface: palette$2.maasstrichtBlue,
|
|
1438
|
-
highlightedSurface: palette$2.
|
|
1439
|
-
pressedSurface: palette$2.
|
|
1441
|
+
highlightedSurface: palette$2.mauveDark65,
|
|
1442
|
+
pressedSurface: palette$2.mauveLight15,
|
|
1440
1443
|
decorativePrimary: palette$2.maasstrichtBlue,
|
|
1441
1444
|
decorativePrimarySurface: palette$2.maasstrichtBlueLight10
|
|
1442
1445
|
};
|
|
@@ -2700,6 +2703,7 @@ var getTagTheme = function getTagTheme(theme) {
|
|
|
2700
2703
|
var getTextInputTheme = function getTextInputTheme(theme) {
|
|
2701
2704
|
var colors = {
|
|
2702
2705
|
labelBackground: theme.colors.defaultGlobalSurface,
|
|
2706
|
+
containerBackground: theme.colors.defaultGlobalSurface,
|
|
2703
2707
|
asterisks: {
|
|
2704
2708
|
"default": theme.colors.onErrorSurface,
|
|
2705
2709
|
error: theme.colors.onErrorSurface,
|
|
@@ -2870,9 +2874,9 @@ var getTypographyTheme = function getTypographyTheme(theme) {
|
|
|
2870
2874
|
primary: theme.colors.primary,
|
|
2871
2875
|
secondary: theme.colors.secondary,
|
|
2872
2876
|
info: theme.colors.onInfoSurface,
|
|
2873
|
-
danger: theme.colors.
|
|
2874
|
-
warning: theme.colors.
|
|
2875
|
-
success: theme.colors.
|
|
2877
|
+
danger: theme.colors.error,
|
|
2878
|
+
warning: theme.colors.warning,
|
|
2879
|
+
success: theme.colors.success,
|
|
2876
2880
|
inverted: theme.colors.onDarkGlobalSurface,
|
|
2877
2881
|
archived: theme.colors.onArchivedSurface
|
|
2878
2882
|
};
|
|
@@ -11460,7 +11464,9 @@ var StyledTextInputContainer = index$a(reactNative.View)(function (_ref13) {
|
|
|
11460
11464
|
return {
|
|
11461
11465
|
flexDirection: 'row',
|
|
11462
11466
|
alignItems: 'center',
|
|
11463
|
-
padding: theme.__hd__.textInput.space.containerPadding
|
|
11467
|
+
padding: theme.__hd__.textInput.space.containerPadding,
|
|
11468
|
+
backgroundColor: theme.__hd__.textInput.colors.containerBackground,
|
|
11469
|
+
borderRadius: theme.__hd__.textInput.radii.container
|
|
11464
11470
|
};
|
|
11465
11471
|
});
|
|
11466
11472
|
var StyledTextInputAndLabelContainer = index$a(reactNative.View)(function () {
|
|
@@ -11594,8 +11600,24 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
11594
11600
|
}, [textStyle]),
|
|
11595
11601
|
borderStyle = _useMemo.borderStyle,
|
|
11596
11602
|
textStyleWithoutBorderStyle = _useMemo.textStyleWithoutBorderStyle;
|
|
11603
|
+
var _useMemo2 = React.useMemo(function () {
|
|
11604
|
+
var _flattenTextStyle$bac;
|
|
11605
|
+
if (!style) {
|
|
11606
|
+
return {
|
|
11607
|
+
backgroundColor: theme.__hd__.textInput.colors.containerBackground
|
|
11608
|
+
};
|
|
11609
|
+
}
|
|
11610
|
+
var flattenTextStyle = reactNative.StyleSheet.flatten(style);
|
|
11611
|
+
return {
|
|
11612
|
+
backgroundColor: (_flattenTextStyle$bac = flattenTextStyle.backgroundColor) !== null && _flattenTextStyle$bac !== void 0 ? _flattenTextStyle$bac : theme.__hd__.textInput.colors.containerBackground,
|
|
11613
|
+
styleWithoutBackgroundColor: omit(['backgroundColor'], flattenTextStyle)
|
|
11614
|
+
};
|
|
11615
|
+
}, [style, theme]),
|
|
11616
|
+
backgroundColor = _useMemo2.backgroundColor,
|
|
11617
|
+
styleWithoutBackgroundColor = _useMemo2.styleWithoutBackgroundColor;
|
|
11597
11618
|
var nativeInputProps = _objectSpread2(_objectSpread2({
|
|
11598
11619
|
style: reactNative.StyleSheet.flatten([{
|
|
11620
|
+
backgroundColor: backgroundColor,
|
|
11599
11621
|
color: theme.__hd__.textInput.colors.text
|
|
11600
11622
|
}, textStyleWithoutBorderStyle]),
|
|
11601
11623
|
testID: 'text-input',
|
|
@@ -11627,15 +11649,22 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
11627
11649
|
placeholder: isFocused || label === undefined ? nativeProps.placeholder : EMPTY_PLACEHOLDER_VALUE
|
|
11628
11650
|
});
|
|
11629
11651
|
return /*#__PURE__*/React__default["default"].createElement(StyledContainer$3, {
|
|
11630
|
-
style:
|
|
11652
|
+
style: styleWithoutBackgroundColor,
|
|
11631
11653
|
pointerEvents: variant === 'disabled' || variant === 'readonly' ? 'none' : 'auto',
|
|
11632
11654
|
testID: testID
|
|
11633
11655
|
}, /*#__PURE__*/React__default["default"].createElement(StyledTextInputContainer, null, /*#__PURE__*/React__default["default"].createElement(StyledBorderBackDrop, {
|
|
11634
11656
|
themeFocused: isFocused,
|
|
11635
11657
|
themeVariant: variant,
|
|
11636
|
-
|
|
11658
|
+
testID: "text-input-border",
|
|
11659
|
+
style: [{
|
|
11660
|
+
backgroundColor: backgroundColor
|
|
11661
|
+
}, borderStyle]
|
|
11637
11662
|
}), (isFocused || label && !isEmptyValue) && /*#__PURE__*/React__default["default"].createElement(StyledLabelContainer, {
|
|
11638
|
-
pointerEvents: "none"
|
|
11663
|
+
pointerEvents: "none",
|
|
11664
|
+
testID: "label-container",
|
|
11665
|
+
style: {
|
|
11666
|
+
backgroundColor: backgroundColor
|
|
11667
|
+
}
|
|
11639
11668
|
}, required && /*#__PURE__*/React__default["default"].createElement(StyledAsteriskLabel, {
|
|
11640
11669
|
themeVariant: variant,
|
|
11641
11670
|
fontSize: "small"
|
|
@@ -11643,7 +11672,10 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
|
|
|
11643
11672
|
nativeID: accessibilityLabelledBy,
|
|
11644
11673
|
testID: "input-label",
|
|
11645
11674
|
fontSize: "small",
|
|
11646
|
-
themeVariant: variant
|
|
11675
|
+
themeVariant: variant,
|
|
11676
|
+
style: {
|
|
11677
|
+
backgroundColor: backgroundColor
|
|
11678
|
+
}
|
|
11647
11679
|
}, label)), typeof prefix === 'string' ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
11648
11680
|
intent: variant === 'disabled' ? 'disabled-text' : 'text',
|
|
11649
11681
|
testID: "input-prefix",
|
|
@@ -12463,7 +12495,7 @@ var index$6 = Object.assign(FAB, {
|
|
|
12463
12495
|
ActionGroup: ActionGroup
|
|
12464
12496
|
});
|
|
12465
12497
|
|
|
12466
|
-
var StyledListItemContainer$1 = index$a(reactNative.
|
|
12498
|
+
var StyledListItemContainer$1 = index$a(reactNative.TouchableHighlight)(function (_ref) {
|
|
12467
12499
|
var theme = _ref.theme,
|
|
12468
12500
|
_ref$themeSelected = _ref.themeSelected,
|
|
12469
12501
|
themeSelected = _ref$themeSelected === void 0 ? false : _ref$themeSelected,
|
|
@@ -12549,13 +12581,15 @@ var ListItem = function ListItem(_ref) {
|
|
|
12549
12581
|
onPress = _ref.onPress,
|
|
12550
12582
|
_ref$disabled = _ref.disabled,
|
|
12551
12583
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
|
12584
|
+
var theme = useTheme();
|
|
12552
12585
|
return /*#__PURE__*/React__default["default"].createElement(StyledListItemContainer$1, {
|
|
12553
12586
|
style: style,
|
|
12554
12587
|
testID: testID,
|
|
12555
12588
|
themeSelected: selected,
|
|
12556
12589
|
themeVariant: variant,
|
|
12557
12590
|
onPress: onPress,
|
|
12558
|
-
disabled: disabled
|
|
12591
|
+
disabled: disabled,
|
|
12592
|
+
underlayColor: theme.__hd__.list.colors.checkedListItemContainerBackground
|
|
12559
12593
|
}, /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, leadingStatus && /*#__PURE__*/React__default["default"].createElement(StyledLeadingStatus, {
|
|
12560
12594
|
themeLeadingStatusIntent: leadingStatus,
|
|
12561
12595
|
testID: "leadingStatus"
|
|
@@ -12597,7 +12631,7 @@ var StyledTitleContainer = index$a(reactNative.View)(function () {
|
|
|
12597
12631
|
flex: 1
|
|
12598
12632
|
};
|
|
12599
12633
|
});
|
|
12600
|
-
var StyledListItemContainer = index$a(reactNative.
|
|
12634
|
+
var StyledListItemContainer = index$a(reactNative.TouchableHighlight)(function (_ref3) {
|
|
12601
12635
|
var theme = _ref3.theme,
|
|
12602
12636
|
themeSelected = _ref3.themeSelected,
|
|
12603
12637
|
themeDisabled = _ref3.themeDisabled;
|
|
@@ -12623,13 +12657,15 @@ var BasicListItem = function BasicListItem(_ref) {
|
|
|
12623
12657
|
_ref$disabled = _ref.disabled,
|
|
12624
12658
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
12625
12659
|
onPress = _ref.onPress;
|
|
12660
|
+
var theme = useTheme();
|
|
12626
12661
|
return /*#__PURE__*/React__default["default"].createElement(StyledListItemContainer, {
|
|
12627
12662
|
style: style,
|
|
12628
12663
|
testID: testID,
|
|
12629
12664
|
themeSelected: selected,
|
|
12630
12665
|
themeDisabled: disabled,
|
|
12631
12666
|
onPress: onPress,
|
|
12632
|
-
disabled: disabled
|
|
12667
|
+
disabled: disabled,
|
|
12668
|
+
underlayColor: theme.__hd__.list.colors.checkedListItemContainerBackground
|
|
12633
12669
|
}, /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, prefix && /*#__PURE__*/React__default["default"].createElement(StyledPrefixContainer, null, typeof prefix === 'string' ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
12634
12670
|
icon: prefix,
|
|
12635
12671
|
intent: disabled ? 'disabled-text' : 'primary'
|
|
@@ -13841,7 +13877,7 @@ function MultiSelect(_ref) {
|
|
|
13841
13877
|
pointerEvents: "none",
|
|
13842
13878
|
style: style,
|
|
13843
13879
|
testID: testID,
|
|
13844
|
-
renderInputValue: renderSelectedValue !== undefined ? function (props) {
|
|
13880
|
+
renderInputValue: renderSelectedValue !== undefined && (displayedValue === null || displayedValue === void 0 ? void 0 : displayedValue.length) > 0 ? function (props) {
|
|
13845
13881
|
return renderSelectedValue(value, props);
|
|
13846
13882
|
} : undefined
|
|
13847
13883
|
}))))), /*#__PURE__*/React__default["default"].createElement(BottomSheet$1, {
|
|
@@ -13968,7 +14004,10 @@ var OptionList = function OptionList(_ref) {
|
|
|
13968
14004
|
onQueryChange: onQueryChange,
|
|
13969
14005
|
sections: sections,
|
|
13970
14006
|
renderItem: renderItem,
|
|
13971
|
-
sectionListRef: sectionListRef
|
|
14007
|
+
sectionListRef: sectionListRef,
|
|
14008
|
+
style: _objectSpread2({}, onQueryChange ? {
|
|
14009
|
+
height: reactNative.Dimensions.get('screen').height
|
|
14010
|
+
} : {})
|
|
13972
14011
|
}, rest));
|
|
13973
14012
|
};
|
|
13974
14013
|
|
|
@@ -14028,7 +14067,7 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
14028
14067
|
pointerEvents: "none",
|
|
14029
14068
|
style: style,
|
|
14030
14069
|
testID: testID,
|
|
14031
|
-
renderInputValue: renderSelectedValue !== undefined ? function (props) {
|
|
14070
|
+
renderInputValue: renderSelectedValue !== undefined && !!displayedValue ? function (props) {
|
|
14032
14071
|
return renderSelectedValue(value, props);
|
|
14033
14072
|
} : undefined
|
|
14034
14073
|
}))))), /*#__PURE__*/React__default["default"].createElement(BottomSheet$1, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hero-design/rn",
|
|
3
|
-
"version": "8.12.
|
|
3
|
+
"version": "8.12.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@emotion/native": "^11.9.3",
|
|
23
23
|
"@emotion/react": "^11.9.3",
|
|
24
|
-
"@hero-design/colors": "8.12.
|
|
24
|
+
"@hero-design/colors": "8.12.1",
|
|
25
25
|
"date-fns": "^2.16.1",
|
|
26
26
|
"events": "^3.2.0",
|
|
27
27
|
"hero-editor": "^1.9.21"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@babel/preset-typescript": "^7.17.12",
|
|
45
45
|
"@babel/runtime": "^7.18.9",
|
|
46
46
|
"@emotion/jest": "^11.9.3",
|
|
47
|
-
"@hero-design/eslint-plugin": "8.12.
|
|
47
|
+
"@hero-design/eslint-plugin": "8.12.1",
|
|
48
48
|
"@react-native-community/datetimepicker": "^3.5.2",
|
|
49
49
|
"@react-native-community/slider": "4.1.12",
|
|
50
50
|
"@rollup/plugin-babel": "^5.3.1",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"@types/react-native": "^0.67.7",
|
|
61
61
|
"@types/react-native-vector-icons": "^6.4.10",
|
|
62
62
|
"babel-plugin-inline-import": "^3.0.0",
|
|
63
|
-
"eslint-config-hd": "8.12.
|
|
63
|
+
"eslint-config-hd": "8.12.1",
|
|
64
64
|
"jest": "^27.3.1",
|
|
65
|
-
"prettier-config-hd": "8.12.
|
|
65
|
+
"prettier-config-hd": "8.12.1",
|
|
66
66
|
"react": "18.0.0",
|
|
67
67
|
"react-native": "0.69.7",
|
|
68
68
|
"react-native-gesture-handler": "~2.1.0",
|
|
@@ -44,6 +44,8 @@ exports[`DatePickerAndroid renders correctly 1`] = `
|
|
|
44
44
|
Array [
|
|
45
45
|
Object {
|
|
46
46
|
"alignItems": "center",
|
|
47
|
+
"backgroundColor": "#ffffff",
|
|
48
|
+
"borderRadius": 8,
|
|
47
49
|
"flexDirection": "row",
|
|
48
50
|
"padding": 16,
|
|
49
51
|
},
|
|
@@ -64,9 +66,15 @@ exports[`DatePickerAndroid renders correctly 1`] = `
|
|
|
64
66
|
"right": 0,
|
|
65
67
|
"top": 0,
|
|
66
68
|
},
|
|
67
|
-
|
|
69
|
+
Array [
|
|
70
|
+
Object {
|
|
71
|
+
"backgroundColor": "#ffffff",
|
|
72
|
+
},
|
|
73
|
+
undefined,
|
|
74
|
+
],
|
|
68
75
|
]
|
|
69
76
|
}
|
|
77
|
+
testID="text-input-border"
|
|
70
78
|
themeFocused={false}
|
|
71
79
|
themeVariant="filled"
|
|
72
80
|
/>
|
|
@@ -83,9 +91,12 @@ exports[`DatePickerAndroid renders correctly 1`] = `
|
|
|
83
91
|
"top": -10,
|
|
84
92
|
"zIndex": 1,
|
|
85
93
|
},
|
|
86
|
-
|
|
94
|
+
Object {
|
|
95
|
+
"backgroundColor": "#ffffff",
|
|
96
|
+
},
|
|
87
97
|
]
|
|
88
98
|
}
|
|
99
|
+
testID="label-container"
|
|
89
100
|
>
|
|
90
101
|
<Text
|
|
91
102
|
style={
|
|
@@ -101,7 +112,9 @@ exports[`DatePickerAndroid renders correctly 1`] = `
|
|
|
101
112
|
Object {
|
|
102
113
|
"color": "#001f23",
|
|
103
114
|
},
|
|
104
|
-
|
|
115
|
+
Object {
|
|
116
|
+
"backgroundColor": "#ffffff",
|
|
117
|
+
},
|
|
105
118
|
],
|
|
106
119
|
]
|
|
107
120
|
}
|
|
@@ -151,6 +164,7 @@ exports[`DatePickerAndroid renders correctly 1`] = `
|
|
|
151
164
|
"textAlignVertical": "center",
|
|
152
165
|
},
|
|
153
166
|
Object {
|
|
167
|
+
"backgroundColor": "#ffffff",
|
|
154
168
|
"color": "#001f23",
|
|
155
169
|
},
|
|
156
170
|
]
|
|
@@ -44,6 +44,8 @@ exports[`DatePickerIOS renders correctly 1`] = `
|
|
|
44
44
|
Array [
|
|
45
45
|
Object {
|
|
46
46
|
"alignItems": "center",
|
|
47
|
+
"backgroundColor": "#ffffff",
|
|
48
|
+
"borderRadius": 8,
|
|
47
49
|
"flexDirection": "row",
|
|
48
50
|
"padding": 16,
|
|
49
51
|
},
|
|
@@ -64,9 +66,15 @@ exports[`DatePickerIOS renders correctly 1`] = `
|
|
|
64
66
|
"right": 0,
|
|
65
67
|
"top": 0,
|
|
66
68
|
},
|
|
67
|
-
|
|
69
|
+
Array [
|
|
70
|
+
Object {
|
|
71
|
+
"backgroundColor": "#ffffff",
|
|
72
|
+
},
|
|
73
|
+
undefined,
|
|
74
|
+
],
|
|
68
75
|
]
|
|
69
76
|
}
|
|
77
|
+
testID="text-input-border"
|
|
70
78
|
themeFocused={false}
|
|
71
79
|
themeVariant="filled"
|
|
72
80
|
/>
|
|
@@ -83,9 +91,12 @@ exports[`DatePickerIOS renders correctly 1`] = `
|
|
|
83
91
|
"top": -10,
|
|
84
92
|
"zIndex": 1,
|
|
85
93
|
},
|
|
86
|
-
|
|
94
|
+
Object {
|
|
95
|
+
"backgroundColor": "#ffffff",
|
|
96
|
+
},
|
|
87
97
|
]
|
|
88
98
|
}
|
|
99
|
+
testID="label-container"
|
|
89
100
|
>
|
|
90
101
|
<Text
|
|
91
102
|
style={
|
|
@@ -101,7 +112,9 @@ exports[`DatePickerIOS renders correctly 1`] = `
|
|
|
101
112
|
Object {
|
|
102
113
|
"color": "#001f23",
|
|
103
114
|
},
|
|
104
|
-
|
|
115
|
+
Object {
|
|
116
|
+
"backgroundColor": "#ffffff",
|
|
117
|
+
},
|
|
105
118
|
],
|
|
106
119
|
]
|
|
107
120
|
}
|
|
@@ -151,6 +164,7 @@ exports[`DatePickerIOS renders correctly 1`] = `
|
|
|
151
164
|
"textAlignVertical": "center",
|
|
152
165
|
},
|
|
153
166
|
Object {
|
|
167
|
+
"backgroundColor": "#ffffff",
|
|
154
168
|
"color": "#001f23",
|
|
155
169
|
},
|
|
156
170
|
]
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
StyledListItemContainer,
|
|
10
10
|
} from './StyledBasicListItem';
|
|
11
11
|
import type { IconName } from '../Icon';
|
|
12
|
+
import { useTheme } from '../../theme';
|
|
12
13
|
|
|
13
14
|
export interface ListItemProps {
|
|
14
15
|
/**
|
|
@@ -60,6 +61,8 @@ const BasicListItem = ({
|
|
|
60
61
|
disabled = false,
|
|
61
62
|
onPress,
|
|
62
63
|
}: ListItemProps): JSX.Element => {
|
|
64
|
+
const theme = useTheme();
|
|
65
|
+
|
|
63
66
|
return (
|
|
64
67
|
<StyledListItemContainer
|
|
65
68
|
style={style}
|
|
@@ -68,6 +71,9 @@ const BasicListItem = ({
|
|
|
68
71
|
themeDisabled={disabled}
|
|
69
72
|
onPress={onPress}
|
|
70
73
|
disabled={disabled}
|
|
74
|
+
underlayColor={
|
|
75
|
+
theme.__hd__.list.colors.checkedListItemContainerBackground
|
|
76
|
+
}
|
|
71
77
|
>
|
|
72
78
|
<>
|
|
73
79
|
{prefix && (
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
StyledTitleContainer,
|
|
16
16
|
} from './StyledListItem';
|
|
17
17
|
import type { IconName } from '../Icon';
|
|
18
|
+
import { useTheme } from '../../theme';
|
|
18
19
|
|
|
19
20
|
export interface ListItemProps {
|
|
20
21
|
/**
|
|
@@ -81,6 +82,8 @@ const ListItem = ({
|
|
|
81
82
|
onPress,
|
|
82
83
|
disabled = false,
|
|
83
84
|
}: ListItemProps): JSX.Element => {
|
|
85
|
+
const theme = useTheme();
|
|
86
|
+
|
|
84
87
|
return (
|
|
85
88
|
<StyledListItemContainer
|
|
86
89
|
style={style}
|
|
@@ -89,6 +92,9 @@ const ListItem = ({
|
|
|
89
92
|
themeVariant={variant}
|
|
90
93
|
onPress={onPress}
|
|
91
94
|
disabled={disabled}
|
|
95
|
+
underlayColor={
|
|
96
|
+
theme.__hd__.list.colors.checkedListItemContainerBackground
|
|
97
|
+
}
|
|
92
98
|
>
|
|
93
99
|
<>
|
|
94
100
|
{leadingStatus && (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled from '@emotion/native';
|
|
2
|
-
import {
|
|
2
|
+
import { TouchableHighlight, View } from 'react-native';
|
|
3
3
|
|
|
4
4
|
const StyledPrefixContainer = styled(View)(({ theme }) => ({
|
|
5
5
|
marginRight: theme.__hd__.list.space.prefixContainerMarginRight,
|
|
@@ -11,7 +11,7 @@ const StyledTitleContainer = styled(View)(() => ({
|
|
|
11
11
|
flex: 1,
|
|
12
12
|
}));
|
|
13
13
|
|
|
14
|
-
const StyledListItemContainer = styled(
|
|
14
|
+
const StyledListItemContainer = styled(TouchableHighlight)<{
|
|
15
15
|
themeSelected?: boolean;
|
|
16
16
|
themeDisabled?: boolean;
|
|
17
17
|
}>(({ theme, themeSelected, themeDisabled }) => ({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TouchableHighlight, View } from 'react-native';
|
|
2
2
|
import styled from '@emotion/native';
|
|
3
3
|
|
|
4
4
|
export type Variant = 'full-width' | 'card';
|
|
@@ -9,7 +9,7 @@ export type LeadingStatusIntent =
|
|
|
9
9
|
| 'info'
|
|
10
10
|
| 'archived';
|
|
11
11
|
|
|
12
|
-
const StyledListItemContainer = styled(
|
|
12
|
+
const StyledListItemContainer = styled(TouchableHighlight)<{
|
|
13
13
|
themeSelected?: boolean;
|
|
14
14
|
themeVariant?: Variant;
|
|
15
15
|
}>(({ theme, themeSelected = false, themeVariant = 'basic' }) => {
|