@hero-design/rn 8.11.2 → 8.11.4-rc.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 +310 -164
- package/lib/index.js +310 -163
- package/package.json +5 -5
- package/src/components/Carousel/CardCarousel.tsx +27 -11
- package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +6 -3
- package/src/components/Collapse/StyledCollapse.tsx +4 -4
- package/src/components/DatePicker/DatePickerIOS.tsx +3 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +1 -0
- package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +1 -1
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/RichTextEditor/RichTextEditor.tsx +2 -1
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +4 -2
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +1 -1
- package/src/components/TimePicker/TimePickerIOS.tsx +3 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +1 -0
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +2 -1
- package/src/theme/components/fab.ts +2 -2
- package/src/theme/components/richTextEditor.ts +1 -0
- package/src/theme/global/colors/__tests__/__snapshots__/eBens.spec.ts.snap +48 -0
- package/src/theme/global/colors/__tests__/__snapshots__/global.spec.ts.snap +39 -0
- package/src/theme/global/colors/__tests__/__snapshots__/globalDark.spec.ts.snap +39 -0
- package/src/theme/global/colors/__tests__/__snapshots__/jobs.spec.ts.snap +48 -0
- package/src/theme/global/colors/__tests__/__snapshots__/swag.spec.ts.snap +48 -0
- package/src/theme/global/colors/__tests__/__snapshots__/swagDark.spec.ts.snap +48 -0
- package/src/theme/global/colors/__tests__/__snapshots__/wallet.spec.ts.snap +48 -0
- package/src/theme/global/colors/__tests__/__snapshots__/work.spec.ts.snap +48 -0
- package/src/theme/global/colors/__tests__/eBens.spec.ts +7 -0
- package/src/theme/global/colors/__tests__/global.spec.ts +7 -0
- package/src/theme/global/colors/__tests__/globalDark.spec.ts +7 -0
- package/src/theme/global/colors/__tests__/jobs.spec.ts +7 -0
- package/src/theme/global/colors/__tests__/swag.spec.ts +7 -0
- package/src/theme/global/colors/__tests__/swagDark.spec.ts +7 -0
- package/src/theme/global/colors/__tests__/wallet.spec.ts +7 -0
- package/src/theme/global/colors/__tests__/work.spec.ts +7 -0
- package/src/theme/global/colors/globalDark.ts +51 -0
- package/src/theme/global/colors/swagDark.ts +25 -0
- package/src/theme/global/index.ts +2 -0
- package/src/theme/index.ts +2 -0
- 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 +5 -4
- 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 +1 -1
- 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 +0 -0
- 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 +2 -2
- 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 -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 +1 -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 +3 -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 +3 -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 +2 -1
- 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 +2 -2
- 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hero-design/rn",
|
|
3
|
-
"version": "8.11.
|
|
3
|
+
"version": "8.11.4-rc.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.11.
|
|
24
|
+
"@hero-design/colors": "8.11.4-rc.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.11.
|
|
47
|
+
"@hero-design/eslint-plugin": "8.11.4-rc.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.11.
|
|
63
|
+
"eslint-config-hd": "8.11.4-rc.1",
|
|
64
64
|
"jest": "^27.3.1",
|
|
65
|
-
"prettier-config-hd": "8.11.
|
|
65
|
+
"prettier-config-hd": "8.11.4-rc.1",
|
|
66
66
|
"react": "18.0.0",
|
|
67
67
|
"react-native": "0.69.7",
|
|
68
68
|
"react-native-gesture-handler": "~2.1.0",
|
|
@@ -5,7 +5,12 @@ import React, {
|
|
|
5
5
|
useRef,
|
|
6
6
|
useState,
|
|
7
7
|
} from 'react';
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
FlatList,
|
|
10
|
+
LayoutChangeEvent,
|
|
11
|
+
StyleProp,
|
|
12
|
+
ViewStyle,
|
|
13
|
+
} from 'react-native';
|
|
9
14
|
import { useTheme } from '../../theme';
|
|
10
15
|
import { ITEM_WIDTH_RATE, VIEW_POSITION_CENTER } from './contants';
|
|
11
16
|
import {
|
|
@@ -34,9 +39,9 @@ export interface CardCarouselProps {
|
|
|
34
39
|
*/
|
|
35
40
|
onItemIndexChange?: (index: number) => void;
|
|
36
41
|
/**
|
|
37
|
-
* Carousel
|
|
42
|
+
* Carousel items.
|
|
38
43
|
*/
|
|
39
|
-
items:
|
|
44
|
+
items: React.ReactNode[];
|
|
40
45
|
/**
|
|
41
46
|
* Indicates hide or show page control.
|
|
42
47
|
*/
|
|
@@ -53,6 +58,10 @@ export interface CardCarouselProps {
|
|
|
53
58
|
* Component ref.
|
|
54
59
|
*/
|
|
55
60
|
ref?: React.Ref<CardCarouselHandles>;
|
|
61
|
+
/*
|
|
62
|
+
* onLayout event handler.
|
|
63
|
+
*/
|
|
64
|
+
onLayout?: (event: LayoutChangeEvent) => void;
|
|
56
65
|
}
|
|
57
66
|
|
|
58
67
|
export const CardCarousel = forwardRef<CardCarouselHandles, CardCarouselProps>(
|
|
@@ -65,6 +74,7 @@ export const CardCarousel = forwardRef<CardCarouselHandles, CardCarouselProps>(
|
|
|
65
74
|
testID,
|
|
66
75
|
autoPlay = false,
|
|
67
76
|
autoPlayInterval = 3000,
|
|
77
|
+
onLayout,
|
|
68
78
|
}: CardCarouselProps,
|
|
69
79
|
ref?: React.Ref<CardCarouselHandles>
|
|
70
80
|
) => {
|
|
@@ -155,11 +165,14 @@ export const CardCarousel = forwardRef<CardCarouselHandles, CardCarouselProps>(
|
|
|
155
165
|
[itemWidth]
|
|
156
166
|
);
|
|
157
167
|
|
|
158
|
-
const
|
|
168
|
+
const flatListOnLayout = useCallback(
|
|
159
169
|
(e) => {
|
|
160
170
|
setFlatListWidth(e.nativeEvent.layout.width);
|
|
171
|
+
setTimeout(() => {
|
|
172
|
+
onLayout?.(e);
|
|
173
|
+
});
|
|
161
174
|
},
|
|
162
|
-
[setFlatListWidth]
|
|
175
|
+
[setFlatListWidth, onLayout]
|
|
163
176
|
);
|
|
164
177
|
|
|
165
178
|
const renderItem = useCallback(
|
|
@@ -179,11 +192,15 @@ export const CardCarousel = forwardRef<CardCarouselHandles, CardCarouselProps>(
|
|
|
179
192
|
return (
|
|
180
193
|
<StyledWrapper style={style} testID={testID}>
|
|
181
194
|
<FlatList
|
|
182
|
-
|
|
183
|
-
|
|
195
|
+
contentInset={{
|
|
196
|
+
top: 0,
|
|
197
|
+
left: theme.__hd__.cardCarousel.space
|
|
198
|
+
.contentContainerPaddingHorizontal,
|
|
199
|
+
bottom: 0,
|
|
200
|
+
right:
|
|
184
201
|
theme.__hd__.cardCarousel.space.contentContainerPaddingHorizontal,
|
|
185
202
|
}}
|
|
186
|
-
onLayout={
|
|
203
|
+
onLayout={flatListOnLayout}
|
|
187
204
|
data={items}
|
|
188
205
|
horizontal
|
|
189
206
|
showsHorizontalScrollIndicator={false}
|
|
@@ -197,14 +214,13 @@ export const CardCarousel = forwardRef<CardCarouselHandles, CardCarouselProps>(
|
|
|
197
214
|
keyExtractor={(_, index) => `${index}`}
|
|
198
215
|
decelerationRate="fast"
|
|
199
216
|
renderToHardwareTextureAndroid
|
|
200
|
-
snapToInterval={
|
|
201
|
-
itemWidth + theme.__hd__.cardCarousel.space.carouselItemSpacing
|
|
202
|
-
}
|
|
217
|
+
snapToInterval={itemWidth}
|
|
203
218
|
onViewableItemsChanged={visibleSlideChanged}
|
|
204
219
|
viewabilityConfig={{
|
|
205
220
|
itemVisiblePercentThreshold: 80,
|
|
206
221
|
}}
|
|
207
222
|
/>
|
|
223
|
+
|
|
208
224
|
{!hidePageControl && (
|
|
209
225
|
<StyledPageControl
|
|
210
226
|
testID="pageControl"
|
|
@@ -15,9 +15,12 @@ exports[`CardCarousel should render correctly 1`] = `
|
|
|
15
15
|
>
|
|
16
16
|
<RCTScrollView
|
|
17
17
|
bounces={false}
|
|
18
|
-
|
|
18
|
+
contentInset={
|
|
19
19
|
Object {
|
|
20
|
-
"
|
|
20
|
+
"bottom": 0,
|
|
21
|
+
"left": 24,
|
|
22
|
+
"right": 24,
|
|
23
|
+
"top": 0,
|
|
21
24
|
}
|
|
22
25
|
}
|
|
23
26
|
data={
|
|
@@ -51,7 +54,7 @@ exports[`CardCarousel should render correctly 1`] = `
|
|
|
51
54
|
scrollEventThrottle={32}
|
|
52
55
|
showsHorizontalScrollIndicator={false}
|
|
53
56
|
snapToAlignment="center"
|
|
54
|
-
snapToInterval={
|
|
57
|
+
snapToInterval={0}
|
|
55
58
|
stickyHeaderIndices={Array []}
|
|
56
59
|
viewabilityConfig={
|
|
57
60
|
Object {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Animated, Dimensions, View } from 'react-native';
|
|
2
2
|
import styled from '@emotion/native';
|
|
3
3
|
|
|
4
|
-
const StyledWrapper = styled(Animated.View)(
|
|
4
|
+
const StyledWrapper = styled(Animated.View)({
|
|
5
5
|
margin: 0,
|
|
6
6
|
padding: 0,
|
|
7
7
|
overflow: 'hidden',
|
|
8
|
-
})
|
|
8
|
+
});
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Height need to be high enough to cover most scenario
|
|
@@ -16,9 +16,9 @@ const StyledHiddenWrapper = styled(View)(() => ({
|
|
|
16
16
|
height: Dimensions.get('window').height,
|
|
17
17
|
}));
|
|
18
18
|
|
|
19
|
-
const StyledChildWrapper = styled(View)(
|
|
19
|
+
const StyledChildWrapper = styled(View)({
|
|
20
20
|
margin: 0,
|
|
21
21
|
padding: 0,
|
|
22
|
-
})
|
|
22
|
+
});
|
|
23
23
|
|
|
24
24
|
export { StyledWrapper, StyledHiddenWrapper, StyledChildWrapper };
|
|
@@ -8,6 +8,7 @@ import TextInput from '../TextInput';
|
|
|
8
8
|
import Button from '../Button';
|
|
9
9
|
import { StyledPickerWrapper } from './StyledDatePicker';
|
|
10
10
|
import type { DatePickerProps } from './types';
|
|
11
|
+
import { useTheme } from '../../theme';
|
|
11
12
|
|
|
12
13
|
const DatePickerIOS = ({
|
|
13
14
|
value,
|
|
@@ -30,6 +31,7 @@ const DatePickerIOS = ({
|
|
|
30
31
|
|
|
31
32
|
const displayValue = value ? formatDate(displayFormat, value) : '';
|
|
32
33
|
|
|
34
|
+
const theme = useTheme();
|
|
33
35
|
return (
|
|
34
36
|
<TouchableOpacity onPress={() => setOpen(true)} disabled={disabled}>
|
|
35
37
|
<View pointerEvents="none" testID="datePickerInputIOS">
|
|
@@ -77,6 +79,7 @@ const DatePickerIOS = ({
|
|
|
77
79
|
}}
|
|
78
80
|
display="spinner"
|
|
79
81
|
style={{ flex: 1 }}
|
|
82
|
+
textColor={theme.colors.onDefaultGlobalSurface}
|
|
80
83
|
/>
|
|
81
84
|
</StyledPickerWrapper>
|
|
82
85
|
</BottomSheet>
|
|
@@ -44,7 +44,7 @@ const StyledBackdrop = styled(Animated.View)<
|
|
|
44
44
|
const StyledHeaderText = styled(Typography.Text)<TextProps>(({ theme }) => ({
|
|
45
45
|
fontSize: theme.__hd__.fab.fontSizes.header,
|
|
46
46
|
lineHeight: theme.__hd__.fab.lineHeights.header,
|
|
47
|
-
color: theme.__hd__.fab.colors.
|
|
47
|
+
color: theme.__hd__.fab.colors.headerText,
|
|
48
48
|
fontFamily: theme.__hd__.fab.fonts.header,
|
|
49
49
|
marginRight: theme.__hd__.fab.space.headerTextMarginRight,
|
|
50
50
|
marginBottom: theme.__hd__.fab.space.headerTextMarginBottom,
|
|
@@ -64,7 +64,7 @@ exports[`ActionGroup has active false 1`] = `
|
|
|
64
64
|
},
|
|
65
65
|
Array [
|
|
66
66
|
Object {
|
|
67
|
-
"color": "#
|
|
67
|
+
"color": "#001f23",
|
|
68
68
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
69
69
|
"fontSize": 24,
|
|
70
70
|
"lineHeight": 32,
|
|
@@ -626,7 +626,7 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
626
626
|
},
|
|
627
627
|
Array [
|
|
628
628
|
Object {
|
|
629
|
-
"color": "#
|
|
629
|
+
"color": "#001f23",
|
|
630
630
|
"fontFamily": "BeVietnamPro-SemiBold",
|
|
631
631
|
"fontSize": 24,
|
|
632
632
|
"lineHeight": 32,
|
|
@@ -195,7 +195,8 @@ const RichTextEditor: ComponentType<RichTextEditorProps> = ({
|
|
|
195
195
|
autoFocus: ${autoFocus},
|
|
196
196
|
style: {
|
|
197
197
|
padding: '0 !important',
|
|
198
|
-
fontSize: ${theme.__hd__.richTextEditor.fontSizes.editor}
|
|
198
|
+
fontSize: ${theme.__hd__.richTextEditor.fontSizes.editor},
|
|
199
|
+
color: '${theme.__hd__.richTextEditor.colors.text}'
|
|
199
200
|
}
|
|
200
201
|
};
|
|
201
202
|
${heroEditorApp}
|
|
@@ -151,7 +151,8 @@ exports[`RichTextEditor onMessage recevied event editor-layout should update hei
|
|
|
151
151
|
autoFocus: true,
|
|
152
152
|
style: {
|
|
153
153
|
padding: '0 !important',
|
|
154
|
-
fontSize: 14
|
|
154
|
+
fontSize: 14,
|
|
155
|
+
color: '#001f23'
|
|
155
156
|
}
|
|
156
157
|
};
|
|
157
158
|
mockHeroEditApp
|
|
@@ -415,7 +416,8 @@ exports[`RichTextEditor should render correctly 1`] = `
|
|
|
415
416
|
autoFocus: true,
|
|
416
417
|
style: {
|
|
417
418
|
padding: '0 !important',
|
|
418
|
-
fontSize: 14
|
|
419
|
+
fontSize: 14,
|
|
420
|
+
color: '#001f23'
|
|
419
421
|
}
|
|
420
422
|
};
|
|
421
423
|
mockHeroEditApp
|
|
@@ -8,6 +8,7 @@ import TextInput from '../TextInput';
|
|
|
8
8
|
import Button from '../Button';
|
|
9
9
|
import { StyledPickerWrapper } from './StyledTimePicker';
|
|
10
10
|
import type { TimePickerProps } from './types';
|
|
11
|
+
import { useTheme } from '../../theme';
|
|
11
12
|
|
|
12
13
|
const TimePickerIOS = ({
|
|
13
14
|
value,
|
|
@@ -29,6 +30,7 @@ const TimePickerIOS = ({
|
|
|
29
30
|
|
|
30
31
|
const is12Hour = displayFormat.includes('hh');
|
|
31
32
|
const displayValue = value ? formatTime(displayFormat, value) : '';
|
|
33
|
+
const theme = useTheme();
|
|
32
34
|
|
|
33
35
|
return (
|
|
34
36
|
<TouchableOpacity onPress={() => setOpen(true)} disabled={disabled}>
|
|
@@ -78,6 +80,7 @@ const TimePickerIOS = ({
|
|
|
78
80
|
}}
|
|
79
81
|
display="spinner"
|
|
80
82
|
style={{ flex: 1 }}
|
|
83
|
+
textColor={theme.colors.onDefaultGlobalSurface}
|
|
81
84
|
/>
|
|
82
85
|
</StyledPickerWrapper>
|
|
83
86
|
</BottomSheet>
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ import theme, {
|
|
|
3
3
|
ThemeProvider,
|
|
4
4
|
useTheme,
|
|
5
5
|
swagSystemPalette,
|
|
6
|
+
swagDarkSystemPalette,
|
|
6
7
|
workSystemPalette,
|
|
7
8
|
jobsSystemPalette,
|
|
8
9
|
walletSystemPalette,
|
|
@@ -62,6 +63,7 @@ export {
|
|
|
62
63
|
ThemeProvider,
|
|
63
64
|
ThemeSwitcher,
|
|
64
65
|
swagSystemPalette,
|
|
66
|
+
swagDarkSystemPalette,
|
|
65
67
|
workSystemPalette,
|
|
66
68
|
jobsSystemPalette,
|
|
67
69
|
walletSystemPalette,
|
|
@@ -399,7 +399,7 @@ Object {
|
|
|
399
399
|
"actionItemText": "#ffffff",
|
|
400
400
|
"backdropBackground": "#000000",
|
|
401
401
|
"buttonBackground": "#401960",
|
|
402
|
-
"headerText": "#
|
|
402
|
+
"headerText": "#001f23",
|
|
403
403
|
"icon": "#ffffff",
|
|
404
404
|
"titleText": "#ffffff",
|
|
405
405
|
},
|
|
@@ -621,6 +621,7 @@ Object {
|
|
|
621
621
|
},
|
|
622
622
|
"richTextEditor": Object {
|
|
623
623
|
"colors": Object {
|
|
624
|
+
"text": "#001f23",
|
|
624
625
|
"toolbarBackgroundColor": "#f6f6f7",
|
|
625
626
|
"toolbarBorderColor": "#e8e9ea",
|
|
626
627
|
"toolbarButtonSelectedBackground": "#ece8ef",
|
|
@@ -4,10 +4,10 @@ const getFABTheme = (theme: GlobalTheme) => {
|
|
|
4
4
|
const colors = {
|
|
5
5
|
buttonBackground: theme.colors.primary,
|
|
6
6
|
icon: theme.colors.onPrimary,
|
|
7
|
-
headerText: theme.colors.
|
|
7
|
+
headerText: theme.colors.onDefaultGlobalSurface,
|
|
8
8
|
actionItemBackground: theme.colors.primary,
|
|
9
9
|
backdropBackground: theme.colors.overlayGlobalSurface,
|
|
10
|
-
titleText: theme.colors.
|
|
10
|
+
titleText: theme.colors.onPrimary,
|
|
11
11
|
actionItemText: theme.colors.onPrimary,
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -5,6 +5,7 @@ const getRichTextEditorTheme = (theme: GlobalTheme) => {
|
|
|
5
5
|
toolbarBorderColor: theme.colors.secondaryOutline,
|
|
6
6
|
toolbarBackgroundColor: theme.colors.neutralGlobalSurface,
|
|
7
7
|
toolbarButtonSelectedBackground: theme.colors.highlightedSurface,
|
|
8
|
+
text: theme.colors.onDefaultGlobalSurface,
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
const sizes = {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`eBens returns correct theme object 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"archived": "#abacaf",
|
|
6
|
+
"archivedSurface": "#f1f2f3",
|
|
7
|
+
"darkGlobalSurface": "#001f23",
|
|
8
|
+
"decorativePrimary": "#c38cee",
|
|
9
|
+
"decorativePrimarySurface": "#f3e8fc",
|
|
10
|
+
"defaultGlobalSurface": "#ffffff",
|
|
11
|
+
"defaultSurface": "#f6f6f7",
|
|
12
|
+
"disabledOnDefaultGlobalSurface": "#bfc1c5",
|
|
13
|
+
"disabledOutline": "#bfc1c5",
|
|
14
|
+
"error": "#f46363",
|
|
15
|
+
"errorSurface": "#fcebe7",
|
|
16
|
+
"highlightedSurface": "#f1e9fb",
|
|
17
|
+
"inactiveOnDefaultGlobalSurface": "#808f91",
|
|
18
|
+
"inactiveOutline": "#808f91",
|
|
19
|
+
"info": "#b5c3fd",
|
|
20
|
+
"infoSurface": "#ecf0ff",
|
|
21
|
+
"mutedArchived": "#bcbdbf",
|
|
22
|
+
"mutedError": "#f68282",
|
|
23
|
+
"mutedInfo": "#c4cffd",
|
|
24
|
+
"mutedOnDefaultGlobalSurface": "#4d6265",
|
|
25
|
+
"mutedSuccess": "#7bd897",
|
|
26
|
+
"mutedWarning": "#ffcb8d",
|
|
27
|
+
"neutralGlobalSurface": "#f6f6f7",
|
|
28
|
+
"onArchivedSurface": "#737479",
|
|
29
|
+
"onDarkGlobalSurface": "#ffffff",
|
|
30
|
+
"onDefaultGlobalSurface": "#001f23",
|
|
31
|
+
"onErrorSurface": "#de350b",
|
|
32
|
+
"onInfoSurface": "#4568fb",
|
|
33
|
+
"onPrimary": "#ffffff",
|
|
34
|
+
"onSecondary": "#ffffff",
|
|
35
|
+
"onSuccessSurface": "#017d6d",
|
|
36
|
+
"onWarningSurface": "#ffa234",
|
|
37
|
+
"overlayGlobalSurface": "#000000",
|
|
38
|
+
"pressedSurface": "#914edf",
|
|
39
|
+
"primary": "#7622d7",
|
|
40
|
+
"primaryOutline": "#001f23",
|
|
41
|
+
"secondary": "#9f64e3",
|
|
42
|
+
"secondaryOutline": "#e8e9ea",
|
|
43
|
+
"success": "#5ace7d",
|
|
44
|
+
"successSurface": "#f0fef4",
|
|
45
|
+
"warning": "#ffbe71",
|
|
46
|
+
"warningSurface": "#fff6eb",
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`global returns correct theme object 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"archived": "#abacaf",
|
|
6
|
+
"archivedSurface": "#f1f2f3",
|
|
7
|
+
"darkGlobalSurface": "#001f23",
|
|
8
|
+
"defaultGlobalSurface": "#ffffff",
|
|
9
|
+
"disabledOnDefaultGlobalSurface": "#bfc1c5",
|
|
10
|
+
"disabledOutline": "#bfc1c5",
|
|
11
|
+
"error": "#f46363",
|
|
12
|
+
"errorSurface": "#fcebe7",
|
|
13
|
+
"inactiveOnDefaultGlobalSurface": "#808f91",
|
|
14
|
+
"inactiveOutline": "#808f91",
|
|
15
|
+
"info": "#b5c3fd",
|
|
16
|
+
"infoSurface": "#ecf0ff",
|
|
17
|
+
"mutedArchived": "#bcbdbf",
|
|
18
|
+
"mutedError": "#f68282",
|
|
19
|
+
"mutedInfo": "#c4cffd",
|
|
20
|
+
"mutedOnDefaultGlobalSurface": "#4d6265",
|
|
21
|
+
"mutedSuccess": "#7bd897",
|
|
22
|
+
"mutedWarning": "#ffcb8d",
|
|
23
|
+
"neutralGlobalSurface": "#f6f6f7",
|
|
24
|
+
"onArchivedSurface": "#737479",
|
|
25
|
+
"onDarkGlobalSurface": "#ffffff",
|
|
26
|
+
"onDefaultGlobalSurface": "#001f23",
|
|
27
|
+
"onErrorSurface": "#de350b",
|
|
28
|
+
"onInfoSurface": "#4568fb",
|
|
29
|
+
"onSuccessSurface": "#017d6d",
|
|
30
|
+
"onWarningSurface": "#ffa234",
|
|
31
|
+
"overlayGlobalSurface": "#000000",
|
|
32
|
+
"primaryOutline": "#001f23",
|
|
33
|
+
"secondaryOutline": "#e8e9ea",
|
|
34
|
+
"success": "#5ace7d",
|
|
35
|
+
"successSurface": "#f0fef4",
|
|
36
|
+
"warning": "#ffbe71",
|
|
37
|
+
"warningSurface": "#fff6eb",
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`globalDark returns correct theme object 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"archived": "#abacaf",
|
|
6
|
+
"archivedSurface": "#f1f2f3",
|
|
7
|
+
"darkGlobalSurface": "#ffffff",
|
|
8
|
+
"defaultGlobalSurface": "#001f23",
|
|
9
|
+
"disabledOnDefaultGlobalSurface": "#82858a",
|
|
10
|
+
"disabledOutline": "#82858a",
|
|
11
|
+
"error": "#f46363",
|
|
12
|
+
"errorSurface": "#fcebe7",
|
|
13
|
+
"inactiveOnDefaultGlobalSurface": "#99a5a7",
|
|
14
|
+
"inactiveOutline": "#99a5a7",
|
|
15
|
+
"info": "#b5c3fd",
|
|
16
|
+
"infoSurface": "#ecf0ff",
|
|
17
|
+
"mutedArchived": "#bcbdbf",
|
|
18
|
+
"mutedError": "#f68282",
|
|
19
|
+
"mutedInfo": "#c4cffd",
|
|
20
|
+
"mutedOnDefaultGlobalSurface": "#b3bcbd",
|
|
21
|
+
"mutedSuccess": "#7bd897",
|
|
22
|
+
"mutedWarning": "#ffcb8d",
|
|
23
|
+
"neutralGlobalSurface": "#264144",
|
|
24
|
+
"onArchivedSurface": "#737479",
|
|
25
|
+
"onDarkGlobalSurface": "#001f23",
|
|
26
|
+
"onDefaultGlobalSurface": "#ffffff",
|
|
27
|
+
"onErrorSurface": "#de350b",
|
|
28
|
+
"onInfoSurface": "#4568fb",
|
|
29
|
+
"onSuccessSurface": "#017d6d",
|
|
30
|
+
"onWarningSurface": "#ffa234",
|
|
31
|
+
"overlayGlobalSurface": "#727478",
|
|
32
|
+
"primaryOutline": "#ffffff",
|
|
33
|
+
"secondaryOutline": "#193539",
|
|
34
|
+
"success": "#5ace7d",
|
|
35
|
+
"successSurface": "#f0fef4",
|
|
36
|
+
"warning": "#ffbe71",
|
|
37
|
+
"warningSurface": "#fff6eb",
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`jobs returns correct theme object 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"archived": "#abacaf",
|
|
6
|
+
"archivedSurface": "#f1f2f3",
|
|
7
|
+
"darkGlobalSurface": "#001f23",
|
|
8
|
+
"decorativePrimary": "#ffad79",
|
|
9
|
+
"decorativePrimarySurface": "#ffefe4",
|
|
10
|
+
"defaultGlobalSurface": "#ffffff",
|
|
11
|
+
"defaultSurface": "#ffffff",
|
|
12
|
+
"disabledOnDefaultGlobalSurface": "#bfc1c5",
|
|
13
|
+
"disabledOutline": "#bfc1c5",
|
|
14
|
+
"error": "#f46363",
|
|
15
|
+
"errorSurface": "#fcebe7",
|
|
16
|
+
"highlightedSurface": "#fff7f2",
|
|
17
|
+
"inactiveOnDefaultGlobalSurface": "#808f91",
|
|
18
|
+
"inactiveOutline": "#808f91",
|
|
19
|
+
"info": "#b5c3fd",
|
|
20
|
+
"infoSurface": "#ecf0ff",
|
|
21
|
+
"mutedArchived": "#bcbdbf",
|
|
22
|
+
"mutedError": "#f68282",
|
|
23
|
+
"mutedInfo": "#c4cffd",
|
|
24
|
+
"mutedOnDefaultGlobalSurface": "#4d6265",
|
|
25
|
+
"mutedSuccess": "#7bd897",
|
|
26
|
+
"mutedWarning": "#ffcb8d",
|
|
27
|
+
"neutralGlobalSurface": "#f6f6f7",
|
|
28
|
+
"onArchivedSurface": "#737479",
|
|
29
|
+
"onDarkGlobalSurface": "#ffffff",
|
|
30
|
+
"onDefaultGlobalSurface": "#001f23",
|
|
31
|
+
"onErrorSurface": "#de350b",
|
|
32
|
+
"onInfoSurface": "#4568fb",
|
|
33
|
+
"onPrimary": "#ffffff",
|
|
34
|
+
"onSecondary": "#ffffff",
|
|
35
|
+
"onSuccessSurface": "#017d6d",
|
|
36
|
+
"onWarningSurface": "#ffa234",
|
|
37
|
+
"overlayGlobalSurface": "#000000",
|
|
38
|
+
"pressedSurface": "#e6703f",
|
|
39
|
+
"primary": "#e3602a",
|
|
40
|
+
"primaryOutline": "#001f23",
|
|
41
|
+
"secondary": "#4d6265",
|
|
42
|
+
"secondaryOutline": "#e8e9ea",
|
|
43
|
+
"success": "#5ace7d",
|
|
44
|
+
"successSurface": "#f0fef4",
|
|
45
|
+
"warning": "#ffbe71",
|
|
46
|
+
"warningSurface": "#fff6eb",
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`swag returns correct theme object 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"archived": "#abacaf",
|
|
6
|
+
"archivedSurface": "#f1f2f3",
|
|
7
|
+
"darkGlobalSurface": "#001f23",
|
|
8
|
+
"decorativePrimary": "#ffffff",
|
|
9
|
+
"decorativePrimarySurface": "#ccd2d3",
|
|
10
|
+
"defaultGlobalSurface": "#ffffff",
|
|
11
|
+
"defaultSurface": "#f6f6f7",
|
|
12
|
+
"disabledOnDefaultGlobalSurface": "#bfc1c5",
|
|
13
|
+
"disabledOutline": "#bfc1c5",
|
|
14
|
+
"error": "#f46363",
|
|
15
|
+
"errorSurface": "#fcebe7",
|
|
16
|
+
"highlightedSurface": "#ece8ef",
|
|
17
|
+
"inactiveOnDefaultGlobalSurface": "#808f91",
|
|
18
|
+
"inactiveOutline": "#808f91",
|
|
19
|
+
"info": "#b5c3fd",
|
|
20
|
+
"infoSurface": "#ecf0ff",
|
|
21
|
+
"mutedArchived": "#bcbdbf",
|
|
22
|
+
"mutedError": "#f68282",
|
|
23
|
+
"mutedInfo": "#c4cffd",
|
|
24
|
+
"mutedOnDefaultGlobalSurface": "#4d6265",
|
|
25
|
+
"mutedSuccess": "#7bd897",
|
|
26
|
+
"mutedWarning": "#ffcb8d",
|
|
27
|
+
"neutralGlobalSurface": "#f6f6f7",
|
|
28
|
+
"onArchivedSurface": "#737479",
|
|
29
|
+
"onDarkGlobalSurface": "#ffffff",
|
|
30
|
+
"onDefaultGlobalSurface": "#001f23",
|
|
31
|
+
"onErrorSurface": "#de350b",
|
|
32
|
+
"onInfoSurface": "#4568fb",
|
|
33
|
+
"onPrimary": "#ffffff",
|
|
34
|
+
"onSecondary": "#ffffff",
|
|
35
|
+
"onSuccessSurface": "#017d6d",
|
|
36
|
+
"onWarningSurface": "#ffa234",
|
|
37
|
+
"overlayGlobalSurface": "#000000",
|
|
38
|
+
"pressedSurface": "#664780",
|
|
39
|
+
"primary": "#401960",
|
|
40
|
+
"primaryOutline": "#001f23",
|
|
41
|
+
"secondary": "#795e90",
|
|
42
|
+
"secondaryOutline": "#e8e9ea",
|
|
43
|
+
"success": "#5ace7d",
|
|
44
|
+
"successSurface": "#f0fef4",
|
|
45
|
+
"warning": "#ffbe71",
|
|
46
|
+
"warningSurface": "#fff6eb",
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`swagDark returns correct theme object 1`] = `
|
|
4
|
+
Object {
|
|
5
|
+
"archived": "#abacaf",
|
|
6
|
+
"archivedSurface": "#f1f2f3",
|
|
7
|
+
"darkGlobalSurface": "#ffffff",
|
|
8
|
+
"decorativePrimary": "#001f23",
|
|
9
|
+
"decorativePrimarySurface": "#193539",
|
|
10
|
+
"defaultGlobalSurface": "#001f23",
|
|
11
|
+
"defaultSurface": "#001f23",
|
|
12
|
+
"disabledOnDefaultGlobalSurface": "#82858a",
|
|
13
|
+
"disabledOutline": "#82858a",
|
|
14
|
+
"error": "#f46363",
|
|
15
|
+
"errorSurface": "#fcebe7",
|
|
16
|
+
"highlightedSurface": "#160922",
|
|
17
|
+
"inactiveOnDefaultGlobalSurface": "#99a5a7",
|
|
18
|
+
"inactiveOutline": "#99a5a7",
|
|
19
|
+
"info": "#b5c3fd",
|
|
20
|
+
"infoSurface": "#ecf0ff",
|
|
21
|
+
"mutedArchived": "#bcbdbf",
|
|
22
|
+
"mutedError": "#f68282",
|
|
23
|
+
"mutedInfo": "#c4cffd",
|
|
24
|
+
"mutedOnDefaultGlobalSurface": "#b3bcbd",
|
|
25
|
+
"mutedSuccess": "#7bd897",
|
|
26
|
+
"mutedWarning": "#ffcb8d",
|
|
27
|
+
"neutralGlobalSurface": "#264144",
|
|
28
|
+
"onArchivedSurface": "#737479",
|
|
29
|
+
"onDarkGlobalSurface": "#001f23",
|
|
30
|
+
"onDefaultGlobalSurface": "#ffffff",
|
|
31
|
+
"onErrorSurface": "#de350b",
|
|
32
|
+
"onInfoSurface": "#4568fb",
|
|
33
|
+
"onPrimary": "#001f23",
|
|
34
|
+
"onSecondary": "#001f23",
|
|
35
|
+
"onSuccessSurface": "#017d6d",
|
|
36
|
+
"onWarningSurface": "#ffa234",
|
|
37
|
+
"overlayGlobalSurface": "#727478",
|
|
38
|
+
"pressedSurface": "#664780",
|
|
39
|
+
"primary": "#c38cee",
|
|
40
|
+
"primaryOutline": "#ffffff",
|
|
41
|
+
"secondary": "#d5aff3",
|
|
42
|
+
"secondaryOutline": "#193539",
|
|
43
|
+
"success": "#5ace7d",
|
|
44
|
+
"successSurface": "#f0fef4",
|
|
45
|
+
"warning": "#ffbe71",
|
|
46
|
+
"warningSurface": "#fff6eb",
|
|
47
|
+
}
|
|
48
|
+
`;
|