ant-design/components/theme/internal.ts

59 lines
1.3 KiB
TypeScript
Raw Normal View History

import { useStyleRegister } from '@ant-design/cssinjs';
import { genCalc as calc, mergeToken, statisticToken, statistic } from '@ant-design/cssinjs-utils';
import type {
AliasToken,
GenerateStyle,
PresetColorKey,
PresetColorType,
SeedToken,
GlobalToken,
UseComponentStyleResult,
FullToken,
GetDefaultToken,
OverrideComponent,
GenStyleFn,
} from './interface';
import { PresetColors } from './interface';
import { getLineHeight } from './themes/shared/genFontSizes';
import useToken from './useToken';
import { genComponentStyleHook, genStyleHooks, genSubStyleComponent } from './util/genStyleUtils';
2023-03-28 12:12:36 +08:00
import genPresetColor from './util/genPresetColor';
import useResetIconStyle from './util/useResetIconStyle';
export type { CSSUtil, TokenWithCommonCls } from '@ant-design/cssinjs-utils';
export { DesignTokenContext, defaultConfig } from './context';
export {
// generators
2023-06-25 10:47:34 +08:00
genComponentStyleHook,
genSubStyleComponent,
2023-06-25 10:47:34 +08:00
genPresetColor,
genStyleHooks,
// utils
mergeToken,
2023-06-25 10:47:34 +08:00
statisticToken,
calc,
getLineHeight,
// hooks
useResetIconStyle,
useStyleRegister,
useToken,
// constant
PresetColors,
statistic,
};
export type {
AliasToken,
FullToken,
OverrideComponent,
GenerateStyle,
2023-06-25 10:47:34 +08:00
PresetColorKey,
PresetColorType,
SeedToken,
UseComponentStyleResult,
GetDefaultToken,
GlobalToken,
GenStyleFn,
};