Skip to content

Commit edbd4c6

Browse files
Clay Unicornclaude
andcommitted
feat(surfaces): quiet by default — bordered cards, outlined buttons, unfilled tabs, tinted chips
The SCF prototype separates with hairlines and whitespace and keeps colour as stroke rather than fill. The shared components carried the opposite defaults, so every screen inherited floating, shadowed, 20–32px-radius panels and block-filled buttons before it drew anything of its own. - Card: `outlined` is the default variant, with the visible hairline (border.default) rather than the near-white `subtle` step. Every radius above `sm` resolves to the 7px interface step. `glass` keeps its name for its 110 callers but renders as the same bordered surface with a translucent fill — no blur, no shadow. `elevated`/`surface` still shadow when asked for. - Button: `outline` is the default variant. `filled` stays for the CTA a screen genuinely leads with. - Tabs: the selected `default` tab no longer takes a grey fill — the 2px indicator carries it. New `folder` type: bordered tabs with rounded top corners on a hairline, the selected one attached to the panel beneath. - Chip: a selected chip is a primary-ramp tint, not an inverted black pill. Refs Scaffald/SaaS#850 Co-Authored-By: Claude Fable 5.1 <[email protected]>
1 parent 6574499 commit edbd4c6

7 files changed

Lines changed: 72 additions & 43 deletions

File tree

