Skip to content

Commit c7a50b2

Browse files
committed
refactor(ui): polish ConfigureSSO Stepper styling
Switch Stepper.Item to SimpleButton, align caret and skeleton colors with the muted foreground token, and tighten the active step typography. Simplify the header's step click handler now that disabled state is handled by the button itself.
1 parent 94f83bd commit c7a50b2

2 files changed

Lines changed: 37 additions & 36 deletions

File tree

packages/ui/src/components/ConfigureSSO/ConfigureSSOHeader.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ export const ConfigureSSOHeader = (): JSX.Element => {
3030
isCurrent={isCurrent}
3131
isCompleted={isCompleted}
3232
isReachable={isReachable}
33-
onClick={() => {
34-
if (isReachable) {
35-
void goToStep(step.id);
36-
}
37-
}}
33+
onClick={() => void goToStep(step.id)}
3834
>
3935
{labelText}
4036
</Stepper.Item>

packages/ui/src/components/ConfigureSSO/elements/Stepper/Stepper.tsx

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import { Box, Button, descriptors, Flex, Icon, Text } from '@/customizables';
3+
import { Box, descriptors, Flex, Icon, SimpleButton, Text } from '@/customizables';
44
import { CaretRight, Check } from '@/icons';
55

66
import type { StepperItemProps, StepperProps } from './types';
@@ -26,7 +26,7 @@ const Root = ({ children }: StepperProps): JSX.Element => {
2626
elementDescriptor={descriptors.configureSSOStepperSeparator}
2727
icon={CaretRight}
2828
size='md'
29-
sx={theme => ({ color: theme.colors.$colorMutedForeground })}
29+
colorScheme='neutral'
3030
/>
3131
)}
3232
</React.Fragment>
@@ -44,7 +44,7 @@ const Item = ({
4444
children,
4545
}: StepperItemProps): JSX.Element => {
4646
return (
47-
<Button
47+
<SimpleButton
4848
elementDescriptor={descriptors.configureSSOStepperItem}
4949
isActive={isCurrent}
5050
variant='unstyled'
@@ -54,6 +54,9 @@ const Item = ({
5454
gap: theme.space.$1x5,
5555
padding: 0,
5656
color: isCurrent || isCompleted ? theme.colors.$colorForeground : theme.colors.$colorMutedForeground,
57+
'&:disabled,&[data-disabled]': {
58+
opacity: 1,
59+
},
5760
})}
5861
>
5962
<Flex
@@ -69,7 +72,7 @@ const Item = ({
6972
? theme.colors.$colorForeground
7073
: isCompleted
7174
? theme.colors.$success500
72-
: theme.colors.$neutralAlpha400,
75+
: theme.colors.$colorMutedForeground,
7376
})}
7477
>
7578
{isCompleted && !isCurrent ? (
@@ -82,14 +85,15 @@ const Item = ({
8285
as='span'
8386
sx={theme => ({
8487
fontSize: theme.fontSizes.$xs,
85-
fontWeight: theme.fontWeights.$semibold,
88+
fontWeight: theme.fontWeights.$medium,
8689
color: theme.colors.$colorBackground,
8790
})}
8891
>
8992
{bullet}
9093
</Text>
9194
)}
9295
</Flex>
96+
9397
<Text
9498
elementDescriptor={descriptors.configureSSOStepperItemLabel}
9599
as='span'
@@ -98,35 +102,11 @@ const Item = ({
98102
>
99103
{children}
100104
</Text>
101-
</Button>
105+
</SimpleButton>
102106
);
103107
};
104108
Item.displayName = 'Stepper.Item';
105109

106-
const ItemSkeleton = (): JSX.Element => (
107-
<Flex
108-
align='center'
109-
sx={t => ({ gap: t.space.$1x5 })}
110-
>
111-
<Box
112-
sx={t => ({
113-
width: t.sizes.$4,
114-
height: t.sizes.$4,
115-
borderRadius: t.radii.$circle,
116-
backgroundColor: t.colors.$neutralAlpha100,
117-
})}
118-
/>
119-
<Box
120-
sx={t => ({
121-
width: t.sizes.$17,
122-
height: t.sizes.$1x5,
123-
borderRadius: t.radii.$md,
124-
backgroundColor: t.colors.$neutralAlpha100,
125-
})}
126-
/>
127-
</Flex>
128-
);
129-
130110
type SkeletonProps = {
131111
totalSteps?: number;
132112
};
@@ -149,14 +129,39 @@ const Skeleton = ({ totalSteps = 4 }: SkeletonProps): JSX.Element => (
149129
elementDescriptor={descriptors.configureSSOStepperSeparator}
150130
icon={CaretRight}
151131
size='md'
152-
sx={theme => ({ color: theme.colors.$neutralAlpha100 })}
132+
colorScheme='neutral'
133+
sx={{ opacity: 0.16 }}
153134
/>
154135
)}
155136
</React.Fragment>
156137
))}
157138
</Flex>
158139
);
159140

141+
const ItemSkeleton = (): JSX.Element => (
142+
<Flex
143+
align='center'
144+
sx={t => ({ gap: t.space.$1x5, minHeight: t.sizes.$4x5, opacity: 0.16 })}
145+
>
146+
<Box
147+
sx={t => ({
148+
width: t.sizes.$4,
149+
height: t.sizes.$4,
150+
borderRadius: t.radii.$circle,
151+
backgroundColor: t.colors.$colorMutedForeground,
152+
})}
153+
/>
154+
<Box
155+
sx={t => ({
156+
width: t.sizes.$17,
157+
height: t.sizes.$1x5,
158+
borderRadius: t.radii.$md,
159+
backgroundColor: t.colors.$colorMutedForeground,
160+
})}
161+
/>
162+
</Flex>
163+
);
164+
160165
/**
161166
* Numbered step indicator — purely presentational.
162167
*

0 commit comments

Comments
 (0)