react-resizable-panels 4.0.0-alpha.3 → 4.0.0-alpha.4
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { Dispatch } from 'react';
|
|
3
|
+
import { HTMLAttributes } from 'react';
|
|
3
4
|
import { JSX } from 'react/jsx-runtime';
|
|
4
|
-
import { PropsWithChildren } from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
import { Ref } from 'react';
|
|
7
7
|
import { RefObject } from 'react';
|
|
@@ -14,12 +14,12 @@ import { SetStateAction } from 'react';
|
|
|
14
14
|
* Group elements always include the following data attributes:
|
|
15
15
|
*
|
|
16
16
|
* ```html
|
|
17
|
-
* <div data-group data-testid="
|
|
17
|
+
* <div data-group data-testid="group-id-prop" id="group-id-prop">
|
|
18
18
|
* ```
|
|
19
19
|
*
|
|
20
20
|
* ℹ️ [Test id](https://testing-library.com/docs/queries/bytestid/) can be used to narrow selection when unit testing.
|
|
21
21
|
*/
|
|
22
|
-
export declare function Group({ children, className, defaultLayout, disableCursor, disabled, elementRef, groupRef, id: idProp, onLayoutChange: onLayoutChangeUnstable, orientation, style }: GroupProps): JSX.Element;
|
|
22
|
+
export declare function Group({ children, className, defaultLayout, disableCursor, disabled, elementRef, groupRef, id: idProp, onLayoutChange: onLayoutChangeUnstable, orientation, style, ...rest }: GroupProps): JSX.Element;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Imperative Group API.
|
|
@@ -46,7 +46,7 @@ declare interface GroupImperativeHandle {
|
|
|
46
46
|
}) => Layout;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
export declare type GroupProps = {
|
|
49
|
+
export declare type GroupProps = HTMLAttributes<HTMLDivElement> & {
|
|
50
50
|
/**
|
|
51
51
|
* Panel and Separator components that comprise this group.
|
|
52
52
|
*/
|
|
@@ -138,12 +138,12 @@ export declare type Orientation = "horizontal" | "vertical";
|
|
|
138
138
|
* Panel elements always include the following data attributes:
|
|
139
139
|
*
|
|
140
140
|
* ```html
|
|
141
|
-
* <div data-panel data-testid="
|
|
141
|
+
* <div data-panel data-testid="panel-id-prop" id="panel-id-prop">
|
|
142
142
|
* ```
|
|
143
143
|
*
|
|
144
144
|
* ℹ️ [Test id](https://testing-library.com/docs/queries/bytestid/) can be used to narrow selection when unit testing.
|
|
145
145
|
*/
|
|
146
|
-
export declare function Panel({ children, className, collapsedSize, collapsible, defaultSize, elementRef, id: idProp, maxSize, minSize, onResize: onResizeUnstable, panelRef, style }: PanelProps): JSX.Element;
|
|
146
|
+
export declare function Panel({ children, className, collapsedSize, collapsible, defaultSize, elementRef, id: idProp, maxSize, minSize, onResize: onResizeUnstable, panelRef, style, ...rest }: PanelProps): JSX.Element;
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
149
|
* Imperative Panel API
|
|
@@ -184,7 +184,7 @@ declare interface PanelImperativeHandle {
|
|
|
184
184
|
resize: (size: number | string) => void;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
export declare type PanelProps =
|
|
187
|
+
export declare type PanelProps = HTMLAttributes<HTMLDivElement> & {
|
|
188
188
|
/**
|
|
189
189
|
* CSS class name.
|
|
190
190
|
*
|
|
@@ -248,7 +248,7 @@ export declare type PanelProps = PropsWithChildren<{
|
|
|
248
248
|
* ⚠️ Style is applied to nested `HTMLDivElement` to avoid styles that interfere with Flex layout.
|
|
249
249
|
*/
|
|
250
250
|
style?: CSSProperties | undefined;
|
|
251
|
-
}
|
|
251
|
+
};
|
|
252
252
|
|
|
253
253
|
export declare type PanelSize = {
|
|
254
254
|
asPercentage: number;
|
|
@@ -263,14 +263,16 @@ export declare type PanelSize = {
|
|
|
263
263
|
* Separator elements always include the following data attributes and role:
|
|
264
264
|
*
|
|
265
265
|
* ```html
|
|
266
|
-
* <div data-separator data-testid="
|
|
266
|
+
* <div data-separator data-testid="separator-id-prop" id="separator-id-prop" role="separator">
|
|
267
267
|
* ```
|
|
268
268
|
*
|
|
269
269
|
* ℹ️ [Test id](https://testing-library.com/docs/queries/bytestid/) can be used to narrow selection when unit testing.
|
|
270
|
+
*
|
|
271
|
+
* ℹ️ 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).
|
|
270
272
|
*/
|
|
271
|
-
export declare function Separator({ children, className, elementRef, id: idProp, style }: SeparatorProps): JSX.Element;
|
|
273
|
+
export declare function Separator({ children, className, elementRef, id: idProp, style, ...rest }: SeparatorProps): JSX.Element;
|
|
272
274
|
|
|
273
|
-
export declare type SeparatorProps =
|
|
275
|
+
export declare type SeparatorProps = HTMLAttributes<HTMLDivElement> & {
|
|
274
276
|
/**
|
|
275
277
|
* CSS class name.
|
|
276
278
|
*
|
|
@@ -298,7 +300,7 @@ export declare type SeparatorProps = PropsWithChildren<{
|
|
|
298
300
|
* ⚠️ The following properties cannot be overridden: `flex-grow`, `flex-shrink`
|
|
299
301
|
*/
|
|
300
302
|
style?: CSSProperties | undefined;
|
|
301
|
-
}
|
|
303
|
+
};
|
|
302
304
|
|
|
303
305
|
export declare type SizeUnit = "px" | "%" | "em" | "rem" | "vh" | "vw";
|
|
304
306
|
|