react-magma-dom 4.7.0-next.24 → 4.7.0-next.26
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/NavTabs/NavTab.d.ts +6 -1
- package/dist/components/NavTabs/NavTabs.d.ts +2 -1
- package/dist/components/Tabs/Tab.d.ts +6 -1
- package/dist/components/Tabs/Tabs.d.ts +7 -4
- package/dist/components/Tabs/shared.d.ts +4 -0
- package/dist/components/TreeView/useTreeItem.d.ts +0 -5
- package/dist/components/TreeView/useTreeView.d.ts +2 -1
- package/dist/components/TreeView/utils.d.ts +1 -0
- package/dist/esm/index.js +151 -92
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/properties.json +139 -25
- package/dist/react-magma-dom.cjs.development.js +149 -90
- 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/utils/index.d.ts +7 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TabsIconPosition } from '../Tabs';
|
|
3
|
-
import { TabsOrientation } from '../Tabs/shared';
|
|
3
|
+
import { TabsOrientation, TabsTextTransform } from '../Tabs/shared';
|
|
4
4
|
import { XOR } from '../../utils';
|
|
5
5
|
export interface BaseNavTabProps extends React.HTMLAttributes<HTMLAnchorElement> {
|
|
6
6
|
/**
|
|
@@ -25,6 +25,11 @@ export interface BaseNavTabProps extends React.HTMLAttributes<HTMLAnchorElement>
|
|
|
25
25
|
* @default TabsOrientation.horizontal
|
|
26
26
|
*/
|
|
27
27
|
orientation?: TabsOrientation;
|
|
28
|
+
/**
|
|
29
|
+
* Determines whether the tab appears in all-caps
|
|
30
|
+
* @default TabsTextTransform.uppercase
|
|
31
|
+
*/
|
|
32
|
+
textTransform?: TabsTextTransform;
|
|
28
33
|
/**
|
|
29
34
|
* @internal
|
|
30
35
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TabsBorderPosition, TabsIconPosition, TabsProps } from '../Tabs';
|
|
3
|
-
import { TabsOrientation } from '../Tabs/shared';
|
|
3
|
+
import { TabsOrientation, TabsTextTransform } from '../Tabs/shared';
|
|
4
4
|
import { Omit } from '../../utils';
|
|
5
5
|
export interface NavTabsProps extends Omit<TabsProps, 'onChange'> {
|
|
6
6
|
}
|
|
@@ -10,6 +10,7 @@ interface NavTabsContextInterface {
|
|
|
10
10
|
isInverse?: boolean;
|
|
11
11
|
isFullWidth?: boolean;
|
|
12
12
|
orientation?: TabsOrientation;
|
|
13
|
+
textTransform?: TabsTextTransform;
|
|
13
14
|
}
|
|
14
15
|
export declare const NavTabsContext: React.Context<NavTabsContextInterface>;
|
|
15
16
|
export declare const NavTabs: React.ForwardRefExoticComponent<(NavTabsProps & import("../Tabs").HorizontalTabsProps & React.RefAttributes<HTMLDivElement>) | (NavTabsProps & import("../Tabs").VerticalTabsProps & React.RefAttributes<HTMLDivElement>)>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TabsIconPosition, TabsBorderPosition } from './Tabs';
|
|
3
|
-
import { TabsOrientation } from './shared';
|
|
3
|
+
import { TabsOrientation, TabsTextTransform } from './shared';
|
|
4
4
|
import { ThemeInterface } from '../../theme/magma';
|
|
5
5
|
export interface TabProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
6
|
/**
|
|
@@ -8,6 +8,11 @@ export interface TabProps extends React.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
8
8
|
*/
|
|
9
9
|
icon?: React.ReactElement<any> | React.ReactElement<any>[];
|
|
10
10
|
isInverse?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Determines whether the tab appears in all-caps
|
|
13
|
+
* @default TabsTextTransform.uppercase
|
|
14
|
+
*/
|
|
15
|
+
textTransform?: TabsTextTransform;
|
|
11
16
|
/**
|
|
12
17
|
* @internal
|
|
13
18
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Omit } from '../../utils';
|
|
3
3
|
import { ThemeInterface } from '../../theme/magma';
|
|
4
|
+
import { TabsOrientation, TabsTextTransform } from './shared';
|
|
4
5
|
export declare enum TabsAlignment {
|
|
5
6
|
center = "center",
|
|
6
7
|
left = "left",
|
|
@@ -18,10 +19,6 @@ export declare enum TabsIconPosition {
|
|
|
18
19
|
right = "right",
|
|
19
20
|
top = "top"
|
|
20
21
|
}
|
|
21
|
-
export declare enum TabsOrientation {
|
|
22
|
-
horizontal = "horizontal",
|
|
23
|
-
vertical = "vertical"
|
|
24
|
-
}
|
|
25
22
|
export interface VerticalTabsProps {
|
|
26
23
|
orientation?: TabsOrientation.vertical;
|
|
27
24
|
borderPosition?: TabsBorderPosition.left | TabsBorderPosition.right;
|
|
@@ -63,6 +60,11 @@ export interface TabsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'o
|
|
|
63
60
|
* @default TabsOrientation.horizontal
|
|
64
61
|
*/
|
|
65
62
|
orientation?: TabsOrientation;
|
|
63
|
+
/**
|
|
64
|
+
* Determines whether the tab appears in all-caps
|
|
65
|
+
* @default TabsTextTransform.uppercase
|
|
66
|
+
*/
|
|
67
|
+
textTransform?: TabsTextTransform;
|
|
66
68
|
/**
|
|
67
69
|
* @internal
|
|
68
70
|
*/
|
|
@@ -76,6 +78,7 @@ interface TabsContextInterface {
|
|
|
76
78
|
isInverse?: boolean;
|
|
77
79
|
isFullWidth?: boolean;
|
|
78
80
|
orientation?: TabsOrientation;
|
|
81
|
+
textTransform?: TabsTextTransform;
|
|
79
82
|
registerTabButton: (itemRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, itemRef: React.MutableRefObject<Element>) => void;
|
|
80
83
|
}
|
|
81
84
|
export declare const TabsContext: React.Context<TabsContextInterface>;
|
|
@@ -27,9 +27,6 @@ export interface UseTreeItemProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
|
27
27
|
* Icon for the tree item
|
|
28
28
|
*/
|
|
29
29
|
icon?: React.ReactElement<IconProps>;
|
|
30
|
-
/**
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
33
30
|
/**
|
|
34
31
|
* @internal
|
|
35
32
|
*/
|
|
@@ -39,8 +36,6 @@ export interface UseTreeItemProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
|
39
36
|
*/
|
|
40
37
|
itemDepth?: number;
|
|
41
38
|
/**
|
|
42
|
-
* TODO: improve functionality (issue #1305)
|
|
43
|
-
* @internal
|
|
44
39
|
* If true, element is disabled
|
|
45
40
|
* @default false
|
|
46
41
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TreeItemSelectedInterface, TreeViewItemInterface } from './TreeViewContext';
|
|
3
3
|
import { TreeViewSelectable } from './types';
|
|
4
|
+
export { TreeItemSelectedInterface };
|
|
4
5
|
export interface TreeViewApi {
|
|
5
6
|
selectItem({ itemId, checkedStatus }: Pick<TreeViewItemInterface, 'itemId' | 'checkedStatus'>): void;
|
|
6
7
|
selectAll(): void;
|
|
@@ -71,7 +72,7 @@ export interface UseTreeViewProps {
|
|
|
71
72
|
* selectAll(): void - action that allows to select all items,
|
|
72
73
|
* clearAll(): void - action that allows to unselect all items.
|
|
73
74
|
*/
|
|
74
|
-
apiRef?: React.MutableRefObject<TreeViewApi>;
|
|
75
|
+
apiRef?: React.MutableRefObject<TreeViewApi | undefined>;
|
|
75
76
|
/**
|
|
76
77
|
* If true, every item is disabled
|
|
77
78
|
* @default false
|
|
@@ -57,4 +57,5 @@ export declare const toggleAllMulti: ({ items, checkedStatus, checkChildren, che
|
|
|
57
57
|
export declare const getInitialExpandedIds: ({ items, initialExpandedItems }: {
|
|
58
58
|
items: TreeViewItemInterface[];
|
|
59
59
|
} & Pick<UseTreeViewProps, "initialExpandedItems">) => any[];
|
|
60
|
+
export declare const isEqualArrays: <T>(arrayA: T[], arrayB: T[]) => boolean;
|
|
60
61
|
export declare const isSelectedItemsChanged: (prevSelectedItems: TreeItemSelectedInterface[] | null, selectedItems: TreeItemSelectedInterface[]) => boolean;
|