diff --git a/components/affix/style/index.tsx b/components/affix/style/index.tsx index 18821d913f..ac643aeaec 100644 --- a/components/affix/style/index.tsx +++ b/components/affix/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle, FullToken } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken } from '../../theme'; interface AffixToken extends FullToken<'Affix'> { zIndexPopup: number; diff --git a/components/alert/style/index.tsx b/components/alert/style/index.tsx index 7f07f0e45d..b652c02515 100644 --- a/components/alert/style/index.tsx +++ b/components/alert/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; export interface ComponentToken {} diff --git a/components/anchor/style/index.tsx b/components/anchor/style/index.tsx index 86272523e6..205ffcfb1a 100644 --- a/components/anchor/style/index.tsx +++ b/components/anchor/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; export interface ComponentToken {} diff --git a/components/avatar/style/index.tsx b/components/avatar/style/index.tsx index de7172ede6..7a538a49f8 100644 --- a/components/avatar/style/index.tsx +++ b/components/avatar/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; export interface ComponentToken {} diff --git a/components/back-top/style/index.tsx b/components/back-top/style/index.tsx index 5db46db0b6..74462604f3 100644 --- a/components/back-top/style/index.tsx +++ b/components/back-top/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle, FullToken } from '../../_util/theme'; -import { resetComponent, genComponentStyleHook, mergeToken } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; /** Component only token. Which will handle additional calculation of alias token */ export interface ComponentToken { diff --git a/components/badge/style/index.tsx b/components/badge/style/index.tsx index be842ac4be..6e160e9424 100644 --- a/components/badge/style/index.tsx +++ b/components/badge/style/index.tsx @@ -1,8 +1,8 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; import { Keyframes } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle, PresetColorType } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, PresetColors, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle, PresetColorType } from '../../theme'; +import { genComponentStyleHook, mergeToken, PresetColors, resetComponent } from '../../theme'; interface BadgeToken extends FullToken<'Badge'> { badgeFontHeight: number; diff --git a/components/breadcrumb/style/index.tsx b/components/breadcrumb/style/index.tsx index 8f75e4afe6..ca588a479f 100644 --- a/components/breadcrumb/style/index.tsx +++ b/components/breadcrumb/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; interface BreadcrumbToken extends FullToken<'Breadcrumb'> { breadcrumbBaseColor: string; diff --git a/components/button/button-group.tsx b/components/button/button-group.tsx index 56c0cea1a9..23e9a20788 100644 --- a/components/button/button-group.tsx +++ b/components/button/button-group.tsx @@ -2,7 +2,7 @@ import classNames from 'classnames'; import * as React from 'react'; import { ConfigContext } from '../config-provider'; import type { SizeType } from '../config-provider/SizeContext'; -import { useToken } from '../_util/theme'; +import { useToken } from '../theme'; import warning from '../_util/warning'; export interface ButtonGroupProps { diff --git a/components/button/style/group.tsx b/components/button/style/group.tsx index e80e51d945..9b28a9d484 100644 --- a/components/button/style/group.tsx +++ b/components/button/style/group.tsx @@ -1,5 +1,5 @@ -import type { GenerateStyle } from '../../_util/theme'; import type { ButtonToken } from '.'; +import type { GenerateStyle } from '../../theme'; const genButtonBorderStyle = (buttonTypeCls: string, borderColor: string) => ({ // Border diff --git a/components/button/style/index.tsx b/components/button/style/index.tsx index ab180fb7bf..c40474be0a 100644 --- a/components/button/style/index.tsx +++ b/components/button/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken } from '../../theme'; import genGroupStyle from './group'; /** Component only token. Which will handle additional calculation of alias token */ diff --git a/components/calendar/style/index.tsx b/components/calendar/style/index.tsx index 8a16dc878b..bddb5c3213 100644 --- a/components/calendar/style/index.tsx +++ b/components/calendar/style/index.tsx @@ -4,8 +4,8 @@ import type { PickerPanelToken } from '../../date-picker/style'; import { genPanelStyle, initPickerPanelToken } from '../../date-picker/style'; import type { InputToken } from '../../input/style'; import { initInputToken } from '../../input/style'; -import type { FullToken } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; export interface ComponentToken { yearControlWidth: number; diff --git a/components/card/style/index.tsx b/components/card/style/index.tsx index 81b448b5c8..4b11809855 100644 --- a/components/card/style/index.tsx +++ b/components/card/style/index.tsx @@ -1,8 +1,8 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { clearFix, genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { clearFix, genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; interface CardToken extends FullToken<'Card'> { cardShadow: string; diff --git a/components/carousel/style/index.tsx b/components/carousel/style/index.tsx index 92e2c1f80a..4af26abad5 100644 --- a/components/carousel/style/index.tsx +++ b/components/carousel/style/index.tsx @@ -1,6 +1,6 @@ // deps-lint-skip-all -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; -import type { GenerateStyle, FullToken } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; export interface ComponentToken { dotWidth: number; diff --git a/components/cascader/style/index.tsx b/components/cascader/style/index.tsx index ffebb66416..e91db4b9ad 100644 --- a/components/cascader/style/index.tsx +++ b/components/cascader/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import { getStyle as getCheckboxStyle } from '../../checkbox/style'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook } from '../../theme'; export interface ComponentToken { controlWidth: number; diff --git a/components/checkbox/style/index.tsx b/components/checkbox/style/index.tsx index 79a376ecdd..1edec662c3 100644 --- a/components/checkbox/style/index.tsx +++ b/components/checkbox/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import { Keyframes } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; export interface ComponentToken {} diff --git a/components/collapse/style/index.tsx b/components/collapse/style/index.tsx index f310952505..16d48af980 100644 --- a/components/collapse/style/index.tsx +++ b/components/collapse/style/index.tsx @@ -1,6 +1,6 @@ // deps-lint-skip-all -import type { GenerateStyle, FullToken } from '../../_util/theme'; -import { resetComponent, genComponentStyleHook, mergeToken, resetIcon } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent, resetIcon } from '../../theme'; type CollapseToken = FullToken<'Collapse'> & { collapseContentBg: string; diff --git a/components/config-provider/__tests__/theme.test.tsx b/components/config-provider/__tests__/theme.test.tsx index eedeb99dd6..d246cafc4c 100644 --- a/components/config-provider/__tests__/theme.test.tsx +++ b/components/config-provider/__tests__/theme.test.tsx @@ -3,8 +3,8 @@ import canUseDom from 'rc-util/lib/Dom/canUseDom'; import React from 'react'; import ConfigProvider from '..'; import { render } from '../../../tests/utils'; -import { useToken } from '../../_util/theme'; -import darkDerivative from '../../_util/theme/themes/dark'; +import { useToken } from '../../theme'; +import darkDerivative from '../../theme/themes/dark'; import { resetWarned } from '../../_util/warning'; let mockCanUseDom = true; diff --git a/components/config-provider/__tests__/token.test.tsx b/components/config-provider/__tests__/token.test.tsx index c45fe64367..1add605cbc 100644 --- a/components/config-provider/__tests__/token.test.tsx +++ b/components/config-provider/__tests__/token.test.tsx @@ -2,8 +2,8 @@ import classNames from 'classnames'; import React from 'react'; import ConfigProvider from '..'; import { render } from '../../../tests/utils'; -import type { AliasToken } from '../../_util/theme'; -import type { UseCustomStyle, UseToken } from '../../_util/theme/util/useStyle'; +import type { AliasToken } from '../../theme'; +import type { UseCustomStyle, UseToken } from '../../theme/util/useStyle'; const { useCustomToken, useStyle, useCustomStyle } = ConfigProvider; diff --git a/components/config-provider/context.tsx b/components/config-provider/context.tsx index 4be1be4383..d566a0a0a3 100644 --- a/components/config-provider/context.tsx +++ b/components/config-provider/context.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import type { RequiredMark } from '../form/Form'; import type { Locale } from '../locale-provider'; -import type { MapToken, OverrideToken, SeedToken } from '../_util/theme/interface'; +import type { MapToken, OverrideToken, SeedToken } from '../theme/interface'; import type { RenderEmptyHandler } from './defaultRenderEmpty'; import type { SizeType } from './SizeContext'; diff --git a/components/config-provider/hooks/useTheme.ts b/components/config-provider/hooks/useTheme.ts index 9f9734a990..704408e9e1 100644 --- a/components/config-provider/hooks/useTheme.ts +++ b/components/config-provider/hooks/useTheme.ts @@ -1,6 +1,6 @@ import useMemo from 'rc-util/lib/hooks/useMemo'; import shallowEqual from 'shallowequal'; -import type { OverrideToken } from '../../_util/theme/interface'; +import type { OverrideToken } from '../../theme/interface'; import type { ThemeConfig } from '../context'; export default function useTheme( diff --git a/components/config-provider/index.tsx b/components/config-provider/index.tsx index 8f2b0fbb55..2c5f4c5fa5 100644 --- a/components/config-provider/index.tsx +++ b/components/config-provider/index.tsx @@ -8,9 +8,9 @@ import type { Locale } from '../locale-provider'; import LocaleProvider, { ANT_MARK } from '../locale-provider'; import LocaleReceiver from '../locale-provider/LocaleReceiver'; import defaultLocale from '../locale/default'; -import { DesignTokenContext, useCustomToken, useToken } from '../_util/theme'; -import defaultSeedToken from '../_util/theme/themes/seed'; -import { useCustomStyle, useStyle } from '../_util/theme/util/useStyle'; +import { DesignTokenContext, useCustomToken, useToken } from '../theme'; +import defaultSeedToken from '../theme/themes/seed'; +import { useCustomStyle, useStyle } from '../theme/util/useStyle'; import type { ConfigConsumerProps, CSPConfig, DirectionType, Theme, ThemeConfig } from './context'; import { ConfigConsumer, ConfigContext, defaultIconPrefixCls } from './context'; import { registerTheme } from './cssVariables'; diff --git a/components/date-picker/style/index.tsx b/components/date-picker/style/index.tsx index e8caea73dc..1ddd5206fb 100644 --- a/components/date-picker/style/index.tsx +++ b/components/date-picker/style/index.tsx @@ -9,10 +9,10 @@ import { initInputToken, } from '../../input/style'; import { slideDownIn, slideDownOut, slideUpIn, slideUpOut } from '../../style/motion'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent, roundedArrow } from '../../_util/theme'; -import type { GlobalToken } from '../../_util/theme/interface'; -import type { TokenWithCommonCls } from '../../_util/theme/util/genComponentStyleHook'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent, roundedArrow } from '../../theme'; +import type { GlobalToken } from '../../theme/interface'; +import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook'; export interface ComponentToken { zIndexPopup: number; diff --git a/components/descriptions/style/index.tsx b/components/descriptions/style/index.tsx index 13fb884309..c877957395 100644 --- a/components/descriptions/style/index.tsx +++ b/components/descriptions/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; interface DescriptionsToken extends FullToken<'Descriptions'> { descriptionsTitleMarginBottom: number; diff --git a/components/divider/style/index.tsx b/components/divider/style/index.tsx index 97cab3d02c..89c924c9f9 100644 --- a/components/divider/style/index.tsx +++ b/components/divider/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle, FullToken } from '../../_util/theme'; -import { resetComponent, genComponentStyleHook, mergeToken } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; /** Component only token. Which will handle additional calculation of alias token */ export interface ComponentToken { diff --git a/components/drawer/style/index.tsx b/components/drawer/style/index.tsx index e76d589f33..1f7912ebc6 100644 --- a/components/drawer/style/index.tsx +++ b/components/drawer/style/index.tsx @@ -1,8 +1,8 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; import { Keyframes } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken } from '../../theme'; export interface DrawerToken extends FullToken<'Drawer'> { drawerFooterPaddingVertical: number; diff --git a/components/dropdown/style/button.tsx b/components/dropdown/style/button.tsx index 661517d1cd..6a8e63b463 100644 --- a/components/dropdown/style/button.tsx +++ b/components/dropdown/style/button.tsx @@ -1,5 +1,5 @@ import type { DropdownToken } from '.'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; const genButtonStyle: GenerateStyle = token => { const { componentCls, antCls, paddingXS, opacityLoading } = token; diff --git a/components/dropdown/style/index.tsx b/components/dropdown/style/index.tsx index 7f38c59007..6c36ea51ab 100644 --- a/components/dropdown/style/index.tsx +++ b/components/dropdown/style/index.tsx @@ -7,8 +7,8 @@ import { slideUpIn, slideUpOut, } from '../../style/motion'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent, roundedArrow } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent, roundedArrow } from '../../theme'; import genButtonStyle from './button'; import genStatusStyle from './status'; diff --git a/components/dropdown/style/status.tsx b/components/dropdown/style/status.tsx index da60ffaffc..9d217c5324 100644 --- a/components/dropdown/style/status.tsx +++ b/components/dropdown/style/status.tsx @@ -1,5 +1,5 @@ -import type { GenerateStyle } from '../../_util/theme'; import type { DropdownToken } from '.'; +import type { GenerateStyle } from '../../theme'; const genStatusStyle: GenerateStyle = token => { const { componentCls, menuCls, colorError, colorTextLightSolid } = token; diff --git a/components/empty/style/index.tsx b/components/empty/style/index.tsx index bfb9ce01c0..57d1548c7c 100644 --- a/components/empty/style/index.tsx +++ b/components/empty/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken } from '../../theme'; /** Component only token. Which will handle additional calculation of alias token */ export interface ComponentToken {} diff --git a/components/form/style/index.tsx b/components/form/style/index.tsx index c1b176420b..ff5e8f59ba 100644 --- a/components/form/style/index.tsx +++ b/components/form/style/index.tsx @@ -1,8 +1,8 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; import { zoomIn } from '../../style/motion'; -import type { AliasToken, FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { AliasToken, FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; interface FormToken extends FullToken<'Form'> { formItemCls: string; diff --git a/components/grid/style/index.tsx b/components/grid/style/index.tsx index 7c28449b84..1f6401775e 100644 --- a/components/grid/style/index.tsx +++ b/components/grid/style/index.tsx @@ -3,8 +3,8 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken } from '../../theme'; interface GridRowToken extends FullToken<'Grid'> {} diff --git a/components/image/style/index.tsx b/components/image/style/index.tsx index bca7854f71..63f2bb3649 100644 --- a/components/image/style/index.tsx +++ b/components/image/style/index.tsx @@ -3,8 +3,8 @@ import type { CSSObject } from '@ant-design/cssinjs'; import { TinyColor } from '@ctrl/tinycolor'; import { genModalMaskStyle } from '../../modal/style'; import { initZoomMotion } from '../../style/motion'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; export interface ComponentToken { zIndexPopup: number; diff --git a/components/input-number/style/index.tsx b/components/input-number/style/index.tsx index 824307662d..d989f512ad 100644 --- a/components/input-number/style/index.tsx +++ b/components/input-number/style/index.tsx @@ -10,8 +10,8 @@ import { genStatusStyle, initInputToken, } from '../../input/style'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, resetComponent, resetIcon } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, resetComponent, resetIcon } from '../../theme'; export interface ComponentToken { controlWidth: number; diff --git a/components/input/style/index.tsx b/components/input/style/index.tsx index d2e5324723..86f89ae496 100644 --- a/components/input/style/index.tsx +++ b/components/input/style/index.tsx @@ -1,8 +1,8 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { clearFix, genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; -import type { GlobalToken } from '../../_util/theme/interface'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { clearFix, genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; +import type { GlobalToken } from '../../theme/interface'; export type InputToken> = T & { inputAffixPadding: number; diff --git a/components/layout/style/index.tsx b/components/layout/style/index.tsx index f44a99b531..115a288ca6 100644 --- a/components/layout/style/index.tsx +++ b/components/layout/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import { genComponentStyleHook, mergeToken } from '../../_util/theme'; -import type { GenerateStyle, FullToken } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken } from '../../theme'; import genLayoutLightStyle from './light'; export interface ComponentToken { diff --git a/components/layout/style/light.ts b/components/layout/style/light.ts index 358cd6eb8e..e9c394895e 100644 --- a/components/layout/style/light.ts +++ b/components/layout/style/light.ts @@ -1,6 +1,6 @@ import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; import type { LayoutToken } from '.'; +import type { GenerateStyle } from '../../theme'; const genLayoutLightStyle: GenerateStyle = token => { const { componentCls, colorBgComponent, colorBgBody, colorText } = token; diff --git a/components/list/style/index.tsx b/components/list/style/index.tsx index 967fe68c1d..e77f040841 100644 --- a/components/list/style/index.tsx +++ b/components/list/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; export interface ComponentToken { contentWidth: number; diff --git a/components/mentions/style/index.tsx b/components/mentions/style/index.tsx index 36ba4b69e7..277c23f7a9 100644 --- a/components/mentions/style/index.tsx +++ b/components/mentions/style/index.tsx @@ -8,8 +8,8 @@ import { genStatusStyle, initInputToken, } from '../../input/style'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, resetComponent } from '../../theme'; export interface ComponentToken { zIndexPopup: number; diff --git a/components/menu/style/horizontal.tsx b/components/menu/style/horizontal.tsx index 403fa09278..a7d92b2f51 100644 --- a/components/menu/style/horizontal.tsx +++ b/components/menu/style/horizontal.tsx @@ -1,5 +1,5 @@ import type { MenuThemeToken } from '.'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; const getHorizontalStyle: GenerateStyle = token => { const { diff --git a/components/menu/style/index.tsx b/components/menu/style/index.tsx index effc03bce8..a765c1bdc9 100644 --- a/components/menu/style/index.tsx +++ b/components/menu/style/index.tsx @@ -1,13 +1,13 @@ // deps-lint-skip-all import { TinyColor } from '@ctrl/tinycolor'; -import type { FullToken, GenerateStyle, UseComponentStyleResult } from '../../_util/theme'; +import type { FullToken, GenerateStyle, UseComponentStyleResult } from '../../theme'; import { clearFix, genComponentStyleHook, mergeToken, resetComponent, resetIcon, -} from '../../_util/theme'; +} from '../../theme'; import getHorizontalStyle from './horizontal'; import getRTLStyle from './rtl'; import getThemeStyle from './theme'; diff --git a/components/menu/style/rtl.tsx b/components/menu/style/rtl.tsx index 16075febcc..bf31b302b3 100644 --- a/components/menu/style/rtl.tsx +++ b/components/menu/style/rtl.tsx @@ -1,5 +1,5 @@ import type { MenuToken } from '.'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; const getRTLStyle: GenerateStyle = ({ componentCls, menuArrowOffset }) => ({ [`${componentCls}-rtl`]: { diff --git a/components/menu/style/vertical.tsx b/components/menu/style/vertical.tsx index eb594032ae..6fe4f09e77 100644 --- a/components/menu/style/vertical.tsx +++ b/components/menu/style/vertical.tsx @@ -1,6 +1,6 @@ import type { CSSObject } from '@ant-design/cssinjs'; import type { MenuThemeToken } from '.'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; const getVerticalInlineStyle: GenerateStyle = token => { const { componentCls, menuItemHeight, marginXS, padding, marginXXS, menuArrowSize, fontSize } = diff --git a/components/message/style/index.tsx b/components/message/style/index.tsx index 6904e52abe..5b9f0feba2 100644 --- a/components/message/style/index.tsx +++ b/components/message/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import { Keyframes } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; /** Component only token. Which will handle additional calculation of alias token */ export interface ComponentToken { diff --git a/components/modal/style/index.tsx b/components/modal/style/index.tsx index c880192cc8..60bc1de2eb 100644 --- a/components/modal/style/index.tsx +++ b/components/modal/style/index.tsx @@ -1,9 +1,9 @@ // deps-lint-skip-all import type React from 'react'; import { initFadeMotion, initZoomMotion } from '../../style/motion'; -import type { AliasToken, FullToken, GenerateStyle } from '../../_util/theme'; -import { clearFix, genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; -import type { TokenWithCommonCls } from '../../_util/theme/util/genComponentStyleHook'; +import type { AliasToken, FullToken, GenerateStyle } from '../../theme'; +import { clearFix, genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; +import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook'; /** Component only token. Which will handle additional calculation of alias token */ export interface ComponentToken { diff --git a/components/notification/style/index.tsx b/components/notification/style/index.tsx index 5a6408c8f2..0fb92b2fac 100644 --- a/components/notification/style/index.tsx +++ b/components/notification/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import { Keyframes } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; import genNotificationPlacementStyle from './placement'; /** Component only token. Which will handle additional calculation of alias token */ diff --git a/components/notification/style/placement.ts b/components/notification/style/placement.ts index fa177f8ebe..331d647ee3 100644 --- a/components/notification/style/placement.ts +++ b/components/notification/style/placement.ts @@ -1,7 +1,7 @@ import type { CSSObject } from '@ant-design/cssinjs'; import { Keyframes } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; import type { NotificationToken } from '.'; +import type { GenerateStyle } from '../../theme'; const genNotificationPlacementStyle: GenerateStyle = token => { const { componentCls, width, notificationMarginEdge } = token; diff --git a/components/pagination/style/index.tsx b/components/pagination/style/index.tsx index 95b1b32e89..91521059ee 100644 --- a/components/pagination/style/index.tsx +++ b/components/pagination/style/index.tsx @@ -6,8 +6,8 @@ import { initInputToken, type InputToken, } from '../../input/style'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; interface PaginationToken extends InputToken> { paginationItemSize: number; diff --git a/components/popconfirm/style/index.tsx b/components/popconfirm/style/index.tsx index 30f957101e..2d1682ab90 100644 --- a/components/popconfirm/style/index.tsx +++ b/components/popconfirm/style/index.tsx @@ -1,6 +1,6 @@ // deps-lint-skip-all -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook } from '../../theme'; export interface ComponentToken { zIndexPopup: number; diff --git a/components/popover/style/index.tsx b/components/popover/style/index.tsx index 606a06ab03..e5daadbfbe 100644 --- a/components/popover/style/index.tsx +++ b/components/popover/style/index.tsx @@ -1,13 +1,13 @@ // deps-lint-skip-all import { initZoomMotion } from '../../style/motion'; -import type { FullToken, GenerateStyle, PresetColorType } from '../../_util/theme'; +import type { FullToken, GenerateStyle, PresetColorType } from '../../theme'; import { genComponentStyleHook, getArrowStyle, mergeToken, PresetColors, resetComponent, -} from '../../_util/theme'; +} from '../../theme'; export interface ComponentToken { zIndexPopup: number; diff --git a/components/progress/style/index.tsx b/components/progress/style/index.tsx index 72437df6fc..8c0bf482cf 100644 --- a/components/progress/style/index.tsx +++ b/components/progress/style/index.tsx @@ -1,8 +1,8 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; import { Keyframes } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; export interface ComponentToken {} diff --git a/components/radio/style/index.tsx b/components/radio/style/index.tsx index 31aae616b2..ed6549a9ce 100644 --- a/components/radio/style/index.tsx +++ b/components/radio/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import { Keyframes } from '@ant-design/cssinjs'; -import { resetComponent, genComponentStyleHook, mergeToken } from '../../_util/theme'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; // ============================== Tokens ============================== export interface ComponentToken {} diff --git a/components/rate/style/index.tsx b/components/rate/style/index.tsx index 8b624015ee..858f88d3da 100644 --- a/components/rate/style/index.tsx +++ b/components/rate/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; export type ComponentToken = {}; diff --git a/components/result/style/index.tsx b/components/result/style/index.tsx index 7fccf2749a..71f0e57c85 100644 --- a/components/result/style/index.tsx +++ b/components/result/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle, FullToken } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken } from '../../theme'; export interface ComponentToken { imageWidth: number; diff --git a/components/segmented/style/index.tsx b/components/segmented/style/index.tsx index 3ea48b48e8..a5d0003049 100644 --- a/components/segmented/style/index.tsx +++ b/components/segmented/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; export interface ComponentToken { // FIXME: need to be removed diff --git a/components/select/style/dropdown.tsx b/components/select/style/dropdown.tsx index ec009d228e..7eec1ced7b 100644 --- a/components/select/style/dropdown.tsx +++ b/components/select/style/dropdown.tsx @@ -8,8 +8,8 @@ import { slideUpIn, slideUpOut, } from '../../style/motion'; -import type { GenerateStyle } from '../../_util/theme'; -import { resetComponent } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; +import { resetComponent } from '../../theme'; const genItemStyle: GenerateStyle = token => { const { controlPaddingHorizontal } = token; diff --git a/components/select/style/index.tsx b/components/select/style/index.tsx index da91225c9b..41bd871a4c 100644 --- a/components/select/style/index.tsx +++ b/components/select/style/index.tsx @@ -6,8 +6,8 @@ import '../../empty/style'; // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent, resetIcon } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent, resetIcon } from '../../theme'; import genDropdownStyle from './dropdown'; import genMultipleStyle from './multiple'; import genSingleStyle from './single'; diff --git a/components/select/style/multiple.tsx b/components/select/style/multiple.tsx index 9b5878dbdc..70e1f6ffee 100644 --- a/components/select/style/multiple.tsx +++ b/components/select/style/multiple.tsx @@ -1,6 +1,6 @@ import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs'; import type { SelectToken } from '.'; -import { mergeToken, resetIcon } from '../../_util/theme'; +import { mergeToken, resetIcon } from '../../theme'; const FIXED_ITEM_MARGIN = 2; diff --git a/components/select/style/single.tsx b/components/select/style/single.tsx index 4b4c10b13d..183f97548b 100644 --- a/components/select/style/single.tsx +++ b/components/select/style/single.tsx @@ -1,6 +1,6 @@ import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs'; import type { SelectToken } from '.'; -import { mergeToken } from '../../_util/theme'; +import { mergeToken } from '../../theme'; function genSizeStyle(token: SelectToken, suffix?: string): CSSObject { const { componentCls, inputPaddingHorizontalBase } = token; diff --git a/components/skeleton/style/index.tsx b/components/skeleton/style/index.tsx index ae7cff45f6..7f4bd37839 100644 --- a/components/skeleton/style/index.tsx +++ b/components/skeleton/style/index.tsx @@ -1,8 +1,8 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; import { Keyframes } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken } from '../../theme'; export type ComponentToken = { color: string; diff --git a/components/slider/style/index.tsx b/components/slider/style/index.tsx index 45b4d4b5fe..fe50c05bf1 100644 --- a/components/slider/style/index.tsx +++ b/components/slider/style/index.tsx @@ -2,8 +2,8 @@ import type { CSSObject } from '@ant-design/cssinjs'; import { TinyColor } from '@ctrl/tinycolor'; import type * as React from 'react'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; // Direction naming standard: // Horizontal base: diff --git a/components/space/style/index.tsx b/components/space/style/index.tsx index 0017564cce..afbdc4e29a 100644 --- a/components/space/style/index.tsx +++ b/components/space/style/index.tsx @@ -1,6 +1,6 @@ // deps-lint-skip-all -import { genComponentStyleHook } from '../../_util/theme'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook } from '../../theme'; /** Component only token. Which will handle additional calculation of alias token */ export interface ComponentToken { diff --git a/components/spin/style/index.tsx b/components/spin/style/index.tsx index 2fefee4a39..fd9236df75 100644 --- a/components/spin/style/index.tsx +++ b/components/spin/style/index.tsx @@ -1,8 +1,8 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; import { Keyframes } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; export interface ComponentToken { contentHeight: number; diff --git a/components/statistic/style/index.tsx b/components/statistic/style/index.tsx index 14a41b91c8..d15cb3f5b1 100644 --- a/components/statistic/style/index.tsx +++ b/components/statistic/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle, FullToken } from '../../_util/theme'; -import { resetComponent, genComponentStyleHook, mergeToken } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; interface StatisticToken extends FullToken<'Statistic'> { statisticTitleFontSize: number; diff --git a/components/steps/style/custom-icon.ts b/components/steps/style/custom-icon.ts index cfe8c26221..b5a16be3ec 100644 --- a/components/steps/style/custom-icon.ts +++ b/components/steps/style/custom-icon.ts @@ -1,6 +1,6 @@ import type { CSSObject } from '@ant-design/cssinjs'; import type { StepsToken } from '.'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; const genStepsCustomIconStyle: GenerateStyle = token => { const { diff --git a/components/steps/style/index.tsx b/components/steps/style/index.tsx index 7e0a06e1ec..b3f754e26e 100644 --- a/components/steps/style/index.tsx +++ b/components/steps/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; import genStepsCustomIconStyle from './custom-icon'; import genStepsLabelPlacementStyle from './label-placement'; import genStepsNavStyle from './nav'; diff --git a/components/steps/style/label-placement.ts b/components/steps/style/label-placement.ts index 37bc915926..847db2113d 100644 --- a/components/steps/style/label-placement.ts +++ b/components/steps/style/label-placement.ts @@ -1,6 +1,6 @@ import type { CSSObject } from '@ant-design/cssinjs'; import type { StepsToken } from '.'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; const genStepsLabelPlacementStyle: GenerateStyle = token => { const { componentCls, stepsIconSize, lineHeight, stepsSmallIconSize } = token; diff --git a/components/steps/style/nav.ts b/components/steps/style/nav.ts index 98e7602346..c2194c1fe5 100644 --- a/components/steps/style/nav.ts +++ b/components/steps/style/nav.ts @@ -1,6 +1,6 @@ import type { CSSObject } from '@ant-design/cssinjs'; import type { StepsToken } from '.'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; const genStepsNavStyle: GenerateStyle = token => { const { diff --git a/components/steps/style/progress-dot.ts b/components/steps/style/progress-dot.ts index 124892681e..8a0b508b6b 100644 --- a/components/steps/style/progress-dot.ts +++ b/components/steps/style/progress-dot.ts @@ -1,6 +1,6 @@ import type { CSSObject } from '@ant-design/cssinjs'; import type { StepsToken } from '.'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; const genStepsProgressDotStyle: GenerateStyle = token => { const { diff --git a/components/steps/style/progress.ts b/components/steps/style/progress.ts index 2c2e36c8b8..5cb1cd6919 100644 --- a/components/steps/style/progress.ts +++ b/components/steps/style/progress.ts @@ -1,6 +1,6 @@ import type { CSSObject } from '@ant-design/cssinjs'; import type { StepsToken } from '.'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; const genStepsProgressStyle: GenerateStyle = token => { const { antCls, componentCls } = token; diff --git a/components/steps/style/rtl.ts b/components/steps/style/rtl.ts index 71aed740a3..eaae738b46 100644 --- a/components/steps/style/rtl.ts +++ b/components/steps/style/rtl.ts @@ -1,6 +1,6 @@ import type { CSSObject } from '@ant-design/cssinjs'; import type { StepsToken } from '.'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; const genStepsRTLStyle: GenerateStyle = token => { const { componentCls } = token; diff --git a/components/steps/style/small.ts b/components/steps/style/small.ts index e245f7b90c..2c12c6c8fd 100644 --- a/components/steps/style/small.ts +++ b/components/steps/style/small.ts @@ -1,6 +1,6 @@ import type { CSSObject } from '@ant-design/cssinjs'; import type { StepsToken } from '.'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; const genStepsSmallStyle: GenerateStyle = token => { const { diff --git a/components/steps/style/vertical.ts b/components/steps/style/vertical.ts index 61501ce158..f9b3c31497 100644 --- a/components/steps/style/vertical.ts +++ b/components/steps/style/vertical.ts @@ -1,6 +1,6 @@ import type { CSSObject } from '@ant-design/cssinjs'; import type { StepsToken } from '.'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; const genStepsVerticalStyle: GenerateStyle = token => { const { componentCls, stepsSmallIconSize, stepsIconSize } = token; diff --git a/components/style/motion/fade.tsx b/components/style/motion/fade.tsx index ffc6f59ac6..b68a1d067a 100644 --- a/components/style/motion/fade.tsx +++ b/components/style/motion/fade.tsx @@ -1,7 +1,7 @@ import type { CSSInterpolation } from '@ant-design/cssinjs'; import { Keyframes } from '@ant-design/cssinjs'; -import type { AliasToken } from '../../_util/theme'; -import type { TokenWithCommonCls } from '../../_util/theme/util/genComponentStyleHook'; +import type { AliasToken } from '../../theme'; +import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook'; import { initMotion } from './motion'; export const fadeIn = new Keyframes('antFadeIn', { diff --git a/components/style/motion/move.tsx b/components/style/motion/move.tsx index aea475e171..3090677f55 100644 --- a/components/style/motion/move.tsx +++ b/components/style/motion/move.tsx @@ -1,7 +1,7 @@ import type { CSSInterpolation } from '@ant-design/cssinjs'; import { Keyframes } from '@ant-design/cssinjs'; -import type { AliasToken } from '../../_util/theme'; -import type { TokenWithCommonCls } from '../../_util/theme/util/genComponentStyleHook'; +import type { AliasToken } from '../../theme'; +import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook'; import { initMotion } from './motion'; export const moveDownIn = new Keyframes('antMoveDownIn', { diff --git a/components/style/motion/slide.tsx b/components/style/motion/slide.tsx index f90b355360..bb0512428c 100644 --- a/components/style/motion/slide.tsx +++ b/components/style/motion/slide.tsx @@ -1,7 +1,7 @@ import type { CSSInterpolation } from '@ant-design/cssinjs'; import { Keyframes } from '@ant-design/cssinjs'; -import type { AliasToken } from '../../_util/theme'; -import type { TokenWithCommonCls } from '../../_util/theme/util/genComponentStyleHook'; +import type { AliasToken } from '../../theme'; +import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook'; import { initMotion } from './motion'; export const slideUpIn = new Keyframes('antSlideUpIn', { diff --git a/components/style/motion/zoom.tsx b/components/style/motion/zoom.tsx index 11624c8461..6a67fb3b44 100644 --- a/components/style/motion/zoom.tsx +++ b/components/style/motion/zoom.tsx @@ -1,7 +1,7 @@ import type { CSSInterpolation } from '@ant-design/cssinjs'; import { Keyframes } from '@ant-design/cssinjs'; -import type { AliasToken } from '../../_util/theme'; -import type { TokenWithCommonCls } from '../../_util/theme/util/genComponentStyleHook'; +import type { AliasToken } from '../../theme'; +import type { TokenWithCommonCls } from '../../theme/util/genComponentStyleHook'; import { initMotion } from './motion'; export const zoomIn = new Keyframes('antZoomIn', { diff --git a/components/switch/style/index.tsx b/components/switch/style/index.tsx index 959afdf2d1..354aaa6e1c 100644 --- a/components/switch/style/index.tsx +++ b/components/switch/style/index.tsx @@ -1,8 +1,8 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; import { TinyColor } from '@ctrl/tinycolor'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; interface SwitchToken extends FullToken<'Switch'> { switchMinWidth: number; diff --git a/components/table/style/bordered.tsx b/components/table/style/bordered.tsx index df10276b95..93a180ec36 100644 --- a/components/table/style/bordered.tsx +++ b/components/table/style/bordered.tsx @@ -1,5 +1,5 @@ import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; import type { TableToken } from './index'; const genBorderedStyle: GenerateStyle = token => { diff --git a/components/table/style/ellipsis.tsx b/components/table/style/ellipsis.tsx index 6607727b27..78faf32ec5 100644 --- a/components/table/style/ellipsis.tsx +++ b/components/table/style/ellipsis.tsx @@ -1,5 +1,5 @@ import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; import type { TableToken } from './index'; const genEllipsisStyle: GenerateStyle = token => { diff --git a/components/table/style/empty.tsx b/components/table/style/empty.tsx index abe001841c..5755eaed70 100644 --- a/components/table/style/empty.tsx +++ b/components/table/style/empty.tsx @@ -1,5 +1,5 @@ import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; import type { TableToken } from './index'; // ========================= Placeholder ========================== diff --git a/components/table/style/expand.tsx b/components/table/style/expand.tsx index 30fcdf0eca..70cf9f5c67 100644 --- a/components/table/style/expand.tsx +++ b/components/table/style/expand.tsx @@ -1,6 +1,6 @@ import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; -import { operationUnit } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; +import { operationUnit } from '../../theme'; import type { TableToken } from './index'; const genExpandStyle: GenerateStyle = token => { diff --git a/components/table/style/filter.tsx b/components/table/style/filter.tsx index abd504ef89..f98b6c4488 100644 --- a/components/table/style/filter.tsx +++ b/components/table/style/filter.tsx @@ -1,6 +1,6 @@ import type { CSSInterpolation } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; -import { resetComponent } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; +import { resetComponent } from '../../theme'; import type { TableToken } from './index'; const genFilterStyle: GenerateStyle = token => { diff --git a/components/table/style/fixed.tsx b/components/table/style/fixed.tsx index 02502b5bfa..9e9bf8e628 100644 --- a/components/table/style/fixed.tsx +++ b/components/table/style/fixed.tsx @@ -1,5 +1,5 @@ import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; import type { TableToken } from './index'; const genFixedStyle: GenerateStyle = token => { diff --git a/components/table/style/index.tsx b/components/table/style/index.tsx index beaa0b7524..1b55d9c59e 100644 --- a/components/table/style/index.tsx +++ b/components/table/style/index.tsx @@ -1,8 +1,8 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; import { TinyColor } from '@ctrl/tinycolor'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { clearFix, genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { clearFix, genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; import genBorderedStyle from './bordered'; import genEllipsisStyle from './ellipsis'; import genEmptyStyle from './empty'; diff --git a/components/table/style/pagination.tsx b/components/table/style/pagination.tsx index 2a63e8e7d4..5f55c471b4 100644 --- a/components/table/style/pagination.tsx +++ b/components/table/style/pagination.tsx @@ -1,5 +1,5 @@ import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; import type { TableToken } from './index'; const genPaginationStyle: GenerateStyle = token => { diff --git a/components/table/style/radius.tsx b/components/table/style/radius.tsx index 799a482900..5bba6307a2 100644 --- a/components/table/style/radius.tsx +++ b/components/table/style/radius.tsx @@ -1,5 +1,5 @@ import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; import type { TableToken } from './index'; const genRadiusStyle: GenerateStyle = token => { diff --git a/components/table/style/rtl.tsx b/components/table/style/rtl.tsx index b2252c28c5..04003dc648 100644 --- a/components/table/style/rtl.tsx +++ b/components/table/style/rtl.tsx @@ -1,5 +1,5 @@ import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; import type { TableToken } from './index'; const genStyle: GenerateStyle = token => { diff --git a/components/table/style/selection.tsx b/components/table/style/selection.tsx index 4a409df917..fb49ead99d 100644 --- a/components/table/style/selection.tsx +++ b/components/table/style/selection.tsx @@ -1,5 +1,5 @@ import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; import type { TableToken } from './index'; const genSelectionStyle: GenerateStyle = token => { diff --git a/components/table/style/size.tsx b/components/table/style/size.tsx index 49206dbedc..4d2a26970d 100644 --- a/components/table/style/size.tsx +++ b/components/table/style/size.tsx @@ -1,5 +1,5 @@ import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; import type { TableToken } from './index'; const genSizeStyle: GenerateStyle = token => { diff --git a/components/table/style/sorter.tsx b/components/table/style/sorter.tsx index 8c89dfbe58..060a86df43 100644 --- a/components/table/style/sorter.tsx +++ b/components/table/style/sorter.tsx @@ -1,5 +1,5 @@ import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; import type { TableToken } from './index'; const genSorterStyle: GenerateStyle = token => { diff --git a/components/table/style/sticky.tsx b/components/table/style/sticky.tsx index 9a351ac3e2..dee67ea41a 100644 --- a/components/table/style/sticky.tsx +++ b/components/table/style/sticky.tsx @@ -1,5 +1,5 @@ import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; import type { TableToken } from './index'; const genStickyStyle: GenerateStyle = token => { diff --git a/components/table/style/summary.tsx b/components/table/style/summary.tsx index 69a298fbd5..29d1fedf6c 100644 --- a/components/table/style/summary.tsx +++ b/components/table/style/summary.tsx @@ -1,5 +1,5 @@ import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; import type { TableToken } from './index'; const genSummaryStyle: GenerateStyle = token => { diff --git a/components/tabs/style/index.tsx b/components/tabs/style/index.tsx index 2c4f8c8d7d..915c2fd963 100644 --- a/components/tabs/style/index.tsx +++ b/components/tabs/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; export interface ComponentToken { zIndexPopup: number; diff --git a/components/tag/style/index.tsx b/components/tag/style/index.tsx index cbbd661b4e..40a15633f6 100644 --- a/components/tag/style/index.tsx +++ b/components/tag/style/index.tsx @@ -1,8 +1,8 @@ // deps-lint-skip-all import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs'; +import type { FullToken, PresetColorType } from '../../theme'; +import { genComponentStyleHook, mergeToken, PresetColors, resetComponent } from '../../theme'; import capitalize from '../../_util/capitalize'; -import type { FullToken, PresetColorType } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, PresetColors, resetComponent } from '../../_util/theme'; interface TagToken extends FullToken<'Tag'> { tagFontSize: number; diff --git a/components/_util/theme/index.tsx b/components/theme/index.tsx similarity index 97% rename from components/_util/theme/index.tsx rename to components/theme/index.tsx index fbdbf15f2f..e57337ae42 100644 --- a/components/_util/theme/index.tsx +++ b/components/theme/index.tsx @@ -1,8 +1,8 @@ import type { CSSInterpolation } from '@ant-design/cssinjs'; import { Theme, useCacheToken, useStyleRegister } from '@ant-design/cssinjs'; import React from 'react'; -import version from '../../version'; -import type { DeepPartial } from '../type'; +import version from '../version'; +import type { DeepPartial } from '../_util/type'; import type { AliasToken, GlobalToken, diff --git a/components/_util/theme/interface.ts b/components/theme/interface.ts similarity index 87% rename from components/_util/theme/interface.ts rename to components/theme/interface.ts index c252d906b4..a0b941ae36 100644 --- a/components/_util/theme/interface.ts +++ b/components/theme/interface.ts @@ -1,47 +1,47 @@ import type * as React from 'react'; -import type { ComponentToken as AlertComponentToken } from '../../alert/style'; -import type { ComponentToken as AnchorComponentToken } from '../../anchor/style'; -import type { ComponentToken as AvatarComponentToken } from '../../avatar/style'; -import type { ComponentToken as BackTopComponentToken } from '../../back-top/style'; -import type { ComponentToken as ButtonComponentToken } from '../../button/style'; -import type { ComponentToken as CalendarComponentToken } from '../../calendar/style'; -import type { ComponentToken as CarouselComponentToken } from '../../carousel/style'; -import type { ComponentToken as CascaderComponentToken } from '../../cascader/style'; -import type { ComponentToken as CheckboxComponentToken } from '../../checkbox/style'; -import type { ComponentToken as DatePickerComponentToken } from '../../date-picker/style'; -import type { ComponentToken as DividerComponentToken } from '../../divider/style'; -import type { ComponentToken as DropdownComponentToken } from '../../dropdown/style'; -import type { ComponentToken as EmptyComponentToken } from '../../empty/style'; -import type { ComponentToken as ImageComponentToken } from '../../image/style'; -import type { ComponentToken as InputNumberComponentToken } from '../../input-number/style'; -import type { ComponentToken as LayoutComponentToken } from '../../layout/style'; -import type { ComponentToken as ListComponentToken } from '../../list/style'; -import type { ComponentToken as MentionsComponentToken } from '../../mentions/style'; -import type { ComponentToken as MenuComponentToken } from '../../menu/style'; -import type { ComponentToken as MessageComponentToken } from '../../message/style'; -import type { ComponentToken as ModalComponentToken } from '../../modal/style'; -import type { ComponentToken as NotificationComponentToken } from '../../notification/style'; -import type { ComponentToken as PopconfirmComponentToken } from '../../popconfirm/style'; -import type { ComponentToken as PopoverComponentToken } from '../../popover/style'; -import type { ComponentToken as ProgressComponentToken } from '../../progress/style'; -import type { ComponentToken as RadioComponentToken } from '../../radio/style'; -import type { ComponentToken as RateComponentToken } from '../../rate/style'; -import type { ComponentToken as ResultComponentToken } from '../../result/style'; -import type { ComponentToken as SegmentedComponentToken } from '../../segmented/style'; -import type { ComponentToken as SelectComponentToken } from '../../select/style'; -import type { ComponentToken as SkeletonComponentToken } from '../../skeleton/style'; -import type { ComponentToken as SliderComponentToken } from '../../slider/style'; -import type { ComponentToken as SpaceComponentToken } from '../../space/style'; -import type { ComponentToken as SpinComponentToken } from '../../spin/style'; -import type { ComponentToken as StepsComponentToken } from '../../steps/style'; -import type { ComponentToken as TableComponentToken } from '../../table/style'; -import type { ComponentToken as TabsComponentToken } from '../../tabs/style'; -import type { ComponentToken as TimelineComponentToken } from '../../timeline/style'; -import type { ComponentToken as TooltipComponentToken } from '../../tooltip/style'; -import type { ComponentToken as TransferComponentToken } from '../../transfer/style'; -import type { ComponentToken as TypographyComponentToken } from '../../typography/style'; -import type { ComponentToken as UploadComponentToken } from '../../upload/style'; -import type { DeepPartial } from '../type'; +import type { ComponentToken as AlertComponentToken } from '../alert/style'; +import type { ComponentToken as AnchorComponentToken } from '../anchor/style'; +import type { ComponentToken as AvatarComponentToken } from '../avatar/style'; +import type { ComponentToken as BackTopComponentToken } from '../back-top/style'; +import type { ComponentToken as ButtonComponentToken } from '../button/style'; +import type { ComponentToken as CalendarComponentToken } from '../calendar/style'; +import type { ComponentToken as CarouselComponentToken } from '../carousel/style'; +import type { ComponentToken as CascaderComponentToken } from '../cascader/style'; +import type { ComponentToken as CheckboxComponentToken } from '../checkbox/style'; +import type { ComponentToken as DatePickerComponentToken } from '../date-picker/style'; +import type { ComponentToken as DividerComponentToken } from '../divider/style'; +import type { ComponentToken as DropdownComponentToken } from '../dropdown/style'; +import type { ComponentToken as EmptyComponentToken } from '../empty/style'; +import type { ComponentToken as ImageComponentToken } from '../image/style'; +import type { ComponentToken as InputNumberComponentToken } from '../input-number/style'; +import type { ComponentToken as LayoutComponentToken } from '../layout/style'; +import type { ComponentToken as ListComponentToken } from '../list/style'; +import type { ComponentToken as MentionsComponentToken } from '../mentions/style'; +import type { ComponentToken as MenuComponentToken } from '../menu/style'; +import type { ComponentToken as MessageComponentToken } from '../message/style'; +import type { ComponentToken as ModalComponentToken } from '../modal/style'; +import type { ComponentToken as NotificationComponentToken } from '../notification/style'; +import type { ComponentToken as PopconfirmComponentToken } from '../popconfirm/style'; +import type { ComponentToken as PopoverComponentToken } from '../popover/style'; +import type { ComponentToken as ProgressComponentToken } from '../progress/style'; +import type { ComponentToken as RadioComponentToken } from '../radio/style'; +import type { ComponentToken as RateComponentToken } from '../rate/style'; +import type { ComponentToken as ResultComponentToken } from '../result/style'; +import type { ComponentToken as SegmentedComponentToken } from '../segmented/style'; +import type { ComponentToken as SelectComponentToken } from '../select/style'; +import type { ComponentToken as SkeletonComponentToken } from '../skeleton/style'; +import type { ComponentToken as SliderComponentToken } from '../slider/style'; +import type { ComponentToken as SpaceComponentToken } from '../space/style'; +import type { ComponentToken as SpinComponentToken } from '../spin/style'; +import type { ComponentToken as StepsComponentToken } from '../steps/style'; +import type { ComponentToken as TableComponentToken } from '../table/style'; +import type { ComponentToken as TabsComponentToken } from '../tabs/style'; +import type { ComponentToken as TimelineComponentToken } from '../timeline/style'; +import type { ComponentToken as TooltipComponentToken } from '../tooltip/style'; +import type { ComponentToken as TransferComponentToken } from '../transfer/style'; +import type { ComponentToken as TypographyComponentToken } from '../typography/style'; +import type { ComponentToken as UploadComponentToken } from '../upload/style'; +import type { DeepPartial } from '../_util/type'; import type { BgPalettes, TextAlphaPalettes } from './themes/IPalettes'; export const PresetColors = [ diff --git a/components/_util/theme/themes/IPalettes.ts b/components/theme/themes/IPalettes.ts similarity index 100% rename from components/_util/theme/themes/IPalettes.ts rename to components/theme/themes/IPalettes.ts diff --git a/components/_util/theme/themes/dark/colorAlgorithm.ts b/components/theme/themes/dark/colorAlgorithm.ts similarity index 100% rename from components/_util/theme/themes/dark/colorAlgorithm.ts rename to components/theme/themes/dark/colorAlgorithm.ts diff --git a/components/_util/theme/themes/dark/index.ts b/components/theme/themes/dark/index.ts similarity index 100% rename from components/_util/theme/themes/dark/index.ts rename to components/theme/themes/dark/index.ts diff --git a/components/_util/theme/themes/dark/palettes.ts b/components/theme/themes/dark/palettes.ts similarity index 100% rename from components/_util/theme/themes/dark/palettes.ts rename to components/theme/themes/dark/palettes.ts diff --git a/components/_util/theme/themes/default/colorAlgorithm.ts b/components/theme/themes/default/colorAlgorithm.ts similarity index 100% rename from components/_util/theme/themes/default/colorAlgorithm.ts rename to components/theme/themes/default/colorAlgorithm.ts diff --git a/components/_util/theme/themes/default/index.ts b/components/theme/themes/default/index.ts similarity index 100% rename from components/_util/theme/themes/default/index.ts rename to components/theme/themes/default/index.ts diff --git a/components/_util/theme/themes/default/palettes.ts b/components/theme/themes/default/palettes.ts similarity index 100% rename from components/_util/theme/themes/default/palettes.ts rename to components/theme/themes/default/palettes.ts diff --git a/components/_util/theme/themes/seed.ts b/components/theme/themes/seed.ts similarity index 100% rename from components/_util/theme/themes/seed.ts rename to components/theme/themes/seed.ts diff --git a/components/_util/theme/themes/shared.ts b/components/theme/themes/shared.ts similarity index 100% rename from components/_util/theme/themes/shared.ts rename to components/theme/themes/shared.ts diff --git a/components/_util/theme/util/alias.ts b/components/theme/util/alias.ts similarity index 100% rename from components/_util/theme/util/alias.ts rename to components/theme/util/alias.ts diff --git a/components/_util/theme/util/genComponentStyleHook.ts b/components/theme/util/genComponentStyleHook.ts similarity index 97% rename from components/_util/theme/util/genComponentStyleHook.ts rename to components/theme/util/genComponentStyleHook.ts index b1dd9af6bb..b89f68c302 100644 --- a/components/_util/theme/util/genComponentStyleHook.ts +++ b/components/theme/util/genComponentStyleHook.ts @@ -2,7 +2,7 @@ import type { CSSInterpolation } from '@ant-design/cssinjs'; import { useStyleRegister } from '@ant-design/cssinjs'; import { useContext } from 'react'; -import { ConfigContext } from '../../../config-provider/context'; +import { ConfigContext } from '../../config-provider/context'; import type { UseComponentStyleResult } from '../index'; import { mergeToken, statisticToken, useToken } from '../index'; import type { ComponentTokenMap, GlobalToken } from '../interface'; diff --git a/components/_util/theme/util/index.tsx b/components/theme/util/index.tsx similarity index 100% rename from components/_util/theme/util/index.tsx rename to components/theme/util/index.tsx diff --git a/components/_util/theme/util/operationUnit.tsx b/components/theme/util/operationUnit.tsx similarity index 100% rename from components/_util/theme/util/operationUnit.tsx rename to components/theme/util/operationUnit.tsx diff --git a/components/_util/theme/util/placementArrow.tsx b/components/theme/util/placementArrow.tsx similarity index 100% rename from components/_util/theme/util/placementArrow.tsx rename to components/theme/util/placementArrow.tsx diff --git a/components/_util/theme/util/roundedArrow.tsx b/components/theme/util/roundedArrow.tsx similarity index 100% rename from components/_util/theme/util/roundedArrow.tsx rename to components/theme/util/roundedArrow.tsx diff --git a/components/_util/theme/util/statistic.ts b/components/theme/util/statistic.ts similarity index 100% rename from components/_util/theme/util/statistic.ts rename to components/theme/util/statistic.ts diff --git a/components/_util/theme/util/useStyle.tsx b/components/theme/util/useStyle.tsx similarity index 100% rename from components/_util/theme/util/useStyle.tsx rename to components/theme/util/useStyle.tsx diff --git a/components/timeline/style/index.tsx b/components/timeline/style/index.tsx index 4c72a2b1fe..6e9cc8dcd1 100644 --- a/components/timeline/style/index.tsx +++ b/components/timeline/style/index.tsx @@ -1,7 +1,7 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; export interface ComponentToken {} diff --git a/components/tooltip/style/index.tsx b/components/tooltip/style/index.tsx index d9af875896..a9394db7ca 100644 --- a/components/tooltip/style/index.tsx +++ b/components/tooltip/style/index.tsx @@ -6,14 +6,14 @@ import type { GenerateStyle, PresetColorType, UseComponentStyleResult, -} from '../../_util/theme'; +} from '../../theme'; import { genComponentStyleHook, getArrowStyle, mergeToken, PresetColors, resetComponent, -} from '../../_util/theme'; +} from '../../theme'; export interface ComponentToken { zIndexPopup: number; diff --git a/components/transfer/style/index.tsx b/components/transfer/style/index.tsx index c9334dc6d2..71753924c0 100644 --- a/components/transfer/style/index.tsx +++ b/components/transfer/style/index.tsx @@ -1,14 +1,14 @@ // deps-lint-skip-all import type { CSSObject } from '@ant-design/cssinjs'; -import type { FullToken, GenerateStyle } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; import { genComponentStyleHook, mergeToken, operationUnit, resetComponent, resetIcon, -} from '../../_util/theme'; +} from '../../theme'; export interface ComponentToken { listWidth: number; diff --git a/components/tree-select/style/index.tsx b/components/tree-select/style/index.tsx index e03899882b..e8e83f6af2 100644 --- a/components/tree-select/style/index.tsx +++ b/components/tree-select/style/index.tsx @@ -1,8 +1,8 @@ // deps-lint-skip-all import { getStyle as getCheckboxStyle } from '../../checkbox/style'; +import type { AliasToken, FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken } from '../../theme'; import { genTreeStyle } from '../../tree/style'; -import type { AliasToken, FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, mergeToken } from '../../_util/theme'; interface TreeSelectToken extends FullToken<'TreeSelect'> { treePrefixCls: string; diff --git a/components/tree/style/index.tsx b/components/tree/style/index.tsx index 70c8eec834..19edc6e6da 100644 --- a/components/tree/style/index.tsx +++ b/components/tree/style/index.tsx @@ -2,11 +2,11 @@ // import './index.less'; // deps-lint-skip-all -import type { CSSObject, CSSInterpolation } from '@ant-design/cssinjs'; +import type { CSSInterpolation, CSSObject } from '@ant-design/cssinjs'; import { Keyframes } from '@ant-design/cssinjs'; -import type { DerivativeToken } from '../../_util/theme'; -import { resetComponent, genComponentStyleHook, mergeToken } from '../../_util/theme'; import { getStyle as getCheckboxStyle } from '../../checkbox/style'; +import type { DerivativeToken } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; // ============================ Keyframes ============================= const treeNodeFX = new Keyframes('ant-tree-node-fx-do-not-use', { diff --git a/components/typography/style/index.tsx b/components/typography/style/index.tsx index 6e56c018ea..c7fa69a038 100644 --- a/components/typography/style/index.tsx +++ b/components/typography/style/index.tsx @@ -1,6 +1,6 @@ // deps-lint-skip-all -import type { FullToken, GenerateStyle } from '../../_util/theme'; -import { genComponentStyleHook, operationUnit } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, operationUnit } from '../../theme'; import { getCopiableStyles, getEditableStyles, diff --git a/components/typography/style/mixins.tsx b/components/typography/style/mixins.tsx index 9e745ea5ec..e90195d919 100644 --- a/components/typography/style/mixins.tsx +++ b/components/typography/style/mixins.tsx @@ -9,10 +9,10 @@ */ import { gold } from '@ant-design/colors'; import type { CSSObject } from '@ant-design/cssinjs'; -import type { GenerateStyle } from '../../_util/theme'; -import { operationUnit } from '../../_util/theme'; -import { initInputToken } from '../../input/style'; import type { TypographyToken } from '.'; +import { initInputToken } from '../../input/style'; +import type { GenerateStyle } from '../../theme'; +import { operationUnit } from '../../theme'; // eslint-disable-next-line import/prefer-default-export const getTitleStyle = ( diff --git a/components/upload/style/dragger.tsx b/components/upload/style/dragger.tsx index be3999ae8c..8ae0e6511e 100644 --- a/components/upload/style/dragger.tsx +++ b/components/upload/style/dragger.tsx @@ -1,5 +1,5 @@ import type { UploadToken } from '.'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; const genDraggerStyle: GenerateStyle = token => { const { componentCls, iconCls } = token; diff --git a/components/upload/style/index.tsx b/components/upload/style/index.tsx index 2d612acc02..b997a5a709 100644 --- a/components/upload/style/index.tsx +++ b/components/upload/style/index.tsx @@ -1,11 +1,11 @@ // deps-lint-skip-all -import { genComponentStyleHook, mergeToken, resetComponent } from '../../_util/theme'; +import type { FullToken, GenerateStyle } from '../../theme'; +import { genComponentStyleHook, mergeToken, resetComponent } from '../../theme'; import genDraggerStyle from './dragger'; import genListStyle from './list'; import genMotionStyle from './motion'; +import { genPictureCardStyle, genPictureStyle } from './picture'; import genRtlStyle from './rtl'; -import { genPictureStyle, genPictureCardStyle } from './picture'; -import type { GenerateStyle, FullToken } from '../../_util/theme'; export interface ComponentToken {} diff --git a/components/upload/style/list.tsx b/components/upload/style/list.tsx index 1bd8239281..9c2ee57152 100644 --- a/components/upload/style/list.tsx +++ b/components/upload/style/list.tsx @@ -1,6 +1,6 @@ -import { clearFix } from '../../_util/theme'; -import type { GenerateStyle } from '../../_util/theme'; import type { UploadToken } from '.'; +import type { GenerateStyle } from '../../theme'; +import { clearFix } from '../../theme'; const genListStyle: GenerateStyle = token => { const { componentCls, antCls, iconCls, fontSizeBase, lineHeight } = token; diff --git a/components/upload/style/motion.tsx b/components/upload/style/motion.tsx index 1358989c47..a463e2ba2a 100644 --- a/components/upload/style/motion.tsx +++ b/components/upload/style/motion.tsx @@ -1,6 +1,6 @@ import { Keyframes } from '@ant-design/cssinjs'; import type { UploadToken } from '.'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; const uploadAnimateInlineIn = new Keyframes('uploadAnimateInlineIn', { from: { diff --git a/components/upload/style/picture.tsx b/components/upload/style/picture.tsx index af8355214d..860204e713 100644 --- a/components/upload/style/picture.tsx +++ b/components/upload/style/picture.tsx @@ -1,7 +1,7 @@ import { TinyColor } from '@ctrl/tinycolor'; import type { UploadToken } from '.'; -import type { GenerateStyle } from '../../_util/theme'; -import { clearFix } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; +import { clearFix } from '../../theme'; const genPictureStyle: GenerateStyle = token => { const { componentCls, iconCls, uploadThumbnailSize, uploadProgressOffset } = token; diff --git a/components/upload/style/rtl.tsx b/components/upload/style/rtl.tsx index 53c5209b0e..ad7907d03b 100644 --- a/components/upload/style/rtl.tsx +++ b/components/upload/style/rtl.tsx @@ -1,5 +1,5 @@ import type { UploadToken } from '.'; -import type { GenerateStyle } from '../../_util/theme'; +import type { GenerateStyle } from '../../theme'; // =========================== Motion =========================== const genRtlStyle: GenerateStyle = token => { diff --git a/scripts/collect-token-statistic.js b/scripts/collect-token-statistic.js index aa9166c16e..5d24f47437 100644 --- a/scripts/collect-token-statistic.js +++ b/scripts/collect-token-statistic.js @@ -5,7 +5,7 @@ const React = require('react'); const ReactDOMServer = require('react-dom/server'); const fs = require('fs-extra'); const antd = require('../lib'); -const { statistic } = require('../lib/_util/theme/util/statistic'); +const { statistic } = require('../lib/theme/util/statistic'); const useMessageStyle = require('../lib/message/style/index').default; const useNotificationStyle = require('../lib/notification/style/index').default; @@ -48,12 +48,12 @@ const Notification = () => { ReactDOMServer.renderToString(React.createElement(Notification)); (async () => { - const libPath = `${process.cwd()}/lib/_util/theme/util/statistic.js`; + const libPath = `${process.cwd()}/lib/theme/util/statistic.js`; const libContent = await fs.readFile(libPath, 'utf8'); const newLibContent = `${libContent}\nexports._statistic_build_ = ${JSON.stringify(statistic)}`; await fs.writeFile(libPath, newLibContent, 'utf8'); - const esPath = `${process.cwd()}/es/_util/theme/util/statistic.js`; + const esPath = `${process.cwd()}/es/theme/util/statistic.js`; const esContent = await fs.readFile(esPath, 'utf8'); const newEsContent = `${esContent}\n_statistic_build_ = ${JSON.stringify(statistic)}`; await fs.writeFile(esPath, newEsContent, 'utf8'); diff --git a/site/theme/template/Layout/DynamicTheme/Token.tsx b/site/theme/template/Layout/DynamicTheme/Token.tsx index 335eb5f588..bf0bed1a32 100644 --- a/site/theme/template/Layout/DynamicTheme/Token.tsx +++ b/site/theme/template/Layout/DynamicTheme/Token.tsx @@ -2,7 +2,7 @@ import type { TableProps } from 'antd'; import { Alert, Col, ConfigProvider, Row, Select, Space, Table } from 'antd'; import * as React from 'react'; -import { statistic } from '../../../../../components/_util/theme'; +import { statistic } from '../../../../../components/theme'; const wrapValue = (value: any) => { const string = String(value); diff --git a/site/theme/template/Layout/DynamicTheme/index.tsx b/site/theme/template/Layout/DynamicTheme/index.tsx index 43956a5060..97541606ba 100644 --- a/site/theme/template/Layout/DynamicTheme/index.tsx +++ b/site/theme/template/Layout/DynamicTheme/index.tsx @@ -4,9 +4,9 @@ import { Button, Checkbox, Drawer, Form, Input, InputNumber, Space } from 'antd' import * as React from 'react'; import { useState } from 'react'; import { useIntl } from 'react-intl'; -import type { SeedToken } from '../../../../../components/_util/theme'; -import { PresetColors } from '../../../../../components/_util/theme/interface'; -import defaultSeedToken from '../../../../../components/_util/theme/themes/seed'; +import type { SeedToken } from '../../../../../components/theme'; +import { PresetColors } from '../../../../../components/theme/interface'; +import defaultSeedToken from '../../../../../components/theme/themes/seed'; import Diff from './Diff'; import Preview from './Preview'; diff --git a/site/theme/template/Layout/index.jsx b/site/theme/template/Layout/index.jsx index f0bfead98b..6406c2e67b 100644 --- a/site/theme/template/Layout/index.jsx +++ b/site/theme/template/Layout/index.jsx @@ -17,7 +17,7 @@ import * as utils from '../utils'; import Header from './Header'; import SiteContext from './SiteContext'; -import defaultSeedToken from '../../../../components/_util/theme/themes/seed'; +import defaultSeedToken from '../../../../components/theme/themes/seed'; import DynamicTheme from './DynamicTheme'; if (typeof window !== 'undefined' && navigator.serviceWorker) { diff --git a/tests/dekko/lib.test.js b/tests/dekko/lib.test.js index fb7be23135..e39939f3f4 100644 --- a/tests/dekko/lib.test.js +++ b/tests/dekko/lib.test.js @@ -20,7 +20,10 @@ $('lib/*') .isDirectory() .filter( filename => - !filename.endsWith('style') && !filename.endsWith('_util') && !filename.endsWith('locale'), + !filename.endsWith('style') && + !filename.endsWith('_util') && + !filename.endsWith('theme') && + !filename.endsWith('locale'), ) .hasFile('index.js') .hasFile('index.d.ts')