@hero-design/rn 7.24.0 → 7.25.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/assets/fonts/hero-icons.ttf +0 -0
- package/es/index.js +845 -752
- package/lib/assets/fonts/hero-icons.ttf +0 -0
- package/lib/index.js +846 -750
- package/package.json +6 -5
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +4 -4
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
- package/src/components/Attachment/StyledAttachment.tsx +44 -0
- package/src/components/Attachment/__tests__/__snapshots__/index.spec.tsx.snap +158 -0
- package/src/components/Attachment/__tests__/index.spec.tsx +59 -0
- package/src/components/Attachment/index.tsx +77 -0
- 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/Badge/Status.tsx +1 -1
- package/src/components/Badge/StyledBadge.tsx +8 -1
- package/src/components/Badge/__tests__/Badge.spec.tsx +9 -0
- package/src/components/Badge/__tests__/__snapshots__/Badge.spec.tsx.snap +44 -0
- package/src/components/Badge/index.tsx +1 -1
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/BottomSheet/Header.tsx +2 -1
- package/src/components/BottomSheet/__tests__/__snapshots__/index.spec.tsx.snap +52 -52
- package/src/components/BottomSheet/index.tsx +4 -4
- package/src/components/Button/Button.tsx +0 -11
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +4 -4
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
- package/src/components/Button/LoadingIndicator/index.tsx +1 -1
- package/src/components/Button/StyledButton.tsx +24 -63
- package/src/components/Button/UtilityButton/__tests__/index.spec.tsx +2 -2
- package/src/components/Button/__tests__/Button.spec.tsx +10 -5
- package/src/components/Button/__tests__/StyledButton.spec.tsx +0 -70
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +301 -1206
- package/src/components/Calendar/CalendarRowItem.tsx +1 -4
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +5 -5
- package/src/components/Calendar/index.tsx +4 -3
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +1 -1
- 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/StyledCheckbox.tsx +7 -5
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +4 -12
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +95 -42
- package/src/components/Checkbox/index.tsx +4 -2
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/ContentNavigator/index.tsx +14 -9
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +28 -27
- package/src/components/Drawer/DragableDrawer/index.tsx +0 -2
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
- package/src/components/FAB/__tests__/__snapshots__/StyledFAB.spec.tsx.snap +1 -1
- package/src/components/FAB/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Icon/HeroIcon/glyphMap.json +1 -1
- package/src/components/Icon/IconList.ts +30 -3
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/List/BasicListItem.tsx +13 -8
- package/src/components/List/ListItem.tsx +8 -6
- package/src/components/List/StyledBasicListItem.tsx +2 -2
- package/src/components/List/StyledListItem.tsx +2 -2
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +24 -36
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +39 -59
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +40 -44
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +50 -50
- 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/ProgressBar.tsx +1 -1
- package/src/components/Progress/ProgressCircle.tsx +1 -1
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +10 -10
- package/src/components/Progress/types.ts +7 -1
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +20 -32
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +30 -48
- package/src/components/RefreshControl/__tests__/index.spec.tsx +1 -3
- package/src/components/RefreshControl/index.tsx +4 -2
- package/src/components/RichTextEditor/MentionList.tsx +12 -3
- package/src/components/RichTextEditor/RichTextEditor.tsx +3 -4
- 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 +13 -20
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +146 -234
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +430 -650
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +11 -18
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +136 -224
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +409 -629
- package/src/components/Select/StyledOptionList.tsx +0 -1
- package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +1 -1
- package/src/components/Spinner/StyledSpinner.tsx +1 -2
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +4 -4
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +16 -16
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/Swipeable/__tests__/__snapshots__/SwipeableAction.spec.tsx.snap +1 -1
- package/src/components/Swipeable/index.tsx +14 -2
- package/src/components/Switch/SelectorSwitch/Option.tsx +1 -5
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +3 -3
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Switch/SelectorSwitch/__tests__/index.spec.tsx +1 -0
- package/src/components/Switch/SelectorSwitch/index.tsx +4 -1
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +1 -1
- package/src/components/Tabs/StyledTabs.tsx +1 -1
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +1 -1
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +2 -2
- package/src/components/TextInput/StyledTextInput.tsx +1 -0
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +11 -10
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +27 -14
- package/src/components/TextInput/index.tsx +1 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +1 -0
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +28 -27
- package/src/components/Toast/Toast.tsx +0 -3
- package/src/components/Toast/ToastProvider.tsx +1 -0
- package/src/components/Toast/__tests__/index.spec.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/__tests__/__snapshots__/StyledText.spec.tsx.snap +4 -4
- package/src/emotion.d.ts +1 -0
- package/src/index.ts +6 -0
- package/src/theme/ThemeSwitcher.tsx +7 -1
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +87 -74
- package/src/theme/__tests__/ensureCompatibleWithV7.spec.tsx +13 -0
- package/src/theme/components/alert.ts +1 -1
- package/src/theme/components/attachment.ts +28 -0
- package/src/theme/components/avatar.ts +1 -1
- package/src/theme/components/badge.ts +2 -1
- package/src/theme/components/bottomNavigation.ts +1 -1
- package/src/theme/components/bottomSheet.ts +2 -2
- package/src/theme/components/button.ts +4 -20
- package/src/theme/components/calendar.ts +3 -3
- package/src/theme/components/card.ts +1 -1
- package/src/theme/components/checkbox.ts +2 -2
- package/src/theme/components/divider.ts +1 -1
- package/src/theme/components/drawer.ts +2 -2
- package/src/theme/components/empty.ts +3 -3
- package/src/theme/components/fab.ts +7 -7
- package/src/theme/components/icon.ts +4 -4
- package/src/theme/components/list.ts +0 -2
- package/src/theme/components/pinInput.ts +4 -4
- package/src/theme/components/progress.ts +6 -5
- package/src/theme/components/radio.ts +1 -1
- package/src/theme/components/richTextEditor.ts +2 -2
- package/src/theme/components/slider.ts +2 -2
- package/src/theme/components/switch.ts +4 -4
- package/src/theme/components/tabs.ts +6 -5
- package/src/theme/components/tag.ts +2 -2
- package/src/theme/components/textInput.ts +23 -28
- package/src/theme/components/toast.ts +3 -3
- package/src/theme/components/toolbar.ts +3 -3
- package/src/theme/components/typography.ts +7 -7
- package/src/theme/getTheme.ts +4 -1
- package/src/theme/global/colors/eBens.ts +23 -0
- package/src/theme/global/colors/global.ts +15 -6
- package/src/theme/global/colors/jobs.ts +15 -9
- package/src/theme/global/colors/legacySystemPalette.ts +6 -6
- package/src/theme/global/colors/swag.ts +32 -53
- package/src/theme/global/colors/types.ts +35 -15
- package/src/theme/global/colors/wallet.ts +23 -0
- package/src/theme/global/colors/work.ts +15 -9
- package/src/theme/global/index.ts +4 -0
- package/src/theme/index.ts +4 -0
- package/src/utils/functions.ts +2 -0
- package/src/utils/scale.ts +1 -1
- package/tsconfig.json +8 -2
- package/types/components/Accordion/StyledAccordion.d.ts +14 -14
- package/types/components/Alert/StyledAlert.d.ts +15 -15
- package/types/components/Attachment/StyledAttachment.d.ts +28 -0
- package/types/components/Attachment/index.d.ts +37 -0
- package/types/components/Avatar/StyledAvatar.d.ts +15 -15
- package/types/components/Avatar/index.d.ts +1 -1
- package/types/components/Badge/Status.d.ts +1 -1
- package/types/components/Badge/StyledBadge.d.ts +8 -8
- package/types/components/Badge/index.d.ts +1 -1
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +21 -21
- package/types/components/BottomSheet/Header.d.ts +1 -1
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +22 -22
- package/types/components/Box/StyledBox.d.ts +4 -4
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +7 -7
- package/types/components/Button/StyledButton.d.ts +15 -18
- package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +8 -8
- package/types/components/Calendar/StyledCalendar.d.ts +25 -25
- package/types/components/Calendar/helpers.d.ts +2 -2
- package/types/components/Card/DataCard/StyledDataCard.d.ts +6 -6
- package/types/components/Card/StyledCard.d.ts +7 -7
- package/types/components/Checkbox/StyledCheckbox.d.ts +16 -10
- package/types/components/Collapse/StyledCollapse.d.ts +8 -8
- package/types/components/ContentNavigator/StyledContentNavigator.d.ts +5 -5
- package/types/components/ContentNavigator/index.d.ts +2 -1
- package/types/components/DatePicker/StyledDatePicker.d.ts +3 -3
- package/types/components/Divider/StyledDivider.d.ts +5 -5
- package/types/components/Drawer/StyledDrawer.d.ts +19 -19
- package/types/components/Empty/StyledEmpty.d.ts +9 -9
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +11 -11
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +7 -7
- package/types/components/FAB/StyledFAB.d.ts +8 -8
- package/types/components/Icon/HeroIcon/index.d.ts +3 -3
- package/types/components/Icon/IconList.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/Icon/utils.d.ts +1 -1
- package/types/components/List/StyledBasicListItem.d.ts +16 -16
- package/types/components/List/StyledListItem.d.ts +25 -25
- package/types/components/PinInput/StyledPinInput.d.ts +30 -30
- package/types/components/Progress/ProgressBar.d.ts +1 -1
- package/types/components/Progress/ProgressCircle.d.ts +1 -1
- package/types/components/Progress/StyledProgressBar.d.ts +5 -5
- package/types/components/Progress/StyledProgressCircle.d.ts +18 -18
- package/types/components/Progress/types.d.ts +1 -1
- package/types/components/Radio/StyledRadio.d.ts +9 -9
- package/types/components/RefreshControl/index.d.ts +1 -2
- package/types/components/RichTextEditor/EditorToolbar.d.ts +1 -1
- package/types/components/RichTextEditor/MentionList.d.ts +1 -1
- package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +6 -6
- package/types/components/RichTextEditor/StyledToolbar.d.ts +9 -9
- package/types/components/RichTextEditor/index.d.ts +2 -2
- package/types/components/SectionHeading/StyledHeading.d.ts +9 -9
- package/types/components/Select/MultiSelect/Option.d.ts +1 -1
- package/types/components/Select/SingleSelect/Option.d.ts +1 -1
- package/types/components/Select/StyledSelect.d.ts +11 -11
- package/types/components/Select/helpers.d.ts +1 -1
- package/types/components/Spinner/StyledSpinner.d.ts +12 -12
- package/types/components/Swipeable/StyledSwipeable.d.ts +3 -3
- package/types/components/Swipeable/index.d.ts +7 -3
- package/types/components/Switch/SelectorSwitch/Option.d.ts +3 -1
- package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +9 -9
- package/types/components/Switch/StyledSwitch.d.ts +5 -5
- package/types/components/Tabs/StyledScrollableTabs.d.ts +23 -23
- package/types/components/Tabs/StyledTabs.d.ts +22 -22
- package/types/components/Tag/StyledTag.d.ts +6 -6
- package/types/components/TextInput/StyledTextInput.d.ts +44 -44
- package/types/components/TextInput/index.d.ts +5 -5
- package/types/components/TimePicker/StyledTimePicker.d.ts +3 -3
- package/types/components/Toast/StyledToast.d.ts +17 -17
- package/types/components/Toolbar/StyledToolbar.d.ts +9 -9
- package/types/components/Typography/Text/StyledText.d.ts +3 -3
- package/types/index.d.ts +3 -2
- package/types/testHelpers/renderWithTheme.d.ts +1 -1
- package/types/theme/ThemeSwitcher.d.ts +2 -2
- package/types/theme/components/attachment.d.ts +21 -0
- package/types/theme/components/badge.d.ts +1 -0
- package/types/theme/components/button.d.ts +0 -15
- package/types/theme/components/list.d.ts +0 -1
- package/types/theme/components/progress.d.ts +1 -0
- package/types/theme/components/tabs.d.ts +1 -0
- package/types/theme/components/tag.d.ts +2 -2
- package/types/theme/components/textInput.d.ts +0 -5
- package/types/theme/getTheme.d.ts +2 -0
- package/types/theme/global/colors/eBens.d.ts +3 -0
- package/types/theme/global/colors/types.d.ts +23 -16
- package/types/theme/global/colors/wallet.d.ts +3 -0
- package/types/theme/global/index.d.ts +26 -12
- package/types/theme/index.d.ts +2 -2
- package/types/utils/functions.d.ts +1 -0
- package/types/utils/hooks.d.ts +1 -1
|
@@ -3,8 +3,6 @@ import type { GlobalTheme } from '../global';
|
|
|
3
3
|
const getListTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
5
|
checkedListItemContainerBackground: theme.colors.highlightedSurface,
|
|
6
|
-
highlightedListItemContainerBackground:
|
|
7
|
-
theme.colors.lightHighlightedSurface,
|
|
8
6
|
listItemContainerBackground: theme.colors.defaultGlobalSurface,
|
|
9
7
|
leadingStatus: {
|
|
10
8
|
danger: theme.colors.error,
|
|
@@ -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.primaryOutline,
|
|
11
|
+
mask: theme.colors.primaryOutline,
|
|
12
|
+
error: theme.colors.onErrorSurface,
|
|
13
|
+
disabled: theme.colors.disabledOnDefaultGlobalSurface,
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
const fonts = {
|
|
@@ -3,11 +3,12 @@ import type { GlobalTheme } from '../global';
|
|
|
3
3
|
const getProgressTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
5
|
primary: theme.colors.primary,
|
|
6
|
-
success: theme.colors.
|
|
7
|
-
warning: theme.colors.
|
|
8
|
-
danger: theme.colors.
|
|
9
|
-
info: theme.colors.
|
|
10
|
-
|
|
6
|
+
success: theme.colors.onSuccessSurface, // should be emerald dark 15
|
|
7
|
+
warning: theme.colors.onWarningSurface,
|
|
8
|
+
danger: theme.colors.onErrorSurface,
|
|
9
|
+
info: theme.colors.onInfoSurface,
|
|
10
|
+
archived: theme.colors.onArchivedSurface,
|
|
11
|
+
background: theme.colors.secondaryOutline,
|
|
11
12
|
innerBackground: theme.colors.defaultGlobalSurface,
|
|
12
13
|
};
|
|
13
14
|
|
|
@@ -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.
|
|
5
|
+
toolbarBorderColor: theme.colors.secondaryOutline,
|
|
6
6
|
toolbarBackgroundColor: theme.colors.neutralGlobalSurface,
|
|
7
|
-
toolbarButtonSelectedBackground: theme.colors.
|
|
7
|
+
toolbarButtonSelectedBackground: theme.colors.highlightedSurface,
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
const sizes = {
|
|
@@ -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.
|
|
5
|
+
minimumTrackTint: theme.colors.primary,
|
|
6
6
|
thumbTint: theme.colors.neutralGlobalSurface,
|
|
7
|
-
maximumTrackTint: theme.colors.
|
|
7
|
+
maximumTrackTint: theme.colors.highlightedSurface,
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
return { colors };
|
|
@@ -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.
|
|
6
|
+
checked: theme.colors.primary,
|
|
7
|
+
unchecked: theme.colors.inactiveOnDefaultGlobalSurface,
|
|
8
|
+
'disabled-checked': theme.colors.highlightedSurface,
|
|
9
9
|
'disabled-unchecked': theme.colors.disabledOnDefaultGlobalSurface,
|
|
10
10
|
},
|
|
11
11
|
thumb: theme.colors.onSecondary,
|
|
12
12
|
selector: {
|
|
13
13
|
background: theme.colors.neutralGlobalSurface,
|
|
14
|
-
textBackground: theme.colors.
|
|
14
|
+
textBackground: theme.colors.decorativePrimary,
|
|
15
15
|
},
|
|
16
16
|
};
|
|
17
17
|
|
|
@@ -2,11 +2,12 @@ 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
|
-
|
|
5
|
+
active: theme.colors.onDefaultGlobalSurface,
|
|
6
|
+
inactive: theme.colors.onDefaultGlobalSurface,
|
|
7
|
+
activeBackground: theme.colors.decorativePrimarySurface,
|
|
8
|
+
headerBottom: theme.colors.secondaryOutline,
|
|
9
|
+
indicator: theme.colors.primary,
|
|
10
|
+
text: theme.colors.onDefaultGlobalSurface,
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
const space = {
|
|
@@ -6,9 +6,9 @@ const getTagTheme = (theme: GlobalTheme) => {
|
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
const colors = {
|
|
9
|
-
default: theme.colors.
|
|
9
|
+
default: theme.colors.onDefaultGlobalSurface,
|
|
10
10
|
defaultBackground: undefined,
|
|
11
|
-
primary: theme.colors.
|
|
11
|
+
primary: theme.colors.primary,
|
|
12
12
|
primaryBackground: undefined,
|
|
13
13
|
info: theme.colors.onInfoSurface,
|
|
14
14
|
infoBackground: theme.colors.infoSurface,
|
|
@@ -4,46 +4,41 @@ const getTextInputTheme = (theme: GlobalTheme) => {
|
|
|
4
4
|
const colors = {
|
|
5
5
|
labelBackground: theme.colors.defaultGlobalSurface,
|
|
6
6
|
asterisks: {
|
|
7
|
-
default: theme.colors.
|
|
8
|
-
error: theme.colors.
|
|
7
|
+
default: theme.colors.onErrorSurface,
|
|
8
|
+
error: theme.colors.onErrorSurface,
|
|
9
9
|
disabled: theme.colors.disabledOnDefaultGlobalSurface,
|
|
10
|
-
readonly: theme.colors.
|
|
11
|
-
filled: theme.colors.
|
|
10
|
+
readonly: theme.colors.inactiveOnDefaultGlobalSurface,
|
|
11
|
+
filled: theme.colors.onErrorSurface,
|
|
12
12
|
},
|
|
13
|
-
error: theme.colors.
|
|
14
|
-
|
|
15
|
-
placeholderIfFocued: theme.colors.mutedSecondary,
|
|
16
|
-
label: theme.colors.globalPrimary,
|
|
17
|
-
readonlyLabel: theme.colors.mutedSecondary,
|
|
18
|
-
disabledLabel: theme.colors.disabledOnDefaultGlobalSurface,
|
|
19
|
-
text: theme.colors.globalPrimary,
|
|
13
|
+
error: theme.colors.onErrorSurface,
|
|
14
|
+
text: theme.colors.onDefaultGlobalSurface,
|
|
20
15
|
borders: {
|
|
21
|
-
default: theme.colors.
|
|
22
|
-
error: theme.colors.
|
|
23
|
-
disabled: theme.colors.
|
|
24
|
-
readonly: theme.colors.
|
|
25
|
-
filled: theme.colors.
|
|
16
|
+
default: theme.colors.primaryOutline,
|
|
17
|
+
error: theme.colors.onErrorSurface,
|
|
18
|
+
disabled: theme.colors.disabledOutline,
|
|
19
|
+
readonly: theme.colors.inactiveOutline,
|
|
20
|
+
filled: theme.colors.primaryOutline,
|
|
26
21
|
},
|
|
27
22
|
labels: {
|
|
28
|
-
default: theme.colors.
|
|
29
|
-
error: theme.colors.
|
|
23
|
+
default: theme.colors.onDefaultGlobalSurface,
|
|
24
|
+
error: theme.colors.onDefaultGlobalSurface,
|
|
30
25
|
disabled: theme.colors.disabledOnDefaultGlobalSurface,
|
|
31
|
-
readonly: theme.colors.
|
|
32
|
-
filled: theme.colors.
|
|
26
|
+
readonly: theme.colors.inactiveOnDefaultGlobalSurface,
|
|
27
|
+
filled: theme.colors.onDefaultGlobalSurface,
|
|
33
28
|
},
|
|
34
29
|
labelsInsideTextInput: {
|
|
35
|
-
default: theme.colors.
|
|
36
|
-
error: theme.colors.
|
|
30
|
+
default: theme.colors.onDefaultGlobalSurface,
|
|
31
|
+
error: theme.colors.onDefaultGlobalSurface,
|
|
37
32
|
disabled: theme.colors.disabledOnDefaultGlobalSurface,
|
|
38
|
-
readonly: theme.colors.
|
|
39
|
-
filled: theme.colors.
|
|
33
|
+
readonly: theme.colors.inactiveOnDefaultGlobalSurface,
|
|
34
|
+
filled: theme.colors.onDefaultGlobalSurface,
|
|
40
35
|
},
|
|
41
36
|
maxLengthLabels: {
|
|
42
|
-
default: theme.colors.
|
|
43
|
-
error: theme.colors.
|
|
37
|
+
default: theme.colors.onDefaultGlobalSurface,
|
|
38
|
+
error: theme.colors.onErrorSurface,
|
|
44
39
|
disabled: theme.colors.disabledOnDefaultGlobalSurface,
|
|
45
|
-
readonly: theme.colors.
|
|
46
|
-
filled: theme.colors.
|
|
40
|
+
readonly: theme.colors.inactiveOnDefaultGlobalSurface,
|
|
41
|
+
filled: theme.colors.onDefaultGlobalSurface,
|
|
47
42
|
},
|
|
48
43
|
};
|
|
49
44
|
|
|
@@ -7,9 +7,9 @@ const getToastTheme = (theme: GlobalTheme) => {
|
|
|
7
7
|
error: theme.colors.error,
|
|
8
8
|
info: theme.colors.info,
|
|
9
9
|
notification: theme.colors.defaultGlobalSurface,
|
|
10
|
-
snackbar: theme.colors.
|
|
11
|
-
divider: theme.colors.
|
|
12
|
-
shadow: theme.colors.
|
|
10
|
+
snackbar: theme.colors.darkGlobalSurface,
|
|
11
|
+
divider: theme.colors.secondaryOutline,
|
|
12
|
+
shadow: theme.colors.primaryOutline,
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
const sizes = {
|
|
@@ -3,14 +3,14 @@ import type { GlobalTheme } from '../global';
|
|
|
3
3
|
const getToolbarTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
5
|
background: theme.colors.defaultGlobalSurface,
|
|
6
|
-
border: theme.colors.
|
|
6
|
+
border: theme.colors.primaryOutline,
|
|
7
7
|
primary: theme.colors.primary,
|
|
8
8
|
secondary: theme.colors.secondary,
|
|
9
9
|
info: theme.colors.info,
|
|
10
10
|
success: theme.colors.success,
|
|
11
11
|
danger: theme.colors.warning,
|
|
12
|
-
error: theme.colors.
|
|
13
|
-
disabled: theme.colors.
|
|
12
|
+
error: theme.colors.error,
|
|
13
|
+
disabled: theme.colors.disabledOnDefaultGlobalSurface,
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
const space = {
|
|
@@ -2,15 +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.onDefaultGlobalSurface,
|
|
6
|
+
subdued: theme.colors.mutedOnDefaultGlobalSurface,
|
|
7
7
|
primary: theme.colors.primary,
|
|
8
8
|
secondary: theme.colors.secondary,
|
|
9
|
-
info: theme.colors.
|
|
10
|
-
danger: theme.colors.
|
|
11
|
-
warning: theme.colors.
|
|
12
|
-
success: theme.colors.
|
|
13
|
-
inverted: theme.colors.
|
|
9
|
+
info: theme.colors.onInfoSurface,
|
|
10
|
+
danger: theme.colors.onErrorSurface,
|
|
11
|
+
warning: theme.colors.onWarningSurface,
|
|
12
|
+
success: theme.colors.onSuccessSurface,
|
|
13
|
+
inverted: theme.colors.onDarkGlobalSurface,
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
const fonts = {
|
package/src/theme/getTheme.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { getGlobalTheme, defaultScale, swagSystemPalette } from './global';
|
|
|
2
2
|
|
|
3
3
|
import getAccordionTheme from './components/accordion';
|
|
4
4
|
import getAlertTheme from './components/alert';
|
|
5
|
+
import getAttachmentTheme from './components/attachment';
|
|
5
6
|
import getAvatarTheme from './components/avatar';
|
|
6
7
|
import getBadgeTheme from './components/badge';
|
|
7
8
|
import getBottomNavigationTheme from './components/bottomNavigation';
|
|
@@ -44,6 +45,7 @@ type Theme = GlobalTheme & {
|
|
|
44
45
|
__hd__: {
|
|
45
46
|
accordion: ReturnType<typeof getAccordionTheme>;
|
|
46
47
|
alert: ReturnType<typeof getAlertTheme>;
|
|
48
|
+
attachment: ReturnType<typeof getAttachmentTheme>;
|
|
47
49
|
avatar: ReturnType<typeof getAvatarTheme>;
|
|
48
50
|
badge: ReturnType<typeof getBadgeTheme>;
|
|
49
51
|
bottomNavigation: ReturnType<typeof getBottomNavigationTheme>;
|
|
@@ -91,8 +93,9 @@ const getTheme = (
|
|
|
91
93
|
...globalTheme,
|
|
92
94
|
__hd__: {
|
|
93
95
|
accordion: getAccordionTheme(globalTheme),
|
|
94
|
-
avatar: getAvatarTheme(globalTheme),
|
|
95
96
|
alert: getAlertTheme(globalTheme),
|
|
97
|
+
attachment: getAttachmentTheme(globalTheme),
|
|
98
|
+
avatar: getAvatarTheme(globalTheme),
|
|
96
99
|
badge: getBadgeTheme(globalTheme),
|
|
97
100
|
bottomNavigation: getBottomNavigationTheme(globalTheme),
|
|
98
101
|
bottomSheet: getBottomSheetTheme(globalTheme),
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { eBensPalette as palette } from '@hero-design/colors';
|
|
2
|
+
import swag from './swag';
|
|
3
|
+
import type { SystemPalette, BrandSystemPalette } from './types';
|
|
4
|
+
|
|
5
|
+
const eBensBrandSystemPallete: BrandSystemPalette = {
|
|
6
|
+
primary: palette.violet,
|
|
7
|
+
onPrimary: palette.white,
|
|
8
|
+
secondary: palette.violetLight30,
|
|
9
|
+
onSecondary: palette.white,
|
|
10
|
+
defaultSurface: palette.greyLight90,
|
|
11
|
+
highlightedSurface: palette.violetLight90,
|
|
12
|
+
pressedSurface: palette.violetLight20,
|
|
13
|
+
|
|
14
|
+
decorativePrimary: palette.mauve,
|
|
15
|
+
decorativePrimarySurface: palette.mauveLight80,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const eBensSystemPalette: SystemPalette = {
|
|
19
|
+
...swag,
|
|
20
|
+
...eBensBrandSystemPallete,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default eBensSystemPalette;
|
|
@@ -2,16 +2,24 @@ import { defaultMobilePalette as palette } from '@hero-design/colors';
|
|
|
2
2
|
import type { GlobalSystemPalette } from './types';
|
|
3
3
|
|
|
4
4
|
const globalPalette: GlobalSystemPalette = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
onGlobalPrimary: palette.white,
|
|
8
|
-
globalSecondary: palette.maasstrichtBlueLight30,
|
|
9
|
-
globalPrimaryOutline: palette.maasstrichtBlue,
|
|
10
|
-
globalSecondaryOutline: palette.greyLight75,
|
|
5
|
+
// Updated 14 / Nov / 22
|
|
6
|
+
// Surfaces
|
|
11
7
|
defaultGlobalSurface: palette.white,
|
|
12
8
|
onDefaultGlobalSurface: palette.maasstrichtBlue,
|
|
13
9
|
neutralGlobalSurface: palette.greyLight90,
|
|
10
|
+
mutedOnDefaultGlobalSurface: palette.maasstrichtBlueLight30,
|
|
11
|
+
inactiveOnDefaultGlobalSurface: palette.maasstrichtBlueLight50,
|
|
14
12
|
disabledOnDefaultGlobalSurface: palette.greyLight30,
|
|
13
|
+
darkGlobalSurface: palette.maasstrichtBlue,
|
|
14
|
+
onDarkGlobalSurface: palette.white,
|
|
15
|
+
|
|
16
|
+
// Outlines
|
|
17
|
+
primaryOutline: palette.maasstrichtBlue,
|
|
18
|
+
secondaryOutline: palette.greyLight75,
|
|
19
|
+
inactiveOutline: palette.maasstrichtBlueLight50,
|
|
20
|
+
disabledOutline: palette.greyLight30,
|
|
21
|
+
|
|
22
|
+
// Accents
|
|
15
23
|
error: palette.pastelRed,
|
|
16
24
|
errorSurface: palette.linen,
|
|
17
25
|
onErrorSurface: palette.vermilion,
|
|
@@ -27,6 +35,7 @@ const globalPalette: GlobalSystemPalette = {
|
|
|
27
35
|
archived: palette.greyLight45,
|
|
28
36
|
archivedSurface: palette.antiFlashWhite,
|
|
29
37
|
onArchivedSurface: palette.sonicSilver,
|
|
38
|
+
// End of Updated 14 / Nov / 22
|
|
30
39
|
};
|
|
31
40
|
|
|
32
41
|
export default globalPalette;
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { jobsPalette as palette } from '@hero-design/colors';
|
|
2
2
|
import swag from './swag';
|
|
3
|
-
import type { SystemPalette } from './types';
|
|
3
|
+
import type { SystemPalette, BrandSystemPalette } from './types';
|
|
4
|
+
|
|
5
|
+
const jobsBrandSystemPallete: BrandSystemPalette = {
|
|
6
|
+
primary: palette.apple,
|
|
7
|
+
onPrimary: palette.white,
|
|
8
|
+
secondary: palette.maasstrichtBlueLight30,
|
|
9
|
+
onSecondary: palette.white,
|
|
10
|
+
defaultSurface: palette.white,
|
|
11
|
+
highlightedSurface: palette.hitPinkLight90,
|
|
12
|
+
pressedSurface: palette.appleLight10,
|
|
13
|
+
|
|
14
|
+
decorativePrimary: palette.hitPink,
|
|
15
|
+
decorativePrimarySurface: palette.hitPinkLight80,
|
|
16
|
+
};
|
|
4
17
|
|
|
5
18
|
const jobsSystemPalette: SystemPalette = {
|
|
6
19
|
...swag,
|
|
7
|
-
|
|
8
|
-
primary: palette.hitPink,
|
|
9
|
-
mutedPrimary: palette.hitPinkLight90,
|
|
10
|
-
secondary: palette.apple,
|
|
11
|
-
mutedSecondary: palette.maasstrichtBlueLight50,
|
|
12
|
-
disabledSecondary: palette.hitPinkLight50,
|
|
13
|
-
highlightedSurface: palette.hitPinkLight80,
|
|
14
|
-
lightHighlightedSurface: palette.hitPinkLight90,
|
|
20
|
+
...jobsBrandSystemPallete,
|
|
15
21
|
};
|
|
16
22
|
|
|
17
23
|
export default jobsSystemPalette;
|
|
@@ -8,19 +8,15 @@ const legacySystemPalette: LegacySystemPalette = {
|
|
|
8
8
|
globalPrimary: palette.maasstrichtBlue,
|
|
9
9
|
globalPrimaryLight: palette.maasstrichtBlueLight50,
|
|
10
10
|
globalPrimaryBackground: palette.maasstrichtBlueLight90,
|
|
11
|
-
primary: swagPalette.violet,
|
|
12
11
|
primaryLight: swagPalette.violetLight50,
|
|
13
12
|
primaryDark: swagPalette.scarletGumLight30, // DEPRECATED
|
|
14
13
|
primaryBackground: swagPalette.violetLight90,
|
|
15
14
|
primaryBackgroundDark: palette.maasstrichtBlueLight30,
|
|
16
|
-
secondary: swagPalette.ultramarineBlue, // no longer needed after revising Button
|
|
17
15
|
secondaryLight: swagPalette.vodka, // no longer needed after revising Button
|
|
18
16
|
secondaryBackground: swagPalette.aliceBlue, // no longer needed after revising Button
|
|
19
|
-
info: palette.ultramarineBlue,
|
|
20
17
|
infoMediumLight: palette.vodka, // DEPRECATED, use infoLight instead
|
|
21
18
|
infoLight: palette.vodka,
|
|
22
19
|
infoBackground: palette.aliceBlue,
|
|
23
|
-
success: palette.emerald,
|
|
24
20
|
successLight: palette.emerald, // DEPRECATED, use success instead
|
|
25
21
|
successDark: palette.pineGreen,
|
|
26
22
|
successBackground: palette.honeydew,
|
|
@@ -28,7 +24,6 @@ const legacySystemPalette: LegacySystemPalette = {
|
|
|
28
24
|
dangerMediumLight: palette.apple, // should be dangerDark?
|
|
29
25
|
dangerLight: palette.pastelRed,
|
|
30
26
|
dangerBackground: palette.linen,
|
|
31
|
-
warning: palette.mellowApricot,
|
|
32
27
|
warningLight: palette.mellowApricot, // DEPRECATED, use warning instead
|
|
33
28
|
warningDark: palette.deepSaffron,
|
|
34
29
|
warningBackground: palette.seashell,
|
|
@@ -41,13 +36,18 @@ const legacySystemPalette: LegacySystemPalette = {
|
|
|
41
36
|
disabledLightText: palette.greyLight30, // disabled
|
|
42
37
|
invertedText: palette.white,
|
|
43
38
|
outline: palette.greyLight75, // divider
|
|
44
|
-
archived: palette.greyLight45, // no usage
|
|
45
39
|
archivedLight: palette.greyLight30,
|
|
46
40
|
archivedDark: palette.sonicSilver, // should replace archived as archived has no usage?
|
|
47
41
|
archivedBackground: palette.greyLight90,
|
|
48
42
|
black: palette.black,
|
|
49
43
|
inactiveBackground: palette.maasstrichtBlueLight50,
|
|
50
44
|
shadow: palette.greyLight45, // waiting for new color
|
|
45
|
+
// Updated 14 / Nov / 22
|
|
46
|
+
mutedGlobalPrimary: palette.maasstrichtBlueLight30,
|
|
47
|
+
onGlobalPrimary: palette.white,
|
|
48
|
+
globalSecondary: palette.maasstrichtBlueLight30,
|
|
49
|
+
globalPrimaryOutline: palette.maasstrichtBlue,
|
|
50
|
+
globalSecondaryOutline: palette.greyLight75,
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
export default legacySystemPalette;
|
|
@@ -1,65 +1,44 @@
|
|
|
1
1
|
import { swagPalette as palette } from '@hero-design/colors';
|
|
2
|
-
import type {
|
|
2
|
+
import type {
|
|
3
|
+
SystemPalette,
|
|
4
|
+
BrandSystemPalette,
|
|
5
|
+
LegacyBrandSystemPalette,
|
|
6
|
+
} from './types';
|
|
3
7
|
import globalPalette from './global';
|
|
8
|
+
import legacySystemPalette from './legacySystemPalette';
|
|
4
9
|
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
primaryBackgroundDark: palette.maasstrichtBlueLight30,
|
|
14
|
-
secondaryLight: palette.vodka, // no longer needed after revising Button
|
|
15
|
-
secondaryBackground: palette.aliceBlue, // no longer needed after revising Button
|
|
16
|
-
info: palette.ultramarineBlue,
|
|
17
|
-
infoMediumLight: palette.vodka, // DEPRECATED, use infoLight instead
|
|
18
|
-
infoLight: palette.vodka,
|
|
19
|
-
infoBackground: palette.aliceBlue,
|
|
20
|
-
success: palette.emerald,
|
|
21
|
-
successLight: palette.emerald, // DEPRECATED, use success instead
|
|
22
|
-
successDark: palette.pineGreen,
|
|
23
|
-
successBackground: palette.honeydew,
|
|
24
|
-
danger: palette.vermilion,
|
|
25
|
-
dangerMediumLight: palette.apple, // should be dangerDark?
|
|
26
|
-
dangerLight: palette.pastelRed,
|
|
27
|
-
dangerBackground: palette.linen,
|
|
28
|
-
warning: palette.mellowApricot,
|
|
29
|
-
warningLight: palette.mellowApricot, // DEPRECATED, use warning instead
|
|
30
|
-
warningDark: palette.deepSaffron,
|
|
31
|
-
warningBackground: palette.seashell,
|
|
32
|
-
platformBackground: palette.white,
|
|
33
|
-
backgroundLight: palette.greyLight90,
|
|
34
|
-
backgroundDark: palette.maasstrichtBlue,
|
|
35
|
-
text: palette.maasstrichtBlue,
|
|
36
|
-
subduedText: palette.maasstrichtBlueLight30, // secondary
|
|
37
|
-
disabledText: palette.maasstrichtBlueLight50, // readonly
|
|
38
|
-
disabledLightText: palette.greyLight30, // disabled
|
|
39
|
-
invertedText: palette.white,
|
|
40
|
-
outline: palette.greyLight75, // divider
|
|
41
|
-
archived: palette.greyLight45, // no usage
|
|
42
|
-
archivedLight: palette.greyLight30,
|
|
43
|
-
archivedDark: palette.sonicSilver, // should replace archived as archived has no usage?
|
|
44
|
-
archivedBackground: palette.greyLight90,
|
|
45
|
-
black: palette.black,
|
|
46
|
-
inactiveBackground: palette.maasstrichtBlueLight50,
|
|
47
|
-
shadow: palette.greyLight45, // waiting for new color
|
|
10
|
+
const swagBrandSystemPallete: BrandSystemPalette = {
|
|
11
|
+
primary: palette.scarletGum,
|
|
12
|
+
onPrimary: palette.white,
|
|
13
|
+
secondary: palette.scarletGumLight30,
|
|
14
|
+
onSecondary: palette.white,
|
|
15
|
+
defaultSurface: palette.greyLight90,
|
|
16
|
+
highlightedSurface: palette.scarletGumLight90,
|
|
17
|
+
pressedSurface: palette.scarletGumLight20,
|
|
48
18
|
|
|
49
|
-
|
|
50
|
-
|
|
19
|
+
decorativePrimary: palette.white,
|
|
20
|
+
decorativePrimarySurface: palette.maasstrichtBlueLight80,
|
|
21
|
+
};
|
|
51
22
|
|
|
52
|
-
|
|
53
|
-
primary: palette.maasstrichtBlue,
|
|
23
|
+
const swagLegacyBrandSystemPalette: LegacyBrandSystemPalette = {
|
|
54
24
|
mutedPrimary: palette.maasstrichtBlueLight90,
|
|
55
|
-
|
|
56
|
-
secondary: palette.scarletGum,
|
|
57
|
-
onSecondary: palette.white,
|
|
25
|
+
highlightedSecondarySurface: palette.aliceBlue,
|
|
58
26
|
mutedSecondary: palette.maasstrichtBlueLight50,
|
|
59
27
|
disabledSecondary: palette.scarletGumLight50,
|
|
60
|
-
highlightedSurface: palette.scarletGumLight80,
|
|
61
|
-
highlightedSecondarySurface: palette.aliceBlue,
|
|
62
28
|
lightHighlightedSurface: palette.scarletGumLight90,
|
|
63
29
|
};
|
|
64
30
|
|
|
31
|
+
const swagSystemPalette: SystemPalette = {
|
|
32
|
+
// TODO: Remove legacy in V8
|
|
33
|
+
// Legacy system
|
|
34
|
+
...legacySystemPalette,
|
|
35
|
+
// Legacy brand
|
|
36
|
+
...swagLegacyBrandSystemPalette,
|
|
37
|
+
|
|
38
|
+
// Global
|
|
39
|
+
...globalPalette,
|
|
40
|
+
// Brand
|
|
41
|
+
...swagBrandSystemPallete,
|
|
42
|
+
};
|
|
43
|
+
|
|
65
44
|
export default swagSystemPalette;
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
export type GlobalSystemPalette = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
onGlobalPrimary: string;
|
|
5
|
-
globalSecondary: string;
|
|
6
|
-
globalPrimaryOutline: string;
|
|
7
|
-
globalSecondaryOutline: string;
|
|
2
|
+
// Updated 14 / Nov / 22
|
|
3
|
+
// Surfaces
|
|
8
4
|
defaultGlobalSurface: string;
|
|
9
5
|
onDefaultGlobalSurface: string;
|
|
10
6
|
neutralGlobalSurface: string;
|
|
7
|
+
mutedOnDefaultGlobalSurface: string;
|
|
8
|
+
inactiveOnDefaultGlobalSurface: string;
|
|
11
9
|
disabledOnDefaultGlobalSurface: string;
|
|
10
|
+
darkGlobalSurface: string;
|
|
11
|
+
onDarkGlobalSurface: string;
|
|
12
|
+
|
|
13
|
+
// Outlines
|
|
14
|
+
primaryOutline: string;
|
|
15
|
+
secondaryOutline: string;
|
|
16
|
+
inactiveOutline: string;
|
|
17
|
+
disabledOutline: string;
|
|
18
|
+
|
|
19
|
+
// Accents
|
|
12
20
|
error: string;
|
|
13
21
|
errorSurface: string;
|
|
14
22
|
onErrorSurface: string;
|
|
@@ -24,18 +32,29 @@ export type GlobalSystemPalette = {
|
|
|
24
32
|
archived: string;
|
|
25
33
|
archivedSurface: string;
|
|
26
34
|
onArchivedSurface: string;
|
|
35
|
+
// End of Updated 14 / Nov / 22
|
|
27
36
|
};
|
|
28
37
|
|
|
29
38
|
export type BrandSystemPalette = {
|
|
39
|
+
// Updated 14 / Nov / 22
|
|
30
40
|
primary: string;
|
|
31
|
-
mutedPrimary: string;
|
|
32
41
|
onPrimary: string;
|
|
33
42
|
secondary: string;
|
|
34
|
-
highlightedSecondarySurface: string; // TODO: Ask Ariel to add this
|
|
35
43
|
onSecondary: string;
|
|
44
|
+
defaultSurface: string;
|
|
45
|
+
highlightedSurface: string;
|
|
46
|
+
pressedSurface: string;
|
|
47
|
+
|
|
48
|
+
decorativePrimary: string;
|
|
49
|
+
decorativePrimarySurface: string;
|
|
50
|
+
// End of Updated 14 / Nov / 22
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export type LegacyBrandSystemPalette = {
|
|
54
|
+
mutedPrimary: string;
|
|
55
|
+
highlightedSecondarySurface: string;
|
|
36
56
|
mutedSecondary: string;
|
|
37
57
|
disabledSecondary: string;
|
|
38
|
-
highlightedSurface: string;
|
|
39
58
|
lightHighlightedSurface: string;
|
|
40
59
|
};
|
|
41
60
|
|
|
@@ -43,19 +62,15 @@ export type LegacySystemPalette = {
|
|
|
43
62
|
globalPrimary: string;
|
|
44
63
|
globalPrimaryLight: string;
|
|
45
64
|
globalPrimaryBackground: string;
|
|
46
|
-
primary: string;
|
|
47
65
|
primaryLight: string;
|
|
48
66
|
primaryDark: string;
|
|
49
67
|
primaryBackground: string;
|
|
50
68
|
primaryBackgroundDark: string;
|
|
51
|
-
secondary: string;
|
|
52
69
|
secondaryLight: string;
|
|
53
70
|
secondaryBackground: string;
|
|
54
|
-
info: string;
|
|
55
71
|
infoMediumLight: string;
|
|
56
72
|
infoLight: string;
|
|
57
73
|
infoBackground: string;
|
|
58
|
-
success: string;
|
|
59
74
|
successLight: string;
|
|
60
75
|
successDark: string;
|
|
61
76
|
successBackground: string;
|
|
@@ -63,7 +78,6 @@ export type LegacySystemPalette = {
|
|
|
63
78
|
dangerMediumLight: string;
|
|
64
79
|
dangerLight: string;
|
|
65
80
|
dangerBackground: string;
|
|
66
|
-
warning: string;
|
|
67
81
|
warningLight: string;
|
|
68
82
|
warningDark: string;
|
|
69
83
|
warningBackground: string;
|
|
@@ -76,15 +90,21 @@ export type LegacySystemPalette = {
|
|
|
76
90
|
disabledLightText: string;
|
|
77
91
|
invertedText: string;
|
|
78
92
|
outline: string;
|
|
79
|
-
archived: string;
|
|
80
93
|
archivedLight: string;
|
|
81
94
|
archivedDark: string;
|
|
82
95
|
archivedBackground: string;
|
|
83
96
|
black: string;
|
|
84
97
|
inactiveBackground: string;
|
|
85
98
|
shadow: string;
|
|
99
|
+
|
|
100
|
+
mutedGlobalPrimary: string;
|
|
101
|
+
onGlobalPrimary: string;
|
|
102
|
+
globalSecondary: string;
|
|
103
|
+
globalPrimaryOutline: string;
|
|
104
|
+
globalSecondaryOutline: string;
|
|
86
105
|
};
|
|
87
106
|
|
|
88
107
|
export type SystemPalette = LegacySystemPalette &
|
|
108
|
+
LegacyBrandSystemPalette &
|
|
89
109
|
GlobalSystemPalette &
|
|
90
110
|
BrandSystemPalette;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { walletPalette as palette } from '@hero-design/colors';
|
|
2
|
+
import swag from './swag';
|
|
3
|
+
import type { SystemPalette, BrandSystemPalette } from './types';
|
|
4
|
+
|
|
5
|
+
const walletBrandSystemPallete: BrandSystemPalette = {
|
|
6
|
+
primary: palette.royalBlue,
|
|
7
|
+
onPrimary: palette.white,
|
|
8
|
+
secondary: palette.royalBlueDark30,
|
|
9
|
+
onSecondary: palette.white,
|
|
10
|
+
defaultSurface: palette.frenchSkyLight70,
|
|
11
|
+
highlightedSurface: palette.royalBlueLight90,
|
|
12
|
+
pressedSurface: palette.royalBlueLight10,
|
|
13
|
+
|
|
14
|
+
decorativePrimary: palette.frenchSky,
|
|
15
|
+
decorativePrimarySurface: palette.frenchSkyLight80,
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const walletSystemPalette: SystemPalette = {
|
|
19
|
+
...swag,
|
|
20
|
+
...walletBrandSystemPallete,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default walletSystemPalette;
|