react-magma-dom 4.7.0-next.42 → 4.7.0-next.44
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/components/InputBase/index.d.ts +5 -0
- package/dist/components/TreeView/TreeViewContext.d.ts +2 -1
- package/dist/components/TreeView/useTreeView.d.ts +6 -2
- package/dist/components/TreeView/utils.d.ts +4 -0
- package/dist/esm/index.js +105 -35
- package/dist/esm/index.js.map +1 -1
- package/dist/properties.json +93 -85
- package/dist/react-magma-dom.cjs.development.js +103 -32
- package/dist/react-magma-dom.cjs.development.js.map +1 -1
- package/dist/react-magma-dom.cjs.production.min.js +1 -1
- package/dist/react-magma-dom.cjs.production.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -178,6 +178,7 @@ export declare const InputWrapper: import("@emotion/styled").StyledComponent<{
|
|
|
178
178
|
theme?: import("@emotion/react").Theme;
|
|
179
179
|
as?: React.ElementType<any>;
|
|
180
180
|
} & InputWrapperStylesProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
181
|
+
export declare function getHelpIconButtonSize(props: any): any;
|
|
181
182
|
export declare const IconButtonContainer: import("@emotion/styled").StyledComponent<{
|
|
182
183
|
theme?: import("@emotion/react").Theme;
|
|
183
184
|
as?: React.ElementType<any>;
|
|
@@ -188,6 +189,10 @@ export declare const IconButtonContainer: import("@emotion/styled").StyledCompon
|
|
|
188
189
|
isClickable?: boolean;
|
|
189
190
|
hasChildren?: boolean;
|
|
190
191
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
192
|
+
export declare const isLeftOrHidden: ({ labelPosition, isLabelVisuallyHidden, }: {
|
|
193
|
+
labelPosition?: LabelPosition;
|
|
194
|
+
isLabelVisuallyHidden?: boolean;
|
|
195
|
+
}) => boolean;
|
|
191
196
|
export declare const HelpLinkContainer: import("@emotion/styled").StyledComponent<{
|
|
192
197
|
theme?: import("@emotion/react").Theme;
|
|
193
198
|
as?: React.ElementType<any>;
|
|
@@ -19,7 +19,7 @@ export interface TreeViewContextInterface {
|
|
|
19
19
|
hasIcons: boolean;
|
|
20
20
|
initialExpandedItems: Array<string>;
|
|
21
21
|
initialExpandedItemsNeedUpdate: boolean;
|
|
22
|
-
onExpandedChange?: (event: React.SyntheticEvent) => void;
|
|
22
|
+
onExpandedChange?: (event: React.SyntheticEvent, expandedItems: Array<string>) => void;
|
|
23
23
|
onSelectedItemChange?: (selectedItems: Array<TreeItemSelectedInterface>) => void;
|
|
24
24
|
registerTreeItem: (itemRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, itemRef: React.MutableRefObject<Element>) => void;
|
|
25
25
|
selectable: TreeViewSelectable;
|
|
@@ -31,5 +31,6 @@ export interface TreeViewContextInterface {
|
|
|
31
31
|
checkChildren: boolean;
|
|
32
32
|
items: TreeViewItemInterface[];
|
|
33
33
|
selectItem: (data: Pick<TreeViewItemInterface, 'itemId' | 'checkedStatus'>) => void;
|
|
34
|
+
handleExpandedChange: (event: React.SyntheticEvent, expandedItemId: string) => void;
|
|
34
35
|
}
|
|
35
36
|
export declare const TreeViewContext: React.Context<TreeViewContextInterface>;
|
|
@@ -43,8 +43,10 @@ export interface UseTreeViewProps {
|
|
|
43
43
|
testId?: string;
|
|
44
44
|
/**
|
|
45
45
|
* Action that fires when an item is expanded or collapsed
|
|
46
|
+
* Return an array of itemIds of items that are expanded
|
|
47
|
+
* Example: ['item0', 'item1', 'item3']
|
|
46
48
|
*/
|
|
47
|
-
onExpandedChange?: (event: React.SyntheticEvent) => void;
|
|
49
|
+
onExpandedChange?: (event: React.SyntheticEvent, expandedItems: Array<string>) => void;
|
|
48
50
|
/**
|
|
49
51
|
* Action that fires when an item is selected
|
|
50
52
|
* Return an array of objects.
|
|
@@ -84,7 +86,7 @@ export declare function useTreeView(props: UseTreeViewProps): {
|
|
|
84
86
|
hasIcons: any;
|
|
85
87
|
itemToFocus: any;
|
|
86
88
|
onSelectedItemChange: (selectedItems: TreeItemSelectedInterface[]) => void;
|
|
87
|
-
onExpandedChange: (event: React.SyntheticEvent<Element, Event
|
|
89
|
+
onExpandedChange: (event: React.SyntheticEvent<Element, Event>, expandedItems: string[]) => void;
|
|
88
90
|
selectable: TreeViewSelectable;
|
|
89
91
|
selectedItems: any;
|
|
90
92
|
initialExpandedItems: any[];
|
|
@@ -96,6 +98,8 @@ export declare function useTreeView(props: UseTreeViewProps): {
|
|
|
96
98
|
checkParents: boolean;
|
|
97
99
|
items: any;
|
|
98
100
|
selectItem: ({ itemId, checkedStatus, }: Pick<TreeViewItemInterface, 'itemId'> & Partial<Pick<TreeViewItemInterface, 'checkedStatus'>>) => void;
|
|
101
|
+
handleExpandedChange: (event: React.SyntheticEvent, itemId: string) => void;
|
|
102
|
+
expandedSet: Set<string>;
|
|
99
103
|
};
|
|
100
104
|
};
|
|
101
105
|
export declare type UseTreeViewReturn = ReturnType<typeof useTreeView>;
|
|
@@ -31,6 +31,10 @@ export declare function filterNullEntries(obj: any): {
|
|
|
31
31
|
} | {
|
|
32
32
|
current?: undefined;
|
|
33
33
|
};
|
|
34
|
+
export declare const getChildrenIds: ({ items, itemId, }: {
|
|
35
|
+
items: TreeViewItemInterface[];
|
|
36
|
+
itemId: TreeViewItemInterface['itemId'];
|
|
37
|
+
}) => any;
|
|
34
38
|
export declare const getInitialItems: ({ children, preselectedItems: rawPreselectedItems, checkParents, checkChildren, selectable, isDisabled: isTreeViewDisabled, }: Pick<UseTreeViewProps, 'children' | 'preselectedItems' | 'checkParents' | 'checkChildren' | 'selectable' | 'isDisabled'>) => any;
|
|
35
39
|
export declare const selectSingle: ({ items, itemId, checkedStatus, }: {
|
|
36
40
|
items: TreeViewItemInterface[];
|