|
2 | 2 |
|
3 | 3 | import { debounce, useStylesheet, useSyncRef } from '@ui5/webcomponents-react-base';
|
4 | 4 | import { clsx } from 'clsx';
|
5 |
| -import type { CSSProperties, DependencyList, ReactElement } from 'react'; |
| 5 | +import type { CSSProperties } from 'react'; |
6 | 6 | import { forwardRef, useEffect, useRef, useState } from 'react';
|
7 | 7 | import { SplitterLayoutContext } from '../../internal/SplitterLayoutContext.js';
|
8 |
| -import type { CommonProps } from '../../types/index.js'; |
9 |
| -import type { SplitterElementPropTypes } from '../SplitterElement/index.js'; |
10 | 8 | import { classNames, styleData } from './SplitterLayout.module.css.js';
|
| 9 | +import type { SplitterLayoutPropTypes } from './types.js'; |
11 | 10 | import { useConcatSplitterElements } from './useConcatSplitterElements.js';
|
12 | 11 |
|
13 |
| -interface SplitterLayoutOptions { |
14 |
| - /** |
15 |
| - * Defines whether the `SplitterLayout` should be reset when its size changes depending on the orientation. |
16 |
| - */ |
17 |
| - resetOnSizeChange?: boolean; |
18 |
| - /** |
19 |
| - * Defines whether the `SplitterLayout` should be reset when its `children` change. |
20 |
| - */ |
21 |
| - resetOnChildrenChange?: boolean; |
22 |
| - /** |
23 |
| - * Defines a list of dependencies that trigger a reset of the `SplitterLayout` when they are changed. |
24 |
| - * |
25 |
| - * __Note:__ The order and size of arrays of dependencies must remain constant in React, it's therefore not possible to change size or order between renders. |
26 |
| - */ |
27 |
| - resetOnCustomDepsChange?: DependencyList; |
28 |
| -} |
29 |
| - |
30 |
| -export interface SplitterLayoutPropTypes extends CommonProps { |
31 |
| - /** |
32 |
| - * Controls if a vertical or horizontal `SplitterLayout` is rendered. |
33 |
| - */ |
34 |
| - vertical?: boolean; |
35 |
| - /** |
36 |
| - * The content areas (optional) to be split. The control will show n-1 splitter bars between n controls in this aggregation. |
37 |
| - */ |
38 |
| - children?: ReactElement<SplitterElementPropTypes> | ReactElement<SplitterElementPropTypes>[]; |
39 |
| - /** |
40 |
| - * Defines options to customize the behavior of the SplitterLayout. |
41 |
| - */ |
42 |
| - options?: SplitterLayoutOptions; |
43 |
| -} |
44 |
| - |
45 | 12 | /**
|
46 | 13 | * A layout that contains several content areas. The content that is added to the `SplitterLayout` should be wrapped
|
47 | 14 | * into 0-n `SplitterElement`s which define the size and size constraints of the content area.
|
@@ -137,4 +104,5 @@ const SplitterLayout = forwardRef<HTMLDivElement, SplitterLayoutPropTypes>((prop
|
137 | 104 |
|
138 | 105 | SplitterLayout.displayName = 'SplitterLayout';
|
139 | 106 |
|
| 107 | +export type { SplitterLayoutPropTypes }; |
140 | 108 | export { SplitterLayout };
|
0 commit comments