Browse Source

fix: fix cycle-deps (#41499)

pull/41521/head
MadCcc 2 years ago
committed by GitHub
parent
commit
86b26e6935
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      components/badge/style/index.ts
  2. 1
      components/style/index.ts
  3. 4
      components/tag/style/index.ts
  4. 2
      components/theme/internal.ts
  5. 8
      components/theme/util/genPresetColor.tsx
  6. 4
      components/tooltip/style/index.ts

4
components/badge/style/index.ts

@ -1,8 +1,8 @@
import type { CSSObject } from '@ant-design/cssinjs';
import { Keyframes } from '@ant-design/cssinjs';
import type { FullToken, GenerateStyle } from '../../theme/internal';
import { genComponentStyleHook, mergeToken } from '../../theme/internal';
import { genPresetColor, resetComponent } from '../../style';
import { genComponentStyleHook, mergeToken, genPresetColor } from '../../theme/internal';
import { resetComponent } from '../../style';
interface BadgeToken extends FullToken<'Badge'> {
badgeFontHeight: number;

1
components/style/index.ts

@ -3,7 +3,6 @@ import type { CSSObject } from '@ant-design/cssinjs';
import type { AliasToken, DerivativeToken } from '../theme/internal';
export { operationUnit } from './operationUnit';
export { genPresetColor } from './presetColor';
export { roundedArrow } from './roundedArrow';
export const textEllipsis: CSSObject = {

4
components/tag/style/index.ts

@ -1,9 +1,9 @@
import type { CSSInterpolation } from '@ant-design/cssinjs';
import type React from 'react';
import type { FullToken } from '../../theme/internal';
import { genComponentStyleHook, mergeToken } from '../../theme/internal';
import { genComponentStyleHook, mergeToken, genPresetColor } from '../../theme/internal';
import capitalize from '../../_util/capitalize';
import { genPresetColor, resetComponent } from '../../style';
import { resetComponent } from '../../style';
export interface ComponentToken {}

2
components/theme/internal.ts

@ -18,6 +18,7 @@ import formatToken from './util/alias';
import type { FullToken } from './util/genComponentStyleHook';
import genComponentStyleHook from './util/genComponentStyleHook';
import statisticToken, { merge as mergeToken, statistic } from './util/statistic';
import genPresetColor from './util/genPresetColor';
const defaultTheme = createTheme(defaultDerivative);
@ -31,6 +32,7 @@ export {
// hooks
useStyleRegister,
genComponentStyleHook,
genPresetColor,
};
export type {
SeedToken,

8
components/style/presetColor.tsx → components/theme/util/genPresetColor.tsx

@ -1,8 +1,8 @@
/* eslint-disable import/prefer-default-export */
import type { CSSObject } from '@ant-design/cssinjs';
import type { AliasToken, PresetColorKey } from '../theme/internal';
import { PresetColors } from '../theme/internal';
import type { TokenWithCommonCls } from '../theme/util/genComponentStyleHook';
import type { AliasToken, PresetColorKey } from '../internal';
import { PresetColors } from '../interface';
import type { TokenWithCommonCls } from './genComponentStyleHook';
interface CalcColor {
/** token[`${colorKey}-1`] */
@ -17,7 +17,7 @@ interface CalcColor {
type GenCSS = (colorKey: PresetColorKey, calcColor: CalcColor) => CSSObject;
export function genPresetColor<Token extends TokenWithCommonCls<AliasToken>>(
export default function genPresetColor<Token extends TokenWithCommonCls<AliasToken>>(
token: Token,
genCss: GenCSS,
): CSSObject {

4
components/tooltip/style/index.ts

@ -1,8 +1,8 @@
import { genPresetColor, resetComponent } from '../../style';
import { resetComponent } from '../../style';
import { initZoomMotion } from '../../style/motion';
import getArrowStyle, { MAX_VERTICAL_CONTENT_RADIUS } from '../../style/placementArrow';
import type { FullToken, GenerateStyle, UseComponentStyleResult } from '../../theme/internal';
import { genComponentStyleHook, mergeToken } from '../../theme/internal';
import { genComponentStyleHook, mergeToken, genPresetColor } from '../../theme/internal';
export interface ComponentToken {
zIndexPopup: number;

Loading…
Cancel
Save