@hero-design/rn 8.36.2 → 8.37.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 +1 -1
- package/es/index.js +54 -90
- package/lib/index.js +54 -90
- package/package.json +7 -7
- package/src/components/Carousel/StyledCardCarousel.tsx +1 -1
- package/src/components/Carousel/__tests__/__snapshots__/CardCarousel.spec.tsx.snap +8 -8
- package/src/components/Checkbox/StyledCheckbox.tsx +7 -14
- package/src/components/Checkbox/__tests__/StyledCheckbox.spec.tsx +8 -12
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +4 -88
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +12 -324
- package/src/components/Checkbox/__tests__/index.spec.tsx +7 -12
- package/src/components/Checkbox/index.tsx +7 -1
- package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Drawer/index.tsx +3 -3
- package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +4 -15
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +18 -48
- package/src/components/FAB/ActionGroup/__tests__/index.spec.tsx +36 -29
- package/src/components/FAB/ActionGroup/index.tsx +18 -29
- package/src/components/FAB/StyledFAB.tsx +1 -1
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +4 -4
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
- package/src/components/List/StyledListItem.tsx +5 -5
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +6 -6
- package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +2 -2
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +5 -14
- package/src/components/Toast/StyledToast.tsx +1 -1
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +7 -7
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +20 -23
- package/src/theme/components/cardCarousel.ts +5 -5
- package/src/theme/components/fab.ts +5 -11
- package/src/theme/components/list.ts +7 -4
- package/src/theme/components/toast.ts +5 -5
- package/src/theme/global/shadows.ts +3 -3
- package/types/components/Checkbox/StyledCheckbox.d.ts +0 -1
- package/types/components/Checkbox/index.d.ts +1 -0
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +2 -7
- package/types/components/FAB/ActionGroup/index.d.ts +5 -0
- package/types/theme/components/cardCarousel.d.ts +1 -1
- package/types/theme/components/fab.d.ts +1 -7
- package/types/theme/components/list.d.ts +9 -6
- package/types/theme/components/toast.d.ts +1 -1
|
@@ -10,40 +10,37 @@ describe('ActionGroup', () => {
|
|
|
10
10
|
${true}
|
|
11
11
|
${false}
|
|
12
12
|
`('has active $active', ({ active }) => {
|
|
13
|
-
const { toJSON, getByTestId,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
/>
|
|
39
|
-
);
|
|
13
|
+
const { toJSON, getByTestId, queryByTestId } = renderWithTheme(
|
|
14
|
+
<ActionGroup
|
|
15
|
+
fabTitle="Shout out"
|
|
16
|
+
active={active}
|
|
17
|
+
items={[
|
|
18
|
+
{
|
|
19
|
+
icon: 'speaker',
|
|
20
|
+
title: 'Give shout out',
|
|
21
|
+
testID: 'speaker-action-item',
|
|
22
|
+
},
|
|
23
|
+
{ icon: 'target', title: 'Goal', testID: 'target-action-item' },
|
|
24
|
+
{
|
|
25
|
+
icon: 'plane',
|
|
26
|
+
title: 'Leave request',
|
|
27
|
+
testID: 'plane-action-item',
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
icon: 'health-bag',
|
|
31
|
+
title: 'Safety incident',
|
|
32
|
+
testID: 'health-bag-action-item',
|
|
33
|
+
},
|
|
34
|
+
{ icon: 'clock', title: 'Timesheets', testID: 'clock-action-item' },
|
|
35
|
+
]}
|
|
36
|
+
/>
|
|
37
|
+
);
|
|
40
38
|
|
|
41
39
|
expect(toJSON()).toMatchSnapshot();
|
|
42
40
|
|
|
43
41
|
if (active) {
|
|
44
42
|
// verify backdrop appears
|
|
45
43
|
expect(queryByTestId('back-drop')).toBeDefined();
|
|
46
|
-
expect(getByText('What would you like to create?')).toBeDefined();
|
|
47
44
|
expect(getByTestId('speaker-action-item')).toBeDefined();
|
|
48
45
|
expect(getByTestId('target-action-item')).toBeDefined();
|
|
49
46
|
expect(getByTestId('plane-action-item')).toBeDefined();
|
|
@@ -51,7 +48,6 @@ describe('ActionGroup', () => {
|
|
|
51
48
|
} else {
|
|
52
49
|
// verify backdrop disappears
|
|
53
50
|
expect(queryByTestId('back-drop')).toBeNull();
|
|
54
|
-
expect(queryByText('What would you like to create?')).toBeNull();
|
|
55
51
|
}
|
|
56
52
|
});
|
|
57
53
|
|
|
@@ -74,4 +70,15 @@ describe('ActionGroup', () => {
|
|
|
74
70
|
expect(onPressSpy).toBeCalledTimes(1);
|
|
75
71
|
});
|
|
76
72
|
});
|
|
73
|
+
|
|
74
|
+
describe('when user presses backdrop', () => {
|
|
75
|
+
it('calls onBackdropPress when active = true', () => {
|
|
76
|
+
const onBackdropPressSpy = jest.fn();
|
|
77
|
+
const { getByTestId } = renderWithTheme(
|
|
78
|
+
<ActionGroup onBackdropPress={onBackdropPressSpy} active />
|
|
79
|
+
);
|
|
80
|
+
fireEvent(getByTestId('back-drop'), 'press');
|
|
81
|
+
expect(onBackdropPressSpy).toBeCalledTimes(1);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
77
84
|
});
|
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
StyledContainer,
|
|
11
11
|
StyledContainerInModal,
|
|
12
12
|
StyledFAB,
|
|
13
|
-
StyledHeaderText,
|
|
14
13
|
} from './StyledActionGroup';
|
|
15
14
|
|
|
16
15
|
import Box from '../../Box';
|
|
17
16
|
import { FABHandles } from '../FAB';
|
|
17
|
+
import { useDeprecation } from '../../../utils/hooks';
|
|
18
18
|
|
|
19
19
|
export type ActionGroupHandles = {
|
|
20
20
|
showFAB: () => void;
|
|
@@ -24,6 +24,7 @@ export type ActionGroupHandles = {
|
|
|
24
24
|
|
|
25
25
|
export interface ActionGroupProps {
|
|
26
26
|
/**
|
|
27
|
+
* @deprecated headerTitle will be removed in the next major release.
|
|
27
28
|
* Title of the action group header.
|
|
28
29
|
*/
|
|
29
30
|
headerTitle?: string;
|
|
@@ -32,7 +33,10 @@ export interface ActionGroupProps {
|
|
|
32
33
|
* This function is called on pressing the FAB button.
|
|
33
34
|
* */
|
|
34
35
|
onPress?: () => void;
|
|
35
|
-
|
|
36
|
+
/**
|
|
37
|
+
* This function is called on pressing the FAB backdrop.
|
|
38
|
+
* */
|
|
39
|
+
onBackdropPress?: () => void;
|
|
36
40
|
/**
|
|
37
41
|
* Specify if the FAB button is in active state and the action group is shown.
|
|
38
42
|
* */
|
|
@@ -74,20 +78,20 @@ const ActionGroup = forwardRef<ActionGroupHandles, ActionGroupProps>(
|
|
|
74
78
|
items,
|
|
75
79
|
testID,
|
|
76
80
|
fabTitle,
|
|
81
|
+
onBackdropPress,
|
|
77
82
|
fabIcon = 'add',
|
|
78
83
|
},
|
|
79
84
|
ref
|
|
80
85
|
) => {
|
|
86
|
+
useDeprecation(
|
|
87
|
+
`FAB.ActionGroup's headerTitle prop will be removed in the next major release. Please remove it.`,
|
|
88
|
+
headerTitle !== undefined
|
|
89
|
+
);
|
|
90
|
+
|
|
81
91
|
const fabRef = useRef<FABHandles>(null);
|
|
82
92
|
const tranlateXAnimation = useRef<Animated.Value>(
|
|
83
93
|
new Animated.Value(active ? 1 : 0)
|
|
84
94
|
);
|
|
85
|
-
const titleTranslateYValue = React.useRef(new Animated.Value(0));
|
|
86
|
-
|
|
87
|
-
const titleTranslateY = titleTranslateYValue.current.interpolate({
|
|
88
|
-
inputRange: [0, 1],
|
|
89
|
-
outputRange: [50, 0],
|
|
90
|
-
});
|
|
91
95
|
|
|
92
96
|
React.useImperativeHandle(
|
|
93
97
|
ref,
|
|
@@ -100,16 +104,10 @@ const ActionGroup = forwardRef<ActionGroupHandles, ActionGroupProps>(
|
|
|
100
104
|
);
|
|
101
105
|
|
|
102
106
|
React.useEffect(() => {
|
|
103
|
-
Animated.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}),
|
|
108
|
-
Animated.spring(titleTranslateYValue.current, {
|
|
109
|
-
toValue: active ? 1 : 0,
|
|
110
|
-
useNativeDriver: Platform.OS !== 'web',
|
|
111
|
-
}),
|
|
112
|
-
]).start();
|
|
107
|
+
Animated.spring(tranlateXAnimation.current, {
|
|
108
|
+
toValue: active ? 1 : 0,
|
|
109
|
+
useNativeDriver: Platform.OS !== 'web',
|
|
110
|
+
}).start();
|
|
113
111
|
}, [active]);
|
|
114
112
|
const interpolatedActionGroupOpacityAnimation =
|
|
115
113
|
tranlateXAnimation.current.interpolate({
|
|
@@ -148,23 +146,14 @@ const ActionGroup = forwardRef<ActionGroupHandles, ActionGroupProps>(
|
|
|
148
146
|
statusBarTranslucent
|
|
149
147
|
>
|
|
150
148
|
<StyledContainerInModal testID={testID} style={[style]}>
|
|
151
|
-
<StyledBackdrop testID="back-drop" />
|
|
149
|
+
<StyledBackdrop testID="back-drop" onPress={onBackdropPress} />
|
|
152
150
|
<StyledActionGroupContainer
|
|
153
151
|
testID="action-group"
|
|
152
|
+
pointerEvents="box-none"
|
|
154
153
|
style={{
|
|
155
154
|
opacity: interpolatedActionGroupOpacityAnimation,
|
|
156
155
|
}}
|
|
157
156
|
>
|
|
158
|
-
{!!headerTitle && (
|
|
159
|
-
<Animated.View
|
|
160
|
-
style={{ transform: [{ translateY: titleTranslateY }] }}
|
|
161
|
-
>
|
|
162
|
-
<StyledHeaderText testID="header-text" level="h4">
|
|
163
|
-
{headerTitle}
|
|
164
|
-
</StyledHeaderText>
|
|
165
|
-
</Animated.View>
|
|
166
|
-
)}
|
|
167
|
-
|
|
168
157
|
<Box style={[style, { paddingBottom: 0 }]}>
|
|
169
158
|
{items?.map((itemProp, index) => (
|
|
170
159
|
<ActionItem
|
|
@@ -21,7 +21,7 @@ const StyledFAB = styled(TouchableHighlight)<
|
|
|
21
21
|
padding: theme.__hd__.fab.space.containerPadding,
|
|
22
22
|
flexDirection: 'row',
|
|
23
23
|
elevation: theme.__hd__.fab.shadows.elevation,
|
|
24
|
-
shadowColor: theme.__hd__.fab.
|
|
24
|
+
shadowColor: theme.__hd__.fab.shadows.color,
|
|
25
25
|
shadowOffset: theme.__hd__.fab.shadows.offset,
|
|
26
26
|
shadowRadius: theme.__hd__.fab.shadows.radius,
|
|
27
27
|
shadowOpacity: theme.__hd__.fab.shadows.opacity,
|
|
@@ -18,7 +18,7 @@ exports[`StyledFAB renders correctly 1`] = `
|
|
|
18
18
|
"alignSelf": "flex-start",
|
|
19
19
|
"backgroundColor": "#401960",
|
|
20
20
|
"borderRadius": 999,
|
|
21
|
-
"elevation":
|
|
21
|
+
"elevation": 3,
|
|
22
22
|
"flexDirection": "row",
|
|
23
23
|
"justifyContent": "center",
|
|
24
24
|
"padding": 20,
|
|
@@ -28,7 +28,7 @@ exports[`StyledFAB renders correctly 1`] = `
|
|
|
28
28
|
"width": 0,
|
|
29
29
|
},
|
|
30
30
|
"shadowOpacity": 0.12,
|
|
31
|
-
"shadowRadius":
|
|
31
|
+
"shadowRadius": 4,
|
|
32
32
|
},
|
|
33
33
|
undefined,
|
|
34
34
|
]
|
|
@@ -75,7 +75,7 @@ exports[`StyledFAB renders correctly 2`] = `
|
|
|
75
75
|
"alignSelf": "flex-start",
|
|
76
76
|
"backgroundColor": "#33144d",
|
|
77
77
|
"borderRadius": 999,
|
|
78
|
-
"elevation":
|
|
78
|
+
"elevation": 3,
|
|
79
79
|
"flexDirection": "row",
|
|
80
80
|
"justifyContent": "center",
|
|
81
81
|
"padding": 20,
|
|
@@ -85,7 +85,7 @@ exports[`StyledFAB renders correctly 2`] = `
|
|
|
85
85
|
"width": 0,
|
|
86
86
|
},
|
|
87
87
|
"shadowOpacity": 0.12,
|
|
88
|
-
"shadowRadius":
|
|
88
|
+
"shadowRadius": 4,
|
|
89
89
|
},
|
|
90
90
|
undefined,
|
|
91
91
|
]
|
|
@@ -19,7 +19,7 @@ exports[`FAB when animated is false renders StyledFABIcon 1`] = `
|
|
|
19
19
|
"alignSelf": "flex-start",
|
|
20
20
|
"backgroundColor": "#401960",
|
|
21
21
|
"borderRadius": 999,
|
|
22
|
-
"elevation":
|
|
22
|
+
"elevation": 3,
|
|
23
23
|
"flexDirection": "row",
|
|
24
24
|
"justifyContent": "center",
|
|
25
25
|
"padding": 20,
|
|
@@ -29,7 +29,7 @@ exports[`FAB when animated is false renders StyledFABIcon 1`] = `
|
|
|
29
29
|
"width": 0,
|
|
30
30
|
},
|
|
31
31
|
"shadowOpacity": 0.12,
|
|
32
|
-
"shadowRadius":
|
|
32
|
+
"shadowRadius": 4,
|
|
33
33
|
},
|
|
34
34
|
Array [
|
|
35
35
|
Object {
|
|
@@ -87,7 +87,7 @@ exports[`FAB when animated is true renders animatedFABIcon 1`] = `
|
|
|
87
87
|
"alignSelf": "flex-start",
|
|
88
88
|
"backgroundColor": "#401960",
|
|
89
89
|
"borderRadius": 999,
|
|
90
|
-
"elevation":
|
|
90
|
+
"elevation": 3,
|
|
91
91
|
"flexDirection": "row",
|
|
92
92
|
"justifyContent": "center",
|
|
93
93
|
"padding": 20,
|
|
@@ -97,7 +97,7 @@ exports[`FAB when animated is true renders animatedFABIcon 1`] = `
|
|
|
97
97
|
"width": 0,
|
|
98
98
|
},
|
|
99
99
|
"shadowOpacity": 0.12,
|
|
100
|
-
"shadowRadius":
|
|
100
|
+
"shadowRadius": 4,
|
|
101
101
|
},
|
|
102
102
|
Array [
|
|
103
103
|
Object {
|
|
@@ -185,7 +185,7 @@ exports[`FAB when title has value renders correctly 1`] = `
|
|
|
185
185
|
"alignSelf": "flex-start",
|
|
186
186
|
"backgroundColor": "#401960",
|
|
187
187
|
"borderRadius": 999,
|
|
188
|
-
"elevation":
|
|
188
|
+
"elevation": 3,
|
|
189
189
|
"flexDirection": "row",
|
|
190
190
|
"justifyContent": "center",
|
|
191
191
|
"padding": 20,
|
|
@@ -195,7 +195,7 @@ exports[`FAB when title has value renders correctly 1`] = `
|
|
|
195
195
|
"width": 0,
|
|
196
196
|
},
|
|
197
197
|
"shadowOpacity": 0.12,
|
|
198
|
-
"shadowRadius":
|
|
198
|
+
"shadowRadius": 4,
|
|
199
199
|
},
|
|
200
200
|
Array [
|
|
201
201
|
Object {
|
|
@@ -29,11 +29,11 @@ const StyledListItemContainer = styled(TouchableHighlight)<{
|
|
|
29
29
|
return {
|
|
30
30
|
...sharedStyles,
|
|
31
31
|
alignItems: 'center',
|
|
32
|
-
shadowColor: theme.
|
|
33
|
-
shadowRadius: theme.__hd__.list.
|
|
34
|
-
shadowOffset: theme.__hd__.list.shadows.
|
|
35
|
-
shadowOpacity: theme.__hd__.list.opacity
|
|
36
|
-
elevation: theme.__hd__.list.shadows.
|
|
32
|
+
shadowColor: theme.__hd__.list.shadows.card.color,
|
|
33
|
+
shadowRadius: theme.__hd__.list.shadows.card.radius,
|
|
34
|
+
shadowOffset: theme.__hd__.list.shadows.card.offset,
|
|
35
|
+
shadowOpacity: theme.__hd__.list.shadows.card.opacity,
|
|
36
|
+
elevation: theme.__hd__.list.shadows.card.elevation,
|
|
37
37
|
};
|
|
38
38
|
default:
|
|
39
39
|
return sharedStyles;
|
|
@@ -102,15 +102,15 @@ exports[`ListItemContainer renders correctly themeSelected false themeVariant ca
|
|
|
102
102
|
"alignItems": "center",
|
|
103
103
|
"backgroundColor": "#ffffff",
|
|
104
104
|
"borderRadius": 8,
|
|
105
|
-
"elevation":
|
|
105
|
+
"elevation": 3,
|
|
106
106
|
"flexDirection": "row",
|
|
107
107
|
"padding": 16,
|
|
108
|
-
"shadowColor": "#
|
|
108
|
+
"shadowColor": "#001f23",
|
|
109
109
|
"shadowOffset": Object {
|
|
110
110
|
"height": 2,
|
|
111
111
|
"width": 0,
|
|
112
112
|
},
|
|
113
|
-
"shadowOpacity":
|
|
113
|
+
"shadowOpacity": 0.12,
|
|
114
114
|
"shadowRadius": 4,
|
|
115
115
|
},
|
|
116
116
|
undefined,
|
|
@@ -203,15 +203,15 @@ exports[`ListItemContainer renders correctly themeSelected true themeVariant car
|
|
|
203
203
|
"alignItems": "center",
|
|
204
204
|
"backgroundColor": "#ece8ef",
|
|
205
205
|
"borderRadius": 8,
|
|
206
|
-
"elevation":
|
|
206
|
+
"elevation": 3,
|
|
207
207
|
"flexDirection": "row",
|
|
208
208
|
"padding": 16,
|
|
209
|
-
"shadowColor": "#
|
|
209
|
+
"shadowColor": "#001f23",
|
|
210
210
|
"shadowOffset": Object {
|
|
211
211
|
"height": 2,
|
|
212
212
|
"width": 0,
|
|
213
213
|
},
|
|
214
|
-
"shadowOpacity":
|
|
214
|
+
"shadowOpacity": 0.12,
|
|
215
215
|
"shadowRadius": 4,
|
|
216
216
|
},
|
|
217
217
|
undefined,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import renderWithTheme from '../../../testHelpers/renderWithTheme';
|
|
3
|
-
import { StyledHeaderText } from '../../FAB/ActionGroup/StyledActionGroup';
|
|
4
3
|
import {
|
|
4
|
+
StyledHelperText,
|
|
5
5
|
StyledLabel,
|
|
6
6
|
StyledTextInput,
|
|
7
7
|
StyledMaxLengthMessage,
|
|
@@ -113,7 +113,7 @@ describe('StyledMaxLengthMessage', () => {
|
|
|
113
113
|
describe('StyledHelperText', () => {
|
|
114
114
|
it('renders correctly', (): void => {
|
|
115
115
|
const { toJSON } = renderWithTheme(
|
|
116
|
-
<
|
|
116
|
+
<StyledHelperText>helper text</StyledHelperText>
|
|
117
117
|
);
|
|
118
118
|
|
|
119
119
|
expect(toJSON()).toMatchSnapshot();
|
|
@@ -659,24 +659,15 @@ exports[`StyledHelperText renders correctly 1`] = `
|
|
|
659
659
|
Object {
|
|
660
660
|
"color": "#001f23",
|
|
661
661
|
"fontFamily": "BeVietnamPro-Regular",
|
|
662
|
-
"fontSize":
|
|
663
|
-
"letterSpacing": 0,
|
|
664
|
-
"lineHeight":
|
|
662
|
+
"fontSize": 12,
|
|
663
|
+
"letterSpacing": 0.48,
|
|
664
|
+
"lineHeight": 16,
|
|
665
665
|
},
|
|
666
|
-
|
|
667
|
-
Object {
|
|
668
|
-
"color": "#001f23",
|
|
669
|
-
"marginBottom": 24,
|
|
670
|
-
"marginRight": 24,
|
|
671
|
-
"textAlign": "right",
|
|
672
|
-
},
|
|
673
|
-
undefined,
|
|
674
|
-
],
|
|
666
|
+
undefined,
|
|
675
667
|
]
|
|
676
668
|
}
|
|
669
|
+
themeFontWeight="regular"
|
|
677
670
|
themeIntent="body"
|
|
678
|
-
themeLevel="h1"
|
|
679
|
-
themeTypeface="neutral"
|
|
680
671
|
>
|
|
681
672
|
helper text
|
|
682
673
|
</Text>
|
|
@@ -22,7 +22,7 @@ const Container = styled(Animated.View)<{
|
|
|
22
22
|
backgroundColor: theme.__hd__.toast.colors[themeIntent],
|
|
23
23
|
minHeight: theme.__hd__.toast.sizes.height,
|
|
24
24
|
flexDirection: 'row',
|
|
25
|
-
shadowColor: theme.__hd__.toast.
|
|
25
|
+
shadowColor: theme.__hd__.toast.shadows.color,
|
|
26
26
|
shadowOffset: theme.__hd__.toast.shadows.offset,
|
|
27
27
|
shadowRadius: theme.__hd__.toast.shadows.radius,
|
|
28
28
|
shadowOpacity: theme.__hd__.toast.shadows.opacity,
|
|
@@ -7,7 +7,7 @@ exports[`Toast Icon render custom icon correctly 1`] = `
|
|
|
7
7
|
Object {
|
|
8
8
|
"backgroundColor": "#b5c3fd",
|
|
9
9
|
"borderRadius": 0,
|
|
10
|
-
"elevation":
|
|
10
|
+
"elevation": 3,
|
|
11
11
|
"flexDirection": "row",
|
|
12
12
|
"minHeight": 48,
|
|
13
13
|
"opacity": 0,
|
|
@@ -113,7 +113,7 @@ exports[`Toast renders correctly when intent is error 1`] = `
|
|
|
113
113
|
Object {
|
|
114
114
|
"backgroundColor": "#f46363",
|
|
115
115
|
"borderRadius": 0,
|
|
116
|
-
"elevation":
|
|
116
|
+
"elevation": 3,
|
|
117
117
|
"flexDirection": "row",
|
|
118
118
|
"minHeight": 48,
|
|
119
119
|
"opacity": 0,
|
|
@@ -260,7 +260,7 @@ exports[`Toast renders correctly when intent is info 1`] = `
|
|
|
260
260
|
Object {
|
|
261
261
|
"backgroundColor": "#b5c3fd",
|
|
262
262
|
"borderRadius": 0,
|
|
263
|
-
"elevation":
|
|
263
|
+
"elevation": 3,
|
|
264
264
|
"flexDirection": "row",
|
|
265
265
|
"minHeight": 48,
|
|
266
266
|
"opacity": 0,
|
|
@@ -407,7 +407,7 @@ exports[`Toast renders correctly when intent is notification 1`] = `
|
|
|
407
407
|
Object {
|
|
408
408
|
"backgroundColor": "#ffffff",
|
|
409
409
|
"borderRadius": 0,
|
|
410
|
-
"elevation":
|
|
410
|
+
"elevation": 3,
|
|
411
411
|
"flexDirection": "row",
|
|
412
412
|
"minHeight": 48,
|
|
413
413
|
"opacity": 0,
|
|
@@ -527,7 +527,7 @@ exports[`Toast renders correctly when intent is snackbar 1`] = `
|
|
|
527
527
|
Object {
|
|
528
528
|
"backgroundColor": "#001f23",
|
|
529
529
|
"borderRadius": 0,
|
|
530
|
-
"elevation":
|
|
530
|
+
"elevation": 3,
|
|
531
531
|
"flexDirection": "row",
|
|
532
532
|
"minHeight": 48,
|
|
533
533
|
"opacity": 0,
|
|
@@ -647,7 +647,7 @@ exports[`Toast renders correctly when intent is success 1`] = `
|
|
|
647
647
|
Object {
|
|
648
648
|
"backgroundColor": "#5ace7d",
|
|
649
649
|
"borderRadius": 0,
|
|
650
|
-
"elevation":
|
|
650
|
+
"elevation": 3,
|
|
651
651
|
"flexDirection": "row",
|
|
652
652
|
"minHeight": 48,
|
|
653
653
|
"opacity": 0,
|
|
@@ -794,7 +794,7 @@ exports[`Toast renders correctly when intent is warning 1`] = `
|
|
|
794
794
|
Object {
|
|
795
795
|
"backgroundColor": "#ffbe71",
|
|
796
796
|
"borderRadius": 0,
|
|
797
|
-
"elevation":
|
|
797
|
+
"elevation": 3,
|
|
798
798
|
"flexDirection": "row",
|
|
799
799
|
"minHeight": 48,
|
|
800
800
|
"opacity": 0,
|
|
@@ -288,19 +288,19 @@ Object {
|
|
|
288
288
|
"cardCarousel": Object {
|
|
289
289
|
"colors": Object {
|
|
290
290
|
"carouselItemBackground": "#f6f6f7",
|
|
291
|
-
"shadow": "#001f23",
|
|
292
291
|
},
|
|
293
292
|
"radii": Object {
|
|
294
293
|
"card": 8,
|
|
295
294
|
},
|
|
296
295
|
"shadows": Object {
|
|
297
|
-
"
|
|
296
|
+
"color": "#001f23",
|
|
297
|
+
"elevation": 3,
|
|
298
298
|
"offset": Object {
|
|
299
299
|
"height": 2,
|
|
300
300
|
"width": 0,
|
|
301
301
|
},
|
|
302
302
|
"opacity": 0.12,
|
|
303
|
-
"radius":
|
|
303
|
+
"radius": 4,
|
|
304
304
|
},
|
|
305
305
|
"space": Object {
|
|
306
306
|
"carouselItemSpacing": 8,
|
|
@@ -473,24 +473,19 @@ Object {
|
|
|
473
473
|
"buttonActiveBackground": "#33144d",
|
|
474
474
|
"buttonBackground": "#401960",
|
|
475
475
|
"buttonPressedBackground": "#33144d",
|
|
476
|
-
"headerText": "#001f23",
|
|
477
476
|
"icon": "#ffffff",
|
|
478
|
-
"shadow": "#001f23",
|
|
479
477
|
"titleText": "#ffffff",
|
|
480
478
|
},
|
|
481
479
|
"fontSizes": Object {
|
|
482
480
|
"actionItemText": 16,
|
|
483
|
-
"header": 24,
|
|
484
481
|
"title": 16,
|
|
485
482
|
},
|
|
486
483
|
"fonts": Object {
|
|
487
484
|
"actionItemText": "BeVietnamPro-Regular",
|
|
488
|
-
"header": "BeVietnamPro-SemiBold",
|
|
489
485
|
"title": "BeVietnamPro-SemiBold",
|
|
490
486
|
},
|
|
491
487
|
"lineHeights": Object {
|
|
492
488
|
"actionItemText": 22,
|
|
493
|
-
"header": 32,
|
|
494
489
|
"icon": 24,
|
|
495
490
|
"title": 24,
|
|
496
491
|
},
|
|
@@ -498,13 +493,14 @@ Object {
|
|
|
498
493
|
"actionItem": 999,
|
|
499
494
|
},
|
|
500
495
|
"shadows": Object {
|
|
501
|
-
"
|
|
496
|
+
"color": "#001f23",
|
|
497
|
+
"elevation": 3,
|
|
502
498
|
"offset": Object {
|
|
503
499
|
"height": 2,
|
|
504
500
|
"width": 0,
|
|
505
501
|
},
|
|
506
502
|
"opacity": 0.12,
|
|
507
|
-
"radius":
|
|
503
|
+
"radius": 4,
|
|
508
504
|
},
|
|
509
505
|
"sizes": Object {
|
|
510
506
|
"height": 64,
|
|
@@ -520,8 +516,6 @@ Object {
|
|
|
520
516
|
"buttonMarginRight": 24,
|
|
521
517
|
"buttonMarginTop": 24,
|
|
522
518
|
"containerPadding": 20,
|
|
523
|
-
"headerTextMarginBottom": 24,
|
|
524
|
-
"headerTextMarginRight": 24,
|
|
525
519
|
"titleMarginHorizontal": 8,
|
|
526
520
|
},
|
|
527
521
|
},
|
|
@@ -564,21 +558,24 @@ Object {
|
|
|
564
558
|
"listItemContainerBackground": "#ffffff",
|
|
565
559
|
},
|
|
566
560
|
"opacity": Object {
|
|
567
|
-
"cardShadow": 1,
|
|
568
561
|
"disabled": 0.38,
|
|
569
562
|
"enabled": 1,
|
|
570
563
|
},
|
|
571
564
|
"radii": Object {
|
|
572
565
|
"basicItem": 4,
|
|
573
|
-
"cardShadow": 4,
|
|
574
566
|
"item": 8,
|
|
575
567
|
"leadingStatus": 999,
|
|
576
568
|
},
|
|
577
569
|
"shadows": Object {
|
|
578
|
-
"
|
|
579
|
-
|
|
580
|
-
"
|
|
581
|
-
"
|
|
570
|
+
"card": Object {
|
|
571
|
+
"color": "#001f23",
|
|
572
|
+
"elevation": 3,
|
|
573
|
+
"offset": Object {
|
|
574
|
+
"height": 2,
|
|
575
|
+
"width": 0,
|
|
576
|
+
},
|
|
577
|
+
"opacity": 0.12,
|
|
578
|
+
"radius": 4,
|
|
582
579
|
},
|
|
583
580
|
},
|
|
584
581
|
"space": Object {
|
|
@@ -1053,7 +1050,6 @@ Object {
|
|
|
1053
1050
|
"error": "#f46363",
|
|
1054
1051
|
"info": "#b5c3fd",
|
|
1055
1052
|
"notification": "#ffffff",
|
|
1056
|
-
"shadow": "#001f23",
|
|
1057
1053
|
"snackbar": "#001f23",
|
|
1058
1054
|
"success": "#5ace7d",
|
|
1059
1055
|
"warning": "#ffbe71",
|
|
@@ -1062,7 +1058,8 @@ Object {
|
|
|
1062
1058
|
"default": 16,
|
|
1063
1059
|
},
|
|
1064
1060
|
"shadows": Object {
|
|
1065
|
-
"
|
|
1061
|
+
"color": "#001f23",
|
|
1062
|
+
"elevation": 3,
|
|
1066
1063
|
"offset": Object {
|
|
1067
1064
|
"height": 2,
|
|
1068
1065
|
"width": 0,
|
|
@@ -1383,13 +1380,13 @@ Object {
|
|
|
1383
1380
|
},
|
|
1384
1381
|
"shadows": Object {
|
|
1385
1382
|
"default": Object {
|
|
1386
|
-
"elevation":
|
|
1387
|
-
"shadowColor": "#
|
|
1383
|
+
"elevation": 3,
|
|
1384
|
+
"shadowColor": "#001f23",
|
|
1388
1385
|
"shadowOffset": Object {
|
|
1389
1386
|
"height": 2,
|
|
1390
1387
|
"width": 0,
|
|
1391
1388
|
},
|
|
1392
|
-
"shadowOpacity":
|
|
1389
|
+
"shadowOpacity": 0.12,
|
|
1393
1390
|
"shadowRadius": 4,
|
|
1394
1391
|
},
|
|
1395
1392
|
},
|
|
@@ -8,14 +8,14 @@ const getCardCarouselTheme = (theme: GlobalTheme) => {
|
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
const colors = {
|
|
11
|
-
shadow: theme.colors.primaryOutline,
|
|
12
11
|
carouselItemBackground: theme.colors.defaultSurface,
|
|
13
12
|
};
|
|
14
13
|
const shadows = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
color: theme.shadows.default.shadowColor,
|
|
15
|
+
offset: theme.shadows.default.shadowOffset,
|
|
16
|
+
opacity: theme.shadows.default.shadowOpacity,
|
|
17
|
+
radius: theme.shadows.default.shadowRadius,
|
|
18
|
+
elevation: theme.shadows.default.elevation,
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
const radii = {
|