diff --git a/.dumi/theme/builtins/ComponentOverview/index.tsx b/.dumi/theme/builtins/ComponentOverview/index.tsx
index 6b12828c7e..ad02ce28e5 100644
--- a/.dumi/theme/builtins/ComponentOverview/index.tsx
+++ b/.dumi/theme/builtins/ComponentOverview/index.tsx
@@ -243,7 +243,7 @@ const Overview: React.FC = () => {
{cardContent}
) : (
-
+
{cardContent}
);
diff --git a/.dumi/theme/builtins/DemoWrapper/index.tsx b/.dumi/theme/builtins/DemoWrapper/index.tsx
index dd6f1919a1..5f408be6cc 100644
--- a/.dumi/theme/builtins/DemoWrapper/index.tsx
+++ b/.dumi/theme/builtins/DemoWrapper/index.tsx
@@ -1,4 +1,4 @@
-import React, { useContext } from 'react';
+import React, { Suspense, useContext } from 'react';
import { BugOutlined, CodeOutlined, ExperimentOutlined } from '@ant-design/icons';
import { ConfigProvider, Tooltip, Button } from 'antd';
import classNames from 'classnames';
@@ -113,7 +113,9 @@ const DemoWrapper: typeof DumiDemoGrid = ({ items }) => {
-
+
+
+
);
diff --git a/.dumi/theme/common/Link.tsx b/.dumi/theme/common/Link.tsx
index 9cfea27292..bccbbc1547 100644
--- a/.dumi/theme/common/Link.tsx
+++ b/.dumi/theme/common/Link.tsx
@@ -1,7 +1,6 @@
-import type { MouseEvent, MouseEventHandler } from 'react';
-import React, { forwardRef, useLayoutEffect, useTransition } from 'react';
-import { Link as DumiLink, useLocation, useNavigate } from 'dumi';
-import nprogress from 'nprogress';
+import type { MouseEventHandler } from 'react';
+import React from 'react';
+import { Link as DumiLink } from 'dumi';
export interface LinkProps {
to: string | { pathname?: string; search?: string; hash?: string };
@@ -9,64 +8,9 @@ export interface LinkProps {
className?: string;
onClick?: MouseEventHandler;
component?: React.ComponentType;
+ children?: React.ReactNode;
}
-nprogress.configure({ showSpinner: false });
-
-const Link = forwardRef>((props, ref) => {
- const { to, children, component, ...rest } = props;
- const [isPending, startTransition] = useTransition();
- const navigate = useNavigate();
- const { pathname } = useLocation();
-
- const href = React.useMemo(() => {
- if (typeof to === 'object') {
- return `${to.pathname || pathname}${to.search || ''}${to.hash || ''}`;
- }
- return to;
- }, [to]);
-
- const handleClick = (e: MouseEvent) => {
- props.onClick?.(e);
- if (!href?.startsWith('http')) {
- // Should support open in new tab
- if (!e.metaKey && !e.ctrlKey && !e.shiftKey) {
- e.preventDefault();
- startTransition(() => {
- if (href) {
- navigate(href);
- }
- });
- }
- }
- };
-
- useLayoutEffect(() => {
- if (isPending) {
- nprogress.start();
- } else {
- nprogress.done();
- }
- }, [isPending]);
-
- if (component) {
- return React.createElement(
- component,
- {
- ...rest,
- ref,
- onClick: handleClick,
- href,
- },
- children,
- );
- }
-
- return (
-
- {children}
-
- );
-});
+const Link: React.FC = (props) => ;
export default Link;
diff --git a/.dumi/theme/common/styles/Demo.tsx b/.dumi/theme/common/styles/Demo.tsx
index 912bd88afb..d738b76aab 100644
--- a/.dumi/theme/common/styles/Demo.tsx
+++ b/.dumi/theme/common/styles/Demo.tsx
@@ -350,9 +350,8 @@ const GlobalDemoStyles: React.FC = () => {
}
${antCls}-btn {
- opacity: 0.6;
&.icon-enabled {
- background: ${token.colorFillSecondary};
+ background-color: ${token.colorFillSecondary};
opacity: 1;
${iconCls} {
color: ${token.colorTextBase};
diff --git a/.dumirc.ts b/.dumirc.ts
index a440e99ef3..57672e5d8e 100644
--- a/.dumirc.ts
+++ b/.dumirc.ts
@@ -9,7 +9,11 @@ import { version } from './package.json';
export default defineConfig({
plugins: ['dumi-plugin-color-chunk'],
+
+ // For
+ routePrefetch: {},
manifest: {},
+
conventionRoutes: {
// to avoid generate routes for .dumi/pages/index/components/xx
exclude: [/index\/components\//],
diff --git a/components/avatar/group.tsx b/components/avatar/group.tsx
index cccae8c40d..34fc2ee5ed 100644
--- a/components/avatar/group.tsx
+++ b/components/avatar/group.tsx
@@ -102,7 +102,10 @@ const Group: React.FC = (props) => {
);
const childrenWithProps = toArray(children).map((child, index) =>
- cloneElement(child, { key: `avatar-key-${index}` }),
+ cloneElement(child, {
+ // eslint-disable-next-line react/no-array-index-key
+ key: `avatar-key-${index}`,
+ }),
);
const mergeCount = max?.count || maxCount;
diff --git a/components/breadcrumb/Breadcrumb.tsx b/components/breadcrumb/Breadcrumb.tsx
index 049892e2a9..f23106db56 100755
--- a/components/breadcrumb/Breadcrumb.tsx
+++ b/components/breadcrumb/Breadcrumb.tsx
@@ -199,6 +199,7 @@ const Breadcrumb = (props: BreadcrumbProps)
const isLastItem = index === childrenLength - 1;
return cloneElement(element, {
separator: isLastItem ? '' : separator,
+ // eslint-disable-next-line react/no-array-index-key
key: index,
});
});
diff --git a/components/button/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/button/__tests__/__snapshots__/demo-extend.test.ts.snap
index ed0420ec52..33cde627cb 100644
--- a/components/button/__tests__/__snapshots__/demo-extend.test.ts.snap
+++ b/components/button/__tests__/__snapshots__/demo-extend.test.ts.snap
@@ -1117,6 +1117,7 @@ Array [
class="ant-btn ant-btn-default ant-btn-color-default ant-btn-variant-outlined ant-btn-lg ant-btn-icon-only"
href="https://www.google.com"
tabindex="0"
+ target="_blank"
>
{
}>
Search
- } href="https://www.google.com" />
+ } href="https://www.google.com" target="_blank" />
- } href="https://www.google.com" iconPosition={position} />
+ }
+ href="https://www.google.com"
+ target="_blank"
+ iconPosition={position}
+ />
Loading
diff --git a/components/button/demo/icon.tsx b/components/button/demo/icon.tsx
index d6b0695024..10ca156140 100644
--- a/components/button/demo/icon.tsx
+++ b/components/button/demo/icon.tsx
@@ -30,7 +30,7 @@ const App: React.FC = () => (
}>
Search
- } href="https://www.google.com" />
+ } href="https://www.google.com" target="_blank" />
);
diff --git a/components/config-provider/demo/direction.tsx b/components/config-provider/demo/direction.tsx
index b7d30e1fe4..b8d93a3861 100644
--- a/components/config-provider/demo/direction.tsx
+++ b/components/config-provider/demo/direction.tsx
@@ -406,7 +406,10 @@ const Page: React.FC<{ placement: Placement }> = ({ placement }) => {
* Note: Half star not implemented in RTL direction, it will be
- supported after rc-rate{' '}
+ supported after{' '}
+
+ rc-rate
+ {' '}
implement rtl support.
diff --git a/components/drawer/__tests__/__snapshots__/demo-extend.test.tsx.snap b/components/drawer/__tests__/__snapshots__/demo-extend.test.tsx.snap
index cedeb93534..8db6c7b085 100644
--- a/components/drawer/__tests__/__snapshots__/demo-extend.test.tsx.snap
+++ b/components/drawer/__tests__/__snapshots__/demo-extend.test.tsx.snap
@@ -4343,6 +4343,8 @@ Array [
github.com/ant-design/ant-design/
diff --git a/components/drawer/demo/user-profile.tsx b/components/drawer/demo/user-profile.tsx
index 5c56c2bdb8..16d8079601 100644
--- a/components/drawer/demo/user-profile.tsx
+++ b/components/drawer/demo/user-profile.tsx
@@ -135,7 +135,7 @@ const App: React.FC = () => {
+
github.com/ant-design/ant-design/
}
diff --git a/components/dropdown/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/dropdown/__tests__/__snapshots__/demo-extend.test.ts.snap
index 9748a46f41..19324174bc 100644
--- a/components/dropdown/__tests__/__snapshots__/demo-extend.test.ts.snap
+++ b/components/dropdown/__tests__/__snapshots__/demo-extend.test.ts.snap
@@ -7263,6 +7263,8 @@ Array [
>
1st menu item
@@ -7296,6 +7298,8 @@ Array [
>
2nd menu item
diff --git a/components/dropdown/demo/trigger.tsx b/components/dropdown/demo/trigger.tsx
index ca85c6fb85..86dee437da 100644
--- a/components/dropdown/demo/trigger.tsx
+++ b/components/dropdown/demo/trigger.tsx
@@ -5,11 +5,19 @@ import { Dropdown, Space } from 'antd';
const items: MenuProps['items'] = [
{
- label: 1st menu item,
+ label: (
+
+ 1st menu item
+
+ ),
key: '0',
},
{
- label: 2nd menu item,
+ label: (
+
+ 2nd menu item
+
+ ),
key: '1',
},
{
diff --git a/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap
index 0e32f7d2f5..40208dfa52 100644
--- a/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap
+++ b/components/form/__tests__/__snapshots__/demo-extend.test.ts.snap
@@ -942,6 +942,8 @@ Array [
>
#36459
@@ -1376,6 +1378,8 @@ Array [
>
#36459
diff --git a/components/form/__tests__/__snapshots__/demo.test.tsx.snap b/components/form/__tests__/__snapshots__/demo.test.tsx.snap
index 073d0bbb64..9dc70c7578 100644
--- a/components/form/__tests__/__snapshots__/demo.test.tsx.snap
+++ b/components/form/__tests__/__snapshots__/demo.test.tsx.snap
@@ -778,6 +778,8 @@ Array [
>
#36459
@@ -1107,6 +1109,8 @@ Array [
>
#36459
diff --git a/components/form/demo/col-24-debug.tsx b/components/form/demo/col-24-debug.tsx
index f7a288ff41..e4d923f35a 100644
--- a/components/form/demo/col-24-debug.tsx
+++ b/components/form/demo/col-24-debug.tsx
@@ -3,7 +3,15 @@ import { Button, Divider, Form, Input, Select } from 'antd';
const sharedItem = (
#36459}
+ label={
+
+ #36459
+
+ }
initialValue={['bamboo']}
name="select"
style={{ boxShadow: '0 0 3px red' }}
diff --git a/components/modal/demo/footer.tsx b/components/modal/demo/footer.tsx
index 32965e2a29..a1d7490959 100644
--- a/components/modal/demo/footer.tsx
+++ b/components/modal/demo/footer.tsx
@@ -41,6 +41,7 @@ const App: React.FC = () => {
Link
diff --git a/components/tag/__tests__/__snapshots__/demo.test.ts.snap b/components/tag/__tests__/__snapshots__/demo.test.ts.snap
index 8a3127e9e3..23c94e94b3 100644
--- a/components/tag/__tests__/__snapshots__/demo.test.ts.snap
+++ b/components/tag/__tests__/__snapshots__/demo.test.ts.snap
@@ -141,6 +141,8 @@ Array [
>
Link
diff --git a/components/tag/demo/basic.tsx b/components/tag/demo/basic.tsx
index 21134b87d6..394d01fdfa 100644
--- a/components/tag/demo/basic.tsx
+++ b/components/tag/demo/basic.tsx
@@ -11,7 +11,13 @@ const App: React.FC = () => (
<>
Tag 1
- Link
+
+ Link
+
Prevent Default
diff --git a/components/tag/demo/component-token.tsx b/components/tag/demo/component-token.tsx
index a85dd57807..fdc2dfed39 100644
--- a/components/tag/demo/component-token.tsx
+++ b/components/tag/demo/component-token.tsx
@@ -8,10 +8,22 @@ const App: React.FC = () => (
>
- Link
+
+ Link
+
- Link
+
+ Link
+
Tag 2
diff --git a/package.json b/package.json
index 6c80e44cba..777a90694a 100644
--- a/package.json
+++ b/package.json
@@ -135,12 +135,12 @@
"rc-motion": "^2.9.3",
"rc-notification": "~5.6.2",
"rc-pagination": "~4.3.0",
- "rc-picker": "~4.8.2",
+ "rc-picker": "~4.8.3",
"rc-progress": "~4.0.0",
"rc-rate": "~2.13.0",
"rc-resize-observer": "^1.4.0",
"rc-segmented": "~2.5.0",
- "rc-select": "~14.16.3",
+ "rc-select": "~14.16.4",
"rc-slider": "~11.1.7",
"rc-steps": "~6.0.1",
"rc-switch": "~4.1.0",
@@ -165,8 +165,8 @@
"@codecov/webpack-plugin": "^1.2.1",
"@codesandbox/sandpack-react": "^2.19.9",
"@dnd-kit/core": "^6.2.0",
- "@dnd-kit/modifiers": "^8.0.0",
- "@dnd-kit/sortable": "^9.0.0",
+ "@dnd-kit/modifiers": "^9.0.0",
+ "@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@emotion/css": "^11.13.4",
"@emotion/react": "^11.13.3",
@@ -201,7 +201,6 @@
"@types/lodash": "^4.17.12",
"@types/minimist": "^1.2.5",
"@types/node": "^22.7.7",
- "@types/nprogress": "^0.2.3",
"@types/pixelmatch": "^5.2.6",
"@types/pngjs": "^6.0.5",
"@types/prismjs": "^1.26.4",
@@ -237,7 +236,7 @@
"eslint-plugin-compat": "^6.0.1",
"eslint-plugin-jest": "^28.8.3",
"eslint-plugin-jsx-a11y": "^6.10.0",
- "eslint-plugin-react-hooks": "^5.0.0",
+ "eslint-plugin-react-hooks": "5.0.0",
"eslint-plugin-react-refresh": "^0.4.13",
"fast-glob": "^3.3.2",
"fetch-jsonp": "^1.3.0",
@@ -270,7 +269,6 @@
"mockdate": "^3.0.5",
"node-fetch": "^3.3.2",
"node-notifier": "^10.0.1",
- "nprogress": "^0.2.0",
"open": "^10.1.0",
"ora": "^8.1.0",
"p-all": "^5.0.0",
diff --git a/tests/shared/accessibilityTest.tsx b/tests/shared/accessibilityTest.tsx
index 4df29d5045..6ab29067fb 100644
--- a/tests/shared/accessibilityTest.tsx
+++ b/tests/shared/accessibilityTest.tsx
@@ -120,6 +120,7 @@ type Options = {
export default function accessibilityDemoTest(component: string, options: Options = {}) {
// If skip is true, return immediately without executing any tests
if (options.skip === true) {
+ // eslint-disable-next-line jest/no-disabled-tests
describe.skip(`${component} demo a11y`, () => {
it('skipped', () => {});
});