@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
|
@@ -2,106 +2,22 @@ import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
|
2
2
|
import { GroupedMotionProps, HTMLDataAttribute, StandardProps } from '@ringcentral/spring-base';
|
|
3
3
|
import { Modal, ModalCloseReason } from '../Modal';
|
|
4
4
|
import { DrawerClassesKey } from './Drawer.classes';
|
|
5
|
-
/**
|
|
6
|
-
* @fileoverview Drawer component types and interfaces
|
|
7
|
-
*
|
|
8
|
-
* **Note**: All types are compatible with both `Drawer` and `SwipeableDrawer` components.
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Side from which the drawer will slide in and anchor to.
|
|
12
|
-
*/
|
|
13
5
|
export declare type DrawerAnchor = 'bottom' | 'left' | 'right' | 'top';
|
|
14
|
-
/**
|
|
15
|
-
* Drawer behavior variant.
|
|
16
|
-
*
|
|
17
|
-
* - **'temporary'**: Drawer overlays content with backdrop, closes on outside click
|
|
18
|
-
*/
|
|
19
6
|
export declare type DrawerVariant = 'temporary';
|
|
20
7
|
export declare type DrawerCloseReason = ModalCloseReason;
|
|
21
8
|
export declare type DrawerProps = StandardProps<{
|
|
22
|
-
/**
|
|
23
|
-
* Side from which the drawer will slide in and anchor to.
|
|
24
|
-
|
|
25
|
-
* @default 'left'
|
|
26
|
-
*/
|
|
27
9
|
anchor?: DrawerAnchor;
|
|
28
|
-
/**
|
|
29
|
-
* Controls whether the drawer is open or closed.
|
|
30
|
-
*/
|
|
31
10
|
open: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Main content of the drawer. This is the scrollable area between header and footer.
|
|
34
|
-
*/
|
|
35
11
|
children?: ReactNode;
|
|
36
|
-
/**
|
|
37
|
-
* Header content displayed at the top of the drawer.
|
|
38
|
-
*
|
|
39
|
-
* **Important**: With SwipeableDrawer, the header becomes the drag handle.
|
|
40
|
-
*
|
|
41
|
-
* @default undefined
|
|
42
|
-
*/
|
|
43
12
|
header?: ReactNode;
|
|
44
|
-
/**
|
|
45
|
-
* Footer content displayed at the bottom of the drawer.
|
|
46
|
-
*
|
|
47
|
-
* @default undefined
|
|
48
|
-
*/
|
|
49
13
|
footer?: ReactNode;
|
|
50
|
-
/**
|
|
51
|
-
* Props passed to the main drawer body container.
|
|
52
|
-
*/
|
|
53
14
|
bodyProps?: GroupedMotionProps<ComponentPropsWithRef<'div'> & HTMLDataAttribute>;
|
|
54
|
-
/**
|
|
55
|
-
* Drawer behavior variant.
|
|
56
|
-
*
|
|
57
|
-
* - **'temporary'**: Overlays content, closes on backdrop click, traps focus
|
|
58
|
-
*
|
|
59
|
-
* @default 'temporary'
|
|
60
|
-
*/
|
|
61
15
|
variant?: DrawerVariant;
|
|
62
|
-
/**
|
|
63
|
-
* Controls whether the drawer blocks interaction with the rest of the page.
|
|
64
|
-
*
|
|
65
|
-
* **When true (default)**:
|
|
66
|
-
* - Focus is trapped inside drawer
|
|
67
|
-
* - Page scrolling is disabled
|
|
68
|
-
* - Backdrop clicks close drawer
|
|
69
|
-
* - ESC key closes drawer
|
|
70
|
-
* - Screen readers announce modal
|
|
71
|
-
*
|
|
72
|
-
* **When false**:
|
|
73
|
-
* - Users can interact with page content
|
|
74
|
-
* - No focus trapping
|
|
75
|
-
* - No scroll locking
|
|
76
|
-
*
|
|
77
|
-
* @default true
|
|
78
|
-
*/
|
|
79
16
|
blocking?: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Internal measurement refs used by SwipeableDrawer.
|
|
82
|
-
*
|
|
83
|
-
* @internal
|
|
84
|
-
*/
|
|
85
17
|
measurementRefs?: {
|
|
86
|
-
/**
|
|
87
|
-
* ref for the header element for measurements.
|
|
88
|
-
*/
|
|
89
18
|
header?: React.RefObject<HTMLDivElement>;
|
|
90
|
-
/**
|
|
91
|
-
* ref for the footer element for measurements.
|
|
92
|
-
*/
|
|
93
19
|
footer?: React.RefObject<HTMLDivElement>;
|
|
94
|
-
/**
|
|
95
|
-
* ref for the content element for gesture measurements.
|
|
96
|
-
* Points specifically to the content area for precise content height measurement.
|
|
97
|
-
* The gesture system needs to measure content height separately.
|
|
98
|
-
*/
|
|
99
20
|
content?: React.RefObject<HTMLDivElement>;
|
|
100
21
|
};
|
|
101
|
-
/**
|
|
102
|
-
* Additional props to apply to the header element for gesture binding.
|
|
103
|
-
*
|
|
104
|
-
* @internal
|
|
105
|
-
*/
|
|
106
22
|
headerProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
107
23
|
}, DrawerClassesKey, typeof Modal>;
|
|
@@ -4,90 +4,26 @@ import { VirtualizedMenuProps } from '../VirtualizedMenu';
|
|
|
4
4
|
import { MenuProps } from '../Menu';
|
|
5
5
|
import { DropdownClassesKey } from './Dropdown.classes';
|
|
6
6
|
export declare type DropdownProps<T = string, D = unknown> = StandardProps<{
|
|
7
|
-
/**
|
|
8
|
-
* The default selected value. Use when the component is uncontrolled.
|
|
9
|
-
*/
|
|
10
7
|
defaultValue?: T | null;
|
|
11
|
-
/**
|
|
12
|
-
* The selected value.
|
|
13
|
-
* Set to `null` to deselect all options.
|
|
14
|
-
*/
|
|
15
8
|
value?: T | null;
|
|
16
|
-
/**
|
|
17
|
-
* Callback fired when an option is selected.
|
|
18
|
-
*/
|
|
19
9
|
onChange?: (value: T | null) => void;
|
|
20
|
-
/**
|
|
21
|
-
* Text to show when there is no selected value.
|
|
22
|
-
*/
|
|
23
10
|
placeholder?: ReactNode;
|
|
24
|
-
/**
|
|
25
|
-
* props applied to root
|
|
26
|
-
*/
|
|
27
11
|
rootProps?: Omit<ComponentProps<'div'>, 'className' | 'ref'> & HTMLDataAttribute;
|
|
28
|
-
/**
|
|
29
|
-
* props applied to button
|
|
30
|
-
*/
|
|
31
12
|
buttonProps?: Omit<ComponentPropsWithRef<'button'>, 'className'> & HTMLDataAttribute & Pick<UseFocusVisibleOptions, 'onFocusVisible'>;
|
|
32
|
-
/**
|
|
33
|
-
* props applied to menu
|
|
34
|
-
*/
|
|
35
13
|
MenuProps?: (Omit<VirtualizedMenuProps, 'open' | 'anchorEl' | 'onClose' | 'initialFocus' | 'data' | 'children'> | Omit<MenuProps, 'open' | 'anchorEl' | 'onClose' | 'children'>) & HTMLDataAttribute;
|
|
36
14
|
ref?: Ref<HTMLDivElement>;
|
|
37
15
|
buttonRef?: Ref<HTMLButtonElement>;
|
|
38
|
-
/**
|
|
39
|
-
* When enabled, the menu items will be rendered in a virtualized list.
|
|
40
|
-
* Set this prop to `true` when you have a large number of options to render.
|
|
41
|
-
* Please note that this prop will default to `false` in the next major version.
|
|
42
|
-
* @default true
|
|
43
|
-
*/
|
|
44
16
|
virtualize?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Render the selected value.
|
|
47
|
-
*
|
|
48
|
-
* @param value The `value` provided to the component.
|
|
49
|
-
* @returns {ReactNode}
|
|
50
|
-
*/
|
|
51
17
|
renderValue?: (value: T) => React.ReactNode;
|
|
52
|
-
/**
|
|
53
|
-
* If `true`, the select element is focused during the first mount
|
|
54
|
-
* @default false
|
|
55
|
-
*/
|
|
56
18
|
autoFocus?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* If `true`, the select is disabled.
|
|
59
|
-
* @default false
|
|
60
|
-
*/
|
|
61
19
|
disabled?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* If `true`, the select will be initially open.
|
|
64
|
-
* @default false
|
|
65
|
-
*/
|
|
66
20
|
defaultOpen?: boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Controls the open state of the select's menu.
|
|
69
|
-
* @default undefined
|
|
70
|
-
*/
|
|
71
21
|
open?: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Name of the element. For example used by the server to identify the fields in form submits.
|
|
74
|
-
* If the name is provided, the component will render a hidden input element that can be submitted to a server.
|
|
75
|
-
*/
|
|
76
22
|
name?: string;
|
|
77
|
-
/**
|
|
78
|
-
* Callback fired when the component requests to be opened.
|
|
79
|
-
*/
|
|
80
23
|
onOpenChange?: (isOpen: boolean) => void;
|
|
81
|
-
/**
|
|
82
|
-
* label for component
|
|
83
|
-
*/
|
|
84
24
|
label?: string;
|
|
85
25
|
data: D[];
|
|
86
26
|
children: ReactNode | VirtualizedMenuProps['children'];
|
|
87
|
-
/**
|
|
88
|
-
* Get selected item index to focus item when open dropdown.
|
|
89
|
-
* If no provide this handler, will compare value with `data` by default.
|
|
90
|
-
*/
|
|
91
27
|
getSelectedIndex?: (value: T) => number;
|
|
92
28
|
}, DropdownClassesKey>;
|
|
93
29
|
export interface DropdownComponent {
|
|
@@ -2,20 +2,8 @@
|
|
|
2
2
|
import { StandardProps } from '@ringcentral/spring-base';
|
|
3
3
|
import { EmptyStateClassesKey } from './EmptyState.classes';
|
|
4
4
|
export declare type EmptyStateProps = StandardProps<{
|
|
5
|
-
/**
|
|
6
|
-
* The icon to display at the top of the component.
|
|
7
|
-
*/
|
|
8
5
|
icon?: React.ComponentType;
|
|
9
|
-
/**
|
|
10
|
-
* The title to display.
|
|
11
|
-
*/
|
|
12
6
|
title?: React.ReactNode;
|
|
13
|
-
/**
|
|
14
|
-
* The description to display.
|
|
15
|
-
*/
|
|
16
7
|
description?: React.ReactNode;
|
|
17
|
-
/**
|
|
18
|
-
* The actions to display at the bottom of the component.
|
|
19
|
-
*/
|
|
20
8
|
actions?: React.ReactNode[];
|
|
21
9
|
}, EmptyStateClassesKey, 'div'>;
|
|
@@ -6,12 +6,7 @@ import { FabButtonClassesKey } from './FabButton.classes';
|
|
|
6
6
|
declare type DefaultElementType = 'button';
|
|
7
7
|
declare type ExtendElementType = 'button';
|
|
8
8
|
declare type BaseFabButtonProps = WithClassesProps<{
|
|
9
|
-
/** Icon */
|
|
10
9
|
symbol?: ComponentType;
|
|
11
|
-
/**
|
|
12
|
-
* The size of the component.
|
|
13
|
-
* @default 'large'
|
|
14
|
-
*/
|
|
15
10
|
size?: 'large' | 'small';
|
|
16
11
|
} & Omit<UseButtonParameters, 'href' | 'to' | 'focusableWhenDisabled' | 'disabled'>, FabButtonClassesKey>;
|
|
17
12
|
export declare type FabButtonProps<T extends ExtendElementType = DefaultElementType> = OverridableProps<BaseFabButtonProps, ComponentType<SquircleProps<T>>>;
|
|
@@ -1,49 +1,11 @@
|
|
|
1
1
|
import { FocusTrapProps as MuiFocusTrapProps } from '@mui/base';
|
|
2
2
|
import { FunctionComponent, Ref } from 'react';
|
|
3
3
|
declare type FocusTrapAction = {
|
|
4
|
-
/**
|
|
5
|
-
* get the current focus trap is enabled or not
|
|
6
|
-
*/
|
|
7
4
|
isEnabled: () => boolean;
|
|
8
5
|
};
|
|
9
6
|
declare type FocusTrapProps = Omit<MuiFocusTrapProps, 'isEnabled'> & {
|
|
10
|
-
/**
|
|
11
|
-
* action ref to get the current focus trap is enabled or not
|
|
12
|
-
*/
|
|
13
7
|
action?: Ref<FocusTrapAction>;
|
|
14
8
|
};
|
|
15
|
-
/**
|
|
16
|
-
* Utility component that locks focus inside the component.
|
|
17
|
-
*
|
|
18
|
-
* @deprecated This component is deprecated. Use `useFocusTrapStack` hook directly with MUI's FocusTrap instead.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```tsx
|
|
22
|
-
* import { FocusTrap } from '@mui/base';
|
|
23
|
-
* import { useFocusTrapStack } from '@ringcentral/spring-ui';
|
|
24
|
-
*
|
|
25
|
-
* function MyModal({ open, children }) {
|
|
26
|
-
* // Call useFocusTrapStack where the `open` prop changes first (typically in Modal/Dialog)
|
|
27
|
-
* // This prevents race conditions between stack registration and autofocus behavior
|
|
28
|
-
* const { isEnabled } = useFocusTrapStack({ open });
|
|
29
|
-
*
|
|
30
|
-
* return open ? (
|
|
31
|
-
* <Portal>
|
|
32
|
-
* <div className="modal-backdrop">
|
|
33
|
-
* <FocusTrap
|
|
34
|
-
* open={open}
|
|
35
|
-
* isEnabled={isEnabled}
|
|
36
|
-
* >
|
|
37
|
-
* <div className="modal-content" tabIndex={-1}>
|
|
38
|
-
* {children}
|
|
39
|
-
* </div>
|
|
40
|
-
* </FocusTrap>
|
|
41
|
-
* </div>
|
|
42
|
-
* </Portal>
|
|
43
|
-
* ) : null;
|
|
44
|
-
* }
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
9
|
declare const FocusTrap: FunctionComponent<FocusTrapProps>;
|
|
48
10
|
export { FocusTrap };
|
|
49
11
|
export type { FocusTrapProps };
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
export interface UseFocusTrapStackOptions {
|
|
2
|
-
/**
|
|
3
|
-
* Whether the focus trap is open
|
|
4
|
-
*/
|
|
5
2
|
open: boolean;
|
|
6
3
|
}
|
|
7
4
|
export interface UseFocusTrapStackReturn {
|
|
8
|
-
/**
|
|
9
|
-
* Check if the current focus trap is enabled (i.e., is the topmost in the stack)
|
|
10
|
-
*/
|
|
11
5
|
isEnabled: () => boolean;
|
|
12
6
|
}
|
|
13
|
-
/**
|
|
14
|
-
* Hook to manage focus trap stack for proper layering and focus management
|
|
15
|
-
*/
|
|
16
7
|
export declare const useFocusTrapStack: ({ open, }: UseFocusTrapStackOptions) => UseFocusTrapStackReturn;
|
|
@@ -4,39 +4,13 @@ import { FormFieldClassesKey } from './FormField.classes';
|
|
|
4
4
|
export declare type FormFieldVariant = 'standard' | 'outlined' | 'quiet' | 'contained';
|
|
5
5
|
export declare type FormFieldSize = 'xlarge' | 'large' | 'medium';
|
|
6
6
|
export declare type FormFieldProps = StandardProps<{
|
|
7
|
-
/**
|
|
8
|
-
* The label on the form element
|
|
9
|
-
*/
|
|
10
7
|
label?: React.ReactNode;
|
|
11
|
-
/**
|
|
12
|
-
* Props passed to the <label> element
|
|
13
|
-
*/
|
|
14
8
|
labelProps?: DetailedHTMLProps<LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
|
|
15
|
-
/**
|
|
16
|
-
* The help text under the form element
|
|
17
|
-
*/
|
|
18
9
|
helperText?: React.ReactNode;
|
|
19
|
-
/**
|
|
20
|
-
* If true, always show focused style
|
|
21
|
-
* @default false
|
|
22
|
-
*/
|
|
23
10
|
focused?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* The size of the form element
|
|
26
|
-
* @default 'xlarge'
|
|
27
|
-
*/
|
|
28
11
|
size?: FormFieldSize;
|
|
29
|
-
/**
|
|
30
|
-
* Pass ref to the content node
|
|
31
|
-
*/
|
|
32
12
|
contentRef?: Ref<HTMLDivElement>;
|
|
33
|
-
/**
|
|
34
|
-
* Pass props to the content node
|
|
35
|
-
*/
|
|
36
13
|
contentProps?: Omit<ComponentProps<'div'>, 'className'> & HTMLDataAttribute;
|
|
37
|
-
/**
|
|
38
|
-
* Pass props to the helperText node
|
|
39
|
-
*/
|
|
40
14
|
FormHelperTextProps?: ComponentProps<'div'> & HTMLDataAttribute;
|
|
41
15
|
variant?: FormFieldVariant;
|
|
42
16
|
htmlFor?: string;
|
|
@@ -1,30 +1,5 @@
|
|
|
1
1
|
import { FormFieldProps } from './FormField.type';
|
|
2
2
|
export interface UseHelperTextIdOptions extends Pick<FormFieldProps, 'helperText' | 'FormHelperTextProps'> {
|
|
3
|
-
/**
|
|
4
|
-
* The base ID to generate helper text ID from
|
|
5
|
-
*/
|
|
6
3
|
id: string;
|
|
7
4
|
}
|
|
8
|
-
/**
|
|
9
|
-
* Hook to generate consistent helper text IDs for form field accessibility
|
|
10
|
-
*
|
|
11
|
-
* Follows the pattern: `${id}-helper-text`
|
|
12
|
-
*
|
|
13
|
-
* @param options Configuration options
|
|
14
|
-
* @returns Generated helper text ID or undefined if no helper text
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```tsx
|
|
18
|
-
* const Select = ({ helperText, FormHelperTextProps, ...props }) => {
|
|
19
|
-
* const id = useId(idProp);
|
|
20
|
-
* const helperTextId = useHelperTextId({ helperText, id, FormHelperTextProps });
|
|
21
|
-
*
|
|
22
|
-
* return (
|
|
23
|
-
* <FormField FormHelperTextProps={{ id: helperTextId, ...FormHelperTextProps }}>
|
|
24
|
-
* <button aria-describedby={helperTextId}>
|
|
25
|
-
* </FormField>
|
|
26
|
-
* );
|
|
27
|
-
* };
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
5
|
export declare const useHelperTextId: ({ helperText, id, FormHelperTextProps, }: UseHelperTextIdOptions) => string | undefined;
|
|
@@ -4,23 +4,9 @@ import { FormLabelContextValue } from './FormLabelContext';
|
|
|
4
4
|
import { FormLabelClassesKey } from './FormLabel.classes';
|
|
5
5
|
export declare type FormLabelPlacement = 'end' | 'start';
|
|
6
6
|
export declare type FormLabelProps = StandardProps<{
|
|
7
|
-
/**
|
|
8
|
-
* label text for input element
|
|
9
|
-
*/
|
|
10
7
|
label?: ReactNode;
|
|
11
|
-
/**
|
|
12
|
-
* The ref to the label element
|
|
13
|
-
*/
|
|
14
8
|
labelRef?: Ref<HTMLLabelElement>;
|
|
15
|
-
/**
|
|
16
|
-
* If `true`, the `Label` will take up the full width of its container.
|
|
17
|
-
* @default false
|
|
18
|
-
*/
|
|
19
9
|
fullWidth?: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* The placement of the label in relation to the input.
|
|
22
|
-
* @default end
|
|
23
|
-
*/
|
|
24
10
|
placement?: FormLabelPlacement;
|
|
25
11
|
rootProps?: ComponentPropsWithoutRef<'div'> & HTMLDataAttribute;
|
|
26
12
|
} & FormLabelContextValue, FormLabelClassesKey, 'label'>;
|
package/src/Icon/Icon.type.d.ts
CHANGED
|
@@ -3,23 +3,8 @@ import { StandardProps } from '@ringcentral/spring-base';
|
|
|
3
3
|
import { IconClassesKey } from './Icon.classes';
|
|
4
4
|
declare type IconSize = 'xxxlarge' | 'xxlarge' | 'xlarge' | 'large' | 'medium' | 'small' | 'xsmall';
|
|
5
5
|
export declare type IconProps = StandardProps<{
|
|
6
|
-
/** Component for render, higher priority than `children` */
|
|
7
6
|
symbol?: ComponentType<any>;
|
|
8
|
-
/** Element for render */
|
|
9
7
|
children?: ReactElement;
|
|
10
|
-
/**
|
|
11
|
-
* Size of the icon.
|
|
12
|
-
*
|
|
13
|
-
* @remarks
|
|
14
|
-
* The available sizes are:
|
|
15
|
-
* - `"xsmall": 12px`
|
|
16
|
-
* - `"small": 16px`
|
|
17
|
-
* - `"medium": 20px`
|
|
18
|
-
* - `"large": 24px`
|
|
19
|
-
* - `"xlarge": 32px`
|
|
20
|
-
* - `"xxlarge": 36px`
|
|
21
|
-
* - `"xxxlarge": 40px`
|
|
22
|
-
*/
|
|
23
8
|
size?: IconSize;
|
|
24
9
|
}, IconClassesKey, 'span'>;
|
|
25
10
|
export {};
|
|
@@ -11,43 +11,13 @@ export declare type IconButtonVariant = 'outlined' | 'contained' | 'icon' | 'inv
|
|
|
11
11
|
export declare type IconButtonShape = 'circular' | 'rectangular' | 'squircle';
|
|
12
12
|
export declare type IconButtonColor = 'danger' | 'warning' | 'primary' | 'success' | 'secondary' | 'neutral';
|
|
13
13
|
declare type BaseIconButtonProps = WithClassesProps<WithTooltipProps<{
|
|
14
|
-
/**
|
|
15
|
-
* The icon to render. If children are provided the icon will not be rendered.
|
|
16
|
-
*/
|
|
17
14
|
symbol?: ComponentType;
|
|
18
|
-
/**
|
|
19
|
-
* The variant of the component.
|
|
20
|
-
* @default "outlined"
|
|
21
|
-
*/
|
|
22
15
|
variant?: IconButtonVariant;
|
|
23
|
-
/**
|
|
24
|
-
* The label text. Only applies to XXXLarge/XXLarge sizes.
|
|
25
|
-
*/
|
|
26
16
|
label?: string;
|
|
27
|
-
/**
|
|
28
|
-
* The color of the component.
|
|
29
|
-
* @default "primary"
|
|
30
|
-
*/
|
|
31
17
|
color?: IconButtonColor;
|
|
32
|
-
/**
|
|
33
|
-
* The size of the component.
|
|
34
|
-
* @default "large"
|
|
35
|
-
*/
|
|
36
18
|
size?: IconButtonSize;
|
|
37
|
-
/**
|
|
38
|
-
* The shape of the component.
|
|
39
|
-
* @default "circular"
|
|
40
|
-
*/
|
|
41
19
|
shape?: IconButtonShape;
|
|
42
|
-
/**
|
|
43
|
-
* Controls whether the component should have a background in its resting state.
|
|
44
|
-
* Does not apply to the "icon" variant.
|
|
45
|
-
* @default true
|
|
46
|
-
*/
|
|
47
20
|
background?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Overrides the default icon size.
|
|
50
|
-
*/
|
|
51
21
|
iconSize?: IconProps['size'];
|
|
52
22
|
} & Omit<UseButtonParameters, 'href'>>, IconButtonClassesKey>;
|
|
53
23
|
export declare type IconButtonProps<T extends ExtendElementType = DefaultElementType> = OverridableProps<BaseIconButtonProps, T>;
|
|
@@ -3,9 +3,6 @@ import { UseButtonParameters } from '@mui/base';
|
|
|
3
3
|
import { StandardProps } from '@ringcentral/spring-base';
|
|
4
4
|
import { IconButtonLabelClassesKey } from './IconButtonLabel.classes';
|
|
5
5
|
declare type IconButtonLabelProps = StandardProps<{
|
|
6
|
-
/**
|
|
7
|
-
* The label text of icon button.
|
|
8
|
-
*/
|
|
9
6
|
label?: string;
|
|
10
7
|
children: ReactElement;
|
|
11
8
|
} & UseButtonParameters, IconButtonLabelClassesKey, 'div'>;
|
|
@@ -3,15 +3,7 @@ import { OverridableComponent, OverridableProps, WithClassesProps } from '@ringc
|
|
|
3
3
|
import { IconButtonGroupClassesKey } from './IconButtonGroup.classes';
|
|
4
4
|
declare type DefaultElementType = 'div';
|
|
5
5
|
export declare type BaseIconButtonGroupProps = WithClassesProps<{
|
|
6
|
-
/**
|
|
7
|
-
* The component orientation (layout flow direction)
|
|
8
|
-
* @default 'horizontal'
|
|
9
|
-
*/
|
|
10
6
|
orientation?: 'horizontal' | 'vertical';
|
|
11
|
-
/**
|
|
12
|
-
* If true the border will be shown
|
|
13
|
-
* @default false
|
|
14
|
-
*/
|
|
15
7
|
border?: boolean;
|
|
16
8
|
}, IconButtonGroupClassesKey>;
|
|
17
9
|
export declare type IconButtonGroupProps<T extends ElementType = DefaultElementType> = OverridableProps<BaseIconButtonGroupProps, T>;
|
|
@@ -14,103 +14,28 @@ export declare type InputEditHandler<T = EditCompleteReason> = (e: KeyboardEvent
|
|
|
14
14
|
export declare type EditCompleteReason = 'Enter' | 'Escape' | 'Blur';
|
|
15
15
|
export declare type InlineEditableVariant = 'standard' | 'outlined';
|
|
16
16
|
export declare type InlineEditableProps = StandardProps<(({
|
|
17
|
-
/**
|
|
18
|
-
* If `true`, a textarea element will be rendered instead of an input.
|
|
19
|
-
*/
|
|
20
17
|
multiline: true;
|
|
21
|
-
/**
|
|
22
|
-
* Callback invoked when done editing due to reasons below:
|
|
23
|
-
* 1. User presses 'Enter'
|
|
24
|
-
* 2. User presses 'Escape'
|
|
25
|
-
* 3. User triggers 'Blur', for example: press Tab or click elsewhere
|
|
26
|
-
*/
|
|
27
18
|
onEditComplete?: TextareaEditHandler;
|
|
28
|
-
/**
|
|
29
|
-
* Callback invoked when done editing due to reasons below:
|
|
30
|
-
* 1. User presses 'Enter'
|
|
31
|
-
* 2. User triggers 'Blur', for example: press Tab or click elsewhere
|
|
32
|
-
*/
|
|
33
19
|
onEditConfirm?: TextareaEditHandler<'Enter' | 'Blur'>;
|
|
34
|
-
/**
|
|
35
|
-
* Callback invoked when done editing due to reasons below:
|
|
36
|
-
* 1. User presses 'Escape'
|
|
37
|
-
*/
|
|
38
20
|
onEditCancel?: TextareaEditHandler<'Escape'>;
|
|
39
21
|
} & TextareaAutosizeProps) | ({
|
|
40
22
|
multiline: false;
|
|
41
|
-
/**
|
|
42
|
-
* Callback invoked when done editing due to reasons below:
|
|
43
|
-
* 1. User presses 'Enter'
|
|
44
|
-
* 2. User presses 'Escape'
|
|
45
|
-
* 3. User triggers 'Blur', for example: press Tab or click elsewhere
|
|
46
|
-
*/
|
|
47
23
|
onEditComplete?: InputEditHandler;
|
|
48
|
-
/**
|
|
49
|
-
* Callback invoked when done editing due to reasons below:
|
|
50
|
-
* 1. User presses 'Enter'
|
|
51
|
-
* 2. User triggers 'Blur', for example: press Tab or click elsewhere
|
|
52
|
-
*/
|
|
53
24
|
onEditConfirm?: InputEditHandler<'Enter' | 'Blur'>;
|
|
54
|
-
/**
|
|
55
|
-
* Callback invoked when done editing due to reasons below:
|
|
56
|
-
* 1. User presses 'Escape'
|
|
57
|
-
*/
|
|
58
25
|
onEditCancel?: InputEditHandler<'Escape'>;
|
|
59
26
|
} & ComponentPropsWithRef<'input'>) | ({
|
|
60
27
|
multiline?: never;
|
|
61
|
-
/**
|
|
62
|
-
* Callback invoked when done editing due to reasons below:
|
|
63
|
-
* 1. User presses 'Enter'
|
|
64
|
-
* 2. User presses 'Escape'
|
|
65
|
-
* 3. User triggers 'Blur', for example: press Tab or click elsewhere
|
|
66
|
-
*/
|
|
67
28
|
onEditComplete?: InputEditHandler;
|
|
68
|
-
/**
|
|
69
|
-
* Callback invoked when done editing due to reasons below:
|
|
70
|
-
* 1. User presses 'Enter'
|
|
71
|
-
* 2. User triggers 'Blur', for example: press Tab or click elsewhere
|
|
72
|
-
*/
|
|
73
29
|
onEditConfirm?: InputEditHandler<'Enter' | 'Blur'>;
|
|
74
|
-
/**
|
|
75
|
-
* Callback invoked when done editing due to reasons below:
|
|
76
|
-
* 1. User presses 'Escape'
|
|
77
|
-
*/
|
|
78
30
|
onEditCancel?: InputEditHandler<'Escape'>;
|
|
79
31
|
} & ComponentPropsWithRef<'input'>)) & {
|
|
80
|
-
/**
|
|
81
|
-
* The variant to use.
|
|
82
|
-
* @default 'standard'
|
|
83
|
-
*/
|
|
84
32
|
variant?: InlineEditableVariant;
|
|
85
|
-
/**
|
|
86
|
-
* The value of the input/textarea.
|
|
87
|
-
*/
|
|
88
33
|
value: string;
|
|
89
|
-
/**
|
|
90
|
-
* The default editing state. Use when the component is not controlled.
|
|
91
|
-
*/
|
|
92
34
|
defaultEditing?: boolean;
|
|
93
|
-
/**
|
|
94
|
-
* The editing state. Use when the component is controlled.
|
|
95
|
-
*/
|
|
96
35
|
isEditing?: boolean;
|
|
97
|
-
/**
|
|
98
|
-
* Callback invoked when input/textarea is focused.
|
|
99
|
-
*/
|
|
100
36
|
onEditStart?: () => void;
|
|
101
|
-
/**
|
|
102
|
-
* If `true`, the edit functionality will be disabled.
|
|
103
|
-
*/
|
|
104
37
|
disabled?: boolean;
|
|
105
|
-
/**
|
|
106
|
-
* If `true`, the input will take up the full width of its container.
|
|
107
|
-
* If `multiline` is `true`, fullWidth will be set to `true`.
|
|
108
|
-
*/
|
|
109
38
|
fullWidth?: boolean;
|
|
110
|
-
/**
|
|
111
|
-
* Props applied to Tooltip component when not editing.
|
|
112
|
-
*/
|
|
113
39
|
TooltipProps?: Omit<TooltipProps, 'children' | 'open' | 'onOpenStateChange'>;
|
|
114
|
-
/** Attributes applied to root div*/
|
|
115
40
|
rootProps?: ComponentProps<'div'> & HTMLDataAttribute;
|
|
116
41
|
}, InlineEditableClassesKey>;
|
|
@@ -4,43 +4,12 @@ import { LinearProgressIndicatorClassesKey } from './LinearProgressIndicator.cla
|
|
|
4
4
|
export declare type LinearProgressIndicatorVariant = 'determinate';
|
|
5
5
|
export declare type LinearProgressIndicatorProps = StandardProps<{
|
|
6
6
|
variant: LinearProgressIndicatorVariant;
|
|
7
|
-
/**
|
|
8
|
-
* Shows a slim and more compact indicator.
|
|
9
|
-
* @default false
|
|
10
|
-
*/
|
|
11
7
|
slim?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* The label shown above the progress bar.
|
|
14
|
-
*
|
|
15
|
-
*/
|
|
16
8
|
label?: ReactNode;
|
|
17
|
-
/**
|
|
18
|
-
* The progress details shown below the progress bar (i.e. 0.2mb of 8mb).
|
|
19
|
-
* @default false
|
|
20
|
-
*/
|
|
21
9
|
details?: ReactNode;
|
|
22
|
-
/**
|
|
23
|
-
* Shows the current percentage of the indicator. Only applies when `showDetails` is true
|
|
24
|
-
* @default false
|
|
25
|
-
*/
|
|
26
10
|
showPercentage?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* Sets the value of the indicator.
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
11
|
value: number;
|
|
32
|
-
/**
|
|
33
|
-
* Sets the minimum value of the indicator.. Defaults to `0`
|
|
34
|
-
* @default 0
|
|
35
|
-
*/
|
|
36
12
|
min?: number;
|
|
37
|
-
/**
|
|
38
|
-
* Sets the maximum value of the indicator. Used to calculate the current percentage.
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
13
|
max: number;
|
|
42
|
-
/**
|
|
43
|
-
* Sets the props that are applied to the `role="progressbar"` element
|
|
44
|
-
*/
|
|
45
14
|
progressBarProps?: Omit<ComponentProps<'span'>, 'ref' | 'role'>;
|
|
46
15
|
}, LinearProgressIndicatorClassesKey, 'span'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CamelCase } from 'type-fest';
|
|
2
2
|
export declare type LinkHoverBehavior = 'none' | 'hover' | 'always';
|
|
3
|
-
export declare type BaseLinkClassesKey = 'root' | 'primary' | 'secondary' | LinkHoverBehavior;
|
|
3
|
+
export declare type BaseLinkClassesKey = 'root' | 'primary' | 'secondary' | 'inverted' | LinkHoverBehavior;
|
|
4
4
|
export declare type LinkClassesKey = CamelCase<BaseLinkClassesKey>;
|
|
5
5
|
export declare type LinkClasses = {
|
|
6
6
|
name: 'link';
|
package/src/Link/Link.type.d.ts
CHANGED
|
@@ -2,16 +2,7 @@ import { OverridableComponent, OverridableProps, UseFocusVisibleOptions, WithCla
|
|
|
2
2
|
import { LinkClassesKey } from './Link.classes';
|
|
3
3
|
declare type DefaultElementType = 'a';
|
|
4
4
|
export declare type BaseLinkProps = WithClassesProps<{
|
|
5
|
-
|
|
6
|
-
* variant of Link
|
|
7
|
-
*
|
|
8
|
-
* @default 'primary'
|
|
9
|
-
*/
|
|
10
|
-
variant?: 'primary' | 'secondary';
|
|
11
|
-
/**
|
|
12
|
-
* underline behavior of Link
|
|
13
|
-
* @default 'hover'
|
|
14
|
-
*/
|
|
5
|
+
variant?: 'primary' | 'secondary' | 'inverted';
|
|
15
6
|
underline?: 'none' | 'hover' | 'always';
|
|
16
7
|
} & Pick<UseFocusVisibleOptions, 'onFocusVisible'>, LinkClassesKey>;
|
|
17
8
|
export declare type LinkProps = OverridableProps<BaseLinkProps, DefaultElementType>;
|