mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 17:44:35 +08:00
refactor(theme): migrate and refactor type TokenWithCommonCls
by @ant-design/cssinjs-utils
This commit is contained in:
parent
965b68cfea
commit
5019af42b5
@ -9,10 +9,8 @@ import type {
|
||||
GlobalToken,
|
||||
FullToken,
|
||||
GetDefaultToken,
|
||||
} from '../../theme/internal';
|
||||
import type {
|
||||
TokenWithCommonCls,
|
||||
} from '../../theme/util/genComponentStyleHook';
|
||||
} from '../../theme/internal';
|
||||
|
||||
export interface PanelComponentToken extends MultipleSelectorToken {
|
||||
/**
|
||||
|
@ -9,9 +9,9 @@ import type {
|
||||
GenerateStyle,
|
||||
GlobalToken,
|
||||
GenStyleFn,
|
||||
TokenWithCommonCls,
|
||||
} from '../../theme/internal';
|
||||
import { genStyleHooks, mergeToken } from '../../theme/internal';
|
||||
import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook';
|
||||
|
||||
/** Component only token. Which will handle additional calculation of alias token */
|
||||
export interface ComponentToken {
|
||||
|
@ -3,8 +3,7 @@ import { unit } from '@ant-design/cssinjs';
|
||||
|
||||
import { resetIcon } from '../../style';
|
||||
import { mergeToken } from '../../theme/internal';
|
||||
import type { AliasToken } from '../../theme/internal';
|
||||
import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook';
|
||||
import type { AliasToken, TokenWithCommonCls } from '../../theme/internal';
|
||||
import type { SelectToken } from './token';
|
||||
|
||||
type SelectItemToken = Pick<
|
||||
|
@ -1,5 +1,4 @@
|
||||
import type { AliasToken, GenerateStyle } from '../../theme/internal';
|
||||
import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook';
|
||||
import type { AliasToken, GenerateStyle, TokenWithCommonCls } from '../../theme/internal';
|
||||
|
||||
const genCollapseMotion: GenerateStyle<TokenWithCommonCls<AliasToken>> = (token) => ({
|
||||
[token.componentCls]: {
|
||||
|
@ -1,8 +1,7 @@
|
||||
import type { CSSInterpolation } from '@ant-design/cssinjs';
|
||||
import { Keyframes } from '@ant-design/cssinjs';
|
||||
|
||||
import type { AliasToken } from '../../theme/internal';
|
||||
import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook';
|
||||
import type { AliasToken, TokenWithCommonCls } from '../../theme/internal';
|
||||
import { initMotion } from './motion';
|
||||
|
||||
export const fadeIn = new Keyframes('antFadeIn', {
|
||||
|
@ -1,8 +1,7 @@
|
||||
import type { CSSInterpolation } from '@ant-design/cssinjs';
|
||||
import { Keyframes } from '@ant-design/cssinjs';
|
||||
|
||||
import type { AliasToken } from '../../theme/internal';
|
||||
import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook';
|
||||
import type { AliasToken, TokenWithCommonCls } from '../../theme/internal';
|
||||
import { initMotion } from './motion';
|
||||
|
||||
export const moveDownIn = new Keyframes('antMoveDownIn', {
|
||||
|
@ -1,8 +1,7 @@
|
||||
import type { CSSInterpolation } from '@ant-design/cssinjs';
|
||||
import { Keyframes } from '@ant-design/cssinjs';
|
||||
|
||||
import type { AliasToken } from '../../theme/internal';
|
||||
import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook';
|
||||
import type { AliasToken, TokenWithCommonCls } from '../../theme/internal';
|
||||
import { initMotion } from './motion';
|
||||
|
||||
export const slideUpIn = new Keyframes('antSlideUpIn', {
|
||||
|
@ -1,8 +1,7 @@
|
||||
import type { CSSInterpolation } from '@ant-design/cssinjs';
|
||||
import { Keyframes } from '@ant-design/cssinjs';
|
||||
|
||||
import type { AliasToken } from '../../theme/internal';
|
||||
import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook';
|
||||
import type { AliasToken, TokenWithCommonCls } from '../../theme/internal';
|
||||
import { initMotion } from './motion';
|
||||
|
||||
export const zoomIn = new Keyframes('antZoomIn', {
|
||||
|
@ -1,7 +1,6 @@
|
||||
import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs';
|
||||
|
||||
import type { AliasToken } from '../theme/internal';
|
||||
import type { TokenWithCommonCls } from '../theme/util/genComponentStyleHook';
|
||||
import type { AliasToken, TokenWithCommonCls } from '../theme/internal';
|
||||
import type { ArrowToken } from './roundedArrow';
|
||||
import { genRoundedArrow } from './roundedArrow';
|
||||
|
||||
|
@ -29,7 +29,7 @@ import genComponentStyleHook, {
|
||||
import genPresetColor from './util/genPresetColor';
|
||||
import useResetIconStyle from './util/useResetIconStyle';
|
||||
|
||||
export type { CSSUtil } from '@ant-design/cssinjs-utils';
|
||||
export type { CSSUtil, TokenWithCommonCls } from '@ant-design/cssinjs-utils';
|
||||
|
||||
export { DesignTokenContext, defaultConfig } from './context';
|
||||
export {
|
||||
|
@ -2,8 +2,7 @@
|
||||
import type { CSSObject } from '@ant-design/cssinjs';
|
||||
|
||||
import { PresetColors } from '../interface';
|
||||
import type { AliasToken, PresetColorKey } from '../internal';
|
||||
import type { TokenWithCommonCls } from './genComponentStyleHook';
|
||||
import type { AliasToken, PresetColorKey, TokenWithCommonCls } from '../internal';
|
||||
|
||||
interface CalcColor {
|
||||
/** token[`${colorKey}-1`] */
|
||||
|
Loading…
Reference in New Issue
Block a user