Skip to content

Commit aec960d

Browse files
committed
feat(ui): add provider selection grid to ConfigureSSO step
Replace placeholder text in SelectProviderStep with a SAML provider selection UI featuring Okta Workforce and Custom SAML Provider cards. Introduces a ProviderCard component with selected state styling and adjusts Step header alignment to top-align with refined spacing.
1 parent 80a1933 commit aec960d

2 files changed

Lines changed: 91 additions & 5 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ const Header = ({ title, description, children }: StepHeaderProps): JSX.Element
5454
})}
5555
>
5656
<Flex
57-
align='center'
57+
align='start'
5858
justify='between'
5959
sx={theme => ({ gap: theme.space.$4 })}
6060
>
61-
<Col sx={theme => ({ gap: theme.space.$1x5, minWidth: 0 })}>
61+
<Col sx={theme => ({ gap: theme.space.$2, minWidth: 0 })}>
6262
<Heading
6363
textVariant='h3'
6464
sx={theme => ({ color: theme.colors.$colorForeground, fontSize: theme.fontSizes.$lg })}

packages/ui/src/components/ConfigureSSO/steps/SelectProviderStep.tsx

Lines changed: 89 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { descriptors, Flow, Text } from '@/customizables';
1+
import type { PropsWithChildren } from 'react';
2+
3+
import { Box, Col, descriptors, Flow, Grid, SimpleButton, Text } from '@/customizables';
24

35
import { Step } from '../elements/Step';
46
import { useWizard } from '../elements/Wizard';
@@ -18,8 +20,42 @@ export const SelectProviderStep = (): JSX.Element => {
1820
/>
1921

2022
<Step.Body>
21-
<Step.Section>
22-
<Text>UI goes here</Text>
23+
<Step.Section sx={theme => ({ gap: theme.space.$5 })}>
24+
<Col sx={theme => ({ gap: theme.space.$1x5 })}>
25+
<Text
26+
as='p'
27+
variant='subtitle'
28+
sx={theme => ({ color: theme.colors.$colorForeground })}
29+
>
30+
Select your identity provider
31+
</Text>
32+
33+
<Text
34+
as='p'
35+
variant='body'
36+
sx={theme => ({ color: theme.colors.$colorMutedForeground })}
37+
>
38+
We&apos;ll guide you through the detailed setup process next.
39+
</Text>
40+
</Col>
41+
42+
<Col sx={theme => ({ gap: theme.space.$3 })}>
43+
<Text
44+
as='label'
45+
variant='subtitle'
46+
sx={theme => ({ color: theme.colors.$colorForeground })}
47+
>
48+
SAML
49+
</Text>
50+
51+
<Grid
52+
gap={3}
53+
columns={2}
54+
>
55+
<ProviderCard>Okta Workforce</ProviderCard>
56+
<ProviderCard>Custom SAML Provider</ProviderCard>
57+
</Grid>
58+
</Col>
2359
</Step.Section>
2460
</Step.Body>
2561

@@ -37,3 +73,53 @@ export const SelectProviderStep = (): JSX.Element => {
3773
</Flow.Part>
3874
);
3975
};
76+
77+
type ProviderCardProps = PropsWithChildren<{
78+
isSelected?: boolean;
79+
onClick?: () => void;
80+
}>;
81+
82+
const ProviderCard = ({ isSelected, onClick, children }: ProviderCardProps): JSX.Element => {
83+
return (
84+
<SimpleButton
85+
variant='outline'
86+
block
87+
onClick={onClick}
88+
aria-pressed={isSelected}
89+
sx={theme => ({
90+
flexDirection: 'column',
91+
alignItems: 'center',
92+
justifyContent: 'center',
93+
gap: theme.space.$2,
94+
height: theme.sizes.$32,
95+
padding: theme.space.$1x5,
96+
backgroundColor: theme.colors.$colorBackground,
97+
...(isSelected
98+
? {
99+
boxShadow: `0 0 0 4px ${theme.colors.$colorRing}`,
100+
}
101+
: {}),
102+
})}
103+
>
104+
{/* TODO: add provider icons */}
105+
<Box
106+
as='span'
107+
aria-hidden
108+
sx={theme => ({
109+
width: theme.sizes.$8,
110+
height: theme.sizes.$8,
111+
borderRadius: theme.radii.$md,
112+
backgroundColor: theme.colors.$primary500,
113+
})}
114+
/>
115+
116+
<Text
117+
as='span'
118+
variant='body'
119+
sx={theme => ({ color: theme.colors.$colorForeground })}
120+
>
121+
{children}
122+
</Text>
123+
</SimpleButton>
124+
);
125+
};

0 commit comments

Comments
 (0)