MadCcc
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with
12 additions and
11 deletions
-
components/badge/style/index.ts
-
components/style/index.ts
-
components/tag/style/index.ts
-
components/theme/internal.ts
-
components/theme/util/genPresetColor.tsx
-
components/tooltip/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; |
|
|
|
|
|
@ -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 = { |
|
|
|
|
|
@ -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 {} |
|
|
|
|
|
|
|
|
|
@ -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, |
|
|
|
|
|
@ -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 { |
|
|
@ -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; |
|
|
|