react-magma-dom 4.10.0-next.9 → 4.10.0
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/AIButton/StyledAIButton.d.ts +13 -0
- package/dist/components/AIButton/StyledAIButtonTemplate.d.ts +15 -0
- package/dist/components/AIButton/index.d.ts +124 -0
- package/dist/components/AIButton/styles.d.ts +14 -0
- package/dist/components/Combobox/index.d.ts +1 -14
- package/dist/components/DatePicker/CalendarContext.d.ts +4 -0
- package/dist/components/DatePicker/CalendarHeader.d.ts +1 -1
- package/dist/components/DatePicker/CalendarMonth.d.ts +1 -0
- package/dist/components/DatePicker/MonthPicker.d.ts +6 -0
- package/dist/components/DatePicker/StyledSelect.d.ts +9 -0
- package/dist/components/DatePicker/YearPicker.d.ts +7 -0
- package/dist/components/DatePicker/index.d.ts +24 -0
- package/dist/components/DatePicker/utils.d.ts +6 -0
- package/dist/components/DateTimePicker/index.d.ts +99 -0
- package/dist/components/Drawer/Drawer.d.ts +5 -0
- package/dist/components/IconButton/index.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts +5 -0
- package/dist/components/Popover/Popover.d.ts +15 -1
- package/dist/components/Select/index.d.ts +0 -13
- package/dist/components/Table/Table.d.ts +26 -0
- package/dist/components/Table/TableHeaderCell.d.ts +9 -1
- package/dist/components/Table/TablePagination.d.ts +5 -0
- package/dist/components/Table/TableRow.d.ts +1 -1
- package/dist/components/Tabs/CustomTab.d.ts +7 -0
- package/dist/components/Tabs/Tab.d.ts +6 -0
- package/dist/components/Toggle/index.d.ts +2 -2
- package/dist/components/Transition/Transition.d.ts +5 -0
- package/dist/components/TreeView/TreeViewContext.d.ts +5 -0
- package/dist/components/TreeView/useTreeItem.d.ts +27 -18
- package/dist/components/TreeView/useTreeView.d.ts +55 -39
- package/dist/esm/index.js +16830 -15462
- package/dist/esm/index.js.map +1 -1
- package/dist/hooks/useMagmaFloating.d.ts +24 -0
- package/dist/i18n/interface.d.ts +12 -0
- package/dist/index.d.ts +5 -2
- package/dist/properties.json +4136 -2583
- package/dist/react-magma-dom.cjs.development.js +13890 -12538
- 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/ThemeContext.d.ts +14 -0
- package/dist/theme/components/drawerTransition.d.ts +2 -0
- package/dist/theme/magma.d.ts +28 -0
- package/package.json +3 -3
|
@@ -6,7 +6,7 @@ export declare enum ToggleTextPosition {
|
|
|
6
6
|
}
|
|
7
7
|
export interface ToggleProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
8
8
|
/**
|
|
9
|
-
* If true, element is checked (i.e
|
|
9
|
+
* If true, an element is checked (i.e., selected)
|
|
10
10
|
* @default false
|
|
11
11
|
*/
|
|
12
12
|
checked?: boolean;
|
|
@@ -29,7 +29,7 @@ export interface ToggleProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
29
29
|
hasError?: boolean;
|
|
30
30
|
isInverse?: boolean;
|
|
31
31
|
/**
|
|
32
|
-
* If true, label text will be hidden visually, but will still be read by assistive technology
|
|
32
|
+
* If true, a label text will be hidden visually, but will still be read by assistive technology
|
|
33
33
|
* @default false
|
|
34
34
|
*/
|
|
35
35
|
isTextVisuallyHidden?: boolean;
|
|
@@ -94,5 +94,10 @@ export interface TransitionProps extends HTMLMotionProps<'div'> {
|
|
|
94
94
|
* @default false
|
|
95
95
|
*/
|
|
96
96
|
rotate180?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Shows the drawer transition animation
|
|
99
|
+
* @internal
|
|
100
|
+
*/
|
|
101
|
+
hasDrawerAnimation?: boolean;
|
|
97
102
|
}
|
|
98
103
|
export declare const Transition: React.ForwardRefExoticComponent<TransitionProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -14,6 +14,10 @@ export interface TreeViewItemInterface {
|
|
|
14
14
|
hasOwnTreeItems: boolean;
|
|
15
15
|
isDisabled?: boolean;
|
|
16
16
|
}
|
|
17
|
+
export interface ExpandIconInterface {
|
|
18
|
+
size?: number;
|
|
19
|
+
color?: string;
|
|
20
|
+
}
|
|
17
21
|
export interface TreeViewContextInterface {
|
|
18
22
|
children?: React.ReactNode[];
|
|
19
23
|
hasIcons: boolean;
|
|
@@ -32,5 +36,6 @@ export interface TreeViewContextInterface {
|
|
|
32
36
|
handleExpandedChange: (event: React.SyntheticEvent, expandedItemId: string) => void;
|
|
33
37
|
expandedSet: Set<string>;
|
|
34
38
|
isTopLevelSelectable?: boolean;
|
|
39
|
+
expandIconStyles?: ExpandIconInterface;
|
|
35
40
|
}
|
|
36
41
|
export declare const TreeViewContext: React.Context<TreeViewContextInterface>;
|
|
@@ -6,31 +6,45 @@ export interface UseTreeItemProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
|
6
6
|
* Enables additional content within the TreeItem.
|
|
7
7
|
*/
|
|
8
8
|
additionalContent?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Tree item hover color
|
|
11
|
+
* @default transparent
|
|
12
|
+
*/
|
|
13
|
+
hoverColor?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Icon for the tree item
|
|
16
|
+
*/
|
|
17
|
+
icon?: React.ReactElement<IconProps>;
|
|
18
|
+
/**
|
|
19
|
+
* If true, element is disabled
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
isDisabled?: boolean;
|
|
9
23
|
/**
|
|
10
24
|
* Index number
|
|
11
25
|
* private
|
|
12
26
|
*/
|
|
13
27
|
index?: number;
|
|
14
28
|
/**
|
|
15
|
-
*
|
|
29
|
+
* @internal
|
|
16
30
|
*/
|
|
17
|
-
|
|
31
|
+
itemDepth?: number;
|
|
18
32
|
/**
|
|
19
33
|
* Item id
|
|
20
34
|
*/
|
|
21
35
|
itemId: string;
|
|
22
36
|
/**
|
|
23
|
-
*
|
|
37
|
+
* Item name
|
|
24
38
|
*/
|
|
25
|
-
|
|
39
|
+
label: React.ReactNode;
|
|
26
40
|
/**
|
|
27
|
-
*
|
|
41
|
+
* Style properties for the tree item label
|
|
28
42
|
*/
|
|
29
|
-
|
|
43
|
+
labelStyle?: React.CSSProperties;
|
|
30
44
|
/**
|
|
31
|
-
*
|
|
45
|
+
* Action that fires when the item is clicked
|
|
32
46
|
*/
|
|
33
|
-
|
|
47
|
+
onClick?: () => void;
|
|
34
48
|
/**
|
|
35
49
|
* @internal
|
|
36
50
|
*/
|
|
@@ -38,21 +52,16 @@ export interface UseTreeItemProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
|
38
52
|
/**
|
|
39
53
|
* @internal
|
|
40
54
|
*/
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* If true, element is disabled
|
|
44
|
-
* @default false
|
|
45
|
-
*/
|
|
46
|
-
isDisabled?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Style properties for the tree item label
|
|
49
|
-
*/
|
|
50
|
-
labelStyle?: React.CSSProperties;
|
|
55
|
+
testId?: string;
|
|
51
56
|
/**
|
|
52
57
|
* @internal
|
|
53
58
|
* Whether this item is a top-level item (no parent)
|
|
54
59
|
*/
|
|
55
60
|
topLevel?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Style properties for the tree item
|
|
63
|
+
*/
|
|
64
|
+
treeItemStyles?: React.CSSProperties;
|
|
56
65
|
}
|
|
57
66
|
export declare const checkedStatusToBoolean: (status: IndeterminateCheckboxStatus) => boolean;
|
|
58
67
|
export declare function useTreeItem(props: UseTreeItemProps, forwardedRef: any): {
|
|
@@ -13,6 +13,18 @@ export interface TreeViewApi {
|
|
|
13
13
|
addItem(item: TreeViewItemInterface): void;
|
|
14
14
|
}
|
|
15
15
|
export interface UseTreeViewProps {
|
|
16
|
+
/**
|
|
17
|
+
* The ref object that allows TreeView manipulation.
|
|
18
|
+
* Actions available:
|
|
19
|
+
* selectItem({ itemId, checkedStatus }: Pick<TreeViewItemInterface, 'itemId' | 'checkedStatus'>): void - action that allows to change item selection,
|
|
20
|
+
* selectAll(): void - action that allows to select all items,
|
|
21
|
+
* clearAll(): void - action that allows to unselect all items.
|
|
22
|
+
* showMore(): void - action that gets called when a tree has hidden items and they get expanded.
|
|
23
|
+
* showLess(): void - action that gets called when a tree has hidden items and they get collapsed.
|
|
24
|
+
* expandAll(): void - action that allows to expand all items.
|
|
25
|
+
* collapseAll(): void - action that allows to collapse all items.
|
|
26
|
+
*/
|
|
27
|
+
apiRef?: React.MutableRefObject<TreeViewApi | undefined>;
|
|
16
28
|
/**
|
|
17
29
|
* Text for aria-label attribute for the tree.
|
|
18
30
|
* If there is no visible name for the element you can reference, use aria-label to provide the user with a recognizable accessible name.
|
|
@@ -25,6 +37,29 @@ export interface UseTreeViewProps {
|
|
|
25
37
|
* It's required to use either `ariaLabel` OR `ariaLabelledBy`.
|
|
26
38
|
*/
|
|
27
39
|
ariaLabelledBy?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Only affects if selectable mode is TreeViewSelectable.multi.
|
|
42
|
+
* Determines if the parent checkbox will get selected when the user selects all its children checkboxes.
|
|
43
|
+
* When checkParents is enabled, the TreeView displays the indeterminate state of the parent checkboxes too.
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
checkParents?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Only affects if selectable mode is TreeViewSelectable.multi.
|
|
49
|
+
* Determines if the child checkboxes get selected when the user selects parent checkbox.
|
|
50
|
+
* @default true
|
|
51
|
+
*/
|
|
52
|
+
checkChildren?: boolean;
|
|
53
|
+
children?: React.ReactNode[] | React.ReactNode;
|
|
54
|
+
/**
|
|
55
|
+
* Expand icon styles.
|
|
56
|
+
*/
|
|
57
|
+
expandIconStyles?: ExpandIconStylesProps;
|
|
58
|
+
/**
|
|
59
|
+
* If true, every item is disabled
|
|
60
|
+
* @default false
|
|
61
|
+
*/
|
|
62
|
+
isDisabled?: boolean;
|
|
28
63
|
/**
|
|
29
64
|
* Array list of itemIds of items that should be expanded by default.
|
|
30
65
|
* For all items expanded, provide an array with all the indexes
|
|
@@ -33,19 +68,11 @@ export interface UseTreeViewProps {
|
|
|
33
68
|
initialExpandedItems?: Array<string>;
|
|
34
69
|
isInverse?: boolean;
|
|
35
70
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
|
|
39
|
-
preselectedItems?: Array<TreeItemSelectedInterface>;
|
|
40
|
-
/**
|
|
41
|
-
* How many items can be selected in the tree view: single, multi, off
|
|
42
|
-
* @default TreeViewSelectable.single
|
|
43
|
-
*/
|
|
44
|
-
selectable?: TreeViewSelectable;
|
|
45
|
-
/**
|
|
46
|
-
* @internal
|
|
71
|
+
* If false, top-level items will not be selectable in multi-select mode.
|
|
72
|
+
* Their checkboxes will be hidden, and they will only function as expandable groups.
|
|
73
|
+
* @default true
|
|
47
74
|
*/
|
|
48
|
-
|
|
75
|
+
isTopLevelSelectable?: boolean;
|
|
49
76
|
/**
|
|
50
77
|
* Action that fires when an item is expanded or collapsed
|
|
51
78
|
* Return an array of itemIds of items that are expanded
|
|
@@ -59,42 +86,30 @@ export interface UseTreeViewProps {
|
|
|
59
86
|
*/
|
|
60
87
|
onSelectedItemChange?: (selectedItems: Array<TreeItemSelectedInterface>) => void;
|
|
61
88
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* When checkParents is enabled, the TreeView displays the indeterminate state of the parent checkboxes too.
|
|
65
|
-
* @default true
|
|
89
|
+
* Array list of itemIds of items that should be selected when the component renders
|
|
90
|
+
* * @default [] (no items selected)
|
|
66
91
|
*/
|
|
67
|
-
|
|
92
|
+
preselectedItems?: Array<TreeItemSelectedInterface>;
|
|
68
93
|
/**
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
* @default true
|
|
94
|
+
* How many items can be selected in the tree view: single, multi, off
|
|
95
|
+
* @default TreeViewSelectable.single
|
|
72
96
|
*/
|
|
73
|
-
|
|
74
|
-
children?: React.ReactNode[] | React.ReactNode;
|
|
97
|
+
selectable?: TreeViewSelectable;
|
|
75
98
|
/**
|
|
76
|
-
*
|
|
77
|
-
* Actions available:
|
|
78
|
-
* selectItem({ itemId, checkedStatus }: Pick<TreeViewItemInterface, 'itemId' | 'checkedStatus'>): void - action that allows to change item selection,
|
|
79
|
-
* selectAll(): void - action that allows to select all items,
|
|
80
|
-
* clearAll(): void - action that allows to unselect all items.
|
|
81
|
-
* showMore(): void - action that gets called when a tree has hidden items and they get expanded.
|
|
82
|
-
* showLess(): void - action that gets called when a tree has hidden items and they get collapsed.
|
|
83
|
-
* expandAll(): void - action that allows to expand all items.
|
|
84
|
-
* collapseAll(): void - action that allows to collapse all items.
|
|
99
|
+
* @internal
|
|
85
100
|
*/
|
|
86
|
-
|
|
101
|
+
testId?: string;
|
|
102
|
+
}
|
|
103
|
+
interface ExpandIconStylesProps {
|
|
87
104
|
/**
|
|
88
|
-
*
|
|
89
|
-
* @default
|
|
105
|
+
* Size for the expand/collapse icon.
|
|
106
|
+
* @default 24
|
|
90
107
|
*/
|
|
91
|
-
|
|
108
|
+
size?: number;
|
|
92
109
|
/**
|
|
93
|
-
*
|
|
94
|
-
* Their checkboxes will be hidden, and they will only function as expandable groups.
|
|
95
|
-
* @default true
|
|
110
|
+
* Color for the expand/collapse icon.
|
|
96
111
|
*/
|
|
97
|
-
|
|
112
|
+
color?: string;
|
|
98
113
|
}
|
|
99
114
|
export declare function useTreeView(props: UseTreeViewProps): {
|
|
100
115
|
contextValue: {
|
|
@@ -113,6 +128,7 @@ export declare function useTreeView(props: UseTreeViewProps): {
|
|
|
113
128
|
selectItem: ({ itemId, checkedStatus, }: Pick<TreeViewItemInterface, 'itemId'> & Partial<Pick<TreeViewItemInterface, 'checkedStatus'>>) => void;
|
|
114
129
|
handleExpandedChange: (event: React.SyntheticEvent, itemId: string | string[]) => void;
|
|
115
130
|
expandedSet: Set<string>;
|
|
131
|
+
expandIconStyles: ExpandIconStylesProps;
|
|
116
132
|
isTopLevelSelectable: boolean;
|
|
117
133
|
};
|
|
118
134
|
};
|