Skip to content

Commit bf5979e

Browse files
thinkclayclaude
andauthored
feat(surfaces): one quiet panel and one quiet strip, in place of the glass (#48)
The SCF prototype floats things two ways. A panel — popover, sheet, menu — is the page's own ground with a hairline, the medium shadow and near-square corners. A strip — a toolbar, a tab bar — is pinned full-width to an edge with one hairline and nothing else. Both are opaque. `tokens/surfaces.ts` names them: `quietPanel(theme)` and `quietStrip(theme, edge)`. What moves onto them (Scaffald/SaaS#977): - Popover's `glass` variant — a 20px-radius blurred bubble — renders the same quiet panel as the default. (The default was already quiet, and it is what ListToolbar's filters flyout uses; the issue's claim that the flyout was blurred came from an older checkout.) - ActionSheet: the quiet panel, squared along the bottom edge it rises from. - BottomBar and BottomToolbar: a strip, not a floating pill — full width, hairline on top, no blur, no shadow, no inset. The style key stays `pill` because the components reach for it by that name. - ToolbarButton, ToolbarSearchBar, PageControl — the pieces inside those bars — lose their blur and pill radii: near-square, hairline-bordered, teal tint instead of iOS system blue, type on the scale. Co-authored-by: Claude Fable 5.1 <[email protected]>
1 parent 34fc569 commit bf5979e

9 files changed

Lines changed: 106 additions & 160 deletions

File tree

‎src/components/ActionSheet/ActionSheet.styles.ts‎

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
*/
55

66
import type { ViewStyle, TextStyle } from 'react-native'
7-
import { Platform } from 'react-native'
87
import { colors } from '../../tokens/colors'
98
import type { ResolvedThemeMode } from '../../tokens/colors'
109
import { borderRadius } from '../../tokens/borders'
11-
import { shadows } from '../../tokens/shadows'
10+
import { quietPanel } from '../../tokens/surfaces'
1211

1312
export function getActionSheetStyles(theme: ResolvedThemeMode) {
1413
const overlay: ViewStyle = {
@@ -25,29 +24,14 @@ export function getActionSheetStyles(theme: ResolvedThemeMode) {
2524
const container: ViewStyle = {
2625
width: '100%',
2726
maxWidth: 400,
28-
borderTopLeftRadius: borderRadius.sheet,
29-
borderTopRightRadius: borderRadius.sheet,
27+
// The prototype's sheet: the quiet panel, squared off along the bottom
28+
// edge it rises from. No blur — it is opaque, like every other surface.
29+
...quietPanel(theme),
30+
borderBottomWidth: 0,
31+
borderBottomLeftRadius: 0,
32+
borderBottomRightRadius: 0,
3033
padding: 14,
3134
gap: 10,
32-
...shadows.iosSheet,
33-
// Glass background
34-
...(Platform.OS === 'web'
35-
? {
36-
backgroundColor: theme === 'light'
37-
? 'rgba(245, 245, 245, 0.6)'
38-
: 'rgba(44, 44, 46, 0.7)',
39-
}
40-
: {
41-
backgroundColor: theme === 'light'
42-
? 'rgba(245, 245, 245, 0.88)'
43-
: 'rgba(44, 44, 46, 0.92)',
44-
}),
45-
}
46-
47-
// Apply backdrop-filter on web
48-
if (Platform.OS === 'web') {
49-
(container as Record<string, unknown>).backdropFilter = 'blur(50px)';
50-
(container as Record<string, unknown>).WebkitBackdropFilter = 'blur(50px)';
5135
}
5236

5337
const titleArea: ViewStyle = {

‎src/components/BottomBar/BottomBar.styles.ts‎

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,10 @@
44

55
import type { ViewStyle } from 'react-native'
66
import { Platform } from 'react-native'
7-
import { borderRadius } from '../../tokens/borders'
8-
import { shadows, boxShadows } from '../../tokens/shadows'
7+
import { quietStrip } from '../../tokens/surfaces'
98
import type { ResolvedThemeMode } from '../../tokens/colors'
109
import type { BottomBarLevel } from './BottomBar.types'
1110

12-
const GLASS_BG = {
13-
light: 'rgba(245, 245, 245, 0.6)',
14-
dark: 'rgba(44, 44, 46, 0.7)',
15-
} as const
16-
1711
const Z_INDEX: Record<BottomBarLevel, number> = {
1812
global: 9999,
1913
page: 10000,
@@ -36,32 +30,20 @@ export function getBottomBarStyles(
3630
left: 0,
3731
right: 0,
3832
zIndex: Z_INDEX[level],
39-
alignItems: 'center',
40-
paddingBottom: bottomInset + 8,
41-
paddingHorizontal: 16,
42-
paddingTop: 8,
33+
alignItems: 'stretch',
34+
paddingBottom: bottomInset,
4335
}
4436

45-
const pill: ViewStyle & Record<string, unknown> = {
37+
// The prototype pins its toolbars to the edge as a strip — full width, a
38+
// hairline on top, opaque — not a floating glass pill. The key is still
39+
// `pill` because the components reach for it by that name.
40+
const pill: ViewStyle = {
4641
flexDirection: 'row',
4742
alignItems: 'center',
4843
justifyContent: 'center',
49-
backgroundColor: GLASS_BG[theme],
50-
borderRadius: borderRadius.sheet,
51-
paddingHorizontal: 4,
52-
paddingVertical: 4,
53-
...shadows.iosSheet,
54-
}
55-
56-
if (Platform.OS === 'web') {
57-
pill.backdropFilter = 'blur(50px)'
58-
pill.WebkitBackdropFilter = 'blur(50px)'
59-
pill.boxShadow = boxShadows.iosSheet
60-
delete pill.shadowColor
61-
delete pill.shadowOffset
62-
delete pill.shadowOpacity
63-
delete pill.shadowRadius
64-
delete pill.elevation
44+
paddingHorizontal: 12,
45+
paddingVertical: 6,
46+
...quietStrip(theme, 'bottom'),
6547
}
6648

6749
const contentRow: ViewStyle = {

‎src/components/BottomToolbar/BottomToolbar.styles.ts‎

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,9 @@
44
*/
55

66
import type { ViewStyle } from 'react-native'
7-
import { Platform } from 'react-native'
8-
import { borderRadius } from '../../tokens/borders'
9-
import { shadows, boxShadows } from '../../tokens/shadows'
7+
import { quietStrip } from '../../tokens/surfaces'
108
import type { ResolvedThemeMode } from '../../tokens/colors'
119

12-
const GLASS_BG = {
13-
light: 'rgba(245, 245, 245, 0.6)',
14-
dark: 'rgba(44, 44, 46, 0.7)',
15-
} as const
16-
1710
export interface BottomToolbarStyleConfig {
1811
/** Outer wrapper with safe-area padding */
1912
wrapper: ViewStyle
@@ -37,32 +30,19 @@ export function getBottomToolbarStyles(
3730
bottom: 0,
3831
left: 0,
3932
right: 0,
40-
alignItems: 'center',
41-
paddingBottom: 8,
42-
paddingHorizontal: 16,
33+
alignItems: 'stretch',
4334
}
4435

36+
// The prototype pins its toolbars to the edge as a strip — full width, a
37+
// hairline on top, opaque — not a floating glass pill. The key is still
38+
// `pill` because the components reach for it by that name.
4539
const pill: ViewStyle = {
4640
flexDirection: 'row',
4741
alignItems: 'center',
4842
justifyContent: 'center',
49-
backgroundColor: GLASS_BG[theme],
50-
borderRadius: borderRadius.sheet,
51-
paddingHorizontal: 4,
52-
paddingVertical: 4,
53-
...shadows.iosSheet,
54-
}
55-
56-
if (Platform.OS === 'web') {
57-
const webPill = pill as Record<string, unknown>
58-
webPill.backdropFilter = 'blur(50px)'
59-
webPill.WebkitBackdropFilter = 'blur(50px)'
60-
webPill.boxShadow = boxShadows.iosSheet
61-
delete webPill.shadowColor
62-
delete webPill.shadowOffset
63-
delete webPill.shadowOpacity
64-
delete webPill.shadowRadius
65-
delete webPill.elevation
43+
paddingHorizontal: 12,
44+
paddingVertical: 6,
45+
...quietStrip(theme, 'bottom'),
6646
}
6747

6848
const contentRow: ViewStyle = {

‎src/components/PageControl/PageControl.styles.ts‎

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,10 @@
44
*/
55

66
import type { ViewStyle } from 'react-native'
7-
import { Platform } from 'react-native'
87
import { colors } from '../../tokens/colors'
98
import { borderRadius } from '../../tokens/borders'
109
import type { ResolvedThemeMode } from '../../tokens/colors'
1110

12-
const PILL_BG = {
13-
light: 'rgba(235, 235, 237, 0.6)',
14-
dark: 'rgba(58, 58, 60, 0.6)',
15-
} as const
16-
1711
export interface PageControlStyleConfig {
1812
container: ViewStyle
1913
dotsRow: ViewStyle
@@ -27,7 +21,7 @@ export interface PageControlStyleConfig {
2721
export function getPageControlStyles(
2822
theme: ResolvedThemeMode,
2923
): PageControlStyleConfig {
30-
const dotColor = colors.labels[theme].primary
24+
const dotColor = colors.text[theme].primary
3125

3226
const container: ViewStyle = {
3327
height: 44,
@@ -45,18 +39,14 @@ export function getPageControlStyles(
4539
}
4640

4741
const pillContainer: ViewStyle = {
48-
backgroundColor: PILL_BG[theme],
49-
borderRadius: borderRadius.pill,
42+
backgroundColor: colors.bg[theme].subtle,
43+
borderWidth: 1,
44+
borderColor: colors.border[theme].default,
45+
borderRadius: borderRadius.xs,
5046
paddingHorizontal: 10,
5147
paddingVertical: 6,
5248
}
5349

54-
if (Platform.OS === 'web') {
55-
const webPill = pillContainer as Record<string, unknown>
56-
webPill.backdropFilter = 'blur(30px)'
57-
webPill.WebkitBackdropFilter = 'blur(30px)'
58-
}
59-
6050
const dot: ViewStyle = {
6151
width: 8,
6252
height: 8,

‎src/components/Popover/Popover.styles.ts‎

Lines changed: 4 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -50,45 +50,10 @@ export function getPopoverStyles(
5050
popoverWidth = undefined
5151
}
5252

53-
// iOS 26 glass variant
54-
if (variant === 'glass') {
55-
const container: ViewStyle = {
56-
position: 'absolute',
57-
width: popoverWidth,
58-
maxWidth,
59-
borderRadius: 20,
60-
overflow: 'hidden',
61-
}
62-
63-
if (Platform.OS === 'web') {
64-
const webContainer = container as Record<string, unknown>
65-
webContainer.backdropFilter = 'blur(65px)'
66-
webContainer.WebkitBackdropFilter = 'blur(65px)'
67-
webContainer.backgroundColor = theme === 'dark'
68-
? 'rgba(30, 30, 30, 0.7)'
69-
: 'rgba(255, 255, 255, 0.84)'
70-
webContainer.boxShadow = '0px 10px 100px 0px rgba(0, 0, 0, 0.3)'
71-
} else {
72-
container.backgroundColor = theme === 'dark'
73-
? 'rgba(30, 30, 30, 0.88)'
74-
: 'rgba(255, 255, 255, 0.92)'
75-
Object.assign(container, {
76-
shadowColor: '#000000',
77-
shadowOffset: { width: 0, height: 10 },
78-
shadowOpacity: 0.3,
79-
shadowRadius: 50,
80-
elevation: 12,
81-
})
82-
}
83-
84-
return {
85-
container,
86-
content: {
87-
overflow: 'hidden',
88-
borderRadius: 20,
89-
},
90-
}
91-
}
53+
// `glass` used to be a 20px-radius blurred bubble. There is one floating
54+
// surface now (the prototype's), so the variant is kept for callers and
55+
// renders the same panel.
56+
void variant
9257

9358
// Default variant
9459
return {

‎src/components/ToolbarButton/ToolbarButton.styles.ts‎

Lines changed: 16 additions & 11 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 { borderRadius } from '../../tokens/borders'
9+
import { fontSize, lineHeight } from '../../tokens/typography'
910
import type { ResolvedThemeMode } from '../../tokens/colors'
1011

1112
export interface ToolbarButtonStyleConfig {
@@ -34,31 +35,32 @@ export interface ToolbarButtonStyleConfig {
3435
export function getToolbarButtonStyles(
3536
theme: ResolvedThemeMode,
3637
): ToolbarButtonStyleConfig {
37-
const tintColor = colors.accents[theme].blue
38-
const iconColor = colors.labelsVibrant[theme].primary
38+
// Teal, the interactive accent (Scaffald/SaaS#983) — not iOS system blue.
39+
const tintColor = theme === 'dark' ? colors.primary[300] : colors.primary[600]
40+
const iconColor = colors.icon[theme].default
3941

4042
const iconButton: ViewStyle = {
4143
width: 44,
4244
height: 44,
4345
alignItems: 'center',
4446
justifyContent: 'center',
45-
borderRadius: 22,
47+
borderRadius: borderRadius.xs,
4648
}
4749

4850
const textButton: ViewStyle = {
4951
height: 44,
5052
paddingHorizontal: 12,
5153
alignItems: 'center',
5254
justifyContent: 'center',
53-
borderRadius: borderRadius.pill,
55+
borderRadius: borderRadius.xs,
5456
}
5557

5658
const filledButton: ViewStyle = {
5759
height: 30,
5860
paddingHorizontal: 14,
5961
alignItems: 'center',
6062
justifyContent: 'center',
61-
borderRadius: 15,
63+
borderRadius: borderRadius.xs,
6264
backgroundColor: tintColor,
6365
}
6466

@@ -72,20 +74,23 @@ export function getToolbarButtonStyles(
7274
}
7375

7476
const textLabel: TextStyle = {
75-
fontSize: 17,
76-
fontWeight: '400',
77+
fontSize: fontSize.md,
78+
lineHeight: lineHeight.md,
79+
fontWeight: '500',
7780
color: tintColor,
7881
}
7982

8083
const filledLabel: TextStyle = {
81-
fontSize: 15,
84+
fontSize: fontSize.md,
85+
lineHeight: lineHeight.md,
8286
fontWeight: '600',
83-
color: '#ffffff',
87+
color: colors.white,
8488
}
8589

8690
const backLabel: TextStyle = {
87-
fontSize: 17,
88-
fontWeight: '400',
91+
fontSize: fontSize.md,
92+
lineHeight: lineHeight.md,
93+
fontWeight: '500',
8994
color: tintColor,
9095
}
9196

0 commit comments

Comments
 (0)