@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
|
@@ -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 { default as 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 { 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';
|
|
@@ -53,7 +53,7 @@ function w({
|
|
|
53
53
|
"data-size": s,
|
|
54
54
|
className: l(
|
|
55
55
|
// base layout
|
|
56
|
-
"h-7.5 flex items-center justify-
|
|
56
|
+
"h-7.5 flex items-center justify-between w-full self-stretch transition-all cursor-pointer",
|
|
57
57
|
"gap-[6px] p-2 rounded-md",
|
|
58
58
|
// size variants
|
|
59
59
|
"data-[size=sm]:gap-1 data-[size=sm]:p-[6px]",
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { jsxs as s, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { cn as e } from "../../../../lib/utils.js";
|
|
4
|
-
const
|
|
4
|
+
const x = ({
|
|
5
5
|
value: i,
|
|
6
6
|
href: m,
|
|
7
7
|
target: t = "_self",
|
|
8
8
|
leftIcon: n,
|
|
9
9
|
rightIcon: r,
|
|
10
|
-
className: o
|
|
10
|
+
className: o,
|
|
11
|
+
LinkComponent: c = "a"
|
|
11
12
|
}) => {
|
|
12
13
|
const l = "min-h-max min-w-max";
|
|
13
14
|
return /* @__PURE__ */ s(
|
|
14
|
-
|
|
15
|
+
c,
|
|
15
16
|
{
|
|
16
17
|
href: m,
|
|
17
18
|
target: t,
|
|
@@ -31,5 +32,5 @@ const p = ({
|
|
|
31
32
|
);
|
|
32
33
|
};
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
+
x as LinkCell
|
|
35
36
|
};
|