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/GridArea.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, PropsWithChildren } from 'react';
|
|
2
|
-
import './grid.css';
|
|
3
|
-
export declare type Alignment = 'start' | 'centered' | 'end';
|
|
4
|
-
export declare type AreaProps = {
|
|
5
|
-
id: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
vertical?: boolean;
|
|
8
|
-
stretch?: boolean;
|
|
9
|
-
end?: boolean;
|
|
10
|
-
align?: Alignment;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
/** Extra customizable parts only for the really picky */
|
|
13
|
-
style?: CSSProperties;
|
|
14
|
-
editorStyle?: CSSProperties;
|
|
15
|
-
iconColor?: string;
|
|
16
|
-
onAlignChange?: (alignment: Alignment) => void;
|
|
17
|
-
};
|
|
18
|
-
export default function GridArea({ id, className, vertical, stretch, end, disabled, align, onAlignChange, children, style, editorStyle, iconColor, }: PropsWithChildren<AreaProps>): JSX.Element;
|
package/dist/GridItem.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import './grid.css';
|
|
3
|
-
export declare type ItemProps = {
|
|
4
|
-
className?: string;
|
|
5
|
-
id: string;
|
|
6
|
-
index: number;
|
|
7
|
-
extendable?: boolean;
|
|
8
|
-
extended?: boolean;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
onExtend?: (extended: boolean) => void;
|
|
11
|
-
children?: ReactNode | ((context: {
|
|
12
|
-
id: string;
|
|
13
|
-
editing: boolean;
|
|
14
|
-
isDragging: boolean;
|
|
15
|
-
isHovered: boolean;
|
|
16
|
-
extended: boolean;
|
|
17
|
-
extendable: boolean;
|
|
18
|
-
disabled: boolean;
|
|
19
|
-
index: number;
|
|
20
|
-
}) => ReactNode);
|
|
21
|
-
/** Extra customizable parts only for the really picky */
|
|
22
|
-
style?: CSSProperties;
|
|
23
|
-
editorStyle?: CSSProperties;
|
|
24
|
-
iconColor?: string;
|
|
25
|
-
};
|
|
26
|
-
export default function GridItem({ className, children, id, index, extendable, extended, disabled, style, editorStyle, iconColor, ...props }: ItemProps): JSX.Element;
|
package/dist/GridSection.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import './grid.css';
|
|
3
|
-
export declare type GridSectionProps = {
|
|
4
|
-
className?: string;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
horizontal?: boolean;
|
|
7
|
-
stretch?: boolean;
|
|
8
|
-
fixedWidth?: number;
|
|
9
|
-
fixedHeight?: number;
|
|
10
|
-
/** Extra customizable parts only for the really picky */
|
|
11
|
-
style?: CSSProperties;
|
|
12
|
-
editorStyle?: CSSProperties;
|
|
13
|
-
};
|
|
14
|
-
declare const GridSection: React.FC<GridSectionProps>;
|
|
15
|
-
export default GridSection;
|
package/dist/GridWrapper.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { Alignment } from './GridArea';
|
|
3
|
-
import './grid.css';
|
|
4
|
-
export declare type GridWrapperProps = {
|
|
5
|
-
className?: string;
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
editing?: boolean;
|
|
8
|
-
vertical?: boolean;
|
|
9
|
-
stretch?: boolean;
|
|
10
|
-
/** Extra customizable parts only for the really picky */
|
|
11
|
-
style?: CSSProperties;
|
|
12
|
-
editorStyle?: CSSProperties;
|
|
13
|
-
onMove?: (id: string, destAreaId: string, destIndex: number, prevAreaId: string, prevIndex: number) => void;
|
|
14
|
-
onAlignChange?: (areaId: string, align: Alignment) => void;
|
|
15
|
-
onExtend?: (id: string, extended: boolean) => void;
|
|
16
|
-
};
|
|
17
|
-
declare const GridWrapper: React.FC<GridWrapperProps>;
|
|
18
|
-
export default GridWrapper;
|
package/dist/Icon/icons.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
horizontalExtend: any;
|
|
3
|
-
horizontalNormal: any;
|
|
4
|
-
verticalExtend: any;
|
|
5
|
-
verticalNormal: any;
|
|
6
|
-
moveArrows: any;
|
|
7
|
-
alignStart: any;
|
|
8
|
-
alignCenter: any;
|
|
9
|
-
alignEnd: any;
|
|
10
|
-
alignStartV: any;
|
|
11
|
-
alignCenterV: any;
|
|
12
|
-
alignEndV: any;
|
|
13
|
-
};
|
|
14
|
-
export default _default;
|
package/dist/Icon/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Icons from './icons';
|
|
3
|
-
export declare type Icons = keyof typeof Icons;
|
|
4
|
-
export declare type IconProps = {
|
|
5
|
-
className?: string;
|
|
6
|
-
name: string | Icons;
|
|
7
|
-
onClick?: () => void;
|
|
8
|
-
};
|
|
9
|
-
declare const Icon: React.FC<IconProps>;
|
|
10
|
-
export default Icon;
|
package/dist/context.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Alignment } from '.';
|
|
3
|
-
export declare const Context: import("react").Context<{
|
|
4
|
-
editing: boolean;
|
|
5
|
-
isDragging: boolean;
|
|
6
|
-
onAlignChange?: ((areaId: string, align: Alignment) => void) | undefined;
|
|
7
|
-
onExtend?: ((id: string, extended: boolean) => void) | undefined;
|
|
8
|
-
}>;
|
|
9
|
-
export declare const useAlignContext: () => {
|
|
10
|
-
editing: boolean;
|
|
11
|
-
isDragging: boolean;
|
|
12
|
-
onAlignChange?: ((areaId: string, align: Alignment) => void) | undefined;
|
|
13
|
-
onExtend?: ((id: string, extended: boolean) => void) | undefined;
|
|
14
|
-
};
|