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
35import { Step } from '../elements/Step' ;
46import { 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'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