11import React from 'react' ;
22
3- import { Badge , Box , Button , descriptors , Flex , Icon , Spinner , Text , useLocalizations } from '@/customizables' ;
3+ import { Badge , Box , Button , Col , descriptors , Flex , Icon , Spinner , Text , useLocalizations } from '@/customizables' ;
44import { CaretLeft , CaretRight } from '@/icons' ;
55import { Route , Switch , useRouter } from '@/router' ;
66
@@ -241,14 +241,26 @@ const Body = ({ activeSteps }: { activeSteps: ConfigureSSOWizardActiveStep[] }):
241241 key = { step . id }
242242 path = { step . path }
243243 >
244- { step . children }
244+ < StepBody step = { step } />
245245 </ Route >
246246 ) ) }
247- < Route key = { firstStep . id } > { firstStep . children } </ Route >
247+ < Route key = { firstStep . id } >
248+ < StepBody step = { firstStep } />
249+ </ Route >
248250 </ Switch >
249251 ) ;
250252} ;
251253
254+ const StepBody = ( { step } : { step : ConfigureSSOWizardActiveStep } ) : JSX . Element => (
255+ < Col
256+ elementDescriptor = { descriptors . configureSSOWizardBody }
257+ elementId = { descriptors . configureSSOWizardBody . setId ( step . id ) }
258+ sx = { { flex : 1 , minHeight : 0 } }
259+ >
260+ { step . children }
261+ </ Col >
262+ ) ;
263+
252264/**
253265 * Numbered breadcrumb of the outermost wizard's active steps.
254266 * Completed and current steps are clickable for backwards navigation,
@@ -260,6 +272,7 @@ const Header = (): JSX.Element => {
260272
261273 return (
262274 < Flex
275+ elementDescriptor = { descriptors . configureSSOWizardHeader }
263276 align = 'center'
264277 sx = { theme => ( {
265278 gap : theme . space . $2 ,
@@ -282,6 +295,9 @@ const Header = (): JSX.Element => {
282295 < SkeletonBreadcrumbStep />
283296 ) : (
284297 < Button
298+ elementDescriptor = { descriptors . configureSSOWizardHeaderItem }
299+ elementId = { descriptors . configureSSOWizardHeaderItem . setId ( step . id ) }
300+ isActive = { isCurrent }
285301 variant = 'unstyled'
286302 isDisabled = { ! isReachable }
287303 onClick = { ( ) => {
@@ -296,6 +312,9 @@ const Header = (): JSX.Element => {
296312 } ) }
297313 >
298314 < Flex
315+ elementDescriptor = { descriptors . configureSSOWizardHeaderItemBullet }
316+ elementId = { descriptors . configureSSOWizardHeaderItemBullet . setId ( step . id ) }
317+ isActive = { isCurrent }
299318 align = 'center'
300319 justify = 'center'
301320 sx = { theme => ( {
@@ -315,6 +334,8 @@ const Header = (): JSX.Element => {
315334 { index + 1 }
316335 </ Flex >
317336 < Text
337+ elementDescriptor = { descriptors . configureSSOWizardHeaderItemLabel }
338+ elementId = { descriptors . configureSSOWizardHeaderItemLabel . setId ( step . id ) }
318339 as = 'span'
319340 variant = 'body'
320341 sx = { { fontWeight : 'inherit' , color : 'inherit' } }
@@ -325,6 +346,7 @@ const Header = (): JSX.Element => {
325346 ) }
326347 { index < activeSteps . length - 1 && (
327348 < Icon
349+ elementDescriptor = { descriptors . configureSSOWizardHeaderSeparator }
328350 icon = { CaretRight }
329351 size = 'sm'
330352 sx = { theme => ( { color : theme . colors . $colorMutedForeground } ) }
@@ -374,7 +396,10 @@ const StepIndicator = (): JSX.Element | null => {
374396 }
375397
376398 return (
377- < Flex sx = { { marginBottom : 'auto' } } >
399+ < Flex
400+ elementDescriptor = { descriptors . configureSSOWizardStepIndicator }
401+ sx = { { marginBottom : 'auto' } }
402+ >
378403 < Badge
379404 colorScheme = 'primary'
380405 sx = { {
@@ -468,6 +493,7 @@ const Footer = (props: FooterProps): JSX.Element => {
468493 >
469494 { ! hidePrevious && (
470495 < Button
496+ elementDescriptor = { descriptors . configureSSOWizardFooterPreviousButton }
471497 variant = 'outline'
472498 size = 'sm'
473499 isDisabled = { isForceDisabled || isFirstStep }
@@ -482,6 +508,7 @@ const Footer = (props: FooterProps): JSX.Element => {
482508 </ Button >
483509 ) }
484510 < Button
511+ elementDescriptor = { descriptors . configureSSOWizardFooterContinueButton }
485512 variant = 'solid'
486513 size = 'sm'
487514 isDisabled = { isForceDisabled || continueAction ?. isDisabled || isLastStep }
0 commit comments