From 666d0195d2ef97d7c22aefea36b549484149c283 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 08:35:43 +0800 Subject: [PATCH 1/8] chore: upgrade deps (#52375) Co-authored-by: afc163 <507615+afc163@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 15453a0a02..45f48f3995 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ "rc-rate": "~2.13.0", "rc-resize-observer": "^1.4.3", "rc-segmented": "~2.7.0", - "rc-select": "~14.16.4", + "rc-select": "~14.16.5", "rc-slider": "~11.1.8", "rc-steps": "~6.0.1", "rc-switch": "~4.1.0", From a771c256c289b771df3cf2820c85643e885ca186 Mon Sep 17 00:00:00 2001 From: Jony J <1844749591@qq.com> Date: Mon, 13 Jan 2025 12:32:12 +0800 Subject: [PATCH 2/8] fix(layout/collapse): icon direction in rtl mode (#52374) * fix: collapse icon position in rtl mode * fix: layout sider icon position in rtl mode * chore: remove rtl demo --- components/collapse/Collapse.tsx | 2 +- components/layout/Sider.tsx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/components/collapse/Collapse.tsx b/components/collapse/Collapse.tsx index b7e4bf813b..e8ca7ea3dc 100644 --- a/components/collapse/Collapse.tsx +++ b/components/collapse/Collapse.tsx @@ -106,7 +106,7 @@ const Collapse = React.forwardRef((props, ref) => mergedExpandIcon(panelProps) ) : ( ); diff --git a/components/layout/Sider.tsx b/components/layout/Sider.tsx index f5edd636bf..504854bc4b 100644 --- a/components/layout/Sider.tsx +++ b/components/layout/Sider.tsx @@ -99,7 +99,7 @@ const Sider = React.forwardRef((props, ref) => { }; // =========================== Prefix =========================== - const { getPrefixCls } = useContext(ConfigContext); + const { getPrefixCls, direction } = useContext(ConfigContext); const prefixCls = getPrefixCls('layout-sider', customizePrefixCls); const [wrapCSSVar, hashId, cssVarCls] = useStyle(prefixCls); @@ -171,9 +171,10 @@ const Sider = React.forwardRef((props, ref) => { {trigger || } ) : null; + const reverseIcon = (direction === 'rtl') === !reverseArrow; const iconObj = { - expanded: reverseArrow ? : , - collapsed: reverseArrow ? : , + expanded: reverseIcon ? : , + collapsed: reverseIcon ? : , }; const status = collapsed ? 'collapsed' : 'expanded'; const defaultTrigger = iconObj[status]; From 6fbe989ed2bd47af831a6afa90e48f618845a915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E7=88=B1=E5=90=83=E7=99=BD=E8=90=9D?= =?UTF-8?q?=E5=8D=9C?= Date: Mon, 13 Jan 2025 14:27:43 +0800 Subject: [PATCH 3/8] test: update snapshot (#52377) --- .../__tests__/__snapshots__/demo-extend.test.ts.snap | 10 +++++----- .../input/__tests__/__snapshots__/demo.test.tsx.snap | 8 ++++---- components/input/demo/group.tsx | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/components/input/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/input/__tests__/__snapshots__/demo-extend.test.ts.snap index 3a0b04d19f..c94fdb6125 100644 --- a/components/input/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/input/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -6805,13 +6805,13 @@ exports[`renders components/input/demo/group.tsx extend context correctly 1`] = class="ant-btn-icon" > @@ -6840,7 +6840,7 @@ exports[`renders components/input/demo/group.tsx extend context correctly 1`] = class="ant-tooltip-inner" role="tooltip" > - copy git url + search git url diff --git a/components/input/__tests__/__snapshots__/demo.test.tsx.snap b/components/input/__tests__/__snapshots__/demo.test.tsx.snap index 706e73ce87..8f5c55868d 100644 --- a/components/input/__tests__/__snapshots__/demo.test.tsx.snap +++ b/components/input/__tests__/__snapshots__/demo.test.tsx.snap @@ -2598,13 +2598,13 @@ exports[`renders components/input/demo/group.tsx correctly 1`] = ` class="ant-btn-icon" > diff --git a/components/input/demo/group.tsx b/components/input/demo/group.tsx index e25482200c..1bf28b0090 100644 --- a/components/input/demo/group.tsx +++ b/components/input/demo/group.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { CopyOutlined } from '@ant-design/icons'; +import { SearchOutlined } from '@ant-design/icons'; import { AutoComplete, Button, @@ -78,8 +78,8 @@ const App: React.FC = () => ( style={{ width: 'calc(100% - 200px)' }} defaultValue="git@github.com:ant-design/ant-design.git" /> - -