react-align 2.0.5 → 2.1.0
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/index.d.ts +105 -6
- package/dist/react-align.mjs +1226 -0
- package/dist/react-align.umd.js +27 -0
- package/package.json +36 -49
- package/src/GridArea.tsx +56 -41
- package/src/GridItem.tsx +24 -24
- package/src/GridSection.tsx +9 -9
- package/src/GridWrapper.tsx +9 -8
- package/src/Icon/icons.ts +11 -11
- package/src/Icon/index.tsx +5 -5
- package/src/context.tsx +2 -2
- package/src/env.d.ts +2 -0
- package/src/{index.tsx → index.ts} +0 -1
- package/dist/GridArea.d.ts +0 -18
- package/dist/GridItem.d.ts +0 -26
- package/dist/GridSection.d.ts +0 -15
- package/dist/GridWrapper.d.ts +0 -18
- package/dist/Icon/icons.d.ts +0 -14
- package/dist/Icon/index.d.ts +0 -10
- package/dist/context.d.ts +0 -14
- package/dist/index.js +0 -8
- package/dist/react-align.cjs.development.js +0 -615
- package/dist/react-align.cjs.development.js.map +0 -1
- package/dist/react-align.cjs.production.min.js +0 -2
- package/dist/react-align.cjs.production.min.js.map +0 -1
- package/dist/react-align.esm.js +0 -604
- package/dist/react-align.esm.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,105 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export type
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { default as React_2 } from 'react';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
|
|
6
|
+
export declare type Alignment = "start" | "centered" | "end";
|
|
7
|
+
|
|
8
|
+
declare type AreaProps = {
|
|
9
|
+
id: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
vertical?: boolean;
|
|
12
|
+
stretch?: boolean;
|
|
13
|
+
end?: boolean;
|
|
14
|
+
align?: Alignment;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** Extra customizable parts only for the really picky */
|
|
17
|
+
style?: CSSProperties;
|
|
18
|
+
editorStyle?: CSSProperties;
|
|
19
|
+
iconColor?: string;
|
|
20
|
+
onAlignChange?: (alignment: Alignment) => void;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
declare const _default: {
|
|
24
|
+
horizontalExtend: any;
|
|
25
|
+
horizontalNormal: any;
|
|
26
|
+
verticalExtend: any;
|
|
27
|
+
verticalNormal: any;
|
|
28
|
+
moveArrows: any;
|
|
29
|
+
alignStart: any;
|
|
30
|
+
alignCenter: any;
|
|
31
|
+
alignEnd: any;
|
|
32
|
+
alignStartV: any;
|
|
33
|
+
alignCenterV: any;
|
|
34
|
+
alignEndV: any;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export declare function GridArea({ id, className, vertical, stretch, end, disabled, align, onAlignChange, children, style, editorStyle, iconColor, }: PropsWithChildren<AreaProps>): JSX.Element | null;
|
|
38
|
+
|
|
39
|
+
export declare function GridItem({ className, children, id, index, extendable, extended, disabled, style, editorStyle, iconColor, ...props }: ItemProps): JSX.Element;
|
|
40
|
+
|
|
41
|
+
export declare const GridSection: React_2.FC<GridSectionProps>;
|
|
42
|
+
|
|
43
|
+
declare type GridSectionProps = {
|
|
44
|
+
className?: string;
|
|
45
|
+
children?: ReactNode;
|
|
46
|
+
horizontal?: boolean;
|
|
47
|
+
stretch?: boolean;
|
|
48
|
+
fixedWidth?: number;
|
|
49
|
+
fixedHeight?: number;
|
|
50
|
+
/** Extra customizable parts only for the really picky */
|
|
51
|
+
style?: CSSProperties;
|
|
52
|
+
editorStyle?: CSSProperties;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export declare const GridWrapper: React_2.FC<GridWrapperProps>;
|
|
56
|
+
|
|
57
|
+
declare type GridWrapperProps = {
|
|
58
|
+
className?: string;
|
|
59
|
+
children?: ReactNode;
|
|
60
|
+
editing?: boolean;
|
|
61
|
+
vertical?: boolean;
|
|
62
|
+
stretch?: boolean;
|
|
63
|
+
/** Extra customizable parts only for the really picky */
|
|
64
|
+
style?: CSSProperties;
|
|
65
|
+
editorStyle?: CSSProperties;
|
|
66
|
+
onMove?: (id: string, destAreaId: string, destIndex: number, prevAreaId: string, prevIndex: number) => void;
|
|
67
|
+
onAlignChange?: (areaId: string, align: Alignment) => void;
|
|
68
|
+
onExtend?: (id: string, extended: boolean) => void;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export declare const Icon: React_2.FC<IconProps>;
|
|
72
|
+
|
|
73
|
+
declare type IconKeys = keyof typeof _default;
|
|
74
|
+
|
|
75
|
+
declare type IconProps = {
|
|
76
|
+
className?: string;
|
|
77
|
+
name: string | IconKeys;
|
|
78
|
+
onClick?: () => void;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
declare type ItemProps = {
|
|
82
|
+
className?: string;
|
|
83
|
+
id: string;
|
|
84
|
+
index: number;
|
|
85
|
+
extendable?: boolean;
|
|
86
|
+
extended?: boolean;
|
|
87
|
+
disabled?: boolean;
|
|
88
|
+
onExtend?: (extended: boolean) => void;
|
|
89
|
+
children?: ReactNode | ((context: {
|
|
90
|
+
id: string;
|
|
91
|
+
editing: boolean;
|
|
92
|
+
isDragging: boolean;
|
|
93
|
+
isHovered: boolean;
|
|
94
|
+
extended: boolean;
|
|
95
|
+
extendable: boolean;
|
|
96
|
+
disabled: boolean;
|
|
97
|
+
index: number;
|
|
98
|
+
}) => ReactNode);
|
|
99
|
+
/** Extra customizable parts only for the really picky */
|
|
100
|
+
style?: CSSProperties;
|
|
101
|
+
editorStyle?: CSSProperties;
|
|
102
|
+
iconColor?: string;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export { }
|