@hero-design/rn 8.91.7 → 8.92.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 +2 -2
- package/CHANGELOG.md +22 -0
- package/es/index.js +236 -190
- package/lib/index.js +239 -191
- package/package.json +2 -2
- package/src/components/FAB/ActionGroup/StyledActionGroup.tsx +12 -2
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +33 -15
- package/src/components/FAB/ActionGroup/index.tsx +14 -3
- package/src/index.ts +4 -0
- package/src/theme/ThemeSwitcher.tsx +7 -2
- package/src/theme/global/colors/__tests__/__snapshots__/ehJobs.spec.ts.snap +54 -0
- package/src/theme/global/colors/__tests__/__snapshots__/ehWork.spec.js.snap +53 -0
- package/src/theme/global/colors/__tests__/ehJobs.spec.ts +7 -0
- package/src/theme/global/colors/__tests__/ehWork.spec.js +7 -0
- package/src/theme/global/colors/ehJobs.ts +14 -0
- package/src/theme/global/colors/ehWork.ts +27 -0
- package/src/theme/global/colors/swagLight.ts +6 -21
- package/src/theme/global/colors/swagLightJobs.ts +5 -7
- package/src/theme/global/colors/swagSystemPalette.ts +9 -0
- package/src/theme/global/colors/types.ts +6 -1
- package/src/theme/global/index.ts +4 -0
- package/src/theme/global/shadows/__tests__/__snapshots__/{swagLightJobs.spec.ts.snap → ehJobs.spec.ts.snap} +1 -1
- package/src/theme/global/shadows/__tests__/ehJobs.spec.ts +7 -0
- package/src/theme/global/shadows/__tests__/ehWork.spec.ts +7 -0
- package/src/theme/global/shadows/__tests__/index.spec.ts +11 -7
- package/src/theme/global/shadows/{swagLightJobs.ts → ehJobs.ts} +4 -4
- package/src/theme/global/shadows/{swagLight.ts → ehWork.ts} +2 -2
- package/src/theme/global/shadows/index.ts +9 -5
- package/src/theme/index.ts +4 -0
- package/stats/8.91.8/rn-stats.html +4842 -0
- package/stats/8.92.0/rn-stats.html +4842 -0
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +6 -2
- package/types/index.d.ts +2 -2
- package/types/theme/ThemeSwitcher.d.ts +1 -1
- package/types/theme/global/colors/__tests__/ehWork.spec.d.ts +1 -0
- package/types/theme/global/colors/ehJobs.d.ts +3 -0
- package/types/theme/global/colors/ehWork.d.ts +3 -0
- package/types/theme/global/colors/swagLight.d.ts +4 -1
- package/types/theme/global/colors/swagLightJobs.d.ts +3 -0
- package/types/theme/global/colors/swagSystemPalette.d.ts +3 -0
- package/types/theme/global/colors/types.d.ts +1 -1
- package/types/theme/global/index.d.ts +3 -1
- package/types/theme/global/shadows/ehJobs.d.ts +3 -0
- package/types/theme/global/shadows/ehWork.d.ts +3 -0
- package/types/theme/index.d.ts +2 -2
- package/src/theme/global/shadows/__tests__/swagLight.spec.ts +0 -7
- package/src/theme/global/shadows/__tests__/swagLightJobs.spec.ts +0 -7
- package/types/theme/global/shadows/swagLight.d.ts +0 -3
- package/types/theme/global/shadows/swagLightJobs.d.ts +0 -3
- /package/src/theme/global/shadows/__tests__/__snapshots__/{swagLight.spec.ts.snap → ehWork.spec.ts.snap} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hero-design/rn",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.92.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@emotion/native": "^11.9.3",
|
|
23
23
|
"@emotion/primitives-core": "11.0.0",
|
|
24
24
|
"@emotion/react": "^11.9.3",
|
|
25
|
-
"@hero-design/colors": "8.
|
|
25
|
+
"@hero-design/colors": "8.46.0",
|
|
26
26
|
"date-fns": "^2.16.1",
|
|
27
27
|
"hero-editor": "^1.15.5",
|
|
28
28
|
"nanoid": "^5.0.9"
|
|
@@ -3,6 +3,7 @@ import styled from '@emotion/native';
|
|
|
3
3
|
import type { ComponentProps } from 'react';
|
|
4
4
|
import type { ViewProps } from 'react-native';
|
|
5
5
|
import FAB from '../FAB';
|
|
6
|
+
import Box from '../../Box';
|
|
6
7
|
|
|
7
8
|
const StyledContainer = styled(View)<ViewProps>({
|
|
8
9
|
position: 'absolute',
|
|
@@ -38,8 +39,16 @@ const StyledFAB = styled(FAB)(({ theme }) => ({
|
|
|
38
39
|
alignSelf: 'flex-end',
|
|
39
40
|
}));
|
|
40
41
|
|
|
41
|
-
const
|
|
42
|
-
|
|
42
|
+
const StyledBackdropPressable = styled(Pressable)(() => ({
|
|
43
|
+
position: 'absolute',
|
|
44
|
+
left: 0,
|
|
45
|
+
right: 0,
|
|
46
|
+
top: 0,
|
|
47
|
+
bottom: 0,
|
|
48
|
+
backgroundColor: 'transparent',
|
|
49
|
+
}));
|
|
50
|
+
|
|
51
|
+
const StyledBackdrop = styled(Box)(({ theme }) => ({
|
|
43
52
|
position: 'absolute',
|
|
44
53
|
left: 0,
|
|
45
54
|
right: 0,
|
|
@@ -52,6 +61,7 @@ const StyledBackdrop = styled(AnimatedPressable)(({ theme }) => ({
|
|
|
52
61
|
export {
|
|
53
62
|
StyledActionGroupContainer,
|
|
54
63
|
StyledBackdrop,
|
|
64
|
+
StyledBackdropPressable,
|
|
55
65
|
StyledContainer,
|
|
56
66
|
StyledContainerInModal,
|
|
57
67
|
StyledFAB,
|
|
@@ -408,15 +408,17 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
408
408
|
onResponderTerminationRequest={[Function]}
|
|
409
409
|
onStartShouldSetResponder={[Function]}
|
|
410
410
|
style={
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
411
|
+
[
|
|
412
|
+
{
|
|
413
|
+
"backgroundColor": "transparent",
|
|
414
|
+
"bottom": 0,
|
|
415
|
+
"left": 0,
|
|
416
|
+
"position": "absolute",
|
|
417
|
+
"right": 0,
|
|
418
|
+
"top": 0,
|
|
419
|
+
},
|
|
420
|
+
undefined,
|
|
421
|
+
]
|
|
420
422
|
}
|
|
421
423
|
testID="back-drop"
|
|
422
424
|
/>
|
|
@@ -437,12 +439,9 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
437
439
|
style={
|
|
438
440
|
[
|
|
439
441
|
{},
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
"paddingBottom": 0,
|
|
444
|
-
},
|
|
445
|
-
],
|
|
442
|
+
{
|
|
443
|
+
"paddingBottom": 0,
|
|
444
|
+
},
|
|
446
445
|
]
|
|
447
446
|
}
|
|
448
447
|
>
|
|
@@ -1171,6 +1170,25 @@ exports[`ActionGroup has active true 1`] = `
|
|
|
1171
1170
|
</View>
|
|
1172
1171
|
</Modal>
|
|
1173
1172
|
</View>
|
|
1173
|
+
<View
|
|
1174
|
+
style={
|
|
1175
|
+
[
|
|
1176
|
+
{},
|
|
1177
|
+
[
|
|
1178
|
+
{
|
|
1179
|
+
"backgroundColor": "#000000",
|
|
1180
|
+
"bottom": 0,
|
|
1181
|
+
"left": 0,
|
|
1182
|
+
"opacity": 0.4,
|
|
1183
|
+
"position": "absolute",
|
|
1184
|
+
"right": 0,
|
|
1185
|
+
"top": 0,
|
|
1186
|
+
},
|
|
1187
|
+
undefined,
|
|
1188
|
+
],
|
|
1189
|
+
]
|
|
1190
|
+
}
|
|
1191
|
+
/>
|
|
1174
1192
|
<View
|
|
1175
1193
|
pointerEvents="box-none"
|
|
1176
1194
|
position="bottom"
|
|
@@ -7,11 +7,12 @@ import ActionItem from './ActionItem';
|
|
|
7
7
|
import {
|
|
8
8
|
StyledActionGroupContainer,
|
|
9
9
|
StyledBackdrop,
|
|
10
|
+
StyledBackdropPressable,
|
|
10
11
|
StyledContainer,
|
|
11
12
|
StyledContainerInModal,
|
|
12
13
|
StyledFAB,
|
|
13
14
|
} from './StyledActionGroup';
|
|
14
|
-
|
|
15
|
+
import Portal from '../../Portal';
|
|
15
16
|
import Box from '../../Box';
|
|
16
17
|
import { FABHandles } from '../FAB';
|
|
17
18
|
import { useDeprecation } from '../../../utils/hooks';
|
|
@@ -151,7 +152,17 @@ const ActionGroup = forwardRef<ActionGroupHandles, ActionGroupProps>(
|
|
|
151
152
|
supportedOrientations={supportedOrientations}
|
|
152
153
|
>
|
|
153
154
|
<StyledContainerInModal testID={testID} style={[style]}>
|
|
154
|
-
<
|
|
155
|
+
<StyledBackdropPressable
|
|
156
|
+
testID="back-drop"
|
|
157
|
+
onPress={onBackdropPress}
|
|
158
|
+
>
|
|
159
|
+
{active && (
|
|
160
|
+
<Portal>
|
|
161
|
+
<StyledBackdrop />
|
|
162
|
+
</Portal>
|
|
163
|
+
)}
|
|
164
|
+
</StyledBackdropPressable>
|
|
165
|
+
|
|
155
166
|
<StyledActionGroupContainer
|
|
156
167
|
testID="action-group"
|
|
157
168
|
pointerEvents="box-none"
|
|
@@ -159,7 +170,7 @@ const ActionGroup = forwardRef<ActionGroupHandles, ActionGroupProps>(
|
|
|
159
170
|
opacity: actionGroupOpacity,
|
|
160
171
|
}}
|
|
161
172
|
>
|
|
162
|
-
<Box style={
|
|
173
|
+
<Box style={{ paddingBottom: 0 }}>
|
|
163
174
|
{items?.map((itemProp, index) => (
|
|
164
175
|
<ActionItem
|
|
165
176
|
key={itemProp.key || `${itemProp.icon}_${itemProp.title}`}
|
package/src/index.ts
CHANGED
|
@@ -13,6 +13,8 @@ import theme, {
|
|
|
13
13
|
ehWorkDarkSystemPalette,
|
|
14
14
|
ThemeSwitcher,
|
|
15
15
|
withTheme,
|
|
16
|
+
ehWorkSystemPalette,
|
|
17
|
+
ehJobsSystemPalette,
|
|
16
18
|
} from './theme';
|
|
17
19
|
import { scale } from './utils/scale';
|
|
18
20
|
|
|
@@ -92,6 +94,8 @@ export {
|
|
|
92
94
|
walletSystemPalette,
|
|
93
95
|
eBensSystemPalette,
|
|
94
96
|
ehWorkDarkSystemPalette,
|
|
97
|
+
ehWorkSystemPalette,
|
|
98
|
+
ehJobsSystemPalette,
|
|
95
99
|
Accordion,
|
|
96
100
|
Alert,
|
|
97
101
|
AppCue,
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
swagDarkSystemPalette,
|
|
12
12
|
ehWorkDarkSystemPalette,
|
|
13
13
|
swagLightSystemPalette,
|
|
14
|
+
swagLightJobsSystemPalette,
|
|
14
15
|
} from './global';
|
|
15
16
|
import ThemeProvider from './ThemeProvider';
|
|
16
17
|
|
|
@@ -22,7 +23,9 @@ type ThemeName =
|
|
|
22
23
|
| 'jobs'
|
|
23
24
|
| 'wallet'
|
|
24
25
|
| 'eBens'
|
|
25
|
-
| 'ehWorkDark'
|
|
26
|
+
| 'ehWorkDark'
|
|
27
|
+
| 'ehWork'
|
|
28
|
+
| 'ehJobs';
|
|
26
29
|
|
|
27
30
|
const ThemeSwitcher = ({
|
|
28
31
|
name = 'swag',
|
|
@@ -46,9 +49,12 @@ const ThemeSwitcher = ({
|
|
|
46
49
|
case 'swagDark':
|
|
47
50
|
return getTheme(defaultScale, swagDarkSystemPalette);
|
|
48
51
|
case 'swagLight':
|
|
52
|
+
case 'ehWork':
|
|
49
53
|
return getTheme(defaultScale, swagLightSystemPalette);
|
|
50
54
|
case 'ehWorkDark':
|
|
51
55
|
return getTheme(defaultScale, ehWorkDarkSystemPalette);
|
|
56
|
+
case 'ehJobs':
|
|
57
|
+
return getTheme(defaultScale, swagLightJobsSystemPalette);
|
|
52
58
|
}
|
|
53
59
|
}, [name]);
|
|
54
60
|
return <ThemeProvider theme={theme}>{children}</ThemeProvider>;
|
|
@@ -66,5 +72,4 @@ export const withTheme =
|
|
|
66
72
|
</ThemeSwitcher>
|
|
67
73
|
);
|
|
68
74
|
};
|
|
69
|
-
|
|
70
75
|
export default ThemeSwitcher;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`ehJobs returns correct theme object 1`] = `
|
|
4
|
+
{
|
|
5
|
+
"archived": "#abacaf",
|
|
6
|
+
"archivedSurface": "#dadbde",
|
|
7
|
+
"black": "#000000",
|
|
8
|
+
"darkGlobalSurface": "#001f23",
|
|
9
|
+
"decorativePrimary": "#fdfbff",
|
|
10
|
+
"decorativePrimarySurface": "#dacce4",
|
|
11
|
+
"decorativeSecondary": "#fdfbff",
|
|
12
|
+
"decorativeSecondarySurface": "#d9f6ff",
|
|
13
|
+
"defaultGlobalSurface": "#ffffff",
|
|
14
|
+
"defaultSurface": "#fdfbff",
|
|
15
|
+
"disabledOnDefaultGlobalSurface": "#bfc1c5",
|
|
16
|
+
"disabledOutline": "#bfc1c5",
|
|
17
|
+
"error": "#f46363",
|
|
18
|
+
"errorSurface": "#fcebe7",
|
|
19
|
+
"highlightedSurface": "#f1e9fb",
|
|
20
|
+
"inactiveOnDefaultGlobalSurface": "#808f91",
|
|
21
|
+
"inactiveOutline": "#808f91",
|
|
22
|
+
"info": "#b5c3fd",
|
|
23
|
+
"infoSurface": "#ecf0ff",
|
|
24
|
+
"mutedArchived": "#bcbdbf",
|
|
25
|
+
"mutedError": "#f68282",
|
|
26
|
+
"mutedInfo": "#c4cffd",
|
|
27
|
+
"mutedOnDefaultGlobalSurface": "#4d6265",
|
|
28
|
+
"mutedSuccess": "#7bd897",
|
|
29
|
+
"mutedWarning": "#ffcb8d",
|
|
30
|
+
"name": "ehJobs",
|
|
31
|
+
"neutralGlobalSurface": "#f6f6f7",
|
|
32
|
+
"onArchivedSurface": "#606065",
|
|
33
|
+
"onDarkGlobalSurface": "#ffffff",
|
|
34
|
+
"onDefaultGlobalSurface": "#121214",
|
|
35
|
+
"onErrorSurface": "#cb300a",
|
|
36
|
+
"onInfoSurface": "#355bfb",
|
|
37
|
+
"onPrimary": "#fdfbff",
|
|
38
|
+
"onSecondary": "#460078",
|
|
39
|
+
"onSuccessSurface": "#017d6d",
|
|
40
|
+
"onWarningSurface": "#ac5d00",
|
|
41
|
+
"overlayGlobalSurface": "#000000",
|
|
42
|
+
"pressedSurface": "#380060",
|
|
43
|
+
"primary": "#460078",
|
|
44
|
+
"primaryOutline": "#121214",
|
|
45
|
+
"secondary": "#40d1ff",
|
|
46
|
+
"secondaryHighlightedSurface": "#ecfaff",
|
|
47
|
+
"secondaryOutline": "#e8e9ea",
|
|
48
|
+
"success": "#5ace7d",
|
|
49
|
+
"successSurface": "#f0fef4",
|
|
50
|
+
"warning": "#ffbe71",
|
|
51
|
+
"warningSurface": "#fff6eb",
|
|
52
|
+
"white": "#ffffff",
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`ehWork returns correct theme object 1`] = `
|
|
4
|
+
{
|
|
5
|
+
"archived": "#abacaf",
|
|
6
|
+
"archivedSurface": "#dadbde",
|
|
7
|
+
"black": "#000000",
|
|
8
|
+
"darkGlobalSurface": "#001f23",
|
|
9
|
+
"decorativePrimary": "#fdfbff",
|
|
10
|
+
"decorativePrimarySurface": "#dacce4",
|
|
11
|
+
"decorativeSecondary": "#fdfbff",
|
|
12
|
+
"decorativeSecondarySurface": "#f0e6ff",
|
|
13
|
+
"defaultGlobalSurface": "#ffffff",
|
|
14
|
+
"defaultSurface": "#fdfbff",
|
|
15
|
+
"disabledOnDefaultGlobalSurface": "#bfc1c5",
|
|
16
|
+
"disabledOutline": "#bfc1c5",
|
|
17
|
+
"error": "#f46363",
|
|
18
|
+
"errorSurface": "#fcebe7",
|
|
19
|
+
"highlightedSurface": "#f1e9fb",
|
|
20
|
+
"inactiveOnDefaultGlobalSurface": "#808f91",
|
|
21
|
+
"inactiveOutline": "#808f91",
|
|
22
|
+
"info": "#b5c3fd",
|
|
23
|
+
"infoSurface": "#ecf0ff",
|
|
24
|
+
"mutedArchived": "#bcbdbf",
|
|
25
|
+
"mutedError": "#f68282",
|
|
26
|
+
"mutedInfo": "#c4cffd",
|
|
27
|
+
"mutedOnDefaultGlobalSurface": "#4d6265",
|
|
28
|
+
"mutedSuccess": "#7bd897",
|
|
29
|
+
"mutedWarning": "#ffcb8d",
|
|
30
|
+
"name": "ehWork",
|
|
31
|
+
"neutralGlobalSurface": "#f6f6f7",
|
|
32
|
+
"onArchivedSurface": "#606065",
|
|
33
|
+
"onDarkGlobalSurface": "#ffffff",
|
|
34
|
+
"onDefaultGlobalSurface": "#121214",
|
|
35
|
+
"onErrorSurface": "#cb300a",
|
|
36
|
+
"onInfoSurface": "#355bfb",
|
|
37
|
+
"onPrimary": "#fdfbff",
|
|
38
|
+
"onSecondary": "#ffffff",
|
|
39
|
+
"onSuccessSurface": "#017d6d",
|
|
40
|
+
"onWarningSurface": "#ac5d00",
|
|
41
|
+
"overlayGlobalSurface": "#000000",
|
|
42
|
+
"pressedSurface": "#380060",
|
|
43
|
+
"primary": "#460078",
|
|
44
|
+
"primaryOutline": "#121214",
|
|
45
|
+
"secondary": "#b382fd",
|
|
46
|
+
"secondaryOutline": "#e8e9ea",
|
|
47
|
+
"success": "#5ace7d",
|
|
48
|
+
"successSurface": "#f0fef4",
|
|
49
|
+
"warning": "#ffbe71",
|
|
50
|
+
"warningSurface": "#fff6eb",
|
|
51
|
+
"white": "#ffffff",
|
|
52
|
+
}
|
|
53
|
+
`;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import swagLightSystemPalette from './swagSystemPalette';
|
|
2
|
+
import { SystemPalette } from './types';
|
|
3
|
+
|
|
4
|
+
const ehJobsSystemPalette: SystemPalette = {
|
|
5
|
+
...swagLightSystemPalette,
|
|
6
|
+
name: 'ehJobs',
|
|
7
|
+
secondary: '#40d1ff',
|
|
8
|
+
onSecondary: '#460078',
|
|
9
|
+
secondaryHighlightedSurface: '#ecfaff',
|
|
10
|
+
decorativeSecondary: '#fdfbff',
|
|
11
|
+
decorativeSecondarySurface: '#d9f6ff',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default ehJobsSystemPalette;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { swagLightPalette as palette } from '@hero-design/colors';
|
|
2
|
+
import type { SystemPalette, BrandSystemPalette } from './types';
|
|
3
|
+
import swagLightGlobalPalette from './swagLightGlobal';
|
|
4
|
+
|
|
5
|
+
const ehWorkBrandSystemPalette: BrandSystemPalette = {
|
|
6
|
+
primary: '#460078',
|
|
7
|
+
onPrimary: '#fdfbff',
|
|
8
|
+
secondary: '#b382fd',
|
|
9
|
+
onSecondary: palette.white,
|
|
10
|
+
defaultSurface: '#fdfbff',
|
|
11
|
+
highlightedSurface: palette.violetLight90,
|
|
12
|
+
pressedSurface: '#380060',
|
|
13
|
+
decorativePrimary: '#fdfbff',
|
|
14
|
+
decorativePrimarySurface: '#dacce4',
|
|
15
|
+
decorativeSecondary: '#fdfbff',
|
|
16
|
+
decorativeSecondarySurface: '#f0e6ff',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const ehWorkSystemPalette: SystemPalette = {
|
|
20
|
+
// Global
|
|
21
|
+
...swagLightGlobalPalette,
|
|
22
|
+
// Brand
|
|
23
|
+
...ehWorkBrandSystemPalette,
|
|
24
|
+
name: 'ehWork',
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default ehWorkSystemPalette;
|
|
@@ -1,26 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import swagLightGlobalPalette from './swagLightGlobal';
|
|
4
|
-
|
|
5
|
-
const swagBrandSystemPallete: BrandSystemPalette = {
|
|
6
|
-
primary: '#460078',
|
|
7
|
-
onPrimary: '#fdfbff',
|
|
8
|
-
secondary: '#b382fd',
|
|
9
|
-
onSecondary: palette.white,
|
|
10
|
-
defaultSurface: '#fdfbff',
|
|
11
|
-
highlightedSurface: palette.violetLight90,
|
|
12
|
-
pressedSurface: '#380060',
|
|
13
|
-
decorativePrimary: '#fdfbff',
|
|
14
|
-
decorativePrimarySurface: '#dacce4',
|
|
15
|
-
decorativeSecondary: '#fdfbff',
|
|
16
|
-
decorativeSecondarySurface: '#f0e6ff',
|
|
17
|
-
};
|
|
1
|
+
import ehWorkSystemPalette from './ehWork';
|
|
2
|
+
import { SystemPalette } from './types';
|
|
18
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated This palette is deprecated and will be removed in the next major release.
|
|
6
|
+
*/
|
|
19
7
|
const swagSystemPalette: SystemPalette = {
|
|
20
|
-
|
|
21
|
-
...swagLightGlobalPalette,
|
|
22
|
-
// Brand
|
|
23
|
-
...swagBrandSystemPallete,
|
|
8
|
+
...ehWorkSystemPalette,
|
|
24
9
|
name: 'swagLight',
|
|
25
10
|
};
|
|
26
11
|
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ehJobsSystemPalette from './ehJobs';
|
|
2
2
|
import { SystemPalette } from './types';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated This palette is deprecated and will be removed in the next major release.
|
|
6
|
+
*/
|
|
4
7
|
const swagLightJobsSystemPalette: SystemPalette = {
|
|
5
|
-
...
|
|
8
|
+
...ehJobsSystemPalette,
|
|
6
9
|
name: 'swagLightJobs',
|
|
7
|
-
secondary: '#40d1ff',
|
|
8
|
-
onSecondary: '#460078',
|
|
9
|
-
secondaryHighlightedSurface: '#ecfaff',
|
|
10
|
-
decorativeSecondary: '#fdfbff',
|
|
11
|
-
decorativeSecondarySurface: '#d9f6ff',
|
|
12
10
|
};
|
|
13
11
|
|
|
14
12
|
export default swagLightJobsSystemPalette;
|
|
@@ -65,7 +65,12 @@ export type BrandSystemPalette = {
|
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
export type ThemeMode = 'light' | 'dark';
|
|
68
|
-
export type ThemeName =
|
|
68
|
+
export type ThemeName =
|
|
69
|
+
| 'swagLight'
|
|
70
|
+
| 'swagLightJobs'
|
|
71
|
+
| 'ehWorkDark'
|
|
72
|
+
| 'ehWork'
|
|
73
|
+
| 'ehJobs';
|
|
69
74
|
export type SystemPalette = GlobalSystemPalette &
|
|
70
75
|
BrandSystemPalette & {
|
|
71
76
|
themeMode?: ThemeMode;
|
|
@@ -8,6 +8,8 @@ import jobsSystemPalette from './colors/jobs';
|
|
|
8
8
|
import walletSystemPalette from './colors/wallet';
|
|
9
9
|
import eBensSystemPalette from './colors/eBens';
|
|
10
10
|
import ehWorkDarkSystemPalette from './colors/ehWorkDark';
|
|
11
|
+
import ehWorkSystemPalette from './colors/ehWork';
|
|
12
|
+
import ehJobsSystemPalette from './colors/ehJobs';
|
|
11
13
|
|
|
12
14
|
import { getFonts, getFontSizes, getLineHeights } from './typography';
|
|
13
15
|
import { getSpace } from './space';
|
|
@@ -58,4 +60,6 @@ export {
|
|
|
58
60
|
walletSystemPalette,
|
|
59
61
|
eBensSystemPalette,
|
|
60
62
|
ehWorkDarkSystemPalette,
|
|
63
|
+
ehWorkSystemPalette,
|
|
64
|
+
ehJobsSystemPalette,
|
|
61
65
|
};
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import swagLightSystemPalette from '../../colors/
|
|
1
|
+
import swagLightSystemPalette from '../../colors/swagSystemPalette';
|
|
2
2
|
import swagLightJobsSystemPalette from '../../colors/swagLightJobs';
|
|
3
3
|
import ehWorkDarkSystemPalette from '../../colors/ehWorkDark';
|
|
4
|
+
import ehWorkSystemPalette from '../../colors/ehWork';
|
|
5
|
+
import ehJobsSystemPalette from '../../colors/ehJobs';
|
|
4
6
|
import swagSystemPalette from '../../colors/swag';
|
|
5
7
|
import { getShadows } from '../index';
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
+
import ehWorkShadowPalette from '../ehWork';
|
|
9
|
+
import ehJobsShadowPalette from '../ehJobs';
|
|
8
10
|
import ehWorkDarkShadowPalette from '../ehWorkDark';
|
|
9
11
|
|
|
10
12
|
describe('getShadows', () => {
|
|
11
13
|
it.each`
|
|
12
14
|
colorPalette | shadowPalette
|
|
13
|
-
${swagLightSystemPalette} | ${
|
|
14
|
-
${swagLightJobsSystemPalette} | ${
|
|
15
|
+
${swagLightSystemPalette} | ${ehWorkShadowPalette}
|
|
16
|
+
${swagLightJobsSystemPalette} | ${ehJobsShadowPalette}
|
|
15
17
|
${ehWorkDarkSystemPalette} | ${ehWorkDarkShadowPalette}
|
|
16
|
-
${swagSystemPalette} | ${
|
|
18
|
+
${swagSystemPalette} | ${ehWorkShadowPalette}
|
|
19
|
+
${ehWorkSystemPalette} | ${ehWorkShadowPalette}
|
|
20
|
+
${ehJobsSystemPalette} | ${ehJobsShadowPalette}
|
|
17
21
|
`(
|
|
18
|
-
'should return the correct shadow palette for $colorPalette',
|
|
22
|
+
'should return the correct shadow palette for $colorPalette.name',
|
|
19
23
|
({ colorPalette, shadowPalette }) => {
|
|
20
24
|
const actual = getShadows(colorPalette);
|
|
21
25
|
expect(actual).toEqual(shadowPalette);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { ShadowPalette } from './types';
|
|
2
|
-
import
|
|
2
|
+
import ehWorkSystemPalette from '../colors/ehWork';
|
|
3
3
|
|
|
4
|
-
const
|
|
4
|
+
const ehJobsShadowPalette: ShadowPalette = {
|
|
5
5
|
default: {
|
|
6
6
|
shadowOffset: {
|
|
7
7
|
width: 0,
|
|
8
8
|
height: 2,
|
|
9
9
|
},
|
|
10
|
-
shadowColor:
|
|
10
|
+
shadowColor: ehWorkSystemPalette.primaryOutline,
|
|
11
11
|
shadowOpacity: 0.12,
|
|
12
12
|
shadowRadius: 4,
|
|
13
13
|
elevation: 3,
|
|
@@ -34,4 +34,4 @@ const swagLightJobsShadowPalette: ShadowPalette = {
|
|
|
34
34
|
},
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
export default
|
|
37
|
+
export default ehJobsShadowPalette;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ShadowPalette } from './types';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const ehWorkShadowPalette: ShadowPalette = {
|
|
4
4
|
default: {
|
|
5
5
|
shadowOffset: {
|
|
6
6
|
width: 0,
|
|
@@ -33,4 +33,4 @@ const swagLightShadowPalette: ShadowPalette = {
|
|
|
33
33
|
},
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
export default
|
|
36
|
+
export default ehWorkShadowPalette;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import ehWorkShadowPalette from './ehWork';
|
|
2
|
+
import ehJobsShadowPalette from './ehJobs';
|
|
3
3
|
import ehWorkDarkShadowPalette from './ehWorkDark';
|
|
4
4
|
|
|
5
5
|
import { SystemPalette } from '../colors/types';
|
|
@@ -7,13 +7,17 @@ import { SystemPalette } from '../colors/types';
|
|
|
7
7
|
const getShadows = (palette: SystemPalette) => {
|
|
8
8
|
switch (palette.name) {
|
|
9
9
|
case 'swagLight':
|
|
10
|
-
return
|
|
10
|
+
return ehWorkShadowPalette;
|
|
11
|
+
case 'ehWork':
|
|
12
|
+
return ehWorkShadowPalette;
|
|
11
13
|
case 'swagLightJobs':
|
|
12
|
-
return
|
|
14
|
+
return ehJobsShadowPalette;
|
|
15
|
+
case 'ehJobs':
|
|
16
|
+
return ehJobsShadowPalette;
|
|
13
17
|
case 'ehWorkDark':
|
|
14
18
|
return ehWorkDarkShadowPalette;
|
|
15
19
|
default:
|
|
16
|
-
return
|
|
20
|
+
return ehWorkShadowPalette;
|
|
17
21
|
}
|
|
18
22
|
};
|
|
19
23
|
|
package/src/theme/index.ts
CHANGED
|
@@ -11,6 +11,8 @@ import {
|
|
|
11
11
|
walletSystemPalette,
|
|
12
12
|
eBensSystemPalette,
|
|
13
13
|
ehWorkDarkSystemPalette,
|
|
14
|
+
ehWorkSystemPalette,
|
|
15
|
+
ehJobsSystemPalette,
|
|
14
16
|
} from './global';
|
|
15
17
|
|
|
16
18
|
import type { Theme } from './getTheme';
|
|
@@ -34,6 +36,8 @@ export {
|
|
|
34
36
|
walletSystemPalette,
|
|
35
37
|
eBensSystemPalette,
|
|
36
38
|
ehWorkDarkSystemPalette,
|
|
39
|
+
ehWorkSystemPalette,
|
|
40
|
+
ehJobsSystemPalette,
|
|
37
41
|
};
|
|
38
42
|
|
|
39
43
|
export default defaultTheme;
|