@lumx/core 4.9.0-next.10 → 4.9.0-next.11
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.
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SetupOptions } from '../../../testing';
|
|
2
|
+
/**
|
|
3
|
+
* Mounts the component and returns common DOM elements / data needed in multiple tests further down.
|
|
4
|
+
*/
|
|
5
|
+
export declare const setup: (propsOverride: any | undefined, { render, ...options }: SetupOptions<any>) => {
|
|
6
|
+
element: HTMLElement;
|
|
7
|
+
header: HTMLElement | null;
|
|
8
|
+
props: any;
|
|
9
|
+
wrapper: Partial<import("../../../testing").SetupResult>;
|
|
10
|
+
};
|
|
11
|
+
declare const _default: (renderOptions: SetupOptions<any>) => void;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { HasClassName, LumxClassName, HasCloseMode, HasTheme, CommonRef, GenericProps, JSXElement } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Defines the props of the component.
|
|
4
|
+
*/
|
|
5
|
+
export interface ExpansionPanelProps extends HasClassName, HasCloseMode, HasTheme {
|
|
6
|
+
/** Whether the expansion panel has a background. */
|
|
7
|
+
hasBackground?: boolean;
|
|
8
|
+
/** Whether the header has a divider. */
|
|
9
|
+
hasHeaderDivider?: boolean;
|
|
10
|
+
/** Whether the component is open or not. */
|
|
11
|
+
isOpen?: boolean;
|
|
12
|
+
/** Label text (overwritten if a `<header>` is provided in the children). */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** On open callback. */
|
|
15
|
+
handleOpen?: (event: any) => void;
|
|
16
|
+
/** On close callback. */
|
|
17
|
+
handleClose?: (event: any) => void;
|
|
18
|
+
/** Props to pass to the toggle button (minus those already set by the ExpansionPanel props). */
|
|
19
|
+
toggleButtonProps: any;
|
|
20
|
+
/** On toggle open or close callback. */
|
|
21
|
+
handleToggleOpen?(shouldOpen: boolean, event: any): void;
|
|
22
|
+
/** Children */
|
|
23
|
+
children?: JSXElement;
|
|
24
|
+
/** Ref forwarded to the root `<section>` element. */
|
|
25
|
+
ref?: CommonRef;
|
|
26
|
+
/** Ref forwarded to the collapsible wrapper `<div>`. */
|
|
27
|
+
wrapperRef?: CommonRef;
|
|
28
|
+
/** Props spread onto the header content `<div>` (e.g. `aria-*`, `data-*`). */
|
|
29
|
+
headerProps: GenericProps;
|
|
30
|
+
/** Content rendered inside the header content area. */
|
|
31
|
+
headerContent?: JSXElement;
|
|
32
|
+
/** Optional drag handle element rendered at the start of the header. */
|
|
33
|
+
dragHandle?: JSXElement;
|
|
34
|
+
/** Content rendered inside the collapsible content area. */
|
|
35
|
+
content?: JSXElement;
|
|
36
|
+
/** Optional footer element rendered below the content. */
|
|
37
|
+
footer?: JSXElement;
|
|
38
|
+
/** IconButton component injected by the framework wrapper (React or Vue). */
|
|
39
|
+
IconButton: any;
|
|
40
|
+
/** Whether the children should remain mounted (visible in the DOM) while the panel is closed. */
|
|
41
|
+
isChildrenVisible?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export type ExpansionPanelPropsToOverride = 'handleOpen' | 'handleClose' | 'toggleButtonProps' | 'handleToggleOpen' | 'wrapperRef' | 'headerProps' | 'headerContent' | 'dragHandle' | 'content' | 'IconButton' | 'isChildrenVisible' | 'footer';
|
|
44
|
+
/**
|
|
45
|
+
* Component display name.
|
|
46
|
+
*/
|
|
47
|
+
export declare const COMPONENT_NAME = "ExpansionPanel";
|
|
48
|
+
/**
|
|
49
|
+
* Component default class name and class prefix.
|
|
50
|
+
*/
|
|
51
|
+
export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
|
|
52
|
+
export declare const block: {
|
|
53
|
+
(additionalClasses: import("classnames/types").ClassValue[]): string;
|
|
54
|
+
(modifiers?: import("../../utils/classNames/bem/modifier").Modifier, additionalClasses?: import("classnames/types").ClassValue[]): string;
|
|
55
|
+
}, element: {
|
|
56
|
+
(elem: string, additionalClasses: import("classnames/types").ClassValue[]): string;
|
|
57
|
+
(elem: string, modifiers?: import("../../utils/classNames/bem/modifier").Modifier, additionalClasses?: import("classnames/types").ClassValue[]): string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Component default props.
|
|
61
|
+
*/
|
|
62
|
+
export declare const DEFAULT_PROPS: Partial<ExpansionPanelProps>;
|
|
63
|
+
/**
|
|
64
|
+
* ExpansionPanel component.
|
|
65
|
+
*
|
|
66
|
+
* @param props Component props.
|
|
67
|
+
* @param ref Component ref.
|
|
68
|
+
* @return React element.
|
|
69
|
+
*/
|
|
70
|
+
export declare const ExpansionPanel: (props: ExpansionPanelProps) => import("react").JSX.Element;
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@floating-ui/dom": "^1.7.5",
|
|
10
|
-
"@lumx/icons": "^4.9.0-next.
|
|
10
|
+
"@lumx/icons": "^4.9.0-next.11",
|
|
11
11
|
"classnames": "^2.3.2",
|
|
12
12
|
"focus-visible": "^5.0.2",
|
|
13
13
|
"lodash": "4.17.23",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"update-version-changelog": "yarn version-changelog ../../CHANGELOG.md"
|
|
70
70
|
},
|
|
71
71
|
"sideEffects": false,
|
|
72
|
-
"version": "4.9.0-next.
|
|
72
|
+
"version": "4.9.0-next.11",
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
75
75
|
"@testing-library/dom": "^10.4.1",
|