@ringcentral/spring-ui 1.7.0 → 1.8.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/Alert.js +3 -3
- package/Announcement.js +1 -1
- package/Autocomplete.js +174 -236
- package/Avatar.js +27 -13
- package/BottomNavigation.js +0 -3
- package/Checkbox.js +0 -2
- package/DatePicker.js +5 -13
- package/DateUtilsContext.js +0 -1
- package/Dialer.js +2 -50
- package/Dialog.js +4 -4
- package/Dropdown.js +0 -7
- package/FocusTrap.js +0 -32
- package/InlineEditable.js +0 -4
- package/Link.js +1 -1
- package/ListItem.js +1 -1
- package/ListNavigation.js +0 -6
- package/Menu.js +1 -1
- package/MenuDivider.js +2 -2
- package/MenuFooter.js +4 -4
- package/MenuHeader.js +4 -4
- package/MenuItem.js +1 -1
- package/MenuItemText.js +1 -1
- package/PageHeader.js +6 -4
- package/Popper.js +0 -1
- package/Rating.js +0 -5
- package/SingleFilter.js +0 -1
- package/Slider.js +1 -4
- package/Snackbar.js +0 -14
- package/SortableListItem.js +0 -1
- package/SplitButton.js +1 -3
- package/StatusIndicator.js +1 -1
- package/SubMenu.js +0 -4
- package/SwipeableDrawer.js +8 -146
- package/Switch.js +1 -4
- package/Tab.js +7 -8
- package/TabContext.js +0 -5
- package/TableBody.js +1 -1
- package/TableCell.js +0 -6
- package/TableRow.js +0 -1
- package/Tabs.js +20 -118
- package/Text.js +2 -4
- package/TimePicker.js +7 -46
- package/VirtualizedList.js +2 -30
- package/chunks/Alert.js +8 -7
- package/chunks/BottomNavigationItem.js +0 -1
- package/chunks/Button.js +0 -1
- package/chunks/Chip.js +0 -5
- package/chunks/Drawer.js +1 -30
- package/chunks/ListItem.js +3 -6
- package/chunks/Menu.js +3 -3
- package/chunks/MenuDivider.js +2 -3
- package/chunks/MenuItemText.js +3 -3
- package/chunks/MenuList.js +0 -3
- package/chunks/PickerTextField.js +0 -1
- package/chunks/Popover.js +0 -5
- package/chunks/Select.js +2 -39
- package/chunks/Squircle.js +0 -7
- package/chunks/StatusIndicator.js +1 -0
- package/chunks/StepIcon.js +1 -3
- package/chunks/StepperContext.js +0 -7
- package/chunks/Tooltip.js +0 -36
- package/chunks/VirtualizedMenu.js +2 -78
- package/chunks/getFade.js +2 -0
- package/chunks/useFocusTrapStack.js +0 -8
- package/chunks/useHelperTextId.js +0 -24
- package/chunks/useListNavigation.js +2 -17
- package/chunks/useMenuItemSelect.js +6 -19
- package/chunks/useMotionSafeTransition.js +0 -4
- package/chunks/useNestedParentMenu.js +0 -2
- package/chunks/usePrefersReducedMotion.js +0 -10
- package/chunks/useTooltipForceHide.js +0 -4
- package/chunks/useTrayNavigate.js +0 -1
- package/index.css +392 -120
- package/index.js +1 -1
- package/package.json +4 -4
- package/src/Accordion/Accordion.type.d.ts +0 -21
- package/src/AccordionHeader/AccordionHeader.type.d.ts +0 -14
- package/src/Alert/Alert.type.d.ts +0 -32
- package/src/Animation/components/ExpandCollapseCaret/ExpandCollapseCaret.d.ts +0 -4
- package/src/Animation/components/ShowHideEye/ShowHideEye.d.ts +0 -4
- package/src/Animation/hooks/useMotionSafeTransition/useMotionSafeTransition.d.ts +0 -4
- package/src/Autocomplete/Autocomplete.d.ts +0 -5
- package/src/Autocomplete/Autocomplete.type.d.ts +0 -84
- package/src/Autocomplete/SuggestionList/SuggestionList.d.ts +5 -89
- package/src/Autocomplete/SuggestionList/SuggestionListItem.d.ts +0 -2
- package/src/Autocomplete/SuggestionList/utils/SuggestionListItem.d.ts +1 -13
- package/src/Autocomplete/SuggestionList/utils/useDynamicHeight.d.ts +0 -6
- package/src/Autocomplete/SuggestionList/utils/useHighlightScroll.d.ts +0 -20
- package/src/Autocomplete/SuggestionList/utils/useSuggestionList.d.ts +3 -41
- package/src/Autocomplete/SuggestionList/utils/useSuggestionListGroup.d.ts +0 -49
- package/src/Autocomplete/useAutocomplete.d.ts +1 -62
- package/src/Autocomplete/useAutocompleteTag.d.ts +0 -33
- package/src/Avatar/Avatar.type.d.ts +0 -58
- package/src/AvatarGroup/AvatarGroup.type.d.ts +0 -3
- package/src/Backdrop/Backdrop.type.d.ts +0 -4
- package/src/Badge/Badge.type.d.ts +0 -33
- package/src/Block/Block.type.d.ts +0 -24
- package/src/BlockHeader/BlockHeader.type.d.ts +0 -5
- package/src/BottomNavigation/BottomNavigation.type.d.ts +0 -34
- package/src/BottomNavigationItem/BottomNavigationItem.type.d.ts +0 -39
- package/src/Button/Button.type.d.ts +0 -30
- package/src/CallButton/CallButton.type.d.ts +0 -4
- package/src/Checkbox/Checkbox.type.d.ts +0 -17
- package/src/Chip/Chip.type.d.ts +0 -41
- package/src/CircularProgressIndicator/CircularProgressIndicator.type.d.ts +0 -19
- package/src/DatePicker/Calendar.d.ts +1 -20
- package/src/DatePicker/DatePicker.type.d.ts +0 -18
- package/src/DatePicker/DatePickerHeader.d.ts +1 -12
- package/src/DatePicker/Day.d.ts +0 -7
- package/src/DatePicker/Year.d.ts +0 -6
- package/src/DatePicker/Years.d.ts +0 -7
- package/src/Dialer/DialDelete/DialDelete.d.ts +0 -3
- package/src/Dialer/DialPad/DialPad.d.ts +0 -106
- package/src/Dialer/DialPad/utils/types.d.ts +0 -5
- package/src/Dialer/DialPad/utils/useDialKeyboard.d.ts +0 -5
- package/src/Dialer/DialPad/utils/useKeyAudio.d.ts +0 -9
- package/src/Dialer/DialPadButton/DialPadButton.d.ts +0 -14
- package/src/Dialer/DialTextField/DialTextField.d.ts +0 -23
- package/src/Dialer/DialTextField/utils/getDialPadValueOnlyRegex.d.ts +0 -3
- package/src/Dialer/DialTextField/utils/useFixedEndSelection.d.ts +0 -3
- package/src/Dialog/Dialog.type.d.ts +0 -11
- package/src/Divider/Divider.type.d.ts +0 -17
- package/src/DragHandle/DragHandle.type.d.ts +0 -4
- package/src/Drawer/Drawer.d.ts +0 -28
- package/src/Drawer/Drawer.type.d.ts +0 -84
- package/src/Dropdown/Dropdown.type.d.ts +0 -64
- package/src/EmptyState/EmptyState.type.d.ts +0 -12
- package/src/FabButton/FabButton.type.d.ts +0 -5
- package/src/FocusTrap/FocusTrap.d.ts +0 -38
- package/src/FocusTrap/useFocusTrapStack.d.ts +0 -9
- package/src/FormField/FormField.type.d.ts +0 -26
- package/src/FormField/useHelperTextId.d.ts +0 -25
- package/src/FormLabel/FormLabel.type.d.ts +0 -14
- package/src/Icon/Icon.type.d.ts +0 -15
- package/src/IconButton/IconButton.type.d.ts +0 -30
- package/src/IconButton/IconButtonLabel.type.d.ts +0 -3
- package/src/IconButtonGroup/IconButtonGroup.type.d.ts +0 -8
- package/src/InlineEditable/InlineEditable.type.d.ts +0 -75
- package/src/LinearProgressIndicator/LinearProgressIndicator.type.d.ts +0 -31
- package/src/Link/Link.classes.d.ts +1 -1
- package/src/Link/Link.type.d.ts +1 -10
- package/src/ListItem/ListItem.type.d.ts +0 -41
- package/src/ListItemText/ListItemText.type.d.ts +0 -21
- package/src/ListNavigation/useListNavigation.d.ts +0 -16
- package/src/Menu/Menu.type.d.ts +0 -10
- package/src/MenuFooter/MenuFooter.type.d.ts +0 -4
- package/src/MenuHeader/MenuHeader.type.d.ts +0 -10
- package/src/MenuItem/MenuItem.type.d.ts +0 -19
- package/src/MenuItem/MenuItemSelectContext.d.ts +0 -3
- package/src/MenuItem/useMenuItemSelect.d.ts +0 -21
- package/src/MenuItemText/MenuItemText.type.d.ts +0 -17
- package/src/MenuList/MenuList.type.d.ts +0 -4
- package/src/MenuList/MenuListContext.d.ts +0 -6
- package/src/Modal/InnerModal.type.d.ts +0 -5
- package/src/Modal/Modal.type.d.ts +0 -11
- package/src/Modal/ModalContext.d.ts +0 -4
- package/src/Option/Option.type.d.ts +0 -3
- package/src/Overlap/Overlap.type.d.ts +0 -11
- package/src/PageHeader/PageHeader.type.d.ts +0 -4
- package/src/PickerTextField/PickerTextField.type.d.ts +0 -10
- package/src/Popover/Popover.type.d.ts +0 -29
- package/src/Popper/Popper.type.d.ts +0 -61
- package/src/Radio/Radio.type.d.ts +0 -5
- package/src/RadioGroup/RadioGroup.type.d.ts +0 -4
- package/src/Rating/Rating.type.d.ts +0 -74
- package/src/Select/Select.type.d.ts +0 -84
- package/src/SingleFilter/FilterButton/FilterButton.type.d.ts +0 -16
- package/src/SingleFilter/SingleFilter.type.d.ts +0 -26
- package/src/Skeleton/Skeleton.type.d.ts +0 -1
- package/src/Skeleton/SkeletonContainer/SkeletonContainer.classes.d.ts +1 -1
- package/src/Slider/Slider.classes.d.ts +1 -5
- package/src/Slider/Slider.type.d.ts +0 -104
- package/src/Snackbar/Snackbar.type.d.ts +0 -18
- package/src/SplitButton/SplitButton.type.d.ts +0 -21
- package/src/Squircle/Squircle.type.d.ts +0 -3
- package/src/StatusIndicator/StatusIndicator.classes.d.ts +1 -1
- package/src/StatusIndicator/StatusIndicator.type.d.ts +1 -9
- package/src/Step/Step.type.d.ts +0 -29
- package/src/Step/StepContext.d.ts +0 -7
- package/src/StepButton/StepButton.type.d.ts +0 -15
- package/src/StepContent/StepContent.type.d.ts +0 -7
- package/src/StepIcon/StepIcon.type.d.ts +0 -26
- package/src/StepLabel/StepLabel.type.d.ts +0 -23
- package/src/Stepper/Stepper.type.d.ts +0 -27
- package/src/SwipeableDrawer/SwipeableDrawer.d.ts +0 -26
- package/src/SwipeableDrawer/SwipeableDrawer.types.d.ts +0 -67
- package/src/SwipeableDrawer/hooks/useDrawerGestures.d.ts +0 -110
- package/src/SwipeableDrawer/hooks/useElementSizeObserver.d.ts +0 -5
- package/src/SwipeableDrawer/hooks/useSnapPoints.d.ts +0 -60
- package/src/Switch/Switch.type.d.ts +0 -9
- package/src/Tab/Tab.classes.d.ts +3 -2
- package/src/Tab/Tab.type.d.ts +0 -29
- package/src/TabContext/TabContext.d.ts +0 -4
- package/src/TabContext/TabContext.type.d.ts +0 -7
- package/src/TabPanel/TabPanel.type.d.ts +0 -10
- package/src/Table/Table.type.d.ts +0 -19
- package/src/TableBody/TableBody.type.d.ts +0 -3
- package/src/TableCell/TableCell.d.ts +0 -4
- package/src/TableCell/TableCell.type.d.ts +0 -35
- package/src/TableContainer/TableContainer.type.d.ts +0 -7
- package/src/TableFooter/TableFooter.type.d.ts +0 -3
- package/src/TableHead/TableHead.type.d.ts +0 -6
- package/src/TablePagination/TablePagination.type.d.ts +0 -47
- package/src/TableRow/TableRow.type.d.ts +0 -17
- package/src/Tabs/TabMoreMenu.d.ts +0 -16
- package/src/Tabs/TabScrollButton.d.ts +0 -10
- package/src/Tabs/Tabs.classes.d.ts +1 -1
- package/src/Tabs/Tabs.d.ts +1 -1
- package/src/Tabs/Tabs.type.d.ts +2 -36
- package/src/Tabs/TabsContext.d.ts +2 -0
- package/src/Tabs/hooks/useTabsScroller.d.ts +0 -30
- package/src/Tag/Tag.type.d.ts +0 -12
- package/src/Text/Text.type.d.ts +0 -13
- package/src/TextField/TextField.type.d.ts +0 -64
- package/src/Textarea/Textarea.type.d.ts +0 -13
- package/src/TimePicker/NumberPicker.type.d.ts +0 -12
- package/src/TimePicker/SelectionView.d.ts +0 -6
- package/src/TimePicker/TimeButton.d.ts +0 -3
- package/src/TimePicker/TimePicker.type.d.ts +0 -11
- package/src/TimePicker/ToggleText.type.d.ts +0 -3
- package/src/TimePicker/utils/TimeBoundary.d.ts +0 -3
- package/src/TimePicker/utils/TimePickerHelper.d.ts +0 -19
- package/src/TimePicker/utils/getNumberPickerBoundary.d.ts +0 -3
- package/src/Tooltip/TooltipTrigger.a11y.d.ts +0 -9
- package/src/Tooltip/TooltipTrigger.type.d.ts +0 -44
- package/src/Tooltip/TooltipView.type.d.ts +0 -25
- package/src/Tooltip/useTooltipForceHide.d.ts +0 -4
- package/src/Tray/Tray.type.d.ts +0 -13
- package/src/Tray/TrayContext.d.ts +0 -4
- package/src/Tray/hooks/useTray.d.ts +0 -16
- package/src/Tray/hooks/useTrayPanel.d.ts +0 -3
- package/src/VirtualizedList/VirtualizedList.type.d.ts +0 -27
- package/src/VirtualizedMenu/VirtualizedMenu.type.d.ts +0 -17
|
@@ -7,108 +7,24 @@ import type { SelectMode } from '../MenuItem';
|
|
|
7
7
|
import type { SelectClassesKey } from './Select.classes';
|
|
8
8
|
export declare type SelectVariant = UnionOmit<FormFieldVariant, 'quiet'>;
|
|
9
9
|
export declare type SelectProps<T = unknown> = StandardProps<{
|
|
10
|
-
/**
|
|
11
|
-
* The variant of the Select.
|
|
12
|
-
*
|
|
13
|
-
* @default 'standard'
|
|
14
|
-
*/
|
|
15
10
|
variant?: SelectVariant;
|
|
16
|
-
/**
|
|
17
|
-
* The selection mode of the Select.
|
|
18
|
-
* @default 'single'
|
|
19
|
-
*/
|
|
20
11
|
selectMode?: SelectMode;
|
|
21
|
-
/**
|
|
22
|
-
* The default selected value(s). Use when the component is uncontrolled.
|
|
23
|
-
* - When `selectMode` is `'single'`, this should be a single value or `null`.
|
|
24
|
-
* - When `selectMode` is `'multiple'`, this should be an array (default: `[]`).
|
|
25
|
-
*/
|
|
26
12
|
defaultValue?: T;
|
|
27
|
-
/**
|
|
28
|
-
* The selected value.
|
|
29
|
-
*/
|
|
30
13
|
value?: T;
|
|
31
|
-
/**
|
|
32
|
-
* Callback fired when an option is selected.
|
|
33
|
-
*/
|
|
34
14
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>, child: React.ReactNode) => void;
|
|
35
|
-
/**
|
|
36
|
-
* Text to show when there is no selected value.
|
|
37
|
-
*/
|
|
38
15
|
placeholder?: ReactNode;
|
|
39
|
-
/**
|
|
40
|
-
* Renders the selected value. If displayEmpty is enabled, the value
|
|
41
|
-
* argument will be null.
|
|
42
|
-
*
|
|
43
|
-
* @param value The `value` provided to the component.
|
|
44
|
-
* @returns {ReactNode}
|
|
45
|
-
* @default (value) => (Array.isArray(value) ? value.join(', ') : String(value))
|
|
46
|
-
*/
|
|
47
16
|
renderValue?: (value: T) => ReactNode;
|
|
48
|
-
/**
|
|
49
|
-
* Displays a value instead of a placeholder, even if no value is selected.
|
|
50
|
-
* Make sure to return a meaningful value in the `renderValue` prop.
|
|
51
|
-
*/
|
|
52
17
|
displayEmpty?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Controls whether the Select is open. If unset, the Select will be closed
|
|
55
|
-
* by default until the user interacts to open it. By setting this property,
|
|
56
|
-
* the Select will be in controlled mode, meaning you are responsible for
|
|
57
|
-
* setting the open state using the `onOpen` and `onClose` callbacks.
|
|
58
|
-
*/
|
|
59
18
|
open?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* Controls whether the Select is open by default. If unset or `false`, the
|
|
62
|
-
* Select will be closed by default until the user interacts to open it.
|
|
63
|
-
* @default false
|
|
64
|
-
*/
|
|
65
19
|
defaultOpen?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* When enabled, the menu items will be rendered in a virtualized list.
|
|
68
|
-
* Set this prop to `true` when you have a large number of options to render.
|
|
69
|
-
*/
|
|
70
20
|
virtualize?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* The data to render when the `virtualize` prop is `true`.
|
|
73
|
-
*/
|
|
74
21
|
data?: T extends unknown[] ? T : T[];
|
|
75
|
-
/**
|
|
76
|
-
* A handler that should return the index of the selected item in the `data` array.
|
|
77
|
-
* This prop is not used when the `virtualize` prop is `false`.
|
|
78
|
-
* @default (value) => data.findIndex((v) => v === value)
|
|
79
|
-
*/
|
|
80
22
|
getSelectedIndex?: (value: T) => number;
|
|
81
|
-
/**
|
|
82
|
-
* Callback fired when the Select is opened. When in controlled mode and using
|
|
83
|
-
* the `open` prop this will be called when the user requests to open the Select,
|
|
84
|
-
* when in uncontrolled mode this will be called when the Select is opened.
|
|
85
|
-
*/
|
|
86
23
|
onOpen?: () => void;
|
|
87
|
-
/**
|
|
88
|
-
* Callback fired when the Select is closed. When in controlled mode and using
|
|
89
|
-
* the `open` prop this will be called when the user requests to close the Select,
|
|
90
|
-
* when in uncontrolled mode this will be called when the Select is closed.
|
|
91
|
-
*/
|
|
92
24
|
onClose?: () => void;
|
|
93
|
-
/**
|
|
94
|
-
*
|
|
95
|
-
* Props applied to selector.
|
|
96
|
-
*/
|
|
97
25
|
selectorProps?: ComponentProps<'div'>;
|
|
98
|
-
/**
|
|
99
|
-
* Props applied to the underlying Menu component.
|
|
100
|
-
* If `virtualize` is `true`, use the `VirtualizedMenuProps` prop instead.
|
|
101
|
-
*/
|
|
102
26
|
MenuProps?: Omit<MenuProps, 'open' | 'anchorEl' | 'onClose' | 'children'> & HTMLDataAttribute;
|
|
103
|
-
/**
|
|
104
|
-
* Props applied to the underlying VirtualizedMenu component.
|
|
105
|
-
* If `virtualize` is `false`, use the `MenuProps` prop instead.
|
|
106
|
-
*/
|
|
107
27
|
VirtualizedMenuProps?: Omit<VirtualizedMenuProps, 'open' | 'onClose' | 'children'> & HTMLDataAttribute;
|
|
108
|
-
/**
|
|
109
|
-
* Props applied to the underlying <input> element.
|
|
110
|
-
* You can pass the `name` prop directly to the Select component.
|
|
111
|
-
*/
|
|
112
28
|
inputProps?: InputHTMLAttributes<HTMLInputElement>;
|
|
113
29
|
children?: FormFieldProps['children'] | VirtualizedMenuProps['children'];
|
|
114
30
|
} & Omit<FormFieldProps, 'onChange' | 'classes' | 'variant' | 'children'> & Pick<InputHTMLAttributes<HTMLInputElement>, 'name'>, SelectClassesKey, 'div'>;
|
|
@@ -4,24 +4,8 @@ import { StandardProps } from '@ringcentral/spring-base';
|
|
|
4
4
|
import { FilterButtonClassesKey } from './FilterButton.classes';
|
|
5
5
|
export declare type FilterButtonValue = string | number;
|
|
6
6
|
export declare type FilterButtonProps = StandardProps<{
|
|
7
|
-
/**
|
|
8
|
-
* Text of filter button will be transformed to upper case
|
|
9
|
-
*/
|
|
10
7
|
children: string;
|
|
11
|
-
/**
|
|
12
|
-
* Callback fired when the button is clicked.
|
|
13
|
-
*
|
|
14
|
-
* @param {React.MouseEvent<HTMLElement>} event The event source of the callback.
|
|
15
|
-
* @param {any} value of the selected button.
|
|
16
|
-
*/
|
|
17
8
|
onClick?: (event: React.MouseEvent<HTMLElement>, value: FilterButtonValue) => void;
|
|
18
|
-
/**
|
|
19
|
-
* If `true`, the button is rendered in an active state.
|
|
20
|
-
*/
|
|
21
9
|
selected?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* The value to associate with the button when selected in Filters.
|
|
24
|
-
* Defaults to use children if not provided.
|
|
25
|
-
*/
|
|
26
10
|
value?: FilterButtonValue;
|
|
27
11
|
} & Omit<UseButtonParameters, 'href' | 'to'>, FilterButtonClassesKey, 'button'>;
|
|
@@ -7,38 +7,12 @@ export declare type FilterItemData = {
|
|
|
7
7
|
label: string;
|
|
8
8
|
} & Pick<FilterButtonProps, 'value' | 'disabled'> & HTMLDataAttribute & AriaAttributes;
|
|
9
9
|
export declare type SingleFilterProps = StandardProps<{
|
|
10
|
-
/**
|
|
11
|
-
* The default value. Use when the component is not controlled.
|
|
12
|
-
*/
|
|
13
10
|
defaultValue?: FilterButtonValue;
|
|
14
|
-
/**
|
|
15
|
-
* The value of the selected filter.
|
|
16
|
-
*/
|
|
17
11
|
value?: FilterButtonValue;
|
|
18
|
-
/**
|
|
19
|
-
* The default data of filters. Use when the component is not controlled.
|
|
20
|
-
*/
|
|
21
12
|
defaultData?: FilterItemData[];
|
|
22
|
-
/**
|
|
23
|
-
* The data of filters.
|
|
24
|
-
*/
|
|
25
13
|
data?: FilterItemData[];
|
|
26
|
-
/**
|
|
27
|
-
* Callback fired when current selected filter is changed.
|
|
28
|
-
*
|
|
29
|
-
* @param value The value of current selected filter.
|
|
30
|
-
*/
|
|
31
14
|
onSelect?: (value: FilterButtonValue) => void;
|
|
32
|
-
/**
|
|
33
|
-
* Callback fired when data of filters is changed.
|
|
34
|
-
*
|
|
35
|
-
* @param data Current data of filters.
|
|
36
|
-
*/
|
|
37
15
|
onDataChange?: (data: FilterItemData[]) => void;
|
|
38
|
-
/** The max count of visible filters
|
|
39
|
-
*
|
|
40
|
-
* @default 2
|
|
41
|
-
*/
|
|
42
16
|
visibleCount?: number;
|
|
43
17
|
MoreButtonProps?: Omit<IconButtonProps, 'variant' | 'size'> & HTMLDataAttribute;
|
|
44
18
|
}, SingleFilterClassesKey, 'div'>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { StandardProps } from '@ringcentral/spring-base';
|
|
2
2
|
import { SkeletonClassesKey } from './Skeleton.classes';
|
|
3
3
|
export declare type SkeletonProps = StandardProps<{
|
|
4
|
-
/** Sets the variant of the component. */
|
|
5
4
|
variant: 'text' | 'circular' | 'squircle' | 'rectangular';
|
|
6
5
|
}, SkeletonClassesKey, 'div'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CamelCase } from 'type-fest';
|
|
2
|
-
export declare type BaseSkeletonContainerClassesKey = '
|
|
2
|
+
export declare type BaseSkeletonContainerClassesKey = 'root';
|
|
3
3
|
export declare type SkeletonContainerClassesKey = CamelCase<BaseSkeletonContainerClassesKey>;
|
|
4
4
|
export declare type SkeletonContainerClasses = {
|
|
5
5
|
name: 'skeleton-container';
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import type { CamelCase } from 'type-fest';
|
|
2
2
|
declare type SliderOrientation = 'vertical' | 'horizontal';
|
|
3
|
-
export declare type BaseSliderClassesKey = 'root' | 'rail' | `rail-${SliderOrientation}` | 'track' | `track-${SliderOrientation}` | 'empty' | 'track-empty' | 'thumb' | `thumb-${SliderOrientation}` | 'thumb-inner' | 'marks' | `marks-${SliderOrientation}` | 'mark-container' | `mark-container-${SliderOrientation}` | 'mark' | `mark-${SliderOrientation}` | 'mark-label' | 'has-marks' | 'value-label' | 'value-label-paper'
|
|
4
|
-
/**
|
|
5
|
-
* @deprecated Kept for backward compatibility. Will be removed in a future major version.
|
|
6
|
-
*/
|
|
7
|
-
| 'show-on-hover-only' | 'show-color-at-rest' | 'neutral' | 'success' | 'warning' | 'danger' | SliderOrientation;
|
|
3
|
+
export declare type BaseSliderClassesKey = 'root' | 'rail' | `rail-${SliderOrientation}` | 'track' | `track-${SliderOrientation}` | 'empty' | 'track-empty' | 'thumb' | `thumb-${SliderOrientation}` | 'thumb-inner' | 'marks' | `marks-${SliderOrientation}` | 'mark-container' | `mark-container-${SliderOrientation}` | 'mark' | `mark-${SliderOrientation}` | 'mark-label' | 'has-marks' | 'value-label' | 'value-label-paper' | 'show-on-hover-only' | 'show-color-at-rest' | 'neutral' | 'success' | 'warning' | 'danger' | SliderOrientation;
|
|
8
4
|
export declare type SliderClassesKey = CamelCase<BaseSliderClassesKey>;
|
|
9
5
|
export declare type SliderClasses = {
|
|
10
6
|
name: 'slider';
|
|
@@ -5,133 +5,29 @@ import { TooltipProps } from '../Tooltip';
|
|
|
5
5
|
import { SliderClassesKey } from './Slider.classes';
|
|
6
6
|
declare type SliderColor = 'neutral' | 'success' | 'warning' | 'danger';
|
|
7
7
|
export declare type SliderProps<V extends number | number[] = number> = StandardProps<{
|
|
8
|
-
/**
|
|
9
|
-
* The label of the slider.
|
|
10
|
-
*/
|
|
11
8
|
'aria-label'?: string;
|
|
12
|
-
/**
|
|
13
|
-
* The id of the label for the slider.
|
|
14
|
-
*/
|
|
15
9
|
'aria-labelledby'?: string;
|
|
16
|
-
/**
|
|
17
|
-
* A string value that provides a user-friendly name for the current value of the slider.
|
|
18
|
-
*/
|
|
19
10
|
'aria-valuetext'?: string;
|
|
20
|
-
/**
|
|
21
|
-
* The default value. Use when the component is not controlled.
|
|
22
|
-
*/
|
|
23
11
|
defaultValue?: V;
|
|
24
|
-
/**
|
|
25
|
-
* If `true`, the component is disabled.
|
|
26
|
-
* @default false
|
|
27
|
-
*/
|
|
28
12
|
disabled?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider.
|
|
31
|
-
* This is important for screen reader users.
|
|
32
|
-
* @param {number} value The thumb label's value to format.
|
|
33
|
-
* @returns {string}
|
|
34
|
-
*/
|
|
35
13
|
getAriaValueText?: (value: number) => string;
|
|
36
|
-
/**
|
|
37
|
-
* The maximum allowed value of the slider.
|
|
38
|
-
* Should not be equal to min.
|
|
39
|
-
* @default 100
|
|
40
|
-
*/
|
|
41
14
|
max?: number;
|
|
42
|
-
/**
|
|
43
|
-
* The minimum allowed value of the slider.
|
|
44
|
-
* Should not be equal to max.
|
|
45
|
-
* @default 0
|
|
46
|
-
*/
|
|
47
15
|
min?: number;
|
|
48
|
-
/**
|
|
49
|
-
* Name attribute of the hidden `input` element.
|
|
50
|
-
*/
|
|
51
16
|
name?: string;
|
|
52
|
-
/**
|
|
53
|
-
* The color of the slider.
|
|
54
|
-
* @default neutral
|
|
55
|
-
*/
|
|
56
17
|
color?: SliderColor;
|
|
57
|
-
/**
|
|
58
|
-
* Controls whether step marks will be displayed underneath the Slider.
|
|
59
|
-
* If a boolean is passed the labels rendered for the step marks will be the numerical value of the step.
|
|
60
|
-
* If an array of Mark is passed, the label rendered will be the label from each item of the array.
|
|
61
|
-
* @default false
|
|
62
|
-
*/
|
|
63
18
|
marks?: boolean | (Omit<Mark, 'label'> & {
|
|
64
19
|
label: string;
|
|
65
20
|
})[];
|
|
66
|
-
/**
|
|
67
|
-
* Controls whether the semantic colors based on the `color` prop are shown on the track and thumb in the Slider's resting state or only when hovered.
|
|
68
|
-
* If `true`, the track and thumb will display their semantic color in the Slider's resting state.
|
|
69
|
-
* If `false`, the track and thumb will use their default neutral colors when the Slider isn't hovered, and will be filled with their semantic colors when the Slider is hovered.
|
|
70
|
-
* @default false
|
|
71
|
-
*/
|
|
72
21
|
showColorAtRest?: boolean;
|
|
73
|
-
/**
|
|
74
|
-
* Controls how the value label is displayed.
|
|
75
|
-
* If `auto`, the value label will only display when the Slider is being hovered or focused.
|
|
76
|
-
* If `on`, the value label will display persistently.
|
|
77
|
-
* If `off`, the value label will not display.
|
|
78
|
-
* You can pass a function that returns a string to customize the value label via the `valueLabelFormat` prop.
|
|
79
|
-
* @default off
|
|
80
|
-
*/
|
|
81
22
|
valueLabelDisplay?: 'on' | 'off' | 'auto';
|
|
82
|
-
/**
|
|
83
|
-
* Either a string to statically set the value label or a callback function to customize how the value label is formatted.
|
|
84
|
-
* Make sure to set the `valueLabelDisplay` prop to `on` or `auto`.
|
|
85
|
-
* @default (value) => value
|
|
86
|
-
*/
|
|
87
23
|
valueLabelFormat?: string | ((value: number) => string);
|
|
88
|
-
/**
|
|
89
|
-
* Props applied to Tooltip component used to display the value label.
|
|
90
|
-
*/
|
|
91
24
|
valueLabelTooltipProps?: Omit<TooltipProps, 'children' | 'open' | 'title'>;
|
|
92
|
-
/**
|
|
93
|
-
* Callback function that is fired when the slider's value changed.
|
|
94
|
-
*
|
|
95
|
-
* @param {Event} event The event source of the callback.
|
|
96
|
-
* You can pull out the new value by accessing `event.target.value` (any).
|
|
97
|
-
* **Warning**: This is a generic event not a change event.
|
|
98
|
-
* @param {number | number[]} value The new value.
|
|
99
|
-
* @param {number} activeThumb The index of the thumb currently being moved.
|
|
100
|
-
*/
|
|
101
25
|
onChange?: (event: Event, value: V, activeThumb: number) => void;
|
|
102
|
-
/**
|
|
103
|
-
* Callback function that is fired when the `mouseup` is triggered.
|
|
104
|
-
*
|
|
105
|
-
* @param {React.SyntheticEvent | Event} event The event source of the callback. **Warning**: This is a generic event not a change event.
|
|
106
|
-
* @param {number | number[]} value The new value.
|
|
107
|
-
*/
|
|
108
26
|
onChangeCommitted?: (event: React.SyntheticEvent | Event, value: V) => void;
|
|
109
|
-
/**
|
|
110
|
-
* A transformation function, to change the scale of the slider.
|
|
111
|
-
* Works on aria-valuenow, aria-valuemax, aria-valuemin of input and the value for getAriaValueText
|
|
112
|
-
* @default (value) => value
|
|
113
|
-
*/
|
|
114
27
|
scale?: (value: number) => number;
|
|
115
|
-
/**
|
|
116
|
-
* The granularity with which the slider can step through values. (A "discrete" slider.)
|
|
117
|
-
* The `min` prop serves as the origin for the valid values.
|
|
118
|
-
* We recommend (max - min) to be evenly divisible by the step.
|
|
119
|
-
* @default 1
|
|
120
|
-
*/
|
|
121
28
|
step?: number;
|
|
122
|
-
/**
|
|
123
|
-
* Tab index attribute of the hidden `input` element.
|
|
124
|
-
*/
|
|
125
29
|
tabIndex?: number;
|
|
126
|
-
/**
|
|
127
|
-
* The value of the slider.
|
|
128
|
-
* For range sliders, provide an array with multiple values.
|
|
129
|
-
*/
|
|
130
30
|
value?: V;
|
|
131
|
-
/**
|
|
132
|
-
* The orientation of the slider.
|
|
133
|
-
* @default horizontal
|
|
134
|
-
*/
|
|
135
31
|
orientation?: 'vertical' | 'horizontal';
|
|
136
32
|
} & Pick<UseSliderParameters, 'shiftStep' | 'disableSwap'>, SliderClassesKey, 'span'>;
|
|
137
33
|
export {};
|
|
@@ -3,25 +3,7 @@ import { StandardProps } from '@ringcentral/spring-base';
|
|
|
3
3
|
import { SnackbarContentProps } from './SnackbarContent';
|
|
4
4
|
import { SnackbarClassesKey } from './Snackbar.classes';
|
|
5
5
|
export declare type SnackbarProps = StandardProps<{
|
|
6
|
-
/**
|
|
7
|
-
* To control whether to display the snackbar. It can be toggled when receive the close event.
|
|
8
|
-
*
|
|
9
|
-
* @default true
|
|
10
|
-
*/
|
|
11
6
|
open?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* The number of milliseconds to wait before automatically calling the
|
|
14
|
-
* `onClose` function. `onClose` should then set the state of the `open`
|
|
15
|
-
* prop to hide the Snackbar. This behavior is disabled when it is `null`.
|
|
16
|
-
*
|
|
17
|
-
* The close button is not shown when a snackbar is set to hide automatically.
|
|
18
|
-
* @default 5000
|
|
19
|
-
*/
|
|
20
7
|
autoHideDuration?: number | null;
|
|
21
|
-
/**
|
|
22
|
-
* is show closeButton or not,
|
|
23
|
-
*
|
|
24
|
-
* default will base on `onClose` be set or not
|
|
25
|
-
*/
|
|
26
8
|
closeButton?: boolean;
|
|
27
9
|
} & Pick<PortalProps, 'disablePortal'> & SnackbarContentProps, SnackbarClassesKey, 'div'>;
|
|
@@ -4,33 +4,12 @@ import { ReactElement } from 'react';
|
|
|
4
4
|
import { WithTooltipProps } from '../Tooltip/withTooltip';
|
|
5
5
|
import { SplitButtonClassesKey } from './SplitButton.classes';
|
|
6
6
|
export declare type SplitButtonProps = StandardProps<WithTooltipProps<{
|
|
7
|
-
/**
|
|
8
|
-
* Props applied to the Button component used to trigger the selected action
|
|
9
|
-
* of the SplitButton. See the `children` prop for how the content of the
|
|
10
|
-
* action button is set.
|
|
11
|
-
*/
|
|
12
7
|
ActionButtonProps?: ButtonProps & {
|
|
13
8
|
title?: string;
|
|
14
9
|
contentType?: 'text' | 'icon';
|
|
15
10
|
};
|
|
16
|
-
/**
|
|
17
|
-
* Props applied to the Menu component.
|
|
18
|
-
*/
|
|
19
11
|
MenuProps?: MenuProps;
|
|
20
|
-
/**
|
|
21
|
-
* Props applied to the IconButton component used to
|
|
22
|
-
* display the dropdown menu of the SplitButton.
|
|
23
|
-
*/
|
|
24
12
|
MenuButtonProps?: IconButtonProps;
|
|
25
|
-
/**
|
|
26
|
-
* The MenuItems to render. The first MenuItem will not be displayed in the
|
|
27
|
-
* Menu and will instead be used as the action button. If an Icon component
|
|
28
|
-
* is passed as children it will automatically have its size set based on the
|
|
29
|
-
* size of the button. If the passed children is not an Icon, the `title` prop
|
|
30
|
-
* will be used as the text of the action button if `ActionButtonProps.title`
|
|
31
|
-
* is not provided. The `onClick` prop of the MenuItem will be called when
|
|
32
|
-
* the action button is clicked.
|
|
33
|
-
*/
|
|
34
13
|
children: ReactElement<typeof MenuItem> | ReactElement<typeof MenuItem>[];
|
|
35
14
|
} & Pick<ButtonProps, 'size' | 'variant' | 'loading' | 'disabled' | 'background'> & {
|
|
36
15
|
color: Exclude<ButtonColor, 'danger'>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CamelCase } from 'type-fest';
|
|
2
|
-
export declare type BaseStatusIndicatorClassesKey = 'root' | 'large' | 'medium' | 'dnd' | 'busy' | 'available' | 'unavailable';
|
|
2
|
+
export declare type BaseStatusIndicatorClassesKey = 'root' | 'large' | 'small' | 'medium' | 'dnd' | 'busy' | 'available' | 'unavailable';
|
|
3
3
|
export declare type StatusIndicatorClassesKey = CamelCase<BaseStatusIndicatorClassesKey>;
|
|
4
4
|
export declare type StatusIndicatorClasses = {
|
|
5
5
|
name: 'status-indicator';
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { StandardProps } from '@ringcentral/spring-base';
|
|
2
2
|
import { StatusIndicatorClassesKey } from './StatusIndicator.classes';
|
|
3
3
|
export declare type StatusIndicatorProps = StandardProps<{
|
|
4
|
-
|
|
5
|
-
* The size of the component.
|
|
6
|
-
* @default 'medium'
|
|
7
|
-
*/
|
|
8
|
-
size?: 'medium' | 'large';
|
|
9
|
-
/**
|
|
10
|
-
* The variant of the component.
|
|
11
|
-
* @default 'available'
|
|
12
|
-
*/
|
|
4
|
+
size?: 'small' | 'medium' | 'large';
|
|
13
5
|
variant?: 'dnd' | 'busy' | 'available' | 'unavailable';
|
|
14
6
|
}, StatusIndicatorClassesKey, 'div'>;
|
package/src/Step/Step.type.d.ts
CHANGED
|
@@ -4,42 +4,13 @@ import { StepClassesKey } from './Step.classes';
|
|
|
4
4
|
declare type DefaultElementType = 'li';
|
|
5
5
|
declare type ExtendElementType = ElementType;
|
|
6
6
|
declare type BaseStepProps = WithClassesProps<{
|
|
7
|
-
/**
|
|
8
|
-
* Sets the step as active. Is passed to child components.
|
|
9
|
-
*/
|
|
10
7
|
active?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* Should be `Step` sub-components such as `StepLabel`, `StepContent`.
|
|
13
|
-
*/
|
|
14
8
|
children?: React.ReactNode;
|
|
15
|
-
/**
|
|
16
|
-
* Mark the step as completed. Is passed to child components.
|
|
17
|
-
*/
|
|
18
9
|
completed?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* If `true`, the step is disabled, will also disable the button if
|
|
21
|
-
* `StepButton` is a child of `Step`. Is passed to child components.
|
|
22
|
-
*/
|
|
23
10
|
disabled?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Expand the step.
|
|
26
|
-
* @default false
|
|
27
|
-
*/
|
|
28
11
|
expanded?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* The position of the step.
|
|
31
|
-
* The prop defaults to the value inherited from the parent Stepper component.
|
|
32
|
-
*/
|
|
33
12
|
index?: number;
|
|
34
|
-
/**
|
|
35
|
-
* If `true`, the Step is displayed as rendered last.
|
|
36
|
-
* The prop defaults to the value inherited from the parent Stepper component.
|
|
37
|
-
*/
|
|
38
13
|
last?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* The variant to use.
|
|
41
|
-
* @default 'contained'
|
|
42
|
-
*/
|
|
43
14
|
variant?: 'contained' | 'outlined';
|
|
44
15
|
}, StepClassesKey>;
|
|
45
16
|
export declare type StepProps<T extends ExtendElementType = DefaultElementType> = OverridableProps<BaseStepProps, T>;
|
|
@@ -11,12 +11,5 @@ export declare type StepContextValue = {
|
|
|
11
11
|
id?: string;
|
|
12
12
|
connector?: React.ReactNode;
|
|
13
13
|
};
|
|
14
|
-
/**
|
|
15
|
-
* Provides information about the current step in Stepper.
|
|
16
|
-
*/
|
|
17
14
|
export declare const StepContext: import("react").Context<StepContextValue>;
|
|
18
|
-
/**
|
|
19
|
-
* Returns the current StepContext or an empty object if no StepContext
|
|
20
|
-
* has been defined in the component tree.
|
|
21
|
-
*/
|
|
22
15
|
export declare const useStepContext: () => StepContextValue;
|
|
@@ -5,25 +5,10 @@ import { StepButtonClassesKey } from './StepButton.classes';
|
|
|
5
5
|
declare type DefaultElementType = 'button';
|
|
6
6
|
declare type ExtendElementType = ElementType;
|
|
7
7
|
declare type BaseStepButtonProps = WithClassesProps<{
|
|
8
|
-
/**
|
|
9
|
-
* Can be a `StepLabel` or a node to place inside `StepLabel` as children.
|
|
10
|
-
*/
|
|
11
8
|
children?: React.ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* Override the default label of the step icon in the step label.
|
|
14
|
-
*/
|
|
15
9
|
icon?: React.ReactNode;
|
|
16
|
-
/**
|
|
17
|
-
* The symbol displayed in the step icon.
|
|
18
|
-
*/
|
|
19
10
|
symbol?: ComponentType;
|
|
20
|
-
/**
|
|
21
|
-
* The optional node to display.
|
|
22
|
-
*/
|
|
23
11
|
optional?: React.ReactNode;
|
|
24
|
-
/**
|
|
25
|
-
* Props applied to the underlying StepLabel component.
|
|
26
|
-
*/
|
|
27
12
|
StepLabelProps?: StepLabelProps;
|
|
28
13
|
}, StepButtonClassesKey>;
|
|
29
14
|
export declare type StepButtonProps<T extends ExtendElementType = DefaultElementType> = OverridableProps<BaseStepButtonProps, T>;
|
|
@@ -2,13 +2,6 @@
|
|
|
2
2
|
import { StandardProps } from '@ringcentral/spring-base';
|
|
3
3
|
import { StepContentClassesKey } from './StepContent.classes';
|
|
4
4
|
export declare type StepContentProps = StandardProps<{
|
|
5
|
-
/**
|
|
6
|
-
* The content of the component.
|
|
7
|
-
*/
|
|
8
5
|
children?: React.ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* false: will unmount content whenever collapsed
|
|
11
|
-
* true: keep displayed children mounted when collapsed
|
|
12
|
-
*/
|
|
13
6
|
keepMounted?: boolean;
|
|
14
7
|
}, StepContentClassesKey, 'div'>;
|
|
@@ -2,37 +2,11 @@ import { StandardProps } from '@ringcentral/spring-base';
|
|
|
2
2
|
import { ComponentType } from 'react';
|
|
3
3
|
import { StepIconClassesKey } from './StepIcon.classes';
|
|
4
4
|
export declare type StepIconProps = StandardProps<{
|
|
5
|
-
/**
|
|
6
|
-
* Whether this step is active.
|
|
7
|
-
* @default false
|
|
8
|
-
*/
|
|
9
5
|
active?: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Mark the step as completed. Is passed to child components.
|
|
12
|
-
* @default false
|
|
13
|
-
*/
|
|
14
6
|
completed?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* If `true`, the step is marked as failed.
|
|
17
|
-
* @default false
|
|
18
|
-
*/
|
|
19
7
|
error?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* If `true`, the step is displayed as disabled.
|
|
22
|
-
* @default false
|
|
23
|
-
*/
|
|
24
8
|
disabled?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* The label displayed in the step icon.
|
|
27
|
-
*/
|
|
28
9
|
icon: React.ReactNode;
|
|
29
|
-
/**
|
|
30
|
-
* The symbol displayed in the step icon.
|
|
31
|
-
*/
|
|
32
10
|
symbol?: ComponentType;
|
|
33
|
-
/**
|
|
34
|
-
* The variant to use.
|
|
35
|
-
* @default 'contained'
|
|
36
|
-
*/
|
|
37
11
|
variant?: 'contained' | 'outlined';
|
|
38
12
|
}, StepIconClassesKey, 'span'>;
|
|
@@ -3,34 +3,11 @@ import { StandardProps } from '@ringcentral/spring-base';
|
|
|
3
3
|
import { StepIconProps } from '../StepIcon';
|
|
4
4
|
import { StepLabelClassesKey } from './StepLabel.classes';
|
|
5
5
|
export declare type StepLabelProps = StandardProps<{
|
|
6
|
-
/**
|
|
7
|
-
* In most cases will simply be a string containing a title for the label.
|
|
8
|
-
*/
|
|
9
6
|
children?: React.ReactNode;
|
|
10
|
-
/**
|
|
11
|
-
* If `true`, the step is marked as failed.
|
|
12
|
-
* @default false
|
|
13
|
-
*/
|
|
14
7
|
error?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Override the default label of the step icon.
|
|
17
|
-
*/
|
|
18
8
|
icon?: React.ReactNode;
|
|
19
|
-
/**
|
|
20
|
-
* The optional node to display.
|
|
21
|
-
*/
|
|
22
9
|
optional?: React.ReactNode;
|
|
23
|
-
/**
|
|
24
|
-
* Props applied to the label element.
|
|
25
|
-
* @default {}
|
|
26
|
-
*/
|
|
27
10
|
labelProps?: React.HTMLProps<HTMLSpanElement>;
|
|
28
|
-
/**
|
|
29
|
-
* The component to render in place of the `StepIcon`
|
|
30
|
-
*/
|
|
31
11
|
StepIconComponent?: React.ElementType<StepIconProps>;
|
|
32
|
-
/**
|
|
33
|
-
* Props applied to the `StepIcon` element.
|
|
34
|
-
*/
|
|
35
12
|
StepIconProps?: Partial<StepIconProps>;
|
|
36
13
|
}, StepLabelClassesKey, 'span'>;
|
|
@@ -5,38 +5,11 @@ export declare type StepperOrientation = 'horizontal' | 'vertical';
|
|
|
5
5
|
declare type DefaultElementType = 'ol';
|
|
6
6
|
declare type ExtendElementType = ElementType;
|
|
7
7
|
declare type BaseStepperProps = WithClassesProps<{
|
|
8
|
-
/**
|
|
9
|
-
* Set the active step (zero based index).
|
|
10
|
-
* Set to -1 to disable all the steps.
|
|
11
|
-
* @default 0
|
|
12
|
-
*/
|
|
13
8
|
activeStep?: number;
|
|
14
|
-
/**
|
|
15
|
-
* Two or more `<Step />` components.
|
|
16
|
-
*/
|
|
17
9
|
children?: React.ReactNode;
|
|
18
|
-
/**
|
|
19
|
-
* An element to be placed between each step.
|
|
20
|
-
* @default <StepConnector />
|
|
21
|
-
*/
|
|
22
10
|
connector?: React.ReactElement<any, any> | null;
|
|
23
|
-
/**
|
|
24
|
-
* If set the `Stepper` will not assist in controlling steps for linear flow.
|
|
25
|
-
* Root component will be a `ul` element if set to `true` and `ol` if `false`.
|
|
26
|
-
* @default false
|
|
27
|
-
*/
|
|
28
11
|
nonLinear?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* The component orientation (layout flow direction).
|
|
31
|
-
* @default 'horizontal'
|
|
32
|
-
*/
|
|
33
12
|
orientation?: StepperOrientation;
|
|
34
|
-
/**
|
|
35
|
-
* If set to true, each Step will have the same width, collectively taking up the full width of the container.
|
|
36
|
-
* If set to false, each Step will have its own width based on its content, with even gaps between each Step.
|
|
37
|
-
* Only works when `orientation` is 'horizontal'.
|
|
38
|
-
* @default true
|
|
39
|
-
*/
|
|
40
13
|
fixedStepWidth?: boolean;
|
|
41
14
|
}, StepperClassesKey>;
|
|
42
15
|
export declare type StepperProps<T extends ExtendElementType = DefaultElementType> = OverridableProps<BaseStepperProps, T>;
|