react-magma-dom 4.9.0-next.3 → 4.9.0-next.30
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/BlockQuote/BlockQuoteItem.d.ts +1 -1
- package/dist/components/Button/index.d.ts +2 -1
- package/dist/components/Checkbox/index.d.ts +2 -1
- package/dist/components/Combobox/Combobox.d.ts +2 -1
- package/dist/components/Combobox/ComboboxInput.d.ts +3 -3
- package/dist/components/Combobox/MultiCombobox.d.ts +2 -1
- package/dist/components/Combobox/index.d.ts +2 -2
- package/dist/components/Datagrid/components.d.ts +2 -2
- package/dist/components/DefinitionList/DefinitionList.d.ts +8 -0
- package/dist/components/DefinitionList/DefinitionListItem.d.ts +23 -0
- package/dist/components/DefinitionList/index.d.ts +2 -0
- package/dist/components/Drawer/index.d.ts +1 -1
- package/dist/components/Dropdown/DropdownButton.d.ts +1 -1
- package/dist/components/Dropdown/DropdownExpandableMenuButton.d.ts +1 -1
- package/dist/components/Dropdown/DropdownExpandableMenuListItem.d.ts +1 -2
- package/dist/components/Dropdown/DropdownExpandableMenuPanel.d.ts +2 -3
- package/dist/components/Grid/index.d.ts +1 -1
- package/dist/components/Heading/index.d.ts +1 -1
- package/dist/components/Hyperlink/index.d.ts +2 -2
- package/dist/components/IconButton/index.d.ts +1 -1
- package/dist/components/IndeterminateCheckbox/index.d.ts +1 -1
- package/dist/components/InputBase/index.d.ts +5 -3
- package/dist/components/Label/index.d.ts +2 -1
- package/dist/components/List/ListItem.d.ts +3 -1
- package/dist/components/NavTabs/NavTab.d.ts +3 -2
- package/dist/components/NavTabs/NavTabs.d.ts +3 -4
- package/dist/components/Paragraph/index.d.ts +2 -1
- package/dist/components/PasswordInput/index.d.ts +1 -1
- package/dist/components/Popover/Popover.d.ts +102 -0
- package/dist/components/Popover/PopoverContent.d.ts +12 -0
- package/dist/components/Popover/PopoverSection.d.ts +13 -0
- package/dist/components/Popover/PopoverTrigger.d.ts +37 -0
- package/dist/components/Popover/index.d.ts +4 -0
- package/dist/components/Select/ItemsList.d.ts +2 -2
- package/dist/components/Select/MultiSelect.d.ts +2 -1
- package/dist/components/Select/Select.d.ts +2 -1
- package/dist/components/Select/SelectContainer.d.ts +2 -2
- package/dist/components/Select/SelectTriggerButton.d.ts +2 -2
- package/dist/components/Select/components.d.ts +7 -7
- package/dist/components/Select/index.d.ts +2 -2
- package/dist/components/SkipLink/index.d.ts +7 -2
- package/dist/components/Stepper/Step.d.ts +1 -1
- package/dist/components/StyledButton/index.d.ts +7 -0
- package/dist/components/Table/TableCell.d.ts +2 -1
- package/dist/components/Table/TableRow.d.ts +1 -1
- package/dist/components/Tabs/Tab.d.ts +2 -2
- package/dist/components/Tabs/Tabs.d.ts +2 -2
- package/dist/components/Tag/index.d.ts +1 -1
- package/dist/components/Textarea/index.d.ts +1 -1
- package/dist/components/Toggle/index.d.ts +2 -1
- package/dist/components/ToggleButton/ToggleButton.d.ts +2 -2
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
- package/dist/components/TreeView/TreeItem.d.ts +2 -3
- package/dist/components/TreeView/TreeViewContext.d.ts +1 -2
- package/dist/components/TreeView/useTreeItem.d.ts +2 -1
- package/dist/components/TreeView/useTreeView.d.ts +10 -3
- package/dist/components/TreeView/utils.d.ts +8 -8
- package/dist/components/Typography/index.d.ts +5 -4
- package/dist/esm/index.js +10969 -19528
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/properties.json +945 -272
- package/dist/react-magma-dom.cjs.development.js +3748 -3144
- 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/dist/theme/styled.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +30 -31
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SelectComponents } from '../Select/components';
|
|
3
2
|
import { ReferenceType } from '@floating-ui/react-dom';
|
|
3
|
+
import { SelectComponents } from '../Select/components';
|
|
4
4
|
interface SelectTriggerButtonInterface<T> {
|
|
5
5
|
ariaDescribedBy?: string;
|
|
6
6
|
children: React.ReactNode | React.ReactNode[];
|
|
@@ -13,5 +13,5 @@ interface SelectTriggerButtonInterface<T> {
|
|
|
13
13
|
toggleButtonProps: any;
|
|
14
14
|
tabindex?: number;
|
|
15
15
|
}
|
|
16
|
-
export declare function SelectTriggerButton<T>(props: SelectTriggerButtonInterface<T>): JSX.Element;
|
|
16
|
+
export declare function SelectTriggerButton<T>(props: SelectTriggerButtonInterface<T>): React.JSX.Element;
|
|
17
17
|
export {};
|
|
@@ -19,16 +19,16 @@ export declare type SelectComponents<T> = {
|
|
|
19
19
|
LoadingIndicator?: React.FunctionComponent<SpinnerProps>;
|
|
20
20
|
Item?: React.FunctionComponent<ItemRenderOptions<T>>;
|
|
21
21
|
};
|
|
22
|
-
export declare const DefaultClearIndicator: (props: any) => JSX.Element;
|
|
23
|
-
export declare const DefaultDropdownIndicator: (props: any) => JSX.Element;
|
|
24
|
-
export declare const DefaultLoadingIndicator: (props: any) => JSX.Element;
|
|
25
|
-
export declare function DefaultItem<T>({ itemRef, itemString, isInverse, isDisabled, ...props }: ItemRenderOptions<T>): JSX.Element;
|
|
22
|
+
export declare const DefaultClearIndicator: (props: any) => React.JSX.Element;
|
|
23
|
+
export declare const DefaultDropdownIndicator: (props: any) => React.JSX.Element;
|
|
24
|
+
export declare const DefaultLoadingIndicator: (props: any) => React.JSX.Element;
|
|
25
|
+
export declare function DefaultItem<T>({ itemRef, itemString, isInverse, isDisabled, ...props }: ItemRenderOptions<T>): React.JSX.Element;
|
|
26
26
|
export declare function defaultComponents<T>(props: SelectComponents<T>): {
|
|
27
27
|
ClearIndicator: React.FunctionComponent<({} & import("../IconButton").IconTextButtonProps) | ({
|
|
28
28
|
children?: never;
|
|
29
29
|
iconPosition?: never;
|
|
30
|
-
} & import("../IconButton").IconOnlyButtonProps)> | ((props: any) => JSX.Element);
|
|
31
|
-
DropdownIndicator: React.FunctionComponent<Partial<IconProps>> | ((props: any) => JSX.Element);
|
|
32
|
-
LoadingIndicator: React.FunctionComponent<SpinnerProps> | ((props: any) => JSX.Element);
|
|
30
|
+
} & import("../IconButton").IconOnlyButtonProps)> | ((props: any) => React.JSX.Element);
|
|
31
|
+
DropdownIndicator: React.FunctionComponent<Partial<IconProps>> | ((props: any) => React.JSX.Element);
|
|
32
|
+
LoadingIndicator: React.FunctionComponent<SpinnerProps> | ((props: any) => React.JSX.Element);
|
|
33
33
|
Item: typeof DefaultItem | React.FunctionComponent<ItemRenderOptions<T>>;
|
|
34
34
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { ReferenceType } from '@floating-ui/react-dom/dist/floating-ui.react-dom';
|
|
2
3
|
import { UseMultipleSelectionProps, UseSelectProps } from 'downshift';
|
|
3
|
-
import * as React from 'react';
|
|
4
4
|
import { Omit, XOR } from '../../utils';
|
|
5
5
|
import { LabelPosition } from '../Label';
|
|
6
6
|
import { SelectComponents } from './components';
|
|
@@ -228,4 +228,4 @@ export declare const MultipleSelectionStateChangeTypes: {
|
|
|
228
228
|
FunctionSetActiveIndex: import("downshift").UseMultipleSelectionStateChangeTypes.FunctionSetActiveIndex;
|
|
229
229
|
FunctionReset: import("downshift").UseMultipleSelectionStateChangeTypes.FunctionReset;
|
|
230
230
|
};
|
|
231
|
-
export declare function Select<T>(props: XORSelectProps<T>): JSX.Element;
|
|
231
|
+
export declare function Select<T>(props: XORSelectProps<T>): React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { HyperlinkProps } from '../Hyperlink';
|
|
3
2
|
import { Omit } from '../../utils';
|
|
3
|
+
import { HyperlinkProps } from '../Hyperlink';
|
|
4
4
|
export declare const TARGET_ID = "reactMagmaMainContent";
|
|
5
|
-
export interface SkipLinkProps extends Omit<HyperlinkProps, 'children'> {
|
|
5
|
+
export interface SkipLinkProps extends Omit<HyperlinkProps, 'children' | 'to'> {
|
|
6
6
|
/**
|
|
7
7
|
* The text in the skip link
|
|
8
8
|
* @default "Skip Navigation"
|
|
@@ -22,5 +22,10 @@ export interface SkipLinkProps extends Omit<HyperlinkProps, 'children'> {
|
|
|
22
22
|
* @internal
|
|
23
23
|
*/
|
|
24
24
|
testId?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The `to` prop will be removed from the SkipLink component in the next major release.
|
|
27
|
+
* @deprecated = true
|
|
28
|
+
*/
|
|
29
|
+
to?: string;
|
|
25
30
|
}
|
|
26
31
|
export declare const SkipLink: React.FunctionComponent<SkipLinkProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ThemeInterface } from '../../theme/magma';
|
|
3
2
|
import { StepperLayout, StepperOrientation } from './Stepper';
|
|
3
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
4
4
|
export interface StepProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
/**
|
|
6
6
|
* Error state for each step.
|
|
@@ -9,4 +9,11 @@ export declare const BaseStyledButton: import("@emotion/styled").StyledComponent
|
|
|
9
9
|
theme?: import("@emotion/react").Theme;
|
|
10
10
|
as?: React.ElementType<any>;
|
|
11
11
|
}, React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
12
|
+
export declare const ChildrenWrapper: import("@emotion/styled").StyledComponent<{
|
|
13
|
+
theme?: import("@emotion/react").Theme;
|
|
14
|
+
as?: React.ElementType<any>;
|
|
15
|
+
} & {
|
|
16
|
+
isLoading: boolean;
|
|
17
|
+
testId?: string;
|
|
18
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
12
19
|
export declare const StyledButton: React.ForwardRefExoticComponent<StyledButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TableCellAlign } from './Table';
|
|
3
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
3
4
|
export interface TableCellProps extends React.HTMLAttributes<HTMLTableCellElement> {
|
|
4
5
|
/**
|
|
5
6
|
* Text alignment of the cell content. Right alignment should be used for numeric values
|
|
@@ -17,5 +18,5 @@ export interface TableCellProps extends React.HTMLAttributes<HTMLTableCellElemen
|
|
|
17
18
|
width?: string | number;
|
|
18
19
|
}
|
|
19
20
|
export declare const baseTableCellStyle: (props: any) => import("@emotion/react").SerializedStyles;
|
|
20
|
-
export declare function buildCellPaddingStyle(density: any, theme:
|
|
21
|
+
export declare function buildCellPaddingStyle(density: any, theme: ThemeInterface): string;
|
|
21
22
|
export declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TabsIconPosition, TabsBorderPosition } from './Tabs';
|
|
3
2
|
import { TabsOrientation, TabsTextTransform } from './shared';
|
|
3
|
+
import { TabsIconPosition, TabsBorderPosition } from './Tabs';
|
|
4
4
|
import { ThemeInterface } from '../../theme/magma';
|
|
5
5
|
export interface TabProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
6
|
/**
|
|
@@ -20,7 +20,7 @@ export interface TabProps extends React.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
20
20
|
/**
|
|
21
21
|
* @internal
|
|
22
22
|
*/
|
|
23
|
-
theme?:
|
|
23
|
+
theme?: ThemeInterface;
|
|
24
24
|
}
|
|
25
25
|
export declare const StyledTabsChild: import("@emotion/styled").StyledComponent<{
|
|
26
26
|
theme?: import("@emotion/react").Theme;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Omit } from '../../utils';
|
|
3
|
-
import { ThemeInterface } from '../../theme/magma';
|
|
4
2
|
import { TabsOrientation, TabsTextTransform } from './shared';
|
|
3
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
4
|
+
import { Omit } from '../../utils';
|
|
5
5
|
export declare enum TabsAlignment {
|
|
6
6
|
center = "center",
|
|
7
7
|
left = "left",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './Tag';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { FormFieldContainerBaseProps } from '../FormFieldContainer';
|
|
3
2
|
import { Omit } from '../../utils';
|
|
3
|
+
import { FormFieldContainerBaseProps } from '../FormFieldContainer';
|
|
4
4
|
export interface TextareaProps extends Omit<FormFieldContainerBaseProps, 'inputSize' | 'fieldId'>, React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
5
5
|
/**
|
|
6
6
|
* Style properties for the component container element
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
2
3
|
export declare enum ToggleTextPosition {
|
|
3
4
|
left = "left",
|
|
4
5
|
right = "right"
|
|
@@ -52,7 +53,7 @@ export interface ToggleProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
52
53
|
/**
|
|
53
54
|
* @internal
|
|
54
55
|
*/
|
|
55
|
-
theme?:
|
|
56
|
+
theme?: ThemeInterface;
|
|
56
57
|
/**
|
|
57
58
|
* Style properties for the part of the component that slides back and forth on the track
|
|
58
59
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IconProps } from 'react-magma-icons';
|
|
3
3
|
import { ThemeInterface } from '../../theme/magma';
|
|
4
|
+
import { XOR } from '../../utils';
|
|
4
5
|
import { ButtonProps, ButtonSize } from '../Button';
|
|
5
|
-
import { IconProps } from 'react-magma-icons';
|
|
6
6
|
export interface ToggleButtonTextProps extends ButtonProps {
|
|
7
7
|
/**
|
|
8
8
|
* Sets a disabled state for a button.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
2
3
|
import { ButtonSize } from '../Button';
|
|
3
4
|
import { ButtonGroupProps } from '../ButtonGroup';
|
|
4
|
-
import { ThemeInterface } from '../../theme/magma';
|
|
5
5
|
/**
|
|
6
6
|
* @children required
|
|
7
7
|
*/
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { UseTreeItemProps } from './useTreeItem';
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
export declare const TreeItem: React.ForwardRefExoticComponent<TreeItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
3
|
+
export declare type TreeItemProps = UseTreeItemProps;
|
|
4
|
+
export declare const TreeItem: React.ForwardRefExoticComponent<UseTreeItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -18,13 +18,11 @@ export interface TreeViewContextInterface {
|
|
|
18
18
|
children?: React.ReactNode[];
|
|
19
19
|
hasIcons: boolean;
|
|
20
20
|
initialExpandedItems: Array<string>;
|
|
21
|
-
initialExpandedItemsNeedUpdate: boolean;
|
|
22
21
|
onExpandedChange?: (event: React.SyntheticEvent, expandedItems: Array<string>) => void;
|
|
23
22
|
onSelectedItemChange?: (selectedItems: Array<TreeItemSelectedInterface>) => void;
|
|
24
23
|
registerTreeItem: (itemRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, itemRef: React.MutableRefObject<Element>) => void;
|
|
25
24
|
selectable: TreeViewSelectable;
|
|
26
25
|
selectedItems: Array<TreeItemSelectedInterface>;
|
|
27
|
-
setInitialExpandedItemsNeedUpdate: React.Dispatch<React.SetStateAction<any>>;
|
|
28
26
|
treeItemRefArray?: React.MutableRefObject<React.MutableRefObject<Element>[]>;
|
|
29
27
|
itemToFocus?: string;
|
|
30
28
|
checkParents: boolean;
|
|
@@ -33,5 +31,6 @@ export interface TreeViewContextInterface {
|
|
|
33
31
|
selectItem: (data: Pick<TreeViewItemInterface, 'itemId' | 'checkedStatus'>) => void;
|
|
34
32
|
handleExpandedChange: (event: React.SyntheticEvent, expandedItemId: string) => void;
|
|
35
33
|
expandedSet: Set<string>;
|
|
34
|
+
isTopLevelSelectable?: boolean;
|
|
36
35
|
}
|
|
37
36
|
export declare const TreeViewContext: React.Context<TreeViewContextInterface>;
|
|
@@ -46,6 +46,7 @@ export interface UseTreeItemProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
|
46
46
|
labelStyle?: React.CSSProperties;
|
|
47
47
|
/**
|
|
48
48
|
* @internal
|
|
49
|
+
* Whether this item is a top-level item (no parent)
|
|
49
50
|
*/
|
|
50
51
|
topLevel?: boolean;
|
|
51
52
|
}
|
|
@@ -62,7 +63,7 @@ export declare function useTreeItem(props: UseTreeItemProps, forwardedRef: any):
|
|
|
62
63
|
ref: (node: any) => void;
|
|
63
64
|
selectedItems: import("./TreeViewContext").TreeItemSelectedInterface[];
|
|
64
65
|
setExpanded: React.Dispatch<React.SetStateAction<boolean>>;
|
|
65
|
-
treeItemChildren: (string | number | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any>) | (new (props: any) => React.Component<any, any, any>)> | React.
|
|
66
|
+
treeItemChildren: (string | number | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, any>) | (new (props: any) => React.Component<any, any, any>)> | Iterable<React.ReactNode> | React.ReactPortal)[];
|
|
66
67
|
isDisabled: boolean;
|
|
67
68
|
};
|
|
68
69
|
handleClick: (event: any, itemId: any) => void;
|
|
@@ -79,6 +79,8 @@ export interface UseTreeViewProps {
|
|
|
79
79
|
* clearAll(): void - action that allows to unselect all items.
|
|
80
80
|
* showMore(): void - action that gets called when a tree has hidden items and they get expanded.
|
|
81
81
|
* showLess(): void - action that gets called when a tree has hidden items and they get collapsed.
|
|
82
|
+
* expandAll(): void - action that allows to expand all items.
|
|
83
|
+
* collapseAll(): void - action that allows to collapse all items.
|
|
82
84
|
*/
|
|
83
85
|
apiRef?: React.MutableRefObject<TreeViewApi | undefined>;
|
|
84
86
|
/**
|
|
@@ -86,6 +88,12 @@ export interface UseTreeViewProps {
|
|
|
86
88
|
* @default false
|
|
87
89
|
*/
|
|
88
90
|
isDisabled?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* If false, top-level items will not be selectable in multi-select mode.
|
|
93
|
+
* Their checkboxes will be hidden, and they will only function as expandable groups.
|
|
94
|
+
* @default true
|
|
95
|
+
*/
|
|
96
|
+
isTopLevelSelectable?: boolean;
|
|
89
97
|
}
|
|
90
98
|
export declare function useTreeView(props: UseTreeViewProps): {
|
|
91
99
|
contextValue: {
|
|
@@ -98,14 +106,13 @@ export declare function useTreeView(props: UseTreeViewProps): {
|
|
|
98
106
|
initialExpandedItems: any[];
|
|
99
107
|
treeItemRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>;
|
|
100
108
|
registerTreeItem: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
|
|
101
|
-
initialExpandedItemsNeedUpdate: boolean;
|
|
102
|
-
setInitialExpandedItemsNeedUpdate: React.Dispatch<React.SetStateAction<boolean>>;
|
|
103
109
|
checkChildren: boolean;
|
|
104
110
|
checkParents: boolean;
|
|
105
111
|
items: any;
|
|
106
112
|
selectItem: ({ itemId, checkedStatus, }: Pick<TreeViewItemInterface, 'itemId'> & Partial<Pick<TreeViewItemInterface, 'checkedStatus'>>) => void;
|
|
107
|
-
handleExpandedChange: (event: React.SyntheticEvent, itemId: string) => void;
|
|
113
|
+
handleExpandedChange: (event: React.SyntheticEvent, itemId: string | string[]) => void;
|
|
108
114
|
expandedSet: Set<string>;
|
|
115
|
+
isTopLevelSelectable: boolean;
|
|
109
116
|
};
|
|
110
117
|
};
|
|
111
118
|
export declare type UseTreeViewReturn = ReturnType<typeof useTreeView>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ThemeInterface } from '../../theme/magma';
|
|
2
|
-
import { UseTreeViewProps } from './useTreeView';
|
|
3
|
-
import { TreeViewSelectable } from './types';
|
|
4
1
|
import React from 'react';
|
|
2
|
+
import { TreeViewSelectable } from './types';
|
|
3
|
+
import { UseTreeViewProps } from './useTreeView';
|
|
4
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
5
5
|
import { IndeterminateCheckboxStatus } from '../IndeterminateCheckbox';
|
|
6
6
|
import { TreeItemSelectedInterface, TreeViewItemInterface } from './TreeViewContext';
|
|
7
7
|
export declare enum TreeNodeType {
|
|
@@ -34,7 +34,7 @@ export declare const getChildrenIds: ({ items, itemId, }: {
|
|
|
34
34
|
items: TreeViewItemInterface[];
|
|
35
35
|
itemId: TreeViewItemInterface['itemId'];
|
|
36
36
|
}) => any;
|
|
37
|
-
export declare const getInitialItems: ({ children, preselectedItems: rawPreselectedItems, checkParents, checkChildren, selectable, isDisabled: isTreeViewDisabled, }: Pick<UseTreeViewProps, 'children' | 'preselectedItems' | 'checkParents' | 'checkChildren' | 'selectable' | 'isDisabled'>) => any;
|
|
37
|
+
export declare const getInitialItems: ({ children, preselectedItems: rawPreselectedItems, checkParents, checkChildren, selectable, isDisabled: isTreeViewDisabled, isTopLevelSelectable, }: Pick<UseTreeViewProps, 'children' | 'preselectedItems' | 'checkParents' | 'checkChildren' | 'selectable' | 'isDisabled' | 'isTopLevelSelectable'>) => any;
|
|
38
38
|
export declare const selectSingle: ({ items, itemId, checkedStatus, }: {
|
|
39
39
|
items: TreeViewItemInterface[];
|
|
40
40
|
itemId: TreeViewItemInterface['itemId'];
|
|
@@ -47,16 +47,16 @@ export declare const selectSingle: ({ items, itemId, checkedStatus, }: {
|
|
|
47
47
|
hasOwnTreeItems: boolean;
|
|
48
48
|
isDisabled?: boolean;
|
|
49
49
|
}[];
|
|
50
|
-
export declare const toggleMulti: ({ items, itemId, checkedStatus: rawCheckedStatus, forceCheckedStatus, checkChildren, checkParents, }: {
|
|
50
|
+
export declare const toggleMulti: ({ items, itemId, checkedStatus: rawCheckedStatus, forceCheckedStatus, checkChildren, checkParents, isTopLevelSelectable, }: {
|
|
51
51
|
items: TreeViewItemInterface[];
|
|
52
52
|
itemId: TreeViewItemInterface['itemId'];
|
|
53
53
|
checkedStatus: TreeViewItemInterface['checkedStatus'];
|
|
54
54
|
forceCheckedStatus?: boolean;
|
|
55
|
-
} & Pick<UseTreeViewProps, "checkChildren" | "checkParents">) => any;
|
|
56
|
-
export declare const toggleAllMulti: ({ items, checkedStatus, checkChildren, checkParents, }: {
|
|
55
|
+
} & Pick<UseTreeViewProps, "checkChildren" | "checkParents" | "isTopLevelSelectable">) => any;
|
|
56
|
+
export declare const toggleAllMulti: ({ items, checkedStatus, checkChildren, checkParents, isTopLevelSelectable, }: {
|
|
57
57
|
items: TreeViewItemInterface[];
|
|
58
58
|
checkedStatus: TreeViewItemInterface['checkedStatus'];
|
|
59
|
-
} & Pick<UseTreeViewProps, "checkChildren" | "checkParents">) => any;
|
|
59
|
+
} & Pick<UseTreeViewProps, "checkChildren" | "checkParents" | "isTopLevelSelectable">) => any;
|
|
60
60
|
export declare const getInitialExpandedIds: ({ items, initialExpandedItems, }: {
|
|
61
61
|
items: TreeViewItemInterface[];
|
|
62
62
|
} & Pick<UseTreeViewProps, "initialExpandedItems">) => any[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
3
|
+
export interface TypographyProps<T = HTMLParagraphElement> extends Omit<React.HTMLAttributes<T>, 'color'> {
|
|
4
|
+
as?: React.ElementType;
|
|
5
|
+
children?: React.ReactNode;
|
|
5
6
|
color?: TypographyColor;
|
|
6
7
|
contextVariant?: TypographyContextVariant;
|
|
7
8
|
element?: string;
|
|
@@ -14,7 +15,7 @@ export interface TypographyProps<T = HTMLParagraphElement> extends React.HTMLAtt
|
|
|
14
15
|
* @internal
|
|
15
16
|
*/
|
|
16
17
|
testId?: string;
|
|
17
|
-
theme?:
|
|
18
|
+
theme?: ThemeInterface;
|
|
18
19
|
visualStyle?: TypographyVisualStyle;
|
|
19
20
|
}
|
|
20
21
|
export declare enum TypographyColor {
|