Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configs/app/features/growthBook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const clientKey = getEnvValue('NEXT_PUBLIC_GROWTH_BOOK_CLIENT_KEY');
const title = 'GrowthBook feature flagging and A/B testing';

const config: Feature<{ clientKey: string }> = (() => {
if (clientKey) {
if (clientKey && clientKey !== 'xxx') {
return Object.freeze({
title,
isEnabled: true,
Expand Down
2 changes: 1 addition & 1 deletion configs/app/ui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const highlightedRoutes = (() => {

const defaultColorTheme = (() => {
const envValue = getEnvValue('NEXT_PUBLIC_COLOR_THEME_DEFAULT') as ColorThemeId | undefined;
return COLOR_THEMES.find((theme) => theme.id === envValue);
return COLOR_THEMES.find((theme) => theme.id === envValue) ?? COLOR_THEMES.find((theme) => theme.id === 'dark');
})();

const UI = Object.freeze({
Expand Down
4 changes: 0 additions & 4 deletions lib/hooks/useNavItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,6 @@ export default function useNavItems(): ReturnType {
url: 'https://hub.opengradient.ai',
icon: 'apps',
},
{
text: 'Testnet V1 Explorer',
url: 'https://testnetv1.opengradient.ai',
},
].filter(Boolean);

const accountNavItems: ReturnType['accountNavItems'] = [
Expand Down
1 change: 1 addition & 0 deletions nextjs/csp/policies/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export function app(): CspDev.DirectiveDescriptor {
],

'font-src': [
KEY_WORDS.SELF,
KEY_WORDS.DATA,
...MAIN_DOMAINS,
...(externalFontsDomains || []),
Expand Down
2 changes: 1 addition & 1 deletion nextjs/headers.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async function headers() {
},
{
key: 'Cross-Origin-Opener-Policy',
value: 'same-origin',
value: 'same-origin-allow-popups',
},
{
key: 'Referrer-Policy',
Expand Down
8 changes: 5 additions & 3 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,19 @@ class MyDocument extends Document {
<Head>
{ /* FONTS */ }
<link
href={ config.UI.fonts.heading?.url ?? 'https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap' }
href={ config.UI.fonts.heading?.url ?? 'https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&display=swap' }
rel="stylesheet"
/>
<link
href={ config.UI.fonts.body?.url ?? 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap' }
href={ config.UI.fonts.body?.url ?? 'https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&display=swap' }
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap"
href="https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500;600&display=swap"
rel="stylesheet"
/>
<link rel="preconnect" href="https://fonts.googleapis.com"/>
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="anonymous"/>

{ /* eslint-disable-next-line @next/next/no-sync-scripts */ }
<script src="/assets/envs.js"/>
Expand Down
4 changes: 2 additions & 2 deletions toolkit/chakra/input-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ export const InputGroup = React.forwardRef<HTMLDivElement, InputGroupProps>(
return React.cloneElement(child, {
...(startElement && { ps: startOffset ?? (inlinePaddings?.start ? `${ inlinePaddings.start }px` : undefined) }),
...(endElement && { pe: endOffset ?? (inlinePaddings?.end ? `${ inlinePaddings.end }px` : undefined) }),
// hide input value and placeholder for the first render
value: inlinePaddings ? child.props.value : undefined,
// keep value controlled while hiding text until paddings are measured
value: inlinePaddings ? child.props.value : '',
placeholder: inlinePaddings ? child.props.placeholder : undefined,
});
}) }
Expand Down
15 changes: 12 additions & 3 deletions toolkit/chakra/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,21 @@ export const TableHeaderSticky = (props: TableHeaderProps) => {
};
}, [ handleScroll ]);

const stickyTop = (() => {
if (!isStuck) {
return undefined;
}

return top ? `${ top }px` : 0;
})();

return (
<TableHeader
ref={ ref }
position="sticky"
top={ top ? `${ top }px` : 0 }
backgroundColor={{ _light: 'white', _dark: 'black' }}
position={ isStuck ? 'sticky' : 'static' }
top={ stickyTop }
backgroundColor={{ _light: 'rgba(244, 252, 254, 0.96)', _dark: 'rgba(10, 15, 25, 0.96)' }}
backdropFilter="blur(16px)"
boxShadow={ isStuck ? 'action_bar' : 'none' }
zIndex="1"
{ ...rest }
Expand Down
3 changes: 2 additions & 1 deletion toolkit/components/AdaptiveTabs/AdaptiveTabsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ const AdaptiveTabsList = (props: Props) => {
flexWrap="nowrap"
alignItems="center"
whiteSpace="nowrap"
bgColor={{ _light: 'white', _dark: 'black' }}
bgColor={{ _light: 'rgba(244, 252, 254, 0.94)', _dark: 'rgba(10, 15, 25, 0.94)' }}
backdropFilter="blur(16px)"
// initially our cut is 0 and we don't want to show the list
// but we want to keep all items in the tabs row so it won't collapse
// that's why we only change opacity but not the position itself
Expand Down
4 changes: 4 additions & 0 deletions toolkit/theme/foundations/animations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@ export const keyframes = {
'0%, 100%': { opacity: 1 },
'50%': { opacity: 0.7 },
},
signalScan: {
from: { backgroundPosition: '0 0, 0 0, 0 0' },
to: { backgroundPosition: '120px 0, 0 120px, 160px 160px' },
},
};
56 changes: 36 additions & 20 deletions toolkit/theme/foundations/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,32 @@ const colors = {
'800': { value: '#22543D' },
'900': { value: '#1C4532' },
},
// OpenGradient brand cyan reused as "blue" — Blockscout uses blue.* for many UI accents
blue: {
'50': { value: '#EBF8FF' },
'100': { value: '#BEE3F8' },
'200': { value: '#90CDF4' },
'300': { value: '#63B3ED' },
'400': { value: '#4299E1' },
'500': { value: '#3182CE' },
'600': { value: '#2B6CB0' },
'700': { value: '#2C5282' },
'800': { value: '#2A4365' },
'900': { value: '#1A365D' },
'50': { value: '#f4fcfe' },
'100': { value: '#e9f8fc' },
'200': { value: '#bdebf7' },
'300': { value: '#a7e4f4' },
'400': { value: '#50c9e9' },
'500': { value: '#24bce3' },
'600': { value: '#1d96b6' },
'700': { value: '#167188' },
'800': { value: '#0e4b5b' },
'900': { value: '#041317' },
},
// OpenGradient brand secondary — nautical blue-gray (registered as a new palette)
navy: {
'50': { value: '#dde2ec' },
'100': { value: '#bfc8dc' },
'200': { value: '#9ba9c4' },
'300': { value: '#7889ad' },
'400': { value: '#546a95' },
'500': { value: '#314a7d' },
'600': { value: '#273b64' },
'700': { value: '#1d2c4b' },
'800': { value: '#141e32' },
'900': { value: '#0f1626' },
'950': { value: '#0a0f19' },
},
red: {
'50': { value: '#FFF5F5' },
Expand Down Expand Up @@ -83,17 +98,18 @@ const colors = {
'800': { value: '#234E52' },
'900': { value: '#1D4044' },
},
// OpenGradient brand cyan (formerly Chakra "cyan")
cyan: {
'50': { value: '#EDFDFD' },
'100': { value: '#C4F1F9' },
'200': { value: '#9DECF9' },
'300': { value: '#76E4F7' },
'400': { value: '#0BC5EA' },
'500': { value: '#00B5D8' },
'600': { value: '#00A3C4' },
'700': { value: '#0987A0' },
'800': { value: '#086F83' },
'900': { value: '#065666' },
'50': { value: '#f4fcfe' },
'100': { value: '#e9f8fc' },
'200': { value: '#bdebf7' },
'300': { value: '#a7e4f4' },
'400': { value: '#50c9e9' },
'500': { value: '#24bce3' },
'600': { value: '#1d96b6' },
'700': { value: '#167188' },
'800': { value: '#0e4b5b' },
'900': { value: '#041317' },
},
purple: {
'50': { value: '#FAF5FF' },
Expand Down
74 changes: 37 additions & 37 deletions toolkit/theme/foundations/semanticTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ const semanticTokens: ThemingConfig['semanticTokens'] = {
},
popover: {
DEFAULT: {
bg: { value: { _light: '{colors.white}', _dark: '{colors.gray.900}' } },
shadow: { value: { _light: '{colors.blackAlpha.200}', _dark: '{colors.whiteAlpha.300}' } },
bg: { value: { _light: '#fcfdfe', _dark: '#0f1626' } },
shadow: { value: { _light: 'rgba(36, 188, 227, 0.25)', _dark: 'rgba(36, 188, 227, 0.35)' } },
},
},
progressCircle: {
Expand All @@ -180,31 +180,31 @@ const semanticTokens: ThemingConfig['semanticTokens'] = {
tabs: {
solid: {
fg: {
DEFAULT: { value: { _light: '{colors.blue.700}', _dark: '{colors.blue.100}' } },
selected: { value: { _light: '{colors.blue.700}', _dark: '{colors.gray.50}' } },
DEFAULT: { value: { _light: '#314a7d', _dark: 'rgba(189, 235, 247, 0.66)' } },
selected: { value: { _light: '#0e4b5b', _dark: '#bdebf7' } },
},
bg: {
selected: { value: { _light: '{colors.blue.50}', _dark: '{colors.whiteAlpha.100}' } },
selected: { value: { _light: 'rgba(36, 188, 227, 0.12)', _dark: 'rgba(36, 188, 227, 0.12)' } },
},
},
secondary: {
fg: {
DEFAULT: { value: { _light: '{colors.blackAlpha.800}', _dark: '{colors.whiteAlpha.800}' } },
DEFAULT: { value: { _light: '#0e4b5b', _dark: '#bdebf7' } },
},
bg: {
selected: { value: { _light: '{colors.blue.50}', _dark: '{colors.whiteAlpha.100}' } },
selected: { value: { _light: 'rgba(36, 188, 227, 0.12)', _dark: 'rgba(36, 188, 227, 0.12)' } },
},
border: {
DEFAULT: { value: { _light: '{colors.gray.300}', _dark: '{colors.gray.600}' } },
DEFAULT: { value: { _light: 'rgba(36, 188, 227, 0.22)', _dark: 'rgba(189, 235, 247, 0.16)' } },
},
},
segmented: {
fg: {
DEFAULT: { value: { _light: '{colors.blue.600}', _dark: '{colors.blue.300}' } },
selected: { value: { _light: '{colors.blue.700}', _dark: '{colors.gray.50}' } },
DEFAULT: { value: { _light: '#1d96b6', _dark: '#50c9e9' } },
selected: { value: { _light: '#0e4b5b', _dark: '#bdebf7' } },
},
border: {
DEFAULT: { value: { _light: '{colors.blue.50}', _dark: '{colors.gray.800}' } },
DEFAULT: { value: { _light: 'rgba(36, 188, 227, 0.18)', _dark: 'rgba(36, 188, 227, 0.18)' } },
},
},
},
Expand Down Expand Up @@ -244,23 +244,23 @@ const semanticTokens: ThemingConfig['semanticTokens'] = {
},
input: {
fg: {
DEFAULT: { value: { _light: '{colors.gray.800}', _dark: '{colors.gray.50}' } },
DEFAULT: { value: { _light: '#0e4b5b', _dark: '#bdebf7' } },
error: { value: '{colors.text.error}' },
},
bg: {
DEFAULT: { value: { _light: '{colors.white}', _dark: '{colors.black}' } },
readOnly: { value: { _light: '{colors.gray.200}', _dark: '{colors.gray.800}' } },
DEFAULT: { value: { _light: '#ffffff', _dark: 'rgba(15, 22, 38, 0.6)' } },
readOnly: { value: { _light: '#e9f8fc', _dark: 'rgba(15, 22, 38, 0.4)' } },
},
border: {
DEFAULT: { value: { _light: '{colors.gray.100}', _dark: '{colors.gray.700}' } },
hover: { value: { _light: '{colors.gray.200}', _dark: '{colors.gray.500}' } },
focus: { value: '{colors.blue.400}' },
filled: { value: { _light: '{colors.gray.300}', _dark: '{colors.gray.600}' } },
readOnly: { value: { _light: '{colors.gray.200}', _dark: '{colors.gray.800}' } },
DEFAULT: { value: { _light: 'rgba(36, 188, 227, 0.18)', _dark: 'rgba(36, 188, 227, 0.18)' } },
hover: { value: { _light: 'rgba(36, 188, 227, 0.45)', _dark: 'rgba(36, 188, 227, 0.45)' } },
focus: { value: '#24bce3' },
filled: { value: { _light: 'rgba(36, 188, 227, 0.25)', _dark: 'rgba(36, 188, 227, 0.22)' } },
readOnly: { value: { _light: 'rgba(36, 188, 227, 0.10)', _dark: 'rgba(36, 188, 227, 0.12)' } },
error: { value: '{colors.red.500}' },
},
placeholder: {
DEFAULT: { value: '{colors.gray.500}' },
DEFAULT: { value: { _light: 'rgba(14, 75, 91, 0.4)', _dark: 'rgba(189, 235, 247, 0.35)' } },
error: { value: '{colors.red.500}' },
},
},
Expand All @@ -273,26 +273,26 @@ const semanticTokens: ThemingConfig['semanticTokens'] = {
},
dialog: {
bg: {
DEFAULT: { value: { _light: '{colors.white}', _dark: '{colors.gray.900}' } },
DEFAULT: { value: { _light: '#fcfdfe', _dark: '#0f1626' } },
},
fg: {
DEFAULT: { value: { _light: '{colors.blackAlpha.800}', _dark: '{colors.whiteAlpha.800}' } },
DEFAULT: { value: { _light: '#0e4b5b', _dark: '#bdebf7' } },
},
},
drawer: {
bg: {
DEFAULT: { value: { _light: '{colors.white}', _dark: '{colors.gray.900}' } },
DEFAULT: { value: { _light: '#fcfdfe', _dark: '#0f1626' } },
},
},
select: {
trigger: {
outline: {
fg: { value: { _light: '{colors.blackAlpha.800}', _dark: '{colors.whiteAlpha.800}' } },
fg: { value: { _light: '#0e4b5b', _dark: '#bdebf7' } },
},
},
item: {
bg: {
highlighted: { value: { _light: '{colors.blue.50}', _dark: '{colors.whiteAlpha.100}' } },
highlighted: { value: { _light: 'rgba(36, 188, 227, 0.10)', _dark: 'rgba(36, 188, 227, 0.10)' } },
},
},
indicator: {
Expand All @@ -310,7 +310,7 @@ const semanticTokens: ThemingConfig['semanticTokens'] = {
menu: {
item: {
bg: {
highlighted: { value: { _light: '{colors.blue.50}', _dark: '{colors.whiteAlpha.100}' } },
highlighted: { value: { _light: 'rgba(36, 188, 227, 0.10)', _dark: 'rgba(36, 188, 227, 0.12)' } },
},
},
},
Expand All @@ -333,12 +333,12 @@ const semanticTokens: ThemingConfig['semanticTokens'] = {
fg: { value: { _light: '{colors.red.500}', _dark: '{colors.red.200}' } },
},
purple: {
bg: { value: { _light: '{colors.purple.50}', _dark: '{colors.purple.800}' } },
fg: { value: { _light: '{colors.purple.500}', _dark: '{colors.purple.100}' } },
bg: { value: { _light: 'rgba(36, 188, 227, 0.10)', _dark: 'rgba(36, 188, 227, 0.15)' } },
fg: { value: { _light: '#1d96b6', _dark: '#50c9e9' } },
},
purple_alt: {
bg: { value: { _light: '{colors.purple.100}', _dark: '{colors.purple.800}' } },
fg: { value: { _light: '{colors.blackAlpha.800}', _dark: '{colors.whiteAlpha.800}' } },
bg: { value: { _light: 'rgba(36, 188, 227, 0.14)', _dark: 'rgba(36, 188, 227, 0.18)' } },
fg: { value: { _light: '#0e4b5b', _dark: '#bdebf7' } },
},
orange: {
bg: { value: { _light: '{colors.orange.50}', _dark: '{colors.orange.800}' } },
Expand Down Expand Up @@ -389,8 +389,8 @@ const semanticTokens: ThemingConfig['semanticTokens'] = {
},
table: {
header: {
bg: { value: { _light: '{colors.blackAlpha.100}', _dark: '{colors.whiteAlpha.200}' } },
fg: { value: { _light: '{colors.blackAlpha.700}', _dark: '{colors.whiteAlpha.700}' } },
bg: { value: { _light: 'rgba(233, 248, 252, 0.78)', _dark: 'rgba(36, 188, 227, 0.08)' } },
fg: { value: { _light: '#314a7d', _dark: 'rgba(189, 235, 247, 0.72)' } },
},
},
checkbox: {
Expand Down Expand Up @@ -422,15 +422,15 @@ const semanticTokens: ThemingConfig['semanticTokens'] = {
highlighted: { value: '{colors.yellow.400}' },
},
heading: {
DEFAULT: { value: { _light: '{colors.blackAlpha.800}', _dark: '{colors.whiteAlpha.800}' } },
DEFAULT: { value: { _light: '#0e4b5b', _dark: '#bdebf7' } },
},
text: {
primary: { value: { _light: '{colors.blackAlpha.800}', _dark: '{colors.whiteAlpha.800}' } },
secondary: { value: { _light: '{colors.gray.500}', _dark: '{colors.gray.400}' } },
primary: { value: { _light: '#0e4b5b', _dark: 'rgba(189, 235, 247, 0.92)' } },
secondary: { value: { _light: '#314a7d', _dark: 'rgba(189, 235, 247, 0.55)' } },
error: { value: '{colors.red.500}' },
},
border: {
divider: { value: { _light: '{colors.blackAlpha.100}', _dark: '{colors.whiteAlpha.100}' } },
divider: { value: { _light: 'rgba(36, 188, 227, 0.14)', _dark: 'rgba(189, 235, 247, 0.10)' } },
error: { value: '{colors.red.500}' },
},
icon: {
Expand All @@ -446,7 +446,7 @@ const semanticTokens: ThemingConfig['semanticTokens'] = {
},
global: {
body: {
bg: { value: { _light: '{colors.white}', _dark: '{colors.black}' } },
bg: { value: { _light: '#f4fcfe', _dark: '#0a0f19' } },
fg: { value: '{colors.text.primary}' },
},
mark: {
Expand Down
Loading
Loading