Revert "Feat/parent child retrieval" (#12095)

This commit is contained in:
-LAN-
2024-12-25 20:55:44 +08:00
committed by GitHub
parent 9231fdbf4c
commit db2aa83a7c
216 changed files with 3116 additions and 9066 deletions

View File

@@ -1,27 +0,0 @@
import { type FC, Fragment } from 'react'
import type { Step } from './step'
import { StepperStep } from './step'
export type StepperProps = {
steps: Step[]
activeIndex: number
}
export const Stepper: FC<StepperProps> = (props) => {
const { steps, activeIndex } = props
return <div className='flex items-center gap-3'>
{steps.map((step, index) => {
const isLast = index === steps.length - 1
return (
<Fragment key={index}>
<StepperStep
{...step}
activeIndex={activeIndex}
index={index}
/>
{!isLast && <div className='w-4 h-px bg-divider-deep' />}
</Fragment>
)
})}
</div>
}

View File

@@ -1,46 +0,0 @@
import type { FC } from 'react'
import classNames from '@/utils/classnames'
export type Step = {
name: string
}
export type StepperStepProps = Step & {
index: number
activeIndex: number
}
export const StepperStep: FC<StepperStepProps> = (props) => {
const { name, activeIndex, index } = props
const isActive = index === activeIndex
const isDisabled = activeIndex < index
const label = isActive ? `STEP ${index + 1}` : `${index + 1}`
return <div className='flex items-center gap-2'>
<div className={classNames(
'h-5 px-2 py-1 rounded-3xl flex-col justify-center items-center gap-2 inline-flex',
isActive
? 'bg-state-accent-solid'
: !isDisabled
? 'border border-text-quaternary'
: 'border border-divider-deep',
)}>
<div className={classNames(
'text-center system-2xs-semibold-uppercase',
isActive
? 'text-text-primary-on-surface'
: !isDisabled
? 'text-text-tertiary'
: 'text-text-quaternary',
)}>
{label}
</div>
</div>
<div className={classNames('system-xs-medium-uppercase',
isActive
? 'text-text-accent system-xs-semibold-uppercase'
: !isDisabled
? 'text-text-tertiary'
: 'text-text-quaternary',
)}>{name}</div>
</div>
}