refactor(theme): migrate and refactor type OverrideToken by @ant-design/cssinjs-utils

This commit is contained in:
🏎️ Yumo 2024-07-23 16:53:24 +08:00
parent 64f26bd970
commit c057cb2113
2 changed files with 4 additions and 6 deletions

View File

@ -1,5 +1,6 @@
import type { import type {
GlobalToken as GlobalTokenTypeUtil, GlobalToken as GlobalTokenTypeUtil,
OverrideTokenMap as OverrideTokenTypeUtil,
} from '@ant-design/cssinjs-utils'; } from '@ant-design/cssinjs-utils';
import type { AliasToken } from './alias'; import type { AliasToken } from './alias';
@ -8,3 +9,5 @@ import type { ComponentTokenMap } from './components';
/** Final token which contains the components level override */ /** Final token which contains the components level override */
export type GlobalToken = GlobalTokenTypeUtil<ComponentTokenMap, AliasToken>; export type GlobalToken = GlobalTokenTypeUtil<ComponentTokenMap, AliasToken>;
export type OverrideToken = OverrideTokenTypeUtil<ComponentTokenMap, AliasToken>;

View File

@ -2,17 +2,12 @@ import type { CSSInterpolation, DerivativeFunc } from '@ant-design/cssinjs';
import type { AnyObject } from '../../_util/type'; import type { AnyObject } from '../../_util/type';
import type { AliasToken } from './alias'; import type { AliasToken } from './alias';
import type { ComponentTokenMap } from './components';
import type { MapToken } from './maps'; import type { MapToken } from './maps';
import type { SeedToken } from './seeds'; import type { SeedToken } from './seeds';
export type MappingAlgorithm = DerivativeFunc<SeedToken, MapToken>; export type MappingAlgorithm = DerivativeFunc<SeedToken, MapToken>;
export type OverrideToken = { export type { GlobalToken, OverrideToken } from './cssinjs-utils';
[key in keyof ComponentTokenMap]: Partial<ComponentTokenMap[key]> & Partial<AliasToken>;
};
export type { GlobalToken } from './cssinjs-utils';
export type { AliasToken } from './alias'; export type { AliasToken } from './alias';
export type { ComponentTokenMap } from './components'; export type { ComponentTokenMap } from './components';