‎src/components/Button/Button.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ import { useInteractiveState } from '../../hooks/useInteractiveState'
4141
export const Button = forwardRef<View, ButtonProps>(function Button({
4242
children,
4343
color = 'gray',
44-
variant = 'filled',
44+
// Outlined by default: the prototype draws actions as a 1px outline on
45+
// transparent and reserves a solid fill for the one or two CTAs a screen
46+
// genuinely leads with. Pass `variant="filled"` for those.
47+
variant = 'outline',
4548
size = 'md',
4649
disabled = false,
4750
fullWidth = false,

‎src/components/Card/Card.styles.ts‎

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import type {
1717
} from "./Card.types";
1818
import type { ResolvedThemeMode } from "../../tokens/colors";
1919
import type { GlassMaterial } from "../../tokens/glass";
20-
import { getGlassMaterialStyles } from "../../utils/glassStyles";
2120

2221
// ============================================================================
2322
// Types
@@ -71,13 +70,16 @@ const PADDING_MAP: Record<CardPadding, number> = {
7170
'2xl': spacing[32],
7271
};
7372

73+
// The SCF prototype keeps corners nearly square (2 / 4 / 7) and separates with
74+
// hairlines rather than rounded, floating panels. Every card radius above `sm`
75+
// resolves to the 7px interface step; the old 20/24/32 bubbles are gone.
7476
const RADIUS_MAP: Record<CardRadius, number> = {
75-
sm: borderRadius.l, // 8
76-
md: borderRadius.xxl, // 12
77-
lg: borderRadius.xxxl, // 16
78-
xl: 20, // large
79-
'2xl': borderRadius.xxxxl, // 24
80-
'3xl': 32, // extra large
77+
sm: borderRadius.m, // 4
78+
md: borderRadius.l, // 7
79+
lg: borderRadius.l, // 7
80+
xl: borderRadius.l, // 7
81+
'2xl': borderRadius.l, // 7
82+
'3xl': borderRadius.l, // 7
8183
};
8284

8385
const SHADOW_MAP: Record<CardElevation, ShadowStyle> = {
@@ -138,10 +140,13 @@ export function getCardStyles(
138140
break;
139141
}
140142
case "outlined":
143+
// The default card: a bordered, unfilled surface with no shadow. The
144+
// border is the visible hairline (border.default), not the near-white
145+
// `subtle` step, which disappears against a white card.
141146
container = {
142147
...baseStyle,
143148
borderWidth: 1,
144-
borderColor: colors.border[theme].subtle,
149+
borderColor: colors.border[theme].default,
145150
};
146151
break;
147152
case "filled":
@@ -151,27 +156,18 @@ export function getCardStyles(
151156
};
152157
break;
153158
case "glass": {
154-
// When a specific glassMaterial is set, use the Liquid Glass material system
155-
const materialLevel = glassMaterial ?? 'regular';
156-
const materialStyles = getGlassMaterialStyles(materialLevel, theme);
157-
159+
// Quiet by design. `glass` used to be a blurred, shadowed Liquid Glass
160+
// panel; the redesign keeps the name (110 callers) but renders it as the
161+
// same hairline-bordered surface as `outlined`, with a translucent fill
162+
// so it still reads over a map or a photograph. Callers that need the
163+
// blurred material should use GlassSurface directly.
164+
void glassMaterial;
158165
container = {
159166
...baseStyle,
167+
backgroundColor: theme === 'dark' ? 'rgba(47, 40, 32, 0.92)' : 'rgba(255, 255, 255, 0.92)',
160168
borderWidth: 1,
161-
borderColor: colors.border[theme].ghost,
169+
borderColor: colors.border[theme].default,
162170
};
163-
if (Platform.OS === "web") {
164-
// Web: use material fallback bg as base (layers render via GlassSurface or nested divs)
165-
container.backgroundColor = materialStyles.nativeContainer.backgroundColor;
166-
// Apply Liquid Glass blur — always 50px for full material effect
167-
(container as Record<string, unknown>).backdropFilter = "blur(50px) saturate(180%)";
168-
(container as Record<string, unknown>).WebkitBackdropFilter = "blur(50px) saturate(180%)";
169-
(container as Record<string, unknown>).boxShadow = BOX_SHADOW_MAP.glass;
170-
} else {
171-
// Native: higher-opacity fallback + subtle shadow
172-
container.backgroundColor = materialStyles.nativeContainer.backgroundColor;
173-
Object.assign(container, SHADOW_MAP.glass);
174-
}
175171
break;
176172
}
177173
default:

‎src/components/Card/Card.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ import { useThemeContext } from '../../theme'
6565
*/
6666
export function Card({
6767
children,
68-
variant: variantProp = 'elevated',
68+
variant: variantProp = 'outlined',
6969
padding = 'none',
7070
radius = 'lg',
7171
elevation = 'sm',

‎src/components/Chip/Chip.styles.ts‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,11 @@ export function getChipStyles(
108108
const borderDefault = isLight ? colors.border.light.default : colors.border.dark.default
109109
if (isLight) {
110110
if (selected) {
111+
// A selected chip is a tinted tag from the primary ramp — light step
112+
// fill, mid step border — not an inverted black pill.
111113
baseStyles.push({
112-
backgroundColor: colors.gray[900],
113-
borderColor: colors.gray[900],
114+
backgroundColor: colors.primary[50],
115+
borderColor: colors.primary[300],
114116
borderWidth: 1,
115117
})
116118
} else if (isHovered && !disabled) {
@@ -129,8 +131,8 @@ export function getChipStyles(
129131
} else {
130132
if (selected) {
131133
baseStyles.push({
132-
backgroundColor: colors.gray[100],
133-
borderColor: colors.gray[100],
134+
backgroundColor: colors.primary[900],
135+
borderColor: colors.primary[700],
134136
borderWidth: 1,
135137
})
136138
} else if (isHovered && !disabled) {
@@ -185,11 +187,11 @@ export function getChipTextStyles(
185187

186188
if (isLight) {
187189
baseTextStyles.push({
188-
color: selected ? colors.text.light.quaternary : colors.text.light.primary,
190+
color: selected ? colors.primary[700] : colors.text.light.primary,
189191
})
190192
} else {
191193
baseTextStyles.push({
192-
color: selected ? colors.text.dark.quaternary : colors.text.dark.primary,
194+
color: selected ? colors.primary[200] : colors.text.dark.primary,
193195
})
194196
}
195197

‎src/components/Tabs/Tabs.styles.ts‎

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import type { ViewStyle, TextStyle } from 'react-native'
77
import { colors } from '../../tokens/colors'
88
import type { ResolvedThemeMode } from '../../tokens/colors'
9+
import { borderRadius } from '../../tokens/borders'
910
import { spacing } from '../../tokens/spacing'
1011
import { typography } from '../../tokens/typography'
1112
import { boxShadows } from '../../tokens/shadows'
@@ -74,14 +75,18 @@ export function getTabsStyles(
7475
*/
7576
export function getTabListStyles(
7677
orientation: TabOrientation,
77-
_theme: ResolvedThemeMode = 'light',
78-
options?: { gap?: number; wrap?: boolean }
78+
theme: ResolvedThemeMode = 'light',
79+
options?: { gap?: number; wrap?: boolean; type?: TabType }
7980
): ViewStyle {
80-
const gap = options?.gap ?? (orientation === 'horizontal' ? spacing[8] : 0)
81+
const folder = options?.type === 'folder' && orientation === 'horizontal'
82+
const gap = options?.gap ?? (orientation === 'horizontal' ? (folder ? spacing[4] : spacing[8]) : 0)
8183
return {
8284
flexDirection: orientation === 'horizontal' ? 'row' : 'column',
83-
alignItems: orientation === 'horizontal' ? 'flex-start' : 'stretch',
85+
alignItems: orientation === 'horizontal' ? (folder ? 'flex-end' : 'flex-start') : 'stretch',
8486
width: '100%',
87+
// Folder tabs sit on a hairline; the selected tab paints over it so it
88+
// reads as attached to the panel beneath.
89+
...(folder && { borderBottomWidth: 1, borderBottomColor: colors.border[theme].default }),
8590
// Wrapping beats clipping. A row of five tabs on a 390px screen ran its
8691
// last one half off the right edge with nothing saying the strip
8792
// continued — so "Audit Log" read as the end of the list rather than a
@@ -198,10 +203,11 @@ export function getTabTriggerStyles(
198203
} else {
199204
borderRightWidth = 2
200205
}
201-
// Default type: Background color + border indicator
206+
// Default type: 2px border indicator, no fill. The selected tab used to
207+
// take a grey background as well; a tinted block on every tab strip is
208+
// exactly the kind of fill the prototype keeps off the page.
202209
if (isSelected && !isDisabled) {
203-
// Selected: background + 2px bottom border in theme color
204-
backgroundColor = colors.bg[theme].emphasis // Base/200 #e4e7ec for selected background
210+
backgroundColor = 'transparent'
205211
if (isHorizontal) {
206212
borderBottomColor = color === 'primary' ? colors.primary[600] : colors.text[theme].primary
207213
} else {
@@ -251,6 +257,25 @@ export function getTabTriggerStyles(
251257
if (isHovered && !isSelected && !isDisabled) {
252258
backgroundColor = colors.bg[theme].subtle
253259
}
260+
} else if (type === 'folder') {
261+
// Folder type: a bordered tab with rounded top corners. The strip draws
262+
// the hairline (see getTabListStyles); the selected tab overlaps it by one
263+
// pixel and paints its own bottom edge in the surface colour, so the tab
264+
// and the panel below read as one shape. Unselected tabs sit on the
265+
// subtle ground a step back.
266+
container.borderWidth = 1
267+
container.borderColor = colors.border[theme].default
268+
container.borderTopLeftRadius = borderRadius.l
269+
container.borderTopRightRadius = borderRadius.l
270+
container.marginBottom = -1
271+
if (isSelected && !isDisabled) {
272+
backgroundColor = colors.bg[theme].default
273+
container.borderBottomColor = colors.bg[theme].default
274+
} else {
275+
backgroundColor = isHovered && !isDisabled ? colors.bg[theme].default : colors.bg[theme].subtle
276+
}
277+
borderBottomWidth = undefined
278+
borderRightWidth = undefined
254279
} else if (type === 'shadow') {
255280
// Shadow type: Box shadow for selected tab, no borders
256281
backgroundColor = isSelected && !isDisabled ? colors.bg[theme].default : 'transparent'

‎src/components/Tabs/Tabs.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export function Tabs({
161161
})}
162162
</ScrollView>
163163
) : (
164-
<View style={getTabListStyles(orientation, theme, { wrap: shouldWrap })}>
164+
<View style={getTabListStyles(orientation, theme, { wrap: shouldWrap, type })}>
165165
{tabItems.map((item, index) => {
166166
return cloneElement(item.fullItem, {
167167
key: item.value || `trigger-${index}`,

‎src/components/Tabs/Tabs.types.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ import type { IconComponent } from '../types'
99

1010
/**
1111
* Tab type variants
12-
* - default: Background color changes on selection
12+
* - default: 2px underline indicator, no fill (the selected tab used to take a
13+
* grey fill as well; the redesign keeps surfaces quiet)
1314
* - line: Border/underline indicator (2px selected, 1px unselected)
1415
* - shadow: Box shadow for selected tab
16+
* - folder: the SCF prototype's folder tabs — bordered tabs with rounded top
17+
* corners on a hairline, the selected one attached to the panel below it
1518
*/
16-
export type TabType = 'default' | 'line' | 'shadow'
19+
export type TabType = 'default' | 'line' | 'shadow' | 'folder'
1720

1821
/**
1922
* Tab color variants

0 commit comments

Comments
 (0)