mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
chore(deps): update dependency @dnd-kit/sortable to v9 (#51751)
* chore(deps): update dependency @dnd-kit/sortable to v9 * test: update test snap * test: update test snap --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: 栗嘉男 <574980606@qq.com>
This commit is contained in:
parent
360bf8ab2a
commit
f086a77883
@ -4827,7 +4827,7 @@ Array [
|
||||
aria-live="assertive"
|
||||
id="DndLiveRegion-5"
|
||||
role="status"
|
||||
style="position: fixed; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
|
||||
style="position: fixed; top: 0px; left: 0px; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
|
||||
/>,
|
||||
]
|
||||
`;
|
||||
@ -5063,7 +5063,7 @@ Array [
|
||||
aria-live="assertive"
|
||||
id="DndLiveRegion-1"
|
||||
role="status"
|
||||
style="position: fixed; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
|
||||
style="position: fixed; top: 0px; left: 0px; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
|
||||
/>,
|
||||
]
|
||||
`;
|
||||
@ -5406,7 +5406,7 @@ Array [
|
||||
aria-live="assertive"
|
||||
id="DndLiveRegion-3"
|
||||
role="status"
|
||||
style="position: fixed; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
|
||||
style="position: fixed; top: 0px; left: 0px; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
|
||||
/>,
|
||||
]
|
||||
`;
|
||||
|
@ -2491,7 +2491,7 @@ exports[`renders components/tabs/demo/custom-tab-bar-node.tsx extend context cor
|
||||
aria-live="assertive"
|
||||
id="DndLiveRegion-1"
|
||||
role="status"
|
||||
style="position: fixed; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
|
||||
style="position: fixed; top: 0px; left: 0px; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
|
||||
/>
|
||||
<div
|
||||
class="ant-tabs-content-holder"
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { useState } from 'react';
|
||||
import type { DragEndEvent } from '@dnd-kit/core';
|
||||
import { DndContext, PointerSensor, closestCenter, useSensor } from '@dnd-kit/core';
|
||||
import { closestCenter, DndContext, PointerSensor, useSensor } from '@dnd-kit/core';
|
||||
import {
|
||||
arrayMove,
|
||||
horizontalListSortingStrategy,
|
||||
@ -9,12 +9,13 @@ import {
|
||||
} from '@dnd-kit/sortable';
|
||||
import { CSS } from '@dnd-kit/utilities';
|
||||
import { Tabs } from 'antd';
|
||||
import type { TabsProps } from 'antd';
|
||||
|
||||
interface DraggableTabPaneProps extends React.HTMLAttributes<HTMLDivElement> {
|
||||
'data-node-key': string;
|
||||
}
|
||||
|
||||
const DraggableTabNode = ({ className, ...props }: DraggableTabPaneProps) => {
|
||||
const DraggableTabNode: React.FC<Readonly<DraggableTabPaneProps>> = ({ className, ...props }) => {
|
||||
const { attributes, listeners, setNodeRef, transform, transition } = useSortable({
|
||||
id: props['data-node-key'],
|
||||
});
|
||||
@ -35,22 +36,10 @@ const DraggableTabNode = ({ className, ...props }: DraggableTabPaneProps) => {
|
||||
};
|
||||
|
||||
const App: React.FC = () => {
|
||||
const [items, setItems] = useState([
|
||||
{
|
||||
key: '1',
|
||||
label: 'Tab 1',
|
||||
children: 'Content of Tab Pane 1',
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
label: 'Tab 2',
|
||||
children: 'Content of Tab Pane 2',
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
label: 'Tab 3',
|
||||
children: 'Content of Tab Pane 3',
|
||||
},
|
||||
const [items, setItems] = useState<NonNullable<TabsProps['items']>>([
|
||||
{ key: '1', label: 'Tab 1', children: 'Content of Tab Pane 1' },
|
||||
{ key: '2', label: 'Tab 2', children: 'Content of Tab Pane 2' },
|
||||
{ key: '3', label: 'Tab 3', children: 'Content of Tab Pane 3' },
|
||||
]);
|
||||
|
||||
const sensor = useSensor(PointerSensor, { activationConstraint: { distance: 10 } });
|
||||
|
@ -906,7 +906,7 @@ Array [
|
||||
aria-live="assertive"
|
||||
id="DndLiveRegion-1"
|
||||
role="status"
|
||||
style="position: fixed; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
|
||||
style="position: fixed; top: 0px; left: 0px; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
|
||||
/>,
|
||||
]
|
||||
`;
|
||||
|
@ -2157,7 +2157,7 @@ Array [
|
||||
aria-live="assertive"
|
||||
id="DndLiveRegion-1"
|
||||
role="status"
|
||||
style="position: fixed; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
|
||||
style="position: fixed; top: 0px; left: 0px; width: 1px; height: 1px; margin: -1px; border: 0px; padding: 0px; overflow: hidden; clip-path: inset(100%); white-space: nowrap;"
|
||||
/>,
|
||||
]
|
||||
`;
|
||||
|
@ -164,9 +164,9 @@
|
||||
"@biomejs/biome": "^1.9.4",
|
||||
"@codecov/webpack-plugin": "^1.2.1",
|
||||
"@codesandbox/sandpack-react": "^2.19.9",
|
||||
"@dnd-kit/core": "^6.1.0",
|
||||
"@dnd-kit/modifiers": "^7.0.0",
|
||||
"@dnd-kit/sortable": "^8.0.0",
|
||||
"@dnd-kit/core": "^6.2.0",
|
||||
"@dnd-kit/modifiers": "^8.0.0",
|
||||
"@dnd-kit/sortable": "^9.0.0",
|
||||
"@dnd-kit/utilities": "^3.2.2",
|
||||
"@emotion/css": "^11.13.4",
|
||||
"@emotion/react": "^11.13.3",
|
||||
|
Loading…
Reference in New Issue
Block a user