react-magma-dom 4.7.0-next.2 → 4.7.0-next.20
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/index.d.ts +4 -0
- package/dist/components/Dropdown/Dropdown.d.ts +8 -0
- package/dist/components/InputBase/index.d.ts +13 -4
- package/dist/components/List/ListItem.d.ts +3 -3
- 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 +2 -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/TreeView/useTreeView.d.ts +1 -1
- package/dist/components/TreeView/utils.d.ts +3 -0
- package/dist/esm/index.js +2981 -486
- package/dist/esm/index.js.map +1 -1
- package/dist/i18n/interface.d.ts +3 -0
- package/dist/index.d.ts +2 -1
- package/dist/properties.json +232 -112
- package/dist/react-magma-dom.cjs.development.js +724 -339
- 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 +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
1
|
import React from 'react';
|
|
2
2
|
import { SelectComponents } from '../Select/components';
|
|
3
|
-
import {
|
|
3
|
+
import { UseComboboxGetComboboxPropsOptions, UseComboboxGetInputPropsOptions, UseComboboxGetToggleButtonPropsOptions } from 'downshift';
|
|
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
|
/**
|
|
@@ -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",
|
|
@@ -25,6 +26,10 @@ export interface DropdownProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
25
26
|
* @default DropdownDropDirection.down
|
|
26
27
|
*/
|
|
27
28
|
dropDirection?: DropdownDropDirection;
|
|
29
|
+
/**
|
|
30
|
+
* If true, the component will have inverse styling to better appear on a dark background
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
28
33
|
isInverse?: boolean;
|
|
29
34
|
/**
|
|
30
35
|
* Max-height of dropdown content
|
|
@@ -55,6 +60,7 @@ interface DropdownContextInterface {
|
|
|
55
60
|
closeDropdown?: (event: React.SyntheticEvent | React.KeyboardEvent) => void;
|
|
56
61
|
dropdownButtonId?: React.MutableRefObject<string>;
|
|
57
62
|
dropDirection?: DropdownDropDirection;
|
|
63
|
+
floatingStyles?: React.CSSProperties;
|
|
58
64
|
handleDropdownBlur?: (event: React.FocusEvent) => void;
|
|
59
65
|
itemRefArray?: React.MutableRefObject<React.MutableRefObject<Element>[]>;
|
|
60
66
|
isFixedWidth?: boolean;
|
|
@@ -66,6 +72,8 @@ interface DropdownContextInterface {
|
|
|
66
72
|
registerDropdownMenuItem: (itemRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, itemRef: React.MutableRefObject<Element>) => void;
|
|
67
73
|
setActiveItemIndex?: React.Dispatch<React.SetStateAction<number>>;
|
|
68
74
|
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
75
|
+
setFloating?: (node: ReferenceType) => void;
|
|
76
|
+
setReference?: (node: ReferenceType) => void;
|
|
69
77
|
toggleRef?: any;
|
|
70
78
|
width?: string;
|
|
71
79
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IconProps } from 'react-magma-icons';
|
|
3
3
|
import { ThemeInterface } from '../../theme/magma';
|
|
4
|
+
import { ReferenceType } from '@floating-ui/react-dom/dist/floating-ui.react-dom';
|
|
4
5
|
export declare enum InputSize {
|
|
5
6
|
large = "large",
|
|
6
7
|
medium = "medium"
|
|
@@ -81,7 +82,15 @@ export interface InputBaseProps extends React.InputHTMLAttributes<HTMLInputEleme
|
|
|
81
82
|
* Function to be called when the contents of input are cleared by clicking a clear button
|
|
82
83
|
*/
|
|
83
84
|
onClear?: () => void;
|
|
85
|
+
/**
|
|
86
|
+
* If true, the component will have inverse styling to better appear on a dark background
|
|
87
|
+
* @default false
|
|
88
|
+
*/
|
|
84
89
|
isInverse?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Boolean for whether this is a Password Input or not
|
|
92
|
+
*/
|
|
93
|
+
isPasswordInput?: boolean;
|
|
85
94
|
/**
|
|
86
95
|
* For use in predictive search which moves the icon to the left
|
|
87
96
|
*/
|
|
@@ -107,6 +116,10 @@ export interface InputBaseProps extends React.InputHTMLAttributes<HTMLInputEleme
|
|
|
107
116
|
* Action that will synchronize chosenDate with input value
|
|
108
117
|
*/
|
|
109
118
|
onDateChange?: (event: any) => void;
|
|
119
|
+
/**
|
|
120
|
+
* @internal
|
|
121
|
+
*/
|
|
122
|
+
setReference?: (node: ReferenceType) => void;
|
|
110
123
|
/**
|
|
111
124
|
* @internal
|
|
112
125
|
*/
|
|
@@ -120,10 +133,6 @@ export interface InputBaseProps extends React.InputHTMLAttributes<HTMLInputEleme
|
|
|
120
133
|
* @default InputType.text
|
|
121
134
|
*/
|
|
122
135
|
type?: InputType;
|
|
123
|
-
/**
|
|
124
|
-
* Boolean for whether this is a Password Input or not
|
|
125
|
-
*/
|
|
126
|
-
isPasswordInput?: boolean;
|
|
127
136
|
/**
|
|
128
137
|
* String to determine width of input, must be suffixed with "px", "rem", or "%""
|
|
129
138
|
* @default "auto"
|
|
@@ -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,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
|
|
@@ -10,6 +10,8 @@ export declare const StyledButton: import("@emotion/styled").StyledComponent<{
|
|
|
10
10
|
export declare const SelectText: import("@emotion/styled").StyledComponent<{
|
|
11
11
|
theme?: import("@emotion/react").Theme;
|
|
12
12
|
as?: import("react").ElementType<any>;
|
|
13
|
+
} & {
|
|
14
|
+
isClearable?: boolean;
|
|
13
15
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
14
16
|
export declare const StyledCard: import("@emotion/styled").StyledComponent<import("../Card").CardProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
15
17
|
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>>;
|
|
@@ -81,7 +81,7 @@ export declare function useTreeView(props: UseTreeViewProps): {
|
|
|
81
81
|
onExpandedChange: (event: React.SyntheticEvent<Element, Event>) => void;
|
|
82
82
|
selectable: TreeViewSelectable;
|
|
83
83
|
selectedItems: any;
|
|
84
|
-
initialExpandedItems:
|
|
84
|
+
initialExpandedItems: any[];
|
|
85
85
|
treeItemRefArray: React.MutableRefObject<React.MutableRefObject<Element>[]>;
|
|
86
86
|
registerTreeItem: (refArray: React.MutableRefObject<React.MutableRefObject<Element>[]>, ref: React.MutableRefObject<Element>) => void;
|
|
87
87
|
initialExpandedItemsNeedUpdate: boolean;
|
|
@@ -48,3 +48,6 @@ export declare const selectMulti: ({ items, itemId, checkedStatus, checkChildren
|
|
|
48
48
|
itemId: TreeViewItemInterface['itemId'];
|
|
49
49
|
checkedStatus: TreeViewItemInterface['checkedStatus'];
|
|
50
50
|
} & Pick<UseTreeViewProps, "checkParents" | "checkChildren">) => any;
|
|
51
|
+
export declare const getInitialExpandedIds: ({ items, initialExpandedItems }: {
|
|
52
|
+
items: TreeViewItemInterface[];
|
|
53
|
+
} & Pick<UseTreeViewProps, "initialExpandedItems">) => any[];
|