diff --git a/src/identity/components/Badge.test.tsx b/src/identity/components/Badge.test.tsx index 004c1d594b..c6c3e867b0 100644 --- a/src/identity/components/Badge.test.tsx +++ b/src/identity/components/Badge.test.tsx @@ -21,7 +21,7 @@ describe('Badge Component', () => { expect(badge).toHaveStyle(badgeStyle); expect(badge).toHaveClass('bg-ock-primary'); const ticker = screen.queryByTestId('ockBadgeTicker'); - expect(ticker).toHaveClass('fill-inverse'); + expect(ticker).toHaveClass('fill-ock-inverse'); }); }); }); diff --git a/src/internal/svg/baseNameSvg.tsx b/src/internal/svg/baseNameSvg.tsx index 7268ae92ad..b9a2ff0c3f 100644 --- a/src/internal/svg/baseNameSvg.tsx +++ b/src/internal/svg/baseNameSvg.tsx @@ -1,3 +1,5 @@ +import { fill } from '../../styles/theme'; + export const baseNameSvg = ( ); diff --git a/src/internal/svg/closeSvg.tsx b/src/internal/svg/closeSvg.tsx index 6f7c8844b7..29d3cce10b 100644 --- a/src/internal/svg/closeSvg.tsx +++ b/src/internal/svg/closeSvg.tsx @@ -1,3 +1,5 @@ +import { fill } from '../../styles/theme'; + export const closeSvg = ( ); diff --git a/src/internal/svg/defaultAvatarSVG.tsx b/src/internal/svg/defaultAvatarSVG.tsx index 9368202dbc..05a4ef09dd 100644 --- a/src/internal/svg/defaultAvatarSVG.tsx +++ b/src/internal/svg/defaultAvatarSVG.tsx @@ -1,3 +1,5 @@ +import { fill } from '../../styles/theme'; + export const defaultAvatarSVG = ( ); diff --git a/src/internal/svg/disconnectSvg.tsx b/src/internal/svg/disconnectSvg.tsx index 49d2c7ce96..9899ba7532 100644 --- a/src/internal/svg/disconnectSvg.tsx +++ b/src/internal/svg/disconnectSvg.tsx @@ -1,3 +1,5 @@ +import { fill } from '../../styles/theme'; + export const disconnectSvg = ( ); diff --git a/src/internal/svg/walletSvg.tsx b/src/internal/svg/walletSvg.tsx index 20610b095e..5852e05ec4 100644 --- a/src/internal/svg/walletSvg.tsx +++ b/src/internal/svg/walletSvg.tsx @@ -1,3 +1,5 @@ +import { fill } from '../../styles/theme'; + export const walletSvg = ( ); diff --git a/src/styles/index.css b/src/styles/index.css index 32b754eca4..1044e0bbdc 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -1 +1,113 @@ -@import url("../token/components/TokenSelectDropdown.css"); +/* Border */ +.border-ock-default { + border-color: var(--bg-ock-default); +} + +/* Fill */ +.fill-ock-default-reverse { + fill: var(--bg-ock-default-reverse); +} + +/* Placeholder */ +.placeholder-ock-default::placeholder { + color: var(--text-ock-foreground-muted); +} + +/* Scrollbar */ +.ock-scrollbar { + scrollbar-width: thin; + scrollbar-color: #d1d5db #ffffff; +} + +/* Shadow */ +.shadow-ock-default { + box-shadow: 0px 8px 12px 0px #5B616E1F; +} + +.dark .shadow-ock-default { + box-shadow: 0px 8px 12px 0px #5B616E1F; +} + +/* Text */ +.text-ock-inverse { + color: var(--text-ock-inverse); +} +.text-ock-foreground { + color: var(--text-ock-foreground); +} +.text-ock-foreground-muted { + color: var(--text-ock-foreground-muted); +} +.text-ock-error { + color: var(--text-ock-error); +} +.text-ock-primary { + color: var(--text-ock-primary); +} +.text-ock-success { + color: var(--text-ock-success); +} +.text-ock-warning { + color: var(--text-ock-warning); +} +.text-ock-disabled { + color: var(--text-ock-disabled); +} +/* Background */ +.bg-ock-default { + background-color: var(--bg-ock-default); +} +.bg-ock-default-hover { + background-color: var(--bg-ock-default-hover); +} +.bg-ock-default-active { + background-color: var(--bg-ock-default-active); +} +.bg-ock-alternate { + background-color: var(--bg-ock-alternate); +} +.bg-ock-alternate-hover { + background-color: var(--bg-ock-alternate-hover); +} +.bg-ock-alternate-active { + background-color: var(--bg-ock-alternate-active); +} +.bg-ock-inverse { + background-color: var(--bg-ock-inverse); +} +.bg-ock-inverse-hover { + background-color: var(--bg-ock-inverse-hover); +} +.bg-ock-inverse-active { + background-color: var(--bg-ock-inverse-active); +} +.bg-ock-primary { + background-color: var(--bg-ock-primary); +} +.bg-ock-primary-hover { + background-color: var(--bg-ock-primary-hover); +} +.bg-ock-primary-active { + background-color: var(--bg-ock-primary-active); +} +.bg-ock-secondary { + background-color: var(--bg-ock-secondary); +} +.bg-ock-secondary-hover { + background-color: var(--bg-ock-secondary-hover); +} +.bg-ock-secondary-active { + background-color: var(--bg-ock-secondary-active); +} +.bg-ock-error { + background-color: var(--bg-ock-error); +} +.bg-ock-warning { + background-color: var(--bg-ock-warning); +} +.bg-ock-success { + background-color: var(--bg-ock-success); +} +.bg-ock-default-reverse { + background-color: var(--bg-ock-default-reverse); +} diff --git a/src/styles/tailwind-base.css b/src/styles/tailwind-base.css index 52d6f62f92..df34d5041d 100644 --- a/src/styles/tailwind-base.css +++ b/src/styles/tailwind-base.css @@ -29,86 +29,37 @@ --bg-ock-error: theme(colors.rose.600); --bg-ock-warning: theme(colors.orange.600); --bg-ock-success: theme(colors.lime.300); + --bg-ock-default-reverse: theme(colors.gray.950); } - /* Text */ - .text-ock-inverse { - color: var(--text-ock-inverse); - } - .text-ock-foreground { - color: var(--text-ock-foreground); - } - .text-ock-foreground-muted { - color: var(--text-ock-foreground-muted); - } - .text-ock-error { - color: var(--text-ock-error); - } - .text-ock-primary { - color: var(--text-ock-primary); - } - .text-ock-success { - color: var(--text-ock-success); - } - .text-ock-warning { - color: var(--text-ock-warning); - } - .text-ock-disabled { - color: var(--text-ock-disabled); - } - /* Background */ - .bg-ock-default { - background-color: var(--bg-ock-default); - } - .bg-ock-default-hover { - background-color: var(--bg-ock-default-hover); - } - .bg-ock-default-active { - background-color: var(--bg-ock-default-active); - } - .bg-ock-alternate { - background-color: var(--bg-ock-alternate); - } - .bg-ock-alternate-hover { - background-color: var(--bg-ock-alternate-hover); - } - .bg-ock-alternate-active { - background-color: var(--bg-ock-alternate-active); - } - .bg-ock-inverse { - background-color: var(--bg-ock-inverse); - } - .bg-ock-inverse-hover { - background-color: var(--bg-ock-inverse-hover); - } - .bg-ock-inverse-active { - background-color: var(--bg-ock-inverse-active); - } - .bg-ock-primary { - background-color: var(--bg-ock-primary); - } - .bg-ock-primary-hover { - background-color: var(--bg-ock-primary-hover); - } - .bg-ock-primary-active { - background-color: var(--bg-ock-primary-active); - } - .bg-ock-secondary { - background-color: var(--bg-ock-secondary); - } - .bg-ock-secondary-hover { - background-color: var(--bg-ock-secondary-hover); - } - .bg-ock-secondary-active { - background-color: var(--bg-ock-secondary-active); - } - .bg-ock-error { - background-color: var(--bg-ock-error); - } - .bg-ock-warning { - background-color: var(--bg-ock-warning); - } - .bg-ock-success { - background-color: var(--bg-ock-success); + + .dark { + --text-ock-inverse: theme(colors.gray.950); + --text-ock-foreground: theme(colors.gray.50); + --text-ock-foreground-muted: theme(colors.gray.400); + --text-ock-error: theme(colors.rose.400); + --text-ock-primary: theme(colors.indigo.400); + --text-ock-success: theme(colors.lime.400); + --text-ock-warning: theme(colors.orange.400); + --text-ock-disabled: theme(colors.gray.600); + --bg-ock-default: theme(colors.gray.950); + --bg-ock-default-hover: theme(colors.gray.800); + --bg-ock-default-active: theme(colors.gray.700); + --bg-ock-alternate: theme(colors.gray.800); + --bg-ock-alternate-hover: theme(colors.gray.700); + --bg-ock-alternate-active: theme(colors.gray.600); + --bg-ock-inverse: theme(colors.gray.900); + --bg-ock-inverse-hover: theme(colors.gray.800); + --bg-ock-inverse-active: theme(colors.gray.700); + --bg-ock-primary: theme(colors.indigo.400); + --bg-ock-primary-hover: theme(colors.indigo.300); + --bg-ock-primary-active: theme(colors.indigo.200); + --bg-ock-secondary: theme(colors.slate.800); + --bg-ock-secondary-hover: theme(colors.slate.700); + --bg-ock-secondary-active: theme(colors.slate.600); + --bg-ock-error: theme(colors.rose.400); + --bg-ock-warning: theme(colors.orange.400); + --bg-ock-success: theme(colors.lime.700); + --bg-ock-default-reverse: theme(colors.gray.50); } } diff --git a/src/styles/theme.ts b/src/styles/theme.ts index b02920b707..440ceb13a5 100644 --- a/src/styles/theme.ts +++ b/src/styles/theme.ts @@ -27,7 +27,7 @@ export const pressable = { 'cursor-pointer bg-ock-primary active:bg-ock-primary-active hover:bg-ock-primary-hover', secondary: 'cursor-pointer bg-ock-secondary active:bg-ock-secondary-active hover:bg-ock-secondary-hover', - shadow: 'shadow-[0px_8px_12px_0px_#5B616E1F]', + shadow: 'shadow-ock-default', disabled: 'opacity-[0.38]', } as const; @@ -54,12 +54,14 @@ export const color = { } as const; export const fill = { - inverse: 'fill-inverse', - foreground: 'fill-foreground', - foregroundMuted: 'fill-foreground-muted', - error: 'fill-error', - primary: 'fill-primary', - success: 'fill-success', - warning: 'fill-warning', - disabled: 'fill-disabled', + defaultReverse: 'fill-ock-default-reverse', + inverse: 'fill-ock-inverse', +} as const; + +export const border = { + default: 'border-ock-default', +} as const; + +export const placeholder = { + default: 'placeholder-ock-default', } as const; diff --git a/src/swap/components/SwapAmountInput.tsx b/src/swap/components/SwapAmountInput.tsx index ac50c10e4d..50a09c5a22 100644 --- a/src/swap/components/SwapAmountInput.tsx +++ b/src/swap/components/SwapAmountInput.tsx @@ -74,15 +74,13 @@ export function SwapAmountInput({ className={cn( background.alternate, 'box-border flex w-full flex-col items-start', - 'rounded-md border-b border-solid p-4', + 'rounded-md p-4', className, )} data-testid="ockSwapAmountInput_Container" >