refactor(types): derive SemanticName from semantic maps (#56391)

This commit is contained in:
lijianan
2025-12-27 20:21:30 +08:00
committed by GitHub
parent 5c52fea0bf
commit 886a1d19cd
4 changed files with 4 additions and 43 deletions

View File

@@ -53,16 +53,7 @@ export type FieldNamesType = FieldNames;
export type FilledFieldNamesType = Required<FieldNamesType>;
export type SemanticName =
| 'root'
| 'prefix'
| 'suffix'
| 'input'
| 'placeholder'
| 'content'
| 'item'
| 'itemContent'
| 'itemRemove';
export type SemanticName = keyof CascaderSemanticClassNames & keyof CascaderSemanticStyles;
export type CascaderSemanticClassNames = {
root?: string;

View File

@@ -8,18 +8,7 @@ import type { ClosableType, SemanticClassNamesType, SemanticStylesType } from '.
import { useComponentConfig } from '../config-provider/context';
import Skeleton from '../skeleton';
export type SemanticName =
| 'root'
| 'mask'
| 'header'
| 'title'
| 'extra'
| 'section'
| 'body'
| 'footer'
| 'wrapper'
| 'dragger'
| 'close';
export type SemanticName = keyof DrawerSemanticClassNames & keyof DrawerSemanticStyles;
export type DrawerSemanticClassNames = {
root?: string;

View File

@@ -11,15 +11,7 @@ import type { Breakpoint } from '../_util/responsiveObserver';
import type { ButtonProps, LegacyButtonType } from '../button/Button';
import type { DirectionType } from '../config-provider';
export type SemanticName =
| 'root'
| 'header'
| 'body'
| 'footer'
| 'container'
| 'title'
| 'wrapper'
| 'mask';
export type SemanticName = keyof ModalSemanticClassNames & keyof ModalSemanticStyles;
export type ModalSemanticClassNames = {
root?: string;

View File

@@ -28,18 +28,7 @@ export type { TransferOperationProps } from './Actions';
export type { TransferSearchProps } from './search';
export type { TransferListProps } from './Section';
export type SemanticName =
| 'root'
| 'section'
| 'header'
| 'title'
| 'body'
| 'list'
| 'item'
| 'itemIcon'
| 'itemContent'
| 'footer'
| 'actions';
export type SemanticName = keyof TransferSemanticClassNames & keyof TransferSemanticStyles;
export type TransferSemanticClassNames = {
root?: string;