@hero-design/rn 7.22.2 → 7.22.3
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/es/index.js +271 -242
- package/lib/index.js +271 -242
- package/package.json +4 -4
- package/src/components/Accordion/AccordionItem.tsx +1 -1
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +8 -8
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +3 -3
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +2 -2
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +24 -24
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +6 -6
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +3 -3
- package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +1 -1
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +2 -2
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +5 -5
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +1 -1
- package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +10 -10
- package/src/components/Icon/HeroIcon/index.tsx +2 -0
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Icon/index.tsx +1 -0
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +2 -2
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +12 -12
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +2 -2
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +4 -4
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +6 -6
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +21 -21
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +5 -5
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +1 -1
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +1 -1
- package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +1 -1
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +4 -4
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +13 -9
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +18 -18
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -1
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +12 -8
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +9 -9
- package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +1 -1
- package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Spinner/StyledSpinner.tsx +8 -4
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +8 -4
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +32 -16
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +8 -4
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +3 -3
- package/src/components/Tabs/ScrollableTabs.tsx +2 -5
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +1 -1
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +1 -1
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +10 -10
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +14 -14
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +1 -1
- package/src/components/Toast/ToastProvider.tsx +2 -4
- package/src/components/Toast/__tests__/index.spec.tsx +138 -0
- package/src/components/Toolbar/ToolbarItem.tsx +1 -1
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +12 -12
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +6 -6
- package/src/components/Typography/Text/StyledText.tsx +1 -0
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +3 -3
- package/src/components/Typography/Text/index.tsx +1 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +92 -85
- package/src/theme/components/accordion.ts +1 -1
- package/src/theme/components/alert.ts +4 -4
- package/src/theme/components/avatar.ts +2 -2
- package/src/theme/components/badge.ts +6 -6
- package/src/theme/components/bottomNavigation.ts +2 -2
- package/src/theme/components/bottomSheet.ts +3 -3
- package/src/theme/components/button.ts +20 -20
- package/src/theme/components/calendar.ts +4 -4
- package/src/theme/components/card.ts +5 -5
- package/src/theme/components/checkbox.ts +1 -1
- package/src/theme/components/divider.ts +1 -1
- package/src/theme/components/drawer.ts +4 -4
- package/src/theme/components/empty.ts +3 -4
- package/src/theme/components/fab.ts +7 -7
- package/src/theme/components/icon.ts +4 -3
- package/src/theme/components/list.ts +6 -7
- package/src/theme/components/pinInput.ts +4 -4
- package/src/theme/components/progress.ts +3 -3
- package/src/theme/components/richTextEditor.ts +3 -3
- package/src/theme/components/sectionHeading.ts +1 -1
- package/src/theme/components/select.ts +1 -1
- package/src/theme/components/slider.ts +3 -3
- package/src/theme/components/spinner.ts +1 -4
- package/src/theme/components/switch.ts +7 -7
- package/src/theme/components/tabs.ts +5 -5
- package/src/theme/components/tag.ts +12 -12
- package/src/theme/components/textInput.ts +38 -38
- package/src/theme/components/toast.ts +6 -6
- package/src/theme/components/toolbar.ts +3 -2
- package/src/theme/components/typography.ts +4 -3
- package/src/theme/global/colors/global.ts +32 -0
- package/src/theme/global/colors/legacySystemPalette.ts +53 -0
- package/src/theme/global/colors/swag.ts +21 -35
- package/src/theme/global/colors/types.ts +46 -27
- package/src/theme/global/colors/work.ts +10 -9
- package/types/components/Icon/HeroIcon/index.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/Toast/__tests__/index.spec.d.ts +1 -0
- package/types/components/Toolbar/ToolbarItem.d.ts +1 -1
- package/types/components/Typography/Text/StyledText.d.ts +1 -1
- package/types/components/Typography/Text/index.d.ts +1 -1
- package/types/theme/components/empty.d.ts +0 -1
- package/types/theme/components/icon.d.ts +1 -0
- package/types/theme/components/spinner.d.ts +1 -4
- package/types/theme/components/toolbar.d.ts +1 -0
- package/types/theme/components/typography.d.ts +1 -0
- package/types/theme/global/colors/global.d.ts +3 -0
- package/types/theme/global/colors/legacySystemPalette.d.ts +3 -0
- package/types/theme/global/colors/types.d.ts +41 -21
- package/types/theme/global/index.d.ts +28 -20
|
@@ -2,14 +2,15 @@ import type { GlobalTheme } from '../global';
|
|
|
2
2
|
|
|
3
3
|
const getIconTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
|
-
text: theme.colors.
|
|
5
|
+
text: theme.colors.globalPrimary,
|
|
6
6
|
primary: theme.colors.primary,
|
|
7
|
+
secondary: theme.colors.secondary,
|
|
7
8
|
info: theme.colors.info,
|
|
8
9
|
danger: theme.colors.danger,
|
|
9
10
|
success: theme.colors.success,
|
|
10
11
|
warning: theme.colors.warning,
|
|
11
|
-
disabledText: theme.colors.
|
|
12
|
-
invertedText: theme.colors.
|
|
12
|
+
disabledText: theme.colors.mutedGlobalPrimary,
|
|
13
|
+
invertedText: theme.colors.defaultGlobalSurface,
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
const sizes = {
|
|
@@ -2,17 +2,16 @@ import type { GlobalTheme } from '../global';
|
|
|
2
2
|
|
|
3
3
|
const getListTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
|
-
checkedListItemContainerBackground:
|
|
6
|
-
theme.colors.__alpha__lightHighlightedSurface,
|
|
5
|
+
checkedListItemContainerBackground: theme.colors.highlightedSurface,
|
|
7
6
|
highlightedListItemContainerBackground:
|
|
8
|
-
theme.colors.
|
|
9
|
-
listItemContainerBackground: theme.colors.
|
|
7
|
+
theme.colors.lightHighlightedSurface,
|
|
8
|
+
listItemContainerBackground: theme.colors.defaultGlobalSurface,
|
|
10
9
|
leadingStatus: {
|
|
11
|
-
danger: theme.colors.
|
|
12
|
-
info: theme.colors.
|
|
10
|
+
danger: theme.colors.error,
|
|
11
|
+
info: theme.colors.info,
|
|
13
12
|
success: theme.colors.success,
|
|
14
13
|
warning: theme.colors.warning,
|
|
15
|
-
archived: theme.colors.
|
|
14
|
+
archived: theme.colors.archived,
|
|
16
15
|
},
|
|
17
16
|
};
|
|
18
17
|
|
|
@@ -7,10 +7,10 @@ const getPinInputTheme = (theme: GlobalTheme) => {
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
const colors = {
|
|
10
|
-
default: theme.colors.
|
|
11
|
-
mask: theme.colors.
|
|
12
|
-
error: theme.colors.
|
|
13
|
-
disabled: theme.colors.
|
|
10
|
+
default: theme.colors.globalPrimary,
|
|
11
|
+
mask: theme.colors.mutedGlobalPrimary,
|
|
12
|
+
error: theme.colors.error,
|
|
13
|
+
disabled: theme.colors.mutedGlobalPrimary,
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
const fonts = {
|
|
@@ -4,11 +4,11 @@ const getProgressTheme = (theme: GlobalTheme) => {
|
|
|
4
4
|
const colors = {
|
|
5
5
|
primary: theme.colors.primary,
|
|
6
6
|
success: theme.colors.success, // should be emerald dark 15
|
|
7
|
-
warning: theme.colors.
|
|
7
|
+
warning: theme.colors.warning,
|
|
8
8
|
danger: theme.colors.danger,
|
|
9
9
|
info: theme.colors.info,
|
|
10
|
-
background: theme.colors.
|
|
11
|
-
innerBackground: theme.colors.
|
|
10
|
+
background: theme.colors.globalSecondaryOutline,
|
|
11
|
+
innerBackground: theme.colors.defaultGlobalSurface,
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
const sizes = {
|
|
@@ -2,9 +2,9 @@ import type { GlobalTheme } from '../global';
|
|
|
2
2
|
|
|
3
3
|
const getRichTextEditorTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
|
-
toolbarBorderColor: theme.colors.
|
|
6
|
-
toolbarBackgroundColor: theme.colors.
|
|
7
|
-
toolbarButtonSelectedBackground: theme.colors.
|
|
5
|
+
toolbarBorderColor: theme.colors.globalSecondaryOutline,
|
|
6
|
+
toolbarBackgroundColor: theme.colors.neutralGlobalSurface,
|
|
7
|
+
toolbarButtonSelectedBackground: theme.colors.lightHighlightedSurface,
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
const borderWidths = {
|
|
@@ -2,9 +2,9 @@ import type { GlobalTheme } from '../global';
|
|
|
2
2
|
|
|
3
3
|
const getSliderTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
|
-
minimumTrackTint: theme.colors.
|
|
6
|
-
thumbTint: theme.colors.
|
|
7
|
-
maximumTrackTint: theme.colors.
|
|
5
|
+
minimumTrackTint: theme.colors.secondary,
|
|
6
|
+
thumbTint: theme.colors.neutralGlobalSurface,
|
|
7
|
+
maximumTrackTint: theme.colors.lightHighlightedSurface,
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
return { colors };
|
|
@@ -2,10 +2,7 @@ import type { GlobalTheme } from '../global';
|
|
|
2
2
|
|
|
3
3
|
const getSpinnerTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
|
-
|
|
6
|
-
dot2: theme.colors.__alpha__secondary2,
|
|
7
|
-
dot3: theme.colors.__alpha__secondary3,
|
|
8
|
-
dot4: theme.colors.__alpha__secondary4,
|
|
5
|
+
dot: theme.colors.primary,
|
|
9
6
|
};
|
|
10
7
|
|
|
11
8
|
const space = {
|
|
@@ -3,15 +3,15 @@ import type { GlobalTheme } from '../global';
|
|
|
3
3
|
const getSwitchTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
5
|
backgroundColors: {
|
|
6
|
-
checked: theme.colors.
|
|
7
|
-
unchecked: theme.colors.
|
|
8
|
-
'disabled-checked': theme.colors.
|
|
9
|
-
'disabled-unchecked': theme.colors.
|
|
6
|
+
checked: theme.colors.secondary,
|
|
7
|
+
unchecked: theme.colors.mutedSecondary,
|
|
8
|
+
'disabled-checked': theme.colors.disabledSecondary,
|
|
9
|
+
'disabled-unchecked': theme.colors.disabledOnDefaultGlobalSurface,
|
|
10
10
|
},
|
|
11
|
-
thumb: theme.colors.
|
|
11
|
+
thumb: theme.colors.onSecondary,
|
|
12
12
|
selector: {
|
|
13
|
-
background: theme.colors.
|
|
14
|
-
textBackground: theme.colors.
|
|
13
|
+
background: theme.colors.neutralGlobalSurface,
|
|
14
|
+
textBackground: theme.colors.secondary,
|
|
15
15
|
},
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -2,11 +2,11 @@ import type { GlobalTheme } from '../global';
|
|
|
2
2
|
|
|
3
3
|
const getTabsTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
|
-
active: theme.colors.
|
|
6
|
-
inactive: theme.colors.
|
|
7
|
-
activeBackground: theme.colors.
|
|
8
|
-
headerBottom: theme.colors.
|
|
9
|
-
text: theme.colors.
|
|
5
|
+
active: theme.colors.globalPrimary,
|
|
6
|
+
inactive: theme.colors.globalPrimary,
|
|
7
|
+
activeBackground: theme.colors.mutedPrimary,
|
|
8
|
+
headerBottom: theme.colors.globalSecondaryOutline,
|
|
9
|
+
text: theme.colors.globalPrimary,
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
const space = {
|
|
@@ -6,20 +6,20 @@ const getTagTheme = (theme: GlobalTheme) => {
|
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
const colors = {
|
|
9
|
-
default: theme.colors.
|
|
9
|
+
default: theme.colors.globalPrimary,
|
|
10
10
|
defaultBackground: undefined,
|
|
11
|
-
primary: theme.colors.
|
|
11
|
+
primary: theme.colors.globalPrimary,
|
|
12
12
|
primaryBackground: undefined,
|
|
13
|
-
info: theme.colors.
|
|
14
|
-
infoBackground: theme.colors.
|
|
15
|
-
success: theme.colors.
|
|
16
|
-
successBackground: theme.colors.
|
|
17
|
-
warning: theme.colors.
|
|
18
|
-
warningBackground: theme.colors.
|
|
19
|
-
danger: theme.colors.
|
|
20
|
-
dangerBackground: theme.colors.
|
|
21
|
-
archived: theme.colors.
|
|
22
|
-
archivedBackground: theme.colors.
|
|
13
|
+
info: theme.colors.onInfoSurface,
|
|
14
|
+
infoBackground: theme.colors.infoSurface,
|
|
15
|
+
success: theme.colors.onSuccessSurface,
|
|
16
|
+
successBackground: theme.colors.successSurface,
|
|
17
|
+
warning: theme.colors.onWarningSurface,
|
|
18
|
+
warningBackground: theme.colors.warningSurface,
|
|
19
|
+
danger: theme.colors.onErrorSurface,
|
|
20
|
+
dangerBackground: theme.colors.errorSurface,
|
|
21
|
+
archived: theme.colors.onArchivedSurface,
|
|
22
|
+
archivedBackground: theme.colors.archivedSurface,
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const fonts = {
|
|
@@ -2,53 +2,53 @@ import type { GlobalTheme } from '../global';
|
|
|
2
2
|
|
|
3
3
|
const getTextInputTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
|
-
labelBackground: theme.colors.
|
|
5
|
+
labelBackground: theme.colors.defaultGlobalSurface,
|
|
6
6
|
asterisks: {
|
|
7
|
-
default: theme.colors.
|
|
8
|
-
error: theme.colors.
|
|
9
|
-
disabled: theme.colors.
|
|
10
|
-
readonly: theme.colors.
|
|
11
|
-
filled: theme.colors.
|
|
12
|
-
focused: theme.colors.
|
|
7
|
+
default: theme.colors.error,
|
|
8
|
+
error: theme.colors.error,
|
|
9
|
+
disabled: theme.colors.disabledOnDefaultGlobalSurface,
|
|
10
|
+
readonly: theme.colors.mutedSecondary,
|
|
11
|
+
filled: theme.colors.error,
|
|
12
|
+
focused: theme.colors.error,
|
|
13
13
|
},
|
|
14
|
-
error: theme.colors.
|
|
15
|
-
placeholderIfNotFocused: theme.colors.
|
|
16
|
-
placeholderIfFocued: theme.colors.
|
|
17
|
-
label: theme.colors.
|
|
18
|
-
readonlyLabel: theme.colors.
|
|
19
|
-
disabledLabel: theme.colors.
|
|
20
|
-
text: theme.colors.
|
|
14
|
+
error: theme.colors.error,
|
|
15
|
+
placeholderIfNotFocused: theme.colors.globalPrimary,
|
|
16
|
+
placeholderIfFocued: theme.colors.mutedSecondary,
|
|
17
|
+
label: theme.colors.globalPrimary,
|
|
18
|
+
readonlyLabel: theme.colors.mutedSecondary,
|
|
19
|
+
disabledLabel: theme.colors.disabledOnDefaultGlobalSurface,
|
|
20
|
+
text: theme.colors.globalPrimary,
|
|
21
21
|
borders: {
|
|
22
|
-
default: theme.colors.
|
|
23
|
-
error: theme.colors.
|
|
24
|
-
disabled: theme.colors.
|
|
25
|
-
readonly: theme.colors.
|
|
26
|
-
filled: theme.colors.
|
|
27
|
-
focused: theme.colors.
|
|
22
|
+
default: theme.colors.globalPrimary,
|
|
23
|
+
error: theme.colors.error,
|
|
24
|
+
disabled: theme.colors.disabledOnDefaultGlobalSurface,
|
|
25
|
+
readonly: theme.colors.mutedSecondary,
|
|
26
|
+
filled: theme.colors.globalPrimary,
|
|
27
|
+
focused: theme.colors.globalPrimary,
|
|
28
28
|
},
|
|
29
29
|
labels: {
|
|
30
|
-
default: theme.colors.
|
|
31
|
-
error: theme.colors.
|
|
32
|
-
disabled: theme.colors.
|
|
33
|
-
readonly: theme.colors.
|
|
34
|
-
filled: theme.colors.
|
|
35
|
-
focused: theme.colors.
|
|
30
|
+
default: theme.colors.globalPrimary,
|
|
31
|
+
error: theme.colors.globalPrimary,
|
|
32
|
+
disabled: theme.colors.disabledOnDefaultGlobalSurface,
|
|
33
|
+
readonly: theme.colors.disabledOnDefaultGlobalSurface,
|
|
34
|
+
filled: theme.colors.globalPrimary,
|
|
35
|
+
focused: theme.colors.globalPrimary,
|
|
36
36
|
},
|
|
37
37
|
labelsInsideTextInput: {
|
|
38
|
-
default: theme.colors.
|
|
39
|
-
error: theme.colors.
|
|
40
|
-
disabled: theme.colors.
|
|
41
|
-
readonly: theme.colors.
|
|
42
|
-
filled: theme.colors.
|
|
43
|
-
focused: theme.colors.
|
|
38
|
+
default: theme.colors.globalPrimary,
|
|
39
|
+
error: theme.colors.globalPrimary,
|
|
40
|
+
disabled: theme.colors.disabledOnDefaultGlobalSurface,
|
|
41
|
+
readonly: theme.colors.disabledOnDefaultGlobalSurface,
|
|
42
|
+
filled: theme.colors.globalPrimary,
|
|
43
|
+
focused: theme.colors.globalPrimary,
|
|
44
44
|
},
|
|
45
45
|
maxLengthLabels: {
|
|
46
|
-
default: theme.colors.
|
|
47
|
-
error: theme.colors.
|
|
48
|
-
disabled: theme.colors.
|
|
49
|
-
readonly: theme.colors.
|
|
50
|
-
filled: theme.colors.
|
|
51
|
-
focused: theme.colors.
|
|
46
|
+
default: theme.colors.globalPrimary,
|
|
47
|
+
error: theme.colors.error,
|
|
48
|
+
disabled: theme.colors.disabledOnDefaultGlobalSurface,
|
|
49
|
+
readonly: theme.colors.disabledOnDefaultGlobalSurface,
|
|
50
|
+
filled: theme.colors.globalPrimary,
|
|
51
|
+
focused: theme.colors.globalPrimary,
|
|
52
52
|
},
|
|
53
53
|
};
|
|
54
54
|
|
|
@@ -4,12 +4,12 @@ const getToastTheme = (theme: GlobalTheme) => {
|
|
|
4
4
|
const colors = {
|
|
5
5
|
success: theme.colors.success,
|
|
6
6
|
warning: theme.colors.warning,
|
|
7
|
-
error: theme.colors.
|
|
8
|
-
info: theme.colors.
|
|
9
|
-
notification: theme.colors.
|
|
10
|
-
snackbar: theme.colors.
|
|
11
|
-
divider: theme.colors.
|
|
12
|
-
shadow: theme.colors.
|
|
7
|
+
error: theme.colors.error,
|
|
8
|
+
info: theme.colors.info,
|
|
9
|
+
notification: theme.colors.defaultGlobalSurface,
|
|
10
|
+
snackbar: theme.colors.globalPrimary,
|
|
11
|
+
divider: theme.colors.globalSecondaryOutline,
|
|
12
|
+
shadow: theme.colors.globalPrimary,
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
const sizes = {
|
|
@@ -2,9 +2,10 @@ import type { GlobalTheme } from '../global';
|
|
|
2
2
|
|
|
3
3
|
const getToolbarTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
|
-
background: theme.colors.
|
|
6
|
-
border: theme.colors.
|
|
5
|
+
background: theme.colors.defaultGlobalSurface,
|
|
6
|
+
border: theme.colors.globalSecondaryOutline,
|
|
7
7
|
primary: theme.colors.primary,
|
|
8
|
+
secondary: theme.colors.secondary,
|
|
8
9
|
info: theme.colors.info,
|
|
9
10
|
success: theme.colors.success,
|
|
10
11
|
danger: theme.colors.warning,
|
|
@@ -2,14 +2,15 @@ import type { GlobalTheme } from '../global';
|
|
|
2
2
|
|
|
3
3
|
const getTypographyTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
|
-
body: theme.colors.
|
|
6
|
-
subdued: theme.colors.
|
|
5
|
+
body: theme.colors.globalPrimary,
|
|
6
|
+
subdued: theme.colors.mutedGlobalPrimary,
|
|
7
7
|
primary: theme.colors.primary,
|
|
8
|
+
secondary: theme.colors.secondary,
|
|
8
9
|
info: theme.colors.info,
|
|
9
10
|
danger: theme.colors.danger,
|
|
10
11
|
warning: theme.colors.warning,
|
|
11
12
|
success: theme.colors.success,
|
|
12
|
-
inverted: theme.colors.
|
|
13
|
+
inverted: theme.colors.onGlobalPrimary,
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
const fonts = {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defaultMobilePalette as palette } from '@hero-design/colors';
|
|
2
|
+
import type { GlobalSystemPalette } from './types';
|
|
3
|
+
|
|
4
|
+
const globalPalette: GlobalSystemPalette = {
|
|
5
|
+
globalPrimary: palette.maasstrichtBlue,
|
|
6
|
+
mutedGlobalPrimary: palette.maasstrichtBlueLight30,
|
|
7
|
+
onGlobalPrimary: palette.white,
|
|
8
|
+
globalSecondary: palette.maasstrichtBlueLight30,
|
|
9
|
+
globalPrimaryOutline: palette.maasstrichtBlue,
|
|
10
|
+
globalSecondaryOutline: palette.greyLight75,
|
|
11
|
+
defaultGlobalSurface: palette.white,
|
|
12
|
+
onDefaultGlobalSurface: palette.maasstrichtBlue,
|
|
13
|
+
neutralGlobalSurface: palette.greyLight90,
|
|
14
|
+
disabledOnDefaultGlobalSurface: palette.greyLight30,
|
|
15
|
+
error: palette.pastelRed,
|
|
16
|
+
errorSurface: palette.linen,
|
|
17
|
+
onErrorSurface: palette.vermilion,
|
|
18
|
+
warning: palette.mellowApricot,
|
|
19
|
+
warningSurface: palette.seashell,
|
|
20
|
+
onWarningSurface: palette.deepSaffron,
|
|
21
|
+
success: palette.emerald,
|
|
22
|
+
successSurface: palette.honeydew,
|
|
23
|
+
onSuccessSurface: palette.pineGreen,
|
|
24
|
+
info: palette.vodka,
|
|
25
|
+
infoSurface: palette.aliceBlue,
|
|
26
|
+
onInfoSurface: palette.ultramarineBlue,
|
|
27
|
+
archived: palette.greyLight45,
|
|
28
|
+
archivedSurface: palette.antiFlashWhite,
|
|
29
|
+
onArchivedSurface: palette.sonicSilver,
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default globalPalette;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defaultMobilePalette as palette,
|
|
3
|
+
swagPalette,
|
|
4
|
+
} from '@hero-design/colors';
|
|
5
|
+
import type { LegacySystemPalette } from './types';
|
|
6
|
+
|
|
7
|
+
const legacySystemPalette: LegacySystemPalette = {
|
|
8
|
+
globalPrimary: palette.maasstrichtBlue,
|
|
9
|
+
globalPrimaryLight: palette.maasstrichtBlueLight50,
|
|
10
|
+
globalPrimaryBackground: palette.maasstrichtBlueLight90,
|
|
11
|
+
primary: swagPalette.violet,
|
|
12
|
+
primaryLight: swagPalette.violetLight50,
|
|
13
|
+
primaryDark: swagPalette.scarletGumLight30, // DEPRECATED
|
|
14
|
+
primaryBackground: swagPalette.violetLight90,
|
|
15
|
+
primaryBackgroundDark: palette.maasstrichtBlueLight30,
|
|
16
|
+
secondary: swagPalette.ultramarineBlue, // no longer needed after revising Button
|
|
17
|
+
secondaryLight: swagPalette.vodka, // no longer needed after revising Button
|
|
18
|
+
secondaryBackground: swagPalette.aliceBlue, // no longer needed after revising Button
|
|
19
|
+
info: palette.ultramarineBlue,
|
|
20
|
+
infoMediumLight: palette.vodka, // DEPRECATED, use infoLight instead
|
|
21
|
+
infoLight: palette.vodka,
|
|
22
|
+
infoBackground: palette.aliceBlue,
|
|
23
|
+
success: palette.emerald,
|
|
24
|
+
successLight: palette.emerald, // DEPRECATED, use success instead
|
|
25
|
+
successDark: palette.pineGreen,
|
|
26
|
+
successBackground: palette.honeydew,
|
|
27
|
+
danger: palette.vermilion,
|
|
28
|
+
dangerMediumLight: palette.apple, // should be dangerDark?
|
|
29
|
+
dangerLight: palette.pastelRed,
|
|
30
|
+
dangerBackground: palette.linen,
|
|
31
|
+
warning: palette.mellowApricot,
|
|
32
|
+
warningLight: palette.mellowApricot, // DEPRECATED, use warning instead
|
|
33
|
+
warningDark: palette.deepSaffron,
|
|
34
|
+
warningBackground: palette.seashell,
|
|
35
|
+
platformBackground: palette.white,
|
|
36
|
+
backgroundLight: palette.greyLight90,
|
|
37
|
+
backgroundDark: palette.maasstrichtBlue,
|
|
38
|
+
text: palette.maasstrichtBlue,
|
|
39
|
+
subduedText: palette.maasstrichtBlueLight30, // secondary
|
|
40
|
+
disabledText: palette.maasstrichtBlueLight50, // readonly
|
|
41
|
+
disabledLightText: palette.greyLight30, // disabled
|
|
42
|
+
invertedText: palette.white,
|
|
43
|
+
outline: palette.greyLight75, // divider
|
|
44
|
+
archived: palette.greyLight45, // no usage
|
|
45
|
+
archivedLight: palette.greyLight30,
|
|
46
|
+
archivedDark: palette.sonicSilver, // should replace archived as archived has no usage?
|
|
47
|
+
archivedBackground: palette.greyLight90,
|
|
48
|
+
black: palette.black,
|
|
49
|
+
inactiveBackground: palette.maasstrichtBlueLight50,
|
|
50
|
+
shadow: palette.greyLight45, // waiting for new color
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default legacySystemPalette;
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
defaultMobilePalette as palette,
|
|
3
|
-
swagPalette,
|
|
4
|
-
} from '@hero-design/colors';
|
|
1
|
+
import { swagPalette as palette } from '@hero-design/colors';
|
|
5
2
|
import type { SystemPalette } from './types';
|
|
3
|
+
import globalPalette from './global';
|
|
6
4
|
|
|
7
5
|
const swagSystemPalette: SystemPalette = {
|
|
6
|
+
// Legacy
|
|
8
7
|
globalPrimary: palette.maasstrichtBlue,
|
|
9
8
|
globalPrimaryLight: palette.maasstrichtBlueLight50,
|
|
10
9
|
globalPrimaryBackground: palette.maasstrichtBlueLight90,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
primaryBackground: swagPalette.violetLight90,
|
|
10
|
+
primaryLight: palette.violetLight50,
|
|
11
|
+
primaryDark: palette.scarletGumLight30, // DEPRECATED
|
|
12
|
+
primaryBackground: palette.violetLight90,
|
|
15
13
|
primaryBackgroundDark: palette.maasstrichtBlueLight30,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
secondaryBackground: swagPalette.aliceBlue, // no longer needed after revising Button
|
|
14
|
+
secondaryLight: palette.vodka, // no longer needed after revising Button
|
|
15
|
+
secondaryBackground: palette.aliceBlue, // no longer needed after revising Button
|
|
19
16
|
info: palette.ultramarineBlue,
|
|
20
17
|
infoMediumLight: palette.vodka, // DEPRECATED, use infoLight instead
|
|
21
18
|
infoLight: palette.vodka,
|
|
@@ -49,31 +46,20 @@ const swagSystemPalette: SystemPalette = {
|
|
|
49
46
|
inactiveBackground: palette.maasstrichtBlueLight50,
|
|
50
47
|
shadow: palette.greyLight45, // waiting for new color
|
|
51
48
|
|
|
52
|
-
|
|
49
|
+
// Global
|
|
50
|
+
...globalPalette,
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
__alpha__globalLabel7: palette.seashell,
|
|
66
|
-
__alpha__globalLabel8: palette.honeydew,
|
|
67
|
-
__alpha__globalLabel9: palette.aliceBlue,
|
|
68
|
-
|
|
69
|
-
__alpha__primary1: swagPalette.scarletGum,
|
|
70
|
-
__alpha__primary2: swagPalette.mauve,
|
|
71
|
-
|
|
72
|
-
__alpha__secondary1: swagPalette.scarletGumLight30,
|
|
73
|
-
__alpha__secondary2: swagPalette.scarletGumLight50,
|
|
74
|
-
__alpha__secondary3: swagPalette.scarletGumLight80,
|
|
75
|
-
__alpha__secondary4: swagPalette.scarletGumLight90,
|
|
76
|
-
__alpha__lightHighlightedSurface: '#ECE8EF',
|
|
52
|
+
// Brand
|
|
53
|
+
primary: palette.maasstrichtBlue,
|
|
54
|
+
mutedPrimary: palette.maasstrichtBlueLight90,
|
|
55
|
+
onPrimary: palette.white,
|
|
56
|
+
secondary: palette.scarletGum,
|
|
57
|
+
onSecondary: palette.white,
|
|
58
|
+
mutedSecondary: palette.maasstrichtBlueLight50,
|
|
59
|
+
disabledSecondary: palette.scarletGumLight50,
|
|
60
|
+
highlightedSurface: palette.scarletGumLight80,
|
|
61
|
+
highlightedSecondarySurface: palette.aliceBlue,
|
|
62
|
+
lightHighlightedSurface: palette.scarletGumLight90,
|
|
77
63
|
};
|
|
78
64
|
|
|
79
65
|
export default swagSystemPalette;
|
|
@@ -1,4 +1,45 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type GlobalSystemPalette = {
|
|
2
|
+
globalPrimary: string;
|
|
3
|
+
mutedGlobalPrimary: string;
|
|
4
|
+
onGlobalPrimary: string;
|
|
5
|
+
globalSecondary: string;
|
|
6
|
+
globalPrimaryOutline: string;
|
|
7
|
+
globalSecondaryOutline: string;
|
|
8
|
+
defaultGlobalSurface: string;
|
|
9
|
+
onDefaultGlobalSurface: string;
|
|
10
|
+
neutralGlobalSurface: string;
|
|
11
|
+
disabledOnDefaultGlobalSurface: string;
|
|
12
|
+
error: string;
|
|
13
|
+
errorSurface: string;
|
|
14
|
+
onErrorSurface: string;
|
|
15
|
+
warning: string;
|
|
16
|
+
warningSurface: string;
|
|
17
|
+
onWarningSurface: string;
|
|
18
|
+
success: string;
|
|
19
|
+
successSurface: string;
|
|
20
|
+
onSuccessSurface: string;
|
|
21
|
+
info: string;
|
|
22
|
+
infoSurface: string;
|
|
23
|
+
onInfoSurface: string;
|
|
24
|
+
archived: string;
|
|
25
|
+
archivedSurface: string;
|
|
26
|
+
onArchivedSurface: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type BrandSystemPalette = {
|
|
30
|
+
primary: string;
|
|
31
|
+
mutedPrimary: string;
|
|
32
|
+
onPrimary: string;
|
|
33
|
+
secondary: string;
|
|
34
|
+
highlightedSecondarySurface: string; // TODO: Ask Ariel to add this
|
|
35
|
+
onSecondary: string;
|
|
36
|
+
mutedSecondary: string;
|
|
37
|
+
disabledSecondary: string;
|
|
38
|
+
highlightedSurface: string;
|
|
39
|
+
lightHighlightedSurface: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export type LegacySystemPalette = {
|
|
2
43
|
globalPrimary: string;
|
|
3
44
|
globalPrimaryLight: string;
|
|
4
45
|
globalPrimaryBackground: string;
|
|
@@ -42,30 +83,8 @@ export type SystemPalette = {
|
|
|
42
83
|
black: string;
|
|
43
84
|
inactiveBackground: string;
|
|
44
85
|
shadow: string;
|
|
45
|
-
|
|
46
|
-
__alpha__globalPrimary: string;
|
|
47
|
-
|
|
48
|
-
__alpha__globalSecondary1: string;
|
|
49
|
-
__alpha__globalSecondary4: string;
|
|
50
|
-
|
|
51
|
-
__alpha__globalNeutral3: string;
|
|
52
|
-
|
|
53
|
-
__alpha__globalLabel1: string;
|
|
54
|
-
__alpha__globalLabel2: string;
|
|
55
|
-
__alpha__globalLabel3: string;
|
|
56
|
-
__alpha__globalLabel4: string;
|
|
57
|
-
__alpha__globalLabel5: string;
|
|
58
|
-
__alpha__globalLabel6: string;
|
|
59
|
-
__alpha__globalLabel7: string;
|
|
60
|
-
__alpha__globalLabel8: string;
|
|
61
|
-
__alpha__globalLabel9: string;
|
|
62
|
-
|
|
63
|
-
__alpha__primary1: string;
|
|
64
|
-
__alpha__primary2: string;
|
|
65
|
-
|
|
66
|
-
__alpha__secondary1: string;
|
|
67
|
-
__alpha__secondary2: string;
|
|
68
|
-
__alpha__secondary3: string;
|
|
69
|
-
__alpha__secondary4: string;
|
|
70
|
-
__alpha__lightHighlightedSurface: string;
|
|
71
86
|
};
|
|
87
|
+
|
|
88
|
+
export type SystemPalette = LegacySystemPalette &
|
|
89
|
+
GlobalSystemPalette &
|
|
90
|
+
BrandSystemPalette;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { workPalette } from '@hero-design/colors';
|
|
1
|
+
import { workPalette as palette } from '@hero-design/colors';
|
|
2
2
|
import swag from './swag';
|
|
3
3
|
import type { SystemPalette } from './types';
|
|
4
4
|
|
|
5
5
|
const workSystemPalette: SystemPalette = {
|
|
6
6
|
...swag,
|
|
7
|
-
primary: workPalette.gold,
|
|
8
|
-
primaryLight: workPalette.goldLight50,
|
|
9
|
-
primaryDark: workPalette.goldLight20,
|
|
10
|
-
primaryBackground: workPalette.goldLight90,
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
primary: palette.gold,
|
|
9
|
+
mutedPrimary: palette.goldLight90,
|
|
10
|
+
onPrimary: palette.maasstrichtBlue,
|
|
11
|
+
secondary: palette.violet,
|
|
12
|
+
onSecondary: palette.white,
|
|
13
|
+
mutedSecondary: palette.maasstrichtBlueLight50,
|
|
14
|
+
disabledSecondary: palette.violetLight50,
|
|
15
|
+
highlightedSurface: palette.violetLight80,
|
|
16
|
+
lightHighlightedSurface: palette.violetLight90,
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
export default workSystemPalette;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare type ThemeSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
2
|
-
declare type ThemeIntent = 'text' | 'primary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted';
|
|
2
|
+
declare type ThemeIntent = 'text' | 'primary' | 'secondary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted';
|
|
3
3
|
declare const StyledHeroIcon: import("@emotion/native").StyledComponent<import("react-native-vector-icons/Icon").IconProps & {
|
|
4
4
|
theme?: import("@emotion/react").Theme;
|
|
5
5
|
as?: import("react").ElementType<any>;
|
|
@@ -9,7 +9,7 @@ export interface IconProps {
|
|
|
9
9
|
/**
|
|
10
10
|
* Intent of the Icon.
|
|
11
11
|
*/
|
|
12
|
-
intent?: 'text' | 'primary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted';
|
|
12
|
+
intent?: 'text' | 'primary' | 'secondary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted';
|
|
13
13
|
/**
|
|
14
14
|
* Size of the Icon.
|
|
15
15
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|