diff --git a/.dumi/hooks/use.ts b/.dumi/hooks/use.ts index b9a143550a07..d4d572981ba6 100644 --- a/.dumi/hooks/use.ts +++ b/.dumi/hooks/use.ts @@ -1,23 +1,28 @@ -export default function use(promise: any) { - if (promise.status === 'fulfilled') { - return promise.value; +export default function use(promise: PromiseLike): T { + const internal: PromiseLike & { + status?: 'pending' | 'fulfilled' | 'rejected'; + value?: T; + reason?: any; + } = promise; + if (internal.status === 'fulfilled') { + return internal.value; } - if (promise.status === 'rejected') { - throw promise.reason; - } else if (promise.status === 'pending') { - throw promise; + if (internal.status === 'rejected') { + throw internal.reason; + } else if (internal.status === 'pending') { + throw internal; } else { - promise.status = 'pending'; - promise.then( + internal.status = 'pending'; + internal.then( (result) => { - promise.status = 'fulfilled'; - promise.value = result; + internal.status = 'fulfilled'; + internal.value = result; }, (reason) => { - promise.status = 'rejected'; - promise.reason = reason; + internal.status = 'rejected'; + internal.reason = reason; }, ); - throw promise; + throw internal; } } diff --git a/.dumi/hooks/useFetch/cache.ts b/.dumi/hooks/useFetch/cache.ts new file mode 100644 index 000000000000..d6c6e791ef76 --- /dev/null +++ b/.dumi/hooks/useFetch/cache.ts @@ -0,0 +1,21 @@ +export default class FetchCache { + private cache: Map> = new Map(); + + get(key: string) { + return this.cache.get(key); + } + + set(key: string, value: PromiseLike) { + this.cache.set(key, value); + } + + promise(key: string, promiseFn: () => PromiseLike): PromiseLike { + const cached = this.get(key); + if (cached) { + return cached; + } + const promise = promiseFn(); + this.set(key, promise); + return promise; + } +} diff --git a/.dumi/hooks/useFetch/index.ts b/.dumi/hooks/useFetch/index.ts new file mode 100644 index 000000000000..99aa763ab3c3 --- /dev/null +++ b/.dumi/hooks/useFetch/index.ts @@ -0,0 +1,20 @@ +import fetch from 'cross-fetch'; +import use from '../use'; +import FetchCache from './cache'; + +const cache = new FetchCache(); + +const useFetch = (options: string | { request: () => PromiseLike; key: string }) => { + let request; + let key; + if (typeof options === 'string') { + request = () => fetch(options).then((res) => res.json()); + key = options; + } else { + request = options.request; + key = options.key; + } + return use(cache.promise(key, request)); +}; + +export default useFetch; diff --git a/.dumi/hooks/useMenu.tsx b/.dumi/hooks/useMenu.tsx index b980ed5f3abb..396d4b39ce64 100644 --- a/.dumi/hooks/useMenu.tsx +++ b/.dumi/hooks/useMenu.tsx @@ -1,7 +1,7 @@ import { useFullSidebarData, useSidebarData } from 'dumi'; import React, { useMemo } from 'react'; import type { MenuProps } from 'antd'; -import { Tag, theme } from 'antd'; +import { Tag, version } from 'antd'; import Link from '../theme/common/Link'; import useLocation from './useLocation'; @@ -15,7 +15,6 @@ const useMenu = (options: UseMenuOptions = {}): [MenuProps['items'], string] => const { pathname, search } = useLocation(); const sidebarData = useSidebarData(); const { before, after } = options; - const { token } = theme.useToken(); const menuItems = useMemo(() => { const sidebarItems = [...(sidebarData ?? [])]; @@ -32,7 +31,7 @@ const useMenu = (options: UseMenuOptions = {}): [MenuProps['items'], string] => key.startsWith('/changelog'), )?.[1]; if (changelogData) { - sidebarItems.push(...changelogData); + sidebarItems.splice(1, 0, changelogData[0]); } } if (pathname.startsWith('/changelog')) { @@ -40,10 +39,23 @@ const useMenu = (options: UseMenuOptions = {}): [MenuProps['items'], string] => key.startsWith('/docs/react'), )?.[1]; if (reactDocData) { - sidebarItems.unshift(...reactDocData); + sidebarItems.unshift(reactDocData[0]); + sidebarItems.push(...reactDocData.slice(1)); } } + const getItemTag = (tag: string, show = true) => + tag && + show && ( + + {tag.replace('VERSION', version)} + + ); + return ( sidebarItems?.reduce>((result, group) => { if (group?.title) { @@ -52,7 +64,7 @@ const useMenu = (options: UseMenuOptions = {}): [MenuProps['items'], string] => const childrenGroup = group.children.reduce< Record[number]['children']> >((childrenResult, child) => { - const type = (child.frontmatter as any).type ?? 'default'; + const type = child.frontmatter?.type ?? 'default'; if (!childrenResult[type]) { childrenResult[type] = []; } @@ -103,17 +115,16 @@ const useMenu = (options: UseMenuOptions = {}): [MenuProps['items'], string] => key: group?.title, children: group.children?.map((item) => ({ label: ( - + {before} {item?.title} - {(item.frontmatter as any).subtitle} + {item.frontmatter?.subtitle} - {(item.frontmatter as any).tag && ( - - {(item.frontmatter as any).tag} - - )} + {getItemTag(item.frontmatter?.tag, !before && !after)} {after} ), @@ -131,9 +142,13 @@ const useMenu = (options: UseMenuOptions = {}): [MenuProps['items'], string] => result.push( ...list.map((item) => ({ label: ( - + {before} {item?.title} + {getItemTag((item.frontmatter as any).tag, !before && !after)} {after} ), diff --git a/.dumi/pages/index/components/util.ts b/.dumi/pages/index/components/util.ts index 35eb81944028..295ff4bee7aa 100644 --- a/.dumi/pages/index/components/util.ts +++ b/.dumi/pages/index/components/util.ts @@ -1,6 +1,5 @@ import { css } from 'antd-style'; -import fetch from 'cross-fetch'; -import use from '../../../hooks/use'; +import useFetch from '../../../hooks/useFetch'; export interface Author { avatar: string; @@ -81,12 +80,8 @@ export function preLoad(list: string[]) { } } -const promise = fetch(`https://render.alipay.com/p/h5data/antd4-config_website-h5data.json`).then( - (res) => res.json(), -); - -export function useSiteData(): [Partial, boolean] { - return use(promise); +export function useSiteData(): Partial { + return useFetch('https://render.alipay.com/p/h5data/antd4-config_website-h5data.json'); } export const getCarouselStyle = () => ({ diff --git a/.dumi/preset/.gitkeep b/.dumi/preset/.gitkeep new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/.dumi/rehypeAntd.ts b/.dumi/rehypeAntd.ts index 4c6354bb8474..7c3bdc6e1261 100644 --- a/.dumi/rehypeAntd.ts +++ b/.dumi/rehypeAntd.ts @@ -68,10 +68,13 @@ function rehypeAntd(): UnifiedTransformer { node.tagName = 'VideoPlayer'; } else if (node.tagName === 'SourceCode') { const { lang } = node.properties; - if (lang === 'sandpack') { + if (typeof lang === 'string' && lang.startsWith('sandpack')) { parent!.children.splice(i!, 1, { type: 'element', tagName: 'Sandpack', + properties: { + dark: lang === 'sandpackdark', + }, children: [ { type: 'text', diff --git a/.dumi/theme/builtins/ResourceArticles/index.tsx b/.dumi/theme/builtins/ResourceArticles/index.tsx index ea1281b81f05..b6fbf635e9e2 100644 --- a/.dumi/theme/builtins/ResourceArticles/index.tsx +++ b/.dumi/theme/builtins/ResourceArticles/index.tsx @@ -51,8 +51,10 @@ const useStyle = createStyles(({ token, css }) => { padding: 0; font-size: 14px; list-style: none; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } - ${antCls}-avatar > img { max-width: unset; } @@ -95,7 +97,7 @@ const ArticleList: React.FC = ({ name, data = [], authors = [] ); }; -const Articles = () => { +const Articles: React.FC = () => { const [, lang] = useLocale(); const isZhCN = lang === 'cn'; const { articles = { cn: [], en: [] }, authors = [] } = useSiteData(); @@ -113,10 +115,16 @@ const Articles = () => { const yearList = Object.keys(mergedData).sort((a, b) => Number(b) - Number(a)); - return yearList.length ? ( - - {yearList.map((year) => ( - + if (yearList.length === 0) { + return null; + } + + return ( + ({ + key: year, + label: `${year}${isZhCN ? ' 年' : ''}`, + children: ( @@ -133,15 +141,14 @@ const Articles = () => {
-
- ))} -
- ) : null; + ), + }))} + /> + ); }; export default () => { const { styles } = useStyle(); - return (
}> diff --git a/.dumi/theme/builtins/Sandpack/index.tsx b/.dumi/theme/builtins/Sandpack/index.tsx index 037e5ccafb64..791cdce75ad4 100644 --- a/.dumi/theme/builtins/Sandpack/index.tsx +++ b/.dumi/theme/builtins/Sandpack/index.tsx @@ -23,14 +23,16 @@ const setup = { const options = { activeFile: 'app.tsx' as never, - visibleFiles: ['index.tsx', 'app.tsx', 'package.json'] as any, + visibleFiles: ['index.tsx', 'app.tsx', 'package.json', 'index.css'] as any, showLineNumbers: true, editorHeight: '500px', + autorun: false, }; const indexContent = `import React from 'react'; import { createRoot } from 'react-dom/client'; import App from './app'; +import './index.css'; const root = createRoot(document.getElementById("root")); root.render(); @@ -62,7 +64,7 @@ const SandpackFallback = () => { ); }; -const Sandpack = ({ children }: { children: ReactNode }) => { +const Sandpack = ({ children, dark }: { children: ReactNode; dark: boolean }) => { const [searchParams] = useSearchParams(); useServerInsertedHTML(() => ( @@ -81,6 +83,15 @@ const Sandpack = ({ children }: { children: ReactNode }) => { options={options} files={{ 'index.tsx': indexContent, + 'index.css': `html, body { + padding: 0; + margin: 0; + background: ${dark ? '#000' : '#fff'}; +} + +#root { + padding: 24px; +}`, 'app.tsx': children, }} /> diff --git a/.dumi/theme/common/ComponentChangelog/ComponentChangelog.tsx b/.dumi/theme/common/ComponentChangelog/ComponentChangelog.tsx new file mode 100644 index 000000000000..9c3d8c75d462 --- /dev/null +++ b/.dumi/theme/common/ComponentChangelog/ComponentChangelog.tsx @@ -0,0 +1,187 @@ +/* eslint-disable global-require */ +import React, { useMemo } from 'react'; +import { createStyles } from 'antd-style'; +import { HistoryOutlined } from '@ant-design/icons'; +import { Button, Drawer, Timeline, Typography } from 'antd'; +import Link from '../Link'; +import useLocale from '../../../hooks/useLocale'; +import useFetch from '../../../hooks/useFetch'; + +const useStyle = createStyles(({ token, css }) => ({ + history: css` + position: absolute; + top: 0; + inset-inline-end: 0; + `, + + li: css` + // white-space: pre; + `, + + ref: css` + margin-left: ${token.marginXS}px; + `, +})); + +export interface ComponentChangelogProps { + pathname: string; +} + +const locales = { + cn: { + full: '完整更新日志', + changelog: '更新日志', + loading: '加载中...', + empty: '暂无更新', + }, + en: { + full: 'Full Changelog', + changelog: 'Changelog', + loading: 'loading...', + empty: 'Nothing update', + }, +}; + +function ParseChangelog(props: { changelog: string; refs: string[]; styles: any }) { + const { changelog = '', refs = [], styles } = props; + + const parsedChangelog = React.useMemo(() => { + const nodes: React.ReactElement[] = []; + + let isQuota = false; + let lastStr = ''; + + for (let i = 0; i < changelog.length; i += 1) { + const char = changelog[i]; + + if (char !== '`') { + lastStr += char; + } else { + let node = lastStr; + if (isQuota) { + node = {node}; + } + + nodes.push(node); + lastStr = ''; + isQuota = !isQuota; + } + } + + nodes.push(lastStr); + + return nodes; + }, [changelog]); + + return ( + <> + {/* Changelog */} + {parsedChangelog} + + {/* Refs */} + {refs?.map((ref) => ( + + #{ref.match(/^.*\/(\d+)$/)?.[1]} + + ))} + + ); +} + +function useChangelog(componentPath, lang) { + const data = useFetch( + lang === 'cn' + ? { + key: 'component-changelog-cn', + request: () => import('../../../preset/components-changelog-cn.json'), + } + : { + key: 'component-changelog-en', + request: () => import('../../../preset/components-changelog-en.json'), + }, + ); + + return useMemo(() => { + const component = componentPath.replace(/-/g, ''); + + const componentName = Object.keys(data).find( + (name) => name.toLowerCase() === component.toLowerCase(), + ); + + return data[componentName]; + }, [data, componentPath]); +} + +export default function ComponentChangelog(props: ComponentChangelogProps) { + const { pathname = '' } = props; + const [locale, lang] = useLocale(locales); + const [show, setShow] = React.useState(false); + + const { styles } = useStyle(); + + const componentPath = pathname.match(/\/components\/([^/]+)/)?.[1] || ''; + + const list = useChangelog(componentPath, lang); + + const timelineItems = React.useMemo(() => { + const changelogMap = {}; + + list?.forEach((info) => { + changelogMap[info.version] = changelogMap[info.version] || []; + changelogMap[info.version].push(info); + }); + + return Object.keys(changelogMap).map((version) => { + const changelogList = changelogMap[version]; + + return { + children: ( + +

{version}

+
    + {changelogList.map((info, index) => ( +
  • + +
  • + ))} +
+
+ ), + }; + }); + }, [list]); + + if (!list || !list.length) { + return null; + } + + return ( + <> + + + {locale.full} + + } + open={show} + width="40vw" + onClose={() => { + setShow(false); + }} + destroyOnClose + > + + + + ); +} diff --git a/.dumi/theme/common/ComponentChangelog/index.tsx b/.dumi/theme/common/ComponentChangelog/index.tsx new file mode 100644 index 000000000000..cbaae2977db2 --- /dev/null +++ b/.dumi/theme/common/ComponentChangelog/index.tsx @@ -0,0 +1,9 @@ +import React from 'react'; +import type { ComponentChangelogProps } from './ComponentChangelog'; +import ComponentChangelog from './ComponentChangelog'; + +export default (props: ComponentChangelogProps) => ( + + + +); diff --git a/.dumi/theme/plugin.ts b/.dumi/theme/plugin.ts index 735c6c3d9a08..68438c08ab03 100644 --- a/.dumi/theme/plugin.ts +++ b/.dumi/theme/plugin.ts @@ -183,11 +183,6 @@ const RoutesPlugin = (api: IApi) => { // fs.writeFileSync(`./_site/${ssrCssFileName}`, styleTextWithoutStyleTag, 'utf8'); // }); - - api.modifyHTML(($) => { - $('script[src^="/umi."]').attr('defer', ''); - return $; - }); }; export default RoutesPlugin; diff --git a/.dumi/theme/slots/Content/index.tsx b/.dumi/theme/slots/Content/index.tsx index 720c1cc2248e..e3848d3dd874 100644 --- a/.dumi/theme/slots/Content/index.tsx +++ b/.dumi/theme/slots/Content/index.tsx @@ -11,6 +11,7 @@ import useLayoutState from '../../../hooks/useLayoutState'; import useLocation from '../../../hooks/useLocation'; import EditButton from '../../common/EditButton'; import PrevAndNext from '../../common/PrevAndNext'; +import ComponentChangelog from '../../common/ComponentChangelog'; import type { DemoContextProps } from '../DemoContext'; import DemoContext from '../DemoContext'; import Footer from '../Footer'; @@ -204,45 +205,49 @@ const Content: React.FC<{ children: ReactNode }> = ({ children }) => { return ( - -
- ({ - href: `#${item.id}`, - title: item.title, - key: item.id, - children: item.children - ?.filter((child) => showDebug || !debugDemos.includes(child.id)) - .map((child) => ({ - key: child.id, - href: `#${child.id}`, - title: ( - - {child?.title} - - ), - })), - }))} - /> -
-
+ {!!meta.frontmatter.toc && ( + +
+ ({ + href: `#${item.id}`, + title: item.title, + key: item.id, + children: item.children + ?.filter((child) => showDebug || !debugDemos.includes(child.id)) + .map((child) => ({ + key: child.id, + href: `#${child.id}`, + title: ( + + {child?.title} + + ), + })), + }))} + /> +
+
+ )}
{meta.frontmatter?.title ? ( - - {meta.frontmatter?.title} - {meta.frontmatter.subtitle && ( - {meta.frontmatter.subtitle} - )} - {!pathname.startsWith('/components/overview') && ( - } - filename={meta.frontmatter.filename} - /> - )} + + + {meta.frontmatter?.title} + {meta.frontmatter?.subtitle} + + {!pathname.startsWith('/components/overview') && ( + } + filename={meta.frontmatter.filename} + /> + )} + + {pathname.startsWith('/components/') && } ) : null} {/* 添加作者、时间等信息 */} diff --git a/.gitignore b/.gitignore index 7693ccc26972..8bc92f8bdd6b 100644 --- a/.gitignore +++ b/.gitignore @@ -54,6 +54,8 @@ components/version/token-meta.json .dumi/tmp .dumi/tmp-test .dumi/tmp-production +.dumi/preset/components-changelog* +.dumi/preset/misc-changelog.json # Image snapshot diff __diff_output__/ diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index 77929efd56e3..1e4a1f3e6449 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -1,8 +1,9 @@ --- order: 6 -title: Change Log +title: Changelog toc: false timeline: true +tag: vVERSION --- `antd` follows [Semantic Versioning 2.0.0](http://semver.org/). @@ -15,13 +16,24 @@ timeline: true --- +## 5.8.2 + +`2023-08-04` + +- 🐞 Fix Checkbox & Radio not support customize wave and add className `ant-wave-target` for this case. [#44014](https://github.com/ant-design/ant-design/pull/44014) +- 🐞 Adjust Form.Item renderProps definition to return correct `FormInstance`. [#43996](https://github.com/ant-design/ant-design/pull/43996) +- 🐞 Fixed Table incorrect expand icon direction and row indentation in RTL. [#43977](https://github.com/ant-design/ant-design/pull/43977) [@Yuiai01](https://github.com/Yuiai01) +- 💄 Fix Pagination that should not have hover and focus style when disabled. [#43970](https://github.com/ant-design/ant-design/pull/43970) [@MadCcc](https://github.com/MadCcc) +- TypeScript + - 🤖 Fix Drawer & Anchor part Design Token TS description not correct issue. [#43994](https://github.com/ant-design/ant-design/pull/43994) [@wving5](https://github.com/wving5) + ## 5.8.1 `2023-08-02` -- 🐞 Fix unexpected warning of deprecated `clearIcon` [#43945](https://github.com/ant-design/ant-design/pull/43945) [@kiner-tang](https://github.com/kiner-tang) +- 🐞 Fix Select, TreeSelect, Cascader, DatePicker unexpected warning of deprecated `clearIcon` [#43945](https://github.com/ant-design/ant-design/pull/43945) [@kiner-tang](https://github.com/kiner-tang) - TypeScript - - 🤖 Export `MappingAlgorithm` as type of theme algorithm. [#43953](https://github.com/ant-design/ant-design/pull/43953) + - 🤖 Export Design Token `MappingAlgorithm` as type of theme algorithm. [#43953](https://github.com/ant-design/ant-design/pull/43953) ## 5.8.0 @@ -35,7 +47,7 @@ timeline: true - 🆕 ColorPicker support `disabledAlpha` prop. [#43355](https://github.com/ant-design/ant-design/pull/43355) [@RedJue](https://github.com/RedJue) - 🆕 Avatar.Group support `shape` prop. [#43817](https://github.com/ant-design/ant-design/pull/43817) [@li-jia-nan](https://github.com/li-jia-nan) - 🆕 AutoComplete/Cascader/DatePicker/Input.Textarea/TimePicker/TreeSelect support `allowClear` prop to customize clear button。[#43582](https://github.com/ant-design/ant-design/discussions/43582) [@kiner-tang](https://github.com/kiner-tang) -- 🆕 RangePicker `presets` support callback functions. [#43476](https://github.com/ant-design/ant-design/pull/43476) [@Wxh16144](https://github.com/Wxh16144) +- 🆕 DatePicker.RangePicker `presets` support callback functions. [#43476](https://github.com/ant-design/ant-design/pull/43476) [@Wxh16144](https://github.com/Wxh16144) - 🆕 Added the `preview={{ movable: Boolean }}` prop to the Image component to support dragging and dropping into folders. [#43823](https://github.com/ant-design/ant-design/pull/43823) [@linxianxi](https://github.com/linxianxi) - 🆕 Slider `tooltip` support `autoAdjustOverflow` prop. [#43788](https://github.com/ant-design/ant-design/pull/43788) - 🆕 Added the `selectionsIcon` property to the Transfer component to support custom icons for the dropdown menu. [#43773](https://github.com/ant-design/ant-design/pull/43773) [@li-jia-nan](https://github.com/li-jia-nan) @@ -45,10 +57,10 @@ timeline: true - 🐞 Fix Tooltip `hover` not trigger on `disabled` element. [#43872](https://github.com/ant-design/ant-design/pull/43872) - 🐞 Fix ColorPicker not calling `onChangeComplete` callback when changing value. [#43867](https://github.com/ant-design/ant-design/pull/43867) [@RedJue](https://github.com/RedJue) - 🐞 Fix `Modal.confirm` `locale` setting were reset. [#43277](https://github.com/ant-design/ant-design/pull/43277) [@Yuiai01](https://github.com/Yuiai01) -- 🐞 Fix Slide description info and slider handle overlap issue. [#43780](https://github.com/ant-design/ant-design/pull/43780) [@Wxh16144](https://github.com/Wxh16144) +- 🐞 Fix Slider description info and slider handle overlap issue. [#43780](https://github.com/ant-design/ant-design/pull/43780) [@Wxh16144](https://github.com/Wxh16144) - 🐞 Fix InputNumber handler style in large size. [#43875](https://github.com/ant-design/ant-design/pull/43875) [@yee94](https://github.com/yee94) - 🐞 Fix Select popup flip position motion not correct. [#43764](https://github.com/ant-design/ant-design/pull/43764) -- 💄 Optimized the design of icons including CloseCircleFilled/CloseSquareFilled/CloseOutlined/CloseCircleOutlined/CloseSquareOutlined/ExportOutlined/ImportOutlined. [824500](https://github.com/ant-design/ant-design-icons/commit/824500349894a87562f033dbdc5e3c5d301a2f5c) +- 💄 Optimized `@ant-design/icons` the design of icons including CloseCircleFilled/CloseSquareFilled/CloseOutlined/CloseCircleOutlined/CloseSquareOutlined/ExportOutlined/ImportOutlined. [824500](https://github.com/ant-design/ant-design-icons/commit/824500349894a87562f033dbdc5e3c5d301a2f5c) - 💄 Fix when using with other component libraries that use `@ant-design/cssinjs`, antd styles will always be inserted at the top to avoid style override issues caused by loading order. [#43847](https://github.com/ant-design/ant-design/pull/43847) - 💄 Optimize message and notification to not to extract style in SSR. [#43808](https://github.com/ant-design/ant-design/pull/43808) - ⌨️ Fix Select `aria-activedescendant` didn't conform to valid value. [#43800](https://github.com/ant-design/ant-design/pull/43800) @@ -62,7 +74,7 @@ timeline: true - 🐞 Fix Adjust the positioning of the Tour to be centered when the `target` is `null`. [#43694](https://github.com/ant-design/ant-design/pull/43694) [@linxianxi](https://github.com/linxianxi) - 💄 Fix Watermark style issue in dark theme. [#43754](https://github.com/ant-design/ant-design/pull/43754) -- 🐞 Fix Button missing part React.`ButtonHTMLAttributes` issue. [#43716](https://github.com/ant-design/ant-design/pull/43716) +- 🐞 Fix Button missing part `React.ButtonHTMLAttributes` issue. [#43716](https://github.com/ant-design/ant-design/pull/43716) - 💄 Watermark use Design Token to support dark theme. [#43754](https://github.com/ant-design/ant-design/pull/43754) - TypeScript - 🤖 Button `ref` type optimization. [#43703](https://github.com/ant-design/ant-design/pull/43703) [@Negentropy247](https://github.com/Negentropy247) @@ -96,8 +108,11 @@ timeline: true - 🐞 Fix Tag extra margin when there is only `icon` inside it. [#43518](https://github.com/ant-design/ant-design/pull/43518) [@Yuiai01](https://github.com/Yuiai01) - 🐞 Fix ColorPicker that status style is missing inside Form.Item. [#42880](https://github.com/ant-design/ant-design/pull/42880) [@RedJue](https://github.com/RedJue) - TypeScript - - 🤖 Fix `SpaceContext` don't exported correctly. [#43501](https://github.com/ant-design/ant-design/pull/43501) [@VovkaGoodwin](https://github.com/VovkaGoodwin) - - 🤖 Improve TS definitions for some components. [#43581](https://github.com/ant-design/ant-design/pull/43581) [#43545](https://github.com/ant-design/ant-design/pull/43545) [#43588](https://github.com/ant-design/ant-design/pull/43588) [#43610](https://github.com/ant-design/ant-design/pull/43610) [#43629](https://github.com/ant-design/ant-design/pull/43629). Thanks to [@thinkasany](https://github.com/thinkasany)、[@li-jia-nan](https://github.com/li-jia-nan) for the contributions. + - 🤖 Fix Space `SpaceContext` don't exported correctly. [#43501](https://github.com/ant-design/ant-design/pull/43501) [@VovkaGoodwin](https://github.com/VovkaGoodwin) + - 🤖 Improve AutoComplete definitions. [#43581](https://github.com/ant-design/ant-design/pull/43581) [@thinkasany](https://github.com/thinkasany) + - 🤖 Improve Select and List definitions. [#43545](https://github.com/ant-design/ant-design/pull/43545) [@thinkasany](https://github.com/thinkasany) + - 🤖 Improve Button definitions. [#43588](https://github.com/ant-design/ant-design/pull/43588) [#43629](https://github.com/ant-design/ant-design/pull/43629) [@thinkasany](https://github.com/thinkasany) + - 🤖 Improve Cascader, ConfigProvider, DatePicker, InputNumber, Slider and Upload definitions. [#43610](https://github.com/ant-design/ant-design/pull/43610) ## 5.7.0 @@ -105,29 +120,29 @@ timeline: true - 🆕 ConfigProvider now supports `className` and `style` properties for all components. Thanks to [@Yuiai01](https://github.com/Yuiai01), [@li-jia-nan](https://github.com/li-jia-nan), [@MuxinFeng](https://github.com/MuxinFeng) for their contributions. - 🆕 Badge now supports `classNames` and `styles` properties. [#43245](https://github.com/ant-design/ant-design/pull/43245) [@li-jia-nan](https://github.com/li-jia-nan) -- 🆕 ColorPicker now supports new features such as `showText`, `destroyTooltipOnHide`, `onChangeComplete`, `panelRender` and `size`. - - [#42865](https://github.com/ant-design/ant-design/pull/42865) [@RedJue](https://github.com/RedJue) - - [#42645](https://github.com/ant-design/ant-design/pull/42645) [@linxianxi](https://github.com/linxianxi) - - [#43370](https://github.com/ant-design/ant-design/pull/43370) [@RedJue](https://github.com/RedJue) - - [#43134](https://github.com/ant-design/ant-design/pull/43134) [@RedJue](https://github.com/RedJue) - - [#43116](https://github.com/ant-design/ant-design/pull/43116) [@RedJue](https://github.com/RedJue) +- ColorPicker + - 🆕 ColorPicker support `showText` prop. [#42865](https://github.com/ant-design/ant-design/pull/42865) [@RedJue](https://github.com/RedJue) + - 🆕 ColorPicker support `destroyTooltipOnHide` prop. [#42645](https://github.com/ant-design/ant-design/pull/42645) [@linxianxi](https://github.com/linxianxi) + - 🆕 ColorPicker support `onChangeComplete` prop. [#43370](https://github.com/ant-design/ant-design/pull/43370) [@RedJue](https://github.com/RedJue) + - 🆕 ColorPicker support `panelRender` prop. [#43134](https://github.com/ant-design/ant-design/pull/43134) [@RedJue](https://github.com/RedJue) + - 🆕 ColorPicker support `size` prop. [#43116](https://github.com/ant-design/ant-design/pull/43116) [@RedJue](https://github.com/RedJue) - 🆕 Alert, Drawer, Modal, Notifaction, Tag, Tabs now support hiding the close button by setting `closeIcon` to null or false. [#42828](https://github.com/ant-design/ant-design/discussions/42828) [@kiner-tang](https://github.com/kiner-tang) - 🆕 Image supports `imageRender`, `toolbarRender` attributes to support custom rendering of preview images and toolbars, also supports new props such as `onTransform`, `minScale`, `maxScale`. Image.PreviewGroup supports `items` attribute to pass in list data, and fixes that the native attributes of the img tag are not passed to preview images The problem. [#43075](https://github.com/ant-design/ant-design/pull/43075) [@linxianxi](https://github.com/linxianxi) - 🆕 Modify the layout style of the Image preview, the `preview` attribute supports `closeIcon`, Image.PreviewGroup supports the `fallback` attribute, and fixes the problem of loading preview resources in advance. [#43167](https://github.com/ant-design/ant-design/pull/43167) [@linxianxi](https://github.com/linxianxi) -- 🆕 Changed the layout style, Preview now supports `closeIcon`, PreviewGroup now supports `fallback`, and fixed an issue where preview resources would be loaded at the beginning. [#43167](https://github.com/ant-design/ant-design/pull/43167) [@linxianxi](https://github.com/linxianxi) +- 🆕 Changed Image the layout style, Preview now supports `closeIcon`, PreviewGroup now supports `fallback`, and fixed an issue where preview resources would be loaded at the beginning. [#43167](https://github.com/ant-design/ant-design/pull/43167) [@linxianxi](https://github.com/linxianxi) - 🛠 InputNumber was refactored to use rc-input. [#42762](https://github.com/ant-design/ant-design/pull/43000) [@MuxinFeng](https://github.com/MuxinFeng) - 🛠 Resolved Circular dependency issue in vite, rollup, meteor and microbundle. [#42750](https://github.com/ant-design/ant-design/pull/42750). Thanks to [@jrr997](https://github.com/jrr997), [@kiner-tang](https://github.com/kiner-tang) and [@MuxinFeng](https://github.com/MuxinFeng) for their contributions. - 🐞 Remove default values (empty string) of `className` prop in Anchor, CollapsePanel, and Input.Group. [#43481](https://github.com/ant-design/ant-design/pull/43481) [@thinkasany](https://github.com/thinkasany) - 🐞 Fix Upload progress bar missing fade motion. [#43471](https://github.com/ant-design/ant-design/pull/43471) - 🐞 Added warning for deprecated Token `colorItemBgSelected` in Menu. [#43461](https://github.com/ant-design/ant-design/pull/43461) [@MadCcc](https://github.com/MadCcc) -- 🐞 Fixed an issue where some browsers had scroll bars that were not redrawn when style feature support was detected. [#43358](https://github.com/ant-design/ant-design/pull/43358) [@LeeeeeeM](https://github.com/LeeeeeeM) +- 🐞 MISC: Fixed an issue where some browsers had scroll bars that were not redrawn when style feature support was detected. [#43358](https://github.com/ant-design/ant-design/pull/43358) [@LeeeeeeM](https://github.com/LeeeeeeM) - 🐞 Fixed an issue where the Tab component of Card would not be displayed at all when tabList is empty. [#43416](https://github.com/ant-design/ant-design/pull/43416) [@linxianxi](https://github.com/linxianxi) - 🐞 Fixed an issue where the `form.validateMessages` configuration would be lost when using ConfigProvider nestedly. [#43239](https://github.com/ant-design/ant-design/pull/43239) [@Wxh16144](https://github.com/Wxh16144) - 🐞 Fixed an issue where the ripple effect of Tag click would sometimes be offset from the Tag element .[#43402](https://github.com/ant-design/ant-design/pull/43402) - 🐞 Fixed an issue where clicking "now" in DatePicker when switching to the year-month panel would not work. [#43367](https://github.com/ant-design/ant-design/pull/43367) [@Yuiai01](https://github.com/Yuiai01) -- 🐞 Fixed an issue where the height set for the TextArea component would become invalid when the screen size changed. [#43169](https://github.com/ant-design/ant-design/pull/43169) [@MadCcc](https://github.com/MadCcc) +- 🐞 Fixed an issue where the height set for the Input.TextArea component would become invalid when the screen size changed. [#43169](https://github.com/ant-design/ant-design/pull/43169) [@MadCcc](https://github.com/MadCcc) - 💄 In Slider, the `tooltip` should be centered when there is little content. [#43430](https://github.com/ant-design/ant-design/pull/43430) [@Jomorx](https://github.com/Jomorx) -- 💄 Added `colorLink` to the seed token, and `colorLinkHover` and `colorLinkActive` will be calculated from colorLink. [#43183](https://github.com/ant-design/ant-design/pull/43183) [@MadCcc](https://github.com/MadCcc) +- 💄 Design Token add `colorLink` to the seed token, and `colorLinkHover` and `colorLinkActive` will be calculated from colorLink. [#43183](https://github.com/ant-design/ant-design/pull/43183) [@MadCcc](https://github.com/MadCcc) - 💄 Adjusted some tokens in Slider to component tokens. [#42428](https://github.com/ant-design/ant-design/pull/42428) [@heiyu4585](https://github.com/heiyu4585) RTL[#42428](https://github.com/ant-design/ant-design/pull/42428) [@heiyu4585](https://github.com/heiyu4585) - RTL - 🤖 Progress now supports animations in rtl direction. [#43316](https://github.com/ant-design/ant-design/pull/43316) [@Yuiai01](https://github.com/Yuiai01) @@ -135,13 +150,12 @@ timeline: true - 🤖 Added `RawPurePanelProps` interface description for Popover. [#43453](https://github.com/ant-design/ant-design/pull/43453) [@thinkasany](https://github.com/thinkasany) - 🤖 Replaced `ref` type with `TooltipRef` instead of `unknown` for `Popconfirm`. [#43452](https://github.com/ant-design/ant-design/pull/43452) [@thinkasany](https://github.com/thinkasany) - 🤖 Replaced `ref` type with `TooltipRef` instead of `unknown` for Popover. [#43450](https://github.com/ant-design/ant-design/pull/43450) [@Negentropy247](https://github.com/Negentropy247) - - 🤖 Improved type declaration of `GroupSizeContext` in ButtonGroup. [#43439](https://github.com/ant-design/ant-design/pull/43439) [@thinkasany](https://github.com/thinkasany) + - 🤖 Improved type declaration of `GroupSizeContext` in Button.ButtonGroup. [#43439](https://github.com/ant-design/ant-design/pull/43439) [@thinkasany](https://github.com/thinkasany) - 🤖 Improved type declaration of `mode` property in Select. [#43413](https://github.com/ant-design/ant-design/pull/43413) [@thinkasany](https://github.com/thinkasany) - 🤖 Replaced `ref` type with `CheckboxRef` instead of `unknown` for Checkbox. [#43424](https://github.com/ant-design/ant-design/pull/43424) [@li-jia-nan](https://github.com/li-jia-nan) - - 🤖 Improved internal type implementation for Table/Tag/Notification. - - [#43366](https://github.com/ant-design/ant-design/pull/43366) [@li-jia-nan](https://github.com/li-jia-nan) - - [#43357](https://github.com/ant-design/ant-design/pull/43357) [@thinkasany](https://github.com/thinkasany) - - [#43351](https://github.com/ant-design/ant-design/pull/43351) [@thinkasany](https://github.com/thinkasany) + - 🤖 Improved Table internal type implementation. [#43366](https://github.com/ant-design/ant-design/pull/43366) [@li-jia-nan](https://github.com/li-jia-nan) + - 🤖 Improved Tag internal type implementation. [#43357](https://github.com/ant-design/ant-design/pull/43357) [@thinkasany](https://github.com/thinkasany) + - 🤖 Improved Notification internal type implementation. [#43351](https://github.com/ant-design/ant-design/pull/43351) [@thinkasany](https://github.com/thinkasany) ## 5.6.4 @@ -167,7 +181,7 @@ timeline: true `2023-06-25` - BreadCrumb - - 🐞 Fix BreadCrumb `dropdownProps` does not working bug. [#43151](https://github.com/ant-design/ant-design/pull/43151) [@linxianxi](https://github.com/linxianxi) + - 🐞 Fix Breadcrumb `dropdownProps` does not working bug. [#43151](https://github.com/ant-design/ant-design/pull/43151) [@linxianxi](https://github.com/linxianxi) - 🛠 Improve BreadCrumb behavior when receiving a null title. [#43099](https://github.com/ant-design/ant-design/pull/43099) [@Asanio06](https://github.com/Asanio06) - 🐞 Fix Slider disabled state within Form. [#43142](https://github.com/ant-design/ant-design/pull/43142) [@Starpuccino](https://github.com/Starpuccino) - 🐞 Fix Form that label offset does not work in vertical mode. [#43155](https://github.com/ant-design/ant-design/pull/43155) [@kiner-tang](https://github.com/kiner-tang) @@ -189,7 +203,7 @@ timeline: true - 🐞 Fix InputNumber with `prefix` abnormal height under Form.Item of `hasFeedBack`. [#43049](https://github.com/ant-design/ant-design/pull/43049) - 💄 Fix Input and InputNumber disabled style with addons. [#42974](https://github.com/ant-design/ant-design/pull/42974) [@kampiu](https://github.com/kampiu) - 🐞 Fix Upload trigger extra `onChange` event when upload the file exceeds `maxCount`. [#43034](https://github.com/ant-design/ant-design/pull/43034) -- 🐞 Fix export bundle size always contain `rc-field-form` even not use it. [#43023](https://github.com/ant-design/ant-design/pull/43023) +- 🐞 Fix export bundle size always contain `rc-field-form` even not use Form. [#43023](https://github.com/ant-design/ant-design/pull/43023) - 🐞 Fix DatePicker `disabledTime` sometime can select disabled option. [#42991](https://github.com/ant-design/ant-design/pull/42991) [@linxianxi](https://github.com/linxianxi) - 📖 Add FloatButton controlled demo and patch related warning info. [#42835](https://github.com/ant-design/ant-design/pull/42835) [@poyiding](https://github.com/poyiding) - 🐞 Fix Button with `disabled` still can interactive with sub component. [#42949](https://github.com/ant-design/ant-design/pull/42949) [@kiner-tang](https://github.com/kiner-tang) @@ -288,11 +302,11 @@ timeline: true - 🐞 Fix InputNumber cannot align well by baseline. [#42580](https://github.com/ant-design/ant-design/pull/42580) - 🐞 Fix spinning icon animation in Badge. [#42575](https://github.com/ant-design/ant-design/pull/42575) [@MadCcc](https://github.com/MadCcc) - 📦 Optimize Form `setFieldsValue` logic to reduce bundle size. [#42635](https://github.com/ant-design/ant-design/pull/42635) -- 💄 Optimize ImagePreviewGroup style. [#42675](https://github.com/ant-design/ant-design/pull/42675) [@kiner-tang](https://github.com/kiner-tang) +- 💄 Optimize Image.ImagePreviewGroup style. [#42675](https://github.com/ant-design/ant-design/pull/42675) [@kiner-tang](https://github.com/kiner-tang) - 💄 Fix Tag borderless style with `error` and other status. [#42619](https://github.com/ant-design/ant-design/pull/42619) [@li-jia-nan](https://github.com/li-jia-nan) - 💄 Fix Table `rowSpan` hover highlight style missing. [#42572](https://github.com/ant-design/ant-design/pull/42572) - 💄 Fix Pagination's link icon and ellipsis hover style when disabled. [#42541](https://github.com/ant-design/ant-design/pull/42541) [@qmhc](https://github.com/qmhc) -- 💄 Fix that global token should be able to override component style. [#42535](https://github.com/ant-design/ant-design/pull/42535) [@MadCcc](https://github.com/MadCcc) +- 💄 Fix Design Token that global token should be able to override component style. [#42535](https://github.com/ant-design/ant-design/pull/42535) [@MadCcc](https://github.com/MadCcc) - 🇱🇹 Add missing i18n for `lt_LT` locale. [#42664](https://github.com/ant-design/ant-design/pull/42664) [@Digital-512](https://github.com/Digital-512) - RTL - 💄 Fix ColorPicker style in RTL mode. [#42716](https://github.com/ant-design/ant-design/pull/42716) [@RedJue](https://github.com/RedJue) @@ -382,8 +396,8 @@ timeline: true - 🐞 Fix responsive Col don't support `flex` prop in `colSize`. [#41962](https://github.com/ant-design/ant-design/pull/41962) [@AlexisSniffer](https://github.com/AlexisSniffer) - 🐞 Fix Carousel `goTo` is ignored if animation is in progress. [#41969](https://github.com/ant-design/ant-design/pull/41969) [@guan404ming](https://github.com/guan404ming) - Form - - 🐞 Resolve issue about the feedback icon was not reset after a reset event had been triggered. [#41976](https://github.com/ant-design/ant-design/pull/41976) - - 🐞 Fixed inaccurate data collected by onValuesChange. [#41976](https://github.com/ant-design/ant-design/pull/41976) + - 🐞 Resolve Form issue about the feedback icon was not reset after a reset event had been triggered. [#41976](https://github.com/ant-design/ant-design/pull/41976) + - 🐞 Fixed Form inaccurate data collected by onValuesChange. [#41976](https://github.com/ant-design/ant-design/pull/41976) - TypeScript - 🤖 Fix Menu OverrideContext type missing warning. [#41907](https://github.com/ant-design/ant-design/pull/41907) - 🤖 Fix TreeSelect missing `aria-*` definition. [#41978](https://github.com/ant-design/ant-design/pull/41978) [@guan404ming](https://github.com/guan404ming) @@ -397,21 +411,21 @@ timeline: true - Tree - 🐞 Fix Checkbox that title do not align. [#41920](https://github.com/ant-design/ant-design/pull/41920) [@Yuiai01](https://github.com/Yuiai01) - 🐞 Fix InputNumber that style was override by browser. [#41940](https://github.com/ant-design/ant-design/pull/41940) [@Wxh16144](https://github.com/Wxh16144) -- 🛠 Reduce bundle size by upgrading `rc-switch`. [#41954](https://github.com/ant-design/ant-design/pull/41954) +- 🛠 Reduce Switch bundle size by upgrading `rc-switch`. [#41954](https://github.com/ant-design/ant-design/pull/41954) ## 5.4.4 `2023-04-20` - 💄 Fix Message hooks icon style not follow dynamic theme token. [#41899](https://github.com/ant-design/ant-design/pull/41899) -- 🐞 Fix that cssinjs may crash if CSS value is `undefined`. [#41896](https://github.com/ant-design/ant-design/pull/41896) +- 🐞 Fix `@ant-design/cssinjs` that cssinjs may crash if CSS value is `undefined`. [#41896](https://github.com/ant-design/ant-design/pull/41896) ## 5.4.3 `2023-04-19` - 🐞 Fix FloatButton throws warning `findDOMNode is deprecated in StrictMode`. [#41833](https://github.com/ant-design/ant-design/pull/41833) [@fourcels](https://github.com/fourcels) -- 🐞 Arrow element support more old browsers which do not support `clip-path: path()`. [#41872](https://github.com/ant-design/ant-design/pull/41872) +- 🐞 MISC: Arrow element support more old browsers which do not support `clip-path: path()`. [#41872](https://github.com/ant-design/ant-design/pull/41872) - 🐞 Fix Layout.Sider transition issue when switch theme. [#41828](https://github.com/ant-design/ant-design/pull/41828) - 🐞 Fix the problem that when the type of Tour is primary, the color of the arrow is still white. [#41761](https://github.com/ant-design/ant-design/pull/41761) - 🐞 Optimize Form field binding, now will ignore comments in Form.Item as subcomponents. [#41771](https://github.com/ant-design/ant-design/pull/41771) @@ -434,7 +448,7 @@ timeline: true `2023-04-11` -- 💄 Optimize Select-like component popup logic. Now always try to display it in the visible area first to reduce the user's extra scrolling cost. [#41619](https://github.com/ant-design/ant-design/pull/41619) +- 💄 Optimize Select-like component popup logic (e.g. Select, TreeSelect, Cascader). Now always try to display it in the visible area first to reduce the user's extra scrolling cost. [#41619](https://github.com/ant-design/ant-design/pull/41619) - 💄 Remove fixed height in Badge.Ribbon. [#41661](https://github.com/ant-design/ant-design/pull/41661) [@MuxinFeng](https://github.com/MuxinFeng) - 🐞 Fix Select width becomes 0px when search after select something. [#41722](https://github.com/ant-design/ant-design/pull/41722) - 🐞 Fix Empty style in small width container. [#41727](https://github.com/ant-design/ant-design/pull/41727) @@ -524,7 +538,7 @@ timeline: true - 💄 Fix Input.TextArea RTL style when enable `showCount`. [#41319](https://github.com/ant-design/ant-design/pull/41319) [@ds1371dani](https://github.com/ds1371dani) - TypeScript - 🤖 Export `CountdownProps` for Statistic. [#41341](https://github.com/ant-design/ant-design/pull/41341) [@li-jia-nan](https://github.com/li-jia-nan) - - 🤖 Improve most alias token meta info. [#41297](https://github.com/ant-design/ant-design/pull/41297) [@arvinxx](https://github.com/arvinxx) + - 🤖 Improve Design Token most alias token meta info. [#41297](https://github.com/ant-design/ant-design/pull/41297) [@arvinxx](https://github.com/arvinxx) - 🤖 Improve Badge `React.forwardRef` type definition. [#41189](https://github.com/ant-design/ant-design/pull/41189) [@li-jia-nan](https://github.com/li-jia-nan) ## 5.3.1 @@ -564,11 +578,11 @@ timeline: true - 💄 Message use `colorText` in style. [#41047](https://github.com/ant-design/ant-design/pull/41047) [@Yuiai01](https://github.com/Yuiai01) - 💄 Fix Select, TreeSelect, Cascader popup align position not correct when parent has `transform: scale` style. [#41013](https://github.com/ant-design/ant-design/pull/41013) - 💄 Optimize `rowScope` style for Table. [#40304](https://github.com/ant-design/ant-design/pull/40304) [@Yuiai01](https://github.com/Yuiai01) -- 💄 Provide new AliasToken `lineWidthFocus` for `outline-width` of focused component. [#40840](https://github.com/ant-design/ant-design/pull/40840) -- 💄 WeekPicker support hover style. [#40772](https://github.com/ant-design/ant-design/pull/40772) +- 💄 Provide Design Token new AliasToken `lineWidthFocus` for `outline-width` of focused component. [#40840](https://github.com/ant-design/ant-design/pull/40840) +- 💄 DatePicker.WeekPicker support hover style. [#40772](https://github.com/ant-design/ant-design/pull/40772) - 💄 Adjust Select, TreeSelect, Cascader always show the `arrow` by default when multiple. [#41028](https://github.com/ant-design/ant-design/pull/41028) - 🐞 Fix Form `Form.Item.useStatus` problem with sever-side-rendering. [#40977](https://github.com/ant-design/ant-design/pull/40977) [@AndyBoat](https://github.com/AndyBoat) -- 🐞 Fix arrow shape in some components. [#40971](https://github.com/ant-design/ant-design/pull/40971) +- 🐞 MISC: Fix arrow shape in some components. [#40971](https://github.com/ant-design/ant-design/pull/40971) - 🐞 Fix Layout throw `React does not recognize the `suffixCls` prop on a DOM element` warning. [#40969](https://github.com/ant-design/ant-design/pull/40969) - 🐞 Fix Watermark that text will be displayed when the picture loads abnormally. [#40770](https://github.com/ant-design/ant-design/pull/40770) [@OriginRing](https://github.com/OriginRing) - 🐞 Image support flip function in preview mode. Fix Image `fallback` when used in ssr. [#40660](https://github.com/ant-design/ant-design/pull/40660) @@ -592,9 +606,9 @@ timeline: true - 🛠 Refactored: replaced the LocaleReceiver component with `useLocale` and removed the LocaleReceiver component. [#40870](https://github.com/ant-design/ant-design/pull/40870) [@li-jia-nan](https://github.com/li-jia-nan) - 🐞 Fixed `getPopupContainer` property injected by ConfigProvider did not work. [#40871](https://github.com/ant-design/ant-design/pull/40871) [@RedJue](https://github.com/RedJue) - 🐞 Fixed where Descriptions did not accept `data-_` and `aria-_` attributes. [#40859](https://github.com/ant-design/ant-design/pull/40859) [@goveo](https://github.com/goveo) -- 🛠 Changed the Separator's DOM element from `span` to `li`. [#40867](https://github.com/ant-design/ant-design/pull/40867) [@heiyu4585](https://github.com/heiyu4585) +- 🛠 Changed the Breadcrumb Separator's DOM element from `span` to `li`. [#40867](https://github.com/ant-design/ant-design/pull/40867) [@heiyu4585](https://github.com/heiyu4585) - 🐞 Fix token of `Layout.colorBgHeader` not work when single use Layout.Header directly. [#40933](https://github.com/ant-design/ant-design/pull/40933) -- 💄 Changed the component's focus `outline` to the default `4px`.[#40839](https://github.com/ant-design/ant-design/pull/40839) +- 💄 Changed Design Token the component's focus `outline` to the default `4px`.[#40839](https://github.com/ant-design/ant-design/pull/40839) - 🐞 Fixed the Badge color was displayed abnormally. [#40848](https://github.com/ant-design/ant-design/pull/40848) [@kiner-tang](https://github.com/kiner-tang) - 🐞 Fixed an issue with the Timeline item's `className`. [#40835](https://github.com/ant-design/ant-design/pull/40835) [@Yuiai01](https://github.com/Yuiai01) - 💄 Fixed the interaction style of the Rate component in the disabled state.[#40836](https://github.com/ant-design/ant-design/pull/40836) [@Yuiai01](https://github.com/Yuiai01) @@ -606,7 +620,7 @@ timeline: true - DatePicker - 💄 Optimize DatePicker date panel style. [#40768](https://github.com/ant-design/ant-design/pull/40768) - - 🐞 Fix RangePicker hover style on wrong date. [#40785](https://github.com/ant-design/ant-design/pull/40785) [@Yuiai01](https://github.com/Yuiai01) + - 🐞 Fix DatePicker.RangePicker hover style on wrong date. [#40785](https://github.com/ant-design/ant-design/pull/40785) [@Yuiai01](https://github.com/Yuiai01) - Form - 🐞 Fixed inconsistency between Checkbox and Radio in table when Form is `disabled`. [#40728](https://github.com/ant-design/ant-design/pull/40728) [@Yuiai01](https://github.com/Yuiai01) - 🐞 Fix Radio/Checkbox under Form `disabled` property don't works correctly. [#40741](https://github.com/ant-design/ant-design/pull/40741) [@Yuiai01](https://github.com/Yuiai01) @@ -625,10 +639,10 @@ timeline: true `2023-02-13` - 🛠 Rewrite `panelRender` in Tour to function component. [#40670](https://github.com/ant-design/ant-design/pull/40670) [@li-jia-nan](https://github.com/li-jia-nan) -- 🐞 Fix `className` property wrongly passed to child nodes in TimeLine. [#40700](https://github.com/ant-design/ant-design/pull/40700) [@any1024](https://github.com/any1024) +- 🐞 Fix Timeline `className` property wrongly passed to child nodes. [#40700](https://github.com/ant-design/ant-design/pull/40700) [@any1024](https://github.com/any1024) - 🐞 Fix Slider dot to trigger click and hover correctly. [#40679](https://github.com/ant-design/ant-design/pull/40679) [@LongHaoo](https://github.com/LongHaoo) - 🐞 Fix Tour that should support `0` as element. [#40631](https://github.com/ant-design/ant-design/pull/40631) [@li-jia-nan](https://github.com/li-jia-nan) -- 💄 Fix DataPicker.RangePicker hover range style. [#40607](https://github.com/ant-design/ant-design/pull/40607) [@Yuiai01](https://github.com/Yuiai01) +- 💄 Fix DatePicker.RangePicker hover range style. [#40607](https://github.com/ant-design/ant-design/pull/40607) [@Yuiai01](https://github.com/Yuiai01) - 💄 Optimize Steps custom `icon` size. [#40672](https://github.com/ant-design/ant-design/pull/40672) - TypeScript - 🤖 Update Upload to support generic types. [#40634](https://github.com/ant-design/ant-design/pull/40634) [@riyadelberkawy](https://github.com/riyadelberkawy) @@ -642,7 +656,7 @@ timeline: true - 🔥 Add `picture-circle` to Upload's `listType` prop. [#40134](https://github.com/ant-design/ant-design/pull/40134) [@ds1371dani](https://github.com/ds1371dani) - 🔥 Anchor component add `direction`, which supports vertical. [#39372](https://github.com/ant-design/ant-design/pull/39372) [@foryuki](https://github.com/foryuki) - 🆕 Tooltip support `arrow` to change arrow's visible state and whether the arrow is pointed at the center of target. [#40234](https://github.com/ant-design/ant-design/pull/40234) [@kiner-tang](https://github.com/kiner-tang) -- 🆕 Added list pagination `align` option. [#39858](https://github.com/ant-design/ant-design/pull/39858) [@Yuiai01](https://github.com/Yuiai01) +- 🆕 Added List pagination `align` option. [#39858](https://github.com/ant-design/ant-design/pull/39858) [@Yuiai01](https://github.com/Yuiai01) - 🆕 Timeline added `items` to support option configuration. [#40424](https://github.com/ant-design/ant-design/pull/40424) - Collapse - 🆕 Collapse supports setting `size`. [#40286](https://github.com/ant-design/ant-design/pull/40286) [@Yuiai01](https://github.com/Yuiai01) @@ -658,18 +672,18 @@ timeline: true - 🆕 Tour added `indicatorsRender` to support custom indicators. [#40613](https://github.com/ant-design/ant-design/pull/40613) - 🆕 Tour support `scrollIntoViewOptions` to change scrollIntoView options. [#39980](https://github.com/ant-design/ant-design/pull/39980) [@kiner-tang](https://github.com/kiner-tang) - 🆕 Tour masks support passing custom styles and fill colors. [#39919](https://github.com/ant-design/ant-design/pull/39919) [@kiner-tang](https://github.com/kiner-tang) - - 🐞 Fixed `findDomNode` method warning thrown by the tour component when called in strict mode. [#40160](https://github.com/ant-design/ant-design/pull/40160) [@kiner-tang](https://github.com/kiner-tang) - - 💄 Deleted margin of the last indicator. [#40624](https://github.com/ant-design/ant-design/pull/40624) + - 🐞 Fixed Tour thrown `findDomNode` warning when called in strict mode. [#40160](https://github.com/ant-design/ant-design/pull/40160) [@kiner-tang](https://github.com/kiner-tang) + - 💄 Deleted Tour margin of the last indicator. [#40624](https://github.com/ant-design/ant-design/pull/40624) - 🆕 Adds Design token `fontFamilyCode` and apply to Typography `code` `kbd` `pre` elements. [#39823](https://github.com/ant-design/ant-design/pull/39823) - 🆕 ConfigProvider add Form `scrollToFirstError`. [#39509](https://github.com/ant-design/ant-design/pull/39509) [@linxianxi](https://github.com/linxianxi) -- 🐞 Fill rest `rootClassName` for all components. [#40217](https://github.com/ant-design/ant-design/pull/40217) +- 🆕 Global: Fill rest `rootClassName` for all components. [#40217](https://github.com/ant-design/ant-design/pull/40217) - 🐞 Fix Empty descriptions text color in default theme and dark theme. [#40584](https://github.com/ant-design/ant-design/pull/40584) [@MuxinFeng](https://github.com/MuxinFeng) - Table - 🐞 Fix `aria-label` and `role="presentation"` cannot be used together in Table row. [#40413](https://github.com/ant-design/ant-design/pull/40413) [@Ke1sy](https://github.com/Ke1sy) - - 🐞 Fix uncontrolled `filtered` update not working. [#39883](https://github.com/ant-design/ant-design/pull/39883) - - 🐞 Fix the problem that the header filter is invalid in the case of group headers. [#40463](https://github.com/ant-design/ant-design/pull/40463) [@roman40a](https://github.com/roman40a) - - 🐞 Fix selection column cover by other cell when fixed. [#39940](https://github.com/ant-design/ant-design/pull/39940) [@kiner-tang](https://github.com/kiner-tang) - - 🐞 Fix Sorted/Filtered table fixed column transparent background unreadable. [#39012](https://github.com/ant-design/ant-design/pull/39012) [@kiner-tang](https://github.com/kiner-tang) + - 🐞 Fix Table uncontrolled `filtered` update not working. [#39883](https://github.com/ant-design/ant-design/pull/39883) + - 🐞 Fix Table header filter is invalid in the case of group headers. [#40463](https://github.com/ant-design/ant-design/pull/40463) [@roman40a](https://github.com/roman40a) + - 🐞 Fix Table selection column cover by other cell when fixed. [#39940](https://github.com/ant-design/ant-design/pull/39940) [@kiner-tang](https://github.com/kiner-tang) + - 🐞 Fix Table Sorted/Filtered fixed column transparent background unreadable. [#39012](https://github.com/ant-design/ant-design/pull/39012) [@kiner-tang](https://github.com/kiner-tang) - 💄 Optimize Table hover style to fix problems with border. [#40469](https://github.com/ant-design/ant-design/pull/40469) - DatePicker - 🐞 Fix DatePicker that have status style when disabled. [#40608](https://github.com/ant-design/ant-design/pull/40608) @@ -688,10 +702,10 @@ timeline: true - 💄 Fix Select placeholder style issue. [#40477](https://github.com/ant-design/ant-design/pull/40477) [@Wxh16144](https://github.com/Wxh16144) - 💄 Adjust Descriptions label style for more readable. [#40085](https://github.com/ant-design/ant-design/pull/40085) - 💄 Optimize QRCode expiration display style. [#39849](https://github.com/ant-design/ant-design/pull/39849) -- 💄 Optimize `boxShadow` tokens. [#40516](https://github.com/ant-design/ant-design/pull/40516) +- 💄 Optimize Design Token `boxShadow` tokens. [#40516](https://github.com/ant-design/ant-design/pull/40516) - TypeScript - 🤖 Optimize Badge Tag Tooltip `color` type definition. [#39871](https://github.com/ant-design/ant-design/pull/39871) - - 🤖 Add `Breakpoint` `ThmeConfig` `GlobalToken` type export. [#40508](https://github.com/ant-design/ant-design/pull/40508) [@Kamahl19](https://github.com/Kamahl19) + - 🤖 MISC: Add `Breakpoint` `ThmeConfig` `GlobalToken` type export. [#40508](https://github.com/ant-design/ant-design/pull/40508) [@Kamahl19](https://github.com/Kamahl19) - 🤖 Update Upload `fileList` type. [#40585](https://github.com/ant-design/ant-design/pull/40585) - 🤖 Remove Tour ForwardRefRenderFunction. [#39924](https://github.com/ant-design/ant-design/pull/39924) - 🌐 Localization @@ -724,14 +738,14 @@ timeline: true - Menu - 🐞 Fix Tooltip incorrectly shown when Menu collapsed. [#40328](https://github.com/ant-design/ant-design/pull/40328) - 🐞 Fix Menu split line style error. [#40268](https://github.com/ant-design/ant-design/pull/40268) [@Wxh16144](https://github.com/Wxh16144) -- 🐞 Fix the console warning of wave effect when bind component unmount before wave effect trigger. [#40307](https://github.com/ant-design/ant-design/pull/40307) [@luo3house](https://github.com/luo3house) +- 🐞 Fix the console warning of Wave effect when bind component unmount before wave effect trigger. [#40307](https://github.com/ant-design/ant-design/pull/40307) [@luo3house](https://github.com/luo3house) - 🐞 Fix Breadcrumb throw wrong overlay deprecation warning when use `menu` prop. [#40211](https://github.com/ant-design/ant-design/pull/40211) [@candy4290](https://github.com/candy4290) - 🐞 Fix Modal.useModal hooks `destroyAll` not work as expect. [#40281](https://github.com/ant-design/ant-design/pull/40281) [@ds1371dani](https://github.com/ds1371dani) - 🐞 Fix `message` global static method `config` setting `duration` not working. [#40232](https://github.com/ant-design/ant-design/pull/40232) [@Yuiai01](https://github.com/Yuiai01) - 🐞 Fix Button text color when containing an `a` tag. [#40269](https://github.com/ant-design/ant-design/pull/40269) [@ds1371dani](https://github.com/ds1371dani) - 🐞 Fix Radio displaying wrong text color and cursor when `disabled`. [#40273](https://github.com/ant-design/ant-design/pull/40273) [@ds1371dani](https://github.com/ds1371dani) -- 💄 Optimize the calculation logic of focus `outline`, replace `lineWidth` with `lineWidthBold`. [#40291](https://github.com/ant-design/ant-design/pull/40291) [@simonpfish](https://github.com/simonpfish) -- 💄 Rewrite part component style to compatible the browser that not support concat `:not` selector. [#40264](https://github.com/ant-design/ant-design/pull/40264) +- 💄 Optimize Design Token calculation logic of focus `outline`, replace `lineWidth` with `lineWidthBold`. [#40291](https://github.com/ant-design/ant-design/pull/40291) [@simonpfish](https://github.com/simonpfish) +- 💄 MISC: Rewrite part component style to compatible the browser that not support concat `:not` selector. [#40264](https://github.com/ant-design/ant-design/pull/40264) - 🌐 Fix missing translation for `pt_BR`. [#40270](https://github.com/ant-design/ant-design/pull/40270) [@rafaelncarvalho](https://github.com/rafaelncarvalho) ## 5.1.5 @@ -757,7 +771,7 @@ timeline: true - 🐞 Fix missing locale file. [#40116](https://github.com/ant-design/ant-design/pull/40116) - 🐞 Fix Cascader dropdown `placement` in RTL mode. [#40109](https://github.com/ant-design/ant-design/pull/40109) [@3hson](https://github.com/3hson) -- 🐞 Fix animation flicking in some components. [react-component/motion#39](https://github.com/react-component/motion/pull/39) +- 🐞 Fix `rc-motion` animation flicking in some components. [react-component/motion#39](https://github.com/react-component/motion/pull/39) ## 5.1.3 @@ -779,16 +793,16 @@ timeline: true - 🐞 Fix Alert.ErrorBoundary description overflow bug. [#40033](https://github.com/ant-design/ant-design/pull/40033) - 💄 Fix Tag onClick as undefined, click the mouse to display the border style. [#40023](https://github.com/ant-design/ant-design/pull/40023) [@crazyair](https://github.com/crazyair) - 💄 Fix Avatar.Group item margin when item is wrapped by other elements. [#39993](https://github.com/ant-design/ant-design/pull/39993) -- 🐞 Fix Submenu arrow transition. [#39945](https://github.com/ant-design/ant-design/pull/39945) [@JarvisArt](https://github.com/JarvisArt) -- 🐞 Fix selection column cover by other cell when fixed. [#39940](https://github.com/ant-design/ant-design/pull/39940) [@kiner-tang](https://github.com/kiner-tang) +- 🐞 Fix Menu.Submenu arrow transition. [#39945](https://github.com/ant-design/ant-design/pull/39945) [@JarvisArt](https://github.com/JarvisArt) +- 🐞 Fix Table selection column cover by other cell when fixed. [#39940](https://github.com/ant-design/ant-design/pull/39940) [@kiner-tang](https://github.com/kiner-tang) - 🌐 Add missing ta_IN translations. [#39936](https://github.com/ant-design/ant-design/pull/39936) [@KIRUBASHANKAR26](https://github.com/KIRUBASHANKAR26) ## 5.1.2 `2022-12-30` -- 🆕 Theme Editor supports uploading themes. [#39621](https://github.com/ant-design/ant-design/pull/39621) [@BoyYangzai](https://github.com/BoyYangzai) -- 💄 Refactor wave effect that can now trigger multiple times. [#39705](https://github.com/ant-design/ant-design/pull/39705) [@li-jia-nan](https://github.com/li-jia-nan) +- 📖 Theme Editor supports uploading themes. [#39621](https://github.com/ant-design/ant-design/pull/39621) [@BoyYangzai](https://github.com/BoyYangzai) +- 💄 Refactor Wave effect that can now trigger multiple times. [#39705](https://github.com/ant-design/ant-design/pull/39705) [@li-jia-nan](https://github.com/li-jia-nan) - Table - 🐞 Fix Table `column.filtered` cannot be updated. [#39883](https://github.com/ant-design/ant-design/pull/39883) - 🐞 Fix Table fixed column which is sorted or filtered transparent background bug. [#39012](https://github.com/ant-design/ant-design/pull/39012) [@kiner-tang](https://github.com/kiner-tang) @@ -808,7 +822,7 @@ timeline: true - 📦 Remove IE and other legacy browsers from browserslist to reduce bundle size.[#38779](https://github.com/ant-design/ant-design/pull/38779) - ⚡️ Improve Transfer performance when selecting and moving nodes with large data.[#39465](https://github.com/ant-design/ant-design/pull/39465) [@wqs576222103](https://github.com/wqs576222103) -- 🐞 Fix wrong `font-family` of components. [#39806](https://github.com/ant-design/ant-design/pull/39806) +- 🐞 Fix Design Token wrong `font-family` of components. [#39806](https://github.com/ant-design/ant-design/pull/39806) - 🐞 Fix Drawer default props not working when `placement` `open` `width` are `undefined`. [#39782](https://github.com/ant-design/ant-design/pull/39782) - 🐞 Fix Menu icon animation when collapse it. [#39800](https://github.com/ant-design/ant-design/pull/39800) [@JarvisArt](https://github.com/JarvisArt) - 🐞 Fix Image preview operation bar is covered during the animation. [#39788](https://github.com/ant-design/ant-design/pull/39788) [@JarvisArt](https://github.com/JarvisArt) @@ -843,7 +857,7 @@ timeline: true - 🆕 Modal.confirm support `footer` prop. [#39048](https://github.com/ant-design/ant-design/pull/39048) [@owjs3901](https://github.com/owjs3901) - 🆕 Table support `rowScope` to set the column range. [#39571](https://github.com/ant-design/ant-design/pull/39571) - 🆕 Anchor support `items` data configuration option content, which supports nesting through children. [#39034](https://github.com/ant-design/ant-design/pull/39034) [@foryuki](https://github.com/foryuki) -- 🆕 Breakpoints can now follow theme token config. [#39105](https://github.com/ant-design/ant-design/pull/39105) [@azro352](https://github.com/azro352) +- 🆕 Grid breakpoints can now follow theme token config. [#39105](https://github.com/ant-design/ant-design/pull/39105) [@azro352](https://github.com/azro352) - 🆕 Tour prevButtonProps nextButtonProps support `style` `classname` prop. [#38939](https://github.com/ant-design/ant-design/pull/38939) [@ONLY-yours](https://github.com/ONLY-yours) - 🆕 ConfigProvider support config `select.showSearch`. [#39531](https://github.com/ant-design/ant-design/pull/39531) [@YinDongFang](https://github.com/YinDongFang) - 🐞 Fix Tabs `inkBar` not show in StrictMode. [#39653](https://github.com/ant-design/ant-design/pull/39653) @@ -857,13 +871,13 @@ timeline: true - 🐞 Fix Drawer unexpected warning about `DefaultProps`. [#39562](https://github.com/ant-design/ant-design/pull/39562) - Menu - 🐞 Fix Menu.Submenu will flicker when use `createRoot` to render. [#38855](https://github.com/ant-design/ant-design/pull/38855) [@JarvisArt](https://github.com/JarvisArt) - - 🛠 Refactor MenuItem to Function Component. [#38751](https://github.com/ant-design/ant-design/pull/38751) + - 🛠 Refactor Menu.MenuItem to Function Component. [#38751](https://github.com/ant-design/ant-design/pull/38751) - 💄 Optimize Menu item style when selected. [#39439](https://github.com/ant-design/ant-design/pull/39439) - 🛠 LocaleProvider has been deprecated in 4.x (use `` instead), we removed the related folder antd/es/locale-provider and antd/lib/locale-provider in 5.x. [#39373](https://github.com/ant-design/ant-design/pull/39373) - 🛠 Simplified lodash method introduction. [#39599](https://github.com/ant-design/ant-design/pull/39599) [#39602](https://github.com/ant-design/ant-design/pull/39602) - TypeScript - 🤖 Optimize Button DropDown Modal Popconfirm Select Transfer mouse event type definition. [#39533](https://github.com/ant-design/ant-design/pull/39533) - - 🤖 New export type `FloatButtonGroupProps`. [#39553](https://github.com/ant-design/ant-design/pull/39553) + - 🤖 New export FloatButton type `FloatButtonGroupProps`. [#39553](https://github.com/ant-design/ant-design/pull/39553) - 🌐 Localization - 🇧🇪 Add `fr_BE` locale. [#39415](https://github.com/ant-design/ant-design/pull/39415) [@azro352](https://github.com/azro352) - 🇨🇦 Add `fr_CA` locale. [#39416](https://github.com/ant-design/ant-design/pull/39416) [@azro352](https://github.com/azro352) @@ -905,7 +919,7 @@ timeline: true - 💄 Fix Select search input with white space style issue. [#39299](https://github.com/ant-design/ant-design/pull/39299) - 💄 Fix Tree missing selection style. [#39292](https://github.com/ant-design/ant-design/pull/39292) - 🐞 Fix FloatButton content not align when customize size. [#39282](https://github.com/ant-design/ant-design/pull/39282) [@li-jia-nan](https://github.com/li-jia-nan) -- 🐞 Fix RangePicker cell hover style. [#39266](https://github.com/ant-design/ant-design/pull/39266) +- 🐞 Fix DatePicker.RangePicker cell hover style. [#39266](https://github.com/ant-design/ant-design/pull/39266) - 💄 Optimize Button style under Space.Compact. [#39241](https://github.com/ant-design/ant-design/pull/39241) [@foryuki](https://github.com/foryuki) - 🌐 Fix `vi_VN` i18n mistake. [#39279](https://github.com/ant-design/ant-design/pull/39279) [@nghiepdev](https://github.com/nghiepdev) - 🌐 Fix `he_IL` i18n mistake. [#39280](https://github.com/ant-design/ant-design/pull/39280) [@Ran-Sagy](https://github.com/Ran-Sagy) @@ -921,11 +935,11 @@ timeline: true - 🐞 Fix Modal.info content width when without icon. [#39047](https://github.com/ant-design/ant-design/pull/39047) [@owjs3901](https://github.com/owjs3901) - 🐞 Fix Tree config `checkable` and `blockNode` not makes `title` stretch issue. [#39209](https://github.com/ant-design/ant-design/pull/39209) [@Wxh16144](https://github.com/Wxh16144) - 🐞 Fix Dropdown sub menu missing motion. [#39235](https://github.com/ant-design/ant-design/pull/39235) -- 💄 Fix RangePicker time panel padding style. [#39228](https://github.com/ant-design/ant-design/pull/39228) +- 💄 Fix DatePicker.RangePicker time panel padding style. [#39228](https://github.com/ant-design/ant-design/pull/39228) - 🐞 Fix Card action button round style. [#39210](https://github.com/ant-design/ant-design/pull/39210) [@MuxinFeng](https://github.com/MuxinFeng) - 🐞 Fix Badge wave effect color not follow `color`. [#39182](https://github.com/ant-design/ant-design/pull/39182) [@li-jia-nan](https://github.com/li-jia-nan) - 🐞 Fix Radio disabled status check style. [#39165](https://github.com/ant-design/ant-design/pull/39165) [@Wxh16144](https://github.com/Wxh16144) -- 🐞 Fixed TextArea count style when `resize` is not `none`. [#39121](https://github.com/ant-design/ant-design/pull/39121) [@51wangping](https://github.com/51wangping) +- 🐞 Fixed Input.TextArea count style when `resize` is not `none`. [#39121](https://github.com/ant-design/ant-design/pull/39121) [@51wangping](https://github.com/51wangping) - 🐞 Fix Transfer clicking the checkbox position cannot be unchecked and onSelectChange is triggered twice. [#39078](https://github.com/ant-design/ant-design/pull/39078) [@edc-hui](https://github.com/edc-hui) - 🐞 Fix Steps set `size="small"` with progress not fully display. [#39100](https://github.com/ant-design/ant-design/pull/39100) [@Wxh16144](https://github.com/Wxh16144) - 🐞 Fix Form horizontal layout with `xs` responsive config not work. [#39130](https://github.com/ant-design/ant-design/pull/39130) @@ -942,7 +956,7 @@ timeline: true - 🐞 Fix Menu.Item hover area when trigger active color change. [#39077](https://github.com/ant-design/ant-design/pull/39077) [@Pulset](https://github.com/Pulset) - 🐞 Fix Input.TextArea resize behavior by adding reset style. [aa92f02](https://github.com/ant-design/ant-design/commit/aa92f02) - 🐞 Fix Upload default icon color. [#39114](https://github.com/ant-design/ant-design/pull/39114) [@MARKX97](https://github.com/MARKX97) -- 🐞 Fix ssr warning in dev mode caused by dynamic hashId. [#39069](https://github.com/ant-design/ant-design/pull/39069) +- 🐞 Fix `@ant-design/cssinjs` ssr warning in dev mode caused by dynamic hashId. [#39069](https://github.com/ant-design/ant-design/pull/39069) - 🐞 Fix FloatButton.Group flicking on closing. [#39061](https://github.com/ant-design/ant-design/pull/39061) - 🐞 Fix Card.Meta that width is not 100%. [#39026](https://github.com/ant-design/ant-design/pull/39026) [@justanotheranonymoususer](https://github.com/justanotheranonymoususer) @@ -951,7 +965,7 @@ timeline: true `2022-11-27` - 💄 Fix Card radius style broken when customize `bodyStyle` background color. [#38973](https://github.com/ant-design/ant-design/pull/38973) [@Yukiniro](https://github.com/Yukiniro) -- 💄 Optimize default algorithm for error color. [#38933](https://github.com/ant-design/ant-design/pull/38933) +- 💄 Optimize Design Token default algorithm for error color. [#38933](https://github.com/ant-design/ant-design/pull/38933) - 💄 Optimize the style issue in RTL mode. [#38829](https://github.com/ant-design/ant-design/pull/38829) [@Wxh16144](https://github.com/Wxh16144) - Space.Compact - 💄 Optimize Space.Compact style when wrapping a single child component. [#38896](https://github.com/ant-design/ant-design/pull/38896) [@foryuki](https://github.com/foryuki) @@ -974,7 +988,7 @@ timeline: true - 💄 Optimize Empty svg color in dark theme. [#38785](https://github.com/ant-design/ant-design/pull/38785) - 💄 Fix Form, Input, Select, Tree part style convert to CSS-in-JS missing. [#38742](https://github.com/ant-design/ant-design/pull/38742) -- 💄 Fix animation flick for some components in Firefox. [#38729](https://github.com/ant-design/ant-design/pull/38729) +- 💄 Fix Dropdown animation flick in Firefox. [#38729](https://github.com/ant-design/ant-design/pull/38729) - Menu - 🐞 Fix Menu SubMenu margin style. [#38714](https://github.com/ant-design/ant-design/pull/38714) [@JarvisArt](https://github.com/JarvisArt) - 🐞 Fix Menu height in dark theme. [#38741](https://github.com/ant-design/ant-design/pull/38741) [@LuciNyan](https://github.com/LuciNyan) diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index ee109453a33c..c38251ffce4e 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -3,6 +3,7 @@ order: 6 title: 更新日志 toc: false timeline: true +tag: vVERSION --- `antd` 遵循 [Semantic Versioning 2.0.0](http://semver.org/lang/zh-CN/) 语义化版本规范。 @@ -15,19 +16,30 @@ timeline: true --- +## 5.8.2 + +`2023-08-04` + +- 🐞 修复 Checkbox 与 Radio 不支持自定义水波纹效果的问题,并添加 `ant-wave-target` className 到对应元素上。[#44014](https://github.com/ant-design/ant-design/pull/44014) +- 🐞 调整 Form.Item renderProps 定义,现在会返回正确的 `FormInstance`。[#43996](https://github.com/ant-design/ant-design/pull/43996) +- 🐞 修复 Table 在 `direction` 为 `rlt` 时展开图标的方向和展开行的缩进有误的问题。[#43977](https://github.com/ant-design/ant-design/pull/43977) [@Yuiai01](https://github.com/Yuiai01) +- 💄 修复 Pagination 组件禁用状态仍然有悬浮和聚焦样式的问题。[#43970](https://github.com/ant-design/ant-design/pull/43970) [@MadCcc](https://github.com/MadCcc) +- TypeScript + - 🤖 修正 Drawer 和 Anchor 部分 Design Token 的 TS 描述信息错误的问题。[#43994](https://github.com/ant-design/ant-design/pull/43994) [@wving5](https://github.com/wving5) + ## 5.8.1 `2023-08-02` -- 🐞 修复预期外的 `clearIcon` 废弃报错。[#43945](https://github.com/ant-design/ant-design/pull/43945) [@kiner-tang](https://github.com/kiner-tang) +- 🐞 修复 Select、TreeSelect、Cascader、DatePicker 预期外的 `clearIcon` 废弃报错。[#43945](https://github.com/ant-design/ant-design/pull/43945) [@kiner-tang](https://github.com/kiner-tang) - TypeScript - - 🤖 导出 `MappingAlgorithm` 作为主题算法的类型。[#43953](https://github.com/ant-design/ant-design/pull/43953) + - 🤖 导出 `MappingAlgorithm` 作为 Design Token 主题算法的类型。[#43953](https://github.com/ant-design/ant-design/pull/43953) ## 5.8.0 `2023-08-01` -- 🔥 组件 Token 支持配置 `algorithm` 参数,添加配置即可像全局 Token 一样由部分修改的 token 计算派生 token 的值并用于组件样式中。[#43810](https://github.com/ant-design/ant-design/pull/43810) [@MadCcc](https://github.com/MadCcc) +- 🔥 组件 ComponentToken 支持配置 `algorithm` 参数,添加配置即可像全局 Token 一样由部分修改的 token 计算派生 token 的值并用于组件样式中。[#43810](https://github.com/ant-design/ant-design/pull/43810) [@MadCcc](https://github.com/MadCcc) - 🔥 Modal hooks 方法支持 `await` 调用。[#43470](https://github.com/ant-design/ant-design/pull/43470) - 🔥 ConfigProvider 支持 `wave` 配置以自定义水波纹效果。[#43784](https://github.com/ant-design/ant-design/pull/43784) - 🆕 Form 新增 `getFieldsValue({ strict: true })` 以支持获取仅通过 Item 绑定的字段。[#43828](https://github.com/ant-design/ant-design/pull/43828) @@ -35,7 +47,7 @@ timeline: true - 🆕 ColorPicker 支持 `disabledAlpha` 属性。[#43355](https://github.com/ant-design/ant-design/pull/43355) [@RedJue](https://github.com/RedJue) - 🆕 Avatar.Group 支持设置 `shape` 属性。[#43817](https://github.com/ant-design/ant-design/pull/43817) [@li-jia-nan](https://github.com/li-jia-nan) - 🆕 AutoComplete/Cascader/DatePicker/Input.Textarea/TimePicker/TreeSelect 组件均已支持通过 `allowClear.clearIcon` 属性自定义清除按钮。[#43582](https://github.com/ant-design/ant-design/discussions/43582) [@kiner-tang](https://github.com/kiner-tang) -- 🆕 RangePicker `presets` 属性支持回调函数。[#43476](https://github.com/ant-design/ant-design/pull/43476) [@Wxh16144](https://github.com/Wxh16144) +- 🆕 DatePicker.RangePicker `presets` 属性支持回调函数。[#43476](https://github.com/ant-design/ant-design/pull/43476) [@Wxh16144](https://github.com/Wxh16144) - 🆕 Image 新增 `preivew={{ movable: Boolean }}` 属性以支持可拖拽到文件夹。[#43823](https://github.com/ant-design/ant-design/pull/43823) [@linxianxi](https://github.com/linxianxi) - 🆕 Slider `tooltip` 支持配置 `autoAdjustOverflow` 属性。[#43788](https://github.com/ant-design/ant-design/pull/43788) - 🆕 Transfer 组件新增 `selectionsIcon` 属性以支持自定义下拉菜单图标。[#43773](https://github.com/ant-design/ant-design/pull/43773) [@li-jia-nan](https://github.com/li-jia-nan) @@ -48,7 +60,7 @@ timeline: true - 🐞 修复 Slider 中描述信息和滑块手柄重叠问题。[#43780](https://github.com/ant-design/ant-design/pull/43780) [@Wxh16144](https://github.com/Wxh16144) - 🐞 修复 Select 弹出框翻转时动画不正确的问题。[#43764](https://github.com/ant-design/ant-design/pull/43764) - 🐞 修复 InputNumber 在圆角不同下的样式异常。[#43875](https://github.com/ant-design/ant-design/pull/43875) [@yee94](https://github.com/yee94) -- 💄 优化了 CloseCircleFilled/CloseSquareFilled/CloseOutlined/CloseCircleOutlined/CloseSquareOutlined/ExportOutlined/ImportOutlined 等图标的设计。[824500](https://github.com/ant-design/ant-design-icons/commit/824500349894a87562f033dbdc5e3c5d301a2f5c) +- 💄 `@ant-design/icons` 优化了 CloseCircleFilled / CloseSquareFilled / CloseOutlined / CloseCircleOutlined / CloseSquareOutlined / ExportOutlined / ImportOutlined 等图标的设计。[824500](https://github.com/ant-design/ant-design-icons/commit/824500349894a87562f033dbdc5e3c5d301a2f5c) - 💄 修复和其他使用 `@ant-design/cssinjs` 的组件库混合使用,antd 的样式总是会插入在最前面,以避免加载顺序导致的样式覆盖问题。[#43847](https://github.com/ant-design/ant-design/pull/43847) - 💄 优化 message 和 notification 渲染逻辑,现在在 SSR 环境下不会导出样式。[#43808](https://github.com/ant-design/ant-design/pull/43808) - ⌨️ 修复 Select `aria-activedescendant` 缺少有效值的问题。[#43800](https://github.com/ant-design/ant-design/pull/43800) @@ -95,8 +107,11 @@ timeline: true - 🐞 修复 Tag 仅传入 `icon` 时渲染多余间距的问题。[#43518](https://github.com/ant-design/ant-design/pull/43518) [@Yuiai01](https://github.com/Yuiai01) - 🐞 修复 ColorPicker 不跟随表单校验状态改变 UI 的问题。[#42880](https://github.com/ant-design/ant-design/pull/42880) [@RedJue](https://github.com/RedJue) - TypeScript - - 🤖 修复 `SpaceContext` 没有正确导出的问题。[#43501](https://github.com/ant-design/ant-design/pull/43501) [@VovkaGoodwin](https://github.com/VovkaGoodwin) - - 🤖 优化部分组件 TS 定义实现。[#43581](https://github.com/ant-design/ant-design/pull/43581) [#43545](https://github.com/ant-design/ant-design/pull/43545) [#43588](https://github.com/ant-design/ant-design/pull/43588) [#43610](https://github.com/ant-design/ant-design/pull/43610) [#43629](https://github.com/ant-design/ant-design/pull/43629),感谢 [@thinkasany](https://github.com/thinkasany)、[@li-jia-nan](https://github.com/li-jia-nan) 的贡献。 + - 🤖 修复 Space 的 `SpaceContext` 没有正确导出的问题。[#43501](https://github.com/ant-design/ant-design/pull/43501) [@VovkaGoodwin](https://github.com/VovkaGoodwin) + - 🤖 优化 AutoComplete 组件 TS 定义实现。[#43581](https://github.com/ant-design/ant-design/pull/43581) [@thinkasany](https://github.com/thinkasany) + - 🤖 优化 Select 和 List 组件 TS 定义实现。[#43545](https://github.com/ant-design/ant-design/pull/43545) [@thinkasany](https://github.com/thinkasany) + - 🤖 优化 Button 组件 TS 定义实现。[#43588](https://github.com/ant-design/ant-design/pull/43588) [#43629](https://github.com/ant-design/ant-design/pull/43629) [@thinkasany](https://github.com/thinkasany) + - 🤖 优化 Cascader、ConfigProvider、DatePicker、InputNumber、Slider 和 Upload 组件 TS 定义实现。[#43610](https://github.com/ant-design/ant-design/pull/43610) ## 5.7.0 @@ -104,12 +119,12 @@ timeline: true - 🆕 ConfigProvider 支持所有组件的 `className` 和 `style` 属性控制。感谢 [@Yuiai01](https://github.com/Yuiai01)、[@li-jia-nan](https://github.com/li-jia-nan) 和 [@MuxinFeng](https://github.com/MuxinFeng) 的贡献。 - 🆕 Badge 支持 `classNames` 属性和 `styles` 属性。[#43245](https://github.com/ant-design/ant-design/pull/43245) [@li-jia-nan](https://github.com/li-jia-nan) -- 🆕 ColorPicker 支持 `showText`、`destroyTooltipOnHide`、`onChangeComplete`、`panelRender`、`size` 等新特性。 - - [#42865](https://github.com/ant-design/ant-design/pull/42865) [@RedJue](https://github.com/RedJue) - - [#42645](https://github.com/ant-design/ant-design/pull/42645) [@linxianxi](https://github.com/linxianxi) - - [#43370](https://github.com/ant-design/ant-design/pull/43370) [@RedJue](https://github.com/RedJue) - - [#43134](https://github.com/ant-design/ant-design/pull/43134) [@RedJue](https://github.com/RedJue) - - [#43116](https://github.com/ant-design/ant-design/pull/43116) [@RedJue](https://github.com/RedJue) +- ColorPicker + - 🆕 ColorPicker 支持 `showText`。[#42865](https://github.com/ant-design/ant-design/pull/42865) [@RedJue](https://github.com/RedJue) + - 🆕 ColorPicker 支持 `destroyTooltipOnHide`。[#42645](https://github.com/ant-design/ant-design/pull/42645) [@linxianxi](https://github.com/linxianxi) + - 🆕 ColorPicker 支持 `onChangeComplete`。[#43370](https://github.com/ant-design/ant-design/pull/43370) [@RedJue](https://github.com/RedJue) + - 🆕 ColorPicker 支持 `panelRender`。[#43134](https://github.com/ant-design/ant-design/pull/43134) [@RedJue](https://github.com/RedJue) + - 🆕 ColorPicker 支持 `size`。[#43116](https://github.com/ant-design/ant-design/pull/43116) [@RedJue](https://github.com/RedJue) - 🆕 Alert、Drawer、Modal、Notifaction、Tag、Tabs 均已支持通过设置 `closeIcon` 为 null 或 false 隐藏关闭按钮。 [#42828](https://github.com/ant-design/ant-design/discussions/42828) [@kiner-tang](https://github.com/kiner-tang) - 🆕 Anchor 添加 `replace` 属性。[#43006](https://github.com/ant-design/ant-design/pull/43006) [@ds1371dani](https://github.com/ds1371dani) - 🆕 Image 支持 `imageRender`、`toolbarRender` 属性以支持预览图和工具栏的自定义渲染,还支持了 `onTransform`、`minScale`、`maxScale` 等新属性,Image.PreviewGroup 支持 `items` 属性传入列表数据,并修复了 img 标签的原生属性没有传递给预览图的问题。[#43075](https://github.com/ant-design/ant-design/pull/43075) [@linxianxi](https://github.com/linxianxi) @@ -119,14 +134,14 @@ timeline: true - 🐞 移除 Anchor/CollapsePanel/Input.Group 组件中 `className` 属性的默认值(空字符串)。 [#43481](https://github.com/ant-design/ant-design/pull/43481) [@thinkasany](https://github.com/thinkasany) - 🐞 修复 Upload 上传进度条延迟消失且丢失动画效果的问题。[#43471](https://github.com/ant-design/ant-design/pull/43471) - 🐞 为 Menu 中组件 Token `colorItemBgSelected` 添加废弃警告。[#43461](https://github.com/ant-design/ant-design/pull/43461) [@MadCcc](https://github.com/MadCcc) -- 🐞 修复样式特性支持检测时部分浏览器因为未重绘导致出现滚动条的问题。[#43358](https://github.com/ant-design/ant-design/pull/43358) [@LeeeeeeM](https://github.com/LeeeeeeM) +- 🐞 杂项:修复样式特性支持检测时部分浏览器因为未重绘导致出现滚动条的问题。[#43358](https://github.com/ant-design/ant-design/pull/43358) [@LeeeeeeM](https://github.com/LeeeeeeM) - 🐞 修复 Card `tabList` 为空时 Tab 完全不展示的问题。[#43416](https://github.com/ant-design/ant-design/pull/43416) [@linxianxi](https://github.com/linxianxi) - 🐞 修复 ConfigProvider 嵌套使用时,`form.validateMessages` 配置会丢失的问题。[#43239](https://github.com/ant-design/ant-design/pull/43239) [@Wxh16144](https://github.com/Wxh16144) - 🐞 修复 Tag 点击的水波纹效果有时候会和 Tag 元素产生偏移的问题。[#43402](https://github.com/ant-design/ant-design/pull/43402) - 🐞 修复 DatePicker 切换到年月面板时,`此刻` 点击无效的问题。[#43367](https://github.com/ant-design/ant-design/pull/43367) [@Yuiai01](https://github.com/Yuiai01) -- 🐞 修复 TextArea 组件在屏幕大小变化时设置的高度失效的问题。[#43169](https://github.com/ant-design/ant-design/pull/43169) [@MadCcc](https://github.com/MadCcc) +- 🐞 修复 Input.TextArea 组件在屏幕大小变化时设置的高度失效的问题。[#43169](https://github.com/ant-design/ant-design/pull/43169) [@MadCcc](https://github.com/MadCcc) - 💄 Slider 中 `tooltip` 在内容很少时应该居中。[#43430](https://github.com/ant-design/ant-design/pull/43430) [@Jomorx](https://github.com/Jomorx) -- 💄 将 `colorLink` 添加至 seed token 中, `colorLinkHover` 和 `colorLinkActive` 将会由 `colorLink` 计算得出。[#43183](https://github.com/ant-design/ant-design/pull/43183) [@MadCcc](https://github.com/MadCcc) +- 💄 Design Token 将 `colorLink` 添加至 seed token 中, `colorLinkHover` 和 `colorLinkActive` 将会由 `colorLink` 计算得出。[#43183](https://github.com/ant-design/ant-design/pull/43183) [@MadCcc](https://github.com/MadCcc) - 💄 调整 Slider 中部分 token 为 component token。[#42428](https://github.com/ant-design/ant-design/pull/42428) [@heiyu4585](https://github.com/heiyu4585) - RTL - 🤖 Progress 支持 rtl 方向的动画。[#43316](https://github.com/ant-design/ant-design/pull/43316) [@Yuiai01](https://github.com/Yuiai01) @@ -134,13 +149,12 @@ timeline: true - 🤖 Popover 增加 `RawPurePanelProps` 接口描述。[#43453](https://github.com/ant-design/ant-design/pull/43453) [@thinkasany](https://github.com/thinkasany) - 🤖 Popconfirm 替换 `ref` 类型 `unknown` 为 `TooltipRef`。[#43452](https://github.com/ant-design/ant-design/pull/43452) [@thinkasany](https://github.com/thinkasany) - 🤖 Popover 替换 `ref` 类型 `unknown` 为 `TooltipRef`。[#43450](https://github.com/ant-design/ant-design/pull/43450) [@Negentropy247](https://github.com/Negentropy247) - - 🤖 改进 ButtonGroup 中 `GroupSizeContext` 的类型声明。[#43439](https://github.com/ant-design/ant-design/pull/43439) [@thinkasany](https://github.com/thinkasany) + - 🤖 改进 Button.ButtonGroup 中 `GroupSizeContext` 的类型声明。[#43439](https://github.com/ant-design/ant-design/pull/43439) [@thinkasany](https://github.com/thinkasany) - 🤖 改进 Select 的 `mode` 属性的类型声明。[#43413](https://github.com/ant-design/ant-design/pull/43413) [@thinkasany](https://github.com/thinkasany) - 🤖 Checkbox 替换 `ref` 类型 `unknown` 为 `CheckboxRef`。[#43424](https://github.com/ant-design/ant-design/pull/43424) [@li-jia-nan](https://github.com/li-jia-nan) - - 🤖 改进 Table/Tag/Notification 内部类型实现。 - - [#43366](https://github.com/ant-design/ant-design/pull/43366) [@li-jia-nan](https://github.com/li-jia-nan) - - [#43357](https://github.com/ant-design/ant-design/pull/43357) [@thinkasany](https://github.com/thinkasany) - - [#43351](https://github.com/ant-design/ant-design/pull/43351) [@thinkasany](https://github.com/thinkasany) + - 🤖 改进 Table 内部类型实现。[#43366](https://github.com/ant-design/ant-design/pull/43366) [@li-jia-nan](https://github.com/li-jia-nan) + - 🤖 改进 Tag 内部类型实现。[#43357](https://github.com/ant-design/ant-design/pull/43357) [@thinkasany](https://github.com/thinkasany) + - 🤖 改进 Notification 内部类型实现。[#43351](https://github.com/ant-design/ant-design/pull/43351) [@thinkasany](https://github.com/thinkasany) ## 5.6.4 @@ -165,9 +179,9 @@ timeline: true `2023-06-25` -- BreadCrumb - - 🐞 修复 BreadCrumb 传递 `dropdownProps` 不生效的问题。[#43151](https://github.com/ant-design/ant-design/pull/43151) [@linxianxi](https://github.com/linxianxi) - - 🛠 优化 BreadCrumb 处理 `title` 为 `null` 时的行为。[#43099](https://github.com/ant-design/ant-design/pull/43099) [@Asanio06](https://github.com/Asanio06) +- Breadcrumb + - 🐞 修复 Breadcrumb 传递 `dropdownProps` 不生效的问题。[#43151](https://github.com/ant-design/ant-design/pull/43151) [@linxianxi](https://github.com/linxianxi) + - 🛠 优化 Breadcrumb 处理 `title` 为 `null` 时的行为。[#43099](https://github.com/ant-design/ant-design/pull/43099) [@Asanio06](https://github.com/Asanio06) - 🐞 修复 Slider 在 Form 内部时的禁用状态。[#43142](https://github.com/ant-design/ant-design/pull/43142) [@Starpuccino](https://github.com/Starpuccino) - 🐞 修复 Form 标签偏移值在垂直布局中不生效的问题。[#43155](https://github.com/ant-design/ant-design/pull/43155) [@kiner-tang](https://github.com/kiner-tang) - 🐞 修复 Table 打开筛选面板会报 `react ref` 错误警告信息。[#43139](https://github.com/ant-design/ant-design/pull/43139) @@ -188,7 +202,7 @@ timeline: true - 🐞 修复 InputNumber 设置 `prefix` 在 Form.Item `hasFeedBack` 内高度异常的问题。[#43049](https://github.com/ant-design/ant-design/pull/43049) - 💄 修复 Input 和 InputNumber 禁用状态样式。[#42974](https://github.com/ant-design/ant-design/pull/42974) [@kampiu](https://github.com/kampiu) - 🐞 修复 Upload 配置 `maxCount` 后,上传超出范围的文件仍然会触发 `onChange` 事件的问题。[#43034](https://github.com/ant-design/ant-design/pull/43034) -- 🐞 修复打包时即便没有使用 `rc-field-form` 包仍然会包含它的问题。[#43023](https://github.com/ant-design/ant-design/pull/43023) +- 🐞 修复打包时即便没有使用 Form,`rc-field-form` 包仍然会包含它的问题。[#43023](https://github.com/ant-design/ant-design/pull/43023) - 🐞 修复 DatePicker 动态设置 `disabledTime` 时值不正确的问题。[#42991](https://github.com/ant-design/ant-design/pull/42991) [@linxianxi](https://github.com/linxianxi) - 📖 补充 FloatButton 受控实例,并添加对应的 warning 提示。[#42835](https://github.com/ant-design/ant-design/pull/42835) [@poyiding](https://github.com/poyiding) - 🐞 修复 Button 禁用时子节点仍然可以交互的问题。[#42949](https://github.com/ant-design/ant-design/pull/42949) [@kiner-tang](https://github.com/kiner-tang) @@ -214,7 +228,7 @@ timeline: true - 🆕 ColorPicker 添加 `onClear` 属性,清除选中颜色时不自动关闭弹窗。[#42634](https://github.com/ant-design/ant-design/pull/42634) [@linxianxi](https://github.com/linxianxi) - 🆕 Collapse 支持通过 `items` 属性来配置面板内容。[#42545](https://github.com/ant-design/ant-design/pull/42545) [@kiner-tang](https://github.com/kiner-tang) -- 🆕 新增静态方法 `getDesignToken` 用于获取完整的主题 token。[#42723](https://github.com/ant-design/ant-design/pull/42723) [@MadCcc](https://github.com/MadCcc) +- 🆕 Design Token 新增静态方法 `getDesignToken` 用于获取完整的主题 token。[#42723](https://github.com/ant-design/ant-design/pull/42723) [@MadCcc](https://github.com/MadCcc) - 🆕 ConfigProvider 支持配置 Space 组件的 `classNames` 和 `styles` 属性。[#42748](https://github.com/ant-design/ant-design/pull/42748) [@RedJue](https://github.com/RedJue) - 🆕 Space 组件支持 `classNames` 和 `styles` 属性。[#42743](https://github.com/ant-design/ant-design/pull/42743) [@RedJue](https://github.com/RedJue) - 🆕 Drawer 抽屉面板支持事件监听,包裹元素支持传入 `data-*` 属性。[#42718](https://github.com/ant-design/ant-design/pull/42718) [@kiner-tang](https://github.com/kiner-tang) @@ -291,7 +305,7 @@ timeline: true - 💄 修复 Tag 无边框样式在 `error` 等状态下不生效的问题。[#42619](https://github.com/ant-design/ant-design/pull/42619) [@li-jia-nan](https://github.com/li-jia-nan) - 💄 修复 Table `rowSpan` 悬浮高亮背景颜色丢失的问题。[#42572](https://github.com/ant-design/ant-design/pull/42572) - 💄 修复 Pagination 在禁用状态下 link 图标和 ellipsis hover 时的样式。[#42541](https://github.com/ant-design/ant-design/pull/42541) [@qmhc](https://github.com/qmhc) -- 💄 修复部分全局 Token 无法覆盖组件样式的问题。[#42535](https://github.com/ant-design/ant-design/pull/42535) [@MadCcc](https://github.com/MadCcc) +- 💄 修复部分全局 Design Token 无法覆盖组件样式的问题。[#42535](https://github.com/ant-design/ant-design/pull/42535) [@MadCcc](https://github.com/MadCcc) - 🇱🇹 为 `lt_LT` 添加缺失的部分文案。[#42664](https://github.com/ant-design/ant-design/pull/42664) [@Digital-512](https://github.com/Digital-512) - RTL - 💄 修复 ColorPicker 组件 RTL 模式样式。[#42716](https://github.com/ant-design/ant-design/pull/42716) [@RedJue](https://github.com/RedJue) @@ -324,7 +338,7 @@ timeline: true `2023-05-15` -- 🔥 新增颜色选择器组件。[#41990](https://github.com/ant-design/ant-design/pull/41990) [@RedJue](https://github.com/RedJue) +- 🔥 新增颜色选择器组件 ColorPicker。[#41990](https://github.com/ant-design/ant-design/pull/41990) [@RedJue](https://github.com/RedJue) - 🆕 新增 `DatePicker.generateCalendar` 与 `Calendar.generateCalendar` 自定义日期库组件方法,不再需要通过路径引入使用。[#41773](https://github.com/ant-design/ant-design/pull/41773) - 💄 优化 Select、TreeSelect、Cascader 多选模式下的样式,去除标签的边框。[#41480](https://github.com/ant-design/ant-design/pull/41480) - 🆕 Form `validateFields` 支持 `validateOnly` 配置仅做校验而不改变 UI 状态。[#42273](https://github.com/ant-design/ant-design/pull/42273) @@ -341,7 +355,7 @@ timeline: true - 🐞 修复 ConfigProvider `size` 对 Descriptions 无效的问题。[#42244](https://github.com/ant-design/ant-design/pull/42244) [@wanghui2021](https://github.com/wanghui2021) - 🐞 修复当 ConfigProvider 中 `componentSize` 被设定时, Space.Compact 没有继承的问题。[#42199](https://github.com/ant-design/ant-design/pull/42199) [@Ec-tracker](https://github.com/Ec-tracker) - 🐞 修复 Input 在 Space.Compact 下使用图标的样式错误。[#42167](https://github.com/ant-design/ant-design/pull/42167) [@pengyw97](https://github.com/pengyw97) -- 🐞 修复当 `title` 和 `content` 属性均为空值时,Popover 组件展示空白气泡的问题。[#42217](https://github.com/ant-design/ant-design/pull/42217) [@hairgc](https://github.com/hairgc) +- 🐞 修复 Popover 当 `title` 和 `content` 属性均为空值时,展示空白气泡的问题。[#42217](https://github.com/ant-design/ant-design/pull/42217) [@hairgc](https://github.com/hairgc) - 🐞 修复 Circle Progress 未设置 `size` 的报错问题。[#41875](https://github.com/ant-design/ant-design/pull/41875) [@notzheng](https://github.com/notzheng) - 🐞 修复 Progress 抛出的警告 `findDOMNode is deprecated in StrictMode`。[#42241](https://github.com/ant-design/ant-design/pull/42241) [@BoyYangzai](https://github.com/BoyYangzai) - 💄 修复 InputNumber 超出范围样式不生效的问题。[#42250](https://github.com/ant-design/ant-design/pull/42250) [@pengyw97](https://github.com/pengyw97) @@ -351,7 +365,7 @@ timeline: true - 💄 完善 Menu 溢出时样式。[#42294](https://github.com/ant-design/ant-design/pull/42294) [@dhalenok](https://github.com/dhalenok) - 💄 完善 Segmented 鼠标 active 样式。[#42249](https://github.com/ant-design/ant-design/pull/42249) - 🤖 Spin 添加在非嵌套下使用 `tip` 的警告提示。[#42293](https://github.com/ant-design/ant-design/pull/42293) -- 🤖 组件 Token 名称规范化。[#42184](https://github.com/ant-design/ant-design/pull/42184) +- 🤖 组件 ComponentToken 名称规范化。[#42184](https://github.com/ant-design/ant-design/pull/42184) - TypeScript - 🤖 完善 Tag 的类型定义。[#42235](https://github.com/ant-design/ant-design/pull/42235) [@gaoqiiii](https://github.com/gaoqiiii) - 🤖 完善 Notification `getContainer` 类型定义。[#40206](https://github.com/ant-design/ant-design/pull/40206) [@leshalv](https://github.com/leshalv) @@ -381,8 +395,8 @@ timeline: true - 🐞 修复响应式 Col `colSize` 不支持 `flex` 的问题。[#41962](https://github.com/ant-design/ant-design/pull/41962) [@AlexisSniffer](https://github.com/AlexisSniffer) - 🐞 修复 Carousel `goTo` 在动画播放时无效的问题。[#41969](https://github.com/ant-design/ant-design/pull/41969) [@guan404ming](https://github.com/guan404ming) - Form -- 🐞 修复 Form 触发重置事件后反馈图标未重置的问题。[#41976](https://github.com/ant-design/ant-design/pull/41976) -- 🐞 修复 `onValuesChange` 收集到的数据不准确的问题。[#41976](https://github.com/ant-design/ant-design/pull/41976) + - 🐞 修复 Form 触发重置事件后反馈图标未重置的问题。[#41976](https://github.com/ant-design/ant-design/pull/41976) + - 🐞 修复 Form `onValuesChange` 收集到的数据不准确的问题。[#41976](https://github.com/ant-design/ant-design/pull/41976) - TypeScript - 🤖 修复 Menu 报错 OverrideContext 类型定义不存在的问题。[#41907](https://github.com/ant-design/ant-design/pull/41907) - 🤖 修复 TreeSelect 定义不支持 `aria-*` 的问题。[#41978](https://github.com/ant-design/ant-design/pull/41978) [@guan404ming](https://github.com/guan404ming) @@ -396,21 +410,21 @@ timeline: true - Tree - 🐞 修复 Tree 组件可拖拽树文本换行时其标题不对齐。[#41928](https://github.com/ant-design/ant-design/pull/41928) [@Yuiai01](https://github.com/Yuiai01) - 🐞 修复 Checkbox 组件标题没有对齐的问题。[#41920](https://github.com/ant-design/ant-design/pull/41920) [@Yuiai01](https://github.com/Yuiai01) -- 🛠 升级 `rc-switch` 以修复重复引入 `@babel/runtime/helpers` 的问题,减小打包体积。[#41954](https://github.com/ant-design/ant-design/pull/41954) +- 🛠 Switch 升级 `rc-switch` 以修复重复引入 `@babel/runtime/helpers` 的问题,减小打包体积。[#41954](https://github.com/ant-design/ant-design/pull/41954) ## 5.4.4 `2023-04-20` - 💄 修复 Message hooks 的图标样式不跟随动态主题 token 切换的问题。[#41899](https://github.com/ant-design/ant-design/pull/41899) -- 🐞 修复 CSS 属性值为 `undefined` 时 cssinjs 报错的问题。[#41896](https://github.com/ant-design/ant-design/pull/41896) +- 🐞 修复 `@ant-design/cssinjs` 中 CSS 属性值为 `undefined` 时 cssinjs 报错的问题。[#41896](https://github.com/ant-design/ant-design/pull/41896) ## 5.4.3 `2023-04-19` - 🐞 修复 FloatButton 警告: findDOMNode is deprecated in StrictMode.。[#41833](https://github.com/ant-design/ant-design/pull/41833) [@fourcels](https://github.com/fourcels) -- 🐞 箭头元素兼容旧版本不支持 `clip-path: path()` 的浏览器。 [#41872](https://github.com/ant-design/ant-design/pull/41872) +- 🐞 杂项:箭头元素兼容旧版本不支持 `clip-path: path()` 的浏览器。 [#41872](https://github.com/ant-design/ant-design/pull/41872) - 🐞 修复 Layout.Sider 切换主题时存在背景切换延迟的问题。[#41828](https://github.com/ant-design/ant-design/pull/41828) - 🐞 修复 Tour 的 `type="primary"` 时箭头的颜色仍为白色的问题。[#41761](https://github.com/ant-design/ant-design/pull/41761) - 🐞 优化 Form 字段绑定,现在会忽略在 Form.Item 内的注释不再作为子组件进行绑定。[#41771](https://github.com/ant-design/ant-design/pull/41771) @@ -433,7 +447,7 @@ timeline: true `2023-04-11` -- 💄 优化类 Select 组件弹窗逻辑,现在总是会尝试优先在可视区域展示以减少用户额外滚动成本。[#41619](https://github.com/ant-design/ant-design/pull/41619) +- 💄 优化类 Select 组件弹窗逻辑(如 Select、TreeSelect、Cascader),现在总是会尝试优先在可视区域展示以减少用户额外滚动成本。[#41619](https://github.com/ant-design/ant-design/pull/41619) - 💄 去除 Badge.Ribbon 里固定的高度。[#41661](https://github.com/ant-design/ant-design/pull/41661) [@MuxinFeng](https://github.com/MuxinFeng) - 🐞 修复 Select 在搜索时宽度变为 `0px` 的问题。[#41722](https://github.com/ant-design/ant-design/pull/41722) - 🐞 修复 Empty 空数据组件在宽度不够的容器内样式错位的问题。[#41727](https://github.com/ant-design/ant-design/pull/41727) @@ -524,7 +538,7 @@ timeline: true - 💄 修复 Input.TextArea 在启用 `showCount` 时 RTL 模式下位置不正确的问题。[#41319](https://github.com/ant-design/ant-design/pull/41319) [@ds1371dani](https://github.com/ds1371dani) - TypeScript - 🤖 导出 Statistic 的 `CountdownProps` 类型。[#41341](https://github.com/ant-design/ant-design/pull/41341) [@li-jia-nan](https://github.com/li-jia-nan) - - 🤖 优化 token 的类型提示和说明。[#41297](https://github.com/ant-design/ant-design/pull/41297) [@arvinxx](https://github.com/arvinxx) + - 🤖 优化 Design Token 的类型提示和说明。[#41297](https://github.com/ant-design/ant-design/pull/41297) [@arvinxx](https://github.com/arvinxx) - 🤖 优化 Badge `React.forwardRef` 类型定义。[#41189](https://github.com/ant-design/ant-design/pull/41189) [@li-jia-nan](https://github.com/li-jia-nan) ## 5.3.1 @@ -564,11 +578,11 @@ timeline: true - 💄 Message 组件使用 `colorText` 优化样式。[#41047](https://github.com/ant-design/ant-design/pull/41047) [@Yuiai01](https://github.com/Yuiai01) - 💄 修复 Select, TreeSelect, Cascader 父元素存在 `transform: scale` 样式时的对齐问题。[#41013](https://github.com/ant-design/ant-design/pull/41013) - 💄 优化 Table 中 `rowScope` 的样式。[#40304](https://github.com/ant-design/ant-design/pull/40304) [@Yuiai01](https://github.com/Yuiai01) -- 💄 为组件聚焦时的 `outline` 提供新的 AliasToken `lineWidthFocus`。[#40840](https://github.com/ant-design/ant-design/pull/40840) -- 💄 WeekPicker 支持鼠标悬浮样式。[#40772](https://github.com/ant-design/ant-design/pull/40772) +- 💄 Design Token 为组件聚焦时的 `outline` 提供新的 AliasToken `lineWidthFocus`。[#40840](https://github.com/ant-design/ant-design/pull/40840) +- 💄 DatePicker.WeekPicker 支持鼠标悬浮样式。[#40772](https://github.com/ant-design/ant-design/pull/40772) - 💄 调整 Select, TreeSelect, Cascader 在多选时总是默认显示下拉箭头。[#41028](https://github.com/ant-design/ant-design/pull/41028) - 🐞 修复 Form 组件 `Form.Item.useStatus` 导致的服务端渲染问题。[#40977](https://github.com/ant-design/ant-design/pull/40977) [@AndyBoat](https://github.com/AndyBoat) -- 🐞 修复部分组件箭头形状问题。[#40971](https://github.com/ant-design/ant-design/pull/40971) +- 🐞 杂项:修复部分组件箭头形状问题。[#40971](https://github.com/ant-design/ant-design/pull/40971) - 🐞 修复 Layout 报错 `React does not recognize the `suffixCls` prop on a DOM element` 的问题。[#40969](https://github.com/ant-design/ant-design/pull/40969) - 🐞 修复 Watermark 组件图片加载异常时的问题,默认展示文字。[#40770](https://github.com/ant-design/ant-design/pull/40770) [@OriginRing](https://github.com/OriginRing) - 🐞 Image 预览新增图片翻转功能。并修复 Image `fallback` 在 ssr 下失效的问题。[#40660](https://github.com/ant-design/ant-design/pull/40660) @@ -588,12 +602,12 @@ timeline: true - 🐞 修复 ConfigProvider 组件表单校验消息生效顺序。[#40533](https://github.com/ant-design/ant-design/pull/40533) [@Wxh16144](https://github.com/Wxh16144) - 🐞 修复 Confirm Modal `onOk` 可能触发两次的问题。[#40719](https://github.com/ant-design/ant-design/pull/40719) [@Rafael-Martins](https://github.com/Rafael-Martins) - 🛠 重写 `useLocale` 方法,对外暴露 `localeCode`。[#40884](https://github.com/ant-design/ant-design/pull/40884) [@li-jia-nan](https://github.com/li-jia-nan) -- 🐞 修复 Segemented 组件子项不响应鼠标事件的问题。[#40894](https://github.com/ant-design/ant-design/pull/40894) +- 🐞 修复 Segmented 组件子项不响应鼠标事件的问题。[#40894](https://github.com/ant-design/ant-design/pull/40894) - 🛠 重构:使用 `useLocale` 替换 LocaleReceiver 组件,并删除 LocaleReceiver 组件。[#40870](https://github.com/ant-design/ant-design/pull/40870) [@li-jia-nan](https://github.com/li-jia-nan) - 🐞 修复 ConfigProvider 注入的 `getPopupContainer` 属性 不生效的问题。[#40871](https://github.com/ant-design/ant-design/pull/40871) [@RedJue](https://github.com/RedJue) - 🐞 修复 Descriptions 不接受 `data-*` 和 `aria-*` 等属性的问题。[#40859](https://github.com/ant-design/ant-design/pull/40859) [@goveo](https://github.com/goveo) -- 🛠 修改 Separator 的 dom 由 `span` 改为 `li`。[#40867](https://github.com/ant-design/ant-design/pull/40867) [@heiyu4585](https://github.com/heiyu4585) -- 💄 修改组件聚焦下的 `outline` 为默认 `4px`。[#40839](https://github.com/ant-design/ant-design/pull/40839) +- 🛠 修改 Breadcrumb 的 Separator dom 由 `span` 改为 `li`。[#40867](https://github.com/ant-design/ant-design/pull/40867) [@heiyu4585](https://github.com/heiyu4585) +- 💄 Design Token 修改组件聚焦下的 `outline` 为默认 `4px`。[#40839](https://github.com/ant-design/ant-design/pull/40839) - 🐞 修复 Layout.Header 单独使用时,`Layout.colorBgHeader` token 配置不生效的问题。[#40933](https://github.com/ant-design/ant-design/pull/40933) - 🐞 修复 Badge 颜色显示异常问题。[#40848](https://github.com/ant-design/ant-design/pull/40848) [@kiner-tang](https://github.com/kiner-tang) - 🐞 修复 Timeline 的子项的 `className` 错误。[#40835](https://github.com/ant-design/ant-design/pull/40835) [@Yuiai01](https://github.com/Yuiai01) @@ -606,7 +620,7 @@ timeline: true - DatePicker - 💄 调整 DatePicker 组件日期面板的间距样式。[#40768](https://github.com/ant-design/ant-design/pull/40768) - - 🐞 修复 RangePicker `hover` 日期错位的问题。[#40785](https://github.com/ant-design/ant-design/pull/40785) [@Yuiai01](https://github.com/Yuiai01) + - 🐞 修复 DatePicker.RangePicker `hover` 日期错位的问题。[#40785](https://github.com/ant-design/ant-design/pull/40785) [@Yuiai01](https://github.com/Yuiai01) - Form - 🐞 修复 Form 下 Radio/Checkbox 的 disabled 优先级问题。[#40741](https://github.com/ant-design/ant-design/pull/40741) [@Yuiai01](https://github.com/Yuiai01) - 🐞 修复 Form 为 `disabled` 时 Checkbox 和 Radio 表现不一致的问题。[#40728](https://github.com/ant-design/ant-design/pull/40728) [@Yuiai01](https://github.com/Yuiai01) @@ -625,10 +639,10 @@ timeline: true `2023-02-13` - 🛠 重构 Tour 中 `panelRender` 为函数式组件。[#40670](https://github.com/ant-design/ant-design/pull/40670) [@li-jia-nan](https://github.com/li-jia-nan) -- 🐞 修复 TimeLine 中 `className` 传给子节点的问题。[#40700](https://github.com/ant-design/ant-design/pull/40700) [@any1024](https://github.com/any1024) -- 🐞 修复 Silder 中的标记点在边缘无法点击的问题。[#40679](https://github.com/ant-design/ant-design/pull/40679) [@LongHaoo](https://github.com/LongHaoo) +- 🐞 修复 Timeline 中 `className` 传给子节点的问题。[#40700](https://github.com/ant-design/ant-design/pull/40700) [@any1024](https://github.com/any1024) +- 🐞 修复 Slider 中的标记点在边缘无法点击的问题。[#40679](https://github.com/ant-design/ant-design/pull/40679) [@LongHaoo](https://github.com/LongHaoo) - 🐞 修复 Tour 不支持 `0` 作为节点的问题。[#40631](https://github.com/ant-design/ant-design/pull/40631) [@li-jia-nan](https://github.com/li-jia-nan) -- 💄 修复 DataPicker.RangePicker 的 hover 范围样式。[#40607](https://github.com/ant-design/ant-design/pull/40607) [@Yuiai01](https://github.com/Yuiai01) +- 💄 修复 DatePicker.RangePicker 的 hover 范围样式。[#40607](https://github.com/ant-design/ant-design/pull/40607) [@Yuiai01](https://github.com/Yuiai01) - 💄 优化 Steps 组件自定义 `icon` 的大小。[#40672](https://github.com/ant-design/ant-design/pull/40672) - TypeScript - 🤖 Upload 组件支持泛型。[#40634](https://github.com/ant-design/ant-design/pull/40634) [@riyadelberkawy](https://github.com/riyadelberkawy) @@ -659,24 +673,24 @@ timeline: true - 🆕 Tour 支持通过 `scrollIntoViewOptions` 改变`scrollIntoView` 的选项。[#39980](https://github.com/ant-design/ant-design/pull/39980) [@kiner-tang](https://github.com/kiner-tang) - 🆕 Tour 遮罩支持传递自定义样式和填充颜色。[#39919](https://github.com/ant-design/ant-design/pull/39919) [@kiner-tang](https://github.com/kiner-tang) - 🐞 修复 Tour 在严格模式下调用 `findDomNode` 抛出警告问题。[#40160](https://github.com/ant-design/ant-design/pull/40160) [@kiner-tang](https://github.com/kiner-tang) - - 💄 删除了最后一个指示器的 margin。[#40624](https://github.com/ant-design/ant-design/pull/40624) + - 💄 优化 Tour 样式,删除了最后一个指示器的 margin。[#40624](https://github.com/ant-design/ant-design/pull/40624) - 🆕 新增 Design token `fontFamilyCode` 并应用到 Typography 的 `code` `kbd` `pre` 等元素上。[#39823](https://github.com/ant-design/ant-design/pull/39823) - 🆕 ConfigProvider 新增 Form `scrollToFirstError`。[#39509](https://github.com/ant-design/ant-design/pull/39509) [@linxianxi](https://github.com/linxianxi) -- 🐞 为全部组件补足 `rootClassName` 属性。[#40217](https://github.com/ant-design/ant-design/pull/40217) +- 🆕 Global: 为全部组件补足 `rootClassName` 属性。[#40217](https://github.com/ant-design/ant-design/pull/40217) - 🐞 修复 Empty 在默认主题和暗黑主题下的描述文字颜色。[#40584](https://github.com/ant-design/ant-design/pull/40584) [@MuxinFeng](https://github.com/MuxinFeng) - Table - 🐞 修复 Table 行 `aria-label` 和 `role="presentation"` 无法一起使用的问题。[#40413](https://github.com/ant-design/ant-design/pull/40413) [@Ke1sy](https://github.com/Ke1sy) - - 🐞 修改非受控 `filtered` 修改不生效的问题。[#39883](https://github.com/ant-design/ant-design/pull/39883) - - 🐞 修表头过滤器在分组标题情况下失效的问题。[#40463](https://github.com/ant-design/ant-design/pull/40463) [@roman40a](https://github.com/roman40a) - - 🐞 修复选择列固定时滚动会被其他单元格遮盖的问题。[#39940](https://github.com/ant-design/ant-design/pull/39940) [@kiner-tang](https://github.com/kiner-tang) - - 🐞 修复排序/筛选的表格的固定列背景色透明导致显示异常问题。[#39012](https://github.com/ant-design/ant-design/pull/39012) [@kiner-tang](https://github.com/kiner-tang) + - 🐞 修复 Table 修改非受控 `filtered` 修改不生效的问题。[#39883](https://github.com/ant-design/ant-design/pull/39883) + - 🐞 修复 Table 表头过滤器在分组标题情况下失效的问题。[#40463](https://github.com/ant-design/ant-design/pull/40463) [@roman40a](https://github.com/roman40a) + - 🐞 修复 Table 选择列固定时滚动会被其他单元格遮盖的问题。[#39940](https://github.com/ant-design/ant-design/pull/39940) [@kiner-tang](https://github.com/kiner-tang) + - 🐞 修复 Table 排序/筛选的表格的固定列背景色透明导致显示异常问题。[#39012](https://github.com/ant-design/ant-design/pull/39012) [@kiner-tang](https://github.com/kiner-tang) - 💄 优化 Table 组件 hover 样式,修复边框异常问题。[#40469](https://github.com/ant-design/ant-design/pull/40469) - DatePicker - 🐞 修复 DatePicker 组件禁用时状态样式生效的问题。[#40608](https://github.com/ant-design/ant-design/pull/40608) - 💄 优化 DatePicker 输入框样式。[#40549](https://github.com/ant-design/ant-design/pull/40549) [@Wxh16144](https://github.com/Wxh16144) - 💄 优化 DatePicker Dropdown 箭头样式。[#40521](https://github.com/ant-design/ant-design/pull/40521) - 🐞 修复 Space `ant-space-item` 选择器错误。[#40554](https://github.com/ant-design/ant-design/pull/40554) [@cncolder](https://github.com/cncolder) -- 🐞 修复当设置 `delay` 时,Spin 没有立即关闭的问题。[#40475](https://github.com/ant-design/ant-design/pull/40475) [@3Alan](https://github.com/3Alan) +- 🐞 修复 Spin 当设置 `delay` 时,没有立即关闭的问题。[#40475](https://github.com/ant-design/ant-design/pull/40475) [@3Alan](https://github.com/3Alan) - 🐞 修复 Modal `useModal` 默认确认按钮文本逻辑。[#39884](https://github.com/ant-design/ant-design/pull/39884) [@BoyYangzai](https://github.com/BoyYangzai) - 🛠 重构水波纹视效,以支持多个水波纹同时触发了。[#39705](https://github.com/ant-design/ant-design/pull/39705) [@li-jia-nan](https://github.com/li-jia-nan) - 🛠 重构 Input.TextArea 组件和 Mentions 组件。[#40045](https://github.com/ant-design/ant-design/pull/40045) @@ -688,10 +702,10 @@ timeline: true - 💄 修复 Select placeholder 样式问题。[#40477](https://github.com/ant-design/ant-design/pull/40477) [@Wxh16144](https://github.com/Wxh16144) - 💄 调整 Descriptions 标签样式使其更容易区分。[#40085](https://github.com/ant-design/ant-design/pull/40085) - 💄 优化 QRCode 过期显示样式。[#39849](https://github.com/ant-design/ant-design/pull/39849) -- 💄 优化 `boxShadow` token 分级。[#40516](https://github.com/ant-design/ant-design/pull/40516) +- 💄 Design Token 优化 `boxShadow` token 分级。[#40516](https://github.com/ant-design/ant-design/pull/40516) - TypeScript - 🤖 优化 Badge Tag Tooltip `color` 类型定义。[#39871](https://github.com/ant-design/ant-design/pull/39871) - - 🤖 新增 `Breakpoint` `ThmeConfig` `GlobalToken` 类型导出。[#40508](https://github.com/ant-design/ant-design/pull/40508) [@Kamahl19](https://github.com/Kamahl19) + - 🤖 杂项:新增 `Breakpoint` `ThemeConfig` `GlobalToken` 类型导出。[#40508](https://github.com/ant-design/ant-design/pull/40508) [@Kamahl19](https://github.com/Kamahl19) - 🤖 更新 Upload `fileList` 类型。[#40585](https://github.com/ant-design/ant-design/pull/40585) - 🤖 移除 Tour ForwardRefRenderFunction。[#39924](https://github.com/ant-design/ant-design/pull/39924) - 🌐 国际化 @@ -724,14 +738,14 @@ timeline: true - Menu - 🐞 修复 Menu 收缩时,Tooltip 偶尔会错误展示的问题。[#40328](https://github.com/ant-design/ant-design/pull/40328) - 🐞 修复 Menu 分割线样式错误。[#40268](https://github.com/ant-design/ant-design/pull/40268) [@Wxh16144](https://github.com/Wxh16144) -- 🐞 修复带波纹效果的组件(如 Button)在波纹展示前移除时,控制台报错的问题。[#40307](https://github.com/ant-design/ant-design/pull/40307) [@luo3house](https://github.com/luo3house) +- 🐞 修复带波纹效果的组件(如 Button、Switch、Tag)在波纹展示前移除时,控制台报错的问题。[#40307](https://github.com/ant-design/ant-design/pull/40307) [@luo3house](https://github.com/luo3house) - 🐞 修复 Breadcrumb 组件使用 `menu` 属性,但是出现 overlay deprecation 警告的问题。[#40211](https://github.com/ant-design/ant-design/pull/40211) [@candy4290](https://github.com/candy4290) - 🐞 修复 Modal.useModal `destroyAll` 不工作的问题。[#40281](https://github.com/ant-design/ant-design/pull/40281) [@ds1371dani](https://github.com/ds1371dani) - 🐞 修复 `message` 组件通过 `config` 设置 `duration` 无效问题。[#40232](https://github.com/ant-design/ant-design/pull/40232) [@Yuiai01](https://github.com/Yuiai01) - 🐞 修复 Button 包含 `a` 标签时的 文本颜色不正确的问题。[#40269](https://github.com/ant-design/ant-design/pull/40269) [@ds1371dani](https://github.com/ds1371dani) - 🐞 修复 Radio 在 `disabled` 时显示错误的文本颜色和光标。[#40273](https://github.com/ant-design/ant-design/pull/40273) [@ds1371dani](https://github.com/ds1371dani) -- 💄 优化 focus `outline` 计算逻辑,替换 `lineWidth` 为 `lineWidthBold`。[#40291](https://github.com/ant-design/ant-design/pull/40291) [@simonpfish](https://github.com/simonpfish) -- 💄 重写部分组件样式以兼容部分对 `:not` 支持不完全的旧版浏览器。[#40264](https://github.com/ant-design/ant-design/pull/40264) +- 💄 Design Token 优化 focus `outline` 计算逻辑,替换 `lineWidth` 为 `lineWidthBold`。[#40291](https://github.com/ant-design/ant-design/pull/40291) [@simonpfish](https://github.com/simonpfish) +- 💄 杂项:重写部分组件样式以兼容部分对 `:not` 支持不完全的旧版浏览器。[#40264](https://github.com/ant-design/ant-design/pull/40264) - 🌐 修复 `pt_BR` 缺失的国际化。[#40270](https://github.com/ant-design/ant-design/pull/40270) [@rafaelncarvalho](https://github.com/rafaelncarvalho) ## 5.1.5 @@ -757,7 +771,7 @@ timeline: true - 🐞 修复 locale 文件丢失的问题。[#40116](https://github.com/ant-design/ant-design/pull/40116) - 🐞 修复 Cascader 组件 RTL 模式中下拉菜单位置问题。[#40109](https://github.com/ant-design/ant-design/pull/40109) [@3hson](https://github.com/3hson) -- 🐞 修复部分组件动画闪烁的问题。[react-component/motion#39](https://github.com/react-component/motion/pull/39) +- 🐞 修复 `rc-motion` 部分组件动画闪烁的问题。[react-component/motion#39](https://github.com/react-component/motion/pull/39) ## 5.1.3 @@ -779,16 +793,16 @@ timeline: true - 🐞 修复 Alert.ErrorBoundary 内容溢出的问题。[#40033](https://github.com/ant-design/ant-design/pull/40033) - 💄 修复 Tag `onClick` 为 undefined,鼠标点击也会出现边框样式。[#40023](https://github.com/ant-design/ant-design/pull/40023) [@crazyair](https://github.com/crazyair) - 💄 修复 Avatar.Group 内 Avatar 外层包裹其他元素时间距样式失效问题。[#39993](https://github.com/ant-design/ant-design/pull/39993) -- 🐞 修复 Submenu 箭头过渡动画不正确的问题。[#39945](https://github.com/ant-design/ant-design/pull/39945) [@JarvisArt](https://github.com/JarvisArt) -- 🐞 修复选择列固定时滚动会被其他单元格遮盖的问题。[#39940](https://github.com/ant-design/ant-design/pull/39940) [@kiner-tang](https://github.com/kiner-tang) +- 🐞 修复 Menu.Submenu 箭头过渡动画不正确的问题。[#39945](https://github.com/ant-design/ant-design/pull/39945) [@JarvisArt](https://github.com/JarvisArt) +- 🐞 修复 Table 选择列固定时滚动会被其他单元格遮盖的问题。[#39940](https://github.com/ant-design/ant-design/pull/39940) [@kiner-tang](https://github.com/kiner-tang) - 🌐 增加缺失的泰米尔语翻译。[#39936](https://github.com/ant-design/ant-design/pull/39936) [@KIRUBASHANKAR26](https://github.com/KIRUBASHANKAR26) ## 5.1.2 `2022-12-30` -- 🆕 官网主题编辑器添加主题上传功能。[#39621](https://github.com/ant-design/ant-design/pull/39621) [@BoyYangzai](https://github.com/BoyYangzai) -- 💄 重构水波纹视效,现在可以多个水波纹同时触发了。[#39705](https://github.com/ant-design/ant-design/pull/39705) [@li-jia-nan](https://github.com/li-jia-nan) +- 📖 官网主题编辑器添加主题上传功能。[#39621](https://github.com/ant-design/ant-design/pull/39621) [@BoyYangzai](https://github.com/BoyYangzai) +- 💄 重构 Wave 水波纹视效,现在可以多个水波纹同时触发了。[#39705](https://github.com/ant-design/ant-design/pull/39705) [@li-jia-nan](https://github.com/li-jia-nan) - Table - 🐞 修复 Table `column.filtered` 更新不生效的问题。[#39883](https://github.com/ant-design/ant-design/pull/39883) - 🐞 修复 Table 排序/筛选的固定列背景色透明的样式异常问题。[#39012](https://github.com/ant-design/ant-design/pull/39012) [@kiner-tang](https://github.com/kiner-tang) @@ -808,7 +822,7 @@ timeline: true - 📦 在构建流程中去掉对 IE 等旧版本浏览器的支持以减少包体积。[#38779](https://github.com/ant-design/ant-design/pull/38779) - ⚡️ 提升 Transfer 在大数据量下勾选和移动节点时的性能。[#39465](https://github.com/ant-design/ant-design/pull/39465) [@wqs576222103](https://github.com/wqs576222103) -- 🐞 修复组件字体错误问题。[#39806](https://github.com/ant-design/ant-design/pull/39806) +- 🐞 Design Token 修复组件字体错误问题。[#39806](https://github.com/ant-design/ant-design/pull/39806) - 🐞 修复 Drawer `placement` `open` `width` 等参数为 undefined 时默认值不生效的问题。[#39782](https://github.com/ant-design/ant-design/pull/39782) - 🐞 修复 Menu 切换时图标动画效果不流畅的问题。[#39800](https://github.com/ant-design/ant-design/pull/39800) [@JarvisArt](https://github.com/JarvisArt) - 🐞 修复 Image 预览操作条在动态过程中会被高 zIndex 的元素覆盖。[#39788](https://github.com/ant-design/ant-design/pull/39788) [@JarvisArt](https://github.com/JarvisArt) @@ -857,13 +871,13 @@ timeline: true - 🐞 修复 Drawer 组件关于 `DefaultProps` 的警告。[#39562](https://github.com/ant-design/ant-design/pull/39562) - Menu - 🐞 修复 React18 中使用 `createRoot` 渲染 Menu.Submenu 会闪烁的问题。[#38855](https://github.com/ant-design/ant-design/pull/38855) [@JarvisArt](https://github.com/JarvisArt) - - 🛠 重构 MenuItem 为 Function Component。[#38751](https://github.com/ant-design/ant-design/pull/38751) + - 🛠 重构 Menu.MenuItem 为 Function Component。[#38751](https://github.com/ant-design/ant-design/pull/38751) - 💄 优化 Menu 组件选中样式。[#39439](https://github.com/ant-design/ant-design/pull/39439) - 🛠 LocaleProvider 在 4.x 中已经废弃(使用 `` 替代),我们在 5.x 里彻底移除了相关目录 antd/es/locale-provider、antd/lib/locale-provider。[#39373](https://github.com/ant-design/ant-design/pull/39373) - 🛠 简化 lodash 方法引用。[#39599](https://github.com/ant-design/ant-design/pull/39599) [#39602](https://github.com/ant-design/ant-design/pull/39602) - TypeScript - 🤖 优化 Button DropDown Modal Popconfirm Select Transfer 鼠标事件类型定义。[#39533](https://github.com/ant-design/ant-design/pull/39533) - - 🤖 新增导出类型 `FloatButtonGroupProps`。[#39553](https://github.com/ant-design/ant-design/pull/39553) + - 🤖 新增 FloatButton 导出类型 `FloatButtonGroupProps`。[#39553](https://github.com/ant-design/ant-design/pull/39553) - 🌐 国际化 - 🇧🇪 补全 `fr_BE` 文案。[#39415](https://github.com/ant-design/ant-design/pull/39415) [@azro352](https://github.com/azro352) - 🇨🇦 补全 `fr_CA` 文案。[#39416](https://github.com/ant-design/ant-design/pull/39416) [@azro352](https://github.com/azro352) @@ -905,7 +919,7 @@ timeline: true - 💄 修复 Select 组件搜索框会出现空白区域的样式问题。[#39299](https://github.com/ant-design/ant-design/pull/39299) - 💄 修复 Tree 丢失选中样式的问题。[#39292](https://github.com/ant-design/ant-design/pull/39292) - 🐞 修复 FloatButton 自定义尺寸时,内容不居中的问题。[#39282](https://github.com/ant-design/ant-design/pull/39282) [@li-jia-nan](https://github.com/li-jia-nan) -- 🐞 修复 RangePicker 日期 hover 样式。[#39266](https://github.com/ant-design/ant-design/pull/39266) +- 🐞 修复 DatePicker.RangePicker 日期 hover 样式。[#39266](https://github.com/ant-design/ant-design/pull/39266) - 💄 优化 Button 在 Space.Compact 下的 Hover 样式。[#39241](https://github.com/ant-design/ant-design/pull/39241) [@foryuki](https://github.com/foryuki) - 🌐 修正 `vi_VN` 国际化描述。[#39279](https://github.com/ant-design/ant-design/pull/39279) [@nghiepdev](https://github.com/nghiepdev) - 🌐 修正 `he_IL` 国际化描述。[#39280](https://github.com/ant-design/ant-design/pull/39280) [@Ran-Sagy](https://github.com/Ran-Sagy) @@ -921,11 +935,11 @@ timeline: true - 🐞 修复 Modal.info 没有图标时,内容宽度不正确的问题。[#39047](https://github.com/ant-design/ant-design/pull/39047) [@owjs3901](https://github.com/owjs3901) - 🐞 修复 Tree `checkable` 与 `blockNode` 配合时,`title` 元素不拉伸的问题。[#39209](https://github.com/ant-design/ant-design/pull/39209) [@Wxh16144](https://github.com/Wxh16144) - 🐞 修复 Dropdown 二级菜单丢失动画的问题。[#39235](https://github.com/ant-design/ant-design/pull/39235) -- 💄 修复 RangePicker 内时间面板的 padding 样式。[#39228](https://github.com/ant-design/ant-design/pull/39228) +- 💄 修复 DatePicker.RangePicker 内时间面板的 padding 样式。[#39228](https://github.com/ant-design/ant-design/pull/39228) - 🐞 修复 Card 的按钮组圆角样式。[#39210](https://github.com/ant-design/ant-design/pull/39210) [@MuxinFeng](https://github.com/MuxinFeng) - 🐞 修复了 Badge 自定义颜色的时候,波纹的颜色不会跟着小圆点颜色发生变化的问题。[#39182](https://github.com/ant-design/ant-design/pull/39182) [@li-jia-nan](https://github.com/li-jia-nan) - 🐞 修复 Radio 禁用状态选中样式。[#39165](https://github.com/ant-design/ant-design/pull/39165) [@Wxh16144](https://github.com/Wxh16144) -- 🐞 修复 TextArea `resize` 不是 `none` 时计数文字的样式问题。[#39121](https://github.com/ant-design/ant-design/pull/39121) [@51wangping](https://github.com/51wangping) +- 🐞 修复 Input.TextArea `resize` 不是 `none` 时计数文字的样式问题。[#39121](https://github.com/ant-design/ant-design/pull/39121) [@51wangping](https://github.com/51wangping) - 🐞 修复 Transfer 组件 点击复选框位置不可以取消选中,并触发了两次 onSelectChange 问题。[#39078](https://github.com/ant-design/ant-design/pull/39078) [@edc-hui](https://github.com/edc-hui) - 🐞 修复 Steps `size="small"` 第一项带有进度时,进度条显示不全的问题。[#39100](https://github.com/ant-design/ant-design/pull/39100) [@Wxh16144](https://github.com/Wxh16144) - 🐞 修复 Form 水平布局下 `xs` 的响应式布局不生效的问题。[#39130](https://github.com/ant-design/ant-design/pull/39130) @@ -942,7 +956,7 @@ timeline: true - 🐞 修复 hover 在 Menu.Item 外面时颜色变蓝的问题。[#39077](https://github.com/ant-design/ant-design/pull/39077) [@Pulset](https://github.com/Pulset) - 🐞 修复 Input.TextArea 没有重置样式导致 resize 行为和 4.x 不一致的问题。[aa92f02](https://github.com/ant-design/ant-design/commit/aa92f02) - 🐞 修复 Upload 默认图标颜色。[#39114](https://github.com/ant-design/ant-design/pull/39114) [@MARKX97](https://github.com/MARKX97) -- 🐞 修复 dev 下动态 hashId 导致的 ssr 注水失败的问题。[#39069](https://github.com/ant-design/ant-design/pull/39069) +- 🐞 修复 `@ant-design/cssinjs` dev 下动态 hashId 导致的 ssr 注水失败的问题。[#39069](https://github.com/ant-design/ant-design/pull/39069) - 🐞 修复 FloatButton.Group 关闭时闪烁的问题。[#39061](https://github.com/ant-design/ant-design/pull/39061) - 🐞 修复 Card.Meta 宽度没有默认填满容器的问题。[#39026](https://github.com/ant-design/ant-design/pull/39026) [@justanotheranonymoususer](https://github.com/justanotheranonymoususer) @@ -951,7 +965,7 @@ timeline: true `2022-11-27` - 💄 修复 Card 组件设置 `bodyStyle` 的背景颜色后圆角失效的问题。[#38973](https://github.com/ant-design/ant-design/pull/38973) [@Yukiniro](https://github.com/Yukiniro) -- 💄 优化错误色的默认算法。[#38933](https://github.com/ant-design/ant-design/pull/38933) +- 💄 Design Token 优化错误色的默认算法。[#38933](https://github.com/ant-design/ant-design/pull/38933) - 💄 修复 RTL 模式下的样式问题。[#38829](https://github.com/ant-design/ant-design/pull/38829) [@Wxh16144](https://github.com/Wxh16144) - Space.Compact - 💄 Space.Compact 包裹单个子组件时,展示该子组件本身的样式。[#38896](https://github.com/ant-design/ant-design/pull/38896) [@foryuki](https://github.com/foryuki) @@ -974,7 +988,7 @@ timeline: true - 💄 优化 Empty 组件的 svg 图片在暗色主题下的颜色。[#38785](https://github.com/ant-design/ant-design/pull/38785) - 💄 修复 Form, Input, Select, Tree 转换到 CSS-in-JS 丢失少量样式的问题。[#38742](https://github.com/ant-design/ant-design/pull/38742) -- 💄 修复 Firefox 下拉菜单动画抖动的问题。[#38729](https://github.com/ant-design/ant-design/pull/38729) +- 💄 修复 Dropdown 在 Firefox 下拉菜单动画抖动的问题。[#38729](https://github.com/ant-design/ant-design/pull/38729) - Menu - 🐞 修复 Menu SubMenu 间距问题。[#38714](https://github.com/ant-design/ant-design/pull/38714) [@JarvisArt](https://github.com/JarvisArt) - 🐞 修复 Menu 暗色主题下高度多了 1px 的问题。[#38741](https://github.com/ant-design/ant-design/pull/38741) [@LuciNyan](https://github.com/LuciNyan) diff --git a/README.md b/README.md index 164a40048762..a7fc1da34977 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ An enterprise-class UI design language and React UI library. [![CI status][github-action-image]][github-action-url] [![codecov][codecov-image]][codecov-url] [![NPM version][npm-image]][npm-url] [![NPM downloads][download-image]][download-url] -[![][bundlephobia-image]][bundlephobia-url] [![][bundlesize-js-image]][unpkg-js-url] [![FOSSA Status][fossa-image]][fossa-url] +[![][bundlephobia-image]][bundlephobia-url] [![][bundlesize-js-image]][unpkg-js-url] [![FOSSA Status][fossa-image]][fossa-url] [![Covered by Argos Visual Testing][argos-ci-image]][argos-ci-url] [![Follow Twitter][twitter-image]][twitter-url] [![Renovate status][renovate-image]][renovate-dashboard-url] [![][issues-helper-image]][issues-helper-url] [![dumi][dumi-image]][dumi-url] [![Issues need help][help-wanted-image]][help-wanted-url] @@ -40,6 +40,8 @@ An enterprise-class UI design language and React UI library. [renovate-dashboard-url]: https://github.com/ant-design/ant-design/issues/32498 [dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square [dumi-url]: https://github.com/umijs/dumi +[argos-ci-image]: https://argos-ci.com/badge.svg +[argos-ci-url]: https://app.argos-ci.com/ant-design/ant-design/reference
diff --git a/components/_util/__tests__/wave.test.tsx b/components/_util/__tests__/wave.test.tsx index 1311db982926..0f6bd7ec2dc0 100644 --- a/components/_util/__tests__/wave.test.tsx +++ b/components/_util/__tests__/wave.test.tsx @@ -1,7 +1,10 @@ import React from 'react'; +import classNames from 'classnames'; import mountTest from '../../../tests/shared/mountTest'; import { act, fireEvent, getByText, render, waitFakeTimer } from '../../../tests/utils'; import Wave from '../wave'; +import { TARGET_CLS } from '../wave/interface'; +import Checkbox from '../../checkbox'; (global as any).isVisible = true; @@ -29,7 +32,6 @@ describe('Wave component', () => { } (window as any).ResizeObserver = FakeResizeObserver; - jest.useFakeTimers(); }); afterAll(() => { @@ -39,11 +41,14 @@ describe('Wave component', () => { }); beforeEach(() => { + jest.useFakeTimers(); (global as any).isVisible = true; document.body.innerHTML = ''; }); - afterEach(() => { + afterEach(async () => { + await waitFakeTimer(); + jest.clearAllTimers(); const styles = document.getElementsByTagName('style'); for (let i = 0; i < styles.length; i += 1) { @@ -68,6 +73,9 @@ describe('Wave component', () => { act(() => { jest.advanceTimersByTime(100); }); + act(() => { + jest.advanceTimersByTime(100); + }); } it('work', async () => { @@ -237,18 +245,6 @@ describe('Wave component', () => { expect(document.querySelector('.ant-wave')).toBeFalsy(); }); - it('not show when is input', () => { - const { container } = render( - - - , - ); - - fireEvent.click(container.querySelector('input')!); - waitRaf(); - expect(document.querySelector('.ant-wave')).toBeFalsy(); - }); - it('should not throw when click it', () => { expect(() => { const { container } = render( @@ -325,4 +321,32 @@ describe('Wave component', () => { expect(container.querySelector('.ant-wave')).toBeTruthy(); }); + + it('Wave can match target', () => { + const { container } = render( + +
+
+
+ , + ); + + // Click + fireEvent.click(container.querySelector('.bamboo')!); + waitRaf(); + + expect(container.querySelector('.ant-wave')).toBeTruthy(); + }); + + it('Checkbox with uncheck should not trigger wave', () => { + const onChange = jest.fn(); + const { container } = render(); + + // Click + fireEvent.click(container.querySelector('input')!); + waitRaf(); + + expect(onChange).toHaveBeenCalled(); + expect(container.querySelector('.ant-wave')).toBeFalsy(); + }); }); diff --git a/components/_util/wave/WaveEffect.tsx b/components/_util/wave/WaveEffect.tsx index 88b881451f56..a58a7329a644 100644 --- a/components/_util/wave/WaveEffect.tsx +++ b/components/_util/wave/WaveEffect.tsx @@ -4,7 +4,7 @@ import { render, unmount } from 'rc-util/lib/React/render'; import raf from 'rc-util/lib/raf'; import * as React from 'react'; import { getTargetWaveColor } from './util'; -import type { ShowWaveEffect } from './useWave'; +import { type ShowWaveEffect, TARGET_CLS } from './interface'; function validateNum(value: number) { return Number.isNaN(value) ? 0 : value; @@ -13,10 +13,11 @@ function validateNum(value: number) { export interface WaveEffectProps { className: string; target: HTMLElement; + component?: string; } const WaveEffect: React.FC = (props) => { - const { className, target } = props; + const { className, target, component } = props; const divRef = React.useRef(null); const [color, setWaveColor] = React.useState(null); @@ -103,6 +104,9 @@ const WaveEffect: React.FC = (props) => { return null; } + const isSmallComponent = + (component === 'Checkbox' || component === 'Radio') && target?.classList.contains(TARGET_CLS); + return ( = (props) => { }} > {({ className: motionClassName }) => ( -
+
)} ); }; -const showWaveEffect: ShowWaveEffect = (node, { className }) => { +const showWaveEffect: ShowWaveEffect = (target, info) => { + const { component } = info; + + // Skip for unchecked checkbox + if (component === 'Checkbox' && !target.querySelector('input')?.checked) { + return; + } + // Create holder const holder = document.createElement('div'); holder.style.position = 'absolute'; holder.style.left = '0px'; holder.style.top = '0px'; - node?.insertBefore(holder, node?.firstChild); + target?.insertBefore(holder, target?.firstChild); - render(, holder); + render(, holder); }; export default showWaveEffect; diff --git a/components/_util/wave/index.ts b/components/_util/wave/index.ts index 874686d47cf1..24bf37a509d5 100644 --- a/components/_util/wave/index.ts +++ b/components/_util/wave/index.ts @@ -37,7 +37,6 @@ const Wave: React.FC = (props) => { const onClick = (e: MouseEvent) => { // Fix radio button click twice if ( - (e.target as HTMLElement).tagName === 'INPUT' || !isVisible(e.target as HTMLElement) || // No need wave !node.getAttribute || diff --git a/components/_util/wave/interface.ts b/components/_util/wave/interface.ts new file mode 100644 index 000000000000..f878fa884b1b --- /dev/null +++ b/components/_util/wave/interface.ts @@ -0,0 +1,16 @@ +import type { GlobalToken } from '../../theme'; + +export const TARGET_CLS = 'ant-wave-target'; + +export type ShowWaveEffect = ( + element: HTMLElement, + info: { + className: string; + token: GlobalToken; + component?: string; + event: MouseEvent; + hashId: string; + }, +) => void; + +export type ShowWave = (event: MouseEvent) => void; diff --git a/components/_util/wave/style.ts b/components/_util/wave/style.ts index b412e86e3dea..140e697dd17f 100644 --- a/components/_util/wave/style.ts +++ b/components/_util/wave/style.ts @@ -29,6 +29,13 @@ const genWaveStyle: GenerateStyle = (token) => { boxShadow: `0 0 0 6px currentcolor`, opacity: 0, }, + + '&.wave-quick': { + transition: [ + `box-shadow 0.3s ${token.motionEaseInOut}`, + `opacity 0.35s ${token.motionEaseInOut}`, + ].join(','), + }, }, }, }; diff --git a/components/_util/wave/useWave.ts b/components/_util/wave/useWave.ts index ba607c670634..788141ebb7ad 100644 --- a/components/_util/wave/useWave.ts +++ b/components/_util/wave/useWave.ts @@ -1,19 +1,10 @@ import * as React from 'react'; import useEvent from 'rc-util/lib/hooks/useEvent'; +import raf from 'rc-util/lib/raf'; import showWaveEffect from './WaveEffect'; import { ConfigContext } from '../../config-provider'; import useToken from '../../theme/useToken'; -import type { GlobalToken } from '../../theme'; - -export type ShowWaveEffect = ( - element: HTMLElement, - info: { - className: string; - token: GlobalToken; - component?: string; - event: MouseEvent; - }, -) => void; +import { TARGET_CLS, type ShowWave } from './interface'; export default function useWave( nodeRef: React.RefObject, @@ -21,20 +12,33 @@ export default function useWave( component?: string, ) { const { wave } = React.useContext(ConfigContext); - const [, token] = useToken(); + const [, token, hashId] = useToken(); - const showWave = useEvent((event: MouseEvent) => { + const showWave = useEvent((event) => { const node = nodeRef.current!; if (wave?.disabled || !node) { return; } + const targetNode = node.querySelector(`.${TARGET_CLS}`) || node; + const { showEffect } = wave || {}; // Customize wave effect - (showEffect || showWaveEffect)(node, { className, token, component, event }); + (showEffect || showWaveEffect)(targetNode, { className, token, component, event, hashId }); }); - return showWave; + const rafId = React.useRef(); + + // Merge trigger event into one for each frame + const showDebounceWave: ShowWave = (event) => { + raf.cancel(rafId.current!); + + rafId.current = raf(() => { + showWave(event); + }); + }; + + return showDebounceWave; } diff --git a/components/anchor/style/index.ts b/components/anchor/style/index.ts index 023f2c567cc4..0ea7e5578c6d 100644 --- a/components/anchor/style/index.ts +++ b/components/anchor/style/index.ts @@ -5,13 +5,13 @@ import { genComponentStyleHook, mergeToken } from '../../theme/internal'; export interface ComponentToken { /** - * @desc 链接横向内间距 - * @descEN Link horizontal padding + * @desc 链接纵向内间距 + * @descEN Vertical padding of link */ linkPaddingBlock: number; /** - * @desc 链接纵向内间距 - * @descEN Link vertical padding + * @desc 链接横向内间距 + * @descEN Horizontal padding of link */ linkPaddingInlineStart: number; } diff --git a/components/button/__tests__/wave.test.tsx b/components/button/__tests__/wave.test.tsx index 91ee5e21d12c..80da394ba8dc 100644 --- a/components/button/__tests__/wave.test.tsx +++ b/components/button/__tests__/wave.test.tsx @@ -23,6 +23,12 @@ describe('click wave effect', () => { const element = container.firstChild; // https://github.com/testing-library/user-event/issues/833 await userEvent.setup({ advanceTimers: jest.advanceTimersByTime }).click(element as Element); + + act(() => { + jest.advanceTimersByTime(100); + }); + + // Second time will render wave element act(() => { jest.advanceTimersByTime(100); }); diff --git a/components/checkbox/Checkbox.tsx b/components/checkbox/Checkbox.tsx index d42d1a01ea18..7a2d64386e20 100644 --- a/components/checkbox/Checkbox.tsx +++ b/components/checkbox/Checkbox.tsx @@ -9,6 +9,8 @@ import { FormItemInputContext } from '../form/context'; import GroupContext from './GroupContext'; import useStyle from './style'; +import Wave from '../_util/wave'; +import { TARGET_CLS } from '../_util/wave/interface'; export interface AbstractCheckboxProps { prefixCls?: string; @@ -129,27 +131,30 @@ const InternalCheckbox: React.ForwardRefRenderFunction - - {children !== undefined && {children}} - , + + {/* eslint-disable-next-line jsx-a11y/label-has-associated-control */} + + , ); }; diff --git a/components/checkbox/__tests__/__snapshots__/checkbox.test.tsx.snap b/components/checkbox/__tests__/__snapshots__/checkbox.test.tsx.snap index ae18e7417675..af26973871cc 100644 --- a/components/checkbox/__tests__/__snapshots__/checkbox.test.tsx.snap +++ b/components/checkbox/__tests__/__snapshots__/checkbox.test.tsx.snap @@ -5,7 +5,7 @@ exports[`Checkbox rtl render component should be rendered correctly in RTL direc class="ant-checkbox-wrapper ant-checkbox-rtl" > { checkboxSize: number; } -// ============================== Motion ============================== -const antCheckboxEffect = new Keyframes('antCheckboxEffect', { - '0%': { - transform: 'scale(1)', - opacity: 0.5, - }, - - '100%': { - transform: 'scale(1.6)', - opacity: 0, - }, -}); - // ============================== Styles ============================== export const genCheckboxStyle: GenerateStyle = (token) => { const { checkboxCls } = token; @@ -82,6 +68,7 @@ export const genCheckboxStyle: GenerateStyle = (token) => { whiteSpace: 'nowrap', lineHeight: 1, cursor: 'pointer', + borderRadius: token.borderRadiusSM, // To make alignment right when `controlHeight` is changed // Ref: https://github.com/ant-design/ant-design/issues/41564 @@ -148,13 +135,7 @@ export const genCheckboxStyle: GenerateStyle = (token) => { // ===================== Hover ===================== { - // Wrapper - [`${wrapperCls}:hover ${checkboxCls}:after`]: { - visibility: 'visible', - }, - // Wrapper & Wrapper > Checkbox - [` ${wrapperCls}:not(${wrapperCls}-disabled), ${checkboxCls}:not(${checkboxCls}-disabled) @@ -189,24 +170,6 @@ export const genCheckboxStyle: GenerateStyle = (token) => { transition: `all ${token.motionDurationMid} ${token.motionEaseOutBack} ${token.motionDurationFast}`, }, }, - - // Checked Effect - '&:after': { - position: 'absolute', - top: 0, - insetInlineStart: 0, - width: '100%', - height: '100%', - borderRadius: token.borderRadiusSM, - visibility: 'hidden', - border: `${token.lineWidthBold}px solid ${token.colorPrimary}`, - animationName: antCheckboxEffect, - animationDuration: token.motionDurationSlow, - animationTimingFunction: 'ease-in-out', - animationFillMode: 'backwards', - content: '""', - transition: `all ${token.motionDurationSlow}`, - }, }, [` @@ -217,9 +180,6 @@ export const genCheckboxStyle: GenerateStyle = (token) => { backgroundColor: token.colorPrimaryHover, borderColor: 'transparent', }, - [`&:hover ${checkboxCls}:after`]: { - borderColor: token.colorPrimaryHover, - }, }, }, diff --git a/components/config-provider/__tests__/__snapshots__/components.test.tsx.snap b/components/config-provider/__tests__/__snapshots__/components.test.tsx.snap index 76dccfb15b98..8da9dd90609f 100644 --- a/components/config-provider/__tests__/__snapshots__/components.test.tsx.snap +++ b/components/config-provider/__tests__/__snapshots__/components.test.tsx.snap @@ -12032,7 +12032,7 @@ exports[`ConfigProvider components Checkbox configProvider 1`] = ` class="config-checkbox-wrapper" > { .querySelectorAll('.ant-picker-time-panel-cell').length, ).toBe(60); }); + + it('allows or prohibits clearing as applicable', async () => { + const somepoint = dayjs('2023-08-01'); + const { rerender } = render(); + + const { role, options } = closeCircleByRole; + await userEvent.hover(screen.getByRole(role, options)); + await waitFor(() => expectCloseCircle(true)); + + rerender(); + await waitFor(() => expectCloseCircle(false)); + + rerender( }} />); + await waitFor(() => expectCloseCircle(true)); + + rerender( + }} + />, + ); + await waitFor(() => expectCloseCircle(false)); + await userEvent.hover(screen.getByTestId('custom-clear')); + + rerender(); + await waitFor(() => expectCloseCircle(true)); + }); }); diff --git a/components/date-picker/__tests__/RangePicker.test.tsx b/components/date-picker/__tests__/RangePicker.test.tsx index a8778c2717f7..df75efb60e7f 100644 --- a/components/date-picker/__tests__/RangePicker.test.tsx +++ b/components/date-picker/__tests__/RangePicker.test.tsx @@ -2,13 +2,14 @@ import dayjs from 'dayjs'; import customParseFormat from 'dayjs/plugin/customParseFormat'; import type { RangeValue } from 'rc-picker/lib/interface'; import React, { useState } from 'react'; +import userEvent from '@testing-library/user-event'; +import { CloseCircleFilled } from '@ant-design/icons'; import DatePicker from '..'; import focusTest from '../../../tests/shared/focusTest'; -import { render, resetMockDate, setMockDate } from '../../../tests/utils'; +import { render, resetMockDate, setMockDate, screen, waitFor } from '../../../tests/utils'; import { resetWarned } from '../../_util/warning'; import enUS from '../locale/en_US'; - -import { closePicker, openPicker, selectCell } from './utils'; +import { closeCircleByRole, expectCloseCircle, closePicker, openPicker, selectCell } from './utils'; dayjs.extend(customParseFormat); @@ -127,4 +128,38 @@ describe('RangePicker', () => { errSpy.mockRestore(); }); + + it('allows or prohibits clearing as applicable', async () => { + const somepoint = dayjs('2023-08-01'); + const { rerender } = render(); + + const { role, options } = closeCircleByRole; + await userEvent.hover(screen.getByRole(role, options)); + await waitFor(() => expectCloseCircle(true)); + + rerender(); + await waitFor(() => expectCloseCircle(false)); + + rerender( + }} + />, + ); + await waitFor(() => expectCloseCircle(true)); + + rerender( + }} + />, + ); + await waitFor(() => expectCloseCircle(false)); + await userEvent.hover(screen.getByTestId('custom-clear')); + + rerender(); + await waitFor(() => expectCloseCircle(true)); + }); }); diff --git a/components/date-picker/__tests__/utils.ts b/components/date-picker/__tests__/utils.ts index c2f87f9ecb27..56efb35a8903 100644 --- a/components/date-picker/__tests__/utils.ts +++ b/components/date-picker/__tests__/utils.ts @@ -1,5 +1,5 @@ import type { render } from '../../../tests/utils'; -import { fireEvent } from '../../../tests/utils'; +import { fireEvent, screen } from '../../../tests/utils'; export function openPicker(wrapper: ReturnType, index = 0) { fireEvent.mouseDown(wrapper.container?.querySelectorAll('input')?.[index]!); @@ -25,3 +25,11 @@ export function selectCell(wrapper: ReturnType, text: string | nu } return matchCell; } + +export const closeCircleByRole = { role: 'img', options: { name: 'close-circle' } } as const; + +export function expectCloseCircle(shouldExist: boolean) { + const { role, options } = closeCircleByRole; + const count = shouldExist ? 1 : 0; + return expect(screen.queryAllByRole(role, options).length).toStrictEqual(count); +} diff --git a/components/date-picker/generatePicker/generateRangePicker.tsx b/components/date-picker/generatePicker/generateRangePicker.tsx index f929dc0c824b..503f2806ddfb 100644 --- a/components/date-picker/generatePicker/generateRangePicker.tsx +++ b/components/date-picker/generatePicker/generateRangePicker.tsx @@ -18,7 +18,12 @@ import { useLocale } from '../../locale'; import { useCompactItemContext } from '../../space/Compact'; import enUS from '../locale/en_US'; import useStyle from '../style'; -import { getRangePlaceholder, getTimeProps, transPlacement2DropdownAlign } from '../util'; +import { + getRangePlaceholder, + getTimeProps, + mergeAllowClear, + transPlacement2DropdownAlign, +} from '../util'; import Components from './Components'; import type { CommonPickerMethods, PickerComponentClass } from './interface'; @@ -50,6 +55,7 @@ export default function generateRangePicker(generateConfig: GenerateCo dropdownClassName, status: customStatus, clearIcon, + allowClear, ...restProps } = props; @@ -141,7 +147,7 @@ export default function generateRangePicker(generateConfig: GenerateCo components={Components} direction={direction} dropdownClassName={classNames(hashId, popupClassName || dropdownClassName)} - allowClear={{ clearIcon: clearIcon ?? }} + allowClear={mergeAllowClear(allowClear, clearIcon, )} />, ); }); diff --git a/components/date-picker/generatePicker/generateSinglePicker.tsx b/components/date-picker/generatePicker/generateSinglePicker.tsx index c6b8073b2abf..44b988d4fb2e 100644 --- a/components/date-picker/generatePicker/generateSinglePicker.tsx +++ b/components/date-picker/generatePicker/generateSinglePicker.tsx @@ -19,7 +19,12 @@ import { useLocale } from '../../locale'; import { useCompactItemContext } from '../../space/Compact'; import enUS from '../locale/en_US'; import useStyle from '../style'; -import { getPlaceholder, getTimeProps, transPlacement2DropdownAlign } from '../util'; +import { + getPlaceholder, + getTimeProps, + mergeAllowClear, + transPlacement2DropdownAlign, +} from '../util'; import Components from './Components'; import type { CommonPickerMethods, DatePickRef, PickerComponentClass } from './interface'; @@ -55,6 +60,7 @@ export default function generatePicker(generateConfig: GenerateConfig< disabled: customDisabled, status: customStatus, clearIcon, + allowClear, ...restProps } = props; @@ -177,7 +183,7 @@ export default function generatePicker(generateConfig: GenerateConfig< rootClassName, popupClassName || dropdownClassName, )} - allowClear={{ clearIcon: clearIcon ?? }} + allowClear={mergeAllowClear(allowClear, clearIcon, )} />, ); }, diff --git a/components/date-picker/util.ts b/components/date-picker/util.ts index c0e0a20477e3..f624b5aebba0 100644 --- a/components/date-picker/util.ts +++ b/components/date-picker/util.ts @@ -3,7 +3,7 @@ import type { PickerMode } from 'rc-picker/lib/interface'; import type { SharedTimeProps } from 'rc-picker/lib/panels/TimePanel'; import type { SelectCommonPlacement } from '../_util/motion'; import type { DirectionType } from '../config-provider'; -import type { PickerLocale } from './generatePicker'; +import type { PickerLocale, PickerProps } from './generatePicker'; export function getPlaceholder( locale: PickerLocale, @@ -160,3 +160,19 @@ export function getTimeProps( showTime: showTimeObj, }; } + +type AllowClear = PickerProps['allowClear']; +type ClearIcon = PickerProps['clearIcon']; + +export function mergeAllowClear( + allowClear: AllowClear, + clearIcon: ClearIcon, + defaultClearIcon: NonNullable, +) { + if (allowClear === false) { + return false; + } + + const defaults = { clearIcon: clearIcon ?? defaultClearIcon }; + return typeof allowClear === 'object' ? { ...defaults, ...allowClear } : defaults; +} diff --git a/components/descriptions/Cell.tsx b/components/descriptions/Cell.tsx index 55256c84078d..82f322c117d5 100644 --- a/components/descriptions/Cell.tsx +++ b/components/descriptions/Cell.tsx @@ -33,7 +33,8 @@ const Cell: React.FC = (props) => { content, colon, } = props; - const Component = component as any; + + const Component = component as keyof JSX.IntrinsicElements; if (bordered) { return ( diff --git a/components/descriptions/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/descriptions/__tests__/__snapshots__/demo-extend.test.ts.snap index 19cc179d5284..4017157a71f8 100644 --- a/components/descriptions/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/descriptions/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -402,7 +402,7 @@ exports[`renders components/descriptions/demo/component-token.tsx extend context class="ant-radio-wrapper ant-radio-wrapper-checked" > (props: FormItemProps): React.Rea validateTrigger={mergedValidateTrigger} onMetaChange={onMetaChange} > - {(control, renderMeta, context) => { + {(control, renderMeta, context: FormInstance) => { const mergedName = toArray(name).length && renderMeta ? renderMeta.name : []; const fieldId = getFieldId(mergedName, formName); diff --git a/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap index 33898de0e0c1..bc475ce5a6c6 100644 --- a/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -750,7 +750,7 @@ exports[`renders components/form/demo/basic.tsx extend context correctly 1`] = ` class="ant-checkbox-wrapper ant-checkbox-wrapper-checked ant-checkbox-wrapper-in-form-item" > = (token: InputNumbe '&-lg': { [`${componentCls}-group-addon`]: { borderRadius: borderRadiusLG, + fontSize: token.fontSizeLG, }, }, '&-sm': { diff --git a/components/input/style/index.ts b/components/input/style/index.ts index fac6677eb54d..1c8d6a99d889 100644 --- a/components/input/style/index.ts +++ b/components/input/style/index.ts @@ -700,6 +700,7 @@ const genGroupStyle: GenerateStyle = (token: InputToken) => { '&-lg': { [`${componentCls}-group-addon`]: { borderRadius: borderRadiusLG, + fontSize: token.fontSizeLG, }, }, '&-sm': { diff --git a/components/locale/__tests__/__snapshots__/index.test.tsx.snap b/components/locale/__tests__/__snapshots__/index.test.tsx.snap index dbcdd5147c78..f7625284102a 100644 --- a/components/locale/__tests__/__snapshots__/index.test.tsx.snap +++ b/components/locale/__tests__/__snapshots__/index.test.tsx.snap @@ -5404,7 +5404,7 @@ exports[`Locale Provider should display the text as ar 1`] = ` class="ant-checkbox-wrapper ant-checkbox-wrapper-disabled ant-transfer-list-checkbox" > ((props, ref) => { const menuClassName = classNames(`${prefixCls}-${theme}`, menu?.className, className); // ====================== Expand Icon ======================== - let mergedExpandIcon: MenuProps[`expandIcon`]; + let mergedExpandIcon: MenuProps['expandIcon']; if (typeof expandIcon === 'function') { mergedExpandIcon = expandIcon; } else { - const beClone: any = expandIcon || overrideObj.expandIcon; + const beClone: React.ReactNode = expandIcon || overrideObj.expandIcon; mergedExpandIcon = cloneElement(beClone, { - className: classNames(`${prefixCls}-submenu-expand-icon`, beClone?.props?.className), + className: classNames( + `${prefixCls}-submenu-expand-icon`, + isValidElement(beClone) ? beClone.props?.className : '', + ), }); } diff --git a/components/pagination/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/pagination/__tests__/__snapshots__/demo-extend.test.ts.snap index a2e327c5d7a3..5de290439d31 100644 --- a/components/pagination/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/pagination/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -5660,6 +5660,683 @@ Array [
, +
, + , +
, + , ] `; diff --git a/components/pagination/__tests__/__snapshots__/demo.test.ts.snap b/components/pagination/__tests__/__snapshots__/demo.test.ts.snap index 8b8852043b78..8ba426887e52 100644 --- a/components/pagination/__tests__/__snapshots__/demo.test.ts.snap +++ b/components/pagination/__tests__/__snapshots__/demo.test.ts.snap @@ -4093,5 +4093,476 @@ Array [
, +
, + , +
, + , ] `; diff --git a/components/pagination/demo/wireframe.tsx b/components/pagination/demo/wireframe.tsx index ba97dcd1a665..c9cf3d7d448d 100644 --- a/components/pagination/demo/wireframe.tsx +++ b/components/pagination/demo/wireframe.tsx @@ -6,6 +6,10 @@ const App: React.FC = () => (
+
+ +
+ ); diff --git a/components/pagination/style/index.ts b/components/pagination/style/index.ts index 310a30b04525..31f4a79606b0 100644 --- a/components/pagination/style/index.ts +++ b/components/pagination/style/index.ts @@ -94,16 +94,6 @@ const genPaginationDisabledStyle: GenerateStyle = (t [`&${componentCls}-disabled`]: { cursor: 'not-allowed', - [`&${componentCls}-mini`]: { - [` - &:hover ${componentCls}-item:not(${componentCls}-item-active), - &:active ${componentCls}-item:not(${componentCls}-item-active), - &:hover ${componentCls}-item-link, - &:active ${componentCls}-item-link - `]: { - backgroundColor: 'transparent', - }, - }, [`${componentCls}-item`]: { cursor: 'not-allowed', @@ -189,30 +179,36 @@ const genPaginationMiniStyle: GenerateStyle = (token lineHeight: `${token.itemSizeSM - 2}px`, }, - [`&${componentCls}-mini ${componentCls}-item:not(${componentCls}-item-active)`]: { - backgroundColor: 'transparent', - borderColor: 'transparent', - '&:hover': { - backgroundColor: token.colorBgTextHover, - }, - '&:active': { - backgroundColor: token.colorBgTextActive, + [`&${componentCls}-mini:not(${componentCls}-disabled) ${componentCls}-item:not(${componentCls}-item-active)`]: + { + backgroundColor: 'transparent', + borderColor: 'transparent', + '&:hover': { + backgroundColor: token.colorBgTextHover, + }, + '&:active': { + backgroundColor: token.colorBgTextActive, + }, }, - }, [`&${componentCls}-mini ${componentCls}-prev, &${componentCls}-mini ${componentCls}-next`]: { minWidth: token.itemSizeSM, height: token.itemSizeSM, margin: 0, lineHeight: `${token.itemSizeSM}px`, - [`&:hover ${componentCls}-item-link`]: { - backgroundColor: token.colorBgTextHover, - }, - [`&:active ${componentCls}-item-link`]: { - backgroundColor: token.colorBgTextActive, - }, - [`&${componentCls}-disabled:hover ${componentCls}-item-link`]: { - backgroundColor: 'transparent', + }, + + [`&${componentCls}-mini:not(${componentCls}-disabled)`]: { + [`${componentCls}-prev, ${componentCls}-next`]: { + [`&:hover ${componentCls}-item-link`]: { + backgroundColor: token.colorBgTextHover, + }, + [`&:active ${componentCls}-item-link`]: { + backgroundColor: token.colorBgTextActive, + }, + [`&${componentCls}-disabled:hover ${componentCls}-item-link`]: { + backgroundColor: 'transparent', + }, }, }, @@ -375,16 +371,6 @@ const genPaginationJumpStyle: GenerateStyle = (token opacity: 0, }, }, - - '&:focus-visible': { - [`${componentCls}-item-link-icon`]: { - opacity: 1, - }, - [`${componentCls}-item-ellipsis`]: { - opacity: 0, - }, - ...genFocusOutline(token), - }, }, [` @@ -436,11 +422,7 @@ const genPaginationJumpStyle: GenerateStyle = (token border: `${token.lineWidth}px ${token.lineType} transparent`, borderRadius: token.borderRadius, outline: 'none', - transition: `border ${token.motionDurationMid}`, - }, - - [`&:focus-visible ${componentCls}-item-link`]: { - ...genFocusOutline(token), + transition: `all ${token.motionDurationMid}`, }, [`&:hover ${componentCls}-item-link`]: { @@ -520,7 +502,6 @@ const genPaginationItemStyle: GenerateStyle = (token display: 'block', padding: `0 ${token.paginationItemPaddingInline}px`, color: token.colorText, - transition: 'none', '&:hover': { textDecoration: 'none', @@ -538,10 +519,6 @@ const genPaginationItemStyle: GenerateStyle = (token }, }, - // cannot merge with `&:hover` - // see https://github.com/ant-design/ant-design/pull/34002 - ...genFocusStyle(token), - '&-active': { fontWeight: token.fontWeightStrong, backgroundColor: token.itemActiveBg, @@ -635,7 +612,7 @@ const genBorderedStyle: GenerateStyle = (token) => { const { componentCls } = token; return { - [`${componentCls}${componentCls}-disabled`]: { + [`${componentCls}${componentCls}-disabled:not(${componentCls}-mini)`]: { '&, &:hover': { [`${componentCls}-item-link`]: { borderColor: token.colorBorder, @@ -680,7 +657,7 @@ const genBorderedStyle: GenerateStyle = (token) => { }, }, - [componentCls]: { + [`${componentCls}:not(${componentCls}-mini)`]: { [`${componentCls}-prev, ${componentCls}-next`]: { '&:hover button': { borderColor: token.colorPrimaryHover, @@ -727,6 +704,36 @@ const genBorderedStyle: GenerateStyle = (token) => { }; }; +const genPaginationFocusStyle: GenerateStyle = (token) => { + const { componentCls } = token; + + return { + [`${componentCls}:not(${componentCls}-disabled)`]: { + [`${componentCls}-item`]: { + ...genFocusStyle(token), + }, + + [`${componentCls}-jump-prev, ${componentCls}-jump-next`]: { + '&:focus-visible': { + [`${componentCls}-item-link-icon`]: { + opacity: 1, + }, + [`${componentCls}-item-ellipsis`]: { + opacity: 0, + }, + ...genFocusOutline(token), + }, + }, + + [`${componentCls}-prev, ${componentCls}-next`]: { + [`&:focus-visible ${componentCls}-item-link`]: { + ...genFocusOutline(token), + }, + }, + }, + }; +}; + // ============================== Export ============================== export default genComponentStyleHook( 'Pagination', @@ -747,6 +754,7 @@ export default genComponentStyleHook( ); return [ genPaginationStyle(paginationToken), + genPaginationFocusStyle(paginationToken), token.wireframe && genBorderedStyle(paginationToken), ]; }, diff --git a/components/popconfirm/style/index.tsx b/components/popconfirm/style/index.tsx index 374f66118043..100cbdbb3c6f 100644 --- a/components/popconfirm/style/index.tsx +++ b/components/popconfirm/style/index.tsx @@ -65,6 +65,7 @@ const genBaseStyle: GenerateStyle = (token) => { [`${componentCls}-buttons`]: { textAlign: 'end', + whiteSpace: 'nowrap', button: { marginInlineStart: marginXS, diff --git a/components/radio/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/radio/__tests__/__snapshots__/demo-extend.test.ts.snap index 1153020c6d69..988eaaa17e64 100644 --- a/components/radio/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/radio/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -92,7 +92,7 @@ exports[`renders components/radio/demo/basic.tsx extend context correctly 1`] = class="ant-radio-wrapper" > = (props, ref) => { const groupContext = React.useContext(RadioGroupContext); @@ -37,10 +39,9 @@ const InternalRadio: React.ForwardRefRenderFunction = ( ...restProps } = props; const radioPrefixCls = getPrefixCls('radio', customizePrefixCls); - const prefixCls = - (groupContext?.optionType || radioOptionTypeContext) === 'button' - ? `${radioPrefixCls}-button` - : radioPrefixCls; + + const isButtonType = (groupContext?.optionType || radioOptionTypeContext) === 'button'; + const prefixCls = isButtonType ? `${radioPrefixCls}-button` : radioPrefixCls; // Style const [wrapSSR, hashId] = useStyle(radioPrefixCls); @@ -73,16 +74,24 @@ const InternalRadio: React.ForwardRefRenderFunction = ( ); return wrapSSR( - // eslint-disable-next-line jsx-a11y/label-has-associated-control - , + + {/* eslint-disable-next-line jsx-a11y/label-has-associated-control */} + + , ); }; diff --git a/components/radio/style/index.tsx b/components/radio/style/index.tsx index 57f82ce44ef7..18bdc10dd3fe 100644 --- a/components/radio/style/index.tsx +++ b/components/radio/style/index.tsx @@ -1,4 +1,3 @@ -import { Keyframes } from '@ant-design/cssinjs'; import { genFocusOutline, resetComponent } from '../../style'; import type { FullToken, GenerateStyle } from '../../theme/internal'; import { genComponentStyleHook, mergeToken } from '../../theme/internal'; @@ -72,11 +71,6 @@ interface RadioToken extends FullToken<'Radio'> { } // ============================== Styles ============================== -const antRadioEffect = new Keyframes('antRadioEffect', { - '0%': { transform: 'scale(1)', opacity: 0.5 }, - '100%': { transform: 'scale(1.6)', opacity: 0 }, -}); - // styles from RadioGroup only const getGroupRadioStyle: GenerateStyle = (token) => { const { componentCls, antCls } = token; @@ -113,7 +107,6 @@ const getRadioBasicStyle: GenerateStyle = (token) => { radioSize, motionDurationSlow, motionDurationMid, - motionEaseInOut, motionEaseInOutCirc, colorBgContainer, colorBorder, @@ -133,7 +126,6 @@ const getRadioBasicStyle: GenerateStyle = (token) => { return { [`${componentCls}-wrapper`]: { ...resetComponent(token), - position: 'relative', display: 'inline-flex', alignItems: 'baseline', marginInlineStart: 0, @@ -167,10 +159,6 @@ const getRadioBasicStyle: GenerateStyle = (token) => { border: `${lineWidth}px ${lineType} ${colorPrimary}`, borderRadius: '50%', visibility: 'hidden', - animationName: antRadioEffect, - animationDuration: motionDurationSlow, - animationTimingFunction: motionEaseInOut, - animationFillMode: 'both', content: '""', }, @@ -181,6 +169,7 @@ const getRadioBasicStyle: GenerateStyle = (token) => { outline: 'none', cursor: 'pointer', alignSelf: 'center', + borderRadius: '50%', }, [`${componentCls}-wrapper:hover &, @@ -238,6 +227,10 @@ const getRadioBasicStyle: GenerateStyle = (token) => { insetInlineEnd: 0, insetBlockEnd: 0, insetInlineStart: 0, + width: 0, + height: 0, + padding: 0, + margin: 0, zIndex: 1, cursor: 'pointer', opacity: 0, @@ -349,7 +342,6 @@ const getRadioButtonStyle: GenerateStyle = (token) => { transition: [ `color ${motionDurationMid}`, `background ${motionDurationMid}`, - `border-color ${motionDurationMid}`, `box-shadow ${motionDurationMid}`, ].join(','), diff --git a/components/space/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/space/__tests__/__snapshots__/demo-extend.test.ts.snap index 6baf7b53280f..b9d26e00d003 100644 --- a/components/space/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/space/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -15615,7 +15615,7 @@ Array [ class="ant-radio-wrapper ant-radio-wrapper-checked" > { act(() => { jest.advanceTimersByTime(100); }); + + // Second time for raf to render wave effect + act(() => { + jest.advanceTimersByTime(100); + }); expect(document.querySelector('.ant-wave')).toBeTruthy(); jest.clearAllTimers(); jest.useRealTimers(); diff --git a/components/table/__tests__/__snapshots__/Table.filter.test.tsx.snap b/components/table/__tests__/__snapshots__/Table.filter.test.tsx.snap index 0960c6b6ad63..0a0219ff0bb0 100644 --- a/components/table/__tests__/__snapshots__/Table.filter.test.tsx.snap +++ b/components/table/__tests__/__snapshots__/Table.filter.test.tsx.snap @@ -574,7 +574,7 @@ exports[`Table.filter renders menu correctly 1`] = ` class="ant-checkbox-wrapper" > = (token) => { }, [`${componentCls}-row-expand-icon`]: { + float: 'right', + '&::after': { transform: 'rotate(-90deg)', }, @@ -43,6 +45,10 @@ const genStyle: GenerateStyle = (token) => { insetInlineStart: 0, insetInlineEnd: 'unset', }, + + [`${componentCls}-row-indent`]: { + float: 'right', + }, }, }, }; diff --git a/components/tabs/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/tabs/__tests__/__snapshots__/demo-extend.test.ts.snap index a12781d55bce..710e51cb56d6 100644 --- a/components/tabs/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/tabs/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -2879,7 +2879,7 @@ Array [ class="ant-checkbox-wrapper ant-checkbox-wrapper-checked ant-checkbox-group-item" >
-
-
-
- - - - - New Tag - + + + + New Tag + +
+
`; diff --git a/components/tag/__tests__/__snapshots__/demo.test.ts.snap b/components/tag/__tests__/__snapshots__/demo.test.ts.snap index 1526b35713b0..4ca5e3007694 100644 --- a/components/tag/__tests__/__snapshots__/demo.test.ts.snap +++ b/components/tag/__tests__/__snapshots__/demo.test.ts.snap @@ -1198,7 +1198,7 @@ exports[`renders components/tag/demo/control.tsx correctly 1`] = ` >
-
-
-
- - - - - New Tag - + + + + New Tag + +
+ `; diff --git a/components/tag/demo/control.tsx b/components/tag/demo/control.tsx index 014e6b3c2a4d..082db27d46ba 100644 --- a/components/tag/demo/control.tsx +++ b/components/tag/demo/control.tsx @@ -21,7 +21,7 @@ const App: React.FC = () => { useEffect(() => { editInputRef.current?.focus(); - }, [inputValue]); + }, [editInputValue]); const handleClose = (removedTag: string) => { const newTags = tags.filter((tag) => tag !== removedTag); @@ -54,15 +54,18 @@ const App: React.FC = () => { newTags[editInputIndex] = editInputValue; setTags(newTags); setEditInputIndex(-1); - setInputValue(''); + setEditInputValue(''); }; const tagInputStyle: React.CSSProperties = { - width: 78, + width: 64, + height: 22, + marginInlineEnd: 8, verticalAlign: 'top', }; const tagPlusStyle: React.CSSProperties = { + height: 22, background: token.colorBgContainer, borderStyle: 'dashed', }; @@ -114,23 +117,23 @@ const App: React.FC = () => { tagElem ); })} + {inputVisible ? ( + + ) : ( + + New Tag + + )} - {inputVisible ? ( - - ) : ( - - New Tag - - )} ); }; diff --git a/components/theme/useToken.ts b/components/theme/useToken.ts index ba875225344e..2221d1909f39 100644 --- a/components/theme/useToken.ts +++ b/components/theme/useToken.ts @@ -52,7 +52,11 @@ export const getComputedToken = ( }; // ================================== Hook ================================== -export default function useToken(): [Theme, GlobalToken, string] { +export default function useToken(): [ + theme: Theme, + token: GlobalToken, + hashId: string, +] { const { token: rootDesignToken, hashed, diff --git a/components/time-picker/__tests__/__snapshots__/index.test.tsx.snap b/components/time-picker/__tests__/__snapshots__/index.test.tsx.snap index 45137dee427d..c06bfe119098 100644 --- a/components/time-picker/__tests__/__snapshots__/index.test.tsx.snap +++ b/components/time-picker/__tests__/__snapshots__/index.test.tsx.snap @@ -41,31 +41,6 @@ exports[`TimePicker not render clean icon when allowClear is false 1`] = ` - - - - - `; diff --git a/components/timeline/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/timeline/__tests__/__snapshots__/demo-extend.test.ts.snap index 50369f9efda7..f739d2c8e7af 100644 --- a/components/timeline/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/timeline/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -556,7 +556,7 @@ Array [ class="ant-radio-wrapper ant-radio-wrapper-checked" > `,则说明 SSR 中做过 inline style 注入。那么 `