@hero-design/rn 8.12.0-rc.0 → 8.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +9 -9
- package/es/index.js +15 -9
- package/lib/index.js +15 -9
- package/package.json +5 -5
- 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__/OptionList.spec.tsx.snap +4 -4
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +15 -0
- package/src/components/Select/SingleSelect/index.tsx +1 -1
- 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 +3 -3
- 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 +0 -0
- package/types/components/List/StyledListItem.d.ts +0 -0
- 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 +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/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
|
+
[35m@hero-design/rn:build[0m: cache hit, replaying output [2mbe75cdb303db3812[0m
|
|
2
|
+
[35m@hero-design/rn:build: [0m$ yarn build:js && yarn build:types
|
|
3
|
+
[35m@hero-design/rn:build: [0m$ rollup -c
|
|
4
|
+
[35m@hero-design/rn:build: [0m[36m
|
|
5
|
+
[35m@hero-design/rn:build: [0m[1msrc/index.ts[22m → [1mlib/index.js, es/index.js[22m...[39m
|
|
6
|
+
[35m@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
|
+
[35m@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
|
+
[35m@hero-design/rn:build: [0m[32mcreated [1mlib/index.js, es/index.js[22m in [1m23.2s[22m[39m
|
|
9
|
+
[35m@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
|
};
|
|
@@ -2841,9 +2844,9 @@ var getTypographyTheme = function getTypographyTheme(theme) {
|
|
|
2841
2844
|
primary: theme.colors.primary,
|
|
2842
2845
|
secondary: theme.colors.secondary,
|
|
2843
2846
|
info: theme.colors.onInfoSurface,
|
|
2844
|
-
danger: theme.colors.
|
|
2845
|
-
warning: theme.colors.
|
|
2846
|
-
success: theme.colors.
|
|
2847
|
+
danger: theme.colors.error,
|
|
2848
|
+
warning: theme.colors.warning,
|
|
2849
|
+
success: theme.colors.success,
|
|
2847
2850
|
inverted: theme.colors.onDarkGlobalSurface,
|
|
2848
2851
|
archived: theme.colors.onArchivedSurface
|
|
2849
2852
|
};
|
|
@@ -13812,7 +13815,7 @@ function MultiSelect(_ref) {
|
|
|
13812
13815
|
pointerEvents: "none",
|
|
13813
13816
|
style: style,
|
|
13814
13817
|
testID: testID,
|
|
13815
|
-
renderInputValue: renderSelectedValue !== undefined ? function (props) {
|
|
13818
|
+
renderInputValue: renderSelectedValue !== undefined && (displayedValue === null || displayedValue === void 0 ? void 0 : displayedValue.length) > 0 ? function (props) {
|
|
13816
13819
|
return renderSelectedValue(value, props);
|
|
13817
13820
|
} : undefined
|
|
13818
13821
|
}))))), /*#__PURE__*/React.createElement(BottomSheet$1, {
|
|
@@ -13939,7 +13942,10 @@ var OptionList = function OptionList(_ref) {
|
|
|
13939
13942
|
onQueryChange: onQueryChange,
|
|
13940
13943
|
sections: sections,
|
|
13941
13944
|
renderItem: renderItem,
|
|
13942
|
-
sectionListRef: sectionListRef
|
|
13945
|
+
sectionListRef: sectionListRef,
|
|
13946
|
+
style: _objectSpread2({}, onQueryChange ? {
|
|
13947
|
+
height: Dimensions.get('screen').height
|
|
13948
|
+
} : {})
|
|
13943
13949
|
}, rest));
|
|
13944
13950
|
};
|
|
13945
13951
|
|
|
@@ -13999,7 +14005,7 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
13999
14005
|
pointerEvents: "none",
|
|
14000
14006
|
style: style,
|
|
14001
14007
|
testID: testID,
|
|
14002
|
-
renderInputValue: renderSelectedValue !== undefined ? function (props) {
|
|
14008
|
+
renderInputValue: renderSelectedValue !== undefined && !!displayedValue ? function (props) {
|
|
14003
14009
|
return renderSelectedValue(value, props);
|
|
14004
14010
|
} : undefined
|
|
14005
14011
|
}))))), /*#__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
|
};
|
|
@@ -2870,9 +2873,9 @@ var getTypographyTheme = function getTypographyTheme(theme) {
|
|
|
2870
2873
|
primary: theme.colors.primary,
|
|
2871
2874
|
secondary: theme.colors.secondary,
|
|
2872
2875
|
info: theme.colors.onInfoSurface,
|
|
2873
|
-
danger: theme.colors.
|
|
2874
|
-
warning: theme.colors.
|
|
2875
|
-
success: theme.colors.
|
|
2876
|
+
danger: theme.colors.error,
|
|
2877
|
+
warning: theme.colors.warning,
|
|
2878
|
+
success: theme.colors.success,
|
|
2876
2879
|
inverted: theme.colors.onDarkGlobalSurface,
|
|
2877
2880
|
archived: theme.colors.onArchivedSurface
|
|
2878
2881
|
};
|
|
@@ -13841,7 +13844,7 @@ function MultiSelect(_ref) {
|
|
|
13841
13844
|
pointerEvents: "none",
|
|
13842
13845
|
style: style,
|
|
13843
13846
|
testID: testID,
|
|
13844
|
-
renderInputValue: renderSelectedValue !== undefined ? function (props) {
|
|
13847
|
+
renderInputValue: renderSelectedValue !== undefined && (displayedValue === null || displayedValue === void 0 ? void 0 : displayedValue.length) > 0 ? function (props) {
|
|
13845
13848
|
return renderSelectedValue(value, props);
|
|
13846
13849
|
} : undefined
|
|
13847
13850
|
}))))), /*#__PURE__*/React__default["default"].createElement(BottomSheet$1, {
|
|
@@ -13968,7 +13971,10 @@ var OptionList = function OptionList(_ref) {
|
|
|
13968
13971
|
onQueryChange: onQueryChange,
|
|
13969
13972
|
sections: sections,
|
|
13970
13973
|
renderItem: renderItem,
|
|
13971
|
-
sectionListRef: sectionListRef
|
|
13974
|
+
sectionListRef: sectionListRef,
|
|
13975
|
+
style: _objectSpread2({}, onQueryChange ? {
|
|
13976
|
+
height: reactNative.Dimensions.get('screen').height
|
|
13977
|
+
} : {})
|
|
13972
13978
|
}, rest));
|
|
13973
13979
|
};
|
|
13974
13980
|
|
|
@@ -14028,7 +14034,7 @@ var SingleSelect = function SingleSelect(_ref) {
|
|
|
14028
14034
|
pointerEvents: "none",
|
|
14029
14035
|
style: style,
|
|
14030
14036
|
testID: testID,
|
|
14031
|
-
renderInputValue: renderSelectedValue !== undefined ? function (props) {
|
|
14037
|
+
renderInputValue: renderSelectedValue !== undefined && !!displayedValue ? function (props) {
|
|
14032
14038
|
return renderSelectedValue(value, props);
|
|
14033
14039
|
} : undefined
|
|
14034
14040
|
}))))), /*#__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.0
|
|
3
|
+
"version": "8.12.0",
|
|
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.0
|
|
24
|
+
"@hero-design/colors": "8.12.0",
|
|
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.0
|
|
47
|
+
"@hero-design/eslint-plugin": "8.12.0",
|
|
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.0
|
|
63
|
+
"eslint-config-hd": "8.12.0",
|
|
64
64
|
"jest": "^27.3.1",
|
|
65
|
-
"prettier-config-hd": "8.12.0
|
|
65
|
+
"prettier-config-hd": "8.12.0",
|
|
66
66
|
"react": "18.0.0",
|
|
67
67
|
"react-native": "0.69.7",
|
|
68
68
|
"react-native-gesture-handler": "~2.1.0",
|
|
@@ -198,6 +198,26 @@ describe('rendering', () => {
|
|
|
198
198
|
expect(getByText('Custom daemon')).toBeTruthy();
|
|
199
199
|
});
|
|
200
200
|
|
|
201
|
+
it('does not render custom value when value is empty', () => {
|
|
202
|
+
const { queryByText } = renderWithTheme(
|
|
203
|
+
<MultiSelect<string, CustomOptionType>
|
|
204
|
+
label="Choose collaborators"
|
|
205
|
+
footerLabel="Confirm"
|
|
206
|
+
options={collaboratorSections}
|
|
207
|
+
value={[]}
|
|
208
|
+
onConfirm={jest.fn()}
|
|
209
|
+
renderSelectedValue={(selectedValue, _inputProps) => (
|
|
210
|
+
<>
|
|
211
|
+
{selectedValue.map(() => (
|
|
212
|
+
<Typography.Text>Custom value</Typography.Text>
|
|
213
|
+
))}
|
|
214
|
+
</>
|
|
215
|
+
)}
|
|
216
|
+
/>
|
|
217
|
+
);
|
|
218
|
+
expect(queryByText('Custom value')).toBeNull();
|
|
219
|
+
});
|
|
220
|
+
|
|
201
221
|
it('allows custom footer', () => {
|
|
202
222
|
const { getByText, queryByText } = renderWithTheme(
|
|
203
223
|
<MultiSelect<string, CustomOptionType>
|
|
@@ -111,7 +111,7 @@ function MultiSelect<V, T extends OptionType<V>>({
|
|
|
111
111
|
style={style}
|
|
112
112
|
testID={testID}
|
|
113
113
|
renderInputValue={
|
|
114
|
-
renderSelectedValue !== undefined
|
|
114
|
+
renderSelectedValue !== undefined && displayedValue?.length > 0
|
|
115
115
|
? (props) => renderSelectedValue(value, props)
|
|
116
116
|
: undefined
|
|
117
117
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import {
|
|
3
|
+
SectionListRenderItemInfo,
|
|
4
|
+
SectionList,
|
|
5
|
+
Dimensions,
|
|
6
|
+
} from 'react-native';
|
|
3
7
|
import Option from './Option';
|
|
4
8
|
import type { SingleSelectProps } from '.';
|
|
5
9
|
import type { OptionType, SectionType } from '../types';
|
|
@@ -64,6 +68,9 @@ const OptionList = <V, T extends OptionType<V>>({
|
|
|
64
68
|
sections={sections}
|
|
65
69
|
renderItem={renderItem}
|
|
66
70
|
sectionListRef={sectionListRef}
|
|
71
|
+
style={{
|
|
72
|
+
...(onQueryChange ? { height: Dimensions.get('screen').height } : {}),
|
|
73
|
+
}}
|
|
67
74
|
{...rest}
|
|
68
75
|
/>
|
|
69
76
|
);
|
|
@@ -70,7 +70,7 @@ exports[`OptionList render isLoading correctly 1`] = `
|
|
|
70
70
|
Object {
|
|
71
71
|
"paddingBottom": 16,
|
|
72
72
|
},
|
|
73
|
-
|
|
73
|
+
Object {},
|
|
74
74
|
],
|
|
75
75
|
]
|
|
76
76
|
}
|
|
@@ -852,7 +852,7 @@ exports[`OptionList renders correctly 1`] = `
|
|
|
852
852
|
Object {
|
|
853
853
|
"paddingBottom": 16,
|
|
854
854
|
},
|
|
855
|
-
|
|
855
|
+
Object {},
|
|
856
856
|
],
|
|
857
857
|
]
|
|
858
858
|
}
|
|
@@ -1481,7 +1481,7 @@ exports[`OptionList trigger onPress correctly on select new value 1`] = `
|
|
|
1481
1481
|
Object {
|
|
1482
1482
|
"paddingBottom": 16,
|
|
1483
1483
|
},
|
|
1484
|
-
|
|
1484
|
+
Object {},
|
|
1485
1485
|
],
|
|
1486
1486
|
]
|
|
1487
1487
|
}
|
|
@@ -2110,7 +2110,7 @@ exports[`OptionList trigger onPress correctly on unselect current value 1`] = `
|
|
|
2110
2110
|
Object {
|
|
2111
2111
|
"paddingBottom": 16,
|
|
2112
2112
|
},
|
|
2113
|
-
|
|
2113
|
+
Object {},
|
|
2114
2114
|
],
|
|
2115
2115
|
]
|
|
2116
2116
|
}
|
|
@@ -460,7 +460,7 @@ Array [
|
|
|
460
460
|
Object {
|
|
461
461
|
"paddingBottom": 16,
|
|
462
462
|
},
|
|
463
|
-
|
|
463
|
+
Object {},
|
|
464
464
|
],
|
|
465
465
|
]
|
|
466
466
|
}
|
|
@@ -1956,7 +1956,7 @@ Array [
|
|
|
1956
1956
|
Object {
|
|
1957
1957
|
"paddingBottom": 16,
|
|
1958
1958
|
},
|
|
1959
|
-
|
|
1959
|
+
Object {},
|
|
1960
1960
|
],
|
|
1961
1961
|
]
|
|
1962
1962
|
}
|
|
@@ -3574,7 +3574,7 @@ Array [
|
|
|
3574
3574
|
Object {
|
|
3575
3575
|
"paddingBottom": 16,
|
|
3576
3576
|
},
|
|
3577
|
-
|
|
3577
|
+
Object {},
|
|
3578
3578
|
],
|
|
3579
3579
|
]
|
|
3580
3580
|
}
|
|
@@ -182,6 +182,21 @@ describe('rendering', () => {
|
|
|
182
182
|
);
|
|
183
183
|
expect(getByText('Custom daniel')).toBeTruthy();
|
|
184
184
|
});
|
|
185
|
+
|
|
186
|
+
it('does not render custom value when value is empty', () => {
|
|
187
|
+
const { queryByText } = renderWithTheme(
|
|
188
|
+
<SingleSelect<string, CustomOptionType>
|
|
189
|
+
label="Choose collaborators"
|
|
190
|
+
options={collaboratorSections}
|
|
191
|
+
value=""
|
|
192
|
+
onConfirm={jest.fn()}
|
|
193
|
+
renderSelectedValue={() => (
|
|
194
|
+
<Typography.Text>Custom value</Typography.Text>
|
|
195
|
+
)}
|
|
196
|
+
/>
|
|
197
|
+
);
|
|
198
|
+
expect(queryByText('Custom value')).toBeNull();
|
|
199
|
+
});
|
|
185
200
|
});
|
|
186
201
|
|
|
187
202
|
describe('behavior', () => {
|
|
@@ -88,7 +88,7 @@ const SingleSelect = <V, T extends OptionType<V>>({
|
|
|
88
88
|
style={style}
|
|
89
89
|
testID={testID}
|
|
90
90
|
renderInputValue={
|
|
91
|
-
renderSelectedValue !== undefined
|
|
91
|
+
renderSelectedValue !== undefined && !!displayedValue
|
|
92
92
|
? (props) => renderSelectedValue(value, props)
|
|
93
93
|
: undefined
|
|
94
94
|
}
|
|
@@ -113,7 +113,7 @@ exports[`ToolbarItems renders correctly when intent is danger 1`] = `
|
|
|
113
113
|
style={
|
|
114
114
|
Array [
|
|
115
115
|
Object {
|
|
116
|
-
"color": "#
|
|
116
|
+
"color": "#f46363",
|
|
117
117
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
118
118
|
"fontSize": 12,
|
|
119
119
|
"letterSpacing": 0.36,
|
|
@@ -311,7 +311,7 @@ exports[`ToolbarItems renders correctly when intent is success 1`] = `
|
|
|
311
311
|
style={
|
|
312
312
|
Array [
|
|
313
313
|
Object {
|
|
314
|
-
"color": "#
|
|
314
|
+
"color": "#5ace7d",
|
|
315
315
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
316
316
|
"fontSize": 12,
|
|
317
317
|
"letterSpacing": 0.36,
|
|
@@ -377,7 +377,7 @@ exports[`ToolbarItems renders correctly when intent is warning 1`] = `
|
|
|
377
377
|
style={
|
|
378
378
|
Array [
|
|
379
379
|
Object {
|
|
380
|
-
"color": "#
|
|
380
|
+
"color": "#ffbe71",
|
|
381
381
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
382
382
|
"fontSize": 12,
|
|
383
383
|
"letterSpacing": 0.36,
|
|
@@ -28,7 +28,7 @@ exports[`StyledText has danger intent style 1`] = `
|
|
|
28
28
|
style={
|
|
29
29
|
Array [
|
|
30
30
|
Object {
|
|
31
|
-
"color": "#
|
|
31
|
+
"color": "#f46363",
|
|
32
32
|
"fontFamily": "BeVietnamPro-Regular",
|
|
33
33
|
"fontSize": 14,
|
|
34
34
|
"letterSpacing": 0.42,
|
|
@@ -327,7 +327,7 @@ exports[`StyledText has success intent style 1`] = `
|
|
|
327
327
|
style={
|
|
328
328
|
Array [
|
|
329
329
|
Object {
|
|
330
|
-
"color": "#
|
|
330
|
+
"color": "#5ace7d",
|
|
331
331
|
"fontFamily": "BeVietnamPro-Regular",
|
|
332
332
|
"fontSize": 14,
|
|
333
333
|
"letterSpacing": 0.42,
|
|
@@ -350,7 +350,7 @@ exports[`StyledText has warning intent style 1`] = `
|
|
|
350
350
|
style={
|
|
351
351
|
Array [
|
|
352
352
|
Object {
|
|
353
|
-
"color": "#
|
|
353
|
+
"color": "#ffbe71",
|
|
354
354
|
"fontFamily": "BeVietnamPro-Regular",
|
|
355
355
|
"fontSize": 14,
|
|
356
356
|
"letterSpacing": 0.42,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useMemo } from 'react';
|
|
1
|
+
import React, { PropsWithChildren, useMemo } from 'react';
|
|
2
2
|
|
|
3
3
|
import getTheme from './getTheme';
|
|
4
4
|
import {
|
|
@@ -41,8 +41,11 @@ const ThemeSwitcher = ({
|
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
export const withTheme =
|
|
44
|
-
<P extends
|
|
45
|
-
|
|
44
|
+
<P extends Record<string, unknown>>(
|
|
45
|
+
C: React.ComponentType<P>,
|
|
46
|
+
themeName: ThemeName
|
|
47
|
+
) =>
|
|
48
|
+
(props: PropsWithChildren<P>) => {
|
|
46
49
|
return (
|
|
47
50
|
<ThemeSwitcher name={themeName}>
|
|
48
51
|
<C {...props} />
|
|
@@ -949,14 +949,14 @@ Object {
|
|
|
949
949
|
"colors": Object {
|
|
950
950
|
"archived": "#737479",
|
|
951
951
|
"body": "#001f23",
|
|
952
|
-
"danger": "#
|
|
952
|
+
"danger": "#f46363",
|
|
953
953
|
"info": "#4568fb",
|
|
954
954
|
"inverted": "#ffffff",
|
|
955
955
|
"primary": "#401960",
|
|
956
956
|
"secondary": "#795e90",
|
|
957
957
|
"subdued": "#4d6265",
|
|
958
|
-
"success": "#
|
|
959
|
-
"warning": "#
|
|
958
|
+
"success": "#5ace7d",
|
|
959
|
+
"warning": "#ffbe71",
|
|
960
960
|
},
|
|
961
961
|
"fontSizes": Object {
|
|
962
962
|
"6xlarge": 36,
|
|
@@ -7,9 +7,9 @@ const getTypographyTheme = (theme: GlobalTheme) => {
|
|
|
7
7
|
primary: theme.colors.primary,
|
|
8
8
|
secondary: theme.colors.secondary,
|
|
9
9
|
info: theme.colors.onInfoSurface,
|
|
10
|
-
danger: theme.colors.
|
|
11
|
-
warning: theme.colors.
|
|
12
|
-
success: theme.colors.
|
|
10
|
+
danger: theme.colors.error,
|
|
11
|
+
warning: theme.colors.warning,
|
|
12
|
+
success: theme.colors.success,
|
|
13
13
|
inverted: theme.colors.onDarkGlobalSurface,
|
|
14
14
|
archived: theme.colors.onArchivedSurface,
|
|
15
15
|
};
|
|
@@ -13,7 +13,7 @@ Object {
|
|
|
13
13
|
"disabledOutline": "#82858a",
|
|
14
14
|
"error": "#f46363",
|
|
15
15
|
"errorSurface": "#fcebe7",
|
|
16
|
-
"highlightedSurface": "#
|
|
16
|
+
"highlightedSurface": "#443153",
|
|
17
17
|
"inactiveOnDefaultGlobalSurface": "#99a5a7",
|
|
18
18
|
"inactiveOutline": "#99a5a7",
|
|
19
19
|
"info": "#b5c3fd",
|
|
@@ -35,10 +35,10 @@ Object {
|
|
|
35
35
|
"onSuccessSurface": "#017d6d",
|
|
36
36
|
"onWarningSurface": "#ffa234",
|
|
37
37
|
"overlayGlobalSurface": "#727478",
|
|
38
|
-
"pressedSurface": "#
|
|
38
|
+
"pressedSurface": "#cc9df1",
|
|
39
39
|
"primary": "#c38cee",
|
|
40
40
|
"primaryOutline": "#ffffff",
|
|
41
|
-
"secondary": "#
|
|
41
|
+
"secondary": "#dbbaf5",
|
|
42
42
|
"secondaryOutline": "#193539",
|
|
43
43
|
"success": "#5ace7d",
|
|
44
44
|
"successSurface": "#f0fef4",
|
|
@@ -5,11 +5,11 @@ import globalDarkPalette from './globalDark';
|
|
|
5
5
|
const swagDarkBrandSystemPalette: BrandSystemPalette = {
|
|
6
6
|
primary: palette.mauve,
|
|
7
7
|
onPrimary: palette.maasstrichtBlue,
|
|
8
|
-
secondary: palette.
|
|
8
|
+
secondary: palette.mauveLight40,
|
|
9
9
|
onSecondary: palette.maasstrichtBlue,
|
|
10
10
|
defaultSurface: palette.maasstrichtBlue,
|
|
11
|
-
highlightedSurface: palette.
|
|
12
|
-
pressedSurface: palette.
|
|
11
|
+
highlightedSurface: palette.mauveDark65,
|
|
12
|
+
pressedSurface: palette.mauveLight15,
|
|
13
13
|
|
|
14
14
|
decorativePrimary: palette.maasstrichtBlue,
|
|
15
15
|
decorativePrimarySurface: palette.maasstrichtBlueLight10,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|