@aiquants/drag-drop-panels 0.8.0 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +104 -79
- package/dist/DragDropLayout.d.ts.map +1 -1
- package/dist/drag-drop/ColumnControlPanel.d.ts.map +1 -1
- package/dist/drag-drop/ColumnInsertPanel.d.ts.map +1 -1
- package/dist/drag-drop/ResponsiveControl.d.ts.map +1 -1
- package/dist/index.es.js +1298 -1133
- package/dist/index.umd.js +2 -2
- package/dist/styles/drag-drop-panels.standalone.css +1 -1
- package/package.json +1 -1
- package/src/DragDropLayout.spec.tsx +68 -0
- package/src/DragDropLayout.tsx +17 -2
- package/src/drag-drop/ColumnControlPanel.tsx +5 -2
- package/src/drag-drop/ColumnInsertPanel.tsx +2 -1
- package/src/drag-drop/ResponsiveControl.tsx +2 -1
- package/src/lucide-icons.d.ts +6 -0
package/src/DragDropLayout.tsx
CHANGED
|
@@ -5,7 +5,13 @@
|
|
|
5
5
|
* このファイルは、ドラッグ&ドロップインターフェースのメインレイアウトコンポーネントを定義します。
|
|
6
6
|
* カラム、パネル、ドラッグイベント、FLIPアニメーションを統合し、完全にインタラクティブなユーザーエクスペリエンスを提供します。
|
|
7
7
|
*/
|
|
8
|
-
import
|
|
8
|
+
import Eye from "lucide-react/dist/esm/icons/eye.js"
|
|
9
|
+
import EyeOff from "lucide-react/dist/esm/icons/eye-off.js"
|
|
10
|
+
import Maximize2 from "lucide-react/dist/esm/icons/maximize-2.js"
|
|
11
|
+
import Minimize2 from "lucide-react/dist/esm/icons/minimize-2.js"
|
|
12
|
+
import MousePointer from "lucide-react/dist/esm/icons/mouse-pointer.js"
|
|
13
|
+
import MousePointerClick from "lucide-react/dist/esm/icons/mouse-pointer-click.js"
|
|
14
|
+
import X from "lucide-react/dist/esm/icons/x.js"
|
|
9
15
|
import { type CSSProperties, type DragEvent, Fragment, type MouseEvent, memo, type TouchEvent, useEffect, useLayoutEffect, useMemo, useRef } from "react"
|
|
10
16
|
import { debugLog, PanelSizeDisplay } from "./drag-drop/DebugComponents"
|
|
11
17
|
import { DropZoneDebugOverlay, InsertPlaceholder } from "./drag-drop/DebugOverlay"
|
|
@@ -425,7 +431,16 @@ export const DragDropLayout = ({
|
|
|
425
431
|
// PanelConfig.minHeight/maxHeight 指定時は従来のハードコード既定 (200px/500px) を上書きする。
|
|
426
432
|
// 未指定時は既定値を inline style で適用するため、既存コンシューマの見た目は不変。
|
|
427
433
|
const heightStyle: CSSProperties = isMaximized
|
|
428
|
-
? {
|
|
434
|
+
? {
|
|
435
|
+
position: "fixed",
|
|
436
|
+
top: "var(--aqdd-maximize-top, 0px)",
|
|
437
|
+
right: "var(--aqdd-maximize-right, 0px)",
|
|
438
|
+
bottom: "var(--aqdd-maximize-bottom, 0px)",
|
|
439
|
+
left: "var(--aqdd-maximize-left, 0px)",
|
|
440
|
+
zIndex: 50,
|
|
441
|
+
minHeight: 0,
|
|
442
|
+
maxHeight: "none",
|
|
443
|
+
}
|
|
429
444
|
: {
|
|
430
445
|
minHeight: panelConfig.minHeight ?? "200px",
|
|
431
446
|
maxHeight: panelConfig.maxHeight ?? "500px",
|
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
* このコンポーネントは、ドラッグ&ドロップレイアウトにおいて、カラム数の管理、
|
|
8
8
|
* パネルの自動バランス調整、およびカラム幅のリセットを行うためのUIコントロールを提供します。
|
|
9
9
|
*/
|
|
10
|
-
import
|
|
10
|
+
import Grid3x3 from "lucide-react/dist/esm/icons/grid-3x3.js"
|
|
11
|
+
import Minus from "lucide-react/dist/esm/icons/minus.js"
|
|
12
|
+
import Plus from "lucide-react/dist/esm/icons/plus.js"
|
|
13
|
+
import RotateCcw from "lucide-react/dist/esm/icons/rotate-ccw.js"
|
|
11
14
|
|
|
12
15
|
/**
|
|
13
16
|
* Props for the ColumnControlPanel component.
|
|
@@ -95,7 +98,7 @@ export const ColumnControlPanel = ({ columnCount, onColumnCountChange, onAutoBal
|
|
|
95
98
|
disabled={isResizing}
|
|
96
99
|
className={`flex items-center gap-1 rounded px-2 py-1 text-xs transition-colors ${!isResizing ? "border border-slate-300 text-slate-600 hover:border-green-300 hover:bg-green-50 hover:text-green-600" : "cursor-not-allowed border border-slate-200 bg-slate-50 text-slate-300"}`}
|
|
97
100
|
title="パネルを全カラムに均等分散">
|
|
98
|
-
<
|
|
101
|
+
<Grid3x3 className="h-3 w-3" />
|
|
99
102
|
<span>バランス</span>
|
|
100
103
|
</button>
|
|
101
104
|
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
* このコンポーネントは、ドラッグ&ドロップレイアウトにおいて、
|
|
8
8
|
* 特定の位置にカラムを挿入・削除するためのUIコントロールを提供します。
|
|
9
9
|
*/
|
|
10
|
-
import
|
|
10
|
+
import Plus from "lucide-react/dist/esm/icons/plus.js"
|
|
11
|
+
import X from "lucide-react/dist/esm/icons/x.js"
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Props for the ColumnInsertPanel component。
|