react-align 2.1.0 → 2.2.1
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/env.d.ts +2 -0
- package/dist/index.d.ts +42 -15
- package/dist/react-align.mjs +536 -526
- package/dist/react-align.umd.js +11 -10
- package/package.json +15 -20
- package/src/GridArea.tsx +41 -36
- package/src/GridItem.tsx +11 -33
- package/src/GridSection.tsx +2 -3
- package/src/GridWrapper.tsx +10 -17
- package/src/Icon/icons.ts +7 -7
- package/src/context.tsx +1 -0
- package/src/grid.css +18 -19
package/dist/env.d.ts
ADDED
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
+
import type { FunctionComponent } from 'react';
|
|
2
3
|
import { PropsWithChildren } from 'react';
|
|
3
4
|
import { default as React_2 } from 'react';
|
|
4
5
|
import { ReactNode } from 'react';
|
|
6
|
+
import type { SVGProps } from 'react';
|
|
5
7
|
|
|
6
8
|
export declare type Alignment = "start" | "centered" | "end";
|
|
7
9
|
|
|
@@ -10,35 +12,60 @@ declare type AreaProps = {
|
|
|
10
12
|
className?: string;
|
|
11
13
|
vertical?: boolean;
|
|
12
14
|
stretch?: boolean;
|
|
13
|
-
|
|
15
|
+
middle?: boolean;
|
|
16
|
+
bottom?: boolean;
|
|
14
17
|
align?: Alignment;
|
|
18
|
+
realignable?: boolean;
|
|
15
19
|
disabled?: boolean;
|
|
16
20
|
/** Extra customizable parts only for the really picky */
|
|
17
21
|
style?: CSSProperties;
|
|
18
22
|
editorStyle?: CSSProperties;
|
|
19
23
|
iconColor?: string;
|
|
20
24
|
onAlignChange?: (alignment: Alignment) => void;
|
|
25
|
+
onClick?: (id?: string) => void;
|
|
21
26
|
};
|
|
22
27
|
|
|
23
28
|
declare const _default: {
|
|
24
|
-
horizontalExtend:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
horizontalExtend: FunctionComponent<SVGProps<SVGSVGElement> & {
|
|
30
|
+
title?: string | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
horizontalNormal: FunctionComponent<SVGProps<SVGSVGElement> & {
|
|
33
|
+
title?: string | undefined;
|
|
34
|
+
}>;
|
|
35
|
+
verticalExtend: FunctionComponent<SVGProps<SVGSVGElement> & {
|
|
36
|
+
title?: string | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
verticalNormal: FunctionComponent<SVGProps<SVGSVGElement> & {
|
|
39
|
+
title?: string | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
moveArrows: FunctionComponent<SVGProps<SVGSVGElement> & {
|
|
42
|
+
title?: string | undefined;
|
|
43
|
+
}>;
|
|
44
|
+
alignStart: FunctionComponent<SVGProps<SVGSVGElement> & {
|
|
45
|
+
title?: string | undefined;
|
|
46
|
+
}>;
|
|
47
|
+
alignCenter: FunctionComponent<SVGProps<SVGSVGElement> & {
|
|
48
|
+
title?: string | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
alignEnd: FunctionComponent<SVGProps<SVGSVGElement> & {
|
|
51
|
+
title?: string | undefined;
|
|
52
|
+
}>;
|
|
53
|
+
alignStartV: FunctionComponent<SVGProps<SVGSVGElement> & {
|
|
54
|
+
title?: string | undefined;
|
|
55
|
+
}>;
|
|
56
|
+
alignCenterV: FunctionComponent<SVGProps<SVGSVGElement> & {
|
|
57
|
+
title?: string | undefined;
|
|
58
|
+
}>;
|
|
59
|
+
alignEndV: FunctionComponent<SVGProps<SVGSVGElement> & {
|
|
60
|
+
title?: string | undefined;
|
|
61
|
+
}>;
|
|
35
62
|
};
|
|
36
63
|
|
|
37
|
-
export declare function GridArea({ id, className, vertical, stretch,
|
|
64
|
+
export declare function GridArea({ id, className, vertical, stretch, middle, bottom, disabled, align, realignable, children, style, editorStyle, iconColor, onAlignChange, onClick, }: PropsWithChildren<AreaProps>): JSX.Element | null;
|
|
38
65
|
|
|
39
66
|
export declare function GridItem({ className, children, id, index, extendable, extended, disabled, style, editorStyle, iconColor, ...props }: ItemProps): JSX.Element;
|
|
40
67
|
|
|
41
|
-
export declare const GridSection:
|
|
68
|
+
export declare const GridSection: React.FC<GridSectionProps>;
|
|
42
69
|
|
|
43
70
|
declare type GridSectionProps = {
|
|
44
71
|
className?: string;
|
|
@@ -52,7 +79,7 @@ declare type GridSectionProps = {
|
|
|
52
79
|
editorStyle?: CSSProperties;
|
|
53
80
|
};
|
|
54
81
|
|
|
55
|
-
export declare const GridWrapper:
|
|
82
|
+
export declare const GridWrapper: React.FC<GridWrapperProps>;
|
|
56
83
|
|
|
57
84
|
declare type GridWrapperProps = {
|
|
58
85
|
className?: string;
|