react-magma-dom 4.6.0-next.0 → 4.6.0-next.10
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/Button/Button.stories.d.ts +1 -0
- package/dist/components/List/List.d.ts +0 -6
- package/dist/components/List/List.stories.d.ts +62 -1
- package/dist/components/List/ListItem.d.ts +8 -0
- package/dist/components/Modal/Modal.stories.d.ts +1 -0
- package/dist/components/NavTabs/NavTab.d.ts +1 -4
- package/dist/components/NavTabs/NavTabs.stories.d.ts +2 -0
- package/dist/components/Spinner/index.d.ts +5 -0
- package/dist/components/Table/TableRow.d.ts +4 -0
- package/dist/components/TreeView/TreeView.stories.d.ts +15 -0
- package/dist/components/TreeView/TreeViewContext.d.ts +2 -0
- package/dist/components/TreeView/useTreeView.d.ts +15 -0
- package/dist/esm/index.js +229 -187
- package/dist/esm/index.js.map +1 -1
- package/dist/i18n/interface.d.ts +7 -0
- package/dist/properties.json +155 -125
- package/dist/react-magma-dom.cjs.development.js +225 -184
- 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
|
@@ -6,3 +6,4 @@ export declare const Disabled: import("@storybook/csf").AnnotatedStoryFn<import(
|
|
|
6
6
|
export declare const Inverse: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, ButtonProps>;
|
|
7
7
|
export declare const InverseDisabled: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, ButtonProps>;
|
|
8
8
|
export declare const All: () => JSX.Element;
|
|
9
|
+
export declare const LoadingButton: (args: any) => JSX.Element;
|
|
@@ -5,15 +5,10 @@ import { TypographyVisualStyle } from '../Typography';
|
|
|
5
5
|
* @children required
|
|
6
6
|
*/
|
|
7
7
|
export interface ListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
-
description?: boolean;
|
|
9
8
|
/**
|
|
10
9
|
* Allows an ordered list to start at a determined value of a letter or number.
|
|
11
10
|
*/
|
|
12
11
|
hasStart?: string;
|
|
13
|
-
/**
|
|
14
|
-
* For use with inline icons within list items.
|
|
15
|
-
*/
|
|
16
|
-
icon?: React.ReactElement<any> | React.ReactElement<any>[];
|
|
17
12
|
/**
|
|
18
13
|
* Aligns the icon at the top, or center of each list item.
|
|
19
14
|
* @default IconAlignment.center
|
|
@@ -79,5 +74,4 @@ export declare enum olListType {
|
|
|
79
74
|
}
|
|
80
75
|
export declare function getIconSizes(props: any): any;
|
|
81
76
|
export declare function getListAlignment(props: any): "center" | "flex-start";
|
|
82
|
-
export declare function getListDisplay(props: any): "grid" | "list-item";
|
|
83
77
|
export declare const List: React.ForwardRefExoticComponent<ListProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,3 +1,64 @@
|
|
|
1
|
+
import { ulListType } from './List';
|
|
2
|
+
import { TypographyVisualStyle } from '../Typography';
|
|
1
3
|
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
2
4
|
export default _default;
|
|
3
|
-
export declare const
|
|
5
|
+
export declare const Simple: {
|
|
6
|
+
(args: any): JSX.Element;
|
|
7
|
+
args: {
|
|
8
|
+
spacingStyle: string;
|
|
9
|
+
isOrdered: boolean;
|
|
10
|
+
isReversed: boolean;
|
|
11
|
+
isInverse: boolean;
|
|
12
|
+
visualStyle: TypographyVisualStyle;
|
|
13
|
+
listType: ulListType;
|
|
14
|
+
};
|
|
15
|
+
parameters: {
|
|
16
|
+
controls: {
|
|
17
|
+
exclude: string[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare const UnorderedList: {
|
|
22
|
+
(args: any): JSX.Element;
|
|
23
|
+
args: {
|
|
24
|
+
spacingStyle: string;
|
|
25
|
+
isOrdered: boolean;
|
|
26
|
+
};
|
|
27
|
+
parameters: {
|
|
28
|
+
controls: {
|
|
29
|
+
exclude: string[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export declare const OrderedList: {
|
|
34
|
+
(args: any): JSX.Element;
|
|
35
|
+
args: {
|
|
36
|
+
spacingStyle: string;
|
|
37
|
+
isOrdered: boolean;
|
|
38
|
+
hasStart: number;
|
|
39
|
+
};
|
|
40
|
+
parameters: {
|
|
41
|
+
controls: {
|
|
42
|
+
exclude: string[];
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export declare const WithLinks: {
|
|
47
|
+
(args: any): JSX.Element;
|
|
48
|
+
parameters: {
|
|
49
|
+
controls: {
|
|
50
|
+
exclude: string[];
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export declare const WithIcons: {
|
|
55
|
+
(args: any): JSX.Element;
|
|
56
|
+
args: {
|
|
57
|
+
spacingStyle: string;
|
|
58
|
+
};
|
|
59
|
+
parameters: {
|
|
60
|
+
controls: {
|
|
61
|
+
exclude: string[];
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
};
|
|
@@ -5,6 +5,14 @@ import { magma } from '../../theme/magma';
|
|
|
5
5
|
* @children required
|
|
6
6
|
*/
|
|
7
7
|
export interface ListItemProps extends ListProps, React.HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
/**
|
|
9
|
+
* Boolean which changes a list item into a styled paragraph.
|
|
10
|
+
*/
|
|
11
|
+
description?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* For use with inline icons within list items.
|
|
14
|
+
*/
|
|
15
|
+
icon?: React.ReactElement<any> | React.ReactElement<any>[];
|
|
8
16
|
/**
|
|
9
17
|
* Option for changing icon background with all Magma colors.
|
|
10
18
|
*/
|
|
@@ -5,6 +5,7 @@ declare const info: {
|
|
|
5
5
|
};
|
|
6
6
|
export default info;
|
|
7
7
|
export declare const Default: () => JSX.Element;
|
|
8
|
+
export declare const BackgroundCickDisabled: () => JSX.Element;
|
|
8
9
|
export declare const LongContentWithScrolling: () => JSX.Element;
|
|
9
10
|
export declare const RadioInModal: () => JSX.Element;
|
|
10
11
|
export declare const ModalContentUpdate: () => JSX.Element;
|
|
@@ -2,9 +2,6 @@ import * as React from 'react';
|
|
|
2
2
|
import { TabsIconPosition } from '../Tabs';
|
|
3
3
|
import { TabsOrientation } from '../Tabs/shared';
|
|
4
4
|
import { XOR } from '../../utils';
|
|
5
|
-
/**
|
|
6
|
-
* @children required
|
|
7
|
-
*/
|
|
8
5
|
export interface BaseNavTabProps extends React.HTMLAttributes<HTMLAnchorElement> {
|
|
9
6
|
/**
|
|
10
7
|
* @internal
|
|
@@ -39,7 +36,7 @@ export interface BaseNavTabProps extends React.HTMLAttributes<HTMLAnchorElement>
|
|
|
39
36
|
theme?: any;
|
|
40
37
|
}
|
|
41
38
|
export interface NavTabChildrenProps extends BaseNavTabProps {
|
|
42
|
-
children
|
|
39
|
+
children?: JSX.Element | string;
|
|
43
40
|
/**
|
|
44
41
|
* The href value of the tab link
|
|
45
42
|
*/
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
|
|
2
2
|
export default _default;
|
|
3
3
|
export declare const Default: () => JSX.Element;
|
|
4
|
+
export declare const IconOnly: () => JSX.Element;
|
|
4
5
|
export declare const BackgroundColor: () => JSX.Element;
|
|
5
6
|
export declare const Inverse: () => JSX.Element;
|
|
7
|
+
export declare const CustomTab: () => JSX.Element;
|
|
@@ -7,6 +7,11 @@ export interface SpinnerProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
7
7
|
*/
|
|
8
8
|
color?: string;
|
|
9
9
|
isInverse?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Use when Spinner does not need the "img" role (ex: button loading state)
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
noRole?: boolean;
|
|
10
15
|
/**
|
|
11
16
|
* The height and width of the spinner. Can be a string or number; if number is provided, the size is in px.
|
|
12
17
|
* @default 16
|
|
@@ -24,6 +24,10 @@ export interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement>
|
|
|
24
24
|
onHeaderRowSelect?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
25
25
|
onTableRowSelect?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
26
26
|
rowIndex?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Unique name to be used to identify row for screenreaders
|
|
29
|
+
*/
|
|
30
|
+
rowName?: string;
|
|
27
31
|
/**
|
|
28
32
|
* @internal
|
|
29
33
|
*/
|
|
@@ -85,3 +85,18 @@ export declare const FlatTree: {
|
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
87
|
};
|
|
88
|
+
export declare const ParentsAndChildrenNotAutoChecked: {
|
|
89
|
+
(args: any): JSX.Element;
|
|
90
|
+
args: {
|
|
91
|
+
checkParents: boolean;
|
|
92
|
+
checkChildren: boolean;
|
|
93
|
+
ariaLabel: string;
|
|
94
|
+
selectable: TreeViewSelectable;
|
|
95
|
+
testId: string;
|
|
96
|
+
};
|
|
97
|
+
parameters: {
|
|
98
|
+
controls: {
|
|
99
|
+
exclude: string[];
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
};
|
|
@@ -24,5 +24,7 @@ export interface TreeViewContextInterface {
|
|
|
24
24
|
setSelectedItemsChanged: React.Dispatch<React.SetStateAction<any>>;
|
|
25
25
|
treeItemRefArray?: React.MutableRefObject<React.MutableRefObject<Element>[]>;
|
|
26
26
|
itemToFocus?: string;
|
|
27
|
+
checkParents: boolean;
|
|
28
|
+
checkChildren: boolean;
|
|
27
29
|
}
|
|
28
30
|
export declare const TreeViewContext: React.Context<TreeViewContextInterface>;
|
|
@@ -49,6 +49,19 @@ export interface UseTreeViewProps {
|
|
|
49
49
|
* Example: [ {itemId: 'item0', checkedStatus: IndeterminateCheckboxStatus.indeterminate}, {itemId: 'item0-child', checkedStatus: IndeterminateCheckboxStatus.checked} ]
|
|
50
50
|
*/
|
|
51
51
|
onSelectedItemChange?: (selectedItems: Array<Object>) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Only affects if selectable mode is TreeViewSelectable.multi.
|
|
54
|
+
* Determines if the parent checkbox will get selected when the user selects all its children checkboxes.
|
|
55
|
+
* When checkParents is enabled, the TreeView displays the indeterminate state of the parent checkboxes too.
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
checkParents?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Only affects if selectable mode is TreeViewSelectable.multi.
|
|
61
|
+
* Determines if the child checkboxes get selected when the user selects parent checkbox.
|
|
62
|
+
* @default true
|
|
63
|
+
*/
|
|
64
|
+
checkChildren?: boolean;
|
|
52
65
|
children?: React.ReactNode[];
|
|
53
66
|
}
|
|
54
67
|
export declare function useTreeView(props: UseTreeViewProps): {
|
|
@@ -70,6 +83,8 @@ export declare function useTreeView(props: UseTreeViewProps): {
|
|
|
70
83
|
setInitialExpandedItemsNeedUpdate: React.Dispatch<React.SetStateAction<boolean>>;
|
|
71
84
|
selectedItemsChanged: boolean;
|
|
72
85
|
setSelectedItemsChanged: React.Dispatch<React.SetStateAction<boolean>>;
|
|
86
|
+
checkChildren: boolean;
|
|
87
|
+
checkParents: boolean;
|
|
73
88
|
};
|
|
74
89
|
};
|
|
75
90
|
export declare type UseTreeViewReturn = ReturnType<typeof useTreeView>;
|