@ztwoint/z-ui 0.1.59 → 0.1.61
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/dist/components/assets/icons/drag-handle.d.ts +2 -0
- package/dist/components/assets/icons/minus.d.ts +8 -0
- package/dist/components/column-reorder/column-item.d.ts +0 -0
- package/dist/components/column-reorder/column-reorder.d.ts +3 -0
- package/dist/components/column-reorder/column-reorder.hook.d.ts +4 -0
- package/dist/components/column-reorder/column-reorder.type.d.ts +12 -0
- package/dist/components/column-reorder/components/column-item/column-item.d.ts +4 -0
- package/dist/components/column-reorder/components/column-item/column-item.hook.d.ts +7 -0
- package/dist/components/column-reorder/components/column-item/column-item.type.d.ts +18 -0
- package/dist/components/column-reorder/components/column-item/column-item.util.d.ts +10 -0
- package/dist/components/column-reorder/components/column-item/index.d.ts +3 -0
- package/dist/components/column-reorder/components/index.d.ts +1 -0
- package/dist/components/column-reorder/index.d.ts +2 -0
- package/dist/components/select/z2-select.js +1 -1
- package/dist/components/table/components/cell/link-cell.d.ts +1 -0
- package/dist/components/table/components/cell/link-cell.js +5 -4
- package/dist/css/styles/tailwind.css +1 -1
- package/dist/routes/column-reorder.d.ts +3 -0
- package/dist/routes/index.d.ts +1 -0
- package/dist/types/components/assets/icons/drag-handle.d.ts +2 -0
- package/dist/types/components/assets/icons/minus.d.ts +8 -0
- package/dist/types/components/column-reorder/column-item.d.ts +0 -0
- package/dist/types/components/column-reorder/column-reorder.d.ts +3 -0
- package/dist/types/components/column-reorder/column-reorder.hook.d.ts +4 -0
- package/dist/types/components/column-reorder/column-reorder.type.d.ts +12 -0
- package/dist/types/components/column-reorder/components/column-item/column-item.d.ts +4 -0
- package/dist/types/components/column-reorder/components/column-item/column-item.hook.d.ts +7 -0
- package/dist/types/components/column-reorder/components/column-item/column-item.type.d.ts +18 -0
- package/dist/types/components/column-reorder/components/column-item/column-item.util.d.ts +10 -0
- package/dist/types/components/column-reorder/components/column-item/index.d.ts +3 -0
- package/dist/types/components/column-reorder/components/index.d.ts +1 -0
- package/dist/types/components/column-reorder/index.d.ts +2 -0
- package/dist/types/components/table/components/cell/link-cell.d.ts +1 -0
- package/dist/types/routes/column-reorder.d.ts +3 -0
- package/dist/types/routes/index.d.ts +1 -0
- package/package.json +5 -1
package/dist/routes/index.d.ts
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
type IconProps = SVGProps<SVGSVGElement> & {
|
|
3
|
+
secondaryfill?: string;
|
|
4
|
+
strokewidth?: number;
|
|
5
|
+
title?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function Minus({ title, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default Minus;
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ColumnType = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: [string, string];
|
|
5
|
+
icon: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export interface ColumnReOrderProps {
|
|
8
|
+
columns: ColumnType[];
|
|
9
|
+
onReorder?: (reorderedColumns: ColumnType[]) => void;
|
|
10
|
+
onRemove?: (columnId: string) => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ColumnType } from '../../column-reorder.type';
|
|
2
|
+
import { ColumnItemState } from './column-item.type';
|
|
3
|
+
export declare const idle: ColumnItemState;
|
|
4
|
+
export declare const useColumnItemDragAndDrop: (column: ColumnType, index: number) => {
|
|
5
|
+
ref: import("react").RefObject<HTMLDivElement | null>;
|
|
6
|
+
state: ColumnItemState;
|
|
7
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Edge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
2
|
+
import { ColumnType } from '../../column-reorder.type';
|
|
3
|
+
export type ColumnItemState = {
|
|
4
|
+
type: 'idle';
|
|
5
|
+
} | {
|
|
6
|
+
type: 'preview';
|
|
7
|
+
container: HTMLElement;
|
|
8
|
+
} | {
|
|
9
|
+
type: 'is-dragging';
|
|
10
|
+
} | {
|
|
11
|
+
type: 'is-dragging-over';
|
|
12
|
+
closestEdge: Edge | null;
|
|
13
|
+
};
|
|
14
|
+
export interface ColumnItemProps {
|
|
15
|
+
column: ColumnType;
|
|
16
|
+
index: number;
|
|
17
|
+
onRemove?: (columnId: string) => void;
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ColumnType } from '../../column-reorder.type';
|
|
2
|
+
export declare const getColumnData: (column: ColumnType, index: number) => {
|
|
3
|
+
columnId: string;
|
|
4
|
+
index: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const isColumnData: (data: Record<string | symbol, unknown>) => boolean;
|
|
7
|
+
export declare const parseColumnLabel: (column: ColumnType) => {
|
|
8
|
+
groupLabel: string;
|
|
9
|
+
fieldLabel: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './column-item';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ztwoint/z-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.61",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -80,6 +80,10 @@
|
|
|
80
80
|
"vitest": "^3.1.1"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
+
"@atlaskit/pragmatic-drag-and-drop": "^1.7.4",
|
|
84
|
+
"@atlaskit/pragmatic-drag-and-drop-flourish": "^2.0.4",
|
|
85
|
+
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
86
|
+
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.4",
|
|
83
87
|
"@fontsource-variable/inter": "^5.2.5",
|
|
84
88
|
"@heroicons/react": "^2.2.0",
|
|
85
89
|
"@radix-ui/react-checkbox": "^1.3.2",
|