react-resizable-panels 4.15.2 → 4.15.3
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.
|
@@ -55,11 +55,11 @@ declare type BaseSeparatorAttributes = Omit<HTMLAttributes<HTMLDivElement>, "rol
|
|
|
55
55
|
*
|
|
56
56
|
* ⚠️ Cell elements must be direct DOM children of their parent Grid elements.
|
|
57
57
|
*/
|
|
58
|
-
export declare
|
|
58
|
+
export declare const Cell: typeof CellComponent & {
|
|
59
|
+
displayName: string;
|
|
60
|
+
};
|
|
59
61
|
|
|
60
|
-
|
|
61
|
-
var displayName: string;
|
|
62
|
-
}
|
|
62
|
+
declare function CellComponent({ children, className, column, columnSpan, elementRef: elementRefProp, id: idProp, row, rowSpan, style, ...rest }: CellProps): JSX.Element;
|
|
63
63
|
|
|
64
64
|
export declare type CellProps = HTMLAttributes<HTMLDivElement> & {
|
|
65
65
|
/**
|
|
@@ -76,6 +76,8 @@ export declare type CellProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
76
76
|
column: number;
|
|
77
77
|
/**
|
|
78
78
|
* Number of columns this cell spans; defaults to 1.
|
|
79
|
+
*
|
|
80
|
+
* @default 1
|
|
79
81
|
*/
|
|
80
82
|
columnSpan?: number | undefined;
|
|
81
83
|
/**
|
|
@@ -95,6 +97,8 @@ export declare type CellProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
95
97
|
row: number;
|
|
96
98
|
/**
|
|
97
99
|
* Number of rows this cell spans; defaults to 1.
|
|
100
|
+
*
|
|
101
|
+
* @default 1
|
|
98
102
|
*/
|
|
99
103
|
rowSpan?: number | undefined;
|
|
100
104
|
/**
|
|
@@ -124,11 +128,9 @@ export declare type CellProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
124
128
|
*
|
|
125
129
|
* ℹ️ [Test id](https://testing-library.com/docs/queries/bytestid/) can be used to narrow selection when unit testing.
|
|
126
130
|
*/
|
|
127
|
-
export declare
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
var displayName: string;
|
|
131
|
-
}
|
|
131
|
+
export declare const Grid: typeof GridComponent & {
|
|
132
|
+
displayName: string;
|
|
133
|
+
};
|
|
132
134
|
|
|
133
135
|
/**
|
|
134
136
|
* A Grid has two independently resizable axes:
|
|
@@ -137,6 +139,8 @@ export declare namespace Grid {
|
|
|
137
139
|
*/
|
|
138
140
|
export declare type GridAxis = "column" | "row";
|
|
139
141
|
|
|
142
|
+
declare function GridComponent({ children, className, columns, defaultLayout, disableCursor, disabled, elementRef: elementRefProp, gridRef, id: idProp, onLayoutChange: onLayoutChangeUnstable, onLayoutChanged: onLayoutChangedUnstable, resizeTargetMinimumSize, rows, style, ...rest }: GridProps): JSX.Element;
|
|
143
|
+
|
|
140
144
|
/**
|
|
141
145
|
* Imperative Grid API.
|
|
142
146
|
*
|
|
@@ -257,11 +261,11 @@ export declare type GridLayout = {
|
|
|
257
261
|
*
|
|
258
262
|
* ℹ️ Gridlines rendered by another component (rather than directly within the Grid) aren't detected until they mount, so server-rendered layouts may shift slightly during hydration.
|
|
259
263
|
*/
|
|
260
|
-
export declare
|
|
264
|
+
export declare const Gridline: typeof GridlineComponent & {
|
|
265
|
+
displayName: string;
|
|
266
|
+
};
|
|
261
267
|
|
|
262
|
-
|
|
263
|
-
var displayName: string;
|
|
264
|
-
}
|
|
268
|
+
declare function GridlineComponent(props: GridlineProps): JSX.Element;
|
|
265
269
|
|
|
266
270
|
export declare type GridlineProps = BaseGridlineProps & ({
|
|
267
271
|
/**
|
|
@@ -379,6 +383,8 @@ export declare type GridProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
379
383
|
* This threshold ensures targets are large enough to avoid mis-clicks.
|
|
380
384
|
*
|
|
381
385
|
* ℹ️ Refer to the `Group` prop of the same name for more information.
|
|
386
|
+
*
|
|
387
|
+
* @default { coarse: 20, fine: 10 }
|
|
382
388
|
*/
|
|
383
389
|
resizeTargetMinimumSize?: {
|
|
384
390
|
coarse: number;
|
|
@@ -480,11 +486,11 @@ export declare type GridTrackProps = PanelConstraintProps & {
|
|
|
480
486
|
*
|
|
481
487
|
* ℹ️ [Test id](https://testing-library.com/docs/queries/bytestid/) can be used to narrow selection when unit testing.
|
|
482
488
|
*/
|
|
483
|
-
export declare
|
|
489
|
+
export declare const Group: typeof GroupComponent & {
|
|
490
|
+
displayName: string;
|
|
491
|
+
};
|
|
484
492
|
|
|
485
|
-
|
|
486
|
-
var displayName: string;
|
|
487
|
-
}
|
|
493
|
+
declare function GroupComponent({ children, className, defaultLayout, disableCursor, disabled, elementRef: elementRefProp, groupRef, id: idProp, onLayoutChange: onLayoutChangeUnstable, onLayoutChanged: onLayoutChangedUnstable, orientation, resizePreviewMode, resizeTargetMinimumSize, style, ...rest }: GroupProps): JSX.Element;
|
|
488
494
|
|
|
489
495
|
/**
|
|
490
496
|
* Imperative Group API.
|
|
@@ -585,6 +591,8 @@ export declare type GroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
585
591
|
* Defaults to `"panel"` (immediate resizing); `"separator"` defers resizing until release.
|
|
586
592
|
*
|
|
587
593
|
* Customize previews using the `SeparatorOverlay` component.
|
|
594
|
+
*
|
|
595
|
+
* @default "panel"
|
|
588
596
|
*/
|
|
589
597
|
resizePreviewMode?: ResizePreviewMode | undefined;
|
|
590
598
|
/**
|
|
@@ -597,6 +605,8 @@ export declare type GroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
597
605
|
*
|
|
598
606
|
* ℹ️ [Apple interface guidelines](https://developer.apple.com/design/human-interface-guidelines/accessibility) suggest `20pt` (`27px`) on desktops and `28pt` (`37px`) for touch devices.
|
|
599
607
|
* In practice this seems to be much larger than many of their own applications use though.
|
|
608
|
+
*
|
|
609
|
+
* @default { coarse: 20, fine: 10 }
|
|
600
610
|
*/
|
|
601
611
|
resizeTargetMinimumSize?: {
|
|
602
612
|
coarse: number;
|
|
@@ -604,6 +614,8 @@ export declare type GroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
604
614
|
};
|
|
605
615
|
/**
|
|
606
616
|
* Specifies the resizable orientation ("horizontal" or "vertical"); defaults to "horizontal"
|
|
617
|
+
*
|
|
618
|
+
* @default "horizontal"
|
|
607
619
|
*/
|
|
608
620
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
609
621
|
/**
|
|
@@ -696,11 +708,11 @@ export declare type Orientation = "horizontal" | "vertical";
|
|
|
696
708
|
*
|
|
697
709
|
* ⚠️ Panel elements must be direct DOM children of their parent Group elements.
|
|
698
710
|
*/
|
|
699
|
-
export declare
|
|
711
|
+
export declare const Panel: typeof PanelComponent & {
|
|
712
|
+
displayName: string;
|
|
713
|
+
};
|
|
700
714
|
|
|
701
|
-
|
|
702
|
-
var displayName: string;
|
|
703
|
-
}
|
|
715
|
+
declare function PanelComponent({ children, className, collapsedSize, collapsedThreshold, collapsible, defaultSize, disabled, elementRef: elementRefProp, groupResizeBehavior, id: idProp, maxSize, minSize, onResize: onResizeUnstable, panelRef, style, ...rest }: PanelProps): JSX.Element;
|
|
704
716
|
|
|
705
717
|
/**
|
|
706
718
|
* Size constraints may be specified in a variety of ways:
|
|
@@ -781,6 +793,8 @@ export declare type PanelProps = BasePanelAttributes & {
|
|
|
781
793
|
className?: string | undefined;
|
|
782
794
|
/**
|
|
783
795
|
* Panel size when collapsed; defaults to 0%.
|
|
796
|
+
*
|
|
797
|
+
* @default "0%"
|
|
784
798
|
*/
|
|
785
799
|
collapsedSize?: number | string | undefined;
|
|
786
800
|
/**
|
|
@@ -801,6 +815,8 @@ export declare type PanelProps = BasePanelAttributes & {
|
|
|
801
815
|
* This panel can be collapsed.
|
|
802
816
|
*
|
|
803
817
|
* ℹ️ A collapsible panel will collapse when its size is less than the specified `minSize`
|
|
818
|
+
*
|
|
819
|
+
* @default false
|
|
804
820
|
*/
|
|
805
821
|
collapsible?: boolean | undefined;
|
|
806
822
|
/**
|
|
@@ -833,6 +849,8 @@ export declare type PanelProps = BasePanelAttributes & {
|
|
|
833
849
|
* ℹ️ Panel min/max size constraints may impact this behavior.
|
|
834
850
|
*
|
|
835
851
|
* ⚠️ A Group must contain at least one Panel with `preserve-relative-size` resize behavior.
|
|
852
|
+
*
|
|
853
|
+
* @default "preserve-relative-size"
|
|
836
854
|
*/
|
|
837
855
|
groupResizeBehavior?: "preserve-relative-size" | "preserve-pixel-size" | undefined;
|
|
838
856
|
/**
|
|
@@ -851,6 +869,8 @@ export declare type PanelProps = BasePanelAttributes & {
|
|
|
851
869
|
* - Numbers are interpreted as pixels (e.g. `maxSize={200}` is 200 pixels)
|
|
852
870
|
* - Strings without explicit units are interpreted as percentage (e.g. `maxSize="50"` is 50 percent)
|
|
853
871
|
* - Use explicit units (e.g. "px", "%", "em", "rem", "vh", or "vw") to change interpretation
|
|
872
|
+
*
|
|
873
|
+
* @default "100%"
|
|
854
874
|
*/
|
|
855
875
|
maxSize?: number | string | undefined;
|
|
856
876
|
/**
|
|
@@ -860,6 +880,8 @@ export declare type PanelProps = BasePanelAttributes & {
|
|
|
860
880
|
* - Numbers are interpreted as pixels (e.g. `minSize={200}` is 200 pixels)
|
|
861
881
|
* - Strings without explicit units are interpreted as percentage (e.g. `minSize="50"` is 50 percent)
|
|
862
882
|
* - Use explicit units (e.g. "px", "%", "em", "rem", "vh", or "vw") to change interpretation
|
|
883
|
+
*
|
|
884
|
+
* @default "0%"
|
|
863
885
|
*/
|
|
864
886
|
minSize?: number | string | undefined;
|
|
865
887
|
/**
|
|
@@ -949,11 +971,11 @@ declare type ResizePreviewMode = "panel" | "separator";
|
|
|
949
971
|
*
|
|
950
972
|
* ℹ️ In addition to the attributes shown above, separator also renders all required [WAI-ARIA properties](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/separator_role#associated_wai-aria_roles_states_and_properties).
|
|
951
973
|
*/
|
|
952
|
-
export declare
|
|
974
|
+
export declare const Separator: typeof SeparatorComponent & {
|
|
975
|
+
displayName: string;
|
|
976
|
+
};
|
|
953
977
|
|
|
954
|
-
|
|
955
|
-
var displayName: string;
|
|
956
|
-
}
|
|
978
|
+
declare function SeparatorComponent({ children, className, disabled, disableDoubleClick, elementRef, id: idProp, preview, style, ...rest }: SeparatorProps): JSX.Element;
|
|
957
979
|
|
|
958
980
|
/**
|
|
959
981
|
* Customizes separator previews when resizePreviewMode is "separator".
|
|
@@ -964,11 +986,11 @@ export declare namespace Separator {
|
|
|
964
986
|
*
|
|
965
987
|
* Set `width` (horizontal groups) or `height` (vertical groups) using `style` or `className`.
|
|
966
988
|
*/
|
|
967
|
-
export declare
|
|
989
|
+
export declare const SeparatorOverlay: typeof SeparatorOverlayComponent & {
|
|
990
|
+
displayName: string;
|
|
991
|
+
};
|
|
968
992
|
|
|
969
|
-
|
|
970
|
-
var displayName: string;
|
|
971
|
-
}
|
|
993
|
+
declare function SeparatorOverlayComponent(props: SeparatorOverlayProps): null;
|
|
972
994
|
|
|
973
995
|
export declare type SeparatorOverlayProps = HTMLAttributes<HTMLDivElement>;
|
|
974
996
|
|