react-magma-dom 4.10.0-next.10 → 4.10.0-next.11
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/Combobox/index.d.ts +1 -14
- package/dist/components/IconButton/index.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts +5 -0
- package/dist/components/Select/index.d.ts +0 -13
- package/dist/components/Table/Table.d.ts +26 -0
- package/dist/components/Table/TablePagination.d.ts +5 -0
- package/dist/components/Table/TableRow.d.ts +1 -1
- package/dist/components/Transition/Transition.d.ts +5 -0
- package/dist/esm/index.js +1075 -765
- package/dist/esm/index.js.map +1 -1
- package/dist/hooks/useMagmaFloating.d.ts +24 -0
- package/dist/i18n/interface.d.ts +6 -0
- package/dist/properties.json +187 -72
- package/dist/react-magma-dom.cjs.development.js +1075 -765
- 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/components/drawerTransition.d.ts +2 -0
- package/package.json +3 -3
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ReferenceType } from '@floating-ui/react-dom';
|
|
3
2
|
import { UseComboboxProps, UseComboboxState, UseMultipleSelectionProps } from 'downshift';
|
|
4
3
|
import { InternalMultiProps, InternalSelectProps, SelectOptions } from '../Select';
|
|
5
4
|
import { Omit, XOR } from '../../utils';
|
|
@@ -14,7 +13,7 @@ export interface ComboboxProps<T extends SelectOptions> extends Omit<UseCombobox
|
|
|
14
13
|
*/
|
|
15
14
|
containerStyle?: React.CSSProperties;
|
|
16
15
|
/**
|
|
17
|
-
* Default selectable options. Allows for uncontrolled component and internal creation of items. Can be an array of strings or objects
|
|
16
|
+
* Default selectable options. Allows for an uncontrolled component and internal creation of items. Can be an array of strings or objects
|
|
18
17
|
*/
|
|
19
18
|
defaultItems?: T[];
|
|
20
19
|
/**
|
|
@@ -22,10 +21,6 @@ export interface ComboboxProps<T extends SelectOptions> extends Omit<UseCombobox
|
|
|
22
21
|
* @default false
|
|
23
22
|
*/
|
|
24
23
|
disableCreateItem?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* @internal
|
|
27
|
-
*/
|
|
28
|
-
floatingElementStyles?: React.CSSProperties;
|
|
29
24
|
/**
|
|
30
25
|
* @internal
|
|
31
26
|
*/
|
|
@@ -98,14 +93,6 @@ export interface ComboboxProps<T extends SelectOptions> extends Omit<UseCombobox
|
|
|
98
93
|
* Event that fires when a new item is created with the create item option is clicked in the item list menu
|
|
99
94
|
*/
|
|
100
95
|
onItemCreated?: (newItem: T) => void;
|
|
101
|
-
/**
|
|
102
|
-
* @internal
|
|
103
|
-
*/
|
|
104
|
-
setFloating?: (node: ReferenceType) => void;
|
|
105
|
-
/**
|
|
106
|
-
* @internal
|
|
107
|
-
*/
|
|
108
|
-
setReference?: (node: ReferenceType) => void;
|
|
109
96
|
/**
|
|
110
97
|
* Reference to the toggle button element wrapping the input in the combobox
|
|
111
98
|
*/
|
|
@@ -40,6 +40,7 @@ export interface SpanProps {
|
|
|
40
40
|
hasIconLeading?: boolean;
|
|
41
41
|
size?: ButtonSize;
|
|
42
42
|
}
|
|
43
|
+
export declare function getIconSize(size: any, theme: any): any;
|
|
43
44
|
export declare function instanceOfIconOnly(object: any): object is IconOnlyButtonProps;
|
|
44
45
|
export declare const IconButton: React.ForwardRefExoticComponent<({} & IconTextButtonProps & React.RefAttributes<HTMLButtonElement>) | ({
|
|
45
46
|
children?: never;
|
|
@@ -96,5 +96,10 @@ export interface ModalProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
96
96
|
* @internal
|
|
97
97
|
*/
|
|
98
98
|
theme?: ThemeInterface;
|
|
99
|
+
/**
|
|
100
|
+
* Shows the drawer transition animation
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
hasDrawerAnimation?: boolean;
|
|
99
104
|
}
|
|
100
105
|
export declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ReferenceType } from '@floating-ui/react-dom/dist/floating-ui.react-dom';
|
|
3
2
|
import { UseMultipleSelectionProps, UseSelectProps } from 'downshift';
|
|
4
3
|
import { Omit, XOR } from '../../utils';
|
|
5
4
|
import { LabelPosition } from '../Label';
|
|
@@ -108,10 +107,6 @@ export interface SelectProps<T extends SelectOptions> extends UseSelectProps<T>,
|
|
|
108
107
|
* Id of the element that describes the select trigger button
|
|
109
108
|
*/
|
|
110
109
|
ariaDescribedBy?: string;
|
|
111
|
-
/**
|
|
112
|
-
* @internal
|
|
113
|
-
*/
|
|
114
|
-
floatingElementStyles?: React.CSSProperties;
|
|
115
110
|
/**
|
|
116
111
|
* @internal
|
|
117
112
|
*/
|
|
@@ -148,14 +143,6 @@ export interface SelectProps<T extends SelectOptions> extends UseSelectProps<T>,
|
|
|
148
143
|
* Event that will fire when a keypress is released while focused on the trigger button
|
|
149
144
|
*/
|
|
150
145
|
onKeyUp?: (event: React.KeyboardEvent) => void;
|
|
151
|
-
/**
|
|
152
|
-
* @internal
|
|
153
|
-
*/
|
|
154
|
-
setFloating?: (node: ReferenceType) => void;
|
|
155
|
-
/**
|
|
156
|
-
* @internal
|
|
157
|
-
*/
|
|
158
|
-
setReference?: (node: ReferenceType) => void;
|
|
159
146
|
}
|
|
160
147
|
export interface MultiSelectProps<T extends SelectOptions> extends UseMultipleSelectionProps<T>, Omit<SelectProps<T>, 'onStateChange' | 'stateReducer' | 'isMulti'>, InternalMultiProps<T> {
|
|
161
148
|
/**
|
|
@@ -13,11 +13,21 @@ export interface TableProps extends React.HTMLAttributes<HTMLTableElement> {
|
|
|
13
13
|
* @default false
|
|
14
14
|
*/
|
|
15
15
|
hasHoverStyles?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* If true, the table will have additional styles for table.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
hasTablePagination?: boolean;
|
|
16
21
|
/**
|
|
17
22
|
* If true, the table will have square edges
|
|
18
23
|
* @default false
|
|
19
24
|
*/
|
|
20
25
|
hasSquareCorners?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* If true, the table will have outer border
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
hasOutsideBorder?: boolean;
|
|
21
31
|
/**
|
|
22
32
|
* If true, columns will have vertical borders
|
|
23
33
|
*/
|
|
@@ -42,6 +52,12 @@ export interface TableProps extends React.HTMLAttributes<HTMLTableElement> {
|
|
|
42
52
|
minWidth?: number;
|
|
43
53
|
rowCount?: number;
|
|
44
54
|
selectedItems?: Array<number>;
|
|
55
|
+
/**
|
|
56
|
+
* The title or caption of a table inside a <caption> HTML element that provides the table an accessible
|
|
57
|
+
* description.
|
|
58
|
+
* It can be a simple string or a React node, such as a heading element (e.g., <h1>, <h2>).
|
|
59
|
+
*/
|
|
60
|
+
tableTitle?: React.ReactNode | string;
|
|
45
61
|
/**
|
|
46
62
|
* @internal
|
|
47
63
|
*/
|
|
@@ -74,6 +90,7 @@ interface TableContextInterface {
|
|
|
74
90
|
density?: TableDensity;
|
|
75
91
|
hasHoverStyles?: boolean;
|
|
76
92
|
hasSquareCorners?: boolean;
|
|
93
|
+
hasTablePagination?: boolean;
|
|
77
94
|
hasVerticalBorders?: boolean;
|
|
78
95
|
hasZebraStripes?: boolean;
|
|
79
96
|
isInverse?: boolean;
|
|
@@ -97,11 +114,20 @@ export declare const TableWrapper: import("@emotion/styled").StyledComponent<{
|
|
|
97
114
|
} & {
|
|
98
115
|
minWidth: number;
|
|
99
116
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
117
|
+
export declare const StyledTableTitle: import("@emotion/styled").StyledComponent<{
|
|
118
|
+
theme?: import("@emotion/react").Theme;
|
|
119
|
+
as?: React.ElementType<any>;
|
|
120
|
+
} & {
|
|
121
|
+
isInverse: boolean;
|
|
122
|
+
isTitleNode: boolean;
|
|
123
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>, {}>;
|
|
100
124
|
export declare const StyledTable: import("@emotion/styled").StyledComponent<{
|
|
101
125
|
theme?: import("@emotion/react").Theme;
|
|
102
126
|
as?: React.ElementType<any>;
|
|
103
127
|
} & {
|
|
128
|
+
hasOutsideBorder?: boolean;
|
|
104
129
|
hasSquareCorners?: boolean;
|
|
130
|
+
hasTablePagination?: boolean;
|
|
105
131
|
isInverse?: boolean;
|
|
106
132
|
minWidth: number;
|
|
107
133
|
}, React.DetailedHTMLProps<React.TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, {}>;
|
|
@@ -35,6 +35,11 @@ export interface BaseTablePaginationProps extends React.HTMLAttributes<HTMLDivEl
|
|
|
35
35
|
* @default true
|
|
36
36
|
*/
|
|
37
37
|
hasSquareCorners?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* If true, the table paginator will have outer border
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
hasOutsideBorder?: boolean;
|
|
38
43
|
}
|
|
39
44
|
export interface ControlledPageProps {
|
|
40
45
|
/**
|
|
@@ -25,7 +25,7 @@ export interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement>
|
|
|
25
25
|
onTableRowSelect?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
26
26
|
rowIndex?: number;
|
|
27
27
|
/**
|
|
28
|
-
* Unique name to be used to identify row for
|
|
28
|
+
* Unique name to be used to identify row for screen readers
|
|
29
29
|
*/
|
|
30
30
|
rowName?: string;
|
|
31
31
|
/**
|
|
@@ -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>>;
|