Skip to content

Commit 2858898

Browse files
authored
Merge pull request #1696 from curvefi/feat/sync-theme-variables-with-figma
feat: sync theme variables with figma
2 parents af297fb + a856855 commit 2858898

File tree

12 files changed

+716
-648
lines changed

12 files changed

+716
-648
lines changed

apps/main/src/llamalend/features/bands-chart/hooks/useBandsChartPalette.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ export const useBandsChartPalette = (): BandsChartPalette => {
2424
borderColor: theme.design.Layer[1].Outline,
2525
userRangeHighlightColor: theme.design.Chart.LiquidationZone.Current,
2626
userRangeTopLabelBackgroundColor: theme.design.Chart.Candles.Negative,
27+
userRangeTopLabelTextColor: theme.design.Text.TextColors.FilledFeedback.Alert.Primary,
2728
userRangeBottomLabelBackgroundColor: theme.design.Chart.Lines.Line2,
29+
userRangeBottomLabelTextColor: theme.design.Text.TextColors.FilledFeedback.Warning.Primary,
2830
oraclePriceLineColor: theme.design.Color.Primary[500],
2931
liquidationBandOutlineColor: theme.design.Color.Tertiary[600],
3032
zoomTrackBackgroundColor: theme.design.Color.Primary[200],

apps/main/src/llamalend/features/bands-chart/markLines.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ export const createLabelStyle = (lineStyle: { color: string }, palette: BandsCha
7474
: palette.userRangeBottomLabelBackgroundColor,
7575
color:
7676
lineStyle.color === palette.oraclePriceLineColor || lineStyle.color === palette.userRangeTopLabelBackgroundColor
77-
? palette.textColorInverted
78-
: palette.textColor,
77+
? palette.userRangeTopLabelTextColor
78+
: palette.userRangeBottomLabelTextColor,
7979
})
8080

8181
/**

apps/main/src/llamalend/features/bands-chart/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ export type BandsChartPalette = {
3232
borderColor: string
3333
userRangeHighlightColor: string
3434
userRangeTopLabelBackgroundColor: string
35+
userRangeTopLabelTextColor: string
3536
userRangeBottomLabelBackgroundColor: string
37+
userRangeBottomLabelTextColor: string
3638
oraclePriceLineColor: string
3739
liquidationBandOutlineColor: string
3840
zoomTrackBackgroundColor: string

packages/curve-ui-kit/src/shared/ui/Tooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const TooltipContent = ({ title, children }: { title: ReactNode; children
2020
// cancel any theme inversion as it's often applied on hover
2121
<InvertTheme inverted={false}>
2222
<Box
23-
sx={{ padding: Spacing.md, backgroundColor: (t) => t.design.Layer[3].Fill, width: '100%' }}
23+
sx={{ padding: Spacing.md, backgroundColor: (t) => t.design.Layer[1].Fill, width: '100%' }}
2424
onClick={(e) => e.stopPropagation()} // prevent changing pages when clicking on the tooltip
2525
>
2626
<Typography variant="bodyMBold" color="textPrimary" component="div">

packages/curve-ui-kit/src/themes/basic-theme/basic-theme.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,18 @@ export const basicMuiTheme = createMuiTheme({
1717
},
1818
unit: 'px',
1919
},
20-
spacing: Object.values(Spacing),
20+
spacing: [
21+
Spacing[0],
22+
Spacing[100],
23+
Spacing[200],
24+
Spacing[300],
25+
Spacing[350],
26+
Spacing[400],
27+
Spacing[500],
28+
Spacing[600],
29+
Spacing[700],
30+
Spacing[800],
31+
],
2132
direction: 'ltr',
2233
zIndex: {
2334
tableStickyColumn: 100, // the sticky column in the table

packages/curve-ui-kit/src/themes/components/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export const createComponents = (
144144
},
145145
styleOverrides: {
146146
paper: {
147-
backgroundColor: design.Layer[3].Fill,
147+
backgroundColor: design.Layer[2].Fill,
148148
'& .MuiMenu-list': {
149149
maxHeight: SizesAndSpaces.MaxHeight.popover,
150150
},

packages/curve-ui-kit/src/themes/components/mui-input-base.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const defineMuiInputBase = (
1414
): Components['MuiInputBase'] => ({
1515
styleOverrides: {
1616
root: {
17-
backgroundColor: Base.Default.Fill,
17+
backgroundColor: Base.Default.Fill.Default,
1818
// color the whole input base when accepting autofill suggestions in Chromium browsers
1919
':has(input:autofill)': {
2020
backgroundColor: 'light-dark(rgb(232, 240, 254), rgba(70, 90, 126, 0.4))',

packages/curve-ui-kit/src/themes/components/tabs/mui-tabs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const tabStyle = ({ Label, Fill, Outline }: TabStyle, inset?: string) => ({
8282
color: Label,
8383
backgroundColor: Fill,
8484
'::after': {
85-
backgroundColor: Outline ?? 'transparant',
85+
backgroundColor: Outline ?? 'transparent',
8686
inset,
8787
},
8888
})

packages/curve-ui-kit/src/themes/design/0_primitives.ts

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,6 @@ export const Blues = {
5454
'950': '#171e55',
5555
} as const
5656

57-
export const Yellows = {
58-
'50': '#fff9e6',
59-
'100': '#fff9f0',
60-
'200': '#fff1db',
61-
'300': '#ffe6bd',
62-
'400': '#ffd88b',
63-
'500': '#ffc300',
64-
'600': '#e0ab00',
65-
'700': '#c19300',
66-
'800': '#a37c0c',
67-
'900': '#84671d',
68-
'950': '#665223',
69-
} as const
70-
7157
export const Oranges = {
7258
'50': '#f0ddd1',
7359
'100': '#f3cfb9',
@@ -82,6 +68,20 @@ export const Oranges = {
8268
'950': '#4e2708',
8369
} as const
8470

71+
export const Yellows = {
72+
'50': '#fffbf5',
73+
'100': '#fff9f0',
74+
'200': '#fff1db',
75+
'300': '#ffe6bd',
76+
'400': '#ffd88b',
77+
'500': '#ffc300',
78+
'600': '#e0ab00',
79+
'700': '#c19300',
80+
'800': '#a37c0c',
81+
'900': '#84671d',
82+
'950': '#665223',
83+
} as const
84+
8585
export const Violets = {
8686
'50': '#efedfc',
8787
'100': '#dbd9f7',
@@ -96,20 +96,26 @@ export const Violets = {
9696
'950': '#2f2862',
9797
} as const
9898

99+
export const Transparent = '#ffffff00' as const
100+
99101
export const Spacing = {
100-
'50': '0',
102+
'0': '0rem',
103+
'75': '0.062rem', // ~1px
101104
'100': '0.125rem', // 2px
102105
'200': '0.25rem', // 4px
103106
'300': '0.5rem', // 8px
104107
'350': '0.875rem', // 14px
105108
'400': '1rem', // 16px
109+
'450': '1.25rem', // 20px
106110
'500': '1.5rem', // 24px
107111
'600': '2rem', // 32px
108112
'700': '3rem', // 48px
109113
'800': '4rem', // 64px
110114
} as const
111115

112116
export const Sizing = {
117+
'10': '0.062rem', // ~1px
118+
'25': '0.125rem', // 2px
113119
'50': '0.25rem', // 4px
114120
'100': '0.5rem', // 8px
115121
'125': '0.75rem', // 12px

0 commit comments

Comments
 (0)