react-magma-dom 4.7.0-next.5 → 4.7.0-next.50
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/BlockQuote.d.ts +2 -2
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Combobox/ComboboxInput.d.ts +3 -1
- package/dist/components/Combobox/index.d.ts +25 -12
- package/dist/components/DatePicker/CalendarContext.d.ts +1 -0
- package/dist/components/DatePicker/HelperInformation.d.ts +1 -0
- package/dist/components/DatePicker/index.d.ts +4 -0
- package/dist/components/Dropdown/Dropdown.d.ts +10 -0
- package/dist/components/InputBase/index.d.ts +38 -4
- package/dist/components/List/ListItem.d.ts +3 -3
- package/dist/components/NavTabs/NavTab.d.ts +6 -1
- package/dist/components/NavTabs/NavTabs.d.ts +2 -1
- package/dist/components/Select/ItemsList.d.ts +6 -3
- package/dist/components/Select/SelectContainer.d.ts +1 -1
- package/dist/components/Select/SelectTriggerButton.d.ts +3 -1
- package/dist/components/Select/index.d.ts +22 -2
- package/dist/components/Select/shared.d.ts +5 -0
- package/dist/components/Stepper/ResponsiveStepperContainer.d.ts +17 -0
- package/dist/components/Stepper/Step.d.ts +5 -1
- package/dist/components/Stepper/Stepper.d.ts +13 -0
- package/dist/components/Stepper/index.d.ts +1 -0
- package/dist/components/StyledButton/styles.d.ts +0 -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/TreeViewContext.d.ts +4 -1
- package/dist/components/TreeView/useTreeItem.d.ts +1 -5
- package/dist/components/TreeView/useTreeView.d.ts +17 -7
- package/dist/components/TreeView/utils.d.ts +20 -5
- package/dist/esm/index.js +3767 -826
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/properties.json +485 -119
- package/dist/react-magma-dom.cjs.development.js +1595 -764
- 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 +2 -1
- package/dist/components/Accordion/Accordion.stories.d.ts +0 -16
- package/dist/components/Alert/Alert.stories.d.ts +0 -4
- package/dist/components/Announce/Announce.stories.d.ts +0 -3
- package/dist/components/AppBar/AppBar.stories.d.ts +0 -5
- package/dist/components/Badge/Badge.stories.d.ts +0 -4
- package/dist/components/Banner/Banner.stories.d.ts +0 -5
- package/dist/components/BlockQuote/BlockQuote.stories.d.ts +0 -5
- package/dist/components/Breadcrumb/Breadcrumb.stories.d.ts +0 -5
- package/dist/components/BreakpointsContainer/BreakpointsContainer.stories.d.ts +0 -3
- package/dist/components/Button/Button.stories.d.ts +0 -9
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +0 -278
- package/dist/components/Card/Card.stories.d.ts +0 -12
- package/dist/components/CharacterCounter/CharacterCounter.stories.d.ts +0 -556
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -4
- package/dist/components/Combobox/Combobox.stories.d.ts +0 -39
- package/dist/components/Container/Container.stories.d.ts +0 -7
- package/dist/components/Datagrid/Datagrid.stories.d.ts +0 -14
- package/dist/components/DatePicker/DatePicker.stories.d.ts +0 -33
- package/dist/components/Drawer/Drawer.stories.d.ts +0 -17
- package/dist/components/Dropdown/Dropdown.stories.d.ts +0 -17
- package/dist/components/Flex/Flex.stories.d.ts +0 -10
- package/dist/components/Form/Form.stories.d.ts +0 -5
- package/dist/components/FormGroup/FormGroup.stories.d.ts +0 -3
- package/dist/components/Grid/Grid.stories.d.ts +0 -4
- package/dist/components/Heading/Heading.stories.d.ts +0 -11
- package/dist/components/HideAtBreakpoint/HideAtBreakpoint.stories.d.ts +0 -3
- package/dist/components/Hyperlink/Hyperlink.stories.d.ts +0 -32
- package/dist/components/IconButton/IconButton.stories.d.ts +0 -18
- package/dist/components/IndeterminateCheckbox/IndeterminateCheckbox.stories.d.ts +0 -5
- package/dist/components/Input/Input.stories.d.ts +0 -1009
- package/dist/components/InputBase/InputBase.stories.d.ts +0 -7
- package/dist/components/List/List.stories.d.ts +0 -64
- package/dist/components/LoadingIndicator/LoadingIndicator.stories.d.ts +0 -10
- package/dist/components/Modal/Modal.stories.d.ts +0 -16
- package/dist/components/NativeSelect/NativeSelect.stories.d.ts +0 -12
- package/dist/components/NavTabs/NavTabs.stories.d.ts +0 -7
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -10
- package/dist/components/Paragraph/Paragraph.stories.d.ts +0 -3
- package/dist/components/PasswordInput/PasswordInput.stories.d.ts +0 -7
- package/dist/components/ProgressBar/ProgressBar.stories.d.ts +0 -19
- package/dist/components/Radio/Radio.stories.d.ts +0 -4
- package/dist/components/Search/Search.stories.d.ts +0 -4
- package/dist/components/Select/Select.stories.d.ts +0 -12
- package/dist/components/SkipLink/SkipLink.stories.d.ts +0 -3
- package/dist/components/Spacer/Spacer.stories.d.ts +0 -5
- package/dist/components/Spinner/Spinner.stories.d.ts +0 -4
- package/dist/components/Stepper/Stepper.stories.d.ts +0 -6
- package/dist/components/Table/Table.stories.d.ts +0 -1670
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -11
- package/dist/components/Tag/Tag.stories.d.ts +0 -564
- package/dist/components/Textarea/Textarea.stories.d.ts +0 -298
- package/dist/components/TimePicker/TimePicker.stories.d.ts +0 -7
- package/dist/components/Toast/Toast.stories.d.ts +0 -21
- package/dist/components/Toggle/Toggle.stories.d.ts +0 -4
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +0 -1131
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts +0 -554
- package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -10
- package/dist/components/Transition/Transition.stories.d.ts +0 -79
- package/dist/components/TreeView/TreeView.stories.d.ts +0 -104
- package/dist/components/VisuallyHidden/VisuallyHidden.stories.d.ts +0 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Colors, ThemeInterface } from '../../theme/magma';
|
|
3
3
|
/**
|
|
4
4
|
* @children required
|
|
5
5
|
*/
|
|
@@ -7,7 +7,7 @@ export interface BlockQuoteProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
/**
|
|
8
8
|
* Style properties for the left border color which accept custom CSS hex values.
|
|
9
9
|
*/
|
|
10
|
-
borderStyle?: keyof
|
|
10
|
+
borderStyle?: keyof Colors | string;
|
|
11
11
|
isInverse?: boolean;
|
|
12
12
|
/**
|
|
13
13
|
* @internal
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { UseComboboxGetComboboxPropsOptions, UseComboboxGetInputPropsOptions, UseComboboxGetToggleButtonPropsOptions } from 'downshift';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { SelectComponents } from '../Select/components';
|
|
3
|
-
import {
|
|
4
|
+
import { ReferenceType } from '@floating-ui/react-dom';
|
|
4
5
|
interface ComboboxInputProps<T> {
|
|
5
6
|
ariaDescribedBy?: string;
|
|
6
7
|
children?: React.ReactNode | React.ReactNode[];
|
|
@@ -22,6 +23,7 @@ interface ComboboxInputProps<T> {
|
|
|
22
23
|
onInputKeyUp?: (event: any) => void;
|
|
23
24
|
placeholder?: string;
|
|
24
25
|
selectedItems?: React.ReactNode;
|
|
26
|
+
setReference?: (node: ReferenceType) => void;
|
|
25
27
|
toggleButtonRef?: React.Ref<HTMLButtonElement>;
|
|
26
28
|
}
|
|
27
29
|
export declare function ComboboxInput<T>(props: ComboboxInputProps<T>): JSX.Element;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { UseComboboxProps, UseComboboxState, UseMultipleSelectionProps } from 'downshift';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { InternalMultiProps, InternalSelectProps, SelectOptions } from '../Select';
|
|
4
|
+
import { Omit, XOR } from '../../utils';
|
|
5
5
|
import { LabelPosition } from '../Label';
|
|
6
|
+
import { ReferenceType } from '@floating-ui/react-dom';
|
|
6
7
|
export interface ComboboxProps<T extends SelectOptions> extends Omit<UseComboboxProps<T>, 'items'>, InternalSelectProps<T> {
|
|
7
8
|
/**
|
|
8
9
|
* Id of the element that describes the combobox input
|
|
9
10
|
*/
|
|
10
11
|
ariaDescribedBy?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Style properties for the component container element
|
|
14
|
+
*/
|
|
15
|
+
containerStyle?: React.CSSProperties;
|
|
11
16
|
/**
|
|
12
17
|
* Default selectable options. Allows for uncontrolled component and internal creation of items. Can be an array of strings or objects
|
|
13
18
|
*/
|
|
@@ -17,6 +22,10 @@ export interface ComboboxProps<T extends SelectOptions> extends Omit<UseCombobox
|
|
|
17
22
|
* @default false
|
|
18
23
|
*/
|
|
19
24
|
disableCreateItem?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
floatingElementStyles?: React.CSSProperties;
|
|
20
29
|
/**
|
|
21
30
|
* @internal
|
|
22
31
|
*/
|
|
@@ -43,6 +52,13 @@ export interface ComboboxProps<T extends SelectOptions> extends Omit<UseCombobox
|
|
|
43
52
|
* Default selectable options. Can be an array of strings or objects
|
|
44
53
|
*/
|
|
45
54
|
items?: T[];
|
|
55
|
+
/**
|
|
56
|
+
* When false, the selected item gets validated to ensure it's in the original `items` list.
|
|
57
|
+
* When using Combobox for typeahead with a large `items` list, set this boolean to true to allow the selected item to not be part of the original `items` list.
|
|
58
|
+
* In addition, when this is true and `isLoading` is used, the loading indicator will appear on the list instead of the input
|
|
59
|
+
* @default false
|
|
60
|
+
*/
|
|
61
|
+
isTypeahead?: boolean;
|
|
46
62
|
/**
|
|
47
63
|
* Function passed in that transforms a newly created item to whatever format your items are in
|
|
48
64
|
*/
|
|
@@ -83,24 +99,21 @@ export interface ComboboxProps<T extends SelectOptions> extends Omit<UseCombobox
|
|
|
83
99
|
*/
|
|
84
100
|
onItemCreated?: (newItem: T) => void;
|
|
85
101
|
/**
|
|
86
|
-
*
|
|
102
|
+
* @internal
|
|
87
103
|
*/
|
|
88
|
-
|
|
104
|
+
setFloating?: (node: ReferenceType) => void;
|
|
89
105
|
/**
|
|
90
106
|
* @internal
|
|
91
107
|
*/
|
|
92
|
-
|
|
108
|
+
setReference?: (node: ReferenceType) => void;
|
|
93
109
|
/**
|
|
94
|
-
*
|
|
110
|
+
* Reference to the toggle button element wrapping the input in the combobox
|
|
95
111
|
*/
|
|
96
|
-
|
|
112
|
+
toggleButtonRef?: React.Ref<HTMLButtonElement>;
|
|
97
113
|
/**
|
|
98
|
-
*
|
|
99
|
-
* When using Combobox for typeahead with a large `items` list, set this boolean to true to allow the selected item to not be part of the original `items` list.
|
|
100
|
-
* In addition, when this is true and `isLoading` is used, the loading indicator will appear on the list instead of the input
|
|
101
|
-
* @default false
|
|
114
|
+
* @internal
|
|
102
115
|
*/
|
|
103
|
-
|
|
116
|
+
testId?: string;
|
|
104
117
|
}
|
|
105
118
|
export interface MultiComboboxProps<T extends SelectOptions> extends UseMultipleSelectionProps<T>, Omit<ComboboxProps<T>, 'onStateChange' | 'stateReducer' | 'isMulti'>, InternalMultiProps<T> {
|
|
106
119
|
/**
|
|
@@ -10,6 +10,7 @@ export interface CalendarContextInterface {
|
|
|
10
10
|
buildCalendarMonth: (date: Date, enableOutsideDates?: boolean) => Date[][];
|
|
11
11
|
showHelperInformation: () => void;
|
|
12
12
|
hideHelperInformation: () => void;
|
|
13
|
+
onClose: (event?: React.SyntheticEvent) => void;
|
|
13
14
|
onDateChange: (day: Date, event: React.SyntheticEvent) => void;
|
|
14
15
|
onKeyDown: (event: React.KeyboardEvent) => void;
|
|
15
16
|
onPrevMonthClick: () => void;
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
interface HelperInformationProps {
|
|
3
3
|
isInverse?: boolean;
|
|
4
4
|
isOpen?: boolean;
|
|
5
|
+
onReturnBack?: (event?: React.SyntheticEvent) => void;
|
|
5
6
|
onClose?: (event?: React.SyntheticEvent) => void;
|
|
6
7
|
}
|
|
7
8
|
export declare const HelperInformation: React.FunctionComponent<HelperInformationProps>;
|
|
@@ -26,6 +26,10 @@ export interface DatePickerProps extends Omit<React.InputHTMLAttributes<HTMLInpu
|
|
|
26
26
|
* @default false
|
|
27
27
|
*/
|
|
28
28
|
isClearable?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* If true, the component will have inverse styling to better appear on a dark background
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
29
33
|
isInverse?: boolean;
|
|
30
34
|
/**
|
|
31
35
|
* Style properties for the label element
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { ReferenceType } from '@floating-ui/react-dom/dist/floating-ui.react-dom';
|
|
2
3
|
export declare enum DropdownDropDirection {
|
|
3
4
|
down = "down",
|
|
4
5
|
left = "left",
|
|
@@ -18,13 +19,19 @@ export interface DropdownProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
18
19
|
/**
|
|
19
20
|
* Alignment of the dropdown content
|
|
20
21
|
* @default DropdownAlignment.start
|
|
22
|
+
* @deprecated = true
|
|
21
23
|
*/
|
|
22
24
|
alignment?: DropdownAlignment;
|
|
23
25
|
/**
|
|
24
26
|
* Position of the dropdown content
|
|
25
27
|
* @default DropdownDropDirection.down
|
|
28
|
+
* @deprecated = true
|
|
26
29
|
*/
|
|
27
30
|
dropDirection?: DropdownDropDirection;
|
|
31
|
+
/**
|
|
32
|
+
* If true, the component will have inverse styling to better appear on a dark background
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
28
35
|
isInverse?: boolean;
|
|
29
36
|
/**
|
|
30
37
|
* Max-height of dropdown content
|
|
@@ -55,6 +62,7 @@ interface DropdownContextInterface {
|
|
|
55
62
|
closeDropdown?: (event: React.SyntheticEvent | React.KeyboardEvent) => void;
|
|
56
63
|
dropdownButtonId?: React.MutableRefObject<string>;
|
|
57
64
|
dropDirection?: DropdownDropDirection;
|
|
65
|
+
floatingStyles?: React.CSSProperties;
|
|
58
66
|
handleDropdownBlur?: (event: React.FocusEvent) => void;
|
|
59
67
|
itemRefArray?: React.MutableRefObject<React.MutableRefObject<Element>[]>;
|
|
60
68
|
isFixedWidth?: boolean;
|
|
@@ -66,6 +74,8 @@ interface DropdownContextInterface {
|
|
|
66
74
|
registerDropdownMenuItem: (itemRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, itemRef: React.MutableRefObject<Element>) => void;
|
|
67
75
|
setActiveItemIndex?: React.Dispatch<React.SetStateAction<number>>;
|
|
68
76
|
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
77
|
+
setFloating?: (node: ReferenceType) => void;
|
|
78
|
+
setReference?: (node: ReferenceType) => void;
|
|
69
79
|
toggleRef?: any;
|
|
70
80
|
width?: string;
|
|
71
81
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { ReferenceType } from '@floating-ui/react-dom/dist/floating-ui.react-dom';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { IconProps } from 'react-magma-icons';
|
|
3
4
|
import { ThemeInterface } from '../../theme/magma';
|
|
5
|
+
import { LabelPosition } from '../Label';
|
|
4
6
|
export declare enum InputSize {
|
|
5
7
|
large = "large",
|
|
6
8
|
medium = "medium"
|
|
@@ -81,7 +83,15 @@ export interface InputBaseProps extends React.InputHTMLAttributes<HTMLInputEleme
|
|
|
81
83
|
* Function to be called when the contents of input are cleared by clicking a clear button
|
|
82
84
|
*/
|
|
83
85
|
onClear?: () => void;
|
|
86
|
+
/**
|
|
87
|
+
* If true, the component will have inverse styling to better appear on a dark background
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
84
90
|
isInverse?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Boolean for whether this is a Password Input or not
|
|
93
|
+
*/
|
|
94
|
+
isPasswordInput?: boolean;
|
|
85
95
|
/**
|
|
86
96
|
* For use in predictive search which moves the icon to the left
|
|
87
97
|
*/
|
|
@@ -107,6 +117,10 @@ export interface InputBaseProps extends React.InputHTMLAttributes<HTMLInputEleme
|
|
|
107
117
|
* Action that will synchronize chosenDate with input value
|
|
108
118
|
*/
|
|
109
119
|
onDateChange?: (event: any) => void;
|
|
120
|
+
/**
|
|
121
|
+
* @internal
|
|
122
|
+
*/
|
|
123
|
+
setReference?: (node: ReferenceType) => void;
|
|
110
124
|
/**
|
|
111
125
|
* @internal
|
|
112
126
|
*/
|
|
@@ -120,15 +134,21 @@ export interface InputBaseProps extends React.InputHTMLAttributes<HTMLInputEleme
|
|
|
120
134
|
* @default InputType.text
|
|
121
135
|
*/
|
|
122
136
|
type?: InputType;
|
|
123
|
-
/**
|
|
124
|
-
* Boolean for whether this is a Password Input or not
|
|
125
|
-
*/
|
|
126
|
-
isPasswordInput?: boolean;
|
|
127
137
|
/**
|
|
128
138
|
* String to determine width of input, must be suffixed with "px", "rem", or "%""
|
|
129
139
|
* @default "auto"
|
|
130
140
|
*/
|
|
131
141
|
width?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Position within the component for the label to appear
|
|
144
|
+
* @default LabelPosition.top
|
|
145
|
+
*/
|
|
146
|
+
labelPosition?: LabelPosition;
|
|
147
|
+
/**
|
|
148
|
+
* If true, label text will be hidden visually, but will still be read by assistive technology
|
|
149
|
+
* @default false
|
|
150
|
+
*/
|
|
151
|
+
isLabelVisuallyHidden?: boolean;
|
|
132
152
|
}
|
|
133
153
|
export interface InputWrapperStylesProps {
|
|
134
154
|
width?: string;
|
|
@@ -158,6 +178,7 @@ export declare const InputWrapper: import("@emotion/styled").StyledComponent<{
|
|
|
158
178
|
theme?: import("@emotion/react").Theme;
|
|
159
179
|
as?: React.ElementType<any>;
|
|
160
180
|
} & InputWrapperStylesProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
181
|
+
export declare function getHelpIconButtonSize(props: any): any;
|
|
161
182
|
export declare const IconButtonContainer: import("@emotion/styled").StyledComponent<{
|
|
162
183
|
theme?: import("@emotion/react").Theme;
|
|
163
184
|
as?: React.ElementType<any>;
|
|
@@ -168,4 +189,17 @@ export declare const IconButtonContainer: import("@emotion/styled").StyledCompon
|
|
|
168
189
|
isClickable?: boolean;
|
|
169
190
|
hasChildren?: boolean;
|
|
170
191
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
192
|
+
export declare const isLeftOrHidden: ({ labelPosition, isLabelVisuallyHidden, }: {
|
|
193
|
+
labelPosition?: LabelPosition;
|
|
194
|
+
isLabelVisuallyHidden?: boolean;
|
|
195
|
+
}) => boolean;
|
|
196
|
+
export declare const HelpLinkContainer: import("@emotion/styled").StyledComponent<{
|
|
197
|
+
theme?: import("@emotion/react").Theme;
|
|
198
|
+
as?: React.ElementType<any>;
|
|
199
|
+
} & {
|
|
200
|
+
labelPosition?: LabelPosition;
|
|
201
|
+
inputSize?: InputSize;
|
|
202
|
+
theme: ThemeInterface;
|
|
203
|
+
isLabelVisuallyHidden?: boolean;
|
|
204
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
171
205
|
export declare const InputBase: React.ForwardRefExoticComponent<InputBaseProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ListProps } from './';
|
|
3
|
-
import {
|
|
3
|
+
import { Colors } from '../../theme/magma';
|
|
4
4
|
/**
|
|
5
5
|
* @children required
|
|
6
6
|
*/
|
|
@@ -16,10 +16,10 @@ export interface ListItemProps extends ListProps, React.HTMLAttributes<HTMLDivEl
|
|
|
16
16
|
/**
|
|
17
17
|
* Option for changing icon background with all Magma colors.
|
|
18
18
|
*/
|
|
19
|
-
iconBackground?: keyof
|
|
19
|
+
iconBackground?: keyof Colors;
|
|
20
20
|
/**
|
|
21
21
|
* Option for changing icon color with all Magma colors.
|
|
22
22
|
*/
|
|
23
|
-
iconColor?: keyof
|
|
23
|
+
iconColor?: keyof Colors;
|
|
24
24
|
}
|
|
25
25
|
export declare const ListItem: React.ForwardRefExoticComponent<ListItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -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,18 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { UseSelectGetItemPropsOptions, UseSelectGetMenuPropsOptions } from 'downshift';
|
|
3
3
|
import { SelectComponents } from './components';
|
|
4
|
+
import { ReferenceType } from '@floating-ui/react-dom';
|
|
4
5
|
interface ItemsListProps<T> {
|
|
5
6
|
customComponents?: SelectComponents<T>;
|
|
7
|
+
floatingElementStyles?: React.CSSProperties;
|
|
6
8
|
getItemProps: (options?: UseSelectGetItemPropsOptions<T>) => any;
|
|
7
9
|
getMenuProps: (options?: UseSelectGetMenuPropsOptions) => any;
|
|
8
10
|
highlightedIndex?: number;
|
|
9
|
-
isOpen?: boolean;
|
|
10
11
|
isInverse?: boolean;
|
|
12
|
+
isLoading?: boolean;
|
|
13
|
+
isOpen?: boolean;
|
|
11
14
|
items: T[];
|
|
12
15
|
itemToString: (item: T) => string;
|
|
13
16
|
maxHeight?: number | string;
|
|
14
17
|
menuStyle?: React.CSSProperties;
|
|
15
|
-
|
|
18
|
+
setFloating?: (node: ReferenceType) => void;
|
|
16
19
|
}
|
|
17
20
|
export declare function ItemsList<T>(props: ItemsListProps<T>): JSX.Element;
|
|
18
21
|
export {};
|
|
@@ -13,8 +13,8 @@ interface SelectContainerInterface<T> {
|
|
|
13
13
|
additionalContent?: React.ReactNode;
|
|
14
14
|
children: React.ReactNode[];
|
|
15
15
|
containerStyle?: React.CSSProperties;
|
|
16
|
-
errorMessage?: React.ReactNode;
|
|
17
16
|
descriptionId?: string;
|
|
17
|
+
errorMessage?: React.ReactNode;
|
|
18
18
|
getLabelProps: (options?: UseSelectGetLabelPropsOptions) => any;
|
|
19
19
|
hasError?: boolean;
|
|
20
20
|
helperMessage?: React.ReactNode;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SelectComponents } from '../Select/components';
|
|
3
|
+
import { ReferenceType } from '@floating-ui/react-dom';
|
|
3
4
|
interface SelectTriggerButtonInterface<T> {
|
|
4
5
|
ariaDescribedBy?: string;
|
|
5
6
|
children: React.ReactNode | React.ReactNode[];
|
|
6
7
|
customComponents?: SelectComponents<T>;
|
|
7
|
-
hasError?: boolean;
|
|
8
8
|
disabled?: boolean;
|
|
9
|
+
hasError?: boolean;
|
|
9
10
|
isInverse?: boolean;
|
|
11
|
+
setReference?: (node: ReferenceType) => void;
|
|
10
12
|
style?: React.CSSProperties;
|
|
11
13
|
toggleButtonProps: any;
|
|
12
14
|
tabindex?: number;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { UseMultipleSelectionProps, UseSelectProps } from 'downshift';
|
|
3
|
+
import { ReferenceType } from '@floating-ui/react-dom/dist/floating-ui.react-dom';
|
|
3
4
|
import { SelectComponents } from './components';
|
|
4
|
-
import {
|
|
5
|
+
import { Omit, XOR } from '../../utils';
|
|
5
6
|
import { LabelPosition } from '../Label';
|
|
6
7
|
export declare type SelectOptions = string | {
|
|
7
8
|
value: string;
|
|
@@ -43,6 +44,10 @@ export interface InternalSelectProps<T> {
|
|
|
43
44
|
* @default false
|
|
44
45
|
*/
|
|
45
46
|
disabled?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* If true, the component will have inverse styling to better appear on a dark background
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
46
51
|
isInverse?: boolean;
|
|
47
52
|
/**
|
|
48
53
|
* If true, label text will be hidden visually, but will still be read by assistive technology
|
|
@@ -102,6 +107,10 @@ export interface SelectProps<T extends SelectOptions> extends UseSelectProps<T>,
|
|
|
102
107
|
* Id of the element that describes the select trigger button
|
|
103
108
|
*/
|
|
104
109
|
ariaDescribedBy?: string;
|
|
110
|
+
/**
|
|
111
|
+
* @internal
|
|
112
|
+
*/
|
|
113
|
+
floatingElementStyles?: React.CSSProperties;
|
|
105
114
|
/**
|
|
106
115
|
* @internal
|
|
107
116
|
*/
|
|
@@ -134,12 +143,23 @@ export interface SelectProps<T extends SelectOptions> extends UseSelectProps<T>,
|
|
|
134
143
|
* Event that will fire when a keypress is released while focused on the trigger button
|
|
135
144
|
*/
|
|
136
145
|
onKeyUp?: (event: React.KeyboardEvent) => void;
|
|
146
|
+
/**
|
|
147
|
+
* @internal
|
|
148
|
+
*/
|
|
149
|
+
setFloating?: (node: ReferenceType) => void;
|
|
150
|
+
/**
|
|
151
|
+
* @internal
|
|
152
|
+
*/
|
|
153
|
+
setReference?: (node: ReferenceType) => void;
|
|
137
154
|
}
|
|
138
155
|
export interface MultiSelectProps<T extends SelectOptions> extends UseMultipleSelectionProps<T>, Omit<SelectProps<T>, 'onStateChange' | 'stateReducer' | 'isMulti'>, InternalMultiProps<T> {
|
|
139
156
|
/**
|
|
140
157
|
* @internal
|
|
141
158
|
*/
|
|
142
159
|
hasError?: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* @internal
|
|
162
|
+
*/
|
|
143
163
|
isInverse?: boolean;
|
|
144
164
|
/**
|
|
145
165
|
* @internal
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ThemeInterface } from '../../theme/magma';
|
|
2
3
|
export declare const SelectContainer: import("@emotion/styled").StyledComponent<{
|
|
3
4
|
theme?: import("@emotion/react").Theme;
|
|
4
5
|
as?: import("react").ElementType<any>;
|
|
@@ -12,6 +13,10 @@ export declare const SelectText: import("@emotion/styled").StyledComponent<{
|
|
|
12
13
|
as?: import("react").ElementType<any>;
|
|
13
14
|
} & {
|
|
14
15
|
isClearable?: boolean;
|
|
16
|
+
isShowPlaceholder?: boolean;
|
|
17
|
+
isInverse?: boolean;
|
|
18
|
+
isDisabled?: boolean;
|
|
19
|
+
theme?: ThemeInterface;
|
|
15
20
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
16
21
|
export declare const StyledCard: import("@emotion/styled").StyledComponent<import("../Card").CardProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
17
22
|
theme?: import("@emotion/react").Theme;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StepperProps } from './Stepper';
|
|
3
|
+
export interface ResponsiveStepperContainerProps extends Omit<StepperProps, 'currentStep'> {
|
|
4
|
+
/**
|
|
5
|
+
* @children
|
|
6
|
+
*/
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Steps of the Stepper.
|
|
10
|
+
*/
|
|
11
|
+
steps: React.ReactNode[];
|
|
12
|
+
/**
|
|
13
|
+
* Current step value.
|
|
14
|
+
*/
|
|
15
|
+
currentStep: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const ResponsiveStepperContainer: React.FunctionComponent<ResponsiveStepperContainerProps>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ThemeInterface } from '../../theme/magma';
|
|
3
|
-
import { StepperLayout } from './Stepper';
|
|
3
|
+
import { StepperLayout, StepperOrientation } from './Stepper';
|
|
4
4
|
export interface StepProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
5
|
/**
|
|
6
6
|
* Error state for each step.
|
|
@@ -27,6 +27,10 @@ export interface StepProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
27
27
|
* @internal
|
|
28
28
|
*/
|
|
29
29
|
index?: number;
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
orientation?: StepperOrientation;
|
|
30
34
|
/**
|
|
31
35
|
* @internal
|
|
32
36
|
*/
|
|
@@ -17,6 +17,10 @@ export interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
17
17
|
* Changes the Stepper view for responsive layouts, needs a minimum 'breakpoint' number.
|
|
18
18
|
*/
|
|
19
19
|
breakpointLayout?: StepperLayout;
|
|
20
|
+
/**
|
|
21
|
+
* Changes the Stepper orientation for responsive layouts, needs a minimum 'breakpoint' number.
|
|
22
|
+
*/
|
|
23
|
+
breakpointOrientation?: StepperOrientation;
|
|
20
24
|
/**
|
|
21
25
|
* Sets the Stepper view
|
|
22
26
|
* @default StepperLayout.showLabels
|
|
@@ -36,6 +40,11 @@ export interface StepperProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
36
40
|
* Current step value.
|
|
37
41
|
*/
|
|
38
42
|
currentStep: number;
|
|
43
|
+
/**
|
|
44
|
+
* Determines if the stepper is displayed vertically or horizontally
|
|
45
|
+
* @default StepperOrientation.horizontal
|
|
46
|
+
*/
|
|
47
|
+
orientation?: StepperOrientation;
|
|
39
48
|
/**
|
|
40
49
|
* Inverse styling.
|
|
41
50
|
*/
|
|
@@ -50,4 +59,8 @@ export declare enum StepperLayout {
|
|
|
50
59
|
hideLabels = "hideLabels",
|
|
51
60
|
summaryView = "summaryView"
|
|
52
61
|
}
|
|
62
|
+
export declare enum StepperOrientation {
|
|
63
|
+
horizontal = "horizontal",
|
|
64
|
+
vertical = "vertical"
|
|
65
|
+
}
|
|
53
66
|
export declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -10,6 +10,5 @@ export declare function buildBorderColor(props: any): any;
|
|
|
10
10
|
export declare function buildColor(props: any): any;
|
|
11
11
|
export declare function buildFocusBackground(props: any): any;
|
|
12
12
|
export declare function buildFocusColor(props: any): any;
|
|
13
|
-
export declare function buildAfterBackground(props: any): any;
|
|
14
13
|
export declare function buildActiveBackground(props: any): any;
|
|
15
14
|
export declare function buildActiveColor(props: any): any;
|
|
@@ -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>;
|
|
@@ -4,6 +4,7 @@ import { IndeterminateCheckboxStatus } from '../IndeterminateCheckbox';
|
|
|
4
4
|
export interface TreeItemSelectedInterface {
|
|
5
5
|
itemId?: string;
|
|
6
6
|
checkedStatus: IndeterminateCheckboxStatus;
|
|
7
|
+
isDisabled?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export interface TreeViewItemInterface {
|
|
9
10
|
itemId?: string;
|
|
@@ -11,13 +12,14 @@ export interface TreeViewItemInterface {
|
|
|
11
12
|
icon?: React.ReactNode;
|
|
12
13
|
checkedStatus: IndeterminateCheckboxStatus;
|
|
13
14
|
hasOwnTreeItems: boolean;
|
|
15
|
+
isDisabled?: boolean;
|
|
14
16
|
}
|
|
15
17
|
export interface TreeViewContextInterface {
|
|
16
18
|
children?: React.ReactNode[];
|
|
17
19
|
hasIcons: boolean;
|
|
18
20
|
initialExpandedItems: Array<string>;
|
|
19
21
|
initialExpandedItemsNeedUpdate: boolean;
|
|
20
|
-
onExpandedChange?: (event: React.SyntheticEvent) => void;
|
|
22
|
+
onExpandedChange?: (event: React.SyntheticEvent, expandedItems: Array<string>) => void;
|
|
21
23
|
onSelectedItemChange?: (selectedItems: Array<TreeItemSelectedInterface>) => void;
|
|
22
24
|
registerTreeItem: (itemRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, itemRef: React.MutableRefObject<Element>) => void;
|
|
23
25
|
selectable: TreeViewSelectable;
|
|
@@ -29,5 +31,6 @@ export interface TreeViewContextInterface {
|
|
|
29
31
|
checkChildren: boolean;
|
|
30
32
|
items: TreeViewItemInterface[];
|
|
31
33
|
selectItem: (data: Pick<TreeViewItemInterface, 'itemId' | 'checkedStatus'>) => void;
|
|
34
|
+
handleExpandedChange: (event: React.SyntheticEvent, expandedItemId: string) => void;
|
|
32
35
|
}
|
|
33
36
|
export declare const TreeViewContext: React.Context<TreeViewContextInterface>;
|